Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS
JavaScript ai-agentsdashboarddeveloper-toolsdigital-twinquantified-selfsecond-brainself-hostedtailscale
fix: count Writers Room works in the Wordsmith skill (#2674)
[._.]/ Adam Eivy99dd7a3d5d31
diff --git a/.changelog/NEXT.md b/.changelog/NEXT.mdindex 4ec03625a3..5f849a65a8 100644--- a/.changelog/NEXT.md+++ b/.changelog/NEXT.md@@ -2,7 +2,7 @@## Added-- [issue-2674] **Your Character sheet now has skills that reflect how you actually use PortOS.** Six skills — Wordsmith (Create/Writers Room), Mentalist (POST), Vitalist (health logging), Strategist (goal discipline), Archivist (Brain/memory), and Auteur (media) — level up from the work you've already done, on a curve where each doubling of use earns a level, so they climb quickly at first and then ask for real commitment. Nothing new is tracked to make this work: each skill reads the stats its domain already keeps, so the skills are accurate from the moment you upgrade rather than starting everyone at zero. A domain you've never touched is honestly level 0, and a domain whose stats can't be read says "Unavailable" rather than pretending it's zero — currently for Wordsmith, Archivist, and Auteur, whose sources report failures; the three file-backed skills can't yet tell an unreadable file from an empty one, which is tracked separately. Skills are computed fresh on every read and never saved or synced between your machines — usage differs per machine, so syncing them would let the laptop you barely open overwrite the desktop you live in.+- [issue-2674] **Your Character sheet now has skills that reflect how you actually use PortOS.** Six skills — Wordsmith (universes, Writers Room works, and catalog records), Mentalist (POST), Vitalist (health logging), Strategist (goal discipline), Archivist (Brain/memory), and Auteur (media) — level up from the work you've already done, on a curve where each doubling of use earns a level, so they climb quickly at first and then ask for real commitment. Nothing new is tracked to make this work: each skill reads the stats its domain already keeps, so the skills are accurate from the moment you upgrade rather than starting everyone at zero. A domain you've never touched is honestly level 0, and a domain whose stats can't be read says "Unavailable" rather than pretending it's zero — currently for Wordsmith, Archivist, and Auteur, whose sources report failures; the three file-backed skills can't yet tell an unreadable file from an empty one, which is tracked separately. Skills are computed fresh on every read and never saved or synced between your machines — usage differs per machine, so syncing them would let the laptop you barely open overwrite the desktop you live in.- **Creative Director now has its own Model defaults.** The Creative Director index page gets a **Model defaults** button (deep-linkable at `?models=1`) that pins the provider + model every project uses for Treatment, Production plan, and Scene evaluation — the settings that previously existed only as three rows buried in the global AI Assignments table. Individual projects still override them from their own Models drawer, which now says which default it's inheriting; leaving a stage blank at the Creative Director level falls through to the system default provider, exactly as before. Both surfaces are the same drawer, so the two scopes can't drift.diff --git a/server/services/characterSkills.js b/server/services/characterSkills.jsindex 6793627ca6..55c61ffd97 100644--- a/server/services/characterSkills.js+++ b/server/services/characterSkills.js@@ -39,6 +39,7 @@*/import { listUniverses } from './universeBuilder.js';+import { listWorks } from './writersRoom/local.js';import { getCatalogStats } from './catalogDB.js';import { getPostSessions } from './meatspacePost.js';import { getAllTrainingEntries } from './meatspacePostTraining.js';@@ -96,11 +97,21 @@ export const SKILLS = [// Worldbuilding is slow, high-effort work — a handful of records is already// real engagement, so the first level comes cheap.scale: 2,- // Universes authored + catalog ingredients + captured scraps: the three- // things Create/Writers Room actually produces.+ // Everything Create/Writers Room actually produces: universes authored, catalog+ // ingredients, captured scraps, and Writers Room works. Writers Room is its own store, so+ // omitting it would leave a writing-only user stuck at level 0 in the very skill named+ // for their work.+ //+ // listUniverses()/listWorks() materialize every record (and the universe-run history) for+ // a `.length` — cheap count helpers are tracked in #2729. Bounded for now: the CyberCity+ // poll passes `?skills=0`, so this only runs on an explicit /character read.compute: async () => {- const [universes, catalog] = await Promise.all([listUniverses(), getCatalogStats()]);- return universes.length + catalog.total + catalog.scraps;+ const [universes, works, catalog] = await Promise.all([+ listUniverses(),+ listWorks(),+ getCatalogStats(),+ ]);+ return universes.length + works.length + catalog.total + catalog.scraps;},},{diff --git a/server/services/characterSkills.test.js b/server/services/characterSkills.test.jsindex efa69b4f90..a837067fa8 100644--- a/server/services/characterSkills.test.js+++ b/server/services/characterSkills.test.js@@ -5,6 +5,7 @@ import { describe, it, expect, vi, beforeEach, afterEach } from 'vitest';// dependency graphs (Postgres, the universe store, the meatspace files) loading.const stats = vi.hoisted(() => ({universes: [],+ works: [],catalog: { total: 0, scraps: 0 },sessions: [],training: [],@@ -19,6 +20,7 @@ const stats = vi.hoisted(() => ({const fail = (name) => () => Promise.reject(new Error(`${name} unavailable`));vi.mock('./universeBuilder.js', () => ({ listUniverses: vi.fn(async () => stats.universes) }));+vi.mock('./writersRoom/local.js', () => ({ listWorks: vi.fn(async () => stats.works) }));vi.mock('./catalogDB.js', () => ({ getCatalogStats: vi.fn(async () => stats.catalog) }));vi.mock('./meatspacePost.js', () => ({ getPostSessions: vi.fn(async () => stats.sessions) }));vi.mock('./meatspacePostTraining.js', () => ({ getAllTrainingEntries: vi.fn(async () => stats.training) }));@@ -33,6 +35,7 @@ import { getCatalogStats } from './catalogDB.js';import { getLoggingStats } from './meatspaceLoggingStats.js';import { countMemories } from './memoryBackend.js';import { countAssets } from './mediaAssetIndex/db.js';+import { listWorks } from './writersRoom/local.js';const rows = (list) => Array.from({ length: list }, (_, i) => ({ id: `r${i}` }));@@ -40,6 +43,7 @@ const rows = (list) => Array.from({ length: list }, (_, i) => ({ id: `r${i}` }))// populates one domain can't leak into the next one's empty-domain assertions.beforeEach(() => {stats.universes = [];+ stats.works = [];stats.catalog = { total: 0, scraps: 0 };stats.sessions = [];stats.training = [];@@ -48,6 +52,7 @@ beforeEach(() => {stats.memories = 0;stats.assets = 0;vi.mocked(listUniverses).mockImplementation(async () => stats.universes);+ vi.mocked(listWorks).mockImplementation(async () => stats.works);vi.mocked(getCatalogStats).mockImplementation(async () => stats.catalog);vi.mocked(getLoggingStats).mockImplementation(async () => stats.logging);vi.mocked(countMemories).mockImplementation(async () => stats.memories);@@ -150,15 +155,26 @@ describe('getCharacterSkills — empty domains', () => {});describe('getCharacterSkills — populated domains', () => {- it('derives Wordsmith from universes + catalog ingredients + scraps', async () => {+ it('derives Wordsmith from universes + Writers Room works + catalog ingredients + scraps', async () => {stats.universes = rows(3);- stats.catalog = { total: 8, scraps: 4 }; // 3 + 8 + 4 = 15, scale 2 → 15/2+1 = 8.5 → 3+ stats.works = rows(2);+ stats.catalog = { total: 8, scraps: 2 }; // 3 + 2 + 8 + 2 = 15, scale 2 → 15/2+1 = 8.5 → 3const wordsmith = byId(await getCharacterSkills(), 'wordsmith');expect(wordsmith.value).toBe(15);expect(wordsmith.level).toBe(3);expect(wordsmith.unavailable).toBe(false);});+ it('levels Wordsmith for a Writers-Room-only user with no universes or catalog', async () => {+ // The skill is named for Create AND Writers Room; a writing-only user was stuck at 0+ // while their work went uncounted.+ stats.works = rows(7);+ const wordsmith = byId(await getCharacterSkills(), 'wordsmith');+ expect(wordsmith.value).toBe(7);+ expect(wordsmith.level).toBe(levelFromValue(7, 2));+ expect(wordsmith.level).toBeGreaterThan(0);+ });+it('derives Mentalist from scored sessions AND training entries together', async () => {stats.sessions = rows(5);stats.training = rows(4);