|
| 1 | +# HyperFrames Composition Project |
| 2 | + |
| 3 | +## Skills — USE THESE FIRST |
| 4 | + |
| 5 | +**Always invoke the relevant skill before writing or modifying compositions.** Skills encode framework-specific patterns (e.g., `window.__timelines` registration, `data-*` attribute semantics, shader-compatible CSS rules) that are NOT in generic web docs. Skipping them produces broken compositions. |
| 6 | + |
| 7 | +| Skill | Command | When to use | |
| 8 | +| -------------------------- | ------------------------- | ------------------------------------------------------------------------------------------------- | |
| 9 | +| **hyperframes** | `/hyperframes` | Creating or editing HTML compositions, captions, TTS, audio-reactive animation, marker highlights | |
| 10 | +| **hyperframes-cli** | `/hyperframes-cli` | CLI commands: init, lint, preview, render, transcribe, tts | |
| 11 | +| **hyperframes-registry** | `/hyperframes-registry` | Installing blocks and components via `hyperframes add` | |
| 12 | +| **website-to-hyperframes** | `/website-to-hyperframes` | Capturing a URL and turning it into a video — full website-to-video pipeline | |
| 13 | +| **gsap** | `/gsap` | GSAP animations for HyperFrames — tweens, timelines, easing, performance | |
| 14 | + |
| 15 | +> **Skills not available?** Ask the user to run `npx hyperframes skills` and restart their |
| 16 | +> agent session, or install manually: `npx skills add heygen-com/hyperframes`. |
| 17 | +
|
| 18 | +## Commands |
| 19 | + |
| 20 | +```bash |
| 21 | +npx hyperframes preview # preview in browser (studio editor) |
| 22 | +npx hyperframes render # render to MP4 |
| 23 | +npx hyperframes lint # validate compositions (errors + warnings) |
| 24 | +npx hyperframes lint --verbose # include info-level findings |
| 25 | +npx hyperframes lint --json # machine-readable output for CI |
| 26 | +npx hyperframes docs <topic> # reference docs in terminal |
| 27 | +``` |
| 28 | + |
| 29 | +## Documentation |
| 30 | + |
| 31 | +**For quick reference**, use the local CLI docs command (no network required): |
| 32 | + |
| 33 | +```bash |
| 34 | +npx hyperframes docs <topic> |
| 35 | +``` |
| 36 | + |
| 37 | +Topics: `data-attributes`, `gsap`, `compositions`, `rendering`, `examples`, `troubleshooting` |
| 38 | + |
| 39 | +**For full documentation**, discover pages via the machine-readable index — do NOT guess URLs: |
| 40 | + |
| 41 | +``` |
| 42 | +https://hyperframes.heygen.com/llms.txt |
| 43 | +``` |
| 44 | + |
| 45 | +## Project Structure |
| 46 | + |
| 47 | +- `index.html` — main composition (root timeline) |
| 48 | +- `compositions/` — sub-compositions referenced via `data-composition-src` |
| 49 | +- `meta.json` — project metadata (id, name) |
| 50 | +- `transcript.json` — whisper word-level transcript (if generated) |
| 51 | + |
| 52 | +## Linting — ALWAYS RUN AFTER CHANGES |
| 53 | + |
| 54 | +After creating or editing any `.html` composition, **always** run the linter before considering the task complete: |
| 55 | + |
| 56 | +```bash |
| 57 | +npx hyperframes lint |
| 58 | +``` |
| 59 | + |
| 60 | +Fix all errors before presenting the result. Warnings are informational and usually safe to ignore. |
| 61 | + |
| 62 | +## Key Rules |
| 63 | + |
| 64 | +1. Every timed element needs `data-start`, `data-duration`, and `data-track-index` |
| 65 | +2. Elements with timing **MUST** have `class="clip"` — the framework uses this for visibility control |
| 66 | +3. Timelines must be paused and registered on `window.__timelines`: |
| 67 | + ```js |
| 68 | + window.__timelines = window.__timelines || {}; |
| 69 | + window.__timelines["composition-id"] = gsap.timeline({ paused: true }); |
| 70 | + ``` |
| 71 | +4. Videos use `muted` with a separate `<audio>` element for the audio track |
| 72 | +5. Sub-compositions use `data-composition-src="compositions/file.html"` to reference other HTML files |
| 73 | +6. Only deterministic logic — no `Date.now()`, no `Math.random()`, no network fetches |
0 commit comments