--- name: produce-video description: End-to-end production of a narrated, captioned demo video for any web app — chains narration generation (narrate), silent Playwright recording (film-demo, smart zooms + guardrails), and narration sync with burned captions (sync-narration) into one final .mp4. Use when the user asks to produce, make, or film a demo/product/tutorial video end to end, "with voice and subtitles", or "from A to Z". --- # Produce a demo video, A → Z One request in → one finished `.mp4` out (narrated + captioned if narration is enabled, silent otherwise). This skill is the **orchestrator**: it owns the chaining logic and the order of operations. The three stage skills own their domain detail and remain the source of truth for it. **MANDATORY — read all three stage skills before starting** (this file only adds what happens *between* them; skipping them is how quality gets lost): | Stage | Skill to read | Owns | |-------|---------------|------| | Voice | `narrate` | ElevenLabs voice/model defaults, script script-writing rules, credits | | Silent video | `film-demo` (+ its `reference.md`) | Camera model (focus/wide), cursor, speed-ups, guardrails, inspect/verify loop | | Sync + captions | `sync-narration` | Whisper alignment, segmentTargets, gaps, pre/post-roll, caption burn, ffmpeg gotchas | If this is the **first** time this skill runs in a project, run `demo-setup` first (or check that `demo.config.json` already exists at the project root) — every stage below reads it for the base URL, output directory, narration provider, and style preset. For scaffold patterns (login off-camera, beat plan, compose caps), read `demo-setup/examples/` and `demo-setup/references/`. ## Pipeline ``` Request (what the app does, what to say, output path) │ ├─ 0. SCRIPT write demos//script.md (beats + narration text) ├─ 1. VOICE script → narration.mp3 (narrate) — skip if narration.provider = "none" ├─ 2. ALIGN mp3 → aligned.json (whisper — sentence durations) — skip if no narration ├─ 3. RECORD beats → -no-sound.mp4 (film-demo, holds sized from step 2) ├─ 4. SYNC mp3 + no-sound → .mp4 (sync-narration, burned captions) — skip if no narration └─ 5. QA frames + audio tail + output path → deliver ``` **Voice comes first, always** (when narration is enabled). Align the mp3 *before* recording so each sentence's exact duration sizes the on-screen holds. After that, the video adapts to the voice, not the other way around. **Silent mode:** if `demo.config.json` → `narration.provider` is `"none"` (the default — no API key required), skip stages 1/2/4 entirely: `film-demo` records straight to the final output, using its own idle-gap speed-up (no narration-driven holds to protect). Artifacts (in `demo.config.json` → `output.dir`, default `demos//`): ``` demos//script.md the beat + narration script (source of truth for this run) demos//narration.mp3 narration (never retouched after ✓) — narrated mode only demos//no-sound.mp4 silent recording (keep for re-syncs) — narrated mode only demos//final.mp4 FINAL deliverable ``` ## Checklist ``` Production progress: - [ ] 0. Confirm demo.config.json exists (else run demo-setup); write demos//script.md - [ ] 1. Generate narration.mp3 (narrate, exact filename) + ffprobe check — skip if silent mode - [ ] 2. Align mp3 (align-narration.py) → per-sentence durations table — skip if silent mode - [ ] 3. Write beat plan: sentence ↔ beat ↔ min on-screen hold — skip if silent mode - [ ] 4. Record silent video with film-demo (narration-aware config below if narrated) - [ ] 5. film-demo gates: guardrails alerts resolved, inspect frames read, verify pass - [ ] 6. Copy final.mp4 → no-sound.mp4 (narrated mode only) - [ ] 7. Sync: contact sheet → targets → cues.txt → plan → validate → render — skip if silent mode - [ ] 8. QA gates (below) on the final mp4 - [ ] 9. Deliver: absolute path + duration + justified alerts ``` ## Stage 0 — Write the script Write `demos//script.md` with two parallel tracks, beat order = narration order: ```markdown #