Write HTML. Render video. Built for agents.
JavaScript aiai-agentsanimationclaude-codeffmpegframeworkgsaphtmlhtml-to-videomcpmotion-graphicspuppeteerrenderingtypescriptvideo-editor
feat(skills): unify bgm-to-video flows into music-to-video
Miao Yanga34d3dba4d15
diff --git a/packages/core/src/lint/rules/composition.ts b/packages/core/src/lint/rules/composition.tsindex 3c6039f5b9..9c76ab03a2 100644--- a/packages/core/src/lint/rules/composition.ts+++ b/packages/core/src/lint/rules/composition.ts@@ -37,6 +37,32 @@ function isCompositionRootOrMount(rawTag: string): boolean {);}+// Top-level CSS selectors (comma-split) in a stylesheet, skipping at-rule headers+// (@media/@keyframes/...) and keyframe stops. Heuristic — the lint layer has no+// full CSS parser, and rules elsewhere in this file scan CSS the same way.+function extractCssSelectors(css: string): string[] {+ const out: string[] = [];+ const noComments = css.replace(/\/\*[\s\S]*?\*\//g, "");+ const ruleHeader = /([^{}]+)\{/g;+ let m: RegExpExecArray | null;+ while ((m = ruleHeader.exec(noComments)) !== null) {+ const header = (m[1] ?? "").trim();+ if (!header || header.startsWith("@")) continue;+ for (const sel of header.split(",")) {+ const s = sel.trim();+ if (s) out.push(s);+ }+ }+ return out;+}++// Class tokens in a selector's leftmost compound (before the first descendant /+// child / sibling combinator). `.frame .title` → ["frame"]; `.a.b > .c` → ["a","b"].+function leftmostCompoundClasses(selector: string): string[] {+ const leftmost = selector.trim().split(/[\s>+~]+/)[0] ?? "";+ return (leftmost.match(/\.([\w-]+)/g) ?? []).map((c) => c.slice(1));+}+export const compositionRules: Array<(ctx: LintContext) => HyperframeLintFinding[]> = [// invalid_capture_path — catches ../capture/ in src/href attributes and scripts.// Sub-compositions live in compositions/ but are served relative to the project@@ -576,4 +602,50 @@ export const compositionRules: Array<(ctx: LintContext) => HyperframeLintFinding}return findings;},++ // subcomposition_root_styled_by_class+ // A sub-composition's <style> is scoped at render time to+ // `[data-composition-id="<id>"] <selector>` so scenes inlined into one document+ // can't leak styles into each other. A rule whose LEFTMOST selector is the ROOT+ // element's own class (e.g. `.frame { ... }` on the same element that carries+ // data-composition-id) therefore becomes a DESCENDANT selector that can never+ // match the root — the whole scene renders unstyled (tiny text top-left, images+ // at natural size). lint/validate/inspect evaluate the file in isolation (no+ // scoping) and Studio previews each scene in its own iframe (no scoping), so the+ // break is invisible until the composited MP4 render. Style the root via `#root`+ // (the scoper special-cases the root id) and descendants via plain selectors,+ // like the registry blocks — the runtime already scopes each scene by id, so a+ // class namespace on the root is redundant.+ ({ rootTag, rootCompositionId, styles, options }) => {+ if (!options.isSubComposition) return [];+ if (isRegistrySourceFile(options.filePath)) return [];+ if (!rootTag || !rootCompositionId) return [];++ const rootClasses = (readAttr(rootTag.raw, "class") || "").split(/\s+/).filter(Boolean);+ if (rootClasses.length === 0) return [];++ const offenders: string[] = [];+ for (const style of styles) {+ for (const selector of extractCssSelectors(style.content)) {+ const hitsRoot = leftmostCompoundClasses(selector).some((c) => rootClasses.includes(c));+ if (hitsRoot && !offenders.includes(selector)) offenders.push(selector);+ }+ }+ if (offenders.length === 0) return [];++ const example = offenders.slice(0, 3).join(", ");+ return [+ {+ code: "subcomposition_root_styled_by_class",+ severity: "error",+ message:+ `Root element has class="${rootClasses.join(" ")}" and is styled by ${offenders.length} rule(s) keyed off that class (e.g. ${example}). ` ++ `At render, every sub-composition rule is scoped to [data-composition-id="${rootCompositionId}"] <selector>, so a selector whose leftmost part is the ROOT's own class becomes a descendant selector that cannot match the root — the scene renders unstyled (tiny text top-left, full-size images). ` ++ `lint/validate/inspect and Studio's per-frame iframe preview do not scope, so this passes every static check and looks correct in preview.`,+ selector: example,+ fixHint: `Give the root id="root" and style it with \`#root { ... }\` plus plain descendant selectors (\`.kicker\`, \`#hero\`) — the runtime already scopes each sub-composition by data-composition-id, so a class namespace on the root is redundant and breaks under scoping.`,+ snippet: truncateSnippet(rootTag.raw),+ },+ ];+ },];diff --git a/packages/producer/tests/distributed/css-var-fonts/output/output.mp4 b/packages/producer/tests/distributed/css-var-fonts/output/output.mp4deleted file mode 100644index 320e72933f..0000000000Binary files a/packages/producer/tests/distributed/css-var-fonts/output/output.mp4 and /dev/null differdiff --git a/skills/bgm-to-video/SKILL.md b/skills/bgm-to-video/SKILL.mddeleted file mode 100644index 9702855a06..0000000000--- a/skills/bgm-to-video/SKILL.md+++ /dev/null@@ -1,191 +0,0 @@-----name: bgm-to-video-description: >- Use when the user has a BGM / background-music track (audio file, or a video to pull- audio from) and wants a music-grounded, beat-synced HyperFrames video. This is the- template-driven path: a deterministic analyzer reads the beat, a Music Reader classifies- the track into sections and marks where each could be cut finer (beat type + mood, no- content), then a Director decides each section's groups (it alone sees the templates) and- matches each to a reverse-engineered Group Template from a catalog and adapts- it (binding copy, palette, and timing), falling back to free creative-coding when no- template fits, and a Builder realizes it as one paused-GSAP HyperFrames composition.- V1 is asset-free: typography, generative shader/geometry backgrounds, code-native- motion. "template" names the method (match-and-adapt), not a fixed look.-metadata:- {- "tags": "bgm, music, beat-sync, templates, group-template, creative-coding, typography, gsap, hyperframes, visual-plan",- }------# bgm-to-video — template-driven, music-grounded video--Input is a **BGM track**. Output is a beat-synced HyperFrames video where **music is the-spine; the visual for each group is chosen by matching a reverse-engineered template**,-not invented from scratch each time. When nothing matches, the Director free-composes —-the catalog is a head start, not a cage.--## Two layers--| Layer | Artifact | What it is | Used by |-| -------------------------- | --------------------------------- | ----------------------------------------------------------------------------- | -------- |-| **L0 · Motion Primitives** | `references/motion-primitives.md` | atoms: one anchor → one GSAP micro-move | Builder |-| **L1 · Group Templates** | `templates/<id>/` | a whole-group archetype (roles + timing + stop rule + exit), composed from L0 | Director |--The linchpin: the **Music Reader's per-group output** and a **template's match-face** are-the same schema — `GroupSignature` (`references/signature-schema.md`). Matching is then-mechanical.--## How templates get into the catalog--Templates are **reverse-engineered from golden-sample videos** by the-`bgm-golden_sample_reverse` skill (`reverse-to-template.md`): slice a group → beatgrid-(signature) → Gemini video analysis (roles/motion/transition) → a `card.json` (+ a-parameterized reference `index.html`), promoted into `templates/<id>/`.--## Pipeline--| # | Phase | Exec | Artifact | Detail |-| --- | ---------- | -------- | ------------------- | ------------------------------------------------------------------------------------------------------------------- |-| 0 | init | Bash | `assets/bgm.mp3` | create project, place/extract BGM |-| 1 | analyze | Python | `audiomap.json` | deterministic beat / energy / roll / hard-stop analysis |-| 2 | read music | subagent | `music-read.json` | Music Reader → `sections[]` (a `GroupSignature` each) + `cut_candidates[]` (classify only; no group-count decision) |-| 3 | plan | subagent | `visual-plan.json` | Director → subdivide sections into groups (catalog-aware) + match a template per group + adapt; else free-compose |-| 4 | build | subagent | `index.html` | Builder → mount each group (fork template impl, or author from L0) on one timeline |-| 5 | verify | Bash | gate | lint + validate + inspect |-| 6 | render | Bash | `renders/video.mp4` | muxed video with BGM |-| 7 | finalize | subagent | repaired output | snapshot QA + one repair loop |--`SKILL_DIR` = this skill directory. `PROJECT_DIR` = `videos/<project-name>/`.--## Step 0 — Init project + place BGM--```bash-mkdir -p "$PROJECT_DIR/assets" "$PROJECT_DIR/renders"-cp "<user-music>" "$PROJECT_DIR/assets/bgm.mp3" # extract from video first if needed-```--Optional style files at the project root: `frame.md`, `design.md` / `DESIGN.md`.--## Step 1 — Analyze the music--```bash-python3 <SKILL_DIR>/scripts/analyze-beatgrid.py "$PROJECT_DIR/assets/bgm.mp3" \- -o "$PROJECT_DIR/audiomap.json" --print-```--Writes the canonical timing source. Sections are NOT baked in.--## Step 2 — Read music (Music Reader → music-read.json)--Dispatch one subagent. Prompt = full contents of [`agents/music-reader.md`](agents/music-reader.md) + dispatch context:--```text-SKILL_DIR: <absolute path>-PROJECT_DIR: <absolute path>-AudioMap: <PROJECT_DIR>/audiomap.json-Signature schema: <SKILL_DIR>/references/signature-schema.md-Write music read to: <PROJECT_DIR>/music-read.json-```--The Music Reader **only classifies**: it cuts the track into **sections** (musical-macro-structure), writes a `GroupSignature` per section, and lists each section's-**`cut_candidates`** — the musically-legal places it _could_ be cut finer. It does **not**-decide how many groups a section becomes (that needs the catalog, which it can't see). No-copy, no fonts, no colors, no layout.--## Step 3 — Plan (Director → visual-plan.json)--Dispatch one subagent. Prompt = full contents of [`agents/director.md`](agents/director.md) + dispatch context:--```text-SKILL_DIR: <absolute path>-PROJECT_DIR: <absolute path>-User request / brief: <user's request and supplied copy>-AudioMap: <PROJECT_DIR>/audiomap.json-MusicRead: <PROJECT_DIR>/music-read.json-Template catalog: read EVERY <SKILL_DIR>/templates/*/card.json (status:"promoted")-Signature schema: <SKILL_DIR>/references/signature-schema.md-Template definition: <SKILL_DIR>/references/template-definition.md-Transition catalog: <SKILL_DIR>/references/transition-catalog.md-Visual plan contract: <SKILL_DIR>/references/visual-plan-contract.md-Motion primitives (for free-compose): <SKILL_DIR>/references/motion-primitives.md-Style files to read if present: <PROJECT_DIR>/frame.md, design.md, DESIGN.md-Write visual plan to: <PROJECT_DIR>/visual-plan.json-```--The Director first **subdivides each section into groups** by acting on its-`cut_candidates` (catalog-aware: keep a section whole when one template fits, split it when-a template would be stretched or it spans multiple gestures), then matches each group to a-promoted template, binds the template's params (copy it writes from the brief, palette from-mood, anchors from this group's beats), reconciles the stop rule to the group boundary,-plans `fast_cut` transitions, and free-composes any group with no match. It does **not**-write HTML/GSAP.--## Step 4 — Build (Builder → index.html)--Dispatch one subagent. Prompt = full contents of [`agents/builder.md`](agents/builder.md) + dispatch context:--```text-SKILL_DIR: <absolute path>-PROJECT_DIR: <absolute path>-AudioMap: <PROJECT_DIR>/audiomap.json-VisualPlan: <PROJECT_DIR>/visual-plan.json-Template reference impls: for each group with a templateRef, <SKILL_DIR>/templates/<templateRef>/index.html-Visual plan contract: <SKILL_DIR>/references/visual-plan-contract.md-Template definition: <SKILL_DIR>/references/template-definition.md-Motion primitives: <SKILL_DIR>/references/motion-primitives.md-Builder contract: <SKILL_DIR>/references/builder-contract.md-BGM path for HTML: assets/bgm.mp3-Write composition to: <PROJECT_DIR>/index.html-```--The Builder mounts each group as a gated sub-scene on ONE paused timeline: fork the-group's template reference impl and re-host its tweens at the group's absolute audio-seconds (or author from L0 primitives when free-composed), then apply the group→group-transitions.--## Step 5 — Verify gates--```bash-( cd "$PROJECT_DIR" && npx hyperframes lint . && npx hyperframes validate . )-( cd "$PROJECT_DIR" && npx hyperframes inspect . )-```--Inspect: t=0, each group's `span_sec` start, each transition `at`, the final frame. On-failure → Step 7.--## Step 6 — Render--```bash-( cd "$PROJECT_DIR" && npx hyperframes render . -q draft -o renders/video.mp4 --fps 30 )-```--Expect video + audio, duration == `audiomap.audio.duration_sec`.--## Step 7 — Finalize / repair--Dispatch one subagent. Prompt = full contents of [`agents/finalize.md`](agents/finalize.md) + the contracts above + the verbatim gate-failure output. Finalize edits `index.html` only; if the plan is creatively wrong, return to Step 3.--## Resume table--| You have | Continue from |-| --------------------- | ------------- |-| `assets/bgm.mp3` only | Step 1 |-| `audiomap.json` | Step 2 |-| `music-read.json` | Step 3 |-| `visual-plan.json` | Step 4 |-| `index.html` | Step 5 |-| gates passed | Step 6 |-| a gate failed | Step 7 |--## Directory layout--```-bgm-to-video/- SKILL.md- agents/ music-reader.md · director.md · builder.md · finalize.md- references/ signature-schema.md · template-definition.md · transition-catalog.md- visual-plan-contract.md · motion-primitives.md (L0) · builder-contract.md- scripts/ analyze-beatgrid.py- templates/ <id>/ { card.json · index.html · README.md } ← the L1 catalog-```diff --git a/skills/bgm-to-video/agents/builder.md b/skills/bgm-to-video/agents/builder.mddeleted file mode 100644index 1099b459eb..0000000000--- a/skills/bgm-to-video/agents/builder.md+++ /dev/null@@ -1,72 +0,0 @@-# Builder (template-driven) — mount groups on one timeline--Turn `visual-plan.json` + `audiomap.json` into one renderable HyperFrames `index.html`.-Each group is a **gated sub-scene**: for a `templateRef` group, fork the template's-reference impl and re-host it; for a `free_design` group, author from L0 primitives. All-groups share **one paused GSAP timeline** at absolute audio seconds.--## Inputs--- `visual-plan.json` — groups (templateRef + params + role_bindings, or free_design) + transitions.-- `audiomap.json` — timing truth.-- **Template reference impls** — `templates/<templateRef>/index.html` for each matched group.-- `references/template-definition.md`, `visual-plan-contract.md`, `motion-primitives.md`,- `builder-contract.md`. Read `builder-contract.md` — the HyperFrames mechanics- (root `#stage`, the `<audio>` tag, the one paused timeline, the forbidden list,- seek-safety) are non-negotiable and unchanged.--Output: a single-file composition at the requested `index.html`.--## The core method: each group is a gated sub-scene--The whole video is ONE composition with ONE `#stage` and ONE paused timeline. Build it-group by group:--1. **One container per group** inside `#stage`:- `<div class="group" id="g1" style="position:absolute; inset:0;">…</div>`. Stable id.-2. **Gate visibility by the group's span.** A group is only visible during its- `span_sec`. Use 0ms `fast_cut` sets on the master timeline:- `tl.set("#g1",{autoAlpha:1},start); tl.set("#g1",{autoAlpha:0},end);` (and start hidden- at t=0 unless it's the first group). The transition between groups IS this hard cut.-3. **Re-host each group's animation at an OFFSET.** A template reference impl is a- standalone composition (its own 0-based timeline). You **inline its DOM + CSS + shader- into the group container** and **re-create its tweens on the master timeline shifted by- the group's `start`**: a tween the impl placed at `t` goes at `start + t`. Map the- impl's local reveal/hold/exit onto the group's real `role_bindings` seconds (e.g.- reveal on `role_bindings.message.reveal_at`, field breath on `field.surge_at`). Set the- group's element ids/uniform var names with a `g1_` prefix so multiple groups don't- collide.-4. **Fill the template's params.** Apply `visual-plan.json` `params` as the concrete- values (text content, palette → CSS vars / shader uniforms, flowSpeed, duration). You- may pass them as the impl's composition-variables OR hard-code them into the inlined- group — either way the rendered values must equal `params`.-5. **Free-design groups:** author the container from `motion-primitives.md` recipes, same- gating + offset rules.--> WebGL templates: give each group its own `<canvas>` + renderer inside its container; a-> continuous render loop is fine (the reference impls already do this and explain why it-> stays deterministic — all _visible_ state comes from timeline-driven uniforms). Gate the-> container with `autoAlpha`, not by tearing down the renderer.--## Transitions--`visual-plan.json.transitions` are all `fast_cut`: realize each as the 0ms visibility-swap at `at` (hide the outgoing group, show the incoming one on the same frame). No-crossfade, no tween. The cut is the transition.--## Timeline discipline (from builder-contract.md)--- Exactly one `gsap.timeline({ paused:true })`; register `window.__timelines["<compositionId>"] = tl;`; end with `tl.seek(0);`.-- All tween positions are absolute audio seconds from `audiomap.json` (offset per group as above).-- Hard hits / cuts / palette flips are 0ms `tl.set(...)`. Eased entrances 300–500ms. Lead a move that must _land_ on a beat by ~40–190ms.-- No `stagger`, timers, `requestAnimationFrame` for visual _state_, `Math.random`, `Date.now`, remote assets/fonts, infinite repeats, render-critical callbacks. Fake them deterministically (see builder-contract.md).--## Self-Check--- Passes `npx hyperframes lint .` and `npx hyperframes validate .`.-- `#stage` + `<audio id="bgm" data-timeline-role="music" ...>`; one paused timeline; duration == `audiomap.audio.duration_sec`.-- Each group is visible exactly across its `span_sec` and hidden outside it; t=0 is not accidentally blank.-- Each group's rendered text/palette equals its `visual-plan.json` `params`.-- Group→group cuts are 0ms and land on the `transitions[].at` second.-- Group ids/var names are namespaced; no two groups' elements or uniforms collide.-- Final frame is intentional; main text readable, not colliding.diff --git a/skills/bgm-to-video/agents/director.md b/skills/bgm-to-video/agents/director.mddeleted file mode 100644index cd3c7e9cd2..0000000000--- a/skills/bgm-to-video/agents/director.md+++ /dev/null@@ -1,121 +0,0 @@-# Director (template-driven) — match, adapt, transition--Turn the brief + `music-read.json` into `visual-plan.json`. For each **section**, decide-how finely to split it into **groups** (you own this call — you alone see the catalog),-then for each group **match a promoted Group Template and adapt it**; free-compose only-when nothing fits.--Your mantra: **music is the spine; a template is a head start, not a cage.**--## Inputs--- User brief / supplied copy — topic, mood, exact words to keep.-- `music-read.json` — `sections[]`: each is a `GroupSignature` over its whole span **plus**- a `cut_candidates[]` menu of musically-legal internal cut points. **There are no groups- yet — you create them** by choosing which candidates to act on.-- `audiomap.json` — timing truth (anchor seconds).-- **Template catalog** — read EVERY `templates/*/card.json` with `status:"promoted"`.-- `references/signature-schema.md`, `template-definition.md`, `transition-catalog.md`,- `visual-plan-contract.md`, `motion-primitives.md` (for free-compose).-- Style files if present: `frame.md` → `design.md` → `DESIGN.md`.--Read the contracts before writing. Output: one valid `visual-plan.json`, no commentary.--## Per section: decide its groups (subdivide)--You decide how many groups each section becomes, because the right granularity depends on-the **template native spans** in the catalog — which only you can see. A group's native-span ≈ the length of a card's `examples[].span_sec`.--1. **Try the section whole first.** Treat the section as one group (its `GroupSignature` is- already in `music-read.json`) and run the match below.-2. **Subdivide only if the whole-section fit is bad**, cutting at the section's- `cut_candidates[]`:- - **Pacing** — the best-matching card's native span is much shorter than the section- (the template would be stretched / leave dead air). Cut so each group ≈ a matchable- native span.- - **Gesture** — the section spans parts no single template or thesis covers well (e.g. a- busy opener + a closing lockup). Cut at the candidate(s) that separate them.-3. **How to cut.** Pick the **fewest, strongest** `cut_candidates` that fix the above; each- group's `span_sec` = consecutive cut points (plus the section ends). Keep every group- **≥ ~1 bar**. Derive each group's `GroupSignature` over its slice (signature-schema- derivation table) and **re-classify `structural_type` on that slice** — it may differ- from the section's.-4. **Don't over-cut.** If one template already fits the whole section's pacing, keep it- whole. A `void_breath` / `sustained_hold` / `hard_stop_freeze` section has no candidates- — never split it. Multiple templates across a section's groups are fine; cohesion is the- brand spine, not reuse.--## Per group: match → select → adapt--Run this on each group you produced above (the section itself when you kept it whole).--1. **Match.** Keep promoted cards where- `card.match.structural_type == group.structural_type`- **and** the group's `GroupSignature` satisfies **every** `card.match.requires`- predicate **and** `group.mood` overlaps `card.match.mood_fit`.-2. **Rank & select.** Order survivors by signature closeness to the card's `examples[]`- (and example count as a tiebreak); take the top → `templateRef`. If **no card- survives**, set `templateRef:null` and write a `free_design` (one visual thesis for the- group, built from `motion-primitives.md` — pick a density topology, name the- primitives).-3. **Adapt (bind the template).**- - Fill `params` (keys exactly from the card) — **copy you wrote** into the text slots,- **palette** from the brand spine, `flowSpeed`/etc. to taste, `duration` = the group's- span length.- - Fill `role_bindings` with this group's **real anchor seconds** (entry downbeat, surge- time, …) from its slice of the AudioMap — not the card's example times.- - **Reconcile the stop rule:** if the card's `exit_trigger` and the group's `span_sec`- end disagree, snap the boundary to the nearest AudioMap anchor and use that.--## Brand spine (unify the groups)--Set one `style`: one type family, a ≤4–6 swatch palette, ≤2 accents per frame, from the-brief's mood. Different templates per group are expected — the spine is what makes them-read as one piece. Pick the palette once; every group's `params.palette` draws from it.--## Write the copy (you own the words)--- Keep exact user words; else invent with taste, on the brief's mood.-- **Message vs texture:** a readable word holds ≥1 beat (headline 3–8, sentence 4–10),- stable + focal; a word held <1 beat is texture (strobe/grid/ticks). Never force a- message onto a sub-beat — demote it to texture.-- Place copy into the matched template's text params, or (free groups) onto the group's- anchors. Declare anchor + accumulate/stagger intent; leave micro-timing to the Builder.-- A closing `logo`/CTA lands on the final hit / hard stop and holds through trailing- silence.--## Transitions--One `transitions[]` entry per adjacent group pair. **`transition` is always `"fast_cut"`**-for now (decision #4): a 0ms hard cut at the boundary second. Do not emit richer-transitions yet (the interface exists for later — see `transition-catalog.md`).--## Direction stance--- **You own group count.** `music-read.json` gives sections + legal `cut_candidates`, not- groups — subdivide each section yourself (see above), because only you know the template- native spans. Keep a section whole when one template fits it; split it when a template- would otherwise be stretched or when it spans gestures no single template covers. Groups- in one section may use **different templates** — no reuse constraint; the brand spine- unifies them.-- One template (or one free thesis) per group — but the visual **system may change** at- each boundary; the brand spine unifies them.-- Trust the match: a `sustained_hold` group wants the held-message template's stillness,- not invented motion. Don't over-design a group the template already solves.-- Free-compose is a real fallback, not a failure — use it whenever the catalog has no- honest match, and write it as carefully as a matched group.--## Self-Check--- Every section became ≥1 group; each group entry carries its `section_id`, `span_sec`- drawn from the section's `cut_candidates` (or the whole section span), all groups in- order tiling `duration_s`. No group is < ~1 bar; no cut lands inside a roll.-- Each group's `GroupSignature` is derived over its own slice (or inherited from the- section when kept whole); its `structural_type` may differ from the section's.-- Every group has a `templateRef` (promoted, exists) **or** a `free_design`.-- For each `templateRef`: `match.requires` is actually satisfied by the group's signature;- `params` keys == the card's `params`; `role_bindings` use real AudioMap seconds.-- `style` brand spine is set and every `params.palette` is drawn from it.-- One `fast_cut` transition per boundary.-- `duration_s == audiomap.audio.duration_sec`.diff --git a/skills/bgm-to-video/agents/finalize.md b/skills/bgm-to-video/agents/finalize.mddeleted file mode 100644index 87adab158f..0000000000--- a/skills/bgm-to-video/agents/finalize.md+++ /dev/null@@ -1,39 +0,0 @@-# Finalize / Repair (template-driven)--Use after lint, validate, inspect, or render fails. You may edit `index.html` only.--## Inputs--- `audiomap.json`-- `visual-plan.json`-- current `index.html`-- `references/visual-plan-contract.md`-- `references/template-definition.md`-- `references/builder-contract.md`-- `references/motion-primitives.md`-- lint / validate / inspect / render output (verbatim)-- render quality target--Read the relevant contracts before repairing.--## Flow--1. Read the failure output first. Separate contract failures from visual issues.-2. Inspect important times: `t=0`, every group's `span_sec` start, every- `transitions[].at`, and the final frame.-3. Repair narrowly: blank/empty frames; a group visible outside its `span_sec` (or hidden- inside it); elements or uniforms colliding between groups (namespacing); invisible- elements; bad attrs; missing timeline registration; forbidden GSAP; obvious timing- misses; a group whose rendered text/palette doesn't match its `params`.-4. Re-run `npx hyperframes lint .`, `npx hyperframes validate .`, and inspect.-5. Render when gates pass.--## Rules--- Do not change duration or audio timing to hide sync issues.-- Do not redesign the concept during repair. If the plan is creatively wrong (wrong- template matched, wrong copy), return to the Director (Step 3) — don't patch around it.-- Keep each group's visibility gated to its `span_sec`; keep group→group cuts 0ms on the- `transitions[].at` second.-- Do not add remote assets, network fetches, timers, or nondeterminism.-- Prefer small CSS/GSAP fixes over structural rewrites.diff --git a/skills/bgm-to-video/agents/music-reader.md b/skills/bgm-to-video/agents/music-reader.mddeleted file mode 100644index 12f1881bc7..0000000000--- a/skills/bgm-to-video/agents/music-reader.md+++ /dev/null@@ -1,128 +0,0 @@-# Music Reader (template-driven) — classify only--Turn `audiomap.json` into `music-read.json`: cut the track into **sections** (musical-macro-structure), write a `GroupSignature` for each section, and list the musically-legal-**cut candidates** inside each (the internal anchors the Director _may_ subdivide on). You-**classify and surface facts**; you do not design, and **you do not decide group count** —-how finely a section is split is the Director's call, because only the Director sees the-template catalog.--You are not choosing visuals, copy, fonts, colors, layout, or motifs. You answer, per-section: _what kind of beat is this_, _what mood_, and _where could this legally be cut-finer_. Everything else is the Director's job.--## Inputs--- `audiomap.json` — factual music data.-- `references/signature-schema.md` — the `GroupSignature` schema + controlled vocab +- derivation formulas + the `structural_type` classification rubric. **Read it first.**--## Output--Write exactly one valid JSON file to the requested path: `music-read.json`. No markdown,-no commentary.--```jsonc-{- "duration_s": 7.198, // == audiomap.audio.duration_sec- "bpm": 129.2,- "one_line": "A held recap card that breaks into a per-onset typography hit.",- "sections": [- {- // a section IS a GroupSignature over its whole span (so the Director can match it- // as one group if it chooses not to subdivide) + the legal cut points inside it.- "id": "s1",- "span_sec": [0.0, 7.198], // snapped to AudioMap anchors; sections tile the track- "structural_type": "per_onset_sequential", // the section's dominant archetype- "mood": ["hype"],- /* …every other GroupSignature field per references/signature-schema.md- (energy_level, density, onset_rate, onset_gap_bars, has_roll, entry, exit_trigger, …),- derived over the WHOLE section span … */- "cut_candidates": [- // internal anchors the Director MAY cut on — musically legal only. Empty for a- // single-gesture section. NEVER a point inside a rolls[] run.- { "time": 3.692, "kind": "key_moment", "strength": "strong" },- { "time": 5.759, "kind": "phrase", "strength": "medium" },- ],- },- ],-}-```--`sections[]` is an ordered list whose `span_sec` tile the whole track with no gaps or-overlaps (first starts at 0, last ends at `duration_s`). Each section is a full-`GroupSignature` (derived over its span) **plus** a `cut_candidates[]` menu. **There is no-`groups[]` here** — the Director creates groups in `visual-plan.json` by choosing which-cut candidates to act on.--## How to read (pipeline — run in order)--1. **Gestalt.** From `summary` / `tempo` / `audio.duration_sec` + the drum histogram +- roll count, write the `one_line` and note the density arc.-2. **Segment into sections.** Walk `energy_phases[]` in order and split the track where the- music genuinely changes state — at `hard_stops[]`, `SURGE`/`DROP` `key_moments`, the- start/end of a `rolls[]` run, an **onset desert** (a long gap in `events[]`), or a big- energy-level jump. Collapse adjacent phases that are really one gesture. Expect ~1–6- sections; a short clip may be one. **Snap every boundary to an AudioMap anchor**- (downbeat / hard_stop / phrase / key_moment / energy-phase edge), then **re-snap to the- nearest `beats_sec`** (key_moments / energy-phase edges are 1-second-resolution facts;- the beat grid is precise — tolerance ≤ ½ beat).-3. **Per section, build the `GroupSignature`** over the whole section span. Use the- derivation table in `signature-schema.md` for every objective field (`energy_level`,- `density`, `onset_rate`, `onset_gap_bars`, `has_steady_grid`, `span_bars`, `entry`),- classify `structural_type` (rubric, top-down first-match; `unclassified` + a `note` if- nothing fits), tag `mood` (1–3), and set `exit_trigger`. All from the audiomap — never- invented.-4. **Per section, list `cut_candidates[]`** — the internal anchors the Director _may_ cut- on. This is a **menu of musical facts, not a decision**: you do not pick how many groups,- only where a cut would be legal.- - **Include** each anchor that lies strictly inside the span: an internal `key_moment`- (mini SURGE/DROP), a mid-section `hard_stop`, the edge of a partial `rolls[]` run, a- `phrases[]` edge, or a clear onset-cluster gap (≥ ~1 bar between consecutive- `events[]`). Tag each `{time, kind, strength}` and snap its `time` to the nearest beat.- - **Exclude (illegal cuts):** any point **inside** a `rolls[]` run (a roll is one- cascade), and any candidate that would leave a fragment **< ~1 bar**.- - **Emit an empty list** for a single-gesture section (`void_breath` / `sustained_hold` /- `hard_stop_freeze`) — it must never be subdivided.--> The Director reads the catalog (template native spans + what matches) and decides which-> of these candidates to act on; an unused candidate costs nothing. Detecting where a cut-> is _legal_ is musical (yours); deciding where a cut is _useful_ is catalog-aware (theirs).--## Worked example — a section + its cut candidates--Section `s_final` = `[19.412, 30.0]`, `per_onset_sequential`, ~4.6 bars @ 103.4 bpm, with-a `hard_stop` at ~24s and a `SURGE` at ~26s inside it. You emit it as **one section**-carrying its whole-span `GroupSignature` plus:--```jsonc-"cut_candidates": [- { "time": 23.963, "kind": "hard_stop", "strength": "strong" }, // snapped to the downbeat- { "time": 26.215, "kind": "surge", "strength": "strong" },-]-```--You do **not** decide whether this becomes 1, 2, or 3 groups. The Director may keep it-whole (if one template fits), or cut at one/both candidates (e.g. a per-onset opener + a-closing lockup) — that is its catalog-aware call.--## Section boundaries are proposals--You propose section `span_sec`; the Director may nudge a boundary to fit a chosen-template's stop rule, then reconcile to the nearest anchor (decision #2). Because both of-you derive from the same audiomap, this rarely moves anything — but write the most-defensible audio boundary, not a guess.--## Self-Check--- `duration_s == audiomap.audio.duration_sec`; `sections[].span_sec` tile it with no- gap/overlap (first at 0, last at `duration_s`).-- Every section carries a full `GroupSignature` (every field traces to an audiomap value or- a span of it) **plus** a `cut_candidates[]` list (possibly empty).-- Every `cut_candidates[].time` sits on an AudioMap anchor re-snapped to the nearest beat;- none is inside a `rolls[]` run; none would leave a sub-1-bar fragment; single-gesture- sections (`void_breath` / `sustained_hold` / `hard_stop_freeze`) have an empty list.-- `structural_type`, `mood`, `exit_trigger.type` are controlled-vocab (or `unclassified`- with a note).-- **No `groups[]` and no group-count decision** anywhere — that is the Director's.-- No content, no fonts, no colors, no layout, no copy anywhere in the output.diff --git a/skills/bgm-to-video/references/builder-contract.md b/skills/bgm-to-video/references/builder-contract.mddeleted file mode 100644index 0adff19d75..0000000000--- a/skills/bgm-to-video/references/builder-contract.md+++ /dev/null@@ -1,143 +0,0 @@-# Builder Contract--This is the complete implementation contract for LLM-first BGM compositions. Builder-and Finalize must read it before editing `index.html`.--The timeline is seekable sheet music: one paused GSAP timeline, absolute audio-second-positions, deterministic elements, no browser-play-only tricks.--## Root Composition--The root is a real stage element, not `<html>`:--```html-<div- id="stage"- data-composition-id="bgm"- data-start="0"- data-duration="23.005"- data-width="1920"- data-height="1080"-></div>-```--- `data-composition-id` must equal the `window.__timelines` key.-- Use `data-duration`, not `data-composition-duration`.-- `data-width` / `data-height` define the frame.-- Root CSS must set explicit pixel `width` and `height`.-- Landscape 1920x1080 is default unless `visual-plan.json.canvas` requests otherwise.--## Audio--```html-<audio- id="bgm"- data-timeline-role="music"- src="assets/bgm.mp3"- data-start="0"- data-duration="23.005"- data-media-start="0"- data-volume="1.0"-></audio>-```--- Source HTML uses `data-duration`; emitting raw `data-end` triggers lint warnings.-- `data-timeline-role="music"` marks the BGM track.-- The file must exist beside `index.html` at `assets/bgm.mp3`.--## Timeline--- Exactly one render-critical `gsap.timeline({ paused: true })`.-- Register it: `window.__timelines["<compositionId>"] = tl;`.-- End the script with `tl.seek(0);`.-- Tween positions are absolute audio seconds from `audiomap.json`.-- Percentage keyframes only live inside a single tween's `keyframes`.-- `easeEach` belongs inside `keyframes`, never as a sibling tween prop.--## Timing Discipline--- Group-level cuts land on `visual-plan.json` `groups[].span_sec` boundaries (= the- `transitions[].at` seconds), snapped to nearby downbeats.-- Phrase moves use `audiomap.phrases[]`.-- Word entries and layout changes prefer `grid.downbeats_sec[]`.-- Micro accents use `grid.beats_sec[]` or selected `events[].t`.-- Rolls use `rolls[].start/end` and should feel continuous or cascading.-- Hard stops use `hard_stops[].t` and should visibly freeze, cut, or hold.--## Layout Before Animation--Build the most important static frame first:--- A scene container fills the stage.-- Use CSS grid/flex/padding for content layout.-- Use absolute positioning for decorative systems, overlays, masks, and generated- geometry.-- Keep title-safe padding. Do not let hero text touch the frame edge.-- Use `vmin`, `clamp`, or measured CSS to keep type readable across aspect choices.--Animate from hidden/offscreen states into the CSS end-state. The CSS end-state is the-truth.--## Seek-Safe Reveal--- Delayed elements are hidden until entrance and visible after seeking.-- Initial hidden state may be inline CSS or `gsap.set(..., {autoAlpha:0})` at time 0.-- Reveal with `fromTo` or paired `set` + motion tweens.-- Finite repeats only.--## Forbidden--`tl.play()`, `setTimeout`, `setInterval`, `requestAnimationFrame`, runtime network,-remote assets, remote fonts, `Math.random`, `Date.now`, `new Date`, `ScrollTrigger`,-`repeat:-1`, render-critical callbacks, `.call()`, `.addLabel()`, `.addPause()`.--## Discouraged--- `stagger:` does not serialize cleanly; expand multi-element moves into explicit- per-element tweens with offset positions.-- Google Fonts links fail in offline/sandboxed renders. Use system-safe stacks or- local `@font-face`.-- Out-of-alias font family names can trigger lint warnings.--## Faking the forbidden patterns--The bans still leave you every move the music wants — do them deterministically:--- **Instead of `stagger`:** schedule explicit per-element work at `t + i*step` — either- `delay: i*0.04` on each tween, or one `tl.set(el[i], props, eventTime[i])` per onset.- This serialises cleanly and lands each element on its own beat.-- **Instead of `Math.random`:** derive variation from the index —- `palette[(i*7 + step*3) % palette.length]`, a fixed coordinate/rotation table, or a- hand-keyed scrambled-string array. Looks random, stays seek-deterministic.-- **Instant text / number swaps:** `tl.set(el, { textContent: "…" }, T)` is allowed and is- the workhorse percussive move. Give the node `width: max-content` (or a fixed width) and- centre it so a longer word does not reflow the layout.--## CSS Values--Complex CSS strings for `clipPath`, `filter`, or transforms should be valid CSS in the-HTML source. If a serializer path requires raw passthrough, use the repo convention:-`"__raw:'inset(0 0% 0 0)'"`.--## Visual QA--- `t=0` is not blank unless intentional silence is specified.-- The first meaningful visual appears during the first section.-- Drop / surge has a visible hit within about 0.15s of the intended anchor.-- Dense sections show visual density, not just a single static word.-- Hard stop creates a readable hold or freeze.-- Final frame is intentional.-- Main text is readable and not colliding.-- Palette is coherent; define colors once through CSS variables or one palette block.--## Inspect Targets--When running `hyperframes inspect`, include:--- `0`-- every `visual-plan.json` `groups[].span_sec` start-- every `transitions[].at`-- strongest `DROP` / `SURGE` key moments-- every `hard_stops[].t`-- start/end of major `rolls[]`-- `duration - 0.2`diff --git a/skills/bgm-to-video/references/motion-primitives.md b/skills/bgm-to-video/references/motion-primitives.mddeleted file mode 100644index be704f2fc7..0000000000--- a/skills/bgm-to-video/references/motion-primitives.md+++ /dev/null@@ -1,123 +0,0 @@-# Motion Primitives — recipe catalog for Builder--The atomic layer: one anchor → one micro-move. Group Templates (L1) are composed from-these; the Builder also reaches here directly when a group is free-composed. **Not a-fixed API** — they are creative-coding recipes.--One flat catalog. The **recipe** column tells you what to lift:--- **✓** — a runnable, lint-clean composition at `motion-primitives/<id>/index.html`. Open- it and lift the relevant tweens.-- **≈ `<id>`** — no separate file; use that existing recipe, it's the same idea.-- **—** — no standalone file. Implement it inline from the description + `builder-contract.md`;- these are one-liners (e.g. a 0ms `tl.set`) or moves a template realizes internally.--## Timing & latency (applies to every primitive)--Quantified from frame-accurate reverse engineering of beat-synced reels:--- **Hard hits are 0ms.** Cuts, palette flips, content swaps, freezes are `tl.set(...)`- with no duration — the percussion _is_ the motion. Easing a hit kills it.-- **Lead the anchor.** A move that must _land_ on a beat (a wipe covering the frame, a- count-up locking, two blocks colliding to centre) should **start ~40–190ms early** so it- completes ON the anchor. Reactive entrances — something appearing _because_ of the hit —- fire 0–45ms after.-- **Eased entrances: 300–500ms** (scale punch, slides, camera pushes). **Macro builds:- 800–2000ms** spanning a whole roll / silence.-- **Magnitudes:** scale-punch entrance 0→1; weight pulse 1→1.06; hero fill up to 1→5;- chromatic split ~20px, resolve clean in ≤150ms.-- **Per-bar caps:** one accumulating element per audio hit (not a burst); a camera move at- most once per phrase, never per beat; a dense flip/strobe system runs ≤2–3s.-- **Tension-builds lock.** A count-up / sequential build / morph must _resolve on_ a- downbeat or hard_stop, never trail off mid-bar.--## Catalog--Each runnable recipe is self-contained and lint-clean: showcase chrome stripped,-system-font fallback, shared `../assets/gsap.min.js`, one paused timeline on-`window.__timelines["main"]`. To use one, read its `index.html` and lift the tweens.--| id | anchor | what it does | recipe |-| ------------------------ | -------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------- |-| `01-hypercut_whip` | beat / hard_stop | fast whip-pan hard cut between frames | ✓ |-| `02-kinetic_letter_in` | downbeat / phrase | per-letter kinetic entrance | ✓ |-| `03-braam_punch` | drop / surge | big "braam" impact — scale + weight slam | ✓ |-| `04-chromatic_split` | snare / glitch / surge | RGB channel split / glitch on a word | ✓ |-| `05-mask_reveal` | section_start / downbeat | clip-path mask wipe reveal | ✓ |-| `07-screen_shake` | drop / crash / kick | camera/screen shake jitter | ✓ |-| `08-binary_decrypt` | roll / build | scramble→decode text (binary → word) | ✓ |-| `09-dolly_zoom` | phrase / build | vertigo dolly-zoom (scale vs perspective) | ✓ |-| `10-iris_open` | section_start / reveal | circular iris-open reveal | ✓ |-| `11-electric_arc` | accent / glitch | electric arc / lightning accent | ✓ |-| `12-neon_flicker` | hold / texture | neon-sign flicker | ✓ |-| `13-chrome_sweep` | downbeat / reveal | metallic specular sweep across text | ✓ |-| `15-slot_machine_reveal` | roll → downbeat | slot-machine spin-to-land character reveal | ✓ |-| `16-liquid_morph` | phrase / transition | liquid / blob morph | ✓ |-| `17-gooey_metaball` | build / drop | gooey metaball merge field | ✓ |-| `18-3d_card_flip` | downbeat / swap | 3D card flip (rotateY) | ✓ |-| `19-crash_zoom_in` | drop / surge | violent crash zoom-in | ✓ |-| `20-spotlight_sweep` | reveal / hold | spotlight / gradient sweep over text | ✓ |-| `21-outline_to_fill` | downbeat / reveal | stroke outline → solid fill | ✓ |-| `22-counting_punch` | roll → downbeat | number count-up that punches & locks | ✓ |-| `24-particle_burst` | drop / crash | particle explosion burst | ✓ |-| `25-radial_burst_lines` | drop / surge | radial speed-lines burst | ✓ |-| `26-pixel_dissolve` | transition / hard_stop | pixelated dissolve | ✓ |-| `27-datamosh_smear` | glitch / transition | datamosh / motion smear | ✓ |-| `28-text_wave_distort` | hold / texture | wavy text distortion | ✓ |-| `bg_flow_field` | energy / whole span (bed) | generative WebGL curl-noise flow-field **background bed** — palette-driven, breathes on the energy envelope; run it underneath and compose any foreground move over it | ✓ |-| `blur_resolve` | stop / final hold | blur-in to crisp focus, then blur-out on the cut | ✓ |-| `chromatic_pressure` | snare / glitch | RGB split / digital tension on a transient | ≈ `04-chromatic_split` |-| `color_grid_shuffle` | onset | grid of cells recoloured by a deterministic index per onset | — |-| `content_swap` | beat | 0ms swap of stacked nodes — the workhorse percussive move | ≈ `15-slot_machine_reveal` |-| `directional_fill` | beat / reveal | directional wipe-fill (scaleX) sweeping across bars | ✓ |-| `flash_cut` | drop / crash | full-frame flash masking a word/colour state change | ✓ |-| `freeze_hold` | hard_stop | freeze the moving system and hold it (desaturate + vignette) | — |-| `hard_cut` | beat / hard_stop | sample-accurate 0ms colour-block + word cut | ✓ |-| `mosaic_pack` | beat / build | scattered tiles fly in and pack into a grid | ✓ |-| `negative_space_hold` | silence / hard_stop / final hold | kill busy layers, hold one readable mark in empty space | — |-| `overlay_pop` | accent | badge / lower-third overlay pops in over a base | — |-| `palette_flip` | section change | same layout re-skins via 0ms palette-variable flips | ✓ |-| `staggered_exit` | phrase / transition | ordered cascade-out clearing the frame | ✓ |-| `staggered_reveal` | build | ordered cascade-in of a stack / list | — |-| `system_replace` | drop / regime change | hard-cut the entire visual system, then boot the new one | — |-| `text_spectral_rays` | phrase / sweep (hero text) | volumetric spectral light-rays cast by a wordmark toward a sweeping light cursor — grain + RGB-split; **WebGL hero-text system** | ✓ |-| `tile_mosaic` | build / reveal | grid of tiles revealed in a diagonal sweep, assembling a poster | ✓ |-| `typewriter_reveal` | roll / build | char/word type-on, explicit per-span set (no `stagger`) + caret | ✓ |-| `value_counter` | roll → downbeat | count-up that locks on a downbeat / hard_stop | ≈ `22-counting_punch` |-| `word_grid_burst` | onsets → downbeat | grid of words revealed per onset, refocus one on a downbeat | ✓ |--> **Template-private verbs.** Some templates declare motion verbs realized only inside their-> own impl — e.g. `held_lockup`, `anchor_pop_in`, `word_slot_cycle`, `per_line_color`,-> `scene_palette_flip`, `beat_jitter_shake`, `box_zoom_wipe` (split-anchor-word-slot),-> `motion-blur` (logo-split). Those live in the template's own `index.html` / README, not-> here. Promote one into this catalog only when a second template needs it.--## How to combine--- One dominant system per group; layer at most one texture recipe over one structural recipe.-- Structure on strong beats (cuts, camera, system_replace → downbeat / phrase / section_start);- texture on weak / syncopated hits (content_swap, typewriter letters, chromatic accents).-- A roll is an accumulation container — build during it, hard-cut to a clean layout on the- downbeat that ends it.-- `drop` ≠ `downbeat`: a downbeat is a cut within the regime; a drop is a regime change- (`system_replace`, total clear, element-count jump).-- Let silence remove density (`negative_space_hold`).-- **Background beds are a layer, not a move.** A bed (e.g. `bg_flow_field`) runs the whole- span on the **energy / phrase** channel, leaving the **beat anchors** free for the- foreground — so it composes cleanly _under_ any discrete primitive (text `content_swap`,- `hard_cut`, a held mark…). One bed at a time; when mounting into a group, merge the bed's- uniform tweens onto the group's master timeline (don't run a second timeline), bundle a- local `three`/WebGL (no CDN), and repaint via the timeline's `onUpdate` (no rAF).-- **WebGL "system" primitives come in two roles:** a **bed** (`bg_flow_field`, behind- everything) and a **hero-text treatment** (`text_spectral_rays`, which rasterizes the- wordmark and _is_ the hero). Use at most one of each; feed text/raster locally (no CDN- fonts), repaint via `onUpdate`.-- **`text_spectral_rays` renders its OWN wordmark — never give the word a second source.**- It draws the solid letters AND the rays from one glyph mask (perfectly registered). Do NOT- use it as a "rays-only" layer behind a separate DOM logo (or stack `content_swap` /- `chromatic_pressure` on the same word): the two fonts/positions won't match and you get a- doubled / ghosted wordmark — and deleting the shader's letter terms does not fix it (the- ray mask is still the second, misaligned copy). Let the shader be the wordmark; hide any- DOM logo (keep it only as an invisible layout spacer). If you move the word off- frame-center, move the light cursor's `y` by the same amount. Full recipe:- [`motion-primitives/text_spectral_rays/USAGE.md`](motion-primitives/text_spectral_rays/USAGE.md).diff --git a/skills/bgm-to-video/references/signature-schema.md b/skills/bgm-to-video/references/signature-schema.mddeleted file mode 100644index eecf08f1d2..0000000000--- a/skills/bgm-to-video/references/signature-schema.md+++ /dev/null@@ -1,195 +0,0 @@-# GroupSignature — the shared schema (linchpin)--One schema, three producers:--- the **Music Reader** emits one `GroupSignature` per **section** (over its whole span);-- the **Director** derives one per **group** when it subdivides a section;-- a **template's match-face** declares which `GroupSignature`s it fits.--Because all speak this vocabulary, matching a group to a template is mechanical. **Do not-let them drift.** Every field here is derived from `audiomap.json` (fact) — never invented-— so it holds at runtime with no video.--## Two levels: sections → groups--Segmentation is split across two stages by who knows what:--1. **Sections** (Music Reader, catalog-blind) — the musical macro-structure: runs of one- gesture, snapped to real state-changes. Each section is a full `GroupSignature` over its- whole span **plus** a `cut_candidates[]` menu — the musically-legal internal anchors a- finer cut could land on. The Music Reader does **not** decide how many groups a section- becomes.-2. **Groups** (Director, catalog-aware) — the treatment units a template actually binds to.- The Director subdivides each section by acting on zero or more of its `cut_candidates`,- because the right granularity depends on template native spans only it can see. A- section kept whole is one group (== itself); a long / multi-gesture section becomes- several. The Director derives each group's `GroupSignature` over its own slice.--`sections[]` (in `music-read.json`) tile the **whole track** (first at 0, last at-`duration_s`, no gaps/overlaps). The Director's `groups[]` (in `visual-plan.json`) tile it-too; every group carries the `section_id` it came from, and a section's groups tile that-section's span.--A **template matches a `group`** (which may be a whole section) — the match-face below is-unchanged. **Multiple templates inside one section are fine** (the brand spine unifies-them, not template reuse).--```jsonc-"sections": [- {- // a GroupSignature over the whole section span (every field below) + a cut menu- "id": "s1",- "span_sec": [19.412, 30.0], // [start,end], snapped to AudioMap anchors (re-snapped to nearest beat)- "structural_type": "per_onset_sequential",- "mood": ["dark", "cinematic"],- // …all other GroupSignature fields, derived over the whole span…- "cut_candidates": [- // musically-legal internal cut points the Director MAY use; empty for a single- // gesture; NEVER inside a rolls[] run; never leaving a sub-1-bar fragment.- { "time": 23.963, "kind": "hard_stop", "strength": "strong" },- { "time": 26.215, "kind": "surge", "strength": "strong" },- ],- },-]-```--## The object--```jsonc-{- "id": "g1", // group id within the track- "section_id": "s1", // the section this group lives in (its groups tile the section span)- "span_sec": [0.0, 4.017], // [start, end], snapped to AudioMap anchors- "span_bars": 2, // length in bars (rounded)-- "structural_type": "sustained_hold", // controlled vocab — see rubric below- "mood": ["warm", "cinematic"], // controlled vocab, 1–3 tags-- // ── objective audio facts (straight from audiomap) ──- "energy_level": "HIGH", // VOID | LOW | MEDIUM | HIGH (dominant phase)- "energy": 0.8, // 0–1, mean of the dominant phase- "density": "sparse", // sparse | medium | dense (audiomap fact)- "onset_rate": 1.0, // onsets / sec over the span- "onset_gap_bars": 2.05, // longest onset desert, in bars (key discriminator)- "has_steady_grid": true, // stable bpm + ≥2 downbeats present- "bpm": 129.2,-- // ── roll lane (from audiomap rolls[] overlapping the span; false/null if none) ──- "has_roll": false, // any rolls[] entry overlaps the group- "roll_kind": null, // dominant roll kind: fill | accel-roll | sustained-fill- "roll_rate_per_min": 0, // hits/min of the dominant (longest) overlapping roll- "roll_count": 0, // rolls[] entries overlapping the span-- // ── boundaries ──- "entry": { "anchor": "downbeat", "time": 0.093 },- "exit_trigger": { "type": "first_onset_reentry", "time": 4.017 },-}-```--## Field derivation (from audiomap — make this automatic)--| field | how to compute |-| --------------------------------- | -------------------------------------------------------------------------------------------- |-| `span_sec` | the group's [start,end]; snap each to nearest `downbeats_sec` / `hard_stops` / `phrase` edge |-| `span_bars` | `round((end-start) / bar_dur)`, where `bar_dur = beats_per_bar * 60/bpm` |-| `energy_level` / `energy` | the `energy_phases[]` block covering most of the span → its `level` / `energy` |-| `density` | dominant `energy_phases[].density` over the span |-| `onset_rate` | `count(events in span) / (end-start)` |-| `onset_gap_bars` | `max gap between consecutive events[].t inside the span` ÷ `bar_dur` |-| `has_steady_grid` | `tempo.n_bars >= 2` and bpm stable |-| `has_roll` / `roll_count` | any / count of `rolls[]` overlapping the span |-| `roll_kind` / `roll_rate_per_min` | `kind` / `rate_per_min` of the dominant (longest) overlapping roll |-| `entry` | first anchor at/after `start` (prefer `downbeat`) |-| `exit_trigger` | see exit-trigger rule below |--Worked example (group_1): max onset gap `3.971 − 0.163 = 3.808s`; `bar_dur =-4·(60/129.2) = 1.858s`; `onset_gap_bars = 3.808/1.858 = 2.05`. ✓--## exit_trigger rule (also the group boundary)--Pick the first that applies, snap its time to the nearest downbeat:--1. longest onset gap ≥ ~1.5 bars **and** an onset follows it → `first_onset_reentry`- (the held section ends when rhythm re-enters — group_1).-2. a terminal `hard_stops[]` in the span → `hard_stop`.-3. a `SURGE` into a denser phase at the end → `surge`.-4. otherwise → `downbeat` (next bar) or `end` (track end).--> Per decision #2: the Music Reader proposes the boundary; when a chosen template's-> stop rule disagrees, the **Director reconciles** to the nearest AudioMap anchor.-> They rarely conflict because both come from these same facts.--## Controlled vocabularies (SEED — grows as we reverse)--These lists are the dictionary both sides must use. Adding a value is a deliberate-catalog change, not an ad-hoc string.--### `structural_type`--| value | the music | seen in |-| ---------------------- | ----------------------------------------------------------- | ------------------ |-| `sustained_hold` | energy present but few/no onsets — a held pad/riser | group_1 |-| `per_onset_sequential` | discrete onsets drive one reveal each (typing/word-by-word) | group_2 (expected) |-| `roll_cascade` | a `rolls[]` run → continuous cascade / multiply | — |-| `dense_multiply` | HIGH + dense, no single message → field/grid/strobe | — |-| `void_breath` | VOID / silence dominant → clear & hold | — |-| `hard_stop_freeze` | terminal hard stop → freeze to negative space | — |-| `drop_regime_change` | SURGE into dense → system replace | — |--> `dense_multiply` is currently a **broad bucket** — three promoted templates live under-> it (`roll-flipbook-word-cycle`, `held-text-strobe-burst`, `poster-tile-mosaic`),-> disambiguated by their `match.requires` (a fast `sustained-fill` roll vs a tiny-> `onset_gap_bars` strobe vs a tessellating tile program). Candidate future subtypes:-> `held_strobe`, `tile_mosaic_program`. Split them out when a 4th example forces it.--### `structural_type` classification rubric (decision tree)--Run top-down, first match wins:--1. VOID dominant & `onset_rate ≈ 0` → `void_breath`-2. terminal `hard_stop` + freeze, little after → `hard_stop_freeze`-3. `rolls[]` spans most of the group → `roll_cascade`-4. `energy_level ≥ MEDIUM` & `density == sparse` & `onset_gap_bars ≥ 1.5` → `sustained_hold`-5. `density == dense` & `energy_level == HIGH` & no dominant readable mark → `dense_multiply`-6. onsets present, discrete, each plausibly one reveal → `per_onset_sequential`-7. `SURGE` into a denser phase → `drop_regime_change`-8. none fit cleanly → leave `structural_type: "unclassified"` and flag for a NEW type.--### `mood` (1–3 tags)--`warm` · `dark` · `hype` · `elegant` · `glitch` · `cinematic` · `playful` · `tense` ·-`dreamy` · `aggressive`. Derive from `energy_phases[].feel` (warm/heavy/bright/sparse)--- energy + the Gemini read's genre cues.--### `exit_trigger.type`--`first_onset_reentry` · `hard_stop` · `surge` · `downbeat` · `end`.--### role kinds (used by templates, see template-definition.md)--`message` (readable text) · `background` (field/texture) · `camera` · `asset` ·-`overlay` (grain/vignette/chrome).--### motion verbs (per role; each maps to an L0 primitive or a custom phrase)--`freeze_after_reveal` · `energy_envelope_breath` · `per_onset_pop` · `cascade` ·-`strobe` · `camera_push` · `hold` · `font_shuffle` (cycle typefaces on the beat) ·-`flipbook` (0ms word/glyph swap per 16th over a roll) · `scramble_decode` (scrambled →-locked phrase). Link the L0 id in the template's `uses_primitives`; a verb with no L0 id-is a custom phrase the impl defines.--> **Meta-templates** (a base + a program of beat-synced _operations_, e.g.-> `poster-tile-mosaic`) may declare an `operations` / `engine` block instead of role-> `motion` verbs — see template-definition.md extension fields.--## Self-check--- Every field traces to an `audiomap.json` value or a span of it.-- `structural_type`, `mood`, `exit_trigger.type`, role kinds, motion verbs are all from- the controlled vocab (or explicitly flagged as a proposed new value).-- `sections[]` (music-read) and the Director's `groups[]` (visual-plan) each tile the whole- track; every group's `section_id` names an existing section; a section's groups tile its- `span_sec`.-- The same object validates whether it came from the Music Reader (a section), the Director- (a group), or a template example.diff --git a/skills/bgm-to-video/references/template-definition.md b/skills/bgm-to-video/references/template-definition.mddeleted file mode 100644index d3dbdb8020..0000000000--- a/skills/bgm-to-video/references/template-definition.md+++ /dev/null@@ -1,156 +0,0 @@-# Template definition — what a Group Template IS--A Group Template is a reverse-engineered, reusable archetype for **one whole group** of-a BGM track. It lives at `templates/<id>/` and has three parts:--```-templates/<id>/- card.json ← the spec: match-face + build-face (this doc)- index.html ← the reference implementation (parameterized, asset-free)- README.md ← human notes + provenance + the source frames-```--A card has **two faces**:--- **match-face** — small, structured, in `GroupSignature` vocab. The Director reads it- to decide _does this template fit this group?_ Keep it concise (decision: simple).-- **build-face** — richer. Tells the Builder _how to realize it_: roles, fillable- params, the reference impl, the primitives used, the exit transition.--## `card.json` schema--```jsonc-{- // ── identity ──- "id": "held-message-living-field",- "name": "Held Message / Living Field",- "one_line": "A readable mark held dead still over a soft, color-shifting blurred field.",- "status": "draft", // draft (in reverse workspace) → promoted (in catalog)-- // ── MATCH FACE (GroupSignature predicates — see signature-schema.md) ──- "match": {- "structural_type": "sustained_hold",- "requires": {- // predicates over a group's GroupSignature- "energy_level": ">=MEDIUM",- "density": "sparse",- "onset_gap_bars": ">=1.5",- "has_steady_grid": true,- },- "mood_fit": ["warm", "dark", "elegant", "cinematic"],- "span_bars": [2, 8], // typical extent- "exit_trigger": ["first_onset_reentry", "hard_stop"],- },-- // examples = real reversed groups this template was mined from. Auto-filled from each- // sample's audiomap. More examples → more trustworthy `requires` thresholds.- "examples": [- {- "sample": "bgm_test_2",- "group": "g1",- "bpm": 129.2,- "energy": 0.8,- "density": "sparse",- "onset_gap_bars": 2.05,- "span_sec": [0.0, 4.017],- },- ],-- // ── BUILD FACE ──- "roles": {- "message": {- "kind": "message",- "motion": "freeze_after_reveal", // reveal on entry, then dead still- "anchor": "entry.downbeat",- "notes": "readable ≥ whole span; no per-element motion (there are no onsets)",- },- "field": {- "kind": "background",- "motion": "energy_envelope_breath", // brightness/chroma track the energy envelope- "anchor": "energy",- "notes": "the ONLY thing moving; peaks at the SURGE; settles dark for the hold",- },- // optional: "camera", "asset", "overlay"- },-- "params": {- // fillable slots = composition-variables in index.html- "text": { "type": "string", "maps_to": "message.content" },- "palette": { "type": "object", "keys": ["bg", "colorLow", "colorMid", "colorHigh", "accent"] },- "flowSpeed": { "type": "number", "default": 1 },- "duration": { "type": "number", "from": "group.span_sec length" },- },-- "reference_impl": "index.html",- "uses_primitives": ["blur_resolve", "negative_space_hold", "chromatic_pressure"],-- // group→group exit. Default fast_cut for everything now (decision #4); the observed- // transition is recorded for later.- "transition_out": { "default": "fast_cut", "observed": "anticipation_glitch_cut" },-- // ── provenance ──- "reversed_from": ["bgm-golden-sample-reverse/gorup-by-group/group_1"],- "created": "fill at promotion time", // scripts can't call Date.now(); stamp by hand-}-```--### Required fields--`id`, `name`, `one_line`, `status`, `match` (`structural_type` + `requires` +-`mood_fit` + `exit_trigger`), `examples[]` (≥1), `roles` (≥1), `params`,-`reference_impl`, `transition_out`, `reversed_from`.--## Rules for each face--**match-face — keep it minimal.**--- `requires` predicates use simple operators: `">=X"`, `"<=X"`, `"==X"`, a literal, or a- list (any-of). Only constrain fields that actually distinguish this template.-- Don't encode creative taste here — that's the build-face. The match-face answers one- question: _does this group's signature fit?_--**build-face — whole-group, roles declared separately (decisions #1, #2).**--- One template covers the whole group (background + text together), but every moving- thing is its own `role` with its own `motion` + `anchor`, so roles can be factored- into composable role-templates later without rewriting cards.-- Each `role.motion` is a verb from the signature schema; each verb resolves to an L0- primitive id listed in `uses_primitives` (or a custom phrase the Builder can implement).-- `params` are exactly the composition-variables the reference impl exposes (so the- Builder fills them by passing `--variables`, no code edit needed for content/palette).--## Reference implementation (`index.html`)--- A HyperFrames composition (one paused GSAP timeline, deterministic, asset-free, passes- `lint` + `validate`).-- Exposes `params` as `data-composition-variables` (text + palette + speed + duration).-- A template may **bundle local assets** under `assets/` when its look genuinely needs- them (e.g. `held-text-strobe-burst` ships texture-mask PNGs + a local `gsap.min.js`).- Local bundled assets are allowed; remote assets / remote fonts are not.--## Extension fields (allowed beyond the required set)--Cards may carry extra fields when a template needs them. Promoted examples use:--- `beat_map` — script-side musical timing constants the impl reads (onset / roll seconds,- font / flip steps). Content lives in `params`; musical _timing_ lives here.-- `bundled_assets` — a note on what the impl ships under `assets/`.-- `base_template` / `operations` / `engine` / `program_format` / `program_data` —- **meta-templates**: one base look + a data-driven _program_ of beat-synced operations- (e.g. `poster-tile-mosaic`). The `program` param is the compose-by-data surface; the- operator code is fixed. Such a card may omit the standard `roles` motion-verbs.-- `provenance` — the source video / audiomap / video-read the template was reversed from.-- `examples[]` entries may carry extra audio facts (`roll`, `bursts_sec`,- `downbeats_sec`, …) beyond the required signature fields.--## Status lifecycle--`draft` (produced in the reverse workspace) → reviewed → `promoted` (copied into-`templates/<id>/`, added to the catalog). The Director only matches `promoted` cards.--## Worked example--The catalog ships five promoted templates (`held-message-living-field`,-`typewriter-phrase-keyword-shuffle`, `roll-flipbook-word-cycle`,-`held-text-strobe-burst`, `poster-tile-mosaic`) — each a real reversed group. Read any-`templates/<id>/card.json` for a filled-in reference.diff --git a/skills/bgm-to-video/references/transition-catalog.md b/skills/bgm-to-video/references/transition-catalog.mddeleted file mode 100644index b05a5f4f72..0000000000--- a/skills/bgm-to-video/references/transition-catalog.md+++ /dev/null@@ -1,54 +0,0 @@-# Transition Catalog (group → group)--Transitions between groups are L1 patterns, just like Group Templates. This catalog is-the interface; the Director picks a transition for each group boundary.--> **Decision #4: keep the interface, default EVERYTHING to `fast_cut` for now.** The-> reverse pipeline still _records_ the real observed transition on each template-> (`transition_out.observed`) so we can activate richer ones later — but the Director-> emits `fast_cut` for every boundary until we say otherwise.--## Entry schema--```jsonc-{- "id": "fast_cut",- "one_line": "Instant hard cut on the boundary downbeat. 0ms.",- "anchor": "boundary.downbeat", // which audio moment it lands on- "duration_ms": 0,- "mechanism": "tl.set(): kill group A, show group B on the same frame — no tween.",- "uses_primitives": ["hard_cut"], // L0 ids (bgm-motion-vocabulary.md)- "status": "active", // active | recorded (known but not yet emitted)-}-```--## Active--### `fast_cut` — DEFAULT for all boundaries--- **Anchor:** the boundary downbeat (the group's `exit_trigger.time`, snapped).-- **Mechanism:** 0ms `tl.set()` — hide group A, reveal group B on the same frame. No- crossfade, no tween. The cut _is_ the transition.-- **Why default:** zero-asset, never wrong, reads as decisive editing; lets us ship the- template pipeline before investing in bespoke transitions.-- **Primitives:** `hard_cut`.--## Recorded (known from reverses, NOT emitted yet)--These come out of the reverse pipeline as `transition_out.observed`. Kept here as the-backlog to activate once fast_cut-everything is working.--### `anticipation_glitch_cut` _(observed: group_1 → group_2)_--- A few-frame chromatic/noise glitch on the **pre-beat** (the onset just before the- boundary downbeat), impact landing on the downbeat. A "spring" that amplifies the- next group's entrance. Primitives: `chromatic_pressure` + `hard_cut`.-- Status: `recorded`. To activate: add `"status":"active"` and let the Director choose- it when a boundary's `exit_trigger.type == "first_onset_reentry"`.--## How the Director uses it (target)--For each adjacent group pair, set `transitions[]` entry `{ from, to, transition:-"fast_cut", at: boundary_time }`. Until further notice, `transition` is always-`fast_cut`. A template's `transition_out.observed` is metadata for the future, not an-instruction.diff --git a/skills/bgm-to-video/references/visual-plan-contract.md b/skills/bgm-to-video/references/visual-plan-contract.mddeleted file mode 100644index 9627e9561f..0000000000--- a/skills/bgm-to-video/references/visual-plan-contract.md+++ /dev/null@@ -1,158 +0,0 @@-# Visual Plan Contract (template-driven)--The Director writes `visual-plan.json`. It is a build spec, not code. Unlike the-scene-based plan, this one is **group-driven**: the Director **creates the groups** by-subdividing each `music-read.json` section at its `cut_candidates` (catalog-aware — see-director.md), then writes one entry per group, each either bound to a **promoted Group-Template** or **free-composed**, plus the group→group transitions.--## Output shape--```jsonc-{- "compositionId": "bgm",- "duration_s": 7.198, // == audiomap.audio.duration_sec, exactly- "canvas": { "w": 1920, "h": 1080, "fps": 30 },-- // ── brand spine: ONE identity across all groups, so different templates still read- // as one piece. The Director sets this from the brief's mood. ──- "style": {- "name": "warm cinematic recap",- "mood": "warm / cinematic",- "palette": ["#040406", "#100a2e", "#d23b5e", "#ffd9c2", "#ffb27a"],- "font": "system-safe stack or local @font-face",- "texture": "grain / light-leak",- },-- // echoed from music-read.json (the source sections + cut_candidates the Director split).- // Groups that share a section may use DIFFERENT templates — no reuse rule; the brand- // spine unifies them.- "sections": [- {- "id": "s1",- "span_sec": [0.0, 7.198],- "structural_type": "sustained_hold",- "mood": ["warm", "cinematic"],- },- ],-- "groups": [- {- "id": "g1",- "section_id": "s1", // the section this group was cut from- "span_sec": [0.0, 4.017], // Director-chosen: between cut_candidates (or the whole section), reconciled to the stop rule- "structural_type": "sustained_hold",- "mood": ["warm", "cinematic"],-- "templateRef": "held-message-living-field", // a promoted template id, or null-- // params = the template's composition-variables, filled. Keys MUST match the- // template card's `params`. (Omitted when templateRef is null.)- "params": {- "kickerText": "PREVIOUSLY ON",- "heroText": "DUCKLIFE",- "palette": {- "bgColor": "#040406",- "colorLow": "#100a2e",- "colorMid": "#d23b5e",- "colorHigh": "#ffd9c2",- "accentColor": "#ffb27a",- },- "flowSpeed": 1,- "duration": 4.017,- },-- // bind each template role to this group's real anchors (absolute audio seconds)- "role_bindings": {- "message": { "reveal_at": 0.093, "motion": "freeze_after_reveal" },- "field": { "drive": "energy_envelope", "surge_at": 1.0 },- },-- // when templateRef is null, describe the free composition instead (uses L0):- "free_design": null,- // e.g. { "dominant_system": "per-onset typography", "layout": "...",- // "primitives": ["content_swap","scale_punch"], "density_topology": "accumulate" }- },- ],-- "transitions": [- { "from": "g1", "to": "g2", "transition": "fast_cut", "at": 4.017 }, // default fast_cut- ],-- // the Director owns the words (see Copy rules). Texture vs message decided per item.- "copy": {- "headline": "DUCKLIFE",- "kickers": ["PREVIOUSLY ON"],- "taglineWords": [],- "keywords": [],- "ctaWords": [],- "logo": null,- },-- "build_notes": ["one paused GSAP timeline", "no remote assets", "grain over every group"],- "avoid": ["generic slideshow", "tiny unreadable hero text"],-}-```--Required fields: `compositionId`, `duration_s`, `canvas`, `style`, `groups[]`,-`transitions[]`, `copy`, `build_notes[]`. Echo `sections[]` from music-read for-traceability; each group carries its `section_id`.--## Group rules--- **The Director creates groups by subdividing sections** (director.md): each group's- `span_sec` runs between chosen `cut_candidates` (or is the whole section), then is- **reconciled** to the chosen template's stop rule (snap to the nearest AudioMap anchor —- decision #2). Groups are in audio order; adjacent `span_sec` tile the timeline with no- gaps/overlaps; the last ends at `duration_s`; no group is < ~1 bar.-- **Each group carries its `section_id`** (the section it was cut from). Groups that share a- section may use **different templates** — match each independently; cohesion comes from- the brand spine, not template reuse.-- **Every group is either `templateRef` (a promoted id) or `free_design`** — never both,- never neither.-- **`params` keys must match the referenced card's `params`** exactly, so the Builder can- pass them straight to the reference impl's composition-variables.-- **`role_bindings` use real anchor seconds** from this group's slice of the AudioMap, not- the template's example times.--## Matching (how the Director picks a template — see template-definition.md)--For each group: keep promoted cards where `card.match.structural_type == group.structural_type`-**and** the group's `GroupSignature` satisfies every `card.match.requires` predicate-**and** `mood` overlaps `card.match.mood_fit`. Rank survivors by signature closeness /-example count; take the top. If none survive → `templateRef:null` + `free_design`-(compose from `motion-primitives.md`, one thesis for the group).--## Transitions--One entry per adjacent pair. **`transition` is always `"fast_cut"` for now**-(decision #4) — a 0ms hard cut at `at` (the boundary, = the earlier group's-`exit_trigger` time, snapped). The catalog interface allows richer transitions later; do-not emit them yet.--## Copy rules (Director owns the words)--- Keep any exact words the user supplied; otherwise invent with taste, on the brief's mood.-- **Message vs texture:** a word that must be read holds ≥1 beat, stable and focal; a word- held <1 beat is texture (strobe/ticks). Never force a message onto a sub-beat.-- Copy fills template `params` (or, for free groups, rides the group's anchors). Do not- hand-place every word's millisecond — declare the anchor + accumulate/stagger intent and- leave micro-timing to the Builder.--## Brand spine--One type family, a ≤4–6 swatch palette, ≤2 accents per frame, applied across every group.-Different templates per group are fine — the spine is what unifies them.--## Self-check--- `duration_s == audiomap.audio.duration_sec`; groups tile it exactly; no group < ~1 bar;- no group boundary lands inside a `rolls[]` run.-- Each group carries a `section_id` present in `sections[]`; its `span_sec` came from that- section's `cut_candidates` (or is the whole section); groups in one section may use- different templates.-- Every group resolves to a promoted `templateRef` **or** a `free_design`.-- Every `templateRef` exists under `templates/` and its `match.requires` is satisfied by- the group's signature.-- `params` keys == the card's `params`; `role_bindings` use real AudioMap seconds.-- One `transitions[]` entry per boundary, all `fast_cut`.diff --git a/skills/bgm-to-video/templates/card-flyby/README.md b/skills/bgm-to-video/templates/card-flyby/README.mddeleted file mode 100644index 58503e870d..0000000000--- a/skills/bgm-to-video/templates/card-flyby/README.md+++ /dev/null@@ -1,128 +0,0 @@-# Card Flyby · accelerating 3D deck cascade — `card-flyby`--A depth column of **N cards** rolls **forward** through perspective. On each landing-beat the next card **tumbles up into the front slot** and **wipes in** its solid colored-face (angled clip-path), the previous front card **tumbles forward + falls toward the-camera** on exit, and the cards behind **advance one slot**. Dwells **shrink card-to-card**,-so the deck reads as an **accelerating rush** into a **held final card**.--> **Origin — sandbox, not a golden-sample reverse.** Unlike the other catalog templates,-> this one was authored from the **`card-flyby` sandbox** composition (a Shader-Deck-style-> flyby), so there is **no source `audiomap.json` / Gemini read**. The match-face is a-> **hypothesis** about which music the look fits, and `card.json → examples[].synthetic`-> flags its cadence as design-intent. The first time this template is matched to a real-> reversed group, add that group as a real `examples[]` entry and tighten `requires`.--## Files--```-card-flyby/- card.json ← the spec (match-face + build-face) · status: promoted- index.html ← reference impl (parameterized GSAP; data-driven deck)- program.json ← the default 6-card deck + landing schedule (standalone, editable)- assets/gsap.min.js ← bundled GSAP (offline-safe)- renders/recreate.mp4 ← rendered proof @30fps (the default deck)-```--No fonts are bundled — the look uses a system grotesque stack (`"Inter", "Helvetica-Neue", Arial`). The original sandbox pulled Inter from Google Fonts + GSAP from a CDN-and used a grab-bag of clashing per-card hexes; this promoted impl **drops the remote-deps** (offline), makes the formerly-hardcoded deck **data-driven**, and replaces the-ad-hoc colors with a cohesive **`theme` palette system**.--## How it moves--The scene carries a **static yaw** (side tilt); the cards' own **`rotateX`** drives the-tumble. Depth comes from **perspective (Z translation)** plus aggressive `rotateX` on the-cards behind — the rear card lies almost flat (~84°), each step closer rotates more-upright, the front card is level (0°) and face-on. On exit a card continues _past_-upright into a face-down tumble (`rotX → -88°`) while dropping down + toward the lens.--| slot | role | rotX | what it is |-| --------- | ------- | ------- | ------------------------------------------------------- |-| `far` | back | 84° | a card just entered the column (invisible, opacity 0) |-| `s3`→`s1` | depth | 66°→22° | the rolling-forward column (opacity ramps in) |-| `s0` | front | 0° | upright, face-on — **wipes in its solid face here** |-| `exit` | leaving | −88° | tumbles forward + falls down + toward camera, fades out |--A card's pose is a pure function of how many slots it sits **behind the current front-card** (`poseForRel(rel)`), so the column stays correctly depth-sorted and **any card-count just works** (z-index is set instantly at each swap — CSS can't depth-sort-non-intersecting planes). The default deck is 6 cards over 6.0s.--## Timing (`beat_map` in `card.json` / `landings`)--Content lives in `cards`; musical **timing** lives in `landings` — **one beat per card**,-absolute audio seconds. The default schedule `[0.40, 1.70, 2.70, 3.45, 4.00, 4.40]`-**accelerates** (gaps `1.30 → 1.00 → 0.75 → 0.55 → 0.40`); the final card lands early-enough to hold ~1.6s before the cut. Each landing tween **leads its beat** by its own-duration (`dur_i = clamp(0.32 · gap_into_i, 0.12, 0.42)`) so the card arrives _on_ the-hit; the face wipe runs over the last ~85% of that window.--Omit `landings` and an accelerating schedule is **auto-derived** from the card count +-duration (geometric ~0.78× gap decay) — so a 3- or 9-card deck cascades correctly with-no hand timing.--## Themes (the look knob)--`theme` picks a **cohesive palette** — one temperature/saturation family, so any card-count reads as a _designed_ set (the deck cycles the ramp in order; each face also gets a-gentle top→bottom tonal gradient for depth). White-on-card stays AA at the card type-sizes. Set `theme` and you have a whole new look in one knob.--| `theme` | family |-| -------------------- | --------------------------------------------------------------------- |-| `aurora` _(default)_ | cool jewel arc — teal → ocean → indigo → violet → plum, on blue-black |-| `ember` | warm sunset arc — wine → brick → rust → amber → ochre → bronze |-| `mono` | sleek monochrome blue staircase (dark → mid) |-| `slate` | muted cool slate-grays — understated / editorial |--Add a palette by appending to the `THEMES` table in `index.html` (`bg` + `ink` + a-`colors[]` ramp).--## Parameters (swap freely)--- `theme` — palette preset: `aurora` | `ember` | `mono` | `slate` (default `aurora`).-- `bgColor` — override the radial field base. Empty → the theme's bg.-- `cards` — **JSON array** of `{ title, color? }`; `title` is the big centered hero (the- only copy on each card). Its length sets the deck depth. `color` is **optional** — omit- it and the card takes the next color from the theme ramp (cohesive by default); set it- to override one card. Empty → the built-in 6-card demo deck. (See `program.json`.)-- `landings` — **JSON array** of land beats (abs seconds), one per card. Empty → derived.-- `yaw` — static scene side-tilt in degrees (default `−12`; `0` = face-on).--Fill them with `--variables` (read inside the comp via `window.__hyperframes.getVariables()`):--```bash-npx hyperframes render card-flyby -f 30 --strict-variables \- --variables '{"theme":"ember","cards":"[{\"title\":\"BLACKOUT\"},{\"title\":\"THE HEIST\"}]","yaw":-8}'-```--## Match (when the Director should reach for it)--`structural_type: per_onset_sequential` — a **stream of discrete onsets that-accelerate** (a build into a downbeat) where you want to flash a **sequence of whole-cards** (titles / projects / posters / video tiles), one per hit, climaxing on a held-card. Discriminated from the typewriter / logo-sting `per_onset_sequential` templates by-revealing **whole cards** (not letters/words of one message) and by the **accelerating-cadence**. Put the card you want held longest on the strongest final hit. If the grid-goes quiet (`onset_gap_bars ≥ ~1.5`) this is the wrong template — use a hold template.--> Candidate finer `structural_type`: an `accel-roll` flavor of `roll_cascade` (the-> shrinking-dwell build) — flagged in `card.json` for catalog review, not yet a vocab-> value. Proposed motion verbs `deck_advance` / `wipe_reveal` / `tumble_fall` are-> likewise flagged.--## Verify--```bash-npx hyperframes lint card-flyby # clean (1 inherent window.__timelines note)-npx hyperframes validate card-flyby # no console errors · text passes WCAG AA-npx hyperframes render card-flyby -f 30-```--## Status--`promoted` — in the catalog, matchable by the Director. Because it is sandbox-origin (no-golden-sample provenance), the next reviewer pass should attach a **real reversed group**-as an `examples[]` entry and tighten `match.requires` against it.diff --git a/skills/bgm-to-video/templates/card-flyby/card.json b/skills/bgm-to-video/templates/card-flyby/card.jsondeleted file mode 100644index e6a62a4628..0000000000--- a/skills/bgm-to-video/templates/card-flyby/card.json+++ /dev/null@@ -1,158 +0,0 @@-{- "id": "card-flyby",- "name": "Card Flyby · accelerating 3D deck cascade",- "one_line": "A depth column of N cards rolls forward through perspective: on each landing beat the next card tumbles up into the front slot and WIPES in its solid colored face (angled clip-path), the previous front card tumbles forward + falls toward the camera on exit, and the cards behind advance one slot — dwells shrink card-to-card so the deck reads as an accelerating rush into a held final card.",- "status": "promoted",- "created": "2026-06-17",-- "base_template": {- "primitive": "depth_card_column",- "notes": "A 3D deck of N cards stacked in a perspective depth column (slots s0=front … s3 + far=back, plus an exit pose). Each card is a CSS wireframe (always present, opacity tracks its slot) over a solid face — a gentle top→bottom tonal gradient (--c1/--c2) — revealed by an angled clip-path wipe (--wipe 0→1). The scene carries a static yaw; the cards' own rotateX drives the tumble. N is DATA (the `cards` array) — the slot engine is rel-based (a card's pose is a pure function of how many slots it sits behind the current front card), so 3 / 6 / 9 cards all 'just work'. COLOR is a `theme` (a cohesive palette ramp cycled across the deck), per-card overridable. Asset-free: wireframe + solid cards + system type, bundled GSAP."- },-- "themes": {- "_": "Cohesive palette presets (the `theme` param). Each is ONE temperature/saturation family so any card count reads as a designed set — the deck cycles the ramp in order. White-on-card stays AA at the card type sizes. Per-card `color` still overrides.",- "aurora": "cool jewel arc — teal → ocean → indigo → violet → plum, on blue-black (DEFAULT)",- "ember": "warm sunset arc — wine → brick → rust → amber → ochre → bronze, on warm near-black",- "mono": "sleek monochrome blue staircase (dark → mid), on blue-black",- "slate": "muted cool slate-grays — understated / editorial, on cool charcoal"- },-- "match": {- "structural_type": "per_onset_sequential",- "requires": {- "energy_level": ">=MEDIUM",- "has_steady_grid": true,- "density": ["medium", "dense"],- "onset_gap_bars": "<1.0"- },- "mood_fit": ["hype", "bold", "elegant", "cinematic", "playful"],- "span_bars": [2, 6],- "exit_trigger": ["surge", "downbeat", "hard_stop", "end"],- "notes": "Reach for this when a section has a STREAM of discrete onsets that ACCELERATE (gaps shrinking / a build into a downbeat) and you want to flash a SEQUENCE of items — a deck of titles, projects, posters, video tiles — one per hit, climaxing on a held card. Each card lands on one onset (per_onset_sequential), so it shares the structural_type with the typewriter / logo-sting templates; it is discriminated by being a SEQUENCE OF WHOLE CARDS (not letters/words of one message) and by the accelerating cadence. The strongest hit (final downbeat / surge) should carry the card you want held longest. Candidate finer type: an `accel-roll` flavor of `roll_cascade` (the shrinking-dwell build) — flagged for catalog review, not yet a vocab value. If the grid goes quiet (onset_gap_bars >= ~1.5) this is the wrong template — use a hold template."- },-- "examples": [- {- "sample": "sandbox",- "group": "card-flyby-sandbox",- "synthetic": true,- "structural_type": "per_onset_sequential",- "energy_level": "HIGH",- "density": "dense",- "cards": 6,- "span_sec": [0.0, 6.0],- "landings_sec": [0.4, 1.7, 2.7, 3.45, 4.0, 4.4],- "landing_gaps_sec": [1.3, 1.0, 0.75, 0.55, 0.4],- "cadence": "accelerating (gaps shrink ~0.78× each card); final card holds ~1.6s",- "exit_trigger": { "type": "end", "time": 6.0 },- "note": "NOT reversed from a golden sample. This template was authored from the `card-flyby` SANDBOX composition (a Shader-Deck-style flyby), so these audio facts are the DESIGN-INTENT cadence (the hand-tuned landing schedule), not values derived from an `audiomap.json`. When this template is matched to a real group, `landings` is bound from that group's onset times (one per card) and the schedule re-derives — see beat_map."- }- ],-- "roles": {- "deck_card": {- "kind": "asset",- "motion": "deck_advance",- "anchor": "landings[]",- "notes": "Each of the N cards. On every landing beat the whole column advances one slot toward the front (far→s3→s2→s1→s0). A card's pose is a pure function of its slot-distance behind the front card (rel), so the deck stays correctly depth-sorted for any N. PROPOSED verb 'deck_advance' (per-onset one-slot forward roll of a stacked depth column; ~content_swap promoted to a 3D column)."- },- "front_face": {- "kind": "message",- "motion": "wipe_reveal",- "anchor": "landings[] + ~15% lead",- "notes": "As the landing card rolls into s0 (upright, rotX 0), its SOLID colored face — a big CENTERED hero title + a small play glyph — is revealed by an angled clip-path wipe sweeping upper-left→lower-right (--wipe 0→1, ~0.72° diagonal). The title is the only copy on the face (no eyebrow tag / no meta footer). ~05-mask_reveal."- },- "exit_card": {- "kind": "asset",- "motion": "tumble_fall",- "anchor": "landings[] (the OUTGOING front card)",- "notes": "When a new card lands, the previous front card continues FORWARD past upright into a face-down tumble (rotX → -88°) while dropping DOWN and toward the camera (y +620, z +420, scale 1.10) and fading out. PROPOSED verb 'tumble_fall' (forward over-rotate + fall toward lens). Reverse of the incoming roll."- },- "field": {- "kind": "background",- "motion": "hold",- "anchor": "none",- "notes": "A static radial-gradient field behind the deck (default near-black #06070d). Dead still the whole span; the only motion is the deck. negative_space_hold."- }- },-- "params": {- "theme": {- "type": "string",- "maps_to": "palette (see themes)",- "default": "aurora",- "notes": "Palette preset: aurora | ember | mono | slate. Sets the field bg + the cohesive card-color ramp the deck cycles + the ink. The fastest knob for a whole new look."- },- "bgColor": {- "type": "color",- "maps_to": "field.color (radial gradient base)",- "default": "",- "notes": "Override the field background. Empty = the theme's bg. The radial centre/edge are derived from it."- },- "cards": {- "type": "string",- "maps_to": "deck (engine.cards)",- "default": "",- "notes": "JSON array of card objects { title, color? }. `title` is the big centered hero (the only required field). Its length sets N (the deck depth). `color` is OPTIONAL — omit it and the card takes the next color from the theme ramp (cohesive by default); set it to override one card. Empty = the built-in 6-card demo deck. THIS is the compose-by-data surface for content: add / drop / reorder cards — no code edit."- },- "landings": {- "type": "string",- "maps_to": "beat_map.landings (engine.landings)",- "default": "",- "notes": "JSON array of absolute audio seconds — ONE landing beat per card (length must equal `cards` length). Empty = an accelerating schedule auto-derived from the card count + duration. Bind these from the matched group's onset times so each card lands on a hit."- },- "yaw": {- "type": "number",- "maps_to": "scene.rotateY (deg)",- "default": -12,- "notes": "Static side-tilt of the whole deck. 0 = face-on; negative = scene rotated so the deck reads from the left."- }- },-- "beat_map": {- "comment": "Musical TIMING lives here; content lives in `cards`. All times are ABSOLUTE audio seconds. One landing per card; per-card transition duration is derived from the gap into each landing (faster as the cadence accelerates).",- "landings": [0.4, 1.7, 2.7, 3.45, 4.0, 4.4],- "landings_notes": "one per card, in deck order. Bind from the matched group's onset times. The schedule should ACCELERATE (gaps shrinking) for the signature build; the final card lands early enough to HOLD a beat before the cut. If omitted at build time, an accelerating schedule is generated from card count + duration.",- "transition_dur_rule": "dur_i = clamp(0.32 * gap_into_i, 0.12, 0.42); each landing tween starts at landing - dur (leads the beat) so the card arrives ON the hit; the face wipe runs over the last ~85% of that window.",- "duration": 6.0,- "exit_note": "the final card rolls in and HOLDS front-and-center to the end (6.0s); the source then hard-cuts to the next group (fast_cut)."- },-- "engine": {- "model": "data deck + rel-based slot column. The deck (`cards`) and the landing beats (`landings`) are DATA; the slot poses (s0..far + exit) and the per-landing orchestration are fixed code. `poseForRel(rel)` maps a card's slot-distance behind the current front card to a pose, so the column is always correctly depth-sorted and any N works. z-index is set instantly at each swap (CSS can't depth-sort non-intersecting planes). Compose by editing the `cards` / `landings` DATA — never the slot/orchestration code.",- "compose_by": ["theme", "cards", "landings", "yaw", "bgColor"],- "extend": "recolor the whole deck via `theme` (cohesive ramp) or one card via its `color`; more cards = more `cards` entries (+ matching `landings`); change the read angle via `yaw`. Add a palette = add an entry to the THEMES table (bg + ink + a colors[] ramp). To change the deck LOOK (slot depths, card size, wipe angle) edit the SLOT table / CSS, not the program."- },-- "program_format": {- "_": "`cards` is a JSON array of card objects; `landings` is a JSON array of absolute audio seconds, one per card (same length as `cards`).",- "card": {- "title": "string — the big CENTERED hero title (the only copy on the face)",- "color": "string? — OPTIONAL solid face color (CSS color). Omit = next color from the theme ramp."- },- "landings": "number[] — abs seconds, one landing beat per card, in deck order (accelerating cadence recommended)"- },-- "reference_impl": "index.html",- "program_data": "program.json (the default 6-card deck + landing schedule as standalone, agent-editable data)",- "uses_primitives": [- "18-3d_card_flip",- "05-mask_reveal",- "09-dolly_zoom",- "content_swap",- "negative_space_hold"- ],- "uses_primitives_notes": "deck_advance / wipe_reveal / tumble_fall are PROPOSED custom phrases the impl defines (a per-onset one-slot forward roll of a stacked 3D depth column; an angled clip-path face reveal; a forward over-rotate + fall toward the lens). 18-3d_card_flip (#18) backs the 3D card transforms; 05-mask_reveal (#05) backs the angled clip-path wipe; 09-dolly_zoom (#09) is the perspective/depth feel; content_swap is the per-onset advance generalized to a depth column; negative_space_hold backs the static field.",-- "bundled_assets": "assets/gsap.min.js (offline GSAP). No fonts bundled — uses a system grotesque stack ('Inter', 'Helvetica Neue', Arial). No remote assets.",-- "transition_out": { "default": "fast_cut", "observed": "fast_cut" },-- "reversed_from": [],- "origin": "sandbox",- "provenance": {- "source": "bgm-golden-sample-reverse/gorup-by-group/card-flyby (Shader-Deck-style horizontal card-flyby SANDBOX)",- "note": "Hand-authored design study, NOT reverse-engineered from a golden-sample group — there is no source audiomap / Gemini read. The match-face is therefore a HYPOTHESIS (which music this look fits), not a measured signature; `examples[].synthetic = true` flags the cadence as design-intent. The original sandbox is asset-free but used remote Google-Fonts Inter + a CDN GSAP AND a grab-bag of clashing per-card hexes; this promoted impl drops the remote deps (system fonts + bundled GSAP), makes the deck data-driven (`cards` / `landings`), and replaces the ad-hoc colors with a cohesive `theme` palette system (per-card color optional). Promote-time review should add a REAL example (and tighten `requires`) the first time this template is matched to an actual reversed group."- }-}diff --git a/skills/bgm-to-video/templates/held-message-living-field/README.md b/skills/bgm-to-video/templates/held-message-living-field/README.mddeleted file mode 100644index bf8fa36863..0000000000--- a/skills/bgm-to-video/templates/held-message-living-field/README.md+++ /dev/null@@ -1,51 +0,0 @@-# Held Message / Living Field--The first promoted Group Template. Reverse-engineered from **group_1** of the golden-sample `bgm_test_2` (the "PREVIOUSLY ON / DUCKLIFE" recap card). Chinese name the user-uses: 静止文字 · 活背景.--In `visual-plan-contract.md` / motion terms it is the **macro-stable + micro-volatile-hold**: the message is frozen, the blurred field carries all the motion.--## When the Director picks it (match-face)--A group whose `GroupSignature` is **heavy-but-sparse with an onset desert**:-`energy_level >= MEDIUM`, `density == sparse`, `onset_gap_bars >= 1.5`, steady grid.-Mood fit: warm / dark / elegant / cinematic. See `card.json`.--The hold ends at the **first onset re-entry** (or a hard stop), snapped to the next-downbeat — that is both the group boundary and the template's stop rule.--## What it renders (build-face)--- **message** (text) — `freeze_after_reveal`: a held title block (mark + title +- tagline). Reveal (blur+scale settle, brief per-letter entrance) then dead still for the- whole span. Three slots: `markText` (big) + `titleText` + `tagText`.-- **field** (background) — `energy_envelope_breath`: a real-time WebGL flow field- (fbm + curl noise). Colorful chromatic light-leak at entry, breathes up on the SURGE,- then settles dark with a central glow for the hold.--## Files--- `card.json` — the spec (match-face + build-face).-- `index.html` — the **generic `webgl-textures-playground`** reference implementation- (asset-free, CDN three.js + GSAP, one paused timeline; passes lint + validate).- Composition-variables == the card's `params`: `markText`, `titleText`, `tagText`,- `bgColor/colorLow/colorMid/colorHigh/accentColor`, `flowSpeed`. The group_1 DUCKLIFE- recap (kicker + hero, the warm light-leak settle) is one parameterization of this engine.--## Params → recolor / re-text--```bash-npx hyperframes render --variables '{- "markText":"DUCKLIFE","titleText":"PREVIOUSLY ON","tagText":"",- "colorLow":"#100a2e","colorMid":"#d23b5e","colorHigh":"#ffd9c2","accentColor":"#ffb27a"-}'-```--## Provenance--Reversed via `skills/bgm-golden_sample_reverse/reverse-to-template.md` from-`bgm-golden-sample-reverse/gorup-by-group/group_1` (audiomap + Gemini analysis). The-reference impl here is the generic `group_1/webgl-textures-playground` (the user's chosen-canonical impl); the DUCKLIFE-specific `recreate-webgl` was an earlier parameterization.diff --git a/skills/bgm-to-video/templates/held-message-living-field/card.json b/skills/bgm-to-video/templates/held-message-living-field/card.jsondeleted file mode 100644index ef5dbc4cfd..0000000000--- a/skills/bgm-to-video/templates/held-message-living-field/card.json+++ /dev/null@@ -1,66 +0,0 @@-{- "id": "held-message-living-field",- "name": "Held Message / Living Field",- "one_line": "A readable mark held dead still over a soft, color-shifting blurred field.",- "status": "promoted",- "created": "2026-06-17",-- "match": {- "structural_type": "sustained_hold",- "requires": {- "energy_level": ">=MEDIUM",- "density": "sparse",- "onset_gap_bars": ">=1.5",- "has_steady_grid": true- },- "mood_fit": ["warm", "dark", "elegant", "cinematic"],- "span_bars": [2, 8],- "exit_trigger": ["first_onset_reentry", "hard_stop"]- },-- "examples": [- {- "sample": "bgm_test_2",- "group": "g1",- "bpm": 129.2,- "energy": 0.8,- "density": "sparse",- "onset_gap_bars": 2.05,- "span_sec": [0.0, 4.017]- }- ],-- "roles": {- "message": {- "kind": "message",- "motion": "freeze_after_reveal",- "anchor": "entry.downbeat",- "notes": "a held title block (mark + title + tagline); reveal (blur+scale settle, brief per-letter entrance) then dead still for the whole span — no ongoing motion, there are no onsets"- },- "field": {- "kind": "background",- "motion": "energy_envelope_breath",- "anchor": "energy",- "notes": "the only thing moving; colorful chromatic light-leak at entry, breathes up on the SURGE, then a black mask settles it to near-black with a central glow for the hold"- }- },-- "params": {- "markText": { "type": "string", "maps_to": "message.mark", "default": "HF" },- "titleText": { "type": "string", "maps_to": "message.title", "default": "HYPERFRAMES" },- "tagText": { "type": "string", "maps_to": "message.tag", "default": "HTML · SHADERS · MP4" },- "palette": {- "type": "object",- "keys": ["bgColor", "colorLow", "colorMid", "colorHigh", "accentColor"]- },- "flowSpeed": { "type": "number", "default": 1 },- "duration": { "type": "number", "from": "group.span length" }- },-- "reference_impl": "index.html (generic webgl-textures-playground; the group_1 DUCKLIFE recreate is one parameterization)",- "uses_primitives": ["blur_resolve", "negative_space_hold", "chromatic_pressure", "hard_cut"],-- "transition_out": { "default": "fast_cut", "observed": "anticipation_glitch_cut" },-- "reversed_from": ["bgm-golden-sample-reverse/gorup-by-group/group_1"]-}diff --git a/skills/bgm-to-video/templates/held-text-strobe-burst/README.md b/skills/bgm-to-video/templates/held-text-strobe-burst/README.mddeleted file mode 100644index 924573b60b..0000000000--- a/skills/bgm-to-video/templates/held-text-strobe-burst/README.md+++ /dev/null@@ -1,168 +0,0 @@-# held-text-strobe-burst (group template)--A reusable HyperFrames template for the **Held Text / Strobe Burst** pattern: a word-held **dead still** in the center while its letterforms **flip through texture-filled-frames** every ~3 frames, in short bursts pinned to a drum roll / fill. The default-(and primary) look is the **Texture-Flip** technique — there is no shader and no video.-All state lives on one paused GSAP timeline → deterministic and seek-safe.--Reversed from `../gruop_4.mp4` (see `../gruop_4.bg-flicker.gemini-analysis.md`, burst 2 —-the "III" glyph whose interior style-transfers per beat). Sibling of **Held Message /-Living Field** (`webgl-textures-playground`): message holds, background carries the-motion — but here it _strobes_ in beat-quantized hits instead of breathing.--> Render at **24 fps** so the 0.125 s jumps land every 3 frames (the original cadence).--## The technique (Texture-Flip, foreground)--The word's letters are a **window**: `background-image: <solid-fill>, <texture-url>`-with `background-blend-mode: multiply`, clipped to the text (`background-clip: text`).-So each letter shows a **texture PNG tinted by a per-frame fill color**, over a solid-per-frame **background color**. N such frames are stacked as full-frame layers; the-strobe flips which one is visible (`tl.set(opacity)`, 0 ms — seek-safe). The texture-fills the whole letterform (`line-height ≥ 1` keeps the glyph inside the background-paint-box — with `line-height < 1` the cap tops/bottoms overflow it and leave untextured slivers).--A **persistent base** holds the word in a solid color on the idle (black) plate, so it-never disappears — it is the anchor. The **base-template default plan flickers-continuously across the whole clip and never stops**, so the idle base only shows if your-plan leaves gaps (e.g. the gruop_4 two-burst variant).--Three things change per beat: **texture** (material), **fill** (foreground tint),-**bg** (frame background). All snap to the strobe grid.-------## What beat matches this template--The discriminator the Director uses — the **opposite** of a held pad (busy, not empty):--| Signature field | Strobe Burst wants | Why |-| ----------------- | ---------------------------------- | --------------------------------------------------------------- |-| `density` | **dense** | a strobe needs many hits to flip on |-| `energy_level` | **≥ MEDIUM** (≥ HIGH in the burst) | flat-out hits, not a breath |-| `onset_gap_bars` | **≤ ~0.5 bar** | no onset deserts — a hit every fraction of a beat |-| `has_rolls` | **true** | a `rolls[]` run (accel-roll → SURGE, or a fill) is the _engine_ |-| `has_steady_grid` | true | jumps must quantize to a stable grid |-| `exit_trigger` | `hard_stop` or `surge` | the burst cuts clean to black, then the next section enters |-| `span_bars` | 1–2 (each burst ~0.4–0.7 s) | a strobe that runs > 2–3 s tires the eye |--**Heuristic:** a high-hits/min roll inside a `dense` phase is a strobe-burst candidate.-Pin one burst per roll/fill; bound it by the `hard_stop` / `SURGE` that follows.--**gruop_4 facts that fired it** (from `../audiomap.json`):--- BPM 129; downbeat 1.254; grid 0.743 / 1.254 / 1.718 / 2.183.-- rolls: `0.09–0.79 accel-roll →SURGE`, `1.21–1.65 fill →DROP`, `1.93–3.00 accel-roll →SURGE`.-- `hard_stop` @ 2 s; SURGE@1 (+0.21), DROP@2 (−0.28), SURGE@3 (+0.78).-- Two bursts: **1.125–1.542 s** and **2.042–2.708 s**, jumps every 0.125 s.-- Burst 1 starts ~2 frames _before_ downbeat 1.254 (lead the anchor); burst 2 opens on- the 2 s `hard_stop` + 1.93 accel-roll, ends 1 frame before the 2.76 snare.-------## How to change it--Everything is a **composition variable** — fill with `--variables` (no code edit).--### 1. The word (instant)--`markText` — the held word (always on screen; box never moves). `fontStyle`:-`display` (Impact, bold condensed caps) or `serif` (Georgia italic). `markScale`-(0.3–2) sizes it.--### 2. The texture frames — `frames` (the core content)--A JSON array of texture-flip frames, cycled by strobe-step index:--```jsonc-[- { "texture": "tiles-138", "bg": "#ff70b0", "fill": "#f0a020", "ink": "#2a0f1d" },- { "texture": "lava", "bg": "#101127", "fill": "#ff5a2c" },- { "texture": "onyx", "bg": "#e8e2d6", "fill": "#3a3a44" },- // texture = file name (no .png) from assets/texture-mask-text/masks/ (66 available)-]-```--- **Replace the texture image** → change `texture` (66 masks bundled: `tiles-138`,- `lava`, `onyx`, `marble-016`, `wood-066`, `concrete`, `metal-041-a`, `bricks-075-a`,- `grass-005`, `snow-015`, …). List them: `ls assets/texture-mask-text/masks/ | sed 's/\.png$//'`.-- **Replace the foreground color** → change `fill` (multiplied INTO the texture inside- the letters: light fill = bright/clear glyph, dark = moody, `#ffffff` = texture's own- color). `ink` is optional (UI/decor color).-- **Replace the frame background** → change `bg` (solid color behind the word that beat).-- Empty `frames` → the built-in 7-frame texture-flip set.--`idleColor` / `idleInk` set the between-burst plate (default white word on black).-`decor: yes` adds the blueprint grid + crop border per frame.--### 3. Match the changes to the beat — `strobePlan` (the core timing knob)--A JSON array of bursts; the template fires a **0 ms flip** at every jump time, cycling-`frames` by a global step counter, and cuts back to the idle base at each `end` (unless-the burst runs to the composition end → no terminal black, so the default never stops).--**Default (base template): one continuous burst the whole clip** — flicker, no stops:--```jsonc-[{ "start": 0, "end": 3, "step": 0.125 }] // jump every 0.125 s, 0 → duration-```--**gruop_4-faithful variant** (two bursts pinned to the rolls, black gaps between):--```jsonc-[- { "start": 1.125, "end": 1.542, "step": 0.125 }, // jump every 0.125 s- {- "start": 2.042,- "end": 2.708,- "jumps": [- 2.042,- 2.167, // OR list exact times- 2.292,- 2.417,- 2.5,- 2.625,- ],- },-]-```--**Building `strobePlan` from an AudioMap:**--1. **Find the roll(s).** Each `rolls[]` entry (or dense onset cluster) → one burst.-2. **Burst start = lead the anchor.** Open ~40–190 ms _before_ the kick/downbeat that- launches the roll, so the first flip lands _on_ the hit (gruop_4 burst 1 leads 1.254- by ~85 ms → start 1.125).-3. **Jumps = the grid the roll plays.** A 449/min hi-hat roll ≈ every 0.125 s →- `step:0.125`. Irregular roll → list the actual `events[].t` as `jumps[]` so every- flip sits on a real onset.-4. **Burst end = the stop.** End on the `hard_stop` / last snare / `SURGE` snapped to the- next anchor; the template cuts to the held-word-on-black base there.-5. **Order `frames` for accents.** Put the highest-contrast texture/bg on the index that- lands on the downbeat/kick; a near-black `bg` frame reads as a 1–2 frame blink-off.--Rule of thumb (`motion-primitives.md`): hard hits are **0 ms** (all flips are `tl.set`,-never tweened) and a dense strobe runs **≤ 2–3 s** — keep bursts short, let the-`hard_stop` clear them.-------## Files--- `index.html` — reference implementation (Texture-Flip default + beat-matched plan).- `lint`: 0 errors (2 cosmetic warnings — `invalid_composition_variables_declaration`,- shared with the base template; and `Impact` font, carried from texture-flip, Arial- fallback). `validate`: 0 errors (the 5 WCAG 1:1 warnings are intrinsic to- `background-clip:text` — the checker can't read texture-filled glyphs).-- `assets/` — `gsap.min.js` + `texture-mask-text/masks/*.png` (66), copied from- `../texture-flip` so the template is self-contained.-- `card.json` — draft template card. `meta.json` — name / dims / 24 fps / 3 s.-- `renders/proof.mp4` — proof render of the built-in config.--## Provenance--Reversed from `bgm-golden-sample-reverse/gorup-by-group/group_4` (`gruop_4.mp4`,-`audiomap.json`, `gruop_4.bg-flicker.gemini-analysis.md`). Texture-Flip technique +-assets from `group_4/texture-flip`. Timeline/overlay shape scaffolded on-`group_1/webgl-textures-playground`.diff --git a/skills/bgm-to-video/templates/held-text-strobe-burst/card.json b/skills/bgm-to-video/templates/held-text-strobe-burst/card.jsondeleted file mode 100644index a75177183e..0000000000--- a/skills/bgm-to-video/templates/held-text-strobe-burst/card.json+++ /dev/null@@ -1,99 +0,0 @@-{- "id": "held-text-strobe-burst",- "name": "Held Text / Strobe Burst",- "one_line": "A dead-still word whose letters flip through texture-filled frames (texture-clipped fill + per-frame tint + bg color) every ~3 frames, in short bursts pinned to a roll.",- "status": "promoted",- "created": "2026-06-17",-- "match": {- "structural_type": "dense_multiply",- "requires": {- "energy_level": ">=MEDIUM",- "density": "dense",- "onset_gap_bars": "<=0.5",- "has_steady_grid": true,- "has_roll": true- },- "mood_fit": ["hype", "glitch", "aggressive", "playful"],- "span_bars": [1, 2],- "exit_trigger": ["hard_stop", "surge"],- "notes": "Candidate dedicated structural_type `held_strobe` (held message + strobe field). Using `dense_multiply` (rubric: dense+HIGH → field/grid/strobe) until the type list grows."- },-- "examples": [- {- "sample": "bgm_test_2",- "group": "g4",- "bpm": 129,- "energy": 0.5,- "density": "dense",- "onset_gap_bars": 0.23,- "span_sec": [0.0, 3.01],- "bursts_sec": [- [1.125, 1.542],- [2.042, 2.708]- ],- "burst_drivers": "accel-roll 1.93-3.00 (→SURGE) + fill 1.21-1.65 (→DROP); jumps every ~0.125s (3f@24fps)"- }- ],-- "roles": {- "message": {- "kind": "message",- "motion": "hold",- "anchor": "entry.downbeat",- "notes": "the held anchor: word box locked (no x/y/scale), always on screen. Its FILL flips per strobe step — each letterform is a texture PNG (background-clip:text) × a multiply tint (the foreground 'color'). Between bursts it falls back to a solid idleInk word on idle plate. This is the Texture-Flip technique reversed from gruop_4 burst 2."- },- "field": {- "kind": "background",- "motion": "strobe",- "anchor": "roll",- "notes": "per-frame solid bg color behind the word, hard-set (0ms) on each roll-grid subdivision via a stacked opacity flip-book. Base-template default flickers continuously across the whole clip; cuts back to idleColor (clean black) only at a burst end that is < composition end (so multi-burst plans get black gaps, the continuous default never stops)."- }- },-- "params": {- "markText": { "type": "string", "maps_to": "message.content", "default": "NAMSHI" },- "fontStyle": {- "type": "select",- "maps_to": "message.font",- "options": ["display", "serif"],- "default": "display"- },- "markScale": { "type": "number", "maps_to": "message.scale", "default": 1 },- "idleColor": { "type": "color", "maps_to": "field.idle_bg", "default": "#000000" },- "idleInk": { "type": "color", "maps_to": "message.idle_ink", "default": "#ffffff" },- "frames": {- "type": "string",- "maps_to": "strobe.frames",- "notes": "JSON [{texture,bg,fill,ink?,pos?}]; texture = file under assets/texture-mask-text/masks/ (66 available). Empty = built-in texture-flip set. Cycled by strobe-step index."- },- "strobePlan": {- "type": "string",- "maps_to": "field.plan",- "notes": "JSON array of bursts {start,end,step|jumps[]}; built from the audiomap. Empty = built-in CONTINUOUS plan [{start:0,end:duration,step:0.125}] (base-template default: flicker the whole clip, never stop). gruop_4-faithful two-burst look = [{start:1.125,end:1.542,step:0.125},{start:2.042,end:2.708,step:0.125}]."- },- "decor": {- "type": "select",- "options": ["no", "yes"],- "default": "no",- "notes": "blueprint grid + crop border per frame"- },- "duration": { "type": "number", "from": "group.span_sec length" }- },-- "reference_impl": "index.html",- "bundled_assets": "assets/ (gsap.min.js + texture-mask-text/masks/*.png ×66), copied from ../texture-flip",- "uses_primitives": [- "content_swap",- "hard_cut",- "palette_flip",- "system_replace",- "negative_space_hold",- "flash_cut"- ],-- "transition_out": { "default": "fast_cut", "observed": "hard_cut_to_black" },-- "reversed_from": ["bgm-golden-sample-reverse/gorup-by-group/group_4"]-}diff --git a/skills/bgm-to-video/templates/intro-kinetic-cascade/README.md b/skills/bgm-to-video/templates/intro-kinetic-cascade/README.mddeleted file mode 100644index cdaecee928..0000000000--- a/skills/bgm-to-video/templates/intro-kinetic-cascade/README.md+++ /dev/null@@ -1,96 +0,0 @@-# Intro Kinetic Cascade · editorial phrase cascade with icon climax — `intro-kinetic-cascade`--A spoken / anchored line laid out as a sequence of big **editorial phrases** — each a-stacked poster with one enlarged accent **hero word** — revealed **word-by-word** on its-anchors, **hard cut-out** between phrases, climaxing on a phrase that **slides in** with a-**swappable, ringing icon** (bell / cursor / sparkle / … or any emoji / SVG).--> **Origin — a VO launch-video intro, adapted for the catalog.** Internalized from-> `act0-intro-bell` (the voiceover intro of the Timeline-Editor launch video). Its reveal-> times are **transcript word onsets**, so in origin it is **narration-driven**, not a-> beat-reversed musical group — bind `phrases[].times` to audio onsets to use it-> beat-driven. The original's Lottie bell + Google-Fonts Inter/Playfair + CDN GSAP are-> dropped here for an **offline** build, and the bell is now a **swappable icon**.--## Files--```-intro-kinetic-cascade/- card.json ← the spec (match-face + build-face) · status: promoted- index.html ← reference impl (parameterized GSAP; data-driven phrases + icon)- program.json ← the default act0 phrases + climax (standalone, editable)- assets/gsap.min.js ← bundled GSAP (offline-safe)- renders/recreate.mp4 ← rendered proof @30fps (default light + bell)-```--No fonts bundled — system grotesque stack (`"Inter","Helvetica Neue",Arial`); the serif-hero falls back `Playfair Display → Georgia` (drop a Playfair woff2 + `@font-face` for the-exact source face). Icons are **inline SVG** (no Lottie). No remote assets.--## How it moves--Each **phrase** is a vertically-centered, left-aligned stack of lines — a small word, a-HUGE accent **hero word**, a closing line — with per-line `size` + `x` indent for the-editorial diagonal. Words **fade in one-by-one** on their anchors, the phrase holds, then-**hard cuts out**. The finale **climax** slides in from offscreen-right and **holds**,-carrying the ringing icon.--| stage | what | anchor |-| --------------- | -------------------------------------------------------------- | ------------------- |-| phrase reveal | words fade in within a held poster (hero line big + accent) | `phrases[].times[]` |-| cut-out | phrase opacity → 0 (hard) | `out − 0.10` |-| climax slide-in | finale lockup slides x 1400→0, holds to end | `climax.in` |-| icon ring | glyph pops (scale 0.4→1) + damped wiggle + two expanding rings | `climax.iconAt` |--## The icon knob (match it to the scene)--`icon` picks the ringing climax glyph. Built-in inline-SVG library:--`bell` (timing/alerts) · `cursor` (a click/UI) · `sparkle` (AI/magic) · `bolt` (speed) ·-`play` (video) · `check` (done) · `heart` (like) · `star` (featured)--…or pass an **emoji** (`"🔔"`, `"⚡️"`), a raw **`<svg>…</svg>`** string, or `"none"` for a-pure-text climax. The pop + ring emphasis is generic, so any glyph "rings". The `{icon}`-token in `climax.text` marks where it lands.--## Themes--`theme` = `light` (default — the act0 editorial look), `dark`, or `bold`. Each is an-AA-tuned palette (field bg + ink + a hero-accent ramp incl. a `"gradient"` sweep).--## Parameters (swap freely)--- `theme` — `light` | `dark` | `bold` (default `light`).-- `icon` — climax glyph: a library name, an emoji, a raw `<svg>`, or `none` (default `bell`).-- `phrases` — **JSON array** of `{ lines:[{text,size,x,hero?,accent?,font?}], out, times? }`.- `times` (per word, reading order) = the VO/onset anchors; omit → auto-spread across the- phrase. Empty → the built-in 3-phrase act0 intro.-- `climax` — **JSON object** `{ text, in, iconAt, hold, size }`; `text` embeds `{icon}`.- Empty → the built-in `timing is {icon} tricky.`--Fill with `--variables` (read via `window.__hyperframes.getVariables()`):--```bash-npx hyperframes render intro-kinetic-cascade -f 30 --strict-variables \- --variables '{"theme":"dark","icon":"sparkle","climax":"{\"text\":\"editing just got {icon} magic.\",\"in\":3.79,\"iconAt\":4.9,\"hold\":1.3,\"size\":150}"}'-```--## Aligning to a track (VO or beat)--- Precise sync: set each phrase's `times` to the word onset seconds (a transcript for VO,- or `audiomap` onsets for a beat). Put the key word of each phrase on the strongest hit;- land the climax icon on a downbeat / surge.-- Quick layout: drop `times` and the engine auto-spreads each phrase's words evenly.--## Verify--```bash-npx hyperframes lint intro-kinetic-cascade # clean-npx hyperframes validate intro-kinetic-cascade # no console errors · text passes WCAG AA-npx hyperframes render intro-kinetic-cascade -f 30-```--## Status--`promoted` — in the catalog, matchable by the Director. VO-origin: when first matched to a-real musical group, add that group as an `examples[]` entry and tighten `match.requires`.diff --git a/skills/bgm-to-video/templates/intro-kinetic-cascade/card.json b/skills/bgm-to-video/templates/intro-kinetic-cascade/card.jsondeleted file mode 100644index 2a7f56a046..0000000000--- a/skills/bgm-to-video/templates/intro-kinetic-cascade/card.json+++ /dev/null@@ -1,164 +0,0 @@-{- "id": "intro-kinetic-cascade",- "name": "Intro Kinetic Cascade · editorial phrase cascade with icon climax",- "one_line": "A spoken/anchored line laid out as a sequence of big editorial PHRASES — each a stacked poster with one enlarged accent HERO word — revealed word-by-word on its anchors, hard cut-out between phrases, climaxing on a phrase that SLIDES in with a swappable, ringing ICON (bell / cursor / sparkle / … or any emoji / SVG).",- "status": "promoted",- "created": "2026-06-17",-- "base_template": {- "primitive": "editorial_phrase_cascade",- "notes": "A narration/anchor-driven kinetic-typography intro. Each PHRASE is a vertically-centered, left-aligned stack of lines (small word / BIG accent hero word / closing words) with per-line size + indent for an editorial diagonal composition. Words reveal one-by-one on their anchors (VO word-times OR audio onsets), the phrase holds, then HARD cuts out before the next. The finale is a CLIMAX phrase that slides in from offscreen-right and HOLDS, carrying a swappable inline ICON that pops + rings. Phrase count, words-per-line, and the icon are all DATA, so any sentence + any scene icon 'just works'. Asset-free: system type, inline-SVG icon library, bundled GSAP."- },-- "themes": {- "_": "Palette presets (the `theme` param). Accents are AA-tuned on each bg. ink = body/closing words; accents[] = hero words (cycled per phrase); 'gradient' = animated sweep between gradFrom/gradTo.",- "light": "editorial light — near-white field, near-black ink, deep green / ocean / sweep accents (DEFAULT; the act0 look)",- "dark": "dark field, off-white ink, vivid green / cyan / sweep accents",- "bold": "deep-navy field, white ink, amber / pink / sweep accents"- },-- "icons": {- "_": "The climax ICON is its own knob (`icon`) so it can match the scene. Built-in inline-SVG library (asset-free, fill follows the text color); or pass an emoji, a raw <svg>…</svg> string, or 'none' for a pure-text climax. The pop + ring + wiggle emphasis is generic, so any glyph 'rings'.",- "library": ["bell", "cursor", "sparkle", "bolt", "play", "heart", "check", "star"],- "examples": "bell → timing/alerts · cursor → a click/UI · sparkle → AI/magic · bolt → speed · play → video · check → done · heart → like · star → featured"- },-- "match": {- "structural_type": "per_onset_sequential",- "requires": {- "energy_level": ">=MEDIUM",- "has_steady_grid": true,- "density": ["medium", "dense"]- },- "mood_fit": ["bold", "elegant", "playful", "hype", "cinematic"],- "span_bars": [2, 8],- "exit_trigger": ["downbeat", "surge", "hard_stop", "end"],- "notes": "Reach for this for an INTRO / opening statement: a short narrated or anchored line you want to land word-by-word as big editorial type, climaxing on one keyword + icon. Each word reveal lands on one anchor (per_onset_sequential), so it shares the structural_type with the typewriter / logo-sting templates; it is discriminated by laying the line out as a SEQUENCE OF WHOLE PHRASES (big mixed-size posters with a colored hero word, hard-cut between) and by a slide-in ICON climax — not one typed message, not a card deck. ORIGIN is VO-driven (reveal times come from a transcript); in a beat context bind `phrases[].times` to onset seconds instead. If there is no readable line to speak/anchor (pure abstract field) this is the wrong template."- },-- "examples": [- {- "sample": "timeline-launch-video",- "group": "act0-intro-bell",- "vo_origin": true,- "structural_type": "per_onset_sequential",- "energy_level": "MEDIUM",- "density": "medium",- "phrases": 3,- "span_sec": [0.0, 6.2],- "line": "If you've EVER used AI / for VIDEO editing before, / you KNOW that / timing is 🔔 tricky.",- "word_times_sec": [0.14, 0.3, 0.55, 0.87, 1.06, 1.36, 1.58, 1.92, 2.48, 3.06, 3.3, 3.54],- "climax": { "text": "timing is {icon} tricky.", "in": 3.79, "iconAt": 4.9, "icon": "bell" },- "exit_trigger": { "type": "end", "time": 6.2 },- "note": "Reversed from the VO intro `act0-intro-bell` (golden_sample_reverse/.../timeline-launch-video). Reveal times are VO WORD onsets (a transcript), not audiomap musical onsets — so the cadence is real but its driver is narration. The original used a Lottie bell + Google-Fonts Inter/Playfair + CDN GSAP; this promoted impl is offline (system type + bundled GSAP) and the bell is an inline-SVG library icon (now swappable per scene). Bind `times` to audio onsets to use it beat-driven."- }- ],-- "roles": {- "phrase": {- "kind": "message",- "motion": "word_cascade_reveal",- "anchor": "phrases[].times[]",- "notes": "Each phrase is a stacked editorial poster, vertically centered. Its words fade in one-by-one on their anchor times (explicit `times`, else auto-spread across the phrase), the phrase holds, then HARD cuts out (opacity→0) at `out`. PROPOSED verb 'word_cascade_reveal' (per-anchor word fade within a held poster). ~typewriter_reveal."- },- "hero": {- "kind": "message",- "motion": "accent_blowup",- "anchor": "phrases[].times[] (the hero line's word)",- "notes": "One line per phrase is the HERO — much larger (≈500px) and colored from the theme accent ramp (cycled per phrase), optionally serif-italic ('ever') or an animated 'gradient' sweep ('know'). Carries the key word of each phrase. PROPOSED verb 'accent_blowup'."- },- "climax": {- "kind": "message",- "motion": "slide_in_lockup",- "anchor": "climax.in",- "notes": "The finale phrase SLIDES in from offscreen-right (x 1400→0, power3.out) and HOLDS to the end (it does NOT cut out). Mixed body + one inline icon. PROPOSED verb 'slide_in_lockup'."- },- "icon": {- "kind": "asset",- "motion": "icon_ring",- "anchor": "climax.iconAt",- "notes": "A swappable inline glyph in the climax (the {icon} token): pops in (scale 0.4→1, back.out), does a damped ring-wiggle (rotation), and emits two expanding rings. Resolves `icon` to a library SVG, a custom <svg>, an emoji/text glyph, or nothing. PROPOSED verb 'icon_ring'. ~radial_burst_lines for the rings."- },- "field": {- "kind": "background",- "motion": "hold",- "anchor": "none",- "notes": "A flat solid field (theme bg). Dead still; only the type moves. negative_space_hold."- }- },-- "params": {- "theme": {- "type": "string",- "maps_to": "palette (see themes)",- "default": "light",- "notes": "Palette preset: light | dark | bold. Sets bg + ink + the hero accent ramp."- },- "icon": {- "type": "string",- "maps_to": "climax.{icon} token (see icons)",- "default": "bell",- "notes": "The ringing climax icon — MATCH IT TO THE SCENE. A library name (bell|cursor|sparkle|bolt|play|heart|check|star), an emoji, a raw <svg>…</svg> string, or 'none' (pure-text climax)."- },- "phrases": {- "type": "string",- "maps_to": "engine.phrases",- "default": "",- "notes": "JSON array of phrase objects { lines:[{text,size,x,hero?,accent?,font?}], out, times? }. `times` (per word, reading order) = the VO/onset anchors; omit to auto-spread. Empty = the built-in 3-phrase act0 intro."- },- "climax": {- "type": "string",- "maps_to": "engine.climax",- "default": "",- "notes": "JSON object { text, in, iconAt, hold, size }. `text` embeds {icon} where the icon rings. Empty = the built-in 'timing is {icon} tricky.'"- }- },-- "engine": {- "model": "data phrases + climax + icon + theme. The phrase posters, the climax lockup, the icon library, and the palette themes are fixed code; WHAT they say + WHEN (the anchors) + WHICH icon + WHICH palette are DATA. Word anchors are explicit `times` (VO word-times or audio onsets) or auto-spread across each phrase. Compose by editing the `phrases` / `climax` / `icon` / `theme` DATA — never the engine.",- "compose_by": ["theme", "icon", "phrases", "climax"],- "extend": "add a palette = a THEMES entry (bg + ink + accents + gradFrom/gradTo); add an icon = an ICONS entry (an inline-SVG path); restyle a phrase via line size/x/hero/accent/font. To rebuild the motion (slide direction, ring count) edit the timeline, not the data."- },-- "program_format": {- "_": "`phrases` is a JSON array; `climax` is a JSON object. Times are absolute seconds (VO word onsets, or audio onsets in a beat context).",- "phrase": {- "lines": "[{ text, size(px), x(indent px), hero?(bool → big accent line), accent?('#hex'|'gradient'), font?('display'|'serif') }]",- "out": "number — seconds the phrase cuts out",- "times": "number[]? — per-WORD reveal seconds, reading order across all lines; omit → auto-spread evenly across the phrase",- "start": "number? — first-word time when `times` omitted (default = previous phrase `out`)"- },- "climax": {- "text": "string — words + a {icon} token where the icon rings",- "in": "number — slide-in start",- "iconAt": "number — when the icon pops + rings",- "hold": "number — tail hold after the ring (sets total duration = iconAt + hold)",- "size": "number — word size px (the icon scales from it)"- }- },-- "reference_impl": "index.html",- "program_data": "program.json (the default act0 phrases + climax as standalone, agent-editable data)",- "uses_primitives": [- "typewriter_reveal",- "content_swap",- "kinetic_letter_in",- "radial_burst_lines",- "negative_space_hold"- ],- "uses_primitives_notes": "word_cascade_reveal / accent_blowup / slide_in_lockup / icon_ring are PROPOSED custom phrases the impl defines (per-anchor word fade in a held poster; an enlarged accent hero word; an offscreen slide-in finale; an icon pop + ring-wiggle + expanding rings). typewriter_reveal backs the per-word reveal; content_swap the hard cut-out between phrases; radial_burst_lines the rings; negative_space_hold the static field.",-- "bundled_assets": "assets/gsap.min.js (offline GSAP). No fonts bundled — system stack ('Inter','Helvetica Neue',Arial; serif hero falls back Playfair→Georgia). Icons are inline SVG (no Lottie). No remote assets.",-- "transition_out": { "default": "fast_cut", "observed": "fast_cut" },-- "reversed_from": [- "golden_sample_reverse/templates/intro-kinetic-cascade",- "golden_sample_reverse/hyperframes-selected/timeline-launch-video/compositions/act0-intro-bell.html"- ],- "origin": "vo-launch-intro",- "provenance": {- "source": "act0-intro-bell — the VO intro of the Timeline-Editor launch video (timeline-launch-video).",- "note": "VO/narration-driven in origin (reveal times = transcript word onsets), NOT a beat-reversed musical group — so the match-face is a reasonable hypothesis for the BGM Director, and reveal times should be bound to audio onsets when used beat-driven. Adapted for the catalog: dropped the remote deps (Lottie bell + Google-Fonts Inter/Playfair + CDN GSAP) for an offline build (system type + bundled GSAP + inline-SVG icons), parameterized the content (phrases/climax) and palette (themes), and made the climax icon a swappable, scene-matched knob. First time it is matched to a real musical group, add that group as an example and tighten requires."- }-}diff --git a/skills/bgm-to-video/templates/logo-split-lockup-pulse/README.md b/skills/bgm-to-video/templates/logo-split-lockup-pulse/README.mddeleted file mode 100644index c1b54ec612..0000000000--- a/skills/bgm-to-video/templates/logo-split-lockup-pulse/README.md+++ /dev/null@@ -1,85 +0,0 @@-# Logo Split / Lockup Pulse — `logo-split-lockup-pulse`--A short, beat-locked **logo/brand sting**. A two-part mark sits joined at center,-**splits left↔right** to open a gap, **grows a center word-lockup one word per onset**-(the key word lands on the downbeat surge), **snap-closes** on a hit, then **pulses**-with the roll/hihat bed before a fast cut.--Reversed from **group_7** of the golden sample — the **Lille — World Design Capital-2020** sting (left radial spark `☀` + `lille 2020` + right cloud `☁`, on a flat green-field).--## Files--```-group_7_template/- card.json ← the spec (match-face + build-face) · status: draft- index.html ← reference impl (parameterized GSAP; inlined motion-blur snippet)- assets/gsap.min.js ← bundled GSAP (offline-safe)- assets/fredoka-700.woff2 ← bundled heavy rounded face (@font-face "Lockup")- renders/recreate.mp4 + renders/stills/ ← rendered proof @24fps-```--## What it covers (provenance — group_7, 24fps, BPM 92.3)--The marks move on a FEW discrete anchors only — the sustained hi-hat fill (f17–f86) is-texture, **not** a motion driver. Left + right brackets always move **together** (mirrored).--| stage | frames | time | what | beat |-| -------------- | ------- | ---------- | -------------------------------------------------------------------------------------------------------- | ----------------------------------- |-| seed | f2 | 0.083s | joined bracket pair (full-outside / empty-middle) blooms in at center | f2 perc onset |-| split + word 1 | f3–f6 | 0.13–0.25s | brackets **glide apart** to the full lockup width (held); `lille` eases into the gap | f6 onset |-| word 2 | f24 | 1.000s | `2020` eases into the reserved space (brackets already open) | **SURGE@1s / downbeat f24-25** |-| hold | f24–f49 | 1.0–2.08s | `lille 2020` static | hi-hat fill bed (texture) |-| snap-close | f50 | 2.083s | 1-frame hard cut: words vanish, brackets weld back together (impact streak via blur) | after f47 snare |-| see-saw | f51–f63 | 2.13–2.63s | welded unit damped vertical bounce + building see-saw tilt (spark UP / cloud DOWN), settling high+tilted | **f51 / f55 / f58 / f63** (hi-hats) |-| exit | f70 | 2.917s | source hard-cuts to the next group (live footage) | `fast_cut` (near f71 kick) |--Corrections baked in vs earlier reads: the close is a **1-frame hard snap** (not a-squeeze); after it the weld does a **damped vertical bounce + a rigid see-saw tilt**-(left-spark up / right-cloud down — one rigid unit rotating, **not** a scale-pulse and-**not** per-side independent), beat-synced and decaying; the marks **pre-open to full-width** (so word1 floats in wide brackets); the marks are **big enough to wrap the text**-(~2.5–3× letter height, ~140° spark fan), each with its mass on the **outer** side.--## Silkiness (what makes the motion fluid, not stiff)--- **Velocity motion blur** (inlined registry `motion-blur` snippet) on the two brackets —- a one-sided SVG ghost trail proportional to speed, so the fast split-glide and the- snap-impact read smooth instead of as hard frame jumps. Clears at rest.-- **Smooth, slightly longer eases** (`expo.out` split, `power3.out` word reveals,- `power2.out` recoil) — no poppy `back.out`/elastic. Timing anchors are unchanged.-- A **gentle hold-drift** (`sine.inOut`) so the weld isn't dead-frozen.--## Parameters (swap freely)--- `bgColor` / `markColor` / `textColor` — palette (defaults: green `#249b5f`, cream `#e7e3dd`).-- `leftMark` / `rightMark` — **inline SVG** for each side. Empty → the default spark / cloud.- Pass **two related SVGs**, or **the two halves of one logo** (left half + right half).- Keep each mark's mass on its **outer** side so the pair reads as brackets framing the text.-- `word1..word4` — the lockup words, revealed one per onset and accumulating. Supports- **1, 2, or 3+ words**; put the key word on the strongest beat. Empty slots are skipped.--## Adaptivity (`beat_map` in `index.html`)--Content lives in `params`; musical **timing** lives in the `beat_map` constants-(`ENTRY`, `SPLIT`, `WORD_ONSETS[]`, `CLOSE`, `DUR`) — filled from the matched group's-`audiomap.json`. The impl **measures each word at build time** and pre-opens the brackets-to the full lockup width, so any word count / length re-centers correctly. More words →-add `WORD_ONSETS` entries. The marks deliberately do **not** animate on the hi-hat bed.--## Verify--```bash-npx hyperframes lint group_7_template # clean (1 inherent window.__timelines note)-npx hyperframes validate group_7_template # no console errors-npx hyperframes render group_7_template -f 24-```--## Status--`draft` — in the reverse workspace. Promote per `reverse-to-template.md` Step 9 (copy to-`skills/bgm-to-video/templates/logo-split-lockup-pulse/`, set-`status:"promoted"`, stamp `created`) once reviewed. Proposed new motion verbs-(`split_open`, `snap_close`, `per_onset_pulse`) and the shared `per_onset_sequential`-structural_type are flagged in `card.json` for catalog review.diff --git a/skills/bgm-to-video/templates/logo-split-lockup-pulse/card.json b/skills/bgm-to-video/templates/logo-split-lockup-pulse/card.jsondeleted file mode 100644index 836e3793e1..0000000000--- a/skills/bgm-to-video/templates/logo-split-lockup-pulse/card.json+++ /dev/null@@ -1,145 +0,0 @@-{- "id": "logo-split-lockup-pulse",- "name": "Logo Split / Lockup Pulse",- "one_line": "A two-part mark sits joined at center, splits left↔right to open a gap, grows a center word-lockup one word per onset (key word lands on the downbeat surge), then snap-closes on a hit and pulses with the beat.",- "status": "promoted",-- "match": {- "structural_type": "per_onset_sequential",- "requires": {- "has_steady_grid": true,- "onset_rate": ">=2.0",- "onset_gap_bars": "<1.0",- "density": ["medium", "dense"],- "has_roll": true,- "span_bars": "<=4"- },- "mood_fit": ["playful", "hype", "elegant", "cinematic", "tense"],- "span_bars": [1, 4],- "exit_trigger": ["downbeat", "surge", "hard_stop", "end"],- "notes": "A short logo/brand sting, not a typed sentence. Discriminated from typewriter-phrase-keyword-shuffle by density (dense, not sparse/medium-only) + has_roll:true (a sustained-fill hihat bed it consumes as a PULSE, not a cascade) + the left/right bracketing-mark roles. Reveals are still per-onset (split -> word -> word), so the structural_type is shared, but the build-face is the logo lockup, not text typing. The KEY content word should be placed on the strongest hit (downbeat / SURGE). If the grid goes quiet (onset_gap_bars >= ~1.5) this is the wrong template — use a hold template."- },-- "examples": [- {- "sample": "group_7",- "group": "g7-logo-sting",- "bpm": 92.3,- "structural_type": "per_onset_sequential",- "energy_level": "HIGH",- "energy": 0.89,- "density": "dense",- "onset_rate": 5.65,- "onset_gap_bars": 0.14,- "has_steady_grid": true,- "has_roll": true,- "roll_kind": "sustained-fill",- "roll_rate_per_min": 351,- "span_sec": [0.083, 2.917],- "span_bars": 1,- "entry": { "anchor": "onset", "time": 0.083 },- "exit_trigger": { "type": "downbeat", "time": 2.917 },- "downbeats_sec": [1.045, 3.646],- "surge_sec": 1.0,- "mood": ["playful", "hype", "elegant"],- "brand": "Lille — World Design Capital 2020 (left radial spark + 'lille 2020' + right cloud)"- }- ],-- "roles": {- "left_mark": {- "kind": "asset",- "motion": "split_open",- "anchor": "entry.onset + split.onset",- "notes": "Left BRACKET of the logo (group_7: a radial spark; mass on the OUTER/left side, opening toward the text — see one_line). Appears joined at center on the entry onset (f2), then GLIDES left to the FULL lockup width on the split onset (f6) — fast launch + expo.out settle, smoothed by velocity motion blur. Holds open; does NOT track each word. PROPOSED verb 'split_open' (paired symmetric translate; reverse = 'snap_close')."- },- "right_mark": {- "kind": "asset",- "motion": "split_open",- "anchor": "entry.onset + split.onset",- "notes": "Right BRACKET (group_7: a cloud / backwards-3 swirl; mass OUTER/right, opening toward the text). Mirrors left_mark exactly — same beats, same offset (the two always correspond / move together). Pre-opens to the full width so even word1 alone floats in wide-open brackets (faithful: the marks barely move when more words fill in)."- },- "lockup": {- "kind": "message",- "motion": "per_onset_pop",- "anchor": "entry.word_onsets",- "notes": "1..N words ACCUMULATING one per onset into the reserved center space (not replace). Each word eases in with a soft stretch (scaleX 0.58->1, ~0.24s power3.out — smooth, NO poppy overshoot). The KEY word sits on the downbeat/SURGE (group_7: 'lille'@0.25 then '2020'@1.0 on SURGE@1s)."- },- "close": {- "kind": "asset",- "motion": "snap_close",- "anchor": "close.onset",- "notes": "On a key hit (group_7: f50 / 2.083s) the lockup snap-closes: words HARD-CUT to gone (0ms, no squash) AND both brackets teleport back together in the SAME frame — the teleport reads as an impact streak through the motion blur. PROPOSED verb 'snap_close'."- },- "seesaw": {- "kind": "asset",- "motion": "seesaw_bounce",- "anchor": "post_close.onsets",- "notes": "After the snap the welded brackets do a DAMPED VERTICAL SPRING + a rigid SEE-SAW TILT (rotation +deg = left-spark UP / right-cloud DOWN), beat-synced to the hi-hat hits after the snap (group_7: f51 slam-down lowest, f55 up-rebound, f58 dip, f63 flick). Amplitude decays; the unit settles slightly HIGH and TILTED (spark up/cloud down) into the f70 cut. ~95% vertical translate + a building rotation. NOT a scale-pulse, NOT per-side independent — it's one rigid unit rotating. PROPOSED verb 'seesaw_bounce'."- },- "background": {- "kind": "background",- "motion": "hold",- "anchor": "none",- "notes": "Flat solid color, dead still the whole span (group_7: green #249b5f). No color change. Optional energy_envelope_breath add-on, not required."- }- },-- "params": {- "bgColor": { "type": "color", "maps_to": "background.color", "default": "#249b5f" },- "markColor": {- "type": "color",- "maps_to": "left_mark + right_mark stroke/fill",- "default": "#e7e3dd"- },- "textColor": { "type": "color", "maps_to": "lockup.words color", "default": "#e7e3dd" },- "leftMark": {- "type": "string",- "maps_to": "left_mark.svg",- "notes": "inline SVG (or one half of a single logo). Empty = the default radial spark. Keep the mass on the OUTER side so it reads as a bracket."- },- "rightMark": {- "type": "string",- "maps_to": "right_mark.svg",- "notes": "inline SVG (or the other half). Empty = the default cloud/3 swirl. Mass on the OUTER side."- },- "word1": {- "type": "string",- "maps_to": "lockup.word[0]",- "optional": true,- "default": "lille"- },- "word2": { "type": "string", "maps_to": "lockup.word[1]", "optional": true, "default": "2020" },- "word3": { "type": "string", "maps_to": "lockup.word[2]", "optional": true, "default": "" },- "word4": { "type": "string", "maps_to": "lockup.word[3]", "optional": true, "default": "" }- },-- "beat_map": {- "comment": "Script-side musical timing constants in index.html, filled from <group>.audiomap.json. Content lives in params; musical timing lives here. All times are ABSOLUTE audio seconds. The marks move on these DISCRETE anchors only — NOT on the sustained hi-hat fill (texture).",- "entry_onset": 0.083,- "split_onset": 0.25,- "word_onsets": [0.25, 1.0],- "word_onsets_notes": "one per non-empty word, in order; word_onsets[0] doubles as the split. Add more entries for 3+ words. The strongest hit (here 1.0 = SURGE@1s downbeat) should carry the key word.",- "close_onset": 2.083,- "seesaw_onsets": [2.125, 2.292, 2.417, 2.625],- "seesaw_note": "f51/f55/f58/f63 — welded unit damped vertical bounce + see-saw tilt (left up/right down), decaying, settling high+tilted to the cut. These ARE beat-synced (the one place after the snap that tracks the hi-hats).",- "duration": 2.875,- "exit_note": "logo holds/drifts to 2.875 (f69) then the source hard-cuts to the next group at f70 (2.917, near f71 kick)"- },-- "reference_impl": "index.html",- "uses_primitives": [- "radial_burst_lines",- "kinetic_letter_in",- "motion-blur",- "negative_space_hold"- ],- "uses_primitives_notes": "split_open / snap_close / settle_drift are proposed custom phrases the impl defines (paired symmetric translate, 0ms collapse, slow drift). radial_burst_lines (#25) backs the default left spark; kinetic_letter_in (#02) backs the word stretch-pop. SILKINESS comes from the registry 'motion-blur' snippet (velocity-driven SVG ghost trail) attached to the marks + expo/power eases over longer durations — NOT from extra keyframes.",-- "bundled_assets": "assets/gsap.min.js (offline GSAP), assets/fredoka-700.woff2 (heavy rounded face for the words — declared @font-face 'Lockup'). The motion-blur snippet is inlined in index.html (no external file).",-- "transition_out": { "default": "fast_cut", "observed": "fast_cut" },-- "reversed_from": ["bgm-golden-sample-reverse/gorup-by-group/group_7"],- "created": "2026-06-17"-}diff --git a/skills/bgm-to-video/templates/poster-tile-mosaic/README.md b/skills/bgm-to-video/templates/poster-tile-mosaic/README.mddeleted file mode 100644index 80895ca71c..0000000000--- a/skills/bgm-to-video/templates/poster-tile-mosaic/README.md+++ /dev/null@@ -1,190 +0,0 @@-# Poster-Tile Mosaic · 3 beat-synced operations--> Reverse-engineered from **group_5** of the golden sample (the Namshi poster-grid scene).-> `structural_type: dense_multiply` · status: **draft**--**ONE base template, THREE operations.** The base is a packed **mosaic of-DIFFERENT-sized tiles** — **not** a uniform grid: tall / wide / small colored boxes-that tessellate to fill the frame **with no overlap** (thin seams only), exactly like-the source's 错落 wall. **Asset-free**: a tile is a colored box with a text label.-"Adding a box" = a new image; "changing a box color" = a new asset / recolor. Three-interchangeable, beat-synced operations act on that one mosaic:--| op | what it does | what moves | source span |-| ------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------- | -------------------- |-| **A · staggerInOut** | pop different-sized tiles in one-per-onset (top-right→bottom-left waterfall) until they pack the frame → hold on a downbeat → pop them out one-per-onset | transform + opacity (per tile) | 0.58–2.08s (f14–f50) |-| **B · holdRecolor** | snap the whole wall on at once, **lock positions**, recolor the grid as a unit on each beat | background color (per tile, 0ms) | 2.37–2.91s (f57–f70) |-| **C · snakeFill+overlay** | reveal tiles along a **snake path** to fill → recolor whole grid on the hard-stop → pop overlay "cutouts" on top, one-per-onset | reveal + one swap + overlay pops | 3.0–5.5s (f72–f137) |--```-group_5_template/- index.html ← asset-free reference impl: mosaic + 3 operators + program runner- program.json ← the default group_5 score as standalone, agent-editable DATA- card.json ← the spec: base template, operators, program_format, match signature- assets/gsap.min.js ← vendored (offline-safe lint/validate/render)- renders/ ← group_5_recreate(.mp4 / _audio.mp4) + custom_demo.mp4 (a remixed program)- README.md ← this file-```--This is the answer to _"is it one base template used three ways?"_ — **yes.** The-implementation makes that literal: the same `tiles[]` mosaic is built once (by a-deterministic binary-split packer) and reused by all three operations; only the-**scheduling** differs. (Gemini's pass called the three "different systems" —-frame-by-frame inspection disproved that; see `card.json` provenance.)-------## 1. How it beat-syncs (from `group_5.audiomap.json`)--**Nothing is on a timer.** Every move is a GSAP tween/`set` at an absolute audio-second from the analysis. Track facts: **BPM 129.2**, 4/4, downbeats **1.324 (f32) /-3.181 (f76) / 5.039 (f121)**, **hard_stop @ 4.0s** (largest energy drop, Δ-0.67).--The score is the **PROGRAM** — a data array of operator steps ([`program.json`](program.json),-mirrored inline as `DEFAULT_PROGRAM` in §3):--```jsonc-[- {- "op": "staggerInOut", // build → hold → exit- "enter": [0.23, 0.37, 0.46, 0.6, 0.7, 0.84, 0.91, 1.07, 1.14, 1.28], // 10 onsets → 10 tiles- "hold": 1.324, // downbeat f32- "exit": [1.37, 1.51, 1.62, 1.74, 1.83, 1.97, 2.07],- }, // staggered out (ends f50)- {- "op": "holdRecolor",- "on": 2.35,- "onTheme": 1, // snap on, lock, recolor- "recolor": [2.42, 2.53, 2.81, 2.93],- "themes": [2, 3, 1, 2],- "off": 2.98,- },- {- "op": "snakeFillOverlay", // fill → swap → overlay- "fill": [3.04, 3.181, 3.44, 3.65, 3.79, 3.9], // 3.181 = downbeat f76 (accel)- "swap": 4.0,- "swapTheme": 4, // hard_stop "一键换装"- "overlay": [4.11, 4.34, 4.48, 4.81, 4.97, 5.25, 5.48],- }, // 7 onsets → 7 cutouts-]-```--**The rule of thumb:** structure (the build, the downbeat hold, the hard-stop swap)-leans on the strong grid; texture (per-onset reveals, per-beat recolors) rides the-dense onset stream in between.-------## 2. Why _this beat_ → _this template_ (the matching intuition)--Reach for the tile-wall when the audiomap shows:--1. **A steady grid** (`has_steady_grid: true`) — you need downbeats to pin the- build/hold/swap structure to.-2. **A dense, continuous onset stream** (`onset_gap_bars ≤ 0.5`) — _a hit available- for every tile move_. group_5 is wall-to-wall snares/hihats; that's what lets one- tile enter (or recolor, or fill) per onset.-3. **Distinct sub-phases you want to articulate differently** — an accumulate stretch,- a held/rolling stretch, then a fill-and-drop. The three operations map onto exactly- that shape: **build → recolor-on-roll → fill-then-drop**.-4. **A hard-stop / big DROP** mid-section — op C uses it for the full-grid "一键换装"- recolor (`swap`), the single most dramatic beat in the scene.--Put plainly: **"steady grid + dense onsets + 2–3 contrasting sub-phases + a hard-stop"-is the fingerprint.** When you see it, you have a hit for every box you want to place,-recolor, or stack.-------## 3. Usage--### Render with defaults (the group_5 recreation)--```bash-cd group_5_template-npx hyperframes lint . && npx hyperframes validate .-npx hyperframes render . -f 24 -o renders/group_5_recreate.mp4-# beat-matched proof (mux the original BGM):-ffmpeg -y -i renders/group_5_recreate.mp4 -i ../group_5.wav -c:v copy -c:a aac -shortest renders/group_5_recreate_audio.mp4-```--### Change the mosaic & labels (content only — no code edit)--```bash-npx hyperframes render . --variables '{- "tiles": 16, "bands": 4, "gap": 6,- "labels": "NEW,DROP,SALE,40% OFF,SHOP,NOW",- "bgColor": "#111111"-}'-```--- **tiles** = how many different-sized boxes the packer tessellates the frame into.-- **bands** = how many horizontal row-bands the snake fill (OP C) sweeps through.-- **gap** = seam thickness (0 = truly edge-to-edge, no seams).-- The waterfall enter order, the snake path, and the per-onset mappings all adapt to- the resulting mosaic automatically.-- **labels** is a comma list, cycled across tiles. **showText:false** hides labels for- a pure color-block look.--### Recompose freely — compose by DATA, not code (the whole point)--The three operators (`staggerInOut`, `holdRecolor`, `snakeFillOverlay`) are **pure,-parameterized, order-independent** functions over the one shared mosaic. What runs — in-what order, on which beats — is a **data PROGRAM** (an array of `{op, ...beats}` steps).-The default group_5 score lives in [`program.json`](program.json) and inline as-`DEFAULT_PROGRAM` (§3); the runner (§7) just dispatches `OPS[step.op](step)`.--So you recompose **without touching operator code** — pass a `program` JSON string:--```bash-# Run ONE operator solo (just the snake-fill + overlay)-npx hyperframes render . --variables '{"program":"[{\"op\":\"snakeFillOverlay\",\"fill\":[0.3,0.8,1.3,1.8,2.3],\"swap\":2.8,\"swapTheme\":4,\"overlay\":[3.0,3.4,3.8,4.2]}]"}'--# REORDER + retime: recolor first, then build, then fill (B → A → C)-npx hyperframes render . --variables '{"program":"[{\"op\":\"holdRecolor\",\"on\":0.3,\"onTheme\":2,\"recolor\":[0.8,1.3,1.8],\"themes\":[3,1,4],\"off\":2.1},{\"op\":\"staggerInOut\",\"enter\":[2.4,2.6,2.8,3.0,3.2,3.4],\"exit\":[3.8,4.0,4.2]},{\"op\":\"snakeFillOverlay\",\"fill\":[4.4,4.7,5.0,5.3],\"swap\":5.4,\"overlay\":[5.5,5.65]}]"}'--# REPEAT an operator (build, exit, build again)-npx hyperframes render . --variables '{"program":"[{\"op\":\"staggerInOut\",\"enter\":[0.2,0.5,0.8,1.1],\"exit\":[1.5,1.8,2.1]},{\"op\":\"staggerInOut\",\"theme\":2,\"enter\":[2.5,2.8,3.1,3.4]}]"}'-```--Each step's fields are documented in [`card.json`](card.json) → `program_format`. An-agent composes by emitting this JSON (op names + beats) — it never edits JS. Steps-combine freely, reorder, repeat, or run solo; every operator re-shows tiles from hidden-and sets its own theme, so any sequence is safe.--> **Empty `program` = the built-in group_5 score.** Keep `program.json` and-> `DEFAULT_PROGRAM` in sync — `program.json` is the canonical, copy-pasteable data.--### Re-fit the beat to a different group (the part that changes per track)--Copy the new group's `audiomap.json` onset/downbeat seconds into the step beat lists-(in `program.json` / `DEFAULT_PROGRAM`). Each list grows or shrinks freely — more onsets-→ more tile moves; `beatAt()` distributes any tile count across any beat list. For a-longer/shorter piece, also set `DUR` and the root `data-duration` to the new span.--Add palettes to `THEMES`, faces to `FONTS`, more overlay slots are auto-built from the-program's hungriest `overlay` list — every move stays keyed to an audio second, so it-renders identically every time. Want a new move? add a function + an `OPS` key (§6) and-the program can call it by name.--> **Deterministic / asset-free:** only colored boxes + generic font stacks, no remote-> assets, no `Math.random` (scatter uses a deterministic index hash), no timers.-> See `references/builder-contract.md`. Lints clean (0 errors, 0 warnings); validates-> with no console errors.-------## 4. Provenance--- **Source:** `bgm-golden-sample-reverse/gorup-by-group/group_5/group_5.mp4`-- **Audio:** `group_5.audiomap.json` (from `scripts/analyze-beatgrid.py`)-- **Video read:** `group_5.gemini-analysis.md` (Gemini 3 Pro) **corrected by- frame-by-frame inspection** — Gemini mislabeled op B as a zero-gap two-row _banner_- and concluded the three phases were "different systems." Pulling real frames at each- onset proved B is the **same tile-wall recolored as a unit** (green→blue→pink), and- that A/B/C share one asset family and one grid paradigm — i.e. one base template,- three operations. Trust frames over sparse sampling for per-frame detail.-- **Open question for promotion:** the source omits an intro flourish (a green "III"- glyph transition, 0–0.58s) that this template skips; decide whether to ship it as an- optional pre-roll role. Also consider varying the per-phase grid _gap_ (the source- loosens the gap in op A, tightens it in B/C) as an operation parameter.diff --git a/skills/bgm-to-video/templates/poster-tile-mosaic/card.json b/skills/bgm-to-video/templates/poster-tile-mosaic/card.jsondeleted file mode 100644index 24ccd14421..0000000000--- a/skills/bgm-to-video/templates/poster-tile-mosaic/card.json+++ /dev/null@@ -1,150 +0,0 @@-{- "id": "poster-tile-mosaic",- "name": "Poster-Tile Mosaic · 3 beat-synced operations",- "one_line": "ONE base template — a packed MOSAIC of DIFFERENT-sized colored tiles (asset-free: color + label) that tessellate to fill the frame with no overlap — driven by three interchangeable beat-synced operations: staggered enter/exit, locked global-recolor, and snake-fill + overlay.",- "status": "promoted",- "created": "2026-06-17",-- "base_template": {- "primitive": "tile_mosaic",- "notes": "A packed mosaic of DIFFERENT-sized absolutely-positioned tiles (NOT a uniform grid): tall / wide / small boxes that tessellate to fill the frame with no overlap (thin seams only) — the source's 错落 wall. Built by a deterministic recursive binary-split packer (split the largest region along its longer side; ratio is a fixed function of the step index). A tile = a colored box + a text label (stands in for an image; no assets). 'Add a box' = a new image; 'change a box color' = a new asset / recolor. All three operations below act on this one mosaic — that is the whole point: same tiles, different rhythmic scheduling."- },-- "operations": {- "A_staggerInOut": {- "intent": "build the mosaic by popping DIFFERENT-sized tiles in one-per-onset (top-right→bottom-left waterfall) until they pack the frame with no overlap, hold on a downbeat, then pop them out one-per-onset",- "anchors": "enter[] = onsets; hold = downbeat; exit[] = onsets",- "what_moves": "transform + opacity per tile (scatter-jitter slide-in, drop-out); tiles vary in size and tessellate — they do NOT overlap",- "source_span_sec": [0.58, 2.08],- "source_frames_24": [14, 50]- },- "B_holdRecolor": {- "intent": "snap the whole wall on at once, LOCK positions, recolor the entire grid as one unit on each beat",- "anchors": "on = onset; recolor[] = snares (one palette swap each); off = onset",- "what_moves": "background color of every tile (0ms set — a recolor is a hit, not a fade). Positions never change.",- "source_span_sec": [2.37, 2.91],- "source_frames_24": [57, 70]- },- "C_snakeFillOverlay": {- "intent": "reveal tiles along a snake path to fill the grid, recolor the whole grid on the hard-stop, then pop overlay 'cutouts' on top one-per-onset",- "anchors": "fill[] = onsets (incl. a downbeat accel); swap = hard_stop; overlay[] = onsets",- "snake_path": "top row L→R, then bottom row R→L, repeating per row pair",- "what_moves": "per-tile reveal (opacity+scale) along the path; one full-grid palette swap on the hard-stop; overlay elements pop in and HOLD (no exit)",- "source_span_sec": [3.0, 5.5],- "source_frames_24": [72, 137]- }- },-- "match": {- "structural_type": "dense_multiply",- "requires": {- "energy_level": ">=MEDIUM",- "density": "dense",- "onset_gap_bars": "<=0.5",- "has_steady_grid": true- },- "mood_fit": ["hype", "playful", "fashion", "retail", "bold"],- "span_bars": [1, 3],- "exit_trigger": ["hard_stop", "surge", "freeze"],- "notes": "This is a META-template: a wall + a pluggable list of operations. Reach for it when a section has many discrete, individually-placeable onsets (a hit for every tile move) AND distinct sub-phases you want to articulate differently — accumulate, hold-and-flash, then fill-and-stack. The three ops map naturally onto: build → recolor-on-roll → fill-then-drop."- },-- "examples": [- {- "sample": "bgm_test_2",- "group": "g5",- "bpm": 129.2,- "downbeats_sec": [1.324, 3.181, 5.039],- "hard_stop_sec": 4.0,- "span_sec": [0.0, 5.75],- "program": "A_staggerInOut(0.58-2.08) → B_holdRecolor(2.37-2.91) → C_snakeFillOverlay(3.0-5.5, [email protected])"- }- ],-- "params": {- "bgColor": { "type": "color", "maps_to": "stage.background", "default": "#e9e9e9" },- "tiles": {- "type": "number",- "maps_to": "mosaic.tile_count",- "default": 12,- "notes": "number of boxes the packer tessellates the frame into"- },- "bands": {- "type": "number",- "maps_to": "mosaic.snake_bands",- "default": 3,- "notes": "horizontal row-bands the snake fill (OP C) sweeps through"- },- "gap": { "type": "number", "maps_to": "mosaic.seam_px", "default": 10 },- "showText": { "type": "boolean", "maps_to": "tile.label_visible", "default": true },- "labels": {- "type": "string",- "maps_to": "tile.labels",- "notes": "comma list, one per tile (cycled)"- },- "program": {- "type": "string",- "maps_to": "engine.program",- "default": "",- "notes": "JSON array of operator steps (see program_format). Empty = built-in group_5 score. THIS is the compose-by-data surface: reorder/drop/repeat steps, no code edit."- }- },-- "engine": {- "model": "operators + program-as-data. The 3 operators (§6 of index.html) are pure, parameterized, order-independent functions over ONE shared mosaic. A PROGRAM (data) lists which run, in what order, on which beats; §7 dispatches it. Compose by editing DATA (the PROGRAM array, the `program` variable, or program.json) — never the operator code. Steps combine freely, repeat, and run solo.",- "operators": ["staggerInOut", "holdRecolor", "snakeFillOverlay"],- "dispatch": "OPS[step.op](step) for each step in PROGRAM",- "extend": "add an operator = add a function + an OPS key; the program can then call it by name"- },-- "program_format": {- "_": "A program is a JSON array of steps. Each step = { op, ...fields }. Beats are absolute audio seconds. Themes are indices into THEMES[]. order = 'waterfall' | 'snake' | 'index' | [explicit tile-index array].",- "staggerInOut": {- "enter": "number[] — onset per tile (distributed if count != tiles); reveal in `order`",- "exit": "number[]? — onset per tile to drop out; omit to leave the wall standing",- "hold": "number? — documentary downbeat the full wall lands on (no tween)",- "theme": "number? — THEMES index dressed at reveal (default 0)",- "order": "string|array? — reveal order (default 'waterfall' = top-right→bottom-left)"- },- "holdRecolor": {- "on": "number — all tiles snap on at once here",- "onTheme": "number? — THEMES index on snap-on (default 0)",- "recolor": "number[]? — beats at which the WHOLE wall recolors as a unit",- "themes": "number[]? — THEMES index applied at each recolor beat (cycled)",- "off": "number? — clear the wall here; omit to hold it"- },- "snakeFillOverlay": {- "fill": "number[] — reveal anchors; tiles distributed across them in `order`",- "baseTheme": "number? — THEMES index for the fill (default 0)",- "swap": "number? — beat for a full-grid recolor (the hard-stop 一键换装)",- "swapTheme": "number? — THEMES index for the swap (default 4)",- "overlay": "number[]? — one cutout pops per beat, holds to the end",- "order": "string|array? — fill order (default 'snake')"- }- },-- "reference_impl": "index.html",- "program_data": "program.json (the default group_5 score as standalone, agent-editable data)",- "uses_primitives": [- "tile_mosaic",- "mosaic_pack",- "staggered_reveal",- "staggered_exit",- "palette_flip",- "color_grid_shuffle",- "directional_fill",- "system_replace",- "content_swap",- "overlay_pop",- "freeze_hold"- ],-- "transition_out": { "default": "fast_cut", "observed": ["freeze", "hold_on_final_collage"] },-- "reversed_from": ["bgm-golden-sample-reverse/gorup-by-group/group_5"],- "provenance": {- "video": "group_5.mp4",- "audiomap": "group_5.audiomap.json (scripts/analyze-beatgrid.py)",- "video_read": "group_5.gemini-analysis.md (Gemini 3 Pro) corrected by frame-by-frame inspection — Gemini mislabeled op B as a zero-gap banner and called the three a 'different systems'; pulled frames proved B is the same tile-wall recolored as a unit, and all three share one asset family / grid paradigm."- }-}diff --git a/skills/bgm-to-video/templates/roll-flipbook-word-cycle/README.md b/skills/bgm-to-video/templates/roll-flipbook-word-cycle/README.mddeleted file mode 100644index f6148e657e..0000000000--- a/skills/bgm-to-video/templates/roll-flipbook-word-cycle/README.md+++ /dev/null@@ -1,150 +0,0 @@-# Roll-Driven Flipbook (Word Cycle → Optional Lock)--> Reverse-engineered from **gruop_3** of the golden sample (the fast word-flicker scene).-> `structural_type: dense_multiply` · status: **draft**--A general **fast word-flipbook**: a hi-hat **roll** drives a centred word that flips every-16th-note, cycling a word list to _fill the roll_. **On demand**, when a phrase is wanted,-the flicker resolves (scramble-decode) and **locks** into a final line. Background is pure-black (the original's rotating 3D shape / glitch field is an optional add-on role).--```-gruop_3_template/- index.html ← parameterized, asset-free reference impl (1 paused GSAP timeline)- card.json ← the spec: match-face + build-face- README.md ← this file-```-------## 1. How it beat-syncs--Track facts (from `gruop_3.audiomap.json`): **BPM 129.2**, 4/4. The defining audio event-is a **sustained-fill hi-hat roll** — in the source at 3.71–6.66s, 21 hits, ~407 hits/min-— i.e. roughly a hit every **16th-note** (`60/129.2/4 = 0.116s`). That roll is the-flicker's clock.--**Timing is scene-relative** (rebased so content starts at ~0 — a template carries no dead-pre-roll; the source's 3.71s offset is removed):--| phase | what happens | scene time |-| ------------------------- | ----------------------------------------------------------------------------------------------------- | -------------- |-| **A — flicker** | a centred word hard-swaps every **0.116s** (16th-note), cycling the word list, **filling** the window | `0.10 → 2.19s` |-| **— clear** | the flicker clears (negative-space breath) | `~2.2s` |-| **B — lock** _(optional)_ | a scrambled line decodes left→right and locks the phrase | `2.33 → 3.33s` |-| **— hold** | the locked phrase holds to the end | `→ 3.8s` |--The flicker rate is **roll-level**, ~4× faster than the per-onset rate — that's what makes-words _flicker_ instead of _read one at a time_.--> **Why duration isn't hard-coded.** Scene length is read from the root `data-duration`-> attribute (single source — `3.8s` here). The flicker length isn't a magic number either-> — it's `round((flipEnd − flipStart) / 16th)`, so it **auto-fills whatever window you-> give it**. Change the beat → the flipbook re-fits.-------## 2. When you reach for this template (the matching signal)--The Music Reader emits a `GroupSignature`; **the single tell for this template is a fast-`rolls[]` entry** (`sustained-fill`, hundreds of hits/min). A roll means:--- the music is giving you a **dense grid of evenly-spaced slots** (16th-notes), and-- there's **no single readable message** to hold — it's energy/texture.--So you fill the grid with a **rapidly-cycling word flipbook** (`dense_multiply`). If a-**SURGE / downbeat follows** the roll, that's your cue to **lock** the flicker into a-final phrase (the optional resolve).--### The contrast that makes the choice mechanical--Same track, three groups, three different onset _rates_ → three different templates:--| group | audio signature | rate | → template | text behaviour |-| ------ | ------------------------------------ | --------------- | ----------------------------------- | ---------------------------- |-| g1 | onset **desert** (`gap ≥1.5 bar`) | ~0 | `held-message-living-field` | text frozen, field moves |-| g2 | **continuous onsets** (`gap <1 bar`) | ~3/s | `typewriter-phrase-keyword-shuffle` | one word **per onset** |-| **g3** | a **sustained-fill roll** | **~7/s (16th)** | **`roll-flipbook-word-cycle`** | words **flicker** (many/sec) |--Read it as a rate ladder: **no onsets → hold · onsets → type one word each · a roll →-flicker many words.** When the audiomap shows a roll, you reach for _this_ card.-------## 3. Usage--### Render with defaults (the gruop_3 recreation)--```bash-cd gruop_3_template-npx hyperframes lint && npx hyperframes validate-npx hyperframes render -f 24 -o renders/out.mp4-```--### Change the words / lock phrase (content only — no code edit)--```bash-# flicker a different list, lock a different phrase-npx hyperframes render --variables '{- "flipWords":"Ship,Iterate,Measure,Repeat",- "resolveText":"build in public",- "accentColor":"#39e6a0"-}'--# PURE FLICKER — no lock. Empty resolveText → the last cycled word just holds.-npx hyperframes render --variables '{"resolveText":""}'-```--- **`flipWords`** is cycled to fill the roll, however many you give (1 → N). More words →- fewer repeats; fewer words → more loops. The fill count follows the beat, not the list.-- **`resolveText` empty → pure flicker** (on-demand lock: only set it when you want a- phrase to land). `periodChar` empty → no accent dot.--### Re-fit to a different beat (the part that changes per track)--Two edits, both single-sourced. Timing is **scene-relative** — map your roll onto the-scene start (subtract the roll's absolute offset) so there's no dead pre-roll:--1. **Scene length** — set `data-duration` on `#root` in the HTML to your scene span.-2. **The `BEAT` block** at the top of the script:--```js-var BEAT = {- bpm: <tempo.bpm>, // sets the 16th-note flip step automatically- flipStart: 0.10, // small lead-in (keep near 0 — no dead air)- flipEnd: 0.10 + <rollLen>, // rollLen = audiomap rolls[].end − rolls[].start- resolveStart: flipEnd + ~0.14, // short clear; only used if a lock phrase is set- resolveLock: resolveStart + ~1, // place just before a downbeat in your track-};-// then set data-duration ≈ resolveLock + ~0.5 (hold)-```--That's it — the number of word-swaps, the decode step count, and the final hold all-derive from these + `data-duration`. No other timing constants to touch.-------## 4. Implementation notes (why it's built this way)--- **Everything is a 0ms `tl.set(autoAlpha)` on a pre-built node** (content*swap flipbook).- The scramble is a \_second* flipbook whose frames are progressively-resolved strings,- baked deterministically at build time.-- **Avoided:** GSAP `tl.set({textContent})` and tween `onUpdate` — both silently fail- under the seek-by-frame renderer (verified: they render black). Also avoided animating- `scale` on a `translate(-50%,-50%)`-centred node (GSAP clobbers the centering) — layers- are **grid-centred** instead.-- **Final-frame gotcha:** a `set` placed at the timeline's _last instant_ is dropped by- the renderer, so the resolve locks slightly before the end and a no-op `tl.set(stack,-{opacity:1}, DUR)` extends the timeline so the held phrase renders to the end.-- Deterministic / asset-free: generic font stacks, no `Math.random`, no timers.--## 5. Provenance--- **Source:** `bgm-golden-sample-reverse/gorup-by-group/gruop_3/gruop_3.mp4`-- **Audio:** `gruop_3.audiomap.json` (from `scripts/analyze-beatgrid.py`)-- **Video read:** `gruop_3.gemini-analysis.md` (Gemini 3 Pro) **confirmed by frame-by-frame- inspection** — Gemini's word list (Design → … → Event Management, 2 loops) and the- decode-to-"everything you need." resolve both checked out against real frames.-- **Open for promotion:** identify the source's actual typefaces if a pixel-exact match- is wanted (this impl reproduces the _mechanism_ with a generic bold sans), and decide- whether to ship the rotating-3D / glitch background as a second role.diff --git a/skills/bgm-to-video/templates/roll-flipbook-word-cycle/card.json b/skills/bgm-to-video/templates/roll-flipbook-word-cycle/card.jsondeleted file mode 100644index ce00b2f67d..0000000000--- a/skills/bgm-to-video/templates/roll-flipbook-word-cycle/card.json+++ /dev/null@@ -1,111 +0,0 @@-{- "id": "roll-flipbook-word-cycle",- "name": "Roll-Driven Flipbook (Word Cycle → Optional Lock)",- "one_line": "A hi-hat roll drives a centred word that flips every 16th-note through a word list; optionally the flicker resolves and locks into a final phrase.",- "status": "promoted",-- "match": {- "structural_type": "dense_multiply",- "requires": {- "has_roll": true,- "roll_rate_per_min": ">=300",- "roll_kind": "sustained-fill",- "energy_level": ">=MEDIUM",- "density": ["medium", "dense"]- },- "mood_fit": ["hype", "glitch", "aggressive", "tense", "playful"],- "span_bars": [1, 4],- "exit_trigger": ["surge", "downbeat", "hard_stop"],- "notes": "The ONE signal that triggers this template is a fast sustained-fill rolls[] entry in the audiomap (hundreds of hits/min, ~16th-note). A roll = a dense grid of slots with no single readable message → fill it with a rapidly-cycling word flipbook. Contrast held-message (onset desert → freeze) and typewriter-phrase (continuous onsets → one word per onset): here the RATE is roll-level (≈4× faster than onsets), so words flicker, they don't read one-at-a-time. The lock-to-phrase resolve is OPTIONAL."- },-- "examples": [- {- "sample": "gruop_3",- "group": "g3-flicker-lock",- "bpm": 129.2,- "structural_type": "dense_multiply",- "energy_level": "HIGH",- "energy": 0.9,- "density": "dense",- "roll": {- "start": 3.71,- "end": 6.66,- "hits": 21,- "rate_per_min": 407,- "kind": "sustained-fill",- "drum": "hihat"- },- "has_steady_grid": true,- "span_sec": [3.32, 6.966],- "span_bars": 2,- "entry": { "anchor": "roll", "time": 3.625 },- "exit_trigger": { "type": "surge", "time": 6.966 },- "mood": ["hype", "glitch"]- }- ],-- "roles": {- "word_flicker": {- "kind": "message",- "motion": "flipbook",- "anchor": "roll.16th_grid",- "notes": "PROPOSED motion verb. A centred word that hard-swaps (0ms) every 16th-note, cycling the word list to FILL the roll window. Word count auto-derives from (rollEnd-rollStart)/16th. The typographic field IS the percussion."- },- "lock_phrase": {- "kind": "message",- "motion": "scramble_decode",- "anchor": "surge + next_downbeat",- "notes": "PROPOSED motion verb. OPTIONAL. On the SURGE after the roll, the flicker clears and a scrambled line decodes left→right, locking the final phrase on the next downbeat. Empty resolveText → skip; the last flicker word just holds (locks) instead."- },- "background": {- "kind": "background",- "motion": "hold",- "anchor": "none",- "notes": "Pure black in this reference impl (per the reverse brief). The original gruop_3 layered a rotating 3D shape + glitch field here — an OPTIONAL add-on role, not required by the structural type."- }- },-- "params": {- "bgColor": { "type": "color", "maps_to": "background.color" },- "textColor": { "type": "color", "maps_to": "word_flicker.color + lock_phrase.color" },- "accentColor": { "type": "color", "maps_to": "lock_phrase.trailing_accent" },- "flipWords": {- "type": "string",- "maps_to": "word_flicker.words",- "note": "comma-separated; cycled to fill the roll"- },- "resolveText": {- "type": "string",- "maps_to": "lock_phrase.content",- "optional": true,- "note": "EMPTY = pure flicker, no lock"- },- "periodChar": { "type": "string", "maps_to": "lock_phrase.trailing_accent", "optional": true }- },-- "beat_map": {- "comment": "Script-side BEAT block in index.html. SCENE-RELATIVE (starts at ~0, no dead pre-roll) — the source's absolute roll at 3.71s is rebased to flipStart. Duration is single-sourced from data-duration; the flipbook AUTO-FILLS the flicker window.",- "bpm": 129.2,- "flip_step_derived": "60/bpm/4 (16th-note) = 0.116s",- "flipStart": 0.1,- "flipEnd": 2.19,- "fill_roll": true,- "resolveStart": 2.33,- "resolveLock": 3.33,- "duration": "from data-duration (3.8 here)",- "source_roll_absolute": {- "start": 3.71,- "end": 6.66,- "note": "rebased: subtract ~3.6s offset to remove the pre-roll"- }- },-- "reference_impl": "index.html",- "uses_primitives": ["content_swap", "word_grid_burst", "negative_space_hold", "value_counter"],-- "transition_out": { "default": "fast_cut", "observed": "clear_then_decode_lock" },-- "reversed_from": ["bgm-golden-sample-reverse/gorup-by-group/gruop_3"],- "created": "2026-06-17"-}diff --git a/skills/bgm-to-video/templates/split-anchor-word-slot/README.md b/skills/bgm-to-video/templates/split-anchor-word-slot/README.mddeleted file mode 100644index 42c781cc50..0000000000--- a/skills/bgm-to-video/templates/split-anchor-word-slot/README.md+++ /dev/null@@ -1,246 +0,0 @@-# Split-Anchor Word-Slot · 5 beat-synced operators--> Reverse-engineered from **group_6** of the golden sample (the "studio contre courant" kinetic-type scene).-> `structural_type: per_onset_sequential` · status: **draft**--**ONE base lockup, FIVE operators.** The base is a kinetic-typography **lockup**: a-**held left anchor column** of `R` rows (fixed words) beside a **torn-paper word-SLOT-box** on the right. `R` is data (the `anchors` comma-list length) — pass 2, 3, or 4-words and the geometry follows. Asset-free: just text + colored boxes. Five-interchangeable, beat-synced operators act on that one lockup:--| op | what it does | what moves | source span |-| ---------- | ------------------------------------------------------------------------------------------------------------------------------- | --------------------------------- | ------------------------------------------ |-| **lockup** | pop the `R` left anchor words in one-per-beat → reveal the empty slot box | per-word pop-in + box scale-in | 0.13–0.50s (f3–f12) |-| **slot** | swap a word-GROUP into the box: lines slide in per beat → hold → slide out (omit `exit` to hold). per-line color via `colors[]` | per-line textContent + slide/fade | 1.0–1.83s (f24–f44) & 2.04–2.75s (f49–f66) |-| **bg** | flip the WHOLE scene to another theme on a beat (bg + anchor ink + box fill + slot ink invert, 0ms) | colors of root/box/anchors/lines | f83 (blue→green) |-| **shake** | global per-beat jitter of the whole lockup (x/y + rotation), one jolt per beat | transform of `#lockup` | 2.16–4.18s (f52–f100) |-| **expand** | EXIT wipe: fade text → zoom the slot box until it fills the frame | text fade + box scale→30× | 4.30–4.79s (f100–f114) |--```-group_6_template/- index.html ← asset-free reference impl: lockup + 5 operators + program runner- program.json ← the default group_6 score as standalone, agent-editable DATA- card.json ← the spec: base template, operators, program_format, match signature- assets/gsap.min.js ← vendored (offline-safe lint/validate/render)- renders/ ← group_6_recreate(.mp4 / _audio.mp4) + custom_demo.mp4- README.md ← this file-```--This answers the brief directly: **the fixed structure is a template; the content is-data.** Different words compose into the same lockup; the row count and the number of-background flips are program parameters; every move is keyed to a beat, so a new track-matches by swapping the beat numbers.-------## 1. How it beat-syncs (from `../audiomap.json`)--**Nothing is on a timer.** Every move is a GSAP tween/`set` at an absolute audio second-from the analysis. Track facts: **~92 BPM**, 4/4, downbeats **2.322 (f56) / 4.923-(f118)**, a **sustained hihat fill 2.16–4.18s (f52–f100, 14 hits)**. The beat tracker is-only confident after 2.3s (the front is a VOID lead-in), so the early anchor pops ride-the onset list, not the grid.--The score is the **PROGRAM** — a data array of operator steps-([`program.json`](program.json), mirrored inline as `DEFAULT_PROGRAM` in §3 of-`index.html`):--```jsonc-[- { "op": "lockup", "enter": [0.125, 0.333, 0.5], "box": 0.292, "theme": 0 }, // name locks in- {- "op": "slot",- "words": ["I bring", "ideas", "to life"], // group 1 in→out- "enter": [1.0, 1.167, 1.292],- "exit": [1.667, 1.75, 1.833],- },- {- "op": "slot",- "words": ["you", "wanna", "see?"], // group 2, colored- "enter": [2.042, 2.208, 2.375],- "exit": [2.75, 2.75, 2.75],- "colors": [0, 1, 1],- },- {- "op": "shake",- "amp": 15,- "rot": 1.7,- "settle": 0.13, // ride the hihat fill- "beats": [2.16, 2.3, 2.44, 2.62, 2.76, 2.88, 3.06, 3.27, 3.41, 3.53, 3.71, 3.85, 4.09, 4.18],- },- { "op": "bg", "at": 3.458, "theme": 1 }, // blue → green (f83)- { "op": "expand", "fade": 4.3, "at": 4.667, "to": 4.792 }, // zoom-wipe into f118-]-```--**Rule of thumb:** structure (the lock-in, the palette flip, the zoom-wipe) leans on the-strong downbeats; texture (per-word slot pops, the shake) rides the dense onset stream in-between.-------## 2. Why _this beat_ → _this template_ (the matching intuition)--Reach for the anchor-slot lockup when the audiomap shows:--1. **A held idea + a stream of discrete onsets** — something to anchor on the left (a- name / brand) and a hit for every word you pop on the right (`onset_gap_bars ≤ 1`).-2. **A dense run (roll / hihat fill)** to ride a **shake** on — group_6's f52–f100 fill- is exactly the "jitter the whole thing" stretch.-3. **A strong downbeat to wipe out into** — the **expand** zoom lands its black-out one- beat _before_ the f118 downbeat kick, so the next group "punches" in on the beat.-4. **Optional: one or two key hits to invert the palette** — schedule a `bg` flip on each.--Put plainly: **"a held name + per-onset words + one roll + a downbeat exit"** is the-fingerprint.-------## 3. Usage--### Render with defaults (the group_6 recreation)--```bash-cd group_6_template-npx hyperframes lint . && npx hyperframes validate .-npx hyperframes render . -f 24 -o renders/group_6_recreate.mp4-# beat-matched proof (mux the original BGM):-ffmpeg -y -i renders/group_6_recreate.mp4 -i ../group_6.wav -c:v copy -c:a aac -shortest renders/group_6_recreate_audio.mp4-```--### Change the words (content only — no code edit)--```bash-# 2-row lockup, different phrase-npx hyperframes render . --variables '{- "anchors": "make,it",- "program": "[{\"op\":\"lockup\",\"enter\":[0.1,0.4],\"box\":0.3},{\"op\":\"slot\",\"words\":[\"move\",\"fast\"],\"enter\":[1.0,1.3],\"exit\":[1.9,1.9]},{\"op\":\"expand\",\"fade\":2.2,\"at\":2.5,\"to\":2.7}]"-}'-```--- **anchors** is a comma list — one word per row. Its length sets `R` (rows): 2 / 3 / 4.-- The slot box auto-sizes to the widest word-group; the slot operator distributes any- word count across its `enter` / `exit` beat lists.-- **showText:false** hides all glyphs for a pure block/box look.--### Background changes once or twice (a parameter, on the beat)--```bash-# change TWICE: blue → green at 2.0s, green → ink at 3.6s-npx hyperframes render . --variables '{"program":"[{\"op\":\"lockup\",\"enter\":[0.1,0.3,0.5]},{\"op\":\"bg\",\"at\":2.0,\"theme\":1},{\"op\":\"bg\",\"at\":3.6,\"theme\":2},{\"op\":\"expand\",\"fade\":4.5,\"at\":4.8,\"to\":5.0}]"}'-```--`bg` is just another step — schedule **zero, one, or two** of them on whatever beats the-music gives you.--### Recompose freely — compose by DATA, not code (the whole point)--The five operators (`lockup`, `slot`, `bg`, `shake`, `expand`) are **pure, parameterized-functions** that write tweens at absolute audio seconds onto one shared timeline. They-are **order-independent and may overlap** (the `shake` runs _under_ the slot cycles and-the bg flip). What runs — on which beats — is the **PROGRAM** (a `{op, ...beats}` array).-So you recompose **without touching operator code**:--```bash-# Repeat the slot op three times (three word-groups), no shake, no bg flip-npx hyperframes render . --variables '{"program":"[{\"op\":\"lockup\",\"enter\":[0.1,0.3,0.5]},{\"op\":\"slot\",\"words\":[\"one\",\"two\",\"three\"],\"enter\":[1.0,1.2,1.4],\"exit\":[1.8,1.8,1.8]},{\"op\":\"slot\",\"words\":[\"four\",\"five\",\"six\"],\"enter\":[2.2,2.4,2.6],\"exit\":[3.0,3.0,3.0],\"colors\":[2,3,0]},{\"op\":\"slot\",\"words\":[\"seven\",\"eight\",\"nine\"],\"enter\":[3.4,3.6,3.8]},{\"op\":\"expand\",\"fade\":4.6,\"at\":4.9,\"to\":5.1}]"}'-```--Each step's fields are documented in [`card.json`](card.json) → `program_format`. An-agent composes by emitting this JSON (op names + beats) — it never edits JS.--> **Empty `program` = the built-in group_6 score.** Keep `program.json` and-> `DEFAULT_PROGRAM` in sync — `program.json` is the canonical, copy-pasteable data.--### Re-fit the beat to a different group (the part that changes per track)--Copy the new group's `audiomap.json` onset / downbeat seconds into the step beat lists.-Each list grows or shrinks freely — more onsets → more word pops; `beatAt()` distributes-any count across any beat list. For a longer / shorter piece set `DUR` and the root-`data-duration` to the new span. Add palettes to `THEMES`, accent colors to `ACCENTS`.--> **Deterministic / asset-free:** text + colored boxes only, no remote assets, no-> `Math.random` (shake uses a deterministic index hash), no timers. Lints clean,-> validates with no console errors.-------## 4. Provenance--- **Source:** `bgm-golden-sample-reverse/gorup-by-group/group_6/group_6.mp4`-- **Audio:** `audiomap.json` (from `skills/bgm-to-video-new/scripts/analyze-beatgrid.py`)-- **Video read:** `group_6.gemini-analysis.md` (Gemini 3 Pro, 24fps) cross-checked by- frame-by-frame contact sheets. Both agreed this is **kinetic typography, not an image- grid** — left held `studio / contre / courant`; the right box cycled `I bring / ideas /-to life` then the colored `you / wanna / see?`; a one-frame blue→green palette flip at- f83; a global shake riding the f52–f100 hihat fill; and a box zoom-wipe to black at- f112–f114 leading into the f118 downbeat.-- **Corrections to the original read:** it is the **right slot box** (not a "left box")- that zooms out, and the text is **masked / faded** under the zoom, not a soft dissolve.--### Tuning pass — Gemini 24fps side-by-side (`renders/sidebyside_*`)--A second pass rendered the recreate, stacked it beside the source (`renders/sidebyside_src-vs-recreate_v3.mp4`), and had Gemini 3 Pro grade the diff frame-by-frame-(`renders/sidebyside_v3.gemini-analysis.md`). The source reads as **acid/brutalist-collage with strong physical inertia**; v1 read as flat/linear UI motion. Applied:--1. **Constant lean** — the whole lockup rests at `BASE_TILT -3.5°`, the slot box leans- `+2.6°` more. The source is never axis-aligned.-2. **Punchy easing + faux motion-blur** — slot words WHIP in from the right on `expo.out`- with a `scaleX` stretch (1.6→1) that fakes horizontal motion blur; exit arcs down-left- on `power3.in`. (Was a uniform, mechanical slide.)-3. **Faux-extended type** — inner `.t` span at `scaleX(1.12)` + weight 900 + tight- tracking approximates a Druk-Wide / Monument-Extended face, asset-free. Bigger size,- raised position (the lockup sits high-center).-4. **Per-line torn TAPES (not one box)** — this was the biggest "soul" gap (flagged in- both Gemini passes + frame inspection). Each slot line is now its **own tape**: a- white card sized to _its_ word (kills the dead space a shared box left behind narrow- lines), with its own micro-rotation, a stair `margin-left` offset, a torn `clip-path`,- and a drop shadow → a brutalist tape collage. The backing `#slotbox` is transparent- during word phases (tapes sit straight on the colour field), and `bg` turns it into a- solid torn card for the empty state + the expand zoom target.-5. **Brighter palette** — electric azure `#0a84ff` + lime/acid green `#5cf03a`.-6. **Stronger shake** — `amp 26px · rot 2.4° · back.out(3)` recoil around the base tilt.- (Verified rendering by diffing adjacent shake-window frames — Gemini's v3 claim that- the recreate was "static" was a low-res / anchoring misread.)-7. **Two-stage expand** — stage A grows the torn mass to ~half-frame (decelerating,- `power2.out`) so the swell is _visible_ like the source (its mass is still only- ~half-frame at f113); stage B then swallows the frame (`power2.in` + blur) and flattens- to the solid black-out at ~f115, one beat before the f118 downbeat. (A single big-scale- tween covered the frame far too early, because a large rest box hits full cover at a low- scale.)--### Fix pass — review of the rendered cut--Three concrete defects spotted on playback, all fixed:--1. **Slot box covered the held words** (`courant`→`couran`, `make`→`mak`). Root cause: the- faux-extend `scaleX` does **not** change an element's _layout_ width, so (a) the anchor- glyphs rendered 12% wider than their layout box and overflowed RIGHT under the box, and- (b) the slot tapes (GSAP `scaleX` from centre) bled 6% LEFT back over the anchors — the- two overflows collided in the gap. Fixed three ways: anchors are **left-aligned** with- each row's width **pinned to its measured scaled width** (`getBoundingClientRect`), the- slot tapes scale from **`transform-origin: 0% 50%`** (rightward only). With the overflow- tamed, `#slotbox margin-left` is the **press knob**: a small **negative** value (`-0.12em`)- gives the source's tight collage TUCK — the tapes lightly press the tail of the longest- anchor (`courant`'s `t` sits right at the tape edge) while every glyph stays legible. Use- `0` for a clean kiss, more negative for a heavier tuck (too negative = white-on-white over- the glyph; a tape with a contrasting `boxInk` can press further).-2. **Slot words overflowed their tape** (`bring`→`brin`) — the faux-extend `scaleX(1.12)`- stretched only the text, not the tape background. Fixed: slot tapes carry the extend on- the **line's GSAP `scaleX`** (the background stretches _with_ the text), `.sline .t` is- reset to `scaleX(1)`, plus more right padding — the word always fits the strip.-3. **Final box was one clean block** — it should be a torn **collage of stacked, offset- rectangles**. Fixed: the box is now **three sibling `.card` layers** (each its own- offset + rotation + torn `clip-path`); they're transparent during word phases and turn- black for the empty box + the expand zoom, scaling as one while staying staggered.--- **Open questions for promotion:** (1) expose `tear` (clip-path roughness), `tilt` /- `boxTilt`, and the per-line stair offsets as params; (2) bundle a real Extended-Black- font under `assets/` for an exact type match (currently faked with `scaleX`); (3) `shake`- could auto-derive `beats` from the overlapping `rolls[]` span; (4) real motion blur isn't- available in-engine — the `scaleX` squash + expand `blur()` only approximate it; (5) the- source briefly shows an empty WHITE box before the first words / between groups — the- per-line-tape model drops that (the colour field is bare until a tape whips in), a minor- trade for killing the dead space.diff --git a/skills/bgm-to-video/templates/split-anchor-word-slot/assets/gsap.min.js b/skills/bgm-to-video/templates/split-anchor-word-slot/assets/gsap.min.jsdeleted file mode 100644index 3c73d761a9..0000000000--- a/skills/bgm-to-video/templates/split-anchor-word-slot/assets/gsap.min.js+++ /dev/null@@ -1,11 +0,0 @@-/*!- * GSAP 3.15.0- * https://gsap.com- *- * @license Copyright 2026, GreenSock. All rights reserved.- * Subject to the terms at https://gsap.com/standard-license.- * @author: Jack Doyle, [email protected]- */--!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t=t||self).window=t.window||{})}(this,function(e){"use strict";function _inheritsLoose(t,e){t.prototype=Object.create(e.prototype),(t.prototype.constructor=t).__proto__=e}function _assertThisInitialized(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function r(t){return"string"==typeof t}function s(t){return"function"==typeof t}function t(t){return"number"==typeof t}function u(t){return void 0===t}function v(t){return"object"==typeof t}function w(t){return!1!==t}function x(){return"undefined"!=typeof window}function y(t){return s(t)||r(t)}function R(t){return(i=bt(t,ht))&&Fe}function S(t,e){return console.warn("Invalid property",t,"set to",e,"Missing plugin? gsap.registerPlugin()")}function T(t,e){return!e&&console.warn(t)}function U(t,e){return t&&(ht[t]=e)&&i&&(i[t]=e)||ht}function V(){return 0}function ga(t){var e,r,i=t[0];if(v(i)||s(i)||(t=[t]),!(e=(i._gsap||{}).harness)){for(r=yt.length;r--&&!yt[r].targetTest(i););e=yt[r]}for(r=t.length;r--;)t[r]&&(t[r]._gsap||(t[r]._gsap=new Xt(t[r],e)))||t.splice(r,1);return t}function ha(t){return t._gsap||ga(Pt(t))[0]._gsap}function ia(t,e,r){return(r=t[e])&&s(r)?t[e]():u(r)&&t.getAttribute&&t.getAttribute(e)||r}function ja(t,e){return(t=t.split(",")).forEach(e)||t}function ka(t){return Math.round(1e5*t)/1e5||0}function la(t){return Math.round(1e7*t)/1e7||0}function ma(t,e){var r=e.charAt(0),i=parseFloat(e.substr(2));return t=parseFloat(t),"+"===r?t+i:"-"===r?t-i:"*"===r?t*i:t/i}function na(t,e){for(var r=e.length,i=0;t.indexOf(e[i])<0&&++i<r;);return i<r}function oa(){var t,e,r=pt.length,i=pt.slice(0);for(_t={},t=pt.length=0;t<r;t++)(e=i[t])&&e._lazy&&(e.render(e._lazy[0],e._lazy[1],!0)._lazy=0)}function pa(t){return!!(t._initted||t._startAt||t.add)}function qa(t,e,r,i){pt.length&&!I&&oa(),t.render(e,r,i||!!(I&&e<0&&pa(t))),pt.length&&!I&&oa()}function ra(t){var e=parseFloat(t);return(e||0===e)&&(t+"").match(ot).length<2?e:r(t)?t.trim():t}function sa(t){return t}function ta(t,e){for(var r in e)r in t||(t[r]=e[r]);return t}function wa(t,e){for(var r in e)"__proto__"!==r&&"constructor"!==r&&"prototype"!==r&&(t[r]=v(e[r])?wa(t[r]||(t[r]={}),e[r]):e[r]);return t}function xa(t,e){var r,i={};for(r in t)r in e||(i[r]=t[r]);return i}function ya(t){var e=t.parent||L,r=t.keyframes?function _setKeyframeDefaults(i){return function(t,e){for(var r in e)r in t||"duration"===r&&i||"ease"===r||(t[r]=e[r])}}(K(t.keyframes)):ta;if(w(t.inherit))for(;e;)r(t,e.vars.defaults),e=e.parent||e._dp;return t}function Aa(t,e,r,i,n){void 0===r&&(r="_first"),void 0===i&&(i="_last");var a,s=t[i];if(n)for(a=e[n];s&&s[n]>a;)s=s._prev;return s?(e._next=s._next,s._next=e):(e._next=t[r],t[r]=e),e._next?e._next._prev=e:t[i]=e,e._prev=s,e.parent=e._dp=t,e}function Ba(t,e,r,i){void 0===r&&(r="_first"),void 0===i&&(i="_last");var n=e._prev,a=e._next;n?n._next=a:t[r]===e&&(t[r]=a),a?a._prev=n:t[i]===e&&(t[i]=n),e._next=e._prev=e.parent=null}function Ca(t,e){t.parent&&(!e||t.parent.autoRemoveChildren)&&t.parent.remove&&t.parent.remove(t),t._act=0}function Da(t,e){if(t&&(!e||e._end>t._dur||e._start<0))for(var r=t;r;)r._dirty=1,r=r.parent;return t}function Fa(t,e,r,i){return t._startAt&&(I?t._startAt.revert(ft):t.vars.immediateRender&&!t.vars.autoRevert||t._startAt.render(e,!0,i))}function Ha(t){return t._repeat?wt(t._tTime,t=t.duration()+t._rDelay)*t:0}function Ja(t,e){return(t-e._start)*e._ts+(0<=e._ts?0:e._dirty?e.totalDuration():e._tDur)}function Ka(t){return t._end=la(t._start+(t._tDur/Math.abs(t._ts||t._rts||q)||0))}function La(t,e){var r=t._dp;return r&&r.smoothChildTiming&&t._ts&&(t._start=la(r._time-(0<t._ts?e/t._ts:((t._dirty?t.totalDuration():t._tDur)-e)/-t._ts)),Ka(t),r._dirty||Da(r,t)),t}function Ma(t,e){var r;if((e._time||!e._dur&&e._initted||e._start<t._time&&(e._dur||!e.add))&&(r=Ja(t.rawTime(),e),(!e._dur||Mt(0,e.totalDuration(),r)-e._tTime>q)&&e.render(r,!0)),Da(t,e)._dp&&t._initted&&t._time>=t._dur&&t._ts){if(t._dur<t.duration())for(r=t;r._dp;)0<=r.rawTime()&&r.totalTime(r._tTime),r=r._dp;t._zTime=-q}}function Na(e,r,i,n){return r.parent&&Ca(r),r._start=la((t(i)?i:i||e!==L?Ot(e,i,r):e._time)+r._delay),r._end=la(r._start+(r.totalDuration()/Math.abs(r.timeScale())||0)),Aa(e,r,"_first","_last",e._sort?"_start":0),xt(r)||(e._recent=r),n||Ma(e,r),e._ts<0&&La(e,e._tTime),e}function Oa(t,e){return(ht.ScrollTrigger||S("scrollTrigger",e))&&ht.ScrollTrigger.create(e,t)}function Pa(t,e,r,i,n){return Ht(t,e,n),t._initted?!r&&t._pt&&!I&&(t._dur&&!1!==t.vars.lazy||!t._dur&&t.vars.lazy)&&f!==It.frame?(pt.push(t),t._lazy=[n,i],1):void 0:1}function Ua(t,e,r,i){var n=t._repeat,a=la(e)||0,s=t._tTime/t._tDur;return s&&!i&&(t._time*=a/t._dur),t._dur=a,t._tDur=n?n<0?1e10:la(a*(n+1)+t._rDelay*n):a,0<s&&!i&&La(t,t._tTime=t._tDur*s),t.parent&&Ka(t),r||Da(t.parent,t),t}function Va(t){return t instanceof Gt?Da(t):Ua(t,t._dur)}function Ya(e,r,i){var n,a,s=t(r[1]),o=(s?2:1)+(e<2?0:1),u=r[o];if(s&&(u.duration=r[1]),u.parent=i,e){for(n=u,a=i;a&&!("immediateRender"in n);)n=a.vars.defaults||{},a=w(a.vars.inherit)&&a.parent;u.immediateRender=w(n.immediateRender),e<2?u.runBackwards=1:u.startAt=r[o-1]}return new te(r[0],u,r[1+o])}function Za(t,e){return t||0===t?e(t):e}function _a(t,e){return r(t)&&(e=ut.exec(t))?e[1]:""}function cb(t,e){return t&&v(t)&&"length"in t&&(!e&&!t.length||t.length-1 in t&&v(t[0]))&&!t.nodeType&&t!==h}function fb(r){return r=Pt(r)[0]||T("Invalid scope")||{},function(t){var e=r.current||r.nativeElement||r;return Pt(t,e.querySelectorAll?e:e===r?T("Invalid scope")||a.createElement("div"):r)}}function gb(t){return t.sort(function(){return.5-Math.random()})}function hb(t){if(s(t))return t;var p=v(t)?t:{each:t},_=jt(p.ease),m=p.from||0,g=parseFloat(p.base)||0,y={},e=0<m&&m<1,T=isNaN(m)||e,b=p.axis,w=m,x=m;return r(m)?w=x={center:.5,edges:.5,end:1}[m]||0:!e&&T&&(w=m[0],x=m[1]),function(t,e,r){var i,n,a,s,o,u,h,l,f,c=(r||p).length,d=y[c];if(!d){if(!(f="auto"===p.grid?0:(p.grid||[1,X])[1])){for(h=-X;h<(h=r[f++].getBoundingClientRect().left)&&f<c;);f<c&&f--}for(d=y[c]=[],i=T?Math.min(f,c)*w-.5:m%f,n=f===X?0:T?c*x/f-.5:m/f|0,l=X,u=h=0;u<c;u++)a=u%f-i,s=n-(u/f|0),d[u]=o=b?Math.abs("y"===b?s:a):$(a*a+s*s),h<o&&(h=o),o<l&&(l=o);"random"===m&&gb(d),d.max=h-l,d.min=l,d.v=c=(parseFloat(p.amount)||parseFloat(p.each)*(c<f?c-1:b?"y"===b?c/f:f:Math.max(f,c/f))||0)*("edges"===m?-1:1),d.b=c<0?g-c:g,d.u=_a(p.amount||p.each)||0,_=_&&c<0?Yt(_):_}return c=(d[t]-d.min)/d.max||0,la(d.b+(_?_(c):c)*d.v)+d.u}}function ib(i){var n=Math.pow(10,((i+"").split(".")[1]||"").length);return function(e){var r=la(Math.round(parseFloat(e)/i)*i*n);return(r-r%1)/n+(t(e)?0:_a(e))}}function jb(h,e){var l,f,r=K(h);return!r&&v(h)&&(l=r=h.radius||X,h.values?(h=Pt(h.values),(f=!t(h[0]))&&(l*=l)):h=ib(h.increment)),Za(e,r?s(h)?function(t){return f=h(t),Math.abs(f-t)<=l?f:t}:function(e){for(var r,i,n=parseFloat(f?e.x:e),a=parseFloat(f?e.y:0),s=X,o=0,u=h.length;u--;)(r=f?(r=h[u].x-n)*r+(i=h[u].y-a)*i:Math.abs(h[u]-n))<s&&(s=r,o=u);return o=!l||s<=l?h[o]:e,f||o===e||t(e)?o:o+_a(e)}:ib(h))}function kb(t,e,r,i){return Za(K(t)?!e:!0===r?!!(r=0):!i,function(){return K(t)?t[~~(Math.random()*t.length)]:(r=r||1e-5)&&(i=r<1?Math.pow(10,(r+"").length-2):1)&&Math.floor(Math.round((t-r/2+Math.random()*(e-t+.99*r))/r)*r*i)/i})}function ob(e,r,t){return Za(t,function(t){return e[~~r(t)]})}function rb(t){return t.replace(tt,function(t){var e=t.indexOf("[")+1,r=t.substring(e||7,e?t.indexOf("]"):t.length-1).split(et);return kb(e?r:+r[0],e?0:+r[1],+r[2]||1e-5)})}function ub(t,e,r){var i,n,a,s=t.labels,o=X;for(i in s)(n=s[i]-e)<0==!!r&&n&&o>(n=Math.abs(n))&&(a=i,o=n);return a}function wb(t){return Ca(t),t.scrollTrigger&&t.scrollTrigger.kill(!!I),t.progress()<1&&At(t,"onInterrupt"),t}function zb(t){if(t)if(t=!t.name&&t.default||t,x()||t.headless){var e=t.name,r=s(t),i=e&&!r&&t.init?function(){this._props=[]}:t,n={init:V,render:_e,add:$t,kill:Te,modifier:ve,rawVars:0},a={targetTest:0,get:0,getSetter:ue,aliases:{},register:0};if(Lt(),t!==i){if(mt[e])return;ta(i,ta(xa(t,n),a)),bt(i.prototype,bt(n,xa(t,a))),mt[i.prop=e]=i,t.targetTest&&(yt.push(i),dt[e]=1),e=("css"===e?"CSS":e.charAt(0).toUpperCase()+e.substr(1))+"Plugin"}U(e,i),t.register&&t.register(Fe,i,we)}else Dt.push(t)}function Cb(t,e,r){return(6*(t+=t<0?1:1<t?-1:0)<1?e+(r-e)*t*6:t<.5?r:3*t<2?e+(r-e)*(2/3-t)*6:e)*zt+.5|0}function Db(e,r,i){var n,a,s,o,u,h,l,f,c,d,p=e?t(e)?[e>>16,e>>8&zt,e&zt]:0:Rt.black;if(!p){if(","===e.substr(-1)&&(e=e.substr(0,e.length-1)),Rt[e])p=Rt[e];else if("#"===e.charAt(0)){if(e.length<6&&(e="#"+(n=e.charAt(1))+n+(a=e.charAt(2))+a+(s=e.charAt(3))+s+(5===e.length?e.charAt(4)+e.charAt(4):"")),9===e.length)return[(p=parseInt(e.substr(1,6),16))>>16,p>>8&zt,p&zt,parseInt(e.substr(7),16)/255];p=[(e=parseInt(e.substr(1),16))>>16,e>>8&zt,e&zt]}else if("hsl"===e.substr(0,3))if(p=d=e.match(rt),r){if(~e.indexOf("="))return p=e.match(it),i&&p.length<4&&(p[3]=1),p}else o=+p[0]%360/360,u=p[1]/100,n=2*(h=p[2]/100)-(a=h<=.5?h*(u+1):h+u-h*u),3<p.length&&(p[3]*=1),p[0]=Cb(o+1/3,n,a),p[1]=Cb(o,n,a),p[2]=Cb(o-1/3,n,a);else p=e.match(rt)||Rt.transparent;p=p.map(Number)}return r&&!d&&(n=p[0]/zt,a=p[1]/zt,s=p[2]/zt,h=((l=Math.max(n,a,s))+(f=Math.min(n,a,s)))/2,l===f?o=u=0:(c=l-f,u=.5<h?c/(2-l-f):c/(l+f),o=l===n?(a-s)/c+(a<s?6:0):l===a?(s-n)/c+2:(n-a)/c+4,o*=60),p[0]=~~(o+.5),p[1]=~~(100*u+.5),p[2]=~~(100*h+.5)),i&&p.length<4&&(p[3]=1),p}function Eb(t){var r=[],i=[],n=-1;return t.split(Et).forEach(function(t){var e=t.match(nt)||[];r.push.apply(r,e),i.push(n+=e.length+1)}),r.c=i,r}function Fb(t,e,r){var i,n,a,s,o="",u=(t+o).match(Et),h=e?"hsla(":"rgba(",l=0;if(!u)return t;if(u=u.map(function(t){return(t=Db(t,e,1))&&h+(e?t[0]+","+t[1]+"%,"+t[2]+"%,"+t[3]:t.join(","))+")"}),r&&(a=Eb(t),(i=r.c).join(o)!==a.c.join(o)))for(s=(n=t.replace(Et,"1").split(nt)).length-1;l<s;l++)o+=n[l]+(~i.indexOf(l)?u.shift()||h+"0,0,0,0)":(a.length?a:u.length?u:r).shift());if(!n)for(s=(n=t.split(Et)).length-1;l<s;l++)o+=n[l]+u[l];return o+n[s]}function Ib(t){var e,r=t.join(" ");if(Et.lastIndex=0,Et.test(r))return e=Ft.test(r),t[1]=Fb(t[1],e),t[0]=Fb(t[0],e,Eb(t[1])),!0}function Rb(t){var e=(t+"").split("("),r=Bt[e[0]];return r&&1<e.length&&r.config?r.config.apply(null,~t.indexOf("{")?[function _parseObjectInString(t){for(var e,r,i,n={},a=t.substr(1,t.length-3).split(":"),s=a[0],o=1,u=a.length;o<u;o++)r=a[o],e=o!==u-1?r.lastIndexOf(","):r.length,i=r.substr(0,e),n[s]=isNaN(i)?i.replace(Ut,"").trim():+i,s=r.substr(e+1).trim();return n}(e[1])]:function _valueInParentheses(t){var e=t.indexOf("(")+1,r=t.indexOf(")"),i=t.indexOf("(",e);return t.substring(e,~i&&i<r?t.indexOf(")",r+1):r)}(t).split(",").map(ra)):Bt._CE&&Nt.test(t)?Bt._CE("",t):r}function Ub(t,e,r,i){void 0===r&&(r=function easeOut(t){return 1-e(1-t)}),void 0===i&&(i=function easeInOut(t){return t<.5?e(2*t)/2:1-e(2*(1-t))/2});var n,a={easeIn:e,easeOut:r,easeInOut:i};return ja(t,function(t){for(var e in Bt[t]=ht[t]=a,Bt[n=t.toLowerCase()]=r,a)Bt[n+("easeIn"===e?".in":"easeOut"===e?".out":".inOut")]=Bt[t+"."+e]=a[e]}),a}function Vb(e){return function(t){return t<.5?(1-e(1-2*t))/2:.5+e(2*(t-.5))/2}}function Wb(r,t,e){function Gm(t){return 1===t?1:i*Math.pow(2,-10*t)*Q((t-a)*n)+1}var i=1<=t?t:1,n=(e||(r?.3:.45))/(t<1?t:1),a=n/G*(Math.asin(1/i)||0),s="out"===r?Gm:"in"===r?function(t){return 1-Gm(1-t)}:Vb(Gm);return n=G/n,s.config=function(t,e){return Wb(r,t,e)},s}function Xb(e,r){function Om(t){return t?--t*t*((r+1)*t+r)+1:0}void 0===r&&(r=1.70158);var t="out"===e?Om:"in"===e?function(t){return 1-Om(1-t)}:Vb(Om);return t.config=function(t){return Xb(e,t)},t}var F,I,l,L,h,n,a,i,o,f,c,d,p,_,m,g,b,k,O,M,C,P,A,D,z,E,B,N,Y={autoSleep:120,force3D:"auto",nullTargetWarn:1,units:{lineHeight:""}},j={duration:.5,overwrite:!1,delay:0},X=1e8,q=1/X,G=2*Math.PI,Z=G/4,W=0,$=Math.sqrt,H=Math.cos,Q=Math.sin,J="function"==typeof ArrayBuffer&&ArrayBuffer.isView||function(){},K=Array.isArray,tt=/random\([^)]+\)/g,et=/,\s*/g,rt=/(?:-?\.?\d|\.)+/gi,it=/[-+=.]*\d+[.e\-+]*\d*[e\-+]*\d*/g,nt=/[-+=.]*\d+[.e-]*\d*[a-z%]*/g,at=/[-+=.]*\d+\.?\d*(?:e-|e\+)?\d*/gi,st=/[+-]=-?[.\d]+/,ot=/[^,'"\[\]\s]+/gi,ut=/^[+\-=e\s\d]*\d+[.\d]*([a-z]*|%)\s*$/i,ht={},lt={suppressEvents:!0,isStart:!0,kill:!1},ft={suppressEvents:!0,kill:!1},ct={suppressEvents:!0},dt={},pt=[],_t={},mt={},gt={},vt=30,yt=[],Tt="",bt=function _merge(t,e){for(var r in e)t[r]=e[r];return t},wt=function _animationCycle(t,e){var r=Math.floor(t=la(t/e));return t&&r===t?r-1:r},xt=function _isFromOrFromStart(t){var e=t.data;return"isFromStart"===e||"isStart"===e},kt={_start:0,endTime:V,totalDuration:V},Ot=function _parsePosition(t,e,i){var n,a,s,o=t.labels,u=t._recent||kt,h=t.duration()>=X?u.endTime(!1):t._dur;return r(e)&&(isNaN(e)||e in o)?(a=e.charAt(0),s="%"===e.substr(-1),n=e.indexOf("="),"<"===a||">"===a?(0<=n&&(e=e.replace(/=/,"")),("<"===a?u._start:u.endTime(0<=u._repeat))+(parseFloat(e.substr(1))||0)*(s?(n<0?u:i).totalDuration()/100:1)):n<0?(e in o||(o[e]=h),o[e]):(a=parseFloat(e.charAt(n-1)+e.substr(n+1)),s&&i&&(a=a/100*(K(i)?i[0]:i).totalDuration()),1<n?_parsePosition(t,e.substr(0,n-1),i)+a:h+a)):null==e?h:+e},Mt=function _clamp(t,e,r){return r<t?t:e<r?e:r},Ct=[].slice,Pt=function toArray(t,e,i){return l&&!e&&l.selector?l.selector(t):!r(t)||i||!n&&Lt()?K(t)?function _flatten(t,e,i){return void 0===i&&(i=[]),t.forEach(function(t){return r(t)&&!e||cb(t,1)?i.push.apply(i,Pt(t)):i.push(t)})||i}(t,i):cb(t)?Ct.call(t,0):t?[t]:[]:Ct.call((e||a).querySelectorAll(t),0)},St=function mapRange(e,t,r,i,n){var a=t-e,s=i-r;return Za(n,function(t){return r+((t-e)/a*s||0)})},At=function _callback(t,e,r){var i,n,a,s=t.vars,o=s[e],u=l,h=t._ctx;if(o)return i=s[e+"Params"],n=s.callbackScope||t,r&&pt.length&&oa(),h&&(l=h),a=i?o.apply(n,i):o.call(n),l=u,a},Dt=[],zt=255,Rt={aqua:[0,zt,zt],lime:[0,zt,0],silver:[192,192,192],black:[0,0,0],maroon:[128,0,0],teal:[0,128,128],blue:[0,0,zt],navy:[0,0,128],white:[zt,zt,zt],olive:[128,128,0],yellow:[zt,zt,0],orange:[zt,165,0],gray:[128,128,128],purple:[128,0,128],green:[0,128,0],red:[zt,0,0],pink:[zt,192,203],cyan:[0,zt,zt],transparent:[zt,zt,zt,0]},Et=function(){var t,e="(?:\\b(?:(?:rgb|rgba|hsl|hsla)\\(.+?\\))|\\B#(?:[0-9a-f]{3,4}){1,2}\\b";for(t in Rt)e+="|"+t+"\\b";return new RegExp(e+")","gi")}(),Ft=/hsl[a]?\(/,It=(O=Date.now,M=500,C=33,P=O(),A=P,z=D=1e3/240,g={time:0,frame:0,tick:function tick(){zl(!0)},deltaRatio:function deltaRatio(t){return b/(1e3/(t||60))},wake:function wake(){o&&(!n&&x()&&(h=n=window,a=h.document||{},ht.gsap=Fe,(h.gsapVersions||(h.gsapVersions=[])).push(Fe.version),R(i||h.GreenSockGlobals||!h.gsap&&h||{}),Dt.forEach(zb)),m="undefined"!=typeof requestAnimationFrame&&requestAnimationFrame,p&&g.sleep(),_=m||function(t){return setTimeout(t,z-1e3*g.time+1|0)},d=1,zl(2))},sleep:function sleep(){(m?cancelAnimationFrame:clearTimeout)(p),d=0,_=V},lagSmoothing:function lagSmoothing(t,e){M=t||1/0,C=Math.min(e||33,M)},fps:function fps(t){D=1e3/(t||240),z=1e3*g.time+D},add:function add(n,t,e){var a=t?function(t,e,r,i){n(t,e,r,i),g.remove(a)}:n;return g.remove(n),E[e?"unshift":"push"](a),Lt(),a},remove:function remove(t,e){~(e=E.indexOf(t))&&E.splice(e,1)&&e<=k&&k--},_listeners:E=[]}),Lt=function _wake(){return!d&&It.wake()},Bt={},Nt=/^[\d.\-M][\d.\-,\s]/,Ut=/["']/g,Yt=function _invertEase(e){return function(t){return 1-e(1-t)}},jt=function _parseEase(t,e){return t&&(s(t)?t:Bt[t]||Rb(t))||e};function zl(t){var e,r,i,n,a=O()-A,s=!0===t;if((M<a||a<0)&&(P+=a-C),(0<(e=(i=(A+=a)-P)-z)||s)&&(n=++g.frame,b=i-1e3*g.time,g.time=i/=1e3,z+=e+(D<=e?4:D-e),r=1),s||(p=_(zl)),r)for(k=0;k<E.length;k++)E[k](i,b,n,t)}function dn(t){return t<N?B*t*t:t<.7272727272727273?B*Math.pow(t-1.5/2.75,2)+.75:t<.9090909090909092?B*(t-=2.25/2.75)*t+.9375:B*Math.pow(t-2.625/2.75,2)+.984375}ja("Linear,Quad,Cubic,Quart,Quint,Strong",function(t,e){var r=e<5?e+1:e;Ub(t+",Power"+(r-1),e?function(t){return Math.pow(t,r)}:function(t){return t},function(t){return 1-Math.pow(1-t,r)},function(t){return t<.5?Math.pow(2*t,r)/2:1-Math.pow(2*(1-t),r)/2})}),Bt.Linear.easeNone=Bt.none=Bt.Linear.easeIn,Ub("Elastic",Wb("in"),Wb("out"),Wb()),B=7.5625,N=1/2.75,Ub("Bounce",function(t){return 1-dn(1-t)},dn),Ub("Expo",function(t){return Math.pow(2,10*(t-1))*t+t*t*t*t*t*t*(1-t)}),Ub("Circ",function(t){return-($(1-t*t)-1)}),Ub("Sine",function(t){return 1===t?1:1-H(t*Z)}),Ub("Back",Xb("in"),Xb("out"),Xb()),Bt.SteppedEase=Bt.steps=ht.SteppedEase={config:function config(t,e){void 0===t&&(t=1);var r=1/t,i=t+(e?0:1),n=e?1:0;return function(t){return((i*Mt(0,.99999999,t)|0)+n)*r}}},j.ease=Bt["quad.out"],ja("onComplete,onUpdate,onStart,onRepeat,onReverseComplete,onInterrupt",function(t){return Tt+=t+","+t+"Params,"});var Vt,Xt=function GSCache(t,e){this.id=W++,(t._gsap=this).target=t,this.harness=e,this.get=e?e.get:ia,this.set=e?e.getSetter:ue},qt=((Vt=Animation.prototype).delay=function delay(t){return t||0===t?(this.parent&&this.parent.smoothChildTiming&&this.startTime(this._start+t-this._delay),this._delay=t,this):this._delay},Vt.duration=function duration(t){return arguments.length?this.totalDuration(0<this._repeat?t+(t+this._rDelay)*this._repeat:t):this.totalDuration()&&this._dur},Vt.totalDuration=function totalDuration(t){return arguments.length?(this._dirty=0,Ua(this,this._repeat<0?t:(t-this._repeat*this._rDelay)/(this._repeat+1))):this._tDur},Vt.totalTime=function totalTime(t,e){if(Lt(),!arguments.length)return this._tTime;var r=this._dp;if(r&&r.smoothChildTiming&&this._ts){for(La(this,t),!r._dp||r.parent||Ma(r,this);r&&r.parent;)r.parent._time!==r._start+(0<=r._ts?r._tTime/r._ts:(r.totalDuration()-r._tTime)/-r._ts)&&r.totalTime(r._tTime,!0),r=r.parent;!this.parent&&this._dp.autoRemoveChildren&&(0<this._ts&&t<this._tDur||this._ts<0&&0<t||!this._tDur&&!t)&&Na(this._dp,this,this._start-this._delay)}return(this._tTime!==t||!this._dur&&!e||this._initted&&Math.abs(this._zTime)===q||!this._initted&&this._dur&&t||!t&&!this._initted&&(this.add||this._ptLookup))&&(this._ts||(this._pTime=t),qa(this,t,e)),this},Vt.time=function time(t,e){return arguments.length?this.totalTime(Math.min(this.totalDuration(),t+Ha(this))%(this._dur+this._rDelay)||(t?this._dur:0),e):this._time},Vt.totalProgress=function totalProgress(t,e){return arguments.length?this.totalTime(this.totalDuration()*t,e):this.totalDuration()?Math.min(1,this._tTime/this._tDur):0<=this.rawTime()&&this._initted?1:0},Vt.progress=function progress(t,e){return arguments.length?this.totalTime(this.duration()*(!this._yoyo||1&this.iteration()?t:1-t)+Ha(this),e):this.duration()?Math.min(1,this._time/this._dur):0<this.rawTime()?1:0},Vt.iteration=function iteration(t,e){var r=this.duration()+this._rDelay;return arguments.length?this.totalTime(this._time+(t-1)*r,e):this._repeat?wt(this._tTime,r)+1:1},Vt.timeScale=function timeScale(t,e){if(!arguments.length)return this._rts===-q?0:this._rts;if(this._rts===t)return this;var r=this.parent&&this._ts?Ja(this.parent._time,this):this._tTime;return this._rts=+t||0,this._ts=this._ps||t===-q?0:this._rts,this.totalTime(Mt(-Math.abs(this._delay),this.totalDuration(),r),!1!==e),Ka(this),function _recacheAncestors(t){for(var e=t.parent;e&&e.parent;)e._dirty=1,e.totalDuration(),e=e.parent;return t}(this)},Vt.paused=function paused(t){return arguments.length?(this._ps!==t&&((this._ps=t)?(this._pTime=this._tTime||Math.max(-this._delay,this.rawTime()),this._ts=this._act=0):(Lt(),this._ts=this._rts,this.totalTime(this.parent&&!this.parent.smoothChildTiming?this.rawTime():this._tTime||this._pTime,1===this.progress()&&Math.abs(this._zTime)!==q&&(this._tTime-=q)))),this):this._ps},Vt.startTime=function startTime(t){if(arguments.length){this._start=la(t);var e=this.parent||this._dp;return!e||!e._sort&&this.parent||Na(e,this,this._start-this._delay),this}return this._start},Vt.endTime=function endTime(t){return this._start+(w(t)?this.totalDuration():this.duration())/Math.abs(this._ts||1)},Vt.rawTime=function rawTime(t){var e=this.parent||this._dp;return e?t&&(!this._ts||this._repeat&&this._time&&this.totalProgress()<1)?this._tTime%(this._dur+this._rDelay):this._ts?Ja(e.rawTime(t),this):this._tTime:this._tTime},Vt.revert=function revert(t){void 0===t&&(t=ct);var e=I;return I=t,pa(this)&&(this.timeline&&this.timeline.revert(t),this.totalTime(-.01,t.suppressEvents)),"nested"!==this.data&&!1!==t.kill&&this.kill(),I=e,this},Vt.globalTime=function globalTime(t){for(var e=this,r=arguments.length?t:e.rawTime();e;)r=e._start+r/(Math.abs(e._ts)||1),e=e._dp;return!this.parent&&this._sat?this._sat.globalTime(t):r},Vt.repeat=function repeat(t){return arguments.length?(this._repeat=t===1/0?-2:t,Va(this)):-2===this._repeat?1/0:this._repeat},Vt.repeatDelay=function repeatDelay(t){if(arguments.length){var e=this._time;return this._rDelay=t,Va(this),e?this.time(e):this}return this._rDelay},Vt.yoyo=function yoyo(t){return arguments.length?(this._yoyo=t,this):this._yoyo},Vt.seek=function seek(t,e){return this.totalTime(Ot(this,t),w(e))},Vt.restart=function restart(t,e){return this.play().totalTime(t?-this._delay:0,w(e)),this._dur||(this._zTime=-q),this},Vt.play=function play(t,e){return null!=t&&this.seek(t,e),this.reversed(!1).paused(!1)},Vt.reverse=function reverse(t,e){return null!=t&&this.seek(t||this.totalDuration(),e),this.reversed(!0).paused(!1)},Vt.pause=function pause(t,e){return null!=t&&this.seek(t,e),this.paused(!0)},Vt.resume=function resume(){return this.paused(!1)},Vt.reversed=function reversed(t){return arguments.length?(!!t!==this.reversed()&&this.timeScale(-this._rts||(t?-q:0)),this):this._rts<0},Vt.invalidate=function invalidate(){return this._initted=this._act=0,this._zTime=-q,this},Vt.isActive=function isActive(){var t,e=this.parent||this._dp,r=this._start;return!(e&&!(this._ts&&this._initted&&e.isActive()&&(t=e.rawTime(!0))>=r&&t<this.endTime(!0)-q))},Vt.eventCallback=function eventCallback(t,e,r){var i=this.vars;return 1<arguments.length?(e?(i[t]=e,r&&(i[t+"Params"]=r),"onUpdate"===t&&(this._onUpdate=e)):delete i[t],this):i[t]},Vt.then=function then(t){var i=this,n=i._prom;return new Promise(function(e){function Ao(){var t=i.then;i.then=null,n&&n(),s(r)&&(r=r(i))&&(r.then||r===i)&&(i.then=t),e(r),i.then=t}var r=s(t)?t:sa;i._initted&&1===i.totalProgress()&&0<=i._ts||!i._tTime&&i._ts<0?Ao():i._prom=Ao})},Vt.kill=function kill(){wb(this)},Animation);function Animation(t){this.vars=t,this._delay=+t.delay||0,(this._repeat=t.repeat===1/0?-2:t.repeat||0)&&(this._rDelay=t.repeatDelay||0,this._yoyo=!!t.yoyo||!!t.yoyoEase),this._ts=1,Ua(this,+t.duration,1,1),this.data=t.data,l&&(this._ctx=l).data.push(this),d||It.wake()}ta(qt.prototype,{_time:0,_start:0,_end:0,_tTime:0,_tDur:0,_dirty:0,_repeat:0,_yoyo:!1,parent:null,_initted:!1,_rDelay:0,_ts:1,_dp:0,ratio:0,_zTime:-q,_prom:0,_ps:!1,_rts:1});var Gt=function(i){function Timeline(t,e){var r;return void 0===t&&(t={}),(r=i.call(this,t)||this).labels={},r.smoothChildTiming=!!t.smoothChildTiming,r.autoRemoveChildren=!!t.autoRemoveChildren,r._sort=w(t.sortChildren),L&&Na(t.parent||L,_assertThisInitialized(r),e),t.reversed&&r.reverse(),t.paused&&r.paused(!0),t.scrollTrigger&&Oa(_assertThisInitialized(r),t.scrollTrigger),r}_inheritsLoose(Timeline,i);var e=Timeline.prototype;return e.to=function to(t,e,r){return Ya(0,arguments,this),this},e.from=function from(t,e,r){return Ya(1,arguments,this),this},e.fromTo=function fromTo(t,e,r,i){return Ya(2,arguments,this),this},e.set=function set(t,e,r){return e.duration=0,e.parent=this,ya(e).repeatDelay||(e.repeat=0),e.immediateRender=!!e.immediateRender,new te(t,e,Ot(this,r),1),this},e.call=function call(t,e,r){return Na(this,te.delayedCall(0,t,e),r)},e.staggerTo=function staggerTo(t,e,r,i,n,a,s){return r.duration=e,r.stagger=r.stagger||i,r.onComplete=a,r.onCompleteParams=s,r.parent=this,new te(t,r,Ot(this,n)),this},e.staggerFrom=function staggerFrom(t,e,r,i,n,a,s){return r.runBackwards=1,ya(r).immediateRender=w(r.immediateRender),this.staggerTo(t,e,r,i,n,a,s)},e.staggerFromTo=function staggerFromTo(t,e,r,i,n,a,s,o){return i.startAt=r,ya(i).immediateRender=w(i.immediateRender),this.staggerTo(t,e,i,n,a,s,o)},e.render=function render(t,e,r){var i,n,a,s,o,u,h,l,f,c,d,p,_=this._time,m=this._dirty?this.totalDuration():this._tDur,g=this._dur,v=t<=0?0:la(t),y=this._zTime<0!=t<0&&(this._initted||!g);if(this!==L&&m<v&&0<=t&&(v=m),v!==this._tTime||r||y){if(_!==this._time&&g&&(v+=this._time-_,t+=this._time-_),i=v,f=this._start,u=!(l=this._ts),y&&(g||(_=this._zTime),!t&&e||(this._zTime=t)),this._repeat){if(d=this._yoyo,o=g+this._rDelay,this._repeat<-1&&t<0)return this.totalTime(100*o+t,e,r);if(i=la(v%o),v===m?(s=this._repeat,i=g):((s=~~(c=la(v/o)))&&s===c&&(i=g,s--),g<i&&(i=g)),c=wt(this._tTime,o),!_&&this._tTime&&c!==s&&this._tTime-c*o-this._dur<=0&&(c=s),d&&1&s&&(i=g-i,p=1),s!==c&&!this._lock){var T=d&&1&c,b=T===(d&&1&s);if(s<c&&(T=!T),_=T?0:v%g?g:v,this._lock=1,this.render(_||(p?0:la(s*o)),e,!g)._lock=0,this._tTime=v,!e&&this.parent&&At(this,"onRepeat"),this.vars.repeatRefresh&&!p&&(this.invalidate()._lock=1,c=s),_&&_!==this._time||u!=!this._ts||this.vars.onRepeat&&!this.parent&&!this._act)return this;if(g=this._dur,m=this._tDur,b&&(this._lock=2,_=T?g:-1e-4,this.render(_,!0),this.vars.repeatRefresh&&!p&&this.invalidate()),this._lock=0,!this._ts&&!u)return this}}if(this._hasPause&&!this._forcing&&this._lock<2&&(h=function _findNextPauseTween(t,e,r){var i;if(e<r)for(i=t._first;i&&i._start<=r;){if("isPause"===i.data&&i._start>e)return i;i=i._next}else for(i=t._last;i&&i._start>=r;){if("isPause"===i.data&&i._start<e)return i;i=i._prev}}(this,la(_),la(i)))&&(v-=i-(i=h._start)),this._tTime=v,this._time=i,this._act=!!l,this._initted||(this._onUpdate=this.vars.onUpdate,this._initted=1,this._zTime=t,_=0),!_&&v&&g&&!e&&!c&&(At(this,"onStart"),this._tTime!==v))return this;if(_<=i&&0<=t)for(n=this._first;n;){if(a=n._next,(n._act||i>=n._start)&&n._ts&&h!==n){if(n.parent!==this)return this.render(t,e,r);if(n.render(0<n._ts?(i-n._start)*n._ts:(n._dirty?n.totalDuration():n._tDur)+(i-n._start)*n._ts,e,r),i!==this._time||!this._ts&&!u){h=0,a&&(v+=this._zTime=-q);break}}n=a}else{n=this._last;for(var w=t<0?t:i;n;){if(a=n._prev,(n._act||w<=n._end)&&n._ts&&h!==n){if(n.parent!==this)return this.render(t,e,r);if(n.render(0<n._ts?(w-n._start)*n._ts:(n._dirty?n.totalDuration():n._tDur)+(w-n._start)*n._ts,e,r||I&&pa(n)),i!==this._time||!this._ts&&!u){h=0,a&&(v+=this._zTime=w?-q:q);break}}n=a}}if(h&&!e&&(this.pause(),h.render(_<=i?0:-q)._zTime=_<=i?1:-1,this._ts))return this._start=f,Ka(this),this.render(t,e,r);this._onUpdate&&!e&&At(this,"onUpdate",!0),(v===m&&this._tTime>=this.totalDuration()||!v&&_)&&(f!==this._start&&Math.abs(l)===Math.abs(this._ts)||this._lock||(!t&&g||!(v===m&&0<this._ts||!v&&this._ts<0)||Ca(this,1),e||t<0&&!_||!v&&!_&&m||(At(this,v===m&&0<=t?"onComplete":"onReverseComplete",!0),!this._prom||v<m&&0<this.timeScale()||this._prom())))}return this},e.add=function add(e,i){var n=this;if(t(i)||(i=Ot(this,i,e)),!(e instanceof qt)){if(K(e))return e.forEach(function(t){return n.add(t,i)}),this;if(r(e))return this.addLabel(e,i);if(!s(e))return this;e=te.delayedCall(0,e)}return this!==e?Na(this,e,i):this},e.getChildren=function getChildren(t,e,r,i){void 0===t&&(t=!0),void 0===e&&(e=!0),void 0===r&&(r=!0),void 0===i&&(i=-X);for(var n=[],a=this._first;a;)a._start>=i&&(a instanceof te?e&&n.push(a):(r&&n.push(a),t&&n.push.apply(n,a.getChildren(!0,e,r)))),a=a._next;return n},e.getById=function getById(t){for(var e=this.getChildren(1,1,1),r=e.length;r--;)if(e[r].vars.id===t)return e[r]},e.remove=function remove(t){return r(t)?this.removeLabel(t):s(t)?this.killTweensOf(t):(t.parent===this&&Ba(this,t),t===this._recent&&(this._recent=this._last),Da(this))},e.totalTime=function totalTime(t,e){return arguments.length?(this._forcing=1,!this._dp&&this._ts&&(this._start=la(It.time-(0<this._ts?t/this._ts:(this.totalDuration()-t)/-this._ts))),i.prototype.totalTime.call(this,t,e),this._forcing=0,this):this._tTime},e.addLabel=function addLabel(t,e){return this.labels[t]=Ot(this,e),this},e.removeLabel=function removeLabel(t){return delete this.labels[t],this},e.addPause=function addPause(t,e,r){var i=te.delayedCall(0,e||V,r);return i.data="isPause",this._hasPause=1,Na(this,i,Ot(this,t))},e.removePause=function removePause(t){var e=this._first;for(t=Ot(this,t);e;)e._start===t&&"isPause"===e.data&&Ca(e),e=e._next},e.killTweensOf=function killTweensOf(t,e,r){for(var i=this.getTweensOf(t,r),n=i.length;n--;)Zt!==i[n]&&i[n].kill(t,e);return this},e.getTweensOf=function getTweensOf(e,r){for(var i,n=[],a=Pt(e),s=this._first,o=t(r);s;)s instanceof te?na(s._targets,a)&&(o?(!Zt||s._initted&&s._ts)&&s.globalTime(0)<=r&&s.globalTime(s.totalDuration())>r:!r||s.isActive())&&n.push(s):(i=s.getTweensOf(a,r)).length&&n.push.apply(n,i),s=s._next;return n},e.tweenTo=function tweenTo(t,e){e=e||{};var r,i=this,n=Ot(i,t),a=e.startAt,s=e.onStart,o=e.onStartParams,u=e.immediateRender,h=te.to(i,ta({ease:e.ease||"none",lazy:!1,immediateRender:!1,time:n,overwrite:"auto",duration:e.duration||Math.abs((n-(a&&"time"in a?a.time:i._time))/i.timeScale())||q,onStart:function onStart(){if(i.pause(),!r){var t=e.duration||Math.abs((n-(a&&"time"in a?a.time:i._time))/i.timeScale());h._dur!==t&&Ua(h,t,0,1).render(h._time,!0,!0),r=1}s&&s.apply(h,o||[])}},e));return u?h.render(0):h},e.tweenFromTo=function tweenFromTo(t,e,r){return this.tweenTo(e,ta({startAt:{time:Ot(this,t)}},r))},e.recent=function recent(){return this._recent},e.nextLabel=function nextLabel(t){return void 0===t&&(t=this._time),ub(this,Ot(this,t))},e.previousLabel=function previousLabel(t){return void 0===t&&(t=this._time),ub(this,Ot(this,t),1)},e.currentLabel=function currentLabel(t){return arguments.length?this.seek(t,!0):this.previousLabel(this._time+q)},e.shiftChildren=function shiftChildren(t,e,r){void 0===r&&(r=0);var i,n=this._first,a=this.labels;for(t=la(t);n;)n._start>=r&&(n._start+=t,n._end+=t),n=n._next;if(e)for(i in a)a[i]>=r&&(a[i]+=t);return Da(this)},e.invalidate=function invalidate(t){var e=this._first;for(this._lock=0;e;)e.invalidate(t),e=e._next;return i.prototype.invalidate.call(this,t)},e.clear=function clear(t){void 0===t&&(t=!0);for(var e,r=this._first;r;)e=r._next,this.remove(r),r=e;return this._dp&&(this._time=this._tTime=this._pTime=0),t&&(this.labels={}),Da(this)},e.totalDuration=function totalDuration(t){var e,r,i,n=0,a=this,s=a._last,o=X;if(arguments.length)return a.timeScale((a._repeat<0?a.duration():a.totalDuration())/(a.reversed()?-t:t));if(a._dirty){for(i=a.parent;s;)e=s._prev,s._dirty&&s.totalDuration(),o<(r=s._start)&&a._sort&&s._ts&&!a._lock?(a._lock=1,Na(a,s,r-s._delay,1)._lock=0):o=r,r<0&&s._ts&&(n-=r,(!i&&!a._dp||i&&i.smoothChildTiming)&&(a._start+=la(r/a._ts),a._time-=r,a._tTime-=r),a.shiftChildren(-r,!1,-Infinity),o=0),s._end>n&&s._ts&&(n=s._end),s=e;Ua(a,a===L&&a._time>n?a._time:n,1,1),a._dirty=0}return a._tDur},Timeline.updateRoot=function updateRoot(t){if(L._ts&&(qa(L,Ja(t,L)),f=It.frame),It.frame>=vt){vt+=Y.autoSleep||120;var e=L._first;if((!e||!e._ts)&&Y.autoSleep&&It._listeners.length<2){for(;e&&!e._ts;)e=e._next;e||It.sleep()}}},Timeline}(qt);ta(Gt.prototype,{_lock:0,_hasPause:0,_forcing:0});function cc(t,e,i,n,a,o){var u,h,l,f;if(mt[t]&&!1!==(u=new mt[t]).init(a,u.rawVars?e[t]:function _processVars(t,e,i,n,a){if(s(t)&&(t=Qt(t,a,e,i,n)),!v(t)||t.style&&t.nodeType||K(t)||J(t))return r(t)?Qt(t,a,e,i,n):t;var o,u={};for(o in t)u[o]=Qt(t[o],a,e,i,n);return u}(e[t],n,a,o,i),i,n,o)&&(i._pt=h=new we(i._pt,a,t,0,1,u.render,u,0,u.priority),i!==c))for(l=i._ptLookup[i._targets.indexOf(a)],f=u._props.length;f--;)l[u._props[f]]=h;return u}function ic(t,r,e,i){var n,a,s=r.ease||i||"power1.inOut";if(K(r))a=e[t]||(e[t]=[]),r.forEach(function(t,e){return a.push({t:e/(r.length-1)*100,v:t,e:s})});else for(n in r)a=e[n]||(e[n]=[]),"ease"===n||a.push({t:parseFloat(t),v:r[n],e:s})}var Zt,Wt,$t=function _addPropTween(t,e,i,n,a,o,u,h,l,f){s(n)&&(n=n(a||0,t,o));var c,d=t[e],p="get"!==i?i:s(d)?l?t[e.indexOf("set")||!s(t["get"+e.substr(3)])?e:"get"+e.substr(3)](l):t[e]():d,_=s(d)?l?se:ae:ie;if(r(n)&&(~n.indexOf("random(")&&(n=rb(n)),"="===n.charAt(1)&&(!(c=ma(p,n)+(_a(p)||0))&&0!==c||(n=c))),!f||p!==n||Wt)return isNaN(p*n)||""===n?(d||e in t||S(e,n),function _addComplexStringPropTween(t,e,r,i,n,a,s){var o,u,h,l,f,c,d,p,_=new we(this._pt,t,e,0,1,pe,null,n),m=0,g=0;for(_.b=r,_.e=i,r+="",(d=~(i+="").indexOf("random("))&&(i=rb(i)),a&&(a(p=[r,i],t,e),r=p[0],i=p[1]),u=r.match(at)||[];o=at.exec(i);)l=o[0],f=i.substring(m,o.index),h?h=(h+1)%5:"rgba("===f.substr(-5)&&(h=1),l!==u[g++]&&(c=parseFloat(u[g-1])||0,_._pt={_next:_._pt,p:f||1===g?f:",",s:c,c:"="===l.charAt(1)?ma(c,l)-c:parseFloat(l)-c,m:h&&h<4?Math.round:0},m=at.lastIndex);return _.c=m<i.length?i.substring(m,i.length):"",_.fp=s,(st.test(i)||d)&&(_.e=0),this._pt=_}.call(this,t,e,p,n,_,h||Y.stringFilter,l)):(c=new we(this._pt,t,e,+p||0,n-(p||0),"boolean"==typeof d?de:fe,0,_),l&&(c.fp=l),u&&c.modifier(u,this,t),this._pt=c)},Ht=function _initTween(t,e,r){var i,n,a,s,o,u,h,l,f,c,d,p,_,m=t.vars,g=m.ease,v=m.startAt,y=m.immediateRender,T=m.lazy,b=m.onUpdate,x=m.runBackwards,k=m.yoyoEase,O=m.keyframes,M=m.autoRevert,C=t._dur,P=t._startAt,S=t._targets,A=t.parent,D=A&&"nested"===A.data?A.vars.targets:S,z="auto"===t._overwrite&&!F,R=t.timeline,E=m.easeReverse||k;if(!R||O&&g||(g="none"),t._ease=jt(g,j.ease),t._rEase=E&&(jt(E)||t._ease),t._from=!R&&!!m.runBackwards,t._from&&(t.ratio=1),!R||O&&!m.stagger){if(p=(l=S[0]?ha(S[0]).harness:0)&&m[l.prop],i=xa(m,dt),P&&(P._zTime<0&&P.progress(1),e<0&&x&&y&&!M?P.render(-1,!0):P.revert(x&&C?ft:lt),P._lazy=0),v){if(Ca(t._startAt=te.set(S,ta({data:"isStart",overwrite:!1,parent:A,immediateRender:!0,lazy:!P&&w(T),startAt:null,delay:0,onUpdate:b&&function(){return At(t,"onUpdate")},stagger:0},v))),t._startAt._dp=0,t._startAt._sat=t,e<0&&(I||!y&&!M)&&t._startAt.revert(ft),y&&C&&e<=0&&r<=0)return void(e&&(t._zTime=e))}else if(x&&C&&!P)if(e&&(y=!1),a=ta({overwrite:!1,data:"isFromStart",lazy:y&&!P&&w(T),immediateRender:y,stagger:0,parent:A},i),p&&(a[l.prop]=p),Ca(t._startAt=te.set(S,a)),t._startAt._dp=0,t._startAt._sat=t,e<0&&(I?t._startAt.revert(ft):t._startAt.render(-1,!0)),t._zTime=e,y){if(!e)return}else _initTween(t._startAt,q,q);for(t._pt=t._ptCache=0,T=C&&w(T)||T&&!C,n=0;n<S.length;n++){if(h=(o=S[n])._gsap||ga(S)[n]._gsap,t._ptLookup[n]=c={},_t[h.id]&&pt.length&&oa(),d=D===S?n:D.indexOf(o),l&&!1!==(f=new l).init(o,p||i,t,d,D)&&(t._pt=s=new we(t._pt,o,f.name,0,1,f.render,f,0,f.priority),f._props.forEach(function(t){c[t]=s}),f.priority&&(u=1)),!l||p)for(a in i)mt[a]&&(f=cc(a,i,t,d,o,D))?f.priority&&(u=1):c[a]=s=$t.call(t,o,a,"get",i[a],d,D,0,m.stringFilter);t._op&&t._op[n]&&t.kill(o,t._op[n]),z&&t._pt&&(Zt=t,L.killTweensOf(o,c,t.globalTime(e)),_=!t.parent,Zt=0),t._pt&&T&&(_t[h.id]=1)}u&&be(t),t._onInit&&t._onInit(t)}t._onUpdate=b,t._initted=(!t._op||t._pt)&&!_,O&&e<=0&&R.render(X,!0,!0)},Qt=function _parseFuncOrString(t,e,i,n,a){return s(t)?t.call(e,i,n,a):r(t)&&~t.indexOf("random(")?rb(t):t},Jt=Tt+"repeat,repeatDelay,yoyo,repeatRefresh,yoyoEase,easeReverse,autoRevert",Kt={};ja(Jt+",id,stagger,delay,duration,paused,scrollTrigger",function(t){return Kt[t]=1});var te=function(E){function Tween(e,r,i,n){var a;"number"==typeof r&&(i.duration=r,r=i,i=null);var s,o,u,h,l,f,c,d,p=(a=E.call(this,n?r:ya(r))||this).vars,_=p.duration,m=p.delay,g=p.immediateRender,b=p.stagger,x=p.overwrite,k=p.keyframes,O=p.defaults,M=p.scrollTrigger,C=r.parent||L,P=(K(e)||J(e)?t(e[0]):"length"in r)?[e]:Pt(e);if(a._targets=P.length?ga(P):T("GSAP target "+e+" not found. https://gsap.com",!Y.nullTargetWarn)||[],a._ptLookup=[],a._overwrite=x,k||b||y(_)||y(m)){var S=(r=a.vars).easeReverse||r.yoyoEase;if((s=a.timeline=new Gt({data:"nested",defaults:O||{},targets:C&&"nested"===C.data?C.vars.targets:P})).kill(),s.parent=s._dp=_assertThisInitialized(a),s._start=0,b||y(_)||y(m)){if(h=P.length,c=b&&hb(b),v(b))for(l in b)~Jt.indexOf(l)&&((d=d||{})[l]=b[l]);for(o=0;o<h;o++)(u=xa(r,Kt)).stagger=0,S&&(u.easeReverse=S),d&&bt(u,d),f=P[o],u.duration=+Qt(_,_assertThisInitialized(a),o,f,P),u.delay=(+Qt(m,_assertThisInitialized(a),o,f,P)||0)-a._delay,!b&&1===h&&u.delay&&(a._delay=m=u.delay,a._start+=m,u.delay=0),s.to(f,u,c?c(o,f,P):0),s._ease=Bt.none;s.duration()?_=m=0:a.timeline=0}else if(k){ya(ta(s.vars.defaults,{ease:"none"})),s._ease=jt(k.ease||r.ease||"none");var A,D,z,R=0;if(K(k))k.forEach(function(t){return s.to(P,t,">")}),s.duration();else{for(l in u={},k)"ease"===l||"easeEach"===l||ic(l,k[l],u,k.easeEach);for(l in u)for(A=u[l].sort(function(t,e){return t.t-e.t}),o=R=0;o<A.length;o++)(z={ease:(D=A[o]).e,duration:(D.t-(o?A[o-1].t:0))/100*_})[l]=D.v,s.to(P,z,R),R+=z.duration;s.duration()<_&&s.to({},{duration:_-s.duration()})}}_||a.duration(_=s.duration())}else a.timeline=0;return!0!==x||F||(Zt=_assertThisInitialized(a),L.killTweensOf(P),Zt=0),Na(C,_assertThisInitialized(a),i),r.reversed&&a.reverse(),r.paused&&a.paused(!0),(g||!_&&!k&&a._start===la(C._time)&&w(g)&&function _hasNoPausedAncestors(t){return!t||t._ts&&_hasNoPausedAncestors(t.parent)}(_assertThisInitialized(a))&&"nested"!==C.data)&&(a._tTime=-q,a.render(Math.max(0,-m)||0)),M&&Oa(_assertThisInitialized(a),M),a}_inheritsLoose(Tween,E);var e=Tween.prototype;return e.render=function render(t,e,r){var i,n,a,s,o,u,h,l,f=this._time,c=this._tDur,d=this._dur,p=t<0,_=c-q<t&&!p?c:t<q?0:t;if(d){if(_!==this._tTime||!t||r||!this._initted&&this._tTime||this._startAt&&this._zTime<0!=p||this._lazy){if(i=_,l=this.timeline,this._repeat){if(s=d+this._rDelay,this._repeat<-1&&p)return this.totalTime(100*s+t,e,r);if(i=la(_%s),_===c?(a=this._repeat,i=d):(a=~~(o=la(_/s)))&&a===o?(i=d,a--):d<i&&(i=d),(u=this._yoyo&&1&a)&&(i=d-i),o=wt(this._tTime,s),i===f&&!r&&this._initted&&a===o)return this._tTime=_,this;a!==o&&this.vars.repeatRefresh&&!u&&!this._lock&&i!==s&&this._initted&&(this._lock=r=1,this.render(la(s*a),!0).invalidate()._lock=0)}if(!this._initted){if(Pa(this,p?t:i,r,e,_))return this._tTime=0,this;if(!(f===this._time||r&&this.vars.repeatRefresh&&a!==o))return this;if(d!==this._dur)return this.render(t,e,r)}if(this._rEase){var m=i<f;if(m!==this._inv){var g=m?f:d-f;this._inv=m,this._from&&(this.ratio=1-this.ratio),this._invRatio=this.ratio,this._invTime=f,this._invRecip=g?(m?-1:1)/g:0,this._invScale=m?-this.ratio:1-this.ratio,this._invEase=m?this._rEase:this._ease}this.ratio=h=this._invRatio+this._invScale*this._invEase((i-this._invTime)*this._invRecip)}else this.ratio=h=this._ease(i/d);if(this._from&&(this.ratio=h=1-h),this._tTime=_,this._time=i,!this._act&&this._ts&&(this._act=1,this._lazy=0),!f&&_&&!e&&!o&&(At(this,"onStart"),this._tTime!==_))return this;for(n=this._pt;n;)n.r(h,n.d),n=n._next;l&&l.render(t<0?t:l._dur*l._ease(i/this._dur),e,r)||this._startAt&&(this._zTime=t),this._onUpdate&&!e&&(p&&Fa(this,t,0,r),At(this,"onUpdate")),this._repeat&&a!==o&&this.vars.onRepeat&&!e&&this.parent&&At(this,"onRepeat"),_!==this._tDur&&_||this._tTime!==_||(p&&!this._onUpdate&&Fa(this,t,0,!0),!t&&d||!(_===this._tDur&&0<this._ts||!_&&this._ts<0)||Ca(this,1),e||p&&!f||!(_||f||u)||(At(this,_===c?"onComplete":"onReverseComplete",!0),!this._prom||_<c&&0<this.timeScale()||this._prom()))}}else!function _renderZeroDurationTween(t,e,r,i){var n,a,s,o=t.ratio,u=e<0||!e&&(!t._start&&function _parentPlayheadIsBeforeStart(t){var e=t.parent;return e&&e._ts&&e._initted&&!e._lock&&(e.rawTime()<0||_parentPlayheadIsBeforeStart(e))}(t)&&(t._initted||!xt(t))||(t._ts<0||t._dp._ts<0)&&!xt(t))?0:1,h=t._rDelay,l=0;if(h&&t._repeat&&(l=Mt(0,t._tDur,e),a=wt(l,h),t._yoyo&&1&a&&(u=1-u),a!==wt(t._tTime,h)&&(o=1-u,t.vars.repeatRefresh&&t._initted&&t.invalidate())),u!==o||I||i||t._zTime===q||!e&&t._zTime){if(!t._initted&&Pa(t,e,i,r,l))return;for(s=t._zTime,t._zTime=e||(r?q:0),r=r||e&&!s,t.ratio=u,t._from&&(u=1-u),t._time=0,t._tTime=l,n=t._pt;n;)n.r(u,n.d),n=n._next;e<0&&Fa(t,e,0,!0),t._onUpdate&&!r&&At(t,"onUpdate"),l&&t._repeat&&!r&&t.parent&&At(t,"onRepeat"),(e>=t._tDur||e<0)&&t.ratio===u&&(u&&Ca(t,1),r||I||(At(t,u?"onComplete":"onReverseComplete",!0),t._prom&&t._prom()))}else t._zTime||(t._zTime=e)}(this,t,e,r);return this},e.targets=function targets(){return this._targets},e.invalidate=function invalidate(t){return t&&this.vars.runBackwards||(this._startAt=0),this._pt=this._op=this._onUpdate=this._lazy=this.ratio=0,this._ptLookup=[],this.timeline&&this.timeline.invalidate(t),E.prototype.invalidate.call(this,t)},e.resetTo=function resetTo(t,e,r,i,n){d||It.wake(),this._ts||this.play();var a,s=Math.min(this._dur,(this._dp._time-this._start)*this._ts);return this._initted||Ht(this,s),a=this._ease(s/this._dur),function _updatePropTweens(t,e,r,i,n,a,s,o){var u,h,l,f,c=(t._pt&&t._ptCache||(t._ptCache={}))[e];if(!c)for(c=t._ptCache[e]=[],l=t._ptLookup,f=t._targets.length;f--;){if((u=l[f][e])&&u.d&&u.d._pt)for(u=u.d._pt;u&&u.p!==e&&u.fp!==e;)u=u._next;if(!u)return Wt=1,t.vars[e]="+=0",Ht(t,s),Wt=0,o?T(e+" not eligible for reset. Try splitting into individual properties"):1;c.push(u)}for(f=c.length;f--;)(u=(h=c[f])._pt||h).s=!i&&0!==i||n?u.s+(i||0)+a*u.c:i,u.c=r-u.s,h.e&&(h.e=ka(r)+_a(h.e)),h.b&&(h.b=u.s+_a(h.b))}(this,t,e,r,i,a,s,n)?this.resetTo(t,e,r,i,1):(La(this,0),this.parent||Aa(this._dp,this,"_first","_last",this._dp._sort?"_start":0),this.render(0))},e.kill=function kill(t,e){if(void 0===e&&(e="all"),!(t||e&&"all"!==e))return this._lazy=this._pt=0,this.parent?wb(this):this.scrollTrigger&&this.scrollTrigger.kill(!!I),this;if(this.timeline){var i=this.timeline.totalDuration();return this.timeline.killTweensOf(t,e,Zt&&!0!==Zt.vars.overwrite)._first||wb(this),this.parent&&i!==this.timeline.totalDuration()&&Ua(this,this._dur*this.timeline._tDur/i,0,1),this}var n,a,s,o,u,h,l,f=this._targets,c=t?Pt(t):f,d=this._ptLookup,p=this._pt;if((!e||"all"===e)&&function _arraysMatch(t,e){for(var r=t.length,i=r===e.length;i&&r--&&t[r]===e[r];);return r<0}(f,c))return"all"===e&&(this._pt=0),wb(this);for(n=this._op=this._op||[],"all"!==e&&(r(e)&&(u={},ja(e,function(t){return u[t]=1}),e=u),e=function _addAliasesToVars(t,e){var r,i,n,a,s=t[0]?ha(t[0]).harness:0,o=s&&s.aliases;if(!o)return e;for(i in r=bt({},e),o)if(i in r)for(n=(a=o[i].split(",")).length;n--;)r[a[n]]=r[i];return r}(f,e)),l=f.length;l--;)if(~c.indexOf(f[l]))for(u in a=d[l],"all"===e?(n[l]=e,o=a,s={}):(s=n[l]=n[l]||{},o=e),o)(h=a&&a[u])&&("kill"in h.d&&!0!==h.d.kill(u)||Ba(this,h,"_pt"),delete a[u]),"all"!==s&&(s[u]=1);return this._initted&&!this._pt&&p&&wb(this),this},Tween.to=function to(t,e,r){return new Tween(t,e,r)},Tween.from=function from(t,e){return Ya(1,arguments)},Tween.delayedCall=function delayedCall(t,e,r,i){return new Tween(e,0,{immediateRender:!1,lazy:!1,overwrite:!1,delay:t,onComplete:e,onReverseComplete:e,onCompleteParams:r,onReverseCompleteParams:r,callbackScope:i})},Tween.fromTo=function fromTo(t,e,r){return Ya(2,arguments)},Tween.set=function set(t,e){return e.duration=0,e.repeatDelay||(e.repeat=0),new Tween(t,e)},Tween.killTweensOf=function killTweensOf(t,e,r){return L.killTweensOf(t,e,r)},Tween}(qt);ta(te.prototype,{_targets:[],_lazy:0,_startAt:0,_op:0,_onInit:0}),ja("staggerTo,staggerFrom,staggerFromTo",function(r){te[r]=function(){var t=new Gt,e=Ct.call(arguments,0);return e.splice("staggerFromTo"===r?5:4,0,0),t[r].apply(t,e)}});function qc(t,e,r){return t.setAttribute(e,r)}function yc(t,e,r,i){i.mSet(t,e,i.m.call(i.tween,r,i.mt),i)}var ie=function _setterPlain(t,e,r){return t[e]=r},ae=function _setterFunc(t,e,r){return t[e](r)},se=function _setterFuncWithParam(t,e,r,i){return t[e](i.fp,r)},ue=function _getSetter(t,e){return s(t[e])?ae:u(t[e])&&t.setAttribute?qc:ie},fe=function _renderPlain(t,e){return e.set(e.t,e.p,Math.round(1e6*(e.s+e.c*t))/1e6,e)},de=function _renderBoolean(t,e){return e.set(e.t,e.p,!!(e.s+e.c*t),e)},pe=function _renderComplexString(t,e){var r=e._pt,i="";if(!t&&e.b)i=e.b;else if(1===t&&e.e)i=e.e;else{for(;r;)i=r.p+(r.m?r.m(r.s+r.c*t):Math.round(1e4*(r.s+r.c*t))/1e4)+i,r=r._next;i+=e.c}e.set(e.t,e.p,i,e)},_e=function _renderPropTweens(t,e){for(var r=e._pt;r;)r.r(t,r.d),r=r._next},ve=function _addPluginModifier(t,e,r,i){for(var n,a=this._pt;a;)n=a._next,a.p===i&&a.modifier(t,e,r),a=n},Te=function _killPropTweensOf(t){for(var e,r,i=this._pt;i;)r=i._next,i.p===t&&!i.op||i.op===t?Ba(this,i,"_pt"):i.dep||(e=1),i=r;return!e},be=function _sortPropTweensByPriority(t){for(var e,r,i,n,a=t._pt;a;){for(e=a._next,r=i;r&&r.pr>a.pr;)r=r._next;(a._prev=r?r._prev:n)?a._prev._next=a:i=a,(a._next=r)?r._prev=a:n=a,a=e}t._pt=i},we=(PropTween.prototype.modifier=function modifier(t,e,r){this.mSet=this.mSet||this.set,this.set=yc,this.m=t,this.mt=r,this.tween=e},PropTween);function PropTween(t,e,r,i,n,a,s,o,u){this.t=e,this.s=i,this.c=n,this.p=r,this.r=a||fe,this.d=s||this,this.set=o||ie,this.pr=u||0,(this._next=t)&&(t._prev=this)}ja(Tt+"parent,duration,ease,delay,overwrite,runBackwards,startAt,yoyo,immediateRender,repeat,repeatDelay,data,paused,reversed,lazy,callbackScope,stringFilter,id,yoyoEase,stagger,inherit,repeatRefresh,keyframes,autoRevert,scrollTrigger,easeReverse",function(t){return dt[t]=1}),ht.TweenMax=ht.TweenLite=te,ht.TimelineLite=ht.TimelineMax=Gt,L=new Gt({sortChildren:!1,defaults:j,autoRemoveChildren:!0,id:"root",smoothChildTiming:!0}),Y.stringFilter=Ib;function Gc(t){return(Oe[t]||Me).map(function(t){return t()})}function Hc(){var t=Date.now(),o=[];2<t-Ce&&(Gc("matchMediaInit"),ke.forEach(function(t){var e,r,i,n,a=t.queries,s=t.conditions;for(r in a)(e=h.matchMedia(a[r]).matches)&&(i=1),e!==s[r]&&(s[r]=e,n=1);n&&(t.revert(),i&&o.push(t))}),Gc("matchMediaRevert"),o.forEach(function(e){return e.onMatch(e,function(t){return e.add(null,t)})}),Ce=t,Gc("matchMedia"))}var xe,ke=[],Oe={},Me=[],Ce=0,Pe=0,Se=((xe=Context.prototype).add=function add(t,i,n){function Gw(){var t,e=l,r=a.selector;return e&&e!==a&&e.data.push(a),n&&(a.selector=fb(n)),l=a,t=i.apply(a,arguments),s(t)&&a._r.push(t),l=e,a.selector=r,a.isReverted=!1,t}s(t)&&(n=i,i=t,t=s);var a=this;return a.last=Gw,t===s?Gw(a,function(t){return a.add(null,t)}):t?a[t]=Gw:Gw},xe.ignore=function ignore(t){var e=l;l=null,t(this),l=e},xe.getTweens=function getTweens(){var e=[];return this.data.forEach(function(t){return t instanceof Context?e.push.apply(e,t.getTweens()):t instanceof te&&!(t.parent&&"nested"===t.parent.data)&&e.push(t)}),e},xe.clear=function clear(){this._r.length=this.data.length=0},xe.kill=function kill(i,t){var n=this;if(i?function(){for(var t,e=n.getTweens(),r=n.data.length;r--;)"isFlip"===(t=n.data[r]).data&&(t.revert(),t.getChildren(!0,!0,!1).forEach(function(t){return e.splice(e.indexOf(t),1)}));for(e.map(function(t){return{g:t._dur||t._delay||t._sat&&!t._sat.vars.immediateRender?t.globalTime(0):-1/0,t:t}}).sort(function(t,e){return e.g-t.g||-1/0}).forEach(function(t){return t.t.revert(i)}),r=n.data.length;r--;)(t=n.data[r])instanceof Gt?"nested"!==t.data&&(t.scrollTrigger&&t.scrollTrigger.revert(),t.kill()):t instanceof te||!t.revert||t.revert(i);n._r.forEach(function(t){return t(i,n)}),n.isReverted=!0}():this.data.forEach(function(t){return t.kill&&t.kill()}),this.clear(),t)for(var e=ke.length;e--;)ke[e].id===this.id&&ke.splice(e,1)},xe.revert=function revert(t){this.kill(t||{})},Context);function Context(t,e){this.selector=e&&fb(e),this.data=[],this._r=[],this.isReverted=!1,this.id=Pe++,t&&this.add(t)}var De,Re=((De=MatchMedia.prototype).add=function add(t,e,r){v(t)||(t={matches:t});var i,n,a,s=new Se(0,r||this.scope),o=s.conditions={};for(n in l&&!s.selector&&(s.selector=l.selector),this.contexts.push(s),e=s.add("onMatch",e),s.queries=t)"all"===n?a=1:(i=h.matchMedia(t[n]))&&(ke.indexOf(s)<0&&ke.push(s),(o[n]=i.matches)&&(a=1),i.addListener?i.addListener(Hc):i.addEventListener("change",Hc));return a&&e(s,function(t){return s.add(null,t)}),this},De.revert=function revert(t){this.kill(t||{})},De.kill=function kill(e){this.contexts.forEach(function(t){return t.kill(e,!0)})},MatchMedia);function MatchMedia(t){this.contexts=[],this.scope=t,l&&l.data.push(this)}var Ee={registerPlugin:function registerPlugin(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];e.forEach(function(t){return zb(t)})},timeline:function timeline(t){return new Gt(t)},getTweensOf:function getTweensOf(t,e){return L.getTweensOf(t,e)},getProperty:function getProperty(i,t,e,n){r(i)&&(i=Pt(i)[0]);var a=ha(i||{}).get,s=e?sa:ra;return"native"===e&&(e=""),i?t?s((mt[t]&&mt[t].get||a)(i,t,e,n)):function(t,e,r){return s((mt[t]&&mt[t].get||a)(i,t,e,r))}:i},quickSetter:function quickSetter(r,e,i){if(1<(r=Pt(r)).length){var n=r.map(function(t){return Fe.quickSetter(t,e,i)}),a=n.length;return function(t){for(var e=a;e--;)n[e](t)}}r=r[0]||{};var s=mt[e],o=ha(r),u=o.harness&&(o.harness.aliases||{})[e]||e,h=s?function(t){var e=new s;c._pt=0,e.init(r,i?t+i:t,c,0,[r]),e.render(1,e),c._pt&&_e(1,c)}:o.set(r,u);return s?h:function(t){return h(r,u,i?t+i:t,o,1)}},quickTo:function quickTo(t,i,e){function $x(t,e,r){return n.resetTo(i,t,e,r)}var r,n=Fe.to(t,ta(((r={})[i]="+=0.1",r.paused=!0,r.stagger=0,r),e||{}));return $x.tween=n,$x},isTweening:function isTweening(t){return 0<L.getTweensOf(t,!0).length},defaults:function defaults(t){return t&&t.ease&&(t.ease=jt(t.ease,j.ease)),wa(j,t||{})},config:function config(t){return wa(Y,t||{})},registerEffect:function registerEffect(t){var i=t.name,n=t.effect,e=t.plugins,a=t.defaults,r=t.extendTimeline;(e||"").split(",").forEach(function(t){return t&&!mt[t]&&!ht[t]&&T(i+" effect requires "+t+" plugin.")}),gt[i]=function(t,e,r){return n(Pt(t),ta(e||{},a),r)},r&&(Gt.prototype[i]=function(t,e,r){return this.add(gt[i](t,v(e)?e:(r=e)&&{},this),r)})},registerEase:function registerEase(t,e){Bt[t]=jt(e)},parseEase:function parseEase(t,e){return arguments.length?jt(t,e):Bt},getById:function getById(t){return L.getById(t)},exportRoot:function exportRoot(t,e){void 0===t&&(t={});var r,i,n=new Gt(t);for(n.smoothChildTiming=w(t.smoothChildTiming),L.remove(n),n._dp=0,n._time=n._tTime=L._time,r=L._first;r;)i=r._next,!e&&!r._dur&&r instanceof te&&r.vars.onComplete===r._targets[0]||Na(n,r,r._start-r._delay),r=i;return Na(L,n,0),n},context:function context(t,e){return t?new Se(t,e):l},matchMedia:function matchMedia(t){return new Re(t)},matchMediaRefresh:function matchMediaRefresh(){return ke.forEach(function(t){var e,r,i=t.conditions;for(r in i)i[r]&&(i[r]=!1,e=1);e&&t.revert()})||Hc()},addEventListener:function addEventListener(t,e){var r=Oe[t]||(Oe[t]=[]);~r.indexOf(e)||r.push(e)},removeEventListener:function removeEventListener(t,e){var r=Oe[t],i=r&&r.indexOf(e);0<=i&&r.splice(i,1)},utils:{wrap:function wrap(e,t,r){var i=t-e;return K(e)?ob(e,wrap(0,e.length),t):Za(r,function(t){return(i+(t-e)%i)%i+e})},wrapYoyo:function wrapYoyo(e,t,r){var i=t-e,n=2*i;return K(e)?ob(e,wrapYoyo(0,e.length-1),t):Za(r,function(t){return e+(i<(t=(n+(t-e)%n)%n||0)?n-t:t)})},distribute:hb,random:kb,snap:jb,normalize:function normalize(t,e,r){return St(t,e,0,1,r)},getUnit:_a,clamp:function clamp(e,r,t){return Za(t,function(t){return Mt(e,r,t)})},splitColor:Db,toArray:Pt,selector:fb,mapRange:St,pipe:function pipe(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return function(t){return e.reduce(function(t,e){return e(t)},t)}},unitize:function unitize(e,r){return function(t){return e(parseFloat(t))+(r||_a(t))}},interpolate:function interpolate(e,i,t,n){var a=isNaN(e+i)?0:function(t){return(1-t)*e+t*i};if(!a){var s,o,u,h,l,f=r(e),c={};if(!0===t&&(n=1)&&(t=null),f)e={p:e},i={p:i};else if(K(e)&&!K(i)){for(u=[],h=e.length,l=h-2,o=1;o<h;o++)u.push(interpolate(e[o-1],e[o]));h--,a=function func(t){t*=h;var e=Math.min(l,~~t);return u[e](t-e)},t=i}else n||(e=bt(K(e)?[]:{},e));if(!u){for(s in i)$t.call(c,e,s,"get",i[s]);a=function func(t){return _e(t,c)||(f?e.p:e)}}}return Za(t,a)},shuffle:gb},install:R,effects:gt,ticker:It,updateRoot:Gt.updateRoot,plugins:mt,globalTimeline:L,core:{PropTween:we,globals:U,Tween:te,Timeline:Gt,Animation:qt,getCache:ha,_removeLinkedListItem:Ba,reverting:function reverting(){return I},context:function context(t){return t&&l&&(l.data.push(t),t._ctx=l),l},suppressOverwrites:function suppressOverwrites(t){return F=t}}};ja("to,from,fromTo,delayedCall,set,killTweensOf",function(t){return Ee[t]=te[t]}),It.add(Gt.updateRoot),c=Ee.to({},{duration:0});function Lc(t,e){for(var r=t._pt;r&&r.p!==e&&r.op!==e&&r.fp!==e;)r=r._next;return r}function Nc(t,a){return{name:t,headless:1,rawVars:1,init:function init(t,n,e){e._onInit=function(t){var e,i;if(r(n)&&(e={},ja(n,function(t){return e[t]=1}),n=e),a){for(i in e={},n)e[i]=a(n[i]);n=e}!function _addModifiers(t,e){var r,i,n,a=t._targets;for(r in e)for(i=a.length;i--;)(n=(n=t._ptLookup[i][r])&&n.d)&&(n._pt&&(n=Lc(n,r)),n&&n.modifier&&n.modifier(e[r],t,a[i],r))}(t,n)}}}}var Fe=Ee.registerPlugin({name:"attr",init:function init(t,e,r,i,n){var a,s,o;for(a in this.tween=r,e)o=t.getAttribute(a)||"",(s=this.add(t,"setAttribute",(o||0)+"",e[a],i,n,0,0,a)).op=a,s.b=o,this._props.push(a)},render:function render(t,e){for(var r=e._pt;r;)I?r.set(r.t,r.p,r.b,r):r.r(t,r.d),r=r._next}},{name:"endArray",headless:1,init:function init(t,e){for(var r=e.length;r--;)this.add(t,r,t[r]||0,e[r],0,0,0,0,0,1)}},Nc("roundProps",ib),Nc("modifiers"),Nc("snap",jb))||Ee;te.version=Gt.version=Fe.version="3.15.0",o=1,x()&&Lt();function xd(t,e){return e.set(e.t,e.p,Math.round(1e4*(e.s+e.c*t))/1e4+e.u,e)}function yd(t,e){return e.set(e.t,e.p,1===t?e.e:Math.round(1e4*(e.s+e.c*t))/1e4+e.u,e)}function zd(t,e){return e.set(e.t,e.p,t?Math.round(1e4*(e.s+e.c*t))/1e4+e.u:e.b,e)}function Ad(t,e){return e.set(e.t,e.p,1===t?e.e:t?Math.round(1e4*(e.s+e.c*t))/1e4+e.u:e.b,e)}function Bd(t,e){var r=e.s+e.c*t;e.set(e.t,e.p,~~(r+(r<0?-.5:.5))+e.u,e)}function Cd(t,e){return e.set(e.t,e.p,t?e.e:e.b,e)}function Dd(t,e){return e.set(e.t,e.p,1!==t?e.b:e.e,e)}function Ed(t,e,r){return t.style[e]=r}function Fd(t,e,r){return t.style.setProperty(e,r)}function Gd(t,e,r){return t._gsap[e]=r}function Hd(t,e,r){return t._gsap.scaleX=t._gsap.scaleY=r}function Id(t,e,r,i,n){var a=t._gsap;a.scaleX=a.scaleY=r,a.renderTransform(n,a)}function Jd(t,e,r,i,n){var a=t._gsap;a[e]=r,a.renderTransform(n,a)}function Md(t,e){var r=this,i=this.target,n=i.style,a=i._gsap;if(t in ur&&n){if(this.tfm=this.tfm||{},"transform"===t)return _r.transform.split(",").forEach(function(t){return Md.call(r,t,e)});if(~(t=_r[t]||t).indexOf(",")?t.split(",").forEach(function(t){return r.tfm[t]=wr(i,t)}):this.tfm[t]=a.x?a[t]:wr(i,t),t===gr&&(this.tfm.zOrigin=a.zOrigin),0<=this.props.indexOf(mr))return;a.svg&&(this.svgo=i.getAttribute("data-svg-origin"),this.props.push(gr,e,"")),t=mr}(n||e)&&this.props.push(t,e,n[t])}function Nd(t){t.translate&&(t.removeProperty("translate"),t.removeProperty("scale"),t.removeProperty("rotate"))}function Od(){var t,e,r=this.props,i=this.target,n=i.style,a=i._gsap;for(t=0;t<r.length;t+=3)r[t+1]?2===r[t+1]?i[r[t]](r[t+2]):i[r[t]]=r[t+2]:r[t+2]?n[r[t]]=r[t+2]:n.removeProperty("--"===r[t].substr(0,2)?r[t]:r[t].replace(cr,"-$1").toLowerCase());if(this.tfm){for(e in this.tfm)a[e]=this.tfm[e];a.svg&&(a.renderTransform(),i.setAttribute("data-svg-origin",this.svgo||"")),(t=je())&&t.isStart||n[mr]||(Nd(n),a.zOrigin&&n[gr]&&(n[gr]+=" "+a.zOrigin+"px",a.zOrigin=0,a.renderTransform()),a.uncache=1)}}function Pd(t,e){var r={target:t,props:[],revert:Od,save:Md};return t._gsap||Fe.core.getCache(t),e&&t.style&&t.nodeType&&e.split(",").forEach(function(t){return r.save(t)}),r}function Rd(t,e){var r=Le.createElementNS?Le.createElementNS((e||"http://www.w3.org/1999/xhtml").replace(/^https/,"http"),t):Le.createElement(t);return r&&r.style?r:Le.createElement(t)}function Sd(t,e,r){var i=getComputedStyle(t);return i[e]||i.getPropertyValue(e.replace(cr,"-$1").toLowerCase())||i.getPropertyValue(e)||!r&&Sd(t,yr(e)||e,1)||""}function Vd(){(function _windowExists(){return"undefined"!=typeof window})()&&window.document&&(Ie=window,Le=Ie.document,Be=Le.documentElement,Ue=Rd("div")||{style:{}},Rd("div"),mr=yr(mr),gr=mr+"Origin",Ue.style.cssText="border-width:0;line-height:0;position:absolute;padding:0",Ve=!!yr("perspective"),je=Fe.core.reverting,Ne=1)}function Wd(t){var e,r=t.ownerSVGElement,i=Rd("svg",r&&r.getAttribute("xmlns")||"http://www.w3.org/2000/svg"),n=t.cloneNode(!0);n.style.display="block",i.appendChild(n),Be.appendChild(i);try{e=n.getBBox()}catch(t){}return i.removeChild(n),Be.removeChild(i),e}function Xd(t,e){for(var r=e.length;r--;)if(t.hasAttribute(e[r]))return t.getAttribute(e[r])}function Yd(e){var r,i;try{r=e.getBBox()}catch(t){r=Wd(e),i=1}return r&&(r.width||r.height)||i||(r=Wd(e)),!r||r.width||r.x||r.y?r:{x:+Xd(e,["x","cx","x1"])||0,y:+Xd(e,["y","cy","y1"])||0,width:0,height:0}}function Zd(t){return!(!t.getCTM||t.parentNode&&!t.ownerSVGElement||!Yd(t))}function $d(t,e){if(e){var r,i=t.style;e in ur&&e!==gr&&(e=mr),i.removeProperty?("ms"!==(r=e.substr(0,2))&&"webkit"!==e.substr(0,6)||(e="-"+e),i.removeProperty("--"===r?e:e.replace(cr,"-$1").toLowerCase())):i.removeAttribute(e)}}function _d(t,e,r,i,n,a){var s=new we(t._pt,e,r,0,1,a?Dd:Cd);return(t._pt=s).b=i,s.e=n,t._props.push(r),s}function ce(t,e,r,i){var n,a,s,o,u=parseFloat(r)||0,h=(r+"").trim().substr((u+"").length)||"px",l=Ue.style,f=dr.test(e),c="svg"===t.tagName.toLowerCase(),d=(c?"client":"offset")+(f?"Width":"Height"),p="px"===i,_="%"===i;if(i===h||!u||Tr[i]||Tr[h])return u;if("px"===h||p||(u=ce(t,e,r,"px")),o=t.getCTM&&Zd(t),(_||"%"===h)&&(ur[e]||~e.indexOf("adius")))return n=o?t.getBBox()[f?"width":"height"]:t[d],ka(_?u/n*100:u/100*n);if(l[f?"width":"height"]=100+(p?h:i),a="rem"!==i&&~e.indexOf("adius")||"em"===i&&t.appendChild&&!c?t:t.parentNode,o&&(a=(t.ownerSVGElement||{}).parentNode),a&&a!==Le&&a.appendChild||(a=Le.body),(s=a._gsap)&&_&&s.width&&f&&s.time===It.time&&!s.uncache)return ka(u/s.width*100);if(!_||"height"!==e&&"width"!==e)!_&&"%"!==h||br[Sd(a,"display")]||(l.position=Sd(t,"position")),a===t&&(l.position="static"),a.appendChild(Ue),n=Ue[d],a.removeChild(Ue),l.position="absolute";else{var m=t.style[e];t.style[e]=100+i,n=t[d],m?t.style[e]=m:$d(t,e)}return f&&_&&((s=ha(a)).time=It.time,s.width=a[d]),ka(p?n*u/100:n&&u?100/n*u:0)}function ee(t,e,r,i){if(!r||"none"===r){var n=yr(e,t,1),a=n&&Sd(t,n,1);a&&a!==r?(e=n,r=a):"borderColor"===e&&(r=Sd(t,"borderTopColor"))}var s,o,u,h,l,f,c,d,p,_,m,g=new we(this._pt,t.style,e,0,1,pe),v=0,y=0;if(g.b=r,g.e=i,r+="","var(--"===(i+="").substring(0,6)&&(i=Sd(t,i.substring(4,i.indexOf(")")))),"auto"===i&&(f=t.style[e],t.style[e]=i,i=Sd(t,e)||i,f?t.style[e]=f:$d(t,e)),Ib(s=[r,i]),i=s[1],u=(r=s[0]).match(nt)||[],(i.match(nt)||[]).length){for(;o=nt.exec(i);)c=o[0],p=i.substring(v,o.index),l?l=(l+1)%5:"rgba("!==p.substr(-5)&&"hsla("!==p.substr(-5)||(l=1),c!==(f=u[y++]||"")&&(h=parseFloat(f)||0,m=f.substr((h+"").length),"="===c.charAt(1)&&(c=ma(h,c)+m),d=parseFloat(c),_=c.substr((d+"").length),v=nt.lastIndex-_.length,_||(_=_||Y.units[e]||m,v===i.length&&(i+=_,g.e+=_)),m!==_&&(h=ce(t,e,f,_)||0),g._pt={_next:g._pt,p:p||1===y?p:",",s:h,c:d-h,m:l&&l<4||"zIndex"===e?Math.round:0});g.c=v<i.length?i.substring(v,i.length):""}else g.r="display"===e&&"none"===i?Dd:Cd;return st.test(i)&&(g.e=0),this._pt=g}function ge(t){var e=t.split(" "),r=e[0],i=e[1]||"50%";return"top"!==r&&"bottom"!==r&&"left"!==i&&"right"!==i||(t=r,r=i,i=t),e[0]=xr[r]||r,e[1]=xr[i]||i,e.join(" ")}function he(t,e){if(e.tween&&e.tween._time===e.tween._dur){var r,i,n,a=e.t,s=a.style,o=e.u,u=a._gsap;if("all"===o||!0===o)s.cssText="",i=1;else for(n=(o=o.split(",")).length;-1<--n;)r=o[n],ur[r]&&(i=1,r="transformOrigin"===r?gr:mr),$d(a,r);i&&($d(a,mr),u&&(u.svg&&a.removeAttribute("transform"),s.scale=s.rotate=s.translate="none",Cr(a,1),u.uncache=1,Nd(s)))}}function le(t){return"matrix(1, 0, 0, 1, 0, 0)"===t||"none"===t||!t}function me(t){var e=Sd(t,mr);return le(e)?Or:e.substr(7).match(it).map(ka)}function ne(t,e){var r,i,n,a,s=t._gsap||ha(t),o=t.style,u=me(t);return s.svg&&t.getAttribute("transform")?"1,0,0,1,0,0"===(u=[(n=t.transform.baseVal.consolidate().matrix).a,n.b,n.c,n.d,n.e,n.f]).join(",")?Or:u:(u!==Or||t.offsetParent||t===Be||s.svg||(n=o.display,o.display="block",(r=t.parentNode)&&(t.offsetParent||t.getBoundingClientRect().width)||(a=1,i=t.nextElementSibling,Be.appendChild(t)),u=me(t),n?o.display=n:$d(t,"display"),a&&(i?r.insertBefore(t,i):r?r.appendChild(t):Be.removeChild(t))),e&&6<u.length?[u[0],u[1],u[4],u[5],u[12],u[13]]:u)}function oe(t,e,r,i,n,a){var s,o,u,h=t._gsap,l=n||ne(t,!0),f=h.xOrigin||0,c=h.yOrigin||0,d=h.xOffset||0,p=h.yOffset||0,_=l[0],m=l[1],g=l[2],v=l[3],y=l[4],T=l[5],b=e.split(" "),w=parseFloat(b[0])||0,x=parseFloat(b[1])||0;r?l!==Or&&(o=_*v-m*g)&&(u=w*(-m/o)+x*(_/o)-(_*T-m*y)/o,w=w*(v/o)+x*(-g/o)+(g*T-v*y)/o,x=u):(w=(s=Yd(t)).x+(~b[0].indexOf("%")?w/100*s.width:w),x=s.y+(~(b[1]||b[0]).indexOf("%")?x/100*s.height:x)),i||!1!==i&&h.smooth?(y=w-f,T=x-c,h.xOffset=d+(y*_+T*g)-y,h.yOffset=p+(y*m+T*v)-T):h.xOffset=h.yOffset=0,h.xOrigin=w,h.yOrigin=x,h.smooth=!!i,h.origin=e,h.originIsAbsolute=!!r,t.style[gr]="0px 0px",a&&(_d(a,h,"xOrigin",f,w),_d(a,h,"yOrigin",c,x),_d(a,h,"xOffset",d,h.xOffset),_d(a,h,"yOffset",p,h.yOffset)),t.setAttribute("data-svg-origin",w+" "+x)}function re(t,e,r){var i=_a(e);return ka(parseFloat(e)+parseFloat(ce(t,"x",r+"px",i)))+i}function ye(t,e,i,n,a){var s,o,u=360,h=r(a),l=parseFloat(a)*(h&&~a.indexOf("rad")?hr:1)-n,f=n+l+"deg";return h&&("short"===(s=a.split("_")[1])&&(l%=u)!==l%180&&(l+=l<0?u:-u),"cw"===s&&l<0?l=(l+36e9)%u-~~(l/u)*u:"ccw"===s&&0<l&&(l=(l-36e9)%u-~~(l/u)*u)),t._pt=o=new we(t._pt,e,i,n,l,yd),o.e=f,o.u="deg",t._props.push(i),o}function ze(t,e){for(var r in e)t[r]=e[r];return t}function Ae(t,e,r){var i,n,a,s,o,u,h,l=ze({},r._gsap),f=r.style;for(n in l.svg?(a=r.getAttribute("transform"),r.setAttribute("transform",""),f[mr]=e,i=Cr(r,1),$d(r,mr),r.setAttribute("transform",a)):(a=getComputedStyle(r)[mr],f[mr]=e,i=Cr(r,1),f[mr]=a),ur)(a=l[n])!==(s=i[n])&&"perspective,force3D,transformOrigin,svgOrigin".indexOf(n)<0&&(o=_a(a)!==(h=_a(s))?ce(r,n,a,h):parseFloat(a),u=parseFloat(s),t._pt=new we(t._pt,i,n,o,u-o,xd),t._pt.u=h||0,t._props.push(n));ze(i,l)}var Ie,Le,Be,Ne,Ue,Ye,je,Ve,Xe=Bt.Power0,qe=Bt.Power1,Ge=Bt.Power2,Ze=Bt.Power3,We=Bt.Power4,$e=Bt.Linear,He=Bt.Quad,Qe=Bt.Cubic,Je=Bt.Quart,Ke=Bt.Quint,tr=Bt.Strong,er=Bt.Elastic,rr=Bt.Back,ir=Bt.SteppedEase,nr=Bt.Bounce,ar=Bt.Sine,sr=Bt.Expo,or=Bt.Circ,ur={},hr=180/Math.PI,lr=Math.PI/180,fr=Math.atan2,cr=/([A-Z])/g,dr=/(left|right|width|margin|padding|x)/i,pr=/[\s,\(]\S/,_r={autoAlpha:"opacity,visibility",scale:"scaleX,scaleY",alpha:"opacity"},mr="transform",gr=mr+"Origin",vr="O,Moz,ms,Ms,Webkit".split(","),yr=function _checkPropPrefix(t,e,r){var i=(e||Ue).style,n=5;if(t in i&&!r)return t;for(t=t.charAt(0).toUpperCase()+t.substr(1);n--&&!(vr[n]+t in i););return n<0?null:(3===n?"ms":0<=n?vr[n]:"")+t},Tr={deg:1,rad:1,turn:1},br={grid:1,flex:1},wr=function _get(t,e,r,i){var n;return Ne||Vd(),e in _r&&"transform"!==e&&~(e=_r[e]).indexOf(",")&&(e=e.split(",")[0]),ur[e]&&"transform"!==e?(n=Cr(t,i),n="transformOrigin"!==e?n[e]:n.svg?n.origin:Pr(Sd(t,gr))+" "+n.zOrigin+"px"):(n=t.style[e])&&"auto"!==n&&!i&&!~(n+"").indexOf("calc(")||(n=kr[e]&&kr[e](t,e,r)||Sd(t,e)||ia(t,e)||("opacity"===e?1:0)),r&&!~(n+"").trim().indexOf(" ")?ce(t,e,n,r)+r:n},xr={top:"0%",bottom:"100%",left:"0%",right:"100%",center:"50%"},kr={clearProps:function clearProps(t,e,r,i,n){if("isFromStart"!==n.data){var a=t._pt=new we(t._pt,e,r,0,0,he);return a.u=i,a.pr=-10,a.tween=n,t._props.push(r),1}}},Or=[1,0,0,1,0,0],Mr={},Cr=function _parseTransform(t,e){var r=t._gsap||new Xt(t);if("x"in r&&!e&&!r.uncache)return r;var i,n,a,s,o,u,h,l,f,c,d,p,_,m,g,v,y,T,b,w,x,k,O,M,C,P,S,A,D,z,R,E,F=t.style,I=r.scaleX<0,L="deg",B=getComputedStyle(t),N=Sd(t,gr)||"0";return i=n=a=u=h=l=f=c=d=0,s=o=1,r.svg=!(!t.getCTM||!Zd(t)),B.translate&&("none"===B.translate&&"none"===B.scale&&"none"===B.rotate||(F[mr]=("none"!==B.translate?"translate3d("+(B.translate+" 0 0").split(" ").slice(0,3).join(", ")+") ":"")+("none"!==B.rotate?"rotate("+B.rotate+") ":"")+("none"!==B.scale?"scale("+B.scale.split(" ").join(",")+") ":"")+("none"!==B[mr]?B[mr]:"")),F.scale=F.rotate=F.translate="none"),m=ne(t,r.svg),r.svg&&(M=r.uncache?(C=t.getBBox(),N=r.xOrigin-C.x+"px "+(r.yOrigin-C.y)+"px",""):!e&&t.getAttribute("data-svg-origin"),oe(t,M||N,!!M||r.originIsAbsolute,!1!==r.smooth,m)),p=r.xOrigin||0,_=r.yOrigin||0,m!==Or&&(T=m[0],b=m[1],w=m[2],x=m[3],i=k=m[4],n=O=m[5],6===m.length?(s=Math.sqrt(T*T+b*b),o=Math.sqrt(x*x+w*w),u=T||b?fr(b,T)*hr:0,(f=w||x?fr(w,x)*hr+u:0)&&(o*=Math.abs(Math.cos(f*lr))),r.svg&&(i-=p-(p*T+_*w),n-=_-(p*b+_*x))):(E=m[6],z=m[7],S=m[8],A=m[9],D=m[10],R=m[11],i=m[12],n=m[13],a=m[14],h=(g=fr(E,D))*hr,g&&(M=k*(v=Math.cos(-g))+S*(y=Math.sin(-g)),C=O*v+A*y,P=E*v+D*y,S=k*-y+S*v,A=O*-y+A*v,D=E*-y+D*v,R=z*-y+R*v,k=M,O=C,E=P),l=(g=fr(-w,D))*hr,g&&(v=Math.cos(-g),R=x*(y=Math.sin(-g))+R*v,T=M=T*v-S*y,b=C=b*v-A*y,w=P=w*v-D*y),u=(g=fr(b,T))*hr,g&&(M=T*(v=Math.cos(g))+b*(y=Math.sin(g)),C=k*v+O*y,b=b*v-T*y,O=O*v-k*y,T=M,k=C),h&&359.9<Math.abs(h)+Math.abs(u)&&(h=u=0,l=180-l),s=ka(Math.sqrt(T*T+b*b+w*w)),o=ka(Math.sqrt(O*O+E*E)),g=fr(k,O),f=2e-4<Math.abs(g)?g*hr:0,d=R?1/(R<0?-R:R):0),r.svg&&(M=t.getAttribute("transform"),r.forceCSS=t.setAttribute("transform","")||!le(Sd(t,mr)),M&&t.setAttribute("transform",M))),90<Math.abs(f)&&Math.abs(f)<270&&(I?(s*=-1,f+=u<=0?180:-180,u+=u<=0?180:-180):(o*=-1,f+=f<=0?180:-180)),e=e||r.uncache,r.x=i-((r.xPercent=i&&(!e&&r.xPercent||(Math.round(t.offsetWidth/2)===Math.round(-i)?-50:0)))?t.offsetWidth*r.xPercent/100:0)+"px",r.y=n-((r.yPercent=n&&(!e&&r.yPercent||(Math.round(t.offsetHeight/2)===Math.round(-n)?-50:0)))?t.offsetHeight*r.yPercent/100:0)+"px",r.z=a+"px",r.scaleX=ka(s),r.scaleY=ka(o),r.rotation=ka(u)+L,r.rotationX=ka(h)+L,r.rotationY=ka(l)+L,r.skewX=f+L,r.skewY=c+L,r.transformPerspective=d+"px",(r.zOrigin=parseFloat(N.split(" ")[2])||!e&&r.zOrigin||0)&&(F[gr]=Pr(N)),r.xOffset=r.yOffset=0,r.force3D=Y.force3D,r.renderTransform=r.svg?Er:Ve?Rr:Sr,r.uncache=0,r},Pr=function _firstTwoOnly(t){return(t=t.split(" "))[0]+" "+t[1]},Sr=function _renderNon3DTransforms(t,e){e.z="0px",e.rotationY=e.rotationX="0deg",e.force3D=0,Rr(t,e)},Ar="0deg",Dr="0px",zr=") ",Rr=function _renderCSSTransforms(t,e){var r=e||this,i=r.xPercent,n=r.yPercent,a=r.x,s=r.y,o=r.z,u=r.rotation,h=r.rotationY,l=r.rotationX,f=r.skewX,c=r.skewY,d=r.scaleX,p=r.scaleY,_=r.transformPerspective,m=r.force3D,g=r.target,v=r.zOrigin,y="",T="auto"===m&&t&&1!==t||!0===m;if(v&&(l!==Ar||h!==Ar)){var b,w=parseFloat(h)*lr,x=Math.sin(w),k=Math.cos(w);w=parseFloat(l)*lr,b=Math.cos(w),a=re(g,a,x*b*-v),s=re(g,s,-Math.sin(w)*-v),o=re(g,o,k*b*-v+v)}_!==Dr&&(y+="perspective("+_+zr),(i||n)&&(y+="translate("+i+"%, "+n+"%) "),!T&&a===Dr&&s===Dr&&o===Dr||(y+=o!==Dr||T?"translate3d("+a+", "+s+", "+o+") ":"translate("+a+", "+s+zr),u!==Ar&&(y+="rotate("+u+zr),h!==Ar&&(y+="rotateY("+h+zr),l!==Ar&&(y+="rotateX("+l+zr),f===Ar&&c===Ar||(y+="skew("+f+", "+c+zr),1===d&&1===p||(y+="scale("+d+", "+p+zr),g.style[mr]=y||"translate(0, 0)"},Er=function _renderSVGTransforms(t,e){var r,i,n,a,s,o=e||this,u=o.xPercent,h=o.yPercent,l=o.x,f=o.y,c=o.rotation,d=o.skewX,p=o.skewY,_=o.scaleX,m=o.scaleY,g=o.target,v=o.xOrigin,y=o.yOrigin,T=o.xOffset,b=o.yOffset,w=o.forceCSS,x=parseFloat(l),k=parseFloat(f);c=parseFloat(c),d=parseFloat(d),(p=parseFloat(p))&&(d+=p=parseFloat(p),c+=p),c||d?(c*=lr,d*=lr,r=Math.cos(c)*_,i=Math.sin(c)*_,n=Math.sin(c-d)*-m,a=Math.cos(c-d)*m,d&&(p*=lr,s=Math.tan(d-p),n*=s=Math.sqrt(1+s*s),a*=s,p&&(s=Math.tan(p),r*=s=Math.sqrt(1+s*s),i*=s)),r=ka(r),i=ka(i),n=ka(n),a=ka(a)):(r=_,a=m,i=n=0),(x&&!~(l+"").indexOf("px")||k&&!~(f+"").indexOf("px"))&&(x=ce(g,"x",l,"px"),k=ce(g,"y",f,"px")),(v||y||T||b)&&(x=ka(x+v-(v*r+y*n)+T),k=ka(k+y-(v*i+y*a)+b)),(u||h)&&(s=g.getBBox(),x=ka(x+u/100*s.width),k=ka(k+h/100*s.height)),s="matrix("+r+","+i+","+n+","+a+","+x+","+k+")",g.setAttribute("transform",s),w&&(g.style[mr]=s)};ja("padding,margin,Width,Radius",function(e,r){var t="Right",i="Bottom",n="Left",o=(r<3?["Top",t,i,n]:["Top"+n,"Top"+t,i+t,i+n]).map(function(t){return r<2?e+t:"border"+t+e});kr[1<r?"border"+e:e]=function(e,t,r,i,n){var a,s;if(arguments.length<4)return a=o.map(function(t){return wr(e,t,r)}),5===(s=a.join(" ")).split(a[0]).length?a[0]:s;a=(i+"").split(" "),s={},o.forEach(function(t,e){return s[t]=a[e]=a[e]||a[(e-1)/2|0]}),e.init(t,s,n)}});var Fr,Ir,Lr,Br={name:"css",register:Vd,targetTest:function targetTest(t){return t.style&&t.nodeType},init:function init(t,e,i,n,a){var s,o,u,h,l,f,c,d,p,_,m,g,v,y,T,b,w,x=this._props,k=t.style,O=i.vars.startAt;for(c in Ne||Vd(),this.styles=this.styles||Pd(t),b=this.styles.props,this.tween=i,e)if("autoRound"!==c&&(o=e[c],!mt[c]||!cc(c,e,i,n,t,a)))if(l=typeof o,f=kr[c],"function"===l&&(l=typeof(o=o.call(i,n,t,a))),"string"===l&&~o.indexOf("random(")&&(o=rb(o)),f)f(this,t,c,o,i)&&(T=1);else if("--"===c.substr(0,2))s=(getComputedStyle(t).getPropertyValue(c)+"").trim(),o+="",Et.lastIndex=0,Et.test(s)||(d=_a(s),(p=_a(o))?d!==p&&(s=ce(t,c,s,p)+p):d&&(o+=d)),this.add(k,"setProperty",s,o,n,a,0,0,c),x.push(c),b.push(c,0,k[c]);else if("undefined"!==l){if(O&&c in O?(s="function"==typeof O[c]?O[c].call(i,n,t,a):O[c],r(s)&&~s.indexOf("random(")&&(s=rb(s)),_a(s+"")||"auto"===s||(s+=Y.units[c]||_a(wr(t,c))||""),"="===(s+"").charAt(1)&&(s=wr(t,c))):s=wr(t,c),h=parseFloat(s),(_="string"===l&&"="===o.charAt(1)&&o.substr(0,2))&&(o=o.substr(2)),u=parseFloat(o),c in _r&&("autoAlpha"===c&&(1===h&&"hidden"===wr(t,"visibility")&&u&&(h=0),b.push("visibility",0,k.visibility),_d(this,k,"visibility",h?"inherit":"hidden",u?"inherit":"hidden",!u)),"scale"!==c&&"transform"!==c&&~(c=_r[c]).indexOf(",")&&(c=c.split(",")[0])),m=c in ur){if(this.styles.save(c),w=o,"string"===l&&"var(--"===o.substring(0,6)){if("calc("===(o=Sd(t,o.substring(4,o.indexOf(")")))).substring(0,5)){var M=t.style.perspective;t.style.perspective=o,o=Sd(t,"perspective"),M?t.style.perspective=M:$d(t,"perspective")}u=parseFloat(o)}if(g||((v=t._gsap).renderTransform&&!e.parseTransform||Cr(t,e.parseTransform),y=!1!==e.smoothOrigin&&v.smooth,(g=this._pt=new we(this._pt,k,mr,0,1,v.renderTransform,v,0,-1)).dep=1),"scale"===c)this._pt=new we(this._pt,v,"scaleY",v.scaleY,(_?ma(v.scaleY,_+u):u)-v.scaleY||0,xd),this._pt.u=0,x.push("scaleY",c),c+="X";else{if("transformOrigin"===c){b.push(gr,0,k[gr]),o=ge(o),v.svg?oe(t,o,0,y,0,this):((p=parseFloat(o.split(" ")[2])||0)!==v.zOrigin&&_d(this,v,"zOrigin",v.zOrigin,p),_d(this,k,c,Pr(s),Pr(o)));continue}if("svgOrigin"===c){oe(t,o,1,y,0,this);continue}if(c in Mr){ye(this,v,c,h,_?ma(h,_+o):o);continue}if("smoothOrigin"===c){_d(this,v,"smooth",v.smooth,o);continue}if("force3D"===c){v[c]=o;continue}if("transform"===c){Ae(this,o,t);continue}}}else c in k||(c=yr(c)||c);if(m||(u||0===u)&&(h||0===h)&&!pr.test(o)&&c in k)u=u||0,(d=(s+"").substr((h+"").length))!==(p=_a(o)||(c in Y.units?Y.units[c]:d))&&(h=ce(t,c,s,p)),this._pt=new we(this._pt,m?v:k,c,h,(_?ma(h,_+u):u)-h,m||"px"!==p&&"zIndex"!==c||!1===e.autoRound?xd:Bd),this._pt.u=p||0,m&&w!==o?(this._pt.b=s,this._pt.e=w,this._pt.r=Ad):d!==p&&"%"!==p&&(this._pt.b=s,this._pt.r=zd);else if(c in k)ee.call(this,t,c,s,_?_+o:o);else if(c in t)this.add(t,c,s||t[c],_?_+o:o,n,a);else if("parseTransform"!==c){S(c,o);continue}m||(c in k?b.push(c,0,k[c]):"function"==typeof t[c]?b.push(c,2,t[c]()):b.push(c,1,s||t[c])),x.push(c)}T&&be(this)},render:function render(t,e){if(e.tween._time||!je())for(var r=e._pt;r;)r.r(t,r.d),r=r._next;else e.styles.revert()},get:wr,aliases:_r,getSetter:function getSetter(t,e,r){var i=_r[e];return i&&i.indexOf(",")<0&&(e=i),e in ur&&e!==gr&&(t._gsap.x||wr(t,"x"))?r&&Ye===r?"scale"===e?Hd:Gd:(Ye=r||{})&&("scale"===e?Id:Jd):t.style&&!u(t.style[e])?Ed:~e.indexOf("-")?Fd:ue(t,e)},core:{_removeProperty:$d,_getMatrix:ne}};Fe.utils.checkPrefix=yr,Fe.core.getStyleSaver=Pd,Lr=ja((Fr="x,y,z,scale,scaleX,scaleY,xPercent,yPercent")+","+(Ir="rotation,rotationX,rotationY,skewX,skewY")+",transform,transformOrigin,svgOrigin,force3D,smoothOrigin,transformPerspective",function(t){ur[t]=1}),ja(Ir,function(t){Y.units[t]="deg",Mr[t]=1}),_r[Lr[13]]=Fr+","+Ir,ja("0:translateX,1:translateY,2:translateZ,8:rotate,8:rotationZ,8:rotateZ,9:rotateX,10:rotateY",function(t){var e=t.split(":");_r[e[1]]=Lr[e[0]]}),ja("x,y,z,top,right,bottom,left,width,height,fontSize,padding,margin,perspective",function(t){Y.units[t]="px"}),Fe.registerPlugin(Br);var Nr=Fe.registerPlugin(Br)||Fe,Ur=Nr.core.Tween;e.Back=rr,e.Bounce=nr,e.CSSPlugin=Br,e.Circ=or,e.Cubic=Qe,e.Elastic=er,e.Expo=sr,e.Linear=$e,e.Power0=Xe,e.Power1=qe,e.Power2=Ge,e.Power3=Ze,e.Power4=We,e.Quad=He,e.Quart=Je,e.Quint=Ke,e.Sine=ar,e.SteppedEase=ir,e.Strong=tr,e.TimelineLite=Gt,e.TimelineMax=Gt,e.TweenLite=te,e.TweenMax=Ur,e.default=Nr,e.gsap=Nr;if (typeof(window)==="undefined"||window!==e){Object.defineProperty(e,"__esModule",{value:!0})} else {delete e.default}});-diff --git a/skills/bgm-to-video/templates/split-anchor-word-slot/card.json b/skills/bgm-to-video/templates/split-anchor-word-slot/card.jsondeleted file mode 100644index 900a3fb50f..0000000000--- a/skills/bgm-to-video/templates/split-anchor-word-slot/card.json+++ /dev/null@@ -1,178 +0,0 @@-{- "id": "split-anchor-word-slot",- "name": "Split-Anchor Word-Slot · beat-synced kinetic typography",- "one_line": "ONE base lockup — a HELD left anchor column of R rows (fixed words) beside a torn-paper word-SLOT box on the right — driven by five interchangeable beat-synced operators: anchor lock-in, slot word-group cycle (in/out, per-line color), full-scene background flip, global per-beat jitter, and a box-zoom exit wipe. R (rows) and the number of background flips are data, so 2/3/4 rows and 0/1/2 flips all 'just work'.",- "status": "promoted",- "created": "2026-06-17",- "base_template": {- "primitive": "anchor_slot_lockup",- "notes": "A two-column kinetic-typography lockup. LEFT = an 'anchor' column of R held words (one per row, fixed for the whole group). RIGHT = a torn-paper 'slot' box (a colored card with a faint offset second sheet) holding up to R stacked text lines. R is derived from the `anchors` comma-list length; the box pre-builds maxRows line nodes from the program, so 2/3/4 rows follow the data with no code edit. A slot 'word-group' = the lines the box currently shows; cycling = swapping that group in/out. Asset-free: text + colored boxes only. All five operators below act on this one lockup — same DOM, different rhythmic scheduling."- },- "operations": {- "lockup": {- "intent": "establish the held stage: pop the R left anchor words in (one per beat) and reveal the empty slot box",- "anchors": "enter[] = onsets (one per anchor row, distributed); box = beat the empty box appears",- "what_moves": "per-anchor pop-in (autoAlpha + y + scale); box scale-in. Anchors then hold for the whole group.",- "source_span_sec": [0.125, 0.5],- "source_frames_24": [3, 12]- },- "slot": {- "intent": "one word-GROUP cycle inside the box — lines slide in one-per-beat, hold, then slide out (omit exit to hold)",- "anchors": "enter[] = onsets (per line); exit[] = onsets (per line, or all equal for a one-shot clear)",- "what_moves": "per-line textContent set + slide/fade in, slide/fade out. `colors[]` tints individual lines (ACCENTS index) for the multi-color look; else the theme's boxInk.",- "repeatable": true,- "source_groups": [- {- "words": ["I bring", "ideas", "to life"],- "span_sec": [1.0, 1.833],- "frames_24": [24, 44]- },- {- "words": ["you", "wanna", "see?"],- "span_sec": [2.042, 2.75],- "frames_24": [49, 66],- "colors": "blue/green/green"- }- ]- },- "bg": {- "intent": "flip the whole scene to another theme on a beat (stage bg + anchor ink + box fill + slot ink invert as one 0ms hit)",- "anchors": "at = beat",- "what_moves": "backgroundColor of root + box + sheet; color of anchors + slot lines. Schedule 0/1/2 of these = background changes none / once / twice.",- "source_span_sec": [3.458, 3.458],- "source_frames_24": [83, 83],- "source_flip": "blue scene (theme 0) → green scene (theme 1)"- },- "shake": {- "intent": "global per-beat jitter of the whole lockup (x/y translate + rotation), one jolt per beat — rides a dense onset run / roll",- "anchors": "beats[] = onsets (the source's 14-hit hihat fill)",- "what_moves": "transform of #lockup (anchors + box together); each jolt is a deterministic index-hashed offset that eases back to 0 by `settle`. Runs UNDER slot/bg (overlapping ops are fine — absolute-second scheduling).",- "source_span_sec": [2.16, 4.18],- "source_frames_24": [52, 100]- },- "expand": {- "intent": "the EXIT transition — fade the text out, reset the lockup transform, then ZOOM the slot box until it fills the frame (a color wipe into the next group)",- "anchors": "fade = beat text starts fading; at = box zoom start; to = box fills the frame",- "what_moves": "anchors + slot lines fade to 0; clip-path/rotation cleared; #slotbox scales to 30× (covers 1920×1080) ending opaque full-frame. Lands the black-out just before the next downbeat kick.",- "source_span_sec": [4.3, 4.792],- "source_frames_24": [100, 115]- }- },- "match": {- "structural_type": "per_onset_sequential",- "requires": {- "energy_level": ">=MEDIUM",- "has_steady_grid": true,- "onset_gap_bars": "<=1.0"- },- "mood_fit": ["hype", "playful", "bold", "elegant"],- "span_bars": [2, 4],- "exit_trigger": ["surge", "downbeat", "hard_stop"],- "notes": "Reach for this when the section is short, has a held idea (a brand / name to anchor on the left) and a stream of discrete onsets to pop separate words on, PLUS at least one dense run (roll / hihat fill) to ride a shake on and a strong downbeat to wipe out into. The five ops map onto: lock the name → cycle a couple of word-groups per beat → invert the palette on a key hit → jitter through the busy bit → zoom-wipe on the downbeat. Variable R (rows) and 0/1/2 bg flips are data, so it fits 2/3/4-line lockups and either a single or double color shift."- },- "examples": [- {- "sample": "bgm-golden-sample-reverse",- "group": "group_6",- "bpm": 92,- "downbeats_sec": [2.322, 4.923],- "roll_sec": [2.16, 4.18],- "roll_kind": "sustained-fill",- "span_sec": [0.0, 5.41],- "rows": 3,- "bg_flips": 1,- "program": "lockup(0.125-0.5) → slot:'I bring/ideas/to life'(1.0-1.833) → slot:'you/wanna/see?'(2.042-2.75) → shake(2.16-4.18) → bg→green(3.458) → expand(4.3-4.792)"- }- ],- "params": {- "bgColor": {- "type": "color",- "maps_to": "stage.background (theme 0 bg)",- "default": "#0a84ff"- },- "anchors": {- "type": "string",- "maps_to": "lockup.left_column",- "default": "studio,contre,courant",- "notes": "comma list — ONE word per row; its length sets R (rows). 2/3/4 words = 2/3/4 rows."- },- "theme": {- "type": "number",- "maps_to": "scene.base_theme",- "default": 0,- "notes": "THEMES index for the opening scene"- },- "showText": {- "type": "boolean",- "maps_to": "text.visible",- "default": true,- "notes": "false = blocks/box only, no glyphs"- },- "program": {- "type": "string",- "maps_to": "engine.program",- "default": "",- "notes": "JSON array of operator steps (see program_format). Empty = built-in group_6 score. THIS is the compose-by-data surface: reorder/drop/repeat steps, swap beats, add bg flips — no code edit."- }- },- "engine": {- "model": "operators + program-as-data (identical to poster-tile-mosaic). The 5 operators (§6 of index.html) are pure, parameterized functions that write GSAP tweens at ABSOLUTE audio seconds onto ONE paused timeline — so they are order-independent and may overlap (shake runs under slot/bg). A PROGRAM (data) lists which ops run on which beats; §7 dispatches OPS[step.op](step). Compose by editing DATA (the PROGRAM array, the `program` variable, or program.json) — never the operator code.",- "operators": ["lockup", "slot", "bg", "shake", "expand"],- "dispatch": "OPS[step.op](step) for each step in PROGRAM",- "extend": "add an operator = add a function + an OPS key; the program can then call it by name. Add themes to THEMES / accent colors to ACCENTS."- },- "program_format": {- "_": "A program is a JSON array of steps. Each step = { op, ...fields }. Beats are absolute audio seconds. theme = index into THEMES[]; colors[] = indices into ACCENTS[]. Rows (R) come from the `anchors` variable; the slot box auto-sizes to the widest word-group.",- "lockup": {- "enter": "number[] — one onset per anchor row (distributed if count != R); per-word pop-in",- "box": "number? — beat the empty slot box appears (default = last enter)",- "theme": "number? — THEMES index for the opening scene (default = base theme)"- },- "slot": {- "words": "string[] — the lines this cycle shows in the box (<= maxRows)",- "enter": "number[] — onset per line; slide/fade in",- "exit": "number[]? — onset per line to slide out; omit to HOLD the group. Equal values = a one-shot whole-group clear.",- "colors": "number[]? — ACCENTS index per line (the multi-color look); omit = theme boxInk",- "theme": "number? — THEMES index whose boxInk colors the lines (default = base theme)",- "dir": "string? — 'up' (default) | 'down' slide direction on enter"- },- "bg": {- "at": "number — beat the whole scene flips (0ms invert)",- "theme": "number — THEMES index to flip to. Add a 2nd `bg` step to change twice."- },- "shake": {- "beats": "number[] — one jolt per beat (ride a roll / dense onset run)",- "amp": "number? — translate amplitude px (default 14)",- "rot": "number? — rotation amplitude deg (default 1.5)",- "settle": "number? — seconds each jolt eases back to rest (default 0.12)"- },- "expand": {- "fade": "number — beat the text starts fading out",- "at": "number — beat the box-zoom starts",- "to": "number? — beat the box fills the frame (default at + 0.15)",- "theme": "number? — recolor the box at zoom start (default = keep current)"- }- },- "reference_impl": "index.html",- "program_data": "program.json (the default group_6 score as standalone, agent-editable data)",- "uses_primitives": [- "held_lockup",- "anchor_pop_in",- "word_slot_cycle",- "per_line_color",- "scene_palette_flip",- "beat_jitter_shake",- "box_zoom_wipe",- "freeze_hold"- ],- "transition_out": {- "default": "fast_cut",- "observed": ["box_zoom_wipe", "anticipation_zoom_to_black_into_downbeat"]- },- "reversed_from": ["bgm-golden-sample-reverse/gorup-by-group/group_6"],- "provenance": {- "video": "group_6.mp4",- "audiomap": "audiomap.json (scripts/analyze-beatgrid.py — ~92 BPM, downbeats 2.322/4.923, sustained hihat fill 2.16-4.18s)",- "video_read": "group_6.gemini-analysis.md (Gemini 3 Pro 24fps) cross-checked by frame-by-frame contact sheets. Both agreed: NOT an image grid — pure kinetic typography. Left held 'studio/contre/courant'; right box cycled 'I bring/ideas/to life' then colored 'you/wanna/see?'; blue→green hard flip at f83; global shake on the hihat fill; box zoom-wipe to black at f112-114 into the f118 downbeat. (User's original read was correct except: it is the RIGHT slot box, not a 'left box', that zooms; and the text is masked/faded out, not a soft dissolve.)"- }-}diff --git a/skills/bgm-to-video/templates/typewriter-phrase-keyword-shuffle/README.md b/skills/bgm-to-video/templates/typewriter-phrase-keyword-shuffle/README.mddeleted file mode 100644index d579edbe52..0000000000--- a/skills/bgm-to-video/templates/typewriter-phrase-keyword-shuffle/README.md+++ /dev/null@@ -1,186 +0,0 @@-# Typewriter Phrase / Keyword Font-Shuffle--> Reverse-engineered from **group_2** of the golden sample (the "growth through creativity." scene).-> `structural_type: per_onset_sequential` · status: **draft**--Words type in **one-per-onset** to spell a short phrase; then **one keyword** cycles-through a library of typefaces **on the beat** while the rest of the line holds dead-still. Background is pure black (the original's glitch field is an optional add-on role).--```-templates/typewriter-phrase-keyword-shuffle/- index.html ← parameterized, asset-free reference impl (1 paused GSAP timeline)- card.json ← the spec: match-face + build-face- README.md ← this file-```-------## 1. How it beat-syncs (from `group_2.audiomap.json`)--The whole scene is nailed to the audiomap. **Nothing is on a timer** — every move is a-GSAP tween/`set` at an absolute audio-second taken straight from the analysis.--Track facts: **BPM 129.2**, 4/4, `bar_dur = 4·(60/129.2) = 1.858s`. Every move rides a-**hi-hat onset** from `audiomap.events[]` (this scene is the quiet pre-drop build — low-energy, but the hats tick continuously).--### Phase A — spell-out (typewriter, accumulating)--One word pops in per onset and **stays** (it does not replace the previous word):--| visual | audiomap anchor | `audiomap` field |-| ----------------------------- | ---------------- | ---------------- |-| `growth` pops | **0.557s** hihat | `events[1].t` |-| `through` pops | **0.906s** hihat | `events[2].t` |-| `creativity` pops (base face) | **1.231s** hihat | `events[3].t` |-| orange `.` punches in | **1.440s** hihat | `events[4].t` |--→ in the impl: `LEAD_ONSETS = [0.557, 0.906]`, `KEY_ONSET = 1.231`, `PERIOD_ONSET = 1.440`.-Each is a `fromTo(autoAlpha 0→1, scale .92→1)` ~100ms reactive pop landing on the onset.--### Phase B — keyword font-shuffle (on the beat, 0ms hard swaps)--Once the phrase is set, **only `creativity`** changes — it flips typeface on each-following onset; `growth through` and the `.` stay locked in the base face:--| visual | audiomap anchor | font preset |-| --------------------------------------- | ---------------- | ----------- |-| → upright serif | **1.904s** hihat | `FONTS[1]` |-| → heavy serif | **2.392s** hihat | `FONTS[2]` |-| → italic serif | **2.624s** hihat | `FONTS[3]` |-| → back to base bold sans, then **HOLD** | **3.088s** hihat | `FONTS[0]` |--→ in the impl: `SHUFFLE = [{t,font}, …]`. Each row is a `tl.set(keyEl, fontProps(i), t)`-— **0ms**, because a font flip is a percussive hit (the contract's `content_swap` rule:-easing a hit kills it).--### Phase C — exit--Scene ends at **3.85s**, just before the **3.855s kick** (`events[11]`, the first-`MEDIUM`→`HIGH` SURGE / drop). The phrase locks; the drop is where the _next_ group's-regime change begins. `exit_trigger: surge` (snapped to downbeat `3.808`).--> **The rule of thumb:** structure (word entries, the final lock) leans on the strong-> grid; texture (the per-beat font flips) rides the syncopated hi-hats in between.-------## 2. Why _this beat_ → _this template_ (the matching intuition)--This is the important part. When the Music Reader emits a `GroupSignature` and you (or-the Director) look at the audiomap, **these are the tells that should make you reach for-this template:**--1. **A steady grid is present.** `has_steady_grid: true` — stable BPM, ≥2 downbeats.- Without a reliable grid you can't put one word per beat.-2. **The onset stream is CONTINUOUS, not a desert.** `onset_gap_bars: 0.28` (≪ 1 bar) —- the hi-hats keep ticking ~every 0.3–0.5s. This is the single biggest discriminator.- It means: _there is a hit available for every move you want to make_ — one per word on- the way in, then one per font-flip after.-3. **Discrete, individually-placeable onsets.** Each `events[]` entry is a clean- weak/syncopated hit → rubric step 6 → `per_onset_sequential`. Each onset can carry- exactly one reveal.-4. **A run of onsets at the head you can map to words** (Phase A) **+ a continuing tick- afterward** (Phase B). That two-part shape — _accumulate, then animate-in-place_ — is- what this template is built around.-5. **It ends on a SURGE/drop** (or hard*stop). The build resolves into something bigger,- so the scene's job is to \_fill the pre-drop bars with readable, rhythmic typography*.--Put plainly: **"steady grid + a continuous hi-hat stream + low-energy pre-drop build +-ends on a drop" is the fingerprint.** The moment you see that in the audiomap, this-template fits — you have a hit for every word and a hit for every font change.--### The contrast that makes it click--The exact same track, one group earlier (group_1), is the **opposite** signature and-wants the **opposite** template:--| | `held-message-living-field` (group_1) | `typewriter-phrase-keyword-shuffle` (group_2) |-| ----------------- | ------------------------------------- | --------------------------------------------- |-| `structural_type` | `sustained_hold` | `per_onset_sequential` |-| `onset_gap_bars` | **≥ 1.5** (onset _desert_) | **< 1.0** (continuous) |-| energy gate | `energy_level ≥ MEDIUM` | not gated (low is fine) |-| what moves | the **background** (text frozen) | the **text** (per onset / per beat) |-| because… | no onsets → nothing to hit → hold | onsets everywhere → hit everything |--So the decision is mechanical: **onset desert → hold the message; continuous onset-stream → type it / shuffle it.** Same `match.requires` predicates both sides read; see-`card.json`.-------## 3. Usage--### Render with defaults (the group_2 recreation)--```bash-cd templates/typewriter-phrase-keyword-shuffle # or this folder-npx hyperframes lint && npx hyperframes validate-npx hyperframes render -f 24 -o renders/out.mp4-```--### Change the words (content only — no code edit)--`params` are `data-composition-variables`; fill them with `--variables`:--```bash-npx hyperframes render --variables '{- "lead1":"built", "lead2":"for", "lead3":"",- "keyword":"speed", "periodChar":".",- "accentColor":"#39e6a0"-}'-```--- **Lead words are 1–3 and optional.** Leave `lead2`/`lead3` empty to ship a 1- or- 2-word lead (`""` is skipped, the line rebuilds and re-centers automatically). The- **keyword** is always the last, shuffling word.-- **`periodChar`** empty → no trailing accent dot.--### Re-fit the beat to a different group (the part that changes per track)--Content lives in `--variables`; **musical timing lives in the script** (`index.html`,-section `// 3. BEAT MAP`). When you reuse this template on a _new_ group, copy the new-group's `audiomap.json` numbers in:--```js-var LEAD_ONSETS = [ … ]; // one events[].t per lead word, in order-var KEY_ONSET = … ; // events[].t where the keyword types in-var PERIOD_ONSET = … ; // events[].t for the accent char (or remove)-var SHUFFLE = [ // one row per font-flip — add as MANY as the beat has- { t: <events[].t or beats_sec[]>, font: <index into FONTS[]> },- …-];-var DUR = <scene end, just before the next drop/hard_stop>;-```--**You can have more (or fewer) flips than group_2's four.** `SHUFFLE` is just a list —-add a row for every beat you want a change on. Re-use a `font` index to repeat a face,-or walk new indices for a longer cycle.--### Preset more fonts--The keyword cycles the **`FONTS[]` preset library** (top of the script). It ships **8**-offline-safe faces (bold sans · upright serif · heavy serif · italic serif · monospace ·-condensed sans · light sans-italic · bold serif-italic). `FONTS[0]` is the **base** face-shared with the lead words. Add entries freely — every `{ family, weight, style }` is-valid; `fontProps(i)` wraps the index so `SHUFFLE` can point anywhere. More beats →-preset more faces and walk through them.--> **Deterministic / asset-free:** only generic font stacks (no remote/Google fonts), no-> `Math.random`, no timers — every flip is keyed to an audio second, so it renders-> identically every time. See `references/builder-contract.md`.-------## 4. Provenance--- **Source:** `bgm-golden-sample-reverse/gorup-by-group/group_2/group_2.mp4`-- **Audio:** `group_2.audiomap.json` (from `scripts/analyze-beatgrid.py`)-- **Video read:** `group_2_text-only.gemini-analysis.md` (Gemini 3 Pro) **corrected by- frame-by-frame inspection** — the Gemini pass reported the keyword as static; pulling- real frames at each onset proved it shuffles typeface. Trust frames over sparse- sampling for per-frame detail.-- **Open question for promotion:** identify the _actual_ typefaces in the source if a- pixel-exact match is wanted (this impl reproduces the _mechanism_ with generic faces),- and decide whether to ship the glitch-field background as a second role.diff --git a/skills/bgm-to-video/templates/typewriter-phrase-keyword-shuffle/card.json b/skills/bgm-to-video/templates/typewriter-phrase-keyword-shuffle/card.jsondeleted file mode 100644index 50f2121c5a..0000000000--- a/skills/bgm-to-video/templates/typewriter-phrase-keyword-shuffle/card.json+++ /dev/null@@ -1,95 +0,0 @@-{- "id": "typewriter-phrase-keyword-shuffle",- "name": "Typewriter Phrase / Keyword Font-Shuffle",- "one_line": "Words type in one-per-onset to spell a phrase, then one keyword cycles typefaces on the beat while everything else holds dead still.",- "status": "promoted",-- "match": {- "structural_type": "per_onset_sequential",- "requires": {- "has_steady_grid": true,- "onset_rate": ">=1.5",- "onset_gap_bars": "<1.0",- "density": ["sparse", "medium"]- },- "mood_fit": ["hype", "glitch", "tense", "cinematic", "playful"],- "span_bars": [1, 4],- "exit_trigger": ["surge", "hard_stop", "downbeat"],- "notes": "Deliberately NOT gated on energy_level — the discriminator is a steady grid with a CONTINUOUS onset stream (no desert). This is the inverse of held-message-living-field, which requires onset_gap_bars >= 1.5 (an onset desert) and energy >= MEDIUM. If the grid goes quiet (gap >= ~1.5 bars), use a hold template instead."- },-- "examples": [- {- "sample": "group_2",- "group": "g2-text-scene",- "bpm": 129.2,- "structural_type": "per_onset_sequential",- "energy_level": "VOID",- "energy": 0.13,- "density": "sparse",- "onset_rate": 2.89,- "onset_gap_bars": 0.28,- "has_steady_grid": true,- "span_sec": [0.0, 3.808],- "span_bars": 2,- "entry": { "anchor": "onset", "time": 0.046 },- "exit_trigger": { "type": "surge", "time": 3.808 },- "mood": ["tense", "cinematic"]- }- ],-- "roles": {- "lead_phrase": {- "kind": "message",- "motion": "per_onset_pop",- "anchor": "entry.onsets",- "notes": "1-3 words; one word pops in per hi-hat onset and ACCUMULATES (typewriter, not replace), then holds. group_2: [email protected] · [email protected]."- },- "keyword": {- "kind": "message",- "motion": "font_shuffle",- "anchor": "beats_after_phrase",- "notes": "PROPOSED NEW motion verb. The final word types in (base face) then cycles through the FONTS[] preset library on each subsequent beat/onset — 0ms hard swaps; holds the base face between flips and after the last one. group_2: types @1.231, period @1.440, shuffles @1.904/2.392/2.624/3.088."- },- "background": {- "kind": "background",- "motion": "hold",- "anchor": "none",- "notes": "Pure black in this reference impl (per the reverse brief). The original group_2 layered a glitch/strobe/RGB-split field here (motion: strobe / energy_envelope_breath) — an OPTIONAL add-on role, not required by the structural type."- }- },-- "params": {- "bgColor": { "type": "color", "maps_to": "background.color" },- "textColor": { "type": "color", "maps_to": "lead_phrase.color + keyword.color" },- "accentColor": { "type": "color", "maps_to": "keyword.trailing_accent" },- "lead1": { "type": "string", "maps_to": "lead_phrase.word[0]", "optional": true },- "lead2": { "type": "string", "maps_to": "lead_phrase.word[1]", "optional": true },- "lead3": { "type": "string", "maps_to": "lead_phrase.word[2]", "optional": true },- "keyword": { "type": "string", "maps_to": "keyword.content" },- "periodChar": { "type": "string", "maps_to": "keyword.trailing_accent", "optional": true }- },-- "beat_map": {- "comment": "Script-side constants in index.html, filled from <group>.audiomap.json. Content lives in params; musical timing lives here.",- "lead_onsets": [0.557, 0.906],- "keyword_onset": 1.231,- "period_onset": 1.44,- "shuffle": [- { "t": 1.904, "font": 1 },- { "t": 2.392, "font": 2 },- { "t": 2.624, "font": 3 },- { "t": 3.088, "font": 0 }- ],- "duration": 3.85,- "font_presets": 8- },-- "reference_impl": "index.html",- "uses_primitives": ["typewriter_reveal", "content_swap", "negative_space_hold"],-- "transition_out": { "default": "fast_cut", "observed": "surge_drop_cut" },-- "reversed_from": ["bgm-golden-sample-reverse/gorup-by-group/group_2"],- "created": "2026-06-17"-}diff --git a/skills/hyperframes-core/references/sub-compositions.md b/skills/hyperframes-core/references/sub-compositions.mdindex 23a5dcc9af..c873761491 100644--- a/skills/hyperframes-core/references/sub-compositions.md+++ b/skills/hyperframes-core/references/sub-compositions.md@@ -48,15 +48,17 @@ So `<template>` is not just a wrapper — it is the **transport container**. If<template><!-- EVERYTHING the runtime needs goes here: styles, markup, scripts --><style>- .chart-root {+ /* Root: style by #root, never a class. (At render the CSS is scoped to+ data-composition-id, so a class on the root stops matching — see Pitfall 3.) */+ #root {position: absolute;inset: 0;color: #fff;}- /* ... */+ /* .label, #bar, … — descendants, plain selectors */</style>- <div class="chart-root" data-composition-id="data-chart" data-width="1920" data-height="1080">+ <div id="root" data-composition-id="data-chart" data-width="1920" data-height="1080"><!-- sub-composition markup --></div>@@ -83,23 +85,23 @@ Contrast with **standalone** compositions, which put the root directly in `<body<!-- ❌ WRONG — looks normal, ships catastrophically broken --><head><style>- .chart-root { font-size: 88px; ... }+ #root { font-size: 88px; ... }</style></head><body><template>- <div class="chart-root" ...>...</div>+ <div id="root" data-composition-id="data-chart" ...>...</div></template></body>-<!-- ✅ RIGHT — styles are inside the template -->+<!-- ✅ RIGHT — styles are inside the template, root styled by #root (see Pitfall 3) --><head></head><body><template><style>- .chart-root { font-size: 88px; ... }+ #root { font-size: 88px; ... }</style>- <div class="chart-root" ...>...</div>+ <div id="root" data-composition-id="data-chart" ...>...</div></template></body>```@@ -133,6 +135,36 @@ Contrast with **standalone** compositions, which put the root directly in `<body**Symptom:** the render logs `Sub-composition timelines not registered after 45000ms: <host-id>` for every mismatched slot, waits 45s per scene, then captures static initial-state frames (so the video is full-length but no animation plays).+### Pitfall 3 — Styling the root by a class instead of `#root`++```html+<!-- ❌ WRONG — class on the root, stylesheet keyed off it -->+<template>+ <style>+ .frame { position: absolute; inset: 0; background: #faf9f5; }+ .frame .title { font-size: 120px; }+ </style>+ <div id="root" class="frame" data-composition-id="03-scene" ...>+ <div class="title">…</div>+ </div>+</template>++<!-- ✅ RIGHT — root styled by #root, descendants by plain selectors -->+<template>+ <style>+ #root { position: absolute; inset: 0; background: #faf9f5; }+ .title { font-size: 120px; }+ </style>+ <div id="root" data-composition-id="03-scene" ...>+ <div class="title">…</div>+ </div>+</template>+```++**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.+### Verification checklist before render```bash@@ -145,9 +177,14 @@ grep -n "<style\|<script\|<template" compositions/<scene>.htmlgrep "data-composition-id" index.htmlgrep "data-composition-id\|__timelines\[" compositions/<scene>.html# → all three strings must match exactly per scene++# 3) the root is styled by #root, not by a class on the data-composition-id element+grep -n 'data-composition-id=' compositions/<scene>.html+# → that element should NOT also carry a class="…" that the <style> keys off+# (e.g. `.frame { … }`); scoping drops it. Style the root via #root. See Pitfall 3.```-For the runtime end-to-end check (a fast `snapshot` pass + per-scene frame eyeball), see the **Visual smoke test** step in `hyperframes-cli`'s Minimum Completion Gate — that is the only gate that catches these two pitfalls.+For the runtime end-to-end check (a fast `snapshot` pass + per-scene frame eyeball), see the **Visual smoke test** step in `hyperframes-cli`'s Minimum Completion Gate — that is the only gate that catches these three pitfalls.## What HyperFrames Does With the Sub-Compositiondiff --git a/skills/montage/SKILL.md b/skills/montage/SKILL.mddeleted file mode 100644index b266548e17..0000000000--- a/skills/montage/SKILL.md+++ /dev/null@@ -1,324 +0,0 @@-----name: montage-description: >- Author a beat-synced HyperFrames montage from a folder of photos/videos and a- music track — cut each segment on the music's beats and duck the music under- any clip that carries its own audio. Use when the user has (or wants) a music- track and a set of image/video assets and asks for a "montage", "music video",- "photo montage", "beat-synced" / "cut to the beat" / "rhythmic" edit, or a- slideshow driven by the music. Closes the loop from the `hyperframes beats`- CLI output to a finished composition. Docs-only recipe — no engine/runtime- changes; it builds entirely on the shipped `beats` CLI and the core- media/volume contract.-metadata:- { "tags": "montage, beats, beat-synced, music-video, photo-montage, volume-ducking, crossfade" }------# montage — beat-synced montage authoring recipe--A **beat-synced montage** cuts one segment per asset on a steady beat cadence so the picture changes _feel_ the music, and ducks the background music under any clip that brings its own sound. This skill closes the loop that `hyperframes beats` (detection) and Studio beat-snapping (manual) leave open: given a folder of assets + `beats/<audio>.json`, place the cuts on beats and duck the music under each video clip.--**Read `/hyperframes-core` first** for the base composition contract (clips, tracks, `data-*` attributes, the seekable timeline). This recipe only covers what is specific to beat-driven montage: consuming the beats file, segment placement, crossfade exits, and music ducking. It introduces **no new commands** and touches **no engine/runtime code**.--## When to use this skill--Use it when the user has a music track and a set of assets and asks for any of:--- a "montage", "photo montage", "music video", or "highlight reel";-- a "beat-synced", "cut to the beat", or "rhythmic" edit;-- a slideshow/recap whose pacing should follow the music.--Do **not** use it for narrative voiceover pieces (the cadence is the speech, not the music) — that stays in `/general-video` / `/product-launch-video`. If there is no music track at all, there is nothing to sync to; ask first.--## Prerequisites--1. **One music track**, mounted as the music `<audio>`: `data-timeline-role="music"` (the `beats` CLI keys off this — or an id matching `music` / `bgm` / `soundtrack`). This is the track the montage cuts against.-2. **Assets on disk** — photos (`<img>`) and/or video clips. Video clips that carry audible sound get a sibling `<audio>` per the core media contract (see Step 4).--You need the music file present before detecting beats; the assets can be wired in either before or after.--## The loop--### Step 1 — Detect beats, read `beats/<audio>.json`--Run the shipped CLI from the project root (it spawns headless Chrome, so ensure `npx hyperframes browser ensure` first if no browser is on disk):--```bash-npx hyperframes beats # analyzes the music track in ./index.html-npx hyperframes beats --json # same, but prints { ok, file, count, bpm } as JSON-```--The command finds the music `<audio>` (first element with `data-timeline-role="music"`, else the first id matching `music|bgm|soundtrack`), detects beats, and writes:--```-beats/<audio>.json-```--The file is versioned and self-describing — **one `{ time, strength }` per beat**:--```jsonc-{- "version": 1,- "audio": "assets/bgm/track.mp3",- "beats": [- { "time": 0.523, "strength": 0.62 },- { "time": 1.014, "strength": 0.81 },- { "time": 1.505, "strength": 0.43 },- // …- ],-}-```--Read it at build time (the composition must stay deterministic — read the file **offline**, bake the chosen times into the HTML/timeline; never fetch it at render time):--```js-// build-time helper (runs once when authoring, NOT in the composition)-const { beats } = JSON.parse(fs.readFileSync("beats/assets/bgm/track.mp3.json", "utf8"));-// beats: Array<{ time: number, strength: number }>-```--> **0 beats is not an error to bake.** The CLI refuses to _write_ a 0-beat file (a silent/ambient track yields nothing), so a missing file means re-run detection or pick a different track.--### Step 2 — Place one segment per asset on a beat cadence--Pick a cadence — **one segment every Nth beat** — so segment boundaries land exactly on beats. `N` sets the pace:--| Cadence (every Nth beat) | Vibe | Typical BPM × N |-| ------------------------ | ------------------- | ----------------------- |-| every 1 beat | frenetic / intro | fast cuts, ≤ ~0.5s each |-| every 2 beats | energetic default | ~1s each at 120 BPM |-| every 4 beats | relaxed / cinematic | ~2s each at 120 BPM |--Then for asset `i`, assign the segment `[beats[i * N].time, beats[(i + 1) * N].time]`. Use `strength` to bias _which_ beats you cut on (cut on the strongest beats), to drop a segment on a long musical rest, or to land a hero asset on the strongest beat in the track.--```js-// build-time: turn beats + assets into concrete clip times-const N = 2; // every 2nd beat-const slots = assets- .map((asset, i) => {- const startBeat = beats[i * N];- const endBeat = beats[(i + 1) * N];- if (!startBeat || !endBeat) return null; // ran out of beats → stop- return {- asset,- start: Number(startBeat.time.toFixed(3)),- duration: Number((endBeat.time - startBeat.time).toFixed(3)),- };- })- .filter(Boolean);--const totalDuration = Number(slots[slots.length - 1].start + slots[slots.length - 1].duration);-```--Each slot becomes a `.clip` with those exact `data-start` / `data-duration`, all inside one composition whose `data-duration` is `totalDuration`. Consecutive `data-start` values are the **clip boundaries** the crossfade rule in Step 3 keys off.--### Step 3 — Crossfade segments (with the required hard kill)--Between segments, crossfade the outgoing segment's content to `opacity: 0` ending _at_ the next segment's start boundary, then **immediately hard-kill** it with a `tl.set(..., { opacity: 0 }, boundary)` at that same time.--This pair is **required**, not stylistic. The `gsap_exit_missing_hard_kill` lint rule fires whenever a GSAP exit tween (a `.to`/`.fromTo` ending in a hidden state — `opacity: 0`, `autoAlpha: 0`, `visibility: "hidden"`, or `display: "none"`) lands on a clip start boundary without a matching `tl.set`. Non-linear seeking can otherwise stop _after_ the fade and leave stale, half-visible state from the previous segment bleeding through the cut.--```js-// segment A ends at boundary B (the next segment's data-start)-tl.to("#seg-a", { opacity: 0, duration: 0.4, ease: "power2.out" }, B - 0.4);-tl.set("#seg-a", { opacity: 0 }, B); // ← the required hard kill-```--Rules of thumb:--- Animate **`opacity`** (or `autoAlpha`) for crossfades — never `visibility`/`display` on a `.clip` element (that trips `gsap_animates_clip_element`; the framework owns clip visibility).-- The hard kill must use the **same hidden state** the exit tween lands in and sit at the **same time** as the boundary (within 0.05s).-- The **final** segment has no successor boundary, so its closing fade needs no hard kill.--### Step 4 — Duck `#bgm` under each video clip, lift the clip's own `<audio>`--When a segment is a **video clip with its own sound**, duck the music under it so the clip's audio is audible, then lift the music back when the clip ends. Per the core media/volume contract, automate `volume` **on the timeline** (the runtime probes the timeline's volume keyframes and applies them identically in preview and render); `data-volume` is only the static baseline for elements no tween touches.--```js-// clip spans [clipStart, clipEnd]; music baseline is data-volume="0.9"-tl.to("#bgm", { volume: 0.15, duration: 0.3, ease: "power1.inOut" }, clipStart); // duck-tl.to("#bgm", { volume: 0.9, duration: 0.3, ease: "power1.inOut" }, clipEnd - 0.3); // lift-```--Wire the clip's sound the standard way: a muted `<video>` for the picture plus a sibling `<audio>` (same `src`, same timing) carrying the sound at `data-volume="1"`. Photo segments and silent B-roll duck nothing — leave the music at its baseline.--```html-<!-- video clip WITH sound: muted <video> for picture + sibling <audio> for sound -->-<video- class="clip"- id="seg-2-video"- src="assets/clip-2.mp4"- muted- playsinline- data-start="3"- data-duration="3"- data-track-index="2"-></video>-<audio- id="seg-2-audio"- src="assets/clip-2.mp4"- data-start="3"- data-duration="3"- data-track-index="3"- data-volume="1"-></audio>-```--## Worked example--A 9-second, 3-segment montage over a music bed. Beats land every ~1.5s, so every-2nd-beat gives 3s segments at boundaries **3.0s** and **6.0s**. Segment 2 is a video clip with its own audio, so the music ducks under it. This file passes `npx hyperframes lint` with 0 errors once the referenced asset files exist (the `assets/*` paths are placeholders — drop your own media in; lint treats missing local media as errors, not warnings).--```html-<!DOCTYPE html>-<html lang="en">- <head>- <meta charset="utf-8" />- <title>Beat-synced montage</title>- </head>- <body style="margin: 0">- <div- data-composition-id="montage"- data-start="0"- data-duration="9"- data-width="1920"- data-height="1080"- style="position: relative; width: 1920px; height: 1080px; overflow: hidden; background: #0a0a0a"- >- <!-- Music bed: a direct child of the root composition (the media contract —- media is never nested in a sub-comp/wrapper). data-timeline-role="music"- is what `hyperframes beats` targets; data-volume="0.9" is the static- baseline the timeline automates. -->- <audio- id="bgm"- src="assets/bgm/track.mp3"- data-start="0"- data-duration="9"- data-track-index="0"- data-volume="0.9"- data-timeline-role="music"- ></audio>-- <!-- Segment 1 — photo, beats[0] → beats[2] (0.0s → 3.0s) -->- <section- class="clip"- id="seg-1"- data-start="0"- data-duration="3"- data-track-index="1"- style="position: absolute; inset: 0"- >- <img- id="seg-1-img"- src="assets/clip-1.jpg"- alt=""- style="width: 100%; height: 100%; object-fit: cover"- />- <h2- id="seg-1-cap"- style="position: absolute; left: 80px; bottom: 80px; margin: 0; font-family: sans-serif; font-size: 64px; color: #fff"- >- Sunrise- </h2>- </section>-- <!-- Segment 2 — video clip WITH its own audio, beats[2] → beats[4] (3.0s → 6.0s) -->- <video- class="clip"- id="seg-2-video"- src="assets/clip-2.mp4"- muted- playsinline- data-start="3"- data-duration="3"- data-track-index="2"- style="position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover"- ></video>- <audio- id="seg-2-audio"- src="assets/clip-2.mp4"- data-start="3"- data-duration="3"- data-track-index="3"- data-volume="1"- ></audio>-- <!-- Segment 3 — photo, beats[4] → beats[6] (6.0s → 9.0s) -->- <section- class="clip"- id="seg-3"- data-start="6"- data-duration="3"- data-track-index="4"- style="position: absolute; inset: 0"- >- <img- id="seg-3-img"- src="assets/clip-3.jpg"- alt=""- style="width: 100%; height: 100%; object-fit: cover"- />- <h2- id="seg-3-cap"- style="position: absolute; left: 80px; bottom: 80px; margin: 0; font-family: sans-serif; font-size: 64px; color: #fff"- >- Nightfall- </h2>- </section>- </div>-- <script src="https://cdn.jsdelivr.net/npm/gsap@3/dist/gsap.min.js"></script>- <script>- window.__timelines = window.__timelines || {};- const tl = gsap.timeline({ paused: true });- window.__timelines["montage"] = tl;-- // Segment starts land on every 2nd beat: 0.0, 3.0, 6.0. Each outgoing- // segment crossfades to opacity:0 at the next boundary (3.0, 6.0), so each- // fade-out gets a matching tl.set "hard kill" at that boundary — the- // gsap_exit_missing_hard_kill rule. The final segment's closing fade has no- // successor boundary, so it needs no hard kill.-- // Segment 1 out → boundary 3.0- tl.to("#seg-1", { opacity: 0, duration: 0.4, ease: "power2.out" }, 2.6);- tl.set("#seg-1", { opacity: 0 }, 3.0);-- // Segment 2 out → boundary 6.0- tl.to("#seg-2-video", { opacity: 0, duration: 0.4, ease: "power2.out" }, 5.6);- tl.set("#seg-2-video", { opacity: 0 }, 6.0);-- // Final segment fades out at the end (no boundary → no hard kill).- tl.to("#seg-3", { opacity: 0, duration: 0.4, ease: "power2.out" }, 8.6);-- // Duck #bgm under segment 2's video clip (it carries its own audio), then- // lift back to the data-volume="0.9" baseline. The runtime probes these- // volume keyframes and applies them identically in preview and render.- tl.to("#bgm", { volume: 0.15, duration: 0.3, ease: "power1.inOut" }, 3.0);- tl.to("#bgm", { volume: 0.9, duration: 0.3, ease: "power1.inOut" }, 5.7);- </script>- </body>-</html>-```--### What the example demonstrates--- **`data-timeline-role="music"`** on `#bgm` is the hook the `beats` CLI detects against — and `#bgm` is the duck target.-- **Segment boundaries (3.0, 6.0)** are the next clips' `data-start` values; the crossfade fade-outs end on them and each is followed by a `tl.set(..., { opacity: 0 }, boundary)` hard kill.-- **`opacity`** is animated for crossfades — never `visibility`/`display` on a `.clip` (the framework owns clip visibility).-- **`volume` is automated on the timeline**, not by swapping `data-volume`; `data-volume="0.9"` stays the static baseline the lift returns to.-- **The video clip's sound** rides a sibling `<audio>` (muted `<video>` for picture, `<audio>` for sound) — the core media contract.--## Validation--After authoring or editing a montage composition, run:--```bash-npx hyperframes lint # must report 0 error(s) — block on the hard-kill + clip-visibility rules-npx hyperframes validate # headless runtime check — catches missing assets / JS errors-```--Treat both as blockers. The two rules most likely to fire while iterating this recipe:--- `gsap_exit_missing_hard_kill` — a crossfade ends on a clip boundary without the matching `tl.set`. Add the hard kill (Step 3).-- `gsap_animates_clip_element` — you animated `visibility`/`display` on a `.clip`. Move that content into a child `<div>` and target that, or use `opacity`.--When the cut feels off, the fix is almost always the cadence (`N`) or which beats you cut on (favor `strength`) — not the animation. Re-read the beats file and rebake the segment times.diff --git a/skills/music-to-video/SKILL.md b/skills/music-to-video/SKILL.mdnew file mode 100644index 0000000000..70d2ded47c--- /dev/null+++ b/skills/music-to-video/SKILL.md@@ -0,0 +1,189 @@+---+name: music-to-video+description: "Use when the user has a music track (an audio file, or a video to pull audio from) and wants a beat-synced HyperFrames video, calm to hard-hitting. The music drives everything: one analyzer reads it once, the orchestrator lays out the frames and fills a per-frame plan, and one sub-agent builds each frame. Typography and templates are the floor — a complete video needs zero assets — but any images or videos the user supplies are cut into the frames on the same beat grid (beat-cut / ken-burns). The genre (lyric video, slideshow, kinetic promo) falls out of the per-frame choices; the pipeline never branches on it."+---++# music-to-video — one music-grounded, beat-synced video workflow++Use this skill to turn a **music track** into a beat-synced HyperFrames video. You analyze the track once, lay out the frames, fill in a per-frame plan, and build each frame as a composition. The input is a music track plus optional user images or videos — there is **no narration and no website capture**. Typography and templates are the floor (a complete video needs zero assets); any media the user supplies is cut in on the same beat grid.++You are the **orchestrator**. Work in `videos/<project>/`. Run the steps in order and pass each **Gate** before moving on. Two steps need the user: **Step 3** (plan approval) and **Step 6** (render approval). Do every step yourself except **Step 4**, where you dispatch **one sub-agent per frame**. Keep design and motion rules out of this file — they live in `references/` and the `frame-worker` sub-agent.++`SKILL_DIR` = this skill directory. `PROJECT_DIR` = `videos/<project-name>/`.++Workflow: Step 0 setup → `hyperframes.json` + `assets/bgm.mp3`; Step 1 analyze → `audiomap.json`; Step 2 skeleton → `STORYBOARD.md` (frames, groups `TBD`); Step 3 plan → complete `STORYBOARD.md` + `frame.md`; Step 4 build → `compositions/frames/NN-*.html`; Step 5 assemble → `index.html`; Step 6 render → `renders/video.mp4`.++## Two ideas that shape everything++- **One analyzer, and you trust it.** `analyze-beatgrid.py` is the only beat analyzer — never re-measure beats with another tool or by ear. Its energy / density / rolls / onsets / silences are always reliable. Its `bpm` and `beats_sec` are reliable **only when the music is genuinely rhythmic**; on calm music the grid is a metronome the tracker imposed, so pace by phrases and energy instead and never hard-cut to it. Deciding which case you're in is each frame's `pacing` (Step 2).+- **One frame = one file; groups live inside.** Step 2 cuts the track into **frames**, and each frame becomes one composition file `compositions/frames/NN-<frame_id>.html`, built by one frame-worker. A frame can subdivide into **groups** (each a template or a motion-primitives combo). Extra density goes *inside* a group, so **frame count tracks distinct treatments, not beats** — a fast track does not blow up the number of sub-agents.++---++## Step 0: Setup, BGM, and inputs++Goal: Create the HyperFrames project, set the music as the source, and note any user-supplied media.++Initialize only if `hyperframes.json` is missing. Name `<project>` from the brief in kebab-case, such as `midnight-drive-loop` — never a timestamp. The **music is the spine**: copy it to `assets/bgm.mp3` (extract the audio from a video first if the user handed you one). If the user supplied images or videos, stage them so frames can weave them in on the beat grid; if not, typography carries the whole video.++```bash+npx hyperframes init "videos/<project>" --non-interactive --skip-skills --example=blank+mkdir -p "$PROJECT_DIR/assets" "$PROJECT_DIR/renders"+cp "<user-music>" "$PROJECT_DIR/assets/bgm.mp3" # extract from a video first if needed+# only if the user gave you images/videos:+node <SKILL_DIR>/scripts/stage-assets.mjs --from <dir> --hyperframes "$PROJECT_DIR" --into public+```++The **brand** (font + palette) is chosen at Step 3, not here. Don't pick a genre or a track type up front — assets are just an optional ingredient, and the genre emerges from the per-frame choices.++**Gate:** `hyperframes.json` + `assets/bgm.mp3` exist; aspect / length / fps and (if any) the asset inventory are noted.++---++## Step 1: Analyze the music++Goal: Produce the one canonical timing analysis the whole video is built on.++`analyze-beatgrid.py` is the **only** beat analyzer — never re-measure beats with another tool or by ear. It reads the track once and writes `audiomap.json`: energy phases (level / density / feel), onsets + `onset_rate`, rolls, silences, `hard_stops`, `key_moments`, phrases, tempo / grid, and `audio.duration_sec`. It's deterministic — the same file always gives the same map. Most fields are reliable on any music; `bpm` and `beats_sec` are reliable only when the music is genuinely rhythmic, and judging that is the call you make at Step 2.++```bash+python3 <SKILL_DIR>/scripts/analyze-beatgrid.py "$PROJECT_DIR/assets/bgm.mp3" \+ -o "$PROJECT_DIR/audiomap.json" --print+```++**Gate:** `audiomap.json` exists; `audio.duration_sec` is known.++---++## Step 2: Frame skeleton++Goal: Read the music and lay out the frames — the skeleton of `STORYBOARD.md`.++Read [`references/frame-skeleton.md`](references/frame-skeleton.md). Turn `audiomap.json` into the **skeleton** of `STORYBOARD.md` yourself — there is no intermediate JSON. Cut the track into **frames** at real musical changes (`hard_stops`, SURGE / DROP `key_moments`, the edges of a roll, a stretch with no onsets, a big energy jump), snapping every boundary to an audiomap anchor. For each frame set `span_sec`, `pacing` (the verdict from Step 1's trust call — `beat_cut` when the grid is real, `phrase_flow` when it's a metronome imposed on calm music), `mood`, and a one-line `feel` (the plain music situation Step 3 matches a template against). Only classify and lay out here: leave every frame's `### Groups` as `TBD (Step 3)` and the frontmatter `style` blank — no templates, copy, color, or fonts. Expect ~1–6 frames.++**Gate:** frames tile the track (first at 0, last at `duration_s`); each carries `span_sec` + `pacing` + `mood` + `feel`; every `### Groups` is `TBD`; no content anywhere.++---++## Step 3: Plan (user-gated)++Goal: Turn the skeleton into an approved, complete `STORYBOARD.md`.++Read [`references/planning.md`](references/planning.md), [`storyboard-format.md`](references/storyboard-format.md), [`template-catalog.md`](references/template-catalog.md), [`motion-primitive-catalog.md`](references/motion-primitive-catalog.md), and [`montage.md`](references/montage.md) (only if the user supplied assets). Editing the same file in place, do two things:++1. **Pick the brand.** Choose one preset from `../hyperframes-creative/frame-presets/` using the table in `../hyperframes-creative/references/design-spec.md` (match the track's mood; **only its fonts and colors matter** — templates own composition). Copy it into `frame.md` **unmodified** and fill the frontmatter `style` (font + a ≤4–6 swatch palette) from it.+2. **Fill every frame.** Decide its groups and give each a treatment: a matched template from the catalog (with bound params and real audiomap anchors), a free-compose from the primitive catalog, or an asset treatment that **obeys `pacing`**. Write the copy. You own WHAT (template / primitives + content + anchors); the frame-worker owns HOW — **never write millisecond tweens into the storyboard**.++```bash+node <SKILL_DIR>/scripts/validate-plan.mjs --storyboard "$PROJECT_DIR/STORYBOARD.md" \+ --audiomap "$PROJECT_DIR/audiomap.json" --templates <SKILL_DIR>/references/templates+```++Fix every `✗` (hard errors: duration mismatch, frames not tiling the track, a missing `src`); warnings are best-effort. Then show the user a frame-by-frame summary and iterate until they approve.++**Gate:** `frame.md` is a verbatim preset copy; `validate-plan.mjs` exits 0; the user approved the plan.++---++## Step 4: Build frames++Goal: Build every frame as a self-contained composition file.++Create `compositions/frames/`. Read [`sub-agents/frame-worker.md`](sub-agents/frame-worker.md) and `../hyperframes-core/references/subagent-dispatch.md`. Dispatch **one frame-worker per frame**, in parallel where possible (otherwise in waves). Each worker gets exactly one frame and this context:++```text+PROJECT_DIR: <abs path>+frame_id: <NN-frame_id> # = the frame file stem, e.g. 02-f2; the composition id+Your block: the `## Frame N — <frame_id>` block in PROJECT_DIR/STORYBOARD.md+audiomap: PROJECT_DIR/audiomap.json+frame.md: PROJECT_DIR/frame.md+Materials: for each group, <SKILL_DIR>/references/templates/<id>/index.html (templates) and+ <SKILL_DIR>/references/motion-primitives/<id>/ (free); staged assets/ (asset groups)+Contracts: ../hyperframes-core/references/sub-compositions.md + determinism-rules.md+Canvas: <w>×<h> Pacing: <beat_cut|phrase_flow>+Write to: PROJECT_DIR/compositions/frames/<frame_id>.html+```++The worker forks the cited materials, converts every anchor to frame-local seconds (`local_t = track_t − span_sec[0]`), gates its groups with 0ms cuts, and writes one seek-safe frame file. **The worker never runs the `hyperframes` CLI** — those commands operate on the assembled project, which doesn't exist yet, so they'd report on the wrong files. The worker just writes to the contract and stops; you verify after assembly (Step 6). As each worker returns, you can confirm its file landed on disk.++**Gate:** every frame has its `compositions/frames/NN-*.html` on disk.++---++## Step 5: Assemble++Goal: Wire the built frames + BGM into the playable `index.html`.++`assemble-index.mjs` is deterministic — no subagent, no judgment. It references each frame file at its cumulative `data-start`, mounts `assets/bgm.mp3` on track 11, and hard-cuts frame → frame (frames tile the track with no gaps, so there is **no transition injector**).++```bash+node <SKILL_DIR>/scripts/assemble-index.mjs --storyboard "$PROJECT_DIR/STORYBOARD.md" \+ --hyperframes "$PROJECT_DIR" --audiomap "$PROJECT_DIR/audiomap.json"+```++Fix any `✗` it reports — a missing or blank frame file means that worker wrote a partial file; re-dispatch it (Step 4) and re-assemble.++**Gate:** `index.html` exists; total duration == `audiomap.audio.duration_sec`.++---++## Step 6: Verify and render++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.++```bash+( cd "$PROJECT_DIR" && npx hyperframes lint . && npx hyperframes validate . && npx hyperframes inspect . )+```++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**: edit the offending `compositions/frames/NN-*.html` for a local issue; **re-dispatch that one frame-worker** only when a whole frame must be rebuilt; go back to Step 3 only if the plan is creatively wrong. Never change duration or audio timing to hide a sync issue. Once the gates pass, pause for user review, then render only on approval:++```bash+( cd "$PROJECT_DIR" && npx hyperframes render . -q draft -o renders/video.mp4 --fps 30 )+```++**Gate:** `lint` / `validate` / `inspect` passed; the user approved; `renders/video.mp4` exists with audio, duration == `audiomap.audio.duration_sec`. The final reply states the MP4 path and duration.++---++## Resume table++| You have | Continue from |+| -------------------------- | ------------- |+| `assets/bgm.mp3` only | Step 1 |+| `audiomap.json` | Step 2 |+| `STORYBOARD.md` (skeleton) | Step 3 |+| `STORYBOARD.md` (complete) | Step 4 |+| all frame files | Step 5 |+| `index.html` | Step 6 |++## Quick Reference++**Formats:** landscape `1920x1080` by default; portrait `1080x1920`; square `1080x1080`. Set the canvas once in the storyboard frontmatter (`canvas: { w, h, fps }`).++**Scripts** under `scripts/`: `analyze-beatgrid.py` (the one analyzer), `validate-plan.mjs` (plan check), `assemble-index.mjs` (index assembly), `stage-assets.mjs` (stage user media), `lib/storyboard.mjs` (vendored parser). Everything else is the `hyperframes` CLI.++| Read | When |+| ------------------------------------------------------------------------------------------ | ----------------------------------------------------- |+| [`references/frame-skeleton.md`](references/frame-skeleton.md) | Step 2: read the music, lay out the frames, set pacing |+| [`references/planning.md`](references/planning.md) · [`storyboard-format.md`](references/storyboard-format.md) | Step 3: pick the brand, fill each frame, write the plan |+| [`references/template-catalog.md`](references/template-catalog.md) | Step 3: pick a template per group |+| [`references/motion-primitive-catalog.md`](references/motion-primitive-catalog.md) | Step 3/4: L0 recipes for free-compose |+| [`references/montage.md`](references/montage.md) | Step 3/4: asset treatments (beat-cut / ken-burns) |+| [`sub-agents/frame-worker.md`](sub-agents/frame-worker.md) | Step 4: dispatch + build one frame |+| `../hyperframes-core/references/subagent-dispatch.md` | Step 4: dispatch sub-agents safely |+| `../hyperframes-creative/references/design-spec.md` | Step 3: pick the preset (the brand) |++## Directory layout++```+music-to-video/+ SKILL.md+ references/ frame-skeleton.md · planning.md · storyboard-format.md+ template-catalog.md · motion-primitive-catalog.md · montage.md+ templates/<id>/ { index.html (+ assets/ · program.json) } ← L1 catalog impls+ motion-primitives/<id>/ { index.html } (+ shared assets/gsap.min.js) ← L0 catalog impls+ scripts/ analyze-beatgrid.py · assemble-index.mjs · validate-plan.mjs · stage-assets.mjs · lib/storyboard.mjs+ sub-agents/ frame-worker.md ← the one subagent (one per frame)+```diff --git a/skills/music-to-video/references/frame-skeleton.md b/skills/music-to-video/references/frame-skeleton.mdnew file mode 100644index 0000000000..5293b68a6b--- /dev/null+++ b/skills/music-to-video/references/frame-skeleton.md@@ -0,0 +1,94 @@+# Frame skeleton (Step 2) — read the music, lay out the frames++At Step 2 **you (the orchestrator)** read `audiomap.json` and write the **skeleton** of+`STORYBOARD.md` directly: cut the track into **frames** (one frame = one composition file =+one scene), and for each frame set its **span**, its **pacing** (does this stretch want hard+beat-cuts, or calm phrase/energy flow?), its **mood**, and a one-line **feel** note.++You **classify and lay out the spine only.** You do **not** pick templates, write copy, choose+colors/fonts, or decide a frame's groups — those are Step 3 (the plan fills each frame in+place). Leave every frame's `### Groups` as `TBD (Step 3)` and the frontmatter `style` blank.++There is **no intermediate JSON** — the skeleton _is_ the start of `STORYBOARD.md`. Step 3+edits the same file.++## The trust boundary (read this first)++`audiomap.json` is one analyzer's output. Some fields are robust on **any** music; some are+reliable only when the music is **actually rhythmic**. This decides each frame's `pacing`:++| Field | Trust |+| --- | --- |+| `energy_phases[]` (level / energy / density / feel), `events[]` + `onset_rate`, `rolls[]` (and their **absence**), `silences[]`, `hard_stops[]`, `key_moments[]`, `phrases[]`, `audio.duration_sec` | **Always** — robust measurements |+| `tempo.bpm`, `grid.beats_sec` / `downbeats_sec` **precision** | **Only when the music is rhythmic.** On calm / sparse material the beat grid is a metronome the tracker *imposes* (often octave-doubled) — usually **more grid beats than real onsets**. Do **not** anchor cuts to it there. |++- **Grid is reliable** when: rolls present, and/or dense phases, and/or high `onset_rate` with a steady grid.+- **Grid is fictional** when: `rolls`≈0, mostly `sparse` phases, low `onset_rate` → pace by `phrases[]` + `energy_phases[]`, not beats.++## How to lay out frames (run in order)++1. **Gestalt.** From `summary` / `tempo` / `audio.duration_sec` + the roll count, write the+ frontmatter `compositionId`, `duration_s` (== `audio.duration_sec`), `canvas`, and a+ one-line read of the track's density arc.+2. **Cut into frames.** Walk `energy_phases[]` and split where the music genuinely changes+ state — at `hard_stops[]`, `SURGE` / `DROP` `key_moments`, the start/end of a `rolls[]` run,+ an **onset desert** (a long gap in `events[]`), or a big energy-level jump. Collapse adjacent+ phases that are one gesture. Expect **~1–6 frames**; a short clip may be one.+ **Snap every boundary to an audiomap anchor**, then re-snap to the nearest `beats_sec`+ (tolerance ≤ ½ beat) **only when the grid is reliable**; on calm material snap to+ `phrases[]` / `energy_phases[]` edges instead. Frames **tile the track** (first at 0, last+ at `duration_s`, no gaps/overlaps).+3. **Per frame, set `pacing`** — the trust-boundary call:+ - **`beat_cut`** — genuinely rhythmic: a roll present, **or** dense, **or** (clearly high `onset_rate` **and** a steady grid). Hard cuts / per-onset reveals may anchor to beats.+ - **`phrase_flow`** — calm / sparse: `rolls`≈0, mostly sparse, low `onset_rate`. Do **not** anchor hard cuts to the grid; pace by `phrases[]` + the energy envelope (slow crossfades, long holds).+4. **Per frame, tag `mood`** (1–3 of: `warm` · `dark` · `hype` · `elegant` · `glitch` ·+ `cinematic` · `playful` · `tense` · `dreamy` · `aggressive`) from `energy_phases[].feel` ++ energy + any genre cue in the brief/title.+5. **Per frame, write a one-line `feel`** — the plain-language music situation Step 3 matches a+ template against (e.g. "accelerating onset stream into a held downbeat", "calm held pad, one+ onset desert", "fast sustained-fill roll, no readable message"). This is what the planner+ reads against the catalog's **Reach for it when** — keep it concrete, drawn from the robust+ fields, never invented.++## What the skeleton looks like++A valid `STORYBOARD.md` with the spine set and every frame's treatment left for Step 3+(full syntax in [`storyboard-format.md`](storyboard-format.md)):++```markdown+---+compositionId: bgm+duration_s: 30.0 # == audiomap.audio.duration_sec+canvas: { w: 1920, h: 1080, fps: 30 }+style: # blank — Step 3 fills it from the chosen frame.md preset+build_notes: ["one paused timeline per frame", "no remote assets"]+---++## Frame 1 — f1+- src: compositions/frames/01-f1.html+- duration: 7.198s # = span length; assembler sums these for cumulative data-start+- span_sec: [0.0, 7.198] # track seconds; frames tile the track+- pacing: beat_cut+- mood: [hype]+- feel: accelerating onset stream building into a held downbeat+### Groups+- TBD (Step 3)++## Frame 2 — f2+- src: compositions/frames/02-f2.html+- duration: 10.4s+- span_sec: [7.198, 17.598]+- pacing: phrase_flow+- mood: [warm, cinematic]+- feel: calm held pad, one long onset desert+### Groups+- TBD (Step 3)+```++## Self-check++- `duration_s == audiomap.audio.duration_sec`; frames tile the track gap-free (first at 0, last at `duration_s`).+- Every frame has `src` + `span_sec` + `duration` + `pacing` + `mood` + a one-line `feel`.+- `pacing` was set from the **robust** fields (energy / density / rolls / onset_rate), never from `bpm` / `beats_sec` alone.+- No frame boundary sits inside a `rolls[]` run or leaves a sub-1-bar fragment.+- Every frame's `### Groups` is `TBD (Step 3)`; `style` is blank. **No template, copy, color, or font anywhere.**diff --git a/skills/music-to-video/references/montage.md b/skills/music-to-video/references/montage.mdnew file mode 100644index 0000000000..2dc7bd9e3d--- /dev/null+++ b/skills/music-to-video/references/montage.md@@ -0,0 +1,55 @@+# Asset treatments — weaving user media onto the beat spine++When the user supplies images/videos, a group can be an **asset treatment** instead of a+typographic template/free-compose. Assets are an **additive ingredient on the same beat+spine** — never a separate pipeline. Typography/templates stay the floor: if no asset fits a+group, fall back to a template/free group (a complete video needs zero assets).++The planner (Step 3) picks the treatment and the clips + anchors (WHAT); the frame-worker+realizes it inside the frame file (HOW). **Obey the frame's `pacing`.**++## The three treatments++### `beat_cut` — one clip per anchor (only on a `beat_cut` frame)+The asset-driven analogue of a per-onset typographic group: cut to a new clip on each anchor+(the frame's beats/onsets from the audiomap). Each clip is a `class="clip"` element+(`<img>` for a photo, **muted** `<video>` for a motion clip) placed at its anchor with+`data-start`/`data-duration`/`data-track-index` per the core clip contract. Between clips,+crossfade the outgoing content to `opacity:0` ending **at** the next anchor, then immediately+**hard-kill** with a `tl.set(..., {opacity:0}, anchor)` — this pair is required (the+`gsap_exit_missing_hard_kill` lint rule; non-linear seeking otherwise bleeds stale frames).+Cut on the **strong** anchors; land a hero clip on a `key_moment`/downbeat.++### `ken_burns` — slow push on one clip (fits a `phrase_flow` frame)+For calm frames: one clip held over the span with a slow scale/translate push (e.g. scale+1.0→1.08 + a small drift) eased across the whole `span_sec` — paced by the frame, not by+beats. No hard cuts. Crossfade in/out at the frame edges. This is the right asset treatment+when the beat grid is unreliable (calm music).++### `bg_under_text` — clip dimmed behind a template/free group+A full-bleed clip dimmed ~30–50% as the background of a group whose foreground is a template+or free-compose typographic treatment. The text rides on the same anchors; the clip is the+bed. Use when the user wants their footage present but the message must stay readable.++## Rules++- **`pacing` decides the treatment**: `beat_cut` only on a `beat_cut` frame; on a+ `phrase_flow` frame use `ken_burns` or a slow crossfade — **never** per-onset hard cuts on+ the (unreliable) calm grid.+- **Clips are muted; the root owns audio.** Mount each `<video class="clip">` **muted**, as a+ direct child of the frame root (never nested in another timed element, or the renderer+ freezes it). The BGM is the only audio in v1.+- **Crossfades animate `opacity`/`autoAlpha`**, never `visibility`/`display` on a `.clip`+ (the framework owns clip visibility — that trips `gsap_animates_clip_element`).+- **Backgrounds dim ~30–50%** so any foreground text stays legible.+- Anchors are **track seconds from `audiomap.json`**; the worker subtracts the frame start+ to get frame-local time.+- Local staged assets only (`assets/` via `stage-assets.mjs`); never remote URLs.++## Deferred hook (not v1)++A clip that should play **its own sound** (interview cut, lyric clip) needs a sibling+`<audio>` mounted at the **root** by the assembler, with the BGM ducked under it (timeline+volume automation: `tl.to("#el-bgm",{volume:0.15,…},clipStart)` … `tl.to(…,{volume:0.9,…},+clipEnd)`). The frame-worker mounts no audio. Keep clips muted in v1; wire clip-audio ++ducking only when the user asks.diff --git a/skills/music-to-video/references/motion-primitive-catalog.md b/skills/music-to-video/references/motion-primitive-catalog.mdnew file mode 100644index 0000000000..c8281aa755--- /dev/null+++ b/skills/music-to-video/references/motion-primitive-catalog.md@@ -0,0 +1,95 @@+# Motion-primitive catalog — the free-compose menu++The atomic layer: one anchor → one micro-move. Templates ([`template-catalog.md`](template-catalog.md))+are built from these; when no template fits a group, the planner **free-composes** by naming+primitives from here, and the frame-worker realizes them. Two readers, one file:++- **Planner (Step 3)** — scan **what it does** + **anchor** to pick the primitives a free group rides. Selection only.+- **Frame-worker (Step 4)** — open the cited recipe and lift its tweens. Build only.++The **recipe** column says what to lift:++- **✓** — a runnable, lint-clean composition at `motion-primitives/<id>/index.html`. Open it and lift the tweens.+- **≈ `<id>`** — no separate file; use that recipe, it's the same idea.+- **—** — no file; implement inline from the description (a one-liner, e.g. a 0ms `tl.set`, or a move a template realizes internally).++## Timing & latency (applies to every primitive)++Quantified from frame-accurate reverse engineering of beat-synced reels:++- **Hard hits are 0ms.** Cuts, palette flips, content swaps, freezes are `tl.set(...)` with no duration — the percussion _is_ the motion. Easing a hit kills it.+- **Lead the anchor.** A move that must _land_ on a beat (a wipe covering the frame, a count-up locking, two blocks colliding) starts **~40–190ms early** so it completes ON the anchor. Reactive entrances (something appearing _because_ of the hit) fire 0–45ms after.+- **Eased entrances: 300–500ms** (scale punch, slides, camera pushes). **Macro builds: 800–2000ms** spanning a whole roll / silence.+- **Magnitudes:** scale-punch 0→1; weight pulse 1→1.06; hero fill up to 1→5; chromatic split ~20px, resolve clean in ≤150ms.+- **Per-bar caps:** one accumulating element per hit (not a burst); a camera move at most once per phrase, never per beat; a dense flip/strobe system runs ≤2–3s.+- **Tension-builds lock.** A count-up / sequential build / morph must _resolve on_ a downbeat or hard_stop, never trail off mid-bar.++## Catalog++Each runnable recipe is self-contained and lint-clean: showcase chrome stripped, system-font+fallback, shared `../assets/gsap.min.js`, one paused timeline on `window.__timelines["main"]`.++| id | anchor | what it does | recipe |+| -------------------- | -------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | --------------------- |+| `hypercut-whip` | beat / hard_stop | fast whip-pan hard cut between frames | ✓ |+| `kinetic-letter-in` | downbeat / phrase | per-letter kinetic entrance | ✓ |+| `braam-punch` | drop / surge | big "braam" impact — scale + weight slam | ✓ |+| `chromatic-split` | snare / glitch / surge | RGB channel split / glitch on a word | ✓ |+| `mask-reveal` | section_start / downbeat | clip-path mask wipe reveal | ✓ |+| `screen-shake` | drop / crash / kick | camera / screen shake jitter | ✓ |+| `binary-decrypt` | roll / build | scramble→decode text (binary → word) | ✓ |+| `dolly-zoom` | phrase / build | vertigo dolly-zoom (scale vs perspective) | ✓ |+| `iris-open` | section_start / reveal | circular iris-open reveal | ✓ |+| `electric-arc` | accent / glitch | electric arc / lightning accent | ✓ |+| `neon-flicker` | hold / texture | neon-sign flicker | ✓ |+| `chrome-sweep` | downbeat / reveal | metallic specular sweep across text | ✓ |+| `slot-machine-reveal`| roll → downbeat | slot-machine spin-to-land character reveal | ✓ |+| `liquid-morph` | phrase / transition | liquid / blob morph | ✓ |+| `gooey-metaball` | build / drop | gooey metaball merge field | ✓ |+| `3d-card-flip` | downbeat / swap | 3D card flip (rotateY) | ✓ |+| `crash-zoom-in` | drop / surge | violent crash zoom-in | ✓ |+| `spotlight-sweep` | reveal / hold | spotlight / gradient sweep over text | ✓ |+| `outline-to-fill` | downbeat / reveal | stroke outline → solid fill | ✓ |+| `counting-punch` | roll → downbeat | number count-up that punches & locks | ✓ |+| `particle-burst` | drop / crash | particle explosion burst | ✓ |+| `radial-burst-lines` | drop / surge | radial speed-lines burst | ✓ |+| `pixel-dissolve` | transition / hard_stop | pixelated dissolve | ✓ |+| `datamosh-smear` | glitch / transition | datamosh / motion smear | ✓ |+| `text-wave-distort` | hold / texture | wavy text distortion | ✓ |+| `bg-flow-field` | energy / whole span (bed) | generative WebGL curl-noise flow-field **background bed** — palette-driven, breathes on the energy envelope; compose any foreground move over it | ✓ |+| `blur-resolve` | stop / final hold | blur-in to crisp focus, then blur-out on the cut | ✓ |+| `chromatic-pressure` | snare / glitch | RGB split / digital tension on a transient | ≈ `chromatic-split` |+| `color-grid-shuffle` | onset | grid of cells recoloured by a deterministic index per onset | — |+| `content-swap` | beat | 0ms swap of stacked nodes — the workhorse percussive move | ≈ `slot-machine-reveal` |+| `directional-fill` | beat / reveal | directional wipe-fill (scaleX) sweeping across bars | ✓ |+| `flash-cut` | drop / crash | full-frame flash masking a word / colour state change | ✓ |+| `freeze-hold` | hard_stop | freeze the moving system and hold it (desaturate + vignette) | — |+| `hard-cut` | beat / hard_stop | sample-accurate 0ms colour-block + word cut | ✓ |+| `mosaic-pack` | beat / build | scattered tiles fly in and pack into a grid | ✓ |+| `negative-space-hold`| silence / hard_stop / final hold | kill busy layers, hold one readable mark in empty space | — |+| `overlay-pop` | accent | badge / lower-third overlay pops in over a base | — |+| `palette-flip` | section change | same layout re-skins via 0ms palette-variable flips | ✓ |+| `staggered-exit` | phrase / transition | ordered cascade-out clearing the frame | ✓ |+| `staggered-reveal` | build | ordered cascade-in of a stack / list | — |+| `system-replace` | drop / regime change | hard-cut the entire visual system, then boot the new one | — |+| `text-spectral-rays` | phrase / sweep (hero text) | volumetric spectral light-rays cast by a wordmark toward a sweeping light cursor — grain + RGB-split; **WebGL hero-text system** | ✓ |+| `tile-mosaic` | build / reveal | grid of tiles revealed in a diagonal sweep, assembling a poster | ✓ |+| `typewriter-reveal` | roll / build | char / word type-on, explicit per-span set (no `stagger`) + caret | ✓ |+| `value-counter` | roll → downbeat | count-up that locks on a downbeat / hard_stop | ≈ `counting-punch` |+| `word-grid-burst` | onsets → downbeat | grid of words revealed per onset, refocus one on a downbeat | ✓ |++> **Template-private verbs.** Some templates declare moves realized only inside their own+> impl — `held_lockup`, `anchor_pop_in`, `word_slot_cycle`, `per_line_color`,+> `scene_palette_flip`, `beat_jitter_shake`, `box_zoom_wipe` (`split-anchor-word-slot`),+> `motion-blur` (`logo-split-lockup-pulse`). Those live in the template's `index.html`, not here.++## How to combine++- One dominant system per group; layer at most one texture recipe over one structural recipe.+- Structure on strong beats (cuts, camera, `system-replace` → downbeat / phrase / section_start); texture on weak / syncopated hits (`content-swap`, typewriter letters, chromatic accents).+- A roll is an accumulation container — build during it, hard-cut to a clean layout on the downbeat that ends it.+- `drop` ≠ `downbeat`: a downbeat is a cut within the regime; a drop is a regime change (`system-replace`, total clear, element-count jump).+- Let silence remove density (`negative-space-hold`).+- **Background beds are a layer, not a move.** A bed (`bg-flow-field`) runs the whole span on the **energy / phrase** channel, leaving the **beat anchors** free for the foreground — so it composes cleanly _under_ any discrete primitive. One bed at a time; merge the bed's uniform tweens onto the group's master timeline (don't run a second timeline), bundle a local `three`/WebGL (no CDN), repaint via the timeline's `onUpdate` (no rAF).+- **WebGL "system" primitives come in two roles:** a **bed** (`bg-flow-field`, behind everything) and a **hero-text treatment** (`text-spectral-rays`, which rasterizes the wordmark and _is_ the hero). Use at most one of each; feed text/raster locally (no CDN fonts), repaint via `onUpdate`.+- **`text-spectral-rays` renders its OWN wordmark — never give the word a second source.** It draws the solid letters AND the rays from one glyph mask (perfectly registered). Do NOT use it as a "rays-only" layer behind a separate DOM logo (or stack `content-swap` / `chromatic-pressure` on the same word): the two fonts/positions won't match and you get a doubled / ghosted wordmark — deleting the shader's letter terms does not fix it (the ray mask is still the second, misaligned copy). Let the shader be the wordmark; hide any DOM logo (keep it only as an invisible layout spacer). If you move the word off frame-center, move the light cursor's `y` by the same amount. Full recipe: [`motion-primitives/text-spectral-rays/USAGE.md`](motion-primitives/text-spectral-rays/USAGE.md).diff --git a/skills/bgm-to-video/references/motion-primitives/18-3d_card_flip/index.html b/skills/music-to-video/references/motion-primitives/3d-card-flip/index.htmlsimilarity index 100%rename from skills/bgm-to-video/references/motion-primitives/18-3d_card_flip/index.htmlrename to skills/music-to-video/references/motion-primitives/3d-card-flip/index.htmldiff --git a/skills/bgm-to-video/references/motion-primitives/bg_flow_field/index.html b/skills/music-to-video/references/motion-primitives/bg-flow-field/index.htmlsimilarity index 100%rename from skills/bgm-to-video/references/motion-primitives/bg_flow_field/index.htmlrename to skills/music-to-video/references/motion-primitives/bg-flow-field/index.htmldiff --git a/skills/bgm-to-video/references/motion-primitives/08-binary_decrypt/index.html b/skills/music-to-video/references/motion-primitives/binary-decrypt/index.htmlsimilarity index 100%rename from skills/bgm-to-video/references/motion-primitives/08-binary_decrypt/index.htmlrename to skills/music-to-video/references/motion-primitives/binary-decrypt/index.htmldiff --git a/skills/bgm-to-video/references/motion-primitives/blur_resolve/index.html b/skills/music-to-video/references/motion-primitives/blur-resolve/index.htmlsimilarity index 100%rename from skills/bgm-to-video/references/motion-primitives/blur_resolve/index.htmlrename to skills/music-to-video/references/motion-primitives/blur-resolve/index.htmldiff --git a/skills/bgm-to-video/references/motion-primitives/03-braam_punch/index.html b/skills/music-to-video/references/motion-primitives/braam-punch/index.htmlsimilarity index 100%rename from skills/bgm-to-video/references/motion-primitives/03-braam_punch/index.htmlrename to skills/music-to-video/references/motion-primitives/braam-punch/index.htmldiff --git a/skills/bgm-to-video/references/motion-primitives/04-chromatic_split/index.html b/skills/music-to-video/references/motion-primitives/chromatic-split/index.htmlsimilarity index 100%rename from skills/bgm-to-video/references/motion-primitives/04-chromatic_split/index.htmlrename to skills/music-to-video/references/motion-primitives/chromatic-split/index.htmldiff --git a/skills/bgm-to-video/references/motion-primitives/13-chrome_sweep/index.html b/skills/music-to-video/references/motion-primitives/chrome-sweep/index.htmlsimilarity index 100%rename from skills/bgm-to-video/references/motion-primitives/13-chrome_sweep/index.htmlrename to skills/music-to-video/references/motion-primitives/chrome-sweep/index.htmldiff --git a/skills/bgm-to-video/references/motion-primitives/22-counting_punch/index.html b/skills/music-to-video/references/motion-primitives/counting-punch/index.htmlsimilarity index 100%rename from skills/bgm-to-video/references/motion-primitives/22-counting_punch/index.htmlrename to skills/music-to-video/references/motion-primitives/counting-punch/index.htmldiff --git a/skills/bgm-to-video/references/motion-primitives/19-crash_zoom_in/index.html b/skills/music-to-video/references/motion-primitives/crash-zoom-in/index.htmlsimilarity index 100%rename from skills/bgm-to-video/references/motion-primitives/19-crash_zoom_in/index.htmlrename to skills/music-to-video/references/motion-primitives/crash-zoom-in/index.htmldiff --git a/skills/bgm-to-video/references/motion-primitives/27-datamosh_smear/index.html b/skills/music-to-video/references/motion-primitives/datamosh-smear/index.htmlsimilarity index 100%rename from skills/bgm-to-video/references/motion-primitives/27-datamosh_smear/index.htmlrename to skills/music-to-video/references/motion-primitives/datamosh-smear/index.htmldiff --git a/skills/bgm-to-video/references/motion-primitives/directional_fill/index.html b/skills/music-to-video/references/motion-primitives/directional-fill/index.htmlsimilarity index 100%rename from skills/bgm-to-video/references/motion-primitives/directional_fill/index.htmlrename to skills/music-to-video/references/motion-primitives/directional-fill/index.htmldiff --git a/skills/bgm-to-video/references/motion-primitives/09-dolly_zoom/index.html b/skills/music-to-video/references/motion-primitives/dolly-zoom/index.htmlsimilarity index 100%rename from skills/bgm-to-video/references/motion-primitives/09-dolly_zoom/index.htmlrename to skills/music-to-video/references/motion-primitives/dolly-zoom/index.htmldiff --git a/skills/bgm-to-video/references/motion-primitives/11-electric_arc/index.html b/skills/music-to-video/references/motion-primitives/electric-arc/index.htmlsimilarity index 100%rename from skills/bgm-to-video/references/motion-primitives/11-electric_arc/index.htmlrename to skills/music-to-video/references/motion-primitives/electric-arc/index.htmldiff --git a/skills/bgm-to-video/references/motion-primitives/flash_cut/index.html b/skills/music-to-video/references/motion-primitives/flash-cut/index.htmlsimilarity index 100%rename from skills/bgm-to-video/references/motion-primitives/flash_cut/index.htmlrename to skills/music-to-video/references/motion-primitives/flash-cut/index.htmldiff --git a/skills/bgm-to-video/references/motion-primitives/17-gooey_metaball/index.html b/skills/music-to-video/references/motion-primitives/gooey-metaball/index.htmlsimilarity index 100%rename from skills/bgm-to-video/references/motion-primitives/17-gooey_metaball/index.htmlrename to skills/music-to-video/references/motion-primitives/gooey-metaball/index.htmldiff --git a/skills/bgm-to-video/references/motion-primitives/hard_cut/index.html b/skills/music-to-video/references/motion-primitives/hard-cut/index.htmlsimilarity index 100%rename from skills/bgm-to-video/references/motion-primitives/hard_cut/index.htmlrename to skills/music-to-video/references/motion-primitives/hard-cut/index.htmldiff --git a/skills/bgm-to-video/references/motion-primitives/01-hypercut_whip/index.html b/skills/music-to-video/references/motion-primitives/hypercut-whip/index.htmlsimilarity index 100%rename from skills/bgm-to-video/references/motion-primitives/01-hypercut_whip/index.htmlrename to skills/music-to-video/references/motion-primitives/hypercut-whip/index.htmldiff --git a/skills/bgm-to-video/references/motion-primitives/10-iris_open/index.html b/skills/music-to-video/references/motion-primitives/iris-open/index.htmlsimilarity index 100%rename from skills/bgm-to-video/references/motion-primitives/10-iris_open/index.htmlrename to skills/music-to-video/references/motion-primitives/iris-open/index.htmldiff --git a/skills/bgm-to-video/references/motion-primitives/02-kinetic_letter_in/index.html b/skills/music-to-video/references/motion-primitives/kinetic-letter-in/index.htmlsimilarity index 100%rename from skills/bgm-to-video/references/motion-primitives/02-kinetic_letter_in/index.htmlrename to skills/music-to-video/references/motion-primitives/kinetic-letter-in/index.htmldiff --git a/skills/bgm-to-video/references/motion-primitives/16-liquid_morph/index.html b/skills/music-to-video/references/motion-primitives/liquid-morph/index.htmlsimilarity index 100%rename from skills/bgm-to-video/references/motion-primitives/16-liquid_morph/index.htmlrename to skills/music-to-video/references/motion-primitives/liquid-morph/index.htmldiff --git a/skills/bgm-to-video/references/motion-primitives/05-mask_reveal/index.html b/skills/music-to-video/references/motion-primitives/mask-reveal/index.htmlsimilarity index 100%rename from skills/bgm-to-video/references/motion-primitives/05-mask_reveal/index.htmlrename to skills/music-to-video/references/motion-primitives/mask-reveal/index.htmldiff --git a/skills/bgm-to-video/references/motion-primitives/mosaic_pack/index.html b/skills/music-to-video/references/motion-primitives/mosaic-pack/index.htmlsimilarity index 100%rename from skills/bgm-to-video/references/motion-primitives/mosaic_pack/index.htmlrename to skills/music-to-video/references/motion-primitives/mosaic-pack/index.htmldiff --git a/skills/bgm-to-video/references/motion-primitives/12-neon_flicker/index.html b/skills/music-to-video/references/motion-primitives/neon-flicker/index.htmlsimilarity index 100%rename from skills/bgm-to-video/references/motion-primitives/12-neon_flicker/index.htmlrename to skills/music-to-video/references/motion-primitives/neon-flicker/index.htmldiff --git a/skills/bgm-to-video/references/motion-primitives/21-outline_to_fill/index.html b/skills/music-to-video/references/motion-primitives/outline-to-fill/index.htmlsimilarity index 100%rename from skills/bgm-to-video/references/motion-primitives/21-outline_to_fill/index.htmlrename to skills/music-to-video/references/motion-primitives/outline-to-fill/index.htmldiff --git a/skills/bgm-to-video/references/motion-primitives/palette_flip/index.html b/skills/music-to-video/references/motion-primitives/palette-flip/index.htmlsimilarity index 100%rename from skills/bgm-to-video/references/motion-primitives/palette_flip/index.htmlrename to skills/music-to-video/references/motion-primitives/palette-flip/index.htmldiff --git a/skills/bgm-to-video/references/motion-primitives/24-particle_burst/index.html b/skills/music-to-video/references/motion-primitives/particle-burst/index.htmlsimilarity index 100%rename from skills/bgm-to-video/references/motion-primitives/24-particle_burst/index.htmlrename to skills/music-to-video/references/motion-primitives/particle-burst/index.htmldiff --git a/skills/bgm-to-video/references/motion-primitives/26-pixel_dissolve/index.html b/skills/music-to-video/references/motion-primitives/pixel-dissolve/index.htmlsimilarity index 100%rename from skills/bgm-to-video/references/motion-primitives/26-pixel_dissolve/index.htmlrename to skills/music-to-video/references/motion-primitives/pixel-dissolve/index.htmldiff --git a/skills/bgm-to-video/references/motion-primitives/25-radial_burst_lines/index.html b/skills/music-to-video/references/motion-primitives/radial-burst-lines/index.htmlsimilarity index 100%rename from skills/bgm-to-video/references/motion-primitives/25-radial_burst_lines/index.htmlrename to skills/music-to-video/references/motion-primitives/radial-burst-lines/index.htmldiff --git a/skills/bgm-to-video/references/motion-primitives/07-screen_shake/index.html b/skills/music-to-video/references/motion-primitives/screen-shake/index.htmlsimilarity index 100%rename from skills/bgm-to-video/references/motion-primitives/07-screen_shake/index.htmlrename to skills/music-to-video/references/motion-primitives/screen-shake/index.htmldiff --git a/skills/bgm-to-video/references/motion-primitives/15-slot_machine_reveal/index.html b/skills/music-to-video/references/motion-primitives/slot-machine-reveal/index.htmlsimilarity index 100%rename from skills/bgm-to-video/references/motion-primitives/15-slot_machine_reveal/index.htmlrename to skills/music-to-video/references/motion-primitives/slot-machine-reveal/index.htmldiff --git a/skills/bgm-to-video/references/motion-primitives/20-spotlight_sweep/index.html b/skills/music-to-video/references/motion-primitives/spotlight-sweep/index.htmlsimilarity index 100%rename from skills/bgm-to-video/references/motion-primitives/20-spotlight_sweep/index.htmlrename to skills/music-to-video/references/motion-primitives/spotlight-sweep/index.htmldiff --git a/skills/bgm-to-video/references/motion-primitives/staggered_exit/index.html b/skills/music-to-video/references/motion-primitives/staggered-exit/index.htmlsimilarity index 100%rename from skills/bgm-to-video/references/motion-primitives/staggered_exit/index.htmlrename to skills/music-to-video/references/motion-primitives/staggered-exit/index.htmldiff --git a/skills/bgm-to-video/references/motion-primitives/text_spectral_rays/USAGE.md b/skills/music-to-video/references/motion-primitives/text-spectral-rays/USAGE.mdsimilarity index 92%rename from skills/bgm-to-video/references/motion-primitives/text_spectral_rays/USAGE.mdrename to skills/music-to-video/references/motion-primitives/text-spectral-rays/USAGE.mdindex bbe7c89cd8..1b261eb671 100644--- a/skills/bgm-to-video/references/motion-primitives/text_spectral_rays/USAGE.md+++ b/skills/music-to-video/references/motion-primitives/text-spectral-rays/USAGE.md@@ -1,6 +1,6 @@-# Using `text_spectral_rays` — it OWNS its wordmark+# Using `text-spectral-rays` — it OWNS its wordmark-`text_spectral_rays` is a **self-contained WebGL hero-text renderer**. From ONE rasterized+`text-spectral-rays` is a **self-contained WebGL hero-text renderer**. From ONE rasterizedglyph mask it draws **both** the solid wordmark **and** the spectral rays that emanate fromit. Letters and rays share the same mask, so they are always perfectly registered.@@ -38,5 +38,5 @@ The ghost / doubled-wordmark artifact comes from splitting the word across two s## Pairs with-A background bed (`bg_flow_field`) or **separate** supporting elements (tagline, CTA, rule)+A background bed (`bg-flow-field`) or **separate** supporting elements (tagline, CTA, rule)— never a second treatment of its own word.diff --git a/skills/bgm-to-video/references/motion-primitives/text_spectral_rays/index.html b/skills/music-to-video/references/motion-primitives/text-spectral-rays/index.htmlsimilarity index 100%rename from skills/bgm-to-video/references/motion-primitives/text_spectral_rays/index.htmlrename to skills/music-to-video/references/motion-primitives/text-spectral-rays/index.htmldiff --git a/skills/bgm-to-video/references/motion-primitives/28-text_wave_distort/index.html b/skills/music-to-video/references/motion-primitives/text-wave-distort/index.htmlsimilarity index 100%rename from skills/bgm-to-video/references/motion-primitives/28-text_wave_distort/index.htmlrename to skills/music-to-video/references/motion-primitives/text-wave-distort/index.htmldiff --git a/skills/bgm-to-video/references/motion-primitives/tile_mosaic/index.html b/skills/music-to-video/references/motion-primitives/tile-mosaic/index.htmlsimilarity index 100%rename from skills/bgm-to-video/references/motion-primitives/tile_mosaic/index.htmlrename to skills/music-to-video/references/motion-primitives/tile-mosaic/index.htmldiff --git a/skills/bgm-to-video/references/motion-primitives/typewriter_reveal/index.html b/skills/music-to-video/references/motion-primitives/typewriter-reveal/index.htmlsimilarity index 100%rename from skills/bgm-to-video/references/motion-primitives/typewriter_reveal/index.htmlrename to skills/music-to-video/references/motion-primitives/typewriter-reveal/index.htmldiff --git a/skills/bgm-to-video/references/motion-primitives/word_grid_burst/index.html b/skills/music-to-video/references/motion-primitives/word-grid-burst/index.htmlsimilarity index 100%rename from skills/bgm-to-video/references/motion-primitives/word_grid_burst/index.htmlrename to skills/music-to-video/references/motion-primitives/word-grid-burst/index.htmldiff --git a/skills/music-to-video/references/planning.md b/skills/music-to-video/references/planning.mdnew file mode 100644index 0000000000..5b08bbaa23--- /dev/null+++ b/skills/music-to-video/references/planning.md@@ -0,0 +1,100 @@+# Planning (Step 3) — pick the brand, fill every frame++At Step 3 **you (the orchestrator)** turn the Step-2 skeleton into a complete, approved+`STORYBOARD.md`. You edit the **same file** in place: pick the brand spine, then for each+frame decide its **groups**, give each group a treatment, bind real beat anchors, and write+the copy.++Your mantra: **music is the spine; a template is a head start, not a cage; typography is the+floor and assets are an optional ingredient on the same beat grid.**++**You own WHAT, not HOW.** You name the template / primitives, the content, the brand, the+anchor seconds, and the intent. The frame-worker (Step 4) decides HOW — micro-timing,+realization, intra-frame cuts. **Never write millisecond tweens into the storyboard.**++## Inputs++- The Step-2 skeleton already in `STORYBOARD.md` — frames with `span_sec` + `pacing` + `mood` + `feel`.+- `audiomap.json` — timing truth; read the real anchor seconds inside each frame's span.+- [`template-catalog.md`](template-catalog.md) — the template selection menu.+- [`motion-primitive-catalog.md`](motion-primitive-catalog.md) — the free-compose menu (L0 recipes).+- [`montage.md`](montage.md) — asset treatments (only if the user supplied images/videos).+- User brief / supplied copy — topic, mood, exact words to keep.++## Step A — pick the brand spine (one preset, unmodified)++The whole video shares one type family + palette. Pick **one ready-made preset** from+`../hyperframes-creative/frame-presets/` using the preset table in+`../hyperframes-creative/references/design-spec.md` — choose by the track's mood + the brief,+and **only its fonts + colors matter** (templates own composition + motion; the preset only+sets the look). Copy it in **unmodified**:++```bash+cp ../hyperframes-creative/frame-presets/<preset>/FRAME.md "$PROJECT_DIR/frame.md"+```++Then fill the storyboard frontmatter `style` from it: the `font` from its `typography:` and a+≤4–6 swatch `palette` from its `colors:`. **Quote the hex / family verbatim — never invent or+round.** Every group's palette params draw from this one palette; that unity is what makes+different templates read as one piece.++## Step B — per frame, decide its groups++A frame is usually **one group** (one template or one free composition spanning the frame).+Subdivide into 2+ groups **only when a single treatment can't cover the frame** — e.g. a busy+opener plus a closing lockup. When you split, cut at a **real audiomap anchor** inside the+frame's span (a `key_moment` / `phrase` edge / onset-cluster gap), **never inside a `rolls[]`+run**, and keep every group **≥ ~1 bar**. Density does **not** force more groups — a dense+frame is usually ONE group whose template absorbs the density internally (a meta-template like+`poster-tile-mosaic`). **Group count tracks distinct treatments, not beats.**++## Step C — per group, pick a treatment (exactly one of three)++### A. Match a template+Read [`template-catalog.md`](template-catalog.md). Match the group's `feel` + `mood` + `pacing`+to a template's **Reach for it when**; take the closest fit. Then bind it:+- Fill `params` (keys from the catalog entry) — your copy into text slots, palette from the brand spine, `duration` = the group's span length.+- Fill `role_bindings` with this group's **real anchor seconds** read from `audiomap.json` over its span (not example times).+- If the template's natural stop and the group's span end disagree, snap to the nearest anchor.++### B. Free-compose (no template fits)+Write a `free_design` — one visual thesis from [`motion-primitive-catalog.md`](motion-primitive-catalog.md)+(a dominant system + the named L0 primitives + a density topology) + `anchors` (the real+beat / onset seconds the moves ride). Free-compose is a **first-class** choice, written as+carefully as a matched group — never a failure.++### C. Asset treatment (only when the user supplied assets and they fit)+Make it an `asset` group ([`montage.md`](montage.md)). **Obey `pacing`:** on a `beat_cut`+frame use `beat_cut` (one clip per anchor) or `bg_under_text`; on a `phrase_flow` frame use+`ken_burns` or a slow crossfade — **never** per-onset hard cuts. Assets are additive: if none+fits a group, fall back to template / free (typography is the floor — a complete video needs+no assets).++## Copy (you own the words)++- Keep exact user words; else invent with taste, on the brief's mood.+- **Message vs texture:** a readable word holds ≥1 beat (headline 3–8, sentence 4–10), stable + focal; a word held <1 beat is texture (strobe / grid / ticks). Never force a message onto a sub-beat — demote it to texture.+- Place copy into the template's text params, onto a free group's anchors, or as an asset group's `overlay_copy`. Declare the anchor + accumulate / stagger intent; leave micro-timing to the worker.+- A closing logo / CTA lands on the final hit / hard stop and holds through trailing silence.++## Transitions (you do not emit them)++Everything is a **0ms hard cut** for now. **frame → frame** is owned by the assembler+(back-to-back files); adjacent `span_sec` already imply the cut. **group → group inside a+frame** is owned by the worker on its frame timeline; you only set each group's `span_sec`.++## Write + validate++Complete `STORYBOARD.md` ([`storyboard-format.md`](storyboard-format.md)), then run+`node scripts/validate-plan.mjs` and fix every `✗`. Show the user a frame-by-frame summary and+iterate until approved.++## Self-check++- `frame.md` is a verbatim copy of one preset; frontmatter `style.font` / `style.palette` are drawn from it (exact values).+- Every frame became ≥1 group; groups tile the frame span in order; no group < ~1 bar; no group boundary inside a `rolls[]` run.+- Each group is exactly one of template / free_design / asset.+- Template `params` keys match the catalog entry; `role_bindings` / `anchors` use real audiomap seconds.+- Asset treatments obey `pacing` (no `beat_cut` on a `phrase_flow` frame).+- Every group's palette draws from the one brand palette.+- `duration_s == audiomap.audio.duration_sec`; `validate-plan.mjs` passes.diff --git a/skills/music-to-video/references/storyboard-format.md b/skills/music-to-video/references/storyboard-format.mdnew file mode 100644index 0000000000..383910288c--- /dev/null+++ b/skills/music-to-video/references/storyboard-format.md@@ -0,0 +1,91 @@+# STORYBOARD.md format — frames → groups++`STORYBOARD.md` is the single reviewable plan the user approves at Step 3 and the **manual**+each frame-worker follows at Step 4. It is **hierarchical**: one block per **frame**, written+as a `## Frame N — <frame_id>` heading (the parser recognizes `Frame`). **One frame = one+scene = one composition file.** Inside each frame block are its **groups** (the treatment+units). The assembler reads the frame level (`duration` → `data-start`, `src`); the worker+reads its own frame block. A frame's **composition id = its `src` file stem**+(`compositions/frames/01-f1.html` → `01-f1`), which the worker uses as `data-composition-id`+and the `window.__timelines` key.++Step 2 writes the skeleton (frame fields, groups `TBD`); Step 3 fills the groups + brand. It+is a build spec, not code — the planner writes WHAT, the worker decides HOW. **Never write+millisecond tweens here.**++## File shape++YAML frontmatter (the video-wide spine) + one `## Frame N — <frame_id>` block per frame.++```markdown+---+compositionId: bgm+duration_s: 30.0 # == audiomap.audio.duration_sec, exactly+canvas: { w: 1920, h: 1080, fps: 30 }+style: # brand spine — from the chosen frame.md preset (Step 3)+ font: "EB Garamond / Inter / JetBrains Mono" # the preset's typography, verbatim+ palette: ["#FAF9F5", "#141413", "#CC785C", "#181715"] # ≤4–6 swatches from the preset's colors+assets: false # false, or a note like "assets/ has 6 user photos"+build_notes: ["one paused timeline per frame", "no remote assets"]+avoid: ["generic slideshow", "tiny unreadable hero text"]+---++## Frame 1 — f1+- src: compositions/frames/01-f1.html # worker writes here; assembler refs it; stem (01-f1) = composition id+- duration: 7.198s # = span length; the assembler reads this for cumulative data-start+- span_sec: [0.0, 7.198] # track seconds; frames tile the track+- pacing: beat_cut # beat_cut | phrase_flow (from the skeleton; obey it)+- mood: [hype]+- feel: accelerating onset stream into a held downbeat++### Groups+- **g1** — template: `intro-kinetic-cascade`+ - span_sec: [0.0, 4.017] # frame-LOCAL build is 0-based; these are TRACK seconds (worker subtracts frame start)+ - params: { theme: "light", icon: "bolt", phrases: "[…]", climax: "{…}" }+ - role_bindings: { phrase: { times: [0.14, 0.55, 0.87] }, climax: { in: 3.79, iconAt: 4.9 } }+ - copy: "GROWTH THROUGH CREATIVITY"+- **g2** — free_design+ - span_sec: [4.017, 7.198]+ - free_design: { dominant_system: "per-onset typography", primitives: ["content-swap", "braam-punch"], density_topology: "accumulate" }+ - anchors: [4.10, 4.80, 5.50, 6.20] # onset seconds the reveals ride (from audiomap)+ - copy: ["BUILD", "SHIP", "REPEAT"]++## Frame 2 — f2+…+```++## Frame block — required fields++| field | meaning |+| --- | --- |+| heading `## Frame N — <frame_id>` | `frame_id` matches the `src` stem; `N` = the 1-based index. |+| `src` | `compositions/frames/NN-<frame_id>.html` — where the worker writes; the assembler references it. Stem = `data-composition-id`. |+| `duration` | the frame span length in seconds (e.g. `7.198s`) — **required**; the assembler sums these for cumulative `data-start`. |+| `span_sec` | `[start, end]` track seconds. `duration = end − start`. |+| `pacing` | `beat_cut` \| `phrase_flow` — from the skeleton; the worker must obey (no hard-cut on `phrase_flow`). |+| `mood`, `feel` | from the skeleton; tone + the one-line music situation the planner matched against. |+| `### Groups` list | ≥1 group; groups tile the frame span in order. |++## Group entry — exactly one of three kinds++Every group is **template** OR **free_design** OR **asset** — never two, never none. All three+carry `span_sec` (track seconds, tiling the frame) and may carry `copy`.++- **template** — `template: <catalog id>` + `params` (keys from the catalog entry) + `role_bindings` (real audiomap anchor seconds) + `copy`.+- **free_design** — `free_design: { dominant_system, primitives: [catalog ids], density_topology }` + `anchors` (real beat / onset seconds) + `copy`.+- **asset** — `asset: { treatment, clips: [public/…], anchors?, overlay_copy? }`. `treatment` ∈ `beat_cut` (one clip per anchor — only on a `beat_cut` frame) | `ken_burns` (slow push — fits `phrase_flow`) | `bg_under_text` (clip dimmed behind a template / free group). See [`montage.md`](montage.md).++## Rules++- Frames tile the track (gap-free, first at 0, last at `duration_s`); a frame's groups tile its span; no group < ~1 bar; no group boundary inside a `rolls[]` run.+- `params` keys come from the template's [`template-catalog.md`](template-catalog.md) entry.+- All anchor seconds are **track seconds from `audiomap.json`** — the worker converts to frame-local by subtracting the frame start.+- A `phrase_flow` frame MUST NOT use `beat_cut` asset treatment or per-onset hard cuts.+- The brand `style` is set once; every group's palette draws from it.+- Reviewable prose-plus-data; keep it scannable. No GSAP, no millisecond timing.++## Self-check (the planner runs `validate-plan.mjs`)++- frontmatter has `compositionId`, `duration_s` (== audiomap), `canvas`, `style`.+- every frame has `span_sec` + `src` + positive `duration` + `pacing` + ≥1 group; frames tile the track.+- every group is exactly one of template / free_design / asset; template ids exist in the catalog; anchors are real audiomap seconds; `phrase_flow` frames have no `beat_cut`.diff --git a/skills/music-to-video/references/template-catalog.md b/skills/music-to-video/references/template-catalog.mdnew file mode 100644index 0000000000..b2b55aaf8a--- /dev/null+++ b/skills/music-to-video/references/template-catalog.md@@ -0,0 +1,70 @@+# Template catalog — the selection menu (Step 3)++Reverse-engineered, asset-free **group templates**. This file is the **only** thing the+planner reads to pick one — you do **not** open the template's `index.html` to choose. One+template realizes **one group** of a frame (a frame may stack several groups; the brand spine+unifies them).++**How to pick.** For each group, read its frame's `pacing` + `mood` + the one-line music+situation from the skeleton, then scan **Reach for it when** below and take the closest fit.+If nothing fits, **free-compose** from [`motion-primitive-catalog.md`](motion-primitive-catalog.md)+— that is a first-class choice, not a failure.++**Brand comes from `frame.md`, not the template.** Templates ship their own demo palette+(`theme` / `palette` / color params). Fill those params from the project's `frame.md` (the+chosen preset's colors + fonts) so every group reads as one piece — the template supplies the+**motion + layout**, the preset supplies the **look**.++**Params** are listed so you can fill content slots in the storyboard. Exact semantics ++defaults live in each template's `index.html` (`data-composition-variables`) — the frame-worker+reads those at build time; you only name the values.++Pacing tag: every template below is **beat_cut** except `held-message-living-field`+(**phrase_flow**). Never put a beat_cut template on a phrase_flow frame.++---++### card-flyby+- **What** — a depth column of cards rolls forward through perspective; each landing beat tumbles the next card into the front slot with a solid colored wipe, the old front falls toward camera, dwells shrink card-to-card so the deck accelerates into a held final card.+- **Reach for it when** — a stream of discrete onsets that **accelerate** (gaps shrinking / a build into a downbeat) and you want to flash a **sequence of items** — titles, projects, posters, tiles — one per hit, climaxing on a held card.+- **Params** — `theme`, `bgColor`, `cards`, `landings`, `yaw`++### held-message-living-field · phrase_flow+- **What** — a readable mark (logo / word / title) held dead still over a soft, color-shifting blurred field; only the field breathes.+- **Reach for it when** — a **calm / sparse** stretch with an onset desert — energy present but few or no onsets (a held pad or riser); you have one word or mark to hold and let breathe.+- **Params** — `markText`, `titleText`, `tagText`, `palette`, `flowSpeed`, `duration`++### held-text-strobe-burst+- **What** — a dead-still word whose letters flip through texture-filled frames (texture-clipped fill + per-frame tint + bg color) every ~3 frames, in short bursts pinned to a roll.+- **Reach for it when** — a **dense, hard-hitting roll / fill** and a single word you want to strobe through textures for a few bars. (Ships texture-mask PNGs under `assets/`.)+- **Params** — `markText`, `fontStyle`, `markScale`, `idleColor`, `idleInk`, `frames`, `strobePlan`, `decor`, `duration`++### intro-kinetic-cascade+- **What** — a line laid out as a sequence of big editorial **phrases** (each a stacked poster with one enlarged hero word), revealed word-by-word on its anchors, hard cut between phrases, climaxing on a phrase that slides in with a swappable ringing **icon** (bell / cursor / sparkle / emoji / SVG).+- **Reach for it when** — an **intro / opening statement**: a short line to land word-by-word as big type, climaxing on one keyword + an icon. Medium-or-more energy, steady grid.+- **Params** — `theme`, `icon`, `phrases`, `climax`++### logo-split-lockup-pulse+- **What** — a two-part mark joined at center splits left↔right to open a gap, grows a center word-lockup one word per onset (key word lands on the downbeat surge), snap-closes on a hit, then pulses with the beat.+- **Reach for it when** — a short **logo / brand sting** (not a typed sentence): fast dense onsets + a sustained roll bed to pulse on, with a left/right bracketing mark.+- **Params** — `bgColor`, `markColor`, `textColor`, `leftMark`, `rightMark`, `word1`, `word2`, `word3`, `word4`++### poster-tile-mosaic+- **What** — a packed **mosaic** of different-sized colored tiles that tessellate to fill the frame (no overlap), driven by interchangeable beat-synced operations: staggered enter/exit, locked global recolor, snake-fill + overlay.+- **Reach for it when** — many discrete, individually-placeable onsets (a hit for every tile move) with distinct sub-phases you want articulated differently (accumulate → recolor-on-roll → fill-then-drop). A dense section best held as **one** rich tile program rather than split.+- **Params** — `bgColor`, `tiles`, `bands`, `gap`, `showText`, `labels`, `program`++### roll-flipbook-word-cycle+- **What** — a hi-hat roll drives a centred word that flips every 16th-note through a word list; optionally the flicker resolves and locks into a final phrase.+- **Reach for it when** — a **fast sustained-fill roll** (hundreds of hits/min, ~16th-note) with no single readable message — fill the roll with a rapidly-cycling word flipbook.+- **Params** — `bgColor`, `textColor`, `accentColor`, `flipWords`, `resolveText`, `periodChar`++### split-anchor-word-slot+- **What** — a held left anchor column of fixed-word rows beside a torn-paper word-slot box on the right, driven by beat-synced operators: anchor lock-in, slot word-group cycle (in/out + per-line color), full-scene background flip, per-beat jitter, box-zoom exit wipe. Row count + number of flips are data.+- **Reach for it when** — a short section with a **held idea** (a brand / name to anchor on the left) **and** a stream of onsets popping separate words on the right, plus a dense run to ride a shake on and a strong downbeat to wipe out into.+- **Params** — `bgColor`, `anchors`, `theme`, `showText`, `program`++### typewriter-phrase-keyword-shuffle+- **What** — words type in one-per-onset to spell a phrase, then one keyword cycles typefaces on the beat while everything else holds dead still.+- **Reach for it when** — a steady grid with a **continuous onset stream** (no desert): a phrase to type out, then a keyword to shuffle. The inverse of `held-message-living-field` (which wants an onset desert).+- **Params** — `bgColor`, `textColor`, `accentColor`, `lead1`, `lead2`, `lead3`, `keyword`, `periodChar`diff --git a/skills/bgm-to-video/references/motion-primitives/assets/gsap.min.js b/skills/music-to-video/references/templates/card-flyby/assets/gsap.min.jssimilarity index 100%rename from skills/bgm-to-video/references/motion-primitives/assets/gsap.min.jsrename to skills/music-to-video/references/templates/card-flyby/assets/gsap.min.jsdiff --git a/skills/bgm-to-video/templates/card-flyby/index.html b/skills/music-to-video/references/templates/card-flyby/index.htmlsimilarity index 100%rename from skills/bgm-to-video/templates/card-flyby/index.htmlrename to skills/music-to-video/references/templates/card-flyby/index.htmldiff --git a/skills/bgm-to-video/templates/card-flyby/program.json b/skills/music-to-video/references/templates/card-flyby/program.jsonsimilarity index 100%rename from skills/bgm-to-video/templates/card-flyby/program.jsonrename to skills/music-to-video/references/templates/card-flyby/program.jsondiff --git a/skills/bgm-to-video/templates/held-message-living-field/index.html b/skills/music-to-video/references/templates/held-message-living-field/index.htmlsimilarity index 100%rename from skills/bgm-to-video/templates/held-message-living-field/index.htmlrename to skills/music-to-video/references/templates/held-message-living-field/index.htmldiff --git a/skills/bgm-to-video/templates/card-flyby/assets/gsap.min.js b/skills/music-to-video/references/templates/held-text-strobe-burst/assets/gsap.min.jssimilarity index 100%rename from skills/bgm-to-video/templates/card-flyby/assets/gsap.min.jsrename to skills/music-to-video/references/templates/held-text-strobe-burst/assets/gsap.min.jsdiff --git a/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/asphalt-031.png b/skills/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/asphalt-031.pngsimilarity index 100%rename from skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/asphalt-031.pngrename to skills/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/asphalt-031.pngdiff --git a/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/bark-014.png b/skills/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/bark-014.pngsimilarity index 100%rename from skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/bark-014.pngrename to skills/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/bark-014.pngdiff --git a/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/brick.png b/skills/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/brick.pngsimilarity index 100%rename from skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/brick.pngrename to skills/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/brick.pngdiff --git a/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/bricks-075-a.png b/skills/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/bricks-075-a.pngsimilarity index 100%rename from skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/bricks-075-a.pngrename to skills/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/bricks-075-a.pngdiff --git a/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/bricks-101.png b/skills/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/bricks-101.pngsimilarity index 100%rename from skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/bricks-101.pngrename to skills/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/bricks-101.pngdiff --git a/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/bricks-102.png b/skills/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/bricks-102.pngsimilarity index 100%rename from skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/bricks-102.pngrename to skills/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/bricks-102.pngdiff --git a/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/bricks-104.png b/skills/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/bricks-104.pngsimilarity index 100%rename from skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/bricks-104.pngrename to skills/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/bricks-104.pngdiff --git a/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/carpet.png b/skills/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/carpet.pngsimilarity index 100%rename from skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/carpet.pngrename to skills/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/carpet.pngdiff --git a/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/concrete-034.png b/skills/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/concrete-034.pngsimilarity index 100%rename from skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/concrete-034.pngrename to skills/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/concrete-034.pngdiff --git a/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/concrete-042-a.png b/skills/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/concrete-042-a.pngsimilarity index 100%rename from skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/concrete-042-a.pngrename to skills/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/concrete-042-a.pngdiff --git a/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/concrete-046.png b/skills/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/concrete-046.pngsimilarity index 100%rename from skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/concrete-046.pngrename to skills/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/concrete-046.pngdiff --git a/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/concrete-047-a.png b/skills/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/concrete-047-a.pngsimilarity index 100%rename from skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/concrete-047-a.pngrename to skills/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/concrete-047-a.pngdiff --git a/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/concrete.png b/skills/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/concrete.pngsimilarity index 100%rename from skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/concrete.pngrename to skills/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/concrete.pngdiff --git a/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/diamond-plate-009.png b/skills/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/diamond-plate-009.pngsimilarity index 100%rename from skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/diamond-plate-009.pngrename to skills/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/diamond-plate-009.pngdiff --git a/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/fabric-080.png b/skills/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/fabric-080.pngsimilarity index 100%rename from skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/fabric-080.pngrename to skills/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/fabric-080.pngdiff --git a/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/fabric-083.png b/skills/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/fabric-083.pngsimilarity index 100%rename from skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/fabric-083.pngrename to skills/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/fabric-083.pngdiff --git a/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/grass-001.png b/skills/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/grass-001.pngsimilarity index 100%rename from skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/grass-001.pngrename to skills/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/grass-001.pngdiff --git a/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/grass-004.png b/skills/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/grass-004.pngsimilarity index 100%rename from skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/grass-004.pngrename to skills/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/grass-004.pngdiff --git a/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/grass-005.png b/skills/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/grass-005.pngsimilarity index 100%rename from skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/grass-005.pngrename to skills/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/grass-005.pngdiff --git a/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/ground-037.png b/skills/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/ground-037.pngsimilarity index 100%rename from skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/ground-037.pngrename to skills/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/ground-037.pngdiff --git a/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/ground-054.png b/skills/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/ground-054.pngsimilarity index 100%rename from skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/ground-054.pngrename to skills/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/ground-054.pngdiff --git a/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/ground-068.png b/skills/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/ground-068.pngsimilarity index 100%rename from skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/ground-068.pngrename to skills/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/ground-068.pngdiff --git a/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/ground-080.png b/skills/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/ground-080.pngsimilarity index 100%rename from skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/ground-080.pngrename to skills/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/ground-080.pngdiff --git a/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/ground-103.png b/skills/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/ground-103.pngsimilarity index 100%rename from skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/ground-103.pngrename to skills/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/ground-103.pngdiff --git a/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/ground-104.png b/skills/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/ground-104.pngsimilarity index 100%rename from skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/ground-104.pngrename to skills/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/ground-104.pngdiff --git a/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/lava.png b/skills/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/lava.pngsimilarity index 100%rename from skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/lava.pngrename to skills/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/lava.pngdiff --git a/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/leather-037.png b/skills/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/leather-037.pngsimilarity index 100%rename from skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/leather-037.pngrename to skills/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/leather-037.pngdiff --git a/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/marble-012.png b/skills/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/marble-012.pngsimilarity index 100%rename from skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/marble-012.pngrename to skills/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/marble-012.pngdiff --git a/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/marble-016.png b/skills/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/marble-016.pngsimilarity index 100%rename from skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/marble-016.pngrename to skills/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/marble-016.pngdiff --git a/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/metal-032.png b/skills/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/metal-032.pngsimilarity index 100%rename from skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/metal-032.pngrename to skills/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/metal-032.pngdiff --git a/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/metal-038.png b/skills/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/metal-038.pngsimilarity index 100%rename from skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/metal-038.pngrename to skills/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/metal-038.pngdiff --git a/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/metal-041-a.png b/skills/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/metal-041-a.pngsimilarity index 100%rename from skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/metal-041-a.pngrename to skills/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/metal-041-a.pngdiff --git a/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/metal-046-b.png b/skills/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/metal-046-b.pngsimilarity index 100%rename from skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/metal-046-b.pngrename to skills/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/metal-046-b.pngdiff --git a/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/metal-048-a.png b/skills/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/metal-048-a.pngsimilarity index 100%rename from skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/metal-048-a.pngrename to skills/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/metal-048-a.pngdiff --git a/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/metal-049-a.png b/skills/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/metal-049-a.pngsimilarity index 100%rename from skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/metal-049-a.pngrename to skills/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/metal-049-a.pngdiff --git a/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/metal-055-a.png b/skills/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/metal-055-a.pngsimilarity index 100%rename from skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/metal-055-a.pngrename to skills/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/metal-055-a.pngdiff --git a/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/metal-061-b.png b/skills/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/metal-061-b.pngsimilarity index 100%rename from skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/metal-061-b.pngrename to skills/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/metal-061-b.pngdiff --git a/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/metal.png b/skills/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/metal.pngsimilarity index 100%rename from skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/metal.pngrename to skills/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/metal.pngdiff --git a/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/onyx.png b/skills/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/onyx.pngsimilarity index 100%rename from skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/onyx.pngrename to skills/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/onyx.pngdiff --git a/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/painted-plaster-017.png b/skills/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/painted-plaster-017.pngsimilarity index 100%rename from skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/painted-plaster-017.pngrename to skills/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/painted-plaster-017.pngdiff --git a/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/paving-stones-138.png b/skills/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/paving-stones-138.pngsimilarity index 100%rename from skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/paving-stones-138.pngrename to skills/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/paving-stones-138.pngdiff --git a/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/paving-stones-150.png b/skills/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/paving-stones-150.pngsimilarity index 100%rename from skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/paving-stones-150.pngrename to skills/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/paving-stones-150.pngdiff --git a/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/plaster-001.png b/skills/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/plaster-001.pngsimilarity index 100%rename from skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/plaster-001.pngrename to skills/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/plaster-001.pngdiff --git a/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/road-007.png b/skills/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/road-007.pngsimilarity index 100%rename from skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/road-007.pngrename to skills/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/road-007.pngdiff --git a/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/road-008-a.png b/skills/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/road-008-a.pngsimilarity index 100%rename from skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/road-008-a.pngrename to skills/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/road-008-a.pngdiff --git a/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/road-009-c.png b/skills/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/road-009-c.pngsimilarity index 100%rename from skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/road-009-c.pngrename to skills/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/road-009-c.pngdiff --git a/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/road-012-a.png b/skills/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/road-012-a.pngsimilarity index 100%rename from skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/road-012-a.pngrename to skills/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/road-012-a.pngdiff --git a/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/road-012-b.png b/skills/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/road-012-b.pngsimilarity index 100%rename from skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/road-012-b.pngrename to skills/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/road-012-b.pngdiff --git a/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/road-013-a.png b/skills/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/road-013-a.pngsimilarity index 100%rename from skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/road-013-a.pngrename to skills/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/road-013-a.pngdiff --git a/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/rock-058.png b/skills/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/rock-058.pngsimilarity index 100%rename from skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/rock-058.pngrename to skills/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/rock-058.pngdiff --git a/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/rock-063.png b/skills/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/rock-063.pngsimilarity index 100%rename from skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/rock-063.pngrename to skills/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/rock-063.pngdiff --git a/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/rock.png b/skills/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/rock.pngsimilarity index 100%rename from skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/rock.pngrename to skills/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/rock.pngdiff --git a/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/snow-015.png b/skills/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/snow-015.pngsimilarity index 100%rename from skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/snow-015.pngrename to skills/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/snow-015.pngdiff --git a/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/snow.png b/skills/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/snow.pngsimilarity index 100%rename from skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/snow.pngrename to skills/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/snow.pngdiff --git a/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/tiles-138.png b/skills/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/tiles-138.pngsimilarity index 100%rename from skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/tiles-138.pngrename to skills/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/tiles-138.pngdiff --git a/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/travertine-009.png b/skills/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/travertine-009.pngsimilarity index 100%rename from skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/travertine-009.pngrename to skills/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/travertine-009.pngdiff --git a/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/wood-049.png b/skills/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/wood-049.pngsimilarity index 100%rename from skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/wood-049.pngrename to skills/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/wood-049.pngdiff --git a/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/wood-051.png b/skills/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/wood-051.pngsimilarity index 100%rename from skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/wood-051.pngrename to skills/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/wood-051.pngdiff --git a/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/wood-058.png b/skills/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/wood-058.pngsimilarity index 100%rename from skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/wood-058.pngrename to skills/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/wood-058.pngdiff --git a/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/wood-066.png b/skills/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/wood-066.pngsimilarity index 100%rename from skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/wood-066.pngrename to skills/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/wood-066.pngdiff --git a/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/wood-092.png b/skills/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/wood-092.pngsimilarity index 100%rename from skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/wood-092.pngrename to skills/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/wood-092.pngdiff --git a/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/wood-094.png b/skills/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/wood-094.pngsimilarity index 100%rename from skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/wood-094.pngrename to skills/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/wood-094.pngdiff --git a/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/wood-floor-051.png b/skills/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/wood-floor-051.pngsimilarity index 100%rename from skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/wood-floor-051.pngrename to skills/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/wood-floor-051.pngdiff --git a/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/wood-floor-064.png b/skills/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/wood-floor-064.pngsimilarity index 100%rename from skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/wood-floor-064.pngrename to skills/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/wood-floor-064.pngdiff --git a/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/wood-floor-070.png b/skills/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/wood-floor-070.pngsimilarity index 100%rename from skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/wood-floor-070.pngrename to skills/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/wood-floor-070.pngdiff --git a/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/wood.png b/skills/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/wood.pngsimilarity index 100%rename from skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/wood.pngrename to skills/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/wood.pngdiff --git a/skills/bgm-to-video/templates/held-text-strobe-burst/index.html b/skills/music-to-video/references/templates/held-text-strobe-burst/index.htmlsimilarity index 100%rename from skills/bgm-to-video/templates/held-text-strobe-burst/index.htmlrename to skills/music-to-video/references/templates/held-text-strobe-burst/index.htmldiff --git a/skills/bgm-to-video/templates/held-text-strobe-burst/assets/gsap.min.js b/skills/music-to-video/references/templates/intro-kinetic-cascade/assets/gsap.min.jssimilarity index 100%rename from skills/bgm-to-video/templates/held-text-strobe-burst/assets/gsap.min.jsrename to skills/music-to-video/references/templates/intro-kinetic-cascade/assets/gsap.min.jsdiff --git a/skills/bgm-to-video/templates/intro-kinetic-cascade/index.html b/skills/music-to-video/references/templates/intro-kinetic-cascade/index.htmlsimilarity index 100%rename from skills/bgm-to-video/templates/intro-kinetic-cascade/index.htmlrename to skills/music-to-video/references/templates/intro-kinetic-cascade/index.htmldiff --git a/skills/bgm-to-video/templates/intro-kinetic-cascade/program.json b/skills/music-to-video/references/templates/intro-kinetic-cascade/program.jsonsimilarity index 100%rename from skills/bgm-to-video/templates/intro-kinetic-cascade/program.jsonrename to skills/music-to-video/references/templates/intro-kinetic-cascade/program.jsondiff --git a/skills/bgm-to-video/templates/logo-split-lockup-pulse/assets/fredoka-700.woff2 b/skills/music-to-video/references/templates/logo-split-lockup-pulse/assets/fredoka-700.woff2similarity index 100%rename from skills/bgm-to-video/templates/logo-split-lockup-pulse/assets/fredoka-700.woff2rename to skills/music-to-video/references/templates/logo-split-lockup-pulse/assets/fredoka-700.woff2diff --git a/skills/bgm-to-video/templates/intro-kinetic-cascade/assets/gsap.min.js b/skills/music-to-video/references/templates/logo-split-lockup-pulse/assets/gsap.min.jssimilarity index 100%rename from skills/bgm-to-video/templates/intro-kinetic-cascade/assets/gsap.min.jsrename to skills/music-to-video/references/templates/logo-split-lockup-pulse/assets/gsap.min.jsdiff --git a/skills/bgm-to-video/templates/logo-split-lockup-pulse/index.html b/skills/music-to-video/references/templates/logo-split-lockup-pulse/index.htmlsimilarity index 100%rename from skills/bgm-to-video/templates/logo-split-lockup-pulse/index.htmlrename to skills/music-to-video/references/templates/logo-split-lockup-pulse/index.htmldiff --git a/skills/bgm-to-video/templates/logo-split-lockup-pulse/assets/gsap.min.js b/skills/music-to-video/references/templates/poster-tile-mosaic/assets/gsap.min.jssimilarity index 100%rename from skills/bgm-to-video/templates/logo-split-lockup-pulse/assets/gsap.min.jsrename to skills/music-to-video/references/templates/poster-tile-mosaic/assets/gsap.min.jsdiff --git a/skills/bgm-to-video/templates/poster-tile-mosaic/index.html b/skills/music-to-video/references/templates/poster-tile-mosaic/index.htmlsimilarity index 99%rename from skills/bgm-to-video/templates/poster-tile-mosaic/index.htmlrename to skills/music-to-video/references/templates/poster-tile-mosaic/index.htmlindex 98395360e0..fadef76bc7 100644--- a/skills/bgm-to-video/templates/poster-tile-mosaic/index.html+++ b/skills/music-to-video/references/templates/poster-tile-mosaic/index.html@@ -219,7 +219,7 @@// `program` variable (a JSON string), so it composes by emitting DATA, not by// editing JS. Beats are absolute audio seconds from <group>.audiomap.json.// Mirrors program.json. group_5: 129.2 BPM · downbeats 1.324/3.181/5.039 ·- // hard_stop 4.0s. (See card.json → program_format for each op's fields.)+ // hard_stop 4.0s. (See program.json for each op's fields.)var DEFAULT_PROGRAM = [{op: "staggerInOut", // build → hold (downbeat) → exitdiff --git a/skills/bgm-to-video/templates/poster-tile-mosaic/program.json b/skills/music-to-video/references/templates/poster-tile-mosaic/program.jsonsimilarity index 100%rename from skills/bgm-to-video/templates/poster-tile-mosaic/program.jsonrename to skills/music-to-video/references/templates/poster-tile-mosaic/program.jsondiff --git a/skills/bgm-to-video/templates/roll-flipbook-word-cycle/index.html b/skills/music-to-video/references/templates/roll-flipbook-word-cycle/index.htmlsimilarity index 100%rename from skills/bgm-to-video/templates/roll-flipbook-word-cycle/index.htmlrename to skills/music-to-video/references/templates/roll-flipbook-word-cycle/index.htmldiff --git a/skills/bgm-to-video/templates/poster-tile-mosaic/assets/gsap.min.js b/skills/music-to-video/references/templates/split-anchor-word-slot/assets/gsap.min.jssimilarity index 100%rename from skills/bgm-to-video/templates/poster-tile-mosaic/assets/gsap.min.jsrename to skills/music-to-video/references/templates/split-anchor-word-slot/assets/gsap.min.jsdiff --git a/skills/bgm-to-video/templates/split-anchor-word-slot/index.html b/skills/music-to-video/references/templates/split-anchor-word-slot/index.htmlsimilarity index 99%rename from skills/bgm-to-video/templates/split-anchor-word-slot/index.htmlrename to skills/music-to-video/references/templates/split-anchor-word-slot/index.htmlindex b1d48afe3f..f491137fda 100644--- a/skills/bgm-to-video/templates/split-anchor-word-slot/index.html+++ b/skills/music-to-video/references/templates/split-anchor-word-slot/index.html@@ -246,7 +246,7 @@return ACCENTS[((i % ACCENTS.length) + ACCENTS.length) % ACCENTS.length];}- // ── 3. THE PROGRAM (data) — see program.json / card.json → program_format ──+ // ── 3. THE PROGRAM (data) — see program.json ──// group_6: ~92 BPM · downbeats 2.322(f56)/4.923(f118) · hihat fill 2.16–4.18s.var DEFAULT_PROGRAM = [{ op: "lockup", enter: [0.125, 0.333, 0.5], box: 0.292, theme: 0 },diff --git a/skills/bgm-to-video/templates/split-anchor-word-slot/program.json b/skills/music-to-video/references/templates/split-anchor-word-slot/program.jsonsimilarity index 100%rename from skills/bgm-to-video/templates/split-anchor-word-slot/program.jsonrename to skills/music-to-video/references/templates/split-anchor-word-slot/program.jsondiff --git a/skills/bgm-to-video/templates/typewriter-phrase-keyword-shuffle/index.html b/skills/music-to-video/references/templates/typewriter-phrase-keyword-shuffle/index.htmlsimilarity index 100%rename from skills/bgm-to-video/templates/typewriter-phrase-keyword-shuffle/index.htmlrename to skills/music-to-video/references/templates/typewriter-phrase-keyword-shuffle/index.htmldiff --git a/skills/bgm-to-video/scripts/analyze-beatgrid.py b/skills/music-to-video/scripts/analyze-beatgrid.pysimilarity index 99%rename from skills/bgm-to-video/scripts/analyze-beatgrid.pyrename to skills/music-to-video/scripts/analyze-beatgrid.pyindex 6205ed7bd7..676e250f17 100644--- a/skills/bgm-to-video/scripts/analyze-beatgrid.py+++ b/skills/music-to-video/scripts/analyze-beatgrid.py@@ -1,5 +1,5 @@#!/usr/bin/env python3-"""Beat-grid + drum/event analysis engine for bgm-to-video (Brain A).+"""Beat-grid + drum/event analysis engine for music-to-video.Turns a BGM track directly into a deterministic `audiomap.json` — the music skeletonthat the Director and Builder hang visuals on. It merges:diff --git a/skills/music-to-video/scripts/assemble-index.mjs b/skills/music-to-video/scripts/assemble-index.mjsnew file mode 100644index 0000000000..ee6b3b941d--- /dev/null+++ b/skills/music-to-video/scripts/assemble-index.mjs@@ -0,0 +1,214 @@+#!/usr/bin/env node+// assemble-index.mjs — deterministic top-level index.html assembly for a+// music-to-video project. No subagent, no judgment: turns STORYBOARD.md + the+// built per-frame composition files (+ assets/bgm.mp3) into the standalone+// index.html the renderer consumes.+//+// index.html is a *standalone* composition (root <div id="root"> directly in+// <body>, no <template> wrapper — template is for the frame sub-comps). Each+// frame is referenced (not inlined) as a <div class="frame"> with+// data-composition-src pointing at its file; the renderer seeks each at its+// absolute data-start. Frames tile the track gap-free, so frame→frame is a+// plain back-to-back HARD CUT — there is NO transition injector (unlike+// product-launch, whose transitions.mjs exists only for soft transitions).+//+// Track lanes:+// 1 frame clips (sequential, gap-free, hard cut between)+// 10 optional per-frame VO <audio> (deferred; mounted only if audio_meta has it)+// 11 BGM <audio> (full duration)+//+// Reads: --storyboard STORYBOARD.md, --hyperframes <root>, [--audiomap audiomap.json],+// [--bgm assets/bgm.mp3], [--audio-meta audio_meta.json]. On disk: each frame's src html.+// Writes: <project>/index.html+//+// Exit 0 = index.html written + summary. Exit 1 = fatal contract break (no+// frames, a frame missing/empty/with-no-duration, an inner id mismatch).++import { existsSync, readFileSync, writeFileSync } from "node:fs";+import { basename, join, resolve } from "node:path";+import { parseStoryboard } from "./lib/storyboard.mjs";++const argv = process.argv.slice(2);+const flag = (name, def) => {+ const i = argv.indexOf(`--${name}`);+ return i >= 0 && i + 1 < argv.length ? argv[i + 1] : def;+};+function die(msg) {+ console.error(`✗ assemble-index.mjs: ${msg}`);+ process.exit(1);+}+const r3 = (x) => Math.round(x * 1000) / 1000;+const anomalies = [];++const hyperframesDir = resolve(flag("hyperframes", "."));+const storyboardPath = resolve(flag("storyboard", join(hyperframesDir, "STORYBOARD.md")));+const audiomapPath = resolve(flag("audiomap", join(hyperframesDir, "audiomap.json")));+const audioMetaPath = resolve(flag("audio-meta", join(hyperframesDir, "audio_meta.json")));+const bgmRel = flag("bgm", "assets/bgm.mp3");+const outPath = resolve(flag("out", join(hyperframesDir, "index.html")));++// ---------- parse storyboard ----------+if (!existsSync(storyboardPath)) die(`STORYBOARD.md not found at ${storyboardPath}`);+const manifest = parseStoryboard(readFileSync(storyboardPath, "utf8"));+const G = manifest.globals.extra ?? {};++// canvas from frontmatter `canvas: {"w":1920,"h":1080,"fps":30}` (key lowercased by parser)+let WIDTH = 1920,+ HEIGHT = 1080;+if (G.canvas) {+ try {+ const c = JSON.parse(G.canvas);+ if (Number.isFinite(c.w)) WIDTH = c.w;+ if (Number.isFinite(c.h)) HEIGHT = c.h;+ } catch {+ anomalies.push(`could not JSON.parse canvas frontmatter: ${G.canvas} — using ${WIDTH}×${HEIGHT}`);+ }+}++// audio duration is the spine truth+let audioDur = null;+if (existsSync(audiomapPath)) {+ try {+ audioDur = JSON.parse(readFileSync(audiomapPath, "utf8"))?.audio?.duration_sec ?? null;+ } catch (e) {+ anomalies.push(`audiomap.json parse failed (${e.message}) — using frame sum for duration`);+ }+}++// ---------- resolve mountable frames in document order ----------+const mounted = [];+for (const f of manifest.frames) {+ const label = `frame ${f.number ?? f.index}${f.title ? ` (${f.title})` : ""}`;+ if (!f.src) die(`${label} has no \`src\` — the planner must write it in STORYBOARD.md`);+ const compAbs = join(hyperframesDir, f.src);+ if (!existsSync(compAbs))+ die(`${label}: src ${f.src} is not on disk — re-dispatch its frame-worker before assembling`);+ if (!Number.isFinite(f.durationSeconds) || f.durationSeconds <= 0)+ die(`${label}: no positive \`duration\` (got ${JSON.stringify(f.duration)})`);+ const compId = basename(f.src).replace(/\.html?$/i, "");+ const inner = readFileSync(compAbs, "utf8");+ if (!inner.trim() || !/<\w/.test(inner))+ die(`${label}: ${f.src} is empty/blank — the frame-worker wrote a partial file. Re-dispatch it.`);+ if (+ !inner.includes(`data-composition-id="${compId}"`) &&+ !inner.includes(`data-composition-id='${compId}'`)+ )+ die(`${label}: ${f.src} has no data-composition-id="${compId}" (host/inner id must match)`);+ mounted.push({ frame: f, compId, durationSeconds: r3(f.durationSeconds) });+}+if (mounted.length === 0) die("no mountable frames (none with an on-disk src)");++// cumulative starts — start[i] + duration[i] == start[i+1] exactly (gap-free hard cuts)+let acc = 0;+for (const m of mounted) {+ m.start = r3(acc);+ acc += m.durationSeconds;+}+const FRAME_SUM = r3(acc);+const TOTAL = r3(audioDur ?? FRAME_SUM);+if (audioDur != null && Math.abs(FRAME_SUM - audioDur) > 0.1)+ anomalies.push(+ `frames sum to ${FRAME_SUM}s but audio is ${audioDur}s (Δ${r3(FRAME_SUM - audioDur)}s) — frames should tile the track; check the plan`,+ );++// ---------- optional VO (deferred hook) ----------+let audio = { voices: [] };+if (existsSync(audioMetaPath)) {+ try {+ audio = JSON.parse(readFileSync(audioMetaPath, "utf8"));+ } catch (e) {+ anomalies.push(`audio_meta.json parse: ${e.message}`);+ }+}+const voiceByNum = new Map();+for (const v of audio.voices ?? []) if (v.frame != null) voiceByNum.set(v.frame, v);++// ---------- build <body> ----------+const body = [];+let voiceCount = 0;+for (const m of mounted) {+ body.push(+ ` <div`,+ ` id="el-${m.compId}"`,+ ` class="frame"`,+ ` data-composition-id="${m.compId}"`,+ ` data-composition-src="${m.frame.src}"`,+ ` data-start="${m.start}"`,+ ` data-duration="${m.durationSeconds}"`,+ ` data-track-index="1"`,+ ` ></div>`,+ );+ const v = m.frame.number != null ? voiceByNum.get(m.frame.number) : undefined;+ if (v?.path && existsSync(join(hyperframesDir, v.path))) {+ body.push(+ ` <audio id="el-${m.compId}-voice" src="${v.path}" data-start="${m.start}"`,+ ` data-duration="${m.durationSeconds}" data-track-index="10" data-volume="1"></audio>`,+ );+ voiceCount++;+ }+ body.push("");+}++// BGM (track 11) — full duration; duck slightly when VO present+let bgmEmitted = false;+if (existsSync(join(hyperframesDir, bgmRel))) {+ const vol = voiceCount > 0 ? 0.8 : 0.9;+ body.push(+ ` <!-- BGM -->`,+ ` <audio id="el-bgm" src="${bgmRel}" data-start="0" data-duration="${TOTAL}"`,+ ` data-track-index="11" data-volume="${vol}"></audio>`,+ );+ bgmEmitted = true;+} else {+ anomalies.push(`BGM not found at ${bgmRel} — index has no music track`);+}++// ---------- head + emit ----------+const headStyle = [+ " * { margin: 0; padding: 0; box-sizing: border-box; }",+ ` html, body { width: ${WIDTH}px; height: ${HEIGHT}px; overflow: hidden; background: #000; }`,+ ` #root { position: relative; width: ${WIDTH}px; height: ${HEIGHT}px; overflow: hidden; }`,+ " .frame { position: absolute; inset: 0; width: 100%; height: 100%; }",+].join("\n");++const html = `<!doctype html>+<html lang="en">+ <head>+ <meta charset="UTF-8" />+ <meta name="viewport" content="width=${WIDTH}, height=${HEIGHT}" />+ <script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/gsap.min.js"></script>+ <style>+${headStyle}+ </style>+ </head>+ <body>+ <div+ id="root"+ data-composition-id="main"+ data-start="0"+ data-duration="${TOTAL}"+ data-width="${WIDTH}"+ data-height="${HEIGHT}"+ >+${body.join("\n")}+ </div>++ <script>+ window.__timelines = window.__timelines || {};+ window.__timelines["main"] = gsap.timeline({ paused: true });+ </script>+ </body>+</html>+`;+writeFileSync(outPath, html);++console.log(`✓ wrote ${outPath}`);+console.log(` canvas: ${WIDTH}×${HEIGHT}`);+console.log(` frames (track 1): ${mounted.length}`);+console.log(` bgm (track 11): ${bgmEmitted ? bgmRel : "MISSING"}`);+console.log(` vo (track 10): ${voiceCount}`);+console.log(` total duration: ${TOTAL}s` + (audioDur != null ? ` (audio ${audioDur}s)` : ""));+if (anomalies.length) {+ console.log(`\nanomalies (non-fatal):`);+ for (const a of anomalies) console.log(` - ${a}`);+}diff --git a/skills/music-to-video/scripts/lib/storyboard.mjs b/skills/music-to-video/scripts/lib/storyboard.mjsnew file mode 100644index 0000000000..7c821dcbaa--- /dev/null+++ b/skills/music-to-video/scripts/lib/storyboard.mjs@@ -0,0 +1,249 @@+// storyboard.mjs — vendored lenient parser for STORYBOARD.md.+//+// Faithful plain-JS port of @hyperframes/core/storyboard+// (packages/core/src/storyboard/parseStoryboard.ts). Vendored because skills+// ship standalone: installed via `npx skills add`, a skill's scripts can't reach+// the monorepo's core package, and the core export points at .ts source that+// `node` (which runs these scripts) can't load. CANONICAL contract = the core+// parser + skills/hyperframes-core/references/storyboard-format.md; keep this in+// lockstep. Behavior: never throws, accepts freeform narrative, recognizes+// Frame/Beat/Scene headings at H2/H3, preserves unknown keys verbatim under+// `extra` (keys lowercased). Pure node — no deps.++export const FRAME_STATUSES = ["outline", "built", "animated"];+export const DEFAULT_FRAME_STATUS = "outline";++// Detection-only frame heading (ends at the keyword); ReDoS-hardened — keep as-is.+const FRAME_HEADING_RE = /^(#{2,3})[ \t]+(?:frame|beat|scene)\b/i;+const FRAME_TITLE_SEP_RE = /^[\s.:—-]+/;+const HEADING_LEVEL_RE = /^(#{1,6})\s+/;+const META_RE = /^\s*[-*]\s+([A-Za-z_][\w-]*)\s*:\s*(.+?)\s*$/;+const LEADING_INT_RE = /^(\d+)/;+const DURATION_NUM_RE = /(\d+(?:\.\d+)?)/;+const TRANSITION_KEYS = new Set(["transition_in", "transitionin", "transition"]);+const SCENE_KEYS = new Set(["scene", "description", "summary", "caption"]);+export const VOICEOVER_ALIASES = ["voiceover", "vo", "voice_over", "narration"];+const VOICEOVER_KEYS = new Set(VOICEOVER_ALIASES);++export function parseStoryboard(source) {+ const warnings = [];+ const { globals, bodyStartLine, body } = parseFrontmatter(source, warnings);+ const frames = parseFrames(body, bodyStartLine, warnings);+ return { globals, frames, warnings };+}++function emptyGlobals() {+ return { extra: {} };+}++function isFrameStatus(value) {+ return FRAME_STATUSES.includes(value);+}++// ── Frontmatter ─────────────────────────────────────────────────────────────+function findFrontmatterRange(lines, warnings) {+ let start = 0;+ while (start < lines.length && (lines[start] ?? "").trim() === "") start++;+ if ((lines[start] ?? "").trim() !== "---") return null;+ for (let i = start + 1; i < lines.length; i++) {+ if ((lines[i] ?? "").trim() === "---") return { start, end: i };+ }+ warnings.push({+ message: "Frontmatter opening '---' has no closing '---'; treating whole file as body.",+ line: start + 1,+ });+ return null;+}++function parseFrontmatterEntries(lines, start, end, warnings) {+ const globals = emptyGlobals();+ for (let i = start + 1; i < end; i++) {+ const raw = lines[i] ?? "";+ if (raw.trim() === "") continue;+ const colon = raw.indexOf(":");+ if (colon === -1) {+ warnings.push({+ message: `Ignored non key:value frontmatter line: "${raw.trim()}"`,+ line: i + 1,+ });+ continue;+ }+ const key = raw.slice(0, colon).trim().toLowerCase();+ assignGlobal(globals, key, stripQuotes(raw.slice(colon + 1).trim()));+ }+ return globals;+}++function parseFrontmatter(source, warnings) {+ const lines = source.split(/\r?\n/);+ const range = findFrontmatterRange(lines, warnings);+ if (!range) return { globals: emptyGlobals(), bodyStartLine: 1, body: source };+ const globals = parseFrontmatterEntries(lines, range.start, range.end, warnings);+ const body = lines.slice(range.end + 1).join("\n");+ return { globals, bodyStartLine: range.end + 2, body };+}++function assignGlobal(globals, key, value) {+ switch (key) {+ case "format":+ globals.format = value;+ break;+ case "message":+ globals.message = value;+ break;+ case "arc":+ globals.arc = value;+ break;+ case "audience":+ globals.audience = value;+ break;+ default:+ globals.extra[key] = value;+ }+}++// ── Frames ──────────────────────────────────────────────────────────────────+function openFrameSection(line, headingLine) {+ const match = FRAME_HEADING_RE.exec(line);+ if (!match) return null;+ const headingText = line.slice(match[0].length).replace(FRAME_TITLE_SEP_RE, "").trim();+ return { headingText, headingLine, level: (match[1] ?? "##").length, lines: [] };+}++function endsFrameSection(line, current) {+ if (!current) return false;+ const heading = HEADING_LEVEL_RE.exec(line);+ return heading !== null && (heading[1] ?? "").length <= current.level;+}++function parseFrames(body, bodyStartLine, warnings) {+ const lines = body.split(/\r?\n/);+ const sections = [];+ let current = null;+ for (let i = 0; i < lines.length; i++) {+ const line = lines[i] ?? "";+ const opened = openFrameSection(line, bodyStartLine + i);+ if (opened) {+ sections.push(opened);+ current = opened;+ } else if (endsFrameSection(line, current)) {+ current = null;+ } else if (current) {+ current.lines.push(line);+ }+ }+ return sections.map((section, idx) => buildFrame(section, idx + 1, warnings));+}++function buildFrame(section, index, warnings) {+ const frame = { index, status: DEFAULT_FRAME_STATUS, narrative: "", extra: {} };+ const { number, title } = parseHeading(section.headingText);+ if (number !== undefined) frame.number = number;+ if (title) frame.title = title;++ const narrativeLines = [];+ for (const line of section.lines) {+ const meta = META_RE.exec(line);+ if (meta) {+ applyMeta(+ frame,+ (meta[1] ?? "").toLowerCase(),+ (meta[2] ?? "").trim(),+ section.headingLine,+ warnings,+ );+ } else {+ narrativeLines.push(line);+ }+ }+ frame.narrative = narrativeLines.join("\n").trim();+ return frame;+}++function parseHeading(text) {+ if (!text) return {};+ const intMatch = LEADING_INT_RE.exec(text);+ if (!intMatch) return { title: text };+ const number = Number.parseInt(intMatch[1] ?? "", 10);+ const rest = text+ .slice((intMatch[0] ?? "").length)+ .replace(/^[\s.:—-]+/, "")+ .trim();+ return { number, title: rest || undefined };+}++// Dispatch a recognized metadata key to its field, else stash under `extra`.+// Mirrors core's META_SETTERS map exactly (direct keys + alias sets).+function applyMeta(frame, key, value, headingLine, warnings) {+ switch (key) {+ case "duration":+ applyDuration(frame, value, headingLine, warnings);+ return;+ case "status":+ applyStatus(frame, value, headingLine, warnings);+ return;+ case "poster":+ applyPoster(frame, value);+ return;+ case "src":+ frame.src = value;+ return;+ }+ if (TRANSITION_KEYS.has(key)) {+ frame.transitionIn = value;+ return;+ }+ if (SCENE_KEYS.has(key)) {+ frame.scene = value;+ return;+ }+ if (VOICEOVER_KEYS.has(key)) {+ frame.voiceover = stripQuotes(value);+ return;+ }+ frame.extra[key] = value;+}++function applyPoster(frame, value) {+ const num = DURATION_NUM_RE.exec(value);+ if (num) frame.poster = Number.parseFloat(num[1] ?? "");+}++function applyDuration(frame, value, headingLine, warnings) {+ frame.duration = value;+ const num = DURATION_NUM_RE.exec(value);+ if (num) {+ frame.durationSeconds = Number.parseFloat(num[1] ?? "");+ return;+ }+ warnings.push({+ message: `Frame ${frame.index}: could not parse duration "${value}".`,+ line: headingLine,+ frameIndex: frame.index,+ });+}++function applyStatus(frame, value, headingLine, warnings) {+ const normalized = value.toLowerCase();+ if (isFrameStatus(normalized)) {+ frame.status = normalized;+ return;+ }+ frame.extra.status = value;+ warnings.push({+ message: `Frame ${frame.index}: unknown status "${value}"; defaulting to "${DEFAULT_FRAME_STATUS}".`,+ line: headingLine,+ frameIndex: frame.index,+ });+}++function stripQuotes(value) {+ if (value.length >= 2) {+ const first = value[0];+ const last = value[value.length - 1];+ if ((first === '"' && last === '"') || (first === "'" && last === "'")) {+ return value.slice(1, -1);+ }+ }+ return value;+}diff --git a/skills/music-to-video/scripts/stage-assets.mjs b/skills/music-to-video/scripts/stage-assets.mjsnew file mode 100644index 0000000000..18f92bf9f9--- /dev/null+++ b/skills/music-to-video/scripts/stage-assets.mjs@@ -0,0 +1,55 @@+#!/usr/bin/env node+// stage-assets.mjs — copy user-supplied media into the project's assets/ so scene+// files (and lint/validate/render) can reference them locally. Only needed when+// the user provides images/videos for asset treatments (montage.md). First-wins,+// idempotent, safe to run twice. Never fetches remote URLs.+//+// Usage: node stage-assets.mjs --from <srcDir> --hyperframes <projectRoot>+// [--into public] (subdir under assets/; default copies flat into assets/)+//+// Copies common media extensions only; reports what landed.++import { existsSync, mkdirSync, readdirSync, copyFileSync, statSync } from "node:fs";+import { extname, join, resolve, basename } from "node:path";++const argv = process.argv.slice(2);+const flag = (n, d) => {+ const i = argv.indexOf(`--${n}`);+ return i >= 0 && i + 1 < argv.length ? argv[i + 1] : d;+};+function die(m) {+ console.error(`✗ stage-assets.mjs: ${m}`);+ process.exit(1);+}++const fromDir = flag("from", null);+if (!fromDir) die("missing --from <srcDir>");+const fromAbs = resolve(fromDir);+if (!existsSync(fromAbs) || !statSync(fromAbs).isDirectory()) die(`--from is not a directory: ${fromAbs}`);+const hyperframesDir = resolve(flag("hyperframes", "."));+const into = flag("into", "");+const destDir = join(hyperframesDir, "assets", into);++const MEDIA = new Set([".jpg", ".jpeg", ".png", ".webp", ".gif", ".mp4", ".mov", ".webm", ".m4v"]);++mkdirSync(destDir, { recursive: true });+let staged = 0,+ skipped = 0;+const landed = [];+for (const name of readdirSync(fromAbs)) {+ const src = join(fromAbs, name);+ if (!statSync(src).isFile()) continue;+ if (!MEDIA.has(extname(name).toLowerCase())) continue;+ const dest = join(destDir, basename(name));+ if (existsSync(dest)) {+ skipped++;+ continue;+ } // first-wins+ copyFileSync(src, dest);+ staged++;+ landed.push(join("assets", into, basename(name)));+}++console.log(`✓ stage-assets: ${staged} copied, ${skipped} already present → ${join("assets", into)}/`);+for (const l of landed) console.log(` ${l}`);+if (staged === 0 && skipped === 0) console.log(` (no media files found in ${fromAbs})`);diff --git a/skills/music-to-video/scripts/validate-plan.mjs b/skills/music-to-video/scripts/validate-plan.mjsnew file mode 100644index 0000000000..9eb497725b--- /dev/null+++ b/skills/music-to-video/scripts/validate-plan.mjs@@ -0,0 +1,144 @@+#!/usr/bin/env node+// validate-plan.mjs — machine-check STORYBOARD.md against the audiomap + template+// catalog at Step 3, before any frame is built. Runs on the PLAN (frame files do+// not exist yet), so it checks fields, not on-disk html.+//+// HARD (exit 1): frontmatter duration_s == audiomap duration; >=1 frame; each frame+// has src + positive duration; frames tile the track gap-free (sum == duration_s).+// WARN (exit 0): best-effort group checks — each group exactly one of+// template/free_design/asset; a template id exists under the --templates dir;+// phrase_flow frame has no beat_cut asset treatment.+//+// Frame-level checks use the vendored storyboard parser. Group-level checks re-scan+// the RAW source (the parser's META_RE consumes indented `- params:`/`- asset:` lines).+//+// Reads: --storyboard, --audiomap, --hyperframes <root> (for templates/).++import { existsSync, readFileSync } from "node:fs";+import { join, resolve } from "node:path";+import { parseStoryboard } from "./lib/storyboard.mjs";++const argv = process.argv.slice(2);+const flag = (n, d) => {+ const i = argv.indexOf(`--${n}`);+ return i >= 0 && i + 1 < argv.length ? argv[i + 1] : d;+};+const hyperframesDir = resolve(flag("hyperframes", "."));+const storyboardPath = resolve(flag("storyboard", join(hyperframesDir, "STORYBOARD.md")));+const audiomapPath = resolve(flag("audiomap", join(hyperframesDir, "audiomap.json")));+const templatesDir = resolve(flag("templates", join(hyperframesDir, "templates")));++const errors = [];+const warns = [];+const r3 = (x) => Math.round(x * 1000) / 1000;++if (!existsSync(storyboardPath)) {+ console.error(`✗ STORYBOARD.md not found at ${storyboardPath}`);+ process.exit(1);+}+const raw = readFileSync(storyboardPath, "utf8");+const manifest = parseStoryboard(raw);+const G = manifest.globals.extra ?? {};++// ---------- audio duration ----------+let audioDur = null;+if (existsSync(audiomapPath)) {+ try {+ audioDur = JSON.parse(readFileSync(audiomapPath, "utf8"))?.audio?.duration_sec ?? null;+ } catch (e) {+ warns.push(`audiomap parse failed: ${e.message}`);+ }+} else {+ warns.push(`audiomap not found at ${audiomapPath} — skipping duration cross-check`);+}++// ---------- frontmatter duration_s ----------+const declaredDur = G.duration_s != null ? Number.parseFloat(G.duration_s) : NaN;+if (!Number.isFinite(declaredDur)) errors.push(`frontmatter \`duration_s\` missing or unparseable`);+else if (audioDur != null && Math.abs(declaredDur - audioDur) > 0.05)+ errors.push(`frontmatter duration_s (${declaredDur}) != audiomap duration (${audioDur})`);++// ---------- frames (hard) ----------+const frames = manifest.frames;+if (frames.length === 0) errors.push(`no frames (no \`## Frame N — <id>\` headings found)`);++let sum = 0;+for (const f of frames) {+ const label = `frame ${f.number ?? f.index}${f.title ? ` (${f.title})` : ""}`;+ if (!f.src) errors.push(`${label}: missing \`- src:\``);+ if (!Number.isFinite(f.durationSeconds) || f.durationSeconds <= 0)+ errors.push(`${label}: missing/!positive \`- duration:\` (got ${JSON.stringify(f.duration)})`);+ else sum += f.durationSeconds;+}+sum = r3(sum);+const tileTarget = Number.isFinite(declaredDur) ? declaredDur : audioDur;+if (tileTarget != null && Math.abs(sum - tileTarget) > 0.1)+ errors.push(`frame durations sum to ${sum}s but the track is ${tileTarget}s — frames must tile it gap-free`);++// ---------- group checks (warns) — parse RAW text ----------+const FRAME_HEAD = /^##\s+(?:frame|scene|section)\b/i;+const GROUP_HEAD = /^\s*[-*]\s*\*\*\s*(\w+)\s*\*\*\s*[—:-]\s*(template|free_design|asset)\b(.*)$/i;+const templateExistsCache = new Map();+function templateExists(id) {+ if (templateExistsCache.has(id)) return templateExistsCache.get(id);+ const ok = existsSync(join(templatesDir, id, "index.html"));+ templateExistsCache.set(id, ok);+ return ok;+}++// walk raw lines → group blocks tagged with their frame label + pacing+const blocks = [];+let frameLabel = "?";+let pacing = "";+let cur = null;+for (const ln of raw.split(/\r?\n/)) {+ if (FRAME_HEAD.test(ln)) {+ frameLabel = ln.replace(/^#+\s+/, "").trim();+ pacing = "";+ cur = null;+ continue;+ }+ const pm = ln.match(/^\s*[-*]\s*pacing\s*:\s*([A-Za-z_]+)/i);+ if (pm && !cur) {+ pacing = pm[1].toLowerCase();+ continue;+ }+ const h = GROUP_HEAD.exec(ln);+ if (h) {+ cur = { frameLabel, pacing, name: h[1], kind: h[2].toLowerCase(), rest: h[3] ?? "", lines: [] };+ blocks.push(cur);+ continue;+ }+ if (cur) cur.lines.push(ln);+}++const framesWithGroups = new Set(blocks.map((b) => b.frameLabel));+for (const f of frames) {+ const lbl = `Frame ${f.number ?? ""} — ${f.title ?? f.index}`.replace(/\s+—\s+$/, "");+ if (![...framesWithGroups].some((s) => s.includes(String(f.title ?? "")))) {+ warns.push(`${lbl}: no parseable groups (expected \`- **gN** — template|free_design|asset …\`)`);+ }+}++for (const b of blocks) {+ const gid = `${b.frameLabel} / ${b.name}`;+ const blockText = b.rest + " " + b.lines.join(" ");+ if (b.kind === "template") {+ const m = b.rest.match(/`([^`]+)`/) || b.rest.match(/:\s*([\w-]+)/);+ const id = m ? m[1].trim() : null;+ if (!id) warns.push(`${gid}: template kind but no template id on the head line`);+ else if (!templateExists(id))+ warns.push(`${gid}: template \`${id}\` not found at templates/${id}/index.html`);+ }+ if (b.kind === "asset" && b.pacing === "phrase_flow" && /beat_cut/.test(blockText))+ warns.push(`${gid}: beat_cut asset treatment on a phrase_flow frame — use ken_burns/crossfade instead`);+}++// ---------- report ----------+for (const w of warns) console.log(`⚠ ${w}`);+if (errors.length) {+ for (const e of errors) console.error(`✗ ${e}`);+ console.error(`\nvalidate-plan: ${errors.length} error(s), ${warns.length} warning(s)`);+ process.exit(1);+}+console.log(`✓ validate-plan: ${frames.length} frames tile ${sum}s; ${blocks.length} groups; ${warns.length} warning(s)`);diff --git a/skills/music-to-video/sub-agents/frame-worker.md b/skills/music-to-video/sub-agents/frame-worker.mdnew file mode 100644index 0000000000..df8188e723--- /dev/null+++ b/skills/music-to-video/sub-agents/frame-worker.md@@ -0,0 +1,73 @@+# 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`++ `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).++## 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:+ - **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.+- Canvas `<width>×<height>` and the frame's `pacing`.++If your dispatch carries lint / validate feedback from a prior pass, address each finding.++## What comes fixed — realize it as given++- **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.++## 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`.+- 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`.+- `phrase_flow` frames pace by phrase / energy.+- Seek-safe per `hyperframes-core/determinism-rules.md` (derive variation from indices; swap text / numbers with `tl.set`).+- Asset clips: muted `<video>`, direct children of `#stage`, with `data-start` / `data-duration` / `data-track-index` and the crossfade hard-kill `tl.set`.+- Final frame is intentional; hero text is readable and clear of the edges.diff --git a/skills/pr-to-video/sub-agents/frame-worker.md b/skills/pr-to-video/sub-agents/frame-worker.mdindex f7aa03a5f8..66028b3894 100644--- a/skills/pr-to-video/sub-agents/frame-worker.md+++ b/skills/pr-to-video/sub-agents/frame-worker.md@@ -65,14 +65,14 @@ Generic seek-safety + structure live in `hyperframes-core` (read it; not restate1. **Read** — `hyperframes-core`'s composition contract (the structural law), then `frame.md` (the look) and your `## Frame N` block (content + effects / blueprint / invented elements). **Then open the recipe body of every id the block cites** — `ANIM_DIR/rules/<id>.md` per effect and `ANIM_DIR/blueprints/<id>.md` for the blueprint (plus its linked `examples/<id>.html` when unclear): you reproduce these, not improvise them. Internalize the five-point write-contract 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.2. **Design** — translate `scene` + the (sometimes shot-by-shot) narrative + the recipes you just read into a visual plan using `frame.md`'s components and type ramp. Honor the note's phases shot-by-shot per the whole-shot rule above, and find a visual idea that reinforces the beat, not a literal restyle of the words. Build the invented hero (diagram / type / metaphor).-3. **Author** — write the full sub-composition to `compositions/frames/<frame_id>.html`. `<template>`-wrapped root carrying `data-composition-id="<frame_id>"`, exactly one `gsap.timeline({ paused: true })` registered at `window.__timelines["<frame_id>"]`, built synchronously — per the core contract.+3. **Author** — write the full sub-composition to `compositions/frames/<frame_id>.html`. `<template>`-wrapped root carrying `data-composition-id="<frame_id>"` and styled via `#root` (not a class on that element — see contract pt 1), exactly one `gsap.timeline({ paused: true })` registered at `window.__timelines["<frame_id>"]`, built synchronously — per the core contract.4. **Check the contract, then finish** — re-read your file against the five-point contract below and fix in place. Writing the file is your terminal action; you do **not** run the CLI.## Write to the contract (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 these five before finishing — the codes in parens are what the orchestrator may cite back.-1. **Structure & template transport** (`missing_template_wrapper` / `missing_composition_id` / `clip_missing_data_attrs`) — root is `<template>`-wrapped with `data-composition-id="<frame_id>"`; **every `<style>` and `<script>` (incl. the GSAP load) lives INSIDE `<template>`** (the runtime clones only template contents — the most lethal miss); every `class="clip"` carries `data-start` / `data-duration` / `data-track-index`.+1. **Structure, template transport & root styling** (`missing_template_wrapper` / `missing_composition_id` / `clip_missing_data_attrs` / `subcomposition_root_styled_by_class`) — root is `<template>`-wrapped with `data-composition-id="<frame_id>"`; **every `<style>` and `<script>` (incl. the GSAP load) lives INSIDE `<template>`** (the runtime clones only template contents — the most lethal miss); **style the frame root via `#root`, never a class on the `data-composition-id` element** — at render a class on the root gets scoped to a descendant selector that can't match it, so the **whole scene renders unstyled** (and Studio preview still looks right — trust this rule, not the preview; descendants use plain selectors); every `class="clip"` carries `data-start` / `data-duration` / `data-track-index`.2. **One paused timeline** (`timeline_not_paused` / `timeline_not_registered`) — exactly one `gsap.timeline({ paused: true })`, registered at `window.__timelines["<frame_id>"]`, built synchronously.3. **Determinism & visibility** (`css_transition_used` / `exit_animation_on_non_final_scene`) — no CSS transitions, no `repeat` / `yoyo`, no `Math.random` / `Date.now` (the renderer seeks frame-by-frame); entrance via `fromTo` (not CSS-hidden starts) so the hero is visible by `t ≤ 0.5s`; no exit tween unless you are the final frame.4. **The whole shot fits `data-duration`** — `entrance → development → settle` all land inside it, and a non-still frame develops mid-shot (cited effects sequenced into phases, not all fired at `t=0`; an `Adapt` note keeps its `Keep` signature). **This includes any `code-*` block's internal cadence**: a long snippet at the block's default per-character speed _overruns_ a short frame — the code never finishes typing and the chrome beats never play. Set the cadence so the full block completes within `data-duration` (see `code-vocabulary.md`). Only a deliberate hold / stillness note skips development.