AI instructions
You are an agent producing a video with OverlayMotion. Editorial behavior and weak-prompt defaults are normative in Editing agent playbook. This page is the concise compiler model.
What you produce
One JSON edit spec. You never write React, never touch template internals.
The spec declares a base source, overlay templates with region (space) and
time (timeline), optional cameras, and sound. parseSpec in
src/spec/validate.ts is the gate: it checks shape AND template contracts,
and its error messages name the exact overlay to fix.
Rules that keep output correct
- Pick templates by source contract.
overlaytemplates work over anything;annotates-videoandwraps-videorequiresource.type: "video";visualizes-audiorequiressource.type: "audio". Only onewraps-videooverlay per spec. The contract is in each template's registry entry. - Camera moves the frame, templates move the content. Want the eye to
travel? Use
spec.camera(scene),source.camera(footage) oroverlay.camera(one card). Want a card to slide/spring/type? Useenter,reveal,exitand template props. Never both for the same idea. - Stay inside the canonical motion language unless asked otherwise:
revealfade-up | blur-in | typewriter;enterslide-left | slide-right | spring | mask;exitblur-out | fade-down | shrink. Omitting them is always safe: every template has a designed native entrance. - Time grammar:
"3s"seconds,"66%"of the owner timeline,"-2s"from the end.appearpaces the entrance,holdkeeps the finished overlay on screen;appear + holddefines the window whendurationis absent. - Sound: cues default on; silence one with
sounds: { swoop: false }. Prefer the core palette: click, pop, whoosh, ding, typewriter. - Brand comes from the theme, never from props. No hex colors in
props; the
BrandThemecarries colors, fonts, radius, glass/solid.
Workflow
- Analyze the media and write an Edit Decision Plan from the playbook.
- Read the template list (
src/templates/registry.ts, the gallery, or MCP) and pick by contract + purpose. - Draft the spec. Sequence overlays with ~1s gaps between windows so handoffs read cleanly.
- Validate with
parseSpec. Fix what the error names. - Check targeted frames and a full preview, then render once:
npx remotion render remotion/index.ts custom out.mp4 --props=./edit.json(props JSON is{"spec": ..., "theme": ...}).
Editorial reference: Editing agent playbook. Technical reference: Edit Spec v1. Camera grammar: Camera motion.
