# Content-to-Review Pipeline Before Rendering

Use this pattern when building or operating a semi-automatic Shorts engine where content quality must be tested before spending render/GPU/API time.

## Purpose

Create a deterministic, inspectable path from strategy to human review before any video generation or platform I/O exists.

```text
ContentBrief
→ ScriptDraft
→ CandidateDraft
→ VideoCandidate
→ TestBatch
→ ReviewBatch
→ Telegram ReviewDelivery
```

This lets the agent and user inspect every intermediate artifact, improve hooks/scripts/visual concepts, and reject weak ideas before render planning.

## Recommended artifacts

### ContentBrief

Carries strategy, not prose:

- pillar id
- topic
- audience problem
- concrete payoff
- positioning
- tone
- visual rules
- no-go topics
- target platforms
- target duration

Validation should reject blank strategy fields, unsupported platforms, and invalid durations.

### ScriptDraft

Carries the retention-led script kernel:

- exact first spoken hook
- script outline
- 3–5 retention beats
- visual concept
- caption
- CTA
- estimated duration

Validation should reject missing fields, bad beat counts, bad durations, and generic AI-slop phrases such as `in this video`, `unlock your full potential`, `game changer`, or other broad hype wording.

Important implementation pitfall: when optional overrides are accepted, use `x if x is not None else default`, not `x or default`, so intentionally blank test inputs still reach validation.

### Candidate conversion

Convert `ContentBrief + ScriptDraft` into the existing candidate factory input rather than creating a parallel candidate path. Preserve:

- hook
- script outline
- visual concept
- caption and CTA
- platforms and duration
- no-go/policy notes
- initial conservative quality score
- human-approval policy note

Then call the existing candidate factory so stable IDs, hashtags, duration classes, and pillar/platform validation stay centralized.

### Review delivery

Wrap rendered review text in a side-effect-free delivery object before any real channel adapter exists:

- `requires_human_approval=True`
- `side_effects=()`
- delivery type/topic metadata
- platform message length validation
- forbidden publish/post language guard

## Why this order matters

Do not jump straight from script text to ComfyUI/Wan/Qwen/Image/video generation. First prove that the idea, hook, retention beats, visual concept, and review package are coherent. Rendering a bad idea beautifully is just burning GPU time with better lighting.

## Next step after this pipeline

Only after this path is green should the system add:

```text
ScriptDraft
→ ShotPlan
→ RenderBrief
→ deterministic preview renderer
→ optional AI keyframes/I2V clips
```

Shot plans should enforce motion-led visual beats, renderer-owned captions/labels, no fake baked-in UI text, and no static slideshow fallback unless explicitly requested.