name: dalang description: Dalang — turn any topic into a finished animated video (narration, free local AI voice, music, sound effects, HyperFrames visuals): script → voice → per-word timing → visuals, each stage gated by the agent itself. Any topic, language and platform (Shorts, Reels, TikTok, YouTube, Instagram), stylized and true to the real thing. Use whenever the user asks for a video, animation, explainer or short from a topic, idea, article or notes ("make a video about X", "bikinin video tentang Z"), or to borrow a reference video's style ethically. Not for cutting or subtitling existing footage.
Dalang — from topic to video
Mode and look, asked in the Brief, locked after it (references/looks.md). Mode: Express (default; 2.5D in Canvas 2D, references/express.md) or Studio (precision: three.js, a code-first hero, reference boards, benchmark, review). Look: the isometric family (isometric-world main, cutaway, blueprint) or object-studio (a study model on a pale sweep). A 3D look never moves a film to Studio. A look change after Step 6 starts: stop every builder, rewrite SPEC.md, restart every group in one message; narration and voice stay.
Principles
7 is Studio's; the rest hold in both modes.
- Visual thesis first (
references/looks.md): the look's numbered rules decide every frame and QC. object-studio: pale studio, one accent, whole hero 60–70 %, one-input machine, live instruments, held shots. - Words first, pictures last: script approved → voice → every word timed → visuals.
- Every change on screen lands on a word, from the timing data.
- The subject acts in every shot; a camera over a still is a slideshow.
- Measure, don't guess: every reported number comes from a log or a script.
- Every question up front, no user gate. All questions in Step 1; nothing later waits for the user. Pass each of the 4 gates yourself once its checks pass, say so in one line, run to the finished film. A later change is a new round. No final-quality render before the last (Gate 3's style frames and hook sample excepted).
- Stylized, true to reality. One look per film; no footage, photoreal render, generated image or clip. Parts, proportions, scale and behaviour match a real reference (
references/visual-direction.md§1). - Top studio, never overdone: style frames, polish, review rubric. Drafts at 10 fps; the final
--quality high --fps <brief fps>passes every check. - Free by default. Paid or metered services (ElevenLabs, HeyGen) only when the user asks, labelled "paid". Prefer commercial-OK licences; say when one is not.
General purpose. Any topic, language, platform. Never open another video/<slug>/ folder; nothing carries over except a series kit the user picks (references/brief.md "Series kit"). engine/three/ is a toolbox, not a limit: a subject it lacks is modelled from its own law or shown in a look without 3D.
Language. Chat in the user's language. Every AskUserQuestion is in English. Never infer a language from a name.
Work fast, spend few tokens
-
One video = one session; state lives in the files. Resume:
node <skill-dir>/scripts/state.mjs next,BRIEF.md, the end ofPRODUCTION.md. -
Subagent types, when listed: builders (fix rounds, script, voice)
dalang-builder, every verdictdalang-checker, factsdalang-research; else general-purpose. -
Skill version: say
next'sDALANG v…first; nevergit. -
Read lazily: each step, only what
state.mjs next --printprints, whole, in one call (Step 0 prints Step 1 too; a firstapprove <n>prints the next step: nonextturn, no--stepahead); "Look up when needed" only when sent there. Never read a reference, engine README orlessons.mdwhole, or a section twice; of/hyperframes, only the needed guides. -
Small output: filter
--json; never printwords.json,*.response.jsonor full logs; background output by bytes (tail -c 1500). Scene changes areEditcalls, neversed -ior a whole-file Write. -
Scene code stays in builder subagents. The main agent never writes or reads
src/orassets/*.js(generated data aside; style frames go to a builder). Pilot, each group, assembly and each fix round go to a new builder (last report + paths, its budget inlook-build.md/express.md). The reviewer is never a builder. -
Images stay in subagents. The main agent never
Reads a still, strip, sheet, scope or style frame: a subagent gets the paths andnext's "For the subagent" command, returns a text verdict. Exception: the author ofstyle-frames/src/opens eachreview/refs-board-<frame>.jpgonce before its first write. -
Model per job, never asked:
state.mjs nextprints each step's subagent jobs with model and effort (state.mjs models: all, and what top/mid/light mean). Escalate, never repeat. A failed job (red, unusable, a P0 left) goes to a new agent one notch up: effort (low → medium → high), then model (light → mid → top); top · high caps it: a P0 left is classified (hero-asset.md§3). Never down or twice; a clean job is never rerun. ≤ 3 copy or timing fixes: one notch down. Log each setting. -
The main agent orchestrates, never does the work. Your turn re-reads the session (~10× a subagent's); a loop (write ↔ lint, take ↔ retake, fix ↔ check) runs inside one job (Steps 3–4 too); each reply wakes you: a job runs to its verdict; N jobs started together end that message with
wait.mjs . --expect N(timeout: 600000): one turn, one line. A runner (express.mjs/studio.mjs <step>) is one foreground call (timeout: 600000) when it ends within ~9 min, never a chain or a poll. An Agent prompt is the job and paths (≤ 15 lines; it reads vianext --step <n> --sub). Checkers write their verdict file, buildersreview/reports/<job>.md; both reply briefly, never retyped.state.mjs logrides on the step's command with&&, never its own turn. -
Compact:
workspace.mjs initsets auto-compact (200K); at Gates 2–4 say once that/compactis safe. -
Parallel by default. Independent jobs start in one message, each agent on its own files. Heavy jobs (VoxCPM, render, check, snapshot) run alone, never beside a model job; queue with
while kill -0 <pid>. Together: preflight ‖ the topic question; reference ‖ the research job; after Gate 1 the voice job ‖ assets, never scenes; at Gate 2 planner and music; Step 6 Studio: pilot, then all groups; Express: every group at once, no pilot (a clean take passes Gates 1–2 itself viaexpress.mjs after-voice; the planner runsexpress.mjs scaffold .); Step 7 the draft checks, then reviewer ‖ quiz ‖ Set / Reality check; Step 8POST.mdwhile rendering. -
Cheap before expensive:
--samplebefore a take;--from-responsewhen only{}moves; snapshots while iterating; fixes batched per round; QC at--fps 10 --quality draft; one final render. -
The user's ask wins: flag a rule that defeats it in one line; never pass it on silently.
-
Short messages: what changed, what to decide, links; at a wait, the next gate's clock time; a step over ~2 min gets an estimate.
Project files (video/<topic-slug>/)
Log with state.mjs log "<step> | <output> | <problems or ->". The folder is the HyperFrames project; run commands from it. Edit only *.tpl.html; node <skill-dir>/scripts/fill_times.mjs src/index.tpl.html index.html regenerates index.html (never by hand, no second root .html).
Steps
| Step | Do | Ends with | Read (references/) |
|---|---|---|---|
| 0 Setup | preflight.mjs, fix what it reports, project folder | PRODUCTION.md | brief.md §0 |
| 1 Brief | topic first, every question now | BRIEF.md | brief.md §1 |
| 2 Reference (optional) | measure craft, never copy | reference-measurements.md | measure-reference.md |
| 3 Script | research, writer, read-through jobs; approve 1 runs the lints | Gate 1 | script-voice.md §3 |
| 4 Voice | one voice job; after-voice pads, Gates 1–2 | Gate 2 | script-voice.md §4 |
| 5 Look | SPEC.md, hero, storyboard, assets, style frames, benchmark | Gate 3 | look-build.md §5 |
| 6 Build | builders, times from BEATS/WORDS, audio mix | index.html, lints clean | look-build.md §6 |
| 7 QC | draft, checks, strips, reviewer, quiz, fix rounds | Gate 4 | qc.md §7 |
| 8 Final | assets check, high render, re-check | final.mp4, POST.md, report | qc.md §8 |
At every step: gates go through state.mjs approve <n> --by agent (in order; it runs the gate's checks and refuses with their errors; a gated file edited later is STALE until re-approved); BRIEF.md rules format and language; a recorded or cloned voice only with the speaker's permission; pages only in Claude's built-in browser, never the user's Chrome; log every step and problem in PRODUCTION.md; series feedback via series.mjs note, never memory.
Autonomous mode
If the user gives a topic and leaves, use what they said, else: Express; YouTube 16:9, 60–90 s (Shorts 9:16 for short or ≤ 60 s); their language; object-studio (Studio: isometric-world); "modern balanced"; general audience; VoiceStudio, default voice, per brief.md Step 0 (not ready by Step 4: stop and say so). Write "defaults used" first in PRODUCTION.md, log each decision, finish the film. Ship rules: references/qc.md "User away" (an audio_qc.mjs exit 2 that stays is named in the hand-off, never a pass). Skip install offers (log them). Never edit the installed skill.
When something goes wrong
grep -n -i '<word>' <skill-dir>/references/lessons.md.