hyperframes 0.6.96 → 0.6.98
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/beat-analyzer.global.js +326 -0
- package/dist/cli.js +3058 -1947
- package/dist/commands/layout-audit.browser.js +86 -0
- package/dist/hyperframe-runtime.js +20 -20
- package/dist/hyperframe.manifest.json +1 -1
- package/dist/hyperframe.runtime.iife.js +20 -20
- package/dist/skills/hyperframes-cli/SKILL.md +67 -103
- package/dist/skills/hyperframes-cli/references/doctor-browser.md +45 -0
- package/dist/skills/hyperframes-cli/references/init-and-scaffold.md +51 -0
- package/dist/skills/hyperframes-cli/references/lambda.md +132 -0
- package/dist/skills/hyperframes-cli/references/lint-validate-inspect.md +93 -0
- package/dist/skills/hyperframes-cli/references/preview-render.md +107 -0
- package/dist/skills/hyperframes-cli/references/upgrade-info-misc.md +75 -0
- package/dist/studio/assets/hyperframes-player-DgsMQSvV.js +418 -0
- package/dist/studio/assets/index-B62bDCQv.css +1 -0
- package/dist/studio/assets/index-Ce3pBm_I.js +252 -0
- package/dist/studio/assets/{index-BWFaypdT.js → index-D-ET9M0b.js} +1 -1
- package/dist/studio/assets/index-D-bS9Dxx.js +1 -0
- package/dist/studio/index.html +2 -2
- package/dist/templates/_shared/AGENTS.md +46 -21
- package/dist/templates/_shared/CLAUDE.md +16 -14
- package/package.json +3 -2
- package/dist/pngDecodeBlitWorker.js +0 -239
- package/dist/skills/gsap/SKILL.md +0 -240
- package/dist/skills/gsap/references/effects.md +0 -297
- package/dist/skills/gsap/scripts/extract-audio-data.py +0 -188
- package/dist/skills/hyperframes/SKILL.md +0 -491
- package/dist/skills/hyperframes/data-in-motion.md +0 -19
- package/dist/skills/hyperframes/house-style.md +0 -73
- package/dist/skills/hyperframes/palettes/bold-energetic.md +0 -14
- package/dist/skills/hyperframes/palettes/clean-corporate.md +0 -14
- package/dist/skills/hyperframes/palettes/dark-premium.md +0 -14
- package/dist/skills/hyperframes/palettes/jewel-rich.md +0 -14
- package/dist/skills/hyperframes/palettes/monochrome.md +0 -14
- package/dist/skills/hyperframes/palettes/nature-earth.md +0 -14
- package/dist/skills/hyperframes/palettes/neon-electric.md +0 -14
- package/dist/skills/hyperframes/palettes/pastel-soft.md +0 -14
- package/dist/skills/hyperframes/palettes/warm-editorial.md +0 -14
- package/dist/skills/hyperframes/patterns.md +0 -191
- package/dist/skills/hyperframes/references/audio-reactive.md +0 -76
- package/dist/skills/hyperframes/references/beat-direction.md +0 -171
- package/dist/skills/hyperframes/references/captions.md +0 -163
- package/dist/skills/hyperframes/references/css-patterns.md +0 -373
- package/dist/skills/hyperframes/references/design-picker.md +0 -117
- package/dist/skills/hyperframes/references/dynamic-techniques.md +0 -102
- package/dist/skills/hyperframes/references/html-in-canvas-patterns.md +0 -507
- package/dist/skills/hyperframes/references/motion-principles.md +0 -150
- package/dist/skills/hyperframes/references/narration.md +0 -92
- package/dist/skills/hyperframes/references/prompt-expansion.md +0 -68
- package/dist/skills/hyperframes/references/techniques.md +0 -525
- package/dist/skills/hyperframes/references/text-effects.md +0 -64
- package/dist/skills/hyperframes/references/transcript-guide.md +0 -107
- package/dist/skills/hyperframes/references/transitions/catalog.md +0 -117
- package/dist/skills/hyperframes/references/transitions/css-3d.md +0 -12
- package/dist/skills/hyperframes/references/transitions/css-blur.md +0 -51
- package/dist/skills/hyperframes/references/transitions/css-cover.md +0 -43
- package/dist/skills/hyperframes/references/transitions/css-destruction.md +0 -95
- package/dist/skills/hyperframes/references/transitions/css-dissolve.md +0 -66
- package/dist/skills/hyperframes/references/transitions/css-distortion.md +0 -45
- package/dist/skills/hyperframes/references/transitions/css-grid.md +0 -10
- package/dist/skills/hyperframes/references/transitions/css-light.md +0 -49
- package/dist/skills/hyperframes/references/transitions/css-mechanical.md +0 -30
- package/dist/skills/hyperframes/references/transitions/css-other.md +0 -25
- package/dist/skills/hyperframes/references/transitions/css-push.md +0 -41
- package/dist/skills/hyperframes/references/transitions/css-radial.md +0 -37
- package/dist/skills/hyperframes/references/transitions/css-scale.md +0 -24
- package/dist/skills/hyperframes/references/transitions.md +0 -138
- package/dist/skills/hyperframes/references/typography.md +0 -175
- package/dist/skills/hyperframes/references/video-composition.md +0 -62
- package/dist/skills/hyperframes/scripts/animation-map.mjs +0 -601
- package/dist/skills/hyperframes/scripts/contrast-report.mjs +0 -348
- package/dist/skills/hyperframes/scripts/package-loader.mjs +0 -269
- package/dist/skills/hyperframes/templates/design-picker.html +0 -1432
- package/dist/skills/hyperframes/visual-styles.md +0 -443
- package/dist/studio/assets/hyperframes-player-0esDKGRk.js +0 -418
- package/dist/studio/assets/index-B0twsRu0.css +0 -1
- package/dist/studio/assets/index-BA979yF1.js +0 -251
|
@@ -1,150 +0,0 @@
|
|
|
1
|
-
# Motion Principles
|
|
2
|
-
|
|
3
|
-
## Common defaults that produce monoculture
|
|
4
|
-
|
|
5
|
-
These are the patterns LLMs reach for without thinking. None of them are wrong in isolation — they're wrong as defaults. If every scene of every video lands on the same easing, the same speed, and the same entrance direction, the compositions blur into one another no matter what the brand is.
|
|
6
|
-
|
|
7
|
-
- **Same ease on every tween.** `power2.out` is the most common default. Aim for variety: no more than two independent tweens sharing an ease within a scene. Eases are like font weights — vary them deliberately.
|
|
8
|
-
- **Same speed on every tween.** 0.4–0.5s is a common default that flattens rhythm. The slowest motion in a scene should be roughly 3× slower than the fastest. Vary duration so the eye can tell what's important.
|
|
9
|
-
- **Same entrance direction.** `y: 30, opacity: 0` is the universal LLM entrance. The same scene can use entrances from left, from right, from scale, from blur, opacity-only, letter-spacing — each one says something different about the element.
|
|
10
|
-
- **Same stagger across scenes.** Each scene should have its own rhythm. A 0.08s stagger in beat 1 and a 0.15s stagger in beat 2 makes the two beats feel like different moments.
|
|
11
|
-
- **Ambient zoom on every scene.** Slow-scale-up is the default ambient motion and it telegraphs "LLM-generated video." Vary the ambient motion per scene: slow pan, subtle rotation, color temperature shift, gentle drift — and sometimes nothing. Stillness after motion has real weight.
|
|
12
|
-
- **First animation at t=0.** Zero-delay feels like a jump cut. Offset the opening 0.1–0.3s so the scene reads as composed rather than thrown together.
|
|
13
|
-
|
|
14
|
-
## Easing is emotion, not technique
|
|
15
|
-
|
|
16
|
-
The motion is the verb. The easing is the adverb. A slide-in with `expo.out` feels confident. With `sine.inOut`, dreamy. With `elastic.out`, playful. Same motion, three different meanings. Choose the adverb deliberately.
|
|
17
|
-
|
|
18
|
-
**Direction rules:**
|
|
19
|
-
|
|
20
|
-
- `.out` for elements entering. Starts fast, decelerates. Feels responsive. This is the default for entrances.
|
|
21
|
-
- `.in` for elements leaving. Starts slow, accelerates away. Sends them off with momentum.
|
|
22
|
-
- `.inOut` for elements moving between positions, neither entering nor leaving the scene.
|
|
23
|
-
|
|
24
|
-
Ease-in on an entrance feels sluggish. Ease-out on an exit feels reluctant. These are the most common reversals and they're worth checking your work against.
|
|
25
|
-
|
|
26
|
-
## Speed expresses weight
|
|
27
|
-
|
|
28
|
-
Duration is one of the most direct ways a composition communicates what it values. Faster motion reads as confident, urgent, kinetic — it gives the viewer less time to study what's happening, which means the work has to land in fewer frames. Slower motion reads as deliberate, considered, weighty — the viewer has time to take in the element, which means each element has to earn that attention.
|
|
29
|
-
|
|
30
|
-
Useful calibration ranges (not prescriptions — what a duration _expresses_ depends on what surrounds it):
|
|
31
|
-
|
|
32
|
-
- **0.15–0.3s** — quick, percussive, kinetic. The motion reads as something happening _to_ the frame.
|
|
33
|
-
- **0.3–0.5s** — comfortable, professional. The motion reads as composed and reliable.
|
|
34
|
-
- **0.5–0.8s** — deliberate. The motion has visible weight and asks for attention.
|
|
35
|
-
- **0.8s+** — atmospheric. The motion becomes part of what the scene _is_, not something happening within it.
|
|
36
|
-
|
|
37
|
-
A composition that uses only one of these ranges feels one-note. Mix them — a scene where the headline takes 0.7s to settle and the supporting details land in 0.25s creates contrast that reinforces hierarchy without needing different colors or sizes.
|
|
38
|
-
|
|
39
|
-
## Scene structure: build, breathe, resolve
|
|
40
|
-
|
|
41
|
-
Every scene has three phases. The most common failure is dumping everything into the build and leaving nothing for the other two.
|
|
42
|
-
|
|
43
|
-
- **Build (0–30%)** — elements enter, staggered. Not all at once.
|
|
44
|
-
- **Breathe (30–70%)** — content visible, alive with one ambient motion. The viewer reads, registers, settles.
|
|
45
|
-
- **Resolve (70–100%)** — exit or decisive end. Exits are faster than entrances (see Asymmetry below).
|
|
46
|
-
|
|
47
|
-
A scene that's all build feels like a slideshow. A scene with no breathe phase doesn't let the content land.
|
|
48
|
-
|
|
49
|
-
## Transitions carry meaning
|
|
50
|
-
|
|
51
|
-
The transition type tells the viewer how two scenes relate:
|
|
52
|
-
|
|
53
|
-
- **Crossfade** — "this continues." Connective tissue between related ideas.
|
|
54
|
-
- **Hard cut** — "wake up" or a register shift. Disruption, surprise, percussive emphasis.
|
|
55
|
-
- **Slow dissolve** — "drift with me." Atmospheric, meditative, between-thoughts.
|
|
56
|
-
|
|
57
|
-
Crossfade is the default and it's defensible most of the time. The thing to watch for is using it for everything — when every transition is a crossfade, the viewer stops registering scene changes as meaningful. Hard cuts and slow dissolves are tools for the moments where the change in scene _is_ the message.
|
|
58
|
-
|
|
59
|
-
## Choreography is hierarchy
|
|
60
|
-
|
|
61
|
-
The element that moves first is perceived as most important. Stagger in order of importance, not DOM order. Don't wait for one entrance to complete before starting the next — overlap entries. Total stagger sequence under 500ms regardless of item count keeps the scene from feeling like a slow drip.
|
|
62
|
-
|
|
63
|
-
## Asymmetry between entrances and exits
|
|
64
|
-
|
|
65
|
-
Entrances need longer than exits. A card might take 0.4s to appear but 0.25s to disappear — entrances build presence, exits remove it, and remove takes less time than build.
|
|
66
|
-
|
|
67
|
-
## Visual composition
|
|
68
|
-
|
|
69
|
-
Video frames are not web pages. Web layout patterns that work on a scrollable page often look broken in a fixed-frame composition.
|
|
70
|
-
|
|
71
|
-
- **Two focal points minimum per scene.** The eye needs somewhere to travel. A single text block floating in empty space reads as unfinished.
|
|
72
|
-
- **Fill the frame.** Hero text typically wants 60–80% of frame width. Web type sizes — 16px body, 32px headlines — disappear at video distance.
|
|
73
|
-
- **Three layers minimum.** Background treatment (glow, oversized faded type, color panel), foreground content, accent elements (dividers, labels, data bars). A scene with only one layer reads flat.
|
|
74
|
-
- **Background is not empty.** Radial glows, oversized faded type bleeding off-frame, subtle border panels, hairline rules. Pure solid `#000` reads as "nothing loaded."
|
|
75
|
-
- **Anchor to edges.** Pin content to left/top or right/bottom. Centered-and-floating is a web pattern that looks lost on a 16:9 canvas.
|
|
76
|
-
- **Split frames.** Data panel on the left, content on the right. Top bar with metadata, full-width below. Zone-based layouts beat centered stacks.
|
|
77
|
-
- **Use structural elements.** Rules, dividers, border panels. They create paths for the eye and animate well (`scaleX` from 0).
|
|
78
|
-
|
|
79
|
-
## Image motion treatment
|
|
80
|
-
|
|
81
|
-
Embedded images shouldn't sit flat — every image earns some motion treatment:
|
|
82
|
-
|
|
83
|
-
- **Perspective tilt** — `gsap.set(el, { transformPerspective: 1200, rotationY: -8 })` plus a `box-shadow` creates depth. Do NOT use CSS `transform: perspective(...)`; GSAP will overwrite it.
|
|
84
|
-
- **Slow zoom (Ken Burns)** — GSAP `scale: 1` → `1.04` over beat duration. Makes photos feel cinematic rather than pasted in.
|
|
85
|
-
- **Device frame** — wrap in a laptop or phone shape using `border-radius` and `box-shadow`.
|
|
86
|
-
- **Floating UI** — extract a key element and animate it at a different z-depth for parallax.
|
|
87
|
-
- **Scroll reveal** — clip the image to a viewport window and animate `y` position.
|
|
88
|
-
|
|
89
|
-
## Load-Bearing GSAP Rules
|
|
90
|
-
|
|
91
|
-
Rules below came out of two independent website-to-hyperframes builds (2026-04-20) where compositions lint-clean and still ship broken — elements that never appear, ambient motion that doesn't scrub, entrance tweens that silently kill their target. The linter cannot catch these; the rules must be followed by the author.
|
|
92
|
-
|
|
93
|
-
- **No iframes for captured content.** Iframes do not seek deterministically with the timeline — the capture engine cannot scrub inside them, so they appear frozen (or blank) in the rendered output. If the source you're stylizing is a live web app, use the screenshots from `capture/` as stacked panels or layered images, not live embeds.
|
|
94
|
-
|
|
95
|
-
- **Never stack two transform tweens on the same element.** A common failure: a `y` entrance plus a `scale` Ken Burns on the same `<img>`. The second tween's `immediateRender: true` writes the element's initial state at construction time, overwriting whatever the first tween set — leaving the element invisible or offscreen with no lint warning. A secondary mechanism: `tl.from()` resets to its declared "from" state when the playhead is seeked past the timeline's end, so an element that looked correct in linear playback vanishes in the capture engine's non-linear seek. Fix one of two ways:
|
|
96
|
-
|
|
97
|
-
```html
|
|
98
|
-
<!-- BAD: two transforms on one element -->
|
|
99
|
-
<img class="hero" src="..." />
|
|
100
|
-
<script>
|
|
101
|
-
tl.from(".hero", { y: 50, opacity: 0, duration: 0.6 }, 0);
|
|
102
|
-
tl.to(".hero", { scale: 1.04, duration: beat }, 0); // kills the entrance
|
|
103
|
-
</script>
|
|
104
|
-
|
|
105
|
-
<!-- GOOD option A: combine into one tween -->
|
|
106
|
-
<script>
|
|
107
|
-
tl.fromTo(
|
|
108
|
-
".hero",
|
|
109
|
-
{ y: 50, opacity: 0, scale: 1.0 },
|
|
110
|
-
{ y: 0, opacity: 1, scale: 1.04, duration: beat, ease: "none" },
|
|
111
|
-
0,
|
|
112
|
-
);
|
|
113
|
-
</script>
|
|
114
|
-
|
|
115
|
-
<!-- GOOD option B: split across parent + child -->
|
|
116
|
-
<div class="hero-wrap"><img class="hero" src="..." /></div>
|
|
117
|
-
<script>
|
|
118
|
-
tl.from(".hero-wrap", { y: 50, opacity: 0, duration: 0.6 }, 0); // entrance on parent
|
|
119
|
-
tl.to(".hero", { scale: 1.04, duration: beat }, 0); // Ken Burns on child
|
|
120
|
-
</script>
|
|
121
|
-
```
|
|
122
|
-
|
|
123
|
-
- **Prefer `tl.fromTo()` over `tl.from()` inside `.clip` scenes.** `gsap.from()` sets `immediateRender: true` by default, which writes the "from" state at timeline construction — before the `.clip` scene's `data-start` is active. Elements can flash visible, start from the wrong position, or skip their entrance entirely when the scene is seeked non-linearly (which the capture engine does). Explicit `fromTo` makes the state at every timeline position deterministic:
|
|
124
|
-
|
|
125
|
-
```js
|
|
126
|
-
// BRITTLE: immediateRender interacts badly with scene boundaries
|
|
127
|
-
tl.from(el, { opacity: 0, y: 50, duration: 0.6 }, t);
|
|
128
|
-
|
|
129
|
-
// DETERMINISTIC: state is defined at both ends, no immediateRender surprise
|
|
130
|
-
tl.fromTo(el, { opacity: 0, y: 50 }, { opacity: 1, y: 0, duration: 0.6 }, t);
|
|
131
|
-
```
|
|
132
|
-
|
|
133
|
-
- **Ambient pulses must attach to the seekable `tl`, never bare `gsap.to()`.** Auras, shimmers, gentle float loops, logo breathing — all of these must be added to the scene's timeline, not fired standalone. Standalone tweens run on wallclock time and do not scrub with the capture engine, so the effect is absent in the rendered video even though it looks correct in the studio preview:
|
|
134
|
-
|
|
135
|
-
```js
|
|
136
|
-
// BAD: lives outside the timeline, never renders in capture
|
|
137
|
-
gsap.to(".aura", { scale: 1.08, yoyo: true, repeat: 5, duration: 1.2 });
|
|
138
|
-
|
|
139
|
-
// GOOD: seekable, deterministic, renders
|
|
140
|
-
tl.to(".aura", { scale: 1.08, yoyo: true, repeat: 5, duration: 1.2 }, 0);
|
|
141
|
-
```
|
|
142
|
-
|
|
143
|
-
- **Hard-kill every scene boundary, not just captions.** The same hard-kill pattern from `captions.md` generalizes to all elements with exit animations: any element whose visibility changes at a beat boundary needs a deterministic `tl.set()` kill after its fade, because later tweens on the same element (or `immediateRender` from a sibling tween) can resurrect it. Apply to every element with an exit animation:
|
|
144
|
-
|
|
145
|
-
```js
|
|
146
|
-
tl.to(el, { opacity: 0, duration: 0.3 }, beatEnd);
|
|
147
|
-
tl.set(el, { opacity: 0, visibility: "hidden" }, beatEnd + 0.3); // deterministic kill
|
|
148
|
-
```
|
|
149
|
-
|
|
150
|
-
These are the exact rules with the exact code examples — don't summarize or shorten them. They exist because compositions that lint clean still ship broken without them.
|
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
# Narration & Script
|
|
2
|
-
|
|
3
|
-
How to write narration scripts for video compositions. Read when the composition includes voiceover or TTS.
|
|
4
|
-
|
|
5
|
-
## Pacing
|
|
6
|
-
|
|
7
|
-
- **2.5 words per second** is natural speaking pace
|
|
8
|
-
- 15s = ~37 words. 30s = ~75 words. 60s = ~150 words
|
|
9
|
-
- Leave room for pauses. Silence between sentences is a feature, not dead air
|
|
10
|
-
- The script should feel SHORTER than the video — visual breathing room matters
|
|
11
|
-
|
|
12
|
-
## Tone
|
|
13
|
-
|
|
14
|
-
Write like a person, not a brochure:
|
|
15
|
-
|
|
16
|
-
- Use contractions: "it's", "you'll", "that's", "we've"
|
|
17
|
-
- Vary sentence length — short punchy phrases mixed with longer flowing ones
|
|
18
|
-
- Read it out loud. If it sounds robotic, rewrite it
|
|
19
|
-
- Avoid jargon unless the audience expects it
|
|
20
|
-
|
|
21
|
-
## Number Pronunciation
|
|
22
|
-
|
|
23
|
-
Write what you want the voice to say. TTS reads literally.
|
|
24
|
-
|
|
25
|
-
| In the product | Write in script as |
|
|
26
|
-
| -------------- | --------------------------------- |
|
|
27
|
-
| 135+ | more than one hundred thirty five |
|
|
28
|
-
| $1.9T | nearly two trillion dollars |
|
|
29
|
-
| 99.999% | ninety nine point nine percent |
|
|
30
|
-
| 200M+ | over two hundred million |
|
|
31
|
-
| 10x | ten times |
|
|
32
|
-
| API | A P I |
|
|
33
|
-
| stripe.com | stripe dot com |
|
|
34
|
-
|
|
35
|
-
The visual can show the exact figure while the voice rounds it.
|
|
36
|
-
|
|
37
|
-
## Structure
|
|
38
|
-
|
|
39
|
-
For product videos:
|
|
40
|
-
|
|
41
|
-
1. **Hook** — what's surprising or impressive about this product? A bold claim, a provocative question, a contrast, or a striking number. This is the opening line. **Vary the hook type** — don't default to a stat every time.
|
|
42
|
-
2. **Story** — what does the product do? Who uses it? Keep it concrete.
|
|
43
|
-
3. **Proof** — stats, customer names, social proof. Real numbers from the product.
|
|
44
|
-
4. **CTA** — what should the viewer do? "Start building at stripe dot com."
|
|
45
|
-
|
|
46
|
-
Not every video needs all four. A 15-second social ad might be Hook + Proof + CTA. A 60-second product tour uses all four with more Story.
|
|
47
|
-
|
|
48
|
-
## The Opening Line
|
|
49
|
-
|
|
50
|
-
The most important sentence in the video. It must create tension, curiosity, or surprise in the first 3 seconds.
|
|
51
|
-
|
|
52
|
-
Patterns that work:
|
|
53
|
-
|
|
54
|
-
- **A bold claim**: "The financial infrastructure that powers the internet economy."
|
|
55
|
-
- **A question that provokes**: "What if your database could think?"
|
|
56
|
-
- **A contrast**: "Your AI agent already knows how to make videos. It just needs the right format."
|
|
57
|
-
- **A number that shocks**: "Nearly two trillion dollars." (Use sparingly — not every video should open with a stat.)
|
|
58
|
-
|
|
59
|
-
If the opening is generic ("Welcome to Stripe" / "Introducing our product"), start over.
|
|
60
|
-
|
|
61
|
-
## Example
|
|
62
|
-
|
|
63
|
-
From a 62-second product launch video (team reference):
|
|
64
|
-
|
|
65
|
-
```
|
|
66
|
-
Your AI agent already knows how to make videos.
|
|
67
|
-
It just needs the right format.
|
|
68
|
-
|
|
69
|
-
This is Hyperframes. An open source framework. HTML in, video out.
|
|
70
|
-
|
|
71
|
-
A div is a keyframe. Data attributes are your timeline.
|
|
72
|
-
CSS is your look. G-Sap is your animation engine.
|
|
73
|
-
|
|
74
|
-
Anything a browser can render can be a frame in your video.
|
|
75
|
-
|
|
76
|
-
CSS animations. G-Sap. Lottie. Shaders. Three.js.
|
|
77
|
-
|
|
78
|
-
Drop in music, sound effects, footage — it all composes together.
|
|
79
|
-
|
|
80
|
-
No new framework for the agent to learn.
|
|
81
|
-
Just HTML.
|
|
82
|
-
|
|
83
|
-
The agent writes it. The renderer captures every frame as MP4.
|
|
84
|
-
It's deterministic. Identical outputs, every time.
|
|
85
|
-
|
|
86
|
-
Give your agent the CLI. Tell it what to make.
|
|
87
|
-
Watch it build.
|
|
88
|
-
|
|
89
|
-
Hyperframes. Go make something.
|
|
90
|
-
```
|
|
91
|
-
|
|
92
|
-
Note: ~140 words for 62 seconds — that's 2.3 words/sec, leaving room for pauses and visual breathing.
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
# Prompt Expansion
|
|
2
|
-
|
|
3
|
-
Run on every composition. Expansion is not about lengthening a short prompt — it's about grounding the user's intent against the design spec (`frame.md` or `design.md`) and `house-style.md` and producing a consistent intermediate that every downstream agent reads the same way.
|
|
4
|
-
|
|
5
|
-
Runs AFTER design direction is established (Step 1). The expansion consumes the design spec (`frame.md` or `design.md`, if present) and produces output that cites its exact values.
|
|
6
|
-
|
|
7
|
-
## Prerequisites
|
|
8
|
-
|
|
9
|
-
Read before generating:
|
|
10
|
-
|
|
11
|
-
- the design spec — `frame.md` → `design.md` → `DESIGN.md` (prefer `frame.md` if more than one exists) — extract brand colors, fonts, mood, and constraints. The expansion cites these exact values (hex codes, font names); it does not invent new ones.
|
|
12
|
-
- [beat-direction.md](beat-direction.md) — per-beat planning format (concept, mood, choreography verbs, transitions, depth layers, rhythm). The expansion outputs each scene using this format.
|
|
13
|
-
- [video-composition.md](video-composition.md) — video-medium rules for density, scale, and color presence. The expansion applies these automatically.
|
|
14
|
-
- [../house-style.md](../house-style.md) — its rules for Background Layer (2-5 decoratives), Color, Motion, Typography apply to every scene. The expansion writes output that conforms to them.
|
|
15
|
-
|
|
16
|
-
If no design spec exists yet, run Step 1 (Design system) first. Expansion without a design context produces generic scene breakdowns that later agents ignore.
|
|
17
|
-
|
|
18
|
-
## Why always run it
|
|
19
|
-
|
|
20
|
-
**The expansion is never pass-through.** Every user prompt — no matter how detailed — is a _seed_. The expansion's job is to enrich it into a fully-realized per-scene production spec that the scene subagents can build from directly.
|
|
21
|
-
|
|
22
|
-
Even a detailed 7-scene brief lacks things only the expansion adds:
|
|
23
|
-
|
|
24
|
-
- **Atmosphere layers per scene** (required 2–5 from house-style: radial glows, ghost type, hairline rules, grain, thematic decoratives) — the user's prompt almost never lists these; expansion adds them.
|
|
25
|
-
- **Secondary motion for every decorative** — breath, drift, pulse, orbit. A decorative without ambient motion feels dead.
|
|
26
|
-
- **Micro-details that make a scene feel real** — registration marks, tick indicators, monospace coord labels, typographic accents, code snippets in the background, grid patterns. Things the user didn't think to request.
|
|
27
|
-
- **Transition choreography at the object level** — not "crossfade" but "X expands outward and becomes Y". Specific duration, ease, and morph source/target.
|
|
28
|
-
- **Pacing beats within each scene** — where tension builds, where a hold lets the viewer breathe, where the accent word lands.
|
|
29
|
-
- **Exact hex values, typography parameters, ease choices** from the spec — no vagueness left for the scene subagent to guess.
|
|
30
|
-
|
|
31
|
-
Expansion's job on a detailed prompt is not to summarize or pass through — it's to **take what the user wrote and make it richer**. The user's content stays; the atmosphere, ambient motion, and micro-details are added on top. That's what makes the difference between a scene that matches the brief and a scene that feels alive.
|
|
32
|
-
|
|
33
|
-
The quality gap between a single-pass composition and a multi-scene-pipeline composition comes from this step. Expansion front-loads the richness so every scene subagent builds from a rich brief, not a terse one.
|
|
34
|
-
|
|
35
|
-
**Do not skip. Do not pass through.** Single-scene compositions and trivial edits are the only exceptions.
|
|
36
|
-
|
|
37
|
-
## What to generate
|
|
38
|
-
|
|
39
|
-
Expand into a full production prompt with these sections:
|
|
40
|
-
|
|
41
|
-
1. **Title + style block** — cite the spec's exact hex values, font names, and mood. Do NOT invent a palette — quote what the design provides.
|
|
42
|
-
|
|
43
|
-
2. **Rhythm declaration** — name the scene rhythm before detailing any scene. Example: `hook-PUNCH-breathe-CTA` or `slow-build-BUILD-PEAK-breathe-CTA`. Derive the rhythm from the brand and the storyboard's emotional arc — see [beat-direction.md](beat-direction.md) for the considerations that drive this decision.
|
|
44
|
-
|
|
45
|
-
3. **Global rules** — parallax layers, micro-motion requirements, transition style, primary + accent transitions. Match energy to mood (calm → slow eases, high → snappy eases).
|
|
46
|
-
|
|
47
|
-
4. **Per-scene beats** — for each scene, use the beat-direction format:
|
|
48
|
-
- **Concept** — the big idea in 2-3 sentences. What visual WORLD? What metaphor? What should the viewer FEEL?
|
|
49
|
-
- **Mood direction** — cultural/design references, not hex codes. ("Bauhaus color studies", "cinematic title sequence", "editorial calm")
|
|
50
|
-
- **Depth layers** — BG (2-5 decoratives with ambient motion), MG (content), FG (accents, structural elements, micro-details). 8-10 total elements per scene per video-composition.md.
|
|
51
|
-
- **Animation choreography** — specific verbs per element. High: SLAMS, CRASHES. Medium: CASCADE, SLIDES. Low: floats, types on, counts up. Every element gets a verb. If you can't name the verb, the element is not yet designed.
|
|
52
|
-
- **Transition out** — shader or CSS, with specific type and parameters. Not "crossfade" but "blur crossfade, 0.4s, power2.inOut."
|
|
53
|
-
|
|
54
|
-
5. **Recurring motifs** — visual threads across scenes from the brand palette.
|
|
55
|
-
|
|
56
|
-
6. **Negative prompt** — what to avoid, informed by the spec's constraints if present.
|
|
57
|
-
|
|
58
|
-
## Output
|
|
59
|
-
|
|
60
|
-
Write the expanded prompt to `.hyperframes/expanded-prompt.md` in the project directory. Do NOT dump it into the chat — it will be hundreds of lines.
|
|
61
|
-
|
|
62
|
-
Tell the user:
|
|
63
|
-
|
|
64
|
-
> "I've expanded your prompt into a full production breakdown. Review it here: `.hyperframes/expanded-prompt.md`
|
|
65
|
-
>
|
|
66
|
-
> It has [N] scenes across [duration] seconds with specific visual elements, transitions, and pacing. Edit anything you want, then let me know when you're ready to proceed."
|
|
67
|
-
|
|
68
|
-
Only move to construction after the user approves or says to continue.
|