0020 — keryx reel make: one-command reel orchestration¶
Status: IMPLEMENTED (2026-06-27). §7 decisions resolved — all per the recommendations:
(1) require an existing storyboard, --from-post is a fast-follow; (2) --takes N>1
still auto-picks take 1 + notes audition; (3) [y/N] plan confirmation + --yes +
--dry-run; (4) idempotency keyed on the selection existing; (5) fail-fast +
resumable; (6) cover off unless --cover <scene>.)
Date: 2026-06-27
Depends on: the existing stage cores it composes — gencmd (VO/music/card gen via
GenerateInto), takescmd (pick + the now-fixed media wiring, B-2), internal/takes
(selection state), pkg/cmd/reel/build (RunBuild/RenderInto), and the B-1 fix
(gen creates its dirs). No new generation behaviour — pure orchestration.
1. Goal & scope¶
Producing one reel today is ~25 commands (voice gen ×N, voice pick ×N, music
gen+pick, cards gen+pick ×N, reel build). keryx reel make -w <slug> collapses
that into one pass: for a workspace that already has a storyboard, generate every
missing artefact, auto-select it, and build the reel — re-runnable and only generating
what's missing.
reel make is the "just make it" fast path; the per-stage gen/pick commands
remain the audition loop (generate N candidates, pick the best). make defaults to
one take and auto-picks it.
In scope: orchestrating VO + music + cards (+ optional cover) gen→auto-pick→build over an
existing storyboard, idempotently, with a spend plan. Out of scope: drafting the
storyboard (a separate, human-reviewed step — storyboard draft), the multi-take
audition loop (the per-stage commands), posting.
2. The pipeline¶
reel make -w <slug> runs these stages in order, skipping any whose output already
exists (idempotent re-runs — no re-spend):
- Validate the storyboard (the same
reel.Validatebuild uses) — fail early. - VO — for each card with narration, if
vo/NN.mp3is absent:gen --takes Tthen auto-pick. (Skipped under--silent.) - Music — if
music.mp3is absent:gena bed then auto-pick. (Skipped under--silent/--no-music.) - Cards — for each overlay card with a scene, if its media isn't selected:
gen --takes T(with--avatar/--themeas passed) then auto-pick (which wiresCard.Media, B-2). - Cover — only when
--cover <scene>is given and no cover exists: gen + select. - Build —
reel build(VO-timed, or--silent) →reel-<slug>.mp4.
A --dry-run prints the plan (which stages would run + how many provider calls) and
spends nothing.
3. Auto-pick + idempotency¶
- Auto-pick = select take 1. With the default
--takes 1it's the only take; with--takes N>1makestill selects take 1 and notes "audition withvoice/cards pickfor a better choice". (makeis the fast path; auditioning is the per-stage loop.) - Idempotent: a stage is skipped when its selected artefact already exists
(
vo/NN.mp3,music.mp3, the card'sMedia,cover.png). So a failed/partial run is cheap to resume — re-running only generates what's still missing. (Candidate takes in*/takes/don't count as "done" — only a selection does.) - No silent overwrite:
makenever re-generates over an existing selection; use the per-stage commands (orreel prune) to redo one.
4. Flags¶
| Flag | Effect |
|---|---|
-w, --workspace <slug> |
the reel workspace (required) |
--takes <N> |
candidate takes per stage (default 1 → auto-pick; N>1 still auto-picks take 1) |
--theme <kw> |
theme for cards/cover/VO/music (unknown → hard error, B-10) |
--avatar <name> |
render overlay cards from an avatar (image-to-image) |
--cover <scene> |
also generate a themed cover from this scene |
--silent |
text-only timing — skip VO + music; build a silent reel |
--no-music |
skip the music bed (keep VO) |
--dry-run |
print the plan + estimated provider calls; generate nothing |
--yes |
skip the spend confirmation (for CI/unattended) |
5. Reuse map (composition, no new gen)¶
| Stage | Reused core |
|---|---|
| validate | reel.Validate (the build/CLI rules) |
| VO gen + pick | gencmd.VOTakes + takescmd.SelectVO |
| music gen + pick | gencmd.MusicTakes + takescmd.SelectMusic |
| cards gen + pick | gencmd.CardTakes + takescmd.SelectCard (wires media, B-2) |
| cover | cover.RunCover (or the cover gen core) + select |
| build | build.RunBuild |
reel make is a thin sequencer over these — each is already context-timed + bounded;
make adds the loop, the skip-if-selected guard, the plan, and the confirmation.
6. Spend & safety (it's PAID + multi-call)¶
reel make fans out many paid provider calls (VO per line + music + cards), so:
- It prints the plan first — the stages it will run + the count of provider calls
(e.g. "8 VO + 1 music + 5 cards = 14 generations") — and requires confirmation
(a [y/N] prompt, or --yes for unattended). --dry-run prints the plan only.
- Fail-fast: stop on the first stage error; the partial selections persist, so a
re-run resumes (idempotency). The error names the failed stage + remediation.
- Honours the same bounds as the per-stage commands (the --takes safety cap, the
per-call timeout). No new spend path — just more calls in sequence.
7. Decisions to confirm before building¶
- Storyboard prerequisite. Require an existing storyboard (rec — drafting is a
separate, human-reviewed step) vs a
--from-post <md>that drafts first. Confirm require-existing for v1 (a--from-postconvenience is a fast-follow). - Auto-pick policy with
--takes N>1. Select take 1 + note (rec) vs refuse (require--takes 1formake) vs stop-after-gen-for-audition. Confirm take-1-default. - Spend confirmation. A
[y/N]plan confirmation +--yesto skip (rec) vs always run (no prompt) vs always require--yes. Confirm the prompt +--yes. - Idempotency key. Skip a stage when its selection exists (rec) — confirm that candidate takes alone don't mark a stage done.
- Failure mode. Fail-fast + resumable (rec) vs continue-and-report-per-stage.
- Cover default. Off unless
--cover <scene>(rec) — most reels bookend with the cover art only when one's authored.
8. Testing / DoD¶
Failing test → code → green just ci. The gen/build cores are faked (no spend, no
ffmpeg) behind their seams; unit-test the orchestration: stage ordering, the
skip-if-selected idempotency (a second run generates nothing), --silent/--no-music
stage skipping, --dry-run spends nothing, the plan/confirmation, fail-fast + resume.
A godog scenario drives reel make end-to-end through the fakes (board → fake gen →
auto-pick → build), asserting the mp4 + that a re-run is a no-op. The real provider path
stays INT_TEST=1-gated. Docs: a reel make command page + a how-to ("make a reel in
one command"). Scaffold with gtb generate command --name make --parent reel.