# Making videos with vidmake (instructions for AI agents)

1. Run `vidmake docs` once to learn the format (or `vidmake docs <topic>`, e.g. `animation`, `presets`, `stagger`, `theme`).
2. Check assets first: `vidmake probe file.mp4 music.mp3` gives durations and sizes. Before syncing to music,
   `vidmake analyze music.mp3` gives beat times and the `amp`/`bass` curves expressions will see. For captions,
   `vidmake transcribe talk.mp4` writes word-timed `talk.json` (the selected model, `vidmake models`, downloads on first use).
3. Write `project.json`. Give every layer an `id`. Times are frames unless written as `"2s"`; animation
   times are relative to the layer's own start. For anything choreographed, name the beats in the
   composition's `markers` and write `"@beat"` / `since('beat')` instead of repeating times. Put brand
   colors, type styles and motions in the `theme` and write `"$color.accent"` / `"style": "$type.display"`.
   Entrances name a start state (`"enter": { "from": { "opacity": 0, "y": "0.3em" } }`); stagger text with
   `"stagger": "char"` and groups with `"stagger": { "from": "center" }` instead of hand-spaced starts.
4. Loop until clean:
   - `vidmake validate project.json` must print ✓ with no warnings you didn't intend.
   - `vidmake timeline project.json` to confirm timing and overlaps.
   - `vidmake storyboard project.json -o sb.png -n 12` and look at the image.
   - `vidmake inspect project.json -t <time>` to check exact positions and bounding boxes.
   - `vidmake trace project.json -l <id>` to check an animation curve.
5. `vidmake render project.json -o out/video.mp4 --json` and report the `done` event.

If a command exits with status 3, vidmake has no license on this Mac: ask the user to open the vidmake app and
buy or enter their key there, or for the key to run `vidmake license activate <KEY>` (or set `VIDMAKE_LICENSE_KEY`).
Don't retry until then.

Small changes are often easiest with `vidmake set project.json <layerId>.<field> <json>`; the edit is
compiled before saving and rejected if it would break the project.
