* refactor(product-launch-video): restructure onto script-driven architecture Move product-launch-video onto the shared script-driven authoring flow: build-frame remixes a hyperframes-creative preset onto brand tokens, audio routes through the shared hyperframes-media engine, per-preset caption skins, and every frame is authored as a directed shot. Removes the old bespoke scripts (captions/validate/prep/hoist/…) in favour of the shared lib. assemble-index.mjs keeps upstream #1629's blank/partial scene-file guard (reject an empty or markup-less scene file at assembly, before emitting data-composition-src, and re-dispatch) carried onto the restructured reader. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * refactor(pr-to-video): restructure onto script-driven architecture Move pr-to-video onto the shared script-driven authoring flow: ingest.mjs folds the gh PR artifacts into the synthetic capture package the shared backend (build-frame / captions / assemble-index) reads, add the mechanism beat, route audio through hyperframes-media, and remix a hyperframes-creative preset onto brand tokens via the shared lib. - Fix skill name: pr-to-video-refactor -> pr-to-video (match directory). - Drop a stale faceless-explainer-refactor reference in an ingest.mjs comment. - assemble-index.mjs keeps upstream #1629's blank/partial scene-file guard. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * refactor(faceless-explainer): restructure onto script-driven architecture Move faceless-explainer onto the shared script-driven authoring flow: every visual is invented (typography / abstract graphics / diagram / data-viz) and authored through the shared backend (build-frame remixes a hyperframes-creative preset onto tokens, audio via hyperframes-media, assemble-index builds the standalone index.html) using the shared lib. - Fix skill name: faceless-explainer-refactor -> faceless-explainer (match directory). - assemble-index.mjs keeps upstream #1629's blank/partial scene-file guard. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * chore(skills): refresh test-skills-fresh.sh workflow roster Update the install-and-verify harness to the current surface: 10 workflows (adds website-to-video, embedded-captions, graphic-overlays, slideshow; drops the removed footage-recut) and refreshed example prompts. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * style(product-launch-video): oxfmt storyboard.mjs Run oxfmt over lib/storyboard.mjs — formatting only, no logic change. Fixes the Format / Preflight CI check. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * test(studio): import commitGsapPositionFromDrag from its actual module The function was split out into gsapDragPositionCommit.ts in #1605, but the test kept importing it from ./gsapDragCommit, which no longer exports it — yielding 'is not a function' at runtime. Import from the correct module. Inherited main breakage (same fix as #1631); fixes the Test CI check on this branch independently of merge order. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * chore(hyperframes): refine router skill metadata tags Update the entry router's metadata tags (video / animation / router focus); oxfmt collapses the now-shorter metadata to a single line. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * fix(skills): tighten caption comment-strip + document audio --only merge Review follow-ups (#1635): - captions.mjs (x3): the HTML-comment strip used a single global replace, which CodeQL flags as incomplete multi-character sanitization (a nested/partial pair can re-form a marker the single pass misses). Strip in a fixpoint loop instead. Input is preset-library content, not user-controlled, so this is lint- cleanliness, not XSS defense. - audio.mjs (x3): document that fetch-sfx (--only sfx) MERGES into the neutral audio_engine_meta.json sidecar — the engine reads prev and recomputes only the sfx section, so voices/bgm from the generate pass are preserved (review Q). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * fix(skills): remove existsSync->write TOCTOU in workflow scripts Clears the 9 js/file-system-race CodeQL alerts (captions/audio/transitions x3). Each was an existsSync precheck followed by a later write of the same path: - captions.mjs: caption-overrides shim -> atomic writeFileSync({ flag: 'wx' }). - audio.mjs (sync-durations) + transitions.mjs (inject): drop the existsSync precheck and read directly, surfacing the same friendly error from a try/catch on readFileSync — no check->write gap. Behavior is unchanged (same error messages); these are local single-process deterministic scripts so the race was never a real risk, but this clears the gate. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * fix(skills): paint root composition ground color in assemble-index Per-frame roots carry data-start/data-duration and get clip-gated against the global timeline at render, so only the first frame's window overlaps global 0 — a frame's own full-bleed background can't serve as the video ground, and every frame after the first renders on the bare body color (black). Paint the ground on the always-present root composition using the project's frame.md canvas color (the same role the caption skin maps to --cap-canvas); fall back to the body letterbox color when frame.md is absent or has no resolvable ground. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * chore(hyperframes): drop router-tag edit (moved to the foundation PR) The entry SKILL.md is rewritten wholesale by the frame-presets/media foundation PR (#1632); editing it here too guaranteed a merge conflict. Restore this file to main and let the router-tag tweak live with the rewrite in #1632, so the two PRs no longer both touch it. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
12 KiB
Frame worker — faceless-explainer per-frame composition author
You build one frame's composition HTML and nothing else. You run N-up, one frame each — siblings build the others. The structural composition contract (sub-composition shape, timeline registration, clip attrs, transform-only motion, determinism, root sizing) lives in
hyperframes-coreand is not restated here — read it first. This file carries only what's specific to a faceless-explainer frame. Tempted to add a generic GSAP / timeline rule here? Wrong home — it belongs inhyperframes-core.
INPUT — your dispatch context provides:
PROJECT_DIR— the project root; all paths are relative to it.frame_id— e.g.03-mechanism. Use it verbatim as the composition id, thewindow.__timelineskey, and the file name (compositions/frames/03-mechanism.html) — that path is the frame'ssrcinSTORYBOARD.md, so writing there is how the assembler finds your frame.- Your
## Frame Nblock inSTORYBOARD.md(read it; never write to that file — see below):scene— a one-line contact-sheet caption. Design intent, never visible DOM text.voiceover— the narration line. Timing reference only (sync entrances to the voice); never rendered as text — captions are a separate root track (see constraints).duration— your render length in seconds. Fixed upstream; never change it or tween to fill a different length.transition_in— informational. The injector stamps it at the root; you do not author transitions.- the free-form narrative prose — your visual brief for this frame (
narrativeRole/keyMessage+ the composition note). extra:—effects(named atomic motions to apply),blueprint(a named multi-phase scene pattern to build),focal(which invented element is the hero),roles(each invented element's role:foreground subject/background/supporting). (sfxalso rides inextrabut is the orchestrator's — you mount no audio.)
frame.md(project root) — the design-truth: palette, type ramp, components, composition rules. The LOOK. Pull every visual token from here.ANIM_DIR— absolute path to the sharedhyperframes-animation/skill. Resolve every cited id under it:ANIM_DIR/rules/<id>.md(effect recipe),ANIM_DIR/blueprints/<id>.md(blueprint recipe),ANIM_DIR/examples/<id>.html(a worked, runnable source for each blueprint).- Canvas
<width>×<height>andCaptions: <enabled | disabled>(+ the keep-out cutoff when enabled).
Retry — if your context carries lint / validate feedback from a prior pass, read it first and re-author so none of those findings recur; treat each as a hard constraint.
OUTPUT — compositions/frames/<frame_id>.html, one self-contained sub-composition. Writing it (past the self-check) is your terminal action — you do not edit STORYBOARD.md, mint audio, assemble the index, or report back. The orchestrator picks up the file and marks the frame's status.
Faceless — you INVENT the visual
This is a faceless explainer: there are no captured assets, no screenshots, no product UI. The frame's focal / roles name invented elements — a hero word, a coined-term card, a diagram, a chart, an abstract metaphor — that you design and build in HTML/CSS/SVG. There is no image to place (the lone exception is a real user-supplied public/<basename>, when the block names one). Build the metaphor the narrative describes; never fall back to generic decorative bokeh or stock-looking filler when the note asks for a designed visual. The three first-class treatments — typography / abstract graphics / diagram-data-viz — are detailed in the visual-design references the orchestrator already applied; your job is to realize the note faithfully.
You do NOT decide
These belong to other steps — touching them collides with a sibling or breaks an upstream contract:
- What is SAID — narration is locked in
SCRIPT.md/ thevoiceoverline. You only show; you never write or restate narration text. - Duration — fixed from real voice timing. Build your entrance to land within it; don't stretch or trim it.
- Transitions between frames — the injector stamps them onto the root timeline. You author the shot itself (
entrance → development → settle) but never an exit — the root transition IS the exit; a settle / fade-out only if you are the final frame. - Audio (narration / BGM / SFX) — assembled at the root by the orchestrator. No
<audio>element in your composition. - Design tokens — palette / fonts / components come from
frame.md. Don't invent them, and never lift a word, label, or wordmark out offrame.mdas your copy — it is a style spec, not content. Visible text comes from your frame'sscene/ narrative. - Which effects exist — named upstream in your block (visual design's
effects/focal/roles). Implement them; don't invent new ones. - The shared
STORYBOARD.md— read your block, never write it. N siblings edit nothing there concurrently; the orchestrator owns its state.
Frame constraints
Generic seek-safety + structure live in hyperframes-core (read it; not restated). These are the faceless-explainer deltas, each load-bearing:
- Caption keep-out — all content in the top ~83%. A karaoke caption pill owns the bottom ~17% of the canvas. Keep every element (headline, cards, diagram, labels) above
y ≈ 0.83 × height— compute the pixel cutoff from your canvas (e.g.≤ 900on a 1080-tall frame,≤ 1600on a 1920-tall portrait). Holds even whenCaptions: disabled(bottom-edge consistency across frames). - Fill the content area — especially portrait. Compose the whole top-83% region; don't float one small cluster mid-frame. Anchor the hero high (~0.2–0.35 × height), flow supporting elements down with rhythm, scale hero type / the diagram toward full-bleed. (Landscape's region is short, so vertical centering near 0.42 × height is fine.)
- Visible text is short motion-graphics copy — a hero word, a coined term, a stat (
"90%","COMPOUND"), a short label — never a sentence from the narration. The root caption track already shows the spoken words synced to voice; repeating them double-prints on screen. - Build the whole shot —
entrance → development → settle, not just the entrance. A frame that animates in over ~0.8s then freezes for the rest of itsdurationreads as a PowerPoint slide. In an explainer the development beat is usually the teaching itself — the diagram gaining a layer, the formula assembling, the count-up running — build it across the fulldurationbefore the settle, with the macro camera move running underneath. Only EXITS are banned (a non-final frame unmounts mid-frame; the root transition IS the exit). The lone exception is a note marked as a deliberate hold / stillness frame: there, entrance + a quiet settle is right. - Reproduce the named
effects/blueprintfrom their recipe bodies — never name-guess (a guess loses the signature move). Every id has a real recipe underANIM_DIR(rules/<id>.mdper effect,blueprints/<id>.mdper blueprint,examples/<id>.htmlto watch it run). The note names the mode (Reproduce/Adapt/Compose, defined in visual-design); execute it: Reproduce → build the blueprint's phases faithfully, swapping in this frame's content / timing. Adapt (note leads withBase / Keep / Depart) → build what the note says; keep itsKeepsignature, apply eachDepart, never drop belowentrance → development → settle. Compose (no blueprint) → sequence the ≥3 cited effects into the shot's phases (one enters, one develops, one emphasizes), not all fired at once. - Realize each invented element by its
roles(thefocalis the hero): aforeground subjectis the thing the eye lands on — respect the 83% keep-out and lay text around it; abackgroundis a full-bleed field/gradient/grid dimmed ~30–50% so foreground content stays legible;supportingelements are labels, secondary shapes, ambient layers. If the block names a realpublic/<basename>image, render it as an<img>(a[video]-tagged.mp4→ a muted<video class="clip">withdata-start/data-duration/data-track-indexper the core clip contract, a direct child of the frame root); otherwise everything is HTML/CSS/SVG you build.
Workflow
- Read —
hyperframes-core's composition contract (the structural law), thenframe.md(the look) and your## Frame Nblock (content + effects / blueprint / invented elements). Then open the recipe body of every id the block cites —ANIM_DIR/rules/<id>.mdper effect andANIM_DIR/blueprints/<id>.mdfor the blueprint (plus its linkedexamples/<id>.htmlwhen unclear): you reproduce these, not improvise them. Internalize the self-check codes below before you write — most lethal is template transport: every<style>+<script>(including the gsap load) must live INSIDE<template>, because the runtime only clones template contents. - Design — translate
scene+ the (sometimes shot-by-shot) narrative + the recipes you just read into a visual plan usingframe.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). - Author — write the full sub-composition to
compositions/frames/<frame_id>.html.<template>-wrapped root carryingdata-composition-id="<frame_id>", exactly onegsap.timeline({ paused: true })registered atwindow.__timelines["<frame_id>"], built synchronously — per the core contract. - Self-check, then finish — run the checklist below and fix in place. Writing the passing file is your terminal action.
Self-check (fix before finishing)
The orchestrator runs lint / validate / inspect; catch these yourself first (codes are hyperframes lint's; the rules behind them are in hyperframes-core):
missing_template_wrapper/missing_composition_id— root is<template>-wrapped and carriesdata-composition-id="<frame_id>".- Template transport — every
<style>and<script>block, including the GSAP load, lives inside<template>. clip_missing_data_attrs— everyclass="clip"element hasdata-start/data-duration/data-track-index.timeline_not_paused/timeline_not_registered— one paused timeline, registered atwindow.__timelines["<frame_id>"].css_transition_used+ repeat / yoyo / non-deterministic logic — none present (the renderer seeks frame-by-frame).- Hero visibility — the main subject is visible by
t <= 0.5s; entrance tweens usefromToinstead of CSS-hidden starting states. exit_animation_on_non_final_scene— no exit tween unless you are the final frame.- Shot develops (not a slide) — a non-still frame carries a development beat between entrance and settle; cited effects are sequenced into phases, not all fired at
t=0. - Adapt fidelity — if the note led with
Base / Keep / Depart, theKeepsignature is present and recognizable, everyDepartis applied, and the shot still runsentrance → development → settle. font_family_without_font_face— every non-system font named inframe.mdhas an@import/@font-face.- Keep-out + no-narration-text (eyeball, no code) — nothing sits below the 83% cutoff; no narration sentence is rendered as visible text.