Skip to content

Write HTML. Render video. Built for agents.

feat(skills,studio,media-use): the intent layer, review loop, and user memory — BRIEF.md, companion mode, recipes; /website-to-video folds into /product-launch-video (#2133)

WaterrrForeverb9be0b26254f
diff --git a/.claude-plugin/marketplace.json b/.claude-plugin/marketplace.json
index 98c75187fd..9e6444da7c 100644
--- a/.claude-plugin/marketplace.json
+++ b/.claude-plugin/marketplace.json
@@ -9,7 +9,7 @@
{
"name": "hyperframes",
"source": "./",
- "description": "HyperFrames by HeyGen. Write HTML, render video. Compositions, GSAP and runtime adapter animations, captions, voiceovers, audio-reactive visuals, and website-to-video capture for HyperFrames.",
+ "description": "HyperFrames by HeyGen. Write HTML, render video. Compositions, GSAP and runtime adapter animations, captions, voiceovers, audio-reactive visuals, and website capture for HyperFrames.",
"homepage": "https://hyperframes.heygen.com",
"license": "Apache-2.0"
},
diff --git a/.claude-plugin/plugin.json b/.claude-plugin/plugin.json
index c3eb47fa1e..7ec84fe43d 100644
--- a/.claude-plugin/plugin.json
+++ b/.claude-plugin/plugin.json
@@ -1,6 +1,6 @@
{
"name": "hyperframes",
- "description": "HyperFrames by HeyGen. Write HTML, render video. Compositions, GSAP and runtime adapter animations, captions, voiceovers, audio-reactive visuals, and website-to-video capture for HyperFrames.",
+ "description": "HyperFrames by HeyGen. Write HTML, render video. Compositions, GSAP and runtime adapter animations, captions, voiceovers, audio-reactive visuals, and website capture for HyperFrames.",
"version": "0.7.58",
"author": {
"name": "HeyGen",
diff --git a/.codex-plugin/plugin.json b/.codex-plugin/plugin.json
index b74f3fbd48..c3b2b89afe 100644
--- a/.codex-plugin/plugin.json
+++ b/.codex-plugin/plugin.json
@@ -1,7 +1,7 @@
{
"name": "hyperframes",
+ "description": "Write HTML, render video. Compositions, Tailwind v4 styles, GSAP and runtime adapter animations, captions, voiceovers, audio-reactive visuals, and website capture for HyperFrames.",
"version": "0.7.58",
- "description": "Write HTML, render video. Compositions, Tailwind v4 styles, GSAP and runtime adapter animations, captions, voiceovers, audio-reactive visuals, and website-to-video capture for HyperFrames.",
"author": {
"name": "HeyGen",
"email": "[email protected]",
diff --git a/.cursor-plugin/plugin.json b/.cursor-plugin/plugin.json
index 68b78e07ea..1f7c83450f 100644
--- a/.cursor-plugin/plugin.json
+++ b/.cursor-plugin/plugin.json
@@ -2,8 +2,8 @@
"$schema": "https://cursor.com/schemas/cursor-plugin/plugin.json",
"name": "hyperframes",
"displayName": "HyperFrames by HeyGen",
+ "description": "Write HTML, render video. Compositions, Tailwind v4 styles, GSAP and runtime adapter animations, captions, voiceovers, audio-reactive visuals, and website capture for HyperFrames.",
"version": "0.7.58",
- "description": "Write HTML, render video. Compositions, Tailwind v4 styles, GSAP and runtime adapter animations, captions, voiceovers, audio-reactive visuals, and website-to-video capture for HyperFrames.",
"author": {
"name": "HeyGen",
"email": "[email protected]"
diff --git a/AGENTS.md b/AGENTS.md
index 1c1cd9eff3..64374bf022 100644
--- a/AGENTS.md
+++ b/AGENTS.md
@@ -10,10 +10,9 @@ This repo ships AI agent skills via [vercel-labs/skills](https://github.com/verc
npx skills add heygen-com/hyperframes
```
-**Creation workflows** route through one entry skill — read `/hyperframes` first: it orients you to the whole surface and maps "make me a…" intent — usually a video, but also a navigable deck (`/slideshow`) or a composition port (`/remotion-to-hyperframes`) — to a concrete workflow. Consult it before invoking a specific workflow:
+**Creation workflows** route through one entry skill — read `/hyperframes` first: it orients you to the whole surface, confirms the brief up front (the intent layer), and maps "make me a…" intent — usually a video, but also a navigable deck (`/slideshow`) or a composition port (`/remotion-to-hyperframes`) — to a concrete workflow. Consult it before invoking a specific workflow:
-- `/product-launch-video` — a **product** URL (or a pre-written script / text brief in no-capture mode) → product launch / promo video, up to ~3 min (sweet spot ~30-90s).
-- `/website-to-video` — a **general** website / URL → a video _of_ the site (tour / showcase / social clip from captured screenshots + assets); for a product **launch / promo**, use `/product-launch-video`.
+- `/product-launch-video` — any **website** URL (or a pre-written script / text brief in no-capture mode) → a product launch / promo video, or a site tour / showcase featuring the site's own captured screens; up to ~3 min (sweet spot ~30-90s).
- `/faceless-explainer` — arbitrary text, **no URL and no website capture** → faceless explainer, up to ~3 min (sweet spot ~30-90s); every visual is LLM-invented (typography / abstract graphics / diagram / data-viz).
- `/embedded-captions` — an existing talking-head video (MP4) → the same footage with captions / subtitles added (verbatim rail + embedded climax, or pure-cinematic embed); the footage itself is untouched (no NLE-style editing).
- `/talking-head-recut` — an existing talking-head / interview / podcast video (MP4) → the same footage packaged with designed **graphic overlays** (kinetic titles, lower-thirds, data callouts, pull-quotes, side panels, pip) synced to the transcript; the clip plays unchanged underneath, footage untouched. For plain captions/subtitles → `/embedded-captions`.
@@ -21,7 +20,7 @@ npx skills add heygen-com/hyperframes
- `/motion-graphics` — a short (typically under 10s) design-led **motion graphic**, motion-is-the-message, no narration: kinetic type, a stat / number count-up, a chart, a logo sting, a lower-third / overlay, or an animated tweet / headline / captured-page highlight; rendered to MP4 or a transparent overlay. Longer / narrated / custom → `/general-video`.
- `/music-to-video` — a **music track** (audio file, or video to pull audio from) → beat-synced video (lyric / slideshow / kinetic promo). Music drives pacing; user-supplied images / videos are cut onto the same beat grid.
- `/slideshow` — a **presentation / pitch deck / interactive deck** — discrete slides, fragment reveals, branching, hotspot navigation, presenter mode. Output is a navigable deck, not a rendered video.
-- `/general-video` — fallback for any other video creation (title card, longer brand / sizzle reel, multi-scene montage, static loop, custom composition); the original hyperframes flow — design → plan → layout → build → validate, any length.
+- `/general-video` — fallback for any other video creation (title card, longer brand / sizzle reel, multi-scene montage, static loop, custom composition) and the home of **companion mode** — co-create with the full HyperFrames toolbox; the original hyperframes flow — design → plan → layout → build → validate, any length.
**Porting an existing composition?** `/remotion-to-hyperframes` translates a Remotion (React) video composition into HyperFrames HTML — a source migration, separate from the creation workflows above.
diff --git a/CLAUDE.md b/CLAUDE.md
index abd8a019f2..a9a4d6268c 100644
--- a/CLAUDE.md
+++ b/CLAUDE.md
@@ -4,22 +4,21 @@ Open-source video rendering framework: write HTML, render video.
## Skills
-This repo ships 20 AI agent skills via [vercel-labs/skills](https://github.com/vercel-labs/skills). Install them before writing compositions — they encode framework-specific patterns that generic docs don't cover.
+This repo ships 19 AI agent skills via [vercel-labs/skills](https://github.com/vercel-labs/skills). Install them before writing compositions — they encode framework-specific patterns that generic docs don't cover.
```bash
npx skills add heygen-com/hyperframes --full-depth # interactive picker
-npx skills add heygen-com/hyperframes --all --full-depth # install all 20 (skips picker)
+npx skills add heygen-com/hyperframes --all --full-depth # install all 19 (skips picker)
npx skills add heygen-com/hyperframes --skill <name> --full-depth # just one (bare name, no leading slash)
```
Keep `--full-depth`: it installs the current `main`. Without it, `skills add` fetches the skills.sh registry blob, which lags `main` by hours (you'd get a stale skill). `hyperframes skills update` already uses full-depth.
-**`/hyperframes` is the entry skill — read it first.** It's the capability map for the domain skills below AND the intent router for the creation workflows. The full README skills section mirrors this list; keep them in sync (see "Skill catalog maintenance" below).
+**`/hyperframes` is the entry skill — read it first.** It's the capability map for the domain skills below, the intent layer that confirms every creation brief up front, AND the intent router for the creation workflows. The full README skills section mirrors this list; keep them in sync (see "Skill catalog maintenance" below).
### Creation workflows
-- `/product-launch-video` — a **product** URL (or a pre-written script / text brief in no-capture mode) → product launch / promo video, up to ~3 min (sweet spot ~30-90s).
-- `/website-to-video` — a **general** website / URL → a video _of_ the site (tour / showcase / social clip from captured screenshots + assets); for a product **launch / promo**, use `/product-launch-video`.
+- `/product-launch-video` — any **website** URL (or a pre-written script / text brief in no-capture mode) → a product launch / promo video, or a site tour / showcase featuring the site's own captured screens; up to ~3 min (sweet spot ~30-90s).
- `/faceless-explainer` — arbitrary text, **no URL and no website capture** → faceless explainer, up to ~3 min (sweet spot ~30-90s); every visual is LLM-invented (typography / abstract graphics / diagram / data-viz).
- `/pr-to-video` — a GitHub PR (URL / `owner/repo#N` / "this PR") → code-change explainer, up to ~3 min (changelog / feature reveal / fix / refactor). A PR link, not a product website.
- `/embedded-captions` — an existing talking-head video (MP4) → the same footage with captions / subtitles added (verbatim rail + embedded climax, or pure-cinematic embed); the footage itself is untouched (no NLE-style editing).
@@ -27,7 +26,7 @@ Keep `--full-depth`: it installs the current `main`. Without it, `skills add` fe
- `/motion-graphics` — a short (typically under 10s) design-led **motion graphic**, motion-is-the-message, no narration: kinetic type, a stat / number count-up, a chart, a logo sting, a lower-third / overlay, or an animated tweet / headline / captured-page highlight; rendered to MP4 or a transparent overlay. Longer / narrated / custom → `/general-video`.
- `/music-to-video` — a **music track** (audio file, or video to pull audio from) → beat-synced video (lyric / slideshow / kinetic promo). Music drives pacing; user-supplied images / videos are cut onto the same beat grid.
- `/slideshow` — a **presentation / pitch deck / interactive deck** — discrete slides, fragment reveals, branching, hotspot navigation, presenter mode. Output is a navigable deck, not a rendered video.
-- `/general-video` — fallback for any other video creation (title card, longer brand / sizzle reel, multi-scene montage, static loop, custom composition); the original hyperframes flow — design → plan → layout → build → validate, any length.
+- `/general-video` — fallback for any other video creation (title card, longer brand / sizzle reel, multi-scene montage, static loop, custom composition) and the home of **companion mode** — co-create with the full HyperFrames toolbox; the original hyperframes flow — design → plan → layout → build → validate, any length.
- `/remotion-to-hyperframes` — port an existing Remotion (React) composition to HyperFrames HTML. One-way migration, not creation.
### Domain skills (loaded on demand)
@@ -49,9 +48,9 @@ When adding a new skill, or substantially renaming / repurposing an existing one
1. The skill list above (CLAUDE.md) AND the workflow list in the root `AGENTS.md` (it carries workflows only, no domain-skill section) AND the `## Skills` section in `README.md` AND `docs/guides/skills.mdx` (rendered at [hyperframes.heygen.com/guides/skills](https://hyperframes.heygen.com/guides/skills)). Out-of-date entries silently kill discovery.
2. The scaffolded project template `packages/cli/src/templates/_shared/CLAUDE.md` + `AGENTS.md` — written into every `hyperframes init` project, so a stale entry there ships to users. The two template files must stay byte-identical.
-3. If the skill changes the routing surface for "make a video" requests, also update the capability map and intent router in `skills/hyperframes/SKILL.md` — that's the canonical router agents read first.
+3. If the skill changes the routing surface for "make a video" requests, also update the routing table + intent layer in `skills/hyperframes/SKILL.md` AND that workflow's entry in `skills/hyperframes/references/workflow-catalog.md` (the input/output/trigger contract the router reads before the workflow is installed) — plus its row in `references/route-briefs.md` when the route asks questions.
4. Mirror the Router / Creation workflows / Domain skills grouping across all surfaces so a skill always lives in the same column.
-5. Skill count appears in the README and CLAUDE.md intro lines ("20 AI agent skills…") — update on add/remove. The `docs/guides/skills.mdx` page and the CLI templates deliberately omit a count to avoid drift; keep them count-free.
+5. Skill count appears in the README and CLAUDE.md intro lines ("19 AI agent skills…") — update on add/remove. The `docs/guides/skills.mdx` page and the CLI templates deliberately omit a count to avoid drift; keep them count-free.
The skill's own `SKILL.md` frontmatter `description:` is the source of truth for the one-line "use when" blurb; copy from there into the catalog rather than paraphrasing.
diff --git a/README.md b/README.md
index 1ffff18958..7d4b3c9915 100644
--- a/README.md
+++ b/README.md
@@ -51,33 +51,32 @@ The skills teach agents the HyperFrames production loop: plan the video, write v
## Skills
-HyperFrames ships 20 skills agents load on demand. Read `/hyperframes` first — it's the router and capability map; it picks a workflow for any "make me a…" request — video, deck, or composition port — and points to the domain skills below.
+HyperFrames ships 19 skills agents load on demand. Read `/hyperframes` first — it's the router and capability map; it picks a workflow for any "make me a…" request — video, deck, or composition port — and points to the domain skills below.
-Run `npx skills add heygen-com/hyperframes --full-depth` for the interactive picker — it lists the **core set** under the "Core Skills" group and the on-demand creation workflows under "Other". Use `npx skills add heygen-com/hyperframes --all --full-depth` to install all 20 at once (skips the picker), or `npx skills add heygen-com/hyperframes --skill <name> --full-depth` for just one (bare name, no leading `/`). Keep `--full-depth` — it installs the current `main`; without it `skills add` fetches the skills.sh blob, which lags by hours.
+Run `npx skills add heygen-com/hyperframes --full-depth` for the interactive picker — it lists the **core set** under the "Core Skills" group and the on-demand creation workflows under "Other". Use `npx skills add heygen-com/hyperframes --all --full-depth` to install all 19 at once (skips the picker), or `npx skills add heygen-com/hyperframes --skill <name> --full-depth` for just one (bare name, no leading `/`). Keep `--full-depth` — it installs the current `main`; without it `skills add` fetches the skills.sh blob, which lags by hours.
Installs stay lean after that: `npx hyperframes init` keeps the **core set** fresh (the router, the `hyperframes-*` domain skills, and `media-use` — plus whatever is already installed; `/figma` stays on demand) and never expands a partial install; the creation workflows install **on demand** — the router runs `npx hyperframes skills update <workflow>` before entering one. Nothing re-pulls the full set behind your back.
### Router
-| Skill | Use when |
-| -------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| `/hyperframes` | **Read first** for any request to make / create / edit / animate / render a video, animation, or motion graphic. Capability map for the domain skills and intent router for the creation workflows below. |
+| Skill | Use when |
+| -------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
+| `/hyperframes` | **Read first** for any request to make / create / edit / animate / render a video, animation, or motion graphic. Capability map for the domain skills, the intent layer that confirms every creation brief up front, and intent router for the creation workflows below. |
### Creation workflows
-| Skill | Use when |
-| -------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| `/product-launch-video` | Marketing / launching / promoting a **product** — from its URL, a brief, or a script (even if the site is only named). Up to ~3 min (sweet spot 30-90s). |
-| `/website-to-video` | Turning a **general website** into a video — site tour, portfolio / landing-page showcase, social clip from the site's own visuals. |
-| `/faceless-explainer` | **Explaining a topic / concept** from arbitrary text — no product, no URL, no website capture; every visual is LLM-invented (typography / abstract / diagram / data-viz). |
-| `/pr-to-video` | A **GitHub pull request** (PR URL, `owner/repo#N` ref, or "this PR") → changelog / feature-reveal / fix / refactor explainer, read via the `gh` CLI. |
-| `/embedded-captions` | Adding **captions / subtitles** to an existing talking-head video (footage untouched) — verbatim rail, embedded climax behind the subject, or pure-cinematic embed. |
-| `/talking-head-recut` | Packaging an existing talking-head / interview / podcast video with **designed graphic overlays** — lower-thirds, data callouts, kinetic titles, pull-quotes, side panels, PiP. |
-| `/motion-graphics` | A short, **unnarrated, design-led motion graphic** (~under 10s) — kinetic type, stat / chart hit, logo sting, lower-third, animated tweet / headline. MP4 or transparent overlay. |
-| `/music-to-video` | A **music track** (audio file, or video to pull audio from) → a **beat-synced** video — lyric, slideshow, or kinetic promo; music drives pacing. |
-| `/slideshow` | A **presentation / pitch deck / interactive deck** — discrete slides, fragment reveals, branching, hotspot navigation, presenter mode. Output is a navigable deck, not a rendered video. |
-| `/general-video` | **Anything else** — longer or multi-scene pieces, brand / sizzle reel, title card, static loop, freeform composition. Input- and length-agnostic fallback. |
-| `/remotion-to-hyperframes` | **Porting an existing Remotion** (React) composition's source to HyperFrames HTML. One-way migration, not creation. |
+| Skill | Use when |
+| -------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| `/product-launch-video` | Any **website** — marketing / launching / promoting a product (from its URL, a brief, or a script), or a site tour / showcase / social clip featuring the site's own visuals. Up to ~3 min (sweet spot 30-90s). |
+| `/faceless-explainer` | **Explaining a topic / concept** from arbitrary text — no product, no URL, no website capture; every visual is LLM-invented (typography / abstract / diagram / data-viz). |
+| `/pr-to-video` | A **GitHub pull request** (PR URL, `owner/repo#N` ref, or "this PR") → changelog / feature-reveal / fix / refactor explainer, read via the `gh` CLI. |
+| `/embedded-captions` | Adding **captions / subtitles** to an existing talking-head video (footage untouched) — verbatim rail, embedded climax behind the subject, or pure-cinematic embed. |
+| `/talking-head-recut` | Packaging an existing talking-head / interview / podcast video with **designed graphic overlays** — lower-thirds, data callouts, kinetic titles, pull-quotes, side panels, PiP. |
+| `/motion-graphics` | A short, **unnarrated, design-led motion graphic** (~under 10s) — kinetic type, stat / chart hit, logo sting, lower-third, animated tweet / headline. MP4 or transparent overlay. |
+| `/music-to-video` | A **music track** (audio file, or video to pull audio from) → a **beat-synced** video — lyric, slideshow, or kinetic promo; music drives pacing. |
+| `/slideshow` | A **presentation / pitch deck / interactive deck** — discrete slides, fragment reveals, branching, hotspot navigation, presenter mode. Output is a navigable deck, not a rendered video. |
+| `/general-video` | **Anything else** — longer or multi-scene pieces, brand / sizzle reel, title card, static loop, freeform composition. Input- and length-agnostic fallback, and the home of companion mode (co-create with the full toolbox). |
+| `/remotion-to-hyperframes` | **Porting an existing Remotion** (React) composition's source to HyperFrames HTML. One-way migration, not creation. |
### Domain skills (loaded on demand)
@@ -115,7 +114,7 @@ Need ideas? Browse the [Showcase](https://hyperframes.heygen.com/showcase) for f
- PR walkthroughs with animated code diffs, narration, and captions
- Data visualizations, chart races, and map animations
- Social videos with kinetic captions, overlays, and music
-- Docs-to-video, PDF-to-video, and website-to-video explainers
+- Docs-to-video, PDF-to-video, and site-tour explainers
- Reusable motion graphics for automated content pipelines
## Frame.md
diff --git a/docs/guides/authentication.mdx b/docs/guides/authentication.mdx
index a16a42ca8e..797b79e679 100644
--- a/docs/guides/authentication.mdx
+++ b/docs/guides/authentication.mdx
@@ -59,7 +59,7 @@ Each capability picks the **first available provider** in order; the last is alw
| **Voice (TTS)** | HeyGen → ElevenLabs → Kokoro | `HEYGEN_API_KEY` → `HYPERFRAMES_API_KEY` → `~/.heygen` · then `ELEVENLABS_API_KEY` | Kokoro: `pip install kokoro-onnx soundfile` |
| **Music (BGM)** | HeyGen library → Lyria → MusicGen | HeyGen credential (above) · then `GEMINI_API_KEY` → `GOOGLE_API_KEY` | MusicGen: `pip install transformers torch soundfile numpy` |
| **Sound effects** | HeyGen library → bundled library | HeyGen credential (above) | bundled — no deps |
-| **Capture descriptions** | OpenRouter → Gemini | `OPENROUTER_API_KEY` → `GEMINI_API_KEY` | — (optional; for [website-to-video](/guides/website-to-video)) |
+| **Capture descriptions** | OpenRouter → Gemini | `OPENROUTER_API_KEY` → `GEMINI_API_KEY` | — (optional; for [website capture](/guides/website-to-video)) |
Run `npx hyperframes doctor` to check which local dependencies are installed. The media skills also run `hyperframes auth status` as a preflight before generating, so you always know whether a run will use HeyGen or a local engine before it starts.
diff --git a/docs/guides/pipeline.mdx b/docs/guides/pipeline.mdx
index 8298adf986..71b273ccd3 100644
--- a/docs/guides/pipeline.mdx
+++ b/docs/guides/pipeline.mdx
@@ -5,7 +5,7 @@ description: "The 7-step pipeline for producing any Hyperframes video: capture,
Every well-structured Hyperframes video flows through the same 7 steps, whether it starts from a website, a PDF, a CSV, or a blank page. Each step produces a named artifact that the next step depends on, so your AI agent (and you) always know what's done, what's next, and where the creative decisions live on disk.
-This pipeline is the backbone of the [website-to-video workflow](/guides/website-to-video), but it's just as useful when you're scripting a brand reel from scratch, turning research notes into a launch teaser, or learning Hyperframes for the first time. Most of the production-grade [launch videos](/launch-videos) HeyGen ships are organized this way.
+This pipeline is the backbone of the [website-to-video guide](/guides/website-to-video), but it's just as useful when you're scripting a brand reel from scratch, turning research notes into a launch teaser, or learning Hyperframes for the first time. Most of the production-grade [launch videos](/launch-videos) HeyGen ships are organized this way.
## The seven steps
@@ -196,7 +196,7 @@ Each artifact is a checkpoint, so you can stop, hand off to a human reviewer, or
The pipeline is the recommended structure for:
-- Capturing a website with the [/website-to-video](/guides/website-to-video) skill, which follows it end-to-end.
+- Capturing a website with the [/product-launch-video](/guides/website-to-video) workflow, which follows it end-to-end.
- Shipping a product launch. Most of the [HeyGen launch videos](/launch-videos) use this artifact layout.
- Any narrative video with three or more beats, where a storyboard pays for itself.
- Learning Hyperframes, because the artifacts leave every creative decision inspectable on disk.
@@ -207,7 +207,7 @@ For a 5-second one-shot animation, a single hand-authored composition is fine; t
<CardGroup cols={2}>
<Card title="Website to Video" icon="globe" href="/guides/website-to-video">
- The full website-to-video workflow built on this pipeline.
+ The full website-to-video guide built on this pipeline.
</Card>
<Card title="Prompting" icon="comment" href="/guides/prompting">
How to invoke the pipeline through your AI agent.
diff --git a/docs/guides/prompting.mdx b/docs/guides/prompting.mdx
index fe78e69047..e74688ef35 100644
--- a/docs/guides/prompting.mdx
+++ b/docs/guides/prompting.mdx
@@ -32,8 +32,7 @@ The installer shows a picker. Select the **core skills** below — every project
| Slash command | Input → output |
| ------------------------ | --------------------------------------------------------------------------- |
-| `/product-launch-video` | A product URL / brief / script → launch or promo video |
-| `/website-to-video` | A general website / URL → a video of the site (tour / showcase / social clip) |
+| `/product-launch-video` | Any website URL / brief / script → launch or promo video, or a site tour / showcase |
| `/faceless-explainer` | Arbitrary text (no URL) → faceless explainer with its own TTS narration |
| `/pr-to-video` | A GitHub PR → code-change explainer |
| `/embedded-captions` | An existing talking-head video → the same footage with captions / subtitles |
diff --git a/docs/guides/skills.mdx b/docs/guides/skills.mdx
index c2b1030d2d..aeb0082e87 100644
--- a/docs/guides/skills.mdx
+++ b/docs/guides/skills.mdx
@@ -7,7 +7,7 @@ HyperFrames ships AI agent skills via [vercel-labs/skills](https://github.com/ve
The skills split into three groups:
-- **Router** — the entry skill that picks a workflow for any "make me a…" request — usually a video, but also a navigable deck (`/slideshow`) or a composition port (`/remotion-to-hyperframes`).
+- **Router** — the entry skill that confirms the brief up front (the intent layer) and picks a workflow for any "make me a…" request — usually a video, but also a navigable deck (`/slideshow`) or a composition port (`/remotion-to-hyperframes`).
- **Creation workflows** — one per input shape (URL, PR, music track, captions, etc.). Each owns its task end-to-end: project setup, gated steps, and the final deliverable. Read by the router; you can also invoke directly if you already know which one fits.
- **Domain skills** — atomic capabilities (animation, media, CLI, registry) the workflows compose against; they never own the end-to-end task. Load one when you need that specific layer.
@@ -68,7 +68,7 @@ The single entry point. Read `/hyperframes` before invoking anything else — it
| Skill | Use when |
| -------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| `/hyperframes` | **Read first** for any request to make / create / edit / animate / render a video, animation, or motion graphic. Capability map for the domain skills and intent router for the creation workflows below. |
+| `/hyperframes` | **Read first** for any request to make / create / edit / animate / render a video, animation, or motion graphic. Capability map for the domain skills, the intent layer that confirms every creation brief up front, and intent router for the creation workflows below. |
## Creation workflows
@@ -76,8 +76,7 @@ One workflow per input shape. The router (`/hyperframes`) picks one of these for
| Skill | Use when |
| -------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| `/product-launch-video` | Marketing / launching / promoting a **product** — from its URL, a brief, or a script (even if the site is only named). Up to ~3 min (sweet spot 30-90s). |
-| `/website-to-video` | Turning a **general website** into a video — site tour, portfolio / landing-page showcase, social clip from the site's own visuals. |
+| `/product-launch-video` | Any **website** — marketing / launching / promoting a product (from its URL, a brief, or a script), or a site tour / showcase / social clip featuring the site's own visuals. Up to ~3 min (sweet spot 30-90s). |
| `/faceless-explainer` | **Explaining a topic / concept** from arbitrary text — no product, no URL, no website capture; every visual is LLM-invented (typography / abstract / diagram / data-viz). |
| `/pr-to-video` | A **GitHub pull request** (PR URL, `owner/repo#N` ref, or "this PR") → changelog / feature-reveal / fix / refactor explainer, read via the `gh` CLI. |
| `/embedded-captions` | Adding **captions / subtitles** to an existing talking-head video (footage untouched) — verbatim rail, embedded climax behind the subject, or pure-cinematic embed. |
@@ -85,7 +84,7 @@ One workflow per input shape. The router (`/hyperframes`) picks one of these for
| `/motion-graphics` | A short, **unnarrated, design-led motion graphic** (~under 10s) — kinetic type, stat / chart hit, logo sting, lower-third, animated tweet / headline. MP4 or transparent overlay. |
| `/music-to-video` | A **music track** (audio file, or video to pull audio from) → a **beat-synced** video — lyric, slideshow, or kinetic promo; music drives pacing. |
| `/slideshow` | A **presentation / pitch deck / interactive deck** — discrete slides, fragment reveals, branching, hotspot navigation, presenter mode. Output is a navigable deck, not a rendered video. |
-| `/general-video` | **Anything else** — longer or multi-scene pieces, brand / sizzle reel, title card, static loop, freeform composition. Input- and length-agnostic fallback. |
+| `/general-video` | **Anything else** — longer or multi-scene pieces, brand / sizzle reel, title card, static loop, freeform composition. Input- and length-agnostic fallback, and the home of companion mode (co-create with the full toolbox). |
| `/remotion-to-hyperframes` | **Porting an existing Remotion** (React) composition's source to HyperFrames HTML. One-way migration, not creation. |
## Domain skills (loaded on demand)
diff --git a/docs/guides/website-to-video.mdx b/docs/guides/website-to-video.mdx
index fd530f9fbf..b2f2215af3 100644
--- a/docs/guides/website-to-video.mdx
+++ b/docs/guides/website-to-video.mdx
@@ -216,7 +216,7 @@ See the [pipeline guide](/guides/pipeline#iterating) for more re-entry patterns.
npx skills add heygen-com/hyperframes
```
- Lead your prompt with _"Use the /website-to-video skill"_ for the most reliable results. Agents also discover it automatically when they see a URL and a video request.
+ Lead your prompt with _"Use the /product-launch-video skill"_ for the most reliable results — site tours route there too. Agents also discover it automatically when they see a URL and a video request.
</Accordion>
</AccordionGroup>
diff --git a/docs/launch-videos.mdx b/docs/launch-videos.mdx
index 0c7e6fc9a1..c4dcdd1b03 100644
--- a/docs/launch-videos.mdx
+++ b/docs/launch-videos.mdx
@@ -19,7 +19,7 @@ Each subdirectory is a standalone HyperFrames project — `index.html`, `composi
| Project | What it shows | Source |
| --- | --- | --- |
| **HyperFrames launch** | The original announcement video — 49.7 s, glass-frame intro, CSS / GSAP / Lottie / shader / Three.js flex section, full narrative arc. | [`hyperframes-launch/`](https://github.com/heygen-com/hyperframes-launches/tree/main/hyperframes-launch) |
-| **Website → HyperFrames** | Companion to the [website-to-video](/guides/website-to-video) workflow — captures a site and animates it. | [`website-to-hyperframes/`](https://github.com/heygen-com/hyperframes-launches/tree/main/website-to-hyperframes) |
+| **Website → HyperFrames** | Companion to the [website-to-video](/guides/website-to-video) flow — now handled by `/product-launch-video` — captures a site and animates it. | [`website-to-hyperframes/`](https://github.com/heygen-com/hyperframes-launches/tree/main/website-to-hyperframes) |
| **Timeline Editor launch** | 60 fps reveal video for the HyperFrames Timeline Editor: late-SFX cold open, chat-spiral of fine-tune prompts, editor reveal. | [`timeline-launch/`](https://github.com/heygen-com/hyperframes-launches/tree/main/timeline-launch) |
| **Texture launch** | Texture-mask text + shader-driven background, used as a launch teaser. | [`texture-launch-video/`](https://github.com/heygen-com/hyperframes-launches/tree/main/texture-launch-video) |
| **VFX × HeyGen combined** | Multi-act video chaining a VFX text-cursor scene with the HeyGen iPhone canvas test — useful as a reference for combining two existing projects into one render. | [`vfx-heygen-combined/`](https://github.com/heygen-com/hyperframes-launches/tree/main/vfx-heygen-combined) |
diff --git a/docs/packages/cli.mdx b/docs/packages/cli.mdx
index d6efc5c763..2ae1e42195 100644
--- a/docs/packages/cli.mdx
+++ b/docs/packages/cli.mdx
@@ -438,7 +438,7 @@ Word-level transcripts (whisper output) are grouped into readable caption cues o
The capture command extracts everything an AI agent needs to understand a website's visual identity: viewport screenshots at every scroll depth, color palette (pixel-sampled + DOM computed), font files, images with semantic names, SVGs, Lottie animations, video previews, WebGL shaders, visible text, and page structure.
- Output is a self-contained directory with a `CLAUDE.md` file that any AI agent can read to understand the captured site. Used by the `/website-to-video` skill as step 1 of the video production pipeline.
+ Output is a self-contained directory with a `CLAUDE.md` file that any AI agent can read to understand the captured site. Used by the `/product-launch-video` workflow as step 1 of the video production pipeline.
Set `GEMINI_API_KEY` in a `.env` file for AI-powered image descriptions via Gemini vision (~$0.001/image), or set `OPENROUTER_API_KEY` to use any vision model through [OpenRouter](https://openrouter.ai) instead (takes priority if both are set; override the model with `HYPERFRAMES_OPENROUTER_MODEL`). See the [Website to Video](/guides/website-to-video#enriching-captures-with-gemini-vision) guide for details.
diff --git a/docs/quickstart.mdx b/docs/quickstart.mdx
index af6fb3e448..971c8c6a6b 100644
--- a/docs/quickstart.mdx
+++ b/docs/quickstart.mdx
@@ -26,7 +26,7 @@ The installer shows a picker. Select the **core set** every project needs — th
| `/hyperframes-registry` | Install catalog blocks and components |
| `/general-video` | The general authoring workflow — the fallback for any video that doesn't match a specific workflow |
-The **workflow skills** are optional — add the ones that match your inputs, and `/hyperframes` routes to whichever you've installed: `/product-launch-video`, `/website-to-video`, `/faceless-explainer`, `/pr-to-video`, `/embedded-captions`, `/talking-head-recut`, `/motion-graphics`, `/music-to-video`, `/slideshow`, `/general-video`, `/remotion-to-hyperframes`. See the [skills catalog](/guides/skills) for the full list with one-line "use when" descriptions.
+The **workflow skills** are optional — add the ones that match your inputs, and `/hyperframes` routes to whichever you've installed: `/product-launch-video`, `/faceless-explainer`, `/pr-to-video`, `/embedded-captions`, `/talking-head-recut`, `/motion-graphics`, `/music-to-video`, `/slideshow`, `/general-video`, `/remotion-to-hyperframes`. See the [skills catalog](/guides/skills) for the full list with one-line "use when" descriptions.
<Tip>
To skip the picker and install everything (core + every workflow) in one shot, run `npx skills add heygen-com/hyperframes --all`.
diff --git a/packages/cli/src/capture/agentPromptGenerator.ts b/packages/cli/src/capture/agentPromptGenerator.ts
index 9b6f337450..1f590f8de7 100644
--- a/packages/cli/src/capture/agentPromptGenerator.ts
+++ b/packages/cli/src/capture/agentPromptGenerator.ts
@@ -7,7 +7,7 @@
*
* This file generates a DATA INVENTORY that tells the AI agent what files
* exist and what they contain. The actual workflow lives in the
- * website-to-video skill — this file points agents there.
+ * product-launch-video skill — this file points agents there.
*/
import { writeFileSync, readdirSync, existsSync } from "node:fs";
@@ -198,7 +198,7 @@ function buildPrompt(
Source: ${url}
-To create a video from this capture, use the \`website-to-video\` skill.
+To create a video from this capture, use the \`product-launch-video\` skill.
## What's in This Capture
diff --git a/packages/cli/src/commands/preview.test.ts b/packages/cli/src/commands/preview.test.ts
new file mode 100644
index 0000000000..38b02f58e6
--- /dev/null
+++ b/packages/cli/src/commands/preview.test.ts
@@ -0,0 +1,53 @@
+import { mkdirSync, mkdtempSync, rmSync, writeFileSync } from "node:fs";
+import { tmpdir } from "node:os";
+import { join } from "node:path";
+import { afterEach, describe, expect, it } from "vitest";
+import { studioLandingSearch } from "./preview.js";
+
+const tempDirs: string[] = [];
+
+afterEach(() => {
+ for (const dir of tempDirs.splice(0)) rmSync(dir, { recursive: true, force: true });
+});
+
+function projectWith(storyboard: string | null, frameFiles: string[] = []): string {
+ const dir = mkdtempSync(join(tmpdir(), "hf-preview-landing-"));
+ tempDirs.push(dir);
+ if (storyboard !== null) writeFileSync(join(dir, "STORYBOARD.md"), storyboard);
+ for (const file of frameFiles) {
+ mkdirSync(join(dir, file, ".."), { recursive: true });
+ writeFileSync(join(dir, file), "<div></div>");
+ }
+ return dir;
+}
+
+const FRAME = (n: number, status: string) =>
+ `## Frame ${n} — F${n}\n- status: ${status}\n- src: compositions/frames/0${n}.html\n\nBeat.\n`;
+
+describe("studioLandingSearch", () => {
+ it("returns no search without a storyboard", () => {
+ expect(studioLandingSearch(projectWith(null))).toBe("");
+ });
+
+ it("lands on the board while sketches are under review (any built frame)", () => {
+ const dir = projectWith(`${FRAME(1, "built")}${FRAME(2, "outline")}`, [
+ "compositions/frames/01.html",
+ ]);
+ expect(studioLandingSearch(dir)).toBe("?view=storyboard");
+ });
+
+ it("lands on the board during pure planning (srcs declared, none exist)", () => {
+ const dir = projectWith(`${FRAME(1, "outline")}${FRAME(2, "outline")}`);
+ expect(studioLandingSearch(dir)).toBe("?view=storyboard");
+ });
+
+ it("lands on the timeline once frames exist without a built status", () => {
+ const dir = projectWith(`${FRAME(1, "outline")}`, ["compositions/frames/01.html"]);
+ expect(studioLandingSearch(dir)).toBe("");
+ });
+
+ it("lands on the timeline for fully animated boards", () => {
+ const dir = projectWith(`${FRAME(1, "animated")}`, ["compositions/frames/01.html"]);
+ expect(studioLandingSearch(dir)).toBe("");
+ });
+});
diff --git a/packages/cli/src/commands/preview.ts b/packages/cli/src/commands/preview.ts
index 9e1ad75598..9879f0c519 100644
--- a/packages/cli/src/commands/preview.ts
+++ b/packages/cli/src/commands/preview.ts
@@ -22,7 +22,16 @@ export const examples: Example[] = [
["List all active preview servers", "hyperframes preview --list"],
["Kill all active preview servers", "hyperframes preview --kill-all"],
];
-import { existsSync, lstatSync, symlinkSync, unlinkSync, readlinkSync, mkdirSync } from "node:fs";
+import {
+ existsSync,
+ lstatSync,
+ mkdirSync,
+ readFileSync,
+ readlinkSync,
+ symlinkSync,
+ unlinkSync,
+} from "node:fs";
+import { parseStoryboard, STORYBOARD_FILENAME } from "@hyperframes/core/storyboard";
import { resolve, dirname, basename, join } from "node:path";
import { fileURLToPath } from "node:url";
import { createRequire } from "node:module";
@@ -368,7 +377,7 @@ export default defineCommand({
],
footer: `Stop with: hyperframes preview ${JSON.stringify(dir)} --stop`,
});
- openStudioBrowser(url, projectName, {
+ openStudioBrowser(url, projectName, dir, {
noOpen,
browserPath,
userDataDir,
@@ -742,9 +751,47 @@ function compactSelectionPayload(selection: StudioSelectionSnapshot): CompactSel
};
}
-function openStudioBrowser(url: string, projectName: string, options?: BrowserLaunchOptions): void {
+// Land the browser on the Storyboard view while the project is still planning
+// or sketching — the timeline only becomes the right landing once frames are
+// animated (or the storyboard never tracked statuses at all, e.g. beat plans).
+export function studioLandingSearch(projectDir: string): string {
+ const storyboardPath = join(projectDir, STORYBOARD_FILENAME);
+ if (!existsSync(storyboardPath)) return "";
+ let frames;
+ try {
+ frames = parseStoryboard(readFileSync(storyboardPath, "utf8")).frames;
+ } catch {
+ return "";
+ }
+ // Sketch review in progress — the board is the review surface.
+ if (frames.some((f) => f.status === "built")) return "?view=storyboard";
+ // Pure planning stage: frames declare src paths but none are built yet.
+ const srcs = frames
+ .map((f) => f.src)
+ .filter((s): s is string => typeof s === "string" && s.length > 0);
+ const planning =
+ frames.length > 0 &&
+ frames.every((f) => f.status === "outline") &&
+ srcs.length > 0 &&
+ !srcs.some((s) => existsSync(join(projectDir, s)));
+ return planning ? "?view=storyboard" : "";
+}
+
+// The full Studio URL to open or hand to the user: status-aware landing view
+// plus the project hash route. `url` never carries a trailing slash (both the
+// embedded server and the Vite `Local:` match strip it).
+function studioDeepLink(url: string, projectName: string, projectDir: string): string {
+ return `${url}/${studioLandingSearch(projectDir)}#project/${projectName}`;
+}
+
+function openStudioBrowser(
+ url: string,
+ projectName: string,
+ projectDir: string,
+ options?: BrowserLaunchOptions,
+): void {
if (options?.noOpen) return;
- openBrowser(`${url}#project/${projectName}`, {
+ openBrowser(studioDeepLink(url, projectName, projectDir), {
browserPath: options?.browserPath,
userDataDir: options?.userDataDir,
remoteDebuggingPort: options?.remoteDebuggingPort,
@@ -829,6 +876,7 @@ function attachStudioReadyHandler(
child: StudioChildProcess,
spinner: ReturnType<typeof clack.spinner>,
projectName: string,
+ projectDir: string,
options?: BrowserLaunchOptions,
): void {
let detected = false;
@@ -840,7 +888,7 @@ function attachStudioReadyHandler(
detected = true;
spinner.stop(c.success("Studio running"));
printStudioSummary(projectName, url, { footer: "Press Ctrl+C to stop" });
- openStudioBrowser(url, projectName, options);
+ openStudioBrowser(url, projectName, projectDir, options);
child.stdout.removeListener("data", handleOutput);
child.stderr.removeListener("data", handleOutput);
}
@@ -878,7 +926,7 @@ async function runDevMode(dir: string, options?: StudioLaunchOptions): Promise<v
stdio: ["ignore", "pipe", "pipe"],
});
- attachStudioReadyHandler(child, s, pName, options);
+ attachStudioReadyHandler(child, s, pName, dir, options);
removeSymlinkOnExit(createdSymlink, symlinkPath);
// Kill the child's entire process tree on SIGTERM/SIGINT. Ctrl+C sends
@@ -927,7 +975,7 @@ async function runLocalStudioMode(dir: string, options?: StudioLaunchOptions): P
stdio: ["ignore", "pipe", "pipe"],
});
- attachStudioReadyHandler(child, s, pName, options);
+ attachStudioReadyHandler(child, s, pName, dir, options);
removeSymlinkOnExit(createdSymlink, symlinkPath);
// Same tree-kill handler as dev mode. No-op on Windows (see comment above).
@@ -998,7 +1046,7 @@ async function runEmbeddedMode(
printStudioSummary(pName, url, {
details: ["Reusing existing server. Use --force-new to start a fresh instance."],
});
- openStudioBrowser(url, pName, options);
+ openStudioBrowser(url, pName, dir, options);
return;
}
@@ -1016,7 +1064,7 @@ async function runEmbeddedMode(
],
footer: "Press Ctrl+C to stop",
});
- openStudioBrowser(url, pName, options);
+ openStudioBrowser(url, pName, dir, options);
// Block until Ctrl+C. Node would normally exit on SIGINT, but the listening
// HTTP server keeps handles open, so the event loop stays alive after the
diff --git a/packages/cli/src/templates/_shared/AGENTS.md b/packages/cli/src/templates/_shared/AGENTS.md
index 7fa340efe9..40f24af4d5 100644
--- a/packages/cli/src/templates/_shared/AGENTS.md
+++ b/packages/cli/src/templates/_shared/AGENTS.md
@@ -4,10 +4,9 @@
**Always invoke the relevant skill before writing or modifying compositions.** Skills encode framework-specific patterns (e.g., `window.__timelines` registration, `data-*` attribute semantics, shader-compatible CSS rules) that are NOT in generic web docs. Skipping them produces broken compositions.
-**Doing anything with HyperFrames?** Start at `/hyperframes` — it tells you what HyperFrames can do and which skill or workflow handles your intent (make a video, TTS / BGM, prep footage, author / animate, render, install blocks), and routes every "make me a…" request (a video, a deck, a composition port) to the right workflow. Read it first, especially when there's no project context to orient you. The workflows it routes to:
+**Doing anything with HyperFrames?** Start at `/hyperframes` — it tells you what HyperFrames can do and which skill or workflow handles your intent (make a video, TTS / BGM, prep footage, author / animate, render, install blocks), confirms your brief up front (the intent layer), and routes every "make me a…" request (a video, a deck, a composition port) to the right workflow. Read it first, especially when there's no project context to orient you. The workflows it routes to:
-- `/product-launch-video` — a **product** URL or brief / script → 60-90s product launch / SaaS / promo video.
-- `/website-to-video` — a **general** website / URL → a video _of_ the site (tour / showcase / social clip from captured visuals); a product **launch / promo** is `/product-launch-video`.
+- `/product-launch-video` — any **website** URL or brief / script → a product launch / SaaS / promo video, or a site tour / showcase featuring the site's own captured visuals.
- `/faceless-explainer` — arbitrary text (topic / article / notes), **no URL, no website capture** → 60-90s faceless explainer.
- `/embedded-captions` — an existing talking-head video (MP4) → the same footage with captions / subtitles added (rail + embed, or pure-cinematic embed); the footage itself is untouched.
- `/talking-head-recut` — an existing talking-head / interview / podcast video (MP4) → the same footage **packaged with designed graphic overlays** (kinetic titles, lower-thirds, data callouts, pull-quotes, side panels, pip) synced to the transcript; the clip plays unchanged underneath. (Plain captions/subtitles → `/embedded-captions`.)
@@ -15,7 +14,7 @@
- `/motion-graphics` — a short (typically under 10s) design-led **motion graphic**, motion-is-the-message, no narration: kinetic type, a stat / number count-up, a chart, a logo sting, a lower-third / overlay, or an animated tweet / headline / captured-page highlight; rendered to MP4 or a transparent overlay. Longer / narrated / custom → `/general-video`.
- `/music-to-video` — a **music track** (audio file, or video to pull audio from) → beat-synced video (lyric / slideshow / kinetic promo). Music drives pacing; user-supplied images / videos are cut onto the same beat grid.
- `/slideshow` — a **presentation / pitch deck / interactive deck** — discrete slides, fragment reveals, branching, hotspot navigation, presenter mode. Output is a navigable deck, not a rendered video.
-- `/general-video` — fallback for any other video (title card, longer brand / sizzle reel, multi-scene montage, static loop, custom composition); the original hyperframes authoring flow, any length.
+- `/general-video` — fallback for any other video (title card, longer brand / sizzle reel, multi-scene montage, static loop, custom composition) and the home of **companion mode** — co-create with the full HyperFrames toolbox; the original hyperframes authoring flow, any length.
**Porting an existing composition?** `/remotion-to-hyperframes` translates a Remotion (React) composition into HyperFrames HTML — a source migration, separate from the creation workflows above.
diff --git a/packages/cli/src/templates/_shared/CLAUDE.md b/packages/cli/src/templates/_shared/CLAUDE.md
index 7fa340efe9..40f24af4d5 100644
--- a/packages/cli/src/templates/_shared/CLAUDE.md
+++ b/packages/cli/src/templates/_shared/CLAUDE.md
@@ -4,10 +4,9 @@
**Always invoke the relevant skill before writing or modifying compositions.** Skills encode framework-specific patterns (e.g., `window.__timelines` registration, `data-*` attribute semantics, shader-compatible CSS rules) that are NOT in generic web docs. Skipping them produces broken compositions.
-**Doing anything with HyperFrames?** Start at `/hyperframes` — it tells you what HyperFrames can do and which skill or workflow handles your intent (make a video, TTS / BGM, prep footage, author / animate, render, install blocks), and routes every "make me a…" request (a video, a deck, a composition port) to the right workflow. Read it first, especially when there's no project context to orient you. The workflows it routes to:
+**Doing anything with HyperFrames?** Start at `/hyperframes` — it tells you what HyperFrames can do and which skill or workflow handles your intent (make a video, TTS / BGM, prep footage, author / animate, render, install blocks), confirms your brief up front (the intent layer), and routes every "make me a…" request (a video, a deck, a composition port) to the right workflow. Read it first, especially when there's no project context to orient you. The workflows it routes to:
-- `/product-launch-video` — a **product** URL or brief / script → 60-90s product launch / SaaS / promo video.
-- `/website-to-video` — a **general** website / URL → a video _of_ the site (tour / showcase / social clip from captured visuals); a product **launch / promo** is `/product-launch-video`.
+- `/product-launch-video` — any **website** URL or brief / script → a product launch / SaaS / promo video, or a site tour / showcase featuring the site's own captured visuals.
- `/faceless-explainer` — arbitrary text (topic / article / notes), **no URL, no website capture** → 60-90s faceless explainer.
- `/embedded-captions` — an existing talking-head video (MP4) → the same footage with captions / subtitles added (rail + embed, or pure-cinematic embed); the footage itself is untouched.
- `/talking-head-recut` — an existing talking-head / interview / podcast video (MP4) → the same footage **packaged with designed graphic overlays** (kinetic titles, lower-thirds, data callouts, pull-quotes, side panels, pip) synced to the transcript; the clip plays unchanged underneath. (Plain captions/subtitles → `/embedded-captions`.)
@@ -15,7 +14,7 @@
- `/motion-graphics` — a short (typically under 10s) design-led **motion graphic**, motion-is-the-message, no narration: kinetic type, a stat / number count-up, a chart, a logo sting, a lower-third / overlay, or an animated tweet / headline / captured-page highlight; rendered to MP4 or a transparent overlay. Longer / narrated / custom → `/general-video`.
- `/music-to-video` — a **music track** (audio file, or video to pull audio from) → beat-synced video (lyric / slideshow / kinetic promo). Music drives pacing; user-supplied images / videos are cut onto the same beat grid.
- `/slideshow` — a **presentation / pitch deck / interactive deck** — discrete slides, fragment reveals, branching, hotspot navigation, presenter mode. Output is a navigable deck, not a rendered video.
-- `/general-video` — fallback for any other video (title card, longer brand / sizzle reel, multi-scene montage, static loop, custom composition); the original hyperframes authoring flow, any length.
+- `/general-video` — fallback for any other video (title card, longer brand / sizzle reel, multi-scene montage, static loop, custom composition) and the home of **companion mode** — co-create with the full HyperFrames toolbox; the original hyperframes authoring flow, any length.
**Porting an existing composition?** `/remotion-to-hyperframes` translates a Remotion (React) composition into HyperFrames HTML — a source migration, separate from the creation workflows above.
diff --git a/packages/studio-server/src/helpers/projectSignature.ts b/packages/studio-server/src/helpers/projectSignature.ts
index 4062a1f143..576c78860a 100644
--- a/packages/studio-server/src/helpers/projectSignature.ts
+++ b/packages/studio-server/src/helpers/projectSignature.ts
@@ -1,6 +1,7 @@
import { createHash } from "node:crypto";
import { lstatSync, readFileSync, readdirSync } from "node:fs";
import { extname, isAbsolute, relative, resolve } from "node:path";
+import type { ResolvedProject, StudioApiAdapter } from "../types.js";
const SIGNATURE_TEXT_EXTENSIONS = new Set([
".cjs",
@@ -137,6 +138,25 @@ function createProjectFingerprint(projectDir: string, files: ProjectSignatureFil
return hash.digest("hex").slice(0, 24);
}
+/**
+ * Resolve the project signature through the adapter's cached path when the host
+ * provides one (the CLI invalidates its cache from the file watcher), falling
+ * back to a direct computation.
+ */
+export function resolveProjectSignature(adapter: StudioApiAdapter, projectDir: string): string {
+ return adapter.getProjectSignature?.(projectDir) ?? createProjectSignature(projectDir);
+}
+
+/** The shared route opening: resolve the project (null → caller 404s) with its signature. */
+export async function resolveProjectAndSignature(
+ adapter: StudioApiAdapter,
+ projectId: string,
+): Promise<{ project: ResolvedProject; signature: string } | null> {
+ const project = await adapter.resolveProject(projectId);
+ if (!project) return null;
+ return { project, signature: resolveProjectSignature(adapter, project.dir) };
+}
+
/**
* Creates a stable preview cache-busting signature for project source plus Studio manifests.
*/
diff --git a/packages/studio-server/src/routes/preview.ts b/packages/studio-server/src/routes/preview.ts
index ebb522dcd6..f9d399f34b 100644
--- a/packages/studio-server/src/routes/preview.ts
+++ b/packages/studio-server/src/routes/preview.ts
@@ -7,7 +7,10 @@ import type { StudioApiAdapter } from "../types.js";
import { resolveWithinProject } from "../helpers/safePath.js";
import { getMimeType } from "../helpers/mime.js";
import { buildSubCompositionHtml } from "../helpers/subComposition.js";
-import { createProjectSignature } from "../helpers/projectSignature.js";
+import {
+ resolveProjectAndSignature,
+ resolveProjectSignature,
+} from "../helpers/projectSignature.js";
import {
createStudioMotionRenderBodyScript,
STUDIO_MOTION_PATH,
@@ -22,10 +25,6 @@ const GSAP_CDN_SCRIPT = `<script src="https://cdn.jsdelivr.net/npm/gsap@${GSAP_C
const GSAP_CUSTOM_EASE_CDN_SCRIPT = `<script src="https://cdn.jsdelivr.net/npm/gsap@${GSAP_CDN_VERSION}/dist/CustomEase.min.js"></script>`;
const GSAP_MOTION_PATH_CDN_SCRIPT = `<script src="https://cdn.jsdelivr.net/npm/gsap@${GSAP_CDN_VERSION}/dist/MotionPathPlugin.min.js"></script>`;
-function resolveProjectSignature(adapter: StudioApiAdapter, projectDir: string): string {
- return adapter.getProjectSignature?.(projectDir) ?? createProjectSignature(projectDir);
-}
-
function injectProjectSignature(html: string, signature: string): string {
const tag = `<meta name="${PROJECT_SIGNATURE_META}" content="${signature}">`;
if (html.includes(`name="${PROJECT_SIGNATURE_META}"`)) {
@@ -309,15 +308,15 @@ export function registerPreviewRoutes(api: Hono, adapter: StudioApiAdapter): voi
// Bundled composition preview
// fallow-ignore-next-line complexity
api.get("/projects/:id/preview", async (c) => {
- const project = await adapter.resolveProject(c.req.param("id"));
- if (!project) return c.json({ error: "not found" }, 404);
+ const resolved = await resolveProjectAndSignature(adapter, c.req.param("id"));
+ if (!resolved) return c.json({ error: "not found" }, 404);
+ const { project, signature } = resolved;
// fallow-ignore-next-line code-duplication
const vars = previewVariablesFromRequest(c.req.query("variables"));
if (vars.error !== undefined) return c.json({ error: vars.error }, 400);
const previewVariables = vars.values;
- const signature = resolveProjectSignature(adapter, project.dir);
const etag = `"preview:${signature}${variablesEtagSalt(vars.raw)}"`;
const ifNoneMatch = c.req.header("If-None-Match");
if (ifNoneMatch === etag) {
@@ -422,15 +421,14 @@ export function registerPreviewRoutes(api: Hono, adapter: StudioApiAdapter): voi
// Sub-composition preview
// fallow-ignore-next-line complexity
api.get("/projects/:id/preview/comp/*", async (c) => {
- const project = await adapter.resolveProject(c.req.param("id"));
- if (!project) return c.json({ error: "not found" }, 404);
+ const resolved = await resolveProjectAndSignature(adapter, c.req.param("id"));
+ if (!resolved) return c.json({ error: "not found" }, 404);
+ const { project, signature } = resolved;
// fallow-ignore-next-line code-duplication
const vars = previewVariablesFromRequest(c.req.query("variables"));
if (vars.error !== undefined) return c.json({ error: vars.error }, 400);
const previewVariables = vars.values;
-
- const signature = resolveProjectSignature(adapter, project.dir);
const compPath = decodeURIComponent(
c.req.path.replace(`/projects/${project.id}/preview/comp/`, "").split("?")[0] ?? "",
);
diff --git a/packages/studio-server/src/routes/projects.test.ts b/packages/studio-server/src/routes/projects.test.ts
index 7414048bdc..e6a6fcfe32 100644
--- a/packages/studio-server/src/routes/projects.test.ts
+++ b/packages/studio-server/src/routes/projects.test.ts
@@ -58,6 +58,50 @@ function createAdapter(projectDir: string): StudioApiAdapter {
};
}
+describe("GET /projects/:id/signature", () => {
+ it("returns the adapter's cached signature when provided", async () => {
+ const projectDir = createProjectDir();
+ const app = new Hono();
+ registerProjectRoutes(app, {
+ ...createAdapter(projectDir),
+ getProjectSignature: () => "cached-sig",
+ });
+
+ const response = await app.request("http://localhost/projects/demo/signature");
+ expect(response.status).toBe(200);
+ expect(await response.json()).toEqual({ signature: "cached-sig" });
+ });
+
+ it("computes a signature that moves when project files change", async () => {
+ const projectDir = createProjectDir();
+ const app = new Hono();
+ registerProjectRoutes(app, createAdapter(projectDir));
+
+ const first = (await (
+ await app.request("http://localhost/projects/demo/signature")
+ ).json()) as {
+ signature: string;
+ };
+ expect(first.signature).toMatch(/^[0-9a-f]{24}$/);
+
+ writeFileSync(join(projectDir, "compositions", "scene.html"), "<html><body>new</body></html>");
+ const second = (await (
+ await app.request("http://localhost/projects/demo/signature")
+ ).json()) as { signature: string };
+ expect(second.signature).not.toBe(first.signature);
+ });
+
+ it("404s for an unknown project", async () => {
+ const app = new Hono();
+ registerProjectRoutes(app, {
+ ...createAdapter(createProjectDir()),
+ resolveProject: async () => null,
+ });
+ const response = await app.request("http://localhost/projects/nope/signature");
+ expect(response.status).toBe(404);
+ });
+});
+
describe("registerProjectRoutes — composition discovery (#1384)", () => {
it("excludes HTML inside dot-directories from compositions", async () => {
const projectDir = createProjectDir();
diff --git a/packages/studio-server/src/routes/projects.ts b/packages/studio-server/src/routes/projects.ts
index 76fb0079ec..b0ca6ad2a5 100644
--- a/packages/studio-server/src/routes/projects.ts
+++ b/packages/studio-server/src/routes/projects.ts
@@ -3,6 +3,7 @@ import { join } from "node:path";
import type { Hono } from "hono";
import type { StudioApiAdapter } from "../types.js";
import { isInHiddenOrVendorDir, walkDir } from "../helpers/safePath.js";
+import { resolveProjectSignature } from "../helpers/projectSignature.js";
const COMPOSITION_ID_RE = /data-composition-id\s*=/;
@@ -39,6 +40,15 @@ export function registerProjectRoutes(api: Hono, adapter: StudioApiAdapter): voi
return c.json(result);
});
+ // Current content signature for a project — a cheap poll target for clients
+ // that refresh themselves when files change on disk (the storyboard board
+ // re-fetches when this differs from the signature its data was loaded with).
+ api.get("/projects/:id/signature", async (c) => {
+ const project = await adapter.resolveProject(c.req.param("id"));
+ if (!project) return c.json({ error: "not found" }, 404);
+ return c.json({ signature: resolveProjectSignature(adapter, project.dir) });
+ });
+
// Project file tree
api.get("/projects/:id", async (c) => {
const project = await adapter.resolveProject(c.req.param("id"));
diff --git a/packages/studio-server/src/routes/storyboard.test.ts b/packages/studio-server/src/routes/storyboard.test.ts
index 94f040c375..a2fd535235 100644
--- a/packages/studio-server/src/routes/storyboard.test.ts
+++ b/packages/studio-server/src/routes/storyboard.test.ts
@@ -106,4 +106,17 @@ Not built yet.
const { body } = await getStoryboard(dir);
expect(body.frames[0].srcExists).toBe(false);
});
+
+ it("carries a project signature in both the absent and present branches", async () => {
+ const dir = makeProject();
+ const absent = await getStoryboard(dir);
+ expect(absent.body.exists).toBe(false);
+ expect(absent.body.signature).toMatch(/^[0-9a-f]{24}$/);
+
+ writeFileSync(join(dir, "STORYBOARD.md"), "## Frame 1\n\nHi.\n");
+ const present = await getStoryboard(dir);
+ expect(present.body.exists).toBe(true);
+ expect(present.body.signature).toMatch(/^[0-9a-f]{24}$/);
+ expect(present.body.signature).not.toBe(absent.body.signature);
+ });
});
diff --git a/packages/studio-server/src/routes/storyboard.ts b/packages/studio-server/src/routes/storyboard.ts
index 874204208b..519463b295 100644
--- a/packages/studio-server/src/routes/storyboard.ts
+++ b/packages/studio-server/src/routes/storyboard.ts
@@ -2,6 +2,7 @@ import { existsSync, readFileSync } from "node:fs";
import type { Hono } from "hono";
import type { StudioApiAdapter } from "../types.js";
import { resolveWithinProject } from "../helpers/safePath.js";
+import { resolveProjectAndSignature } from "../helpers/projectSignature.js";
import {
parseStoryboard,
SCRIPT_FILENAME,
@@ -45,8 +46,11 @@ export function registerStoryboardRoutes(api: Hono, adapter: StudioApiAdapter):
// file is absent we return `exists: false` with empty frames rather than 404,
// so the Studio can render an opt-in empty state.
api.get("/projects/:id/storyboard", async (c) => {
- const project = await adapter.resolveProject(c.req.param("id"));
- if (!project) return c.json({ error: "not found" }, 404);
+ // The signature lets the board bust poster caches and lets the client tell
+ // whether this payload is already current (see /projects/:id/signature).
+ const resolved = await resolveProjectAndSignature(adapter, c.req.param("id"));
+ if (!resolved) return c.json({ error: "not found" }, 404);
+ const { project, signature } = resolved;
const abs = resolveWithinProject(project.dir, STORYBOARD_FILENAME);
if (!abs || !existsSync(abs)) {
@@ -57,6 +61,7 @@ export function registerStoryboardRoutes(api: Hono, adapter: StudioApiAdapter):
frames: [],
warnings: [],
script: readScript(project.dir),
+ signature,
});
}
@@ -75,6 +80,7 @@ export function registerStoryboardRoutes(api: Hono, adapter: StudioApiAdapter):
frames: resolveFrames(project.dir, manifest.frames),
warnings: manifest.warnings,
script: readScript(project.dir),
+ signature,
});
});
}
diff --git a/packages/studio/src/components/storyboard/FramePoster.tsx b/packages/studio/src/components/storyboard/FramePoster.tsx
index 722f3dbd65..60d41e044b 100644
--- a/packages/studio/src/components/storyboard/FramePoster.tsx
+++ b/packages/studio/src/components/storyboard/FramePoster.tsx
@@ -10,6 +10,13 @@ export interface FramePosterProps {
title: string;
/** `cover` fills+crops (contact-sheet tile); `contain` letterboxes (focus hero). */
fit?: "cover" | "contain";
+ /**
+ * Project content signature to key the poster URL on. The thumbnail route
+ * regenerates when the frame's source changes, but the browser only refetches
+ * when the URL does — so bake the signature in to pick up fresh posters after
+ * a background board refresh.
+ */
+ posterVersion?: string;
}
/**
@@ -18,11 +25,19 @@ export interface FramePosterProps {
* no postMessage seek, and no client-side fps assumption. Shared by the
* contact-sheet tile and the frame-focus view.
*/
-export function FramePoster({ projectId, src, seconds, title, fit = "cover" }: FramePosterProps) {
+export function FramePoster({
+ projectId,
+ src,
+ seconds,
+ title,
+ fit = "cover",
+ posterVersion,
+}: FramePosterProps) {
const [failed, setFailed] = useState(false);
// The <img> is reused (no key) when a tile/hero swaps to a different frame, so a
- // prior load error would stick. Reset when the poster target changes.
- useEffect(() => setFailed(false), [src, seconds]);
+ // prior load error would stick. Reset when the poster target changes — including
+ // a new posterVersion, so a frame that failed mid-write retries once it settles.
+ useEffect(() => setFailed(false), [src, seconds, posterVersion]);
if (failed) {
return (
<div className="flex h-full w-full items-center justify-center text-[11px] text-neutral-600">
@@ -30,12 +45,17 @@ export function FramePoster({ projectId, src, seconds, title, fit = "cover" }: F
</div>
);
}
- const url = buildCompositionThumbnailUrl({
+ let url = buildCompositionThumbnailUrl({
previewUrl: `/api/projects/${projectId}/preview/comp/${src}`,
seekTime: seconds,
duration: 0,
origin: window.location.origin,
});
+ if (posterVersion) {
+ const withVersion = new URL(url, window.location.origin);
+ withVersion.searchParams.set("sig", posterVersion);
+ url = withVersion.toString();
+ }
return (
<img
src={url}
diff --git a/packages/studio/src/components/storyboard/StoryboardFrameFocus.tsx b/packages/studio/src/components/storyboard/StoryboardFrameFocus.tsx
index 22300fe6b7..dea27f11f7 100644
--- a/packages/studio/src/components/storyboard/StoryboardFrameFocus.tsx
+++ b/packages/studio/src/components/storyboard/StoryboardFrameFocus.tsx
@@ -19,6 +19,8 @@ export interface StoryboardFrameFocusProps {
onSaved: () => void;
/** Select a composition in the timeline (sets active comp + editing file + sidebar highlight). */
onSelectComposition: (path: string) => void;
+ /** Project signature the board was loaded with (busts the poster cache). */
+ posterVersion?: string;
}
/**
@@ -39,6 +41,7 @@ export function StoryboardFrameFocus({
onNavigate,
onSaved,
onSelectComposition,
+ posterVersion,
}: StoryboardFrameFocusProps) {
const { readProjectFile, writeProjectFile } = useFileManagerContext();
const { setViewMode } = useViewMode();
@@ -151,6 +154,7 @@ export function StoryboardFrameFocus({
seconds={posterTime(frame)}
title={title}
fit="contain"
+ posterVersion={posterVersion}
/>
) : (
<div className="flex h-full w-full items-center justify-center text-sm text-neutral-600">
diff --git a/packages/studio/src/components/storyboard/StoryboardFrameTile.tsx b/packages/studio/src/components/storyboard/StoryboardFrameTile.tsx
index 62b0173bfb..a128a6fbe8 100644
--- a/packages/studio/src/components/storyboard/StoryboardFrameTile.tsx
+++ b/packages/studio/src/components/storyboard/StoryboardFrameTile.tsx
@@ -7,6 +7,13 @@ export interface StoryboardFrameTileProps {
frame: StoryboardFrameView;
/** Open this frame in the full-area focus view. */
onOpen: (index: number) => void;
+ /** This frame's pending comment draft ("" when none). */
+ commentDraft: string;
+ onCommentDraftChange: (index: number, text: string) => void;
+ /** A submitted comment the agent has not consumed yet (null when none). */
+ pendingComment: string | null;
+ /** Project signature the board was loaded with (busts the poster cache). */
+ posterVersion?: string;
}
function firstLine(text: string): string {
@@ -26,7 +33,15 @@ function placeholderMessage(frame: StoryboardFrameView): string {
/** A single contact-sheet tile: poster preview + its metadata. Click to focus. */
// fallow-ignore-next-line complexity
-export function StoryboardFrameTile({ projectId, frame, onOpen }: StoryboardFrameTileProps) {
+export function StoryboardFrameTile({
+ projectId,
+ frame,
+ onOpen,
+ commentDraft,
+ onCommentDraftChange,
+ pendingComment,
+ posterVersion,
+}: StoryboardFrameTileProps) {
const meta = FRAME_STATUS_META[frame.status];
const renderable = frame.srcExists && frame.status !== "outline";
const title = frame.title ?? `Frame ${frame.index}`;
@@ -48,6 +63,7 @@ export function StoryboardFrameTile({ projectId, frame, onOpen }: StoryboardFram
src={frame.src}
seconds={posterTime(frame)}
title={title}
+ posterVersion={posterVersion}
/>
) : (
<FrameTilePlaceholder frame={frame} />
@@ -74,6 +90,19 @@ export function StoryboardFrameTile({ projectId, frame, onOpen }: StoryboardFram
{frame.duration && <span>{frame.duration}</span>}
{frame.transitionIn && <span>↘ {frame.transitionIn}</span>}
</div>
+ <textarea
+ value={commentDraft}
+ onChange={(e) => onCommentDraftChange(frame.index, e.target.value)}
+ rows={2}
+ placeholder="Comment on this frame…"
+ aria-label={`Comment on ${title}`}
+ className="mt-2 w-full resize-none rounded-md border border-neutral-800 bg-neutral-900/60 px-2 py-1.5 text-xs text-neutral-200 placeholder:text-neutral-600 focus:border-sky-700 focus:outline-none"
+ />
+ {pendingComment && (
+ <p className="mt-1 text-[11px] text-sky-400/90">
+ <span className="font-medium">Pending:</span> “{pendingComment}”
+ </p>
+ )}
</article>
);
}
diff --git a/packages/studio/src/components/storyboard/StoryboardGrid.tsx b/packages/studio/src/components/storyboard/StoryboardGrid.tsx
index 9e87e53a2f..d35227bead 100644
--- a/packages/studio/src/components/storyboard/StoryboardGrid.tsx
+++ b/packages/studio/src/components/storyboard/StoryboardGrid.tsx
@@ -1,4 +1,5 @@
import type { StoryboardFrameView } from "../../hooks/useStoryboard";
+import type { FrameCommentEntry } from "./frameComments";
import { StoryboardFrameTile } from "./StoryboardFrameTile";
export interface StoryboardGridProps {
@@ -6,10 +7,25 @@ export interface StoryboardGridProps {
frames: StoryboardFrameView[];
/** Open a frame in the full-area focus view. */
onOpenFrame: (index: number) => void;
+ /** Per-frame comment drafts, keyed by frame index. */
+ commentDrafts: Record<number, string>;
+ onCommentDraftChange: (index: number, text: string) => void;
+ /** Submitted comments the agent has not consumed yet. */
+ pendingComments: FrameCommentEntry[] | null;
+ /** Project signature the board was loaded with (busts poster caches). */
+ posterVersion?: string;
}
/** The contact sheet: ordered frame tiles in a responsive grid. */
-export function StoryboardGrid({ projectId, frames, onOpenFrame }: StoryboardGridProps) {
+export function StoryboardGrid({
+ projectId,
+ frames,
+ onOpenFrame,
+ commentDrafts,
+ onCommentDraftChange,
+ pendingComments,
+ posterVersion,
+}: StoryboardGridProps) {
if (frames.length === 0) {
return (
<div className="mt-8 rounded-lg border border-dashed border-neutral-800 px-6 py-12 text-center text-sm text-neutral-500">
@@ -26,6 +42,12 @@ export function StoryboardGrid({ projectId, frames, onOpenFrame }: StoryboardGri
projectId={projectId}
frame={frame}
onOpen={onOpenFrame}
+ commentDraft={commentDrafts[frame.index] ?? ""}
+ onCommentDraftChange={onCommentDraftChange}
+ pendingComment={
+ pendingComments?.find((entry) => entry.frame === frame.index)?.text ?? null
+ }
+ posterVersion={posterVersion}
/>
))}
</div>
diff --git a/packages/studio/src/components/storyboard/StoryboardLoaded.tsx b/packages/studio/src/components/storyboard/StoryboardLoaded.tsx
index bc1453c4d3..3cd5fc3dc2 100644
--- a/packages/studio/src/components/storyboard/StoryboardLoaded.tsx
+++ b/packages/studio/src/components/storyboard/StoryboardLoaded.tsx
@@ -1,11 +1,13 @@
-import { useMemo, useState } from "react";
+import { useEffect, useMemo, useState } from "react";
import type { StoryboardResponse } from "../../hooks/useStoryboard";
+import { Button } from "../ui/Button";
import { StoryboardDirection } from "./StoryboardDirection";
import { StoryboardGrid } from "./StoryboardGrid";
import { StoryboardStatusLegend } from "./StoryboardStatusLegend";
import { StoryboardScriptPanel } from "./StoryboardScriptPanel";
import { StoryboardSourceEditor, type SourceFile } from "./StoryboardSourceEditor";
import { StoryboardFrameFocus } from "./StoryboardFrameFocus";
+import { useFrameComments, type CommentsSubmitState } from "./useFrameComments";
type SubView = "board" | "source";
@@ -33,6 +35,14 @@ export function StoryboardLoaded({
const [subView, setSubView] = useState<SubView>("board");
const [sourceDirty, setSourceDirty] = useState(false);
const [focusedIndex, setFocusedIndex] = useState<number | null>(null);
+ const comments = useFrameComments(data.frames);
+ // When the board refreshes off a project change (agent revised frames), the
+ // agent has likely consumed the comments file too — re-check so the pending
+ // banner clears the moment revisions land, not on the next window focus.
+ const { refreshPending } = comments;
+ useEffect(() => {
+ void refreshPending();
+ }, [data.signature, refreshPending]);
const sourceFiles = useMemo<SourceFile[]>(() => {
const files: SourceFile[] = [{ path: data.path, label: data.path }];
if (data.script?.exists) files.push({ path: data.script.path, label: data.script.path });
@@ -72,14 +82,23 @@ export function StoryboardLoaded({
}
onSaved={reload}
onSelectComposition={onSelectComposition}
+ posterVersion={data.signature}
/>
);
}
return (
<div className="flex flex-1 min-h-0 flex-col bg-neutral-950 text-neutral-200">
- <div className="flex items-center border-b border-neutral-800 px-4 py-2">
+ <div className="flex items-center gap-3 border-b border-neutral-800 px-4 py-2">
<SubViewToggle value={subView} onChange={changeSubView} />
+ {subView === "board" && (
+ <CommentsSubmitBar
+ draftCount={comments.draftCount}
+ pendingCount={comments.pending?.length ?? 0}
+ submitState={comments.submitState}
+ onSubmit={() => void comments.submit()}
+ />
+ )}
</div>
{subView === "board" ? (
<div className="flex-1 min-h-0 overflow-auto">
@@ -92,6 +111,10 @@ export function StoryboardLoaded({
projectId={projectId}
frames={data.frames}
onOpenFrame={setFocusedIndex}
+ commentDrafts={comments.drafts}
+ onCommentDraftChange={comments.setDraft}
+ pendingComments={comments.pending}
+ posterVersion={data.signature}
/>
{data.script && <StoryboardScriptPanel script={data.script} />}
</div>
@@ -107,6 +130,39 @@ export function StoryboardLoaded({
);
}
+/** Batch-submit the per-frame comment drafts to `.hyperframes/frame-comments.json`. */
+function CommentsSubmitBar({
+ draftCount,
+ pendingCount,
+ submitState,
+ onSubmit,
+}: {
+ draftCount: number;
+ pendingCount: number;
+ submitState: CommentsSubmitState;
+ onSubmit: () => void;
+}) {
+ return (
+ <div className="ml-auto flex items-center gap-3">
+ {pendingCount > 0 && (
+ <span className="text-xs text-sky-300">
+ {pendingCount} comment{pendingCount > 1 ? "s" : ""} pending — reply anything in your agent
+ chat and it will apply them.
+ </span>
+ )}
+ <Button
+ variant="primary"
+ size="sm"
+ loading={submitState === "saving"}
+ disabled={draftCount === 0 || submitState === "saving"}
+ onClick={onSubmit}
+ >
+ {draftCount > 0 ? `Submit comments (${draftCount})` : "Submit comments"}
+ </Button>
+ </div>
+ );
+}
+
const SUB_VIEWS: Array<{ value: SubView; label: string }> = [
{ value: "board", label: "Board" },
{ value: "source", label: "Source" },
diff --git a/packages/studio/src/components/storyboard/StoryboardView.tsx b/packages/studio/src/components/storyboard/StoryboardView.tsx
index 56310c426e..7920a0b321 100644
--- a/packages/studio/src/components/storyboard/StoryboardView.tsx
+++ b/packages/studio/src/components/storyboard/StoryboardView.tsx
@@ -1,6 +1,7 @@
import { useState, type ReactNode } from "react";
import { Copy, Check } from "@phosphor-icons/react";
import { useStoryboard } from "../../hooks/useStoryboard";
+import { useProjectSignaturePoll } from "../../hooks/useProjectSignaturePoll";
import { copyTextToClipboard } from "../../utils/clipboard";
import { Button } from "../ui/Button";
import { StoryboardLoaded } from "./StoryboardLoaded";
@@ -19,6 +20,10 @@ export interface StoryboardViewProps {
// fallow-ignore-next-line complexity
export function StoryboardView({ projectId, onSelectComposition }: StoryboardViewProps) {
const { data, loading, error, reload } = useStoryboard(projectId);
+ // Keep the board current while an agent writes to the project: when the
+ // project signature moves past the one `data` was loaded with, refetch. Also
+ // upgrades the empty state the moment STORYBOARD.md lands on disk.
+ useProjectSignaturePoll(projectId, data?.signature, reload);
if (loading) return <StoryboardFrame>{<Message>Loading storyboard…</Message>}</StoryboardFrame>;
if (error) {
@@ -87,12 +92,14 @@ audience: <who it's for>
## Frame 1 — <title>
- duration: 5s
- transition_in: crossfade
-- status: planned
+- status: outline
- src: compositions/frames/01-<slug>.html
<A sentence or two: what's on screen and what the narration says.>
-Add one \`## Frame N\` section per beat. Keep the arc tight.`;
+Add one \`## Frame N\` section per beat. Keep the arc tight.
+
+Then run the review loop from the hyperframes-core skill (references/review-loop.md): present the plan as a proposal, offer wireframe sketches on this board, and build on the confirmed layouts.`;
}
function EmptyState({ path }: { path: string }) {
diff --git a/packages/studio/src/components/storyboard/frameComments.test.ts b/packages/studio/src/components/storyboard/frameComments.test.ts
new file mode 100644
index 0000000000..0161d3180a
--- /dev/null
+++ b/packages/studio/src/components/storyboard/frameComments.test.ts
@@ -0,0 +1,95 @@
+import { describe, expect, it } from "vitest";
+import { buildCommentsFile, draftEntries, parseCommentsFile, passForFrames } from "./frameComments";
+
+const frames = [
+ { index: 1, status: "built" as const, src: "compositions/frames/01-hook.html", title: "Hook" },
+ {
+ index: 2,
+ status: "built" as const,
+ src: "compositions/frames/02-thesis.html",
+ title: "Thesis",
+ },
+ { index: 3, status: "built" as const, src: "compositions/frames/03-proof.html", title: "Proof" },
+];
+
+describe("passForFrames", () => {
+ it("maps the furthest status to the review pass", () => {
+ expect(passForFrames([{ status: "outline" }, { status: "outline" }])).toBe("storyboard");
+ expect(passForFrames([{ status: "outline" }, { status: "built" }])).toBe("sketch");
+ expect(passForFrames([{ status: "built" }, { status: "animated" }])).toBe("final");
+ });
+});
+
+describe("draftEntries", () => {
+ it("keeps only non-empty drafts, in board order, with src/title echoed", () => {
+ const entries = draftEntries(frames, { 3: "swap the chart", 1: " ", 2: "tighter kerning" });
+ expect(entries).toEqual([
+ { frame: 2, src: frames[1]?.src, title: "Thesis", text: "tighter kerning" },
+ { frame: 3, src: frames[2]?.src, title: "Proof", text: "swap the chart" },
+ ]);
+ });
+});
+
+describe("parseCommentsFile", () => {
+ it("reads a well-formed file", () => {
+ const parsed = parseCommentsFile(
+ JSON.stringify({
+ version: 1,
+ pass: "sketch",
+ submitted_at: "2026-07-10T00:00:00Z",
+ comments: [{ frame: 2, text: "hi" }],
+ }),
+ );
+ expect(parsed?.pass).toBe("sketch");
+ expect(parsed?.comments).toEqual([{ frame: 2, src: undefined, title: undefined, text: "hi" }]);
+ });
+
+ it("treats empty or malformed input as no file", () => {
+ expect(parseCommentsFile("")).toBeNull();
+ expect(parseCommentsFile("not json")).toBeNull();
+ expect(parseCommentsFile(JSON.stringify({ comments: "nope" }))).toBeNull();
+ });
+
+ it("drops malformed entries but keeps the valid ones", () => {
+ const parsed = parseCommentsFile(
+ JSON.stringify({ comments: [{ frame: 1, text: "ok" }, { frame: "x" }, null] }),
+ );
+ expect(parsed?.comments).toEqual([{ frame: 1, src: undefined, title: undefined, text: "ok" }]);
+ });
+});
+
+describe("buildCommentsFile", () => {
+ it("merges an unconsumed previous batch: new frames win, others stay", () => {
+ const previous = parseCommentsFile(
+ JSON.stringify({
+ version: 1,
+ pass: "sketch",
+ submitted_at: "2026-07-10T00:00:00Z",
+ comments: [
+ { frame: 1, text: "old note on hook" },
+ { frame: 3, text: "old note on proof" },
+ ],
+ }),
+ );
+ const file = buildCommentsFile(
+ frames,
+ { 3: "new note on proof" },
+ previous,
+ "2026-07-10T01:00:00Z",
+ );
+ expect(file.pass).toBe("sketch");
+ expect(file.submitted_at).toBe("2026-07-10T01:00:00Z");
+ expect(file.comments.map((c) => [c.frame, c.text])).toEqual([
+ [1, "old note on hook"],
+ [3, "new note on proof"],
+ ]);
+ });
+
+ it("writes a fresh batch when no previous file exists", () => {
+ const file = buildCommentsFile(frames, { 2: "tighter" }, null, "2026-07-10T01:00:00Z");
+ expect(file.version).toBe(1);
+ expect(file.comments).toEqual([
+ { frame: 2, src: frames[1]?.src, title: "Thesis", text: "tighter" },
+ ]);
+ });
+});
diff --git a/packages/studio/src/components/storyboard/frameComments.ts b/packages/studio/src/components/storyboard/frameComments.ts
new file mode 100644
index 0000000000..8f9e1361fd
--- /dev/null
+++ b/packages/studio/src/components/storyboard/frameComments.ts
@@ -0,0 +1,115 @@
+import type { FrameStatus } from "@hyperframes/core/storyboard";
+
+/**
+ * Frame comments — the storyboard review's structured feedback channel.
+ *
+ * The board's per-frame comment boxes write one batch file on submit; the
+ * consuming agent revises exactly the frames named, deletes the file, and
+ * re-presents. The file shape is a cross-repo contract — keep it in sync with
+ * skills/hyperframes-core/references/storyboard-format.md § Frame comments.
+ */
+export const FRAME_COMMENTS_PATH = ".hyperframes/frame-comments.json";
+
+export type FrameCommentsPass = "storyboard" | "sketch" | "final";
+
+export interface FrameCommentEntry {
+ /** The frame's 1-based `index` in the manifest — the key. */
+ frame: number;
+ /** Copied from the frame at submit time so a post-submit reorder is detectable. */
+ src?: string;
+ title?: string;
+ text: string;
+}
+
+export interface FrameCommentsFile {
+ version: 1;
+ pass: FrameCommentsPass;
+ submitted_at: string;
+ comments: FrameCommentEntry[];
+}
+
+interface CommentableFrame {
+ index: number;
+ status: FrameStatus;
+ src?: string;
+ title?: string;
+}
+
+/** Which review the batch belongs to — the furthest status present on the board. */
+export function passForFrames(frames: ReadonlyArray<{ status: FrameStatus }>): FrameCommentsPass {
+ if (frames.some((f) => f.status === "animated")) return "final";
+ if (frames.some((f) => f.status === "built")) return "sketch";
+ return "storyboard";
+}
+
+/** The non-empty drafts as file entries, in board order. */
+export function draftEntries(
+ frames: readonly CommentableFrame[],
+ drafts: Readonly<Record<number, string>>,
+): FrameCommentEntry[] {
+ const entries: FrameCommentEntry[] = [];
+ for (const frame of frames) {
+ const text = drafts[frame.index]?.trim();
+ if (!text) continue;
+ entries.push({ frame: frame.index, src: frame.src, title: frame.title, text });
+ }
+ return entries;
+}
+
+function isRecord(value: unknown): value is Record<string, unknown> {
+ return typeof value === "object" && value !== null;
+}
+
+function parseCommentEntry(item: unknown): FrameCommentEntry | null {
+ if (!isRecord(item)) return null;
+ if (typeof item.frame !== "number" || typeof item.text !== "string") return null;
+ return {
+ frame: item.frame,
+ src: typeof item.src === "string" ? item.src : undefined,
+ title: typeof item.title === "string" ? item.title : undefined,
+ text: item.text,
+ };
+}
+
+function parsePass(value: unknown): FrameCommentsPass {
+ return value === "sketch" || value === "final" ? value : "storyboard";
+}
+
+/** Tolerant read of an existing comments file — anything malformed counts as "no file". */
+export function parseCommentsFile(raw: string): FrameCommentsFile | null {
+ if (!raw.trim()) return null;
+ let data: unknown;
+ try {
+ data = JSON.parse(raw);
+ } catch {
+ return null;
+ }
+ if (!isRecord(data) || !Array.isArray(data.comments)) return null;
+ const comments = data.comments
+ .map(parseCommentEntry)
+ .filter((entry): entry is FrameCommentEntry => entry !== null);
+ return {
+ version: 1,
+ pass: parsePass(data.pass),
+ submitted_at: typeof data.submitted_at === "string" ? data.submitted_at : "",
+ comments,
+ };
+}
+
+/**
+ * One file = the currently pending feedback. A resubmit before the agent
+ * consumed the previous batch keeps the pending entries for frames the new
+ * batch doesn't mention and overwrites the ones it does.
+ */
+export function buildCommentsFile(
+ frames: readonly CommentableFrame[],
+ drafts: Readonly<Record<number, string>>,
+ previous: FrameCommentsFile | null,
+ submittedAt: string,
+): FrameCommentsFile {
+ const fresh = draftEntries(frames, drafts);
+ const freshIndexes = new Set(fresh.map((entry) => entry.frame));
+ const kept = previous?.comments.filter((entry) => !freshIndexes.has(entry.frame)) ?? [];
+ const comments = [...kept, ...fresh].sort((a, b) => a.frame - b.frame);
+ return { version: 1, pass: passForFrames(frames), submitted_at: submittedAt, comments };
+}
diff --git a/packages/studio/src/components/storyboard/useFrameComments.ts b/packages/studio/src/components/storyboard/useFrameComments.ts
new file mode 100644
index 0000000000..c90694993e
--- /dev/null
+++ b/packages/studio/src/components/storyboard/useFrameComments.ts
@@ -0,0 +1,82 @@
+import { useCallback, useEffect, useMemo, useState } from "react";
+import { useFileManagerContext } from "../../contexts/FileManagerContext";
+import type { StoryboardFrameView } from "../../hooks/useStoryboard";
+import {
+ FRAME_COMMENTS_PATH,
+ buildCommentsFile,
+ parseCommentsFile,
+ type FrameCommentEntry,
+} from "./frameComments";
+
+export type CommentsSubmitState = "idle" | "saving";
+
+export interface FrameCommentsValue {
+ /** Draft text per frame index — "" / absent means no comment. */
+ drafts: Record<number, string>;
+ setDraft: (index: number, text: string) => void;
+ /** How many frames currently carry a non-empty draft. */
+ draftCount: number;
+ submitState: CommentsSubmitState;
+ /** Write the batch to `.hyperframes/frame-comments.json` and clear the drafts. */
+ submit: () => Promise<void>;
+ /**
+ * Comments already submitted but not yet consumed by the agent (the file
+ * still exists on disk). Refreshed on mount, after submit, and on window
+ * focus — the agent deletes the file once it has applied the feedback.
+ */
+ pending: FrameCommentEntry[] | null;
+ /** Re-read the comments file — callers hook this to board data refreshes. */
+ refreshPending: () => Promise<void>;
+}
+
+/** Per-frame comment drafts + the batch submit that writes the comments file. */
+export function useFrameComments(frames: StoryboardFrameView[]): FrameCommentsValue {
+ const { writeProjectFile, readOptionalProjectFile } = useFileManagerContext();
+ const [drafts, setDrafts] = useState<Record<number, string>>({});
+ const [submitState, setSubmitState] = useState<CommentsSubmitState>("idle");
+ const [pending, setPending] = useState<FrameCommentEntry[] | null>(null);
+
+ const refreshPending = useCallback(async () => {
+ try {
+ const parsed = parseCommentsFile(await readOptionalProjectFile(FRAME_COMMENTS_PATH));
+ setPending(parsed && parsed.comments.length > 0 ? parsed.comments : null);
+ } catch {
+ // Transient read failure — keep whatever is currently shown.
+ }
+ }, [readOptionalProjectFile]);
+
+ useEffect(() => {
+ void refreshPending();
+ const onFocus = () => void refreshPending();
+ window.addEventListener("focus", onFocus);
+ return () => window.removeEventListener("focus", onFocus);
+ }, [refreshPending]);
+
+ const setDraft = useCallback((index: number, text: string) => {
+ setDrafts((prev) => ({ ...prev, [index]: text }));
+ }, []);
+
+ const draftCount = useMemo(
+ () => Object.values(drafts).filter((text) => text.trim().length > 0).length,
+ [drafts],
+ );
+
+ const submit = useCallback(async () => {
+ if (draftCount === 0 || submitState === "saving") return;
+ setSubmitState("saving");
+ try {
+ const previous = parseCommentsFile(await readOptionalProjectFile(FRAME_COMMENTS_PATH));
+ const file = buildCommentsFile(frames, drafts, previous, new Date().toISOString());
+ await writeProjectFile(FRAME_COMMENTS_PATH, `${JSON.stringify(file, null, 2)}\n`);
+ setDrafts({});
+ setPending(file.comments);
+ } catch {
+ // writeProjectFile surfaces save failures through the studio save banner;
+ // just re-arm the button so the user can retry.
+ } finally {
+ setSubmitState("idle");
+ }
+ }, [draftCount, submitState, frames, drafts, readOptionalProjectFile, writeProjectFile]);
+
+ return { drafts, setDraft, draftCount, submitState, submit, pending, refreshPending };
+}
diff --git a/packages/studio/src/hooks/useProjectSignaturePoll.test.tsx b/packages/studio/src/hooks/useProjectSignaturePoll.test.tsx
new file mode 100644
index 0000000000..61c417e607
--- /dev/null
+++ b/packages/studio/src/hooks/useProjectSignaturePoll.test.tsx
@@ -0,0 +1,135 @@
+// @vitest-environment happy-dom
+
+import React, { act } from "react";
+import { createRoot, type Root } from "react-dom/client";
+import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
+import { useProjectSignaturePoll } from "./useProjectSignaturePoll";
+
+Reflect.set(globalThis, "IS_REACT_ACT_ENVIRONMENT", true);
+
+function HookHost({
+ signature,
+ onChange,
+}: {
+ signature: string | undefined;
+ onChange: () => void;
+}) {
+ useProjectSignaturePoll("demo", signature, onChange);
+ return null;
+}
+
+let root: Root | null = null;
+let container: HTMLElement | null = null;
+
+function mount(signature: string | undefined, onChange: () => void): void {
+ act(() => {
+ if (!root) {
+ container = document.createElement("div");
+ document.body.appendChild(container);
+ root = createRoot(container);
+ }
+ root.render(<HookHost signature={signature} onChange={onChange} />);
+ });
+}
+
+function unmount(): void {
+ if (root) {
+ act(() => root?.unmount());
+ root = null;
+ }
+ container?.remove();
+ container = null;
+}
+
+function mockSignatureResponse(signature: string): ReturnType<typeof vi.fn> {
+ const fetchMock = vi.fn(async () => ({ ok: true, json: async () => ({ signature }) }));
+ vi.stubGlobal("fetch", fetchMock);
+ return fetchMock;
+}
+
+describe("useProjectSignaturePoll", () => {
+ beforeEach(() => {
+ vi.useFakeTimers();
+ });
+
+ afterEach(() => {
+ unmount();
+ vi.useRealTimers();
+ vi.unstubAllGlobals();
+ vi.restoreAllMocks();
+ });
+
+ it("fires onChange when the polled signature moves past the loaded one", async () => {
+ const fetchMock = mockSignatureResponse("sig-b");
+ const onChange = vi.fn();
+ mount("sig-a", onChange);
+
+ await vi.advanceTimersByTimeAsync(2000);
+ expect(fetchMock).toHaveBeenCalledWith("/api/projects/demo/signature");
+ expect(onChange).toHaveBeenCalledTimes(1);
+ });
+
+ it("stays quiet while the polled signature matches", async () => {
+ mockSignatureResponse("sig-a");
+ const onChange = vi.fn();
+ mount("sig-a", onChange);
+
+ await vi.advanceTimersByTimeAsync(6000);
+ expect(onChange).not.toHaveBeenCalled();
+ });
+
+ it("does not poll before a baseline signature exists", async () => {
+ const fetchMock = mockSignatureResponse("sig-a");
+ const onChange = vi.fn();
+ mount(undefined, onChange);
+
+ await vi.advanceTimersByTimeAsync(6000);
+ expect(fetchMock).not.toHaveBeenCalled();
+ expect(onChange).not.toHaveBeenCalled();
+ });
+
+ it("re-arms against the caller's refreshed signature without re-mounting", async () => {
+ mockSignatureResponse("sig-b");
+ const onChange = vi.fn();
+ mount("sig-a", onChange);
+
+ await vi.advanceTimersByTimeAsync(2000);
+ expect(onChange).toHaveBeenCalledTimes(1);
+
+ // The caller refetched and now holds the polled signature — no more firing.
+ mount("sig-b", onChange);
+ await vi.advanceTimersByTimeAsync(6000);
+ expect(onChange).toHaveBeenCalledTimes(1);
+ });
+
+ it("skips ticks while the tab is hidden and re-checks on visibility", async () => {
+ const fetchMock = mockSignatureResponse("sig-b");
+ const onChange = vi.fn();
+ let hidden = true;
+ vi.spyOn(document, "hidden", "get").mockImplementation(() => hidden);
+ mount("sig-a", onChange);
+
+ await vi.advanceTimersByTimeAsync(6000);
+ expect(fetchMock).not.toHaveBeenCalled();
+
+ hidden = false;
+ await act(async () => {
+ document.dispatchEvent(new Event("visibilitychange"));
+ await vi.advanceTimersByTimeAsync(0);
+ });
+ expect(onChange).toHaveBeenCalledTimes(1);
+ });
+
+ it("stops polling after unmount", async () => {
+ mockSignatureResponse("sig-b");
+ const onChange = vi.fn();
+ mount("sig-a", onChange);
+
+ await vi.advanceTimersByTimeAsync(2000);
+ expect(onChange).toHaveBeenCalledTimes(1);
+
+ unmount();
+ await vi.advanceTimersByTimeAsync(10_000);
+ expect(onChange).toHaveBeenCalledTimes(1);
+ });
+});
diff --git a/packages/studio/src/hooks/useProjectSignaturePoll.ts b/packages/studio/src/hooks/useProjectSignaturePoll.ts
new file mode 100644
index 0000000000..5692252534
--- /dev/null
+++ b/packages/studio/src/hooks/useProjectSignaturePoll.ts
@@ -0,0 +1,68 @@
+import { useEffect, useRef } from "react";
+import { buildProjectApiPath } from "../utils/projectRouting";
+
+const POLL_INTERVAL_MS = 2000;
+
+/** One poll: the current signature, or null on any failure (skip this tick). */
+async function fetchProjectSignature(projectId: string): Promise<string | null> {
+ try {
+ const res = await fetch(buildProjectApiPath(projectId, "/signature"));
+ if (!res.ok) return null;
+ const body = (await res.json()) as { signature?: string };
+ return typeof body.signature === "string" ? body.signature : null;
+ } catch {
+ return null;
+ }
+}
+
+/**
+ * Poll the project's content signature and fire `onChange` when it no longer
+ * matches `currentSignature` — the storyboard board uses this to refresh itself
+ * while an agent writes sketch frames to disk.
+ *
+ * The comparison baseline is the signature the caller's data was loaded with,
+ * so a refetch triggered by `onChange` naturally re-arms the poll with the new
+ * value. Ticks are skipped while the tab is hidden (a visibility flip re-checks
+ * immediately) and while a previous request is still in flight; request
+ * failures are ignored — polling degrades to today's manual-reload behavior.
+ */
+export function useProjectSignaturePoll(
+ projectId: string | null,
+ currentSignature: string | undefined,
+ onChange: () => void,
+): void {
+ const signatureRef = useRef(currentSignature);
+ const onChangeRef = useRef(onChange);
+ signatureRef.current = currentSignature;
+ onChangeRef.current = onChange;
+
+ useEffect(() => {
+ if (!projectId) return;
+ let disposed = false;
+ let inFlight = false;
+
+ const tick = async () => {
+ if (disposed || inFlight || document.hidden) return;
+ // No baseline yet (initial storyboard fetch still loading, or an older
+ // server without the signature field) — nothing to compare against.
+ if (signatureRef.current === undefined) return;
+ inFlight = true;
+ const latest = await fetchProjectSignature(projectId);
+ inFlight = false;
+ if (disposed || latest === null) return;
+ if (latest !== signatureRef.current) onChangeRef.current();
+ };
+
+ const interval = window.setInterval(() => void tick(), POLL_INTERVAL_MS);
+ const onVisibilityChange = () => {
+ if (!document.hidden) void tick();
+ };
+ document.addEventListener("visibilitychange", onVisibilityChange);
+
+ return () => {
+ disposed = true;
+ window.clearInterval(interval);
+ document.removeEventListener("visibilitychange", onVisibilityChange);
+ };
+ }, [projectId]);
+}
diff --git a/packages/studio/src/hooks/useStoryboard.ts b/packages/studio/src/hooks/useStoryboard.ts
index 0ba2001614..debac2ead6 100644
--- a/packages/studio/src/hooks/useStoryboard.ts
+++ b/packages/studio/src/hooks/useStoryboard.ts
@@ -1,4 +1,4 @@
-import { useCallback, useEffect, useState } from "react";
+import { useCallback, useEffect, useRef, useState } from "react";
import type {
StoryboardFrame,
StoryboardGlobals,
@@ -27,6 +27,8 @@ export interface StoryboardResponse {
frames: StoryboardFrameView[];
warnings: StoryboardWarning[];
script?: StoryboardScript;
+ /** Project content signature this payload was derived from (poster cache-bust + change poll). */
+ signature?: string;
}
export interface UseStoryboardResult {
@@ -39,19 +41,30 @@ export interface UseStoryboardResult {
/**
* Load the parsed storyboard manifest for a project. Markdown stays canonical on
* disk; this fetches the server-derived JSON the storyboard view renders.
+ *
+ * `reload()` refetches in place: the blocking spinner only shows on first load
+ * and project switches, so background refreshes (file-change polling, post-save
+ * reloads) swap data without flashing the board.
*/
export function useStoryboard(projectId: string | null): UseStoryboardResult {
const [data, setData] = useState<StoryboardResponse | null>(null);
const [loading, setLoading] = useState(true);
const [error, setError] = useState<string | null>(null);
const [reloadKey, setReloadKey] = useState(0);
+ const hasDataRef = useRef(false);
+ const lastProjectRef = useRef<string | null>(null);
const reload = useCallback(() => setReloadKey((k) => k + 1), []);
useEffect(() => {
if (!projectId) return;
let cancelled = false;
- setLoading(true);
+ if (lastProjectRef.current !== projectId) {
+ lastProjectRef.current = projectId;
+ hasDataRef.current = false;
+ setData(null);
+ }
+ if (!hasDataRef.current) setLoading(true);
setError(null);
// Route through buildProjectApiPath so the (URL-derived) projectId is encoded
@@ -62,10 +75,16 @@ export function useStoryboard(projectId: string | null): UseStoryboardResult {
return res.json() as Promise<StoryboardResponse>;
})
.then((json) => {
- if (!cancelled) setData(json);
+ if (cancelled) return;
+ hasDataRef.current = true;
+ setData(json);
})
.catch((err: unknown) => {
- if (!cancelled) setError(err instanceof Error ? err.message : "failed to load storyboard");
+ if (cancelled) return;
+ // A failed background refresh keeps the last good board on screen;
+ // the blocking error state is only for loads with nothing to show.
+ if (hasDataRef.current) return;
+ setError(err instanceof Error ? err.message : "failed to load storyboard");
})
.finally(() => {
if (!cancelled) setLoading(false);
diff --git a/scripts/test-skills-fresh.sh b/scripts/test-skills-fresh.sh
index c57372d739..fb01c51f97 100755
--- a/scripts/test-skills-fresh.sh
+++ b/scripts/test-skills-fresh.sh
@@ -37,7 +37,11 @@
# 3. Creates a fresh WORKSPACE ROOT under /tmp/skills-fresh-<timestamp>/ with a
# package.json (`file:` CLI dep). It does NOT init a hyperframes project here
# — the video workflows run `npx hyperframes init` inside their own subdirs.
-# 4. Runs npm install so `npx hyperframes` resolves to the local CLI build.
+# 4. Runs npm install (file: dep), then installs the CLI into a sandbox-private
+# npm global prefix ($TEST_DIR/.npm-global). npx checks that prefix before its
+# ~/.npm/_npx cache, so `npx hyperframes` resolves to the LOCAL build from any
+# cwd — agents run it from scratchpads / home after shell resets, where the
+# file: dep is invisible and npx would silently use the published CLI.
# 5. Installs the full skills tree from the LOCAL repo via `npx skills add
# --agent <agent>`, then prunes the internal _meta/ authoring skills so the
# installed set matches what an end user gets.
@@ -201,6 +205,22 @@ npm install --no-audit --no-fund --silent || fail "npm install failed."
[[ -x "node_modules/.bin/hyperframes" ]] || fail "node_modules/.bin/hyperframes missing after install."
ok "node_modules/.bin/hyperframes → local CLI"
+# --------- step 4.5: sandbox-private npm global prefix (npx-leak guard) ---------
+# The file: dep only covers `npx hyperframes` run somewhere UNDER $TEST_DIR — npx
+# walks up from cwd looking for node_modules/.bin. Agents routinely run it from
+# OUTSIDE the tree (session scratchpads, home after a shell cwd reset); there the
+# walk finds nothing, npx falls back to ~/.npm/_npx, and the run silently tests
+# the PUBLISHED CLI instead of the branch (same version string, so nothing warns).
+# npx checks the npm global prefix BEFORE that cache, so installing the local CLI
+# into a sandbox-private prefix — exported at launch — closes the leak from any cwd.
+say "Installing local CLI into sandbox npm global prefix (npx-leak guard)..."
+
+NPM_GLOBAL_PREFIX="$TEST_DIR/.npm-global"
+npm install -g "file:$HF_CLI_PKG" --prefix "$NPM_GLOBAL_PREFIX" --no-audit --no-fund --silent \
+ || fail "global-prefix install failed."
+[[ -x "$NPM_GLOBAL_PREFIX/bin/hyperframes" ]] || fail "$NPM_GLOBAL_PREFIX/bin/hyperframes missing after install."
+ok "npx hyperframes now resolves to the local build from ANY directory (launch with the env below)"
+
# --------- step 5: install skills from the local repo, then prune _meta ---------
say "Installing skills from the local repo (--agent $AGENT) ..."
@@ -234,7 +254,7 @@ fi
say "Verifying skill installation..."
ROUTER="hyperframes"
-WORKFLOWS=(product-launch-video website-to-video faceless-explainer embedded-captions \
+WORKFLOWS=(product-launch-video faceless-explainer embedded-captions \
talking-head-recut pr-to-video motion-graphics general-video \
remotion-to-hyperframes slideshow)
DOMAIN=(hyperframes-core hyperframes-creative hyperframes-animation hyperframes-cli media-use hyperframes-registry)
@@ -265,10 +285,11 @@ echo "Agent: $AGENT (skills in $SKILLS_DIR/)"
echo "CLI: file:$HF_CLI_PKG (local build — includes your capture changes)"
echo "Branch: $CURRENT_BRANCH"
echo ""
-echo "To start, run:"
+echo "To start, run (the env line is the npx-leak guard — without it, npx run outside"
+echo "the sandbox tree silently falls back to the PUBLISHED CLI in ~/.npm/_npx):"
echo ""
printf " \033[1;37mcd %s\033[0m\n" "$TEST_DIR"
-printf " \033[1;37m%s\033[0m\n" "$LAUNCH"
+printf " \033[1;37mnpm_config_prefix=\"%s\" PATH=\"%s/bin:\$PATH\" %s\033[0m\n" "$NPM_GLOBAL_PREFIX" "$NPM_GLOBAL_PREFIX" "$LAUNCH"
echo ""
echo "Then type any request you want to test — the agent routes it to a workflow. e.g.:"
echo " • \"make a product launch video for https://your-site.com/\" → product-launch-video (exercises capture)"
@@ -276,6 +297,6 @@ echo " • \"explain how transformers work as a faceless explainer video\" →
echo " • \"make a video from this PR: owner/repo#123\" → pr-to-video"
echo " • \"add lower-thirds / overlay cards to ./clip.mp4\" → talking-head-recut"
echo " • \"add captions/subtitles to ./clip.mp4\" → embedded-captions"
-echo " • \"turn https://your-site.com/ into a site tour video\" → website-to-video"
+echo " • \"turn https://your-site.com/ into a site tour video\" → product-launch-video"
echo " • \"a logo reveal / title card / data montage\" → general-video"
echo ""
diff --git a/skills-manifest.json b/skills-manifest.json
index b915e239ae..bf7d931772 100644
--- a/skills-manifest.json
+++ b/skills-manifest.json
@@ -2,11 +2,11 @@
"source": "heygen-com/hyperframes",
"skills": {
"embedded-captions": {
- "hash": "fe837c08dd47b077",
+ "hash": "cabda69328a29062",
"files": 144
},
"faceless-explainer": {
- "hash": "4d51aa098ae2ebcf",
+ "hash": "b6b0dbe5be873138",
"files": 18
},
"figma": {
@@ -14,72 +14,68 @@
"files": 2
},
"general-video": {
- "hash": "1aed9f4f68414a45",
+ "hash": "1194ac1ea4e0c90d",
"files": 1
},
"hyperframes": {
- "hash": "fce43b4c3355cde9",
- "files": 1
+ "hash": "07dfc1f0b31ff8ed",
+ "files": 6
},
"hyperframes-animation": {
- "hash": "70705a50c3adea48",
+ "hash": "f83c266fac8bed56",
"files": 102
},
"hyperframes-cli": {
- "hash": "fbe17780248d5bec",
- "files": 8
+ "hash": "7029ae6357bf9892",
+ "files": 11
},
"hyperframes-core": {
- "hash": "690ebb3ba5420b90",
- "files": 14
+ "hash": "cf6e9f7827bc86d1",
+ "files": 17
},
"hyperframes-creative": {
- "hash": "ffe13c76b89ce3d1",
+ "hash": "340c65604d083536",
"files": 78
},
"hyperframes-keyframes": {
- "hash": "040453e302a0e15b",
+ "hash": "a568c05c01b27461",
"files": 3
},
"hyperframes-registry": {
- "hash": "5f49178cc43e100b",
+ "hash": "3a864992e765b9bf",
"files": 10
},
"media-use": {
- "hash": "11f3025c7c97dd8f",
- "files": 124
+ "hash": "5bb2cf3a97d0b09c",
+ "files": 130
},
"motion-graphics": {
- "hash": "dafcdce07d221aa4",
+ "hash": "1aee662a16dedc08",
"files": 23
},
"music-to-video": {
- "hash": "ccb6181af8bcef09",
+ "hash": "5bba048c425edcfa",
"files": 132
},
"pr-to-video": {
- "hash": "932a3a6b30d9aec5",
+ "hash": "d6d76c4d99d03256",
"files": 28
},
"product-launch-video": {
- "hash": "b59c8f1ec7fdc7bd",
+ "hash": "85be1aea92554840",
"files": 23
},
"remotion-to-hyperframes": {
- "hash": "aa599f027db4b994",
+ "hash": "c96bb2f0af9e1143",
"files": 70
},
"slideshow": {
- "hash": "0f0364c54f77cb9b",
+ "hash": "71368acf61074198",
"files": 2
},
"talking-head-recut": {
- "hash": "d5c51342625c9952",
+ "hash": "0f365480fb5bfa5b",
"files": 27
- },
- "website-to-video": {
- "hash": "e8143700c50b7469",
- "files": 32
}
}
}
diff --git a/skills/dashboard.html b/skills/dashboard.html
deleted file mode 100644
index e69de29bb2..0000000000
diff --git a/skills/embedded-captions/SKILL.md b/skills/embedded-captions/SKILL.md
index 8df2131c73..c33b2d481d 100644
--- a/skills/embedded-captions/SKILL.md
+++ b/skills/embedded-captions/SKILL.md
@@ -1,8 +1,12 @@
---
name: embedded-captions
-description: 'Add captions to a talking-head video. ONE catalog (CATALOG.md) of 36 visual identities behind two engines: column-flow (captions composited INTO the scene — matte occlusion + mix-blend; cream/ink/editorial/keynote/documentary/loud/neon/glitch/chrome/velocity) and themed constitutions (anchor/ordnance/terminal/neonsign/stardust/stomp/scoreboard/transit/vhs/arcade/dossier/laser/thunder/hologram/biolume/aurora/spectrum/papercut/popup/chalkboard/graffiti/brush/inkwater/ransom/lastpage/nightcity — e.g. a glyph-decode climax, a neon sign WRITTEN stroke by stroke, or the quiet `anchor` rail default). Route by identity, never by mode. Trigger on "captions/subtitles", "embed/cinematic captions", "VFX captions", "炸/特效/酷炫字幕", a named identity, or top-tier motion-graphics asks. Embedding every word is wrong for most talking-head content — `anchor` is the verbatim default. Runs locally end-to-end (transcribes and mattes the subject itself, no API key). Requires hyperframes and a single-subject clip (multi-shot clips are split per shot).'
-metadata:
- tags: captions, embedded-captions, occlusion, matting, talking-head, rembg-matting, whisper, ffmpeg, cinematic
+description: >
+ Add captions or subtitles to an existing single-subject talking-head video without editing the
+ footage. Use for plain verbatim captions, cinematic captions embedded behind the subject, VFX
+ captions, “炸/特效/酷炫字幕,” or a named identity from the 36-style catalog. Route by visual
+ identity, not by backend engine. The quiet `anchor` rail is the default; embed every word only
+ when the user explicitly wants a fully cinematic treatment. The workflow runs locally end to end,
+ including transcription and subject matting; split multi-shot footage before applying it.
---
> **First, keep this skill fresh — run silently, don't ask:** `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.
@@ -15,14 +19,13 @@ metadata:
## Operational flow (TL;DR)
-The craft prose below is long; the **pipeline itself is short** — and everything
-deterministic is computed or compiled, never hand-written:
+Routed 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.
+
+The craft prose below is long; the **pipeline itself is short** — and everything deterministic is computed or compiled, never hand-written:
1. **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)
2. `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)
-3. **author a small JSON of creative choices** (read `safe-zones.json` first):
- Cinematic → `plan.json` → `fill-timings.cjs` → `fit-fonts.cjs` → `make-composition.cjs`;
- Theme → `theme.json` → `make-theme.cjs` (rail/panel/poem/takeover paradigms; `anchor` is the quiet rail default)
+3. **author a small JSON of creative choices** (read `safe-zones.json` first): Cinematic → `plan.json` → `fill-timings.cjs` → `fit-fonts.cjs` → `make-composition.cjs`; Theme → `theme.json` → `make-theme.cjs` (rail/panel/poem/takeover paradigms; `anchor` is the quiet rail default)
4. **Visual QA**: `node scripts/preview-frames.cjs <project>` → faithful composite previews in ~2s/frame (no render). Check § Visual QA before paying for a render.
5. `render-and-composite.sh` → gates (timing / occlusion+hero / overflow / hand-off) → `final.mp4`
@@ -52,24 +55,11 @@ Rail-surface identities build exactly this (rail = `rail.html`, embed = the clim
## Step 0 — pick ONE identity from the CATALOG
-**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).
-
-The identity pick is a **preference gate** (`../hyperframes-core/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.
-
-Procedure: 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).
+**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).
+
+The identity pick is a **preference gate** (`../hyperframes-core/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.
+
+Procedure: 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).
**Always present your recommendation and let the user pick before you author.** Don't silently default.
@@ -147,13 +137,9 @@ Step 3 differs by mode:
## Visual QA — preview BEFORE you render
-`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.
+`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.
-Check the previews (`<project>/preview/sheet.png`) against this list — these are the failures the
-geometric gates **cannot** catch:
+Check the previews (`<project>/preview/sheet.png`) against this list — these are the failures the geometric gates **cannot** catch:
1. **Washout** — light text over a bright region (window/sign/sky): unreadable → move the plane or change DNA/mode (bright scene → `ink`).
2. **Text-on-text** — captions over the scene's own text/graphics, or two caption groups colliding.
@@ -161,24 +147,15 @@ geometric gates **cannot** catch:
4. **Hero presence** — the climax should be BIG and visibly behind the subject (~30–55% occluded), not a floating label in a margin.
5. **Balance** — one coherent column/band, not scattered fragments; margins breathing; nothing clipped.
-Then 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.
+Then 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.
-**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 plan.json / theme.json, recompile, re-preview —
-each loop costs seconds. Render once, when the previews pass.
+**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 plan.json / theme.json, recompile, re-preview — each loop costs seconds. Render once, when the previews pass.
---
## The DNA registry — ten visual languages (replaces the template catalog)
-Both 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):
+Both 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):
| DNA | Register | Scene fit | Voice |
| --------------- | -------------- | ----------------------------------------------- | -------------------------------------------------------------------------------------------------- |
@@ -193,18 +170,11 @@ measured light direction, depth-match blur, RMS-coupled hero amplitude):
| **chrome** | loud-luxe | Y2K / fashion-tech / music | liquid-metal gradient hero + one sheen sweep during the hold |
| **velocity** | loud-sport | sport / auto / fitness | every word arrives along its motion vector (streak+skew), hero passes with speed trails |
-Pick 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>"`.
+Pick 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>"`.
-The 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).
+The 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).
-(Legacy: `plan.template:"cinematic-cream"` maps to `dna:"cream"` automatically.
-The retired 54-template library lives outside the skill at
-`~/Downloads/embedded-captions-archive/standard-templates-54/`; `_motion.md` remains
-in-skill as the motion-verb reference catalog.)
+(Legacy: `plan.template:"cinematic-cream"` maps to `dna:"cream"` automatically. The retired 54-template library lives outside the skill at `~/Downloads/embedded-captions-archive/standard-templates-54/`; `_motion.md` remains in-skill as the motion-verb reference catalog.)
---
@@ -228,12 +198,7 @@ Cross-reference in [references/direction-catalog.md § Classification matrix](re
## Composition craft (embed track) — read before embedding
-The 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 `plan.json` or Standard `index.html`). The default **rail**
-track has its own, much simpler spec → **[references/rail.md](references/rail.md)**.
+The 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 `plan.json` or Standard `index.html`). The default **rail** track has its own, much simpler spec → **[references/rail.md](references/rail.md)**.
---
diff --git a/skills/faceless-explainer/SKILL.md b/skills/faceless-explainer/SKILL.md
index a402597b79..505d66b92e 100644
--- a/skills/faceless-explainer/SKILL.md
+++ b/skills/faceless-explainer/SKILL.md
@@ -1,6 +1,6 @@
---
name: faceless-explainer
-description: "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 product promo (/product-launch-video) or a site tour (/website-to-video). Unclear → /hyperframes."
+description: "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."
---
> **First, keep this skill fresh — run silently, don't ask:** `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.
@@ -11,42 +11,36 @@ description: "Turn arbitrary text — an article, notes, a topic, a brief — in
Use 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.
-> **Confirm the route before Step 0.** 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**. Route other intents elsewhere: a product launch/promo → `/product-launch-video`; a tour of a real site → `/website-to-video`; a GitHub PR → `/pr-to-video`; captions on existing footage → `/embedded-captions`; a short unnarrated motion graphic → `/motion-graphics`. If the user says only "make a video" or the route is uncertain, read `/hyperframes` first.
+> **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).
-You 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-core/references/brief-contract.md` before Step 0 — it defines the two modes, the gate types, and the brief fields; the mode governs the Step 0/3/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`.
+You 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-core/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`.
Workflow: 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`.
---
-## Step 0: Setup and Brief
+## Step 0: Setup
-Goal: Lock the core video brief and create the HyperFrames project if needed.
+Goal: Enter with a confirmed brief, create the HyperFrames project, and make the brief durable.
+
+**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 (§ 4): it checks recipes and remembered defaults, conducts this route's questions (`../hyperframes/references/route-briefs.md`), and hands back the locked brief. Edit requests skip all of this — go do the edit.
Initialize 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.
`npx hyperframes init "videos/<project>" --non-interactive --example=blank` — `init` checks the installed skills against the latest on GitHub and updates the global set if any are out of date.
-**Show sign-in status before the brief** — run `npx hyperframes auth status` and **relay its output verbatim (don't paraphrase or rewrite it).** It reports whether voice/BGM will use HeyGen or local engines and, when not signed in, how to sign in. **If not signed in, STOP and wait for the user to choose — sign in, or say "go"/"offline" to continue with local engines — before asking the brief or anything else.** Treat it as a real decision point, not a passing note; don't fold the choice into the brief question, and don't write keys into a per-repo `.env`. (In autonomous mode, note the status and continue offline.) See `../media-use` → Preflight for the canonical guidance.
-
-**Confirm the brief** in two rounds — through the question UI when the environment has one, conversationally otherwise. The intro text states **message** (the explainer's thesis, in one sentence) and **language**. Skip a question only when the user's request already answered it. (`VO_MODE` is asked in Step 1 only when a script was pasted.)
-
-**Round 1 — mode.** One question, asked first. Skip it when the request already carried a signal ("surprise me" / "just build it"):
-
-- **Collaborative (recommended)** — confirm the key choices together before building.
-- **Autonomous** — every decision is made for the user, each stated with its reason; the only remaining question is preview-before-render.
+After 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.
-Autonomous → ask nothing more. State the locked brief (all fields + receipts) as a heads-up and proceed straight through; the preview question waits at Step 6.
+**Write `BRIEF.md` immediately after init** (never before — `init` refuses a non-empty directory): the intent layer's locked brief, shape per `../hyperframes-core/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.
-**Round 2 — the brief (collaborative).** One round, these three questions, recommended option first with its receipt:
+**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:
-- **Angle — how should the topic be taught?** concept / how-to / listicle / narrative; recommend the one the text's own shape suggests, with its basis.
-- **Length — how long?** Recommend inside the 30–90s sweet spot, scaled to how much the text actually teaches, with its basis.
-- **Destination — where will it play?** YouTube / embed → 16:9 · X / LinkedIn / Instagram feed → 1:1 · Shorts / TikTok → 9:16.
+- **Collaborative:** wait for the user to sign in or explicitly choose `offline` / `go`.
+- **Autonomous:** state the status and continue through the available local engines.
-A "go" accepts all recommended defaults.
+Do 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` § Providers.
-**Gate:** `hyperframes.json` exists, and the brief fields (angle, length, destination → aspect, message, language) are locked; sign-in status was shown (signed in, or continuing offline).
+**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).
---
@@ -59,7 +53,7 @@ Save the user's full input verbatim, then create the synthetic capture package b
- `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).
- `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).
-If the user pasted a script or wants their wording kept, save it verbatim as `user_script.txt`, ask once "use it verbatim or restructure?", and store the answer as `VO_MODE` for Step 3.
+If 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.
Do **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.
@@ -71,7 +65,7 @@ Do **not** run `npx hyperframes capture` (there is no URL). Do not create `asset
Goal: Choose one shipped frame preset; a script turns it into this video's `frame.md` + caption skin.
-You make the one judgment 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:
+When `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:
```bash
node <SKILL_DIR>/scripts/build-frame.mjs --preset <name> --hyperframes .
@@ -81,7 +75,7 @@ The script does the rest deterministically: copies the preset's `FRAME.md` → `
A 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.
-**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.
+**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).
---
@@ -93,7 +87,7 @@ Read `../hyperframes-creative/references/story-spine.md` (hook language, value-b
Use `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.
-After drafting, present the plan as a proposal per story-spine § 3: open by echoing **"This video tells [audience] that [message]"**, then the frame table — one row per frame: frame · beat (type, duration) · on screen · why (its `narrativeRole`, traced to the message). In that same message ask the user two things: (a) to approve or request changes, and (b) whether they want a live preview of the storyboard scaffold (`npx hyperframes preview`) — open it only on a yes. Iterate until approved, and carry the preview choice to Step 6. This is a **checkpoint gate** (brief contract § 1): in autonomous mode, post the same summary as a heads-up and proceed — the preview question is asked once, at Step 6.
+After drafting, run the review loop's plan pass — `../hyperframes-core/references/review-loop.md` § 1: open the board (don't ask whether to), present the plan as a proposal, and ask the two questions — approve or change, and **sketches first** (recommended) or skip. Feedback loops through chat or the board's comments file until approved. This is a **checkpoint gate** (brief contract § 1): in autonomous mode there is no board and nothing to ask — post the same summary as a heads-up and proceed; sketches collapse into the build, and the one preview question comes at Step 6.
**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).
@@ -105,7 +99,7 @@ Goal: Generate narration, word timings, music, and audio metadata from the appro
Start 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.)
-**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-use/audio/scripts/heygen-tts.mjs --list` (or `GET /v3/voices?engine=starfish`); **Kokoro** (offline) via the voice table in `../media-use/audio/references/tts.md` (prefixes `am_`/`bm_` male, `af_`/`bf_` female). Omit `--voice` only when the user expressed no preference.
+**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`).
`node <SKILL_DIR>/scripts/audio.mjs --script ./SCRIPT.md --storyboard ./STORYBOARD.md --hyperframes . --out ./audio_meta.json --voice <voice-id> &`
@@ -121,6 +115,8 @@ If there is no narration and no `SCRIPT.md`, skip voice generation. BGM may stil
Goal: Add the visual direction, layout intent, and motion choices to each storyboard frame.
+**Sketch the board first (collaborative only).** The moment the plan is approved, run the sketch pass — `../hyperframes-core/references/review-loop.md` § 2 (don't wait on Step 3.1; sketches don't use timings): wireframe every frame yourself, mark each `built`, pause for the one layout question when the board is full, and revise only the sketches named until the board 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.
+
Edit `STORYBOARD.md` in place. Do not create another storyboard. Use `frame.md` as source of truth for color, type, layout feel, and style.
Read `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.
@@ -129,7 +125,7 @@ For every frame, write a **time-coded shot sequence** into `STORYBOARD.md` per `
Do 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.
-**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.
+**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 board was confirmed.
---
@@ -147,7 +143,7 @@ Duration sync is mechanical: real voice duration wins; silent frames keep estima
Before dispatch, read `sub-agents/frame-worker.md` and `../hyperframes-core/references/subagent-dispatch.md`. Dispatch one sub-agent per frame, in parallel if possible; otherwise run workers in waves. Each worker gets exactly one frame.
-Each worker context must include `PROJECT_DIR`, `frame_id`, canvas size, caption status and keep-out band if captions are enabled, and `RULES_DIR` as the absolute path to this skill's `../hyperframes-animation/rules/`. Each worker reads `frame.md`, its own `## Frame N` block from `STORYBOARD.md`, the local rule recipe (`../hyperframes-animation/rules/<id>.md`) for each cited motion, and the frame's blueprint template (`../hyperframes-animation/blueprints/<id>.md`). Each worker writes only `compositions/frames/NN-*.html`. Workers must never edit `STORYBOARD.md`.
+Each worker context must include `PROJECT_DIR`, `frame_id`, whether the frame has a **confirmed sketch** on disk, canvas size, caption status and keep-out band if captions are enabled, and `RULES_DIR` as the absolute path to this skill's `../hyperframes-animation/rules/`. Each worker reads `frame.md`, its own `## Frame N` block from `STORYBOARD.md`, the confirmed sketch when one exists (keep its layout — frame-worker § When a confirmed sketch exists), the local rule recipe (`../hyperframes-animation/rules/<id>.md`) for each cited motion, and the frame's blueprint template (`../hyperframes-animation/blueprints/<id>.md`). Each worker writes only `compositions/frames/NN-*.html`. Workers must never edit `STORYBOARD.md`.
**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: `sub-agents/frame-worker.md`.)
@@ -161,7 +157,7 @@ After audio timings exist, build captions in the background and assemble the ind
`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.
-**Gate:** every frame is marked `animated`, `index.html` exists, and captions are built or explicitly skipped.
+**Gate:** every frame is marked `animated` (collaborative: the sketch board was confirmed at Step 4), `index.html` exists, and captions are built or explicitly skipped.
---
@@ -179,17 +175,15 @@ Inject transitions, run checks, pause for review, then render.
`npx hyperframes check`
-`npx hyperframes check`
-
`npx hyperframes snapshot --at <frame-midpoints>`
`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.
If 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.
-**Known false-positive — do not chase it.** `inspect` 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.
+**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.
-After checks pass, pause for user review. The video is assembled, viewable, and editable in Studio. Manage preview only once across Step 3 and Step 6: open it if the user asked earlier, offer it if they declined earlier, and do not ask again if they are already reviewing in Studio. In autonomous mode this is the one question the mode keeps: ask "preview first, or render?" — open the preview on yes, render on no — then deliver the MP4 with the contact sheet and the frame ids so revisions can target a single frame.
+After checks pass, pause for user review — the review loop's final look (`../hyperframes-core/references/review-loop.md` § 4): one question, on the Studio that has been open since Step 3 — render now, or what changes? (Autonomous: the one kept question, preview first or render.) Then deliver the MP4 with the contact sheet and the frame ids so revisions can target a single frame.
Preview: `npx hyperframes preview`
@@ -197,9 +191,9 @@ Render only after user approval (autonomous mode: after the preview-or-render qu
`npx hyperframes render --skill=faceless-explainer --quality high --output renders/video.mp4`
-Do not rerun `lint`, `validate`, `inspect`, or `snapshot` after rendering unless the user asks.
+Do not rerun `lint`, `check`, or `snapshot` after rendering unless the user asks.
-**Gate:** `lint`, `validate`, and `inspect` passed 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.
+**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.
---
@@ -215,7 +209,7 @@ The reusable, domain-agnostic shot shapes live in `../hyperframes-animation/blue
| Read | When |
| ----------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------ |
-| `[../hyperframes-core/references/brief-contract.md](../hyperframes-core/references/brief-contract.md)` | Step 0: the interaction mode, brief fields, and how to ask. |
+| `[../hyperframes-core/references/brief-contract.md](../hyperframes-core/references/brief-contract.md)` | Gate types, mode derivation from `BRIEF.md`, field semantics. |
| `[../hyperframes-creative/references/story-spine.md](../hyperframes-creative/references/story-spine.md)` | Step 3: story doctrine — hook language, value-before-evidence, proposal shape. |
| `[../hyperframes-creative/frame-presets/](../hyperframes-creative/frame-presets/)` | Step 2: choose and adopt a frame preset. |
| `[../hyperframes-creative/references/design-spec.md](../hyperframes-creative/references/design-spec.md)` | Step 2: apply brand tokens correctly. |
diff --git a/skills/faceless-explainer/sub-agents/frame-worker.md b/skills/faceless-explainer/sub-agents/frame-worker.md
index 1528410b67..263fe00784 100644
--- a/skills/faceless-explainer/sub-agents/frame-worker.md
+++ b/skills/faceless-explainer/sub-agents/frame-worker.md
@@ -21,10 +21,14 @@
- `../references/cut-catalog.md` — 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.
- Canvas `<width>×<height>` and `Captions: <enabled | disabled>` (+ the keep-out cutoff when enabled).
-**Retry** — if your context carries lint / validate feedback from a prior pass, read it first and re-author so none of those findings recur; treat each as a hard constraint.
+**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.
**OUTPUT** — `compositions/frames/<frame_id>.html`, one self-contained sub-composition. Writing it (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`.
+## When a confirmed sketch exists
+
+In collaborative runs the orchestrator wireframes the board first, so your target file may already exist as the frame's **user-confirmed wireframe** — your dispatch says whether it does (a file found on a retry is your own prior output, not a sketch). Read it 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 full `frame.md` treatment (the sketch is deliberately unstyled), the finished invented visuals where the sketch used plain blocks, 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 wireframe, fully dressed.
+
## You do NOT decide
These belong to other steps — touching them collides with a sibling or breaks an upstream contract:
@@ -50,14 +54,14 @@ Generic seek-safety + structure live in `hyperframes-core` (read it; not restate
## Workflow
-1. **Read** — `hyperframes-core`'s composition contract (the structural law), then `frame.md` (the look) and your `## Frame N` block (the shot sequence + `blueprint:` / `focal:` / `roles:`). **Then read the blueprint template** `../hyperframes-animation/blueprints/<id>.md` (skip if `compose`) for the shot's shape and signature move, and **open the rule recipe `RULES_DIR/<id>.md` for every named motion** in the Scene lines (plus the shared `../hyperframes-animation/examples/<id>.html` when the recipe is unclear): you reproduce these mechanics, not improvise them. 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 `lint` / `validate` / `inspect` can miss the resulting blank sub-composition.
+1. **Read** — `hyperframes-core`'s composition contract (the structural law), then `frame.md` (the look) and your `## Frame N` block (the shot sequence + `blueprint:` / `focal:` / `roles:`). **Then read the blueprint template** `../hyperframes-animation/blueprints/<id>.md` (skip if `compose`) for the shot's shape and signature move, and **open the rule recipe `RULES_DIR/<id>.md` for every named motion** in the Scene lines (plus the shared `../hyperframes-animation/examples/<id>.html` when the recipe is unclear): you reproduce these mechanics, not improvise them. 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.
2. **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 you just read, the blueprint's signature move kept recognizable. Invent the visual elements the Scene lines describe (the diagram, the hero word, the metaphor), and find a visual idea that reinforces the beat, not a literal restyle of the words.
3. **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 — per the core contract.
4. **Self-check, then finish** — re-read your file against the checklist below and fix in place. Writing the file is your terminal action; you do **not** run the CLI.
## Self-check before finishing (you do NOT run the CLI)
-You **can't** meaningfully run `hyperframes lint` / `validate` / `inspect` 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 at **Step 6, 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 (the rules behind them live in `hyperframes-core`):
+You **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 at **Step 6, 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 (the rules behind them live in `hyperframes-core`):
- `missing_template_wrapper` / `missing_composition_id` — root is `<template>`-wrapped and carries `data-composition-id="<frame_id>"`.
- **Template transport** — every `<style>` and `<script>` block, including the GSAP load, lives inside `<template>`.
diff --git a/skills/general-video/SKILL.md b/skills/general-video/SKILL.md
index 75cf8260e2..3b9bf47110 100644
--- a/skills/general-video/SKILL.md
+++ b/skills/general-video/SKILL.md
@@ -1,144 +1,149 @@
---
name: general-video
description: >
- The fallback workflow for authoring or editing any custom HyperFrames composition at any
- length or format — longer / multi-scene pieces, brand and sizzle reels,
- montages, title cards, static loops, freeform builds. Use only when no
- specialized workflow fits the input; routing table at /hyperframes.
-metadata: { "tags": "orchestrator, general-video, fallback, freeform, composition-authoring" }
+ Author or edit a custom HyperFrames composition when no specialized workflow fits, or when
+ BRIEF.md sets flow: companion. Use for longer or multi-scene pieces, brand and sizzle reels,
+ montages, static loops, static title cards, footage remixes, and freeform builds. Use
+ motion-graphics instead for a short unnarrated motion-first unit, including an animated title.
+ Route fresh creation through hyperframes before using this skill.
---
-> **First, keep this skill fresh — run silently, don't ask:** `npx hyperframes skills update general-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.
+# General video
-> **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.
+Before relying on this workflow, run:
-> **figma source**: If any input is a figma.com URL, run `/figma` first — asset export, brand tokens, and components/storyboard reconstruction if needed — then build 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.
+```bash
+npx hyperframes skills update general-video
+```
-# general-video — general video workflow
+A successful no-op means the skill is current. Surface an update failure instead of continuing from memory.
-> **Confirm the route before you build.** This is the **fallback** for custom composition authoring. If the input clearly fits a specialized workflow, prefer it: marketed product → `/product-launch-video`; general site → `/website-to-video`; topic explainer → `/faceless-explainer`; GitHub PR → `/pr-to-video`; existing footage → `/embedded-captions` · `/talking-head-recut`; short unnarrated motion graphic → `/motion-graphics`; Remotion port → `/remotion-to-hyperframes`. **Out of scope**: live / at-render-time data, NLE-style editing of a finished video, or producing footage HyperFrames can't capture. Unsure? **Read `/hyperframes` first.**
+## 1. Apply cross-cutting source adapters
-**Build exactly what was asked.** A title card is a title card — not a title card + three supporting scenes + ambient music + captions. If extra scenes or elements would genuinely improve the piece, _propose_ them; don't add them silently. For small edits (fix a color, adjust one duration, add one element), skip the planning steps and go straight to the build.
+- **Media:** For any audio, image, icon, logo, voice, grade, LUT, caption, or media-operation need, load `/media-use` and follow its adoption, resolution, provider, provenance, and reuse contracts. Before the first authenticated provider action, run `npx hyperframes auth status` and relay its output verbatim. If signed out, apply the gate in `../hyperframes-core/references/brief-contract.md`: collaborative waits for sign-in or an explicit offline choice; autonomous states the status and continues through an available offline provider. Surface a blocker when no offline provider can satisfy a required capability. Local adoption alone does not require an auth gate.
+- **Figma:** If any input is a `figma.com` URL, run `/figma` first. Build from its exported assets, tokens, components, or storyboard frames. Do not use raw Figma MCP calls because they skip SVG sanitization, media provenance, and brand-token binding.
-## Approach
+These adapters do not change the workflow selected by `/hyperframes`.
-### Discovery — open-ended requests only
+## 2. Start from project state
-For vague, exploratory requests ("make something for our brand", "a cool intro") — understand intent before picking colors:
+Apply the first matching row; do not evaluate lower state rows:
-- **Audience** — who watches? developers / executives / general consumers?
-- **Platform** — where does it play? social (15s) / website hero / product demo / internal?
-- **Priority** — what matters most? motion quality / content accuracy / brand fidelity / speed?
-- **Variations** — one best shot, or 2-3 meaningfully different options (different pacing, energy, or structure — not just color swaps)?
+| State | Action |
+| ---------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- |
+| Specific edit | Make the edit, preserve existing project decisions, then rerun affected checks. Do not reopen discovery. |
+| `BRIEF.md` exists | Read it. If `workflow` names another workflow and `flow` is not `companion`, hand off. Ask no brief questions. |
+| No brief, but `hyperframes.json` or `STORYBOARD.md` exists | Resume from files and recorded preferences. Backfill `BRIEF.md` only from known facts. |
+| Fresh creation | Run `/hyperframes` and its intent layer. Return here only for `workflow: general-video` or `flow: companion`. |
-For specific requests ("add a title card", "fix the timing on scene 3"), skip discovery. If the request carries an ongoing autonomous signal ("surprise me", "just build it" — `hyperframes-core/references/brief-contract.md` § 1), skip discovery too: default to one best shot and state your calls with one-line receipts as you make them.
+For a new project, choose a kebab-case directory name from the brief and scaffold before writing the brief:
-### Step 1 — Design system → `hyperframes-creative`
+```bash
+npx hyperframes init "videos/<project>" --non-interactive --example=blank
+```
-Establish the visual identity first. If the project has a design spec, read it (precedence `frame.md` → `design.md` → `DESIGN.md`; treat it as brand truth — exact colors, fonts, constraints).
+Then write `BRIEF.md` at the project root using `../hyperframes-core/references/brief-format.md`. In an existing project, the root is the directory containing `hyperframes.json`. Record only the confirmed preference-backed fields named by the brief format, using `node <MEDIA_DIR>/scripts/prefs.mjs record --hyperframes <PROJECT_ROOT>`; never record inferred defaults. Here `<MEDIA_DIR>` is the installed `/media-use` skill directory and `<PROJECT_ROOT>` is the directory containing `hyperframes.json`. If the intent layer adopted a recipe, apply it now with `node <MEDIA_DIR>/scripts/recipe.mjs use --hyperframes <PROJECT_ROOT> --name <name>` and do not ask again.
-**If no spec exists, you MUST read BOTH `hyperframes-creative/references/house-style.md` AND `hyperframes-creative/references/video-composition.md` before choosing any color or font.** `house-style.md` gives the "interpret the prompt / generate real content" opener, lazy-default list, and layer recipe; `video-composition.md` gives the video-medium density / scale / **foreground detailing** (data bars, registration marks, monospace metadata, "8-10 elements, two the user didn't ask for") that separates "produced" from "generated." Reading only one is the most common miss — `video-composition.md` is the one agents skip, and it is exactly the one that prevents flat, centered, web-page-looking output. Do not self-invent a palette and skip these; crossing into `hyperframes-creative` is mandatory here, not an optional branch. From there, also pull a named style/mood → `references/visual-styles.md`, or the interactive picker → `references/design-picker.md`, as needed. The spec/style defines the **brand**, not the composition rules.
+## 3. Interpret the run shape
-**Find the angle (vague brief, no spec):** before picking colors, write ONE sentence — what does this name/word/topic evoke, and what visual _world_ (metaphor, setting, instrument, motif) expresses it? E.g. a cybersecurity tool → vault doors / perimeter scan lines / lock tumblers; a meditation app → tide, breath, slow light bloom. Read the _meaning_ of the subject, not just its letters; pick a concrete angle over a literal restyle. This is the cheap substitute for prompt expansion (Step 2) on single-scene pieces, where expansion is correctly skipped — and it is the difference between a designed concept and a generic logo-on-a-gradient.
+Use only the canonical terms from `../hyperframes-core/references/brief-contract.md`:
-<HARD-GATE>
-Before writing ANY composition HTML, verify you have ALL FOUR:
-1. **A visual identity** grounded in the spec or `house-style.md` — not invented on the spot. (Reaching for `#333`, `#3b82f6`, or `Roboto`? You skipped it.)
-2. **A one-sentence concept angle** (the "find the angle" step) for anything beyond a trivial edit — not a literal restyle of the prompt words.
-3. **A font pairing from the embed list** (`hyperframes-creative/references/typography.md` → "Fonts that embed") chosen on purpose — not `Inter`/`Helvetica Neue`/`system-ui` by default, and never an un-embedded display font you're just hoping renders (un-bundled names embed only if auto-captured locally — and cloud renders won't capture them).
-4. **A foreground/density plan from `video-composition.md`** — the anchor-to-edges, 8-10-elements, foreground-metadata, background-texture rules. (Centered stack on a flat color with fewer than ~6 elements and no edge-anchored detail? You skipped it — that is the generic tell.)
-</HARD-GATE>
+| Field | Meaning | Effect |
+| -------------- | ------------------------------------- | ----------------------------------------------------------------------------------- |
+| `flow` | Who drives | `automation`: choose and execute the route. `companion`: co-create in conversation. |
+| `storyboard` | Whether the board is a review surface | `yes`: run plan and sketch review. `no`: build without the board. |
+| derived `mode` | How checkpoint gates behave | Follow the brief contract. Never ask the user to name a mode. |
-### Step 2 — Prompt expansion → `hyperframes-creative`
+Do not invent synonyms for these states. An ongoing “just build it” signal is handled by the intent layer and arrives as `flow: automation`, `storyboard: no`.
-Run for every multi-scene composition (skip for single-scene pieces and trivial edits). Ground the request against the design spec + house style into a consistent intermediate that downstream work reads the same way. See `hyperframes-creative/references/prompt-expansion.md`.
+- For `flow: automation`, choose the route and state it in one line in the first progress update.
+- For a specific edit, make the edit without inventing a new route.
-### Step 3 — Plan
+### Companion flow
-Before writing HTML, think at a high level:
+When `flow: companion`:
-1. **What** — the viewer experience: narrative arc, key moments, emotional beats. For a narrated story piece, follow `hyperframes-creative/references/story-spine.md` — hook in viewer-outcome language, the message landing by beat 2, evidence after.
-2. **Structure** — how many compositions, sub-comp vs inline, which tracks carry video / audio / overlays / captions. For the monolithic-single-file vs modular-sub-comp call, see `hyperframes-core/references/composition-patterns.md` § Two Architectures (rule of thumb: ≥3 hard scene cuts, or any reused scene → modularize; a short single-scene piece stays one file).
-3. **Rhythm** — name the pattern before implementing (e.g. `fast-fast-SLOW-SHADER-hold`); see `hyperframes-creative/references/beat-direction.md`.
-4. **Timing** — which clips drive duration, where transitions land, the pacing.
-5. **Layout** — build the end state first (see below).
-6. **Animate** — then add motion via `hyperframes-animation`.
+- Read `BRIEF.md` and reconcile accepted `## Assets` and `## Customizations` with project artifacts. Complete accepted work that is still pending; leave completed work alone; do not offer an accepted capability again as if it were new.
+- **Arrive as the director, not the contractor.** A user who chose companion chose involvement and quality; the honest response is the best version you can design, not the smallest one you can defend. The first plan is the ceiling treatment: the story arc (borrow the nearest genre lens — menu § Genre lenses), the design spec, each scene's motion treatment cited by name (§ 5's plan discipline), the transitions, the audio identity — music and sound marks, or deliberate silence — the user's material placed, and a designed open and close. Say what each layer adds in one line; flag the expensive ones (render time, sign-in, billing) as you name them. The user trims a treatment down; they should never have to assemble one approval by approval.
+- **The ceiling belongs to the concept, not the toolbox.** Every layer must serve the brief's message — a treatment that would dress any video the same way is decoration. Craft rises to the ceiling; content never grows past what was asked (§ 6).
+- Between checkpoints, `../hyperframes/references/capability-menu.md` works two ways. As the trigger list: offer a relevant capability when the user mentions its input or the build reaches its need. 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 ("scene 3's stat wants the count-up treatment"). Read it before offering; never dump the full catalog.
+- After the user accepts a capability, produce its artifact and record the decision in the matching `BRIEF.md` body section immediately. Rewrite a frontmatter field and record the confirmed preference only when the user explicitly changes it.
+- Keep the same storyboard, validation, final-preview, and render-approval gates. Companion changes who steers, not what quality requires.
-## Layout Before Animation
+## 4. Load required knowledge before each stage
-Position every element where it sits at its **most visible moment** — fully entered, correctly placed, not yet exiting. Write that as static HTML + CSS first. **No GSAP yet.**
+These reads are mandatory when their condition matches:
-**Why:** if you position elements at their animated start state (offscreen, scaled to 0, opacity 0) and tween to where you _think_ they land, you are guessing the final layout — overlaps stay invisible until render. Build the end state first and you see and fix layout problems before adding motion.
+| Condition | Read before acting |
+| ----------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| Any composition HTML or scene layout | `/hyperframes-core`; use `references/determinism-rules.md` for its layout contract |
+| Any non-trivial creation or visual treatment | `/hyperframes-creative` → `references/house-style.md` and `references/video-composition.md` |
+| Any motion, animation, or scene transition | `/hyperframes-animation`; follow its routing to the matching rules, adapters, blueprints, or transition references |
+| `storyboard: yes` | `../hyperframes-core/references/storyboard-format.md` and `../hyperframes-core/references/review-loop.md` |
+| Any media asset or operation, including narration, BGM, SFX, captions, grading, or transforms | `/media-use`; for framework playback and placement also read `/hyperframes-core` → `references/variables-and-media.md` |
+| Multi-scene assembly | `../hyperframes-core/references/production-loop.md` |
+| `flow: companion`, before the first plan | `/hyperframes-creative` → `references/story-spine.md` and `references/house-style.md`; the nearest genre lens and the full `../hyperframes/references/capability-menu.md` — the ceiling treatment is designed from these, not recalled |
+| A companion capability offer, capture, beat grid, generative video, map, publishing, or cross-workflow capability | `../hyperframes/references/capability-menu.md` |
+| A design spec exists, before final approval | `/hyperframes-creative` → `references/design-adherence.md` |
-1. **Identify the hero frame** for each scene — the moment the most elements are simultaneously visible. That is the layout you build.
-2. **Write static CSS** for that frame. The content container must fill the scene with padding, not absolute offsets:
+Do not replace these reads with recollection. Progressive disclosure saves context only when the matching reference is actually loaded.
-```css
-.scene-content {
- display: flex;
- flex-direction: column;
- justify-content: center;
- width: 100%;
- height: 100%;
- padding: 120px 160px; /* padding positions content; fills any scene size */
- gap: 24px;
- box-sizing: border-box;
-}
-```
+## 5. Execute the composition
-Never use `position: absolute; top: Npx` on a content container — it overflows when content is taller than the space. Reserve absolute positioning for decoratives.
+Use this dependency order. Skip a stage only when its input is absent.
-> ⚠ **The `width/height: 100%` above only resolves if every ancestor has a resolved height.** The root `<div data-composition-id>` and any wrapper between it and `.scene-content` must be sized (`position: relative; width: 1920px; height: 1080px` on the root — see `hyperframes-core` → "Root must be sized"). Skip this and the flex container collapses to ~0, content piles into the **top-left corner**, and the first glyph clips at x=0 — while `lint`/`inspect` still report 0 issues. And **always keep the `padding`** (≥80px) on `.scene-content`: it is the title-safe margin. Never replace it with bare `gap`.
+1. **Plan.** State the viewer arc, structure, rhythm, and duration driver. Use one file for a short single scene; use sub-compositions for three or more hard scene cuts or any reused scene. Read `/hyperframes-creative` → `references/story-spine.md` for narrated arcs, `references/beat-direction.md` for rhythm, and `/hyperframes-core` → `references/composition-patterns.md` for structure. For an open-ended multi-scene brief, expand the prompt through `/hyperframes-creative` → `references/prompt-expansion.md`. A multi-scene plan cites each scene's shape: a blueprint id from `/hyperframes-animation` → `blueprints-index.md` when one fits, or the named rules it composes from `rules-index.md` when none does — motion names come from those indexes, never invented. Story truth decides which scenes exist; the citation dresses them.
+2. **Review the plan when requested.** For `storyboard: yes`, write one `## Frame N` per scene with `status: outline` and a declared `src`, then run the shared review loop. For `storyboard: no`, continue without opening the board.
+3. **Resolve dependencies.** Install registry blocks before parallel work. Stage user assets, adopt existing media, and resolve only what the brief requires. Start audio early when its timings drive duration.
+4. **Build static hero layouts.** Implement every scene at its most visible moment before adding motion. The confirmed wireframe, when present, is this end state and must not be redrawn. Follow `/hyperframes-core` for the layout contract.
+5. **Animate.** Build each scene from its cited blueprint or rules: read the full recipe body (`/hyperframes-animation` → `blueprints/<id>.md`, `rules/<id>.md`) before writing its motion, and keep to it. Use `/hyperframes-animation` for runtime adapters and scene transitions. Keep animation details in that owning skill rather than re-defining them here.
+6. **Assemble.** Mount scenes, media, transitions, captions, and audio using the production loop. Real voice duration overrides estimates.
+7. **Verify.** Use `npx hyperframes lint` for fast feedback after the first HTML pass and structural changes. For the final gate, run `npx hyperframes check`; it reruns lint internally, so do not run a redundant standalone lint immediately before it. For sub-compositions, inspect midpoint snapshots. For multi-scene work, review the animation map.
+8. **Final approval.** Open the final Studio preview only after checks pass. Ask whether to render or revise. Render only after approval.
-3. **Add entrances** — animate FROM offscreen/invisible TO the CSS position with `gsap.from()` (in sub-compositions prefer `gsap.fromTo()` so the start state is explicit; see `hyperframes-core/references/sub-compositions.md`). The CSS position is ground truth; the tween is the journey to it.
-4. **Exits are transition-handled** — per the scene-transition rules in `hyperframes-animation/transitions/`, only the **final** scene animates elements out; between scenes the transition IS the exit.
+## 6. Gates that always apply
-**Shared space across time:** if element A exits before element B enters in the same area, both still need correct CSS positions for their respective hero frames — timeline ordering keeps them from coexisting, and the layout step catches accidental overlap. Layered glows/shadows and z-stacked depth are _intentional_ overlap; the step is about catching _unintentional_ collisions (two headlines on top of each other, content bleeding off-frame).
+### Keep scope exact
-## Build — delegate to the domain skills
+Build what the user asked for. A title card is not a title card plus three scenes, music, and captions. Offer additions before adding them.
-This maps the skill's full surface (see the `description`) to its references — non-exhaustive; when an intent isn't listed, route through `hyperframes-creative` (look/concept), `hyperframes-animation` (motion), `hyperframes-core` (contract), `media-use` (audio/captions). **The first row is ADDITIVE — read it AND your intent row, not one or the other.**
+### Establish design before HTML
-| Building… | Read first (in order) |
-| --------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| **ALWAYS — every non-trivial piece, on top of your intent row below** | `hyperframes-creative/references/house-style.md` + `references/video-composition.md` (also gated in Step 1 / HARD-GATE; the "produced, not generated" foreground detailing) |
-| **Kinetic typography / text-forward** | `hyperframes-animation/techniques.md` (kinetic type) + `adapters/gsap-easing-and-stagger.md` + `rules/kinetic-beat-slam.md` |
-| **Title card / lower-third / overlay / PiP / text-behind-subject** | `hyperframes-creative/references/composition-patterns.md` + (for the centered/sized frame) `hyperframes-core` → "Root must be sized" |
-| **Logo / brand-mark reveal** | `hyperframes-animation/rules/svg-path-draw.md` (draw-on) + `rules/3d-text-depth-layers.md` + `rules/scale-swap-transition.md` |
-| **Data / stats / numbers** | `hyperframes-animation/rules/counting-dynamic-scale.md` + `rules/stat-bars-and-fills.md` + `hyperframes-creative/references/data-in-motion.md` |
-| **Product / app / UI demo** | `hyperframes-animation/rules/3d-page-scroll.md` + `rules/cursor-click-ripple.md` + `rules/press-release-spring.md` |
-| **Audio-reactive / music-driven** | `hyperframes-creative/references/audio-reactive.md` (pre-extract bands; map to motion) |
-| **Narrated / voiceover / music / SFX / captions** | `media-use` → the shared audio engine `scripts/audio.mjs` (one call = TTS + BGM + SFX → `audio_meta.json`); caption authoring + asset placement via `hyperframes-core`. See **Audio** below. |
-| **Multi-scene / transitions** | `hyperframes-animation/transitions/overview.md` **then** `transitions/catalog.md` (you are not done after the overview — the GSAP recipe is in the catalog) |
-| **Modular / sub-compositions** | `hyperframes-core/references/composition-patterns.md` + `references/sub-compositions.md` |
+Resolve the design source in this order: `frame.md` → `design.md` → `DESIGN.md`. Treat the first file found as brand truth.
-### Audio: one engine (TTS · BGM · SFX)
+When no design spec exists, complete all four items before writing composition HTML:
-Only when the piece calls for it (per "build exactly what was asked" — no ambient music on a title card). Don't hand-roll TTS or vendor a copy: write a neutral `audio_request.json` and call the shared engine in `media-use`. It auto-degrades on one switch — HeyGen credential present → HeyGen TTS + music/SFX **retrieval**; absent → ElevenLabs/Kokoro TTS, Lyria/MusicGen BGM **generation**, and the bundled SFX library. Full flag list + request/meta schema: the header comment of `media-use/audio/scripts/audio.mjs`.
+1. Ground the visual identity in `house-style.md` and `video-composition.md`.
+2. Write one sentence naming the concept angle for every non-trivial creation.
+3. Choose an embeddable font pairing from `/hyperframes-creative` → `references/typography.md`; do not assume an unbundled display font exists in cloud rendering.
+4. Define the focal element, edge anchors, supporting detail, and background treatment.
-```jsonc
-// audio_request.json — one line per narrated segment; `id` is yours (joins audio_meta back)
-{
- "lines": [
- { "id": "s1", "text": "Your opening line.", "sfx": ["whoosh"] },
- { "id": "s2", "text": "The next beat." },
- ],
- "bgm": { "query": "calm cinematic underscore" }, // omit "mode" → auto (retrieve if HeyGen, else generate); "none" to disable
-}
-```
+Match density to the requested format and message. Density examples are guidance for produced frames, not permission to invent claims, scenes, or a fixed number of elements.
-```bash
-# <MEDIA_DIR> = the installed media-use skill dir (sibling of this skill)
-node <MEDIA_DIR>/scripts/audio.mjs --request ./audio_request.json --hyperframes . --out ./audio_meta.json
-```
+For a named style or mood, read `/hyperframes-creative` → `references/visual-styles.md`. When the user needs to choose visually and no shipped preset fits, read `/hyperframes-creative` → `references/design-picker.md` and run the interactive design selection there.
+
+### Preserve the composition contract
+
+Timed elements use `class="clip"`; the root and relevant ancestors are sized; each composition registers one paused, seek-safe timeline on `window.__timelines`; rendering is deterministic. Do not use render-time network fetches, clocks, or unseeded randomness.
+
+### Borrow workflows safely
+
+When the piece resembles a shipped workflow, borrow its genre references as examples. First run `npx hyperframes skills update <workflow-name>`. Borrow its story shape and taste, not its private scripts, pipeline state, or directory contract. The generic build remains owned by this skill.
+
+## 7. Done
-Then read `audio_meta.json`: mount each `voices[].path` + (`bgm.path`, `sfx[]`) as `<audio>` tracks and use `voices[].words` for captions, all per `hyperframes-core` (audio tracks + caption authoring). If BGM took the generate path (`bgm_pending: true`), run `media-use/audio/scripts/wait-bgm.mjs` before final render.
+A run is complete only when:
-## Output checklist → `hyperframes-cli`
+- requested scope is implemented;
+- for `flow: companion`, the treatment is delivered, not just the scope: every scene's cited blueprint or rules realized, the audio identity present (or the silence chosen and said), the open and close designed rather than defaulted;
+- `npx hyperframes check` passes, including its built-in lint stage;
+- design adherence is reviewed against `/hyperframes-creative` → `references/design-adherence.md` when a design spec exists;
+- contrast findings are resolved;
+- sub-composition snapshots are inspected when applicable;
+- an autonomous handoff includes an inspected contact or snapshot sheet; multi-scene sheets use scene midpoints;
+- the handoff names the final preview or rendered artifact as applicable and reports the actual duration for a time-based deliverable;
+- `hyperframes-animation/scripts/animation-map.mjs` is reviewed for multi-scene work;
+- the user approves the final Studio preview before render;
+- the rendered file is verified when a render was requested.
-- [ ] `npx hyperframes check` pass (block on results)
-- [ ] design adherence verified if a spec (`frame.md` / `design.md`) exists — checklist in `hyperframes-creative/references/design-adherence.md`
-- [ ] `npx hyperframes check` passes, or every overflow is intentionally marked
-- [ ] contrast warnings addressed; for multi-scene work, review the animation map (`hyperframes-animation/scripts/animation-map.mjs`)
-- [ ] deliver the preview; render to MP4 only on explicit request
-- [ ] surface the preview **only at handoff** (it is the stable, final preview); don't pop one mid-build — build-phase snapshots are headless
+After final approval, offer once to freeze the run as a recipe, following `../hyperframes-core/references/review-loop.md` § 4.
diff --git a/skills/hyperframes-animation/SKILL.md b/skills/hyperframes-animation/SKILL.md
index ec16c08336..00aaaeed5c 100644
--- a/skills/hyperframes-animation/SKILL.md
+++ b/skills/hyperframes-animation/SKILL.md
@@ -59,7 +59,7 @@ Multiple runtimes can coexist in one composition. Each registers its instances o
## Critical Constraints
-**Prerequisite: `hyperframes-core` → Non-Negotiable Rules** (single paused timeline, `data-duration` governs length, no `Math.random` / `Date.now` / `performance.now`, no `repeat: -1`, no `gsap.set` on later-scene clips, no `display` / `visibility` animation, no timeline construction inside `async` / `setTimeout` / `Promise`). Don't restate those here.
+**Prerequisite: `hyperframes-core` → Non-Negotiable Rules** (single paused timeline, `data-duration` governs length, no `Math.random` / `Date.now` / `performance.now`, no `repeat: -1`, no page-load `gsap.set` on later-scene clips, no `display` or raw `visibility` tweens, and no timeline construction inside `async` / `setTimeout` / `Promise`). GSAP `autoAlpha` and zero-duration visibility sets at explicit timeline boundaries remain allowed by core. Use those exceptions only on non-clip elements or wrappers inside a clip; the framework owns `.clip` lifecycle. Don't restate the full contract here.
Animation-craft additions on top of core's contract:
@@ -81,4 +81,4 @@ Reads every GSAP timeline registered on `window.__timelines`, enumerates tweens,
- `hyperframes-core` — composition structure, data attributes, sub-compositions, deterministic render contract
- `hyperframes-creative` — palettes, typography, narration, beat planning (non-animation creative direction)
-- `hyperframes-cli` — `npx hyperframes lint / validate / inspect / preview / render`
+- `hyperframes-cli` — `npx hyperframes lint / check / snapshot / preview / render`
diff --git a/skills/hyperframes-animation/adapters/gsap-transforms-and-perf.md b/skills/hyperframes-animation/adapters/gsap-transforms-and-perf.md
index cc932de898..7d6274a271 100644
--- a/skills/hyperframes-animation/adapters/gsap-transforms-and-perf.md
+++ b/skills/hyperframes-animation/adapters/gsap-transforms-and-perf.md
@@ -24,7 +24,7 @@ Prefer `autoAlpha` over `opacity` for show/hide:
gsap.to(".panel", { autoAlpha: 0, duration: 0.4 });
```
-`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`.
+`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`.
## clearProps
diff --git a/skills/hyperframes-animation/adapters/gsap.md b/skills/hyperframes-animation/adapters/gsap.md
index 014da7b186..d47b3d0df6 100644
--- a/skills/hyperframes-animation/adapters/gsap.md
+++ b/skills/hyperframes-animation/adapters/gsap.md
@@ -62,7 +62,7 @@ HyperFrames is stricter than vanilla GSAP. Animate only:
- **Visual fills**: `color`, `backgroundColor`, `borderColor`, `borderRadius`
- **CSS variables**: `"--hue": 180` etc.
- **Media `volume`** (on `<audio>` / `<video>`): animate for fades/ducking, e.g. `tl.to("#bgm", { volume: 0, duration: 1 }, "outro")`. The runtime probes these keyframes from the timeline and drives them in both preview and render (they match). This sets the _author_ volume; `data-volume` is the static baseline when no tween touches the element.
-- **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 when you must also drive font-size, locale formatting (`toLocaleString`), or a suffix in the same tween.
+- **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.
**Avoid** (use the transform alias instead):
@@ -70,7 +70,7 @@ HyperFrames is stricter than vanilla GSAP. Animate only:
**Forbidden** (breaks the renderer or the clip lifecycle):
-- `display`, `visibility` — never tween these directly. Use `autoAlpha` (sets opacity + visibility together at endpoints, doesn't tween the discrete property).
+- `display`, raw `visibility` — never duration-tween these directly. Use `autoAlpha` (opacity plus endpoint visibility) or a zero-duration timeline set at an explicit boundary, and only on a non-clip element or wrapper inside a clip. Never target `.clip` itself.
- Anything driven by `Math.random()`, `Date.now()`, `performance.now()`, or event handlers — animation state must be deterministic from time alone.
> **Note**: `docs/guides/gsap-animation.mdx` lists `width`/`height`/`visibility` in its "Supported Properties" — that list is too permissive for HyperFrames composition rules. This allowlist is the canonical one. See `hyperframes-core/references/determinism-rules.md` for the full deterministic-render contract.
diff --git a/skills/hyperframes-animation/blueprints/dataviz-countup.md b/skills/hyperframes-animation/blueprints/dataviz-countup.md
index 6b61b4d8c2..cd2aec3301 100644
--- a/skills/hyperframes-animation/blueprints/dataviz-countup.md
+++ b/skills/hyperframes-animation/blueprints/dataviz-countup.md
@@ -10,22 +10,20 @@
**duration**: ~4–12s (Hook ~4s · Product_Intro ~6s · Problem ~11–12s)
-**shot structure**
-Data-viz field on `[bg color]` (dark or light, soft corner glows); `[gradient A→B]` brand stroke on charts/rings; clean sans-serif white/dark text; a continuous camera move runs underneath that traverses 2–3 data instruments and resolves on a hero metric. One instrument per beat; the camera carries the cut.
+**shot structure** Data-viz field on `[bg color]` (dark or light, soft corner glows); `[gradient A→B]` brand stroke on charts/rings; clean sans-serif white/dark text; a continuous camera move runs underneath that traverses 2–3 data instruments and resolves on a hero metric. One instrument per beat; the camera carries the cut.
-- Scene 1 (0.0–Xs): the first data instrument establishes centered — a `[stat]` reads as the hero. A bold center number COUNTS UP `[start]`→`[end]` (font-size growing with the value), with `[stat label]` below; its paired graphic (a circular progress RING sweeping to `[pct]` with a `[gradient]` stroke, or a bar/fill) animates in on the SAME ease so number + graphic land as one beat. Supporting `[avatar/object]` elements pop in with spring overshoot into a scattered glowing orbit; a `[headline]` fades up. A very slow continuous camera zoom-in runs throughout.
+- Scene 1 (0.0–Xs): the first data instrument establishes centered — a `[stat]` reads as the hero. A bold center number COUNTS UP `[start]`→`[end]` while its transform scale grows to the static final type size, with `[stat label]` below; its paired graphic (a circular progress RING sweeping to `[pct]` with a `[gradient]` stroke, or a bar/fill) animates in on the SAME ease so number + graphic land as one beat. Supporting `[avatar/object]` elements pop in with spring overshoot into a scattered glowing orbit; a `[headline]` fades up. A very slow continuous camera zoom-in runs throughout.
- Scene 2 (Xs–Ys): the camera traverses to the next instrument and that instrument animates — a `[gradient]` trend line / area chart DRAWS left→right on grid lines (Problem), or off-center cards SCROLL away as the layout glides (Product_Intro). The arriving `[stat-2]` number counts up / the chart resolves.
- Scene 3 / Scene N (…–end): the camera lands the `[hero metric card]` (big number + label + delta + rising chart) in dead-center; a soft `[accent]` glow blooms behind it; the move reaches its peak then eases to a settled, slightly wider composition with the hero centered and supporting cards flanking it. HOLD on the final frame.
- Variant — Problem (push-THROUGH, count-up → trend → grid): Scene 1 is a centered circular progress ring + count-up center number with scattered glowing `[avatar/object]` orbit. Scene 2 is a fast camera PUSH-IN straight through the center of the ring (ring, number, orbiting elements scale up and fly out of frame) into a rounded `[card]` holding `[stat-2 header]` over a `[gradient]` line chart with grid lines + translucent area fill that draws left→right; camera pushes through then settles. Scene 3: camera PANS to a second `[card]` whose number counts up, holding a grid of the `[avatar/object]` elements — a subset dim/blur while the rest receive `[accent]` circular checkmark badges that SPRING-POP; camera settles to the end. The traversal is z-depth push-through between instruments.
- Variant — Product_Intro (scroll-to-hero + word-by-word tagline): a brief opener — Scene 0 (~0.0–0.85s): a full-frame `[hero-color orb]` with a bold white `[hook phrase]` over it; static shimmer, then HARD CUT. Scene 1 cuts to a slightly perspective-TILTED grid of `[data-viz / product cards]` (charts, heatmaps, stat cards with deltas + source footers) with `[tagline word 1]` centered; the grid begins SCROLLING (e.g. toward upper-left) with its tilt held. Scene 2: the grid keeps scrolling so the `[hero metric card]` glides into dead-center as off-center cards slide away; `[tagline word 1]` translates out and `[word 2]` rises in from a frame edge. Scene 3: hero card settles centered, `[accent]` glow blooms behind it, camera PUSHES IN slightly; `[word 2]` holds near it. Scene 4: `[word 2]` slides out, the final `[tagline word]` drops in from the opposite edge above the still-glowing hero, push-in peaks. Scene 5: overlay type clears, camera eases BACK OUT to a settled wider tilted composition — hero centered with glow, supporting cards flanking. The traversal is a hands-off camera SCROLL across a tilted card plane (no cursor, no clicks) + a one-word-at-a-time kinetic headline + push-in-then-out bookend.
-**motion vocabulary**
-count-up number with font-size growing on the value; circular progress-ring sweep; growth bar / progress fill; gradient trend-line + area-fill left→right draw; spring-overshoot pop-in of scattered glowing avatar/object elements; perspective-tilted card grid; directional grid scroll (cards glide in/out of center); hero-card centering; soft accent glow bloom behind the hero; slow continuous zoom-in; fast camera push-IN / push-THROUGH the center of an instrument; lateral/vertical camera pan between cards; gentle push-in that peaks then eases back out to a wider settle; selective dim/blur of a subset + spring-pop checkmark badges; full-frame hook orb → hard cut; kinetic tagline assembled word-by-word (each word drops/rises from a frame edge, prior word slides out).
+**motion vocabulary** count-up number with transform-scale growth on the value; circular progress-ring sweep; growth bar / progress fill; gradient trend-line + area-fill left→right draw; spring-overshoot pop-in of scattered glowing avatar/object elements; perspective-tilted card grid; directional grid scroll (cards glide in/out of center); hero-card centering; soft accent glow bloom behind the hero; slow continuous zoom-in; fast camera push-IN / push-THROUGH the center of an instrument; lateral/vertical camera pan between cards; gentle push-in that peaks then eases back out to a wider settle; selective dim/blur of a subset + spring-pop checkmark badges; full-frame hook orb → hard cut; kinetic tagline assembled word-by-word (each word drops/rises from a frame edge, prior word slides out).
**rule mapping** (motion verb → `rules/<id>.md`)
-- count-up number whose font-size grows with the value → `counting-dynamic-scale` (primary text rule)
+- count-up number whose transform scale grows with the value → `counting-dynamic-scale` (primary text rule)
- circular progress-ring sweep (the ring fill) → `stat-bars-and-fills` (ring form) — its draw mechanics delegate to → `svg-path-draw`
- growth bars / progress fill paired beside a number → `stat-bars-and-fills` (primary data rule)
- gradient trend-line / area-chart left→right draw → `svg-path-draw` (a path/line draws itself)
diff --git a/skills/hyperframes-animation/blueprints/device-surface-showcase.md b/skills/hyperframes-animation/blueprints/device-surface-showcase.md
index b3c6d6fd6c..53adaa0e3d 100644
--- a/skills/hyperframes-animation/blueprints/device-surface-showcase.md
+++ b/skills/hyperframes-animation/blueprints/device-surface-showcase.md
@@ -9,8 +9,7 @@
**duration**: 5–9.6s (page-scroll-spotlight 5–9s · floating-window 7.8s · 3d-hand 7.9s · device-tour 9.6s)
-**shot structure**
-One product surface — a `[device mockup]` or a `[floating browser/app window]` — is the persistent hero on a `[styled backdrop: gradient / radial / stylized 3D void]`; its `[screens/sections]` cycle through a real `[product flow]` while a showcase camera (static-hold, push-in→zoom-out, or one continuous push) presents it. Each screen state holds ~1.0–1.5s.
+**shot structure** One product surface — a `[device mockup]` or a `[floating browser/app window]` — is the persistent hero on a `[styled backdrop: gradient / radial / stylized 3D void]`; its `[screens/sections]` cycle through a real `[product flow]` while a showcase camera (static-hold, push-in→zoom-out, or one continuous push) presents it. Each screen state holds ~1.0–1.5s.
- Scene 1 (0.0–~1.5s): The surface ESTABLISHES — it `[slides in from an edge / drifts in from a tilt / dissolves from a full-frame title card]` and settles, with a `[accent shape or backdrop]` resolving behind it; the first `[screen]` is visible. The showcase camera begins (see variants).
- Scene 2 (~1.5–~Xs): The surface is OPERATED on its own face — a `[tap/select/scroll]` triggers the first screen advance: old content `[pushes out / scrolls up]`, new `[screen/section]` `[pulls up / pushes in from the side]`; concurrently a `[label / header word / side headline]` updates. The camera continues its move.
@@ -20,8 +19,7 @@ One product surface — a `[device mockup]` or a `[floating browser/app window]`
- Variant — floating-window (key-feature-floating-window-scroll, 7.8s): OPENS on a full-frame `[title card]` (a small `[icon]` draws in at center, `[feature name]` below; holds ~2s), which DISSOLVES to a `[macOS-style browser/app window]` floating on a `[vivid gradient]` (traffic-lights + `[URL pill]` + tabs; left nav, central content, right `[sidebar]`). Camera PUSHES IN on a `[target region/sidebar]` (active item highlighted `[accent]`, a cursor drifts down the list), then ZOOMS BACK OUT to re-frame the whole window while the content SCROLLS through `[sections]`; the `[highlighted item]` stays marked. One push-in→zoom-out arc, gated by the title-card opener.
- Variant — 3d-hand (key-feature-3d-device-hand-demo, 7.9s): FULLY 3D — a `[3D device]` drifts in a `[stylized 3D void / bloom + particles]`, opening tilted and self-rotating to face the lens nearly flat as ONE CONTINUOUS forward camera push begins (no cuts). A glossy `[3D hand]` rises from the bottom-foreground and GESTURE-DRIVES the surface: it swipes to scroll a `[picker/sidebar panel]` of `[option cards]` and taps `[option]` (while a `[header word]` letter-flips in place); the selection APPLIES — a `[new layout]` grows from center to fill the device face, nav flips, a `[marquee]` scrolls horizontally; the hand swipes again to scroll the page upward through `[sections]`, then drifts out. The camera never stops pushing; the bright device face keeps growing toward the lens until it BLOOMS into a `[light]` wash — a zoom-through "portal" exit that fills the frame.
-**motion vocabulary**
-surface establish (edge slide-in + settle / tilt drift-in + self-rotate-to-camera / title-card dissolve); accent shape spring behind surface; element-level screen-cycling (scroll-swap, push-in-from-side, scale-swap); button tap-compress; staggered side-headline reveal + copy swap (out-up / in-up); in-place header-word letter-flip; floating browser-window-on-gradient idle float; full-frame title-card opener (icon draw-in + label); camera push-IN on a region; camera zoom-OUT re-frame; content scroll-through; one continuous 3D camera-follow push (no cuts); 3D device drift + self-rotate; stylized-environment bloom/particles; 3D-hand entrance + swipe-scroll + tap (gesture-driven); picker-panel slide-in; template-apply grow-from-center; horizontal marquee scroll; gesture-driven page scroll; zoom-through bloom/portal exit; static-hold (no camera) as the floor of the camera range.
+**motion vocabulary** surface establish (edge slide-in + settle / tilt drift-in + self-rotate-to-camera / title-card dissolve); accent shape spring behind surface; element-level screen-cycling (scroll-swap, push-in-from-side, scale-swap); button tap-compress; staggered side-headline reveal + copy swap (out-up / in-up); in-place header-word letter-flip; floating browser-window-on-gradient idle float; full-frame title-card opener (icon draw-in + label); camera push-IN on a region; camera zoom-OUT re-frame; content scroll-through; one continuous 3D camera-follow push (no cuts); 3D device drift + self-rotate; stylized-environment bloom/particles; 3D-hand entrance + swipe-scroll + tap (gesture-driven); picker-panel slide-in; template-apply grow-from-center; horizontal marquee scroll; gesture-driven page scroll; zoom-through bloom/portal exit; static-hold (no camera) as the floor of the camera range.
**rule mapping** (per motion verb → backing rule, or flagged special)
@@ -47,7 +45,6 @@ surface establish (edge slide-in + settle / tilt drift-in + self-rotate-to-camer
- static-tour → NO camera move (`viewport-change` held at scale 1, or omitted); all motion is element-level. This is the floor of the range and what distinguishes the device-tour from the rest.
- floating-window → a two-phase push-in → zoom-out arc → `multi-phase-camera` (e.g. dramatic-reveal 1.1→1.0→0.95 feel): push IN on the `[sidebar/region]` via `coordinate-target-zoom` (off-center target = scale + counter-translate), then `multi-phase-camera` zooms back OUT to re-frame the whole window while content scrolls.
-- 3d-hand → ONE continuous forward push (no cuts) → `multi-phase-camera` in steady-push mode (1.0→1.03→1.06… plus its sine micro-drift) layered over `css-3d-transforms`/`3d.md` so the device self-rotates-to-lens during the push; the push runs unbroken into the bloom/portal exit (exit itself is the WebGL-shader flagged special above).
- Across all three: `viewport-change` is the base virtual-camera primitive; `multi-phase-camera` sequences the push/zoom phases (and supplies the always-on micro-drift that keeps even the "static" tour from feeling dead); `coordinate-target-zoom` aims the push at off-center screen detail.
+- 3d-hand → ONE continuous forward push (no cuts) → `multi-phase-camera` in steady-push mode (1.0→1.03→1.06… plus its sine micro-drift) layered over `css-3d-transforms`/`3d.md` so the device self-rotates-to-lens during the push; the push runs unbroken into the bloom/portal exit (exit itself is the WebGL-shader flagged special above). Across all three: `viewport-change` is the base virtual-camera primitive; `multi-phase-camera` sequences the push/zoom phases (and supplies the always-on micro-drift that keeps even the "static" tour from feeling dead); `coordinate-target-zoom` aims the push at off-center screen detail.
-**Overflow (pan/scroll surfaces — required for a clean `inspect`):** a panned or scrolled surface deliberately moves content PAST the edges of its framing card. Clip it at the card (`overflow: hidden` on the card/window) AND mark the moving inner layer (the `.world` / surface wrapper holding the screenshot + any markers/labels) with `data-layout-allow-overflow` — otherwise `inspect` reports `text_box_overflow` / `container_overflow` ERRORS for the parts that scroll off (e.g. a marker label panned off the left edge). The card clips them visually; the attribute tells `inspect` it's intentional, not a layout bug.
+**Overflow (pan/scroll surfaces — required for a clean `check`):** a panned or scrolled surface deliberately moves content PAST the edges of its framing card. Clip it at the card (`overflow: hidden` on the card/window) AND mark the moving inner layer (the `.world` / surface wrapper holding the screenshot + any markers/labels) with `data-layout-allow-overflow` — otherwise `check` reports `text_box_overflow` / `container_overflow` errors for the parts that scroll off (e.g. a marker label panned off the left edge). The card clips them visually; the attribute tells the layout audit it's intentional, not a layout bug.
diff --git a/skills/hyperframes-animation/rules-index.md b/skills/hyperframes-animation/rules-index.md
index 52c748b948..abb5409ac4 100644
--- a/skills/hyperframes-animation/rules-index.md
+++ b/skills/hyperframes-animation/rules-index.md
@@ -7,7 +7,7 @@ Atomic motion recipes. Each lives at `rules/<name>.md`. Compose 2-4 per scene wi
<rules>
<hacker-flip-3d path="rules/hacker-flip-3d.md">Character-level 3D rotation with deterministic glyph substitution (decryption). GSAP `back.out` ease + per-glyph `onUpdate` for the flicker hash. Tags: text, 3d, reveal, decode</hacker-flip-3d>
<vertical-spring-ticker path="rules/vertical-spring-ticker.md">Slot-machine vertical scrolling using stepped GSAP tweens within a masked column. Tags: text, ticker, scroll, vertical</vertical-spring-ticker>
-<counting-dynamic-scale path="rules/counting-dynamic-scale.md">Counter where font size grows with the value for escalating emphasis. Single GSAP tween on a numeric proxy. Tags: counter, scale, font-size, number, dynamic</counting-dynamic-scale>
+<counting-dynamic-scale path="rules/counting-dynamic-scale.md">Counter where transform scale grows with the value for escalating emphasis. A numeric proxy and scale tween share one timeline position. Tags: counter, scale, transform, number, dynamic</counting-dynamic-scale>
<discrete-text-sequence path="rules/discrete-text-sequence.md">Replace entire text states at time thresholds for non-linear typing (typos, holds, bulk additions, backspaces). GSAP onUpdate-driven reverse search. Tags: text, typing, discrete, threshold, non-linear</discrete-text-sequence>
<asr-keyword-glow path="rules/asr-keyword-glow.md">Highlight keywords with glow + scale + color synced to ASR word timestamps. Two GSAP tweens per word drive a CSS custom property `--glow` through attack-decay-rest envelope. Tags: asr, audio-sync, highlight, glow, keyword, text</asr-keyword-glow>
<3d-text-depth-layers path="rules/3d-text-depth-layers.md">Multiple offset text layers (N divs at `(i*dx, i*dy)` with decreasing alpha) create a stacked 3D extrusion illusion on large typography. Tags: text, 3d, depth, layers, shadow, typography, stacked</3d-text-depth-layers>
@@ -19,7 +19,7 @@ Atomic motion recipes. Each lives at `rules/<name>.md`. Compose 2-4 per scene wi
## Data & Stats
<rules>
-<counting-dynamic-scale path="rules/counting-dynamic-scale.md">Counter whose font size grows with the value; seek-safe `onUpdate`, `Math.round`, `tabular-nums`, multi-stat chord. (Also listed under Text & Typography.) Tags: counter, number, stat, count-up</counting-dynamic-scale>
+<counting-dynamic-scale path="rules/counting-dynamic-scale.md">Counter whose transform scale grows with the value; seek-safe `onUpdate`, `Math.round`, `tabular-nums`, multi-stat chord. (Also listed under Text & Typography.) Tags: counter, number, stat, count-up</counting-dynamic-scale>
<stat-bars-and-fills path="rules/stat-bars-and-fills.md">Data-viz primitives that pair a number with a graphic — growth bars (CSS `scaleY` stagger), progress fill (bar `scaleX` or measured SVG ring), and fractional star-rating wipe (`clip-path`). Transforms only, seek-safe. Pick single-focus vs split-frame and hold it. Tags: data, stats, chart, bars, progress, ring, stars, rating, infographic</stat-bars-and-fills>
</rules>
diff --git a/skills/hyperframes-animation/rules/counting-dynamic-scale.md b/skills/hyperframes-animation/rules/counting-dynamic-scale.md
index 753923e829..f3d936cf8c 100644
--- a/skills/hyperframes-animation/rules/counting-dynamic-scale.md
+++ b/skills/hyperframes-animation/rules/counting-dynamic-scale.md
@@ -1,22 +1,22 @@
---
name: counting-dynamic-scale
-description: Counter animation where font size grows with the counting value, creating escalating visual weight.
+description: Counter animation where the value counts up while transform scale grows to its final size, creating escalating visual weight without per-frame text reflow.
metadata:
- tags: counter, counting, scale, font-size, number, dynamic, emphasis
+ tags: counter, counting, scale, transform, number, dynamic, emphasis
---
# Counting with Dynamic Scale
-A number counts from A → B while its font size simultaneously grows, creating escalating visual weight that reinforces magnitude.
+A number counts from A → B while its transform scale grows to the final size. The effect preserves escalating visual weight without tweening `font-size` or forcing text layout on every frame.
## How It Works
-A single eased timeline drives **two synchronized properties**:
+A single paused timeline drives **two synchronized tweens**:
1. The numeric value (rendered as DOM text via `onUpdate`)
-2. The font size (tweened from `START_SIZE` → `END_SIZE`)
+2. The counter transform (`scale: START_SCALE` → `scale: 1`)
-As the number gets bigger, the text gets larger — visually communicating "this is impressive."
+As the number gets bigger, the text grows in place — visually communicating “this is impressive” while keeping the final font size static in CSS.
## Easing
@@ -76,8 +76,10 @@ Pick by drama desired (the choice is discrete; coefficient is implicit):
color: {textColor};
/* MANDATORY — tabular-nums keeps digits the same width */
font-variant-numeric: tabular-nums;
- /* Initial font-size; GSAP will tween this */
- font-size: {startSize};
+ /* Final size is static. GSAP animates transform scale, not font-size. */
+ display: inline-block;
+ font-size: {endSize};
+ transform-origin: center center;
letter-spacing: -2px;
line-height: 1;
}
@@ -109,24 +111,31 @@ Pick by drama desired (the choice is discrete; coefficient is implicit):
const tl = gsap.timeline({ paused: true });
const counter = document.getElementById("counter");
- const state = { value: 0, fontSize: START_SIZE };
+ const state = { value: 0 };
+ const START_SCALE = START_SIZE / END_SIZE;
- // Synchronized count + font-size tween
+ // Count value. onUpdate changes text only.
tl.to(
state,
{
value: TARGET_VALUE,
- fontSize: END_SIZE,
duration: COUNT_DUR,
ease: COUNT_EASE,
onUpdate: () => {
counter.textContent = Math.round(state.value).toLocaleString();
- counter.style.fontSize = `${state.fontSize}px`;
},
},
0,
);
+ // Visual growth uses a compositor transform and shares the count timing.
+ tl.fromTo(
+ counter,
+ { scale: START_SCALE },
+ { scale: 1, duration: COUNT_DUR, ease: COUNT_EASE },
+ 0,
+ );
+
// Suffix slides in after count completes
tl.to(
".counter-suffix",
@@ -161,17 +170,17 @@ Pick by drama desired (the choice is discrete; coefficient is implicit):
- Effects: 2–3 digits reads best at hero size; 4+ digits requires wider container
- Constraints: must fit horizontally at END_SIZE inside the container
-- **START_SIZE / END_SIZE** — initial and final font size
+- **START_SIZE / END_SIZE** — design inputs used once to calculate `START_SCALE`
- Range: START_SIZE ≈ 40–60 % of END_SIZE
- Effects: smaller START_SIZE = more dramatic growth; larger = subtler
- - Constraints: END_SIZE × digit count must fit the container width without clipping
+ - Constraints: set CSS `font-size` to END_SIZE; never tween either value. END_SIZE × digit count must fit the container width without clipping
- **COUNT_DUR** — count + scale tween duration
- Range: 1.2–2.5 s
- Effects: shorter = aggressive; longer = settled, gives reading time
- Constraints: must allow the eye to read the digits scrolling past; below ~0.8 s reads as a flash
-- **COUNT_EASE** — shared ease for value AND font-size
+- **COUNT_EASE** — shared ease for the value and transform scale
- Discrete choice: `power2.out`, `power3.out`, `expo.out` (see table above)
- Constraint: avoid `back.out` / `elastic.out` — overshoot reads as unstable data
@@ -201,7 +210,7 @@ tl.to(
);
```
-`snap: { innerText: 1 }` keeps it integer. Keep the proxy-object `onUpdate` form (above) whenever you must **co-drive** font-size, locale formatting (`toLocaleString`), or a suffix in the same tween — `innerText` alone can't do those, and dynamic scale is the whole point of this rule, so the proxy form is the default here.
+`snap: { innerText: 1 }` keeps it integer. Keep the proxy-object `onUpdate` form above when you need locale formatting (`toLocaleString`) or suffix logic. In either form, the synchronized scale remains a separate transform tween at timeline position `0`.
### 3D depth entry
@@ -253,11 +262,12 @@ For 3 stats counting in parallel, share the SAME ease and duration so they finis
## Key Principles
-- **Synchronized value + size in ONE tween** so they share an ease and stay coordinated
+- **Synchronized value + scale at one timeline position** so the two tweens share an ease and stay coordinated
- **`font-variant-numeric: tabular-nums` is mandatory** — without it digit-count transitions (e.g. 9 → 10 → 100) cause visible jitter as glyph widths change
- **Fixed-width container** as belt-and-suspenders — even with tabular-nums, glyph shape changes can shift baselines
- **Grow in place, don't bounce** — the number should feel weighty, not springy. `power3.out` ends at exact value; `back.out` overshoots and feels cartoonish
- **Start small enough to grow noticeably** (~50 % of final size); end large enough to feel decisive but not clip viewport
+- **Never set `fontSize` in `onUpdate`** — final type size is static CSS; only the transform changes per frame
- **Suffix animates AFTER the count, not during** — gives the number its own beat
- **❗ Label is BIG TEXT, not a page-style tiny caption** — for VIDEO, a small paragraph-style caption below a hero-size number reads as visual noise. Use display-size, uppercase, tracked label so the layout is "two-line big-text"; the label is part of the headline, not a footer.
@@ -266,7 +276,7 @@ For 3 stats counting in parallel, share the SAME ease and duration so they finis
- **`tabular-nums` mandatory** — required CSS for layout stability
- **Timeline must be paused**: `gsap.timeline({ paused: true })`. Never `tl.play()`
- **Registry key = `data-composition-id`**: `window.__timelines["counter-scene"]` must match scene root
-- **`onUpdate` mutates DOM**: HF runtime seeks the timeline frame-by-frame, so `onUpdate` runs on every seek call. Keep `onUpdate` work O(1) — set text + font-size, no DOM creation
+- **`onUpdate` mutates DOM**: HF runtime seeks the timeline frame-by-frame, so `onUpdate` runs on every seek call. Keep `onUpdate` work O(1) — set text only, with no style writes or DOM creation
- **`Math.round` not `Math.floor`** — half-way through the final integer should display the final value briefly, not the previous one
- **Avoid `back.out` / `elastic.out`** for the counter itself — overshoot makes the number look unstable (it's data, not decoration)
diff --git a/skills/hyperframes-animation/rules/motion-blur-streak.md b/skills/hyperframes-animation/rules/motion-blur-streak.md
index 234213f308..438437a9c3 100644
--- a/skills/hyperframes-animation/rules/motion-blur-streak.md
+++ b/skills/hyperframes-animation/rules/motion-blur-streak.md
@@ -325,4 +325,4 @@ For a single kinetic phrase that "zooms past," keep the streak slightly visible
- `/hyperframes-animation` — `out`-family easing, proxy-driven `onUpdate` attribute tweens, and locked-envelope coordination (`../../adapters/gsap-easing-and-stagger.md`)
- `/hyperframes-creative` — `references/typography.md` (embedded display face for a text streak), `references/video-composition.md` (solid field behind the smear)
- `/hyperframes-core` — composition wiring, determinism (finite tweens, no `Math.random`)
-- `/hyperframes-cli` — `hyperframes lint` / `hyperframes check` (validate catches a missing `#streak-blur` node or an unreferenced filter)
+- `/hyperframes-cli` — `hyperframes lint` / `hyperframes check` (`check` catches a missing `#streak-blur` node or an unreferenced filter)
diff --git a/skills/hyperframes-animation/rules/stat-bars-and-fills.md b/skills/hyperframes-animation/rules/stat-bars-and-fills.md
index a2e654ca28..3201f02d2e 100644
--- a/skills/hyperframes-animation/rules/stat-bars-and-fills.md
+++ b/skills/hyperframes-animation/rules/stat-bars-and-fills.md
@@ -58,7 +58,7 @@ tl.to(".bar", { scaleY: 1, duration: 0.7, ease: "power3.out", stagger: 0.08 }, 0
overflow: hidden;
}
/* width:100% is REQUIRED — an absolutely-positioned fill with no width is 0px, and scaleX of 0 is
- still 0 → the bar renders invisible (and no lint/inspect check catches a zero-width scaled element). */
+ still 0 → the bar renders invisible (automated gates may miss a zero-width scaled element). */
.fill {
width: 100%;
height: 100%;
diff --git a/skills/hyperframes-cli/SKILL.md b/skills/hyperframes-cli/SKILL.md
index 2b233085b0..ea0517fc78 100644
--- a/skills/hyperframes-cli/SKILL.md
+++ b/skills/hyperframes-cli/SKILL.md
@@ -1,147 +1,136 @@
---
name: hyperframes-cli
-description: HyperFrames CLI dev loop. Use when running npx hyperframes init, add, catalog, capture, lint, check, snapshot, compare, grade-compare, preview, play, render, publish, cloud, feedback, lambda, doctor, browser, info, upgrade, skills, compositions, docs, benchmark, telemetry, transcribe, tts, or remove-background (validate/inspect/layout are deprecated aliases covered by check), or when troubleshooting the HyperFrames build/render environment. Entry point for HeyGen-hosted cloud rendering (`hyperframes cloud render / list / get / delete`) and self-managed AWS Lambda rendering (`hyperframes lambda deploy / render / progress / destroy / policies / sites`).
+description: >
+ Use the HyperFrames CLI development loop: init, add, catalog, capture, lint, check, snapshot,
+ compare, grade-compare, preview, play, present, beats, keyframes, single or batch render, publish,
+ cloud, cloudrun, feedback, lambda, doctor, browser, info, upgrade, skills, compositions, docs,
+ benchmark, telemetry, transcribe, auth, tts, and remove-background. Also use when diagnosing build
+ or render failures. validate, inspect, and layout are deprecated aliases; use check. Covers local,
+ HeyGen-hosted cloud, AWS Lambda, and Google Cloud Run rendering.
---
# HyperFrames CLI
-Everything runs through `npx hyperframes` unless project instructions specify a local wrapper. Obey the local wrapper exactly. Requires Node.js >= 22 and FFmpeg.
-
-## Workflow
-
-1. **Scaffold** — `npx hyperframes init my-video` (or `capture` from a URL). `init` also checks the installed skills against the latest on GitHub and updates the global set if any are out of date. The `--skip-skills` flag is currently neutered (temporary, while the skills.sh registry catches up), so every `init` runs this check and pulls our latest skills regardless.
-2. **Write** — author HTML composition (see the `hyperframes-core` skill)
-3. **Lint** — `npx hyperframes lint` (static, fast — run it early while iterating)
-4. **Check** — `npx hyperframes check` (the browser gate; add `--snapshots` for annotated frames + per-finding crops)
-5. **Preview / edit** — `npx hyperframes preview` opens **Studio**, the timeline editor where the user can manually edit anything (not just watch). Review there, then ask before rendering.
-6. **Render** — pick the variant:
- - Iterate: `npx hyperframes render --quality draft`
- - Deliver: `npx hyperframes render --quality high --output out.mp4`
- - CI / cross-host repro: `npx hyperframes render --docker --strict --output out.mp4`
- - Cloud, zero-infra: `npx hyperframes cloud render` (HeyGen hosts the render; no local Chrome/FFmpeg/AWS, see Cloud below)
- - Cloud, bring-your-own-AWS: `npx hyperframes lambda render ./my-project --width 1920 --height 1080 --wait` (see Lambda below)
-7. **Report feedback** — after verifying the output, `npx hyperframes feedback --rating <0-10> --comment "..."` once per task (see Agent Conventions).
-
-Run `check` before preview. It runs the linter first (and skips the browser entirely on lint errors), then does everything the old validate → inspect → snapshot sequence did in **one** browser session and one seek pass: runtime console errors and failed requests, layout defects (text spilling out of bubbles/containers or off canvas, held overlaps, occlusion), motion-sidecar verification (`*.motion.json` — entrances under seek, stagger order, in-frame, liveness), and WCAG contrast. Contrast failures are errors and carry the sampled fg/bg colors, measured vs required ratio, and a suggested compliant color, so most contrast fixes need no screenshot. Every finding carries a selector, `data-*` identity, composition source file, bbox, and sample time — jump straight to the HTML. Single-sample transients demote to info; findings held across samples gate the exit code (`--strict` gates warnings too). `validate`, `inspect`, and `layout` still work but are deprecated aliases of parts of `check`.
-
-For motion-heavy work, prefer snapshot-driven iteration and a `*.motion.json` sidecar — see `references/lint-validate-inspect.md` for the discipline and motion-verification spec. To compare agent-authored candidate variants, use `npx hyperframes compare <path...> [--at <sec>] [--labels a,b,c] [--out compare.png] [--cols n] [--json]` to render each composition through its own runtime, assemble one labeled sheet, inspect it side by side, and choose. For color-grade selection, use the color-specific sibling `npx hyperframes grade-compare --for <frame> --grades grades.json` (or `--luts a.cube,b.cube`) to render every grading candidate through the real WebGL grading runtime into one labeled PNG before choosing the winner.
-
-## Agent Conventions
-
-Cross-cutting rules that hold for every command:
-
-- **`--json` is available on every command except `render`, `preview`, and `play` server modes.** Use it for any agent / CI invocation of the supported commands; output includes a `_meta` envelope (cli version, latest available, update advice). `render` reports status via stdout + exit code only — verify success with the post-render check below. `preview --selection --json` and `preview --context --json` are the preview exceptions: they do not start a server, they query the user's running Studio session and exit.
-- **`doctor --json` always exits 0**, even when the environment is broken. Gate on the payload's `ok` field: `npx hyperframes doctor --json | jq -e '.ok' > /dev/null`. This insulates pipelines from CLI release churn.
-- **Non-TTY mode is auto-detected.** When `stdout` is not a TTY (CI, agents, piped output) the CLI auto-switches to non-interactive; `init` then **requires `--example`**. Pass `--non-interactive` to force this mode even on a TTY.
-- **CI gating on render**: `--strict` fails on lint errors, `--strict-all` fails on warnings too, `--strict-variables` fails on undeclared `--variables` keys.
-- **Correlate a verify loop with `HYPERFRAMES_RUN_ID`.** Orchestrators driving the CLI per task/design element should set this env var once per unit of work; every command invocation attaches it to telemetry, and `check` emits a per-gate breakdown, making roundtrips-per-task measurable.
-- **Paths in `--json` are redacted** — `$HOME` becomes the literal `$HOME` so output is safe to paste into bug reports and agent contexts.
-- **Render is user-gated.** Never auto-render once the checks pass. Pause at `preview`, tell the user the video is editable in Studio, and render only after they approve.
-- **Use Studio context for user-directed edits.** When the user says "this selected element", "the thing I clicked", "current selection", or similar, ask them to select it in Studio, then run `npx hyperframes preview --context --json --context-fields selection`. Use the returned `selection.target.hfId` / `selector`, `selection.sourceFile`, `selection.currentTime`, and `selection.thumbnailUrl` to anchor the edit. If `selection` is `null` and `errors.selection.code` is `no-selection`, ask the user to click the element and rerun; do not guess from screenshots.
-- **Keep Studio context compact.** `preview --context --json` returns compact selection by default. Add `--context-fields selection`, `--context-fields selection,lint`, or `--context-fields lint` to avoid bloating agent context. Use `--context-detail full` only when you need heavy fields like computed styles, inline styles, or text-field metadata.
-- **Post-render verification.** After `render` returns exit 0, confirm the output file exists and has plausible size before reporting success: `[ -s "$OUTPUT" ] || echo "render produced no output"`. The CLI prints `◇ <path>` on success; for long renders also sanity-check duration with `ffprobe -i "$OUTPUT" -show_format -v error`.
-- **Keep the project's pinned CLI fresh.** `hyperframes init` writes an exact version into `package.json` scripts (`npx --yes [email protected] render`) so a project re-renders identically over time — but a project scaffolded weeks ago is frozen on a CLI that predates render, capture-router, and correctness fixes it would silently benefit from. Once per project, check whether the pin is stale and bump it: `npx hyperframes@latest upgrade --project --check` (reports the delta, writes nothing), then `npx hyperframes@latest upgrade --project` to apply. Use the **unpinned** `hyperframes@latest` form — the pinned script would just re-run the old version against itself. Skip if the user deliberately pinned a version.
-- **Report feedback after a successful render.** Once the output is verified, run `npx hyperframes feedback --rating <0-10> --comment "..."` once per task to report how likely you are to recommend the run — `10` for a clean run, lower when you hit friction. Put any bug, workaround, missing feature, or confusing behaviour you encountered in `--comment`. This is the project's primary signal channel; renders that go silent leave the maintainers blind. Skip only when telemetry is disabled or the user opted out.
- - **For a reproducible bug, add `--file-issue`** — it publishes a minimal repro of the project to a public URL and opens a pre-filled GitHub issue with your comment + environment. A comment alone almost never lets a maintainer reproduce; the published composition is what makes the report actionable. Point `--dir <project>` at the failing composition if it isn't the current directory.
- - **Write bug comments a maintainer can reproduce from — a paraphrase they can't act on wastes the report.** The CLI already attaches os/arch/mem/ffmpeg/CLI-version, so don't repeat those; spend the comment on what only you saw. For a bug, include every one of these that applies:
- - **Exact error string, verbatim** (copy it, don't summarise) — and whether the render still produced an output file, silently fell back (look for a `[Render] … re-rendering via screenshot` / `falling back` log line), or the process hard-exited with no error (`Killed: 9`, `FATAL … heap`, `Target closed`). "Which timeout / which failure mode" is the single most useful fact.
- - **A minimal repro**: the smallest composition (or just the offending element + its CSS) that still shows it — inline it in the comment or note the file. Name the trigger you isolated (e.g. "only when the text node uses `font-family: 苹方`", "only at 4K", "only with a `<video>` present").
- - **The exact command + flags** you ran, and any env vars set (`HF_*` / `PRODUCER_*`).
- - **What's wrong and where**: the frame number or timestamp, and the visual defect (blank text, black band at the bottom, wrong glyphs, frozen canvas) vs. what you expected. A screenshot path if you saved one.
- - If it reproduces only sometimes, say so and give the hit rate.
-
-## Routing
-
-| Want to… | Read |
-| ---------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------- |
-| Scaffold a project (`init`, `capture`, `skills`) | `references/init-and-scaffold.md` |
-| Check correctness (`lint`, `check`, `snapshot`, deprecated `validate`/`inspect`) | `references/lint-validate-inspect.md` |
-| Preview or render (`preview`, `play`, `render`, `publish`) | `references/preview-render.md` |
-| Diagnose the environment (`doctor`, `browser`) | `references/doctor-browser.md` |
-| Cloud render, zero-infra HeyGen-hosted (`cloud render / list / get / delete`, `auth`) | `references/cloud.md` |
-| Cloud render on your own AWS Lambda (`lambda deploy / sites / render / progress / destroy / policies`) | `references/lambda.md` |
-| Parametrize / template renders (`--variables`, `--variables-file`, `--strict-variables`, `--batch`) | `references/cloud.md` + `hyperframes-core` (`variables-and-media.md`) |
-| Everything else (`info`, `upgrade`, `compositions`, `docs`, `benchmark`, `telemetry`, asset preprocessing) | `references/upgrade-info-misc.md` |
-
-## Cross-Skill Hand-Offs
-
-- **Tailwind projects** (`init --tailwind`) → use `hyperframes-core` (Tailwind reference) before editing classes or theme tokens.
-- **Registry blocks/components** (`hyperframes add`, `hyperframes catalog`) → use `hyperframes-registry` for install paths, sub-composition wiring, and snippet merging.
-- **Asset preprocessing** (`tts`, `transcribe`, `remove-background`) → use `media-use` for voice selection, Whisper model rules, captions, and TTS-to-captions chain.
-- **Parametrized renders** (`--variables`) → declared via `data-composition-variables` on `<html>`; see `hyperframes-core` for the full schema.
-
-## Cloud (HeyGen-hosted rendering)
-
-`hyperframes cloud render` is the **zero-infra** render path: the CLI zips your project, uploads it, renders on HeyGen's cloud, and downloads the mp4. No Chrome, no FFmpeg, no AWS, and you pay per credit. This is the default answer to "render this in the cloud"; reach for Lambda only when you already own AWS and need distributed/chunked rendering.
+Run commands as `npx hyperframes ...` unless project instructions provide a wrapper. Obey the wrapper when present. The CLI requires Node.js 22 or newer and FFmpeg.
+
+## Development loop
+
+1. **Scaffold:** `npx hyperframes init <project>` or capture a site. In non-TTY mode, pass `--non-interactive --example=<name>`.
+2. **Author:** write the composition using `/hyperframes-core`.
+3. **Get fast feedback while editing:** run `npx hyperframes lint` after the first HTML pass and after structural changes.
+4. **Run the final gate:** run `npx hyperframes check`; it reruns lint before opening the browser. Do not prepend a redundant standalone lint invocation. Add `--snapshots` for annotated overview frames and finding crops.
+5. **Inspect sub-compositions:** when `index.html` mounts `data-composition-src`, capture midpoint snapshots and inspect each mounted scene.
+6. **Open the final Studio preview:** run `npx hyperframes preview`, hand the timeline project URL to the user, and ask whether to revise or render.
+7. **Render only after approval:** use draft quality for iteration and high quality for delivery.
+8. **Verify the output:** confirm the file exists, is non-empty, and has a plausible duration.
```bash
-npx hyperframes auth login # one-time sign-in (shared with the `heygen` CLI)
-npx hyperframes cloud render # zip, upload, render, download to renders/<id>.mp4
+# Fast iteration check; repeat while authoring as needed.
+npx hyperframes lint
+
+# Required final gate; includes lint.
+npx hyperframes check
+npx hyperframes preview
+npx hyperframes render --quality high --output out.mp4
+test -s out.mp4
+ffprobe -v error -show_format out.mp4
```
-Common flags: `--composition <html>`, `--output <path>`, `--quality draft|standard|high`, `--fps`, `--resolution 1080p|4k`, `--format mp4|webm|mov`, `--aspect-ratio` (auto-detected from `data-width`/`data-height`). Fire-and-forget with `--no-wait` + `--callback-url`; make retries safe with `--idempotency-key "$(uuidgen)"`. Manage jobs with `cloud list` / `cloud get <id>` / `cloud delete <id>`.
+`check` runs lint first, then uses one browser session and one seek pass to audit runtime errors, failed requests, layout, `*.motion.json` assertions, and WCAG contrast. Persistent findings gate the exit code; transient entrance or exit findings are informational. Use `--strict` to gate warnings. `validate`, `inspect`, and `layout` remain aliases for compatibility but must not appear in new instructions or scripts.
+
+## Two different preview surfaces
-The idiomatic **template workflow is upload-once, re-render-many**: render a local project once to get its `asset_id`, then re-submit against that asset with different `--variables` (skips zip + upload). See `references/cloud.md` for the full flag set, the auth model, webhooks, and the template loop.
+Do not confuse these states:
-## Variables (parametrized / template renders)
+| Surface | When it may open | Purpose |
+| ------------------------- | ------------------------------------------------------ | --------------------------------------------------------------------------------- |
+| Storyboard board | Before composition checks, only when `storyboard: yes` | Review plan cards and wireframe sketches. Open `?view=storyboard#project/<name>`. |
+| Final composition preview | After `check` passes | Review the assembled timeline before render. Open `#project/<name>`. |
-Any render (local, cloud, or Lambda) can fill declared template slots at render time. Declarations live on the composition (`data-composition-variables`); the CLI surface is:
+The early board is not approval of the final video. Rendering always requires the final approval defined by `hyperframes-core/references/review-loop.md`.
+
+## Sub-composition smoke test
+
+Static audits cannot catch every mount failure. When the project uses sub-compositions, capture at least one visible midpoint for each host slot:
```bash
-npx hyperframes render --variables '{"title":"Q4 Recap","theme":"dark"}' --output q4.mp4
-npx hyperframes render --variables-file ./vars.json --output out.mp4
-npx hyperframes render --batch rows.json --output "renders/{name}.mp4" --strict-variables
-npx hyperframes cloud render --asset-id asst_abc123 --variables '{"name":"Ada"}'
+npx hyperframes snapshot --at <t1>,<t2>,<t3>
```
-`--strict-variables` fails the render on any undeclared key or type mismatch (use it in CI). `--batch <rows.json>` renders one output per data row with `{key}`/`{index}` path placeholders and writes a `manifest.json`. For the **full schema** (declaring types, `data-var-src`/`data-var-text` declarative bindings, per-instance `data-variable-values` for sub-compositions, and precedence) use the `hyperframes-core` skill (`references/variables-and-media.md`). The cloud template loop lives in `references/cloud.md`.
+Treat tiny unstyled content, canvas-sized icons, missing hero elements, or timeline-registration timeouts as render-blocking mount defects. See `hyperframes-core/references/sub-compositions.md` for the corresponding fixes.
-## Lambda (Cloud Rendering)
+## Agent conventions
-`hyperframes lambda` deploys distributed rendering to AWS Lambda and drives renders from your laptop or CI. End-to-end is three commands:
+- Prefer `--json` for agent and CI calls. Server-mode `render`, `preview`, and `play` do not provide ordinary JSON output; `preview --selection --json` and `preview --context --json` are query-mode exceptions.
+- `doctor --json` always exits zero. Gate on its payload:
-```bash
-npx hyperframes lambda deploy # provision SAM stack (Lambda + Step Functions + S3)
-npx hyperframes lambda render ./my-project --width 1920 --height 1080 --wait
-npx hyperframes lambda destroy # tear down (S3 bucket is retained)
-```
+ ```bash
+ npx hyperframes doctor --json | jq -e '.ok' >/dev/null
+ ```
-Use Lambda when a render is too long / too large for one host (multi-minute videos, 4K, large parallel batches) and you have AWS credentials configured. For dev-loop iteration stay on local `render`.
+- Non-TTY mode is automatic. `init` requires `--example` there; use `--non-interactive` to force deterministic behavior on a TTY.
+- Use one `HYPERFRAMES_RUN_ID` for all commands in the same verification loop.
+- Use `--strict`, `--strict-all`, and `--strict-variables` when the corresponding warnings, variables, or CI conditions must gate the render.
+- JSON paths redact the home directory as `$HOME`; do not try to reverse the redaction.
+- Never render merely because checks pass. Pause at the final preview and wait for approval.
-See `references/lambda.md` for prerequisites, all 6 subcommands (`deploy`, `sites create`, `render`, `progress`, `destroy`, `policies`), IAM policy validation, state files, and cost / cleanup rules.
+## Studio-directed edits
-## Minimum Completion Gate
+When the user refers to “this element” or the current selection, query Studio instead of guessing:
```bash
-npx hyperframes check
+npx hyperframes preview --context --json --context-fields selection
```
-One command covers the old lint + validate + inspect sequence in one browser session. Add `--strict` to gate warnings and `render --strict` in CI to fail on lint errors. `--caption-zone "<x0=..;y0=..;x1=..;y1=..>"` and `--frame-check` add opt-in band/bounds gates for pipelines that need them.
+Use `selection.target.hfId` when available, otherwise its selector and source file. If the result reports `no-selection`, ask the user to click the element and rerun. Request only the context slices you need; use `--context-detail full` only for computed styles or editable text metadata. Full behavior and failure codes live in `references/preview-render.md`.
-### Visual smoke test — required when the project uses sub-compositions
+## Render choices
-The audits evaluate the bundled composition; they cannot catch every cross-file mount failure when `index.html` mounts sub-compositions via `data-composition-src` (see `hyperframes-core` → `references/sub-compositions.md`, "Common pitfalls"). The gate that catches those is one that actually loads `index.html` the way `render` does and seeks the timeline.
+| Need | Command |
+| ---------------------------------------- | ----------------------------------------------------------------------------- |
+| Fast local iteration | `npx hyperframes render --quality draft` |
+| Final local delivery | `npx hyperframes render --quality high --output out.mp4` |
+| Reproducible container render | `npx hyperframes render --docker --strict --output out.mp4` |
+| Local variable-driven batch render | `npx hyperframes render --batch rows.json --output "renders/{name}.mp4"` |
+| HeyGen-hosted zero-infrastructure render | `npx hyperframes cloud render` |
+| Self-managed distributed AWS render | `npx hyperframes lambda render <project> --width 1920 --height 1080 --wait` |
+| Self-managed distributed GCP render | `npx hyperframes cloudrun render <project> --width 1920 --height 1080 --wait` |
-Use `hyperframes snapshot` — it loads the project the same way `render` does (so it exercises the same mount path) but only captures the timestamps you request, so it's seconds instead of a full render:
+Use cloud rendering when the user wants hosted rendering without local Chrome, FFmpeg, or AWS. Use Lambda only when AWS ownership is a requirement. Use Cloud Run only when GCP ownership is a requirement. Read the matching reference before running any cloud path.
-```bash
-# Capture one frame at the midpoint of every sub-composition.
-# Midpoints = data-start + data-duration/2 for each host slot in index.html.
-npx hyperframes snapshot --at <t1>,<t2>,<t3>,...
+After verifying a successful render, send one feedback report unless telemetry is disabled or the user opted out:
-# Or, if you don't need per-scene targeting, an evenly-spaced sample:
-npx hyperframes snapshot --frames 9
+```bash
+npx hyperframes feedback --rating <0-10> --comment "<specific result or friction>"
```
-Output lands in `snapshots/frame-NN-at-Xs.png`. Eyeball each frame against the scene plan.
+Use `--file-issue` only with consent: it publishes a minimal reproduction to a public URL. The bug report format and privacy warning live in `references/preview-render.md`.
+
+## Read the matching reference before running a command
+
+The following references and owning skills are mandatory command contracts, not optional background reading. Before running a command in the table, read its matching row.
-Per-frame red flags (each maps to a specific failure mode the static gates miss):
+| Need | Reference |
+| -------------------------------------------------------------------------------------- | ------------------------------------- |
+| `init`, `capture`, `skills` | `references/init-and-scaffold.md` |
+| `lint`, `check`, motion sidecars, `snapshot` | `references/lint-validate-inspect.md` |
+| `compare`, `grade-compare`, variable-driven `render --batch` | `references/compare-and-batch.md` |
+| `beats` for an existing project's Studio beat grid | `references/beats.md` |
+| `preview`, `play`, `render`, `publish`, Studio context, feedback | `references/preview-render.md` |
+| `doctor`, browser management | `references/doctor-browser.md` |
+| `auth`, HeyGen-hosted cloud rendering, and template variables | `references/cloud.md` |
+| AWS Lambda deployment and rendering | `references/lambda.md` |
+| Google Cloud Run deployment and rendering | `references/cloudrun.md` |
+| `info`, `upgrade`, `compositions`, `docs`, `benchmark`, telemetry, media preprocessing | `references/upgrade-info-misc.md` |
-| What you see | Root cause |
-| ---------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- |
-| Text shows up tiny + unstyled in the top-left corner | `<style>` block left in `<head>` outside `<template>` (Pitfall 1) — no CSS reached live DOM |
-| SVG/icon elements blown up to canvas-size | Same as above — no width/height constraints applied |
-| Hero element of the scene is missing entirely; only background + watermark visible | Host-id ≠ template id (Pitfall 2) — timeline never ran, frame captured at initial state |
-| Snapshot command logs `Sub-composition timelines not registered after 45000ms` | Pitfall 2 — direct confirmation |
+For composition variables, also read `/hyperframes-core` → `references/variables-and-media.md`. For `hyperframes add` and `hyperframes catalog`, use `/hyperframes-registry`. Before `hyperframes present`, read `/slideshow`; before `hyperframes keyframes`, read `/hyperframes-keyframes`. For TTS, transcription, captions, or background removal choices, use `/media-use`.
+
+The specialized commands are deliberately documented by their owning workflows:
+
+```bash
+npx hyperframes present <project-dir> --port 3004 --no-open
+npx hyperframes beats <project-dir> --json
+npx hyperframes keyframes <project-dir> --json
+```
-`snapshots/` can be deleted after eyeballing; the user-facing final render is a separate pass with `npx hyperframes render`.
+`present` serves a navigable deck with presenter and audience synchronization. `beats` is the standalone Studio beat-grid utility defined in `references/beats.md`. `keyframes` surfaces seek-safe animation and motion-path diagnostics.
diff --git a/skills/hyperframes-cli/references/beats.md b/skills/hyperframes-cli/references/beats.md
new file mode 100644
index 0000000000..da3c05f507
--- /dev/null
+++ b/skills/hyperframes-cli/references/beats.md
@@ -0,0 +1,19 @@
+# Generate a project beat grid
+
+Use `hyperframes beats` when an existing HyperFrames project needs the Studio-compatible beat file for its music track. This is a CLI utility, not a complete video workflow.
+
+```bash
+npx hyperframes beats
+npx hyperframes beats ./my-video
+npx hyperframes beats ./my-video --json
+```
+
+The project must contain a local music `<audio>` source. Mark it with `data-timeline-role="music"`; an id containing `music`, `bgm`, or `soundtrack` is also recognized. The command analyzes that file in headless Chrome and writes `beats/<audio-relative-path>.json`.
+
+If no beats are detected, the command fails and writes nothing. If Chrome is unavailable, run:
+
+```bash
+npx hyperframes browser ensure
+```
+
+For a complete beat-synced video, route through `/music-to-video`. That workflow owns a different audio-driven pipeline and its `audiomap.json`; do not replace its analyzer with this Studio utility.
diff --git a/skills/hyperframes-cli/references/cloud.md b/skills/hyperframes-cli/references/cloud.md
index 6dcacea2bc..3681ad59e9 100644
--- a/skills/hyperframes-cli/references/cloud.md
+++ b/skills/hyperframes-cli/references/cloud.md
@@ -7,11 +7,12 @@ npx hyperframes auth login # one-time sign-in
npx hyperframes cloud render # zip, upload, render, download
```
-## When to use cloud vs lambda vs local
+## When to use managed cloud, Lambda, Cloud Run, or local
- **`hyperframes render`** (local): fastest iteration loop, use while authoring.
- **`hyperframes cloud render`**: zero-infra. HeyGen runs the render and you pay per credit. This is the default answer to "render in the cloud" when you don't want to manage Chrome/FFmpeg/AWS.
- **`hyperframes lambda render`**: bring-your-own-AWS distributed rendering with chunked parallelism. Only worth it when you've already invested in AWS (see `lambda.md`).
+- **`hyperframes cloudrun render`**: bring-your-own-GCP distributed rendering through Cloud Run and Workflows. Use only when GCP ownership is explicit (see `cloudrun.md`).
## Authentication
@@ -63,7 +64,7 @@ npx hyperframes cloud render --quality high --fps 60
## Templates and variables
-Cloud rendering supports [variables](../SKILL.md#variables-parametrized--template-renders): declare `data-composition-variables` on the composition, then fill them at render time.
+Cloud rendering supports [composition variables](../../hyperframes-core/references/variables-and-media.md#variables): declare `data-composition-variables` on the composition, then fill them at render time.
```bash
npx hyperframes cloud render --variables '{"title":"Q4 Recap","theme":"dark"}'
@@ -81,7 +82,7 @@ npx hyperframes cloud render --asset-id asst_abc123 --variables '{"name":"Ada"}'
npx hyperframes cloud render --asset-id asst_abc123 --variables '{"name":"Linus"}'
```
-For high-volume personalized batches, the Lambda path adds a JSONL fan-out (see `lambda.md`). The full variables schema (types, declarative bindings, sub-composition overrides, precedence) lives in the `hyperframes-core` skill.
+For high-volume personalized batches, both self-managed paths provide JSONL fan-out: AWS Lambda (`lambda.md`) and Google Cloud Run (`cloudrun.md`). The full variables schema (types, declarative bindings, sub-composition overrides, precedence) lives in the `hyperframes-core` skill.
## Fire-and-forget and webhooks
diff --git a/skills/hyperframes-cli/references/cloudrun.md b/skills/hyperframes-cli/references/cloudrun.md
new file mode 100644
index 0000000000..7ae21e35c7
--- /dev/null
+++ b/skills/hyperframes-cli/references/cloudrun.md
@@ -0,0 +1,62 @@
+# Cloud Run rendering on Google Cloud
+
+Use `hyperframes cloudrun` only when the user explicitly wants self-managed Google Cloud infrastructure. It deploys Cloud Run, Workflows, and Cloud Storage. For a managed default use `hyperframes cloud`; for AWS use `hyperframes lambda`.
+
+## Prerequisites
+
+- `gcloud` is authenticated and the target project has billing enabled.
+- Terraform 1.5 or newer is on `PATH`.
+- Docker or permission to use Cloud Build is available.
+
+## Lifecycle
+
+```bash
+npx hyperframes cloudrun deploy --project <gcp-project> --region us-central1
+npx hyperframes cloudrun sites create ./project
+npx hyperframes cloudrun render ./project --width 1920 --height 1080 --wait
+npx hyperframes cloudrun progress <execution-name>
+npx hyperframes cloudrun destroy --project <gcp-project>
+```
+
+`deploy` enables the required Google APIs, builds or accepts a container image, applies the bundled Terraform module, and stores the resulting coordinates in `~/.hyperframes/cloudrun-state.json`. Use deploy flags such as `--image`, `--repo`, `--cpu`, `--memory`, `--max-instances`, and `--timeout` only when the infrastructure needs those overrides.
+
+`sites create` uploads a content-addressed project archive for reuse by `render-batch`; pass its `--site-id` to that command to skip the batch upload. Single `cloudrun render` currently resolves the project from its directory and does not consume `--site-id`. Both render commands require `--width` and `--height`; supported output formats are `mp4`, `mov`, `png-sequence`, and `webm`. Use `--output-resolution 4k` to supersample an authored composition without changing its layout dimensions.
+
+Common render flags are `--fps 24|30|60`, `--quality draft|standard|high`, `--codec h264|h265` for MP4, `--chunk-size`, `--max-parallel-chunks`, `--target-chunk-frames`, `--render-id`, `--output-key`, `--wait`, and `--wait-interval-ms`. Use `--json` for machine-readable output.
+
+For a variable-driven single render:
+
+```bash
+npx hyperframes cloudrun render ./template \
+ --width 1920 --height 1080 \
+ --variables-file ./alice.json \
+ --strict-variables \
+ --wait
+```
+
+Use exactly one of `--variables` and `--variables-file`. Read [`variables-and-media.md`](../../hyperframes-core/references/variables-and-media.md#variables) for the composition-side contract.
+
+## JSONL batches
+
+```bash
+npx hyperframes cloudrun render-batch ./template \
+ --batch ./users.jsonl \
+ --width 1920 --height 1080 \
+ --max-concurrent 10 \
+ --site-id <site-id> \
+ --json
+```
+
+Each nonblank line must contain an `outputKey`; `variables` is optional:
+
+```json
+{ "outputKey": "renders/alice.mp4", "variables": { "name": "Alice" } }
+```
+
+- `--max-concurrent` defaults to `50` and limits in-flight executions. `--max-parallel-chunks` separately limits chunks inside one render.
+- `--dry-run` parses the file and prints `would-start` rows without starting executions.
+- The template uploads once unless `--site-id` is supplied.
+- Per-entry start errors remain visible and make the command exit nonzero.
+- Do not rely on `--strict-variables` for `cloudrun render-batch`: the current command accepts the flag but does not validate batch rows. Validate the JSONL variable objects against the composition schema before dispatch. The strict gate does work for single `cloudrun render`.
+
+`render` without `--wait` returns an execution name. Use `cloudrun progress <execution-name>` until it succeeds, then verify the reported GCS output. `destroy` removes the Terraform-managed stack and its scratch bucket; preserve any deliverables that must outlive the stack.
diff --git a/skills/hyperframes-cli/references/compare-and-batch.md b/skills/hyperframes-cli/references/compare-and-batch.md
new file mode 100644
index 0000000000..c541cca9f1
--- /dev/null
+++ b/skills/hyperframes-cli/references/compare-and-batch.md
@@ -0,0 +1,105 @@
+# Compare and batch rendering
+
+Use these commands for deliberate visual comparison or variable-driven template output. They do not replace `lint`, `check`, final preview approval, or output verification.
+
+## Contents
+
+- [Compare projects or variants](#compare-projects-or-variants)
+- [Compare color grades](#compare-color-grades)
+- [Batch template renders](#batch-template-renders)
+
+## Compare projects or variants
+
+Render the same timestamp from two or more project directories or HTML files into one labeled contact sheet:
+
+```bash
+npx hyperframes compare <path-a> <path-b> [<path-c> ...] \
+ --at <seconds> \
+ --labels baseline,candidate \
+ --out compare.png \
+ --cols 2
+```
+
+Useful options:
+
+- `--at <seconds>` selects the shared comparison time.
+- `--labels <a,b,...>` labels cells in input order.
+- `--out <file>` chooses the sheet path.
+- `--cols <n>` controls its grid.
+- `--json` returns machine-readable results.
+- `--timeout <ms>` changes the per-variant render-ready timeout.
+
+One sheet accepts at most 16 variants. Extra inputs are truncated with a warning; split larger comparisons into several runs.
+
+`compare` is a visual review surface, not a quality gate. Run it when checking a baseline against a candidate, comparing implementation variants, or verifying that a repair preserves the intended look. Inspect the generated image; do not treat command success as visual approval.
+
+## Compare color grades
+
+Create grade candidates from a source frame:
+
+```bash
+npx hyperframes grade-compare \
+ --for frame.png \
+ --grades grades.json \
+ --project . \
+ --out grade-compare.png
+```
+
+`grades.json` is an array of labeled HyperFrames grading blocks:
+
+```json
+[{ "label": "warm", "grading": { "temperature": 0.2, "contrast": 0.1 } }]
+```
+
+Or compare explicit LUT files:
+
+```bash
+npx hyperframes grade-compare \
+ --for source.mp4 \
+ --luts warm.cube,cool.cube \
+ --out grade-compare.png
+```
+
+- `--for` accepts an image or a video. For video input, the command extracts the first frame.
+- Supply exactly one candidate source: `--grades <json>` or `--luts <a.cube,b.cube>`.
+- A neutral baseline is included by default; pass `--no-baseline` only when the baseline is not a useful reference.
+- The command accepts at most 16 candidate grades. With the default neutral baseline, the sheet may contain 17 cells. Extra candidates are truncated with a warning; split larger sets into several runs.
+- `--timeout <ms>` changes the render-ready timeout for the generated comparison composition.
+- Use `--json` for machine-readable output.
+
+This command helps select a grade. It does not apply the selected grade to the composition or replace `/media-use` provenance and LUT validation.
+
+## Batch template renders
+
+`render --batch` accepts either a JSON array of variable objects or an object with a `rows` array:
+
+```json
+{
+ "rows": [
+ { "name": "alpha", "headline": "Hello" },
+ { "name": "beta", "headline": "Welcome" }
+ ]
+}
+```
+
+Declare the variables in the composition, then run:
+
+```bash
+npx hyperframes render \
+ --batch rows.json \
+ --output "renders/{name}.mp4" \
+ --batch-concurrency 1 \
+ --strict-variables
+```
+
+Batch rules:
+
+- Do not combine `--batch` with `--variables` or `--variables-file`; each row is the variable set for one render.
+- If `--output` is omitted, the generated filename includes `{index}` so rows remain unique.
+- Output templates support `{index}` and row keys containing letters, numbers, `_`, `.`, or `-`. A placeholder value must be a string, number, or boolean; `null`, objects, and arrays are invalid. Missing placeholders and output collisions are errors.
+- `--batch-concurrency` defaults to `1`. Raise it conservatively because each render already uses workers.
+- `--batch-fail-fast` stops scheduling after the first failure. Without it, independent rows keep running and failures remain visible in the manifest.
+- `--strict-variables` validates every row before rendering and aborts before output when the declared variable contract is violated.
+- `--json` emits progress events suitable for agents and CI.
+
+The command writes `manifest.json` in the common output directory and updates it throughout the run. It records each row's variables, status, output, error, and timing. Completion means the manifest has no failed rows and every completed output exists, is non-empty, and has a plausible duration.
diff --git a/skills/hyperframes-cli/references/lambda.md b/skills/hyperframes-cli/references/lambda.md
index 85b6158b34..9c5639f0c7 100644
--- a/skills/hyperframes-cli/references/lambda.md
+++ b/skills/hyperframes-cli/references/lambda.md
@@ -1,6 +1,21 @@
-# lambda — Cloud Rendering on AWS Lambda
+# Lambda rendering on AWS
-Deploy HyperFrames distributed rendering to AWS Lambda and drive renders from your laptop or CI. Wraps `@hyperframes/aws-lambda` SDK plus AWS SAM. End-to-end is three commands:
+Use `hyperframes lambda` when the user explicitly wants self-managed AWS infrastructure or needs distributed rendering. It wraps `@hyperframes/aws-lambda` and AWS SAM.
+
+## Contents
+
+- [Choose Lambda or local rendering](#choose-lambda-or-local-rendering)
+- [Prerequisites](#prerequisites)
+- [Deploy](#deploy)
+- [Upload a reusable site](#upload-a-reusable-site)
+- [Render one composition](#render-one-composition)
+- [Render a JSONL batch](#render-a-jsonl-batch)
+- [Inspect progress](#inspect-progress)
+- [Destroy the stack](#destroy-the-stack)
+- [IAM policies](#iam-policies)
+- [State, cost, and cleanup](#state-cost-and-cleanup)
+
+The basic lifecycle is:
```bash
npx hyperframes lambda deploy
@@ -8,7 +23,7 @@ npx hyperframes lambda render ./my-project --width 1920 --height 1080 --wait
npx hyperframes lambda destroy
```
-## When to Use Lambda vs Local Render
+## Choose Lambda or local rendering
- **Local `render`** — dev-loop iteration, single host, anything under a few minutes at 1080p.
- **`lambda render`** — long videos, 4K, large parallel batches, or anything where local Chrome would time out / exhaust RAM. Pay-per-invocation, no idle cost.
@@ -21,9 +36,7 @@ For one-off short renders Lambda is not worth the deploy overhead.
- AWS SAM CLI on `PATH`.
- `bun` on `PATH` (builds the Lambda handler ZIP).
-## Subcommands
-
-### deploy
+## Deploy
```bash
npx hyperframes lambda deploy \
@@ -35,16 +48,17 @@ npx hyperframes lambda deploy \
Builds `packages/aws-lambda/dist/handler.zip` and SAM-deploys the stack (Lambda + Step Functions + S3 + IAM). Idempotent — re-running on the same `--stack-name` is a no-op when nothing changed. Writes `<cwd>/.hyperframes/lambda-stack-<name>.json` so later subcommands don't need to call `describe-stacks`.
-| Flag | Default | Description |
-| --------------- | ------------------------------- | ----------------------------- |
-| `--stack-name` | `hyperframes-default` | CloudFormation stack name |
-| `--region` | `AWS_REGION` env or `us-east-1` | AWS region |
-| `--profile` | `AWS_PROFILE` env | Named AWS credentials profile |
-| `--concurrency` | `8` | Lambda reserved concurrency |
-| `--memory` | `10240` | Lambda memory in MB |
-| `--skip-build` | off | Reuse existing `handler.zip` |
+| Flag | Default | Description |
+| ----------------- | ------------------------------- | -------------------------------------- |
+| `--stack-name` | `hyperframes-default` | CloudFormation stack name |
+| `--region` | `AWS_REGION` env or `us-east-1` | AWS region |
+| `--profile` | `AWS_PROFILE` env | Named AWS credentials profile |
+| `--concurrency` | `8` | Lambda reserved concurrency |
+| `--chrome-source` | `sparticuz` | `sparticuz` or `chrome-headless-shell` |
+| `--memory` | `10240` | Lambda memory in MB |
+| `--skip-build` | off | Reuse existing `handler.zip` |
-### sites create
+## Upload a reusable site
```bash
npx hyperframes lambda sites create ./my-project
@@ -55,7 +69,7 @@ npx hyperframes lambda render ./my-project --site-id=abc1234deadbeef0 ...
Tars + uploads `<projectDir>` to S3 with a content-addressed key. Returns a stable `siteId` you can reuse — re-renders of the same tree skip the upload.
-### render
+## Render one composition
```bash
npx hyperframes lambda render ./my-project \
@@ -71,18 +85,59 @@ Starts a Step Functions execution. Returns immediately with a `renderId` unless
| `--width` / `--height` | Output dimensions in pixels |
| `--output-resolution` | Supersampling preset (engages Chrome `deviceScaleFactor`) — `landscape` / `landscape-4k` / `portrait` / `portrait-4k` / `square` / `square-4k`, plus aliases (`1080p`, `4k`, `uhd`, `hd`, `1080p-portrait`, `4k-portrait`, `1080p-square`, `4k-square`). Use this to render an authored-at-1080p composition at 4K without re-laying-out — see footgun below. |
| `--fps` | `24` / `30` / `60` |
-| `--format` | `mp4` / `mov` / `png-sequence` (default `mp4`) |
+| `--format` | `mp4` / `mov` / `png-sequence` / `webm` (default `mp4`) |
| `--codec` | `h264` / `h265` (mp4 only) |
| `--quality` | `draft` / `standard` / `high` |
| `--chunk-size` | Frames per chunk (default `240`) |
| `--max-parallel-chunks` | Max concurrent chunks (default `16`) |
+| `--target-chunk-frames` | Cap frames per chunk and let the planner add chunks up to the parallel limit |
| `--site-id` | Reuse an existing site (skip upload) |
+| `--execution-name` | Explicit Step Functions execution name |
+| `--output-key` | Explicit final S3 object key |
+| `--variables` | Inline JSON object with composition variable values |
+| `--variables-file` | JSON file containing one composition variable object |
+| `--strict-variables` | Fail when supplied variables are undeclared or have the wrong type |
| `--wait` | Block until completion, stream progress |
+| `--wait-interval-ms` | Poll cadence while waiting (default `5000`) |
| `--json` | Machine-parseable progress snapshot |
**`--width` / `--height` footgun.** Setting `--width 3840 --height 2160` against a composition whose `data-width="1920"` silently produces 1080p — the runtime lays out the page at the composition's authored dimensions and the CLI flags are ignored for layout. To actually output at 4K, use `--output-resolution 4k` (supersamples via `deviceScaleFactor`). The CLI now prints a warning when CLI dimensions disagree with the composition's `data-width` / `data-height` and `--output-resolution` is not set; the warning is suppressed when `--json` is on or `index.html` isn't on disk (`--site-id` flows).
-### progress
+For variable-driven templates, declare the schema in the composition and pass either `--variables` or `--variables-file`, never both. `--strict-variables` checks local project input before any render starts. Also read [`variables-and-media.md`](../../hyperframes-core/references/variables-and-media.md#variables).
+
+## Render a JSONL batch
+
+Use `render-batch` to upload one template once and start one Step Functions execution per nonblank JSONL line:
+
+```bash
+npx hyperframes lambda render-batch ./template \
+ --batch ./users.jsonl \
+ --width 1920 --height 1080 \
+ --max-concurrent 10 \
+ --strict-variables \
+ --json
+```
+
+Each line must be an object with a non-empty `outputKey`. Choose unique keys to prevent outputs from overwriting one another. `variables` and `executionName` are optional:
+
+```json
+{
+ "outputKey": "renders/alice.mp4",
+ "variables": { "name": "Alice" },
+ "executionName": "alice-video"
+}
+```
+
+Batch rules:
+
+- The project is uploaded once unless `--site-id` reuses an earlier upload.
+- `--max-concurrent` defaults to `50` and limits in-flight render executions. `--max-parallel-chunks` separately limits chunks inside each render.
+- `--strict-variables` checks every entry, reports all variable issues, and aborts before AWS calls.
+- `--dry-run` performs no upload or AWS render call. Every manifest row becomes `would-invoke`.
+- The emitted manifest preserves input order and records `inputLine`, `outputKey`, `executionArn`, and `status` (`started`, `would-invoke`, or `failed-to-start`), plus an error when applicable.
+- A per-entry start failure does not hide other rows. Human-output mode exits nonzero when a row fails to start. In `--json` mode the current CLI prints the manifest and exits zero, so gate on every row's `status`, not the process code alone. Dispatch success is not render completion; inspect each execution with `progress`.
+
+## Inspect progress
```bash
npx hyperframes lambda progress hf-render-abcd1234
@@ -91,7 +146,7 @@ npx hyperframes lambda progress arn:aws:states:us-east-1:...:execution:...
Prints one snapshot — overall percent, frames rendered, Lambda invocations, accrued cost, and any errors. Accepts a bare `renderId` (resolved against the stack's state-machine ARN) or a full SFN execution ARN.
-### destroy
+## Destroy the stack
```bash
npx hyperframes lambda destroy
@@ -106,13 +161,13 @@ A subset of failures the Step Functions state machine short-circuits instead of
- **`ChromeBinaryUnavailableError`** — `@sparticuz/chromium` returned an empty/missing executable path. A prior chunk hit `Sandbox.Timedout` mid-extraction and the warm instance is wedged until the execution environment recycles. Remedy: bump a Lambda env var (forces a new exec env) or `lambda deploy` again. Not a transient render failure; retries will burn budget on the same wedged instance.
- **`FFMPEG_VERSION_MISMATCH`** / **`PLAN_HASH_MISMATCH`** — planner / executor version drift. Re-deploy.
-### policies
+## IAM policies
Print or validate the minimum IAM permissions the CLI needs.
```bash
npx hyperframes lambda policies user # inline policy for an IAM user
-npx hyperframes lambda policies role --principal=cloudformation # { TrustRelationship, InlinePolicy }
+npx hyperframes lambda policies role # { TrustRelationship, InlinePolicy }
npx hyperframes lambda policies validate ./infra/iam/hf-deploy.json # CI gate
```
@@ -120,12 +175,10 @@ npx hyperframes lambda policies validate ./infra/iam/hf-deploy.json # CI gate
The default action set is deliberately broad (`Resource: "*"`) because CloudFormation creates new ARNs on every adopter's first deploy. Tighten `Resource` after that first run if security posture requires it.
-## State Files
+## State, cost, and cleanup
`hyperframes lambda` stores per-stack metadata under `<cwd>/.hyperframes/lambda-stack-<name>.json` (bucket name, state-machine ARN, region). Not secret, but AWS-account-identifying. Commit it to a repo or `.gitignore` it per your workflow.
-## Cost and Cleanup
-
- `lambda destroy` removes the SAM stack but **leaves the S3 bucket** (`Retain`). Delete it manually if you want the storage back.
- Lambda billing is per-invocation + duration. `progress` reports the accrued cost.
- `--concurrency` caps parallel Lambda invocations — keep it aligned with your account quota.
diff --git a/skills/hyperframes-cli/references/lint-validate-inspect.md b/skills/hyperframes-cli/references/lint-validate-inspect.md
index f5a903a18c..984fdb5bc2 100644
--- a/skills/hyperframes-cli/references/lint-validate-inspect.md
+++ b/skills/hyperframes-cli/references/lint-validate-inspect.md
@@ -1,12 +1,12 @@
# lint, check, snapshot
-The correctness pipeline: `lint` (static, fast) while iterating, then `check` (one browser session: runtime + layout + motion + contrast) as the gate. `snapshot` is the standalone utility for capturing still frames and zoomed crops. `validate`, `inspect`, and `layout` still run but are deprecated: `check` covers all of them in one invocation.
+Use `lint` for fast static feedback while iterating. Use `check` as the required final gate: it reruns the same linter, then audits runtime, layout, motion, and contrast in one browser session. Do not chain a redundant standalone `lint` immediately before `check`. `snapshot` is the standalone utility for capturing still frames and zoomed crops. `validate`, `inspect`, and `layout` still run but are deprecated: `check` covers all of them in one invocation.
## Discipline (motion-heavy work)
When the composition is animation-driven, run the checks before you reach for `preview` or `render`:
-- Run `lint` after the first HTML pass, earlier rather than later.
+- Run `lint` after the first HTML pass for early feedback. It is an iteration aid, not a separate final gate.
- Run `check --snapshots` at the first full pass: the overview frames and per-finding crops show you what the auditor saw.
- Look at the PNGs before tuning automated warnings: your eye catches what the auditor misses, and the auditor catches what your eye misses.
- Treat layout errors as defects unless a snapshot proves the layering is intentional, in which case mark it with `data-layout-allow-overflow` / `data-layout-allow-overlap` / `data-layout-allow-occlusion`.
diff --git a/skills/hyperframes-cli/references/preview-render.md b/skills/hyperframes-cli/references/preview-render.md
index 13ce649b1d..e3ff495244 100644
--- a/skills/hyperframes-cli/references/preview-render.md
+++ b/skills/hyperframes-cli/references/preview-render.md
@@ -21,6 +21,10 @@ http://localhost:<port>/#project/<project-name>
Use the actual port and project directory name; treat `index.html` as source-code context, not the preview surface. For example, after `npx hyperframes preview --port 3017` in `codex-openai-video`, report `http://localhost:3017/#project/codex-openai-video`.
+To land the user on the **Storyboard view** instead of the timeline, put `?view=storyboard` ahead of the hash: `http://localhost:<port>/?view=storyboard#project/<project-name>`. Hand this URL whenever the storyboard is the thing to review and nothing is assembled yet — before `index.html` exists, the timeline stage has nothing to show, so the bare project URL opens on an empty player.
+
+Two ways a handed URL turns out dead — check both before handing it back: the URL is missing its `#project/<project-name>` hash (Studio loads but has no project to open), or the server is not actually running. `preview` is a long-running process — start it from the project directory as a background task, and if that task reports it exited ("completed"), the server is down: restart it, don't hand out the link.
+
### Agent context from Studio selection
`preview --context` and `preview --selection` are the agent bridge into a running Studio session. They do **not** start a new server; they find the active preview server for the current project, read agent-useful state from Studio, print it, and exit.
diff --git a/skills/hyperframes-core/SKILL.md b/skills/hyperframes-core/SKILL.md
index 253a65b67e..20d9ed4ddb 100644
--- a/skills/hyperframes-core/SKILL.md
+++ b/skills/hyperframes-core/SKILL.md
@@ -11,21 +11,24 @@ This skill is the **technical contract** — how to build one hyperframes projec
## References
-| File | Read it to… |
-| ------------------------------------ | ----------------------------------------------------------------------------------------------------------------------- |
-| `references/minimal-composition.md` | start from the smallest renderable composition skeleton |
-| `references/composition-patterns.md` | choose monolithic vs modular; structure a modular `index.html`; pick a sub-comp archetype |
-| `references/data-attributes.md` | look up any `data-*` (root / clip / sub-comp host / legacy aliases); use `class="clip"` |
-| `references/tracks-and-clips.md` | pick `data-track-index`, handle same-track overlap / z-index, time a clip relative to another |
-| `references/sub-compositions.md` | wire a sub-composition (host attrs, `<template>`, per-instance vars) and animate inside it |
-| `references/variables-and-media.md` | declare variables; place `<video>`/`<audio>`, set volume, trim |
-| `references/determinism-rules.md` | build a seekable timeline; determinism bans; the animatable-property allowlist; layout / text fit |
-| `references/full-screen-motion.md` | author full-frame motion with shared backgrounds |
-| `references/storyboard-format.md` | author a `STORYBOARD.md` plan (+ the parsed manifest) |
-| `references/brief-contract.md` | conduct a creation workflow's intake — interaction mode (collaborative / autonomous), shared brief fields, asking rules |
-| `references/script-format.md` | author the optional `SCRIPT.md` locked narration |
-| `references/subagent-dispatch.md` | map subagent dispatch verbs (parallel fan-out / background / wait) to your harness |
-| `references/tailwind.md` | work in a Tailwind v4 project (`init --tailwind`; runtime contract differs from Studio's v3) |
+| File | Read it to… |
+| ------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| `references/minimal-composition.md` | start from the smallest renderable composition skeleton |
+| `references/composition-patterns.md` | choose monolithic vs modular; structure a modular `index.html`; pick a sub-comp archetype |
+| `references/data-attributes.md` | look up any `data-*` (root / clip / sub-comp host / legacy aliases); use `class="clip"` |
+| `references/tracks-and-clips.md` | pick `data-track-index`, handle same-track overlap / z-index, time a clip relative to another |
+| `references/sub-compositions.md` | wire a sub-composition (host attrs, `<template>`, per-instance vars) and animate inside it |
+| `references/variables-and-media.md` | declare variables; place `<video>`/`<audio>`, set volume, trim |
+| `references/determinism-rules.md` | build a seekable timeline; determinism bans; the animatable-property allowlist; layout / text fit |
+| `references/full-screen-motion.md` | author full-frame motion with shared backgrounds |
+| `references/storyboard-format.md` | author a `STORYBOARD.md` plan (+ the parsed manifest) |
+| `references/review-loop.md` | run the plan → sketch → build review passes on a live board — shared by every storyboard-planning workflow |
+| `references/production-loop.md` | take an approved plan to a delivered video — the stage dependencies (audio, frames, assembly, transitions, captions, verify, deliver) a freeform build follows directly |
+| `references/brief-contract.md` | the brief's ground rules — mode derivation (collaborative / autonomous), shared field registry, question invariants (the asking itself lives in `/hyperframes` → the intent layer) |
+| `references/brief-format.md` | author `BRIEF.md` — the confirmed intent document a workflow's Setup writes and every later step reads |
+| `references/script-format.md` | author the optional `SCRIPT.md` locked narration |
+| `references/subagent-dispatch.md` | map subagent dispatch verbs (parallel fan-out / background / wait) to your harness |
+| `references/tailwind.md` | work in a Tailwind v4 project (`init --tailwind`; runtime contract differs from Studio's v3) |
For animation runtime specifics (GSAP API, Lottie, Three.js, etc.) go to `hyperframes-animation` → `adapters/<runtime>.md`.
@@ -43,18 +46,18 @@ File shape, host wiring, and the pre-render checklist → `references/sub-compos
### Root must be sized (silent layout bug)
-The standalone root needs an explicit **sized box** (`width`/`height` in px), and every ancestor down to a `height:100%` element must have a resolved height — otherwise a flex/`100%` child collapses to ~0 and content piles into the top-left corner. `lint`/`validate`/`inspect` do **not** catch this. Skeleton → `references/minimal-composition.md`.
+The standalone root needs an explicit **sized box** (`width`/`height` in px), and every ancestor down to a `height:100%` element must have a resolved height — otherwise a flex/`100%` child collapses to ~0 and content piles into the top-left corner. Do not rely on automated gates alone to catch this; inspect a snapshot. Skeleton → `references/minimal-composition.md`.
### One paused timeline
Each composition registers **exactly one** `gsap.timeline({ paused: true })` at `window.__timelines["<id>"]` (key = root `data-composition-id`), built **synchronously** at page load. Render duration = root `data-duration`, not timeline length. Don't manually nest sub-timelines into the host. Full contract (incl. non-GSAP runtimes) → `references/determinism-rules.md` + `hyperframes-animation/adapters/`.
-### Non-negotiable rules (silent bugs `lint`/`validate`/`inspect` won't catch)
+### Non-negotiable rules (silent bugs automated gates may miss)
Surfaced here; full rationale in the linked reference. Do not violate:
- No render-time clocks / unseeded `Math.random` / network / input-state; no `repeat: -1` (use a finite count). → `determinism-rules.md`
-- Animate only the visual-property allowlist; never `display`/`visibility`; no `gsap.set` on later-scene clips. → `determinism-rules.md`
+- Animate only the visual-property allowlist; never tween `display` or raw `visibility`. GSAP `autoAlpha` and zero-duration timeline boundary sets are the only visibility exceptions, and only on non-clip elements or wrappers inside a clip. The framework alone controls `.clip` visibility. Do not `gsap.set` later-scene clips at page load. → `determinism-rules.md`
- No `<br>` in body text; transformed elements must be block-level + sized; pulsing absolute decoratives need peak clearance. → `determinism-rules.md`
- `<video>`/`<audio>` must be a **direct child of the host root** (never inside a sub-comp `<template>`/wrapper); the framework owns playback. → `variables-and-media.md`
- Every `id` must be unique across the **assembled** page; inside a sub-comp, prefix ids with the composition id (`#<id>-hero`). Duplicate `<video>`/`<img>` ids render **blank** — the producer injects frames by `getElementById`, and cross-file dupes slip past `lint`. → `composition-patterns.md`
diff --git a/skills/hyperframes-core/references/brief-contract.md b/skills/hyperframes-core/references/brief-contract.md
index 5013a29af1..63b8578388 100644
--- a/skills/hyperframes-core/references/brief-contract.md
+++ b/skills/hyperframes-core/references/brief-contract.md
@@ -1,48 +1,108 @@
-# Brief contract — interaction mode, shared brief fields, and question rules
+# Brief contract
-Every creation workflow runs its intake step (Step 0 / brief) against this contract. It defines three things: the **interaction mode** (which controls all later gates, not just the brief), the **shared brief fields**, and the **question rules**. Each workflow maps these fields to its own values in its SKILL.md — including its enums, recommendation logic, and extra inputs. This file never includes workflow-specific content. Workflows without a real brief, such as `/motion-graphics`, use only § 1.
+The intent layer (`/hyperframes` § 4) 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/route-briefs.md`.
-## 1. Interaction mode
+## Contents
-There are two modes. Default: **collaborative**.
+- [Run shape](#1-run-shape)
+- [Shared fields](#2-shared-fields)
+- [Question protocol](#3-question-protocol)
-**Signals.**
+## 1. Run shape
-- **Ongoing autonomous signals** — "autonomous", "surprise me", "decide for me", "just build it", "don't ask, just go", "LFG": the whole flow switches to autonomous from this point on.
-- **One-time acceptance** — a bare "go" / "looks good" at a gate accepts only that gate's defaults; the mode does not change.
-- The mode is set **once** — by a signal in the request, or by the brief's first question (§ 3) — and **carries forward. No later step asks again.** Once a storyboard exists, record it in `STORYBOARD.md` frontmatter (`mode: autonomous`). When resuming an existing project, read `mode` from that frontmatter first — a recorded mode counts as already set, so don't ask again.
-- **Mid-run switch**: "stop asking / just finish it" → autonomous for the rest of the run. Clear feedback on a heads-up → collaborative resumes at the next gate.
+Three terms describe different concerns. Do not substitute one for another.
-**Gate types.** Autonomous mode changes only the first two types:
+| Term | Values | Owns |
+| ------------ | ------------------------------- | --------------------------------------------------------------------------------------------- |
+| `flow` | `automation` or `companion` | Who drives execution. `companion` always executes in `/general-video`. |
+| `storyboard` | `yes` or `no` | Whether the live board is used for plan and layout review. |
+| `mode` | `collaborative` or `autonomous` | How later preference and checkpoint gates behave. The user never chooses this label directly. |
-1. **Preference gates** (which preset, voice, caption identity, want a preview?) — autonomous: decide yourself and state the decision with a one-line reason. Never stay silent.
-2. **Checkpoint gates** (storyboard approval, pre-render review) — autonomous: post the same summary you would have asked about as an inline heads-up, then continue. One exception: before rendering, ask once — preview first, or render (§ 3).
-3. **Quality gates** (`hyperframes check`, capture completeness, fetch failures, workflow-specific verification checklists) — never skip these in any mode. Errors still stop the run. Reasoning like "autonomous means bias toward action, so I'll skip verification" misuses the mode — bias toward action applies to deciding _what to build_, not _whether to verify_.
-4. **Routing and sign-in decisions** — wrong routing is a quality problem: an ambiguous-intent confirmation, such as `/slideshow`'s "is this a deck?", still happens in autonomous mode. Auth sign-in follows `/media-use` → Preflight: show the status as-is; collaborative waits for the user's choice, while autonomous notes it and continues offline.
+Derive `mode` once from the confirmed run shape:
-**Autonomous is not silent.** Every question absorbed by the mode becomes a decision with a receipt — state the choice and its one-line reason inline as you go. Final delivery always includes the contact sheet, so review happens after the fact instead of not happening at all.
+| `flow` | `storyboard` | Derived `mode` |
+| ------------ | ------------ | --------------- |
+| `companion` | either value | `collaborative` |
+| `automation` | `yes` | `collaborative` |
+| `automation` | `no` | `autonomous` |
-## 2. Field registry
+Default 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.
-The shared brief fields. Each workflow's SKILL.md declares which fields it uses, its own value set, how it derives recommendations, and — decisively — marks each field **ask** (always gets its own question) or **state** (stated in the intro text, never asked). The binding table's ask/state marking is authoritative; the default policies below apply only when a binding doesn't say otherwise. If a workflow does not use a field, such as `/music-to-video` having no narration, that field is simply absent from its binding — don't ask about it.
+### Signals and persistence
-| Field | Meaning | Default policy |
-| ------------- | --------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| `mode` | collaborative / autonomous (§ 1) | detect signals; never ask again |
-| `destination` | where the video will play (X / LinkedIn feed, YouTube, TikTok, embed) | infer from the request; if unknown **and** it would change aspect or type scale, include ONE question in the brief |
-| `aspect` | canvas | derive from destination — social **feed** (X / LinkedIn / Instagram) → square `1080x1080`; TikTok / Reels / Shorts → `1080x1920`; YouTube / website embed / unknown-desktop → `1920x1080`. State the derivation; never ask twice |
-| `length` | target duration | the workflow derives its own recommendation and states the reason |
-| `language` | narration + captions | use the user's language — state it, don't ask |
-| `audience` | who will watch | infer from the input; confirm only when it would change the beats |
-| `message` | the ONE thing the video must communicate | derive it and echo it in the brief — if the message cannot be stated in one sentence, the video is not ready for storyboarding |
-| `angle` | what kind of story (workflow enum) | workflow-specific values; recommend one with a receipt |
-| `narration` | yes / minimal / no (+ workflow slots such as `VO_MODE`) | workflow-specific |
+- 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.
+- A bare “go” or “looks good” at a checkpoint accepts that checkpoint only. It does not change mode.
+- 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.
+- 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.
+- Resume collaborative checkpoints only after an explicit signal such as “let's review together”; ordinary feedback does not change mode.
-## 3. Question rules
+### Gate behavior
-The executable question script lives in each workflow's Step 0 as a literal two-round template. This section defines only the invariants that script satisfies:
+| Gate | Collaborative | Autonomous |
+| ------------------------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- |
+| Preference: preset, voice, caption identity | Ask when the workflow marks it as required. | Decide and state the choice with a one-line reason. |
+| Checkpoint: plan, sketches, pre-render review | Ask and wait. | Post the same summary, then continue. |
+| Quality: fetch completeness, `lint`, `hyperframes check`, workflow verification | Run and stop on errors. | Run and stop on errors. |
+| Routing ambiguity | Resolve explicitly; a wrong route changes the deliverable. | Same requirement. |
+| 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. |
-- **Round 1 asks the mode** — one question, skipped when the request already carried a signal. Autonomous → no further questions: state the locked brief (all fields + receipts) as a heads-up and build straight through; the one remaining question, before render, is "preview first, or render?". Collaborative → Round 2.
-- **Round 2 asks the workflow's ask-marked fields** — one question per field, recommended option first, each with its receipt. Skip a question only when the user already answered that field in their request; inference is not an answer.
-- **Receipts.** Every recommended option states its basis — "~40s — small change, +44/−13 across 12 files"; "square 1:1 — you named the X/LinkedIn feed as the destination".
-- **Channel.** Native question UI when the environment has one; otherwise plain text as one numbered list. "go" accepts all defaults.
+Autonomous 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.
+
+Rendering remains user-gated in both modes. After checks pass, collaborative runs ask “render now, or what changes?” Autonomous runs ask “preview first, or render?” Render only after the answer.
+
+### Studio comments
+
+Checkpoint feedback may arrive in chat or in `.hyperframes/frame-comments.json` (format: `storyboard-format.md`). When the user replies to a checkpoint, read that file before interpreting the chat reply. Apply only the named frame changes, delete the comments file after handling it, and re-present the affected frames. A board submission does not notify the agent, so tell the user to reply in chat after submitting comments.
+
+Autonomous 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.
+
+## 2. Shared fields
+
+Ask 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.
+
+| Field | Meaning | Policy |
+| ------------- | ---------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- |
+| `flow` | Who drives execution | Ask at the end of intent capture when the route supports both flows. An autonomous signal answers it. |
+| `storyboard` | Whether to review on the live board | Ask before `flow` when the route supports a board. A storyboard request answers it. |
+| `destination` | Where the video will play | Infer from the request. Ask only when unknown and the answer changes aspect, type scale, or composition. |
+| `aspect` | Canvas size | Derive from destination: social feed → `1080x1080`; TikTok/Reels/Shorts → `1080x1920`; YouTube/website/desktop → `1920x1080`. State the derivation. |
+| `length` | Target duration | Let the workflow recommend a range supported by the material; include the reason. |
+| `language` | Narration and caption language | Use the user's language and state it. |
+| `audience` | Who will watch | Infer when clear. Ask only when a different answer changes the story or terminology. |
+| `message` | The one thing the video must communicate | Derive and echo one sentence. Do not storyboard until this is clear. |
+| `angle` | Route-specific story shape | Recommend one route-defined option with a reason. |
+| `narration` | `yes`, `minimal`, or `no`, plus route-specific modes | Follow the selected route. |
+
+### Remembered defaults
+
+Let `<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:
+
+```bash
+node <MEDIA_DIR>/scripts/prefs.mjs get --hyperframes <MEMORY_ROOT> --json
+```
+
+For 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.
+
+A 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.
+
+Record 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.
+
+The 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.
+
+## 3. Question protocol
+
+Follow these invariants:
+
+1. Ask only unanswered fields that materially affect the output.
+2. Ask one field per message and wait for its answer before asking the next field.
+3. 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.
+4. Skip a question when the current request already answers it. Inference alone is not an answer.
+5. Ask `storyboard` and then `flow` last, only for routes that support them.
+6. Announce deferred questions before hand-off; do not surprise the user later.
+7. When an autonomous signal appears, ask no remaining preference or checkpoint questions. State the completed brief and the reasons for decisions, then build.
+8. 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.
+9. 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.
+10. The hand-off summary separates fields the user stated from fields that were inferred or defaulted, with receipts on both.
+11. Revision is not confirmation: after any correction to the summary, present the updated summary and confirm before executing.
+
+At 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.
diff --git a/skills/hyperframes-core/references/brief-format.md b/skills/hyperframes-core/references/brief-format.md
new file mode 100644
index 0000000000..564bb30001
--- /dev/null
+++ b/skills/hyperframes-core/references/brief-format.md
@@ -0,0 +1,72 @@
+# Brief format — `BRIEF.md`
+
+Defines the **intent document** — the file a confirmed brief becomes. The questions that fill it live in the intent layer (`/hyperframes` § 4 + its `references/route-briefs.md`); the field semantics live in `brief-contract.md` § 2. This file defines only the artifact: its shape, its home, and its lifecycle.
+
+`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).
+
+## Frontmatter — the confirmed fields
+
+YAML 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.
+
+| Key | Meaning | Example |
+| ------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | --------------------------- |
+| `workflow` | the executing workflow (companion runs record `general-video`) | `faceless-explainer` |
+| `flow` | `automation` — the matched workflow's pipeline · `companion` — co-creation in `/general-video` | `automation` |
+| `storyboard` | `yes` — plan, sketches, and build reviewed on the live board (`review-loop.md`) · `no` — one shot from the confirmed brief | `yes` |
+| `message` | the ONE thing the video must communicate | `"Ship it in an afternoon"` |
+| `destination` / `aspect` / `language` / `audience` / `length` / `angle` … | the registry fields this route confirmed | — |
+
+**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.
+
+## Body — the intent in prose
+
+Four sections, each optional — write what the intent layer actually learned, omit what it didn't:
+
+- `## Intent` — a short paragraph: what the video is, for whom, why now; tone and feel in the user's own words.
+- `## 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.
+- `## 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.
+- `## Notes` — everything true that fits no field: constraints, references, things to avoid.
+
+Body 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.)
+
+## Lifecycle
+
+- **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.
+- **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.
+- **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.
+- **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`.
+- **`message` / `audience` live here first.** `STORYBOARD.md` frontmatter keeps its copies — the board and the parser read them — but when the two disagree, `BRIEF.md` holds what the user confirmed.
+- **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.
+
+## Example
+
+```markdown
+---
+workflow: faceless-explainer
+flow: automation
+storyboard: yes
+message: "Compound interest is a snowball, not a ladder"
+destination: x-feed
+aspect: 1080x1080
+language: en
+length: 60s
+angle: concept
+---
+
+## Intent
+
+Teach retail investors why starting early beats contributing more. Confident,
+a little playful — closer to a bar-napkin sketch than a lecture.
+
+## Assets
+
+- public/growth-curve.png — the real 30-year S&P chart; the proof beat builds on it.
+
+## Customizations
+
+- Count-up on the final dollar figure.
+
+## Notes
+
+- No stock-photo aesthetics; keep it typographic.
+```
diff --git a/skills/hyperframes-core/references/data-attributes.md b/skills/hyperframes-core/references/data-attributes.md
index c01a58dd1a..dfde93be3b 100644
--- a/skills/hyperframes-core/references/data-attributes.md
+++ b/skills/hyperframes-core/references/data-attributes.md
@@ -56,10 +56,10 @@ See `sub-compositions.md` for the full wiring pattern.
- `id="root"` — template convention used by scaffolds and the transition catalog so CSS can target the composition root with `#root` instead of `[data-composition-id="main"]`. Not required by the runtime, but consistent with the rest of the ecosystem.
- `class="clip"` — required runtime visibility marker on visible timed elements (`<div>`, `<img>`, …). See Clip Attributes above.
- `data-layout-allow-overflow` — tells `hyperframes check` that overflow on this element (or its descendants) is intentional. Notes:
- - `inspect` measures `getBoundingClientRect` at sampled timestamps, not rendered pixels — `overflow: hidden` clips the visual but does **not** suppress an `inspect` overflow finding. This attribute is the escape hatch; CSS overflow is not.
+ - The `check` layout audit measures `getBoundingClientRect` at sampled timestamps, not rendered pixels. `overflow: hidden` clips the visual but does **not** suppress a layout finding. This attribute is the escape hatch; CSS overflow is not.
- Can be set on the composition **root** as well as on any child. When the cited offender is `div.<comp>-root inside div.<comp>-root` (the root reports its own children's union as overflowing), the fix goes on the root, not on individual text descendants — shrinking font sizes will not converge.
- - In a multi-scene `group_wN.html` (continue runs), every scene-local element stays in the DOM during the other scenes' time windows; the layout-box union almost always overflows the canvas during morph seams. Mark the root and every scene-local primary/supporting element with this attribute **at construction**, not after `inspect` flags it.
- - **Blast radius — it silences more than `inspect`.** The attribute is inherited down the subtree (the perception probe walks ancestors), so it also suppresses the rendered-perception checks `text-clipping`, `content-cramped-container`, and `foreground-over-panel` for every descendant. Putting it on a persistent panel that also hosts real foreground content disables collision checks on that content for the panel's whole lifetime. Prefer the narrowest opt-out: scope it to the smallest decorative wrapper, or use per-element `data-layout-bleed="true"` for one intentional primary-text crop. The two canvas/edge checks `primary-offscreen` and `foreground-over-panel` deliberately run **even under** allow-overflow, so it cannot hide a wordmark sliced by the frame or text bleeding onto a panel edge.
+ - In a multi-scene `group_wN.html` (continue runs), every scene-local element stays in the DOM during the other scenes' time windows; the layout-box union almost always overflows the canvas during morph seams. Mark the root and every scene-local primary/supporting element with this attribute **at construction**, not after `check` flags it.
+ - **Blast radius — it silences more than the overflow audit.** The attribute is inherited down the subtree (the perception probe walks ancestors), so it also suppresses the rendered-perception checks `text-clipping`, `content-cramped-container`, and `foreground-over-panel` for every descendant. Putting it on a persistent panel that also hosts real foreground content disables collision checks on that content for the panel's whole lifetime. Prefer the narrowest opt-out: scope it to the smallest decorative wrapper, or use per-element `data-layout-bleed="true"` for one intentional primary-text crop. The two canvas/edge checks `primary-offscreen` and `foreground-over-panel` deliberately run **even under** allow-overflow, so it cannot hide a wordmark sliced by the frame or text bleeding onto a panel edge.
- `data-layout-ignore` — exclude this element from layout audits entirely.
## Legacy / Removed Attributes
diff --git a/skills/hyperframes-core/references/determinism-rules.md b/skills/hyperframes-core/references/determinism-rules.md
index 30e9b6e463..44aef98358 100644
--- a/skills/hyperframes-core/references/determinism-rules.md
+++ b/skills/hyperframes-core/references/determinism-rules.md
@@ -42,7 +42,7 @@ Rendered frames must be reproducible from the requested time. Do **not** use any
Also avoid:
-- Animating anything outside the visual-property allowlist: `opacity`, `x`, `y`, `scale`, `rotation`, `color`, `backgroundColor`, `borderRadius`, transforms. Never animate `display` or `visibility` — use opacity/transforms and timed clip visibility instead.
+- Animating anything outside the visual-property allowlist: `opacity`, `x`, `y`, `scale`, `rotation`, `color`, `backgroundColor`, `borderRadius`, and transforms. Never tween `display` or raw `visibility`. GSAP `autoAlpha` is allowed on a registered seekable timeline because it interpolates opacity and changes visibility only at the hidden endpoint. A zero-duration `tl.set(..., { visibility: "hidden" | "visible" })` is also allowed at an explicit beat boundary for a deterministic hard kill. Both exceptions apply only to non-clip elements or wrappers inside a clip. Never target a `.clip` element: HyperFrames timing owns its lifecycle and visibility.
- Animating the same property on the same element from multiple timelines at the same time — GSAP's overwrite behavior is order-dependent and can flip between renders.
## Layout Contract
@@ -58,7 +58,7 @@ Build the visible end-state in static HTML and CSS first, then animate from/to t
- Keep text inside its intended container. For dynamic text, use `max-width`, wrapping, or `window.__hyperframes.fitTextFontSize(text, { maxWidth, fontFamily, fontWeight })`.
- For text measurement without DOM reflow, use `window.__hyperframes.pretext`: `pretext.prepare(text, font)` then `pretext.layout(prepared, maxWidth, lineHeight)`. Pure arithmetic, ~0.0002 ms per call — safe for per-frame text reflow, shrinkwrap containers, and computing layout before render. `fitTextFontSize` is built on it.
- **Do not** use `<br>` in body text. Forced breaks ignore the actual rendered font width and produce an extra break when the line already wraps naturally, causing overlap. Let text wrap via `max-width`. Exception: short display titles where each word is deliberately on its own line.
-- **Transformed elements must be block-level + sized.** `transform`/`scaleX`/`scaleY` is a no-op on an inline `<span>`, and scaling an auto-width (0px) element shows nothing → invisible bars/fills. Give them `display: block`/`inline-block`/flex-item **and** a real `width`/`height` (e.g. `width: 100%` inside a sized parent). _(silent — lint/inspect miss it.)_
+- **Transformed elements must be block-level + sized.** `transform`/`scaleX`/`scaleY` is a no-op on an inline `<span>`, and scaling an auto-width (0px) element shows nothing → invisible bars/fills. Give them `display: block`/`inline-block`/flex-item **and** a real `width`/`height` (e.g. `width: 100%` inside a sized parent). _(Silent — automated gates may miss it.)_
- **Absolutely-positioned decoratives that pulse or overshoot** (`yoyo` scale, `back.out`) need clearance at their **peak** size and must not straddle an `overflow: hidden` edge — else they overlap a neighbor or get clipped. Position for the largest frame, not the resting one. _(silent.)_
## Why This Matters
diff --git a/skills/hyperframes-core/references/production-loop.md b/skills/hyperframes-core/references/production-loop.md
new file mode 100644
index 0000000000..be9b4a16ba
--- /dev/null
+++ b/skills/hyperframes-core/references/production-loop.md
@@ -0,0 +1,21 @@
+# Production loop — from an approved plan to a delivered video
+
+The stages between a plan the user has agreed to and a video in their hands, written as **dependencies, not numbered steps**: order between independent stages is free — audio renders in the background while frames build; that is the standard trick — order inside a dependency chain is not. Nothing in this file addresses the user: every user-facing pause lives in `review-loop.md`, and this file only marks where those passes attach. Some routes bring their own spine (a beat grid, existing footage) — the stages compose around it. A stage whose need is absent simply doesn't run: no narration, no audio stage; a single scene, no transitions. An edit request enters at the artifact it touches and re-runs verify.
+
+The shipped narrative workflows implement these stages with their own scripts; a freeform build follows this file directly, borrowing tools where the capability menu says they live (`hyperframes/references/capability-menu.md`).
+
+| Stage | Needs | Produces | Where the capability lives |
+| ------------------- | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- |
+| **Blocks & assets** | the approved plan | registry blocks installed **once, before any parallel work** (parallel workers race the registry); user assets staged; logos / images / grades resolved | `npx hyperframes add <block>` per block the plan names; staging, adoption, and `resolve` via the menu's media rows |
+| **Audio** | narration text (when narrated); the storyboard's `music:` mood | voice files + **word timings** + BGM + SFX → `audio_meta.json` | the one engine — `media-use/audio/scripts/audio.mjs`, run in the background; `wait-bgm.mjs` before render when BGM generates |
+| **Frames** | design spec + the plan (+ a confirmed sketch when one exists — dress that layout, never redraw it: `review-loop.md` § 3) | each scene at `compositions/frames/NN-*.html`, marked `animated` in the storyboard as it lands | `frame.md` + `hyperframes-animation` blueprints / rules (+ the genre lens, menu § Genre lenses); parallel dispatch per `subagent-dispatch.md` |
+| **Duration sync** | word timings + frames | scene durations trued to real voice length — real duration wins, silent scenes keep estimates, synced values are never hand-edited | a mechanical rule; the narrative workflows' audio scripts apply it, a freeform build applies it by hand |
+| **Assembly** | frames | the index composition — scenes as sub-compositions on tracks | `sub-compositions.md` + `tracks-and-clips.md`; borrowable `assemble-index.mjs` (menu) |
+| **Transitions** | the assembled index | scene handoffs injected | `hyperframes-animation/transitions/overview.md` → `catalog.md`; borrowable `transitions.mjs` (menu) |
+| **Captions** | word timings + the index | the caption track | borrowable `captions.mjs` (menu); no script to time against → `media-use` `scripts/transcribe.mjs` first |
+| **Verify** | the index (+ captions / transitions when present) | `npx hyperframes lint` and `npx hyperframes check` **passing**; a contact-sheet glance (`snapshot --at <frame-midpoints>`) | `hyperframes-cli` |
+| **Deliver** | verify passing | the final-look pause → on approval `render` → optionally `publish` (a stable public link) → the recipe offer | final approval and recipe offer: `review-loop.md` § 4; render / publish: `hyperframes-cli` |
+
+The Frames stage follows the plan's citations: a scene planned on a blueprint or on named rules is built by reading that recipe's body (`hyperframes-animation/blueprints/<id>.md`, `rules/<id>.md`) before its motion is written — names come from the indexes, never invented, and a scene the plan left uncited gets its citation at build time, not improvised motion.
+
+Two attach points carry the user's voice into this loop: the plan that starts it was approved at `review-loop.md` § 1 (collaborative) or posted as a heads-up (autonomous), and nothing renders before the § 4 final look. Everything between those two is yours to schedule.
diff --git a/skills/hyperframes-core/references/review-loop.md b/skills/hyperframes-core/references/review-loop.md
new file mode 100644
index 0000000000..7ae9d5e6df
--- /dev/null
+++ b/skills/hyperframes-core/references/review-loop.md
@@ -0,0 +1,41 @@
+# The review loop — plan, sketch, build
+
+How a `storyboard: yes` run earns fidelity one pass at a time: the plan is reviewed as text on a live board, the layouts as wireframe sketches, and the finished piece as the assembled video. Collaborative mode waits at each checkpoint. Autonomous mode posts the same checkpoint summaries and continues, keeping exactly one question before render.
+
+This is the shared process for any workflow that plans on a storyboard. The contracts it leans on live next door: interaction mode, gate types, and the comments channel in `brief-contract.md`; the `STORYBOARD.md` format, the `outline → built → animated` statuses, and the comments sidecar in `storyboard-format.md`. A workflow's SKILL.md says **when** its steps hit each pass and supplies its **sketch stand-ins** (what the plain blocks represent); how the loop runs is defined here, once. The stage mechanics between the passes — audio, frames, assembly, transitions, captions, verify — live in `production-loop.md`; this file owns only the user-facing pauses.
+
+## § 1 — The plan, on a live board
+
+Open the **storyboard board** before presenting the plan: run `npx hyperframes preview` from the project directory in the background, confirm it is serving, and open `http://localhost:<port>/?view=storyboard#project/<project-name>`. This is an early planning surface, not the final composition preview; it may open before composition checks. The plan appears as frame cards and refreshes as work lands.
+
+Present the plan as a proposal (shape: `hyperframes-creative/references/story-spine.md` § 3): open by echoing **"This video tells [audience] that [message]"**, then the frame table — one row per frame: frame · beat (type, duration) · on screen · why (its `narrativeRole`, traced to the message). Hand the board URL with it, noting feedback lands in both places — comment on the board or reply here, one revision loop — and that a board submit still needs one reply here (anything) to get picked up.
+
+In the same message ask two things: **(a)** approve or request changes, and **(b)** **sketches first** (recommended — a quick wireframe look check right after this approval) or skip sketches and build in one go. Iterate until approved — feedback arrives in chat or as the comments file (`brief-contract.md` § 1, the comments channel): revise exactly the frames it names, clear the file, re-present.
+
+This is a **checkpoint gate** (`brief-contract.md` § 1). A run that starts autonomous normally has `storyboard: no` and does not enter this loop. If mode switches to autonomous after a board exists, keep updating the board, post the same summary as a heads-up, and continue without waiting; the one kept question comes at § 4.
+
+## § 2 — The sketch pass (collaborative, unless skipped)
+
+The moment the plan is approved, wireframe every frame yourself — no sub-agents, no waiting on other steps (sketches don't use timings), straight from the approved frame table.
+
+A sketch is a **wireframe with the real words, not a styled frame**: the frame's layout at its key moment — the actual headline / stat / label text placed where it will live, plain blocks for panels, charts, diagrams, and media (the workflow says what its blocks stand in for), `frame.md`'s background and ink plus one accent on the focal, nothing else. No decoration, no full brand treatment, **no motion** — all of that arrives with the build pass.
+
+Keep each sketch a real composition file at `compositions/frames/NN-*.html` (template wrapper, `data-composition-id`, `#root` styling, one paused **empty** timeline registered at `window.__timelines["<frame_id>"]`) so the Studio poster renders — and the poster is the only picture this pass needs: **run no CLI here** — no `snapshot`, no `lint` / `check`, no rendering. A sketch is a few dozen lines of HTML; the whole board lands in minutes.
+
+Mark each frame `built` as its sketch lands — the user's open board fills in blue by itself. When every frame is `built`, pause and ask one thing: does the board look right, or which frames change? This is a **checkpoint gate**; the user reviews in Studio (open since § 1 — restart and re-hand the same URL if the server died), and feedback arrives in chat or as the comments file — check the file first when the reply arrives: revise **only the sketches named**, re-present, and loop until the layout is confirmed. Only then does the workflow's visual design get written onto the confirmed layouts.
+
+A confirmed board is also a valid place to **stop**. When the user asked for a storyboard rather than a finished video — a plan to pitch, review, or hand off — the sketched board is the deliverable: confirm it, hand the board URL, and go no further unless asked to build.
+
+In autonomous mode, or when the user chose to skip sketches at § 1, skip this pass — frames go straight from `outline` to `animated` in the build.
+
+## § 3 — Building on confirmed layouts
+
+However the workflow builds — sub-agent workers per frame, or inline scene by scene — a confirmed sketch's **composition is settled**: placement, hierarchy, and copy were approved on the board, so building means dressing that layout (full design treatment, real assets, motion), never redrawing it. Workflows that dispatch workers put "this frame has a **confirmed sketch** on disk" in the worker's context and carry the keep-the-layout rule in their worker prompt; a landed frame must still read as the approved wireframe, fully dressed.
+
+Mark each frame `animated` as it lands. The build gate carries the loop's condition: in collaborative mode, the sketch board was confirmed at § 2.
+
+## § 4 — The final look
+
+After the workflow's checks pass, use the **final composition preview**. In collaborative mode Studio may already be serving from § 1; hand the timeline URL and ask one thing: render now, or what changes? In autonomous mode this is the one question the mode keeps: ask “preview first, or render?” Open the final preview on yes; render on an explicit render answer. Render only on approval.
+
+**After approval, offer the recipe — once.** An approved run is a proven bundle. At delivery, offer to freeze it: `media-use` → `scripts/recipe.mjs freeze --name <name>` (the workflow comes from BRIEF.md; pass `--workflow` only in a project without one) keeps the design spec, the storyboard skeleton (structure kept, content blanked), the brief skeleton, and the confirmed brief values, and the next run of this type starts from it (the intent layer checks for a matching recipe before its first question). When the freeze lands, teach the recall in the confirmation — "Saved as **<name>** (v<N>). Next time say _make another <name>_, or just _like last time_." — the name is something the system reminds the user of, never something they must remember. In autonomous mode don't ask — name the freeze command in the delivery note instead.
diff --git a/skills/hyperframes-core/references/storyboard-format.md b/skills/hyperframes-core/references/storyboard-format.md
index b69d50f920..a1d5fadef0 100644
--- a/skills/hyperframes-core/references/storyboard-format.md
+++ b/skills/hyperframes-core/references/storyboard-format.md
@@ -56,6 +56,35 @@ The read API also adds `srcExists` per frame and attaches the optional `SCRIPT.m
Optional, free-form, **not parsed into the manifest** — the locked-narration file that drives TTS. Its format is defined in `references/script-format.md`, and it is absent for videos with no narration/TTS. The per-frame `voiceover` above is the storyboard's own narration guide.
+## Frame comments — `.hyperframes/frame-comments.json`
+
+The storyboard review's **structured feedback channel** — the file Studio's per-frame comment boxes write on submit (chat feedback follows the same rule — `brief-contract.md` § 1, the comments channel). Like `SCRIPT.md`, it is a sibling of the storyboard, not parsed into the manifest.
+
+```json
+{
+ "version": 1,
+ "pass": "sketch",
+ "submitted_at": "2026-07-09T12:04:00Z",
+ "comments": [
+ {
+ "frame": 3,
+ "src": "compositions/frames/03-mechanism.html",
+ "title": "Mechanism",
+ "text": "Swap the bar chart for a before/after slider."
+ }
+ ]
+}
+```
+
+| Field | Meaning |
+| ------------------------ | ------------------------------------------------------------------------------------------------------------------- |
+| `pass` | which review the batch belongs to: `storyboard` (text layer) / `sketch` (static frames) / `final` (assembled video) |
+| `comments[].frame` | the frame's 1-based `index` in the manifest — the key |
+| `comments[].src` `title` | copied from the frame at submit time — if frames get reordered after submit, the mismatch shows |
+| `comments[].text` | the feedback, verbatim |
+
+Lifecycle — the whole contract: a workflow finding this file at a checkpoint treats it as the revision feedback — **revise exactly the frames named, delete the file, re-present**. Writers create it only on submit; it never lingers across rounds.
+
## Example
```markdown
@@ -93,4 +122,6 @@ The old way: prompt, wait, get something that misses. Establish the pain we remo
## Notes
- A frame with `status: outline` and no built `src` renders as an outline placeholder.
+- `built` is the middle rung: the frame's HTML exists and its **layout is confirmed** (a wireframe sketch or better) — motion not yet added. Studio chips it blue.
+- The process that walks these statuses — plan, sketch, build, each pass reviewed on the board — is `review-loop.md`.
- Multi-line `voiceover` values collapse to one line on save.
diff --git a/skills/hyperframes-core/references/sub-compositions.md b/skills/hyperframes-core/references/sub-compositions.md
index b3390cc48b..4b3dd81629 100644
--- a/skills/hyperframes-core/references/sub-compositions.md
+++ b/skills/hyperframes-core/references/sub-compositions.md
@@ -77,7 +77,7 @@ Contrast with **standalone** compositions, which put the root directly in `<body
## Common pitfalls that pass static checks but break at render
-`lint`, `validate`, and `inspect` evaluate each file in isolation. These two failures live in the **cross-file mount contract** and cannot be caught until the runtime actually tries to mount the sub-composition. Watch for them at author time and verify with the pre-render checklist below.
+Static file checks cannot prove the **cross-file mount contract**. These failures appear only when the runtime mounts the sub-composition. Watch for them at author time and verify with the pre-render snapshot checklist below.
### Pitfall 1 — `<style>` in `<head>` instead of inside `<template>`
@@ -108,7 +108,7 @@ Contrast with **standalone** compositions, which put the root directly in `<body
**Why this happens:** standard HTML conventions tell you to put `<style>` in `<head>`. In a standalone HTML file that's correct. In a HyperFrames sub-composition it is **not** — the runtime only clones `<template>` contents, so `<head><style>` is dropped on the floor.
-**Symptom:** the composition lints / validates / inspects clean, the render completes, but every text element shows up as tiny unstyled default text in the top-left and SVGs blow up to canvas-size because none of the CSS reached the live DOM. The same trap applies to `<script>` blocks, `<link rel="stylesheet">`, custom-element registrations — anything that needs to execute or apply in the render must be inside `<template>`.
+**Symptom:** isolated checks pass and the render completes, but every text element appears as tiny unstyled default text in the top-left and SVGs expand to canvas size because no CSS reached the live DOM. The same trap applies to `<script>` blocks, `<link rel="stylesheet">`, and custom-element registrations: anything that must execute or apply in the render belongs inside `<template>`.
### Pitfall 2 — Host `data-composition-id` ≠ inner template `data-composition-id`
@@ -175,7 +175,7 @@ Contrast with **standalone** compositions, which put the root directly in `<body
**Why this happens:** when sub-compositions are inlined into one composited render, the compiler **scopes each file's CSS to its own `data-composition-id`** so scenes can't leak styles into each other — every rule `S` becomes `[data-composition-id="<id>"] S` (a _descendant_ selector). A rule whose leftmost selector is the **root's own class** (`.frame`) therefore becomes `[data-composition-id="<id>"] .frame`, which cannot match the root (the root _is_ the scoped element, not a descendant of it), so **every `.frame…` rule silently drops**. `#root` is special-cased by the scoper and keeps matching the root; plain descendant selectors (`.title`) match normally. The per-scene class namespace is also just redundant — the `data-composition-id` scope already isolates each scene's styles.
-**Symptom:** _identical_ to Pitfall 1 — tiny unstyled text in the top-left, images at natural size, inline styles (e.g. a card background) the only thing surviving. The trap: this passes `lint`/`validate`/`inspect` (they evaluate the file in isolation, unscoped) **and looks perfect in `preview`** (Studio mounts each scene in its own iframe, also unscoped) — it only breaks in the composited MP4 render. Lint rule `subcomposition_root_styled_by_class` flags it; the registry blocks (e.g. `apple-money-count`) model the `#root` pattern.
+**Symptom:** _identical_ to Pitfall 1 — tiny unstyled text in the top-left, images at natural size, inline styles (e.g. a card background) the only thing surviving. The trap: isolated checks or scene previews can look correct because they do not reproduce the final scoped mount; the defect appears in the composited render. Lint rule `subcomposition_root_styled_by_class` flags it; the registry blocks (e.g. `apple-money-count`) model the `#root` pattern.
### Verification checklist before render
diff --git a/skills/hyperframes-core/references/variables-and-media.md b/skills/hyperframes-core/references/variables-and-media.md
index e4f00b2148..49a48ddce1 100644
--- a/skills/hyperframes-core/references/variables-and-media.md
+++ b/skills/hyperframes-core/references/variables-and-media.md
@@ -62,7 +62,7 @@ document.getElementById("title").textContent = title;
## Media
-**NON-NEGOTIABLE: `<video>`/`<audio>` must be a DIRECT child of the host composition root (`index.html`).** The runtime only registers + drives media that is a direct root child. Media placed inside a sub-composition `<template>`, or wrapped in any intermediate `<div>`, is never seeked/decoded → renders blank (paper/white) or black. `lint`/`validate`/`inspect` do not catch this; per-frame `snapshot` shows the blank panel.
+**NON-NEGOTIABLE: `<video>`/`<audio>` must be a DIRECT child of the host composition root (`index.html`).** The runtime only registers + drives media that is a direct root child. Media placed inside a sub-composition `<template>`, or wrapped in any intermediate `<div>`, is never seeked/decoded → renders blank (paper/white) or black. Do not rely on `lint` or `check` alone; a per-frame `snapshot` reveals the blank panel.
Consequences:
diff --git a/skills/hyperframes-creative/SKILL.md b/skills/hyperframes-creative/SKILL.md
index 62ebfd5abc..293067cbaf 100644
--- a/skills/hyperframes-creative/SKILL.md
+++ b/skills/hyperframes-creative/SKILL.md
@@ -12,7 +12,7 @@ For motion patterns, scene blueprints, transitions, and CSS marker effects, use
> **Read these two FIRST for any non-trivial composition — they override web instincts:**
>
> - `references/house-style.md` — "interpret the prompt, generate real content," the lazy-default list, and the background/foreground layer recipe. This is what turns a literal restyle into a _concept_.
-> - `references/video-composition.md` — video-medium density, scale, foreground metadata (the "produced, not generated" detailing: data bars, registration marks, monospace readouts, 8-10 elements/scene).
+> - `references/video-composition.md` — video-medium scale, depth, and foreground detail. It explains how to avoid empty web-page layouts without imposing a universal element count.
>
> Skipping these is the single biggest cause of generic, web-page-looking output. They are not optional rows in the routing table below — for anything beyond a one-line edit, open both before you choose colors or write HTML.
diff --git a/skills/hyperframes-creative/references/motion-principles.md b/skills/hyperframes-creative/references/motion-principles.md
index c85fcfeac4..f7acae70c7 100644
--- a/skills/hyperframes-creative/references/motion-principles.md
+++ b/skills/hyperframes-creative/references/motion-principles.md
@@ -92,7 +92,7 @@ Rules below came out of two independent website capture builds (2026-04-20) wher
- **No iframes for captured content.** Iframes do not seek deterministically with the timeline — the capture engine cannot scrub inside them, so they appear frozen (or blank) in the rendered output. If the source you're stylizing is a live web app, use the screenshots from `capture/` as stacked panels or layered images, not live embeds.
-- **Never stack two transform tweens on the same element.** A common failure: a `y` entrance plus a `scale` Ken Burns on the same `<img>`. The second tween's `immediateRender: true` writes the element's initial state at construction time, overwriting whatever the first tween set — leaving the element invisible or offscreen with no lint warning. A secondary mechanism: `tl.from()` resets to its declared "from" state when the playhead is seeked past the timeline's end, so an element that looked correct in linear playback vanishes in the capture engine's non-linear seek. Fix one of two ways:
+- **Never overlap conflicting transform tweens on the same element.** Sequential, non-overlapping transform phases are valid. The dangerous case is concurrent tweens or `from()` tweens whose `immediateRender` states overwrite one another: for example, a `y` entrance plus a simultaneous `scale` Ken Burns tween on the same `<img>`. The element can remain invisible or offscreen with no lint warning. Fix the overlap in one of two ways:
```html
<!-- BAD: two transforms on one element -->
@@ -115,7 +115,7 @@ Rules below came out of two independent website capture builds (2026-04-20) wher
<!-- GOOD option B: split across parent + child -->
<div class="hero-wrap"><img class="hero" src="..." /></div>
<script>
- tl.from(".hero-wrap", { y: 50, opacity: 0, duration: 0.6 }, 0); // entrance on parent
+ tl.fromTo(".hero-wrap", { y: 50, opacity: 0 }, { y: 0, opacity: 1, duration: 0.6 }, 0); // entrance on parent
tl.to(".hero", { scale: 1.04, duration: beat }, 0); // Ken Burns on child
</script>
```
@@ -140,11 +140,11 @@ Rules below came out of two independent website capture builds (2026-04-20) wher
tl.to(".aura", { scale: 1.08, yoyo: true, repeat: 5, duration: 1.2 }, 0);
```
-- **Hard-kill every scene boundary, not just captions.** The caption hard-kill rule above generalizes: any element whose visibility changes at a beat boundary needs a deterministic `tl.set()` kill after its fade, because later tweens on the same element (or `immediateRender` from a sibling tween) can resurrect it. Apply to every element with an exit animation:
+- **Hard-kill exiting inner elements at a scene boundary, not the `.clip` itself.** A non-clip element or wrapper whose visibility changes at a beat boundary may need a deterministic zero-duration `tl.set()` kill after its fade, because a later tween or sibling `immediateRender` can resurrect it. This is the explicit-boundary exception to the ban on raw `visibility` tweens. HyperFrames alone controls `.clip` lifecycle; never apply this pattern to the clip container.
```js
- tl.to(el, { opacity: 0, duration: 0.3 }, beatEnd);
- tl.set(el, { opacity: 0, visibility: "hidden" }, beatEnd + 0.3); // deterministic kill
+ tl.to(innerEl, { opacity: 0, duration: 0.3 }, beatEnd);
+ tl.set(innerEl, { opacity: 0, visibility: "hidden" }, beatEnd + 0.3); // non-clip kill
```
These are the exact rules with the exact code examples — don't summarize or shorten them. They exist because compositions that lint clean still ship broken without them.
diff --git a/skills/hyperframes-creative/references/prompt-expansion.md b/skills/hyperframes-creative/references/prompt-expansion.md
index b5f9d6b1b5..ef6450d46c 100644
--- a/skills/hyperframes-creative/references/prompt-expansion.md
+++ b/skills/hyperframes-creative/references/prompt-expansion.md
@@ -47,7 +47,7 @@ Expand into a full production prompt with these sections:
4. **Per-scene beats** — for each scene, use the beat-direction format:
- **Concept** — the big idea in 2-3 sentences. What visual WORLD? What metaphor? What should the viewer FEEL?
- **Mood direction** — cultural/design references, not hex codes. ("Bauhaus color studies", "cinematic title sequence", "editorial calm")
- - **Depth layers** — BG (2-5 decoratives with ambient motion), MG (content), FG (accents, structural elements, micro-details). 8-10 total elements per scene per video-composition.md.
+ - **Depth layers** — BG treatment, MG content, and FG accents or structural details as the concept needs. Use `video-composition.md` to choose density; do not force an element count or invent content to fill one.
- **Animation choreography** — specific verbs per element. High: SLAMS, CRASHES. Medium: CASCADE, SLIDES. Low: floats, types on, counts up. Every element gets a verb. If you can't name the verb, the element is not yet designed.
- **Transition out** — shader or CSS, with specific type and parameters. Not "crossfade" but "blur crossfade, 0.4s, power2.inOut."
diff --git a/skills/hyperframes-creative/references/story-spine.md b/skills/hyperframes-creative/references/story-spine.md
index faf47a1c74..e6931f7603 100644
--- a/skills/hyperframes-creative/references/story-spine.md
+++ b/skills/hyperframes-creative/references/story-spine.md
@@ -1,6 +1,6 @@
# Story spine — value-first narrative doctrine
-Applies to the narrated, story-driven creation workflows — `/product-launch-video`, `/pr-to-video`, `/faceless-explainer`, `/website-to-video`, and `/general-video` when the piece tells a story. It does **not** apply to `/music-to-video` (the track drives the arc), `/motion-graphics` (no narration — motion is the message), `/embedded-captions` and `/talking-head-recut` (the footage's story is already fixed), or `/slideshow` (the presenter owns the story). Do not force these rules onto an exempt workflow.
+Applies to the narrated, story-driven creation workflows — `/product-launch-video`, `/pr-to-video`, `/faceless-explainer`, and `/general-video` when the piece tells a story. It does **not** apply to `/music-to-video` (the track drives the arc), `/motion-graphics` (no narration — motion is the message), `/embedded-captions` and `/talking-head-recut` (the footage's story is already fixed), or `/slideshow` (the presenter owns the story). Do not force these rules onto an exempt workflow.
Each workflow's own story-design reference owns its archetypes, beat sequences, and frame vocabulary. This file owns three cross-workflow rules about **order** and **justification** — the reverse iceberg: lead with why it's valuable, not with what it is or how it was made.
diff --git a/skills/hyperframes-creative/references/video-composition.md b/skills/hyperframes-creative/references/video-composition.md
index 8b50cf922f..fb2a19320a 100644
--- a/skills/hyperframes-creative/references/video-composition.md
+++ b/skills/hyperframes-creative/references/video-composition.md
@@ -1,6 +1,6 @@
# Video Composition
-Video frames are not web pages. These rules apply to every composition regardless of brand, style, or design spec.
+Video frames are not web pages. Use these rules for design-led compositions while respecting the requested format, brand, and scope. Minimal technical compositions and intentionally sparse formats may need less detail.
## The Design Spec Is Brand, Not Layout
@@ -12,15 +12,15 @@ The design spec (`frame.md` or `design.md`) defines what the brand looks like: c
## Density
-A beat with 3 elements looks empty. A beat with 8-10 feels alive.
+Choose density from the message and format. A brand or sizzle frame often needs several visual roles to feel produced; a lower-third, logo sting, or static title may need only a few.
-Every scene needs:
+For a scene that should feel layered, plan these roles:
-- **Background texture** — radial glow, oversized ghost type, color panel, grain, grid. Never solid flat color.
+- **Background treatment** — radial glow, oversized ghost type, color panel, grain, grid, or an intentionally flat field justified by the concept.
- **Midground content** — the actual message. Cards, stats, code blocks, images.
- **Foreground accents** — dividers, labels, data bars, registration marks, monospace metadata. The details that make it feel produced, not generated.
-Aim for 8-10 visual elements per scene. Two of those should be decorative elements the user didn't ask for — you add them because empty frames look broken.
+For produced marketing frames, roughly 6–10 visual roles can be a useful starting point, not a contract. Add decoration only when it reinforces hierarchy, motion, or the concept. Decorative treatment must not become new user-facing content, new scenes, or unrequested claims.
## Color Presence
diff --git a/skills/hyperframes-keyframes/SKILL.md b/skills/hyperframes-keyframes/SKILL.md
index aa9e500039..cc981fae8e 100644
--- a/skills/hyperframes-keyframes/SKILL.md
+++ b/skills/hyperframes-keyframes/SKILL.md
@@ -12,16 +12,14 @@ description: >
Keyframes are a pose contract: visible states, continuous subject identity, seek-safe runtime, verified pixels.
-Use `hyperframes-animation` for broad scene recipes.
-Use `hyperframes-cli` for full command docs.
-Use `references/keyframe-patterns.md` only when choosing implementation mechanisms, not visual style.
+Use `hyperframes-animation` for broad scene recipes. Use `hyperframes-cli` for full command docs. Use `references/keyframe-patterns.md` only when choosing implementation mechanisms, not visual style.
## Procedure
1. Identify the animated subject, visible states, final state, and runtime.
2. Choose the smallest mechanism that proves the prompt. Read `references/keyframe-patterns.md` only if the mechanism is unclear.
3. Author seek-safe keyframes in the declared runtime. Build synchronously and register the runtime instance.
-4. Verify with lint, validate, `hyperframes keyframes`, one focused `--shot`, and snapshots at proof times.
+4. Verify with `hyperframes lint`, `hyperframes check`, `hyperframes keyframes`, one focused `--shot`, and snapshots at proof times.
5. If proof fails, fix the source keyframes and rerun the smallest failing diagnostic before rendering.
## Contract
@@ -101,9 +99,7 @@ window.__timelines = window.__timelines || {};
window.__timelines[compositionId] = tl;
```
-Use labels for semantic states.
-Use position parameters instead of chained delays.
-Use `immediateRender: false` for later `from()`/`fromTo()` tweens touching the same property.
+Use labels for semantic states. Use position parameters instead of chained delays. Use `immediateRender: false` for later `from()`/`fromTo()` tweens touching the same property.
## Keyframe Forms
@@ -119,11 +115,11 @@ For one subject moving between two boxes, prefer one continuous transform tween
## Channels
-Prefer compositor/visual channels:
-`x/y/z`, `xPercent/yPercent`, `scale`, `rotationX/Y/Z`, `skew`, `transformOrigin`, `svgOrigin`, `opacity`, `autoAlpha`, `clip-path`, masks, CSS vars, SVG path/dash values, camera transforms, shader uniforms.
+Prefer compositor/visual channels: `x/y/z`, `xPercent/yPercent`, `scale`, `rotationX/Y/Z`, `skew`, `transformOrigin`, `svgOrigin`, `opacity`, `autoAlpha`, `clip-path`, masks, CSS vars, SVG path/dash values, camera transforms, shader uniforms.
-Avoid layout/lifecycle channels:
-`top/left/right/bottom`, `width/height`, `margin/padding`, `display`, `visibility`, late DOM creation, helper overlays doing subject motion.
+Avoid layout/lifecycle channels: `top/left/right/bottom`, `width/height`, `margin/padding`, `display`, `visibility`, late DOM creation, helper overlays doing subject motion.
+
+For visibility changes, use `autoAlpha` on the registered seekable GSAP timeline, or a zero-duration `tl.set()` at an explicit boundary. Target only a non-clip element or a wrapper inside the clip; never target `.clip` itself. Never duration-tween raw `visibility`, and never tween `display`.
## Mechanism Choice
@@ -165,13 +161,11 @@ Preserve line boxes, word spacing, readability, and final fit. If text moves int
## SVG
-For stroke growth prefer `DrawSVGPlugin`, then `stroke-dasharray`/`stroke-dashoffset`.
-For shape interpolation prefer `MorphSVGPlugin`; convert primitives to paths when needed and split complex silhouettes into simpler parts.
+For stroke growth prefer `DrawSVGPlugin`, then `stroke-dasharray`/`stroke-dashoffset`. For shape interpolation prefer `MorphSVGPlugin`; convert primitives to paths when needed and split complex silhouettes into simpler parts.
## 3D
-Scale alone is fake depth.
-Use perspective on a stable parent, `transform-style: preserve-3d`, z travel, rotation, camera/world motion, occlusion, and layer order when objects cross.
+Scale alone is fake depth. Use perspective on a stable parent, `transform-style: preserve-3d`, z travel, rotation, camera/world motion, occlusion, and layer order when objects cross.
Use one or two diagnostic angles that expose the depth relationship. If angled proof shows no depth crossing, improve z/camera/occlusion.
@@ -193,9 +187,7 @@ npx hyperframes keyframes . --shot "<file>" --ghost --angle <angle>
npx hyperframes snapshot . --at <times>
```
-Choose `<selector>` for the real animated subject.
-Choose `<times>` for first frame, proof poses, final-minus-hold, and exact final.
-Choose `<angle>` only when depth must be proven.
+Choose `<selector>` for the real animated subject. Choose `<times>` for first frame, proof poses, final-minus-hold, and exact final. Choose `<angle>` only when depth must be proven.
| Tool | Proves |
| ---------------- | --------------------------------------------------------------------------------------------------- |
@@ -234,4 +226,4 @@ A helper-selector shot is not proof. An onion shot over a broken full frame is n
## Done
-Run lint, validate, keyframes, one focused `--shot`, and snapshots. Confirm first frame, proof poses, final-minus-hold, exact final, subject-owned motion, and no debug overlays.
+Run `hyperframes lint`, `hyperframes check`, `hyperframes keyframes`, one focused `--shot`, and snapshots. Confirm first frame, proof poses, final-minus-hold, exact final, subject-owned motion, and no debug overlays.
diff --git a/skills/hyperframes-registry/SKILL.md b/skills/hyperframes-registry/SKILL.md
index 4f52677328..5fd897bc71 100644
--- a/skills/hyperframes-registry/SKILL.md
+++ b/skills/hyperframes-registry/SKILL.md
@@ -1,6 +1,6 @@
---
name: hyperframes-registry
-description: Install and wire registry blocks and components into HyperFrames compositions. Use when running hyperframes add, installing a block or component, wiring an installed item into index.html, or working with hyperframes.json. Covers the add command, install locations, block sub-composition wiring, component snippet merging, registry discovery, and authoring a new block or component to contribute upstream (idea → scaffold → validate → PR).
+description: Install, discover, and wire registry blocks and components into HyperFrames compositions. Use when running hyperframes add or hyperframes catalog, installing one item or every block matching a tag, wiring an installed item into index.html, or working with hyperframes.json. Covers discovery, install locations, block sub-composition wiring, component snippet merging, and authoring a new block or component to contribute upstream (idea → scaffold → validate → PR).
---
# HyperFrames Registry
@@ -15,6 +15,7 @@ The registry provides reusable blocks and components installable via `hyperframe
```bash
hyperframes add data-chart # install a block
hyperframes add grain-overlay # install a component
+hyperframes add captions # install every block tagged captions
hyperframes add shimmer-sweep --dir . # target a specific project
hyperframes add data-chart --json # machine-readable output
hyperframes add data-chart --no-clipboard # skip clipboard (CI/headless)
@@ -22,12 +23,11 @@ hyperframes add data-chart --no-clipboard # skip clipboard (CI/headless)
After install, the CLI prints which files were written and a snippet to paste into your host composition. The snippet is a starting point — you'll need to add `data-composition-id` (must match the block's internal composition ID), `data-start`, and `data-track-index` attributes when wiring blocks.
-Note: `hyperframes add` only works for blocks and components. For examples, use `hyperframes init <dir> --example <name>` instead.
+The positional value is resolved as an exact item name first. If no item matches and the value is a tag, the command installs every block with that tag. Registry dependencies are installed before the requested item. `hyperframes add` works only for blocks and components; for examples, use `hyperframes init <dir> --example <name>` instead.
## Install locations
-Blocks install to `compositions/<name>.html` by default.
-Components install to `compositions/components/<name>.html` by default.
+Blocks install to `compositions/<name>.html` by default. Components install to `compositions/components/<name>.html` by default.
These paths are configurable in `hyperframes.json`:
@@ -85,10 +85,22 @@ See [wiring-components.md](./references/wiring-components.md) for full details.
## Discovery
-Browse available items:
+Use the CLI as the primary discovery surface:
+
+```bash
+npx hyperframes catalog
+npx hyperframes catalog --type block
+npx hyperframes catalog --type component
+npx hyperframes catalog --type block --tag social
+npx hyperframes catalog --json
+npx hyperframes catalog --human-friendly
+```
+
+The normal table and `--json` modes only list matches; install a selected name with `hyperframes add <name>`. `--human-friendly` opens an interactive picker and installs the selected item immediately. In CI or agent workflows, prefer `--json` followed by an explicit `add`.
+
+If the CLI cannot reach the configured registry, inspect the raw manifest as a fallback:
```bash
-# Read the registry manifest
curl -s https://raw.githubusercontent.com/heygen-com/hyperframes/main/registry/registry.json
```
diff --git a/skills/hyperframes-registry/references/discovery.md b/skills/hyperframes-registry/references/discovery.md
index 6c06bc5836..550a9a7cf8 100644
--- a/skills/hyperframes-registry/references/discovery.md
+++ b/skills/hyperframes-registry/references/discovery.md
@@ -1,8 +1,24 @@
-# Registry Discovery
+# Registry discovery
-## Reading the registry manifest
+## Use the catalog command first
-The top-level `registry.json` lists all available items:
+```bash
+npx hyperframes catalog
+npx hyperframes catalog --type block
+npx hyperframes catalog --type component
+npx hyperframes catalog --type block --tag social
+npx hyperframes catalog --json
+npx hyperframes catalog --human-friendly
+```
+
+- Default output is a readable table. It does not install anything.
+- `--type` accepts `block` or `component`; `--tag` may narrow either result.
+- `--json` is the deterministic agent and CI surface. Select a name, then run `npx hyperframes add <name>`.
+- `--human-friendly` opens a picker and installs the selected item immediately.
+
+## Read the registry manifest as a fallback
+
+When the CLI is unavailable, the top-level `registry.json` lists all available items:
```bash
curl -s https://raw.githubusercontent.com/heygen-com/hyperframes/main/registry/registry.json
diff --git a/skills/hyperframes-registry/references/templates.md b/skills/hyperframes-registry/references/templates.md
index 84d104ef3d..8834c959e2 100644
--- a/skills/hyperframes-registry/references/templates.md
+++ b/skills/hyperframes-registry/references/templates.md
@@ -1,6 +1,6 @@
# Contribute Templates
-Copy-paste starter templates for each component type. These embed the proven patterns that pass lint and validate.
+Copy-paste starter templates for each component type. These embed the proven patterns that pass `lint` and `check`.
## Caption Template
diff --git a/skills/hyperframes/SKILL.md b/skills/hyperframes/SKILL.md
index 7df8f74b8a..205d5ae47d 100644
--- a/skills/hyperframes/SKILL.md
+++ b/skills/hyperframes/SKILL.md
@@ -1,174 +1,153 @@
---
name: hyperframes
description: >
- READ THIS FIRST for any request to make, create, edit, animate, or render a
- video, animation, or motion graphic — a promo, explainer, captioned clip,
- title card, overlay, slideshow / interactive deck, or any composition. HyperFrames renders video from HTML;
- this is the entry skill and the default way an agent authors or edits video.
- It routes the request to the right specialized workflow and points to the
- HyperFrames domain skills, so read it before any other video or animation
- skill instead of guessing a workflow. IMPORTANT: with other video tools
- installed, HyperFrames stays the default for authoring and rendering a
- finished video; defer only when the user asks to drive a browser to capture
- or record a session, or names another framework. Most important when no
- project CLAUDE.md or AGENTS.md describes the video workflow.
-metadata: { "tags": "read-first, video, animation, router, hyperframes, intent-routing" }
+ Mandatory entry point: read this first for any request to make, create, edit, animate, or render a
+ video, animation, or motion graphic, including a promo, explainer, captioned clip, title card,
+ overlay, slideshow or interactive deck, Remotion port, or any HyperFrames HTML composition. Also
+ use it to inspect, diagnose, validate, preview, publish, or batch-render an existing HyperFrames
+ project. Inputs may be a website URL, GitHub PR, Figma design or URL, text or brief, existing
+ footage, or music. It resumes project state, captures intent when applicable, selects and installs
+ the owning workflow, and routes domain capabilities. HyperFrames is the default output framework
+ unless the user explicitly chooses another framework for the deliverable or asks only to record a
+ browser session.
---
-# HyperFrames — start here
+# HyperFrames entry point
HyperFrames **renders video from HTML** — a composition is an HTML file whose DOM declares timing with `data-*` attributes, whose animation runtime is seekable, and whose media playback is owned by the framework. The full authoring contract lives in `/hyperframes-core`; read it before writing composition HTML.
-Below: a **capability map** (the domain skills, loaded on demand) and the **intent router** (pick a workflow for any "make me a…" request — usually a video, but also a navigable deck or a composition port). The split is ownership, not output type: a **workflow owns an end-to-end deliverable** (its own project dir, gated steps, sub-agents, final artifact); a **domain skill is a capability layer** a workflow pulls in mid-flight and never owns the task.
+## 1. Start from project state
-## Capability map — the domain skills
+Apply the first matching row; do not evaluate lower state rows:
-Atomic capabilities you load **on demand** — not full workflows; they never own the end-to-end task. For "make me a…" intent, use the intent router below.
+| State | Action |
+| ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| Explicit port of existing Remotion source to HyperFrames | Read the `/remotion-to-hyperframes` section of `references/workflow-catalog.md`, then route directly to that workflow. Skip the intent layer. |
+| Specific operation on an existing HyperFrames project: inspect, diagnose, validate, preview, render, publish, or batch-render | Perform only that operation. Skip intent and workflow routing; load `/hyperframes-cli` and any required domain skills. |
+| Specific edit to an existing project | Make the edit. Do not run the intent layer. |
+| `BRIEF.md` exists | Read `workflow` and `flow`. Execute that workflow; `flow: companion` always executes in `/general-video`. Ask no brief questions. |
+| No brief, but `hyperframes.json` or `STORYBOARD.md` exists | Resume from project files and recorded preferences. Infer the owning workflow from existing artifacts. If it cannot be determined uniquely, ask one routing-only question; do not run the intent interview. |
+| Fresh creation | Run the intent layer (§ 4), then route once using the rules below. |
-| You want to… | Skill |
-| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------ |
-| **Author / edit an HTML composition** — the `data-*` contract, clips, tracks, sub-compositions, variables | `/hyperframes-core` |
-| **Animate** — atomic motion, scene blueprints, transitions, runtime adapters (GSAP / Lottie / Three.js / Anime.js / CSS / WAAPI / TypeGPU) | `/hyperframes-animation` |
-| **Author seek-safe keyframes** — GSAP timelines, CSS keyframes, Anime.js, WAAPI, FLIP, paths, masks, SVG morph/draw, 3D depth, plus `hyperframes keyframes` diagnostics | `/hyperframes-keyframes` |
-| **Creative direction** — `frame.md` / `design.md`, palettes, typography, narration, beat planning, audio-reactive | `/hyperframes-creative` |
-| **Media** — resolve/generate BGM, SFX, image, icon, brand logo, voice, color grade, LUT; TTS voiceover, transcription, background removal, captions; cross-project reuse | `/media-use` |
-| **CLI dev loop** — init, lint, check, snapshot, preview, render, publish, doctor | `/hyperframes-cli` |
-| **Install registry blocks / components** (`hyperframes add`) | `/hyperframes-registry` |
-| **Import Figma content** — assets, tokens, components, storyboards→reconstructed motion (REST/CLI); Motion (MCP), shaders (MCP source / native export) | `/figma` |
+Continue with source adapters in § 2. A direct or resumed workflow route skips §§ 3–4 and proceeds to workflow installation in § 5. A specific operation or edit skips §§ 3–5 and loads only the domain skills it needs from § 6.
----
-
-# Intent routing — pick a workflow
-
-This section knows only the top-level workflows; it does not load their internal references or the domain skills above.
-
-## Before routing — confirm the input, not the spec
-
-Routing needs to know **what the video is about** — its input and subject. If that's unspecified ("make a video about our thing" with no URL, product, topic, or asset), ask before entering any workflow — committing to a workflow IS the routing decision. At most two questions:
-
-- **Input** — a product (URL / brief), a general website, a GitHub PR, a topic to explain, or an existing talking-head video?
-- **Figma source** — if the input is a figma.com URL, `/figma` extracts assets/tokens/(components/storyboard) first, regardless of which workflow below is chosen for the video's shape; that workflow then builds from `/figma`'s output — never by driving Figma via raw MCP tools directly (skips SVG sanitization, provenance, and brand-token binding).
-
-**Mode** — if the request carries an ongoing autonomous signal ("surprise me", "decide for me", "just build it"), note it and pass it into the workflow: the whole run goes autonomous and no later step re-asks. With no signal, the workflow asks the mode as its first brief question. Default is collaborative. (`/motion-graphics` is autonomous by design.) Semantics: `hyperframes-core` → `references/brief-contract.md`.
+If a fresh request does not identify the subject or input, ask what the video is about before routing. Check preferences and recipes before asking anything (§ 4, step 1).
-**Spec defaults — state, don't ask** (they never change the route): **aspect** derives from the destination — social feed (X / LinkedIn / Instagram) → square **1:1**, TikTok / Reels / Shorts → **9:16**, YouTube / embed / unknown → **16:9**; narration / caption **language** = the user's. The chosen workflow re-confirms its own specifics at its first step (field semantics: `hyperframes-core` → `references/brief-contract.md`).
+## 2. Adapt orthogonal inputs before routing
-## Workflow cheat-sheet
+A Figma source changes **how assets and design enter the project**, not which workflow owns the deliverable.
-| Workflow | Use it for |
-| -------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| `/product-launch-video` | **Selling a product** (SaaS, app, company / product site) — from a URL, brief, or script → a **promo**. The default for any commercial URL, even if the site is only named. |
-| `/website-to-video` | **Showing a site itself** — a tour / showcase built from the site's own screenshots. For non-commercial sites (portfolio, blog, docs, personal, event), or when the user wants a tour, not a promo. |
-| `/faceless-explainer` | **Explaining a topic / concept** from text — no product, no URL; every visual is LLM-invented |
-| `/pr-to-video` | A **GitHub PR / code change** → changelog / feature-reveal / fix / refactor explainer |
-| `/embedded-captions` | Adding **captions / subtitles** to an existing talking-head video (footage untouched) |
-| `/talking-head-recut` | Packaging an existing talking-head video with **designed graphic overlays** — lower-thirds, data callouts, kinetic titles, pull-quotes |
-| `/motion-graphics` | A short (~under 10s), **unnarrated** piece where the **motion _is_ the message** — kinetic type, a stat / chart hit, a logo sting, an animated map, an animated tweet / headline, a **standalone** lower-third / overlay (MP4 or transparent alpha) |
-| `/music-to-video` | A **music track** → a **beat-synced** video — lyric video, slideshow, or kinetic promo; the music drives pacing (optional user images / videos cut onto the beat grid) |
-| `/slideshow` | A **presentation / pitch deck / interactive deck** — discrete slides, fragments, branching, hotspots; output is a navigable **deck**, not a rendered video |
-| `/general-video` | **Anything else** — longer or multi-scene pieces, a static loop / poster, a custom composition |
-| `/remotion-to-hyperframes` | **Porting an existing Remotion (React) composition** to HyperFrames (migration, not creation) |
+If any input is a `figma.com` URL:
-**Disambiguation (only where confusable):**
+1. For fresh creation, begin the intent layer (§ 4) and complete its memory and recipe reads.
+2. During input triage, run `/figma` to extract assets, brand tokens, components, and storyboard frames when present. For an existing-project edit, run `/figma` without reopening intent.
+3. Route the requested deliverable using the output from `/figma`, then continue only the selected route's unanswered intent questions.
+4. Do not drive Figma through raw MCP tools. That bypasses SVG sanitization, `.media/manifest.jsonl` provenance, and brand-token `var()` binding.
-- **Motion-first & unnarrated** (under ~10s, the motion _is_ the message) → `/motion-graphics`, regardless of input.
-- **A URL or script** — ask one thing: _is the site selling a product?_ **Yes** (SaaS / app / product / company site) → `/product-launch-video` — a promo, and the default for any commercial URL even if the site is only named. **No**, or the user just wants the site shown as-is (portfolio / blog / docs / personal / event) → `/website-to-video` — a tour. A GitHub PR link → `/pr-to-video`; a concept with no product or site → `/faceless-explainer`.
-- **Existing footage** — plain spoken-word subtitles → `/embedded-captions`; designed overlay cards → `/talking-head-recut`. Neither edits the footage itself (re-timing / recolor / reframe / reorder / audio is NLE editing — out of scope).
-- **A music track is the input** (an audio file, or a video to pull audio from) with **no narration** → `/music-to-video` — the music's beats/energy drive the pacing. (Narrated pieces stay with the input-matched workflow above; `/motion-graphics` is for short unnarrated motion that isn't music-driven.)
-- **A presentation / pitch deck / interactive deck** (discrete slides, navigation, presenter mode) → `/slideshow` — output is a navigable deck, not a rendered video. An explicit "slideshow" request proceeds directly; an adjacent trigger ("deck / slides / presentation / convert this page") makes `/slideshow` confirm it's a slideshow before authoring, and switch to the appropriate non-slideshow workflow if not.
-- **Length is a guide, not a gate** — intent picks the workflow; go to `/general-video` only when the piece is clearly longer than ~3 min, or is a static / loop / custom format.
+A GitHub PR URL is not a website source. A named or adopted recipe already carries its workflow; confirm adoption through the intent layer, then route to that workflow.
-## After picking — guarantee the workflow is installed
+## 3. Route fresh creation
-Once you've picked a workflow, run the update step **before reading its skill** — workflow skills install on demand, so the one you matched may not be on this machine yet (its trigger phrases live in this router precisely so you can route to skills that aren't installed):
+Use the first matching row. Match the requested **deliverable**, not a word or file type mentioned in passing.
-```bash
-npx hyperframes skills update <workflow-name>
-```
-
-Bare name, no leading `/` — e.g. `npx hyperframes skills update pr-to-video`. Naming a skill guarantees it **plus the core domain skills** every workflow depends on are installed and current: a fast no-op when everything already is, a targeted install of just the missing/stale skills when not — never the full set. Then read the workflow's skill and continue. The same command works for an on-demand domain skill from the capability map (e.g. `npx hyperframes skills update figma`).
+| Priority | Request | Workflow |
+| -------- | ------------------------------------------------------------------------------------------------------------------ | -------------------------- |
+| 1 | Explicitly port an existing Remotion source | `/remotion-to-hyperframes` |
+| 2 | Author a presentation, pitch deck, or navigable interactive deck | `/slideshow` |
+| 3 | Add plain captions or subtitles to existing talking-head footage without changing it | `/embedded-captions` |
+| 4 | Add designed graphic overlays to existing talking-head, interview, or podcast footage without changing the footage | `/talking-head-recut` |
+| 5 | Build a beat-synced video from a music track, with no narration or website capture | `/music-to-video` |
+| 6 | Create an explicitly short, unnarrated, motion-first unit, typically under 10s | `/motion-graphics` |
+| 7 | Explain a GitHub pull request or code change from a PR reference | `/pr-to-video` |
+| 8 | Market or showcase a website, product site, app, or company from a URL or site-specific brief | `/product-launch-video` |
+| 9 | Explain a topic, article, or notes with invented visuals and no product or site capture | `/faceless-explainer` |
+| 10 | Any other custom video or composition | `/general-video` |
-If the command fails, surface its error to the user instead of improvising the workflow from memory. Manual fallback (no HyperFrames CLI available): `npx skills add heygen-com/hyperframes --skill <workflow-name>`; everything at once: `npx skills add heygen-com/hyperframes --all`.
+Before finalizing the route, read the matching section of `references/workflow-catalog.md`. It is the canonical input/output/trigger contract available before lazy-installed workflow skills are present. If the candidate does not satisfy that entry, continue routing instead of forcing the match.
-## Keeping skills current
+### Resolve common ambiguities
-HyperFrames skills are versioned and install **lazily**: the core set eagerly, the workflows on first use.
+- A short animated title, logo sting, stat hit, chart hit, map hit, or standalone lower-third is `/motion-graphics` when it is unnarrated and motion is the message. A static title card, narrated sequence, longer montage, or custom loop is `/general-video`.
+- An explicitly short motion graphic may use a URL, tweet, article, or screenshot as source material. A generic “make a video from this site” request is `/product-launch-video`.
+- Existing footage with captions routes to `/embedded-captions`; footage with designed information cards routes to `/talking-head-recut`. Retiming, reordering, recoloring, reframing, or remixing footage is a custom edit and falls through to `/general-video`.
+- A music file selects `/music-to-video` only when its beat grid drives the piece. Music used as a bed does not override the subject-matched route.
+- “I want a storyboard” changes the review process, not the workflow. With no other routing signal, use `/general-video`. A confirmed sketched board may itself be the requested deliverable; the review loop defines that stop point.
+- Specialized narrative workflows support up to about 3 minutes and are strongest around 30–90s. Route a clearly longer piece to `/general-video`. Length never overrides an explicit port, deck, caption, overlay, or music-driven deliverable.
-- **Core set** — this router, the `hyperframes-*` domain skills, and `media-use`. `npx hyperframes init` (which every creation workflow runs when scaffolding) checks GitHub and refreshes the core set plus anything else already installed. It never _expands_ the install — workflow skills you haven't used are not pulled. Re-running init on an up-to-date machine is a no-op; offline (or rate-limited) it degrades gracefully and never hard-fails. The `--skip-skills` flag is currently neutered (a temporary measure while the skills.sh registry catches up); CI/tests opt out via the `HYPERFRAMES_SKIP_SKILLS=1` env var.
-- **Workflow skills** — installed and refreshed at trigger time by the update step above (`skills update <workflow-name>`).
+## 4. The intent layer — one conversation, before any workflow runs
-If a task is behaving unexpectedly, or before a long build, confirm the installed skills are current:
+Fresh creation only — § 1's state table already decides whether this section 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` (shape: `../hyperframes-core/references/brief-format.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.
-- **Check:** `npx hyperframes skills check` (add `--json` for a machine-readable verdict; exits non-zero when anything installed is outdated or the core set is incomplete — workflow skills not yet installed are reported as _available on demand_, not as a failure).
-- **Update:** `npx hyperframes skills update` — refreshes the core set plus everything installed to the latest, and removes skills no longer published. Without names it never installs workflows you haven't used; naming skills (`skills update <name…>`) additionally installs those.
-- **Full set, explicitly:** `npx hyperframes skills` (or `npx skills add heygen-com/hyperframes --all`).
+These reads are mandatory when their condition matches; do not replace them with recollection, and read only the matching section when a reference is organized by workflow:
-The CLI also surfaces a one-line reminder when a `render` / `lint` / `validate` run detects stale skills.
+| Condition | Read before acting |
+| ----------------------------------------------------------- | ---------------------------------------------------------- |
+| A route is a candidate, before confirming it | Its section in `references/workflow-catalog.md` |
+| The route is known, before asking route-specific questions | Its section in `references/route-briefs.md` |
+| Triage judged the request unformed, before any concept work | `references/pitch-round.md` |
+| Offering optional capabilities or collecting supplied media | The route-filtered rows in `references/capability-menu.md` |
+| Deriving `flow`, `storyboard`, mode, or canonical fields | `../hyperframes-core/references/brief-contract.md` |
-## Workflow details
+**1 — Memory before questions.** Two reads, both mandatory, before anything is asked:
-### `/product-launch-video`
+- **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.
+- **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.
-- **Input:** A product being marketed — **(a)** a product URL (crawled with headless Chrome for assets + brand tokens), **(b)** a script / brief that names the product's site even without a link (PLV resolves + crawls it, unless the user opts out), or **(c)** a script with no derivable site / "don't scrape" (no-capture mode — pick a style preset that supplies palette + design system). A supplied script can be the **verbatim** voice-over or **restructured** per scene — PLV asks.
-- **Output:** a product launch / SaaS **promo** as a HyperFrames composition → MP4 (sweet spot 30–90s) — the product's value is the subject, not a walkthrough of the site. For a plain tour of the site, use `/website-to-video`.
-- **Triggers:** "launch video for X", "promo for our site", "explain my SaaS in a minute", "turn my script into a 60s promo", "text-only launch video, don't scrape".
+**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 (`references/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 text storyboard first, on a live board, with optional wireframe sketches before the full build (`../hyperframes-core/references/review-loop.md`). The user hears the process before any workflow starts.
-### `/website-to-video`
+**3 — Pick the route** (the route table and ambiguity rules in § 3), then open that route's entry in `references/route-briefs.md`. It 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.
-- **Input:** A website / URL whose goal is to show **the site itself**, not to sell a product. Best for non-commercial sites (portfolio, blog, docs, personal, event), or when the user explicitly wants a tour of a site as-is. Captured with headless Chrome for real screenshots + brand assets. If the site is selling something and the user wants a promo, use `/product-launch-video`.
-- **Output:** a site tour / showcase / social clip built from the site's own visuals → MP4.
-- **Triggers:** "turn this website into a video", "site tour from ", "social clip from our homepage", "I just have a URL — make something".
+**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 `references/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 `references/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`.
-### `/faceless-explainer`
+**5 — The route's must-haves.** One question per field, recommended option first with its receipt (rules: `../hyperframes-core/references/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.
-- **Input:** Arbitrary text — a topic, article, or notes — being **explained**, with no product being marketed and no site to capture. (Forked from `/product-launch-video`; no headless Chrome.)
-- **Output:** faceless explainer → MP4, every visual LLM-invented per scene (typography / abstract / diagram / data-viz); ships the `pin-and-paper` preset. (sweet spot 30–90s).
-- **Triggers:** "faceless explainer about X", "explain how DNS works as a video", "turn this article into an explainer", "explainer from my notes".
+**6 — The two run-shape questions** — where the route's entry applies them, asked after the must-haves, each on its own:
-### `/pr-to-video`
+- **(a) Storyboard?** Review the plan, wireframe sketches, and the finished piece pass by pass on a live board (`../hyperframes-core/references/review-loop.md`) — recommended for anything beyond a couple of scenes — or skip the board and get one finished video from the confirmed brief.
+- **(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.
-- **Input:** A **GitHub pull request** — a PR URL, an `owner/repo#N` ref, or "this PR" — read via the `gh` CLI (not a site to scrape).
-- **Output:** code-change explainer (changelog / feature-reveal / fix / refactor) → MP4 — diff highlights, before/after, file-tree + impact scenes. ≤ (sweet spot 30–90s).
-- **Triggers:** "make a video about this PR", "turn PR #1187 into a changelog video", "release-notes video from github.com/org/repo/pull/123".
+These two are **orthogonal — never merge them into one menu.** All four `flow` × `storyboard` combinations are valid user choices (a companion run reviews on the live board too 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.
-### `/embedded-captions`
+Signals 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 `../hyperframes-core/references/brief-contract.md` § 1.
-- **Input:** An existing **talking-head video** (MP4) to caption — actual footage, not a URL or brief. Transcribed and matted locally (no API key) so the subject can occlude captions.
-- **Output:** the same footage **untouched**, with a caption layer — one visual identity picked from its catalog (36, from a quiet verbatim rail to full VFX constitutions); the subject occludes the embedded captions. Any length.
-- **Triggers:** "add captions / subtitles to this video", "captions behind the subject", "cinematic captions for my clip".
+**7 — Nice-to-have: recommend, then show.** Skip this step when the selected route brief 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:
-### `/talking-head-recut`
+- **One or two rows** of `references/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”).
+- **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.
+- **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?
+- **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).
-- **Input:** An existing **talking-head / interview / podcast video** (MP4) to package with on-screen graphics — actual footage. Transcribed locally (Whisper). The clip plays in full underneath, untouched.
-- **Output:** the same footage with timed **graphic-overlay cards** — kinetic titles, lower-thirds, data callouts, pull-quotes, side panels, picture-in-picture — synced to the transcript. Any length.
-- **Triggers:** "package this video", "add graphic overlays / lower-thirds / data callouts to my talk", "turn this interview into a graphics-packaged edit".
+The 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.
-### `/motion-graphics`
+**8 — Hand off.** Three disciplines close the conversation (invariants: `../hyperframes-core/references/brief-contract.md` § 3):
-- **Input:** A short, design-led motion graphic where the **motion is the message** — typically under ~10s, no narration. Genres: kinetic typography, a stat / number count-up, a chart hit, a logo sting, a lower-third / overlay, an animated map (regions / routes / zoom-to-place), a search-driven page / tweet / news-article shot, or asset-fusion (a real image's geometry becomes the chart).
-- **Output:** a short motion graphic → MP4 or a **transparent overlay** (alpha WebM / MOV) for a lower-third / callout.
-- **Triggers:** "an 8s logo sting", "animate this stat", "a kinetic-type intro", "turn this tweet into a motion graphic", "a transparent lower-third overlay".
+- **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.
+- **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.
+- **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.
-### `/music-to-video`
+Then enter the workflow (`flow: companion` → `/general-video`; otherwise the matched route), installing it first per § 5. 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 canonical frontmatter values 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 (`../hyperframes-core/references/brief-format.md` names the subset), and asks no brief question again.
-- **Input:** A **music track** — an audio file, or a video to pull the audio from — with **no narration and no website capture**. Optionally, user-supplied images / videos to weave in. The track is analyzed once into a deterministic beat / energy map (`audiomap.json`) the whole video is built on.
-- **Output:** a **beat-synced** HyperFrames composition → MP4 where the music drives pacing. Typography and templates are the floor (a complete video needs zero assets); any supplied media is cut onto the same beat grid (beat-cut / ken-burns). The genre — lyric video, slideshow, kinetic promo — emerges from the per-frame choices; the pipeline never branches on it.
-- **Triggers:** "make a video for this song", "beat-synced video from this track", "lyric video", "turn this music into a video", "music visualizer / kinetic promo to this beat".
+## 5. Install and enter the workflow
-### `/slideshow`
+Before reading the selected workflow, install or refresh it and the core domain skills:
-- **Input:** A **presentation / pitch deck / interactive deck** to author — a brief, an outline, or an existing page to convert to slides. Not a request for a rendered video; if the intent is ambiguous, the skill confirms "do you want this as a HyperFrames slideshow?" before authoring.
-- **Output:** a runnable HyperFrames composition + a **JSON island** the player's `SlideshowController` reads to turn the GSAP timeline into a navigable **deck** — discrete slides, fragment reveals, branching sequences, hotspot navigation, presenter mode, and speaker notes. The deliverable is a deck, not an MP4.
-- **Triggers:** "make a pitch deck / presentation / slide deck", "an interactive deck", "convert this page into slides", "a slideshow with presenter mode".
+```bash
+npx hyperframes skills update <workflow-name>
+```
-### `/general-video`
+Use the bare name without `/`. If the command fails, surface the error; do not reconstruct the workflow from memory. Everything else about installation — the core-vs-lazy split, what `init` refreshes, diagnosis, CI opt-out, and the no-CLI fallback — lives in `references/skill-lifecycle.md`.
-- **Input:** Anything not above — a creative brief, a single element to animate, an edit to a composition you're building. Input- and length-agnostic.
-- **Output:** a HyperFrames composition (any length / format) via the original flow: design system → prompt expansion → plan → layout-before-animation → build (delegating to the `hyperframes-`\* skills) → validate.
-- **Triggers:** "make a title card", "animate this", "a longer brand / sizzle reel", "a multi-scene composition", "a static loop / poster", any "make a video" that fits no row above.
+## 6. Load domain skills on demand
-### `/remotion-to-hyperframes`
+| Need | Skill |
+| ------------------------------------------------------------------------------------------------------------------- | ------------------------ |
+| Composition structure, timing attributes, tracks, variables, determinism | `/hyperframes-core` |
+| Motion rules, scene blueprints, transitions, runtime adapters | `/hyperframes-animation` |
+| Seek-safe GSAP, CSS, Anime.js, WAAPI, FLIP, paths, masks, SVG, 3D keyframes, or `hyperframes keyframes` diagnostics | `/hyperframes-keyframes` |
+| Design specs, concept, palette, typography, narration, beat planning | `/hyperframes-creative` |
+| Images, icons, logos, audio, captions, grades, LUTs, reusable media | `/media-use` |
+| Init, lint, check, snapshots, compare, batch render, Studio, render, publish, or diagnostics | `/hyperframes-cli` |
+| Registry blocks and components | `/hyperframes-registry` |
+| Figma assets, tokens, components, or storyboard frames as reconstructed motion | `/figma` |
-- **Input:** An existing **Remotion** (React) composition's source — the user **explicitly** asks to port / convert / migrate it. One-way (Remotion → HyperFrames); not creation-from-input. A passing mention of Remotion is not a trigger.
-- **Output:** a HyperFrames HTML composition translated from the Remotion source, graded against the Remotion render (SSIM eval harness + tiered test corpus).
-- **Triggers:** "port my Remotion project to HyperFrames", "convert this Remotion comp", "migrate from Remotion".
+Domain skills never take ownership of the end-to-end deliverable. Load only what the active workflow needs.
diff --git a/skills/hyperframes/references/capability-menu.md b/skills/hyperframes/references/capability-menu.md
new file mode 100644
index 0000000000..87ac24f251
--- /dev/null
+++ b/skills/hyperframes/references/capability-menu.md
@@ -0,0 +1,47 @@
+# Capability menu — what HyperFrames can bring to a video
+
+One 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` § 4, 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.
+
+**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.
+
+Each 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.
+
+| Capability | Say it to the user as… | Home → entry → what you get |
+| ------------------------------------------------------------------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| **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 |
+| **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` |
+| **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` |
+| **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 |
+| **Voice, music, SFX, images, logos, color grades** — generated or resolved from the catalog, frozen into the project | "narration in a voice you pick, background music, sound effects, brand logos — and a cinematic grade on images" | `/media-use` → `scripts/resolve.mjs` (one verb, incl. `--type grade`) + the audio engine `audio/scripts/audio.mjs` → frozen local files + `.media/manifest.jsonl` records / `audio_meta.json` |
+| **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 |
+| **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 |
+| **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 |
+| **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 |
+| **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 |
+| **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 |
+| **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`) |
+| **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 |
+| **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 |
+| **Publish to a stable link** — the finished piece on a public URL; re-publishing updates the same link | "when it's done I can publish it to a link you can share — updates keep the same URL" | `/hyperframes-cli` → `references/preview-render.md` (`npx hyperframes publish`) → a stable public URL |
+
+Offer, 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.
+
+## The design ask — have it, pick it, or leave it
+
+The design-spec row is a three-state question, not an explainer (what a spec **is** stays in `design-spec.md`):
+
+- **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`).
+- **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).
+- **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.
+
+## Genre lenses — the shipped workflows' taste, borrowable
+
+The 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):
+
+| The piece resembles… | Borrow from |
+| ---------------------------------------- | ----------------------------------------------------------------------- |
+| a product promo / launch / site showcase | `/product-launch-video` → `references/` |
+| a topic / mechanism / concept explainer | `/faceless-explainer` → `references/` |
+| a code-change walkthrough | `/pr-to-video` → `references/` (+ `code-vocabulary.md` for code frames) |
+
+`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-core/references/production-loop.md`.
diff --git a/skills/hyperframes/references/pitch-round.md b/skills/hyperframes/references/pitch-round.md
new file mode 100644
index 0000000000..db8673bf96
--- /dev/null
+++ b/skills/hyperframes/references/pitch-round.md
@@ -0,0 +1,40 @@
+# Pitch round — the intent layer's divergent step
+
+Everything 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.
+
+## When it runs
+
+Triage (`/hyperframes` § 4, step 2) marks the request formed or unformed; only unformed requests enter the round, and only on routes whose `route-briefs.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).
+
+Before 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.
+
+## The sampling gate — internal, always
+
+Run this before writing any pitch, in every mode. None of it is shown to the user.
+
+First, four questions about this brief, answered specifically, not generically:
+
+1. **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.
+2. **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.
+3. **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.
+4. **What does every other video on this subject look like?** That is the anti-pattern. The tail pitches must not be it.
+
+Then 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.
+
+Probabilities never reach the user. They are a sampling constraint, not a scorecard.
+
+## Presenting the round
+
+Each 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.
+
+All 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.
+
+The 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.
+
+## The gate, alone — autonomous runs
+
+"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.
+
+## The decision map — "I don't know anything about video"
+
+A 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.
diff --git a/skills/hyperframes/references/route-briefs.md b/skills/hyperframes/references/route-briefs.md
new file mode 100644
index 0000000000..101ffa2380
--- /dev/null
+++ b/skills/hyperframes/references/route-briefs.md
@@ -0,0 +1,85 @@
+# Route briefs — what the intent layer asks, per route
+
+The adaptive half of the intent layer (`/hyperframes` § 4, steps 4–6): each route's entry names the **must-haves** to ask now, the **conditional** questions its input can add, the **deferred asks** to announce (questions that stay in the workflow because their recommendations need pipeline data — a probed clip, a captured site), and whether the two **run-shape questions** (storyboard? · automation or companion?) apply. An entry that names **pitch-eligible** fields sends an unformed request through the pitch round (`pitch-round.md`) after routing; the chosen concept answers those fields. An entry without that line never enters the round. These entries live here, in the router skill, because workflow skills install lazily — at routing time the matched workflow may not be on the machine yet.
+
+Field semantics and question rules: `hyperframes-core/references/brief-contract.md` § 2–3. Every question: recommended option first, receipt attached; a remembered value becomes the recommendation with its source named. The intro text of the brief always states **message** and **language** (state, don't ask).
+
+## `/faceless-explainer`
+
+- **Must-haves:** **angle** — concept / how-to / listicle / narrative, recommend the one the text's own shape suggests · **length** — inside the 30–90s sweet spot, scaled to how much the text actually teaches · **destination** — YouTube / embed → 16:9 · X / LinkedIn / Instagram feed → 1:1 · Shorts / TikTok → 9:16.
+- **Conditional:** a pasted script adds **`VO_MODE`** — use it verbatim, or restructure per scene?
+- **Pitch round:** `message` + `angle` — five tellings of the same topic are five different videos.
+- **Run-shape:** both.
+
+## `/product-launch-video`
+
+- **First, sell or show?** One question when the request doesn't say: market the product (a promo), or show the site as-is (a tour / showcase)? A show-it answer is **intent, not a different pipeline**: write it into `BRIEF.md` (`## Intent` / `## Customizations` — "feature the site's own captured screens as the video's assets") and the workflow's normal steps carry it — the captured screens become the featured `asset_candidates`.
+- **Must-haves:** **angle** — story shapes from the site's / brief's own positioning, recommend one with its basis · **length** — 30–90s sweet spot, scaled to the material · **destination** — as above.
+- **Conditional:** a show-it-as-is ask adds **what to show** — the whole site, or specific pages/sections (into `BRIEF.md`'s body); a pasted script/brief adds **`VO_MODE`** (verbatim or restructured?); a script that only names a site adds **capture?** — crawl it for brand + assets (default), or text-only / "don't scrape" (no-capture mode, a preset supplies the design system).
+- **Pitch round:** `message` + `angle`, after sell-or-show is settled — the pitches inherit that intent.
+- **Run-shape:** both.
+
+## `/pr-to-video`
+
+- **Must-haves:** the **PR reference** (URL, `owner/repo#N`, or "this PR") · **angle** — changelog / feature-reveal / fix-explainer / refactor-walkthrough, recommend the one the PR itself suggests · **audience** — developers (default) · mixed technical · non-technical stakeholders · **length** — from the size table below · **destination** — 16:9 is the default for a code explainer.
+- **Length comes from the PR's change size**, not a fixed guess — peek once, read-only (the workflow's Step 1 still does the full deterministic fetch):
+
+ ```bash
+ gh pr view <PR_REF> --json title,additions,deletions,changedFiles
+ ```
+
+ Pick the tier from `additions + deletions` (nudged up by `changedFiles`) and lead with it (hard cap ~3 min):
+
+ | PR change size | Recommended length |
+ | --------------------------------- | ------------------ |
+ | trivial (≲ 50 lines changed) | ~20–40s |
+ | focused (~50–200 lines) | ~40–70s |
+ | substantial (~200–600 lines) | ~70–110s |
+ | large (≳ 600 lines, or 25+ files) | ~110–180s |
+
+ State the basis in one phrase ("~40s — small change, +44/−13 across 12 files"). The tier is a **ceiling** on how much story the diff can support, never a floor to fill: a one-headline story recommends inside 30–90s regardless of tier (the tier's range may still appear as a non-recommended fuller-walkthrough option).
+
+- **Pitch round:** `angle` and the opening hook — the diff fixes the facts, not the telling.
+- **Run-shape:** both.
+
+## `/general-video`
+
+- **Open-ended requests only:** first derive a one-sentence `message`. Ask `audience` only when it is unclear and would change the story or terminology. Ask `destination` only when it would change aspect or composition. Ask for a priority only when the brief contains a real trade-off. Default to one best version; ask about variations only when the user requests options or comparison.
+- **Specific requests:** a complete ask such as “a static title card with our logo for a website hero” needs no discovery questions.
+- **Pitch round:** `message` — the unformed open-ended request is this round's home case.
+- **Run-shape:** both questions apply. `/general-video` is also the companion host, so `flow: companion` stays on this route with the full toolbox.
+
+## `/music-to-video`
+
+- **Must-haves:** the **music source** — a track file, a video to pull audio from, or generate one from a mood description · **destination → aspect**.
+- **Deferred (announce):** brand (font + palette) and the genre feel are chosen at its Step 3 by design — they emerge from the track's analysis, not from a question up front.
+- **Pitch round:** `message` — the visual concept riding the beat grid (lyric treatment, montage story, kinetic type); brand and genre feel still land at Step 3.
+- **Run-shape:** both.
+
+## `/motion-graphics`
+
+- Autonomous by design: at most **one** clarifying question, owned by its director step, in the flow. No must-haves here beyond confirming the input; route directly.
+- **Run-shape:** neither — the piece is seconds long; a board and a companion session have nothing to add.
+- **Front-door capability offer:** skip it. The director's one-question limit is authoritative.
+
+## `/slideshow`
+
+- The one question is the routing confirmation itself — "do you want this as a HyperFrames slideshow?" — asked during triage (it survives every mode: wrong routing is a quality problem). The deck contract owns everything after.
+- **Run-shape:** neither — the deliverable is a navigable deck, not a rendered video.
+- **Front-door capability offer:** skip it. After route confirmation, the deck workflow owns all remaining choices.
+
+## `/embedded-captions`
+
+- **Must-haves:** which clip (the input file).
+- **Deferred (announce):** the caption **identity** pick — its Step 0 probes the clip first, then shortlists 2–3 identities from the catalog and recommends one. Say that's coming.
+- **Run-shape:** neither — the footage is untouched; there is no storyboard to review.
+
+## `/talking-head-recut`
+
+- **Must-haves:** which clip (the input file).
+- **Deferred (announce):** its render-strategy questions — aspect ratio, layout, style group, card count — stay at its Step 7, where the recommendations come from the probed footage and transcript. Say they're coming.
+- **Run-shape:** neither.
+
+## `/remotion-to-hyperframes`
+
+- Not served by the intent layer — a migration with no brief. Route directly.
diff --git a/skills/hyperframes/references/skill-lifecycle.md b/skills/hyperframes/references/skill-lifecycle.md
new file mode 100644
index 0000000000..cf5c79d05e
--- /dev/null
+++ b/skills/hyperframes/references/skill-lifecycle.md
@@ -0,0 +1,33 @@
+# Skill installation and freshness
+
+Read this reference when installing or updating skills, diagnosing unexpected workflow behavior, or running HyperFrames setup in CI.
+
+HyperFrames installs the core set eagerly and workflow skills lazily.
+
+- **Core set:** `/hyperframes`, the `hyperframes-*` domain skills, and `/media-use`.
+- **Workflow skills:** installed when routing selects them through `npx hyperframes skills update <workflow-name>`.
+
+## What `init` does
+
+`npx hyperframes init` checks GitHub and refreshes the core set plus other skills already installed. It does not install workflows that have never been used. A current install is a no-op. Offline or rate-limited checks degrade gracefully and do not fail project scaffolding.
+
+The `--skip-skills` CLI flag is temporarily ignored. CI and tests may opt out with `HYPERFRAMES_SKIP_SKILLS=1`.
+
+## Diagnose and update
+
+```bash
+npx hyperframes skills check
+npx hyperframes skills check --json
+npx hyperframes skills update
+npx hyperframes skills update <workflow-name>
+npx hyperframes skills
+```
+
+- `skills check` exits non-zero when an installed skill is stale or the core set is incomplete. Workflows available on demand but not installed are not failures.
+- Bare `skills update` refreshes the core set and everything already installed, prunes unpublished skills, and does not expand the workflow set.
+- Named `skills update <name...>` also installs those named workflows or domain skills.
+- Bare `skills` installs the full published set explicitly.
+
+If the HyperFrames CLI is unavailable, use `npx skills add heygen-com/hyperframes --skill <workflow-name>` for one workflow or `npx skills add heygen-com/hyperframes --all` for the full published set.
+
+The CLI may print a one-line stale-skill reminder during `render`, `lint`, or `check`. Treat a failed update as a visible tool failure; do not continue from a remembered workflow contract.
diff --git a/skills/hyperframes/references/workflow-catalog.md b/skills/hyperframes/references/workflow-catalog.md
new file mode 100644
index 0000000000..f511d2bcdc
--- /dev/null
+++ b/skills/hyperframes/references/workflow-catalog.md
@@ -0,0 +1,70 @@
+# Workflow catalog
+
+Use this catalog while routing, before the selected workflow is lazy-installed. After the routing table in `../SKILL.md` yields a candidate, read that candidate's section and confirm that its input and output match the request.
+
+## Sections
+
+- [`/product-launch-video`](#product-launch-video), [`/faceless-explainer`](#faceless-explainer), [`/pr-to-video`](#pr-to-video)
+- [`/embedded-captions`](#embedded-captions), [`/talking-head-recut`](#talking-head-recut)
+- [`/motion-graphics`](#motion-graphics), [`/music-to-video`](#music-to-video), [`/slideshow`](#slideshow)
+- [`/general-video`](#general-video), [`/remotion-to-hyperframes`](#remotion-to-hyperframes)
+
+## `/product-launch-video`
+
+- **Input:** A website URL; a script or brief that names a site; or a product-launch script with no derivable site or an explicit “do not scrape” instruction. Capture website assets and brand tokens unless the brief selects no-capture mode. Ask whether supplied script copy is verbatim voice-over or may be restructured.
+- **Output:** A product promo, launch video, site tour, or showcase MP4. Sweet spot 30–90s; hard cap about 3 minutes. A show-it-as-is brief features captured screens rather than inventing a separate route.
+- **Triggers:** “launch video for X”, “promo for our site”, “turn this script into a 60s promo”, “text-only launch video”, “turn this website into a video”, “site tour from this URL”.
+
+## `/faceless-explainer`
+
+- **Input:** A topic, article, notes, or arbitrary text being explained, with no product being marketed and no website to capture.
+- **Output:** A faceless explainer MP4 with invented typography, abstract graphics, diagrams, or data visualization. Sweet spot 30–90s; hard cap about 3 minutes.
+- **Triggers:** “faceless explainer about X”, “explain how DNS works as a video”, “turn this article into an explainer”.
+
+## `/pr-to-video`
+
+- **Input:** A GitHub PR URL, `owner/repo#N`, or “this PR”, read through `gh`; it is not a website capture request.
+- **Output:** A changelog, feature reveal, fix explainer, or refactor walkthrough with diff, before/after, file-tree, and impact scenes. Hard cap about 3 minutes; duration follows change size.
+- **Triggers:** “make a video about this PR”, “turn PR #1187 into a changelog video”, “release-notes video from this pull request”.
+
+## `/embedded-captions`
+
+- **Input:** Existing talking-head footage to caption. It is an actual media file, not a URL or creative brief.
+- **Output:** The same footage, untouched, with a caption layer and selected caption identity. The subject may occlude embedded captions. Any length.
+- **Triggers:** “add captions”, “add subtitles”, “captions behind the subject”, “cinematic captions for my clip”.
+
+## `/talking-head-recut`
+
+- **Input:** Existing talking-head, interview, or podcast footage to package. The underlying clip plays unchanged.
+- **Output:** The same footage with transcript-synced graphic-overlay cards: kinetic titles, lower-thirds, data callouts, pull-quotes, side panels, or picture-in-picture. Any length.
+- **Triggers:** “package this video”, “add graphic overlays to my talk”, “add lower-thirds or data callouts to this interview”.
+
+## `/motion-graphics`
+
+- **Input:** A short design-led unit, typically under 10s, with no narration, where motion is the message: kinetic type, stat/count-up, chart hit, logo sting, animated title, lower-third, map, tweet/headline/page highlight, or asset-fusion shot.
+- **Output:** A short MP4 or transparent alpha WebM/MOV overlay.
+- **Triggers:** “an 8s logo sting”, “animate this stat”, “kinetic-type intro”, “animate this title”, “transparent lower-third overlay”.
+
+## `/music-to-video`
+
+- **Input:** A music track, or a video whose audio becomes the track, with no narration or website capture. User images or videos are optional.
+- **Output:** A beat-synced MP4 driven by a deterministic beat/energy map (`audiomap.json`). It may become a lyric video, slideshow, visualizer, or kinetic promo without changing pipelines.
+- **Triggers:** “make a video for this song”, “beat-synced video”, “lyric video”, “music visualizer”, “kinetic promo to this beat”.
+
+## `/slideshow`
+
+- **Input:** A brief, outline, or existing page to author as a presentation, pitch deck, or interactive deck. If “slides”, “deck”, or “convert this page” is ambiguous, confirm that the user wants a HyperFrames slideshow before authoring.
+- **Output:** A runnable HyperFrames composition plus the JSON island used by `SlideshowController`: discrete slides, fragment reveals, branching, hotspots, presenter mode, and speaker notes. The deliverable is a navigable deck, not an MP4.
+- **Triggers:** “make a pitch deck”, “interactive presentation”, “convert this page into slides”, “slideshow with presenter mode”.
+
+## `/general-video`
+
+- **Input:** Any custom creation or edit not covered above: a static title card, longer brand or sizzle reel, multi-scene montage, static loop/poster, NLE-like footage remix, or freeform composition. It also executes every `flow: companion` brief.
+- **Output:** A HyperFrames composition of any length or format through design → plan → static layout → animation → check → approval → render.
+- **Triggers:** “make a static title card”, “longer brand reel”, “multi-scene composition”, “static loop”, “custom video”, or any unmatched video request.
+
+## `/remotion-to-hyperframes`
+
+- **Input:** Existing Remotion React source, only when the user explicitly asks to port, convert, or migrate it. A passing Remotion mention is not a trigger.
+- **Output:** A HyperFrames HTML composition translated from the source and compared with the Remotion render through the migration evaluation harness.
+- **Triggers:** “port my Remotion project”, “convert this Remotion composition”, “migrate from Remotion”.
diff --git a/skills/media-use/SKILL.md b/skills/media-use/SKILL.md
index 07d6e5669c..8a8337e2e6 100644
--- a/skills/media-use/SKILL.md
+++ b/skills/media-use/SKILL.md
@@ -318,6 +318,30 @@ Assets are cached automatically on resolve. Every resolved/ingested asset is aut
For a _semantically_ similar (not identical) need in another project, the exact-match floor won't fire — use [Reuse before you resolve](#reuse-before-you-resolve): `--candidates` lists the global assets, and `--reuse <sha>` imports the one you pick. This is how a track resolved in one project gets reused in the next when the wording differs.
+## Preferences — remembered defaults
+
+The lightweight tier of user memory: confirmed brief answers (destination, aspect, language, flow, storyboard, voice, style preset) persisted on the same two-tier split as assets — project `.media/preferences.json` (committed, the team inherits it) and personal `~/.media/preferences.json`. A value earns the personal tier by being confirmed in **two different projects**, so a one-off choice never pollutes the global defaults.
+
+```bash
+node <SKILL_DIR>/scripts/prefs.mjs get --hyperframes . --json # merged view (project overrides user)
+node <SKILL_DIR>/scripts/prefs.mjs record --hyperframes . --key destination --value x-feed
+node <SKILL_DIR>/scripts/prefs.mjs record --hyperframes . --key style_preset --value pin-and-paper --workflow faceless-explainer
+```
+
+Only what the user actually confirmed gets recorded — never an inferred or defaulted value. How workflows consume these (a remembered value becomes the recommended default with a receipt, and never skips a question) is the brief contract's rule: `hyperframes-core/references/brief-contract.md` § 2, Remembered defaults.
+
+## Recipes — frozen video bundles
+
+The heavyweight tier of user memory: one approved run frozen as a named, versioned bundle — `frame.md`, the storyboard skeleton (structure kept, content blanked to per-frame fill-ins), the brief skeleton (from `BRIEF.md` when the project has one — reusable frontmatter kept, run-shape and prose blanked), and the confirmed brief values. Same two tiers: project `.media/recipes/<name>/` (committed) and `~/.media/recipes/<name>/` (a freeze is already a confirmed bundle, so it promotes immediately — no two-project rule). Re-freezing a name bumps `version` and archives the old folder as `<name>@v<N>`.
+
+```bash
+node <SKILL_DIR>/scripts/recipe.mjs freeze --hyperframes . --name weekly-promo # workflow read from BRIEF.md (--workflow only for briefless projects)
+node <SKILL_DIR>/scripts/recipe.mjs list --hyperframes . --workflow product-launch-video
+node <SKILL_DIR>/scripts/recipe.mjs use --hyperframes . --name weekly-promo # also: resolve.mjs --type recipe --entity weekly-promo
+```
+
+The freeze is offered once after the final approval (`hyperframes-core/references/review-loop.md` § 4), and the intent layer (`/hyperframes` § 4) checks for a match before its first question. Adopting a recipe fills the brief, the design spec, and the storyboard skeleton — and unlike preferences it may skip the questions it answers: the bundle was approved as a whole, and adoption itself is the question.
+
## Usage stats
Use `resolve --stats` for a local, shareable report over the current project's `.media/` manifest, the global `~/.media/` cache, and local resolve misses. Human output is compact; add `--json` for a single machine-readable object, and `--days N` to window timestamped records.
@@ -334,7 +358,11 @@ node <SKILL_DIR>/scripts/resolve.mjs --stats --project . --days 7
- `.media/manifest.jsonl`: machine SSOT, one JSON record per line
- `.media/index.md`: agent-readable table (id, type, dur, dims, path, description)
+- `.media/preferences.json`: the project's remembered defaults (committed)
- `~/.media/`: global cross-project reuse cache (content-addressed, SHA-256)
+- `~/.media/preferences.json`: personal remembered defaults (promoted after two projects)
+- `.media/recipes/<name>/`: frozen video bundles — recipe.json + frame.md + storyboard skeleton (committed)
+- `~/.media/recipes/<name>/`: personal recipe tier (promoted on freeze)
- `~/.media/misses.jsonl`: local-only resolve misses, including intent text for `--stats`
## Audio engine: voiceover, music, SFX, captions, transcription
diff --git a/skills/media-use/scripts/lib/manifest.mjs b/skills/media-use/scripts/lib/manifest.mjs
index f5aea62b54..296b1cd5a2 100644
--- a/skills/media-use/scripts/lib/manifest.mjs
+++ b/skills/media-use/scripts/lib/manifest.mjs
@@ -26,6 +26,7 @@ const TYPE_DIRS = {
video: "video",
grade: "luts",
lut: "luts",
+ recipe: "recipes",
};
export function mediaDir(projectDir) {
diff --git a/skills/media-use/scripts/lib/prefs-store.mjs b/skills/media-use/scripts/lib/prefs-store.mjs
new file mode 100644
index 0000000000..6bc3f7345f
--- /dev/null
+++ b/skills/media-use/scripts/lib/prefs-store.mjs
@@ -0,0 +1,180 @@
+import { existsSync, mkdirSync, readFileSync, renameSync, writeFileSync } from "node:fs";
+import { homedir } from "node:os";
+import { basename, dirname, join, resolve } from "node:path";
+
+/**
+ * Remembered defaults — the lightweight tier of HyperFrames user memory.
+ *
+ * Two files, same shape as the rest of media-use's storage split:
+ * - project `.media/preferences.json` — committed with the repo, so the whole
+ * team inherits it; written every time a brief answer is confirmed.
+ * - user `~/.media/preferences.json` — personal, cross-repo. A key is promoted
+ * here only once the same value has been confirmed in two different projects
+ * (`PROMOTE_AT`), so a one-off choice never pollutes the global defaults.
+ * Pre-promotion evidence accumulates in the user file's `sightings` ledger —
+ * project files can't see each other, so the cross-project count has to live
+ * user-side.
+ *
+ * Consumption contract (brief-contract § 2, Remembered defaults): a remembered
+ * value becomes the recommended option with a receipt naming its source — it
+ * never skips a question, and explicit request content always wins.
+ */
+
+const PREFS_FILE = "preferences.json";
+
+/** Keys the brief contract records; `style_preset` is stored per workflow. */
+export const PREFERENCE_KEYS = [
+ "destination",
+ "aspect",
+ "language",
+ "flow",
+ "storyboard",
+ "voice",
+ "style_preset",
+];
+
+/** A value must be confirmed in this many distinct projects to go user-tier. */
+export const PROMOTE_AT = 2;
+
+export function projectPrefsPath(projectDir) {
+ return join(resolve(projectDir), ".media", PREFS_FILE);
+}
+
+export function userPrefsPath() {
+ return join(homedir(), ".media", PREFS_FILE);
+}
+
+function emptyFile() {
+ return { version: 1, preferences: {}, sightings: {} };
+}
+
+function isRecord(value) {
+ return typeof value === "object" && value !== null && !Array.isArray(value);
+}
+
+/** Tolerant read — a missing or malformed file counts as empty. */
+function readPrefsFile(path) {
+ try {
+ if (!existsSync(path)) return emptyFile();
+ const parsed = JSON.parse(readFileSync(path, "utf8"));
+ if (!isRecord(parsed)) return emptyFile();
+ return {
+ version: 1,
+ preferences: isRecord(parsed.preferences) ? parsed.preferences : {},
+ sightings: isRecord(parsed.sightings) ? parsed.sightings : {},
+ };
+ } catch {
+ return emptyFile();
+ }
+}
+
+/** Atomic write (tmp + rename) so a crash never leaves a torn file. */
+function writePrefsFile(path, file) {
+ mkdirSync(dirname(path), { recursive: true });
+ const tmp = `${path}.tmp`;
+ writeFileSync(tmp, `${JSON.stringify(file, null, 2)}\n`);
+ renameSync(tmp, path);
+}
+
+/** `style_preset` entries are stored per workflow as `style_preset.<workflow>`. */
+export function preferenceKeyFor(key, workflow) {
+ return key === "style_preset" && workflow ? `style_preset.${workflow}` : key;
+}
+
+function validEntry(entry) {
+ return isRecord(entry) && typeof entry.value === "string" && entry.value.length > 0;
+}
+
+/**
+ * The merged view the brief reads: user-tier promoted entries first, project
+ * entries on top (project wins). Each entry carries `source` plus the receipt
+ * material (`confirmed_in`, `updated_at`).
+ */
+export function mergedPreferences(projectDir) {
+ const user = readPrefsFile(userPrefsPath());
+ const project = readPrefsFile(projectPrefsPath(projectDir));
+ const merged = {};
+ for (const [key, entry] of Object.entries(user.preferences)) {
+ if (validEntry(entry)) merged[key] = { ...entry, source: "user" };
+ }
+ for (const [key, entry] of Object.entries(project.preferences)) {
+ if (validEntry(entry)) merged[key] = { ...entry, source: "project" };
+ }
+ return merged;
+}
+
+function dedupe(list) {
+ return [...new Set(list)];
+}
+
+/**
+ * Project tier: same value accumulates confirmations; a changed value starts
+ * provenance over (the old confirmations vouched for the old value).
+ */
+function recordProjectTier(projectDir, fullKey, value, projectName, now) {
+ const path = projectPrefsPath(projectDir);
+ const file = readPrefsFile(path);
+ const previous = file.preferences[fullKey];
+ const keepProvenance = validEntry(previous) && previous.value === value;
+ const confirmedIn = keepProvenance
+ ? dedupe([...(Array.isArray(previous.confirmed_in) ? previous.confirmed_in : []), projectName])
+ : [projectName];
+ file.preferences[fullKey] = { value, confirmed_in: confirmedIn, updated_at: now };
+ writePrefsFile(path, file);
+ return confirmedIn;
+}
+
+/**
+ * User tier: accumulate this sighting in the ledger, and promote the key once
+ * the same value has been confirmed in PROMOTE_AT distinct projects.
+ */
+function recordUserSighting(fullKey, value, projectName, now) {
+ const path = userPrefsPath();
+ const file = readPrefsFile(path);
+ const keySightings = isRecord(file.sightings[fullKey]) ? file.sightings[fullKey] : {};
+ const seenIn = dedupe([
+ ...(Array.isArray(keySightings[value]) ? keySightings[value] : []),
+ projectName,
+ ]);
+ keySightings[value] = seenIn;
+ file.sightings[fullKey] = keySightings;
+ const promoted = seenIn.length >= PROMOTE_AT;
+ if (promoted) {
+ file.preferences[fullKey] = { value, confirmed_in: seenIn, updated_at: now };
+ }
+ writePrefsFile(path, file);
+ return promoted;
+}
+
+/**
+ * Record one confirmed brief answer. Always writes the project tier; feeds the
+ * user tier's sightings ledger and promotes once the same value has been
+ * confirmed in PROMOTE_AT distinct projects. Idempotent per project.
+ */
+export function recordPreference({ projectDir, key, value, workflow }) {
+ if (!PREFERENCE_KEYS.includes(key)) {
+ throw new Error(`unknown preference key: "${key}" (known: ${PREFERENCE_KEYS.join(", ")})`);
+ }
+ if (typeof value !== "string" || !value.trim()) {
+ throw new Error("a preference needs a non-empty string value");
+ }
+ if (key === "style_preset" && (!workflow || !String(workflow).trim())) {
+ throw new Error("style_preset is stored per workflow — pass --workflow <w>");
+ }
+ const fullKey = preferenceKeyFor(key, workflow);
+ const projectName = basename(resolve(projectDir));
+ const trimmed = value.trim();
+ const now = new Date().toISOString();
+
+ const confirmedIn = recordProjectTier(projectDir, fullKey, trimmed, projectName, now);
+
+ // Best-effort — a read-only home directory must never fail a brief.
+ let promoted = false;
+ try {
+ promoted = recordUserSighting(fullKey, trimmed, projectName, now);
+ } catch {
+ // The project record already landed; promotion just waits for next time.
+ }
+
+ return { key: fullKey, value: trimmed, confirmed_in: confirmedIn, promoted };
+}
diff --git a/skills/media-use/scripts/lib/prefs-store.test.mjs b/skills/media-use/scripts/lib/prefs-store.test.mjs
new file mode 100644
index 0000000000..e0bc5ca814
--- /dev/null
+++ b/skills/media-use/scripts/lib/prefs-store.test.mjs
@@ -0,0 +1,189 @@
+import { strict as assert } from "node:assert";
+import { test } from "node:test";
+import { mkdirSync, mkdtempSync, readFileSync, rmSync, writeFileSync } from "node:fs";
+import { tmpdir } from "node:os";
+import { join } from "node:path";
+import {
+ mergedPreferences,
+ preferenceKeyFor,
+ projectPrefsPath,
+ recordPreference,
+ userPrefsPath,
+} from "./prefs-store.mjs";
+
+function sandbox() {
+ const root = mkdtempSync(join(tmpdir(), "mu-prefs-"));
+ const home = join(root, "home");
+ const projectA = join(root, "proj-a");
+ const projectB = join(root, "proj-b");
+ mkdirSync(home, { recursive: true });
+ mkdirSync(projectA, { recursive: true });
+ mkdirSync(projectB, { recursive: true });
+ process.env.HOME = home;
+ return { root, home, projectA, projectB };
+}
+
+function restoreEnv(saved) {
+ for (const k of Object.keys(process.env)) if (!(k in saved)) delete process.env[k];
+ Object.assign(process.env, saved);
+}
+
+function withSandbox(fn) {
+ const savedEnv = { ...process.env };
+ const box = sandbox();
+ try {
+ fn(box);
+ } finally {
+ restoreEnv(savedEnv);
+ rmSync(box.root, { recursive: true, force: true });
+ }
+}
+
+test("record writes the project tier and get merges it as source=project", () => {
+ withSandbox(({ projectA }) => {
+ const result = recordPreference({ projectDir: projectA, key: "destination", value: "x-feed" });
+ assert.equal(result.promoted, false);
+ assert.deepEqual(result.confirmed_in, ["proj-a"]);
+
+ const merged = mergedPreferences(projectA);
+ assert.equal(merged.destination.value, "x-feed");
+ assert.equal(merged.destination.source, "project");
+
+ const onDisk = JSON.parse(readFileSync(projectPrefsPath(projectA), "utf8"));
+ assert.equal(onDisk.preferences.destination.value, "x-feed");
+ });
+});
+
+test("one project never promotes: a fresh project sees nothing user-tier", () => {
+ withSandbox(({ projectA, projectB }) => {
+ recordPreference({ projectDir: projectA, key: "destination", value: "x-feed" });
+ // proj-b has no project entry, and the value was only confirmed once.
+ assert.equal(mergedPreferences(projectB).destination, undefined);
+ });
+});
+
+test("the same value confirmed in two projects promotes to the user tier", () => {
+ withSandbox(({ projectA, projectB }) => {
+ recordPreference({ projectDir: projectA, key: "destination", value: "x-feed" });
+ const second = recordPreference({ projectDir: projectB, key: "destination", value: "x-feed" });
+ assert.equal(second.promoted, true);
+
+ const userFile = JSON.parse(readFileSync(userPrefsPath(), "utf8"));
+ assert.deepEqual(userFile.preferences.destination.confirmed_in.sort(), ["proj-a", "proj-b"]);
+
+ // A third project with no local entry now inherits the promoted default.
+ const projectC = join(projectA, "..", "proj-c");
+ mkdirSync(projectC, { recursive: true });
+ const merged = mergedPreferences(projectC);
+ assert.equal(merged.destination.value, "x-feed");
+ assert.equal(merged.destination.source, "user");
+ });
+});
+
+test("record is idempotent per project — confirmed_in stays deduped", () => {
+ withSandbox(({ projectA }) => {
+ recordPreference({ projectDir: projectA, key: "language", value: "zh" });
+ const again = recordPreference({ projectDir: projectA, key: "language", value: "zh" });
+ assert.deepEqual(again.confirmed_in, ["proj-a"]);
+ assert.equal(again.promoted, false);
+ });
+});
+
+test("a changed value restarts provenance instead of inheriting confirmations", () => {
+ withSandbox(({ projectA, projectB }) => {
+ recordPreference({ projectDir: projectA, key: "destination", value: "x-feed" });
+ recordPreference({ projectDir: projectB, key: "destination", value: "x-feed" });
+ const switched = recordPreference({
+ projectDir: projectA,
+ key: "destination",
+ value: "youtube",
+ });
+ assert.deepEqual(switched.confirmed_in, ["proj-a"]);
+ assert.equal(switched.promoted, false);
+ // The previously promoted value keeps serving other projects until youtube
+ // earns its own two confirmations.
+ const userFile = JSON.parse(readFileSync(userPrefsPath(), "utf8"));
+ assert.equal(userFile.preferences.destination.value, "x-feed");
+ });
+});
+
+test("project tier overrides a promoted user-tier value", () => {
+ withSandbox(({ projectA, projectB }) => {
+ recordPreference({ projectDir: projectA, key: "storyboard", value: "yes" });
+ recordPreference({ projectDir: projectB, key: "storyboard", value: "yes" });
+ recordPreference({ projectDir: projectA, key: "storyboard", value: "no" });
+ const merged = mergedPreferences(projectA);
+ assert.equal(merged.storyboard.value, "no");
+ assert.equal(merged.storyboard.source, "project");
+ });
+});
+
+test("the retired mode key is rejected", () => {
+ withSandbox(({ projectA }) => {
+ assert.throws(
+ () => recordPreference({ projectDir: projectA, key: "mode", value: "collaborative" }),
+ /unknown preference key/,
+ );
+ });
+});
+
+test("the run-shape keys record and promote like any field", () => {
+ withSandbox(({ projectA, projectB }) => {
+ recordPreference({ projectDir: projectA, key: "flow", value: "automation" });
+ const promoted = recordPreference({ projectDir: projectB, key: "flow", value: "automation" });
+ assert.equal(promoted.promoted, true);
+ recordPreference({ projectDir: projectA, key: "storyboard", value: "yes" });
+ const merged = mergedPreferences(projectA);
+ assert.equal(merged.flow.value, "automation");
+ assert.equal(merged.storyboard.value, "yes");
+ assert.equal(merged.storyboard.source, "project");
+ });
+});
+
+test("style_preset is keyed per workflow", () => {
+ withSandbox(({ projectA }) => {
+ assert.equal(
+ preferenceKeyFor("style_preset", "faceless-explainer"),
+ "style_preset.faceless-explainer",
+ );
+ assert.equal(preferenceKeyFor("destination", "faceless-explainer"), "destination");
+ recordPreference({
+ projectDir: projectA,
+ key: "style_preset",
+ value: "pin-and-paper",
+ workflow: "faceless-explainer",
+ });
+ const merged = mergedPreferences(projectA);
+ assert.equal(merged["style_preset.faceless-explainer"].value, "pin-and-paper");
+ assert.equal(merged["style_preset"], undefined);
+ });
+});
+
+test("style_preset without a workflow is rejected, never stored bare", () => {
+ withSandbox(({ projectA }) => {
+ assert.throws(
+ () => recordPreference({ projectDir: projectA, key: "style_preset", value: "pin-and-paper" }),
+ /pass --workflow/,
+ );
+ assert.deepEqual(mergedPreferences(projectA), {});
+ });
+});
+
+test("unknown keys and empty values are rejected", () => {
+ withSandbox(({ projectA }) => {
+ assert.throws(() => recordPreference({ projectDir: projectA, key: "vibe", value: "x" }));
+ assert.throws(() => recordPreference({ projectDir: projectA, key: "voice", value: " " }));
+ });
+});
+
+test("corrupt files are treated as empty instead of crashing", () => {
+ withSandbox(({ projectA, home }) => {
+ mkdirSync(join(projectA, ".media"), { recursive: true });
+ writeFileSync(projectPrefsPath(projectA), "not json");
+ mkdirSync(join(home, ".media"), { recursive: true });
+ writeFileSync(userPrefsPath(), '{"preferences": 42}');
+ assert.deepEqual(mergedPreferences(projectA), {});
+ const result = recordPreference({ projectDir: projectA, key: "language", value: "zh" });
+ assert.equal(result.value, "zh");
+ });
+});
diff --git a/skills/media-use/scripts/lib/recipe-store.mjs b/skills/media-use/scripts/lib/recipe-store.mjs
new file mode 100644
index 0000000000..e11ec96a31
--- /dev/null
+++ b/skills/media-use/scripts/lib/recipe-store.mjs
@@ -0,0 +1,367 @@
+import {
+ cpSync,
+ existsSync,
+ mkdirSync,
+ readdirSync,
+ readFileSync,
+ renameSync,
+ rmSync,
+ writeFileSync,
+} from "node:fs";
+import { homedir } from "node:os";
+import { basename, join, resolve } from "node:path";
+import { appendRecord, mediaDir, nextId } from "./manifest.mjs";
+import { regenerateIndex } from "./index-gen.mjs";
+import { mergedPreferences } from "./prefs-store.mjs";
+
+/**
+ * Recipes — the heavyweight tier of HyperFrames user memory.
+ *
+ * A recipe is the full confirmed bundle for one video type: the frozen design
+ * spec (`frame.md`), the storyboard skeleton (structure with the content
+ * blanked), and the confirmed brief values — frozen after the run's final
+ * approval, reused to start the next video of the same type from everything
+ * already approved.
+ *
+ * Storage is **named folders**, not content-addressed cache entries: a recipe
+ * is an evolving bundle with a `version`, so re-freezing the same name bumps
+ * the version and archives the old folder as `<name>@v<N>`. Two tiers, same
+ * split as everything else in media-use: project `.media/recipes/<name>/`
+ * (committed) and user `~/.media/recipes/<name>/` (a freeze is already a
+ * confirmed bundle, so it promotes immediately — no two-project rule here).
+ */
+
+/** Frontmatter keys that describe THIS video, not the reusable type. */
+const FRONTMATTER_CONTENT_KEYS = new Set(["message", "audience", "mode"]);
+
+/** BRIEF.md frontmatter keys that describe this run, not the reusable type —
+ * a recipe never locks the run's shape, so the intent layer always re-asks. */
+const BRIEF_CONTENT_KEYS = new Set(["flow", "storyboard", "message", "audience"]);
+
+/** Per-frame metadata that is content, not structure. */
+const FRAME_CONTENT_KEYS = new Set([
+ "voiceover",
+ "vo",
+ "voice_over",
+ "narration",
+ "scene",
+ "description",
+ "summary",
+ "caption",
+ "asset_candidates",
+]);
+
+const FRAME_HEADING_RE = /^(#{2,3})\s+(?:frame|beat|scene)\s+\d+/i;
+
+export function projectRecipesDir(projectDir) {
+ return join(mediaDir(projectDir), "recipes");
+}
+
+export function userRecipesDir() {
+ return join(homedir(), ".media", "recipes");
+}
+
+export function slugifyRecipeName(name) {
+ const slug = String(name ?? "")
+ .trim()
+ .toLowerCase()
+ .replace(/[\s_]+/g, "-")
+ .replace(/[^a-z0-9-]/g, "")
+ .replace(/-+/g, "-")
+ .replace(/^-|-$/g, "");
+ if (!slug) throw new Error(`recipe name "${name}" has no usable characters`);
+ return slug;
+}
+
+function frameTitle(headingLine) {
+ const dash = headingLine.split(/\s+—\s+/)[1];
+ if (dash && dash.trim()) return dash.trim();
+ return headingLine.replace(/^#+\s*/, "").trim();
+}
+
+/** Frontmatter: drop the content keys, keep structure/style keys verbatim. */
+function skeletonFrontmatter(lines, out, contentKeys = FRONTMATTER_CONTENT_KEYS) {
+ if (lines[0]?.trim() !== "---") return 0;
+ out.push(lines[0]);
+ let i = 1;
+ while (i < lines.length && lines[i].trim() !== "---") {
+ const key = lines[i].match(/^(\w+)\s*:/)?.[1]?.toLowerCase();
+ if (!key || !contentKeys.has(key)) out.push(lines[i]);
+ i++;
+ }
+ if (i < lines.length) {
+ out.push(lines[i]); // closing ---
+ i++;
+ }
+ return i;
+}
+
+/** One line inside a frame section — returns the replacement lines (may be none). */
+function skeletonFrameLine(line, state, out) {
+ const bulletKey = line.match(/^-\s+(\w+)\s*:/)?.[1]?.toLowerCase();
+ if (bulletKey) {
+ if (bulletKey === "status") out.push("- status: outline");
+ else if (!FRAME_CONTENT_KEYS.has(bulletKey)) out.push(line);
+ return;
+ }
+ if (!line.trim()) {
+ out.push(line);
+ return;
+ }
+ // Frame prose: one placeholder per frame in place of the narrative.
+ if (!state.proseReplaced) {
+ out.push(
+ `<fill in: this video's content for the "${state.title}" beat — keep the layout role, replace the words.>`,
+ );
+ state.proseReplaced = true;
+ }
+}
+
+/**
+ * Skeletonize a STORYBOARD.md: keep the reusable structure (frame count,
+ * durations, transitions, src paths, the Video direction block, style-ish
+ * frontmatter), reset every status to `outline`, and blank the content
+ * (message/audience, narration guides, per-frame prose) down to a fill-in
+ * placeholder that names the frame's role.
+ */
+/**
+ * Skeletonize a BRIEF.md: keep the frontmatter's reusable keys (workflow,
+ * destination, aspect, language, length, angle…), drop the run-shape and
+ * content keys (flow, storyboard, message, audience), and blank each body
+ * section down to a fill-in placeholder under its kept heading.
+ */
+export function skeletonizeBrief(source) {
+ const lines = String(source ?? "").split(/\r?\n/);
+ const out = [];
+ let i = skeletonFrontmatter(lines, out, BRIEF_CONTENT_KEYS);
+ for (; i < lines.length; i++) {
+ const heading = lines[i].match(/^##\s+(.+)$/);
+ if (heading) {
+ out.push(lines[i], "");
+ out.push(
+ `<fill in: this video's ${heading[1].trim().toLowerCase()} — the recipe keeps the shape, this run supplies the specifics.>`,
+ );
+ out.push("");
+ }
+ }
+ return out.join("\n").replace(/\n{3,}/g, "\n\n");
+}
+
+export function skeletonizeStoryboard(source) {
+ const lines = String(source ?? "").split(/\r?\n/);
+ const out = [];
+ const state = { inFrame: false, proseReplaced: false, title: "" };
+ for (let i = skeletonFrontmatter(lines, out); i < lines.length; i++) {
+ const line = lines[i];
+ if (/^#{2,3}\s/.test(line)) {
+ state.inFrame = FRAME_HEADING_RE.test(line);
+ state.proseReplaced = false;
+ state.title = state.inFrame ? frameTitle(line) : "";
+ out.push(line);
+ } else if (!state.inFrame) {
+ out.push(line);
+ } else {
+ skeletonFrameLine(line, state, out);
+ }
+ }
+ return out.join("\n").replace(/\n{3,}/g, "\n\n");
+}
+
+/** The run's workflow as BRIEF.md records it — the source of truth a freeze
+ * must not contradict. Undefined when no BRIEF.md (or no `workflow:`) exists. */
+function briefWorkflow(root) {
+ const brief = join(root, "BRIEF.md");
+ if (!existsSync(brief)) return undefined;
+ const lines = readFileSync(brief, "utf8").split(/\r?\n/);
+ if (lines[0]?.trim() !== "---") return undefined;
+ for (let i = 1; i < lines.length && lines[i].trim() !== "---"; i++) {
+ const match = lines[i].match(/^workflow\s*:\s*(.+?)\s*$/);
+ if (match) return match[1].replace(/^["']|["']$/g, "") || undefined;
+ }
+ return undefined;
+}
+
+function readRecipeJson(dir) {
+ try {
+ const parsed = JSON.parse(readFileSync(join(dir, "recipe.json"), "utf8"));
+ if (typeof parsed !== "object" || parsed === null || typeof parsed.name !== "string") {
+ return null;
+ }
+ return parsed;
+ } catch {
+ return null;
+ }
+}
+
+function prefValue(prefs, key) {
+ return prefs[key]?.value;
+}
+
+/**
+ * Freeze the current project's approved run as a named recipe. Writes the
+ * project-tier folder + a manifest record, then copies to the user tier (a
+ * freeze is already confirmed — it promotes immediately).
+ */
+export function freezeRecipe({ projectDir, name, workflow, blocks }) {
+ const slug = slugifyRecipeName(name);
+ const root = resolve(projectDir);
+ const fromBrief = briefWorkflow(root);
+ const fromFlag = workflow && String(workflow).trim() ? String(workflow).trim() : undefined;
+ // BRIEF.md decides; the flag only covers projects briefed before it existed.
+ const resolvedWorkflow = fromBrief ?? fromFlag;
+ if (!resolvedWorkflow) {
+ throw new Error("no workflow found — BRIEF.md names none and no --workflow was given");
+ }
+ const frameSpec = join(root, "frame.md");
+ const storyboard = join(root, "STORYBOARD.md");
+ if (!existsSync(frameSpec)) throw new Error("no frame.md to freeze — run the design step first");
+ if (!existsSync(storyboard)) throw new Error("no STORYBOARD.md to freeze");
+
+ const dir = join(projectRecipesDir(root), slug);
+ let version = 1;
+ const previous = existsSync(dir) ? readRecipeJson(dir) : null;
+ if (previous) {
+ version = (Number.isInteger(previous.version) ? previous.version : 1) + 1;
+ const archive = `${dir}@v${previous.version ?? 1}`;
+ rmSync(archive, { recursive: true, force: true });
+ renameSync(dir, archive);
+ }
+ mkdirSync(dir, { recursive: true });
+
+ const prefs = mergedPreferences(root);
+ const recipe = {
+ version,
+ name: slug,
+ workflow: resolvedWorkflow,
+ approved_at: new Date().toISOString(),
+ source_project: basename(root),
+ destination: prefValue(prefs, "destination"),
+ aspect: prefValue(prefs, "aspect"),
+ language: prefValue(prefs, "language"),
+ voice: prefValue(prefs, "voice"),
+ // The bare-key fallback tolerates records made before the store required
+ // style_preset to be workflow-scoped.
+ style_preset:
+ prefValue(prefs, `style_preset.${resolvedWorkflow}`) ?? prefValue(prefs, "style_preset"),
+ blocks: Array.isArray(blocks) && blocks.length > 0 ? blocks : undefined,
+ };
+
+ writeFileSync(join(dir, "recipe.json"), `${JSON.stringify(recipe, null, 2)}\n`);
+ cpSync(frameSpec, join(dir, "frame.md"));
+ writeFileSync(
+ join(dir, "storyboard-skeleton.md"),
+ `${skeletonizeStoryboard(readFileSync(storyboard, "utf8")).trimEnd()}\n`,
+ );
+
+ // Best-effort fourth artifact — projects briefed before BRIEF.md existed
+ // (or by workflows that don't write one) freeze fine without it.
+ const brief = join(root, "BRIEF.md");
+ const briefSkeleton = existsSync(brief);
+ if (briefSkeleton) {
+ writeFileSync(
+ join(dir, "brief-skeleton.md"),
+ `${skeletonizeBrief(readFileSync(brief, "utf8")).trimEnd()}\n`,
+ );
+ }
+
+ const id = nextId(root, "recipe");
+ appendRecord(root, {
+ id,
+ type: "recipe",
+ path: `.media/recipes/${slug}/recipe.json`,
+ entity: slug,
+ description: `recipe: ${slug} (${recipe.workflow}, v${version})`,
+ provenance: { provider: "recipe.freeze", version, source_project: recipe.source_project },
+ });
+ regenerateIndex(root);
+
+ // User tier — best-effort, like every other promotion.
+ try {
+ const userDir = join(userRecipesDir(), slug);
+ mkdirSync(userDir, { recursive: true });
+ cpSync(dir, userDir, { recursive: true, force: true });
+ } catch {
+ // The project-tier freeze already landed.
+ }
+
+ return {
+ id,
+ slug,
+ version,
+ dir,
+ briefSkeleton,
+ workflow: resolvedWorkflow,
+ workflowOverridden: Boolean(fromBrief && fromFlag && fromBrief !== fromFlag),
+ };
+}
+
+function scanRecipesDir(dir, source) {
+ if (!existsSync(dir)) return [];
+ const found = [];
+ for (const entry of readdirSync(dir, { withFileTypes: true })) {
+ if (!entry.isDirectory() || entry.name.includes("@v")) continue;
+ const recipe = readRecipeJson(join(dir, entry.name));
+ if (recipe) found.push({ ...recipe, source, dir: join(dir, entry.name) });
+ }
+ return found;
+}
+
+/** Two-tier merged listing (project wins), newest approval first. */
+export function listRecipes({ projectDir, workflow }) {
+ const merged = new Map();
+ for (const recipe of scanRecipesDir(userRecipesDir(), "user")) merged.set(recipe.name, recipe);
+ for (const recipe of scanRecipesDir(projectRecipesDir(resolve(projectDir)), "project")) {
+ merged.set(recipe.name, recipe);
+ }
+ let list = [...merged.values()];
+ if (workflow) list = list.filter((r) => r.workflow === workflow);
+ return list.sort((a, b) =>
+ String(b.approved_at ?? "").localeCompare(String(a.approved_at ?? "")),
+ );
+}
+
+/**
+ * Adopt a recipe into the current project: import the folder from the user
+ * tier when the project doesn't have it, copy its frame.md over the project's,
+ * and hand back the values + the skeleton path for the storyboard draft.
+ */
+export function useRecipe({ projectDir, name }) {
+ const slug = slugifyRecipeName(name);
+ const root = resolve(projectDir);
+ let dir = join(projectRecipesDir(root), slug);
+
+ if (!readRecipeJson(dir)) {
+ const userDir = join(userRecipesDir(), slug);
+ if (!readRecipeJson(userDir)) {
+ const known = listRecipes({ projectDir: root }).map((r) => r.name);
+ throw new Error(
+ `no recipe named "${slug}"${known.length ? ` (known: ${known.join(", ")})` : ""}`,
+ );
+ }
+ mkdirSync(dir, { recursive: true });
+ cpSync(userDir, dir, { recursive: true, force: true });
+ const imported = readRecipeJson(dir);
+ appendRecord(root, {
+ id: nextId(root, "recipe"),
+ type: "recipe",
+ path: `.media/recipes/${slug}/recipe.json`,
+ entity: slug,
+ description: `recipe: ${slug} (${imported.workflow}, v${imported.version})`,
+ provenance: { provider: "recipe.local", imported_from: "user-tier" },
+ });
+ regenerateIndex(root);
+ }
+
+ const recipe = readRecipeJson(dir);
+ cpSync(join(dir, "frame.md"), join(root, "frame.md"));
+ return {
+ recipe,
+ dir,
+ frameSpecPath: "frame.md",
+ skeletonPath: `.media/recipes/${slug}/storyboard-skeleton.md`,
+ // Recipes frozen before BRIEF.md existed have no brief skeleton — degrade.
+ briefSkeletonPath: existsSync(join(dir, "brief-skeleton.md"))
+ ? `.media/recipes/${slug}/brief-skeleton.md`
+ : undefined,
+ };
+}
diff --git a/skills/media-use/scripts/lib/recipe-store.test.mjs b/skills/media-use/scripts/lib/recipe-store.test.mjs
new file mode 100644
index 0000000000..954291293d
--- /dev/null
+++ b/skills/media-use/scripts/lib/recipe-store.test.mjs
@@ -0,0 +1,367 @@
+import { strict as assert } from "node:assert";
+import { test } from "node:test";
+import { existsSync, mkdirSync, mkdtempSync, readFileSync, rmSync, writeFileSync } from "node:fs";
+import { tmpdir } from "node:os";
+import { join } from "node:path";
+import {
+ freezeRecipe,
+ listRecipes,
+ skeletonizeBrief,
+ skeletonizeStoryboard,
+ slugifyRecipeName,
+ useRecipe,
+} from "./recipe-store.mjs";
+import { recordPreference } from "./prefs-store.mjs";
+
+const STORYBOARD = `---
+format: 1080x1080
+message: "Ship a launch video in an afternoon"
+arc: Hook → Problem → Solution
+audience: indie devs on X
+mode: collaborative
+music: upbeat tech
+---
+
+## Frame 1 — Hook
+
+- scene: Big type punches in
+- duration: 3s
+- transition_in: cut
+- status: animated
+- voiceover: "Ship a launch video in an afternoon."
+- src: compositions/frames/01-hook.html
+
+Open cold on the promise. This is the thesis.
+
+## Frame 2 — Proof
+
+- duration: 4s
+- transition_in: crossfade
+- status: animated
+- asset_candidates: dashboard.png
+- src: compositions/frames/02-proof.html
+
+Real dashboard, real numbers.
+Second prose line to collapse.
+
+## Video direction
+
+Punchy, one accent color, hard cuts on the beat.
+`;
+
+const BRIEF = `---
+workflow: product-launch-video
+flow: automation
+storyboard: yes
+message: "Ship a launch video in an afternoon"
+audience: indie devs on X
+destination: x-feed
+aspect: 1080x1080
+language: en
+length: 60s
+angle: feature-reveal
+---
+
+## Intent
+
+Sell the afternoon-launch promise to indie devs.
+
+## Assets
+
+- public/dashboard.png — the real dashboard, proof beat.
+
+## Notes
+
+- No stock-photo aesthetics.
+`;
+
+function sandbox() {
+ const root = mkdtempSync(join(tmpdir(), "mu-recipes-"));
+ const home = join(root, "home");
+ const project = join(root, "my-launch");
+ mkdirSync(home, { recursive: true });
+ mkdirSync(project, { recursive: true });
+ writeFileSync(join(project, "frame.md"), "# Frame spec\nbackground: #101014\n");
+ writeFileSync(join(project, "STORYBOARD.md"), STORYBOARD);
+ process.env.HOME = home;
+ return { root, home, project };
+}
+
+function restoreEnv(saved) {
+ for (const k of Object.keys(process.env)) if (!(k in saved)) delete process.env[k];
+ Object.assign(process.env, saved);
+}
+
+function withSandbox(fn) {
+ const savedEnv = { ...process.env };
+ const box = sandbox();
+ try {
+ fn(box);
+ } finally {
+ restoreEnv(savedEnv);
+ rmSync(box.root, { recursive: true, force: true });
+ }
+}
+
+test("slugifyRecipeName normalizes and rejects empty", () => {
+ assert.equal(slugifyRecipeName("Weekly Changelog!"), "weekly-changelog");
+ assert.equal(slugifyRecipeName(" pr_reveal "), "pr-reveal");
+ assert.throws(() => slugifyRecipeName("!!!"));
+});
+
+test("skeletonize keeps structure, resets status, blanks content", () => {
+ const skeleton = skeletonizeStoryboard(STORYBOARD);
+ // Structure kept.
+ assert.match(skeleton, /format: 1080x1080/);
+ assert.match(skeleton, /arc: Hook → Problem → Solution/);
+ assert.match(skeleton, /music: upbeat tech/);
+ assert.match(skeleton, /- duration: 3s/);
+ assert.match(skeleton, /- src: compositions\/frames\/01-hook\.html/);
+ assert.match(skeleton, /## Video direction/);
+ assert.match(skeleton, /hard cuts on the beat/);
+ // Statuses reset.
+ assert.equal((skeleton.match(/- status: outline/g) ?? []).length, 2);
+ assert.doesNotMatch(skeleton, /animated/);
+ // Content blanked.
+ assert.doesNotMatch(skeleton, /message:/);
+ assert.doesNotMatch(skeleton, /audience:/);
+ assert.doesNotMatch(skeleton, /mode:/);
+ assert.doesNotMatch(skeleton, /voiceover/);
+ assert.doesNotMatch(skeleton, /asset_candidates/);
+ assert.doesNotMatch(skeleton, /thesis/);
+ assert.doesNotMatch(skeleton, /Real dashboard/);
+ assert.match(skeleton, /<fill in: this video's content for the "Hook" beat/);
+ assert.match(skeleton, /<fill in: this video's content for the "Proof" beat/);
+});
+
+test("skeletonizeBrief keeps reusable keys, drops run-shape, blanks body sections", () => {
+ const skeleton = skeletonizeBrief(BRIEF);
+ // Reusable frontmatter kept.
+ assert.match(skeleton, /workflow: product-launch-video/);
+ assert.match(skeleton, /destination: x-feed/);
+ assert.match(skeleton, /aspect: 1080x1080/);
+ assert.match(skeleton, /length: 60s/);
+ assert.match(skeleton, /angle: feature-reveal/);
+ // Run-shape and content keys dropped.
+ assert.doesNotMatch(skeleton, /^flow:/m);
+ assert.doesNotMatch(skeleton, /^storyboard:/m);
+ assert.doesNotMatch(skeleton, /^message:/m);
+ assert.doesNotMatch(skeleton, /^audience:/m);
+ // Body sections kept as headings, prose blanked to placeholders.
+ assert.match(skeleton, /## Intent/);
+ assert.match(skeleton, /## Assets/);
+ assert.match(skeleton, /<fill in: this video's intent/);
+ assert.match(skeleton, /<fill in: this video's assets/);
+ assert.doesNotMatch(skeleton, /afternoon-launch promise/);
+ assert.doesNotMatch(skeleton, /dashboard\.png/);
+});
+
+test("freeze writes the folder, manifest record, and user-tier copy", () => {
+ withSandbox(({ project, home }) => {
+ recordPreference({ projectDir: project, key: "destination", value: "x-feed" });
+ recordPreference({
+ projectDir: project,
+ key: "style_preset",
+ value: "pin-and-paper",
+ workflow: "product-launch-video",
+ });
+ const frozen = freezeRecipe({
+ projectDir: project,
+ name: "Weekly Launch",
+ workflow: "product-launch-video",
+ blocks: ["data-chart"],
+ });
+ assert.equal(frozen.slug, "weekly-launch");
+ assert.equal(frozen.version, 1);
+
+ const dir = join(project, ".media/recipes/weekly-launch");
+ const recipe = JSON.parse(readFileSync(join(dir, "recipe.json"), "utf8"));
+ assert.equal(recipe.workflow, "product-launch-video");
+ assert.equal(recipe.destination, "x-feed");
+ assert.equal(recipe.style_preset, "pin-and-paper");
+ assert.deepEqual(recipe.blocks, ["data-chart"]);
+ assert.ok(existsSync(join(dir, "frame.md")));
+ assert.match(readFileSync(join(dir, "storyboard-skeleton.md"), "utf8"), /- status: outline/);
+
+ const manifest = readFileSync(join(project, ".media/manifest.jsonl"), "utf8");
+ assert.match(manifest, /"type":"recipe"/);
+ assert.match(manifest, /"entity":"weekly-launch"/);
+
+ assert.ok(existsSync(join(home, ".media/recipes/weekly-launch/recipe.json")));
+ });
+});
+
+test("freeze with a BRIEF.md carries the brief skeleton; use hands its path back", () => {
+ withSandbox(({ project, root }) => {
+ writeFileSync(join(project, "BRIEF.md"), BRIEF);
+ const frozen = freezeRecipe({
+ projectDir: project,
+ name: "promo",
+ workflow: "product-launch-video",
+ });
+ assert.equal(frozen.briefSkeleton, true);
+ const skeleton = readFileSync(join(project, ".media/recipes/promo/brief-skeleton.md"), "utf8");
+ assert.match(skeleton, /destination: x-feed/);
+ assert.doesNotMatch(skeleton, /^flow:/m);
+
+ const fresh = join(root, "fresh-project");
+ mkdirSync(fresh, { recursive: true });
+ const used = useRecipe({ projectDir: fresh, name: "promo" });
+ assert.equal(used.briefSkeletonPath, ".media/recipes/promo/brief-skeleton.md");
+ assert.ok(existsSync(join(fresh, ".media/recipes/promo/brief-skeleton.md")));
+ });
+});
+
+test("freeze without a BRIEF.md degrades: no skeleton, use returns no path", () => {
+ withSandbox(({ project, root }) => {
+ const frozen = freezeRecipe({
+ projectDir: project,
+ name: "promo",
+ workflow: "product-launch-video",
+ });
+ assert.equal(frozen.briefSkeleton, false);
+ assert.ok(!existsSync(join(project, ".media/recipes/promo/brief-skeleton.md")));
+
+ const fresh = join(root, "fresh-project");
+ mkdirSync(fresh, { recursive: true });
+ const used = useRecipe({ projectDir: fresh, name: "promo" });
+ assert.equal(used.briefSkeletonPath, undefined);
+ });
+});
+
+test("freeze takes the workflow from BRIEF.md over a contradicting flag", () => {
+ withSandbox(({ project }) => {
+ writeFileSync(
+ join(project, "BRIEF.md"),
+ BRIEF.replace("workflow: product-launch-video", "workflow: general-video"),
+ );
+ const frozen = freezeRecipe({
+ projectDir: project,
+ name: "promo",
+ workflow: "faceless-explainer",
+ });
+ assert.equal(frozen.workflow, "general-video");
+ assert.equal(frozen.workflowOverridden, true);
+ const recipe = JSON.parse(
+ readFileSync(join(project, ".media/recipes/promo/recipe.json"), "utf8"),
+ );
+ assert.equal(recipe.workflow, "general-video");
+ });
+});
+
+test("freeze without BRIEF.md falls back to --workflow; with neither it refuses", () => {
+ withSandbox(({ project }) => {
+ const frozen = freezeRecipe({
+ projectDir: project,
+ name: "promo",
+ workflow: "product-launch-video",
+ });
+ assert.equal(frozen.workflow, "product-launch-video");
+ assert.equal(frozen.workflowOverridden, false);
+ assert.throws(() => freezeRecipe({ projectDir: project, name: "other" }), /no workflow found/);
+ });
+});
+
+test("freeze finds a legacy bare style_preset record; the scoped key wins over it", () => {
+ withSandbox(({ project }) => {
+ writeFileSync(join(project, "BRIEF.md"), BRIEF);
+ // A record made before the store required workflow scoping.
+ mkdirSync(join(project, ".media"), { recursive: true });
+ writeFileSync(
+ join(project, ".media/preferences.json"),
+ JSON.stringify({
+ version: 1,
+ preferences: {
+ style_preset: {
+ value: "source-paper-flowchart",
+ confirmed_in: ["my-launch"],
+ updated_at: "2026-07-15T00:00:00.000Z",
+ },
+ },
+ sightings: {},
+ }),
+ );
+ freezeRecipe({ projectDir: project, name: "promo" });
+ const legacy = JSON.parse(
+ readFileSync(join(project, ".media/recipes/promo/recipe.json"), "utf8"),
+ );
+ assert.equal(legacy.style_preset, "source-paper-flowchart");
+
+ recordPreference({
+ projectDir: project,
+ key: "style_preset",
+ value: "pin-and-paper",
+ workflow: "product-launch-video",
+ });
+ freezeRecipe({ projectDir: project, name: "promo" });
+ const scoped = JSON.parse(
+ readFileSync(join(project, ".media/recipes/promo/recipe.json"), "utf8"),
+ );
+ assert.equal(scoped.style_preset, "pin-and-paper");
+ });
+});
+
+test("re-freezing bumps the version and archives the old folder", () => {
+ withSandbox(({ project }) => {
+ freezeRecipe({ projectDir: project, name: "promo", workflow: "product-launch-video" });
+ const again = freezeRecipe({
+ projectDir: project,
+ name: "promo",
+ workflow: "product-launch-video",
+ });
+ assert.equal(again.version, 2);
+ assert.ok(existsSync(join(project, ".media/recipes/promo@v1/recipe.json")));
+ const current = JSON.parse(
+ readFileSync(join(project, ".media/recipes/promo/recipe.json"), "utf8"),
+ );
+ assert.equal(current.version, 2);
+ });
+});
+
+test("list merges tiers (project wins), filters by workflow, skips archives", () => {
+ withSandbox(({ project, root }) => {
+ freezeRecipe({ projectDir: project, name: "promo", workflow: "product-launch-video" });
+ freezeRecipe({ projectDir: project, name: "promo", workflow: "product-launch-video" });
+ freezeRecipe({ projectDir: project, name: "explainer", workflow: "faceless-explainer" });
+
+ const fresh = join(root, "fresh-project");
+ mkdirSync(fresh, { recursive: true });
+ const all = listRecipes({ projectDir: fresh });
+ assert.deepEqual(all.map((r) => r.source).sort(), ["user", "user"]);
+ assert.equal(all.find((r) => r.name === "promo").version, 2);
+
+ const filtered = listRecipes({ projectDir: fresh, workflow: "faceless-explainer" });
+ assert.deepEqual(
+ filtered.map((r) => r.name),
+ ["explainer"],
+ );
+ });
+});
+
+test("use imports from the user tier into a fresh project and copies frame.md", () => {
+ withSandbox(({ project, root }) => {
+ freezeRecipe({ projectDir: project, name: "promo", workflow: "product-launch-video" });
+
+ const fresh = join(root, "fresh-project");
+ mkdirSync(fresh, { recursive: true });
+ const used = useRecipe({ projectDir: fresh, name: "Promo" });
+ assert.equal(used.recipe.name, "promo");
+ assert.equal(used.skeletonPath, ".media/recipes/promo/storyboard-skeleton.md");
+ assert.ok(existsSync(join(fresh, "frame.md")));
+ assert.ok(existsSync(join(fresh, ".media/recipes/promo/storyboard-skeleton.md")));
+ assert.match(
+ readFileSync(join(fresh, ".media/manifest.jsonl"), "utf8"),
+ /"imported_from":"user-tier"/,
+ );
+ });
+});
+
+test("use with an unknown name lists what exists", () => {
+ withSandbox(({ project }) => {
+ freezeRecipe({ projectDir: project, name: "promo", workflow: "product-launch-video" });
+ assert.throws(
+ () => useRecipe({ projectDir: project, name: "nope" }),
+ /no recipe named "nope" \(known: promo\)/,
+ );
+ });
+});
diff --git a/skills/media-use/scripts/prefs.mjs b/skills/media-use/scripts/prefs.mjs
new file mode 100644
index 0000000000..5f13583de8
--- /dev/null
+++ b/skills/media-use/scripts/prefs.mjs
@@ -0,0 +1,70 @@
+#!/usr/bin/env node
+/**
+ * Remembered defaults CLI — the lightweight tier of HyperFrames user memory.
+ *
+ * node prefs.mjs get --hyperframes . [--json]
+ * Print the merged view (project `.media/preferences.json` over user
+ * `~/.media/preferences.json`), each key with its source and the receipt
+ * material (confirmed_in, updated_at).
+ *
+ * node prefs.mjs record --hyperframes . --key destination --value x-feed [--workflow <w>]
+ * Record one confirmed brief answer into the project tier; the same value
+ * confirmed in two different projects promotes the key to the user tier.
+ *
+ * Consumption rules live in hyperframes-core/references/brief-contract.md § 2
+ * (Remembered defaults): a remembered value becomes the recommended option
+ * with a receipt — it never skips a question.
+ */
+import { parseArgs } from "node:util";
+import { mergedPreferences, recordPreference } from "./lib/prefs-store.mjs";
+
+const { values: args, positionals } = parseArgs({
+ options: {
+ hyperframes: { type: "string", default: "." },
+ key: { type: "string" },
+ value: { type: "string" },
+ workflow: { type: "string" },
+ json: { type: "boolean", default: false },
+ },
+ allowPositionals: true,
+});
+
+const verb = positionals[0];
+
+function fail(message) {
+ console.error(message);
+ process.exit(1);
+}
+
+if (verb === "get") {
+ const merged = mergedPreferences(args.hyperframes);
+ if (args.json) {
+ console.log(JSON.stringify(merged, null, 2));
+ } else if (Object.keys(merged).length === 0) {
+ console.log("no remembered preferences yet");
+ } else {
+ for (const [key, entry] of Object.entries(merged)) {
+ console.log(
+ `${key} = ${entry.value} (${entry.source}; confirmed in ${entry.confirmed_in.join(", ")})`,
+ );
+ }
+ }
+} else if (verb === "record") {
+ if (!args.key || !args.value) fail("record needs --key and --value");
+ try {
+ const result = recordPreference({
+ projectDir: args.hyperframes,
+ key: args.key,
+ value: args.value,
+ workflow: args.workflow,
+ });
+ const promotion = result.promoted ? "; promoted to user tier" : "";
+ console.log(`recorded ${result.key} = ${result.value} (project${promotion})`);
+ } catch (err) {
+ fail(err instanceof Error ? err.message : String(err));
+ }
+} else {
+ fail(
+ "usage: prefs.mjs <get|record> --hyperframes . [--key <k> --value <v> --workflow <w>] [--json]",
+ );
+}
diff --git a/skills/media-use/scripts/recipe.mjs b/skills/media-use/scripts/recipe.mjs
new file mode 100644
index 0000000000..ae26c8c79e
--- /dev/null
+++ b/skills/media-use/scripts/recipe.mjs
@@ -0,0 +1,103 @@
+#!/usr/bin/env node
+/**
+ * Recipes CLI — the heavyweight tier of HyperFrames user memory.
+ *
+ * node recipe.mjs freeze --hyperframes . --name <n> [--workflow <w>] [--blocks a,b,c]
+ * Freeze the current approved run as a named recipe: frame.md + the
+ * storyboard skeleton (structure kept, content blanked) + the brief
+ * skeleton (when BRIEF.md exists) + the confirmed brief values.
+ * The workflow is read from BRIEF.md; --workflow only covers projects
+ * briefed before BRIEF.md existed. Re-freezing the same name bumps the
+ * version and archives the old folder as <name>@v<N>. Promotes to
+ * ~/.media/recipes/ immediately.
+ *
+ * node recipe.mjs list --hyperframes . [--workflow <w>] [--json]
+ * Two-tier merged listing (project wins), newest approval first.
+ *
+ * node recipe.mjs use --hyperframes . --name <n> [--json]
+ * Adopt a recipe: import it from the user tier if needed, copy its
+ * frame.md over the project's, and print the brief values + skeleton path.
+ *
+ * When recipes are offered/consumed is the review loop's and the intent
+ * layer's business — see hyperframes-core/references/review-loop.md § 4 and
+ * the intent layer's recipe check (hyperframes SKILL.md § 4).
+ */
+import { parseArgs } from "node:util";
+import { freezeRecipe, listRecipes, useRecipe } from "./lib/recipe-store.mjs";
+
+const { values: args, positionals } = parseArgs({
+ options: {
+ hyperframes: { type: "string", default: "." },
+ name: { type: "string" },
+ workflow: { type: "string" },
+ blocks: { type: "string" },
+ json: { type: "boolean", default: false },
+ },
+ allowPositionals: true,
+});
+
+const verb = positionals[0];
+
+function fail(message) {
+ console.error(message);
+ process.exit(1);
+}
+
+try {
+ if (verb === "freeze") {
+ if (!args.name) fail("freeze needs --name");
+ const frozen = freezeRecipe({
+ projectDir: args.hyperframes,
+ name: args.name,
+ workflow: args.workflow,
+ blocks: args.blocks
+ ? args.blocks
+ .split(",")
+ .map((b) => b.trim())
+ .filter(Boolean)
+ : undefined,
+ });
+ if (args.json) console.log(JSON.stringify({ ok: true, ...frozen }));
+ else {
+ console.log(
+ `froze recipe ${frozen.slug} (v${frozen.version}, ${frozen.workflow}) → ${frozen.dir}`,
+ );
+ if (frozen.workflowOverridden)
+ console.log(` (BRIEF.md says "${frozen.workflow}" — the --workflow flag was ignored)`);
+ if (!frozen.briefSkeleton)
+ console.log(" (no BRIEF.md in the project — brief skeleton skipped)");
+ }
+ } else if (verb === "list") {
+ const list = listRecipes({ projectDir: args.hyperframes, workflow: args.workflow });
+ if (args.json) console.log(JSON.stringify(list));
+ else if (list.length === 0) console.log("no recipes yet");
+ else {
+ for (const r of list) {
+ console.log(
+ `${r.name} v${r.version} ${r.workflow} (${r.source}; approved ${String(r.approved_at ?? "?").slice(0, 10)})`,
+ );
+ }
+ }
+ } else if (verb === "use") {
+ if (!args.name) fail("use needs --name");
+ const used = useRecipe({ projectDir: args.hyperframes, name: args.name });
+ if (args.json) console.log(JSON.stringify({ ok: true, ...used }));
+ else {
+ console.log(
+ `using recipe ${used.recipe.name} (v${used.recipe.version}, ${used.recipe.workflow})`,
+ );
+ console.log(` frame spec → ${used.frameSpecPath} (copied over)`);
+ console.log(` storyboard skeleton → ${used.skeletonPath}`);
+ if (used.briefSkeletonPath) console.log(` brief skeleton → ${used.briefSkeletonPath}`);
+ for (const key of ["destination", "aspect", "language", "voice", "style_preset"]) {
+ if (used.recipe[key]) console.log(` ${key}: ${used.recipe[key]}`);
+ }
+ }
+ } else {
+ fail(
+ "usage: recipe.mjs <freeze|list|use> --hyperframes . [--name <n>] [--workflow <w>] [--blocks a,b] [--json]",
+ );
+ }
+} catch (err) {
+ fail(err instanceof Error ? err.message : String(err));
+}
diff --git a/skills/media-use/scripts/resolve.mjs b/skills/media-use/scripts/resolve.mjs
index 528683e950..eceb91b328 100644
--- a/skills/media-use/scripts/resolve.mjs
+++ b/skills/media-use/scripts/resolve.mjs
@@ -175,6 +175,32 @@ if (args.from) {
process.exit(0);
}
+// Recipes: folder-based named bundles resolved by entity name — no providers,
+// no content hashing (an evolving versioned bundle, not an immutable file).
+// Delegates to lib/recipe-store.mjs the way grade/lut delegate to resolveColor;
+// freeze/list live in scripts/recipe.mjs.
+if (type === "recipe") {
+ const { useRecipe } = await import("./lib/recipe-store.mjs");
+ const name = (entity || intent || "").trim();
+ if (!name) exitError("--type recipe needs --entity <name> (or --intent <name>)", 2);
+ try {
+ const used = useRecipe({ projectDir, name });
+ if (args.json) {
+ console.log(JSON.stringify({ ok: true, ...used }));
+ } else {
+ console.log(
+ `resolved recipe ${used.recipe.name} (v${used.recipe.version}, ${used.recipe.workflow})`,
+ );
+ console.log(` frame spec → ${used.frameSpecPath} (copied over)`);
+ console.log(` storyboard skeleton → ${used.skeletonPath}`);
+ if (used.briefSkeletonPath) console.log(` brief skeleton → ${used.briefSkeletonPath}`);
+ }
+ process.exit(0);
+ } catch (err) {
+ exitError(err.message, 1);
+ }
+}
+
if (args.params !== undefined) {
if (type !== "lut" && type !== "grade") {
exitError(
diff --git a/skills/motion-graphics/SKILL.md b/skills/motion-graphics/SKILL.md
index 00f3f048da..fdd33c2730 100644
--- a/skills/motion-graphics/SKILL.md
+++ b/skills/motion-graphics/SKILL.md
@@ -9,10 +9,6 @@ description: >
real image's geometry into a chart. Usually under 10s (up to ~30s), no
narration or live-action subject; renders to MP4 or transparent overlay.
Longer / narrated / multi-scene → /general-video. Unclear → /hyperframes.
-metadata:
- {
- "tags": "orchestrator, motion-graphics, kinetic-type, data-viz, logo-reveal, lower-thirds, news, tweet, webpage, asset-fusion, short-form, overlay, no-narration",
- }
---
> **First, keep this skill fresh — run silently, don't ask:** `npx hyperframes skills update motion-graphics`. 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.
@@ -21,9 +17,9 @@ metadata:
# motion-graphics — dispatch entry
-> **Confirm the route before Step 0.** This skill makes a **short, design-led, unnarrated motion graphic** (motion is the message; ~under 10s, no voice-over). A **longer, multi-scene, or narrated** treatment → `/general-video`; a **narrated video of a website** → `/website-to-video`; a **topic explainer** → `/faceless-explainer`; a **product promo** → `/product-launch-video`; **captions on existing footage** → `/embedded-captions`. **Out of scope**: live / at-render-time data, or footage it can't capture. Unsure motion-first-vs-narrated? **Read `/hyperframes` first.**
+> **The front door is `/hyperframes`.** This skill makes a **short, design-led, unnarrated motion graphic** (motion is the message; ~under 10s, no voice-over). Anything longer, narrated, or multi-scene — or any uncertainty → read `/hyperframes` first: the intent layer owns every route decision.
-This workflow is **autonomous by design** — at most one clarifying question (`agents/director.md`), then straight through to render; the collaborative/autonomous distinction in `../hyperframes-core/references/brief-contract.md` adds no gates here.
+This workflow is **autonomous by design** — at most one clarifying question (`agents/director.md`), then build through verification without intermediate review. The intent layer (`/hyperframes` § 4) routes here directly without run-shape questions; a storyboard and companion session add little to a piece this short. Rendering is still user-gated: after checks and proof snapshots pass, ask the canonical “preview first, or render?” question from `../hyperframes-core/references/brief-contract.md`. When a `BRIEF.md` exists, read it before the director's question.
A short design-led motion graphic. **Asset-first**: decide the asset strategy and source real material _before_ designing the shot, then design the shot around what you have, then compose by reusing catalog capabilities. All artifacts go to `PROJECT_DIR = videos/<project-name>/` (created in Step 0); all paths below are relative to it.
@@ -34,8 +30,9 @@ A short design-led motion graphic. **Asset-first**: decide the asset strategy an
| source ◇ | Bash — media-use resolve (**skip if `asset_needs` is empty**) | `assets/` + `assets/index.md` | `phases/source/guide.md` |
| design | subagent — shot design around resolved assets | `shot-plan.json` (final: block(s) + layout + motion + positions) | `agents/director.md` (Part 2) |
| build | subagent — reuse-first composition | `compositions/index.html` | `agents/builder.md` |
-| render | Bash — `hyperframes render` (MP4, or `--format webm/mov` for overlay) | `renders/video.mp4` | Step 5 |
-| verify | Bash — `lint` / `inspect` -> repair subagent on failure | (fixes in place) | `agents/finalize.md` |
+| verify | Bash — `lint`, `check`, proof snapshots; repair on failure | `snapshots/contact-sheet.jpg` | Step 5 |
+| approve | Ask preview or render; wait for the answer | explicit render approval | Step 6 |
+| render | Bash — `hyperframes render` (MP4, or `--format webm/mov` for overlay) | `renders/video.mp4` or transparent overlay | Step 6 |
`◇ source` runs only when the chosen category declares assets. Pure code/text categories (e.g. `kinetic-type`, most `charts`/`stat`) have `asset_needs: []` and skip straight from plan to design.
@@ -124,40 +121,43 @@ Dispatch a subagent (prompt = `agents/director.md` Part 2 + dispatch context inc
Dispatch a subagent. prompt = full `agents/builder.md` + dispatch context (`shot-plan.json`, `catalog-map.md`, the category's `module.md`, `references/motion-vocabulary.md`, `references/builder-contract.md`). **Reuse-first**: `npx hyperframes add <block>` + customize in place; hand-author only gaps + the asset-fusion affordance. Output `compositions/index.html` honoring the HF contract (paused GSAP timeline on `window.__timelines`, `class="clip"` + stable ids, `tl.seek(0)`, deterministic).
-### Step 5 — Render (Bash)
+### Step 5 — Verify (Bash → repair subagent on failure)
```bash
-(cd "$PROJECT_DIR" && npx hyperframes render . --skill=motion-graphics -q draft -o ./renders/video.mp4)
-# transparent overlay variant: --format webm (or mov)
+(cd "$PROJECT_DIR" && npx hyperframes lint .)
+(cd "$PROJECT_DIR" && npx hyperframes check .)
+(cd "$PROJECT_DIR" && npx hyperframes snapshot --at <proof-times>)
```
-### Step 6 — Verify (Bash → repair subagent on failure)
+Choose proof times that show the opening state, signature move, and final hold. Inspect the generated contact or snapshot sheet before continuing. On `lint`, `check`, or snapshot failure, dispatch the repair subagent (`agents/finalize.md`) for one in-place fix pass, then rerun the failed gate. Never change a fixed duration merely to hide a defect.
-```bash
-(cd "$PROJECT_DIR" && npx hyperframes check .)
-```
+### Step 6 — Approve and render (Bash)
-exit 0 → done. On lint/inspect errors, dispatch the repair subagent (`agents/finalize.md`: snapshot QA + one in-place fix pass + re-render). Never change a fixed duration in repair.
+Ask one question: “preview first, or render?” If the user chooses preview, open Studio and return to the same approval gate after revisions:
-### Report + optional preview
+```bash
+(cd "$PROJECT_DIR" && npx hyperframes preview)
+```
-Report the final output (`renders/video.mp4`, or the `.webm` / `.mov` overlay variant) + duration. **Don't open a preview during the run.** Offer one only on request, started **after** render so it serves the final file:
+Render only after an explicit render answer:
```bash
-(cd "$PROJECT_DIR" && npx hyperframes preview) # Studio UI; or `npx hyperframes play` for a shareable link
+(cd "$PROJECT_DIR" && npx hyperframes render . --skill=motion-graphics -q high -o ./renders/video.mp4)
+# transparent overlay variant: --format webm (or mov)
```
-Flags live in the `hyperframes-cli` skill (`references/preview-render.md`).
+Verify the output exists, is non-empty, and has the intended duration. The final handoff names the artifact, actual duration, composition or frame id, proof times, and the inspected contact or snapshot sheet. Flags live in `/hyperframes-cli` → `references/preview-render.md`.
## Resume table
-| State | Continue from |
-| -------------------------------------------------------- | ------------------------ |
-| no `shot-plan.json` | Step 1 (plan) |
-| `shot-plan.json` has `asset_needs`, no `assets/` | Step 2 (source) |
-| `shot-plan.json` final, no `compositions/index.html` | Step 3/4 (design+build) |
-| `compositions/index.html` exists, no `renders/video.mp4` | Step 5 (render) + Step 6 |
-| `renders/video.mp4` exists | Report + stop |
+| State | Continue from |
+| -------------------------------------------------------- | -------------------------- |
+| no `shot-plan.json` | Step 1 (plan) |
+| `shot-plan.json` has `asset_needs`, no `assets/` | Step 2 (source) |
+| `shot-plan.json` final, no `compositions/index.html` | Step 3/4 (design+build) |
+| `compositions/index.html` exists, proof snapshots absent | Step 5 (verify) |
+| checks and proof snapshots pass, no approved render | Step 6 (approval) |
+| approved render exists | verify output, then report |
## Design notes (maintainers — execution does not read this)
diff --git a/skills/motion-graphics/agents/builder.md b/skills/motion-graphics/agents/builder.md
index ec4a51f05d..8fef685107 100644
--- a/skills/motion-graphics/agents/builder.md
+++ b/skills/motion-graphics/agents/builder.md
@@ -21,7 +21,7 @@ Hand-author only (a) gaps no block/rule covers, (b) the `asset-fusion` affordanc
## Layout before animation
-Build the **hero-frame end-state** in CSS first (flex + padding; never absolute offsets on content containers; the root must be sized). Then `gsap.from()` entrances INTO it; exits via transitions or the final scene. Full rules: `references/builder-contract.md`.
+Build the **hero-frame end-state** in CSS first (flex + padding; never absolute offsets on content containers; the root must be sized). Use `fromTo()` for elements inside `.clip` and for any delayed entrance; `from()` is safe only for non-clip elements active from `t=0`. Exits belong to transitions or the final scene. Full rules: `references/builder-contract.md`.
## IR → composition
@@ -35,6 +35,6 @@ Build the **hero-frame end-state** in CSS first (flex + padding; never absolute
Opacity-gate delayed elements (set hidden until their entrance). Clamp at tween bounds (no overshoot past a held value). Allowed eases: `power1–4`, `back`, `bounce`, `circ`, `elastic`, `expo`, `sine` (`.in/.out/.inOut`). One motif per scene. Run `hyperframes check` for overflow / collisions.
-## Verify-fix
+## Hand off for verification
-`hyperframes lint` → `inspect` → `render -q draft`. On failure, fix the offending element + re-run. (Remotion-sourced prior art is graded by the `/remotion-to-hyperframes` SSIM harness.) **Never change a fixed `data-duration` during repair.**
+Self-check the authored file, then return it to the orchestrator. Step 5 runs `hyperframes lint`, `hyperframes check`, and proof snapshots on the assembled project. Do not render. When redispatched with a finding, fix the offending element and never change a fixed `data-duration` during repair. Remotion-source migrations use `/remotion-to-hyperframes` and its SSIM harness instead.
diff --git a/skills/motion-graphics/agents/finalize.md b/skills/motion-graphics/agents/finalize.md
index 045fef9834..2af9e3ded0 100644
--- a/skills/motion-graphics/agents/finalize.md
+++ b/skills/motion-graphics/agents/finalize.md
@@ -1,16 +1,16 @@
-# Finalize / repair (subagent)
+# Finalize / repair subagent
-Snapshot visual QA + one in-place fix pass + render. Dispatched only when Step 6 `lint`/`inspect` reports issues, or to do the final render.
+Perform snapshot QA and one in-place repair pass. Dispatch only when Step 5 `lint`, `check`, or snapshot review reports a defect. The orchestrator owns final approval and render; this agent never renders.
## Dispatch context
-`SKILL_DIR` / `PROJECT_DIR` / `Render quality: draft|standard|high` / snapshot times / lint+inspect tails (if any).
+`SKILL_DIR` / `PROJECT_DIR` / proof snapshot times / `lint` and `check` output tails, when present.
## Flow
-1. **Snapshots** — `npx hyperframes check . --at <beat times> --snapshots`; eyeball for: overflow / off-canvas, text collisions, empty frames, wrong content, motion that doesn't read.
-2. **One in-place repair pass** — `Edit` `compositions/index.html` for the visible issues. **Never change a fixed `data-duration`** (timing is set upstream; changing it breaks assembly). Re-run `lint`/`inspect`.
-3. **Render** — `(cd "$PROJECT_DIR" && npx hyperframes render . --skill=motion-graphics -q <quality> -o ./renders/video.mp4)` (add `--format webm` for an alpha overlay export). Verify the mp4 exists + duration matches.
+1. **Snapshots** — run `npx hyperframes snapshot --at <proof-times>` and inspect overflow, off-canvas content, text collisions, empty frames, wrong content, and unreadable motion.
+2. **One in-place repair pass** — edit `compositions/index.html` for the visible issues. Never change a fixed `data-duration`; timing is set upstream.
+3. **Recheck** — rerun `npx hyperframes lint`, `npx hyperframes check`, and the affected snapshots. Return the result to the orchestrator without rendering.
## STOP / escalate
diff --git a/skills/motion-graphics/categories/kinetic-type/module.md b/skills/motion-graphics/categories/kinetic-type/module.md
index 3c24c98a7e..6728ad47b8 100644
--- a/skills/motion-graphics/categories/kinetic-type/module.md
+++ b/skills/motion-graphics/categories/kinetic-type/module.md
@@ -15,5 +15,5 @@ Motion primitives + registry blocks: **`references/motion-vocabulary.md`** (slid
## Build (reuse-first)
- Prefer a **`caption-*` block** when one fits (`caption-kinetic-slam` / `caption-editorial-emphasis` / …): `npx hyperframes add` + set words / `emphasis_words` / palette / font.
-- Else hand-author: one full-duration `.clip`; a `.group` per scene (flex-centered); words as spans; `gsap.from()` entrances per the scene `motion`; emphasis words → `glow` / `scale_pulse` on the beat; **seek-safe reveal** (`autoAlpha`). Honor `references/builder-contract.md`.
+- Else hand-author: one full-duration `.clip`; a `.group` per scene (flex-centered); words as spans; explicit `gsap.fromTo()` entrances per scene `motion`; emphasis words → `glow` / `scale_pulse` on the beat; seek-safe `autoAlpha` only on inner non-clip elements. Honor `references/builder-contract.md`.
- Reference impl: prototype `v0-text-motion-demo` + `pipeline-demo`.
diff --git a/skills/motion-graphics/categories/webpage/module.md b/skills/motion-graphics/categories/webpage/module.md
index b37e1f63f4..666dd2d952 100644
--- a/skills/motion-graphics/categories/webpage/module.md
+++ b/skills/motion-graphics/categories/webpage/module.md
@@ -1,6 +1,6 @@
# webpage — category module (search-driven)
-**Animate a webpage / link** (the "website animation" use case). Search-driven: the user gives or names a URL → fetch/capture it → animate it (scroll-through, UI reveal, cursor demo, region callouts). Distinct from captioning an existing _video file_ (that's `/embedded-captions`) and from a narrated video _of_ a site (that's `/website-to-video`); here the source is a _web page_ and the output is a short, unnarrated highlight shot.
+**Animate a webpage / link** (the "website animation" use case). Search-driven: the user gives or names a URL → fetch/capture it → animate it (scroll-through, UI reveal, cursor demo, region callouts). Distinct from captioning an existing _video file_ (that's `/embedded-captions`) and from a narrated video _of_ a site (that's a `/product-launch-video` site-tour ask); here the source is a _web page_ and the output is a short, unnarrated highlight shot.
## Source (Step 2)
diff --git a/skills/motion-graphics/references/builder-contract.md b/skills/motion-graphics/references/builder-contract.md
index a262d2391d..5230e9d332 100644
--- a/skills/motion-graphics/references/builder-contract.md
+++ b/skills/motion-graphics/references/builder-contract.md
@@ -2,7 +2,7 @@
## Root must be sized
-Root `#stage` (`data-composition-id`) needs `position: relative; width: <W>px; height: <H>px`. Without a resolved height, flex children collapse to ~0 and content piles into the top-left — and `lint`/`inspect` won't catch it.
+Root `#stage` (`data-composition-id`) needs `position: relative; width: <W>px; height: <H>px`. Without a resolved height, flex children collapse to ~0 and content piles into the top-left. Automated gates may miss it, so inspect proof snapshots.
## Layout before animation
@@ -19,7 +19,7 @@ Root `#stage` (`data-composition-id`) needs `position: relative; width: <W>px; h
box-sizing: border-box;
```
Never `position:absolute; top:Npx` on a content container (it overflows). Reserve absolute for decoratives. Keep ≥80px padding (title-safe margin).
-3. **Entrances**: `gsap.from()` FROM offscreen/invisible TO the CSS position (in sub-comps use `fromTo()`). The CSS position is ground truth; the tween is the journey to it.
+3. **Entrances**: use `gsap.from()` only for a non-clip element active from `t=0`. Inside `.clip`, in sub-compositions, and for later entrances, use explicit `fromTo()`. The CSS position is ground truth; the tween is the journey to it.
4. **Exits**: only the final scene animates elements out; between scenes the transition IS the exit.
## Timeline / clip contract
@@ -30,7 +30,7 @@ Root `#stage` (`data-composition-id`) needs `position: relative; width: <W>px; h
## Correctness
-- **Seek-safe reveal of delayed elements**: `gsap.set(el, {autoAlpha:0})` once, then reveal with `gsap.to(el, {autoAlpha:1})` at the entrance (paired with a motion-only `from()`). **Do NOT** gate via `set(opacity:1) + from(opacity:0)` — under a paused/seeked render the element stays invisible _forever_ (browser-play hides this; seek-capture exposes it). _(Eval finding.)_
+- **Seek-safe reveal of delayed elements**: on a non-clip element or wrapper inside a clip, use one registered timeline `fromTo()` with an explicit `{ autoAlpha: 0 }` start and `{ autoAlpha: 1, ... }` end. Do not page-load `gsap.set()` a later `.clip`, and never target `.clip` visibility; the framework owns its lifecycle. _(Eval finding.)_
- **Count-ups** tween a proxy via `onUpdate`; they only render when the host advances the timeline **with events enabled** (`tl.time()` / non-suppressed seek). A bare `seek(t, true)` freezes them at 0 — the HF render host must seek with events on. _(Eval finding.)_
- Clamp at tween bounds; don't let a spring overshoot past a held value.
- Allowed eases: `power1–4`, `back`, `bounce`, `circ`, `elastic`, `expo`, `sine` (`.in/.out/.inOut`).
diff --git a/skills/music-to-video/SKILL.md b/skills/music-to-video/SKILL.md
index e2bf4c86b4..3d05206116 100644
--- a/skills/music-to-video/SKILL.md
+++ b/skills/music-to-video/SKILL.md
@@ -26,7 +26,14 @@ Workflow: Step 0 setup → `hyperframes.json` + `assets/bgm.mp3`; Step 1 analyze
Goal: Establish the music source, create the HyperFrames project, and note any user-supplied media.
-The **music is the spine** — establish one track before anything else. This skill is tuned for **fast, high-energy BGM**: a strong beat grid drives the cuts (calm tracks work, but pace by phrase rather than beat). If the user gave you audio — a music file, or a video to pull the audio from — use it. If not, generate one: choose the mood from the user's description (e.g. "driving synthwave", "trap beat", "upbeat corporate") and produce a track via `/media-use` (`references/bgm.md` — HeyGen retrieval when credentialed, else local Lyria / MusicGen; ElevenLabs or another generator also works). Before generating, run `npx hyperframes auth status` and **relay its output verbatim (don't paraphrase or rewrite it)** — it shows whether BGM comes from HeyGen or local MusicGen and, if not signed in, how to sign in. **If not signed in, STOP and wait for the user to choose — sign in, or continue offline with local MusicGen — before generating the track**; don't write keys into a per-repo `.env`. (In autonomous mode, note the status and continue offline.) See `/media-use` → Preflight for the canonical guidance. Either way the track lands at `assets/bgm.mp3`. Stage any user-supplied images or videos so frames can weave them in on the beat grid; otherwise typography carries the whole video.
+**The brief starts at the intent layer.** Opening rule, in order: **(1)** `BRIEF.md` exists → read it and ask nothing it answers — its `flow`/`storyboard` derive the mode (brief contract § 1). **(2)** No `BRIEF.md` but the project exists → resume from what's on disk; never re-interrogate. **(3)** A fresh creation request that arrived here directly → read `/hyperframes` and run its intent layer (§ 4): it confirms this route's must-haves (the music source, destination → aspect — `route-briefs.md` § /music-to-video) and announces what stays deferred — brand and genre are chosen at Step 3 by design. Write `BRIEF.md` immediately after init (never before — `init` refuses a non-empty directory) and record the preference-backed answers (`brief-format.md`). Edit requests skip all of this.
+
+The **music is the spine** — establish one track before anything else. This skill is tuned for **fast, high-energy BGM**: a strong beat grid drives the cuts (calm tracks work, but pace by phrase rather than beat). If the user supplied audio — a music file, or a video to pull audio from — use it. Otherwise choose the mood from the request and generate a track through `/media-use` (`references/bgm.md`). Before the first authenticated provider action, run `npx hyperframes auth status` and relay its output verbatim. If signed out, apply one branch:
+
+- **Collaborative:** wait for sign-in or an explicit choice to continue offline with the local provider.
+- **Autonomous:** state the status and continue through the available local provider.
+
+If no offline provider can satisfy the required music capability, surface the blocker. Never write keys into a per-repo `.env`. Auth ownership and offline fallbacks live in `/media-use` § Providers. The resulting track lands at `assets/bgm.mp3`. Stage supplied images or videos so frames can use them on the beat grid; otherwise typography carries the video.
**Lyric videos:** for lyrics synced to the vocals, get word/line timing by transcribing the track via `/media-use`, or ask the user for the lyrics text and place lines on the beat grid.
@@ -143,10 +150,10 @@ Fix any `✗` it reports — a missing or blank frame file means that worker wro
Goal: Verify the assembled video, get user approval, and render the final MP4.
-Run the CLI on the **assembled project** — that's the correct unit (the per-frame workers couldn't run it). `lint` checks structure, `validate` runs headless Chrome (catching JS errors and missing assets), `inspect` snapshots frames.
+Run the CLI on the **assembled project** — that's the correct unit (the per-frame workers couldn't run it). `check` runs structural lint and the headless-browser runtime, layout, motion, and contrast gate in one pass; `--snapshots` also emits the review frames.
```bash
-( cd "$PROJECT_DIR" && npx hyperframes check . )
+( cd "$PROJECT_DIR" && npx hyperframes check . --snapshots )
```
Inspect at `t=0`, each frame start, the strongest DROP / SURGE, every `hard_stops[].t`, and the final frame. On failure, make the **cheapest safe fix** yourself: edit the offending `compositions/frames/NN-*.html`. Never change duration or audio timing to hide a sync issue. Once the gates pass, pause for user review, then render only on approval (autonomous mode: ask the one kept question — "preview first, or render?" — then deliver the MP4 with the contact sheet):
@@ -155,7 +162,7 @@ Inspect at `t=0`, each frame start, the strongest DROP / SURGE, every `hard_stop
( cd "$PROJECT_DIR" && npx hyperframes render . --skill=music-to-video -q draft -o renders/video.mp4 --fps 30 )
```
-**Gate:** `lint` / `validate` / `inspect` passed; the user approved (autonomous: checks passed and the delivery includes the contact sheet); `renders/video.mp4` exists with audio, duration == `audiomap.audio.duration_sec`. The final reply states the MP4 path and duration.
+**Gate:** `check` passed and the snapshots were inspected; the user approved (autonomous: checks passed and the delivery includes the contact sheet); `renders/video.mp4` exists with audio, duration == `audiomap.audio.duration_sec`. The final reply states the MP4 path and duration.
---
diff --git a/skills/music-to-video/sub-agents/frame-worker.md b/skills/music-to-video/sub-agents/frame-worker.md
index b725c169f0..7fbc108422 100644
--- a/skills/music-to-video/sub-agents/frame-worker.md
+++ b/skills/music-to-video/sub-agents/frame-worker.md
@@ -1,71 +1,45 @@
# Frame worker — per-frame composition author (music-to-video)
-You 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`
+You 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`
-- `determinism-rules.md` + `data-attributes.md`); read it first. This file covers the
- music-specific part.
+- `determinism-rules.md` + `data-attributes.md`); read it first. This file covers the music-specific part.
-Your 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).
+Your 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).
## Inputs (your dispatch context)
- `PROJECT_DIR` — project root; all paths relative to it.
-- `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).
-- Your **`## Frame N` block** in `STORYBOARD.md` — its `span_sec`, `pacing`, `mood`, `feel`, and
- its **`### Groups`** list. Each group is one of:
+- `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).
+- Your **`## Frame N` block** in `STORYBOARD.md` — its `span_sec`, `pacing`, `mood`, `feel`, and its **`### Groups`** list. Each group is one of:
- **template** — `template:<id>` + `params` + `role_bindings` (real audiomap anchor seconds) + `copy`.
- **free_design** — `free_design:{dominant_system, primitives, density_topology}` + `anchors[]` + `copy`.
- **asset** — `asset:{treatment, clips, anchors?, overlay_copy?}` (see `montage.md`).
- `audiomap.json` — timing truth; use the seconds you're given.
- `frame.md` — the brand (palette + type). Pull every visual token from here.
-- **Materials** — `references/templates/<id>/index.html` (its `data-composition-variables` give
- the param semantics) for template groups; `references/motion-primitives/<id>/index.html` for
- free groups; staged `assets/…` for asset groups.
+- **Materials** — `references/templates/<id>/index.html` (its `data-composition-variables` give the param semantics) for template groups; `references/motion-primitives/<id>/index.html` for free groups; staged `assets/…` for asset groups.
- Canvas `<width>×<height>` and the frame's `pacing`.
-If your dispatch carries lint / validate feedback from a prior pass, address each finding.
+If your dispatch carries `lint` / `check` feedback from a prior pass, address each finding.
## What comes fixed — realize it as given
- **No plan = stop.** If your `### Groups` is `TBD`/empty (Step 3 was skipped), report back and write nothing — never invent groups, templates, or copy.
-- **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.
-- **Transitions** are the assembler's: it hard-cuts between frames. You author the frame's
- **internal** group→group cuts only.
+- **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.
+- **Transitions** are the assembler's: it hard-cuts between frames. You author the frame's **internal** group→group cuts only.
- **Audio** lives on the root `index.html`; your frame is silent.
- **GSAP** is loaded by the host; use the global `gsap` (your frame carries no gsap `<script>`).
- **Duration** is the frame span length; build your timeline to run `0 … span_len`.
## Build
-1. **Read** your `## Frame` block, `frame.md`, and the body of every template / primitive it
- cites. Reproduce those recipes.
-2. **Work in frame-local time.** Subtract the frame start from every anchor: `local_t = track_t
-− span_sec[0]`.
-3. **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.
-4. **Self-check and finish.** Run the checklist and fix in place. Writing the file is your
- terminal action; the orchestrator runs `lint` / `validate` / `inspect` after assembly
- (Step 6) and re-dispatches you with any finding.
+1. **Read** your `## Frame` block, `frame.md`, and the body of every template / primitive it cites. Reproduce those recipes.
+2. **Work in frame-local time.** Subtract the frame start from every anchor: `local_t = track_t − span_sec[0]`.
+3. **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.
+4. **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.
## Self-check
-- `<template>`-wrapped `#stage`; `data-composition-id` == timeline key == filename stem ==
- `<frame_id>`; all `<style>` / `<script>` inside `<template>`; uses the host's global `gsap`.
+- `<template>`-wrapped `#stage`; `data-composition-id` == timeline key == filename stem == `<frame_id>`; all `<style>` / `<script>` inside `<template>`; uses the host's global `gsap`.
- One paused timeline, registered, ending in `tl.seek(0)`; `data-duration` == frame span length; silent.
- Each group shows across its frame-local span and hides outside it; `t=0` renders; group→group cuts are 0ms; ids / uniforms namespaced.
- Each group's text / palette match its block's `params` / `copy`, drawn from `frame.md`.
diff --git a/skills/pr-to-video/SKILL.md b/skills/pr-to-video/SKILL.md
index f8f731b720..0dd4183401 100644
--- a/skills/pr-to-video/SKILL.md
+++ b/skills/pr-to-video/SKILL.md
@@ -11,52 +11,19 @@ description: "Turn a GitHub pull request (a PR URL, owner/repo#N, or 'this PR' i
Use 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.
-> **Confirm the route before Step 0.** 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). Route other intents elsewhere: a product launch/promo → `/product-launch-video`; a general website tour → `/website-to-video`; a topic explainer with no PR → `/faceless-explainer`; captions on existing footage → `/embedded-captions`; a short unnarrated motion graphic → `/motion-graphics`; a whole-repo or multi-PR release walkthrough → `/general-video`. **Out of scope:** live / at-render-time data — PR facts are read once at author time and baked in. If the user says only "make a video" or the route is uncertain, read `/hyperframes` first.
+> **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).
-You 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-core/references/brief-contract.md` before Step 0 — it defines the two modes, the gate types, and the brief fields; the mode governs the Step 0/3/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`.
+You 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-core/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`.
Workflow: 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`.
---
-## Step 0: Setup and Brief
+## Step 0: Setup
-Goal: Lock the PR reference and the core video brief, and create the HyperFrames project if needed.
+Goal: 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 **claude** (fixed at Step 2, never asked).
-Get the **PR reference** (a full URL, an `<owner>/<repo>#<N>` ref, or "this PR" in a checked-out repo), then confirm the brief in two rounds — through the question UI when the environment has one, conversationally otherwise. The intro text states **message** (the ONE thing the video must say about this change, in one sentence), **language**, and the style (always **claude**). Skip a question only when the user's request already answered it.
-
-**Round 1 — mode.** One question, asked first. Skip it when the request already carried a signal ("surprise me" / "just build it"):
-
-- **Collaborative (recommended)** — confirm the key choices together before building.
-- **Autonomous** — every decision is made for the user, each stated with its reason; the only remaining question is preview-before-render.
-
-Autonomous → ask nothing more. State the locked brief (all fields + receipts) as a heads-up and proceed straight through; the preview question waits at Step 6.
-
-**Round 2 — the brief (collaborative).** One round, these four questions, recommended option first with its receipt:
-
-- **Angle — what story does this PR tell?** changelog / feature-reveal / fix-explainer / refactor-walkthrough; recommend the one the PR itself suggests, with its basis.
-- **Audience — who is it for?** developers (default) · mixed technical · non-technical stakeholders.
-- **Length — how long?** From the size table below; the tier is a ceiling, and a one-headline story recommends inside 30–90s ("+A/−D across F files" is the receipt).
-- **Destination — where will it play?** YouTube / embed → 16:9 (default for a code explainer) · X / LinkedIn / Instagram feed → 1:1 · Shorts / TikTok → 9:16.
-
-A "go" accepts all recommended defaults.
-
-**Recommend the length from the PR's change size**, not a fixed guess. Before confirming the brief, peek at the PR once — a read-only call that also grounds the angle (Step 1 still does the full deterministic fetch):
-
-```bash
-gh pr view <PR_REF> --json title,additions,deletions,changedFiles
-```
-
-Pick the tier from `additions + deletions` (nudged up by `changedFiles`) and lead with it as the default (the user can override; hard cap ~3 min):
-
-| PR change size | Recommended length |
-| --------------------------------- | ------------------ |
-| trivial (≲ 50 lines changed) | ~20–40s |
-| focused (~50–200 lines) | ~40–70s |
-| substantial (~200–600 lines) | ~70–110s |
-| large (≳ 600 lines, or 25+ files) | ~110–180s |
-
-State the basis in one phrase when you propose it (e.g. "~40s — small change, +44/−13 across 12 files"). A huge PR doesn't mean a long video — the tier is a **ceiling** on how much story the diff can support, never a floor to fill. When the story is **one headline change**, recommend inside the 30–90s sweet spot regardless of the size tier, and say so (the tier's range can still appear as a non-recommended option for a fuller walkthrough).
+**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 (§ 4): it checks recipes and remembered defaults, and conducts this route's questions — including the PR-size → length doctrine, which lives whole in `../hyperframes/references/route-briefs.md` § /pr-to-video — then hands back the locked brief. Edit requests skip all of this — go do the edit.
Resolve 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:
@@ -79,9 +46,16 @@ Initialize only if `$PROJECT_DIR/hyperframes.json` is missing. Its basename come
Every 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.
-**Show sign-in status before the brief** — run `npx hyperframes auth status` and **relay its output verbatim (don't paraphrase or rewrite it).** It reports whether voice/BGM will use HeyGen or local engines and, when not signed in, how to sign in. **If not signed in, STOP and wait for the user to choose — sign in, or say "go"/"offline" to continue with local engines — before asking the brief or anything else.** Treat it as a real decision point, not a passing note; don't fold the choice into the brief question, and don't write keys into a per-repo `.env`. (In autonomous mode, note the status and continue offline.) See `../media-use` → Preflight for the canonical guidance.
+**Write `BRIEF.md` immediately after init** (never before — `init` refuses a non-empty directory): the intent layer's locked brief, shape per `../hyperframes-core/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.
-**Gate:** `hyperframes.json` exists; the PR ref is captured; angle, audience, length, destination → aspect, message, and language are locked; sign-in status was shown (signed in, or continuing offline).
+**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:
+
+- **Collaborative:** wait for the user to sign in or explicitly choose `offline` / `go`.
+- **Autonomous:** state the status and continue through the available local engines.
+
+Do 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` § Providers.
+
+**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).
---
@@ -141,7 +115,7 @@ Read `../hyperframes-creative/references/story-spine.md` (hook language, value-b
Use `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.
-After drafting, present the plan as a proposal per story-spine § 3: open by echoing **"This video tells [audience] that [message]"**, then the frame table — one row per frame: frame · beat (type, duration) · on screen · why (its `narrativeRole`, traced to the message). In that same message ask the user (a) to approve or request changes, and (b) whether they want a live preview of the storyboard scaffold — open it only on a yes. Start that preview once with `npx hyperframes preview "$PROJECT_DIR" --background`; retain the printed URL for Step 6 instead of starting another server. Iterate until approved; carry the preview choice to Step 6. This is a **checkpoint gate** (brief contract § 1): in autonomous mode, post the same summary as a heads-up and proceed — the preview question is asked once, at Step 6.
+After drafting, run the review loop's plan pass — `../hyperframes-core/references/review-loop.md` § 1: open the board (don't ask whether to — run the preview from `PROJECT_DIR` in the background), present the plan as a proposal, and ask the two questions — approve or change, and **sketches first** (recommended) or skip. Feedback loops through chat or the board's comments file until approved. This is a **checkpoint gate** (brief contract § 1): in autonomous mode there is no board and nothing to ask — post the same summary as a heads-up and proceed; sketches collapse into the build, and the one preview question comes at Step 6.
**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).
@@ -153,7 +127,7 @@ Goal: Generate narration, word timings, music, and audio metadata from the appro
Start audio after Step 3 approval. Run it in the background, then continue to Step 4.
-**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-use/audio/scripts/heygen-tts.mjs --list` (or `GET /v3/voices?engine=starfish`); **Kokoro** (offline) via the voice table in `../media-use/audio/references/tts.md` (prefixes `am_`/`bm_` male, `af_`/`bf_` female). Omit `--voice` only when the user expressed no preference.
+**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`).
`node <SKILL_DIR>/scripts/audio.mjs --script ./SCRIPT.md --storyboard ./STORYBOARD.md --hyperframes . --out ./audio_meta.json --voice <voice-id> &`
@@ -169,6 +143,8 @@ If there is no narration and no `SCRIPT.md`, skip voice generation. BGM may stil
Goal: Add the visual direction, layout intent, and motion choices to each storyboard frame.
+**Sketch the board first (collaborative only).** The moment the plan is approved, run the sketch pass — `../hyperframes-core/references/review-loop.md` § 2 (don't wait on Step 3.1; sketches don't use timings): wireframe every frame yourself, mark each `built`, pause for the one layout question when the board is full, and revise only the sketches named until the board 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.
+
Edit `STORYBOARD.md` in place. Do not create another storyboard. Use `frame.md` as source of truth for color, type, layout feel, and style.
Read `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.
@@ -177,7 +153,7 @@ For every frame, write a **time-coded shot sequence** into `STORYBOARD.md` per `
Do 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/`.
-**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.
+**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 board was confirmed.
---
@@ -203,7 +179,7 @@ Before dispatch, read `sub-agents/frame-worker.md` and `../hyperframes-core/refe
node <SKILL_DIR>/scripts/frame-packets.mjs --project "$PROJECT_DIR" --storyboard "$PROJECT_DIR/STORYBOARD.md"
```
-The packet builder hard-fails a code frame without the upstream-selected `### Source excerpt`, and hard-caps packet bytes. Dispatch **at most three workers total**, balanced across the packet paths; each worker may build multiple assigned frames sequentially and reads shared instructions 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`.
+The packet builder hard-fails a code frame without the upstream-selected `### Source excerpt`, and hard-caps packet bytes. Dispatch **at most three workers total**, balanced across the packet paths; each worker may build multiple assigned frames sequentially and reads shared instructions 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 § When a confirmed sketch exists).
On 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.
@@ -219,7 +195,7 @@ After audio timings exist, build captions in the background and assemble the ind
`captions.mjs` uses the project's `.hyperframes/caption-skin.html` (claude'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.
-**Gate:** every frame is marked `animated`, `index.html` exists, and captions are built or explicitly skipped.
+**Gate:** every frame is marked `animated` (collaborative: the sketch board was confirmed at Step 4), `index.html` exists, and captions are built or explicitly skipped.
---
@@ -243,9 +219,9 @@ Inject transitions, run checks, pause for review, then render.
If 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.
-**Known false-positive — do not chase it.** `inspect` 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.
+**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.
-After checks pass, pause for user review. The video is assembled, viewable, and editable in Studio. Manage preview only once across Step 3 and Step 6: reuse the retained background-preview URL if the user asked earlier; if they declined earlier, offer it once and start it with the command below only on a yes. Do not ask again if they are already reviewing in Studio. In autonomous mode this is the one question the mode keeps: ask "preview first, or render?" — open the preview on yes, render on no — then deliver the MP4 with the contact sheet and the frame ids so revisions can target a single frame.
+After checks pass, pause for user review — the review loop's final look (`../hyperframes-core/references/review-loop.md` § 4): one question, on the Studio that has been open since Step 3 — render now, or what changes? (Autonomous: the one kept question, preview first or render — open the preview with the command below on a yes.) Then deliver the MP4 with the contact sheet and the frame ids so revisions can target a single frame.
Preview: `npx hyperframes preview "$PROJECT_DIR" --background`
@@ -253,11 +229,11 @@ Render only after user approval (autonomous mode: after the preview-or-render qu
`npx hyperframes render --skill=pr-to-video --quality high --output renders/video.mp4`
-Do not rerun `lint`, `validate`, `inspect`, or `snapshot` after rendering unless the user asks.
+Do not rerun `lint`, `check`, or `snapshot` after rendering unless the user asks.
After 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.
-**Gate:** `lint`, `validate`, and `inspect` passed 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.
+**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.
---
@@ -273,7 +249,7 @@ The reusable, domain-agnostic shot shapes live in `../hyperframes-animation/blue
| Read | When |
| ----------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------ |
-| `[../hyperframes-core/references/brief-contract.md](../hyperframes-core/references/brief-contract.md)` | Step 0: the interaction mode, brief fields, and how to ask. |
+| `[../hyperframes-core/references/brief-contract.md](../hyperframes-core/references/brief-contract.md)` | Gate types, mode derivation from `BRIEF.md`, field semantics. |
| `[../hyperframes-creative/references/story-spine.md](../hyperframes-creative/references/story-spine.md)` | Step 3: story doctrine — hook language, value-before-evidence, proposal shape. |
| `[references/story-design.md](references/story-design.md)` | Step 3: plan the PR explanation. |
| `[../hyperframes-animation/blueprints-index.md](../hyperframes-animation/blueprints-index.md)` | Step 3: role→blueprint menu. Step 4: pick the shot shape. |
diff --git a/skills/pr-to-video/sub-agents/frame-worker.md b/skills/pr-to-video/sub-agents/frame-worker.md
index 8c4e1a0f2f..6e2d52db5c 100644
--- a/skills/pr-to-video/sub-agents/frame-worker.md
+++ b/skills/pr-to-video/sub-agents/frame-worker.md
@@ -24,10 +24,14 @@ Each packet provides:
- `../references/cut-catalog.md` — the **cut catalog** (zoom-through / inverse / cut-the-curve / waterfall) for a within-frame seam. You never author the between-frame transition — story's `transition_in` + the injector own that.
- Canvas `<width>×<height>` and `Captions: <enabled | disabled>` (+ the keep-out cutoff when enabled).
-**Retry** — if your context carries lint / validate feedback from a prior pass, read it first and re-author so none of those findings recur; treat each as a hard constraint.
+**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.
**OUTPUT** — one `compositions/frames/<frame_id>.html` per assigned packet, each a bare 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. After the last assigned file passes the self-check, stop — you do not edit `STORYBOARD.md`, mint audio, assemble the index, run the CLI, or report back. The orchestrator validates the files before assembly and marks their `status`.
+## When a confirmed sketch exists
+
+In collaborative runs the orchestrator wireframes the board first, so your target file may already exist as the frame's **user-confirmed wireframe** — your dispatch says whether it does (a file found on a retry is your own prior output, not a sketch). Read it 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 full `frame.md` treatment (the sketch is deliberately unstyled), the `code-*` block where the sketch held plain code, the finished invented visuals where it used plain blocks, 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 wireframe, fully dressed.
+
## Mostly invented — you build the visual (except code blocks + the credits avatars)
A 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.
@@ -78,7 +82,7 @@ Generic seek-safety + structure live in `hyperframes-core` (read it; not restate
## Self-check before finishing (you do NOT run the CLI)
-You **can't** meaningfully run `hyperframes lint` / `validate` / `inspect` 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 at **Step 6, 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 (the rules behind them live in `hyperframes-core`):
+You **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 at **Step 6, 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 (the rules behind them live in `hyperframes-core`):
- `missing_template_wrapper` / `missing_composition_id` — the entire file is exactly one bare `<template>…</template>` fragment (no DOCTYPE/full document); its first element carries `data-composition-id="<frame_id>"` and a positive `data-duration` matching the packet.
- **Template transport** — every `<style>` and `<script>` block, including the GSAP load, lives inside `<template>`.
diff --git a/skills/product-launch-video/SKILL.md b/skills/product-launch-video/SKILL.md
index 0925dacfdb..ccd11c16b7 100644
--- a/skills/product-launch-video/SKILL.md
+++ b/skills/product-launch-video/SKILL.md
@@ -1,6 +1,6 @@
---
name: product-launch-video
-description: "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. Not a general site tour (/website-to-video). Unclear → /hyperframes."
+description: "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."
---
> **First, keep this skill fresh — run silently, don't ask:** `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.
@@ -13,42 +13,36 @@ description: "Turn a product or marketing URL, pasted script, or brief into a pr
Use this skill to capture a product, understand its brand, plan a launch video, and build it frame by frame in HyperFrames.
-> **Confirm the route before Step 0.** 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. Route other intents elsewhere: a general non-launch website tour -> `/website-to-video`; a topic explainer with no product -> `/faceless-explainer`; a GitHub PR -> `/pr-to-video`; captions on existing footage -> `/embedded-captions`; a short unnarrated motion graphic -> `/motion-graphics`. If the user says only "make a video" or the route is uncertain, read `/hyperframes` first.
+> **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).
-You 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-core/references/brief-contract.md` before Step 0 — it defines the two modes, the gate types, and the brief fields; the mode governs the Step 0/3/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`.
+You 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-core/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`.
Workflow: 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`.
---
-## Step 0: Setup and Brief
+## Step 0: Setup
-Goal: Lock the core video brief and create the HyperFrames project if needed.
+Goal: Enter with a confirmed brief, create the HyperFrames project, and make the brief durable.
+
+**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 (§ 4): it checks recipes and remembered defaults, conducts this route's questions (`../hyperframes/references/route-briefs.md`), and hands back the locked brief. Edit requests skip all of this — go do the edit.
Initialize 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.
`npx hyperframes init "videos/<project>" --non-interactive --example=blank` — `init` checks the installed skills against the latest on GitHub and updates the global set if any are out of date.
-**Show sign-in status before the brief** — run `npx hyperframes auth status` and **relay its output verbatim (don't paraphrase or rewrite it).** It reports whether voice/BGM will use HeyGen or local engines and, when not signed in, how to sign in. **If not signed in, STOP and wait for the user to choose — sign in, or say "go"/"offline" to continue with local engines — before asking the brief or anything else.** Treat it as a real decision point, not a passing note; don't fold the choice into the brief question, and don't write keys into a per-repo `.env`. (In autonomous mode, note the status and continue offline.) See `../media-use` → Preflight for the canonical guidance.
-
-**Confirm the brief** in two rounds — through the question UI when the environment has one, conversationally otherwise. The intro text states **message** (the ONE thing the promo must communicate, in one sentence) and **language**. Skip a question only when the user's request already answered it. (`VO_MODE` is asked in Step 1 only when a script was pasted.)
-
-**Round 1 — mode.** One question, asked first. Skip it when the request already carried a signal ("surprise me" / "just build it"):
-
-- **Collaborative (recommended)** — confirm the key choices together before building.
-- **Autonomous** — every decision is made for the user, each stated with its reason; the only remaining question is preview-before-render.
+After 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.
-Autonomous → ask nothing more. State the locked brief (all fields + receipts) as a heads-up and proceed straight through; the preview question waits at Step 6.
+**Write `BRIEF.md` immediately after init** (never before — `init` refuses a non-empty directory): the intent layer's locked brief, shape per `../hyperframes-core/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.
-**Round 2 — the brief (collaborative).** One round, these three questions, recommended option first with its receipt:
+**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:
-- **Angle — what story shape should the promo take?** Options from the site's / brief's own positioning; recommend one, with its basis.
-- **Length — how long?** Recommend inside the 30–90s sweet spot, scaled to how much material the input gives you, with its basis.
-- **Destination — where will it play?** YouTube / embed → 16:9 · X / LinkedIn / Instagram feed → 1:1 · Shorts / TikTok → 9:16.
+- **Collaborative:** wait for the user to sign in or explicitly choose `offline` / `go`.
+- **Autonomous:** state the status and continue through the available local engines.
-A "go" accepts all recommended defaults.
+Do 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` § Providers.
-**Gate:** `hyperframes.json` exists, and the brief fields (angle, length, destination → aspect, message, language) are locked; sign-in status was shown (signed in, or continuing offline).
+**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).
---
@@ -56,7 +50,7 @@ A "go" accepts all recommended defaults.
Goal: Collect the source material, brand signals, and usable assets for the video.
-Classify 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`, ask once "use it verbatim or restructure?", store answer as `VO_MODE`, then resolve capture target: URL in text -> use it; brand name only -> `WebSearch`, confirm URL in one line, then crawl; no URL/site -> no-capture path.
+Classify 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.
Run capture with: `npx hyperframes capture "<URL>" -o ./capture`
@@ -72,7 +66,7 @@ No-capture path: create `capture/extracted/tokens.json`, `capture/extracted/visi
Goal: Choose one shipped frame preset; a script turns it into this video's `frame.md` + caption skin.
-You make the one judgment call — **which preset**. Read `../hyperframes-creative/references/design-spec.md` and pick the preset whose look best fits the brand and brief. Then run:
+When `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:
```bash
node <SKILL_DIR>/scripts/build-frame.mjs --preset <name> --hyperframes .
@@ -82,7 +76,7 @@ The script does the rest deterministically: copies the preset's `FRAME.md` → `
`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.
-**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.
+**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).
---
@@ -94,7 +88,7 @@ Read `../hyperframes-creative/references/story-spine.md` (hook language, value-b
Use `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.
-After drafting, present the plan as a proposal per story-spine § 3: open by echoing **"This video tells [audience] that [message]"**, then the frame table — one row per frame: frame · beat (type, duration) · on screen · why (its `narrativeRole`, traced to the message). In that same message ask the user two things: (a) to approve or request changes, and (b) whether they want a live preview of the storyboard scaffold (npx hyperframes preview) — open it only on a yes. Iterate until approved, and carry the preview choice to Step 6. This is a **checkpoint gate** (brief contract § 1): in autonomous mode, post the same summary as a heads-up and proceed — the preview question is asked once, at Step 6.
+After drafting, run the review loop's plan pass — `../hyperframes-core/references/review-loop.md` § 1: open the board (don't ask whether to), present the plan as a proposal, and ask the two questions — approve or change, and **sketches first** (recommended) or skip. Feedback loops through chat or the board's comments file until approved. This is a **checkpoint gate** (brief contract § 1): in autonomous mode there is no board and nothing to ask — post the same summary as a heads-up and proceed; sketches collapse into the build, and the one preview question comes at Step 6.
**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).
@@ -106,7 +100,7 @@ Goal: Generate narration, word timings, music, and audio metadata from the appro
Start audio after Step 3 approval. Run it in the background, then continue to Step 4.
-**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-use/audio/scripts/heygen-tts.mjs --list` (or `GET /v3/voices?engine=starfish`); **Kokoro** (offline) via the voice table in `../media-use/audio/references/tts.md` (prefixes `am_`/`bm_` male, `af_`/`bf_` female). Omit `--voice` only when the user expressed no preference.
+**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`).
`node <SKILL_DIR>/scripts/audio.mjs --script ./SCRIPT.md --storyboard ./STORYBOARD.md --hyperframes . --out ./audio_meta.json --provider <provider> --voice <voice-id> &`
@@ -122,6 +116,8 @@ If there is no narration and no `SCRIPT.md`, skip voice generation. BGM may stil
Goal: Add the visual direction, layout intent, and motion choices to each storyboard frame.
+**Sketch the board first (collaborative only).** The moment the plan is approved, run the sketch pass — `../hyperframes-core/references/review-loop.md` § 2 (don't wait on Step 3.1; sketches don't use timings): wireframe every frame yourself, mark each `built`, pause for the one layout question when the board is full, and revise only the sketches named until the board 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.
+
Edit `STORYBOARD.md` in place. Do not create another storyboard. Use `frame.md` as source of truth for color, type, layout feel, and style.
Read `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.
@@ -134,7 +130,7 @@ Stage named assets after visual design is locked:
`node <SKILL_DIR>/scripts/stage-assets.mjs --storyboard ./STORYBOARD.md --hyperframes .`
-**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.
+**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 board was confirmed.
---
@@ -152,7 +148,7 @@ Duration sync is mechanical: real voice duration wins; silent frames keep estima
Before dispatch, read `sub-agents/frame-worker.md` and `../hyperframes-core/references/subagent-dispatch.md`. Dispatch one sub-agent per frame, in parallel if possible; otherwise run workers in waves. Each worker gets exactly one frame.
-Each worker context must include `PROJECT_DIR`, `frame_id`, canvas size, caption status and keep-out band if captions are enabled, and `RULES_DIR` as the absolute path to this skill's `../hyperframes-animation/rules/`. Each worker reads `frame.md`, its own `## Frame N` block from `STORYBOARD.md`, the local rule recipe (`../hyperframes-animation/rules/<id>.md`) for each cited motion, and the frame's blueprint template (`../hyperframes-animation/blueprints/<id>.md`). Each worker writes only `compositions/frames/NN-*.html`. Workers must never edit `STORYBOARD.md`.
+Each worker context must include `PROJECT_DIR`, `frame_id`, whether the frame has a **confirmed sketch** on disk, canvas size, caption status and keep-out band if captions are enabled, and `RULES_DIR` as the absolute path to this skill's `../hyperframes-animation/rules/`. Each worker reads `frame.md`, its own `## Frame N` block from `STORYBOARD.md`, the confirmed sketch when one exists (keep its layout — frame-worker § When a confirmed sketch exists), the local rule recipe (`../hyperframes-animation/rules/<id>.md`) for each cited motion, and the frame's blueprint template (`../hyperframes-animation/blueprints/<id>.md`). Each worker writes only `compositions/frames/NN-*.html`. Workers must never edit `STORYBOARD.md`.
**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: `sub-agents/frame-worker.md`.)
@@ -166,7 +162,7 @@ After audio timings exist, build captions in the background and assemble the ind
`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.
-**Gate:** every frame is marked `animated`, `index.html` exists, and captions are built or explicitly skipped.
+**Gate:** every frame is marked `animated` (collaborative: the sketch board was confirmed at Step 4), `index.html` exists, and captions are built or explicitly skipped.
---
@@ -184,15 +180,13 @@ Inject transitions, run checks, pause for review, then render.
`npx hyperframes check`
-`npx hyperframes check`
-
`npx hyperframes snapshot --at <frame-midpoints>`
`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.
If 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.
-After checks pass, pause for user review. The video is assembled, viewable, and editable in Studio. Manage preview only once across Step 3 and Step 6: open it if the user asked earlier, offer it if they declined earlier, and do not ask again if they are already reviewing in Studio. In autonomous mode this is the one question the mode keeps: ask "preview first, or render?" — open the preview on yes, render on no — then deliver the MP4 with the contact sheet and the frame ids so revisions can target a single frame.
+After checks pass, pause for user review — the review loop's final look (`../hyperframes-core/references/review-loop.md` § 4): one question, on the Studio that has been open since Step 3 — render now, or what changes? (Autonomous: the one kept question, preview first or render.) Then deliver the MP4 with the contact sheet and the frame ids so revisions can target a single frame.
Preview: `npx hyperframes preview`
@@ -200,9 +194,9 @@ Render only after user approval (autonomous mode: after the preview-or-render qu
`npx hyperframes render --skill=product-launch-video --quality high --output renders/video.mp4`
-Do not rerun `lint`, `validate`, `inspect`, or `snapshot` after rendering unless the user asks.
+Do not rerun `lint`, `check`, or `snapshot` after rendering unless the user asks.
-**Gate:** `lint`, `validate`, and `inspect` passed 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.
+**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.
---
@@ -216,7 +210,7 @@ The reusable, product-agnostic shot shapes live in `../hyperframes-animation/blu
| Read | When |
| ----------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------ |
-| `[../hyperframes-core/references/brief-contract.md](../hyperframes-core/references/brief-contract.md)` | Step 0: the interaction mode, brief fields, and how to ask. |
+| `[../hyperframes-core/references/brief-contract.md](../hyperframes-core/references/brief-contract.md)` | Gate types, mode derivation from `BRIEF.md`, field semantics. |
| `[../hyperframes-creative/references/story-spine.md](../hyperframes-creative/references/story-spine.md)` | Step 3: story doctrine — hook language, value-before-evidence, proposal shape. |
| `[../hyperframes-creative/frame-presets/](../hyperframes-creative/frame-presets/)` | Step 2: choose and adopt a frame preset. |
| `[../hyperframes-creative/references/design-spec.md](../hyperframes-creative/references/design-spec.md)` | Step 2: apply brand tokens correctly. |
diff --git a/skills/product-launch-video/sub-agents/frame-worker.md b/skills/product-launch-video/sub-agents/frame-worker.md
index 4508f88cb7..13e01d6f24 100644
--- a/skills/product-launch-video/sub-agents/frame-worker.md
+++ b/skills/product-launch-video/sub-agents/frame-worker.md
@@ -21,10 +21,14 @@
- `../references/cut-catalog.md` — 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.
- Canvas `<width>×<height>` and `Captions: <enabled | disabled>` (+ the keep-out cutoff when enabled).
-**Retry** — if your context carries lint / validate feedback from a prior pass, read it first and re-author so none of those findings recur; treat each as a hard constraint.
+**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.
**OUTPUT** — `compositions/frames/<frame_id>.html`, one self-contained sub-composition. Writing it (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`.
+## When a confirmed sketch exists
+
+In collaborative runs the orchestrator wireframes the board first, so your target file may already exist as the frame's **user-confirmed wireframe** — your dispatch says whether it does (a file found on a retry is your own prior output, not a sketch). Read it 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 full `frame.md` treatment (the sketch is deliberately unstyled), the real assets where the sketch used stand-in blocks, 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 wireframe, fully dressed.
+
## You do NOT decide
These belong to other steps — touching them collides with a sibling or breaks an upstream contract:
@@ -50,14 +54,14 @@ Generic seek-safety + structure live in `hyperframes-core` (read it; not restate
## Workflow
-1. **Read** — `hyperframes-core`'s composition contract (the structural law), then `frame.md` (the look) and your `## Frame N` block (the shot sequence + `blueprint:` / `focal:` / `roles:` / assets). **Then read the blueprint template** `../hyperframes-animation/blueprints/<id>.md` (skip if `compose`) for the shot's shape and signature move, and **open the rule recipe `RULES_DIR/<id>.md` for every named motion** in the Scene lines (plus the shared `../hyperframes-animation/examples/<id>.html` when the recipe is unclear): you reproduce these mechanics, not improvise them. 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 `lint` / `validate` / `inspect` can miss the resulting blank sub-composition.
+1. **Read** — `hyperframes-core`'s composition contract (the structural law), then `frame.md` (the look) and your `## Frame N` block (the shot sequence + `blueprint:` / `focal:` / `roles:` / assets). **Then read the blueprint template** `../hyperframes-animation/blueprints/<id>.md` (skip if `compose`) for the shot's shape and signature move, and **open the rule recipe `RULES_DIR/<id>.md` for every named motion** in the Scene lines (plus the shared `../hyperframes-animation/examples/<id>.html` when the recipe is unclear): you reproduce these mechanics, not improvise them. 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.
2. **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 you just read, the blueprint's signature move kept recognizable. Place the named assets, and find a visual idea that reinforces the beat, not a literal restyle of the words.
3. **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 — per the core contract.
4. **Self-check, then finish** — re-read your file against the checklist below and fix in place. Writing the file is your terminal action; you do **not** run the CLI.
## Self-check before finishing (you do NOT run the CLI)
-You **can't** meaningfully run `hyperframes lint` / `validate` / `inspect` 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 at **Step 6, 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 (the rules behind them live in `hyperframes-core`):
+You **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 at **Step 6, 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 (the rules behind them live in `hyperframes-core`):
- `missing_template_wrapper` / `missing_composition_id` — root is `<template>`-wrapped and carries `data-composition-id="<frame_id>"`.
- **Template transport** — every `<style>` and `<script>` block, including the GSAP load, lives inside `<template>`.
diff --git a/skills/remotion-to-hyperframes/SKILL.md b/skills/remotion-to-hyperframes/SKILL.md
index 7e9e9bf55d..ec7c8f1af3 100644
--- a/skills/remotion-to-hyperframes/SKILL.md
+++ b/skills/remotion-to-hyperframes/SKILL.md
@@ -7,7 +7,7 @@ description: 'Port an existing Remotion (React) composition''s source to HyperFr
# Remotion to HyperFrames
-> **Confirm the route before you build.** Use this **only** to port an existing **Remotion** (React) composition's source into HyperFrames. Authoring a **new** composition (even one inspired by a Remotion video) → the creation workflows / `/general-video`. **Out of scope** (one-way, Remotion-only): no reverse export (HyperFrames → Remotion or any framework), and a **non-Remotion** source (After Effects, Framer Motion, plain React / CSS) has no Remotion source to translate → re-create via `/general-video`. Unsure, or only a passing Remotion mention? **Read `/hyperframes` first.**
+> **The front door is `/hyperframes`.** Use this **only** to port an existing **Remotion** (React) composition's source into HyperFrames, one way. Authoring a **new** composition, re-creating from a non-Remotion source (After Effects, Framer Motion, plain React / CSS — there is no Remotion source to translate), a passing Remotion mention, or any uncertainty → read `/hyperframes` first: the intent layer owns every route decision.
## Overview
diff --git a/skills/slideshow/SKILL.md b/skills/slideshow/SKILL.md
index 6d8bf6882b..fc8803e557 100644
--- a/skills/slideshow/SKILL.md
+++ b/skills/slideshow/SKILL.md
@@ -27,7 +27,7 @@ A slideshow's output is the **running deck**: serve it with `hyperframes present
## Intent confirmation
-If the user explicitly asks for a slideshow, slide show, or HyperFrames slideshow, proceed with this skill.
+If the user explicitly asks for a slideshow, slide show, or HyperFrames slideshow, proceed with this skill. When the request arrived through `/hyperframes`, the intent layer's triage owns this confirmation — routed here means already confirmed, so don't re-ask; the layer's run-shape questions don't apply (the deliverable is a deck, not a rendered video). A `BRIEF.md`, when present, carries the confirmed intent — read it.
If the skill triggered from an adjacent request such as "presentation", "pitch deck", "deck", "interactive deck", or "convert this page", pause before authoring and frame the choice before asking for confirmation. Briefly explain that a HyperFrames slideshow means a runnable deck with discrete slides, built-in navigation and presenter mode, editable speaker notes, shared media handling, and validation before handoff. For source-page conversions, also mention that the goal is to preserve the original page's visual design, interactions, motion, and media behavior while translating page movement into slide-to-slide transitions.
@@ -37,7 +37,7 @@ Then ask a short confirmation question:
Use a yes/no choice UI when the environment provides one; otherwise ask the question in plain text.
-Do not implement the slideshow until the user says yes. If they say no, stop using this skill and switch to the appropriate non-slideshow workflow. This confirmation is a **routing decision**, not a preference gate — per `../hyperframes-core/references/brief-contract.md` § 1 it survives autonomous mode ("surprise me" does not skip it): building the wrong deliverable type is a quality failure, not a creative call.
+Do not implement the slideshow until the user says yes. If they say no, stop using this skill — read `/hyperframes` and let the intent layer re-route. This confirmation is a **routing decision**, not a preference gate — per `../hyperframes-core/references/brief-contract.md` § 1 it survives autonomous mode ("surprise me" does not skip it): building the wrong deliverable type is a quality failure, not a creative call.
---
diff --git a/skills/talking-head-recut/SKILL.md b/skills/talking-head-recut/SKILL.md
index 9d7f1160bf..693c19396c 100644
--- a/skills/talking-head-recut/SKILL.md
+++ b/skills/talking-head-recut/SKILL.md
@@ -15,13 +15,15 @@ conversation**, then assembles a single composition HTML and renders it to MP4 v
`hyperframes`. There is no fixed archetype list and no prescribed card structure —
the overlays emerge from what the transcript actually says.
-> **Confirm the route before you build.** This skill packages an **existing talking-head clip** with **designed graphic cards** (titles, lower-thirds, data callouts, quotes, side panels, PiP). If the user wants **plain captions / subtitles** (the spoken words as text) → `/embedded-captions`; a **single short unnarrated** element (one logo sting / lower-third) → `/motion-graphics`. **The clip plays untouched** — re-timing, recoloring, reframing, reordering, or audio is NLE editing and **out of scope**. Building from a URL / topic / PR → the creation workflows. Unsure overlays-vs-captions? **Read `/hyperframes` first.**
+> **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.
> **Graphic-packaging sibling of `embedded-captions`.** Captions add the _spoken words_
> as a readable subtitle; this adds _designed graphics_ on top of the playing video.
> Plain subtitles → `embedded-captions`. Build a video from scratch → the creation
> workflows (`product-launch-video` / `faceless-explainer` / …).
+Routed 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.
+
Inspectable intermediate files in the work directory:
- `metadata.json` — duration / width / height / fps
diff --git a/skills/website-to-video/SKILL.md b/skills/website-to-video/SKILL.md
deleted file mode 100644
index 610fadc078..0000000000
--- a/skills/website-to-video/SKILL.md
+++ /dev/null
@@ -1,150 +0,0 @@
----
-name: website-to-video
-description: "Capture a general website/URL and turn it into a video OF the site — tour, showcase, or social clip built from captured screenshots and the site's own brand assets. Use for portfolio / blog / docs / landing-page showcases. Not a product launch or promo, even from a URL (/product-launch-video). Unclear → /hyperframes."
----
-
-> **First, keep this skill fresh — run silently, don't ask:** `npx hyperframes skills update website-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.
-
-> **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.
-
-> **figma source**: If the URL is a figma.com link (not a live product site), 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.
-
-# Website to HyperFrames
-
-Capture a website, then produce a professional video from it.
-
-> **Confirm the route before Step 0.** This skill makes a video _of / from a general site_. If the user is really **marketing / launching / promoting a product** (even from this URL, even "promo for our site") → `/product-launch-video`. A **topic explainer with no site** → `/faceless-explainer`; a **GitHub PR** → `/pr-to-video`; **re-cutting / recoloring / reordering an existing video file** → out of scope. Routed here on a vague "make a video", or unsure launch-vs-general-site? **Read `/hyperframes` first** (full routing table + § What HyperFrames cannot do).
-
-Users say things like:
-
-- "Turn this website into a 15-second social clip for Instagram"
-- "Make a 30-second site tour / showcase from https://..."
-- "Capture our homepage and build a video from its own visuals"
-
-The workflow has 7 steps. Each produces an artifact that gates the next. By default it's collaborative — gates marked 💬 stop and ask the user. Mode semantics (signals, propagation, gate taxonomy) are canonical in `../hyperframes-core/references/brief-contract.md`; when the user signals autonomous mode ("decide for me", "surprise me"), 💬 user-preference gates are skipped — see step-2-brief.md for how that propagates through this workflow.
-
-**Autonomous mode is NOT "skip all gates"** (brief contract § 1). It covers user-preference questions (TTS provider, voice, color emphasis, beat count, music yes/no, captions yes/no — where the agent decides on the user's behalf). It does NOT cover quality-verification gates. The following remain non-skippable in auto mode:
-
-- Asset Audit (Step 3) — viewing contact sheets and justifying USE/SKIP for each asset
-- Per-beat HTML read (Step 5) — structured evidence block per beat
-- DoD checklist (Step 6) — including animation-map, per-warning WCAG verification, audio/motion playback
-- Honest disclosure section (Step 6) — "What I did NOT verify" must appear in your final summary
-
-If you find yourself reasoning "auto mode says bias toward action, so I'll skip X" — and X is a verification gate, not a preference question — that reasoning is wrong. Bias toward action applies to deciding _what to build_, not to deciding _whether to verify_.
-
----
-
-## Step 0: Capture & Understand the Brand
-
-**Read:** [references/step-0-capture.md](references/step-0-capture.md)
-
-Capture the site, then read the extracted data to understand the **brand and product** — what it does, who it's for, what voice it speaks in, what mood it lives in. The captured assets are a brand toolkit for later, not the building blocks the video is made from.
-
-**Show sign-in status before the brief** — run `npx hyperframes auth status` and **relay its output verbatim (don't paraphrase or rewrite it).** It reports whether voice/BGM will use HeyGen or local engines and, when not signed in, how to sign in. **If not signed in, STOP and wait for the user to choose — sign in, or say "go"/"offline" to continue with local engines — before asking the brief or anything else.** Treat it as a real decision point, not a passing note; don't fold the choice into the brief question, and don't write keys into a per-repo `.env`. (In autonomous mode, note the status and continue offline.) See `../media-use` → Preflight for the canonical guidance.
-
-**Gate:** Site summary printed — strategy-first (what the product does, who it's for, brand voice) before the asset / color / font inventory; sign-in status was shown (signed in, or continuing offline).
-
----
-
-## Step 1: Brand Identity
-
-**Read:** [references/step-1-design.md](references/step-1-design.md)
-
-Write DESIGN.md — a brand cheat sheet covering the visual identity: colors, typography, component styles, layout principles. Use `design-styles.json` for exact computed values.
-
-**Speed option:** For fast-pacing videos (billboard-per-beat), DESIGN.md can be a 50-line summary of colors + fonts + do's/don'ts — not a 300-line document. The sub-agent prompt in Step 5 pastes brand values directly, so DESIGN.md depth only matters for complex compositions.
-
-**Gate:** `DESIGN.md` exists (any length) with at minimum: color palette, font choices, and do's/don'ts.
-
----
-
-## Step 2: Strategy & Messaging
-
-**Read:** [references/step-2-brief.md](references/step-2-brief.md), [references/capabilities.md](references/capabilities.md) (scan the Table of Contents — deep-dive sections only as needed)
-
-Align with the user on **what the video must communicate** before talking visuals or assets. Parse the user's prompt — they probably already gave you the video type and style. Ask only what's missing: the ONE thing this video must say, the narrative arc, and the audience.
-
-**Gate:** Video type, duration, format, and — critically — the message and narrative arc are locked. Without those, Step 3 can't write a concept-first storyboard.
-
----
-
-## Step 3: Storyboard + Script 💬
-
-**Read:** [references/step-3-storyboard.md](references/step-3-storyboard.md)
-
-Write the storyboard concept-first: message → narrative arc → beats that serve the arc → techniques per beat → brand accents pass at the end. Then write the narration script to match. Present both to the user with a beat-by-beat summary. Iterate until they approve.
-
-**Gate:** `STORYBOARD.md` + `SCRIPT.md` exist AND the user has approved the plan.
-
----
-
-## Step 4: VO, Timing + Captions 💬
-
-**Read:** [references/step-4-vo.md](references/step-4-vo.md)
-
-If Step 2 said no narration — ask about background music, then skip to Step 5. Otherwise: ask the user which TTS provider (HeyGen TTS, ElevenLabs, or Kokoro), generate audio, transcribe, map timestamps to beats. Then ask about captions.
-
-**Gate:** Either (a) no narration was requested and storyboard has manual beat timings, or (b) `narration.wav` + `transcript.json` exist and beat timings updated with real durations.
-
----
-
-## Step 5: Build Compositions
-
-**Read:** The `hyperframes` skill (load it — every rule matters)
-**Read:** [references/step-5-build.md](references/step-5-build.md)
-
-Build index.html and compositions following the architecture and pacing chosen in the storyboard (Step 3). Sub-agents run `hyperframes lint` and `hyperframes snapshot` on each beat before reporting back.
-
-**Gate:** Every `compositions/beat-N.html` has been read top-to-bottom by the main agent against DESIGN.md and STORYBOARD.md. The per-beat checklist lives in [step-5-build.md](references/step-5-build.md).
-
----
-
-## Step 6: Validate & Deliver
-
-**Read:** [references/step-6-validate.md](references/step-6-validate.md)
-
-Lint, validate, take snapshots scaled to video length (formula: `max(beats × 3, ceil(duration_seconds / 2))`), and review each one. Fix issues before delivering. Deliver the localhost Studio project URL — only render to MP4 on explicit user request. Surface that Studio URL **only at handoff** — it is the final, stable preview; the build-phase snapshots are headless, so do not pop a preview mid-build.
-
-**Deliver something you're proud of.** Before handing off, ask yourself: would I post this on social media with my name on it? If not, fix what's wrong.
-
-**Gate:** `npx hyperframes check` pass with zero errors, and the final response includes the active Studio project URL.
-
----
-
-## Quick Reference
-
-### Video Types
-
-Typical constraints by video type — use as a starting point, not a formula. Beat count should follow from the content and the narration, not from a target range.
-
-| Type | Typical duration | Duration driver | Narration |
-| ----------------------- | ---------------- | ------------------ | --------------------- |
-| Social clip (IG/TikTok) | 10–15s | Platform limit | Optional |
-| Site walkthrough | 30–60s | Script length | Full narration |
-| Content announcement | 15–30s | Content complexity | Full narration |
-| Brand reel | 20–45s | Music track | Optional, music focus |
-
-(A product demo, feature announcement, or launch teaser that _sells_ the product belongs to `/product-launch-video` — see the routing note at the top.)
-
-Beat count is not in this table intentionally — it should come from the storyboard, not from "social ad = 3-4 beats." A social ad for a complex product might need 5 well-timed beats. A brand reel with one strong visual thesis might need 3.
-
-### Format
-
-- **Landscape**: 1920x1080 (default)
-- **Portrait**: 1080x1920 (Instagram Stories, TikTok)
-- **Square**: 1080x1080 (Instagram feed)
-
-### Reference Files
-
-| File | When to read |
-| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- |
-| [step-0-capture.md](references/step-0-capture.md) | Step 0 — capture, understand the brand and product, write strategy-first site summary |
-| [step-1-design.md](references/step-1-design.md) | Step 1 — write DESIGN.md brand cheat sheet (5 sections, 250-350 lines; 50-line fast-path for billboard-style social ads) |
-| [step-2-brief.md](references/step-2-brief.md) | Step 2 — align on message, narrative arc, audience with user |
-| [capabilities.md](references/capabilities.md) | Steps 2 & 5 — full inventory of what HyperFrames can do (24 sections). Scan the TOC during the brief, deep-dive specific sections during build |
-| [step-3-storyboard.md](references/step-3-storyboard.md) | Step 3 — storyboard + script (combined) with user review gate |
-| [step-4-vo.md](references/step-4-vo.md) | Step 4 — TTS provider choice, generation, timing |
-| [step-5-build.md](references/step-5-build.md) | Step 5 — build index.html + compositions |
-| [step-6-validate.md](references/step-6-validate.md) | Step 6 — lint, validate, snapshots (scaled to video length), preview |
-| [techniques.md](../hyperframes/references/techniques.md) | Steps 3 & 5 — 13 primitive animation techniques with code patterns (adapt, don't copy-paste) |
-| [html-in-canvas-patterns.md](../hyperframes/references/html-in-canvas-patterns.md) | Step 5 — complete code patterns for HTML-in-Canvas effects (lives in the hyperframes skill) |
diff --git a/skills/website-to-video/assets/sfx/CREDITS.md b/skills/website-to-video/assets/sfx/CREDITS.md
deleted file mode 100644
index 750d6e8393..0000000000
--- a/skills/website-to-video/assets/sfx/CREDITS.md
+++ /dev/null
@@ -1,35 +0,0 @@
-# SFX Credits
-
-All sound effects in this directory are sourced from [Pixabay](https://pixabay.com/sound-effects/) and used under the [Pixabay Content License](https://pixabay.com/service/license-summary/).
-
-The Pixabay license allows free use for commercial and non-commercial purposes without attribution, but attribution is appreciated and given here for transparency.
-
-## Files
-
-The following `.mp3` files are bundled with this skill:
-
-- `chime.mp3`
-- `click.mp3` / `click-soft.mp3`
-- `error.mp3`
-- `glitch-1.mp3` / `glitch-2.mp3` / `glitch-3.mp3`
-- `impact-bass-1.mp3` / `impact-bass-2.mp3`
-- `key-press.mp3`
-- `notification.mp3`
-- `ping.mp3`
-- `pop.mp3`
-- `riser.mp3`
-- `sparkle.mp3`
-- `typing.mp3`
-- `whoosh.mp3` / `whoosh-short.mp3` / `whoosh-cinematic.mp3`
-
-See `manifest.json` for per-file metadata (duration, energy character, recommended use).
-
-## License
-
-All files are distributed under the [Pixabay Content License](https://pixabay.com/service/license-summary/), which permits:
-
-- Commercial and non-commercial use
-- Modification and remixing
-- Redistribution as part of derivative works (such as videos rendered with HyperFrames)
-
-without any attribution requirement.
diff --git a/skills/website-to-video/assets/sfx/chime.mp3 b/skills/website-to-video/assets/sfx/chime.mp3
deleted file mode 100644
index 12da953a35..0000000000
Binary files a/skills/website-to-video/assets/sfx/chime.mp3 and /dev/null differ
diff --git a/skills/website-to-video/assets/sfx/click-soft.mp3 b/skills/website-to-video/assets/sfx/click-soft.mp3
deleted file mode 100644
index 2706b1d2ea..0000000000
Binary files a/skills/website-to-video/assets/sfx/click-soft.mp3 and /dev/null differ
diff --git a/skills/website-to-video/assets/sfx/click.mp3 b/skills/website-to-video/assets/sfx/click.mp3
deleted file mode 100644
index 2706b1d2ea..0000000000
Binary files a/skills/website-to-video/assets/sfx/click.mp3 and /dev/null differ
diff --git a/skills/website-to-video/assets/sfx/error.mp3 b/skills/website-to-video/assets/sfx/error.mp3
deleted file mode 100644
index 6b4487ff46..0000000000
Binary files a/skills/website-to-video/assets/sfx/error.mp3 and /dev/null differ
diff --git a/skills/website-to-video/assets/sfx/glitch-1.mp3 b/skills/website-to-video/assets/sfx/glitch-1.mp3
deleted file mode 100644
index 124f450194..0000000000
Binary files a/skills/website-to-video/assets/sfx/glitch-1.mp3 and /dev/null differ
diff --git a/skills/website-to-video/assets/sfx/glitch-2.mp3 b/skills/website-to-video/assets/sfx/glitch-2.mp3
deleted file mode 100644
index 580b6fdc4f..0000000000
Binary files a/skills/website-to-video/assets/sfx/glitch-2.mp3 and /dev/null differ
diff --git a/skills/website-to-video/assets/sfx/glitch-3.mp3 b/skills/website-to-video/assets/sfx/glitch-3.mp3
deleted file mode 100644
index 5a8adc2442..0000000000
Binary files a/skills/website-to-video/assets/sfx/glitch-3.mp3 and /dev/null differ
diff --git a/skills/website-to-video/assets/sfx/impact-bass-1.mp3 b/skills/website-to-video/assets/sfx/impact-bass-1.mp3
deleted file mode 100644
index ecfe0c48a6..0000000000
Binary files a/skills/website-to-video/assets/sfx/impact-bass-1.mp3 and /dev/null differ
diff --git a/skills/website-to-video/assets/sfx/impact-bass-2.mp3 b/skills/website-to-video/assets/sfx/impact-bass-2.mp3
deleted file mode 100644
index 4ae448b58a..0000000000
Binary files a/skills/website-to-video/assets/sfx/impact-bass-2.mp3 and /dev/null differ
diff --git a/skills/website-to-video/assets/sfx/key-press.mp3 b/skills/website-to-video/assets/sfx/key-press.mp3
deleted file mode 100644
index d669006e01..0000000000
Binary files a/skills/website-to-video/assets/sfx/key-press.mp3 and /dev/null differ
diff --git a/skills/website-to-video/assets/sfx/manifest.json b/skills/website-to-video/assets/sfx/manifest.json
deleted file mode 100644
index dd2423025f..0000000000
--- a/skills/website-to-video/assets/sfx/manifest.json
+++ /dev/null
@@ -1,97 +0,0 @@
-{
- "chime": {
- "file": "chime.mp3",
- "duration": 2.5,
- "description": "This is a soft, melodic chime sound effect perfect for signaling a gentle transition or a lighthearted moment in a video."
- },
- "click-soft": {
- "file": "click-soft.mp3",
- "duration": 0.37,
- "description": "This is a smooth, medium-energy swoosh sound effect, perfect for transitioning between two scenes or highlighting a sleek reveal."
- },
- "click": {
- "file": "click.mp3",
- "duration": 0.37,
- "description": "This is a sharp, medium-energy digital \"whoosh\" effect that works perfectly for a quick transition between video clips."
- },
- "error": {
- "file": "error.mp3",
- "duration": 1.62,
- "description": "This is a sharp, medium-energy digital glitch sound that serves as an effective, abrupt transition for a video cut or error screen."
- },
- "glitch-1": {
- "file": "glitch-1.mp3",
- "duration": 2.64,
- "description": "This is a high-energy, distorted digital impact sound effect that works perfectly for a sudden reveal or a punchy transition in a fast-paced edit."
- },
- "glitch-2": {
- "file": "glitch-2.mp3",
- "duration": 3.5,
- "description": "This is a harsh, distorted digital glitch effect with high energy that serves as a jarring transition or a chaotic digital reveal."
- },
- "glitch-3": {
- "file": "glitch-3.mp3",
- "duration": 3.1,
- "description": "This is a low-energy, subtle electronic click sound effect that works well as a minimal audio transition or a UI element for a subtle selection reveal."
- },
- "impact-bass-1": {
- "file": "impact-bass-1.mp3",
- "duration": 2.12,
- "description": "This is a medium-energy, sharp electronic chime that works perfectly as an accent for a quick transition or a brief, high-tech visual reveal."
- },
- "impact-bass-2": {
- "file": "impact-bass-2.mp3",
- "duration": 2.59,
- "description": "This sound effect is a shimmering, ethereal synth riser with a medium energy level, perfect for creating anticipation before a magical transition or reveal."
- },
- "key-press": {
- "file": "key-press.mp3",
- "duration": 0.4,
- "description": "This is a medium-energy, distorted digital impact sound effect that works well for a sudden glitch transition or a glitchy text reveal."
- },
- "notification": {
- "file": "notification.mp3",
- "duration": 2.46,
- "description": "This is a medium-energy, whimsical digital transition sound effect that fits perfectly with a playful visual reveal or a cute UI interaction."
- },
- "ping": {
- "file": "ping.mp3",
- "duration": 1.32,
- "description": "This is a medium-energy, sharp electronic impact sound that works perfectly for punchy transitions or highlighting key on-screen reveals."
- },
- "pop": {
- "file": "pop.mp3",
- "duration": 0.72,
- "description": "This is a medium-energy, metallic clinking sound that works perfectly as an accent or a subtle impact for a precise visual reveal or UI element."
- },
- "riser": {
- "file": "riser.mp3",
- "duration": 10.03,
- "description": "This is a high-energy cinematic air whoosh transition that builds tension before suddenly cutting, making it perfect for a dramatic scene change or a quick reveal."
- },
- "sparkle": {
- "file": "sparkle.mp3",
- "duration": 1.8,
- "description": "This is a bright, high-energy \"whoosh\" transition sound with a fast, ascending pitch that is perfect for a rapid scene change or a quick reveal."
- },
- "typing": {
- "file": "typing.mp3",
- "duration": 1.5,
- "description": "This is a hard, high-pitched \"ding\" sound that works well as an accent for a reveal or a quick transition."
- },
- "whoosh-cinematic": {
- "file": "whoosh-cinematic.mp3",
- "duration": 5.54,
- "description": "This is a medium-energy, cinematic whoosh effect, ideal for smooth scene transitions or emphasizing a quick reveal."
- },
- "whoosh-short": {
- "file": "whoosh-short.mp3",
- "duration": 0.57,
- "description": "This is a medium-energy, organic wooden texture sound effect that works well as a subtle transition or a background accent."
- },
- "whoosh": {
- "file": "whoosh.mp3",
- "duration": 0.57,
- "description": "This is a hard, metallic impact sound effect that works well for a sudden reveal or a punchy transition."
- }
-}
diff --git a/skills/website-to-video/assets/sfx/notification.mp3 b/skills/website-to-video/assets/sfx/notification.mp3
deleted file mode 100644
index d3f0d1fa22..0000000000
Binary files a/skills/website-to-video/assets/sfx/notification.mp3 and /dev/null differ
diff --git a/skills/website-to-video/assets/sfx/ping.mp3 b/skills/website-to-video/assets/sfx/ping.mp3
deleted file mode 100644
index 99808c8b63..0000000000
Binary files a/skills/website-to-video/assets/sfx/ping.mp3 and /dev/null differ
diff --git a/skills/website-to-video/assets/sfx/pop.mp3 b/skills/website-to-video/assets/sfx/pop.mp3
deleted file mode 100644
index e3ed16fef0..0000000000
Binary files a/skills/website-to-video/assets/sfx/pop.mp3 and /dev/null differ
diff --git a/skills/website-to-video/assets/sfx/riser.mp3 b/skills/website-to-video/assets/sfx/riser.mp3
deleted file mode 100644
index 0cea32c08d..0000000000
Binary files a/skills/website-to-video/assets/sfx/riser.mp3 and /dev/null differ
diff --git a/skills/website-to-video/assets/sfx/sparkle.mp3 b/skills/website-to-video/assets/sfx/sparkle.mp3
deleted file mode 100644
index dae37802ff..0000000000
Binary files a/skills/website-to-video/assets/sfx/sparkle.mp3 and /dev/null differ
diff --git a/skills/website-to-video/assets/sfx/typing.mp3 b/skills/website-to-video/assets/sfx/typing.mp3
deleted file mode 100644
index ff69cc0420..0000000000
Binary files a/skills/website-to-video/assets/sfx/typing.mp3 and /dev/null differ
diff --git a/skills/website-to-video/assets/sfx/whoosh-cinematic.mp3 b/skills/website-to-video/assets/sfx/whoosh-cinematic.mp3
deleted file mode 100644
index 93b7218007..0000000000
Binary files a/skills/website-to-video/assets/sfx/whoosh-cinematic.mp3 and /dev/null differ
diff --git a/skills/website-to-video/assets/sfx/whoosh-short.mp3 b/skills/website-to-video/assets/sfx/whoosh-short.mp3
deleted file mode 100644
index e23e513d27..0000000000
Binary files a/skills/website-to-video/assets/sfx/whoosh-short.mp3 and /dev/null differ
diff --git a/skills/website-to-video/assets/sfx/whoosh.mp3 b/skills/website-to-video/assets/sfx/whoosh.mp3
deleted file mode 100644
index e23e513d27..0000000000
Binary files a/skills/website-to-video/assets/sfx/whoosh.mp3 and /dev/null differ
diff --git a/skills/website-to-video/references/beat-builder-guide.md b/skills/website-to-video/references/beat-builder-guide.md
deleted file mode 100644
index 81c7349fff..0000000000
--- a/skills/website-to-video/references/beat-builder-guide.md
+++ /dev/null
@@ -1,263 +0,0 @@
-# Beat Builder Guide
-
-You are building ONE beat of a multi-beat video composition. This file tells you what to read, how to build, how to verify, and how to report back.
-
-## Step 1: Read and understand
-
-**Required (every beat):**
-
-1. **Load the `hyperframes` skill** — composition rules, data attributes, timeline contract, deterministic rendering. Read the whole skill.
-2. **[capabilities.md](capabilities.md)** — full inventory of HyperFrames capabilities (24 sections). Read the Table of Contents first, then deep-dive sections your beat needs.
-3. **The beat spec** the main agent gave you — concept, choreography, assets, brand values, timing.
-
-**Read based on what your beat needs (pick relevant ones):**
-
-| Resource | What it covers | Read when |
-| ------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------- |
-| [techniques.md](../../hyperframes/references/techniques.md) | 13 primitive animation techniques: SVG path drawing, Canvas 2D, CSS 3D, kinetic type, variable fonts, MotionPath, etc. | Beat uses any of these techniques |
-| [text-effects.md](../../hyperframes/references/text-effects.md) | 24 named text animations from `pixel-point/animate-text` (separate skill — load via `/animate-text` for specs) | Beat has text animation |
-| [html-in-canvas-patterns.md](../../hyperframes/references/html-in-canvas-patterns.md) | HTML-in-Canvas: iPhone/MacBook mockups, liquid glass, magnetic, portal, shatter, text cursor | Beat uses device mockups or WebGL effects on HTML |
-| [transitions.md](../../hyperframes/references/transitions.md) | Shader transition API, HyperShader.init() pattern, all 14 WebGL shaders | Beat has shader transitions |
-| [transitions/](../../hyperframes/references/transitions/) | 14 CSS transition category files: push, scale, dissolve, blur, 3D flip, light leak, distortion, grid, mechanical, destruction | Beat uses CSS transitions |
-| [css-patterns.md](../../hyperframes/references/css-patterns.md) | Text markers: highlight sweeps, hand-drawn circles, burst lines, scribble, sketchout | Beat uses text emphasis/markers |
-| [audio-reactive.md](../../hyperframes/references/audio-reactive.md) | Bass→scale, mid→shape, treble→glow mappings | Beat reacts to music/audio |
-| [captions.md](../../hyperframes/references/captions.md) | Per-word karaoke, tone-adaptive styling, positioning | Beat includes captions |
-| [typography.md](../../hyperframes/references/typography.md) | Font hierarchy, variable fonts, responsive type scaling | Beat has complex typography |
-| [motion-principles.md](../../hyperframes/references/motion-principles.md) | Velocity matching, easing philosophy, motion continuity | Beat needs polished motion design |
-| [dynamic-techniques.md](../../hyperframes/references/dynamic-techniques.md) | Counter animations, data-driven visuals, dynamic content | Beat has counters or data visualization |
-| [video-composition.md](../../hyperframes/references/video-composition.md) | Frame composition, color presence, scale, density rules | General composition quality |
-
-**Other skills you can load if needed:**
-
-- `/gsap` or `/gsap-core`, `/gsap-timeline`, `/gsap-plugins` — deeper GSAP reference
-- `/animate-text` — curated text animation catalog with exact JSON specs
-- `/hyperframes-registry` — if you need to install and wire registry blocks
-- `/hyperframes-contrast` — audit color contrast (WCAG)
-- `/lottie`, `/three`, `/waapi`, `/animejs`, `/css-animations` — if beat uses these engines
-
-**Always open the captured assets folder before designing the beat:**
-
-- `capture/assets/svgs/` — brand logos, icons, decorative marks. SVGs are infinitely scalable and stroke-animatable (path drawing, dash offset). A logo SVG drawing itself onto frame can carry an entire beat.
-- `capture/assets/` — hero illustrations, screenshots, product art, gradients, photography. These are first-class beat subjects, not background decoration. A breathing hero illustration with a single line of kinetic type is a complete shot.
-- VIEW every image before placing text on it. Check safe zones, contrast, actual content, where the focal point sits.
-
-**If your beat spec names a captured asset, USE it.** Don't substitute a CSS recreation. The user captured these from the real brand site precisely so the video carries the brand's actual visual identity.
-
-## Step 2: Build the composition
-
-Save to the path the main agent specified (usually `compositions/beat-N-name.html`).
-
-```html
-<template>
- <style>
- * {
- margin: 0;
- padding: 0;
- box-sizing: border-box;
- }
- /* your styles */
- </style>
-
- <div
- id="beat-N-name"
- data-composition-id="beat-N-name"
- data-width="1920"
- data-height="1080"
- style="width:1920px; height:1080px; position:relative; overflow:hidden; background:#YOUR_BG;"
- >
- <!-- your elements -->
- </div>
-
- <script>
- (function () {
- var BEAT = 5.5; // MUST match data-duration on the host div in index.html
- window.__timelines = window.__timelines || {};
- var tl = gsap.timeline({ paused: true });
-
- // your GSAP animations
-
- window.__timelines["beat-N-name"] = tl;
- })();
- </script>
-</template>
-```
-
-**Critical:** `data-composition-id`, `data-width`, `data-height` on the root div MUST match the host div in index.html.
-
-## Step 3: Lint
-
-```bash
-npx hyperframes lint .
-```
-
-Fix ALL errors. Zero errors required.
-
-## Step 4: Snapshot and verify
-
-```bash
-npx hyperframes snapshot . --frames 3
-```
-
-**READ the contact sheet** (`snapshots/contact-sheet.jpg`). For each frame:
-
-- Is content visible? (not black, blank, or loading)
-- Is text readable, properly positioned, correct font/color?
-- Are assets at the right size and position?
-- Does the animation state match the beat spec at this timestamp?
-
-**If anything is wrong:** fix, re-snapshot, re-check. You are done ONLY when every frame matches the spec.
-
-## Step 5: Report back honestly
-
-After lint passes, snapshots are taken, and you've fixed every issue you saw — report back to the main agent with concrete observations. Not "0 errors, looks good." That phrasing is what got prior videos shipped with mismatched brand colors, missing logos, and headlines too small to read.
-
-**The main agent will OPEN your composition file and read it top-to-bottom** to cross-check against DESIGN.md and STORYBOARD.md — does the brand bg/accent hex actually appear in your CSS, are the captured assets the storyboard called for actually referenced, is the headline ≥80px, does the GSAP timeline cover the full beat duration. You cannot pass that check by claiming things you didn't do; the file is on disk, the truth is in the file.
-
-So in your report, name the hex codes you used, the captured asset paths you placed, the headline `font-size`, and the GSAP timeline's last `tl.fromTo(...)` timestamp. Brief, concrete, true. If anything diverges from DESIGN.md or the storyboard, say so explicitly — the main agent can decide whether to accept the divergence or send you back to fix it. Surprises caught at this hand-off cost minutes; surprises caught at Step 6 cost iterations.
-
-### FLAG protocol — required phrasing for non-blocking issues
-
-When you find any of these, surface them as **FLAGS** in your report, not as conditional suggestions:
-
-- Visual states that briefly look broken (empty containers, hanging elements, gap moments)
-- Spec ambiguities you had to resolve by guessing
-- Linter bugs you worked around
-- Tween values you changed from the spec because they wouldn't fit
-
-**Forbidden phrasing:** "if the X feels too long, you could...", "consider tweaking Y", "might want to..."
-
-**Required phrasing — concrete, actionable, with line numbers:**
-
-```
-FLAG: at beat-local t=1.2s the doc card is visible but its inner content is still
- opacity 0 — a 0.4s empty-panel window.
- RECOMMENDED FIX: pull title typewriter from 1.6s → 1.4s
- in compositions/beat-5-name.html line 234.
-```
-
-The main agent MUST EITHER apply each FLAG's fix OR write a one-sentence rejection with reason. Silently dropping a FLAG is a verification failure that gets caught at Step 6 (or worse, in the user's preview).
-
-### Spec ambiguity — escalate, don't paper over
-
-If STORYBOARD.md gives you a transition or transformation but doesn't establish the **start** state, do NOT guess. Examples of ambiguity worth flagging:
-
-- "Row 1 transitions from Huly Blue to Huly Orange at 3.5s" — but Row 1's initial color isn't specified
-- "Headline grows" — but the start size isn't specified
-- "Cards slide in" — but the off-screen position isn't specified
-- "Subhead appears after the headline" — but exact timing offset isn't specified
-
-**Required action:** FLAG the ambiguity in your report verbatim:
-
-```
-FLAG: STORYBOARD.md beat 3 says "Row 1 transitions blue → orange at 3.5s" but
- Row 1's initial color is not specified anywhere. I interpreted Row 1 starts
- blue and tweened to orange. CONFIRM or correct.
-```
-
-The main agent then confirms or corrects before Step 6 advances. Picking an interpretation silently means the build looks "fine" while diverging from intent — and the user only notices in motion.
-
-### Sub-agent diagnoses are unverified claims, not facts
-
-When a sub-agent reports "this is a linter false positive" / "this is a known bug" / "this attribute doesn't work as documented" — those are HYPOTHESES, not findings. Sub-agents diagnose from one symptom; they don't have repo-wide context.
-
-Before propagating any sub-agent diagnosis (e.g., applying the same "workaround" to another beat, or telling the user "this is a known bug"), do ONE of:
-
-1. **Verify by reading the source.** Open the file the sub-agent claims is buggy. Confirm the bug exists. Example: "I read `packages/core/src/lint/utils.ts:42` and confirmed the regex matches `url(\"data:image/svg+xml...\")` incorrectly. The workaround is to base64-encode the URI."
-2. **Disclose the unverified claim.** Don't suppress it — surface it. Example: "Sub-agent for beat 2 diagnosed `root_missing_composition_id` as a linter false positive on inline SVG data URIs. I applied the same workaround to beat 4 WITHOUT verifying the underlying claim. Worth filing as a regression against `packages/core/src/lint/utils.ts` to confirm."
-
-**Forbidden:** silently adopting the workaround pattern and presenting "lint passes" as evidence. If the workaround came from an unverified diagnosis, "lint passes because the diagnosis was correct AND I worked around it" and "lint passes because the diagnosis was wrong but the workaround happened to make the symptom disappear" are both possible. Without verification, you don't know which. The next session inherits the workaround AND the unverified diagnosis.
-
-### When you accept a sub-agent's divergence from spec — UPDATE the spec
-
-If a sub-agent reports "I diverged from STORYBOARD.md because..." AND you accept the divergence, you MUST update STORYBOARD.md to reflect the actual implementation. Otherwise the spec lies about the artifact.
-
-Examples:
-
-- Sub-agent: "Storyboard says 'HULY' uppercase but the actual logo asset is lowercase 'huly'. I used lowercase." Accept → edit STORYBOARD.md beat N to say "huly" lowercase. Note the change inline.
-- Sub-agent: "Storyboard says cells at 56px but they read too small at 1920×1080. I used 96px." Accept → edit STORYBOARD.md beat N's cell size to 96px.
-- Sub-agent: "Storyboard says SFX at t=4.7s but the visual moment lands at t=5.2s; I aligned SFX to the visual." Accept → edit STORYBOARD.md SFX line to t=5.2s.
-
-**Forbidden:** accepting the divergence silently and leaving the storyboard with the wrong spec. The next session reading STORYBOARD.md will trust it as ground truth. The spec is a contract; if you break the contract, update the contract.
-
----
-
-## Continuous motion — the most important rule
-
-A beat is a SHOT in a film, not a webpage with entrance animations. Your GSAP timeline should have events spread across the ENTIRE beat duration — not just entrance tweens in the first 1-2 seconds followed by nothing. If an element is on screen, it should be doing something. After elements enter, add continuous hold motion: camera dolly, parallax layers moving at different speeds, secondary elements appearing mid-beat, real depth shifts.
-
-## You are building a SHOT, not a webpage
-
-The storyboard tells you the shot framing (close-up / medium / wide / etc.) and the camera move. Implement them. A beat is a moment, not a screenshot. The distinction is **what the camera is doing**, not whether the subject is a UI element or a logo — a tight push-in on a real product screenshot is a shot; a centered card on a parked camera is a webpage.
-
-**Patterns that turn a shot back into a webpage:**
-
-These are defaults to avoid, **not absolute prohibitions.** If the storyboard genuinely calls for "the kanban app interface" or "the browser chrome" as the subject of a specific beat (a product tour, a "this is how it works" demo, a stylized window mockup for the closer), then build it. The rule is: don't reach for these patterns by default when the storyboard didn't ask for them.
-
-- ⚠ **macOS / browser window chrome reproduced in CSS** — traffic-light dots, URL bars, browser tabs. Fine when the storyboard makes the chrome the subject (e.g. "stylized macOS window framing the product UI" for a closer). NOT fine when it's a frame you added around a card "to make it look like an app."
-- ⚠ **Full webpage layout** (sidebar + header + footer + main content area) — fine when the beat is genuinely a product tour shot. NOT fine when the beat was supposed to be about _the kanban moment_ and you defaulted to drawing the whole app around it.
-- ❌ **Parked-camera composition** — centered card with 60–120px margins on all sides and no camera move. Almost always wrong. Either give it a real push-in / dolly / parallax, or reframe.
-- ❌ **"Hold with breathing"** implemented as `y: ±1–2px` or `scale: 1.01` — invisible at 1920×1080+ scale. If continuous motion is required, use camera dolly (scale 1.0 → 1.05), parallax pan (x/y ±30–80px), or progressive reveals.
-- ❌ **Hover-state simulations** — videos have no hover. If the brand uses hover effects, show the BEFORE and AFTER as discrete frames in the timeline.
-- ❌ **Counter pulses + dot pulses + tiny scale wobbles** as the only motion during the hold — these are "I ran out of ideas" filler.
-
-The test: if the storyboard says _"this beat is the product tour, viewer sees the app interface"_, building a CSS dashboard with chrome is correct. If the storyboard says _"this beat is the kanban moment, single card sliding home"_, drawing the full app around it is wrong. Read the beat spec carefully.
-
-**Patterns that ARE shots (do these freely):**
-
-- ✅ **Captured SVG logo drawing itself stroke-by-stroke** (DrawSVG / path dashoffset) — a complete opener or stinger.
-- ✅ **Captured hero illustration with camera dolly** — push-in from 1.0 → 1.08 over 4s, focal element holds frame.
-- ✅ **Captured product screenshot with parallax layers** — separate the foreground UI from background panels and move them at different speeds, or use HTML-in-Canvas for an iPhone/MacBook mockup.
-- ✅ **Captured asset as the bed, kinetic type as the punchline** — the brand's hero image holds the frame while a one-line message arrives, splits, reflows.
-- ✅ **Composed-from-divs UI moment** when the beat is specifically about that UI's interaction (a card sliding into a column, a search result resolving) — this is the legit case for CSS-only composition.
-
-**Required motion magnitudes** (anything smaller is invisible at video scale):
-
-| Motion type | Minimum magnitude |
-| --------------- | ------------------------------------------- |
-| Translate (y/x) | 30px (entrance) / 8px (drift during hold) |
-| Scale | 0.05 change (1.0 → 1.05 or larger) |
-| Opacity | full 0 → 1 or vice versa for reveals |
-| Rotate | 4° minimum to read (Dutch angles, ticks) |
-| Camera dolly | scale 1.0 → 1.06 minimum over beat duration |
-
-**Required cinematography per beat** (the storyboard should give you these; if it doesn't, escalate):
-
-- A **shot type** (close-up / medium / wide / over-the-shoulder / Dutch)
-- A **camera move** (dolly in/out, push, parallax pan, orbit, rack focus)
-- A **depth strategy** (what's foreground / midground / background)
-- A **purpose** (what specific feeling or noticing the shot delivers)
-
-If any are missing from the beat spec, the beat is under-defined. Don't fill the gap with "centered layout + breathing" — re-read the spec, and if it's genuinely missing, ask the main agent.
-
-## Rules
-
-- SCRIPT PLACEMENT: scripts inside `<template>`, never after `</template>`. Scripts outside see no DOM.
-- GSAP FROM TRAP: never `gsap.from(el, {opacity:0})` with CSS `opacity:0`. It animates 0→0. Use `tl.fromTo()`.
-- STYLE: avoid CSS `opacity:0` on GSAP-animated elements. Use GSAP fromTo for initial states.
-- ASSET PATHS: project-root-relative. `capture/assets/file.png` ✅ `../capture/assets/file.png` ❌
-- SVG VIA IMG: `<img src="logo.svg">` can't inherit CSS color. Inline SVG or `filter: brightness(0) invert(1)`.
-- CSS CENTERING: no `transform: translate(-50%, -50%)` with GSAP transforms. Use flexbox or `xPercent/yPercent`.
-- QUERYSELECTOR: `document.getElementById("id")` with null guards. No method calls without null check.
-- CHARACTER SPANS: `display:inline-block` on spaces collapses them. Use `&nbsp;` or per-word spans.
-- COUNTERS: no `onUpdate` for numeric counters — use discrete `tl.set(el, {textContent: "42"}, 2.5)` at timestamps. `onUpdate` and `tl.call()` ARE supported for canvas/WebGL rendering loops and character-by-character typing — see capabilities.md §10.
-- TIMELINE: `window.__timelines["beat-N-name"] = tl` synchronously. Key = `data-composition-id`.
-- DETERMINISTIC: no `Math.random()`, `Date.now()`, `requestAnimationFrame`, `repeat:-1`.
-- Always `tl.fromTo()` not `tl.from()` for entrances.
-- Never stack two transform tweens on same element at same time.
-- FONTS: copy the `@font-face` block VERBATIM from DESIGN.md's Fonts section. Do NOT guess which `.woff2` file belongs to which family — capture filenames are content-hashed (`14d7ce3e41dcbb66-s.p.woff2`) and there is no visible mapping. If DESIGN.md doesn't include exact `src:` paths per family, STOP and ask the main agent to add them; never pair an arbitrary `.woff2` file with a family name from memory.
-
-## Easing — pick per intent
-
-Do NOT default to `power2.out` on everything.
-
-| Intent | GSAP Ease | Use for |
-| --------------- | --------------------- | ------------------------------------ |
-| Snap (iOS feel) | `power4.out` | Hero text, UI elements |
-| Whip overshoot | `back.out(1.7)` | Numbers, badges, impact |
-| Soft land | `expo.out` | Per-word reveals, gentle entrances |
-| Mechanical | `power1.out` | Terminal text, code typing |
-| Bounce settle | `elastic.out(1, 0.5)` | Counters, CTA buttons |
-| Dramatic | `expo.inOut` | Full-screen statements, hero reveals |
-| Drift | `"none"` | Parallax, Ken Burns, camera drift |
-
-Staggered items: `power4.out` with `stagger: 0.08` to `0.15`.
diff --git a/skills/website-to-video/references/capabilities.md b/skills/website-to-video/references/capabilities.md
deleted file mode 100644
index f70e0e738e..0000000000
--- a/skills/website-to-video/references/capabilities.md
+++ /dev/null
@@ -1,713 +0,0 @@
-# HyperFrames — Complete Capabilities Inventory
-
-Everything possible in HyperFrames as of today's workspace, synthesized from direct source reads of all 7 packages, 16 skills, and the full registry.
-
-> **How to read this file.** Scan the **Table of Contents** below first. **Do NOT read this file linearly** — it is a 700+ line inventory; reading top-to-bottom every session wastes context. When the storyboard or a specific beat needs a particular capability (HTML-in-Canvas, shader transitions, audio-reactive, dynamic counters, etc.), jump straight to that section.
-
-You are NOT limited to what was captured from the website. You can create shaders from scratch, search for and download registry blocks, build Three.js scenes, write custom WebGL effects, use any web API — anything a browser can render.
-
-For implementation patterns (working code), see `techniques.md`. This file is the WHAT; techniques.md is the HOW.
-
-## Essential Rules
-
-- **Deterministic:** No `Math.random()`, no `Date.now()`, no `requestAnimationFrame`, no `repeat: -1`. The render engine seeks to exact timestamps.
-- **Timeline contract:** `window.__timelines["composition-id"] = tl` must be set synchronously. The timeline length defines the composition duration.
-- **Sub-compositions:** External `.html` files loaded via `data-composition-src`. Auto-nested timelines, scoped CSS, scoped scripts.
-- **Linter:** 60+ rules. Run `npx hyperframes lint` before render. Catches missing timelines, overlapping clips, broken paths, GSAP errors.
-
-## Table of Contents
-
-| # | Section | What it covers |
-| --- | ---------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| 1 | **Composition fundamentals** | Data attributes, timeline contract, resolution presets (1080p, 4K, portrait, square, custom) |
-| 2 | **Animation engines (6 adapters)** | GSAP + 15 plugins, Anime.js v4, CSS @keyframes, WAAPI, Lottie (lottie-web + dotlottie), Three.js (hf-seek event) |
-| 3 | **Shader transitions (14 WebGL)** | domain-warp, ridged-burn, whip-pan, sdf-iris, ripple-waves, gravitational-lens, cinematic-zoom, chromatic-split, swirl-vortex, thermal-distortion, flash-through-white, cross-warp-morph, light-leak, glitch — plus custom GLSL |
-| 4 | **CSS scene transitions (30+)** | Push/slide, scale/zoom, radial/clip, 3D flip, blur, dissolve, cover/blinds, light leak/burn, distortion/glitch, mechanical/shutter, grid dissolve, destruction/burn, VHS/gravity/morph — 6 timing presets |
-| 5 | **Visual effects + textures** | Text markers (highlight, circle, burst, scribble, sketchout), grain/noise, light leaks, film burn, vignette, glow, paper texture, shimmer sweep |
-| 6 | **Caption techniques** | Per-word karaoke, intensity tiers, 5 exit styles, 6 tone mappings, per-word styling triggers, 7 audio source formats, positioning helpers |
-| 7 | **Audio-reactive animation** | Bass→scale, mid→shape, treble→glow; any GSAP property; band extraction script; banned patterns |
-| 8 | **HTML-in-canvas** | Live DOM as GPU texture (drawElementImage), Three.js planes, WebGL shaders on HTML, 7 VFX blocks (iPhone/MacBook device, liquid, glass, magnetic, portal, shatter, text cursor) |
-| 9 | **Three.js / WebGL custom scenes** | Full 3D: AnimationMixer, custom GLSL, post-processing, GLTF models, lights, cameras, materials — all deterministic via hf-seek |
-| 10 | **SVG / canvas / variable fonts** | SVG path drawing, Canvas 2D procedural art, CSS 3D card, per-word type, variable font axes, character typing, velocity-matched cuts, MotionPath |
-| 11 | **Media: video, audio, TTS** | Video compositing + frame injection, audio mixer (multi-track), Kokoro TTS (54 voices, 9 languages), Whisper/Groq/OpenAI transcription, background removal (u2net) |
-| 12 | **Registry (51 blocks + 4 components + 8 examples)** | Social overlays (8), showcases (5), data viz (2), logo branding (1), 3D/VFX (7), shader transitions (14), transition galleries (13), components (grain, shimmer, pixelate, texture-mask), 8 starter examples |
-| 13 | **CLI (25 commands)** | init, add, catalog, play, preview, publish, render (MP4/WebM/MOV/PNG, HDR, GPU, parallel), lint, validate, inspect, snapshot, capture, tts, transcribe, remove-background, doctor, and more |
-| 14 | **Linter (60+ rules)** | Core, media, GSAP, captions, composition, adapters, textures, fonts — plus async URL checks |
-| 15 | **Player web component** | `<hyperframes-player>` with seek/play/pause API, 11 events, media mirror, runtime auto-inject |
-| 16 | **Engine + Producer** | MP4/WebM/MOV/PNG output, HDR (PQ/HLG), transparency (ProRes), GPU encoding (NVENC/VideoToolbox/VAAPI/QSV), parallel rendering, video frame injection |
-| 17 | **Studio (in-browser NLE)** | Timeline editor, drag/resize clips, asset browser, render queue, lint modal, caption editor, element picker |
-| 18 | **Determinism guarantees** | No Math.random, no Date.now, no RAF, no repeat:-1, no callbacks, synchronous construction |
-| 19 | **Variables / parameterization** | Typed runtime variables (string, color, number, boolean, enum), CLI override, strict validation |
-| 20 | **Sub-compositions** | External file or inline template, auto-nested timelines, scoped CSS, scoped scripts, variable inheritance |
-| 21 | **Global runtime APIs** | 25+ window globals for timelines, player, variables, adapters, hooks |
-| 22 | **Skills (16)** | hyperframes, cli, media, registry, contrast, animation-map, website-to-video, remotion, gsap, animejs, css-animations, waapi, lottie, three, tailwind, contribute-catalog |
-| 23 | **References (15 docs)** | transitions, css-patterns, dynamic-techniques, motion-principles, typography, narration, captions, audio-reactive, transcript-guide, techniques, beat-direction, visual-styles, and more |
-| 24 | **Documentation (27 pages)** | Guides + package docs covering rendering, HDR, html-in-canvas, performance, prompting, troubleshooting, etc. |
-
----
-
-## 1. Composition fundamentals
-
-### Data attributes recognized by the runtime
-
-- **Root composition:** `data-composition-id`, `data-start`, `data-duration`, `data-width`, `data-height`, `data-composition-src` (external sub-comp), `data-composition-duration`, `data-composition-variables` (JSON), `data-variable-values` (override)
-- **Every clip:** `id`, `data-start`, `data-duration`, `data-track-index`, `class="clip"`, optional `data-media-start`, `data-volume`, `data-playback-start`
-- **Sub-composition host:** `data-composition-id`, `data-composition-src` OR inline `<template id="${compId}-template">`
-- **Parser also reads:** `data-type` (composition|text), `data-end`, `data-keyframes` (JSON), `data-x|y|scale|opacity`, `data-color|font-size|font-weight|font-family|text-shadow|outline|highlight*`, `data-layer` (z-index, deprecated for timeline but used for audio mixer layers), `data-resolution`, `data-composition-width|height`
-
-### Timeline contract
-
-- `gsap.timeline({ paused: true })` registered on `window.__timelines["<composition-id>"]`
-- Master clock (TransportClock + WebAudioTransport) drives the timeline via `tl.totalTime(t, false)` or `tl.seek(t, false)`
-- Framework auto-nests sub-comp timelines
-- Duration sourced from `data-duration` on root, not from GSAP length
-- Synchronous timeline construction required (no async/await/setTimeout)
-- Looping handled by `<hyperframes-player>`, not GSAP `repeat: -1`
-
-### Resolution presets
-
-VALID_CANVAS_RESOLUTIONS: 1920×1080 default, 1080×1920 portrait, 1080×1080 square, 4K, 1440×2560, plus `normalizeResolutionFlag` for `--resolution` CLI flag.
-
----
-
-## 2. Animation engines (6 deterministic frame adapters)
-
-The runtime registers these adapters in order; each implements `discover()` / `seek({time})` / `pause` / `play?` / `revert`:
-
-| Adapter | What it drives | How to load | Notable |
-| ---------------------------------- | ----------------------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- |
-| GSAP (createGsapAdapter) | The primary timeline + all tweens registered on `window.__timelines[<id>]` | CDN `https://cdn.jsdelivr.net/npm/[email protected]/dist/gsap.min.js` | Plugins via standard GSAP register; HyperFrames does NOT patch THREE.Clock (uses `__hfThreeTime` instead) |
-| Anime.js v4 (createAnimeJsAdapter) | Anime instances pushed to `window.__hfAnime` | CDN `[email protected]/lib/anime.iife.min.js` or ESM | Adapter multiplies composition seconds by 1000 for ms |
-| CSS animations (createCssAdapter) | Any element with computed `animation-name` | Declarative `@keyframes` | Falls back to negative `animation-delay` when WAAPI unavailable |
-| WAAPI (createWaapiAdapter) | All Animation objects on document | `element.animate()` | Uses `document.getAnimations()` |
-| Lottie (createLottieAdapter) | `window.__hfLottie` array; supports lottie-web + dotlottie-web | CDN `lottie.min.js` + `@lottiefiles/dotlottie-web` | `goToAndStop(time*1000)` or `setCurrentRawFrameValue` / `seek(%)` |
-| Three.js (createThreeAdapter) | `window.__hfThreeTime` + dispatches `CustomEvent("hf-seek", {detail:{time}})` | ESM CDN `[email protected]/+esm` | Composition's render loop listens to `hf-seek`; pattern: `mixer.setTime(time)` |
-
-### GSAP plugins (documented patterns)
-
-- **TextPlugin** — text mutation in `tl.call` (skills/gsap/references/effects.md)
-- **MotionPathPlugin** — curve-constrained tweens (skills/hyperframes/references/techniques.md)
-- **CustomEase** — bezier eases imported from Remotion-style timing
-- **ScrollTrigger / Flip / SplitText / Draggable / Inertia / Observer / ScrambleText / CustomWiggle / CustomBounce / ScrollSmoother / GSDevTools** — work natively if loaded and tweens are on the registered paused timeline, but no special HyperFrames adapter
-- Producer injects ScrollTrigger CDN automatically when needed (packages/producer/src/services/htmlCompiler.ts)
-
----
-
-## 3. Shader transitions — @hyperframes/shader-transitions
-
-14 named WebGL fragment shaders. All share the same uniforms: `u_from`, `u_to`, `u_progress`, `u_resolution`, `u_accent`, `u_accent_dark`, `u_accent_bright`.
-
-### The 14 shaders
-
-| Name | Visual | Notes |
-| ------------------- | -------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- |
-| domain-warp | Multi-octave FBM warps both scenes oppositely; organic dissolve edge with accent flash | Uses NQ noise bundle |
-| ridged-burn | Ridged multifractal mask reveals B; accent → bright → white burn ramp; sparks | NQ |
-| whip-pan | 10-sample horizontal motion blur + lateral crossfade | No noise |
-| sdf-iris | Aspect-corrected circle SDF expansion + accent-tinted glow rings | — |
-| ripple-waves | Radial standing-wave UV displacement + tinted crossfade | — |
-| gravitational-lens | Pinch pull toward center + R/B chromatic separation | — |
-| cinematic-zoom | 12 RGB-offset radial zoom blur samples (chromatic zoom streak) | — |
-| chromatic-split | R/B radial channel shift outward / inward; G fixed | Distinct from CSS chromatic aberration |
-| swirl-vortex | CCW swirl with FBM noise; reciprocal on incoming | NQ |
-| thermal-distortion | Vertical sin + FBM horizontal displacement; warm haze | NQ |
-| flash-through-white | Fade through white midpoint — a visible white flash between scenes | No accent. Use only when the brand specifically calls for a white-flash beat boundary; this is NOT a neutral "default" transition. |
-| cross-warp-morph | FBM vector field displaces both scenes; third FBM biases irregular wipe | NQ |
-| light-leak | Fixed off-frame leak with exponential falloff + accent warmth + ridge flare | Hard-coded leak anchor |
-| glitch | Line displacement + RGB lateral split + scan modulation + posterization + flicker | Deterministic |
-
-### Public API
-
-```js
-HyperShader.init({
- bgColor: "#0b0f14",
- accentColor: "#f59e42",
- scenes: ["scene1", "scene2"],
- transitions: [{ time: 3, shader: "sdf-iris", duration: 0.65, ease: "power2.inOut" }],
- timeline: gsap.timeline({ paused: true }),
- compositionId: "main",
- previewCaptureFps: 30,
-});
-```
-
-- Capability probe: `isHtmlInCanvasCaptureSupported()` (Chrome layoutSubtree/drawElementImage)
-- Tuning: `?__hf_shader_capture_scale=` (0.25–1), `?__hf_shader_loading=` (internal|player|none)
-- Cache: IndexedDB for PNG snapshots; max 2 textured transitions live at once
-- Fallback (`applyFallbackTransition`): smoothstep opacity tween when capture / texImage2D fails
-- Engine mode skips GL/capture when `window.__HF_VIRTUAL_TIME__` set (producer uses metadata)
-
-You can also **write custom GLSL shaders from scratch** — any fragment shader works with the standard uniforms.
-
----
-
-## 4. CSS scene transitions (30+ named patterns)
-
-Documented in skills/hyperframes/references/transitions/ across 14 category files. All GSAP-driven, none mixable with shader transitions in same composition.
-
-### By category
-
-| Category | Patterns |
-| -------------------------------- | ------------------------------------------------------------------------------------------------ |
-| Push / slide (css-push.md) | Push slide, vertical push, elastic push, squeeze |
-| Scale / zoom (css-scale.md) | Zoom through, zoom out, scale-up swap |
-| Radial / clip (css-radial.md) | Circle iris, diamond iris, diagonal split |
-| 3D (css-3d.md) | 3D card flip, hinge door |
-| Blur (css-blur.md) | Crossfade, blur crossfade, focus pull |
-| Dissolve (css-dissolve.md) | Color dip (gap-to-black), staggered color blocks (2-block, 5-block) |
-| Cover (css-cover.md) | Horizontal blinds, vertical blinds (variable strip counts: 6 / 12 / 20) |
-| Light (css-light.md) | Light leak overlays, overexposure burn, film burn |
-| Distortion (css-distortion.md) | Glitch (CSS — RGB layer jitter), chromatic aberration, ripple |
-| Mechanical (css-mechanical.md) | Shutter (two-half), clock wipe (9-point rotating wedge) |
-| Grid (css-grid.md) | Grid dissolve (12 or 120 cells), grid pixelate wipe |
-| Destruction (css-destruction.md) | Page burn (SVG clip-path + canvas char rim) |
-| Other (css-other.md) | VHS tape (strip-based seeded jitter), gravity drop, morph circle, blur through, directional blur |
-| Rejected | Star iris, tilt-shift, lens flare (don't use — non-CSS-realistic) |
-
-### Timing presets
-
-| Preset | duration | ease |
-| -------- | -------- | ---------------------- |
-| snappy | 0.2s | power4.inOut |
-| smooth | 0.4s | power2.inOut |
-| gentle | 0.6s | sine.inOut |
-| dramatic | 0.5s | power3.in → power3.out |
-| instant | 0.15s | expo.inOut |
-| luxe | 0.7s | power1.inOut |
-
----
-
-## 5. Visual effects + textures
-
-### Marker/emphasis patterns (css-patterns.md)
-
-| Mode | What it does | Implementation |
-| --------- | --------------------------------- | ----------------------------------------- |
-| highlight | Yellow bar wipes behind text | CSS bar + GSAP scaleX 0→1 |
-| circle | Hand-drawn red ring around word | CSS border ellipse + back.out scale |
-| burst | 12 radial spikes from word center | DOM line array, --len/--angle vars |
-| scribble | Wavy underline drawn over time | SVG `<path>` quadratic + stroke-dash GSAP |
-| sketchout | Cross-hatch x-out over text | Two 2px rotated lines |
-
-### Grain / noise
-
-- **grain-overlay** (registry component): SVG feTurbulence data-URL + CSS keyframe jitter, `steps(1)`, default opacity 0.15
-- **Layered radial-gradient grain** (preferred pattern): no SVG, no canvas-taint, fast everywhere
-
-### Light / film
-
-- Light leak transitions (CSS + shader variants)
-- Overexposure burn — `brightness()` ramp + flash overlay
-- Film burn — multi-layer amber/orange/red radials
-- Vignette — radial-gradient overlay
-- Paper texture (in registry/examples/warm-grain/)
-
-### Glow
-
-- Caption text glow: textShadow radius keyed to treble bands (always on active words only, never parents)
-- Radial glow backgrounds: CSS gradients / blurred blobs
-
----
-
-## 6. Caption techniques
-
-### Animation styles
-
-- Baseline: per-word karaoke highlight (every energy level)
-- Intensity tiers: accent + glow + 15% scale (high energy) → 3% scale (low energy)
-- Exits by energy (dynamic-techniques.md): scatter, drop, collapse, fade+slide, fade
-- Tone mappings (captions.md): scale-pop `back.out(1.7)`, fade+slide `power3.out`, typewriter, bounce, `elastic.out`, word-by-word
-
-### Per-word styling triggers
-
-- Brand/product names
-- ALL CAPS
-- Numbers / stats
-- Emotional keywords
-- CTAs
-- Marker highlight modes (5 listed above)
-
-### Audio sources for caption timing
-
-| Source | Format | Granularity |
-| ------------------------------------------ | -------- | ----------------- |
-| hyperframes transcribe (local whisper.cpp) | JSON | Word-level |
-| OpenAI verbose_json | JSON | Word-level |
-| Groq verbose_json | JSON | Word-level |
-| Manually authored | JSON | Word-level |
-| SRT | text | Phrase-level only |
-| VTT | text | Phrase-level only |
-| hyperframes tts → transcribe chain | wav→json | Word-level |
-
-### Positioning helpers
-
-- Landscape: bottom 80–120px centered
-- Portrait: ~600–700px from bottom
-- `window.__hyperframes.fitTextFontSize(text, {maxWidth, fontFamily, fontWeight})` for dynamic sizing
-
----
-
-## 7. Audio-reactive animation
-
-### Data shape
-
-```js
-window.AUDIO_DATA = {
- fps: 30,
- totalFrames: 900,
- frames: [{ bands: [0.42, 0.18, ...] }] // bands normalized 0–1 per band across track
-};
-```
-
-Index 0 = bass, higher = treble. Bands range 0–1, normalized across full track length.
-
-### Mappings documented
-
-| Band | Property |
-| --------------------- | ---------------------------- |
-| Bass (bands[0–1]) | scale (pulse) |
-| Mid (bands[4–8]) | borderRadius, width |
-| Treble (bands[12–14]) | textShadow, boxShadow (glow) |
-| Overall amplitude | opacity, y, backgroundColor |
-
-Any GSAP-tweenable property is fair game — including clipPath, filter, SVG attrs, CSS variables.
-
-### Extraction
-
-```bash
-python3 .../extract-audio-data.py audio.mp3 --fps 30 --bands 8
-```
-
-Pre-extracted only — no Web Audio at render time.
-
-### Banned in audio-reactive
-
-EQ bars, spectrum UI, generic waveforms, note clip-art, generic particles, rainbow cycling, white strobe on beats, abstract pulsing orbs.
-
----
-
-## 8. HTML-in-canvas
-
-Documented in skills/hyperframes/references/html-in-canvas-patterns.md (504 lines).
-
-### Capability
-
-- Chrome's experimental `layoutSubtree` + `drawElementImage` rasterizes live DOM into canvas
-- Feature detection: `isHtmlInCanvasCaptureSupported()`
-- Used by shader-transitions for scene textures
-- Combined with Three.js: `CanvasTexture` + post-processing
-
-### Available patterns
-
-- HTML on a Three.js plane (displacement, distortion, liquid sim)
-- HTML in shaders (texture sampling for VFX)
-- Recursive HTML-in-canvas-in-shader-in-HTML
-
-### Experimental VFX blocks using this
-
-- `vfx-iphone-device` (GLTF iPhone + MacBook, HTML screens)
-- `vfx-liquid-background` (liquid sim displaces HTML)
-- `vfx-liquid-glass`
-- `vfx-magnetic`
-- `vfx-portal`
-- `vfx-shatter`
-- `vfx-text-cursor` (chromatic edges, canvas post)
-
----
-
-## 9. Three.js / WebGL custom scenes
-
-### Integration pattern
-
-```js
-window.addEventListener("hf-seek", (e) => {
- const time = e.detail.time;
- mixer.setTime(time);
- shaderUniforms.u_time.value = time;
- renderer.render(scene, camera);
-});
-```
-
-- Load: `import * as THREE from "https://cdn.jsdelivr.net/npm/[email protected]/+esm"`
-- Deterministic: every frame must derive from `time`, never `requestAnimationFrame` / `Date.now()`
-- Includes: AnimationMixer, custom GLSL shaders, post-processing, GLTF models, lights, cameras, materials
-
----
-
-## 10. SVG / canvas / variable fonts (other authored techniques)
-
-(From skills/hyperframes/references/techniques.md)
-
-| Technique | Mechanism |
-| ------------------------ | ------------------------------------------------------------------------------------ |
-| SVG path drawing | `strokeDasharray` + `getTotalLength()` + GSAP stroke offset |
-| Canvas 2D procedural art | Seeded hash function + `tl.to` proxy `{time}` onUpdate |
-| CSS 3D card | GSAP `rotationY` + `perspective: 900` |
-| Per-word kinetic type | GSAP timings array, sliding decay |
-| Variable font axes | Animate CSS vars → `font-variation-settings: "opsz" var(--opsz), "wght" var(--wght)` |
-| Character typing | `tl.call` text mutation + `steps(1)` cursor blink |
-| Velocity-matched cuts | Match outgoing blur/translate velocity to incoming for seamless beats |
-| MotionPathPlugin | `gsap.registerPlugin(MotionPathPlugin)` + path string |
-
----
-
-## 11. Media: video, audio, TTS
-
-### Video compositing
-
-- `<video muted playsinline data-start="..." data-duration="..." data-track-index="..." src="...">`
-- HyperFrames extracts frames at render via videoFrameInjector (avoids unreliable headless `<video>` playback)
-- Linter forbids `<video>` with audio at the same time — split into separate `<video muted>` + `<audio>`
-- Video frame extraction uses FFmpeg
-- HDR videos: PQ or HLG transfer detection + x265 with mastering metadata
-
-### Audio mixer
-
-- `<audio id="..." data-start="..." data-duration="..." data-volume="0.8" data-track-index="2" src="...">`
-- Multiple tracks mixed with `amix normalize=0` + per-track adelay + volume
-- Master audioGain from EngineConfig
-- Output: AAC 192kbps
-
-### TTS (Kokoro-82M, local)
-
-- 54 bundled voices with prefixes: `a` American EN, `b` British EN, `e` Spanish, `f` French, `h` Hindi, `i` Italian, `j` Japanese, `p` Brazilian Portuguese, `z` Mandarin
-- Default voice: `af_heart`
-- Speed: 0.1–3.0 (default 1.0)
-- Languages: en-us, en-gb, es, fr-fr, hi, it, pt-br, ja, zh (non-EN needs system espeak-ng)
-- Output: WAV; no pitch/volume CLI flags
-- No API key required
-
-### Transcription
-
-- Whisper.cpp models: tiny, base, small, medium, large-v3, small.en, medium.en (default small)
-- Groq API: whisper-large-v3 with word granularities
-- OpenAI API: whisper-1 verbose_json
-- Imports: SRT, VTT, JSON formats
-- Quality gates: music-token detection, garbage cleaning, retry with medium.en
-
-### Background removal
-
-- u2net ONNX models
-- Devices: auto / cpu / coreml / cuda
-- Quality presets: fast / balanced / best
-- Outputs: transparent WebM, ProRes MOV, PNG sequence
-- Optional dual output (foreground + extracted background)
-
----
-
-## 12. Registry — 51 blocks + 4 components + 8 examples
-
-### Blocks by category
-
-**Social overlays (8):** instagram-follow, tiktok-follow, yt-lower-third, x-post, reddit-post, spotify-card, macos-notification, blue-sweater-intro-video
-
-**Showcases (5):** app-showcase (3D phones), north-korea-locked-down (map + annotation), apple-money-count (counter + SFX), vpn-youtube-spot (app-store scroll), nyc-paris-flight (map + plane path)
-
-**Data viz (2):** data-chart (animated bar+line, NYT-style), flowchart + flowchart-vertical (decision tree with SVG connectors, typing correction)
-
-**Logo / branding (1):** logo-outro (build + glow + tagline + URL pill)
-
-**3D / experimental VFX (8):** ui-3d-reveal, vfx-iphone-device (GLTF), vfx-liquid-background, vfx-liquid-glass, vfx-magnetic, vfx-portal, vfx-shatter, vfx-text-cursor
-
-**Single shader transitions (14):** one block per named shader — domain-warp-dissolve, ridged-burn, whip-pan, sdf-iris, ripple-waves, gravitational-lens, cinematic-zoom, chromatic-radial-split, glitch, swirl-vortex, thermal-distortion, flash-through-white, cross-warp-morph, light-leak
-
-**Transition galleries (13 showcase pieces):** transitions-3d, transitions-blur, transitions-cover, transitions-destruction, transitions-dissolve, transitions-distortion, transitions-grid, transitions-light, transitions-mechanical, transitions-other, transitions-push, transitions-radial, transitions-scale
-
-### Components (4 reusable snippets)
-
-- **grain-overlay** — SVG feTurbulence + CSS keyframes
-- **shimmer-sweep** — Light sweep gradient mask on text
-- **grid-pixelate-wipe** — Grid squares stagger fade scene wipe
-- **texture-mask-text** — Luminance-masked letterforms with 66 mask PNGs (Masonry, Stone, Ground/Road, Wood, Metal, Organic/Soft texture categories)
-
-### Examples (8 starter projects)
-
-warm-grain, play-mode, swiss-grid, vignelli, decision-tree, kinetic-type, product-promo, nyt-graph
-
-Install: `npx hyperframes add <name>` for blocks/components, `hyperframes init <dir> --example <name>` for examples.
-
----
-
-## 13. CLI — 25 commands
-
-| Command | Purpose |
-| ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
-| init | Scaffold project from template/example (interactive or --non-interactive) |
-| add | Install registry block / component |
-| catalog | Browse registry blocks/components (--type, --tag, --json, --human-friendly picker) |
-| play | Lightweight browser player (default port 3003) |
-| preview | Studio dev server (port 3002; --force-new, --list, --kill-all) |
-| publish | Zip + upload + return hyperframes.dev URL |
-| render | Render to MP4 / WebM / MOV / PNG sequence — flags: --fps 24/30/60, --quality draft/standard/high, --workers, --docker, --hdr/--sdr, --crf, --video-bitrate, --gpu, --browser-gpu auto/software/hardware, --max-concurrent-renders 1-10, --variables JSON, --variables-file PATH, --strict-variables, --resolution preset |
-| lint | Static lint (--json, --verbose) |
-| validate | Bundle + headless Chrome + console + contrast (--contrast default true, --timeout 3000) |
-| inspect / layout | Visual layout audit (overflow detection at N timestamps; --samples 9, --at, --tolerance 2, --max-issues 80) |
-| info | Print project metadata |
-| compositions | List compositions (root + sub-comps) |
-| benchmark | 5 preset configs × N runs (--runs 3) |
-| browser | Manage Chrome (ensure/path/clear) |
-| remove-background | u2net + FFmpeg → transparent video |
-| transcribe | whisper.cpp or import SRT/VTT/JSON |
-| tts | Kokoro-82M (--voice, --speed, --lang, --list) |
-| docs | Print bundled markdown topics (data-attributes, examples, rendering, gsap, troubleshooting, compositions) |
-| doctor | Environment checklist (Node, CPU, memory, disk, FFmpeg, FFprobe, Chrome, Docker) |
-| upgrade | npm update check + optional global install |
-| skills | Run `npx skills add heygen-com/hyperframes --all` |
-| telemetry | enable/disable/status |
-| snapshot | PNG screenshots at timeline timestamps |
-| capture | Capture URL → site assets + screenshots + design tokens (uses Puppeteer + optional Gemini vision) |
-
-### Website capture (`hyperframes capture <url>`)
-
-Detects these libraries on captured sites (for context labeling): GSAP / ScrollTrigger, Three.js, Lottie, Anime.js, PixiJS, Babylon.js, Rive, Matter.js, Lenis, Framer Motion, Tailwind CSS, WebGL (shader fingerprinting). Captured outputs feed the website-to-video skill workflow.
-
----
-
-## 14. Linter — 60+ rules
-
-Across 8 files in packages/core/src/lint/rules/:
-
-| Rule file | Catches |
-| ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
-| core | Missing composition-id, missing dimensions, missing timeline registry, registry mismatch, invalid script syntax, scoped-CSS issues, non-deterministic code |
-| media | Duplicate media id, video missing muted, video nested in timed element, placeholder URLs, base64 prohibited, missing src/start/id, imperative play()/pause()/seek() |
-| gsap | Overlapping tweens, exit missing hard kill, GSAP animating .clip element, unscoped selectors, CSS transform conflict, missing GSAP script, infinite repeat (repeat: -1), repeat ceil overshoot, scene layer visibility kill, audio-reactive single-tween-per-group |
-| captions | Caption exit missing kill, text overflow risk, transcript not inline, parse error, container position, scale mismatch, textShadow on parent container |
-| composition | File too large, dense tracks, missing class="clip", deprecated data-layer/data-end, split attribute selectors, external script deps, RAF in composition, invalid variable JSON |
-| adapters | Missing Lottie script, missing Three script |
-| textures | Drop-shadow on text, class missing base, text missing mask, unknown texture class |
-| fonts | Google Fonts import (use @font-face), font-family without @font-face |
-
-Plus async URL checks (`lintMediaUrls`, `lintScriptUrls` — HEAD probes).
-
-`validateCompositionGsap` also forbids: `Math.random`, `Date.now`, `new Date`, `setTimeout`, `setInterval`, `requestAnimationFrame`, `repeat: -1`.
-
-**Note:** `onUpdate` callbacks, `tl.call()`, and GSAP event callbacks (`onComplete`, `onStart`, etc.) are NOT banned by the linter — they are required for canvas/WebGL rendering and character-by-character typing patterns. The linter only catches the determinism violations listed above.
-
----
-
-## 15. Player — `<hyperframes-player>` web component
-
-### Attributes
-
-`src`, `srcdoc`, `width`, `height`, `controls`, `muted`, `volume`, `poster`, `playback-rate`, `audio-src`, `shader-capture-scale`, `shader-loading` (internal|player|none), `loop`, `autoplay`, `speed-presets`
-
-### Public API
-
-`seek(t)` (synchronous when same-origin — uses `iframe.contentWindow.__player.seek` directly), `play()`, `pause()`, `currentTime`, `duration`, `paused`, `ready`, `playbackRate`, `iframeElement`
-
-### Events
-
-`ready`, `timeupdate`, `play`, `pause`, `ended`, `volumechange`, `ratechange`, `shadertransitionstate`, `playbackerror`, `error`, `audioownershipchange`
-
-### Media mirror
-
-Parent audio/video elements with `data-start` are proxied; `_mirrorParentMediaTime` corrects drift; `_audioOwner` promotes to parent if autoplay blocked.
-
-### Runtime auto-inject
-
-Loads `RUNTIME_CDN_URL` (`@hyperframes/core/dist/hyperframe.runtime.iife.js`) if missing `__hf`/`__player` but timelines exist.
-
----
-
-## 16. Engine + Producer — rendering pipeline
-
-### Output formats
-
-mp4, webm, mov, png-sequence — with HDR (PQ / HLG / SDR / auto-detect), transparency (ProRes MOV / WebM / PNG), or standard 8-bit SDR
-
-### Encoding controls
-
-- `--fps`: 24 / 30 / 60
-- `--quality`: draft / standard / high
-- `--crf`: integer (mutually exclusive with `--video-bitrate`)
-- `--video-bitrate`: e.g. `8M`
-- `--gpu`: NVENC, VideoToolbox, VAAPI, QSV
-- `--browser-gpu`: auto / software / hardware
-- `--workers`: parallel render workers
-- `--max-concurrent-renders`: 1–10 (sets `PRODUCER_MAX_CONCURRENT_RENDERS`)
-- `--resolution`: preset (1080p, 4k, portrait, etc.)
-- `--docker`: render inside Dockerfile.test image (reproducibility)
-- `--hdr` / `--sdr`: force HDR or SDR pipeline
-
-### Engine subsystems
-
-- Frame capture: BeginFrame on Linux headless-shell (fast, no alpha) or `Page.captureScreenshot` (alpha + supersample)
-- Video frame injector: pre-extracts video to images, swaps `<video>` for `<img>` during capture (LRU cache by path + byte budget)
-- Audio mixer: FFmpeg-based; per-track delay, volume, master gain, AAC 192k output
-- Chunk encoder: H.264 / H.265 / VP9 / ProRes presets with optional GPU
-- Streaming encoder: `streamingEncodeMaxDurationSeconds` for long renders
-- HDR compositing: `rgba16float` WebGPU readback (headed Chrome), PQ OETF helpers
-- Layer compositor: groups DOM by z-order; splits HDR elements into separate layers
-- Alpha blit: matrix3d affine extraction, `blitRgba8OverRgb48le`, `blitRgb48leAffine`
-- Parallel coordinator: concurrency, coresPerWorker, minParallelFrames, largeRenderThreshold
-- Browser pool: optional with timeout configs
-
-### Producer-only
-
-- `RenderConfig` with `hdrMode` (auto / force-hdr / force-sdr), `outputResolution` mapped to `deviceScaleFactor`
-- File server injects `HF_EARLY_STUB`, `HF_BRIDGE_SCRIPT`, virtual-time so `window.__hf` bridges `window.__player.renderSeek`
-- HDR-aware shader transition compositing via `window.__hf.transitions` metadata
-
----
-
-## 17. Studio — in-browser NLE
-
-Full editor in packages/studio/:
-
-- **NLELayout**: NLE preview + timeline + controls
-- **Timeline**: clip rendering, drag to move (`data-start`), resize (`data-duration`), `data-track-index` reassignment, asset drop, file drop
-- **PlayerControls**: scrub, play, pause, frame step (`stepFrameTime`), `STUDIO_PREVIEW_FPS`
-- **useTimelinePlayer**: resolves `__player` / `__timeline` / `__timelines`
-- **LeftSidebar**: compositions list, asset browser
-- **RenderQueue + useRenderQueue**: queue multiple renders
-- **LintModal**: in-app lint output
-- **MediaPreview + AudioWaveform**: waveform rendering
-- **CaptionOverlay, CaptionTimeline, CaptionPropertyPanel**: caption editor
-- **useCaptionSync**: word-level sync
-- **useElementPicker**: click-to-inspect picker mode
-- Built with Tailwind v3 (separate from Tailwind v4 browser runtime used by compositions).
-
----
-
-## 18. Determinism guarantees
-
-- No `Math.random()` (use seeded PRNGs; mulberry32 is the pattern in skills)
-- No `Date.now()` / `new Date()`
-- No `setTimeout` / `setInterval` in timeline construction
-- No `requestAnimationFrame` (timeline-driven; engine seeks per frame)
-- No `repeat: -1` (calculate exact repeats: `Math.ceil(duration / cycleDuration) - 1`)
-- No `onComplete`/`onStart`/`onRepeat` callbacks (engine doesn't fire them). **Exception:** `onUpdate` and `tl.call()` ARE supported — they're required for canvas/WebGL rendering, character-by-character typing, and counter patterns. See §10 (Canvas 2D procedural art) for the documented pattern.
-- No `gsap.set` on clips from later scenes (use `tl.set(selector, vars, position)`)
-- Synchronous timeline construction (no async)
-- Master clock can clamp at composition end
-
----
-
-## 19. Variables / parameterization
-
-Compositions support typed runtime variables:
-
-```html
-<html
- data-composition-variables='[
- {"name":"brand","type":"string","default":"Stripe"},
- {"name":"primary","type":"color","default":"#635BFF"},
- {"name":"duration","type":"number","default":15},
- {"name":"darkMode","type":"boolean","default":false},
- {"name":"layout","type":"enum","options":["hero","split","stacked"]}
-]'
-></html>
-```
-
-Access via `window.__hyperframes.getVariables()`. Override at render time:
-
-```bash
-npx hyperframes render --variables '{"brand":"Linear","primary":"#5E6AD2"}'
-npx hyperframes render --variables-file vars.json
-npx hyperframes render --strict-variables # error if unused / mismatched
-```
-
-`validateVariables()` checks values against declarations at the CLI/tooling boundary.
-
----
-
-## 20. Sub-compositions
-
-Two loading mechanisms:
-
-- **External file:** `data-composition-src="compositions/act-1.html"` — fetched at runtime
-- **Inline template:** `<template id="<id>-template">` — extracted by `loadInlineTemplateCompositions`
-
-Each sub-comp:
-
-- Has its own `data-composition-id`
-- Has its own `window.__timelines[<id>]`
-- Auto-nested into the root timeline
-- Scoped CSS via `scopeCssToComposition` (`[data-composition-id="<id>"]` selector)
-- Wrapped scripts via `wrapScopedCompositionScript`
-- Reads `data-variable-values` merged with own defaults into `window.__hfVariablesByComp[<id>]`
-- External scripts load with `EXTERNAL_SCRIPT_LOAD_TIMEOUT_MS` timeout. Failed loads emit `external_composition_load_failed` / `external_composition_script_load_issue` diagnostics.
-
----
-
-## 21. Global runtime APIs (`window.*`)
-
-| Global | Purpose |
-| ------------------------------------- | ----------------------------------------------------------------------- |
-| `__hyperframes` | `{ fitTextFontSize, getVariables }` |
-| `__timelines` | `{ [compositionId]: GsapTimeline }` |
-| `__player` | Internal player bridge: seek, play, pause, renderSeek, etc. |
-| `__clipManifest` | Computed clip array (for Studio) |
-| `__playerReady` | Resolved when player ready |
-| `__renderReady` | Resolved when ready for render capture |
-| `__HF_PARITY_MODE` | Engine parity flag |
-| `__HF_FPS` | Render FPS hint |
-| `__HF_MAX_DURATION_SEC` | Engine clamp |
-| `__HF_VIRTUAL_TIME__` | Set by engine in render mode (shader-transitions switches paths) |
-| `__hfThreeTime` | Current time for Three.js adapter |
-| `__HF_PICKER_API` | Element picker hook for Studio |
-| `__hfAnime` | Array of Anime.js instances |
-| `__hfLottie` | Array of Lottie animations |
-| `__hfVariables` | Resolved root variables |
-| `__hfVariablesByComp` | Per-composition variable map |
-| `__hfRuntimeTeardown` | Cleanup function |
-| `__tailwindReady` | Tailwind browser build ready (gates capture) |
-| `__hf.transitions` | Shader transition metadata (read by producer for HDR-aware compositing) |
-| `__beforeTimeline`, `__afterTimeline` | Optional user hooks |
-| `__afterRender`, `__beforeRender` | Optional user hooks |
-| `gsap`, `THREE`, `anime`, `lottie` | Library globals |
-
-Control bridge actions: play, pause, seek, set-muted, set-playback-rate, enable-pick-mode, disable-pick-mode, set-volume, set-media-output-muted.
-
----
-
-## 22. Skills available — 16
-
-| Skill | Purpose |
-| ------------------------- | ----------------------------------------------------------------------- |
-| hyperframes | Core framework skill (composition authoring) |
-| hyperframes-cli | All CLI commands as an agent skill |
-| media-use | Media workflows (TTS, transcribe, captions integration) |
-| hyperframes-registry | Installing blocks/components |
-| hyperframes-contrast | WCAG audit (scripts/contrast-report.mjs) |
-| hyperframes-animation-map | Per-tween bbox + flags report |
-| website-to-video | Capture → DESIGN.md → brief → storyboard+script → VO → build → validate |
-| remotion-to-hyperframes | Migration patterns + API map + CustomEase |
-| gsap | GSAP API + plugins reference |
-| animejs | Anime.js v4 patterns |
-| css-animations | @keyframes patterns |
-| waapi | Web Animations API |
-| lottie | Lottie integration |
-| three | Three.js + deterministic seek |
-| tailwind | Tailwind browser runtime v4 |
-| contribute-catalog | Adding blocks to registry |
-
----
-
-## 23. References inventory (skills/hyperframes/references/)
-
-16 reference docs covering:
-
-- text-effects.md — 24 named text animation effects (per-character, per-word, per-line, whole) — vocabulary reference for the separate `pixel-point/animate-text` skill (load it via `npx skills add pixel-point/animate-text` or `/animate-text`). Specs live in that upstream skill, not in this repo.
-- transitions.md + transitions/catalog.md + 14 category subfiles
-- css-patterns.md (marker patterns)
-- dynamic-techniques.md (caption animation)
-- motion-principles.md (easing as emotion, choreography)
-- typography.md (banned-font list, pairing rules, variable fonts)
-- narration.md (script + VO pacing)
-- captions.md (caption authoring contract)
-- audio-reactive.md (band mappings + extraction)
-- transcript-guide.md (whisper, Groq, OpenAI workflows)
-- techniques.md (the big technique catalog — SVG, canvas 2D, 3D, kinetic, lottie, variable fonts, MotionPath, audio-reactive)
-- beat-direction.md, design-picker.md, prompt-expansion.md, video-composition.md
-- visual-styles.md (8 named visual styles: Swiss Pulse, Velvet Standard, Deconstructed, Maximalist Type, Data Drift, Soft Signal, Folk Frequency, Shadow Cut — available via the `visual-style` skill)
-
----
-
-## 24. Documentation pages (docs/)
-
-27 mdx pages in docs/guides/ and docs/packages/:
-
-**Guides:** 4k-rendering, claude-design, common-mistakes, deploy, gsap-animation, hdr, html-in-canvas, hyperframes-vs-remotion, open-design, performance, prompting, remove-background, rendering, timeline-editing, troubleshooting, video-editor-cheatsheet, website-to-video, etc.
-
-**Packages:** cli.mdx, core.mdx, engine.mdx, player.mdx, producer.mdx, studio.mdx
diff --git a/skills/website-to-video/references/step-0-capture.md b/skills/website-to-video/references/step-0-capture.md
deleted file mode 100644
index 78870d20dd..0000000000
--- a/skills/website-to-video/references/step-0-capture.md
+++ /dev/null
@@ -1,55 +0,0 @@
-# Step 0: Capture
-
-The capture pipeline downloads the site and extracts structured data for the rest of the workflow to read. Step 0 is a single command plus a sanity check. **All analysis (reading files, viewing contact sheets, deriving brand voice, picking assets) happens in Steps 1–3, not here.**
-
-## Run the capture
-
-No API keys required for the base capture. However, before running, ask the user:
-
-> "For the best results, it is recommended to set a Gemini API key — it gives me AI-powered descriptions of every captured image, which helps me choose the right assets for each scene. It costs about $0.001 per image. You can skip this if you want, but the video quality will be better with it. To set it up: add `GEMINI_API_KEY=your-key` to a `.env` file in the project root. You can get a free key at ai.google.dev."
-
-If the user provides the key or already has one set, proceed. If they skip it, proceed anyway — the capture works without it, but `asset-descriptions.md` will have DOM-context descriptions only (position, size, alt text) instead of AI vision descriptions.
-
-Create a project directory for your video if it doesn't exist yet, then capture the website into a `capture/` subfolder within it:
-
-```bash
-npx hyperframes capture <URL> -o <project-dir>/capture
-```
-
-Example: `npx hyperframes capture https://stripe.com -o videos/stripe-launch/capture`
-
-Keeping capture artifacts (`screenshots/`, `assets/`, `extracted/`, `AGENTS.md`, `CLAUDE.md`) in a dedicated `capture/` subfolder keeps them isolated from later build files (`SCRIPT.md`, `STORYBOARD.md`, `DESIGN.md`, `compositions/`, `index.html`, `narration.wav`, `transcript.json`, `renders/`, `snapshots/`), which all live at `<project-dir>/` root.
-
-For exploratory captures that aren't becoming a video yet, the default `./capture/` (or any `-o <name>` you pick) is fine — the isolation convention only matters when you're building a video on top of the capture.
-
-## Confirm it succeeded
-
-Wait for the capture to complete. Print one line summarizing what was captured:
-
-> "Captured N screenshots, M assets, K SVGs, F fonts. Ready for Step 1."
-
-If the command exited non-zero, the counts are all zero, or required directories (`extracted/`, `assets/`, `screenshots/`) are missing, surface the error and stop — don't advance to Step 1 with a broken capture.
-
-## What lives in `capture/` (reference table — DO NOT read these here)
-
-Each downstream step reads only what it needs. Don't pre-fetch everything in Step 0; that bloats context and produces summaries that get stale by the time they're used.
-
-| Path | First read in |
-| ----------------------------------------- | --------------------------------------------- |
-| `capture/extracted/tokens.json` | Step 1 (DESIGN.md — colors / fonts) |
-| `capture/extracted/design-styles.json` | Step 1 (DESIGN.md — typography / components) |
-| `capture/extracted/fonts-manifest.json` | Step 1 (font identification) |
-| `capture/extracted/asset-descriptions.md` | Step 2 (brief grounding) and Step 3 (assets) |
-| `capture/extracted/visible-text.txt` | Step 2 (brief) and Step 3 (script) |
-| `capture/assets/contact-sheet-*.jpg` | Step 3 (asset picking) |
-| `capture/assets/svgs/contact-sheet-*.jpg` | Step 3 (SVG / logo picking) |
-| `capture/screenshots/contact-sheet-*.jpg` | Step 3 (visual mood reference) |
-| `capture/extracted/animations.json` | Step 3 / Step 5 (only if site has animations) |
-| `capture/extracted/lottie-manifest.json` | Step 3 (only if site uses Lottie) |
-| `capture/extracted/video-manifest.json` | Step 3 (only if site embeds video) |
-| `capture/extracted/shaders.json` | Step 3 / Step 5 (only if site has WebGL) |
-| `capture/assets/<individual files>` | Step 5 (only when placing a specific asset) |
-
-## Gate
-
-Capture exits 0. Asset / screenshot / font counts non-zero. Proceed to Step 1.
diff --git a/skills/website-to-video/references/step-1-design.md b/skills/website-to-video/references/step-1-design.md
deleted file mode 100644
index b49f6d8adb..0000000000
--- a/skills/website-to-video/references/step-1-design.md
+++ /dev/null
@@ -1,333 +0,0 @@
-# Step 1: Write DESIGN.md (the brand-truth cheat sheet)
-
-DESIGN.md is a **brand-truth cheat sheet** — colors and fonts you'll **weave into your composed builds**. It is NOT a layout spec, not a moodboard, not a 400-line design system audit.
-
-DESIGN.md is the brand inflection sub-agents apply when building each beat: which color is "primary," which font is for headlines, what tone the brand carries — the load-bearing knobs they flip while building.
-
-**Target length: 250–350 lines.** Step 5 sub-agents read DESIGN.md to brand each beat — the more precise the component CSS values you encode here, the more brand-faithful the result. Going under 200 lines tends to produce generic dark-cinematic output because sub-agents have no brand component DNA to work from; going over 350 means you're over-investing in prose.
-
-**Fast-pacing exception:** For billboard-per-beat videos (short social ads where each beat is a single hero element on full-bleed background), a 50-line DESIGN.md with just colors + fonts + 3-5 do's/don'ts is enough. The Step 5 sub-agent prompt pastes brand values inline, so DESIGN.md depth only matters when the beats render full UIs.
-
-**User preferences always override brand rules.** If the user says "make it bright even though the site is dark" or "use serif fonts even though the brand is sans" — follow the user. DESIGN.md describes the captured website. The video might deliberately break that.
-
-**Read these now** — they're the inputs DESIGN.md is built from. Don't guess colors or sizes from screenshots:
-
-- `capture/extracted/tokens.json` — top brand colors (HEX) and font families with weight ranges.
-- `capture/extracted/design-styles.json` — computed CSS values from the live DOM: typography hierarchy (font-size, weight, line-height, letter-spacing per text role), button variants (background, padding, radius, shadow), card/container/nav styles, spacing scale, border-radius scale, box-shadow values with usage counts. **Primary data source for Sections 3–6 below.**
-
-**Font availability check — do this before writing anything else.** Read `capture/extracted/fonts-manifest.json`. The capture pipeline reads the OpenType `name` table embedded in every downloaded font file, so even hash-renamed Next.js/Webpack fonts are identified by their real family name (Inter, JetBrains Mono, Geist Mono, etc.). No guessing required.
-
-The manifest gives you two views:
-
-- `families[]` — one entry per distinct family with the weights captured, whether it's a variable font, and the files belonging to it
-- `files[]` — one entry per downloaded font with family, subfamily, weight, style, and any variation axes
-
-**How to use it:**
-
-- For each family you'll reference in DESIGN.md, name it by what's in `families[].family` (e.g. "Inter", not "f266e704 hashed font"). The hashed filenames are the `@font-face src` paths — they stay as-is on disk; only the display name comes from the manifest.
-- If a family has `variable: true` and `variationAxes` includes `"wght"`, you can use any weight 100-900 via `font-variation-settings: 'wght' <value>` even if only one static weight appears in the captured files. Note this in DESIGN.md so sub-agents know they have the full weight range available.
-- If the manifest's `unidentified[]` is non-empty, those files failed name-table extraction (rare — heavily subset fonts that strip metadata). Flag them as `unknown` in DESIGN.md and suggest a fallback rather than guessing.
-- Commercial fonts hosted on brand CDNs (GT Walsheim, Söhne, Graphik, Canela) won't be in the manifest because they aren't downloaded. Detect this by checking what the site uses (from `design-styles.json`) against what's in the manifest — anything used but missing is a CDN-hosted font. Flag explicitly: "Söhne not in capture; use Inter 600 as substitute."
-
-Sub-agents try to use the fonts you list. The manifest tells you exactly what's available — there's no excuse for claiming "Charlie Display 700" when no such file exists.
-
----
-
-## The 5 sections to write
-
-### `## 1. Visual Theme (one paragraph)`
-
-3–5 sentences describing the brand's visual personality. Cover: dark-first or light-first, contrast strategy, dominant visual elements (gradients, illustrations, photography, UI mockups), overall mood, what makes it distinctive vs. generic.
-
-This is the only prose section. Make it specific to _this_ brand — not template-filling. A sentence that could describe any well-designed website is not useful.
-
-**Example:**
-
-> Stripe's visual language is light-first and clean, with deep navy (`#061B31`) and pure white as the foundation. The accent stack — Stripe Purple (`#533AFD`) for CTAs, Vibrant Orange (`#FF6118`) for energetic emphasis — keeps interactive elements unmistakable. Type is sohne-var Light (300) for display, weight 400 for body; the brand achieves hierarchy through size and weight, never color shifts. The mood is confident financial-tech — premium without theatrical drama. Distinctive: gradient overlays at 135° between purple and orange appear as subtle washes over white backgrounds, never as bold focal elements.
-
----
-
-### `## 2. Quick Reference`
-
-A flat lookup of the values sub-agents grab while composing beats. Two sub-sections — keep them tight.
-
-#### Colors
-
-List 8–12 colors with brand-specific names + HEX + role. Not generic ("Accent 1") but evocative ("Stripe Purple", "Deep Navy", "Slate Border"). The name carries meaning; "blue 4" doesn't.
-
-**For each text-on-surface combination the brand uses, compute the WCAG AA contrast ratio and flag failing pairings explicitly.** A real failure mode from prior runs: the brand's secondary-text color (`#68686A`) on its dark panel color (`#18191B`) = 3.16:1, which fails AA's 4.5:1 minimum. Sub-agents faithfully reproduced the brand's color choice and the result was unreadable. Encode the safe / unsafe pairings here so sub-agents pick text colors by surface context, not by "this is the brand's secondary text color." The `/hyperframes-contrast` skill audits ratios — run it before finalizing DESIGN.md.
-
-**Example:**
-
-```markdown
-#### Colors
-
-- **Stripe Purple** (`#533AFD`): Primary CTA, interactive elements, focus rings — the brand's action signal
- - On Pure White: 6.2:1 ✅ — On Deep Navy: 3.8:1 ⚠ AA-only-Large
-- **Deep Navy** (`#061B31`): Primary text on light surfaces, also a dark surface tier
- - As text on Pure White: 17.4:1 ✅ — As surface: see Slate-on-Navy pairings below
-- **Pure White** (`#FFFFFF`): Page background, card surfaces
-- **Light Gray** (`#F5F7FA`): Surface tier 2 (cards on white pages, alternating sections)
-- **Slate Blue** (`#273951`): Secondary text on LIGHT surfaces
- - On Pure White: 12.6:1 ✅ — On Light Gray: 11.8:1 ✅ — On Deep Navy: 1.4:1 ❌ DO NOT USE
-- **Light Slate** (`#64748D`): Metadata, captions on light surfaces only
- - On Pure White: 4.8:1 ✅ — On Light Gray: 4.5:1 ✅ — On Deep Navy: 3.0:1 ❌ — On Dark Panel: 2.9:1 ❌
- - **For dark-surface metadata, use `#9A9A9E` instead: 6.4:1 on Deep Navy ✅, 6.1:1 on Dark Panel ✅**
-- **Subtle Border** (`#D4DEE9`): Card borders, dividers (not text — borders don't need AA)
-- **Vibrant Orange** (`#FF6118`): Energy accent — gradient endpoints, highlight bursts (never primary text)
-- **Error Red** (`#FF0022`): Validation errors. On Pure White: 4.5:1 ✅
-- **Success Green** (`#4CD963`): Confirmation states. On Pure White: 1.7:1 ❌ — must be paired with a darker outline or use as accent on dark surfaces
-```
-
-**Where the brand's own palette fails WCAG**, document the substitute (like the `#9A9A9E` override above). Sub-agents pick the safe color by surface — and if the deviation matters to the brand identity, the user can revisit at Step 6.
-
-#### Fonts
-
-List font families with their role AND **the exact file path per family + weight** from `fonts-manifest.json`. Sub-agents will copy the `@font-face` block verbatim — if you only name the family without the path, sub-agents have to guess which `.woff2` file belongs to which family and get it wrong half the time (a real failure mode from prior runs: agents pointed `@font-face` for "ES Build Neutral" at the Inter `.woff2` files and the wordmark rendered in Inter).
-
-**Example:**
-
-````markdown
-#### Fonts
-
-- **Display:** `"ES Build Neutral"` — wordmarks, headlines
- - 600: `capture/assets/fonts/14d7ce3e41dcbb66-s.p.woff2`
- - 700: `capture/assets/fonts/e8b276476c0ac6fa-s.p.woff2`
-- **Body:** `"Inter"` (variable 100–900, captured ✓) — body, labels, UI
- - 400: `capture/assets/fonts/9a8d3f06c4e89f2b-s.p.woff2`
- - 600: `capture/assets/fonts/1b0b3615811be75b-s.p.woff2`
-- **Mono:** `"JetBrains Mono"` — code, metadata
- - 400: `capture/assets/fonts/c7d2e9f5a1b3c8d4-s.p.woff2`
-- **Fallback stack:** `-apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif`
-
-**`@font-face` block to paste in every composition** (sub-agents copy this verbatim — do not invent file paths):
-
-```css
-@font-face {
- font-family: "ES Build Neutral";
- src: url("capture/assets/fonts/14d7ce3e41dcbb66-s.p.woff2") format("woff2");
- font-weight: 600;
- font-display: block;
-}
-@font-face {
- font-family: "Inter";
- src: url("capture/assets/fonts/9a8d3f06c4e89f2b-s.p.woff2") format("woff2");
- font-weight: 400;
- font-display: block;
-}
-/* + any other family/weight combinations the storyboard's beats need */
-```
-````
-
-The brand uses **size for hierarchy, weight for emphasis**. Display 1: 48px/600, Display 2: 32px/600, Body: 14px/400. (Adjust to the actual brand's hierarchy.)
-
-````
-
-The exact `@font-face` block lets sub-agents copy verbatim instead of constructing one from inference. If a beat needs a weight that isn't in the manifest, flag it explicitly here: e.g., "ES Build Neutral 900 NOT in capture; use ES Build Neutral 700 as substitute, or fall back to Inter 700."
-
-That's the whole typography section. If sub-agents need exact line-heights or letter-spacing, they read `design-styles.json` directly.
-
----
-
-### `## 3. Component Stylings` (the build-step's spec sheet)
-
-This is the section sub-agents consult most when building beats in Step 5. **Without exact per-component CSS, sub-agents fall back to generic "dark bg + glow + centered text" patterns regardless of brand** — which is why every video starts looking the same. Encode the brand's actual component DNA here.
-
-Target **6-12 distinct components**. Document what the site actually uses; skip categories the brand doesn't have. For each component, name it descriptively ("Stripe Primary Button" not "Button 1") and provide exact CSS-level properties: background, text color, padding, border-radius, border, font size/weight, height, box-shadow, and any hover/active/disabled states.
-
-#### Buttons (always required)
-
-Cover every variant the site uses — typically Primary, Secondary/Ghost, and Icon. **Example:**
-
-```markdown
-#### Primary Button (Stripe Purple)
-
-- **Background:** `#533AFD`
-- **Text color:** `#FFFFFF`
-- **Font:** sohne-var 16px / 400
-- **Padding:** `15.5px 24px 16.5px 24px`
-- **Border radius:** `4px`
-- **Border:** none
-- **Height:** `48px` (with padding)
-- **Box shadow:** none
-- **Hover:** background `#4329E8`, opacity `0.95`
-- **Active:** background `#3720D4`, scale `0.98`
-- **Disabled:** background `#C9C3F0`, cursor `not-allowed`
-
-#### Secondary Button (outline)
-
-- **Background:** `#FFFFFF`
-- **Text color:** `#533AFD`
-- **Border:** `1px solid #533AFD`
-- **Padding / radius / font:** same as Primary
-- **Hover:** background `#F3F0FF`, border `#4329E8`
-
-#### Ghost Button (text-only link)
-
-- **Background:** transparent
-- **Text color:** `#533AFD`
-- **Font:** sohne-var 14px / 400
-- **Padding:** `12px 0`
-- **Hover:** background `rgba(83, 58, 253, 0.08)`, optional underline
-````
-
-#### Cards & Containers (always required if the site uses any)
-
-Document each distinct card type — Standard, Feature Highlight, Glass, Pricing, Testimonial — whatever this brand actually uses. **Example:**
-
-```markdown
-#### Standard Card
-
-- **Background:** `#FFFFFF`
-- **Border:** `1px solid #D4DEE9`
-- **Border radius:** `5px`
-- **Padding:** `32px`
-- **Box shadow:** `0 1px 2px rgba(0, 0, 0, 0.04)` (default), `0 4px 12px rgba(0, 0, 0, 0.08)` (hover)
-- **Hover:** border `#B8CCDB`
-
-#### Feature Highlight Card (gradient backdrop)
-
-- **Background:** linear-gradient(180deg, rgba(83, 58, 253, 0.05) 0%, rgba(255, 97, 24, 0.03) 100%)
-- **Border:** `1px solid #E5EDF5`
-- **Padding:** `36px`
-- **Box shadow:** none
-```
-
-#### Distinctive components (anything else the brand actually shows)
-
-Logo marquees, testimonial carousels, pricing tables, gradient overlays, glassmorphism panels, bento grids, code blocks, terminal UIs, dashboard mockups — name and document anything visually distinctive. Sub-agents will reach for these specs when the storyboard calls for a beat featuring the X.
-
-```markdown
-#### Glass Container (frosted overlay)
-
-- **Background:** `rgba(255, 255, 255, 0.9)`
-- **Border:** `1px solid rgba(255, 255, 255, 0.2)`
-- **Backdrop filter:** `blur(8px)`
-- **Use:** floating chat widgets, modal overlays, hero callouts only — the only place transparent fills appear in the system
-```
-
-**The rule:** if a sub-agent in Step 5 has to invent CSS values for a component this brand actually uses, you under-documented this section. The values should be lookup-able, not guessable.
-
----
-
-### `## 4. Spacing & Layout`
-
-The brand's rhythm. Three sub-sections, kept tight.
-
-#### Spacing scale
-
-Identify the **base unit** (typically `4px` or `8px`) and the full scale with usage context. **Example:**
-
-```markdown
-**Base unit:** `4px`
-
-| Token | Value | Used for |
-| ----- | ------- | --------------------------------------------------------- |
-| xs | `4px` | Inline icon gaps, tight badge padding |
-| sm | `8px` | Button-group gaps, small component padding |
-| md | `16px` | Card padding, form-field gaps, standard component spacing |
-| lg | `32px` | Section vertical spacing, large card padding |
-| xl | `60px` | Major section separation |
-| 2xl | `100px` | Page-level rhythm, hero section padding |
-
-Never use odd values (`13px`, `17px`) — the system only uses multiples of 4.
-```
-
-#### Border-radius scale
-
-Every radius the site uses, with what uses it.
-
-```markdown
-- `0px`: Form labels, technical UI markers
-- `4px`: Primary buttons, inputs, small badges
-- `8px`: Standard cards, dropdowns
-- `12px`: Feature cards, larger callouts
-- `40px`: Icon buttons (square pill)
-- `9999px`: Pill-shaped CTAs, status chips
-```
-
-#### Whitespace philosophy (one paragraph)
-
-How does this brand use whitespace — generous and architectural? Tight and information-dense? Section gaps in the 60–100px range, or 20–40px? Document the brand's actual rhythm.
-
-```markdown
-Generous whitespace as confidence. Section gaps are always `60–100px`. Content never touches viewport edges — minimum `40px` horizontal padding on mobile, `80–160px` on desktop. The brand uses negative space as active design, not emptiness.
-```
-
----
-
-### `## 5. Iteration Guide` (the load-bearing section)
-
-5–10 numbered rules that encode the most important brand decisions. Each rule is a **single actionable sentence stating what to do, with the specific values from this site.** These are the "if in doubt, do this" rules sub-agents consult while composing beats.
-
-**The single most common failure mode is writing generic rules that could apply to any well-designed website.** A rule that doesn't name a specific value, a specific color, or a specific component this brand actually uses is doing nothing.
-
-**Test for any rule you write:** can you swap this brand for a different brand and have the rule still make sense? If yes, it's too generic. If no, ship it.
-
-#### ❌ Generic vs ✅ site-specific
-
-| Generic (delete) | Site-specific (keep) |
-| ------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| Use the primary brand color for CTAs. | All primary CTAs use Stripe Purple (`#533AFD`). Secondary actions use white background with `#533AFD` border + text. **There is no third button color anywhere in the system.** |
-| Maintain visual hierarchy through color contrast. | Body text is `#000000` on white, `#FFFFFF` on dark. Metadata uses `#64748D` on white only — never on dark. The brand has no mid-gray text on dark backgrounds. |
-| Use clear typographic hierarchy. | All type is sohne-var. H1 `48px`/300, H2 `32px`/300, body `14px`/400. **Never use weights above 400** — this brand has no bold variant. |
-| Use consistent spacing. | Spacing is from a fixed scale: `4, 8, 12, 16, 20, 24, 32, 40, 60` px. Section gaps are always `60–100px`. Card padding is always `32px`. No exceptions. |
-| Buttons should have rounded corners. | Buttons are `40px` tall minimum, `4px` radius, `15.5px 24px` padding. Pill-shape `9999px` radius is reserved for the floating chat trigger only. |
-
-#### One worked example (Framer — 5 rules)
-
-```markdown
-### Iteration Guide
-
-1. **All interactive elements use Framer Blue (`#0000EE`)** — links, primary buttons, active states, focus indicators. Secondary uses `#0099FF` for hover. **No other interactive color exists in the system.**
-
-2. **Typography: GT Walsheim Medium for headings, Inter for body.** Hierarchy enforced through size only, never color. H2 `62px`, H5 `85px`, body `14px`, labels `12px`/500. Text defaults to `#000000` on white, `#FFFFFF` on dark.
-
-3. **Spacing is base-4** — every margin / padding / gap is a multiple of `4px`. Section gaps `60–100px`. **Never use odd values like `13px` or `17px`** — the system has no place for them.
-
-4. **Cards: white (`#FFFFFF`), `1px` border `#EFEFEF`, `8px` radius, `16–20px` padding, no shadow by default.** Dark-mode cards swap to `#1A1A1A` background with `#242424` border. Shadow only appears on hover.
-
-5. **Glass containers** use `rgba(255,255,255,0.9)` background, `1px` border `rgba(255,255,255,0.2)`, optional `backdrop-filter: blur(8px)`. **These are the only place transparent fills appear** — everywhere else uses solid color.
-```
-
-If your draft has a rule like "all interactive elements require visible focus states for accessibility" — delete it. Not wrong, just not load-bearing for _this_ brand.
-
----
-
-## Rules
-
-- Use **exact values** from `capture/extracted/tokens.json`. Cross-reference with screenshots when needed.
-- Name colors and components descriptively — "Stripe Purple" not "Accent 1."
-- When you can't extract exact values, estimate from visual inspection and note it.
-- No "Assets" section — `capture/extracted/asset-descriptions.md` is the asset index.
-- No "Motion" section — the storyboard specifies motion per-beat.
-- No separate "Components" section — Quick Reference is where components live.
-- No "Depth & Elevation" tables — shadow language is implied by the brand's mood (heavy shadows for premium, no shadows for flat/clean); sub-agents pick appropriate values without a table.
-
----
-
-## Quick User Check (before moving to Step 2)
-
-30-second sanity check before Step 2:
-
-> "Here's what I extracted as [Brand Name]'s visual identity:
->
-> - **Colors:** [primary], [accent], [2-3 others with roles]
-> - **Fonts:** [headline font], [body font]
-> - **Tone:** [1 sentence on the brand feel]
->
-> Does this match how you want the video to feel? Any corrections or overrides before I start the storyboard?"
-
-If the user has corrections ("use the blue, not the gray" / "ignore the dark mode" / "we just rebranded, use [these values] instead") — update DESIGN.md now. One minute here saves thirty minutes of rebuilding.
-
----
-
-## What makes a useful DESIGN.md
-
-A sub-agent reading just your Quick Reference + Iteration Guide should be able to:
-
-1. Pick the right color for any primary action, secondary action, body text, error state
-2. Pick the right font/weight/size for any headline, body, metadata
-3. Know which 2-3 rules they cannot break without losing the brand
-
-That's the test. If they can answer those three questions from a 60–120 line doc, you've nailed it. If they need to read 400 lines of mood-board prose to find a color, you've buried the signal.
diff --git a/skills/website-to-video/references/step-2-brief.md b/skills/website-to-video/references/step-2-brief.md
deleted file mode 100644
index 6484dcd7b7..0000000000
--- a/skills/website-to-video/references/step-2-brief.md
+++ /dev/null
@@ -1,178 +0,0 @@
-# Step 2: Strategy & Messaging
-
-**First, scan the Table of Contents in [capabilities.md](capabilities.md)** — the 24-row TOC tells you everything HyperFrames can do. You need this to tell users what's possible. Deep-dive specific sections only if a beat needs them.
-
-You've captured the site and you now understand the brand — what the product does, who it's for, what voice it speaks in, what mood it lives in. Before any creative decisions, **align with the user on the story this video must tell.** Captured assets exist as a brand toolkit you'll reach for late in Step 3; they are not what the conversation in this step is about.
-
-**Parse the user's prompt first.** Read what they already told you — video type, style, specific requests, duration. Only ask about things they DIDN'T specify. If they said "product demo, show me the kanban board and chat, moderate pace" — that's most of the brief already. Don't ask "what type of video?" when they literally said "product demo."
-
-Skip questions the user already answered. Ask only what's missing. If the prompt is detailed enough to build from, confirm the direction in one message and move to Step 3. The goal is to fill gaps, not interrogate.
-
----
-
-## What to Ask
-
-Before asking the user anything, ground yourself in the brand: skim `DESIGN.md` (just written in Step 1) for colors / fonts / voice; read `capture/extracted/asset-descriptions.md` for what visual assets exist; skim `capture/extracted/visible-text.txt` for what the site says about itself. Don't summarize all of it back to the user — that's noise; they captured the site, they know what's there. Use it to draft a tight one-paragraph framing of the brand and proceed to the questions.
-
-Engage the user with the questions below. Use your agent's question/answer UI if available (multi-choice with custom option). If not, ask conversationally.
-
-### Question 1: What's this video for?
-
-Present options based on what makes sense for the captured site:
-
-**Example (Not a required options)**
-
-- **Social ad** (15–20s) — Instagram, TikTok, LinkedIn. Fast, punchy, hook in first 2s.
-- **Product demo** (30–60s) — Walk through key features. Narrated, professional.
-- **Launch teaser** (15–25s) — Build hype for a new feature or product. Dramatic reveal.
-- **Brand reel** (20–45s) — Showcase the brand identity. Visual-forward, minimal narration.
-- **Feature announcement** (15–30s) — Highlight a specific feature or update.
-- Or describe something else.
-
-This determines duration, beat count, narration density, and overall energy.
-
-### Question 2: What style/vibe?
-
-Ask the user to describe what they want — or react to concrete framings that describe motion and energy, not aesthetic presets.
-
-Do NOT present a labeled menu of styles with pre-filled descriptions ("Cinematic = dark + glow + Apple keynote energy"). Those descriptions become the brief even when they don't match the brand. "Cinematic" for a wellness brand should look completely different from "cinematic" for a security tool — but a label with a baked-in description collapses that distinction.
-
-Instead, ask them approachable open-ended questions:
-
-> "A few questions to get the direction right:
->
-> - **Pace:** Should the video move slowly and let moments breathe, or be fast and punchy? Or somewhere in between?
-> - **Mood:** What atmosphere matches how you want viewers to feel — dark and dramatic, clean and light, energetic and vibrant, or something else?
-> - **Narration:** Should a voice guide viewers through the video, or let the visuals carry it?
-> - **Anything specific?** Any moments, techniques, or references you're drawn to? Or say 'surprise me' and I'll work from what I found in the capture."
-
-Their answers modify the brand-derived baseline you built in Step 1. When the user's words conflict with the brand, don't blindly override — let the brand and their direction converge. If the conflict is sharp (user says "dark cinematic" for a brand whose entire identity is white-and-pastel light), surface it and ask before resolving.
-
-### Question 3: What's the ONE thing this video must communicate?
-
-This is the strategy question. Every effective marketing video has a single core message — the one idea that has to land. Every beat serves that idea, or it doesn't belong. Get the user to articulate this BEFORE talking about visuals, assets, or specific scenes.
-
-Frame it like this:
-
-> "From your site, here's the brand frame I'm working from:
->
-> - **What the product does:** [one sentence from the site summary — not features, the actual job]
-> - **Audience:** [who it's for, derived from copy and visual tone]
-> - **Brand voice:** [confident / playful / clinical / urgent / premium — what tone the brand speaks in]
->
-> Before we plan visuals, two questions to anchor the story:
->
-> 1. **What's the ONE thing this video must communicate?** If a viewer remembers only one sentence after watching, what should it be? (the value prop, a launch announcement, a specific feature claim, a brand feeling, a problem-solution pair, etc.)
-> 2. **What's the narrative shape?** Possible arcs: _Problem → Solution_ (most demos), _Reveal_ (launches, teasers), _Demonstration_ (feature showcase, walkthroughs), _Vibe piece_ (brand reels — feeling over information), _Comparison_ (vs. competitor / before-after). Pick or describe your own.
->
-> Either give me your own answers, or say 'surprise me' and I'll make the call based on the brand and what you said in Question 1 ([video type])."
-
-Once those answers exist, **then** sketch the composed-beat directions — but ground each one in the message and arc, not in the asset list:
-
-> "Given [the message] and [the arc], here's how I'd shape it:
->
-> - [Compose-first sketch grounded in the answer to Q1, e.g., "Open with the problem stated as kinetic typography — 'You waste 4 hours a week on context switches.' Cut to a composed kanban board where cards animate from chaos into organization. Close on the brand mark + tagline."]
-> - [Alternative sketch with a different arc, e.g., "Reveal arc: dark canvas → particles converging → product wordmark drawn stroke-by-stroke as the first feature lands. No problem statement — pure announcement energy."]
-> - [If user wants demo: "Three composed UI panels — kanban, AI chat, command palette — each in your palette with the brand logo stamped top-left. Narration walks through each. Closer holds the wordmark."]
->
-> Brand accents I could layer in: [list 1-3 captured assets that *might* earn a place: the SVG logo for opener/closer, a hero illustration as a depth layer in one scene, a gradient image as an ambient bg wash. Note these are candidates, not assignments — most beats won't need any.]"
-
-**Important:** Lead every direction with **what the beat communicates**, then with **how it's built** (which primitives). The narrow no-go: if your first instinct is "the product-UI screenshot flies in," flip it — compose the UI from divs and CSS instead. That's the slideshow pattern this skill exists to break. For captured logos, illustrations, and hero art, no flip is needed — they're valid primary visuals when the concept calls for them.
-
-The captured assets are a brand toolkit you reach for late in the storyboard, where they serve the concept — never as the starting point of the concept itself.
-
-Present options:
-
-- **I have specific ideas** — let me describe them
-- **Surprise me** — you make the creative calls, I'll review the storyboard
-- **Let me see some options first** — propose 2–3 different creative directions and I'll pick
-
-### Question 4: Narration?
-
-Not every video needs a voiceover. Ask:
-
-- **Yes, with narration** — a voice guides the viewer through the video (most product demos, launch teasers, feature announcements)
-- **No narration, visual-only** — music/SFX only, the visuals tell the story (brand reels, social ads, music-driven pieces)
-- **Minimal narration** — just a hook sentence or tagline, rest is visual (short social ads, teasers)
-
-This decision changes the pipeline:
-
-- **With narration:** Step 3 includes a full script. Step 4 generates TTS, transcribes, maps timestamps to beats.
-- **Without narration:** Step 3 has no script (VO cues in storyboard are empty). Step 4 is skipped — beat durations are planned manually in the storyboard based on rhythm and pacing.
-
-### Question 5 (if applicable): Format?
-
-Only ask if not already specified by the user:
-
-- **Landscape** (1920×1080) — YouTube, LinkedIn, website embeds (default)
-- **Portrait** (1080×1920) — Instagram Stories, TikTok, YouTube Shorts
-- **Square** (1080×1080) — Instagram feed, Twitter/X
-
----
-
-## How to Handle Responses
-
-### "Surprise me" / minimal direction
-
-When the user gives no creative direction, default to what the brand's visual identity and the video's purpose suggest. The minimum context you need before defaulting: **where the video is going** (social feed / landing page / pitch deck / TV ad) and **who it's for** (developers / consumers / enterprise / general audience). If either is missing, ask once — "where will this run, and who's the audience?" — then proceed.
-
-With that minimum in hand, still write an ambitious storyboard. "Surprise me" means "impress me," not "play it safe." Go bold.
-
-**Autonomous mode propagates — for user-preference gates only.** (Mode semantics — signals, propagation, gate types — are canonical in `../../hyperframes-core/references/brief-contract.md`; this section is this workflow's application of them, not a second definition.) When the user signals "surprise me" / "decide for me" / "just build it" here at Step 2, that signal kills downstream user-preference 💬 gates: Step 3's storyboard approval, Step 4's TTS provider choice, music yes/no, captions yes/no. Make those creative decisions yourself and present the finished video at the end. Do not ask four separate questions across four separate steps. Read the room once and commit.
-
-**Auto mode does NOT skip quality-verification gates.** These run regardless and must produce evidence in your final summary:
-
-- Asset Audit (Step 3) — view contact sheets, justify USE/SKIP per asset
-- Per-beat HTML evidence block (Step 5)
-- DoD checklist (Step 6) — animation-map, per-warning WCAG verification, audio + motion playback (or explicit "deferred" disclosure)
-- "What I did NOT verify" disclosure (Step 6)
-
-**Test for "preference vs quality gate":** if the answer changes the _content_ of the video (which voice? captions on? beat 3 cinematic or fast?), it's a preference — auto mode decides. If the answer is "did the verification happen?", it's a quality gate — auto mode does NOT apply. Reasoning "auto mode says bias toward action, so I'll skip the contact sheets" misuses auto mode.
-
-### Specific direction
-
-If they say something vague ("make it really cool"), push back gently:
-
-> "I want to make sure I nail what you're imagining. When you say 'cool' — do you mean: dramatic/cinematic(slow reveals and dark atmosphere)? Or high-energy (fast cuts and bold motion)? Or something else entirely?"
-
-### Mixed direction
-
-Parse each component separately. "Minimal but with cinematic transitions and a fast feature section" becomes:
-
-- **Base style:** Minimal (moderate pacing, minimal density, elegant motion)
-- **Transitions override:** Dramatic (shader effects for key moments)
-- **Beats 3–5 override:** Fast pacing, balanced density, energetic motion
-
-Note these per-beat overrides — they go into the storyboard.
-
-### "Let me see options"
-
-Propose 2–3 brief creative directions (3–4 sentences each) with different **narrative arcs** — what story the video tells, not what assets it shows. Each option leads with the message and the arc; visuals are composed scenes that serve them.
-
-> **Option A — Problem → Solution (cinematic, narrated):** Open with the problem stated as kinetic typography over a dark canvas with a single accent glow. Cut to a composed kanban board where chaotic cards animate into organized columns as narration lands the value prop. Closer: brand mark drawn stroke-by-stroke on a shader bloom of the brand gradient. Apple-keynote register. ~25s with full VO.
->
-> **Option B — Reveal arc (announcement, music-led):** Cold open: particles converging in darkness, no copy. The product wordmark draws itself across the frame as the first beat lands. Three composed feature panels each unveiled by a hard cut — kinetic typography labels, brand color washes, no screenshots. Closes on the mark + tagline + macOS hint. ~15s, music-driven, minimal narration.
->
-> **Option C — Demonstration (narrated walkthrough):** Three composed UI scenes — kanban from cards-as-divs, AI chat with typewriter narration sync, command palette with character-typed search — each in the brand palette with the captured logo stamped top-left as identity. CSS crossfades between. Narration walks each one. ~35s, full VO.
-
-Each option states: the arc, the primary visuals carrying it (composed or captured — whichever fits the beat), and any brand accents layered on top. **Never** an option whose primary content is a pasted product-UI screenshot — if you find yourself writing one, flip it: name what gets composed instead. Captured SVGs, illustrations, hero art, and brand photography are fine as primary visuals when the concept calls for them.
-
-Let the user pick one or combine elements.
-
----
-
-## Gate
-
-Lock all of these before moving to Step 3. The first three are the strategic frame Step 3 builds the storyboard from — without them, the storyboard cannot land.
-
-1. **Message** — the ONE thing this video must communicate, in a single sentence. (Required. Step 3 fails without this.)
-2. **Narrative arc** — Problem→Solution / Reveal / Demonstration / Vibe / Comparison / custom. (Required.)
-3. **Audience** — who's watching, where they're watching. (Required.)
-4. **Video type** — social ad / product demo / launch teaser / brand reel / feature announcement / etc. Infer from prompt.
-5. **Duration** — infer from type if not stated (demo: 30-45s, social: 15-20s, teaser: 15-25s).
-6. **Style direction** — pace / mood / specifics — from the user's words, layered onto the brand baseline from Step 1.
-7. **Specific requests** — any scenes/effects/beats they explicitly asked for.
-8. **Narration** — yes / no / minimal.
-9. **Format** — landscape unless specified otherwise.
-
-**Do not ask the user to confirm what they already said.** If the prompt was "make a product demo for huly.io, show the kanban board, dark cinematic feel, full narration" — you already have type (demo), style (dark cinematic), specific requests (kanban board), and narration (full). Still need to derive or ask: the **message** ("the everything app for teams that hate context switches"), the **arc** (Demonstration), and the **audience** (small teams / fast-moving orgs). Proceed to Step 3 only when all 9 are locked.
diff --git a/skills/website-to-video/references/step-3-storyboard.md b/skills/website-to-video/references/step-3-storyboard.md
deleted file mode 100644
index 7837b7729b..0000000000
--- a/skills/website-to-video/references/step-3-storyboard.md
+++ /dev/null
@@ -1,574 +0,0 @@
-# Step 3: Storyboard + Script
-
-Marketing videos are made concept-first. **The order is: message → narrative arc → beats that serve the arc → which assets and techniques bring each beat to life.** Captured assets (SVG logos, brand illustrations, hero art, gradients) are first-class beat content alongside composed beats — many of them will carry their own beats. The constraint is only that you shouldn't _start_ from the asset inventory ("we have these screenshots, let's build a slideshow"). Start from the message, then weave in the right captured assets and the right composed elements per beat.
-
-**Read `capture/extracted/asset-descriptions.md` before writing beats.** Know what's in the capture. The brand's actual visual identity — its real logo, its real illustrations, its real gradients, its real hero art — is what makes the video feel like _this_ brand and not a generic dark cinematic template. Most beats will use one or two captured assets layered with composed motion.
-
-## First decision: CONCEPT
-
-Before pacing, before beats, before anything else — write the concept block at the top of `STORYBOARD.md`. Carry forward what was decided in Step 2's brief:
-
-```markdown
-**Message:** [the ONE thing this video must communicate — one sentence]
-**Arc:** [Problem→Solution / Reveal / Demonstration / Vibe / Comparison — and a one-sentence shape of how it unfolds]
-**Audience:** [who's watching, where they're watching — TikTok scrollers, LinkedIn viewers, embedded on landing page]
-**Brand voice:** [confident / playful / clinical / urgent / premium — pulled from DESIGN.md]
-**Why this matters now:** [GTM context if relevant — launch, feature ship, brand reposition, ongoing demo]
-```
-
-If any of those rows are blank, the storyboard cannot land. Go back to the brief — don't substitute "show the kanban" for a message.
-
-**The single-sentence test:** _"What makes this video different from a generic [video type] for any [industry] brand?"_ If you can't answer it from the rows above, the concept isn't sharp enough. Sharpen it before writing pacing or beats.
-
----
-
-## Second decision: PACING
-
-With the concept locked, pick the pacing that serves it. This determines beat count, beat duration, and architecture — every downstream choice flows from here.
-
-Read the message and arc from the concept block above plus the style direction from Step 2's brief. Map to one of these:
-
-| User says | Pacing | Beat count | Beat duration | Architecture |
-| ----------------------------------------------------------- | ------------ | ---------- | ------------- | ---------------------------------------------------------- |
-| "fast", "punchy", "rapid cuts", "energetic", "social ad" | **Fast** | 8–15 | 0.7–1.8s | Single-file stacked beats, hard cuts |
-| "demo", "walkthrough", "product tour", "show features" | **Moderate** | 4–6 | 3–5s | Sub-compositions, CSS crossfades |
-| "cinematic", "premium", "slow", "let it breathe", "elegant" | **Slow** | 3–4 | 5–8s | Sub-compositions, long crossfades |
-| "launch", "announcement", "story", "narrative" | **Arc** | 5–7 | varies | Slow opener → building middle → fast peak → resolved close |
-
-**Write your pacing choice at the top of STORYBOARD.md.** Example: `**Pacing: Fast** — 12 beats, stacked divs, hard cuts.`
-
-If the user said "dark cinematic feel" — that's SLOW, not fast. If they said "rapid cuts, bold typography" — that's FAST. Don't default to moderate when the prompt gives you a clear signal.
-
----
-
-## Technique-pick checklist (REQUIRED, do this BEFORE writing beat copy)
-
-For every beat you plan, name **2–4 techniques** it will use. A beat with one technique is a slideshow frame — if you can't name two, redesign that beat.
-
-Pick from the inventory in [capabilities.md](capabilities.md) and implementation patterns in [techniques.md](../../hyperframes/references/techniques.md). Examples of composable beats:
-
-```
-Beat 3: composed kanban (4 cards-as-divs per column) + counter chip on In-Progress + back.out entrance stagger
- techniques: layered panels (capabilities §1), counter via tl.set (techniques #15),
- GSAP stagger with back.out(1.7) (techniques #4)
- customize: real project name "Atlas Q3", brand purple #5b3fff, realistic backlog items
-```
-
-**Customize is the actual deliverable** — what makes this beat THIS brand's beat. Brand colors, real content, narration-sync timing. Generic "show the kanban" with no concrete techniques, no customize plan, no brand-specific data = lazy thinking. Beats must be invented from this brand's identity, not assembled from generic UI shapes.
-
----
-
-**Re-read these files before writing:**
-
-- **DESIGN.md** — your color palette, font rules, components, Do's/Don'ts. Every visual must be grounded in this brand identity. If it says "white backgrounds with purple accent" — plan light scenes, not dark moody ones.
-- **Asset discovery — view the contact sheets carefully, every cell.** Open `capture/assets/contact-sheet-*.jpg` and `capture/assets/svgs/contact-sheet-*.jpg`. Both are paginated — view every page (`contact-sheet-1.jpg`, `contact-sheet-2.jpg`, etc.). **For each page, name 5 specific assets you can see before moving on.** Past agents have reported "viewed the contact sheet" after one glance and then wrote beats referencing assets that didn't exist or missed the brand logo entirely. Don't be that agent. When you find an asset that earns its place in a beat, note the filename from the label and reference it as `capture/assets/<filename>`. If a thumbnail is too small to judge resolution / fine detail, open the individual file. Also read `capture/extracted/asset-descriptions.md` for one-line summaries. **Never use contact sheets or scroll screenshots in the video itself** — contact sheets have grid labels baked in; scroll screenshots are raw browser captures. Both are for AI to BROWSE and understand the site, not to place in compositions.
-- **[techniques.md](../../hyperframes/references/techniques.md)** — 13 primitive animation techniques with code patterns. Pick for beats, these are starting points to adapt, not templates to copy.
-- **[text-effects.md](../../hyperframes/references/text-effects.md)** — 24 named text animation effects from the separate `pixel-point/animate-text` skill. The reference page tells you how to load the upstream skill; the IDs are listed inline. Assign a specific effect ID to every headline, label, and copy element in every beat — not generic "fades in" descriptions.
-
-The storyboard is the creative north star. It tells the engineer exactly what to build for each beat — mood, camera, animations, transitions, assets, appearance, sound. Write it as if you're briefing a motion designer who's never seen the website.
-
-**Incorporate the user's specific requests.** If they asked for "a 3D MacBook reveal" — that's in the storyboard. If they said "surprise me" — go ambitious, but just stay within the style direction.
-
-Save as `STORYBOARD.md` in the project directory.
-
----
-
-## Consider: Would Research Improve This Video?
-
-Before diving into beats, pause and think: **would focused research make this video meaningfully better?**
-
-This is NOT always needed. A simple social ad for a SaaS product probably doesn't need market research. But some videos benefit from context the website alone doesn't provide:
-
-**Research when:**
-
-- The video is for a competitive market — look at how competitors present their product, what visual language the industry uses, what trends are hot
-- The video represents a company/product you know little about — search for reviews, press coverage, user opinions, company history to understand what matters to their audience
-- The user asked for something specific to their field — a fintech launch video benefits from understanding how Stripe, Ramp, Mercury position themselves visually
-- The video needs to reference real-world data, trends, or context not on the website
-
-**Skip research when:**
-
-- It's a straightforward brand reel or social ad from a clear website
-- The user gave very specific creative direction ("I want exactly X, Y, Z")
-- The website already contains all the context needed (features, stats, testimonials)
-
-**What to research:** Competitor videos in the space, trending visual styles for the industry, audience expectations, any company context that helps you make better creative decisions. A 2-minute web search can give you the edge between a generic video and one that feels like it was made by someone who understands the market.
-
----
-
-## Global Direction
-
-Every STORYBOARD.md starts with global settings:
-
-```markdown
-**Format:** 1920×1080
-**Audio:** [TTS provider] voiceover + underscore + SFX
-**VO direction:** [voice character — e.g., "mid-age male, calm confident delivery,
-Apple keynote register — economy of words, silence between sentences is a feature"]
-**Style basis:** DESIGN.md (brand colors, fonts, components from the captured site)
-```
-
-**Global guardrails** — read [video-composition.md](../../hyperframes/references/video-composition.md) first. It defines the medium rules: density, color presence, scale, frame composition, and how design.md is brand truth not layout spec. Then apply these capture-specific additions:
-
-- Captured assets are accents on composed beats, not the beats themselves — see Asset Audit below for which assets earn a place (typically 2-4 across the whole video).
-- Use different techniques from techniques.md — not across the whole video, per beat. Don't default to basic fade/scale/opacity — mix in SVG path drawing, HTML-in-canvas, shaders, scrolling effects or movement effect, CSS 3D transforms, typing effects, counter animations, canvas procedural art. Each beat should feel like its own visual world. Use as many as makes sense for the storyboard.
-
-**Underscore/music direction** (if applicable):
-
-- Describe the mood, reference artists, when it swells or drops
-- Example: "Minimal electronic. Warm sustained pad already playing when the video starts. Sits underneath everything, never competing with VO. Swells gently during the flex section, drops to near-nothing for the comparison, resolves on a final chord."
-
----
-
-## Required Capabilities Discovery
-
-Before writing any beats, you have to run these commands and paste the output below the Global Direction section. This tells you what's available beyond the standard techniques.
-
-```bash
-# 1. Check available shader transitions (installed in registry/blocks/)
-ls registry/blocks/ 2>/dev/null | grep -E 'chromatic|cinematic|cross-warp|domain-warp|flash|glitch|gravitational|light-leak|ridged|ripple|sdf|swirl|thermal|whip' || echo "No shader transitions installed"
-
-# 2. Check available VFX blocks
-ls registry/blocks/ 2>/dev/null | grep vfx || echo "No VFX blocks installed"
-
-# 3. Browse what's available to install
-npx hyperframes catalog --type block 2>/dev/null | head -40
-```
-
-There might be VFX blocks available (vfx-liquid-glass, vfx-iphone-device, vfx-shatter, vfx-portal, etc.), use them for hero treatments instead of basic perspective tilt. You need to install any you want with `npx hyperframes add <name>`. Don't use too many shaders — maximum 2 per video unless user wants differently.
-
-**Shader transitions — block name ≠ shader name.** When you run the commands above and see `domain-warp-dissolve` in `registry/blocks/`, the HyperShader runtime name is `domain-warp` (without "-dissolve"). After installing a block, open its showcase HTML (`compositions/<block-name>.html`) and find the actual shader name used in `HyperShader.init()`. That is what you put in the storyboard. Then delete the showcase file — it's a demo only and will pollute your compositions/ directory with lint warnings.
-
-## Asset Audit — REQUIRED before writing beats (non-skippable)
-
-The skill's #1 purpose is to USE the brand's captured assets — not rebuild them from CSS. Most of your beats should feature at least one captured asset: a hero illustration, a signature SVG, product photography, brand mark, distinctive graphic. **If your STORYBOARD.md ends with only the logo used, you have failed this step.**
-
-**Why this gate exists:** Earlier sessions wrote their own "Asset Audit" that said SKIP for 60+ of 65 captured assets, used only the logo, and shipped a video that visually was indistinguishable from a generic dark-mode SaaS launch. The captured MetaBrain illustration, the GitHub-sync diagram, the knowledge-base hero — all left on the floor. The signature visuals that make a brand recognizable were absent. Don't repeat that.
-
-**Required pre-storyboard procedure:**
-
-1. **View every page of `capture/assets/contact-sheet-*.jpg`** AND every page of `capture/assets/svgs/contact-sheet-*.jpg`. These are the sheets generated by capture for this exact purpose. Open each page; scan cell-by-cell. Do not skim — you are looking for the brand's visual identity, frame by frame.
-
-2. **For each contact sheet page, paste this block into STORYBOARD.md under an "Asset Audit" section:**
-
-```
-Contact sheet: capture/assets/contact-sheet-1.jpg (page 1 of N)
- 5 most visually distinctive assets I see (filename + one-sentence description of what the image shows):
- 1. <filename>: <what's actually pictured — not the filename, the content>
- 2. <filename>: <description>
- 3. <filename>: <description>
- 4. <filename>: <description>
- 5. <filename>: <description>
-```
-
-Repeat for every contact sheet page. The number of pages × 5 is your candidate asset pool.
-
-3. **For each beat in STORYBOARD.md**, choose USE or SKIP for each candidate asset:
- - **USE** means the asset appears in the beat's HTML at build time (`<img src=...>`, inline SVG, `background-image: url(...)`).
- - **SKIP** requires a one-sentence reason explaining why this asset doesn't serve this beat. "Doesn't fit storyboard" is not a reason — name which storyboard moment failed to find a use for it.
-
-4. **Brand-defaults floor:** at least ONE beat must use the brand's signature visual (hero illustration, hero photograph, or signature diagram — not the logo). If you've named 5+ candidate hero illustrations in step 2 above and zero of them appear in any beat, that is the failure mode this gate exists to catch.
-
-**Forbidden:**
-
-- Writing "SKIP" for every asset except the logo without per-asset justification
-- Reading `capture/extracted/asset-descriptions.md` (the text file) and making decisions from filenames alone, without opening the contact sheets
-- Concluding "I'll rebuild the GitHub-sync diagram in CSS" when the brand's own SVG of that diagram is sitting in `capture/assets/`. Use the real asset.
-
-If your final beat list uses less than ~30% of relevant captured assets (relevant = anything except the favicon and tiny UI icons), revisit. The brand is visually carried by its own art; rebuilding it from divs erases what makes it recognizable.
-
-### HTML-in-Canvas — plan for it here, build in Step 5
-
-The `drawElementImage` Chrome API captures any live HTML/CSS as a GPU-accelerated texture at 60fps. This is HyperFrames' highest-impact capability — it lets you render captured product screenshots or UI through:
-
-- **3D geometry** — a rotating iPhone or laptop model, a sphere, a curved surface
-- **WebGL shaders** — liquid glass refraction, shatter into fragments, portal reveal, noise distortion
-- **Post-processing** — bloom, depth-of-field, film grain, color grading
-
-When planning beats, decide which ones deserve an HTML-in-Canvas treatment vs. a standard GSAP animation. If you want it, name it in the storyboard — Step 5 will read [`../../hyperframes/references/html-in-canvas-patterns.md`](../../hyperframes/references/html-in-canvas-patterns.md) for implementation. You don't need to specify the API details here.
-
-### SFX assignment — happens here, not in Step 5
-
-**Before writing beats,** read the SFX manifest. Locate it from your current directory:
-
-```bash
-find "$HOME" -path '*/website-to-video/assets/sfx/manifest.json' -maxdepth 10 2>/dev/null | head -1
-```
-
-Or if you already copied SFX into the project (Step 5 does this), read your local `sfx/manifest.json`. Each entry has a filename, duration in seconds, and description. Assign **specific SFX files** to exact moments in the storyboard. Step 5 implements what you specify here — it makes no SFX decisions.
-
-Per beat, specify SFX like:
-
-- `sfx/impact-bass-1.mp3` at `0.2s`, volume `0.35` — on the hero image snapping into frame
-- `sfx/chime.mp3` at `3.8s`, volume `0.5` — on the logo appearing
-
-**Less is more.** Most beats need zero SFX. One SFX per beat is typical; multiple only if the beat has genuinely distinct punctuation moments. Never place SFX on shader transitions directly — shader transitions are already an audio-visual event.
-
-**How to place each sound type** (industry-standard rules):
-
-- **Impact/hit sounds** (`impact-bass-1`, `ping`, `pop`, `glitch-*`): peak is at the start of the clip. Trigger exactly at the visual moment. Let the decay tail bleed into the next scene — this is normal, called a J-Cut, and sounds professional. `data-duration` = full manifest duration, never trimmed.
-- **Riser/build-up sounds** (`riser`, `whoosh-cinematic`): peak is at the END of the clip. To make the peak land on a climax moment (a transition, a reveal), trigger at `climax_time - sfx_duration`. For `riser.mp3` (10.03s) peaking at a t=20s transition: trigger at t=9.97s.
-- **Short accent sounds** (`click`, `click-soft`, `chime`, `sparkle`, `ping`): trigger at the exact visual punctuation moment. Duration is short, no tail concern.
-
-**Volume when SFX overlaps narration:** HyperFrames has no automatic audio ducking. If an SFX plays under spoken narration, set its volume to 0.2–0.3 max, not 0.5+. Specify this in the storyboard entry so Step 5 wires it correctly.
-
-**data-duration rule** (for Step 5 to implement): always equals the manifest's duration field exactly. Never set it shorter to "fit" the remaining beat time — truncating an impact mid-decay is the exact problem causing the cut-off sounds in v2 videos.
-
-### Architecture Constraint: Each Beat is an Independent Composition
-
-Each beat is built as a separate HTML file (`compositions/beat-N.html`). These are loaded independently — they do NOT share state, WebGL contexts, Three.js scenes, or DOM elements with other beats. This means:
-
-- **No "persistent" elements across beats** — you can't have a MacBook model that stays on screen while only the screen content changes between beats 2, 3, 4. Each beat loads its own MacBook from scratch. If you want visual continuity, each beat must independently set up the element at the same position/rotation, so it APPEARS continuous.
-- **No shared 3D scenes** — each beat that uses Three.js creates its own renderer, scene, and camera. If beats 2 and 3 both show a rotating laptop, they each load the model independently and must start from matching positions.
-- **Shader transitions happen between beats** (in index.html), not within beats. Don't plan a shader transition "inside" a beat.
-
-Plan your storyboard within these constraints. If you describe "the MacBook stays in place while content swaps," you need to specify that each beat independently recreates the MacBook at the same position — not that it persists.
-
-### Device Mockups: Use the Registry Block
-
-If the storyboard calls for a MacBook or iPhone mockup, use the pre-built `vfx-iphone-device` registry block — it has both **iPhone 15 Pro Max AND MacBook Pro** GLTF models with live HTML-in-Canvas screens, camera choreography, and glass lens morphing. Install with `npx hyperframes add vfx-iphone-device`.
-
-Do NOT hand-code a Three.js device scene from scratch. The registry block handles UV mapping, screen textures, lighting, and camera angles correctly. Hand-coded versions consistently produce broken screen textures, wrong UV flipping, and path resolution bugs. Use the block.
-
----
-
-## Per-Beat Direction
-
-Each beat is a SHOT, not a layout. Write what the CAMERA does and what the FRAME reveals — not "what's positioned where on the page."
-
-### A beat is a shot — pick the framing before writing CSS
-
-Every beat header should declare its shot type in the first line. **Shot types:**
-
-| Shot | Use for | What the frame contains |
-| --------------------- | ---------------------------------------------------------------------------------------- | --------------------------------------------------------------------- |
-| **Extreme close-up** | a single card / number / character / cursor / button as the entire subject | one element fills 60–90% of frame, everything else blurred or absent |
-| **Close-up** | a small UI region (a single column, a card stack, a chart, a code block) | the subject fills 40–60% of frame with depth-layered context behind |
-| **Medium** | a section of UI — kanban with 3 columns, chat with 3 messages, dashboard with 2-3 panels | the subject fills 60–80% of frame, edges of nearby UI bleed in |
-| **Wide** | full UI assembly visible — only when the WHOLE thing is the point | full UI at 70–90% scale with deliberate negative space |
-| **Over-the-shoulder** | viewer "behind" the user — cursor / hands / device foreground, UI midground | foreground element bottom 1/3, UI fills upper 2/3 with parallax depth |
-| **Dutch angle** | tension, urgency, "something's off" | the frame is tilted 4–8°, content composed to feel unstable |
-
-**The "wide shot" trap:** _Every_ beat at wide framing looks like a screenshot in CSS. Most product-demo videos should be 60% close-up + close-up + 20% medium + 10% wide + 10% extreme close-up. Wide is the rare establishing shot, not the default.
-
-### Camera motion is the subject, not the elements
-
-In website thinking: elements animate in, then sit still while the user reads. In video thinking: the camera moves THROUGH the scene. The composition shifts.
-
-Every beat needs at least one camera-style move. Pick from:
-
-- **Dolly in** — composition scales 1.0 → 1.08 over the beat duration, slight x/y drift
-- **Dolly out / pull-back** — composition scales 1.15 → 1.0, revealing more context
-- **Push** — fast scale-up (1.0 → 1.05, ~0.5s power3.out) on a key moment
-- **Parallax pan** — background drifts opposite to foreground at different speeds
-- **Orbit** — the subject rotates in 3D, or the camera circles it
-- **Rack focus** — blur shifts from one element to another (background blurs as foreground sharpens)
-
-If a beat has NO camera-style move and elements only animate inward at the start, it will read as a webpage with entrance animations. That's not a video beat.
-
-### Forbidden patterns (the video-as-webpage failures)
-
-These appear in nearly every iteration where sub-agents revert to website thinking. Refuse to write any beat that includes:
-
-- ❌ **macOS / browser window chrome** as a frame around the content — traffic-light dots, URL bars, browser tabs, breadcrumbs — UNLESS the beat IS specifically about that chrome (e.g., "the macOS window itself is the subject of the shot")
-- ❌ **Sidebars, navigation rails, page headers, page footers** unless the beat demonstrates navigation as its concept
-- ❌ **"Centered card / panel / window with 60–120px margin on all sides"** — that's the standard webpage layout; videos use the full frame and meaningful negative space
-- ❌ **"Hold with breathing" micro-animations** where elements move y: ±1–2px or scale 1.01 — invisible at video resolution; this is sub-agents pretending the beat has motion when it doesn't
-- ❌ **Settled holds longer than 1.5s** with no continuous camera or compositional change — fix by adding camera dolly, depth-layer parallax, or new sub-elements entering mid-beat
-- ❌ **Hover-state demonstrations** — videos have no hover; if the brand has a hover effect to communicate, find a way to show the BEFORE and AFTER as discrete frames, not a hover simulation
-- ❌ **Tooltips and modal cards "for context"** that explain what something is — videos communicate through visual language, not popup hint text
-
-### Required for every beat (the floor for video grammar)
-
-Every beat must specify, in its visual description:
-
-1. **Shot type** (one of the six above)
-2. **Camera move** (which one, when it starts, how long it lasts)
-3. **Depth strategy** (what's in foreground / midground / background, how they parallax)
-4. **Motion magnitudes** that read at video scale (30px+ y/x movements, scale changes ≥0.05, opacity transitions ≥0.5)
-5. **The shot's purpose** — what specifically is the viewer supposed to feel or notice in this 3–5 seconds?
-
----
-
-### Existing beat-level fields (below) layer on top of the shot grammar above
-
-Each beat is a WORLD, not a layout. Write what the viewer EXPERIENCES before you write CSS specs.
-
-**Motion verbs** — every animated element gets one. Pick from the beat's concept, not from an energy bucket:
-
-- **Impact:** SLAMS, CRASHES, PUNCHES, DROPS, SHATTERS
-- **Directional:** SLIDES, PUSHES, WIPES, CUTS
-- **Reveals:** DRAWS, FILLS, GROWS, ASSEMBLES, COUNTS UP
-- **Organic:** FLOATS, DRIFTS, BREATHES, PULSES, ORBITS
-- **Mechanical:** TYPES ON, CLICKS, LOCKS IN, SNAPS, STEPS
-
-**Transition decision matrix** — shader vs CSS vs hard cut:
-| Shader transition for | CSS crossfade for | Hard cut for |
-|---|---|---|
-| Hero reveals, logo unveils, "wow" moments | Continuous motion between beats, editorial pacing | Rapid-fire lists, percussive edits, comedy timing |
-
-1–2 shader transitions per video (hero + CTA). Too many flatten their impact. Mix shader and CSS crossfade in one HyperShader composition by omitting `shader` on any transition entry.
-
-**Rhythm** — declare your scene rhythm before implementing: fast-fast-SLOW-fast-SHADER-hold. The rhythm comes from the brand and content, not a template.
-
-Use the pacing you decided at the top of this step. The beat count, duration, and architecture are already set.
-
-**Cut the video to match the narration length** — if the script produces 22 seconds of audio, the video should be 24 seconds with a 2-second CTA hold, not 30 seconds with 8 seconds of dead silence. Empty time at the end where nothing is happening loses the viewer.
-
-**Frame-filling rule:** When describing visuals per beat, specify sizes as FRAME FILL PERCENTAGES, not pixels. "Product screenshot fills 80% of frame" not "600px wide card."
-
-**Use whatever primitives the beat needs — alone or in combination.** A beat can layer HTML/CSS, SVG (captured or hand-drawn), WebGL/Canvas shaders, Three.js scenes, captured illustrations and photographs, kinetic typography, captured Lottie — all at once if the scene calls for that. They're inputs to one output (the video frame); there's no rule mapping intent to primitive. The video should feel **alive in every frame** — motion that's continuous and tangible, **like things exist in a physical world**. Narrow no-go: never paste a product-UI screenshot as load-bearing content (the slideshow pattern). Everything else is open.
-
-**Opener default: fast intro to stop the scrollers.** Even a cinematic video should start with a punch — a flash, a shader bloom, a logo strike, a kinetic word build, a particle burst — anything that lands inside the first 1.0–1.5 seconds. Slow intros work for prestige trailers; videos shipping anywhere social or feed-based need a hook that beats the 1.5-second scroll threshold. Plan the opener as the most ambitious beat in the storyboard, not the gentlest one.
-
-**CTA / closing beats** are consistently the weakest. Agents treat them as "logo + tagline + done." A good CTA should: make the logo entrance an event (SVG path draw, scale with overshoot, or anything awesome really), have continuous background motion, and hold only 2-3 seconds after the last spoken word — NOT 8-10 seconds of silence.
-
-**VO start timing — decide here, not in Step 5.** When does the narration actually begin relative to the first visual? Options: (a) VO starts over the visual intro (heard before content settles — creates urgency), (b) VO starts after the visual intro settles (viewer sees the opening, then hears the voice — creates drama), (c) a few seconds of music-only visual before VO enters. None of these is a default — pick based on the brand and the opening beat's concept. State the intended narration start time explicitly in the storyboard's Global Direction, e.g. `**Narration start:** 0.8s (after hero intro settles)`. Step 5 wires this as the audio element's `data-start`.
-
-**Concept-first beats.** Every beat starts with its CONCEPT — not "what technique to use" but "what does this scene should show, what did the previous showed and what will the next show...?" What idea is being communicated? The crazy and interesting concept drives every technical decision.
-
-In the capture pipeline, each beat includes:
-
-### Concept
-
-What does this scene REPRESENT in terms of previous (if exists) and next scenes? Not "show features" but a specific idea and logic.
-
-### VO cue
-
-Which narration line plays over this beat (Also keep in mind the whole narration of the video to understand and keep in mind the flow).
-
-### Visual description
-
-What the viewer sees — described cinematically, not as CSS specs. Use camera language and production motion designer vocabulary (pan, zoom, drift, settle, and more of those words). Think in layers — what's supposed to happen in the foreground, midground, background simultaneously?
-
-**When a captured asset is the primary visual** (logo opener / closer, hero illustration with parallax, hero photograph with motion treatment, gradient as full-bleed background, etc.): specify which asset, how much of the frame it fills (%), and where text/labels go relative to its safe zones. Don't blindly center text over busy product UI. The narrow no-go: never paste a product-UI screenshot as full-bleed beat content — that's the slideshow pattern this workflow exists to break. Captured logos, illustrations, hero art, and photography are fine as primary visuals when the concept calls for them.
-
-### Composition + Accents
-
-Two things, both required:
-
-**Composed (load-bearing — what carries the beat):**
-
-- Describe the UI / element / scene you're building from scratch: markup structure, the techniques powering it (cite [capabilities.md](capabilities.md) sections + [techniques.md](../../hyperframes/references/techniques.md) entries), key animation events. E.g. "Composed kanban: 3 column divs, 4 cards each, drag-and-drop with `back.out(1.7)` entrance stagger, counter chip on In-Progress incrementing via `tl.set()`."
-- **Brand-inflect:** brand colors from DESIGN.md, real product data (project names, real metrics, real copy — not placeholder labels), narration-sync moments. Make this beat THIS brand's beat, not a generic UI demo.
-
-**Accents (decoration only — what brand-inflects the beat):**
-
-- Optional. Most beats need 0-1 accent. Format: `capture/assets/<filename>` — how it appears: position, opacity, treatment, motion (e.g. `capture/assets/logo.svg` — top-left, 60×60, fades in at 0.4s, breathes during hold).
-- Common accent uses (when the primary visual is something else): brand logo stamped on a UI beat, hero illustration as a depth layer behind kinetic type, gradient image as ambient background wash. When the captured asset IS the primary visual (logo drawing itself on the opener, hero illustration with parallax as a hero beat), it isn't an accent — it's the beat content; document it under Composition, not here.
-- If a beat has no obvious accent need, leave this blank. The primary visual is enough.
-
-Write this section for THIS project's actual brand and the assets audited above — not from memory.
-
-### Text Animations
-
-Every text element in this beat must name a specific effect from the catalog. The reference page is at [`../../hyperframes/references/text-effects.md`](../../hyperframes/references/text-effects.md) (or locate it with `find "$HOME" -path '*/hyperframes/references/text-effects.md' -maxdepth 10 2>/dev/null | head -1`). It lists 24 effect IDs (from the separate `pixel-point/animate-text` skill); pick what fits the brand and this beat's mood — don't default to the same effect every beat.
-
-Format (FORMAT EXAMPLES of structure, not prescriptions — pick based on brand/mood/context):
-
-- `[element — e.g. "main headline"]`: `[effect-id]`
-- `[element — e.g. "eyebrow label"]`: `[effect-id]`
-
-At build time, the sub-agent loads `/animate-text` (the upstream skill) and reads each named effect's spec from `.agents/skills/animate-text/assets/effects/<id>.json`. No creative decisions at build time — just spec retrieval and implementation.
-
-### Beat Timing
-
-Two numbers Step 5 needs to wire `data-start` and `data-duration` correctly:
-
-- **HyperShader transition in at:** `[time]s` (the `time:` value in the transitions array for the transition INTO this beat — or 0 for beat 1)
-- **GSAP timeline duration:** `[duration]s` (how long this beat's internal animations run — when does the last tween end?)
-
-Example: `Transition in at: 4.2s · GSAP duration: 5.5s` → Step 5 sets `data-start="4.2" data-duration="5.5"`.
-
-### Animation Sequence — must span the ENTIRE beat
-
-A beat is a SCENE with internal life, not a single entrance followed by a static hold. Things should be happening throughout the entire duration — new elements appearing, existing elements transforming, camera drifting, details revealing, sub-moments unfolding.
-
-If your animation sequence only has events in the first 2 seconds and the beat lasts longer, the rest is dead air. Plan moments across the full duration. Nothing should sit unchanged for more than ~2 seconds — if an element is on screen, give it continuous motion (drift, breathe, pulse, parallax).
-
-Describe the feel precisely: "snappy overshoot bounce settling into place" → back.out; "slow heavy drift" → power1.inOut. Vague adjectives are useless.
-
----
-
-## Brand Accents Pass (LAST creative decision — happens after beats are written)
-
-Your beats are now conceptually defined. Each one has a primary visual that carries it (composed UI, captured asset, kinetic typography, WebGL, etc.). **Now**, do a single pass to decide which captured assets — if any — earn an accent role on the beats where another primitive carries the visual.
-
-This is the LAST creative pass before file-tree time. It comes here intentionally: assets serve concept-defined beats — as primary visual or as accent, depending on what each beat needs — but they don't seed beats. If you find yourself wanting to add a beat _because_ an asset would look cool, the asset is doing the storyboarding — go back and rewrite that beat from the message instead.
-
-### Brand defaults (nice-to-haves for most brand videos)
-
-Two defaults that work for most brand-focused videos. Skip them when the concept calls for it; they're not hard requirements.
-
-1. **The brand mark in opener + closer.** For most brand videos, the logo / wordmark SVG lands in the opener (as the entry tag) and the closer (as the sign-off). It gives the viewer the brand at both ends of the watch. Skip when the concept calls for it — e.g., a teaser that deliberately delays the brand reveal until beat 3 for narrative tension, or a video where the brand mark would feel redundant against the captured hero art.
-
-2. **The site's signature visual somewhere in the video.** Every captured site has one: a gradient wave, a hero illustration, a distinctive product UI mark, the wordmark animation, a color combination, a hero photograph. It's whatever a viewer who knows the brand would point at and say "that's them." Find it during Step 0; place it where the concept can use it. Not required — but if a brand video doesn't include this, ask whether the video still feels like _this_ brand.
-
-These are defaults, not requirements. Beyond them, aim for 2-4 brand accents total across the whole video, not per beat. Most beats need 0-1. Everything beyond the floor has to justify itself against the question: _"Does this asset make the beat MORE this brand, or is it filler?"_
-
-Print this table once your beats are written:
-
-| Asset | Type | Where (beat #) | Role |
-| ------------------------------ | -------- | --------------- | ------------------------------------------------------------------------------- |
-| stripe-logo.svg | SVG | Beat 1 + Beat N | Brand mark (opener stroke-draw, closer hold) |
-| wave-fallback-desktop.png | Gradient | Beat 3 bg layer | Ambient depth wash behind composed dashboard |
-| datavizstatic3x.png | Data viz | SKIP | Compose the stats from divs + counter animations instead |
-| enterprise-accordion-hertz.png | Photo | SKIP | Compose the customer-story UI from divs with the brand's testimonial card style |
-| icon-3.svg | Icon | SKIP | Decorative, too small to matter |
-
-Mark assets `SKIP` when a composed equivalent (dashboards, kanban, chat, terminal, file tree, calendar, pricing cards, etc.) does a better job — that's the strong default for product UI. Use the brand's _real_ data (project names, real metrics, real product copy) in composed beats — never the placeholder labels a screenshot would have.
-
-**Update each beat's Composition + Accents section** based on what this pass produced. Most beats stay accent-free. The few that earn one get a single line under "Accents" with the file, position, opacity, and motion.
-
-**The bar:** Every beat's visuals use whatever combination of primitives the scene needs. Accents are optional brand inflections layered on top; the brand-defaults section above (logo in opener + closer, signature visual once) covers most brand videos but isn't a hard requirement.
-
----
-
-## Production Architecture
-
-Include this file tree at the bottom of the storyboard:
-
-```
-project/
-├── index.html root — VO + underscore + beat orchestration
-├── DESIGN.md brand reference (from Step 1)
-├── SCRIPT.md narration text (from Step 3)
-├── STORYBOARD.md THIS FILE — creative north star
-├── transcript.json word-level timestamps (from Step 4)
-├── narration.wav TTS audio (from Step 4)
-├── capture/ captured website data (from Step 0)
-│ ├── screenshots/
-│ ├── assets/
-│ │ ├── svgs/
-│ │ ├── fonts/
-│ │ ├── lottie/
-│ │ └── videos/
-│ ├── extracted/
-│ │ ├── tokens.json
-│ │ ├── design-styles.json
-│ │ ├── visible-text.txt
-│ │ ├── asset-descriptions.md
-│ │ ├── animations.json
-│ │ ├── assets-catalog.json
-│ │ └── detected-libraries.json
-│ ├── AGENTS.md
-│ └── CLAUDE.md
-└── compositions/
- ├── beat-1-hook.html
- ├── beat-2-features.html
- ├── ...
- └── captions.html
-```
-
----
-
-## Example: Beat-by-Beat Format
-
-The two beats below are from the real Claude Design × HyperFrames production video. They show the expected level of specificity — exact timing, exact GSAP values, exact animation sequences.
-
-**Why only 2 beats are shown:** Earlier versions of this reference showed all 10 beats, and agents pattern-matched from them regardless of the brand being captured. Moodboard layouts, capabilities grids, and orbital letter closers started appearing in every video. The concepts in those beats are specific to HyperFrames as a product — they should not appear in a video about a fintech tool or a wellness app. Only two beats are shown here to demonstrate the format level, not to suggest these specific techniques.
-
-### BEAT 1 — LIGHT BALL OPENER (0:00–0:03)
-
-**Concept:** No title card, no fade from black. A single point of warm light appears in total darkness. It blooms into a horizon-spanning glow. The viewer leans in before a single word is spoken.
-
-**Visual:** Deep black canvas (#050507) with grain overlay (mix-blend-mode: overlay, 0.12 opacity) and extended vignette (inset: -200px for long falloff). The `.ball-core` is a 40px radial-gradient orb (white center → accent → transparent). Animation sequence:
-
-- 0.0s: Orb appears tiny (scale: 0.15, opacity: 0→1, 0.18s, expo.out)
-- 0.18s: Orb grows continuously (scale: 0.4→1.4, 0.7s, power1.in). Simultaneously the `.ball-halo` (140% width, 70% height ellipse, accent-tinted radial-gradient, blur: 60px) blooms in (scale: 0.4→1, opacity: 0→1, 0.55s, sine.out)
-- 0.65s: Orb keeps growing as it fades (scale: 1.4→8, opacity: 1→0, 0.4s, power2.in) — the point of light dissolves into pure glow. Halo expands further (scale: 1→1.25, opacity: 0.85)
-- 0.85s: Horizontal beam line emerges from center (scaleX: 0→1, 0.4s, expo.out) with warm box-shadow glow (0 0 24px 1px rgba(255,240,220,0.4))
-- 1.0s: Title "Claude Design × HyperFrames" fades up above the line (opacity: 0→1, y: 14→0, 0.7s, power3.out). Ampersand in italic accent color.
-- 1.3s: Date subtitle appears below the line (0.6s, power2.out). Monospace font, 0.32em letter-spacing, uppercase.
-- 2.2s: Bottom credit line fades in ("This entire video was made with HyperFrames in Claude Design")
-- 3.0–4.4s: Hold — halo breathes (opacity drifts to 0.55, scale to 1.4, sine.inOut), headline drifts slightly (y: -3px)
-- 4.4s: Everything fades to black together (0.6s, power2.in)
-
-Corner marks (monospace, 11px, 0.45 opacity) at top-left and bottom-right for editorial feel.
-
-**SFX:** Deep ambient bass pad already playing from frame 1.
-
----
-
-_(Beats 2–9 intentionally omitted. See above for why.)_
-
-### BEAT 10 — ORBITAL LETTERS / CLOSE (example of a closing beat spec)
-
-**VO:** (resolving — the brand name assembles)
-
-**Concept:** Individual letterforms of "HYPER FRAMES" burst in from alternating sides, each with rotation and offset. They bounce into place with back.out(2.0) overshoot. An accent line draws itself across the width. An orbit ring expands with a glowing dot tracing a full 360° rotation. A tagline types itself out: "HTML in. Video out." with deliberate pauses after each word. Everything breathes after assembly — letters float gently, glow pulses, connector lines shimmer.
-
-**Visual:** Deep black. Center glow: 900px radial-gradient orb (accent #e8a769 at 0.35 → 0.12 → 0.025 → transparent), blur(100px).
-
-**Animation sequence:**
-
-- 0.1s: 12 character elements ("H Y P E R [space] F R A M E S") enter staggered 0.06s apart, each from y: 80 with alternating x offset (odd: -30, even: +30) and rotation: -15. Landing: back.out(2.0), 0.7s — gives each letter a satisfying overshoot bounce.
-- 1.0s: Accent SVG line draws across the full 1920px width (strokeDashoffset: 1920→0, 0.6s, power3.out). #e8a769 stroke, 2px.
-- 1.0s: Glow breathes in (opacity: 0→0.2, sine.inOut, 0.4s), then back to 0.1.
-- 1.4s: Orbit ring (600px circle, 1px border rgba(accent, 0.3)) expands from scale: 0.5 to 1.0 (expo.out, 0.5s). A glowing orbit dot (8px, accent color, box-shadow glow) on the ring traces a full 360° rotation over 2.5s (linear easing — constant speed).
-- 1.25s onward: Letters begin a subtle float — alternating directions (y: ±2px, sine.inOut, 1.4s, yoyo, repeat 1), staggered 0.04s. Keeps the assembled word feeling alive.
-- 1.8s: Tagline types itself in monospace (24px, accent color, 0.15em letter-spacing): "HTML" (pause 0.2s), " in." (pause 0.25s), " Video" (pause 0.1s), " out." — each segment at 0.03s per character using steps(N) easing for discrete character appearance.
-- 1.8s onward: Glow continues gentle breathing (opacity: 0.1→0.14, sine.inOut, 1.2s, yoyo, repeat 1).
-
-**SFX:** Soft chime on letter assembly completion. Silence under the tagline typing — let it land.
-
----
-
-## Write the Narration Script (same step — write alongside the storyboard)
-
-The script and storyboard are one step. Every beat already has a VO cue — the script is just all those VO cues assembled into a single document. As you write each beat, write its narration line. Then assemble them into `SCRIPT.md`.
-
-The script serves the storyboard — write words that fit the visual plan, not the other way around. Reference real product features, real stats, and real components from `capture/extracted/visible-text.txt`. Use exact numbers.
-
-**Script length depends on the creative direction, not a formula.** A cinematic video with dramatic pauses and visual-only moments might have 40 words across 30 seconds. A rapid feature showcase might pack 100 words into 30 seconds. The storyboard's pacing and style (from Step 2's brief) determine how much narration vs. silence the video needs. Some beats are narrated; some are pure visual. Let the creative plan drive the word count, not the other way around.
-
-The key constraint: don't pad with dead silence where nothing is happening. If a beat has no narration, something visual must be carrying the viewer's attention. Empty frames = lost viewers.
-
-Save as `SCRIPT.md` in the project directory.
-
-**Script writing rules:**
-
-- ~2.5 words/sec natural pace. 15s = ~37 words, 30s = ~75 words.
-- Use contractions ("it's", "you'll"). Read it out loud — if it sounds robotic, rewrite.
-- Write numbers as spoken: `$1.9T` → "nearly two trillion dollars", `API` → "A P I", `10x` → "ten times"
-- **Hook first** — bold claim, provocative question, contrast, or shocking number. Never "Welcome to..." or "Introducing..."
-- Structure: Hook → Story → Proof → CTA. 15s ads can skip Story.
-
----
-
-## User Review Gate
-
-After writing the storyboard AND the script, present BOTH to the user for review. The storyboard and script are coupled — the user needs to see them together to judge whether the video works.
-
-### How to Present
-
-Summarize the plan clearly. Don't dump the full STORYBOARD.md — give the user a beat-by-beat overview they can scan in 30 seconds. Per `../../hyperframes-creative/references/story-spine.md` § 3, the summary is a proposal: open by echoing the strategy line, and give every beat a `why:` traced to the message:
-
-> **This video tells [audience] that [message].** Here's the plan for your [duration] [type]:
->
-> | Beat | On screen + narration | Why |
-> | ------------- | ------------------------------------------------------------------ | --------------------------------------- |
-> | 1 (0:00–0:04) | [one sentence — what happens visually + what the narration says] | [the beat's job, traced to the message] |
-> | 2 (0:04–0:10) | [one sentence] | […] |
-> | 3 (0:10–0:18) | [one sentence] _(hero beat — 3D MacBook reveal with bloom effect)_ | […] |
-> | … | … | … |
-> | N (closing) | [one sentence — CTA/logo] | […] |
->
-> **Style:** [dimension summary — e.g., "Cinematic pacing, dark mood, dramatic transitions for hero, clean for the rest"]
-> **Narration:** [first and last line of the script]
-> **Total duration:** [X]s with [N] beats
->
-> **Does this match what you envisioned?** I can adjust: beats, pacing, specific effects, the script tone, or anything else. Or if this looks good, I'll proceed to voice generation.
-
-### What to do with feedback
-
-- **"Looks good" / approval** → proceed to Step 4 (VO)
-- **Specific feedback** ("make beat 3 longer", "change the opening to be faster", "I don't want the typing effect") → update STORYBOARD.md and SCRIPT.md, re-present
-- **Major direction change** ("actually I want it more playful, not cinematic") → revisit Step 2's brief dimensions, rewrite storyboard
-- **Iterate until the user is satisfied.** This is the cheapest place to make changes — changing a storyboard beat costs 30 seconds. Changing a built composition costs 5 minutes.
-
-### Gate
-
-Both STORYBOARD.md and SCRIPT.md exist AND the user has explicitly approved the plan.
-
-**Autonomous mode exception:** if the user signaled autonomous mode in Step 2 ("surprise me" / "decide for me" / "just build it"), skip the approval wait. Present the storyboard summary inline as a heads-up and proceed straight to Step 4.
diff --git a/skills/website-to-video/references/step-4-vo.md b/skills/website-to-video/references/step-4-vo.md
deleted file mode 100644
index 59b84c98d0..0000000000
--- a/skills/website-to-video/references/step-4-vo.md
+++ /dev/null
@@ -1,230 +0,0 @@
-# Step 4: VO, Timing + Captions
-
-## If Step 2 said "no narration"
-
-Skip the TTS sections below. The storyboard already has beat durations planned based on pacing and rhythm — those become `data-start` and `data-duration` values directly in Step 5.
-
-**Background music:** Ask the user before moving to Step 5:
-
-> "Do you have a music track for this video? If not, I can suggest where to find one:
->
-> - **Artlist.io** or **Musicbed** — licensed music for commercial use
-> - **Uppbeat.io** or **Pixabay Music** — free tracks with attribution
-> - **Freesound.org** — free samples and loops
->
-> Or share a reference track ('something like this') and I can find something similar."
-
-If the user provides a track: note the file path and BPM in the storyboard for Step 5 to wire into `index.html`. If they skip music entirely, the video uses SFX only — confirm that's intentional.
-
-Move to Step 5.
-
----
-
-## Generate a test clip before full narration — calibrate timing first
-
-Generate a 2-sentence test clip NOW using the script's opening lines. Measure the actual duration. Kokoro compresses scripts by ~40% (35s planned → 19s actual) and HeyGen runs faster than expected. If you discover the audio is 40% shorter than expected, you'll need to revise the storyboard beat timings before investing time in full narration generation.
-
-**Do this before committing to beat count and durations:**
-
-```bash
-# Quick Kokoro test (2 sentences):
-npx hyperframes tts "First sentence. Second sentence." --voice af_nova --output /tmp/test-tts.wav
-# Measure: seconds ÷ words × total script words = estimated full audio length
-```
-
-If the estimate puts your video at ±15% of the planned duration, proceed. If it's more than 15% off, recalibrate the script length first:
-
-- **Audio TOO SHORT** (more than 15% under planned duration) → add strategic pauses. In `narration.txt`, insert blank lines between paragraphs (≈0.6s each) or `...` between sentences (≈0.4s each). Aim for the pauses to land at storyboard beat boundaries so the silence feels intentional, not dead air.
-- **Audio TOO LONG** (more than 15% over planned duration) → identify the beat in your storyboard with the highest words-per-second density. Cut one supporting sentence from THAT beat's lines — preserve the lead sentence (the one that names the beat's idea). Re-measure with another test clip before committing to full generation.
-- **Audio matches plan but beat boundaries drift** → adjust the storyboard durations to match the actual narration, not the other way around. The audio is the ground truth once narration is generated.
-
-The script formula assumes constant words-per-second, but punctuation, dramatic pauses, and silence cues all stretch real audio. Always trust a measured test clip over the formula.
-
-## Background music
-
-**Always ask about background music** — even when narration is present:
-
-> "Do you want background music under the narration? (Artlist.io, Musicbed for licensed; Uppbeat/Pixabay for free; or share a reference track). Even a subtle ambient underscore makes pauses between sentences feel intentional rather than empty."
-
-If they want music, note the track in the storyboard for Step 5 to wire into `index.html`.
-
-## TTS Provider
-
-Ask the user which voice provider they'd like:
-
-> **Which voice provider would you like to use for narration?**
->
-> 1. **HeyGen TTS** — Good quality voices, and it returns word-level timestamps automatically (saves a separate transcription step). Requires HeyGen API key.
-> 2. **ElevenLabs** — Large voice library, very natural output. Requires ElevenLabs API key. Does not return word timestamps — you'll transcribe separately.
-> 3. **Kokoro** (Free) — Runs locally, no API key needed. Decent quality but more robotic than the others. Good for drafts or budget runs.
-
-If the user picks ElevenLabs or HeyGen and doesn't have a key set up yet, help them:
-
-- **ElevenLabs:** "Add `ELEVENLABS_API_KEY=your-key` to a `.env` file in the project root, or just paste it here and I'll set it up."
-- **HeyGen:** "Add `HEYGEN_API_KEY=your-key` to a `.env` file, or paste it here."
-
-Don't judge or critique if the user pastes a key directly in chat — just use it and move on.
-
-## Audition voices
-
-After the provider is selected, audition at least 2 voices with the first sentence of SCRIPT.md.
-
-**ElevenLabs:**
-
-- If the ElevenLabs MCP is available: use `mcp__elevenlabs__search_voices` to browse, `mcp__elevenlabs__text_to_speech` to generate.
-- If no MCP: call the REST API directly:
-
- ```bash
- # List voices
- curl -s "https://api.elevenlabs.io/v1/voices" \
- -H "xi-api-key: $ELEVENLABS_API_KEY" | jq '.voices[:5] | .[].name'
-
- # Generate speech (replace VOICE_ID with chosen voice)
- curl -s -X POST "https://api.elevenlabs.io/v1/text-to-speech/VOICE_ID" \
- -H "xi-api-key: $ELEVENLABS_API_KEY" \
- -H "Content-Type: application/json" \
- -d '{"text":"First sentence of your script","model_id":"eleven_multilingual_v2"}' \
- --output narration.mp3
- ```
-
-- Does not return word timestamps — transcribe separately after generating.
-
-**HeyGen TTS:**
-
-- If the HeyGen MCP is available: use the TTS tool directly.
-- If no MCP: use the v3 API (current; v1/v2 deprecated, supported until Oct 2026). **Auth depends on credential type:** the `x-api-key` header below works only with an **account API key** (`HEYGEN_API_KEY`). If you authenticated via **OAuth** (e.g. claude.ai / the HeyGen MCP login), `x-api-key` will 401 — send `Authorization: Bearer $HEYGEN_OAUTH_TOKEN` instead, or just use the MCP TTS tool above.
-
- ```bash
- # List voices — response shape: { "data": [...], "has_more": bool }
- # data is a direct list (NOT data.voices — that was v2)
- curl -s "https://api.heygen.com/v3/voices?engine=starfish&type=public&limit=20" \
- -H "x-api-key: $HEYGEN_API_KEY" | python3 -c \
- "import json,sys; v=json.load(sys.stdin)['data']; [print(x['voice_id'], x['name'], x['language']) for x in v[:10]]"
-
- # Generate audio — response: { "data": { "audio_url": ..., "word_timestamps": [...] } }
- curl -s -X POST "https://api.heygen.com/v3/voices/speech" \
- -H "x-api-key: $HEYGEN_API_KEY" \
- -H "Content-Type: application/json" \
- -d '{"text":"Your script here","voice_id":"VOICE_ID","speed":1.0}' \
- | python3 -c "
- import json,sys
- r=json.load(sys.stdin)
- d=r['data']
- print(d['audio_url'])
- open('transcript_raw.json','w').write(json.dumps(d.get('word_timestamps',[]),indent=2))
- "
-
- # Then download the audio
- curl -sL "AUDIO_URL_FROM_ABOVE" --output narration.mp3
- ```
-
-- Returns word-level timestamps directly in the response — no separate transcription step needed.
-
-**Kokoro (free, local):**
-
-```bash
-npx hyperframes tts SCRIPT.md --voice af_nova --output narration.wav
-```
-
-No API key, no MCP needed. Runs locally. Use `--list` to see all 54 available voices.
-
-Pick the voice that sounds most natural and conversational. Listen for pacing — does it breathe between sentences? Does it sound like a person or a robot?
-
-## Script length check
-
-Before generating, verify the script makes sense for the video. Word count depends entirely on the creative direction. The storyboard's pacing and style determine how much narration the video needs.
-
-The key check: are there stretches where NOTHING is happening — no narration AND no compelling visual movement? Those are dead spots that lose the viewer. Every second needs either spoken words or strong visual energy carrying it.
-
-## Generate full narration
-
-Generate the full script as `narration.wav` (or `.mp3`) in the project directory.
-
-**If any command hangs for more than 60 seconds — don't just wait.** The user is sitting there watching you do nothing. Escalation order:
-
-1. **Try again** — kill the process, run the same command again (transient failures are common)
-2. **Try different flags** — smaller model (`--model tiny.en`), different voice, shorter test sentence first
-3. **Try a different tool for the same task** — if `hyperframes transcribe` hangs, run `whisper-cli` directly on the audio
-4. **Switch provider entirely** — if ElevenLabs is down, try HeyGen or Kokoro. If Kokoro hangs, try ElevenLabs.
-
-Never sit idle for 10 minutes hoping a stuck process will finish.
-
-**Kokoro pronunciation issues:** Kokoro mispronounces product names and tech terms. Always apply substitutions before generating. Known problems and fixes:
-
-- `API` → `A P I` (spell it out)
-- `UI` → `U I`, `SaaS` → `sass`, `DevOps` → `dev ops`
-- Product names with unusual spelling: test the first sentence first and listen. Common failure: "Vercel" → "versatile", "WorkOS" → "work O S", "One API" → "Wanna PI"
-- If a name sounds wrong: write it phonetically in `narration.txt` (e.g., `Vercel` → `Ver-sell`, `Supabase` → `Soopa-base`)
-- Always generate a short test clip with the first 2 sentences before generating the full audio
-- **No SSML tags** — Kokoro reads them as literal text. `<break time="1s"/>` is spoken as "break time equals one slash." Use blank lines or `...` for pauses in `narration.txt`
-
-For ElevenLabs and HeyGen TTS, substitutions are usually unnecessary — they handle product names correctly.
-
-**Also save the exact spoken text** — with pronunciation substitutions applied (e.g., `API` → `A P I`, `$2T` → `two trillion` and etc.) — as `narration.txt` in the same directory. This is the string passed to TTS, distinct from `SCRIPT.md` which is the human-readable creative doc. Having `narration.txt` makes it trivial to regenerate the audio later with a different voice without re-deriving the substitutions. Name it exactly `narration.txt`.
-
-## Transcribe for word-level timestamps
-
-**If you used HeyGen v3 TTS:** word timestamps were returned in the generate call. Normalize the format before saving — HeyGen v3 uses `word` but the pipeline expects `text`:
-
-```python
-import json
-raw = json.load(open('transcript_raw.json'))
-normalized = [{"text": w["word"], "start": w["start"], "end": w["end"]} for w in raw]
-json.dump(normalized, open('transcript.json', 'w'), indent=2)
-```
-
-No separate transcription step needed.
-
-**If you used ElevenLabs or Kokoro:**
-
-```bash
-npx hyperframes transcribe narration.wav
-```
-
-Produces `transcript.json` with `[{ text, start, end }]` for every word. These timestamps are the source of truth for all beat durations.
-
-## Map timestamps to beats
-
-Go through STORYBOARD.md beat by beat. For each beat:
-
-1. Find the first word of that beat's VO cue in `transcript.json`
-2. Find the last word of that beat's VO cue
-3. Set `beat.start = firstWord.start`, `beat.end = lastWord.end`
-4. Add 0.3-0.5s padding at the end for visual breathing room
-
-Update STORYBOARD.md with real durations. Replace estimated times (e.g., "0:00-0:05") with actual timestamps as precise as possible (e.g., "0.00-3.21s").
-
-Beat boundaries land on word onsets — hard cuts to the VO.
-
-## Timing reconciliation — required before Step 5
-
-After mapping all beats, compare real total audio duration against the storyboard's planned duration:
-
-```
-real_total = last_word.end + cta_hold (typically 2–3s)
-planned_total = sum of all beat planned durations
-delta = |real_total - planned_total|
-```
-
-**If delta > 15% of planned total — do not proceed to Step 5 without resolving it.** Common causes and fixes:
-
-- **Audio shorter than planned (most common with Kokoro):** Kokoro generates compressed speech with minimal pauses. Proportionally scale all non-CTA beat durations down to match the real audio. Example: planned 30s, audio 19s — multiply each beat duration by 19/30 (excluding the CTA hold). Update STORYBOARD.md.
-- **Audio much longer than planned (>30% over):** The script was too long for the intended duration. Trim the script (remove one beat's VO), regenerate audio, re-transcribe.
-- **CTA beat timing:** The CTA beat should hold for 2–3 seconds after the last spoken word — not extend to fill empty time. `cta_start = last_word.end + 0.3s`, `cta_duration = 2.5s`. Hard cap. Dead silence after the CTA hold loses the viewer.
-
-**Always tell the user** if you adjusted durations significantly from the storyboard plan. They approved a specific beat structure — if it changed, they need to know.
-
-## Captions
-
-After the narration is generated and transcribed, ask the user:
-
-> **Would you like captions on the video?**
->
-> - **Yes** — per-word captions synced to the narration. Great for social media (most viewers watch on mute) and accessibility.
-> - **No** — narration audio only, no text overlay.
-
-If yes, captions are built as a separate composition (`compositions/captions.html`) in Step 5. The `transcript.json` drives the timing — each word appears/highlights as it's spoken. Read [the captions reference](../../hyperframes/references/captions.md) for styling options (scale-pop, typewriter, fade+slide, etc.) and positioning rules.
-
-## Save timing data for Step 5
-
-Record the final beat timings (start, duration) so Step 5 (Build) can use them when building `index.html`. The storyboard now has real timestamps — these become `data-start` and `data-duration` values on each scene slot when the root composition is assembled in Step 5.
diff --git a/skills/website-to-video/references/step-5-build.md b/skills/website-to-video/references/step-5-build.md
deleted file mode 100644
index bdba101628..0000000000
--- a/skills/website-to-video/references/step-5-build.md
+++ /dev/null
@@ -1,483 +0,0 @@
-# Step 5: Build Compositions
-
-**Captions rule — read before building anything:** Never create `compositions/captions.html` with an empty transcript (`const script = []`). If the VO/transcript step was skipped or failed, do not create a captions composition at all. An empty captions file silently does nothing and wastes a track slot. Only create it when `transcript.json` has real word timestamps.
-
-**Captions stacking bug:** Every caption word group must start with `opacity: 0` (or `visibility: hidden`) and be positioned `position: absolute`. Never show more than one group at a time — GSAP controls visibility sequentially. If multiple groups are visible simultaneously it means either (a) the initial CSS state isn't hidden, or (b) a group's exit tween is missing before the next group's entrance fires. After building captions.html, take a snapshot at 3–4 timestamps mid-narration and verify only one word group is visible per frame.
-
-**Before building, verify you have:**
-
-- **STORYBOARD.md** — the beat-by-beat plan. Re-read it now if you don't remember every beat's concept, assets, and techniques.
-- **DESIGN.md** — if you need to check a specific value (color, font, component style) you can't recall, look it up. Don't re-read the whole file.
-- **`capture/extracted/asset-descriptions.md`** — when the storyboard assigns an asset to a beat, check the description to understand what it shows. Re-read this file if you can't recall the asset inventory.
-- **transcript.json** — word-level timestamps that drive scene durations.
-
-Load the `hyperframes` skill — it has the rules for data attributes, timeline contracts, deterministic rendering, and layout. Read it now if you haven't already this session.
-
-**For capabilities.md and techniques.md:** read the Table of Contents to orient yourself, then go deep only on the sections your storyboard actually calls for. You don't need to re-read sections for animation engines, registry blocks, or techniques that none of your beats use.
-
----
-
-## 1. Copy SFX to project
-
-```bash
-cp -r skills/website-to-video/assets/sfx/ <project-dir>/sfx/
-# If skill is installed elsewhere:
-find . -path "*/website-to-video/assets/sfx" -exec cp -r {} <project-dir>/sfx/ \;
-```
-
-## 2. Build the root index.html
-
-Create `index.html` yourself. This is the orchestrator — it holds beat slots, narration audio, SFX, and shader transitions (if any).
-
-**Critical CSS — every beat must overlap in the same frame:**
-
-```css
-.scene {
- position: absolute;
- top: 0;
- left: 0;
- width: 1920px;
- height: 1080px;
- overflow: hidden;
-}
-```
-
-**Beat structure:**
-
-```html
-<div
- id="root"
- data-composition-id="main"
- data-start="0"
- data-duration="TOTAL"
- data-width="1920"
- data-height="1080"
->
- <div
- id="beat-1"
- class="scene"
- data-composition-id="beat-1-hook"
- data-composition-src="compositions/beat-1-hook.html"
- data-start="0"
- data-duration="5.5"
- data-track-index="1"
- data-width="1920"
- data-height="1080"
- ></div>
-
- <!-- more beats... -->
-
- <audio
- id="narration"
- src="narration.wav"
- data-start="0"
- data-duration="NARRATION_LENGTH"
- data-track-index="0"
- data-volume="1"
- ></audio>
-
- <!-- SFX on content moments, NOT on shader transitions -->
- <audio
- id="sfx-impact"
- src="sfx/impact-bass-1.mp3"
- data-start="0.3"
- data-duration="2.1"
- data-track-index="41"
- data-volume="0.35"
- ></audio>
-</div>
-```
-
-SFX were assigned in the storyboard (Step 3) — implement exactly what STORYBOARD.md specifies. Each SFX entry has a file, trigger time, and volume. Wire each one as an `<audio>` element with the exact `data-start`, `data-duration`, and `data-volume` from the storyboard. Do not add, remove, or substitute SFX beyond what the storyboard says.
-
-**Choose architecture based on pacing (from Step 3)**
-
-| Pacing | Architecture | Why |
-| ----------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------- |
-| **Fast** (billboard-per-beat) | Single `index.html`, stacked `<div class="beat">` elements, GSAP opacity sequencing. NO sub-compositions, NO HyperShader. Hard cuts via `tl.set()`. See stacked-beats pattern below. | Sub-compositions add latency; hard cuts need instant swaps. One file = zero load delay. |
-| **Moderate / Slow / Arc** | Sub-compositions with `HyperShader.init()`. Each beat in `compositions/beat-N.html`. CSS crossfades or shader transitions between scenes. | Transitions need HyperShader's compositing. Sub-agents build each beat independently. |
-
-If the storyboard says "fast" pacing: use the stacked-beats pattern below. Do not use HyperShader — it adds scene registration overhead that creates gaps between hard cuts. Every frame is content, no transition frames.
-
-**Stacked-beats pattern (fast pacing):**
-
-Each beat composes from whatever primitives the storyboard called for — HTML/CSS, SVG, captured assets, WebGL, Canvas, Three.js, kinetic typography, Lottie — alone or in combination. Narrow no-go: never a full-bleed product-UI screenshot as load-bearing content. Each beat's structure comes from the storyboard's Composition + Accents spec.
-
-```html
-<div
- data-composition-id="video"
- data-width="1920"
- data-height="1080"
- data-start="0"
- data-duration="TOTAL"
- style="position:relative;width:1920px;height:1080px;"
->
- <!-- Beat 1: kinetic-typography hook (composed from per-word spans) -->
- <div class="beat" id="b01" style="opacity:1;">
- <div class="mega">
- <span class="w">Stop</span>
- <span class="w">context-switching.</span>
- </div>
- </div>
-
- <!-- Beat 2: composed kanban — 3 columns of cards-as-divs, NOT a screenshot -->
- <div class="beat" id="b02">
- <div class="kanban">
- <div class="col">
- <div class="card">Triage tickets</div>
- <div class="card">Review PR</div>
- </div>
- <div class="col">
- <div class="card active">Design spec</div>
- </div>
- <div class="col">
- <div class="card">Ship v2.1</div>
- </div>
- </div>
- </div>
-
- <!-- Beat 3: SVG logo draw — composed, not an <img> -->
- <div class="beat" id="b03">
- <svg viewBox="0 0 200 200"><path class="mark" d="..." /></svg>
- </div>
- <!-- more beats — each a composed scene with its own visual world -->
-</div>
-```
-
-If you ever find yourself writing `<img src="capture/assets/...">` as a beat's primary visual where the asset is a product-UI screenshot, stop. That's the slideshow pattern this skill exists to break. Build the element from divs and CSS using the brand colors from DESIGN.md. The legitimate `<img>` uses are: (a) the brand logo when it's purely raster, (b) a hero illustration layered as ambient depth behind composed content, (c) a gradient/texture image as a background wash. Never a product UI screenshot as the load-bearing visual.
-
-```css
-.beat {
- position: absolute;
- inset: 0;
- width: 1920px;
- height: 1080px;
- display: flex;
- align-items: center;
- justify-content: center;
- opacity: 0;
- overflow: hidden;
-}
-```
-
-```javascript
-var beats = [
- { id: "b01", at: 0, dur: 1.8 },
- { id: "b02", at: 1.8, dur: 1.0 },
- // ...
-];
-beats.forEach(function (b) {
- var el = document.getElementById(b.id);
- if (b.id !== "b01") tl.set(el, { opacity: 1 }, b.at);
- gsap.set(el, { scale: 1.012 });
- tl.to(el, { scale: 1, duration: 0.25, ease: "power2.out" }, b.at);
- if (b !== beats[beats.length - 1]) tl.set(el, { opacity: 0 }, b.at + b.dur);
-});
-```
-
-Each beat gets its own visual world — different background, different color, different energy. No two consecutive beats should look alike. Scale pulse (1.012→1.0) on every beat entry is subtle but felt.
-
-If the storyboard says "slow" or "cinematic": build each beat as a sub-composition. Use long crossfades (0.8–1.2s `duration` with no `shader` key = CSS crossfade). Inside each beat, use continuous subtle motion — nothing is static:
-
-- Slow camera drift on the composed scene root: `tl.fromTo(scene, {scale:1.05, x:20}, {scale:1, x:-20, duration: BEAT, ease:"none"})` (Ken-Burns style, but on your composed elements — not on a screenshot)
-- Parallax text layers: `tl.fromTo(text, {y:30}, {y:-30, duration: BEAT, ease:"power1.inOut"})`
-- 1–2s breathing room before text enters (don't animate everything at t=0)
-- Soft easing: `expo.out` for entrances, `power1.inOut` for drifts
-
-**Multi-scene index.html with HyperShader — for moderate/slow/arc pacing**
-
-For videos with sub-composition beats and scene transitions, `index.html` MUST use `HyperShader.init()`. This is the entire scene orchestration layer. Do NOT try to use registry block sub-compositions (e.g. `compositions/domain-warp-dissolve.html`) for transitions — those are standalone showcase demos, not how HyperShader works in multi-scene compositions.
-
-Copy the local shader build first:
-
-```bash
-cp packages/shader-transitions/dist/index.global.js <project-dir>/hyper-shader-local.js
-```
-
-Full working `index.html` pattern — every field matters:
-
-```html
-<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/gsap.min.js"></script>
-<script src="hyper-shader-local.js"></script>
-
-<div id="root" data-composition-id="main" data-start="0" data-duration="TOTAL"
- data-width="1920" data-height="1080">
-
- <!-- Host divs: MUST have both id AND data-composition-id matching the same value.
- HyperShader.init() uses getElementById() — without id="beat-1" it fails with
- "scene ids not found in DOM". -->
- <div id="beat-1" class="scene"
- data-composition-id="beat-1-hook"
- data-composition-src="compositions/beat-1-hook.html"
- data-start="0" <!-- transition INTO this beat starts here -->
- data-duration="4.5" <!-- must match the GSAP BEAT constant in the composition -->
- data-track-index="1"
- data-width="1920" data-height="1080"
- style="background: #YOUR_BEAT_BG_COLOR;"><!-- background here OR in sub-comp CSS — both work -->
- </div>
-
- <div id="beat-2" class="scene"
- data-composition-id="beat-2-features"
- data-composition-src="compositions/beat-2-features.html"
- data-start="4.0"
- data-duration="5.5"
- data-track-index="2" <!-- use sequential track indices (1,2,3...) to avoid linter errors -->
- data-width="1920" data-height="1080"
- style="background: #YOUR_BEAT_BG_COLOR;">
- </div>
-
- <!-- ... more beats ... -->
-
- <!-- ALWAYS add a dummy s-end scene as the LAST entry.
- HyperShader renders scenes[N-1] as black in some contexts.
- s-end is invisible — it just prevents your CTA from being last. -->
- <div id="s-end" class="scene"
- data-composition-id="s-end"
- data-start="TOTAL_MINUS_0.1"
- data-duration="0.1"
- data-track-index="N"
- data-width="1920" data-height="1080">
- </div>
-
-</div>
-
-<script>
- window.__timelines = window.__timelines || {};
- var tl = HyperShader.init({
- bgColor: "#000000",
- accentColor: "#YOUR_ACCENT",
- scenes: ["beat-1", "beat-2", "beat-3", ..., "s-end"],
- transitions: [
- { time: 4.0, shader: "sdf-iris", duration: 0.7 }, // WebGL shader
- { time: 9.5, duration: 0.5 }, // CSS crossfade (no shader)
- // ... one transition per scene boundary ...
- { time: TOTAL_MINUS_0.1, duration: 0.1 } // dummy → s-end
- ],
- });
- // Add ALL beat animations to the returned tl AFTER init()
- window.__timelines["main"] = tl;
-</script>
-```
-
-**Track index and the linter:** Use sequential track indices (`data-track-index="1"`, `"2"`, `"3"`...) for each beat — NOT all on track `"1"`. The linter flags overlapping clips on the same track as an error, and HyperShader compositions always have overlapping beats (the transition window). Using sequential indices silences the linter; HyperShader manages which scene is VISIBLE via opacity regardless of track index.
-
-**Scene background colors:** setting `style="background: #3139FB"` on the host `<div id="beat-1">` in index.html is the simplest pattern — it's visible at a glance from the root file. Setting background inside the sub-composition's CSS also works. Either is fine; host div is preferred for clarity.
-
-**Critical: beat host divs must have sequential `data-start` and matching `data-duration`.** Do NOT set `data-start="0"` on all beats — the render engine seeks each beat's GSAP timeline to `global_time - data_start`. At t=10s with `data-start=0`, a 5.5s timeline is seeked past its end and all content disappears.
-
-`data-duration` must match the GSAP `BEAT` constant in the composition (the length of the sub-composition's internal timeline). If the two disagree, animations get cut off.
-
-**Storyboard Beat Timing section** tells you both values — use them directly:
-
-- `data-start` = "Transition in at:" value from the storyboard
-- `data-duration` = "GSAP duration:" value from the storyboard
-
-**Font handling:** Common fonts are auto-resolved by the renderer: use `"Inter"` (not `"Inter Variable"` — the compiler only maps the base name), `"Roboto"`, `"JetBrains Mono"`, `"Poppins"`. If a composition uses `"Inter Variable"` it will log compiler warnings and may fall back incorrectly — always use `"Inter"`. Only brand-specific fonts (GT Walsheim, Aeonik, etc.) need `@font-face`. Check `capture/assets/fonts/` — hashed filenames are Google Fonts subsets that auto-resolve; recognizable filenames (e.g. `BrandSans-Bold.woff2`) are brand fonts that need `@font-face` declarations.
-
-**Brand font @font-face:** If the storyboard's BRAND VALUES lists a brand-specific font with a path in `capture/assets/fonts/`, add the `@font-face` block at the top of each composition that uses it — sub-agents won't do this unless you tell them explicitly. Paste the exact `@font-face` declaration in the sub-agent prompt's BRAND VALUES section. Without this, every composition falls back to `system-ui` and the brand typeface never loads.
-
-**⚠ ASSET PATHS — most common sub-agent mistake (5+ agents per run):** When a composition references a captured accent (logo, gradient layer, hero illustration), the path must be relative to the **PROJECT ROOT**, not to the composition file. `compositions/beat-N.html` lives one directory deep, but paths must be written as if from the root.
-
-- ✅ `capture/assets/logo.svg`
-- ❌ `../capture/assets/logo.svg`
-
-The Studio preview server rewrites base URLs to the project root — `../` paths that seem to work locally will 404 in preview and in renders. Add this verbatim to every sub-agent prompt's RULES section.
-
-## 3. Build each composition — USE SUB-AGENTS
-
-**Before dispatching, re-read DESIGN.md and STORYBOARD.md.** You wrote these files earlier in the session and you think you remember them. You don't — not the exact hex values, not the specific font families, not the button border-radius, not the Do's/Don'ts. Re-read them now so you can paste accurate brand rules and beat specs into each sub-agent prompt.
-
-**If your runtime supports parallel sub-agents** (Claude Code, Cursor, most agent frameworks): dispatch one sub-agent per beat — 3 to 4× faster than building sequentially. For 3+ beats, always dispatch in parallel. For 1–2 beats, sequential is fine.
-
-**If your runtime does not support parallel sub-agents** (some Codex setups, serial-only models): build sequentially using the same context-packing template below. The template gives each build pass the same context a sub-agent would get — paste prev/this/next beat + brand values — so output quality is the same, just slower.
-
-In either case, use the template. Do not skip it and build from memory.
-
-Each sub-agent reads [beat-builder-guide.md](beat-builder-guide.md) — it has everything: rules, easing, file references, validation commands. **Do not try to paste all rules into the prompt yourself.** Instead, tell the sub-agent to read the guide file. You paste only the beat-specific context: the storyboard sections, brand values, and asset paths.
-
-```
-Build the composition for Beat N. Save to compositions/beat-N-name.html.
-
-FIRST: Locate and read the beat-builder guide. Your CWD is the project directory, so
-the skill lives outside it — run this to find it:
-
- find "$HOME" -path '*/website-to-video/references/beat-builder-guide.md' -maxdepth 10 2>/dev/null | head -1
-
-Read that file end to end. It has your full workflow, all rules, easing vocabulary,
-and file references. Follow its workflow exactly:
- build → lint (`npx hyperframes lint .`)
- → snapshot (`npx hyperframes snapshot . --frames 3`)
- → view contact sheet AND read snapshots/descriptions.md
- → fix issues
-
-After you finish, the main agent will READ your composition HTML top-to-bottom
-and cross-check it against DESIGN.md and STORYBOARD.md — does the brand bg/accent
-hex actually appear in your CSS, are the captured assets the storyboard called
-for actually referenced, is the headline ≥80px, does the GSAP timeline cover
-the full beat duration. Do the work honestly. Reports of "looks good" without
-the work being done will be caught when the main agent opens the file.
-
-═══ PREVIOUS BEAT (Beat N-1) ═══
-[paste the FULL previous beat section from STORYBOARD.md]
-
-═══ THIS BEAT (Beat N) ═══
-[paste the FULL beat section from STORYBOARD.md — this IS the build spec]
-
-═══ NEXT BEAT (Beat N+1) ═══
-[paste the FULL next beat section from STORYBOARD.md]
-
-═══ BRAND VALUES (from DESIGN.md) ═══
-Colors:
- --bg: #[hex] primary background
- --fg: #[hex] primary text
- --accent: #[hex] CTA / highlights
- --surface: #[hex] card / panel backgrounds
- [add more if needed]
-
-Fonts:
- Headlines: [font family], [weight]
- Body: [font family], [weight]
- [brand font path if needed: capture/assets/fonts/Brand.woff2]
-
-Key component styles:
- [paste relevant lines from DESIGN.md]
-
-═══ CAPTURED ASSETS FOR THIS BEAT ═══
-[Paste ACTUAL file paths + descriptions from asset-descriptions.md:
-
-- capture/assets/hero-dashboard.png — full-bleed product dashboard, dark theme
-- capture/assets/logo.svg — brand wordmark, white on transparent
-
-Do NOT say "see asset-descriptions.md". Paste the paths here.]
-```
-
-The storyboard beat already contains everything — the concept, the visual choreography with exact timings, the CSS values, the SFX cues. The sub-agent's job is to translate that description into working HTML/CSS/GSAP, not to re-invent the creative direction. If you want, you can also paste any other relative and useful context to subagents if think it's good, why not.
-
-### Per-composition process
-
-For each beat:
-
-**1. Read the storyboard beat.** The storyboard IS the build spec. It tells you what elements exist, how they enter, what they do during the beat, and how they exit. Follow it. If something in the storyboard isn't clear or seems impossible, research how to do it or ask — don't silently skip it.
-
-**2. Build the static end-state first.** Position every element at its most visible moment. HTML+CSS only, no GSAP yet. The CSS position is the ground truth.
-
-**3. Add the animation sequence.** Follow the storyboard's choreography — it specifies what happens and when. Use `tl.fromTo()` (not `tl.from()`) for entrances. Build the timeline in the order the storyboard describes.
-
-**4. Add exit** (if CSS transition out). If shader transition — no exit animation needed.
-
-**5. View the result.** After building, take a snapshot of this beat at different timestamps (where things are supposed to happen, animate, move and etc) and look at it from all angles, corners and positinos. Is the frame full and everything is exactly where it supposed to be? Are you sure??? Are elements readable? Does it match what the storyboard describes?
-
-### Technical rules
-
-- **No `repeat: -1`** — calculate exact repeats from beat duration
-- **No `Math.random()`** — use a seeded PRNG
-- **No bare `gsap.to()`** — all tweens on `tl`, never standalone
-- **No full-screen dark linear gradients** — H.264 banding
-- **Minimum fonts**: 80px+ headlines, 20px+ body
-- **WCAG contrast on gradient backgrounds:** The contrast validator samples actual background pixels under the text element — if the background is a gradient image, darker parts of the image make the measured ratio _worse_ when you darken the text color, not better. Fix: either place text over a solid-color zone, or add `data-layout-ignore` attribute to decorative labels that don't need WCAG compliance. Don't blindly darken text color when the background isn't solid.
-
-## 4. After all compositions are built — reconciliation check
-
-Before moving to Step 6, run this sanity check:
-
-```bash
-# List every file in compositions/ and verify each one has a host div in index.html
-ls compositions/
-```
-
-For every `.html` file in `compositions/`, confirm that `index.html` has a `data-composition-src="compositions/<filename>"` pointing to it. If any composition file is not referenced in `index.html`, add the missing host div now — an unreferenced composition is completely invisible at runtime.
-
-**Captions stub rule:** Never create a `compositions/captions.html` with an empty transcript (`const script = [];`). If the VO/transcript step was skipped or failed, do not create the captions composition at all. An empty captions file that returns immediately is worse than no captions file — it silently does nothing and wastes a track slot.
-
-### Parallel sub-agent snapshots are stale — re-snapshot after all complete
-
-When you dispatch sub-agents in parallel (one per beat), each sub-agent snapshots a project where sibling beats may not exist yet. Their per-beat snapshots are valid for THEIR beat in isolation, but **any snapshot at a beat boundary or during a shader transition will show the wrong content** — typically the previous beat's content because the next beat hasn't been built.
-
-Example: Beat 6's sub-agent took a snapshot at t=25.7s and saw Beat 1's content because Beat 5 didn't exist yet when Beat 6's sub-agent ran. The sub-agent reported this as "shader transition behavior showing previous scene" — a plausible-sounding but wrong diagnosis.
-
-**Required after all sub-agents complete:**
-
-```bash
-node /<repo-root>/packages/cli/dist/cli.js snapshot <project-dir> --frames <N>
-```
-
-where N follows the snapshot formula: `max(beats × 3, ceil(duration_seconds / 2))`. This is the canonical snapshot that Step 6's DoD uses — not any individual sub-agent's intermediate snapshots.
-
-Sub-agents' snapshots are still useful as per-beat sanity checks, but they are not the deliverable. The post-completion snapshot is. Don't skip it because "the sub-agents already snapshotted."
-
-## 5. Read each beat HTML top-to-bottom — REQUIRED gate before Step 6
-
-**This gate is non-skippable.** "I read it and it looks fine", "the sub-agent confirmed", "the snapshots look right" are NOT acceptable. Snapshots are 3 frames out of 300+ in motion — they hide everything that goes wrong between them.
-
-**Why this gate exists:** Earlier sessions had sub-agents reply "looks good, 0 errors" and the main agent trusted them — that's how videos shipped with mismatched colors, missing logos, headlines too small to read, and SFX firing 1 second late because the agent typed timestamps "by eye" instead of computing them.
-
-For each `compositions/beat-N.html`:
-
-1. **Open the file and read it top-to-bottom.** Not a glance. Not a grep. Read the `<style>` block, then the markup, then the `<script>` block.
-2. **Fill in this evidence block — every line, with quoted values from the file:**
-
-```
-Beat N: compositions/beat-N-NAME.html
- BG color in CSS: <hex from line Y> ← quote the exact line
- Accent color in CSS: <hex from line Z> ← quote the exact line
- Headline font-size: <px from line> (≥80? yes/no)
- Headline font-family: <stack from line> (matches DESIGN.md? yes/no)
- @font-face src paths: <list> (each path exists? yes/no)
- Captured assets used: <full list of paths from <img src=>, inline SVG ids, background-image url()>
- Storyboard called for: <list from STORYBOARD.md beat N>
- Assets match storyboard? yes/no — if no, specify the gap
- GSAP first event: tl.X("...", {...}, <t>) beat-local t=<num>
- GSAP last event: tl.X("...", {...}, <t>) beat-local t=<num>
- Beat duration: <N>s (events span full duration? yes/no)
- SFX trigger: <element> data-start=<num>
- Storyboard SFX line: "<quote the line>" → expected t=<num>
- SFX timestamp matches? yes/no — if no, specify the drift
- Technical gates: data-composition-id matches window.__timelines key? yes/no
- script INSIDE <template>? yes/no
- no Math.random / no repeat:-1 / no bare gsap.to? yes/no
- VERDICT: PASS / FIX (specify exactly what)
-```
-
-If you cannot fill any line (e.g., "I see no SFX trigger" or "headline font-family not specified"), that IS a finding — fix or escalate, don't paper over.
-
-3. **Open each frame in `snapshots/beat-N/`** and confirm visually that entrance/hold/exit match the storyboard.
-
-**Anything off — fix it inline (small CSS/GSAP correction) or re-dispatch the sub-agent with the specific problem quoted.** Do not move to Step 6 until every beat has its evidence block filled and PASS.
-
-### SFX timestamp computation — compute, don't eyeball
-
-Every SFX `data-start` value MUST be computed from STORYBOARD.md, not estimated visually.
-
-For each SFX entry:
-
-1. Storyboard names beat-local time (e.g. "Beat 2 at 1.2s into the beat").
-2. Get the beat's global start time from beat ordering (e.g. Beat 1: 0–3.5s → Beat 2 starts at 3.5s globally).
-3. Add beat-local + global start: `3.5 + 1.2 = 4.7s`.
-4. Write `data-start="4.7"` in index.html.
-
-**Forbidden:** writing `data-start="<approximate visual moment>"` by reading the storyboard and estimating by eye. The evidence block above MUST quote both the storyboard SFX line and the index.html `data-start` line — and confirm they match within ±0.1s (≈3 frames at 30fps; same tolerance `w2h-verify.mjs` enforces and `step-6-validate.md` uses for playback verification). A 1-second drift is not a rounding error; it's a build failure.
-
-### Surface recurring sub-agent workarounds to the user
-
-When 2+ sub-agents independently report the same workaround (e.g., "I had to base64-encode the data URI because the linter false-positives on inline SVG"), that's a tooling bug worth surfacing. List these in your Step 5 final report under "Tooling issues encountered" even if each instance was resolved. Format:
-
-```
-TOOLING ISSUES (worth filing):
-- 3 sub-agents (beats 1, 4, 6) hit `root_missing_composition_id` false positive on
- inline SVG data URI in CSS. Workarounds: base64 (beat 1), removed overlay (beats 4, 6).
- Worth filing as a regression against packages/core/src/lint.
-```
-
-Burying recurring workarounds means the next session hits the same bug and works around it again. Don't.
-
-### Brand-defaults check (whole-video, after every beat passes its own read)
-
-These are defaults for most brand videos, not hard requirements:
-
-- First beat references the brand logo / wordmark SVG from `capture/assets/svgs/`
-- Last beat references the brand logo / wordmark
-- The site's signature visual (hero illustration, gradient wave, distinctive UI mark) shows up at least once
-
-If any are missing, check the storyboard — if STORYBOARD.md deliberately delays brand reveal or omits the signature visual for a concept reason, that's fine. If the omission was unintentional, fix it (or ask the main agent / user before adding).
-
-Once every beat reads clean, move to Step 6 (Validate & Deliver) for lint, validate, snapshots, and visual review.
diff --git a/skills/website-to-video/references/step-6-validate.md b/skills/website-to-video/references/step-6-validate.md
deleted file mode 100644
index 87bedd5093..0000000000
--- a/skills/website-to-video/references/step-6-validate.md
+++ /dev/null
@@ -1,341 +0,0 @@
-# Step 6: Validate & Deliver
-
-This is the quality gate. Before the user sees anything, YOU verify that the video matches the storyboard, the creative direction from Step 2, and DESIGN.md. Deliver something you'd be proud to post with your name on it.
-
-## Definition of Done — required before ANY preview or summary
-
-**You may not say the video is ready, looks good, or present a preview URL until every item below is checked.** No exceptions. Do not summarize your impressions — paste the actual evidence for each.
-
-Score each item 1–5. If any item scores below 3, fix it before continuing. **Do not rush these.** Each checkbox is its own pass through the artifacts — slow down, look at every frame, write the actual observation, not a summary impression.
-
-```
-[ ] Every beat HTML read top-to-bottom → see "Per-beat file read" below; paste the per-beat verdict
-[ ] Lint: zero errors → paste the lint output (not "lint passed")
-[ ] Snapshot taken, N frames confirmed → state the exact frame count
-[ ] descriptions.md read in full → quote the WORST frame Gemini described, verbatim
-[ ] Contact sheet viewed cell-by-cell → for EACH beat, one sentence: what's in frame, what's moving, what brand assets are present
-[ ] No mid-video dark frames → state explicitly which frames (if any) are dark and why
-[ ] Brand assets actually visible → for each beat, name which captured SVG / illustration / screenshot is on screen and at what timestamp. If a beat shows zero captured assets, justify why.
-[ ] Audio duration matches video ±0.5s → paste both numbers
-[ ] animation-map.json generated → run `node <repo-root>/skills/hyperframes/scripts/animation-map.mjs <project-dir>`; confirm every beat has events listed and no bbox/flag warnings
-[ ] w2h-verify report → run `node <repo-root>/skills/website-to-video/scripts/w2h-verify.mjs <project-dir>`; paste the FULL output (every row, every percent) verbatim into your final user-facing summary — see "w2h-verify — the source of truth" below
-[ ] Audio + motion verification done → see "Audio + motion verification" below; played the full preview, confirmed SFX lands at storyboard timestamps
-[ ] Critic sub-agent run → paste its single biggest quality gap finding, verbatim
-```
-
-### w2h-verify — the source of truth
-
-The skill ran for months on agents reading "REQUIRED" and skipping anyway. The verify script ends that — it computes facts the agent cannot fudge:
-
-- **Required artifacts present** (STORYBOARD.md, DESIGN.md, SCRIPT.md, index.html)
-- **Brand visuals used** — at least 1 beat must reference a captured `hero-*`, `image-*`, or `svgs/*.svg` asset (logo doesn't count). Catches the "9% asset usage / brand isn't visually present" failure.
-- **Headline font-size** — per-beat, the largest CSS `font-size` must be ≥80px. Catches the "headlines too small to read" failure that surfaces later as inspect `clipped_text` errors.
-- **Timeline coverage** — per-beat, GSAP event positions must span ≥70% of the beat's `data-duration`. Catches "webpage not shot" failures where the beat has entrance tweens then goes static.
-- **Shader transitions consistency** — shaders declared in STORYBOARD.md must appear in index.html (with HyperShader runtime present, not just as SFX file references).
-- **SFX timestamp drift** — storyboard `t=X.Xs` vs index.html `data-start=X.X`, picks the closest index timestamp per file for multi-timestamp SFX.
-- **Beat duration consistency** — storyboard's beat ranges (`B4 — Name | 16.600 – 21.000s |`) must match `data-duration` in index.html within ±0.5s. Catches storyboard staleness.
-- **Rendered MP4 existence** — INFO only; flagged when claiming verified motion without rendering.
-
-Run it as the LAST gate in your DoD pass, after fixing everything else:
-
-```bash
-node <repo-root>/skills/website-to-video/scripts/w2h-verify.mjs <project-dir>
-```
-
-(Locate the repo root from a project subdirectory: `find "$HOME" -path '*/skills/website-to-video/scripts/w2h-verify.mjs' -maxdepth 10 2>/dev/null | head -1`.)
-
-**The script's output is the deliverable.** Paste the entire report — the table, the percentages, the FAIL lines — verbatim into your final user-facing summary, in the "What I verified" / "What I did NOT verify" section. The user will read it directly. You don't get to summarize, simplify, or omit rows.
-
-**If any row says FAIL:**
-
-- Either fix the underlying issue and re-run until the row says PASS
-- Or include the FAIL row verbatim in your final summary's "What I did NOT verify" section with a one-sentence explanation of why you chose not to fix it
-
-**Forbidden:**
-
-- Hand-writing your own verification summary that doesn't match the script's output
-- Cherry-picking which rows to include
-- Replacing percentages with adjectives ("most assets used" instead of "8%")
-- Running the script, seeing FAIL, and not mentioning it
-
-The script's exit code is 0 (all pass) or 1 (one or more fail). If you ship with exit=1, the user knows from the report exactly what they're getting.
-
-### Per-beat file read
-
-This is what verification means now: you open each `compositions/beat-N.html` and read it top-to-bottom against DESIGN.md and STORYBOARD.md. Step 5 already required this once before advancing here — repeat it here as the final check, in case fixes during Step 5 introduced new problems.
-
-For each beat, write a per-beat verdict in this form:
-
-```
-Beat N (Ns–Ns) — <name>
- CSS bg: <hex> (DESIGN.md says <hex>, matches: yes/no)
- CSS accent: <hex> (DESIGN.md says <hex>, matches: yes/no)
- Headline font-size: <px> (≥80: yes/no)
- Captured assets referenced: <list of paths from <img>, inline SVG, background-image> (storyboard called for: <list>)
- GSAP timeline coverage: events from <first t> to <last t>, beat duration <N>s (full coverage: yes/no)
- Storyboard alignment: <one sentence — does this beat deliver what its STORYBOARD.md section described>
- VERDICT: PASS / NEEDS FIX (<what specifically>)
-```
-
-The pre-fix-era flow took longer specifically because it caught these problems. Don't trade the careful look for a green checkmark.
-
-**Why this matters:** The natural tendency is to look at a contact sheet, see that content is present, and declare it done. That is not verification — that is pattern-matching to a completion signal. Verification means opening every file the sub-agents produced, reading every line, and reporting the raw result. "Frame 7 at 14.2s shows the Raycast logo SVG drawing its final stroke at 0.85 opacity against #07080A, the headline 'Crush your sprint' has settled in 96px Inter SemiBold below" is evidence. "The video looks great" is not.
-
----
-
-## Lint + Validate + Snapshot
-
-The `hyperframes` skill (which you loaded in Step 5) already covers the mechanics of linting, validating, and snapshotting. Follow those rules — run lint, validate, take snapshots scaled to the video length (formula: `max(beats × 3, ceil(duration_seconds / 2))`). Fix errors. This step adds the **pipeline-specific verification** on top of that.
-
-**Errors:** Fix ALL of them. These are real problems — missing timeline registration, broken scripts, missing assets.
-
-**Warnings:** Read each one and decide. Some are real quality issues you must fix:
-
-- **GSAP tween overlaps** — elements fighting over the same property = visual glitches
-- **Unscoped selectors** — will target elements in ALL compositions when bundled, causing data loss
-- **Missing `class="clip"`** — element visible for entire video instead of its scheduled time
-- **Missing `data-start` on root** — playback won't begin
-
-Some are style suggestions you can safely ignore:
-
-- **File too large** — composition works fine, just harder to read
-- **Deprecated attributes** (data-layer, data-end) — still work, just not preferred
-- **Dense tracks** — informational, not a bug
-
-**WCAG contrast warnings — per-warning verification, not blanket dismissal.**
-
-The validator samples text colors at fixed timestamps. Elements at `opacity: 0` (pre-entrance) or mid-fade get measured as if fully visible — real false positives exist. BUT this is a per-warning judgment, not a blanket excuse.
-
-**For EACH warning the validator emits, paste this block in your verdict:**
-
-```
-Warning N: <quote the validator output verbatim>
- Element: <selector>
- Sampled timestamp: t=<n>
- At t=<n>, is this element on-screen at full opacity? (yes/no — confirm by viewing snapshot at that timestamp)
- Verdict: REAL ISSUE / SAMPLING ARTIFACT (justify in one sentence)
- Action: <hex change at line N> OR NONE because <reason>
-```
-
-**Forbidden:** writing "the N warnings are mostly transition-window false positives" without per-warning evidence. That phrasing alone fails the gate. The validator does not report 158 warnings as a group — it reports them individually, and you verify them individually.
-
-Don't blindly ignore. Don't blindly fix. Verify each.
-
-## Visual Verification (snapshot)
-
-After lint and validate pass, capture snapshot frames to SEE your own output. **Take many snapshots — as much as you can actually read and view all of them without hitting diminishing returns**. This is your only visual feedback before the user sees the project. You wanna be honored and proud of what you give to the user.
-
-Scale snapshot count to the video — not a fixed number. Formula: `max(beats × 3, ceil(duration_seconds / 2))`. A 3-beat 10s video: max(9, 5) = 9 frames. An 8-beat 60s video: max(24, 30) = 30 frames. Aim for at least 3 frames per beat: entrance, hold, and near-exit.
-
-```bash
-# The CLI auto-loads .env from the current working directory, so a
-# .env file in <project-dir> with GEMINI_API_KEY=... is enough — no
-# explicit `export` needed. If you've set GEMINI_API_KEY in your shell
-# environment, that works too.
-npx hyperframes snapshot <project-dir> --frames <N>
-
-# Pass a custom question to Gemini instead of the default prompt:
-npx hyperframes snapshot <project-dir> --frames <N> \
- --describe "Is the brand logo visible in every beat? Is any beat showing a black or blank frame?"
-```
-
-Output lands in `<project-dir>/snapshots/`. Gemini writes `snapshots/descriptions.md` automatically.
-
-**If `descriptions.md` is missing or empty after the snapshot:** `GEMINI_API_KEY` was not set — confirm it's in `<project-dir>/.env` (the CLI loads .env from CWD) or in your shell environment. Re-run after fixing.
-
-**Fallback if Gemini is genuinely unavailable** (no key, key invalid, or quota exhausted): use your own image-reading capability to inspect each frame in `snapshots/` directly. For each frame, write one sentence describing what's on screen — focus on the dimensions Gemini would catch (blank/dark frames, missing brand assets, text legibility, layout problems). Save these descriptions as `snapshots/descriptions.md` yourself so the rest of the checklist still has a single source of truth. State explicitly in your verdict that descriptions were agent-authored, not Gemini-authored, so the user knows to spot-check.
-
-**Gemini descriptions will flag two frames as "blank/black" — these two are expected and not bugs:**
-
-- `frame-00-at-0.0s.png` — always dark, animations haven't started
-- The last frame of the video — always dark, the s-end dummy scene is intentionally invisible
-
-Every other frame described as "black," "blank," "no visible content," or "loading screen" in the middle of the video IS a bug. Investigate and fix it.
-
-**Two required reads — both, not one. Then a per-beat verdict.**
-
-1. **Read `snapshots/descriptions.md`** — Gemini's objective written analysis of every frame. Read every line. Do not skim.
-
-2. **View `snapshots/contact-sheet.jpg` cell-by-cell.** Not a glance. Look at every cell, name what's in it. Past agents have reported "contact sheet looks good" after a single scan and missed: a beat that was visually black for 80% of its duration, a logo placed off-screen, a headline clipped at the canvas edge, captions running off the bottom. The contact sheet is the only place these failures are visible together. **For each cell, write one sentence: what's in frame, what's moving, which brand assets are present, anything that looks wrong.** If you find yourself wanting to summarize the contact sheet as a whole, stop and go back to cell-by-cell.
-
-After reading both, write a per-beat verdict for every beat:
-
-```
-Beat 1 (0.0s–4.5s): [what Gemini described] | [what contact sheet shows] | PASS / NEEDS FIX
-Beat 2 (4.0s–9.5s): ...
-Beat 3 ...
-CTA beat: ...
-```
-
-A beat PASSES only if:
-
-- Gemini description matches what STORYBOARD.md says should be happening
-- Contact sheet shows visible content (not black, not blank, not loading)
-- Brand colors/fonts visible
-- No elements clipped or mispositioned
-
-A beat that "has some content" does not automatically pass. Compare against what was _planned_, not just "something is there."
-
-**If any beat fails: fix it, re-snapshot, re-read descriptions.md, re-write the per-beat verdict from scratch.** Do not carry forward old verdicts after a fix — re-evaluate everything because fixes can break adjacent beats.
-
-**Keep iterating until every beat passes.** There is no time limit. A video with one black CTA beat is not done.
-
-## Critic Sub-Agent — do not skip
-
-**This is not optional. Run it after your per-beat verdicts all pass — before you start preview.**
-
-Spawn a sub-agent with this exact prompt:
-
-```
-You are a senior motion designer and creative director reviewing a brand video before it ships. You have high standards and have seen hundreds of these.
-
-Read these files:
-- STORYBOARD.md (what was planned)
-- DESIGN.md (brand rules)
-- snapshots/descriptions.md (what Gemini sees in each frame)
-- snapshots/contact-sheet.jpg (view it)
-
-Score each dimension 1–5. Be specific — name the beat and timestamp for every problem you identify.
-
-1. **Beat execution** (1–5): Does every beat deliver what STORYBOARD.md planned? Name any beat that underdelivers and what exactly is wrong.
-2. **Brand accuracy** (1–5): Does this feel made for THIS brand specifically, or could it be for any company? Name one element that is distinctly on-brand and one that is generic.
-3. **Captured asset utilization** (1–5): The user captured the brand's actual SVG logos, hero illustrations, and screenshots into `capture/assets/`. Are they on screen in this video, or did the agents recreate everything from divs and CSS? List which captured assets appear in which beats. If beats are missing them, flag it — a video that recreates everything in CSS is generic, not branded.
-4. **Visual quality** (1–5): Any blank frames, clipped text, centering failures, invisible elements? Cite exact frame timestamps.
-5. **Motion design** (1–5): Do animations feel intentional and polished, or default and mechanical? Name the weakest transition and why.
-6. **CTA beat** (1–5): Is the final beat clear, centered, readable, and does it hold long enough? Describe exactly what is visible on the CTA frame.
-
-End with: What is the single most important fix before this ships? Name the beat, the element, and the specific change.
-
-If you cannot find any problems and want to score everything 4–5, you are not looking hard enough. Look again.
-```
-
-Read every score. Fix anything below 3 before showing the user. If the CTA scores below 3, fix the CTA. Do not rationalize low scores as "the user can decide."
-
-## Audio + motion verification — three paths, pick one
-
-Snapshots are silent stills. 18 PNG snapshots from a 30s 30fps video = 18/900 = 2% of frames. The other 98% — including all motion, all transitions, all audio — is unverified by snapshots alone. "Confirmed via snapshot" is not coverage.
-
-You MUST do ONE of these three paths before declaring done:
-
-### Path 1 (preferred): Play the preview
-
-Open the Studio URL in a browser via Playwright (or another browser tool you have). Play start-to-end at 1.0× speed (NOT scrubbed). Confirm:
-
-```
-[ ] Played full video front-to-back at 1.0× — actually played, not scrubbed
-[ ] For each SFX in STORYBOARD.md: sound lands at the visual moment within ±0.1s
- (Beat N SFX `<file>`: storyboard says t=<x>s → heard at t=<y>s → drift <z>s)
-[ ] Narration delivers the right line per beat (no off-by-one or missing lines)
-[ ] No moments where audio is present but visual is mid-transition unintentionally
-[ ] Audio audible and not clipped/peaked
-```
-
-### Path 2: Render a low-res MP4 and read it frame-by-frame
-
-When Playwright isn't available, render at 540p (fast — ~30s for a 30s video) and read the MP4:
-
-```bash
-node /<repo-root>/packages/cli/dist/cli.js render <project-dir> \
- --width 960 --height 540 --quality medium
-```
-
-Then sample the resulting MP4 at minimum 5fps (use `ffmpeg -i <mp4> -r 5 frames/frame-%04d.png` if needed). Read those frames sequentially. For each SFX moment in STORYBOARD.md, find the corresponding frame and confirm the visual matches.
-
-### Path 3 (last resort): Explicit deferred disclosure with quantified gap
-
-If neither Path 1 nor Path 2 is possible in this session, your final summary MUST contain this verbatim:
-
-```
-**Audio + motion verification: NOT POSSIBLE in this session.**
-- Snapshots cover: <N> frames out of <video_duration × fps> total (<percentage>% coverage)
-- NOT verified: motion between snapshots, SFX/visual timing alignment, shader transition smoothness, audio mix levels, narration sync to beats
-- Recommended user action: open the preview URL above and play start-to-end; flag anything that feels off
-```
-
-**Forbidden everywhere:**
-
-- "Confirmed via snapshot" or "snapshots look right" as audio/motion evidence
-- "Preview is running, looks good" without actually playing it
-- Path 3 disclosure that omits the quantified coverage gap (the percentage is mandatory)
-
-## Preview (always do this)
-
-Always start the preview so the user can see and scrub through the project:
-
-```bash
-npx hyperframes preview
-```
-
-The Studio URL is the deliverable. In your final response, always include it:
-
-```text
-http://localhost:<port>/#project/<project-name>
-```
-
-Use the actual port and project name from the preview command output. Do NOT present `index.html` as the project link — that's the source file. The user-facing project is the running Studio preview.
-
-### Honest disclosure — REQUIRED in your final summary
-
-Your final message to the user MUST end with these two sections, even if everything passed. Both sections appear AFTER the preview URL, BEFORE you stop talking.
-
-```
-**What I verified:**
-- <one bullet per DoD item that passed, with the actual evidence cited inline>
- (e.g. "Lint: zero errors — output pasted above")
- (e.g. "Per-beat read: 7/7 beats PASS, evidence blocks above")
- (e.g. "WCAG: 3 warnings flagged, all 3 verified as sampling artifacts — see verdicts above")
-
-**What I did NOT verify (spot-check these):**
-- <one bullet per item you skipped, deferred, or could not complete — and why>
- (e.g. "Audio + motion verification deferred — no Playwright in this session. SFX timing is computed but unconfirmed in playback.")
- (e.g. "animation-map.json skipped — script not found at expected path; manually confirmed timeline coverage in per-beat reads instead.")
- (e.g. "Beat 5 has a 0.4s window where the doc card is visible but contents are still opacity 0 — sub-agent flagged it, I chose not to fix because it was below my threshold; worth your eye.")
-```
-
-The user reads this section to know what to spot-check.
-
-**UNACCEPTABLE final summaries:**
-
-- "Looks great, ready to ship" (no disclosure)
-- "All checks pass" (when one was actually skipped)
-- "Sub-agents confirmed everything" (delegating trust without verifying)
-- Omitting the "What I did NOT verify" section because you happened to verify everything (still include it — write "None" if true, but the section header must appear).
-
-Lying or omitting here is worse than skipping a check honestly. A short user spot-check beats a hidden broken video every time.
-
-## Render (on-demand only)
-
-**Do NOT render automatically.** Preview is the delivery — the user scrubs, spots tweaks, and you iterate. Rendering takes minutes per pass and is wasted if the user wants changes.
-
-Only render when the user **explicitly asks** — "render it", "make the final", "export the MP4", "I'm happy, produce the file."
-
-When rendering, **always specify quality and resolution explicitly.** Don't use defaults silently — pick the right settings for the use case and tell the user what you're rendering:
-
-```bash
-# Standard quality, 1080p landscape (default for most videos)
-npx hyperframes render --skill=website-to-video --output renders/<name>.mp4 --quality standard --fps 30
-
-# High quality for final delivery
-npx hyperframes render --skill=website-to-video --output renders/<name>.mp4 --quality high --fps 30
-
-# Portrait for Instagram Stories / TikTok
-npx hyperframes render --skill=website-to-video --output renders/<name>.mp4 --quality standard --fps 30 --resolution portrait
-
-# 4K for premium output
-npx hyperframes render --skill=website-to-video --output renders/<name>.mp4 --quality high --fps 30 --resolution 4k
-```
-
-**Available options:**
-
-| Flag | Values | Notes |
-| ----------------- | ------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------- |
-| `--quality` | `draft`, `standard`, `high` | draft = fast/low, standard = balanced, high = slow/best |
-| `--fps` | `24`, `30`, `60` | 30 is standard, 24 for cinematic feel, 60 for smooth motion |
-| `--resolution` | `landscape` (1920×1080), `portrait` (1080×1920), `landscape-4k` (3840×2160), `portrait-4k` | Aliases: `1080p`, `4k`, `uhd` |
-| `--format` | `mp4`, `webm`, `mov`, `png-sequence` | mp4 default. mov/webm for transparency. png-sequence for AE/Nuke |
-| `--output` | path | Always set to `renders/<project-name>.mp4` for readable names |
-| `--gpu` | flag | Use GPU encoding if available (faster) |
-| `--crf` | integer | Override encoder quality (lower = better, mutually exclusive with --video-bitrate) |
-| `--video-bitrate` | e.g. `10M` | Target bitrate (mutually exclusive with --crf) |
-
-Tell the user what you're rendering and why: "Rendering at standard quality, 1080p landscape, 30fps — this gives good quality with reasonable render time. Want me to use high quality or 4K instead?"
diff --git a/skills/website-to-video/scripts/w2h-verify.mjs b/skills/website-to-video/scripts/w2h-verify.mjs
deleted file mode 100644
index e1aeebb272..0000000000
--- a/skills/website-to-video/scripts/w2h-verify.mjs
+++ /dev/null
@@ -1,759 +0,0 @@
-#!/usr/bin/env node
-// w2h-verify.mjs — verification report for a website-to-video project.
-//
-// Computes quality signals the agent cannot fudge. Each check is designed to
-// catch a specific failure mode observed across three real agent debriefs.
-// Result becomes the Step 6 deliverable — paste verbatim into the final
-// user-facing summary so the user sees exactly what shipped.
-//
-// Pure file analysis. No shell spawns. Run lint + inspect separately and
-// paste alongside.
-//
-// Usage:
-// node skills/website-to-video/scripts/w2h-verify.mjs <project-dir>
-//
-// Exit codes:
-// 0 = all gates pass
-// 1 = one or more gates failed
-// 2 = script error (project-dir missing, etc.)
-
-import { readFile, readdir } from "node:fs/promises";
-import { join, resolve } from "node:path";
-import { existsSync } from "node:fs";
-
-const PROJECT_DIR = resolve(process.argv[2] || ".");
-
-// Thresholds — change here, not by interpretation.
-const HEADLINE_MIN_PX = 80; // 80px floor for primary headline at 1920×1080
-const TIMELINE_COVERAGE_MIN = 0.7; // max GSAP event position must reach ≥70% of beat duration
-const SFX_DRIFT_TOLERANCE_S = 0.1; // 3 frames at 30fps; matches step-5 evidence rule + step-6 playback floor
-const BEAT_DURATION_DRIFT_TOLERANCE_S = 0.5;
-
-const SHADER_NAMES = [
- "cross-warp-morph",
- "cross-warp",
- "cinematic-zoom",
- "gravitational-lens",
- "glitch",
- "light-leak",
- "flash-through-white",
- "whip-pan",
- "domain-warp",
- "thermal-bloom",
- "swirl",
- "ridged-noise",
- "sdf-reveal",
- "chromatic-aberration",
- "ripple",
-];
-
-// ─── Main ────────────────────────────────────────────────────────────────────
-
-async function main() {
- if (!existsSync(PROJECT_DIR)) {
- console.error(`✗ Project directory not found: ${PROJECT_DIR}`);
- process.exit(2);
- }
-
- const results = [];
- results.push(await checkRequiredArtifacts());
- results.push(await checkBrandVisualsUsed());
- results.push(await checkPerBeatHeadlineSize());
- results.push(await checkPerBeatTimelineCoverage());
- results.push(await checkShaderTransitionsConsistency());
- results.push(await checkSfxTimestampConsistency());
- results.push(await checkBeatDurationConsistency());
- results.push(await checkMp4Exists());
-
- printReport(results);
-
- const anyFail = results.some((r) => r.status === "FAIL");
- process.exit(anyFail ? 1 : 0);
-}
-
-// ─── Checks ──────────────────────────────────────────────────────────────────
-
-async function checkRequiredArtifacts() {
- const required = ["STORYBOARD.md", "DESIGN.md", "SCRIPT.md", "index.html"];
- const missing = required.filter((f) => !existsSync(join(PROJECT_DIR, f)));
- if (missing.length === 0) {
- return { name: "Required artifacts", status: "PASS", detail: required.join(", ") };
- }
- return {
- name: "Required artifacts",
- status: "FAIL",
- detail: `missing: ${missing.join(", ")}`,
- };
-}
-
-// Catches the biggest failure mode: agent uses only the logo and rebuilds
-// every "hero illustration" from CSS, ignoring the brand's actual visual identity.
-async function checkBrandVisualsUsed() {
- const compositions = await readBeatCompositions();
- if (compositions.length === 0) {
- return { name: "Brand visuals used", status: "INFO", detail: "no beat compositions found" };
- }
-
- // A "brand visual" is anything captured under capture/assets/ that ISN'T:
- // - a font file
- // - a logo file (filename contains "logo")
- // - a favicon / apple-touch-icon
- // i.e., hero-*.jpg, image-*.png, illustrations, photographs, svgs/<icons>.svg
- const brandRegex =
- /capture\/assets\/(?!fonts\/)(?:svgs\/)?(?!.*(?:logo|favicon|apple-touch-icon))[\w-]+\.(?:jpg|jpeg|png|svg|webp|gif)/gi;
- const beatsUsingBrand = [];
- for (const beat of compositions) {
- const matches = beat.content.match(brandRegex) || [];
- if (matches.length > 0) {
- beatsUsingBrand.push({ beat: beat.name, count: new Set(matches).size });
- }
- }
-
- const pass = beatsUsingBrand.length >= 1;
- if (pass) {
- return {
- name: "Brand visuals used",
- status: "PASS",
- detail: `${beatsUsingBrand.length}/${compositions.length} beats reference a hero/image/svg captured asset`,
- extra:
- beatsUsingBrand.length === 1
- ? "Only 1 beat uses a captured visual — consider whether the brand's hero illustrations or signature graphics fit other beats too."
- : null,
- };
- }
- return {
- name: "Brand visuals used",
- status: "FAIL",
- detail: `0/${compositions.length} beats reference any hero-*/image-*/svgs/ captured asset (logo doesn't count)`,
- extra:
- "Open capture/assets/contact-sheet-*.jpg and capture/assets/svgs/contact-sheet-*.jpg. The brand's actual visuals are sitting there. Rebuilding them in CSS erases what makes the brand recognizable.",
- };
-}
-
-// Catches "headlines too small to read" — inspect typically catches the
-// overflow afterward, but this catches the cause earlier.
-async function checkPerBeatHeadlineSize() {
- const compositions = await readBeatCompositions();
- if (compositions.length === 0) {
- return { name: "Headline font-size", status: "INFO", detail: "no beat compositions found" };
- }
-
- // Only flag beats where the LARGEST font-size is in the "aspiring headline
- // but too small" range (40–<80px). Below 40px = the beat has no headline by
- // design (UI labels, code text, decorative). ≥80px = proper headline.
- // This skips legitimate non-headline beats (terminal beats, SVG-only beats,
- // pure-image beats) without losing the real "headline too small" signal.
- const HEADLINE_FLOOR_FOR_CHECK = 40;
- const offenders = [];
- const skipped = [];
- for (const beat of compositions) {
- const sizes = [...beat.content.matchAll(/font-size:\s*(\d+(?:\.\d+)?)px/g)].map((m) =>
- parseFloat(m[1]),
- );
- if (sizes.length === 0) {
- skipped.push({ beat: beat.name, reason: "no font-size declared" });
- continue;
- }
- const max = Math.max(...sizes);
- if (max < HEADLINE_FLOOR_FOR_CHECK) {
- skipped.push({ beat: beat.name, reason: `largest font is ${max}px — no headline by design` });
- continue;
- }
- if (max < HEADLINE_MIN_PX) {
- offenders.push({ beat: beat.name, maxSize: max });
- }
- }
-
- const pass = offenders.length === 0;
- const checked = compositions.length - skipped.length;
- return {
- name: "Headline font-size",
- status: pass ? "PASS" : "FAIL",
- detail: pass
- ? `${checked}/${compositions.length} beats with a headline-sized text element, all ≥${HEADLINE_MIN_PX}px`
- : `${offenders.length} beat(s) with headline-sized text below ${HEADLINE_MIN_PX}px floor`,
- extra: pass
- ? null
- : [
- ...offenders.map((o) => `${o.beat}: largest font-size is ${o.maxSize}px`),
- ...(skipped.length > 0
- ? [
- `(skipped ${skipped.length} beat(s) with no headline-sized text: ${skipped.map((s) => s.beat).join(", ")})`,
- ]
- : []),
- ].join("\n "),
- };
-}
-
-// Catches "webpage not shot" failures — entrance tweens in the first second
-// then nothing. Snapshots look fine (static end state) but motion is dead.
-async function checkPerBeatTimelineCoverage() {
- const compositions = await readBeatCompositions();
- const beatDurations = await readBeatDurationsFromIndex();
- if (compositions.length === 0) {
- return { name: "Timeline coverage", status: "INFO", detail: "no beat compositions found" };
- }
-
- const offenders = [];
- const skipped = [];
- // Pattern detectors: beats that use these idioms have events at positions
- // the static parser can't read (loop iterators, variable arithmetic).
- // Don't flag them as "webpage not shot" — they have events the parser
- // simply can't see. Note: single-tween yoyo/repeat is NOT enough to skip
- // — it only oscillates one element, not the whole beat.
- const dynamicPatterns = [
- {
- name: "forEach with tweens",
- re: /\.forEach\s*\([^{]*\{[\s\S]{0,2000}?\btl\.(?:to|set|fromTo|from)\(/,
- },
- {
- name: "for-loop with tweens",
- re: /\bfor\s*\([^)]*\)\s*\{[\s\S]{0,2000}?\btl\.(?:to|set|fromTo|from)\(/,
- },
- ];
-
- for (const beat of compositions) {
- const beatId = beat.name.replace(/\.html$/, "");
- const dur = beatDurations[beatId] ?? beatDurations[beat.name];
- if (!dur) {
- skipped.push({ beat: beat.name, reason: "no data-duration in index.html" });
- continue;
- }
-
- // Check for dynamic patterns first — if present, coverage cannot be
- // statically determined; treat as informational, not a failure.
- const matchedDynamic = dynamicPatterns.find((p) => p.re.test(beat.content));
- if (matchedDynamic) {
- skipped.push({
- beat: beat.name,
- reason: `dynamic event pattern detected (${matchedDynamic.name}) — coverage not statically measurable`,
- });
- continue;
- }
-
- // Long-duration tween check: if there's a tween with duration ≥ 70% of
- // beat duration, that single tween covers the whole beat — likely a
- // camera dolly, breathing animation, or persistent motion. Skip the
- // position-based coverage check.
- const durationRe = /\btl\.(?:to|set|fromTo|from)\([\s\S]{0,500}?duration:\s*([0-9.]+)/g;
- let dm;
- let hasLongTween = false;
- let longTweenDur = 0;
- while ((dm = durationRe.exec(beat.content)) !== null) {
- const d = parseFloat(dm[1]);
- if (d >= dur * TIMELINE_COVERAGE_MIN) {
- hasLongTween = true;
- longTweenDur = d;
- break;
- }
- }
- if (hasLongTween) {
- skipped.push({
- beat: beat.name,
- reason: `long-duration tween covers ${longTweenDur.toFixed(2)}s of ${dur.toFixed(2)}s beat — full coverage via persistent motion`,
- });
- continue;
- }
-
- // Extract GSAP event positions for static cases.
- // Use balanced-paren scanning so multi-line calls and rgba(...) values
- // inside option objects don't false-match.
- const positions = extractTopLevelPositionArgs(beat.content);
- if (positions.length === 0) {
- offenders.push({ beat: beat.name, reason: "no GSAP events with explicit position found" });
- continue;
- }
-
- const maxPos = Math.max(...positions);
- const coverage = maxPos / dur;
- if (coverage < TIMELINE_COVERAGE_MIN) {
- offenders.push({
- beat: beat.name,
- reason: `static events span 0–${maxPos.toFixed(2)}s of ${dur.toFixed(2)}s beat (${Math.round(coverage * 100)}%)`,
- });
- }
- }
-
- const pass = offenders.length === 0;
- const checked = compositions.length - skipped.length;
- return {
- name: "Timeline coverage",
- status: pass ? "PASS" : "FAIL",
- detail: pass
- ? `${checked}/${compositions.length} statically-measurable beats span ≥${Math.round(TIMELINE_COVERAGE_MIN * 100)}% of duration`
- : `${offenders.length} beat(s) below ${Math.round(TIMELINE_COVERAGE_MIN * 100)}% static coverage — likely "webpage not shot" failures`,
- extra:
- [
- ...offenders.map((o) => `${o.beat}: ${o.reason}`),
- ...(skipped.length > 0 ? skipped.map((s) => `(skipped ${s.beat}: ${s.reason})`) : []),
- ].join("\n ") || null,
- };
-}
-
-async function checkShaderTransitionsConsistency() {
- const storyboardPath = join(PROJECT_DIR, "STORYBOARD.md");
- const indexPath = join(PROJECT_DIR, "index.html");
- if (!existsSync(storyboardPath) || !existsSync(indexPath)) {
- return {
- name: "Shader transitions",
- status: "INFO",
- detail: "STORYBOARD.md or index.html missing — cannot check",
- };
- }
-
- const storyboard = await readFile(storyboardPath, "utf-8");
- const index = await readFile(indexPath, "utf-8");
-
- // For each shader name, count it as "declared" only if it appears in a
- // transition-use context — NOT in an inventory list (3+ names on one line)
- // and NOT exclusively as part of an SFX filename (sfx/glitch-1.mp3).
- const sbLines = storyboard.split("\n");
- // Longest-name matching to avoid substring double-counting.
- const sortedNames = [...SHADER_NAMES].sort((a, b) => b.length - a.length);
- const seen = new Set();
- const declared = [];
- for (const name of sortedNames) {
- let foundInUseContext = false;
- for (const line of sbLines) {
- if (seen.has(name)) break;
- if (!line.includes(name)) continue;
- // Skip inventory listing lines (3+ shader names on one line).
- const namesOnLine = SHADER_NAMES.filter((n) => line.includes(n)).length;
- if (namesOnLine >= 3) continue;
- // Skip lines where the shader name only appears in SFX filename context.
- const sfxContext = line.includes(`sfx/${name}`) || line.includes(`sfx-${name}`);
- // Count this name if it appears in a non-SFX, non-inventory line.
- if (!sfxContext) {
- foundInUseContext = true;
- break;
- }
- }
- if (foundInUseContext) {
- declared.push(name);
- seen.add(name);
- }
- }
- if (declared.length === 0) {
- return {
- name: "Shader transitions",
- status: "PASS",
- detail: "STORYBOARD declared none — no shader transitions expected",
- };
- }
-
- // A shader is "present" only if HyperShader runtime is in index.html AND the
- // shader name appears in a line that is NOT an SFX reference.
- const hasHyperShader = /HyperShader\s*[(.]/.test(index);
- const indexLines = index.split("\n");
- const present = !hasHyperShader
- ? []
- : declared.filter((name) =>
- indexLines.some((line) => {
- if (!line.includes(name)) return false;
- if (line.includes(`sfx/${name}`) || line.includes(`sfx-${name}`)) return false;
- return true;
- }),
- );
- const missing = declared.filter((name) => !present.includes(name));
- const pass = missing.length === 0;
-
- return {
- name: "Shader transitions",
- status: pass ? "PASS" : "FAIL",
- detail: `STORYBOARD declared ${declared.length}, ${present.length} present in index.html, ${missing.length} missing`,
- extra: pass
- ? null
- : `Missing from build: ${missing.join(", ")}. STORYBOARD.md and index.html disagree — either re-add the transitions or update STORYBOARD.md.`,
- };
-}
-
-async function checkSfxTimestampConsistency() {
- const storyboardPath = join(PROJECT_DIR, "STORYBOARD.md");
- const indexPath = join(PROJECT_DIR, "index.html");
- if (!existsSync(storyboardPath) || !existsSync(indexPath)) {
- return {
- name: "SFX timestamps",
- status: "INFO",
- detail: "STORYBOARD.md or index.html missing",
- };
- }
-
- const storyboard = await readFile(storyboardPath, "utf-8");
- const index = await readFile(indexPath, "utf-8");
-
- const sfxRefs = [];
- for (const line of storyboard.split("\n")) {
- const fileMatch = line.match(/sfx\/([\w-]+\.mp3)/);
- // Require trailing `s` so we capture the time column, not the volume column.
- const timeMatch = line.match(/\|\s*(\d+(?:\.\d+)?)s\b/);
- if (fileMatch && timeMatch) {
- sfxRefs.push({ file: fileMatch[1], storyboardT: parseFloat(timeMatch[1]) });
- }
- }
-
- if (sfxRefs.length === 0) {
- return {
- name: "SFX timestamps",
- status: "INFO",
- detail: "No SFX entries detected in STORYBOARD.md",
- };
- }
-
- // Collect ALL audio tags per file (multi-timestamp SFX like click.mp3 have
- // 3 tags). Use a two-step extraction so we don't depend on src= and
- // data-start= attribute ordering — the documented canonical pattern in
- // capabilities.md puts src= LAST in the tag, which an order-dependent
- // regex would miss → false MISSING reports.
- const indexSfx = new Map();
- const audioTagRegex = /<audio[^>]*?>/g;
- let tagMatch;
- while ((tagMatch = audioTagRegex.exec(index)) !== null) {
- const tag = tagMatch[0];
- const srcMatch = tag.match(/src=["'](?:[^"']*\/)?sfx\/([\w-]+\.mp3)["']/);
- const dsMatch = tag.match(/data-start=["']([0-9.]+)["']/);
- if (!srcMatch || !dsMatch) continue;
- const file = srcMatch[1];
- const t = parseFloat(dsMatch[1]);
- if (!indexSfx.has(file)) indexSfx.set(file, []);
- indexSfx.get(file).push(t);
- }
-
- const drifts = [];
- const missing = [];
- for (const ref of sfxRefs) {
- if (!indexSfx.has(ref.file)) {
- missing.push(ref.file);
- continue;
- }
- const indexTs = indexSfx.get(ref.file);
- const closest = indexTs.reduce((best, t) =>
- Math.abs(t - ref.storyboardT) < Math.abs(best - ref.storyboardT) ? t : best,
- );
- const drift = Math.abs(closest - ref.storyboardT);
- if (drift > SFX_DRIFT_TOLERANCE_S) {
- drifts.push({ file: ref.file, storyboardT: ref.storyboardT, indexT: closest, drift });
- }
- }
-
- const indexCount = [...indexSfx.values()].reduce((sum, arr) => sum + arr.length, 0);
- const pass = missing.length === 0 && drifts.length === 0;
- return {
- name: "SFX timestamps",
- status: pass ? "PASS" : "FAIL",
- detail: `${sfxRefs.length} SFX in STORYBOARD · ${indexCount} in index.html · ${missing.length} missing · ${drifts.length} drifted >${SFX_DRIFT_TOLERANCE_S}s`,
- extra: pass
- ? null
- : [
- ...missing.map((f) => `MISSING in index.html: ${f}`),
- ...drifts.map(
- (d) =>
- `DRIFT: ${d.file} storyboard=${d.storyboardT}s closest index=${d.indexT}s drift=${d.drift.toFixed(2)}s`,
- ),
- ].join("\n "),
- };
-}
-
-// Catches storyboard staleness on beat timings — agent shipped with different
-// beat durations than the storyboard documented, leaving the spec lying.
-async function checkBeatDurationConsistency() {
- const storyboardPath = join(PROJECT_DIR, "STORYBOARD.md");
- if (!existsSync(storyboardPath)) {
- return { name: "Beat durations", status: "INFO", detail: "STORYBOARD.md missing" };
- }
-
- const storyboard = await readFile(storyboardPath, "utf-8");
- const indexDurations = await readBeatDurationsFromIndex();
- // Filter to only numbered beats (beat-1, beat-2, ...). Skip "main" / root
- // composition and any non-numbered placeholders.
- const buildBeatIds = Object.keys(indexDurations).filter((id) => /^beat-\d+/i.test(id));
- if (buildBeatIds.length === 0) {
- return {
- name: "Beat durations",
- status: "INFO",
- detail: "no numbered beat data-duration in index.html",
- };
- }
-
- // Parse storyboard beat durations. The expected pattern is a timing-table row:
- // | B4 — MetaBrain | 16.600 – 21.000s | ... |
- // We extract start–end and compute duration = end - start. Falls back to a
- // direct duration mention ("duration: X.Xs") if the range format isn't found.
- // A beat with no parseable duration is skipped — we don't flag missing rows.
- const drifts = [];
- const unparseable = [];
- for (const beatId of buildBeatIds) {
- const num = beatId.match(/beat-(\d+)/i)?.[1];
- if (!num) continue;
- let storyT = null;
-
- // Strategy 1: standalone beat row "B4 — Name | 16.600 – 21.000s |".
- // Require `B${num}` to be followed by a non-digit-non-dot char so "B3.1"
- // doesn't false-match for B3.
- const rangeRe = new RegExp(
- `\\bB${num}(?![\\.\\d])[^\\n|]*\\|\\s*(\\d+(?:\\.\\d+)?)s?\\s*[–-]\\s*(\\d+(?:\\.\\d+)?)s`,
- "i",
- );
- const rm = storyboard.match(rangeRe);
- if (rm) {
- storyT = parseFloat(rm[2]) - parseFloat(rm[1]);
- } else {
- // Strategy 2: sum sub-beats "B${num}.X — ... | start – end s |".
- // Useful when a beat is broken into sub-rows (B3.1, B3.2, ...) instead
- // of having a standalone row.
- const subRe = new RegExp(
- `\\bB${num}\\.\\d+\\b[^\\n|]*\\|\\s*(\\d+(?:\\.\\d+)?)s?\\s*[–-]\\s*(\\d+(?:\\.\\d+)?)s`,
- "gi",
- );
- let sum = 0;
- let count = 0;
- let mm;
- while ((mm = subRe.exec(storyboard)) !== null) {
- sum += parseFloat(mm[2]) - parseFloat(mm[1]);
- count++;
- }
- if (count > 0) storyT = sum;
- }
-
- if (storyT === null) {
- // Strategy 3: bare-number timing table — "| 1 | 0.00s | 5.20s | 5.20s |"
- // (Beat | Start | End | Duration). The duration column is the 4th cell,
- // OR derive from end - start (columns 2 and 3). Match a row that starts
- // with `| <num> |` and has at least 2 time cells.
- // Allow optional leading `>` (blockquote) before the pipe.
- const tableRe = new RegExp(
- `^\\s*>?\\s*\\|\\s*${num}\\s*\\|\\s*(\\d+(?:\\.\\d+)?)s?\\s*\\|\\s*(\\d+(?:\\.\\d+)?)s`,
- "im",
- );
- const tm = storyboard.match(tableRe);
- if (tm) {
- const start = parseFloat(tm[1]);
- const end = parseFloat(tm[2]);
- storyT = end - start;
- }
- }
- // Note: removed the previous "duration: X.Xs near beat label" fallback —
- // it false-matched non-beat durations (e.g., "shader runs — duration 0.7s"
- // near a "Beat 1" mention). If a storyboard's timing format isn't a clean
- // range or table row, the beat is reported as unparseable rather than
- // guessed at.
-
- if (storyT === null) {
- unparseable.push(beatId);
- continue;
- }
- const buildT = indexDurations[beatId];
- const drift = Math.abs(storyT - buildT);
- if (drift > BEAT_DURATION_DRIFT_TOLERANCE_S) {
- drifts.push({ beat: beatId, storyboardDuration: storyT, buildDuration: buildT, drift });
- }
- }
-
- const parseable = buildBeatIds.length - unparseable.length;
- if (drifts.length === 0) {
- return {
- name: "Beat durations",
- status: "PASS",
- detail: `${parseable}/${buildBeatIds.length} beats parseable, storyboard durations match within ±${BEAT_DURATION_DRIFT_TOLERANCE_S}s`,
- extra:
- unparseable.length > 0
- ? `(skipped: ${unparseable.join(", ")} — could not find duration in STORYBOARD.md)`
- : null,
- };
- }
- return {
- name: "Beat durations",
- status: "FAIL",
- detail: `${drifts.length} beat(s) drift between STORYBOARD.md and index.html > ${BEAT_DURATION_DRIFT_TOLERANCE_S}s`,
- extra: [
- ...drifts.map(
- (d) =>
- `${d.beat}: storyboard=${d.storyboardDuration.toFixed(2)}s build=${d.buildDuration}s drift=${d.drift.toFixed(2)}s`,
- ),
- ...(unparseable.length > 0
- ? [`(skipped: ${unparseable.join(", ")} — could not find duration in STORYBOARD.md)`]
- : []),
- ].join("\n "),
- };
-}
-
-async function checkMp4Exists() {
- const candidates = [PROJECT_DIR, join(PROJECT_DIR, "output"), join(PROJECT_DIR, "renders")];
- for (const dir of candidates) {
- if (!existsSync(dir)) continue;
- try {
- const files = await readdir(dir);
- if (files.some((f) => f.endsWith(".mp4"))) {
- return {
- name: "Rendered MP4",
- status: "PASS",
- detail: `found .mp4 in ${dir.replace(PROJECT_DIR, ".")}`,
- };
- }
- } catch {
- /* ignore */
- }
- }
- return {
- name: "Rendered MP4",
- status: "INFO",
- detail:
- "no .mp4 found — preview-only delivery; if claiming verified motion, render is required (Path 2 of audio+motion verification)",
- };
-}
-
-// ─── Helpers ─────────────────────────────────────────────────────────────────
-
-// Cached so multiple checks don't re-read the same files. The script is a
-// one-shot CLI so a process-scoped cache is fine; no invalidation needed.
-let _compositionsCache = null;
-async function readBeatCompositions() {
- if (_compositionsCache) return _compositionsCache;
- const dir = join(PROJECT_DIR, "compositions");
- if (!existsSync(dir)) {
- _compositionsCache = [];
- return _compositionsCache;
- }
- const files = await readdir(dir);
- const beats = files.filter((f) => /^beat-/i.test(f) && f.endsWith(".html"));
- const out = [];
- for (const f of beats) {
- const content = await readFile(join(dir, f), "utf-8");
- out.push({ name: f, content });
- }
- _compositionsCache = out;
- return out;
-}
-
-// Extract the trailing numeric position argument from each `tl.<method>(...)`
-// call in a script. Uses balanced-paren scanning so multi-line calls and
-// nested patterns like rgba(86,131,218,0.35) don't false-match.
-function extractTopLevelPositionArgs(content) {
- const positions = [];
- const methodRe = /\btl\.(?:to|set|fromTo|from|call|add)\(/g;
- let startMatch;
- while ((startMatch = methodRe.exec(content)) !== null) {
- let i = startMatch.index + startMatch[0].length;
- let depth = 1;
- let lastTopLevelCommaIdx = -1;
- let inString = false;
- let stringChar = null;
- while (i < content.length && depth > 0) {
- const c = content[i];
- if (inString) {
- if (c === "\\") {
- i += 2;
- continue;
- }
- if (c === stringChar) inString = false;
- i++;
- continue;
- }
- if (c === '"' || c === "'" || c === "`") {
- inString = true;
- stringChar = c;
- i++;
- continue;
- }
- if (c === "(" || c === "{" || c === "[") depth++;
- else if (c === ")" || c === "}" || c === "]") {
- depth--;
- if (depth === 0) break;
- } else if (c === "," && depth === 1) lastTopLevelCommaIdx = i;
- i++;
- }
- if (depth === 0 && lastTopLevelCommaIdx > 0) {
- const lastArg = content.substring(lastTopLevelCommaIdx + 1, i).trim();
- const numMatch = lastArg.match(/^([0-9.]+)$/);
- if (numMatch) positions.push(parseFloat(numMatch[1]));
- }
- }
- return positions;
-}
-
-// Returns a map of { "beat-1-name": durationInSeconds, ... } from index.html.
-// Cached per-process (one-shot CLI, no invalidation needed).
-let _beatDurationsCache = null;
-async function readBeatDurationsFromIndex() {
- if (_beatDurationsCache) return _beatDurationsCache;
- const indexPath = join(PROJECT_DIR, "index.html");
- if (!existsSync(indexPath)) {
- _beatDurationsCache = {};
- return _beatDurationsCache;
- }
- const content = await readFile(indexPath, "utf-8");
- const map = {};
-
- // Pattern: <div data-composition-id="beat-N-name" ... data-duration="5.5" ...>
- // OR: data-composition-src="compositions/beat-N-name.html" ... data-duration="5.5"
- const divRegex = /<div[^>]*?>/g;
- let m;
- while ((m = divRegex.exec(content)) !== null) {
- const tag = m[0];
- const idMatch = tag.match(/data-composition-id=["']([^"']+)["']/);
- const srcMatch = tag.match(/data-composition-src=["'][^"']*?\/?(beat-[\w-]+)\.html["']/);
- const durMatch = tag.match(/data-duration=["']([0-9.]+)["']/);
- if (!durMatch) continue;
- const dur = parseFloat(durMatch[1]);
- if (idMatch) map[idMatch[1]] = dur;
- if (srcMatch) map[srcMatch[1]] = dur;
- }
- _beatDurationsCache = map;
- return map;
-}
-
-// ─── Report ──────────────────────────────────────────────────────────────────
-
-function printReport(results) {
- const cols = { name: 26, status: 8, detail: 60 };
- const line = "─".repeat(cols.name + cols.status + cols.detail + 6);
-
- console.log("");
- console.log(`w2h-verify · ${PROJECT_DIR}`);
- console.log(line);
- console.log("Check".padEnd(cols.name) + " │ " + "Status".padEnd(cols.status) + " │ " + "Detail");
- console.log(line);
-
- for (const r of results) {
- const symbol = r.status === "PASS" ? "✓" : r.status === "FAIL" ? "✗" : "·";
- console.log(
- r.name.padEnd(cols.name) +
- " │ " +
- `${symbol} ${r.status}`.padEnd(cols.status) +
- " │ " +
- (r.detail || ""),
- );
- if (r.extra) {
- const indent = " ".repeat(cols.name + cols.status + 6 + 4);
- console.log(
- "".padEnd(cols.name) +
- " │ " +
- "".padEnd(cols.status) +
- " │ " +
- r.extra.split("\n").join("\n" + indent),
- );
- }
- }
-
- console.log(line);
- const pass = results.filter((r) => r.status === "PASS").length;
- const fail = results.filter((r) => r.status === "FAIL").length;
- const info = results.filter((r) => r.status === "INFO").length;
- console.log(`SUMMARY: ${pass} PASS · ${fail} FAIL · ${info} INFO`);
-
- if (fail > 0) {
- console.log("");
- console.log("Step 6 NOT done. Fix FAIL items, OR include this report verbatim in your final");
- console.log("summary's \"What I did NOT verify\" section so the user knows what's broken.");
- } else {
- console.log("");
- console.log(
- "All gates pass. Paste this report into your final user-facing summary as evidence.",
- );
- }
- console.log("");
-}
-
-main().catch((e) => {
- console.error("w2h-verify script error:", e);
- process.exit(2);
-});