- product / offer
- audience + platform
- tone (3 adjectives max)
- CTA + duration + aspect ratio
Eight steps, brief in one end, exportable ad out the other. Every step runs and fails independently — fixing one never re-runs the rest. A debate loop sits between concept and script so a bad idea gets killed before it costs generation credits.
Client fills a short form. Output is a JSON object every later step reads from — nothing downstream re-asks the client anything.
From the brief, generate 3 distinct concepts — not 3 variations of one idea. Each needs a hook, a core visual metaphor, and why it fits the audience.
The 3 concepts get attacked before one gets picked. Two fixed critic personas argue against the generator; a judge sees the full transcript and picks or merges. Capped at 2 rounds so it can't argue forever.
The winning concept becomes a shot-by-shot breakdown. Vague shots produce vague footage — this is the artifact stage 5 generates directly off.
Loop over the shot list. Each shot calls one generation tool with its prompt, aspect ratio, and duration. Recurring characters/products get created once and referenced across shots for consistency.
Stitch generated clips in shot order, lay VO and music underneath, burn in captions, cut to target duration and aspect ratio.
Watch the assembled cut. Flag weak shots by id, not the whole ad — only those shots re-enter stage 5.
Final render per platform spec, delivered.
The pipeline is a state machine, not a script. Each of the 8 steps above is a row in a table, per run. A failure stops that row — nothing else re-executes.
run_id, step_name, status, input_json, output_json, error, updated_at
Re-run one step_name for that run_id, reading its stored input. Upstream steps are never re-executed.
Each step declares its own input schema. If an upstream shape changes, that step fails loud immediately — not silently three steps later.
Wire steps 2–4 first (pure LLM, no generation cost), test on 5 real briefs by hand. Add step 5 with images only, video once prompts are reliable. Assembly can be one ffmpeg script before it's anything fancier — don't build the queue until step 5 is actually slow enough to need one.