@slatesvideo/shared 0.7.10 → 0.7.12
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.
- package/dist/auth.d.ts +11 -0
- package/dist/auth.js +31 -0
- package/dist/clients/desktop.d.ts +1 -0
- package/dist/clients/desktop.js +16 -2
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/manual/content.d.ts +1 -1
- package/dist/manual/content.js +1 -1
- package/dist/operations/index.d.ts +352 -59
- package/dist/operations/index.js +438 -36
- package/dist/operations/surface.js +6 -0
- package/dist/skills/content.js +9 -4
- package/dist/skills/hyperframes-content.js +11 -11
- package/dist/skills/hyperframes.d.ts +3 -1
- package/dist/skills/hyperframes.js +127 -4
- package/package.json +1 -1
- package/skills/hyperframes/NOTICE +24 -0
- package/skills/hyperframes/SLATES-MAPPING.md +5 -4
- package/skills/hyperframes/faceless-explainer/references/motion-language.md +13 -17
- package/skills/hyperframes/faceless-explainer/references/visual-design.md +10 -10
- package/skills/hyperframes/hyperframes/references/frame-worker-core.md +1 -1
- package/skills/hyperframes/hyperframes-animation/adapters/gsap-easing-and-stagger.md +20 -24
- package/skills/hyperframes/hyperframes-animation/rules/sine-wave-loop.md +1 -1
- package/skills/hyperframes/hyperframes-animation/rules/spring-pop-entrance.md +18 -25
- package/skills/hyperframes/pr-to-video/references/motion-language.md +13 -17
- package/skills/hyperframes/pr-to-video/references/visual-design.md +8 -8
- package/skills/hyperframes/product-launch-video/references/motion-language.md +13 -17
- package/skills/hyperframes/product-launch-video/references/visual-design.md +10 -10
- package/skills/slates-start-here.md +20 -14
|
@@ -28,9 +28,9 @@ export const HYPERFRAMES_FILES = {
|
|
|
28
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
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
|
-
"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",
|
|
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: overshoot and settle, Slates' default arrival (Part 2, rule 1) → `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. Arrivals overshoot and settle; presses squash\n\nSlates' motion doctrine, which replaces this file's earlier ban on overshoot. An arriving element passes its mark and springs back into place: a spring with a damping ratio of about 0.7–0.85 reads premium (the worker's seek-safe `springEase` in `../../hyperframes-animation/adapters/gsap-easing-and-stagger.md` → Spring Eases, or `back.out` near 1.2–1.4). Position and scale may overshoot; opacity and colour never do. A press squashes the control under the cursor and springs it back. An exit is one motion, 40–50% shorter than its entrance, accelerating away (`power3.in`). What still reads cheap is bounce sprayed on everything at once: give each element its role, and after a landing let the camera or the next element carry the motion.\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. Nothing fully stops — overlap, and give every hold a motivated motion\n\nSlates' motion doctrine, which replaces this file's earlier \"no motion over bad motion\". Moves overlap: the next one starts when the previous is 30–50% done, so the film never comes to a dead stop between beats. One continuous camera carries the piece, every framing a key on one eased path, never a chain of moves that each stop. A hold keeps a motivated motion: the camera creeps toward what is being read, a highlight glides across the line, a total ticks up. Two kinds of motion stay banned because nothing motivates them:\n\n- **No lazy breathing.** Cards or text scaling up and down in a loop to look \"alive\" is the cheap tell.\n- **No drift off the subject.** A slow pan or push that wanders away from what the viewer is reading in the back half of a scene breaks their sightline. A creep toward it is the opposite move, and the right one.\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\nArrivals overshoot and settle, presses squash, exits run 40–50% shorter than entrances; reveal sequentially in the back ~50% timed to the VO (not dumped in the first 25%); moves overlap so nothing fully stops, and every hold carries a motivated motion (a camera creep, a highlight), never breathing or a drift off the subject; 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 that drifts off what is being read; many elements floating independently as \"motion.\" Fix with rule 3 (motivated motion only: a camera creep, a highlight, a count).\n\n**Rigid:** arrivals that stop dead on their mark with no settle, presses with no squash, exits as long as their entrances, moves that finish before the next begins. Fix with rules 1 and 3.\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`) each word overshooting and settling; the camera's slow **push** on the root (`multi-phase-camera`) keeps creeping toward the headline.\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; the camera keeps creeping toward it; no breathing, no drift off the word.\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 an overshoot-and-settle spring on arrivals.\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",
|
|
33
|
-
"faceless-explainer/references/visual-design.md": "# Visual design — faceless-explainer per-frame shot method\n\n> The method behind **Step 4 (Frame visual design)**. You (the orchestrator) read it to **enrich `STORYBOARD.md` frames in place** — story-design wrote the skeleton (each frame's `scene`, `voiceover`, `transition_in`, the narrative fields, and optionally a candidate blueprint id); you add how each frame **looks and moves**. The unit you write per frame is a **time-coded shot sequence** — a shot directed across its whole duration, not a static slide. You write **no HTML** (that's the frame workers). Because the explainer is **faceless, every visual is invented** — typography, abstract graphics, diagrams, data-viz — so you **design** the visual elements rather than select captured assets (there is no `capture/` to read). `frame.md` is your palette/type truth by role. Layout is a compact vocabulary in this file (the **Layout** section below), stated inline per Scene; motion vocabulary + the motion doctrine + the seek-safe core → `motion-language.md`; the proven shapes → `../../hyperframes-animation/blueprints-index.md` + `blueprints/<id>.md`; concrete rules resolve in Step 5 from this skill's local `../../hyperframes-animation/rules/`. Adding palette theory or a generic font rule here? Wrong home — `frame.md` + `hyperframes-creative`.\n\n## The unit is a time-coded shot sequence\n\nA frame's visual layer is **a sequence of time windows paced to the voiceover**, not a bag of effect tags. The failure that reads as PowerPoint is **front-loading**: the agent rushes the whole canvas on screen in the first ~25%, and then it just sits. A time-coded shot sequence written **against the VO** makes that impossible: each window states what is on screen and what is moving, and **nothing appears before the voiceover reaches it.** In an explainer the development _is_ the teaching — the formula assembling term by term, the diagram gaining a layer, the count-up landing the statistic. Let the build _be_ the message.\n\nWrite each frame as a handful of windows cued by the spoken line:\n\n```\nScene 1 (0.0–Xs): only what the VO is saying at t=0 enters — never the whole canvas\nScene 2 (Xs–Ys): the next piece reveals as the VO names it (a line / layer / node / stat)\n … one window per spoken cue — as many or as few as the line calls for\nScene N (…–end): content has resolved; hold the read (stillness; subtle jitter at most)\n```\n\n- Each `Scene` line names **what's on screen**, **what moves in this window**, and **where it sits** (layout, inline). Times are real seconds across the frame's `duration`.\n- **Pace reveals to the voiceover; never front-load.** This is the core anti-PowerPoint mechanism (→ `motion-language.md` Part 2 Rule 2). At t=0 show only what the VO is saying then; reveal each further piece — a line, a layer, even an h1 — **when the VO names it**, spreading reveals across the shot and especially the **back ~50%**. **The window count = the number of spoken cues the line calls for** — a two-beat line is two windows, a five-item enumeration is five or six. There is **no fixed count and no mandatory \"middle\" act**; the only sin is dumping everything up front. (A **silent** frame — a diagram assembling itself, a worked example animating — paces its reveals to the beat instead of the VO; same discipline, no spoken cue.)\n- **End on a held read.** Once the content has resolved it holds and reads — **prefer stillness to bad motion**: no forced camera drift, no lazy breathing, no back-half pan/push; at most a subtle jitter keeps it alive (→ `motion-language.md`). On a short shot the final reveal and the hold are the **same window** — the hold is not a separate mandatory act. Only the final frame has a real exit; every other frame's exit is the harness transition (story's `transition_in`).\n- A **deliberately held** frame — content already revealed, now reading still — is legitimate and often right (a climax, a breather, a beat of held tension before a turn). The failure is never \"too still\"; it is **front-loaded-then-frozen** (everything dumped by ~25%, nothing cued to the VO). Place held beats deliberately for rhythm so the video isn't uniformly busy (allocate them in `## Video direction`). Reveal pacing + holds + the idle budget → `motion-language.md`.\n\n## Pick the shape — instantiate a blueprint\n\nDon't invent each shot from scratch. The frame's **role** (its `type` / `beat`) points to a proven shape:\n\n1. **Match the role to a blueprint.** Open `../../hyperframes-animation/blueprints-index.md`, find the frame's role in the **role→blueprint menu**, and pick the blueprint whose intent fits this beat (story may already have named a candidate id — confirm or override it). Read that `blueprints/<id>.md`: it is a short, domain-agnostic, **time-coded shot template with `[slots]`** and a named **signature move** (the thing that makes the shape itself — the SVG ring, the push-THROUGH, the in-place token swap).\n\n2. **Instantiate its `[slots]` with THIS frame's invented content** — three postures:\n - **Reproduce** — the blueprint fits the beat and your content maps onto its slots cleanly. Fill every `[slot]` with this frame's word / shape / stat and follow its Scene timing. Write the resulting Scene lines.\n - **Adapt** — the _structure_ fits but the content / element-count / surface doesn't (or you want a fresher surface to avoid templating). State **what you keep / what you change** in one line, then write the adapted Scene lines. You may extend or vary; you may **never** drop the **signature move** (drop it and you picked the wrong blueprint), and you keep the reveals **paced to the VO** — never collapse the shape to a single front-loaded dump.\n - **Compose** — no blueprint fits the beat. Build the shot from the **motion vocabulary** in `motion-language.md`: still pace the reveals to the VO across the shot, never fire everything at t=0. Mark it `blueprint: compose`.\n\n3. **Keep the signature move.** Whichever posture, the blueprint's signature move (named in its file) is the spine of the shot — it usually lands on the shot's key reveal. Carry it through.\n\nThe blueprint's own Scene lines, motion vocabulary, and `rule mapping` are your raw material; you are choosing a shape and casting this frame's invented content into it, not copying an engineering spec.\n\n## What you add to each frame\n\nStory-design's `## Frame N` block already carries the narrative. You append the shot. Story's `scene` / `voiceover` / `transition_in` / role fields stay untouched.\n\n```\n## Frame 3 — How interest compounds\n- scene: a snowball rolls downhill, gaining a labeled ring each turn ← refine only if it could read sharper\n- voiceover: \"…\" ← story's; leave it\n- transition_in: crossfade ← story's; leave it\n- type: feature_showcase ← story's\n- persuasion: Concretization + progressive disclosure\n- beat: comprehension\n- blueprint: dataviz-countup (Adapt) ← you add: the id you instantiated (or \"compose\")\n- focal: the snowball ← you add: the INVENTED hero element of this beat\n- roles: snowball = foreground subject · hill = background gradient (dim ~40%) · ring labels = supporting ← you add: role per invented element\n- sfx: whoosh-soft, tick ← you add: the sound the beat wants (fetched + mounted at root; never yours to embed)\n\nAdapt: keep the count-up-ring signature; the trend chart becomes the snowball's labeled rings climbing.\nScene 1 (0.0–1.2s): solid hill gradient (dim ~40%); the snowball seats upper-left, a circular progress ring + bold center number anchor it — Centered template, ~50% of frame. Slow push-in runs underneath.\nScene 2 (1.2–3.4s): as the VO names each turn, the snowball rolls down and gains one labeled ring per turn (layer-reveal); a small total ticks up beside it (the count-up reveals on its spoken cue, not at t=0). Asymmetric 60/40, 3 depth layers.\nScene 3 (3.4–5.0s): land the final ring emphasis dead-center, accent glow blooms behind it and holds; the total reads clean and STILL — no continuing push, no breathing (a held beat beats bad motion). The stillness reads against the prior motion.\n```\n\nThe lightweight tags:\n\n- **`blueprint:`** — the id you instantiated (with `(Reproduce)` / `(Adapt)`), or `compose`. One id per frame.\n- **`focal:`** — which **invented** element is the hero of this beat (a hero word, a diagram node, a chart series, a coined-term card).\n- **`roles:`** — each invented element's role: `foreground subject` (the thing the eye lands on, text laid around it) · `background` (full-bleed field / gradient / grid, dim 30–50%) · `supporting` (labels, secondary shapes, ambient layers). Since there are no captured assets, you are **designing** these elements, not selecting them — keep them **few and load-bearing**. A user-supplied `public/<basename>` image, if any (named in story's `asset_candidates`), is treated as the `focal` cutout or a `background`.\n- **`sfx:`** — name the sound the beat wants (an impact for a slam, a whoosh for a push, a tick for a count). The audio script's `fetch-sfx` pass retrieves it and the assembler mounts it at the root — you only **name** it, never embed an `<audio>` element.\n\n**Layout is stated INLINE in each Scene line** — name the template, density, depth, and hierarchy as part of \"where it sits\" (`Centered, ~50% of frame`, `asymmetric 60/40, 3 depth layers`), drawing on the **Layout** vocabulary below; never write px / scale / shadow recipes (the worker writes those).\n\n**Motion is named INLINE in each Scene line** — name the move from `motion-language.md`'s vocabulary (`per-word reveal`, `layer-reveal`, `count-up`, `glow blooms`) and let it settle on a long-tail curve (`power3` default — smooth beats bouncy; see `motion-language.md`). Never write ease curves / ms / stagger (those resolve in Step 5 from this skill's local `../../hyperframes-animation/rules/`).\n\n## Inventing the visual — diagrams, type, data-viz\n\nThis is a **faceless** explainer: the frame's hero is something you **design**, not a screenshot. Three first-class treatments, each invented from the frame's `narrativeRole` / `keyMessage` / `scene`:\n\n- **Typographic / kinetic type** — the hero word, the coined term, a number, a short enumeration. Treat type as the subject: full-bleed scale, weight contrast, one emphasized term. Strongest for hooks, concept names, takeaways. In a faceless explainer **type is often the primary visual** — lean on the type ramp hard.\n- **Abstract graphics** — shapes, fields, paths, geometry that _embody_ the idea (the snowball, the spotlight, the staircase-not-cliff). Build the metaphor the script names; don't decorate with generic bokeh.\n- **Diagram / data-viz** — nodes + edges, a chart, a number line, a formula, a process flow. The build (each part appearing on beat) is the teaching — design it to assemble across the Scenes, not appear whole.\n\nMake the invented hero **fill 40–60% of the frame** — a diagram big enough to read its labels, a hero word near full-bleed. Don't shrink the one designed element into decoration around empty space.\n\n## Layout — named inline per Scene\n\nState each Scene's layout as part of \"where it sits.\" **If the blueprint already implies a composition** (a ring around a center, stations on a wide canvas, two cards from opposite wings), that wins — describe it directly; the vocabulary below is for **composing freely** or a generic beat, not a menu you must pick from. Never write px / scale / shadow (the worker does). One frame's layout can EVOLVE across its Scenes (Scene 1 centered hero → Scene 2 rearranges to a grid). Use **≥3 different framings per video** so it doesn't read as one repeated template; never the same framing twice in a row.\n\n- **Framing vocabulary** — centered (hero / climax) · rule-of-thirds · split-screen (comparison) · layered-depth (immersive opening / atmosphere) · asymmetric 60/40 or 70/30 (editorial — a dense diagram + a caption rail) · triptych (three items / the rule-of-three landing) · full-width strip (a number line / timeline / enumeration). Vary the framing across the video so it doesn't read as one repeated template — let the beat decide, not a quota.\n- **Density** — primary visual ≥ 40% of canvas; ≥ 3 depth layers (background + midground + foreground); never a lone small cluster floating in empty space. Openings and closings are prone to emptiness — add environmental layers (dual-radial swell, low-opacity scanlines, a hairline grid, brand-color ambient). Squint test: after blur you can still pick out the #1 element.\n- **Hierarchy** — combine ≥ 2 of size (3:1) / weight (800 vs 400) / contrast / position (upper-third is golden) / motion, so one element clearly dominates. A title that is only _larger_ (sharing weight/color/spacing with body) reads weak.\n- **Depth** — layer 2–3 of: size, blur, opacity gradient, overlap, shadow-stack, counter-scale on a push.\n- **Don't show**: nav bars, footers, scrollbars, real cursors / browser chrome, generic decorative shapes standing in for a designed metaphor, floating bokeh / purple-blue \"AI\" gradients (the default-AI cliché, banned). A faceless explainer has no real interface — an interface mock is correct **only** when the topic itself is about that interface and the frame intentionally reconstructs it.\n\n## Portrait & square (non-16:9 canvases)\n\nThe zones, density, hierarchy, and depth principles all still apply; the **aspect ratio** changes, and a wide-frame layout does not transplant into a tall one — design for the storyboard's `format` from the start, never plan landscape and \"crop.\"\n\n- **Stack vertically, not side-by-side** — split-screen / triptych / 60-40 become top/bottom stacks, vertical step lists, stacked bands. Square tolerates side-by-side only for two compact items.\n- **Vertical center moves with the canvas** — anchor a centered hero around **y ≈ 0.42 × height** (portrait ≈806, square ≈454), not a fixed 540.\n- **Type runs larger, fewer words per line** — narrow frames wrap long headlines badly; prefer short kinetic lines, bigger type, more vertical rhythm.\n- **Travels well to portrait:** Centered, Layered Depth, Full-Width Strip (stacked band), vertical Rule-of-Thirds. **Avoid** wide Split Screen and Triptych — use stacked equivalents.\n\n## `## Video direction` — write the invariants ONCE\n\nThe whole video shares one look and one motion grammar. Write a **`## Video direction`** block ONCE at the top of `STORYBOARD.md` so every frame inherits it and per-frame Scene lines carry only the **delta**. This block is load-bearing — it is what binds many independent shots into one film. **Keep it.**\n\n- **palette system** — from `frame.md`: which roles map to which hues. Never invent.\n- **motion grammar + reveal model** — long-tail eases (`power3` default, smooth over bouncy) + the **VO-paced reveal** model every frame follows (reveal each piece on its spoken cue; never front-load) + what may stay alive during a hold (subtle jitter at most; no lazy breathing) (→ `motion-language.md`).\n- **rhythm / held-frame allocation** — name the **held / breather frames** (often before a climax or the turn in a story) so the video varies its energy: most frames reveal to the VO, a few hold still (a held read beats bad motion; the anti-monotony discipline; → `motion-language.md`).\n- **negative list** — what never appears: off-brand textures / effects the pack forbids, **plus both motion failure modes** — slideshow (front-load then freeze) and screensaver (everything floating independently) (→ `motion-language.md`).\n\nDo **not** repeat these per frame — restating video-level rules in every frame is exactly the bloat this layer prevents.\n\n## Palette & type — from `frame.md`, never invented\n\n- **Palette** — `frame.md` (the adopted pack) is the color truth; apply its roles per frame. Generic basics (one accent, tint neutrals, avoid pure `#000`/`#fff`) → `hyperframes-creative/references/house-style.md`.\n- **Type** — fonts resolve via `frame.md`'s type tokens; reference them **by role** (display / body / mono / the pack's ramp), never by raw family or px. Generic typography craft (embedded fonts, dark-bg optical compensation, `tabular-nums`) → `hyperframes-creative/references/typography.md`. In a faceless explainer type is often the primary visual — the hero word, the coined term, the kinetic enumeration — so lean on the type ramp hard.\n\n## Caption-band keep-out (plan side)\n\nThe bottom ~17% of the canvas is reserved for the caption pill. Plan every frame's content into the **top ~83%** so nothing important lands in the band (the worker enforces the pixel cutoff; you plan the layout). When captions are enabled, primary content and key visuals **cap at the band top**, and a centered hero anchors at **y ≈ 0.42 × height** (landscape ≈454, portrait ≈806), not the canvas midpoint; background / ambient / surface layers are exempt and may stay full-bleed. Holds even when captions are disabled — bottom-edge consistency.\n\n## Where the detail lives\n\n| For… | Read |\n| ------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- |\n| the proven shapes + role→blueprint menu + how to pick | `../../hyperframes-animation/blueprints-index.md` → `blueprints/<id>.md` |\n| motion — shot model, vocabulary, holds, idle budget, stillness, seek-safe | `motion-language.md` (local) |\n| layout — framing, density, depth, hierarchy, inventing the visual, caption band | the **Layout** + **Inventing the visual** sections in this file |\n| concrete eases / ms / stagger + rule recipe bodies (Step 5) | local `../../hyperframes-animation/rules/` (the frame worker reads it; you don't) |\n| palette + type tokens | the project's `frame.md`; basics → `hyperframes-creative` `house-style.md` / `typography.md` |\n| \"produced, not generated\" foreground density | `hyperframes-creative/references/video-composition.md` |\n| within-frame cuts / seams (zoom-through · cut-the-curve · waterfall) | `cut-catalog.md` (the worker builds them inside the composition) |\n| transitions | story-design owns `transition_in`; you don't touch it |\n\n## Before you finish — checklist\n\n- **`## Video direction`** written once at the top (palette · motion grammar + shot model + idle budget · stillness allocation · negative list incl. both failure modes); per-frame entries are deltas, not restatements.\n- Every frame is a **time-coded shot sequence** with real second windows across its `duration` — not a tag bag.\n- **No frame front-loads** — at t=0 only what the VO is saying enters; each further piece reveals on its spoken cue, across the back ~50%. Window count follows the VO (or the beat, on a silent frame), not a fixed number.\n- Every frame names a **`blueprint:`** id (Reproduce / Adapt) or `compose`; an Adapt states keep/change and **keeps the signature move**; nothing collapses to a single front-loaded dump — reveals stay paced to the VO.\n- **Held frames are deliberate** — allocated in Video direction for rhythm; a held read is fine (prefer stillness to bad motion), but no frame may be front-loaded-then-frozen.\n- Each frame names its **invented** `focal` + per-element `roles` (foreground / background / supporting), kept few and load-bearing.\n- The invented hero fills 40–60% of the frame (a diagram big enough to read, a hero word near full-bleed) — not shrunk into decoration around empty space.\n- Layout named **inline** per Scene (template / density / depth / hierarchy — the **Layout** vocabulary here); motion named **inline** per Scene from the vocabulary (`motion-language.md`). No px / ease curves / ms / JS.\n- Content planned into the top ~83% (caption band clear).\n- Palette / type pulled from `frame.md` by role — nothing invented.\n- You wrote no HTML; every visual is invented (no captured assets).\n",
|
|
33
|
+
"faceless-explainer/references/visual-design.md": "# Visual design — faceless-explainer per-frame shot method\n\n> The method behind **Step 4 (Frame visual design)**. You (the orchestrator) read it to **enrich `STORYBOARD.md` frames in place** — story-design wrote the skeleton (each frame's `scene`, `voiceover`, `transition_in`, the narrative fields, and optionally a candidate blueprint id); you add how each frame **looks and moves**. The unit you write per frame is a **time-coded shot sequence** — a shot directed across its whole duration, not a static slide. You write **no HTML** (that's the frame workers). Because the explainer is **faceless, every visual is invented** — typography, abstract graphics, diagrams, data-viz — so you **design** the visual elements rather than select captured assets (there is no `capture/` to read). `frame.md` is your palette/type truth by role. Layout is a compact vocabulary in this file (the **Layout** section below), stated inline per Scene; motion vocabulary + the motion doctrine + the seek-safe core → `motion-language.md`; the proven shapes → `../../hyperframes-animation/blueprints-index.md` + `blueprints/<id>.md`; concrete rules resolve in Step 5 from this skill's local `../../hyperframes-animation/rules/`. Adding palette theory or a generic font rule here? Wrong home — `frame.md` + `hyperframes-creative`.\n\n## The unit is a time-coded shot sequence\n\nA frame's visual layer is **a sequence of time windows paced to the voiceover**, not a bag of effect tags. The failure that reads as PowerPoint is **front-loading**: the agent rushes the whole canvas on screen in the first ~25%, and then it just sits. A time-coded shot sequence written **against the VO** makes that impossible: each window states what is on screen and what is moving, and **nothing appears before the voiceover reaches it.** In an explainer the development _is_ the teaching — the formula assembling term by term, the diagram gaining a layer, the count-up landing the statistic. Let the build _be_ the message.\n\nWrite each frame as a handful of windows cued by the spoken line:\n\n```\nScene 1 (0.0–Xs): only what the VO is saying at t=0 enters — never the whole canvas\nScene 2 (Xs–Ys): the next piece reveals as the VO names it (a line / layer / node / stat)\n … one window per spoken cue — as many or as few as the line calls for\nScene N (…–end): content has resolved; hold the read with a motivated motion (a camera creep toward it, a highlight, a count)\n```\n\n- Each `Scene` line names **what's on screen**, **what moves in this window**, and **where it sits** (layout, inline). Times are real seconds across the frame's `duration`.\n- **Pace reveals to the voiceover; never front-load.** This is the core anti-PowerPoint mechanism (→ `motion-language.md` Part 2 Rule 2). At t=0 show only what the VO is saying then; reveal each further piece — a line, a layer, even an h1 — **when the VO names it**, spreading reveals across the shot and especially the **back ~50%**. **The window count = the number of spoken cues the line calls for** — a two-beat line is two windows, a five-item enumeration is five or six. There is **no fixed count and no mandatory \"middle\" act**; the only sin is dumping everything up front. (A **silent** frame — a diagram assembling itself, a worked example animating — paces its reveals to the beat instead of the VO; same discipline, no spoken cue.)\n- **End on a held read.** Once the content has resolved it holds and reads — **keep a motivated motion alive**: a camera creep toward what is being read, a highlight gliding across the line, a total ticking up; never lazy breathing or a drift off the subject (→ `motion-language.md`). On a short shot the final reveal and the hold are the **same window** — the hold is not a separate mandatory act. Only the final frame has a real exit; every other frame's exit is the harness transition (story's `transition_in`).\n- A **deliberately held** frame — content already revealed, now being read with only a motivated motion — is legitimate and often right (a climax, a breather, a beat of held tension before a turn). The failure is never \"too still\"; it is **front-loaded-then-frozen** (everything dumped by ~25%, nothing cued to the VO). Place held beats deliberately for rhythm so the video isn't uniformly busy (allocate them in `## Video direction`). Reveal pacing + holds + the idle budget → `motion-language.md`.\n\n## Pick the shape — instantiate a blueprint\n\nDon't invent each shot from scratch. The frame's **role** (its `type` / `beat`) points to a proven shape:\n\n1. **Match the role to a blueprint.** Open `../../hyperframes-animation/blueprints-index.md`, find the frame's role in the **role→blueprint menu**, and pick the blueprint whose intent fits this beat (story may already have named a candidate id — confirm or override it). Read that `blueprints/<id>.md`: it is a short, domain-agnostic, **time-coded shot template with `[slots]`** and a named **signature move** (the thing that makes the shape itself — the SVG ring, the push-THROUGH, the in-place token swap).\n\n2. **Instantiate its `[slots]` with THIS frame's invented content** — three postures:\n - **Reproduce** — the blueprint fits the beat and your content maps onto its slots cleanly. Fill every `[slot]` with this frame's word / shape / stat and follow its Scene timing. Write the resulting Scene lines.\n - **Adapt** — the _structure_ fits but the content / element-count / surface doesn't (or you want a fresher surface to avoid templating). State **what you keep / what you change** in one line, then write the adapted Scene lines. You may extend or vary; you may **never** drop the **signature move** (drop it and you picked the wrong blueprint), and you keep the reveals **paced to the VO** — never collapse the shape to a single front-loaded dump.\n - **Compose** — no blueprint fits the beat. Build the shot from the **motion vocabulary** in `motion-language.md`: still pace the reveals to the VO across the shot, never fire everything at t=0. Mark it `blueprint: compose`.\n\n3. **Keep the signature move.** Whichever posture, the blueprint's signature move (named in its file) is the spine of the shot — it usually lands on the shot's key reveal. Carry it through.\n\nThe blueprint's own Scene lines, motion vocabulary, and `rule mapping` are your raw material; you are choosing a shape and casting this frame's invented content into it, not copying an engineering spec.\n\n## What you add to each frame\n\nStory-design's `## Frame N` block already carries the narrative. You append the shot. Story's `scene` / `voiceover` / `transition_in` / role fields stay untouched.\n\n```\n## Frame 3 — How interest compounds\n- scene: a snowball rolls downhill, gaining a labeled ring each turn ← refine only if it could read sharper\n- voiceover: \"…\" ← story's; leave it\n- transition_in: crossfade ← story's; leave it\n- type: feature_showcase ← story's\n- persuasion: Concretization + progressive disclosure\n- beat: comprehension\n- blueprint: dataviz-countup (Adapt) ← you add: the id you instantiated (or \"compose\")\n- focal: the snowball ← you add: the INVENTED hero element of this beat\n- roles: snowball = foreground subject · hill = background gradient (dim ~40%) · ring labels = supporting ← you add: role per invented element\n- sfx: whoosh-soft, tick ← you add: the sound the beat wants (fetched + mounted at root; never yours to embed)\n\nAdapt: keep the count-up-ring signature; the trend chart becomes the snowball's labeled rings climbing.\nScene 1 (0.0–1.2s): solid hill gradient (dim ~40%); the snowball seats upper-left, a circular progress ring + bold center number anchor it — Centered template, ~50% of frame. Slow push-in runs underneath.\nScene 2 (1.2–3.4s): as the VO names each turn, the snowball rolls down and gains one labeled ring per turn (layer-reveal); a small total ticks up beside it (the count-up reveals on its spoken cue, not at t=0). Asymmetric 60/40, 3 depth layers.\nScene 3 (3.4–5.0s): land the final ring emphasis dead-center, accent glow blooms behind it and holds; the total reads clean while the camera keeps creeping toward it — no breathing. The calm reads against the prior motion.\n```\n\nThe lightweight tags:\n\n- **`blueprint:`** — the id you instantiated (with `(Reproduce)` / `(Adapt)`), or `compose`. One id per frame.\n- **`focal:`** — which **invented** element is the hero of this beat (a hero word, a diagram node, a chart series, a coined-term card).\n- **`roles:`** — each invented element's role: `foreground subject` (the thing the eye lands on, text laid around it) · `background` (full-bleed field / gradient / grid, dim 30–50%) · `supporting` (labels, secondary shapes, ambient layers). Since there are no captured assets, you are **designing** these elements, not selecting them — keep them **few and load-bearing**. A user-supplied `public/<basename>` image, if any (named in story's `asset_candidates`), is treated as the `focal` cutout or a `background`.\n- **`sfx:`** — name the sound the beat wants (an impact for a slam, a whoosh for a push, a tick for a count). The audio script's `fetch-sfx` pass retrieves it and the assembler mounts it at the root — you only **name** it, never embed an `<audio>` element.\n\n**Layout is stated INLINE in each Scene line** — name the template, density, depth, and hierarchy as part of \"where it sits\" (`Centered, ~50% of frame`, `asymmetric 60/40, 3 depth layers`), drawing on the **Layout** vocabulary below; never write px / scale / shadow recipes (the worker writes those).\n\n**Motion is named INLINE in each Scene line** — name the move from `motion-language.md`'s vocabulary (`per-word reveal`, `layer-reveal`, `count-up`, `glow blooms`) and let it arrive with an overshoot-and-settle (a spring; `power3` only for what must not overshoot; see `motion-language.md`). Never write ease curves / ms / stagger (those resolve in Step 5 from this skill's local `../../hyperframes-animation/rules/`).\n\n## Inventing the visual — diagrams, type, data-viz\n\nThis is a **faceless** explainer: the frame's hero is something you **design**, not a screenshot. Three first-class treatments, each invented from the frame's `narrativeRole` / `keyMessage` / `scene`:\n\n- **Typographic / kinetic type** — the hero word, the coined term, a number, a short enumeration. Treat type as the subject: full-bleed scale, weight contrast, one emphasized term. Strongest for hooks, concept names, takeaways. In a faceless explainer **type is often the primary visual** — lean on the type ramp hard.\n- **Abstract graphics** — shapes, fields, paths, geometry that _embody_ the idea (the snowball, the spotlight, the staircase-not-cliff). Build the metaphor the script names; don't decorate with generic bokeh.\n- **Diagram / data-viz** — nodes + edges, a chart, a number line, a formula, a process flow. The build (each part appearing on beat) is the teaching — design it to assemble across the Scenes, not appear whole.\n\nMake the invented hero **fill 40–60% of the frame** — a diagram big enough to read its labels, a hero word near full-bleed. Don't shrink the one designed element into decoration around empty space.\n\n## Layout — named inline per Scene\n\nState each Scene's layout as part of \"where it sits.\" **If the blueprint already implies a composition** (a ring around a center, stations on a wide canvas, two cards from opposite wings), that wins — describe it directly; the vocabulary below is for **composing freely** or a generic beat, not a menu you must pick from. Never write px / scale / shadow (the worker does). One frame's layout can EVOLVE across its Scenes (Scene 1 centered hero → Scene 2 rearranges to a grid). Use **≥3 different framings per video** so it doesn't read as one repeated template; never the same framing twice in a row.\n\n- **Framing vocabulary** — centered (hero / climax) · rule-of-thirds · split-screen (comparison) · layered-depth (immersive opening / atmosphere) · asymmetric 60/40 or 70/30 (editorial — a dense diagram + a caption rail) · triptych (three items / the rule-of-three landing) · full-width strip (a number line / timeline / enumeration). Vary the framing across the video so it doesn't read as one repeated template — let the beat decide, not a quota.\n- **Density** — primary visual ≥ 40% of canvas; ≥ 3 depth layers (background + midground + foreground); never a lone small cluster floating in empty space. Openings and closings are prone to emptiness — add environmental layers (dual-radial swell, low-opacity scanlines, a hairline grid, brand-color ambient). Squint test: after blur you can still pick out the #1 element.\n- **Hierarchy** — combine ≥ 2 of size (3:1) / weight (800 vs 400) / contrast / position (upper-third is golden) / motion, so one element clearly dominates. A title that is only _larger_ (sharing weight/color/spacing with body) reads weak.\n- **Depth** — layer 2–3 of: size, blur, opacity gradient, overlap, shadow-stack, counter-scale on a push.\n- **Don't show**: nav bars, footers, scrollbars, real cursors / browser chrome, generic decorative shapes standing in for a designed metaphor, floating bokeh / purple-blue \"AI\" gradients (the default-AI cliché, banned). A faceless explainer has no real interface — an interface mock is correct **only** when the topic itself is about that interface and the frame intentionally reconstructs it.\n\n## Portrait & square (non-16:9 canvases)\n\nThe zones, density, hierarchy, and depth principles all still apply; the **aspect ratio** changes, and a wide-frame layout does not transplant into a tall one — design for the storyboard's `format` from the start, never plan landscape and \"crop.\"\n\n- **Stack vertically, not side-by-side** — split-screen / triptych / 60-40 become top/bottom stacks, vertical step lists, stacked bands. Square tolerates side-by-side only for two compact items.\n- **Vertical center moves with the canvas** — anchor a centered hero around **y ≈ 0.42 × height** (portrait ≈806, square ≈454), not a fixed 540.\n- **Type runs larger, fewer words per line** — narrow frames wrap long headlines badly; prefer short kinetic lines, bigger type, more vertical rhythm.\n- **Travels well to portrait:** Centered, Layered Depth, Full-Width Strip (stacked band), vertical Rule-of-Thirds. **Avoid** wide Split Screen and Triptych — use stacked equivalents.\n\n## `## Video direction` — write the invariants ONCE\n\nThe whole video shares one look and one motion grammar. Write a **`## Video direction`** block ONCE at the top of `STORYBOARD.md` so every frame inherits it and per-frame Scene lines carry only the **delta**. This block is load-bearing — it is what binds many independent shots into one film. **Keep it.**\n\n- **palette system** — from `frame.md`: which roles map to which hues. Never invent.\n- **motion grammar + reveal model** — arrival springs (overshoot and settle; `power3` only for what must not overshoot) + the **VO-paced reveal** model every frame follows (reveal each piece on its spoken cue; never front-load) + what keeps a hold alive (a motivated motion: a camera creep, a highlight; no lazy breathing) (→ `motion-language.md`).\n- **rhythm / held-frame allocation** — name the **held / breather frames** (often before a climax or the turn in a story) so the video varies its energy: most frames reveal to the VO, a few hold on a read with one motivated motion (the anti-monotony discipline; → `motion-language.md`).\n- **negative list** — what never appears: off-brand textures / effects the pack forbids, **plus both motion failure modes** — slideshow (front-load then freeze) and screensaver (everything floating independently) (→ `motion-language.md`).\n\nDo **not** repeat these per frame — restating video-level rules in every frame is exactly the bloat this layer prevents.\n\n## Palette & type — from `frame.md`, never invented\n\n- **Palette** — `frame.md` (the adopted pack) is the color truth; apply its roles per frame. Generic basics (one accent, tint neutrals, avoid pure `#000`/`#fff`) → `hyperframes-creative/references/house-style.md`.\n- **Type** — fonts resolve via `frame.md`'s type tokens; reference them **by role** (display / body / mono / the pack's ramp), never by raw family or px. Generic typography craft (embedded fonts, dark-bg optical compensation, `tabular-nums`) → `hyperframes-creative/references/typography.md`. In a faceless explainer type is often the primary visual — the hero word, the coined term, the kinetic enumeration — so lean on the type ramp hard.\n\n## Caption-band keep-out (plan side)\n\nThe bottom ~17% of the canvas is reserved for the caption pill. Plan every frame's content into the **top ~83%** so nothing important lands in the band (the worker enforces the pixel cutoff; you plan the layout). When captions are enabled, primary content and key visuals **cap at the band top**, and a centered hero anchors at **y ≈ 0.42 × height** (landscape ≈454, portrait ≈806), not the canvas midpoint; background / ambient / surface layers are exempt and may stay full-bleed. Holds even when captions are disabled — bottom-edge consistency.\n\n## Where the detail lives\n\n| For… | Read |\n| ------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- |\n| the proven shapes + role→blueprint menu + how to pick | `../../hyperframes-animation/blueprints-index.md` → `blueprints/<id>.md` |\n| motion — shot model, vocabulary, holds, idle budget, motivated holds, seek-safe | `motion-language.md` (local) |\n| layout — framing, density, depth, hierarchy, inventing the visual, caption band | the **Layout** + **Inventing the visual** sections in this file |\n| concrete eases / ms / stagger + rule recipe bodies (Step 5) | local `../../hyperframes-animation/rules/` (the frame worker reads it; you don't) |\n| palette + type tokens | the project's `frame.md`; basics → `hyperframes-creative` `house-style.md` / `typography.md` |\n| \"produced, not generated\" foreground density | `hyperframes-creative/references/video-composition.md` |\n| within-frame cuts / seams (zoom-through · cut-the-curve · waterfall) | `cut-catalog.md` (the worker builds them inside the composition) |\n| transitions | story-design owns `transition_in`; you don't touch it |\n\n## Before you finish — checklist\n\n- **`## Video direction`** written once at the top (palette · motion grammar + shot model + idle budget · hold allocation · negative list incl. both failure modes); per-frame entries are deltas, not restatements.\n- Every frame is a **time-coded shot sequence** with real second windows across its `duration` — not a tag bag.\n- **No frame front-loads** — at t=0 only what the VO is saying enters; each further piece reveals on its spoken cue, across the back ~50%. Window count follows the VO (or the beat, on a silent frame), not a fixed number.\n- Every frame names a **`blueprint:`** id (Reproduce / Adapt) or `compose`; an Adapt states keep/change and **keeps the signature move**; nothing collapses to a single front-loaded dump — reveals stay paced to the VO.\n- **Held frames are deliberate** — allocated in Video direction for rhythm; a held read is fine (it still carries a motivated motion), but no frame may be front-loaded-then-frozen.\n- Each frame names its **invented** `focal` + per-element `roles` (foreground / background / supporting), kept few and load-bearing.\n- The invented hero fills 40–60% of the frame (a diagram big enough to read, a hero word near full-bleed) — not shrunk into decoration around empty space.\n- Layout named **inline** per Scene (template / density / depth / hierarchy — the **Layout** vocabulary here); motion named **inline** per Scene from the vocabulary (`motion-language.md`). No px / ease curves / ms / JS.\n- Content planned into the top ~83% (caption band clear).\n- Palette / type pulled from `frame.md` by role — nothing invented.\n- You wrote no HTML; every visual is invented (no captured assets).\n",
|
|
34
34
|
"faceless-explainer": "---\nname: faceless-explainer\ndescription: \"Turn arbitrary text — an article, notes, a topic, a brief — into a faceless explainer video: there is no site or footage to capture, so the visuals are invented per scene (typography, abstract graphics, diagrams, data-viz). Use for topic explainers, concept breakdowns, how-tos, listicles. Not a video built from a website (/product-launch-video — promo or tour). 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 faceless-explainer`. 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> **media-use**: Before sourcing audio/images/logos, call `/media-use` to resolve BGM/SFX/images from the HeyGen catalog and brand logos from their official sources. Run `--adopt` first to register existing assets. See `/media-use` skill. When the host app provides its own music or sound-effect tools, use those for music and sound effects.\n\n# Faceless Explainer to HyperFrames\n\nUse this skill to turn a body of text into an explainer video: pick a design system, plan a teaching story, and build it frame by frame in HyperFrames. **Faceless** means every visual is invented downstream — there is no capture step and no real asset inventory.\n\n> **The front door is `/hyperframes`.** You are the orchestrator. Run each step, verify its gate, and only then continue. This skill is for **explaining a topic from text, with no product and no website to capture**. Any other intent, a bare \"make a video\", or any uncertainty → read `/hyperframes` first — the intent layer owns every route decision, and a fresh creation arriving here without `BRIEF.md` goes through it anyway (Setup's opening rule).\n\nYou are the orchestrator. Work in `videos/<project>/`. Run steps in order and pass each gate before continuing. User-gated steps are Step 0, Step 3, and Step 6. Read `../hyperframes/references/brief-contract.md` before Step 0 — it defines the gate types and how `BRIEF.md`'s `flow`/`storyboard` derive the mode that governs the Step 3/4/6 gates. Do every step yourself except Step 5, where you dispatch one sub-agent per frame. Do not put design or motion rules here; those live in the frame-worker sub-agent, this skill's local `../hyperframes-animation/rules/` + `../hyperframes-animation/blueprints/`, and `hyperframes-creative`.\n\nWorkflow: Step 0 setup → `hyperframes.json`; Step 1 brief → `capture/extracted/`; Step 2 design system → `frame.md`; Step 3 storyboard/script → `STORYBOARD.md` and `SCRIPT.md`; Step 3.1 audio → `audio_meta.json`; Step 4 visual design → enriched `STORYBOARD.md`; Step 5 frames → `compositions/frames/NN-*.html` and `index.html`; Step 6 final render → `renders/video.mp4`.\n\n---\n\n## Step 0: Setup\n\nGoal: Enter with a confirmed brief, create the HyperFrames project, and make the brief durable.\n\n**The brief is confirmed by the intent layer, not by questions asked here.** Opening rule, in order: **(1)** `BRIEF.md` exists → read it and ask nothing — the brief is settled, and its `flow`/`storyboard` derive the mode (brief contract § 1). **(2)** No `BRIEF.md` but the project exists (`hyperframes.json` / `STORYBOARD.md` on disk) → resume from the storyboard's frontmatter and the recorded preferences; never re-interrogate a half-built project. **(3)** Neither — a fresh creation request that arrived here directly → read `/hyperframes` and run its intent layer (`references/intent-interview.md`): it checks recipes and remembered defaults, conducts this route's questions (`../hyperframes/references/routes/faceless-explainer.md`), and hands back the locked brief. Edit requests skip all of this — go do the edit.\n\nInitialize only if `hyperframes.json` is missing. Name `<project>` from the topic in kebab-case, such as `compound-interest-explained`; never use workspace name or timestamp.\n\n`npx hyperframes init \"videos/<project>\" --non-interactive --example=blank --skill=faceless-explainer` — `init` checks the installed skills against the latest on GitHub and updates the global set if any are out of date.\n\nAfter init, let `<PROJECT_ROOT>` be `videos/<project>` and run every subsequent relative-path command with that directory as its working directory. In the commands below, `.` means `<PROJECT_ROOT>`; never write `.media`, `capture`, or output files in the caller directory.\n\n**Write `BRIEF.md` immediately after init** (never before — `init` refuses a non-empty directory): the intent layer's locked brief, shape per `../hyperframes/references/brief-format.md`. Resolve `<MEDIA_DIR>` as the installed `/media-use` skill directory. Then record each preference-backed answer with `node <MEDIA_DIR>/scripts/prefs.mjs record --hyperframes .` (`brief-format.md` names the subset). If the intent layer adopted a recipe, run `node <MEDIA_DIR>/scripts/recipe.mjs use --hyperframes . --name <name>`; it copies its `frame.md` into the project (Step 2 is then skipped) and returns the skeletons Step 3 drafts from. A recipe fills answers, not approvals; the review gates still run.\n\n**Show sign-in status before proceeding past Setup** — run `npx hyperframes auth status` and relay its output verbatim. It reports whether voice/BGM will use HeyGen or local engines and, when signed out, how to sign in. Apply one branch:\n\n- **Collaborative:** wait for the user to sign in or explicitly choose `offline` / `go`.\n- **Autonomous:** state the status and continue through the available local engines.\n\nDo not silently omit a required capability when no offline provider exists; surface the blocker. Do not fold this decision into another question or write keys into a per-repo `.env`. Auth ownership and offline fallbacks: `/media-use` `references/setup-providers.md` § Providers.\n\n**Gate:** `hyperframes.json` and `BRIEF.md` exist; the preference-backed answers were recorded (brief contract § 2); sign-in status was shown (signed in, or continuing offline).\n\n---\n\n## Step 1: Brief (no capture)\n\nGoal: Fold the user's text into the project as the source of information. There is **no website capture and no real assets** — this is a faceless explainer.\n\nSave the user's full input verbatim, then create the synthetic capture package by hand:\n\n- `capture/extracted/visible-text.txt` — the full article / notes / topic / brief, verbatim. This is the source of **information**, not a story template (Step 3 reshapes it).\n- `capture/extracted/tokens.json` — `{ \"title\": \"\", \"description\": \"\", \"colors\": [], \"fonts\": [] }`. Fill `title`/`description` from the brief. Leave `colors`/`fonts` empty unless the user explicitly gave brand colors or fonts — then add them (the design preset supplies a complete palette regardless).\n\nIf the user pasted a script or wants their wording kept, save it verbatim as `user_script.txt`; `VO_MODE` (verbatim or restructured) comes from `BRIEF.md` — the intent layer asks it when a script arrives. Ask once here only if the brief somehow lacks it, and store the answer for Step 3.\n\nDo **not** run `npx hyperframes capture` (there is no URL). Do not create `asset-descriptions.md` or populate `capture/assets/` — faceless visuals are invented in Steps 4-5, not captured. The one exception: if the user supplied a real image, place it under `public/<basename>` and note it for Step 3.\n\n**Gate:** `capture/extracted/visible-text.txt` and `capture/extracted/tokens.json` exist; you can state the explainer's topic and audience in one clear sentence.\n\n---\n\n## Step 2: Design System\n\nGoal: Choose one shipped frame preset; a script turns it into this video's `frame.md` + caption skin.\n\nWhen `BRIEF.md` names a `style_preset` — the user picked it by eye from the showcases at the intent layer — use it; the judgment call is yours only when the brief is silent. Then you make the one call — **which preset**: read `../hyperframes-creative/references/design-spec.md` and browse `../hyperframes-creative/frame-presets/`; pick the preset whose look best fits the topic, tone, and audience. Then run:\n\n```bash\nnode <SKILL_DIR>/scripts/build-frame.mjs --preset <name> --hyperframes .\n```\n\nThe script does the rest deterministically: copies the preset's `FRAME.md` → `frame.md` and **remixes** it onto any brand tokens in `capture/extracted/tokens.json` (brand colors mapped onto the preset's color keys by role; the preset's display + body fonts swapped for the brand's), copies the preset's caption skin to `.hyperframes/caption-skin.html`, and self-validates (exits 1 on a broken mapping). Proceed as soon as it exits 0 — no hand-editing of the spec.\n\nA faceless explainer usually has **no brand colors/fonts** (`tokens.json` colors/fonts empty) → the script keeps the preset's own palette, a complete shippable design. Only when the user named brand colors/fonts add them to `tokens.json` before running, and only adjust `frame.md` by hand afterward if a mapping truly needs it.\n\n**Gate:** `build-frame.mjs` exited 0 — `frame.md` exists from a named preset, and (when the preset ships one) `.hyperframes/caption-skin.html` exists as the caption skin source; the chosen preset was recorded as a preference (`--key style_preset --workflow <this workflow>`, brief contract § 2).\n\n---\n\n## Step 3: Storyboard and Script\n\nGoal: Turn the text into an approved frame-by-frame teaching plan.\n\nRead `../hyperframes-creative/references/story-spine.md` (hook language, value-before-evidence, storyboard-as-proposal, source-traceable visuals), `references/story-design.md`, `../hyperframes-animation/blueprints-index.md`, `../hyperframes/references/storyboard-format.md`, and `../hyperframes/references/script-format.md`. Use them to write `STORYBOARD.md` and, when narration is needed, `SCRIPT.md`. Set the frontmatter `duration:` from the brief's `length` — a rough expectation; assembly reports where the cut lands against it.\n\nUse `story-design.md` for the explainer structure (concept / how-to / listicle / story), hook strategy, clarity techniques, emotional beats, the type-enum mapping, and `VO_MODE`. The video's sequence comes from **narrative design, not the input text's paragraph order** — reorder, merge, omit, compress. As a **soft guide**, consult the role→blueprint menu in `../hyperframes-animation/blueprints-index.md`: for each beat, write the voiceover in the shape its candidate blueprint implies and tag that candidate `blueprint:` id when one fits. Teaching truth still decides which beats exist — never force a beat to fit a blueprint, and never invent a beat just because a proven shape is available. Faceless visuals are invented downstream, so frames do **not** carry an asset inventory: leave `asset_candidates` empty unless the user supplied a real `public/<basename>` image. Use the exact required fields from the storyboard and script references.\n\nAfter drafting, run the review loop's plan pass — `../hyperframes/references/review-loop.md` § 1: present the plan as a proposal, and ask the two questions — approve or change, and **sketches first** (recommended) or skip. Feedback arrives as a chat reply; loop until approved. This is a **checkpoint gate** (brief contract § 1): in autonomous mode there is nothing to ask — post the same summary as a heads-up and proceed; sketches collapse into the build, and the final preview with its one question comes at Step 6.\n\n**Gate:** `STORYBOARD.md` exists, every frame has the required narrative fields, `SCRIPT.md` exists when narration is needed, and the user approved the frame-by-frame plan (autonomous: the summary was posted as a heads-up).\n\n---\n\n## Step 3.1: Audio\n\nGoal: Generate narration, word timings, music, and audio metadata from the approved script.\n\nStart audio after Step 3 approval. Run it in the background, then continue to Step 4. (Sign-in status was already shown in Step 0; the engine falls back automatically.)\n\n**Choose the narration voice from the user's ask before invoking.** If the request named a voice, gender, or tone, pick a matching voice id and pass it with `--voice <id>`. The pipeline default is otherwise **Marcia (female)** on HeyGen / `am_michael` on Kokoro — so a request like \"a male voice\" is silently ignored unless you pass the flag. Voice ids are provider-specific; resolve against whichever provider Step 0's sign-in status selected: **HeyGen** (signed in) via `node <MEDIA_DIR>/audio/scripts/heygen-tts.mjs --list` (or `GET /v3/voices?engine=starfish`); **Kokoro** (offline) via the voice table in `<MEDIA_DIR>/audio/references/tts.md` (prefixes `am_`/`bm_` male, `af_`/`bf_` female). When the user expressed no preference, fall back to the remembered voice (brief contract § 2) before the pipeline default, and say which one you used; omit `--voice` only when neither names one. When the user explicitly picked a voice this run, record it (`prefs.mjs record --key voice`).\n\n`node <SKILL_DIR>/scripts/audio.mjs --script ./SCRIPT.md --storyboard ./STORYBOARD.md --hyperframes . --out ./audio_meta.json --voice <voice-id> &`\n\nThe audio script handles narration, word timings, BGM lookup from HeyGen's music library, and timing metadata. BGM mood comes from the storyboard's `music:` field. This uses the HeyGen Audio API for retrieval, not generation, and the same `~/.heygen` credential as TTS. For provider details, read `../media-use/audio/references/tts.md`. When the host app's own tools make the music or a sound effect, put the file under assets/ and list it in the audio_meta.json file marked `\"source\": \"host\"`: music as `bgm` `{ \"path\": \"assets/…\", \"source\": \"host\" }` with `music: none` in the storyboard; a sound as an `sfx` entry `{ \"frame\": <n>, \"file\": \"assets/…\", \"offset_s\": 0, \"duration_s\": <its length>, \"source\": \"host\" }`. Every audio pass keeps these, and a frame with a host sound gets no looked-up cue.\n\nIf there is no narration and no `SCRIPT.md`, skip voice generation. BGM may still run if the storyboard has a music mood.\n\n**The canonical fully-silent marker** (shared across the workflows that reuse this audio model): `music: none` in the STORYBOARD.md top YAML block, no `SCRIPT.md`, **and** no `sfx:` cues or host audio. That combination marks the project silent — no narration, no BGM, no SFX. `audio.mjs` recognizes it and generates nothing (it removes any stale `audio_meta.json`; an absent `audio_meta.json` is what assemble treats as silent), so this step is a clean skip. Without narration but with `sfx:` cues or host audio the film is not silent: `audio.mjs` writes the audio_meta.json file for `fetch-sfx` to fill. `music: none` with narration keeps TTS and turns only BGM off. Use exactly this spelling — don't improvise other markers.\n\n**Gate:** audio job has started, or the project is marked silent (`music: none`, no `SCRIPT.md`, no `sfx:` cues or host audio).\n\n---\n\n## Step 4: Frame Visual Design\n\nGoal: Add the visual direction, layout intent, and motion choices to each storyboard frame.\n\n**Sketch the storyboard sheet first (collaborative only).** The moment the plan is approved, run the sketch pass — `../hyperframes/references/review-loop.md` § 2 (don't wait on Step 3.1; sketches don't use timings): wireframe every frame yourself as a cell of `storyboard.html` (`../hyperframes-creative/references/storyboard-recipe.md` § 3), mark each `built`, pause for the one layout question when every frame is `built`, and revise only the sketches named until the sheet is confirmed. Only then write the visual design below onto the confirmed layouts. In autonomous mode, or when the user chose to skip sketches at Step 3, skip this pass — frames go straight from `outline` to `animated` at Step 5.\n\nEdit `STORYBOARD.md` in place. Do not create another storyboard. Use `frame.md` as source of truth for color, type, layout feel, and style.\n\nRead `references/visual-design.md`, `../hyperframes-animation/blueprints-index.md`, `references/motion-language.md`, and `../hyperframes-animation/rules-index.md`. Use `visual-design.md` for the method (the time-coded shot sequence, the inline Layout vocabulary, and the invented-visual treatment), plus the required `## Video direction` block. Use `../hyperframes-animation/blueprints-index.md` to pick each frame's shot shape. Use `motion-language.md` (the motion vocabulary + the motion doctrine) and `../hyperframes-animation/rules-index.md` (valid rule names) for motion — do not invent motion names.\n\n**Search the live catalog before you invent any named look.** A faceless explainer invents every visual, which is exactly when a hand-authored rebuild of an existing block is most likely. For every look, effect, treatment or transition the brief names — \"CRT scanlines\", \"glitch\", \"film grain\", \"shimmer sweep\", \"confetti burst\" — run `npx hyperframes catalog --query \"<the look, in plain English>\" --json` and read the top results BEFORE you write that look into `STORYBOARD.md`. The search needs **nothing installed**: no project, no prior `add`, no account. It ranks the whole hosted registry (~400 blocks and components) from any directory. A block that already does the job becomes the frame's `focal` — name it here; Step 5 pre-installs it once before dispatch and its worker customizes it. Invent a visual only after a search for it came back with nothing that fits.\n\nFor every frame, write a **time-coded shot sequence** into `STORYBOARD.md` per `visual-design.md`'s method: pick the frame's blueprint (or compose), instantiate it with THIS frame's **invented** content, and pace each Scene's reveal to the voiceover so the frame develops across its full duration instead of front-loading then freezing. Because the explainer is faceless, `focal`/`roles` name the **invented visual elements** (a hero word, a diagram node, a data-viz series) — you are designing them, not selecting captured assets. State layout and motion **inline** per Scene (vocabularies in `visual-design.md` and `motion-language.md`). Add one video-wide `## Video direction` block.\n\nDo not change story, script, `transition_in`, or the source text. Do not write HTML in this step. There is **no asset-staging step** — faceless visuals are built by the workers in Step 5. If the user supplied a real `public/<basename>` image, reference it by path in the relevant frame's `focal`/`roles`; otherwise nothing to stage.\n\n**Gate:** every frame has a time-coded shot sequence whose reveals are paced to the voiceover (no front-loading); each frame names its invented `focal` and/or `roles`; `## Video direction` exists. Collaborative: the sketch sheet was confirmed.\n\n---\n\n## Step 5: Build Frames\n\nGoal: Build every storyboard frame as an HTML composition and assemble the playable video.\n\nWait for Step 3.1 audio to finish if audio was started. Then sync durations and fetch SFX; skip both if silent.\n\n`node <SKILL_DIR>/scripts/audio.mjs sync-durations --audio-meta ./audio_meta.json --storyboard ./STORYBOARD.md`\n\n`node <SKILL_DIR>/scripts/audio.mjs fetch-sfx --storyboard ./STORYBOARD.md --hyperframes .`\n\nDuration sync is mechanical: real voice duration wins; silent frames keep estimates; never hand-edit synced durations.\n\n**Pre-install the registry blocks** named across `STORYBOARD.md` once, before dispatch, so parallel workers don't race on the registry:\n\n`for b in <each registry block named in the storyboard>; do npx hyperframes add \"$b\"; done`\n\nBefore dispatch, read `../hyperframes/references/subagent-dispatch.md`. Build the per-frame packets and the worker role payload:\n\n`node <SKILL_DIR>/scripts/frame-packets.mjs --project \"$PROJECT_DIR\" --storyboard \"$PROJECT_DIR/STORYBOARD.md\"`\n\nThe builder writes one bounded packet per frame under `.hyperframes/frame-packets/` (the frame's exact storyboard block + the blueprint body + every cited rule recipe, inlined) and `_role.md` (`../hyperframes/references/frame-worker-core.md` + this skill's `sub-agents/frame-worker.md`, concatenated verbatim — the complete worker role). Dispatch one sub-agent per frame, in parallel if possible; otherwise run workers in waves. Each worker gets exactly one frame: its prompt carries `_role.md` and that frame's packet — paste both in full, or hand the two file paths for the worker to read first (equivalent; the worker starts from exactly those two documents either way) — plus a dispatch context with `PROJECT_DIR`, `frame_id`, whether the frame has a **confirmed sketch** on disk (the worker dresses that layout rather than redrawing it — frame-worker core § When a confirmed sketch exists), canvas size, and caption status + keep-out band if captions are enabled.\n\nWorkers read only their packet and `frame.md`; they never open `STORYBOARD.md` or the skill documents (the packet inlines what was selected upstream). Each worker writes only `compositions/frames/NN-*.html`. Workers must never edit `STORYBOARD.md`.\n\n**Full-bleed backgrounds ride on a `class=\"clip\"` layer, never the `#root`.** A frame's ground (color field / gradient / grid) is its own full-duration background clip — a `background` set on the `#root` / `data-composition-id` element is clip-gated to the frame's window and is not a dependable ground, so dark content can land on the black host `body` and render invisible. The video's base ground is painted by the assembler from `frame.md`'s `canvas` color onto the index `#root`. (Full rule + self-check: `../hyperframes/references/frame-worker-core.md`.)\n\nAs each worker returns, the orchestrator marks that frame as `animated` in `STORYBOARD.md`.\n\nAfter audio timings exist, build captions in the background and assemble the index:\n\n`node <SKILL_DIR>/scripts/captions.mjs build --storyboard ./STORYBOARD.md --audio-meta ./audio_meta.json --hyperframes . --out ./caption_groups.json &`\n\n`node <SKILL_DIR>/scripts/assemble-index.mjs --storyboard ./STORYBOARD.md --hyperframes .`\n\n`captions.mjs` uses the project's `.hyperframes/caption-skin.html` (copied in Step 2) as the caption look, injecting brand tokens from `frame.md`; with no skin present it renders the built-in default pill. `captions: skipped (<reason>)` is valid. Continue without captions when explicitly skipped.\n\n**Gate:** every frame is marked `animated` (collaborative: the sketch sheet was confirmed at Step 4), `index.html` exists, and captions are built or explicitly skipped.\n\n---\n\n## Step 6: Finalize\n\nGoal: Verify the assembled video, get user approval, and render the final MP4.\n\nInject transitions, run checks, pause for review, then render.\n\n`node <SKILL_DIR>/scripts/transitions.mjs inject --storyboard ./STORYBOARD.md --hyperframes .`\n\n`node <SKILL_DIR>/scripts/transitions.mjs verify --storyboard ./STORYBOARD.md --index ./index.html`\n\n`npx hyperframes lint`\n\n`npx hyperframes check`\n\n`npx hyperframes snapshot --at <frame-midpoints>`\n\n`snapshot` stitches the captured frames into one contact sheet (`snapshots/contact-sheet.jpg`). Glance at it; if nothing is obviously broken, move on — don't linger here.\n\nIf a command fails, surface stderr and stop — don't pile on recovery commands. Fix it yourself: the cheapest safe edit to `compositions/frames/NN-*.html`, then rerun the failed check.\n\n**Known false-positive — do not chase it.** `check` may report a handful of `text_box_overflow` findings of ~1–4px on the **caption** highlight words (selector `#caption-word-*` / `.caption-line`). The caption pill uses a deliberately snug `line-height` (set once in `scripts/captions.mjs`) and has **no `overflow:hidden`**, so a heavy display glyph's ink spills a few px into the pill's own padding — nothing is actually clipped. Treat these as expected and proceed. Do **not** inflate the caption `line-height` (it balloons the pill, which is worse). Only act on a `text_box_overflow` when it names a **frame** element (`#el-NN-*`), not a caption word.\n\nAfter checks pass, pause for user review — the review loop's final look (`../hyperframes/references/review-loop.md` § 4): one question, on the final Studio preview — render now, or what changes? (Autonomous: the same, as the one kept question — open the preview even though the user didn't ask for one.) Then deliver the MP4 with the contact sheet and the frame ids so revisions can target a single frame.\n\nPreview: `npx hyperframes preview --background`\n\nRender only after user approval (autonomous mode: after the render-or-changes question):\n\n`npx hyperframes render --skill=faceless-explainer --quality high --output renders/video.mp4`\n\nDo not rerun `lint`, `check`, or `snapshot` after rendering unless the user asks.\n\n**Gate:** `lint` and `check` passed and the snapshots were inspected before render; user approved at the review pause (autonomous: checks passed and the delivery includes the contact sheet); `renders/video.mp4` exists. Final reply states MP4 path and final duration.\n\n---\n\n## Quick Reference\n\n**Formats:** landscape `1920x1080`; portrait `1080x1920`; square `1080x1080` — derived from the destination (brief contract § 2). Set the format once in the storyboard frontmatter.\n\n**Faceless deltas vs a captured-asset workflow:** no Step 1 capture (synthetic `tokens.json` + `visible-text.txt`); no `asset-descriptions.md` and no `capture/assets/`; no asset-staging in Step 4; `asset_candidates` empty by default; every visual is invented by the Step 5 workers (typography / abstract graphics / diagrams / data-viz). A user-supplied `public/<basename>` image is the only real asset path.\n\n**Background scripts:** the workflow ships only these under `scripts/`: `build-frame` for adopting + brand-remixing a frame preset into `frame.md` (+ caption skin); `audio` for TTS, transcription, BGM, SFX, and duration syncing; `captions`; `transitions` for inject and verify; and `assemble-index`. Everything else is the `hyperframes` CLI.\n\nThe reusable, domain-agnostic shot shapes live in `../hyperframes-animation/blueprints/` (indexed by `../hyperframes-animation/blueprints-index.md`).\n\n| Read | When |\n| ----------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- |\n| `[../hyperframes/references/brief-contract.md](../hyperframes/references/brief-contract.md)` | Gate types, mode derivation from `BRIEF.md`, field semantics. |\n| `[../hyperframes-creative/references/story-spine.md](../hyperframes-creative/references/story-spine.md)` | Step 3: story doctrine — hook language, value-before-evidence, proposal shape, source-traceable visuals. |\n| `[../hyperframes-creative/frame-presets/](../hyperframes-creative/frame-presets/)` | Step 2: choose and adopt a frame preset. |\n| `[../hyperframes-creative/references/design-spec.md](../hyperframes-creative/references/design-spec.md)` | Step 2: apply brand tokens correctly. |\n| `[references/story-design.md](references/story-design.md)` | Step 3: plan the explainer story. |\n| `[../hyperframes-animation/blueprints-index.md](../hyperframes-animation/blueprints-index.md)` | Step 3: role→blueprint menu. Step 4: pick the shot shape. |\n| `[../hyperframes/references/storyboard-format.md](../hyperframes/references/storyboard-format.md)` | Step 3: write `STORYBOARD.md`. |\n| `[../hyperframes/references/script-format.md](../hyperframes/references/script-format.md)` | Step 3: write `SCRIPT.md`. |\n| `[../media-use/audio/references/tts.md](../media-use/audio/references/tts.md)` | Step 3.1: choose or understand TTS providers and voices. |\n| `[references/visual-design.md](references/visual-design.md)` | Step 4: write the frame's shot sequence (+ Layout vocabulary). |\n| `[references/motion-language.md](references/motion-language.md)` | Step 4: the motion vocabulary + the motion doctrine. |\n| `[references/cut-catalog.md](references/cut-catalog.md)` | Step 4-5: the cut catalog (worker builds within-frame seams). |\n| `[../hyperframes-animation/rules-index.md](../hyperframes-animation/rules-index.md)` + `[../hyperframes-animation/rules/](../hyperframes-animation/rules/)` | Step 5: local rule recipe bodies for the cited motions. |\n| `[../hyperframes/references/frame-worker-core.md](../hyperframes/references/frame-worker-core.md)` | Step 5: the shared worker contract (packet builder prepends it to the delta). |\n| `[sub-agents/frame-worker.md](sub-agents/frame-worker.md)` | Step 5: the workflow's frame-worker delta. |\n| `[../hyperframes/references/subagent-dispatch.md](../hyperframes/references/subagent-dispatch.md)` | Step 5: dispatch sub-agents safely. |\n",
|
|
35
35
|
"faceless-explainer/sub-agents/frame-worker.md": "# Frame worker — faceless-explainer delta\n\n> The shared law is the core contract above (the packet builder prepends `../../hyperframes/references/frame-worker-core.md` to this file as `_role.md`) — read the two as one role. This file carries only what's specific to a faceless-explainer frame; you run N-up, **one frame each** — your dispatch carries exactly one packet. Tempted to add a generic GSAP / timeline rule here? Wrong home — it belongs in the core contract or `hyperframes-core`.\n\n## Your `focal:` / `roles:` — invented elements\n\n- `focal:` — which **invented** element is the hero.\n- `roles:` — each invented element's role: `foreground subject` / `background` full-bleed / `supporting`. Because the explainer is **faceless, these are elements you design** (a hero word, a diagram node, a chart series, a coined-term card), not captured assets. The **only** real media is a user-supplied image, when present: `public/<basename> — description` (a **`[video]`** tag marks a `.mp4` clip the user provided).\n\n## Designing each element (faceless-explainer constraint)\n\n**Design each element by its `roles`** (the `focal` is the hero): a `foreground subject` is the thing the eye lands on — respect the 83% keep-out, lay text around it, not over it; a `background` is full-bleed and dimmed ~30–50% so foreground content stays legible; `supporting` elements (labels, secondary shapes, ambient layers) stay quiet. These are **invented** — you build them in SVG / CSS / type from `frame.md`'s atoms, never from a fetched file (build the idea the narrative describes; never fall back to generic decorative bokeh or stock filler). **If the user supplied a real image** named in `roles:`/`focal:`, place it: a `[video]` candidate (`.mp4`) renders as a **muted** `<video class=\"clip\">` (`data-start` / `data-duration` / `data-track-index` per the core clip contract), a **direct child of the frame root** — never nested in another timed element, or the renderer freezes it; an untagged image → `<img>`.\n",
|
|
36
36
|
"figma": "---\nname: figma\ndescription: Import Figma content into a HyperFrames composition — rendered assets, brand tokens, components, storyboard sections → reconstructed motion (frames read as states, not slides) (REST/CLI), connector-assisted motion when available, and shaders from a connector or native export. Use when the user pastes a figma.com link or asks to bring a Figma design, frame, logo, brand, or animation into a video/composition.\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 figma`. 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# Figma → HyperFrames\n\nBring the user's Figma work into a composition. **Split by capability** (design spec §2):\n\n| Phase | What | Transport | Surface |\n| ----- | ------------------- | ------------------------- | ----------------------------- |\n| 1 | Static assets | REST | `hyperframes figma asset` |\n| 2 | Brand tokens/styles | REST | `hyperframes figma tokens` |\n| 3 | Components → HTML | REST | `hyperframes figma component` |\n| 4 | Motion → GSAP | connector when available | use its motion context |\n| 5 | Shaders | connector / manual export | use it or a native export |\n\nREST is used wherever it can be (usable at volume, headless). A compatible Figma connector is optional for motion and shader data; without one, ask for a native export. Every path freezes assets locally so renders stay deterministic. Storyboard reconstructions compose Phase-1 asset exports (REST) with agent-driven timeline assembly — no connector needed. Existing frozen assets, manifest records, and bindings are unaffected by routing changes — the split only changes which credential the next import uses.\n\n## Auth — two credentials, scoped\n\n**Preflight — before the first CLI call, check a token exists**: shell env (`[ -n \"$FIGMA_TOKEN\" ]`) **or** the project `.env` (the CLI auto-loads it — a `.env` entry counts as configured). If neither, do NOT run the command to harvest the error — walk the user through the one-time setup first, then stop and wait:\n\n1. figma.com/settings → **Security** → **Personal access tokens** → Generate new token.\n2. Scopes — read-only is all this integration ever needs (it never writes to Figma): **File content: Read-only** + **File metadata: Read-only**. Add **Library content: Read-only** if you'll run `tokens` on a non-Enterprise plan — the published-styles fallback hits `/v1/files/:key/styles`, which 403s without it (a scope the older setup text omitted). Optionally **Variables: Read-only** for brand variables — Enterprise-only; without it `tokens` degrades to published styles automatically (expected, not an error — say so). A 403 now names the exact missing scope; 429s retry automatically (per-minute limit, honors `Retry-After`).\n3. Have the user set `FIGMA_TOKEN` in their shell profile or project `.env`; never ask them to paste the token into the conversation.\n\nWhile onboarding, also set expectations in one breath: every import lands as a **local frozen file with recorded provenance** — renders never call Figma, re-running a command re-imports only what changed in Figma, and one token works for assets, brand tokens, and components across every file their Figma account can view.\n\n- **Phases 4–5 (motion/shaders):** a compatible Figma connector, with separate authorization from the token. If it is unavailable or unauthenticated, ask the user to connect it or provide a native export, then stop.\n- Say exactly which credential a failing phase needs — never present the split as broken.\n- `BAD_TOKEN` (401) mid-flow → the token is expired/revoked; re-mint. `FORBIDDEN` (403) → the message names the exact missing scope (e.g. `library_content:read` for the styles fallback) — add it, or the file isn't visible to the account. `REQUIRES_ENTERPRISE` (403 on variables) → not a failure: styles fallback already ran. `RATE_LIMITED` (429) → the client already retried with backoff (this applies to EVERY read — assets, tokens, styles, node trees, versions — the retry lives in the shared request path; `Retry-After` is honored, capped at 60s); if it still surfaces, wait a minute or import fewer nodes per call.\n\n**Rate-limit awareness (spec §2.1):** connector quotas vary by Figma plan — batch parent-frame requests, skip verification screenshots unless asked, and cache raw responses so re-derivation never spends a second call. REST is per-minute (10+/min, per-endpoint buckets) — fine at volume, back off on 429.\n\n## Routing\n\nParse the user's figma link with `parseFigmaRef` (URL, `fileKey:nodeId`, bare `fileKey`). Then by intent:\n\n- \"use this layer / logo / image\" → **Asset** (CLI)\n- \"pull my brand / colors / tokens\" → **Tokens** (CLI)\n- \"build a scene from this frame\" → **Component** (CLI)\n- \"import this animation / motion\" → **Motion** (connector when available, below)\n- a storyboard section / filmstrip of scene frames → **Storyboard** (below)\n- shader fill/effect → **Shaders** (below)\n\n**Narrate every step for the user** — before each command say what you're about to pull from Figma; after it, say where the artifact landed (the frozen path / sidecar / component dir), what changed in the composition, and the immediate next action (preview, add printed variables, re-import to link bindings). The user should never have to ask \"did it work?\" or \"now what?\".\n\n## Assets (Phase 1 — CLI)\n\n```bash\nhyperframes figma asset '<url-or-fileKey:nodeId>' [more refs…] [--format svg|png|jpg|pdf] [--scale 2] [--description \"...\"] [--entity \"...\"]\n```\n\nRenders over REST, sanitizes SVG, freezes under `.media/images/`, appends the manifest with provenance, regenerates `.media/index.md` (the shared media-use inventory), prints an `<img>` snippet. Idempotent per `fileKey:nodeId:format:scale:version`. Prefer SVG for vectors/logos (scalable, animatable), PNG `--scale 2` for raster fidelity. **Always pass `--description \"<what it is>\"`** (it becomes the index row + `<img alt>`); add `--entity \"<name>\"` for named brand marks so media-use `resolve --entity` finds them later (entity hits match across image/icon).\n\n**Batch many nodes in ONE request** — pass several refs (space-separated or comma-joined) of the SAME file: `hyperframes figma asset 'KEY:1-2' 'KEY:3-4' 'KEY:5-6'`. All render in a single `/v1/images` call, which is figma's own answer to the per-minute rate limit — prefer it over N separate commands when pulling a whole frame's worth of assets. `--description`/`--entity` apply to every node in the batch, so batch nodes that share a purpose. 429s also auto-retry with backoff regardless.\n\n## Tokens (Phase 2 — CLI)\n\n```bash\nhyperframes figma tokens <fileKey>\n```\n\nImports variables as composition brand-variable entries + `figma-tokens.json` sidecar + binding-index records (`.media/figma-bindings.jsonl`). Variables are Enterprise-gated upstream: on other plans the command degrades to published-style metadata (values resolve at component-import time). Add the printed entries to the composition's `data-composition-variables`.\n\n**Import tokens before components** when both are wanted — that's what lets component colors link to brand variables instead of baking duplicates.\n\n**Non-Enterprise variables path (field-tested):** REST variables are Enterprise-gated, but a compatible connector may provide variable definitions. When `tokens` reports `REQUIRES_ENTERPRISE` and the connector is available, retrieve the parent scene's variables once, cache the raw response to `.media/figma-cache/`, and use it to build the binding index. The REST node tree's `boundVariables` supplies per-property `VariableID`s; join them by node and property, then write `.media/figma-bindings.jsonl` rows (`{kind:\"binding\", figmaId, sourceFileKey, compositionVariableId: \"figma:<name>\", version}`) plus the composition-variable entries. Everything downstream (component `var()` resolution, refresh, runtime CSS variables) is the shipped machinery. Label it for the user: \"tokens via the Figma connector — Enterprise plans get this from `hyperframes figma tokens` directly.\"\n\nThe runtime defines every declared composition variable as a CSS custom property (document root + sub-comp hosts), so imported `var(--slug, literal)` fills recolor when the variable default changes — updating one value in `data-composition-variables` re-brands every imported component without re-importing anything. `hyperframes render --variables '<json>'` overrides them at render time.\n\n## Components (Phase 3 — CLI)\n\n```bash\nhyperframes figma component '<url-or-fileKey:nodeId>'\n```\n\nNode tree → editable HTML at exact figma geometry, packaged as a registry item under `compositions/components/<name>/`. Vectors/boolean-ops auto-rasterize via Phase-1 export. Binding pass (spec §7.1, exact-ID only — never value matching):\n\n- **Static fidelity self-check (mandatory for hero content)**: after importing, render the fragment and compare against figma's own pixels — `figma asset <same node> --format png` is the ground truth. Text is the known drift axis: a figma text box shorter than its line-height is vertically-trimmed bounds (the mapper emits `text-box-trim` for these; measured drift without it was ~6px on a 70px font). If the comparison shows drift the mapper doesn't cover, report it — don't hand-tweak the fragment silently.\n- Fill bound to an **imported** token → `var(--slug, #literal)` — brand refresh propagates.\n- Bound to an **unknown** token → literal + `data-figma-unresolved` flag. The command tells you; offer the user: run `tokens` on the source (or library) file, then re-import the component to link them. Ask **once** per unknown library which file it is — never guess, never match by hex.\n\n## Motion (Phase 4 — connector-assisted)\n\n**Usage beacon:** Connector-assisted phases have no CLI touchpoint, so fire the skill beacon at start and finish (anonymous, consent-gated, never fails): `npx hyperframes events --skill=figma-motion` when you begin, `npx hyperframes events --skill=figma-motion --event=skill_completed --outcome=success|error` when done. Same for shaders (`figma-shaders`) and storyboards (`figma-storyboard`).\n\nNo REST equivalent exists. When a compatible connector is available, use it and hand its output to the pure helpers in `@hyperframes/core/figma`; otherwise ask for a native export:\n\n1. Retrieve motion context for the parent frame in one recursive request, not one request per element. Save the raw JSON next to the project (`.media/figma-cache/`) so retranslation is free.\n2. Normalize into `MotionDoc`s with `motionContextToDocs(rawResponse, { selectorFor, repeat })` from `@hyperframes/core/figma` — **never transcribe keyframe numbers by hand**. The helper encodes the field-tested decoding rules mechanically: it parses the motion.dev snippets (the reliable encoding — the CSS snippets stretch durations and can disagree; they are ignored), strips loop-wrap tail keyframes (sub-millisecond segments at times ≈0.9999→1 are the loop's instant reset, not authored motion — the wrap is realized by `repeat` restart), and preserves bezier eases verbatim. `selectorFor` must return the ids from the Phase-3 component import — don't derive selectors from node names.\n 2b. **Validate against ground truth before calling it done — mandatory**: export the cohort's root frame through the available connector and run `node <SKILL_DIR>/scripts/verify-motion.mjs --reference <export.mp4> --render <render.mp4> --crop WxH+X+Y` — it compares motion-energy deltas (static import fidelity cancels out) and fails below 15dB min motion-PSNR (calibrated: faithful ≈ 20+, diverging ≈ 5). Measure `--crop` from the render's actual card edges, don't guess. FAIL means re-check the translation, not the threshold.\n3. `motionToGsap(doc)` → `emitTimelineScript(spec)` → inject as a `<script>` after the GSAP + CustomEase CDN tags. Paused, finite, registered on `window.__timelines` with a literal key.\n4. Untranslatable track (shader-driven, unsupported prop, complex masks) → export through the connector, freeze the MP4, then embed it as `<video class=\"clip\">`. Exception: shader-driven tracks — Figma's export path flattens shaders to the base color (see Shaders below), so a bake there silently loses the shader; ask the user for a native Figma export instead. Always say which path you used and why. Named eases outside the mapped set fall back to linear — the mapping table lives in `motionEase.ts`; flag the fallback to the user when it fires.\n5. Run `npx hyperframes check` before calling it done.\n\n## Shaders (Phase 5 — mostly manual)\n\nFigma's connector render path does not execute shaders (they flatten to the base color), and shader source is only reachable for **library-published** styles (paid Full seat). Default path: ask the user to export the shader frame natively in Figma (PNG or Motion MP4), then import it as a Phase-1 asset / clip. Don't attempt connector pixel capture of a shader — it will silently produce the wrong thing.\n\n## Storyboards (a SECTION of scene frames → animation)\n\n**The cardinal rule: storyboard frames are KEYFRAMES, not slides.** Two frames containing the same element describe that element's state through time — animate the ELEMENT between the states; never play the frames as a sequence of stills. A logo drawn in four consecutive frames at descending y is ONE element rising through four keyframes. Playing storyboard frames back-to-back is the failure mode; reconstructing the element timelines they imply is the job.\n\nStoryboard files follow a grammar you can parse mechanically — don't eyeball, decode:\n\n1. **Scene units**: inside the SECTION, every frame-sized node is a scene — both named FRAMEs _and_ loose full-frame RECTANGLEs (designers paste stills straight into the section). Filter by size (≈ composition aspect, e.g. >1400×900), not by node type or name.\n2. **Order = x-position** (row-major if the strip wraps). Sort scenes by `absoluteBoundingBox.x`.\n3. **Diff adjacent frames into element chains** — this is where the animation lives. Match children across consecutive frames: first by **name** (same name = same element → tween its relative x/y/w/h between states), then by **geometry similarity** (similar size + nearby center = same logical element whose pixels changed → crossfade the two exports in place while tweening geometry; covers typed-text progressions and morph states). Unmatched children enter/exit at their scene's beat. Frame background fills tween as a color track. Export ONE asset per chain (one per state only when pixels genuinely differ) — never one still per frame.\n4. **Stills are the fallback, not the default** — only for frames that don't decompose (flat full-frame screenshots with no shared elements); those get the animatic treatment below.\n5. **Director notes**: TEXT nodes below the strip are motion intent, paired to the scene whose x-range they overlap. They describe _how_ to animate — they are not on-screen copy.\n6. **Batch exports** (elements or stills): `GET /v1/images` accepts comma-separated ids, but big scene frames hit \"Render timeout\" past ~12 ids — chunk to ~4 per call with a retry. (One call per scene wastes the rate budget; 26 scenes ≈ 52 calls via the single-asset path.)\n7. **Note verbs → transitions** (starter vocabulary, extend as encountered):\n\n| Note says | Do |\n| ------------------------------- | ----------------------------------------------------------------- |\n| EXPLOSION / BURST | incoming scale ~1.5→1 + fade, `power3.out` |\n| SLIDES / SLIDE TO THE… / SCROLL | directional slide in from that edge |\n| MORPH / REVEALS | crossfade — or Phase-3 import if the motion is inside one scene |\n| CYCLE THROUGH / EACH ONE | longer hold — or Phase-3 import if items animate within the scene |\n| (no note) | crossfade + slow Ken-Burns drift |\n\n8. **Stills vs. components routing**: a note describing motion _between_ scenes → transition on the still (above). A note describing motion _inside_ a scene (\"TEXT LINES REVEAL ONE AFTER THE OTHER\", \"PILLS ANIMATE IN\") → that frame deserves a Phase-3 component import (real elements) animated per the note, not a flat PNG. Do the animatic pass first with stills, then upgrade the scenes the notes single out.\n9. One `main` timeline sequences everything (opacity/x/y per scene at absolute times) — no per-scene sub-compositions needed for an animatic.\n10. **Escalation — frames depict ONE product UI → rebuild the app, not element chains.** When every frame is the same application screen in successive states (a signup flow, a settings panel, a player), element chains undersell it. Rebuild the UI as live DOM — Phase-3 component import for the parts that change state, real exported pixels for static chrome (**code what changes state, freeze what doesn't**) — and treat each frame delta as an **interaction to perform**, not a tween to apply: the cursor enters, clicks the control, the state responds, screens push/slide as real navigation. The result reads as one continuous screen recording of a working app. This is the cardinal rule taken to its conclusion for UI flows; the stills/element-chain treatments are for storyboards that aren't one coherent application.\n\n## Determinism\n\nNever leave a Figma URL in the composition — freeze first. Never emit `repeat: -1` without a finite root `data-duration`. Timelines paused, finite, literal `window.__timelines` keys. All Figma I/O at import time; render sees local files only.\n",
|
|
@@ -39,7 +39,7 @@ export const HYPERFRAMES_FILES = {
|
|
|
39
39
|
"hyperframes/references/brief-contract.md": "# Brief contract\n\nThe intent layer (`/hyperframes` → `references/intent-interview.md`) asks creation questions once. The executing workflow writes the confirmed result to `BRIEF.md` and does not ask those questions again. This contract defines the canonical run-shape fields, shared brief fields, and question rules. Route-specific options live in `/hyperframes` → `references/routes/<workflow>.md`.\n\n## Contents\n\n- [Run shape](#1-run-shape)\n- [Shared fields](#2-shared-fields)\n- [Question protocol](#3-question-protocol)\n\n## 1. Run shape\n\nThree terms describe different concerns. Do not substitute one for another.\n\n| Term | Values | Owns |\n| ------------ | ------------------------------- | --------------------------------------------------------------------------------------------- |\n| `flow` | `automation` or `companion` | Who drives execution. `companion` always executes in `/general-video`. |\n| `storyboard` | `yes` or `no` | Whether the plan and layouts are reviewed before building (`review-loop.md`). |\n| `mode` | `collaborative` or `autonomous` | How later preference and checkpoint gates behave. The user never chooses this label directly. |\n\nDerive `mode` once from the confirmed run shape:\n\n| `flow` | `storyboard` | Derived `mode` |\n| ------------ | ------------ | --------------- |\n| `companion` | either value | `collaborative` |\n| `automation` | `yes` | `collaborative` |\n| `automation` | `no` | `autonomous` |\n\nDefault to `collaborative` only when a legacy project lacks enough state to derive a mode. `/motion-graphics` is autonomous by design and does not need the two run-shape questions.\n\n### Signals and persistence\n\n- An ongoing signal such as “surprise me”, “decide for me”, “just build it”, or “stop asking” sets `flow: automation`, `storyboard: no`, and therefore `mode: autonomous` when it appears during intent capture.\n- A bare “go” or “looks good” at a checkpoint accepts that checkpoint only. It does not change mode.\n- After `STORYBOARD.md` exists, persist the derived mode in its frontmatter. On resume, an explicit `mode` in `STORYBOARD.md` overrides the derivation because it may represent a later user change.\n- Mid-run “stop asking; finish it” changes only checkpoint behavior. Set `STORYBOARD.md` `mode` to `autonomous` when the file exists. Do not rewrite the already-confirmed `flow` or `storyboard` fields.\n- Resume collaborative checkpoints only after an explicit signal such as “let's review together”; ordinary feedback does not change mode.\n\n### Gate behavior\n\n| Gate | Collaborative | Autonomous |\n| ------------------------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- |\n| Preference: preset, voice, caption identity | Ask when the workflow marks it as required. | Decide and state the choice with a one-line reason. |\n| Checkpoint: plan, sketches, pre-render review | Ask and wait. | Post the same summary, then continue. |\n| Quality: fetch completeness, `lint`, `hyperframes check`, workflow verification | Run and stop on errors. | Run and stop on errors. |\n| Routing ambiguity | Resolve explicitly; a wrong route changes the deliverable. | Same requirement. |\n| Sign-in or credential unavailable | Show status and wait for sign-in or explicit offline selection. | Show status and continue through an available offline provider. |\n\nAutonomous mode never silently drops a required capability. If the selected workflow has no local, cached, or offline provider for it, surface the blocker instead of omitting the capability. A credential problem does not relax the quality gates.\n\nRendering remains user-gated in both modes. After checks pass, both open the final Studio preview and ask “render now, or what changes?”; in autonomous runs it is the one kept question. Render only after the answer.\n\n### Checkpoint feedback\n\nCheckpoint feedback arrives as a chat reply. Apply only the frames it names and re-present them.\n\nAutonomous is not silent: replace absorbed questions with visible decisions and short reasons. Every autonomous visual or video delivery names the final preview or rendered artifact as applicable, reports the actual duration for a time-based deliverable, and includes a contact sheet or snapshot sheet plus relevant frame identifiers when available. For multi-scene work, use scene midpoints; for a single-scene piece, use one or more proof times. This gives the user a review surface even though intermediate checkpoints did not pause.\n\n## 2. Shared fields\n\nAsk only fields used by the selected route. Route entries identify their must-have questions and deferred questions. Values inferred or derived by policy are stated in the brief, not asked.\n\n| Field | Meaning | Policy |\n| ------------- | -------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `flow` | Who drives execution | Ask at the end of intent capture when the route supports both flows. An autonomous signal answers it. |\n| `storyboard` | Whether to review the plan and layout sketches before building | Ask before `flow` when the route supports a storyboard. A storyboard request answers it. |\n| `destination` | Where the video will play | Infer from the request. Ask only when unknown and the answer changes aspect, type scale, or composition. |\n| `aspect` | Canvas size | Derive from destination: social feed → `1080x1080`; TikTok/Reels/Shorts → `1080x1920`; YouTube/website/desktop → `1920x1080`. State the derivation. |\n| `length` | Target duration | Let the workflow recommend a range supported by the material; include the reason. |\n| `language` | Narration and caption language | Use the user's language and state it. |\n| `audience` | Who will watch | Infer when clear. Ask only when a different answer changes the story or terminology. |\n| `message` | The one thing the video must communicate | Derive and echo one sentence. Do not storyboard until this is clear. |\n| `angle` | Route-specific story shape | Recommend one route-defined option with a reason. |\n| `narration` | `yes`, `minimal`, or `no`, plus route-specific modes | Follow the selected route. |\n\n### Remembered defaults\n\nLet `<MEDIA_DIR>` be the installed `/media-use` skill directory. Let `<MEMORY_ROOT>` be the existing project root. Before scaffolding, use a deliberately nonexistent probe path with no `.media` ancestor, such as `/tmp/hyperframes-intent-memory-<run-id>`; never use the current workspace as the probe. Read merged preferences with:\n\n```bash\nnode <MEDIA_DIR>/scripts/prefs.mjs get --hyperframes <MEMORY_ROOT> --json\n```\n\nFor the pre-project probe, `<MEMORY_ROOT>` is the nonexistent probe path, so only the personal tier can contribute. If that path already exists or contains `.media`, choose another. Do not claim project provenance before the real project exists.\n\nA remembered value becomes the recommended answer and names its source. It never overrides the current request and never skips a required question. A confirmed recipe is different: adopting the bundle may fill the fields it contains because adoption itself is the confirmation.\n\nRecord only values the user confirmed, never values merely inferred or defaulted. Recording happens after the workflow writes `BRIEF.md`; supported keys are listed in `brief-format.md`. A user who sees the recommendation and accepts it has confirmed it. Personal defaults promote only according to `/media-use` memory rules.\n\nThe first time a project records a preference, say one short line that it will be remembered for future runs. Do not re-record a remembered value merely because an autonomous build reused it; only a confirmation in the current run creates a new memory event.\n\n## 3. Question protocol\n\nFollow these invariants:\n\n1. Ask only unanswered fields that materially affect the output.\n2. Ask one field per message and wait for its answer before asking the next field.\n3. Put the recommended option first and attach a short reason. A numbered choice list is allowed, but every option in that list must answer the same field. Option lists fit factual fields (destination, length, language), where they scaffold recall; a creative field (message, angle, tone) the request has not already shaped takes an anchored open question — a list there steers the answer instead of collecting it.\n4. Skip a question when the current request already answers it. Inference alone is not an answer.\n5. Ask `storyboard` and then `flow` last, only for routes that support them.\n6. Announce deferred questions before hand-off; do not surprise the user later.\n7. When an autonomous signal appears, ask no remaining preference or checkpoint questions. State the completed brief and the reasons for decisions, then build.\n8. Use native question UI when available. Otherwise send one plain-text question with one numbered option list; never place several fields in the same list.\n9. Before the hand-off summary, run one integration check: look for a consequence the combined answers create that no single answer showed, and surface it with a proposed adjustment.\n10. The hand-off summary separates fields the user stated from fields that were inferred or defaulted, with receipts on both.\n11. Revision is not confirmation: after any correction to the summary, present the updated summary and confirm before executing.\n\nAt a checkpoint, “go” accepts that checkpoint's displayed recommendation. If a message explicitly presents a complete brief and says that “go” will accept every displayed default, then “go” may confirm that whole displayed brief; do not assume broader acceptance without that sentence.\n",
|
|
40
40
|
"hyperframes/references/brief-format.md": "# Brief format — `BRIEF.md`\n\nDefines the **intent document** — the file a confirmed brief becomes. The questions that fill it live in the intent layer (`/hyperframes` → `references/intent-interview.md` + its `references/routes/<workflow>.md`); the field semantics live in `brief-contract.md` § 2. This file defines only the artifact: its shape, its home, and its lifecycle.\n\n`BRIEF.md` sits at the project root, and the project's files read as four layers: **`BRIEF.md`** (why, for whom, and everything the user asked for) → **`STORYBOARD.md`** (what, frame by frame) → **`frame.md`** (how it looks) → **`compositions/`** (the thing itself).\n\n## Frontmatter — the confirmed fields\n\nYAML block at the top: one key per deterministic field — the run's shape first, then the registry fields (`brief-contract.md` § 2) used by the route. Store canonical normalized values. Some values come directly from the user; others, such as `workflow`, `aspect`, and `language`, are routed, derived, or normalized and must use the vocabulary defined by the contract. Preserve the user's own wording in the body when it matters.\n\n| Key | Meaning | Example |\n| ------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | --------------------------- |\n| `workflow` | the executing workflow (companion runs record `general-video`) | `faceless-explainer` |\n| `flow` | `automation` — the matched workflow's pipeline · `companion` — co-creation in `/general-video` | `automation` |\n| `storyboard` | `yes` — plan and sketches reviewed before the build (`review-loop.md`) · `no` — one shot from the confirmed brief | `yes` |\n| `message` | the ONE thing the video must communicate | `\"Ship it in an afternoon\"` |\n| `destination` / `aspect` / `language` / `audience` / `length` / `angle` … | the registry fields this route confirmed | — |\n\n**Which keys are memory.** Only the preference-backed subset — `destination`, `aspect`, `language`, `flow`, `storyboard`, `voice`, `style_preset` — is recorded with `media-use` → `scripts/prefs.mjs record` (the store rejects any other key). `style_preset` is stored per workflow: record it with `--workflow <w>` (the store refuses it bare — a look confirmed for one genre is not a default for the others). `message`, `audience`, `length`, `angle` live in the frontmatter only: they describe this video, not the user.\n\n## Body — the intent in prose\n\nFour sections, each optional — write what the intent layer actually learned, omit what it didn't:\n\n- `## Intent` — a short paragraph: what the video is, for whom, why now; tone and feel in the user's own words.\n- `## Assets` — the user's own material, one line each: `path — what it is, where it belongs`. Files named here are staged by the workflow, never re-discovered.\n- `## Customizations` — capabilities the user opted into from the menu (`/hyperframes` → `references/capability-menu.md`) and any bespoke asks (\"count-up on the revenue stat\", \"capture the pricing page too\"), each with enough detail to act on.\n- `## Notes` — everything true that fits no field: constraints, references, things to avoid.\n\nBody prose is **project-local** — nothing in it enters cross-project memory. (Frozen recipes carry a blanked skeleton of it; a future prose-memory layer would extract from here, under its own approval rules.)\n\n## Lifecycle\n\n- **Created once, by the workflow's Setup, as its first action after `hyperframes init`** — never before (`init` refuses a non-empty directory). The intent layer confirms the answers pre-project; Setup makes them durable, then records the preference-backed fields. Later confirmed changes update this same file.\n- **It is the no-repeat token.** A workflow that finds `BRIEF.md` reads it and asks no brief question. Its `workflow:` names the executor — a workflow that finds another's name there is in the wrong room: load that skill and hand over, don't re-route through the intent layer. No `BRIEF.md` but the project exists (`hyperframes.json` / `STORYBOARD.md` on disk) → a pre-BRIEF project: resume from the storyboard's frontmatter and the recorded preferences, optionally backfilling `BRIEF.md` from what they already say — never re-interrogate a half-built project.\n- **It stays the run's truth.** A mid-run decision updates it as it happens: an explicit change to a frontmatter field (\"make it 9:16 after all\") rewrites the field and re-records the preference — a changed mind is a confirmed answer; an accepted capability, adopted material, or bespoke ask lands as one line in the matching body section. Resume reads this file, so write-back is what makes a dead session resumable — a decision that lives only in chat is a decision resume never sees.\n- **Execution mode derives; the storyboard's copy wins on resume.** `flow` × `storyboard` derive collaborative/autonomous checkpoint behavior (`brief-contract.md` § 1). Persist the derived mode in `STORYBOARD.md` frontmatter when that file exists. A mid-run mode-only switch updates `STORYBOARD.md`, not the already-confirmed `flow` or `storyboard`; an explicit change to either run-shape field still updates `BRIEF.md`.\n- **`message` / `audience` live here first.** `STORYBOARD.md` frontmatter keeps its copies — the parser and scripts read them — but when the two disagree, `BRIEF.md` holds what the user confirmed.\n- **Recipes carry its skeleton.** Freezing a recipe (`review-loop.md` § 4) captures `brief-skeleton.md` — frontmatter structure kept, run-shape and content values blanked — so the next run starts pre-filled yet still confirms its own two run-shape answers.\n\n## Example\n\n```markdown\n---\nworkflow: faceless-explainer\nflow: automation\nstoryboard: yes\nmessage: \"Compound interest is a snowball, not a ladder\"\ndestination: x-feed\naspect: 1080x1080\nlanguage: en\nlength: 60s\nangle: concept\n---\n\n## Intent\n\nTeach retail investors why starting early beats contributing more. Confident,\na little playful — closer to a bar-napkin sketch than a lecture.\n\n## Assets\n\n- public/growth-curve.png — the real 30-year S&P chart; the proof beat builds on it.\n\n## Customizations\n\n- Count-up on the final dollar figure.\n\n## Notes\n\n- No stock-photo aesthetics; keep it typographic.\n```\n",
|
|
41
41
|
"hyperframes/references/capability-menu.md": "# Capability menu — what HyperFrames can bring to a video\n\nOne list, three readers. The **pitch round** (`pitch-round.md`) speaks it before anyone reads it as a menu: each pitch names the capability or two its concept rides, phrased from the middle column — the rows experienced inside concepts, which is how most users first learn what they're allowed to want. The **intent layer** (`/hyperframes` → `references/intent-interview.md`, step 7) recommends from it — one or two rows the confirmed concept specifically calls for and the chosen pitch didn't already name, with the route-filtered slice shown when the user asks what else is possible. **`/general-video` in companion mode** uses the same list as its execution map — as its **trigger list**: each row's plain-language line is also the moment to offer it, when the conversation touches what the row does — and as each pass's **upgrade channel**: a plan, sketch, or build checkpoint may carry one or two traced offers pointed at material the user is looking at.\n\n**Borrowing rule.** Capabilities marked with a home workflow live in that workflow's skill directory, and workflow skills install lazily. Before reaching across, run `npx hyperframes skills update <that-workflow>` with the bare name. Resolve the installed skill directory, invoke its script by absolute path, and pass the project root explicitly when the script accepts one. Keep the working directory at the project root. Never assume a sibling-relative path such as `../media-use` or `../music-to-video`; the project may live anywhere.\n\nEach row's last column reads **home → entry → what you get**: the owning skill, the exact doc or command to start from, and the artifact that comes back.\n\n| Capability | Say it to the user as… | Home → entry → what you get |\n| ------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| **Design spec (`frame.md`)** — one file that locks palette, type, and layout feel; every frame obeys it (the video-first sibling of a web `design.md`) | \"a design system for the video — colors and typography stay consistent\" | `/hyperframes-creative` → `references/design-spec.md` (what a spec is + resolution order); presets: `frame-presets/<name>/` (always installed — browsing needs no borrow); applying machinery `build-frame.mjs` (home: `/faceless-explainer`, `/product-launch-video`) → `frame.md` at the project root. How to ask: **§ The design ask** below |\n| **Website capture** — headless-Chrome crawl of a real site: screenshots, brand tokens, assets | \"I can capture your site and build from its real look\" | CLI → `npx hyperframes capture <URL> -o ./capture` → `capture/` (screenshots, extracted tokens/text/assets); doctrine: `/product-launch-video` |\n| **Beat analysis & audio-reactive motion** — a deterministic beat / energy map of a track; cuts land on the grid, elements pulse with the music | \"if there's music, I can cut the video to its beat — and make elements move with it\" | grid: `/music-to-video` → `scripts/analyze-beatgrid.py` → `audiomap.json` (beats, energy, sections); element reaction: `/hyperframes-creative` → `references/audio-reactive.md` + `scripts/extract-audio-data.py` |\n| **Motion blueprints** — proven scene shapes (reveals, counters, charts, dioramas) picked per beat | \"each scene gets a proven motion treatment, not improvised movement\" | `/hyperframes-animation` → `blueprints-index.md` + `rules-index.md` → per-beat `blueprint:` ids the build reads |\n| **Voice, music, SFX, images, logos, media treatments** — resolved media plus source-aware color, effects, privacy, reveals, and justified overlays | \"narration, music, sound effects, real assets — and footage polished or stylized to fit the story\" | `/media-use` (a host app's own music and sound-effect tools come first for those) → deterministic resolve/operate tools plus `references/media-treatments.md`; shader pixels persist through `hyperframes media-treatment`, optional overlays come from Registry, and finite motion uses the host GSAP timeline |\n| **Generative video** — an AI presenter delivers the script; a still photo becomes a talking clip; a finished video gets dubbed into another language | \"an AI presenter can read your script on camera; I can animate a photo into a talking clip, or dub the video\" | `/media-use` → `references/operations.md` § Generate: video (`heygen video create` / `video-translate`; OAuth free allowance where eligible) → an mp4 clip adopted into `assets/` + manifest record |\n| **Transcription & captions** — word-timed transcripts; styled caption skins on the finished video | \"accurate captions, styled to match\" | `/media-use` → `scripts/transcribe.mjs` → word-timed transcript; caption machinery `captions.mjs` (home: `/faceless-explainer`) → the caption track |\n| **Cut footage by its transcript** — trim a clip by choosing sentences, not timecodes | \"I can trim your clip by picking the sentences to keep\" | `/media-use` → `scripts/transcript-cut.mjs` → the trimmed clip + updated transcript |\n| **Designed overlays on user footage** — kinetic titles, lower-thirds, data callouts synced to what's said | \"your own clip can carry designed titles and info bars, timed to the speech\" | the **whole ask** = the `/talking-head-recut` route — route there, don't rebuild it; **one scene inside a bigger piece** = `/hyperframes-animation` lower-third / callout blueprints + `/talking-head-recut`'s safe-zone thinking → overlay comps on the footage track |\n| **Real map scenes** — a genuine basemap with located pins, routes, or a flight path | \"for places and journeys — a real map, not a drawing of one\" | `/motion-graphics` → `grounding/locate.mjs` (geocode) + `categories/maps/` (incl. `bake-basemap.mjs`) → a deterministic baked basemap + located pins |\n| **Figma import** — assets, brand tokens, components, storyboard frames read as motion states | \"if the design lives in Figma, I can build from it directly\" | `/figma` → REST/CLI import (+ MCP for Motion/shaders) → sanitized SVGs, `var()`-bound brand tokens, frames-as-states |\n| **Registry blocks** — 50+ installable scene compositions (data charts, device mockups, quote cards…) | \"ready-made scenes we can drop in and restyle\" | `/hyperframes-registry` → `npx hyperframes add <block>` → an installed sub-composition (wiring: `references/wiring-blocks.md`) |\n| **Scene transitions** — cuts, crossfades, wipes, WebGL shader transitions between scenes | \"how one scene hands off to the next — up to full shader wipes\" | `/hyperframes-animation` → `transitions/overview.md` then `transitions/catalog.md`; assembly `transitions.mjs` (home: `/faceless-explainer`) → injected handoffs in the index |\n| **User media on the timeline** — the user's own images / clips staged and woven into frames | \"your own footage, screenshots, or photos placed into the video\" | staging `stage-assets.mjs` (home: `/music-to-video`, `/product-launch-video`); adoption: `/media-use` `--adopt` → files in `assets/` + manifest records |\n| **Publish to a stable link** — the finished piece on a private-by-default hosted URL; re-publishing updates the same link | \"when it's done I can publish it to a stable link — private by default, or public when you ask\" | `/hyperframes-cli` → `references/preview-render.md` (`npx hyperframes publish`) → a stable hosted URL with explicit visibility |\n\nOffer, don't unload: the intent layer recommends the one or two rows the confirmed concept itself calls for, states each as one plain-language line traced to the brief, and asks once — the route-filtered slice on request, the full table for the companion.\n\n## The design ask — have it, pick it, or leave it\n\nThe design-spec row is a three-state question, not an explainer (what a spec **is** stays in `design-spec.md`):\n\n- **They have one.** Brand guidelines, a `frame.md`, a `design.md` — note the path in `BRIEF.md` § Assets; the workflow reads it as brand truth (resolution order: `/hyperframes-creative` → `references/design-spec.md`).\n- **They don't, but the look matters — show, don't name.** Pick 2–3 shipped presets whose look fits the content, tone, and audience (browse `/hyperframes-creative` → `frame-presets/`), and open each one's `frame-presets/<name>/frame-showcase.html` in the browser so the user picks **by eye**, never from a list of names. The choice lands in `BRIEF.md` as `style_preset` — a remembered preference key, so next run it's the recommended answer with a receipt. On a route that captures a real site, say the honest line as the showcases open: a showcase wears the preset's **own** palette, and the site's brand colors and fonts will be remixed onto whichever preset wins — **the pick is the layout bones, not the colors** — and offer the alternative of deferring the pick until after capture, when the look can be judged with the real brand in hand (a declared deferred ask; the sketch pass shows the remixed truth either way, before anything expensive is built).\n- **They don't care — or nothing shipped fits.** Don't care: no further questions; the workflow's design step decides and says why. Nothing fits: announce the **design picker** as a deferred ask — the workflow's design step generates mood boards contextual to their content to choose from (`/hyperframes-creative` → `references/design-picker.md`); it needs a project and a generation pass, so it never runs inside the intent conversation.\n\n## Genre lenses — the shipped workflows' taste, borrowable\n\nThe narrative workflows carry genre-tuned design references — `story-design.md` (narrative archetypes and beats), `visual-design.md` (the genre's look), `motion-language.md` + `cut-catalog.md` (motion and cut doctrine). When a companion or freeform piece resembles a genre, read that workflow's lens before planning or building in it (borrowing rule above):\n\n| The piece resembles… | Borrow from |\n| ---------------------------------------- | ----------------------------------------------------------------------- |\n| a product promo / launch / site showcase | `/product-launch-video` → `references/` |\n| a topic / mechanism / concept explainer | `/faceless-explainer` → `references/` |\n| a code-change walkthrough | `/pr-to-video` → `references/` (+ `code-vocabulary.md` for code frames) |\n\n`motion-language.md` and `cut-catalog.md` are near-identical across the three — take them from the genre you already resembled, or `/faceless-explainer`'s as the neutral default. **Borrow the shape and the taste, never the machinery**: their scripts and directory rules belong to their pipelines; the generic back half of any build lives in `hyperframes/references/production-loop.md`.\n",
|
|
42
|
-
"hyperframes/references/frame-worker-core.md": "# Frame worker — core contract (shared by the narrative video workflows)\n\nThe workflow-agnostic half of every frame worker's role. Each workflow's packet builder (`scripts/frame-packets.mjs`) prepends this file to that workflow's `sub-agents/frame-worker.md` (the **delta**) to form `.hyperframes/frame-packets/_role.md` — a worker reads the two as one role. Editing guidance: a rule that applies to any frame worker belongs here, once; a workflow-specific rule belongs in that workflow's delta. (`music-to-video` has its own composition model and does not use this contract.)\n\nYou build the frame composition file(s) assigned in your dispatch and nothing else — sibling workers build the other frames. The structural law behind the constraints and self-check below (sub-composition shape, timeline registration, clip attrs, transform-only motion, determinism, root sizing) lives in `hyperframes-core` (`references/sub-compositions.md`, `references/determinism-rules.md`, `references/data-attributes.md`); everything you must enforce is restated below — open one of those only when a rule here is unclear. This role + your packet also **supersede the skill catalog's own imperatives**: do not open `hyperframes/SKILL.md` or `hyperframes-core/SKILL.md` (\"read this first\" is for fresh requests — that routing already happened upstream, and its output is this dispatch).\n\n**INPUT** — your dispatch provides this role, your frame packet(s), and:\n\n- `PROJECT_DIR` — the project root; all paths are relative to it.\n- `frame_id` — e.g. `03-feature`. Use it **verbatim** as the composition id, the `window.__timelines` key, and the file name (`compositions/frames/03-feature.html`) — that path **is** the frame's `src` in `STORYBOARD.md` (the orchestrator derived `frame_id` from it), so writing there is how the assembler finds your frame.\n- Your **packet** (`.hyperframes/frame-packets/<frame_id>.md`) — everything selected upstream for this frame. You never open the shared `STORYBOARD.md` (see below); the packet carries your exact **`## Frame N` block**:\n - `scene` — a one-line contact-sheet caption. **Design intent, never visible DOM text.**\n - `voiceover` — the narration line. **Timing reference only** (sync entrances to the voice); **never** rendered as text — captions are a separate root track (see constraints).\n - `duration` — your render length in seconds. **Fixed upstream; never change it or tween to fill a different length.**\n - `transition_in` — informational. The injector stamps it at the root; **you do not author transitions.**\n - the **time-coded shot sequence** — your build spec. A sequence of Scene lines (`Scene 1 (0.0–Xs): … → Scene 2: … → Scene N`), each stating what's on screen, what enters / moves / reveals, and the layout inline. Build it faithfully, beat for beat — every Scene window is a phase you must realize, and each reveal lands on its `voiceover` cue (this is what keeps the shot from freezing).\n - `blueprint:` — an id (or the literal `compose`): the shot template this frame instantiates — the overall shape + its signature move. Its body is inlined in your packet (`## Selected blueprint`); `compose` means there's no template — sequence the shot from the Scene lines directly.\n - `focal:` / `roles:` — which element is the hero and what each element is. **Semantics are workflow-specific — see the delta.**\n - `sfx:` — the orchestrator's; you mount no audio.\n- The packet also inlines the **rule recipe** (`## Selected motion rule: <id>`) for each named motion the Scene lines cite — the mechanics for that motion, which you reproduce, **never name-guess** (a guess loses the signature move). If a cited motion's recipe is missing from your packet, read `RULES_DIR/<id>.md` (`RULES_DIR` is in the packet header); a few recipes link an optional runnable demo in the shared `../../hyperframes-animation/examples/<id>.html` — open it only when a recipe is unclear.\n- `frame.md` (project root) — the **design-truth**: palette, type ramp, components, composition rules. The LOOK. Pull every visual token from here. This is the one file you read outside your packet.\n- `references/cut-catalog.md` (the workflow's own copy) — the **cut catalog** (zoom-through / inverse / cut-the-curve / waterfall). When a Scene seam is a within-scene swap, a scene-to-scene cut, or a text-to-text line change, build it INSIDE your composition per this catalog (Z-scale + blur + opacity, or per-word x-staggers). You never author the between-frame transition — story's `transition_in` + the injector own that.\n- Canvas `<width>×<height>` and `Captions: <enabled | disabled>` (+ the keep-out cutoff when enabled).\n\n**Retry** — if your context carries `lint` / `check` feedback from a prior pass, read it first and re-author so none of those findings recur; treat each as a hard constraint.\n\n**OUTPUT** — `compositions/frames/<frame_id>.html` for each assigned packet: exactly one bare `<template>…</template>` fragment. The first non-whitespace bytes are `<template`; the last are `</template>`. Never emit `<!doctype>`, `<html>`, `<head>`, `<body>`, or any markup outside that single template. Writing your assigned file(s) (past the self-check below) is your **terminal action** — you do not edit `STORYBOARD.md`, mint audio, assemble the index, run the CLI, or report back. The orchestrator picks up the file and marks the frame's `status`.\n\n## When a confirmed sketch exists\n\nIn collaborative runs the orchestrator sketches every frame first as a cell of `storyboard.html` (`id=\"frame-NN\"`), so your frame may have a **user-confirmed wireframe** there — your dispatch says whether it does (a target file found on a retry is your own prior output, not a sketch). Read that cell first and **keep its composition**: the placement, hierarchy, and copy were approved — don't move or drop them. Everything else is yours to finish: the finished content where the sketch used stand-in blocks (what that content is — real assets, invented visuals, a code block — is the delta's call, since the sketch already carries the full `frame.md` treatment), and the motion — map each Scene onto a timeline phase, reveal each piece on its `voiceover` cue with `fromTo` entrances, adding DOM only where a phase needs it. The frame's landed state must still read as the approved sketch, now moving.\n\n## You do NOT decide\n\nThese belong to other steps — touching them collides with a sibling or breaks an upstream contract:\n\n- **What is SAID** — narration is locked in `SCRIPT.md` / the `voiceover` line. You only show; you never write or restate narration text.\n- **Duration** — fixed from real voice timing. Build your shot to land within it; don't stretch or trim it.\n- **Transitions between frames** — the injector stamps them onto the root timeline. You author the shot itself (the VO-paced reveal sequence) but **never an exit** — the root transition IS the exit; a settle / fade-out only if you are the final frame.\n- **Audio** (narration / BGM / SFX) — assembled at the root by the orchestrator. **No `<audio>` element in your composition.**\n- **Design tokens** — palette / fonts / components come from `frame.md`. Don't invent them, and **never lift a word, label, or wordmark out of `frame.md` as your copy** — it is a style spec, not content. Visible text comes from your frame's `scene` / narrative.\n- **Which motions / assets exist** — named upstream in your block (the shot sequence's motion verbs + `blueprint:` + the delta's own vocabularies). Implement them; don't fetch or invent new ones (you have no asset-fetch tool — never fabricate an asset URL or reference a file the dispatch didn't name).\n- **The shared `STORYBOARD.md`** — your packet carries your block; never open or write the file itself. N siblings edit nothing there concurrently; the orchestrator owns its state.\n\n## Frame constraints\n\nShared law for every narrative frame, each load-bearing; your workflow's delta adds its own on top:\n\n- **Caption keep-out — all content in the top ~83%.** A karaoke caption pill owns the bottom ~17% of the canvas. Keep every element (headline, cards, code panel, diagram, stats, brand mark) above `y ≈ 0.83 × height` — compute the pixel cutoff from your canvas (e.g. `≤ 900` on a 1080-tall frame, `≤ 1600` on a 1920-tall portrait). Holds **even when `Captions: disabled`** (bottom-edge consistency across frames).\n- **Fill the content area — especially portrait.** Compose the whole top-83% region; don't float one small cluster mid-frame. Anchor the hero high (~0.2–0.35 × height), flow supporting elements down with rhythm, scale the hero toward full-bleed. (Landscape's region is short, so vertical centering near 0.42 × height is fine.)\n- **Visible text is short motion-graphics copy** — a hero word / stat / one-word emphasis (`\"$83K\"`, `\"2× faster\"`, `\"INSTANT\"`), never a sentence from the narration. The root caption track already shows the spoken words synced to voice; repeating them double-prints on screen. (The delta may name exceptions — e.g. real code inside a code block is content, not narration.)\n- **Build the whole shot — reveal across the full `duration`, never front-load.** Dumping the whole canvas in the first ~25% then holding it is exactly what reads as a PowerPoint slide. Instead reveal each piece — a line, a card, a node, a stat — **as the `voiceover` reaches it** (on a silent frame, on the beat), sequencing reveals across the shot and especially the back ~50%, with the macro camera move running underneath. **Only EXITS are banned** — a non-final frame unmounts mid-frame, so an exit tween truncates and reads as a glitch (the root transition IS the exit); mid-shot reveals are free and seek-safe. The lone exception is a note marked as a deliberate hold / stillness frame: there, an entrance + a quiet settle is right (a held read beats bad motion).\n- **Implement the shot sequence faithfully — every Scene is a timeline phase.** The Scene lines ARE the build: map each Scene onto a phase of the one timeline, each piece revealing as the `voiceover` reaches it. For each **named motion** in a Scene, reproduce the mechanics of its inlined rule recipe — **never name-guess**. The inlined **`blueprint:` template** gives the overall shape; keep its **signature move** recognizable, then instantiate it with this frame's content / assets / timing. `compose` → no template; sequence the shot straight from the Scene lines. Whichever, never front-load the whole sequence at `t=0` — pace the reveals to the voiceover.\n\n## Workflow\n\n1. **Read** — your packet top to bottom (your frame block, the inlined blueprint, the inlined rule recipes), then `frame.md` (the look). Internalize the self-check codes below before you write — most lethal is **template transport**: every `<style>` + `<script>` (including the gsap load) must live INSIDE `<template>`, because the runtime only clones template contents and the assembled-project `lint` / `check` gate can miss an unwired blank sub-composition.\n2. **Design** — turn the time-coded shot sequence into a timeline using `frame.md`'s components and type ramp: each Scene window becomes a phase revealed on its `voiceover` cue, each named motion built from the recipe in your packet, the blueprint's signature move kept recognizable. Find a visual idea that reinforces the beat, not a literal restyle of the words.\n3. **Author** — write the full sub-composition to `compositions/frames/<frame_id>.html` (rewrite to iterate; last write wins). `<template>`-wrapped root carrying `data-composition-id=\"<frame_id>\"` and styled via `#root` (not a class on that element — see the self-check below), exactly one `gsap.timeline({ paused: true })` registered at `window.__timelines[\"<frame_id>\"]`, built synchronously.\n Prefix authored ids and globally reusable class names with `<frame_id>-` so sibling frames assembled from parallel workers cannot collide. Contract selectors such as `#root` and `.clip` are the only exceptions.\n4. **Self-check, then finish** — re-read your file against the checklist below and fix in place; then continue to your next assigned packet, if any. You do **not** run the CLI.\n\n## Self-check before finishing (you do NOT run the CLI)\n\nYou **can't** meaningfully run `hyperframes lint` / `check` here: they operate on the **assembled project** (the `index.html` graph / bundle), and your frame isn't wired in yet — so they report on _other_ files, not yours (a false green). The **orchestrator** runs them after assembly (the correct unit), and **re-dispatches you with the finding** if your frame fails (see **Retry** above). So get it right on write: re-read your file against this checklist before finishing — the codes in parens are `hyperframes lint`'s and what the orchestrator may cite back:\n\n- `missing_template_wrapper` / `missing_composition_id` — the entire file is exactly one bare `<template>…</template>` fragment (no DOCTYPE / full document); root carries `data-composition-id=\"<frame_id>\"`.\n- **Template transport** — every `<style>` and `<script>` block, including the GSAP load, lives inside `<template>`.\n- `subcomposition_root_styled_by_class` — **style the frame root via `#root`, never a class on the `data-composition-id` element**: at render a class on the root gets scoped to a descendant selector that can't match it, so the **whole scene renders unstyled** (Studio preview still looks right — trust this rule, not the preview). Descendants use plain selectors.\n- **Full-bleed background on a `class=\"clip\"` layer, never `#root`** — author a frame's full-bleed ground (color field / gradient / grid) as a dedicated full-duration `class=\"clip\"` background element on the lowest content track, **not** as a `background` on the `#root` / `data-composition-id` element. At assembly the frame root is clip-gated to its scene window, so a background painted on the root is not a dependable full-frame ground — dark content can end up over the host `body` (black) and render invisible. The video's base ground is painted separately by the assembler from `frame.md`'s `canvas` color onto the index `#root`; your full-bleed clip rides on top of it.\n- `clip_missing_data_attrs` — every `class=\"clip\"` element has `data-start` / `data-duration` / `data-track-index`.\n- `timeline_not_paused` / `timeline_not_registered` — one paused timeline, registered at `window.__timelines[\"<frame_id>\"]`.\n- `css_transition_used` + repeat / yoyo / non-deterministic logic — none present (the renderer seeks frame-by-frame).\n- `gsap_css_transform_conflict` — never put a CSS `transform` (e.g. `translateY(-50%)` centering) on an element you then GSAP-animate a transform prop on (`x` / `y` / `scale` / `rotation`): GSAP overwrites the whole `transform` and silently drops the CSS centering (the element jumps). Center with `margin` / `inset` (or `top`/`left` + offset), fold the offset into the tween via `xPercent` / `yPercent`, or use `fromTo` (the rule exempts it).\n- **Hero visibility** — the main subject is visible by `t <= 0.5s`; entrance tweens use `fromTo` instead of CSS-hidden starting states.\n- `exit_animation_on_non_final_scene` — no exit tween unless you are the final frame.\n- **No front-loading (not a slide)** — the shot's pieces reveal on their `voiceover` cues across the duration, not all fired at `t=0`; a non-still frame keeps content arriving rather than holding a full canvas from ~25%.\n- **Shot-sequence fidelity** — every Scene in the time-coded sequence is realized as a phase, the blueprint's signature move (unless `compose`) is present and recognizable, and the shot reveals to the voiceover (never front-loaded at `t=0`).\n- `font_family_without_font_face` — every font you name has a matching `@font-face` **inside this file**. **Only use fonts that ship as files** with the project: the families declared in `frame.md` (their `.woff2` live in `assets/fonts/` or `capture/assets/fonts/` — point the `@font-face` `src` at the real file you find there). **Never name a font that has no file**, including system CJK / Japanese / Devanagari families (`Hiragino Sans`, `Yu Gothic`, `Noto Sans CJK`, `Noto Sans Devanagari`, …): the render machine is a clean headless Chrome with none of them installed, so the text silently falls back to a generic font and the typography is wrong in the MP4. For non-Latin or multilingual visible text, either use a shipped font that covers the script, or romanize / transliterate it (e.g. `日本語` → `Japanese`); if neither is possible it is out of scope for this frame — do not invent a font name.\n- **Keep-out + no-narration-text** (eyeball, no code) — nothing sits below the 83% cutoff; no narration sentence is rendered as visible text.\n",
|
|
42
|
+
"hyperframes/references/frame-worker-core.md": "# Frame worker — core contract (shared by the narrative video workflows)\n\nThe workflow-agnostic half of every frame worker's role. Each workflow's packet builder (`scripts/frame-packets.mjs`) prepends this file to that workflow's `sub-agents/frame-worker.md` (the **delta**) to form `.hyperframes/frame-packets/_role.md` — a worker reads the two as one role. Editing guidance: a rule that applies to any frame worker belongs here, once; a workflow-specific rule belongs in that workflow's delta. (`music-to-video` has its own composition model and does not use this contract.)\n\nYou build the frame composition file(s) assigned in your dispatch and nothing else — sibling workers build the other frames. The structural law behind the constraints and self-check below (sub-composition shape, timeline registration, clip attrs, transform-only motion, determinism, root sizing) lives in `hyperframes-core` (`references/sub-compositions.md`, `references/determinism-rules.md`, `references/data-attributes.md`); everything you must enforce is restated below — open one of those only when a rule here is unclear. This role + your packet also **supersede the skill catalog's own imperatives**: do not open `hyperframes/SKILL.md` or `hyperframes-core/SKILL.md` (\"read this first\" is for fresh requests — that routing already happened upstream, and its output is this dispatch).\n\n**INPUT** — your dispatch provides this role, your frame packet(s), and:\n\n- `PROJECT_DIR` — the project root; all paths are relative to it.\n- `frame_id` — e.g. `03-feature`. Use it **verbatim** as the composition id, the `window.__timelines` key, and the file name (`compositions/frames/03-feature.html`) — that path **is** the frame's `src` in `STORYBOARD.md` (the orchestrator derived `frame_id` from it), so writing there is how the assembler finds your frame.\n- Your **packet** (`.hyperframes/frame-packets/<frame_id>.md`) — everything selected upstream for this frame. You never open the shared `STORYBOARD.md` (see below); the packet carries your exact **`## Frame N` block**:\n - `scene` — a one-line contact-sheet caption. **Design intent, never visible DOM text.**\n - `voiceover` — the narration line. **Timing reference only** (sync entrances to the voice); **never** rendered as text — captions are a separate root track (see constraints).\n - `duration` — your render length in seconds. **Fixed upstream; never change it or tween to fill a different length.**\n - `transition_in` — informational. The injector stamps it at the root; **you do not author transitions.**\n - the **time-coded shot sequence** — your build spec. A sequence of Scene lines (`Scene 1 (0.0–Xs): … → Scene 2: … → Scene N`), each stating what's on screen, what enters / moves / reveals, and the layout inline. Build it faithfully, beat for beat — every Scene window is a phase you must realize, and each reveal lands on its `voiceover` cue (this is what keeps the shot from freezing).\n - `blueprint:` — an id (or the literal `compose`): the shot template this frame instantiates — the overall shape + its signature move. Its body is inlined in your packet (`## Selected blueprint`); `compose` means there's no template — sequence the shot from the Scene lines directly.\n - `focal:` / `roles:` — which element is the hero and what each element is. **Semantics are workflow-specific — see the delta.**\n - `sfx:` — the orchestrator's; you mount no audio.\n- The packet also inlines the **rule recipe** (`## Selected motion rule: <id>`) for each named motion the Scene lines cite — the mechanics for that motion, which you reproduce, **never name-guess** (a guess loses the signature move). If a cited motion's recipe is missing from your packet, read `RULES_DIR/<id>.md` (`RULES_DIR` is in the packet header); a few recipes link an optional runnable demo in the shared `../../hyperframes-animation/examples/<id>.html` — open it only when a recipe is unclear.\n- `frame.md` (project root) — the **design-truth**: palette, type ramp, components, composition rules. The LOOK. Pull every visual token from here. This is the one file you read outside your packet.\n- `references/cut-catalog.md` (the workflow's own copy) — the **cut catalog** (zoom-through / inverse / cut-the-curve / waterfall). When a Scene seam is a within-scene swap, a scene-to-scene cut, or a text-to-text line change, build it INSIDE your composition per this catalog (Z-scale + blur + opacity, or per-word x-staggers). You never author the between-frame transition — story's `transition_in` + the injector own that.\n- Canvas `<width>×<height>` and `Captions: <enabled | disabled>` (+ the keep-out cutoff when enabled).\n\n**Retry** — if your context carries `lint` / `check` feedback from a prior pass, read it first and re-author so none of those findings recur; treat each as a hard constraint.\n\n**OUTPUT** — `compositions/frames/<frame_id>.html` for each assigned packet: exactly one bare `<template>…</template>` fragment. The first non-whitespace bytes are `<template`; the last are `</template>`. Never emit `<!doctype>`, `<html>`, `<head>`, `<body>`, or any markup outside that single template. Writing your assigned file(s) (past the self-check below) is your **terminal action** — you do not edit `STORYBOARD.md`, mint audio, assemble the index, run the CLI, or report back. The orchestrator picks up the file and marks the frame's `status`.\n\n## When a confirmed sketch exists\n\nIn collaborative runs the orchestrator sketches every frame first as a cell of `storyboard.html` (`id=\"frame-NN\"`), so your frame may have a **user-confirmed wireframe** there — your dispatch says whether it does (a target file found on a retry is your own prior output, not a sketch). Read that cell first and **keep its composition**: the placement, hierarchy, and copy were approved — don't move or drop them. Everything else is yours to finish: the finished content where the sketch used stand-in blocks (what that content is — real assets, invented visuals, a code block — is the delta's call, since the sketch already carries the full `frame.md` treatment), and the motion — map each Scene onto a timeline phase, reveal each piece on its `voiceover` cue with `fromTo` entrances, adding DOM only where a phase needs it. The frame's landed state must still read as the approved sketch, now moving.\n\n## You do NOT decide\n\nThese belong to other steps — touching them collides with a sibling or breaks an upstream contract:\n\n- **What is SAID** — narration is locked in `SCRIPT.md` / the `voiceover` line. You only show; you never write or restate narration text.\n- **Duration** — fixed from real voice timing. Build your shot to land within it; don't stretch or trim it.\n- **Transitions between frames** — the injector stamps them onto the root timeline. You author the shot itself (the VO-paced reveal sequence) but **never an exit** — the root transition IS the exit; a settle / fade-out only if you are the final frame.\n- **Audio** (narration / BGM / SFX) — assembled at the root by the orchestrator. **No `<audio>` element in your composition.**\n- **Design tokens** — palette / fonts / components come from `frame.md`. Don't invent them, and **never lift a word, label, or wordmark out of `frame.md` as your copy** — it is a style spec, not content. Visible text comes from your frame's `scene` / narrative.\n- **Which motions / assets exist** — named upstream in your block (the shot sequence's motion verbs + `blueprint:` + the delta's own vocabularies). Implement them; don't fetch or invent new ones (you have no asset-fetch tool — never fabricate an asset URL or reference a file the dispatch didn't name).\n- **The shared `STORYBOARD.md`** — your packet carries your block; never open or write the file itself. N siblings edit nothing there concurrently; the orchestrator owns its state.\n\n## Frame constraints\n\nShared law for every narrative frame, each load-bearing; your workflow's delta adds its own on top:\n\n- **Caption keep-out — all content in the top ~83%.** A karaoke caption pill owns the bottom ~17% of the canvas. Keep every element (headline, cards, code panel, diagram, stats, brand mark) above `y ≈ 0.83 × height` — compute the pixel cutoff from your canvas (e.g. `≤ 900` on a 1080-tall frame, `≤ 1600` on a 1920-tall portrait). Holds **even when `Captions: disabled`** (bottom-edge consistency across frames).\n- **Fill the content area — especially portrait.** Compose the whole top-83% region; don't float one small cluster mid-frame. Anchor the hero high (~0.2–0.35 × height), flow supporting elements down with rhythm, scale the hero toward full-bleed. (Landscape's region is short, so vertical centering near 0.42 × height is fine.)\n- **Visible text is short motion-graphics copy** — a hero word / stat / one-word emphasis (`\"$83K\"`, `\"2× faster\"`, `\"INSTANT\"`), never a sentence from the narration. The root caption track already shows the spoken words synced to voice; repeating them double-prints on screen. (The delta may name exceptions — e.g. real code inside a code block is content, not narration.)\n- **Build the whole shot — reveal across the full `duration`, never front-load.** Dumping the whole canvas in the first ~25% then holding it is exactly what reads as a PowerPoint slide. Instead reveal each piece — a line, a card, a node, a stat — **as the `voiceover` reaches it** (on a silent frame, on the beat), sequencing reveals across the shot and especially the back ~50%, with the macro camera move running underneath. **Only EXITS are banned** — a non-final frame unmounts mid-frame, so an exit tween truncates and reads as a glitch (the root transition IS the exit); mid-shot reveals are free and seek-safe. The lone exception is a note marked as a deliberate hold frame: there, an entrance + a quiet settle is right (the hold still keeps one motivated motion).\n- **Implement the shot sequence faithfully — every Scene is a timeline phase.** The Scene lines ARE the build: map each Scene onto a phase of the one timeline, each piece revealing as the `voiceover` reaches it. For each **named motion** in a Scene, reproduce the mechanics of its inlined rule recipe — **never name-guess**. The inlined **`blueprint:` template** gives the overall shape; keep its **signature move** recognizable, then instantiate it with this frame's content / assets / timing. `compose` → no template; sequence the shot straight from the Scene lines. Whichever, never front-load the whole sequence at `t=0` — pace the reveals to the voiceover.\n\n## Workflow\n\n1. **Read** — your packet top to bottom (your frame block, the inlined blueprint, the inlined rule recipes), then `frame.md` (the look). Internalize the self-check codes below before you write — most lethal is **template transport**: every `<style>` + `<script>` (including the gsap load) must live INSIDE `<template>`, because the runtime only clones template contents and the assembled-project `lint` / `check` gate can miss an unwired blank sub-composition.\n2. **Design** — turn the time-coded shot sequence into a timeline using `frame.md`'s components and type ramp: each Scene window becomes a phase revealed on its `voiceover` cue, each named motion built from the recipe in your packet, the blueprint's signature move kept recognizable. Find a visual idea that reinforces the beat, not a literal restyle of the words.\n3. **Author** — write the full sub-composition to `compositions/frames/<frame_id>.html` (rewrite to iterate; last write wins). `<template>`-wrapped root carrying `data-composition-id=\"<frame_id>\"` and styled via `#root` (not a class on that element — see the self-check below), exactly one `gsap.timeline({ paused: true })` registered at `window.__timelines[\"<frame_id>\"]`, built synchronously.\n Prefix authored ids and globally reusable class names with `<frame_id>-` so sibling frames assembled from parallel workers cannot collide. Contract selectors such as `#root` and `.clip` are the only exceptions.\n4. **Self-check, then finish** — re-read your file against the checklist below and fix in place; then continue to your next assigned packet, if any. You do **not** run the CLI.\n\n## Self-check before finishing (you do NOT run the CLI)\n\nYou **can't** meaningfully run `hyperframes lint` / `check` here: they operate on the **assembled project** (the `index.html` graph / bundle), and your frame isn't wired in yet — so they report on _other_ files, not yours (a false green). The **orchestrator** runs them after assembly (the correct unit), and **re-dispatches you with the finding** if your frame fails (see **Retry** above). So get it right on write: re-read your file against this checklist before finishing — the codes in parens are `hyperframes lint`'s and what the orchestrator may cite back:\n\n- `missing_template_wrapper` / `missing_composition_id` — the entire file is exactly one bare `<template>…</template>` fragment (no DOCTYPE / full document); root carries `data-composition-id=\"<frame_id>\"`.\n- **Template transport** — every `<style>` and `<script>` block, including the GSAP load, lives inside `<template>`.\n- `subcomposition_root_styled_by_class` — **style the frame root via `#root`, never a class on the `data-composition-id` element**: at render a class on the root gets scoped to a descendant selector that can't match it, so the **whole scene renders unstyled** (Studio preview still looks right — trust this rule, not the preview). Descendants use plain selectors.\n- **Full-bleed background on a `class=\"clip\"` layer, never `#root`** — author a frame's full-bleed ground (color field / gradient / grid) as a dedicated full-duration `class=\"clip\"` background element on the lowest content track, **not** as a `background` on the `#root` / `data-composition-id` element. At assembly the frame root is clip-gated to its scene window, so a background painted on the root is not a dependable full-frame ground — dark content can end up over the host `body` (black) and render invisible. The video's base ground is painted separately by the assembler from `frame.md`'s `canvas` color onto the index `#root`; your full-bleed clip rides on top of it.\n- `clip_missing_data_attrs` — every `class=\"clip\"` element has `data-start` / `data-duration` / `data-track-index`.\n- `timeline_not_paused` / `timeline_not_registered` — one paused timeline, registered at `window.__timelines[\"<frame_id>\"]`.\n- `css_transition_used` + repeat / yoyo / non-deterministic logic — none present (the renderer seeks frame-by-frame).\n- `gsap_css_transform_conflict` — never put a CSS `transform` (e.g. `translateY(-50%)` centering) on an element you then GSAP-animate a transform prop on (`x` / `y` / `scale` / `rotation`): GSAP overwrites the whole `transform` and silently drops the CSS centering (the element jumps). Center with `margin` / `inset` (or `top`/`left` + offset), fold the offset into the tween via `xPercent` / `yPercent`, or use `fromTo` (the rule exempts it).\n- **Hero visibility** — the main subject is visible by `t <= 0.5s`; entrance tweens use `fromTo` instead of CSS-hidden starting states.\n- `exit_animation_on_non_final_scene` — no exit tween unless you are the final frame.\n- **No front-loading (not a slide)** — the shot's pieces reveal on their `voiceover` cues across the duration, not all fired at `t=0`; a non-still frame keeps content arriving rather than holding a full canvas from ~25%.\n- **Shot-sequence fidelity** — every Scene in the time-coded sequence is realized as a phase, the blueprint's signature move (unless `compose`) is present and recognizable, and the shot reveals to the voiceover (never front-loaded at `t=0`).\n- `font_family_without_font_face` — every font you name has a matching `@font-face` **inside this file**. **Only use fonts that ship as files** with the project: the families declared in `frame.md` (their `.woff2` live in `assets/fonts/` or `capture/assets/fonts/` — point the `@font-face` `src` at the real file you find there). **Never name a font that has no file**, including system CJK / Japanese / Devanagari families (`Hiragino Sans`, `Yu Gothic`, `Noto Sans CJK`, `Noto Sans Devanagari`, …): the render machine is a clean headless Chrome with none of them installed, so the text silently falls back to a generic font and the typography is wrong in the MP4. For non-Latin or multilingual visible text, either use a shipped font that covers the script, or romanize / transliterate it (e.g. `日本語` → `Japanese`); if neither is possible it is out of scope for this frame — do not invent a font name.\n- **Keep-out + no-narration-text** (eyeball, no code) — nothing sits below the 83% cutoff; no narration sentence is rendered as visible text.\n",
|
|
43
43
|
"hyperframes/references/intent-interview.md": "# The intent layer — one conversation, before any workflow runs\n\nFresh creation only — the SKILL.md state table already decides whether this layer runs at all (edits, project operations, briefed and resumable projects, and explicit Remotion ports never enter it). One conversation at the front door turns \"make me a video\" into a confirmed brief — the route, the must-have answers, the run's shape, and everything else in the user's head — handed to whichever workflow executes and made durable as `BRIEF.md`. Workflows own execution; this layer owns understanding. Every workflow's opening rule points back here, so the questions are asked once no matter which door the user came through.\n\nThe one exception: a follow-on to the same film (a new version or a cutdown) asked for inside an existing project runs this layer as `/hyperframes-studio` § 5 describes, without `hyperframes init` and without overwriting the project's brief.\n\nThese reads are mandatory when their condition matches; do not replace them with recollection:\n\n| Condition | Read before acting |\n| ----------------------------------------------------------- | -------------------------------------------------------------------- |\n| The route is picked, before confirming or interviewing | `routes/<workflow>.md` — the whole file (contract + interview, ~1KB) |\n| Triage judged the request unformed, before any concept work | `pitch-round.md` |\n| Offering optional capabilities or collecting supplied media | The route-filtered rows in `capability-menu.md` |\n| Question rules or field semantics beyond the schema below | `brief-contract.md` |\n\n## Adapt orthogonal inputs first\n\nA Figma source changes **how assets and design enter the project**, not which workflow owns the deliverable. If any input is a `figma.com` URL: complete this layer's memory and recipe reads; during input triage run `/figma` to extract assets, brand tokens, components, and storyboard frames when present; route the requested deliverable using the output from `/figma`, then continue only the selected route's unanswered questions. Do not drive Figma through raw MCP tools — that bypasses SVG sanitization, `.media/manifest.jsonl` provenance, and brand-token `var()` binding.\n\nA GitHub PR URL is not a website source. A named or adopted recipe already carries its workflow; confirm adoption below, then route to that workflow.\n\n## The eight steps\n\n**1 — Memory before questions.** Two reads, both mandatory, before anything is asked:\n\n- **Remembered defaults.** Let `<MEDIA_DIR>` be the installed `/media-use` skill directory. For an existing project, `<MEMORY_ROOT>` is its root. Before scaffolding, use a deliberately nonexistent probe path with no `.media`, such as `/tmp/hyperframes-intent-memory-<run-id>`; never use the current workspace. Run `node <MEDIA_DIR>/scripts/prefs.mjs get --hyperframes <MEMORY_ROOT> --json`. Make each remembered value the recommended option and name its source. The pre-project probe sees only the personal tier; do not claim project provenance.\n- **Recipes.** Run `node <MEDIA_DIR>/scripts/recipe.mjs list --hyperframes <MEMORY_ROOT> --json`. If the user names a recipe, says \"like last time,\" or a recipe matches the probable route, ask whether to adopt it before other brief questions — and make the offer earn the yes: say why it matches and what adopting saves (\"this matches your launch-promo recipe — adopting fills destination, aspect, language, and the design spec; you'd confirm the message and the two run-shape questions\"). When several match, list them and include \"none.\" An adopted recipe locks the fields it contains; ask only its missing fields and the run-shape questions. It does not remove review or render approval gates.\n\n**2 — Triage the input.** What is the video about — a website (sold or shown), a PR, a topic, a music track, existing footage? And is the request **formed** — the message, the material, and the occasion readable from what the user gave — or **unformed**, a subject with no take on it? Source material doesn't settle this by itself: a site, document, or PR carries its own thesis, but five tellings of that thesis are five different videos — a request whose only shape comes from its source (\"make a video about this URL\") is formed about the facts and unformed about the telling, and enters the round to pitch the telling. A formed request runs the layer exactly as it always has; nothing below is added for it. An unformed one goes through the pitch round after routing (step 4) and earns one question here, before anything is generated: what is the user already picturing? Their answer seeds the round (`pitch-round.md`). A user who says they don't know video at all gets that reference's decision map instead of a question sequence. For a genuinely exploratory request (\"we need a video but I'm not sure what kind\"), don't interrogate — establish the subject and what exists to show, one question at a time, then close by **recommending** a route plus how the run will review: a plan in chat first, with optional wireframe sketches on a `storyboard.html` sheet before the full build (`review-loop.md`). The user hears the process before any workflow starts.\n\n**3 — Pick the route** (the route table and ambiguity rules in the SKILL.md), then read `routes/<workflow>.md`. Its Interview section lists the must-have questions to ask now, the **deferred asks** to announce, whether the two run-shape questions apply, and which fields the pitch round may answer.\n\n**4 — The pitch round** — unformed requests only; formed requests and recipe adoptions go straight to the must-haves. Sample five concepts along five genuinely different paths, at least two from the distribution's tail, and present them all before recommending one — pick, mix, and redirect are all answers. Each pitch names the capability or two it rides, in the plain language of `capability-menu.md` — the toolbox experienced as concepts, not listed as a menu. On an autonomous run the same gate runs internally, and the heads-up names the direction chosen and the typical one left behind. The procedure — the sampling gate, the presentation discipline, and the decision map for users new to video — is `pitch-round.md`. The chosen concept answers the route's pitch-eligible fields and lands in `BRIEF.md` under `## Intent`; the capabilities it named are confirmed with it, under `## Customizations`.\n\n**5 — The route's must-haves.** One question per field, recommended option first with its receipt (rules: `brief-contract.md` § 3). Skip a question only when the request already answered it — inference is not an answer, but a chosen pitch is: fields the pitch round settled are locked with the pitch as their receipt. Then announce the route's deferred asks in one line (\"after I probe the clip, I'll offer 2–3 caption identities\") so the user hears the run's full shape before it starts.\n\n**6 — The two run-shape questions** — where the route's entry applies them, asked after the must-haves, each on its own:\n\n- **(a) Storyboard?** Review the plan in chat, wireframe sketches on a `storyboard.html` sheet, and the finished piece pass by pass (`review-loop.md`) — recommended for anything beyond a couple of scenes — or skip the review and get one finished video from the confirmed brief.\n- **(b) Automation or companion?** **Automation** — the matched workflow's pipeline executes the brief end to end. **Companion** — build it together in `/general-video` with every HyperFrames capability on the table; the route's answers still describe the video, general-video executes them.\n\nThese two are **orthogonal — never merge them into one menu.** All four `flow` × `storyboard` combinations are valid user choices (a companion run runs the same review passes when `storyboard: yes`); a flattened three-option list (\"storyboard review / one shot / companion\") silently makes companion-with-storyboard unselectable. When a diagram or source material summarizes the outcomes as three branches, that is the derived behavior (`brief-contract.md` § 1), not the question shape. In a form-style question UI, keep (a) and (b) as two separate selects.\n\nSignals replace questions, never add them: an ongoing \"just build it\" / \"surprise me\" / \"don't ask\" locks `flow: automation, storyboard: no`, and every unanswered field becomes a decision with a receipt in the heads-up. A storyboard request, however phrased, locks `storyboard: yes`. Remembered `flow` / `storyboard` values reorder the recommendations — they never make either question disappear. The run's collaborative/autonomous execution mode derives from these two answers — the old first question is never asked; the canonical mapping is `brief-contract.md` § 1.\n\n**7 — Nice-to-have: recommend, then show.** Skip this step when the selected route file says to skip the front-door capability offer. Otherwise, once the must-haves are locked, send one offer, not an interrogation — recommendations first, catalog on request. Capabilities the chosen pitch already named are settled with the concept — this step recommends from what the pitch didn't cover, and after a pitch round it is often just the two open asks and the design ask:\n\n- **One or two rows** of `capability-menu.md` that this brief specifically calls for, each traced to something in the confirmed concept — a key number wants the count-up treatment, product shots want staging and a grade, a music bed means cuts on its grid. A suggestion that would fit any video fails that test; drop it. At most one may be a labeled **challenger**: higher ceiling, named cost (\"the standard cut carries it; shader transitions would lift the close, at render-time cost\").\n- **Material answered on arrival.** When the user hands over a logo, a clip, or data, answer with its concrete use (\"the logo could close the video as a sting — want that?\") rather than silently filing it.\n- **The two open asks stay:** anything here you want, and is there any material of your own (images, clips, logos, data) the video should carry?\n- **The design spec keeps its own three-state ask** — use an existing spec, pick a shipped preset by eye, or leave the decision to the workflow (`capability-menu.md` § The design ask).\n\nThe full route-filtered slice appears only when the user asks what else is possible. An accepted recommendation is a confirmed answer: when it lands on a preference-backed field (a preset, a voice, a caption identity), it records like any other confirmation, and `/media-use`'s promotion rules make it the next run's recommended default. Capture answers verbatim in `BRIEF.md` under `## Assets`, `## Customizations`, or `## Notes`. One round; silence or \"no\" moves on.\n\n**8 — Hand off.** Three disciplines close the conversation (invariants: `brief-contract.md` § 3):\n\n- **One integration check.** Read the combined answers for a consequence no single answer showed — vertical at 90 seconds with a chart-dense concept means charts a phone can't read — and surface it with a proposed adjustment now, not at the sketch pass.\n- **Stated and inferred, apart.** Present the locked brief as one summary — deferred asks and the run's shape included — with what the user answered and what was inferred or defaulted as two visibly separate groups, receipts on both. The inferred group is where corrections live; an autonomous heads-up is mostly that group.\n- **Revision is not confirmation.** When the user corrects the summary, fold the change in and present it again; never execute an edited-but-unconfirmed brief.\n\nThen enter the workflow (`flow: companion` → `/general-video`; otherwise the matched route), installing it first per the SKILL.md's install step. The workflow's Setup writes `BRIEF.md` from this summary as its **first action after `hyperframes init`** (never before — `init` refuses a non-empty directory), using the canonical frontmatter below and preserving the user's important wording in the body — the chosen pitch, when there is one, under `## Intent`. It then records the preference-backed fields (`brief-format.md` names the subset), and asks no brief question again.\n\n## BRIEF.md frontmatter — the carry-away artifact\n\nThe interview's deliverable. Every later \"what did the route require?\" re-reads this ~1KB file, never this document. One key per confirmed field, canonical normalized values (full shape and body sections: `brief-format.md`):\n\n| Key | Meaning | Example |\n| ------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | --------------------------- |\n| `workflow` | the executing workflow (companion runs record `general-video`) | `faceless-explainer` |\n| `flow` | `automation` — the matched workflow's pipeline · `companion` — co-creation in `/general-video` | `automation` |\n| `storyboard` | `yes` — plan and sketches reviewed before the build · `no` — one shot from the confirmed brief | `yes` |\n| `message` | the ONE thing the video must communicate | `\"Ship it in an afternoon\"` |\n| `destination` / `aspect` / `language` / `audience` / `length` / `angle` … | the registry fields this route confirmed | — |\n",
|
|
44
44
|
"hyperframes/references/pitch-round.md": "# Pitch round — the intent layer's divergent step\n\nEverything else in the intent layer converges: recommended options, receipts, one question per field. This step diverges. An unformed request has nothing to converge on — \"make us a video about the launch\" answers no creative field, and asking `message` as a form question hands the user the very blank they came to have filled. So before the form, pitch: five concepts, sampled wide, offered once.\n\n## When it runs\n\nTriage (`/hyperframes` → `references/intent-interview.md`, step 2) marks the request formed or unformed; only unformed requests enter the round, and only on routes whose `routes/<workflow>.md` entry names pitch-eligible fields. A recipe adoption skips the round — the bundle already carries an approved concept. An autonomous signal never skips it; it moves the round inside (§ The gate, alone).\n\nBefore generating anything, ask what the user is already picturing. An existing idea seeds the round as a pitch of its own and is never displaced by generated ones; a fully formed picture ends the round before it starts — that picture is the concept, and the layer returns to its questions.\n\n## The sampling gate — internal, always\n\nRun this before writing any pitch, in every mode. None of it is shown to the user.\n\nFirst, four questions about this brief, answered specifically, not generically:\n\n1. **What does the subject look like?** Its own visual world — an island-travel piece has whitewashed walls and caldera cliffs; an outage postmortem has terminal green and a scarred timeline. The subject's vocabulary drives the layouts.\n2. **What does the target emotion look like as a frame?** Longing is empty space the viewer wants to fill; urgency is compression; awe is one element too large for the canvas.\n3. **What does the playback surface demand?** A lobby screen is ambient and glanced at; a feed fights for its first second; a story is vertical and fast.\n4. **What does every other video on this subject look like?** That is the anti-pattern. The tail pitches must not be it.\n\nThen five concepts, one from each path: the subject's world · the emotion · the audience (meet their expectation, or break it) · the anti-pattern, inverted · an unusual format (a letter, a countdown, a recipe, a front page, a map). Estimate for each the probability that a model handed this brief would produce it. The numbers are directional, not calibrated, and they exist to enforce one constraint: **at least two of the five must sit below 0.10.** If all five clear 0.10, every pitch is the median — start over. Then check silhouettes: sketch each concept's major elements as rough bounding boxes; two concepts with the same silhouette are one concept, so replace one.\n\nProbabilities never reach the user. They are a sampling constraint, not a scorecard.\n\n## Presenting the round\n\nEach pitch is three lines: the concept in one sentence, its visual world, its opening hook. The visual-world line carries the machinery: name the one or two capabilities the concept rides, in the plain language of `capability-menu.md`'s middle column — \"the launch number counts up on the track's beat grid,\" never a feature name. This is how the toolbox reaches the user: experienced inside a concept they can want, not listed in a menu they can't evaluate. Machinery earns its mention the way a recommendation earns its place — a capability that would fit all five pitches is decoration; name it only where this concept leans on it.\n\nAll five appear before any recommendation — a recommendation stated first anchors everything after it. Then recommend one, with a reason. Mixing is a first-class answer (\"the framing of the second with the opening of the fourth\"); silence or \"you decide\" accepts the recommendation. One round: the pitches are an offer, not a quiz, and there is no second batch unless the user asks for one.\n\nThe chosen concept **is** the brief's creative core: it answers the route's pitch-eligible fields (typically `message` and `angle`), those questions are skipped downstream with the pitch as their receipt, and the concept lands in `BRIEF.md` under `## Intent` in the wording the user accepted. The capabilities the pitch named are confirmed with it — they land under `## Customizations` and are not re-offered later as if they were new.\n\n## The gate, alone — autonomous runs\n\n\"Just build it\" changes the audience, not the discipline. Walk the same gate — four questions, five concepts, tail constraint, silhouette check — pick the winner, and keep building. The heads-up then treats the pick like every other receipt-backed decision: name the direction chosen and why, the machinery it rides, and the most typical direction deliberately left behind. An autonomous run is where the median is most dangerous — no one is present to say \"this looks like every other video,\" so the gate has to say it.\n\n## The decision map — \"I don't know anything about video\"\n\nA user who says they can't judge any of this gets neither pitches nor a question sequence. Give them a map of the two or three decision surfaces where their input genuinely changes the outcome — where it will play, how long it should run, what it should feel like — each with two to four plain-language options and a marked default. They choose only where they can tell the difference; every untouched surface keeps its default with a receipt. Then run the gate autonomous-style and present the winning concept inside the brief summary, where accepting the summary accepts the concept.\n",
|
|
45
45
|
"hyperframes/references/plugin-installation.md": "# Running from an installed plugin\n\nCheck the directory two levels above the loaded `SKILL.md` for `plugin.json`,\n`.claude-plugin/plugin.json`, `.codex-plugin/plugin.json`, or\n`.cursor-plugin/plugin.json` identifying `hyperframes`, or a Gemini extension manifest.\nThat directory is `<PLUGIN_ROOT>`. If none exists, this is a standalone skill;\nfollow the normal installation and freshness instructions.\n\nFor a plugin installation, these rules replace the standalone update commands\nin every workflow and reference:\n\n- Do not run `hyperframes skills update`, `skills check`, or `npx skills add`.\n The agent's plugin manager owns installation and updates. Read the workflow at\n `<PLUGIN_ROOT>/skills/<name>/SKILL.md`; report a missing bundled skill instead\n of downloading a different release. Resolve all skill references inside this\n bundle, even if a standalone copy is also installed. Claude exposes the router\n as `/hyperframes:hyperframes`; other clients may expose `/hyperframes`.\n- Replace `npx hyperframes` (or bare `hyperframes`) in command examples with:\n\n ```bash\n node \"<PLUGIN_ROOT>/skills/hyperframes/scripts/plugin-cli.mjs\" <command> <args...>\n ```\n\n Run in the user's project directory, never in the plugin directory. The launcher\n selects the manifest's CLI version and disables automatic standalone skill\n installation, including during `init`. The first call may download that exact\n CLI version through npm. A download failure is an error, not permission to use\n latest. Existing project dependency files and lockfiles must not be overwritten\n to match the plugin; surface a runtime incompatibility before changing them.\n\n- For bundled Node helpers, use the same\n launcher with `--script <absolute-script-path> <args...>`. This passes the\n release version to their dependency loader. External providers, registry\n downloads, and existing project dependencies have their own versions; a plugin\n version alone does not freeze those inputs.\n- Treat the plugin directory as read-only. Put outputs and temporary work in the\n project or a temporary directory. Pass this plugin root and launcher convention\n to any delegated workflow so it does not fall back to global skills.\n\nTo get newer skills, use the client's plugin update flow and reload the session.\nDo not silently update an installed plugin during a video task.\n\nThe launcher suppresses CLI update notices as well as standalone skill refreshes, including when running an older CLI with a stale notice cache. It passes the release as `HYPERFRAMES_PLUGIN_VERSION` for plugin-aware helpers and as `HYPERFRAMES_SKILL_PKG_VERSION` for the existing helper-package bootstrap. Our release process versions those packages together.\n",
|
|
@@ -65,7 +65,7 @@ export const HYPERFRAMES_FILES = {
|
|
|
65
65
|
"hyperframes-animation/adapters/animate-text.md": "# Text Effects — Reference\n\nFor deterministic text-animation specs (e.g., `typewriter` at exact `240ms / 46ms stagger / steps(1, end) easing`), this skill defers to the separate **`animate-text`** skill maintained by Pixel Point at [github.com/pixel-point/animate-text](https://github.com/pixel-point/animate-text). It provides a catalog of 24 named text effects with portable contracts and per-library implementation recipes (GSAP, Anime.js, WAAPI).\n\n**We do NOT ship the catalog inside this repo.** Pixel Point's `animate-text` is the source of truth; vendoring its files here would violate the upstream's licensing (no explicit license declared upstream as of this writing). Loading the skill separately keeps the legal picture clean while giving you the same catalog.\n\n## How to use it\n\nWhen a beat needs a deterministic text animation, load the upstream skill alongside this one:\n\n```bash\n# In your project root, install the upstream skill into .agents/skills/\nnpx skills add pixel-point/animate-text\n```\n\nOr in a skill-aware agent runtime, the skill is invoked by name:\n\n```\n/animate-text\n```\n\nOnce installed, the specs live at:\n\n```\n.agents/skills/animate-text/assets/effects/<id>.json # per-library implementation recipe\n.agents/skills/animate-text/assets/specs/<id>.json # portable motion contract\n```\n\nSub-agents reading those files get exact GSAP timings, easing strings, DOM split rules, and stagger algorithms — no creative invention needed.\n\n## When you don't need the upstream skill\n\nIf a beat's text animation is simple enough to describe in prose (\"headline fades up word-by-word, 80ms stagger\"), implement it inline using the GSAP knowledge already in these skills (`hyperframes-creative` → `references/motion-principles.md` and `references/beat-direction.md`; `hyperframes-animation` → `techniques.md`, entry #4 \"Per-Word Kinetic Typography\"). The upstream catalog is most valuable when:\n\n- You want a specific NAMED effect across multiple beats (so they feel like one design system, not one-offs)\n- You're choosing between several similar effects (typewriter vs per-character-rise vs bottom-up-letters) and want to see all 24 in one place\n- You need layout-aware effects (`kinetic-center-build`, `short-slide-right`, `short-slide-down`) where parameters alone aren't enough — those ship with custom layout algorithms\n\n## Effect names — vocabulary (do NOT use this as the implementation source)\n\nFor convenience while writing storyboards: the upstream skill provides 24 effects. Their IDs are listed here so you can name them in `STORYBOARD.md` even before loading the upstream skill. **The implementation specs are in the upstream skill, not here.**\n\n- **Per-character (7):** soft-blur-in, per-character-rise, typewriter, bottom-up-letters, top-down-letters, stagger-from-center, stagger-from-edges\n- **Per-word (8):** per-word-crossfade, spring-scale-in, shared-axis-y, blur-out-up, kinetic-center-build, short-slide-right, short-slide-down, depth-parallax-words\n- **Per-line (2):** mask-reveal-up, line-by-line-slide\n- **Whole element (7):** micro-scale-fade, shimmer-sweep, fade-through, shared-axis-z, scale-down-fade, focus-blur-resolve, shared-axis-x\n\nFor descriptions, durations, easing curves, and the per-library recipes: load `/animate-text` and read its own catalog page.\n\n## In the storyboard\n\nEvery text element in every beat can name an effect by ID, e.g.:\n\n```markdown\n**Text Animations:**\n\n- Main headline: `kinetic-center-build`\n- Eyebrow label: `soft-blur-in`\n- Body copy 3 lines: `mask-reveal-up`\n```\n\nSub-agents implementing the beat will load `/animate-text` if it's not already loaded, then read the spec for each named effect from the upstream skill's files.\n\nIf the upstream skill isn't available (offline build, network restrictions, agent runtime that doesn't support skill loading), sub-agents fall back to implementing the effect from the description alone — using GSAP knowledge plus the effect ID as a description of intent (e.g., \"typewriter\" = per-character stepped reveal with no interpolation).\n",
|
|
66
66
|
"hyperframes-animation/adapters/animejs.md": "---\nname: hyperframes-animejs\ndescription: Anime.js adapter patterns for HyperFrames. Use when writing Anime.js animations or timelines inside HyperFrames compositions, registering animations on window.__hfAnime, making Anime.js seek-driven and deterministic, or translating Anime.js examples into render-safe HyperFrames HTML.\n---\n\n# Anime.js for HyperFrames\n\nHyperFrames can seek Anime.js instances through its `animejs` runtime adapter. The composition owns the animation objects; HyperFrames owns the clock.\n\n**This page targets v4 (examples pinned to 4.5.0, MIT).** v4 is a hard break from v3 — there is no callable `anime()`, `easing:` is now `ease:`, and ease names lost their `ease` prefix. Writing v3 from memory produces a composition that throws or silently animates nothing.\n\nThe repo's own producer fixtures pin `animejs@4.0.2/lib/anime.iife.min.js`, which still resolves — but that build predates `splitText` / `scrambleText` / `createSeededRandom` / `createLayout` used below, and 4.1+ moved the bundles to `dist/bundles/`, so a version bump needs the path changed too.\n\n## Contract\n\n- Create animations or timelines synchronously during composition initialization.\n- Set `autoplay: false` so Anime.js does not advance on its own clock.\n- Register every returned animation or timeline on `window.__hfAnime` — **explicitly. There is no working auto-discovery on v4** (see Avoid).\n- Use finite durations and loop counts.\n- Avoid callbacks that mutate DOM based on wall-clock time, network state, or unseeded randomness.\n\nThe adapter seeks every registered instance with `instance.seek(timeMs)`, where `timeMs` is HyperFrames time **in milliseconds** (`ctx.time` seconds × 1000). It also calls `pause()` and `play()` on each instance; anything exposing those three methods works, whatever created it.\n\n## Loading v4\n\n```html\n<!-- UMD: the global `anime` is a NAMESPACE OBJECT, not a function -->\n<script src=\"https://cdn.jsdelivr.net/npm/animejs@4.5.0/dist/bundles/anime.umd.min.js\"></script>\n```\n\n`anime.animate(...)`, `anime.createTimeline(...)`, `anime.utils.*`, `anime.svg.*`, `anime.stagger(...)`. **Calling `anime(...)` is a TypeError** — every v4 build (UMD and IIFE alike) assigns a namespace object to the global, so v3's `anime({ targets })` form cannot work no matter which v4 file you load.\n\n## Basic Pattern\n\n```html\n<script>\n const anim = anime.animate(\".mark\", {\n x: 280, // v4 shorthand for translateX\n rotate: \"1turn\",\n opacity: [0, 1],\n duration: 1200,\n ease: \"outExpo\", // NOT easing: \"easeOutExpo\"\n autoplay: false,\n });\n\n window.__hfAnime = window.__hfAnime || [];\n window.__hfAnime.push(anim);\n</script>\n```\n\n## Timeline Pattern\n\n`createTimeline` replaces `anime.timeline`, and `add()` takes **targets as its first argument** — `add(targets, parameters, position)`:\n\n```html\n<script>\n const tl = anime.createTimeline({\n autoplay: false,\n defaults: { ease: \"outCubic\" }, // per-timeline defaults, not a bare `easing`\n });\n\n tl.add(\".title\", { y: [40, 0], opacity: [0, 1], duration: 650 });\n tl.add(\".accent\", { scaleX: [0, 1], duration: 450 }, 250); // 250 = time position\n\n window.__hfAnime = window.__hfAnime || [];\n window.__hfAnime.push(tl);\n</script>\n```\n\nPosition accepts a number, a label, `\"+=250\"` / `\"-=100\"`, `\"<\"` (previous **end**) and `\"<<\"` (previous **start**).\n\n## Module Builds\n\nThe adapter does not care how the instance was created — only that it exposes `seek()`, `pause()`, and `play()`:\n\n```html\n<script type=\"module\">\n import { animate } from \"https://cdn.jsdelivr.net/npm/animejs@4.5.0/+esm\";\n\n const anim = animate(\".chip\", { x: \"18rem\", duration: 900, autoplay: false });\n\n window.__hfAnime = window.__hfAnime || [];\n window.__hfAnime.push(anim);\n</script>\n```\n\n## Determinism\n\nv4 ships `createSeededRandom(seed)` — use it instead of `Math.random()` when a composition needs scatter/jitter, so the same frame renders the same on every pass:\n\n```js\nconst rnd = anime.createSeededRandom(1337);\nanime.animate(\".dot\", { y: () => -40 * rnd(), duration: 800, autoplay: false });\n```\n\n`anime.utils.random()` / `randomPick()` / `shuffle()` are **not** seeded — they break frame-to-frame reproducibility.\n\n## Good Uses\n\n- Small SVG and DOM flourishes where Anime.js syntax is compact.\n- Free `splitText` / `scrambleText` (Motion puts these behind Motion+; GSAP SplitText is the other free option).\n- `svg.createDrawable` / `svg.morphTo` / `svg.createMotionPath` line-draw and path work.\n- Multiple independent micro-animations pushed into the same registry.\n\nUse GSAP for complex scene sequencing unless the user specifically asks for Anime.js. GSAP is still the primary HyperFrames authoring path.\n\n## Avoid\n\n- Leaving `autoplay` at the Anime.js default.\n- **Relying on the adapter's `anime.running` auto-discovery — it cannot work on v4.** `running` is not among v4.5.0's exports (verified against the published bundle), so `discover()` returns immediately and any instance you did not `push()` is never seeked. Explicit registration is mandatory, not a nicety.\n- `autoplay: onScroll(...)` — there is no scroll in a headless seek render, so the animation would never advance. Drive it off composition time instead.\n- `waapi.animate()` for anything the adapter must seek — the adapter seeks via `.seek()`, and whether WAAPI-backed instances honor it is **unverified**. Use the JS engine (`animate`) for rendered compositions; `waapi` is an off-main-thread optimization for live pages.\n- `createDraggable`, and any pointer-driven `createAnimatable` loop — input does not exist at render time.\n- Infinite loops. Compute a finite repeat count from the composition duration (v4 `loop` counts **repeats**: `loop: 1` plays twice).\n- Building animations in timers, promises, event handlers, or after async asset loads.\n\n## Validation\n\nAfter editing a composition that uses Anime.js:\n\n```bash\nnpx hyperframes lint\nnpx hyperframes validate\n```\n\n## Credits And References\n\n- HyperFrames adapter source: `packages/core/src/runtime/adapters/animejs.ts`.\n- Anime.js v4 docs: https://animejs.com/documentation/\n- v3 → v4 migration (not on animejs.com): https://github.com/juliangarnier/anime/wiki/Migrating-from-v3-to-v4\n",
|
|
67
67
|
"hyperframes-animation/adapters/css-animations.md": "---\nname: hyperframes-css-animations\ndescription: CSS animation adapter patterns for HyperFrames. Use when authoring CSS keyframes, animation-delay based timing, animation-fill-mode, animation-play-state, or CSS-only motion that HyperFrames must seek deterministically during preview and rendering.\n---\n\n# CSS Animations for HyperFrames\n\nHyperFrames can seek CSS keyframe animations through its `css` runtime adapter. Use this for simple repeated motifs, background motion, shimmer, glow, masks, and non-sequenced decoration.\n\nFor scene choreography, GSAP is usually clearer. CSS animations work best when the motion belongs to one element and has a fixed duration.\n\n## Contract\n\n- Put the animated element in the DOM before runtime initialization finishes.\n- Give timed elements a `data-start` value so local animation time matches the clip.\n- Use finite `animation-duration` and `animation-iteration-count` because the negative-delay fallback cannot represent unbounded duration in environments without WAAPI-backed CSS animations.\n- Prefer `animation-fill-mode: both` so seeked states hold before and after active motion.\n- Avoid wall-clock JavaScript, hover-triggered state, and class toggles that depend on user events.\n\nThe adapter discovers elements with computed `animation-name`, seeks their browser `Animation` handles when available, and falls back to pausing with negative `animation-delay`.\n\n## Basic Pattern\n\n```html\n<div\n id=\"pulse-ring\"\n class=\"clip pulse-ring\"\n data-start=\"0\"\n data-duration=\"4\"\n data-track-index=\"2\"\n></div>\n\n<style>\n .pulse-ring {\n width: 280px;\n height: 280px;\n border: 4px solid rgba(255, 255, 255, 0.7);\n border-radius: 50%;\n animation-name: pulse-ring;\n animation-duration: 1200ms;\n animation-timing-function: cubic-bezier(0.2, 0, 0, 1);\n animation-iteration-count: 3;\n animation-fill-mode: both;\n }\n\n @keyframes pulse-ring {\n from {\n opacity: 0;\n transform: scale(0.82);\n }\n 35% {\n opacity: 1;\n }\n to {\n opacity: 0;\n transform: scale(1.18);\n }\n }\n</style>\n```\n\n## Stagger Pattern\n\nUse CSS custom properties to avoid duplicating keyframes:\n\n```html\n<div class=\"clip dots\" data-start=\"1\" data-duration=\"3\" data-track-index=\"3\">\n <span style=\"--i: 0\"></span>\n <span style=\"--i: 1\"></span>\n <span style=\"--i: 2\"></span>\n</div>\n\n<style>\n .dots span {\n display: inline-block;\n width: 18px;\n height: 18px;\n margin-right: 10px;\n border-radius: 50%;\n background: currentColor;\n animation: dot-pop 900ms ease-out both;\n animation-delay: calc(var(--i) * 120ms);\n }\n\n @keyframes dot-pop {\n from {\n opacity: 0;\n transform: translateY(18px) scale(0.75);\n }\n to {\n opacity: 1;\n transform: translateY(0) scale(1);\n }\n }\n</style>\n```\n\n## Good Uses\n\n- Decorative loops with a known repeat count.\n- Mask, glow, shimmer, grain, and subtle parallax layers.\n- Simple one-element entrances where a full JS timeline would be excessive.\n\n## Avoid\n\n- Infinite CSS animations unless you have verified the browser exposes seekable WAAPI-backed CSS animation handles. Prefer a finite iteration count covering the visible duration. If you do use `infinite`, add `data-duration` to the root element — see Composition Duration below.\n- Animating layout properties like `top`, `left`, `width`, or `height` when transforms work.\n- Relying on hover, focus, scroll, or media queries to trigger render-critical motion.\n- Changing animation classes after startup unless another deterministic timeline controls that change.\n\n## Composition Duration\n\nThe render engine needs to know the composition's total length. GSAP timelines report this automatically; CSS-only compositions have no timeline object, so the runtime infers duration from the longest running animation's computed end time (`animation-delay` + `animation-duration` × finite `animation-iteration-count`, per element with `data-start` added as an offset). `data-duration` on the root element is optional whenever every CSS animation on the page is finite — you don't need to add it just because the composition is CSS-driven.\n\n`animation-iteration-count: infinite` (or any unresolved/unbounded animation) has no finite end time, so it cannot be auto-inferred. If the composition's only animation is infinite, you **must** add `data-duration=\"<seconds>\"` to the root `[data-composition-id]` element with your intended total length — `npx hyperframes lint` errors on this case (`root_composition_missing_duration_source`) precisely because there is nothing for the runtime to infer.\n\n```html\n<div\n data-composition-id=\"root\"\n data-start=\"0\"\n data-duration=\"6\"\n data-width=\"1920\"\n data-height=\"1080\"\n>\n <div class=\"clip spinner\" data-start=\"0\" style=\"animation: spin 1s linear infinite\"></div>\n</div>\n```\n\n## Validation\n\nAfter editing CSS animation compositions:\n\n```bash\nnpx hyperframes lint\nnpx hyperframes check\n```\n\n## Credits And References\n\n- HyperFrames adapter source: `packages/core/src/runtime/adapters/css.ts`.\n- Duration auto-inference: `packages/core/src/runtime/init.ts` (`resolveAdapterDurationFloorSeconds`), `getInferredDurationSeconds` in the adapter above.\n- MDN CSS animation documentation: https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Properties/animation\n- MDN `animation-fill-mode`: https://developer.mozilla.org/en-US/docs/Web/CSS/animation-fill-mode\n",
|
|
68
|
-
"hyperframes-animation/adapters/gsap-easing-and-stagger.md": "# Easing, Stagger, and Function-Based Values\n\n## Easing\n\nBuilt-in eases: `power1`, `power2`, `power3`, `power4`, `back`, `bounce`, `circ`, `elastic`, `expo`, `sine`, `none`.\n\nEach has `.in`, `.out`, `.inOut` variants.\n\n| Ease | Use for |\n| ------------------------------------------ | ----------------------------------------------------------------------------------------------- |\n| `power1.out`, `power2.out` | Gentle motion for secondary elements (a caption fade, a small shift). NOT the entrance default. |\n| `power3.out` (house default), `power4.out` | The standard long-tail settle. Entrances, title cards, hero reveals. |\n| `sine.inOut` | Long, slow, calm motion. Crossfades, ambient drift. |\n| `back.out(1.7)` | Overshoot then settle. RARE — explicitly-playful register only, never a default. |\n| `elastic.out(1, 0.3)` | Springy bounce. Same playful-only rule; prefer a baked spring (see Spring Eases below). |\n| `expo.inOut` | Snappy, dramatic. Quick transitions between hero scenes. |\n| `none` (linear) | Camera moves with timed counterpoint, mechanical motion. |\n\nPick `.out` for entrances, `.in` for exits, `.inOut` for symmetric moves and continuous motion.\n\n**Smooth beats bouncy** — the motion doctrine (`rules/spring-pop-entrance.md`, the workflows' `motion-language.md`): entrances default to `power3.out` or the baked critically-damped spring (see Spring Eases below); overshoot eases (`back` / `elastic` / `bounce`) are a rare, explicitly-playful register, never the house style.\n\n## Easing Vocabulary (character & mood)\n\nEasings are tone of voice: a video that only whispers is boring; one that varies between whisper, normal, and punch is engaging. A composition should draw on ~3 easing characters across its beats — but vary **within the smooth families by energy** (`sine` / `power1` calm → `power3` standard → `power4` / `expo` punch); don't reach for overshoot to add variety. Overshoot is a _register_ (explicitly playful), not a spice. One ease everywhere reads flat; bounce everywhere reads cheap — the second failure is worse.\n\nThe full palette by character (each family has `.in`, `.out`, `.inOut` variants):\n\n| Family | Character | Typical use |\n| -------------------- | ---------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- |\n| `power1`–`power4` | Gentle (1) to aggressive (4) acceleration curves | General purpose. **power3 is the house workhorse**; power2 for gentle secondary motion, power4 for dramatic snaps |\n| `back(N)` | Overshoot then settle. N controls how far past the target (1=subtle, 4=wild) | RARE — explicitly-playful register only, never a default. Keep N ≤ 2; prefer a baked spring at ζ 0.6–0.7 (physical settle, see Spring Eases) |\n| `elastic(amp, freq)` | Spring bounce. amp=magnitude, freq=oscillation speed | RARE — same playful-only rule; the baked spring (below) is the physical version |\n| `bounce` | Ball-drop bouncing | RARE — physical-comedy register only (something literally dropping) |\n| `expo` | Extreme acceleration curve (much steeper than power4) | Premium/luxury reveals, dramatic entrances |\n| `sine` | Smooth, organic, no hard edges | Ambient float, breathing, Ken Burns, anything that loops. `.inOut` for yoyo motion |\n| `circ` | Circular acceleration (starts very fast, ends very gentle or vice versa) | Camera moves, scene transitions, orbital motion |\n| `steps(N)` | Discrete N-step jumps, no interpolation | Typing effects, cursor blink, counter ticks, retro/digital aesthetics |\n\n**Mood mapping:** Match easing character to the beat's emotional content. Smooth/organic easings (`sine`, `power1`) feel contemplative and drifting. Aggressive deceleration (`power4.out`, `expo.out`) feels snappy and confident. Spring overshoot (`back.out`) feels bouncy and physical — but bouncy is a register, not an emphasis tool; reach for it only on explicitly-playful beats. The storyboard's mood description should guide which character fits — not a formula.\n\n## Defaults\n\n```javascript\nconst tl = gsap.timeline({\n paused: true,\n defaults: { duration: 0.6, ease: \"power3.out\" }, // the house settle — smooth beats bouncy\n});\n```\n\nOr globally:\n\n```javascript\ngsap.defaults({ duration: 0.6, ease: \"power3.out\" });\n```\n\nSetting defaults at timeline scope is preferred — it documents the motion language of that composition in one place.\n\n## Spring Eases (baked physics, seek-safe)\n\nThe \"iOS feel\" is a **damped spring's velocity curve**, not a bounce: a fast launch into a long asymptotic settle. Well-made system animations are critically damped or close to it — they barely overshoot, or don't at all. `power3.out` / `expo.out` approximate that curve; when you want the exact one — or a _physical_ overshoot for the rare playful register — bake the spring's closed-form solution into a function ease.\n\nWhy not a real-time spring library: an interactive spring is a stateful integrator (velocity accumulates frame to frame), which cannot be seeked deterministically — you'd have to simulate frames 0…N−1 to render frame N. The closed form below is a **pure function of progress** — no state, nothing to desync, seek-safe by construction. This is also why interaction-lib spring solvers are banned in compositions.\n\n```javascript\n// springEase — a damped spring's exact position curve as a GSAP ease.\n// response ≈ seconds one oscillation would take (0.3–0.6 for entrances)\n// dampingFraction 1.0 = critically damped — smooth settle, NO overshoot (house default)\n// 0.80–0.85 ≈ the iOS system register — ~1–1.5% overshoot, felt not seen\n// 0.60–0.70 = explicitly playful — ~5–10% overshoot (rare; replaces back.out)\nfunction springEase({ response = 0.5, dampingFraction = 1 } = {}) {\n const w = (2 * Math.PI) / response; // undamped natural frequency\n const z = dampingFraction;\n let pos; // x(t): 0 → 1, starting at rest (v0 = 0)\n if (z < 1) {\n const wd = w * Math.sqrt(1 - z * z);\n pos = (t) => 1 - Math.exp(-z * w * t) * (Math.cos(wd * t) + ((z * w) / wd) * Math.sin(wd * t));\n } else if (z > 1) {\n const wo = w * Math.sqrt(z * z - 1);\n pos = (t) =>\n 1 - Math.exp(-z * w * t) * (Math.cosh(wo * t) + ((z * w) / wo) * Math.sinh(wo * t));\n } else {\n pos = (t) => 1 - Math.exp(-w * t) * (1 + w * t);\n }\n // Settle time: last moment the curve sits outside ±0.1% of target.\n // Fixed-step scan, runs once at setup — deterministic (no Math.random / Date.now).\n const EPS = 0.001;\n const rate = z <= 1 ? z * w : (z - Math.sqrt(z * z - 1)) * w; // slowest decay mode\n const SCAN = 12 / rate;\n const N = 4800;\n let T = SCAN;\n for (let i = N; i >= 0; i--) {\n const t = (i / N) * SCAN;\n if (Math.abs(1 - pos(t)) > EPS) {\n T = ((i + 1) / N) * SCAN;\n break;\n }\n }\n const xT = pos(T);\n return {\n duration: T, // use as the tween's duration — the settle time IS the physics\n ease: (p) => pos(p * T) + p * (1 - xT), // normalized so ease(1) === 1 exactly\n };\n}\n```\n\nUsage — take **both** the ease and the duration from the helper (the settle time is part of the physics; overriding the duration just re-times the same curve, so tune speed via `response` instead):\n\n```javascript\nconst settle = springEase({ response: 0.4 }); // critically damped → duration ≈ 0.59s\ntl.fromTo(\n \"#hero\",\n { scale: 0, opacity: 0 },\n { scale: 1, opacity: 1, duration: settle.duration, ease: settle.ease },\n 0.2,\n);\n```\n\n| dampingFraction | overshoot | register |\n| ----------------- | --------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- |\n| **1.0 (default)** | none (monotone) | The house settle — the exact curve `power3.out` approximates. Product / enterprise / serious tone. |\n| 0.80–0.85 | ~1–1.5% | \"Alive, not bouncy\" — the iOS system default register. The overshoot is felt, not seen. |\n| 0.60–0.70 | ~5–10% | Explicitly-playful ONLY (same rule as `back.out`, which this replaces — a spring's second-order settle reads physical where `back` reads cartoon). |\n| < 0.55 | > 12% | Don't. Cartoon-wobble territory. |\n\n| response | duration (ζ=1) | feel |\n| --------- | -------------- | ------------------------------------------------------------ |\n| 0.25–0.35 | 0.37–0.51s | tight snap — chips, small UI |\n| 0.35–0.50 | 0.51–0.74s | standard entrance |\n| 0.50–0.70 | 0.74–1.03s | weighted hero landing — check the `t ≤ 0.5s` visibility rule |\n\nCraft notes:\n\n- **ζ=1 vs `power3.out`**: the true spring front-loads harder (~67% vs ~58% travelled at quarter-time) and settles on a longer asymptotic tail; max shape difference ~11%. That long tail is the \"premium\" read — use it when the settle IS the shot (a wordmark landing, a final lockup).\n- **At ζ<1, overshooting curves go on transforms only** — never on `opacity` (it would push past 1) or color. Split opacity onto its own `power2.out` tween at the same timeline position.\n- **Doctrine unchanged**: ζ below ~0.8 is still the rare, explicitly-playful exception (`rules/spring-pop-entrance.md`). The default of this section is ζ=1 — real spring physics is not a license for bounce.\n\n## Stagger\n\n```javascript\ngsap.fromTo(\".item\", { y: 24, opacity: 0 }, { y: 0, opacity: 1, duration: 0.5, stagger: 0.08 });\n```\n\nObject form:\n\n```javascript\ngsap.fromTo(\n \".item\",\n { y: 24, opacity: 0 },\n {\n y: 0,\n opacity: 1,\n stagger: {\n each: 0.08, // delay between each\n from: \"center\", // \"start\" | \"end\" | \"center\" | \"edges\" | \"random\" | index\n amount: 0.6, // total stagger time (overrides each if both set)\n grid: \"auto\", // for 2D stagger\n axis: \"x\" | \"y\",\n },\n },\n);\n```\n\nPrefer `stagger` over N separate tweens with manual delays — it stays correct when the target count or order changes. Use `fromTo()` rather than `from()` so the start state is explicit (see `gsap-timeline-and-labels.md` → sub-composition entrances).\n\n## Function-Based Values\n\nAny var can be a function `(index, target, targets) => value`:\n\n```javascript\ngsap.to(\".item\", {\n x: (i, target, targets) => i * 50,\n rotation: (i) => (i % 2 === 0 ? 5 : -5),\n stagger: 0.1,\n});\n```\n\nUse this for per-element values that depend on index, attributes, or measured size. Cheaper and more idiomatic than building tweens in a loop.\n\n## gsap.matchMedia (preview only)\n\n`matchMedia` runs setup only when a media query matches and auto-reverts when it stops matching. It is useful for **preview** in the browser at different viewport sizes, and for `prefers-reduced-motion`. It is **not** a substitute for rendering at the composition's actual `data-width`/`data-height` — HyperFrames renders at a fixed viewport.\n\n```javascript\nlet mm = gsap.matchMedia();\nmm.add(\n {\n isDesktop: \"(min-width: 800px)\",\n reduceMotion: \"(prefers-reduced-motion: reduce)\",\n },\n (context) => {\n const { isDesktop, reduceMotion } = context.conditions;\n gsap.to(\".box\", {\n rotation: isDesktop ? 360 : 180,\n duration: reduceMotion ? 0 : 2,\n });\n },\n);\n```\n",
|
|
68
|
+
"hyperframes-animation/adapters/gsap-easing-and-stagger.md": "# Easing, Stagger, and Function-Based Values\n\n## Easing\n\nBuilt-in eases: `power1`, `power2`, `power3`, `power4`, `back`, `bounce`, `circ`, `elastic`, `expo`, `sine`, `none`.\n\nEach has `.in`, `.out`, `.inOut` variants.\n\n| Ease | Use for |\n| ------------------------------------------ | ----------------------------------------------------------------------------------------------- |\n| `power1.out`, `power2.out` | Gentle motion for secondary elements (a caption fade, a small shift). NOT the entrance default. |\n| `power3.out`, `power4.out` | Long-tail settle where nothing may overshoot: opacity, colour, readouts, a camera move's final approach. Exits: `power3.in`. |\n| `sine.inOut` | Long, slow, calm motion. Crossfades, ambient drift. |\n| `back.out(1.3)` | Overshoot then settle: the arrival default, near 1.2–1.4. Higher is a playful slam. |\n| `elastic.out(1, 0.3)` | Springy bounce. Playful slams only; for an arrival prefer a baked spring (see Spring Eases below). |\n| `expo.inOut` | Snappy, dramatic. Quick transitions between hero scenes. |\n| `none` (linear) | Camera moves with timed counterpoint, mechanical motion. |\n\nPick `.out` for entrances, `.in` for exits, `.inOut` for symmetric moves and continuous motion.\n\n**Arrivals overshoot and settle** — the motion doctrine (`rules/spring-pop-entrance.md`, the workflows' `motion-language.md`): an arriving element passes its mark and springs back, on `back.out` near 1.2–1.4 or the baked spring at ζ 0.7–0.85 (see Spring Eases below). Position and scale may overshoot; opacity and colour never (`power3.out`). Bounce sprayed on every element at once still reads cheap.\n\n## Easing Vocabulary (character & mood)\n\nEasings are tone of voice: a video that only whispers is boring; one that varies between whisper, normal, and punch is engaging. A composition should draw on ~3 easing characters across its beats — arrivals overshoot and settle, and the rest varies **by energy** (`sine` / `power1` calm → `power3` standard → `power4` / `expo` punch). One ease everywhere reads flat; bounce sprayed on every element at once reads cheap — the second failure is worse.\n\nThe full palette by character (each family has `.in`, `.out`, `.inOut` variants):\n\n| Family | Character | Typical use |\n| -------------------- | ---------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- |\n| `power1`–`power4` | Gentle (1) to aggressive (4) acceleration curves | General purpose. **power3 is the house workhorse**; power2 for gentle secondary motion, power4 for dramatic snaps |\n| `back(N)` | Overshoot then settle. N controls how far past the target (1=subtle, 4=wild) | Arrival default at N≈1.2–1.4; keep N ≤ 2 (a playful slam goes higher), or use a baked spring at ζ 0.7–0.85 (physical settle, see Spring Eases) |\n| `elastic(amp, freq)` | Spring bounce. amp=magnitude, freq=oscillation speed | RARE — playful slams only; the baked spring (below) is the physical version |\n| `bounce` | Ball-drop bouncing | RARE — physical-comedy register only (something literally dropping) |\n| `expo` | Extreme acceleration curve (much steeper than power4) | Premium/luxury reveals, dramatic entrances |\n| `sine` | Smooth, organic, no hard edges | Ambient float, breathing, Ken Burns, anything that loops. `.inOut` for yoyo motion |\n| `circ` | Circular acceleration (starts very fast, ends very gentle or vice versa) | Camera moves, scene transitions, orbital motion |\n| `steps(N)` | Discrete N-step jumps, no interpolation | Typing effects, cursor blink, counter ticks, retro/digital aesthetics |\n\n**Mood mapping:** Match easing character to the beat's emotional content. Smooth/organic easings (`sine`, `power1`) feel contemplative and drifting. Aggressive deceleration (`power4.out`, `expo.out`) feels snappy and confident. Spring overshoot (`back.out`) feels physical and premium on an arrival; sprayed on everything at once it reads cheap. The storyboard's mood description should guide which character fits — not a formula.\n\n## Defaults\n\n```javascript\nconst tl = gsap.timeline({\n paused: true,\n defaults: { duration: 0.6, ease: \"power3.out\" }, // the settle for opacity, colour and readouts; arrivals override it with a spring (Spring Eases)\n});\n```\n\nOr globally:\n\n```javascript\ngsap.defaults({ duration: 0.6, ease: \"power3.out\" });\n```\n\nSetting defaults at timeline scope is preferred — it documents the motion language of that composition in one place.\n\n## Spring Eases (baked physics, seek-safe)\n\nThe \"iOS feel\" is a **damped spring's velocity curve**, not a bounce: a fast launch into a long asymptotic settle. Well-made system animations are critically damped or close to it — they barely overshoot, or don't at all. `power3.out` / `expo.out` approximate that curve; when you want the exact one — or the _physical_ overshoot an arrival takes — bake the spring's closed-form solution into a function ease.\n\nWhy not a real-time spring library: an interactive spring is a stateful integrator (velocity accumulates frame to frame), which cannot be seeked deterministically — you'd have to simulate frames 0…N−1 to render frame N. The closed form below is a **pure function of progress** — no state, nothing to desync, seek-safe by construction. This is also why interaction-lib spring solvers are banned in compositions.\n\n```javascript\n// springEase — a damped spring's exact position curve as a GSAP ease.\n// response ≈ seconds one oscillation would take (0.3–0.6 for entrances)\n// dampingFraction 1.0 = critically damped — smooth settle, NO overshoot (opacity, colour, readouts)\n// 0.70–0.85 = Slates' arrival default — ~1–5% overshoot, then springs back\n// 0.60–0.69 = playful slam — ~5–10% overshoot (replaces back.out)\nfunction springEase({ response = 0.5, dampingFraction = 1 } = {}) {\n const w = (2 * Math.PI) / response; // undamped natural frequency\n const z = dampingFraction;\n let pos; // x(t): 0 → 1, starting at rest (v0 = 0)\n if (z < 1) {\n const wd = w * Math.sqrt(1 - z * z);\n pos = (t) => 1 - Math.exp(-z * w * t) * (Math.cos(wd * t) + ((z * w) / wd) * Math.sin(wd * t));\n } else if (z > 1) {\n const wo = w * Math.sqrt(z * z - 1);\n pos = (t) =>\n 1 - Math.exp(-z * w * t) * (Math.cosh(wo * t) + ((z * w) / wo) * Math.sinh(wo * t));\n } else {\n pos = (t) => 1 - Math.exp(-w * t) * (1 + w * t);\n }\n // Settle time: last moment the curve sits outside ±0.1% of target.\n // Fixed-step scan, runs once at setup — deterministic (no Math.random / Date.now).\n const EPS = 0.001;\n const rate = z <= 1 ? z * w : (z - Math.sqrt(z * z - 1)) * w; // slowest decay mode\n const SCAN = 12 / rate;\n const N = 4800;\n let T = SCAN;\n for (let i = N; i >= 0; i--) {\n const t = (i / N) * SCAN;\n if (Math.abs(1 - pos(t)) > EPS) {\n T = ((i + 1) / N) * SCAN;\n break;\n }\n }\n const xT = pos(T);\n return {\n duration: T, // use as the tween's duration — the settle time IS the physics\n ease: (p) => pos(p * T) + p * (1 - xT), // normalized so ease(1) === 1 exactly\n };\n}\n```\n\nUsage — take **both** the ease and the duration from the helper (the settle time is part of the physics; overriding the duration just re-times the same curve, so tune speed via `response` instead):\n\n```javascript\nconst settle = springEase({ response: 0.4, dampingFraction: 0.8 }); // passes its mark by ~1.5%, then settles\ntl.fromTo(\"#hero\", { scale: 0 }, { scale: 1, duration: settle.duration, ease: settle.ease }, 0.2);\ntl.fromTo(\"#hero\", { opacity: 0 }, { opacity: 1, duration: 0.25, ease: \"power2.out\" }, 0.2); // opacity never overshoots\n```\n\n| dampingFraction | overshoot | register |\n| ----------------- | --------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- |\n| **1.0** | none (monotone) | The no-overshoot settle — the exact curve `power3.out` approximates: opacity, colour, readouts. |\n| 0.70–0.85 | ~1–5% | Slates' arrival default: the element passes its mark and springs back, a premium read. |\n| 0.60–0.69 | ~5–10% | Playful slam (a logo hit, a sticker): a spring's second-order settle reads physical where `back` reads cartoon. |\n| < 0.55 | > 12% | Don't. Cartoon-wobble territory. |\n\n| response | duration (ζ=1) | feel |\n| --------- | -------------- | ------------------------------------------------------------ |\n| 0.25–0.35 | 0.37–0.51s | tight snap — chips, small UI |\n| 0.35–0.50 | 0.51–0.74s | standard entrance |\n| 0.50–0.70 | 0.74–1.03s | weighted hero landing — check the `t ≤ 0.5s` visibility rule |\n\nCraft notes:\n\n- **ζ=1 vs `power3.out`**: the true spring front-loads harder (~67% vs ~58% travelled at quarter-time) and settles on a longer asymptotic tail; max shape difference ~11%. That long tail is the \"premium\" read — use it when the settle IS the shot (a wordmark landing, a final lockup).\n- **At ζ<1, overshooting curves go on transforms only** — never on `opacity` (it would push past 1) or color. Split opacity onto its own `power2.out` tween at the same timeline position.\n- **Doctrine**: arrivals take ζ 0.7–0.85; ζ=1 is for what must not overshoot. Real spring physics is not a license to bounce everything at once.\n\n## Stagger\n\n```javascript\ngsap.fromTo(\".item\", { y: 24, opacity: 0 }, { y: 0, opacity: 1, duration: 0.5, stagger: 0.08 });\n```\n\nObject form:\n\n```javascript\ngsap.fromTo(\n \".item\",\n { y: 24, opacity: 0 },\n {\n y: 0,\n opacity: 1,\n stagger: {\n each: 0.08, // delay between each\n from: \"center\", // \"start\" | \"end\" | \"center\" | \"edges\" | \"random\" | index\n amount: 0.6, // total stagger time (overrides each if both set)\n grid: \"auto\", // for 2D stagger\n axis: \"x\" | \"y\",\n },\n },\n);\n```\n\nPrefer `stagger` over N separate tweens with manual delays — it stays correct when the target count or order changes. Use `fromTo()` rather than `from()` so the start state is explicit (see `gsap-timeline-and-labels.md` → sub-composition entrances).\n\n## Function-Based Values\n\nAny var can be a function `(index, target, targets) => value`:\n\n```javascript\ngsap.to(\".item\", {\n x: (i, target, targets) => i * 50,\n rotation: (i) => (i % 2 === 0 ? 5 : -5),\n stagger: 0.1,\n});\n```\n\nUse this for per-element values that depend on index, attributes, or measured size. Cheaper and more idiomatic than building tweens in a loop.\n\n## gsap.matchMedia (preview only)\n\n`matchMedia` runs setup only when a media query matches and auto-reverts when it stops matching. It is useful for **preview** in the browser at different viewport sizes, and for `prefers-reduced-motion`. It is **not** a substitute for rendering at the composition's actual `data-width`/`data-height` — HyperFrames renders at a fixed viewport.\n\n```javascript\nlet mm = gsap.matchMedia();\nmm.add(\n {\n isDesktop: \"(min-width: 800px)\",\n reduceMotion: \"(prefers-reduced-motion: reduce)\",\n },\n (context) => {\n const { isDesktop, reduceMotion } = context.conditions;\n gsap.to(\".box\", {\n rotation: isDesktop ? 360 : 180,\n duration: reduceMotion ? 0 : 2,\n });\n },\n);\n```\n",
|
|
69
69
|
"hyperframes-animation/adapters/gsap-timeline-and-labels.md": "# Timelines and Labels\n\nHyperFrames is a seek-driven runtime. Build one paused timeline per composition, attach it to `window.__timelines[\"<composition-id>\"]`, and let HyperFrames seek it. Never call `.play()` for render-critical motion.\n\n## Creating a Timeline\n\n```javascript\nconst tl = gsap.timeline({\n paused: true,\n defaults: { duration: 0.5, ease: \"power3.out\" },\n});\n\ntl.to(\".a\", { x: 100 }).to(\".b\", { y: 50 }).to(\".c\", { opacity: 0 });\n```\n\nTimeline options:\n\n- **paused: true** — required in HyperFrames. The framework drives the playhead.\n- **repeat**, **yoyo** — apply to the whole timeline. `repeat: -1` requires a finite root `data-duration` (export clips to it); otherwise use finite counts.\n- **defaults** — vars merged into every child tween. Use this instead of repeating `ease` and `duration` on every line.\n\n## Position Parameter\n\nThe third argument to `.to()`/`.from()`/`.fromTo()` controls placement on the timeline:\n\n| Form | Meaning |\n| -------------- | ------------------------------------ |\n| `0`, `1.5` | Absolute time in seconds |\n| `\"+=0.5\"` | 0.5s after the end of the timeline |\n| `\"-=0.2\"` | 0.2s before the end of the timeline |\n| `\"intro\"` | At the `intro` label |\n| `\"intro+=0.3\"` | 0.3s after the `intro` label |\n| `\"<\"` | Same start as the previous tween |\n| `\">\"` | Right after the previous tween ends |\n| `\"<0.2\"` | 0.2s after the previous tween starts |\n| `\">-0.1\"` | 0.1s before the previous tween ends |\n\n```javascript\ntl.to(\".a\", { x: 100 }, 0);\ntl.to(\".b\", { y: 50 }, \"<\"); // same start as .a\ntl.to(\".c\", { opacity: 0 }, \"<0.2\"); // 0.2s after .b starts\n```\n\nPrefer the position parameter over `delay:` — it composes naturally and survives refactors that re-order tweens.\n\n## Labels\n\n```javascript\ntl.addLabel(\"intro\", 0);\ntl.to(\".a\", { x: 100 }, \"intro\");\n\ntl.addLabel(\"outro\", \"+=0.5\");\ntl.to(\".a\", { opacity: 0 }, \"outro\");\n```\n\nLabels make a long timeline readable and let multiple tweens converge on the same beat without re-typing absolute times.\n\n## Nesting Timelines\n\n```javascript\nconst master = gsap.timeline({ paused: true });\n\nconst child = gsap.timeline();\nchild.to(\".a\", { x: 100 }).to(\".b\", { y: 50 });\n\nmaster.add(child, 0);\n```\n\nIn HyperFrames, **do not** nest sub-composition timelines into the host. Sub-compositions loaded via `data-composition-src` are seeked independently by HyperFrames from their own `data-start`. Nesting is only for grouping pieces of the _same_ composition's timeline.\n\n## Inside Sub-Compositions: prefer `fromTo` over `from`\n\nFor entrance tweens inside a sub-composition, prefer `gsap.fromTo()` over `gsap.from()`:\n\n```javascript\n// Sub-composition entrance — survives re-seek cleanly\ntl.fromTo(\".title\", { y: 60, opacity: 0 }, { y: 0, opacity: 1, duration: 0.6 }, 0.2);\n```\n\nWhy: HyperFrames re-seeks the sub-composition every time its host clip becomes visible. `gsap.from()` snapshots the starting state at **registration time** (page load); when the playhead jumps back past `data-start`, that snapshot can desync from the actual CSS state and the element renders in the wrong position. `gsap.fromTo()` declares both endpoints explicitly, so the seek-back always produces the same start state.\n\nIn top-level (standalone) compositions either form works — there's no re-seek-through-mount cycle.\n\n## Playback Control (debug / preview only)\n\n```javascript\ntl.play();\ntl.pause();\ntl.reverse();\ntl.restart();\ntl.time(2);\ntl.progress(0.5);\ntl.kill();\n```\n\nThese are useful when previewing in the browser. In rendered output HyperFrames calls `seek()` internally — your timeline must produce identical state for the same time value every time it is seeked.\n",
|
|
70
70
|
"hyperframes-animation/adapters/gsap-transforms-and-perf.md": "# Transforms and Performance\n\n## Transform Aliases\n\nPrefer GSAP's transform aliases over raw `transform` strings:\n\n| GSAP property | Equivalent |\n| --------------------------- | --------------------- |\n| `x`, `y`, `z` | `translateX/Y/Z` (px) |\n| `xPercent`, `yPercent` | `translateX/Y` in `%` |\n| `scale`, `scaleX`, `scaleY` | `scale` |\n| `rotation` | `rotate` (deg) |\n| `rotationX`, `rotationY` | 3D rotate |\n| `skewX`, `skewY` | `skew` |\n| `transformOrigin` | `transform-origin` |\n\nAliases let GSAP track and interpolate each axis independently, which prevents accidental overwrites between separate tweens on the same element.\n\n## autoAlpha\n\nPrefer `autoAlpha` over `opacity` for show/hide:\n\n```javascript\ngsap.to(\".panel\", { autoAlpha: 0, duration: 0.4 });\n```\n\n`autoAlpha: 0` sets both `opacity: 0` and `visibility: hidden`, which removes the element from hit-testing and accessibility tree at zero alpha — closer to \"gone\" than plain `opacity: 0`. The registered seekable timeline still interpolates only opacity; visibility changes at the hidden endpoint. Use `autoAlpha` only on non-clip elements or wrappers inside a clip; HyperFrames owns `.clip` visibility. Never duration-tween raw `visibility` or `display`.\n\n## clearProps\n\nRemoves inline styles set by GSAP when the tween completes:\n\n```javascript\ngsap.to(\".item\", { x: 100, rotation: 45, clearProps: \"all\" });\ngsap.to(\".item\", { x: 100, rotation: 45, clearProps: \"rotation,x\" });\n```\n\nUseful at the end of an animation segment to hand the element back to CSS.\n\n## CSS Variables\n\n```javascript\ngsap.to(\".chart\", { \"--hue\": 180, duration: 1 });\n```\n\nAnimate any custom property. Works for color, length, number — anything CSS will interpolate.\n\n## Relative and Directional Values\n\n- Relative: `\"+=20\"`, `\"-=10\"`, `\"*=2\"`.\n- Directional rotation: `\"360_cw\"`, `\"-170_short\"`, `\"90_ccw\"` — controls which way the angle takes when going between two values.\n\n## SVG Specifics\n\n- `svgOrigin` sets transform origin in the SVG's global coordinate space (not the element's local box). **Do not** combine `svgOrigin` with `transformOrigin` on the same element — pick one.\n- Animate SVG transform attributes via the same alias names (`x`, `y`, `rotation`) — GSAP handles the SVG-specific quirks.\n- **Resolve SVG geometry before building center-based transforms.** `createElementNS` is supported, but a detached, hidden, or zero-size element may not expose usable geometry when GSAP resolves a percentage `transformOrigin`. Attach and size the SVG before constructing the timeline, use an explicit `svgOrigin` when you know the canvas coordinates, or draw animated geometry around local `(0,0)` inside a positioning `<g>` for a center pivot that does not depend on a measured bounding box.\n\n## Performance Rules\n\n### Animate transforms, not layout properties\n\nAnimate `x`, `y`, `scale`, `rotation`, `opacity`. Never animate `left`, `right`, `top`, `bottom`, `width`, `height`, `margin*`, the text-reflow props `letterSpacing` / `wordSpacing` / `fontSize` — and never `roundProps`.\n\nThis is a **render-correctness** rule in HyperFrames, not just a GPU-performance nicety. The renderer seeks frame-by-frame and screenshots each frame, and the browser compositor snaps layout properties to whole device pixels. On a fast tween the per-frame step is several pixels, so the snap is invisible; on a slow tween or a long ease-out tail the value moves less than a pixel per frame — it holds the same pixel for several frames, then jumps a whole one. The result is motion that looks smooth when fast but visibly stutters when slow. Transforms interpolate sub-pixel and stay smooth at any speed. `roundProps` forces the same integer snap onto a transform — don't use it.\n\n\"Layout property\" is broader than position: anything that triggers **reflow** snaps the same way. `letterSpacing` / `fontSize` are the common trap — a slow \"settle\" that crawls one of them by a fraction of a pixel per frame dwells on a handful of discrete glyph layouts (visible micro-stutter). The faithful smooth fix depends on which property — **do not reach for `scale` reflexively**:\n\n- **`fontSize`** → animate `scale`. Scaling text up/down is the same visual and stays sub-pixel smooth (no reflow).\n- **`letterSpacing` / `wordSpacing`** → uniform `scale` is **not** the same effect (it resizes the glyphs; it does not change the gaps between them). To animate spacing smoothly, split the text into per-character (or per-word) elements and animate each one's `x` — the glyph spread is a transform, sub-pixel smooth and visually identical to a letter-spacing tween. GSAP's `SplitText` does the split. If the spacing change is a minor flourish, hold the final value statically instead.\n\nUnlike positional props, reflow props snap during browser **layout** — upstream of the canvas raster — so they stutter even in html-in-canvas, and the exception below does **not** apply to them.\n\n#### Fixing a flagged animation — preserve the intent\n\nThe lint rule tells you a property will stutter; it does **not** tell you the fix, and a fix that merely passes lint can silently change the look. Swapping a `letterSpacing` tighten for a uniform `scale` lints clean but animates a _different thing_ (it resizes the glyphs instead of closing the gaps). Two rules:\n\n1. **Reproduce the same visual** — same start/end state, same trajectory, only sub-pixel-smooth. Use the faithful equivalent (per-glyph `x` for spacing, `scale` for `fontSize`, `x`/`y` for position), not whichever transform is the least code.\n2. **Verify against the original, not against the linter.** Render the original and the fixed version and compare the motion at its key moments — the fix should differ only by the removed stutter, not by _where things end up_. Lint-clean-and-smooth is not the bar; faithful-and-smooth is.\n\nIf the faithful fix is non-trivial (a per-glyph split, a measured offset), build it or surface the tradeoff — never downgrade to a cheaper, different effect just to satisfy the linter.\n\n**Convert a position animation to a transform** by leaving the element at its resting `left`/`top` in CSS and animating the _offset_ with `x`/`y`:\n\n```javascript\n// CSS: #card { left: 1340px; top: 540px } ← resting position stays in CSS\ntl.to(\"#card\", { left: 1340, top: 540, duration: 1 }); // ✗ stutters\ntl.fromTo(\"#card\", { x: 640, y: 0 }, { x: 0, y: 0, duration: 1 }); // ✓ x/y = delta from CSS rest (640 = startLeft − 1340)\n```\n\nFor a parent-relative `left: \"100%\"` sweep, use `xPercent: 100` only when the element is the full width of its container; otherwise convert to pixels (`x: containerWidth`).\n\n**The one exception:** elements drawn through the html-in-canvas API — those under a `<canvas layoutsubtree>` ancestor, e.g. the `liquid-glass-*` blocks. The canvas rasterizes from sub-pixel `getComputedStyle`, so layout props don't snap there and those elements keep `left`/`top`. Everything the browser lays out (plain DOM) follows the rule.\n\nThe `gsap_non_transform_motion` lint rule is the backstop, not the teacher — reach for transforms from the start instead of animating layout props and waiting for lint to reject them.\n\n### will-change (sparingly)\n\n```css\n.title {\n will-change: transform;\n}\n```\n\nOnly on elements that _actually_ animate. Applied everywhere it becomes useless and burns memory.\n\n### gsap.quickTo for frequent updates (preview-only)\n\nFor high-frequency updates driven by **events** — pointer move, scroll, audio scrub — `quickTo` reuses the same tween instead of creating a new one each frame:\n\n```javascript\nconst xTo = gsap.quickTo(\"#cursor\", \"x\", { duration: 0.4, ease: \"power3\" });\nconst yTo = gsap.quickTo(\"#cursor\", \"y\", { duration: 0.4, ease: \"power3\" });\n\ncontainer.addEventListener(\"mousemove\", (e) => {\n xTo(e.pageX);\n yTo(e.pageY);\n});\n```\n\n> **Render mode has no input events.** The renderer seeks frame-by-frame; `mousemove`, `scroll`, etc. never fire. `quickTo`'s main use case applies in **live preview** in the browser only. For audio-reactive motion in renders, pre-extract audio data and drive the timeline declaratively (see `../rules/gsap-effects.md`).\n\n### Stagger beats N tweens\n\nOne tween with `stagger` beats N tweens with manual delays for both readability and runtime cost.\n\n### Cleanup\n\nIn live preview, pause or `kill()` off-screen animations. Render mode is unaffected (the renderer drives time directly).\n",
|
|
71
71
|
"hyperframes-animation/adapters/gsap.md": "---\nname: hyperframes-gsap-adapter\ndescription: GSAP animation API reference for HyperFrames. Use when writing seekable GSAP timelines in HyperFrames compositions, including gsap.to(), from(), fromTo(), set(), timeline position parameters, labels, easing, stagger, finite repeats, and transform performance.\n---\n\n# HyperFrames GSAP\n\nGSAP usage scoped to HyperFrames' seek-driven render model. This skill is the GSAP reference _as constrained by HyperFrames_ — for the framework's broader composition contract see `hyperframes-core`.\n\n## HyperFrames Contract\n\nHyperFrames controls GSAP through its `gsap` runtime adapter. Create a paused timeline synchronously, register it on `window.__timelines` with the exact `data-composition-id`, and let HyperFrames seek it.\n\n```html\n<script src=\"https://cdn.jsdelivr.net/npm/gsap@3.14.2/dist/gsap.min.js\"></script>\n<script>\n window.__timelines = window.__timelines || {};\n const tl = gsap.timeline({ paused: true });\n\n tl.from(\".title\", { y: 48, opacity: 0, duration: 0.6, ease: \"power3.out\" }, 0);\n tl.to(\".accent\", { scaleX: 1, duration: 0.5, ease: \"power2.out\" }, 0.25);\n\n window.__timelines[\"main\"] = tl; // key must equal data-composition-id on the composition root\n</script>\n```\n\n- The registry key must match the composition root's `data-composition-id`.\n- Bracket and dot syntax both register: `window.__timelines[\"main\"] = tl` and `window.__timelines.main = tl` are equivalent (the linter recognizes both). Bracket form is required when the id isn't a valid identifier (e.g. contains `-`).\n- Do not call `tl.play()` for render-critical motion.\n- Building inside an async callback such as `document.fonts.ready` is supported and common. What breaks is **registering the key before the build finishes**: an empty timeline registered early is treated as ready and nested empty, so it renders blank (`lint`: `gsap_timeline_registered_before_async_build`, error). Assign `window.__timelines[id] = tl` at the end of the callback. Do not drive render-critical motion from timers or event handlers.\n- Keep loops finite. HyperFrames renders finite video durations.\n- **Render duration comes from `data-duration` on the composition root, not from GSAP timeline length.** Do not pad the timeline with empty tweens like `tl.set({}, {}, 283)` to \"extend\" it. (Some external docs show this trick; in HyperFrames it conflicts with the seek-driven duration model — set `data-duration` instead.)\n\n## Core Tween Methods\n\n- **gsap.to(targets, vars)** — animate from current state to `vars`. Most common.\n- **gsap.from(targets, vars)** — animate from `vars` to current state (entrances).\n- **gsap.fromTo(targets, fromVars, toVars)** — explicit start and end.\n- **gsap.set(targets, vars)** — apply immediately (duration 0).\n\nAlways use **camelCase** property names (e.g. `backgroundColor`, `rotationX`).\n\n## Common vars (cheatsheet)\n\n- **duration** — seconds (default 0.5).\n- **delay** — seconds before start.\n- **ease** — `\"power1.out\"` (default), `\"power3.inOut\"`, `\"back.out(1.7)\"`, `\"elastic.out(1, 0.3)\"`, `\"none\"`. See `./gsap-easing-and-stagger.md`.\n- **stagger** — number or object. See `./gsap-easing-and-stagger.md`.\n- **repeat** — finite number; never `-1` in HyperFrames. Compute repeats from the visible duration.\n- **yoyo** — alternates direction with repeat.\n- **overwrite** — `false` (default), `true`, or `\"auto\"`.\n- **immediateRender** — default `true` for from()/fromTo(). Set `false` on later tweens targeting the same property+element.\n- **onComplete**, **onStart**, **onUpdate** — callbacks.\n\nFor transforms, autoAlpha, clearProps, and SVG specifics see `./gsap-transforms-and-perf.md`.\n\n## Animated Property Allowlist\n\nHyperFrames is stricter than vanilla GSAP. Animate only:\n\n- **Compositor-cheap**: `opacity`, `x`, `y`, `scale`, `scaleX`, `scaleY`, `rotation`, `rotationX`, `rotationY`, `skewX`, `skewY`, `transformOrigin`\n- **Visual fills**: `color`, `backgroundColor`, `borderColor`, `borderRadius`\n- **CSS variables**: `\"--hue\": 180` etc.\n- **Media `volume`** (on `<audio>` / `<video>`): do not tween it for fades or ducking; use the `data-automation` volume lane (`creator-editing-recipes.md` in `hyperframes-core`). A lane wins over a tween on the same element.\n- **DOM text `innerText`** (for numeric counters): tween it directly, e.g. `tl.to(el, { innerText: 100, snap: { innerText: 1 } })` — `snap` keeps it integer; the GSAP inspector recognizes it as a counter. Equivalent to the `onUpdate`-proxy form in `../rules/counting-dynamic-scale.md`; prefer that proxy form for locale formatting (`toLocaleString`) or suffix logic, and pair it with a separate transform-scale tween when the number should grow.\n\n**Avoid** (use the transform alias instead):\n\n- `width` / `height` / `top` / `left` / `right` / `bottom` / `margin*` / `padding*` — trigger layout reflows. Use `scaleX/Y` (with `transformOrigin`) or `x` / `y`.\n\n**Forbidden** (breaks the renderer or the clip lifecycle):\n\n- `display`, raw `visibility` **on a clip element**: never duration-tween these. HyperFrames owns a clip's visibility and `lint` rejects it. Use `autoAlpha` (opacity plus endpoint visibility) or a zero-duration timeline set at an explicit boundary. Animating a clip element's other visual properties is fine and the shipped catalog does it throughout; what is forbidden is taking over its visibility.\n- Anything driven by `Math.random()`, `Date.now()`, `performance.now()`, or event handlers — animation state must be deterministic from time alone.\n\n> **Note**: the list above is a **denylist**, not an allowlist. Properties outside it, including `width`, `height`, `filter`, `clipPath` and `strokeDashoffset`, are legitimate targets; prefer transforms and opacity where you have the choice, for performance rather than correctness. See `hyperframes-core/references/determinism-rules.md` for the full deterministic-render contract.\n\n## References\n\n- `./gsap-timeline-and-labels.md` — timeline creation, position parameter (`+=`, `<`, `>`), labels, nesting, sub-comp `fromTo` preference, playback control.\n- `./gsap-easing-and-stagger.md` — easing families, stagger objects, function-based values, `gsap.matchMedia()`, `gsap.defaults()`.\n- `./gsap-transforms-and-perf.md` — transform aliases, autoAlpha, `quickTo`, `will-change`, performance rules.\n- `../rules/gsap-effects.md` — drop-in recipes: typewriter (with cursor / backspace / word rotation) + audio visualizer (uses `skills/hyperframes-creative/scripts/extract-audio-data.py`).\n\n## Best Practices\n\n- Use camelCase property names; prefer transform aliases and autoAlpha.\n- Prefer timelines over chained tweens with delays; use the position parameter.\n- Add labels with `addLabel()` for readable sequencing.\n- Pass defaults into the timeline constructor.\n- Store the tween/timeline return value when controlling playback.\n\n## Do Not\n\n- Animate layout properties (`width`/`height`/`top`/`left`) when transforms suffice.\n- Use both `svgOrigin` and `transformOrigin` on the same SVG element.\n- Chain animations with `delay` when a timeline can sequence them.\n- Create tweens before the DOM exists.\n- Use infinite `repeat: -1` without a finite root `data-duration` (with one, export clips to that window); when a loop must end before the composition does, use a finite repeat count computed from the visible duration.\n\n## Credits And References\n\n- HyperFrames adapter source: `packages/core/src/runtime/adapters/gsap.ts`.\n- GSAP documentation: https://gsap.com/docs/v3/\n- GSAP timeline pause and seek behavior: https://gsap.com/docs/v3/GSAP/Timeline/pause%28%29/\n",
|
|
@@ -136,9 +136,9 @@ export const HYPERFRAMES_FILES = {
|
|
|
136
136
|
"hyperframes-animation/rules/press-release-spring.md": "---\nname: press-release-spring\ndescription: Tactile button press with linear compression, spring-based elastic recovery, and layered visual feedback (shadow shrink + release burst + background glow).\nmetadata:\n tags: spring, press, interaction, button, physics, glow, burst, ui\n---\n\n# Press-Release Spring Chain\n\nSeparates input (linear compression) from output (spring recovery) to create tactile feel: the overshoot is a natural byproduct of the spring config, not manually coded, with secondary motion (shadow shrink, release burst, background glow) layered on the same trigger frame. This is a **reaction on an element already resting on screen** — an arrival that springs in from nothing is [spring-pop-entrance.md](spring-pop-entrance.md); add a visible cursor actor and it becomes [physics-press-reaction.md](physics-press-reaction.md).\n\nTwo phases split at the **release**:\n\n1. **Press**: linear ease → compression (`scale: 1 → PRESS_SCALE`, shadow shrinks). Linear, not spring — the dip must read as instant/tactile, not squishy.\n2. **Release**: `back.out(BOUNCE_FACTOR)` spring back to 1.0. Optional burst glow ring expands behind the button; optional environmental glow fades in.\n\nState continuity is critical: the release tween's start value MUST equal the press tween's end value, or the spring snaps to a different position. GSAP threads this automatically when both tweens target the same property at **adjacent positions** — `RELEASE_START = PRESS_START + PRESS_DUR`; a gap or overlap breaks it.\n\n## Recipe\n\n```html\n<div class=\"press-stage\">\n <div class=\"bg-glow\" id=\"bg-glow\"></div>\n <!-- Burst sits BEHIND the button (z-index 1 vs 2), same footprint, blurred\n radial gradient, opacity 0. bg-glow is a full-stage radial at negative\n inset so it extends past the stage edges. -->\n <div class=\"burst\" id=\"burst\"></div>\n <button class=\"btn\" id=\"btn\">{buttonLabel}</button>\n</div>\n```\n\n```js\n// Phase 1 — press (linear compression)\ntl.to(\n \"#btn\",\n { scale: PRESS_SCALE, boxShadow: \"{btnPressedShadow}\", duration: PRESS_DUR, ease: \"power1.in\" },\n PRESS_START,\n);\n\n// Phase 2 — release (spring back; start scale == PRESS_SCALE by adjacency)\ntl.to(\n \"#btn\",\n {\n scale: 1,\n boxShadow: \"{btnRestShadow}\",\n duration: RELEASE_DUR,\n ease: `back.out(${BOUNCE_FACTOR})`,\n },\n RELEASE_START,\n);\n\n// Phase 3 — burst glow pops behind the button, then fades\ntl.fromTo(\n \"#burst\",\n { scale: 1, opacity: 0 },\n {\n scale: BURST_PEAK_SCALE,\n opacity: BURST_PEAK_OPACITY,\n duration: BURST_GROW_DUR,\n ease: \"power2.out\",\n },\n RELEASE_START,\n);\ntl.to(\"#burst\", { opacity: 0, duration: BURST_FADE_DUR, ease: \"power2.in\" }, BURST_FADE_START);\n\n// Phase 4 — environmental glow fades in after release\ntl.to(\n \"#bg-glow\",\n { opacity: BG_GLOW_PEAK_OPACITY, duration: BG_GLOW_FADE_DUR, ease: \"power2.out\" },\n RELEASE_START,\n);\n```\n\n## Variations\n\n- **Subtle press** (status save / muted CTA): `PRESS_SCALE` ~0.96, `BOUNCE_FACTOR` ~1.4, burst scale/opacity reduced.\n- **Dramatic press** (hero CTA / \"ship it\"): `PRESS_SCALE` ~0.88, `BOUNCE_FACTOR` ~2.5, burst maxed.\n- **Color shift during press** — darken mid-press, return on release; interpolated `backgroundColor` at the same timeline positions as the scale tweens. Same state-continuity rule.\n- **State change at release** (approve / confirm) — instead of returning to the rest color, swap to `{successColor}` at `RELEASE_START` and pop a checkmark via a separate `back.out(CHECK_BOUNCE)` tween (1.4–2.0, firmer than the button's bounce — a punctuating \"stamp\"; pop 0.3–0.6 s) at the same position. The button is now terminal — no further presses expected.\n\n## Values\n\n| token | range | notes |\n| -------------------- | ------------------------------------------ | ------------------------------------------------------------------------------------------ |\n| button footprint | ≥ 3–5% of canvas area | a 320×68 button at 1080p is ~1% and the press reads as visually insignificant |\n| PRESS_SCALE | 0.88 dramatic · 0.92 default · 0.96 subtle | never <0.85 (broken) or >0.98 (no perceptible dip) |\n| PRESS_DUR | 0.10–0.30 s | shorter = snappier; must be shorter than `RELEASE_DUR` (input faster than spring recovery) |\n| RELEASE_DUR | 0.40–0.90 s | shorter = tight pop; longer = loose, wobbly settle |\n| BOUNCE_FACTOR | 1.4 soft · 2.0 firm · 2.8 cartoony | or `elastic.out(amplitude, period)` for a rubbery oscillation instead of one overshoot |\n| RELEASE_START | `= PRESS_START + PRESS_DUR` | adjacency = automatic state continuity |\n| BURST_PEAK_SCALE | 3 subtle · 6 default · 8 max | beyond ~8 the radial gradient pixelates visibly |\n| BURST_PEAK_OPACITY | 0.4–1.0 | grow ≈ fade, 0.4–0.7 s each; blur 40–100 px (hard ring → ambient haze) |\n| BG_GLOW_PEAK_OPACITY | 0.1 subtle · 0.25 default · 0.45 max | higher washes the whole composition; fade-in 0.6–1.0 s; inset −300…−500 px at 1080p |\n\nColor tokens: pressed surface darker than rest; rest shadow large + diffuse, pressed small + tight (the button \"sinks toward the surface\"); burst gradient darker + more saturated than `{btnBg}` — same-color glow looks washed out; bg glow a low-opacity tint of the button's hue family.\n\n## Critical Constraints\n\n- **State continuity** — release start value exactly equals press end value; enforced by same-property adjacency at `RELEASE_START = PRESS_START + PRESS_DUR`.\n- **Linear press, spring release** — both spring → squishy; both linear → mechanical, no overshoot punch.\n- **Anchor compression on center** (`transform-origin: 50% 50%`) or the button collapses asymmetrically.\n- **Burst behind, not in front** — burst `z-index: 1`, button `z-index: 2`; in front it occludes the button at peak opacity.\n- **Don't tween `boxShadow` and `filter` on the same element** — they compete in the layout pipeline; shadow on the button, blur on the separate burst layer.\n- **Climax dwell** — after the burst peak + reveal, the composition must run ≥ 1 s more (≥ 2 s for dramatic variants); a reveal at `t = DURATION − 0.2 s` reads as \"flashed and gone.\"\n\n## See also\n\n`spring-pop-entrance` (the ENTRANCE counterpart — arrival, not reaction) · `physics-press-reaction` (this press with a visible cursor actor) · `cursor-click-ripple` (the cursor click that triggers the press) · `sine-wave-loop` (idle micro-float BEFORE the press) · `center-outward-expansion` (badge burst synced to the release).\n",
|
|
137
137
|
"hyperframes-animation/rules/reactive-displacement.md": "---\nname: reactive-displacement\ndescription: Physical collision where an entering element's spring drives the exiting element's displacement — single source of truth makes the motion causally linked.\nmetadata:\n tags: transition, physics, collision, displacement, spring, causal\n---\n\n# Reactive Displacement\n\nExit animation of element A is mathematically DERIVED from the entry spring of element B — a causal link: \"A moves _because_ B hit it.\" Distinct from [scale-swap-transition.md](scale-swap-transition.md) (which overlaps but isn't causal) and [card-morph-anchor.md](card-morph-anchor.md) (one container morphing).\n\nA single 0→1 driver tween (the \"entry spring\") feeds three concurrent derived motions in one `onUpdate`:\n\n- **Intruder** (B, entering): position interpolated off-stage → settled over the full driver, plus tilt settling to 0° and a sharp early opacity reveal.\n- **Victim** (A, exiting): position interpolated settled → off-stage in the OPPOSITE direction, completing at `VICTIM_FRACTION` (~0.4–0.5) of the driver — NOT 1.0.\n\nThe victim finishing BEFORE the intruder's entry creates the \"hit then settle\" rhythm; sharing one eased driver makes the impact moment mathematically synchronized.\n\n## Recipe\n\n```js\n// Both cards absolutely centered; overflow: hidden on the scene (off-stage travel);\n// will-change: transform, opacity on both; intruder z-index ABOVE victim.\nconst INTRUDER_START_X = STAGE_W; // off-stage right\nconst VICTIM_END_X = -STAGE_W; // off-stage left — SAME axis, opposite direction\n\ngsap.set(\"#victim\", { x: 0, opacity: 1, rotation: 0 });\ngsap.set(\"#intruder\", { x: INTRUDER_START_X, opacity: 0, rotation: -INTRUDER_TILT });\n\nconst driver = { p: 0 };\ntl.to(\n driver,\n {\n p: 1,\n duration: DRIVER_DUR,\n ease: `back.out(${BOUNCE_FACTOR})`, // the intruder spring\n onUpdate: () => {\n // Intruder: full 0→1 progress maps enter (off-stage → center)\n const intruderX = INTRUDER_START_X * (1 - driver.p);\n const intruderOpacity = Math.min(1, driver.p * FADE_IN_SHARPNESS);\n const intruderRot = -INTRUDER_TILT * (1 - driver.p); // settles to 0°\n const intruder = document.getElementById(\"intruder\");\n intruder.style.transform = `translate(-50%, -50%) translateX(${intruderX}px) rotate(${intruderRot}deg)`;\n intruder.style.opacity = String(intruderOpacity);\n\n // Victim: completes its exit at VICTIM_FRACTION of the driver — by the\n // time the intruder centers, the victim is already off-stage.\n const victimP = Math.min(1, driver.p / VICTIM_FRACTION);\n const victimX = VICTIM_END_X * victimP;\n const victim = document.getElementById(\"victim\");\n victim.style.transform = `translate(-50%, -50%) translateX(${victimX}px)`;\n victim.style.opacity = String(1 - victimP);\n },\n },\n DRIVER_AT,\n);\n// Climax dwell — intruder holds centered for ≥ DWELL_MIN before the scene ends.\n```\n\n## Variations\n\n- **Impact rotation on victim** — the victim also rotates as it slides: `const victimRot = victimP * -VICTIM_KICK_DEG;` appended to its transform. `VICTIM_KICK_DEG` 15–25°, magnitude matched to the perceived intruder weight.\n- **Vertical collision** — intruder from top, victim displaced downward; same math on Y. Reads as \"weight dropped on it.\"\n- **Wobble after settle** — after the intruder centers, a damped sine wobble (`±WOBBLE_AMP_DEG` rotation, linearly decaying over `WOBBLE_DUR` via a second `ease: \"none\"` driver at `DRIVER_AT + DRIVER_DUR`) before stillness — \"impact aftermath.\"\n- **Multi-victim ripple** — the intruder displaces multiple aligned cards, each victim's `victimP` on a slightly offset driver phase (cascade ripple).\n\n## Values\n\n| token | range | notes |\n| ----------------- | ---------------------- | ---------------------------------------------------------------------------------------------------------- |\n| DRIVER_AT | phase-dependent | after the prior reading beat resolves; must leave ≥ DWELL_MIN of climax dwell before the scene ends |\n| DRIVER_DUR | 0.6–1.4 s | short = zippy punch, long = heavy landed impact; higher bounce on long durations reads as floaty |\n| BOUNCE_FACTOR | 1.2–2.0 (typ. 1.4–1.6) | stay in the `back.out` family (or `elastic.out` for oscillation) — changing family rewrites the feel |\n| VICTIM_FRACTION | 0.4–0.5 | <0.4 the victim disappears before the impact reads; >0.5 feels parallel, not causal; hard cap ~0.6 |\n| STAGE_W | ≥ composition width | smaller leaves the off-stage element partially visible at start |\n| INTRUDER_TILT | 5–15° (typ. ~10°) | low = clean glide, high = \"spin-and-plant\"; sign consistent with entry direction (momentum transfer) |\n| FADE_IN_SHARPNESS | 3–8 | intruder reaches opacity 1 at `1/FADE_IN_SHARPNESS` of progress; must be > 1 or it's transparent at center |\n| DWELL_MIN | ≥ 1.0 s (typ. 1.0–1.5) | post-impact dwell is where the new content gets read — do not skip |\n\n## Critical Constraints\n\n- **Single driver = single source of truth** — both motions computed inside ONE driver's `onUpdate`, never separate `tl.to()` calls per element; independent tweens destroy the causal link (they'd merely be near each other in time).\n- **Victim completes at a fraction of the driver** — the \"hit\" is the overlap moment; after it the victim is just vacating space the intruder will fill.\n- **Directional momentum transfer** — same axis, opposite directions; different axes read as passing, not colliding.\n- **Intruder z-index above victim** — explicit, not DOM order; otherwise the victim looks like it tunneled through.\n- **Intruder enters tilted, settles flat** — small initial tilt → 0° reads as \"spinning in then planting.\"\n- **Climax dwell after impact** — the impact is the headline beat; hold the settled intruder ≥ DWELL_MIN.\n- **`overflow: hidden` on the scene** — off-stage motion exceeds the frame.\n\n## See also\n\n`control-target-sync` (the live-editing mirror — repeated coupled edits, nothing exits) · `hacker-flip-3d` (intruder text reveal during entry) · `sine-wave-loop` (idle breathing during the dwell) · `vertical-spring-ticker` (a ticker that \"shoves\" the previous content out).\n",
|
|
138
138
|
"hyperframes-animation/rules/scale-swap-transition.md": "---\nname: scale-swap-transition\ndescription: Coordinated shrink-out + spring pop-in morph-like transition between two elements — no SVG path interpolation needed.\nmetadata:\n tags: transition, morph, scale, swap, spring, pop\n---\n\n# Scale-Swap Transition\n\nSimulates a \"morph\" between two DOM elements by overlapping exit and entrance scale animations. Lighter weight than [card-morph-anchor.md](card-morph-anchor.md) (which morphs container dimensions — use that for SHAPE changes; this rule is for SAME-shape state swaps) and easier than SVG path interpolation.\n\nAt a single trigger, two coordinated tweens fire:\n\n1. **Outgoing**: scale `1.0 → EXIT_SCALE` + opacity `1 → 0`, fast `power2.in` (rushing away).\n2. **Incoming**: scale `EXIT_SCALE → 1.0` + opacity `0 → 1`, `back.out(BOUNCE_FACTOR)` (arriving with weight).\n\nA small `OVERLAP` window during which both are mid-tween creates the morph illusion; the incoming sits on top via z-index so the outgoing's fade-tail doesn't bleed through.\n\n## Recipe\n\n```html\n<!-- Both cards position: absolute; inset: 0 in one fixed-size wrapper — same\n footprint, same transform-origin: 50% 50%. Incoming starts opacity: 0,\n transform: scale(EXIT_SCALE), z-index above the outgoing. -->\n<div class=\"swap-wrap\">\n <div class=\"card outgoing\" id=\"outgoing\">{outgoingIcon} {outgoingLabel}</div>\n <div class=\"card incoming\" id=\"incoming\">\n {incomingIcon} {incomingLabel}\n <div class=\"sub\" id=\"sub\">{incomingSubline}</div>\n </div>\n</div>\n```\n\n```js\n// Outgoing: shrink + fade fast\ntl.to(\n \"#outgoing\",\n { scale: EXIT_SCALE, opacity: 0, duration: EXIT_DUR, ease: \"power2.in\" },\n TRIGGER,\n);\n\n// Incoming: pops in with overshoot, starting OVERLAP before the exit finishes\ntl.to(\n \"#incoming\",\n { scale: 1.0, opacity: 1, duration: ENTER_DUR, ease: `back.out(${BOUNCE_FACTOR})` },\n TRIGGER + EXIT_DUR - OVERLAP,\n);\n\n// Inner content reveals AFTER the incoming settles\ntl.fromTo(\n \"#sub\",\n { opacity: 0, y: SUB_REVEAL_Y_PX },\n { opacity: 1, y: 0, duration: SUB_REVEAL_DUR, ease: \"power3.out\" },\n TRIGGER + EXIT_DUR + SUB_REVEAL_DELAY,\n);\n```\n\n## Variations\n\n- **Delayed inner content reveal** — the classic pattern above: morph the container, then reveal inner text once it settles; the 0.2–0.4 s gap lets the eye land on the new shape before reading.\n- **Triple swap (3-state cycle)** — chain A→B→C with triggers `TRIGGER_AB` / `TRIGGER_BC`; each transition is its own tween pair, the previous incoming becoming the next outgoing. State-evolution narratives (early → mid → final labels).\n- **Color-shift transition (no scale)** — for a flat morph between same-shape states, drop the scale and keep opacity + a brief background hue tween; less dramatic, more product-UI tone.\n\n## Values\n\n| token | range | notes |\n| ---------------- | ------------------------------------- | ------------------------------------------------------------------------------------------------------ |\n| TRIGGER | ≥ outgoing settled + a presence-dwell | the outgoing must \"land\" before transforming |\n| EXIT_DUR | 0.3–0.5 s | |\n| ENTER_DUR | 0.45–0.7 s | longer than `EXIT_DUR` so the overshoot can settle |\n| OVERLAP | 0.1–0.2 s | >0.3 s both are clearly visible together (no morph); <0.05 s leaves a visible empty gap |\n| EXIT_SCALE | 0.6–0.8 | smaller exits feel dramatic but risk reading as \"vanish\" instead of \"morph\" |\n| BOUNCE_FACTOR | 1.4 soft · 1.8 firm · 2.2 cartoony | |\n| SUB_REVEAL_DELAY | 0.2–0.4 s | reveals during the morph compete with the swap for attention |\n| BRAND_REVEAL_AT | < TRIGGER | context (brand, eyebrow) sets the stage early; revealed AT the swap it competes with the headline beat |\n\n## Critical Constraints\n\n- **Incoming z-index ABOVE outgoing** — otherwise the outgoing's fade-tail (opacity 0.3–0.5) bleeds through and double-exposes the frame.\n- **Both elements share `transform-origin: 50% 50%`** — different origins make the morph read as one thing teleporting elsewhere.\n- **Bouncy ease ONLY on the incoming** — outgoing `power2.in`, incoming `back.out`; reversed, the swap feels mechanical.\n- **Both cards `position: absolute; inset: 0`** in the same fixed-size wrapper (sized to fit both states; the wrap never resizes).\n- **Don't `display: none` the outgoing** after the fade — leave it at `opacity: 0` so layout doesn't reflow.\n- **Inner content reveals after the container settles**; **climax dwell ≥ 1 s** after the final state + subline land.\n\n## See also\n\n`press-release-spring` (a button press TRIGGERS the swap — cause and effect) · `card-morph-anchor` (shape-changing alternative) · `reactive-displacement` (when the replacement should read as a causal collision) · `sine-wave-loop` (idle breathing on the final state).\n",
|
|
139
|
-
"hyperframes-animation/rules/sine-wave-loop.md": "---\nname: sine-wave-loop\ndescription: Bounded sine-driven idle — subtle jitter or a single genuinely-needed bounded ambient breath on a held element. De-emphasized: circular breathing as \"aliveness\" is cheap; prefer sequential reveal timed to the VO, then subtle jitter, before reaching here.\nmetadata:\n tags: idle, jitter, bounded-ambient, sine, trigonometry, low-amplitude, post-entry\n---\n\n# Sine Wave Loop (subtle jitter / bounded ambient)\n\n> **Reach for this last.** Per the motion doctrine (`references/motion-language.md`): circular breathing — scaling text/cards up and down to look \"alive\" — is cheap, the agent's reflexive cheat, and reads weak.
|
|
139
|
+
"hyperframes-animation/rules/sine-wave-loop.md": "---\nname: sine-wave-loop\ndescription: Bounded sine-driven idle — subtle jitter or a single genuinely-needed bounded ambient breath on a held element. De-emphasized: circular breathing as \"aliveness\" is cheap; prefer sequential reveal timed to the VO, then subtle jitter, before reaching here.\nmetadata:\n tags: idle, jitter, bounded-ambient, sine, trigonometry, low-amplitude, post-entry\n---\n\n# Sine Wave Loop (subtle jitter / bounded ambient)\n\n> **Reach for this last.** Per the motion doctrine (`references/motion-language.md`): circular breathing — scaling text/cards up and down to look \"alive\" — is cheap, the agent's reflexive cheat, and reads weak. Every hold keeps a motivated motion (a camera creep toward the subject, a highlight) and nothing moves without a reason. First fill the back of a shot with **sequential reveal timed to the VO**; if a frame has genuinely settled and still needs life, the **sanctioned move is subtle jitter** — this rule at the LOW end of its amplitude range. A full breathing loop is the rare last resort on a single held hero, never stamped on every element.\n\nKeeps a settled element from feeling dead using `Math.sin` on the timeline clock. Two forms:\n\n- **Yoyo form** — one `sine.inOut` tween with `yoyo: true` and a **finite** `repeat` count. Preferred when the idle stands alone on a property nothing else touches.\n- **onUpdate form** — one long `ease: \"none\"` tween drives a `phase` proxy `0 → 2π·CYCLES`; `onUpdate` maps `Math.sin(phase)` into the transform. Required when the offset multiplies/adds onto another live value (compound transforms, amplitude envelopes, multi-octave).\n\nEither way, idle begins where the entry settled: at `phase = 0`, `sin(0) = 0` — the offset is zero, so there is no jump from the entry's resting state.\n\n## Recipe\n\n```js\n// onUpdate form — phase-driven, composable.\nconst phase = { p: 0 };\ntl.to(\n phase,\n {\n p: Math.PI * 2 * CYCLES,\n duration: IDLE_DUR,\n ease: \"none\", // sine provides the easing; a non-linear phase tween distorts the wave\n onUpdate: () => {\n const s = Math.sin(phase.p);\n hero.style.transform = `translateY(${s * Y_AMP_PX}px) scale(${1 + s * SCALE_AMP})`;\n // secondary elements: offset by Math.PI / 2 — synced motion looks mechanical\n dot.style.transform = `scale(${1 + Math.sin(phase.p + Math.PI / 2) * DOT_SCALE_AMP})`;\n },\n },\n IDLE_START_TIME,\n);\n\n// Yoyo form — standalone property, finite repeats.\ntl.to(\n \"#badge\",\n { y: -Y_AMP_PX, duration: PERIOD / 2, ease: \"sine.inOut\", yoyo: true, repeat: REPEATS },\n IDLE_START_TIME,\n);\n```\n\n## Variations\n\n- **Multi-octave** (organic): stack a higher-frequency overlay — `1 + Math.sin(p) * AMP_PRIMARY + Math.sin(p * OCTAVE_RATIO) * AMP_SECONDARY`, with `AMP_SECONDARY < AMP_PRIMARY` and the combined max inside the normal SCALE_AMP range.\n- **Settle and fade** (strongly recommended when `IDLE_DUR > 6s`): ramp amplitude to zero over the last ~20% of idle so the scene visibly settles before the inter-scene transition, instead of handing off mid-drift:\n\n```js\nconst t = phase.p / (Math.PI * 2 * CYCLES); // 0 → 1 across idle\nconst env = t < 1 - FADE_FRAC ? 1 : (1 - t) / FADE_FRAC; // FADE_FRAC ≈ 0.2\nconst scale = 1 + Math.sin(phase.p) * SCALE_AMP * env;\n```\n\nThis is the single biggest fix when finalize snapshots show \"everything's still moving at the end\"; it pairs naturally with break-boundary transitions (the outgoing visual is static when the crossfade/push begins).\n\n## Values\n\n| token | range / default | notes |\n| --------------- | ------------------------------------ | -------------------------------------------------------------------------- |\n| SCALE_AMP | **0.008–0.015 default** | push to 0.02–0.04 only when isolated on canvas / scene <6s / kinetic brief |\n| Y_AMP_PX | **2–3px default** | 4–6px only under the same gating; rotation ±0.3–0.8° rarely needed at all |\n| period | 1.5–3s (2.5–4s when idle is long) | <1.5s frantic; >4s lifeless in a short window |\n| CYCLES | `IDLE_DUR/3 ≤ CYCLES ≤ IDLE_DUR/1.5` | derive from the period, not the other way round |\n| IDLE_START_TIME | ≥ entry settle + ~0.1s | `sin(0)=0` at this moment → no jump off the entry tail |\n| IDLE_DUR | `TOTAL_DURATION − IDLE_START_TIME` | one long tween fills the hold — never restarted |\n| DOT_SCALE_AMP | 0.04–0.12 | small accents tolerate more than the hero |\n| OCTAVE_RATIO | 2.0–4.0 | integer-ish reads musical; non-integer reads organic |\n\n## Critical Constraints\n\n- **Prefer reveal, then jitter, then breath** — the doctrine order above; default to the LOW end of every amplitude range. At the upper end across 5+ consecutive scenes the whole film reads as \"shimmering\".\n- **Long idle window** (`IDLE_DUR > 6s` OR idle > 30% of composition): halve `SCALE_AMP` / `Y_AMP_PX`, slow the period to 3–4s, and add the settle-and-fade tail.\n- **Concurrent idle on N elements** (columns, card grid, stat row): per-element amplitude ≤ default `/ √N`, AND stagger the periods (2.1s / 1.9s / 2.4s). Three columns at ±6px compound to ±18px of competing motion; three at ±2–3px read as one collective breath.\n- **Compose, don't replace** — idle ADDS to the element's resting transform; never overwrite the entry's final translation.\n- **Phase tween `ease: \"none\"`** — sine itself is the curve.\n- **No CSS `@keyframes` for idle** — CSS animation runs on the browser's render clock, independent of the HF seek clock; a CSS-driven idle flickers/desyncs. Drive idle inside the timeline.\n\n## See also\n\n`ambient-glow-bloom` (the glow-layer counterpart, same bounded-breathe discipline) · `press-release-spring` / `counting-dynamic-scale` / `card-morph-anchor` / `orbit-3d-entry` (settled elements this can follow) · `spring-pop-entrance` (the arrival that precedes any idle).\n",
|
|
140
140
|
"hyperframes-animation/rules/split-tilt-cards.md": "---\nname: split-tilt-cards\ndescription: Two cards side-by-side with opposing Y-rotation creating a symmetric 3D split-screen layout for comparisons or feature pairs.\nmetadata:\n tags: 3d, cards, split, tilt, comparison, symmetric, layout\n---\n\n# Split Tilt Cards\n\nTwo cards side-by-side with opposing `rotateY` (left `+TILT`, right `−TILT`) — a symmetric \"book-open\" 3D split for comparisons, before/after, feature pairs. Each card slides in from its own side (reinforcing \"they came from their own worlds and met here\"), then the pair idles in counter-phase.\n\n## How It Works\n\n`perspective` on the scene root (REQUIRED — without it `rotateY` flattens to a 2D layout) and `transform-style: preserve-3d` on the stage and both cards. Entry starts each card off-axis with `TILT + TILT_OVERSHOOT`, settling to `TILT` — a pivot-into-place. Idle is a gentle counter-phase y-bob (the two yoyo tweens run in opposite directions); copy fades up during the cards' settle, not after.\n\n## Recipe\n\n```html\n<!-- inside a standard scene clip (hyperframes-core) -->\n<div class=\"split-stage\">\n <div class=\"card card-left\">\n <div class=\"card-eyebrow\">{leftEyebrow}</div>\n <div class=\"card-headline\">{leftHeadline}</div>\n <div class=\"card-body\">{leftBody}</div>\n </div>\n <div class=\"card card-right\">…</div>\n</div>\n```\n\n```css\n.scene-root {\n display: grid;\n place-items: center;\n perspective: SCENE_PERSPECTIVE; /* REQUIRED */\n}\n.split-stage {\n display: flex;\n gap: STAGE_GAP;\n transform-style: preserve-3d;\n}\n.card {\n width: CARD_WIDTH;\n transform-style: preserve-3d;\n will-change: transform;\n}\n/* Shadow falls WITH the facing direction: left card faces right → shadow right. */\n.card-left {\n box-shadow: -CARD_SHADOW_OFFSET CARD_SHADOW_DROP CARD_SHADOW_BLUR {shadowColor};\n}\n.card-right {\n box-shadow: CARD_SHADOW_OFFSET CARD_SHADOW_DROP CARD_SHADOW_BLUR {shadowColor};\n}\n```\n\n```js\n// Entry — from outside, opposing tilts settle with a small pivot\ntl.fromTo(\n \".card-left\",\n { x: -ENTRY_SLIDE_DIST, rotateY: TILT + TILT_OVERSHOOT, opacity: 0 },\n { x: 0, rotateY: TILT, opacity: 1, duration: ENTRY_DUR, ease: \"power3.out\" },\n LEFT_AT,\n);\ntl.fromTo(\n \".card-right\",\n { x: ENTRY_SLIDE_DIST, rotateY: -TILT - TILT_OVERSHOOT, opacity: 0 },\n { x: 0, rotateY: -TILT, opacity: 1, duration: ENTRY_DUR, ease: \"power3.out\" },\n RIGHT_AT,\n);\n\n// Counter-phase idle bob — opposite signs = alive; synchronized = conveyor belt\ntl.to(\n \".card-left\",\n { y: -FLOAT_AMP, duration: FLOAT_DURATION / 2, ease: \"sine.inOut\", yoyo: true, repeat: 1 },\n IDLE_START,\n);\ntl.to(\n \".card-right\",\n { y: FLOAT_AMP, duration: FLOAT_DURATION / 2, ease: \"sine.inOut\", yoyo: true, repeat: 1 },\n IDLE_START,\n);\n\n// Copy fades up during the settle\ntl.from(\n \".card-eyebrow, .card-headline, .card-body\",\n { opacity: 0, y: COPY_RISE, stagger: COPY_STAGGER, duration: COPY_DUR, ease: \"power2.out\" },\n COPY_REVEAL_AT,\n);\n```\n\n## Variations\n\n- **Badges / floating labels**: position them on the PARENT, never inside a card — inside they inherit the `rotateY` and tilt off-axis.\n- **3+ cards**: center card stays flat (`rotateY: 0`), outer two tilt inward — \"old way / nothing / our way.\"\n- **Zoom-through**: a separate camera tween scaling `.split-stage` reads as the viewer crossing the gap between the tilted pair.\n\n## Values\n\n| token | range | notes |\n| ----------------- | -------------------------------- | ------------------------------------------------------- |\n| SCENE_PERSPECTIVE | 1000–2400px | lower exaggerates the tilt; higher reads near-isometric |\n| TILT | 10–18° | < 10 reads almost flat; > 18 folds shut and copy blurs |\n| TILT_OVERSHOOT | 4–12° | the pivot-into-place feel |\n| STAGE_GAP | 40–120px (~0.06–0.15×CARD_WIDTH) | small = fused pair; large = compared-but-separate |\n| CARD_WIDTH | 480–820px @1920 | `2×CARD_WIDTH + STAGE_GAP ≤ 0.95×stage` at full tilt |\n| ENTRY_SLIDE_DIST | 200–500px (~0.3–0.6×CARD_WIDTH) | |\n| ENTRY_DUR | 0.6–1.2s | |\n| RIGHT_AT | LEFT_AT + 0–0.3s | zero feels mechanical; large fragments the pair |\n| FLOAT_AMP | 3–8px | subtle is the point |\n| FLOAT_DURATION | 1.6–3.2s round trip | breathing cadence; IDLE_START ≥ entry end |\n| COPY_REVEAL_AT | during the entry tail | copy popping in after cards are idle reads disconnected |\n\n## Critical Constraints\n\n- **`perspective` on the scene root is REQUIRED**; `preserve-3d` on the stage AND each card.\n- **Shadow direction matches tilt** — left card faces right → shadow falls right (and mirrored). Wrong sign reads as broken 3D.\n- **Counter-phase idle** — the two bobs run with opposite signs at the same position.\n- **Badges outside the card divs** (they'd inherit the rotation).\n- **Body copy ≤ 2 lines per card** — tilted long paragraphs collapse into perspective blur.\n- **Symmetric weight** — same width, same vertical center, similar line counts; asymmetry breaks the comparison metaphor.\n\n## See also\n\n`card-morph-anchor` (the pair can morph into one unified shape afterward) · `counting-dynamic-scale` (numbers as each side's headline) · `sine-wave-loop` (the idle form).\n",
|
|
141
|
-
"hyperframes-animation/rules/spring-pop-entrance.md": "---\nname: spring-pop-entrance\ndescription: The canonical entrance pop — an element (or staggered group) arrives by scaling 0 → 1
|
|
141
|
+
"hyperframes-animation/rules/spring-pop-entrance.md": "---\nname: spring-pop-entrance\ndescription: The canonical entrance pop — an element (or staggered group) arrives by scaling 0 → 1, passes its mark and springs back into place (overshoot and settle); opacity never overshoots. fromTo so it's correct at t=0 under seek.\nmetadata:\n tags: spring, entrance, pop, scale, power3, settle, stagger, reveal, arrival\n---\n\n# Spring-Pop Entrance\n\n> **Arrivals overshoot and settle.** This entrance passes its mark and springs back into place: `back.out` near 1.2–1.4, or the baked spring at ζ 0.7–0.85 (`../adapters/gsap-easing-and-stagger.md` → Spring Eases). Scale and position may overshoot; opacity and colour never do. What reads cheap is bounce sprayed on every element at once, so give each element its role and let the camera or the next element carry the motion after the landing.\n\nTHE entrance primitive: an element (or staggered group) arrives by springing from nothing — `scale: 0 → 1`, optional small `y` rise — and settles with a spring. This is **arrival**, not reaction: distinct from [press-release-spring.md](press-release-spring.md) (a click/press → release feedback chain on an element that already rests on screen). Many blueprints used to borrow that rule to fake an entrance; reach for this instead.\n\n## How It Works\n\nOne `fromTo` carries the arrival: `scale` from `{ scale: 0 }` (explicit, so t=0 is correct under seek) to `{ scale: 1, ease: \"back.out(1.3)\" }`, with `opacity` on its own short `fromTo` at the same position, because opacity must not overshoot. For a **group**, the same pair runs per element at `i * STAGGER`, capped so the group reads as one arriving beat. The `scale` grow is load-bearing; the `y` rise is garnish — drop everything else and it must still read as a clean entrance. Let the ease produce the overshoot: never hand-key a `scale: 1.1` mid-state (it double-bounces against the curve).\n\n## Recipe\n\n```html\n<!-- inside a standard scene clip (hyperframes-core) -->\n<div class=\"pop-hero\" id=\"hero\">{heroLabel}</div>\n\n<div class=\"pop-grid\">\n <div class=\"pop-item\">{itemA}</div>\n <div class=\"pop-item\">{itemB}</div>\n <div class=\"pop-item\">{itemC}</div>\n</div>\n```\n\n```css\n.pop-hero,\n.pop-item {\n transform-origin: 50% 50%; /* in-place pop; move to the source point for the anchored variation */\n will-change: transform;\n}\n.pop-grid {\n display: grid;\n grid-template-columns: repeat(3, 1fr);\n gap: GRID_GAP;\n place-items: center;\n}\n```\n\n```js\n// Single hero pop — overshoot and settle; opacity lands on its own ease.\ntl.fromTo(\"#hero\", { scale: 0 }, { scale: 1, duration: POP_DUR, ease: \"back.out(1.3)\" }, ENTRY_AT);\ntl.fromTo(\"#hero\", { opacity: 0 }, { opacity: 1, duration: POP_DUR * 0.4, ease: \"power2.out\" }, ENTRY_AT);\n\n// Staggered group pop — one arriving beat.\ngsap.utils.toArray(\".pop-item\").forEach((el, i) => {\n const at = GROUP_ENTRY_AT + i * STAGGER;\n tl.fromTo(el, { scale: 0, y: Y_RISE }, { scale: 1, y: 0, duration: POP_DUR, ease: \"back.out(1.3)\" }, at);\n tl.fromTo(el, { opacity: 0 }, { opacity: 1, duration: POP_DUR * 0.4, ease: \"power2.out\" }, at);\n});\n```\n\n## Variations\n\n- **Calm landing** (premium / enterprise): `back.out(1.2)`, no rotation, `Y_RISE` 0–12px — a weighted, confident landing with a small overshoot for a hero wordmark or product shot.\n- **Firm landing** (everyday default): `back.out(1.3–1.4)`, `Y_RISE` ~24px — cards, icons, callouts.\n- **Exact-physics settle**: when the settle IS the shot, swap the ease for `springEase({ response: 0.4, dampingFraction: 0.8 })` from `../adapters/gsap-easing-and-stagger.md` → Spring Eases; take `duration` from the helper.\n- **Origin-anchored pop**: a callout growing out of a specific point (marker, pointer tip) sets `transform-origin` to that point (e.g. `0% 100%`) so `scale: 0 → 1` reads as \"emerging from the source\", not \"inflating in place\".\n- **Pop into a held slot**: land the pop and hold still — no idle loop baked into the entrance. If the held frame genuinely needs life, hand off to [sine-wave-loop.md](sine-wave-loop.md) for subtle jitter on a separate later tween; prefer revealing the next element on its VO cue.\n- **Playful slam**: swap the ease for a larger `back.out(OVERSHOOT)` and optionally settle a small `rotation: ROT_FROM → 0` so elements look hand-placed — a logo hit, a sticker, a consumer register. Use it deliberately on one element, not on everything at once:\n\n```js\ntl.fromTo(\n el,\n { scale: 0, opacity: 0, rotation: ROT_FROM },\n { scale: 1, opacity: 1, rotation: 0, duration: POP_DUR, ease: `back.out(${OVERSHOOT})` },\n GROUP_ENTRY_AT + i * STAGGER,\n);\n```\n\nKeep `OVERSHOOT ≤ ~2` — past that it reads as cartoon wobble. Better still: the baked spring at `dampingFraction: 0.6–0.7` (same adapters doc) gives ~5–10% overshoot that reads physical where `back.out` reads cartoon.\n\n## Values\n\n| token | range | notes |\n| ---------- | ----------------------------------------- | ---------------------------------------------------------------- |\n| EASE | `back.out(1.2–1.4)` default; `springEase` ζ 0.7–0.85 | `power3.out` for the no-overshoot settle (opacity, colour, readouts); larger `back.out(OVERSHOOT)` for the slam |\n| POP_DUR | 0.4–0.7s | shorter = tight snap; hero must be visible by **t ≤ 0.5s** |\n| STAGGER | 0.04–0.08s | `min(0.06, 0.5 / ITEM_COUNT)` — self-caps the window |\n| ITEM_COUNT | 3–9 | >9 makes the stagger vanish — switch to a wipe/sweep reveal |\n| Y_RISE | 0–32px | small; never large enough to read as a slide-up |\n| ROT_FROM | −10°–+10° | slam only; alternate sign by index (`i % 2 ? 6 : -6`) |\n| ENTRY_AT | 0–0.4s | a beat of quiet, but keep the subject landing by t ≤ 0.5s |\n\n## Critical Constraints\n\n- Default ease `back.out(1.2–1.4)` on scale and position (or a spring at ζ 0.7–0.85); opacity and colour take `power2.out` and never overshoot; in the slam `OVERSHOOT ≤ ~2`.\n- `ITEM_COUNT × STAGGER ≤ ~0.5s` — the group must land inside one beat.\n- Entrances state the collapsed from-state in `fromTo` — never rely on a CSS-hidden start (it renders visible before the tween claims it under seek).\n- `transform-origin: 50% 50%` for an in-place pop; the source point only for the anchored variation.\n- This is a finite arrival — idle motion on a held element is a separate, later `sine-wave-loop` tween.\n\n## See also\n\n`center-outward-expansion` (pop while radiating to slots) · `press-release-spring` (the click-feedback counterpart) · `sine-wave-loop` (post-arrival jitter, sparingly).\n",
|
|
142
142
|
"hyperframes-animation/rules/stat-bars-and-fills.md": "---\nname: stat-bars-and-fills\ndescription: Data-viz primitives that pair a number with a graphic — growth bars (CSS scaleY stagger), a progress fill (bar or ring), and a partial star-rating wipe. Seek-safe, deterministic.\nmetadata:\n tags: data, stats, chart, bars, progress, ring, stars, rating, infographic, number\n---\n\n# Stat Bars & Fills\n\nThe graphics that give a stat **visual weight** beside its number: a small bar chart, a progress bar/ring filling to a percentage, or a star row filling to a fractional rating. Pair these with [counting-dynamic-scale.md](counting-dynamic-scale.md) (the number) for a complete stat scene.\n\n**Layout blueprint — pick ONE and hold it across all stats:**\n\n- **Single-focus** — one centered frame, the number is the hero, a ring or bar sits under/around it. Cleanest for a sequential reveal (stat 1 → stat 2 → stat 3 in the same frame).\n- **Split-frame** — big number on the left, paired graphic on the right. Better when stats are shown together or each needs a distinct visual.\n\nDon't mix blueprints between stats in one piece — that reads as inconsistent.\n\n## Recipe\n\n### 1 — Growth Bars (CSS `scaleY` stagger)\n\nBars grow from the baseline with a stagger; the last bar is the accent. Heights are authored in CSS (inline height per bar); GSAP only reveals `scaleY: 0 → 1` — never animate `height`.\n\n```css\n.bars {\n display: flex;\n align-items: flex-end;\n gap: 14px;\n height: 280px;\n}\n.bar {\n width: 48px;\n background: #3a4a64;\n transform: scaleY(0);\n transform-origin: bottom center; /* grow UP from the baseline, not from center */\n}\n.bar:last-child {\n background: #ffc300; /* accent the final/current bar */\n}\n```\n\n```js\ntl.to(\".bar\", { scaleY: 1, duration: 0.7, ease: \"power3.out\", stagger: 0.08 }, 0.3);\n```\n\n### 2 — Progress Fill\n\n**Bar form** — `scaleX` from a left origin:\n\n```css\n.track {\n width: 520px;\n height: 16px;\n background: #1b263b;\n border-radius: 8px;\n overflow: hidden;\n}\n/* width:100% is REQUIRED — an absolutely-positioned fill with no width is 0px, and scaleX of 0 is\n still 0 → the bar renders invisible (automated gates may miss a zero-width scaled element). */\n.fill {\n width: 100%;\n height: 100%;\n background: #ffc300;\n transform: scaleX(0);\n transform-origin: left center;\n}\n```\n\n```js\nconst PCT = 0.92; // 92%\ntl.to(\".fill\", { scaleX: PCT, duration: 1.0, ease: \"power2.out\" }, 0.3);\n```\n\n**Ring form** — measured stroke draw (mechanics in [svg-path-draw.md](svg-path-draw.md)):\n\n```js\nconst ring = document.querySelector(\"#ring\");\nconst LEN = ring.getTotalLength(); // measure, don't hard-code the circumference\nring.style.strokeDasharray = LEN;\nring.style.strokeDashoffset = LEN; // empty\n// rotate the <circle> -90deg in CSS so the fill starts at 12 o'clock\ntl.to(ring, { strokeDashoffset: LEN * (1 - 0.92), duration: 1.1, ease: \"power2.out\" }, 0.3);\n```\n\n### 3 — Star-Rating Fill (fractional)\n\nA gold star row revealed left-to-right to a fractional value (e.g. 4.6 / 5) via a clip wipe over a gold layer sitting on a gray layer.\n\n```html\n<div class=\"stars\">\n <div class=\"stars-gray\">★★★★★</div>\n <div class=\"stars-gold\" id=\"goldStars\">★★★★★</div>\n</div>\n```\n\n```css\n.stars {\n position: relative;\n font-size: 64px;\n letter-spacing: 8px;\n}\n.stars-gray {\n color: #2b3548;\n}\n.stars-gold {\n position: absolute;\n inset: 0;\n color: #ffc300;\n width: 100%;\n clip-path: inset(0 100% 0 0);\n}\n```\n\n```js\nconst RATING = 4.6,\n MAX = 5;\ntl.to(\n \"#goldStars\",\n { clipPath: `inset(0 ${100 - (RATING / MAX) * 100}% 0 0)`, duration: 1.0, ease: \"power2.out\" },\n 0.3,\n);\n```\n\n## Values\n\n| token | range | notes |\n| ------------- | ----------- | ----------------------------------------------------------------------------------- |\n| bar count | 4–6 | reads as \"a trend\" without clutter; the last bar is the current/accent value |\n| fill duration | 0.8–1.2s | matched to the paired count-up so number and graphic land together (share the ease) |\n| stagger | 0.06–0.1s | larger feels sluggish, 0 loses the build |\n| accent hue | exactly one | bars/fill/stars all use the same accent, the rest is muted |\n\n## Critical Constraints\n\n- **`scaleY` / `scaleX` / `clipPath`, never `height`/`width` tweens** — author each bar's final height in CSS and scale from 0.\n- **`transform-origin`** must be `bottom` (bars grow up) / `left` (fills grow right) — the default center origin scales from the middle and looks wrong.\n- **`.fill` needs `width: 100%`** — a zero-width fill scaled by any factor is still invisible, and automated gates may miss it.\n- **Measure, don't hard-code** — ring length via `getTotalLength()`; a hard-coded circumference breaks if the radius changes.\n- **Match the number's timing** — the fill and the count-up peak together (same start + ease) so the stat resolves as one beat, not two; a paired counter's `onUpdate` must be O(1) (see [counting-dynamic-scale.md](counting-dynamic-scale.md)).\n- **One accent hue, consistent blueprint** — see `hyperframes-creative/references/data-in-motion.md`.\n\n## See also\n\n`counting-dynamic-scale` (the number beside the graphic — same ease/duration) · `svg-path-draw` (progress-ring draw mechanics) · `hyperframes-creative/references/data-in-motion.md` (stat layout + visual weight).\n",
|
|
143
143
|
"hyperframes-animation/rules/svg-icon-enrichment.md": "---\nname: svg-icon-enrichment\ndescription: Animate internal SVG elements (rotating hands, opening blades, pulsing dots, dash flows) to make icons feel alive without replacing them.\nmetadata:\n tags: svg, icon, animation, internal, micro-animation, pulse, rotation\n---\n\n# SVG Icon Enrichment\n\nTreats an SVG icon as a composition of animated PARTS, not an opaque image. Each meaningful internal element (a clock hand, scissor blade, recording dot, data line) gets its own micro-animation, targeted by id. Distinct from [svg-path-draw](svg-path-draw.md) (which animates the OUTLINE drawing) — enrichment animates INTERNAL PARTS, ideally after the outline has drawn.\n\nFour signature patterns:\n\n| Pattern | Use For | Math | Tip |\n| ----------- | ---------------------------------- | ------------------------------------- | ---------------------------------- |\n| Rotation | Clock, gear, loader, dial | `rotate(deg cx cy)` attribute, linear | see the transform-center gotcha |\n| Oscillation | Scissors, wings, toggle | `rotate(±sin·amp)` on opposing groups | opposite signs on the two parts |\n| Pulse | Recording dot, heart, notification | `scale(1 + sin·amp)` + opacity | ring lags dot by π/2 for ripple |\n| Dash flow | Cutting line, data stream | `strokeDashoffset` linear via time | negative for L→R, positive for R→L |\n\n## ❗ The transform-center gotcha\n\n**For rotation around an explicit point inside an SVG, use the SVG `transform` ATTRIBUTE, not CSS transform**: `el.setAttribute(\"transform\", `rotate(${deg} ${cx} ${cy})`)`. The CSS combination `transform: rotate(...)` + `transform-origin: 60px 60px` + `transform-box: fill-box` interprets the origin in the element's OWN **bbox-local** coordinates, NOT viewBox coordinates. For a thin `<line>` (whose bbox is the line's narrow envelope), `60 60` bbox-local is a point OUTSIDE the line — the hand flies along an off-center arc instead of rotating in place. Same trap for small inner shapes (a dot circle whose bbox is the small circle, not the full viewBox).\n\n**Scaling around a center point**: same attribute route — `el.setAttribute(\"transform\", `translate(${cx} ${cy}) scale(${s}) translate(-${cx} -${cy})`)`.\n\n## Recipe\n\n```html\n<!-- inside a standard scene clip — named children are the animation targets -->\n<svg class=\"icon-svg\" viewBox=\"0 0 120 120\" xmlns=\"http://www.w3.org/2000/svg\">\n <circle cx=\"60\" cy=\"60\" r=\"50\" fill=\"none\" stroke=\"{accentColor}\" stroke-width=\"6\" />\n <line\n id=\"hand-min\"\n x1=\"60\"\n y1=\"60\"\n x2=\"60\"\n y2=\"22\"\n stroke=\"{textColor}\"\n stroke-width=\"6\"\n stroke-linecap=\"round\"\n />\n <line\n id=\"hand-sec\"\n x1=\"60\"\n y1=\"60\"\n x2=\"60\"\n y2=\"30\"\n stroke=\"{recordColor}\"\n stroke-width=\"3\"\n stroke-linecap=\"round\"\n />\n <circle cx=\"60\" cy=\"60\" r=\"6\" fill=\"{textColor}\" />\n</svg>\n<!-- pulse icon: #rec-ring + #rec-dot circles; dash-flow: a <line> with stroke-dasharray=\"14 12\" -->\n```\n\n```js\n// Pattern 1 — Rotation. Proxy tween → SVG transform attribute (explicit center, see gotcha).\nconst hand = document.getElementById(\"hand-min\");\nconst minState = { deg: 0 };\ntl.to(\n minState,\n {\n deg: 360 * MIN_REVOLUTIONS,\n duration: TOTAL_DURATION,\n ease: \"none\", // linear motion is the point\n onUpdate: () => hand.setAttribute(\"transform\", `rotate(${minState.deg} 60 60)`),\n },\n 0,\n);\n// second hand: same shape with SEC_REVOLUTIONS (visibly faster).\n\n// Pattern 3 — Pulse. One phase proxy drives dot + ring, ring offset by π/2.\nconst dot = document.getElementById(\"rec-dot\");\nconst ring = document.getElementById(\"rec-ring\");\nconst pulse = { p: 0 };\ntl.to(\n pulse,\n {\n p: Math.PI * 2 * PULSE_CYCLES,\n duration: TOTAL_DURATION,\n ease: \"none\", // sine handles the curve\n onUpdate: () => {\n const sD = 1 + Math.sin(pulse.p) * PULSE_DOT_AMP;\n const sR = 1 + Math.sin(pulse.p + Math.PI / 2) * PULSE_RING_AMP;\n dot.setAttribute(\"transform\", `translate(60 60) scale(${sD}) translate(-60 -60)`);\n ring.setAttribute(\"transform\", `translate(60 60) scale(${sR}) translate(-60 -60)`);\n ring.style.opacity = String(\n PULSE_RING_OPACITY_BASE + Math.sin(pulse.p) * PULSE_RING_OPACITY_AMP,\n );\n },\n },\n 0,\n);\n\n// Pattern 4 — Dash flow. Linear offset tween on a dashed stroke.\nconst flowState = { offset: 0 };\ntl.to(\n flowState,\n {\n offset: DASH_FLOW_TOTAL_OFFSET, // negative = L→R\n duration: TOTAL_DURATION,\n ease: \"none\",\n onUpdate: () => {\n document.getElementById(\"data-flow\").style.strokeDashoffset = String(flowState.offset);\n },\n },\n 0,\n);\n```\n\n## Variations\n\n- **Stroke draw → enrichment chain** — draw the outline first via [svg-path-draw](svg-path-draw.md) (phase 1, `0 → OUTLINE_DUR`), then start enrichment at `OUTLINE_DUR`: the icon \"wakes up\" after assembly.\n- **Per-icon entry stagger** — for a row of icons, each icon's enrichment starts as it fades in, not synchronized.\n\n## Values\n\n| token | range | notes |\n| ------------------------------- | -------------------- | ----------------------------------------------------------------------------------------------- |\n| MIN_REVOLUTIONS | 0.5–2.0 | avoid integer revolutions if the end frame is visible (lands back at start) |\n| SEC_REVOLUTIONS | 4–10 | > MIN × 3 or the speed difference doesn't read |\n| PULSE_CYCLES | 2–4 over a 3–5s comp | ≥5 reads as anxious flicker; ≤1 reads as forgotten |\n| PULSE_DOT_AMP | 0.05–0.20 | 0.05 = breathing; 0.20 = throbbing |\n| PULSE_RING_AMP | 0.04–0.12 | must be < PULSE_DOT_AMP or the ring overshadows the dot |\n| PULSE_RING_OPACITY_BASE / \\_AMP | 0.4–0.6 / 0.3–0.5 | BASE − AMP ≥ 0 and BASE + AMP ≤ 1 |\n| DASH_FLOW_TOTAL_OFFSET | ±100–400 | must be an integer multiple of the dash period (dash + gap) or the end frame shows a phase jump |\n\n## Critical Constraints\n\n- **The transform-center gotcha above** — SVG `transform` attribute for any rotation/scale around an explicit interior point; never CSS `transform-origin` + `transform-box: fill-box` on thin lines or small inner shapes.\n- **No `requestAnimationFrame`** — like CSS animation, it desyncs from HF's frame-by-frame seek; continuous motion lives inside the timeline as linear proxy tweens.\n- **Amplitudes subtle** — icons are decorative, not headlines; calibrate rotation speed against composition length, not absolute time.\n- **Phase-offset the parts** — minute vs second hand at different speeds, ring lagging dot by π/2. Pure sync looks mechanical.\n- **`stroke-linecap: round`** on flowing/dashed lines for clean dash edges.\n- **Climax dwell ≥1s** — if the enrichment is the headline beat, the composition continues ≥1s after the most dramatic moment.\n\n## See also\n\n`svg-path-draw` (outline draws first, enrichment second) · `orbit-3d-entry` (orbiting items are enriched icons) · `sine-wave-loop` (the whole icon floats while internal parts animate).\n",
|
|
144
144
|
"hyperframes-animation/rules/svg-path-draw.md": "---\nname: svg-path-draw\ndescription: Animate SVG paths drawing progressively using stroke-dasharray and stroke-dashoffset.\nmetadata:\n tags: svg, stroke, draw, path, reveal, icon, vector\n---\n\n# SVG Path Draw\n\nReveals an SVG shape by animating its stroke as if a pen were tracing it. Two stroke properties together: **`stroke-dasharray = <pathLength>`** makes the entire path one dash; **`stroke-dashoffset`** starts at the path length (dash shifted fully out of view → invisible) and tweens to `0` (fully drawn). The length comes from the DOM API `path.getTotalLength()` — measured, never guessed.\n\nWorks on anything with a stroke: `<path>`, `<circle>`, `<rect>`, `<line>`, `<polyline>`, `<polygon>`, `<ellipse>`.\n\n## Recipe\n\n```html\n<!-- inside a standard scene clip -->\n<svg class=\"logo-mark\" viewBox=\"0 0 200 200\" xmlns=\"http://www.w3.org/2000/svg\">\n <path id=\"bar-left\" d=\"M 60 40 L 60 160\" />\n <path id=\"bar-right\" d=\"M 140 40 L 140 160\" />\n <path id=\"bar-mid\" d=\"M 60 100 L 140 100\" />\n</svg>\n```\n\n```css\n.logo-mark path {\n fill: none; /* outline-only draw — a fill would appear immediately and ruin the reveal */\n stroke: {accentColor};\n stroke-width: 12;\n stroke-linecap: round; /* softer endpoints */\n stroke-linejoin: round;\n}\n```\n\n```js\n// Setup: measure each path and set its dash pattern. Real measured geometry, not a magic number.\ndocument.querySelectorAll(\".logo-mark path\").forEach((p) => {\n const len = p.getTotalLength();\n p.style.strokeDasharray = `${len}`;\n p.style.strokeDashoffset = `${len}`;\n});\n\n// Stagger draws so the eye reads continuous motion — each segment starts at\n// ~70-80% of the previous segment's duration, before it finishes.\ntl.to(\n \"#bar-left\",\n { strokeDashoffset: 0, duration: SEGMENT_DRAW_DUR, ease: \"power2.out\" },\n SEG_1_START,\n);\ntl.to(\n \"#bar-right\",\n { strokeDashoffset: 0, duration: SEGMENT_DRAW_DUR, ease: \"power2.out\" },\n SEG_2_START,\n);\ntl.to(\n \"#bar-mid\",\n { strokeDashoffset: 0, duration: FINAL_SEGMENT_DUR, ease: \"power2.out\" },\n SEG_3_START,\n);\n\n// Companion wordmark fades in only after the last stroke settles.\ntl.to(\n \".brand-line\",\n { opacity: 1, duration: BRAND_FADE_DUR, ease: \"power1.out\" },\n BRAND_FADE_START,\n);\n```\n\n## Variations\n\n- **Ring starting at 12 o'clock** — `<circle>` / `<rect>` strokes start at 3 o'clock by default; rotate the element `-90deg` so a progress ring draws from the top:\n\n```html\n<circle\n cx=\"100\"\n cy=\"100\"\n r=\"60\"\n id=\"ring\"\n style=\"transform-origin: 100px 100px; transform: rotate(-90deg)\"\n/>\n```\n\n- **Linear (constant-speed) draw** — `ease: \"none\"` for a steady-rate \"real pen\" trace.\n- **Draw then fill** — for filled shapes, tween `fillOpacity: 0 → 1` AFTER the stroke completes (requires `fill-opacity: 0` initially and a real `fill` in CSS):\n\n```js\ntl.to(\n \"#path\",\n { strokeDashoffset: 0, duration: SEGMENT_DRAW_DUR, ease: \"power2.out\" },\n SEG_1_START,\n);\ntl.to(\n \"#path\",\n { fillOpacity: 1, duration: FILL_FADE_DUR, ease: \"power1.out\" },\n SEG_1_START + SEGMENT_DRAW_DUR,\n);\n```\n\n## Values\n\n| token | range | notes |\n| ----------------- | --------------------------------------- | -------------------------------------------------------------------------------------------------- |\n| SEGMENT_DRAW_DUR | 0.3–0.8s | fast snap vs deliberate pen trace; >~1s feels sluggish for a logo reveal |\n| FINAL_SEGMENT_DUR | 60–80% of SEGMENT_DRAW_DUR | proportional to segment length — a short connector at full duration reads slower than its siblings |\n| SEG_N_START | previous start + 70–80% of its duration | reads as continuous motion, not N isolated animations |\n| SEG_1_START | 0–0.4s | a small ~0.2s lead-in lets the viewer settle before motion |\n| BRAND_FADE_START | ≥ last stroke end (+ ~0.2s beat) | earlier and the wordmark competes with the draw |\n| BRAND_FADE_DUR | 0.3–0.8s | snap (urgent) vs glide (premium) |\n\nEase families are discrete choices: **stroke draws** use `power2.out` (a hand lifting at end of stroke) or `none` for constant speed — never `back.out` / `elastic.out` (pens don't bounce). **Fades** use `power1.out`.\n\n## Critical Constraints\n\n- **`fill: none`** for outline-only draws — otherwise the fill appears immediately.\n- **Dasharray/dashoffset = the measured `getTotalLength()`**, set at setup; requires the SVG in the DOM (inline SVG is fine; a loaded `<image>` SVG is not).\n- **Complex paths**: if `getTotalLength()` looks wrong, overestimate slightly (`len * 1.05`) — too large is invisible at animation start; too small clips the end.\n- **Stagger multi-path draws at ~70–80%** of the previous segment's duration.\n- **A drawn line must land on something.** When the path is a connector (rail, beam, underline, callout) rather than a shape, both endpoints must sit on real elements and the draw must do a job — reveal, route, validate, or emphasize. A stroke that only decorates empty space reads as filler; attach it or cut it.\n\n## See also\n\n`svg-icon-enrichment` (internal parts animate after the outline draws) · `counting-dynamic-scale` (stroke draws an icon while a number counts up) · `hacker-flip-3d` (logo draws, wordmark decodes beneath).\n",
|
|
@@ -300,15 +300,15 @@ export const HYPERFRAMES_FILES = {
|
|
|
300
300
|
"music-to-video/sub-agents/frame-worker.md": "# Frame worker — per-frame composition author (music-to-video)\n\nYou build one frame's composition file: `compositions/frames/<frame_id>.html`. Siblings build the other frames in parallel. The generic HyperFrames law — sub-composition shape, timeline registration, determinism, layout — lives in `hyperframes-core` (`references/sub-compositions.md`\n\n- `determinism-rules.md` + `data-attributes.md`); read it first. This file covers the music-specific part.\n\nYour job: **follow the manual, fetch the materials, assemble.** The storyboard tells you WHAT (the frame's groups, each group's template / primitives, content, brand, real beat-anchor seconds). You decide HOW (fetch the materials, bind them to this frame's audio seconds, micro-timing, layout, namespacing).\n\n## Inputs (your dispatch context)\n\n- `PROJECT_DIR` — project root; all paths relative to it.\n- `frame_id` — the frame file's stem, e.g. `02-f2`. Use it verbatim as the composition id, the `window.__timelines` key, and the filename `compositions/frames/<frame_id>.html` (the assembler matches on it).\n- Your **`## Frame N` block** in `STORYBOARD.md` — its `span_sec`, `pacing`, `mood`, `feel`, and its **`### Groups`** list. Each group is one of:\n - **template** — `template:<id>` + `params` + `role_bindings` (real audiomap anchor seconds) + `copy`.\n - **free_design** — `free_design:{dominant_system, primitives, density_topology}` + `anchors[]` + `copy`.\n - **asset** — `asset:{treatment, clips, anchors?, overlay_copy?}` (see `montage.md`).\n- `audiomap.json` — timing truth; use the seconds you're given.\n- `frame.md` — the brand (palette + type). Pull every visual token from here.\n- **Materials** — `references/templates/<id>/index.html` (its `data-composition-variables` give the param semantics) for template groups; `references/motion-primitives/<id>/scene.html` (the sub-composition; `index.html` only mounts it and holds the page background and font) for free groups; staged `assets/…` for asset groups.\n- Canvas `<width>×<height>` and the frame's `pacing`.\n\nIf your dispatch carries `lint` / `check` feedback from a prior pass, address each finding.\n\n## What comes fixed — realize it as given\n\n- **No plan = stop.** If your `### Groups` is `TBD`/empty (Step 3 was skipped), report back and write nothing — never invent groups, templates, or copy.\n- **The plan** is set in your `## Frame` block: the groups, templates / primitives, copy, brand, and anchors. Build it as written. If a plan is genuinely wrong (wrong template or copy), stop and report — the orchestrator re-plans at Step 3.\n- **Transitions** are the assembler's: it hard-cuts between frames. You author the frame's **internal** group→group cuts only.\n- **Audio** lives on the root `index.html`; your frame is silent.\n- **GSAP** is loaded by the host; use the global `gsap` (your frame carries no gsap `<script>`).\n- **Duration** is the frame span length; build your timeline to run `0 … span_len`.\n\n## Build\n\n1. **Read** your `## Frame` block, `frame.md`, and the body of every template / primitive it cites. Reproduce those recipes.\n2. **Work in frame-local time.** Subtract the frame start from every anchor: `local_t = track_t − span_sec[0]`.\n3. **Author** `compositions/frames/<frame_id>.html`: a `<template>` wrapping `#stage` (`data-composition-id=\"<frame_id>\"`), with all `<style>` / `<script>` inside it, and one paused `gsap.timeline({paused:true})` registered at `window.__timelines[\"<frame_id>\"]`, built synchronously, ending in `tl.seek(0)`. Give each group its own container; show it across its frame-local span with `tl.set(\"#g1\",{autoAlpha:1}, start)` / `tl.set(\"#g1\",{autoAlpha:0}, end)` (this 0ms swap is the group→group cut); namespace each group's ids and shader uniforms `g1_` / `g2_`. When forking a template, inline its DOM / CSS / tweens and use the host's global `gsap`. On a `phrase_flow` frame, pace by phrase / energy.\n4. **Self-check and finish.** Run the checklist and fix in place. Writing the file is your terminal action; the orchestrator runs `lint` / `check` and snapshots after assembly (Step 6) and re-dispatches you with any finding.\n\n## Self-check\n\n- `<template>`-wrapped `#stage`; `data-composition-id` == timeline key == filename stem == `<frame_id>`; all `<style>` / `<script>` inside `<template>`; uses the host's global `gsap`.\n- One paused timeline, registered, ending in `tl.seek(0)`; `data-duration` == frame span length; silent.\n- Each group shows across its frame-local span and hides outside it; `t=0` renders; group→group cuts are 0ms; ids / uniforms namespaced.\n- Each group's text / palette match its block's `params` / `copy`, drawn from `frame.md`.\n- `phrase_flow` frames pace by phrase / energy.\n- Seek-safe per `hyperframes-core/determinism-rules.md` (derive variation from indices; swap text / numbers with `tl.set`).\n- Asset clips: muted `<video>`, direct children of `#stage`, with `data-start` / `data-duration` / `data-track-index`. Crossfade outgoing clips to `opacity:0` ending at the next anchor.\n- Final frame is intentional; hero text is readable and clear of the edges.\n",
|
|
301
301
|
"pr-to-video/references/code-vocabulary.md": "# Code vocabulary — the `code-*` animation blocks\n\n<!-- registry-items: allow=data-duration,number-lockup,dark-plus,light-plus,dark-modern,light-modern,dark-2026,light-2026,solarized-light,visual-studio-dark,visual-studio-light,high-contrast,high-contrast-light,clear-dark,clear-light,man-page,red-sands,silver-aerogel,solid-colors -->\n\n**The live search is the source of truth for what the registry has.** The table(s) below are a hand-maintained sample and under-cover by design: run `npx hyperframes catalog --query \"<what you want>\" --json` — it needs nothing installed — before concluding the registry lacks something. Item names here are checked against `registry/registry.json` by `bun run lint:skills`.\n\nPR videos run on two kinds of moving picture: **code** (the lines that changed) and **behavior** (what the change _does_ at runtime). This file is the vocabulary for both — the `code-*` blocks for code beats, and the **mechanism beat** (an invented animated diagram, or a `flowchart` / `data-chart`) for behavior beats. A video that is _all_ code reads flat; **alternate the two** (story-design plans the rhythm; see \"Showing behavior\" below).\n\nFor code beats the registry ships purpose-built **code animation blocks** that render a diff, a typed-on snippet, a morph, a highlight, a scroll, or a 3D/particle/dissolve reveal — far better than hand-built motion. **Reach for one of these first** for any code beat; fall back to hand-authored composition only when none fits.\n\n- **Step 4 (visual design):** for each `diff` / `before_after` / code beat, name the block in the frame's `scene` (e.g. \"the `request()` retry block, ~6 lines, `code-diff`\"). One judgment call: which block.\n- **Step 5 (frame worker):** install the named block and fill it with the real diff/snippet (below). The block is the frame's centerpiece, composited onto code-editorial's navy **Code Surface**.\n\n## Install + use\n\nEvery block installs the same way (confirmed `packages/cli/src/commands/add.ts`):\n\n```bash\nnpx hyperframes add <block-name> # writes compositions/<block-name>.html\n```\n\nIt is a self-contained sub-composition (inlined engine; a paused GSAP timeline the engine seeks per frame). Mount it in the frame as a sub-composition clip:\n\n```html\n<div\n data-composition-id=\"code-diff\"\n data-composition-src=\"compositions/code-diff.html\"\n data-start=\"0\"\n data-duration=\"6\"\n data-track-index=\"1\"\n data-width=\"1920\"\n data-height=\"1080\"\n></div>\n```\n\n**Customize by editing two globals** in the installed HTML's inline `<script>`:\n\n- `window.__TOKENS` — the code content, baked as Shiki tokens: `{ <seq>: { lang, theme, bg, fg, states: [ { code, tokens:[ {key, content, color, fontStyle} ] } ] } }`. Replace `code`/`tokens` with the PR's real snippet(s). `fontStyle` is a bitmask (`&1` italic, `&2` bold). The blocks bake `theme: \"github-dark\"` independently of the `code-snippet-*` themes below.\n- `window.__BLOCK` — selects the effect + timing: 2D `{ id, effect, seq, line?, duration }`; WebGL `{ id, effect, seq, duration, seed }`.\n\nThe timeline registers synchronously at `window.__timelines[id]`. All blocks are **1920×1080** and **deterministic / seek-safe** (no CSS transitions, no rAF, seeded randomness — never `Math.random` / `Date.now`).\n\n## The animation blocks\n\n| Block | What it does | Inputs of note | PR beat |\n| ---------------------------- | ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- |\n| **`code-diff`** | Unified diff inside an editor window: removed lines collapse in red, added lines expand in green, staggered. (6s) | `__TOKENS.diff.states` needs **exactly 2 states** (before, after) — the engine LCS-diffs them. | The diff hunk (before→after); literal add/remove semantics. **The default PR block.** |\n| **`code-morph`** | One snippet transforms into another — shared tokens glide (FLIP), leavers fade out, enterers fade in. (7s) | `__TOKENS.morph.states` (2+); reuse the same token `key` across states for a token that should glide. | A refactor / rename / signature change where continuity matters (not add/remove framing). |\n| **`code-typing`** | Per-character typewriter reveal with a gliding caret. (5s) | single state in `__TOKENS.feature.states[0]`. | A new function / file **written on screen** (\"here's what we added\"). |\n| **`code-highlight`** | A blue band sweeps one line; the rest dim. (5s) | `__BLOCK.line` = target line, **0-based here**. single state. | \"This one line is the change\" — spotlight a changed/important line. Quick callout. |\n| **`code-scroll`** | \"Camera\" scrolls a long file to center a target line, dims the rest. (6s) | `__BLOCK.line` = target, **1-based here**. one long state. | Locating the change in a large file. The only block built for long files. |\n| **`code-3d-extrude`** | Code on a lit, beveled 3D slab that rotates and settles. (8s, WebGL) | single state; `__BLOCK.seed`. `<canvas id=\"gl\">`. | A hero / title code moment (\"the feature\"). Style over density — not for reading a diff. |\n| **`code-particle-assemble`** | GPU particles scatter, then fly to the exact glyph pixels and resolve to syntax color. (8s, WebGL) | single state; `__BLOCK.seed`. | A dramatic climax reveal of a key snippet. Flashiest; not for line-by-line reading. |\n| **`code-shader-dissolve`** | Code \"compiles into existence\" out of seeded noise with a moving dissolve front + edge glow. (7s, WebGL) | single state; `__BLOCK.seed`. | A \"compiles / builds / works now\" beat, or a polished snippet reveal. |\n\n**Gotchas (call out so the worker doesn't trip):**\n\n- **Fit the cadence to the frame's `data-duration`.** Each block carries its own internal timing — `code-typing` types at a fixed per-character speed, so a snippet that's long relative to a short frame **overruns**: the code never finishes typing within `data-duration`, and the chrome beats around it (an underline, a `+N/−M` count-up) never play. Check **char-count × per-char cadence** (plus the block's settle) against `data-duration`, and tune the timing so the **full block lands inside the frame**. This is the one code-motion knob you MUST set to the frame — you're fitting the _timing_, not redesigning the effect (the typewriter / diff / morph stays the block's).\n- `code-diff` and `code-morph` need **≥2 baked states**; every other animation block uses a single state.\n- **Line indexing differs:** `code-highlight` is **0-based** (`line: 1` = the 2nd line); `code-scroll` is **1-based**. Don't off-by-one.\n- **No caption-safe band.** These are full-bleed 1920×1080 code surfaces with no reserved caption area. When captions are enabled, the frame must keep the code panel clear of the bottom caption keep-out band (composite the block in the top ~83%, or scale/inset it) — the worker owns that, not the block.\n\n## The `code-snippet-*` theme family (standalone, not palettes)\n\nThese are **NOT palettes you attach to the animation blocks** — each is its own ready-made ~11–12s composition rendering a full developer UI with baked typing and its own timeline. Use one when you want **ambient realistic context** (a real IDE or terminal on screen), not a focused diff. Install the specific one: `npx hyperframes add code-snippet-<name>`.\n\n- **VS Code workbench (12):** full VS Code window (activity bar, file-tree, tabs, editor with per-char typing, integrated terminal running `pytest`, status bar) in each theme. `dark-plus`, `light-plus`, `dark-modern`, `light-modern`, `dark-2026`, `light-2026`, `monokai`, `solarized-light`, `visual-studio-dark`, `visual-studio-light`, `high-contrast`, `high-contrast-light`. (Each pulls a `background.jpeg` into `assets/`.)\n- **Apple Terminal (12):** macOS Terminal.app window typing a shell command per profile. `apple-terminal-` + `basic`, `clear-dark`, `clear-light`, `grass`, `homebrew`, `man-page`, `novel`, `ocean`, `pro`, `red-sands`, `silver-aerogel`, `solid-colors`.\n\nThe theme is baked into each block (not chosen at runtime); to use a given look, install that block and edit its `codeLines`. For code-editorial's editorial register, prefer the focused animation blocks on the navy Code Surface; reach for a `code-snippet-*` UI only when \"show it in a real editor/terminal\" is the point.\n\n## Showing behavior — the mechanism beat (not a `code-*` block)\n\nA `code-*` block shows **the code**. It does not show **what the code does**. The single biggest cause of a flat PR video is a body that is all code surfaces — so for any change with a visible runtime behavior, plan a **`mechanism` beat** that _animates the behavior_ (story-design owns the rhythm; this is the vocabulary).\n\nA mechanism beat is **not** a registry `code-*` block. It is one of:\n\n- an **invented animated diagram** — SVG / HTML / GSAP the frame worker builds from code-editorial's atoms (hairline-ink nodes / edges / lanes on cream, one coral marker on the active element), the build playing out the behavior across the shot; **or**\n- a **`flowchart` / `flowchart-vertical`** registry block — a process / pipeline / state flow; **or**\n- a **`data-chart`** registry block — a perf / metric comparison (two bars or timelines racing).\n\n`flowchart`, `flowchart-vertical`, and `data-chart` install exactly like a code block (`npx hyperframes add <name>`) and mount as a sub-composition — so when a `mechanism` frame names one in its `scene`, Step 5 pre-installs it alongside the `code-*` blocks. An invented SVG/GSAP diagram needs no install (the worker hand-builds it).\n\n**What to animate, by what the change touches** (the menu story-design plans from):\n\n| The change touches… | Animate (the behavior) | Use |\n| ------------------------------- | ----------------------------------------------------------------------- | ---------------------- |\n| Retry / backoff / resilience | request lifecycle: fire → 500 → wait (delay growing) → retry → 200 | invented SVG/GSAP |\n| Caching / memoization | two lanes racing: cold (hits DB) vs cached (hits cache) | invented SVG/GSAP |\n| Concurrency / parallelism | a serial lane reshaping into parallel lanes | invented / `flowchart` |\n| Race / ordering bug | the broken flow (dropped items, colliding writers), then the fixed flow | invented SVG/GSAP |\n| Performance | two timelines / bars racing, the new one finishing first | `data-chart` |\n| Refactor / migration | a tangled call-graph untangling; same inputs → same outputs | `flowchart` / invented |\n| New endpoint / pipeline / state | data flowing the new path; a state machine lighting up step by step | `flowchart-vertical` |\n\nUnlike a `code-*` block (which owns its own animation), the diagram's motion is **yours** — sequence ≥3 effects into entrance (draw the nodes / lanes) → development (run the flow) → settle (the resolved state + one coral emphasis). Never let it enter then freeze.\n\n## PR beat → block cheat-sheet\n\n| PR moment | Block(s) |\n| -------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| Diff hunk (before → after) | `code-diff` |\n| Refactor / rename / signature change (continuity) | `code-morph` |\n| Failing → passing test (red → green) | `code-morph` or `code-diff` + `code-highlight` on the green line; a `code-snippet-*` VS Code/terminal block for a literal test-runner UI |\n| New function / file typed on | `code-typing` |\n| Spotlight one changed line | `code-highlight` |\n| Walk / scroll a long changed file | `code-scroll` |\n| Hero / title code moment (\"the feature\") | `code-3d-extrude` |\n| \"Compiles / builds / works now\" reveal | `code-shader-dissolve` |\n| Big dramatic snippet reveal / climax | `code-particle-assemble` |\n| A benchmark / metric / count-up | **Not a `code-*` block** — use code-editorial's `number-lockup` (Number/Impact treatment) or the `data-chart` registry block |\n| **What the change DOES at runtime** (behavior, not code) | **Not a `code-*` block** — a `mechanism` beat: an invented SVG/GSAP diagram, or `flowchart` / `flowchart-vertical` / `data-chart`. See \"Showing behavior\" above. |\n| Show the change in a realistic IDE / terminal (ambient) | a `code-snippet-*` VS Code theme (editor) or Apple Terminal profile (CLI run) |\n",
|
|
302
302
|
"pr-to-video/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",
|
|
303
|
-
"pr-to-video/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 code-change 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 a PR explainer the development often _is_ the reveal: the diff hunk typing in, the before→after morph, the impact stat 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 code-change 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 Code editorial videos 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 changed file, five file chips reveal **sequentially** via **cluster→outward expansion** (`center-outward-expansion`), then a **value-scaled counter** (`counting-dynamic-scale`) ticks the +/− line total 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",
|
|
303
|
+
"pr-to-video/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 code-change 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 a PR explainer the development often _is_ the reveal: the diff hunk typing in, the before→after morph, the impact stat 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: overshoot and settle, Slates' default arrival (Part 2, rule 1) → `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 code-change explainer and one that reads as an agent-made PowerPoint. Follow them as written.\n\n## 1. Arrivals overshoot and settle; presses squash\n\nSlates' motion doctrine, which replaces this file's earlier ban on overshoot. An arriving element passes its mark and springs back into place: a spring with a damping ratio of about 0.7–0.85 reads premium (the worker's seek-safe `springEase` in `../../hyperframes-animation/adapters/gsap-easing-and-stagger.md` → Spring Eases, or `back.out` near 1.2–1.4). Position and scale may overshoot; opacity and colour never do. A press squashes the control under the cursor and springs it back. An exit is one motion, 40–50% shorter than its entrance, accelerating away (`power3.in`). What still reads cheap is bounce sprayed on everything at once: give each element its role, and after a landing let the camera or the next element carry the motion.\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. Nothing fully stops — overlap, and give every hold a motivated motion\n\nSlates' motion doctrine, which replaces this file's earlier \"no motion over bad motion\". Moves overlap: the next one starts when the previous is 30–50% done, so the film never comes to a dead stop between beats. One continuous camera carries the piece, every framing a key on one eased path, never a chain of moves that each stop. A hold keeps a motivated motion: the camera creeps toward what is being read, a highlight glides across the line, a total ticks up. Two kinds of motion stay banned because nothing motivates them:\n\n- **No lazy breathing.** Cards or text scaling up and down in a loop to look \"alive\" is the cheap tell.\n- **No drift off the subject.** A slow pan or push that wanders away from what the viewer is reading in the back half of a scene breaks their sightline. A creep toward it is the opposite move, and the right one.\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\nArrivals overshoot and settle, presses squash, exits run 40–50% shorter than entrances; reveal sequentially in the back ~50% timed to the VO (not dumped in the first 25%); moves overlap so nothing fully stops, and every hold carries a motivated motion (a camera creep, a highlight), never breathing or a drift off the subject; 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 that drifts off what is being read; many elements floating independently as \"motion.\" Fix with rule 3 (motivated motion only: a camera creep, a highlight, a count).\n\n**Rigid:** arrivals that stop dead on their mark with no settle, presses with no squash, exits as long as their entrances, moves that finish before the next begins. Fix with rules 1 and 3.\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`) each word overshooting and settling; the camera's slow **push** on the root (`multi-phase-camera`) keeps creeping toward the headline.\n> Scene 2 (1.0–3.0s): as the VO names each changed file, five file chips reveal **sequentially** via **cluster→outward expansion** (`center-outward-expansion`), then a **value-scaled counter** (`counting-dynamic-scale`) ticks the +/− line total 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; the camera keeps creeping toward it; no breathing, no drift off the word.\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 an overshoot-and-settle spring on arrivals.\n",
|
|
304
304
|
"pr-to-video/references/story-design.md": "# Story design — PR → narrative\n\nUse this reference in Step 3 to write `STORYBOARD.md` and `SCRIPT.md` for a **PR-to-video** — a code change (the diff, commits, files, +/− stats, and the people behind it) turned into an explainer. There is **no website and no captured assets**; the PR was ingested into `capture/extracted/` in Step 1.\n\nThis file defines the story: what the video explains, in what order, and why each frame exists. It does not define layout, effects, animation, or file syntax. For exact storyboard syntax follow `../../hyperframes/references/storyboard-format.md` and `../../hyperframes/references/script-format.md`.\n\n## Read first\n\n1. `hyperframes.json` — locked brief: angle (archetype), audience, length, aspect, language.\n2. `frame.md` — tone, type, design system (the shipped preset is **code-editorial**: warm editorial, a serif that thinks, scarce coral, a navy code surface).\n3. `capture/extracted/visible-text.txt` — the assembled PR brief: title, meta (`base ← head · +N/−M across F files`), people, body, commits, changed files, and a budget-bounded set of **representative diff hunks**. This is your source of **information**.\n4. `capture/diff.patch` — the full unified diff, for deeper hunk selection than the brief's excerpt.\n5. `capture/extracted/people.json` — contributors (author / committers / reviewers / commenters), bot-filtered, each with an avatar in `assets/<login>.png` (for the credits close).\n\n## Output\n\n- `STORYBOARD.md` — the explanation plan, one frame per beat.\n- `SCRIPT.md` — the locked narration, only for spoken frames.\n\nEvery frame includes the required storyboard-format fields plus the narrative metadata below.\n\n## Core rule\n\nA diff is a list of edits. A video is a guided act of understanding.\n\nDo **not** narrate the diff file-by-file or read the PR description aloud — that is the single most common failure. **Explain the change** — and where the change has a runtime behavior, **show that behavior in motion** (a `mechanism` beat — see \"Show the behavior\" below), don't just display the lines that changed. Reorder, merge, omit, compress: surface the one change that matters and drop the incidental churn (lockfile bumps, formatting, generated files) unless it _is_ the story. Scene order comes from narrative design, not from the diff's file order or the commit list.\n\n**Value before evidence** (`../../hyperframes-creative/references/story-spine.md`): the viewer-facing payoff — what the change unlocks, fixes, or speeds up — lands by the second beat; the diff and the mechanism are the **evidence** for that claim, never the opening. Implementation is the footnote of the story, not the spine.\n\nDefault to a **plain, technical, unhurried developer voice** — accurate, specific, no hype, no marketing gloss. You are explaining a real change to engineers; respect their time and intelligence. `frame.md` (code-editorial) tunes the voice toward considered and literary; it does not change the structure.\n\n## PR archetypes\n\nChoose **one** archetype (or name a compound). Each is a complete path through understanding a change — do not splice phases from different archetypes.\n\n- **Changelog** — \"here's what shipped.\" Hook naming the headline → **2–4 roughly co-equal change items** → ship/wrap. Best for release PRs, multi-change PRs, \"what's new in vN.\" Items are parallel → `cut` / `push-slide` between them. Rule-of-three is strongest when changes compress. An item with a visible behavior can be a `mechanism` mini-demo instead of a bare `diff`.\n- **Feature-reveal** — \"here's what you can do now.\" Hook (the outcome the feature unlocks, in user language) → the payoff made concrete (`impact` — what now works) → name it (`change`) → the new code typing on (`diff`) → **animate what it does (`mechanism`)** → close (a callback to the promise). Best for a PR that adds **one notable feature**. The promise leads and the code proves it: `diff` and `mechanism` are the evidence for the opening claim — the viewer should already care before the first line of code appears.\n- **Fix-explainer** — \"this was broken; here's the fix.\" Symptom/bug (`problem`) → **animate the broken behavior (`mechanism`)** → the fix as a before→after (`diff`) → **the behavior now working (`mechanism`)** or the result (`impact`). Best for bugfix PRs. Seeing the bug _happen_ and then _not_ happen is the turn — a stronger shape (tension → turn → relief) than the diff alone.\n- **Refactor-walkthrough** — \"same behavior, better shape.\" Hook (the smell / the why) → old shape vs new shape (`before_after`) → **the structure untangling, same inputs → same outputs (`mechanism`)** → payoff (`evidence` — lines removed, perf delta, files touched). Best for refactors, perf, cleanups, migrations. A `mechanism` animation _proves_ \"same behavior, better shape\" far better than asserting it.\n\n**Choosing:** one notable new capability → feature-reveal; a bug fix → fix-explainer; a behavior-preserving cleanup/perf/migration → refactor-walkthrough; many co-equal changes / a release → changelog. Tie-breakers: a feature that also fixes a bug → feature-reveal with the fix as one body beat; a fix that needed a small refactor → fix-explainer (the fix is the headline). **Compound:** write `arc` as `\"<outer> with <inner>\"`, e.g. `\"feature-reveal with changelog\"`. Outer = the macro arc the viewer rides; inner = the body rhythm.\n\n## PR-native frame types\n\nSet each frame's `type` to one of these PR-native values. (The storyboard parser keeps `type` verbatim; it is a narrative + pacing label, not a hard enum.) Each maps to a code-editorial frame treatment and a typical visual — so the type, the design, and the visual stay aligned end to end. Note `mechanism` is the **show-the-behavior** beat (an invented animated diagram), distinct from `diff` (show the code).\n\n| `type` | The frame's job | code-editorial treatment (frame.md) | typical visual (see code-vocabulary.md) |\n| -------------- | --------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------ | --------------------------------------------------------------------------------------- |\n| `hook` | The high-leverage opening 3–5s | Cover | — (or `code-3d-extrude` for a hero code moment) |\n| `problem` | The bug / smell / pain / why-care the PR resolves | Statement or Pull-quote | `code-highlight` (spotlight the offending line) |\n| `change` | Name the change / the feature / the PR itself | Statement or Cover | — |\n| `diff` | The change body — a before→after, a hunk, new code typed on | **Code Surface** (navy) | `code-diff` / `code-morph` / `code-typing` |\n| `before_after` | Explicit old-shape vs new-shape comparison (refactor/fix) | Code Surface (split / morph) | `code-morph` / `code-diff` |\n| `mechanism` | **Show what the change DOES at runtime** — the request retrying, the cache filling, serial→parallel, the race resolved | invented diagram on cream (hairline ink + one coral active marker) | **invented SVG/GSAP**; `flowchart` / `flowchart-vertical` / `data-chart` where they fit |\n| `impact` | The payoff — what now works, what's now possible; opens the video as the promise (feature-reveal) or lands it as the result | Number / Impact | `number-lockup` (no code block needed) |\n| `evidence` | Concrete grounding — `+N/−M`, a passing test, a benchmark | Number / Impact | `code-diff` red→green / `number-lockup` |\n| `credits` | Shipped-by close — the humans behind the change | Closing | — (avatar row from `assets/<login>.png`) |\n| `cta` | The closing ask — pull it, upgrade, read the PR | Closing | — (coral-callout) |\n\nThe body of a PR video **alternates `diff` (show the code that changed) with `mechanism` (show what it does at runtime)**, landing on `impact` / `evidence` (the result). A body that is all `diff` reads as code show-and-tell — the `mechanism` beat is what makes the change _legible_ and is the usual cure for a video that feels flat. Every PR has a change, so at least one `diff` (or `change`) frame always exists; most PRs also have a behavior worth animating.\n\n## Hook strategy\n\nThe hook is the highest-leverage 3–5 seconds. Pick one:\n\n| Strategy | When | Example |\n| ---------------------- | ----------------------------------- | ---------------------------------------------------------------------- |\n| Shocking statistic | The change quantifies the stakes | \"This PR deletes 1,200 lines.\" / \"40% faster cold starts.\" |\n| Counterintuitive claim | The change contradicts intuition | \"We made the client slower — and that fixed it.\" |\n| Pain validation | The audience already feels the bug | \"Every deploy, the same flaky timeout.\" |\n| Concept announcement | The change has a name worth landing | \"Meet retry-with-backoff — flaky networks stop killing your requests.\" |\n| Before/after teaser | The diff is the whole story | \"One line threw. Now it recovers.\" |\n| Stakes / consequence | The \"why care now\" is a real cost | \"This crash hit every user on a flaky network.\" |\n| Direct address | The audience is clearly defined | \"If you've ever waited on a 5-minute CI run…\" |\n\nDo not open with a generic repo/company description. Whatever the strategy, the hook speaks the **viewer's outcome language** (story-spine rule 1) — never file / function / identifier names; numbers only when they carry stakes (\"40% faster\"), not inventory (\"23 files changed\").\n\n## Clarity / rhetoric technique catalog\n\nEach frame's `persuasion` is a **named** technique, not \"explain the change.\" Combine when several are active:\n\n- **Make-concrete** — Worked example (one real request/input) · Analogy (backoff as \"knock, wait longer, knock again\") · Concretization (abstract change → one tangible code line)\n- **Reveal-in-order** — Progressive disclosure (the diff one line at a time) · Build-up (the simple call, then the edge case) · Signposting (\"before… after…\")\n- **Contrast** — Before/after diff · Old shape vs new shape · The bug vs the fix · Two approaches compared\n- **Structure** — Rule of three (three changes) · Numbered enumeration · Question→answer · Frame-then-fill (state the shape, then the code)\n- **Evidence** — `+N/−M` stat · Passing test / green check · Benchmark / perf delta · Causal chain (request → 5xx → retry → success)\n- **Memory & landing** — Callback (return to the hook's bug) · Distillation (the change in one line) · Generalization (this fix → the principle)\n\n## Emotional beats\n\n`beat` is one word or a short compound (e.g. \"Recognition and relief\"). Avoid generic \"positive\". A PR video rides a comprehension arc:\n\n- **Negative valley** — _open the gap_ (`hook`/`problem`): curiosity · frustration · recognition · concern · \"ugh, that bug\"\n- **Pivot** — _orient_ (`change`): clarity · orientation · anticipation · focus\n- **Build** — _build understanding_ (`diff`/`before_after`/`impact`/`evidence`): comprehension · \"aha\" · confidence · momentum · conviction · relief (for a fix)\n- **Resolution** — _land_ (`credits`/`cta`): satisfaction · resolve · \"ship it\" · inevitability\n\nCompound beats are often strongest: \"Recognition _and_ relief\" (a fix), \"Curiosity _and_ confidence\" (a feature).\n\n## The body is a sequence\n\nA PR video's core is **2–5 body frames**, each advancing one change / one before→after / one item, building cumulatively. **Alternate `diff` (the code) with `mechanism` (the behavior)** — don't stack code surfaces:\n\n- **changelog:** a `diff` (or a `mechanism` mini-demo) per change item; parallel → default `cut` / `push-slide`.\n- **feature-reveal:** `impact` (the promise, concrete) → `change` (name it) → `diff` (the code, often typing/morphing on) → `mechanism` (animate it working) → a closing callback to the promise.\n- **fix-explainer:** `problem` (symptom) → `mechanism` (the bug happening) → `diff` (cause + fix, before→after) → `impact` (result, or a `mechanism` of it working).\n- **refactor-walkthrough:** `before_after` structure → `mechanism` (the structure untangling, behavior preserved) → an `evidence` numbers beat.\n\n## Continuity across frames\n\nThis framework builds **one frame per worker** — there is no multi-frame \"continue run.\" A sequence reads as one continuous shot through two storyboard-level levers, both yours:\n\n1. **A consistent stage** — consecutive body frames share one composition idea (the same navy code window filling in, the same before|after split, the same counter advancing), 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 run (`crossfade` for a soft code reveal, `push-slide` for the next change item) and repeat it.\n\nWhen a single element genuinely _transforms_ between two ideas (the failing test flips green, the old function becomes the new one), keep it **within one frame** as a development beat (entrance → transform → settle) — the worker owns that motion (a `code-diff` or `code-morph` block). Note the intent in `scene` / narrative; Step 4 wraps it in a time-coded shot sequence around the block (a `code-diff` / `code-morph`).\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 for the whole video and repeat. Frame 1 is `cut` (no previous frame). Match the seam to the narrative: ordered change items → a consistent `push-slide`; a soft reveal / into-the-cause → `crossfade` / `blur-crossfade`; zooming into a code line or pulling back to the file tree → `zoom-through`; a clean new change item → `cut`.\n\n## The diff is the centerpiece\n\nCode beats live on the **navy code surface** (code-editorial's Code Surface treatment) — but the body is **not** all code (pair them with `mechanism` beats, next section). Plan the code beats deliberately:\n\n- **Feature 2–4 real diff hunks**, named in each frame's `scene` — each a small, legible snippet (~4–12 lines), **never a whole file**. Pull them from `capture/diff.patch` / the brief's \"Representative diff.\"\n- Name **which code animation block** the frame wants in `scene` (the Step-4 visual phase and the worker read it). See `code-vocabulary.md` for the full map; the short version: before→after = `code-diff`; refactor/rename continuity = `code-morph`; new code written on = `code-typing`; spotlight one line = `code-highlight`; walk a long file = `code-scroll`; a hero reveal = `code-3d-extrude` / `code-particle-assemble`.\n- Numbers (`+1,204 / −318`, files touched, perf delta) belong on an `impact` / `evidence` frame as a `number-lockup`, **not** read aloud in narration.\n\n## Show the behavior — the mechanism beat (not just the diff)\n\nA diff shows **what changed in the code**. It does **not** show **what the change does** — and \"what it does\" is usually the more memorable, more explanatory beat. The single biggest reason a PR video feels flat is that every body frame is a code surface or a number: it _tells_ (here are the lines, here is the stat) but never _shows_ (here is the request actually recovering).\n\nA **`mechanism` frame animates the runtime behavior** the PR changes — built as an **invented animated diagram** (SVG / HTML / GSAP on code-editorial's cream ground: hairline-ink nodes / edges / lanes, one coral marker on the active or changed element), where **the build _is_ the teaching** — each part appears on beat, the flow plays out across the shot. It is **not** a code block and **not** a headline. Reach for the `flowchart` / `flowchart-vertical` / `data-chart` registry blocks where they fit; otherwise invent it (visual-design.md's diagram / abstract-graphics register).\n\nPlan **at least one `mechanism` beat** for any PR with a visible runtime behavior (most feature and fix PRs have one). What to animate, by what the change touches:\n\n| The change touches… | Animate (the behavior, not the code) |\n| ------------------------------- | -------------------------------------------------------------------------------------------------- |\n| Retry / backoff / resilience | a request lifecycle: fire → 500 → wait (delay growing) → retry → 200 |\n| Caching / memoization | two lanes racing: cold (slow, hits the DB) vs cached (fast, hits the cache) |\n| Concurrency / parallelism | a serial single lane reshaping into parallel lanes |\n| Race / ordering bug | the broken behavior first (items dropped, two writers colliding), then the fixed flow |\n| Performance | two timelines / bars racing, the new one finishing first (a `data-chart` fits) |\n| Refactor / migration | a tangled call-graph untangling into a clean one; same inputs → same outputs |\n| New endpoint / pipeline / state | data flowing through the new path; a state machine lighting up step by step (`flowchart-vertical`) |\n\nName the mechanism in the frame's `scene` (\"animate the request retrying: fire → 500 → backoff → 200, invented SVG flow\") so Step 4 and the worker build it. The `diff` frame and the `mechanism` frame are **complementary** — the diff is the proof in code, the mechanism is the proof in motion; alternate them rather than stacking code surfaces.\n\n## The close: a credits / shipped-by scene\n\nA PR is shipped by people, and every PR video closes with a `credits` frame naming them. `capture/extracted/people.json` lists real contributors (bot-filtered), and Step 1 downloaded each avatar to `assets/<login>.png` (the `avatarFetched: true` entries — confirm with `ls assets/`). `reviewDecision` (e.g. `APPROVED`) is honest grounding.\n\n> **The PR `author` only opened the PR — not necessarily who wrote the code.** A teammate often authors most commits. Lead the credits with `committer`s by `commitCount`, not the opener.\n\nThe `credits` frame is an avatar row with names + roles + an \"approved\" check. On that frame only, set `asset_candidates` to 1–6 entries of `assets/<login>.png — <login>, <role>` (commit authors by `commitCount` first, then reviewers; only `avatarFetched: true` logins). The body stays code-only — avatars appear **only** on this close, never decorating a diff frame. The frame sits in the Step 3 proposal like any other, so the user can cut it there; skip it yourself only when no avatar was fetched.\n\n> **Narrate the name, not the handle.** `people.json` carries a `name` field (GitHub display name, e.g. \"Miguel Angel Simon Sierra\") next to `login` for whichever contributors `gh` already named (author, commit authors, `mergedBy`); it's `null` for reviewers/commenters/assignees, which `gh pr view` only ever gives a bare login. Before writing this frame, resolve any `null` name yourself for the 1-6 people going on the close: `gh api users/<login> --jq .name`. Voiceover always says the **name** (first name is enough — \"Shipped by Miguel, reviewed by Wenbo\") and **never** reads a raw `@login` aloud (`@miguAng18947550` spoken by TTS is the failure mode this exists to avoid). On-screen text under each avatar can show both, name first, handle small and secondary: `Miguel Angel Simon Sierra` / `@miguel-heygen`. When a name still doesn't resolve (GitHub has no public name for that user either), fall back to the login on-screen and skip that person from the spoken line rather than reading the handle.\n\nEvery other frame has **no** `asset_candidates` (the visuals are invented downstream from `scene` + the diff).\n\n### Versions on the end card (cta / changelog)\n\nA `cta` (\"upgrade to vN\", \"npm i pkg@N\") or a changelog \"what's new in vN\" wants a real version — and **a version is the one fact you must never invent.** A PR carries no shipping version, so Step 1 resolves a best-effort one for MERGED PRs and writes it into `capture/extracted/visible-text.txt` as a `Shipped in: <version> (<source>)` meta line (mirrored in `capture/pr.json` as `shipped_version` / `version_source`). Use it:\n\n- **`Shipped in:` present** → use that exact version on the end card. A `version_source` of `unreleased` means the change is on the default branch but not yet in a tagged release — say \"shipping in the next release\" rather than pinning a tag.\n- **No `Shipped in:` line** (open PR, or no version resolvable) → **state the repo / PR URL only** (\"read the PR at github.com/…\", \"pull it\") and do **not** name or guess a version number.\n\n## Per-frame length budget — ≤ 9 s, word count is the real measurement\n\nThe largest quality bug in PR videos is **scripts that talk too long**. TTS runs at **~2.2 words/second**, so a 45-word \"7-second\" script is really 20 seconds, and the visual phase has to pad the tail with idle drift (the video reads as \"shimmering\"). Budget by word count:\n\n| Bound | Words (@2.2 wps) | Duration | When |\n| -------------------------- | ---------------- | ------------ | ----------------------------------------------------------------------------- |\n| **Soft target — default** | **≤ 19** | **≤ 9 s** | Every frame aims here; the cut stays alive. |\n| **Exception — ≤ 2 frames** | ≤ 26 | ≤ 12 s | The main `diff` (the one change you must explain) or a causal-chain `change`. |\n| **Hard cap** | > 26 | > 12 s | Trim or split. |\n| **Whole-film target** | ≤ ~400 | up to ~3 min | Sweet spot ~30–90 s (≤ ~155 words); the body carries the load. |\n\nEstimate while writing: `duration ≈ ceil(word_count / 2.2)`. 29 words → 13s (trim); 17 words → 8s; 12 words → 6s. Trim techniques: cut the lead-in clause (\"Until now, the agent shipped…\" → \"The agent shipped…\"); move numbers off-script onto a counter; split only when the halves carry distinct beats (cause then effect). **Silent frames are allowed and common** — a diff typing on, a before→after morph, a counter running. Set `voiceover` empty, omit from `SCRIPT.md`, and make `narrativeRole` carry it. A complex change does not need a long script; it needs a careful one — if you can't headline the change in 19 words, the headline isn't sharp yet.\n\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 — \"Three retries — then it backs off — then it gives up clean\" — hands the shot its reveal cadence for free; a single long clause leaves the frame nothing to pace to.\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\n```md\n## Frame N — Short name\n\n- scene: one clear visual idea — name the hunk/file + the code-\\* block (\"the request() retry block, ~6 lines, code-diff\")\n- voiceover: \"spoken guide text, or empty\"\n- duration: ceil(word_count / 2.2) seconds\n- transition_in: crossfade\n- status: outline\n- src: compositions/frames/NN-short-name.html\n- type: diff\n- persuasion: Before/after contrast\n- beat: comprehension\n- blueprint: <candidate id from the role→blueprint menu, or omit — a code beat usually omits it (the code-\\* block is the shape)>\n\nnarrativeRole: What this frame does in the viewer's understanding (its job, not what's on screen).\nkeyMessage: The one thing the viewer should understand after this frame (one sentence).\n```\n\nThe `credits` frame additionally carries an `asset_candidates:` line (see the credits section); no other frame does.\n\n## Final checklist\n\n- One archetype is named (compound only when explicit); the sequence is narrative-driven, not diff-order-driven.\n- The opening uses a named hook strategy; you do not read the PR description aloud.\n- The hook is in viewer-outcome language (no file / function / identifier names), and the video's `message` lands by beat 2 (story-spine).\n- Each frame has one job; the body builds cumulatively, **alternating `diff` (the code) with `mechanism` (the behavior)** + `impact` / `evidence` — not a single isolated body frame, and not an unbroken stack of code surfaces.\n- Every frame has `type` (PR-native), `persuasion` (a named technique), and `beat` (specific). The emotional arc matches the archetype (fix = frustration → relief; feature = curiosity → confidence).\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 from the role→blueprint menu where a proven shape fits (a code beat usually omits it — the `code-*` block is the shape).\n- **2–4 real diff hunks** featured, each a small legible snippet (not a whole file), each naming its `code-*` block in `scene`.\n- **At least one `mechanism` beat** animates what the change _does_ at runtime (an invented diagram, or a `flowchart` / `data-chart`), named in its `scene` — unless the PR genuinely has no visible behavior (a pure docs / config bump). The body is not an unbroken run of code surfaces.\n- Transitions use only registry names and repeat 2–3 types; frame 1 is `cut`.\n- The video closes with a `credits` frame (skipped only when no avatar was fetched); `asset_candidates` is absent on every other frame (1–6 `assets/<login>.png` entries on the close, `avatarFetched: true` only).\n- Each `script` fits the budget — ≤ 19 words / ≤ 9 s default, ≤ 2 frames at the ≤ 26 / ≤ 12 s exception; `duration = ceil(word_count / 2.2)`, not a guess.\n- `SCRIPT.md` contains only locked spoken narration; silent frames are intentional and omitted from it.\n",
|
|
305
|
-
"pr-to-video/references/visual-design.md": "# Visual design — PR-to-video per-frame shot method\n\n> The method behind **Step 4 (Frame visual design)**. You (the orchestrator) read it to **enrich `STORYBOARD.md` frames in place** — story-design wrote the skeleton (each frame's `scene`, `voiceover`, `transition_in`, the narrative fields, and optionally a candidate blueprint id); you add how each frame **looks and moves**. The unit you write per frame is a **time-coded shot sequence** — a shot directed across its whole duration, not a static slide. You write **no HTML** (that's the frame workers). A PR video is **mostly invented** — typography, number-lockups, mechanism diagrams — so you **design** those elements; the two exceptions are **code beats** (a ready-made `code-*` registry block) and the **credits close** (real contributor avatars), both covered below. `frame.md` is your palette/type truth by role. Layout is a compact vocabulary in this file (the **Layout** section below), stated inline per Scene; motion vocabulary + the motion doctrine + the seek-safe core → `motion-language.md`; the proven shapes → `../../hyperframes-animation/blueprints-index.md` + `blueprints/<id>.md`; the `code-*` blocks → `code-vocabulary.md`; concrete rules resolve in Step 5 from this skill's local `../../hyperframes-animation/rules/`. Adding palette theory or a generic font rule here? Wrong home — `frame.md` + `hyperframes-creative`.\n\n## The unit is a time-coded shot sequence\n\nA frame's visual layer is **a sequence of time windows paced to the voiceover**, not a bag of effect tags. The failure that reads as PowerPoint is **front-loading**: the agent rushes the whole canvas on screen in the first ~25%, and then it just sits. A time-coded shot sequence written **against the VO** makes that impossible: each window states what is on screen and what is moving, and **nothing appears before the voiceover reaches it.** In a PR explainer the development often _is_ the reveal — the diff hunk typing in, the before→after morph, the request-retry diagram running, the impact stat landing. Let the build _be_ the message.\n\nWrite each frame as a handful of windows cued by the spoken line:\n\n```\nScene 1 (0.0–Xs): only what the VO is saying at t=0 enters — never the whole canvas\nScene 2 (Xs–Ys): the next piece reveals as the VO names it (a file chip / the hunk / a node / a stat)\n … one window per spoken cue — as many or as few as the line calls for\nScene N (…–end): content has resolved; hold the read (stillness; subtle jitter at most)\n```\n\n- Each `Scene` line names **what's on screen**, **what moves in this window**, and **where it sits** (layout, inline). Times are real seconds across the frame's `duration`.\n- **Pace reveals to the voiceover; never front-load.** This is the core anti-PowerPoint mechanism (→ `motion-language.md` Part 2 Rule 2). At t=0 show only what the VO is saying then; reveal each further piece — a line, a file chip, the hunk, a stat — **when the VO names it**, spreading reveals across the shot and especially the **back ~50%**. **The window count = the number of spoken cues the line calls for.** There is **no fixed count and no mandatory \"middle\" act**; the only sin is dumping everything up front.\n- **End on a held read.** Once the content has resolved it holds and reads — **prefer stillness to bad motion**: no forced camera drift, no lazy breathing, no back-half pan/push; at most a subtle jitter keeps it alive (→ `motion-language.md`). Only the final frame has a real exit; every other frame's exit is the harness transition (story's `transition_in`).\n- A **deliberately held** frame — content already revealed, now reading still — is legitimate and often right (a climax, a breather). The failure is never \"too still\"; it is **front-loaded-then-frozen**. Place held beats deliberately for rhythm (allocate them in `## Video direction`).\n\n## Pick the shape — instantiate a blueprint\n\nDon't invent each shot from scratch. The frame's **role** (its `type` / `beat`) points to a proven shape:\n\n1. **Match the role to a blueprint.** Open `../../hyperframes-animation/blueprints-index.md`, find the frame's role in the **role→blueprint menu**, and pick the blueprint whose intent fits this beat (story may already have named a candidate id — confirm or override it). Read that `blueprints/<id>.md`: it is a short, domain-agnostic, **time-coded shot template with `[slots]`** and a named **signature move**.\n\n2. **Instantiate its `[slots]` with THIS frame's content** — three postures:\n - **Reproduce** — the blueprint fits the beat and your content maps onto its slots cleanly. Fill every `[slot]` and follow its Scene timing.\n - **Adapt** — the _structure_ fits but the content / surface doesn't. State **what you keep / what you change** in one line, then write the adapted Scene lines. You may never drop the **signature move**, and you keep the reveals **paced to the VO**.\n - **Compose** — no blueprint fits the beat. Build the shot from the **motion vocabulary** in `motion-language.md`: still pace reveals to the VO. Mark it `blueprint: compose`.\n\n3. **Keep the signature move.** Whichever posture, the blueprint's signature move is the spine of the shot — carry it through.\n\n> A **code beat** is the one place you don't pick a blueprint for the centerpiece — the `code-*` block _is_ the shape (see **PR code beats** below). You still write the Scene sequence for the surrounding surface.\n\n## What you add to each frame\n\nStory-design's `## Frame N` block already carries the narrative. You append the shot. Story's `scene` / `voiceover` / `transition_in` / role fields stay untouched.\n\n```\n## Frame 4 — The retry fix\n- scene: the request() retry hunk lands on the navy code surface ← refine only if it could read sharper\n- voiceover: \"…\" ← story's; leave it\n- transition_in: crossfade ← story's; leave it\n- type: diff ← story's (PR-native)\n- persuasion: Show-the-change\n- beat: clarity\n- blueprint: compose ← code beats compose the surround; the block owns the code motion\n- focal: code-diff — the request() retry block, ~6 lines ← you add: the code-* block IS the focal\n- roles: code surface = foreground subject · file header = supporting · dim grid = background\n- sfx: keyclack-soft, soft-confirm\n\nScene 1 (0.0–1.0s): the navy Code Surface window seats in (scale-in + soft shadow), file header \"client/request.ts\" types on — Centered, ~60% of frame. Slow push-in underneath.\nScene 2 (1.0–3.2s): the camera settles onto the hunk; the `code-diff` block runs its own before→after on its cadence (the worker fits it to the duration) — you do not re-specify the code motion.\nScene 3 (3.2–4.5s): a coral underline draws on the changed line as the VO names it; a `+6/−2` count-up ticks beside the header; settles and holds STILL.\n```\n\nThe lightweight tags:\n\n- **`blueprint:`** — the id you instantiated (with `(Reproduce)` / `(Adapt)`), or `compose`. One id per frame.\n- **`focal:`** — for a concept/mechanism beat, the **invented** hero (a hero word, a diagram, a number-lockup); for a **code beat**, the **`code-*` block** (name the block + the hunk); for the **credits** close, the avatar row.\n- **`roles:`** — each element's role: `foreground subject` · `background` (full-bleed, dim 30–50%) · `supporting`. Invented elements you **design**; the only real assets are the credits `assets/<login>.png` avatars (named in story's `asset_candidates`).\n- **`sfx:`** — name the sound the beat wants; the audio script's `fetch-sfx` retrieves it and the assembler mounts it at root — you only **name** it, never embed `<audio>`.\n\n**Layout + motion are stated INLINE in each Scene line** — name the template / density / depth as part of \"where it sits\", and name the move from `motion-language.md`'s vocabulary; let it settle on a long-tail curve (`power3` default). Never write px / scale / ease curves / ms (the worker writes those).\n\n## PR code beats — name a `code-*` block\n\nFor a `diff` / `before_after` / code beat, the frame's centerpiece is a **ready-made `code-*` registry block**, not an invented HTML visual — the one exception to \"invent every visual.\"\n\n- **Name the block in `scene` + `focal`.** Pick the one that fits the beat (before→after = `code-diff`; refactor/rename = `code-morph`; new code written on = `code-typing`; spotlight a line = `code-highlight`; walk a long file = `code-scroll`; a hero reveal = `code-3d-extrude` / `code-particle-assemble`). Full map → `code-vocabulary.md`. Name the hunk too (\"the `request()` retry block, ~6 lines\"). The block is the `focal`; the Step-5 worker installs + fills it with the real diff.\n- **The block owns the code animation; your Scenes choreograph the surrounding Code Surface.** The block _is_ the development beat (the diff/typewriter/morph plays on its own cadence — the worker only fits it to the frame's `data-duration` so a long snippet doesn't overrun). Your Scene windows move the code-editorial **Code Surface** around it: the navy window seating in, the file header typing on, the camera settling onto the hunk, a `+N/−M` `count-up`, a coral underline drawing on the landed line. Name those moves inline; **do not re-specify the code animation itself.** A code beat is usually `blueprint: compose` (the block is the shape).\n\n## PR mechanism beats — invent an animated diagram of the behavior\n\nA **`mechanism`** frame is the **show-the-behavior** beat — the antidote to a video that only shows code + text. Its `focal` is an **invented animated diagram** that plays out what the change _does_ at runtime (the request retrying, the cache filling, serial→parallel, the race resolved) — **not** a `code-*` block and **not** a headline.\n\n- **Name the behavior + the diagram in `scene` + `focal`.** e.g. `scene: \"animate the request lifecycle — fire → 500 → backoff → retry → 200, invented SVG flow\"`; `focal: the request-lifecycle flow`. Reach for the `flowchart` / `flowchart-vertical` / `data-chart` registry blocks where they fit (name them in `scene` so Step 5 pre-installs them); otherwise the worker builds it in SVG / HTML / GSAP from code-editorial's atoms.\n- **The build IS the shot sequence.** Unlike a code block (which owns its own animation), the diagram is yours to choreograph across the Scene windows — the lanes / nodes draw on (Scene 1), the flow runs / the lane splits / the front advances as the VO names each step (middle Scenes), the resolved state + one coral emphasis lands (final Scene). Never let it enter then freeze.\n- **Stay on code-editorial's cream ground, hairline-ink.** Nodes / edges / lanes in hairline ink on cream; **one coral marker** on the active or changed element; mono labels. Not the navy code surface (that's for code), not heavy shapes / bokeh. Plan it into the top ~83% (caption keep-out).\n\nA `mechanism` frame carries **no** `asset_candidates` (it's invented, like every non-credits frame).\n\n## Impact & credits\n\n- **Impact / evidence** — numbers (`+1,204 / −318`, files touched, perf delta) go on an `impact` frame as a **`number-lockup`** (code-editorial's Number/Impact treatment): name it the `focal`, reveal it with a `count-up` paced to the VO.\n- **Credits close** — the optional `credits` frame uses the real `assets/<login>.png` avatars (named in story's `asset_candidates`) as the `focal`: an avatar row that staggers in. This is the one frame with non-empty `asset_candidates` and real assets.\n\n## Inventing the visual (non-code beats)\n\nEvery non-code, non-credits beat (`hook` / `change` / `cta` / concept) is **designed**, not captured. Three first-class treatments:\n\n- **Typographic / kinetic type** — a hero word, the PR's headline claim, a stat. Treat type as the subject: full-bleed scale, weight contrast, one emphasized term. Strongest for hooks and the cta.\n- **Abstract graphics** — shapes / paths / geometry that _embody_ the idea the script names; don't decorate with generic bokeh.\n- **Diagram / data-viz** — the mechanism diagrams above, a `data-chart` for a perf delta, a number-lockup. The build (each part on beat) is the teaching — design it to assemble across the Scenes.\n\nMake the invented hero **fill 40–60% of the frame** — big enough to read; don't shrink the one designed element into decoration around empty space.\n\n## Layout — named inline per Scene\n\nState each Scene's layout as part of \"where it sits.\" **If the blueprint (or the code-\\* block) already implies a composition, that wins** — describe it directly; the vocabulary below is for composing freely. Never write px / scale / shadow (the worker does). One frame's layout can EVOLVE across its Scenes. Use **≥3 different framings per video**; never the same framing twice in a row.\n\n- **Framing vocabulary** — centered (hero / climax / a single code surface) · rule-of-thirds · split-screen (before/after, two surfaces) · layered-depth (immersive) · asymmetric 60/40 or 70/30 (a code surface + a caption rail) · triptych (three changes at once) · full-width strip (a file list / timeline). Let the beat decide, not a quota.\n- **Density** — primary visual ≥ 40% of canvas; ≥ 3 depth layers; never a lone small cluster floating in empty space. Openings/closings are prone to emptiness — add environmental layers (a dim grid, low-opacity scanlines, brand-color ambient). Squint test: after blur you can still pick out the #1 element.\n- **Hierarchy** — combine ≥ 2 of size (3:1) / weight (800 vs 400) / contrast / position (upper-third is golden) / motion, so one element clearly dominates.\n- **Depth** — layer 2–3 of: size, blur, opacity gradient, overlap, shadow-stack, counter-scale on a push.\n- **Don't show**: nav bars, footers, scrollbars, real cursors / browser chrome, generic decorative shapes, floating bokeh / purple-blue \"AI\" gradients (banned). The navy code surface is for code beats only; mechanism diagrams stay on cream.\n\n## Portrait & square (non-16:9 canvases)\n\nThe zones, density, hierarchy, and depth principles all still apply; the **aspect ratio** changes, and a wide layout doesn't transplant into a tall one — design for the storyboard's `format` from the start.\n\n- **Stack vertically, not side-by-side** — split-screen / triptych / 60-40 become top/bottom stacks. A code surface runs nearly full-width in portrait with fewer visible lines.\n- **Vertical center moves with the canvas** — anchor a centered hero around **y ≈ 0.42 × height** (portrait ≈806, square ≈454), not a fixed 540.\n- **Type runs larger, fewer words per line.** **Travels well to portrait:** Centered, Layered Depth, Full-Width Strip; **avoid** wide Split Screen / Triptych — use stacked equivalents.\n\n## `## Video direction` — write the invariants ONCE\n\nThe whole video shares one look and one motion grammar. Write a **`## Video direction`** block ONCE at the top of `STORYBOARD.md` so every frame inherits it and per-frame Scene lines carry only the **delta**. This block is load-bearing — **keep it.**\n\n- **palette system** — from `frame.md` (code-editorial): which roles map to which hues. Never invent.\n- **motion grammar + reveal model** — long-tail eases (`power3` default, smooth over bouncy) + the **VO-paced reveal** model + what may stay alive during a hold (subtle jitter at most) (→ `motion-language.md`).\n- **rhythm / held-frame allocation** — name the **held / breather frames** so the video varies its energy.\n- **negative list** — off-brand textures, **plus both motion failure modes** — slideshow (front-load then freeze) and screensaver (everything floating independently) (→ `motion-language.md`).\n\nDo **not** repeat these per frame.\n\n## Palette & type — from `frame.md`, never invented\n\n- **Palette** — `frame.md` (code-editorial) is the color truth; apply its roles per frame. Generic basics → `hyperframes-creative/references/house-style.md`.\n- **Type** — fonts resolve via `frame.md`'s type tokens; reference them **by role** (display / body / mono / the pack's ramp), never by raw family or px. Code surfaces and mechanism labels use the **mono** role. Typography craft → `hyperframes-creative/references/typography.md`.\n\n## Caption-band keep-out (plan side)\n\nThe bottom ~17% of the canvas is reserved for the caption pill. Plan every frame's content into the **top ~83%** (the worker enforces the pixel cutoff). When captions are enabled, primary content caps at the band top, and a centered hero anchors at **y ≈ 0.42 × height** (landscape ≈454, portrait ≈806); background / ambient layers are exempt and may stay full-bleed. Holds even when captions are disabled — bottom-edge consistency.\n\n## Where the detail lives\n\n| For… | Read |\n| ------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- |\n| the proven shapes + role→blueprint menu + how to pick | `../../hyperframes-animation/blueprints-index.md` → `blueprints/<id>.md` |\n| the `code-*` blocks (pick + fill for a code beat) | `code-vocabulary.md` (local) |\n| motion — shot model, vocabulary, holds, idle budget, stillness, seek-safe | `motion-language.md` (local) |\n| layout — framing, density, depth, hierarchy, inventing the visual, caption band | the **Layout** + **Inventing the visual** sections in this file |\n| concrete eases / ms / stagger + rule recipe bodies (Step 5) | local `../../hyperframes-animation/rules/` (the frame worker reads it; you don't) |\n| palette + type tokens | the project's `frame.md` (code-editorial); basics → `hyperframes-creative` |\n| within-frame cuts / seams (zoom-through · cut-the-curve · waterfall) | `cut-catalog.md` (the worker builds them inside the composition) |\n| transitions | story-design owns `transition_in`; you don't touch it |\n\n## Before you finish — checklist\n\n- **`## Video direction`** written once at the top (palette · motion grammar + shot model + idle budget · stillness allocation · negative list incl. both failure modes); per-frame entries are deltas.\n- Every frame is a **time-coded shot sequence** with real second windows across its `duration` — not a tag bag.\n- **No frame front-loads** — at t=0 only what the VO is saying enters; each further piece reveals on its spoken cue, across the back ~50%. Window count follows the VO.\n- Every frame names a **`blueprint:`** id (Reproduce / Adapt) or `compose`; an Adapt keeps the signature move; nothing collapses to a single front-loaded dump.\n- **Code beats** name a `code-*` block as the `focal`, let the block own the code animation, and choreograph only the surrounding Code Surface in the Scenes.\n- **Mechanism beats** name an **invented animated diagram of the behavior** (or a `flowchart` / `data-chart`), choreographed across the Scenes on code-editorial's cream ground with one coral marker — not a code block, not typography; the body is not an unbroken run of code surfaces.\n- **Impact** uses a `number-lockup` with a `count-up`; the **credits** close uses the real avatars as the `focal`.\n- Each non-code, non-credits frame names its **invented** `focal` + per-element `roles`, kept few and load-bearing.\n- Layout + motion named **inline** per Scene (no px / ease curves / ms / JS).\n- Content planned into the top ~83% (caption band clear); palette / type pulled from `frame.md` by role.\n- You wrote no HTML.\n",
|
|
305
|
+
"pr-to-video/references/visual-design.md": "# Visual design — PR-to-video per-frame shot method\n\n> The method behind **Step 4 (Frame visual design)**. You (the orchestrator) read it to **enrich `STORYBOARD.md` frames in place** — story-design wrote the skeleton (each frame's `scene`, `voiceover`, `transition_in`, the narrative fields, and optionally a candidate blueprint id); you add how each frame **looks and moves**. The unit you write per frame is a **time-coded shot sequence** — a shot directed across its whole duration, not a static slide. You write **no HTML** (that's the frame workers). A PR video is **mostly invented** — typography, number-lockups, mechanism diagrams — so you **design** those elements; the two exceptions are **code beats** (a ready-made `code-*` registry block) and the **credits close** (real contributor avatars), both covered below. `frame.md` is your palette/type truth by role. Layout is a compact vocabulary in this file (the **Layout** section below), stated inline per Scene; motion vocabulary + the motion doctrine + the seek-safe core → `motion-language.md`; the proven shapes → `../../hyperframes-animation/blueprints-index.md` + `blueprints/<id>.md`; the `code-*` blocks → `code-vocabulary.md`; concrete rules resolve in Step 5 from this skill's local `../../hyperframes-animation/rules/`. Adding palette theory or a generic font rule here? Wrong home — `frame.md` + `hyperframes-creative`.\n\n## The unit is a time-coded shot sequence\n\nA frame's visual layer is **a sequence of time windows paced to the voiceover**, not a bag of effect tags. The failure that reads as PowerPoint is **front-loading**: the agent rushes the whole canvas on screen in the first ~25%, and then it just sits. A time-coded shot sequence written **against the VO** makes that impossible: each window states what is on screen and what is moving, and **nothing appears before the voiceover reaches it.** In a PR explainer the development often _is_ the reveal — the diff hunk typing in, the before→after morph, the request-retry diagram running, the impact stat landing. Let the build _be_ the message.\n\nWrite each frame as a handful of windows cued by the spoken line:\n\n```\nScene 1 (0.0–Xs): only what the VO is saying at t=0 enters — never the whole canvas\nScene 2 (Xs–Ys): the next piece reveals as the VO names it (a file chip / the hunk / a node / a stat)\n … one window per spoken cue — as many or as few as the line calls for\nScene N (…–end): content has resolved; hold the read with a motivated motion (a camera creep toward it, a highlight, a count)\n```\n\n- Each `Scene` line names **what's on screen**, **what moves in this window**, and **where it sits** (layout, inline). Times are real seconds across the frame's `duration`.\n- **Pace reveals to the voiceover; never front-load.** This is the core anti-PowerPoint mechanism (→ `motion-language.md` Part 2 Rule 2). At t=0 show only what the VO is saying then; reveal each further piece — a line, a file chip, the hunk, a stat — **when the VO names it**, spreading reveals across the shot and especially the **back ~50%**. **The window count = the number of spoken cues the line calls for.** There is **no fixed count and no mandatory \"middle\" act**; the only sin is dumping everything up front.\n- **End on a held read.** Once the content has resolved it holds and reads — **keep a motivated motion alive**: a camera creep toward what is being read, a highlight gliding across the line, a total ticking up; never lazy breathing or a drift off the subject (→ `motion-language.md`). Only the final frame has a real exit; every other frame's exit is the harness transition (story's `transition_in`).\n- A **deliberately held** frame — content already revealed, now being read with only a motivated motion — is legitimate and often right (a climax, a breather). The failure is never \"too still\"; it is **front-loaded-then-frozen**. Place held beats deliberately for rhythm (allocate them in `## Video direction`).\n\n## Pick the shape — instantiate a blueprint\n\nDon't invent each shot from scratch. The frame's **role** (its `type` / `beat`) points to a proven shape:\n\n1. **Match the role to a blueprint.** Open `../../hyperframes-animation/blueprints-index.md`, find the frame's role in the **role→blueprint menu**, and pick the blueprint whose intent fits this beat (story may already have named a candidate id — confirm or override it). Read that `blueprints/<id>.md`: it is a short, domain-agnostic, **time-coded shot template with `[slots]`** and a named **signature move**.\n\n2. **Instantiate its `[slots]` with THIS frame's content** — three postures:\n - **Reproduce** — the blueprint fits the beat and your content maps onto its slots cleanly. Fill every `[slot]` and follow its Scene timing.\n - **Adapt** — the _structure_ fits but the content / surface doesn't. State **what you keep / what you change** in one line, then write the adapted Scene lines. You may never drop the **signature move**, and you keep the reveals **paced to the VO**.\n - **Compose** — no blueprint fits the beat. Build the shot from the **motion vocabulary** in `motion-language.md`: still pace reveals to the VO. Mark it `blueprint: compose`.\n\n3. **Keep the signature move.** Whichever posture, the blueprint's signature move is the spine of the shot — carry it through.\n\n> A **code beat** is the one place you don't pick a blueprint for the centerpiece — the `code-*` block _is_ the shape (see **PR code beats** below). You still write the Scene sequence for the surrounding surface.\n\n## What you add to each frame\n\nStory-design's `## Frame N` block already carries the narrative. You append the shot. Story's `scene` / `voiceover` / `transition_in` / role fields stay untouched.\n\n```\n## Frame 4 — The retry fix\n- scene: the request() retry hunk lands on the navy code surface ← refine only if it could read sharper\n- voiceover: \"…\" ← story's; leave it\n- transition_in: crossfade ← story's; leave it\n- type: diff ← story's (PR-native)\n- persuasion: Show-the-change\n- beat: clarity\n- blueprint: compose ← code beats compose the surround; the block owns the code motion\n- focal: code-diff — the request() retry block, ~6 lines ← you add: the code-* block IS the focal\n- roles: code surface = foreground subject · file header = supporting · dim grid = background\n- sfx: keyclack-soft, soft-confirm\n\nScene 1 (0.0–1.0s): the navy Code Surface window seats in (scale-in + soft shadow), file header \"client/request.ts\" types on — Centered, ~60% of frame. Slow push-in underneath.\nScene 2 (1.0–3.2s): the camera settles onto the hunk; the `code-diff` block runs its own before→after on its cadence (the worker fits it to the duration) — you do not re-specify the code motion.\nScene 3 (3.2–4.5s): a coral underline draws on the changed line as the VO names it; a `+6/−2` count-up ticks beside the header; settles, and the camera keeps creeping toward it.\n```\n\nThe lightweight tags:\n\n- **`blueprint:`** — the id you instantiated (with `(Reproduce)` / `(Adapt)`), or `compose`. One id per frame.\n- **`focal:`** — for a concept/mechanism beat, the **invented** hero (a hero word, a diagram, a number-lockup); for a **code beat**, the **`code-*` block** (name the block + the hunk); for the **credits** close, the avatar row.\n- **`roles:`** — each element's role: `foreground subject` · `background` (full-bleed, dim 30–50%) · `supporting`. Invented elements you **design**; the only real assets are the credits `assets/<login>.png` avatars (named in story's `asset_candidates`).\n- **`sfx:`** — name the sound the beat wants; the audio script's `fetch-sfx` retrieves it and the assembler mounts it at root — you only **name** it, never embed `<audio>`.\n\n**Layout + motion are stated INLINE in each Scene line** — name the template / density / depth as part of \"where it sits\", and name the move from `motion-language.md`'s vocabulary; let it arrive with an overshoot-and-settle (a spring; `power3` only for what must not overshoot). Never write px / scale / ease curves / ms (the worker writes those).\n\n## PR code beats — name a `code-*` block\n\nFor a `diff` / `before_after` / code beat, the frame's centerpiece is a **ready-made `code-*` registry block**, not an invented HTML visual — the one exception to \"invent every visual.\"\n\n- **Name the block in `scene` + `focal`.** Pick the one that fits the beat (before→after = `code-diff`; refactor/rename = `code-morph`; new code written on = `code-typing`; spotlight a line = `code-highlight`; walk a long file = `code-scroll`; a hero reveal = `code-3d-extrude` / `code-particle-assemble`). Full map → `code-vocabulary.md`. Name the hunk too (\"the `request()` retry block, ~6 lines\"). The block is the `focal`; the Step-5 worker installs + fills it with the real diff.\n- **The block owns the code animation; your Scenes choreograph the surrounding Code Surface.** The block _is_ the development beat (the diff/typewriter/morph plays on its own cadence — the worker only fits it to the frame's `data-duration` so a long snippet doesn't overrun). Your Scene windows move the code-editorial **Code Surface** around it: the navy window seating in, the file header typing on, the camera settling onto the hunk, a `+N/−M` `count-up`, a coral underline drawing on the landed line. Name those moves inline; **do not re-specify the code animation itself.** A code beat is usually `blueprint: compose` (the block is the shape).\n\n## PR mechanism beats — invent an animated diagram of the behavior\n\nA **`mechanism`** frame is the **show-the-behavior** beat — the antidote to a video that only shows code + text. Its `focal` is an **invented animated diagram** that plays out what the change _does_ at runtime (the request retrying, the cache filling, serial→parallel, the race resolved) — **not** a `code-*` block and **not** a headline.\n\n- **Name the behavior + the diagram in `scene` + `focal`.** e.g. `scene: \"animate the request lifecycle — fire → 500 → backoff → retry → 200, invented SVG flow\"`; `focal: the request-lifecycle flow`. Reach for the `flowchart` / `flowchart-vertical` / `data-chart` registry blocks where they fit (name them in `scene` so Step 5 pre-installs them); otherwise the worker builds it in SVG / HTML / GSAP from code-editorial's atoms.\n- **The build IS the shot sequence.** Unlike a code block (which owns its own animation), the diagram is yours to choreograph across the Scene windows — the lanes / nodes draw on (Scene 1), the flow runs / the lane splits / the front advances as the VO names each step (middle Scenes), the resolved state + one coral emphasis lands (final Scene). Never let it enter then freeze.\n- **Stay on code-editorial's cream ground, hairline-ink.** Nodes / edges / lanes in hairline ink on cream; **one coral marker** on the active or changed element; mono labels. Not the navy code surface (that's for code), not heavy shapes / bokeh. Plan it into the top ~83% (caption keep-out).\n\nA `mechanism` frame carries **no** `asset_candidates` (it's invented, like every non-credits frame).\n\n## Impact & credits\n\n- **Impact / evidence** — numbers (`+1,204 / −318`, files touched, perf delta) go on an `impact` frame as a **`number-lockup`** (code-editorial's Number/Impact treatment): name it the `focal`, reveal it with a `count-up` paced to the VO.\n- **Credits close** — the optional `credits` frame uses the real `assets/<login>.png` avatars (named in story's `asset_candidates`) as the `focal`: an avatar row that staggers in. This is the one frame with non-empty `asset_candidates` and real assets.\n\n## Inventing the visual (non-code beats)\n\nEvery non-code, non-credits beat (`hook` / `change` / `cta` / concept) is **designed**, not captured. Three first-class treatments:\n\n- **Typographic / kinetic type** — a hero word, the PR's headline claim, a stat. Treat type as the subject: full-bleed scale, weight contrast, one emphasized term. Strongest for hooks and the cta.\n- **Abstract graphics** — shapes / paths / geometry that _embody_ the idea the script names; don't decorate with generic bokeh.\n- **Diagram / data-viz** — the mechanism diagrams above, a `data-chart` for a perf delta, a number-lockup. The build (each part on beat) is the teaching — design it to assemble across the Scenes.\n\nMake the invented hero **fill 40–60% of the frame** — big enough to read; don't shrink the one designed element into decoration around empty space.\n\n## Layout — named inline per Scene\n\nState each Scene's layout as part of \"where it sits.\" **If the blueprint (or the code-\\* block) already implies a composition, that wins** — describe it directly; the vocabulary below is for composing freely. Never write px / scale / shadow (the worker does). One frame's layout can EVOLVE across its Scenes. Use **≥3 different framings per video**; never the same framing twice in a row.\n\n- **Framing vocabulary** — centered (hero / climax / a single code surface) · rule-of-thirds · split-screen (before/after, two surfaces) · layered-depth (immersive) · asymmetric 60/40 or 70/30 (a code surface + a caption rail) · triptych (three changes at once) · full-width strip (a file list / timeline). Let the beat decide, not a quota.\n- **Density** — primary visual ≥ 40% of canvas; ≥ 3 depth layers; never a lone small cluster floating in empty space. Openings/closings are prone to emptiness — add environmental layers (a dim grid, low-opacity scanlines, brand-color ambient). Squint test: after blur you can still pick out the #1 element.\n- **Hierarchy** — combine ≥ 2 of size (3:1) / weight (800 vs 400) / contrast / position (upper-third is golden) / motion, so one element clearly dominates.\n- **Depth** — layer 2–3 of: size, blur, opacity gradient, overlap, shadow-stack, counter-scale on a push.\n- **Don't show**: nav bars, footers, scrollbars, real cursors / browser chrome, generic decorative shapes, floating bokeh / purple-blue \"AI\" gradients (banned). The navy code surface is for code beats only; mechanism diagrams stay on cream.\n\n## Portrait & square (non-16:9 canvases)\n\nThe zones, density, hierarchy, and depth principles all still apply; the **aspect ratio** changes, and a wide layout doesn't transplant into a tall one — design for the storyboard's `format` from the start.\n\n- **Stack vertically, not side-by-side** — split-screen / triptych / 60-40 become top/bottom stacks. A code surface runs nearly full-width in portrait with fewer visible lines.\n- **Vertical center moves with the canvas** — anchor a centered hero around **y ≈ 0.42 × height** (portrait ≈806, square ≈454), not a fixed 540.\n- **Type runs larger, fewer words per line.** **Travels well to portrait:** Centered, Layered Depth, Full-Width Strip; **avoid** wide Split Screen / Triptych — use stacked equivalents.\n\n## `## Video direction` — write the invariants ONCE\n\nThe whole video shares one look and one motion grammar. Write a **`## Video direction`** block ONCE at the top of `STORYBOARD.md` so every frame inherits it and per-frame Scene lines carry only the **delta**. This block is load-bearing — **keep it.**\n\n- **palette system** — from `frame.md` (code-editorial): which roles map to which hues. Never invent.\n- **motion grammar + reveal model** — arrival springs (overshoot and settle; `power3` only for what must not overshoot) + the **VO-paced reveal** model + what keeps a hold alive (a motivated motion: a camera creep, a highlight) (→ `motion-language.md`).\n- **rhythm / held-frame allocation** — name the **held / breather frames** so the video varies its energy.\n- **negative list** — off-brand textures, **plus both motion failure modes** — slideshow (front-load then freeze) and screensaver (everything floating independently) (→ `motion-language.md`).\n\nDo **not** repeat these per frame.\n\n## Palette & type — from `frame.md`, never invented\n\n- **Palette** — `frame.md` (code-editorial) is the color truth; apply its roles per frame. Generic basics → `hyperframes-creative/references/house-style.md`.\n- **Type** — fonts resolve via `frame.md`'s type tokens; reference them **by role** (display / body / mono / the pack's ramp), never by raw family or px. Code surfaces and mechanism labels use the **mono** role. Typography craft → `hyperframes-creative/references/typography.md`.\n\n## Caption-band keep-out (plan side)\n\nThe bottom ~17% of the canvas is reserved for the caption pill. Plan every frame's content into the **top ~83%** (the worker enforces the pixel cutoff). When captions are enabled, primary content caps at the band top, and a centered hero anchors at **y ≈ 0.42 × height** (landscape ≈454, portrait ≈806); background / ambient layers are exempt and may stay full-bleed. Holds even when captions are disabled — bottom-edge consistency.\n\n## Where the detail lives\n\n| For… | Read |\n| ------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- |\n| the proven shapes + role→blueprint menu + how to pick | `../../hyperframes-animation/blueprints-index.md` → `blueprints/<id>.md` |\n| the `code-*` blocks (pick + fill for a code beat) | `code-vocabulary.md` (local) |\n| motion — shot model, vocabulary, holds, idle budget, motivated holds, seek-safe | `motion-language.md` (local) |\n| layout — framing, density, depth, hierarchy, inventing the visual, caption band | the **Layout** + **Inventing the visual** sections in this file |\n| concrete eases / ms / stagger + rule recipe bodies (Step 5) | local `../../hyperframes-animation/rules/` (the frame worker reads it; you don't) |\n| palette + type tokens | the project's `frame.md` (code-editorial); basics → `hyperframes-creative` |\n| within-frame cuts / seams (zoom-through · cut-the-curve · waterfall) | `cut-catalog.md` (the worker builds them inside the composition) |\n| transitions | story-design owns `transition_in`; you don't touch it |\n\n## Before you finish — checklist\n\n- **`## Video direction`** written once at the top (palette · motion grammar + shot model + idle budget · hold allocation · negative list incl. both failure modes); per-frame entries are deltas.\n- Every frame is a **time-coded shot sequence** with real second windows across its `duration` — not a tag bag.\n- **No frame front-loads** — at t=0 only what the VO is saying enters; each further piece reveals on its spoken cue, across the back ~50%. Window count follows the VO.\n- Every frame names a **`blueprint:`** id (Reproduce / Adapt) or `compose`; an Adapt keeps the signature move; nothing collapses to a single front-loaded dump.\n- **Code beats** name a `code-*` block as the `focal`, let the block own the code animation, and choreograph only the surrounding Code Surface in the Scenes.\n- **Mechanism beats** name an **invented animated diagram of the behavior** (or a `flowchart` / `data-chart`), choreographed across the Scenes on code-editorial's cream ground with one coral marker — not a code block, not typography; the body is not an unbroken run of code surfaces.\n- **Impact** uses a `number-lockup` with a `count-up`; the **credits** close uses the real avatars as the `focal`.\n- Each non-code, non-credits frame names its **invented** `focal` + per-element `roles`, kept few and load-bearing.\n- Layout + motion named **inline** per Scene (no px / ease curves / ms / JS).\n- Content planned into the top ~83% (caption band clear); palette / type pulled from `frame.md` by role.\n- You wrote no HTML.\n",
|
|
306
306
|
"pr-to-video": "---\nname: pr-to-video\ndescription: \"Turn a GitHub pull request (a PR URL, owner/repo#N, or 'this PR' in a checked-out repo) into a code-change explainer video — changelog, feature reveal, fix, or refactor walkthrough built from the diff, commits, and files: the input is a code change, not a website. Not a product promo (/product-launch-video) or a no-PR topic explainer (/faceless-explainer). 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 pr-to-video`. 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> **media-use**: Before sourcing audio/images/logos, call `/media-use` to resolve BGM/SFX/images from the HeyGen catalog and brand logos from their official sources. Run `--adopt` first to register existing assets. See `/media-use` skill. When the host app provides its own music or sound-effect tools, use those for music and sound effects.\n\n# PR to HyperFrames\n\nUse this skill to ingest a GitHub pull request, understand the change, plan a code-change explainer, and build it frame by frame in HyperFrames. The input is a **code change** (read via `gh`), not a website — there is **no capture step and no real assets** beyond the contributors' avatars.\n\n> **The front door is `/hyperframes`.** You are the orchestrator. Run each step, verify its gate, and only then continue. This skill is for a **GitHub pull request** (a code change). Any other intent, a bare \"make a video\", or any uncertainty → read `/hyperframes` first — the intent layer owns every route decision, and a fresh creation arriving here without `BRIEF.md` goes through it anyway (Setup's opening rule).\n\nYou are the orchestrator. Work in the resolved external `PROJECT_DIR`, never in the caller repository by default. Run steps in order and pass each gate before continuing. User-gated steps are Step 0, Step 3, and Step 6. Read `../hyperframes/references/brief-contract.md` before Step 0 — it defines the gate types and how `BRIEF.md`'s `flow`/`storyboard` derive the mode that governs the Step 3/4/6 gates. Do every step yourself except Step 5, where you dispatch a bounded pool of frame workers. Do not put design or motion rules here; those live in the frame-worker sub-agent, this skill's local `../hyperframes-animation/rules/` + `../hyperframes-animation/blueprints/`, and `hyperframes-creative`.\n\nWorkflow: Step 0 setup → `hyperframes.json`; Step 1 ingest → `capture/extracted/` + `assets/<login>.png`; Step 2 design system → `frame.md`; Step 3 storyboard/script → `STORYBOARD.md` and `SCRIPT.md`; Step 3.1 audio → `audio_meta.json`; Step 4 visual design → enriched `STORYBOARD.md`; Step 5 frames → `compositions/frames/NN-*.html` and `index.html`; Step 6 final render → `renders/video.mp4`.\n\n---\n\n## Step 0: Setup\n\nGoal: Enter with a confirmed brief — including the **PR reference** (a full URL, an `<owner>/<repo>#<N>` ref, or \"this PR\" in a checked-out repo) — create the HyperFrames project, and make the brief durable. The style is always **code-editorial** (fixed at Step 2, never asked).\n\n**The brief is confirmed by the intent layer, not by questions asked here.** Opening rule, in order: **(1)** `BRIEF.md` exists → read it and ask nothing — the brief is settled, and its `flow`/`storyboard` derive the mode (brief contract § 1). **(2)** No `BRIEF.md` but the project exists (`hyperframes.json` / `STORYBOARD.md` on disk) → resume from the storyboard's frontmatter and the recorded preferences; never re-interrogate a half-built project. **(3)** Neither — a fresh creation request that arrived here directly → read `/hyperframes` and run its intent layer (`references/intent-interview.md`): it checks recipes and remembered defaults, and conducts this route's questions — including the PR-size → length doctrine, which lives whole in `../hyperframes/references/routes/pr-to-video.md` — then hands back the locked brief. Edit requests skip all of this — go do the edit.\n\nResolve the project directory before doing any other work. Preserve a user-supplied project directory; otherwise use the durable external cache location printed by the resolver. Never create `videos/` in the caller repository:\n\n```bash\nPR=\"<url | owner/repo#N>\"\nif [ -n \"${EXPLICIT_PROJECT_DIR:-}\" ]; then\n PROJECT_DIR=\"$(node <SKILL_DIR>/scripts/project-dir.mjs --pr \"$PR\" --project-dir \"$EXPLICIT_PROJECT_DIR\")\"\nelse\n PROJECT_DIR=\"$(node <SKILL_DIR>/scripts/project-dir.mjs --pr \"$PR\")\"\nfi\necho \"PR-to-video project: $PROJECT_DIR\"\nnode <SKILL_DIR>/scripts/preflight.mjs\n```\n\nThe capability preflight runs before fetch, story work, audio, or frame dispatch. If the installed CLI cannot run the validation command required by this skill, stop with its upgrade instruction rather than spending the run's context first.\n\nInitialize only if `$PROJECT_DIR/hyperframes.json` is missing. Its basename comes from the PR, such as `acme-sdk-pr-1842`; never use the workspace name or a timestamp.\n\n`npx hyperframes init \"$PROJECT_DIR\" --non-interactive --example=blank --skill=pr-to-video` — `init` checks the installed skills against the latest on GitHub and updates the global set if any are out of date.\n\nEvery relative-path command below runs with `$PROJECT_DIR` as its working directory. Examples without an explicit subshell mean `(cd \"$PROJECT_DIR\" && …)`; never change the caller repository's working tree.\n\n**Write `BRIEF.md` immediately after init** (never before — `init` refuses a non-empty directory): the intent layer's locked brief, shape per `../hyperframes/references/brief-format.md`. Resolve `<MEDIA_DIR>` as the installed `/media-use` skill directory. Then record each preference-backed answer with `node <MEDIA_DIR>/scripts/prefs.mjs record --hyperframes .` (`brief-format.md` names the subset). If the intent layer adopted a recipe, run `node <MEDIA_DIR>/scripts/recipe.mjs use --hyperframes . --name <name>`; it copies its `frame.md` into the project (Step 2 is then skipped) and returns the skeletons Step 3 drafts from. A recipe fills answers, not approvals; the review gates still run.\n\n**Show sign-in status before proceeding past Setup** — run `npx hyperframes auth status` and relay its output verbatim. It reports whether voice/BGM will use HeyGen or local engines and, when signed out, how to sign in. Apply one branch:\n\n- **Collaborative:** wait for the user to sign in or explicitly choose `offline` / `go`.\n- **Autonomous:** state the status and continue through the available local engines.\n\nDo not silently omit a required capability when no offline provider exists; surface the blocker. Do not fold this decision into another question or write keys into a per-repo `.env`. Auth ownership and offline fallbacks: `/media-use` `references/setup-providers.md` § Providers.\n\n**Gate:** `hyperframes.json` and `BRIEF.md` exist; the PR ref is captured in the brief; the preference-backed answers were recorded (brief contract § 2); sign-in status was shown (signed in, or continuing offline).\n\n---\n\n## Step 1: Ingest the PR (no capture)\n\nGoal: Fetch the PR's facts and fold them into the project as the source of information. There is **no website capture**. `fetch-pr.mjs` runs `gh` deterministically — completing the files list via paginated `gh api` so a large PR doesn't truncate at ~100 files, and writing only `capture/pr.json` + `capture/diff.patch` (no scratch dir). For MERGED PRs it also resolves a best-effort `shipped_version` (+ `version_source`) into `pr.json`, so the end card can cite a real version instead of inventing one. Then `ingest.mjs` folds that into the synthetic capture package offline.\n\n```bash\nPR=\"<url | owner/repo#N | N>\"\n\n# Fetch the PR deterministically: runs gh, completes the files list via paginated\n# gh api (so a big PR doesn't truncate at ~100 files), writes only capture/pr.json +\n# capture/diff.patch — no scratch dir. gh auth / not-found / private errors exit 1 here.\n(cd \"$PROJECT_DIR\" && node <SKILL_DIR>/scripts/fetch-pr.mjs --pr \"$PR\" --out-dir ./capture)\n\n# Offline transform → capture/extracted/{tokens.json (colors:[] → code-editorial palette),\n# visible-text.txt (the brief), people.json (contributors, bot-filtered, name+login,\n# avatarFile=assets/<login>.png)}.\n(cd \"$PROJECT_DIR\" && node <SKILL_DIR>/scripts/ingest.mjs \\\n --pr-json ./capture/pr.json --diff ./capture/diff.patch --out-dir ./capture/extracted)\n\n# The people front's one network step — download each contributor's GitHub avatar to\n# assets/<login>.png for the credits close. Best-effort; always exits 0.\n(cd \"$PROJECT_DIR\" && node <SKILL_DIR>/scripts/fetch-people-avatars.mjs \\\n --people ./capture/extracted/people.json)\n```\n\nIf `fetch-pr.mjs` exits 1 (gh auth / not found / private), report its stderr and stop — **do not fabricate PR contents**. If `ingest.mjs` exits 1, read its stderr (usually a malformed `pr.json`), fix, and rerun (deterministic). `fetch-people-avatars.mjs` always exits 0; missing avatars just mean no credits close to author.\n\n`people.json` carries a `name` for whichever contributors `gh` already named (the PR author, commit authors, `mergedBy`) — `null` for the rest (reviewers/commenters/assignees, which `gh pr view` only ever gives a bare `login`). Before writing the credits close in Step 3, resolve any `null` name yourself for the 1-6 people who'll actually appear on that frame: `gh api users/<login> --jq .name` (you already have `gh` — no need to script this). If GitHub has no public name for that user either, fall back to the login on-screen and drop that person from the spoken line (see story-design.md's credits section — the voiceover must still say names, never raw handles).\n\n**Gate:** `capture/pr.json`, `capture/diff.patch`, `capture/extracted/tokens.json`, `capture/extracted/visible-text.txt`, and `capture/extracted/people.json` exist; you can state the PR's change in one clear sentence. `assets/<login>.png` is best-effort — its absence is not a failure.\n\n---\n\n## Step 2: Design System\n\nGoal: Adopt the code-editorial frame preset; a script turns it into this video's `frame.md` + caption skin.\n\nThe style is fixed — **code-editorial** (warm editorial; a navy code surface built for diffs). Run:\n\n```bash\nnode <SKILL_DIR>/scripts/build-frame.mjs --preset code-editorial --hyperframes .\n```\n\nThe script copies the code-editorial preset's `FRAME.md` → `frame.md`, remixes it onto any brand tokens in `capture/extracted/tokens.json` (a PR has none → `colors:[]`/`fonts:[]` keeps code-editorial's own palette, a complete design), copies the preset's caption skin to `.hyperframes/caption-skin.html`, and self-validates (exits 1 on a broken mapping). Proceed as soon as it exits 0 — no hand-editing.\n\n**Gate:** `build-frame.mjs` exited 0 — `frame.md` exists from the code-editorial preset, and `.hyperframes/caption-skin.html` exists as the caption skin source.\n\n---\n\n## Step 3: Storyboard and Script\n\nGoal: Turn the PR into an approved frame-by-frame explanation plan.\n\nRead `../hyperframes-creative/references/story-spine.md` (hook language, value-before-evidence, storyboard-as-proposal, source-traceable visuals), `references/story-design.md`, `../hyperframes-animation/blueprints-index.md`, `../hyperframes/references/storyboard-format.md`, and `../hyperframes/references/script-format.md`. Use them to write `STORYBOARD.md` and, when narration is needed, `SCRIPT.md`. Set the frontmatter `duration:` from the brief's `length` — a rough expectation; assembly reports where the cut lands against it.\n\nUse `story-design.md` for the PR archetype (changelog / feature-reveal / fix-explainer / refactor-walkthrough), the PR-native frame types, hook, persuasion, beats, the per-frame word budget, and the credits close. The sequence comes from **narrative design, not the diff's file order** — explain the change, don't read the diff aloud. As a **soft guide**, consult the role→blueprint menu in `../hyperframes-animation/blueprints-index.md`: for each beat, write the voiceover in the shape its candidate blueprint implies and tag that candidate `blueprint:` id when one fits (story truth still decides which beats exist — never force a beat to fit a shape). Feature 2–4 real diff hunks (from `capture/diff.patch`), each a small legible snippet; name the `code-*` block each wants in the frame's `scene`. Frames carry no `asset_candidates` except the `credits` close (1–6 `assets/<login>.png` avatars). Use the exact required fields from the storyboard and script references.\n\nAfter drafting, run the review loop's plan pass — `../hyperframes/references/review-loop.md` § 1: present the plan as a proposal, and ask the two questions — approve or change, and **sketches first** (recommended) or skip. Feedback arrives as a chat reply; loop until approved. This is a **checkpoint gate** (brief contract § 1): in autonomous mode there is nothing to ask — post the same summary as a heads-up and proceed; sketches collapse into the build, and the final preview with its one question comes at Step 6.\n\n**Gate:** `STORYBOARD.md` exists, every frame has the required narrative fields, `SCRIPT.md` exists when narration is needed, and the user approved the plan (autonomous: the summary was posted as a heads-up).\n\n---\n\n## Step 3.1: Audio\n\nGoal: Generate narration, word timings, music, and audio metadata from the approved script.\n\nStart audio after Step 3 approval. Run it in the background, then continue to Step 4.\n\n**Choose the narration voice from the user's ask before invoking.** If the request named a voice, gender, or tone, pick a matching voice id and pass it with `--voice <id>`. The pipeline default is otherwise **Marcia (female)** on HeyGen / `am_michael` on Kokoro — so a request like \"a male voice\" is silently ignored unless you pass the flag. Voice ids are provider-specific; resolve against whichever provider Step 0's sign-in status selected: **HeyGen** (signed in) via `node <MEDIA_DIR>/audio/scripts/heygen-tts.mjs --list` (or `GET /v3/voices?engine=starfish`); **Kokoro** (offline) via the voice table in `<MEDIA_DIR>/audio/references/tts.md` (prefixes `am_`/`bm_` male, `af_`/`bf_` female). When the user expressed no preference, fall back to the remembered voice (brief contract § 2) before the pipeline default, and say which one you used; omit `--voice` only when neither names one. When the user explicitly picked a voice this run, record it (`prefs.mjs record --key voice`).\n\n`node <SKILL_DIR>/scripts/audio.mjs --script ./SCRIPT.md --storyboard ./STORYBOARD.md --hyperframes . --out ./audio_meta.json --voice <voice-id> &`\n\nThe audio script handles narration, word timings, BGM lookup from HeyGen's music library, and timing metadata. BGM mood comes from the storyboard's `music:` field. This uses the HeyGen Audio API for retrieval, not generation, and the same `~/.heygen` credential as TTS. For provider details, read `../media-use/audio/references/tts.md`. When the host app's own tools make the music or a sound effect, put the file under assets/ and list it in the audio_meta.json file marked `\"source\": \"host\"`: music as `bgm` `{ \"path\": \"assets/…\", \"source\": \"host\" }` with `music: none` in the storyboard; a sound as an `sfx` entry `{ \"frame\": <n>, \"file\": \"assets/…\", \"offset_s\": 0, \"duration_s\": <its length>, \"source\": \"host\" }`. Every audio pass keeps these, and a frame with a host sound gets no looked-up cue.\n\nIf there is no narration and no `SCRIPT.md`, skip voice generation. BGM may still run if the storyboard has a music mood.\n\n**The canonical fully-silent marker** (shared across the workflows that reuse this audio model): `music: none` in the STORYBOARD.md top YAML block, no `SCRIPT.md`, **and** no `sfx:` cues or host audio. That combination marks the project silent — no narration, no BGM, no SFX. `audio.mjs` recognizes it and generates nothing (it removes any stale `audio_meta.json`; an absent `audio_meta.json` is what assemble treats as silent), so this step is a clean skip. Without narration but with `sfx:` cues or host audio the film is not silent: `audio.mjs` writes the audio_meta.json file for `fetch-sfx` to fill. `music: none` with narration keeps TTS and turns only BGM off. Use exactly this spelling — don't improvise other markers.\n\n**Gate:** audio job has started, or the project is marked silent (`music: none`, no `SCRIPT.md`, no `sfx:` cues or host audio).\n\n---\n\n## Step 4: Frame Visual Design\n\nGoal: Add the visual direction, layout intent, and motion choices to each storyboard frame.\n\n**Sketch the storyboard sheet first (collaborative only).** The moment the plan is approved, run the sketch pass — `../hyperframes/references/review-loop.md` § 2 (don't wait on Step 3.1; sketches don't use timings): wireframe every frame yourself as a cell of `storyboard.html` (`../hyperframes-creative/references/storyboard-recipe.md` § 3), mark each `built`, pause for the one layout question when every frame is `built`, and revise only the sketches named until the sheet is confirmed. Stand-ins: for a **code beat**, a plain code panel with the filename and a few real diff lines as text — the `code-*` block wiring belongs to the workers. Only then write the visual design below onto the confirmed layouts. In autonomous mode, or when the user chose to skip sketches at Step 3, skip this pass — frames go straight from `outline` to `animated` at Step 5.\n\nEdit `STORYBOARD.md` in place. Do not create another storyboard. Use `frame.md` as source of truth for color, type, layout feel, and style.\n\nRead `references/visual-design.md`, `../hyperframes-animation/blueprints-index.md`, `references/motion-language.md`, `references/code-vocabulary.md`, and `../hyperframes-animation/rules-index.md`. Use `visual-design.md` for the method (the time-coded shot sequence, the inline Layout vocabulary, and the code-beat treatment), plus the required `## Video direction` block. Use `../hyperframes-animation/blueprints-index.md` to pick each frame's shot shape. Use `code-vocabulary.md` to pick the right `code-*` block per code beat (diff = `code-diff`, refactor = `code-morph`, new code = `code-typing`, …). Use `motion-language.md` (the motion vocabulary + the motion doctrine) and `../hyperframes-animation/rules-index.md` (valid rule names) for motion — do not invent motion or block/blueprint names.\n\n**Search the live catalog before you design any named look.** `code-vocabulary.md` covers the code beats; it does not cover the rest. For every other look, effect, treatment or transition the brief names — \"CRT scanlines\", \"glitch\", \"film grain\", \"shimmer sweep\", \"confetti burst\" — run `npx hyperframes catalog --query \"<the look, in plain English>\" --json` and read the top results BEFORE you write that look into `STORYBOARD.md`. The search needs **nothing installed**: no project, no prior `add`, no account. It ranks the whole hosted registry (~400 blocks and components) from any directory. Name the block you found here; Step 5 pre-installs every block the storyboard names. Hand-author a look only after a search for it came back with nothing that fits.\n\nFor every frame, write a **time-coded shot sequence** into `STORYBOARD.md` per `visual-design.md`'s method: pick the frame's blueprint (or compose), instantiate it with THIS frame's content, and pace each Scene's reveal to the voiceover so the frame develops across its full duration instead of front-loading then freezing. **For a code beat, the `code-*` block is the frame's `focal`** and the Scenes choreograph the surrounding code-editorial Code Surface (the entry of the file/header, the camera onto the hunk, the landing line) — **not** the code animation itself, which the block owns. Immediately after each code frame's fields, add a `### Source excerpt` fenced `diff` block containing only the exact real hunk the worker must render (12 lines maximum). Select it here from `capture/diff.patch`; workers are forbidden from reopening that full diff. State layout and motion **inline** per Scene (vocabularies in `visual-design.md` and `motion-language.md`). Add one video-wide `## Video direction` block.\n\nDo not change story, script, `transition_in`, `asset_candidates`, or the PR source. Do not write HTML in this step. There is **no asset-staging step** — the only real assets are the credits avatars, already in `assets/`.\n\n**Gate:** every frame has a time-coded shot sequence whose reveals are paced to the voiceover (no front-loading); code frames name a `code-*` block as the `focal`; `## Video direction` exists. Collaborative: the sketch sheet was confirmed.\n\n---\n\n## Step 5: Build Frames\n\nGoal: Build every storyboard frame as an HTML composition and assemble the playable video.\n\nWait for Step 3.1 audio to finish if audio was started. Then sync durations and fetch SFX; skip both if silent.\n\n`node <SKILL_DIR>/scripts/audio.mjs sync-durations --audio-meta ./audio_meta.json --storyboard ./STORYBOARD.md`\n\n`node <SKILL_DIR>/scripts/audio.mjs fetch-sfx --storyboard ./STORYBOARD.md --hyperframes .`\n\nDuration sync is mechanical: real voice duration wins; silent frames keep estimates; never hand-edit synced durations.\n\n**Pre-install the registry blocks** named across `STORYBOARD.md` once, before dispatch, so parallel workers don't race on the registry:\n\n`for b in <each registry block named in the storyboard>; do npx hyperframes add \"$b\"; done`\n\nBefore dispatch, read `../hyperframes/references/subagent-dispatch.md`. Build bounded packets and the worker role payload:\n\n```bash\nnode <SKILL_DIR>/scripts/frame-packets.mjs --project \"$PROJECT_DIR\" --storyboard \"$PROJECT_DIR/STORYBOARD.md\"\n```\n\nThe packet builder hard-fails a code frame without the upstream-selected `### Source excerpt`, and hard-caps packet bytes. It also writes `_role.md` (`../hyperframes/references/frame-worker-core.md` + this skill's `sub-agents/frame-worker.md`, concatenated verbatim — the complete worker role). Dispatch **at most three workers total**, balanced across the packet paths; each worker's prompt carries `_role.md` and its assigned packet paths — paste the role in full or hand its path (equivalent; the worker starts from exactly those documents) — and each worker may build multiple assigned frames sequentially, reading the role once. Workers read only their packet(s) and `frame.md`. They never open the full `STORYBOARD.md`, `capture/diff.patch`, or `capture/extracted/visible-text.txt`. Each worker writes only its assigned `compositions/frames/NN-*.html`; workers never edit `STORYBOARD.md`. When a frame has a **confirmed sketch** on disk (collaborative runs — review loop § 3), say so in that worker's dispatch context: the sketch is the existing `compositions/frames/NN-*.html`, and the worker dresses that layout rather than redrawing it (frame-worker core § When a confirmed sketch exists).\n\nOn a failed frame, re-dispatch **that frame only**, with its existing packet plus the exact validator/lint finding. One retry maximum. Do not replay a whole batch and do not retry without a concrete finding.\n\n**Full-bleed backgrounds ride on a `class=\"clip\"` layer, never the `#root`.** A frame's ground (color field / gradient / grid) is its own full-duration background clip — a `background` set on the `#root` / `data-composition-id` element is clip-gated to the frame's window and is not a dependable ground, so dark content can land on the black host `body` and render invisible. The video's base ground is painted by the assembler from `frame.md`'s `canvas` color onto the index `#root`. (Full rule + self-check: `../hyperframes/references/frame-worker-core.md`.)\n\nAs each worker returns, mark that frame `animated` in `STORYBOARD.md`.\n\nAfter audio timings exist, build captions in the background and assemble the index:\n\n`node <SKILL_DIR>/scripts/captions.mjs build --storyboard ./STORYBOARD.md --audio-meta ./audio_meta.json --hyperframes . --out ./caption_groups.json &`\n\n`node <SKILL_DIR>/scripts/assemble-index.mjs --storyboard ./STORYBOARD.md --hyperframes .`\n\n`captions.mjs` uses the project's `.hyperframes/caption-skin.html` (code-editorial's, copied in Step 2), injecting brand tokens from `frame.md`; `captions: skipped (<reason>)` is valid. `assemble-index.mjs` stages the credits avatars from `assets/` as an idempotent backstop.\n\n**Gate:** every frame is marked `animated` (collaborative: the sketch sheet was confirmed at Step 4), `index.html` exists, and captions are built or explicitly skipped.\n\n---\n\n## Step 6: Finalize\n\nGoal: Verify the assembled video, get user approval, and render the final MP4.\n\nInject transitions, run checks, pause for review, then render.\n\n`node <SKILL_DIR>/scripts/transitions.mjs inject --storyboard ./STORYBOARD.md --hyperframes .`\n\n`node <SKILL_DIR>/scripts/transitions.mjs verify --storyboard ./STORYBOARD.md --index ./index.html`\n\n`npx hyperframes lint`\n\n`npx hyperframes check`\n\n`npx hyperframes snapshot --at <frame-midpoints>`\n\n`snapshot` stitches the captured frames into one contact sheet (`snapshots/contact-sheet.jpg`). Glance at it; if nothing is obviously broken, move on — don't linger here.\n\nIf a command fails, surface stderr and stop — don't pile on recovery commands. Fix it yourself: the cheapest safe edit to `compositions/frames/NN-*.html`, then rerun the failed check.\n\n**Known false-positive — do not chase it.** `check` may report a handful of `text_box_overflow` errors of ~1–4px on the **caption** highlight words (selector `#caption-word-*` / `.caption-line`). The caption pill uses a deliberately snug `line-height` (set once in `scripts/captions.mjs`) and has **no `overflow:hidden`**, so a heavy display glyph's ink spills a few px into the pill's own padding — nothing is actually clipped. Treat these as expected and proceed. Do **not** inflate the caption `line-height` (it balloons the pill, which is worse). Only act on a `text_box_overflow` when it names a **frame** element (`#el-NN-*`), not a caption word.\n\nAfter checks pass, pause for user review — the review loop's final look (`../hyperframes/references/review-loop.md` § 4): one question, on the final Studio preview — render now, or what changes? (Autonomous: the same, as the one kept question — open the preview with the command below even though the user didn't ask for one.) Then deliver the MP4 with the contact sheet and the frame ids so revisions can target a single frame.\n\nPreview: `npx hyperframes preview \"$PROJECT_DIR\" --background`\n\nRender only after user approval (autonomous mode: after the render-or-changes question):\n\n`npx hyperframes render --skill=pr-to-video --quality high --output renders/video.mp4`\n\nDo not rerun `lint`, `check`, or `snapshot` after rendering unless the user asks.\n\nAfter the user is done reviewing (or after render when no more live edits are expected), stop only this project's background server: `npx hyperframes preview \"$PROJECT_DIR\" --stop`. Never tear it down while waiting for review.\n\n**Gate:** `lint` and `check` passed and the snapshots were inspected before render; user approved at the review pause (autonomous: checks passed and the delivery includes the contact sheet); `renders/video.mp4` exists. Final reply states the MP4 path and final duration.\n\n---\n\n## Quick Reference\n\n**Formats:** landscape `1920x1080`; portrait `1080x1920`; square `1080x1080` — derived from the destination (brief contract § 2). Set the format once in the storyboard frontmatter.\n\n**PR deltas vs a captured-asset workflow:** no Step 1 capture (the `gh` CLI ingests the PR into a synthetic `capture/extracted/` package — `tokens.json` + `visible-text.txt` + `people.json`); the only real assets are the contributors' `assets/<login>.png` avatars (the credits close); no `asset-descriptions.md`, no asset-staging step. Code beats are rendered by the `code-*` registry blocks on code-editorial's navy Code Surface; the style is always **code-editorial**.\n\n**Background scripts:** the workflow ships these under `scripts/`: `fetch-pr` (PR → `capture/pr.json` + `diff.patch` via `gh`; large-PR-safe, no scratch), `ingest` (→ synthetic capture package; offline), and `fetch-people-avatars` (contributor avatars → `assets/`); plus the shared engine — `build-frame` (adopt + brand-remix a preset into `frame.md` + caption skin), `audio` (TTS, BGM, SFX, duration sync), `captions`, `transitions` (inject + verify), and `assemble-index`. Everything else is the `hyperframes` CLI. Code blocks install via `npx hyperframes add <name>`.\n\nThe reusable, domain-agnostic shot shapes live in `../hyperframes-animation/blueprints/` (indexed by `../hyperframes-animation/blueprints-index.md`); the `code-*` registry blocks are the code-beat vocabulary (`references/code-vocabulary.md`).\n\n| Read | When |\n| ----------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- |\n| `[../hyperframes/references/brief-contract.md](../hyperframes/references/brief-contract.md)` | Gate types, mode derivation from `BRIEF.md`, field semantics. |\n| `[../hyperframes-creative/references/story-spine.md](../hyperframes-creative/references/story-spine.md)` | Step 3: story doctrine — hook language, value-before-evidence, proposal shape, source-traceable visuals. |\n| `[references/story-design.md](references/story-design.md)` | Step 3: plan the PR explanation. |\n| `[../hyperframes-animation/blueprints-index.md](../hyperframes-animation/blueprints-index.md)` | Step 3: role→blueprint menu. Step 4: pick the shot shape. |\n| `[../hyperframes/references/storyboard-format.md](../hyperframes/references/storyboard-format.md)` | Step 3: write `STORYBOARD.md`. |\n| `[../hyperframes/references/script-format.md](../hyperframes/references/script-format.md)` | Step 3: write `SCRIPT.md`. |\n| `[../media-use/audio/references/tts.md](../media-use/audio/references/tts.md)` | Step 3.1: choose or understand TTS providers. |\n| `[references/visual-design.md](references/visual-design.md)` | Step 4: write the frame's shot sequence (+ Layout vocabulary). |\n| `[references/code-vocabulary.md](references/code-vocabulary.md)` | Step 4 + 5: pick + fill the `code-*` block for a code beat. |\n| `[references/motion-language.md](references/motion-language.md)` | Step 4: the motion vocabulary + the motion doctrine. |\n| `[references/cut-catalog.md](references/cut-catalog.md)` | Step 4-5: the cut catalog (worker builds within-frame seams). |\n| `[../hyperframes-animation/rules-index.md](../hyperframes-animation/rules-index.md)` + `[../hyperframes-animation/rules/](../hyperframes-animation/rules/)` | Step 5: local rule recipe bodies for the cited motions. |\n| `[../hyperframes/references/frame-worker-core.md](../hyperframes/references/frame-worker-core.md)` | Step 5: the shared worker contract (packet builder prepends it to the delta). |\n| `[sub-agents/frame-worker.md](sub-agents/frame-worker.md)` | Step 5: the workflow's frame-worker delta. |\n| `[../hyperframes/references/subagent-dispatch.md](../hyperframes/references/subagent-dispatch.md)` | Step 5: dispatch sub-agents safely. |\n| `[../hyperframes-creative/frame-presets/code-editorial/FRAME.md](../hyperframes-creative/frame-presets/code-editorial/FRAME.md)` | Step 2: the code-editorial preset (fixed style). |\n",
|
|
307
307
|
"pr-to-video/sub-agents/frame-worker.md": "# Frame worker — PR-to-video delta\n\n> The shared law is the core contract above (the packet builder prepends `../../hyperframes/references/frame-worker-core.md` to this file as `_role.md`) — read the two as one role. This file carries only what's specific to a PR-to-video frame.\n\n## Batch dispatch — you build a small packet batch\n\nAt most three workers run; your dispatch assigns **one or more** bounded packet paths under `.hyperframes/frame-packets/`. Read this role and shared `frame.md` **once**, then process the packets in order — for each, use its exact frame block, inlined blueprint / rule excerpts, and (for a code beat) the selected code-block / source excerpts. Never open the full `STORYBOARD.md`, `capture/diff.patch`, or `capture/extracted/visible-text.txt`; the orchestrator already selected the exact source excerpt and put it in each code frame's packet. After the last assigned file passes the self-check, stop.\n\nExtra inputs beyond the core contract:\n\n- `code-vocabulary.md` — absolute path provided in your dispatch. For a **code beat**, read it for the named `code-*` block's exact inputs (`window.__TOKENS`, `window.__BLOCK`, line indexing); your packet carries the matching excerpt.\n- `focal:` — for a concept/mechanism beat, which **invented** element is the hero; for a **code beat**, the named **`code-*` block** (+ the hunk); for the **credits** close, the avatar row.\n- `roles:` — each element's role: `foreground subject` / `background` full-bleed / `supporting`. Most are invented elements you design; the only real assets are the credits `assets/<login>.png` avatars.\n\n## Mostly invented — you build the visual (except code blocks + the credits avatars)\n\nA PR video is **mostly invented**: there are **no screenshots and no captured UI**. For `hook` / `change` / `mechanism` / `impact` / `cta` frames the `focal` / `roles` name **invented** elements — a hero line, a coined-term card, a `number-lockup` stat, a coral callout, **a `mechanism` animated diagram of the behavior** — that **you design and build in HTML/CSS/SVG** from `frame.md`. Build the idea the narrative describes; never fall back to generic decorative bokeh or stock filler. Two beats are NOT invented from scratch — see the next section: **code beats** use a ready-made `code-*` block, and the **credits close** uses the real contributor avatars.\n\n## PR code beats, mechanism beats + the credits close\n\n- **Code beats (`diff` / `before_after` / a new-code reveal) — use the named `code-*` block, don't hand-build code motion.** Your `## Frame N` `scene` / `focal` names which block (e.g. `code-diff`, `code-morph`, `code-typing`); the orchestrator has already installed it (pre-install step). Read the `code-vocabulary.md` excerpt in your packet for that block's exact inputs, then:\n - Use only the packet's `### Source excerpt`. It is the real before/after hunk selected upstream. Never reopen the full diff or brief.\n - Fill the block's `window.__TOKENS` with that real code (the baked Shiki tokens) and set `window.__BLOCK` (effect, `line`, `duration`) **so the full block completes within the frame's `data-duration`** — a long snippet at the block's default per-character cadence overruns a short frame (the code never finishes typing). `code-diff` / `code-morph` need **2 states** (before, after); the others take one. **Line indexing differs — `code-highlight` is 0-based, `code-scroll` 1-based** — don't off-by-one.\n - Integrate the filled block as **this frame's composition** per the core sub-composition contract: its `data-composition-id` and its `window.__timelines[...]` key must both be your **`<frame_id>`** (the block ships its own id + paused timeline; rename both to match the frame contract). The block already renders an editor window (titlebar / filename) reading as code-editorial's navy **Code Surface** — set the filename + any `+N/−M` chrome from the `scene`.\n - **The block owns the code animation; your Scene windows choreograph the surrounding Code Surface** — the navy window seating in, the file header typing on, the camera settling onto the hunk, a coral underline on the landed line. **Do not re-specify the code motion** (the block is the development beat). A code beat is usually `blueprint: compose`.\n - **The block has no caption-safe band.** When `Captions: enabled`, inset/scale the code panel into the top ~83% so it clears the keep-out band; never let code run under the caption pill.\n- **Mechanism beats (`mechanism`) — build an invented animated diagram of the behavior; the build _is_ the shot.** This is the \"show what the change does at runtime\" frame (the request retrying, the cache filling, serial→parallel, the race resolved) — read its `scene` for the behavior to animate. Unlike a code beat, **the motion is yours to author** (no block owns it):\n - If the `scene` names a `flowchart` / `flowchart-vertical` / `data-chart` block, the orchestrator pre-installed it — fill + mount it like a code block (its `data-composition-id` and `window.__timelines[...]` key both become your `<frame_id>`). Otherwise **hand-build the diagram in SVG / HTML / GSAP** from `frame.md`'s atoms.\n - **Code editorial register:** hairline-ink nodes / edges / lanes on the cream ground, **one coral marker** on the active / changed element, mono labels — **not** the navy code surface (that's for code), no heavy shapes / bokeh.\n - **Choreograph the Scene windows:** the nodes / lanes draw on (Scene 1); **the flow runs** as the VO names each step (middle Scenes — the request hops, the lane splits, the front advances, the bars race) — this _is_ the teaching, so it must play across the shot, never enter-then-freeze; the resolved state + the one coral emphasis lands (final Scene). Keep it in the top ~83% (caption keep-out).\n- **The `credits` close — the one frame with real assets.** Its `asset_candidates` names 2–6 `assets/<login>.png` avatars (downloaded upstream). Render them as `<img>` in hairline-ringed chips — an avatar row with each contributor's name + role in mono (an \"approved\" mark if the close calls for it), staggered in across the Scene windows. Avatars appear **only** here, never decorating a code frame.\n\n## PR-specific self-check additions\n\n- The composition root also carries a **positive `data-duration` matching the packet**.\n- **Code-block cadence fits `data-duration`** — for a code beat, the `code-*` block's internal cadence is set so the full block completes within the frame's `data-duration` (a long snippet at the default per-character speed overruns — the code never finishes and the chrome beats never play; see `code-vocabulary.md`).\n- Fonts: copy the auto-generated `@font-face` block from `frame.md`; the Code editorial preset's EB Garamond, Inter, and JetBrains Mono faces live in `assets/fonts/`. Never link Google Fonts.\n- Visible-text exception: real code inside a `code-*` block is the content, not narration.\n",
|
|
308
308
|
"product-launch-video/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. (Learned 2026-06-10: the until-now inverse zooms shipped at 20px and read mushy; 10px keeps letterforms readable mid-cut.) |\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\nShipped examples: `boring → until-now` and `B3 → \"That changes today.\"` (sfx-music-launch);\nseams 3/4 in editorial-paper (`follow-up → thinking`, `thinking → compose UI`).\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\nShipped example: `until-now.html` B1→B2→B3 (sfx-music-launch).\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",
|
|
309
|
-
"product-launch-video/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 promo 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. 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 launch video 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 launch-video 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 capability, five feature icons 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",
|
|
309
|
+
"product-launch-video/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 promo 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. 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: overshoot and settle, Slates' default arrival (Part 2, rule 1) → `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 launch video and one that reads as an agent-made PowerPoint. Follow them as written.\n\n## 1. Arrivals overshoot and settle; presses squash\n\nSlates' motion doctrine, which replaces this file's earlier ban on overshoot. An arriving element passes its mark and springs back into place: a spring with a damping ratio of about 0.7–0.85 reads premium (the worker's seek-safe `springEase` in `../../hyperframes-animation/adapters/gsap-easing-and-stagger.md` → Spring Eases, or `back.out` near 1.2–1.4). Position and scale may overshoot; opacity and colour never do. A press squashes the control under the cursor and springs it back. An exit is one motion, 40–50% shorter than its entrance, accelerating away (`power3.in`). What still reads cheap is bounce sprayed on everything at once: give each element its role, and after a landing let the camera or the next element carry the motion.\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. Nothing fully stops — overlap, and give every hold a motivated motion\n\nSlates' motion doctrine, which replaces this file's earlier \"no motion over bad motion\". Moves overlap: the next one starts when the previous is 30–50% done, so the film never comes to a dead stop between beats. One continuous camera carries the piece, every framing a key on one eased path, never a chain of moves that each stop. A hold keeps a motivated motion: the camera creeps toward what is being read, a highlight glides across the line, a total ticks up. Two kinds of motion stay banned because nothing motivates them:\n\n- **No lazy breathing.** Cards or text scaling up and down in a loop to look \"alive\" is the cheap tell.\n- **No drift off the subject.** A slow pan or push that wanders away from what the viewer is reading in the back half of a scene breaks their sightline. A creep toward it is the opposite move, and the right one.\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\nArrivals overshoot and settle, presses squash, exits run 40–50% shorter than entrances; reveal sequentially in the back ~50% timed to the VO (not dumped in the first 25%); moves overlap so nothing fully stops, and every hold carries a motivated motion (a camera creep, a highlight), never breathing or a drift off the subject; 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 that drifts off what is being read; many elements floating independently as \"motion.\" Fix with rule 3 (motivated motion only: a camera creep, a highlight, a count).\n\n**Rigid:** arrivals that stop dead on their mark with no settle, presses with no squash, exits as long as their entrances, moves that finish before the next begins. Fix with rules 1 and 3.\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`) each word overshooting and settling; the camera's slow **push** on the root (`multi-phase-camera`) keeps creeping toward the headline.\n> Scene 2 (1.0–3.0s): as the VO names each capability, five feature icons 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; the camera keeps creeping toward it; no breathing, no drift off the word.\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 an overshoot-and-settle spring on arrivals.\n",
|
|
310
310
|
"product-launch-video/references/story-design.md": "# Story design — product launch video\n\nStep 3 of the product-launch flow. Output: `STORYBOARD.md` (the narrative plan, one frame per beat) and `SCRIPT.md` (the locked spoken narration).\n\nThis step decides **what the video says, in what order, and how each beat is said** — and it says each beat in the SHAPE of a proven script. It does not design layout, composition, or motion (that is Step 4). For exact file syntax follow `../../hyperframes/references/storyboard-format.md` and `../../hyperframes/references/script-format.md`.\n\n## What story design produces\n\nFor every beat, four things:\n\n1. **Position in the SEQUENCE** — the shot order. Story truth decides which beats exist and in what order (the arc).\n2. **Voiceover written in a blueprint's script shape** — the spoken line, drafted to sound like the proven script for the shape this beat is reaching toward (see the script bank below).\n3. **A candidate `blueprint:` id** — the proven shot SHAPE this beat leans toward (a tag, not a commitment; Step 4 confirms or overrides).\n4. **`transition_in`** — how this beat enters from the one before it.\n\nThe big idea: **the blueprint is applied from the very first step.** The blueprints were reverse-engineered from 50 golden clips; each one implies a proven script. So we write the VO in that script's shape from the start — the voiceover is blueprint-shaped before Step 4 ever runs, which makes the blueprint's hit-rate downstream high.\n\nThis is still a SOFT discipline. Story truth comes first: **never invent, bend, drop, or reorder a beat to fit a blueprint.** The script patterns only shape HOW a beat is said and which proven shape it leans toward — they never decide which beats exist.\n\n## Read first\n\n1. `hyperframes.json` — locked brief: angle, length, aspect ratio, language.\n2. `frame.md` — tone, mood, design system, brand register.\n3. `capture/extracted/visible-text.txt` — product facts, page copy, positioning, proof, CTA.\n4. `capture/extracted/asset-descriptions.md` — the ONLY source for the captured asset inventory.\n5. `user_script.txt` and `VO_MODE`, when present.\n\nDo not inspect `capture/assets/`, contact sheets, screenshots, or raw files in Step 3. Treat `asset-descriptions.md` as the canonical asset list. Never invent asset filenames.\n\n## Method\n\n### 1. Extract the product truth\n\nFrom the brief and captured text, name:\n\n- **Audience** — who the video speaks to.\n- **Pain / desire** — what they already want fixed or achieved.\n- **Promise** — the one-line thesis of the whole video.\n- **Product role** — what the product does in the story.\n- **Proof** — features, UI moments, metrics, logos, demos.\n- **CTA** — what the viewer should do next.\n\nBuild the sequence around the **promise**, not a feature list. A website is an information layout; a video is an emotional sequence. Reorder, merge, and omit captured content freely — do not follow page order.\n\n### 2. Choose the arc (the sequence backbone)\n\nPick ONE arc — it fixes the beat order. Compound only when useful (e.g. `PAS with feature-benefit progression`).\n\n| Arc | Use when | Beat order |\n| ------------------------- | ------------------------------------------------ | --------------------------------------------------------------------------- |\n| `PAS` | Pain is known and urgent (broken B2B workflows). | hook → pain → agitation → solution tease → product intro → proof/demo → CTA |\n| `Future Pacing` | Sells a new future / category / paradigm. | imagine → name product → remove pain → mechanism → outcome → CTA |\n| `Demo Loop` | UI is self-explanatory; best shown working. | question → product intro → demo cycle 1 → demo cycle 2 → trust → CTA |\n| `BAB` | Bridges an old workflow to a better one. | before → after tease → bridge/product → step 1 → step 2 → wow → CTA |\n| `Feature-Benefit Cascade` | Feature-rich or desire/status-driven. | category hook → feature → benefit → feature → benefit → climax → CTA |\n\nUse feature→benefit rhythm inside any arc when there are many capabilities — always translate a feature into viewer value, never stack raw features.\n\n`frame.md` tunes the VOICE, not the arc: restrained/B2B → plain, low-hype; bold/launch → short, punchy; warm/human → friendly direct address; premium/cinematic → aspirational, fewer words.\n\n### 3. Lay out the beats, each with a role\n\nOne clear job per beat — never \"more benefits\" or \"another feature.\" Beat `type` (= blueprint **role**):\n\n`hook | pain_point | product_intro | feature_showcase | benefit_highlight | social_proof | branding | cta`\n\nThe opening 3–5s needs ONE hook that creates tension, curiosity, or desire — a shocking stat, pain validation, a rhetorical question, direct address, an imagine/future-pace, a category announcement, or visual spectacle. Never open with generic company description. Per `../../hyperframes-creative/references/story-spine.md`: the hook speaks the viewer's outcome language (what they gain, never a feature list), and the promise (`message`) lands by beat 2 — features after that are its evidence.\n\nA UI demo is usually a SEQUENCE of 3+ consecutive `feature_showcase` / `benefit_highlight` beats on the same surface (input → response → result → benefit), not one isolated frame.\n\n### 4. Write each beat's VO in its blueprint's script shape\n\nFor each beat, look up its **role** in the script bank below, find the blueprint whose SHAPE fits the beat you already chose, and **draft the voiceover to sound like that blueprint's pattern.** Tag the candidate `blueprint:` id on the frame.\n\n- The bank is the heart of this step: proven product-launch clips reversed into the one VO line each implies, grouped by role → blueprint, each with a **pattern** to imitate.\n- If two blueprints fit the beat, prefer the one whose script shape matches the line you'd naturally write.\n- If NO shape fits the beat, omit `blueprint:` and write the VO plainly — Step 4 composes that frame freely. Do not force a wrong shape.\n- **Vary the shapes across the video.** Reaching for the same blueprint every beat re-creates the sameness this exists to avoid. `kinetic-type-beats` is the workhorse (6 roles) — lean on it, but not everywhere.\n- **Write each VO as discrete cues, not one run-on breath.** Step 5 reveals each on-screen piece _when the voiceover names it_ (the anti-PowerPoint mechanism — `motion-language.md` Part 2). A line with clear phrase boundaries — \"Content, sentiment, engagement — in one place\" — hands the shot its reveal cadence for free; a single long clause leaves the frame nothing to pace to. The bank patterns are already cue-segmented — keep that rhythm.\n\nStep 3 only TAGS the candidate id and writes the shaped VO. Step 4 (visual design) picks and instantiates the blueprint into a time-coded shot; it may override or drop a Step 3 candidate. The full menu with picking guidance lives in `../../hyperframes-animation/blueprints-index.md`.\n\n---\n\n## The script bank — what each beat's VO sounds like\n\n> Proven product-launch clips, each reversed into the one spoken line it implies. Grouped by **role → blueprint**. Real product names kept (swap in your own). Draft your beat's VO in the SHAPE of the matching pattern. Kept 1:1 with the role declarations in `../../hyperframes-animation/blueprints-index.md` — when a blueprint gains a role there, add its script shape here.\n\n### HOOK\n\n**kinetic-type-beats** — the words ARE the motion\n\n- Mailoji — \"Still using a @gmail address? Or @outlook, or @hotmail, or @yahoo?\"\n- Outrank — \"Getting traffic is hard. Insanely hard.\"\n- AiAgent — \"An AI agent that's easy to use — and optimised for you.\"\n- Uizard — \"Transform your sketches into prototypes — automatically.\"\n- _Pattern:_ a punchy claim or rhetorical jab whose KEY WORD swaps in place (or escalates beat by beat) — the swap/escalation is the joke.\n\n**typewriter-reveal** — someone is typing this\n\n- \"Need answers about your audience — right now?\"\n- Contra — \"You are more than your job title. You are more than your resume.\"\n- _Pattern:_ a relatable line typed live and edited mid-stream (a word backspaces and retypes) — the everyday thought, in your own words.\n\n**spatial-pan-stations** — a panned timeline\n\n- Rows — \"From VisiCalc to Excel to Google Sheets — the spreadsheet has barely changed since 1979.\"\n- _Pattern:_ a march of named milestones across time, landing on \"...until now / ...up to us.\"\n\n**constellation-hub** — nodes ring a center, camera pushes in\n\n- \"Content, sentiment, engagement, analysis — every platform you're on, in one place.\"\n- _Pattern:_ a spread of tools/channels collapsing onto one center — \"it connects everything.\"\n\n**ticker-takeover** — options cycle, then a hero crashes in\n\n- Notion — \"A doc? A database? A wiki? — no, it's all of them, in one place.\"\n- _Pattern:_ a \"could be X, or Y, or Z?\" cycle on one swapping word, then a hero claim crashes in and replaces it — \"actually, this is what it is.\"\n\n**prompt-type-submit-generate** — watch me ask\n\n- \"Build me a landing page for my coffee brand — dark, minimal, launch-ready.\"\n- \"What if you could just… ask?\"\n- _Pattern:_ the VO speaks (or frames) the ask itself while the prompt types live — the question is the whole hook; the answer stays off-screen, or a second ask starts before the cut.\n\n**zoom-out-workspace-reveal** — the mystery re-scopes\n\n- \"This isn't a finished animation — it's your canvas.\"\n- _Pattern:_ near-silence or one slow tease over the close-up mystery, with the landing line timed to the zoom-out — the words answer \"what am I looking at?\" exactly when the workspace does.\n\n**fixed-anchor-cycle** — a roll-call around a pinned line\n\n- \"For founders, for designers, for marketers, for teams — for anyone who ships.\"\n- _Pattern:_ one static claim holds while its audience/option list cycles fast beneath it — the list is the sentence's swapping object, and the brand line lands after the cycle clears.\n\n**cursor-ui-demo** — a canvas already alive\n\n- \"Your whole team is already in here — designing, commenting, shipping.\"\n- _Pattern:_ a \"we're all here working\" line over an ambient multi-cursor canvas — presence, not features; the live activity is the proof.\n\n**dataviz-countup** — cold-open on one exploding stat\n\n- \"One million users. Ninety days.\"\n- _Pattern:_ ONE statistic counts up as the VO speaks it — scale alone carries the tension; no product, no context yet.\n\n**cta-morph-press** — a lone widget does its trick\n\n- \"It starts as a search bar. It becomes your whole workflow.\"\n- _Pattern:_ one small widget on a bare field morphs in place and performs its payload while the VO names the transformation — small thing, big claim, hand off to the title.\n\n### PROBLEM\n\n**kinetic-type-beats** — pain lands alone on a bare canvas\n\n- Butter — \"What if your sessions didn't have to be boring and unstructured — or buried under a dozen tabs?\"\n- SmartCue — \"You asked for better leads. We were the cure — MQLs that actually convert, a sales team that becomes your ally.\"\n- _Pattern:_ 3–5 short pain statements (or a \"what if?\" framing), each landing solo before the next — no product yet.\n\n**spatial-pan-stations** — a panned web of pain\n\n- Vauban — \"Coordinating legal documents, signatures, and cross-border transactions — it's a tangled mess.\"\n- _Pattern:_ pain \"stations\" traversed one by one, ending on a knot — \"too many disconnected steps.\"\n\n**dataviz-countup** — the data IS the argument\n\n- \"67% of professionals say leadership is disconnected — and it's costing them a 65% boost in profitability.\"\n- _Pattern:_ a count-up / chart / stat the camera pushes through to dramatize a worsening or large-scale problem.\n\n**overwhelm-surround** — buried by your own tools\n\n- \"Slack, email, docs, tickets, three more tabs — and somehow it all lands on you.\"\n- _Pattern:_ recognizable tools pile in until they surround and bury the viewer — the pain is being swamped, not one bad number.\n\n### PRODUCT_INTRO\n\n**kinetic-type-beats** — \"Introducing…\" name-drop\n\n- \"Elevating experiences, removing manual touchpoints, automating processes — so you can focus on the customer.\"\n- Uizard — \"Introducing Uizard — the design tool for everyone.\"\n- _Pattern:_ hard-cut through \"Introducing…\" / tagline / value beats and resolve on the brand name or logo.\n\n**logo-assemble-lockup** — wordless premium sting\n\n- Manifold — \"Manifold.\" _(wordless mark assembles; VO optional — just the name)_\n- _Pattern:_ an abstract system assembles around a fixed mark — no copy, or just the product name landing.\n\n**cursor-ui-demo** — first cursor-led look\n\n- ClickUp — \"This is ClickUp — click through and watch your whole workspace change.\"\n- \"Pull up any contact, find the right advisor, and you're matched in seconds.\"\n- PaLM 2 — \"Meet PaLM 2 — what is it, what can it do, and how was it built?\"\n- _Pattern:_ a cursor sweeps in to introduce the surface — a light first look landing on a hovered hero element or fresh result.\n\n**dataviz-countup** — open on the result\n\n- SuperX — \"X growth — discover what really works: 19.6 million impressions.\"\n- _Pattern:_ a confident \"look at the data / the result\" open — scroll a tilted card grid to one glowing hero metric, tagline assembling word by word.\n\n**video-text-pivot** — show it work, then the number\n\n- \"Watch it run — then look at what it saved: 14 hours, every week.\"\n- _Pattern:_ the product video plays, then slides aside to hand the frame to one impact stat — \"see it work, now see what it's worth.\"\n\n**prompt-type-submit-generate** — something you talk to\n\n- \"Meet Ada — describe what you need, attach what you have, and let it run.\"\n- _Pattern:_ the first look IS the composer — the VO introduces the product as a conversation partner while a long prompt types with attachments and option picks, ending on (or just after) the submit.\n\n**spatial-pan-stations** — decode the idea, then land on it live\n\n- \"Capture, structure, publish — that's the idea. Here it is running.\"\n- _Pattern:_ a labeled concept strip read station by station, the final pan bridging into the live demo — \"here's the idea → here it is working.\"\n\n**device-surface-showcase** — introduced by completing its core loop\n\n- \"Open a space, drop in your notes, hit share — that's it, that's the product.\"\n- _Pattern:_ the product introduced by DOING its core loop once inside its real interface, stepwise and cursorless — the VO narrates the steps plainly and lands on \"that's it.\"\n\n**titlecard-reveal** — a near-still title prelude\n\n- \"Relay. Docs that write themselves. Let's look inside.\"\n- _Pattern:_ 2–3 near-still cards seamed by blur-snap handoffs — name, one-line claim, then into the product; each card carries one short spoken phrase.\n\n### KEY_FEATURE\n\n**grid-card-assemble** — enumerate breadth at once\n\n- Postcards — \"Want more? Unlimited exports, 1,400 fonts, an AI assistant, version history — and it's free to try.\"\n- ClearVPN — \"ClearVPN is built to help you: streaming access, secure browsing, location changing — only the essentials.\"\n- Copilot — \"Command bar, Zapier, white-labeling, API, SOC2 — and a whole lot more.\"\n- _Pattern:_ a tile/pill/card grid self-assembles to show many capabilities at once — \"look how much it does.\"\n\n**cursor-ui-demo** — one workflow, end to end\n\n- \"Scroll your feed, then jump straight to your notifications — it's all one click away.\"\n- Flowrite — \"Pick your recipient, set your intention, choose a tone — and Flowrite writes it for you.\"\n- Descript — \"Tune your edits, add a crossfade, automate the volume, normalize loudness — then export.\"\n- _Pattern:_ one specific multi-step workflow shown end-to-end across 2–4 real edits, landing on the action button or result.\n\n**device-surface-showcase** — experienced inside its real interface\n\n- HRS — \"Your flight's cancelled — so book a hotel, a taxi, and get reimbursed, all in one digital journey.\"\n- HelpKit — \"A dynamic table of contents that follows your readers as they scroll.\"\n- Graphite — \"Use unique themes, recolor one element or several, and configure it all in a handy window.\"\n- Contra — \"Pick a template, make it yours, and launch a portfolio that's unmistakably you.\"\n- _Pattern:_ a feature shown being USED inside its real surface — the device/window is the hero and its screens advance through a flow.\n\n**comparison-split** — two paired capabilities, side by side\n\n- \"Design on the left, code on the right — always one source of truth.\"\n- _Pattern:_ two complementary capabilities of equal weight shown together — \"X and Y, in lockstep.\"\n\n**video-text-pivot** — the feature, then its result\n\n- \"Here's the editor in action — and the result: a publish-ready cut in minutes.\"\n- _Pattern:_ a feature clip runs, then yields the frame to a metric / impact line — the clip proves it, the number lands it.\n\n**prompt-type-submit-generate** — one ask, one answer\n\n- \"Ask for revenue by region — and the chart draws itself.\"\n- _Pattern:_ ONE prompt→response round trip — the VO names the ask, lets the status theater breathe a beat, then calls the result as it streams in.\n\n**agent-progress-theater** — the machine visibly works\n\n- \"Kick off the scan — it checks every file, flags what's broken, and fixes what it can. Watch.\"\n- _Pattern:_ trigger → working theater → receipt: the VO hands the work over, then reads the findings as rows land and check off — present tense, the machine is the subject.\n\n**panel-edit-live-sync** — one gesture, two surfaces\n\n- \"Drag the value — the button follows. Pick a unit — the code converts. Live.\"\n- _Pattern:_ 2–4 short cause→effect couplets, each pairing a gesture with its live mirror (\"do X — Y answers\"), ending held on the last edit.\n\n**transcript-scroll-artifact-reveal** — the work, then the deliverable\n\n- \"It planned, researched, built, and tested — and left you the spreadsheet to prove it.\"\n- _Pattern:_ a \"look how much happened\" line read down the transcript at traversal pace, then one pivot line cashes it in on the artifact — evidence first, payoff last.\n\n**camera-journey** — a cinematic flight over the result\n\n- \"A month of content — planned, scheduled, and ready before you sat down.\"\n- _Pattern:_ a flying camera explores the generated artifact while the VO makes one calm, sweeping claim; the content acts by itself — no hands, no clicks.\n\n**dataviz-countup** — the numbers prove the feature\n\n- \"Response time, down 40%. Coverage, 3×. Every claim, a number.\"\n- _Pattern:_ the feature proven by its metrics — a stat montage scrubbed / counted up while the VO reads each number as it lands.\n\n### BENEFITS\n\n**kinetic-type-beats** — rapid-fire value montage\n\n- AiAgent — \"No API keys, GPT-4 access, simple UX, clean UI — moving fast.\"\n- Uizard — \"Export to Sketch, create style guides, share, collaborate — and code less.\"\n- _Pattern:_ a staccato montage of 8–12 short value phrases, each flashing and clearing at high tempo.\n\n**grid-card-assemble** — an accumulating value list\n\n- Lineicons — \"Consistent and clean, tons of free icons, a Figma plugin, a powerful editor, every format you need.\"\n- Plutio — \"Manage projects, track time, send invoices, write proposals — all deeply customisable.\"\n- _Pattern:_ short value phrases populate a vertical list ~1/sec, co-resident and accumulating, each popping into its slot.\n\n**titlecard-reveal** — the calm value beat\n\n- CSS Scan Pro — \"A smart color picker — with instant tints and shades.\"\n- _Pattern:_ one clean two-line value title, one slide-up crossfade, then held still. Low motion is the point.\n\n**camera-journey** — travel the value chain\n\n- \"Leave one comment here — and the forecast updates over there.\"\n- _Pattern:_ a cause→effect round trip: the VO's first half lands on the action, its second half on the payoff the camera travels to — \"do this small thing here, get this big thing there.\"\n\n**zoom-out-workspace-reveal** — this is just one corner\n\n- \"That one file it fixed? A corner of everything it already did.\"\n- _Pattern:_ the VO tells the micro-story during the close-up dwell, then the scale line lands with the zoom-out — the benefit is breadth, revealed in one move.\n\n**fixed-anchor-cycle** — everything changes, this stays\n\n- \"Same prompt. Every tool you own.\"\n- _Pattern:_ one pinned claim while the entire surface re-skins around it — a short \"works everywhere\" line, then let the cycling themes speak.\n\n**cursor-ui-demo** — demo, value line, demo\n\n- \"Watch it draft the reply — that's an hour back — now watch it file the ticket.\"\n- _Pattern:_ a demo|text|demo sandwich — the VO alternates showing and telling, naming the value in the text beat between two live interactions.\n\n### SOCIAL_PROOF\n\n**constellation-hub** — the hub at the center of your stack\n\n- kyvos — \"On any BI tool — Tableau, Looker, Power BI — Kyvos sits at the center of your stack.\"\n- \"Connects to thousands of apps — including every one you already use.\"\n- _Pattern:_ the product mark is the hub and partner logos orbit it — \"sits at the center of everything you use.\" In the scatter-drift end-card variant there is no hub and no ring: a serif claim holds center while app icons pop in scattered and drift slowly outward — breadth said with count and spread, not geometry.\n\n**grid-card-assemble** — a logo wall pulling back to a vast ecosystem\n\n- Lineicons — \"Used by more than 100,000 designers, developers, and companies — including these.\"\n- ClickUp — \"Connect Google Drive, Slack, GitHub, Stripe — your whole ecosystem in one place.\"\n- Copilot — \"With thousands of partner apps — Airtable, Calendly, Jira, Asana — you can embed anything.\"\n- _Pattern:_ a wall of partner/app logos builds, then a camera zoom-out reveals a vast ecosystem.\n\n**titlecard-reveal** — busy → clean proof card\n\n- Trumpet — \"We supply the trumpet, you bring the band — loved by 1,000+ sales, success, and marketing teams.\"\n- _Pattern:_ wipe a busy open away to a clean lockup plus a \"loved by N+ teams\" line that settles and holds.\n\n**dataviz-countup** — the numbers vouch\n\n- \"Twelve thousand teams. 4.9 stars. 99.98% uptime.\"\n- _Pattern:_ proof by count-up — adoption, rating, and scale metrics tick up as the VO reads them; the biggest number lands last.\n\n### CTA\n\n**kinetic-type-beats** — punchy closing line beat-by-beat\n\n- Stylebit — \"Go pro, connect up to five Figma accounts — more features coming. Join now.\"\n- revid.ai — \"Boost your engagement and turbocharge your social media.\"\n- _Pattern:_ a closing line (or short value stack) that snaps in beat by beat and lands on the logo or URL.\n\n**logo-assemble-lockup** — logo build → push-through into the URL\n\n- Strapi Cloud — \"Deploy on Strapi Cloud — no server hassle, same flexibility. Try it now at strapi.io/cloud.\"\n- Highlander — \"Highlander is ready for the future you're building. Let's raise — at highlander.ai.\"\n- STUDIO AI — \"Get early access to STUDIO.\"\n- Glorify — \"Get started for free now — no credit card required.\"\n- _Pattern:_ the logo builds, a fast camera push-through streaks giant CTA letters past the lens, resolving on the URL or action verb.\n\n**cta-morph-press** — identity condenses into one click\n\n- Linear — \"This is Linear. Start building — it's free.\"\n- _Pattern:_ the brand mark condenses straight into the single thing you click — \"here's us → click here,\" no spatial set.\n\n**prompt-type-submit-generate** — the command is the ask\n\n- \"One command — npm install relay — and you're live.\"\n- _Pattern:_ the closing invitation IS a typed install command — the headline demotes, the terminal pill types it out, and the VO speaks the command (or one short line over it); the card holds with only the caret blinking.\n\n**constellation-hub** — the orbit collapses into action\n\n- \"Everything you use, one hub — click, and it's yours.\"\n- _Pattern:_ the ecosystem ring collapses onto the core on one click that springs the product open — the VO turns \"it connects everything\" into the action line.\n\n**titlecard-reveal** — a calm end-card stack\n\n- \"Try it free. No credit card. relay.app.\"\n- _Pattern:_ 2–3 near-still cards hard-cut in sequence, one short closing phrase each, terminating on the held logo/URL — the calm is the confidence.\n\n### BRAND_OUTRO\n\n**kinetic-type-beats** — a verb barrage resolving on one word\n\n- Phantom — \"Buy, store, stake, swap, send, connect, explore — multichain.\"\n- _Pattern:_ a rapid center-channel barrage of single-word verbs asserting breadth, resolving on the brand's one defining word. No logo lockup needed.\n\n**typewriter-reveal** — persistent mark + typed CTA rail\n\n- Collato — \"Next time, just Collato it — sign up for free today.\"\n- _Pattern:_ the mark holds dead-center the whole time while a sub-line types or swaps into the final CTA.\n\n**logo-assemble-lockup** — elements clear, the lockup draws itself in\n\n- Copilot — \"Copilot.\" _(pills disperse off-frame, the mark draws on; VO optional — just the name)_\n- Dora AI — \"Dora AI — join the waitlist.\"\n- _Pattern:_ feature/UI elements clear the stage off all four edges, then the logo mark draws itself on and the wordmark completes the lockup.\n\n**ticker-takeover** — use-cases cycle, the brand takes the frame\n\n- \"For notes, for tasks, for plans, for teams — [brand] holds it all.\"\n- _Pattern:_ closing use-cases/verbs cycle through one slot, then the brand mark crashes in and owns the final frame.\n\n**fixed-anchor-cycle** — the anchor holds, the words cycle\n\n- bolt.new — \"Prompt, run, edit, deploy — enjoy.\"\n- Anthropic — \"Opus 4.6 — by Anthropic.\"\n- _Pattern:_ the brand name sits immovable while tagline words or praise quotes cycle beside it — per-word highlight stepping, or an accelerating flurry — landing on the completed lockup.\n\n---\n\n## VO_MODE handling\n\n**No pasted script** — write the VO yourself, in the matching blueprint's script shape:\n\n- 1–2 sentences per spoken beat, usually 6–20 words.\n- Concrete and human; active verbs; say what the product does for a person.\n- Avoid: \"seamless experience,\" \"unlock the power of,\" \"streamline your workflow,\" long noun-phrase lists, a whole beat that is just \"Or…\".\n- Silent beats are allowed when the visual proves the point — leave them out of `SCRIPT.md`.\n\n**`VO_MODE = restructure`** — treat `user_script.txt` as source material. Rewrite, reorder, merge, or omit to fit the arc and target length. You may still shape each segment toward its beat's blueprint pattern.\n\n**`VO_MODE = verbatim`** — do NOT change the user's words. Segment the script into beat-sized chunks at sentence/paragraph boundaries (split a long sentence only at a natural clause boundary). Final duration follows the provided script. Blueprint shaping does not apply to wording — only to which shape each verbatim chunk is paired with.\n\n## Asset candidates\n\n`asset_candidates` is the Step-3 → Step-4 handoff. Rules:\n\n1. Read only `capture/extracted/asset-descriptions.md` to know what exists.\n2. Use only filenames listed there; write as `assets/<basename>`.\n3. One line, candidates separated by semicolons, a short description after `—`.\n4. Prefer `[video]` assets when motion proves the product better than a still.\n5. Use content assets (UI, screenshots, product photos, charts, demos). Skip tiny icons, favicons, badges, decorative chrome, repeated logo variants — unless the beat needs them. Partner / third-party logos come from `/media-use` (`resolve --type logo --entity <brand>`) — never redrawn by hand.\n6. Pure-typography beats may use an empty asset list. Do not use nested lists.\n\nExample:\n\n```md\n- asset_candidates: assets/dashboard-hero.png — dark analytics dashboard, wide screenshot; assets/demo-loop.mp4 — query-to-result interaction clip\n```\n\n## transition_in\n\nBetween-frame transition — how each frame ENTERS from the one before it. The harness's injector stamps it onto the two whole-frame clips (opacity / transform / filter on the frame wrappers). Name a **registry type** directly; optionally add a direction and/or a duration (`push-slide LEFT`, `crossfade 0.4s`). `cut` / `none` / empty = a hard cut.\n\nThe five registry types:\n\n- **`crossfade`** — a plain opacity dissolve; the neutral choice when two frames sit in the same visual world.\n- **`blur-crossfade`** — dissolve through a soft blur + slight scale; use when the two frames' backgrounds differ a lot, so the blur masks the color clash a plain crossfade would expose.\n- **`push-slide`** `[LEFT|RIGHT|UP|DOWN]` — outgoing slides off, incoming pushes in from the opposite edge; a lateral \"next beat\" feel for a run of consecutive cards / feature beats.\n- **`zoom-through`** — outgoing scales up + blurs out, incoming scales up from small into focus; for a STATE CHANGE / turning to a new section (hook → context).\n- **`squeeze`** — outgoing compresses to a line on one edge as incoming expands from the other; a snappy, mechanical beat change.\n\nPick a small set and repeat them: default to `crossfade` (or `blur-crossfade` when the backgrounds clash), and reach for `zoom-through` at section boundaries. Frame 1's `transition_in` is a placeholder.\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 Step 3.1 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. The narrative shape each frame satisfies:\n\n```md\n## Frame N — Short name\n\n- scene: one clear visual idea\n- voiceover: \"spoken line, written in the candidate blueprint's script shape, 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: hook\n- persuasion: Pain validation\n- beat: urgency\n- blueprint: kinetic-type-beats — candidate shape from the role→blueprint menu; omit when none fits\n- asset_candidates: assets/example.png — short asset description\n\nnarrativeRole: what this beat does in the viewer journey.\nkeyMessage: the one idea the viewer should remember.\n```\n\n- `persuasion` — a concrete move (Pain agitation, Negative contrast, Friction reduction, Show-don't-tell proof, Feature-to-benefit translation, Statistical proof, Authority by association, Social proof, Risk reversal, Future pacing, Value stacking, Rule of three, Scarcity/urgency, Status seeking…). Never \"show benefit.\" Invent one if none fits and explain it in the prose.\n- `beat` — a specific emotion (anxiety, frustration, overwhelm, tension, urgency, skepticism, FOMO → relief, curiosity, clarity, intrigue, aspiration → trust, confidence, control, ease, power, awe, excitement, belonging → triumph, motivation, urgency-to-act, peace of mind, inevitability). Compound allowed (e.g. `relief + control`).\n\n## Final checklist\n\n- The arc is named; the sequence is narrative-driven, not page-order-driven.\n- The opening uses one clear hook strategy that creates tension/curiosity/desire.\n- Each beat has one job; every beat has `type`, `persuasion`, `beat`.\n- Each beat's `voiceover` is written in its candidate blueprint's script shape (from the bank), with the candidate `blueprint:` tagged wherever a shape fits — and omitted where none does.\n- Each `voiceover` is phrase-segmented into cues (each cue a piece Step 5 can reveal on) — not one long run-on clause.\n- Shapes vary across the video; no single blueprint on every beat.\n- Story truth was never bent to fit a blueprint — no beat invented/dropped/reordered for a shape.\n- Every visual beat has suitable `asset_candidates` (filenames only from `asset-descriptions.md`), unless intentionally typography-only.\n- UI/product demos use a multi-beat sequence when the value depends on workflow.\n- `transition_in` is a registry type (`crossfade` / `blur-crossfade` / `push-slide` / `zoom-through` / `squeeze`) — default `crossfade` (`blur-crossfade` on a background clash), `zoom-through` at section boundaries, repeated across the video.\n- `SCRIPT.md` contains only locked spoken narration; silent beats are intentional and omitted.\n",
|
|
311
|
-
"product-launch-video/references/visual-design.md": "# Visual design — product-launch per-frame shot method\n\n> The method behind **Step 4 (Frame visual design)**. You (the orchestrator) read it to **enrich `STORYBOARD.md` frames in place** — story-design wrote the skeleton (each frame's `scene`, `voiceover`, `transition_in`, the narrative fields, its `asset_candidates`, and optionally a candidate blueprint id); you add how each frame **looks and moves**. The unit you write per frame is a **time-coded shot sequence** — a shot directed across its whole duration, not a static slide. You write **no HTML** (that's the frame workers), you **never read `capture/`** (story already chose the assets), and you do **not** select assets or name transitions (story owns both). `frame.md` is your palette/type truth by role. Layout is a compact vocabulary in this file (the **Layout** section below), stated inline per Scene; motion vocabulary + the motion doctrine + the seek-safe core → `motion-language.md`; the proven shapes → `../../hyperframes-animation/blueprints-index.md` + `blueprints/<id>.md`; concrete rules resolve in Step 5 from this skill's local `../../hyperframes-animation/rules/`. Adding palette theory or a generic font rule here? Wrong home — `frame.md` + `hyperframes-creative`.\n\n## The unit is a time-coded shot sequence\n\nA frame's visual layer is **a sequence of time windows paced to the voiceover**, not a bag of effect tags. The failure that reads as PowerPoint is **front-loading**: the agent rushes the whole canvas on screen in the first ~25%, and then it just sits (the old representation — a flat set of effect names + a prose note — fired everything at entrance and left the rest empty). A time-coded shot sequence written **against the VO** makes that impossible: each window states what is on screen and what is moving, and **nothing appears before the voiceover reaches it.**\n\nWrite each frame as a handful of windows cued by the spoken line:\n\n```\nScene 1 (0.0–Xs): only what the VO is saying at t=0 enters — never the whole canvas\nScene 2 (Xs–Ys): the next piece reveals as the VO names it (a line / card / stat / icon)\n … one window per spoken cue — as many or as few as the line calls for\nScene N (…–end): content has resolved; hold the read (stillness; subtle jitter at most)\n```\n\n- Each `Scene` line names **what's on screen**, **what moves in this window**, and **where it sits** (layout, inline). Times are real seconds across the frame's `duration`.\n- **Pace reveals to the voiceover; never front-load.** This is the core anti-PowerPoint mechanism (→ `motion-language.md` Part 2 Rule 2). At t=0 show only what the VO is saying then; reveal each further piece — a line, a card, even an h1 — **when the VO names it**, spreading reveals across the shot and especially the **back ~50%**. **The window count = the number of spoken cues the line calls for** — a two-beat line is two windows, a five-feature list is five or six. There is **no fixed count and no mandatory \"middle\" act**; the only sin is dumping everything up front.\n- **End on a held read.** Once the content has resolved it holds and reads — **prefer stillness to bad motion**: no forced camera drift, no lazy breathing, no back-half pan/push; at most a subtle jitter keeps it alive (→ `motion-language.md`). On a short shot the final reveal and the hold are the **same window** — the hold is not a separate mandatory act. Only the final frame has a real exit; every other frame's exit is the harness transition (story's `transition_in`).\n- A **deliberately held** frame — content already revealed, now reading still — is legitimate and often right (a climax, a breather). The failure is never \"too still\"; it is **front-loaded-then-frozen** (everything dumped by ~25%, nothing cued to the VO). Place held beats deliberately for rhythm so the video isn't uniformly busy (allocate them in `## Video direction`). Reveal pacing + holds + the idle budget → `motion-language.md`.\n\n## Pick the shape — instantiate a blueprint\n\nDon't invent each shot from scratch. The frame's **role** (its `type` / `beat`) points to a proven shape:\n\n1. **Match the role to a blueprint.** Open `../../hyperframes-animation/blueprints-index.md`, find the frame's role in the **role→blueprint menu**, and pick the blueprint whose intent fits this beat (story may already have named a candidate id — confirm or override it). Read that `blueprints/<id>.md`: it is a short, product-agnostic, **time-coded shot template with `[slots]`** and a named **signature move** (the thing that makes the shape itself — the SVG ring, the push-THROUGH, the in-place token swap).\n\n2. **Instantiate its `[slots]` with THIS product's content** — three postures:\n - **Reproduce** — the blueprint fits the beat and your content maps onto its slots cleanly. Fill every `[slot]` with this product's word / asset / stat and follow its Scene timing. Write the resulting Scene lines.\n - **Adapt** — the _structure_ fits but the content / asset-count / surface doesn't (or you want a fresher surface to avoid templating). State **what you keep / what you change** in one line, then write the adapted Scene lines. You may extend or vary; you may **never** drop the **signature move** (drop it and you picked the wrong blueprint), and you keep the reveals **paced to the VO** — never collapse the shape to a single front-loaded dump.\n - **Compose** — no blueprint fits the beat. Build the shot from the **motion vocabulary** in `motion-language.md`: still pace the reveals to the VO across the shot, never fire everything at t=0. Mark it `blueprint: compose`.\n\n3. **Keep the signature move.** Whichever posture, the blueprint's signature move (named in its file) is the spine of the shot — it usually lands on the shot's key reveal. Carry it through.\n\nThe blueprint's own Scene lines, motion vocabulary, and `rule mapping` are your raw material; you are choosing a shape and casting this product into it, not copying an engineering spec.\n\n## What you add to each frame\n\nStory-design's `## Frame N` block already carries the narrative + `asset_candidates`. You append the shot. Story's `scene` / `voiceover` / `transition_in` / role fields stay untouched.\n\n```\n## Frame 3 — The problem\n- scene: a 20-minute timer over a stack of rejected takes ← refine only if it could read sharper\n- voiceover: \"…\" ← story's; leave it\n- transition_in: crossfade ← story's; leave it\n- type: pain_point ← story's\n- persuasion: Pain agitation\n- beat: frustration\n- blueprint: dataviz-countup (Adapt) ← you add: the id you instantiated (or \"compose\")\n- focal: assets/reject-stat.png ← you add: the hero asset for this beat\n- roles: reject-stat = cutout · timer = supporting · backdrop = background (dim ~40%) ← you add: role per candidate\n- sfx: impact-soft, riser ← you add: the sound the beat wants (fetched + mounted at root; never yours to embed)\n\nAdapt: keep the count-up-ring signature; one stat not three, and the trend chart becomes the rejected-takes count climbing.\nScene 1 (0.0–1.2s): solid backdrop (dim ~40%); a circular progress ring + bold center number seat dead-center, ring sweeps and number counts 0→20 on one heavy ease — Centered template, ~50% of frame. Slow push-in runs underneath.\nScene 2 (1.2–3.4s): as the VO names the count, the camera pushes THROUGH the ring into the rejected-takes stack lower-left; the stack grows beat-by-beat as a reject counter ticks up beside it (the count-up reveals on its spoken cue, not at t=0). Asymmetric 60/40, 3 depth layers.\nScene 3 (3.4–5.0s): land the hero stat card dead-center, accent glow blooms behind it and holds; the stat reads clean and STILL — no continuing push, no breathing (a held beat beats bad motion). The stillness reads against the prior motion.\n```\n\nThe lightweight tags:\n\n- **`blueprint:`** — the id you instantiated (with `(Reproduce)` / `(Adapt)`), or `compose`. One id per frame.\n- **`focal:`** — which existing candidate is the hero of this beat.\n- **`roles:`** — each candidate's role: `cutout` (foreground subject, lay text around it) · `background` (full-bleed, dim 30–50%) · `supporting` (secondary). You **consume** the candidates story chose — never add, swap, or drop one (coverage is story's call; if a frame truly has the wrong candidates, flag it back, don't reach into `capture/`).\n- **`sfx:`** — name the sound the beat wants (an impact for a slam, a whoosh for a push, a riser into a reveal). The audio script's `fetch-sfx` pass retrieves it and the assembler mounts it at the root — you only **name** it, never embed an `<audio>` element.\n\n**Layout is stated INLINE in each Scene line** — name the template, density, depth, and hierarchy as part of \"where it sits\" (`Centered, ~50% of frame`, `asymmetric 60/40, 3 depth layers`), drawing on the **Layout** vocabulary below; never write px / scale / shadow recipes (the worker writes those).\n\n**Motion is named INLINE in each Scene line** — name the move from `motion-language.md`'s vocabulary (`ring sweeps`, `pushes THROUGH`, `count-up`, `glow blooms`) and let it settle on a long-tail curve (`power3` default — smooth beats bouncy; see `motion-language.md`). Never write ease curves / ms / stagger (those resolve in Step 5 from this skill's local `../../hyperframes-animation/rules/`).\n\n## Layout — named inline per Scene\n\nState each Scene's layout as part of \"where it sits.\" **If the blueprint already implies a composition** (a ring around a center, stations on a wide canvas, two cards from opposite wings), that wins — describe it directly; the vocabulary below is for **composing freely** or a generic beat, not a menu you must pick from. Never write px / scale / shadow (the worker does). One frame's layout can EVOLVE across its Scenes (Scene 1 centered hero → Scene 2 rearranges to a grid).\n\n- **Framing vocabulary** — centered (hero / climax) · rule-of-thirds · split-screen (comparison) · layered-depth (immersive) · asymmetric 60/40 or 70/30 (editorial) · triptych (three panels) · full-width strip. Vary the framing across the video so it doesn't read as one repeated template — let the beat decide, not a quota.\n- **Density** — primary visual ≥ 40% of canvas; ≥ 3 depth layers (background + midground + foreground); never a lone small cluster floating in empty space. Squint test: after blur you can still pick out the #1 element.\n- **Hierarchy** — combine ≥ 2 of size (3:1) / weight (800 vs 400) / contrast / position (upper-third is golden) / motion, so one element clearly dominates.\n- **Depth** — layer 2–3 of: size, blur, opacity gradient, overlap, shadow-stack.\n- **Don't show**: nav bars, footers, scrollbars, real cursors / browser chrome, generic decorative shapes standing in for a real asset, floating bokeh / purple-blue \"AI\" gradients — unless it's an intentional UI-demo reconstruction.\n\n## `## Video direction` — write the invariants ONCE\n\nThe whole video shares one look and one motion grammar. Write a **`## Video direction`** block ONCE at the top of `STORYBOARD.md` so every frame inherits it and per-frame Scene lines carry only the **delta**. This block is load-bearing — it is what binds many independent shots into one film. **Keep it.**\n\n- **palette system** — from `frame.md`: which roles map to which hues. Never invent.\n- **motion grammar + reveal model** — long-tail eases (`power3` default, smooth over bouncy) + the **VO-paced reveal** model every frame follows (reveal each piece on its spoken cue; never front-load) + what may stay alive during a hold (subtle jitter at most; no lazy breathing) (→ `motion-language.md`).\n- **rhythm / held-frame allocation** — name the **held / breather frames** (often before a climax) so the video varies its energy: most frames reveal to the VO, a few hold still (a held read beats bad motion; the anti-monotony discipline; → `motion-language.md`).\n- **negative list** — what never appears: off-brand textures / effects the pack forbids, **plus both motion failure modes** — slideshow (front-load then freeze) and screensaver (everything floating independently) (→ `motion-language.md`).\n\nDo **not** repeat these per frame — restating video-level rules in every frame is exactly the bloat this layer prevents.\n\n## Palette & type — from `frame.md`, never invented\n\n- **Palette** — `frame.md` (the adopted pack) is the color truth; apply its roles per frame. Generic basics (one accent, tint neutrals, avoid pure `#000`/`#fff`) → `hyperframes-creative/references/house-style.md`.\n- **Type** — fonts resolve via `frame.md`'s type tokens; reference them **by role** (display / body / mono / the pack's ramp), never by raw family or px. Generic typography craft (embedded fonts, dark-bg optical compensation, `tabular-nums`) → `hyperframes-creative/references/typography.md`.\n\n## Caption-band keep-out (plan side)\n\nThe bottom ~17% of the canvas is reserved for the caption pill. Plan every frame's content into the **top ~83%** so nothing important lands in the band (the worker enforces the pixel cutoff; you plan the layout). Holds even when captions are disabled — bottom-edge consistency.\n\n## Where the detail lives\n\n| For… | Read |\n| ------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- |\n| the proven shapes + role→blueprint menu + how to pick | `../../hyperframes-animation/blueprints-index.md` → `blueprints/<id>.md` (local) |\n| motion — shot model, vocabulary, holds, idle budget, stillness, seek-safe | `motion-language.md` (local) |\n| layout — templates, density, depth, hierarchy, caption band | the **Layout** vocabulary in this file |\n| concrete eases / ms / stagger + rule recipe bodies (Step 5) | local `../../hyperframes-animation/rules/` (the frame worker reads it; you don't) |\n| palette + type tokens | the project's `frame.md`; basics → `hyperframes-creative` `house-style.md` / `typography.md` |\n| \"produced, not generated\" foreground density | `hyperframes-creative/references/video-composition.md` |\n| within-frame cuts / seams (zoom-through · cut-the-curve · waterfall) | `cut-catalog.md` (the worker builds them inside the composition) |\n| transitions | story-design owns `transition_in`; you don't touch it |\n\n## Before you finish — checklist\n\n- **`## Video direction`** written once at the top (palette · motion grammar + shot model + idle budget · stillness allocation · negative list incl. both failure modes); per-frame entries are deltas, not restatements.\n- Every frame is a **time-coded shot sequence** with real second windows across its `duration` — not a tag bag.\n- **No frame front-loads** — at t=0 only what the VO is saying enters; each further piece reveals on its spoken cue, across the back ~50%. Window count follows the VO, not a fixed number.\n- Every frame names an **`blueprint:`** id (Reproduce / Adapt) or `compose`; an Adapt states keep/change and **keeps the signature move**; nothing collapses to a single front-loaded dump — reveals stay paced to the VO.\n- **Held frames are deliberate** — allocated in Video direction for rhythm; a held read is fine (prefer stillness to bad motion), but no frame may be front-loaded-then-frozen.\n- Each frame's `asset_candidates` have a `focal` + per-candidate `roles`; none added, swapped, or dropped.\n- Layout named **inline** per Scene (template / density / depth / hierarchy — the **Layout** vocabulary here); motion named **inline** per Scene from the vocabulary (`motion-language.md`). No px / ease curves / ms / JS.\n- Content planned into the top ~83% (caption band clear).\n- Palette / type pulled from `frame.md` by role — nothing invented.\n- You wrote no HTML and never read `capture/`.\n",
|
|
311
|
+
"product-launch-video/references/visual-design.md": "# Visual design — product-launch per-frame shot method\n\n> The method behind **Step 4 (Frame visual design)**. You (the orchestrator) read it to **enrich `STORYBOARD.md` frames in place** — story-design wrote the skeleton (each frame's `scene`, `voiceover`, `transition_in`, the narrative fields, its `asset_candidates`, and optionally a candidate blueprint id); you add how each frame **looks and moves**. The unit you write per frame is a **time-coded shot sequence** — a shot directed across its whole duration, not a static slide. You write **no HTML** (that's the frame workers), you **never read `capture/`** (story already chose the assets), and you do **not** select assets or name transitions (story owns both). `frame.md` is your palette/type truth by role. Layout is a compact vocabulary in this file (the **Layout** section below), stated inline per Scene; motion vocabulary + the motion doctrine + the seek-safe core → `motion-language.md`; the proven shapes → `../../hyperframes-animation/blueprints-index.md` + `blueprints/<id>.md`; concrete rules resolve in Step 5 from this skill's local `../../hyperframes-animation/rules/`. Adding palette theory or a generic font rule here? Wrong home — `frame.md` + `hyperframes-creative`.\n\n## The unit is a time-coded shot sequence\n\nA frame's visual layer is **a sequence of time windows paced to the voiceover**, not a bag of effect tags. The failure that reads as PowerPoint is **front-loading**: the agent rushes the whole canvas on screen in the first ~25%, and then it just sits (the old representation — a flat set of effect names + a prose note — fired everything at entrance and left the rest empty). A time-coded shot sequence written **against the VO** makes that impossible: each window states what is on screen and what is moving, and **nothing appears before the voiceover reaches it.**\n\nWrite each frame as a handful of windows cued by the spoken line:\n\n```\nScene 1 (0.0–Xs): only what the VO is saying at t=0 enters — never the whole canvas\nScene 2 (Xs–Ys): the next piece reveals as the VO names it (a line / card / stat / icon)\n … one window per spoken cue — as many or as few as the line calls for\nScene N (…–end): content has resolved; hold the read with a motivated motion (a camera creep toward it, a highlight, a count)\n```\n\n- Each `Scene` line names **what's on screen**, **what moves in this window**, and **where it sits** (layout, inline). Times are real seconds across the frame's `duration`.\n- **Pace reveals to the voiceover; never front-load.** This is the core anti-PowerPoint mechanism (→ `motion-language.md` Part 2 Rule 2). At t=0 show only what the VO is saying then; reveal each further piece — a line, a card, even an h1 — **when the VO names it**, spreading reveals across the shot and especially the **back ~50%**. **The window count = the number of spoken cues the line calls for** — a two-beat line is two windows, a five-feature list is five or six. There is **no fixed count and no mandatory \"middle\" act**; the only sin is dumping everything up front.\n- **End on a held read.** Once the content has resolved it holds and reads — **keep a motivated motion alive**: a camera creep toward what is being read, a highlight gliding across the line, a total ticking up; never lazy breathing or a drift off the subject (→ `motion-language.md`). On a short shot the final reveal and the hold are the **same window** — the hold is not a separate mandatory act. Only the final frame has a real exit; every other frame's exit is the harness transition (story's `transition_in`).\n- A **deliberately held** frame — content already revealed, now being read with only a motivated motion — is legitimate and often right (a climax, a breather). The failure is never \"too still\"; it is **front-loaded-then-frozen** (everything dumped by ~25%, nothing cued to the VO). Place held beats deliberately for rhythm so the video isn't uniformly busy (allocate them in `## Video direction`). Reveal pacing + holds + the idle budget → `motion-language.md`.\n\n## Pick the shape — instantiate a blueprint\n\nDon't invent each shot from scratch. The frame's **role** (its `type` / `beat`) points to a proven shape:\n\n1. **Match the role to a blueprint.** Open `../../hyperframes-animation/blueprints-index.md`, find the frame's role in the **role→blueprint menu**, and pick the blueprint whose intent fits this beat (story may already have named a candidate id — confirm or override it). Read that `blueprints/<id>.md`: it is a short, product-agnostic, **time-coded shot template with `[slots]`** and a named **signature move** (the thing that makes the shape itself — the SVG ring, the push-THROUGH, the in-place token swap).\n\n2. **Instantiate its `[slots]` with THIS product's content** — three postures:\n - **Reproduce** — the blueprint fits the beat and your content maps onto its slots cleanly. Fill every `[slot]` with this product's word / asset / stat and follow its Scene timing. Write the resulting Scene lines.\n - **Adapt** — the _structure_ fits but the content / asset-count / surface doesn't (or you want a fresher surface to avoid templating). State **what you keep / what you change** in one line, then write the adapted Scene lines. You may extend or vary; you may **never** drop the **signature move** (drop it and you picked the wrong blueprint), and you keep the reveals **paced to the VO** — never collapse the shape to a single front-loaded dump.\n - **Compose** — no blueprint fits the beat. Build the shot from the **motion vocabulary** in `motion-language.md`: still pace the reveals to the VO across the shot, never fire everything at t=0. Mark it `blueprint: compose`.\n\n3. **Keep the signature move.** Whichever posture, the blueprint's signature move (named in its file) is the spine of the shot — it usually lands on the shot's key reveal. Carry it through.\n\nThe blueprint's own Scene lines, motion vocabulary, and `rule mapping` are your raw material; you are choosing a shape and casting this product into it, not copying an engineering spec.\n\n## What you add to each frame\n\nStory-design's `## Frame N` block already carries the narrative + `asset_candidates`. You append the shot. Story's `scene` / `voiceover` / `transition_in` / role fields stay untouched.\n\n```\n## Frame 3 — The problem\n- scene: a 20-minute timer over a stack of rejected takes ← refine only if it could read sharper\n- voiceover: \"…\" ← story's; leave it\n- transition_in: crossfade ← story's; leave it\n- type: pain_point ← story's\n- persuasion: Pain agitation\n- beat: frustration\n- blueprint: dataviz-countup (Adapt) ← you add: the id you instantiated (or \"compose\")\n- focal: assets/reject-stat.png ← you add: the hero asset for this beat\n- roles: reject-stat = cutout · timer = supporting · backdrop = background (dim ~40%) ← you add: role per candidate\n- sfx: impact-soft, riser ← you add: the sound the beat wants (fetched + mounted at root; never yours to embed)\n\nAdapt: keep the count-up-ring signature; one stat not three, and the trend chart becomes the rejected-takes count climbing.\nScene 1 (0.0–1.2s): solid backdrop (dim ~40%); a circular progress ring + bold center number seat dead-center, ring sweeps and number counts 0→20 on one heavy ease — Centered template, ~50% of frame. Slow push-in runs underneath.\nScene 2 (1.2–3.4s): as the VO names the count, the camera pushes THROUGH the ring into the rejected-takes stack lower-left; the stack grows beat-by-beat as a reject counter ticks up beside it (the count-up reveals on its spoken cue, not at t=0). Asymmetric 60/40, 3 depth layers.\nScene 3 (3.4–5.0s): land the hero stat card dead-center, accent glow blooms behind it and holds; the stat reads clean while the camera keeps creeping toward it — no breathing. The calm reads against the prior motion.\n```\n\nThe lightweight tags:\n\n- **`blueprint:`** — the id you instantiated (with `(Reproduce)` / `(Adapt)`), or `compose`. One id per frame.\n- **`focal:`** — which existing candidate is the hero of this beat.\n- **`roles:`** — each candidate's role: `cutout` (foreground subject, lay text around it) · `background` (full-bleed, dim 30–50%) · `supporting` (secondary). You **consume** the candidates story chose — never add, swap, or drop one (coverage is story's call; if a frame truly has the wrong candidates, flag it back, don't reach into `capture/`).\n- **`sfx:`** — name the sound the beat wants (an impact for a slam, a whoosh for a push, a riser into a reveal). The audio script's `fetch-sfx` pass retrieves it and the assembler mounts it at the root — you only **name** it, never embed an `<audio>` element.\n\n**Layout is stated INLINE in each Scene line** — name the template, density, depth, and hierarchy as part of \"where it sits\" (`Centered, ~50% of frame`, `asymmetric 60/40, 3 depth layers`), drawing on the **Layout** vocabulary below; never write px / scale / shadow recipes (the worker writes those).\n\n**Motion is named INLINE in each Scene line** — name the move from `motion-language.md`'s vocabulary (`ring sweeps`, `pushes THROUGH`, `count-up`, `glow blooms`) and let it arrive with an overshoot-and-settle (a spring; `power3` only for what must not overshoot; see `motion-language.md`). Never write ease curves / ms / stagger (those resolve in Step 5 from this skill's local `../../hyperframes-animation/rules/`).\n\n## Layout — named inline per Scene\n\nState each Scene's layout as part of \"where it sits.\" **If the blueprint already implies a composition** (a ring around a center, stations on a wide canvas, two cards from opposite wings), that wins — describe it directly; the vocabulary below is for **composing freely** or a generic beat, not a menu you must pick from. Never write px / scale / shadow (the worker does). One frame's layout can EVOLVE across its Scenes (Scene 1 centered hero → Scene 2 rearranges to a grid).\n\n- **Framing vocabulary** — centered (hero / climax) · rule-of-thirds · split-screen (comparison) · layered-depth (immersive) · asymmetric 60/40 or 70/30 (editorial) · triptych (three panels) · full-width strip. Vary the framing across the video so it doesn't read as one repeated template — let the beat decide, not a quota.\n- **Density** — primary visual ≥ 40% of canvas; ≥ 3 depth layers (background + midground + foreground); never a lone small cluster floating in empty space. Squint test: after blur you can still pick out the #1 element.\n- **Hierarchy** — combine ≥ 2 of size (3:1) / weight (800 vs 400) / contrast / position (upper-third is golden) / motion, so one element clearly dominates.\n- **Depth** — layer 2–3 of: size, blur, opacity gradient, overlap, shadow-stack.\n- **Don't show**: nav bars, footers, scrollbars, real cursors / browser chrome, generic decorative shapes standing in for a real asset, floating bokeh / purple-blue \"AI\" gradients — unless it's an intentional UI-demo reconstruction.\n\n## `## Video direction` — write the invariants ONCE\n\nThe whole video shares one look and one motion grammar. Write a **`## Video direction`** block ONCE at the top of `STORYBOARD.md` so every frame inherits it and per-frame Scene lines carry only the **delta**. This block is load-bearing — it is what binds many independent shots into one film. **Keep it.**\n\n- **palette system** — from `frame.md`: which roles map to which hues. Never invent.\n- **motion grammar + reveal model** — arrival springs (overshoot and settle; `power3` only for what must not overshoot) + the **VO-paced reveal** model every frame follows (reveal each piece on its spoken cue; never front-load) + what keeps a hold alive (a motivated motion: a camera creep, a highlight; no lazy breathing) (→ `motion-language.md`).\n- **rhythm / held-frame allocation** — name the **held / breather frames** (often before a climax) so the video varies its energy: most frames reveal to the VO, a few hold on a read with one motivated motion (the anti-monotony discipline; → `motion-language.md`).\n- **negative list** — what never appears: off-brand textures / effects the pack forbids, **plus both motion failure modes** — slideshow (front-load then freeze) and screensaver (everything floating independently) (→ `motion-language.md`).\n\nDo **not** repeat these per frame — restating video-level rules in every frame is exactly the bloat this layer prevents.\n\n## Palette & type — from `frame.md`, never invented\n\n- **Palette** — `frame.md` (the adopted pack) is the color truth; apply its roles per frame. Generic basics (one accent, tint neutrals, avoid pure `#000`/`#fff`) → `hyperframes-creative/references/house-style.md`.\n- **Type** — fonts resolve via `frame.md`'s type tokens; reference them **by role** (display / body / mono / the pack's ramp), never by raw family or px. Generic typography craft (embedded fonts, dark-bg optical compensation, `tabular-nums`) → `hyperframes-creative/references/typography.md`.\n\n## Caption-band keep-out (plan side)\n\nThe bottom ~17% of the canvas is reserved for the caption pill. Plan every frame's content into the **top ~83%** so nothing important lands in the band (the worker enforces the pixel cutoff; you plan the layout). Holds even when captions are disabled — bottom-edge consistency.\n\n## Where the detail lives\n\n| For… | Read |\n| ------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- |\n| the proven shapes + role→blueprint menu + how to pick | `../../hyperframes-animation/blueprints-index.md` → `blueprints/<id>.md` (local) |\n| motion — shot model, vocabulary, holds, idle budget, motivated holds, seek-safe | `motion-language.md` (local) |\n| layout — templates, density, depth, hierarchy, caption band | the **Layout** vocabulary in this file |\n| concrete eases / ms / stagger + rule recipe bodies (Step 5) | local `../../hyperframes-animation/rules/` (the frame worker reads it; you don't) |\n| palette + type tokens | the project's `frame.md`; basics → `hyperframes-creative` `house-style.md` / `typography.md` |\n| \"produced, not generated\" foreground density | `hyperframes-creative/references/video-composition.md` |\n| within-frame cuts / seams (zoom-through · cut-the-curve · waterfall) | `cut-catalog.md` (the worker builds them inside the composition) |\n| transitions | story-design owns `transition_in`; you don't touch it |\n\n## Before you finish — checklist\n\n- **`## Video direction`** written once at the top (palette · motion grammar + shot model + idle budget · hold allocation · negative list incl. both failure modes); per-frame entries are deltas, not restatements.\n- Every frame is a **time-coded shot sequence** with real second windows across its `duration` — not a tag bag.\n- **No frame front-loads** — at t=0 only what the VO is saying enters; each further piece reveals on its spoken cue, across the back ~50%. Window count follows the VO, not a fixed number.\n- Every frame names an **`blueprint:`** id (Reproduce / Adapt) or `compose`; an Adapt states keep/change and **keeps the signature move**; nothing collapses to a single front-loaded dump — reveals stay paced to the VO.\n- **Held frames are deliberate** — allocated in Video direction for rhythm; a held read is fine (it still carries a motivated motion), but no frame may be front-loaded-then-frozen.\n- Each frame's `asset_candidates` have a `focal` + per-candidate `roles`; none added, swapped, or dropped.\n- Layout named **inline** per Scene (template / density / depth / hierarchy — the **Layout** vocabulary here); motion named **inline** per Scene from the vocabulary (`motion-language.md`). No px / ease curves / ms / JS.\n- Content planned into the top ~83% (caption band clear).\n- Palette / type pulled from `frame.md` by role — nothing invented.\n- You wrote no HTML and never read `capture/`.\n",
|
|
312
312
|
"product-launch-video": "---\nname: product-launch-video\ndescription: \"Turn a product or marketing URL, pasted script, or brief into a product launch / promo video — SaaS promos, feature reveals, product demos, app and company launches. Use when the user wants to market, launch, promote, or reveal a product; the default for any commercial URL. Site tours / showcases of a website route here too — the brief carries the show-it-as-is intent. 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 product-launch-video`. 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> **media-use**: Before sourcing audio/images/logos, call `/media-use` to resolve BGM/SFX/images from the HeyGen catalog and brand logos from their official sources. Run `--adopt` first to register existing assets. See `/media-use` skill. When the host app provides its own music or sound-effect tools, use those for music and sound effects.\n\n> **figma source**: If the source is a figma.com URL, run `/figma` first — asset export, brand tokens, and components/storyboard reconstruction if needed — then build this workflow from its output. Don't drive Figma via raw MCP tools directly: that skips SVG sanitization, `.media/manifest.jsonl` provenance, and brand-token `var()` binding, so a later brand change can't propagate without a full re-import.\n\n# Product Launch to HyperFrames\n\nUse this skill to capture a product, understand its brand, plan a launch video, and build it frame by frame in HyperFrames.\n\n> **The front door is `/hyperframes`.** You are the orchestrator. Run each step, verify its gate, and only then continue to the next step. This skill is for a **product being marketed, launched, promoted, or revealed**, including requests such as \"promo for our site\" when the purpose is promotional. A site tour / showcase ask stays here too: `BRIEF.md` carries the show-it-as-is intent, and the captured screens become the assets the video features. Any other intent, a bare \"make a video\", or any uncertainty → read `/hyperframes` first — the intent layer owns every route decision, and a fresh creation arriving here without `BRIEF.md` goes through it anyway (Setup's opening rule).\n\nYou are the orchestrator. Work in `videos/<project>/`. Run steps in order and pass each gate before continuing. User-gated steps are Step 0, Step 3, and Step 6. Read `../hyperframes/references/brief-contract.md` before Step 0 — it defines the gate types and how `BRIEF.md`'s `flow`/`storyboard` derive the mode that governs the Step 3/4/6 gates. Do every step yourself except Step 5, where you dispatch one sub-agent per frame. Do not put design or motion rules here; those live in the frame-worker sub-agent, this skill's local `../hyperframes-animation/rules/` + `../hyperframes-animation/blueprints/`, and `hyperframes-creative`.\n\nWorkflow: Step 0 setup -> `hyperframes.json`; Step 1 capture -> `capture/`; Step 2 design system -> `frame.md`; Step 3 storyboard/script -> `STORYBOARD.md` and `SCRIPT.md`; Step 3.1 audio -> `audio_meta.json`; Step 4 visual design -> enriched `STORYBOARD.md`; Step 5 frames -> `compositions/frames/NN-*.html` and `index.html`; Step 6 final render -> `renders/video.mp4`.\n\n---\n\n## Step 0: Setup\n\nGoal: Enter with a confirmed brief, create the HyperFrames project, and make the brief durable.\n\n**The brief is confirmed by the intent layer, not by questions asked here.** Opening rule, in order: **(1)** `BRIEF.md` exists → read it and ask nothing — the brief is settled, and its `flow`/`storyboard` derive the mode (brief contract § 1). **(2)** No `BRIEF.md` but the project exists (`hyperframes.json` / `STORYBOARD.md` on disk) → resume from the storyboard's frontmatter and the recorded preferences; never re-interrogate a half-built project. **(3)** Neither — a fresh creation request that arrived here directly → read `/hyperframes` and run its intent layer (`references/intent-interview.md`): it checks recipes and remembered defaults, conducts this route's questions (`../hyperframes/references/routes/product-launch-video.md`), and hands back the locked brief. Edit requests skip all of this — go do the edit.\n\nInitialize only if `hyperframes.json` is missing. Name `<project>` from the brand or domain in kebab-case, such as `acme-promo`; never use workspace name or timestamp.\n\n`npx hyperframes init \"videos/<project>\" --non-interactive --example=blank --skill=product-launch-video` — `init` checks the installed skills against the latest on GitHub and updates the global set if any are out of date.\n\nAfter init, let `<PROJECT_ROOT>` be `videos/<project>` and run every subsequent relative-path command with that directory as its working directory. In the commands below, `.` means `<PROJECT_ROOT>`; never write `.media`, `capture`, or output files in the caller directory.\n\n**Write `BRIEF.md` immediately after init** (never before — `init` refuses a non-empty directory): the intent layer's locked brief, shape per `../hyperframes/references/brief-format.md`. Resolve `<MEDIA_DIR>` as the installed `/media-use` skill directory. Then record each preference-backed answer with `node <MEDIA_DIR>/scripts/prefs.mjs record --hyperframes .` (`brief-format.md` names the subset). If the intent layer adopted a recipe, run `node <MEDIA_DIR>/scripts/recipe.mjs use --hyperframes . --name <name>`; it copies its `frame.md` into the project (Step 2 is then skipped) and returns the skeletons Step 3 drafts from. A recipe fills answers, not approvals; the review gates still run.\n\n**Show sign-in status before proceeding past Setup** — run `npx hyperframes auth status` and relay its output verbatim. It reports whether voice/BGM will use HeyGen or local engines and, when signed out, how to sign in. Note the exit code contract: `auth status` **exits 1 when not signed in** (and when the stored credential is rejected) — that non-zero exit is the normal signed-out state, not a command failure, so don't treat it as an error, don't retry it, and don't chain it with `&&`/`set -e` in a way that would abort the workflow. Apply one branch:\n\n- **Collaborative:** wait for the user to sign in or explicitly choose `offline` / `go`.\n- **Autonomous:** state the status and continue through the available local engines.\n\nDo not silently omit a required capability when no offline provider exists; surface the blocker. Do not fold this decision into another question or write keys into a per-repo `.env`. Auth ownership and offline fallbacks: `/media-use` `references/setup-providers.md` § Providers.\n\n**Gate:** `hyperframes.json` and `BRIEF.md` exist; the preference-backed answers were recorded (brief contract § 2); sign-in status was shown (signed in, or continuing offline).\n\n---\n\n## Step 1: Capture assets\n\nGoal: Collect the source material, brand signals, and usable assets for the video.\n\nClassify the input and choose the path. Explicit URL -> capture it and use the site for narration and assets. Pasted script/brief -> save verbatim as `user_script.txt`; `VO_MODE` (verbatim or restructured) comes from `BRIEF.md` — the intent layer asks it when a script arrives (ask once here only if the brief somehow lacks it). Then resolve capture target: URL in text -> use it; brand name only -> `WebSearch`, confirm URL in one line, then crawl; no URL/site (or the brief says don't scrape) -> no-capture path.\n\nRun capture with: `npx hyperframes capture \"<URL>\" -o ./capture --json`. Keep the default\npost-navigation budget unless the caller owns a smaller deadline; then pass a positive\n`--capture-budget <milliseconds>` that leaves time for downstream work. `--timeout` controls page\nnavigation only. Use `--skip-vision` only when optional image captioning is intentionally disabled.\n\nInspect the command result and output directory immediately. A non-zero exit, JSON `ok: false`, or\n`capture/BLOCKED.md` is a **hard stop** for the capture path: report the recorded reason and do not\nconsume partial screenshots, DOM, tokens, or assets. Do not manufacture a synthetic no-capture\nfallback after a failed URL capture. Continue through the no-capture path only when the original\nbrief supplied the source material, or when the user explicitly switches to a provided screenshot\nor brief after the failure.\n\nWarnings such as `very little text content` together with an empty asset catalog are not proof of a\nusable page. For a site tour or show-it-as-is brief, require trustworthy captured structure or a\nprovided screenshot; if neither exists, stop. Do not invent or rebuild the page merely because the\ncapture is unusable.\n\nFor a site tour or show-it-as-is brief, the captured page is the visual source of truth. Use the real screenshot instead of rebuilding the full website in HTML. If the shot needs internal movement, keep the screenshot as the base and overlay real captured assets at measured positions, or rebuild only the one component that moves. For a scroll shot, animate the viewport over `capture/screenshots/full-page.png` — the 1x plate of the whole document, pixel-exact for a 1920-wide viewport travelling down it. It is absent when the page was too tall to capture in one piece; fall back to the overlapping scroll-position shots in the same directory. Pushing in past 1:1 wants its own 2x capture of that region instead, since the plate has no headroom above 1x. Recreate the whole page only when the user explicitly asks for a stylized interpretation; an unusable capture alone is not authorization.\n\nIf `GEMINI_API_KEY`, `GOOGLE_API_KEY`, or an OpenRouter key exists, capture auto-captions assets into `capture/extracted/asset-descriptions.md`. This is not a review gate. Without a vision key, use DOM context and continue.\n\nNo-capture path: create `capture/extracted/tokens.json`, `capture/extracted/visible-text.txt`, `capture/extracted/asset-descriptions.md`, and `capture/assets/` by hand. `tokens.json` should be `{ \"title\": \"\", \"description\": \"\", \"colors\": [], \"fonts\": [] }`; fill title/description from the brief when possible. `visible-text.txt` contains the full brief or script. `asset-descriptions.md` should say no assets were captured unless the user gave asset notes.\n\n**Gate:** capture JSON reported `ok: true`; `capture/BLOCKED.md` does not exist;\n`capture/extracted/tokens.json`, `capture/extracted/visible-text.txt`,\n`capture/extracted/asset-descriptions.md`, and `capture/assets/` exist; and you can state the brand in\none clear sentence. Treat `asset-descriptions.md` as the main asset inventory. If it is missing after\nreal capture, stop and report capture incomplete. Warnings about a degraded optional phase are\nacceptable only when this structural gate still passes.\n\n---\n\n## Step 2: Design System\n\nGoal: Choose one shipped frame preset; a script turns it into this video's `frame.md` + caption skin.\n\nWhen `BRIEF.md` names a `style_preset` — the user picked it by eye from the showcases at the intent layer — use it; the judgment call is yours only when the brief is silent. Then you make the one call — **which preset**: read `../hyperframes-creative/references/design-spec.md` and pick the preset whose look best fits the brand and brief. Then run:\n\n```bash\nnode <SKILL_DIR>/scripts/build-frame.mjs --preset <name> --hyperframes .\n```\n\nThe script does the rest deterministically: copies the preset's `FRAME.md` → `frame.md` and **remixes** it onto the brand tokens in `capture/extracted/tokens.json` (brand colors mapped onto the preset's color keys by role — ink, canvas, accents — keeping keys/structure/components; the preset's display + body fonts swapped for the brand's), copies the preset's caption skin to `.hyperframes/caption-skin.html`, and self-validates (exits 1 on a broken mapping). Proceed to the next step as soon as it exits 0 — no hand-editing of the spec.\n\n`tokens.json` with no brand colors/fonts (e.g. no capture) → the script keeps the preset's own palette, a complete shippable design. If the brief names brand colors/fonts the capture missed, add them to `capture/extracted/tokens.json` before running (or use the user's `design.md` to populate it); only adjust `frame.md` by hand afterward if a mapping truly needs it.\n\n**Gate:** `build-frame.mjs` exited 0 — `frame.md` exists from a named preset, and (when the preset ships one) `.hyperframes/caption-skin.html` exists as the caption skin source; the chosen preset was recorded as a preference (`--key style_preset --workflow <this workflow>`, brief contract § 2).\n\n---\n\n## Step 3: Storyboard and Script\n\nGoal: Turn the brief and captured material into an approved frame-by-frame story plan.\n\nRead `../hyperframes-creative/references/story-spine.md` (hook language, value-before-evidence, storyboard-as-proposal, source-traceable visuals), `references/story-design.md`, `../hyperframes-animation/blueprints-index.md`, `../hyperframes/references/storyboard-format.md`, and `../hyperframes/references/script-format.md`. Use them to write `STORYBOARD.md` and, when narration is needed, `SCRIPT.md`. Set the frontmatter `duration:` from the brief's `length` — a rough expectation; assembly reports where the cut lands against it.\n\nUse `story-design.md` for story blueprint, hook, persuasion logic, beats, `VO_MODE`, and asset choices. As a **soft guide**, consult the role→blueprint menu in `../hyperframes-animation/blueprints-index.md`: for each beat, note a candidate blueprint id when one fits. Story truth still decides which beats exist — never force a beat to fit a blueprint, and never invent a beat just because a proven shape is available. Choose each visual frame's `asset_candidates` from `capture/extracted/asset-descriptions.md` (the canonical inventory) — don't browse raw `capture/assets/`. Do not ask the user to pick assets unless that inventory is missing or unusable. Use the exact required fields from the storyboard and script references.\n\nAfter drafting, run the review loop's plan pass — `../hyperframes/references/review-loop.md` § 1: present the plan as a proposal, and ask the two questions — approve or change, and **sketches first** (recommended) or skip. Feedback arrives as a chat reply; loop until approved. This is a **checkpoint gate** (brief contract § 1): in autonomous mode there is nothing to ask — post the same summary as a heads-up and proceed; sketches collapse into the build, and the final preview with its one question comes at Step 6.\n\n**Gate:** `STORYBOARD.md` exists, every visual frame has `asset_candidates`, `SCRIPT.md` exists when narration is needed, and the user approved the frame-by-frame plan (autonomous: the summary was posted as a heads-up).\n\n---\n\n## Step 3.1: Audio\n\nGoal: Generate narration, word timings, music, and audio metadata from the approved script.\n\nStart audio after Step 3 approval. Run it in the background, then continue to Step 4.\n\n**Choose the narration provider and voice from the user's ask before invoking.** Pass the provider selected in Step 0 with `--provider <provider>` (or set `HF_TTS_PROVIDER`). If the request named a voice, gender, or tone, pick a matching voice id and pass it with `--voice <id>`. The pipeline default is otherwise **Marcia (female)** on HeyGen / `am_michael` on Kokoro — so a request like \"a male voice\" is silently ignored unless you pass the flag. Voice ids are provider-specific; resolve against whichever provider Step 0's sign-in status selected: **HeyGen** (signed in) via `node <MEDIA_DIR>/audio/scripts/heygen-tts.mjs --list` (or `GET /v3/voices?engine=starfish`); **Kokoro** (offline) via the voice table in `<MEDIA_DIR>/audio/references/tts.md` (prefixes `am_`/`bm_` male, `af_`/`bf_` female). When the user expressed no preference, fall back to the remembered voice (brief contract § 2) before the pipeline default, and say which one you used; omit `--voice` only when neither names one. When the user explicitly picked a voice this run, record it (`prefs.mjs record --key voice`).\n\n`node <SKILL_DIR>/scripts/audio.mjs --script ./SCRIPT.md --storyboard ./STORYBOARD.md --hyperframes . --out ./audio_meta.json --provider <provider> --voice <voice-id> &`\n\nThe audio script handles narration, word timings, BGM lookup from HeyGen's music library, and timing metadata. BGM mood comes from the storyboard's `music:` field; **`music: none` turns BGM off**. This uses the HeyGen Audio API for retrieval, not generation, and uses the same `~/.heygen` credential as TTS. For provider details, read `../media-use/audio/references/tts.md`. When the host app's own tools make the music or a sound effect, put the file under assets/ and list it in the audio_meta.json file marked `\"source\": \"host\"`: music as `bgm` `{ \"path\": \"assets/…\", \"source\": \"host\" }` with `music: none` in the storyboard; a sound as an `sfx` entry `{ \"frame\": <n>, \"file\": \"assets/…\", \"offset_s\": 0, \"duration_s\": <its length>, \"source\": \"host\" }`. Every audio pass keeps these, and a frame with a host sound gets no looked-up cue.\n\nIf there is no narration and no `SCRIPT.md`, skip voice generation. BGM may still run if the storyboard has a music mood.\n\n**The canonical fully-silent marker:** `music: none` in the STORYBOARD.md top YAML block, no `SCRIPT.md`, **and** no `sfx:` cues or host audio. That combination marks the project silent — no narration, no BGM, no SFX. `audio.mjs` recognizes it and generates nothing (it removes any stale `audio_meta.json`; an absent `audio_meta.json` is what assemble treats as silent), so Step 3.1 is a clean skip. Without narration but with `sfx:` cues or host audio the film is not silent: `audio.mjs` writes the audio_meta.json file for `fetch-sfx` to fill. Use it when the user asks for a silent / music-free video — don't improvise other spellings.\n\n**Gate:** audio job has started, or the project is marked silent (`music: none`, no `SCRIPT.md`, no `sfx:` cues or host audio).\n\n---\n\n## Step 4: Frame Visual Design\n\nGoal: Add the visual direction, layout intent, and motion choices to each storyboard frame.\n\n**Sketch the storyboard sheet first (collaborative only).** The moment the plan is approved, run the sketch pass — `../hyperframes/references/review-loop.md` § 2 (don't wait on Step 3.1; sketches don't use timings): wireframe every frame yourself as a cell of `storyboard.html` (`../hyperframes-creative/references/storyboard-recipe.md` § 3), mark each `built`, pause for the one layout question when every frame is `built`, and revise only the sketches named until the sheet is confirmed. Stand-ins: plain labeled blocks for the captured assets — the real files arrive with Step 5's workers. Only then write the visual design below onto the confirmed layouts. In autonomous mode, or when the user chose to skip sketches at Step 3, skip this pass — frames go straight from `outline` to `animated` at Step 5.\n\nEdit `STORYBOARD.md` in place. Do not create another storyboard. Use `frame.md` as source of truth for color, type, layout feel, and style.\n\nRead `references/visual-design.md`, `../hyperframes-animation/blueprints-index.md`, `references/motion-language.md`, and `../hyperframes-animation/rules-index.md`. Use `visual-design.md` for the method (the time-coded shot sequence, the inline Layout vocabulary, and the required `## Video direction` block). Use `../hyperframes-animation/blueprints-index.md` to pick each frame's shot shape. Use `motion-language.md` (the motion vocabulary + the motion doctrine) and `../hyperframes-animation/rules-index.md` (valid rule names) for motion — do not invent motion names.\n\n**Search the live catalog before you design any named look.** For every look, effect, treatment or transition the brief names — \"CRT scanlines\", \"glitch\", \"film grain\", \"shimmer sweep\", \"confetti burst\" — run `npx hyperframes catalog --query \"<the look, in plain English>\" --json` and read the top results BEFORE you write that look into `STORYBOARD.md`. The search needs **nothing installed**: no project, no prior `add`, no account. It ranks the whole hosted registry (~400 blocks and components) from any directory. A block that already does the job becomes the frame's `focal` — name it here; Step 5 pre-installs it once before dispatch, and its worker customizes it instead of rebuilding it. Hand-author a look only after a search for it came back with nothing that fits.\n\nFor every visual frame, write a **time-coded shot sequence** into `STORYBOARD.md` per `visual-design.md`'s method: pick the frame's blueprint (or compose), instantiate it with THIS product's content, and pace each Scene's reveal to the voiceover so the frame develops across its full duration instead of front-loading then freezing. State layout and motion **inline** per Scene (vocabularies in `visual-design.md` and `motion-language.md`). Add one video-wide `## Video direction` block.\n\nWhen an element visibly continues across a frame boundary, give both workers the same numerical handoff in `STORYBOARD.md`: add `handoff_out:` to the outgoing frame and a matching `handoff_in:` to the incoming frame. Name the element and its exact x/y position, scale, opacity, and motion direction/speed at the cut — state every field even when it does not change, because a constant is `opacity: 1`, not an omission. Omit the whole block only for a deliberate clean cut. The goal is simple: parallel workers must not invent two different versions of the same seam.\n\nDo not change story, script, asset choices, `asset_candidates`, `transition_in`, or captured source material. Do not write HTML in this step.\n\nStage named assets after visual design is locked:\n\n`node <SKILL_DIR>/scripts/stage-assets.mjs --storyboard ./STORYBOARD.md --hyperframes .`\n\n**Gate:** every visual frame has a time-coded shot sequence whose reveals are paced to the voiceover (no front-loading); `## Video direction` exists; `assets/` contains the named assets. Collaborative: the sketch sheet was confirmed.\n\n---\n\n## Step 5: Build Frames\n\nGoal: Build every storyboard frame as an HTML composition and assemble the playable video.\n\nWait for Step 3.1 audio to finish if audio was started. Then sync durations and fetch SFX; skip both if silent.\n\n`node <SKILL_DIR>/scripts/audio.mjs sync-durations --audio-meta ./audio_meta.json --storyboard ./STORYBOARD.md`\n\n`node <SKILL_DIR>/scripts/audio.mjs fetch-sfx --storyboard ./STORYBOARD.md --hyperframes .`\n\nDuration sync is mechanical: real voice duration wins; silent frames keep estimates; never hand-edit synced durations.\n\nCheck the music against the final cut before assembly. A library track can match the requested mood but open on a quiet build that drains the first seconds of a short launch video. Compare the opening with later five-second sections; when a later section has a stronger, musically clean start, trim from there and keep a short fade-in plus a longer fade-out. If frame or narration timing changes, redo this check against the new final duration so the music never ends early or leaves silence at the tail.\n\n**Pre-install the registry blocks** named across `STORYBOARD.md` once, before dispatch, so parallel workers don't race on the registry:\n\n`for b in <each registry block named in the storyboard>; do npx hyperframes add \"$b\"; done`\n\nBefore dispatch, read `../hyperframes/references/subagent-dispatch.md`. Build the per-frame packets and the worker role payload:\n\n`node <SKILL_DIR>/scripts/frame-packets.mjs --project \"$PROJECT_DIR\" --storyboard \"$PROJECT_DIR/STORYBOARD.md\"`\n\nThe builder writes one bounded packet per frame under `.hyperframes/frame-packets/` (the frame's exact storyboard block + the blueprint body + every cited rule recipe, inlined) and `_role.md` (`../hyperframes/references/frame-worker-core.md` + this skill's `sub-agents/frame-worker.md`, concatenated verbatim — the complete worker role). Dispatch one sub-agent per frame, in parallel if possible; otherwise run workers in waves. Each worker gets exactly one frame: its prompt carries `_role.md` and that frame's packet — paste both in full, or hand the two file paths for the worker to read first (equivalent; the worker starts from exactly those two documents either way) — plus a dispatch context with `PROJECT_DIR`, `frame_id`, whether the frame has a **confirmed sketch** on disk (the worker dresses that layout rather than redrawing it — frame-worker core § When a confirmed sketch exists), canvas size, and caption status + keep-out band if captions are enabled.\n\nWorkers read only their packet and `frame.md`; they never open `STORYBOARD.md` or the skill documents (the packet inlines what was selected upstream). Each worker writes only `compositions/frames/NN-*.html`. Workers must never edit `STORYBOARD.md`.\n\n**Full-bleed backgrounds ride on a `class=\"clip\"` layer, never the `#root`.** A frame's ground (color field / gradient / grid) is its own full-duration background clip — a `background` set on the `#root` / `data-composition-id` element is clip-gated to the frame's window and is not a dependable ground, so dark content can land on the black host `body` and render invisible. The video's base ground is painted by the assembler from `frame.md`'s `canvas` color onto the index `#root`. (Full rule + self-check: `../hyperframes/references/frame-worker-core.md`.)\n\nAs each worker returns, the orchestrator marks that frame as `animated` in `STORYBOARD.md`.\n\nAfter audio timings exist, build captions in the background and assemble the index:\n\n`node <SKILL_DIR>/scripts/captions.mjs build --storyboard ./STORYBOARD.md --audio-meta ./audio_meta.json --hyperframes . --out ./caption_groups.json &`\n\n`node <SKILL_DIR>/scripts/assemble-index.mjs --storyboard ./STORYBOARD.md --hyperframes .`\n\n`captions.mjs` uses the project's `.hyperframes/caption-skin.html` (copied in Step 2) as the caption look, injecting brand tokens from `frame.md`; with no skin present it renders the built-in default pill. `captions: skipped (<reason>)` is valid. Continue without captions when explicitly skipped.\n\n**Gate:** every frame is marked `animated` (collaborative: the sketch sheet was confirmed at Step 4), `index.html` exists, and captions are built or explicitly skipped.\n\n---\n\n## Step 6: Finalize\n\nGoal: Verify the assembled video, get user approval, and render the final MP4.\n\nInject transitions, run checks, pause for review, then render.\n\n`node <SKILL_DIR>/scripts/transitions.mjs inject --storyboard ./STORYBOARD.md --hyperframes .`\n\n`node <SKILL_DIR>/scripts/transitions.mjs verify --storyboard ./STORYBOARD.md --index ./index.html`\n\n`npx hyperframes lint`\n\n`npx hyperframes check`\n\n`npx hyperframes snapshot --at <frame-midpoints-and-each-cut-minus-0.1s-and-plus-0.2s>`\n\n`snapshot` stitches the captured frames into one contact sheet (`snapshots/contact-sheet.jpg`). Inspect the midpoint frames for layout failures, then compare the two images around every cut. A continuing element must keep the promised position, scale, opacity, and direction; fix any visible pop before rendering.\n\nIf a command fails, surface stderr and stop — don't pile on recovery commands. Fix it yourself: the cheapest safe edit to `compositions/frames/NN-*.html`, then rerun the failed check.\n\nAfter checks pass, pause for user review — the review loop's final look (`../hyperframes/references/review-loop.md` § 4): one question, on the final Studio preview — render now, or what changes? (Autonomous: the same, as the one kept question — open the preview even though the user didn't ask for one.) Then deliver the MP4 with the contact sheet and the frame ids so revisions can target a single frame.\n\nPreview: `npx hyperframes preview --background`\n\nRender only after user approval (autonomous mode: after the render-or-changes question):\n\n`npx hyperframes render --skill=product-launch-video --quality high --output renders/video.mp4`\n\nDo not rerun `lint`, `check`, or `snapshot` after rendering unless the user asks.\n\n**Gate:** `lint` and `check` passed and the snapshots were inspected before render; user approved at the review pause (autonomous: checks passed and the delivery includes the contact sheet); `renders/video.mp4` exists. Final reply states MP4 path and final duration.\n\n---\n\n## Quick Reference\n\n**Formats:** landscape `1920x1080`; portrait `1080x1920`; square `1080x1080` — derived from the destination (brief contract § 2). Set the format once in the storyboard frontmatter.\n\n**Background scripts:** the workflow ships only these scripts under `scripts/`: `build-frame` for adopting + brand-remixing a frame preset into `frame.md` (+ caption skin); `audio` for TTS, transcription, BGM, SFX, and duration syncing; `captions`; `transitions` for inject and verify; `stage-assets` for copying frame-named assets into `assets/`; and `assemble-index`. Everything else is handled by the `hyperframes` CLI.\n\nThe reusable, product-agnostic shot shapes live in `../hyperframes-animation/blueprints/` (indexed by `../hyperframes-animation/blueprints-index.md`).\n\n| Read | When |\n| ----------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- |\n| `[../hyperframes/references/brief-contract.md](../hyperframes/references/brief-contract.md)` | Gate types, mode derivation from `BRIEF.md`, field semantics. |\n| `[../hyperframes-creative/references/story-spine.md](../hyperframes-creative/references/story-spine.md)` | Step 3: story doctrine — hook language, value-before-evidence, proposal shape, source-traceable visuals. |\n| `[../hyperframes-creative/frame-presets/](../hyperframes-creative/frame-presets/)` | Step 2: choose and adopt a frame preset. |\n| `[../hyperframes-creative/references/design-spec.md](../hyperframes-creative/references/design-spec.md)` | Step 2: apply brand tokens correctly. |\n| `[references/story-design.md](references/story-design.md)` | Step 3: plan the product-launch story. |\n| `[../hyperframes-animation/blueprints-index.md](../hyperframes-animation/blueprints-index.md)` | Step 3: role→blueprint menu. Step 4: pick the shot shape. |\n| `[../hyperframes/references/storyboard-format.md](../hyperframes/references/storyboard-format.md)` | Step 3: write `STORYBOARD.md`. |\n| `[../hyperframes/references/script-format.md](../hyperframes/references/script-format.md)` | Step 3: write `SCRIPT.md`. |\n| `[../media-use/audio/references/tts.md](../media-use/audio/references/tts.md)` | Step 3.1: choose or understand TTS providers and voices. |\n| `[references/visual-design.md](references/visual-design.md)` | Step 4: write the frame's shot sequence (+ Layout vocabulary). |\n| `[references/motion-language.md](references/motion-language.md)` | Step 4: the motion vocabulary + the motion doctrine. |\n| `[references/cut-catalog.md](references/cut-catalog.md)` | Step 4-5: the cut catalog (worker builds within-frame seams). |\n| `[../hyperframes-animation/rules-index.md](../hyperframes-animation/rules-index.md)` + `[../hyperframes-animation/rules/](../hyperframes-animation/rules/)` | Step 5: local rule recipe bodies for the cited motions. |\n| `[../hyperframes/references/frame-worker-core.md](../hyperframes/references/frame-worker-core.md)` | Step 5: the shared worker contract (packet builder prepends it to the delta). |\n| `[sub-agents/frame-worker.md](sub-agents/frame-worker.md)` | Step 5: the workflow's frame-worker delta. |\n| `[../hyperframes/references/subagent-dispatch.md](../hyperframes/references/subagent-dispatch.md)` | Step 5: dispatch sub-agents safely. |\n",
|
|
313
313
|
"product-launch-video/sub-agents/frame-worker.md": "# Frame worker — product-launch delta\n\n> The shared law is the core contract above (the packet builder prepends `../../hyperframes/references/frame-worker-core.md` to this file as `_role.md`) — read the two as one role. This file carries only what's specific to a product-launch frame; you run N-up, **one frame each** — your dispatch carries exactly one packet. Tempted to add a generic GSAP / timeline rule here? Wrong home — it belongs in the core contract or `hyperframes-core`.\n\n## Your `focal:` / `roles:` — real captured media\n\n- `focal:` — which candidate is the hero.\n- `roles:` — each candidate's role: `cutout` foreground / `background` full-bleed / supporting — plus the real media available (each `public/<basename> — description`; a **`[video]`** tag marks a `.mp4` motion source that cannot be mounted by this sub-composition worker).\n- **Asset paths are project-root relative everywhere.** This includes HTML attributes and CSS `url(...)` values such as `@font-face src`: use `assets/...` (or the supplied `capture/assets/...` path), never `../` or `../../`. Shared fonts are staged before dispatch so every parallel frame resolves the same local files; never fall back to a network `@import`.\n\n## Placing candidates (product-launch constraint)\n\n**Place each candidate by its `roles`** (the `focal` is the hero): a `cutout` is a foreground subject — respect the 83% keep-out, lay text around it, not over its face; a `background` is full-bleed and dimmed ~30–50% so foreground content stays legible. Frame files are sub-compositions. Audio remains orchestrator-owned: never author `<audio>` in a frame. An approved `[video]` candidate may be declared as a frame-local `<video data-frame-video=\"approved\" data-start=\"...\" data-duration=\"...\" data-track-index=\"...\">`; `assemble-index.mjs` hoists it to the host root and translates its timing. Give every approved video explicit host geometry with numeric `data-frame-video-x`, `data-frame-video-y`, `data-frame-video-width`, and `data-frame-video-height`; optionally set `data-frame-video-fit=\"cover|contain|fill|none|scale-down\"` (default `cover`). The assembler converts only those values to host CSS: frame-local classes and inline styles do not cross the hoist boundary. Do not use this declaration for audio, unapproved URLs, or videos without explicit timing and geometry. If no approved video is supplied, use an explicitly supplied static still/key art (`[video-still]` or another image candidate) as `<img>`; do not extract a frame, fabricate a URL, or silently embed an unapproved clip.\n\nWhen a frame showcases a captured website, use the supplied screenshot as the page. Do not rebuild the full site in HTML: even a close recreation can change the real layout, spacing, or branding. If the shot needs motion inside the page, overlay the supplied real assets at measured positions or rebuild only the moving component.\n\nBrand text comes from your frame's `scene` / narrative — never from `frame.md` (a style spec, not the product's content). Place the named assets, and never invent new ones.\n\n## Cross-frame handoffs\n\nIf the packet includes `handoff_in:` or `handoff_out:`, treat those values as a hard boundary contract. Start or end the named element at the exact x/y position, scale, opacity, and motion direction/speed provided; a field the packet states as unchanged is still binding, not optional. Do not restyle or reinterpret that boundary state. The neighboring frame is being built by another worker and will use the matching values.\n",
|
|
314
314
|
"remotion-to-hyperframes/assets/test-corpus/tier-1-title-card/README.md": "# Tier 1 — title-card-fade\n\n## What it tests\n\nThe simplest non-trivial Remotion → HyperFrames translation. A single text\nelement fades in over the first 0.5 s, holds for 2.0 s, and fades out over\nthe last 0.5 s. No audio, no media, no custom components.\n\nIf a translation can't pass T1, it's broken on table-stakes basics:\n`AbsoluteFill`, `useCurrentFrame`, `interpolate` with multi-segment input,\nand the timing offset between Remotion's frame-based driver and HF's\npaused-GSAP driver.\n\n## Translation walk-through\n\n| Remotion | HyperFrames |\n| ------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- |\n| `<AbsoluteFill style={{ backgroundColor: \"#0a0a0a\" }}>` | `<body style=\"background: #0a0a0a\">` + a positioned root div |\n| `useCurrentFrame()` | dropped — HF seeks the timeline |\n| `interpolate(frame, [0, 15, 75, 90], [0, 1, 1, 0])` at fps=30 | `gsap.timeline({ paused: true })` with three `.to()` calls at offsets 0s/0.5s/2.5s, each `ease: \"none\"` |\n| `<div style={{ opacity }}>HELLO</div>` | static markup; opacity is animated by the timeline |\n\nThe Remotion→HF time conversion is `time = frame / fps`. So\n`[0, 15, 75, 90]` at 30 fps becomes `[0, 0.5, 2.5, 3.0]` seconds.\n\n## How to render and evaluate\n\n```bash\n# Render Remotion baseline\ncd remotion-src && npm install && npm run render\n# Renders to remotion-src/out/baseline.mp4\n\n# Render HyperFrames translation\ncd ../hf-src && npx hyperframes render --output ../hf.mp4\n\n# Compare with the eval harness (from skill scripts/)\n../../../scripts/render_diff.sh ./remotion-src/out/baseline.mp4 ./hf.mp4 ./diff\n```\n\n`expected.json` documents the SSIM threshold (0.95) for this fixture; the\ncalibrated mean against Remotion @ 4.0 with PNG/BT.709 output is 0.974.\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 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- `
|
|
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, every frame at the timeline's rate (24, 30 or 60 fps, set with `slates_update_timeline_settings`). |\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| `beats` | A music clip's beat grid: `slates_find_beats` finds it, `slates_get_beat_grid` reads it (and where each beat lands on the cut), `slates_edit_beat_grid` corrects it, `slates_cut_to_beats` lands a lane's cuts on it. All free, on the user's machine. |\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| The project's `assets/` folder | The Slates project's own folder. A composition loads its pictures, SVGs and fonts by their path there (`images/logo.svg`, `fonts/Brand.woff2`; the folder is the projects folder from `slates_get_app_settings`, then the project id) and nothing outside it. A picture can also be a declared variable of type image, given a project picture's asset id. On export a declared font that does not load fails the export by name. |\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- `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 of a composition. Moving a whole clip over time on the Slates timeline (position, scale, rotation, opacity, crop) is `slates_set_clip_keyframes`.\n- `media-treatment`: LUTs and other deterministic looks on footage. Grain, saturation and blend modes are a clip's `look` in `slates_update_clip`.\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
|