@slatesvideo/shared 0.7.7 → 0.7.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (122) hide show
  1. package/README.md +3 -6
  2. package/dist/analytics/events.d.ts +1 -1
  3. package/dist/analytics/events.js +7 -0
  4. package/dist/auth.d.ts +2 -0
  5. package/dist/auth.js +5 -0
  6. package/dist/clients/cloud.d.ts +2 -0
  7. package/dist/clients/cloud.js +5 -1
  8. package/dist/clients/desktop.js +6 -1
  9. package/dist/index.d.ts +7 -3
  10. package/dist/index.js +7 -3
  11. package/dist/manual/content.d.ts +1 -1
  12. package/dist/manual/content.js +1 -1
  13. package/dist/operations/index.d.ts +724 -173
  14. package/dist/operations/index.js +875 -65
  15. package/dist/operations/surface.d.ts +2 -2
  16. package/dist/operations/surface.js +26 -6
  17. package/dist/prompts/agent-doctrine.d.ts +12 -2
  18. package/dist/prompts/agent-doctrine.js +56 -28
  19. package/dist/prompts/banned-tokens.js +23 -13
  20. package/dist/prompts/brain.d.ts +29 -0
  21. package/dist/prompts/brain.js +72 -0
  22. package/dist/prompts/craft-cards.d.ts +15 -4
  23. package/dist/prompts/craft-cards.js +71 -9
  24. package/dist/prompts/generation-policy.d.ts +1 -1
  25. package/dist/prompts/guide-discovery.d.ts +6 -6
  26. package/dist/prompts/guide-retrieval.d.ts +7 -1
  27. package/dist/prompts/guide-retrieval.js +33 -5
  28. package/dist/prompts/partials.generated.js +1 -13
  29. package/dist/prompts/shot-grammar.d.ts +1 -1
  30. package/dist/prompts/shot-grammar.js +1 -1
  31. package/dist/skills/brain-check.d.ts +44 -0
  32. package/dist/skills/brain-check.js +174 -0
  33. package/dist/skills/content.d.ts +3 -0
  34. package/dist/skills/content.js +81 -44
  35. package/dist/skills/hyperframes-content.js +4 -4
  36. package/dist/skills/my-brain.d.ts +52 -0
  37. package/dist/skills/my-brain.js +218 -0
  38. package/dist/skills/served.d.ts +56 -0
  39. package/dist/skills/served.js +232 -0
  40. package/package.json +2 -4
  41. package/skills/hyperframes/NOTICE +19 -3
  42. package/skills/hyperframes/SLATES-MAPPING.md +1 -1
  43. package/skills/hyperframes/embedded-captions/CATALOG.md +3 -0
  44. package/skills/hyperframes/embedded-captions/SKILL.md +6 -6
  45. package/skills/hyperframes/embedded-captions/assets/fonts/char-widths.json +227 -1
  46. package/skills/hyperframes/embedded-captions/modes/standard/fonts/build-fonts-css.cjs +19 -2
  47. package/skills/hyperframes/embedded-captions/modes/standard/fonts/files/archivo-latin-wdth-italic.woff2 +0 -0
  48. package/skills/hyperframes/embedded-captions/modes/standard/fonts/files/archivo-latin-wdth-normal.woff2 +0 -0
  49. package/skills/hyperframes/embedded-captions/scripts/make-theme.cjs +438 -3
  50. package/skills/hyperframes/embedded-captions/scripts/make-theme.test.mjs +1 -0
  51. package/skills/hyperframes/embedded-captions/themes/README.md +26 -1
  52. package/skills/hyperframes/embedded-captions/themes/lesson.json +31 -0
  53. package/skills/slates-start-here.md +78 -0
  54. package/exports/slates-chatgpt-images/generated/SKILL.md +0 -113
  55. package/exports/slates-chatgpt-images/generated/slates-chatgpt-images.skill +0 -0
  56. package/exports/slates-prompt-builder/generated/SKILL.md +0 -71
  57. package/exports/slates-prompt-builder/generated/reference-character.md +0 -92
  58. package/exports/slates-prompt-builder/generated/reference-content-policy.md +0 -81
  59. package/exports/slates-prompt-builder/generated/reference-gpt-image-2-5.md +0 -191
  60. package/exports/slates-prompt-builder/generated/reference-kling.md +0 -295
  61. package/exports/slates-prompt-builder/generated/reference-nano-banana.md +0 -240
  62. package/exports/slates-prompt-builder/generated/reference-omni-flash.md +0 -97
  63. package/exports/slates-prompt-builder/generated/reference-seedance-2-5.md +0 -392
  64. package/exports/slates-prompt-builder/generated/reference-seedance.md +0 -441
  65. package/exports/slates-prompt-builder/generated/slates-prompt-builder-manifest.json +0 -133
  66. package/exports/slates-prompt-builder/generated/slates-prompt-builder.skill +0 -0
  67. package/skills/_partials/blender-action-curves.md +0 -24
  68. package/skills/_partials/cinematic-card.md +0 -8
  69. package/skills/_partials/decision-log.md +0 -1
  70. package/skills/_partials/image-defaults.md +0 -9
  71. package/skills/_partials/iteration-diagnosis.md +0 -5
  72. package/skills/_partials/living-performance.md +0 -22
  73. package/skills/_partials/model-routing.md +0 -35
  74. package/skills/_partials/references-read-literally.md +0 -11
  75. package/skills/_partials/seedance-25-timestamps.md +0 -34
  76. package/skills/_partials/sheet-tool-defaults.md +0 -6
  77. package/skills/_partials/still-gate.md +0 -3
  78. package/skills/_partials/thresholds.md +0 -19
  79. package/skills/slates-blocking-to-prompt.md +0 -279
  80. package/skills/slates-camera-language.md +0 -234
  81. package/skills/slates-captions.md +0 -81
  82. package/skills/slates-character-identity.md +0 -117
  83. package/skills/slates-chatgpt-images.md +0 -113
  84. package/skills/slates-cinematic-look.md +0 -237
  85. package/skills/slates-content-policy.md +0 -88
  86. package/skills/slates-cost-discipline.md +0 -150
  87. package/skills/slates-cuts.md +0 -46
  88. package/skills/slates-dialogue-blocking.md +0 -134
  89. package/skills/slates-direct-response-ad.md +0 -26
  90. package/skills/slates-edit-and-iterate.md +0 -76
  91. package/skills/slates-layer-brand-captions.md +0 -87
  92. package/skills/slates-layer-lower-third.md +0 -85
  93. package/skills/slates-layer-title.md +0 -82
  94. package/skills/slates-model-selection.md +0 -129
  95. package/skills/slates-motion.md +0 -57
  96. package/skills/slates-one-prompt-film.md +0 -38
  97. package/skills/slates-previs-blocking.md +0 -186
  98. package/skills/slates-project-organization.md +0 -42
  99. package/skills/slates-prompting-elevenlabs.md +0 -128
  100. package/skills/slates-prompting-flux-3.md +0 -157
  101. package/skills/slates-prompting-gpt-image-2-5.md +0 -196
  102. package/skills/slates-prompting-inworld-tts.md +0 -174
  103. package/skills/slates-prompting-kling-v3.md +0 -303
  104. package/skills/slates-prompting-lip-sync.md +0 -216
  105. package/skills/slates-prompting-ltx-2-5.md +0 -245
  106. package/skills/slates-prompting-minimax-h3.md +0 -383
  107. package/skills/slates-prompting-motion-transfer.md +0 -202
  108. package/skills/slates-prompting-nano-banana-2-1.md +0 -250
  109. package/skills/slates-prompting-omni-flash.md +0 -117
  110. package/skills/slates-prompting-seed-audio.md +0 -168
  111. package/skills/slates-prompting-seedance-2-5.md +0 -420
  112. package/skills/slates-prompting-seedance.md +0 -462
  113. package/skills/slates-prompting-seedream-5-lite.md +0 -122
  114. package/skills/slates-prompting-wan-3.md +0 -143
  115. package/skills/slates-restyle-from-blocking.md +0 -121
  116. package/skills/slates-script-craft.md +0 -45
  117. package/skills/slates-shot-variety.md +0 -24
  118. package/skills/slates-storyboard-from-script.md +0 -32
  119. package/skills/slates-style-prompting.md +0 -56
  120. package/skills/slates-transitions.md +0 -40
  121. package/skills/slates-ugc-influencer-ad.md +0 -32
  122. package/skills/slates-vision-feedback-loop.md +0 -118
@@ -2,7 +2,7 @@
2
2
  // Regenerated by scripts/embed-skills.mjs on every build. Loaded on first use by src/skills/hyperframes.ts.
3
3
  export const HYPERFRAMES_SKILL_NAMES = ["embedded-captions", "faceless-explainer", "figma", "general-video", "hyperframes", "hyperframes-animation", "hyperframes-audio", "hyperframes-cli", "hyperframes-core", "hyperframes-creative", "hyperframes-keyframes", "hyperframes-registry", "hyperframes-studio", "media-use", "motion-graphics", "music-to-video", "pr-to-video", "product-launch-video", "remotion-to-hyperframes", "slideshow", "talking-head-recut"];
4
4
  export const HYPERFRAMES_FILES = {
5
- "embedded-captions/CATALOG.md": "# THE CATALOG — one front-end, three engines behind\n\nThis is the skill's single selection surface. **The user picks an IDENTITY from\nthis table; everything else (engine, compiler, authoring file) is derived by\nlookup — never ask the user (or yourself) \"Standard or Cinematic or Theme?\"**\nThose are backend names; a product has one UX even when it has several engines.\n\nRouting procedure (replaces any mode decision):\n\n1. Probe the clip (decision gate + pre-flight probes as in SKILL.md).\n2. Shortlist 2–3 identities from this table by **content register + the user's\n own words + scene constraints**.\n3. Recommend ONE with a one-line why; the user picks.\n4. Author the identity's file (last column), then render with its engine's\n pipeline. Done — no category question ever surfaced.\n\n## Identities\n\n| Identity | Reading surface | Voice (one line) | Recommend for | Scene needs | Author → engine |\n| ------------- | -------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ------------------------------- |\n| `cream` | scene-embedded column flow | warm poetic light, emergence + glow | introspective, narrative, emotional monologues | dark/mid-tone warm scenes (luma < 150) | cinematic.json → make-cinematic |\n| `ink` | scene-embedded column flow | letterpress pressed into bright surfaces | the bright scenes everything else washes out on | BRIGHT scenes (luma > 150) | cinematic.json → make-cinematic |\n| `editorial` | scene-embedded column flow | lowercase italic serif, pen-stroke glides | fashion / beauty / lyrical / premium brand films | mid/dark scenes | cinematic.json → make-cinematic |\n| `keynote` | scene-embedded column flow | confident centered slides-in-the-scene | launches, founder updates, tech explainers (mood over verbatim reading) | any mid/dark | cinematic.json → make-cinematic |\n| `documentary` | scene-embedded column flow | burn-in stillness, bone on charcoal | interviews, journalism, testimony — gravitas IS the style | any | cinematic.json → make-cinematic |\n| `loud` | scene-embedded, body in front | percussion type that competes with the face | hype, social reels, sport, music, motivational | any (counter-accent handles warm) | cinematic.json → make-cinematic |\n| `neon` | scene-embedded column flow | captions as neon signage in the dark | neon-noir / nightlife / tech-noir / music | dark scenes | cinematic.json → make-cinematic |\n| `glitch` | scene-embedded column flow | corrupted-feed RGB-split type | hacker / AI / dystopia content | mid/dark | cinematic.json → make-cinematic |\n| `chrome` | scene-embedded column flow | liquid-metal hero with sheen sweeps | fashion-tech, Y2K, product-flex | mid/dark | cinematic.json → make-cinematic |\n| `velocity` | scene-embedded column flow | every word arrives along its motion vector | sport, automotive, fitness, kinetic content | any mid/dark | cinematic.json → make-cinematic |\n| `anchor` | verbatim lower-third rail + 1 settled climax | the quiet professional — fade-up rail that simply reads; the apex settles behind the subject with a drawn accent underline. Discipline IS the style. | explainers, tutorials, corporate, news-adjacent — **where every word must be read**; the conservative default | any (opaque rail; settle carries a soft veil) | theme.json → make-theme |\n| `ordnance` | stamped verbatim rail + detonation apex | military marking system; everything has mass; the room reacts | punchy announcements, drops, \"炸一点 / 像 AE 做的\" asks | any (charge-dim makes its own contrast) | theme.json → make-theme |\n| `terminal` | typed console panel + glyph-decode apex | the transcript is a signal log; apex decodes from noise | tech / data / AI / investigative, \"终端/控制台/解码\" asks | cool/dusk preferred | theme.json → make-theme |\n| `neonsign` | warm tube rail + hand-written neon apex | a sign district at dusk; the apex is WRITTEN stroke by stroke | lifestyle / music / mood, \"霓虹/手写\" asks | dusk/dark backdrop; needs `python3` (stroke-path gen) | theme.json → make-theme |\n| `stardust` | accumulating poem, condensing letters | words condense from dust and return to it | poetic / memory / science-wonder monologues | one clear column side (probe fails → fall back to `cream`) | theme.json → make-theme |\n| `stomp` | full-frame takeover cards | hard-cut typographic takeover with a void before the drop | hooks, manifestos, ad openers — the words ARE the show | any (plate runs dimmed) | theme.json → make-theme |\n| `lastpage` | manuscript rail + a blurred future-field | the future hangs unreadable in the room; one rack-focus reveals every faint line was the apex word | visionary thesis, prophecy-toned talks, trailers, literary content | mid/dark (the field needs air) | theme.json → make-theme |\n| `scoreboard` | split-flap chyron rail + departures-board apex | stadium split-flap mechanics — body words flip-cycle wrong words on tiles before clacking onto the real one; ROW counter + odometer chip furniture; the apex is a giant departures board behind the subject that locks the word letter-by-letter under floodlights and a crowd-flash, status ticker types on | sports, transit/travel, scores, countdowns, reveals, \"翻牌/记分牌/机场大屏\" asks | any (board + chyron bring their own dark metal contrast) | theme.json → make-theme |\n| `transit` | LED departure-strip rail + illumination-wipe apex | amber dot-matrix station PA — body words light column-by-column (L→R LED wipe + arrival flicker) on a docked departure strip whose lines page by scroll-snap; platform tag, ticking clock, ⚠ DELAYED → ● ON TIME gag; the apex panel expands behind the subject inside a chasing LED-marquee border, the word illuminates column-by-column under a PA flash + ding pulses, then pages up and collapses | travel/transit, announcements, schedules, countdowns, retro-terminal, \"LED屏/车站到站/点阵屏\" asks | any (LED strip + panel bring their own dark contrast) | theme.json → make-theme |\n| `vhs` | camcorder OSD rail + REC-FREEZE tracking-slam apex | tape playback — permanent lens vignette + OSD furniture (▶ PLAY, ● REC, blinking green timestamp); body words carry a permanent red/cyan misregistration fringe, arrive by tracking glitch and REWIND off with flat-white echoes + scrub lines (the deck flips PLAY→REW in dead air); the apex is REC FREEZE: 1-frame white tear + head-switching noise bar, the word slams in behind the subject as three sheared tracking bands that SNAP into register, misregistration breathes through the hold under tape weave + auto-iris, then rewinds off | retro / nostalgia / found-footage / home-video, '90s tech, music & lifestyle edits, \"录像带/VHS/复古/DV\" asks | any (backlight-comp scrim makes its own contrast on bright skies) | theme.json → make-theme |\n| `arcade` | arcade HUD rail + pixel-block boss-intro apex | 8-bit cabinet attract mode — the frame plays through CRT scanlines + a corner vignette; body words coin-pop onto a bordered HUD bar (blinking 1UP, CREDIT 01) with a 1-frame white blip each, emphasis words run a cyan→magenta palette swap, lines dissolve checkerboard; the apex is a BOSS INTRO behind the subject: the room dims, WARNING blinks twice, ~64 seeded pixel blocks fall quantized into a matrix grid over the word rect, the word flashes ON in Press Start 2P with chromatic ghost layers + a 3-frame palette strobe while letterbox bars slam in and a HI-SCORE odometer rolls top-right; everything dissolves checkerboard and the blocks drop away | gaming, retro-tech, playful hype, launches, achievement/level-up beats, \"像素/街机/8-bit/打游戏\" asks | any (boss dim + dark HUD bar bring their own contrast) | theme.json → make-theme |\n| `dossier` | manila case-file strip + rubber-stamp apex | cold-war case file — carbon Special Elite HAMMERS onto a manila transcript strip char by char (seeded baselines + ribbon ink, every strike kicks the paper; typed case header, CONFIDENTIAL watermark, red ink circles around the evidence; pages are X-row over-struck and carriage-fed away); the apex is a RUBBER STAMP behind the subject: the footage goes sepia-archival, the stamp crushes in at −8° with a double-strike ghost + thin-ink patches, then holds DEAD STILL — sold only by a breathing paper indent — until the page is filed away with a mechanical yank | investigations, exposés, true-crime, document-driven storytelling, declassified/archival framing, \"档案/卷宗/解密/盖章\" asks | any (the manila strip is self-lit; the stamp brings its own sepia charge) | theme.json → make-theme |\n| `laser` | beam-ignited rail + 6-beam laser-cage apex | concert laser rig in a blackout — every body word is IGNITED where a green and a magenta beam converge on it two frames early (flare pop, snap-on, single strobe on emphasis; a sweeper beam carries each line away); the apex is the drop: a 6-beam array sweeps to one hot point, the word ignites behind the subject in an additive glow stack with two controlled strobe pops, a criss-cross beam cage draws around it, the array fans out wide through the hold, then the beams sweep everything off L→R | music, nightlife, festivals, drops, hype reveals, keynote 'one more thing' beats, \"激光/灯光秀/蹦迪字幕\" asks | any (the concert blackout makes its own contrast, bright skies included) | theme.json → make-theme |\n| `thunder` | rain-washed rail + branched-bolt strike apex | the storm is the editor — slate storm mood on the room, ambient slanted rain falling in front of the subject, and the sky \"kisses\" (1-frame brighten) on every body word; rail words arrive with a lit-bright lightning pop (emphasis = sheet-lightning double flash mirrored by a double sky-kiss); the apex is THE STRIKE: a hand-authored branched bolt flashes two frames before the word, the word slams in lit HARD with its shadow flipped toward the bolt, ozone under-glow breathes through the hold while the rain doubles, then everything washes downward with the rain | dramatic reveals, storm/weather content, epic hype beats, trailer-toned monologues, \"雷电/闪电/暴风雨字幕\" asks | any (charge-dim + radial word scrim make their own contrast, bright skies included) | theme.json → make-theme |\n| `hologram` | volumetric projection plate + hologram-boot apex | every caption is LIGHT cast from an emitter — body words boot onto a scanlined projection plate with a rising sweep, a 1-frame interference glitch and a permanent cyan/magenta fringe (emphasis words drop out for 2 frames and restore brighter; lines drift in rotationY and exit by projector cut); the apex is the full volumetric boot: a desk emitter dot pops, the cone snaps wide, a seed beam fires, and the word materializes behind the subject as a 7-layer hologram with climbing interference bands — a hand passes through it before the projector cuts it back to the dot | tech / sci-fi / AI / space / imaging explainers, futuristic product reveals, \"全息/投影/科幻字幕\" asks | any (the apex scrim + dim make their own contrast; wants a lower frame edge for the emitter dots) | theme.json → make-theme |\n| `biolume` | jellyfish glow-on rail + bioluminescent-bloom apex | deep-sea bioluminescence — the clip sinks into an abyss grade with a breathing vignette and every caption is a living light: body words GLOW ON like jellyfish (radial bloom from center while a cyan glow breathes in; emphasis words pulse a slow propulsion double-beat) across two coexisting floating rows and SINK away dimming; seeded plankton motes drift the open water and the ones ringing the apex are pulled into the bloom; the apex is the BLOOM behind the subject: a creature pre-glow double-beats and crushes to a point, the word condenses in, six luminous tendrils draw outward like filaments while caustics shimmer, cyan light spills onto the scene and spores burst past — then all the light sinks back into the deep | ocean / nature / science-wonder docs, dreamy or meditative monologues, slow night-time reveals, \"深海/发光水母/水下字幕\" asks | any (the abyss grade + pocket scrim make their own contrast on bright scenes) | theme.json → make-theme |\n| `aurora` | iridescent sheen rail + silk-ribbon draw-on apex | polar-night elegance — two huge aurora blobs drift the sky all clip; body words are silk serif ink whose rose→teal→violet sheen drifts continuously through the letters (entrance = 2-frame flow-on + y8 settle; emphasis = one bright highlight sweep marching through the word), lines share two coexisting rows like a woven couplet and dissolve UPWARD into drifting light streaks; the apex is a SILK RIBBON: the hero word is hand-WRITTEN into the sky behind the subject stroke by stroke (script single-line font, blurred halo + bright core, a light mote riding the pen) and the aurora gradient keeps FLOWING through the drawn ribbon during the hold while a soft spill tints the sky and light motes rise past the subject — gentle, no shake | dreamy / romantic / wonder content, night-sky and travel pieces, poetry, weddings, elegant brand films, \"极光/丝带/优雅手写字幕\" asks | any (apex scrim + dark understroke carry contrast on bright skies; loves dusk/night) | theme.json → make-theme |\n| `spectrum` | oscilloscope scope-band rail + phosphor trace-write apex | an oscilloscope is listening — a dark scope band hosts an ALWAYS-ALIVE waveform (seeded pseudo-RMS envelope: speech grows it, silence flattens it, every word arrival kicks a local burst) under VT323 phosphor lines that wipe in L→R over reserved slots with a 2-frame just-traced flash (emphasis words get a ticking frequency-readout chip, the trig LED blinks on every word); the apex is the trace itself LEAPING off the scope (surge column) to hand-WRITE the hero word in a thin phosphor script stroke, fill flicker-on, hum + breathe, then COLLAPSE to a flatline before the next spoken word — and on the FINAL word the trace explodes to max-amp chaos, flatlines to a single dot and stamps SIGNAL LOST | science / signal / audio / measurement / astronomy explainers, data-nerd content, retro-lab or synth aesthetics, \"示波器/波形/信号字幕\" asks | any (the scope band brings its own dark glass; the apex scrim handles bright skies); needs `python3` (stroke-path gen) | theme.json → make-theme |\n| `papercut` | paper-chip craft rail + stop-motion papermat apex | stop-motion paper craft — the frame becomes an animator's table: body words are cream paper chips PLACED one by one (steps(2) drop, seeded crooked, ~5fps wobble) on a kraft strip with torn top edge, washi-taped corners and a handwritten cut&paste tag; emphasis words get a washi-tape slap, the final word is an accent-red sign-off chip, and a red paper star stands in for the hero word; the apex is a torn kraft mat slapped down behind the subject where torn-edge letter chips DROP with stepped gravity + anticipation shadows, land crooked, settle in 12fps poses, wobble at 8fps while a warm vignette charges — then the FINAL word bumps the table and everything scatters off down-right | craft/DIY, kids & family, indie product demos, behind-the-scenes, maker channels, \"手工/剪纸/定格动画字幕\" asks | any (kraft strip + cream chips bring their own warm contrast) | theme.json → make-theme |\n| `popup` | pop-up book page rail + centerfold starburst apex | a pop-up book opens inside the frame — body words POP UP on a baseline hinge (rotationX back.out, paper overshoot, a growing back-shadow) along a cream page strip that unfolds from the bottom edge (center foldline, two alternating reading rows); emphasis words land bigger with a contact squash the page FEELS (1px strip dip), then flick-wobble with a blue paper strut leaning in behind; line exits fold flat in an L→R wave (the page closing), the whole page TILTS on the final word and the strip folds shut on the last frame; the apex is THE CENTERFOLD: blue + cream 12-point paper starbursts unfold behind the subject, the hero word pops up in three hinged clip-path segments, kraft struts lean in, backdrop + word wobble-settle TOGETHER and breathe through the hold — then the whole spread folds flat before the next sentence; a blue paper star holds the hero slot on the rail and paper confetti flicks past the subject at the pop | kids and family content, storytelling, education, greeting-card / wholesome brand spots, picture-book and craft channels, \"立体书/弹出书/纸艺字幕\" asks | any (the cream page strip is self-lit; the apex dusk scrim guards bright skies) | theme.json → make-theme |\n| `chalkboard` | chalk-band rail + hand-written chalkwrite apex | night lecture — a worn deep-green chalk band where every word is SCRIBBLED in fast chalk (2-frame pop + steps(4) scribble reveal + dust puff at the base, seeded crooked); emphasis gets double underline dashes, the final word lands in yellow chalk, and between sentences an ERASER SWIPE smears the old words off (blurred light band, ghost smudges stay — chalk never fully erases); the apex: the band GROWS into a full blackboard behind the subject and the hero word is HAND-WRITTEN 130px tall stroke by stroke (jittered chalk nib, dust falling from the pen, blurred halo under a tight core), finished with a hand-slap dust CLAP in front of the subject + a 1-frame board shake and two violent accelerating underlines, then the halo breathes through the hold | education / explainers, science and lecture content, teacher channels, documentary asides, \"黑板/粉笔/板书/老师讲课字幕\" asks | any (the deep-green board brings its own contrast); needs `python3` (stroke-path gen) | theme.json → make-theme |\n| `graffiti` | marker rail + spray-tagged handstyle apex | street bombing run — marker words FLICK onto the rail crooked (1-frame squeak skew, seeded rotation, back.out settle); emphasis takes alternating yellow/magenta paint + a spray-underline swoosh with overspray dots; spent lines are ROLLER-BUFFED away (gray roller sweep, wet smear lingers) and the final word lands BIG in yellow with the punch; the apex: the dusk wall dims, the can RATTLES, and the hero word is spray-TAGGED stroke by stroke behind the subject in fat yellow paint (dark under-stroke armor + blurred overspray halo + glowing nib + seeded overspray dots), paint DRIPS grow from the low points through the hold, a magenta paint splat pops at the pen-finish and the plate punches on it | street culture, hip-hop / rap, sneaker & fashion drops, urban sports, skate/BMX, rebellious brand spots, \"涂鸦/喷漆/街头字幕\" asks | any (the dark under-stroke armors the tag against bright skies); needs `python3` (stroke-path gen) | theme.json → make-theme |\n| `brush` | washi paper-band rail + sumi-e brush-gesture apex | sumi-e study — a deckle-edged washi paper band swipes in behind a traveling brush-head shadow; body words are brush-WIPED on in a Mincho serif (clip reveal behind a per-word brush head, seeded ±1° tilt), emphasis gets a double curved ink underline, and spent lines are wiped OFF right-to-left like a wet cloth (erase brush head riding the wipe); the apex: a warm paper wash charges behind the subject and the hero word is written in ONE violent calligraphic gesture — pressure-tapered wet brush (four stacked stroke widths, blurred bleed underneath), start-SPLAT at the first pen contact with ink flecks kicking past the subject, spatter droplets ejected at the sharpest curves — then the ink BLEEDS into the paper through the hold (the work breathes) and a vermilion SEAL chop (観) stamps beside the ink with the plate punch | calm-authority explainers, craft / design / philosophy / Japan-adjacent content, tea / meditation / writing channels, elegant brand films, \"水墨/毛笔/书法字幕\" asks | mid/bright scene band (dark ink + its paper wash carry the contrast); needs `python3` (stroke-path gen) | theme.json → make-theme |\n| `inkwater` | three-row ink rail + ink-drop bloom apex | sumi ink dropped in still water — paper-white radial washes back the text zones, Mincho-serif ink words BLEED into three fixed reading rows (blur+scale bleed over a paper-glow halo, dark blurred halo overshoots then tightens, an ink-settling hairline under each line, emphasis sheds a curling ink wisp) and spent lines re-dissolve upward like dispersing ink; the apex: a dark drop falls behind the subject, hits an invisible water surface at the word point and BLOOMS (three stacked blurred ink ellipses at counter-rotating rates + two thin ripple rings) while the world stills under a gentle vignette — the hero words resolve out of the blob on their own spoken times, breathe at the glyph edges through the hold, then re-dissolve before the next thought needs the reader | contemplative / literary / scientific-wonder narration, astronomy / nature / memory / essay films, poetry and slow-craft channels — one liquid meditative event instead of an impact, \"水墨滴落/墨水字幕\" asks | mid/bright scene band (dark ink + its paper washes carry the contrast) | theme.json → make-theme |\n| `ransom` | cutout-chip collage rail + ransom-note slam apex | kidnapper's collage — every word is a chip clipped from a different page (cream Anton / black Inter / newsprint typewriter / accent-yellow marker, torn edges, hard offset shadows) PASTED crooked on the rail with misaligned baselines (the apex slam at low amplitude); emphasis words get a 1-frame RE-PASTE lift (shadow grows, rotation flips sign for good) and spent chips are RIPPED off one by one under 1-frame paper-tear flashes; the apex: a collage scrim darkens the sky and the hero word slams in letter by letter as a ransom note BEHIND the subject — each letter a different cutout chip, flight shadow popping tight on contact — the whole word JOLTS as the last letter lands (the plate punches with it), looms crooked through the hold, then is torn off chip by chip while the closing line speaks | true crime, mystery / thriller, heist energy, punk / DIY zine aesthetics, edgy drops, unhinged-comedy hooks, \"勒索信/剪贴/拼贴字幕\" asks | any (solid chip backgrounds carry their own contrast; the apex scrim guards bright skies) | theme.json → make-theme |\n\n## Shortlisting heuristics (identity-level, not category-level)\n\n- **\"每个词都要被读到 / accessibility / 教程·新闻\"** → rail or panel surfaces:\n `anchor`, `ordnance`, `terminal` (all verbatim by construction).\n- **\"嵌进场景 / 电影感 / 高级\"** → the column-flow ten; pick by register + scene luma\n (bright → `ink`; warm dark → `cream`; fashion → `editorial`; …). Bright + must-read → `anchor`.\n- **\"炸 / 特效 / 酷炫 / 像 AE\"** → `ordnance`, `stomp`, `terminal`, `loud` — pick by\n what should explode: a word (`ordnance`), the frame (`stomp`), a decode (`terminal`),\n every beat (`loud`).\n- **Named worlds** → direct hits: 控制台/终端 → `terminal`; 霓虹/招牌 → `neonsign`;\n 诗/星尘/记忆 → `stardust`; 军事/重击 → `ordnance`; 预言/未来/悬念揭示 → `lastpage`;\n- **Scene constraints veto last**: luma > 180 kills cream/screen column looks\n (→ `ink` or a rail/panel surface); dusk/dark unlocks `neon`/`neonsign`.\n- **Unsure** → `anchor` (the conservative default: words read, scene safe, zero spectacle).\n EXCEPTION: if the ask literally says \"嵌进场景 / embed into the scene / 电影感\", that signal\n OUTRANKS the conservative default — go column-flow (pick by register + luma), not a rail.\n\nAdjacencies worth knowing (these pairs are why the old mode question was hard —\nrecommend by the difference, don't agonize over category): `loud` vs `ordnance`\n(percussive type vs a themed world with plate reaction) · `neon` vs `neonsign`\n(neon-styled captions vs a sign being written) · `cream` vs `stardust` (warm\nembedded flow vs an accumulating poem with semantic dispersal) · `terminal` vs\n`glitch` (a console WORLD with typed log + decode vs corrupted-feed styling on\nnormal captions) · `stomp` vs `loud` (every beat takes over the dead-center\nframe vs energetic type that still shares the frame with the subject).\n\n## Rules\n\n- Identities are **engine-locked** — no cross combos. Opening a new combo (e.g.\n another DNA under rail) is a validation event: render → user review → flip the\n DNA's `deliveries.rail` flag (see dna/README.md).\n- New identities join via their family's registry rules (dna/README.md for\n classic, themes/README.md for themed — \"any input, zero hand-fixing\" bar).\n- The engines' internals (Standard/Cinematic/Theme compilers, gates, layers)\n are documented in their own files; this catalog is the only routing surface.\n",
5
+ "embedded-captions/CATALOG.md": "# THE CATALOG — one front-end, three engines behind\n\nThis is the skill's single selection surface. **The user picks an IDENTITY from\nthis table; everything else (engine, compiler, authoring file) is derived by\nlookup — never ask the user (or yourself) \"Standard or Cinematic or Theme?\"**\nThose are backend names; a product has one UX even when it has several engines.\n\nRouting procedure (replaces any mode decision):\n\n1. Probe the clip (decision gate + pre-flight probes as in SKILL.md).\n2. Shortlist 2–3 identities from this table by **content register + the user's\n own words + scene constraints**.\n3. Recommend ONE with a one-line why; the user picks.\n4. Author the identity's file (last column), then render with its engine's\n pipeline. Done — no category question ever surfaced.\n\n## Identities\n\n| Identity | Reading surface | Voice (one line) | Recommend for | Scene needs | Author → engine |\n| ------------- | -------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ------------------------------- |\n| `cream` | scene-embedded column flow | warm poetic light, emergence + glow | introspective, narrative, emotional monologues | dark/mid-tone warm scenes (luma < 150) | cinematic.json → make-cinematic |\n| `ink` | scene-embedded column flow | letterpress pressed into bright surfaces | the bright scenes everything else washes out on | BRIGHT scenes (luma > 150) | cinematic.json → make-cinematic |\n| `editorial` | scene-embedded column flow | lowercase italic serif, pen-stroke glides | fashion / beauty / lyrical / premium brand films | mid/dark scenes | cinematic.json → make-cinematic |\n| `keynote` | scene-embedded column flow | confident centered slides-in-the-scene | launches, founder updates, tech explainers (mood over verbatim reading) | any mid/dark | cinematic.json → make-cinematic |\n| `documentary` | scene-embedded column flow | burn-in stillness, bone on charcoal | interviews, journalism, testimony — gravitas IS the style | any | cinematic.json → make-cinematic |\n| `loud` | scene-embedded, body in front | percussion type that competes with the face | hype, social reels, sport, music, motivational | any (counter-accent handles warm) | cinematic.json → make-cinematic |\n| `neon` | scene-embedded column flow | captions as neon signage in the dark | neon-noir / nightlife / tech-noir / music | dark scenes | cinematic.json → make-cinematic |\n| `glitch` | scene-embedded column flow | corrupted-feed RGB-split type | hacker / AI / dystopia content | mid/dark | cinematic.json → make-cinematic |\n| `chrome` | scene-embedded column flow | liquid-metal hero with sheen sweeps | fashion-tech, Y2K, product-flex | mid/dark | cinematic.json → make-cinematic |\n| `velocity` | scene-embedded column flow | every word arrives along its motion vector | sport, automotive, fitness, kinetic content | any mid/dark | cinematic.json → make-cinematic |\n| `anchor` | verbatim lower-third rail + 1 settled climax | the quiet professional — fade-up rail that simply reads; the apex settles behind the subject with a drawn accent underline. Discipline IS the style. | explainers, tutorials, corporate, news-adjacent — **where every word must be read**; the conservative default | any (opaque rail; settle carries a soft veil) | theme.json → make-theme |\n| `ordnance` | stamped verbatim rail + detonation apex | military marking system; everything has mass; the room reacts | punchy announcements, drops, \"炸一点 / 像 AE 做的\" asks | any (charge-dim makes its own contrast) | theme.json → make-theme |\n| `terminal` | typed console panel + glyph-decode apex | the transcript is a signal log; apex decodes from noise | tech / data / AI / investigative, \"终端/控制台/解码\" asks | cool/dusk preferred | theme.json → make-theme |\n| `neonsign` | warm tube rail + hand-written neon apex | a sign district at dusk; the apex is WRITTEN stroke by stroke | lifestyle / music / mood, \"霓虹/手写\" asks | dusk/dark backdrop; needs `python3` (stroke-path gen) | theme.json → make-theme |\n| `stardust` | accumulating poem, condensing letters | words condense from dust and return to it | poetic / memory / science-wonder monologues | one clear column side (probe fails → fall back to `cream`) | theme.json → make-theme |\n| `stomp` | full-frame takeover cards | hard-cut typographic takeover with a void before the drop | hooks, manifestos, ad openers — the words ARE the show | any (plate runs dimmed) | theme.json → make-theme |\n| `lastpage` | manuscript rail + a blurred future-field | the future hangs unreadable in the room; one rack-focus reveals every faint line was the apex word | visionary thesis, prophecy-toned talks, trailers, literary content | mid/dark (the field needs air) | theme.json → make-theme |\n| `scoreboard` | split-flap chyron rail + departures-board apex | stadium split-flap mechanics — body words flip-cycle wrong words on tiles before clacking onto the real one; ROW counter + odometer chip furniture; the apex is a giant departures board behind the subject that locks the word letter-by-letter under floodlights and a crowd-flash, status ticker types on | sports, transit/travel, scores, countdowns, reveals, \"翻牌/记分牌/机场大屏\" asks | any (board + chyron bring their own dark metal contrast) | theme.json → make-theme |\n| `transit` | LED departure-strip rail + illumination-wipe apex | amber dot-matrix station PA — body words light column-by-column (L→R LED wipe + arrival flicker) on a docked departure strip whose lines page by scroll-snap; platform tag, ticking clock, ⚠ DELAYED → ● ON TIME gag; the apex panel expands behind the subject inside a chasing LED-marquee border, the word illuminates column-by-column under a PA flash + ding pulses, then pages up and collapses | travel/transit, announcements, schedules, countdowns, retro-terminal, \"LED屏/车站到站/点阵屏\" asks | any (LED strip + panel bring their own dark contrast) | theme.json → make-theme |\n| `vhs` | camcorder OSD rail + REC-FREEZE tracking-slam apex | tape playback — permanent lens vignette + OSD furniture (▶ PLAY, ● REC, blinking green timestamp); body words carry a permanent red/cyan misregistration fringe, arrive by tracking glitch and REWIND off with flat-white echoes + scrub lines (the deck flips PLAY→REW in dead air); the apex is REC FREEZE: 1-frame white tear + head-switching noise bar, the word slams in behind the subject as three sheared tracking bands that SNAP into register, misregistration breathes through the hold under tape weave + auto-iris, then rewinds off | retro / nostalgia / found-footage / home-video, '90s tech, music & lifestyle edits, \"录像带/VHS/复古/DV\" asks | any (backlight-comp scrim makes its own contrast on bright skies) | theme.json → make-theme |\n| `arcade` | arcade HUD rail + pixel-block boss-intro apex | 8-bit cabinet attract mode — the frame plays through CRT scanlines + a corner vignette; body words coin-pop onto a bordered HUD bar (blinking 1UP, CREDIT 01) with a 1-frame white blip each, emphasis words run a cyan→magenta palette swap, lines dissolve checkerboard; the apex is a BOSS INTRO behind the subject: the room dims, WARNING blinks twice, ~64 seeded pixel blocks fall quantized into a matrix grid over the word rect, the word flashes ON in Press Start 2P with chromatic ghost layers + a 3-frame palette strobe while letterbox bars slam in and a HI-SCORE odometer rolls top-right; everything dissolves checkerboard and the blocks drop away | gaming, retro-tech, playful hype, launches, achievement/level-up beats, \"像素/街机/8-bit/打游戏\" asks | any (boss dim + dark HUD bar bring their own contrast) | theme.json → make-theme |\n| `dossier` | manila case-file strip + rubber-stamp apex | cold-war case file — carbon Special Elite HAMMERS onto a manila transcript strip char by char (seeded baselines + ribbon ink, every strike kicks the paper; typed case header, CONFIDENTIAL watermark, red ink circles around the evidence; pages are X-row over-struck and carriage-fed away); the apex is a RUBBER STAMP behind the subject: the footage goes sepia-archival, the stamp crushes in at −8° with a double-strike ghost + thin-ink patches, then holds DEAD STILL — sold only by a breathing paper indent — until the page is filed away with a mechanical yank | investigations, exposés, true-crime, document-driven storytelling, declassified/archival framing, \"档案/卷宗/解密/盖章\" asks | any (the manila strip is self-lit; the stamp brings its own sepia charge) | theme.json → make-theme |\n| `laser` | beam-ignited rail + 6-beam laser-cage apex | concert laser rig in a blackout — every body word is IGNITED where a green and a magenta beam converge on it two frames early (flare pop, snap-on, single strobe on emphasis; a sweeper beam carries each line away); the apex is the drop: a 6-beam array sweeps to one hot point, the word ignites behind the subject in an additive glow stack with two controlled strobe pops, a criss-cross beam cage draws around it, the array fans out wide through the hold, then the beams sweep everything off L→R | music, nightlife, festivals, drops, hype reveals, keynote 'one more thing' beats, \"激光/灯光秀/蹦迪字幕\" asks | any (the concert blackout makes its own contrast, bright skies included) | theme.json → make-theme |\n| `thunder` | rain-washed rail + branched-bolt strike apex | the storm is the editor — slate storm mood on the room, ambient slanted rain falling in front of the subject, and the sky \"kisses\" (1-frame brighten) on every body word; rail words arrive with a lit-bright lightning pop (emphasis = sheet-lightning double flash mirrored by a double sky-kiss); the apex is THE STRIKE: a hand-authored branched bolt flashes two frames before the word, the word slams in lit HARD with its shadow flipped toward the bolt, ozone under-glow breathes through the hold while the rain doubles, then everything washes downward with the rain | dramatic reveals, storm/weather content, epic hype beats, trailer-toned monologues, \"雷电/闪电/暴风雨字幕\" asks | any (charge-dim + radial word scrim make their own contrast, bright skies included) | theme.json → make-theme |\n| `hologram` | volumetric projection plate + hologram-boot apex | every caption is LIGHT cast from an emitter — body words boot onto a scanlined projection plate with a rising sweep, a 1-frame interference glitch and a permanent cyan/magenta fringe (emphasis words drop out for 2 frames and restore brighter; lines drift in rotationY and exit by projector cut); the apex is the full volumetric boot: a desk emitter dot pops, the cone snaps wide, a seed beam fires, and the word materializes behind the subject as a 7-layer hologram with climbing interference bands — a hand passes through it before the projector cuts it back to the dot | tech / sci-fi / AI / space / imaging explainers, futuristic product reveals, \"全息/投影/科幻字幕\" asks | any (the apex scrim + dim make their own contrast; wants a lower frame edge for the emitter dots) | theme.json → make-theme |\n| `biolume` | jellyfish glow-on rail + bioluminescent-bloom apex | deep-sea bioluminescence — the clip sinks into an abyss grade with a breathing vignette and every caption is a living light: body words GLOW ON like jellyfish (radial bloom from center while a cyan glow breathes in; emphasis words pulse a slow propulsion double-beat) across two coexisting floating rows and SINK away dimming; seeded plankton motes drift the open water and the ones ringing the apex are pulled into the bloom; the apex is the BLOOM behind the subject: a creature pre-glow double-beats and crushes to a point, the word condenses in, six luminous tendrils draw outward like filaments while caustics shimmer, cyan light spills onto the scene and spores burst past — then all the light sinks back into the deep | ocean / nature / science-wonder docs, dreamy or meditative monologues, slow night-time reveals, \"深海/发光水母/水下字幕\" asks | any (the abyss grade + pocket scrim make their own contrast on bright scenes) | theme.json → make-theme |\n| `aurora` | iridescent sheen rail + silk-ribbon draw-on apex | polar-night elegance — two huge aurora blobs drift the sky all clip; body words are silk serif ink whose rose→teal→violet sheen drifts continuously through the letters (entrance = 2-frame flow-on + y8 settle; emphasis = one bright highlight sweep marching through the word), lines share two coexisting rows like a woven couplet and dissolve UPWARD into drifting light streaks; the apex is a SILK RIBBON: the hero word is hand-WRITTEN into the sky behind the subject stroke by stroke (script single-line font, blurred halo + bright core, a light mote riding the pen) and the aurora gradient keeps FLOWING through the drawn ribbon during the hold while a soft spill tints the sky and light motes rise past the subject — gentle, no shake | dreamy / romantic / wonder content, night-sky and travel pieces, poetry, weddings, elegant brand films, \"极光/丝带/优雅手写字幕\" asks | any (apex scrim + dark understroke carry contrast on bright skies; loves dusk/night) | theme.json → make-theme |\n| `spectrum` | oscilloscope scope-band rail + phosphor trace-write apex | an oscilloscope is listening — a dark scope band hosts an ALWAYS-ALIVE waveform (seeded pseudo-RMS envelope: speech grows it, silence flattens it, every word arrival kicks a local burst) under VT323 phosphor lines that wipe in L→R over reserved slots with a 2-frame just-traced flash (emphasis words get a ticking frequency-readout chip, the trig LED blinks on every word); the apex is the trace itself LEAPING off the scope (surge column) to hand-WRITE the hero word in a thin phosphor script stroke, fill flicker-on, hum + breathe, then COLLAPSE to a flatline before the next spoken word — and on the FINAL word the trace explodes to max-amp chaos, flatlines to a single dot and stamps SIGNAL LOST | science / signal / audio / measurement / astronomy explainers, data-nerd content, retro-lab or synth aesthetics, \"示波器/波形/信号字幕\" asks | any (the scope band brings its own dark glass; the apex scrim handles bright skies); needs `python3` (stroke-path gen) | theme.json → make-theme |\n| `papercut` | paper-chip craft rail + stop-motion papermat apex | stop-motion paper craft — the frame becomes an animator's table: body words are cream paper chips PLACED one by one (steps(2) drop, seeded crooked, ~5fps wobble) on a kraft strip with torn top edge, washi-taped corners and a handwritten cut&paste tag; emphasis words get a washi-tape slap, the final word is an accent-red sign-off chip, and a red paper star stands in for the hero word; the apex is a torn kraft mat slapped down behind the subject where torn-edge letter chips DROP with stepped gravity + anticipation shadows, land crooked, settle in 12fps poses, wobble at 8fps while a warm vignette charges — then the FINAL word bumps the table and everything scatters off down-right | craft/DIY, kids & family, indie product demos, behind-the-scenes, maker channels, \"手工/剪纸/定格动画字幕\" asks | any (kraft strip + cream chips bring their own warm contrast) | theme.json → make-theme |\n| `popup` | pop-up book page rail + centerfold starburst apex | a pop-up book opens inside the frame — body words POP UP on a baseline hinge (rotationX back.out, paper overshoot, a growing back-shadow) along a cream page strip that unfolds from the bottom edge (center foldline, two alternating reading rows); emphasis words land bigger with a contact squash the page FEELS (1px strip dip), then flick-wobble with a blue paper strut leaning in behind; line exits fold flat in an L→R wave (the page closing), the whole page TILTS on the final word and the strip folds shut on the last frame; the apex is THE CENTERFOLD: blue + cream 12-point paper starbursts unfold behind the subject, the hero word pops up in three hinged clip-path segments, kraft struts lean in, backdrop + word wobble-settle TOGETHER and breathe through the hold — then the whole spread folds flat before the next sentence; a blue paper star holds the hero slot on the rail and paper confetti flicks past the subject at the pop | kids and family content, storytelling, education, greeting-card / wholesome brand spots, picture-book and craft channels, \"立体书/弹出书/纸艺字幕\" asks | any (the cream page strip is self-lit; the apex dusk scrim guards bright skies) | theme.json → make-theme |\n| `chalkboard` | chalk-band rail + hand-written chalkwrite apex | night lecture — a worn deep-green chalk band where every word is SCRIBBLED in fast chalk (2-frame pop + steps(4) scribble reveal + dust puff at the base, seeded crooked); emphasis gets double underline dashes, the final word lands in yellow chalk, and between sentences an ERASER SWIPE smears the old words off (blurred light band, ghost smudges stay — chalk never fully erases); the apex: the band GROWS into a full blackboard behind the subject and the hero word is HAND-WRITTEN 130px tall stroke by stroke (jittered chalk nib, dust falling from the pen, blurred halo under a tight core), finished with a hand-slap dust CLAP in front of the subject + a 1-frame board shake and two violent accelerating underlines, then the halo breathes through the hold | education / explainers, science and lecture content, teacher channels, documentary asides, \"黑板/粉笔/板书/老师讲课字幕\" asks | any (the deep-green board brings its own contrast); needs `python3` (stroke-path gen) | theme.json → make-theme |\n| `graffiti` | marker rail + spray-tagged handstyle apex | street bombing run — marker words FLICK onto the rail crooked (1-frame squeak skew, seeded rotation, back.out settle); emphasis takes alternating yellow/magenta paint + a spray-underline swoosh with overspray dots; spent lines are ROLLER-BUFFED away (gray roller sweep, wet smear lingers) and the final word lands BIG in yellow with the punch; the apex: the dusk wall dims, the can RATTLES, and the hero word is spray-TAGGED stroke by stroke behind the subject in fat yellow paint (dark under-stroke armor + blurred overspray halo + glowing nib + seeded overspray dots), paint DRIPS grow from the low points through the hold, a magenta paint splat pops at the pen-finish and the plate punches on it | street culture, hip-hop / rap, sneaker & fashion drops, urban sports, skate/BMX, rebellious brand spots, \"涂鸦/喷漆/街头字幕\" asks | any (the dark under-stroke armors the tag against bright skies); needs `python3` (stroke-path gen) | theme.json → make-theme |\n| `brush` | washi paper-band rail + sumi-e brush-gesture apex | sumi-e study — a deckle-edged washi paper band swipes in behind a traveling brush-head shadow; body words are brush-WIPED on in a Mincho serif (clip reveal behind a per-word brush head, seeded ±1° tilt), emphasis gets a double curved ink underline, and spent lines are wiped OFF right-to-left like a wet cloth (erase brush head riding the wipe); the apex: a warm paper wash charges behind the subject and the hero word is written in ONE violent calligraphic gesture — pressure-tapered wet brush (four stacked stroke widths, blurred bleed underneath), start-SPLAT at the first pen contact with ink flecks kicking past the subject, spatter droplets ejected at the sharpest curves — then the ink BLEEDS into the paper through the hold (the work breathes) and a vermilion SEAL chop (観) stamps beside the ink with the plate punch | calm-authority explainers, craft / design / philosophy / Japan-adjacent content, tea / meditation / writing channels, elegant brand films, \"水墨/毛笔/书法字幕\" asks | mid/bright scene band (dark ink + its paper wash carry the contrast); needs `python3` (stroke-path gen) | theme.json → make-theme |\n| `inkwater` | three-row ink rail + ink-drop bloom apex | sumi ink dropped in still water — paper-white radial washes back the text zones, Mincho-serif ink words BLEED into three fixed reading rows (blur+scale bleed over a paper-glow halo, dark blurred halo overshoots then tightens, an ink-settling hairline under each line, emphasis sheds a curling ink wisp) and spent lines re-dissolve upward like dispersing ink; the apex: a dark drop falls behind the subject, hits an invisible water surface at the word point and BLOOMS (three stacked blurred ink ellipses at counter-rotating rates + two thin ripple rings) while the world stills under a gentle vignette — the hero words resolve out of the blob on their own spoken times, breathe at the glyph edges through the hold, then re-dissolve before the next thought needs the reader | contemplative / literary / scientific-wonder narration, astronomy / nature / memory / essay films, poetry and slow-craft channels — one liquid meditative event instead of an impact, \"水墨滴落/墨水字幕\" asks | mid/bright scene band (dark ink + its paper washes carry the contrast) | theme.json → make-theme |\n| `ransom` | cutout-chip collage rail + ransom-note slam apex | kidnapper's collage — every word is a chip clipped from a different page (cream Anton / black Inter / newsprint typewriter / accent-yellow marker, torn edges, hard offset shadows) PASTED crooked on the rail with misaligned baselines (the apex slam at low amplitude); emphasis words get a 1-frame RE-PASTE lift (shadow grows, rotation flips sign for good) and spent chips are RIPPED off one by one under 1-frame paper-tear flashes; the apex: a collage scrim darkens the sky and the hero word slams in letter by letter as a ransom note BEHIND the subject — each letter a different cutout chip, flight shadow popping tight on contact — the whole word JOLTS as the last letter lands (the plate punches with it), looms crooked through the hold, then is torn off chip by chip while the closing line speaks | true crime, mystery / thriller, heist energy, punk / DIY zine aesthetics, edgy drops, unhinged-comedy hooks, \"勒索信/剪贴/拼贴字幕\" asks | any (solid chip backgrounds carry their own contrast; the apex scrim guards bright skies) | theme.json → make-theme |\n| `lesson` | two-tier spoken stacks beside the face + chapter card + quoted-prompt lower thirds | the prompt lesson, cloned from a proven tip-listicle ad: a small setup line over a payoff 1.84× its size in Archivo Black Italic at its narrowest, white caps with tight tracking and a soft shadow, placed shot by shot beside the speaker; nothing animates, every caption cuts on with its first word and off at the next stack or the cut. A chapter card (giant numeral, title over subtitle, outline bookmark) answers the save ask; each technique gets a lower third on its result shot, an orange number over the name in Archivo Black at its widest, the prompt quoted under it | educational and tip-listicle ads cut from many shots (\"N things\", prompt lessons, how-tos) — **where the quotable line must hold on screen** | multi-shot is the point: cuts are detected and every exit snaps to one; stacks are placed per shot (authored `{x, y, s, p}`, else from the matte) | theme.json (`chapter`, `items`) → make-theme |\n\n## Shortlisting heuristics (identity-level, not category-level)\n\n- **\"每个词都要被读到 / accessibility / 教程·新闻\"** → rail or panel surfaces:\n `anchor`, `ordnance`, `terminal` (all verbatim by construction).\n- **\"嵌进场景 / 电影感 / 高级\"** → the column-flow ten; pick by register + scene luma\n (bright → `ink`; warm dark → `cream`; fashion → `editorial`; …). Bright + must-read → `anchor`.\n- **\"炸 / 特效 / 酷炫 / 像 AE\"** → `ordnance`, `stomp`, `terminal`, `loud` — pick by\n what should explode: a word (`ordnance`), the frame (`stomp`), a decode (`terminal`),\n every beat (`loud`).\n- **Named worlds** → direct hits: 控制台/终端 → `terminal`; 霓虹/招牌 → `neonsign`;\n 诗/星尘/记忆 → `stardust`; 军事/重击 → `ordnance`; 预言/未来/悬念揭示 → `lastpage`;\n- **A lesson, a tip list, \"N things\", a prompt the viewer should screenshot** → `lesson`\n (the only identity built for a multi-shot edit: interview set plus demo inserts).\n- **Scene constraints veto last**: luma > 180 kills cream/screen column looks\n (→ `ink` or a rail/panel surface); dusk/dark unlocks `neon`/`neonsign`.\n- **Unsure** → `anchor` (the conservative default: words read, scene safe, zero spectacle).\n EXCEPTION: if the ask literally says \"嵌进场景 / embed into the scene / 电影感\", that signal\n OUTRANKS the conservative default — go column-flow (pick by register + luma), not a rail.\n\nAdjacencies worth knowing (these pairs are why the old mode question was hard —\nrecommend by the difference, don't agonize over category): `loud` vs `ordnance`\n(percussive type vs a themed world with plate reaction) · `neon` vs `neonsign`\n(neon-styled captions vs a sign being written) · `cream` vs `stardust` (warm\nembedded flow vs an accumulating poem with semantic dispersal) · `terminal` vs\n`glitch` (a console WORLD with typed log + decode vs corrupted-feed styling on\nnormal captions) · `stomp` vs `loud` (every beat takes over the dead-center\nframe vs energetic type that still shares the frame with the subject).\n\n## Rules\n\n- Identities are **engine-locked** — no cross combos. Opening a new combo (e.g.\n another DNA under rail) is a validation event: render → user review → flip the\n DNA's `deliveries.rail` flag (see dna/README.md).\n- New identities join via their family's registry rules (dna/README.md for\n classic, themes/README.md for themed — \"any input, zero hand-fixing\" bar).\n- The engines' internals (Standard/Cinematic/Theme compilers, gates, layers)\n are documented in their own files; this catalog is the only routing surface.\n",
6
6
  "embedded-captions/dna/README.md": "# DNA registry — pick a visual language, not a preset\n\nA **DNA** is a complete, art-directed visual language: typeface, palette logic, motion\ngrammar, and hero orchestration. It **parameterizes per scene** instead of shipping a\nfixed look: the accent color is sampled from THIS scene, the contact shadow falls along\nTHIS scene's light, embed text blur matches THIS scene's depth-of-field, and the hero's\nentrance amplitude follows how hard the word was actually spoken (RMS).\n\nThis replaces the template grab-bag. Six deep languages × scene adaptation beats 54\nshallow presets — every render is already fitted to its footage.\n\n## Category lock (deliveries field, enforced by the compilers)\n\nEvery classic DNA's **home is Cinematic (column)** — that is where all ten were\nbuilt and validated. (Standard/rail mode was retired 2026-06-12; the verbatim-rail\nneed is served by the `anchor` theme. The old rail combos are archived outside\nthis repo and are not distributed with the skill.)\n\n## The ten\n\n| DNA | Register | Scene fit | Voice |\n| --------------- | -------------- | ----------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| **cream** | premium-warm | dark / mid warm scenes (band luma < 150) | Inter, warm cream, screen blend, glowing emergence hero. The poetic default. |\n| **ink** | premium | **bright scenes (band luma > 150)** | Inter, near-black, multiply blend — type reads as _printed on_ the wall. Fixes the bright-scene hole. |\n| **editorial** | editorial-luxe | introspective / fashion / poetic, mid-dark | Bodoni Moda, bone, _lowercase italic hero_ — magazine elegance over shout. |\n| **keynote** | tech-premium | product / launch / founder updates | Inter 800, opaque white, line-wipe reveals, hero wipes UP. Stillness = confidence. |\n| **documentary** | formal | interviews, serious subject matter | Inter, bone, **burn-in reveals**, no hero. Gravitas IS the style. |\n| **loud** | loud | hype / sport / music / social | Anton, scene-sampled accent hero, single-unit slam + caption-layer ripple; **body announces in front** (`bodyLayer: \"fg\"` — k-pop depth, deliberate). |\n| **neon** | loud-neon | neon-noir / nightlife / tech-noir (dark scenes) | Orbitron + electric cyan; words flicker-ignite like tubes; the hero **powers ON** with a strobe and hums (glow 0.5). |\n| **glitch** | loud-neon | digital / hacker / AI / dystopia | Space Grotesk; **RGB-split echo layers converge** as each beat lands; 0.10–0.12s machine percussion; landing bumps co-visible captions 2px. |\n| **chrome** | loud-luxe | Y2K / fashion-tech / music | Audiowide cast in a **liquid-metal gradient** (background-clip:text on the word spans); one sheen sweep crosses the hero during the hold. |\n| **velocity** | loud-sport | sport / automotive / fitness | Teko italic; every word arrives **along its motion vector** (streak + skew settling upright); the hero passes through with blurred speed-trail echoes and looms while held. |\n\n### fx fields (hero block) the engine understands\n\n`entrance: emergence | settle | slam | rise | wipe-up | flicker-on | streak` ·\n`glow` (0–0.5) · `echoes: [{dx,dy,color,opacity,blur}]` (converge-on-land duplicates) ·\n`sheen: true` (gradient sweep — pair with `wordCss` background-clip) · `wordCss`\n(per-word treatment; required for background-clip:text, which can't clip through\ncomposited children) · `ripple` (px — landing bump, captions only) · `loom` / `breathe`\n(hold-life) · `letterBlur` · `bodyLayer` (top-level: default layer for narration lines).\n\n## How to pick (agent)\n\n1. Read `safe-zones.json` → `heroAnchor.bandLuma` + `palette.temperature`.\n2. Bright band (>150) → **ink** (never fight a bright scene with cream/screen).\n3. Else pick by content register: poetic/warm → **cream** · introspective/luxe →\n **editorial** · product/tech → **keynote** · serious/interview → **documentary** ·\n hype/social → **loud**.\n4. State the pick + why in one line; the user decides (SKILL.md Step 0 still applies).\n\n## Authoring\n\n- Cinematic mode: `cinematic.json` → `\"dna\": \"<name>\"` (drop the `template` field).\n- Locked per DNA: family, palette scheme, blend, motion curves, hero orchestration.\n- Open per group (unchanged): size / weight / style / case / spacing + planes.\n- `var(--accent)` is available in per-group CSS — it resolves to the scene-sampled accent.\n\n## What the engine generates from the DNA (no authoring needed)\n\n- **Hero three-act**: co-visible captions dim 0.35s before the hero lands (setup) →\n entrance with per-letter stagger, amplitude ∝ spoken loudness (impact) → slow breathe\n - glow until exit (afterglow).\n- **Scene optics**: depth-match blur on embed captions, light-direction contact shadow.\n- All deterministic — measured from files, no randomness.\n\n## Climax selection — what earns the promotion\n\nPick the **payoff, not the topic**: the words you would quote when paraphrasing the\nbeat. \"The stars were only limited by the pixel size\" — the payoff is **pixel size**\n(the surprising claim), not \"stars\" (the subject). Test: would the word alone, big on\nscreen, make the listener nod? A topic word makes them wait.\n\n- **Phrases are legal** (`match: \"pixel size\"` / `\"skin food\"`): a peak is a semantic\n unit, not necessarily one token. 2–4 words max — beyond that it's a sentence, not a\n peak.\n- **Prefer clause-final** — nothing left dangling to place after the lift.\n- **Never strand a determiner**: lifting \"stars\" out of \"The stars…\" leaves an orphan\n \"The\" that vanishes mid-air. The compiler auto-absorbs a line-leading article into\n the promoted phrase; mid-line, match the phrase including its article.\n- Sizes are TARGETED by the compiler, not just floored — author sizes are hints:\n - **apex = frame event**: under 88% of usable width → raised toward a 93% fill.\n Std height cap = `sizeRange[1] × 1.25` (≤46cqh; formal register ×1.0) — a std apex\n bursts a rail, not a body composition. Cinematic cap = `sizeRange[1]`.\n - **short words fill with TRACKING**: when the height cap binds before the width\n target (SHINE — 5 glyphs), the compiler letterspaces up to +0.32em until the word\n owns ~88% of the width (film-title craft: HER / DUNE). Long words fill by scale,\n short words by air — impact is WIDTH-led either way.\n - **minor = damped beat in the apex family**: `max(3× rail, 0.55× apex-final)`,\n width-capped. A peak that reads as a label is a bug.\n - **lockup context is RATIO-LOCKED**: kicker/tail = `0.26× hero` (clamped\n 0.05–0.085·h), recomputed after any width-fit raise. Don't hand-tune context\n sizes — size the hero; the context follows like a poster system.\n\n## Climax placement — the lockup is the default, NOT the only composition\n\nA hero line takes `\"placement\": \"subject\" | \"column\"`:\n\n- **subject** (default) — the **ORBIT lockup** centered ON the subject. NOT a centered\n sandwich: context anchors to the hero's EDGES like a poster kicker/tagline —\n pre-context flush-left off the hero's top-left corner, post-context flush-right off\n its bottom-right — so the small lines land BESIDE the head/shoulder (on the scene),\n never on the face, and therefore EMBED (bg) like everything else. The eye reads a\n diagonal: kicker ↘ HERO ↘ tail. Only the hero crosses the silhouette (the\n matte-occlusion showcase). The context's job is reading continuity — it gets the\n margins; the hero's job is the cinematic event — it gets the subject. Right when the\n peak is THE dramatic moment: cream / loud / glitch / neon / velocity lean here.\n- **column** — the apex stays IN its column's reading flow and BURSTS it (oversized,\n full hero motion + dim/glow privileges, but composed within the sentence's home\n zone; spills toward the subject naturally when oversized). Right when the content\n is a continuous read and the column is the narrative's home: keynotes, tutorials,\n explainers, documentary. Registers: keynote / documentary / editorial lean here.\n\nApplying ONE composition to every peak is monoculture — the same failure the motion\nreview caught. Pick per beat: a 15s explainer might run column peaks throughout and\nsave the subject lockup for the single apex. (A third pattern — the editorial split,\nbg context upper + fg hero lower-third — lives in references/composition-craft.md and\nis the next placement candidate.)\n\n## The motion language (five layers, each DNA answers all five)\n\nA DNA's animation is not a parameter tweak on a shared fade — it's a distinct physics:\n\n| Layer | What it governs | Where it lives |\n| ---------------------- | ------------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------- |\n| **word entrance** | how each word materializes on its beat ({y,x,blur,scale,rot,dur,ease} or burn) | `motion.soft/present/impact` |\n| **line exit** | direction + speed of leaving, optional top-to-bottom cascade | `motion.exit` ({dur,y,x,scale,ease,stagger}) |\n| **hold-life** | what text does while on screen — stillness is a deliberate choice | `hero.breathe` / `hero.loom` (0 = print-still) |\n| **hero orchestration** | the three-act entrance signature (emergence / settle / slam / rise / **wipe-up**) + glow / letterBlur / **ripple** | `hero.*` |\n| **timing physics** | the duration & easing register everything obeys (percussive 0.15s ↔ atmospheric 0.6s) | implied by the values above — keep one family per DNA |\n\nShipped signatures: cream = _light condenses_ (blur-settle, drift-up exits) · ink =\n_letterpress_ (scale-press, no float, dead-still) · editorial = _the pen glides_\n(x-glide with the italic, cascade-out page turns) · keynote = _surgical reveal_\n(burn words + line wipe + hero wipe-up, exits never move) · documentary = _burn and\nhold_ (motion's absence IS the language) · loud = _percussion_ (back-eased punches,\nalternating tilt, hero ripple that bumps every caption — never the footage).\n\nRules inherited from hyperframes motion-principles: exits faster than entrances; vary\nease families BETWEEN DNAs (not within one); `.out` enters, `.in` leaves; never two\ntransform tweens on one element in the same window (wipe-up is clip-path so the\nafterglow scale channel stays free; loom subsumes breathe).\n\n## Adding a DNA\n\nCopy an existing `dna/<name>.json`, change the voice, keep the schema. The engine\n(`modes/cinematic/engine.html`) and both compilers consume it as-is. A DNA earns its\nplace by being a _distinct voice with a reason to exist_ — not a recolor.\n",
7
7
  "embedded-captions/modes/cinematic/_archive/champion/spec.md": "# Template: champion\n\n**Look:** podcast / interview, upper-side column with intro→phrase→emph\nbeats building toward a center-stage CROWN that crosses the subject's body.\n\"Wimbledon Champion\" energy.\n\n**Visual identity (LOCKED):**\n\n- 5 typography slots: intro / phrase / emph / dream / crown\n- `mix-blend-mode: screen` over warm bone color (#fff5df)\n- Deep text-shadow + brightness boost\n- Single-caption-swap layout (caps stack at one point in the column)\n- Center-stage crown crosses the subject for cinematic occlusion\n\n## When to apply\n\n✅ **Good fit:**\n\n- Podcast / interview style with a single seated subject\n- Cluttered backdrop (bookshelf, props, dark) — screen blend reads through\n- Subject roughly centered with clear clean zones on one or both sides\n- Speech has a clear payoff line that can become a \"crown\" (1-3 short words)\n- 16:9 landscape, 1920×1080 ideal\n\n❌ **Wrong fit:**\n\n- Bright/sky/window backdrop (screen blend washes out)\n- Subject heavily off-center such that there's no clean column zone\n- Speech has no clear climax line\n- Portrait 9:16 → use `portrait-header` template instead\n\n## Layout decisions agent makes\n\n| Field | What | Example (1920×1080) |\n| ----------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------- |\n| `plane.top/left/width/height` | Where the side column sits. Pick the side opposite the subject's gaze (looking room) and hug the cleanest backdrop zone. | `{top: 40, left: 40, width: 720, height: 420}` |\n| `plane.rotateY` | Slight perspective into the wall. Positive for left column (recedes right), negative for right column. Keep small (3-7°). | `4` |\n| `crown_top` | Y position of the crown. Should fall on the subject's chest/neck so the body occludes the middle letters. | `420` |\n| `font_scale` | Multiplier on locked sizes. | `1.0` for 1920×1080 |\n| `crown_enabled` | Whether to render a crown. Skip if the speech has no clean payoff line, or if the subject is too far off-center for a center crown to land. | `true` |\n\n### Crown placement rules\n\nBefore enabling the crown, verify all 3 conditions:\n\n1. Subject body center within ±10% of frame horizontal center\n2. Clean zones ≥15% of frame width on each side of subject\n3. Crown text width (uppercase 140px × ~chars) > subject body width + 400px\n\nIf any fails: disable the crown OR use a smaller font + place it in the\nlarger clean zone instead of center. See `references/layout-heuristics.md`.\n\n## Slot assignment\n\n| Slot | Use for |\n| ------ | ---------------------------------------------------------- |\n| intro | Filler / discourse markers (\"you know,\", \"for me,\", \"so…\") |\n| phrase | Main statement clauses |\n| emph | Key achievement / superlative line |\n| dream | Aspirational lines, past-tense reflection |\n| crown | The single climax line — center-stage payoff |\n\nAim for ≤3 slots per video (excluding crown). Don't use all 4 in a 12s clip.\n\n## Plan.json shape\n\n```json\n{\n \"mode\": \"template\",\n \"template\": \"champion\",\n \"duration\": 12.08, \"fps\": 24, \"width\": 1920, \"height\": 1080,\n \"plane\": {\n \"top\": 40, \"left\": 40, \"width\": 720, \"height\": 420,\n \"rotateY\": 4\n },\n \"crown_top\": 420,\n \"font_scale\": 1.0,\n \"groups\": [\n { \"id\": \"cg-0\", \"slot\": \"intro\", \"tone\": \"soft\",\n \"in\": 0.10, \"out\": 1.45, \"words\": [...] },\n { \"id\": \"cg-1\", \"slot\": \"phrase\", \"tone\": \"soft\",\n \"in\": 1.55, \"out\": 4.20, \"words\": [...] },\n { \"id\": \"cg-2\", \"slot\": \"emph\", \"tone\": \"present\",\n \"in\": 6.50, \"out\": 8.30, \"words\": [...] }\n ],\n \"crown_group\": {\n \"id\": \"cg-crown\", \"tone\": \"present\",\n \"in\": 10.85, \"out\": 12.08,\n \"words\": [\n {\"text\": \"Wimbledon\", \"start\": 10.94, \"end\": 11.28},\n {\"text\": \"Champion\", \"start\": 11.38, \"end\": 11.84}\n ]\n }\n}\n```\n\n`crown_group` always uses the crown slot — no need to specify `slot`.\nSet `crown_group: null` to disable.\n",
8
8
  "embedded-captions/modes/cinematic/_archive/memory-wall/spec.md": "# Template: memory-wall\n\n**Look:** introspective monologue, italic poem stacking on a back wall,\nright-aligned cascade for the climax. Sam Harris / Pico Iyer territory.\n\n**Visual identity (LOCKED — do not change):**\n\n- 4-slot typography arc: italic 600 → italic 500 hanging-indent → upright\n 700 pivot → uppercase 900 climax\n- `mix-blend-mode: screen` over warm-bone color (#fff4dc)\n- soft text-shadow + brightness boost\n- Per-word fade with subtle Y-drift (soft tone) or pop+scale (present tone)\n\n## When to apply\n\n✅ **Good fit:**\n\n- Talking-head with a flat back wall (acoustic foam, plain plaster, soft\n bookshelf) on one side\n- Single subject, fixed or near-fixed camera\n- Voice-over feel: introspective, narrative, \"I was thinking…\"\n- Mid-tone or dark backdrop (luminance < 180)\n\n❌ **Wrong fit:**\n\n- Bright window/sky backdrop → screen blend blows out\n- Cluttered backdrop with text/graphics → conflicts with caption text\n- Energetic / vlog / TikTok style → wrong vibe\n- Multiple speakers / hard cuts → caption arc breaks\n\n## What agent decides per scene\n\n| Field | What | Example |\n| ------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------ |\n| `plane.top/right/width/height` | Where the wall plane sits in frame. Plane should HUG the side of the wall, not float over the subject. | `{top: 90, right: 30, width: 720, height: 520}` for 1280×720 |\n| `plane.rotateY` | Match the wall's perspective angle. Negative for right-side wall (text recedes left), positive for left-side wall. | `-13` for a right-side wall at slight angle |\n| `plane.rotateX` | Tiny vertical tilt if wall is angled up/down. Usually 0-2 deg. | `1` |\n| `font_scale` | Multiplier on the locked cap-N base sizes. Tune for frame height. | `1.0` for 1280×720, `~1.5` for 1920×1080, `~0.7` for 720p portrait |\n| `groups[].slot` | Which of the 4 typography slots this group uses (1/2/3/4). Drives the arc. | See below |\n| `groups[].tone` | \"soft\" or \"present\" — drives motion curve | `\"soft\"` for opening lines, `\"present\"` for pivot+climax |\n\n## Slot assignment rules\n\nAim for ONE arc across the video: `1 → 2 → 3 → 4`. Don't repeat slots if you\ncan avoid it; don't skip slots without reason.\n\n| Slot | Use for |\n| ---- | ---------------------------------------------------------------------------------------------------------------------------------------- |\n| 1 | The opener. The \"I was thinking\" line. Italic, soft entry. |\n| 2 | The dreamy continuation / modifier. Smaller italic, hanging-indent — feels like the second half of a sentence with some staggered drift. |\n| 3 | The pivot. Upright (no italic), the syntactic turn. (\"but suddenly\", \"and then…\") |\n| 4 | The climax. Big uppercase 900. The payoff line. Aim for ≤4 short words so the right-aligned cascade naturally wraps to 2-3 lines. |\n\nIf the script is longer than 4 groups, repeat slot 1 or 2 for additional\nsoft lines, but reserve slot 4 for the SINGLE climax.\n\n## Plan.json shape\n\n```json\n{\n \"mode\": \"template\",\n \"template\": \"memory-wall\",\n \"duration\": 8.04,\n \"fps\": 24,\n \"width\": 1280,\n \"height\": 720,\n \"plane\": {\n \"top\": 90,\n \"right\": 30,\n \"width\": 720,\n \"height\": 520,\n \"rotateY\": -13,\n \"rotateX\": 1\n },\n \"font_scale\": 1.0,\n \"groups\": [\n {\n \"id\": \"cg-0\",\n \"slot\": 1,\n \"tone\": \"soft\",\n \"in\": 0.2,\n \"out\": 4.85,\n \"words\": [\n { \"text\": \"Some\", \"start\": 0.24, \"end\": 0.44 },\n { \"text\": \"memories\", \"start\": 0.48, \"end\": 0.82 },\n { \"text\": \"feel\", \"start\": 0.92, \"end\": 1.14 },\n { \"text\": \"soft\", \"start\": 1.2, \"end\": 1.64 }\n ]\n },\n {\n \"id\": \"cg-1\",\n \"slot\": 2,\n \"tone\": \"soft\",\n \"in\": 2.55,\n \"out\": 4.85,\n \"words\": [\n { \"text\": \"like\", \"start\": 2.66, \"end\": 2.78 },\n { \"text\": \"old\", \"start\": 2.86, \"end\": 3.02 },\n { \"text\": \"film\", \"start\": 3.16, \"end\": 3.46 }\n ]\n },\n {\n \"id\": \"cg-2\",\n \"slot\": 3,\n \"tone\": \"present\",\n \"in\": 4.9,\n \"out\": 8.04,\n \"words\": [\n { \"text\": \"but\", \"start\": 5.04, \"end\": 5.18 },\n { \"text\": \"suddenly\", \"start\": 5.24, \"end\": 5.76 }\n ]\n },\n {\n \"id\": \"cg-3\",\n \"slot\": 4,\n \"tone\": \"present\",\n \"in\": 6.7,\n \"out\": 8.04,\n \"words\": [\n { \"text\": \"everything\", \"start\": 6.82, \"end\": 7.14 },\n { \"text\": \"is\", \"start\": 7.18, \"end\": 7.28 },\n { \"text\": \"sharp\", \"start\": 7.32, \"end\": 7.52 },\n { \"text\": \"again\", \"start\": 7.58, \"end\": 7.92 }\n ]\n }\n ]\n}\n```\n\n## Don't fight the template\n\nIf the user wants different typography, different blend, or different motion:\n**use Standard mode** (`../../../standard/`). Don't try to override the locked CSS — the\ntemplate's visual consistency is the whole point.\n",
@@ -25,8 +25,8 @@ export const HYPERFRAMES_FILES = {
25
25
  "embedded-captions/references/scene-types.md": "# Scene Types — picking the right template\n\nThe three templates differ in one thing: **what surface (if any) the text physically sits on**. Pick by reading the scene, not by the genre label.\n\n## wall-embed — \"text is printed on a real surface\"\n\nOriginal Memory Wall render used this. Text uses perspective transform + `mix-blend-mode: overlay` to look like it was silk-screened onto a wall behind the subject. The illusion is strong when it works and completely broken when forced.\n\n### Four conditions — ALL must hold\n\n1. **A flat or near-flat surface exists somewhere in the frame, larger than the caption block.** Good: acoustic foam panel, painted wall, door, stone facade, large backdrop cloth, blackboard. Bad: bookshelf (3D depth + decorative items), mic shield (too small), window (transparent, content behind it shifts), brick wall with mortar patterns (competes).\n2. **The surface is at a non-zero angle to the camera.** Perspective is what sells \"embedded\". If the wall is perfectly parallel (0° rotation relative to camera), pasting rotateY:0 text onto it looks like a sticker, not embedded. Memory Wall's foam wall was tilted ~13° — perfect. A wall directly behind a centered frontal subject usually has no exploitable angle.\n3. **The surface is mid-luminance.** Overlay blend neutralizes mid-tones — text keeps contrast against a mid-grey wall. On near-black surfaces (luminance < 60), overlay makes text vanish → switch to `mix-blend-mode: screen`. On near-white surfaces (> 180), overlay also fails → switch to `mix-blend-mode: normal` with opaque color.\n4. **The surface has no competing graphical content.** Plain paint, uniform acoustic foam, blurred OOF background all work. Printed wallpaper, picture frames, text on signage, busy bookshelves all compete with the caption and ruin the embed illusion.\n\nIf **any** condition fails, **do not use wall-embed**. Pick another template.\n\n### What memory-wall looked like\n\nThe acoustic foam wall to the right of the subject took ~40% of frame width, tilted ~13° toward the viewer, mid-grey color, uniform dimpled texture. Perfect. Text with `rotateY(-13deg)` and overlay blend sat on it like printed letters.\n\n### Anti-examples (wall-embed would FAIL)\n\n- **champion / demo1_avatarv** — bookshelf background with books, white vases, picture frames. Cluttered + 3D depth. Fails condition 1 and 4. Used corner-column-crown instead.\n- **Jobs 60 Minutes** — blurry potted plant background. No flat surface at all. Fails condition 1.\n- **Randy Pausch \"Time is all we have\"** — completely black backdrop. No perspective to exploit, no mid-tone surface. Fails 2 and 3. Used portrait-header.\n- **Any vlog / selfie with handheld camera** — surface moves frame-to-frame, can't lock perspective. Even if conditions 1-4 hold briefly, motion breaks the illusion.\n\n## corner-column-crown — \"text sits in a clean region next to the subject\"\n\nThe default for most talking-head content. Works when wall-embed doesn't.\n\n### Conditions\n\n1. **Single subject, fixed camera.** Handheld is tolerable if drift is small.\n2. **At least one clean zone (≥ 15% of frame width) to the left or right of the subject** where captions can sit without continuous body occlusion.\n3. **Background can be cluttered or 3D** — we're not relying on a flat surface, just readable contrast. Screen blend mode picks up darker backgrounds (bookshelves, dark walls) naturally.\n4. **Landscape aspect** (16:9 or similar). For portrait, use `portrait-header`.\n\n### When to add the crown vs when to skip it\n\n- Add crown if there's a natural \"title drop\" line — the one phrase that lands the story (e.g. \"WIMBLEDON CHAMPION\", \"BEATLES\", \"SHARP AGAIN\"). Check [layout-heuristics.md § Crown placement](layout-heuristics.md) for the three geometric conditions.\n- Skip crown for factual / neutral monologues where no phrase carries the climax. Short videos (<10s) often don't need it.\n\n## portrait-header — \"subject fills center, text lives in top banner\"\n\nFor 9:16 aspect where the subject inevitably fills the middle.\n\n### Conditions\n\n1. **Portrait aspect** (9:16, 1080×1920 etc.).\n2. **Subject occupies the vertical middle of frame**, leaving ~15-25% of the frame height clear at the top.\n3. **Optional crown at bottom** — only works if there's also clean space beneath the subject's waist, which is rare in close-crop portrait.\n\n### What to watch\n\n- Subject's head top often approaches y=40 — top banner captions at `top: 30px` will get partially occluded by hair. Accept the partial occlusion (it reads as embed) or bump the caption size down to clear the hair.\n- If the subject already has **baked-in captions** (like the burned-in subtitles test case with yellow subtitles burned in), the skill should refuse — two caption systems compete.\n\n## Quick decision flow\n\n```\nSTART\n │\n ├─ Aspect is 9:16 / portrait?\n │ ├─ YES → portrait-header\n │ └─ NO ──▼\n │\n ├─ Does the scene have a flat uniform surface that passes\n │ ALL 4 wall-embed conditions?\n │ ├─ YES → wall-embed\n │ └─ NO ──▼\n │\n ├─ Single subject + fixed camera + ≥15% clean zone on one side?\n │ ├─ YES → corner-column-crown\n │ └─ NO ──▼\n │\n └─ Refuse with reason:\n \"No flat surface for embed, no clean caption zone for column.\n Suggest a classic lower-third instead.\"\n```\n\n## Mode checklist (run this before committing to wall-embed)\n\nRead 3 frames (start, mid, end). For each, honestly answer:\n\n- [ ] Is there a single surface behind/beside the subject that occupies ≥ 30% of the frame?\n- [ ] Is that surface relatively flat (not curved, not 3D-stacked shelving)?\n- [ ] Does that surface angle at 5-20° to the camera (not perfectly parallel, not warped)?\n- [ ] Is the surface mid-luminance (not near-black like dark bookshelves, not near-white like a sunny window)?\n- [ ] Does the surface contain NO printed/decorative elements that compete with caption text?\n- [ ] Does the surface remain visible across all 3 frames (subject doesn't step in front of it)?\n\n**Need all six YES to use wall-embed.** Even one NO → step down to corner-column-crown or portrait-header.\n",
26
26
  "embedded-captions/references/typographic-moves.md": "# Typographic moves — a palette, not a cage\n\n`cinematic-cream` template locks DNA only (font-family, motion, color\npalette defaults). It does NOT enforce slot structure. The agent writes\neach caption group's typography from scratch via the plan.json `css`\nfield.\n\nThis doc is a **palette** of tried combinations — pick what fits the\nscene, invent new ones, skip these if the content demands. These are\nrecommendations, not rules.\n\n## Size vs text length — DO THIS BEFORE PICKING SIZE\n\nBigger is NOT better if the word doesn't fit the frame width. Every time\nyou pick a font-size, sanity-check against word length:\n\n**Rough rule for Inter 900 uppercase at -0.03em tracking:**\n`max_font_px ≈ frame_width / (longest_word_chars × 0.72)`\n\nThe 0.72 multiplier is intentionally conservative — it targets the text\nfilling ~90% of the frame width so there's a small side margin. If you\nwant edge-to-edge, drop to 0.65, but you lose a bit of safety margin.\n\n720px portrait:\n\n- 3-char word (15%): max ~330px (a single big number like \"15%\")\n- 5-char word (TAKE): max ~200px\n- 7-char word (AUGMENT / QUANTUM / MATTERS): max ~143px\n- 10-char word (CREATIVITY): max ~100px\n- 13-char word (UNPRECEDENTED): max ~77px\n\n1920px landscape:\n\n- 7-char word: max ~380px\n- 10-char word: max ~267px\n\nFor italic/upright 500-700 it's slightly narrower — increase max by ~10%.\n\n**If you want the word bigger than it fits:**\n\n- Split into multiple words per group (natural wrap), OR\n- Add explicit `<br>` between syllables, OR\n- Drop letter-spacing to -0.05em, OR\n- Accept that the matte will cut part of it (Vogue-cover embed effect —\n only works when the cut area is exactly where the subject is)\n\nNever let the text OVERFLOW the frame edge — that's not cinematic, that's\njust broken. Use the heuristic.\n\n## Sizing discipline (frame-height-relative)\n\nPortrait 9:16 (720×1290) and landscape 16:9 (1920×1080) have very\ndifferent comfort ranges. Use `calc(<pct> * var(--h))` for responsive:\n\n| Feel | % of frame height | Example calc |\n| ---------------------- | ----------------- | ----------------------- |\n| Whisper / label | 4-6% | `calc(0.05 * var(--h))` |\n| Soft opener | 6-9% | `calc(0.07 * var(--h))` |\n| Narrative body | 9-14% | `calc(0.11 * var(--h))` |\n| Emphasis | 14-22% | `calc(0.18 * var(--h))` |\n| Climax / monumental | 22-35% | `calc(0.28 * var(--h))` |\n| Title-bigger-than-face | 40%+ | `calc(0.48 * var(--h))` |\n\nUse absolute px only when a specific scale needs to look identical\nacross frame sizes (rare). Prefer `calc` + `var(--h)`.\n\n## Named moves — pick per group\n\n**Italic contemplative opener** (memory-wall cap-1 lineage):\n\n```css\nfont-weight: 600;\nfont-style: italic;\nletter-spacing: -0.01em;\nfont-size: calc(0.075 * var(--h));\n```\n\n**Italic continuation / dreamier continuation** (cap-2 lineage):\n\n```css\nfont-weight: 500;\nfont-style: italic;\nletter-spacing: -0.005em;\nfont-size: calc(0.065 * var(--h));\n```\n\n**Upright pivot / statement** (cap-3 lineage — \"but suddenly\"):\n\n```css\nfont-weight: 700;\nletter-spacing: -0.015em;\nfont-size: calc(0.07 * var(--h));\n```\n\n**Uppercase climax / monumental** (cap-4 lineage — \"EVERYTHING IS SHARP AGAIN\"):\n\n```css\nfont-weight: 900;\ntext-transform: uppercase;\nletter-spacing: -0.03em;\nline-height: 0.95;\nfont-size: calc(0.18 * var(--h));\n```\n\n**Chapter card / full-frame Adam Curtis manifesto**:\n\n```css\nfont-weight: 700;\ntext-transform: uppercase;\nletter-spacing: -0.015em;\nline-height: 0.9;\nfont-size: calc(0.14 * var(--h));\n```\n\n**News chyron / broadcast label** (small, locked):\n\n```css\nfont-weight: 500;\nletter-spacing: 0.02em;\nfont-size: calc(0.038 * var(--h));\n```\n\n**Tiny side note / caption-on-surface**:\n\n```css\nfont-weight: 400;\nfont-style: italic;\nfont-size: calc(0.045 * var(--h));\n```\n\n**Vogue-masthead monumental**:\n\n```css\nfont-weight: 900;\ntext-transform: uppercase;\nletter-spacing: -0.04em;\nline-height: 0.85;\nfont-size: calc(0.32 * var(--h));\n```\n\n## Narrative arcs (suggestions, not required)\n\n**Poem arc** — memory-wall canonical: italic opener → italic continuation\n→ upright pivot → uppercase climax. Four steps.\n\n**Question-answer arc**: italic question small → uppercase answer big.\nTwo steps.\n\n**List-of-three arc**: three equal-weight narration segments, one\nclimactic uppercase. Four steps.\n\n**Single-statement arc**: one monumental uppercase held long. One step.\n\n**Whisper-hook arc** (short-form): tiny italic hook → massive uppercase\nreveal. Two steps.\n\nThe **number** of groups comes from the **content**. A 25s Pausch talk\nhas ~8 beats. A 7s TikTok hook has 2-3 beats. Don't force 4 or 5 or 7 —\nread the transcript and mark breath-groups.\n\n## Position + layer vocabulary\n\n**Position** is where the caption lives in frame. Use:\n\n- `top / left / right / bottom` (percentages or px) for anchor\n- `transform: translateX/Y` for fine offsets\n- `text-align: center / left / right` for alignment\n\n**Layer** per group:\n\n- `bg` (default) — behind subject. Matte occludes. Cinematic embed. Works\n on clean zones (sky, walls) OR intentionally crosses subject for the\n Vogue-masthead effect.\n- `fg` — on top of subject. Announcement. Use for climax breakthroughs or\n when bg would be 100% occluded by body.\n\n**Tone** per group:\n\n- `soft` — gentle per-word opacity+y drift (0.45s power2.out). Use for\n introspective, dreamy, or narrative content.\n- `present` — snappy per-word opacity+y+scale pop (0.22s power3.out). Use\n for emphatic or declarative beats.\n\n## Anti-patterns the DNA protects against\n\nThe DNA defaults prevent most ugly outcomes. But avoid in per-group CSS:\n\n- Multiple different `font-family` within one video (DNA is one family)\n- Multiple saturated colors (one accent at most; DNA defaults cream or\n deep warm)\n- `letter-spacing` above ±0.05em unless there's a specific reason\n- `font-weight` 300 or below — too light for screen\n- `font-style: italic` on emphasis — italic is for lyricism, not stress\n\n## When cinematic-cream is wrong\n\nThis DNA assumes mid-to-dark backgrounds (luminance 60-180). For:\n\n- Bright white studios → cinematic-cream's cream + `screen` washes out, and the DNA is\n **locked** (you cannot recolour it) → use **Standard mode** (opaque rail) instead\n- Documentary formal → Standard mode (documentary-dignified direction; see references/direction-catalog.md §1)\n- Energetic vlog hooks → future `kinetic-vlog` DNA (not yet shipped)\n\n## Example: memory-wall original, expressed in freeform\n\nSame output as the canonical memory-wall.html, but using slot-free plan:\n\n```json\n{\n \"template\": \"cinematic-cream\",\n \"caption_layer\": \"bg\",\n \"groups\": [\n {\n \"id\": \"cg-0\",\n \"tone\": \"soft\",\n \"in\": 0.2,\n \"out\": 4.85,\n \"css\": \"top: 14%; right: 6%; left: auto; text-align: right; font-size: calc(0.09 * var(--h)); font-weight: 600; font-style: italic; letter-spacing: -0.01em;\",\n \"words\": [\n { \"text\": \"Some\", \"start\": 0.24, \"end\": 0.44 },\n { \"text\": \"memories\", \"start\": 0.48, \"end\": 0.82 },\n { \"text\": \"feel\", \"start\": 0.92, \"end\": 1.14 },\n { \"text\": \"soft\", \"start\": 1.2, \"end\": 1.64 }\n ]\n },\n {\n \"id\": \"cg-1\",\n \"tone\": \"soft\",\n \"in\": 2.55,\n \"out\": 4.85,\n \"css\": \"top: 26%; right: 10%; left: auto; text-align: right; font-size: calc(0.075 * var(--h)); font-weight: 500; font-style: italic;\",\n \"words\": [\n { \"text\": \"like\", \"start\": 2.66, \"end\": 2.78 },\n { \"text\": \"old\", \"start\": 2.88, \"end\": 3.02 },\n { \"text\": \"film\", \"start\": 3.16, \"end\": 3.46 }\n ]\n },\n {\n \"id\": \"cg-2\",\n \"tone\": \"present\",\n \"in\": 4.9,\n \"out\": 8.04,\n \"css\": \"top: 18%; right: 6%; left: auto; text-align: right; font-size: calc(0.085 * var(--h)); font-weight: 700;\",\n \"words\": [\n { \"text\": \"but\", \"start\": 5.04, \"end\": 5.18 },\n { \"text\": \"suddenly\", \"start\": 5.24, \"end\": 5.76 }\n ]\n },\n {\n \"id\": \"cg-3\",\n \"tone\": \"present\",\n \"in\": 6.7,\n \"out\": 8.04,\n \"css\": \"top: 32%; right: 6%; left: auto; text-align: right; font-size: calc(0.11 * var(--h)); font-weight: 900; text-transform: uppercase; letter-spacing: -0.03em; line-height: 0.95;\",\n \"words\": [\n { \"text\": \"everything\", \"start\": 6.82, \"end\": 7.14 },\n { \"text\": \"is\", \"start\": 7.18, \"end\": 7.28 },\n { \"text\": \"sharp\", \"start\": 7.32, \"end\": 7.52 },\n { \"text\": \"again\", \"start\": 7.58, \"end\": 7.92 }\n ]\n }\n ]\n}\n```\n\nSame visual, no slot constraint. Each group owns its typography.\n",
27
27
  "embedded-captions/references/typography-presets.md": "# Typography Presets\n\nFive named styles corresponding to the `cap-*` CSS classes. Pick one per caption group in `plan.json` based on the line's semantic role.\n\n| style | CSS | Use when |\n| -------- | --------------------------- | ------------------------------------------------------------------------------------------------------------------------- |\n| `intro` | 66px italic 500 | First line, filler (\"You know…\", \"So…\"), contemplative openings. Low visual weight. |\n| `phrase` | 78px upright 600 | Main statement clauses. Default for most lines. |\n| `emph` | 92px upright 800 | Lines with emotional peak or key achievement (\"I've achieved incredible things\"). |\n| `dream` | 82px italic 700 | Aspirational / \"was dreaming of…\" style lines. Italic signals memory/imagination. |\n| `crown` | 140px upright 900 uppercase | **Only for the climax line.** Used in center-stage `crown-plane`. Maximum one per composition — ideally the last caption. |\n\n## Tone field\n\nIndependent of style, each group has `tone`: `soft` or `present`.\n\n- **soft** — gentle fade + 8px y-drift entrance, `power2.out` ease. Feels floaty, nostalgic. Use for memory, intro, dream.\n- **present** — snappy 6px y + 1.04 scale pop, `power3.out`, transformOrigin center. Feels assertive, in-the-moment. Use for emphasis and crown.\n\n## Picking automatically\n\nScan each group's words:\n\n1. Does it contain superlatives (incredible, best, only, never, always) or brand/proper nouns? → `emph` + `present`\n2. Does it start with discourse markers (you know, so, well, look) or is it short (≤3 words)? → `intro` + `soft`\n3. Does it reference dreams, hopes, memory, past tense verbs like \"was dreaming\"? → `dream` + `soft`\n4. Is it the final sentence-clinching line and feels like a title/headline? → `crown` + `present` (only one per video)\n5. Otherwise → `phrase` + (match the group's neighbors' tone; default `soft`)\n\n## Font-size scales with column width\n\nThe `.cap-*` defaults in each template are tuned for a **~560px column** (the original champion composition). When the caption plane is wider than that, the fonts feel underweight — too much negative space around text. Scale up accordingly.\n\n| Plane width | intro | phrase | emph | dream | crown (centered, full-frame) | crown (clean-zone only) |\n| ------------------- | ----- | ------ | ---- | ----- | ---------------------------- | ----------------------- |\n| 460-580 px (tight) | 66 | 78 | 92 | 82 | 140 | n/a |\n| 600-760 px (medium) | 78 | 108 | 128 | 100 | 220 | 118 |\n| 780+ px (wide) | 90 | 128 | 150 | 116 | 260 | 140 |\n\nNotes:\n\n- Crown sizes assume landscape (1920×1080). For portrait 1080×1920, divide all crown sizes by 1.5.\n- \"full-frame crown\" = centered, designed to span `0.8+ × frame_width` and cross the subject's body. Use only when [layout-heuristics.md § Crown placement](layout-heuristics.md) conditions pass.\n- \"clean-zone only crown\" = crown positioned inside one clean zone, smaller font, tail letters lightly touch subject. Fallback when centered crown would eat too much.\n\nAlso: if a plane's `rotateY` is non-trivial (say > 8°), effective visible width shrinks. Scale fonts up ~10% to compensate.\n\n## What NOT to do\n\n- Don't use more than **one crown** per render. The whole point is that it's a singular payoff.\n- Don't use `emph` on more than ~30% of groups. Emphasis loses meaning when everything is emphasized.\n- Don't pick `intro` for the main content just because the words are short. \"I won\" (2 words) is `emph` or `crown`, not `intro`.\n- Don't mix `soft` and `present` alternately for no reason. Tone should follow the story arc: soft opening → present build → emph peak → (optional crown climax).\n\n## When scene luminance affects color choice\n\nThe default color is warm bone-white (`#fff5df`). Adjust in the template CSS:\n\n- Wall is mostly warm wood / tan → keep default, or shift cooler `#e8f0ff`\n- Wall is cool blue / tech-lab → push warmer `#fff0c0`\n- Wall has strong primary color → desaturate default, luminance first\n\nThese adjustments happen in the HTML template, not plan.json. If you repeatedly need different palettes, make new template variants.\n",
28
- "embedded-captions": "---\nname: embedded-captions\ndescription: >\n Add captions or subtitles to an existing single-subject talking-head video without editing the\n footage. Use for plain verbatim captions, cinematic captions embedded behind the subject, VFX\n captions, “炸/特效/酷炫字幕,” or a named identity from the 35-style catalog. Route by visual\n identity, not by backend engine. The quiet `anchor` rail is the default; embed every word only\n when the user explicitly wants a fully cinematic treatment. The workflow runs locally end to end,\n including transcription and subject matting; split multi-shot footage before applying it.\n---\n\n**Plugin installs:** Before setup or freshness commands, follow [plugin execution rules](../hyperframes/references/plugin-installation.md) when this skill is inside a HyperFrames plugin. Standalone installs keep the update instructions below.\n\n> **First, keep this skill fresh — confirm with the user before running:** `npx hyperframes skills update embedded-captions`. A fast no-op when everything is current; otherwise it refreshes this skill plus the core domain skills it depends on before you rely on them.\n\n# Embedded Captions\n\n**One catalog, picked up front** ([CATALOG.md](CATALOG.md) — 35 identities; the engines behind it are backend detail). **Standard** (default) builds a clean verbatim **rail** (lower-third subtitle carrying most text) + an **embed** climax composited _into_ the scene behind the subject at the peak. **Cinematic** is pure embed — no rail, every caption composited behind the subject (hero typography, accumulation, occlusion as the effect). **Theme** is a complete themed constitution — body paradigm × hero setpiece × front fx × plate reaction, composed from registries ([themes/README.md](themes/README.md)): `ordnance` `terminal` `neonsign` `stardust` `stomp`. Most explainer / voiceover is **Standard**; **embed is the scarce, earned peak** — embedding every word is the common mistake; Theme is for VFX-grade asks (\"炸\", \"特效\", \"像 AE 做的\").\n\n---\n\n## Runtime prerequisites\n\nPlugin installs use the bundled, manifest-pinned CLI for matting, transcription,\nand rendering; no source checkout is required. The local preview and caption\nmeasurement helpers also need Sharp, Puppeteer (with its Chromium browser), and\nGSAP. Install these in the **caption project**, not inside the read-only plugin:\n\n```bash\nnpm install --prefix <project> --save-dev --save-exact sharp@0.35.3 puppeteer@25.8.0 gsap@3.15.0\n```\n\nKeep the project's lockfile. If these dependencies already exist, use its locked\nversions instead of overwriting them. Bash and FFmpeg/ffprobe must be on PATH.\nMatting and transcription may download their own models on first use.\n\nRendering waits for the CLI to exit successfully before compositing. The old\n`HF_TIMEOUT_S` shell watchdog is no longer used: a large partial file is not proof\nthat rendering finished. An explicit built-checkout argument or `HYPERFRAMES_ROOT`\nselects the contributor CLI instead of the plugin pin. Cancel a stalled render normally through the CLI/terminal;\nthe caption helper does not force-kill or recover a render from a process snapshot.\n\n## Operational flow (TL;DR)\n\nRouted through `/hyperframes`, the intent layer confirms only the input (which clip) and **announces** the identity pick as a deferred ask — the shortlist needs the probed clip, so it stays at step 1 below; the layer's run-shape questions don't apply (the footage is untouched, there is no storyboard to review). A `BRIEF.md`, when present, carries the confirmed input and any user notes — read it first.\n\nThe craft prose below is long; the **pipeline itself is short** — and everything deterministic is computed or compiled, never hand-written:\n\n1. **Decision gate** (refuse bad clips) → **pick ONE identity from [CATALOG.md](CATALOG.md)** (35 identities; engine/compiler derived by lookup — never surface a mode/category question)\n2. `hyperframes init` (skip it if the project dir already exists with the video inside — `matte.cjs`/`transcribe.cjs` adopt any video in the dir as source.mp4) → **`bash scripts/prepare.sh <project>`** (matte ∥ transcribe ∥ audio-envelope in parallel, then safe-zones v2 with scene palette/optics/lighting — one command, nothing forgotten)\n3. **author a small JSON of creative choices** (read `safe-zones.json` first): Cinematic → `cinematic.json` → `make-cinematic.cjs` (derives `plan.json` and compiles it); Theme → `theme.json` → `make-theme.cjs` (rail/panel/poem/takeover paradigms; `anchor` is the quiet rail default)\n4. **Visual QA**: `node scripts/preview-frames.cjs <project>` → faithful composite previews in ~2s/frame (no render). Check § Visual QA before paying for a render.\n5. `render-and-composite.sh` → gates (timing / occlusion+hero / overflow / hand-off) → `final.mp4`\n\nLoad-bearing rules people miss:\n\n- **rail (default) + embed (promotion).** `drop` (filler, not shown) / `rail` (verbatim lower-third subtitle, in front, carries most text) / `embed` (a peak word composited behind the subject). **Standard mode does both**, embedding only the peak(s). See **§ Caption model**.\n- **The video is delivered UNTOUCHED (Standard/Cinematic; **Theme mode's PLATE budget is the one sanctioned exception** — register-gated reaction beats (charge-dim, punch, shake, grain) defined per theme DNA and applied AFTER the matte composite so subject+text+plate move as one frame)** — captions are the only thing added; the matte just lets the subject occlude the embed track. Never grade/recolor/scanline the footage.\n- Two rulebooks: **rail → [references/rail.md](references/rail.md)** (thin), **embed craft → [references/composition-craft.md](references/composition-craft.md)** (rich, embed-only). Skim by need.\n\n---\n\n## Caption model — rail + embed\n\nEvery spoken phrase is one of three things:\n\n| | What | How it's shown |\n| --------- | ------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| **drop** | filler — um/uh, stutters, self-corrections | not shown |\n| **rail** | the default — ordinary spoken content (verbatim) | clean lower-third subtitle, **in front**, readable. A punch word can get an inline `emphasis` highlight (accent colour / active-word pop) — it stays on the rail. |\n| **embed** | a promoted peak — the headline beat | one big word composited **behind the subject** (matte occlusion), designed entrance + exit |\n\n**The rail carries most of the text; embed is the scarce, earned peak.** Scarcity is **per beat/block, not per clip**: ≤1 hero per block (thought), never two co-visible, ≥ a beat of air between hero windows (the compiler warns under 0.6s). A short clip → usually 1–2; a long explainer → ~one per section. Among multiple heroes, the **largest authored one is the APEX** (it alone gets the full lockup embed + width-fit raise); smaller ones are **MINOR peaks** that ride their column as oversized emphasis lines (fg, damped motion) — not every beat needs the matte showcase, which is exactly what keeps the apex an event. Embedding every word is still the common mistake.\n\nRail-surface identities build exactly this (rail = `rail.html`, embed = the climax in `index.html`). Column-flow identities drop the rail and make everything embed-style — recommend them only for mood-over-verbatim asks, never for explainer / voiceover where the words must read (CATALOG.md encodes this per identity).\n\n---\n\n## Step 0 — pick ONE identity from the CATALOG\n\n**One front-end, three engines behind.** The user picks an IDENTITY from [CATALOG.md](CATALOG.md) (35 entries: 10 classic + 25 themed); the engine, compiler and authoring file are derived by lookup from the catalog row. **Never surface \"Standard vs Cinematic vs Theme\" as a question** — those are backend names (a product has one UX even with several engines). The catalog encodes everything routing needs: reading surface, voice, recommend-for, scene needs, adjacency notes for the genuinely-close pairs (loud↔ordnance, neon↔neonsign, cream↔stardust).\n\nThe identity pick is a **preference gate** (`../hyperframes/references/brief-contract.md` § 1): in autonomous mode (\"surprise me\" / \"decide for me\"), pick from your shortlist yourself and state the one-line why instead of asking.\n\nProcedure: probe the clip → shortlist 2–3 identities from the catalog → recommend ONE with a one-line why → **the user picks** (autonomous mode: you pick, stating the why) → author that identity's file. Identities are engine-locked (no cross combos; opening one is a validation event — see dna/README.md).\n\n**Always present your recommendation and let the user pick before you author.** Don't silently default.\n\n(The full identity table lives in [CATALOG.md](CATALOG.md) — single source of truth for routing. The engine docs below describe each backend's authoring contract.)\n\n**CATALOG.md is the whole answer space here: this workflow does not search the HyperFrames component registry.** The composition workflows run `npx hyperframes catalog` before authoring a named look; this one must not. Its engines are locked compilers that consume `cinematic.json` / `theme.json` and emit the composition themselves, so a registry item — the `caption-*` blocks included — has nothing to mount into. A registry block styles text on a designed canvas; this skill burns captions into somebody's footage through a matte. When no identity fits the ask, say so and pick the nearest, rather than reaching outside the catalog.\n\n**Recommendation heuristic**: use the \"Shortlisting heuristics\" in [CATALOG.md](CATALOG.md) — they are identity-level (e.g. \"炸\" shortlists ordnance/stomp/terminal/loud and picks by WHAT should explode), never category-level. Unsure → `anchor`.\n\n- **Cinematic** → write `cinematic.json` for a locked template, compiled by `make-cinematic.cjs`.\n- **Theme** → read [themes/README.md](themes/README.md), author `theme.json`, run `scripts/render-theme.sh` (compiles + renders + plate reaction → **final_fx.mp4**).\n\n---\n\n## Decision gate — RUN FIRST\n\nProbe the video and classify the scene before either mode.\n\n```bash\nffprobe <video.mp4> # specs\nffmpeg -ss <t> -i <video.mp4> -vframes 1 sample.png # at 20/50/80%\n```\n\nRead the samples. Refuse if:\n\n- Multiple speakers / hard cuts (split & render each shot, or refuse)\n- No human subject (this skill is for talking-head)\n- Under 3 seconds, **no speech**, or face never clearly visible — `transcribe.cjs` warns when audio is near-silent (Whisper hallucinates words like \"Thank you.\" over silence); **heed it and refuse** rather than caption fabricated words\n- **Source already has burned-in captions / subtitles / heavy text graphics** — adding a second caption system conflicts and the footage ships untouched (no covering/inpainting). Burned text often appears only mid-clip: sample a **1fps contact sheet** (`ffmpeg -i in.mp4 -vf \"fps=1,scale=160:-1,tile=10x5\" sheet.png`), don't trust 3 spot frames.\n- **Transcript is garbage** — non-native/heavy-accent speech can transcribe into confident gibberish. Sanity-read `transcript.json` before authoring; if it doesn't parse as language, try `WHISPER_MODEL=medium` once, else refuse (a verbatim rail of fabricated words is worse than no captions).\n- Busy handheld with fast motion (matte flickers)\n\n### Pre-flight probes (cost nothing, prevent the worst failures)\n\n1. **Shot-cut probe.** Sample frames at 20%, 50%, 80%. If a different subject/scene appears, **trim the clip** before the cut.\n2. **Letterbox / pillarbox probe.** Black bars on the first frame? Compute safe content rect and constrain caption placement inside it.\n3. **Luminance probe.** Sample the caption region's average luminance — `under 60` → light text reads as-is, `60-180` → add the glyph scrim, `180+` → opaque text + scrim (never bare light text). **Cinematic templates are cream+`screen` and LOCKED** — use this probe to _pick a fitting identity_ (bright scenes → `ink`, or the opaque-rail `anchor` theme), never to recolour one.\n4. **Identity recommendation by tone (you recommend; the user picks — see Step 0 + CATALOG.md).** explainer / interview / must-read words → rail/panel-surface identities; poetic / social / \"cinematic\" → column-flow identities by register; \"炸 / 特效 / VFX\" / named worlds → themed identities. When unsure → `anchor` (words read, scene safe) — but present a shortlist and let the user choose.\n\n---\n\n## Pipeline — 5 steps\n\n```\n1. hyperframes init <project> --non-interactive --video <video.mp4> --skill=embedded-captions\n2. bash scripts/prepare.sh <project> # matte ∥ transcribe (parallel) → safe-zones. One command.\n # → frames_fg/ transcript.json safe-zones.json\n3. [AGENT STEP — the only creative step] author a small JSON; see below by mode\n Cinematic: author cinematic.json → node scripts/make-cinematic.cjs <project>\n Theme: author theme.json → bash scripts/render-theme.sh <project> (compiles + renders + plate fx)\n4. node scripts/preview-frames.cjs <project> # ~2s/frame composite previews → § Visual QA (BEFORE the render)\n5. bash scripts/render-and-composite.sh <project> # gates → final.mp4 + history/ snapshot\n (Theme mode: SKIP steps 3b/5 — render-theme.sh already runs compile + render-and-composite\n + _postfx.sh; the deliverable is final_fx.mp4, final.mp4 is pre-plate-reaction)\n```\n\nStep 1's `init` checks the installed skills against the latest on GitHub and updates the global set if any are out of date.\n\nStep 3 differs by mode:\n\n### Step 3 — Cinematic mode (pure embed)\n\n1. **Read `safe-zones.json` first.** Narration planes go in **`zones.hugLeft`/`hugRight`** — clean strips ABUTTING the silhouette (text far from the body reads as floating, not embedded; far corners are the fallback, not the default). The hero defaults to `heroAnchor`/`heroBands.best` (centered ON the subject, ~30–55% occluded). `recommendation:\"fg\"` moves NARRATION in front for legibility; **the hero stays embedded whenever `heroBands.feasible`** — hero-fg is the last resort.\n2. **The DNA is the identity you picked in Step 0** (CATALOG.md) — do not re-open the choice here. Sanity-check it against the scene (bright hero band luma > 150 wants `ink`; full pick guidance lives in the catalog, covering all ten incl. neon / glitch / chrome / velocity). State your pick + why; the user decides. The DNA locks type/palette/blend/motion + hero three-act; safe-zones v2 (`palette`/`optics`/`lighting`) parameterizes it to THIS scene automatically.\n3. **Author `<project>/cinematic.json`** — `\"dna\": \"<name>\"` + thought-BLOCKS, not raw groups: each block = lines of words (grouped 2–5 at clause boundaries) + the plane it stacks in + per-line `css` (size/weight/style only — no positions) + at most ONE line marked `\"hero\": true` (the promoted word; `\"text\"` for display form). Schema: `scripts/make-cinematic.cjs` header.\n4. **Compile**: `node scripts/make-cinematic.cjs <project>` — lowers blocks → plan.json → index.html. Generated for you: transcript-sequenced timings, accumulate-within-block, page-flip-between-blocks, **the hero LOCKUP** (a hero block's pre-context, HERO and post-context stack as ONE bonded composition centered on the subject — reading order top→bottom = spoken order by construction; context floats in FRONT while the hero embeds BEHIND = the depth sandwich; a mass rule keeps the hero dominating its context), apex/minor hero split, **reading order by construction**, fg fallback per safe-zones. Then the gates run as usual. _(Hand-authoring plan.json directly remains possible for designs blocks can't express — then run `fill-timings.cjs` + `fit-fonts.cjs` + `make-composition.cjs` yourself.)_\n\n### Step 3 — Theme mode (themed constitution)\n\n**Read [themes/README.md](themes/README.md) FIRST** — paradigm/setpiece registries, linkages, hard rules, and the exact `theme.json` schema.\n\n1. **Pick a theme DNA** by content register (each `themes/<name>.json` has `voice` + `when`). State your pick + why; the user decides.\n2. **Author `<project>/theme.json`** — `dna`, `lines` (verbatim, transcript order; 1–5 words each — for `takeover` each line is one CARD), `minors` (emphasis words), `hero:{match}` (the climax word/phrase; leave it OUT of `lines` for embed setpieces, keep it IN for inline setpieces and panel+redact).\n3. **Render**: `bash scripts/render-theme.sh <project>` — compiles (verbatim-completeness gate at compile time), renders both layers, composites, applies the plate reaction → `final_fx.mp4`. Use `preview-frames.cjs` between compile and render for Visual QA.\n\n---\n\n## Visual QA — preview BEFORE you render\n\n`node scripts/preview-frames.cjs <project> [t…]` composites **faithful preview frames in ~2s each** (caption layers screenshotted at seek-time + real video frame + matte occlusion + rail overlay = what the final composite will look like at that moment). Default samples = each group/climax window. A full render costs minutes — never use it to _discover_ layout problems.\n\nCheck the previews (`<project>/preview/sheet.png`) against this list — these are the failures the geometric gates **cannot** catch:\n\n1. **Washout** — light text over a bright region (window/sign/sky): unreadable → move the plane or change DNA/mode (bright scene → `ink`).\n2. **Text-on-text** — captions over the scene's own text/graphics, or two caption groups colliding.\n3. **Reading order** — on-screen vertical order must match spoken order; the hero must not sit below later words.\n4. **Hero presence** — the climax should be BIG and visibly behind the subject (~30–55% occluded), not a floating label in a margin.\n5. **Balance** — one coherent column/band, not scattered fragments; margins breathing; nothing clipped.\n\nThen the **5 positive checks** in [references/reference-bar.md](references/reference-bar.md) (poster test · timid test · one-glance hierarchy · scene handshake · dead-air audit) — the failure list keeps a render from being broken; the positive list is what makes it _designed_. Ship when both pass.\n\n**Fresh-eyes review (recommended for anything user-facing):** you have confirmation bias about your own layout. If you can spawn a subagent, give it ONLY the preview sheet + this checklist and ask for PASS/FIX verdicts per frame (\"review these caption previews against the 5-point checklist; answer PASS or the specific fix per frame\"). Apply fixes in cinematic.json / theme.json, recompile, re-preview — each loop costs seconds. Render once, when the previews pass.\n\n---\n\n## The DNA registry — ten visual languages (replaces the template catalog)\n\nBoth modes draw from **[dna/](dna/README.md)** — ten art-directed visual languages that **parameterize per scene** (accent sampled from the footage, contact shadow along the measured light direction, depth-match blur, RMS-coupled hero amplitude):\n\n| DNA | Register | Scene fit | Voice |\n| --------------- | -------------- | ----------------------------------------------- | -------------------------------------------------------------------------------------------------- |\n| **cream** | premium-warm | dark/mid warm scenes | Inter + warm cream + screen; glowing emergence hero (successor of cinematic-cream) |\n| **ink** | premium | **bright scenes (luma > 150)** | near-black multiply — type printed ON the wall; the bright-scene answer |\n| **editorial** | editorial-luxe | introspective / fashion / poetic | Bodoni Moda, lowercase-italic hero — magazine elegance |\n| **keynote** | tech-premium | product / launch | opaque white Inter 800, dead-center stillness |\n| **documentary** | formal | interview / serious | burn-in reveals, no hero — gravitas IS the style |\n| **loud** | loud | hype / sport / social | Anton + scene-sampled accent, single-unit slam + ripple; body ANNOUNCES in front (`bodyLayer: fg`) |\n| **neon** | loud-neon | neon-noir / nightlife / tech-noir (dark scenes) | electric-cyan signage, ignition flicker, the hero powers ON like a sign |\n| **glitch** | loud-neon | digital / hacker / AI | RGB-split echoes snap together on landing; machine-percussive timing |\n| **chrome** | loud-luxe | Y2K / fashion-tech / music | liquid-metal gradient hero + one sheen sweep during the hold |\n| **velocity** | loud-sport | sport / auto / fitness | every word arrives along its motion vector (streak+skew), hero passes with speed trails |\n\nPick by `safe-zones.json` (`heroAnchor.bandLuma`, `palette.temperature`) × content register — [dna/README.md](dna/README.md) has the decision rule. Authoring: `cinematic.json` takes `\"dna\": \"<name>\"`.\n\nThe engine generates the **hero three-act** from the DNA (no authoring needed): co-visible captions dim (setup) → per-letter entrance with amplitude ∝ spoken loudness (impact) → breathe + glow until exit (afterglow).\n\n(Legacy: `plan.template:\"cinematic-cream\"` maps to `dna:\"cream\"` automatically. The retired 54-template library is archived outside this repo and is not distributed with the skill; `_motion.md` remains in-skill as the motion-verb reference catalog.)\n\n---\n\n## Aesthetic decision — tone × shot × platform (input to the catalog shortlist, NOT a second router)\n\nClassify the clip on 3 axes and feed the result into CATALOG.md's shortlisting — this section never picks a mode/engine by itself:\n\n**Tone** (what feel does the content have?)\n\n- documentary | conversational | energetic | poetic | keynote | investigative | music-video\n\n**Shot** (what's the framing?)\n\n- close-up (head + shoulders) | mid-shot (torso+) | wide (full body+) | cut-montage (mixed shots)\n\n**Platform** (where will it play?)\n\n- 9:16 portrait (TikTok/IG/Shorts) | 16:9 landscape (YouTube/web) | 1:1 square | broadcast export\n\nCross-reference in [references/direction-catalog.md § Classification matrix](references/direction-catalog.md) for direction language — then return to [CATALOG.md](CATALOG.md) to shortlist identities (this matrix informs the shortlist; the catalog is the only routing surface).\n\n## Composition craft (embed track) — read before embedding\n\nThe full **embed-track** playbook lives in **[references/composition-craft.md](references/composition-craft.md)**: transcript role-annotation, phrase grouping, planes & clean-zone anchoring, zone coherence, climax pop & readability, edge-breathing, the occlusion 3-step judgement, and accumulation/persistence. It governs how a _promoted_ phrase sits INTO the scene — read it before authoring any embed (Cinematic `cinematic.json` or Standard `index.html`). The default **rail** track has its own, much simpler spec → **[references/rail.md](references/rail.md)**.\n\n---\n\n## Shared knowledge\n\n| Doc | What |\n| ------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------- |\n| [references/rail.md](references/rail.md) | **The rail track** — standard lower-third subtitle spec (the default; carries most text). |\n| [references/composition-craft.md](references/composition-craft.md) | **The embed-track playbook** — grouping, planes, climax pop, occlusion judgement, accumulation/persistence. Read before embedding. |\n| [dna/README.md](dna/README.md) | **The DNA registry** — ten scene-parameterized visual languages; how to pick. |\n| [references/reference-bar.md](references/reference-bar.md) | **The taste bar** — per-register world-class references + the 5 positive checks. |\n| [references/aesthetic-principles.md](references/aesthetic-principles.md) | **The 18 rules.** Beat Veed AI on taste. Read first. |\n| [references/motion-vocabulary.md](references/motion-vocabulary.md) | 10 named motion primitives + tone→timing lookup |\n| [references/direction-catalog.md](references/direction-catalog.md) | 10 ship-ready aesthetics + tone×shot×platform matrix |\n| [references/anti-patterns.md](references/anti-patterns.md) | Bugs already locked out (CoreML, letter-spacing reflow, etc.) |\n| [references/scene-types.md](references/scene-types.md) | When a wall surface is usable (4 conditions) |\n| [references/layout-heuristics.md](references/layout-heuristics.md) | Plane positioning, clean-zone selection, crown 3 conditions, pillarbox math |\n| [references/typography-presets.md](references/typography-presets.md) | Font-size × column-width matrix (starting points) |\n| [references/caption-grouping.md](references/caption-grouping.md) | Word → group rules (pauses, sentence boundaries) |\n| [references/failure-modes.md](references/failure-modes.md) | Long tail of dev gotchas |\n| [references/bespoke-vs-presets.md](references/bespoke-vs-presets.md) | Why presets fail sometimes; clone-and-tweak pattern |\n\n**Read the aesthetic principles and direction catalog FIRST.** Everything else is implementation detail.\n\n---\n\n## Non-negotiables\n\n- **Face must never be 100%-covered continuously** — every 0.3s window, face bbox ≥30% uncovered.\n- **WCAG contrast** — final render lints; fix palette if it fails.\n- **Deterministic** — no `Math.random()`, no `Date.now()`, no `repeat:-1`.\n- **Never grade/recolor the video.** The footage ships untouched — captions are the only addition. No full-frame scanlines / duotone / darken / vignette over the a-roll. neon-noir/CRT texture belongs _inside_ a caption element, not over the whole frame.\n- **Rail-first for talking-head / explainer.** Don't embed the whole transcript — most text is the rail; embed only peaks. Embedding everything is the default mistake.\n- **Embed is scarce + spaced.** ≤1 embed per sentence/beat, never two adjacent or co-visible, ≥ a beat apart, at most one `apex`. climax = per-beat peak, **not** \"the single payoff of the entire clip.\"\n- **Matte = the PERSON (hyperframes `remove-background`, u2net_human_seg, Apache-2.0).** Human segmentation by intent, but not surgically: thin offset furniture (mic boom arms) is usually excluded — captions render over it, behind the person — while large salient objects NEAR the subject (a telescope, a desk rig) can still leak into the matte and occlude captions. Objects HELD by the subject (products, phones) may drop out intermittently, letting captions pass in front. NEVER assume: sample `frames_fg/` at 2-3 timestamps before placing the hero, and prefer hero positions clear of any leaked furniture (`heroAnchor` can be skewed by leaks — cross-check against frames_bg).\n- **safe-zones is PROP-BLIND — eyeball every band you use.** Zones/heroBands score _subject_ occlusion + luma only: a mic, telescope, or screen sitting inside a \"clean\" zone is invisible to them (and a prop leaking INTO the matte skews `heroAnchor.centerXPct` off the person). Before authoring, extract ONE frame of each band you intend to use; if a prop lives there, measure its bbox and move/shrink the plane. Two real cases shipped clean only because the agent did exactly this. (Auto prop-saliency is a known gap; zones' `peakLuma` only catches _moving_ bright objects.)\n- **Captions stay on-frame.** Cinematic mode hard-gates frame-overflow; Standard mode runs `check-overflow.cjs` as a WARNING (intentional bleed is the only exception — read the warning).\n- **Each caption ≥ 0.5s on screen** — shorter = unreadable.\n- **Word timings must match transcript.json within 80ms** — a caption firing 500ms off-beat destroys the scene illusion. Cinematic runs `check-timing.cjs --strict` before rendering (via render-and-composite.sh); THEME mode enforces the same timings at compile time instead (make-theme's sequential transcript matcher + verbatim completeness gate — drift is a compile error). Never pack multiple transcript words into one entry (e.g. `\"FUTURE OF\"` or an `IT` + line-break + `ALL` stack with one start/end) — the second word inherits the first's timestamp and fires early. Split them into separate word entries with their own timings, even if you want them on the same visual line (use CSS `white-space` / natural wrap instead of `<br>`). Creative substitutions where caption text ≠ transcript (e.g. `\"15%\"` replacing `\"fifteen percent\"`) are supported — register them in `CREATIVE_SUBS` inside `check-timing.cjs`.\n- **Group windows must envelop their words** — `group.in ≤ min(word.start)` and `group.out ≥ max(word.end)` for every group. If `group.in` is later than a word's start, the word is silently delayed until the container mounts (we've shipped 800ms lag bugs from this). The validator enforces this.\n- **No two caption groups may overlap in both time AND screen region** — overlapping-in-time captions create text-on-text pileups. Options: (a) **spatial separation** — place each group in a non-overlapping vertical band so they can coexist (memory-wall cascade style); (b) **handoff** — set the earlier group's `out` ≤ the next group's `in` so only one is on screen; (c) **deliberate layered typography** — add `\"allow_overlap\": true` on one of the groups to silence the validator. The validator estimates each group's vertical bbox from its CSS and flags collisions. Pick (a) by default — it's what makes cinematic-cream feel like a poem accumulating, not a subtitle track replacing itself.\n- **Screen-blend fails on bright backgrounds (>180 luminance).** **Cinematic** templates are cream + `screen` and that DNA is **locked** (the plan can't recolour them) → on a bright backdrop they wash out, so pick `ink` (letterpress built FOR bright surfaces) or the `anchor` theme (opaque rail surface) rather than overriding a look.\n- **Don't animate `letter-spacing` or `filter:blur` on word entrance** — inline-block reflow causes line-jumps.\n- **CoreML banned for matting** — the onnxruntime CoreML EP's mixed-precision partitioning corrupted face alpha (observed with the previous RVM engine; don't re-try it). Matting is CPU-only (~2 fps @1080p ≈ 2-3 min per 10s clip; budget for it on long clips).\n\n---\n\n## Dependencies\n\n- **HyperFrames CLI:** plugin installs use the bundled manifest-pinned launcher. Source contributors can use a built checkout (`packages/cli/dist/cli.js`) via `HYPERFRAMES_ROOT`, the skill’s source tree, or `~/Downloads/hyperframes`.\n- **Node-first; two Python touchpoints via `uvx` (no manual installs):** transcription runs WhisperX through `uvx` (word-level timings; falls back to an existing word-level `transcript.json`), and Theme's `drawon` setpiece shells `python3 scripts/gen-stroke-path.py` at compile time. Everything else runs on the toolchain hyperframes already ships: matting via the hyperframes CLI's **`remove-background`** (u2net_human_seg; weights auto-download once, ~168 MB, to `~/.cache/hyperframes/`), image/alpha math via **`sharp`**, layout/occlusion/overflow via **`puppeteer`**, plus **`ffmpeg`**. Install Sharp, Puppeteer, and GSAP in the caption project as described in **Runtime prerequisites** above. The helpers check that project first and retain checkout dependency lookup for source contributors.\n- **Transcription = WhisperX via `uvx`** (word-level timings + alignment; no manual install — `transcribe.cjs` drives `uvx whisperx`). Falls back to an existing word-level `transcript.json` if present.\n- **Source video** — `matte.cjs` / `transcribe.cjs` auto-resolve `source.mp4` (or glob the clip / read `hyperframes.json`), so `hyperframes init --video X.mp4` needs no manual rename.\n- **fps** — `matte.cjs` extracts at the source's native rate and records `matte.fps`; `render-and-composite.sh` uses that so the matte stays frame-aligned.\n- Matting weights are NOT bundled: `matte.cjs` shells the hyperframes CLI's `remove-background`, which downloads u2net_human_seg (~168 MB, Apache-2.0) once to `~/.cache/hyperframes/background-removal/models/`. First prepare on a fresh machine needs network for that one download.\n\nIf a hard dependency is missing, STOP and ask the user — don't silently skip steps.\n",
29
- "embedded-captions/themes/README.md": "# THEME mode — composed visual constitutions\n\nTheme mode is the third compiler (`scripts/make-theme.cjs`), beside Standard and\nCinematic. It exists because \"mode\" was a bundle of orthogonal axes pretending\nto be one switch. A theme DNA composes its identity from registries implemented\nONCE in the compiler — **paradigms are the unit of code; DNAs are the unit of\nidentity**. A new look is a JSON file; only a genuinely new paradigm/setpiece\n(rare) touches the compiler.\n\n```\ntheme DNA = body PARADIGM how the transcript surface lives\n × body LAYER fg-alpha (rail.html channel) | bg-embed\n × hero SETPIECE the climax choreography\n × front FX flash / rings / sparks / scanband / crowdflash / paflash (fg, over subject)\n × PLATE budget charge-dim (in-page) + punch/shake/grain (_postfx.sh)\n × LINKAGES declarative theme interactions\n```\n\nStandard and Cinematic were, in retrospect, two fixed points of this space.\nStandard is now RETIRED (2026-06-12): its rail×embed-climax point is served by\nthe `anchor` theme (rail paradigm × settle setpiece — the quiet default).\nCinematic remains a separate compiler; do not re-implement it as a theme yet.\n\n## Unification roadmap (strangler fig — interface first, engines later)\n\nThe user-facing model is already unified (SKILL.md Step 0): one catalog of\nLOOKS; classic looks pick a DELIVERY (rail | column), themed looks bind their\nown. \"Standard/Cinematic\" are delivery/compiler names, not modes. Remaining\nphases, each gated on need — never rewrite for tidiness alone:\n\n- **Phase 2 — one authoring schema.** `lines`/`minors`/`hero` are already\n ~90% shared between standard.json and theme.json; a router that translates a\n single `caption.json` into the engine-specific file removes the last\n user-visible seam. cinematic.json's blocks/planes are the odd one — map the\n common fields, pass engine-specific ones through.\n- **Phase 3 — engine convergence.** Port a classic delivery into make-theme\n ONLY when something forces it (e.g. a classic DNA wants a plate budget or a\n setpiece). Acceptance bar: blind A/B on the cap_multi regression scenes vs\n the old compiler — swap engines only when indistinguishable or better. Until\n then the old compilers are the reference implementation of 8 rounds of\n validated typography (lockup/orbit, multi-climax, ratio-lock, per-plane\n legibility, occlusion adjudication) — that machinery is the moat, not debt.\n\n## Body paradigms (registry)\n\n| paradigm | surface | layer | entrance verbs | exit verbs |\n| ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ----- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `rail` | lower-third lines, replace | fg | `stamp` (1f hot appear→crush→recoil→cool), `flick` (tube double-flick), `bootflick` (corrupted-cyan boot 1–2f → settles to UI color; minors keep a cyan/red registration shadow). `stamp` minors cool to `palette.minorCool` (default amber) | `drop` (mass falls), `powercut` (bright→ghost→off) |\n| `panel` | docked glass console, accumulate + typed | fg | `type` (width steps per word, $ prompt, caret blinks) | hold |\n| `poem` | open-space stanzas, accumulate; letters CONDENSE from seeded dust | fg | `condense` | `drift` (stanza hand-off) + optional dispersal linkage |\n| `takeover` | full-frame hard-cut cards, plate dimmed throughout | bg | `cut` (+ tension `creep` before silences, auto-detected) | hard cut / blur dissolve |\n| `lastpage` | manuscript rail (typed serif) + a seeded field of BLURRED apex-word instances haunting the room from t=0 | bg | typed rail; field breathes imperceptibly | rail fades; field resolves at apex (see `rackfocus`) |\n| `flaprail` | split-flap word tiles on a chyron bar (tag + ROW flip-counter; optional odometer chip docks above the bar while the first emphasis line reads) | fg | `splitflap` (3 flips: wrong word → wrong word → real word clacks on hot, squash → elastic settle → cools to bone; emphasis tiles keep amber text + underline) | flip-to-blank cascade left→right (completes before the next line) |\n| `ledboard` | amber LED departure strip docked lower-third (`body.board` geometry); lines page by vertical scroll-snap (steps(6)) inside the board window; furniture: green platform tag, ticking seconds clock (stacked digit reel), ⚠ DELAYED blinks then pages to ● ON TIME ~0.7s after the apex, idle LED shimmer in dead air ≥1.2s | fg | `ledwipe-mini` (per-word L→R LED column wipe, clipPath steps(len), + 1-frame arrival flicker; emphasis words get the LED-refresh double-blink; last word gets one late refresh) | scroll-snap page-up (next line pages in at the same instant) |\n| `vhsrail` | camcorder-playback lower third: every word carries a PERMANENT 1px red+cyan misregistration fringe (split clip-path halves); furniture: ▶ PLAY / ◀◀ REW top-left (REW gag in dead air ≥0.7s + the final rewind), ● REC top-right through the apex window, green timestamp bottom-right with 1 Hz blinking colon, idle tape-drift line in long silences, plus apex-coupled artifacts (1-frame white tear band + head-switching noise bar at REC FREEZE, scrub lines at the apex band on the hero rewind) | fg | `trackglitch` (instant on + 2-frame y-shake + 1-frame band-slice shift of the word's bottom half; emphasis = PAUSE jitter ±1px y oscillation + white noise-band flicker) | REWIND streak left + flat-white echo copy + 2 scrub-line flickers |\n| `hudrail` | arcade-cabinet HUD: whole frame plays through CRT overlays (scanlines `body.scan` + corner vignette); docked HUD bar (`body.bar` geometry, 2px accent border, glow) with `body.tags` 1UP / CREDIT furniture — the 1UP tag blinks on the classic 0.45s attract cadence all clip; HUD yields (`body.yield`) while the boss lands | fg | `coinpop` (instant-on + steps(2) scale pop from the baseline + 1-frame white coin-blip tick over the word; emphasis = 3-frame palette swap body→accent→magenta→body) | checkerboard dissolve (words vanish in 2 alternating 2-frame passes, line off ≤ DUR−0.02) |\n| `carbonstrip` | cold-war case-file transcript strip docked on the clearer side (manila gradient, punch holes, faint red `body.watermark`, typed `body.header` that types on by width steps); lines live on up to `body.rows` fixed slots; PAGES (broken at full rows, dead-air gaps > 0.7s, and after the hero hand-off line — it is filed away while the stamp owns the frame); the strip top-shadow breathes during the stamp's dead-still hold and the strip yields (`body.yield`) while it lands; the final page is pulled with the whole strip at clip end | fg | `hammer` (per-char sets 30ms apart, scale 1.35→1 in one frame = the stamp motif at low amplitude; seeded ±1.2px baselines + seeded ribbon-ink opacity; every strike kicks the strip 1px — y-channel locked while the strip itself tweens; emphasis words get a red ink ellipse drawn around them, 0.25s) | X-row over-strike (3 chunks per line, 0.05s apart, lines 0.16s apart) → carriage yank-down feed → return; roomy cadence in dead air, compressed when the next page is close — always completes before the next page's first strike |\n| `laserrail` | concert lower third: lines centered on a bottom rail (`body.bottomPx`), uppercase laser-green words with a neon text-glow; emphasis words render at `body.minorScale`× with a hotter glow; word centers are BAKED at compile time from the measured char-width table (`assets/fonts/char-widths.json`, ≤3px vs browser ground truth) so the beam aim can't be skewed by font-load timing; per-word furniture = two thin beams (accent from top-left, magenta from top-right) that sweep to CONVERGE on the word 2 frames early + a convergence flare; beams dim ×`yield.beamDim` inside the apex window and the visible line dims to `yield.dim` | fg | `igniteconverge` (beams converge at st−0.083 → flare pop → word snaps on at opacity 1 with brightness 1.85, crush 0.09s power3.in → 2-frame contact squash → elastic settle → brightness cools; emphasis = single 1-frame strobe off/on + lingering beams) | sweeper beam crosses L→R in 0.13s and each word streaks away (x+44, blur 5) as it passes; line off ≤ DUR−0.02 |\n\n| `stormrail` | rain-washed lower third: ambient rain = `body.rain.count` seeded thin streaks falling on repeating linear cycle tweens (pure f(t), one slanted wind vector, mid-fall at t=0); a second seeded set DOUBLES the rain for ~1s after the strike; lines sit on a bottom gradient scrim (stable reading surface); the visible line dims to `yield.dim` while the bolt lands and its text-shadow flips toward the strike (`hero.params.side`) for the flash frames | fg | `lightningpop` (the apex motif at low amplitude: instant on at brightness 2.2, y+4, scale 1.06 → 0.12s micro settle; emphasis = sheet-lightning double flash, 2-frame brightness 1.9/1.0/1.8 chain — the bg sky double-kisses at the same beats) | wash downward with the rain (y+22, blur 3, 0.18s power1.in); a line facing dead air washes early at lastWord+1.08s; line off ≤ DUR−0.02 |\n| `holorail` | volumetric projection plate: a scanlined glass slab (`body.plateW`×`plateH`, centered at `H − bottomPx`) with corner brackets + feed tag (`body.tag` / `theme.plateTag` override) boots like a projector turning ON (scaleY 0.03→1 expo + 1-frame flicker) and breathes a finite yoyo luminance cycle sized to the clip length; lines sit centered IN the plate (`lineDy` below plate center) with a constant chromatic-fringe text-shadow (−1.5px accent / +1.5px magenta) and drift slowly in rotationY (it IS a projection); the whole railwrap — plate included — dims to `yield.dim` while the apex lands | fg | `sweepboot` (the apex motif at low amplitude: instant opacity + rising clip-wipe reveal 0.15s + 1-frame x interference glitch at st+0.05/0.09/0.13; emphasis = 2-frame projection DROPOUT at `body.emphDelay`, restores brighter in `palette.em` with a hotter fringe, then settles back — the delay auto-shrinks near the line's exit so dropout+restore always complete) | projector cut — brightness 2.2 pop → collapse to a horizontal slit (scaleY 0.045, 0.07s power3.in) → to a dot (scaleX 0.015, 0.06s) → off at exit+0.15; the plate itself gets the same cut at DUR−0.14 |\n| `planktonrail` | deep-sea lower third on TWO coexisting row slots: even lines ride the upper row (`H − bottomPx − rowDy`), odd lines the lower (`H − bottomPx`) — couplets share the water like drifting strata. A line clears when its row is next needed (line i+2 in − 0.15) or ~0.3s after its couplet finishes speaking (staggered pair exits, +0.12s on odd rows); the pre-apex leftover clears at heroIn−0.21 while the FEEDING line (last to start before the apex) yields to `yield.dim` instead — no restore unless ≥1.2s of hold remains (it exits dimmed, by design); a line entering during the hold arrives at `yield.enter` and restores at I+`yield.post`; every line floats on a gentle y keyframe drift sized to its window. Furniture: `body.motes` = {count, near, seed} plankton motes on seeded drift walks f(t); the first `near` seed a ring around the apex heart (ring radius scales with hero fontPx/120) and get ATTRACTED to the bloom at I−0.19 (pulled 0.72× toward it, brightening to 0.42 at scale 1.7), wiggle through the hold, and sink at clip end | fg | `glowon` (the apex bloom at low amplitude: 2-frame opacity ramp + radial bloom from word center — scale 0.92→1, blur 5→0, brightness 0.45→1, 0.4s sine.out — while a cyan glow text-shadow grows in; emphasis = slow DOUBLE-BEAT propulsion pulse at st+0.52, 5-key brightness/scale 0.55s, guarded ≤ DUR−0.09) | light sinks — y+15 while dimming, 0.3s power1.in; the last line floats to the end of the clip; line off ≤ DUR−0.02 |\n| `sheenrail` | iridescent silk lower third on TWO coexisting row slots: even lines ride the upper row (`H − bottomPx − rowDy`), odd lines the lower (`H − bottomPx`) — couplets read together like a woven pair. Words are aurora-gradient ink (background-clip:text over a rose→teal→violet 300% wash whose backgroundPosition drifts f(t) 0%→300% across the whole clip — the body's hold life) above a blurred dark understroke (top+3px, blur 3); a soft radial band scrim sits under the rows (stable reading surface). Line scheduling mirrors planktonrail: a row clears when next needed (line i+2 in − 0.15) or shortly after its couplet finishes speaking (pairEnd + 0.23 + 0.17 on odd rows); the pre-apex leftover clears at heroIn−0.32 while the FEEDING line stays and dims with the railwrap yield (`yield.dim` at I−`pre`, restore at I+`post` — band included); the last line holds to the end | fg | `flowon` (the ribbon's flow at low amplitude: 2-frame opacity + y8 settle 0.38s sine.out; emphasis = ONE bright sheen sweep — a white highlight marches through the word once at st+0.16 (backgroundPosition −80%→180%, 0.42s power2.inOut) + a brightness 1.55 pulse) | dissolve UPWARD — words to y−12, blur 3, 0.32s power1.in staggered 0.035; each line releases `body.streaks` seeded light streaks (rose/teal/violet verticals) that float up from its row (y 14→−78, 0.62s, start clamped ≤ DUR−0.66) |\n| `scoperail` | oscilloscope lower third: a dark phosphor scope band (`body.bandH`, top border + glass shadow) hosts HUD readouts (`body.hudL` left, sample-rate `· TRIG` + amber trig LED right), a graticule, and an ALWAYS-ALIVE waveform — an SVG polyline rebuilt from baked point-set states (seeded pseudo-RMS envelope at ~12 states/s + 3-frame triplets on word arrivals: speech grows the amplitude, silence flattens it, every word kicks a local gaussian burst at its slot center — burst x BAKED at compile time from the measured char-width table; the hero words kick WIDE bursts spread from `HG.x` toward `HG.x + 0.6·halfW`, where the trace surges to write). Body lines sit centered on the band above the trace with reserved-width slots (sizer + clip — no re-center drift as words arrive); the whole band (lines + wave + HUD) dims to `yield.dim` while the apex writes. At the FINAL transcript word the scope DIES: band x-shake, trig LED panics red then dies, the trace explodes to max-amp chaos for ~0.3s, flatlines, collapses to a single dot (scaleX 0.015) and `body.siglost` stamps with a 2-frame flicker (all clamped ≤ DUR−0.02) | fg | `tracewipe` (the apex pen-write at low amplitude: clip wipes the word in L→R over 0.10s + a 2-frame just-traced flash — flash-white instantly, settle to phosphor green; the death word settles to `palette.em` amber; the trig LED blinks on every arrival; emphasis = a ticking frequency-readout chip above the word, 3 seeded ascending values stepping every 2 frames) | the line collapses INTO the waveform (y+30, 0.13s power2.in) — early into dead air (lastWordStart+0.67), else just before the next line needs the slot; the last line collapses as the trace flatlines (min(NZ+0.33, DUR−0.2)) |\n| `paperrail` | stop-motion craft table: a kraft strip (torn top edge via seeded polygon clip-path, washi-taped corners, handwritten `body.tag` in the tag font) docked lower-third (`body.strip` geometry, centered by default); body words are cream paper chips (`palette.chip` on `palette.chipEdge` border, hard dy3 shadow) on centered replace-lines; the whole strip jitters ±0.7px every 4 frames (handmade stop-motion weave); the hero slot keeps a red paper star (`palette.accent`, rail↔climax hand-off) that pulses 1.18→1.06→1 as the apex chips land; the FINAL transcript word is an accent-red sign-off chip; emphasis words get a washi-tape slap (steps(2) scale 1.7→1 at `word.start + body.tapeDelay`, chip pressed 1 frame); strip + lines yield (`body.yield`) while the apex lands | fg | `place` (the papermat drop at low amplitude: opacity full in 0 frames + seeded ±2.5° rotation, y −16 + scale 1.06→1 steps(2) 0.12s; hold = rotation-only ~5fps wobble) | `peel` (rotation −8°, y −40, fade, steps(3), staggered 0.03s; last line clamped to finish on frame) |\n| `popuprail` | pop-up book page: a cream page strip (`body.strip` geometry, center foldline, top border + paper glow inset) unfolds up from the bottom edge (scaleY 0.02→1 back.out at 0.14 — the stage is built) and hosts TWO reading rows (`body.rowA`/`rowB` px above H) that alternate per line; the whole page breathes a gentle y drift sized to the clip; the hero slot keeps a blue paper star chip (`palette.accent` clip-path star, rail↔climax hand-off — spliced into the line whose window holds heroIn); emphasis words land at `body.emPx` weight 800 with a contact squash (1.06/0.93 set → elastic settle) the strip FEELS (1px dip), then flick-wobble (5-key rotationX, squeezed to fit before the fold) with a blue paper strut leaning in behind (scaleY back.out(2)); the FINAL transcript word is a blue sign-off with a strut; page yields (`body.yield`) while the centerfold lands; on the final word the whole page TILTS 2° +x6 (paper physics, `body.tilt:false` opts out) and the strip folds shut on the last frame (scaleY power3.in ≤ DUR−0.017) | fg | `popup` (the centerfold motif at low amplitude: opacity 1 in 0 frames + rotationX 85→0 baseline hinge, 0.25s back.out(1.4), back-shadow grows as it rises) | `fold` (the page closing: rotationX 88 power2.in 0.12s, shadow off, L→R wave staggered 0.045s, slot hidden at +0.13; fold at next line in / lastWord+`body.maxHold` in silence, wave clamped ≤ DUR−0.017) |\n| `chalkrail` | night-lecture chalk band: a deep-green board strip (`body.strip` geometry, worn top hairline, eraser smudges, handwritten `body.tag` header in the tag font, two chalk sticks bottom-right) docked at the bottom edge hosts `body.rows` reading rows that ACCUMULATE — lines fill the rows top→bottom in phases of rows.length; when the next phase needs the rows an ERASER SWIPE clears the board (blurred light band sweeps across 0.42s at `prevEnd + body.eraseDelay` clamped clear of the next phase, the old words SMEAR out scaleX 1.3 + x+24 + blur(8) staggered 0.06s, faint ghost smudges fade in and STAY — chalk never fully erases); the FINAL transcript word lands in yellow chalk (`palette.em` sign-off); the band yields (`body.yield`) while the apex writes | fg | `scribble` (the chalkwrite verb at low amplitude: 2-frame opacity pop + scribble clip-reveal steps(4) 0.12s + y4 drop-settle + 6 seeded dust specks puffing at the word base, seeded ±2° tilt; emphasis = double underline dashes drawn beneath at st+0.22/+0.38) | eraser-swipe smear between phases (scaleX 1.3, x+24, blur 8, power2.in 0.18s); the final phase holds to clip end |\n| `markerrail` | street handstyle rail: centered marker lines on a bottom rail (`body.bottomPx`), `palette.body` cream paint with a heavy drop text-shadow; emphasis words take ALTERNATING paint colors (`palette.em`/`em2`, yellow/magenta) + a spray-underline SWOOSH (dash-revealed squiggle viewBox-stretched to the word) with 8 seeded overspray dots that pop and fade; the FINAL transcript word lands BIG (1.5×) in `palette.em` with mini apex-impact physics (crush 0.09s power3.in → 2-frame contact squash → elastic settle — it rides the plate punch); the line visible at the tag's onset yields (`body.yield`, restore only with runway before its buff — else it exits dimmed) | fg | `flick` (the spray-write verb at low amplitude: opacity full in 1 frame at scale 1.18, seeded ±6° rotation settling to ±2°, 1-frame squeak skewX 7, back.out(2.2) settle 0.18s) | ROLLER BUFF (gray paint roller scaleX-sweeps the line 0.15s power2.in, words vanish under it, the wet smear lingers at 0.15 + blur(2) before fading); the last line is never buffed — the sign-off stays painted |\n| `brushrail` | washi paper band: a deckle-edged band (`body.strip` geometry, two faintly rotated `paperHi`→`paperLo` under-sheets at 0.42 + a translucent `sheetHi`→`sheetLo` main sheet with warm inset shadow) swipes in L→R behind a traveling brush-head shadow (clipPath wipe 0.2s power2.out + blurred `palette.bh` gradient head — the ink gesture at low amplitude), then the under-sheet breathes faintly (0.32 Hz baked f(t)); body lines are centered replace-lines on the band (`fonts.body` serif at `body.fontPx`/`body.weight`, seeded ±1° tilt); emphasis words get a DOUBLE curved ink underline (`palette.ulInk`, fat 7/0.3 wash + tight 2.6/0.95 core, dash-drawn at st+0.12/+0.15); band + the line under the gesture yield (`body.yield`) while the apex lands; the band exits with the last line on one final R→L wipe | fg | `brush-wipe` (the gesture at low amplitude: clipPath inset reveal L→R 0.16s power2.out with a blurred per-word brush-head shadow riding the reveal edge, then vanishing) | wet-cloth WIPE (the reveal in reverse: the line clipPath wipes R→L over 0.10–0.14s power2.in with an erase brush head riding it, at min(next line − 0.136, lastWord + `body.maxHold`); the LAST line and the band wipe together at DUR−0.142) |\n| `inkrail` | sumi ink on still water: up to THREE fixed reading rows at the bottom center (`body.bottomPx` = last-row center, `body.rowGap` apart; rows cycle in pairs, the closing line takes the third row — the final thought ACCUMULATES instead of replacing); `fonts.body` Mincho serif at `body.fontPx`/`body.weight`/`body.letterSpacing`, `palette.body` ink over a paper-white text-shadow halo (`palette.paper`/`paper2` glow stack — readable on bright skies) with a duplicate blurred dark halo per word; an ink-settling RULE (86%-width gradient hairline, scaleX 0→1 over 0.9s) draws beneath each line at firstWord+0.12; emphasis words shed a faint ink wisp curling off the word top (st+0.55, ±dir by line parity, skipped near clip end); the rows visible under the bloom yield (`body.yield` — dim at heroIn+`delay`, restore at heroIn+`post` only with runway before the exit) | fg | `bleed` (the apex bloom at low amplitude: opacity snaps in 2 frames; blur 12→0 + scale 1.25→1 power2.out carry the bleed — late words bleed faster so they resolve before clip end; the dark halo overshoots scale 1.5→1.04 while its opacity decays 0.5→0.25) | RE-DISSOLVE (blur 9 + scale 1.13 + fade + y−8 power1.in — ink dispersing back into the water) as the line-after-next approaches (= the next occupant of its row, outDur 0.5−0.05·i, never mid-read); the closing TWO lines persist to clip end |\n| `ransomrail` | kidnapper's collage rail: every transcript word is a cutout chip in one of 4 cycled recipes (cream/`fonts.body` Anton, black/`fonts.dark` Inter-800, newsprint/`fonts.news` Special Elite, accent/`fonts.accent` Permanent Marker — emphasis words snap to the accent chip, never two identical chips in a row) PASTED along the bottom rail line (`body.bottomPx`) with seeded crookedness (rot sign alternates with line+word parity, baseline dy leans the other way), seeded ±px sizes (`body.fontPx`−2..+1, emphasis +3) and torn edges (seeded 12-vertex tear polygon, same paper stock as the apex); chips carry a hard dy5 offset drop-shadow; lines breathe (5-key scale keyframes) through their hold; the whole railwrap yields (`body.yield`, container opacity — never contests per-chip channels) while the apex letters slam | fg | `paste` (the apex slam motif at low amplitude: opacity full in 1 frame at scale 1.12 / rot×1.5 / y−8 → power3.in crush 0.08s → 2-frame contact squash 1.05/0.95 → elastic settle; emphasis = 1-frame RE-PASTE lift at `body.emphDelay` — shadow grows to a flight blur, rotation flips sign for good, then crush + squash + elastic again, rip-runway-guarded) | RIPPED off one by one (rotation ±16/17° throw + y−30 + fade, power2.in, staggered 0.045s) with a 1-frame paper-tear flash under each chip — timed so the rip tail overlaps the next line's pastes a beat (collage chaos, by design); the last line tears off clamped to finish on frame |\n\nfg body uses the **rail.html alpha-webm channel** (true alpha — dark panels and\nscrims work; never the screen-blend index_fg path, which can only add light).\n\n## Hero setpieces (registry)\n\n| setpiece | what happens | notes |\n| ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `detonation` | charge-dim → sheared stencil slices crush in hot → SNAP into register → squash → elastic settle → paint cools to bone → bars/ticks/designation-tag deploy → shear-apart exit | pairs with fx flash/rings/sparks + plate punch/shake |\n| `decode` | slot-machine glyph reels (steps() ease, seek-safe) lock left→right with RGB jitter → lock snap → CRT power-off exit | pairs with `redact-until-hero` |\n| `drawon` | the word is WRITTEN stroke-by-stroke from a single-line font (Hershey) — per-stroke paths revealed sequentially at constant pen speed, nib rides `getPointAtLength`, hops at pen lifts; then hum + buzz dip | any word, zero tuning: `gen-stroke-path.py` lays out glyph pen-paths at compile time |\n| `cpslam` | acid-yellow stencil word slams in BEHIND the subject with REAL diagonal notch cuts (SVG mask = true transparency over footage), chromatic split that settles to a PERMANENT cyan/red registration error, seeded glitch ticks, katakana tag, glitch-out exit | bounded hold (~2.6s default, `params.hold` / `hero.exitAt` override) — a climax is an event, not wallpaper |\n| `assembly` | (inline, poem) apex word condenses BIG while star particles fly into it | |\n| `colorflip` | (inline, takeover) accent-color crush card + dim kick + squash/settle + loom | pairs with fx flash + plate punch/shake |\n| `flapboard` | split-flap departures board takeover: floodlight dim/scrim swing on, the housing clacks down (rotationX, squash, elastic) behind the subject, one giant flap tile per char flip-cycles 3–5 seeded wrong glyphs then LOCKS left→right across `params.lockWindow` (hot flash → cools to bone) under baked clack y-jitter; lock-complete = big clack + amber glow flicker + rule wipe + steps() status-ticker; hold = loom + one tile re-flutter; exit = tiles flip to blank cascade, housing flips away | pairs with `fx.crowdflash` (pops at lock start/end) and `plate.punchOffset = lockWindow` so the plate punch lands on the lock-complete clack, not the hero onset |\n| `ledwipe` | transit LED board takeover: cool scrim + dim charge, an amber dot-matrix panel EXPANDS upward (scaleY steps(6)) behind the subject, header tags + unlit LED ghost boot-flicker alive, then the word ILLUMINATES column-by-column (clipPath L→R, steps ≈ 1.4×chars over `params.wipeDur`) hot → cools to amber; contact = cell squash + elastic settle + PA \"ding\" double brightness pulse; an 8-phase chasing LED-marquee border runs to the exit; hold = glow breathe + seeded-look LED dropouts; exit = word pages up out of the window, panel collapses back down | pairs with `fx.paflash` (amber PA flash at wipe-complete contact). Panel geometry derives from fontPx (`panelH = 44 + 1.42×fontPx + 18`); `params.panelW` fixed, width-fit shrinks the type only. Plate: grain-only (no punch) is the demo register |\n| `vhsosd` | REC FREEZE camcorder slam: permanent lens vignette (`params.vignette`) + backlight-comp scrim (peak = `plate.charge`, cools to 0.69×) kill the bright sky; the word crushes in as a huge OSD readout — 3 horizontal clip-path tracking bands (`params.bandClips`) sheared (`params.bandShear`) + blurred (power4.in over `params.crush`) SNAP into register on the contact frame, squash → elastic settle; red/cyan misregistration copies cool from ±`misregIn` to ±`misreg` px and keep BREATHING through the hold under tape-weave y jitter (`params.weave`) + slow loom; auto-iris pump (white wash 0.20, dark dip = `plate.dim`); exit at `I + params.hold` = REWIND streak left + flat-white echo copy | pairs with the `vhsrail` paradigm, which emits the fg REC-FREEZE artifacts (tear band, head-switching bar, apex scrub lines, ● REC) at the same I/X times. Plate: grain-only (no punch) is the demo register; hold-life keyframes auto-clamp inside [contact, exit] |\n| `bossintro` | arcade BOSS INTRO: the room dims (gradient `plate.dim`) behind a CRT edge glow (cyan base wash that pulses on the last emphasis word before the boss and spills magenta on the strobe + the final word); `params.tag` (WARNING) blinks 2× above the word rect; ~COLS×ROWS (`params.rows`, cells 0.7×/0.5× fontPx) seeded pixel blocks fall steps(3) from above into a tight matrix grid covering the word rect, each landing with a 1-frame white tick; at `I + params.flashDelay` the word flashes ON (Press Start 2P, instant at opacity 1, scale 1.15 → steps(3) crush → 2-frame squash → elastic settle) with ±4px chromatic ghost layers + a 3-frame palette strobe (white→cyan→magenta→white); hold = quantized 1.6% breathe + CRT glow cycle + baked block shimmer blinks; exit at `I + params.hold` = per-letter checkerboard dissolve, blocks drop away steps(3) | pairs with the `hudrail` paradigm; emits fg furniture via setpiece fg parts: letterbox bars (`params.letterbox` px) slam in steps(3) with a 1-frame overshoot and retract after the exit, HI-SCORE odometer (accent label, yellow digits) rolls every 0.066s through the hold, 1-frame white tick out. `fx.coinflash` adds the 1-frame radial impact flash at the strike; plate punch anchors at `punchOffset` = `flashDelay` |\n| `rubberstamp` | the footage becomes an archive page (vignette charge = `plate.charge`, manila sepia wash `params.sepia`, dim kick = `plate.dim` that cools to 0.385×) and the verdict slams in BEHIND the subject as a bordered rubber stamp at `params.rotation`: a manila paper wash lights an instant before contact, the stamp crushes 2.2→1 power4.in over 0.115s, 2-frame contact squash, double-strike ghost print (`opacity 0.35`, offset +5/−4 rot 1.3), two thin-ink patches (`params.patches` clip-path circles in paper color), wet-ink saturate/brightness settle, paper indent shadow bloom; stamps don't move — the hold is DEAD STILL, sold by the breathing indent + a slow paper loom; exit at `C + params.hold` = mechanical 3-frame yank-down cut (the page is filed away), the archive plate releases 0.25s before | contact `C = heroIn + params.crush`; pairs with `fx.inkflecks` (seeded red spatter at C, ballistic with gravity) and `plate.punchOffset = params.crush` so the plate punch lands on the stamp contact; pairs with the `carbonstrip` paradigm (strip yield + shade breathe anchor at the same C); face chrome (border, radius, padding, ghost offset) scales with fontPx from the 120px demo cut |\n| `lasercage` | concert-blackout laser show: the plate dims to `plate.dim` at t=0 and deepens to `plate.charge` before the drop while haze cones breathe in the top corners; a 6-beam array (alternating accent/magenta, emitters along the top edge) snaps on at I−0.26 and SWEEPS to converge on the word center (staggered 0.022s), a hot core pops at convergence; the word IGNITES behind the subject as an additive glow stack (wide accent blur 0.22×fontPx + magenta fringe offset + tight soft blur + near-white core): scale 1.16 crush power4.in → 2-frame contact squash → elastic settle + 2 controlled strobe pops (brightness 2.05, 1s apart, runway-guarded); a criss-cross beam CAGE (6 lines derived from the word rect) draws itself dash-by-dash around the word and flickers; through the hold the array FANS OUT slowly to floor targets (the iconic concert fan) while the word looms; exit at `heroOut − 0.38` = cage un-draws, beams sweep away L→R (+0.74W) carrying the letters (per-letter streak + blur, stagger auto-clamped ≤ DUR), the room lifts back to 0.12 | word geometry is metric-exact via `assets/fonts/char-widths.json` (cage/spill/flash all derive from `halfW` + `fontPx`); pairs with `fx.laserflash` (accent contact flash at I+0.03, sized 2·halfW+80 × 4.8·fontPx) and the `laserrail` paradigm (same converge-ignite motif at low amplitude); plate punch anchors at `punchOffset` ≈ 0.07 (the ignite contact) |\n\n| `boltstrike` | THE STRIKE: a slate storm mood (`params.mood`) sits on the room from t=0 and the sky KISSES (1-frame 6% gradient brighten) on every body word — double-kiss on emphasis words, re-flashes at I+0.84/I+1.44 during the hold; the room charge-dims to `plate.charge` under a radial word scrim from I−0.39; a hand-authored branched bolt (5-seg zigzag + 2 branches, haze/glow/core SVG stack in `palette.accent`/`glow`/`core`) flashes 2 frames BEFORE the word — leader 1 → 0.35 → return stroke 1 at contact — with a sky flash; the word slams in (Anton scale 3.1 crush power4.in 0.105s, blur 14→0, brightness 3.2→2.5) → 2-frame contact squash → elastic settle, lit HARD for 2 frames then cools to 1; SIGNATURE: the word's text-shadow flips toward the bolt side for the flash frames; ozone under-glow (accent, blur 26×fontPx/145) blooms at contact and breathes (6-key opacity cycle) through the hold + slow loom + 2-frame lit blips on the sheet re-flashes; the dim releases at the flash, settles to a `plate.dim` storm hold and lifts before the exit; exit at `min(heroOut−0.2, I+params.hold)` = washes downward with the rain (y+38, blur 6) | bolt geometry is baked at compile time as offsets from the word center (halfW/360 × fontPx/145 units, `params.side` flips it); word rect is metric-exact via `assets/fonts/char-widths.json`; word scrim = 2·halfW+380 × 2.28·fontPx; pairs with `fx.strikeflash` (full-frame fg flash with the same leader/return flicker grammar) and the `stormrail` paradigm (rain doubles + shadow flip at the same I); plate punch anchors at `punchOffset` ≈ 0.02 (the return stroke) |\n| `holoboot` | full volumetric boot behind the subject: a desk emitter dot pops (back.out scale), the projection cone SNAPS wide (scaleX 0.07→1 expo, 0.11s, then dips 0.55→0.95), a seed beam fires up from the emitter (scaleY power3.in, fades after contact), and the word boots with a RISING clip sweep (opacity instant at I−0.055, the reveal is the wipe) into a 7-layer projection stack (dark backing shadow / wide `palette.glow` blur / magenta + cyan chromatic fringes / `palette.core` word / scanline mask / climbing interference bands, band pitch 0.39×fontPx); contact at I+0.07 = brightness 2.3 flash + scaleX 1.07 / scaleY 0.91 squash held 2 frames + elastic settle + 1-frame x interference jumps; fringes blow ±8px then settle to the permanent ±2px registration offset; hold = bands climb −6 pitches, rotationY oscillates [0,6,−7,5,0], glow/cone breathe, emitter dot pulses, slow 1.028 loom; at `I + params.passAt` (≥ I+1.25, runway-guarded) a hand \"passes through\" the projection (skew 6/−4/0 + blur + fringe blowout + scaleY ripple — pure projection logic); exit at `min(heroOut−0.22, DUR−0.3)` = projector cut: brightness 2.4 → collapse to a horizontal line (scaleY 0.018) → to the base dot (scaleX 0.015), cone fades, dot pops 2.2× and dies. A second smaller emitter cone (`params.coneW`) rises from the desk under the holorail plate ALL video with baked flicker cycles + dot pulses, and gets its own projector cut at DUR−0.2 | word rect is metric-exact via `assets/fonts/char-widths.json` (cone width 2·halfW+80, emitter at cy+2.4·fontPx, all rig geometry derives from `halfW` + `fontPx`; scene scrim is a radial centered on the hero's frame fractions); pairs with `fx.holoflash` (cyan fg lock flash at I+0.075, radial at the same hero fractions) and the `holorail` paradigm (same sweep-boot + interference-glitch motif at low amplitude; the body cone is aimed at ITS plate); plate: grain-only (no punch) is the demo register, scene reaction = `plate.scrim`/`charge`/`dim` |\n| `biobloom` | bioluminescent BLOOM behind the subject: the abyss grade (`params.mood`) + a breathing vignette (6-key opacity cycle sized to the clip) sit on the room from t=0 — the world is underwater before anything speaks; a creature pre-glow (1.083×/0.717× fontPx ellipse) gathers with a double-beat anticipation at I−0.31 and crushes to a point at I−0.115; a dark pocket scrim (`plate.scrim`, 2·halfW+280 × 2.5·fontPx) opens behind the word zone at I−0.03; the word CONDENSES in (scale 2.35 crush power4.in over `params.crush`, blur 15→2, brightness 2.6→1.7) → 2-frame contact squash (1.09/0.93) → elastic settle while cyan light SPILLS onto the scene (radial at the hero's frame fractions: snap 0.55 at contact → 0.2 → shimmer keyframes); 6 luminous tendrils (paired blurred SVG strokes — glow w9/blur5 + core w3/blur1.1, accent/violet/ice alternating) draw outward from the word rect staggered 0.05s (stagger auto-clamps so the last filament completes before the sink); hold = glow breathes 8–14% (4-key scale/opacity), glow-layer flicker, two counter-drifting caustic gradients shimmer over the text zone, the bloom drifts slowly with the current (`params.drift` on the x channel); exit at `min(heroOut−0.2, DUR−0.3)` = the light SINKS — tendrils (via their HTML wrapper, never gsap-y on inner SVG), caustics, pocket, spill and the word all drift down (+14/+26) while dimming, word blurs out | tendril geometry is hand-authored from the demo and baked at compile time as offsets from the word center (x scaled by halfW/demoHalf, y by fontPx/120, endpoints frame-clamped); word rect is metric-exact via `assets/fonts/char-widths.json` (0.01em tracking); pairs with `fx.sporeburst` (seeded spore puffs burst PAST the bloom at contact in the fg layer, ballistic with slight sink) and the `planktonrail` paradigm (same glow-on motif at low amplitude + mote attraction anchored at the same I); plate: pushIn+grain (no punch) is the demo register — the demo's postfx profile was `push` |\n| `silkribbon` | aurora silk WRITTEN into the night sky behind the subject: the hero word is a sequential Hershey-stroke reveal (one `<path>` per pen stroke at constant pen speed, `gen-stroke-path.py` baked at compile time — any word, zero tuning) in a blurred halo (`params.haloWidth`, feGaussianBlur 7) + tight core (`params.coreWidth`, white drop-shadow), BOTH stroked by ONE userSpaceOnUse rose→teal→violet linearGradient with reflect spread; SIGNATURE: the gradient's x1/x2 translate f(t) from I−0.07 to the clip end (shift 1.5× the gradient span) so the aurora colors FLOW THROUGH the drawn ribbon during the hold; a soft light mote (blurred halo + core dot) rides the pen, hops at lifts, and blooms out 2.4× at the final stroke; scene reaction = two huge aurora blobs (teal top-left / rose top-right, frame-fraction geometry) drift the sky f(t) from t=0 at `params.wash` and DEEPEN to `params.deepen` as the ribbon writes, a top scrim (`plate.scrim`, 0.653H) charges in at I−0.34 (sky washout guard), a light spill (`params.spill`) tints the sky at I+0.1 once the ribbon completes and flickers gently, and the halo breathes (5-key opacity cycle) through the hold; gentle — no shake, no contact squash: the apex verb is the writing itself; writing window = `params.window` clamped so the ribbon finishes + holds before ENDT = DUR−0.04 | canvas/gradient/spill all derive from `params.targetWidth` (demo: 880 ink on a 1010×280 canvas, baseline 200; svgW = tw+130, spill = (tw+60)×0.51, gradient span = 0.6364·tw), centered at the scene-aware HG (pref top 18, the sky band — same as drawon); pairs with `fx.silkmotes` (seeded aurora motes rise near the ribbon during the hold, fg layer, demo spread fractions keep the face gap) and the `sheenrail` paradigm (same flow motif at low amplitude); plate: pushIn+grain (no punch) is the demo register — the demo's postfx profile was `push` |\n| `scopetrace` | the scope's own trace LEAPS off the band and WRITES the hero word behind the subject: a surge column (3px, bottom-anchored scaleY pop, landing at the pen-start point parsed from the baked path) jumps from the scope band at I−0.12; the word is a sequential Hershey-stroke reveal (one `<path>` per pen lift at constant pen speed, `gen-stroke-path.py` baked at compile time — any word, zero tuning; punctuation stripped for the pen) drawn CORE-ONLY in a thin phosphor stroke (`params.coreWidth`, bright `palette.bright` + accent drop-shadows — it is a trace, not a tube), nib rides `getPointAtLength` and pops 2.4× at DRAWN; the phosphor FILL (blurred halo strokes, `params.haloWidth`, blur 7) flicker-arrives AFTER the write at FLICK = DRAWN+`params.flickGap` (pre-arm 2 frames early, 5-step 1/0.25/1/0.55/1 blink, core dips 0.55 for a frame); hold = glow hum (7 Hz + 11.3 Hz sine keyframes, f(t)) + 1.6% breathe on an HTML wrapper with transformOrigin at the hero's frame fractions, ending exactly at the collapse; exit = the word COLLAPSES to a flatline (wrapper scaleY 0.02, 0.14s power3.in, same origin) + a horizontal flash bar (2·halfW wide at the word center) that shrinks out — scheduled at nextSpokenWord − `params.clearGap` (clamped ≥ FLICK+0.45, ≤ heroOut) so the trace clears BEFORE the next line speaks; scene reaction = phosphor radial scrim (`plate.scrim` at the hero fractions, I−0.18 → EXIT+0.05) + green spill sized from targetWidth (`params.spill`); second beat: a 1-frame phosphor pulse answers the FINAL transcript word — the same death beat the scoperail finale owns | trace geometry derives from `params.targetWidth` (svgW = tw+140, local baseline 215, ink center ≈ baseline−28 — the demo registration; surge x parsed from the first `M` of the path); centered at the scene-aware HG (pref top 25, ink height 115); pairs with the `scoperail` paradigm (tracewipe = the same pen-write at low amplitude; the paradigm's hero waveform kicks fire at the same word onsets) and needs no front fx; plate: grain-only (no punch) is the demo register |\n| `papermat` | STOP-MOTION PAPERCUT behind the subject: a torn-edge kraft mat (two seeded torn polygon layers) DROPS from above with steps(2) gravity and slaps down (squash → rest, soft blob shadow); then one torn cream chip per char (`palette.paper`/`paper2`, hero-font ink `palette.ink`) drops with steps(3) gravity + 1-frame overshoot at `I + i·params.step`, each announced by an anticipation shadow 3 frames early, landing crooked (seeded ±3° ±4px), settling through three 12fps poses, then holding an 8fps wobble (baked set chain — the stop-motion heartbeat) while the whole tableau breathes 1.6% (camera-push loom); scene reaction = a warm vignette (`params.vig`) charging with the landing; on the FINAL word the table BUMPS (y4, 1 frame) and the chips SCATTER off down-right steps(4) staggered 0.045s, the mat swept off last (disperse-on-last-word, `hero.exitAt` overrides) | chip geometry derives from `hero.fontPx` (demo ratios: tile 0.91×/1.31× fontPx, pitch tile+14, mat N·pitch+80 × 1.846× fontPx), width-fit shrinks type and chips together; pairs with `fx.paperscraps` (paper scraps puff at each chip contact, fg) and the `paperrail` paradigm (same place verb at low amplitude); plate: grain only is the demo register |\n| `centerfold` | POP-UP BOOK CENTERFOLD behind the subject: blue + cream 12-point paper starbursts (deterministic starPts polygon, `palette.accent`/`cream` fills with kraft-edge strokes) unfold on a baseline hinge (scaleY 0.03→1 back.out(1.6), cream staggered +0.06) starting I−0.272 while a blob shadow grows beneath; the hero word pops up at I in `params.segs` hinged clip-path segments (rotationX 85→0 back.out(1.4) staggered `params.segStagger` — the body's popup verb at full amplitude); two kraft struts lean in at I+0.33; backdrop + word wobble-settle TOGETHER (one `#cfWob` wrapper owns rotationX, 6-key) then breathe through the hold (word 5-key rotationX + shadow scaleX, both auto-squeezed into the window); scene reaction = a dusk radial scrim at the hero's frame fractions (`params.scrim`, bright-sky insurance) charging with the unfold; exit = the whole spread folds FLAT (segments rotationX 88 staggered, struts/bursts scaleY collapse cream-then-blue, scrim out) at `max(I+segStagger·(segs−1)+0.45, min(heroOut−0.33, DUR−0.39))` — the book closes before the next sentence | burst geometry derives from the word rect (metric-exact via char-widths: burstR = clamp(1.83·fontPx, 0.59·wordW, 0.42·H), box 2R+180 × 2R+fontPx, demo props scale at burstR/220), width-fit shrinks the type first; pairs with `fx.confetti` (seeded ballistic paper confetti launched from the hinge line at I+0.128, fg) and the `popuprail` paradigm (same baseline-hinge verb at low amplitude); plate: grain only is the demo register |\n| `chalkwrite` | NIGHT LECTURE behind the subject: the lower chalk band grows into a FULL deep-green board (scaleY 0→1 power3.out from the bottom edge at I−0.3, the room dims `params.dim` + vignette `params.vig` with it); the hero word is HAND-WRITTEN in chalk — sequential Hershey stroke reveal (drawon pattern, `gen-stroke-path.py` baked at compile time), dry/rough via seeded ±1px jitter on every pen point (`params.jitterSeed`), a blurred halo (`params.haloWidth`, feGaussianBlur 3.2, group opacity `params.halo`) under a tight core (`params.coreWidth`), a chalk-stick nib (rotated rect) riding the pen — while `params.dustN` dust specks fall from the nib along the path; at write-complete a hand-slap CLAP shakes the board 1 frame (set-chain y 3/−2/1/0; the dust burst lives in the rail, in FRONT: `fx.chalkclap`), then TWO violent accelerating underlines slash beneath (seeded waviness, power3.in, the nib rides them, dust kicks at the ends), the chalk flicks away, and the halo breathes (baked 1.6/3.7 Hz f(t)) through the hold with two slow motes drifting off the letters | geometry registers on the MEASURED ink box (the stroke path is parsed at compile time; ink CENTER lands on scene-aware HG.y, pref top 44): the board rect (`params.boardGap`×inkH above the ink, bottom flush with the frame, width = the body strip), the underlines (inkL+14→inkR−4 at inkBot+30/+50) and the fg clap point (the pen's LAST contact point → HG.clapX/Y/T) all derive from it; x defaults to the board's LEFT margin + tw/2 — a hand writes from the left, never centered on the subject (`theme.hero.x` overrides); pairs with `fx.chalkclap` (12 seeded radial dust specks + a blurred puff at DRAWN, fg) and the `chalkrail` paradigm (same scribble verb at low amplitude); plate: grain only is the demo register; needs `python3` |\n| `spraytag` | STREET TAG behind the subject: the dusk wall dims (`params.dim`) + a radial scrim charges (`params.scrim`) at I−0.42 as the writer steps up; the can RATTLES at the pen-start point (6 seeded set-chain nib jitters, I−0.30→I−0.02), then the hero word is spray-written stroke by stroke — sequential Hershey dash reveal at constant pen speed (`gen-stroke-path.py` baked at compile time) — as a TRIPLE stack per stroke: fat dark under-stroke `palette.under` (`params.underWidth`, sky-contrast armor) + blurred overspray halo (`params.haloWidth`, feGaussianBlur 7, group opacity `params.haloOpacity`) + wet paint core (`params.coreWidth`, drop-shadow), the glowing nib (r9, `palette.nib`) riding each stroke; `params.osprayN` seeded overspray dots pop near the nib as it passes; nib throws off 2.6× at DRAWN; through the hold `params.drips` seeded DRIPS (paint→`dripMid`→`dripLo` gradient bars) grow from painted low points (x-separated >110px) and KEEP growing, the halo hums (7/11 Hz baked f(t)) and the whole tag looms 1.014; writing window = `params.window` (demo 0.58s) clamped so write + splat + drip fit before ENDT = DUR−0.04 | geometry registers on the MEASURED ink box (ink CENTER lands on scene-aware HG.y, pref top 26 — the sky band, crossing the subject silhouette is the point; tag centers on the hero anchor, `targetWidth` capped at W−140); the pen-finish point is baked onto HG.splatX/Y/T for the fg splat; pairs with `fx.paintsplat` (hot `em2` ring + paint ring + seeded ballistic droplets at DRAWN, fg, in FRONT of the subject) and the `markerrail` paradigm (same flick verb at low amplitude); plate: punch with `punchOffset` ≈ window+0.05 so the punch lands on the splat, not the hero onset; needs `python3` |\n| `brushwrite` | SUMI-E GESTURE behind the subject: a warm paper wash (`palette.wash`/`wash2` radial, `targetWidth`+380 × `params.washH`) charges at I−0.18 to `params.wash`, settling to `params.washSettle` through the hold; the brush SLAPS down at the first pen point — a start-SPLAT (irregular ink ellipse rotated −24° + 5 seeded satellite dots, scale 0.35→1 power3.out 0.12s; the fg fleck pass rides `fx.brushflecks`) — then the hero word is written in ONE sequential gesture (Hershey dash reveal at constant pen speed, `gen-stroke-path.py` baked at compile time) as a FOUR-layer stack per stroke: blurred bleed (`params.bleedWidth`, feGaussianBlur 6, group hidden until the hold) under fat/mid/core widths (`fatWidth` 0.25 / `midWidth` 0.6 / `coreWidth` 1.0 stroke-opacity = pressure-tapered wet brush), the round ink nib (r7.5, `palette.nib`) riding the pen and flicking off (+42,−30, scale 1.9) at DRAWN; ≤`params.spatterN` spatter droplets eject PERPENDICULAR at the sharpest-curvature points of the gesture (angle-delta > 0.55 rad, te-separated > 0.045s); through the hold the ink BLEEDS into the paper (bleed group fades to `params.bleed` over ≤1.7s) and the whole work breathes 0.6% (`params.breatheHz` baked f(t), svgOrigin = ink center); then the vermilion SEAL chop (`params.sealGlyph`, `palette.seal`/`sealMid`/`sealLo` radial face, `fonts.seal` glyph) stamps at DRAWN+`params.sealDelay` — power4.in crush 0.09s → 2-frame squash → elastic settle + 3 seeded red flecks — skipped entirely if the clip ends too soon; writing window = `params.window` (demo 0.45s) clamped so write + seal + bleed fit before ENDT = DUR−0.04 | geometry registers on the MEASURED ink box (ink CENTER lands on scene-aware HG.y, pref top 19 — the sky band, crossing the subject silhouette is the point; gesture centers on the hero anchor, `targetWidth` capped at W−240 — on scenes with a dark object near the pen start, set `theme.hero.x` so the slap-down lands clear, like the demo's 864); the pen-START point is baked onto HG.fleckX/Y/T for the fg flecks and the seal sits at (inkR−103, inkBot+72) clamped on frame (`params.sealDx/sealDy` override); pairs with `fx.brushflecks` (seeded upward ballistic ink flecks at the slap-down, fg, in FRONT of the subject) and the `brushrail` paradigm (same brush-wipe verb at low amplitude); plate: punch with `punchOffset` ≈ window+`sealDelay` so the punch lands on the seal CONTACT, not the hero onset; needs `python3` |\n| `ransomnote` | RANSOM NOTE slam behind the subject: one cutout chip per letter (4 recipes cycled, seeded ±13% sizes around `hero.fontPx`, alternating-sign rotations ±2–5°, misaligned baselines ±2–6px, seeded tear-polygon edges) slams in oversized (scale 1.5, rot×1.8, flight drop-shadow) at S_k = I + 0.01 + `params.step`·k, crushes power3.in over 0.085s, and on contact the shadow POPS tight (1-frame filter swap) → 2-frame squash 1.07/0.93 → elastic settle; when the LAST letter lands the whole word takes a collective 1-frame JOLT (y6 → power3.out) + a scene pulse (`params.pulse` full-frame dark blink); hold = slow 5-key loom (the crooked grid never straightens); exit = letters RIPPED off one by one (rot+±15–22° throw, y−34, fade, 1-frame tear flash under each) at ripT = min(lastWord − `params.ripLead`, DUR-clamped), ≥ jolt+0.45; scene reaction = collage scrim (`params.scrim` top-dark gradient) charges at I−0.07, out with the rip | width-fit measures each glyph IN ITS OWN recipe font (`assets/fonts/char-widths.json`) + 0.20em chip padding + 6px margins so the collage never overflows; chip chrome (shadows, space width) scales with fontPx from the 130px demo cut; the setpiece RECOMPUTES `plate.punchOffset` = 0.01 + step·(N−1) + crush from the real letter count so the plate punch always lands on the collective jolt, whatever the hero word length; pairs with the `ransomrail` paradigm (same paste verb + tear flashes at low amplitude, same recipe classes/seeded tear polygon emitted into both layers); no front fx — the flashes live inside the chips |\n| `inkbloom` | INK DROP IN STILL WATER behind the subject: paper-white radial washes charge the two text zones (`palette.wash` rail wash from t≈0.15, PERSISTS to clip end so the closing body lines keep their ground — it registers on the body row geometry `body.bottomPx`/`rowGap`; `palette.washApex` apex wash at I−0.077, out with the bloom) and a gentle vignette (`params.vig`) STILLS the world while the ink blooms; the drop (ink teardrop, `params.fall` 0.15s) appears above the word point at I−0.08, swells, falls power2.in with a scaleY stretch, squashes 1.7/0.35 on contact (2 frames) and merges into the BLOOM — 3 stacked blurred irregular ink ellipses (`palette.ink`, opacity snaps 0.82/0.62/0.5 then decays) scaling at different rates with counter-rotations (expo.out 1.15/1.35/1.5s) + 2 thin concentric ripple rings expanding 7.2×/9.6× on the water surface; the hero words RESOLVE out of the blob (opacity snaps, blur 16→0 + scale 1.12→1 power2.out) — the FIRST at contact+0.02, the following at their own spoken times (multi-word hero, per-word hand-off); through the hold the glyph edges BREATHE (baked 5-key blur keyframes per word, alternating 0.66/0.5s), the group looms 1.018 and two faint ink wisps curl off the word top (C+0.573/C+0.753, fit-guarded); exit: RE-DISSOLVE (blur 11 + scale 1.15 + fade, 0.52s power1.in) at XOUT = min(I+`params.maxHold`, next body line − `params.clearGap`, DUR−0.6) — the ink clears before the next thought needs the reader | geometry derives from the measured word rect (`assets/fonts/char-widths.json`; kx = halfW/demoHalf, ky = fontPx/132 scale the demo's blob/ring/wisp anchors; pref top 25 — the sky band, crossing the subject silhouette is the point); dark `palette.ink` + its paper washes carry the contrast on bright skies; pairs with the `inkrail` paradigm (same bleed verb at low amplitude); plate: quiet `pushIn`, no punch — the bloom is liquid, not percussive |\n\nInline setpieces (`hero.inline: true`) live inside the body paradigm — the hero\nword stays in `lines`. Embed setpieces own the word: leave it OUT of `lines`\n(rail↔climax hand-off), except `panel` + `redact-until-hero`, where the words\nappear in the log as `█████` until the decode locks.\n\nA setpiece may additionally return `fgCss/fgHtml/fgJs` — those parts are merged\ninto the fg alpha page (rail.html), for furniture that must ride ABOVE the matte\n(e.g. a verbatim chip that may never be occluded) while the setpiece scenery\nstays embedded behind the subject.\n\n## Linkages\n\n- `redact-until-hero` — panel log shows hero words as blocks; un-redacts at lock\n- `corrupt-on-last-word` — panel jitters + hue-shifts on the final word\n- `disperse-on-last-word` — every visible poem letter scatters back to dust\n- `field-is-the-apex` — (lastpage) the blurred future-field rack-focuses at the\n apex: every faint line was the apex word all along; the main instance holds,\n the rest re-blur and die\n\n## Hard rules inherited (do not relax)\n\n- determinism: paused GSAP on `window.__timelines[\"main\"]`, seeded PRNG only,\n set-chains / keyframes, no Math.random/Date.now/CSS-keyframes\n- 80 ms word sync (timings come from transcript.json via the strict matcher;\n any uncovered transcript word is a compile ERROR — verbatim completeness)\n- apex owns the frame: fg furniture must avoid the setpiece rect or yield\n (`body.yield`) during the hero window\n- plate punch/shake ALWAYS post-composite (`_postfx.sh`) so subject + text +\n plate move as one photographed frame (matte never desyncs)\n\n## SVG gotchas (paid for, do not rediscover)\n\n- dash patterns restart on EVERY subpath → sequential per-stroke paths, never\n one dashoffset across a multi-stroke word\n- round linecap renders a DOT at dashoffset=len → hide each stroke until its turn\n- inline-block trailing spaces collapse → word gaps via margin, not text spaces\n- SVG-font glyph y is UP → flip when converting (gen-stroke-path.py does)\n- NEVER gsap x/y/scale on raw SVG children: it runs `_parseTransform`/getBBox, and\n zero-area shapes (fan-kit slivers) trip GSAP's bbox hack → `appendChild` on a\n null docElement in injected-gsap contexts (preview-frames, renderer). Jitter\n SVG pieces via `attr:{transform:\"translate(...)\"}` only; scale/loom belongs on\n an HTML wrapper div. Nuance: a ROOT `<svg>` inside a div has null\n ownerSVGElement → GSAP classifies it as HTML (CSS transforms, no getBBox), so\n scale/skew on the svg root is safe — but copying that onto an inner `<g>`\n becomes the fatal class. attr transforms can't TWEEN — use frame-quantized\n step chains (identical on screen at 24fps)\n\n## Timeline ownership rules (audit-derived, do not relax)\n\n- ONE owner per (target, property) at any instant. A duration tween re-renders\n every tick until it ends — any set/tween on the same property inside that\n window gets visually overwritten a frame later (1-frame ghosts, flash-backs).\n Known shapes: yield dim vs line exit; yield restore vs powercut set-chain;\n per-word line-y bounces with word gaps < 0.22s. The rail emitter guards these\n (bounce ownership tracker, dim clamped ≥ line-in, restore only with ≥0.3s\n runway before exit — else the line exits dimmed, by design).\n- Inverted clamps: `Math.max(lo, Math.min(hi, x))` with lo > hi silently pins to\n lo. When a lockup is wider than the frame, CENTER it (x = W/2) instead of\n clamping — decorative bleed must be symmetric.\n- The overflow gate only measures elements with direct text nodes — SVG-painted\n setpieces (mask text + rects) are invisible to it. Do not read its \"ok\" as\n proof for svg lockups; judge those on the preview frames.\n\n## theme.json — full schema\n\n```json\n{ \"dna\": \"<themes/*.json name>\", // required\n \"lines\": [[\"word\",\"word\",...], ...], // required — verbatim transcript tokens, in order,\n // INCLUDING punctuation (\"size.\", \"noise.\")\n \"minors\": [\"word\", ...], // optional — theme's inline emphasis treatment\n \"hero\": { \"match\": \"word or phrase\", // required — exact transcript tokens (case-insensitive,\n // punctuation-stripped match); first occurrence wins\n \"text\": \"DISPLAY FORM\", // optional display override\n \"out\": 5.9, \"exitAt\": 3.3 }, // optional window overrides (seconds)\n \"width\": 1280, \"height\": 720, // optional, default 1280x720 (theme DNAs are tuned\n // for 16:9; vertical needs a DNA variant)\n \"fps\": 24, // optional — matte.fps is AUTHORITATIVE when present\n \"panelHeader\": \"...\" } // optional (panel paradigm)\n```\n\nScene awareness (inherited from the existing typography system): when\n`safe-zones.json` is present the compiler re-anchors the hero setpiece to the\nmeasured occlusion bands (`heroBands.profile`, 18–55% occlusion, closest to the\nsetpiece's preferred height) and `heroAnchor.centerXPct`, width-fits the hero\nfont to the actual word, and docks panel/poem furniture on\n`subject.clearerSide`. Explicit `theme.json` values > scene auto > DNA fallback.\n\nExpected (benign) log noise: `[Browser:REQUESTFAILED] GET source.mp4\nnet::ERR_ABORTED` during the fg-layer page load, reel-glyph overflow lint\nlines, and `media_missing_data_start` — all cosmetic; the render is good if\nrender-theme.sh exits 0 and prints the gates summary.\n\n## Authoring a project (this is ALL a user writes)\n\n`<project>/theme.json`:\n\n```json\n{\n \"dna\": \"ordnance\",\n \"lines\": [\n [\"The\", \"stars\", \"were\", \"only\", \"limited\"],\n [\"by\", \"the\", \"pixel\", \"size.\"],\n [\"It's\"],\n [\"what\", \"you\", \"can\", \"actually\"],\n [\"recover\", \"from\", \"the\", \"noise.\"]\n ],\n \"minors\": [\"stars\"],\n \"hero\": { \"match\": \"remarkable\" }\n}\n```\n\n- `lines` follow the transcript verbatim, in order (compile error otherwise);\n every transcript word must be covered by `lines` ∪ `hero.match` — the example\n above omits \"remarkable\" from `lines` precisely because `hero.match` covers it\n (it slots between `[\"It's\"]` and `[\"what\",...]`)\n- leave the hero word(s) out of `lines` for embed setpieces; keep them for\n inline setpieces and for panel+redact\n- `takeover`: each line is one CARD — group by beat (1–2 words), not subtitle\n length; `panel` scrolls automatically past ~5 lines (terminal scroll)\n- the ordnance \"charge\" is an edge vignette + rail yield (the center stays\n clean by design) — judge it at the frame corners, not the center\n- `minors`: words that get the theme's inline emphasis treatment\n- preview first: `node scripts/make-theme.cjs <project>` then\n `node scripts/preview-frames.cjs <project> <t1> <t2> ...` (Visual QA)\n- then: `bash scripts/render-theme.sh <project>` → **`final_fx.mp4`** (the\n deliverable; `final.mp4` is pre-plate-reaction)\n\nPrereqs identical to other modes — `prepare.sh` outputs: transcript.json,\nframes_fg/, matte.fps, safe-zones.json (scene awareness), source.mp4.\nframes_bg/ is only needed by preview-frames.cjs, not by the render.\n\n## Adding a theme DNA\n\nCopy a `themes/*.json`, change identity fields. You may ONLY combine existing\nparadigm/setpiece/linkage names — if the look you want needs a new mechanism,\nthat is a registry contribution (this file + make-theme.cjs), reviewed like an\nengine change. A DNA that needs per-word visual tuning to ship is rejected:\n**any input, zero hand-fixing** is the acceptance bar (the draw-on lesson).\n",
28
+ "embedded-captions": "---\nname: embedded-captions\ndescription: >\n Add captions or subtitles to an existing single-subject talking-head video without editing the\n footage. Use for plain verbatim captions, cinematic captions embedded behind the subject, VFX\n captions, “炸/特效/酷炫字幕,” or a named identity from the 36-style catalog. Route by visual\n identity, not by backend engine. The quiet `anchor` rail is the default; embed every word only\n when the user explicitly wants a fully cinematic treatment. The workflow runs locally end to end,\n including transcription and subject matting; split multi-shot footage before applying it.\n---\n\n**Plugin installs:** Before setup or freshness commands, follow [plugin execution rules](../hyperframes/references/plugin-installation.md) when this skill is inside a HyperFrames plugin. Standalone installs keep the update instructions below.\n\n> **First, keep this skill fresh — confirm with the user before running:** `npx hyperframes skills update embedded-captions`. A fast no-op when everything is current; otherwise it refreshes this skill plus the core domain skills it depends on before you rely on them.\n\n# Embedded Captions\n\n**One catalog, picked up front** ([CATALOG.md](CATALOG.md) — 36 identities; the engines behind it are backend detail). **Standard** (default) builds a clean verbatim **rail** (lower-third subtitle carrying most text) + an **embed** climax composited _into_ the scene behind the subject at the peak. **Cinematic** is pure embed — no rail, every caption composited behind the subject (hero typography, accumulation, occlusion as the effect). **Theme** is a complete themed constitution — body paradigm × hero setpiece × front fx × plate reaction, composed from registries ([themes/README.md](themes/README.md)): `ordnance` `terminal` `neonsign` `stardust` `stomp`. Most explainer / voiceover is **Standard**; **embed is the scarce, earned peak** — embedding every word is the common mistake; Theme is for VFX-grade asks (\"炸\", \"特效\", \"像 AE 做的\").\n\n---\n\n## Runtime prerequisites\n\nPlugin installs use the bundled, manifest-pinned CLI for matting, transcription,\nand rendering; no source checkout is required. The local preview and caption\nmeasurement helpers also need Sharp, Puppeteer (with its Chromium browser), and\nGSAP. Install these in the **caption project**, not inside the read-only plugin:\n\n```bash\nnpm install --prefix <project> --save-dev --save-exact sharp@0.35.3 puppeteer@25.8.0 gsap@3.15.0\n```\n\nKeep the project's lockfile. If these dependencies already exist, use its locked\nversions instead of overwriting them. Bash and FFmpeg/ffprobe must be on PATH.\nMatting and transcription may download their own models on first use.\n\nRendering waits for the CLI to exit successfully before compositing. The old\n`HF_TIMEOUT_S` shell watchdog is no longer used: a large partial file is not proof\nthat rendering finished. An explicit built-checkout argument or `HYPERFRAMES_ROOT`\nselects the contributor CLI instead of the plugin pin. Cancel a stalled render normally through the CLI/terminal;\nthe caption helper does not force-kill or recover a render from a process snapshot.\n\n## Operational flow (TL;DR)\n\nRouted through `/hyperframes`, the intent layer confirms only the input (which clip) and **announces** the identity pick as a deferred ask — the shortlist needs the probed clip, so it stays at step 1 below; the layer's run-shape questions don't apply (the footage is untouched, there is no storyboard to review). A `BRIEF.md`, when present, carries the confirmed input and any user notes — read it first.\n\nThe craft prose below is long; the **pipeline itself is short** — and everything deterministic is computed or compiled, never hand-written:\n\n1. **Decision gate** (refuse bad clips) → **pick ONE identity from [CATALOG.md](CATALOG.md)** (36 identities; engine/compiler derived by lookup — never surface a mode/category question)\n2. `hyperframes init` (skip it if the project dir already exists with the video inside — `matte.cjs`/`transcribe.cjs` adopt any video in the dir as source.mp4) → **`bash scripts/prepare.sh <project>`** (matte ∥ transcribe ∥ audio-envelope in parallel, then safe-zones v2 with scene palette/optics/lighting — one command, nothing forgotten)\n3. **author a small JSON of creative choices** (read `safe-zones.json` first): Cinematic → `cinematic.json` → `make-cinematic.cjs` (derives `plan.json` and compiles it); Theme → `theme.json` → `make-theme.cjs` (rail/panel/poem/takeover/stack paradigms; `anchor` is the quiet rail default, `lesson` the multi-shot stack)\n4. **Visual QA**: `node scripts/preview-frames.cjs <project>` → faithful composite previews in ~2s/frame (no render). Check § Visual QA before paying for a render.\n5. `render-and-composite.sh` → gates (timing / occlusion+hero / overflow / hand-off) → `final.mp4`\n\nLoad-bearing rules people miss:\n\n- **rail (default) + embed (promotion).** `drop` (filler, not shown) / `rail` (verbatim lower-third subtitle, in front, carries most text) / `embed` (a peak word composited behind the subject). **Standard mode does both**, embedding only the peak(s). See **§ Caption model**.\n- **The video is delivered UNTOUCHED (Standard/Cinematic; **Theme mode's PLATE budget is the one sanctioned exception** — register-gated reaction beats (charge-dim, punch, shake, grain) defined per theme DNA and applied AFTER the matte composite so subject+text+plate move as one frame)** — captions are the only thing added; the matte just lets the subject occlude the embed track. Never grade/recolor/scanline the footage.\n- Two rulebooks: **rail → [references/rail.md](references/rail.md)** (thin), **embed craft → [references/composition-craft.md](references/composition-craft.md)** (rich, embed-only). Skim by need.\n\n---\n\n## Caption model — rail + embed\n\nEvery spoken phrase is one of three things:\n\n| | What | How it's shown |\n| --------- | ------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| **drop** | filler — um/uh, stutters, self-corrections | not shown |\n| **rail** | the default — ordinary spoken content (verbatim) | clean lower-third subtitle, **in front**, readable. A punch word can get an inline `emphasis` highlight (accent colour / active-word pop) — it stays on the rail. |\n| **embed** | a promoted peak — the headline beat | one big word composited **behind the subject** (matte occlusion), designed entrance + exit |\n\n**The rail carries most of the text; embed is the scarce, earned peak.** Scarcity is **per beat/block, not per clip**: ≤1 hero per block (thought), never two co-visible, ≥ a beat of air between hero windows (the compiler warns under 0.6s). A short clip → usually 1–2; a long explainer → ~one per section. Among multiple heroes, the **largest authored one is the APEX** (it alone gets the full lockup embed + width-fit raise); smaller ones are **MINOR peaks** that ride their column as oversized emphasis lines (fg, damped motion) — not every beat needs the matte showcase, which is exactly what keeps the apex an event. Embedding every word is still the common mistake.\n\nRail-surface identities build exactly this (rail = `rail.html`, embed = the climax in `index.html`). Column-flow identities drop the rail and make everything embed-style — recommend them only for mood-over-verbatim asks, never for explainer / voiceover where the words must read (CATALOG.md encodes this per identity).\n\n---\n\n## Step 0 — pick ONE identity from the CATALOG\n\n**One front-end, three engines behind.** The user picks an IDENTITY from [CATALOG.md](CATALOG.md) (36 entries: 10 classic + 26 themed); the engine, compiler and authoring file are derived by lookup from the catalog row. **Never surface \"Standard vs Cinematic vs Theme\" as a question** — those are backend names (a product has one UX even with several engines). The catalog encodes everything routing needs: reading surface, voice, recommend-for, scene needs, adjacency notes for the genuinely-close pairs (loud↔ordnance, neon↔neonsign, cream↔stardust).\n\nThe identity pick is a **preference gate** (`../hyperframes/references/brief-contract.md` § 1): in autonomous mode (\"surprise me\" / \"decide for me\"), pick from your shortlist yourself and state the one-line why instead of asking.\n\nProcedure: probe the clip → shortlist 2–3 identities from the catalog → recommend ONE with a one-line why → **the user picks** (autonomous mode: you pick, stating the why) → author that identity's file. Identities are engine-locked (no cross combos; opening one is a validation event — see dna/README.md).\n\n**Always present your recommendation and let the user pick before you author.** Don't silently default.\n\n(The full identity table lives in [CATALOG.md](CATALOG.md) — single source of truth for routing. The engine docs below describe each backend's authoring contract.)\n\n**CATALOG.md is the whole answer space here: this workflow does not search the HyperFrames component registry.** The composition workflows run `npx hyperframes catalog` before authoring a named look; this one must not. Its engines are locked compilers that consume `cinematic.json` / `theme.json` and emit the composition themselves, so a registry item — the `caption-*` blocks included — has nothing to mount into. A registry block styles text on a designed canvas; this skill burns captions into somebody's footage through a matte. When no identity fits the ask, say so and pick the nearest, rather than reaching outside the catalog.\n\n**Recommendation heuristic**: use the \"Shortlisting heuristics\" in [CATALOG.md](CATALOG.md) — they are identity-level (e.g. \"炸\" shortlists ordnance/stomp/terminal/loud and picks by WHAT should explode), never category-level. Unsure → `anchor`.\n\n- **Cinematic** → write `cinematic.json` for a locked template, compiled by `make-cinematic.cjs`.\n- **Theme** → read [themes/README.md](themes/README.md), author `theme.json`, run `scripts/render-theme.sh` (compiles + renders + plate reaction → **final_fx.mp4**).\n\n---\n\n## Decision gate — RUN FIRST\n\nProbe the video and classify the scene before either mode.\n\n```bash\nffprobe <video.mp4> # specs\nffmpeg -ss <t> -i <video.mp4> -vframes 1 sample.png # at 20/50/80%\n```\n\nRead the samples. Refuse if:\n\n- Multiple speakers / hard cuts (split & render each shot, or refuse) — except the `lesson` identity, which is built for a cut-together edit: it detects the cuts and places every caption per shot\n- No human subject (this skill is for talking-head)\n- Under 3 seconds, **no speech**, or face never clearly visible — `transcribe.cjs` warns when audio is near-silent (Whisper hallucinates words like \"Thank you.\" over silence); **heed it and refuse** rather than caption fabricated words\n- **Source already has burned-in captions / subtitles / heavy text graphics** — adding a second caption system conflicts and the footage ships untouched (no covering/inpainting). Burned text often appears only mid-clip: sample a **1fps contact sheet** (`ffmpeg -i in.mp4 -vf \"fps=1,scale=160:-1,tile=10x5\" sheet.png`), don't trust 3 spot frames.\n- **Transcript is garbage** — non-native/heavy-accent speech can transcribe into confident gibberish. Sanity-read `transcript.json` before authoring; if it doesn't parse as language, try `WHISPER_MODEL=medium` once, else refuse (a verbatim rail of fabricated words is worse than no captions).\n- Busy handheld with fast motion (matte flickers)\n\n### Pre-flight probes (cost nothing, prevent the worst failures)\n\n1. **Shot-cut probe.** Sample frames at 20%, 50%, 80%. If a different subject/scene appears, **trim the clip** before the cut.\n2. **Letterbox / pillarbox probe.** Black bars on the first frame? Compute safe content rect and constrain caption placement inside it.\n3. **Luminance probe.** Sample the caption region's average luminance — `under 60` → light text reads as-is, `60-180` → add the glyph scrim, `180+` → opaque text + scrim (never bare light text). **Cinematic templates are cream+`screen` and LOCKED** — use this probe to _pick a fitting identity_ (bright scenes → `ink`, or the opaque-rail `anchor` theme), never to recolour one.\n4. **Identity recommendation by tone (you recommend; the user picks — see Step 0 + CATALOG.md).** explainer / interview / must-read words → rail/panel-surface identities; poetic / social / \"cinematic\" → column-flow identities by register; \"炸 / 特效 / VFX\" / named worlds → themed identities. When unsure → `anchor` (words read, scene safe) — but present a shortlist and let the user choose.\n\n---\n\n## Pipeline — 5 steps\n\n```\n1. hyperframes init <project> --non-interactive --video <video.mp4> --skill=embedded-captions\n2. bash scripts/prepare.sh <project> # matte ∥ transcribe (parallel) → safe-zones. One command.\n # → frames_fg/ transcript.json safe-zones.json\n3. [AGENT STEP — the only creative step] author a small JSON; see below by mode\n Cinematic: author cinematic.json → node scripts/make-cinematic.cjs <project>\n Theme: author theme.json → bash scripts/render-theme.sh <project> (compiles + renders + plate fx)\n4. node scripts/preview-frames.cjs <project> # ~2s/frame composite previews → § Visual QA (BEFORE the render)\n5. bash scripts/render-and-composite.sh <project> # gates → final.mp4 + history/ snapshot\n (Theme mode: SKIP steps 3b/5 — render-theme.sh already runs compile + render-and-composite\n + _postfx.sh; the deliverable is final_fx.mp4, final.mp4 is pre-plate-reaction)\n```\n\nStep 1's `init` checks the installed skills against the latest on GitHub and updates the global set if any are out of date.\n\nStep 3 differs by mode:\n\n### Step 3 — Cinematic mode (pure embed)\n\n1. **Read `safe-zones.json` first.** Narration planes go in **`zones.hugLeft`/`hugRight`** — clean strips ABUTTING the silhouette (text far from the body reads as floating, not embedded; far corners are the fallback, not the default). The hero defaults to `heroAnchor`/`heroBands.best` (centered ON the subject, ~30–55% occluded). `recommendation:\"fg\"` moves NARRATION in front for legibility; **the hero stays embedded whenever `heroBands.feasible`** — hero-fg is the last resort.\n2. **The DNA is the identity you picked in Step 0** (CATALOG.md) — do not re-open the choice here. Sanity-check it against the scene (bright hero band luma > 150 wants `ink`; full pick guidance lives in the catalog, covering all ten incl. neon / glitch / chrome / velocity). State your pick + why; the user decides. The DNA locks type/palette/blend/motion + hero three-act; safe-zones v2 (`palette`/`optics`/`lighting`) parameterizes it to THIS scene automatically.\n3. **Author `<project>/cinematic.json`** — `\"dna\": \"<name>\"` + thought-BLOCKS, not raw groups: each block = lines of words (grouped 2–5 at clause boundaries) + the plane it stacks in + per-line `css` (size/weight/style only — no positions) + at most ONE line marked `\"hero\": true` (the promoted word; `\"text\"` for display form). Schema: `scripts/make-cinematic.cjs` header.\n4. **Compile**: `node scripts/make-cinematic.cjs <project>` — lowers blocks → plan.json → index.html. Generated for you: transcript-sequenced timings, accumulate-within-block, page-flip-between-blocks, **the hero LOCKUP** (a hero block's pre-context, HERO and post-context stack as ONE bonded composition centered on the subject — reading order top→bottom = spoken order by construction; context floats in FRONT while the hero embeds BEHIND = the depth sandwich; a mass rule keeps the hero dominating its context), apex/minor hero split, **reading order by construction**, fg fallback per safe-zones. Then the gates run as usual. _(Hand-authoring plan.json directly remains possible for designs blocks can't express — then run `fill-timings.cjs` + `fit-fonts.cjs` + `make-composition.cjs` yourself.)_\n\n### Step 3 — Theme mode (themed constitution)\n\n**Read [themes/README.md](themes/README.md) FIRST** — paradigm/setpiece registries, linkages, hard rules, and the exact `theme.json` schema.\n\n1. **Pick a theme DNA** by content register (each `themes/<name>.json` has `voice` + `when`). State your pick + why; the user decides.\n2. **Author `<project>/theme.json`** — `dna`, `lines` (verbatim, transcript order; 1–5 words each — for `takeover` each line is one CARD), `minors` (emphasis words), `hero:{match}` (the climax word/phrase; leave it OUT of `lines` for embed setpieces, keep it IN for inline setpieces and panel+redact).\n3. **Render**: `bash scripts/render-theme.sh <project>` — compiles (verbatim-completeness gate at compile time), renders both layers, composites, applies the plate reaction → `final_fx.mp4`. Use `preview-frames.cjs` between compile and render for Visual QA.\n\n---\n\n## Visual QA — preview BEFORE you render\n\n`node scripts/preview-frames.cjs <project> [t…]` composites **faithful preview frames in ~2s each** (caption layers screenshotted at seek-time + real video frame + matte occlusion + rail overlay = what the final composite will look like at that moment). Default samples = each group/climax window. A full render costs minutes — never use it to _discover_ layout problems.\n\nCheck the previews (`<project>/preview/sheet.png`) against this list — these are the failures the geometric gates **cannot** catch:\n\n1. **Washout** — light text over a bright region (window/sign/sky): unreadable → move the plane or change DNA/mode (bright scene → `ink`).\n2. **Text-on-text** — captions over the scene's own text/graphics, or two caption groups colliding.\n3. **Reading order** — on-screen vertical order must match spoken order; the hero must not sit below later words.\n4. **Hero presence** — the climax should be BIG and visibly behind the subject (~30–55% occluded), not a floating label in a margin.\n5. **Balance** — one coherent column/band, not scattered fragments; margins breathing; nothing clipped.\n\nThen the **5 positive checks** in [references/reference-bar.md](references/reference-bar.md) (poster test · timid test · one-glance hierarchy · scene handshake · dead-air audit) — the failure list keeps a render from being broken; the positive list is what makes it _designed_. Ship when both pass.\n\n**Fresh-eyes review (recommended for anything user-facing):** you have confirmation bias about your own layout. If you can spawn a subagent, give it ONLY the preview sheet + this checklist and ask for PASS/FIX verdicts per frame (\"review these caption previews against the 5-point checklist; answer PASS or the specific fix per frame\"). Apply fixes in cinematic.json / theme.json, recompile, re-preview — each loop costs seconds. Render once, when the previews pass.\n\n---\n\n## The DNA registry — ten visual languages (replaces the template catalog)\n\nBoth modes draw from **[dna/](dna/README.md)** — ten art-directed visual languages that **parameterize per scene** (accent sampled from the footage, contact shadow along the measured light direction, depth-match blur, RMS-coupled hero amplitude):\n\n| DNA | Register | Scene fit | Voice |\n| --------------- | -------------- | ----------------------------------------------- | -------------------------------------------------------------------------------------------------- |\n| **cream** | premium-warm | dark/mid warm scenes | Inter + warm cream + screen; glowing emergence hero (successor of cinematic-cream) |\n| **ink** | premium | **bright scenes (luma > 150)** | near-black multiply — type printed ON the wall; the bright-scene answer |\n| **editorial** | editorial-luxe | introspective / fashion / poetic | Bodoni Moda, lowercase-italic hero — magazine elegance |\n| **keynote** | tech-premium | product / launch | opaque white Inter 800, dead-center stillness |\n| **documentary** | formal | interview / serious | burn-in reveals, no hero — gravitas IS the style |\n| **loud** | loud | hype / sport / social | Anton + scene-sampled accent, single-unit slam + ripple; body ANNOUNCES in front (`bodyLayer: fg`) |\n| **neon** | loud-neon | neon-noir / nightlife / tech-noir (dark scenes) | electric-cyan signage, ignition flicker, the hero powers ON like a sign |\n| **glitch** | loud-neon | digital / hacker / AI | RGB-split echoes snap together on landing; machine-percussive timing |\n| **chrome** | loud-luxe | Y2K / fashion-tech / music | liquid-metal gradient hero + one sheen sweep during the hold |\n| **velocity** | loud-sport | sport / auto / fitness | every word arrives along its motion vector (streak+skew), hero passes with speed trails |\n\nPick by `safe-zones.json` (`heroAnchor.bandLuma`, `palette.temperature`) × content register — [dna/README.md](dna/README.md) has the decision rule. Authoring: `cinematic.json` takes `\"dna\": \"<name>\"`.\n\nThe engine generates the **hero three-act** from the DNA (no authoring needed): co-visible captions dim (setup) → per-letter entrance with amplitude ∝ spoken loudness (impact) → breathe + glow until exit (afterglow).\n\n(Legacy: `plan.template:\"cinematic-cream\"` maps to `dna:\"cream\"` automatically. The retired 54-template library is archived outside this repo and is not distributed with the skill; `_motion.md` remains in-skill as the motion-verb reference catalog.)\n\n---\n\n## Aesthetic decision — tone × shot × platform (input to the catalog shortlist, NOT a second router)\n\nClassify the clip on 3 axes and feed the result into CATALOG.md's shortlisting — this section never picks a mode/engine by itself:\n\n**Tone** (what feel does the content have?)\n\n- documentary | conversational | energetic | poetic | keynote | investigative | music-video\n\n**Shot** (what's the framing?)\n\n- close-up (head + shoulders) | mid-shot (torso+) | wide (full body+) | cut-montage (mixed shots)\n\n**Platform** (where will it play?)\n\n- 9:16 portrait (TikTok/IG/Shorts) | 16:9 landscape (YouTube/web) | 1:1 square | broadcast export\n\nCross-reference in [references/direction-catalog.md § Classification matrix](references/direction-catalog.md) for direction language — then return to [CATALOG.md](CATALOG.md) to shortlist identities (this matrix informs the shortlist; the catalog is the only routing surface).\n\n## Composition craft (embed track) — read before embedding\n\nThe full **embed-track** playbook lives in **[references/composition-craft.md](references/composition-craft.md)**: transcript role-annotation, phrase grouping, planes & clean-zone anchoring, zone coherence, climax pop & readability, edge-breathing, the occlusion 3-step judgement, and accumulation/persistence. It governs how a _promoted_ phrase sits INTO the scene — read it before authoring any embed (Cinematic `cinematic.json` or Standard `index.html`). The default **rail** track has its own, much simpler spec → **[references/rail.md](references/rail.md)**.\n\n---\n\n## Shared knowledge\n\n| Doc | What |\n| ------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------- |\n| [references/rail.md](references/rail.md) | **The rail track** — standard lower-third subtitle spec (the default; carries most text). |\n| [references/composition-craft.md](references/composition-craft.md) | **The embed-track playbook** — grouping, planes, climax pop, occlusion judgement, accumulation/persistence. Read before embedding. |\n| [dna/README.md](dna/README.md) | **The DNA registry** — ten scene-parameterized visual languages; how to pick. |\n| [references/reference-bar.md](references/reference-bar.md) | **The taste bar** — per-register world-class references + the 5 positive checks. |\n| [references/aesthetic-principles.md](references/aesthetic-principles.md) | **The 18 rules.** Beat Veed AI on taste. Read first. |\n| [references/motion-vocabulary.md](references/motion-vocabulary.md) | 10 named motion primitives + tone→timing lookup |\n| [references/direction-catalog.md](references/direction-catalog.md) | 10 ship-ready aesthetics + tone×shot×platform matrix |\n| [references/anti-patterns.md](references/anti-patterns.md) | Bugs already locked out (CoreML, letter-spacing reflow, etc.) |\n| [references/scene-types.md](references/scene-types.md) | When a wall surface is usable (4 conditions) |\n| [references/layout-heuristics.md](references/layout-heuristics.md) | Plane positioning, clean-zone selection, crown 3 conditions, pillarbox math |\n| [references/typography-presets.md](references/typography-presets.md) | Font-size × column-width matrix (starting points) |\n| [references/caption-grouping.md](references/caption-grouping.md) | Word → group rules (pauses, sentence boundaries) |\n| [references/failure-modes.md](references/failure-modes.md) | Long tail of dev gotchas |\n| [references/bespoke-vs-presets.md](references/bespoke-vs-presets.md) | Why presets fail sometimes; clone-and-tweak pattern |\n\n**Read the aesthetic principles and direction catalog FIRST.** Everything else is implementation detail.\n\n---\n\n## Non-negotiables\n\n- **Face must never be 100%-covered continuously** — every 0.3s window, face bbox ≥30% uncovered.\n- **WCAG contrast** — final render lints; fix palette if it fails.\n- **Deterministic** — no `Math.random()`, no `Date.now()`, no `repeat:-1`.\n- **Never grade/recolor the video.** The footage ships untouched — captions are the only addition. No full-frame scanlines / duotone / darken / vignette over the a-roll. neon-noir/CRT texture belongs _inside_ a caption element, not over the whole frame.\n- **Rail-first for talking-head / explainer.** Don't embed the whole transcript — most text is the rail; embed only peaks. Embedding everything is the default mistake.\n- **Embed is scarce + spaced.** ≤1 embed per sentence/beat, never two adjacent or co-visible, ≥ a beat apart, at most one `apex`. climax = per-beat peak, **not** \"the single payoff of the entire clip.\"\n- **Matte = the PERSON (hyperframes `remove-background`, u2net_human_seg, Apache-2.0).** Human segmentation by intent, but not surgically: thin offset furniture (mic boom arms) is usually excluded — captions render over it, behind the person — while large salient objects NEAR the subject (a telescope, a desk rig) can still leak into the matte and occlude captions. Objects HELD by the subject (products, phones) may drop out intermittently, letting captions pass in front. NEVER assume: sample `frames_fg/` at 2-3 timestamps before placing the hero, and prefer hero positions clear of any leaked furniture (`heroAnchor` can be skewed by leaks — cross-check against frames_bg).\n- **safe-zones is PROP-BLIND — eyeball every band you use.** Zones/heroBands score _subject_ occlusion + luma only: a mic, telescope, or screen sitting inside a \"clean\" zone is invisible to them (and a prop leaking INTO the matte skews `heroAnchor.centerXPct` off the person). Before authoring, extract ONE frame of each band you intend to use; if a prop lives there, measure its bbox and move/shrink the plane. Two real cases shipped clean only because the agent did exactly this. (Auto prop-saliency is a known gap; zones' `peakLuma` only catches _moving_ bright objects.)\n- **Captions stay on-frame.** Cinematic mode hard-gates frame-overflow; Standard mode runs `check-overflow.cjs` as a WARNING (intentional bleed is the only exception — read the warning).\n- **Each caption ≥ 0.5s on screen** — shorter = unreadable.\n- **Word timings must match transcript.json within 80ms** — a caption firing 500ms off-beat destroys the scene illusion. Cinematic runs `check-timing.cjs --strict` before rendering (via render-and-composite.sh); THEME mode enforces the same timings at compile time instead (make-theme's sequential transcript matcher + verbatim completeness gate — drift is a compile error). Never pack multiple transcript words into one entry (e.g. `\"FUTURE OF\"` or an `IT` + line-break + `ALL` stack with one start/end) — the second word inherits the first's timestamp and fires early. Split them into separate word entries with their own timings, even if you want them on the same visual line (use CSS `white-space` / natural wrap instead of `<br>`). Creative substitutions where caption text ≠ transcript (e.g. `\"15%\"` replacing `\"fifteen percent\"`) are supported — register them in `CREATIVE_SUBS` inside `check-timing.cjs`.\n- **Group windows must envelop their words** — `group.in ≤ min(word.start)` and `group.out ≥ max(word.end)` for every group. If `group.in` is later than a word's start, the word is silently delayed until the container mounts (we've shipped 800ms lag bugs from this). The validator enforces this.\n- **No two caption groups may overlap in both time AND screen region** — overlapping-in-time captions create text-on-text pileups. Options: (a) **spatial separation** — place each group in a non-overlapping vertical band so they can coexist (memory-wall cascade style); (b) **handoff** — set the earlier group's `out` ≤ the next group's `in` so only one is on screen; (c) **deliberate layered typography** — add `\"allow_overlap\": true` on one of the groups to silence the validator. The validator estimates each group's vertical bbox from its CSS and flags collisions. Pick (a) by default — it's what makes cinematic-cream feel like a poem accumulating, not a subtitle track replacing itself.\n- **Screen-blend fails on bright backgrounds (>180 luminance).** **Cinematic** templates are cream + `screen` and that DNA is **locked** (the plan can't recolour them) → on a bright backdrop they wash out, so pick `ink` (letterpress built FOR bright surfaces) or the `anchor` theme (opaque rail surface) rather than overriding a look.\n- **Don't animate `letter-spacing` or `filter:blur` on word entrance** — inline-block reflow causes line-jumps.\n- **CoreML banned for matting** — the onnxruntime CoreML EP's mixed-precision partitioning corrupted face alpha (observed with the previous RVM engine; don't re-try it). Matting is CPU-only (~2 fps @1080p ≈ 2-3 min per 10s clip; budget for it on long clips).\n\n---\n\n## Dependencies\n\n- **HyperFrames CLI:** plugin installs use the bundled manifest-pinned launcher. Source contributors can use a built checkout (`packages/cli/dist/cli.js`) via `HYPERFRAMES_ROOT`, the skill’s source tree, or `~/Downloads/hyperframes`.\n- **Node-first; two Python touchpoints via `uvx` (no manual installs):** transcription runs WhisperX through `uvx` (word-level timings; falls back to an existing word-level `transcript.json`), and Theme's `drawon` setpiece shells `python3 scripts/gen-stroke-path.py` at compile time. Everything else runs on the toolchain hyperframes already ships: matting via the hyperframes CLI's **`remove-background`** (u2net_human_seg; weights auto-download once, ~168 MB, to `~/.cache/hyperframes/`), image/alpha math via **`sharp`**, layout/occlusion/overflow via **`puppeteer`**, plus **`ffmpeg`**. Install Sharp, Puppeteer, and GSAP in the caption project as described in **Runtime prerequisites** above. The helpers check that project first and retain checkout dependency lookup for source contributors.\n- **Transcription = WhisperX via `uvx`** (word-level timings + alignment; no manual install — `transcribe.cjs` drives `uvx whisperx`). Falls back to an existing word-level `transcript.json` if present.\n- **Source video** — `matte.cjs` / `transcribe.cjs` auto-resolve `source.mp4` (or glob the clip / read `hyperframes.json`), so `hyperframes init --video X.mp4` needs no manual rename.\n- **fps** — `matte.cjs` extracts at the source's native rate and records `matte.fps`; `render-and-composite.sh` uses that so the matte stays frame-aligned.\n- Matting weights are NOT bundled: `matte.cjs` shells the hyperframes CLI's `remove-background`, which downloads u2net_human_seg (~168 MB, Apache-2.0) once to `~/.cache/hyperframes/background-removal/models/`. First prepare on a fresh machine needs network for that one download.\n\nIf a hard dependency is missing, STOP and ask the user — don't silently skip steps.\n",
29
+ "embedded-captions/themes/README.md": "# THEME mode — composed visual constitutions\n\nTheme mode is the third compiler (`scripts/make-theme.cjs`), beside Standard and\nCinematic. It exists because \"mode\" was a bundle of orthogonal axes pretending\nto be one switch. A theme DNA composes its identity from registries implemented\nONCE in the compiler — **paradigms are the unit of code; DNAs are the unit of\nidentity**. A new look is a JSON file; only a genuinely new paradigm/setpiece\n(rare) touches the compiler.\n\n```\ntheme DNA = body PARADIGM how the transcript surface lives\n × body LAYER fg-alpha (rail.html channel) | bg-embed\n × hero SETPIECE the climax choreography\n × front FX flash / rings / sparks / scanband / crowdflash / paflash (fg, over subject)\n × PLATE budget charge-dim (in-page) + punch/shake/grain (_postfx.sh)\n × LINKAGES declarative theme interactions\n```\n\nStandard and Cinematic were, in retrospect, two fixed points of this space.\nStandard is now RETIRED (2026-06-12): its rail×embed-climax point is served by\nthe `anchor` theme (rail paradigm × settle setpiece — the quiet default).\nCinematic remains a separate compiler; do not re-implement it as a theme yet.\n\n## Unification roadmap (strangler fig — interface first, engines later)\n\nThe user-facing model is already unified (SKILL.md Step 0): one catalog of\nLOOKS; classic looks pick a DELIVERY (rail | column), themed looks bind their\nown. \"Standard/Cinematic\" are delivery/compiler names, not modes. Remaining\nphases, each gated on need — never rewrite for tidiness alone:\n\n- **Phase 2 — one authoring schema.** `lines`/`minors`/`hero` are already\n ~90% shared between standard.json and theme.json; a router that translates a\n single `caption.json` into the engine-specific file removes the last\n user-visible seam. cinematic.json's blocks/planes are the odd one — map the\n common fields, pass engine-specific ones through.\n- **Phase 3 — engine convergence.** Port a classic delivery into make-theme\n ONLY when something forces it (e.g. a classic DNA wants a plate budget or a\n setpiece). Acceptance bar: blind A/B on the cap_multi regression scenes vs\n the old compiler — swap engines only when indistinguishable or better. Until\n then the old compilers are the reference implementation of 8 rounds of\n validated typography (lockup/orbit, multi-climax, ratio-lock, per-plane\n legibility, occlusion adjudication) — that machinery is the moat, not debt.\n\n## Body paradigms (registry)\n\n| paradigm | surface | layer | entrance verbs | exit verbs |\n| ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ----- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `rail` | lower-third lines, replace | fg | `stamp` (1f hot appear→crush→recoil→cool), `flick` (tube double-flick), `bootflick` (corrupted-cyan boot 1–2f → settles to UI color; minors keep a cyan/red registration shadow). `stamp` minors cool to `palette.minorCool` (default amber) | `drop` (mass falls), `powercut` (bright→ghost→off) |\n| `panel` | docked glass console, accumulate + typed | fg | `type` (width steps per word, $ prompt, caret blinks) | hold |\n| `poem` | open-space stanzas, accumulate; letters CONDENSE from seeded dust | fg | `condense` | `drift` (stanza hand-off) + optional dispersal linkage |\n| `takeover` | full-frame hard-cut cards, plate dimmed throughout | bg | `cut` (+ tension `creep` before silences, auto-detected) | hard cut / blur dissolve |\n| `lastpage` | manuscript rail (typed serif) + a seeded field of BLURRED apex-word instances haunting the room from t=0 | bg | typed rail; field breathes imperceptibly | rail fades; field resolves at apex (see `rackfocus`) |\n| `flaprail` | split-flap word tiles on a chyron bar (tag + ROW flip-counter; optional odometer chip docks above the bar while the first emphasis line reads) | fg | `splitflap` (3 flips: wrong word → wrong word → real word clacks on hot, squash → elastic settle → cools to bone; emphasis tiles keep amber text + underline) | flip-to-blank cascade left→right (completes before the next line) |\n| `ledboard` | amber LED departure strip docked lower-third (`body.board` geometry); lines page by vertical scroll-snap (steps(6)) inside the board window; furniture: green platform tag, ticking seconds clock (stacked digit reel), ⚠ DELAYED blinks then pages to ● ON TIME ~0.7s after the apex, idle LED shimmer in dead air ≥1.2s | fg | `ledwipe-mini` (per-word L→R LED column wipe, clipPath steps(len), + 1-frame arrival flicker; emphasis words get the LED-refresh double-blink; last word gets one late refresh) | scroll-snap page-up (next line pages in at the same instant) |\n| `vhsrail` | camcorder-playback lower third: every word carries a PERMANENT 1px red+cyan misregistration fringe (split clip-path halves); furniture: ▶ PLAY / ◀◀ REW top-left (REW gag in dead air ≥0.7s + the final rewind), ● REC top-right through the apex window, green timestamp bottom-right with 1 Hz blinking colon, idle tape-drift line in long silences, plus apex-coupled artifacts (1-frame white tear band + head-switching noise bar at REC FREEZE, scrub lines at the apex band on the hero rewind) | fg | `trackglitch` (instant on + 2-frame y-shake + 1-frame band-slice shift of the word's bottom half; emphasis = PAUSE jitter ±1px y oscillation + white noise-band flicker) | REWIND streak left + flat-white echo copy + 2 scrub-line flickers |\n| `hudrail` | arcade-cabinet HUD: whole frame plays through CRT overlays (scanlines `body.scan` + corner vignette); docked HUD bar (`body.bar` geometry, 2px accent border, glow) with `body.tags` 1UP / CREDIT furniture — the 1UP tag blinks on the classic 0.45s attract cadence all clip; HUD yields (`body.yield`) while the boss lands | fg | `coinpop` (instant-on + steps(2) scale pop from the baseline + 1-frame white coin-blip tick over the word; emphasis = 3-frame palette swap body→accent→magenta→body) | checkerboard dissolve (words vanish in 2 alternating 2-frame passes, line off ≤ DUR−0.02) |\n| `carbonstrip` | cold-war case-file transcript strip docked on the clearer side (manila gradient, punch holes, faint red `body.watermark`, typed `body.header` that types on by width steps); lines live on up to `body.rows` fixed slots; PAGES (broken at full rows, dead-air gaps > 0.7s, and after the hero hand-off line — it is filed away while the stamp owns the frame); the strip top-shadow breathes during the stamp's dead-still hold and the strip yields (`body.yield`) while it lands; the final page is pulled with the whole strip at clip end | fg | `hammer` (per-char sets 30ms apart, scale 1.35→1 in one frame = the stamp motif at low amplitude; seeded ±1.2px baselines + seeded ribbon-ink opacity; every strike kicks the strip 1px — y-channel locked while the strip itself tweens; emphasis words get a red ink ellipse drawn around them, 0.25s) | X-row over-strike (3 chunks per line, 0.05s apart, lines 0.16s apart) → carriage yank-down feed → return; roomy cadence in dead air, compressed when the next page is close — always completes before the next page's first strike |\n| `laserrail` | concert lower third: lines centered on a bottom rail (`body.bottomPx`), uppercase laser-green words with a neon text-glow; emphasis words render at `body.minorScale`× with a hotter glow; word centers are BAKED at compile time from the measured char-width table (`assets/fonts/char-widths.json`, ≤3px vs browser ground truth) so the beam aim can't be skewed by font-load timing; per-word furniture = two thin beams (accent from top-left, magenta from top-right) that sweep to CONVERGE on the word 2 frames early + a convergence flare; beams dim ×`yield.beamDim` inside the apex window and the visible line dims to `yield.dim` | fg | `igniteconverge` (beams converge at st−0.083 → flare pop → word snaps on at opacity 1 with brightness 1.85, crush 0.09s power3.in → 2-frame contact squash → elastic settle → brightness cools; emphasis = single 1-frame strobe off/on + lingering beams) | sweeper beam crosses L→R in 0.13s and each word streaks away (x+44, blur 5) as it passes; line off ≤ DUR−0.02 |\n\n| `stormrail` | rain-washed lower third: ambient rain = `body.rain.count` seeded thin streaks falling on repeating linear cycle tweens (pure f(t), one slanted wind vector, mid-fall at t=0); a second seeded set DOUBLES the rain for ~1s after the strike; lines sit on a bottom gradient scrim (stable reading surface); the visible line dims to `yield.dim` while the bolt lands and its text-shadow flips toward the strike (`hero.params.side`) for the flash frames | fg | `lightningpop` (the apex motif at low amplitude: instant on at brightness 2.2, y+4, scale 1.06 → 0.12s micro settle; emphasis = sheet-lightning double flash, 2-frame brightness 1.9/1.0/1.8 chain — the bg sky double-kisses at the same beats) | wash downward with the rain (y+22, blur 3, 0.18s power1.in); a line facing dead air washes early at lastWord+1.08s; line off ≤ DUR−0.02 |\n| `holorail` | volumetric projection plate: a scanlined glass slab (`body.plateW`×`plateH`, centered at `H − bottomPx`) with corner brackets + feed tag (`body.tag` / `theme.plateTag` override) boots like a projector turning ON (scaleY 0.03→1 expo + 1-frame flicker) and breathes a finite yoyo luminance cycle sized to the clip length; lines sit centered IN the plate (`lineDy` below plate center) with a constant chromatic-fringe text-shadow (−1.5px accent / +1.5px magenta) and drift slowly in rotationY (it IS a projection); the whole railwrap — plate included — dims to `yield.dim` while the apex lands | fg | `sweepboot` (the apex motif at low amplitude: instant opacity + rising clip-wipe reveal 0.15s + 1-frame x interference glitch at st+0.05/0.09/0.13; emphasis = 2-frame projection DROPOUT at `body.emphDelay`, restores brighter in `palette.em` with a hotter fringe, then settles back — the delay auto-shrinks near the line's exit so dropout+restore always complete) | projector cut — brightness 2.2 pop → collapse to a horizontal slit (scaleY 0.045, 0.07s power3.in) → to a dot (scaleX 0.015, 0.06s) → off at exit+0.15; the plate itself gets the same cut at DUR−0.14 |\n| `planktonrail` | deep-sea lower third on TWO coexisting row slots: even lines ride the upper row (`H − bottomPx − rowDy`), odd lines the lower (`H − bottomPx`) — couplets share the water like drifting strata. A line clears when its row is next needed (line i+2 in − 0.15) or ~0.3s after its couplet finishes speaking (staggered pair exits, +0.12s on odd rows); the pre-apex leftover clears at heroIn−0.21 while the FEEDING line (last to start before the apex) yields to `yield.dim` instead — no restore unless ≥1.2s of hold remains (it exits dimmed, by design); a line entering during the hold arrives at `yield.enter` and restores at I+`yield.post`; every line floats on a gentle y keyframe drift sized to its window. Furniture: `body.motes` = {count, near, seed} plankton motes on seeded drift walks f(t); the first `near` seed a ring around the apex heart (ring radius scales with hero fontPx/120) and get ATTRACTED to the bloom at I−0.19 (pulled 0.72× toward it, brightening to 0.42 at scale 1.7), wiggle through the hold, and sink at clip end | fg | `glowon` (the apex bloom at low amplitude: 2-frame opacity ramp + radial bloom from word center — scale 0.92→1, blur 5→0, brightness 0.45→1, 0.4s sine.out — while a cyan glow text-shadow grows in; emphasis = slow DOUBLE-BEAT propulsion pulse at st+0.52, 5-key brightness/scale 0.55s, guarded ≤ DUR−0.09) | light sinks — y+15 while dimming, 0.3s power1.in; the last line floats to the end of the clip; line off ≤ DUR−0.02 |\n| `sheenrail` | iridescent silk lower third on TWO coexisting row slots: even lines ride the upper row (`H − bottomPx − rowDy`), odd lines the lower (`H − bottomPx`) — couplets read together like a woven pair. Words are aurora-gradient ink (background-clip:text over a rose→teal→violet 300% wash whose backgroundPosition drifts f(t) 0%→300% across the whole clip — the body's hold life) above a blurred dark understroke (top+3px, blur 3); a soft radial band scrim sits under the rows (stable reading surface). Line scheduling mirrors planktonrail: a row clears when next needed (line i+2 in − 0.15) or shortly after its couplet finishes speaking (pairEnd + 0.23 + 0.17 on odd rows); the pre-apex leftover clears at heroIn−0.32 while the FEEDING line stays and dims with the railwrap yield (`yield.dim` at I−`pre`, restore at I+`post` — band included); the last line holds to the end | fg | `flowon` (the ribbon's flow at low amplitude: 2-frame opacity + y8 settle 0.38s sine.out; emphasis = ONE bright sheen sweep — a white highlight marches through the word once at st+0.16 (backgroundPosition −80%→180%, 0.42s power2.inOut) + a brightness 1.55 pulse) | dissolve UPWARD — words to y−12, blur 3, 0.32s power1.in staggered 0.035; each line releases `body.streaks` seeded light streaks (rose/teal/violet verticals) that float up from its row (y 14→−78, 0.62s, start clamped ≤ DUR−0.66) |\n| `scoperail` | oscilloscope lower third: a dark phosphor scope band (`body.bandH`, top border + glass shadow) hosts HUD readouts (`body.hudL` left, sample-rate `· TRIG` + amber trig LED right), a graticule, and an ALWAYS-ALIVE waveform — an SVG polyline rebuilt from baked point-set states (seeded pseudo-RMS envelope at ~12 states/s + 3-frame triplets on word arrivals: speech grows the amplitude, silence flattens it, every word kicks a local gaussian burst at its slot center — burst x BAKED at compile time from the measured char-width table; the hero words kick WIDE bursts spread from `HG.x` toward `HG.x + 0.6·halfW`, where the trace surges to write). Body lines sit centered on the band above the trace with reserved-width slots (sizer + clip — no re-center drift as words arrive); the whole band (lines + wave + HUD) dims to `yield.dim` while the apex writes. At the FINAL transcript word the scope DIES: band x-shake, trig LED panics red then dies, the trace explodes to max-amp chaos for ~0.3s, flatlines, collapses to a single dot (scaleX 0.015) and `body.siglost` stamps with a 2-frame flicker (all clamped ≤ DUR−0.02) | fg | `tracewipe` (the apex pen-write at low amplitude: clip wipes the word in L→R over 0.10s + a 2-frame just-traced flash — flash-white instantly, settle to phosphor green; the death word settles to `palette.em` amber; the trig LED blinks on every arrival; emphasis = a ticking frequency-readout chip above the word, 3 seeded ascending values stepping every 2 frames) | the line collapses INTO the waveform (y+30, 0.13s power2.in) — early into dead air (lastWordStart+0.67), else just before the next line needs the slot; the last line collapses as the trace flatlines (min(NZ+0.33, DUR−0.2)) |\n| `paperrail` | stop-motion craft table: a kraft strip (torn top edge via seeded polygon clip-path, washi-taped corners, handwritten `body.tag` in the tag font) docked lower-third (`body.strip` geometry, centered by default); body words are cream paper chips (`palette.chip` on `palette.chipEdge` border, hard dy3 shadow) on centered replace-lines; the whole strip jitters ±0.7px every 4 frames (handmade stop-motion weave); the hero slot keeps a red paper star (`palette.accent`, rail↔climax hand-off) that pulses 1.18→1.06→1 as the apex chips land; the FINAL transcript word is an accent-red sign-off chip; emphasis words get a washi-tape slap (steps(2) scale 1.7→1 at `word.start + body.tapeDelay`, chip pressed 1 frame); strip + lines yield (`body.yield`) while the apex lands | fg | `place` (the papermat drop at low amplitude: opacity full in 0 frames + seeded ±2.5° rotation, y −16 + scale 1.06→1 steps(2) 0.12s; hold = rotation-only ~5fps wobble) | `peel` (rotation −8°, y −40, fade, steps(3), staggered 0.03s; last line clamped to finish on frame) |\n| `popuprail` | pop-up book page: a cream page strip (`body.strip` geometry, center foldline, top border + paper glow inset) unfolds up from the bottom edge (scaleY 0.02→1 back.out at 0.14 — the stage is built) and hosts TWO reading rows (`body.rowA`/`rowB` px above H) that alternate per line; the whole page breathes a gentle y drift sized to the clip; the hero slot keeps a blue paper star chip (`palette.accent` clip-path star, rail↔climax hand-off — spliced into the line whose window holds heroIn); emphasis words land at `body.emPx` weight 800 with a contact squash (1.06/0.93 set → elastic settle) the strip FEELS (1px dip), then flick-wobble (5-key rotationX, squeezed to fit before the fold) with a blue paper strut leaning in behind (scaleY back.out(2)); the FINAL transcript word is a blue sign-off with a strut; page yields (`body.yield`) while the centerfold lands; on the final word the whole page TILTS 2° +x6 (paper physics, `body.tilt:false` opts out) and the strip folds shut on the last frame (scaleY power3.in ≤ DUR−0.017) | fg | `popup` (the centerfold motif at low amplitude: opacity 1 in 0 frames + rotationX 85→0 baseline hinge, 0.25s back.out(1.4), back-shadow grows as it rises) | `fold` (the page closing: rotationX 88 power2.in 0.12s, shadow off, L→R wave staggered 0.045s, slot hidden at +0.13; fold at next line in / lastWord+`body.maxHold` in silence, wave clamped ≤ DUR−0.017) |\n| `chalkrail` | night-lecture chalk band: a deep-green board strip (`body.strip` geometry, worn top hairline, eraser smudges, handwritten `body.tag` header in the tag font, two chalk sticks bottom-right) docked at the bottom edge hosts `body.rows` reading rows that ACCUMULATE — lines fill the rows top→bottom in phases of rows.length; when the next phase needs the rows an ERASER SWIPE clears the board (blurred light band sweeps across 0.42s at `prevEnd + body.eraseDelay` clamped clear of the next phase, the old words SMEAR out scaleX 1.3 + x+24 + blur(8) staggered 0.06s, faint ghost smudges fade in and STAY — chalk never fully erases); the FINAL transcript word lands in yellow chalk (`palette.em` sign-off); the band yields (`body.yield`) while the apex writes | fg | `scribble` (the chalkwrite verb at low amplitude: 2-frame opacity pop + scribble clip-reveal steps(4) 0.12s + y4 drop-settle + 6 seeded dust specks puffing at the word base, seeded ±2° tilt; emphasis = double underline dashes drawn beneath at st+0.22/+0.38) | eraser-swipe smear between phases (scaleX 1.3, x+24, blur 8, power2.in 0.18s); the final phase holds to clip end |\n| `markerrail` | street handstyle rail: centered marker lines on a bottom rail (`body.bottomPx`), `palette.body` cream paint with a heavy drop text-shadow; emphasis words take ALTERNATING paint colors (`palette.em`/`em2`, yellow/magenta) + a spray-underline SWOOSH (dash-revealed squiggle viewBox-stretched to the word) with 8 seeded overspray dots that pop and fade; the FINAL transcript word lands BIG (1.5×) in `palette.em` with mini apex-impact physics (crush 0.09s power3.in → 2-frame contact squash → elastic settle — it rides the plate punch); the line visible at the tag's onset yields (`body.yield`, restore only with runway before its buff — else it exits dimmed) | fg | `flick` (the spray-write verb at low amplitude: opacity full in 1 frame at scale 1.18, seeded ±6° rotation settling to ±2°, 1-frame squeak skewX 7, back.out(2.2) settle 0.18s) | ROLLER BUFF (gray paint roller scaleX-sweeps the line 0.15s power2.in, words vanish under it, the wet smear lingers at 0.15 + blur(2) before fading); the last line is never buffed — the sign-off stays painted |\n| `brushrail` | washi paper band: a deckle-edged band (`body.strip` geometry, two faintly rotated `paperHi`→`paperLo` under-sheets at 0.42 + a translucent `sheetHi`→`sheetLo` main sheet with warm inset shadow) swipes in L→R behind a traveling brush-head shadow (clipPath wipe 0.2s power2.out + blurred `palette.bh` gradient head — the ink gesture at low amplitude), then the under-sheet breathes faintly (0.32 Hz baked f(t)); body lines are centered replace-lines on the band (`fonts.body` serif at `body.fontPx`/`body.weight`, seeded ±1° tilt); emphasis words get a DOUBLE curved ink underline (`palette.ulInk`, fat 7/0.3 wash + tight 2.6/0.95 core, dash-drawn at st+0.12/+0.15); band + the line under the gesture yield (`body.yield`) while the apex lands; the band exits with the last line on one final R→L wipe | fg | `brush-wipe` (the gesture at low amplitude: clipPath inset reveal L→R 0.16s power2.out with a blurred per-word brush-head shadow riding the reveal edge, then vanishing) | wet-cloth WIPE (the reveal in reverse: the line clipPath wipes R→L over 0.10–0.14s power2.in with an erase brush head riding it, at min(next line − 0.136, lastWord + `body.maxHold`); the LAST line and the band wipe together at DUR−0.142) |\n| `inkrail` | sumi ink on still water: up to THREE fixed reading rows at the bottom center (`body.bottomPx` = last-row center, `body.rowGap` apart; rows cycle in pairs, the closing line takes the third row — the final thought ACCUMULATES instead of replacing); `fonts.body` Mincho serif at `body.fontPx`/`body.weight`/`body.letterSpacing`, `palette.body` ink over a paper-white text-shadow halo (`palette.paper`/`paper2` glow stack — readable on bright skies) with a duplicate blurred dark halo per word; an ink-settling RULE (86%-width gradient hairline, scaleX 0→1 over 0.9s) draws beneath each line at firstWord+0.12; emphasis words shed a faint ink wisp curling off the word top (st+0.55, ±dir by line parity, skipped near clip end); the rows visible under the bloom yield (`body.yield` — dim at heroIn+`delay`, restore at heroIn+`post` only with runway before the exit) | fg | `bleed` (the apex bloom at low amplitude: opacity snaps in 2 frames; blur 12→0 + scale 1.25→1 power2.out carry the bleed — late words bleed faster so they resolve before clip end; the dark halo overshoots scale 1.5→1.04 while its opacity decays 0.5→0.25) | RE-DISSOLVE (blur 9 + scale 1.13 + fade + y−8 power1.in — ink dispersing back into the water) as the line-after-next approaches (= the next occupant of its row, outDur 0.5−0.05·i, never mid-read); the closing TWO lines persist to clip end |\n| `ransomrail` | kidnapper's collage rail: every transcript word is a cutout chip in one of 4 cycled recipes (cream/`fonts.body` Anton, black/`fonts.dark` Inter-800, newsprint/`fonts.news` Special Elite, accent/`fonts.accent` Permanent Marker — emphasis words snap to the accent chip, never two identical chips in a row) PASTED along the bottom rail line (`body.bottomPx`) with seeded crookedness (rot sign alternates with line+word parity, baseline dy leans the other way), seeded ±px sizes (`body.fontPx`−2..+1, emphasis +3) and torn edges (seeded 12-vertex tear polygon, same paper stock as the apex); chips carry a hard dy5 offset drop-shadow; lines breathe (5-key scale keyframes) through their hold; the whole railwrap yields (`body.yield`, container opacity — never contests per-chip channels) while the apex letters slam | fg | `paste` (the apex slam motif at low amplitude: opacity full in 1 frame at scale 1.12 / rot×1.5 / y−8 → power3.in crush 0.08s → 2-frame contact squash 1.05/0.95 → elastic settle; emphasis = 1-frame RE-PASTE lift at `body.emphDelay` — shadow grows to a flight blur, rotation flips sign for good, then crush + squash + elastic again, rip-runway-guarded) | RIPPED off one by one (rotation ±16/17° throw + y−30 + fade, power2.in, staggered 0.045s) with a 1-frame paper-tear flash under each chip — timed so the rip tail overlaps the next line's pastes a beat (collage chaos, by design); the last line tears off clamped to finish on frame |\n| `stack` | the lesson surface, built for a MULTI-SHOT edit (interview set + demo inserts): a verbatim copy of a proven tip-listicle ad's captions, measured from its frames. Three layers, each with one job, and nothing animates: every element hard-cuts on and off. (1) SPOKEN STACKS: a small setup line (cap height `body.setupCap` × H) over the payoff (`body.payoffScale`×, gap `body.gap` × cap), `fonts.body` italic 900 at `body.stretch` width (char widths from `body.widthKey`), white, soft shadow (`body.shadow`), no outline, tracking `body.letterSpacing`, word spacing `body.wordSpacing`, left-aligned on the INK; sizes are cap heights turned into font sizes through `body.capRatio`, line tops through `body.capTop`. `\"|\"` splits setup from payoff (no `\"|\"`: up to 3 words are payoff only at `body.singleScale`×, longer lines put ⌊n/3⌋ words, 1–2, in the setup); a `\"~\"` prefix keeps a word verbatim-covered but undrawn (stutters); a closing period is dropped. An object in a line, `{x, y, s, p}`, places the stack (ink left and setup cap top, px) and sets the setup and payoff cap heights; a stack without one is placed from the matte (`frames_fg` as a coarse alpha grid, unioned over its window: the spot that clears the subject, sits beside it and nearest `body.prefY`, one anchor per run inside a shot), and its payoff, if wider than `body.maxWidth` × W, shrinks to 0.78× then breaks into two balanced rows. Cuts come from ffmpeg scdet (`body.cutThreshold`) or `theme.cuts`. (2) CHAPTER CARD (`theme.chapter`): a giant numeral beside a title over a small subtitle (`\"/\"` splits them) and an outline bookmark, top-left (`side:\"right\"` mirrors it), cut to cut around its phrase. (3) LOWER THIRDS (`theme.items`): on the result shot, a `palette.accent` number over the technique name (`fonts.tag` 900 at 125% width, two balanced rows when wide) and the prompt quoted under it in the same face, all caps (a `\"/\"` in `prompt` breaks the quote by hand); `layout` `\"stack\"` (default: name over quote), `\"beside\"` (name right of the quote, on its bottom line) or `\"right\"` (name right-aligned above); `before` puts a thin wide label (`fonts.tag` 400 at 125%, centred) on the shot before the next cut, and the lower third cuts in on that cut. Spoken stacks whose first word falls inside a card or lower-third window are not drawn (still verbatim-covered). Heroless by design; `plate.grain` 0 | fg | setup on the frame of its first word (on the cut when one falls within `body.cutLead` s before it), payoff on its own first word; card and lower thirds on their cut | at the next stack, `body.hold` s after the last word, or the shot cut, whichever comes first; card and lower thirds on their cut |\n\nfg body uses the **rail.html alpha-webm channel** (true alpha — dark panels and\nscrims work; never the screen-blend index_fg path, which can only add light).\n\n## Hero setpieces (registry)\n\n| setpiece | what happens | notes |\n| ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `detonation` | charge-dim → sheared stencil slices crush in hot → SNAP into register → squash → elastic settle → paint cools to bone → bars/ticks/designation-tag deploy → shear-apart exit | pairs with fx flash/rings/sparks + plate punch/shake |\n| `decode` | slot-machine glyph reels (steps() ease, seek-safe) lock left→right with RGB jitter → lock snap → CRT power-off exit | pairs with `redact-until-hero` |\n| `drawon` | the word is WRITTEN stroke-by-stroke from a single-line font (Hershey) — per-stroke paths revealed sequentially at constant pen speed, nib rides `getPointAtLength`, hops at pen lifts; then hum + buzz dip | any word, zero tuning: `gen-stroke-path.py` lays out glyph pen-paths at compile time |\n| `cpslam` | acid-yellow stencil word slams in BEHIND the subject with REAL diagonal notch cuts (SVG mask = true transparency over footage), chromatic split that settles to a PERMANENT cyan/red registration error, seeded glitch ticks, katakana tag, glitch-out exit | bounded hold (~2.6s default, `params.hold` / `hero.exitAt` override) — a climax is an event, not wallpaper |\n| `assembly` | (inline, poem) apex word condenses BIG while star particles fly into it | |\n| `colorflip` | (inline, takeover) accent-color crush card + dim kick + squash/settle + loom | pairs with fx flash + plate punch/shake |\n| `flapboard` | split-flap departures board takeover: floodlight dim/scrim swing on, the housing clacks down (rotationX, squash, elastic) behind the subject, one giant flap tile per char flip-cycles 3–5 seeded wrong glyphs then LOCKS left→right across `params.lockWindow` (hot flash → cools to bone) under baked clack y-jitter; lock-complete = big clack + amber glow flicker + rule wipe + steps() status-ticker; hold = loom + one tile re-flutter; exit = tiles flip to blank cascade, housing flips away | pairs with `fx.crowdflash` (pops at lock start/end) and `plate.punchOffset = lockWindow` so the plate punch lands on the lock-complete clack, not the hero onset |\n| `ledwipe` | transit LED board takeover: cool scrim + dim charge, an amber dot-matrix panel EXPANDS upward (scaleY steps(6)) behind the subject, header tags + unlit LED ghost boot-flicker alive, then the word ILLUMINATES column-by-column (clipPath L→R, steps ≈ 1.4×chars over `params.wipeDur`) hot → cools to amber; contact = cell squash + elastic settle + PA \"ding\" double brightness pulse; an 8-phase chasing LED-marquee border runs to the exit; hold = glow breathe + seeded-look LED dropouts; exit = word pages up out of the window, panel collapses back down | pairs with `fx.paflash` (amber PA flash at wipe-complete contact). Panel geometry derives from fontPx (`panelH = 44 + 1.42×fontPx + 18`); `params.panelW` fixed, width-fit shrinks the type only. Plate: grain-only (no punch) is the demo register |\n| `vhsosd` | REC FREEZE camcorder slam: permanent lens vignette (`params.vignette`) + backlight-comp scrim (peak = `plate.charge`, cools to 0.69×) kill the bright sky; the word crushes in as a huge OSD readout — 3 horizontal clip-path tracking bands (`params.bandClips`) sheared (`params.bandShear`) + blurred (power4.in over `params.crush`) SNAP into register on the contact frame, squash → elastic settle; red/cyan misregistration copies cool from ±`misregIn` to ±`misreg` px and keep BREATHING through the hold under tape-weave y jitter (`params.weave`) + slow loom; auto-iris pump (white wash 0.20, dark dip = `plate.dim`); exit at `I + params.hold` = REWIND streak left + flat-white echo copy | pairs with the `vhsrail` paradigm, which emits the fg REC-FREEZE artifacts (tear band, head-switching bar, apex scrub lines, ● REC) at the same I/X times. Plate: grain-only (no punch) is the demo register; hold-life keyframes auto-clamp inside [contact, exit] |\n| `bossintro` | arcade BOSS INTRO: the room dims (gradient `plate.dim`) behind a CRT edge glow (cyan base wash that pulses on the last emphasis word before the boss and spills magenta on the strobe + the final word); `params.tag` (WARNING) blinks 2× above the word rect; ~COLS×ROWS (`params.rows`, cells 0.7×/0.5× fontPx) seeded pixel blocks fall steps(3) from above into a tight matrix grid covering the word rect, each landing with a 1-frame white tick; at `I + params.flashDelay` the word flashes ON (Press Start 2P, instant at opacity 1, scale 1.15 → steps(3) crush → 2-frame squash → elastic settle) with ±4px chromatic ghost layers + a 3-frame palette strobe (white→cyan→magenta→white); hold = quantized 1.6% breathe + CRT glow cycle + baked block shimmer blinks; exit at `I + params.hold` = per-letter checkerboard dissolve, blocks drop away steps(3) | pairs with the `hudrail` paradigm; emits fg furniture via setpiece fg parts: letterbox bars (`params.letterbox` px) slam in steps(3) with a 1-frame overshoot and retract after the exit, HI-SCORE odometer (accent label, yellow digits) rolls every 0.066s through the hold, 1-frame white tick out. `fx.coinflash` adds the 1-frame radial impact flash at the strike; plate punch anchors at `punchOffset` = `flashDelay` |\n| `rubberstamp` | the footage becomes an archive page (vignette charge = `plate.charge`, manila sepia wash `params.sepia`, dim kick = `plate.dim` that cools to 0.385×) and the verdict slams in BEHIND the subject as a bordered rubber stamp at `params.rotation`: a manila paper wash lights an instant before contact, the stamp crushes 2.2→1 power4.in over 0.115s, 2-frame contact squash, double-strike ghost print (`opacity 0.35`, offset +5/−4 rot 1.3), two thin-ink patches (`params.patches` clip-path circles in paper color), wet-ink saturate/brightness settle, paper indent shadow bloom; stamps don't move — the hold is DEAD STILL, sold by the breathing indent + a slow paper loom; exit at `C + params.hold` = mechanical 3-frame yank-down cut (the page is filed away), the archive plate releases 0.25s before | contact `C = heroIn + params.crush`; pairs with `fx.inkflecks` (seeded red spatter at C, ballistic with gravity) and `plate.punchOffset = params.crush` so the plate punch lands on the stamp contact; pairs with the `carbonstrip` paradigm (strip yield + shade breathe anchor at the same C); face chrome (border, radius, padding, ghost offset) scales with fontPx from the 120px demo cut |\n| `lasercage` | concert-blackout laser show: the plate dims to `plate.dim` at t=0 and deepens to `plate.charge` before the drop while haze cones breathe in the top corners; a 6-beam array (alternating accent/magenta, emitters along the top edge) snaps on at I−0.26 and SWEEPS to converge on the word center (staggered 0.022s), a hot core pops at convergence; the word IGNITES behind the subject as an additive glow stack (wide accent blur 0.22×fontPx + magenta fringe offset + tight soft blur + near-white core): scale 1.16 crush power4.in → 2-frame contact squash → elastic settle + 2 controlled strobe pops (brightness 2.05, 1s apart, runway-guarded); a criss-cross beam CAGE (6 lines derived from the word rect) draws itself dash-by-dash around the word and flickers; through the hold the array FANS OUT slowly to floor targets (the iconic concert fan) while the word looms; exit at `heroOut − 0.38` = cage un-draws, beams sweep away L→R (+0.74W) carrying the letters (per-letter streak + blur, stagger auto-clamped ≤ DUR), the room lifts back to 0.12 | word geometry is metric-exact via `assets/fonts/char-widths.json` (cage/spill/flash all derive from `halfW` + `fontPx`); pairs with `fx.laserflash` (accent contact flash at I+0.03, sized 2·halfW+80 × 4.8·fontPx) and the `laserrail` paradigm (same converge-ignite motif at low amplitude); plate punch anchors at `punchOffset` ≈ 0.07 (the ignite contact) |\n\n| `boltstrike` | THE STRIKE: a slate storm mood (`params.mood`) sits on the room from t=0 and the sky KISSES (1-frame 6% gradient brighten) on every body word — double-kiss on emphasis words, re-flashes at I+0.84/I+1.44 during the hold; the room charge-dims to `plate.charge` under a radial word scrim from I−0.39; a hand-authored branched bolt (5-seg zigzag + 2 branches, haze/glow/core SVG stack in `palette.accent`/`glow`/`core`) flashes 2 frames BEFORE the word — leader 1 → 0.35 → return stroke 1 at contact — with a sky flash; the word slams in (Anton scale 3.1 crush power4.in 0.105s, blur 14→0, brightness 3.2→2.5) → 2-frame contact squash → elastic settle, lit HARD for 2 frames then cools to 1; SIGNATURE: the word's text-shadow flips toward the bolt side for the flash frames; ozone under-glow (accent, blur 26×fontPx/145) blooms at contact and breathes (6-key opacity cycle) through the hold + slow loom + 2-frame lit blips on the sheet re-flashes; the dim releases at the flash, settles to a `plate.dim` storm hold and lifts before the exit; exit at `min(heroOut−0.2, I+params.hold)` = washes downward with the rain (y+38, blur 6) | bolt geometry is baked at compile time as offsets from the word center (halfW/360 × fontPx/145 units, `params.side` flips it); word rect is metric-exact via `assets/fonts/char-widths.json`; word scrim = 2·halfW+380 × 2.28·fontPx; pairs with `fx.strikeflash` (full-frame fg flash with the same leader/return flicker grammar) and the `stormrail` paradigm (rain doubles + shadow flip at the same I); plate punch anchors at `punchOffset` ≈ 0.02 (the return stroke) |\n| `holoboot` | full volumetric boot behind the subject: a desk emitter dot pops (back.out scale), the projection cone SNAPS wide (scaleX 0.07→1 expo, 0.11s, then dips 0.55→0.95), a seed beam fires up from the emitter (scaleY power3.in, fades after contact), and the word boots with a RISING clip sweep (opacity instant at I−0.055, the reveal is the wipe) into a 7-layer projection stack (dark backing shadow / wide `palette.glow` blur / magenta + cyan chromatic fringes / `palette.core` word / scanline mask / climbing interference bands, band pitch 0.39×fontPx); contact at I+0.07 = brightness 2.3 flash + scaleX 1.07 / scaleY 0.91 squash held 2 frames + elastic settle + 1-frame x interference jumps; fringes blow ±8px then settle to the permanent ±2px registration offset; hold = bands climb −6 pitches, rotationY oscillates [0,6,−7,5,0], glow/cone breathe, emitter dot pulses, slow 1.028 loom; at `I + params.passAt` (≥ I+1.25, runway-guarded) a hand \"passes through\" the projection (skew 6/−4/0 + blur + fringe blowout + scaleY ripple — pure projection logic); exit at `min(heroOut−0.22, DUR−0.3)` = projector cut: brightness 2.4 → collapse to a horizontal line (scaleY 0.018) → to the base dot (scaleX 0.015), cone fades, dot pops 2.2× and dies. A second smaller emitter cone (`params.coneW`) rises from the desk under the holorail plate ALL video with baked flicker cycles + dot pulses, and gets its own projector cut at DUR−0.2 | word rect is metric-exact via `assets/fonts/char-widths.json` (cone width 2·halfW+80, emitter at cy+2.4·fontPx, all rig geometry derives from `halfW` + `fontPx`; scene scrim is a radial centered on the hero's frame fractions); pairs with `fx.holoflash` (cyan fg lock flash at I+0.075, radial at the same hero fractions) and the `holorail` paradigm (same sweep-boot + interference-glitch motif at low amplitude; the body cone is aimed at ITS plate); plate: grain-only (no punch) is the demo register, scene reaction = `plate.scrim`/`charge`/`dim` |\n| `biobloom` | bioluminescent BLOOM behind the subject: the abyss grade (`params.mood`) + a breathing vignette (6-key opacity cycle sized to the clip) sit on the room from t=0 — the world is underwater before anything speaks; a creature pre-glow (1.083×/0.717× fontPx ellipse) gathers with a double-beat anticipation at I−0.31 and crushes to a point at I−0.115; a dark pocket scrim (`plate.scrim`, 2·halfW+280 × 2.5·fontPx) opens behind the word zone at I−0.03; the word CONDENSES in (scale 2.35 crush power4.in over `params.crush`, blur 15→2, brightness 2.6→1.7) → 2-frame contact squash (1.09/0.93) → elastic settle while cyan light SPILLS onto the scene (radial at the hero's frame fractions: snap 0.55 at contact → 0.2 → shimmer keyframes); 6 luminous tendrils (paired blurred SVG strokes — glow w9/blur5 + core w3/blur1.1, accent/violet/ice alternating) draw outward from the word rect staggered 0.05s (stagger auto-clamps so the last filament completes before the sink); hold = glow breathes 8–14% (4-key scale/opacity), glow-layer flicker, two counter-drifting caustic gradients shimmer over the text zone, the bloom drifts slowly with the current (`params.drift` on the x channel); exit at `min(heroOut−0.2, DUR−0.3)` = the light SINKS — tendrils (via their HTML wrapper, never gsap-y on inner SVG), caustics, pocket, spill and the word all drift down (+14/+26) while dimming, word blurs out | tendril geometry is hand-authored from the demo and baked at compile time as offsets from the word center (x scaled by halfW/demoHalf, y by fontPx/120, endpoints frame-clamped); word rect is metric-exact via `assets/fonts/char-widths.json` (0.01em tracking); pairs with `fx.sporeburst` (seeded spore puffs burst PAST the bloom at contact in the fg layer, ballistic with slight sink) and the `planktonrail` paradigm (same glow-on motif at low amplitude + mote attraction anchored at the same I); plate: pushIn+grain (no punch) is the demo register — the demo's postfx profile was `push` |\n| `silkribbon` | aurora silk WRITTEN into the night sky behind the subject: the hero word is a sequential Hershey-stroke reveal (one `<path>` per pen stroke at constant pen speed, `gen-stroke-path.py` baked at compile time — any word, zero tuning) in a blurred halo (`params.haloWidth`, feGaussianBlur 7) + tight core (`params.coreWidth`, white drop-shadow), BOTH stroked by ONE userSpaceOnUse rose→teal→violet linearGradient with reflect spread; SIGNATURE: the gradient's x1/x2 translate f(t) from I−0.07 to the clip end (shift 1.5× the gradient span) so the aurora colors FLOW THROUGH the drawn ribbon during the hold; a soft light mote (blurred halo + core dot) rides the pen, hops at lifts, and blooms out 2.4× at the final stroke; scene reaction = two huge aurora blobs (teal top-left / rose top-right, frame-fraction geometry) drift the sky f(t) from t=0 at `params.wash` and DEEPEN to `params.deepen` as the ribbon writes, a top scrim (`plate.scrim`, 0.653H) charges in at I−0.34 (sky washout guard), a light spill (`params.spill`) tints the sky at I+0.1 once the ribbon completes and flickers gently, and the halo breathes (5-key opacity cycle) through the hold; gentle — no shake, no contact squash: the apex verb is the writing itself; writing window = `params.window` clamped so the ribbon finishes + holds before ENDT = DUR−0.04 | canvas/gradient/spill all derive from `params.targetWidth` (demo: 880 ink on a 1010×280 canvas, baseline 200; svgW = tw+130, spill = (tw+60)×0.51, gradient span = 0.6364·tw), centered at the scene-aware HG (pref top 18, the sky band — same as drawon); pairs with `fx.silkmotes` (seeded aurora motes rise near the ribbon during the hold, fg layer, demo spread fractions keep the face gap) and the `sheenrail` paradigm (same flow motif at low amplitude); plate: pushIn+grain (no punch) is the demo register — the demo's postfx profile was `push` |\n| `scopetrace` | the scope's own trace LEAPS off the band and WRITES the hero word behind the subject: a surge column (3px, bottom-anchored scaleY pop, landing at the pen-start point parsed from the baked path) jumps from the scope band at I−0.12; the word is a sequential Hershey-stroke reveal (one `<path>` per pen lift at constant pen speed, `gen-stroke-path.py` baked at compile time — any word, zero tuning; punctuation stripped for the pen) drawn CORE-ONLY in a thin phosphor stroke (`params.coreWidth`, bright `palette.bright` + accent drop-shadows — it is a trace, not a tube), nib rides `getPointAtLength` and pops 2.4× at DRAWN; the phosphor FILL (blurred halo strokes, `params.haloWidth`, blur 7) flicker-arrives AFTER the write at FLICK = DRAWN+`params.flickGap` (pre-arm 2 frames early, 5-step 1/0.25/1/0.55/1 blink, core dips 0.55 for a frame); hold = glow hum (7 Hz + 11.3 Hz sine keyframes, f(t)) + 1.6% breathe on an HTML wrapper with transformOrigin at the hero's frame fractions, ending exactly at the collapse; exit = the word COLLAPSES to a flatline (wrapper scaleY 0.02, 0.14s power3.in, same origin) + a horizontal flash bar (2·halfW wide at the word center) that shrinks out — scheduled at nextSpokenWord − `params.clearGap` (clamped ≥ FLICK+0.45, ≤ heroOut) so the trace clears BEFORE the next line speaks; scene reaction = phosphor radial scrim (`plate.scrim` at the hero fractions, I−0.18 → EXIT+0.05) + green spill sized from targetWidth (`params.spill`); second beat: a 1-frame phosphor pulse answers the FINAL transcript word — the same death beat the scoperail finale owns | trace geometry derives from `params.targetWidth` (svgW = tw+140, local baseline 215, ink center ≈ baseline−28 — the demo registration; surge x parsed from the first `M` of the path); centered at the scene-aware HG (pref top 25, ink height 115); pairs with the `scoperail` paradigm (tracewipe = the same pen-write at low amplitude; the paradigm's hero waveform kicks fire at the same word onsets) and needs no front fx; plate: grain-only (no punch) is the demo register |\n| `papermat` | STOP-MOTION PAPERCUT behind the subject: a torn-edge kraft mat (two seeded torn polygon layers) DROPS from above with steps(2) gravity and slaps down (squash → rest, soft blob shadow); then one torn cream chip per char (`palette.paper`/`paper2`, hero-font ink `palette.ink`) drops with steps(3) gravity + 1-frame overshoot at `I + i·params.step`, each announced by an anticipation shadow 3 frames early, landing crooked (seeded ±3° ±4px), settling through three 12fps poses, then holding an 8fps wobble (baked set chain — the stop-motion heartbeat) while the whole tableau breathes 1.6% (camera-push loom); scene reaction = a warm vignette (`params.vig`) charging with the landing; on the FINAL word the table BUMPS (y4, 1 frame) and the chips SCATTER off down-right steps(4) staggered 0.045s, the mat swept off last (disperse-on-last-word, `hero.exitAt` overrides) | chip geometry derives from `hero.fontPx` (demo ratios: tile 0.91×/1.31× fontPx, pitch tile+14, mat N·pitch+80 × 1.846× fontPx), width-fit shrinks type and chips together; pairs with `fx.paperscraps` (paper scraps puff at each chip contact, fg) and the `paperrail` paradigm (same place verb at low amplitude); plate: grain only is the demo register |\n| `centerfold` | POP-UP BOOK CENTERFOLD behind the subject: blue + cream 12-point paper starbursts (deterministic starPts polygon, `palette.accent`/`cream` fills with kraft-edge strokes) unfold on a baseline hinge (scaleY 0.03→1 back.out(1.6), cream staggered +0.06) starting I−0.272 while a blob shadow grows beneath; the hero word pops up at I in `params.segs` hinged clip-path segments (rotationX 85→0 back.out(1.4) staggered `params.segStagger` — the body's popup verb at full amplitude); two kraft struts lean in at I+0.33; backdrop + word wobble-settle TOGETHER (one `#cfWob` wrapper owns rotationX, 6-key) then breathe through the hold (word 5-key rotationX + shadow scaleX, both auto-squeezed into the window); scene reaction = a dusk radial scrim at the hero's frame fractions (`params.scrim`, bright-sky insurance) charging with the unfold; exit = the whole spread folds FLAT (segments rotationX 88 staggered, struts/bursts scaleY collapse cream-then-blue, scrim out) at `max(I+segStagger·(segs−1)+0.45, min(heroOut−0.33, DUR−0.39))` — the book closes before the next sentence | burst geometry derives from the word rect (metric-exact via char-widths: burstR = clamp(1.83·fontPx, 0.59·wordW, 0.42·H), box 2R+180 × 2R+fontPx, demo props scale at burstR/220), width-fit shrinks the type first; pairs with `fx.confetti` (seeded ballistic paper confetti launched from the hinge line at I+0.128, fg) and the `popuprail` paradigm (same baseline-hinge verb at low amplitude); plate: grain only is the demo register |\n| `chalkwrite` | NIGHT LECTURE behind the subject: the lower chalk band grows into a FULL deep-green board (scaleY 0→1 power3.out from the bottom edge at I−0.3, the room dims `params.dim` + vignette `params.vig` with it); the hero word is HAND-WRITTEN in chalk — sequential Hershey stroke reveal (drawon pattern, `gen-stroke-path.py` baked at compile time), dry/rough via seeded ±1px jitter on every pen point (`params.jitterSeed`), a blurred halo (`params.haloWidth`, feGaussianBlur 3.2, group opacity `params.halo`) under a tight core (`params.coreWidth`), a chalk-stick nib (rotated rect) riding the pen — while `params.dustN` dust specks fall from the nib along the path; at write-complete a hand-slap CLAP shakes the board 1 frame (set-chain y 3/−2/1/0; the dust burst lives in the rail, in FRONT: `fx.chalkclap`), then TWO violent accelerating underlines slash beneath (seeded waviness, power3.in, the nib rides them, dust kicks at the ends), the chalk flicks away, and the halo breathes (baked 1.6/3.7 Hz f(t)) through the hold with two slow motes drifting off the letters | geometry registers on the MEASURED ink box (the stroke path is parsed at compile time; ink CENTER lands on scene-aware HG.y, pref top 44): the board rect (`params.boardGap`×inkH above the ink, bottom flush with the frame, width = the body strip), the underlines (inkL+14→inkR−4 at inkBot+30/+50) and the fg clap point (the pen's LAST contact point → HG.clapX/Y/T) all derive from it; x defaults to the board's LEFT margin + tw/2 — a hand writes from the left, never centered on the subject (`theme.hero.x` overrides); pairs with `fx.chalkclap` (12 seeded radial dust specks + a blurred puff at DRAWN, fg) and the `chalkrail` paradigm (same scribble verb at low amplitude); plate: grain only is the demo register; needs `python3` |\n| `spraytag` | STREET TAG behind the subject: the dusk wall dims (`params.dim`) + a radial scrim charges (`params.scrim`) at I−0.42 as the writer steps up; the can RATTLES at the pen-start point (6 seeded set-chain nib jitters, I−0.30→I−0.02), then the hero word is spray-written stroke by stroke — sequential Hershey dash reveal at constant pen speed (`gen-stroke-path.py` baked at compile time) — as a TRIPLE stack per stroke: fat dark under-stroke `palette.under` (`params.underWidth`, sky-contrast armor) + blurred overspray halo (`params.haloWidth`, feGaussianBlur 7, group opacity `params.haloOpacity`) + wet paint core (`params.coreWidth`, drop-shadow), the glowing nib (r9, `palette.nib`) riding each stroke; `params.osprayN` seeded overspray dots pop near the nib as it passes; nib throws off 2.6× at DRAWN; through the hold `params.drips` seeded DRIPS (paint→`dripMid`→`dripLo` gradient bars) grow from painted low points (x-separated >110px) and KEEP growing, the halo hums (7/11 Hz baked f(t)) and the whole tag looms 1.014; writing window = `params.window` (demo 0.58s) clamped so write + splat + drip fit before ENDT = DUR−0.04 | geometry registers on the MEASURED ink box (ink CENTER lands on scene-aware HG.y, pref top 26 — the sky band, crossing the subject silhouette is the point; tag centers on the hero anchor, `targetWidth` capped at W−140); the pen-finish point is baked onto HG.splatX/Y/T for the fg splat; pairs with `fx.paintsplat` (hot `em2` ring + paint ring + seeded ballistic droplets at DRAWN, fg, in FRONT of the subject) and the `markerrail` paradigm (same flick verb at low amplitude); plate: punch with `punchOffset` ≈ window+0.05 so the punch lands on the splat, not the hero onset; needs `python3` |\n| `brushwrite` | SUMI-E GESTURE behind the subject: a warm paper wash (`palette.wash`/`wash2` radial, `targetWidth`+380 × `params.washH`) charges at I−0.18 to `params.wash`, settling to `params.washSettle` through the hold; the brush SLAPS down at the first pen point — a start-SPLAT (irregular ink ellipse rotated −24° + 5 seeded satellite dots, scale 0.35→1 power3.out 0.12s; the fg fleck pass rides `fx.brushflecks`) — then the hero word is written in ONE sequential gesture (Hershey dash reveal at constant pen speed, `gen-stroke-path.py` baked at compile time) as a FOUR-layer stack per stroke: blurred bleed (`params.bleedWidth`, feGaussianBlur 6, group hidden until the hold) under fat/mid/core widths (`fatWidth` 0.25 / `midWidth` 0.6 / `coreWidth` 1.0 stroke-opacity = pressure-tapered wet brush), the round ink nib (r7.5, `palette.nib`) riding the pen and flicking off (+42,−30, scale 1.9) at DRAWN; ≤`params.spatterN` spatter droplets eject PERPENDICULAR at the sharpest-curvature points of the gesture (angle-delta > 0.55 rad, te-separated > 0.045s); through the hold the ink BLEEDS into the paper (bleed group fades to `params.bleed` over ≤1.7s) and the whole work breathes 0.6% (`params.breatheHz` baked f(t), svgOrigin = ink center); then the vermilion SEAL chop (`params.sealGlyph`, `palette.seal`/`sealMid`/`sealLo` radial face, `fonts.seal` glyph) stamps at DRAWN+`params.sealDelay` — power4.in crush 0.09s → 2-frame squash → elastic settle + 3 seeded red flecks — skipped entirely if the clip ends too soon; writing window = `params.window` (demo 0.45s) clamped so write + seal + bleed fit before ENDT = DUR−0.04 | geometry registers on the MEASURED ink box (ink CENTER lands on scene-aware HG.y, pref top 19 — the sky band, crossing the subject silhouette is the point; gesture centers on the hero anchor, `targetWidth` capped at W−240 — on scenes with a dark object near the pen start, set `theme.hero.x` so the slap-down lands clear, like the demo's 864); the pen-START point is baked onto HG.fleckX/Y/T for the fg flecks and the seal sits at (inkR−103, inkBot+72) clamped on frame (`params.sealDx/sealDy` override); pairs with `fx.brushflecks` (seeded upward ballistic ink flecks at the slap-down, fg, in FRONT of the subject) and the `brushrail` paradigm (same brush-wipe verb at low amplitude); plate: punch with `punchOffset` ≈ window+`sealDelay` so the punch lands on the seal CONTACT, not the hero onset; needs `python3` |\n| `ransomnote` | RANSOM NOTE slam behind the subject: one cutout chip per letter (4 recipes cycled, seeded ±13% sizes around `hero.fontPx`, alternating-sign rotations ±2–5°, misaligned baselines ±2–6px, seeded tear-polygon edges) slams in oversized (scale 1.5, rot×1.8, flight drop-shadow) at S_k = I + 0.01 + `params.step`·k, crushes power3.in over 0.085s, and on contact the shadow POPS tight (1-frame filter swap) → 2-frame squash 1.07/0.93 → elastic settle; when the LAST letter lands the whole word takes a collective 1-frame JOLT (y6 → power3.out) + a scene pulse (`params.pulse` full-frame dark blink); hold = slow 5-key loom (the crooked grid never straightens); exit = letters RIPPED off one by one (rot+±15–22° throw, y−34, fade, 1-frame tear flash under each) at ripT = min(lastWord − `params.ripLead`, DUR-clamped), ≥ jolt+0.45; scene reaction = collage scrim (`params.scrim` top-dark gradient) charges at I−0.07, out with the rip | width-fit measures each glyph IN ITS OWN recipe font (`assets/fonts/char-widths.json`) + 0.20em chip padding + 6px margins so the collage never overflows; chip chrome (shadows, space width) scales with fontPx from the 130px demo cut; the setpiece RECOMPUTES `plate.punchOffset` = 0.01 + step·(N−1) + crush from the real letter count so the plate punch always lands on the collective jolt, whatever the hero word length; pairs with the `ransomrail` paradigm (same paste verb + tear flashes at low amplitude, same recipe classes/seeded tear polygon emitted into both layers); no front fx — the flashes live inside the chips |\n| `inkbloom` | INK DROP IN STILL WATER behind the subject: paper-white radial washes charge the two text zones (`palette.wash` rail wash from t≈0.15, PERSISTS to clip end so the closing body lines keep their ground — it registers on the body row geometry `body.bottomPx`/`rowGap`; `palette.washApex` apex wash at I−0.077, out with the bloom) and a gentle vignette (`params.vig`) STILLS the world while the ink blooms; the drop (ink teardrop, `params.fall` 0.15s) appears above the word point at I−0.08, swells, falls power2.in with a scaleY stretch, squashes 1.7/0.35 on contact (2 frames) and merges into the BLOOM — 3 stacked blurred irregular ink ellipses (`palette.ink`, opacity snaps 0.82/0.62/0.5 then decays) scaling at different rates with counter-rotations (expo.out 1.15/1.35/1.5s) + 2 thin concentric ripple rings expanding 7.2×/9.6× on the water surface; the hero words RESOLVE out of the blob (opacity snaps, blur 16→0 + scale 1.12→1 power2.out) — the FIRST at contact+0.02, the following at their own spoken times (multi-word hero, per-word hand-off); through the hold the glyph edges BREATHE (baked 5-key blur keyframes per word, alternating 0.66/0.5s), the group looms 1.018 and two faint ink wisps curl off the word top (C+0.573/C+0.753, fit-guarded); exit: RE-DISSOLVE (blur 11 + scale 1.15 + fade, 0.52s power1.in) at XOUT = min(I+`params.maxHold`, next body line − `params.clearGap`, DUR−0.6) — the ink clears before the next thought needs the reader | geometry derives from the measured word rect (`assets/fonts/char-widths.json`; kx = halfW/demoHalf, ky = fontPx/132 scale the demo's blob/ring/wisp anchors; pref top 25 — the sky band, crossing the subject silhouette is the point); dark `palette.ink` + its paper washes carry the contrast on bright skies; pairs with the `inkrail` paradigm (same bleed verb at low amplitude); plate: quiet `pushIn`, no punch — the bloom is liquid, not percussive |\n\nInline setpieces (`hero.inline: true`) live inside the body paradigm — the hero\nword stays in `lines`. Embed setpieces own the word: leave it OUT of `lines`\n(rail↔climax hand-off), except `panel` + `redact-until-hero`, where the words\nappear in the log as `█████` until the decode locks.\n\nA setpiece may additionally return `fgCss/fgHtml/fgJs` — those parts are merged\ninto the fg alpha page (rail.html), for furniture that must ride ABOVE the matte\n(e.g. a verbatim chip that may never be occluded) while the setpiece scenery\nstays embedded behind the subject.\n\n## Linkages\n\n- `redact-until-hero` — panel log shows hero words as blocks; un-redacts at lock\n- `corrupt-on-last-word` — panel jitters + hue-shifts on the final word\n- `disperse-on-last-word` — every visible poem letter scatters back to dust\n- `field-is-the-apex` — (lastpage) the blurred future-field rack-focuses at the\n apex: every faint line was the apex word all along; the main instance holds,\n the rest re-blur and die\n\n## Hard rules inherited (do not relax)\n\n- determinism: paused GSAP on `window.__timelines[\"main\"]`, seeded PRNG only,\n set-chains / keyframes, no Math.random/Date.now/CSS-keyframes\n- 80 ms word sync (timings come from transcript.json via the strict matcher;\n any uncovered transcript word is a compile ERROR — verbatim completeness)\n- apex owns the frame: fg furniture must avoid the setpiece rect or yield\n (`body.yield`) during the hero window\n- plate punch/shake ALWAYS post-composite (`_postfx.sh`) so subject + text +\n plate move as one photographed frame (matte never desyncs)\n\n## SVG gotchas (paid for, do not rediscover)\n\n- dash patterns restart on EVERY subpath → sequential per-stroke paths, never\n one dashoffset across a multi-stroke word\n- round linecap renders a DOT at dashoffset=len → hide each stroke until its turn\n- inline-block trailing spaces collapse → word gaps via margin, not text spaces\n- SVG-font glyph y is UP → flip when converting (gen-stroke-path.py does)\n- NEVER gsap x/y/scale on raw SVG children: it runs `_parseTransform`/getBBox, and\n zero-area shapes (fan-kit slivers) trip GSAP's bbox hack → `appendChild` on a\n null docElement in injected-gsap contexts (preview-frames, renderer). Jitter\n SVG pieces via `attr:{transform:\"translate(...)\"}` only; scale/loom belongs on\n an HTML wrapper div. Nuance: a ROOT `<svg>` inside a div has null\n ownerSVGElement → GSAP classifies it as HTML (CSS transforms, no getBBox), so\n scale/skew on the svg root is safe — but copying that onto an inner `<g>`\n becomes the fatal class. attr transforms can't TWEEN — use frame-quantized\n step chains (identical on screen at 24fps)\n\n## Timeline ownership rules (audit-derived, do not relax)\n\n- ONE owner per (target, property) at any instant. A duration tween re-renders\n every tick until it ends — any set/tween on the same property inside that\n window gets visually overwritten a frame later (1-frame ghosts, flash-backs).\n Known shapes: yield dim vs line exit; yield restore vs powercut set-chain;\n per-word line-y bounces with word gaps < 0.22s. The rail emitter guards these\n (bounce ownership tracker, dim clamped ≥ line-in, restore only with ≥0.3s\n runway before exit — else the line exits dimmed, by design).\n- Inverted clamps: `Math.max(lo, Math.min(hi, x))` with lo > hi silently pins to\n lo. When a lockup is wider than the frame, CENTER it (x = W/2) instead of\n clamping — decorative bleed must be symmetric.\n- The overflow gate only measures elements with direct text nodes — SVG-painted\n setpieces (mask text + rects) are invisible to it. Do not read its \"ok\" as\n proof for svg lockups; judge those on the preview frames.\n\n## theme.json — full schema\n\n```json\n{ \"dna\": \"<themes/*.json name>\", // required\n \"lines\": [[\"word\",\"word\",...], ...], // required — verbatim transcript tokens, in order,\n // INCLUDING punctuation (\"size.\", \"noise.\")\n \"minors\": [\"word\", ...], // optional — theme's inline emphasis treatment\n \"hero\": { \"match\": \"word or phrase\", // required — exact transcript tokens (case-insensitive,\n // punctuation-stripped match); first occurrence wins\n \"text\": \"DISPLAY FORM\", // optional display override\n \"out\": 5.9, \"exitAt\": 3.3 }, // optional window overrides (seconds)\n \"width\": 1280, \"height\": 720, // optional, default 1280x720 (theme DNAs are tuned\n // for 16:9; vertical needs a DNA variant)\n \"fps\": 24, // optional — matte.fps is AUTHORITATIVE when present\n \"panelHeader\": \"...\", // optional (panel paradigm)\n \"cuts\": [4.67, 5.73], // optional (stack) — shot cuts in seconds; default: detected\n \"chapter\": { \"match\": \"Save this.\", // optional (stack) — the chapter card on this phrase\n \"number\": \"4\", \"title\": \"things to put / in the air\",\n \"side\": \"left\", \"out\": 5.7 }, // \"right\" mirrors it; window override\n \"items\": [{ \"match\": \"Haze,\", // optional (stack) — one lower third per technique\n \"name\": \"Haze\", \"prompt\": \"thin haze, / volumetric light\", // \"/\" breaks the quote\n \"layout\": \"stack\", // \"stack\" | \"beside\" | \"right\"\n \"before\": \"Empty air\", // optional label on the shot before the next cut\n \"number\": \"1\", \"out\": 10.2 }] } // default number = position; window override\n```\n\nScene awareness (inherited from the existing typography system): when\n`safe-zones.json` is present the compiler re-anchors the hero setpiece to the\nmeasured occlusion bands (`heroBands.profile`, 18–55% occlusion, closest to the\nsetpiece's preferred height) and `heroAnchor.centerXPct`, width-fits the hero\nfont to the actual word, and docks panel/poem furniture on\n`subject.clearerSide`. Explicit `theme.json` values > scene auto > DNA fallback.\n\nExpected (benign) log noise: `[Browser:REQUESTFAILED] GET source.mp4\nnet::ERR_ABORTED` during the fg-layer page load, reel-glyph overflow lint\nlines, and `media_missing_data_start` — all cosmetic; the render is good if\nrender-theme.sh exits 0 and prints the gates summary.\n\n## Authoring a project (this is ALL a user writes)\n\n`<project>/theme.json`:\n\n```json\n{\n \"dna\": \"ordnance\",\n \"lines\": [\n [\"The\", \"stars\", \"were\", \"only\", \"limited\"],\n [\"by\", \"the\", \"pixel\", \"size.\"],\n [\"It's\"],\n [\"what\", \"you\", \"can\", \"actually\"],\n [\"recover\", \"from\", \"the\", \"noise.\"]\n ],\n \"minors\": [\"stars\"],\n \"hero\": { \"match\": \"remarkable\" }\n}\n```\n\n- `lines` follow the transcript verbatim, in order (compile error otherwise);\n every transcript word must be covered by `lines` ∪ `hero.match` — the example\n above omits \"remarkable\" from `lines` precisely because `hero.match` covers it\n (it slots between `[\"It's\"]` and `[\"what\",...]`)\n- leave the hero word(s) out of `lines` for embed setpieces; keep them for\n inline setpieces and for panel+redact\n- `takeover`: each line is one CARD — group by beat (1–2 words), not subtitle\n length; `panel` scrolls automatically past ~5 lines (terminal scroll)\n- the ordnance \"charge\" is an edge vignette + rail yield (the center stays\n clean by design) — judge it at the frame corners, not the center\n- `minors`: words that get the theme's inline emphasis treatment\n- preview first: `node scripts/make-theme.cjs <project>` then\n `node scripts/preview-frames.cjs <project> <t1> <t2> ...` (Visual QA)\n- then: `bash scripts/render-theme.sh <project>` → **`final_fx.mp4`** (the\n deliverable; `final.mp4` is pre-plate-reaction)\n\nThe `lesson` identity (`stack` paradigm) authors the same `lines` with a `\"|\"`\nbetween setup and payoff and, where a shot needs it, an `{x, y, s, p}` object\nplacing the stack; it adds `chapter` and `items`. Set `width`/`height` to the\nsource (it is proportional, so 4:3, 16:9 and 9:16 all work). Cut-together\nfootage is expected:\n\n```json\n{\n \"dna\": \"lesson\", \"width\": 1440, \"height\": 1080,\n \"lines\": [[\"Because\", \"|\", \"the\", \"air\", \"is\", \"empty.\", { \"x\": 838, \"y\": 640, \"s\": 38, \"p\": 70 }], [\"Save\", \"this.\"], [\"Haze,\", \"right?\"]],\n \"chapter\": { \"match\": \"Save this.\", \"number\": \"4\", \"title\": \"things to put / in the air\" },\n \"items\": [{ \"match\": \"Haze,\", \"name\": \"Haze\", \"prompt\": \"thin haze, / volumetric light\", \"layout\": \"beside\", \"before\": \"Empty air\" }]\n}\n```\n\nPrereqs identical to other modes — `prepare.sh` outputs: transcript.json,\nframes_fg/, matte.fps, safe-zones.json (scene awareness), source.mp4.\nframes_bg/ is only needed by preview-frames.cjs, not by the render.\n\n## Adding a theme DNA\n\nCopy a `themes/*.json`, change identity fields. You may ONLY combine existing\nparadigm/setpiece/linkage names — if the look you want needs a new mechanism,\nthat is a registry contribution (this file + make-theme.cjs), reviewed like an\nengine change. A DNA that needs per-word visual tuning to ship is rejected:\n**any input, zero hand-fixing** is the acceptance bar (the draw-on lesson).\n",
30
30
  "faceless-explainer/references/cut-catalog.md": "# Cut catalog — within-frame seams (worker-built)\n\n> **A worker build-recipe (Step 5) — the sibling of `../../hyperframes-animation/rules/`, not a second motion doc.** These are within-frame cuts the **frame worker builds INSIDE its own composition** (Z-scale + blur + opacity tweens, or per-word x-staggers, all on the frame's own paused GSAP timeline). They are **not** the between-frame transition: story owns that via `transition_in`, which the harness's injector stamps from a **separate registry vocabulary** (`crossfade` / `blur-crossfade` / `push-slide` / `zoom-through` / `squeeze`) — the catalog names here (**cut-the-curve / inverse-zoom / waterfall**) are **not** valid `transition_in` values. Use this catalog when a frame's shot sequence has an internal seam — a within-scene text/element swap, a **Scene-to-Scene** cut (a `Scene` is a time window WITHIN one frame, **not** a frame-to-frame boundary), or a text-to-text line change — and you want it to read as one continuous move instead of a hard slideshow cut. (`zoom-through` lives in both worlds: a whole-frame wrapper transition in the registry, an element-level Z-cut here — same idea, different scope.)\n\nFour techniques that create depth and continuity:\n\n1. **Zoom-Through** — within-scene text swaps, Z-axis, moving TOWARD the viewer\n2. **Inverse Zoom-Through** — Z-axis swaps moving AWAY from the viewer\n3. **Cut the Curve** — between-scene transitions on x/y\n4. **Waterfall Cut** — word-by-word cut-the-curve with staggered exits and entries\n\nAll four are the same underlying principle: **cut at peak velocity, match direction and\nspeed on both sides of the cut.** The differences are axis, scope, and granularity.\n\n**Choosing which at a seam:** for an UNFINISHED phrase (building one larger idea across\nseveral visually distinct scenes that still approach the same point — multi-line text, a\nrun of consecutive cards) use **cut-the-curve** / **waterfall**. For a STATE CHANGE (turning\nto a NEW part of the video — most often hook → context, between two distinct chapters) use\n**zoom-through**, and **inverse zoom-through** for an arrival / payoff beat. Chain these so\nthe frame's internal seams feel like one camera moving through the content.\n\n---\n\n## Blur Logic (applies to all Z-axis variants)\n\nBlur sells the speed at the cut, but it must scale with the SUBJECT SIZE:\n\n| Subject | Peak blur | Why |\n| ------------------------------------------------------ | ----------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| Text-scale (headline, line, word group) | **10px** | At 20px text smears into illegibility — the eye loses the word it was tracking and the cut reads as a glitch, not speed. At 20px letterforms go mushy mid-cut; 10px keeps them readable. |\n| Full-frame surface (terminal window, card, screenshot) | **18–20px** | Big surfaces have edges and texture that survive heavy blur; lighter blur on a full-frame move reads as a rendering hiccup instead of motion. |\n\nBoth sides of a cut use the SAME peak blur — the value must match at the swap frame.\nApply blur to the WRAPPER, never to individual children.\n\n---\n\n## 1. Zoom-Through (forward)\n\n### The Problem\n\nText enters, holds, exits. Then next text enters, holds, exits. Each text block is\nindependent — no depth, no continuity. The video feels like a slideshow.\n\n### The Principle\n\nA velocity-matched cut on the Z-axis. You **never see both texts at the same time.** The\noutgoing text scales toward the viewer (accelerating), blur and opacity peak at the cut\npoint hiding a hard swap, and the incoming text continues scaling up from behind\n(decelerating into the focal plane). One continuous forward motion, two different texts.\n\n### The Three Phases\n\n**Phase 1: Exit** — text accelerates forward (toward viewer)\n\n- Scale: `1.0 -> 1.2`, Blur: `0px -> 10px` (text-scale; see Blur Logic), Opacity: `1.0 -> 0.15`\n- Scale/blur easing: `power3.in` (steep acceleration)\n- Opacity easing: `none` (linear — even dimming, separated from scale)\n- Duration: 0.2s\n\n**Phase 2: Hard cut** at peak velocity + peak blur\n\n- Outgoing: `opacity: 0` (instant via `tl.set`)\n- Incoming: `opacity: 0.15, scale: 0.75, blur: 10px` (instant via `tl.set`)\n- All properties match at the cut: blur, opacity, and scale DIRECTION (both scaling up)\n\n**Phase 3: Entry** — text continues forward (growing into focal plane)\n\n- Scale: `0.75 -> 1.0`, Blur: `10px -> 0px`, Opacity: `0.15 -> 1.0`\n- Easing: `expo.out` (steep initial burst matching exit velocity, long settle)\n- Duration: 0.5s\n\n### Why Opacity Must Be Separate on Exit\n\nScale uses `power3.in` but that keeps opacity near 1.0 for most of the tween. Splitting\nopacity to its own tween with linear ease makes the dimming even. On entry, all properties\ncan share `expo.out`.\n\n---\n\n## 2. Inverse Zoom-Through (backward)\n\nThe mirror: the camera \"pulls back\" instead of pushing through. The outgoing element\nRECEDES away from the viewer; the incoming element arrives OVERSIZED (as if it had been\njust behind the camera) and retracts into the focal plane. Both move in the shrinking\ndirection — same-direction rule preserved, just reversed.\n\n**When to use over the forward variant:** arrival beats. The incoming element lands with\npresence because it comes from larger-than-frame — right for a payoff line (\"That changes\ntoday.\"), a giant reply, or a held end-state. Forward zoom-through reads as _progressing\nthrough_ content; inverse reads as _arriving at_ content.\n\n### The Three Phases\n\n**Phase 1: Exit** — element recedes (away from viewer)\n\n- Scale: `1.0 -> 0.8`, Blur: `0px -> 10px` (text-scale)\n- Scale/blur easing: `power3.in`; Opacity: `1.0 -> 0.15` on `none` (separate tween)\n- Duration: 0.2s\n\n**Phase 2: Hard cut**\n\n- Outgoing: `opacity: 0` via `tl.set`\n- Incoming: `opacity: 0.15, scale: 1.25, blur: 10px` via `tl.set`\n\n**Phase 3: Entry** — incoming retracts into place\n\n- Scale: `1.25 -> 1.0`, Blur: `10px -> 0px`, Opacity: `0.15 -> 1.0`\n- Easing: `expo.out`, Duration: 0.5s\n\n---\n\n## 3. Cut the Curve (Scene Transitions)\n\n### The Principle\n\nUse cut-the-curve for **all scene-to-scene transitions** on x and y axes. The outgoing\nscene's hero element accelerates in one direction, the cut lands mid-motion, and the\nincoming scene's hero element continues moving in the **same direction** and decelerates.\nNothing exits fully off-screen and nothing enters from fully off-screen — **speed plus\nopacity fading trick the eye**; the partial moves are enough.\n\n### Same Path, Same Direction\n\nIf Scene A's hero slides left, Scene B's hero enters from the right and continues sliding\nleft. Both move leftward. One continuous motion.\n\n| Direction | Scene A exit | Scene B entry start | Scene B entry end |\n| --------- | -------------- | ------------------- | ----------------- |\n| Leftward | `x: 0 -> -230` | `x: +230` | `x: 0` |\n| Rightward | `x: 0 -> +230` | `x: -230` | `x: 0` |\n| Upward | `y: 0 -> -230` | `y: +230` | `y: 0` |\n| Downward | `y: 0 -> +230` | `y: -230` | `y: 0` |\n\n### Velocity matching via mirrored eases\n\nThe cleanest match: exit `power4.in` and entry `power4.out` with the SAME distance and\nduration — mathematically the two halves of one `power4.inOut` composite, so the entering\nelement picks up at exactly the 50% point of the notional path at identical velocity\n(e.g. 230px / 0.3s ≈ 3,070 px/s at the cut on both sides).\n\nThe fade trick: the exit's opacity completes at ~25–30% of its travel (fade duration\n≈ 0.18–0.3s vs motion 0.3–0.34s) — the element vanishes while still visibly accelerating,\nand nothing has to reach the frame edge. Entry fades IN fast from ~0.35 under its\ndeceleration. Time the LAST fading element to die right at the hard cut — gaps where\nnothing is moving read as awkward dead air.\n\n### Rules\n\n- Use cut-the-curve for all scene transitions — it's the default, not an accent\n- Same direction on both sides; mirrored `.in`/`.out` eases, same distance + duration\n- Exit duration short (0.2–0.4s), entry duration >= exit duration\n- Partial travel + fade, never full off-screen moves\n\n---\n\n## 4. Waterfall Cut (word-by-word cut-the-curve)\n\nCut-the-curve at WORD granularity — the strongest version of the leftward cut for\ntext-to-text seams. Each word of the outgoing line ramps out on its own pronounced curve;\neach word of the incoming line cascades in mid-flight. The stagger turns the cut into a\nwave the eye rides across the seam.\n\n### Exit (per word)\n\n- Motion: `x: 0 -> -230` over 0.34s on **power4.in** — a much more pronounced ramp than\n the usual power2: the word barely creeps, then RIPS\n- Fade: `opacity -> 0` over 0.18s (separate tween, `power1.in`) — completes when the word\n is only ~25–30% into its travel\n- Stagger: reading order, ~0.022s per word, timed so the LAST word finishes fading right\n at the hard cut\n\n### Entry (per word)\n\n- `fromTo x: +230 -> 0, opacity: 0.35 -> 1` over 0.3s on **power4.out** — the mirrored\n back half of the composite; every word ignites already moving at matched velocity\n- Waterfall stagger with SHRINKING gaps (start 0.05s, multiply by ~0.84 per word) so the\n cascade accelerates across the line — the cascade should speed up word over word, not run\n at a flat per-word delay\n- Pre-set all words to `x: +230, opacity: 0` at build time — `immediateRender: false`\n alone leaves un-started words sitting visible at rest during the stagger window\n\n### Whole-line variant\n\nA single-line beat (e.g. a big intro line) exits as one group with the same pronounced\nramp, but stretch its fade to ~0.3s ending ~0.02s before the cut — a lone element that\nfades early leaves dead air that a word cascade would have covered.\n\n---\n\n## Choosing a Variant\n\n| | Zoom-Through | Inverse Zoom | Cut the Curve | Waterfall Cut |\n| -------------- | --------------------------- | --------------------------- | ----------------- | ------------------------- |\n| Scope | Within-scene text swap | Arrival/payoff beat | Between scenes | Text-to-text seam |\n| Axis | Z, toward viewer | Z, away from viewer | X / Y | X, per-word |\n| Peak blur | 10px text / 20px full-frame | 10px text / 20px full-frame | none required | none (fade does the work) |\n| Opacity at cut | 0.15 | 0.15 | exit faded by cut | last word dies at cut |\n| Feel | progressing through | arriving at | carried sideways | a wave across the seam |\n\n---\n\n## Anti-Patterns\n\n| Don't | Why | Instead |\n| ---------------------------------------- | ------------------------------------------- | ------------------------------------------------------ |\n| Two texts visible during a zoom-through | Overlapping text breaks the Z-axis illusion | Hard cut at blur peak, one text at a time |\n| 20px blur on text-scale subjects | Letterforms smear; reads as a glitch | 10px for text, 18–20px only full-frame |\n| Elements on different paths across a cut | Eye tracks one direction, cut goes another | Same property, same direction |\n| Mismatched blur/opacity at the swap | Visible flash or brightness jump | Identical values at the cut frame |\n| Gentle easing on entry (`power2.out`) | Entry velocity feels slower than exit | Mirror the exit: `power4.out` / `expo.out` |\n| Full off-screen exits / entries | Wastes time and breaks the speed illusion | Partial travel + early fade |\n| Lone element fading long before its cut | Dead air at the seam | Fade ends ~0.02s before the cut, or use a word cascade |\n| Zoom-through on body text | Small text at 0.75 scale is unreadable | Only headlines and short phrases |\n| Scene cuts without cut-the-curve | Static cuts feel like a slideshow | Cut-the-curve is the default |\n",
31
31
  "faceless-explainer/references/motion-language.md": "# Motion language — the move vocabulary + the motion doctrine + the seek-safe core\n\n> The motion layer for **Step 4 (Visual design)**. When you write a frame's **time-coded shot sequence**, you name each scene's move **inline from the vocabulary below** — a named palette of the moves the golden corpus actually uses. Each move carries the **backing rule id** in this skill's local `../../hyperframes-animation/rules/`; cite that id so the move resolves to a real recipe when a **frame worker** implements it in Step 5 (the worker reads the rule body in `../../hyperframes-animation/rules/<id>.md` — it reproduces the move, it does not guess from the name). You name motion by **role / move name**, never by raw GSAP curve, ms, or stagger formula — the worker maps the curve. Between-frame **transitions are not yours**: story names `transition_in`, the harness injects it; that injected transition **is** the frame's exit. For cuts a worker builds INSIDE a frame (within-scene swaps, scene-to-scene seams), see the catalog in `cut-catalog.md`.\n\nA good explainer feels like one continuous film — one camera, one motion feel, **smooth and timed to the voiceover** — not a pile of slides that animate once and freeze. In an explainer the development _is_ the teaching: the formula assembling, the diagram gaining a layer, the count-up landing. The doctrine in Part 2 is load-bearing: when in doubt, do what it says.\n\n---\n\n# Part 1 — the move vocabulary\n\nReach into this palette when naming a scene's motion. Pick the move that matches the beat, name it in the shot sequence, and cite the rule id after `→`. The blueprints (`../../hyperframes-animation/blueprints/`) name these same moves in their `rule mapping`; you're drawing from one shared palette. Compose 2–4 across a shot's scenes (entrance → sequential reveal → settle), not all at once.\n\n## Kinetic type\n\n- **hard-cut / flash word-swap** — a word or line replaces the previous one on an instant cut (no fade/roll); the swap itself is the beat. → `discrete-text-sequence`\n- **in-place token cycle** — a fixed line holds and only its variable slot changes, token → token → token. → `discrete-text-sequence`\n- **per-word staggered reveal** — a phrase assembles word-by-word (or chunk-by-chunk), each landing on its own beat. → `dynamic-content-sequencing`\n- **kinetic beat-slam** — short phrases slam in on a shared percussive beat array, each with a distinct entrance, resolving on a locked finale; the recipe for \"punchy / rhythmic\" taglines. → `kinetic-beat-slam`\n\n## Typewriter\n\n- **type-on with caret** — text types in character-by-character behind a blinking caret. → `discrete-text-sequence` (+ `context-sensitive-cursor` for the caret blink / color)\n- **backspace-and-retype** — the line types, deletes the last word(s), and retypes a new one (typo-correction, reframe). → `discrete-text-sequence` (+ `context-sensitive-cursor`)\n\n## Count-up / data\n\n- **value-scaled counter** — a number counts up and its font size grows with the value, so the climb itself escalates. → `counting-dynamic-scale`\n- **bars / progress / star wipe** — a number paired with a graphic that fills: bar-height stagger, a progress bar / ring filling, a fractional star-rating wipe. → `stat-bars-and-fills`\n\n## Reveal / decode\n\n- **3D char flip-decode** — characters flip in 3D and resolve from scrambled glyphs to the real text (decryption feel). → `hacker-flip-3d`\n- **SVG self-draw** — an outline / icon / ring draws itself stroke-by-stroke. → `svg-path-draw`\n\n## Camera\n\n- **push / focus / drift** — a sequential camera move on the frame root (pull-back → focus → push) plus continuous micro-drift; the cinematic baseline. → `multi-phase-camera`\n- **zoom-to-target** — zoom into a non-centered element (scale + counter-translate to keep it framed). → `coordinate-target-zoom`\n- **pan / focus-lock** — a virtual camera transforming one `.world` wrapper to pan / zoom / lock onto a region. → `viewport-change`\n- **camera-cursor-tracking** — the viewport locks to a moving focal point (a typing cursor), static framing then focal-locked tracking. → `camera-cursor-tracking`\n\n## Layout motion\n\n- **cluster→outward expansion** — elements start clustered at center and expand outward to their final positions in lockstep. → `center-outward-expansion`\n- **orbit** — elements flip in from 3D space and settle into a continuous elliptical orbit (entry flips in-place at the orbital position). → `orbit-3d-entry`\n- **split-tilt cards** — two cards side-by-side with opposing rotationY tilts, entering from their respective sides (comparison / before-after). → `split-tilt-cards`\n- **logo/avatar ring + connectors** — avatars or logos on an elliptical ring with SVG connection lines to a center point, staggered entry. → `avatar-cloud-network`\n\n## Surface / UI\n\n- **3D page-scroll reveal** — a full webpage as a tilted 3D card whose internal content scrolls to reveal specific sections. → `3d-page-scroll`\n- **cursor click + ripple** — a cursor moves to a target, depresses with it on click, and emits an expanding ripple. → `cursor-click-ripple`\n- **button press** — a tactile press: compression then spring recovery, optional release burst / glow. → `press-release-spring` (or `physics-press-reaction` for a click that compresses cursor + target together)\n- **keyword glow** — keywords light up with glow + scale + color on an attack-decay-rest envelope, synced to a word rail. → `asr-keyword-glow`\n\n## Morph / handoff\n\n- **scale-swap** — two elements at the same screen center hand off: the outgoing cluster shrinks + fades as the incoming one arrives. → `scale-swap-transition`\n- **card morph-anchor** — a container morphs apparent size + corner radius + surface between two shots, then fades to reveal the real target beneath (HyperFrames uses uniform `scale`, not `width`/`height`). → `card-morph-anchor`\n\n## Seam cuts (worker-built, inside a frame)\n\nThe velocity-matched cuts a worker authors between a frame's own Scenes. Name the seam in the shot sequence; the recipe is in the catalog, not a single `../../hyperframes-animation/rules/` id.\n\n- **zoom-through / inverse zoom-through** — a within-scene swap on the Z-axis; forward reads \"progressing through\", inverse reads \"arriving at\" (payoff). → `cut-catalog.md`\n- **cut-the-curve** — a scene-to-scene cut where both sides move the same direction at matched velocity. → `cut-catalog.md`\n- **waterfall cut** — cut-the-curve at word granularity, a wave across a text-to-text seam. → `cut-catalog.md`\n\n## Emphasis / marker\n\n- **highlight / circle / burst / scribble** — a marker-drawn emphasis on a word or element: yellow highlight sweep, hand-drawn circle, radiating burst, scribble, or rough sketch-outline. → `css-marker-patterns`\n\n## Aliveness during a hold (use sparingly — see Part 2)\n\n- **subtle jitter** — the sanctioned way to keep a settled frame alive: a small, low-amplitude positional/scale jitter on the held element. The motion-graphics trick that reads \"alive\" without reading \"weak.\" → `sine-wave-loop` (low-amplitude register)\n- **live SVG internals** — internal SVG parts move so an icon feels alive (rotating hands, oscillating blades, pulsing dots, dash-flow); fine because it's the subject doing something, not a card breathing. → `svg-icon-enrichment`\n- **finite bounded ambient** — a single bounded breathe/drift on ONE held hero, only when genuinely needed; de-emphasized — prefer sequential reveal or jitter first. → `sine-wave-loop`\n\n## The added moves — now backed by local rules\n\nFive moves the golden corpus needs were added to this skill's `../../hyperframes-animation/rules/`, rounding out the vocabulary above:\n\n- **depth-of-field / selective-blur** — blur the off-focus subset to spotlight the focal element → `depth-of-field-blur`\n- **motion-blur streak** — directional velocity blur on a fast fly-in / camera push-through → `motion-blur-streak`\n- **3D depth scatter-assemble** — glyphs/elements scatter into a tumbling 3D cloud, then reassemble → `depth-scatter-assemble`\n- **spring-pop entrance** — the canonical entrance pop; default to a smooth long-tail settle, overshoot only when explicitly playful → `spring-pop-entrance`\n- **ambient glow / bloom** — un-triggered soft glow blooming behind a static hero → `ambient-glow-bloom`\n\n---\n\n# Part 2 — the motion doctrine (load-bearing)\n\nThese four rules are the difference between a clip that reads as a serious explainer and one that reads as an agent-made PowerPoint. Follow them as written.\n\n## 1. Smooth beats bouncy — `power3` is the default\n\nElements should use **long-tail decel curves that let them settle smoothly. `power3` is enough in most cases.** No bouncy, no overshoot, no `back.out` / `bounce.out` / `elastic.out` as a default.\n\nBouncy is the **#1 instant turn-off** in user-made Remotion / HyperFrames videos, and the agent almost never gets it right — it thinks bouncy adds emphasis, but it buys that emphasis at the cost of cleanliness. The serious motion-design shops feel the same. **Smooth always wins.** Overshoot is demoted to a **rare, explicitly-playful exception** (a consumer/fun logo slam, a deliberate bell-hit) — never the house style. Name the intent as a long-tail settle; the worker maps `power3` (or `expo.out` on a fast arrival). See `../../hyperframes-animation/rules/spring-pop-entrance.md` — it now leads with the smooth settle. (The exact form of that settle is a critically-damped spring; the worker has a baked, seek-safe `springEase` — ζ=1 — in `../../hyperframes-animation/adapters/gsap-easing-and-stagger.md` → Spring Eases for when the settle is the hero. Real physics, same doctrine — not a license for bounce.)\n\n## 2. Sequential reveal in the back ~50%, timed to the voiceover\n\nThis is the anti-PowerPoint mechanism — sharper than \"put development in the middle.\"\n\n- **Don't dump everything on screen in the first ~25%** of the scene. Rushing all content in up front is exactly what forces the slideshow feel.\n- **Reveal each piece — a line, a card, even an h1 — when the voiceover mentions it**, sequencing reveals across the **later ~50%** of the scene. Same amount of agent work, but the cut becomes coherent and gains rhythm.\n- **Less is more.** Fewer things on screen, each arriving on its VO beat, beats a full canvas that animated once and froze.\n\nPractically: a frame's shot sequence front-loads almost nothing — the entrance carries only what the VO is saying at t=0, and the rest of the elements wait in the timeline for their spoken cue. A reveal maps onto a development-class move from Part 1 (`per-word staggered reveal`, `cluster→outward expansion`, a `count-up`, an `asr-keyword-glow` synced to the word rail).\n\n## 3. No lazy breathing, no bad pan/push — \"no motion over bad motion\"\n\nThe agent's two reflexive ways to fake \"aliveness\" both read cheap:\n\n- **No lazy breathing.** Scaling cards/text up and down in a circular loop to look \"alive\" is the cheap tell. Don't reach for it.\n- **No bad slow pan / push in the back half.** A slow pan or push on elements in the later ~50% of a scene **disrupts the viewer's sightline and causes eye discomfort** — it actively makes the frame worse, not better.\n\nThe fix for both is the same: **stagger element reveals in time with the script** (rule 2). And the governing principle: **\"I'd rather have NO motion than BAD motion.\"** A held, still frame is better than a frame kept \"alive\" by breathing or a drifting camera. The **only sanctioned aliveness** during a hold is **subtle jitter** — a small low-amplitude jitter that keeps a frame from feeling dead without looking weak (it's in current video work now). Everything else holds.\n\n## 4. Internal seams are velocity-matched cuts\n\nWhen a frame has an internal seam — a within-scene swap, a Scene-to-Scene cut, a text-to-text line change — make it a **velocity-matched cut**, not a hard slideshow cut: cut at peak velocity, match direction and speed on both sides. The catalog (the four techniques, the blur logic, and which to use when) is `cut-catalog.md`; the moves are listed under **Seam cuts** in Part 1.\n\n## One-line summary\n\nSmooth long-tail (`power3`) over bouncy; reveal sequentially in the back ~50% timed to the VO (not dumped in the first 25%); no lazy breathing and no bad slow pan/push — prefer stillness, with subtle jitter as the only aliveness; cut at peak velocity with matched direction/speed (→ `cut-catalog.md`).\n\n---\n\n# Part 3 — the seek-safe core (hard rules)\n\nThe frame is a **paused GSAP timeline seeked frame-by-frame**, so some \"continuous\" intents from a real-time engine can't render — don't name them. These are non-negotiable regardless of doctrine.\n\n- **No infinite / forever motion** — \"particles loop endlessly,\" \"logo rotates forever,\" \"marquee on repeat.\" Any aliveness (the subtle jitter, a live SVG internal, a needed bounded ambient) is a **finite tween over the hold**, never `repeat` / `yoyo`.\n- **No randomness or wall-clock** — no `Math.random` particle fields, no `Date.now` drift. Every render must be identical; name deterministic motion only (stagger and any variation derive from the element index).\n- **Entrances use `fromTo`** — state the from-state explicitly so a seek to `t=0` lands the element correctly; never rely on a CSS-hidden start (it renders visible before the tween claims it, and flickers under seek).\n- **No CSS `transition` / `@keyframes` for motion** — CSS animation runs on the browser clock, independent of the HF seek clock; it desyncs and flickers. Drive all motion inside the paused GSAP timeline.\n- **Entrance + sequential reveal only — no mid-video exit.** The frame unmounts via the harness transition; that injected `transition_in` **is** the exit. Exit motion belongs only to the final frame. (Worker-built seam cuts in `cut-catalog.md` are within-frame, not the frame's exit.)\n\n## Forbidden — the failure modes\n\n**Slideshow (the primary failure):** everything dumped on screen in the first ~25%; content enters then freezes; nothing revealed on its VO cue. Fix with rule 2 (sequential reveal timed to the VO).\n\n**Cheap aliveness:** circular breathing as \"life\"; a slow pan/push in the back half disrupting the eye; many elements floating independently as \"motion.\" Fix with rule 3 (stillness + subtle jitter only).\n\n**Bouncy:** `back.out` / `bounce.out` / `elastic.out` as the default entrance; hand-keyed overshoot. Fix with rule 1 (`power3` long-tail; overshoot only when explicitly playful).\n\n**Always:** no `repeat` / `yoyo`; no `Math.random` / `Date.now`; no all-elements-entering-simultaneously (sequence or stagger).\n\n## Naming motion in a shot — example\n\n> Scene 1 (0.0–1.0s): solid field; hero headline enters via **per-word staggered reveal** (`dynamic-content-sequencing`) on a smooth long-tail settle (`power3`); slow **push** on the root (`multi-phase-camera`) holds steady — no back-half re-push.\n> Scene 2 (1.0–3.0s): as the VO names each step, five mechanism nodes reveal **sequentially** via **cluster→outward expansion** (`center-outward-expansion`), then a **value-scaled counter** (`counting-dynamic-scale`) ticks up beneath them — the back-half reveal, timed to the script, not dumped at t=0.\n> Scene 3 (3.0–4.2s): hold on the result; **keyword glow** (`asr-keyword-glow`) lands on the payoff word as the VO says it; settles and holds still — at most **subtle jitter** (`sine-wave-loop`, low amplitude) keeps it alive; no breathing, no drift.\n\nName the move + its rule id (or `cut-catalog.md` for a seam cut) per scene; let the worker pick curves, ms, and stagger — defaulting to `power3`.\n",
32
32
  "faceless-explainer/references/story-design.md": "# Story design — faceless explainer video\n\nUse this reference in Step 3 to write `STORYBOARD.md` and `SCRIPT.md` for a faceless explainer — a topic, concept, how-to, listicle, or narrative explainer built from text, with **no product, no website, and no captured assets**.\n\nThis file defines the story: what the video teaches, in what order, and why each frame exists. It does not define layout, visual effects, animation, or final markdown schemas. For exact file syntax, follow `../../hyperframes/references/storyboard-format.md` and `../../hyperframes/references/script-format.md`.\n\n## Read first\n\nRead these inputs before writing:\n\n1. `hyperframes.json` — locked brief: angle, length, aspect ratio, language.\n2. `frame.md` — tone, mood, design system, and register.\n3. `capture/extracted/visible-text.txt` — the article / notes / topic / brief (the source of **information**).\n4. `user_script.txt` and `VO_MODE`, when the user pasted a script.\n\nThere is no `asset-descriptions.md` and no `capture/assets/` to inspect — this is faceless. Every visual is invented downstream (Steps 4-5); your job here is the **narrative**, not a visual asset list.\n\n## Output\n\nCreate two files:\n\n- `STORYBOARD.md` — the teaching plan, one frame per beat.\n- `SCRIPT.md` — the locked narration, only for spoken frames.\n\nEvery storyboard frame must include the required fields from the storyboard format reference, plus the narrative metadata below.\n\n## Core rule\n\nAn article is an information dump. A video is a guided act of understanding.\n\nDo not follow paragraph order. Reorder, merge, omit, and compress the source text into a clear teaching sequence. Strip the asides; surface the spine. **The single most common failure is paraphrasing the article in order — do not do that.** The input text is the source of information, not a story template.\n\n## Step 3 method\n\n### 1. Extract the teaching truth\n\nFrom the brief and text, identify:\n\n- Audience — who the video is speaking to, and what they already (don't) know.\n- Gap or stakes — the confusion, question, or \"why care\" the explanation resolves.\n- Thesis — the one-line idea the viewer should walk away with.\n- Spine — the 3-6 ideas (mechanisms / steps / items / beats) that build to the thesis.\n- Evidence — the concrete numbers, examples, comparisons, or worked cases that ground it.\n- Landing — the takeaway or the call to think / try / act.\n\nWrite the storyboard around the thesis, not around the article's sections.\n\n### 2. Match the register to `frame.md`\n\nUse `frame.md` as a soft guide — the visual system tunes the **voice**, not the structure:\n\n| `frame.md` signal | Story effect |\n| ------------------------------ | -------------------------------------- |\n| warm, handmade, notes-like | plain, considered, low-hype; humane |\n| bold, poster-like, declarative | short punchy beats, confident claims |\n| friendly, polished, modern | approachable direct address, lighter |\n| literary, technical-but-human | thoughtful, precise; safe for code/dev |\n\nThe teaching truth decides the arc. The visual system tunes the voice.\n\n### 3. Choose one explainer structure\n\nPick **one** structure (or explicitly name a compound). Do not splice phases from different structures — each is a complete path through understanding.\n\n| Structure | \"It is…\" | Use when the payload is… | Body shape |\n| ------------------- | ------------------------------------------------ | ----------------------------------------------------------- | -------------------------------------------------------------------- |\n| `concept-explainer` | \"what is X, and why does it matter\" | one idea/term/phenomenon the audience half-knows | name concept → reveal mechanism layer by layer → land implication |\n| `how-to-process` | \"here is how to do / how X works,\" ordered steps | a procedure or mechanism with a clear start→finish | a 3-6 step sequence on a consistent visual stage, one move each |\n| `listicle` | \"N things about X\" | a set of parallel, co-equal items (tips, mistakes, reasons) | hook → N roughly co-equal items → wrap; rule-of-three is strongest |\n| `story-explainer` | teach through a narrative arc | case studies, histories, cautionary tales | setup → tension → turn → resolution → lesson; the lesson generalizes |\n\n**Choosing:** one idea to understand → concept; an ordered procedure → how-to; parallel co-equal items → listicle; a concrete narrative/case → story.\n\n**Compounds** layer an outer arc with an inner rhythm — e.g. `concept-explainer with process` (ordered steps inside the mechanism phase), `story-explainer with how-to`. Set `arc` in the frontmatter to the chosen structure (or `<outer> with <inner>`). The downstream visual phase reads it for pacing: a process inner rhythm means tighter seams on a consistent stage and shorter frames.\n\n### 4. Build the frame sequence\n\nEach frame needs one clear job. Avoid frames that only say \"more detail\" or \"another point.\"\n\nFor every frame, define (use the storyboard format's fields, with these narrative additions in the frame's metadata + prose):\n\n- `type` — one of `hook | pain_point | product_intro | feature_showcase | benefit_highlight | social_proof | branding | cta`. This enum is shared with the downstream visual layer for pacing; **repurpose** it for teaching per the mapping below.\n- `persuasion` — a **named** rhetorical / clarity technique (see catalog), not \"explain the idea.\"\n- `beat` — the target feeling (see vocabulary).\n- `scene` — a one-line visual idea, not detailed composition.\n- `voiceover` — spoken guide text, or empty for silent frames.\n- `transition_in` — a registry transition name (see Transitions).\n- `blueprint` _(optional candidate)_ — consult the role→blueprint menu in `../../hyperframes-animation/blueprints-index.md`; when a proven shape fits this beat, tag its id (a tag, not a commitment — Step 4 confirms or overrides). Then **write the `voiceover` in the shape that blueprint implies**, so the line is reveal-ready before Step 4 ever runs. Teaching truth still decides which beats exist — never invent, drop, or bend a beat just to fit a shape; omit `blueprint` and write the line plainly when none fits.\n\nIn the prose under each frame, state:\n\n- `narrativeRole` — the scene's **job** in the explanation (e.g. \"Concretizes compound interest as a snowball,\" not \"Shows a chart\").\n- `keyMessage` — the one thing the viewer should understand after this frame (one sentence).\n\n### Type-enum repurposing (shared enum → explainer roles)\n\nThe enum is shared with the downstream visual layer; map your explainer roles onto it so downstream pacing matches the frame's job:\n\n| Explainer role you want | Use `type` | Why this value |\n| -------------------------------- | ------------------- | -------------------------------------------------------------------- |\n| Hook / curiosity gap | `hook` | The high-leverage opening 3-5s. |\n| Pain / problem / why-care | `pain_point` | The friction or gap the explanation resolves. |\n| Name the core concept | `product_intro` | \"Introduce the protagonist\" — here the protagonist is the **idea**. |\n| Mechanism / step / item | `feature_showcase` | A unit of the body — one move of a process, one mechanism, one item. |\n| Implication / payoff / \"so what\" | `benefit_highlight` | The consequence or value of understanding. |\n| Evidence / example / data point | `social_proof` | A concrete grounding: a number, a worked example, a comparison. |\n| Thesis / takeaway / principle | `branding` | The philosophical landing — the generalizable idea, the one line. |\n| Call to think / try / act | `cta` | The closing ask — try it, watch for it, question it. |\n\nThe body is usually a run of `feature_showcase` (steps/mechanisms/items), interleaved with `benefit_highlight` (implications) and `social_proof` (examples/data). At least one `feature_showcase` or `product_intro` should exist (every explainer has a body and a named idea).\n\n## Hook strategy\n\nPick one opening strategy for the first 3-5 seconds. For explainers the hook opens a cognitive gap or stakes:\n\n| Strategy | Use when | Example |\n| ---------------------- | -------------------------------------------------- | ---------------------------------------------------------------- |\n| Shocking statistic | A credible number quantifies the stakes. | \"90% of plastic ever made has never been recycled.\" |\n| Rhetorical question | Create an immediate cognitive gap. | \"Why does time seem to speed up as you get older?\" |\n| Counterintuitive claim | The truth contradicts common belief. | \"Adding more lanes to a highway makes traffic worse.\" |\n| Pain validation | The audience already feels the confusion. | \"Everyone says 'just diversify' — nobody says what that means.\" |\n| Visceral metaphor | The idea is abstract and needs to become concrete. | \"Your attention is a spotlight, and apps fight over the switch.\" |\n| Concept announcement | The term itself is the subject; make it memorable. | \"There's a word for this: the bystander effect.\" |\n| Direct address | The audience is clearly defined. | \"If you've ever rage-quit a recipe halfway — this is for you.\" |\n| Imagine / scenario | A thought experiment frames the whole piece. | \"Imagine money that loses value if you don't spend it.\" |\n| Stakes / consequence | The \"why care now\" is a real cost or risk. | \"Get this one step wrong and the whole batch is ruined.\" |\n\nThe hook must create curiosity, tension, or stakes. Do not open with a generic definition. Per `../../hyperframes-creative/references/story-spine.md`: the hook speaks the viewer's language (the payoff of understanding, never the source text's section headings), and the thesis (`message`) lands by beat 2 — the explanation after that is its evidence.\n\n## Clarity / rhetoric technique catalog\n\n`persuasion` is a **named technique** — how this frame makes the idea land or clear — not a vague intent. Combine when several are active (e.g. \"Analogy + progressive disclosure\").\n\n| Family | Techniques |\n| -------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- |\n| **Make-concrete** | Analogy / metaphor · Concretization (abstract → tangible object) · Worked example with real numbers · Anchoring on a familiar referent |\n| **Reveal-in-order** | Progressive disclosure (one term/layer at a time) · Build-up (simple → general case) · Signposting (\"first… then… finally\") |\n| **Contrast** | Before/after · Common-belief vs reality · Comparison of two options · Counterexample (here is when it breaks) |\n| **Structure** | Rule of three · Numbered enumeration · Question→answer pairing · Frame-then-fill (state the shape, then populate it) |\n| **Evidence** | Statistical proof · Citation / source · Demonstration (show the mechanism running) · Causal chain (A → B → C) |\n| **Memory & landing** | Callback (return to the hook's image) · Distillation (compress to one line) · Coined term / mnemonic · Generalization (specific → principle) |\n\nWhen no catalog technique fits, name a new one inline and explain its mechanism (e.g. \"Subtractive framing: define the concept by what it is _not_ first\"). Never write generic \"explain the idea.\"\n\n## Emotional beats\n\n`beat` is one word or a short compound phrase (e.g. \"Curiosity and clarity\"). Avoid generic \"positive\" / \"interested.\" Explainers ride a comprehension arc:\n\n- **Negative valley** — _open the gap_ (hook / pain_point): curiosity · puzzlement · surprise · tension · concern · skepticism · recognition · intrigue\n- **Pivot** — _orient_ (product_intro / concept-naming): clarity · orientation · anticipation · focus\n- **Build** — _build understanding_ (feature_showcase / benefit_highlight / social_proof): comprehension · \"aha\" · confidence · fascination · foresight · momentum · conviction · delight · unease (for a caveat) · mastery\n- **Resolution** — _land_ (branding / cta / final): clarity · satisfaction · resolve · inspiration · inevitability · \"now I get it\"\n\nCompound beats are often strongest, e.g. \"Surprise + recognition\", \"Comprehension + delight.\"\n\n## The body is a sequence, not a single frame\n\nAn explainer's core is almost always **3-6 body frames on a consistent visual stage**, each advancing one mechanism / step / item / layer, building understanding cumulatively. A single isolated body frame rarely teaches anything.\n\n- **concept-explainer:** name the concept (`product_intro`) → reveal the mechanism layer by layer (a run of `feature_showcase`, interleaving `benefit_highlight` for \"so what\" and `social_proof` for a grounding example).\n- **how-to-process:** `feature_showcase` per step, ordered, on one stage. Carry the object being acted on across adjacent steps (see Continuity).\n- **listicle:** `feature_showcase` per item; items are parallel, so default to `cut` / `push-slide` between them.\n- **story-explainer:** frames follow the beats (setup / tension / turn / resolution / lesson); types map per the table (`pain_point` for tension, `branding` for the lesson).\n\n## Continuity across frames (no worker grouping)\n\nThis framework builds **one frame per worker** — there is no \"continue run\" that hands several frames to one worker. A sequence of frames reads as one continuous shot through two storyboard-level levers, both yours:\n\n1. **A consistent stage** — consecutive body frames share the same composition idea (same diagram growing, same number line, same desk), stated in each frame's `scene` so Step 4 and the workers keep the stage stable.\n2. **A consistent transition** — pick one seam type for a sequence (usually `push-slide <DIR>` for ordered steps, `crossfade` for a soft layer reveal) and repeat it across the run, so the frames feel like one flow rather than separate slides.\n\nWhen a single element genuinely _transforms_ between two ideas (a diagram node becomes a chart bar, a formula becomes its result), keep it within **one frame** as a development beat (entrance → the transform → settle) rather than splitting it across a seam — the worker owns that motion. Note the intent in the frame's `scene` / narrative; Step 4 turns it into a time-coded shot sequence (instantiating the candidate `blueprint`).\n\n## Transitions\n\nUse only registry transition names in `transition_in`:\n\n`cut | crossfade | blur-crossfade | push-slide LEFT | push-slide RIGHT | push-slide UP | push-slide DOWN | zoom-through | squeeze`\n\nPick 2-3 transition types for the whole video and repeat them. Frame 1 uses `cut` as a placeholder (there is no previous frame). Match the seam to the narrative: ordered steps → a consistent `push-slide`; a soft layer reveal or atmosphere shift → `crossfade` / `blur-crossfade`; zooming into a detail or pulling back → `zoom-through`; a clean topic switch or new list item → `cut`.\n\n## Faceless visuals — no asset inventory\n\nEvery visual is invented downstream from each frame's `narrativeRole` / `keyMessage` / `scene` — typography, abstract graphics, diagrams, data-viz are all first-class. Therefore:\n\n- Do **not** write an `asset_candidates` line describing intended diagrams or typography as if they were files. Visual intent belongs in `scene` + `narrativeRole`; the visual phase reads those.\n- The **only** real asset is a user-supplied image already placed at `public/<basename>`. Then add one line `asset_candidates: public/<basename> — <≤25 words: what it is>`. Never invent paths or reference `capture/`.\n\n## Script rules\n\n### If there is no pasted script\n\nWrite tight per-frame narration:\n\n- 1-2 sentences per spoken frame; usually 6-20 words.\n- Concrete and human; teach, don't read the article aloud.\n- **Write each line as discrete cues, not one run-on breath.** Step 5 reveals each on-screen piece _when the voiceover names it_ (the anti-PowerPoint mechanism). A line with clear phrase boundaries — \"First the snowball — then the hill — then the speed\" — hands the shot its reveal cadence for free; a single long clause leaves the frame nothing to pace to.\n- **Strong** (concretization): \"Compound interest isn't addition, it's a snowball — every turn picks up the snow from the last, then more.\"\n- **Weak** (article-paraphrase): \"The study, published in 2019, examined three cohorts and found that…\" — that is reading, not explaining.\n\nAvoid: \"Unlock the power of…\", \"Seamless experience\", long noun-phrase lists, a frame that is only a filler bridge (\"Or…\").\n\n**Silent frames are allowed and common in explainers** — a diagram assembling itself, a worked example animating, a beat of held tension before a turn. Set `voiceover` empty and leave the frame out of `SCRIPT.md`; then `narrativeRole` + `persuasion` must carry what the script doesn't say.\n\n### If `VO_MODE = restructure`\n\nTreat `user_script.txt` as source material. Rewrite, reorder, merge, or omit to fit the chosen structure and target length.\n\n### If `VO_MODE = verbatim`\n\nDo not rewrite the user's words. Segment the script into frame-sized chunks at sentence or paragraph boundaries (you may split a long sentence at a natural clause boundary, but do not change words). Final duration follows the provided script.\n\n## Music & silence\n\nThe storyboard's top YAML block carries a `music:` field — the BGM mood the audio step retrieves against (e.g. `music: confident minimal tech underscore`). Omitting it falls back to `message:` → `arc:` → a neutral default, so BGM plays unless turned off explicitly.\n\n- **`music: none`** — BGM off (narration, if any, still runs).\n- **`music: none` + no `SCRIPT.md` + no `sfx:` cues or host audio** — the canonical **fully-silent marker**: no narration, no BGM, no SFX. `audio.mjs` generates nothing and the audio step is a clean skip. Use exactly this spelling when the user asks for a silent / music-free video.\n\n## Frame template\n\nUse the exact fields required by the core storyboard format. This is the narrative shape each frame should satisfy:\n\n```md\n## Frame N — Short name\n\n- scene: one clear visual idea\n- voiceover: \"spoken guide text, or empty\"\n- duration: rough estimate in seconds\n- transition_in: crossfade\n- status: outline\n- src: compositions/frames/NN-short-name.html\n- type: feature_showcase\n- persuasion: Progressive disclosure\n- beat: comprehension\n- blueprint: dataviz-countup — candidate shape from the role→blueprint menu; omit when none fits\n\nnarrativeRole: What this frame does in the viewer's understanding.\nkeyMessage: The one idea the viewer should remember.\n```\n\n## Final checklist\n\nBefore asking for user approval, verify:\n\n- One explainer structure is named (compound only when explicitly named); the sequence is narrative-driven, not paragraph-order-driven.\n- The opening uses a named hook strategy.\n- Each frame has one job; the body builds cumulatively (a run of `feature_showcase` / `benefit_highlight` / `product_intro`), not a single isolated body frame.\n- Every frame has `type`, `persuasion` (a named technique from the catalog), and `beat` (specific, not generic).\n- Each `voiceover` is phrase-segmented into cues (each a piece Step 5 can reveal on), not one run-on clause; a candidate `blueprint:` is tagged wherever a proven shape fits, and omitted where none does.\n- The emotional arc has meaningful variation matching the structure.\n- Transitions use only registry names and repeat 2-3 types; frame 1 is `cut`.\n- A consistent stage + consistent transition carry any multi-frame sequence; a genuine element transform stays inside one frame.\n- `asset_candidates` is absent (faceless) except a real user-supplied `public/<basename>`.\n- `SCRIPT.md` contains only locked spoken narration; silent frames are intentional and omitted from it.\n",
@@ -332,6 +332,6 @@ export const HYPERFRAMES_FILES = {
332
332
  "talking-head-recut/NOTICE.md": "# Attribution\n\nThe `talking-head-recut` skill (its card-based design system — styles, layouts, frames,\nfonts, and the GSAP-driven composition workflow) is **adapted from** the open-source\n**vtake-skills** project (`vtake-cut`):\n\n> https://github.com/notedit/vtake-skills\n\nAdaptations for this repo: renamed to `talking-head-recut`; transcription repointed to\nlocal Whisper via `hyperframes transcribe` (dropping the third-party `@notedit/vtake`\nCLI and the `vtake.app` proxy); audio/metadata extraction inlined with `ffmpeg`/`ffprobe`;\nthe fixed third-party brand outro removed in favour of an optional, neutral outro;\nartifacts aligned to the `videos/<project>/` convention.\n\nThe original is MIT-licensed; its notice is retained below as required.\n\n```\nMIT License\n\nCopyright (c) 2026 leeoxiang\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n```\n",
333
333
  "talking-head-recut/references/DESIGN_INDEX.md": "# V—Take Visual Design Library\n\nThis directory is a **reference library** for the talking-head-recut skill. Style, layout,\nand video frame are three **orthogonal** dimensions you can freely mix when\ndesigning a takeaway video.\n\n```\nStyle × Layout × VideoFrame\n (10) (4) (3) = 120 possible combinations\n```\n\nRead a reference file when you decide to use that dimension. Each file is a\nself-contained HTML fragment that follows the talking-head-recut card-HTML contract\n(scoped `<style>`, no `<script>`, no external URLs, animations only via\n`data-anim-*`).\n\n## Layouts — how video and card share the canvas\n\n| key | file | what it does | best for |\n| --------- | -------------------------------------------- | ------------------------------------------------------- | --------------------------------------- |\n| `split` | [layouts/split.html](layouts/split.html) | 50/50 side-by-side (landscape) or top/bottom (portrait) | speaker + data equal weight |\n| `stack` | [layouts/stack.html](layouts/stack.html) | video on top (~52%), card below | talking-head with summary card |\n| `pip` | [layouts/pip.html](layouts/pip.html) | card fills canvas, video rounded PiP in corner | content-heavy moment, speaker secondary |\n| `overlay` | [layouts/overlay.html](layouts/overlay.html) | video full-bleed, glass card floats on bottom | cinematic / dramatic moments |\n\nA layout is a **two-part recipe**: pick a `card.zone` value to put in\n`storyboard.json` AND author a GSAP tween for `#video-wrap` to its\ntarget rect in the composition's `<script>`. Open the layout file's\nheader for the recommended `zone` + the GSAP statement to paste.\n(Earlier docs referenced a `card.layout` field — that field does NOT\nexist in the real schema; the strict v3 schema only has `card.zone`.)\n\n## Styles — the card's visual language\n\n| key | file | character | accent | suggested font |\n| ------------ | ------------------------------------------------ | ---------------------------------------------------- | --------- | ------------------- |\n| `academic` | [styles/academic.html](styles/academic.html) | warm paper · grid · serif · blue highlight | `#2557a7` | serif |\n| `editorial` | [styles/editorial.html](styles/editorial.html) | cream · coral block · big italic quote | `#ff3a2d` | Playfair-like serif |\n| `minimal` | [styles/minimal.html](styles/minimal.html) | pure black/white · huge type · generous space | `#000` | Inter |\n| `spotlight` | [styles/spotlight.html](styles/spotlight.html) | dark purple gradient · glow · dramatic | `#a78bfa` | sans |\n| `geom` | [styles/geom.html](styles/geom.html) | chartreuse + hot pink + black collision | `#d4ff00` | Inter bold |\n| `whiteboard` | [styles/whiteboard.html](styles/whiteboard.html) | paper · Caveat handwriting · sketched borders | `#ff6b35` | Caveat |\n| `audit` | [styles/audit.html](styles/audit.html) | manila paper · justified serif · APPROVED stamp | `#8b1d1d` | serif |\n| `terminal` | [styles/terminal.html](styles/terminal.html) | dark · monospace · ASCII border · prompt cursor | `#4ade80` | mono |\n| `swiss` | [styles/swiss.html](styles/swiss.html) | white · Helvetica · strict double rules · red accent | `#e8190f` | Helvetica/Inter |\n| `xhs` | [styles/xhs.html](styles/xhs.html) | cream + hot pink · chips · #hashtags · ❤️💬 row | `#ff2e63` | sans |\n\nChoose by content tone, not by content type — `academic` works for finance\ntoo if the tone is reflective; `terminal` works for non-tech if the tone is\n\"engineering rigor\".\n\n## Video Frames — decoration around the video element\n\n| key | file | character | when to skip |\n| ---------- | -------------------------------------------- | ------------------------------------------------------------ | ------------------------------------------------ |\n| `clean` | [frames/clean.html](frames/clean.html) | no decoration; raw video | default; safest |\n| `hairline` | [frames/hairline.html](frames/hairline.html) | double-stroke + four-corner viewfinder ticks | over `overlay` layout (clashes with full-bleed) |\n| `polaroid` | [frames/polaroid.html](frames/polaroid.html) | white photo frame + Caveat label + blue washi tape (no tilt) | over `overlay` layout; portrait PiP gets cramped |\n\nA frame is a decorative div that sits **next to** the `#video-wrap` inside\nthe composition's `#stage`. It is one-time HTML (not animated), but you can\nfade it in/out across cards. See each frame file for the placement snippet\nand the inline `<style>` it needs.\n\n## Decision guide (loose, not prescriptive)\n\n| video content | suggested combos |\n| -------------------------------- | -------------------------------------------------------- |\n| interview / dialogue | `academic` × `stack`, `audit` × `split` |\n| product launch / announcement | `editorial` × `overlay`, `geom` × `pip` |\n| data analysis / financial report | `audit` × `split`, `swiss` × `stack`, `terminal` × `pip` |\n| social clip (9:16) | `xhs` × `overlay`, `editorial` × `stack` |\n| technical tutorial | `terminal` × `split`, `whiteboard` × `pip` |\n| emotional story / narration | `spotlight` × `overlay`, `whiteboard` × `overlay` |\n| minimalist presentation | `minimal` × `split`, `swiss` × `overlay` |\n\nThese are starting points only. Look at the transcript, pick the tone, then\npick the visual.\n\n## Portrait sizing — bigger type for mobile\n\nEvery `references/styles/*.html` is sized for a **1920×1080 landscape**\npreview. When the final composition is **portrait (1080×1920)** — the\ndefault for social / mobile — scale every visual size up so it reads on a\nphone held close.\n\n| token | landscape | **portrait** | scale |\n| --------------------- | --------- | ------------ | ----- |\n| hero title (h1/h2) | 64–96px | **88–132px** | ×1.35 |\n| detail / body | 24–30px | **30–40px** | ×1.30 |\n| kicker / chip / meta | 14–18px | **18–22px** | ×1.25 |\n| primary number / stat | 48–60px | **64–88px** | ×1.40 |\n| horizontal padding | 40–64px | **24–36px** | ÷1.5 |\n\n`portraitPx ≈ round(landscapePx × 1.3)`. Hero headlines can go ×1.4;\nsmall meta stays at ×1.2. Padding **shrinks** in portrait since the card\nis narrower.\n\nFor a card that must work in both, use a container query on the card\nroot: `container-type: inline-size` + `font-size: clamp(64px, 8.5cqi, 132px)`.\n\n## Source aspect ratio independence\n\nOutput canvas is independent of source video aspect. Three supported\noutput ratios (selected by the user in Step 7.0 of SKILL.md):\n\n| ratio | canvas | `storyboard.layout` | best for |\n| ------ | --------- | ------------------------------------------------------ | ---------------------------------------------------------- |\n| `16:9` | 1920×1080 | `\"landscape\"` | YouTube / TV / desktop playback |\n| `9:16` | 1080×1920 | `\"portrait\"` | TikTok / Reels / short-form mobile |\n| `4:5` | 1080×1350 | `\"portrait\"` (schema treats 4:5 as portrait since h>w) | Instagram feed / WeChat Moments / works for both platforms |\n\nThe layout reference files in `layouts/` document **landscape** and\n**portrait** bounds only. For **4:5** derive bounds by proportional\nvertical scaling from portrait: `4:5 y/h = round(portrait y/h × 0.703)`,\nkeep `x/w` identical. The composer doesn't care about the named layout\nvalue; it just uses `composition.width × height`.\n\n- Landscape video on landscape canvas → `videoBounds` matches video aspect, no letterbox\n- Portrait video on landscape canvas → `videoBounds` is a narrower box (e.g. `pip` becomes 248×440); empty side filled by card or background\n- Landscape video on portrait canvas → `videoBounds` becomes a wide-but-short band; `stack` and `overlay` work best\n- Portrait video on portrait canvas → most natural; any layout\n\nThe layout reference files show landscape values; for portrait you usually\nflip the long axis: `split` becomes top/bottom, `pip` video bubble shrinks\n~20%, `overlay` card slot widens to full width.\n\n## Constraints you must obey when copying from these references\n\n1. **No `<script>`** — animations only via `data-anim-*` attributes\n2. **No external URLs** — no Google Fonts CDN, no remote images; the\n skill provides Caveat / LXGW WenKai TC / Inter / Virgil locally\n3. **All `<style>` rules must be prefixed with `.card[data-card-id=\"...\"]`** —\n the hyperframes sanitizer auto-scopes them, but write them already-scoped to\n stay readable\n4. **No `on*=` inline handlers**\n5. **CSS variables for colors** when you want a card to switch theme cleanly;\n inline hex when you want this specific style's signature look\n\nIf a reference uses a font you don't have, fall back:\n\n- Playfair Display / Noto Serif SC → `ui-serif, \"Songti SC\", \"Times New Roman\", serif`\n- Noto Sans SC → `ui-sans-serif, system-ui, sans-serif`\n- JetBrains Mono → `ui-monospace, \"SF Mono\", Menlo, monospace`\n- Kalam → `'Caveat', cursive`\n",
334
334
  "talking-head-recut": "---\nname: talking-head-recut\ndescription: Package an existing talking-head / interview / podcast video with timed, designed GRAPHIC OVERLAY cards — kinetic titles, lower-thirds, data callouts, quotes, side panels, picture-in-picture — synced to the transcript, on a 16:9 / 9:16 / 4:5 canvas of your choice; the clip plays untouched underneath. Trigger on \"graphic overlays\", \"on-screen graphics\", \"package / dress up my video\". Not plain subtitles (/embedded-captions). Unclear → /hyperframes.\n---\n\n**Plugin installs:** Before setup or freshness commands, follow [plugin execution rules](../hyperframes/references/plugin-installation.md) when this skill is inside a HyperFrames plugin. Standalone installs keep the update instructions below.\n\n> **First, keep this skill fresh — confirm with the user before running:** `npx hyperframes skills update talking-head-recut`. A fast no-op when everything is current; otherwise it refreshes this skill plus the core domain skills it depends on before you rely on them.\n\n# Talking Head Recut\n\nTalking Head Recut takes a local video that **plays in full** and layers a sequence of\ntimed, designed **graphic cards** onto it — titles, lower-thirds, data callouts,\nquotes, side panels, picture-in-picture — synced to what's being said. The agent\ndesigns the cards (timing + content) and **writes each card's HTML directly in the\nconversation**, then assembles a single composition HTML and renders it to MP4 via\n`hyperframes`. There is no fixed archetype list and no prescribed card structure —\nthe overlays emerge from what the transcript actually says.\n\n> **The front door is `/hyperframes`.** This skill packages an **existing talking-head clip** with **designed graphic cards** (titles, lower-thirds, data callouts, quotes, side panels, PiP) — not plain captions (the spoken words as text). **The clip plays untouched.** Any other intent — plain subtitles, a standalone graphic, a from-scratch video — or any uncertainty → read `/hyperframes` first: the intent layer owns every route decision.\n\n> **Graphic-packaging sibling of `embedded-captions`.** Captions add the _spoken words_\n> as a readable subtitle; this adds _designed graphics_ on top of the playing video.\n> Plain subtitles → `embedded-captions`. Build a video from scratch → the creation\n> workflows (`product-launch-video` / `faceless-explainer` / …).\n\nRouted through `/hyperframes`, the intent layer confirms only the input (which clip) and **announces** the render-strategy questions as deferred asks — aspect, layout, style group, and card count stay at Step 7, where the probed footage and transcript ground the recommendations; the layer's run-shape questions don't apply. A `BRIEF.md`, when present, carries the confirmed input and any user notes — read it first.\n\nInspectable intermediate files in the work directory:\n\n- `metadata.json` — duration / width / height / fps\n- `audio.mp3` — extracted audio\n- `transcript.json` — a flat **word array** `[{ text, start, end }, …]` (Whisper; no `segments`, no `words` wrapper)\n- `storyboard.json` — lightweight card outline (the agent's plan)\n- `public/cards/card-XX.html` — one HTML fragment per card\n- `public/index.html` — final assembled composition\n- `output.mp4` — rendered video\n\n## CLI Resolution\n\n```bash\n# hyperframes — transcription (local Whisper) + rendering the assembled HTML to MP4\nnpx hyperframes --help\n```\n\nThis skill runs entirely on the **hyperframes** CLI plus system `ffmpeg` / `ffprobe`.\nTranscription is local **Whisper** via `hyperframes transcribe` — no third-party\nservice, API key, or rate-limited proxy.\n\n## Workflow\n\n### 1. Check Environment\n\n```bash\nnpx hyperframes doctor # ffmpeg, headless browser, render deps\n# confirm bundled assets:\nls \"<SKILL_DIR>/assets/fonts\" \"<SKILL_DIR>/assets/vendor/gsap.min.js\"\n```\n\nRequired:\n\n- `ffmpeg` / `ffprobe` (system)\n- `<SKILL_DIR>/assets/fonts/*.woff2`, `<SKILL_DIR>/assets/vendor/gsap.min.js` (bundled inside this skill, staged to work dir in Step 9)\n\nTranscription needs no key — `hyperframes transcribe` runs Whisper locally (Step 4).\n\nStrongly recommended on macOS for `hyperframes render`:\n\n```bash\nexport PRODUCER_BROWSER_GPU_MODE=hardware\n```\n\n### 2. Create a Work Directory\n\nAll artifacts live under `videos/<project-name>/` — the same convention as the other\nvideo workflows (`product-launch-video` / `faceless-explainer` / `pr-to-video`). Keep\nthe cwd at the workspace root; everything below writes under this one subdirectory.\n\n```bash\nVIDEO_PATH=\"/absolute/path/input.mp4\"\nWORK_DIR=\"videos/$(basename \"$VIDEO_PATH\" | sed 's/\\.[^.]*$//')\"\nmkdir -p \"$WORK_DIR\"\n```\n\n### 3. Extract Audio and Metadata\n\n```bash\n# metadata — duration / width / height / fps\nffprobe -v error -select_streams v:0 \\\n -show_entries stream=width,height,r_frame_rate \\\n -show_entries format=duration -of json \"$VIDEO_PATH\" > \"$WORK_DIR/metadata.json\"\n# audio\nffmpeg -y -i \"$VIDEO_PATH\" -vn -acodec libmp3lame -q:a 2 \"$WORK_DIR/audio.mp3\"\n```\n\nOutputs: `metadata.json` (read `width`/`height`/`duration`; fps = the `r_frame_rate`\nfraction evaluated, e.g. `30000/1001 → 29.97`) + `audio.mp3`.\n\n### 4. Transcribe\n\n```bash\nnpx hyperframes transcribe \"$WORK_DIR/audio.mp3\" -d \"$WORK_DIR\" --json --model small.en\n```\n\nLocal **Whisper** — no API key, no proxy, no rate limit. Writes a word-level\n`transcript.json` into the work dir (word `text` + `start` / `end` timestamps).\nRead it for the word / sentence timings that drive card timing in Step 6; group\nwords into sentences yourself at punctuation / pauses if you need segment-level\nchunks.\n\n**Clamp to media duration.** Whisper can return the final word's `end` a hair past the\nactual clip length — clamp every card `endSec` and `composition.durationSeconds` to the\n`metadata.json` duration, or the render will show a black tail past the video.\n\n### 5. Correct Transcript\n\n`transcript.json` is a **flat array of word objects** — `[{ \"text\": \"...\", \"start\": s, \"end\": s }, …]` (no `segments` array, no `words` wrapper; the per-word key is **`text`**). Read it and fix obvious ASR errors:\n\n- Homophones, product names, technical terms, punctuation\n- Edit a word's `text` in place; **preserve its `start` / `end`** timestamps\n- There is no pre-grouped `segments` array — **group words into sentences yourself** (split at terminal punctuation / pauses) when you need segment-level chunks for card timing\n\n### 6. Draft a Lightweight Storyboard (in chat)\n\n**No CLI involved.** Read `transcript.json` + `metadata.json` and design\ncards directly. `storyboard.json` is an agent-internal planning artifact\n— no CLI command consumes it; it exists so you can think clearly\nabout timing and content before writing each card's HTML. Keep the\nshape consistent with the example below so the same outline can drive\nthe composition you author in Step 9:\n\n```json\n{\n \"schemaVersion\": 3,\n \"composition\": {\n \"fps\": 30,\n \"width\": 1080,\n \"height\": 1920,\n \"durationSeconds\": 121.2,\n \"layout\": \"portrait\",\n \"themeId\": \"noir\",\n \"seed\": 42\n },\n \"videoTrack\": {\n \"sourcePath\": \"input-video.mp4\",\n \"startSec\": 0,\n \"endSec\": 121.2,\n \"bounds\": { \"x\": 0, \"y\": 0, \"width\": 1080, \"height\": 1920 }\n },\n \"subtitles\": { \"enabled\": false },\n \"cards\": [\n {\n \"id\": \"card-01\",\n \"intent\": \"Hook with the speaker's anxious midnight question\",\n \"startSec\": 0.5,\n \"endSec\": 13.0,\n \"accentIndex\": 0,\n \"zone\": \"fullscreen\",\n \"contentHints\": {\n \"kicker\": \"AN HONEST QUESTION\",\n \"title\": \"The soul-searching question at 11 PM\",\n \"detail\": \"Client's 60-second voice message: 'If the RMB appreciates, does that mean my USD policy is a terrible loss?'\"\n }\n }\n ]\n}\n```\n\n**Required Card fields:**\n\n| field | type | purpose |\n| ----------------------- | ------------------------------------------ | ----------------------------------------------------------------------------------------------------- |\n| `id` | string | stable id used in card HTML & GSAP selectors |\n| `intent` | string | natural-language description; fed to card synthesis |\n| `startSec` / `endSec` | number | times in seconds (endSec > startSec) |\n| `accentIndex` | 0 \\| 1 \\| 2 \\| 3 \\| 4 | which of the 5 theme accent colors this card pulls |\n| `zone` | enum (see below) | where on the canvas the card lives |\n| `contentHints` | object | free-form bag; agent puts kicker/title/detail/data/quote here |\n| `archetype` (optional) | string | free-form label you may attach to remember a card's pattern; absent = free-form, which is the default |\n| `transition` (optional) | enum: `cut` \\| `fade` \\| `slide` \\| `wipe` | declarative card-to-card transition |\n\n**Five `zone` values:**\n\n| zone | resolved bounds | when to use |\n| ----------------- | ---------------------------------------------- | --------------------------------------- |\n| `fullscreen` | covers whole canvas | hero moments, big numbers, mantras |\n| `whiteboard-area` | inset 40px margin (or 45% of portrait height) | dense data / annotated content |\n| `lower-third` | bottom 30% band | annotation over visible video |\n| `side-panel` | right 42% (landscape) or bottom 40% (portrait) | data side, video other side |\n| `video-overlay` | full canvas, expects mostly-transparent card | annotation overlays on full-bleed video |\n\nWhen you assemble the composition in Step 9, resolve each card's `zone`\ninto pixel bounds on the card-host wrapper following the table above.\nVideo bounds are set **once** at composition level (`videoTrack.bounds`);\nto make video appear to \"move between cards\", author GSAP tweens against\n`#video-wrap` in the composition's `<script>` (see Step 9).\n\n**No prescribed card roles, no prescribed narrative arc.** Cards emerge\nfrom what the video actually says — could be all quotes or all data,\ncould open with a number or with a story. Let the transcript drive the\nrhythm.\n\n**How many takeaways? — auto-infer from duration + density.** No fixed\nupper limit. Pick a **base pace** from the video duration, then adjust\nby **information density**. Only **floor is fixed: minimum 5 cards** so\neven short videos have rhythm.\n\n**Step 1 — base pace by duration** (the natural sec/card for medium density):\n\n| video duration | base pace (sec per card) | rationale |\n| ------------------ | ------------------------ | ------------------------------------------- |\n| < 60s (short reel) | **6–8s** | viewers expect fast cuts in short-form |\n| 60s – 3 min | **8–12s** | normal social pace |\n| 3 – 10 min | **12–20s** | give breathing room; each card carries more |\n| 10 – 30 min | **20–35s** | long-form lecture / interview rhythm |\n| > 30 min | **30–60s** | episodic, near-chapter feel |\n\n**Step 2 — density multiplier** (multiplies the base pace):\n\n| signal in the transcript | multiplier | effect |\n| --------------------------------------------------------------------------------------------------------------------------- | ---------- | ------------------------ |\n| **High density** — many numbers, distinct claims, staccato pacing, list-like enumeration, every 1–2 sentences is a new idea | **× 0.7** | cuts faster, more cards |\n| **Medium density** — mixed flow with both data and narrative | **× 1.0** | base pace |\n| **Low density** — one extended story, repeated reframing, slow reflective pacing, single argument unfolding | **× 1.5** | cuts slower, fewer cards |\n\n**Step 3 — compute:**\n\n```\nsecPerCard = basePace × densityMultiplier\ncardCount = max(5, round(videoDurationSec / secPerCard))\n```\n\nExamples (notice — **no upper clamp**; long videos naturally produce more cards):\n\n- **30s reel, single punchline (low density)** → 7 × 1.5 = 10.5s/card → round(30/10.5)=3 → floor to **5** cards\n- **60s reflective monologue (low density)** → 10 × 1.5 = 15s/card → **4** → floor to **5** cards\n- **121s talking-head with rich data (high density)** → 10 × 0.7 = 7s/card → **17** cards\n- **5 min interview, mixed density** → 16 × 1.0 = 16s/card → **19** cards\n- **10 min deep-dive, high density** → 16 × 0.7 = 11s/card → **55** cards\n- **30 min lecture, medium density** → 28 × 1.0 = 28s/card → **64** cards\n- **1 hr podcast, low density** → 45 × 1.5 = 67.5s/card → **53** cards\n\nWhen a card holds longer than ~15s, plan for a richer card (data block,\nmulti-step reveal, several sub-points unfolding with staggered\nanimations) — a static one-liner gets boring past 8s. For long pieces\nwhere many cards exceed 30s, consider **chunking the timeline into\nsub-compositions** (one .html per chapter, mounted with\n`data-composition-src`) so the GSAP timeline per file stays manageable\n— see the `timeline_track_too_dense` HyperFrames lint warning.\n\n`contentHints` is a free-form object; its keys and nesting can take whatever\nshape captures the data. The agent decides the shape per card.\n\n**Optional outro.** This skill ships **no fixed brand outro**. If the user wants a closing card, design a neutral one yourself (wordmark + one-line tagline, ~1.5-2s, fade in -> short hold -> fade out), append it to `cards[]`, and extend `composition.durationSeconds` to its `endSec`. Otherwise end on the last content card.\n\n### 7. Decide Render Strategy\n\n#### Confirm Visual Direction with User (DO THIS FIRST)\n\nBefore you start designing cards or deciding bounds, **ask the user to\npick the output ratio, the layout, the style, and the card-density\npreset**. Frames are auto-selected from the chosen layout × style\ncombination (see \"Auto-pick frame\" table below). Before sending the\nquestion, **precompute two things**:\n\n1. **`recommendedRatio`** from the source video's aspect ratio\n (`metadata.json` width / height):\n - `sourceAspect = width / height`\n - `sourceAspect ≥ 1.5` (≥ ~3:2 wide) → recommend **`16:9`**\n - `sourceAspect ≤ 0.7` (≤ ~9:13 tall) → recommend **`9:16`**\n - `0.7 < sourceAspect < 1.5` (near-square) → recommend **`4:5`**\n\n Mark the recommended option's label with \" (recommended · matches source video X:Y)\"\n so the user sees why it's recommended.\n\n2. **`autoCount`** from Step 6 (`max(5, round(videoSec / (basePace ×\ndensityMultiplier)))`) so the \"auto\" option's label can show the\n concrete number.\n\n**Environment compatibility — pick the best available question channel.**\nNot every runtime exposes the same structured-question tool. Apply this\norder:\n\n1. **Native clarification tool** — use the structured 4-question call below.\n2. **Other native clarification tool** (e.g. `ask_question`,\n `request_user_input`, IDE-specific prompt) — use that tool with the\n same 4 question texts and option lists. Preserve the recommendation\n markers and the precomputed values.\n3. **No native tool** (Codex CLI, plain text-only runtimes) — **ask\n directly in normal conversation**. Use the plain-text template at the\n end of this section. Keep it to **one message, 4 numbered questions**\n (the global cap is 2–5 questions per round; we stay inside it).\n\nRules that apply to every channel:\n\n- Ask **at most 2–5 questions per round**. Our 4 here fits.\n- Even if missing info doesn't block rendering, **ask once to confirm\n the parameters that materially affect the final output** (ratio,\n layout, style, cardCount).\n- If the user has already pre-approved defaults (\"just use defaults\",\n \"no need to ask\", \"auto-pick everything\"), asked you not to ask, or the\n run carries an ongoing autonomous signal (\"surprise me\" / \"decide for me\" —\n `../hyperframes/references/brief-contract.md` § 1) — **skip\n the question entirely** and use: `recommendedRatio`, `layout=\"stack\"`\n (safest cross-ratio default), `style` chosen from transcript tone in\n the most neutral group (editorial/data), `autoCount`. Tell the user\n what you picked in one sentence and continue.\n\n**Channel A — native `AskUserQuestion`:**\n\n```\n// Precompute before the call:\n// recommendedRatio = \"16:9\" | \"9:16\" | \"4:5\"\n// autoCount = integer (from Step 6)\n\nAskUserQuestion({\n questions: [\n {\n question: \"Output video aspect ratio (canvas):\",\n header: \"Aspect ratio\",\n multiSelect: false,\n // Reorder so the recommended option appears FIRST (per AskUserQuestion convention).\n // Append \" (recommended · matches source video W×H)\" to the recommended option's label.\n options: [\n { label: \"16:9 (1920×1080) landscape\", description: \"TV / YouTube / desktop playback. Most natural when the source video is already landscape; widest canvas.\" },\n { label: \"9:16 (1080×1920) portrait\", description: \"TikTok / Reels / short-form mobile. Most natural for portrait source; native mobile experience.\" },\n { label: \"4:5 (1080×1350) near-portrait\", description: \"Instagram feed / WeChat Moments. Best when source is near-square or you want to cover both platforms.\" }\n ]\n },\n {\n question: \"Choose the overall layout: how should the video and cards coexist on the canvas?\",\n header: \"Layout\",\n multiSelect: false,\n options: [\n { label: \"side-by-side (split)\", description: \"Video and card each take half the canvas. Most stable for interview / data side-by-side; clear visual separation.\" },\n { label: \"top-bottom (stack)\", description: \"Video on top (~52%), card below. Classic combo of speaker face + summary card; works well in portrait too.\" },\n { label: \"picture-in-picture (pip)\", description: \"Card fills the canvas, video shrinks to a rounded corner window. Use when content is primary and speaker is secondary.\" },\n { label: \"full-screen overlay (overlay)\", description: \"Video plays full-bleed, card floats as a glass layer on top. Strong cinematic / emotional feel.\" }\n ]\n },\n {\n question: \"Choose the card visual style (style):\",\n header: \"Style group\",\n multiSelect: false,\n // NOTE: these 3 groups intentionally match the frame auto-pick matrix\n // rows below, so picking a group resolves both `style` group AND the\n // frame matrix column in one step. Memberships are mutually exclusive.\n options: [\n { label: \"warm paper (warm-paper)\", description: \"academic notebook · editorial big-type · whiteboard hand-drawn · xhs social. Best for interview reflections, product launches, lifestyle, emotional stories.\" },\n { label: \"clinical / cold (clinical)\", description: \"audit magazine · swiss grid · terminal CLI · minimal modern. Best for financial analysis, investigative reports, technical tutorials, serious presentations.\" },\n { label: \"experimental / avant-garde (experimental)\", description: \"geom color-clash geometry · spotlight dark-background. Best for short-form highlights, product launches, strong emotion, cinematic feel.\" }\n ]\n },\n {\n question: \"Card count (takeaway pacing): how many cards to cut?\",\n header: \"Card count\",\n multiSelect: false,\n options: [\n { label: \"Auto (recommended) · approx N cards\", description: \"Inferred automatically from video duration and information density (see Step 6 rules). This run estimates approx N cards. Substitute the real N (your autoCount) into the label.\" },\n { label: \"Fewer · approx round(N × 0.6) cards\", description: \"Sparser cuts, each card holds longer — suits reflective / slow-paced content.\" },\n { label: \"More · approx round(N × 1.5) cards\", description: \"Tighter cuts, faster rhythm — suits staccato / data-dense / short-form highlight content.\" }\n ]\n }\n ]\n})\n```\n\n**About \"Other\"** — `AskUserQuestion` automatically adds an \"Other\" option to the card count question. The user can type a number directly (e.g. \"8\", \"20\") as the cardCount target. Parse the input as an integer: if parsing succeeds → use that value (minimum 5 as a floor); if parsing fails → fall back to \"auto\".\n\n**Channel B — plain-text fallback** (Codex CLI, runtimes without a\nnative question tool). Post this as one normal message, then wait for\nthe reply. Bullet-style 1/2/3/4 keeps the reply parseable:\n\n```\nI need to confirm four visual decisions with you before I start cutting cards:\n\n1) Output aspect ratio (canvas):\n A. 16:9 landscape (1920×1080) — TV / YouTube / desktop playback\n B. 9:16 portrait (1080×1920) — TikTok / Reels / short-form mobile\n C. 4:5 near-portrait (1080×1350) — Instagram feed / works for both platforms\n ▸ My recommendation: <recommendedRatio> (matches source video W×H = <sourceW>×<sourceH>)\n\n2) Overall layout (how video & card coexist):\n A. split side-by-side (50/50)\n B. stack top-bottom (video top, card bottom)\n C. pip picture-in-picture (card full canvas, video rounded corner window)\n D. overlay full-screen glass overlay (video full-bleed, card glass layer)\n\n3) Card style group (maps to frame auto-pick matrix, pick 1 of 3):\n A. warm paper (warm-paper) (academic / editorial / whiteboard / xhs)\n B. clinical / cold (clinical) (audit / swiss / terminal / minimal)\n C. experimental (experimental) (geom / spotlight)\n\n4) Card count (takeaway pacing):\n A. Auto (recommended) — approx <autoCount> cards\n B. Fewer — approx round(<autoCount> × 0.6) cards\n C. More — approx round(<autoCount> × 1.5) cards\n D. Give me a specific number (e.g. \"8\", \"20\")\n\nReply format: \"1A 2C 3B 4A\" or natural language is fine.\nIf you want all recommended defaults, reply \"default\" / \"auto\" / \"use all recommendations\".\n```\n\nParsing the plain-text reply:\n\n- Accept loose formats: `\"1A 2C 3B 4A\"`, `\"A C B A\"`, `\"16:9 / pip /\ndata / auto\"`, full sentences, or `default`.\n- If any answer is ambiguous → re-ask only the ambiguous ones (still\n inside the 2–5 cap).\n- If the user says \"default / auto / use all recommendations\" → skip without re-asking.\n\nAfter the user answers (any channel):\n\n1. **Resolve the output canvas** from the ratio answer — these are the\n exact `storyboard.composition.width / height` values to write:\n\n | user choice | composition.width × height | storyboard.layout field |\n | ----------- | -------------------------- | ------------------------------------------------------------- |\n | `16:9` | **1920 × 1080** | `\"landscape\"` |\n | `9:16` | **1080 × 1920** | `\"portrait\"` |\n | `4:5` | **1080 × 1350** | `\"portrait\"` (schema treats 4:5 as portrait — height > width) |\n\n For **4:5 bounds inside `references/layouts/*.html`** — those files\n only document landscape (1920×1080) and portrait (1080×1920). For\n 4:5 (1080×1350) derive bounds by **proportional scaling from\n portrait**: keep horizontal values, scale vertical values by\n `1350/1920 ≈ 0.703`. Example: `overlay` portrait card =\n `{ x: 24, y: 1280, w: 1032, h: 564 }` → 4:5 card =\n `{ x: 24, y: round(1280 × 0.703), w: 1032, h: round(564 × 0.703) }`\n = `{ x: 24, y: 900, w: 1032, h: 397 }`.\n\n2. **Map the style group to a specific style** by looking at the\n transcript tone — pick the one that best fits, but stay inside the\n user's chosen group. If you're unsure between two specific styles\n inside the group, send a second `AskUserQuestion` with those 2–4\n specific style options.\n\n3. **Resolve final cardCount** from the density answer:\n\n | user choice | final cardCount |\n | ----------------------- | ----------------------------------------- |\n | Auto (recommended) | the `autoCount` you already computed |\n | Fewer | `max(5, round(autoCount × 0.6))` |\n | More | `round(autoCount × 1.5)` (no upper clamp) |\n | Other = \"<n>\" (integer) | `max(5, parseInt(n))` |\n | Other = anything else | fall back to `autoCount` |\n\n4. **Auto-pick the video frame** from this table (frames don't ask the\n user — they follow from layout × style):\n\n | layout | warm-paper styles (academic / whiteboard / editorial / xhs) | clinical styles (audit / swiss / terminal / minimal) | experimental styles (geom / spotlight) |\n | --------- | ----------------------------------------------------------- | ---------------------------------------------------- | -------------------------------------- |\n | `split` | `polaroid` | `hairline` | `clean` |\n | `stack` | `polaroid` | `hairline` | `clean` |\n | `pip` | `clean` (pip pill already has chrome) | `clean` | `clean` |\n | `overlay` | `clean` (full-bleed forbids deco frames) | `clean` | `clean` |\n\n5. **Tell the user what you chose** in one sentence — ratio (+ canvas\n size), layout, specific style, frame, and final cardCount — then\n proceed with the rest of Step 7 (per-card layouts, motion patterns).\n6. Record the five values (ratio / layout / style / frame / cardCount)\n in working memory (no schema field needed); you'll reference them\n while writing each card's HTML in Step 8 and while reading the\n matching `references/<dim>/<key>.html` for tokens and structure.\n\nIf the user picks an answer via \"Other\" with a free-text style name not\nin the 10-style library, treat it as a hint to design a fresh card\nvisual yourself, but still anchor on the chosen layout's bounds.\n\n#### Render Strategy Inputs\n\nWith ratio / layout / style / cardCount / frame locked from Step 7.0,\nthe remaining per-card decisions are:\n\n- **Source-video fit inside the GSAP target**: video element has\n `object-fit: cover` and is clipped to `#video-wrap`'s tween bounds.\n If you want NO cropping (e.g. portrait source on landscape canvas\n shouldn't get its top/bottom chopped), aim the tween at a rect that\n matches the source's aspect ratio and let surrounding canvas show\n through (or fill with the card / a backdrop).\n- **`card.zone` per card**: derive from your chosen composition layout\n (split → side-panel, stack → lower-third, pip → fullscreen, overlay\n → video-overlay), OR pick a different zone for one-off variants\n (fullscreen for hero / quote, whiteboard-area for dense data).\n- **`accentIndex` per card**: each card pulls one of the 5 theme accent\n colors. Vary across cards for rhythm; reuse the same index when two\n cards belong to the same narrative beat.\n- **Motion vocabulary**: pick 2–3 repeatable patterns from\n `data-anim` kinds (see the table later) and stick to them so the\n composition feels coherent.\n\nPick from these `themeId` palettes (use them as `--accent-N` /\n`--bg` / `--text` CSS variables in your composition `<style>` block):\n\n| themeId | accent palette (5 colors) | board bg | text |\n| ------- | ----------------------------------------- | ----------------- | --------- |\n| classic | `#1971c2 #e03131 #2f9e44 #e8590c #9c36b5` | `#FFF9E3` (paper) | `#1e1e1e` |\n| noir | `#4cc9f0 #f72585 #4ade80 #fb923c #a78bfa` | `#1a1a1a` | `#f1f1f1` |\n| mint | `#0077b6 #d62828 #2d6a4f #e76f51 #7209b7` | `#e8faf0` | `#1b4332` |\n| craft | `#bf5700 #d62728 #6c757d #e9b54a #3d5a80` | `#f6efe1` | `#2d2d2d` |\n| slate | `#0ea5e9 #ef4444 #22c55e #f97316 #a855f7` | `#1e293b` | `#f1f5f9` |\n| mono | `#000 #555 #888 #aaa #ccc` | `#fff` | `#000` |\n\nAvailable fonts (woff2 in `<SKILL_DIR>/assets/fonts/`, staged to work dir in Step 9): `Caveat` (handwriting),\n`LXGW WenKai TC` (Chinese hand-script), `Inter` (modern sans), `Virgil`\n(geometric hand). Reference via `@font-face` or `font-family` directly.\n\nFor inspiration on visual patterns, `<SKILL_DIR>/references/styles/`\nships 10 self-contained reference cards (academic / editorial / minimal\n/ spotlight / geom / whiteboard / audit / terminal / swiss / xhs) that\nyou can copy as starting points — but **do not feel constrained to\nmatch any of these**. Each card is your own design.\n\n#### Visual Design Library (<SKILL_DIR>/references/)\n\nBeyond the composition-level `themeId`, the skill ships a richer **reference\nlibrary** at `<SKILL_DIR>/references/` covering three **orthogonal**\nvisual dimensions you can freely mix:\n\n```\nStyle × Layout × VideoFrame\n (10) (4) (3)\n```\n\n| dimension | keys | what it decides |\n| ---------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------ |\n| **style** | `academic` `editorial` `minimal` `spotlight` `geom` `whiteboard` `audit` `terminal` `swiss` `xhs` | the card's visual language — fonts, colors, ornament, layout-within-card |\n| **layout** | `split` `stack` `pip` `overlay` | how the source video and the card share the canvas |\n| **frame** | `clean` `hairline` `polaroid` | the decorative chrome around the video element |\n\nRead `<SKILL_DIR>/references/DESIGN_INDEX.md`\nfor the full matrix and a loose decision guide (interview / product launch / data analysis /\nsocial clip / technical tutorial / emotional story …). When you decide to use a specific\nstyle / layout / frame, Read the corresponding file:\n\n- `references/styles/<key>.html` — self-contained card fragment with that\n style's CSS tokens (colors, fonts, padding, ornament) and a placeholder\n takeaway. Copy the `.card[data-card-id=\"ref-<key>\"]` style block, rename\n the data-card-id to your card's id, swap the placeholder content for the\n real takeaway, and you're done.\n- `references/layouts/<key>.html` — exact `videoBounds` + `cardBounds` for\n both landscape and portrait. The storyboard records only `card.zone`.\n- `references/frames/<key>.html` — decorative HTML to add as a sibling of\n `#video-wrap`, plus placement instructions for the composition CSS.\n\nWithin the user's chosen style group you may vary the style per card, and\npick `layout × frame` per card, as long as the transitions read smoothly.\n\nThe 10 styles are skill-side design tokens, **not composition-level themes** —\nthey don't need to be declared in `storyboard.composition`; they live\ninside each card's HTML. The `themeId` field can still pick a\ncomposition-level palette (table above) that controls page-body background\nand video border chrome.\n\n#### Layout Compositions (Card + Video)\n\nTwo coordinated decisions per card define how it shares the canvas with\nthe source video:\n\n- **`card.zone`** (declared in `storyboard.json`) — one of the 5 schema\n values; resolve it into pixel bounds (per the table in Step 6) when\n you write the card-host wrapper's inline `style` in Step 9.\n- **`#video-wrap` bounds at this card's time window** (declared\n imperatively in the composition's GSAP timeline) — the agent tweens\n `#video-wrap` to a target rect for each layout transition.\n\nSchema does NOT store per-card video bounds. `videoTrack.bounds` is\n**one-time** at composition level (defaults to full canvas). Video\n\"moving\" between cards is purely a GSAP animation authored in\n`index.html`. There is no `card.layout` field; the schema only has `card.zone`.\n\n**4 composition layouts** (from `references/layouts/`) — each is a\nrecipe pairing a `zone` with a `#video-wrap` tween target:\n\n| composition layout | recommended `card.zone` | GSAP target for `#video-wrap` (landscape 1920×1080) | GSAP target for `#video-wrap` (portrait 1080×1920) | when to use |\n| ------------------ | ----------------------- | ------------------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------- |\n| `split` | `side-panel` | `{ left: 960, top: 0, width: 960, height: 1080 }` | `{ left: 0, top: 960, width: 1080, height: 960 }` (bottom half) | speaker + data side-by-side / 50:50 weight |\n| `stack` | `lower-third` | `{ left: 14, top: 14, width: 1892, height: 548 }` (top 52%) | `{ left: 0, top: 0, width: 1080, height: 844 }` (top 44%) | speaker on top + summary card below |\n| `pip` | `fullscreen` | `{ left: 1480, top: 760, width: 400, height: 300 }` + add `.framed` class | `{ left: 690, top: 28, width: 360, height: 203 }` + add `.framed` | content-heavy card + corner pip |\n| `overlay` | `video-overlay` | `{ left: 0, top: 0, width: 1920, height: 1080 }` (full-bleed) | `{ left: 0, top: 0, width: 1080, height: 1920 }` | cinematic / dramatic / glass card on full video |\n\nFor 4:5 (1080×1350), scale portrait y/h values by `1350/1920 ≈ 0.703`\n(see Step 7.0 Channel A / Channel B `recommendedRatio` resolution\ntable).\n\n**Other zone values for one-off variants** (still uses `card.zone`; no\nfake \"layout\" field):\n\n| `zone` | resolved bounds | common use |\n| ----------------- | ------------------------------------------------------ | ------------------------------------- |\n| `fullscreen` | covers whole canvas | hero card, video tweens to hidden/pip |\n| `whiteboard-area` | inset 40px margin (landscape) or bottom 45% (portrait) | dense data card, free margins |\n| `lower-third` | bottom 30% band | talking-head annotation |\n| `side-panel` | right 42% (landscape) or bottom 40% (portrait) | sidebar / \"split\" recipe |\n| `video-overlay` | full canvas; expect transparent card root | glass overlay on full-bleed video |\n\nYou can mix recipes per card — choose `card.zone` based on what suits\nthe moment, then write the GSAP tween for `#video-wrap` between cards.\n\n#### Storyboard Render Contract\n\n`storyboard.json` is an agent-internal planning artifact — no CLI\ncommand parses it. It exists to keep your timing and content decisions\nexplicit before you write each card's HTML. Stick to the v3-style\nshape below so the same outline drives the composition you assemble in\nStep 9.\n\nRequired structure (see Step 6 for the full example):\n\n- `schemaVersion: 3`\n- `composition: { fps, width, height, durationSeconds, layout, themeId, seed }` — note `durationSeconds`/`fps`/`themeId`/`layout` live **inside** `composition`, NOT at top level\n- `videoTrack: { sourcePath, startSec, endSec, bounds? }` — video bounds default to full canvas\n- `subtitles: { enabled, ... }`\n- `cards[]` — each card has the 6 required fields: `id`, `intent`, `startSec`, `endSec`, `accentIndex`, `zone`, `contentHints`\n\nRules:\n\n- Card times stay inside `composition.durationSeconds` and should not overlap unless intentional (use `data-track-index` to control z-order when they do).\n- Visual details live in card HTML fragments (Step 8), NOT in `contentHints`. `contentHints` is your own structured prompt for designing the card; the rendered look is the HTML.\n- Keep the storyboard shape stable — even though nothing parses it, you read it back while authoring Step 8/9, and consistency keeps card IDs and timing in sync.\n- Agent-side decisions like \"I picked overlay × geom × clean\" do NOT belong in `storyboard.json` — keep them in working memory and use them when authoring card HTML + GSAP tweens.\n\n**Transparent card backgrounds for cards that share canvas with video.**\nWhen the GSAP tween leaves video visible behind/beside the card (overlay\nrecipe, pip recipe, or any `card.zone = 'lower-third' | 'video-overlay'`\nmoment), the card's `.root` MUST NOT paint a full opaque background —\notherwise it occludes the video. Two patterns:\n\n```css\n/* Pattern A: transparent root, page body provides the cream backdrop */\nhtml,\nbody {\n background: var(--bg);\n}\n.card[data-card-id=\"card-X\"] .root {\n background: transparent;\n}\n\n/* Pattern B: explicit per-card background ONLY for fullscreen cards */\n.card[data-card-id=\"card-hero\"] .root {\n background: var(--bg);\n}\n.card[data-card-id=\"card-overlay\"] .root {\n background: transparent;\n}\n```\n\nFor `side-panel`-zone cards (split recipe), the card-host is already\nonly half the canvas, so an opaque card bg is fine — it only covers its\nhalf.\n\n### 8. Write Each Card's HTML\n\nCreate `$WORK_DIR/public/cards/{card-id}.html` for each card. Each file\ncontains a single rooted HTML fragment that follows this contract:\n\n#### Card HTML Contract\n\n```html\n<div class=\"card\" data-card-id=\"{cardId}\">\n <style>\n /* MUST: every rule starts with .card[data-card-id=\"{cardId}\"] */\n .card[data-card-id=\"card-01\"] .root {\n width: 100%; height: 100%;\n display: flex; ...;\n font-family: 'Caveat', 'LXGW WenKai TC', serif;\n color: var(--text);\n background: var(--bg);\n }\n .card[data-card-id=\"card-01\"] .title { font-size: 84px; ... }\n </style>\n\n <div class=\"root\">\n <h1\n id=\"card-01-title\"\n data-anim=\"kinetic-chars\"\n data-anim-at=\"0.3\"\n data-anim-duration=\"0.5\"\n data-anim-stagger=\"0.04\"\n data-anim-pattern=\"pop\"\n >\n <span class=\"char\">S</span>\n <span class=\"char\">u</span>\n </h1>\n <div\n id=\"card-01-line\"\n data-anim=\"grow-x\"\n data-anim-at=\"0.65\"\n data-anim-duration=\"0.5\"\n data-anim-target-w=\"420\"\n style=\"width:0;height:8px;background:var(--accent-0);border-radius:4px;\"\n ></div>\n </div>\n</div>\n```\n\n**Hard rules** (`hyperframes` lint will reject violations):\n\n- Single root `<div class=\"card\" data-card-id=\"{cardId}\">`\n- Inline `<style>` rules MUST be prefixed with the scope selector above\n- **No `<script>` tags**\n- **No external URLs** in `src=` / `href=` (no CDN, no remote fonts)\n- **No inline event handlers** (`onclick=` etc.)\n- All assets via relative paths into the same `public/` directory\n- Colors via `var(--accent-N)` etc. for portability across themes\n\n**Animations are declared, not coded.** Use `data-anim-*` attributes\nonly; never write `<script>` to animate. You compile every `data-anim-*`\ndeclaration into the single master GSAP timeline in Step 9.\n\n#### Card Sizing — Mobile-First in Portrait\n\nThe 10 `references/styles/*.html` are sized for a **1920×1080 landscape**\npreview. When `storyboard.layout = \"portrait\"` (1080×1920, the dominant\ncase for social / mobile), **scale every visual size up** — phones hold\nthe screen close, and the same pixel count reads smaller than on a\nlandscape TV-style canvas.\n\n| token | landscape baseline | **portrait target** | scale |\n| ------------------------- | ------------------ | ------------------- | ------------- |\n| title (h1/h2 hero) | 64–96px | **88–132px** | ×1.35 |\n| detail / body | 24–30px | **30–40px** | ×1.30 |\n| kicker / chip label | 14–16px | **18–22px** | ×1.30 |\n| timecode / meta | 12–14px | **16–18px** | ×1.30 |\n| data block primary number | 48–60px | **64–88px** | ×1.40 |\n| line-height multiplier | 1.05–1.5 | same | (don't scale) |\n\n**Rule of thumb:** `portraitPx = round(landscapePx × 1.3)`, then floor\nto a nearby 4px multiple for visual rhythm. Hero headlines may go up to\n×1.4; small meta text stays at ×1.2 to avoid crowding.\n\nPadding **shrinks slightly** in portrait — the card is narrower so big\nlandscape padding (40–64px) eats too much width. Use 24–36px horizontal\npadding in portrait.\n\nIf you're producing a single card that must work in **both** layouts,\nprefer a `@container` query on the card root over hard-coding sizes:\n\n```css\n.card[data-card-id=\"X\"] .root {\n container-type: inline-size;\n}\n.card[data-card-id=\"X\"] .title {\n font-size: clamp(64px, 8.5cqi, 132px);\n}\n.card[data-card-id=\"X\"] .detail {\n font-size: clamp(24px, 3.2cqi, 40px);\n}\n```\n\nBut for most cards, a single layout choice is fine — just pick the size\ntable column that matches the storyboard's `layout` field.\n\n#### Available `data-anim` Kinds\n\nThis list is closed, and deliberately so: a card is an HTML fragment whose motion this\nskill compiles into the shared overlay timeline in Step 9 (see the GSAP mapping table\nthere). That is why this workflow does not search the HyperFrames component registry the\nway the composition workflows do — `npx hyperframes catalog` returns standalone\ncompositions that carry their own timeline, and a card has no place to mount one. Reach a\nlook the kinds below cannot express with plain CSS inside the card's scoped `<style>`.\n\n| kind | use for | key params |\n| --------------- | ------------------- | ----------------------------------------------------------------------------------------------- |\n| `fade-in` | enter | `at`, `duration`, `ease?` |\n| `fade-out` | exit | `at`, `duration`, `ease?` |\n| `slide-in` | slide enter | `at`, `duration`, `from=left\\|right\\|top\\|bottom`, `distance` |\n| `kinetic-chars` | per-char pop | `at`, `duration`, `stagger`, `pattern=pop\\|fade` — element needs `<span class=\"char\">` children |\n| `typewriter` | per-char fade | same as kinetic-chars but slower default stagger |\n| `count-up` | animate number | `at`, `duration`, `from`, `to`, `format=.0f\\|.1f\\|.2f\\|,d` |\n| `draw-path` | SVG path reveal | `at`, `duration` — element should be a `<path>` |\n| `grow-y` | bar height | `at`, `duration`, `target-h` (px) — element starts `height:0` |\n| `grow-x` | bar width | `at`, `duration`, `target-w` (px) — element starts `width:0` |\n| `scale-pop` | pop entrance | `at`, `duration` |\n| `blur-in` | unfocused → focused | `at`, `duration` |\n| `mask-reveal` | clip reveal | `at`, `duration`, `direction=left\\|right\\|top\\|bottom` |\n| `morph-to` | tween any CSS | `at`, `duration`, `props='{...JSON...}'` |\n\n`data-anim-at` is **seconds relative to the card's startSec** — when you\ncompile each declaration into the GSAP timeline in Step 9, add the\ncard's `startSec` to get the absolute time and quantize to 1/fps.\n\n### 9. Assemble the Composition HTML\n\nStage the assets and write `$WORK_DIR/public/index.html`:\n\n```bash\n# SKILL_DIR is injected by the host (\"Base directory for this skill: …\")\nSKILL_DIR=\"<SKILL_DIR>\"\n\nmkdir -p \"$WORK_DIR/public/fonts\" \"$WORK_DIR/public/vendor\" \"$WORK_DIR/public/cards\"\ncp -n \"$SKILL_DIR/assets/fonts/\"* \"$WORK_DIR/public/fonts/\"\ncp -n \"$SKILL_DIR/assets/vendor/gsap.min.js\" \"$WORK_DIR/public/vendor/\"\n# stage the input video — RE-ENCODE with dense keyframes. Sources with a sparse GOP\n# (keyframe interval > ~1s) freeze on seek in the renderer (a frozen frame under the\n# overlays); -g / -keyint_min set to your composition fps make every frame seekable.\n# (Set both to your fps — 30 shown; use 24/25/60 to match.)\nffmpeg -y -i \"$VIDEO_PATH\" -c:v libx264 -crf 18 -g 30 -keyint_min 30 \\\n -pix_fmt yuv420p -movflags +faststart -c:a aac \"$WORK_DIR/public/input-video.mp4\"\n```\n\n#### Composition Template\n\n```html\n<!doctype html>\n<html lang=\"en\">\n <head>\n <meta charset=\"utf-8\" />\n <style>\n @font-face {\n font-family: \"Caveat\";\n src: url(\"fonts/Caveat-400-latin.woff2\") format(\"woff2\");\n font-weight: 400;\n font-display: block;\n }\n @font-face {\n font-family: \"Caveat\";\n src: url(\"fonts/Caveat-700-latin.woff2\") format(\"woff2\");\n font-weight: 700;\n font-display: block;\n }\n @font-face {\n font-family: \"LXGW WenKai TC\";\n src: url(\"fonts/LXGWWenKaiTC-400-latin.woff2\") format(\"woff2\");\n font-weight: 400;\n font-display: block;\n }\n @font-face {\n font-family: \"Inter\";\n src: url(\"fonts/Inter-400-latin.woff2\") format(\"woff2\");\n font-weight: 400;\n font-display: block;\n }\n @font-face {\n font-family: \"Inter\";\n src: url(\"fonts/Inter-700-latin.woff2\") format(\"woff2\");\n font-weight: 700;\n font-display: block;\n }\n @font-face {\n font-family: \"Virgil\";\n src: url(\"fonts/Virgil.woff2\") format(\"woff2\");\n font-display: block;\n }\n\n :root {\n /* Pick from the themeId palette table in Step 7 — example: classic */\n --bg: #fff9e3;\n --text: #1e1e1e;\n --accent-0: #1971c2;\n --accent-1: #e03131;\n --accent-2: #2f9e44;\n --accent-3: #e8590c;\n --accent-4: #9c36b5;\n --font-family: \"Caveat\", \"LXGW WenKai TC\", serif;\n }\n * {\n box-sizing: border-box;\n }\n /* Body font-family MUST list concrete font names (not just var(--font-family)) —\n the HyperFrames renderer's static analyzer doesn't expand CSS variables when\n resolving fonts, so a var-only chain triggers `font_family_without_font_face`\n lint and falls back to a generic. Use the concrete chain here; cards that\n want the theme font can still reference var(--font-family) internally. */\n html,\n body {\n margin: 0;\n padding: 0;\n width: 100%;\n height: 100%;\n overflow: hidden;\n background: #000;\n font-family: \"Inter\", \"Caveat\", \"LXGW WenKai TC\", ui-sans-serif, system-ui, sans-serif;\n }\n #stage {\n position: relative;\n width: 100%;\n height: 100%;\n overflow: hidden;\n }\n\n /* video-wrapper holds the source video. Its position / size are animated\n over time by the master timeline (one tween per layout transition). */\n .video-wrapper {\n position: absolute;\n left: 0;\n top: 0;\n width: 1920px;\n height: 1080px;\n overflow: hidden;\n border-radius: 0;\n box-shadow: none;\n }\n .video-wrapper video {\n width: 100%;\n height: 100%;\n object-fit: cover;\n }\n\n .card-host {\n position: absolute;\n pointer-events: none;\n overflow: hidden;\n }\n .card-host .card {\n position: relative;\n width: 100%;\n height: 100%;\n overflow: hidden;\n }\n .card-host .char {\n display: inline-block;\n visibility: visible;\n }\n\n /* Subtle drop shadow + rounded corners for non-fullscreen video framings */\n .video-wrapper.framed {\n border-radius: 16px;\n box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);\n }\n </style>\n </head>\n <body>\n <div\n id=\"stage\"\n data-composition-id=\"talking-head-recut\"\n data-start=\"0\"\n data-duration=\"121.2\"\n data-fps=\"30\"\n data-width=\"1920\"\n data-height=\"1080\"\n >\n <!-- Layer 1: source video — initial position matches card-01's layout -->\n <div class=\"video-wrapper\" id=\"video-wrap\">\n <video\n id=\"bg-video\"\n src=\"input-video.mp4\"\n playsinline\n data-has-audio=\"true\"\n data-start=\"0\"\n data-duration=\"121.2\"\n data-track-index=\"1\"\n ></video>\n </div>\n\n <!-- Layer 2: each card-host sits at the bounds dictated by its layout. -->\n <!-- IMPORTANT: every card-host MUST carry BOTH \"card-host\" and \"clip\" classes. -->\n <!-- - \"card-host\" → our positioning + pointer-events styles -->\n <!-- - \"clip\" → the marker Studio and the linter use to recognise a -->\n <!-- clip. Visibility itself comes from data-start / -->\n <!-- data-duration, which the runtime honours with or -->\n <!-- without this class -->\n <!-- (lint: timed_element_missing_clip_class, a warning). -->\n <!-- Example: card-01 with zone=\"fullscreen\" → card-host covers (0,0,1920,1080) -->\n <div\n class=\"card-host clip\"\n data-card-id=\"card-01\"\n data-start=\"1.0000\"\n data-duration=\"6.5000\"\n data-track-index=\"2\"\n style=\"left:0;top:0;width:1920px;height:1080px;visibility:hidden;opacity:0;\"\n >\n <!-- paste the contents of public/cards/card-01.html here -->\n </div>\n\n <!-- Example: card-02 with zone=\"side-panel\" (split composition layout) → card on left half -->\n <div\n class=\"card-host clip\"\n data-card-id=\"card-02\"\n data-start=\"8.0000\"\n data-duration=\"12.0000\"\n data-track-index=\"2\"\n style=\"left:0;top:0;width:960px;height:1080px;visibility:hidden;opacity:0;\"\n >\n <!-- card-02 HTML -->\n </div>\n\n <!-- ...one \"card-host clip\" per card with inline bounds matching resolveZoneBounds(card.zone)... -->\n\n <script src=\"vendor/gsap.min.js\"></script>\n <script>\n (function () {\n // count-up formatter helper\n window.__fmt = function (v, fmt) {\n if (typeof fmt === \"string\" && /^\\.[0-9]+f$/.test(fmt)) {\n return Number(v).toFixed(Number(fmt.slice(1, -1)));\n }\n if (fmt === \",d\") return Math.round(v).toLocaleString();\n return String(Math.round(v));\n };\n\n const tl = window.gsap.timeline({ paused: true });\n\n // ── Card lifecycle (one block per card) ──\n // Example for card-01 [1.0, 7.5] with kinetic-chars at +0.3, grow-x at +0.65:\n\n // Enter (fade in over 0.4s)\n tl.set('.card-host[data-card-id=\"card-01\"]', { visibility: \"visible\" }, 1.0);\n tl.fromTo(\n '.card-host[data-card-id=\"card-01\"]',\n { opacity: 0 },\n { opacity: 1, duration: 0.4, ease: \"power2.out\" },\n 1.0,\n );\n\n // Card-internal anims (compile each data-anim-* declaration here)\n tl.from(\n '.card[data-card-id=\"card-01\"] #card-01-title .char',\n { opacity: 0, y: 8, scale: 0.8, duration: 0.5, ease: \"power2.out\", stagger: 0.04 },\n 1.3,\n );\n tl.fromTo(\n '.card[data-card-id=\"card-01\"] #card-01-line',\n { width: 0 },\n { width: 420, duration: 0.5, ease: \"power2.out\" },\n 1.65,\n );\n\n // Exit (fade out over 0.35s, ending at endSec)\n tl.to(\n '.card-host[data-card-id=\"card-01\"]',\n { opacity: 0, duration: 0.35, ease: \"power2.in\" },\n 7.15,\n );\n tl.set('.card-host[data-card-id=\"card-01\"]', { visibility: \"hidden\" }, 7.5);\n\n // ── Video framing transitions ──\n // When the next card uses a different composition layout, animate the\n // video-wrapper to its new bounds. Example: card-01 = fullscreen\n // (video hidden behind), card-02 = split composition (zone=\"side-panel\"\n // → video on right, card on left).\n\n // Card-02 enters at 8.0s with the split composition. Animate video to\n // the right half during the card-01 → card-02 gap (between 7.5 and 8.0s).\n tl.set(\"#video-wrap\", { className: \"video-wrapper framed\" }, 7.5);\n tl.to(\n \"#video-wrap\",\n { left: 960, top: 0, width: 960, height: 1080, duration: 0.6, ease: \"power2.inOut\" },\n 7.5,\n );\n\n // Card-02 enter — same pattern as card-01\n tl.set('.card-host[data-card-id=\"card-02\"]', { visibility: \"visible\" }, 8.0);\n tl.fromTo(\n '.card-host[data-card-id=\"card-02\"]',\n { opacity: 0 },\n { opacity: 1, duration: 0.4, ease: \"power2.out\" },\n 8.0,\n );\n // ...card-02 internal anims...\n\n // ── repeat for each card; if the NEXT card's layout differs,\n // insert another tl.to('#video-wrap', ...) tween before its enter ──\n\n window.__timelines = window.__timelines || {};\n window.__timelines[\"talking-head-recut\"] = tl;\n })();\n </script>\n </div>\n </body>\n</html>\n```\n\n#### GSAP Statement Cheat Sheet\n\nCompile each `data-anim` attribute into a GSAP statement. Times are\n**absolute seconds** = card.startSec + data-anim-at, quantized to 1/fps.\nSelector is `.card[data-card-id=\"X\"] #elementId`.\n\n| data-anim | GSAP statement template |\n| ------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |\n| `fade-in` | `tl.fromTo(SEL, { opacity: 0 }, { opacity: 1, duration: D, ease: 'power2.out' }, T);` |\n| `fade-out` | `tl.to(SEL, { opacity: 0, duration: D, ease: 'power2.in' }, T);` |\n| `slide-in` (from=left, dist=80) | `tl.fromTo(SEL, { opacity: 0, x: -80 }, { opacity: 1, x: 0, duration: D, ease: 'power2.out' }, T);` |\n| `kinetic-chars` (pop) | `tl.from(SEL + ' .char', { opacity: 0, y: 8, scale: 0.8, duration: D, ease: 'power2.out', stagger: S }, T);` |\n| `count-up` | `(function(){const o={v:FROM};tl.to(o,{v:TO,duration:D,ease:'power2.out',onUpdate:function(){const el=document.querySelector(SEL);if(el)el.textContent=__fmt(o.v,'FMT');}},T);})();` |\n| `draw-path` | `(function(){const el=document.querySelector(SEL);if(el){const L=el.getTotalLength();tl.set(SEL,{strokeDasharray:L,strokeDashoffset:L},T);tl.to(SEL,{strokeDashoffset:0,duration:D,ease:'power2.inOut'},T);}})();` |\n| `grow-x` (target-w=W) | `tl.fromTo(SEL, { width: 0 }, { width: W, duration: D, ease: 'power2.out' }, T);` |\n| `grow-y` (target-h=H) | `tl.fromTo(SEL, { height: 0 }, { height: H, duration: D, ease: 'power2.out' }, T);` |\n| `scale-pop` | `tl.fromTo(SEL, { opacity: 0, scale: 0.6 }, { opacity: 1, scale: 1, duration: D, ease: 'back.out(1.6)' }, T);` |\n| `mask-reveal` (direction=left) | `tl.fromTo(SEL, { clipPath: 'inset(0 100% 0 0)' }, { clipPath: 'inset(0 0 0 0)', duration: D, ease: 'power2.inOut' }, T);` |\n\nQuantize: `T = Math.round(absSec * fps) / fps`. At 30fps the smallest\nstep is `1/30 ≈ 0.0333s`; rounding to 4 decimals (`.toFixed(4)`) is fine\ninside the JS literal.\n\n#### Video Framing Reference (per `layout` value)\n\nThe selector for the video container is `#video-wrap`. Animate its\nbounds between cards using `tl.to('#video-wrap', { ...bounds }, T)`.\nInitial bounds should be set inline on the element to match card-01's\nlayout. Pick a transition duration of 0.5–0.7s with `ease: 'power2.inOut'`.\n\n**Decorative frames** (`clean` / `hairline` / `polaroid`) sit as a\n**sibling** of `#video-wrap` and follow it through layout transitions.\nSee\n[`references/frames/`](references/frames/) for each frame's placement\nHTML, suggested CSS, and which layouts it pairs with. Quick rule:\n`overlay` layout suppresses decorative frames (the full-bleed video\nclashes with chrome); PiP layouts already have their own pill treatment\n(border-radius + white ring + shadow), so add a decorative frame only on\ntop of `split` / `stack`.\n\n**GSAP target lookup table** for `#video-wrap` per composition layout\n(landscape 1920×1080; portrait is in `references/layouts/*.html`, and 4:5 is\nderived from portrait by the proportional scaling described above):\n\n| composition layout | typical card.zone | `#video-wrap` GSAP target | extra css class |\n| ------------------------------------ | ----------------- | ------------------------------------------------------------------------- | ------------------------------------------ |\n| `split` | `side-panel` | `{ left: 960, top: 0, width: 960, height: 1080 }` | — |\n| `stack` | `lower-third` | `{ left: 14, top: 14, width: 1892, height: 548 }` (top 52%) | — |\n| `pip` (bottom-right) | `fullscreen` | `{ left: 1480, top: 760, width: 400, height: 300 }` | `pip-pill` (border-radius + ring + shadow) |\n| `pip` (top-left) | `fullscreen` | `{ left: 40, top: 40, width: 400, height: 300 }` | `pip-pill` |\n| `overlay` (video full-bleed) | `video-overlay` | `{ left: 0, top: 0, width: 1920, height: 1080 }` (no change from default) | — |\n| **hide video** (pure-graphic moment) | `fullscreen` | `{ opacity: 0 }` (or move off-canvas) | — |\n\nTo toggle the pip-pill chrome (border-radius + white ring + drop shadow)\nwhen entering or leaving a pip moment:\n\n```js\n// Enter pip — add chrome\ntl.set(\"#video-wrap\", { className: \"video-wrapper pip-pill\" }, T);\ntl.to(\n \"#video-wrap\",\n { left: 1480, top: 760, width: 400, height: 300, duration: 0.6, ease: \"power2.inOut\" },\n T,\n);\n\n// Leave pip — back to clean full-bleed\ntl.set(\"#video-wrap\", { className: \"video-wrapper\" }, T_NEXT);\ntl.to(\n \"#video-wrap\",\n { left: 0, top: 0, width: 1920, height: 1080, duration: 0.6, ease: \"power2.inOut\" },\n T_NEXT,\n);\n```\n\n**Card-host bounds match the zone**. Resolve the card's `zone` into\npixel bounds using the table at the top of Step 6, then write those\ninto the card-host's inline `style=\"left:Xpx;top:Ypx;width:Wpx;\nheight:Hpx;...\"`. For `video-overlay` zone (overlay recipe), the\ncard-host fills the full canvas — your CSS inside `.card .root`\ndecides where the actual visible card sits.\n\n#### HyperFrames Layout / Animation QA Rules\n\n- Build each card's static hero frame first: the moment where the card is fully visible and readable.\n- Confirm video, cards, subtitles/captions, and diagrams do not unintentionally overlap.\n- Confirm hidden video areas are clipped by the frame and not visible outside intended bounds.\n- Register one paused master timeline as `window.__timelines[\"talking-head-recut\"]`.\n- Build timelines synchronously at page load; no `async`, `setTimeout`, Promises, or media `play()` calls.\n- Do not use `Math.random()` or `Date.now()` in render paths.\n- `repeat: -1` is allowed only under the finite root `data-duration`; for loops that must end earlier, calculate finite repeats from the video duration.\n- Prefer GSAP transforms and opacity (`x`, `y`, `scale`, `rotation`, `opacity`) over layout properties (`top`, `left`, `width`, `height`) for motion.\n- Animate wrappers such as `#video-wrap`, not the video element dimensions directly.\n- Avoid animating the same property on the same element from multiple timelines at the same time.\n- Use `data-track-index`, not `data-layer`; use `data-duration`, not `data-end`.\n- Every timed element (`card-host`, sub-composition, etc.) should include `class=\"clip\"` alongside its own classes — e.g. `class=\"card-host clip\"`. Visibility itself is driven by `data-start` / `data-duration`: the runtime gates every `[data-start]` element to its window whether or not this class is present. `.clip` is the marker Studio and the GSAP clip-ownership rules read to recognise a clip, so leaving it off makes the element harder to edit and to lint (lint: `timed_element_missing_clip_class`, a warning).\n- For body / global `font-family`, list **concrete font names** (`'Inter', 'Caveat', …`) — not a CSS variable like `var(--font-family)`. The HyperFrames font resolver doesn't expand CSS vars during static analysis (lint: `font_family_without_font_face`). Cards may still use `var(--font-family)` internally since their `@font-face` declarations are loaded.\n\n### 10. Render to MP4\n\n```bash\ncd \"$WORK_DIR\"\nPRODUCER_BROWSER_GPU_MODE=hardware npx hyperframes render public \\\n --skill=talking-head-recut \\\n -o output.mp4 \\\n --fps 30\n```\n\n`hyperframes render <dir>` reads `<dir>/index.html` and produces the MP4.\nThe source program audio stays on `#bg-video`, so the rendered MP4 preserves the\ntalking-head audio without a manual remux.\nThe flag `PRODUCER_BROWSER_GPU_MODE=hardware` (or `--browser-gpu`) is\nstrongly recommended on macOS — software-only Chrome rendering times out\non most laptops.\n\nFor a sanity check before the full render, capture a single frame at a\nspecific timestamp:\n\n```bash\nnpx hyperframes snapshot public --at 5 # → public/snapshots/frame-00-at-5s.png (a single --at ignores --out)\n```\n\n### 11. Report Results\n\nTell the user:\n\n- Work directory path\n- `storyboard.json` (the card outline you designed)\n- `public/cards/*.html` (one HTML per card)\n- `public/index.html` (the assembled composition)\n- `output.mp4` (the final video)\n- ASR provider used\n- Card count + how you chose them (in 1 sentence)\n- Any missing keys or quality caveats\n\n**Optional live preview (on request only).** The clip plays unchanged inside `public/index.html` with the overlays on top, so it previews faithfully. **Don't open it during the run.** When the user asks, start a long-lived server **after** render and report the URL:\n\n```bash\n(cd \"$WORK_DIR/public\" && npx hyperframes preview --background) # or `npx hyperframes play` for a shareable link\n```\n\nDo not delete the work directory unless the user asks.\n",
335
- "SLATES-MAPPING.md": "# HyperFrames in Slates: what each command and Studio surface is here\n\nThe folders beside this file are HyperFrames' own skills, unmodified (see `NOTICE`). They were\nwritten for HyperFrames' CLI and its Studio, and they say `npx hyperframes <command>` and \"the Studio\ntimeline\" throughout. Inside Slates there is no HyperFrames project folder and no CLI to run: an HTML\nclip is one HyperFrames composition (an HTML document with a GSAP timeline registered on\n`window.__timelines`) drawn on an overlay track of a Slates cut. Read the craft in those skills; do\nthe work with the Slates tools below. Never run their scripts or `npx hyperframes`.\n\nSlates' own guides direct the work and these carry the craft: for an ad, start with the Slates guide\n(`slates_get_prompting_guide`, query: the brief), and come here when writing a layer or for editing\ncraft.\n\n## Commands\n\n| HyperFrames | In Slates |\n|---|---|\n| `render` (any quality, local or `--docker`) | Export the Cut: `slates_export_video` for one cut, `slates_export_cuts` for several cuts or delivery formats at once. HTML clips render with the cut. |\n| `preview`, `play` | The Slates player: the Cut's Viewer. Open it for the user with `slates_set_view`. |\n| `add <name>` | The registry picker in the Cut, or `slates_list_motion_blocks` then `slates_add_html_clip` with `block` set to the item's name. |\n| `catalog --query` | `slates_list_motion_blocks` with `query`. It reads the registry at the HyperFrames version Slates runs; there is no on-device tier to offer. |\n| `lint`, `check` (and the old `validate`, `inspect`, `layout`) | `slates_check_composition`. The same check runs on every `slates_add_html_clip` and `slates_update_html_clip`, and its findings come back in the result: fix every error before moving on. |\n| `timeline --json` | `slates_get_timeline`: tracks, clips, their frames and the frame rate. |\n| `tts` | Slates' text-to-speech seat, `inworld-tts-2`, through `slates_generate_audio` (craft: `slates_get_prompting_guide`, topic `tts`). It spends credits: quote first. |\n| `transcribe` | `slates_transcribe_asset` (free, on the user's machine), read back with `slates_get_asset_transcript`. Captions from it: `slates_add_captions`. |\n| `doctor` | `slates doctor` in the Slates CLI checks the Slates setup. |\n| `upgrade`, `info`, `docs`, `skills`, `compositions`, `clean`, `benchmark`, `browser` | Not needed: Slates ships one pinned HyperFrames version and these skills with it. |\n| `cloud`, `lambda`, `cloudrun`, `auth`, `publish` | Not needed: Slates exports on the user's machine. |\n| `feedback`, `telemetry`, `events`, `usage` | Do not run; they report to HyperFrames, not to Slates. |\n| `open`, `catch-up` (the HyperFrames desktop app) | Not needed: the work is already in the Slates app. |\n\n## Studio surfaces\n\n| HyperFrames Studio | In Slates |\n|---|---|\n| A timeline row | A Slates track. Layers go on overlay tracks (`slates_add_timeline_track`, type overlay), one element kind per track; a transparent foreground and its background plate sit on separate tracks. |\n| A clip's `data-start` and `data-duration` on the main timeline | The HTML clip's `startFrame` and `endFrame` (or `durationSec`) on the Slates timeline. Inside the composition, its own timing stays as the skills teach. |\n| The caption track | The track `slates_add_captions` makes, or an overlay track you name. |\n| The current selection (`preview --context`) | `slates_get_selection`. |\n| Safe zones | Show safe area in the Cut. |\n| The final preview before render | The Cut's Viewer; export only once the user approves, as the skills say. |\n\n## What Slates lacks (the build list)\n\nEach of these is named in the skills and has no Slates equivalent yet. When a skill calls for one, say\nit is not in Slates yet and work without it.\n\n- `beats`: a beat grid from the music, for cutting on the beat.\n- `remove-background`: cutting a subject out of footage.\n- `snapshot`: frames of a composition before export, to look at a layer as it will draw.\n- `compare`, `grade-compare`: comparing two renders or two grades frame by frame.\n- `render --batch` with variables: one composition rendered once per row of values.\n- `keyframes`: seek-safe keyframe diagnostics. Clip transforms over time on the Slates timeline are the engine plan's E5 and have no tool in this package yet.\n- `media-treatment`: deterministic looks on footage (grain, LUTs and the like).\n- `figma`: importing Figma assets, tokens and components.\n- `capture`: capturing a website into a composition.\n- `init` and sub-compositions: a multi-scene HyperFrames project. Slates holds one composition per HTML clip; nesting clips is the engine plan's compound clip, not built.\n- `history begin` / `undo` for an agent's turn: the app has its own undo, with no tool for it.\n- `present`: a navigable deck. Slates makes video, not slides.\n",
335
+ "SLATES-MAPPING.md": "# HyperFrames in Slates: what each command and Studio surface is here\n\nThe folders beside this file are HyperFrames' own skills, unmodified apart from the files `NOTICE` lists. They were\nwritten for HyperFrames' CLI and its Studio, and they say `npx hyperframes <command>` and \"the Studio\ntimeline\" throughout. Inside Slates there is no HyperFrames project folder and no CLI to run: an HTML\nclip is one HyperFrames composition (an HTML document with a GSAP timeline registered on\n`window.__timelines`) drawn on an overlay track of a Slates cut. Read the craft in those skills; do\nthe work with the Slates tools below. Never run their scripts or `npx hyperframes`.\n\nSlates' own guides direct the work and these carry the craft: for an ad, start with the Slates guide\n(`slates_get_prompting_guide`, query: the brief), and come here when writing a layer or for editing\ncraft.\n\n## Commands\n\n| HyperFrames | In Slates |\n|---|---|\n| `render` (any quality, local or `--docker`) | Export the Cut: `slates_export_video` for one cut, `slates_export_cuts` for several cuts or delivery formats at once. HTML clips render with the cut. |\n| `preview`, `play` | The Slates player: the Cut's Viewer. Open it for the user with `slates_set_view`. |\n| `add <name>` | The registry picker in the Cut, or `slates_list_motion_blocks` then `slates_add_html_clip` with `block` set to the item's name. |\n| `catalog --query` | `slates_list_motion_blocks` with `query`. It reads the registry at the HyperFrames version Slates runs; there is no on-device tier to offer. |\n| `lint`, `check` (and the old `validate`, `inspect`, `layout`) | `slates_check_composition`. The same check runs on every `slates_add_html_clip` and `slates_update_html_clip`, and its findings come back in the result: fix every error before moving on. |\n| `timeline --json` | `slates_get_timeline`: tracks, clips, their frames and the frame rate. |\n| `tts` | Slates' text-to-speech seat, `inworld-tts-2`, through `slates_generate_audio` (craft: `slates_get_prompting_guide`, topic `tts`). It spends credits: quote first. |\n| `transcribe` | `slates_transcribe_asset` (free, on the user's machine), read back with `slates_get_asset_transcript`. Captions from it: `slates_add_captions`. |\n| `doctor` | `slates doctor` in the Slates CLI checks the Slates setup. |\n| `upgrade`, `info`, `docs`, `skills`, `compositions`, `clean`, `benchmark`, `browser` | Not needed: Slates ships one pinned HyperFrames version and these skills with it. |\n| `cloud`, `lambda`, `cloudrun`, `auth`, `publish` | Not needed: Slates exports on the user's machine. |\n| `feedback`, `telemetry`, `events`, `usage` | Do not run; they report to HyperFrames, not to Slates. |\n| `open`, `catch-up` (the HyperFrames desktop app) | Not needed: the work is already in the Slates app. |\n\n## Studio surfaces\n\n| HyperFrames Studio | In Slates |\n|---|---|\n| A timeline row | A Slates track. Layers go on overlay tracks (`slates_add_timeline_track`, type overlay), one element kind per track; a transparent foreground and its background plate sit on separate tracks. |\n| A clip's `data-start` and `data-duration` on the main timeline | The HTML clip's `startFrame` and `endFrame` (or `durationSec`) on the Slates timeline. Inside the composition, its own timing stays as the skills teach. |\n| The caption track | The track `slates_add_captions` makes, or an overlay track you name. |\n| The current selection (`preview --context`) | `slates_get_selection`. |\n| Safe zones | Show safe area in the Cut. |\n| The final preview before render | The Cut's Viewer; export only once the user approves, as the skills say. |\n\n## What Slates lacks (the build list)\n\nEach of these is named in the skills and has no Slates equivalent yet. When a skill calls for one, say\nit is not in Slates yet and work without it.\n\n- `beats`: a beat grid from the music, for cutting on the beat.\n- `remove-background`: cutting a subject out of footage.\n- `snapshot`: frames of a composition before export, to look at a layer as it will draw.\n- `compare`, `grade-compare`: comparing two renders or two grades frame by frame.\n- `render --batch` with variables: one composition rendered once per row of values.\n- `keyframes`: seek-safe keyframe diagnostics. Clip transforms over time on the Slates timeline are the engine plan's E5 and have no tool in this package yet.\n- `media-treatment`: deterministic looks on footage (grain, LUTs and the like).\n- `figma`: importing Figma assets, tokens and components.\n- `capture`: capturing a website into a composition.\n- `init` and sub-compositions: a multi-scene HyperFrames project. Slates holds one composition per HTML clip; nesting clips is the engine plan's compound clip, not built.\n- `history begin` / `undo` for an agent's turn: the app has its own undo, with no tool for it.\n- `present`: a navigable deck. Slates makes video, not slides.\n",
336
336
  };
337
337
  //# sourceMappingURL=hyperframes-content.js.map