---
name: cinematic
description: Make a chaptered motion film from a topic, with kinetic type and one continuous voiceover. Use for a history-of or story-of piece when there is no source document. Frames are 16:9, 9:16, or 1:1. The picture is written first; the narration is complete sentences that can run across chapter cuts.
---

# Cinematic

You are an agent making a WatchRecap cinematic film. Follow this file. Do not invent a different pipeline.

There is no paper. The model writes a self-contained motion film from a topic, then a separate pass writes one continuous voiceover and records it. Run from `pipeline/` in the WatchRecap repo, with `pipeline/.venv` (`./scripts/setup.sh` from the repo root). `OPENROUTER_API_KEY` must be set in the repo `.env`.

## Make it

```
.venv/bin/python cinematic.py "A brief history of neural networks" --seconds 40 --format 16:9
.venv/bin/python cinematic.py "How the Bay Area grew" --seconds 60 --format 9:16 --out data/cinematic/bay
```

- `--seconds` is the target length. The film sets `window.TOTAL` to its real length.
- `--format` is `16:9` (1920×1080), `9:16` (1080×1920), or `1:1` (1080×1080). Compose for that frame. A tall film stacks vertically. A square film centers one idea.
- `--out DIR` chooses the folder. Default is `data/cinematic/<slug>`.

## What the film must be

The model writes one HTML document. The renderer seeks it; it does not play it.

- `window.TOTAL` is the length in seconds.
- `window.__seek(t)` draws exactly the frame at second `t`, and is a pure function of `t`. No `setTimeout`, `setInterval`, `requestAnimationFrame`, `Date`, `performance.now`, or `Math.random`. Noise comes from a seeded generator.
- Build every element once. `__seek` only updates attributes, transforms, opacities, and canvas draws.
- Keep the document compact. A film cut off before `</html>` cannot render. Describe chapters as data and draw them with shared functions. A longer film is more chapters, not more code.

## Voice

After the picture exists, the pipeline writes a narration of complete sentences that tell one story through the whole film. A sentence may run across a chapter cut. It is recorded with Gemini TTS and mixed onto the picture. Do not write a list of captions to be read aloud.

## The check

Before the frames are rendered, the film is sought forward and then in reverse. A frame that draws differently depending on how it was reached is rejected. Rendering uses software rasterization so a half-painted frame is not mistaken for that failure.

## What you get

`video.mp4` in the output folder, picture plus voiceover. Also `video.html` and `narration.json` (each sentence, and when it starts).

## Do not

- Do not use this skill when the video must stay faithful to a PDF or article. That is the explainer skill.
- Do not invent a player, a timer, or CSS animations for anything time-critical. Motion comes from `__seek(t)`.
