Stories

A story directory keeps authored intent and generated evidence together: brief.md, notes.md, an intermediate draft.json, canonical story.json, and rebuildable scenes/*.svg previews. Lantern Run and Timeline Stress are bundled examples. (SVG-Animator-BIBLE.md:250-260)

Commands

npm run story -- new <slug> [--title <value>]
npm run story -- check <slug|--all> [--strict]
npm run story -- build <slug>
npm run story -- render <slug>
  • new requires a lowercase kebab-case slug, refuses overwrite, and creates the brief, notes, draft, and scene directory transactionally.
  • check parses the draft when present, otherwise the built story; --strict turns any normalization warning into failure.
  • build normalizes the preferred input and writes canonical story.json.
  • render requires the built story, compiles it, and atomically replaces scene-preview SVGs. (scripts/story.mjs:59-123, scripts/story.mjs:128-161)

Use strict all-story validation as a release gate:

npm run story -- check --all --strict

Story previews are derived artifacts; the authored JSON and notes remain the review source. The render path uses the same project parser, compiler, and scene renderer as the product model rather than a parallel schema. (scripts/story.mjs:1-8, scripts/story.mjs:149-160)