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([series-llm-override-resolution-helper]): remove from PLAN.md and log to changelog

[._.]/ Adam Eivy7f79a2176790
diff --git a/.changelog/NEXT.md b/.changelog/NEXT.md
index db8d44eb26..a238c3fd6f 100644
--- a/.changelog/NEXT.md
+++ b/.changelog/NEXT.md
@@ -30,6 +30,7 @@
- **[merge-cascade-no-rollback] A merge that fails partway no longer leaves a broken half-merge — just re-run it.** If re-pointing a duplicate universe's child series (or moving a duplicate series' issues) fails mid-merge, the duplicate is now kept intact instead of being deleted over records that didn't move, and the merge reports exactly which children are stuck. Because every step is idempotent, simply running the merge again finishes the job cleanly.
- **[conflict-journal-deep-diff] The Sharing → Conflicts tab now shows which sub-entry changed, not a wall of JSON.** For structured fields — universe categories and canon (characters/places/objects), series arc and seasons, issue stages — a conflict now breaks down into one focused before/after diff per changed entry, labelled by its name or key (e.g. just the character "Alice", or the "tone" category), instead of diffing the entire field as a single JSON blob. Restoring and merging still operate on the whole field.
- **[extract-use-universe-load-hook] Internal refactor: the duplicated "load the linked universe" logic in pipeline stages now sits behind one reusable hook.** No user-visible change.
+- **[series-llm-override-resolution-helper] Internal refactor: the series provider/model fallback that three pipeline LLM actions each inlined now lives in one shared helper.** No user-visible change.
- **[season-continuity-extract-honors-series-llm] Committing a season's episodes now extracts continuity canon with the series' chosen model.** When you accept a season breakdown, the automatic bible/continuity extraction uses the LLM pinned to that series (and honors a per-run model override) instead of falling back to your global active provider — matching how on-demand canon and scene extraction already behave.
- **[conflict-journal-issues] Sync conflicts on individual issues are now captured and restorable, like universes and series.** When two of your machines independently edit the same issue while offline and then sync, the older edit is no longer silently overwritten — it's archived in Sharing → Conflicts where you can review what differs and restore your version (covering the issue's title, status, arc placement, length, and stage content such as prose and comic pages). Previously only universe and series conflicts were journaled; child issues rode last-write-wins silently.
diff --git a/PLAN.md b/PLAN.md
index 1a0eb661f9..9c97359fb5 100644
--- a/PLAN.md
+++ b/PLAN.md
@@ -23,7 +23,8 @@ Claimable, well-specified, no decision needed — `/claim`-able. Unordered.
- [ ] [hidream-requires-hf-token-fail-fast] **Probe HF token upfront for HiDream gated-encoder downloads.** `data.reference/media-models.json`'s HiDream entries carry `requiresHfToken: true`, but `scripts/z_image_turbo.py` `load_external_text_encoder()` does NOT call `probe_hf_auth()` the way `flux2_macos.py:265` does. A user without a valid HF token currently sees a multi-GB download attempt that fails with a 401 deep inside transformers. Mirror the FLUX.2 probe before invoking `transformers.from_pretrained()` on the gated encoder repo.
- [ ] [flux2-runner-sidecar-tests] **Test coverage for `generateImage`'s sidecar `meta` payload.** `server/services/imageGen/local.test.js` exercises `buildArgs` but never asserts on the sidecar `meta` object built inside `generateImage` — including the `referenceImageFilenames` + `referenceImageStrengths` fields. A focused test would need to either factor the meta-builder out of `generateImage` so it's callable without spawning Python, or stub the spawn + assert on the persisted sidecar JSON.
- [ ] [manuscript-review-sync] **Wire the manuscript-review comment set into cross-install sync.** `data/pipeline-series/{id}/manuscript-review.json` is written as a sibling of the series record but is NOT carried by `exportSeries`/`importSeries` or the peer-sync path. `manuscriptReview.mergeReviewFromSync(seriesId, remoteReview)` (LWW-per-comment) already exists; what's missing is (a) including the review document in the series export bundle, (b) a wire-schema-version gate in `server/lib/schemaVersions.js`, and (c) calling `mergeReviewFromSync` on the receiving side. Accepted *fixes* already sync (they write to issue stage outputs); only the comment list/status/dismissals don't propagate yet.
-- [ ] [series-llm-override-resolution-helper] **Extract the series-LLM override resolution into one shared helper.** The `providerMatchesSeries`-guarded provider/model resolution (`provider = override || series.llm?.provider`; only inherit `series.llm?.model` when the effective provider still matches the series provider) is now inlined in three routes in `server/routes/pipeline.js`: extract-canon (~line 1855, body field `body.model`), extract-scenes (~line 1705, inlines only the boolean as `sceneProviderMatchesSeries` and folds the rest into the `extractScenes` call), and season-episodes-generate (~line 1284, body field `body.modelOverride`). Extract a pure `resolveSeriesLlmOverride(series, { overrideProvider, overrideModel })` returning `{ provider, model, providerMatchesSeries }` into `server/lib/` (new module → register in the `index.js` barrel + README per the maintenance rule), and migrate all three call sites (each maps its own body field name). Deferred from the season-continuity-extract-honors-series-llm PR: the body-field-name + variable-name skew across sites means a careful lift, it touches two proven live routes + their tests, and the new lib module trips the barrel rule — its own PR. Surfaced by /simplify (reuse + altitude, 2026-06-02).
+- [ ] [extract-use-universe-load-hook] **Extract a `useUniverse(universeId)` load hook.** `client/src/components/pipeline/stages/StoryboardsStage.jsx` (~line 57) and `NounsStage.jsx` (~line 149) now run a byte-identical `useMounted` + `let cancelled` + `getUniverse(series.universeId).then(...).catch(...)` effect to load the linked universe record. Extract a `client/src/hooks/useUniverse.js` returning `[universe, loading, error]` (handling the mount/cancel guards internally), register it in the hooks `index.js` barrel + README, and migrate both call sites. Deferred from the wardrobe-picking PR: migrating `NounsStage` is outside that diff's scope and the new module trips the barrel maintenance rule. Surfaced by /simplify (reuse, 2026-06-01).
+- [ ] [create-issue-preload-series-for-batch] **`createIssue`'s renumber pass re-reads the series on every call — preload it for batch episode seeding.** `createIssue` (`server/services/pipeline/issues.js`) calls `getSeries()` inside its `renumberInline` pass on every invocation. `commitEpisodesToIssues` (`server/services/pipeline/arcPlanner.js`) creates one issue per episode in a loop, so a 12-episode season does 12 redundant `getSeries()` reads of an unchanging record (and `generateIssuesFromArc` already fetched it once). Add a `createIssueWithPreloadedSeries(series, input)` variant (or a `{ preloadedSeries }` option) that threads the already-fetched series into `renumberInline`, and route the batch loop through it. Pre-existing in `createIssue` (the Pipeline season-episodes route pays the same cost); LLM-bound batch so the realized win is small — surfaced by /simplify (efficiency) during the story-builder-issue-llm-seeding PR (2026-06-01). Deferred because it touches the `issues.js` renumber internals beyond this diff's scope.
## Blocked / Deferred (skip for `/claim`)