stagecraft は何をしますか?
Most decks are documents read out loud. A Stagecraft deck is a place: a small real-time program where each idea gets one beat, the world behind the words moves on the GPU, and the text stays crisp HTML that a script can measure. It ships as one HTML file that works offline anywhere.
The craft is in four layers, in this order: story, copy, design, motion. Code is the last 30%. Then the eval loop checks the work like a picky designer would.
Files
| Path | What it is | Read when |
|---|---|---|
references/story.md | arcs (pitch, talk, showcase, podcast, case study, data story), beat sheets | always, first |
references/copy.md | on-screen words, speaker notes, voice, banned phrases, no invented facts | before writing any words |
references/taste.md | the design rules and the generic-AI tells to avoid | before styling |
references/motion.md | timing, easing, choreography | before animating |
references/music.md | the generative score: chords, beds, pacing | when scoring |
references/recipes.md | the scene recipes, transitions, custom scenes, performance | when choosing scenes |
references/engine.md | the API: deck, scene, ctx, s, text, drivers, headless API | when writing code |
references/evals.md | what the eval measures and the visual rubric | every build |
references/podcast.md | podcast episode to visual piece, audio sync | podcast jobs |
references/technology.md | plain-language explainer of how it works | when someone asks "how" |
template/ | the engine and a working 9-scene showcase deck | copy it to start |
scripts/eval.mjs | headless render, measure, report, contact sheets | every build |
scripts/record.mjs | MP4 export, optional audio track | video delivery |
Workflow
1. Understand the job
Ask, or infer from context, and state your reading: who is in the room (or on the page), what they should believe or do afterwards, how it is driven (a speaker clicking, a site playing it, a reader scrolling, an audio track), how long, and where it ships. Get the real facts: numbers with sources, quotes verbatim, product screenshots. If a fact is missing, write [NUMBER: source needed] and say so. Never invent one.
2. Story and beat sheet (no code yet)
Pick the arc from story.md. Write the one sentence the deck exists to say. Write the beat sheet: scene, beat, on-screen words, what the audience sees, what the room should feel (the music cue), speaker note. One idea per beat. Show the beat sheet to the person before building if they are present; it is the cheapest place to change course.
3. Set up the project
cp -r <skill>/template my-deck && rm -rf my-deck/node_modules my-deck/dist
cp -r <skill>/scripts my-deck/tools
cd my-deck && npm install
Chrome or Chromium must be installed for the eval and recording (set CHROME_PATH if it is not found). ffmpeg is needed for contact sheets and video.
4. Theme
Edit src/theme.js: paper, ink, night, one accent (plus accentInk, a darker accent that passes contrast on paper), fonts. Start from the default unless the brand demands otherwise; derive from the brand's real colours, never a generic gradient. Follow taste.md.
5. Build the scenes
Rewrite src/main.js from the beat sheet using recipes (recipes.md). Use the showcase deck already in it as a worked example, then replace it entirely. Write a custom scene only when no recipe fits. Put product screens and images in src/img/ and import them; the build inlines them. Score each scene with a score cue from music.md: usually just chords, since recipes set the beds.
6. Eval loop (do not skip)
npm run eval # build, then render, measure and write eval/
Fix every error. Then open eval/contact.png and eval/squint.png with your image tool and look. Write eval/critique.md against the rubric in evals.md, fix the worst three things, and run it again. Minimum two rounds. Ship only with zero errors.
7. Deliver
- Claude: publish
dist/index.htmlas an artifact (an HTML page, published from the file) so it opens with a link. Present mode by default; tell the person the keys: arrows or click to advance, N for notes, F for fullscreen. - Website: host
index.htmland embed it with?mode=auto(plays and loops) or?mode=scroll(scroll-driven). An iframe works. - Video:
npm run recordornode tools/record.mjs dist/index.html --out deck.mp4 --fps 30. The score is rendered into the video, in sync;--audio track.mp3uses your own track,--silentnone. Rendering is CPU-bound, about 2 to 5 frames a second; draft at--fps 12. - Live talk: run it from the file in Chrome, fullscreen, on the actual laptop beforehand.
Finish with: what was built, the eval result (score, errors, warnings left and why), how to open and drive it, and one real next step.
Non-negotiables
- One idea per beat. If a beat needs "and", split it.
- No invented numbers, quotes, logos or customers. Placeholders are visible and named.
- No em dashes or en dashes in on-screen copy or notes. No banned phrases (
copy.md). - Text is always DOM text through
ctx.text, never baked into the canvas. - Scenes are pure functions of time: no animation state outside
s. This is what makes seeking, eval and video exact. - One signature transition, at most four kinds per deck.
- Respect
prefers-reduced-motion(the engine does; custom scenes checks.calm). - Zero eval errors before delivery.
When the task is smaller
- "Make one slide like this": still copy the template; a deck can have one scene.
- Edit an existing Stagecraft deck: work in its project, change
main.js, rerun the eval. - No WebGL target (email, print): record to MP4, or export contact-sheet frames as images. The deck itself needs a browser.