dreative 0.5.0 → 0.5.2
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 +81 -8
- package/dist/server/preview.js +73 -73
- package/dist/server/store.js +11 -0
- package/dist/shared/artifacts.js +162 -0
- package/dist/shared/design.js +42 -22
- package/dist/shared/ruleSystem.js +130 -0
- package/dist/shared/ruleSystem.test.js +187 -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 +290 -95
- package/skill/dreative/PLAN.md +462 -71
- package/skill/dreative/SKILL.md +230 -126
- 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 +44 -0
- package/skill/dreative/references/ARTIFACTS.md +180 -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 +42 -0
- package/skill/dreative/schemas/plan.schema.json +241 -0
- package/skill/dreative/schemas/verify.schema.json +61 -0
- package/skill/dreative/skills/3d.md +94 -157
- package/skill/dreative/skills/cinematic.md +56 -232
- package/skill/dreative/skills/experimental.md +111 -0
- package/skill/dreative/skills/immersive.md +61 -223
- package/skill/dreative/skills/interaction.md +9 -1
- package/skill/dreative/skills/media.md +135 -216
- package/skill/dreative/skills/mobile.md +128 -117
- package/skill/dreative/skills/motion.md +89 -229
- package/skill/dreative/skills/refined.md +116 -102
- package/skill/dreative/skills/ux.md +155 -144
- package/dist/server/ai.js +0 -177
|
@@ -1,216 +1,135 @@
|
|
|
1
|
-
# Dreative Specialist Skill — Media as Motion Material
|
|
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
|
-
|
|
128
|
-
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
- **Cursor-torch reveal**: media sits dimmed/blurred/halftoned; a radial mask
|
|
137
|
-
tracking the (damped) cursor reveals it sharp and graded — the flashlight
|
|
138
|
-
over an archive. Pair with a "drag to explore" label.
|
|
139
|
-
- **Melt/liquid exit**: on section leave or route change, UV y-displacement
|
|
140
|
-
grows by a noise column pattern — the image drips out of frame (WebGL), or
|
|
141
|
-
budget version: per-strip translateY with eased random offsets.
|
|
142
|
-
- **Shatter/scatter**: media as an instanced tile grid (WebGL) that explodes
|
|
143
|
-
along scroll velocity and reassembles at rest — the §3 plane system with a
|
|
144
|
-
per-instance offset uniform; cap tiles ≤ 400.
|
|
145
|
-
- **Print develop**: media enters as paper-white → exposure/contrast/duotone
|
|
146
|
-
ramps to full grade (CSS `filter` keyframes or a LUT shader), timed with
|
|
147
|
-
the headline reveal. Photography/portfolio registers.
|
|
148
|
-
|
|
149
|
-
Discipline stays the law: the composed treatment must still clear §5's floors,
|
|
150
|
-
DESIGN.md §6's "one sentence of communication value", and one-signature-
|
|
151
|
-
per-page — an inventive effect stamped on every image is as loud as a marquee
|
|
152
|
-
on every section.
|
|
153
|
-
|
|
154
|
-
## 3. WebGL tier — the media plane (the unseen.co mechanic)
|
|
155
|
-
|
|
156
|
-
When dial ≥ 8 or cinematic/immersive is active, media renders THROUGH the
|
|
157
|
-
canvas so shaders can touch it. The core pattern, in order:
|
|
158
|
-
|
|
159
|
-
1. **Sync planes to DOM rects.** Real `<img>`/`<video>` elements stay in the
|
|
160
|
-
document (a11y, SEO, layout, fallback) but render invisible
|
|
161
|
-
(`opacity: 0`, NOT `display:none` — layout must persist). For each, a
|
|
162
|
-
textured plane in an orthographic/fitted scene copies its
|
|
163
|
-
`getBoundingClientRect()` every scroll/resize (rAF-batched; lerp the
|
|
164
|
-
position for the floaty feel). Texture from `TextureLoader` or
|
|
165
|
-
`new THREE.VideoTexture(videoEl)` (video must be `muted playsinline` and
|
|
166
|
-
playing; `texture.colorSpace = SRGBColorSpace`).
|
|
167
|
-
2. **Distortion in the fragment/vertex shader**, uniforms driven by input:
|
|
168
|
-
- *Hover ripple/lens*: damped `uMouse` + `uHoverStrength` 0→1 spring; UV
|
|
169
|
-
displacement by radial falloff or noise.
|
|
170
|
-
- *Velocity stretch / RGB split*: scroll or drag velocity (from Lenis /
|
|
171
|
-
`useScroll`) → vertex bend + per-channel UV offset, hard-clamped, damped
|
|
172
|
-
decay to zero (cinematic.md §2). Peak effect at a fast flick stays legible.
|
|
173
|
-
- *Transition dissolve*: two textures + noise mask `mix()` for gallery/
|
|
174
|
-
route image swaps (3d.md §4).
|
|
175
|
-
3. **Curved/warped planes**: subtle vertex bend (unseen's floating paper
|
|
176
|
-
sheets) — displace z by a small curve of UV.x + scroll velocity.
|
|
177
|
-
|
|
178
|
-
Rules: ONE media-plane system per page owning all planes (one scene, one rAF —
|
|
179
|
-
never a canvas per image); planes pause syncing when off-screen; the DOM
|
|
180
|
-
element remains the interaction target (click/focus/hover listeners on the DOM,
|
|
181
|
-
effects on the plane); reduced-motion and WebGL-failure both fall back to
|
|
182
|
-
simply un-hiding the DOM media (set `opacity: 1`) — this fallback must be
|
|
183
|
-
wired, not theoretical, and it's the first thing runtime verification checks.
|
|
184
|
-
|
|
185
|
-
## 4. Choosing the treatment (the reasoning frame)
|
|
186
|
-
|
|
187
|
-
Per media element, walk this in one line each — it's the media ledger the plan
|
|
188
|
-
blueprint (PLAN.md §2) captures:
|
|
189
|
-
|
|
190
|
-
1. **Role**: hero atmosphere / product evidence / work-card / texture / story
|
|
191
|
-
beat? Evidence media (screenshots, product photos) gets QUIET treatments —
|
|
192
|
-
curtain reveal, ken-burns; atmosphere media can take the loud/invented ones.
|
|
193
|
-
2. **Tier**: does the page already pay for WebGL? If yes, media planes (§3);
|
|
194
|
-
if no, a DOM treatment (§2) or the DOM construction of a §2.5 invention —
|
|
195
|
-
never add a canvas only to distort one image.
|
|
196
|
-
3. **Entrance / idle / response** per §0, matched to register and dial.
|
|
197
|
-
4. **Failure path**: poster/static version named (reduced-motion, load
|
|
198
|
-
failure, mobile tier).
|
|
199
|
-
|
|
200
|
-
## 5. Floors (every treatment, non-negotiable)
|
|
201
|
-
|
|
202
|
-
- `prefers-reduced-motion`: poster frame / static image, no autoplaying loops,
|
|
203
|
-
no scrub (static end-state). Test by toggling it.
|
|
204
|
-
- Videos: `muted autoplay loop playsinline preload="metadata"` + `poster`;
|
|
205
|
-
pause when off-screen (IntersectionObserver) and on `document.hidden`; no
|
|
206
|
-
audio tracks ever on ambient loops.
|
|
207
|
-
- Loading: explicit `width/height` or `aspect-ratio` on every media box (zero
|
|
208
|
-
CLS); LCP image/poster preloaded, everything below the fold lazy; a media box
|
|
209
|
-
is never blank — poster, dominant-color fill, or blur-up while loading.
|
|
210
|
-
- Hover treatments have focus equivalents; touch gets the tap/visible-default
|
|
211
|
-
story (DESIGN.md §13); media planes and canvases are `pointer-events-none`
|
|
212
|
-
unless they ARE the control.
|
|
213
|
-
- Budgets: one video loop playing per view, ≤ 2-4MB per loop, sequences ≤
|
|
214
|
-
~6MB total, `dpr` capped on media-plane canvases (3d.md §7).
|
|
215
|
-
- Alt text carries voice on images; videos that convey content (not
|
|
216
|
-
atmosphere) get a text alternative nearby.
|
|
1
|
+
# Dreative Specialist Skill — Media as Motion Material
|
|
2
|
+
|
|
3
|
+
## Contract
|
|
4
|
+
|
|
5
|
+
Follow `../references/SKILL_CONTRACT.md`. Dependencies: `ux`, `mobile`; add
|
|
6
|
+
`motion` for animated treatments and `3d` for media planes. Deliver an asset
|
|
7
|
+
manifest, rights/source note, crop/grade/compression work, dimensions/posters,
|
|
8
|
+
responsive treatment, fallback, and runtime evidence. Hard gates remain absolute.
|
|
9
|
+
|
|
10
|
+
Load when `plan.skills` includes `media`, the blueprint generates media, or a
|
|
11
|
+
motion-led page depends on imagery/video. DESIGN.md still governs sourcing,
|
|
12
|
+
semantics, layout, and preservation.
|
|
13
|
+
|
|
14
|
+
## 0. Explore before recipes
|
|
15
|
+
|
|
16
|
+
Read the brief, assets, brand world, doctrine, and this file first. Generate and
|
|
17
|
+
record three original brand-native media concepts in `conceptExploration` before
|
|
18
|
+
opening `../recipes/media-recipes.md`. Recipe access is only for feasibility,
|
|
19
|
+
implementation, performance, fallback selection, or repairing a weak concept;
|
|
20
|
+
record it in `recipeAccess`.
|
|
21
|
+
|
|
22
|
+
Effect names are examples, not a menu. The concept begins with what the media
|
|
23
|
+
means, how the visitor changes its logic, and how that behavior develops through
|
|
24
|
+
the page.
|
|
25
|
+
|
|
26
|
+
## 1. Hard gates
|
|
27
|
+
|
|
28
|
+
- Planned shipped assets exist, are distinct where promised, and visibly render
|
|
29
|
+
(`assets.plannedExist`). Track source/rights, aspect, grade, poster, and use.
|
|
30
|
+
- Media never hides content, intercepts controls, or breaks layout. DOM media
|
|
31
|
+
remains semantic and available when enhancement fails (`content.visible`,
|
|
32
|
+
`spatial.noOcclusion`).
|
|
33
|
+
- Every video/WebGL/sequence treatment has loading, reduced-motion, low-power,
|
|
34
|
+
mobile, and runtime fallbacks (`motion.reducedMotion`,
|
|
35
|
+
`effects.runtimeFallback`).
|
|
36
|
+
- A real organic subject is never approximated with crude coded primitives
|
|
37
|
+
(`3d.noCodedOrganic`). Use a real GLB, photoreal cutout, sourced image, or cut
|
|
38
|
+
the claimed object.
|
|
39
|
+
- Verification uses real artifacts and measurements, not textual claims
|
|
40
|
+
(`verification.realEvidence`).
|
|
41
|
+
|
|
42
|
+
## 2. Baseline media quality
|
|
43
|
+
|
|
44
|
+
Every meaningful asset gets an intentional role: entrance, idle life, visitor
|
|
45
|
+
response, or a documented static/rest purpose. A page of identical fade-plus-
|
|
46
|
+
zoom treatments is the recurring failure this skill exists to prevent.
|
|
47
|
+
|
|
48
|
+
- Edit assets before placement: crop to the blueprint, grade to the palette,
|
|
49
|
+
compress, cut clean loops, create posters, and prepare masks/depth/plates.
|
|
50
|
+
- A treatment claiming to transform an image must consume that image's pixels
|
|
51
|
+
and align to its bounds. A separate shader/noise rectangle floating over a
|
|
52
|
+
static image is decoration, not treatment.
|
|
53
|
+
- Human perception matters: before/after states must visibly change content,
|
|
54
|
+
not merely produce tiny uniform deltas a sampler can detect.
|
|
55
|
+
- Quiet sections are valid and necessary when they create pacing. “Restraint”
|
|
56
|
+
is not permission for an underdesigned whole page.
|
|
57
|
+
|
|
58
|
+
## 3. Evidence-backed defaults
|
|
59
|
+
|
|
60
|
+
Follow the proven default, or outperform it with a named alternative,
|
|
61
|
+
measurable success criteria, and runtime evidence.
|
|
62
|
+
|
|
63
|
+
### Participatory moment (`media.award.participatoryMoment`)
|
|
64
|
+
|
|
65
|
+
At expressive/award ambition, the proven default is one memorable point where
|
|
66
|
+
the visitor moves from observing media to affecting, entering, transforming, or
|
|
67
|
+
controlling its visual logic. For image-led award concepts with depth-capable
|
|
68
|
+
assets, a depth dive is the default because it repeatedly produced a legible
|
|
69
|
+
immersive peak.
|
|
70
|
+
|
|
71
|
+
Valid registered alternatives include decomposition/reassembly, temporal
|
|
72
|
+
scrubbing, physical drag/inertia, refractive exploration, scene-responsive
|
|
73
|
+
media, or a brand-specific transformation of equal perceptual impact. A curtain,
|
|
74
|
+
fade, plain parallax, or rectangle movement alone is not equivalent.
|
|
75
|
+
|
|
76
|
+
### Pixel coverage (`media.award.pixelCoverage`)
|
|
77
|
+
|
|
78
|
+
The proven award default is pixel-class treatment on at least half of hero/key
|
|
79
|
+
images, minimum three, using distinct mechanisms with quiet-class rests. This
|
|
80
|
+
exists because dogfood builds shipped one strong hero while the remaining page
|
|
81
|
+
stayed static.
|
|
82
|
+
|
|
83
|
+
A registered substitution is valid when one coherent media system visibly
|
|
84
|
+
develops through at least three materially different roles or states—for
|
|
85
|
+
example archive sheets becoming a draggable surface, then a tunnel, then a
|
|
86
|
+
final mark. Evidence must make each state obvious.
|
|
87
|
+
|
|
88
|
+
### Perceivability
|
|
89
|
+
|
|
90
|
+
Pixel-class behavior changes the image content: displacement, decomposition,
|
|
91
|
+
reassembly, scrubbed time, refractive feedback, or another brand-native logic.
|
|
92
|
+
Tune it until screenshot/trace pairs are unmistakably different. Zoom, pan,
|
|
93
|
+
opacity, or moving the rectangle are quiet-class behaviors, not pixel-class.
|
|
94
|
+
|
|
95
|
+
## 4. Production and props
|
|
96
|
+
|
|
97
|
+
Prefer, in order: supplied/client assets; generated assets suited to the exact
|
|
98
|
+
section; verified sourced media; clearly labeled placeholders. Generation is
|
|
99
|
+
the start of production, not the finished asset.
|
|
100
|
+
|
|
101
|
+
For isolated props:
|
|
102
|
+
|
|
103
|
+
- reserve a compositional berth that never covers text or controls;
|
|
104
|
+
- use real transparency and verify the matte;
|
|
105
|
+
- grade light direction and contact shadow into the page system;
|
|
106
|
+
- sell dimension with restrained parallax/rotation/scale and readable fallback;
|
|
107
|
+
- reuse the same asset for the same need, never one seed for distinct subjects.
|
|
108
|
+
|
|
109
|
+
For video: muted/autoplay/loop/playsinline when appropriate, real poster, no
|
|
110
|
+
layout shift, pause off-screen/hidden, reduced motion uses the poster.
|
|
111
|
+
|
|
112
|
+
## 5. Media planes
|
|
113
|
+
|
|
114
|
+
Use one scene for multiple DOM-synced media planes. Keep the real DOM image/video
|
|
115
|
+
for semantics and fallback; synchronize its bounding rect and use the same asset
|
|
116
|
+
as the plane texture. Cap DPR, pause off-screen, handle context loss, and reveal
|
|
117
|
+
the DOM source when WebGL fails. A canvas per image and misaligned overlay planes
|
|
118
|
+
are invalid implementations.
|
|
119
|
+
|
|
120
|
+
## 6. Planning and verification
|
|
121
|
+
|
|
122
|
+
The blueprint records asset path/source, purpose, treatment class, driver,
|
|
123
|
+
mobile behavior, fallback, and success criteria. At expressive/award, record the
|
|
124
|
+
page's `creativeStrategy` as diversity or development.
|
|
125
|
+
|
|
126
|
+
Verification records:
|
|
127
|
+
|
|
128
|
+
- asset existence and rendered identity;
|
|
129
|
+
- viewport-aligned effect/image rects;
|
|
130
|
+
- before/after artifacts for perceptual change;
|
|
131
|
+
- sampled shader/particle/frame/drag state where applicable;
|
|
132
|
+
- tested URL, console count, mobile viewport, reduced-motion result;
|
|
133
|
+
- frame time/FPS and transferred asset weight for heavy treatments.
|
|
134
|
+
|
|
135
|
+
Recipe reference: `../recipes/media-recipes.md`, after concept exploration only.
|