Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS
JavaScript ai-agentsdashboarddeveloper-toolsdigital-twinquantified-selfsecond-brainself-hostedtailscale
Merge remote-tracking branch 'origin/main' into next/issue-1285
[._.]/ Adam Eivy6cafcf6fd14d
diff --cc .changelog/NEXT.mdindex c18569e59e,3b48941a67..a39fe30362--- a/.changelog/NEXT.md+++ b/.changelog/NEXT.md@@@ -2,10 -2,10 +2,12 @@@## Added+ - **Reverse Outline — a color-coded scene map of your drafted manuscript.** A new **Reverse Outline** view (linked from the series page) reads the finished/drafted manuscript and lays out what's *actually on the page*: it identifies the recurring plotlines (A-plot, subplots, POV threads) and segments the prose into scenes, each tagged to the plotline it advances — then shows them as a grid (rows = plotlines, columns = scenes in reading order) so you can see thread cadence, gaps, and tangles at a glance. Click any scene marker to read its summary, POV, setting, character list, and narrative/action/dialogue mix, and jump straight into the manuscript editor at that scene's issue. Generation streams live progress; the outline flags itself **stale** once the manuscript changes so you know to regenerate. This scene segmentation is the shared substrate upcoming editorial checks (scene balance, POV justification, cliffhangers, arc transitions) will read rather than re-deriving. (#1286)+- **Editorial checks — an extensible editorial-review system for the series pipeline.** Editorial rules (name confusability, exposition dumps, and more to come) previously had no shared home — each was a one-off. A new **editorial check registry + runner** lets each rule plug in, declare what it examines, and emit findings into the same manuscript-review comment set you already work through in the editor (jump-to, AI fix, accept/dismiss). This first release ships two reference checks: **Character name dissimilarity** (flags character names a reader could confuse — sharing a first letter, length, vowel pattern, opening, or ending) and **Info-dumping** (flags "as-you-know-Bob" exposition — backstory bricks, maid-and-butler dialogue, front-loaded world rules — with a suggestion to dramatize or trim each). Each check can be enabled/disabled and configured, and runs on demand for a series (with live progress) or automatically as part of Series Autopilot's editorial pass. Findings are tagged by which check raised them, so re-running never duplicates them and a dismissal stays dismissed for that check. New endpoints: `GET/PATCH /api/pipeline/editorial/checks` (catalog + enable/config) and `POST /api/pipeline/series/:id/editorial/checks/run` (run + SSE progress). (#1284)+- **[issue-1285] Editorial Checks page — see, configure, run, and triage every editorial check in one place.** The editorial checks now have a home of their own (Create → Editorial Checks, or ⌘K "editorial checks"). A **catalog** lists every check grouped by what it examines (Noun / Scene / Issue / Series) with a deterministic-vs-LLM badge, an enable toggle, and an expandable per-check config form (e.g. how many similarity signals two names must share before they're flagged). Pick a series, then **Run all enabled** — or tick a few checks and **Run selected** — and watch live progress. The results land in a **findings** panel grouped by check with open/total and severity counts, and every finding links straight into the manuscript editor at its passage, where the existing accept / dismiss / generate-fix flow takes over. (#1285)+- **Series Autopilot — drive a whole series end-to-end autonomously.** A new `POST /api/pipeline/series/:id/autopilot/start` runs a *conductor* that inspects the series' current state and walks every missing step in order — generate arc → generate episodes per volume → verify arc → per-issue beat sheets → per-issue text stages (prose + scripts) → structural comic-script gate → series-level editorial review → **canon descriptive-integrity gate** → **draft cover + back cover + all interior comic pages** — by composing the existing pipeline service functions (it never re-implements generation). The "what's next" decision is a **pure resolver over the canonical records**, so it is non-destructive and resumable: anything already `ready`/`edited`/rendered is skipped (every pass runs `force:false`), and on restart you just start again and it picks up at the first still-missing step (a partially-built series is never clobbered). Progress streams over SSE (`/autopilot/progress`); `/autopilot/cancel` stops it (propagating to the active child runner); `/autopilot/status` exposes a thin persisted `series.autopilot` marker for resume/paused UI. Gated on the **cos** autonomy domain: `off` rejects the start (409), `dry-run` emits a no-side-effect `plan` of what it would do, `execute` runs and meters the daily cos action budget (pausing when exhausted — every draft render is one budget-gated action, since a comic is many GPU jobs). The arc-verify and editorial loops are **bounded** and **pause for human review** when they can't converge (arc verification can surface fresh findings every pass) — the residual findings are persisted on the marker. Draft renders are fire-and-forget proof-quality jobs whose in-flight job ids are persisted onto each cover/page slot (so a resumed run never re-renders an already-queued slot). Boot recovery demotes a marker stuck at `running` to `paused`. With opt-in `fileGaps`, capability/quality gaps the run can't resolve on its own — an unparseable script, a failing render, a stalled verify/editorial gate, a run-ending error — are filed as **deduped CoS tasks** (scoped to the pipeline app) so they're tracked rather than silently swallowed. The per-issue script gate runs two checks: a structural parse gate (does the script become pages/panels) and a craft-level LLM verify (`pipeline-script-verify` — un-renderable panels, panel-to-panel flow, dialogue/art balance, within-issue continuity, page-turn placement); the craft gate is advisory (surfaces + files blocking findings without hard-pausing, since the gating quality pass is the series-level editorial review). Before any visual production it also runs a **canon descriptive-integrity gate**: every canon noun (character/place/object) that appears where it would be *drawn* — the comic-script panel descriptions, not prose narration — must have a description, or the run **pauses for human review** (an artist can't render a name). The visual-source distinction is deliberate: an off-page character named only in narration is never drawn, so it's a Nouns-stage quality note, not a production blocker. The same check is exposed for the pipeline UI via `GET /api/pipeline/issues/:id/canon-readiness` and `GET /api/pipeline/series/:id/canon-readiness` (read-only, deterministic — reuses the committed canon name-matchers and `getSeriesCanon`). The whole feature is surfaced in the UI by an **Autonomous mode panel** on the series page (`AutopilotPanel`): a Run/Resume button with a run-options popover (draft visuals, file-gaps), live SSE step progress (with the dry-run plan when the cos domain is in dry-run), a Stop control, a paused/done/error banner driven by the persisted marker that lists the residual findings, and a one-click "production readiness" canon check that links each undescribed drawn noun to its issue's Nouns stage. (`server/services/pipeline/seriesAutopilot.js`, `server/services/pipeline/scriptVerify.js`, `server/services/pipeline/canonReadiness.js`, `server/routes/pipeline/canon.js`, `data.reference/prompts/stages/pipeline-script-verify.md`, `scripts/migrations/090-script-verify-stage.js`, `server/routes/pipeline/autopilot.js`, `server/routes/pipeline/index.js`, `server/services/pipeline/series.js`, `server/index.js`, `client/src/components/pipeline/AutopilotPanel.jsx`, `client/src/pages/PipelineSeries.jsx`, `client/src/services/apiPipeline.js`)- **"Describe from prose" button on the Nouns stage backfills missing descriptions — and flags the nouns the manuscript can't describe.** Extracted nouns (characters/places/objects) often land with a name but no description, so a generated reference image has nothing to work from but the name. The new button writes a description for every undescribed noun that appears in the issue, using **only** what the prose actually establishes — and, crucially, it does **not** invent. This is the inverse of "Extract from prose" (which commits opinionated, renderable choices when the prose is silent so it never leaves a blank): a noun the manuscript names but never describes comes back graded `none` and stays blank, surfacing in a persistent red-flag banner ("The manuscript is thin on description for N nouns…") rather than being papered over with a fabricated look. Nouns the prose describes only in passing are graded `thin` (the grounded fragment is filled, with a note on what's missing). Strictly prose-grounded descriptions double as a manuscript-quality check: if the story can't describe its own people and places, that's a signal the prose needs enriching, not the bible. Fills only empty, unlocked entries (never clobbers an existing description or a locked one), re-reads freshest state at write time, and persists the gap report on the prose stage so the banner survives reload. Driven by a new strictly-grounded `pipeline-canon-describe-from-prose` stage prompt. (`data.reference/prompts/stages/pipeline-canon-describe-from-prose.md`, `scripts/migrations/089-canon-describe-from-prose-stage.js`, `server/services/universeCanon.js`, `server/routes/pipeline/issues.js`, `server/services/pipeline/issues.js`, `client/src/services/apiPipeline.js`, `client/src/components/pipeline/stages/NounsStage.jsx`)diff --cc client/src/App.jsxindex 9abea991c6,70f460ddd7..f3edba9fac--- a/client/src/App.jsx+++ b/client/src/App.jsx@@@ -91,7 -91,7 +91,8 @@@ const Importer = lazyWithReload(() => iconst StoryBuilder = lazyWithReload(() => import('./pages/StoryBuilder'));const PipelineSeries = lazyWithReload(() => import('./pages/PipelineSeries'));const PipelineSeriesRoadmap = lazyWithReload(() => import('./pages/PipelineSeriesRoadmap'));+const PipelineEditorialChecks = lazyWithReload(() => import('./pages/PipelineEditorialChecks'));+ const PipelineReverseOutline = lazyWithReload(() => import('./pages/PipelineReverseOutline'));const PipelineManuscriptEditor = lazyWithReload(() => import('./pages/PipelineManuscriptEditor'));const PipelineIssue = lazyWithReload(() => import('./pages/PipelineIssue'));const Login = lazyWithReload(() => import('./pages/Login'));@@@ -310,9 -310,9 +311,10 @@@ export default function App()<Route path="story-builder/:storyId/:step" element={<StoryBuilder />} /><Route path="authors" element={<Authors />} /><Route path="pipeline" element={<Pipeline />} />+ <Route path="pipeline/editorial-checks" element={<PipelineEditorialChecks />} /><Route path="pipeline/series/:seriesId" element={<PipelineSeries />} /><Route path="pipeline/series/:seriesId/roadmap" element={<PipelineSeriesRoadmap />} />+ <Route path="pipeline/series/:seriesId/reverse-outline" element={<PipelineReverseOutline />} />{/* Splat (not a :param route) so navigating between issues reuses thesame component instance instead of remounting + refetching. */}<Route path="pipeline/series/:seriesId/manuscript/*" element={<PipelineManuscriptEditor />} />diff --cc client/src/services/apiPipeline.jsindex 2c41095d5e,47219e9a33..c1da1e27a2--- a/client/src/services/apiPipeline.js+++ b/client/src/services/apiPipeline.js@@@ -595,47 -595,33 +595,74 @@@ export const getSeriesEditorialStatusexport const pipelineEditorialSseUrl = (seriesId) =>`/api/pipeline/series/${encodeURIComponent(seriesId)}/editorial/analyze/progress`;+// ---- Editorial checks (#1284 registry-driven review) ----+// The full check catalog merged with persisted enable/config state:+// { checks: [{ id, label, description, scope, kind, category, severityDefault,+// enabled, config, configFields }] }. The catalog is GLOBAL (settings-+// backed); only the run + findings are series-scoped.+export const getEditorialChecks = (options = {}) =>+ request('/pipeline/editorial/checks', options);++// Enable/disable a check or update its config. `patch` is { enabled?, config? };+// `config` is validated against the check's own schema server-side. Returns the+// updated resolved-state row. Pass { silent: true } when you own the error UI.+export const patchEditorialCheck = (checkId, patch, options = {}) =>+ request(`/pipeline/editorial/checks/${encodeURIComponent(checkId)}`, {+ method: 'PATCH',+ body: JSON.stringify(patch),+ ...options,+ });++// Start a series-wide checks run (or a named subset). { runId, alreadyRunning,+// sseUrl } — subscribe via editorialChecksRunSseUrl, then re-fetch the manuscript+// review on `complete` (the runner seeds findings into the review store).+export const startEditorialChecksRun = (seriesId, opts = {}, options = {}) =>+ request(`/pipeline/series/${encodeURIComponent(seriesId)}/editorial/checks/run`, {+ method: 'POST',+ body: JSON.stringify(opts),+ ...options,+ });++// { active: boolean } — lets a (re)mounting view re-attach to an in-flight run.+export const getEditorialChecksRunStatus = (seriesId, options = {}) =>+ request(`/pipeline/series/${encodeURIComponent(seriesId)}/editorial/checks/run/status`, options);++export const cancelEditorialChecksRun = (seriesId, options = {}) =>+ request(`/pipeline/series/${encodeURIComponent(seriesId)}/editorial/checks/run/cancel`, {+ method: 'POST',+ ...options,+ });++export const editorialChecksRunSseUrl = (seriesId) =>+ `/api/pipeline/series/${encodeURIComponent(seriesId)}/editorial/checks/run/progress`;++ // ---- Reverse Outline (scene segmentation + plotline tagging) ----+ // The stored outline: { plotlines, scenes, stale, status }. `status:'none'`+ // when never generated, `'no-content'` shell while nothing is drafted yet.+ export const getReverseOutline = (seriesId, options = {}) =>+ request(`/pipeline/series/${encodeURIComponent(seriesId)}/reverse-outline`, options);++ // Kick off a (re)generation. { runId, alreadyRunning, sseUrl } — subscribe via+ // pipelineReverseOutlineSseUrl to stream progress, then re-fetch on `complete`.+ export const generateReverseOutline = (seriesId, opts = {}, options = {}) =>+ request(`/pipeline/series/${encodeURIComponent(seriesId)}/reverse-outline/generate`, {+ method: 'POST',+ body: JSON.stringify(opts),+ ...options,+ });++ export const cancelReverseOutline = (seriesId) =>+ request(`/pipeline/series/${encodeURIComponent(seriesId)}/reverse-outline/generate/cancel`, {+ method: 'POST',+ });++ // { active: boolean } — lets a (re)mounting view re-attach to an in-flight run.+ export const getReverseOutlineStatus = (seriesId, options = {}) =>+ request(`/pipeline/series/${encodeURIComponent(seriesId)}/reverse-outline/generate/status`, options);++ export const pipelineReverseOutlineSseUrl = (seriesId) =>+ `/api/pipeline/series/${encodeURIComponent(seriesId)}/reverse-outline/generate/progress`;+// ---- Series Autopilot (full autonomous mode) ----// Drives a series from its current state to story-ready (+ draft visuals) by// composing every pipeline pass. SSE-backed; gated on the cos autonomy domain