Pipeline Overview¶
The 6 stages from product brief to delivered videos.
flowchart TB
S1[1. Brief & Setup]
S2[2. Script Creation]
S3[3. Visual Storyboard]
S4[4. PatchWork File]
S5[5. Generation]
S6[6. Delivery & Feedback]
S1 --> S2
S2 -.user approves.-> S3
S3 -.user approves Video Plan.-> S4
S4 --> S5
S5 --> S6
S6 -.feedback loop.-> S2
S6 -.feedback loop.-> S3
S6 -.rerun.-> S5
The user approves once after Stage 3 (the Video Plan — script + storyboard together). Stage 4 then runs automatically.
Stage 1 — Brief & Setup¶
Gather from the user:
- Product — what brand and SKU. The Manager loads any existing brand and product reference docs to ground the work.
- Target audience — age, gender, lifestyle, awareness level.
- Tone / style — aspirational, relatable, edgy, warm, etc.
- Reference material — existing scripts, viral videos to copy, brand examples.
- Platform — TikTok / Reels / Facebook. Defaults to TikTok.
- Sales channel — TikTok Shop, Amazon (via keyword), or Meta Shop. Affects CTA and AI Label Trick requirements.
- Content type — defaults to salesy. User can request follower-growth for variety.
- B-roll density — High / Medium (default) / Low / None. See Glossary.
- Visual direction — model look, environment, lighting, camera style, color palette, aesthetic vibe, production level.
If the user supplies a Researcher creative template, the visual direction is pre-filled from it.
The Manager summarizes the full brief back to the user for confirmation before moving on.
Stage 2 — Script Creation¶
Agent: Script Writer (Mode 5 for new scripts, Mode 1 for adaptations).
The Manager delegates to the Script Writer with the brief, audience, and any pattern preferences. The Script Writer returns a script. The Manager presents it to the user for approval.
The approved script text and any compliance notes are passed forward to Stage 3.
Stage 3 — Visual Storyboard¶
Agent: Visual Planner.
The Manager passes the full approved script text plus visual direction, B-roll density, product info, target audience, sales channel, and any creative template.
The Visual Planner returns two artifacts:
- A user summary (1-2 sentences per scene) — presented to the user for approval.
- An internal detail version — used by the Manager when delegating to the Image Prompter and Veo Prompter in Stage 4.
User approval here unlocks Stage 4. After this, generation is automatic.
Stage 4 — PatchWork File¶
Automatic — no per-prompt approval. Once the Video Plan is approved, this stage runs in one pass.
- Image prompts — delegated to the Image Prompter. One prompt per shared reference image group (speaking scenes). B-roll gets one prompt per clip.
- Speaking video prompts — delegated to the Veo Prompter. Uses the universal talking head template; only the dialogue line changes per scene.
- B-roll video prompts — delegated to the Veo Prompter. Simple natural language, no dialogue, ambient audio only. Note: B-roll prompts run manually, not inside the
.nbflow. They live inAssets/{workflow}/broll/. - The
.nbflowitself — delegated to the PatchWork Importer. Wires up image gens → scene Veo3 nodes → Approval gates. - Save outputs —
.nbflowlands inprojects/{month}/{brand}/{growth|sales}/{testing|approved}/{workflow}-{version}.nbflow. - Reference material checklist — listed for the user (avatar photo, product photo, etc.).
The Manager runs consistency checks across all stages — same product details, same aesthetic, same tone.
Stage 5 — Generation¶
Agent: Generation Runner.
Two execution paths:
A. Headless via workflow-runner.js (default). Calls the G-Labs API directly, uploads reference images to R2, exports a completed .nbflow with all generated URLs baked in. Fastest, no browser.
B. Playwright-driven via the PatchWork web UI. Drives https://patchwork-33m.pages.dev/ in a Playwright browser. Useful for visual verification or when the UI flow handles cases the headless runner doesn't.
The runner:
- Enforces
outputCount=4on every gen node (4 candidates per row). - Uploads reference images to R2.
- Wipes stale cache.
- Runs all generation nodes with default concurrency 3 (cap 5).
- Retries failed nodes up to 3 times.
- Visually reviews every generated image for AI tells (extra fingers, garbled limbs, melted faces).
- Auto-reruns flagged images via
regen-nodes.py, up to 3 attempts per node. - Exports a
-generated.nbflowtoprojects/{month}/{brand}/Generations/.
The user opens the exported file in PatchWork to review.
Stage 6 — Delivery & Feedback¶
The Manager presents the deliverables:
PIPELINE COMPLETE
VIDEO PLAN: [Product] | [N] scenes + [N] B-roll ([density] mode) | [Xs] total
PATCHWORK FILE: [filename].nbflow
GENERATION REPORT:
Images: [X] gen nodes × 4 candidates each = [Y] stills, [Z] failed
Videos: [X] gen nodes × 4 candidates each = [Y] clips, [Z] failed
REFERENCE MATERIAL NEEDED:
- Avatar image
- Product image
- [...]
NEXT STEPS:
1. Review and Send video approvals in PatchWork
2. Rerun any failed nodes
3. Export final videos from PatchWork
The feedback loop offers:
- Script changes → back to Stage 2.
- Storyboard changes → back to Stage 3, regenerates Stage 4.
- Specific prompt adjustments → edit individual prompts, regenerate the
.nbflow. - Rerun failed generations → back to Stage 5.
- Create a variant (Mode 4 on the script). See Variants & Versioning.
- Translate (Mode 2 on the script).