Reelify Motion Kit 0.1 preview
Docs/Working with it

Director

Editing a talking video: skills, the stage and its three states, seats, the arranger and its decisions, the caption lane, pictures, follow-ups and the audit.

The director layer edits a talking video: one person speaking to a camera, with graphics placed on the words that matter. The author of the edit, a model or a person, says only what goes up and when. Where it sits, how the speaker makes room, and what it looks like belong to the kit.

The kit does not call a model. It builds the prompt, reads the answer, and turns it into a scene. The host makes the call.

From words to a scene#

An edit is a few lines of Motion Lang. buildEdit runs it through five layers in order. Each is a separate function that can be read and tested alone.

LayerFunctionWhat it does
The wordsparseEditReads the lines into an edit: a list of pieces with times.
The picturesresolvePicturesTurns a subject or an id into one of the video's pictures, framed by its shape.
The rulesarrangeGives every small piece a seat of its own and settles time conflicts.
The stagebuildStageBuilds the speaker's window, the board and the pieces, and how they move.
The lookwithConfigPuts the skill's config over all of it.
ts
import { SKILLS, buildEdit, compile, starter, type Footage } from "./motion-kit/src/index";

const registry = starter();
const footage: Footage = {
  size: [1080, 1920], duration: 6, transcript: words,
  film: { el: "img", src: "assets/interview.webp", w: 1080, h: 1920, radius: 0,
          sheet: { columns: 9, rows: 8 }, frame: "=mod(t,6)*12" },
};
const built = buildEdit(text, footage, SKILLS.framed, registry, { captions: "host" });
const compiled = compile(built.spec, registry);

buildEdit returns edit, errors (lines it could not read), spec (the scene), problems, text (the edit printed back), timeline (the stage's states over time), captionLane and decisions (everything the middle layers changed, with reasons).

A skill#

A skill is one way of editing. It is a record:

FieldHolds
id, name, blurbWhat it is called and two lines on its look and pace.
configA config: palette, fonts, surfaces, curves, defaults. It sits on top of the house config, HOUSE.
stageThe parts of the video and where each sits in each state.
piecesThe components this skill may place. Fewer pieces means a shorter prompt and a more recognisable hand.
rulesHow this skill edits, in sentences a model can follow.
placesOptional. Where a small piece sits when this skill's layout differs from the usual one.

Five skills ship in SKILLS:

IdNameLookStates
glassGlass ExplainerFrosted dark glass over the speaker, white type, one bright accent, no bounce.talk, beside, page
paperPaper BlocksCream paper, black ink, one yellow, monospace. Flat blocks with a hard shadow.talk, beside, page
boldBold KineticHeavy condensed caps, yellow and green, everything punches in.talk, page
storyPersonal StoryFew graphics, calm pace, the words in a serif.talk, page
framedFramed LessonThe speaker in a rounded frame on warm paper, the lesson written under them.talk, beside, page

The same edit under another skill's config is a different-looking video. The same transcript under another skill's rules is a different edit.

The stage#

A stage names the parts of a video and where each sits in up to three states.

StateWho has the frameCalled for by
talkThe speaker. Small pieces sit over them at fixed seats.Every small piece: Headline, StatChip, Sticker, Callout and the like.
besideShared. The speaker's window shrinks or lifts and a board holds a list, a flow or a comparison.PointsCard, MomentList, MomentFlow, MomentVersus, Show, when the board is tall enough for them.
pageThe graphic. The speaker blurs, dims or shrinks to a corner.MomentTitle, MomentStat, MomentQuote, and board pieces the board is too short for.

Each state gives every part a place: centre and size as fractions of the frame. This is the stage of the Framed Lesson skill:

json
{ "ground": "#F2ECD8",
  "move": { "spring": { "bounce": 0.14, "duration": 0.6 } },
  "states": {
    "talk":   { "speaker": { "x": 0.5, "y": 0.345, "w": 0.87, "h": 0.583, "radius": 36 }, "captions": 0.69 },
    "beside": { "speaker": { "x": 0.5, "y": 0.17, "w": 0.56, "h": 0.27, "radius": 30 }, "captions": 0.345,
                "board": { "x": 0.5, "y": 0.67, "w": 0.9, "h": 0.56, "surface": "board" } },
    "page":   { "speaker": { "x": 0.5, "y": 0.1, "w": 0.3, "h": 0.14, "radius": 80 }, "captions": null,
                "board": { "x": 0.5, "y": 0.6, "w": 0.92, "h": 0.72, "surface": "board" } }
  } }
  • speaker is the window the footage shows through. It also takes blur and dim.
  • captions is the height of the caption lane as a fraction, or null to hide captions in that state.
  • board is where board and page content goes, and the surface it sits on.
  • move is the curve every part travels on between states. ground is what is behind everything.

buildStage reads the edit and works out the state over time: every board or page piece claims its seconds and the rest is talk. Each part's numbers become signals stepped along move, so the window resizes, lifts or blurs by itself. The parts start moving 0.32 seconds before the content arrives. The footage always covers the window, whatever its shape.

The scene buildEdit produces for the one-line edit below under the Framed Lesson skill, reduced by hand: signals that never change and kit entries nothing reads were removed, and numbers were rounded. The speaker talks, steps aside for a list on the board, and comes back.

The edit that scene came from:

text
list = MomentList(["Record", "Cut", "Post"], title: "Three steps")  @ 2 for 3.2

The edit names no place, no size and no colour. The state timeline that buildEdit returned for it was one entry: beside from 2 to 5.2 seconds.

Seats#

A seat is a named place a small piece can sit while the speaker talks. Seats are computed from where the speaker's window and the caption lane are in the state, so they follow a skill's layout.

SeatWherePreferred by
topTop centre of the speaker's window.Headline, DuoCaption, ToastStack
cornerL, cornerRThe window's upper corners.StatChip (left first), PercentRing, Sticker, Picture (right first)
sideThe right side, a little above the middle.Callout, Stamp, Arrow
nameLower left.LowerThird
lowUnder the caption lane.HighlightLine, SlabLabel

Each kind of piece has an ordered list of seats it prefers. A few pieces take no seat: BigWord, FocusRing, Scrim, ProgressBar, RecHud and the Punch effect.

Seats do not know where the face is. They are computed from the window, not from the footage. A stage has one number, face, for how far down the footage the face sits, used to keep it in the window as the window changes shape. A tight close-up can still end up under a corner seat.

The arranger#

The library draws what it is given and the stage refuses nothing. arrange is the one place layout rules are enforced. It is a pure function over data. It applies three rules in order:

  1. Two board or page pieces never share the frame. The earlier one ends when the next begins, if it has had two seconds. Otherwise the later one waits. Otherwise the shorter one is left out.
  2. A small piece is never up while the speaker has stepped aside or given up the frame. It ends when the stage starts to move, or, if its words are spoken during that state, it is left out.
  3. A seat holds one small piece at a time. A piece takes the first of its preferred seats that is free for its whole stay. If none is, the piece already there ends early if it has had its time, or the new one is left out.

The arranger never moves a piece to a different moment in the speech. A piece is about a word and stays on it.

Everything it does is returned as a decision: { id, what, why }, where what is moved, trimmed, delayed or dropped. This edit asks for too much at once:

text
a = Headline("First")                      @ 0.5 for 2
b = Headline("Second")                     @ 1 for 2
c = MomentList(["Record", "Cut", "Post"])  @ 2.2 for 3
d = StatChip(30, label: "seconds")         @ 3 for 2

Under the Framed Lesson skill, buildEdit returns these decisions:

json
[
  { "id": "a", "what": "trimmed", "why": "ends at 1.6 s, when the speaker steps aside", "layer": "arranger" },
  { "id": "b", "what": "dropped", "why": "its words are spoken at 1.0 s, while a board piece has the frame", "layer": "arranger" },
  { "id": "d", "what": "dropped", "why": "its words are spoken at 3.0 s, while a board piece has the frame", "layer": "arranger" }
]

Pass { arrange: false } to buildEdit to skip the arranger and see the edit exactly as written.

The arranger trades pieces for clarity. On three real 25 to 30 second videos under five skills, measured overlap between pieces was 11.6 seconds of 407 as the model wrote the edits and 0.8 seconds after the arranger. The cost was 17 of 112 pieces left out and 6 ended early. See Benchmarks.

The caption lane#

Captions are a part of the stage. The director never writes them, and a Captions line in an edit is ignored.

An app that already draws its own captions, as Reelify does, should keep doing so. For that, buildStage returns a caption lane: where captions may sit, and when they must be hidden.

json
[
  { "from": 0,    "to": 1.68, "y": 0.69,  "visible": true },
  { "from": 1.68, "to": 5.2,  "y": 0.345, "visible": true },
  { "from": 5.2,  "to": 6,    "y": 0.69,  "visible": true }
]

That is the lane for the one-line edit above. y is a fraction of the frame's height. Under a skill whose page state hides captions, the middle entry would have "visible": false.

captions optionResult
"host" or nullThe kit draws no captions. The host follows captionLane.
left out, or a record of propsThe kit draws a Captions component from the footage's timed words, in the skill's caption style, moved and hidden by the state. This is a preview.

Pictures#

The director never handles a file. It writes Show("the editor") on a word: a subject in a few words, or a picture's id. resolvePictures does the rest.

ts
import { buildEdit, type Media, type Pin } from "./motion-kit/src/index";

const media: Media[] = [
  { id: "editor", src: "assets/editor.webp", ratio: 1.78, about: "the editor with a timeline open", kind: "screen" },
  { id: "logo", src: "assets/logo.webp", ratio: 1, about: "the product logo", kind: "logo" },
];
const pins: Pin[] = [{ media: "editor", at: 12.4, for: 4 }];
const built = buildEdit(text, footage, skill, registry, { media, pins });
  • A picture is found by its id, or by the description that shares the most words with the subject.
  • How it is shown is decided from its shape. A logo becomes a small badge. Anything else becomes a large window on the board or the page, cropped towards its focus, and a wide picture travels across the rest while it is up.
  • A subject that matches nothing is left out, with a decision that lists the pictures the video does have.
  • A pin is the creator's own placement. A pinned picture is shown where it was pinned, whatever the edit says.

The result is written back as ordinary pieces, so the edit stays plain data.

Prompts and follow-ups#

FunctionReturns
directorSystem(registry, skill, { motion })The system prompt: the Motion Lang grammar, the skill's stage and rules, how much to place, and one signature per piece. Signatures show only the words and numbers a piece needs. Colours, sizes and curves are left out because the skill's config decides them.
directorBrief(reel, ask)The user message: the duration, the words with a time mark every few words, and the pictures that may be shown.
followUpBrief(reel, currentEdit, message)The same, plus the edit so far and what the creator said.

motion is an index into MOTION_LEVELS: captions only, less, balanced (the default), more, lots.

A follow-up answer is the whole edit again. It is a few hundred characters, and unchanged lines keep their ids. What changed is never taken from the model's own account. It is computed:

ts
import { changeSummary, diffEdits } from "./motion-kit/src/index";

const diff = diffEdits(before.edit, after.edit);   // { changes: [{ id, kind, what }], kept }
const reply = changeSummary(diff);                 // "Removed Headline "Second". 3 other pieces are untouched."

kind is added, removed or changed. A changed piece says which of content, timing and placement differ.

On three real 25 to 30 second talking videos under the five skills, 15 of 15 first edits and 12 of 12 follow-ups built on the first try. The median first edit took 1,604 tokens in and 215 out, in 2.9 seconds.

The audit#

auditOverlaps(mounted, pieceIds) measures what is on top of what in a mounted scene. It steps through time, takes each piece's visible box, and reports every stretch where two pieces share screen space or a piece runs off the frame.

ts
import { auditOverlaps, mount } from "./motion-kit/src/index";

const mounted = mount(host, compiled, fonts, assets);
const audit = auditOverlaps(mounted, built.edit.layers.map((l) => l.id));
// { seconds, overlapSeconds, offFrameSeconds, pairs: [{ a, b, seconds, from, worst }], offFrame: [{ id, seconds }] }

The audit knows nothing about the director, the stage or the arranger, and it only reports. It needs a browser, because it reads measured rectangles. The overlap numbers on this page came from it.

Reelify Motion Kit 0.1 preview. Built 2026-11-21.llms.txt · SKILL.md · 109 pages