[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M75W6RXZMSP295N9M166Q0VS":3,"skill-same:01M75W6RXZMSP295N9M166Q0VS":165},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":14,"repositoryHtmlUrl":27,"repositoryHomepageUrl":6,"ownerHtmlUrl":28,"ownerBlogUrl":6,"ownerDescription":29,"updatedAt":30,"install":31,"resources":44},"01M75W6RXZMSP295N9M166Q0VS","compose",null,"Turn captured product footage into a finished demo video - a 1440p60 master with the app in a framed window on a themed backdrop, a feathered spotlight that glides between proof moments with a short label at each, blur and push transitions, chapter title cards, persona-switch and end cards, dead-hold trims and a mechanical still-check, an optional 9:16 vertical social cut whose crop follows the action with headline and burned captions, plus a sound layer timed from the capture's own events (UI sound effects, an optional ducked music bed with cuts on the beat, optional narration whose anchor words fire the spotlights, a loudness-checked mix) and WebVTT captions and chapters. Takes a demo:capture take directory (per-chapter mp4 plus events.json) and one JSON config carrying the brand, chapter titles, card copy and any label overrides; everything else is derived from the capture. Use when asked to \"compose the demo\", \"assemble the captured chapters\", \"add spotlights and callouts to the footage\", \"put title cards on the demo\", \"cut the demo together\", \"make the walkthrough video from the takes\", or to re-cut one chapter after re-shooting it, or to \"add narration\", \"add a voiceover\", \"add music\", \"add sound effects\" or \"add captions\" to a demo, or to \"make a vertical cut\", \"make a 9:16 version for socials\", \"make a reel or short of the demo\". Renders through HyperFrames. Does not record anything; pair it with demo:capture.","stevengonsalvez\u002Fainb-toolkit","stevengonsalvez","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F9320602?v=4","01M75W59QRYZYANWY3XG8CJB1P","Steven Gonsalvez","01M75W59RD5YW1RT67BDV0EAZF",1,"MIT","https:\u002F\u002Fgithub.com\u002Fstevengonsalvez\u002Fainb-toolkit\u002Fblob\u002Fmain\u002Fplugins\u002Fdemo\u002Fskills\u002Fcompose\u002FSKILL.md",[],[],"2026-11-12 13:55:43",false,"---\nname: compose\ndescription: Turn captured product footage into a finished demo video - a 1440p60 master with the app in a framed window on a themed backdrop, a feathered spotlight that glides between proof moments with a short label at each, blur and push transitions, chapter title cards, persona-switch and end cards, dead-hold trims and a mechanical still-check, an optional 9:16 vertical social cut whose crop follows the action with headline and burned captions, plus a sound layer timed from the capture's own events (UI sound effects, an optional ducked music bed with cuts on the beat, optional narration whose anchor words fire the spotlights, a loudness-checked mix) and WebVTT captions and chapters. Takes a demo:capture take directory (per-chapter mp4 plus events.json) and one JSON config carrying the brand, chapter titles, card copy and any label overrides; everything else is derived from the capture. Use when asked to \"compose the demo\", \"assemble the captured chapters\", \"add spotlights and callouts to the footage\", \"put title cards on the demo\", \"cut the demo together\", \"make the walkthrough video from the takes\", or to re-cut one chapter after re-shooting it, or to \"add narration\", \"add a voiceover\", \"add music\", \"add sound effects\" or \"add captions\" to a demo, or to \"make a vertical cut\", \"make a 9:16 version for socials\", \"make a reel or short of the demo\". Renders through HyperFrames. Does not record anything; pair it with demo:capture.\n---\n\n# demo:compose\n\nAssemble captured chapters into one demo video. Capture it elsewhere.\n\n```\ndemo:capture takes\u002F ──▶ compose.mjs ──▶ projects\u002F\u003Csegment>\u002F  (HyperFrames)\n  \u003Cch>.mp4                  ▲              │\n  \u003Cch>-events.json      config.json     render.sh ──▶ out\u002Fseg\u002F\u003Csegment>.mp4\n                        (brand, copy)      │      (PNG frames, packed lossless)\n                                        check.mjs  ──▶ hit \u002F miss per mark  ◀── THE GATE\n                                           │\n                                        concat.sh ──▶ out\u002F\u003Cname>.mp4 + montage  (seams dissolved; the ONE lossy encode)\n```\n\nPairs with **demo:capture** (the sibling skill in this plugin), which produces the take\ndirectory this skill consumes. Rendering is **HyperFrames**: load `hyperframes-core` before\nediting the generated HTML, and `hyperframes-keyframes` \u002F `hyperframes-animation` before\nchanging the motion. The generated composition already satisfies the core contract (standalone\nroot, one paused GSAP timeline keyed to `data-composition-id`, `@font-face` for every named\nfamily, clip timing on the `\u003Cvideo>` and not on an ancestor).\n\n## Run\n\n```bash\nS=\"$SKILL_DIR\"   # this skill's own directory\nnode \"$S\u002Fscripts\u002Fcompose.mjs\" my.config.json            # generate every segment project\nbash \"$S\u002Fscripts\u002Frender.sh\"  my.config.json             # render each one, foreground, resumable\nnode \"$S\u002Fscripts\u002Fcheck.mjs\"  my.config.json             # THE GATE: hit\u002Fmiss per mark, exit 1 on miss\nbash \"$S\u002Fscripts\u002Fconcat.sh\"  my.config.json             # final mp4 with sound, captions, contact sheet\n```\n\nEvery command takes optional segment names to limit the work (`compose.mjs cfg.json consent`).\n`render.sh` skips a segment whose `out\u002Fseg\u002F\u003Csegment>.mp4` is newer than its `index.html`, so a\nkilled run resumes. A segment is rendered aside and swapped in only once it succeeds, so a failed\nre-render keeps the previous one, and it must hold its planned length times the frame rate\n(60fps final, 30fps draft, passed to HyperFrames as `--fps`) or render.sh fails it.\nRenders run one at a time in the foreground with `workers` capture processes (default 4) under a\ntimeout of 120s plus 10s per second of segment at 720p30, scaled by pixel rate (80s per second at\nthe 1440p60 master): a harness that kills long background tasks for low memory will otherwise\ntake the whole batch out. The render itself is `scripts\u002Fhfrender.mjs` (render.sh and the\nburned-caption cut both use it); its timeout is node's own, so it holds on stock macOS too.\n\nA worked example is `examples\u002Fferry\u002F`: a made-up ferry operator's three-page app\n(`serve.mjs`, `app\u002F`), the `beats.mjs` that films it with demo:capture, and\n`ferry.config.json` with its fonts. Every path in it is relative to that directory, so copy\nthe directory somewhere writable and run it end to end:\n\n```bash\ncp -r \"$S\u002Fexamples\u002Fferry\" \u002Fscratch\u002Fferry && cd \u002Fscratch\u002Fferry   # CAPTURE_DIR: the demo:capture skill dir\nnode serve.mjs &                                            # app on 127.0.0.1:7744\nnode \"$CAPTURE_DIR\u002Fscripts\u002Frun.mjs\" beats.mjs               # takes\u002Fdepartures.mp4, takes\u002Ffares.mp4\nnode \"$S\u002Fscripts\u002Fcompose.mjs\" ferry.config.json && bash \"$S\u002Fscripts\u002Frender.sh\" ferry.config.json\nnode \"$S\u002Fscripts\u002Fcheck.mjs\" ferry.config.json && bash \"$S\u002Fscripts\u002Fconcat.sh\" ferry.config.json\n```\n\nAt the default 1440p60 master the ferry renders in about 15 minutes on an 8-core host without a\nGPU (measured under load, see The look); `\"quality\": \"draft\"` in the config makes it about 3.\n\n## Config\n\nOnly `takes` and `chapters` are required. Everything below shows the default where there is one.\n\n```jsonc\n{\n  \"name\": \"my-demo\",                  \u002F\u002F final file is out\u002F\u003Cname>.mp4\n  \"takes\": \"\u002Fscratch\u002Ftakes\",          \u002F\u002F demo:capture output dir (required)\n  \"out\": \".\u002Fcompose\",                 \u002F\u002F work dir: projects\u002F, out\u002F, work\u002F\n  \"format\": \"landscape\",              \u002F\u002F or \"square\" or \"vertical\"; see Playback pace and format\n  \"quality\": \"final\",                 \u002F\u002F 2560x1440 (square 1440x1440, vertical 1080x1920) at 60fps; \"draft\" = 1280x720 (1080x1080, 720x1280) at 30fps\n  \"width\": 2560, \"height\": 1440,      \u002F\u002F default from format and quality; set one to override the canvas\n  \"frame\": {                          \u002F\u002F the framed window; false = full-bleed footage\n    \"style\": \"window\", \"padding\": 80, \"radius\": 24, \"shadow\": 1,\n    \"backdrop\": \"glow\",               \u002F\u002F \"glow\" (gradient plus accent light), \"gradient\" or \"solid\"\n    \"grain\": 0.045, \"tilt\": 9 },      \u002F\u002F tilt: degrees the window arrives at, eased flat\n  \"spotlight\": { \"feather\": 18, \"glide\": 2.5, \"sweep\": true, \"blur\": 2 },\n  \"transitions\": { \"blur\": 0.5, \"whip\": 0.4 },  \u002F\u002F seam lengths in seconds; false = hard cuts\n  \"workers\": 4,                       \u002F\u002F hyperframes capture processes\n  \"crf\": 16,                          \u002F\u002F the one lossy encode\n  \"theme\": {\n    \"bg\": \"#101114\", \"surface\": \"#1B1D22\", \"accent\": \"#C8CDD6\",\n    \"highlight\": \"#9AA3B2\", \"text\": \"#FFFFFF\", \"muted\": \"#B5BAC4\",\n    \"fonts\": {                        \u002F\u002F omit entirely to use the generic sans stack\n      \"display\": { \"file\": \"fonts\u002Fx.woff2\", \"family\": \"X\", \"weight\": \"600 700\" },\n      \"body\":    { \"file\": \"fonts\u002Fy.woff2\", \"family\": \"Y\", \"weight\": \"500 600\" }\n    }\n  },\n  \"scrim\": \"rgba(0,0,0,0.60)\",        \u002F\u002F what the spotlight dims everything else to\n  \"cards\": {\n    \"title\":  { \"kicker\": \"…\", \"title\": \"…\", \"sub\": \"…\", \"dur\": 3 },\n    \"switches\": [ { \"id\": \"switch-card\", \"before\": \"\u003Cchapter>\", \"kicker\": \"…\", \"title\": \"…\", \"sub\": \"…\", \"dur\": 2.5 } ],\n    \"end\":    { \"kicker\": \"…\", \"title\": \"…\", \"sub\": \"…\", \"dur\": 3 }\n  },                                  \u002F\u002F any card also takes \"narration\": \"…\" (see Sound)\n  \"chapterCardDur\": 2.0,\n  \"defaultPersona\": \"\",               \u002F\u002F per-chapter `persona` overrides it\n  \"chapters\": [\n    { \"name\": \"\u003Cchapter>\",            \u002F\u002F must match \u003Cchapter>.mp4 in takes (required)\n      \"title\": \"The live board\",      \u002F\u002F default: chapter name, title-cased\n      \"persona\": \"Foot passenger\",\n      \"labels\": [\"…\"],                \u002F\u002F default: the capture's own mark labels. One per mark.\n      \"cuts\": [[10.98, 11.2]],        \u002F\u002F extra source-time cuts, e.g. a splash screen\n      \"cardDur\": 2.0,\n      \"speed\": { \"travel\": 1 },       \u002F\u002F per-chapter override of the global speed\n      \"narration\": { \"intro\": \"…\",    \u002F\u002F spoken over the chapter card; see Sound\n        \"marks\": [\"The {@next}next sailing runs late.\", null] } }  \u002F\u002F one per mark, null = none\n  ],\n  \"speed\":  { \"travel\": 2, \"rampMs\": 250 },\n  \"cut\": \"continuous\",                \u002F\u002F or \"beats\": one still per mark, held for its line; see Beat-paced cut\n  \"beats\":  { \"pad\": 0.6, \"lead\": 0, \"cardHold\": 2.5, \"hold\": 3, \"fade\": 0, \"floor\": 0, \"min\": 3, \"max\": 6, \"lineMax\": 7 },\n  \"clips\": false,                     \u002F\u002F each chapter also as its own mp4 (default true with \"cut\": \"beats\")\n  \"pace\": 1,\n  \"targetDuration\": 45,               \u002F\u002F optional, seconds, whole video\n  \"hold\":   { \"min\": 1.5, \"max\": 2.2 },\n  \"fadeLead\": 0.25,                   \u002F\u002F spotlight fades in this long before the mark (or once the zoom settles)\n  \"deadHold\": 2.0,                    \u002F\u002F freezes longer than this get trimmed\n  \"layout\": { \"safeMargin\": 64, \"labelHeight\": 48, \"labelGap\": 14, \"maxLabelWords\": 6 },\n  \"check\":  { \"litRatio\": 0.80, \"dimRatio\": 0.62, \"contentSd\": 8, \"driftMax\": 12, \"alignMax\": 7, \"glideStep\": 0.2, \"calloutMin\": 12, \"cutEdge\": 0.9 },\n  \"audio\": {                          \u002F\u002F optional; \"audio\": false turns the sound layer off\n    \"sfx\":       { \"level\": 0, \"click\": true, \"type\": true, \"zoom\": true, \"mark\": true },  \u002F\u002F or false\n    \"music\":     { \"file\": \"bed.mp3\", \"level\": -18, \"duck\": 11, \"fadeIn\": 1.5, \"fadeOut\": 2.5,\n                   \"start\": 0, \"snap\": true },          \u002F\u002F no file, no music\n    \"narration\": { \"tts\": \"hyperframes\", \u002F\u002F or \"deepgram\" (Aura-2; key from DEEPGRAM_API_KEY)\n                   \"voice\": \"af_heart\",   \u002F\u002F deepgram default \"aura-2-thalia-en\"\n                   \"speed\": 1, \"model\": \"medium.en\",\n                   \"lead\": 0.3, \"gap\": 0.35, \"tail\": 0.35, \"level\": -16 },\n    \"loudness\":  { \"target\": -14, \"truePeak\": -1, \"tolerance\": 1 },\n    \"captions\":  { \"burn\": false, \"maxWords\": 7 }   \u002F\u002F burn: true by default for vertical (in the picture)\n  }\n}\n```\n\nPaths in the config (`takes`, `out`, font `file`) resolve against the config file's own\ndirectory. `sub` on a card is raw HTML so `\u003Cb>` can pick out a word in the highlight colour;\nevery other string is escaped.\n\n## Playback pace and format\n\nHow fast the **finished video** plays, re-timed from footage you already have: no re-shoot.\nThis is separate from demo:capture's filming `pace`, which changes what the camera records.\n\n```\nsource   ──travel──╮ proof window ╭──travel──╮ proof window ╭──\nspeed      2x    ramp    1x     ramp   2x   ramp    1x     ramp\n                    mark t - fadeLead ... end of hold\n```\n\n- **Speed ramp, on by default.** Inside each proof window (from `fadeLead` before a mark to the\n  end of its hold) and during every camera move (each zoom and wide, from the `camera` events\n  demo:capture logs) footage always plays at 1x, so a zoom keeps the easing it was filmed with.\n  Everything else, navigation, loading, cursor travel, plays at `speed.travel` (2x). Speed changes over `speed.rampMs` (250ms of\n  output time) each side, so it reads as a ramp and never as a jump cut. A gap too short for\n  two full ramps gets a shallower peak instead. Marks and spotlights land on the re-timed\n  footage; the still-check runs on it. Chapter cards and holds are never sped up.\n  `\"speed\": { \"travel\": 1 }` turns the ramp off and plays everything at 1x, exactly as before\n  the ramp existed. Set `speed` globally, override any key per chapter with `chapters[].speed`.\n  `speed.travel` must be between 0.1 and 4, `speed.rampMs` a number >= 0 (0 = hard speed\n  change). Measured on the ferry example: before camera moves were protected, the zooms into\n  marks played at 1.06-1.20x on average and the wides at 1.59-1.76x; all eight now play at\n  1.00x. Takes filmed before demo:capture logged camera events keep the old timing. There is no proof-speed setting: the spotlight timing and the still-check both rely\n  on proof windows playing at 1x, so any other `speed` key is refused.\n- **`pace`** (default 1): one multiplier on card durations (title, switch, end, chapter\n  cards), `hold.min`\u002F`hold.max`, `fadeLead` and every fade and card-motion timing. `1.3` gives\n  a calmer cut, `0.8` a brisker one. It does not change footage speed. A paced hold stops where\n  the footage stops being still (the next camera move), so a spotlight never outlives its pose;\n  at `pace: 1` holds are exactly the unpaced rule.\n- **`targetDuration`** (seconds, optional): raises the global `speed.travel`, capped at 4x,\n  until the whole video (cards included) fits, and prints `speed.travel` and the planned length.\n  It never speeds up proof windows, cards or holds, so a target shorter than those can reach is\n  reported, not met. Chapters with their own `speed.travel` keep it. It measures every chapter\n  that has footage, even when the command names only some, so a partial re-run picks the same\n  speed; chapters not filmed yet are left out with a warning.\n- **`format`**: `\"landscape\"` (default), `\"square\"`. At `quality: \"final\"` (default) that is a\n  2560x1440 or 1440x1440 master at 60fps; `\"draft\"` gives 1280x720 or 1080x1080 at 30fps, about\n  8x less render work, for iterating on copy and timing. Footage stays 16:9.\n  For square, each proof window gets its own framing: footage scaled and placed so the spotlit\n  rect (from `events.json` `rect` and `cam`) fits with room for its label, between the\n  cover scale (fills the square, crops the sides) and the contain scale (whole frame, bands\n  above and below in `theme.bg`). Framing holds still while a spotlight is lit and eases between\n  windows; overlapping windows share one framing.\n- **`format: \"vertical\"`**, the social cut: 1080x1920 at 60fps (720x1280 at 30 as a draft),\n  laid out at 1:1 in three bands. Top: the chapter's persona and title as a headline, from 220px\n  down (clear of the platforms' top bar). Middle: the window, 1000x820 at y 520, cropping the\n  16:9 footage. Bottom: burned captions, the lowest edge 420px above the bottom (clear of the\n  caption and action UI), 60px in from the left and 120px from the right (the side rail). The\n  captions are the narration's words with the spoken one picked out (captions.mjs cues), or\n  without narration each spotlight's label while it is lit; the small label by the spotlight is\n  then not drawn, the caption is the label at a size a phone reads. Title, switch and end cards\n  fill the 9:16 frame and carry their narration as captions. In-picture captions are the\n  vertical default of `audio.captions.burn`: the .vtt is then not written (uploaded beside the\n  video a platform shows them twice) and concat.sh burns nothing more; `\"burn\": false` leaves\n  the picture without them, keeps the labels by the spotlights and writes the .vtt. A caption\n  wraps anywhere rather than run past the safe width (a 91-character URL label wrapped to four\n  lines inside it, looked at), and compose warns on a caption over about 80 characters (the band\n  under the window holds two lines; that URL rose over the window's bottom edge) and on a chapter\n  title over about 100, where the headline reaches the window.\n  The crop follows the current target on a critically damped spring (omega 9.43 rad\u002Fs, Cap's\n  screen spring as a constant): each click and typed field, switched 0.8s before the press so\n  the crop is already there when the pointer glides in and nothing enters from off-frame, and\n  each group of spotlights, switched 0.8s before it lights. Presses less than 0.8s apart share\n  one view, of their union (open a menu, pick an option): each switching on its own pulled the\n  crop toward the second before the first landed, the first press 2,503px off the crop on a probe\n  with two clicks 0.3s apart; now both inside. From a spotlight's fade-in to the end of its\n  fade-out the crop is pinned to the spotlight's view, the spring eased onto it over the last\n  0.2s rather than cut (it was 3.1px and 4.3px short on ferry, a visible snap before), and a\n  press that lands outside a pinned crop is warned about: the crop does not follow the pointer.\n  From rest the spring never overshoots, but a retarget while it still moves can carry it past\n  the goal, so every frame is clamped onto the footage: ferry's fares showed an 85px strip of\n  backdrop beside the footage for a moment before; now none. Views zoom past the cover scale onto\n  a small target, up to 2 design px per CSS px for a 2x take (the take's own pixels at the\n  1080x1920 master). The limit is in design px, so a draft frames exactly as the master: it was\n  in canvas px, and a 96x40 button zoomed 3x in the draft against 2x at the master; now 2x in both.\n  A spotlight's cut-out and label live inside the crop, so they move with it.\n\nMeasured on the ferry example, filmed fresh (two chapters, five marks, 3s title and end cards),\nwith camera moves at 1x:\n\n| settings | video length | still-check |\n|---|---|---|\n| `speed.travel: 1` | 31.60s | 5\u002F5 |\n| default (2x travel ramp) | 28.00s | 5\u002F5 |\n| `format: \"square\"`, default ramp | 28.00s | 5\u002F5 |\n| `format: \"vertical\"`, default ramp, with the transitions below (landscape: 28.75s) | 28.77s | 5\u002F5 |\n| `format: \"vertical\"`, narrated | 34.60s | 5\u002F5 |\n\nPlaying the camera moves at 1x added about 1.5s to the default cut (26.4s before).\n\nThe ferry app is quick, so travel is a small share of it; the saving grows with loading and\nnavigation time.\n\nHow it works: `compose.mjs` writes each chapter's footage already cut and re-timed (one ffmpeg\npass: `select` for the kept ranges, `setpts` with the piecewise speed curve, `fps` at the output\nrate, a lanczos scale to the pixel size the footage is shown at, written lossless), so the\nHyperFrames project holds one plain `\u003Cvideo>`. Shown size is the take's CSS viewport times the\nwindow scale, the canvas zoom and the largest square view, capped at the take's own pixels, so\nthe browser at most scales it down (between square views). A deterministic take (demo:capture's default: 2560x1440 at 60fps,\n`dpr` and `fps` in its events.json) enters the default framed 1440p60 master at 2240x1260 (one\nlanczos downsample, x0.875) and full bleed (`frame: false`) at its native 2560x1440, and at 1x\nevery source frame plays. At `quality: \"draft\"` it is downsampled to the 720p30 window. An RGB\ntake is written with libx264rgb, so no colour conversion happens before concat.sh's single encode.\nRects and camera boxes stay in CSS px, whatever the density. At a constant whole-number speed it\nnudges each piece by under 1\u002F60s so source frames never sit on a half frame, which otherwise made a 1x\nwindow duplicate then drop a frame. The spacing it keeps clear is the take's own: at 30fps output a\n60fps take lands two source frames per output frame at 1x, and assuming 30 put one of each pair on the half\n(measured on ferry, a source-index marker per frame: 1 duplicate-and-drop pair per chapter inside\n1x windows, 0 once the take's fps is used).\n\n## Beat-paced cut\n\n`\"cut\": \"beats\"` paces the film one line per screen instead of playing the footage. One beat is\none screen, one callout and one line:\n\n```\nlines spoken and measured first ─▶ beat = lead + line + pad (whole frames) ─▶ jump cut ─▶ next beat\nchapter card (cardHold, silent) ─▶ beat ─▶ beat ─▶ ... ─▶ seam into the next chapter\n```\n\n- **A filmed beat** is the still of its mark's own frame (the mark's `t`, or once a camera move\n  into it has settled if that is later, kept inside the take; extracted once at the size it is\n  shown, lanczos), in the framed window, with its spotlight irising in and its callout (the mark's\n  label) popping in at the cut. It holds for its narration line plus `beats.pad` (0.6s), the line\n  starting `beats.lead` (0) after the cut; a beat with no line holds `beats.hold` (3s). A line's\n  `{@anchor}` does nothing here: the spotlight is up from the cut and the line starts at `lead`. Nothing is sped up and nothing travels on screen: beats meet in hard cuts, or\n  a `beats.fade` micro-fade of 1 to 4 frames. The first filmed beat after a chapter card brings\n  the window in (tilted, eased flat over 0.6s) and lights after it. `beats.floor` (0, off) is the\n  shortest any beat holds, with a line or without, a slide or a split: a short line's pad grows\n  to fill it (a first beat with no card counts the seam into it, as `min` and `max` do). Compose\n  warns when a beat falls outside `beats.min`-`beats.max` (3-6s) and when a line runs over\n  `beats.lineMax` (7s): split it. The last beat holds through the seam into the next segment, so its pad stays clear\n  of the transition; with a music bed the card takes the beat pad, or with no card the last beat.\n  The whole chapter is laid out in whole frames and each beat written as a clip that starts on\n  its first frame and ends a microsecond before the next one's (`clipSpans`): rounding the start\n  and the length on their own left a frame with no beat on it, only the backdrop, at 2148 of\n  8000 random cuts (a probe at 30fps with lines of 2.31, 3.02 and 1.87s rendered frame 272\n  blank), and none since. A slide's parts start part-way in on the cut frame itself and settle\n  over 0.5s, so its first frame is never empty.\n- **A chapter card** holds `beats.cardHold` (2.5s) with no narration (`narration.intro` is not\n  spoken, and compose says so); `\"card\": false` on a chapter leaves it out.\n- **`chapters[].beats`** orders a chapter's beats; without it each filmed mark is one beat, in\n  order. Each entry is one of:\n  - `{ \"mark\": \"4.2\" }` (the mark's `id` in events.json) or `{ \"index\": 2 }`: a filmed mark,\n    with an optional `label` overriding the callout. A bare number (`\"mark\": 2`) is an index only\n    in a take whose marks have no ids, where it cannot be taken for one; a take with two marks of\n    one id is refused, and a miss lists the indices and the ids separately;\n  - `{ \"take\": \"ch05b\", \"mark\": \"5.4\" }` (or `\"index\"`): a mark from another take in `takes` (a\n    chapter's, or one filmed only to be borrowed), played between this chapter's beats with a\n    hard cut like any other. A persona switch filmed as its own take stays inside its chapter, and\n    in its chapter's clip, instead of becoming a segment of its own with a seam on each side. The\n    beat is still-checked against the take it came from (read against this chapter's take\n    instead, the ferry's borrowed beat misses with align 14.457, against 0.473), and a label given\n    here stays in this chapter. Its id is the mark's, or `\u003Ctake>:\u003Cindex>` for a mark with none\n    (`departures:1`); two beats of one chapter with the same id are refused, so give one an `\"id\"`.\n    Composing only the lending chapter after a re-shoot leaves the borrower's still behind: compose\n    both (the still-check would read it as an align miss). demo:export takes its steps from each\n    chapter's own take, so a borrowed beat is not a step there;\n  - `{ \"split\": [\"2.3\", \"2.4\"] }`: two earlier filmed beats side by side, each callout under its\n    window (a half-size pane drops the scrim's backdrop blur, see compose.mjs);\n  - `{ \"slide\": ... }`: a screen with no app, styled from the theme like the cards, with an\n    optional `label` callout and `title`:\n    `\"title\"` (`kicker`, `title`, `sub`, a `note` such as \"Example data\"), `\"tiles\"` (`tiles`: a\n    word or two each; a word too wide for its tile shrinks that title to fit, never breaks),\n    `\"devices\"` (`web`, `tablet`, `phone`: image files shown in a browser window, a tablet and a\n    phone), `\"pricing\"` (`tiers`: `name`, `price`, `points`, `highlight`),\n    `\"steps\"` (`steps`: numbered, joined by a line drawn in), `\"end\"` (`title`, `url`, `sub`).\n  A chapter of slides only needs no footage. `narration.marks[i]` is the line of beat `i`.\n- **Clips**: `\"clips\": true` (the default here) also writes each chapter as its own mp4 in\n  `out\u002Fclips\u002F`: its segment's lossless render given the one lossy encode the film gets, and its\n  slice of the film's stems (the music faded over 0.3s at the clip's ends), mastered on its own to\n  the same loudness target and checked the same way (a clip off target fails audio.mjs). A clip\n  with no narration or music in it (a slides-only chapter with no lines) keeps its own level and\n  only its ceiling is checked: silence measures -inf, which passes, where it read NaN and failed\n  the whole film.\n- **The still-check** reads every filmed beat like a mark (lit, dim, align, with the still's own\n  source frame for both stills), checks its callout is drawn (`callout`: mean luma difference\n  under the label against the source dimmed by that still's scrim ratio, gate `check.calloutMin`\n  12), checks every beat's line, measured from the spoken file itself, ends at least `pad` before\n  its cut, and reads both frames of every cut: a frame with only the backdrop on it has almost no\n  edges (mean luma step between neighbouring pixels at 320x180, gate `check.cutEdge` 0.9; blank\n  cut frames read 0.54 to 0.61, the sparsest slide 1.37, filmed beats 2 to 7). Slides and splits\n  are gated on timing and on their cut frames.\n\nMeasured on `examples\u002Fferry\u002Fferry.beats.config.json` (four chapters, 13 beats: three slides, a\nsplit, six filmed of which one is borrowed from another take, three more slides; HyperFrames'\nlocal voice), 720p30 draft: 47.2s, render 163s (3.5s per output second), still-check 6\u002F6 marks\nand 13\u002F13 beats, -14.0 LUFS, four clips at -14.0 to -14.1 LUFS. The 1440p60 master (fresh\nclone): 47.1s, render 1255s (26.7s per output second, under load; a slide segment costs about\nwhat a filmed one does), 452 MB of `out\u002Fseg\u002F`, 12 MB final, clips 2.8 to 3.9 MB, still-check 6\u002F6\nand 13\u002F13, -14.0 LUFS and every clip -14.0 to -14.1. With a music bed (measured on the 12-beat\nversion, before the borrowed beat) every segment start sits on a beat (0ms) and the bed ducks\nunder all 12 lines; the cuts inside a chapter follow its lines, not the bed. Falsified: the callout hidden reads 1.1 and 1.5 where drawn ones read 111 to 125, both\nmiss; a beat cut 0.2s before its line ends misses (\"line ends 8.595s, after its cut at 8.4s\");\nthe probe's blank frame 272 misses (\"shows only the backdrop (edge 0.609)\") and passes since.\nLooked at: every slide kind, the split, a filmed beat after a card, a 3-frame micro-fade.\n\n## The look\n\nAll config-driven, and the defaults are the premium look. Layout is in design px (1280x720, or\n1080x1080 square) inside a stage that CSS `zoom` scales to the canvas, so type, cards, labels and\nspotlight geometry rasterise at master size instead of being upscaled (HyperFrames'\n`--resolution` supersampling was measured slower).\n\n- **Framed window** (`frame`): the footage sits in a window inset by `padding` (80 design px:\n  2240x1260 of the 2560x1440 master), with squircle corners (a superellipse clip-path; CSS\n  `corner-shape` with `overflow: hidden` silently broke the spotlight's mask), a layered soft\n  shadow tinted from `theme.text`, on a backdrop from the theme: `glow` is a diagonal gradient of\n  `theme.bg` with soft accent and highlight light in opposite corners, plus a fixed-seed grain\n  tile against 8-bit banding. The window arrives with the chapter: rising, scaling from 0.94 and\n  tilted `tilt` degrees in 3D, eased flat before the first spotlight lights, then reset to a 2D\n  identity transform so the footage is never resampled through a 3D layer. `frame: false` is\n  full bleed, as before, on the same backdrop for the cards.\n- **Transitions** (`transitions`): each seam joins the two segments' own halves, rendered by\n  HyperFrames, with `xfade` in concat.sh: a blur crossfade (content blurs 10px and eases scale,\n  dissolved; 0.5s) and, where one chapter hands over to the next chapter or a switch card, a\n  whip (content pushed a quarter of the frame left out of, and in from the right through, a 16px\n  blur, joined by a soft-edged wipe travelling the same way; 0.4s). A plain dissolve under the\n  push read as a fade with a drift: the outgoing half only moves fast once it is mostly gone. The backdrop\n  is identical in every segment, so only content moves. Seams overlap, so the ferry cut runs\n  28.75s against 30.17s with hard cuts. Picked over one master composition by measurement: a\n  HyperFrames transition needs both scenes in one composition, and one composition of a whole\n  film at 1440p60 renders as one unresumable job, where per-segment renders resume and a seam\n  costs one `xfade` (concat of the ferry master: 82s).\n- **Cards**: edge-anchored type over the backdrop, an oversized ghost word (the chapter number\n  on chapter cards) drifting at 5.5% opacity behind, a hairline, and an entrance per kind: title\n  words rise out of a blur on expo out, chapter words rise out of line masks on power4, switch\n  cards push in from the right, the end card resolves from a blur and scale. Each card leaves\n  through its seam; the film's last segment, end card or chapter, fades out to `theme.bg`.\n\nMeasured on the ferry example (two chapters, five marks), 8-core host with no GPU, under a load\naverage of 12 to 20 from other renders (so wall times are upper bounds):\n\n| output | render.sh | per output second | `out\u002Fseg\u002F` | final mp4 | still-check |\n|---|---|---|---|---|---|\n| before: 720p30, full bleed, hard cuts | 61s | 2.0s | 70 MB of PNG | 4.0 MB, 30.17s | 5\u002F5 |\n| default: 1440p60 framed | 881s | 30.6s | 349 MB | 14 MB, 28.75s | 5\u002F5 |\n| `frame: false`, 1440p60 | 973s | 33.8s | 329 MB | 14 MB | 5\u002F5 |\n| `format: \"square\"`, 1440x1440 at 60 | 701s | 24.4s | 193 MB | 7.3 MB | 5\u002F5 |\n| `quality: \"draft\"`, 720p30 framed | 203s | 7.1s | 65 MB | 4.3 MB | 5\u002F5 |\n| `format: \"vertical\"`, 1080x1920 at 60 | 532s | 18.5s | 219 MB | 7.7 MB, 28.75s | 5\u002F5 |\n| `format: \"vertical\"`, draft 720x1280 at 30 | 138s | 4.8s | 61 MB | 3.5 MB | 5\u002F5 |\n\n`out\u002Fseg\u002F` sizes above were packed with x264's default keyframe interval; render.sh now packs with a\nkeyframe every 30 frames, about 20% more (the default ferry run: 435 MB). So a 5-minute\nfilm takes about 2.5 hours at the master on this host, under load, and about 35\nminutes as a draft: iterate in draft, render the master once. A bare 1440p60 window\nprobe (no blur, grain or tilt) captured at 12.2s per second with 4 workers and 41s with the\nsingle worker HyperFrames picks on its own, so `workers` matters more than any effect. The\ndimming blur costs about 7% (fares: 397s against 370s), because the spotlight layer is hidden\nwhenever nothing is lit. Peak RSS of any one process was 0.49 GB.\n\nText sharpness of the final mp4, by capture-pro's measure (mean gradient over edge pixels of the\nsame fares-table crop, resampled to 2x its CSS size), against the 720p30 master this replaces:\n\n| crop | before (720p30) | default (framed 1440p60) | `frame: false` | draft (framed 720p30) |\n|---|---|---|---|---|\n| zoomed, mark \"Resident fare needs proof\" | 54.6 | 68.7 (+26%) | 114.1 (+109%) | 49.8 |\n| wide, the whole fares table at 1x | 41.0 | 59.8 (+46%) | 74.3 (+81%) | 45.2 |\n\nFull bleed keeps every capture pixel; the window shows them at 0.875, still well past the old\nmaster. A draft looks like the old master, softer where zoomed because the window is smaller.\n\n## Sound, narration and captions\n\n`concat.sh` ends by running `scripts\u002Faudio.mjs`, which mixes the sound, muxes it into\n`out\u002F\u003Cname>.mp4` (picture copied, not re-encoded), checks the loudness and writes the captions.\nEverything is timed from what capture recorded, not inferred from the picture:\n\n```\nevents.json ─▶ compose.mjs ─▶ plan.json cues (click, type, camera) + spots ──────┐\nnarration ───▶ hyperframes tts ─▶ transcribe ─▶ anchor match ─▶ freezes ────────┼─▶ audio.mjs ─▶ \u003Cname>.mp4\n          └──▶ deepgram speak ─▶ deepgram listen ─▶ anchor word start ──┘\nmusic file ──▶ hyperframes beats ─▶ card padding, every cut on a beat ──────────┘    captions.vtt, chapters.vtt\n```\n\n- **Sound effects**, on by default and quiet: a soft tick on each click, a key tick every 2 or 3\n  typed characters (pitch varied 5%), a whoosh as long as each zoom or wide, a bell on each\n  spotlight as it is fully lit. They are synthesised in `audio.mjs`, so there is no sound file to\n  licence (HyperFrames' own library is under the Pixabay licence, which does not allow shipping\n  the files themselves). Peaks before mastering: tick -24, key -33, whoosh -30, bell -28 dBFS,\n  all moved by `sfx.level` dB; any kind can be set `false` (`zoom` covers both camera moves),\n  or `\"sfx\": false` for none. Clicks and typing come from capture's `click` and `type` events,\n  moves from its `camera` events, so a take filmed before those existed gets only the bells.\n- **Music bed**, only when `audio.music.file` names one (bring your own, licensed). Levelled to\n  `level` LUFS, faded in and out so it ends with the last card, looped if short, and ducked\n  `duck` dB (default 11) under every narration line: down over 0.25s before a line, back up over\n  0.6s after, lines closer than 1.35s share one duck. With `snap` (default) each segment's\n  leading card grows by under one beat so every cut lands on a beat, to the nearest frame (so\n  within half a frame, 16.7ms at 30fps). `hyperframes beats` only seeds the tempo: on a 100 BPM\n  tick bed it reported 101.4 BPM, which walked its beats 0.8s off the ticks within a minute. The\n  grid is a steady period and phase fitted to the bed's own onsets, and a bed with no beat steady\n  enough (fit contrast under 2.5) gets a warning and unsnapped cuts rather than a failure. The\n  fitted grid is cached under `work\u002Faudio\u002Fbeats` by the bed's content (sha256: 20ms for a 17 MB\n  bed), so a bed replaced under the same name is fitted again (keyed by name and mtime, a 120 BPM\n  bed copied over a 100 BPM one with an older mtime kept the old grid, 200ms off the beat). Every\n  segment is whole frames (a duration that is not renders one frame too many), and starts are\n  counted in frames, so a fresh compose lands its cuts on the first run. Re-cutting one chapter\n  moves every later start, so with a bed `compose.mjs` also composes again each later segment\n  whose start has moved, and `audio.mjs` fails when a cut sits more than a frame off the grid,\n  which only a segment rendered from a stale plan can do: re-run `compose.mjs` and `render.sh`.\n  With transitions a cut is the frame the next segment starts to come in (its seam overlaps the\n  end of this one), so the pad aims that frame at the beat, and `audio.mjs` places every sound at\n  the segment starts `concat.sh` records in `work\u002Ftimeline.json`, seams already taken off.\n\n  | bed (ferry example, measured) | detector | fitted | cuts off the beat | result |\n  |---|---|---|---|---|\n  | 100 BPM ticks, frame-quantised onsets | 101.4 BPM | 100.00 BPM | 15, 15, 15, 15 ms | snapped |\n  | 100 BPM pad, kick and hats | 100 BPM | 100.00 BPM | 0, 0, 0, 0 ms | snapped |\n  | 128 BPM four-on-the-floor kick | 127.9 BPM | 128.00 BPM | 14, 7, 12, 3 ms | snapped |\n  | pink-noise drone, no beat | 245.9 BPM | contrast 1.22 | n\u002Fa | warned, not snapped |\n\n  Duck depth measured 11.00 dB.\n- **Narration**, only when lines are configured: `narration` on a card (spoken over it; the card\n  stays up until the line ends) and on a chapter (`intro` over the chapter card, `marks` one line\n  per mark, `null` to skip one). `hyperframes tts` (Kokoro, local; or Deepgram, below) speaks each line once and caches\n  it under `work\u002Faudio\u002Ftts` by text, voice and model. Every narrated beat **holds until its line has\n  finished**: where a line would outlast its spotlight or start before the previous one ends, the\n  footage freezes on a still frame for whole frames until it fits: at the end of the previous hold\n  (its spotlight stays up), or for the first mark where its spotlight starts to fade in, or, when a\n  hold reaches the end of the take, on its last frame. The plan records every freeze (`freezes`, in\n  composition seconds) and the still-check maps its stills through them to the source frame shown.\n  Changing a line or moving its `{@anchor}` re-times it; the cache is keyed by text, voice, model\n  and anchor.\n- **Anchors**: `{@name}` in a line marks the word right after it; the line is placed so that word\n  starts exactly as the spotlight is fully lit (without one, the first word does). `hyperframes\n  transcribe` alone is not precise enough for this: against stop-consonant bursts in 13 test lines\n  its word starts were -121ms to +183ms out, worst where no pause comes before the word. So the\n  words from the anchor on are spoken again on their own and that clip's first 0.15s is matched\n  against the line's loudness envelope near the recogniser's guess: -8ms to +24ms on the same 13\n  lines, inside one 30fps frame. On the finished narrated ferry cut, burst against the spotlight\n  being fully lit was -23ms to +8ms at all five anchors. A weak match (correlation under 0.8)\n  falls back to the recogniser's time and says so.\n- **Deepgram voices** (`\"tts\": \"deepgram\"`): Aura-2 over HTTPS, one request per line, 48kHz WAV.\n  Every request (speak and listen) gets up to 4 attempts of 60s each, retried on a dropped\n  connection, a 429 or a 5xx (waiting as long as Retry-After asks, at most 30s, else 1, 2, 4s),\n  and a clip is cached only once it is a WAV: a 200 carrying an HTML page or a cut-off body is\n  refused and retried, never kept as the line. The key is read from `DEEPGRAM_API_KEY` only, never from a config file;\n  without it a run that has a line to speak stops before speaking anything and names the variable,\n  and a run whose lines are all cached needs no key. Each clip is cached by sha256 of text, voice\n  and rate (`work\u002Faudio\u002Ftts\u002Fdg-*.wav`), so a re-render, a re-timing or a new anchor never re-bills\n  a line. `voice` is any Aura model (anything else, such as the local default `af_heart` left in,\n  is refused before a request); a `speed` other than 1 is refused (Aura-2 has its own pace). Word times\n  come from Deepgram's recogniser (nova-3, `\u002Fv1\u002Flisten`, cached beside the clip), and the anchor\n  is its word start: the tail match above needs the tail spoken as the line spoke it, and Aura-2\n  re-speaks it differently. The recogniser listens in the voice's language (the `-en` of the\n  model), without smart formatting, so a number spelled out in the line is heard back as words.\n  An anchor word it did not hear has only an interpolated time, and compose warns: reword the\n  line or move the anchor. Compose speaks only the lines of the segments it was asked for, unless\n  their lengths decide other segments' timing (a music bed, `targetDuration`). Measured on 14 anchors (the ferry's five and nine more lines), each\n  estimate read against the word's audible onset on a spectrogram: listen within about 20ms on\n  13, the 14th (\"the block\", at the b's closure) 110ms early; `hyperframes transcribe` up to\n  270ms early; the tail match under r 0.8 on 3 and on the wrong word on 3 (up to 390ms). The\n  ferry narrated cut with `\"tts\": \"deepgram\"`: 5\u002F5, -14.1 LUFS, -1.9 dBTP, anchors placed at the\n  spotlight's lit time. Four voices auditioned on one 13-word line (crude autocorrelation pitch,\n  pauses over 150ms): thalia (default) 5.2s, f0 216Hz, 9.5 semitones of range, a short comma\n  pause; apollo 6.6s, 150Hz, 10.5, the slowest; draco (British) 5.7s, 109Hz, 7.6, the flattest;\n  pandora (British) 5.4s, 198Hz, 8.9, the longest comma pause. Pick by ear: it is a config value.\n- **Loudness**: a mix with narration or music is mastered to `loudness.target` (-14 LUFS\n  integrated) by measured gain plus a limiter 1 dB under `truePeak` (-1 dBTP), corrected once,\n  then measured again on the AAC in the final file. `audio.mjs` exits 1, failing `concat.sh`, when\n  that measurement is more than `tolerance` LU off or over the ceiling. Sound effects on their own\n  are not normalised: lifting sparse ticks to -14 LUFS puts each one near full scale, so they keep\n  their own low level and only the ceiling is checked. A mix with nothing in it (every effect off,\n  no narration, no music) leaves the video silent and skips the gate.\n\n  | ferry example, fresh clone, 60fps 2x takes, plain ffmpeg 8.1, measured on the final file | integrated | true peak |\n  |---|---|---|\n  | effects only (`ferry.config.json`) | -37.7 LUFS | -25.4 dBTP |\n  | effects + a 100 BPM music bed | -14.0 LUFS | -1.7 dBTP |\n  | effects + narration (`ferry.narrated.config.json`) | -14.0 LUFS | -1.9 dBTP |\n\n- **Captions**, always: `out\u002F\u003Cname>.captions.vtt` (narration, each sentence split into the fewest\n  even cues of at most `maxWords` words and 42 characters; without narration, each spotlight's\n  label while it is lit) and `out\u002F\u003Cname>.chapters.vtt` (one cue per segment, titled from the\n  config). `\"captions\": { \"burn\": true }` also writes `out\u002F\u003Cname>-captions.mp4` with the captions\n  burned in and the spoken word in `theme.highlight`, rendered through HyperFrames: for social\n  cuts that autoplay muted. Word highlights follow the recogniser's word times, so they can sit\n  up to about 0.2s off; anchors do not. `format: \"vertical\"` draws them into the picture itself\n  instead (`burn` defaults to true there, with no .vtt; false leaves them out and writes it).\n- **Listen-proxy**: `out\u002F\u003Cname>-audio.png` stacks four waveforms: effects, narration, music, final\n  mix. Look at it for clipping, the ducks and where each sound sits. `out\u002F\u003Cname>.audio.json` holds\n  the measurements, cue counts and duck windows.\n\nNarration setup, once per machine: `hyperframes tts` needs Kokoro in a Python it can use, and the\nfirst run downloads the Kokoro model and whisper `medium.en`.\n\n```bash\nuv venv --python 3.12 ~\u002F.local\u002Fshare\u002Fhf-tts && uv pip install --python ~\u002F.local\u002Fshare\u002Fhf-tts\u002Fbin\u002Fpython kokoro-onnx soundfile\nexport HYPERFRAMES_PYTHON=~\u002F.local\u002Fshare\u002Fhf-tts\u002Fbin\u002Fpython\n```\n\n`examples\u002Fferry\u002Fferry.narrated.config.json` is the ferry example with narration and burned-in\ncaptions (out dir `compose-narrated`). Run it exactly like `ferry.config.json`; the first compose\ntakes a few minutes for speech and timing, later ones reuse the cache.\n`node \"$S\u002Fscripts\u002Faudio-check.mjs\"` checks the timing logic (anchors, holds, freezes, envelope\nmatch) on synthetic input in about a second.\n\n## Style rules the generator holds to\n\nMeasured on a 5:36 ten-chapter demo, 47 marks. Change them in config, not in code.\n\n- **Spotlight**: dim everything except the mark's rect (default 60% black scrim, softened by a\n  2px blur, `spotlight.blur`), through a cut-out feathered over 18px outside the rect, with a thin\n  accent edge and glow. It irises in (from 6% larger, expo out over 0.5s) with one light sweep\n  across the lit rect (`spotlight.sweep`). When the next mark lights within `spotlight.glide`\n  (2.5s) of this hold ending and the square or vertical view does not change between them, the\n  cut-out does not fade out: it glides, moving and reshaping onto the next rect over the gap with\n  the camera move, arriving when the next spotlight's fade-in would have finished (so a narration\n  anchor timed to that moment still lands on it). The glide rides the filmed camera: the cut-out\n  travels across the page, from one mark's rect to the next, and each frame draws that page rect\n  where the capture camera had it on that frame (`poses` in events.json), so the content under\n  the hole never slides. Its progress is the length of the camera's path so far over the whole\n  path's (centre distance plus log zoom, frame to frame), with the old power3 ease of time as a\n  floor: the camera often rests zoomed out between two marks, and a hole tied to the camera alone\n  parked half way across two cards for 1s. The path length never jumps; the first version took\n  the ratio of distances to the two end poses, which snapped the hole half way in one frame when\n  the camera ends where it started (a zoom out and back between two marks: step 0.50 of the path\n  on a probe take, now 0.05). The pose is the one on the source frame actually shown: the\n  re-timed footage gives each output frame the last source frame before the middle of the next\n  output interval (ffmpeg's `fps`, round=near), which on an index-coded take matched 292 of 339\n  frames and the rest within one; reading the frame at the re-timed time matched 37, one to two\n  frames behind at 2x. Measured on ferry (three glides, design px of the 1280-wide screen): the\n  eased frame-space tween it replaces slid over the content by up to 258px (mean 111) on one glide\n  and 114 and 192px on the others; now 0 by construction (the correction that keeps the end\n  boxes exact came to 0px), and mid-glide the still-check reads the rendered hole on its planned\n  box (below). When the camera is 99% of the way to the next mark the hole is 1.4, 3.3 and 9.6px\n  from its final box, where the tween was 42.4, 12.3 and 146.1px off: it arrives with the content,\n  not after it. `COMPOSE_TRACE=1` writes the per-frame\n  trace (`work\u002F\u003Cchapter>-glide-m\u003Ci>.json`). A take without `poses` keeps the eased tween. A glide lasts at least 0.35s: if the next mark lights\n  sooner (pace above 1, or a spotlight waiting for the camera), this hold ends early to make room\n  and its label leaves as the glide starts; if that would leave the hold under 0.7s, too short\n  for the two stills, or cut into the mark's narration line, it fades instead. Across a square re-frame the camera moves under the cut-out, so there it always fades\n  out and irises in. Each run of glides is its own element, so one mark's fade-out can never touch\n  the next (a shared one hid a mark lit within 0.3s of the last hold, found in review). It fades in 250ms before `t`, or once the zoom into the mark has\n  settled in the footage if that is later, holds 1.5 to 2.5s, fades out. Fading in 250ms before\n  `t` regardless put 51% of each ferry zoom's motion under the fading-in cut-out; now 0.7%, the\n  frame that completes the move. Settled means the camera event's end (from demo:capture), then\n  every frame-to-frame change up to 0.25s after it, which is the camera landing (from a\n  screencast take the logged end trails the last pose by a 30ms wait, and the pose reaches the\n  footage 16-63ms later; a deterministic take logs the exact frame the spring settled on; the\n  window leaves room for a slow landing under load). Changes past 0.25s are the page itself\n  moving: they do not delay the spotlight (they used to, by ~0.4s on a board with a blinking\n  badge; now 0.18-0.22s, bounded by the window) and compose warns about them. `plan.json`\n  records when each spotlight starts as `litFrom` and its fade as `fadeIn`.\n- **Labels**: at most 6 words, sentence case, placed clear of the cut-out inside a 64px safe\n  margin, popping in on a spring (back out, from 0.88 scale toward the cut-out). Over-long labels warn rather than fail. Rewrite the capture's label candidates for\n  clarity; never claim something the footage does not show.\n- **Chapter cards** about 2s (persona line plus chapter title), **title and end cards** about 3s.\n  Lengths are design px throughout (720 lines landscape, 1080 square); the canvas scales them.\n- No annotation is ever burned into the footage. Everything is an overlay on top of an\n  untouched capture, so a relabel is a re-render and never a re-shoot. Sound is a layer of its\n  own (see above), so re-mixing is `node scripts\u002Faudio.mjs \u003Cconfig>` and never a re-render.\n- Navigation clicks stay in, played at `speed.travel`. Only dead holds over 2s and configured\n  cuts are trimmed.\n\n## Two defects this generator already fixes\n\nBoth were found by looking at stills, not by reading code. Do not \"simplify\" them away.\n\n1. **A hold must not run past a camera move.** The cut-out is placed for the frame at `t`. If\n   the hold outlives a zoom, a `wide`, or a navigation, the frame changes underneath and the\n   cut-out lands on nothing. `stableUntil()` samples the footage at 10fps from `t+0.3` and ends\n   the hold at the first frame that differs from the mark pose, capped at `hold.max`.\n2. **A label must not cover its own spotlight.** Placement tries below, above, right, left, each\n   fully outside the cut-out and inside the safe margin. When nothing fits, the cut-out's bottom\n   is cropped (`below-cropped`) so the label sits under it. Overlap is then re-asserted\n   geometrically by `check.mjs`, so a regression fails the gate.\n\n## The still-check is the gate, not an extra\n\n`check.mjs` renders two stills per mark. Still A is at `compT + 0.5`, or `litFrom + fadeIn +\n0.1` if later, so a spotlight that waited for the camera is not read mid-fade, and always at\nleast 0.1s before still B, which is 0.05s before the fade-out. A hold too short for that window\nmisses as \"lit too briefly to check\" instead of a false scrim or drift reading (measured: hold\n0.4s on the ferry board). A spotlight that glides in arrives at `litFrom + fadeIn`, when its fade-in\nwould have finished, so the stills read it the same way.\nIt runs five tests against the rendered segment and the untouched source frame. It prints one\nline per mark and exits 1 if any mark misses.\n\nEvery reading happens in the design space compose lays out in: the rendered frame is cropped to\nthe footage's screen inside the framed window (the whole frame when `frame: false`) and scaled to\n1280x720 (1080x1080 square, the 1000x820 window for vertical), so the thresholds below mean the same at draft and at the master,\nframed or not. A still is also a miss if it falls inside a transition: before the window has\nsettled (its arrival and tilt, `settledFrom` in plan.json) or after the seam into the next\nsegment begins (`tailFrom`). Compose ends any hold before that seam, and warns when it cuts one.\n\n| test      | what it measures                                            | what it catches                      |\n|-----------|-------------------------------------------------------------|--------------------------------------|\n| `lit`     | cut-out luma \u002F same region in the source, both stills        | spotlight missing, or mistimed       |\n| `dim`     | ring outside the cut-out \u002F same ring in the source           | scrim not applied                    |\n| `sd`      | luma spread under the cut-out                                | cut-out landed on empty background   |\n| `drift`   | cut-out region, still A vs still B, in the source            | defect 1: hold outran a camera move  |\n| `align`   | mean luma difference, render vs source framed through the mark's view, under the cut-out | crop or camera not yet where the spotlight was laid out (still moving) |\n| label     | label box vs spotlight box, geometric                        | defect 2: label over its spotlight   |\n| glide     | largest share of the glide's path in one frame (plan); lit, dim and align of the hole at the glide's middle frame | a glide that snaps, or a hole not drawn where planned |\n\nThe ring samples 34px clear of the box edge and skips the label rect. Closer in, the spotlight's\nown 22px glow reads as \"not dimmed\" and every mark fails; so would the feather, which is why\nconfig refuses `spotlight.feather` over 24. The thresholds did not move for the new look, and\nwere not loosened: with the feathered, blurred scrim the ferry reads lit 1.00 and dim\n0.397-0.399, against 1.00 and 0.396-0.397 from the old hard-edged one (the scrim is 60% black,\nso a clean dim reads 0.40; the gate is 0.62).\n\n`align` (gate `check.alignMax`, 7 of 255, set from ferry readings, not derived) was added with the vertical crop, which moves under the\nfootage: `lit` and `dim` are ratios that hold over a shifted page, and `drift` reads the source,\nso a crop still sliding while a spotlight was up passed every other test (falsified: crop retargeted 0.2s\ninto each hold, both marks still hit). With `align` those two miss at 11.1 and 9.0. Correct\nrenders on ferry read 0.47-0.56 (landscape draft), 1.7-3.0 (vertical master) and 2.4-4.3\n(vertical draft, the 720-wide render scaled up to the 1000px design window, so text edges soften).\nThe source side is a nearest-neighbour scale of the 1x-sized read, so dense small text reads\nhigher than ferry's; raise `alignMax` for such an app rather than trusting 7 blindly. It is read\nonly on stills past the light sweep (`sweepTo` in plan.json, 0.9s after the spotlight starts),\nwhich brightens the cut-out: a spotlight that waited for the camera put still A inside it, about 8\non dark UI. If both stills fall inside, still B is used.\n\nA glided spotlight is also checked mid-glide. No frame may cover more than `check.glideStep`\n(0.2) of the path, or 1.5x the steepest frame of the power3 ease on a short glide: ferry's glides\npeak at 0.06-0.12, a probe with the old progress (the camera ending where it started) at 0.50, a\nmiss. And the glide's middle frame is read like a still: ferry's holes read lit 1.00, dim 0.40,\nalign 0.27 and 0.76. With the per-frame sets removed from the rendered project, so the hole\nwaited at the last mark, both glides miss (align 30.6 and 11.5); lit and dim alone still passed\n(0.88 and 0.96, dim 0.48 and 0.60), which is why align is read there too.\n\nIt also writes `work\u002Fstills-\u003Cchapter>.png`, a 2-wide tile of every still with its mark index and\ntime drawn on. **Look at it.** The numbers say the geometry is right; the sheet says the label\nreads and the frame is the one you meant.\n\nA failing mark is a config problem, not a code problem. Usual fixes, in order: shorten the\nlabel, add a `cuts` entry to remove the drifting span, re-mark the chapter in `demo:capture`\nwith a tighter `hold` before the next camera move.\n\n## Encode chain\n\nA footage frame used to be lossy-compressed seven times (screencast JPEG, x264 crf18, x264\ncrf14, HyperFrames' JPEG frame extraction, JPEG page capture and crf16 encode, then concat at\ncrf20). Now every intermediate is lossless and the only lossy step a viewer sees is the last:\n\n```\nscreencast JPEG                       capture, the one source\n  ─▶ take mp4         x264 -qp 0      bit-exact against the JPEGs\n  ─▶ retimed footage  x264 -qp 0      bit-exact\n  ─▶ segment frames   PNG             --format png-sequence --video-frame-format png\n  ─▶ segment mp4      x264rgb -qp 0   packed by render.sh, bit-exact against the PNGs\n  ─▶ final mp4        x264 crf 16     slow, tune animation, yuv420p, BT.709 tags, faststart\n```\n\nThe table below was measured at 720p30 with the final at crf 14. At the 1440p60 master the crf\nwas re-measured on the ferry fares segment, against the same 4:2:0 conversion encoded losslessly\n(so it isolates the crf):\n\n| crf | luma PSNR | SSIM | text crop PSNR | size (10.8s) |\n|---|---|---|---|---|\n| 12 | 55.0 dB | 0.9985 | 54.9 dB | 7.3 MB |\n| 14 | 53.4 dB | 0.9978 | 53.4 dB | 5.8 MB |\n| **16** (default) | 52.0 dB | 0.9970 | 52.0 dB | 4.6 MB |\n| 18 | 50.6 dB | 0.9959 | 50.4 dB | 3.6 MB |\n| 20 | 49.2 dB | 0.9946 | 48.9 dB | 2.7 MB |\n\nEvery row is past visually lossless; 16 keeps 52 dB on text for 20% less than 14. Set `crf`\nlower for an archival master.\n\nHyperFrames' output options, measured on one ferry capture, four segments, the same final\nencode (text crop inside each cut-out against the source screencast frame, RGB):\n\n| segments | render.sh | `out\u002Fseg\u002F` | crop PSNR \u002F SSIM |\n|---|---|---|---|\n| before: mp4 `--quality looks`, concat crf 20 | 33.6s | 3.0 MB | 38.07 dB \u002F 0.98847 |\n| mp4 `--quality delivery` | 44.9s | 4.2 MB | 40.99 dB \u002F 0.99367 |\n| mp4 `--crf 0` | 42.9s | 13 MB | 41.22 dB \u002F 0.99437 |\n| mov (ProRes 4444) | 85.8s | 190 MB | 43.34 dB \u002F 0.99672 |\n| **png-sequence** (used) | 61.9s | 100 MB | 46.66 dB \u002F 0.99678 |\n| ceiling: png-sequence, final at x264 -qp 0 | | | 48.41 dB \u002F 0.99826 |\n\n- mp4 keeps HyperFrames' fast BeginFrame capture, but it captures mp4 pages as JPEG q95 and no\n  flag turns that off. There is no non-alpha lossless output, and an alpha format (png-sequence,\n  mov) falls back to the slower capture path, hence the extra render time.\n- png-sequence is an alpha format: it makes the composition root and body transparent, and a\n  frame comes out RGBA wherever a pixel is transparent (RGB only when every pixel is opaque:\n  0 of 840 ferry frames had alpha, 90 of 90 did with the `#bg` fill removed). The pack\n  drops the alpha, so a transparent pixel becomes black. The invariant: every visible element of\n  a template sits on an opaque layer; the full-bleed `#bg` child is that layer for the root.\n  `render.sh` counts frames with an alpha channel and warns if there are any.\n- The PNGs carry sRGB colour, so `concat.sh` has no input matrix to guess: it converts once to\n  BT.709 limited range with explicit tags.\n- The takes and retimed footage use a lossless H.264 profile that browsers cannot play;\n  ffmpeg, this skill and the montage read them fine. Watch the final mp4.\n- render.sh packs each segment's PNGs into a lossless RGB mp4 and deletes them: at 1440p60 the\n  ferry's PNGs were 3.3 GB for 30s of video (fares: 1011 MB of PNG, 141 MB packed, PSNR infinite\n  against every PNG checked). A keyframe every 30 frames keeps each still-check seek short: with\n  x264's default of 250 the ferry check took 45.7s, now 29.1s, for 20% more disk (fares 115 MB at\n  250). So `out\u002Fseg\u002F` holds well under 1 GB per minute at the master, where PNGs would have been\n  6.6 GB. It is scratch: delete it once the final mp4 is good.\n  **Free disk while rendering**: before capturing, HyperFrames refuses unless free space on the\n  `out` filesystem is at least the raw RGBA size of the render's frames over 0.9 (width x height\n  x 4 bytes a frame: about 1 GB per second at the 1440p60 master, so the ferry's 13.3s chapter\n  asks for 13.1 GB and a 34s chapter would ask for 33 GB; about 0.12 GB per second at draft),\n  although the PNGs it writes are about a tenth of that. `--low-memory-mode` does not lift the\n  check (measured: a 40s 1440p60 render was refused the same with it on). So `hfrender.mjs`\n  measures the free space first and, when a segment would not fit, renders it in time chunks that\n  do, using 80% of what the check allows, and says so in one line, as in this ferry run forced\n  into chunks with `HF_CHUNK_FRAMES=300` (an override for testing, which the line also names):\n  `fares: 649 frames need 10.6 GB free for HyperFrames' disk check, 25.0 GB is free: rendering\n  3 chunks of up to 217 frames`.\n  Each chunk is a copy of the project re-timed to a window of its timeline; the packed chunks join\n  without re-encoding. A chunk matches the whole render as closely as two whole renders match\n  each other: at the master, forced into 300-frame chunks, the ferry's departures and fares came\n  out 552 of 799 and 506 of 649 frames bit-exact against the whole render, the rest at 77 dB or\n  better, and two whole draft renders of fares differ the same way (276 of 324 bit-exact, the\n  rest about 86 dB); the chunked film passed the still-check 5\u002F5. A chunk costs about 5s of\n  start-up (draft fares, 3 chunks: 48s against 45s). What the render really used at its peak,\n  sampling free space every second through the ferry master: 3.1 GB, during the 13.3s chapter\n  HyperFrames asked 13.1 GB for.\n\nAt 720p the gap to the ceiling was crf 14; what remains below the ceiling is the 4:2:0 conversion and\nthe full-to-limited range change, which any BT.709 4:2:0 delivery pays.\n\n## Files\n\n- `scripts\u002Fconfig.mjs`: config load, defaults, font stacks, segment ordering.\n- `scripts\u002Fcompose.mjs`: one standalone HyperFrames project per segment. Separate projects keep\n  each render small and lint clean.\n- `scripts\u002Fhfrender.mjs`: one project to one lossless mp4, in time chunks when the disk is short.\n- `scripts\u002Frender.sh`, `scripts\u002Fconcat.sh`: render loop (PNG sequences, packed losslessly) and\n  the seams plus the one final encode (see Encode chain). concat.sh also writes\n  `work\u002Ftimeline.json`: where each segment starts in the final cut, with its seam.\n- `scripts\u002Faudio.mjs`: sound effects, music, narration timing (also imported by `compose.mjs`), mix,\n  loudness check. `scripts\u002Fcaptions.mjs`: caption and chapter files, burned-in captions (vertical\n  draws its own in the composition from the same cues).\n  `scripts\u002Faudio-check.mjs`: their timing logic on synthetic input.\n- ffmpeg and ffprobe, everywhere: config `\"ffmpeg\"`\u002F`\"ffprobe\"`, then env `FFMPEG`\u002F`FFPROBE`,\n  then the distro build at `\u002Fusr\u002Fbin`, then PATH (Homebrew on macOS, where `\u002Fusr\u002Fbin` is\n  read-only). Every step, the still-check verdict included, runs on a plain build. The one\n  cosmetic extra is the caption on each contact tile (`drawtext`, libfreetype), which some\n  builds lack (Homebrew's default formula, measured on 8.1): `check.mjs` then prints one warning\n  and writes the tiles uncaptioned. Linux hosts pick `\u002Fusr\u002Fbin\u002Fffmpeg` first, which has it.\n- `render.sh` and `concat.sh` are `#!\u002Fbin\u002Fbash`, which is bash 3.2 on macOS: they use no bash-4\n  features (no `mapfile`, associative arrays or case-changing expansions). The sound layer is\n  Node, and needs no `timeout` binary.\n- `examples\u002Fferry\u002Fferry.beats.config.json`, `examples\u002Fferry\u002Fslides\u002F`: the ferry in beat mode, with\n  one slide of each kind (the device images are the ferry app at web, tablet and phone sizes).\n- `scripts\u002Fcheck.mjs`: the gate. For square and vertical output it frames the source frame with\n  the same view as the composition before comparing.\n- `assets\u002Ftemplate\u002F`: `hyperframes.json` and `package.json`. Compose installs pinned GSAP 3.14.2,\n  verifies its SHA-256, and copies it beside generated `index.html`, so renders stay local. If\n  installation fails, it emits a warning and uses pinned jsDelivr with SRI. Run\n  `node scripts\u002Fcheck-local-gsap.mjs \u003Cgenerated-project-dir>` to confirm the local path.\n- `examples\u002Fferry\u002F`: a runnable example, a made-up app with its server, beats file, config and\n  fonts, every path relative to that directory.\n","# demo:compose\n\nAssemble captured chapters into one demo video. Capture it elsewhere.\n\n```\ndemo:capture takes\u002F ──▶ compose.mjs ──▶ projects\u002F\u003Csegment>\u002F  (HyperFrames)\n  \u003Cch>.mp4                  ▲              │\n  \u003Cch>-events.json      config.json     render.sh ──▶ out\u002Fseg\u002F\u003Csegment>.mp4\n                        (brand, copy)      │      (PNG frames, packed lossless)\n                                        check.mjs  ──▶ hit \u002F miss per mark  ◀── THE GATE\n                                           │\n                                        concat.sh ──▶ out\u002F\u003Cname>.mp4 + montage  (seams dissolved; the ONE lossy encode)\n```\n\nPairs with **demo:capture** (the sibling skill in this plugin), which produces the take\ndirectory this skill consumes. Rendering is **HyperFrames**: load `hyperframes-core` before\nediting the generated HTML, and `hyperframes-keyframes` \u002F `hyperframes-animation` before\nchanging the motion. The generated composition already satisfies the core contract (standalone\nroot, one paused GSAP timeline keyed to `data-composition-id`, `@font-face` for every named\nfamily, clip timing on the `\u003Cvideo>` and not on an ancestor).\n\n## Run\n\n```bash\nS=\"$SKILL_DIR\"   # this skill's own directory\nnode \"$S\u002Fscripts\u002Fcompose.mjs\" my.config.json            # generate every segment project\nbash \"$S\u002Fscripts\u002Frender.sh\"  my.config.json             # render each one, foreground, resumable\nnode \"$S\u002Fscripts\u002Fcheck.mjs\"  my.config.json             # THE GATE: hit\u002Fmiss per mark, exit 1 on miss\nbash \"$S\u002Fscripts\u002Fconcat.sh\"  my.config.json             # final mp4 with sound, captions, contact sheet\n```\n\nEvery command takes optional segment names to limit the work (`compose.mjs cfg.json consent`).\n`render.sh` skips a segment whose `out\u002Fseg\u002F\u003Csegment>.mp4` is newer than its `index.html`, so a\nkilled run resumes. A segment is rendered aside and swapped in only once it succeeds, so a failed\nre-render keeps the previous one, and it must hold its planned length times the frame rate\n(60fps final, 30fps draft, passed to HyperFrames as `--fps`) or render.sh fails it.\nRenders run one at a time in the foreground with `workers` capture processes (default 4) under a\ntimeout of 120s plus 10s per second of segment at 720p30, scaled by pixel rate (80s per second at\nthe 1440p60 master): a harness that kills long background tasks for low memory will otherwise\ntake the whole batch out. The render itself is `scripts\u002Fhfrender.mjs` (render.sh and the\nburned-caption cut both use it); its timeout is node's own, so it holds on stock macOS too.\n\nA worked example is `examples\u002Fferry\u002F`: a made-up ferry operator's three-page app\n(`serve.mjs`, `app\u002F`), the `beats.mjs` that films it with demo:capture, and\n`ferry.config.json` with its fonts. Every path in it is relative to that directory, so copy\nthe directory somewhere writable and run it end to end:\n\n```bash\ncp -r \"$S\u002Fexamples\u002Fferry\" \u002Fscratch\u002Fferry && cd \u002Fscratch\u002Fferry   # CAPTURE_DIR: the demo:capture skill dir\nnode serve.mjs &                                            # app on 127.0.0.1:7744\nnode \"$CAPTURE_DIR\u002Fscripts\u002Frun.mjs\" beats.mjs               # takes\u002Fdepartures.mp4, takes\u002Ffares.mp4\nnode \"$S\u002Fscripts\u002Fcompose.mjs\" ferry.config.json && bash \"$S\u002Fscripts\u002Frender.sh\" ferry.config.json\nnode \"$S\u002Fscripts\u002Fcheck.mjs\" ferry.config.json && bash \"$S\u002Fscripts\u002Fconcat.sh\" ferry.config.json\n```\n\nAt the default 1440p60 master the ferry renders in about 15 minutes on an 8-core host without a\nGPU (measured under load, see The look); `\"quality\": \"draft\"` in the config makes it about 3.\n\n## Config\n\nOnly `takes` and `chapters` are required. Everything below shows the default where there is one.\n\n```jsonc\n{\n  \"name\": \"my-demo\",                  \u002F\u002F final file is out\u002F\u003Cname>.mp4\n  \"takes\": \"\u002Fscratch\u002Ftakes\",          \u002F\u002F demo:capture output dir (required)\n  \"out\": \".\u002Fcompose\",                 \u002F\u002F work dir: projects\u002F, out\u002F, work\u002F\n  \"format\": \"landscape\",              \u002F\u002F or \"square\" or \"vertical\"; see Playback pace and format\n  \"quality\": \"final\",                 \u002F\u002F 2560x1440 (square 1440x1440, vertical 1080x1920) at 60fps; \"draft\" = 1280x720 (1080x1080, 720x1280) at 30fps\n  \"width\": 2560, \"height\": 1440,      \u002F\u002F default from format and quality; set one to override the canvas\n  \"frame\": {                          \u002F\u002F the framed window; false = full-bleed footage\n    \"style\": \"window\", \"padding\": 80, \"radius\": 24, \"shadow\": 1,\n    \"backdrop\": \"glow\",               \u002F\u002F \"glow\" (gradient plus accent light), \"gradient\" or \"solid\"\n    \"grain\": 0.045, \"tilt\": 9 },      \u002F\u002F tilt: degrees the window arrives at, eased flat\n  \"spotlight\": { \"feather\": 18, \"glide\": 2.5, \"sweep\": true, \"blur\": 2 },\n  \"transitions\": { \"blur\": 0.5, \"whip\": 0.4 },  \u002F\u002F seam lengths in seconds; false = hard cuts\n  \"workers\": 4,                       \u002F\u002F hyperframes capture processes\n  \"crf\": 16,                          \u002F\u002F the one lossy encode\n  \"theme\": {\n    \"bg\": \"#101114\", \"surface\": \"#1B1D22\", \"accent\": \"#C8CDD6\",\n    \"highlight\": \"#9AA3B2\", \"text\": \"#FFFFFF\", \"muted\": \"#B5BAC4\",\n    \"fonts\": {                        \u002F\u002F omit entirely to use the generic sans stack\n      \"display\": { \"file\": \"fonts\u002Fx.woff2\", \"family\": \"X\", \"weight\": \"600 700\" },\n      \"body\":    { \"file\": \"fonts\u002Fy.woff2\", \"family\": \"Y\", \"weight\": \"500 600\" }\n    }\n  },\n  \"scrim\": \"rgba(0,0,0,0.60)\",        \u002F\u002F what the spotlight dims everything else to\n  \"cards\": {\n    \"title\":  { \"kicker\": \"…\", \"title\": \"…\", \"sub\": \"…\", \"dur\": 3 },\n    \"switches\": [ { \"id\": \"switch-card\", \"before\": \"\u003Cchapter>\", \"kicker\": \"…\", \"title\": \"…\", \"sub\": \"…\", \"dur\": 2.5 } ],\n    \"end\":    { \"kicker\": \"…\", \"title\": \"…\", \"sub\": \"…\", \"dur\": 3 }\n  },                                  \u002F\u002F any card also takes \"narration\": \"…\" (see Sound)\n  \"chapterCardDur\": 2.0,\n  \"defaultPersona\": \"\",               \u002F\u002F per-chapter `persona` overrides it\n  \"chapters\": [\n    { \"name\": \"\u003Cchapter>\",            \u002F\u002F must match \u003Cchapter>.mp4 in takes (required)\n      \"title\": \"The live board\",      \u002F\u002F default: chapter name, title-cased\n      \"persona\": \"Foot passenger\",\n      \"labels\": [\"…\"],                \u002F\u002F default: the capture's own mark labels. One per mark.\n      \"cuts\": [[10.98, 11.2]],        \u002F\u002F extra source-time cuts, e.g. a splash screen\n      \"cardDur\": 2.0,\n      \"speed\": { \"travel\": 1 },       \u002F\u002F per-chapter override of the global speed\n      \"narration\": { \"intro\": \"…\",    \u002F\u002F spoken over the chapter card; see Sound\n        \"marks\": [\"The {@next}next sailing runs late.\", null] } }  \u002F\u002F one per mark, null = none\n  ],\n  \"speed\":  { \"travel\": 2, \"rampMs\": 250 },\n  \"cut\": \"continuous\",                \u002F\u002F or \"beats\": one still per mark, held for its line; see Beat-paced cut\n  \"beats\":  { \"pad\": 0.6, \"lead\": 0, \"cardHold\": 2.5, \"hold\": 3, \"fade\": 0, \"floor\": 0, \"min\": 3, \"max\": 6, \"lineMax\": 7 },\n  \"clips\": false,                     \u002F\u002F each chapter also as its own mp4 (default true with \"cut\": \"beats\")\n  \"pace\": 1,\n  \"targetDuration\": 45,               \u002F\u002F optional, seconds, whole video\n  \"hold\":   { \"min\": 1.5, \"max\": 2.2 },\n  \"fadeLead\": 0.25,                   \u002F\u002F spotlight fades in this long before the mark (or once the zoom settles)\n  \"deadHold\": 2.0,                    \u002F\u002F freezes longer than this get trimmed\n  \"layout\": { \"safeMargin\": 64, \"labelHeight\": 48, \"labelGap\": 14, \"maxLabelWords\": 6 },\n  \"check\":  { \"litRatio\": 0.80, \"dimRatio\": 0.62, \"contentSd\": 8, \"driftMax\": 12, \"alignMax\": 7, \"glideStep\": 0.2, \"calloutMin\": 12, \"cutEdge\": 0.9 },\n  \"audio\": {                          \u002F\u002F optional; \"audio\": false turns the sound layer off\n    \"sfx\":       { \"level\": 0, \"click\": true, \"type\": true, \"zoom\": true, \"mark\": true },  \u002F\u002F or false\n    \"music\":     { \"file\": \"bed.mp3\", \"level\": -18, \"duck\": 11, \"fadeIn\": 1.5, \"fadeOut\": 2.5,\n                   \"start\": 0, \"snap\": true },          \u002F\u002F no file, no music\n    \"narration\": { \"tts\": \"hyperframes\", \u002F\u002F or \"deepgram\" (Aura-2; key from DEEPGRAM_API_KEY)\n                   \"voice\": \"af_heart\",   \u002F\u002F deepgram default \"aura-2-thalia-en\"\n                   \"speed\": 1, \"model\": \"medium.en\",\n                   \"lead\": 0.3, \"gap\": 0.35, \"tail\": 0.35, \"level\": -16 },\n    \"loudness\":  { \"target\": -14, \"truePeak\": -1, \"tolerance\": 1 },\n    \"captions\":  { \"burn\": false, \"maxWords\": 7 }   \u002F\u002F burn: true by default for vertical (in the picture)\n  }\n}\n```\n\nPaths in the config (`takes`, `out`, font `file`) resolve against the config file's own\ndirectory. `sub` on a card is raw HTML so `\u003Cb>` can pick out a word in the highlight colour;\nevery other string is escaped.\n\n## Playback pace and format\n\nHow fast the **finished video** plays, re-timed from footage you already have: no re-shoot.\nThis is separate from demo:capture's filming `pace`, which changes what the camera records.\n\n```\nsource   ──travel──╮ proof window ╭──travel──╮ proof window ╭──\nspeed      2x    ramp    1x     ramp   2x   ramp    1x     ramp\n                    mark t - fadeLead ... end of hold\n```\n\n- **Speed ramp, on by default.** Inside each proof window (from `fadeLead` before a mark to the\n  end of its hold) and during every camera move (each zoom and wide, from the `camera` events\n  demo:capture logs) footage always plays at 1x, so a zoom keeps the easing it was filmed with.\n  Everything else, navigation, loading, cursor travel, plays at `speed.travel` (2x). Speed changes over `speed.rampMs` (250ms of\n  output time) each side, so it reads as a ramp and never as a jump cut. A gap too short for\n  two full ramps gets a shallower peak instead. Marks and spotlights land on the re-timed\n  footage; the still-check runs on it. Chapter cards and holds are never sped up.\n  `\"speed\": { \"travel\": 1 }` turns the ramp off and plays everything at 1x, exactly as before\n  the ramp existed. Set `speed` globally, override any key per chapter with `chapters[].speed`.\n  `speed.travel` must be between 0.1 and 4, `speed.rampMs` a number >= 0 (0 = hard speed\n  change). Measured on the ferry example: before camera moves were protected, the zooms into\n  marks played at 1.06-1.20x on average and the wides at 1.59-1.76x; all eight now play at\n  1.00x. Takes filmed before demo:capture logged camera events keep the old timing. There is no proof-speed setting: the spotlight timing and the still-check both rely\n  on proof windows playing at 1x, so any other `speed` key is refused.\n- **`pace`** (default 1): one multiplier on card durations (title, switch, end, chapter\n  cards), `hold.min`\u002F`hold.max`, `fadeLead` and every fade and card-motion timing. `1.3` gives\n  a calmer cut, `0.8` a brisker one. It does not change footage speed. A paced hold stops where\n  the footage stops being still (the next camera move), so a spotlight never outlives its pose;\n  at `pace: 1` holds are exactly the unpaced rule.\n- **`targetDuration`** (seconds, optional): raises the global `speed.travel`, capped at 4x,\n  until the whole video (cards included) fits, and prints `speed.travel` and the planned length.\n  It never speeds up proof windows, cards or holds, so a target shorter than those can reach is\n  reported, not met. Chapters with their own `speed.travel` keep it. It measures every chapter\n  that has footage, even when the command names only some, so a partial re-run picks the same\n  speed; chapters not filmed yet are left out with a warning.\n- **`format`**: `\"landscape\"` (default), `\"square\"`. At `quality: \"final\"` (default) that is a\n  2560x1440 or 1440x1440 master at 60fps; `\"draft\"` gives 1280x720 or 1080x1080 at 30fps, about\n  8x less render work, for iterating on copy and timing. Footage stays 16:9.\n  For square, each proof window gets its own framing: footage scaled and placed so the spotlit\n  rect (from `events.json` `rect` and `cam`) fits with room for its label, between the\n  cover scale (fills the square, crops the sides) and the contain scale (whole frame, bands\n  above and below in `theme.bg`). Framing holds still while a spotlight is lit and eases between\n  windows; overlapping windows share one framing.\n- **`format: \"vertical\"`**, the social cut: 1080x1920 at 60fps (720x1280 at 30 as a draft),\n  laid out at 1:1 in three bands. Top: the chapter's persona and title as a headline, from 220px\n  down (clear of the platforms' top bar). Middle: the window, 1000x820 at y 520, cropping the\n  16:9 footage. Bottom: burned captions, the lowest edge 420px above the bottom (clear of the\n  caption and action UI), 60px in from the left and 120px from the right (the side rail). The\n  captions are the narration's words with the spoken one picked out (captions.mjs cues), or\n  without narration each spotlight's label while it is lit; the small label by the spotlight is\n  then not drawn, the caption is the label at a size a phone reads. Title, switch and end cards\n  fill the 9:16 frame and carry their narration as captions. In-picture captions are the\n  vertical default of `audio.captions.burn`: the .vtt is then not written (uploaded beside the\n  video a platform shows them twice) and concat.sh burns nothing more; `\"burn\": false` leaves\n  the picture without them, keeps the labels by the spotlights and writes the .vtt. A caption\n  wraps anywhere rather than run past the safe width (a 91-character URL label wrapped to four\n  lines inside it, looked at), and compose warns on a caption over about 80 characters (the band\n  under the window holds two lines; that URL rose over the window's bottom edge) and on a chapter\n  title over about 100, where the headline reaches the window.\n  The crop follows the current target on a critically damped spring (omega 9.43 rad\u002Fs, Cap's\n  screen spring as a constant): each click and typed field, switched 0.8s before the press so\n  the crop is already there when the pointer glides in and nothing enters from off-frame, and\n  each group of spotlights, switched 0.8s before it lights. Presses less than 0.8s apart share\n  one view, of their union (open a menu, pick an option): each switching on its own pulled the\n  crop toward the second before the first landed, the first press 2,503px off the crop on a probe\n  with two clicks 0.3s apart; now both inside. From a spotlight's fade-in to the end of its\n  fade-out the crop is pinned to the spotlight's view, the spring eased onto it over the last\n  0.2s rather than cut (it was 3.1px and 4.3px short on ferry, a visible snap before), and a\n  press that lands outside a pinned crop is warned about: the crop does not follow the pointer.\n  From rest the spring never overshoots, but a retarget while it still moves can carry it past\n  the goal, so every frame is clamped onto the footage: ferry's fares showed an 85px strip of\n  backdrop beside the footage for a moment before; now none. Views zoom past the cover scale onto\n  a small target, up to 2 design px per CSS px for a 2x take (the take's own pixels at the\n  1080x1920 master). The limit is in design px, so a draft frames exactly as the master: it was\n  in canvas px, and a 96x40 button zoomed 3x in the draft against 2x at the master; now 2x in both.\n  A spotlight's cut-out and label live inside the crop, so they move with it.\n\nMeasured on the ferry example, filmed fresh (two chapters, five marks, 3s title and end cards),\nwith camera moves at 1x:\n\n| settings | video length | still-check |\n|---|---|---|\n| `speed.travel: 1` | 31.60s | 5\u002F5 |\n| default (2x travel ramp) | 28.00s | 5\u002F5 |\n| `format: \"square\"`, default ramp | 28.00s | 5\u002F5 |\n| `format: \"vertical\"`, default ramp, with the transitions below (landscape: 28.75s) | 28.77s | 5\u002F5 |\n| `format: \"vertical\"`, narrated | 34.60s | 5\u002F5 |\n\nPlaying the camera moves at 1x added about 1.5s to the default cut (26.4s before).\n\nThe ferry app is quick, so travel is a small share of it; the saving grows with loading and\nnavigation time.\n\nHow it works: `compose.mjs` writes each chapter's footage already cut and re-timed (one ffmpeg\npass: `select` for the kept ranges, `setpts` with the piecewise speed curve, `fps` at the output\nrate, a lanczos scale to the pixel size the footage is shown at, written lossless), so the\nHyperFrames project holds one plain `\u003Cvideo>`. Shown size is the take's CSS viewport times the\nwindow scale, the canvas zoom and the largest square view, capped at the take's own pixels, so\nthe browser at most scales it down (between square views). A deterministic take (demo:capture's default: 2560x1440 at 60fps,\n`dpr` and `fps` in its events.json) enters the default framed 1440p60 master at 2240x1260 (one\nlanczos downsample, x0.875) and full bleed (`frame: false`) at its native 2560x1440, and at 1x\nevery source frame plays. At `quality: \"draft\"` it is downsampled to the 720p30 window. An RGB\ntake is written with libx264rgb, so no colour conversion happens before concat.sh's single encode.\nRects and camera boxes stay in CSS px, whatever the density. At a constant whole-number speed it\nnudges each piece by under 1\u002F60s so source frames never sit on a half frame, which otherwise made a 1x\nwindow duplicate then drop a frame. The spacing it keeps clear is the take's own: at 30fps output a\n60fps take lands two source frames per output frame at 1x, and assuming 30 put one of each pair on the half\n(measured on ferry, a source-index marker per frame: 1 duplicate-and-drop pair per chapter inside\n1x windows, 0 once the take's fps is used).\n\n## Beat-paced cut\n\n`\"cut\": \"beats\"` paces the film one line per screen instead of playing the footage. One beat is\none screen, one callout and one line:\n\n```\nlines spoken and measured first ─▶ beat = lead + line + pad (whole frames) ─▶ jump cut ─▶ next beat\nchapter card (cardHold, silent) ─▶ beat ─▶ beat ─▶ ... ─▶ seam into the next chapter\n```\n\n- **A filmed beat** is the still of its mark's own frame (the mark's `t`, or once a camera move\n  into it has settled if that is later, kept inside the take; extracted once at the size it is\n  shown, lanczos), in the framed window, with its spotlight irising in and its callout (the mark's\n  label) popping in at the cut. It holds for its narration line plus `beats.pad` (0.6s), the line\n  starting `beats.lead` (0) after the cut; a beat with no line holds `beats.hold` (3s). A line's\n  `{@anchor}` does nothing here: the spotlight is up from the cut and the line starts at `lead`. Nothing is sped up and nothing travels on screen: beats meet in hard cuts, or\n  a `beats.fade` micro-fade of 1 to 4 frames. The first filmed beat after a chapter card brings\n  the window in (tilted, eased flat over 0.6s) and lights after it. `beats.floor` (0, off) is the\n  shortest any beat holds, with a line or without, a slide or a split: a short line's pad grows\n  to fill it (a first beat with no card counts the seam into it, as `min` and `max` do). Compose\n  warns when a beat falls outside `beats.min`-`beats.max` (3-6s) and when a line runs over\n  `beats.lineMax` (7s): split it. The last beat holds through the seam into the next segment, so its pad stays clear\n  of the transition; with a music bed the card takes the beat pad, or with no card the last beat.\n  The whole chapter is laid out in whole frames and each beat written as a clip that starts on\n  its first frame and ends a microsecond before the next one's (`clipSpans`): rounding the start\n  and the length on their own left a frame with no beat on it, only the backdrop, at 2148 of\n  8000 random cuts (a probe at 30fps with lines of 2.31, 3.02 and 1.87s rendered frame 272\n  blank), and none since. A slide's parts start part-way in on the cut frame itself and settle\n  over 0.5s, so its first frame is never empty.\n- **A chapter card** holds `beats.cardHold` (2.5s) with no narration (`narration.intro` is not\n  spoken, and compose says so); `\"card\": false` on a chapter leaves it out.\n- **`chapters[].beats`** orders a chapter's beats; without it each filmed mark is one beat, in\n  order. Each entry is one of:\n  - `{ \"mark\": \"4.2\" }` (the mark's `id` in events.json) or `{ \"index\": 2 }`: a filmed mark,\n    with an optional `label` overriding the callout. A bare number (`\"mark\": 2`) is an index only\n    in a take whose marks have no ids, where it cannot be taken for one; a take with two marks of\n    one id is refused, and a miss lists the indices and the ids separately;\n  - `{ \"take\": \"ch05b\", \"mark\": \"5.4\" }` (or `\"index\"`): a mark from another take in `takes` (a\n    chapter's, or one filmed only to be borrowed), played between this chapter's beats with a\n    hard cut like any other. A persona switch filmed as its own take stays inside its chapter, and\n    in its chapter's clip, instead of becoming a segment of its own with a seam on each side. The\n    beat is still-checked against the take it came from (read against this chapter's take\n    instead, the ferry's borrowed beat misses with align 14.457, against 0.473), and a label given\n    here stays in this chapter. Its id is the mark's, or `\u003Ctake>:\u003Cindex>` for a mark with none\n    (`departures:1`); two beats of one chapter with the same id are refused, so give one an `\"id\"`.\n    Composing only the lending chapter after a re-shoot leaves the borrower's still behind: compose\n    both (the still-check would read it as an align miss). demo:export takes its steps from each\n    chapter's own take, so a borrowed beat is not a step there;\n  - `{ \"split\": [\"2.3\", \"2.4\"] }`: two earlier filmed beats side by side, each callout under its\n    window (a half-size pane drops the scrim's backdrop blur, see compose.mjs);\n  - `{ \"slide\": ... }`: a screen with no app, styled from the theme like the cards, with an\n    optional `label` callout and `title`:\n    `\"title\"` (`kicker`, `title`, `sub`, a `note` such as \"Example data\"), `\"tiles\"` (`tiles`: a\n    word or two each; a word too wide for its tile shrinks that title to fit, never breaks),\n    `\"devices\"` (`web`, `tablet`, `phone`: image files shown in a browser window, a tablet and a\n    phone), `\"pricing\"` (`tiers`: `name`, `price`, `points`, `highlight`),\n    `\"steps\"` (`steps`: numbered, joined by a line drawn in), `\"end\"` (`title`, `url`, `sub`).\n  A chapter of slides only needs no footage. `narration.marks[i]` is the line of beat `i`.\n- **Clips**: `\"clips\": true` (the default here) also writes each chapter as its own mp4 in\n  `out\u002Fclips\u002F`: its segment's lossless render given the one lossy encode the film gets, and its\n  slice of the film's stems (the music faded over 0.3s at the clip's ends), mastered on its own to\n  the same loudness target and checked the same way (a clip off target fails audio.mjs). A clip\n  with no narration or music in it (a slides-only chapter with no lines) keeps its own level and\n  only its ceiling is checked: silence measures -inf, which passes, where it read NaN and failed\n  the whole film.\n- **The still-check** reads every filmed beat like a mark (lit, dim, align, with the still's own\n  source frame for both stills), checks its callout is drawn (`callout`: mean luma difference\n  under the label against the source dimmed by that still's scrim ratio, gate `check.calloutMin`\n  12), checks every beat's line, measured from the spoken file itself, ends at least `pad` before\n  its cut, and reads both frames of every cut: a frame with only the backdrop on it has almost no\n  edges (mean luma step between neighbouring pixels at 320x180, gate `check.cutEdge` 0.9; blank\n  cut frames read 0.54 to 0.61, the sparsest slide 1.37, filmed beats 2 to 7). Slides and splits\n  are gated on timing and on their cut frames.\n\nMeasured on `examples\u002Fferry\u002Fferry.beats.config.json` (four chapters, 13 beats: three slides, a\nsplit, six filmed of which one is borrowed from another take, three more slides; HyperFrames'\nlocal voice), 720p30 draft: 47.2s, render 163s (3.5s per output second), still-check 6\u002F6 marks\nand 13\u002F13 beats, -14.0 LUFS, four clips at -14.0 to -14.1 LUFS. The 1440p60 master (fresh\nclone): 47.1s, render 1255s (26.7s per output second, under load; a slide segment costs about\nwhat a filmed one does), 452 MB of `out\u002Fseg\u002F`, 12 MB final, clips 2.8 to 3.9 MB, still-check 6\u002F6\nand 13\u002F13, -14.0 LUFS and every clip -14.0 to -14.1. With a music bed (measured on the 12-beat\nversion, before the borrowed beat) every segment start sits on a beat (0ms) and the bed ducks\nunder all 12 lines; the cuts inside a chapter follow its lines, not the bed. Falsified: the callout hidden reads 1.1 and 1.5 where drawn ones read 111 to 125, both\nmiss; a beat cut 0.2s before its line ends misses (\"line ends 8.595s, after its cut at 8.4s\");\nthe probe's blank frame 272 misses (\"shows only the backdrop (edge 0.609)\") and passes since.\nLooked at: every slide kind, the split, a filmed beat after a card, a 3-frame micro-fade.\n\n## The look\n\nAll config-driven, and the defaults are the premium look. Layout is in design px (1280x720, or\n1080x1080 square) inside a stage that CSS `zoom` scales to the canvas, so type, cards, labels and\nspotlight geometry rasterise at master size instead of being upscaled (HyperFrames'\n`--resolution` supersampling was measured slower).\n\n- **Framed window** (`frame`): the footage sits in a window inset by `padding` (80 design px:\n  2240x1260 of the 2560x1440 master), with squircle corners (a superellipse clip-path; CSS\n  `corner-shape` with `overflow: hidden` silently broke the spotlight's mask), a layered soft\n  shadow tinted from `theme.text`, on a backdrop from the theme: `glow` is a diagonal gradient of\n  `theme.bg` with soft accent and highlight light in opposite corners, plus a fixed-seed grain\n  tile against 8-bit banding. The window arrives with the chapter: rising, scaling from 0.94 and\n  tilted `tilt` degrees in 3D, eased flat before the first spotlight lights, then reset to a 2D\n  identity transform so the footage is never resampled through a 3D layer. `frame: false` is\n  full bleed, as before, on the same backdrop for the cards.\n- **Transitions** (`transitions`): each seam joins the two segments' own halves, rendered by\n  HyperFrames, with `xfade` in concat.sh: a blur crossfade (content blurs 10px and eases scale,\n  dissolved; 0.5s) and, where one chapter hands over to the next chapter or a switch card, a\n  whip (content pushed a quarter of the frame left out of, and in from the right through, a 16px\n  blur, joined by a soft-edged wipe travelling the same way; 0.4s). A plain dissolve under the\n  push read as a fade with a drift: the outgoing half only moves fast once it is mostly gone. The backdrop\n  is identical in every segment, so only content moves. Seams overlap, so the ferry cut runs\n  28.75s against 30.17s with hard cuts. Picked over one master composition by measurement: a\n  HyperFrames transition needs both scenes in one composition, and one composition of a whole\n  film at 1440p60 renders as one unresumable job, where per-segment renders resume and a seam\n  costs one `xfade` (concat of the ferry master: 82s).\n- **Cards**: edge-anchored type over the backdrop, an oversized ghost word (the chapter number\n  on chapter cards) drifting at 5.5% opacity behind, a hairline, and an entrance per kind: title\n  words rise out of a blur on expo out, chapter words rise out of line masks on power4, switch\n  cards push in from the right, the end card resolves from a blur and scale. Each card leaves\n  through its seam; the film's last segment, end card or chapter, fades out to `theme.bg`.\n\nMeasured on the ferry example (two chapters, five marks), 8-core host with no GPU, under a load\naverage of 12 to 20 from other renders (so wall times are upper bounds):\n\n| output | render.sh | per output second | `out\u002Fseg\u002F` | final mp4 | still-check |\n|---|---|---|---|---|---|\n| before: 720p30, full bleed, hard cuts | 61s | 2.0s | 70 MB of PNG | 4.0 MB, 30.17s | 5\u002F5 |\n| default: 1440p60 framed | 881s | 30.6s | 349 MB | 14 MB, 28.75s | 5\u002F5 |\n| `frame: false`, 1440p60 | 973s | 33.8s | 329 MB | 14 MB | 5\u002F5 |\n| `format: \"square\"`, 1440x1440 at 60 | 701s | 24.4s | 193 MB | 7.3 MB | 5\u002F5 |\n| `quality: \"draft\"`, 720p30 framed | 203s | 7.1s | 65 MB | 4.3 MB | 5\u002F5 |\n| `format: \"vertical\"`, 1080x1920 at 60 | 532s | 18.5s | 219 MB | 7.7 MB, 28.75s | 5\u002F5 |\n| `format: \"vertical\"`, draft 720x1280 at 30 | 138s | 4.8s | 61 MB | 3.5 MB | 5\u002F5 |\n\n`out\u002Fseg\u002F` sizes above were packed with x264's default keyframe interval; render.sh now packs with a\nkeyframe every 30 frames, about 20% more (the default ferry run: 435 MB). So a 5-minute\nfilm takes about 2.5 hours at the master on this host, under load, and about 35\nminutes as a draft: iterate in draft, render the master once. A bare 1440p60 window\nprobe (no blur, grain or tilt) captured at 12.2s per second with 4 workers and 41s with the\nsingle worker HyperFrames picks on its own, so `workers` matters more than any effect. The\ndimming blur costs about 7% (fares: 397s against 370s), because the spotlight layer is hidden\nwhenever nothing is lit. Peak RSS of any one process was 0.49 GB.\n\nText sharpness of the final mp4, by capture-pro's measure (mean gradient over edge pixels of the\nsame fares-table crop, resampled to 2x its CSS size), against the 720p30 master this replaces:\n\n| crop | before (720p30) | default (framed 1440p60) | `frame: false` | draft (framed 720p30) |\n|---|---|---|---|---|\n| zoomed, mark \"Resident fare needs proof\" | 54.6 | 68.7 (+26%) | 114.1 (+109%) | 49.8 |\n| wide, the whole fares table at 1x | 41.0 | 59.8 (+46%) | 74.3 (+81%) | 45.2 |\n\nFull bleed keeps every capture pixel; the window shows them at 0.875, still well past the old\nmaster. A draft looks like the old master, softer where zoomed because the window is smaller.\n\n## Sound, narration and captions\n\n`concat.sh` ends by running `scripts\u002Faudio.mjs`, which mixes the sound, muxes it into\n`out\u002F\u003Cname>.mp4` (picture copied, not re-encoded), checks the loudness and writes the captions.\nEverything is timed from what capture recorded, not inferred from the picture:\n\n```\nevents.json ─▶ compose.mjs ─▶ plan.json cues (click, type, camera) + spots ──────┐\nnarration ───▶ hyperframes tts ─▶ transcribe ─▶ anchor match ─▶ freezes ────────┼─▶ audio.mjs ─▶ \u003Cname>.mp4\n          └──▶ deepgram speak ─▶ deepgram listen ─▶ anchor word start ──┘\nmusic file ──▶ hyperframes beats ─▶ card padding, every cut on a beat ──────────┘    captions.vtt, chapters.vtt\n```\n\n- **Sound effects**, on by default and quiet: a soft tick on each click, a key tick every 2 or 3\n  typed characters (pitch varied 5%), a whoosh as long as each zoom or wide, a bell on each\n  spotlight as it is fully lit. They are synthesised in `audio.mjs`, so there is no sound file to\n  licence (HyperFrames' own library is under the Pixabay licence, which does not allow shipping\n  the files themselves). Peaks before mastering: tick -24, key -33, whoosh -30, bell -28 dBFS,\n  all moved by `sfx.level` dB; any kind can be set `false` (`zoom` covers both camera moves),\n  or `\"sfx\": false` for none. Clicks and typing come from capture's `click` and `type` events,\n  moves from its `camera` events, so a take filmed before those existed gets only the bells.\n- **Music bed**, only when `audio.music.file` names one (bring your own, licensed). Levelled to\n  `level` LUFS, faded in and out so it ends with the last card, looped if short, and ducked\n  `duck` dB (default 11) under every narration line: down over 0.25s before a line, back up over\n  0.6s after, lines closer than 1.35s share one duck. With `snap` (default) each segment's\n  leading card grows by under one beat so every cut lands on a beat, to the nearest frame (so\n  within half a frame, 16.7ms at 30fps). `hyperframes beats` only seeds the tempo: on a 100 BPM\n  tick bed it reported 101.4 BPM, which walked its beats 0.8s off the ticks within a minute. The\n  grid is a steady period and phase fitted to the bed's own onsets, and a bed with no beat steady\n  enough (fit contrast under 2.5) gets a warning and unsnapped cuts rather than a failure. The\n  fitted grid is cached under `work\u002Faudio\u002Fbeats` by the bed's content (sha256: 20ms for a 17 MB\n  bed), so a bed replaced under the same name is fitted again (keyed by name and mtime, a 120 BPM\n  bed copied over a 100 BPM one with an older mtime kept the old grid, 200ms off the beat). Every\n  segment is whole frames (a duration that is not renders one frame too many), and starts are\n  counted in frames, so a fresh compose lands its cuts on the first run. Re-cutting one chapter\n  moves every later start, so with a bed `compose.mjs` also composes again each later segment\n  whose start has moved, and `audio.mjs` fails when a cut sits more than a frame off the grid,\n  which only a segment rendered from a stale plan can do: re-run `compose.mjs` and `render.sh`.\n  With transitions a cut is the frame the next segment starts to come in (its seam overlaps the\n  end of this one), so the pad aims that frame at the beat, and `audio.mjs` places every sound at\n  the segment starts `concat.sh` records in `work\u002Ftimeline.json`, seams already taken off.\n\n  | bed (ferry example, measured) | detector | fitted | cuts off the beat | result |\n  |---|---|---|---|---|\n  | 100 BPM ticks, frame-quantised onsets | 101.4 BPM | 100.00 BPM | 15, 15, 15, 15 ms | snapped |\n  | 100 BPM pad, kick and hats | 100 BPM | 100.00 BPM | 0, 0, 0, 0 ms | snapped |\n  | 128 BPM four-on-the-floor kick | 127.9 BPM | 128.00 BPM | 14, 7, 12, 3 ms | snapped |\n  | pink-noise drone, no beat | 245.9 BPM | contrast 1.22 | n\u002Fa | warned, not snapped |\n\n  Duck depth measured 11.00 dB.\n- **Narration**, only when lines are configured: `narration` on a card (spoken over it; the card\n  stays up until the line ends) and on a chapter (`intro` over the chapter card, `marks` one line\n  per mark, `null` to skip one). `hyperframes tts` (Kokoro, local; or Deepgram, below) speaks each line once and caches\n  it under `work\u002Faudio\u002Ftts` by text, voice and model. Every narrated beat **holds until its line has\n  finished**: where a line would outlast its spotlight or start before the previous one ends, the\n  footage freezes on a still frame for whole frames until it fits: at the end of the previous hold\n  (its spotlight stays up), or for the first mark where its spotlight starts to fade in, or, when a\n  hold reaches the end of the take, on its last frame. The plan records every freeze (`freezes`, in\n  composition seconds) and the still-check maps its stills through them to the source frame shown.\n  Changing a line or moving its `{@anchor}` re-times it; the cache is keyed by text, voice, model\n  and anchor.\n- **Anchors**: `{@name}` in a line marks the word right after it; the line is placed so that word\n  starts exactly as the spotlight is fully lit (without one, the first word does). `hyperframes\n  transcribe` alone is not precise enough for this: against stop-consonant bursts in 13 test lines\n  its word starts were -121ms to +183ms out, worst where no pause comes before the word. So the\n  words from the anchor on are spoken again on their own and that clip's first 0.15s is matched\n  against the line's loudness envelope near the recogniser's guess: -8ms to +24ms on the same 13\n  lines, inside one 30fps frame. On the finished narrated ferry cut, burst against the spotlight\n  being fully lit was -23ms to +8ms at all five anchors. A weak match (correlation under 0.8)\n  falls back to the recogniser's time and says so.\n- **Deepgram voices** (`\"tts\": \"deepgram\"`): Aura-2 over HTTPS, one request per line, 48kHz WAV.\n  Every request (speak and listen) gets up to 4 attempts of 60s each, retried on a dropped\n  connection, a 429 or a 5xx (waiting as long as Retry-After asks, at most 30s, else 1, 2, 4s),\n  and a clip is cached only once it is a WAV: a 200 carrying an HTML page or a cut-off body is\n  refused and retried, never kept as the line. The key is read from `DEEPGRAM_API_KEY` only, never from a config file;\n  without it a run that has a line to speak stops before speaking anything and names the variable,\n  and a run whose lines are all cached needs no key. Each clip is cached by sha256 of text, voice\n  and rate (`work\u002Faudio\u002Ftts\u002Fdg-*.wav`), so a re-render, a re-timing or a new anchor never re-bills\n  a line. `voice` is any Aura model (anything else, such as the local default `af_heart` left in,\n  is refused before a request); a `speed` other than 1 is refused (Aura-2 has its own pace). Word times\n  come from Deepgram's recogniser (nova-3, `\u002Fv1\u002Flisten`, cached beside the clip), and the anchor\n  is its word start: the tail match above needs the tail spoken as the line spoke it, and Aura-2\n  re-speaks it differently. The recogniser listens in the voice's language (the `-en` of the\n  model), without smart formatting, so a number spelled out in the line is heard back as words.\n  An anchor word it did not hear has only an interpolated time, and compose warns: reword the\n  line or move the anchor. Compose speaks only the lines of the segments it was asked for, unless\n  their lengths decide other segments' timing (a music bed, `targetDuration`). Measured on 14 anchors (the ferry's five and nine more lines), each\n  estimate read against the word's audible onset on a spectrogram: listen within about 20ms on\n  13, the 14th (\"the block\", at the b's closure) 110ms early; `hyperframes transcribe` up to\n  270ms early; the tail match under r 0.8 on 3 and on the wrong word on 3 (up to 390ms). The\n  ferry narrated cut with `\"tts\": \"deepgram\"`: 5\u002F5, -14.1 LUFS, -1.9 dBTP, anchors placed at the\n  spotlight's lit time. Four voices auditioned on one 13-word line (crude autocorrelation pitch,\n  pauses over 150ms): thalia (default) 5.2s, f0 216Hz, 9.5 semitones of range, a short comma\n  pause; apollo 6.6s, 150Hz, 10.5, the slowest; draco (British) 5.7s, 109Hz, 7.6, the flattest;\n  pandora (British) 5.4s, 198Hz, 8.9, the longest comma pause. Pick by ear: it is a config value.\n- **Loudness**: a mix with narration or music is mastered to `loudness.target` (-14 LUFS\n  integrated) by measured gain plus a limiter 1 dB under `truePeak` (-1 dBTP), corrected once,\n  then measured again on the AAC in the final file. `audio.mjs` exits 1, failing `concat.sh`, when\n  that measurement is more than `tolerance` LU off or over the ceiling. Sound effects on their own\n  are not normalised: lifting sparse ticks to -14 LUFS puts each one near full scale, so they keep\n  their own low level and only the ceiling is checked. A mix with nothing in it (every effect off,\n  no narration, no music) leaves the video silent and skips the gate.\n\n  | ferry example, fresh clone, 60fps 2x takes, plain ffmpeg 8.1, measured on the final file | integrated | true peak |\n  |---|---|---|\n  | effects only (`ferry.config.json`) | -37.7 LUFS | -25.4 dBTP |\n  | effects + a 100 BPM music bed | -14.0 LUFS | -1.7 dBTP |\n  | effects + narration (`ferry.narrated.config.json`) | -14.0 LUFS | -1.9 dBTP |\n\n- **Captions**, always: `out\u002F\u003Cname>.captions.vtt` (narration, each sentence split into the fewest\n  even cues of at most `maxWords` words and 42 characters; without narration, each spotlight's\n  label while it is lit) and `out\u002F\u003Cname>.chapters.vtt` (one cue per segment, titled from the\n  config). `\"captions\": { \"burn\": true }` also writes `out\u002F\u003Cname>-captions.mp4` with the captions\n  burned in and the spoken word in `theme.highlight`, rendered through HyperFrames: for social\n  cuts that autoplay muted. Word highlights follow the recogniser's word times, so they can sit\n  up to about 0.2s off; anchors do not. `format: \"vertical\"` draws them into the picture itself\n  instead (`burn` defaults to true there, with no .vtt; false leaves them out and writes it).\n- **Listen-proxy**: `out\u002F\u003Cname>-audio.png` stacks four waveforms: effects, narration, music, final\n  mix. Look at it for clipping, the ducks and where each sound sits. `out\u002F\u003Cname>.audio.json` holds\n  the measurements, cue counts and duck windows.\n\nNarration setup, once per machine: `hyperframes tts` needs Kokoro in a Python it can use, and the\nfirst run downloads the Kokoro model and whisper `medium.en`.\n\n```bash\nuv venv --python 3.12 ~\u002F.local\u002Fshare\u002Fhf-tts && uv pip install --python ~\u002F.local\u002Fshare\u002Fhf-tts\u002Fbin\u002Fpython kokoro-onnx soundfile\nexport HYPERFRAMES_PYTHON=~\u002F.local\u002Fshare\u002Fhf-tts\u002Fbin\u002Fpython\n```\n\n`examples\u002Fferry\u002Fferry.narrated.config.json` is the ferry example with narration and burned-in\ncaptions (out dir `compose-narrated`). Run it exactly like `ferry.config.json`; the first compose\ntakes a few minutes for speech and timing, later ones reuse the cache.\n`node \"$S\u002Fscripts\u002Faudio-check.mjs\"` checks the timing logic (anchors, holds, freezes, envelope\nmatch) on synthetic input in about a second.\n\n## Style rules the generator holds to\n\nMeasured on a 5:36 ten-chapter demo, 47 marks. Change them in config, not in code.\n\n- **Spotlight**: dim everything except the mark's rect (default 60% black scrim, softened by a\n  2px blur, `spotlight.blur`), through a cut-out feathered over 18px outside the rect, with a thin\n  accent edge and glow. It irises in (from 6% larger, expo out over 0.5s) with one light sweep\n  across the lit rect (`spotlight.sweep`). When the next mark lights within `spotlight.glide`\n  (2.5s) of this hold ending and the square or vertical view does not change between them, the\n  cut-out does not fade out: it glides, moving and reshaping onto the next rect over the gap with\n  the camera move, arriving when the next spotlight's fade-in would have finished (so a narration\n  anchor timed to that moment still lands on it). The glide rides the filmed camera: the cut-out\n  travels across the page, from one mark's rect to the next, and each frame draws that page rect\n  where the capture camera had it on that frame (`poses` in events.json), so the content under\n  the hole never slides. Its progress is the length of the camera's path so far over the whole\n  path's (centre distance plus log zoom, frame to frame), with the old power3 ease of time as a\n  floor: the camera often rests zoomed out between two marks, and a hole tied to the camera alone\n  parked half way across two cards for 1s. The path length never jumps; the first version took\n  the ratio of distances to the two end poses, which snapped the hole half way in one frame when\n  the camera ends where it started (a zoom out and back between two marks: step 0.50 of the path\n  on a probe take, now 0.05). The pose is the one on the source frame actually shown: the\n  re-timed footage gives each output frame the last source frame before the middle of the next\n  output interval (ffmpeg's `fps`, round=near), which on an index-coded take matched 292 of 339\n  frames and the rest within one; reading the frame at the re-timed time matched 37, one to two\n  frames behind at 2x. Measured on ferry (three glides, design px of the 1280-wide screen): the\n  eased frame-space tween it replaces slid over the content by up to 258px (mean 111) on one glide\n  and 114 and 192px on the others; now 0 by construction (the correction that keeps the end\n  boxes exact came to 0px), and mid-glide the still-check reads the rendered hole on its planned\n  box (below). When the camera is 99% of the way to the next mark the hole is 1.4, 3.3 and 9.6px\n  from its final box, where the tween was 42.4, 12.3 and 146.1px off: it arrives with the content,\n  not after it. `COMPOSE_TRACE=1` writes the per-frame\n  trace (`work\u002F\u003Cchapter>-glide-m\u003Ci>.json`). A take without `poses` keeps the eased tween. A glide lasts at least 0.35s: if the next mark lights\n  sooner (pace above 1, or a spotlight waiting for the camera), this hold ends early to make room\n  and its label leaves as the glide starts; if that would leave the hold under 0.7s, too short\n  for the two stills, or cut into the mark's narration line, it fades instead. Across a square re-frame the camera moves under the cut-out, so there it always fades\n  out and irises in. Each run of glides is its own element, so one mark's fade-out can never touch\n  the next (a shared one hid a mark lit within 0.3s of the last hold, found in review). It fades in 250ms before `t`, or once the zoom into the mark has\n  settled in the footage if that is later, holds 1.5 to 2.5s, fades out. Fading in 250ms before\n  `t` regardless put 51% of each ferry zoom's motion under the fading-in cut-out; now 0.7%, the\n  frame that completes the move. Settled means the camera event's end (from demo:capture), then\n  every frame-to-frame change up to 0.25s after it, which is the camera landing (from a\n  screencast take the logged end trails the last pose by a 30ms wait, and the pose reaches the\n  footage 16-63ms later; a deterministic take logs the exact frame the spring settled on; the\n  window leaves room for a slow landing under load). Changes past 0.25s are the page itself\n  moving: they do not delay the spotlight (they used to, by ~0.4s on a board with a blinking\n  badge; now 0.18-0.22s, bounded by the window) and compose warns about them. `plan.json`\n  records when each spotlight starts as `litFrom` and its fade as `fadeIn`.\n- **Labels**: at most 6 words, sentence case, placed clear of the cut-out inside a 64px safe\n  margin, popping in on a spring (back out, from 0.88 scale toward the cut-out). Over-long labels warn rather than fail. Rewrite the capture's label candidates for\n  clarity; never claim something the footage does not show.\n- **Chapter cards** about 2s (persona line plus chapter title), **title and end cards** about 3s.\n  Lengths are design px throughout (720 lines landscape, 1080 square); the canvas scales them.\n- No annotation is ever burned into the footage. Everything is an overlay on top of an\n  untouched capture, so a relabel is a re-render and never a re-shoot. Sound is a layer of its\n  own (see above), so re-mixing is `node scripts\u002Faudio.mjs \u003Cconfig>` and never a re-render.\n- Navigation clicks stay in, played at `speed.travel`. Only dead holds over 2s and configured\n  cuts are trimmed.\n\n## Two defects this generator already fixes\n\nBoth were found by looking at stills, not by reading code. Do not \"simplify\" them away.\n\n1. **A hold must not run past a camera move.** The cut-out is placed for the frame at `t`. If\n   the hold outlives a zoom, a `wide`, or a navigation, the frame changes underneath and the\n   cut-out lands on nothing. `stableUntil()` samples the footage at 10fps from `t+0.3` and ends\n   the hold at the first frame that differs from the mark pose, capped at `hold.max`.\n2. **A label must not cover its own spotlight.** Placement tries below, above, right, left, each\n   fully outside the cut-out and inside the safe margin. When nothing fits, the cut-out's bottom\n   is cropped (`below-cropped`) so the label sits under it. Overlap is then re-asserted\n   geometrically by `check.mjs`, so a regression fails the gate.\n\n## The still-check is the gate, not an extra\n\n`check.mjs` renders two stills per mark. Still A is at `compT + 0.5`, or `litFrom + fadeIn +\n0.1` if later, so a spotlight that waited for the camera is not read mid-fade, and always at\nleast 0.1s before still B, which is 0.05s before the fade-out. A hold too short for that window\nmisses as \"lit too briefly to check\" instead of a false scrim or drift reading (measured: hold\n0.4s on the ferry board). A spotlight that glides in arrives at `litFrom + fadeIn`, when its fade-in\nwould have finished, so the stills read it the same way.\nIt runs five tests against the rendered segment and the untouched source frame. It prints one\nline per mark and exits 1 if any mark misses.\n\nEvery reading happens in the design space compose lays out in: the rendered frame is cropped to\nthe footage's screen inside the framed window (the whole frame when `frame: false`) and scaled to\n1280x720 (1080x1080 square, the 1000x820 window for vertical), so the thresholds below mean the same at draft and at the master,\nframed or not. A still is also a miss if it falls inside a transition: before the window has\nsettled (its arrival and tilt, `settledFrom` in plan.json) or after the seam into the next\nsegment begins (`tailFrom`). Compose ends any hold before that seam, and warns when it cuts one.\n\n| test      | what it measures                                            | what it catches                      |\n|-----------|-------------------------------------------------------------|--------------------------------------|\n| `lit`     | cut-out luma \u002F same region in the source, both stills        | spotlight missing, or mistimed       |\n| `dim`     | ring outside the cut-out \u002F same ring in the source           | scrim not applied                    |\n| `sd`      | luma spread under the cut-out                                | cut-out landed on empty background   |\n| `drift`   | cut-out region, still A vs still B, in the source            | defect 1: hold outran a camera move  |\n| `align`   | mean luma difference, render vs source framed through the mark's view, under the cut-out | crop or camera not yet where the spotlight was laid out (still moving) |\n| label     | label box vs spotlight box, geometric                        | defect 2: label over its spotlight   |\n| glide     | largest share of the glide's path in one frame (plan); lit, dim and align of the hole at the glide's middle frame | a glide that snaps, or a hole not drawn where planned |\n\nThe ring samples 34px clear of the box edge and skips the label rect. Closer in, the spotlight's\nown 22px glow reads as \"not dimmed\" and every mark fails; so would the feather, which is why\nconfig refuses `spotlight.feather` over 24. The thresholds did not move for the new look, and\nwere not loosened: with the feathered, blurred scrim the ferry reads lit 1.00 and dim\n0.397-0.399, against 1.00 and 0.396-0.397 from the old hard-edged one (the scrim is 60% black,\nso a clean dim reads 0.40; the gate is 0.62).\n\n`align` (gate `check.alignMax`, 7 of 255, set from ferry readings, not derived) was added with the vertical crop, which moves under the\nfootage: `lit` and `dim` are ratios that hold over a shifted page, and `drift` reads the source,\nso a crop still sliding while a spotlight was up passed every other test (falsified: crop retargeted 0.2s\ninto each hold, both marks still hit). With `align` those two miss at 11.1 and 9.0. Correct\nrenders on ferry read 0.47-0.56 (landscape draft), 1.7-3.0 (vertical master) and 2.4-4.3\n(vertical draft, the 720-wide render scaled up to the 1000px design window, so text edges soften).\nThe source side is a nearest-neighbour scale of the 1x-sized read, so dense small text reads\nhigher than ferry's; raise `alignMax` for such an app rather than trusting 7 blindly. It is read\nonly on stills past the light sweep (`sweepTo` in plan.json, 0.9s after the spotlight starts),\nwhich brightens the cut-out: a spotlight that waited for the camera put still A inside it, about 8\non dark UI. If both stills fall inside, still B is used.\n\nA glided spotlight is also checked mid-glide. No frame may cover more than `check.glideStep`\n(0.2) of the path, or 1.5x the steepest frame of the power3 ease on a short glide: ferry's glides\npeak at 0.06-0.12, a probe with the old progress (the camera ending where it started) at 0.50, a\nmiss. And the glide's middle frame is read like a still: ferry's holes read lit 1.00, dim 0.40,\nalign 0.27 and 0.76. With the per-frame sets removed from the rendered project, so the hole\nwaited at the last mark, both glides miss (align 30.6 and 11.5); lit and dim alone still passed\n(0.88 and 0.96, dim 0.48 and 0.60), which is why align is read there too.\n\nIt also writes `work\u002Fstills-\u003Cchapter>.png`, a 2-wide tile of every still with its mark index and\ntime drawn on. **Look at it.** The numbers say the geometry is right; the sheet says the label\nreads and the frame is the one you meant.\n\nA failing mark is a config problem, not a code problem. Usual fixes, in order: shorten the\nlabel, add a `cuts` entry to remove the drifting span, re-mark the chapter in `demo:capture`\nwith a tighter `hold` before the next camera move.\n\n## Encode chain\n\nA footage frame used to be lossy-compressed seven times (screencast JPEG, x264 crf18, x264\ncrf14, HyperFrames' JPEG frame extraction, JPEG page capture and crf16 encode, then concat at\ncrf20). Now every intermediate is lossless and the only lossy step a viewer sees is the last:\n\n```\nscreencast JPEG                       capture, the one source\n  ─▶ take mp4         x264 -qp 0      bit-exact against the JPEGs\n  ─▶ retimed footage  x264 -qp 0      bit-exact\n  ─▶ segment frames   PNG             --format png-sequence --video-frame-format png\n  ─▶ segment mp4      x264rgb -qp 0   packed by render.sh, bit-exact against the PNGs\n  ─▶ final mp4        x264 crf 16     slow, tune animation, yuv420p, BT.709 tags, faststart\n```\n\nThe table below was measured at 720p30 with the final at crf 14. At the 1440p60 master the crf\nwas re-measured on the ferry fares segment, against the same 4:2:0 conversion encoded losslessly\n(so it isolates the crf):\n\n| crf | luma PSNR | SSIM | text crop PSNR | size (10.8s) |\n|---|---|---|---|---|\n| 12 | 55.0 dB | 0.9985 | 54.9 dB | 7.3 MB |\n| 14 | 53.4 dB | 0.9978 | 53.4 dB | 5.8 MB |\n| **16** (default) | 52.0 dB | 0.9970 | 52.0 dB | 4.6 MB |\n| 18 | 50.6 dB | 0.9959 | 50.4 dB | 3.6 MB |\n| 20 | 49.2 dB | 0.9946 | 48.9 dB | 2.7 MB |\n\nEvery row is past visually lossless; 16 keeps 52 dB on text for 20% less than 14. Set `crf`\nlower for an archival master.\n\nHyperFrames' output options, measured on one ferry capture, four segments, the same final\nencode (text crop inside each cut-out against the source screencast frame, RGB):\n\n| segments | render.sh | `out\u002Fseg\u002F` | crop PSNR \u002F SSIM |\n|---|---|---|---|\n| before: mp4 `--quality looks`, concat crf 20 | 33.6s | 3.0 MB | 38.07 dB \u002F 0.98847 |\n| mp4 `--quality delivery` | 44.9s | 4.2 MB | 40.99 dB \u002F 0.99367 |\n| mp4 `--crf 0` | 42.9s | 13 MB | 41.22 dB \u002F 0.99437 |\n| mov (ProRes 4444) | 85.8s | 190 MB | 43.34 dB \u002F 0.99672 |\n| **png-sequence** (used) | 61.9s | 100 MB | 46.66 dB \u002F 0.99678 |\n| ceiling: png-sequence, final at x264 -qp 0 | | | 48.41 dB \u002F 0.99826 |\n\n- mp4 keeps HyperFrames' fast BeginFrame capture, but it captures mp4 pages as JPEG q95 and no\n  flag turns that off. There is no non-alpha lossless output, and an alpha format (png-sequence,\n  mov) falls back to the slower capture path, hence the extra render time.\n- png-sequence is an alpha format: it makes the composition root and body transparent, and a\n  frame comes out RGBA wherever a pixel is transparent (RGB only when every pixel is opaque:\n  0 of 840 ferry frames had alpha, 90 of 90 did with the `#bg` fill removed). The pack\n  drops the alpha, so a transparent pixel becomes black. The invariant: every visible element of\n  a template sits on an opaque layer; the full-bleed `#bg` child is that layer for the root.\n  `render.sh` counts frames with an alpha channel and warns if there are any.\n- The PNGs carry sRGB colour, so `concat.sh` has no input matrix to guess: it converts once to\n  BT.709 limited range with explicit tags.\n- The takes and retimed footage use a lossless H.264 profile that browsers cannot play;\n  ffmpeg, this skill and the montage read them fine. Watch the final mp4.\n- render.sh packs each segment's PNGs into a lossless RGB mp4 and deletes them: at 1440p60 the\n  ferry's PNGs were 3.3 GB for 30s of video (fares: 1011 MB of PNG, 141 MB packed, PSNR infinite\n  against every PNG checked). A keyframe every 30 frames keeps each still-check seek short: with\n  x264's default of 250 the ferry check took 45.7s, now 29.1s, for 20% more disk (fares 115 MB at\n  250). So `out\u002Fseg\u002F` holds well under 1 GB per minute at the master, where PNGs would have been\n  6.6 GB. It is scratch: delete it once the final mp4 is good.\n  **Free disk while rendering**: before capturing, HyperFrames refuses unless free space on the\n  `out` filesystem is at least the raw RGBA size of the render's frames over 0.9 (width x height\n  x 4 bytes a frame: about 1 GB per second at the 1440p60 master, so the ferry's 13.3s chapter\n  asks for 13.1 GB and a 34s chapter would ask for 33 GB; about 0.12 GB per second at draft),\n  although the PNGs it writes are about a tenth of that. `--low-memory-mode` does not lift the\n  check (measured: a 40s 1440p60 render was refused the same with it on). So `hfrender.mjs`\n  measures the free space first and, when a segment would not fit, renders it in time chunks that\n  do, using 80% of what the check allows, and says so in one line, as in this ferry run forced\n  into chunks with `HF_CHUNK_FRAMES=300` (an override for testing, which the line also names):\n  `fares: 649 frames need 10.6 GB free for HyperFrames' disk check, 25.0 GB is free: rendering\n  3 chunks of up to 217 frames`.\n  Each chunk is a copy of the project re-timed to a window of its timeline; the packed chunks join\n  without re-encoding. A chunk matches the whole render as closely as two whole renders match\n  each other: at the master, forced into 300-frame chunks, the ferry's departures and fares came\n  out 552 of 799 and 506 of 649 frames bit-exact against the whole render, the rest at 77 dB or\n  better, and two whole draft renders of fares differ the same way (276 of 324 bit-exact, the\n  rest about 86 dB); the chunked film passed the still-check 5\u002F5. A chunk costs about 5s of\n  start-up (draft fares, 3 chunks: 48s against 45s). What the render really used at its peak,\n  sampling free space every second through the ferry master: 3.1 GB, during the 13.3s chapter\n  HyperFrames asked 13.1 GB for.\n\nAt 720p the gap to the ceiling was crf 14; what remains below the ceiling is the 4:2:0 conversion and\nthe full-to-limited range change, which any BT.709 4:2:0 delivery pays.\n\n## Files\n\n- `scripts\u002Fconfig.mjs`: config load, defaults, font stacks, segment ordering.\n- `scripts\u002Fcompose.mjs`: one standalone HyperFrames project per segment. Separate projects keep\n  each render small and lint clean.\n- `scripts\u002Fhfrender.mjs`: one project to one lossless mp4, in time chunks when the disk is short.\n- `scripts\u002Frender.sh`, `scripts\u002Fconcat.sh`: render loop (PNG sequences, packed losslessly) and\n  the seams plus the one final encode (see Encode chain). concat.sh also writes\n  `work\u002Ftimeline.json`: where each segment starts in the final cut, with its seam.\n- `scripts\u002Faudio.mjs`: sound effects, music, narration timing (also imported by `compose.mjs`), mix,\n  loudness check. `scripts\u002Fcaptions.mjs`: caption and chapter files, burned-in captions (vertical\n  draws its own in the composition from the same cues).\n  `scripts\u002Faudio-check.mjs`: their timing logic on synthetic input.\n- ffmpeg and ffprobe, everywhere: config `\"ffmpeg\"`\u002F`\"ffprobe\"`, then env `FFMPEG`\u002F`FFPROBE`,\n  then the distro build at `\u002Fusr\u002Fbin`, then PATH (Homebrew on macOS, where `\u002Fusr\u002Fbin` is\n  read-only). Every step, the still-check verdict included, runs on a plain build. The one\n  cosmetic extra is the caption on each contact tile (`drawtext`, libfreetype), which some\n  builds lack (Homebrew's default formula, measured on 8.1): `check.mjs` then prints one warning\n  and writes the tiles uncaptioned. Linux hosts pick `\u002Fusr\u002Fbin\u002Fffmpeg` first, which has it.\n- `render.sh` and `concat.sh` are `#!\u002Fbin\u002Fbash`, which is bash 3.2 on macOS: they use no bash-4\n  features (no `mapfile`, associative arrays or case-changing expansions). The sound layer is\n  Node, and needs no `timeout` binary.\n- `examples\u002Fferry\u002Fferry.beats.config.json`, `examples\u002Fferry\u002Fslides\u002F`: the ferry in beat mode, with\n  one slide of each kind (the device images are the ferry app at web, tablet and phone sizes).\n- `scripts\u002Fcheck.mjs`: the gate. For square and vertical output it frames the source frame with\n  the same view as the composition before comparing.\n- `assets\u002Ftemplate\u002F`: `hyperframes.json` and `package.json`. Compose installs pinned GSAP 3.14.2,\n  verifies its SHA-256, and copies it beside generated `index.html`, so renders stay local. If\n  installation fails, it emits a warning and uses pinned jsDelivr with SRI. Run\n  `node scripts\u002Fcheck-local-gsap.mjs \u003Cgenerated-project-dir>` to confirm the local path.\n- `examples\u002Fferry\u002F`: a runnable example, a made-up app with its server, beats file, config and\n  fonts, every path relative to that directory.\n",{"name":5,"description":7},"main","9cf32d1e636db09530158af14ba301bfa5d401e9","plugins\u002Fdemo\u002Fskills\u002Fcompose","https:\u002F\u002Fgithub.com\u002Fstevengonsalvez\u002Fainb-toolkit","https:\u002F\u002Fgithub.com\u002Fstevengonsalvez","stevengonsalvez.com","2026-11-12 00:50:59",{"source":8,"skillName":5,"commands":32,"prompt":42,"zipAvailable":43},[33,36,39],{"tool":34,"command":35},"npx","npx skills add stevengonsalvez\u002Fainb-toolkit --skill compose",{"tool":37,"command":38},"bunx","bunx skills add stevengonsalvez\u002Fainb-toolkit --skill compose",{"tool":40,"command":41},"pnpm","pnpm dlx skills add stevengonsalvez\u002Fainb-toolkit --skill compose","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fstevengonsalvez\u002Fainb-toolkit\u002Fblob\u002Fmain\u002Fplugins\u002Fdemo\u002Fskills\u002Fcompose\u002FSKILL.md",true,[45,51,55,61,67,71,75,79,85,89,93,97,101,105,109,113,117,121,125,129,133,137,141,145,149,153,157,161],{"path":46,"resourceType":47,"resourceTypeDesc":48,"sizeBytes":49,"sourceHtmlUrl":50},"assets\u002Ftemplate\u002Fhyperframes.json","ASSET","资产文件",318,"https:\u002F\u002Fgithub.com\u002Fstevengonsalvez\u002Fainb-toolkit\u002Fblob\u002Fmain\u002Fplugins\u002Fdemo\u002Fskills\u002Fcompose\u002Fassets\u002Ftemplate\u002Fhyperframes.json",{"path":52,"resourceType":47,"resourceTypeDesc":48,"sizeBytes":53,"sourceHtmlUrl":54},"assets\u002Ftemplate\u002Fpackage.json",237,"https:\u002F\u002Fgithub.com\u002Fstevengonsalvez\u002Fainb-toolkit\u002Fblob\u002Fmain\u002Fplugins\u002Fdemo\u002Fskills\u002Fcompose\u002Fassets\u002Ftemplate\u002Fpackage.json",{"path":56,"resourceType":57,"resourceTypeDesc":58,"sizeBytes":59,"sourceHtmlUrl":60},"examples\u002Fferry\u002F.gitignore","OTHER","其他",111,"https:\u002F\u002Fgithub.com\u002Fstevengonsalvez\u002Fainb-toolkit\u002Fblob\u002Fmain\u002Fplugins\u002Fdemo\u002Fskills\u002Fcompose\u002Fexamples\u002Fferry\u002F.gitignore",{"path":62,"resourceType":63,"resourceTypeDesc":64,"sizeBytes":65,"sourceHtmlUrl":66},"examples\u002Fferry\u002Fapp\u002Falerts.html","REFERENCE","参考文档",759,"https:\u002F\u002Fgithub.com\u002Fstevengonsalvez\u002Fainb-toolkit\u002Fblob\u002Fmain\u002Fplugins\u002Fdemo\u002Fskills\u002Fcompose\u002Fexamples\u002Fferry\u002Fapp\u002Falerts.html",{"path":68,"resourceType":63,"resourceTypeDesc":64,"sizeBytes":69,"sourceHtmlUrl":70},"examples\u002Fferry\u002Fapp\u002Fboard.html",1617,"https:\u002F\u002Fgithub.com\u002Fstevengonsalvez\u002Fainb-toolkit\u002Fblob\u002Fmain\u002Fplugins\u002Fdemo\u002Fskills\u002Fcompose\u002Fexamples\u002Fferry\u002Fapp\u002Fboard.html",{"path":72,"resourceType":63,"resourceTypeDesc":64,"sizeBytes":73,"sourceHtmlUrl":74},"examples\u002Fferry\u002Fapp\u002Ffares.html",974,"https:\u002F\u002Fgithub.com\u002Fstevengonsalvez\u002Fainb-toolkit\u002Fblob\u002Fmain\u002Fplugins\u002Fdemo\u002Fskills\u002Fcompose\u002Fexamples\u002Fferry\u002Fapp\u002Ffares.html",{"path":76,"resourceType":57,"resourceTypeDesc":58,"sizeBytes":77,"sourceHtmlUrl":78},"examples\u002Fferry\u002Fapp\u002Fstyle.css",1750,"https:\u002F\u002Fgithub.com\u002Fstevengonsalvez\u002Fainb-toolkit\u002Fblob\u002Fmain\u002Fplugins\u002Fdemo\u002Fskills\u002Fcompose\u002Fexamples\u002Fferry\u002Fapp\u002Fstyle.css",{"path":80,"resourceType":81,"resourceTypeDesc":82,"sizeBytes":83,"sourceHtmlUrl":84},"examples\u002Fferry\u002Fbeats.mjs","SCRIPT","脚本",1535,"https:\u002F\u002Fgithub.com\u002Fstevengonsalvez\u002Fainb-toolkit\u002Fblob\u002Fmain\u002Fplugins\u002Fdemo\u002Fskills\u002Fcompose\u002Fexamples\u002Fferry\u002Fbeats.mjs",{"path":86,"resourceType":63,"resourceTypeDesc":64,"sizeBytes":87,"sourceHtmlUrl":88},"examples\u002Fferry\u002Fferry.beats.config.json",4314,"https:\u002F\u002Fgithub.com\u002Fstevengonsalvez\u002Fainb-toolkit\u002Fblob\u002Fmain\u002Fplugins\u002Fdemo\u002Fskills\u002Fcompose\u002Fexamples\u002Fferry\u002Fferry.beats.config.json",{"path":90,"resourceType":63,"resourceTypeDesc":64,"sizeBytes":91,"sourceHtmlUrl":92},"examples\u002Fferry\u002Fferry.config.json",1129,"https:\u002F\u002Fgithub.com\u002Fstevengonsalvez\u002Fainb-toolkit\u002Fblob\u002Fmain\u002Fplugins\u002Fdemo\u002Fskills\u002Fcompose\u002Fexamples\u002Fferry\u002Fferry.config.json",{"path":94,"resourceType":63,"resourceTypeDesc":64,"sizeBytes":95,"sourceHtmlUrl":96},"examples\u002Fferry\u002Fferry.narrated.config.json",2015,"https:\u002F\u002Fgithub.com\u002Fstevengonsalvez\u002Fainb-toolkit\u002Fblob\u002Fmain\u002Fplugins\u002Fdemo\u002Fskills\u002Fcompose\u002Fexamples\u002Fferry\u002Fferry.narrated.config.json",{"path":98,"resourceType":47,"resourceTypeDesc":48,"sizeBytes":99,"sourceHtmlUrl":100},"examples\u002Fferry\u002Ffonts\u002Ffraunces-700.woff2",35512,"https:\u002F\u002Fgithub.com\u002Fstevengonsalvez\u002Fainb-toolkit\u002Fblob\u002Fmain\u002Fplugins\u002Fdemo\u002Fskills\u002Fcompose\u002Fexamples\u002Fferry\u002Ffonts\u002Ffraunces-700.woff2",{"path":102,"resourceType":47,"resourceTypeDesc":48,"sizeBytes":103,"sourceHtmlUrl":104},"examples\u002Fferry\u002Ffonts\u002Fplex-500.woff2",12308,"https:\u002F\u002Fgithub.com\u002Fstevengonsalvez\u002Fainb-toolkit\u002Fblob\u002Fmain\u002Fplugins\u002Fdemo\u002Fskills\u002Fcompose\u002Fexamples\u002Fferry\u002Ffonts\u002Fplex-500.woff2",{"path":106,"resourceType":81,"resourceTypeDesc":82,"sizeBytes":107,"sourceHtmlUrl":108},"examples\u002Fferry\u002Fserve.mjs",994,"https:\u002F\u002Fgithub.com\u002Fstevengonsalvez\u002Fainb-toolkit\u002Fblob\u002Fmain\u002Fplugins\u002Fdemo\u002Fskills\u002Fcompose\u002Fexamples\u002Fferry\u002Fserve.mjs",{"path":110,"resourceType":47,"resourceTypeDesc":48,"sizeBytes":111,"sourceHtmlUrl":112},"examples\u002Fferry\u002Fslides\u002Fphone.png",60452,"https:\u002F\u002Fgithub.com\u002Fstevengonsalvez\u002Fainb-toolkit\u002Fblob\u002Fmain\u002Fplugins\u002Fdemo\u002Fskills\u002Fcompose\u002Fexamples\u002Fferry\u002Fslides\u002Fphone.png",{"path":114,"resourceType":47,"resourceTypeDesc":48,"sizeBytes":115,"sourceHtmlUrl":116},"examples\u002Fferry\u002Fslides\u002Ftablet.png",25992,"https:\u002F\u002Fgithub.com\u002Fstevengonsalvez\u002Fainb-toolkit\u002Fblob\u002Fmain\u002Fplugins\u002Fdemo\u002Fskills\u002Fcompose\u002Fexamples\u002Fferry\u002Fslides\u002Ftablet.png",{"path":118,"resourceType":47,"resourceTypeDesc":48,"sizeBytes":119,"sourceHtmlUrl":120},"examples\u002Fferry\u002Fslides\u002Fweb.png",68324,"https:\u002F\u002Fgithub.com\u002Fstevengonsalvez\u002Fainb-toolkit\u002Fblob\u002Fmain\u002Fplugins\u002Fdemo\u002Fskills\u002Fcompose\u002Fexamples\u002Fferry\u002Fslides\u002Fweb.png",{"path":122,"resourceType":81,"resourceTypeDesc":82,"sizeBytes":123,"sourceHtmlUrl":124},"scripts\u002Faudio-check.mjs",14829,"https:\u002F\u002Fgithub.com\u002Fstevengonsalvez\u002Fainb-toolkit\u002Fblob\u002Fmain\u002Fplugins\u002Fdemo\u002Fskills\u002Fcompose\u002Fscripts\u002Faudio-check.mjs",{"path":126,"resourceType":81,"resourceTypeDesc":82,"sizeBytes":127,"sourceHtmlUrl":128},"scripts\u002Faudio.mjs",41856,"https:\u002F\u002Fgithub.com\u002Fstevengonsalvez\u002Fainb-toolkit\u002Fblob\u002Fmain\u002Fplugins\u002Fdemo\u002Fskills\u002Fcompose\u002Fscripts\u002Faudio.mjs",{"path":130,"resourceType":81,"resourceTypeDesc":82,"sizeBytes":131,"sourceHtmlUrl":132},"scripts\u002Fcaptions.mjs",8584,"https:\u002F\u002Fgithub.com\u002Fstevengonsalvez\u002Fainb-toolkit\u002Fblob\u002Fmain\u002Fplugins\u002Fdemo\u002Fskills\u002Fcompose\u002Fscripts\u002Fcaptions.mjs",{"path":134,"resourceType":81,"resourceTypeDesc":82,"sizeBytes":135,"sourceHtmlUrl":136},"scripts\u002Fcheck-local-gsap.mjs",924,"https:\u002F\u002Fgithub.com\u002Fstevengonsalvez\u002Fainb-toolkit\u002Fblob\u002Fmain\u002Fplugins\u002Fdemo\u002Fskills\u002Fcompose\u002Fscripts\u002Fcheck-local-gsap.mjs",{"path":138,"resourceType":81,"resourceTypeDesc":82,"sizeBytes":139,"sourceHtmlUrl":140},"scripts\u002Fcheck.mjs",17730,"https:\u002F\u002Fgithub.com\u002Fstevengonsalvez\u002Fainb-toolkit\u002Fblob\u002Fmain\u002Fplugins\u002Fdemo\u002Fskills\u002Fcompose\u002Fscripts\u002Fcheck.mjs",{"path":142,"resourceType":81,"resourceTypeDesc":82,"sizeBytes":143,"sourceHtmlUrl":144},"scripts\u002Fcompose.mjs",91105,"https:\u002F\u002Fgithub.com\u002Fstevengonsalvez\u002Fainb-toolkit\u002Fblob\u002Fmain\u002Fplugins\u002Fdemo\u002Fskills\u002Fcompose\u002Fscripts\u002Fcompose.mjs",{"path":146,"resourceType":81,"resourceTypeDesc":82,"sizeBytes":147,"sourceHtmlUrl":148},"scripts\u002Fconcat.sh",4206,"https:\u002F\u002Fgithub.com\u002Fstevengonsalvez\u002Fainb-toolkit\u002Fblob\u002Fmain\u002Fplugins\u002Fdemo\u002Fskills\u002Fcompose\u002Fscripts\u002Fconcat.sh",{"path":150,"resourceType":81,"resourceTypeDesc":82,"sizeBytes":151,"sourceHtmlUrl":152},"scripts\u002Fconfig.mjs",21238,"https:\u002F\u002Fgithub.com\u002Fstevengonsalvez\u002Fainb-toolkit\u002Fblob\u002Fmain\u002Fplugins\u002Fdemo\u002Fskills\u002Fcompose\u002Fscripts\u002Fconfig.mjs",{"path":154,"resourceType":81,"resourceTypeDesc":82,"sizeBytes":155,"sourceHtmlUrl":156},"scripts\u002Fgsap.mjs",1992,"https:\u002F\u002Fgithub.com\u002Fstevengonsalvez\u002Fainb-toolkit\u002Fblob\u002Fmain\u002Fplugins\u002Fdemo\u002Fskills\u002Fcompose\u002Fscripts\u002Fgsap.mjs",{"path":158,"resourceType":81,"resourceTypeDesc":82,"sizeBytes":159,"sourceHtmlUrl":160},"scripts\u002Fhfrender.mjs",10675,"https:\u002F\u002Fgithub.com\u002Fstevengonsalvez\u002Fainb-toolkit\u002Fblob\u002Fmain\u002Fplugins\u002Fdemo\u002Fskills\u002Fcompose\u002Fscripts\u002Fhfrender.mjs",{"path":162,"resourceType":81,"resourceTypeDesc":82,"sizeBytes":163,"sourceHtmlUrl":164},"scripts\u002Frender.sh",2037,"https:\u002F\u002Fgithub.com\u002Fstevengonsalvez\u002Fainb-toolkit\u002Fblob\u002Fmain\u002Fplugins\u002Fdemo\u002Fskills\u002Fcompose\u002Fscripts\u002Frender.sh",[166,173,180,186,193,200],{"skillNo":167,"name":168,"nameZh":6,"description":169,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":170,"categories":171,"keywords":172,"publishedAt":19},"01M75WK9B8DKVJBJJ4CX2QMJMX","well-formed","Fixture skill that satisfies every mechanical rule, used to prove the conformance check passes a clean tree instead of failing everything.","https:\u002F\u002Fgithub.com\u002Fstevengonsalvez\u002Fainb-toolkit\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fagentskills\u002Fclean\u002Fwell-formed\u002FSKILL.md",[],[],{"skillNo":174,"name":175,"nameZh":6,"description":176,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":177,"categories":178,"keywords":179,"publishedAt":19},"01M75WK6ZGDXJJN8879K49QEYG","underscore-tools","Fixture skill that spells the tool allowlist key with an underscore instead of the hyphen the spec requires.","https:\u002F\u002Fgithub.com\u002Fstevengonsalvez\u002Fainb-toolkit\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fagentskills\u002Fbroken\u002Funderscore-tools\u002FSKILL.md",[],[],{"skillNo":181,"name":182,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":183,"categories":184,"keywords":185,"publishedAt":19},"01M75WK524MVT2H9E27ZCEA3HR","no-frontmatter","https:\u002F\u002Fgithub.com\u002Fstevengonsalvez\u002Fainb-toolkit\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fagentskills\u002Fbroken\u002Fno-frontmatter\u002FSKILL.md",[],[],{"skillNo":187,"name":188,"nameZh":6,"description":189,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":190,"categories":191,"keywords":192,"publishedAt":19},"01M75WJWZBMKR8R60PG3T3MCCC","long-description","Fixture skill with a deliberately oversized description used to prove the conformance check rejects anything past the 1024 character ceiling. Fixture skill with a deliberately oversized description used to prove the conformance check rejects anything past the 1024 character ceiling. Fixture skill with a deliberately oversized description used to prove the conformance check rejects anything past the 1024 character ceiling. Fixture skill with a deliberately oversized description used to prove the conformance check rejects anything past the 1024 character ceiling. Fixture skill with a deliberately oversized description used to prove the conformance check rejects anything past the 1024 character ceiling. Fixture skill with a deliberately oversized description used to prove the conformance check rejects anything past the 1024 character ceiling. Fixture skill with a deliberately oversized description used to prove the conformance check rejects anything past the 1024 character ceiling. Fixture skill with a deliberately oversized description used to prove the conformance check rejects anything past the 1024 character ceiling. Fixture skill with a deliberately oversized description used to prove the conformance check rejects anything past the 1024 character ceiling. Fixture skill with a deliberately oversized description used to prove the conformance check rejects anything past the 1024 character ceiling. Fixture skill with a deliberately oversized description used to prove the conformance check rejects anything past the 1024 character ceiling. Fixture skill with a deliberately oversized description used to prove the conformance check rejects anything past the 1024 character ceiling.","https:\u002F\u002Fgithub.com\u002Fstevengonsalvez\u002Fainb-toolkit\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fagentskills\u002Fbroken\u002Flong-description\u002FSKILL.md",[],[],{"skillNo":194,"name":195,"nameZh":6,"description":196,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":197,"categories":198,"keywords":199,"publishedAt":19},"01M75WJVRH3J22WKED7E5D01S8","some-other-name","Fixture skill whose frontmatter name does not match its parent directory name.","https:\u002F\u002Fgithub.com\u002Fstevengonsalvez\u002Fainb-toolkit\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fagentskills\u002Fbroken\u002Fdir-mismatch\u002FSKILL.md",[],[],{"skillNo":201,"name":202,"nameZh":6,"description":203,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":204,"categories":205,"keywords":206,"publishedAt":19},"01M75WJTC7H5FRP6S129VBSMZC","bad_Name","Fixture skill whose name uses an underscore and a capital letter, so it violates the agentskills.io name pattern.","https:\u002F\u002Fgithub.com\u002Fstevengonsalvez\u002Fainb-toolkit\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fagentskills\u002Fbroken\u002Fbad_Name\u002FSKILL.md",[],[]]