dreative 0.5.1 → 0.5.3
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/README.md +49 -27
- package/dist/cli/audit.js +206 -0
- package/dist/cli/audit.test.js +79 -0
- package/dist/cli/docsCheck.js +163 -0
- package/dist/cli/docsCheck.test.js +8 -0
- package/dist/cli/index.js +45 -9
- package/dist/server/preview.js +73 -73
- package/dist/server/store.js +11 -0
- package/dist/shared/artifacts.js +220 -0
- package/dist/shared/design.js +45 -24
- package/dist/shared/ruleSystem.js +220 -0
- package/dist/shared/ruleSystem.test.js +262 -0
- package/dist/shared/skillSystem.js +173 -0
- package/dist/shared/skillSystem.test.js +110 -0
- package/dist/ui/assets/{index--vztc_MR.js → index-CKwmbx2j.js} +13 -13
- package/dist/ui/index.html +12 -12
- package/package.json +5 -3
- package/skill/dreative/DESIGN.md +144 -108
- package/skill/dreative/PLAN.md +285 -116
- package/skill/dreative/SKILL.md +237 -144
- package/skill/dreative/frameworks/nextjs.md +13 -0
- package/skill/dreative/frameworks/react-vite.md +12 -0
- package/skill/dreative/frameworks/styling.md +14 -0
- package/skill/dreative/frameworks/sveltekit.md +10 -0
- package/skill/dreative/frameworks/vue-nuxt.md +12 -0
- package/skill/dreative/recipes/3d-recipes.md +44 -0
- package/skill/dreative/recipes/cinematic-recipes.md +19 -0
- package/skill/dreative/recipes/immersive-recipes.md +18 -0
- package/skill/dreative/recipes/media-recipes.md +60 -0
- package/skill/dreative/recipes/motion-recipes.md +68 -0
- package/skill/dreative/references/ARTIFACTS.md +196 -0
- package/skill/dreative/references/REFLEX_FONTS.json +44 -0
- package/skill/dreative/references/RULES.json +186 -0
- package/skill/dreative/references/SKILL_CONTRACT.md +30 -0
- package/skill/dreative/references/TIERS.md +44 -0
- package/skill/dreative/schemas/plan.schema.json +309 -0
- package/skill/dreative/schemas/verify.schema.json +75 -0
- package/skill/dreative/skills/3d.md +94 -267
- package/skill/dreative/skills/cinematic.md +56 -232
- package/skill/dreative/skills/experimental.md +108 -95
- package/skill/dreative/skills/immersive.md +61 -223
- package/skill/dreative/skills/interaction.md +9 -1
- package/skill/dreative/skills/media.md +149 -564
- package/skill/dreative/skills/mobile.md +129 -117
- package/skill/dreative/skills/motion.md +126 -256
- package/skill/dreative/skills/refined.md +116 -102
- package/skill/dreative/skills/ux.md +155 -144
- package/dist/server/ai.js +0 -177
|
@@ -1,256 +1,126 @@
|
|
|
1
|
-
# Dreative Specialist Skill — Motion & Scroll Choreography
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
- **
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
easing family (e.g. `expo.out` + one overshoot) OR one spring config — and
|
|
128
|
-
use it everywhere; mixed default eases read as assembled-from-snippets.
|
|
129
|
-
`linear` only for marquees/orbits; never ship a default ease unexamined.
|
|
130
|
-
|
|
131
|
-
## 6. Performance and accessibility (non-negotiable)
|
|
132
|
-
|
|
133
|
-
- Transform/opacity only in hot paths; promote animating layers sparingly
|
|
134
|
-
(`will-change` set just-in-time, removed after). > 6 simultaneously-animating
|
|
135
|
-
elements = re-choreograph.
|
|
136
|
-
- All scroll work driven by IntersectionObserver / ScrollTrigger / `useScroll`
|
|
137
|
-
(rAF-batched) — a raw `scroll` listener is a hard ban (DESIGN.md).
|
|
138
|
-
- Test the tab hidden→visible case: loops must not accumulate; `whileInView` must
|
|
139
|
-
not re-fire (`once: true`).
|
|
140
|
-
- `prefers-reduced-motion`: scrubbed narratives get a static end-state, entrances
|
|
141
|
-
become plain fades ≤ 200ms, marquees stop. In Motion use `useReducedMotion()`
|
|
142
|
-
and branch the variants — don't just shorten durations.
|
|
143
|
-
- Content exists without JS: initial styles are the VISIBLE state; animation
|
|
144
|
-
libraries then hide/offset from JS before first paint (`gsap.set`, Motion
|
|
145
|
-
`initial`). An SSR'd page must never flash-then-hide.
|
|
146
|
-
|
|
147
|
-
## 7. Recipes (copy the shape, restyle the skin)
|
|
148
|
-
|
|
149
|
-
- **Hero sequence**: nav fades in (150ms) → headline lines mask-slide up, 80ms
|
|
150
|
-
stagger → subtext + CTA fade-rise together → hero media scales 1.04→1 with 6px
|
|
151
|
-
blur→0. Total 900ms, expo-out.
|
|
152
|
-
- **Sticky product walkthrough**: `sticky` media column + scrolling step copy;
|
|
153
|
-
step index from IntersectionObserver on copy blocks; media crossfades/transforms
|
|
154
|
-
per step (springy, 300ms).
|
|
155
|
-
- **Marquee**: duplicated track, `animation: scroll Xs linear infinite`,
|
|
156
|
-
`width: max-content`, pause on hover, speed from content width (px/s constant,
|
|
157
|
-
~60-90px/s), masked edges with `mask-image: linear-gradient`.
|
|
158
|
-
- **Scrub showcase**: sticky canvas/image sequence, `useScroll` on the wrapper,
|
|
159
|
-
map progress to frame index / rotation; preload frames; ≤ 2.5 viewports tall.
|
|
160
|
-
- **Canvas product story** (capsul-in-pro.com's form): a single-product launch
|
|
161
|
-
page as one scroll-scrubbed narrative — the product renders on a full-page
|
|
162
|
-
canvas (image-sequence or WebGL) and scroll drives its assembly/rotation
|
|
163
|
-
while short copy beats fade in at fixed progress stops; the site ships as
|
|
164
|
-
one bundled app with explicit portrait/landscape variants (it gates on
|
|
165
|
-
orientation rather than half-working in both). Copy the shape: one subject,
|
|
166
|
-
one scrubbed timeline, copy anchored to progress ranges, per-orientation
|
|
167
|
-
choreography decided up front.
|
|
168
|
-
- **Text on a path** (verified on epic.net): a manifesto paragraph flows along a
|
|
169
|
-
curved SVG path (`<textPath>` or per-word transforms sampled from a curve) and
|
|
170
|
-
relaxes toward straight lines as scroll progress advances — the curve
|
|
171
|
-
amplitude is the scrubbed value. One per site; body text elsewhere stays flat.
|
|
172
|
-
- **Orbiting cursor label** (epic.net's video CTA): a circular text ring
|
|
173
|
-
("PLAY VIDEO ⟲") slowly rotates around the pointer while it's over the media
|
|
174
|
-
region — SVG `<textPath>` on a circle, damped position follow, constant
|
|
175
|
-
rotation. Replaces the play button; fine pointers only, real button fallback.
|
|
176
|
-
|
|
177
|
-
## 8. Setup blueprints — install and WIRE the stack (do not skip)
|
|
178
|
-
|
|
179
|
-
Doctrine without dependencies ships a static page. When this skill is active,
|
|
180
|
-
actually add the libraries to the project and wire them before designing
|
|
181
|
-
sections. Pick the stack per §0, then:
|
|
182
|
-
|
|
183
|
-
**GSAP + ScrollTrigger + Lenis (brand pages, the unseen.co-family stack):**
|
|
184
|
-
|
|
185
|
-
```
|
|
186
|
-
npm i gsap lenis
|
|
187
|
-
```
|
|
188
|
-
|
|
189
|
-
```js
|
|
190
|
-
// one module, imported once at app root (e.g. src/lib/motion.ts)
|
|
191
|
-
import gsap from "gsap";
|
|
192
|
-
import { ScrollTrigger } from "gsap/ScrollTrigger";
|
|
193
|
-
import Lenis from "lenis";
|
|
194
|
-
|
|
195
|
-
gsap.registerPlugin(ScrollTrigger);
|
|
196
|
-
export const lenis = new Lenis({ lerp: 0.1, smoothWheel: true });
|
|
197
|
-
lenis.on("scroll", ScrollTrigger.update);
|
|
198
|
-
gsap.ticker.add((t) => lenis.raf(t * 1000));
|
|
199
|
-
gsap.ticker.lagSmoothing(0);
|
|
200
|
-
```
|
|
201
|
-
|
|
202
|
-
React: run that inside a `useEffect` in a `<SmoothScroll>` provider mounted in
|
|
203
|
-
the root layout (destroy on unmount); Next.js needs `"use client"` on it.
|
|
204
|
-
ONE Lenis instance, ONE gsap ticker — never per-component.
|
|
205
|
-
|
|
206
|
-
**motion/react (React product+brand):** `npm i motion` — import from
|
|
207
|
-
`"motion/react"`. Shared transition vocabulary in one exported object
|
|
208
|
-
(`export const spring = { type: "spring", stiffness: 300, damping: 30 }`), used
|
|
209
|
-
everywhere; `MotionConfig reducedMotion="user"` at the root.
|
|
210
|
-
|
|
211
|
-
**Easing tokens (either stack):** commit page-wide —
|
|
212
|
-
`expo.out` / `cubic-bezier(0.16, 1, 0.3, 1)` for entrances/reveals,
|
|
213
|
-
`power2.inOut` for scrubbed/camera moves, springs for interactive. Define once
|
|
214
|
-
(gsap defaults via `gsap.defaults({ ease: "expo.out" })` or CSS custom
|
|
215
|
-
property `--ease-out-expo`), reference everywhere.
|
|
216
|
-
|
|
217
|
-
**Line-mask headline reveal (the canonical premium move, copy this shape):**
|
|
218
|
-
|
|
219
|
-
```jsx
|
|
220
|
-
// each line: <div class="overflow-hidden"><div class="line">…</div></div>
|
|
221
|
-
gsap.set(".line", { yPercent: 110 });
|
|
222
|
-
gsap.to(".line", {
|
|
223
|
-
yPercent: 0, duration: 0.9, ease: "expo.out", stagger: 0.08,
|
|
224
|
-
scrollTrigger: { trigger: el, start: "top 80%", once: true },
|
|
225
|
-
});
|
|
226
|
-
```
|
|
227
|
-
|
|
228
|
-
Use GSAP `SplitText` (free) with `type: "lines", mask: "lines"` instead of
|
|
229
|
-
hand-wrapping when available; `aria-label` the original string per §4.
|
|
230
|
-
|
|
231
|
-
## 9. Definition of done — the shipped-motion inventory
|
|
232
|
-
|
|
233
|
-
A motion request is fulfilled only if the final code contains, verifiably
|
|
234
|
-
(grep the imports, name the elements):
|
|
235
|
-
|
|
236
|
-
- **Dial 4–6 (product/calm brand):** composed hero entrance timeline (§2), the
|
|
237
|
-
three global feel constants (interaction.md §0), 1–2 `whileInView`/triggered
|
|
238
|
-
section reveals, animated states (loading/success). No smooth scroll.
|
|
239
|
-
- **Dial 7–8 (expressive brand):** all of the above PLUS Lenis smooth scroll,
|
|
240
|
-
line-mask headline reveals on hero + section headings, one scrubbed scroll
|
|
241
|
-
sequence (pin, parallax system, or progress-bound narrative), one signature
|
|
242
|
-
pointer effect (interaction.md §1), and a page/route transition treatment.
|
|
243
|
-
- **Dial 9–10 (award-site):** all of the above PLUS the immersive.md or
|
|
244
|
-
cinematic.md architecture actually built (persistent stage/canvas, preloader
|
|
245
|
-
choreography, spatial or sim-driven route transitions, custom cursor).
|
|
246
|
-
|
|
247
|
-
Before reporting done, list which inventory items shipped and where (element +
|
|
248
|
-
trigger). "The page has hover states" does not clear dial 7+. If a listed item
|
|
249
|
-
was deliberately cut, say so and why. This inventory is a **hard gate**, not a
|
|
250
|
-
checklist: the SKILL.md verification pass fails the task on any dial-appropriate
|
|
251
|
-
item that is neither proven running nor logged as a deliberate cut with a
|
|
252
|
-
reason — an incomplete inventory means keep building, not ship with a caveat.
|
|
253
|
-
The runtime stage must PROVE the items run (transforms changing, triggers
|
|
254
|
-
firing, console clean), not just find them in the source. On mobile, grade
|
|
255
|
-
against the shifted dial (mobile.md: desktop N ≈ mobile N−2), not the desktop
|
|
256
|
-
list.
|
|
1
|
+
# Dreative Specialist Skill — Motion & Scroll Choreography
|
|
2
|
+
|
|
3
|
+
## Contract
|
|
4
|
+
|
|
5
|
+
Follow `../references/SKILL_CONTRACT.md`. Dependencies: `ux`, `mobile`. Deliver a
|
|
6
|
+
named motion system, trigger/timing/easing inventory, cleanup strategy, mobile
|
|
7
|
+
translation, reduced-motion fallback, and sampled runtime evidence.
|
|
8
|
+
|
|
9
|
+
Load for animation, parallax, scroll stories, kinetic type, spatial transitions,
|
|
10
|
+
or a motion dial that requires more than state feedback.
|
|
11
|
+
|
|
12
|
+
## 0. Explore before recipes
|
|
13
|
+
|
|
14
|
+
Understand the content sequence, brand physics, inputs, and still layout first.
|
|
15
|
+
Record three original choreography concepts before reading
|
|
16
|
+
`../recipes/motion-recipes.md`. A recipe supplies wiring—not the story.
|
|
17
|
+
|
|
18
|
+
Name the motion signature in physical terms such as precise mechanical settle,
|
|
19
|
+
soft editorial drift, elastic play, or heavy cinematic inertia. One system owns
|
|
20
|
+
the page; independent default animations do not.
|
|
21
|
+
|
|
22
|
+
## 1. Hard gates
|
|
23
|
+
|
|
24
|
+
- Content is visible before enhancement and never depends on a JS callback to
|
|
25
|
+
appear (`content.visible`).
|
|
26
|
+
- Reduced motion removes nonessential travel, pinning, auto-looping, and
|
|
27
|
+
vestibular effects while preserving state and hierarchy
|
|
28
|
+
(`motion.reducedMotion`).
|
|
29
|
+
- Navigation, forms, keyboard, pointer targets, and focus remain functional
|
|
30
|
+
(`ux.functional`, `spatial.noOcclusion`).
|
|
31
|
+
- Timelines/listeners/observers/render loops clean up; hidden tabs and route
|
|
32
|
+
transitions do not multiply work.
|
|
33
|
+
- Heavy choreography has measured runtime and a concrete low-power/mobile/static
|
|
34
|
+
fallback (`effects.runtimeFallback`).
|
|
35
|
+
|
|
36
|
+
## 2. Motion architecture
|
|
37
|
+
|
|
38
|
+
Classify motion before selecting a library:
|
|
39
|
+
|
|
40
|
+
- **Decorative:** reveals, hover response, ambient loops, and slight parallax.
|
|
41
|
+
- **Structural:** motion controls hierarchy, pacing, pinning, section state, or
|
|
42
|
+
the handoff between compositions.
|
|
43
|
+
- **Transformational:** imagery, type, or objects fragment, combine,
|
|
44
|
+
reconstruct, change form, or become the next scene.
|
|
45
|
+
|
|
46
|
+
At expressive/award, actively test key moments for structural or
|
|
47
|
+
transformational value. Do not call opacity/translate/scale choreography
|
|
48
|
+
structural merely because it is scroll-driven.
|
|
49
|
+
|
|
50
|
+
Choose by job:
|
|
51
|
+
|
|
52
|
+
- CSS transitions/animations for local states and simple decorative loops.
|
|
53
|
+
- `motion/react` for component presence, layout, gestures, and springs.
|
|
54
|
+
- GSAP + ScrollTrigger for coordinated timelines and pinned scroll chapters.
|
|
55
|
+
- Lenis only when the concept needs a shared smooth-scroll clock.
|
|
56
|
+
- R3F/three.js render state for scene motion; synchronize with the page clock.
|
|
57
|
+
|
|
58
|
+
Use one provider/ticker/scroll owner. Define tokens for duration, spring, easing,
|
|
59
|
+
distance, stagger, and reduced-motion behavior. Interactive motion uses springs
|
|
60
|
+
or velocity-aware settling; narrative motion uses deliberate timelines.
|
|
61
|
+
|
|
62
|
+
## 3. Evidence-backed creative structure
|
|
63
|
+
|
|
64
|
+
At expressive/award, satisfy `motion.expressive.architecture` through one plan
|
|
65
|
+
path without mechanism quotas:
|
|
66
|
+
|
|
67
|
+
- **Diversity:** use the concept-related mechanisms and drivers needed to shape
|
|
68
|
+
the journey, joined by one motion language.
|
|
69
|
+
- **Development:** evolve one coherent signature mechanism through materially
|
|
70
|
+
different roles/states, with quieter supporting motion.
|
|
71
|
+
|
|
72
|
+
Development is not the same reveal with different distances. A line becoming
|
|
73
|
+
navigation, data plot, and scene boundary qualifies; fade-up repeated across
|
|
74
|
+
three sections does not.
|
|
75
|
+
|
|
76
|
+
## 4. Choreography principles
|
|
77
|
+
|
|
78
|
+
- Build a timeline for the whole journey: setup, anticipation, peak, rest,
|
|
79
|
+
transformation, resolution.
|
|
80
|
+
- Concentrate technical and visual complexity in a small number of hero moments;
|
|
81
|
+
keep reading sections calm so those moments land.
|
|
82
|
+
- Prefer composition handoffs: let a mask, object, layer, grid, or typographic
|
|
83
|
+
structure from one scene become material for the next.
|
|
84
|
+
- Entrances orient; they are not the design. Key media and signatures respond to
|
|
85
|
+
input or develop state.
|
|
86
|
+
- Scroll links progress to meaning. Clamp/damp velocity and avoid raw scroll
|
|
87
|
+
listeners or layout work in every frame.
|
|
88
|
+
- Kinetic type remains readable DOM text; splits restore cleanly and preserve
|
|
89
|
+
accessibility.
|
|
90
|
+
- Presence/exits preserve focus, scroll position, and input continuity.
|
|
91
|
+
- Mobile shortens travel, removes long pins, lowers parallax, and preserves the
|
|
92
|
+
concept through a calmer translation rather than a cropped desktop effect.
|
|
93
|
+
|
|
94
|
+
## 5. Planning and verification
|
|
95
|
+
|
|
96
|
+
Before implementation, complete the section-level motion treatment in the plan:
|
|
97
|
+
static composition, start/end state, changes, pinned elements, handoff, purpose,
|
|
98
|
+
mechanism, mobile translation, and reduced-motion state. Choose the simplest
|
|
99
|
+
mechanism that produces the intended transformation convincingly; CSS is valid,
|
|
100
|
+
and WebGL/3D is never required as a creativity badge.
|
|
101
|
+
|
|
102
|
+
Run the anti-default review before approval: identify whether imagery only
|
|
103
|
+
fades/scales/slides, sections reveal independently, the page lacks a composition
|
|
104
|
+
handoff, motion merely introduces rather than changes state, the system could fit
|
|
105
|
+
an unrelated brand, or nothing is memorable. Revise expressive/award plans that
|
|
106
|
+
remain generic.
|
|
107
|
+
|
|
108
|
+
Weak treatment: “hero scales in, heading fades up, cards stagger, sections
|
|
109
|
+
reveal.” Strong treatment: “the isolated subject stays pinned while its depth
|
|
110
|
+
layers separate; the headline compresses into a mask; that mask tiles the scene
|
|
111
|
+
into the next section; mobile uses a short clip-path handoff.” Copy neither
|
|
112
|
+
literally—match that level of state change and continuity to the brief.
|
|
113
|
+
|
|
114
|
+
For each moment record element, trigger/driver, purpose, state range, duration or
|
|
115
|
+
spring, mobile translation, reduced-motion behavior, fallback, and evidence.
|
|
116
|
+
|
|
117
|
+
Runtime proof includes changing transforms/uniforms/state at two timestamps,
|
|
118
|
+
trigger positions, tested scroll-back, hidden-tab recovery, cleanup after route
|
|
119
|
+
changes, mobile viewport, reduced motion, console count, and frame-time sampling
|
|
120
|
+
for heavy work. Visually inspect initial, early, mid-transition, final, handoff,
|
|
121
|
+
mobile, and reduced-motion states; add pinned midpoint/exit when relevant. Check
|
|
122
|
+
readability, continuity, collisions, empty frames, timing, concept expression,
|
|
123
|
+
and usability. Expressive/award work requires at least one refinement after this
|
|
124
|
+
inspection. A static screenshot cannot prove choreography.
|
|
125
|
+
|
|
126
|
+
Recipe reference: `../recipes/motion-recipes.md`, after concept exploration only.
|