Green-wireframe explainer
A code-rendered 9:16 explainer: near-black stage, one lime accent, isometric wireframe diagrams, dot-matrix HUD, and a bold caption that never shows more than two short lines. Every shot carries exactly one idea. Nothing is filmed, nothing is generated by an AI video model — it is drawn frame by frame.
reference.md (next to this file) holds every measurement behind the style and
the full template catalog. Read it once, then work from it.
The demo film is a shape, never a script
examples/containers.film.json shows how a finished film is built: chapter
cadence, shot length, caption rhythm, which template carries which kind of idea.
It is not a content template.
- Never render it as the answer to "make me a video about X". That is a failure, not a deliverable — it is a 1956 shipping-container film, not the user's topic.
- Never reuse its captions, years, names or chapter badges (
1956,THE BOX,NEWARK,MALCOLM McLEAN,58 BOXES…). - Every caption line must trace to a fact from the user's brief. If a line could be pasted into the demo unchanged, you have not written it yet.
- Keep the structure: six chapters, ~21 shots/min, 2-4 words per caption, one idea per shot — with the user's facts in every slot.
check.mjs enforces the mechanical half of this: it fails when a shot is
identical to a demo shot, or when more than a quarter of the caption lines also
appear in the demo.
Setup in a new project
node -v # 18 or newer
ffmpeg -version # any recent build on PATH
bash scripts/install.sh . # copies this skill to ./.agents/skills/wireframe-explainer
render.mjs installs @napi-rs/canvas into the skill folder by itself on the
first run, so no project-level npm setup is needed. If that fails, run
npm i @napi-rs/canvas inside the skill folder. Without install.sh, the skill
still works from wherever it was cloned — run node render.mjs from the clone.
Run a request in two phases
A request can be one line — "make me a video about X". You own the rest: you infer the angle, the facts and the runtime, and you say what you assumed. Never answer with a question list before producing the plan; put assumptions in the plan and let the user correct them there.
Phase A — plan (stop for approval)
- Script. Six chapters (more for long films, see the scale table): hook →
context → mechanism → cost → turn → answer. One sentence per shot, and that
sentence is the caption. Write it in
storyboard.md, not in your head. - Shots. One template or one compose scene per shot. Pick from the catalog
in
reference.md; if nothing fits, build the shot from primitives withtpl: "compose"(see below). Never force an idea into the wrong template. If the script needs something that is neither a primitive nor a built-in sprite — a dog, a washing machine, a dragon — draw it yourself and prove it reads (next section). Do this before the sheet, because the sheet is what the user judges. storyboard.md— start fromexamples/storyboard.template.md. A table, one row per shot:# | chapter | template | caption lines | dur | the idea.film.json— a mechanical transcription of that table. No new content.node render.mjs film.json --sheet --outdir stills— one labelled frame per shot, as a singlestills/storyboard.png.- Present and stop. Show the table plus the sheet path, say what you assumed, and ask for approval. Do not render video yet.
Skip the wait only if the user said "just make it", "no need to check" or similar
— then still write storyboard.md and the sheet, and mention both.
Phase B — build (after approval)
node verify.mjs film.json— validates the plan, then writes the labelled sheet and three full-size frames. It stops ifcheck.mjsfinds anything (bad template, duration, demo copy, caption that cannot fit, sprite that does not exist). This is the self-review command; use it, do not hand-roll it.- Look at every image it wrote and tick the six boxes it prints. Then fix whatever you cannot tick, and run it again. Repeat until all six are ticked. A frame you have not looked at is a frame you do not know.
- Render:
- one part:
node render.mjs film.json out/film.mp4 [--music bed.mp3] - long film:
node build.mjs out/film.mp4 act1.json act2.json ...ornode build.mjs out/film.mp4 film.json --parts 8
- one part:
ffprobethe result, extract two or three frames, then hand over the path with the runtime, shot count and what is still a guess.
Rendering runs at ~24 frames per second, so wall time ≈ 3× the film's length.
When no template fits: compose a scene
tpl: "compose" takes an ordered list of primitives — array order is draw order,
each element reveals on its own clock:
{
"tpl": "compose", "dur": 3.2,
"props": { "elements": [
{ "prim": "panel", "at": [360, 470], "w": 420, "h": 190 },
{ "prim": "tiles", "at": [360, 470], "cols": 12, "rows": 3, "cell": 18, "t0": 0.1 },
{ "prim": "arrow", "from": [150, 640], "to": [560, 640], "t0": 0.4 },
{ "prim": "badge", "at": [150, 640], "text": "RAW", "size": 20 },
{ "prim": "figure", "at": [260, 700], "h": 96, "t0": 0.3 },
{ "prim": "counter", "at": [470, 720], "from": 0, "to": 7200, "t0": 0.5 },
{ "prim": "callout", "at": [360, 350], "from": [420, 380], "text": "THE LINE NEVER STOPS" }
] },
"lines": ["ONE LINE", "SEVEN THOUSAND"]
}
Primitives: chip stack box rings figure label word text badge meter bars linechart dots tiles arrow callout counter panel lattice cross check.
at is the anchor in px on the 720×1280 canvas; t0 is when it appears (local
seconds); reveal is how long it takes (default 0.45). Full prop list in
reference.md.
Composing is how a 2-hour film stays in one style without 2500 hand-built templates: most shots reuse a template, the ones that do not get composed from the same primitives.
Characters and objects the primitives do not have
A dog, a washing machine, a dragon: nothing in the catalog draws them, and no template is close. Do not approximate with the wrong diagram and do not skip the shot. Draw the thing, in the same language as everything else: line art on a 100x100 grid, stroke only, feet or base near y=88.
Author it in sprites.json next to the film (project assets, reusable by later
shots):
{
"dog": {
"lines": [
[[26,50],[70,48],[73,56],[73,64],[30,66],[26,58],[26,50]],
[[70,48],[77,44],[84,38],[92,40],[98,44],[93,48],[84,48],[78,50]],
[[82,37],[86,28],[91,36]],
[[34,66],[32,86],[25,87]],
[[68,64],[70,86],[77,87]],
[[27,51],[19,45],[14,36],[16,29]]
],
"circles": [[89,42,1.5]]
}
}
Then use it like any other prop: { "prim": "sprite", "asset": "dog", "at": [360,560], "box": 300 }.
Built-ins ship for dog, washer, dragon; lines, circles or a raw SVG
d path also work inline, without a file.
The loop that stops it being a look-alike:
node sprite.mjs check sprites.json # geometry + duplicate check, exit 1 on a flop
node sprite.mjs proof sprites.json # contact sheet: each sprite, its name, its size
check fails a sprite that is blank, a flat dash, off the grid, one stroke long,
or more than 86 % identical to an existing one (a copied body with a new name).
proof is the part only you can do: open the sheet and ask, for each one —
- Is this that thing, with the label covered up? (a dog, not "a creature")
- Does it carry the one or two details that make it recognisable — ears, drum door, wing?
- Is its silhouette different from the other sprites in this film?
Cannot answer yes: change coordinates and run the two commands again. Budget
three rounds; if it still will not read at box: 200+, simplify the idea (a
badge or a symbol shot instead of a drawing) rather than ship a blob. When it
passes in isolation, check it again in the sheet at real size — that is the last
word.
Text that does not fit
Captions shrink themselves to stay inside the frame, but shrinking is a rescue,
not a plan: a 30-character caption at 32px is unreadable. check.mjs measures
every caption, annotation, chapter label and in-scene label against the frame and
reports the pixel overflow, so fix the words:
- captions: 2-4 words, ≤15 characters; two short lines beat one long one
- a caption that needs shrinking for a whole shot is a caption to rewrite
- in-scene
label/badge/text: keepatinside 60..660 and count the width the check reports; move the element left rather than shortening meaning away annotand chapter labels live in fixed HUD rows — long text will collide
How big can it get
| target | shots | how to build | note |
|---|---|---|---|
| 30 s | ~12 | one film.json | a hook and three beats |
| 60 s | ~22 | one film.json | the default ask |
| 3 min | ~65 | one film.json | the reference length |
| 10 min | ~210 | 3-4 parts | build.mjs --parts 3 |
| 30 min | ~630 | 8-10 parts, chapters→acts | review part by part |
| 2 h | ~2500 | one film.json per act, 20-40 parts | render overnight; ~3-5 h CPU, ~200-400 MB |
Long-form rules: keep 20-22 shots/min (faster feels like noise over 2 hours),
promote chapters to acts with their own film.json and their own HUD badge, and
render/review one part at a time so a bad act never costs the whole render.
film.json
{
"size": [720, 1280], "fps": 30,
"chapters": [{ "badge": "1956", "label": "THE QUESTION", "step": 1, "of": 6 }],
"shots": [
{
"ch": 0, // index into chapters (drives the top-left HUD)
"tpl": "compare", // template name (or "compose"), see reference.md
"dur": 3.2, // 1.5-4.5 s (mean 2.7)
"props": { },
"lines": ["ONE SHIP", "TOOK SIX DAYS"], // 1-3 caption lines
"annot": "PORT NEWARK · 1966", // optional dot-matrix line, top centre
"big": { "text": "SPEED", "y": 340 }, // optional big dot-matrix word
"enter": "pop", // pop (default) | hard | fade
"fade": true // optional fade in/out on this shot
}
]
}
A caption line can carry keywords: {"text": "SO HE CHOSE SPEED", "hi": ["SPEED"]}
paints those words lime; {"text": "...", "color": "lime"} paints the whole line.
\n inside a line makes a two-row block.
The rules that make it look like the reference
- One idea per shot. If a shot needs two diagrams, it is two shots.
- 2-4 words per caption line, 10-15 characters. 62 px bold sans, white, centred, bottom-aligned at 80.5 % height, line step 1.3. Keyword in lime.
- Lines advance inside the shot, they do not all sit on screen: 1.0-1.6 s each, hard swap with a 120 ms pop. This is what keeps a still shot alive.
- Mean shot length 2.7 s, 20-22 cuts per minute, hard cuts only.
- The HUD is continuity: chapter badge (year or number, 44 px dot-matrix, lime), chapter label under it, six progress ticks. It changes only when the chapter changes.
- Motion is small and continuous: objects scale/fade in over 0.45 s, layers assemble bottom-up, counters tick, a walker walks, a needle sweeps, a sweep bar crosses a pixel field. No camera moves, no rotation showmanship.
- Red is only for failure, loss, conflict. Lime is the accent; everything else is white or grey. Never introduce a third hue.
- Empty space is the design. Geometry occupies the middle third; HUD at the top, caption at the bottom. If a frame feels full, delete an element.
- Uppercase Latin only in the dot-matrix layer (A-Z, 0-9 and basic punctuation). Captions are a normal sans font and take accents fine.
Do not
- Do not use real footage, AI-generated video, stock images, or fonts other than the bundled dot-matrix renderer and the caption sans.
- Do not put a wall of text on screen, and do not caption what the diagram already says word for word.
- Do not add sound design unless asked; one music bed via
--musicis enough. - Do not ship without looking at the stills.
- Do not answer a video request by rendering, re-labelling or lightly editing
examples/containers.film.json. If the output could pass for the demo, it is wrong. - Do not jump to Phase B without a
storyboard.mdand a--sheetimage. The user approves pictures, not JSON. - Do not use a template that misrepresents the idea just because it exists — compose the shot instead, or draw the object as a sprite.
- Do not render video with an unticked verify box. If text clips, the words are wrong, not the font size.
- Do not ship a sprite you have not seen in the proof sheet and again in the storyboard sheet at real size.