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

1.9 KB
Raw Blame
/**
 * Add `## Back cover concept` section to the comic-script stage prompt.
 *
 * Before this migration, the comic-script template emitted only a
 * `## Cover concept` section. After: the template also asks the LLM for a
 * `## Back cover concept` (one paragraph, illustration-only, no text), which
 * the parser captures into `backCoverConcept` and the issue's
 * `stages.comicPages.backCover.script` slot reads via the extract-pages
 * route.
 *
 * Strategy: hash-driven prompt-replace via `./_lib.js`. Idempotent.
 */

import { makePromptReplaceMigration } from './_lib.js';

export const ACCEPTED_OLD_MD5 = {
  'pipeline-comic-script.md': [ 'a4303016c34b65e4b0e641fe71252de3',
    '40e5fdc1a1e68a7419b7dad936366c1a', // pre-003 (original)
    'beab031951859ca13579cdb9c4dbe769', // post-003 (length-profile feature)
    '1e0af305c27d0c80c4b482d2ebcb4a0d', // post-013 / pre-027 — the hash this migration originally produced
    '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': '49af30c05f008b20f6998a0f113f7d87', // post-127 (scene markers)
};

const { applyMigration, up } = makePromptReplaceMigration({
  accepted: ACCEPTED_OLD_MD5,
  current: NEW_SHIPPED_MD5,
  label: 'comic-script back-cover',
  customizedHint: (filename) =>
    `   To add the Back cover concept section manually, diff:\n` +
    `     data.reference/prompts/stages/${filename}\n` +
    `   against your current:\n` +
    `     data/prompts/stages/${filename}\n` +
    `   and merge the new \`## Back cover concept\` block.`,
});

export { applyMigration };
export default { up };