# Render Manifest Pipeline for Retention-Led Shorts

Use this when a short-form automation project has finalized scripts and shot plans but no reliable renderer yet.

## Durable lesson

Do **not** jump directly from script text to video rendering. That tends to recreate generic AI slideshow output: pretty backgrounds, weak timing, and captions pasted over decorative motion. Insert a structured renderer contract first:

```text
Final script -> Shot plan -> Render manifest -> Renderer -> Preview/approval
```

## Recommended sequence

1. **Final script**
   - Voiceover text
   - Estimated duration
   - Caption beats
   - CTA
   - Production notes

2. **Shot plan**
   - 5 coarse scenes:
     - `first_frame_hook`
     - `pattern_interrupt`
     - `core_explanation`
     - `screen_or_card_visual`
     - `cta`
   - Each scene should include:
     - timing window
     - asset type
     - on-screen text
     - visual direction
     - retention goal

3. **Render manifest**
   - Machine-readable JSON contract for the renderer.
   - Keep it deterministic and testable.
   - Suggested fields:
     - `schema_version`, e.g. `render_manifest.v1`
     - `video`: id, title, pillar, duration, aspect ratio, resolution, fps
     - `timeline`: visual and caption timeline items in milliseconds
     - `asset_requirements`: placeholders and briefs for screen recordings, cards, B-roll, kinetic text
     - `render_constraints`: first-frame hook, no static slideshow, pattern interrupt cadence, approval requirement

4. **Renderer v1**
   - Consume the manifest, not the raw script.
   - First renderer can use placeholders/cards/kinetic text before real asset generation.
   - Produce one test MP4 before scaling to a batch.

5. **Human approval loop**
   - Send preview plus title/caption/hashtags/platform recommendation.
   - Do not publish without explicit user approval.

## Testing pattern

Use TDD for each pipeline stage:

- Write a failing test for the expected contract first.
- Verify RED: missing module/function/field.
- Implement minimal deterministic builder.
- Verify GREEN with targeted tests.
- Run full suite before committing.

Useful assertions:

- render manifest has `schema_version`
- video is `9:16`, `1080x1920`, `30fps`
- timeline has visual + caption tracks
- first visual starts at `0ms`
- each visual item has `asset_ref`, `text`, `style`, and retention direction
- render constraints include `avoid_static_slideshow` and `human_approval_required_before_publish`

## Pitfalls

- Do not let the renderer infer everything from prose. Encode scene intent and constraints explicitly.
- Do not make generated backgrounds the main visual strategy; they are fallback texture, not content.
- Do not build publishing before the preview/approval path exists.
- Do not optimize final visual polish before proving hook/caption timing and scene structure.