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

fix: require exact visible text in comic scripts

[._.]/ Adam Eivy573dd634534c
diff --git a/data.reference/prompts/stages/pipeline-comic-script.md b/data.reference/prompts/stages/pipeline-comic-script.md
index 0ab31e2fb2..2f3c6b9b11 100644
--- a/data.reference/prompts/stages/pipeline-comic-script.md
+++ b/data.reference/prompts/stages/pipeline-comic-script.md
@@ -90,6 +90,7 @@ Panel 2
- 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 decompose into discrete `Panel N` blocks** (how many follows the panel-count rule above — 4–6 on average, a single `Panel 1` for a splash, the rare 7–8 grid for fast cuts), each carrying its own `Description:`, `Caption:`, `Dialogue:`, and `SFX:` fields (use `(none)` for an empty caption/SFX rather than dropping the field). A page rendered as loose prose under the header instead of numbered panel blocks is malformed and will not render — even a splash is written as `Panel 1`, never as page-level prose.
+- **Visible in-world text must be exact.** If a panel shows readable text inside the art — a draft line, screen, sign, note, terminal, label, projected warning, highlighted sentence, erased line, etc. — quote the exact words in `Description:`. If a later panel highlights, changes, reacts to, or removes that same text, repeat the same wording or state precisely that those quoted words are no longer visible. Never refer to an unnamed "second line," "new line," "draft text," or similar text beat without specifying what the reader sees.
- **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/003-update-pipeline-stage-prompts.js b/scripts/migrations/003-update-pipeline-stage-prompts.js
index 746a7a593e..85643745ed 100644
--- a/scripts/migrations/003-update-pipeline-stage-prompts.js
+++ b/scripts/migrations/003-update-pipeline-stage-prompts.js
@@ -40,6 +40,8 @@ export const ACCEPTED_OLD_MD5 = {
'133d200d069c2e8173b7c129eea58f53', // post-027 / pre-054
'e530fc76b89cedaef848ad7ec99c934c', // post-054 / pre-054-fence
'dea7d497d1cb38e7574f236f4ff8e644', // post-054-fence / pre-063
+ 'e9ee70bf18888492edada6633cd9928a', // post-063 / pre-121
+ '7c05ecde539f04c9fa91e87543057204', // pre-121 reference body
],
'pipeline-tv-script.md': ['3f6fecc25573ed054b47db392250034a'],
'pipeline-season-episodes.md': [
@@ -51,7 +53,7 @@ export const ACCEPTED_OLD_MD5 = {
export const NEW_SHIPPED_MD5 = {
'pipeline-idea-expansion.md': 'c50f016639d41cd8244f5ff13429f997', // post-098 (ticking clock + {{.}} fixes)
'pipeline-prose.md': '84523d531eeafa60959c65c553b2563f', // post-054-fence
- 'pipeline-comic-script.md': 'e9ee70bf18888492edada6633cd9928a', // post-063
+ 'pipeline-comic-script.md': 'a4303016c34b65e4b0e641fe71252de3', // post-121 (visible text exactness)
'pipeline-tv-script.md': '376f779f4687b598f1c92ca4e770fd5a', // retired upstream (no data.reference)
'pipeline-season-episodes.md': '50c68a29c3ebc275db3095d06bd87100', // post-005
};
diff --git a/scripts/migrations/013-comic-script-back-cover.js b/scripts/migrations/013-comic-script-back-cover.js
index 0b9b3eae02..2f4d4ac1f1 100644
--- a/scripts/migrations/013-comic-script-back-cover.js
+++ b/scripts/migrations/013-comic-script-back-cover.js
@@ -21,11 +21,13 @@ export const ACCEPTED_OLD_MD5 = {
'133d200d069c2e8173b7c129eea58f53', // post-027 / pre-054
'e530fc76b89cedaef848ad7ec99c934c', // post-054 / pre-054-fence
'dea7d497d1cb38e7574f236f4ff8e644', // post-054-fence / pre-063
+ 'e9ee70bf18888492edada6633cd9928a', // post-063 / pre-121
+ '7c05ecde539f04c9fa91e87543057204', // pre-121 reference body
],
};
export const NEW_SHIPPED_MD5 = {
- 'pipeline-comic-script.md': 'e9ee70bf18888492edada6633cd9928a', // post-063
+ 'pipeline-comic-script.md': 'a4303016c34b65e4b0e641fe71252de3', // post-121 (visible text exactness)
};
const { applyMigration, up } = makePromptReplaceMigration({
diff --git a/scripts/migrations/027-text-stage-prompts-entities-summary.js b/scripts/migrations/027-text-stage-prompts-entities-summary.js
index ff3684bd3d..390ed913d2 100644
--- a/scripts/migrations/027-text-stage-prompts-entities-summary.js
+++ b/scripts/migrations/027-text-stage-prompts-entities-summary.js
@@ -56,6 +56,8 @@ export const ACCEPTED_OLD_MD5 = {
'133d200d069c2e8173b7c129eea58f53', // post-027 / pre-054
'e530fc76b89cedaef848ad7ec99c934c', // post-054 / pre-054-fence
'dea7d497d1cb38e7574f236f4ff8e644', // post-054-fence / pre-063
+ 'e9ee70bf18888492edada6633cd9928a', // post-063 / pre-121
+ '7c05ecde539f04c9fa91e87543057204', // pre-121 reference body
],
'universe-character-expand.md': [
'ef109eb8e12ddb664c11c790271b5139', // pre-027 shipped
@@ -65,7 +67,7 @@ export const ACCEPTED_OLD_MD5 = {
export const NEW_SHIPPED_MD5 = {
'pipeline-prose.md': '84523d531eeafa60959c65c553b2563f', // post-054-fence
'pipeline-teleplay.md': 'afa4215330bf856429d70d7e2f856605', // post-054-fence
- 'pipeline-comic-script.md': 'e9ee70bf18888492edada6633cd9928a', // post-063
+ 'pipeline-comic-script.md': 'a4303016c34b65e4b0e641fe71252de3', // post-121 (visible text exactness)
'universe-character-expand.md': '67b6e73ed47f318451a730088b4cff14',
};
diff --git a/scripts/migrations/054-source-agnostic-stage-prompts.js b/scripts/migrations/054-source-agnostic-stage-prompts.js
index 89175b03c2..1a41b8ada6 100644
--- a/scripts/migrations/054-source-agnostic-stage-prompts.js
+++ b/scripts/migrations/054-source-agnostic-stage-prompts.js
@@ -26,7 +26,7 @@ import { makePromptReplaceMigration } from './_lib.js';
export const ACCEPTED_OLD_MD5 = {
'pipeline-idea-expansion.md': ['1f3c5d077a5ef9a4b610335d5e3edd9c', 'b5c47c94ffc74637983c95761ab0c66c', '49a208628290543ba2607a5ed48fdc8c'],
'pipeline-prose.md': ['d1f8e3f1d214725b5aa67f309a81cd7d', 'bef1bc2767b78f585f2bd89f3d615130'],
- 'pipeline-comic-script.md': ['133d200d069c2e8173b7c129eea58f53', 'e530fc76b89cedaef848ad7ec99c934c', 'dea7d497d1cb38e7574f236f4ff8e644'],
+ 'pipeline-comic-script.md': ['133d200d069c2e8173b7c129eea58f53', 'e530fc76b89cedaef848ad7ec99c934c', 'dea7d497d1cb38e7574f236f4ff8e644', 'e9ee70bf18888492edada6633cd9928a', '7c05ecde539f04c9fa91e87543057204'],
'pipeline-teleplay.md': ['1280ef6b1ad68fa44070ca7478ec2a5f', '2568e14beaa574d43f8018a5def51d04'],
};
@@ -35,7 +35,7 @@ export const ACCEPTED_OLD_MD5 = {
export const NEW_SHIPPED_MD5 = {
'pipeline-idea-expansion.md': 'c50f016639d41cd8244f5ff13429f997', // post-098 (ticking clock + {{.}} fixes)
'pipeline-prose.md': '84523d531eeafa60959c65c553b2563f',
- 'pipeline-comic-script.md': 'e9ee70bf18888492edada6633cd9928a',
+ 'pipeline-comic-script.md': 'a4303016c34b65e4b0e641fe71252de3',
'pipeline-teleplay.md': 'afa4215330bf856429d70d7e2f856605',
};
diff --git a/scripts/migrations/063-comic-script-panel-decomposition-prompt.js b/scripts/migrations/063-comic-script-panel-decomposition-prompt.js
index f09be9cf10..06e03cce39 100644
--- a/scripts/migrations/063-comic-script-panel-decomposition-prompt.js
+++ b/scripts/migrations/063-comic-script-panel-decomposition-prompt.js
@@ -19,11 +19,15 @@
import { makePromptReplaceMigration } from './_lib.js';
export const ACCEPTED_OLD_MD5 = {
- 'pipeline-comic-script.md': ['dea7d497d1cb38e7574f236f4ff8e644'],
+ 'pipeline-comic-script.md': [
+ 'dea7d497d1cb38e7574f236f4ff8e644',
+ 'e9ee70bf18888492edada6633cd9928a', // post-063 / pre-121
+ '7c05ecde539f04c9fa91e87543057204', // pre-121 reference body
+ ],
};
export const NEW_SHIPPED_MD5 = {
- 'pipeline-comic-script.md': 'e9ee70bf18888492edada6633cd9928a',
+ 'pipeline-comic-script.md': 'a4303016c34b65e4b0e641fe71252de3',
};
const { applyMigration, up } = makePromptReplaceMigration({
diff --git a/scripts/migrations/121-comic-script-visible-text-prompt.js b/scripts/migrations/121-comic-script-visible-text-prompt.js
new file mode 100644
index 0000000000..ddf7bbe54a
--- /dev/null
+++ b/scripts/migrations/121-comic-script-visible-text-prompt.js
@@ -0,0 +1,46 @@
+/**
+ * Harden the comic-script prompt against unspecified visible in-world text.
+ *
+ * Series Autopilot's script-craft pass can catch a panel that says a second
+ * draft line appears/highlights/vanishes without specifying what the line says,
+ * but the generation prompt did not tell the model that readable text inside
+ * the art must be exact and stable across panels. This migration ships that
+ * rule so comic scripts give artists and letterers concrete text to draw.
+ *
+ * Strategy: hash-driven prompt-replace via `./_lib.js`. Idempotent.
+ */
+
+import { makePromptReplaceMigration } from './_lib.js';
+
+export const ACCEPTED_OLD_MD5 = {
+ 'pipeline-comic-script.md': [
+ 'e9ee70bf18888492edada6633cd9928a', // post-063 (panel decomposition)
+ '7c05ecde539f04c9fa91e87543057204', // pre-121 (current reference body)
+ ],
+};
+
+export const NEW_SHIPPED_MD5 = {
+ 'pipeline-comic-script.md': 'a4303016c34b65e4b0e641fe71252de3', // post-121 (visible text exactness)
+};
+
+const { applyMigration, up } = makePromptReplaceMigration({
+ accepted: ACCEPTED_OLD_MD5,
+ current: NEW_SHIPPED_MD5,
+ label: 'comic-script visible-text prompt',
+ customizedHint: (filename) =>
+ ` To add the visible-text exactness rule manually, diff:\n` +
+ ` data.reference/prompts/stages/${filename}\n` +
+ ` against your current:\n` +
+ ` data/prompts/stages/${filename}\n` +
+ ` and add the rule requiring exact quoted words for readable in-world\n` +
+ ` text that appears, highlights, changes, or vanishes across panels.`,
+ skipFooter: (count) =>
+ `⚠️ ${count} comic-script prompt(s) could not be auto-updated because\n` +
+ ` they were customized. Comic scripts still generate, but visible\n` +
+ ` in-world text may remain underspecified until you merge the prompt\n` +
+ ` change manually.\n` +
+ ` See data.reference/prompts/stages/pipeline-comic-script.md.`,
+});
+
+export { applyMigration };
+export default { up };
diff --git a/scripts/migrations/121-comic-script-visible-text-prompt.test.js b/scripts/migrations/121-comic-script-visible-text-prompt.test.js
new file mode 100644
index 0000000000..b1825752dd
--- /dev/null
+++ b/scripts/migrations/121-comic-script-visible-text-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 './121-comic-script-visible-text-prompt.js';
+
+describe('migration 121 - comic-script visible-text prompt', () => {
+ runPromptMigrationTests({
+ migration,
+ applyMigration,
+ ACCEPTED_OLD_MD5,
+ NEW_SHIPPED_MD5,
+ prefix: 'migration-121-',
+ });
+});
diff --git a/scripts/setup-data-drift.test.js b/scripts/setup-data-drift.test.js
index 75c5a53534..3f678e0f8c 100644
--- a/scripts/setup-data-drift.test.js
+++ b/scripts/setup-data-drift.test.js
@@ -26,7 +26,7 @@ const migrationsDir = join(dirname(fileURLToPath(import.meta.url)), 'migrations'
const EXPECTED_STAGE_OLD = {
'pipeline-idea-expansion.md': ['1ee44cf95851ff8debf18729ebcd40b4', '1f3c5d077a5ef9a4b610335d5e3edd9c', '41facefbc0c0549d456bef9111f95ab9', '49a208628290543ba2607a5ed48fdc8c', 'aee25112b2c596f643b17c559b772c22', 'b5c47c94ffc74637983c95761ab0c66c'],
'pipeline-prose.md': ['30ac30ec2b9d3e2a9eb869c181732cc6', 'bef1bc2767b78f585f2bd89f3d615130', 'bfea5aeeb471aae9749baee765b473a7', 'd1f8e3f1d214725b5aa67f309a81cd7d'],
- 'pipeline-comic-script.md': ['133d200d069c2e8173b7c129eea58f53', '1e0af305c27d0c80c4b482d2ebcb4a0d', '40e5fdc1a1e68a7419b7dad936366c1a', 'beab031951859ca13579cdb9c4dbe769', 'dea7d497d1cb38e7574f236f4ff8e644', 'e530fc76b89cedaef848ad7ec99c934c'],
+ 'pipeline-comic-script.md': ['133d200d069c2e8173b7c129eea58f53', '1e0af305c27d0c80c4b482d2ebcb4a0d', '40e5fdc1a1e68a7419b7dad936366c1a', '7c05ecde539f04c9fa91e87543057204', 'beab031951859ca13579cdb9c4dbe769', 'dea7d497d1cb38e7574f236f4ff8e644', 'e530fc76b89cedaef848ad7ec99c934c', 'e9ee70bf18888492edada6633cd9928a'],
'pipeline-teleplay.md': ['1280ef6b1ad68fa44070ca7478ec2a5f', '2568e14beaa574d43f8018a5def51d04', '376f779f4687b598f1c92ca4e770fd5a', '3f6fecc25573ed054b47db392250034a'],
'pipeline-season-episodes.md': ['6e349ad26bed8a0ccb042571f03f03eb', 'c4928e2a5f833358116b29d2d669888d'],
'pipeline-arc-overview.md': ['6a3ecab43d1f46b7ef9aab6c69ea0326', 'd34d72b8e49ba303d38607845dd87f1c'],
@@ -46,7 +46,7 @@ const EXPECTED_STAGE_OLD = {
const EXPECTED_STAGE_NEW = {
'pipeline-idea-expansion.md': 'c50f016639d41cd8244f5ff13429f997',
'pipeline-prose.md': '84523d531eeafa60959c65c553b2563f',
- 'pipeline-comic-script.md': 'e9ee70bf18888492edada6633cd9928a',
+ 'pipeline-comic-script.md': 'a4303016c34b65e4b0e641fe71252de3',
'pipeline-teleplay.md': 'afa4215330bf856429d70d7e2f856605',
'pipeline-season-episodes.md': '50c68a29c3ebc275db3095d06bd87100',
'pipeline-arc-overview.md': '0a1f6ffa6908522e3690c5e9e53a6ee0',