# Content Development Core Pattern

Use this pattern when evolving a short-form automation repo from review plumbing toward actual content generation, before touching video renderers or external AI APIs.

## Goal

Create a deterministic, testable content path before spending GPU/API time:

```text
ContentPillar
→ ContentBrief
→ ScriptDraft
→ CandidateDraft
→ VideoCandidate
→ TestBatch
→ ReviewBatch
→ Telegram delivery preview
```

## ContentBrief fields

A brief should preserve strategy before scripting:

- stable `brief_id` from pillar + topic;
- `pillar_id`;
- topic;
- audience problem;
- concrete payoff;
- positioning from the pillar;
- tone from the pillar;
- visual rules from the pillar;
- no-go topics from the pillar;
- target platforms;
- target duration.

Validation should reject blank strategy fields, unsupported platforms, and durations outside the candidate system's safe range.

## ScriptDraft fields

A script draft should be structured enough for review/render planning, not just prose:

- title;
- exact first spoken hook;
- script outline;
- 3–5 retention beats;
- visual concept;
- caption;
- CTA/comment keyword;
- estimated duration.

Validation should reject missing fields, fewer than 3 or more than 5 retention beats, invalid duration, and generic AI-slop phrases such as:

- `in this video`;
- `unlock your full potential`;
- `game changer`;
- `revolutionize your life`;
- `boost productivity`.

## TDD sequence

1. Write tests for the wished-for `ContentBrief` API first.
2. RED should be a missing content module/API.
3. Implement only the smallest brief model/factory/validator.
4. Write tests for the wished-for `ScriptDraft` API.
5. RED should be the missing script module/API.
6. Implement only deterministic draft generation and validation.
7. Verify full suite and a small manual smoke path before committing.

## Why this matters

This creates a measurable content quality gate before ComfyUI/Wan/Qwen/Image workflows. Bad hooks and generic scripts should die in cheap text tests, not after consuming GPU time and producing a beautifully rendered nothingburger.
