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 claim/issue-1314
Adam Eivy92b2c01dcca5
diff --cc .changelog/NEXT.mdindex a388617590,b19cb60594..701a983dd2--- a/.changelog/NEXT.md+++ b/.changelog/NEXT.md@@@ -1,10 -1,20 +1,21 @@@# Next Release+ ## Fixed++ - **[issue-1469] Editorial storyboard-continuity + comic-lettering checks now see every issue in a series, not just the first 1000.** Both issue-derived editorial sources — `collectStoryboardScenes` (storyboard.shots, #1315) and `projectComicLetteringContent` (comicScript, #1313) — fed off `listIssues({ seriesId })`, which caps at `ISSUES_PER_RESPONSE_MAX` (1000) even unpaginated. For a series with more than 1000 issues, every storyboard scene / comic page past the 1000th was silently skipped — a coverage gap on both the run path and the `getReviewWithStaleness` re-fingerprint path. A new uncapped `listIssuesForSeries(seriesId)` (the per-series sibling of `listAllIssues`/`listIssueIds`, sorted by issue number) now backs both paths, and the run-path fetch is gated on an enabled storyboard.shots/comicScript check exactly like the staleness path already was — so a run with neither check enabled pays no issue-fetch I/O. Regression-tested with a 1001-issue fixture whose offending scene rides the last issue. (`server/services/pipeline/issues.js`, `server/services/pipeline/editorial/checkRunner.js`, Part of #1283, #1469)++ - **[issue-1459] Editorial LLM checks now guarantee a manuscript budget floor, so a large reverse outline can't starve the manuscript chunk to empty.** The manuscript-consuming editorial checks re-send a fixed context block (the reverse-outline scene map, character arcs, plotline coverage, style-guide expectations, …) on every chunk, counted as `overheadTokens`. On a provider with a small or fallback context window **and** a large reverse outline (many scenes → a large scene map), that overhead could meet or exceed the usable input budget — `planManuscriptPass` then returned `usableChars = 0` and the chunker sliced every manuscript chunk to `''`, so a default-enabled check silently ran on **no prose**. A check now declares its trimmable context as a `context: { varName }` map (instead of baking it into `overheadTokens`); the runner reserves a minimum manuscript budget (`MANUSCRIPT_FLOOR_TOKENS`) and, when the context would push the manuscript below that floor, **trims the context block** (largest first, so the unbounded scene map absorbs the cut while bounded blocks survive) and feeds the model the same trimmed block it was budgeted for — rather than overflowing the window or reviewing an empty manuscript. The floor decision lives centrally in `contextBudget.js` (`fitContextToManuscriptFloor`/`capContextOverhead`/`trimContextToBudget`), so every manuscript+context check benefits. Unit-tested end-to-end: a tiny window + a 400-scene outline still yields a non-empty manuscript chunk. (`server/lib/contextBudget.js`, `server/services/pipeline/editorial/checkRunner.js`, `server/lib/editorial/checkRegistry.js`, #1459)+## Added- - **[issue-1314] Editorial checks for comic pacing — splash usage, panel rhythm, and page-turn beat placement.** Two new checks (Create → Editorial Checks) read each issue's parsed comic script (page → panel breakdown), not the prose manuscript. **Comic panel rhythm & splash usage** is deterministic: it flags **splash overuse** (too high a share of full-page splashes), **back-to-back splash runs** (consecutive full-page splashes that read as a slideshow and burn the page budget), **overcrowded pages** (too many panels cramped onto one page), and **grid monotony** (the same multi-panel count repeated page after page) — all threshold-configurable (max panels/page, splash-overuse ratio, monotony run length). **Comic page-turn beat placement** is LLM-judged: because a printed comic is read in two-page spreads, a reveal or cliffhanger on a page the reader has already been looking at across the open spread is spoiled before they reach it — a big reveal should land on the *first page after a page turn*. It reads each issue's recto/verso spread layout (including the caption/dialogue/SFX text of each panel, so a reveal delivered in a line — not just the art — is visible to the model) and flags reveals exposed early, reconciling against the authored reader-map reveals/cliffhangers and suggesting which panel to move. Both checks reuse the parsed comic pages the lettering check (#1313) already derives from each issue (no extra parse), and each declares a precise staleness source so findings only re-stale when the content that check actually read changes: panel-rhythm reads per-page panel **counts** (`comicScript.layout`), so a text-only edit that leaves the layout intact never stales it; page-turn additionally reads each panel's visual **description** + text (`comicScript.pacing`), so a description edit re-stales it without touching a lettering finding (and vice-versa). The pure scanners live in `server/lib/editorial/comicPacing.js` (no new deps); the page-turn stage prompt (`pipeline-editorial-comic-page-turn`) migrates for existing installs (117). (`server/lib/editorial/{comicPacing,checkRegistry}.js`, `server/services/pipeline/editorial/checkRunner.js`, `scripts/migrations/117-editorial-comic-page-turn-stage.js`, #1314)++- **[issue-1314] Editorial checks for comic pacing — splash usage, panel rhythm, and page-turn beat placement.** Two new checks (Create → Editorial Checks) read each issue's parsed comic script (page → panel breakdown), not the prose manuscript. **Comic panel rhythm & splash usage** is deterministic: it flags **splash overuse** (too high a share of full-page splashes), **back-to-back splash runs** (consecutive full-page splashes that read as a slideshow and burn the page budget), **overcrowded pages** (too many panels cramped onto one page), and **grid monotony** (the same multi-panel count repeated page after page) — all threshold-configurable (max panels/page, splash-overuse ratio, monotony run length). **Comic page-turn beat placement** is LLM-judged: because a printed comic is read in two-page spreads, a reveal or cliffhanger on a page the reader has already been looking at across the open spread is spoiled before they reach it — a big reveal should land on the *first page after a page turn*. It reads each issue's recto/verso spread layout (including the caption/dialogue/SFX text of each panel, so a reveal delivered in a line — not just the art — is visible to the model) and flags reveals exposed early, reconciling against the authored reader-map reveals/cliffhangers and suggesting which panel to move. Both checks reuse the parsed comic pages the lettering check (#1313) already derives from each issue (no extra parse), and each declares a precise staleness source so findings only re-stale when the content that check actually read changes: panel-rhythm reads per-page panel **counts** (`comicScript.layout`), so a text-only edit that leaves the layout intact never stales it; page-turn additionally reads each panel's visual **description** + text (`comicScript.pacing`), so a description edit re-stales it without touching a lettering finding (and vice-versa). The pure scanners live in `server/lib/editorial/comicPacing.js` (no new deps); the page-turn stage prompt (`pipeline-editorial-comic-page-turn`) migrates for existing installs (119). (`server/lib/editorial/{comicPacing,checkRegistry}.js`, `server/services/pipeline/editorial/checkRunner.js`, `scripts/migrations/119-editorial-comic-page-turn-stage.js`, #1314)+ - **[issue-1455] Mood board cross-surface integration — "Pin to mood board" everywhere media appears, plus a reference strip in creation flows.** Follow-up to the Mood Boards core canvas (#911), wiring boards into the rest of the Create suite. **(1) Pin affordance** — every generated image/video card and the media lightbox now carries a **Pin to mood board** button (the grid-icon sibling of "Add to collection"), so you can pin from Image Gen, Video Gen, Media History, Catalog media, and inside a collection through one shared control. The popover lists your boards, toggles membership (pin/unpin), and creates-and-pins a new board inline — pinning stores the asset's `<kind>:<ref>` media-key plus its preview thumbnail as the board item's `imageUrl`, so a *video* pin renders a frame even though a `video:` key has no derivable thumbnail path. **(2) Creation-flow reference strip** — a collapsible **Mood board reference** strip now appears in the New Series form (Series Pipeline) and the Universe Builder's Starter-idea panel: pick one of your boards and its pinned reference images show inline, so collected inspiration is visible at the moment you're describing a new universe / series (it remembers the last board per flow). The pin popover reuses the existing collection-picker shell (generalized to accept an injectable data source rather than duplicating the positioning/search/create plumbing), and the board-item image resolver is now a shared `moodBoardItemSrc` helper. (`client/src/components/media/{PinToMoodBoardMenu,CollectionPickerShell,MediaCard,MediaLightbox}.jsx`, `client/src/components/moodBoard/MoodBoardReferenceStrip.jsx`, `client/src/lib/moodBoardItemSrc.js`, `client/src/pages/{Pipeline,UniverseBuilder,MoodBoardDetail}.jsx`, #1455)- **[issue-1408] LoRA training quality-of-life: vision-assisted reference-sheet slicing, caption with Claude/Codex CLI providers, and a richer training queue.** Three improvements to building character LoRAs (Create → LoRA Training). **(1) Smarter sheet slicing** — "Slice reference sheet" now offers *Auto-detect figures with a vision model*, which asks a vision model to draw a tight box around each figure on the turnaround and crops those instead of a rigid grid; it falls back to the columns×rows grid automatically when no vision model is installed or detection finds nothing, so you still get crops to prune either way. **(2) Caption with a CLI model** — the caption-model picker now also lists vision-capable CLI providers (Codex / Claude Code), so you can auto-caption a dataset with `codex` or `claude` (vision) rather than only a local LM Studio / Ollama vision model. **(3) Training queue at a glance** — the new Training queue on the LoRA Training page shows each run's loss curve (a sparkline over its checkpoints) and sample thumbnails right in the row, so you can watch a run learn — and spot a divergence — without opening it. (Part of #1227, #1408)+ - **[issue-1466] Editorial check flags storyboard eyeline-match breaks — the LLM-assisted sibling of the deterministic shot-continuity check.** A new **Storyboard eyeline match (gaze continuity)** LLM check (Create → Editorial Checks) reads a scene's per-issue storyboard shots and flags the eyeline mistakes a deterministic scan can't compute: two characters in conversation whose **gaze directions don't reciprocate** across the cut (both look the same way instead of toward each other), a **described eyeline that contradicts the shot's tagged screen direction** (the storyboard's own two signals disagree), and a **reverse-angle that doesn't flip the eyeline**. Where the deterministic **Storyboard shot continuity** check (#1315) reasons over the structured `shotType`/`screenDirection`/continuity-link fields for 180°-rule axis reversals and shot-type monotony, an eyeline match needs *semantic* reading of the free-text shot descriptions — so this one runs an LLM over a compact per-scene shot block (id, framing, direction, continuity link, description), built only from scenes that have two-or-more described shots to compare. Findings render as `Continuity` notes anchored to the offending shot pair + issue. Gaze is read from the free-text shot description (the `screen direction` field records where a subject *faces or moves*, which isn't always where they look), and the pass is bounded four ways (scene count, shots-per-scene, a hard total-character ceiling, and per-shot description length) with non-silent omission/truncation markers so a very large storyboard — wide, deep, or with one pathological scene — can't overflow the model context. The check skips the model call entirely when no scene qualifies. Ships a new stage prompt (`pipeline-editorial-eyeline-match`) that migrates for existing installs (117). (`server/lib/editorial/shotContinuity.js`, `server/lib/editorial/checkRegistry.js`, `data.reference/prompts/stages/pipeline-editorial-eyeline-match.md`, `scripts/migrations/117-editorial-eyeline-match-stage.js`, Part of #1283, #1466)+ - **[issue-1467] Editorial check flags storyboard appearance / prop continuity — the LLM diff the name-matching shot parser can't do.** A new **Storyboard appearance / prop continuity** LLM check (Create → Editorial Checks) reads a scene's per-issue storyboard shots and diffs the *descriptions* of the same entity across shots, catching the continuity errors a vocabulary scan can't: the same named character described with **conflicting wardrobe / hair / physical state** (a "red jacket" in shot 1, a "grey coat" in shot 3, with no costume change described), a **prop that appears, vanishes, or transforms** with no action removing it (a coffee cup that pops in and out; a "mug" that becomes a "glass"), and a **setting whose weather / time-of-day / layout contradicts** across shots with no transition. Where the deterministic **Storyboard shot continuity** check (#1315) reasons over structured framing/direction fields and its eyeline sibling (#1466) judges gaze reciprocity, this one needs *semantic* comparison of two free-text descriptions — the shot parser matches characters by name but never diffs what they look like — so it runs an LLM over the same compact per-scene shot block (shared `summarizeStoryboardShots`, built only from scenes with two-or-more described shots, bounded four ways with non-silent truncation markers). Findings render as `Continuity` notes anchored to the offending shot pair + issue; deliberate changes the description justifies, single-shot details, and pure framing differences are explicitly not flagged. The check skips the model call entirely when no scene qualifies. Ships a new stage prompt (`pipeline-editorial-appearance-continuity`) that migrates for existing installs (118). (`server/lib/editorial/checkRegistry.js`, `data.reference/prompts/stages/pipeline-editorial-appearance-continuity.md`, `scripts/migrations/118-editorial-appearance-continuity-stage.js`, Part of #1283, #1467)- **[issue-1412] Editorial check classifies unmodeled proper nouns used as character names — the LLM-assisted half of roster economy.** A new **Unmodeled proper nouns used as character names** LLM check (Create → Editorial Checks) closes the gap the deterministic **roster economy** check (#1292) deliberately left open: that scan only sees canon names + aliases, so a proper noun used as an *apparent* character name that was never added to the story bible is invisible to it. This check surfaces those — and **classifies** each one, because a keyword scan can't tell a person from a place, organization, brand, or honorific. It reads the stitched manuscript plus your canon roster (names + aliases) as an exclusion list, flags capitalized proper nouns used as character names that are **absent from canon**, and calls out **throwaway one-appearance names** the reader is told to remember but who never recur — suggesting either adding them to canon or recasting them as an unnamed description. Unlike roster economy it runs even on an **empty bible** (then every named proper noun is a candidate). The LLM does only the judgment it alone can — surface a name and confirm it's a *person* — while a **deterministic pass counts each surfaced name's appearances across the whole manuscript and authors the verdict** (one-appearance throwaway vs recurring), so a long book reviewed in chunks never mislabels a name that appears in chapters 1 and 12 as a throwaway (and the same name surfaced from two chunks collapses to one finding). Findings render as `Casting` notes anchored to the issue + a verbatim quote. Ships a new stage prompt (`pipeline-editorial-unmodeled-names`) that migrates for existing installs (116). (`server/lib/editorial/checkRegistry.js`, `data.reference/prompts/stages/pipeline-editorial-unmodeled-names.md`, `scripts/migrations/116-editorial-unmodeled-names-stage.js`, Part of #1283, #1412)+ - **The Local LLM Playground now shows which Ollama models are warm in memory (and which one is processing).** The models sidebar reads Ollama's `/api/ps` (the same loaded-model probe the Memory Management panel uses) and flags each resident model with a green **In memory** badge carrying its VRAM footprint, plus a relative **"frees in Nm"** countdown until Ollama auto-evicts it. While a run is in flight, the model(s) it's driving show a **Processing** badge with a live spinner — derived from the playground's own in-flight run since `/api/ps` reports residency but not which model is mid-generation. A header chip summarizes **"N in memory"** at a glance. The loaded list polls every 6s (2s while busy) and refreshes on the manual refresh button. (`client/src/pages/LocalLlmPlayground.jsx`)+- **[issue-1317] Editorial check flags theme-coherence problems — themes stated but never dramatized, dropped after the opening, or unpaid at the climax (plus emergent-theme detection).** A new **Theme coherence / thematic throughline** LLM check (Create → Editorial Checks) asks whether the manuscript actually *delivers* the themes the story arc declares (`series.arc.themes`), not just names them. For each declared theme it builds a setup → complication → payoff coverage map and flags a theme that is **stated but never dramatized** through a character's choices or the central conflict, a theme that is **dropped** after the opening, and a climax that **resolves the plot but never lands the thematic argument** the setup promised. It also detects a strong **emergent theme** the story is really telling that isn't in the declared list — offering to add it (or reconciling it when the story drifts into a competing argument). It reads your reverse-outline scene segmentation as context so it can attribute a theme's setup/payoff to a scene + issue, and **degrades gracefully** — no authored themes ⇒ it works from the prose alone to surface emergent themes; no outline ⇒ it scans the whole manuscript. Whole-arc judgments (a dropped theme, an unpaid climax) are deferred until it has seen the final chunk, and cross-chunk findings + clean-setup digests keep a long book reviewed in pieces from false-flagging a theme whose payoff lands later. Findings render as `Theme` notes anchored to the issue + a verbatim quote. Ships a new stage prompt (`pipeline-editorial-theme-coherence`) that migrates for existing installs (115). (`server/lib/editorial/checkRegistry.js`, `server/services/pipeline/editorial/checkRunner.js`, `data.reference/prompts/stages/pipeline-editorial-theme-coherence.md`, `scripts/migrations/115-editorial-theme-coherence-stage.js`, Part of #1283, #1317)- **[issue-1316] Editorial health score + revision-trend tracking — *manage* the draft, not just receive findings.** A new **Editorial Health** panel (Create → Editorial Checks, alongside the findings triage) turns the point-in-time manuscript-review findings into a metric you can steer by. A transparent, deterministic **health score** (0–100, per series with a per-issue drill-down) is computed from the OPEN findings weighted by severity — `100 − Σ weight(severity)` with published weights (high 12 / medium 5 / low 1), so it's never a black box; accepted (fixed) and dismissed (waived) findings cost nothing. A **revision-trend ledger** snapshots the open-finding counts (by severity + category) on each editorial-checks / completeness run — the run is the revision boundary — so the panel renders a **score sparkline** across revisions, the most-recent-revision **delta**, and per-category **regressions** (a category that got *worse* after an edit pass). A configurable **readiness gate** ("no open high findings" by default, or the stricter "no high or medium", or "none") is the convergence signal the UI shows as **Ready / Not ready** *and* that the **autopilot editorial loop** now reads as a final gate (`editorialHealthGate`): after both editorial passes seed their findings, autopilot pauses with the residual blockers if the manuscript isn't clean — catching a blocker the registry checks surface *after* the completeness loop converged. The trend ledger is install-local telemetry (`data/pipeline-editorial-health/{seriesId}.json`, not synced); the score/readiness are derived live from the synced review. Scoring is pure + unit-tested. (`server/services/pipeline/editorialScore.js`, `server/routes/pipeline/editorial.js`, `server/services/pipeline/{editorial/checkRunner,manuscriptCompletenessRunner,seriesAutopilot}.js`, `client/src/components/pipeline/editorial/EditorialHealthPanel.jsx`, `client/src/lib/editorialHealth.js`, Part of #1283, #1316)diff --cc scripts/migrations/119-editorial-comic-page-turn-stage.jsindex d732a39b7d,0000000000..d732a39b7dmode 100644,000000..100644--- a/scripts/migrations/119-editorial-comic-page-turn-stage.js+++ b/scripts/migrations/119-editorial-comic-page-turn-stage.jsdiff --cc scripts/migrations/119-editorial-comic-page-turn-stage.test.jsindex f86441ffa0,0000000000..1868a1f502mode 100644,000000..100644--- a/scripts/migrations/119-editorial-comic-page-turn-stage.test.js+++ b/scripts/migrations/119-editorial-comic-page-turn-stage.test.js@@@ -1,86 -1,0 +1,86 @@@+import { describe, it, expect, beforeEach, afterEach } from 'vitest';+import { mkdtempSync, rmSync, mkdirSync, writeFileSync, readFileSync, existsSync } from 'fs';+import { tmpdir } from 'os';+import { join, dirname } from 'path';+import { fileURLToPath } from 'url';+- import migration from './117-editorial-comic-page-turn-stage.js';++import migration from './119-editorial-comic-page-turn-stage.js';++// scripts/migrations/<this> → ../.. is the repo root (matches _testHelpers.js).+const repoRoot = join(dirname(fileURLToPath(import.meta.url)), '..', '..');+- // First-shipment seed migration (mirrors 110–116) — no MD5 bookkeeping, so the++// First-shipment seed migration (mirrors 110–118) — no MD5 bookkeeping, so the+// seed / no-clobber behavior is asserted directly.++const FILENAME = 'pipeline-editorial-comic-page-turn.md';+const STAGE_KEY = 'pipeline-editorial-comic-page-turn';+const BODY = '# Comic page-turn beats\n\nshipped body\n';+- describe('migration 117 — seed editorial-comic-page-turn stage', () => {++describe('migration 119 — seed editorial-comic-page-turn stage', () => {+ let rootDir;+ let stagesDir;+ let refStagesDir;+ let installedConfigPath;++ const seedReference = ({ withConfig = true } = {}) => {+ writeFileSync(join(refStagesDir, FILENAME), BODY);+ if (withConfig) {+ const refConfigPath = join(rootDir, 'data.reference', 'prompts', 'stage-config.json');+ writeFileSync(+ refConfigPath,+ JSON.stringify({ stages: { [STAGE_KEY]: { name: STAGE_KEY, description: 'desc', model: 'default', returnsJson: true, variables: [] } } }, null, 2) + '\n',+ );+ }+ };++ beforeEach(() => {- rootDir = mkdtempSync(join(tmpdir(), 'migration-117-'));++ rootDir = mkdtempSync(join(tmpdir(), 'migration-119-'));+ stagesDir = join(rootDir, 'data', 'prompts', 'stages');+ refStagesDir = join(rootDir, 'data.reference', 'prompts', 'stages');+ installedConfigPath = join(rootDir, 'data', 'prompts', 'stage-config.json');+ mkdirSync(stagesDir, { recursive: true });+ mkdirSync(refStagesDir, { recursive: true });+ });++ afterEach(() => {+ rmSync(rootDir, { recursive: true, force: true });+ });++ it('seeds the .md template and merges the stage-config entry on a fresh install', async () => {+ seedReference();+ await expect(migration.up({ rootDir })).resolves.not.toThrow();+ expect(readFileSync(join(stagesDir, FILENAME), 'utf8')).toBe(BODY);+ const installed = JSON.parse(readFileSync(installedConfigPath, 'utf8'));+ expect(installed.stages[STAGE_KEY]).toMatchObject({ returnsJson: true });+ });++ it('is idempotent and never clobbers a customized .md or an existing stage-config entry', async () => {+ seedReference();+ const customBody = '# CUSTOMIZED — do not overwrite\n';+ writeFileSync(join(stagesDir, FILENAME), customBody);+ writeFileSync(+ installedConfigPath,+ JSON.stringify({ stages: { [STAGE_KEY]: { name: 'user-tuned', model: 'custom' } } }, null, 2) + '\n',+ );++ await migration.up({ rootDir });++ expect(readFileSync(join(stagesDir, FILENAME), 'utf8')).toBe(customBody);+ const installed = JSON.parse(readFileSync(installedConfigPath, 'utf8'));+ expect(installed.stages[STAGE_KEY]).toEqual({ name: 'user-tuned', model: 'custom' });+ });++ it('does not throw when the data.reference samples are missing', async () => {+ await expect(migration.up({ rootDir })).resolves.not.toThrow();+ expect(existsSync(join(stagesDir, FILENAME))).toBe(false);+ });++ it('matches the live shipped stage-config key + prompt file (drift catch)', () => {+ const refConfig = JSON.parse(+ readFileSync(join(repoRoot, 'data.reference', 'prompts', 'stage-config.json'), 'utf8'),+ );+ expect(refConfig.stages[STAGE_KEY], `stage-config missing ${STAGE_KEY}`).toBeTruthy();+ expect(refConfig.stages[STAGE_KEY].returnsJson).toBe(true);+ expect(existsSync(join(repoRoot, 'data.reference', 'prompts', 'stages', FILENAME))).toBe(true);+ });+});diff --cc server/lib/editorial/README.mdindex 2e0f02fcb6,2dd6a84940..f0582b2c1a--- a/server/lib/editorial/README.md+++ b/server/lib/editorial/README.md@@@ -132,8 -147,7 +147,8 @@@ runner-injected `ctx.callInlineLLM` (a| `italicThoughts.js` | Pure, dependency-free italic-thought primitive for `prose.italic-thoughts` (#1300): `findItalicThoughts` (multi-word markdown `*…*` / `_…_` italic runs, dedup + word-count threshold so single-word emphasis, bold, and `snake_case` are skipped). The LLM siblings (`opening.wrong-start`, `prose.mirror-description`, `dialogue.pleasantries`, `prose.kill-your-darlings`) handle the judgment cases in the #1300 anti-pattern bundle. || `proseTics.js` | Pure, dependency-free copy-edit prose-tic primitives for the #1306 line-edit group: `tokenizeWords` / `splitSentences` (shared tokenization), `findFilterWords` (`prose.filter-words`), `findCrutchWords` (`prose.crutch-words`), `findAdverbs` (`prose.adverbs` — `-ly` adverbs + dialogue-tag adverbs), `findPassiveVoice` (`prose.passive-voice` — be-verb + past-participle heuristic), `findGestures` (`prose.repeated-gestures` — gesture tally + body-part autonomy), plus the seed `FILTER_WORDS` / `CRUTCH_WORDS` / `GESTURE_WORDS` lists. The LLM sibling `prose.telling-emotion` handles the named-emotion judgment case. || `repetition.js` | Pure, dependency-free word-echo & rhythm primitives for #1306: `findWordEchoes` (`prose.word-echoes` — distinctive word repeated within a window), `findRepeatedOpeners` (runs of sentences sharing an opener, "He… He… He…"), and `measureSentenceRhythm` (`prose.sentence-rhythm` — sentence-length variation). Reuses `tokenizeWords` / `splitSentences` from `proseTics.js`. |+| `comicPacing.js` | Pure, dependency-free comic-pacing primitives for the #1314 comic-pacing group: `isSplashPage`, `comicSpreadLayout` (recto/verso + spread + `beginsSpread` page-turn map), `summarizeComicPages`, `analyzePanelRhythm` (`comic.panel-rhythm` — splash overuse / back-to-back splashes / overcrowded pages / grid monotony), `comicPageTurnSummary` + `authoredRevealSummary` (LLM-context renderers for `comic.page-turn-beats`). Operates on already-parsed comic pages (the runner parses each issue's stored comic script and injects them as the `comicScript` source) so the editorial dir stays import-pure. |- | `shotContinuity.js` | Pure, dependency-free storyboard shot-continuity primitives for the deterministic `visual.shot-continuity` check (#1315): `findAxisReversals` (180°-rule axis flips across a continuity-linked shot pair using `screenDirection`) and `findShotTypeMonotony` (a scene whose classified shots all share one `shotType`). Reads the shot-grammar fields from `server/lib/shotGrammar.js`. The judgment cases (eyeline match, appearance/prop continuity) are LLM-sibling follow-ups. |+ | `shotContinuity.js` | Pure, dependency-free storyboard shot-continuity primitives for the deterministic `visual.shot-continuity` check (#1315): `findAxisReversals` (180°-rule axis flips across a continuity-linked shot pair using `screenDirection`) and `findShotTypeMonotony` (a scene whose classified shots all share one `shotType`). Also `summarizeStoryboardShots` (#1466) — renders the collected `{ issueNumber, scene }` storyboard list into a compact per-scene shot block shared by the LLM siblings `visual.eyeline-match` (gaze reciprocity / eyeline-vs-screen-direction) and `visual.appearance-continuity` (#1467 — diffs the same entity's wardrobe/prop/setting descriptions across shots for contradictions). Reads the shot-grammar fields from `server/lib/shotGrammar.js`. || `dialogue.js` | Pure, dependency-free dialogue-tag primitives for the #1307 dialogue-craft group: `findSaidBookisms` (`dialogue.said-bookisms` — ornate speech tags like *expostulated*/*opined* and non-speech tags like "she smiled", matched only when adjacent to a double-quote span) and `findUnattributedDialogueRuns` (`dialogue.attribution-clarity` — runs of consecutive untagged/unbeated dialogue lines where the speaker can't be tracked), plus `attributeDialogueByOwner` (the coarse per-character dialogue-line tally behind `cast.representation-balance`'s dialogue-share signal, #1312 — credits each quoted paragraph to the first owner named in its beat) and the seed `SAID_BOOKISMS` / `NON_SPEECH_TAGS` lists. The LLM siblings `dialogue.on-the-nose` (subtext-free / "as you know, Bob" dialogue) and `dialogue.voice-distinctiveness` (per-character voice against canon `speechPattern`/`speechAccent`) handle the judgment cases. || `letteringDensity.js` | Pure, dependency-free comic lettering-density primitives for `comic.lettering-density` (#1313): `countWords`, `panelLetteringMetrics` (per-panel balloon/caption/SFX word + balloon tally over the `comicScriptParser` output), `analyzeComicLettering` (flags balloons/panels/pages over the configurable thresholds in `DEFAULT_LETTERING_THRESHOLDS`), `overflowSeverity` (severity scaled by how far over the limit), and `sanitizeLetteringThresholds`. Mirrored to `client/src/lib/letteringDensity.js` for the comic-script stage's inline warnings — keep the two in sync. || `index.js` | Barrel re-export of the above. |diff --cc server/lib/editorial/checkRegistry.jsindex f10011a9bb,c264afe352..6c771437b6--- a/server/lib/editorial/checkRegistry.js+++ b/server/lib/editorial/checkRegistry.js@@@ -48,12 -48,7 +48,12 @@@ importfindRepeatedOpeners,measureSentenceRhythm,} from './repetition.js';+import {+ analyzePanelRhythm,+ comicPageTurnSummary,+ authoredRevealSummary,+} from './comicPacing.js';- import { findAxisReversals, findShotTypeMonotony } from './shotContinuity.js';+ import { findAxisReversals, findShotTypeMonotony, summarizeStoryboardShots } from './shotContinuity.js';export const CHECK_SCOPES = Object.freeze(['series', 'issue', 'scene', 'noun']);export const CHECK_KINDS = Object.freeze(['deterministic', 'llm']);diff --cc server/services/pipeline/editorial/checkRunner.jsindex 1c1d5eff6b,b45b037137..9c3024b400--- a/server/services/pipeline/editorial/checkRunner.js+++ b/server/services/pipeline/editorial/checkRunner.js@@@ -331,6 -281,16 +331,21 @@@ export async function runEditorialCheck// Editorial-arc fetch is gated on the declared source (#1295) so a run with no// POV/arc check pays no extra snapshot I/O — mirrors the needsReverseOutline gate.const needsEditorialArcs = enabled.some(({ check }) => checkSources(check).includes('editorialArcs'));+ // Issues are fetched only when an enabled check declares an issue-derived source- // — storyboard.shots (#1315) or comicScript (#1313, served via the comic.lettering- // check's ctx.issues). Both projections feed off the same UNCAPPED per-series scan- // (#1469): listIssues caps at ISSUES_PER_RESPONSE_MAX (1000), silently skipping- // every storyboard scene / comic page past the 1000th issue. Mirrors the gate +- // fetch on the getReviewWithStaleness path below.++ // — storyboard.shots (#1315), comicScript (#1313, served via the comic.lettering++ // check's ctx.issues), or the comic-pacing tokens comicScript.pacing /++ // comicScript.layout (#1314, served via the same ctx.issues projection). All++ // projections feed off the same UNCAPPED per-series scan (#1469): listIssues caps++ // at ISSUES_PER_RESPONSE_MAX (1000), silently skipping every storyboard scene /++ // comic page past the 1000th issue. Mirrors the gate + fetch on the++ // getReviewWithStaleness path below.+ const needsIssues = enabled.some(({ check }) => {+ const sources = checkSources(check);- return sources.includes('storyboard.shots') || sources.includes('comicScript');++ return sources.includes('storyboard.shots')++ || sources.includes('comicScript')++ || sources.includes('comicScript.pacing')++ || sources.includes('comicScript.layout');+ });const [sections, canon, issues, outline, editorial] = await Promise.all([needsManuscript ? collectManuscriptSections(seriesId) : Promise.resolve([]),getSeriesCanon(series),diff --cc server/services/pipeline/editorial/checkRunner.test.jsindex b0fd1a2dd0,d54f8303d0..5c9d4b55e1--- a/server/services/pipeline/editorial/checkRunner.test.js+++ b/server/services/pipeline/editorial/checkRunner.test.js@@@ -80,7 -83,6 +83,7 @@@ const { getSeriesCanon } = await importconst { getSeries } = await import('../series.js');const { getSettings } = await import('../../settings.js');const { listChecks, getCheck } = await import('../../../lib/editorial/index.js');- const { listIssues } = await import('../issues.js');++const { listIssuesForSeries } = await import('../issues.js');// Build a `pipelineEditorialChecks.checks` map that disables every check// matching `predicate` — keeps these fixtures robust as the registry grows@@@ -102,7 -104,6 +105,7 @@@ beforeEach(() =>resolveStageContext.mockClear();collectManuscriptSections.mockClear();getSeriesCanon.mockClear();- listIssues.mockClear();++ listIssuesForSeries.mockClear();});describe('runEditorialChecks', () => {@@@ -150,31 -151,6 +153,31 @@@expect(collectManuscriptSections).toHaveBeenCalled();});+ it('feeds the comic-pacing checks off each issue\'s comic script (#1314)', async () => {+ // Issue 1 is two splash pages in a row — the deterministic comic.panel-rhythm+ // check flags the back-to-back splash run. Both comic checks read the same+ // parsed pages off ctx.issues via the shared comicLetteringIssues projection.+ issuesState = [- { number: 1, stages: { comicScript: { output: 'PAGE 1\nPANEL 1\nSplash.\nPAGE 2\nPANEL 1\nSplash again.' } } },- { number: 2, stages: { comicScript: { output: 'PAGE 1\nPANEL 1\nA.\nPANEL 2\nB.\nPANEL 3\nC.' } } },++ { id: 'i1', seriesId: 's1', number: 1, stages: { comicScript: { output: 'PAGE 1\nPANEL 1\nSplash.\nPAGE 2\nPANEL 1\nSplash again.' } } },++ { id: 'i2', seriesId: 's1', number: 2, stages: { comicScript: { output: 'PAGE 1\nPANEL 1\nA.\nPANEL 2\nB.\nPANEL 3\nC.' } } },+ ];+ const result = await runEditorialChecks('s1', { checkIds: ['comic.panel-rhythm'] });+ const comic = result.findings.filter((f) => f.checkId === 'comic.panel-rhythm');+ expect(comic.length).toBeGreaterThan(0);+ expect(comic.some((f) => f.issueNumber === 1)).toBe(true);+ expect(comic.every((f) => f.category === 'pacing')).toBe(true);+ });++ it('produces no comic-pacing findings when no comic-pacing check is enabled', async () => {+ issuesState = [+ { number: 1, stages: { comicScript: { output: 'PAGE 1\nPANEL 1\nSplash.' } } },+ ];+ // Only the naming check runs — its gate never reads comic content, so the+ // comic checks stay inert (no comic findings produced).+ const result = await runEditorialChecks('s1', { checkIds: ['naming.dissimilar-names'] });+ expect(result.findings.some((f) => f.checkId === 'comic.panel-rhythm')).toBe(false);+ });+it('skips disabled checks', async () => {// Disable every LLM check → no provider call, only deterministic findings.// The mock canon has no objects/links, so naming is the only producer.