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
docs([backport-pre-023-migrations-to-_lib]): swap PLAN item for follow-up + changelog entry
[._.]/ Adam Eivyfa00718b5de3
diff --git a/.changelog/NEXT.md b/.changelog/NEXT.mdindex bb8b1dfd79..e1523a993c 100644--- a/.changelog/NEXT.md+++ b/.changelog/NEXT.md@@ -9,6 +9,7 @@- **GOALS.md now reflects the full app.** Added two missing core goals — **Creative Production Suite** (Writers Room, Universe Builder, Series Pipeline, Creative Director, Image/Video Gen, Timeline, LoRAs, Importer, Sharing) and **Cognitive Training & Lifelong Learning** (POST, Morse, Rapid Reader, Wiki). Reframed Purpose and tagline around "everything app," "create more than consume," and "interface with the world and with myself." Updated Status table and Secondary Goals (music/audio production, mood board, sketch canvas, federated sharing, cross-domain insights).- **[cover-prose-input-idea-input-in-canonusage-corpus] Universe canon cross-reference test suite now pins every stage the per-issue search reads** — a regression that silently drops a stage from the search now fails the test suite immediately.- **[extract-shared-requiretoolkit-helper] Internal: consolidated three duplicated AI toolkit accessors into one shared module.** No behavior change; cuts ~30 lines and makes future toolkit-state changes one-touch.+- **[backport-pre-023-migrations-to-_lib] Internal: collapsed seven settled prompt-update migrations onto the shared `_lib.js` helper.** Drops ~465 lines of duplicated migration scaffolding so future prompt-replace migrations are easier to read and review. Migration 003 also drops its reference to the long-renamed `pipeline-tv-script.md` template; a legacy install that still carried that file would have crashed migration 003 anyway, and is now harmlessly ignored.- **[codex5-bundle-lazy-routes] Dashboard widgets load on demand.** A dashboard layout now only downloads the widgets it actually uses — the first paint of a slimmed-down layout no longer drags in every widget in the registry, and slow widgets render their own placeholder while loading instead of blocking sibling cells. Also adds an `npm run build:analyze` script for inspecting bundle composition during development.- **[strip-stage-runhistory-from-list-payloads] Pipeline list views stay lean as version history grows.** The sidebar's recent-issues list and the per-series issue list no longer ship each stage's full draft history on every read — the History button on an issue's detail page still shows the full set, but list responses can no longer balloon to many megabytes once a series has many issues with deep histories.- **GOALS.md is now purely strategic; CoS runtime guidance lives in `docs/GOALS_OPERATIONAL.md`.** The per-domain operational goals, task-generation priorities, and core principles that the autonomous agent reads have been split out of GOALS.md so each file has a single concern. No behavior change — the Goal Progress dashboard still reads the same goals; only the file path moved.diff --git a/PLAN.md b/PLAN.mdindex 01eb066210..ecaac48253 100644--- a/PLAN.md+++ b/PLAN.md@@ -5,7 +5,7 @@ For project goals, see [GOALS.md](./GOALS.md). For completed work, see [.changel## Next Up- [ ] [agent-spawn-widen-try-finally-guard] **Widen the `spawningTasks` guard in `agentLifecycle.js` to cover the whole spawn path.** `server/services/agentLifecycle.js:~165` adds `task.id` to `spawningTasks` but the `try/finally` only wraps a narrow window; an uncaught throw inside `buildAgentPrompt`, `writeFile('prompt.txt')`, `createAgentRun`, or `registerAgent` (lines ~165–525) leaks the guard forever, permanently blocking re-spawns of that task id until process restart. Four `it.skip('TODO(plan.md backlog): …')` tests at `agentLifecycle.test.js:440-490` already pin the regression and flip green on fix. Single-user system means a stuck guard is silently un-recoverable.-- [ ] [backport-pre-023-migrations-to-_lib] **Back-port pre-023 prompt-replace migrations onto `scripts/migrations/_lib.js`.** 003 / 004 / 005 / 006 / 010 / 013 / 019 all clone the inline `applyMigration` + per-file scan + customized-skip warning pattern that `_lib.js` now centralizes. Wrap any `OLD_SHIPPED_MD5: string` entries (003 / 004 / 006) into single-element arrays to match the `accepted[filename]: string[]` shape. Drop ~70 LOC per migration; nothing changes behaviorally so the only risk is mis-typed hashes — review each diff alongside a re-run of its test against the `_testHelpers.js` `runPromptMigrationTests`. Settled-history migrations have a higher rewrite-bar than active code, so a separate PR with focused review is appropriate. Surfaced by /simplify during `[pipeline-idea-stage-character-detail-plumbing]`.+- [ ] [bump-stale-shipped-md5-on-settled-migrations] **Bump stale `NEW_SHIPPED_MD5` entries on settled migrations + add `runPromptMigrationTests` coverage.** Migrations 003 / 004 / 005 / 013 still record their original NEW hash, but downstream migrations have since evolved the same files (e.g. 003's `pipeline-idea-expansion.md` is at the post-025 hash today, 005's `pipeline-arc-overview.md` is at the post-019 hash, 013's `pipeline-comic-script.md` is past `133d200d069c2e8173b7c129eea58f53`). That's a latent bug: a fresh install with `data/migrations.applied.json` cleared misclassifies every shipped file as "customized" instead of "already current," and `runPromptMigrationTests`'s drift-catch can't be wired up. Per the 019 convention, bump each migration's `NEW_SHIPPED_MD5` entry to the current `data.sample` hash and append the intermediate hash(es) to `ACCEPTED_OLD_MD5`; then add a `<num>.test.js` that calls `runPromptMigrationTests`. Skipped from `[backport-pre-023-migrations-to-_lib]` because that PR was scoped to a pure refactor.- [ ] [codex5-polling-consolidation] **[P2][PERF]** Migrate remaining `setInterval` callers to `useAutoRefetch`. The shared hook at `client/src/hooks/useAutoRefetch.js` exists; 20+ pages/components still spin local `setInterval`s — ChiefOfStaff, Brain, DigitalTwin, Loops, Browser, CyberCity, ImageGen, Ambient, AgentsPage, calendar, meatspace, city tabs. Migrate each to `useAutoRefetch` (which already provides the `document.visibilityState === 'hidden'` short-circuit); for domains with a Socket.IO event stream, switch to event-driven refetch instead of polling.- [ ] [codex5-client-error-reporter] **[P2][OBSERVABILITY]** Funnel client errors into Review Hub. `client/src/main.jsx`'s `window.onerror` + `unhandledrejection` listeners only `console.log` today. Add `POST /api/client-errors` with redaction (drop tokens / long payloads) + rate-limit (~1/sec, drop duplicates by message+stack hash). Surface grouped client errors in the Review Hub feed; optionally raise a CoS task at a configurable threshold.- [ ] [codex5-dashboard-intent-layouts] **[P2][DASHBOARD]** Finish intent-named layouts + morning default + widget suggestions. `server/services/dashboardLayouts.js` seeds `morning-review` and `ops` already; still missing `Deep Work`, `Health`, `Agent Watch`. Add the three remaining seeded layouts, a "make this my morning default" toggle that activates a layout in a configured time window, and a "widget suggestion" hint: when a layout omits a widget whose data source is populated (e.g. layout has no calendar widget but calendar is connected), surface an inline "Add Calendar?" affordance.