diff --git a/skills/website-to-hyperframes/SKILL.md b/skills/website-to-hyperframes/SKILL.md index 0eb1f50b1..c038351cd 100644 --- a/skills/website-to-hyperframes/SKILL.md +++ b/skills/website-to-hyperframes/SKILL.md @@ -14,79 +14,80 @@ Users say things like: - "Turn this website into a 15-second social ad for Instagram" - "Create a 30-second product tour from https://..." -The workflow has 7 steps. Each produces an artifact that gates the next. +The workflow has 7 steps. Each produces an artifact that gates the next. By default it's collaborative β€” gates marked πŸ’¬ stop and ask the user. If the user signals autonomous mode ("decide for me", "surprise me"), every πŸ’¬ gate is skipped; see step-2-brief.md for how that propagates. --- -## Step 1: Capture & Understand +## Step 0: Capture & Understand the Brand -**Read:** [references/step-1-capture.md](references/step-1-capture.md) +**Read:** [references/step-0-capture.md](references/step-0-capture.md) -Run the capture, read the extracted data, and build a working summary using the write-down-and-forget method. +Capture the site, then read the extracted data to understand the **brand and product** β€” what it does, who it's for, what voice it speaks in, what mood it lives in. The captured assets are a brand toolkit for later, not the building blocks the video is made from. -**Gate:** Print your site summary (name, top colors, fonts, key assets, one-sentence vibe). +**Gate:** Site summary printed β€” strategy-first (what the product does, who it's for, brand voice) before the asset / color / font inventory. --- -## Step 2: Write DESIGN.md +## Step 1: Brand Identity -**Read:** [references/step-2-design.md](references/step-2-design.md) +**Read:** [references/step-1-design.md](references/step-1-design.md) -Write a simple brand reference for the captured website. 6 sections, ~90 lines. This is a cheat sheet, not the creative plan β€” that comes in Step 4. +Write DESIGN.md β€” a brand cheat sheet covering the visual identity: colors, typography, component styles, layout principles. Use `design-styles.json` for exact computed values. -**Gate:** `DESIGN.md` exists in the project directory. +**Speed option:** For fast-pacing videos (billboard-per-beat), DESIGN.md can be a 50-line summary of colors + fonts + do's/don'ts β€” not a 300-line document. The sub-agent prompt in Step 5 pastes brand values directly, so DESIGN.md depth only matters for complex compositions. + +**Gate:** `DESIGN.md` exists (any length) with at minimum: color palette, font choices, and do's/don'ts. --- -## Step 3: Write SCRIPT +## Step 2: Strategy & Messaging -**Read:** [references/step-3-script.md](references/step-3-script.md) +**Read:** [references/step-2-brief.md](references/step-2-brief.md), [references/capabilities.md](references/capabilities.md) (scan the Table of Contents β€” deep-dive sections only as needed) -Write the narration script. The story backbone. Scene durations come from the narration, not from guessing. +Align with the user on **what the video must communicate** before talking visuals or assets. Parse the user's prompt β€” they probably already gave you the video type and style. Ask only what's missing: the ONE thing this video must say, the narrative arc, and the audience. -**Gate:** `SCRIPT.md` exists in the project directory. +**Gate:** Video type, duration, format, and β€” critically β€” the message and narrative arc are locked. Without those, Step 3 can't write a concept-first storyboard. --- -## Step 4: Write STORYBOARD +## Step 3: Storyboard + Script πŸ’¬ -**Read:** [references/step-4-storyboard.md](references/step-4-storyboard.md) +**Read:** [references/step-3-storyboard.md](references/step-3-storyboard.md) -Write per-beat creative direction: mood, camera, animations, transitions, assets, depth layers, SFX. This is the creative north star β€” the document the engineer follows to build each composition. +Write the storyboard concept-first: message β†’ narrative arc β†’ beats that serve the arc β†’ techniques per beat β†’ brand accents pass at the end. Then write the narration script to match. Present both to the user with a beat-by-beat summary. Iterate until they approve. -**Gate:** `STORYBOARD.md` exists with beat-by-beat direction and an asset audit table. +**Gate:** `STORYBOARD.md` + `SCRIPT.md` exist AND the user has approved the plan. --- -## Step 5: Generate VO + Map Timing +## Step 4: VO, Timing + Captions πŸ’¬ -**Read:** [references/step-5-vo.md](references/step-5-vo.md) +**Read:** [references/step-4-vo.md](references/step-4-vo.md) -Generate TTS audio, transcribe for word-level timestamps, and map timestamps to beats. Update STORYBOARD.md with real durations. +If Step 2 said no narration β€” ask about background music, then skip to Step 5. Otherwise: ask the user which TTS provider (HeyGen TTS, ElevenLabs, or Kokoro), generate audio, transcribe, map timestamps to beats. Then ask about captions. -**Gate:** `narration.wav` (or .mp3) + `transcript.json` exist. Beat timings in STORYBOARD.md updated. +**Gate:** Either (a) no narration was requested and storyboard has manual beat timings, or (b) `narration.wav` + `transcript.json` exist and beat timings updated with real durations. --- -## Step 6: Build Compositions +## Step 5: Build Compositions **Read:** The `hyperframes` skill (load it β€” every rule matters) -**Read:** [references/step-6-build.md](references/step-6-build.md) +**Read:** [references/step-5-build.md](references/step-5-build.md) -Build each composition following the storyboard. After each one: self-review for layout, asset placement, and animation quality. +Build index.html and compositions following the architecture and pacing chosen in the storyboard (Step 3). Sub-agents run `hyperframes lint` and `hyperframes snapshot` on each beat before reporting back. -**Gate:** Every composition has been self-reviewed. No overlapping elements, no misplaced assets, no static images without motion. +**Gate:** Every `compositions/beat-N.html` has been read top-to-bottom by the main agent against DESIGN.md and STORYBOARD.md. The per-beat checklist lives in [step-5-build.md](references/step-5-build.md). --- -## Step 7: Validate & Deliver +## Step 6: Validate & Deliver + +**Read:** [references/step-6-validate.md](references/step-6-validate.md) -**Read:** [references/step-7-validate.md](references/step-7-validate.md) +Lint, validate, take snapshots scaled to video length (formula: `max(beats Γ— 3, ceil(duration_seconds / 2))`), and review each one. Fix issues before delivering. Deliver the localhost Studio project URL β€” only render to MP4 on explicit user request. -Lint, validate, snapshot, preview. Deliver the localhost Studio project URL -(`http://localhost:/#project/`) to the user first β€” only -render to MP4 on explicit request. Do not treat `index.html` as the project -handoff link; it is source-code context only. +**Deliver something you're proud of.** Before handing off, ask yourself: would I post this on social media with my name on it? If not, fix what's wrong. **Gate:** `npx hyperframes lint` and `npx hyperframes validate` pass with zero errors, and the final response includes the active Studio project URL. @@ -96,13 +97,17 @@ handoff link; it is source-code context only. ### Video Types -| Type | Duration | Beats | Narration | -| --------------------- | -------- | ----- | ---------------------- | -| Social ad (IG/TikTok) | 10-15s | 3-4 | Optional hook sentence | -| Product demo | 30-60s | 5-8 | Full narration | -| Feature announcement | 15-30s | 3-5 | Full narration | -| Brand reel | 20-45s | 4-6 | Optional, music focus | -| Launch teaser | 10-20s | 2-4 | Minimal, high energy | +Typical constraints by video type β€” use as a starting point, not a formula. Beat count should follow from the content and the narration, not from a target range. + +| Type | Typical duration | Duration driver | Narration | +| --------------------- | ---------------- | ------------------ | --------------------- | +| Social ad (IG/TikTok) | 10–15s | Platform limit | Optional | +| Product demo | 30–60s | Script length | Full narration | +| Feature announcement | 15–30s | Feature complexity | Full narration | +| Brand reel | 20–45s | Music track | Optional, music focus | +| Launch teaser | 10–20s | Hook energy | Minimal | + +Beat count is not in this table intentionally β€” it should come from the storyboard, not from "social ad = 3-4 beats." A social ad for a complex product might need 5 well-timed beats. A brand reel with one strong visual thesis might need 3. ### Format @@ -112,13 +117,15 @@ handoff link; it is source-code context only. ### Reference Files -| File | When to read | -| -------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| [step-1-capture.md](references/step-1-capture.md) | Step 1 β€” reading captured data | -| [step-2-design.md](references/step-2-design.md) | Step 2 β€” writing DESIGN.md | -| [step-3-script.md](references/step-3-script.md) | Step 3 β€” writing the narration script | -| [step-4-storyboard.md](references/step-4-storyboard.md) | Step 4 β€” per-beat creative direction | -| [step-5-vo.md](references/step-5-vo.md) | Step 5 β€” TTS, transcription, timing | -| [step-6-build.md](references/step-6-build.md) | Step 6 β€” building compositions with self-review | -| [step-7-validate.md](references/step-7-validate.md) | Step 7 β€” lint, validate, snapshot, preview | -| [techniques.md](../hyperframes/references/techniques.md) | Steps 4 & 6 β€” 11 visual techniques with code patterns (SVG drawing, Canvas 2D, 3D, typography, Lottie, video, typing, variable fonts, MotionPath, transitions, audio-reactive) | +| File | When to read | +| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | +| [step-0-capture.md](references/step-0-capture.md) | Step 0 β€” capture, understand the brand and product, write strategy-first site summary | +| [step-1-design.md](references/step-1-design.md) | Step 1 β€” write DESIGN.md brand cheat sheet (6 sections, 250-350 lines) | +| [step-2-brief.md](references/step-2-brief.md) | Step 2 β€” align on message, narrative arc, audience with user | +| [capabilities.md](references/capabilities.md) | Steps 2 & 5 β€” full inventory of what HyperFrames can do (24 sections). Scan the TOC during the brief, deep-dive specific sections during build | +| [step-3-storyboard.md](references/step-3-storyboard.md) | Step 3 β€” storyboard + script (combined) with user review gate | +| [step-4-vo.md](references/step-4-vo.md) | Step 4 β€” TTS provider choice, generation, timing | +| [step-5-build.md](references/step-5-build.md) | Step 5 β€” build index.html + compositions | +| [step-6-validate.md](references/step-6-validate.md) | Step 6 β€” lint, validate, snapshots (scaled to video length), preview | +| [techniques.md](../hyperframes/references/techniques.md) | Steps 3 & 5 β€” 13 primitive animation techniques with code patterns (adapt, don't copy-paste) | +| [html-in-canvas-patterns.md](../hyperframes/references/html-in-canvas-patterns.md) | Step 5 β€” complete code patterns for HTML-in-Canvas effects (lives in the hyperframes skill) | diff --git a/skills/website-to-hyperframes/assets/sfx/CREDITS.md b/skills/website-to-hyperframes/assets/sfx/CREDITS.md new file mode 100644 index 000000000..750d6e839 --- /dev/null +++ b/skills/website-to-hyperframes/assets/sfx/CREDITS.md @@ -0,0 +1,35 @@ +# SFX Credits + +All sound effects in this directory are sourced from [Pixabay](https://pixabay.com/sound-effects/) and used under the [Pixabay Content License](https://pixabay.com/service/license-summary/). + +The Pixabay license allows free use for commercial and non-commercial purposes without attribution, but attribution is appreciated and given here for transparency. + +## Files + +The following `.mp3` files are bundled with this skill: + +- `chime.mp3` +- `click.mp3` / `click-soft.mp3` +- `error.mp3` +- `glitch-1.mp3` / `glitch-2.mp3` / `glitch-3.mp3` +- `impact-bass-1.mp3` / `impact-bass-2.mp3` +- `key-press.mp3` +- `notification.mp3` +- `ping.mp3` +- `pop.mp3` +- `riser.mp3` +- `sparkle.mp3` +- `typing.mp3` +- `whoosh.mp3` / `whoosh-short.mp3` / `whoosh-cinematic.mp3` + +See `manifest.json` for per-file metadata (duration, energy character, recommended use). + +## License + +All files are distributed under the [Pixabay Content License](https://pixabay.com/service/license-summary/), which permits: + +- Commercial and non-commercial use +- Modification and remixing +- Redistribution as part of derivative works (such as videos rendered with HyperFrames) + +without any attribution requirement. diff --git a/skills/website-to-hyperframes/assets/sfx/chime.mp3 b/skills/website-to-hyperframes/assets/sfx/chime.mp3 new file mode 100644 index 000000000..12da953a3 Binary files /dev/null and b/skills/website-to-hyperframes/assets/sfx/chime.mp3 differ diff --git a/skills/website-to-hyperframes/assets/sfx/click-soft.mp3 b/skills/website-to-hyperframes/assets/sfx/click-soft.mp3 new file mode 100644 index 000000000..2706b1d2e Binary files /dev/null and b/skills/website-to-hyperframes/assets/sfx/click-soft.mp3 differ diff --git a/skills/website-to-hyperframes/assets/sfx/click.mp3 b/skills/website-to-hyperframes/assets/sfx/click.mp3 new file mode 100644 index 000000000..2706b1d2e Binary files /dev/null and b/skills/website-to-hyperframes/assets/sfx/click.mp3 differ diff --git a/skills/website-to-hyperframes/assets/sfx/error.mp3 b/skills/website-to-hyperframes/assets/sfx/error.mp3 new file mode 100644 index 000000000..6b4487ff4 Binary files /dev/null and b/skills/website-to-hyperframes/assets/sfx/error.mp3 differ diff --git a/skills/website-to-hyperframes/assets/sfx/glitch-1.mp3 b/skills/website-to-hyperframes/assets/sfx/glitch-1.mp3 new file mode 100644 index 000000000..124f45019 Binary files /dev/null and b/skills/website-to-hyperframes/assets/sfx/glitch-1.mp3 differ diff --git a/skills/website-to-hyperframes/assets/sfx/glitch-2.mp3 b/skills/website-to-hyperframes/assets/sfx/glitch-2.mp3 new file mode 100644 index 000000000..580b6fdc4 Binary files /dev/null and b/skills/website-to-hyperframes/assets/sfx/glitch-2.mp3 differ diff --git a/skills/website-to-hyperframes/assets/sfx/glitch-3.mp3 b/skills/website-to-hyperframes/assets/sfx/glitch-3.mp3 new file mode 100644 index 000000000..5a8adc244 Binary files /dev/null and b/skills/website-to-hyperframes/assets/sfx/glitch-3.mp3 differ diff --git a/skills/website-to-hyperframes/assets/sfx/impact-bass-1.mp3 b/skills/website-to-hyperframes/assets/sfx/impact-bass-1.mp3 new file mode 100644 index 000000000..ecfe0c48a Binary files /dev/null and b/skills/website-to-hyperframes/assets/sfx/impact-bass-1.mp3 differ diff --git a/skills/website-to-hyperframes/assets/sfx/impact-bass-2.mp3 b/skills/website-to-hyperframes/assets/sfx/impact-bass-2.mp3 new file mode 100644 index 000000000..4ae448b58 Binary files /dev/null and b/skills/website-to-hyperframes/assets/sfx/impact-bass-2.mp3 differ diff --git a/skills/website-to-hyperframes/assets/sfx/key-press.mp3 b/skills/website-to-hyperframes/assets/sfx/key-press.mp3 new file mode 100644 index 000000000..d669006e0 Binary files /dev/null and b/skills/website-to-hyperframes/assets/sfx/key-press.mp3 differ diff --git a/skills/website-to-hyperframes/assets/sfx/manifest.json b/skills/website-to-hyperframes/assets/sfx/manifest.json new file mode 100644 index 000000000..dd2423025 --- /dev/null +++ b/skills/website-to-hyperframes/assets/sfx/manifest.json @@ -0,0 +1,97 @@ +{ + "chime": { + "file": "chime.mp3", + "duration": 2.5, + "description": "This is a soft, melodic chime sound effect perfect for signaling a gentle transition or a lighthearted moment in a video." + }, + "click-soft": { + "file": "click-soft.mp3", + "duration": 0.37, + "description": "This is a smooth, medium-energy swoosh sound effect, perfect for transitioning between two scenes or highlighting a sleek reveal." + }, + "click": { + "file": "click.mp3", + "duration": 0.37, + "description": "This is a sharp, medium-energy digital \"whoosh\" effect that works perfectly for a quick transition between video clips." + }, + "error": { + "file": "error.mp3", + "duration": 1.62, + "description": "This is a sharp, medium-energy digital glitch sound that serves as an effective, abrupt transition for a video cut or error screen." + }, + "glitch-1": { + "file": "glitch-1.mp3", + "duration": 2.64, + "description": "This is a high-energy, distorted digital impact sound effect that works perfectly for a sudden reveal or a punchy transition in a fast-paced edit." + }, + "glitch-2": { + "file": "glitch-2.mp3", + "duration": 3.5, + "description": "This is a harsh, distorted digital glitch effect with high energy that serves as a jarring transition or a chaotic digital reveal." + }, + "glitch-3": { + "file": "glitch-3.mp3", + "duration": 3.1, + "description": "This is a low-energy, subtle electronic click sound effect that works well as a minimal audio transition or a UI element for a subtle selection reveal." + }, + "impact-bass-1": { + "file": "impact-bass-1.mp3", + "duration": 2.12, + "description": "This is a medium-energy, sharp electronic chime that works perfectly as an accent for a quick transition or a brief, high-tech visual reveal." + }, + "impact-bass-2": { + "file": "impact-bass-2.mp3", + "duration": 2.59, + "description": "This sound effect is a shimmering, ethereal synth riser with a medium energy level, perfect for creating anticipation before a magical transition or reveal." + }, + "key-press": { + "file": "key-press.mp3", + "duration": 0.4, + "description": "This is a medium-energy, distorted digital impact sound effect that works well for a sudden glitch transition or a glitchy text reveal." + }, + "notification": { + "file": "notification.mp3", + "duration": 2.46, + "description": "This is a medium-energy, whimsical digital transition sound effect that fits perfectly with a playful visual reveal or a cute UI interaction." + }, + "ping": { + "file": "ping.mp3", + "duration": 1.32, + "description": "This is a medium-energy, sharp electronic impact sound that works perfectly for punchy transitions or highlighting key on-screen reveals." + }, + "pop": { + "file": "pop.mp3", + "duration": 0.72, + "description": "This is a medium-energy, metallic clinking sound that works perfectly as an accent or a subtle impact for a precise visual reveal or UI element." + }, + "riser": { + "file": "riser.mp3", + "duration": 10.03, + "description": "This is a high-energy cinematic air whoosh transition that builds tension before suddenly cutting, making it perfect for a dramatic scene change or a quick reveal." + }, + "sparkle": { + "file": "sparkle.mp3", + "duration": 1.8, + "description": "This is a bright, high-energy \"whoosh\" transition sound with a fast, ascending pitch that is perfect for a rapid scene change or a quick reveal." + }, + "typing": { + "file": "typing.mp3", + "duration": 1.5, + "description": "This is a hard, high-pitched \"ding\" sound that works well as an accent for a reveal or a quick transition." + }, + "whoosh-cinematic": { + "file": "whoosh-cinematic.mp3", + "duration": 5.54, + "description": "This is a medium-energy, cinematic whoosh effect, ideal for smooth scene transitions or emphasizing a quick reveal." + }, + "whoosh-short": { + "file": "whoosh-short.mp3", + "duration": 0.57, + "description": "This is a medium-energy, organic wooden texture sound effect that works well as a subtle transition or a background accent." + }, + "whoosh": { + "file": "whoosh.mp3", + "duration": 0.57, + "description": "This is a hard, metallic impact sound effect that works well for a sudden reveal or a punchy transition." + } +} diff --git a/skills/website-to-hyperframes/assets/sfx/notification.mp3 b/skills/website-to-hyperframes/assets/sfx/notification.mp3 new file mode 100644 index 000000000..d3f0d1fa2 Binary files /dev/null and b/skills/website-to-hyperframes/assets/sfx/notification.mp3 differ diff --git a/skills/website-to-hyperframes/assets/sfx/ping.mp3 b/skills/website-to-hyperframes/assets/sfx/ping.mp3 new file mode 100644 index 000000000..99808c8b6 Binary files /dev/null and b/skills/website-to-hyperframes/assets/sfx/ping.mp3 differ diff --git a/skills/website-to-hyperframes/assets/sfx/pop.mp3 b/skills/website-to-hyperframes/assets/sfx/pop.mp3 new file mode 100644 index 000000000..e3ed16fef Binary files /dev/null and b/skills/website-to-hyperframes/assets/sfx/pop.mp3 differ diff --git a/skills/website-to-hyperframes/assets/sfx/riser.mp3 b/skills/website-to-hyperframes/assets/sfx/riser.mp3 new file mode 100644 index 000000000..0cea32c08 Binary files /dev/null and b/skills/website-to-hyperframes/assets/sfx/riser.mp3 differ diff --git a/skills/website-to-hyperframes/assets/sfx/sparkle.mp3 b/skills/website-to-hyperframes/assets/sfx/sparkle.mp3 new file mode 100644 index 000000000..dae37802f Binary files /dev/null and b/skills/website-to-hyperframes/assets/sfx/sparkle.mp3 differ diff --git a/skills/website-to-hyperframes/assets/sfx/typing.mp3 b/skills/website-to-hyperframes/assets/sfx/typing.mp3 new file mode 100644 index 000000000..ff69cc042 Binary files /dev/null and b/skills/website-to-hyperframes/assets/sfx/typing.mp3 differ diff --git a/skills/website-to-hyperframes/assets/sfx/whoosh-cinematic.mp3 b/skills/website-to-hyperframes/assets/sfx/whoosh-cinematic.mp3 new file mode 100644 index 000000000..93b721800 Binary files /dev/null and b/skills/website-to-hyperframes/assets/sfx/whoosh-cinematic.mp3 differ diff --git a/skills/website-to-hyperframes/assets/sfx/whoosh-short.mp3 b/skills/website-to-hyperframes/assets/sfx/whoosh-short.mp3 new file mode 100644 index 000000000..e23e513d2 Binary files /dev/null and b/skills/website-to-hyperframes/assets/sfx/whoosh-short.mp3 differ diff --git a/skills/website-to-hyperframes/assets/sfx/whoosh.mp3 b/skills/website-to-hyperframes/assets/sfx/whoosh.mp3 new file mode 100644 index 000000000..e23e513d2 Binary files /dev/null and b/skills/website-to-hyperframes/assets/sfx/whoosh.mp3 differ diff --git a/skills/website-to-hyperframes/references/beat-builder-guide.md b/skills/website-to-hyperframes/references/beat-builder-guide.md new file mode 100644 index 000000000..56a92026d --- /dev/null +++ b/skills/website-to-hyperframes/references/beat-builder-guide.md @@ -0,0 +1,199 @@ +# Beat Builder Guide + +You are building ONE beat of a multi-beat video composition. This file tells you what to read, how to build, how to verify, and how to report back. + +## Step 1: Read and understand + +**Required (every beat):** + +1. **Load the `hyperframes` skill** β€” composition rules, data attributes, timeline contract, deterministic rendering. Read the whole skill. +2. **[capabilities.md](capabilities.md)** β€” full inventory of HyperFrames capabilities (24 sections). Read the Table of Contents first, then deep-dive sections your beat needs. +3. **The beat spec** the main agent gave you β€” concept, choreography, assets, brand values, timing. + +**Read based on what your beat needs (pick relevant ones):** + +| Resource | What it covers | Read when | +| ------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------- | +| [techniques.md](../../hyperframes/references/techniques.md) | 13 primitive animation techniques: SVG path drawing, Canvas 2D, CSS 3D, kinetic type, variable fonts, MotionPath, etc. | Beat uses any of these techniques | +| [text-effects.md](../../hyperframes/references/text-effects.md) | 24 named text animations: soft-blur-in, typewriter, kinetic-center-build, line-reveal, stagger, crossfade, shared-axis | Beat has text animation | +| [html-in-canvas-patterns.md](../../hyperframes/references/html-in-canvas-patterns.md) | HTML-in-Canvas: iPhone/MacBook mockups, liquid glass, magnetic, portal, shatter, text cursor | Beat uses device mockups or WebGL effects on HTML | +| [transitions.md](../../hyperframes/references/transitions.md) | Shader transition API, HyperShader.init() pattern, all 14 WebGL shaders | Beat has shader transitions | +| [transitions/](../../hyperframes/references/transitions/) | 14 CSS transition category files: push, scale, dissolve, blur, 3D flip, light leak, distortion, grid, mechanical, destruction | Beat uses CSS transitions | +| [css-patterns.md](../../hyperframes/references/css-patterns.md) | Text markers: highlight sweeps, hand-drawn circles, burst lines, scribble, sketchout | Beat uses text emphasis/markers | +| [audio-reactive.md](../../hyperframes/references/audio-reactive.md) | Bassβ†’scale, midβ†’shape, trebleβ†’glow mappings | Beat reacts to music/audio | +| [captions.md](../../hyperframes/references/captions.md) | Per-word karaoke, tone-adaptive styling, positioning | Beat includes captions | +| [typography.md](../../hyperframes/references/typography.md) | Font hierarchy, variable fonts, responsive type scaling | Beat has complex typography | +| [motion-principles.md](../../hyperframes/references/motion-principles.md) | Velocity matching, easing philosophy, motion continuity | Beat needs polished motion design | +| [dynamic-techniques.md](../../hyperframes/references/dynamic-techniques.md) | Counter animations, data-driven visuals, dynamic content | Beat has counters or data visualization | +| [video-composition.md](../../hyperframes/references/video-composition.md) | Frame composition, color presence, scale, density rules | General composition quality | + +**Other skills you can load if needed:** + +- `/gsap` or `/gsap-core`, `/gsap-timeline`, `/gsap-plugins` β€” deeper GSAP reference +- `/animate-text` β€” curated text animation catalog with exact JSON specs +- `/hyperframes-registry` β€” if you need to install and wire registry blocks +- `/hyperframes-contrast` β€” audit color contrast (WCAG) +- `/lottie`, `/three`, `/waapi`, `/animejs`, `/css-animations` β€” if beat uses these engines + +**Always open the captured assets folder before designing the beat:** + +- `capture/assets/svgs/` β€” brand logos, icons, decorative marks. SVGs are infinitely scalable and stroke-animatable (path drawing, dash offset). A logo SVG drawing itself onto frame can carry an entire beat. +- `capture/assets/` β€” hero illustrations, screenshots, product art, gradients, photography. These are first-class beat subjects, not background decoration. A breathing hero illustration with a single line of kinetic type is a complete shot. +- VIEW every image before placing text on it. Check safe zones, contrast, actual content, where the focal point sits. + +**If your beat spec names a captured asset, USE it.** Don't substitute a CSS recreation. The user captured these from the real brand site precisely so the video carries the brand's actual visual identity. + +## Step 2: Build the composition + +Save to the path the main agent specified (usually `compositions/beat-N-name.html`). + +```html + +``` + +**Critical:** `data-composition-id`, `data-width`, `data-height` on the root div MUST match the host div in index.html. + +## Step 3: Lint + +```bash +npx hyperframes lint . +``` + +Fix ALL errors. Zero errors required. + +## Step 4: Snapshot and verify + +```bash +npx hyperframes snapshot . --frames 3 +``` + +**READ the contact sheet** (`snapshots/contact-sheet.jpg`). For each frame: + +- Is content visible? (not black, blank, or loading) +- Is text readable, properly positioned, correct font/color? +- Are assets at the right size and position? +- Does the animation state match the beat spec at this timestamp? + +**If anything is wrong:** fix, re-snapshot, re-check. You are done ONLY when every frame matches the spec. + +## Step 5: Report back honestly + +After lint passes, snapshots are taken, and you've fixed every issue you saw β€” report back to the main agent with concrete observations. Not "0 errors, looks good." That phrasing is what got prior videos shipped with mismatched brand colors, missing logos, and headlines too small to read. + +**The main agent will OPEN your composition file and read it top-to-bottom** to cross-check against DESIGN.md and STORYBOARD.md β€” does the brand bg/accent hex actually appear in your CSS, are the captured assets the storyboard called for actually referenced, is the headline β‰₯80px, does the GSAP timeline cover the full beat duration. You cannot pass that check by claiming things you didn't do; the file is on disk, the truth is in the file. + +So in your report, name the hex codes you used, the captured asset paths you placed, the headline `font-size`, and the GSAP timeline's last `tl.fromTo(...)` timestamp. Brief, concrete, true. If anything diverges from DESIGN.md or the storyboard, say so explicitly β€” the main agent can decide whether to accept the divergence or send you back to fix it. Surprises caught at this hand-off cost minutes; surprises caught at Step 6 cost iterations. + +--- + +## Continuous motion β€” the most important rule + +A beat is a SHOT in a film, not a webpage with entrance animations. Your GSAP timeline should have events spread across the ENTIRE beat duration β€” not just entrance tweens in the first 1-2 seconds followed by nothing. If an element is on screen, it should be doing something. After elements enter, add continuous hold motion: camera dolly, parallax layers moving at different speeds, secondary elements appearing mid-beat, real depth shifts. + +## You are building a SHOT, not a webpage + +The storyboard tells you the shot framing (close-up / medium / wide / etc.) and the camera move. Implement them. A beat is a moment, not a screenshot. The distinction is **what the camera is doing**, not whether the subject is a UI element or a logo β€” a tight push-in on a real product screenshot is a shot; a centered card on a parked camera is a webpage. + +**Patterns that turn a shot back into a webpage:** + +These are defaults to avoid, **not absolute prohibitions.** If the storyboard genuinely calls for "the kanban app interface" or "the browser chrome" as the subject of a specific beat (a product tour, a "this is how it works" demo, a stylized window mockup for the closer), then build it. The rule is: don't reach for these patterns by default when the storyboard didn't ask for them. + +- ⚠ **macOS / browser window chrome reproduced in CSS** β€” traffic-light dots, URL bars, browser tabs. Fine when the storyboard makes the chrome the subject (e.g. "stylized macOS window framing the product UI" for a closer). NOT fine when it's a frame you added around a card "to make it look like an app." +- ⚠ **Full webpage layout** (sidebar + header + footer + main content area) β€” fine when the beat is genuinely a product tour shot. NOT fine when the beat was supposed to be about _the kanban moment_ and you defaulted to drawing the whole app around it. +- ❌ **Parked-camera composition** β€” centered card with 60–120px margins on all sides and no camera move. Almost always wrong. Either give it a real push-in / dolly / parallax, or reframe. +- ❌ **"Hold with breathing"** implemented as `y: Β±1–2px` or `scale: 1.01` β€” invisible at 1920Γ—1080+ scale. If continuous motion is required, use camera dolly (scale 1.0 β†’ 1.05), parallax pan (x/y Β±30–80px), or progressive reveals. +- ❌ **Hover-state simulations** β€” videos have no hover. If the brand uses hover effects, show the BEFORE and AFTER as discrete frames in the timeline. +- ❌ **Counter pulses + dot pulses + tiny scale wobbles** as the only motion during the hold β€” these are "I ran out of ideas" filler. + +The test: if the storyboard says _"this beat is the product tour, viewer sees the app interface"_, building a CSS dashboard with chrome is correct. If the storyboard says _"this beat is the kanban moment, single card sliding home"_, drawing the full app around it is wrong. Read the beat spec carefully. + +**Patterns that ARE shots (do these freely):** + +- βœ… **Captured SVG logo drawing itself stroke-by-stroke** (DrawSVG / path dashoffset) β€” a complete opener or stinger. +- βœ… **Captured hero illustration with camera dolly** β€” push-in from 1.0 β†’ 1.08 over 4s, focal element holds frame. +- βœ… **Captured product screenshot with parallax layers** β€” separate the foreground UI from background panels and move them at different speeds, or use HTML-in-Canvas for an iPhone/MacBook mockup. +- βœ… **Captured asset as the bed, kinetic type as the punchline** β€” the brand's hero image holds the frame while a one-line message arrives, splits, reflows. +- βœ… **Composed-from-divs UI moment** when the beat is specifically about that UI's interaction (a card sliding into a column, a search result resolving) β€” this is the legit case for CSS-only composition. + +**Required motion magnitudes** (anything smaller is invisible at video scale): + +| Motion type | Minimum magnitude | +| --------------- | ------------------------------------------- | +| Translate (y/x) | 30px (entrance) / 8px (drift during hold) | +| Scale | 0.05 change (1.0 β†’ 1.05 or larger) | +| Opacity | full 0 β†’ 1 or vice versa for reveals | +| Rotate | 4Β° minimum to read (Dutch angles, ticks) | +| Camera dolly | scale 1.0 β†’ 1.06 minimum over beat duration | + +**Required cinematography per beat** (the storyboard should give you these; if it doesn't, escalate): + +- A **shot type** (close-up / medium / wide / over-the-shoulder / Dutch) +- A **camera move** (dolly in/out, push, parallax pan, orbit, rack focus) +- A **depth strategy** (what's foreground / midground / background) +- A **purpose** (what specific feeling or noticing the shot delivers) + +If any are missing from the beat spec, the beat is under-defined. Don't fill the gap with "centered layout + breathing" β€” re-read the spec, and if it's genuinely missing, ask the main agent. + +## Rules + +- SCRIPT PLACEMENT: scripts inside ``. Scripts outside see no DOM. +- GSAP FROM TRAP: never `gsap.from(el, {opacity:0})` with CSS `opacity:0`. It animates 0β†’0. Use `tl.fromTo()`. +- STYLE: avoid CSS `opacity:0` on GSAP-animated elements. Use GSAP fromTo for initial states. +- ASSET PATHS: project-root-relative. `capture/assets/file.png` βœ… `../capture/assets/file.png` ❌ +- SVG VIA IMG: `` can't inherit CSS color. Inline SVG or `filter: brightness(0) invert(1)`. +- CSS CENTERING: no `transform: translate(-50%, -50%)` with GSAP transforms. Use flexbox or `xPercent/yPercent`. +- QUERYSELECTOR: `document.getElementById("id")` with null guards. No method calls without null check. +- CHARACTER SPANS: `display:inline-block` on spaces collapses them. Use ` ` or per-word spans. +- COUNTERS: no `onUpdate` callbacks. Discrete `tl.set(el, {textContent: "42"}, 2.5)` at timestamps. +- TIMELINE: `window.__timelines["beat-N-name"] = tl` synchronously. Key = `data-composition-id`. +- DETERMINISTIC: no `Math.random()`, `Date.now()`, `requestAnimationFrame`, `repeat:-1`. +- Always `tl.fromTo()` not `tl.from()` for entrances. +- Never stack two transform tweens on same element at same time. +- FONTS: copy the `@font-face` block VERBATIM from DESIGN.md's Fonts section. Do NOT guess which `.woff2` file belongs to which family β€” capture filenames are content-hashed (`14d7ce3e41dcbb66-s.p.woff2`) and there is no visible mapping. If DESIGN.md doesn't include exact `src:` paths per family, STOP and ask the main agent to add them; never pair an arbitrary `.woff2` file with a family name from memory. + +## Easing β€” pick per intent + +Do NOT default to `power2.out` on everything. + +| Intent | GSAP Ease | Use for | +| --------------- | --------------------- | ------------------------------------ | +| Snap (iOS feel) | `power4.out` | Hero text, UI elements | +| Whip overshoot | `back.out(1.7)` | Numbers, badges, impact | +| Soft land | `expo.out` | Per-word reveals, gentle entrances | +| Mechanical | `power1.out` | Terminal text, code typing | +| Bounce settle | `elastic.out(1, 0.5)` | Counters, CTA buttons | +| Dramatic | `expo.inOut` | Full-screen statements, hero reveals | +| Drift | `"none"` | Parallax, Ken Burns, camera drift | + +Staggered items: `power4.out` with `stagger: 0.08` to `0.15`. diff --git a/skills/website-to-hyperframes/references/capabilities.md b/skills/website-to-hyperframes/references/capabilities.md new file mode 100644 index 000000000..492bf63b0 --- /dev/null +++ b/skills/website-to-hyperframes/references/capabilities.md @@ -0,0 +1,713 @@ +# HyperFrames β€” Complete Capabilities Inventory + +Everything possible in HyperFrames as of today's workspace, synthesized from direct source reads of all 7 packages, 16 skills, and the full registry. + +> **How to read this file.** Scan the **Table of Contents** below first. **Do NOT read this file linearly** β€” it is a 700+ line inventory; reading top-to-bottom every session wastes context. When the storyboard or a specific beat needs a particular capability (HTML-in-Canvas, shader transitions, audio-reactive, dynamic counters, etc.), jump straight to that section. + +You are NOT limited to what was captured from the website. You can create shaders from scratch, search for and download registry blocks, build Three.js scenes, write custom WebGL effects, use any web API β€” anything a browser can render. + +For implementation patterns (working code), see `techniques.md`. This file is the WHAT; techniques.md is the HOW. + +## Essential Rules + +- **Deterministic:** No `Math.random()`, no `Date.now()`, no `requestAnimationFrame`, no `repeat: -1`. The render engine seeks to exact timestamps. +- **Timeline contract:** `window.__timelines["composition-id"] = tl` must be set synchronously. The timeline length defines the composition duration. +- **Sub-compositions:** External `.html` files loaded via `data-composition-src`. Auto-nested timelines, scoped CSS, scoped scripts. +- **Linter:** 60+ rules. Run `npx hyperframes lint` before render. Catches missing timelines, overlapping clips, broken paths, GSAP errors. + +## Table of Contents + +| # | Section | What it covers | +| --- | ---------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| 1 | **Composition fundamentals** | Data attributes, timeline contract, resolution presets (1080p, 4K, portrait, square, custom) | +| 2 | **Animation engines (6 adapters)** | GSAP + 15 plugins, Anime.js v4, CSS @keyframes, WAAPI, Lottie (lottie-web + dotlottie), Three.js (hf-seek event) | +| 3 | **Shader transitions (14 WebGL)** | domain-warp, ridged-burn, whip-pan, sdf-iris, ripple-waves, gravitational-lens, cinematic-zoom, chromatic-split, swirl-vortex, thermal-distortion, flash-through-white, cross-warp-morph, light-leak, glitch β€” plus custom GLSL | +| 4 | **CSS scene transitions (30+)** | Push/slide, scale/zoom, radial/clip, 3D flip, blur, dissolve, cover/blinds, light leak/burn, distortion/glitch, mechanical/shutter, grid dissolve, destruction/burn, VHS/gravity/morph β€” 6 timing presets | +| 5 | **Visual effects + textures** | Text markers (highlight, circle, burst, scribble, sketchout), grain/noise, light leaks, film burn, vignette, glow, paper texture, shimmer sweep | +| 6 | **Caption techniques** | Per-word karaoke, intensity tiers, 5 exit styles, 6 tone mappings, per-word styling triggers, 7 audio source formats, positioning helpers | +| 7 | **Audio-reactive animation** | Bassβ†’scale, midβ†’shape, trebleβ†’glow; any GSAP property; band extraction script; banned patterns | +| 8 | **HTML-in-canvas** | Live DOM as GPU texture (drawElementImage), Three.js planes, WebGL shaders on HTML, 7 VFX blocks (iPhone/MacBook device, liquid, glass, magnetic, portal, shatter, text cursor) | +| 9 | **Three.js / WebGL custom scenes** | Full 3D: AnimationMixer, custom GLSL, post-processing, GLTF models, lights, cameras, materials β€” all deterministic via hf-seek | +| 10 | **SVG / canvas / variable fonts** | SVG path drawing, Canvas 2D procedural art, CSS 3D card, per-word type, variable font axes, character typing, velocity-matched cuts, MotionPath | +| 11 | **Media: video, audio, TTS** | Video compositing + frame injection, audio mixer (multi-track), Kokoro TTS (54 voices, 9 languages), Whisper/Groq/OpenAI transcription, background removal (u2net) | +| 12 | **Registry (51 blocks + 4 components + 8 examples)** | Social overlays (8), showcases (5), data viz (2), logo branding (1), 3D/VFX (7), shader transitions (14), transition galleries (13), components (grain, shimmer, pixelate, texture-mask), 8 starter examples | +| 13 | **CLI (25 commands)** | init, add, catalog, play, preview, publish, render (MP4/WebM/MOV/PNG, HDR, GPU, parallel), lint, validate, inspect, snapshot, capture, tts, transcribe, remove-background, doctor, and more | +| 14 | **Linter (60+ rules)** | Core, media, GSAP, captions, composition, adapters, textures, fonts β€” plus async URL checks | +| 15 | **Player web component** | `` with seek/play/pause API, 11 events, media mirror, runtime auto-inject | +| 16 | **Engine + Producer** | MP4/WebM/MOV/PNG output, HDR (PQ/HLG), transparency (ProRes), GPU encoding (NVENC/VideoToolbox/VAAPI/QSV), parallel rendering, video frame injection | +| 17 | **Studio (in-browser NLE)** | Timeline editor, drag/resize clips, asset browser, render queue, lint modal, caption editor, element picker | +| 18 | **Determinism guarantees** | No Math.random, no Date.now, no RAF, no repeat:-1, no callbacks, synchronous construction | +| 19 | **Variables / parameterization** | Typed runtime variables (string, color, number, boolean, enum), CLI override, strict validation | +| 20 | **Sub-compositions** | External file or inline template, auto-nested timelines, scoped CSS, scoped scripts, variable inheritance | +| 21 | **Global runtime APIs** | 25+ window globals for timelines, player, variables, adapters, hooks | +| 22 | **Skills (16)** | hyperframes, cli, media, registry, contrast, animation-map, website-to-hyperframes, remotion, gsap, animejs, css-animations, waapi, lottie, three, tailwind, contribute-catalog | +| 23 | **References (15 docs)** | transitions, css-patterns, dynamic-techniques, motion-principles, typography, narration, captions, audio-reactive, transcript-guide, techniques, beat-direction, visual-styles, and more | +| 24 | **Documentation (27 pages)** | Guides + package docs covering rendering, HDR, html-in-canvas, performance, prompting, troubleshooting, etc. | + +--- + +## 1. Composition fundamentals + +### Data attributes recognized by the runtime + +- **Root composition:** `data-composition-id`, `data-start`, `data-duration`, `data-width`, `data-height`, `data-composition-src` (external sub-comp), `data-composition-duration`, `data-composition-variables` (JSON), `data-variable-values` (override) +- **Every clip:** `id`, `data-start`, `data-duration`, `data-track-index`, `class="clip"`, optional `data-media-start`, `data-volume`, `data-playback-start` +- **Sub-composition host:** `data-composition-id`, `data-composition-src` OR inline `