Skip to content

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

docs: delete PLAN.md and stop pointing agents at it

[._.]/ Adam Eivy5587f274b507
diff --git a/.claude/skills/portos-file-issue/SKILL.md b/.claude/skills/portos-file-issue/SKILL.md
index 260108cff6..0155fd10d5 100644
--- a/.claude/skills/portos-file-issue/SKILL.md
+++ b/.claude/skills/portos-file-issue/SKILL.md
@@ -1,11 +1,11 @@
---
name: portos-file-issue
-description: PortOS conventions for filing GitHub issues and capturing deferred work — decide-don't-defer, ready-to-work bodies, and when the future / blocked / needs-input labels are actually correct. Invoke when filing a follow-up issue, triaging, appending to PLAN.md, or claiming an ambiguous issue.
+description: PortOS conventions for filing GitHub issues and capturing deferred work — decide-don't-defer, ready-to-work bodies, and when the future / blocked / needs-input labels are actually correct. Invoke when filing a follow-up issue, triaging, or claiming an ambiguous issue.
---
# Filing issues and capturing deferred work
-- **Capture deferred work before finishing.** If during a task you identify a refactor, cleanup, abstraction, or enhancement that you decide *not* to do (out of scope, risk, time), append it to `PLAN.md` as a `- [ ]` item under the most relevant section (or a new sub-heading) with enough specificity that it can be picked up cold — file paths, line numbers, why it was skipped. Examples: code-review findings rated "skip for this PR," `/simplify` items deferred for scope, "we should also do X but later." Don't end a session with these living only in chat — they evaporate.
+- **Capture deferred work before finishing.** If during a task you identify a refactor, cleanup, abstraction, or enhancement that you decide *not* to do (out of scope, risk, time), file it as a GitHub issue labeled `plan` with enough specificity that it can be picked up cold — file paths, line numbers, why it was skipped. Examples: code-review findings rated "skip for this PR," `/simplify` items deferred for scope, "we should also do X but later." Don't end a session with these living only in chat — they evaporate.
- **Decide, don't defer — avoid decision-blocked issues (`future` / `needs-input`).** A cluster of open issues that each wait on a human decision is worse than a shipped best-guess the user can iterate on. When you would file a follow-up (or claim one) whose only obstacle is an **undecided design choice** — "option A vs B", "which API shape", "is this in scope" — **make the call yourself**: pick the most reasonable option, state it as *the decision* in the issue body (with a one-line rationale), and file it **ready-to-work**, not parked. The user has explicitly accepted the tradeoff — they would rather iterate on top of a wrong-but-shipped choice than accumulate issues that need decisions. Default to your own recommendation; do not punt the decision back to a human.
- **Ready-to-work is the default.** Label an issue for its kind (`bug`, `enhancement`, `code-quality`, `plan`) and write a decision-complete body — the problem, the chosen approach, affected files/paths, and acceptance criteria — so another agent can pick it up cold and ship it. `plan` marks the claimable queue that `/do:next --issues` drains.
diff --git a/CLAUDE.md b/CLAUDE.md
index 5b6a697cfd..4446cee861 100644
--- a/CLAUDE.md
+++ b/CLAUDE.md
@@ -194,7 +194,7 @@ This complements the Security Model (which governs the deployed product) — thi
- **Changelog — write a fragment, never append to `NEXT.md`.** `npm run changelog:add -- <added|changed|fixed|removed> "entry text"` writes `.changelog/next/<section>-<your-branch>.md`. Every parallel agent used to append a bullet to the end of the same section of `NEXT.md`, so two branches cut from the same base added different lines in the same place — a guaranteed merge conflict, and conflict markers have reached `main` because of it. Ordering conventions don't help; git conflicts on adjacent hunks regardless. One file per branch does, because git merges by path. `npm run changelog:collect` folds the fragments into `NEXT.md` and is the **first step of `/do:release`**; `npm run changelog:preview` reads the assembled unreleased notes without changing anything. Editing an already-collected entry in `NEXT.md` is still fine — the rule is about *new* entries on a branch. Note `NEXT.md` is deliberately **not** union-merged: union would resolve a branch that outlives a release by keeping both sides, silently republishing the whole previous release. Full rationale: `.changelog/README.md`.
- **Versioning**: the version in `package.json` reflects the last release. Do not bump during development — `/do:release` handles it.
- After each feature or bug fix, run `/simplify`, then commit and push.
-- **Capture deferred work, and decide rather than park it.** Deferred refactors/cleanups go into `PLAN.md` as `- [ ]` items (or a filed issue), specific enough to pick up cold — never left only in chat. When the sole obstacle is an undecided design choice, **make the call yourself** and file it ready-to-work; `future` / `needs-input` are last resorts. Invoke the `portos-file-issue` skill for the full labeling contract.
+- **Capture deferred work, and decide rather than park it.** Deferred refactors/cleanups go into a filed GitHub issue labeled `plan`, specific enough to pick up cold — never left only in chat. When the sole obstacle is an undecided design choice, **make the call yourself** and file it ready-to-work; `future` / `needs-input` are last resorts. Invoke the `portos-file-issue` skill for the full labeling contract.
- **Never link to AI conversation sessions.** Do not paste `claude.ai`, `chatgpt.com`/`chat.openai.com`, or any other AI chat/session share URL (or a "generated by / view this conversation" link) into a PR description, commit message, issue, or review comment. These leak session context, aren't durable references, and read as AI attribution — the PR must stand on its own with a Summary and a Test plan. Reference durable artifacts instead: issue/PR numbers, commit SHAs, file paths.
- If enough commits have accumulated to warrant a production release, pull the latest `main` and `release`, then run `/do:release` from `main`.
- **Archive approved design plans.** When a plan is approved out of plan mode, copy the finalized plan from `~/.claude/plans/` to `./docs/plans/YYYY-MM-DD-<slug>.md` (date of approval) as a design record before implementing. See `docs/plans/README.md`.
diff --git a/GOALS.md b/GOALS.md
index de44f0643c..368d75186e 100644
--- a/GOALS.md
+++ b/GOALS.md
@@ -87,7 +87,7 @@ PortOS is built for Adam Eivy — a single developer managing active git repos,
The active roadmap lives in the GitHub issue tracker — open issues labeled
[`plan`](https://github.com/atomantic/PortOS/issues?q=is%3Aissue+is%3Aopen+label%3Aplan)
(claimable) and [`future`](https://github.com/atomantic/PortOS/issues?q=is%3Aissue+is%3Aopen+label%3Afuture)
-(parked ideas). See [PLAN.md](./PLAN.md) for the pointer.
+(parked ideas).
| Goal | Status | Notes |
|------|--------|-------|
diff --git a/PLAN.md b/PLAN.md
deleted file mode 100644
index 082bdfaf64..0000000000
--- a/PLAN.md
+++ /dev/null
@@ -1,377 +0,0 @@
-# PortOS — Development Plan
-
-The roadmap now lives entirely in the **GitHub issue tracker**:
-
-- **Active / claimable work** — open issues labeled
- [`plan`](https://github.com/atomantic/PortOS/issues?q=is%3Aissue+is%3Aopen+label%3Aplan).
-- **Parked ideas / not-yet-ready** — open issues labeled
- [`future`](https://github.com/atomantic/PortOS/issues?q=is%3Aissue+is%3Aopen+label%3Afuture)
- (speculative possibilities; promote to `plan` when one becomes a real, claimable task).
-
-Managed by `/do:replan --issues`. For project goals, see [GOALS.md](./GOALS.md);
-for completed work, see [.changelog/](./.changelog/) and `git log`.
-
-This file no longer tracks individual tasks (so it stops generating merge
-conflicts as work proceeds). Speculative ideas now live as `future`-labeled
-issues rather than a list here, so they can each be promoted, refined, or closed
-independently.
-
-### Daily-log autosave follow-ups
-
-Deferred from the daily-log autosave PR. Autosave turned the daily-log save path
-from "a couple of writes a day" into "a write every ~1.5s while typing", which
-amplified several pre-existing inefficiencies on that path. The one that crossed
-a policy line (an LLM summarization call per save once a day's entry outgrows the
-embedding budget) was fixed in that PR by debouncing the journal re-embed
-(`queueJournalResync` in `server/services/brainMemoryBridge.js`). These are the
-rest — each is a perf/cleanup item, none is a correctness bug:
-
-- [x] Delete the dead `journals:changed` event. `server/services/brainJournal.js`
- emits it at lines ~259/298/335/356 as `{ records: await rawRecords() }`, and
- `rawRecords()` (line ~142) rebuilds the entire date→entry map (two full object
- copies of every journal day) — awaited inline before the save returns, so it
- adds latency to every autosave. Verified there is **no** `brainEvents.on('journals:changed')`
- listener anywhere in the repo; `brainMemoryBridge.js:633` documents that it
- deliberately stopped listening. `brainEvents` is an in-process EventEmitter
- (`brainStorage.js`) with no cross-install surface, so removal is compat-safe.
- `server/services/brainJournal.test.js:141` asserts the emit and must be updated.
- Skipped in the autosave PR as pre-existing dead-code cleanup outside its scope.
-- [x] Cache the Obsidian sidecar. `loadObsidianLocations()`
- (`server/services/brainJournal.js:85`) is `ensureDir` + `readJSONFile` with no
- cache, called from `getEntry`, `putEntry`, and `rawRecords` — ~3 uncached file
- reads + 3 `mkdir` syscalls per save, now once per autosave. Mirror the
- write-through cache `brainStorage` already uses (`CACHE_TTL_MS = 2000`). Fixing
- the item above removes one of the three call sites for free.
-- [x] Serialize `scheduleObsidianSync` per date (`server/services/brainJournal.js:238`).
- It rewrites the day's full markdown note fire-and-forget on every save, and its
- own comment notes Obsidian lives on iCloud where "writes can stall for hundreds
- of ms" — so at autosave cadence, overlapping writes to one file are possible and
- last-writer-wins isn't guaranteed to be newest-content. Only affects installs
- with the "Auto-mirror to Obsidian on every save" toggle on. Consider also
- re-wording that toggle's label, whose "every save" now means something new.
-- [x] Close the dictation/autosave overwrite race properly. The client now
- merges an incoming voice segment into the textarea (append-at-end, caret
- restored) even while dirty, and PUTs carry `ifMatchUpdatedAt` so a concurrent
- append that advances the LWW clock returns 409 `STALE_JOURNAL` with the current
- entry — the client folds missing voice segments in and retries once. Removes
- the `voiceConflict` park and the "save or refresh to see it" product decision.
-- [ ] Extract a `useAutosave` hook when a second consumer appears. The daily log
- now has ~60 lines of autosave machinery inline (debounce + max-wait ceiling +
- single-flight + failure-toast dedup + blur/visibility/unmount flush). The only
- other debounced-save site, `client/src/pages/VideoTimelineEditor.jsx:281`
- (`saveTimerRef`/`queueSave`), shares only "setTimeout + clearTimeout on cleanup"
- and diverges on every other requirement — so extraction at N=2 would be ~6 config
- knobs wrapping ~5 lines. Revisit at a third consumer.
-
-### SongBook follow-ups
-
-Deferred from the SongBook feature's post-review cleanup (see
-`docs/plans/2026-07-15-songbook.md`) — to be promoted to labeled GitHub issues
-by `/do:replan --issues`:
-
-- [ ] "Fit to duration" autoscroll preset: re-add an optional `scrollDurationSec`
- field to `songInputSchema` (`server/lib/brainValidation.js`) plus a preset
- button in `client/src/pages/SongBookViewer.jsx` that computes `pxPerSec` from
- the scroll container's `scrollHeight / scrollDurationSec`. Dropped from v1 as
- speculative — no UI consumed the field.
-- [ ] Consolidate `server/routes/uploads.js` onto the shared `saveBase64Upload`
- / `serveLocalFile` helpers in `server/lib/fileUtils.js` (added for
- `routes/attachments.js` + `routes/brainSongbook.js`). Left out of the SongBook
- pass because uploads.js has a different response shape and uses the full
- `EXTENSION_MIME_MAP` rather than an allowlist.
- (The unreachable-cap half of this item is done: every route now derives its
- byte cap from `server/lib/uploadLimits.js`.)
-- [ ] SongBook practice/spaced-rep integration (SM-2 style, cf.
- `meatspacePostMemory`) — the `stage` field on `songs` records is manual in v1
- (`server/lib/brainValidation.js` `songStageEnum`).
-- [ ] Link songs to existing Rounds/Tracks/MIDI records — a cross-links field on
- the `songs` record + UI in `client/src/pages/SongBookViewer.jsx`.
-- [ ] MIDI/score preview embedding in the SongBook viewer
- (`client/src/components/songbook/TabSheetView.jsx`). (Chord diagrams /
- fretboard rendering shipped with the instrument-view toggle, issue #2656.)
-- [ ] Brain memory-bridge/graph enrollment for `songs` records (nav/⌘K already
- works via the nav manifest; this is the knowledge-graph side).
-
-### CoS perpetual-drain follow-ups
-
-- [ ] Close the Phase-1/Phase-3 convergence gap in the claim-issue flow. The
- perpetual work-detector (`server/services/perpetualWork.js` `isActionableIssue`)
- can only evaluate the claim prompt Phase 1 skip-list (labels/assignees/epic/
- in-flight). But the claim-issue prompt Phase 3 ("Verify still valid",
- `server/services/taskPromptDefaults/prompts.js` ~lines 552-561) releases an
- issue for reasons the detector cannot see — already-fixed/superseded, a stale
- reference to code that no longer exists, or >5 unrelated files (too big).
- Only the "too ambiguous/large" branch tags `needs-input` (which the detector
- catches); the other three release WITHOUT any converging label, so the
- detector keeps reporting them actionable and the perpetual drain re-spawns a
- no-op agent every tick (same churn class as the `[Epic]`-prefix bug fixed in
- this PR, but body/comment-driven so unfixable in the detector). Fix by making
- every Phase-3 release also apply a converging label the detector skips (e.g.
- `needs-input` for stale/ambiguous, or close+comment for already-fixed) so the
- drain parks. Prompt change → PROMPT_VERSIONS bump for claim-issue +
- claim-issue-gitlab (+ jira) with outgoing defaults preserved. Surfaced while
- diagnosing a managed-app perpetual-drain churn.
-
-### Programmatic-I/O task-learning follow-ups (#2727)
-
-- [ ] Give task-learning a "don't record this run at all" channel, and route
- pre-evaluation hook aborts through it. `resolveProgrammaticIoVerdict`
- (`server/services/agentLifecycle.js`) returns the undeclared sentinel (null) when
- an output hook bails before it ever looks at the agent's output (`no-app` /
- `app-not-found` — e.g. the app was deleted mid-run). But null means "fall back to
- the exit code" in `buildTaskTelemetryContext`
- (`server/services/taskLearning/metrics.js` ~line 197), so an exit-0 run still
- banks a success for the type. Neither available answer is right: `false` blames
- the model for a user deleting an app and poisons the #2329 failure-signature
- window with a non-failure; `null` overcounts successes. The honest answer is to
- not record the run — which needs a skip path through `recordTaskCompletion`
- (`taskLearning/metrics.js`) that today always writes. Raised by the codex
- reviewer on #2727 and deferred: the fix is a change to the learning write
- contract shared by every task type, too broad to ride along with #2727. Rare
- edge (app deleted mid-run), so the overcount is low-volume.
-
-- [ ] Decide whether a reasoner envelope whose supplied fields are individually
- invalid should count as malformed output.
- `layeredIntelligenceHooks.js#processTaskOutput` now rejects a non-envelope
- payload and a *supplied-but-invalid `proposal`* as `unparseable-response`, but a
- wrong-typed non-deliverable field (`{"analysis": 7}`) still reads as a legitimate
- `no-proposal` success. Closing that fully means re-litigating
- `validateReasonerResponse`'s documented contract
- (`server/services/layeredIntelligence.js` ~line 398: "invalid pieces dropped,
- never throws"), which is deliberately lenient and shared with other callers —
- out of scope for #2727. Raised by the codex reviewer; low value (analysis text
- isn't the deliverable) so it may be a won't-fix.
-
-### Series review ("Review this series", #2664) follow-ups
-
-- [ ] **Parallelize the foundation judge + canon readiness with the editorial-checks pass in `runSeriesReview`** (`server/services/pipeline/seriesReview.js`). Today foundation (a full LLM round-trip) runs to completion before `runEditorialChecks` even starts, and canon sits idle until checks finish; only the seed→read chain (feedback-seed → checks-seed → health/getReview) is a real ordering constraint. `judgeFoundation` writes only its own snapshot and `checkSeriesCanonReadiness` is store-independent, so both can be kicked off at function entry and awaited just before `computeReviewVerdict`. Deferred from the /simplify pass because it changes the SSE progress-frame ordering (foundation/canon `step:*` frames would interleave with `check:*` frames) — needs the progress emits moved to kickoff/settle and a quick UX check that the interleaved stream still reads cleanly. Largest wall-clock win (~the foundation-judge duration).
-- [ ] **Hoist the pipeline `port-error/port-warning` severity palette to a shared export** and use it in `SeriesReviewPanel.jsx` (`SEVERITY_STYLES`), `AutopilotPanel.jsx` (`SEVERITY_COLORS`), and `ArcCanvas.jsx` — three byte-for-byte inline copies today. Candidate home: `client/src/components/pipeline/manuscript/constants.js`. Deferred from /simplify because it touches two files outside the #2664 diff.
-
-- [ ] **Broaden series-review snapshot invalidation beyond the findings store.** `getSeriesReview` now stamps `stale` when the live open-finding set diverges from the snapshot's `findingIds` (covers accept/dismiss via a "Fix here" link). It does NOT detect edits to manuscript text, canon, or foundation made through other paths (the verdict's foundation/canon/health dimensions can go stale silently). Follow the `foundationJudge` pattern: stamp a `sourceInputsHash` on the review snapshot and recompute-vs-current on GET so any reviewed-source change flips `stale`. Deferred from #2664 review (codex r3, P1) as a broader pre-existing-pattern change.
-- [ ] **Series-review: reject conflicting in-flight review options instead of silently coalescing.** `startSeriesReviewRun` coalesces by seriesId, so a second start with different feedback/provider/force/gate gets the running run's id and its options are dropped. Single-user/single-tab this is rare (the button disables while reviewing) and the client no longer clears the note on an `alreadyRunning` response — but a `createSseRunner` `sig`-based conflict (like storyBuilderRunner) would surface it. Deferred from #2664 review (codex r3, P2) — competing-actor/multi-tab hardening the single-user trust model largely excludes.
-
-- [ ] **Make Avatar Bio extraction tolerant of free-form twin documents.** `server/services/digital-twin-avatar-bio.js` extracts facts with helpers keyed to the shipped canonical doc structure (`**Name:**`, `## Core Purpose`, `## Reasoning Defaults`, the enrichment `### Question?` headings, etc.). Installs whose enabled Markdown does not use those exact labels/headings fall through to the "No … data yet" fallbacks even when the twin is richly populated (the document CRUD schema accepts arbitrary Markdown, and `data.reference/digital-twin` ships no enforced body template). Current behavior degrades gracefully (safe fallbacks, no crash, no wrong data) and the LLM-polish path is an escape hatch, so this was deferred from the #avatar-bio review (codex P1). Options: (a) feed the raw enabled-doc text to `polishAvatarBio` so the LLM can synthesize regardless of structure; (b) introduce and migrate a versioned canonical body format for the core docs; (c) add a light LLM-backed extraction fallback when structured parsing yields empty sections.
-
-### POST timezone follow-ups (#2681)
-
-- [ ] **Re-derive POST day keys from timestamps at read time (or re-normalize on timezone change).** #2681 made POST records store their `date` in the user's configured timezone (writers) and read "today" in that zone (readers: `getPostStats`/`getPostProgress`/`getUnifiedActivityStreak`/`getTrainingStats`/`getMorseProgress`, plus the client). Migration 192 re-keys existing records once. The residual gap: a stored `date` is frozen in the zone that was active when it was written, so if the user *changes* `settings.timezone` after accumulating history, the old day keys disagree with the new-zone readers (a session saved as `2026-07-15` in LA reads as incomplete-today after switching to UTC). The reminder path (`meatspacePostReminder.js` `firePostReminderIfIncomplete`) is already immune because it derives the day from each record's `startedAt`/`timestamp` at read time via `isOnLocalDay(instant, tz)` — NOT the stored `date`. Two fix options: (a) apply that same read-time derivation in the streak/stats/history readers — map each record to `{ ...r, date: localDay(r.startedAt||r.completedAt||r.timestamp, tz) }` before it reaches `computePostStreaks`/aggregation, making the stored `date` a cache the readers ignore (comprehensive, no re-normalization ever needed, but touches every reader + the pure-helper integration and needs careful test updates); or (b) subscribe to the `settings:updated` timezone-change event (there's already `timezoneUpdatedAt` infra) and re-run migration-192-style normalization through the services' load/save paths (must NOT raw-write the files — that bypasses service caches, see the "sync direct-write bypasses cache" precedent). Deferred from #2681 review (codex r6, P2) — an uncommon tz-change-after-history scenario whose correct fix is a sizable, separately-reviewable refactor against real POST data; the steady-state configured-tz behavior shipped in #2681 is fully covered. Note: codex's r6 claim that the reminder recomputes `startedAt` in UTC is factually wrong — it already uses `getUserTimezone()`.
-
-### Brain Graph touch-interaction follow-ups
-
-- [ ] **Give 3D graph nodes a finger-sized hit target.** `client/src/components/brain/tabs/BrainGraph.jsx` `GraphScene` raycasts against the node `<mesh>` spheres directly (radius `0.4 + importance * 0.8`), so on a phone a low-importance node is a ~10px target — well under the ~44px touch guidance, and tapping usually selects a neighbour or nothing. Options: an invisible larger companion sphere per node that carries the pointer handlers (cheap, but doubles the mesh count and overlapping halos make "nearest wins" ambiguous in a dense cluster), or a custom nearest-node-within-threshold pick in screen space on tap. Deferred from the mobile-responsive pass because it changes the 3D pick model (not layout) and wants real-device validation — jsdom/headless can't exercise a WebGL raycast, and the layout fixes stand on their own.
-- [ ] **Stop feeding the tooltip position on pointer moves that can't show a tooltip.** `client/src/components/brain/tabs/BrainGraph.jsx` sets `onPointerMove={(e) => setTooltipPos({ x: e.clientX, y: e.clientY })}` on the canvas container, so every mouse/finger move re-renders `BrainGraph` — even though `hoveredNode` is null for most moves (sparse spheres, and every orbit-drag), and on touch the tooltip is now `pointer-coarse:hidden` and can *never* paint, making it 100% waste on the weakest hardware. Memoizing `GraphScene` (done) already bails the ~200-element mesh subtree out of those renders, so what's left is the component's own render. The gate must use a **ref**, not `hoveredNode` state: r3f attaches its raycasting listener to the Canvas's own inner div while React delegates `onPointerMove` at the app root, so on the event that enters a node the `onPointerMove` closure still sees `hoveredNode === null` and would skip the position update the tooltip needs — stranding the first frame at a stale position (or `{0,0}` on the first-ever hover, if the user enters a node and holds still). Safest shape: have `GraphScene`'s `onPointerOver` pass `e.clientX/e.clientY` up so `handleHover` seeds `tooltipPos` at enter time, then gate the move handler on `hoveredRef.current`. Deferred from the mobile-responsive pass because it's an unverifiable path here — the tooltip only appears on a WebGL raycast hover, which neither jsdom (the test stubs `<Canvas>`) nor a headless run can exercise, and a wrong ordering assumption regresses the very tooltip the pass was fixing. Needs real-device/browser validation.
-- [ ] **Give `MemoryGraph.jsx` the same mobile treatment as BrainGraph.** `client/src/components/cos/tabs/MemoryGraph.jsx` is a near-literal fork of BrainGraph's canvas shell — same `Canvas`+`OrbitControls`, same `buildGraph` from `lib/graphSimulation`, same `dragStartRef`/`onPointerMove`→`setTooltipPos` wiring — and still carries all three defects the Brain Graph mobile pass fixed: `style={{ height: '500px' }}` (line ~219), the always-on `absolute bottom-3 left-3` legend (line ~241), and the unclamped `max-w-xs` tooltip at `left: tooltipPos.x + 12, top: tooltipPos.y - 12` (line ~267). `/cos` is in `Layout.jsx`'s `isFullWidth` list, so it has the same landscape-overflow exposure. Do NOT extract a shared `<GraphCanvasShell>` — only two call sites and the surrounding chrome has genuinely diverged (BrainGraph has a breadcrumb, seven type filters, search, embeddings banner, detail panel; MemoryGraph has a stats bar); port the fixes across instead. Deferred from the Brain Graph pass to keep that PR scoped to the page the work was requested for.
-- [ ] **Decide the touch scroll story for the graph canvas.** R3F sets `touch-action: none` on the canvas, so the graph is a dead zone for page scrolling — a one-finger drag rotates the camera and never scrolls. The mobile pass bounded the damage by making the canvas viewport-relative (`h-[clamp(240px,45vh,500px)]`), leaving the bars above and detail panel below as scrollable surfaces, but a user who starts a swipe on the canvas still can't scroll. Considered and rejected for this PR: the map-embed pattern (one finger scrolls, two fingers rotate, via OrbitControls `touches={{ ONE: … }}`) — it would make rotating the graph, which is the feature's whole point, a two-hand gesture. Worth revisiting with a real device: possibly a "drag to rotate / two-finger to scroll" hint on first touch, or an explicit fullscreen mode where the canvas legitimately owns all gestures.
-
-### PortOS-update / CoS-agent mutual-exclusion follow-up
-
-- [ ] **Gate every CoS spawn engine on `updateInProgress` so a scheduled/autopilot spawn can't start during a PortOS self-update.** The update flow now blocks `POST /api/update/execute` when a CoS agent is live or mid-spawn (`server/routes/update.js` `countActiveCosAgents`, fast-fail + post-lock re-check via `getActiveAgentIds()` + `spawningTasks`), and the Update tab suppresses restart buttons while agents run. Residual: an agent that begins spawning *after* the route's post-lock re-check but before `update.sh` reaches its `pm2 delete` (a multi-second window covering git pull / submodules / npm install) is still severed. Fully closing it means having the spawn side consult the update lock: add a synchronous in-memory `isUpdateInProgress()` mirror to `server/services/updateChecker.js` (kept in lockstep with the persisted flag in `setUpdateInProgress`) and have the CoS spawn engines skip-and-requeue (return the existing `SPAWN_DEDUP_SKIP`-style no-op, leaving the task queued for after the restart) when it's set. **This must cover ALL spawn engines, not just `spawnAgentForTask`** — per the CoS autonomous-spawn precedent, gating one chokepoint gives false confidence; audit `dequeueNextTask` / `evaluateTasks` / `executeScheduledJob` and the Creative Director / on-demand bridges (grep the spawn call sites in `server/services/agentLifecycle.js` + `subAgentSpawner.js` + `cos*.js`). Deferred from the codex review of this PR (r2 P1) because it's a CoS-subsystem change spanning multiple spawn paths that deserves its own focused PR + tests; the 409 guard, post-lock re-check, and the orphan reaper bound the residual exposure in the meantime.
-
-### Antigravity CLI prompt-delivery follow-up
-
-- [ ] **Handle `agy` + non-empty `extraArgs` so the prompt stays the LAST argv token.** `agy --print` takes the prompt as its VALUE, so `ensureAntigravityPrintArgs` puts `--print` last and `prepareAntigravityPrompt` (via `prepareCliPrompt`, `server/lib/antigravity.js` / `server/lib/cliProviderArgs.js`) splices the prompt right after it. But `cliProviderRun.js` builds `[...buildCliArgs(provider), ...extraArgs]`, so for an antigravity provider with a non-empty `extraArgs` the delivered argv becomes `… --print "<PROMPT>" <extraArg…>` — the prompt is still `--print`'s value (correct), but any trailing extraArgs become positional args agy may reject. Low risk today (no caller passes `extraArgs` for an antigravity provider), but if one is added, either strip/relocate the trailing `--print` marker so extraArgs precede it, or have `prepareAntigravityPrompt` move `--print <prompt>` to the very end after splicing. Deferred from the agy prompt-delivery fix — the shipped paths (CD plan via runner/direct, Run Prompt, ask, vision) pass no extraArgs and are validated end-to-end.
-
-### Character metrics follow-ups (#2676)
-
-- [ ] **Add a cross-domain `daysActive` metric (distinct days with ANY logged activity).** #2676's issue listed `daysActive` among the example tiles; it shipped the other five plus `goalCompletionRate` and deliberately skipped this one. The blocker is that a truthful "days active" is a UNION of per-day date sets across domains, and no existing getter exposes the raw sets: `server/services/meatspaceLoggingStats.js` builds a `loggedDates` Set internally (line ~85) but only returns aggregates off it (`currentStreak`/`longestStreak`/`weekTotal`/`totalLogged`/`last7Days`), and POST's day keys live in `getPostSessions()`/`getAllTrainingEntries()` records. Summing per-domain counts would double-count any day the user logged in two domains, and a POST-only reading would be misleading enough to be worse than omitting the tile. Fix shape: expose the day-key set (or a `activeDayKeys` array) from `getLoggingStats()` additively, add it to `SIGNAL_READERS` in `server/services/characterSignals.js`, then union it with the POST record days in a new `characterMetrics.js` entry — note the two domains currently derive "today" differently (POST uses `userLocalToday()`; logging stats use the server-local `getDateString()`), so the union needs one day boundary picked deliberately before it means anything. Deferred from #2676 because it's the only tile requiring a change to a shared cross-feature getter plus a day-boundary reconciliation, and the six shipped tiles satisfy the acceptance criteria on their own.
-
-### Character life-goals card follow-ups (#2675)
-
-- [ ] **Give Goals a routed per-goal detail so the Character sheet's goal rows can deep-link to the goal itself.** `client/src/components/character/GoalsCard.jsx` links every row to `/goals/list` (`GOALS_PATH`) rather than to the specific goal, because no routed per-goal detail exists to link to: `App.jsx:256-257` registers only `/goals` → `/goals/tree` and `/goals/:tab`, and `client/src/components/goals/GoalsListView.jsx:193` holds the opened goal in a local `const [selectedGoal, setSelectedGoal] = useState(null)` that feeds `GoalDetailPanel` (:487-490) — so "which goal is open" is invisible to the URL. This violates the repo's ID-based-deep-linking convention on its own terms (the selection is not shareable, bookmarkable, reload-safe, or reachable from ⌘K/voice), independent of the Character sheet. Fix shape: route the selection through the URL (a `:goalId` route param, or at minimum a `?goal=<id>` search param honored by `GoalsListView` on mount, with a not-found fallback for a stale/deleted id and a `navigate()` back to the index on delete/clear), then point `GOALS_PATH`'s per-row link at the id'd route and assert the href in `GoalsCard.test.jsx`. Deferred from #2675 because that slice is scoped to a read-only mirror on the Character surface — converting the goals list's selection model is the goals feature's own change, wants its own tests, and #2677 (the Character reframe) must not be blocked behind it.
-
-- [ ] **Re-derive (or clock-adjust) `longevity.timeHorizons` on read, so goal urgency stops decaying silently.** `computeGoalUrgency` (`server/services/identity/goals.js:65-81`) ranks off `timeHorizons.yearsRemaining`, but `getGoalsTree()` (:345) reads the *persisted* horizons via `loadJSON(LONGEVITY_FILE, …)` — and only `deriveLongevity()` (`server/services/identity/longevity.js:22`) ever consults the current date. So `yearsRemaining` is frozen as of the last derive (`setBirthDate`, or an explicit `/longevity/derive`), and every urgency in the app drifts further from the truth the longer that goes unrun — silently, since nothing surfaces when the horizons were last computed. Affects every consumer that ranks or gates on urgency (`getGoalsTree`, `jobGates.js:57`, `goalCheckIn.js:44`, `identity/insights.js`, `telegram.js`, and the Character sheet's Life Goals card), so all of them are consistently stale rather than any one being wrong. Fix shape: either recompute horizons from `birthDate` + today inside `getGoalsTree`/`getLongevity` (cheap — it's arithmetic, not I/O) rather than trusting the stored snapshot, or stamp `derivedAt` and re-derive lazily when it's older than a day. Deferred from #2675: the Character card is a read-only mirror of the goals service and deliberately ranks off the exact source `/goals` uses, so it must not re-derive longevity on its own (that would write on a read path and make the sheet disagree with the page it links to) — this is the goals/longevity feature's own fix, and it wants its own tests.
-
-- [ ] **Decide one active-goal predicate and apply it everywhere.** The codebase disagrees on whether a goal with no `status` is active. `server/services/voice/tools/goals.js:26,49` and `client/src/components/character/GoalsCard.jsx` (`isActive`) treat a missing status as active; `jobGates.js:57`, `telegram.js:475,517,588`, `goalCheckIn.js:44`, `identity/insights.js:104,127`, `identity/status.js:89`, and `goals.js:224` / `getGoalsTree`'s own enrichment (:352) all use a strict `status === 'active'` and silently skip it. The shape is reachable: MortalLoom-synced goals are normalized only through `normalizeGoal` (`server/services/identity/store.js:23`), whose `PORTOS_GOAL_DEFAULTS` backfills every field **except** `status`. Consequence today: a MortalLoom user with status-less goals gets them ranked by the voice tool and the Character card, but skipped by check-in scheduling, Telegram digests, insights, and — notably — `getGoalsTree`'s urgency enrichment, so those goals reach the UI un-ranked. Fix shape: either add `status: 'active'` to `PORTOS_GOAL_DEFAULTS` (normalizes at the boundary, one line, makes every strict consumer correct at once — preferred) or export a shared `isActiveGoal(goal)` predicate and route all ten call sites through it. Deferred from #2675 because backfilling the default touches the MortalLoom sync boundary shared with the goals/identity services and deserves its own PR + tests; the card defends itself locally in the meantime.
-### Strict-read follow-ups (#2726)
-
-- [ ] **De-dup the three identical `daily-log.json` readers.** `server/services/meatspaceAlcohol.js` (`loadDailyLog`, ~line 142) and `server/services/meatspaceNicotine.js` (`loadDailyLog`, ~line 101) are now character-for-character identical apart from the error label — same `readDailyLogIfEnabled()` MortalLoom probe, same `{ entries: [], lastEntryDate: null }` default, same shape validation — and `server/services/meatspaceHealth.js#getBodyHistory` reads *the same file* (`join(PATHS.meatspace, 'daily-log.json')`) with a third, slightly different inline read. All three now carry a parallel `{ strict }` branch, so the duplication tripled in this PR rather than being introduced by it. Fix shape: extract one `loadMeatspaceDailyLog({ strict })` (a new `server/services/meatspaceDailyLog.js`, or an export from one of the three) and have all three delegate. Deferred from #2726 because each of the three modules' test suites mocks `readJSONFile` at its own module boundary, so the extraction needs those suites re-pointed at the shared module in the same change — a mechanical but wide edit that would have buried the actual strict-read fix under test churn.
-- [ ] **MortalLoom store reads conflate "disabled" with "unreadable" — tracked as #2742.** `readEnabledStore()` (`server/services/mortalLoomStore.js`) returns `null` for both, so the five health loaders + `identity/store.js#loadJSON` fall through to the local file on an unreadable ML store — and on an iOS-logging install the local file is a genuine ENOENT, so #2726's strict opt-in is a no-op and Vitalist still reports a fake level 0. Deferred from #2726: it needs an `{ enabled, ok, store }` rework of every `ml*` helper, and one semantic question answered first (is "store readable but key absent" a legitimate empty or a fallthrough?). Full plan in #2742.
-- [ ] **Audit the remaining `readJSONFile` callers for the same absent-vs-unreadable conflation.** #2726 explicitly scoped itself to the Character sheet's file-backed signals (`meatspacePost`, `meatspacePostTraining`, `identity/goals`, `meatspaceLoggingStats` + its five domain loaders) and left the rest of the ~100 `readJSONFile` call sites alone. `readJSONFileStrict` / `readJSONFile(…, { strict: true })` now exist in `server/lib/fileUtils.js` for any of them. The ones worth checking first are those whose result is COUNTED or shown as a stat (rather than used as a config fallback, where swallowing is correct) — grep for `readJSONFile` results feeding a `.length`, a `reduce`, or a dashboard/widget number. Also note `tryReadFile` has the same conflation (bare `.catch(() => null)`) and no strict counterpart.
-### CoS stat-card follow-ups
-
-- [ ] **Retire or wire up `StatCard`'s never-passed `activeLabel` prop, and de-dup the two hand-rolled Learning cards.** `activeLabel` (`client/src/components/cos/StatCard.jsx:1`) has **zero callers** across the client — no `activeLabel=` usage and no spread props into `<StatCard>`. It is *visually* rendered only by the default variant (:59-63); the `compact` (:4-22) and `mini` (:24-42) variants honor it only through the `ariaLabel` interpolation at :2 (consumed via `aria-label` at :8 / :28) — i.e. it reaches the accessible name but is never displayed. So it is not fully inert: deleting it changes the accname on two variants. Either delete the prop + its render branch + the `ariaLabel` clause together, or make compact/mini render it. Related: the two Learning cards (`client/src/pages/ChiefOfStaff.jsx` ~512-540 compact, ~836-862 ascii `mini`) are hand-rolled buttons rather than `StatCard`s precisely because StatCard supports neither `onClick` nor a status-driven border color nor a visible sub-label on the compact variant — and each duplicates the same `status === 'critical' ? … : 'warning' ? …` color ternary twice (once for the border, once for the icon). Wiring a visible sub-label slot through all variants plus `onClick`/border-tone props would let both collapse onto StatCard. Deferred from the mobile-overflow fix (which only restructured the compact card's value/label stacking): removing or re-speccing a prop on a shared component used by every CoS stat card is a distinct refactor deserving its own PR + tests, and the overflow fix must not ride on it.
-
-### Cyber Muse avatar follow-ups
-
-- [ ] **Unify `MUSE_STATE_ANIMATIONS` (single-clip base loops) and `MUSE_STATE_SEQUENCES` (montages) into one `state → ordered steps` map.** Today `client/src/components/cos/constants.js` keeps two parallel maps: a single base-clip per state (`MUSE_STATE_ANIMATIONS`, step shape `{clip,timeScale,once}`) and an optional montage (`MUSE_STATE_SEQUENCES`, step shape `{clip,timeScale,reps}`). `MuseCoSAvatar.jsx` then forks base-vs-sequence in the state effect (`resumeMotion`), the `finished` listener, and `sequenceSteps`/`baseClip` resolution. A single looping clip is just a length-1 montage, so the two could collapse to one map `state → [{ clip, timeScale, loop: 'infinite' | 'once' | {reps: N} }]`: single-clip states become length-1 lists (`loop:'infinite'`), `coding` is a longer list, and the "montage's fallback is the base clip" relationship becomes structural (filter steps to present clips; if only one survives, play it looping) instead of prose-enforced (the current comment in constants.js says "keep every entry mapped… also the graceful fallback"). This would delete `MUSE_STATE_SEQUENCES` as a separate concept and remove the base-vs-sequence forks in the driver. Deferred from the `/simplify` pass on the avatar montage PR: it's a redesign of a state machine that was already visually verified (montage cycling + speaking-gesture defer/restore + fallback), so it warrants its own PR + a re-verification pass rather than riding on the cleanup. Consumers to update: `MuseCoSAvatar.jsx`, `constants.test.js`, `data.reference/avatar/README.md` (only in-repo references).
-
-- [ ] **Extract the shared rigged-GLB avatar boilerplate now that there are three consumers.** `client/src/components/cos/MuseCoSAvatar.jsx`, `client/src/components/cos/MiniCharacterCoSAvatar.jsx`, and (as of the CyberCity player swap) `client/src/components/city/PlayerAvatar.jsx` each independently: (a) `useGLTF(url)` + `useMemo(() => SkeletonUtils.clone(gltf.scene), [gltf.scene])` with the identical copy-pasted "rebind SkinnedMeshes" rationale comment; (b) fit the model to a target height via `Box3().setFromObject → getSize/getCenter → scale = TARGET_HEIGHT / Math.max(size.y, 1e-3)` (Muse centers vertically `-center.y*scale+0.05`; Mini and Player rest feet on ground via `-box.min.y*scale` — already drifting); (c) run a `fadeTo` crossfade (`reset/enabled/setEffectiveTimeScale/setEffectiveWeight/setLoop/fadeIn` + `prev.fadeOut`, guard `prev !== next`). Fix shape: a `useRiggedGLTF(url)` hook (load + clone + `withInPlaceClips` + `useAnimations`, returning `{ scene, actions, names, mixer }`) in `client/src/hooks`, and a pure `fitModelToHeight(scene, { targetHeight, feetOnGround })` helper in `client/src/utils` returning `{ scale, x, y, z }`; a low-level `crossfade(actions, activeRef, name, { timeScale, fade })` primitive is a weaker candidate (Muse's version carries montage `once`/`reps` branching the others don't want). Deferred from the `/simplify` pass on the CyberCity player swap: touches two CoS avatar components well outside that diff, and each new public module needs its barrel + README row + index-test coverage (the `client/src/hooks`/`utils` maintenance rule). The one cheap piece was done in-diff — PlayerAvatar imports the shared `MUSE_ROOT_MOTION_CLIPS`/`MUSE_IN_PLACE_SUFFIX` rather than redeclaring them.
-
-### Creative Director agents should not push code (deferred — needs a distinct completion contract)
-
-- [ ] **Suppress `/simplify` + `/do:push` + PR in CD agent completions WITHOUT breaking their API output contract.** CD plan/treatment/evaluation agents persist their real output via an HTTP call in the task BODY (e.g. `PATCH http://localhost:5555/api/creative-director/{id}/plan` — see the plan prompt), and use the `.agent-done` sentinel only as a *done-signal* (a short markdown summary that PortOS's 2s poll consumes to finalize the run). They run on `main` (`useWorktree:false`, `configCodingOnMain:true`) and make no repo changes, so the trailing `/simplify` → `/do:push` completion is both pointless and dangerous (a `/do:push` on main could commit stray working-tree files). The fix must remove `/simplify`+`/do:push`+PR from the CD completion while KEEPING (a) the sentinel done-signal handshake and (b) the task-body PATCH as the output channel. **Do NOT reuse `discardWorktree`** — codex review (2026-07-16) correctly flagged that it routes to `buildProgrammaticOutputCompletionSection`, whose wording ("your *only* output channel is the `.agent-done` sentinel; write your result there in the payload format from your instructions") directly contradicts the PATCH and could make the agent write the plan to the sentinel instead of PATCHing → plan never persists → project stalls/re-enqueues. `readOnly:true` is also wrong ("read data and report findings only" contradicts the PATCH, and the CLI read-only path emits no sentinel). The correct fix is a NEW completion contract (e.g. a `apiOutput`/`noRepoOutput` metadata flag) that emits: "This task persists its output via the API/tool calls described above and makes no repo changes — do NOT run `/simplify`, `/do:push`, `/do:pr`, `git commit/push`, or open a PR; when done write a short summary to the sentinel to signal completion." Thread the flag through the completion selection in `server/services/agentPromptBuilder.js` (lines ~1137-1160 light path + the full-context path ~790, and whichever of `buildTuiCompletionSection`/`buildCliCompletionSection` CD actually reaches — confirm via a regenerated CD prompt fixture) and add a test asserting the CD prompt contains the sentinel step but NO `/do:push`/`/do:pr`/`/simplify`. Deferred from this PR because it needs a carefully-designed prompt-contract change + fixture test, not a rushed flag reuse.
-
-### CD plan/treatment run wedges when the agent signals done but writes nothing (validationPassed:false)
-
-- [ ] **Fail (and don't silently re-dispatch) a CD plan/treatment run whose agent signaled completion but never PATCHed its output.** Failure mode: a directive-driven CD project assigned to an Ollama-backed CLI/TUI provider running a non-tool-calling local model (e.g. Gemma). The agent narrates a done-message and signals completion, but never calls `PATCH /api/creative-director/:id/plan`. The CoS finalizer marks the run `success/exitCode 0` with `validationPassed:false`, yet nothing fails the project's `plan` run (recorded `running` on first dispatch) — so it stays `running` (only boot-recovery reaps it) and CoS re-dispatches the same incapable model repeatedly while the project sits wedged in `planning`. Manual recovery: reap the run (set its status `failed`) + PATCH a valid one-step plan. Fix options: (a) when a CD plan/treatment task finalizes with `validationPassed:false`, have the completion path mark the corresponding project `plan`/`treatment` run `failed` (so it's reaped live, not at next boot) instead of leaving it `running`; (b) stop re-dispatching the identical task to a model that already produced a `validationPassed:false` narration — either surface it as a blocked stage for the user or escalate off the local model. Touchpoints: `server/services/creativeDirector/completionHook.js` (run finalization), the CoS finalizer that sets `validationPassed`/`completionReason`, and `planAdvance.js` re-dispatch. Deferred from the model-picker-highlight change (which addresses the *upstream* cause — steering users to tool-capable models — but not the wedge mechanics).
-- [ ] **(config, no code) Ensure the CoS provider for CD tasks uses a tool-capable model.** A scheduled/recurring CD project re-wedges (per the item above) whenever the CD treatment/plan stages (or the CoS default provider) resolve to a non-tool-calling local model. Pin them to a tool-capable model — `qwen3.6:35b` locally, or a cloud/CLI Claude provider. The new tool-use highlight in the CD models drawer + `ProviderModelSelector` now flags this at pick time, but a pre-existing stored assignment predates it.
-
-### Agent model pickers — union authoritative tool-use capability into the id-regex heuristic
-
-- [ ] **Plumb per-model tool-use capability into the agent pickers so the warning stops relying solely on the id regex.** The tool-use highlight (`localToolUseHint`/`withToolUseOptionLabel` in `client/src/utils/providers.js`, consumed by `ProviderModelSelector`'s `highlightToolUse` prop and `CreativeDirectorModelsDrawer`'s treatment/plan stages) keys off `isToolUseModel(id)` — a **positive-allowlist id regex** (mirror of `server/lib/localModelHeuristics.js`). A match is a reliable "tool-capable"; a non-match only means "not a recognized family", so a genuinely tool-capable local model whose id isn't in the regex yet (e.g. `phi4-mini`, newer `gemma3` function-calling builds) is marked "⚠ no known tool use". The copy was softened to a heuristic hedge (not a false-certain "can't call tools") to avoid overclaiming, but the *authoritative* signal — Ollama `/api/show`'s `tools` capability (already the both-directions-authoritative branch in the server's `isToolUseModel(model-object)`) — is not consulted client-side. The `LocalLlmTab` "Agents" badge DOES read authoritative catalog capabilities, so the two surfaces can disagree for such a model. Proper fix: add a `useToolUseModelIds()` hook mirroring `useVisionModelIds()` (server endpoint that reads `/api/show` tool capability + LM Studio metadata), union it into `localToolUseHint` so an authoritative `tools`-capable model is treated as capable regardless of id, and fall back to the regex only for bare ids with no metadata — mirroring the server's object-vs-string contract. Deferred from the model-picker-highlight PR (which shipped the regex heuristic + honest copy, fully tested); the capability-fetch hook + endpoint is a distinct change deserving its own tests. Flagged by the local `claude` review pass on that PR.
-
-- [ ] **Drive the agent-picker tool-use flag from server-side assignment metadata so `AiAssignmentsTab` also warns.** The tool-use highlight marks/warns the CD treatment+plan stages in `CreativeDirectorModelsDrawer` (via a hard-coded `needsTools` on its `STAGES`) and in any `ProviderModelSelector` with `highlightToolUse`. But the SAME `settings.creativeDirector.treatment`/`.plan` pins are editable through `client/src/components/settings/AiAssignmentsTab.jsx`, a generic per-assignment table whose model `<select>` (~line 261/282) renders no annotation or warning — so a user following the drawer's own "Also editable from AI Assignments" link can still pin a tool-less local model and recreate the stage-wedge. Don't hard-code the two CD assignment ids into AiAssignmentsTab (a third copy of the `needsTools` knowledge); instead have the server tag agent/tool-use assignments with a `needsTools: true` (or `modelFilter: 'tools'`) marker on the assignment entry — mirroring how the evaluation assignment already carries `modelFilter: 'vision'` — then read that one flag uniformly in AiAssignmentsTab, the CD drawer, and any future editor to gate `withToolUseOptionLabel`/`localToolUseHint`. That collapses the `needsTools` source of truth to the server and closes every editor at once. Deferred from the model-picker-highlight PR (client-only, scoped to the drawer + ProviderModelSelector); this adds server assignment metadata + a third editor and deserves its own tests. Flagged by the local `codex` review pass on that PR.
-
-### Vision model pickers — `useProviderModels` auto-select ignores a late-arriving capability list
-
-- [ ] **Make `VisionProviderPicker` union the server's authoritative vision-model list into its filter (the `gemma4` gap), which requires `useProviderModels` to re-pick its initial model when `modelFilter` changes.** The Creative Director / AI Assignments vision pickers were fixed to union `useVisionModelIds()` (the server's `/api/local-llm/vision-models`, which reads Ollama `/api/show` capabilities + LM Studio's `vlm` tag) into `visionLocalModelFilter`, because the client id regex in `client/src/utils/providers.js#isVisionModel` knows `gemma-3` but not `gemma4`/`glm-4.6v` and so hides installed VLMs. `client/src/components/universe/VisionProviderPicker.jsx:27` has the identical defect but was **deliberately left unfixed**: it gets its models from `useProviderModels({ modelFilter })`, and passing a `modelFilter` whose identity changes when the fetch resolves (null → Set) breaks two ways. (1) `pickInitialModel` (`client/src/hooks/useProviderModels.js:44-49`) closes over `modelFilter`, and `load` (`:52-68`) depends on `pickInitialModel`, so the `useEffect(() => { load(); }, [load])` at `:70` re-fires a redundant `api.getProviders()`. (2) Worse, `load` guards initial selection behind `hasSetInitialRef` (`:62`), so the model auto-picked during the FIRST load (regex-only, returns `''` when the only VLM is `gemma4`) is never re-picked once the authoritative set lands — leaving `selectedModel === ''` while `availableModels` now contains `gemma4`, which renders the "no vision model" blocker (`VisionProviderPicker.jsx:41` `noVisionModel = hasProviders && !selectedModel`) *next to a populated dropdown*. That half-fixed state is more confusing than the current consistent-but-wrong behavior, so the change was reverted. Doing it properly means teaching `useProviderModels` to re-run its initial pick when `modelFilter`'s identity changes (e.g. re-pick when the current `selectedModel` is no longer in / absent from `availableModels`, without clobbering a deliberate user clear) — that hook is shared by many callers and `VisionProviderPicker` has no test file, so it needs its own PR + tests. Deferred from the Creative-Director vision-picker fix, which is scoped to the `assignment*` helpers and ships fully tested.
-
-### Creative Director preview follow-ups (#2702)
-
-- [ ] **Ship a directive plan's produced media to peers, or stop previewing what can't arrive.** `selectProjectPreview` (`client/src/lib/creativeDirectorPreview.js`) surfaces `plan.steps[].result.jobId` as `/data/images/<jobId>.png` / `/data/videos/<jobId>.mp4`, but `buildProjectAssetManifest()` ships only the starting image and the music bed, and plan steps never file their outputs into the project's linked collection. So a project federated to a peer without full media-library sync arrives as a record whose preview bytes never do — the card sits on MediaImage's "Syncing" placeholder (or ScenePreview's "media missing") forever rather than transiently. Pre-existing gap (the outputs were never federated; #2702 only made it *visible*), and out of scope there because the fix is server-side: either add plan render outputs to the project asset manifest, or `addCollectionItem` each one at `planAdvance.js`'s job-settle so the bytes ride the collection's own manifest. Flagged by codex review on PR #2719.
-- [ ] **A federated video poster never un-sticks from "Syncing".** `peerSyncAssets.js#doPullOneAsset` regenerates a pulled video's thumbnail locally but emits `asset-arrived` only for the `*.mp4` — never for the `.jpg` — so `MediaImage`'s exact-filename listener (now used for the CD card posters in `ProjectPreview.jsx`) never fires, and the card sits on the placeholder until a remount. Worse for a stitched final: the regenerated name is derived from the VIDEO filename (`timeline-<project>-<ts>.jpg`), while every poster URL in the UI is `<jobId>.jpg` — the same id≠filename mismatch #2702 fixed on the client, still live on the federated path. Fix server-side: emit an `asset-arrived` for the regenerated thumbnail, and key its name off the synced history row's `thumbnail` field rather than the mp4 basename. Pre-existing (the bare `<img>` it replaced never recovered either); flagged by codex review on PR #2719.
-
-- [ ] **Give the video id→filename resolution a real home.** `useVideoFileSrc` (`client/src/hooks/useVideoFileSrc.js`) fetches the WHOLE `/video-gen/history` list to resolve one id, because a history entry's id is not its filename stem (the timeline renderer mints `timeline-<project>-<ts>.mp4` beside a `randomUUID()` id) and no by-id endpoint exists. Three surfaces now need it (CD cards, CD Overview, `EpisodeVideoStage`). Consider a `GET /api/video-gen/history/:id` (or a `/api/media/video/:id` resolver that 302s to the real file), which would also let `ScenePreview` stop reconstructing paths at all. Deferred from #2702 as an explicit "no new server endpoints" scope-out.
-
-### Creative Commission detail-page follow-ups
-
-- [ ] **Resolve a commission's render projects without pulling the whole CD project list.** `client/src/pages/CreativeCommissionDetail.jsx` fetches `listCreativeDirectorProjects()` (every project, non-slim) on load just to index the ≤50 referenced by `runs[].projectId`. It's a single request and matches how the CD list page already loads, but it scales with the install's *total* project count, not the commission's. Once a by-id/batch resolver exists (see the `useVideoFileSrc` follow-up above — same "no by-id endpoint" root cause), swap this to fetch only the referenced projects. Deferred from the detail-page PR to avoid adding a server endpoint in a client-only change.
-- [ ] **Live-update a commission's freshly-run render instead of asking the user to reload.** After "Run now" on `CreativeCommissionDetail.jsx`, the new run appears immediately as a "no render yet" card, but the CD project generates asynchronously and nothing on the open page refetches when it completes — the render only materializes on a `location.key` refetch (navigation / notification deep-link), so the toast tells the user to reload. Fix once the CD project exposes a completion signal the page can subscribe to (socket event or a lightweight poll of the referenced projects while any run is `started`), then drop the "reload to refresh" clause from the toast. Deferred from the detail-page PR: it needs a CD-generation-completion subscription the page doesn't have today, and the render still arrives correctly on the next navigation in the meantime.
-- [ ] **Consider extracting the shared run-now/pause/delete commission actions.** The `handleRunNow` / `toggleEnabled` / `handleDelete` handlers now live in both `CreativeCommissions.jsx` (list state — `setCommissions` map/filter) and `CreativeCommissionDetail.jsx` (single-record state — `setCommission`). Two occurrences with genuinely different state shapes, so the rule of three isn't met and a `useCommissionActions` hook would need to abstract over both shapes awkwardly; left as-is. Revisit if a third surface (e.g. a dashboard widget) needs the same actions.
-
-### Hand-rolled `fixed inset-0` overlays trapped by `backdrop-filter` cards (glass themes)
-
-Root cause: the theme rule at `client/src/index.css` (`html[data-port-theme] :is(.bg-port-card,…):is(.border,.rounded,…) { backdrop-filter: var(--port-backdrop-filter); }`) makes every bordered/rounded `.bg-port-card` a containing block for `position:fixed` descendants on "glass" themes (e.g. `lumen-glass-day`). Any hand-rolled `fixed inset-0` overlay rendered *inside* such a card is then sized to the card, not the viewport — the exact bug fixed for `FolderPicker` (migrated to the shared `Modal` + `usePortal`). Precedent for the fix: `GalleryImagePicker.jsx` and the shared `Modal`'s `usePortal` option. These remaining overlays neither portal nor use `Modal` and would break identically *if* opened from inside a themed card — each needs its own "is it actually nested under a card, and does it want portal vs. z-elevation?" check before fixing.
-
-- [ ] **Make the shared `Drawer` primitive portal-capable (highest value).** `client/src/components/Drawer.jsx` (~line 87) renders its `fixed inset-0` backdrop inline, not portaled. It's the shared config-drawer primitive (CLAUDE.md convention) used by many pages, so any instantiation nested under a bordered `.bg-port-card` is trappable on glass themes. Audit its call sites or make the primitive portal its overlay.
-- [ ] **`MediaLightbox` — portal its `fixed inset-0 z-50 bg-black/90` overlay** (`client/src/components/media/MediaLightbox.jsx` ~line 229). Trappable when opened from inside a themed gallery card.
-- [ ] **`ProcessesTab` fullscreen log modal** (`client/src/components/apps/tabs/ProcessesTab.jsx` ~line 288). `fixed inset-0`, not portaled; rendered inside the app-detail tab tree — trappable if that content sits in a `.bg-port-card`.
-- [ ] **Lower priority:** `IconPicker.jsx` (~line 35) transparent click-away catcher (only the catcher shrinks to the card; popover itself is `absolute`), and `Review.jsx` (~line 431) briefing-fullscreen `<section>` toggle (element is itself `.bg-port-card`; depends on ancestors). Confirmed already-safe (no action): `CmdKSearch.jsx` (portaled), `Layout.jsx` mobile backdrop (shell-root sibling), `Ambient.jsx` / `Shell.jsx` (page-root fullscreen). Deferred from the FolderPicker mobile fix to keep that PR scoped to the picker the bug report named; each of these wants its own nesting check + portal-vs-z-elevation decision.
-
-### Kimi Code provider — verify against a live `kimi` binary (issue-2815 follow-ups)
-
-The `kimi-cli`/`kimi-tui` providers shipped without a live `kimi` binary in the dev environment, so the external-CLI contract is based on the issue's grounded docs, not empirical verification. Once a live `kimi` is installed, confirm and reconcile (raised in the issue-2815 codex review, deferred because they can't be validated blind and each risks regressing the happy path if guessed wrong):
-
-- [ ] **Prompt delivery + argv length ceiling.** `server/lib/kimi.js#prepareKimiPrompt` delivers the prompt as the `--prompt <value>` argv (`useStdin:false`), matching the antigravity analog (`agy --print` takes the prompt as a VALUE, not stdin). A large CoS operating-contract prompt on argv can exceed Windows' ~32K command-line limit (and eventually POSIX `ARG_MAX`). If the live `kimi --print` reads the prompt from stdin — or from a `--prompt-file <path>` that can point at `/dev/stdin` like grok's `GROK_STDIN_PROMPT_PATH` — switch delivery to stdin to lift the cap. NOT done blind: guessing stdin against an agy-like `kimi` would silently deliver an empty prompt (worse than the ceiling).
-- [ ] **Structured-output contamination.** If plain `kimi --print` interleaves intermediate tool/assistant activity with the final message, a pipeline stage parsing stdout as JSON could choke on the chatter. If the live `kimi` exposes a "final message only" flag, add it to `ensureKimiHeadlessArgs` in `server/lib/kimi.js`. NOT added blind: an unrecognized flag would make every headless run fail at startup.
-- [ ] **Confirm the TUI auto-approve + print flags.** Verify `--yolo` (TUI auto-approve), `--print`/`--afk` (headless), and `--prompt`/`-p` (prompt value) are the real flag names, and that `--print` implies `--afk`. Adjust `ensureKimiTuiArgs`/`ensureKimiHeadlessArgs` if the CLI differs.
-- [ ] **Kimi usage/quota family (out of scope of issue-2815).** Once the `kimi` usage command is confirmed, add a `FAMILIES` entry in `server/services/providerUsage.js` so the provider surfaces a quota card (currently maps to no family, like ollama-backed wrappers).
-
-### Warn at provider-save time when a command the CoS Runner can't spawn is configured
-
-- [ ] **Surface `isAllowedCommand` in the provider editor.** The runner's hand-curated allowlist (`server/cos-runner/allowedCommands.js`) is the exec boundary for `/spawn` and `/spawn-tui`, and it must stay hand-curated — `data/providers.json` is user-writable at runtime through `POST/PUT /api/providers` with an unconstrained `z.string()` command (`server/lib/validation.js` `providerSchema`), so deriving the allowlist from it would let a config write choose the exec target. A parity test now covers every SHIPPED provider (`server/cos-runner/allowedCommands.test.js`), but a **user-created** provider whose command isn't allowlisted still saves fine and then fails at spawn time — now with a legible "Command not allowed: X. Permitted commands: …" on the agent record rather than a mystery, which is why this is polish rather than a bug. Do NOT hard-reject on save: direct (non-runner) spawn does not consult this allowlist at all, so a custom provider can legitimately work today in direct mode, and rejecting would break that config. Right shape is an informational warning in the provider editor (and/or a badge like the "not installed" reviewer badge) when `command` is outside the runner allowlist, explaining that the provider will only run in direct-spawn mode. Deferred from the grok/kimi allowlist fix to keep that PR scoped to the paths that were actually broken.
-
-### Loading-skeleton rollout follow-ups (#2843)
-
-- [ ] **Chief of Staff has no dimension-reserving skeleton** (`client/src/pages/ChiefOfStaff.jsx` ~line 587). It still shows a centered `BrailleSpinner` because it is a bespoke two-pane shell (`lg:grid-cols-[320px_1fr]` avatar panel + chat pane), not the list/detail shape `PageSkeleton` models — a card skeleton there would misrepresent the layout worse than the spinner does. Wants either a two-pane `layout` mode on `PageSkeleton` or a local `CoSSkeleton`.
-- [ ] **`/data` (Data Manager) is a self-scrolling `h-full` shell nested in Layout's padded scrolling main** (`client/src/pages/DataManager.jsx` ~line 374; `/data` is absent from the `isFullWidth` list in `client/src/components/Layout.jsx` ~line 1148). The loaded page renders its own bar + `flex-1 overflow-auto` body inside `overflow-auto p-4 md:p-6`, so it double-pads and nests two scroll containers. The skeleton mirrors the page faithfully, so this is pre-existing, not introduced by #2843. Fix by either adding `/data` to `isFullWidth` or dropping the page's `h-full` shell — then drop `padded`/`fullHeight`/`barClassName` from its `PageSkeleton` call accordingly. Raised in the #2843 review, deferred to keep that PR scoped to skeletons.
-- [ ] **Sub-region spinners are untouched by #2843.** Tab bodies that refetch (`Brain`/`Goals`/`DigitalTwin` Suspense fallbacks, `Apps` per-app expansion, `DataManager` category detail, `UsagePage` provider-quota section, `CharacterSheet` sync panels) still render bare `BrailleSpinner`s. Lower value than first-paint (the surrounding layout is already reserved), but the taller ones could take a scoped skeleton.
-
-### CoS long-text clamping follow-ups
-
-Deferred from the PR that clamped CoS task text (`client/src/components/ui/CollapsibleText.jsx`).
-
-- [ ] **Consolidate `AgentCard`'s duplicate collapse affordance** (`client/src/components/cos/tabs/AgentCard.jsx` ~line 80). `TaskDescription` is a second "long task text with a Show more toggle" implementation one directory over, using a `text.length > 200` heuristic + `max-h-[3.5rem]` + gradient fade instead of measured `line-clamp-2`, and its toggle carries no `aria-expanded`/`aria-controls`. Not consolidated in that PR because `AgentCard` renders *markdown blocks* via `MarkdownOutput`, which `line-clamp` can't clamp — `CollapsibleText` would need a `children`-based max-height variant, and switching would visibly change that card's fade treatment. Wants a deliberate design call on which affordance wins.
-- [ ] **`metadata.context` is overloaded** — the same key carries a one-line human note (`server/routes/cosJobRoutes.js` ~line 182, `server/services/cosTaskStore.js` ~line 920 escalation context) and a multi-thousand-character agent prompt (`server/services/cosTaskGenerator.js` ~lines 1357-1378, `server/routes/cosTaskRoutes.js` ~line 197). The prompt lives there because `generateTasksMarkdown` flattens `description` to one line and `parseTasksMarkdown` only matches a `- [ ]` block's first line, so newlines in `description` corrupt COS-TASKS.md. Splitting into `metadata.prompt` (payload) + `metadata.context` (note) would touch the markdown round-trip, `LEGACY_DIRECT_FIELDS` in `cosTaskStore.js` ~line 52, `cosTaskMerge.js` ~line 200, the agent prompt builder, and every on-disk task — i.e. a migration. Deferred as disproportionate to what was a presentational problem; the UI clamp handles both shapes correctly today.
-
-### Ollama-backed provider refresh follow-ups (post-install/delete auto-refresh)
-
-Deferred from the fix that makes `server/services/localLlm.js#installModel`/`deleteModel` push a live `refreshProviderModels` call to every Ollama-backed provider after a successful install/delete (`refreshOllamaBackedProviders`, ~line 811).
-
-- [ ] **Dedup the refresh fan-out by daemon base URL instead of by provider.** When N providers (the built-in `ollama` provider plus one or more Claude/Codex/Gemini-over-Ollama CLI/TUI providers) all resolve to the same Ollama daemon (commonly the shared `http://localhost:11434` default — see `ollamaBaseFromProvider` in `server/lib/aiToolkit/providers.js` ~line 124), `refreshOllamaBackedProviders`'s `Promise.all` currently calls `refreshProviderModels(p.id)` once per provider, each independently re-fetching `/api/tags` and re-running the full per-model `/api/show` tool-capability probe against the identical daemon/model set. Fix by grouping providers by normalized base URL, computing the tool-capable model list once per unique base, and applying it to every provider sharing that base. Flagged by the `/simplify` efficiency review — deferred because it needs a "compute without persisting" variant exposed from `server/lib/aiToolkit/providers.js` (see next item), which is a larger surface change than a `localLlm.js`-only fix.
-- [ ] **`refreshProviderModels` does one full `providers.json` write per call — batch writes when refreshing multiple providers.** `server/lib/aiToolkit/providers.js#refreshProviderModels` (~line 646) does `loadProviders()` → mutate → `saveProviders(data)` per call, and `saveProviders` invalidates the provider cache and `atomicWrite`s the entire file. `refreshOllamaBackedProviders`'s concurrent fan-out means N Ollama-backed providers produce N full-file writes landing in quick succession (each superseded by the next) and N cache invalidate/repopulate cycles for any concurrent `getAllProviders()`/`getProviderById()` reader. Fix by adding a batch-refresh entry point to the toolkit's provider service that computes all the new model lists first, then applies + persists once. Flagged by the `/simplify` efficiency review — deferred as an `aiToolkit/providers.js` API change, out of scope for the triggering bug fix.
-
-### Accessibility: unlabeled form controls outside `FormField` (audit pass 4 backlog)
-
-The 2026-07-23 audit pass fixed the toggle-switch, icon-button, focus-indicator, and
-lightbox-dialog gaps, plus ~20 unlabeled controls on the highest-traffic pages
-(RunnerPage, Review, Wiki, Tribe, Loras, MediaHistory, MediaCollections,
-PromptManager). What remains is the long tail of standalone `<select>`/`<input>`/
-`<textarea>` that sit in toolbars and inline rows rather than inside a labeling
-wrapper (`client/src/components/ui/FormField.jsx`, or a local `Field` that wraps
-children in a `<label>`). A placeholder is not a label — it disappears on input and
-is not reliably announced.
-
-- [ ] **Sweep the remaining unlabeled controls.** The scan that produced this list
- is: for every git-tracked `client/src/**/*.jsx`, parse each `<input|select|textarea>`
- opening tag (brace-aware, so `className={`…`}` containing `>` doesn't truncate it);
- skip tags carrying `aria-label`/`aria-labelledby`/`type="hidden"`, tags whose `id`
- is targeted by an `htmlFor` in the same file, and tags whose preceding ~14 lines
- contain `<FormField`/`<label`/`<Field`/`label=`/`sr-only`. That yields ~400 hits,
- but the true-positive rate is roughly half — the rest are `<img>`/`<select>`
- mentions inside comments and wrappers the lookback window missed. **Verify each
- candidate by reading its context before labeling it**; do not mass-apply. Highest
- value first: `Instances.jsx` (~10), `PipelineSeries.jsx`, `VideoTimelineEditor.jsx`,
- `CatalogIngredient.jsx`, `CharacterSheet.jsx`, `GitHub.jsx`, `Sharing.jsx`,
- `MoodBoardDetail.jsx`, `OpenClaw.jsx`, `LoraDatasetDetail.jsx`, `Browser.jsx`.
- Prefer wrapping in `FormField` (visible label + `htmlFor`/`id` pairing) over an
- `aria-label` when the surface has room for a visible label.
-- [ ] **Enable Biome's `a11y` rules in `client/biome.jsonc`.** It would enforce this
- class automatically instead of relying on periodic audits. Note this got *cheaper*
- when the client moved from ESLint to Biome: the rules ship in Biome's `a11y` group,
- so this no longer needs a new dependency (`eslint-plugin-jsx-a11y`) at all — it is
- now purely a config change. Still skipped in this pass because enabling the group
- surfaces hundreds of findings at once and would fail CI until the backlog above is
- drained — sequence it after the sweep, and start with only the rules the repo
- already honors (`a11y/useAltText`, `a11y/useValidAriaProps`,
- `a11y/useAriaPropsForRole`, `a11y/noLabelWithoutControl`) rather than the whole
- group. The config already uses an explicit per-rule list, so adding a handful is
- the established shape.
-
-
-### Factor the "bump a seeded Claude provider tier" migration skeleton into `_lib.js`
-
-- [ ] `scripts/migrations/206-claude-default-opus-5.js` is the fourth hand-copy of the same shape (032 → 058 → 153 → 206): `diff 153-claude-default-sonnet-5.js 206-claude-default-opus-5.js` is identical apart from the data and comment prose — `POINTER_KEYS`, `sameArray`, the pointer-swap helper, and the entire `up()` body (read → ENOENT skip → `JSON.parse` guard → providers-map guard → three-way `touched`/`alreadyCurrent`/`customized` classification → conditional write → log) are byte-for-byte the same. Their co-located test files are ~200 structurally identical lines each. `scripts/migrations/_lib.js` is the documented home for exactly this — it already exports `makePromptReplaceMigration` ("every one from 003 onward collapses onto ~50 lines") and `makeSplitMigration` ("034/035/036/059 share the same skeleton and differ only in a handful of config values"), with `_testHelpers.js#runPromptMigrationTests` supplying the shared test cases. Add a `makeSeededProviderTierMigration({ targets, tierLabel })` plus a matching shared test runner so the *next* model bump is a ~25-line data table instead of ~370 re-cloned lines. Skipped in the opus-5 PR because migrations are append-only and frozen (a shipped migration must keep working against the shape it was written for), so this pays off from the migration *after* 206 forward and should not retro-edit 032/058/153 — which put it well outside that diff. Surfaced by two independent `/simplify` reviewers on the opus-5 change.
-- [ ] `server/lib/modelPricing.js` — all five `claude-opus-*` rows in `EXACT_RATES` carry an identical `[5.0, 25.0]`, so the `{ test: /opus/i, rateModel: '<latest opus>' }` line in `FAMILY_RULES` must be re-pointed at every model bump for zero behavioral effect (it only relabels the reported `rateModel` for *unrecognized* opus ids). A shared `const OPUS_TIER_RATES = [5.0, 25.0]`, or letting a family rule yield rates directly instead of pointing at a peer `EXACT_RATES` key, would retire that per-bump edit. Low value, listed for completeness.
-
-### Migrate the bespoke gallery-upload callers onto `GalleryImagePicker allowUpload`
-
-- [ ] `client/src/components/imageGen/GalleryImagePicker.jsx` gained an `allowUpload` prop (#2953) that encapsulates the file → `readFileAsBase64` → `uploadGalleryImage` → normalize → select flow inside the shared picker. Three existing callers still roll their own upload path with a separate file `<input>` + `toast` alongside the picker: `client/src/components/music/AlbumsManager.jsx:177`, `client/src/components/music/ArtistsManager.jsx:147`, and `client/src/pages/Authors.jsx:167`. Migrate each to `<GalleryImagePicker allowUpload>` and delete the bespoke upload handlers so the duplication the prop was designed to end actually collapses. Deferred from #2953 (adjacent files outside that issue's scope). Surfaced by the /simplify altitude review.
-
-### Let the Image Gen "Test Render" panel pick its provider
-
-- [ ] `client/src/components/settings/ImageGenTab.jsx` — Test Connection now probes the provider whose sub-tab is open, but the Test tab's `handleRenderTest` still renders with `saved.mode` (the saved default backend). So a user who wants to smoke-test an Agy or Grok render must first make it their default, which is the same friction the Test Connection fix just removed. Add a provider `<select>` to the Test Render panel (default: the saved backend, options limited to enabled backends via `isModeUsable`/`pickUsableMode`'s client mirror), thread the chosen mode into `generateImage({ mode })`, and update the panel copy from "the active backend" to name the selected one. Out of scope for the Test Connection fix (needs new UI, not a re-target of an existing call). Surfaced by the /simplify altitude review.
-
-### Share one beat-pulse indicator between the Metronome and the drum transport
-
-- [ ] `client/src/components/songs/Metronome.jsx:109-129` and `client/src/components/songbook/DrumTransportBar.jsx` (`BeatDots`) draw the same widget twice: a dot per notated beat, the current one lit, count-in dots in `bg-port-warning`, unlit dots `bg-port-border`, with a "Count-in… / bar N" readout beside it. The Metronome's copy is inline JSX, not an exported component, so the drum transport couldn't call it — and the two have already drifted (the drum one uses `bg-port-accent` where the Metronome uses `bg-port-success`, and sizes the lit dot differently). Extract one `<BeatPulse beatsPerBar beat countingIn />` (`client/src/components/ui/`, catalogued + barrelled) and render it from both, picking whichever lit-dot color/size reads better and applying it to each. Deferred from the drum continuous-strip change: extracting from `Metronome.jsx` means editing an unrelated feature's component, which was outside that diff. Surfaced by the /simplify reuse review.
-
-### Hold the iOS `playback` audio session on the other output-only players too
-
-- [ ] The SongBook drum play-along now passes `audioSession: 'playback'` to `createLookaheadTransport` so the iPhone ring/silent switch can't mute it (claimed on play, released on teardown, arbitrated against live mic claims — see the audio-session note in `client/src/lib/audioContext.js`). The same silence still applies to every other output-only surface: `client/src/lib/chiptunePlayback.js` (drives the same transport from `ChiptunePanel`, so it is a one-key change), `client/src/components/meatspace/post/MorseTrainer.jsx` (own per-mount context — needs an `acquireAudioSession('playback')` claim around its own play lifecycle, not the transport option), and `client/src/pages/Security.jsx`'s alert tones. The players NOT to touch are `scorePlayback` / `midiPlayback` / `metronome`: they run on the Songs training views beside `useSingToScore` / `useSingToVerify`, and while the arbiter would now keep those mics working, claiming `playback` there buys nothing those views asked for — that's why the option is per-player rather than baked into the transport. While you're there, claim `play-and-record` in `useSingToScore` / `useSingToVerify` around their own `getUserMedia` for symmetry with `voiceClient` / `audioRecorder`: they are safe today only because no `playback` claimant shares their route, which is an accident of routing rather than an invariant. Each needs an actual iPhone with the ringer switch OFF to verify; a jsdom test can only pin the claim/release calls (as `drumPlayer.test.js` does). Deferred from the drums fix, which was scoped to the reported page. Surfaced by the /simplify altitude review and the codex review pass.
-
-### Make LayoutEditor's Move up/down buttons actually move a widget
-
-- [ ] `client/src/components/dashboard/LayoutEditor.jsx:97` (`move`) reorders the layout's `widgets` array, but `Dashboard.jsx#saveLayout` persists the grid via `reconcileGrid(baseGrid, widgets)`, which iterates the **grid** and uses `widgets` only for membership — and the renderer reads the grid. So once a layout has a `grid` (every layout, after the first Arrange or the `synthesizeGrid` fallback is saved), those buttons produce no visible change at all. The component's own header calls itself a "keyboard-first editor… reorder uses up/down buttons," so this is a control advertising a capability it lost. The mobile reorder handle now edits the same underlying order through `reflowToOrder`, which makes the contradiction user-facing: two reorder affordances for the same widgets, one inert. Fix: have `saveLayout` reflow the grid when the incoming `widgets` order differs from `readingOrderIds(existing.grid)` (both exported from `DashboardGrid.jsx` already). The reason this was NOT rolled into the mobile-drag change: layouts arranged before `saveGridEdit` started syncing `widgets` to reading order can have the two already out of sync, so a naive "orders differ → reflow" would re-pack a carefully arranged desktop layout the first time someone renames it or toggles a widget. Needs either a one-shot migration that stamps `widgets = readingOrderIds(grid)` onto every stored layout (`server/services/dashboardLayouts.js`, `scripts/migrations/`) before the comparison goes live, or a reorder signal from LayoutEditor that says "this save is a reorder" instead of inferring it. Surfaced by the /simplify altitude review.
-
-### Collapse the dashboard grid's two coordinate systems into one
-
-- [ ] Since widget cells became content-measured (`packVertically` in `client/src/components/dashboard/DashboardGrid.jsx`), `y` and `h` carry two contradictory jobs. The renderer packs in PIXELS and treats `y` as reading order only; but `placeAndCompact` still resolves rectangle collisions on `{x,y,w,h}`, `reflowToOrder` still tracks `rowMaxH`, and `GRID_ROW_MAX` still clamps `y` as a position. `toPackSpace` exists purely to reconcile the two, so every gesture round-trips pixels → rows → compact → rows to keep them agreeing. Not a correctness bug — the round-trip is what makes them agree — but anyone touching drag has to hold both models at once, which is why `toPackSpace` needs a six-line comment to justify itself. **The call to make:** demote the persisted shape to `{ id, x, w, order, h?, fixedH? }`, delete `overlaps` + the y-compaction entirely, and let the pack own vertical placement outright. Keep `h` as the first-paint/older-client fallback (that compatibility story is the reason it survives at all — see the `fixedH` note in the dashboard CLAUDE.md). Blocked on nothing technical; it needs a migration in `scripts/migrations/` that rewrites each stored layout's grid to the new shape (`data/dashboard-layouts.json`, plus the seven `DEFAULT_LAYOUTS`/`INTENT_LAYOUTS` grids in `server/services/dashboardLayouts.js`) and a version-gated read so an install that has not upgraded still gets usable geometry. Surfaced by the /simplify altitude review.
-
-### Show the restricted-model license gate on the remaining video render surfaces
-
-- [x] Dropped the MiniMax H3 execution-gate checkbox instead of spreading it to the remaining surfaces. The Community License and excluded territories stay in the Video Gen model disclosure; download and generate no longer 403 on a missing acknowledgement. The `/api/video-gen/model-terms` settings record is kept for older installs.
-
-### Let runner mode recover when the cos-runner app comes up after the server
-
-- [ ] `useRunner` (`server/services/agentState.js`) is decided once, at boot, from a single `isRunnerAvailable()` probe in `subAgentSpawner.js#runInitSpawner` — and everything that keeps runner mode honest lives inside that `if (runnerAvailable)` branch: `initCosRunnerConnection()`, the `connection:ready` re-dequeue, the `connection:lost` warning. So if `portos-cos` is down when `portos-server` boots (a plain PM2 restart ordering, or the user stopped it and later restarts the server), the process silently degrades to direct mode **for its lifetime**: every agent becomes a child of `portos-server` and dies with it, which is the exact orphaning runner mode exists to prevent. Starting the runner afterwards recovers nothing until the next server restart, and there is no log or UI signal that the demotion happened. The new runner-down HOLD does not apply either — it is gated on `useRunner`, which is false. **The call to make:** always call `initCosRunnerConnection()` (the socket already reconnects indefinitely with capped backoff) and drive `setUseRunner` from `connection:ready` / `connection:lost` instead of from the boot probe, keeping the probe only as the cold-start seed. That collapses the two disagreeing sources of truth for "runner mode" into one and makes the hold correct in both directions. Watch two things while doing it: agents spawned directly before a mid-life promotion must keep completing through the direct path (`isAgentOwnedLocally` already distinguishes them), and `syncRunnerAgents()` should run on promotion so a runner that was up before this server took over is reconciled. Deferred from the runner-hold fix, which was scoped to the reported symptom (runner stopped while the server was already running). Surfaced by the /simplify altitude review.
-
-### Stop the arc-verify prompt from checking fields its context never renders
-
-- [x] The arc-verify prompt's checklist and `buildVerifyContext`'s `renderLeaf` (`server/services/pipeline/arcPlanner/context.js`) are two independent lists that have to agree, with nothing enforcing it. They drifted once already: check #6 in `data/prompts/stages/pipeline-arc-verify.md` reports an arc-role imbalance from `arcRole`, which the leaf did not render, so every verified series got a permanent "zero pilot/finale" finding no resolver could ever close — and because the foundation gate's structure arm reverts whenever `verifyArc` leaves *any* blocker, that one phantom finding stalled the gate on plans with nothing wrong with them. `arcRole` is now rendered, but the class is still open: the same silent drift returns the next time a check names a field (`status`, `lengthProfile`, `themes`, a season field) the leaf drops. **The call to make:** add a test that parses the installed + shipped `pipeline-arc-verify.md` for backticked leaf field names and asserts each one appears in a leaf built by `buildVerifyContext`, failing loudly on a check that reads a field the context cannot supply. Prove it with a bypass probe (delete a field from the leaf and watch the test fail) — a rendered-but-unread field is harmless, an unrendered-but-checked field is a permanent false positive. Surfaced while unstalling a foundationGate pause whose structure repair had been reverting on this phantom blocker. **Shipped** as `server/services/pipeline/arcPlanner/verifyPromptContract.test.js`, which covers both halves of the class: every backticked record field the checklist cites must be renderable by the exported `renderVerifyIssueLeaf` / `renderVerifySeasonFields`, and the verify prompt must render every world block its paired resolve prompt does. The second half caught a live instance — the verifier judged groundedness against `worldCanonText` alone while the resolver could see `worldCategoriesText`, so locked faction cards read as un-canonized (migration 263).
-
-- [ ] `renderVolumeIssue` needs the same field-level contract test against `pipeline-volume-verify.md` that `renderVerifyIssueLeaf` now has against `pipeline-arc-verify.md`. That prompt carries no field-level check today, so there is nothing broken yet — but it is the same two-lists-with-nothing-enforcing-agreement shape, and the volume verifier feeds the same revert-on-any-blocker gate.
-
-### Give the foundation gate's structure repair the same rollback ownership as the arc gate
-
-- [ ] `restoreArcState` now takes an exact mutation manifest (`{ episodeEdits }`) so a rollback restores only the episode synopses the resolver reported writing, instead of every episode that differs from the pre-resolve snapshot. The arc gate passes one (`server/services/pipeline/seriesAutopilot/childRuns.js`, via `createArcMutationLedger`); the foundation gate's structure repair does not, so its three rollbacks (`server/services/pipeline/foundationJudge.js` ~lines 1914, 1928, 1947) still revert any episode idea-stage difference — including a write that landed from elsewhere during the repair. Its exposure window is *longer* than the arc gate's: one resolve plus up to `MAX_STRUCTURE_CORRECTION_PASSES` correct/verify pairs. **The call to make:** it already holds each `resolveVerifyIssues` result (`trackedResolve`), so accumulate `resolvedEpisodeEdits()` across the repair's resolves on the same shared ledger and pass `ledger.since(snapshot)` at those three sites. Do NOT touch `restoreFoundationState`'s own `restoreArcState` call (~line 1709) — it verifies restore fidelity by diffing episodes wholesale via `mismatchedFoundationFields`, so the manifest-free contract is correct there, and that split is what the doc comment on `restoreArcState` records. Deferred from the arc-gate fix to keep that change to the gate whose defect was observed; needs its own regression coverage in `foundationJudge.rollback.test.js`. Surfaced by the /simplify altitude and reuse reviews.
-
-### Classify non-Node app types so the standardize offer knows what it is looking at
-
-- [ ] `streamingDetect.js` emits `vite+express` / `vite` / `single-node-server` / `nextjs`, the four Apple types, or `unknown` (the initialized default, ~line 1096) — there is no `python`, `go`, `docker`, or `static`. `usesPm2()` is the negation of `NON_PM2_TYPES` (the four Apple types), so *everything unrecognized is treated as a PM2 app*: a Python service, Docker stack, Go binary, or static site all come back `unknown` and are still offered PM2 standardization in the Add App wizard. That matters because the standardizer's prompt opens with "You are analyzing a **Node.js** application" (`server/services/pm2Standardizer.js`) — on a Python repo it doesn't fail, it confidently writes a Node ecosystem config. The auto-fire is gone (standardizing is now an explicit button whose copy says "skip it for Docker stacks, static sites, or anything you start another way"), so this is no longer a data-loss path, but the prose is doing a type check's job. **The call to make:** don't widen `NON_PM2_TYPES` — its three other consumers (`appDeployer.js`'s `deploy.sh`, `SlashDoPanel.jsx`'s `isSwiftApp`, `apps.js`'s `xed .` editor launch) mean "Apple", not "not PM2". Teach `streamingDetect` to classify `python` / `go` / `docker` / `static` from marker files (`pyproject.toml`/`requirements.txt`, `go.mod`, `docker-compose.yml` with no package.json, `index.html` with no server) so `unknown` stops being the catch-all, then add a positive `isStandardizable(type)` predicate over the Node types and gate both the wizard card and `standardizeRefusalFor()` on it. Note `type` is persisted on the app record, so an existing `unknown` app keeps that type until re-detected — the predicate must stay permissive for `unknown` or offer a re-detect. Surfaced by the /simplify altitude review on the opt-in-standardization change.
-
-### Persist the autopilot milestone map so a paused run still has one after a reload
-
-- [ ] The Autonomous-mode card draws a milestone map from two in-memory halves: the projected plan on the run's `start` frame (retained as `record.startPayload`) and the progress snapshot folded onto `record.progress` (`server/services/pipeline/seriesAutopilot/state.js#noteProgress`). Both are served only while the run is alive — `activeRunStart` / `activeRunProgress` return null once `run.finished`, and the panel's mount effect bails on `!s.active`. So the map answers "where is it now" perfectly while the panel is open, and answers nothing the morning after: a run that paused overnight shows the persisted banner (`Paused at Judging foundation`) with no map beside it, which is exactly when "how far did it get, and what is left" is the question being asked. **The call to make:** stamp a compact `{ plan, progress }` onto the persisted marker at the pause/complete/error terminals, in the same `persistMarker` call that already writes `status` / `currentStep` / `residualFindings` (`seriesAutopilot/session.js`), and have the panel fall back to `series.autopilot.plan` / `.progress` when no run is active. Keep it compact — the plan is ~16 `{kind,count,note,estActions}` rows and the snapshot is bounded by the step vocabulary — and add it to `sanitizeAutopilot` in `server/services/pipeline/series.js` so the shape survives a round-trip; the marker federates, so check whether the size warrants a `SCHEMA_VERSIONS` bump before shipping. Surfaced by the /simplify altitude review on the milestone-map change.
-
-### Extract the hand-rolled progress meter into a shared ui primitive
-
-- [ ] There is no progress-bar component in `client/src/components/ui/`, so every surface that needs one re-implements the same `h-1.5 rounded-full` track + `style={{ width: `${pct}%` }}` fill: `client/src/pages/Loras.jsx`, `client/src/components/pipeline/manuscript/ManuscriptReadAloud.jsx`, `client/src/components/pipeline/stages/EpisodeVideoStage.jsx`, `client/src/components/meatspace/post/PostLlmDrillRunner.jsx`, `client/src/components/meatspace/post/MemoryPractice.jsx`, and now `client/src/components/pipeline/AutopilotMilestones.jsx` — six copies. They already disagree on accessibility: only two carry `role="progressbar"` with `aria-valuenow`, so the rest are invisible to a screen reader. **The call to make:** add `client/src/components/ui/ProgressBar.jsx` taking `{ percent, tone, label }`, always emitting the ARIA trio, and migrate the six call sites (each is 3-8 lines of markup, no behavior change); register it in the ui README the way the other primitives are. Surfaced by the /simplify reuse review on the milestone-map change.
-
-### Move the MiniMax H3 CUDA diffusers pin off a git commit once a release ships it
-
-- [ ] `scripts/requirements-minimax-h3-cuda.txt` installs diffusers from a `git+https://github.com/huggingface/diffusers.git@2da7040b` pin because the MiniMax-H3 modular integration (PR #14355) merged to `main` on 2026-08-05, *after* the v0.39.0 release (2026-07-03) — no tagged release carries it. A git pin means every `INSTALL_MINIMAX_H3_CUDA=1` install clones the diffusers repo to build a wheel, which is slower and needs git on the box, and it will silently keep doing so long after a release makes it unnecessary. **The call to make:** when a diffusers release containing `src/diffusers/modular_pipelines/minimax_h3/` ships, replace the git line with `diffusers==<version>` and drop the explanatory comment above it; nothing else changes, because the runtime's `importProbe` in `server/services/videoGen/runtimes.js` already asserts `MiniMaxH3Transformer3DModel` imports, so a wrong pin reports as not-ready rather than failing inside a render. Check with `curl -s https://api.github.com/repos/huggingface/diffusers/releases | grep tag_name` against the merge date. Surfaced while adding the CUDA runtime.
-
-### Give the video model catalog a platform axis that can reach Linux
-
-- [ ] `getVideoModels()` (`server/lib/mediaModels.js`) picks `IS_WIN ? video.windows : video.macos`, so **a Linux install is served the macOS list** — every entry on it is an MLX runtime (`mlx_video`, `ltx2`, `wan22`, `hunyuan`, `minimax_h3`) that cannot run on Linux at all, while the two entries that genuinely would run there (`ltx_video` via `scripts/generate_win.py` and `minimax_h3_cuda` via diffusers, both plain torch+CUDA) sit in the unreachable `windows` list. Nothing is broken for the two platforms PortOS actually ships to, which is why this has gone unnoticed; the cost is that adding a CUDA runtime has to be documented as Windows-only even when its venv provisions perfectly on Linux (see the scoping notes in `server/services/videoGen/runtimes.js` and the `is_windows` warning in `scripts/setup-image-video.sh`). **The call to make:** the axis is really "MLX vs CUDA", not "macOS vs Windows" — rename the registry buckets to say so (keeping `macos`/`windows` as read aliases so existing `data/media-models.json` files and `_shippedDefaults.video.*` snapshots keep resolving) and select on `process.platform === 'darwin'` rather than on `IS_WIN`. Check `_shippedDefaults.video.{macos,windows}`, `findModelLocation`, the `kind === 'video'` list picker (~line 1202), migrations 233/242/247/268, and `data.reference/media-models.json` — all of them name the two buckets. Do NOT simply flip `IS_WIN ? windows : macos` to `IS_MAC ? macos : windows` without the alias work: it silently swaps every existing Linux install's catalog. Surfaced by the /simplify altitude review while adding the MiniMax H3 CUDA runtime.
diff --git a/client/src/components/character/GoalsCard.jsx b/client/src/components/character/GoalsCard.jsx
index a0b86455f2..f9a7262c3c 100644
--- a/client/src/components/character/GoalsCard.jsx
+++ b/client/src/components/character/GoalsCard.jsx
@@ -15,7 +15,7 @@ import BrailleSpinner from '../BrailleSpinner';
// Goals has no routed per-goal detail today (GoalsListView selects into a local `selectedGoal`
// panel), so every row links to the list rather than inventing a deep link the router cannot
-// honor. See PLAN.md — routing that selection through the URL is the goals feature's job.
+// honor. Routing that selection through the URL is the goals feature's job — see #4121.
export const GOALS_PATH = '/goals/list';
const TOP_N = 4;
@@ -90,7 +90,7 @@ export default function GoalsCard() {
// so the two surfaces can never show contradictory urgency. (Enriching the flat endpoint
// instead would change a shared API's semantics.)
//
- // Two honest limits on how fresh that is, both the goals feature's to fix (see PLAN.md),
+ // Two honest limits on how fresh that is, both the goals feature's to fix (see #4122),
// and both landing on "sorts last" rather than on a wrong number:
// - The tree only re-derives for goals it considers active (`goals.js` gates on a
// strict status), so the status-less goals `isActive` admits keep whatever urgency
diff --git a/client/src/components/dashboard/CLAUDE.md b/client/src/components/dashboard/CLAUDE.md
index 2514459086..c5802dcbec 100644
--- a/client/src/components/dashboard/CLAUDE.md
+++ b/client/src/components/dashboard/CLAUDE.md
@@ -12,7 +12,7 @@ On drop, `onDragEnd` re-flows the whole grid through `reflowToOrder` so its read
**One source of truth for the mobile/desktop seam.** `DashboardGrid` measures its own *container* (`useContainerWidth`), which page padding makes narrower than the viewport — so a Tailwind `sm:` breakpoint disagrees with it in a ~30px band. Anything outside the grid that needs to know which affordance is live (the Dashboard's edit-mode hint) reads it from the `onLayoutModeChange` callback, never from a CSS breakpoint.
-**Widget order lives in the grid.** `saveGridEdit` rewrites the layout's `widgets` array into `readingOrderIds(grid)` so LayoutEditor lists widgets in the order the dashboard actually shows them. Note that `reconcileGrid` iterates the *grid* and uses `widgets` only for membership, so LayoutEditor's own Move up/down buttons currently do not move anything once a layout has a grid — see the PLAN.md item.
+**Widget order lives in the grid.** `saveGridEdit` rewrites the layout's `widgets` array into `readingOrderIds(grid)` so LayoutEditor lists widgets in the order the dashboard actually shows them. Note that `reconcileGrid` iterates the *grid* and uses `widgets` only for membership, so LayoutEditor's own Move up/down buttons currently do not move anything once a layout has a grid — tracked in #4132.
**When adding a new dashboard widget:**
1. Add a `{ id, label, Component, width, defaultH?, gate? }` entry to `WIDGETS` in `widgetRegistry.jsx`. Use a stable `id` (kebab-case) — it's the contract stored in layouts. Pick `defaultH` from the widget's rough content height (default `4`); it only has to be close, since the cell measures itself once painted.
diff --git a/client/src/components/meatspace/post/DrillQuestionReview.jsx b/client/src/components/meatspace/post/DrillQuestionReview.jsx
index de924e98ba..b58b52ffe7 100644
--- a/client/src/components/meatspace/post/DrillQuestionReview.jsx
+++ b/client/src/components/meatspace/post/DrillQuestionReview.jsx
@@ -81,7 +81,7 @@ function formatGenericValue(type, value) {
// `expected`. Fall back to those so this generic view never just shows "—"
// for every row if that type is ever produced, without conflating this
// display-only fallback with the separate, pre-existing scoring gap for that
-// type in usePostSession.js (out of scope here — see PLAN.md).
+// type in usePostSession.js (out of scope here, not yet filed as an issue).
function expectedForDisplay(q) {
if (q.expected !== null && q.expected !== undefined && q.expected !== '') return q.expected;
if (Array.isArray(q.answers) && q.answers.length) {
diff --git a/client/src/components/media/CollectionPickerShell.jsx b/client/src/components/media/CollectionPickerShell.jsx
index 3b318b73b5..e0aa0aa40a 100644
--- a/client/src/components/media/CollectionPickerShell.jsx
+++ b/client/src/components/media/CollectionPickerShell.jsx
@@ -21,7 +21,7 @@ import { applyCollectionView } from '../../lib/mediaCollectionList.js';
// provides `renderItem` for the per-row UI and `onCreated`/`onPickCreated` for
// what to do after the inline create succeeds.
//
-// Data flow (per PLAN.md item 2):
+// Data flow:
// - If `collections` is provided by the parent, we never call `loadItems()`
// ourselves — this lets MediaCollectionDetail reuse its already-fetched
// list instead of paying a per-mount round-trip.
diff --git a/client/src/components/pipeline/AutopilotPanel.jsx b/client/src/components/pipeline/AutopilotPanel.jsx
index a34f9c942d..d50c154460 100644
--- a/client/src/components/pipeline/AutopilotPanel.jsx
+++ b/client/src/components/pipeline/AutopilotPanel.jsx
@@ -1411,7 +1411,7 @@ export default function AutopilotPanel({ series, onSeriesUpdate, onIssuesUpdate
no marker and completes immediately, and a run that pauses while the
panel is open keeps its map beside the banner. Both halves are
in-memory on the server, so a reload after the run ended shows the
- persisted banner alone — see PLAN.md for persisting the map itself.
+ persisted banner alone — persisting the map itself is tracked in #4140.
Cleared when the next run starts. `planTotals` carries the #1576
estimated cos-action budget so a large series on a small daily cap can
see, before starting, whether it will run out before editorial. */}
diff --git a/docs/GOALS_OPERATIONAL.md b/docs/GOALS_OPERATIONAL.md
index b07b0e6ae6..159185da71 100644
--- a/docs/GOALS_OPERATIONAL.md
+++ b/docs/GOALS_OPERATIONAL.md
@@ -2,7 +2,7 @@
Runtime guidance for the Chief of Staff (CoS) autonomous agent system. CoS reads this file to decide what work to generate when idle, how to prioritize incoming tasks, and which operating principles to apply.
-This file is **operational config**, not strategic intent. For the project's mission and strategic goals, see [../GOALS.md](../GOALS.md). For the active development backlog, see [../PLAN.md](../PLAN.md).
+This file is **operational config**, not strategic intent. For the project's mission and strategic goals, see [../GOALS.md](../GOALS.md). For the active development backlog, see the GitHub issue tracker (issues labeled [`plan`](https://github.com/atomantic/PortOS/issues?q=is%3Aissue+is%3Aopen+label%3Aplan)).
The `server/services/goalProgress.js` parser walks the `## Operational Goals` section below and maps each `### Goal N: <name>` heading to a category in `GOAL_MAPPINGS` for the Goal Progress dashboard.
@@ -27,7 +27,7 @@ The CoS autonomous agent system reads these goals to guide its behavior and task
- Learn from completed tasks
### Goal 3: Documentation
-- Keep PLAN.md up to date with completed milestones
+- Keep the GitHub issue tracker up to date with completed milestones
- Document new features in /docs
- Generate daily/weekly summary reports
- Track metrics and improvements over time
diff --git a/scripts/migrations/023-resolve-prompt-episode-anchor.js b/scripts/migrations/023-resolve-prompt-episode-anchor.js
index e46de864ac..fbe4bc681b 100644
--- a/scripts/migrations/023-resolve-prompt-episode-anchor.js
+++ b/scripts/migrations/023-resolve-prompt-episode-anchor.js
@@ -13,8 +13,7 @@
* The pre-resolve verify prompt (`pipeline-arc-verify.md`) already calls
* out episode-level evidence explicitly ("Did a character die in episode 4
* but get dialogue in episode 7?"). Resolve inherited the same data path
- * but not the same instruction shape — see PLAN.md
- * `[resolve-issues-inherits-verify-gaps-verify-the]`.
+ * but not the same instruction shape.
*
* Implementation: hash-driven prompt-replace via `./_lib.js`. Idempotent.
*/
diff --git a/scripts/migrations/025-idea-stage-character-detail.js b/scripts/migrations/025-idea-stage-character-detail.js
index 32f0024fad..ddf6bbba44 100644
--- a/scripts/migrations/025-idea-stage-character-detail.js
+++ b/scripts/migrations/025-idea-stage-character-detail.js
@@ -13,8 +13,6 @@
* from, so letting the LLM see character interiority + role here produces
* better arc decisions that downstream stages can keep building on.
*
- * See PLAN.md `[pipeline-idea-stage-character-detail-plumbing]`.
- *
* Implementation: hash-driven prompt-replace via `./_lib.js`. Idempotent.
*/
diff --git a/scripts/setup-image-video.sh b/scripts/setup-image-video.sh
index cfa4d126bd..0d3dccea17 100755
--- a/scripts/setup-image-video.sh
+++ b/scripts/setup-image-video.sh
@@ -401,7 +401,7 @@ if [[ "$INSTALL_MINIMAX_H3_CUDA" == "1" ]]; then
# Windows: the catalog picks video.windows[] vs video.macos[] off IS_WIN, so
# a Linux install is served the macOS/MLX list and would never see the row.
# Warn rather than refuse — the install is harmless and ready for the day
- # that axis widens (tracked in PLAN.md).
+ # that axis widens (tracked in #4142).
if ! is_windows; then
echo "⚠️ MiniMax H3 CUDA is only surfaced in Video Gen on Windows today; this venv will install but no model row will appear." >&2
fi
diff --git a/server/lib/fileUtils.js b/server/lib/fileUtils.js
index ca60ef99d5..c4c3fdd8f0 100644
--- a/server/lib/fileUtils.js
+++ b/server/lib/fileUtils.js
@@ -1200,7 +1200,7 @@ export async function saveImageUpload(dir, { filename, data }, { maxBytes }) {
* attachment routes established (`INVALID_FILE_TYPE`, `FILE_TOO_LARGE`,
* `INVALID_FILENAME` — all 400), so refactored routes keep their pinned
* responses. Consolidates `routes/attachments.js` and
- * `routes/brainSongbook.js` (uploads.js has a different shape — see PLAN.md).
+ * `routes/brainSongbook.js` (uploads.js has a different shape — see #4101).
*
* @param {string} dir - Destination directory (created if missing).
* @param {{ filename: string, data: string }} upload - Original filename +
diff --git a/server/routes/update.js b/server/routes/update.js
index 06f18270f9..781a6db559 100644
--- a/server/routes/update.js
+++ b/server/routes/update.js
@@ -25,7 +25,7 @@ const router = Router();
// This still can't close the window where a NEW spawn begins AFTER a caller
// reads this but before update.sh's pm2 restart. The route's post-lock re-check
// below narrows it; fully closing it needs every CoS spawn engine to consult
-// updateInProgress (tracked in PLAN.md) — the orphan reaper bounds the residual.
+// updateInProgress (tracked in #4124) — the orphan reaper bounds the residual.
function countActiveCosAgents() {
return getActiveAgentIds().length + spawningTasks.size;
}
@@ -219,7 +219,7 @@ router.post('/execute', asyncHandler(async (req, res) => {
// spawn) may have started live during the git/fork awaits between the
// fast-fail pre-check and here. If so, release the lock and reject rather than
// restart out from under it. A spawn that begins AFTER this, during update.sh
- // itself, is the residual the PLAN.md spawn-engine gate will close.
+ // itself, is the residual the #4124 spawn-engine gate will close.
const postLock = countActiveCosAgents();
if (postLock > 0) {
await updateChecker.setUpdateInProgress(false);
diff --git a/server/services/importer.js b/server/services/importer.js
index 68afe31bac..c61a8058c2 100644
--- a/server/services/importer.js
+++ b/server/services/importer.js
@@ -77,7 +77,7 @@ export const ANALYZE_STAGE_TIMEOUT_MS = 1_200_000;
// active provider's context window, since the whole corpus still goes into one
// extraction call. Sources that fit the ceiling but overflow the chosen model's
// window will fail at the provider until the chunked-extraction follow-up lands
-// (PLAN.md / "Create Suite — Importer page") — pick a large-context provider or
+// ("Create Suite — Importer page") — pick a large-context provider or
// trim the source in the meantime.
export const IMPORTER_SOURCE_CHAR_LIMIT = 5_000_000;
diff --git a/server/services/pipeline/arcPlanner/arcCore.js b/server/services/pipeline/arcPlanner/arcCore.js
index 983f48d904..a1a0842d20 100644
--- a/server/services/pipeline/arcPlanner/arcCore.js
+++ b/server/services/pipeline/arcPlanner/arcCore.js
@@ -1647,8 +1647,7 @@ export function buildSeasonRemap(droppedOldSeasons, newlyMintedSeasons) {
const safeLabel = (s) => {
const raw = typeof s.title === 'string' ? s.title : '';
// stripAnsi removes full ESC + CSI sequences (so "[31m" payload tails
- // don't leak through). Note: per PLAN.md
- // [ansistrip-osc-alternative-unreachable], OSC sequence bodies do leak
+ // don't leak through). Note: OSC sequence bodies do leak
// through stripAnsi today — extremely unlikely in LLM-generated season
// titles, but called out here so a future fix to ANSI_PATTERN naturally
// tightens this path. The trailing control-char sweep catches any bare
diff --git a/server/services/pipeline/seasons.js b/server/services/pipeline/seasons.js
index 0c4d840888..7efbcfe8bb 100644
--- a/server/services/pipeline/seasons.js
+++ b/server/services/pipeline/seasons.js
@@ -8,7 +8,7 @@
* re-pointing every child issue's `seasonId` so a deleted season doesn't
* leave orphan references.
*
- * Phase 2 of the Story Arc Planning initiative. See PLAN.md for the full spec.
+ * Phase 2 of the Story Arc Planning initiative.
*/
import { ARC_LIMITS, buildSeason, sanitizeSeason } from '../../lib/storyArc.js';
diff --git a/server/services/pipeline/seriesReview.js b/server/services/pipeline/seriesReview.js
index ff3e0eaaa8..767c906061 100644
--- a/server/services/pipeline/seriesReview.js
+++ b/server/services/pipeline/seriesReview.js
@@ -379,7 +379,7 @@ async function clearSnapshot(seriesId) {
* a "Fix here" link) or new findings appeared — so a reload can warn the verdict
* is out of date instead of presenting it as current. (This covers the
* findings-store drift this feature introduces; foundation/canon/manuscript edits
- * through other paths are a broader pre-existing concern tracked in PLAN.md.)
+ * through other paths are a broader pre-existing concern tracked in #4111.)
*/
export async function getSeriesReview(seriesId) {
assertValidSeriesId(seriesId);
diff --git a/server/services/universeBuilder/sanitize.js b/server/services/universeBuilder/sanitize.js
index 96e60c3bd5..ba4bf99850 100644
--- a/server/services/universeBuilder/sanitize.js
+++ b/server/services/universeBuilder/sanitize.js
@@ -29,7 +29,7 @@ import { persistedRenderPinFields } from '../../lib/renderTargets.js';
// v4 — categories carry a `kind` field tagging them to one of the 3 canon
// trunks (characters/places/objects/other); the default `characters`
// category is retired and any variations get folded into canon
-// characters[]. See "Categories vs canon — decision" in PLAN.md.
+// characters[].
// v5 — styleReferences stores uploaded visual references with their
// vision-authored title and recreation prompt.
export const CURRENT_SCHEMA_VERSION = 5;
diff --git a/server/services/videoGen/runtimes.js b/server/services/videoGen/runtimes.js
index 2082c455ca..dc768a230c 100644
--- a/server/services/videoGen/runtimes.js
+++ b/server/services/videoGen/runtimes.js
@@ -59,7 +59,7 @@ export const MINIMAX_H3_ENCODER_SHIM_DIR = join(homedir(), '.portos', 'minimax-h
// model catalog's platform axis is a macOS/Windows binary —
// `getVideoModels()` is `IS_WIN ? video.windows : video.macos` — so a Linux
// install is served the macOS/MLX list and cannot select this runtime's model
-// however well the venv provisions. Widening that axis is tracked in PLAN.md;
+// however well the venv provisions. Widening that axis is tracked in #4142;
// until then, do not advertise Linux support here or in the installer.
export const MINIMAX_H3_CUDA_REPO_DIR = join(homedir(), '.portos', 'minimax-h3-cuda');
export const MINIMAX_H3_CUDA_VENV_PYTHON = process.platform === 'win32'