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
feat([comic-script-generation-panel-hardening]): forbid page-level scene content, mandate discrete panels
[._.]/ Adam Eivy7007086853da
diff --git a/data.reference/prompts/stages/pipeline-comic-script.md b/data.reference/prompts/stages/pipeline-comic-script.mdindex f5b19da197..98fa9a427a 100644--- a/data.reference/prompts/stages/pipeline-comic-script.md+++ b/data.reference/prompts/stages/pipeline-comic-script.md@@ -88,6 +88,8 @@ Panel 2- **Target a {{lengthTargets.pageTarget}}-page single issue.** Pace the source material across exactly {{lengthTargets.pageTarget}} pages — inflate quiet beats with reaction shots, environmental panels, and silent panels if the source is thin; compress dense action across multiple pages with panel-to-panel motion if it is rich. Do not pad for padding's sake, but do not skip pages either.- Plan **4–6 panels per page on average**, with occasional 1-panel splashes for big reveals, double-page spreads (`Panel 1 (DPS)`) for major action, and the rare 7–8 panel grid for fast cuts.+- **NEVER put action, dialogue, or scene content in the page-level description.** Any text you place between a `## Page N` header and its first `Panel` is layout intent ONLY — **1–3 lines max** (e.g. "Six-panel grid, tight cuts" or "Full-page splash"), or omit it entirely. Every beat of action, every line of dialogue, every caption, and all scene content MUST live inside a `Panel N` block, never in the page header. A page whose content lands in the page-level description instead of panels is malformed and will not render.+- **Every page MUST contain 4–6 discrete `Panel N` blocks**, each carrying its own `Description:`, `Caption:`, `Dialogue:`, and `SFX:` fields (use `(none)` for an empty caption/SFX rather than dropping the field). The only exception is a deliberate splash — still written as a single `Panel 1` block with the four fields, not as loose page-level prose.- **Strong opening (Saga-style):** page 1 lands the reader inside a specific, sensory moment — a striking image plus one line of voice-over or arresting dialogue. No expository "previously on" walls. The first panel should be a hook the reader cannot put down. Page 1 is often a splash or near-splash.- **Cliffhanger / lead-in ending:** the final page (and ideally the final panel) must do one of: (a) reveal something that flips what we thought we knew, (b) deliver a cliffhanger — character in peril, decision unmade, antagonist arriving — or (c) plant the seed for the next issue with a clear "to be continued" pull. Never end on resolution alone.- Panel descriptions stay in **present tense** and describe only what's on the page.diff --git a/scripts/migrations/063-comic-script-panel-decomposition-prompt.js b/scripts/migrations/063-comic-script-panel-decomposition-prompt.jsnew file mode 100644index 0000000000..61c97c9b5e--- /dev/null+++ b/scripts/migrations/063-comic-script-panel-decomposition-prompt.js@@ -0,0 +1,48 @@+/**+ * Harden the comic-script prompt against content-in-page-description malformation.+ *+ * The `comic-structure` editorial-review category (migration 057) is a+ * *detection* layer — it catches pages where all the action/dialogue landed in+ * the page-level description instead of discrete panels. The root cause is the+ * generation prompt, which never explicitly forbade page-level scene content+ * nor mandated a per-page panel decomposition. This migration ships two new+ * rules in `pipeline-comic-script.md`:+ * (a) page-level text is layout intent ONLY (1–3 lines max), never action /+ * dialogue / scene content;+ * (b) every page MUST decompose into 4–6 discrete `Panel N` blocks carrying+ * Description / Caption / Dialogue / SFX.+ *+ * Strategy: hash-driven prompt-replace via `./_lib.js`. Idempotent.+ */++import { makePromptReplaceMigration } from './_lib.js';++export const ACCEPTED_OLD_MD5 = {+ 'pipeline-comic-script.md': ['dea7d497d1cb38e7574f236f4ff8e644'],+};++export const NEW_SHIPPED_MD5 = {+ 'pipeline-comic-script.md': '9fe2451b573fc60eb6c971e1b8808ef3',+};++const { applyMigration, up } = makePromptReplaceMigration({+ accepted: ACCEPTED_OLD_MD5,+ current: NEW_SHIPPED_MD5,+ label: 'comic-script panel-decomposition prompt',+ customizedHint: (filename) =>+ ` To add the panel-decomposition rules manually, diff:\n` ++ ` data.reference/prompts/stages/${filename}\n` ++ ` against your current:\n` ++ ` data/prompts/stages/${filename}\n` ++ ` and add the two rules forbidding page-level scene content and\n` ++ ` mandating 4–6 discrete Panel blocks per page.`,+ skipFooter: (count) =>+ `⚠️ ${count} comic-script prompt(s) could not be auto-updated because\n` ++ ` they were customized. Comic scripts still generate, but pages may\n` ++ ` keep landing all content in the page-level description instead of\n` ++ ` discrete panels until you merge the prompt change.\n` ++ ` See data.reference/prompts/stages/pipeline-comic-script.md.`,+});++export { applyMigration };+export default { up };diff --git a/scripts/migrations/063-comic-script-panel-decomposition-prompt.test.js b/scripts/migrations/063-comic-script-panel-decomposition-prompt.test.jsnew file mode 100644index 0000000000..ea573e5fb7--- /dev/null+++ b/scripts/migrations/063-comic-script-panel-decomposition-prompt.test.js@@ -0,0 +1,14 @@+import { describe } from 'vitest';++import { runPromptMigrationTests } from './_testHelpers.js';+import migration, { applyMigration, ACCEPTED_OLD_MD5, NEW_SHIPPED_MD5 } from './063-comic-script-panel-decomposition-prompt.js';++describe('migration 063 — comic-script panel-decomposition prompt', () => {+ runPromptMigrationTests({+ migration,+ applyMigration,+ ACCEPTED_OLD_MD5,+ NEW_SHIPPED_MD5,+ prefix: 'migration-063-',+ });+});