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
+20-24Lines changed: 20 additions & 24 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,6 +9,22 @@ HTML is the source of truth for video. A composition is an HTML file with `data-
9
9
10
10
## Approach
11
11
12
+
### Step 0: Design system
13
+
14
+
Check for a `design.md` in the project root. If one exists, read it — it defines colors, typography, motion, and mood for all compositions in this project.
15
+
16
+
If none exists, **ask the user:**
17
+
18
+
> "Want to pick a visual style before we build? (yes = design picker, no = use defaults)"
19
+
20
+
If yes → read [references/design-picker.md](references/design-picker.md) for the full picker workflow. If no → follow [house-style.md](./house-style.md) defaults.
21
+
22
+
### Using design.md during construction
23
+
24
+
If a `design.md` exists (from Step 0 or provided by the user), it is the source of truth for all visual decisions. Use only the values it defines — colors, fonts, spacing, corners, depth, component treatments, and any other fields the user has added. Do not invent new colors, substitute fonts, or override its rules. If the composition needs a value the design.md doesn't cover, follow [house-style.md](./house-style.md) for that specific decision.
25
+
26
+
### Step 1: Plan
27
+
12
28
Before writing HTML, think at a high level:
13
29
14
30
1.**What** — what should the viewer experience? Identify the narrative arc, key moments, and emotional beats.
@@ -19,27 +35,6 @@ Before writing HTML, think at a high level:
19
35
20
36
For small edits (fix a color, adjust timing, add one element), skip straight to the rules.
21
37
22
-
### Visual Identity Gate
23
-
24
-
<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.
39
-
</HARD-GATE>
40
-
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
38
## Layout Before Animation
44
39
45
40
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.
- 60px+ headlines, 20px+ body, 16px+ data labels for rendered video
260
255
-`font-variant-numeric: tabular-nums` on number columns
261
256
262
-
When no `visual-style.md`or animation direction is provided, follow [house-style.md](./house-style.md) for aesthetic defaults.
257
+
If no `design.md`was established in Step 0, follow [house-style.md](./house-style.md) for aesthetic defaults.
263
258
264
259
## Typography and Assets
265
260
@@ -333,8 +328,9 @@ Skip on small edits (fixing a color, adjusting one duration). Run on new composi
333
328
-**[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.
334
329
-**[references/typography.md](references/typography.md)** — Typography: font pairing, OpenType features, dark-background adjustments, font discovery script. **Always read** — every composition has text.
335
330
-**[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.
336
-
-**[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.
337
-
-**[house-style.md](house-style.md)** — Default motion, sizing, and color palettes when no style is specified.
331
+
-**[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.
332
+
-**[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.
333
+
-**[house-style.md](house-style.md)** — Default motion, sizing, and color palettes when no design.md is specified.
338
334
-**[patterns.md](patterns.md)** — PiP, title cards, slide show patterns.
339
335
-**[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
+1-1Lines changed: 1 addition & 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.
Create a `design.md` by serving a visual picker page where the user configures 7 independent categories.
4
+
5
+
## Prerequisites
6
+
7
+
Before generating options, read these style references — all options must comply:
8
+
9
+
-[typography.md](typography.md) — banned font list, cross-category pairing (serif + sans or sans + mono, never two sans-serifs), weight contrast (300-400 body / 700-900 headline), video-sized text (60px+ headlines, 20px+ body, 16px+ labels)
10
+
-[../house-style.md](../house-style.md) — lazy defaults to avoid (no gradient text, no left-edge accent stripes, no pure #000/#fff, no identical card grids, no banned fonts)
11
+
-[motion-principles.md](motion-principles.md) — ease diversity, varied entry directions, scene structure
12
+
13
+
## Building the picker
14
+
15
+
1. Generate 2-3 visual directions based on the prompt. Each direction needs: name, mood, colors (bg/fg/accent), fonts (headline/body), energy level, and transition style.
16
+
2. Copy [../templates/design-picker.html](../templates/design-picker.html) to the project directory as `.hyperframes/pick-design.html`.
17
+
3. Replace `__ARCHITECTURES_JSON__`, `__PALETTES_JSON__`, and `__TYPEPAIRS_JSON__` with your generated options. The user picks one from each category independently — structure, palette, type pairing, plus theme (dark/light/full palette), corners, density, and depth.
18
+
19
+
### Architecture data format
20
+
21
+
Each architecture object must include a `preview_html` field — the HTML that renders in the preview panel. Use token placeholders that the template replaces at runtime: `{{bg}}`, `{{fg}}`, `{{ac}}`, `{{mt}}`, `{{hf}}`, `{{hw}}`, `{{bf}}`, `{{bw}}`, `{{cr}}` (corner radius), `{{pad}}`, `{{gap}}`, `{{shadow}}`, `{{g}}` (grid line color), `{{fg3}}`/`{{fg6}}`/`{{fg8}}`/`{{fg15}}` (fg at opacity), `{{ac3}}`/`{{ac5}}`/`{{ac25}}` (accent at opacity).
22
+
23
+
**Every token must be used.** Apply `{{cr}}` to all cards, buttons, and containers. Apply `{{shadow}}` to elevated elements (cards, buttons, code blocks). Apply `{{pad}}` and `{{gap}}` to control spacing. If a token isn't used in the preview_html, that option will have no visible effect.
24
+
25
+
**Density matters.** Each architecture preview must include 15+ distinct elements to give the user a real sense of the layout. Include: headline, subhead, body paragraph, label/overline, stat with number, secondary stat, quote/testimonial, attribution, card with title+body, second card (different treatment), code/command block, primary button, secondary button, list or tags, accent divider/rule, and a data element (table row, progress bar, or chart).
26
+
27
+
Optionally include `components` (component styling rules) and `dos` (do's and don'ts) as strings — these appear in the generated design.md.
28
+
29
+
**Layout constraint:** All preview HTML must use percentage widths or `max-width: 100%`. Use `flex-wrap: wrap` on all flex rows. Absolute-positioned decoratives must stay within a parent with `overflow: hidden`.
30
+
31
+
**Security:** Architecture `preview_html` must not contain `<script>` tags, event handlers (`onclick`, `onerror`, etc.), or `javascript:` URLs. It is injected via `innerHTML`.
32
+
33
+
**Palette variety:** Always include a mix of light, dark, and tinted backgrounds across the 6 palettes — even for calm/wellness prompts.
34
+
35
+
## Serving and user selection
36
+
37
+
4. Serve the file with a simple HTTP server in the background: `cd <project-dir> && python3 -m http.server <port> &`. Then verify: `curl -s -o /dev/null -w "%{http_code}" http://localhost:<port>/.hyperframes/pick-design.html` — only share the link if it returns 200. Do NOT use `npx hyperframes preview` for the picker — it blocks. Do NOT start servers inside subagents — the parent handles serving.
38
+
5. Once the user picks, tell them: "Copy the design.md from the picker and paste it here." The user pastes the markdown back into the conversation. Save it to `design.md` in the project root, then proceed with construction.
39
+
40
+
The design.md format is generated by the picker template — it includes mood, theme, structure, colors, typography, corners, spacing, depth, components, and do's/don'ts based on the user's selections.
0 commit comments