PIPELINE — BRIEF TO AD

Zero to finished ad, one pipeline

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.

1

Brief intake

form → structured JSON

Client fills a short form. Output is a JSON object every later step reads from — nothing downstream re-asks the client anything.

captures
  • product / offer
  • audience + platform
  • tone (3 adjectives max)
  • CTA + duration + aspect ratio
optional
  • brand colors / logo
  • reference ads client likes
  • product photos, for character consistency
Google Form / TypeformJSON schema
2

Concept generation

LLM

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.

output per concept
  • hook line (first 2s, spoken or on-screen)
  • one-line visual concept
  • estimated shot count
Claude / GPT API
3

Debate

LLM, 3 personas

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.

generator critic: performance critic: creative generator revises
repeat ×2 max → judge picks / merges → single concept + rationale
performance critic attacks
  • does the hook stop scroll
  • is the CTA clear
  • matches the buying trigger
creative critic attacks
  • is this generic / done before
  • is it visually ownable
generatorcritic × 2judge
4 extra LLM calls per brief, cheap. Output is one refined concept, not three — that's what stage 4 builds from.
4

Script + shot list

LLM

The winning concept becomes a shot-by-shot breakdown. Vague shots produce vague footage — this is the artifact stage 5 generates directly off.

per shot
  • duration (sec)
  • visual prompt
  • camera move
  • on-screen text, if any
global
  • VO script, full
  • music mood tag
  • character refs, if recurring
Claude / GPT API
5

Asset generation

node-based gen tools

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.

image
  • Nano Banana Pro
  • GPT-image
video
  • Seedance 2.0
  • Kling 3.0
voice
  • ElevenLabs TTS/VO
orchestration layer
  • Higgsfield / Magnific / Weavy node graph
generate_imagegenerate_videocreate_characterpoll status
Generation is async per shot — each shot is its own step instance in the state machine below, so one failed shot never blocks or reruns the others.
6

Assembly

code

Stitch generated clips in shot order, lay VO and music underneath, burn in captions, cut to target duration and aspect ratio.

  • concat clips per shot list order
  • VO track under video
  • caption burn-in, synced to VO
  • output at platform crop — 9:16 / 1:1 / 16:9
ffmpegRemotion
7

QA + reshoot

human + LLM

Watch the assembled cut. Flag weak shots by id, not the whole ad — only those shots re-enter stage 5.

  • check: hook lands in 2s, character/product stays consistent, CTA legible
  • flagged shot ids → step 5 retry → re-assemble
manual reviewoptional: LLM vision check
8

Export

output

Final render per platform spec, delivered.

  • TikTok/Reels — 9:16, ≤60s, captions on
  • YouTube — 16:9 or Shorts 9:16
  • static fallback — 1:1 image ad from a stage-5 still
ORCHESTRATION

Every step fails on its own

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.

pending
running
done
failed
table

run_id, step_name, status, input_json, output_json, error, updated_at

retry

Re-run one step_name for that run_id, reading its stored input. Upstream steps are never re-executed.

isolation

Each step declares its own input schema. If an upstream shape changes, that step fails loud immediately — not silently three steps later.

build order

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.