You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: skills/hyperframes/SKILL.md
+80-29Lines changed: 80 additions & 29 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,37 +9,58 @@ HTML is the source of truth for video. A composition is an HTML file with `data-
9
9
10
10
## Approach
11
11
12
+
### Discovery (exploratory requests only)
13
+
14
+
For open-ended requests ("make me a product launch video", "create something for our brand") where the user hasn't committed to a direction, understand intent before picking colors:
15
+
16
+
-**Audience** — who watches this? Developers? Executives? General consumers?
17
+
-**Platform** — where does it play? Social (15s), website hero, product demo, internal?
-**Variations** — does the user want options, or a single best shot?
20
+
21
+
For specific requests ("add a title card", "fix the timing on scene 3"), skip discovery.
22
+
23
+
For exploratory requests, consider offering 2-3 variations that differ meaningfully — not just color swaps, but different pacing, energy levels, or structural approaches. One safe/expected, one ambitious. Don't mandate this — it's a tool available when appropriate.
24
+
25
+
### Step 1: Design system
26
+
27
+
If `design.md` or `DESIGN.md` exists in the project, read it first (check both casings — they're different files on Linux). It's the source of truth for brand colors, fonts, and constraints. Use its exact values — don't invent colors or substitute fonts. Any format works (YAML frontmatter, prose, tables — just extract the values).
28
+
29
+
If it names fonts you can't find locally (no `fonts/` directory with `.woff2` files, not a built-in font), warn the user before writing HTML: "design.md specifies [font name] but no font files found. Please add .woff2 files to `fonts/` or I'll fall back to [closest built-in alternative]."
30
+
31
+
If no `design.md` exists, offer the user a choice:
32
+
33
+
1.**User named a style or mood?** → Read [visual-styles.md](./visual-styles.md) for the 8 named presets. Pick the closest match.
34
+
2.**Want to browse options visually?** → Run the design picker: read [references/design-picker.md](references/design-picker.md) for the full workflow. This serves a visual picker page. The user configures mood, palette, typography, and motion in the browser, then copies the generated design.md and pastes it back into the conversation.
35
+
3.**Want to skip and go fast?** → Ask: mood, light or dark, any brand colors/fonts? Then pick a palette from [house-style.md](./house-style.md).
36
+
37
+
**design.md defines the brand. It does not define video composition rules.** Those come from [references/video-composition.md](references/video-composition.md) and [house-style.md](./house-style.md). Use brand colors at video-appropriate scale — not at web-UI opacity.
38
+
39
+
### Step 2: Prompt expansion
40
+
41
+
Always run on every composition (except single-scene pieces and trivial edits). This step grounds the user's intent against `design.md` and `house-style.md` and produces a consistent intermediate that every downstream agent reads the same way.
42
+
43
+
Read [references/prompt-expansion.md](references/prompt-expansion.md) for the full process and output format.
44
+
45
+
### Step 3: Plan
46
+
12
47
Before writing HTML, think at a high level:
13
48
14
49
1.**What** — what should the viewer experience? Identify the narrative arc, key moments, and emotional beats.
15
50
2.**Structure** — how many compositions, which are sub-compositions vs inline, what tracks carry what (video, audio, overlays, captions).
16
-
3.**Timing** — which clips drive the duration, where do transitions land, what's the pacing.
17
-
4.**Layout** — build the end-state first. See "Layout Before Animation" below.
18
-
5.**Animate** — then add motion using the rules below.
51
+
3.**Rhythm** — declare your scene rhythm before implementing. Which scenes are quick hits, which are holds, where do shaders land, where does energy peak. Name the pattern: fast-fast-SLOW-fast-SHADER-hold. Read [references/beat-direction.md](references/beat-direction.md) for rhythm templates.
52
+
4.**Timing** — which clips drive the duration, where do transitions land, what's the pacing.
53
+
5.**Layout** — build the end-state first. See "Layout Before Animation" below.
54
+
6.**Animate** — then add motion using the rules below.
19
55
20
-
For small edits (fix a color, adjust timing, add one element), skip straight to the rules.
56
+
**Build what was asked.** A request for "a title card" is not a request for "a title card + 3 supporting scenes + ambient music + captions." Every scene, every element, every tween should earn its place. If additional scenes or elements would genuinely improve the piece, propose them — don't add them.
21
57
22
-
### Visual Identity Gate
58
+
For small edits (fix a color, adjust timing, add one element), skip straight to the rules.
23
59
24
60
<HARD-GATE>
25
-
Before writing ANY composition HTML, you MUST have a visual identity defined. Do NOT write compositions with default or generic colors.
26
-
27
-
Check in this order:
28
-
29
-
1.**DESIGN.md exists in the project?** → Read it. Use its exact colors, fonts, motion rules, and "What NOT to Do" constraints.
30
-
2.**visual-style.md exists?** → Read it. Apply its `style_prompt_full` and structured fields. (Note: `visual-style.md` is a project-specific file. `visual-styles.md` is the style library with 8 named presets — different files.)
31
-
3.**User named a style** (e.g., "Swiss Pulse", "dark and techy", "luxury brand")? → Read [visual-styles.md](./visual-styles.md) for the 8 named presets. Generate a minimal DESIGN.md with: `## Style Prompt` (one paragraph), `## Colors` (3-5 hex values with roles), `## Typography` (1-2 font families), `## What NOT to Do` (3-5 anti-patterns).
32
-
4.**None of the above?** → Ask 3 questions before writing any HTML:
- Any specific brand colors, fonts, or visual references?
36
-
Then generate a minimal DESIGN.md from the answers.
37
-
38
-
Every composition must trace its palette and typography back to a DESIGN.md, visual-style.md, or explicit user direction. If you're reaching for `#333`, `#3b82f6`, or `Roboto` — you skipped this step.
61
+
Before writing ANY composition HTML — verify you have a visual identity from Step 1. If you're reaching for `#333`, `#3b82f6`, or `Roboto`, you skipped it.
39
62
</HARD-GATE>
40
63
41
-
For motion defaults, sizing, entrance patterns, and easing — follow [house-style.md](./house-style.md). The house style handles HOW things move. The DESIGN.md handles WHAT things look like.
42
-
43
64
## Layout Before Animation
44
65
45
66
Position every element where it should be at its **most visible moment** — the frame where it's fully entered, correctly placed, and not yet exiting. Write this as static HTML+CSS first. No GSAP yet.
@@ -50,7 +71,7 @@ Position every element where it should be at its **most visible moment** — the
50
71
51
72
1.**Identify the hero frame** for each scene — the moment when the most elements are simultaneously visible. This is the layout you build.
52
73
2.**Write static CSS** for that frame. The `.scene-content` container MUST fill the full scene using `width: 100%; height: 100%; padding: Npx;` with `display: flex; flex-direction: column; gap: Npx; box-sizing: border-box`. Use padding to push content inward — NEVER `position: absolute; top: Npx` on a content container. Absolute-positioned content containers overflow when content is taller than the remaining space. Reserve `position: absolute` for decoratives only.
53
-
3.**Add entrances with `gsap.from()`** — animate FROM offscreen/invisible TO the CSS position. The CSS position is the ground truth; the tween describes the journey to get there.
74
+
3.**Add entrances with `gsap.from()`** — animate FROM offscreen/invisible TO the CSS position. The CSS position is the ground truth; the tween describes the journey to get there. (In sub-compositions loaded via `data-composition-src`, prefer `gsap.fromTo()` — see load-bearing GSAP rules in [references/motion-principles.md](references/motion-principles.md).)
54
75
4.**Add exits with `gsap.to()`** — animate TO offscreen/invisible FROM the CSS position.
- 60px+ headlines, 20px+ body, 16px+ data labels for rendered video
260
281
-`font-variant-numeric: tabular-nums` on number columns
261
282
262
-
When no `visual-style.md`or animation direction is provided, follow [house-style.md](./house-style.md) for aesthetic defaults.
283
+
If no `design.md`exists, follow [house-style.md](./house-style.md) for aesthetic defaults.
263
284
264
285
## Typography and Assets
265
286
266
-
-**Fonts:** Just write the `font-family` you want in CSS — the compiler embeds supported fonts automatically. If a font isn't supported, the compiler warns.
287
+
-**Built-in fonts:** Write the `font-family` you want in CSS — the compiler embeds supported fonts automatically.
288
+
-**Custom fonts:** If design.md names a font that isn't built-in, the user must provide `.woff2` files in a `fonts/` directory. If missing, warn before writing HTML. When files exist, add `@font-face` declarations pointing to the local files.
267
289
- Add `crossorigin="anonymous"` to external media
268
290
- For dynamic text overflow, use `window.__hyperframes.fitTextFontSize(text, { maxWidth, fontFamily, fontWeight })`
269
291
- All files live at the project root alongside `index.html`; sub-compositions use `../`
270
292
271
293
## Editing Existing Compositions
272
294
273
-
- Read the full composition first — match existing fonts, colors, animation patterns
295
+
-**Read actual files, don't guess.** When editing, extending, or creating companion compositions, read the existing source. Don't reconstruct hex codes from memory. Don't guess GSAP easing patterns. The composition IS the spec — extract exact values from it.
296
+
- Match existing fonts, colors, animation patterns from what you read
274
297
- Only change what was requested
275
298
- Preserve timing of unrelated clips
276
299
277
300
## Output Checklist
278
301
302
+
**Fast (run immediately, block on results):**
303
+
279
304
-[ ]`npx hyperframes lint` and `npx hyperframes validate` both pass
305
+
-[ ] Design adherence verified if design.md exists
306
+
307
+
**Slow (run in parallel while presenting the preview to the user):**
308
+
280
309
-[ ]`npx hyperframes inspect` passes, or every reported overflow is intentionally marked
281
310
-[ ] Contrast warnings addressed (see Quality Checks below)
282
-
-[ ] Layout issues addressed (see Quality Checks below)
283
311
-[ ] Animation choreography verified (see Quality Checks below)
284
312
285
313
## Quality Checks
@@ -317,6 +345,24 @@ If warnings appear:
317
345
318
346
Use `--no-contrast` to skip if iterating rapidly and you'll check later.
319
347
348
+
### Design Adherence
349
+
350
+
If a `design.md` exists, verify the composition follows it after authoring. Read the HTML and check:
351
+
352
+
1.**Colors** — every hex value in the composition appears in design.md's palette section (however the user labeled it: Colors, Palette, Theme, etc.). Flag any invented colors.
353
+
2.**Typography** — font families and weights match design.md's type spec. No substitutions.
354
+
3.**Corners** — border-radius values match the declared corner style, if specified.
355
+
4.**Spacing** — padding and gap values fall within the declared density range, if specified.
356
+
5.**Depth** — shadow usage matches the declared depth level, if specified (flat = none, subtle = light, layered = glows).
357
+
6.**Avoidance rules** — if design.md has a section listing things to avoid (commonly "What NOT to Do", "Don'ts", "Anti-patterns", or "Do's and Don'ts"), verify none are present.
358
+
359
+
Report violations as a checklist. Fix each one before serving.
360
+
361
+
If no `design.md` exists (house-style-only path), verify:
362
+
363
+
1.**Palette consistency** — the same bg, fg, and accent colors are used across all scenes. No per-scene color invention.
364
+
2.**No lazy defaults** — check the composition against house-style.md's "Lazy Defaults to Question" list. If any appear, they must be a deliberate choice for the content, not a default.
365
+
320
366
### Animation Map
321
367
322
368
After authoring animations, run the animation map to verify choreography:
@@ -348,10 +394,15 @@ Skip on small edits (fixing a color, adjusting one duration). Run on new composi
348
394
-**[references/tts.md](references/tts.md)** — Text-to-speech with Kokoro-82M. Voice selection, speed tuning, TTS+captions workflow. Read when generating narration or voiceover.
349
395
-**[references/audio-reactive.md](references/audio-reactive.md)** — Audio-reactive animation: map frequency bands and amplitude to GSAP properties. Read when visuals should respond to music, voice, or sound.
350
396
-**[references/css-patterns.md](references/css-patterns.md)** — CSS+GSAP marker highlighting: highlight, circle, burst, scribble, sketchout. Deterministic, fully seekable. Read when adding visual emphasis to text.
397
+
-**[references/video-composition.md](references/video-composition.md)** — Video-medium rules: density, color presence, scale, frame composition, design.md as brand not layout. **Always read** — these override web instincts.
-**[references/typography.md](references/typography.md)** — Typography: font pairing, OpenType features, dark-background adjustments, font discovery script. **Always read** — every composition has text.
352
-
-**[references/motion-principles.md](references/motion-principles.md)** — Motion design principles: easing as emotion, timing as weight, choreography as hierarchy, scene pacing, ambient motion, anti-patterns. Read when choreographing GSAP animations.
353
-
-**[visual-styles.md](visual-styles.md)** — 8 named visual styles (Swiss Pulse, Velvet Standard, Deconstructed, Maximalist Type, Data Drift, Soft Signal, Folk Frequency, Shadow Cut) with hex palettes, GSAP easing signatures, and shader pairings. Read when user names a style or when generating DESIGN.md.
354
-
-**[house-style.md](house-style.md)** — Default motion, sizing, and color palettes when no style is specified.
400
+
-**[references/motion-principles.md](references/motion-principles.md)** — Motion design principles, image motion treatment, load-bearing GSAP rules. **Always read** — every composition has motion.
401
+
-**[references/techniques.md](references/techniques.md)** — 11 visual techniques with code patterns: SVG drawing, Canvas 2D, CSS 3D, kinetic type, Lottie, video compositing, typing effect, variable fonts, MotionPath, velocity transitions, audio-reactive. Read when planning techniques per beat.
402
+
-**[references/narration.md](references/narration.md)** — Pacing, tone, script structure, number pronunciation, opening line patterns. Read when the composition includes voiceover or TTS.
403
+
-**[references/design-picker.md](references/design-picker.md)** — Create a design.md via visual picker. Read when no design.md exists and the user wants to create one.
404
+
-**[visual-styles.md](visual-styles.md)** — 8 named visual styles with hex palettes, GSAP easing signatures, and shader pairings. Read when user names a style or when generating design.md.
405
+
-**[house-style.md](house-style.md)** — Default motion, sizing, and color palettes when no design.md is specified.
355
406
-**[patterns.md](patterns.md)** — PiP, title cards, slide show patterns.
356
407
-**[data-in-motion.md](data-in-motion.md)** — Data, stats, and infographic patterns.
Copy file name to clipboardExpand all lines: skills/hyperframes/house-style.md
+3-1Lines changed: 3 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# House Style
2
2
3
-
Creative direction for compositions when no `visual-style.md` is provided. These are starting points — override anything that doesn't serve the content.
3
+
Creative direction for compositions when no `design.md` is provided. These are starting points — override anything that doesn't serve the content. When a `design.md` exists, its brand values take precedence; house-style fills gaps.
4
4
5
5
## Before Writing HTML
6
6
@@ -44,6 +44,8 @@ Ideas (mix and match, 2-5 per scene):
44
44
45
45
All decoratives should have slow ambient GSAP animation — breathing, drift, pulse. Static decoratives feel dead.
46
46
47
+
**Decorative count vs motion count.** The "2-5 per scene" count refers to decorative _elements_. If a project's `design.md` says "single ambient motion per scene", it means one looping motion applied to these decoratives (a shared breath/drift/pulse) — not one element total. A scene with 4 decoratives sharing one breathing motion is correct; a scene with 1 decorative is under-dressed.
48
+
47
49
## Motion
48
50
49
51
See [references/motion-principles.md](references/motion-principles.md) for full rules. Quick: 0.3–0.6s, vary eases, combine transforms on entrances, overlap entries.
0 commit comments