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
package/skill/dreative/SKILL.md
CHANGED
|
@@ -1,126 +1,230 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: dreative
|
|
3
|
-
description: Frontend design skill
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Dreative
|
|
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
|
-
|
|
1
|
+
---
|
|
2
|
+
name: dreative
|
|
3
|
+
description: Frontend design skill for substantial UI work, with an optional visual round-trip editor. Use for pages, sections, redesigns, motion, media, interaction, 3D, and visual editing. Direct design is the default.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Dreative
|
|
7
|
+
|
|
8
|
+
Dreative makes the coding agent responsible for design judgment, implementation,
|
|
9
|
+
preservation, and proof. It has no AI runtime of its own.
|
|
10
|
+
|
|
11
|
+
## 1. Choose the mode
|
|
12
|
+
|
|
13
|
+
- **Direct design (default):** plan, edit the real application, and verify it.
|
|
14
|
+
No server, extraction, replica, or wireframe is involved.
|
|
15
|
+
- **Visual round-trip:** use only when the user explicitly asks to open Dreative
|
|
16
|
+
or edit visually. Follow §8.
|
|
17
|
+
|
|
18
|
+
For a tiny isolated change, make the change directly and run the smallest useful
|
|
19
|
+
check. For substantial design work, follow every Direct Design step below.
|
|
20
|
+
|
|
21
|
+
## 2. Read progressively
|
|
22
|
+
|
|
23
|
+
Read this file first, then only the references selected by the plan:
|
|
24
|
+
|
|
25
|
+
1. `PLAN.md` — planning and the section blueprint.
|
|
26
|
+
2. `DESIGN.md` — visual doctrine and redesign/preservation rules.
|
|
27
|
+
3. `references/TIERS.md` — ambition-tier deliverables.
|
|
28
|
+
4. `references/ARTIFACTS.md` — machine-readable plan, preservation, ledger,
|
|
29
|
+
and verification files.
|
|
30
|
+
5. `references/RULES.json` and `references/REFLEX_FONTS.json` — rule categories,
|
|
31
|
+
failure history, bounded substitutions, and reflex font choices.
|
|
32
|
+
6. `frameworks/<name>.md` — the adapter matching the repository.
|
|
33
|
+
7. Each selected `skills/<name>.md`, once.
|
|
34
|
+
8. Only after three original concepts are recorded, load the relevant
|
|
35
|
+
`recipes/<name>-recipes.md` for feasibility, implementation, performance,
|
|
36
|
+
fallback selection, or repair of a weak concept.
|
|
37
|
+
|
|
38
|
+
Detailed doctrine belongs in those references, not in this orchestration file.
|
|
39
|
+
|
|
40
|
+
## 3. Direct Design protocol
|
|
41
|
+
|
|
42
|
+
### 3.1 Discover
|
|
43
|
+
|
|
44
|
+
- Inspect the minimum repository context needed to understand the relevant page,
|
|
45
|
+
framework, styling system, routes, and available media/tooling.
|
|
46
|
+
- For an existing interface, create `.dreative/preservation.json` before edits.
|
|
47
|
+
Include links, handlers, forms, visible copy, states, routes, analytics hooks,
|
|
48
|
+
and accessibility contracts. Every item needs a stable `file` + `needle` that
|
|
49
|
+
`dreative audit` can check mechanically.
|
|
50
|
+
- Read `.dreative/ledger.json` when it exists. Treat it as preference and failure
|
|
51
|
+
history, never as proof that a new request is complete.
|
|
52
|
+
|
|
53
|
+
### 3.2 Plan
|
|
54
|
+
|
|
55
|
+
- Run `PLAN.md` and resolve the transformation depth: restyle, relayout,
|
|
56
|
+
restructure, or reimagine.
|
|
57
|
+
- Resolve one ambition tier: solid, premium, expressive, or award.
|
|
58
|
+
- Explore three genuinely different concepts, commit to one, and record why the
|
|
59
|
+
others were rejected.
|
|
60
|
+
- Classify important rules through `references/RULES.json`: hard gates are
|
|
61
|
+
absolute; evidence-backed defaults remain the proven remedy; creative
|
|
62
|
+
provocations influence exploration rather than becoming shipment quotas.
|
|
63
|
+
- Follow the proven default, or outperform it with a named alternative,
|
|
64
|
+
measurable success criteria, and runtime evidence. Any substitution is
|
|
65
|
+
declared before `implementationStartedAt` in `ruleExceptions`; hard gates
|
|
66
|
+
cannot be substituted.
|
|
67
|
+
- Run one short decision phase containing several sequential single-question
|
|
68
|
+
calls. Use the environment's structured question tool when available;
|
|
69
|
+
otherwise ask in chat. Do not ask about implementation details the agent can
|
|
70
|
+
infer safely.
|
|
71
|
+
- Write `.dreative/plan.json` using `references/ARTIFACTS.md`. For multi-page
|
|
72
|
+
work, show a page × skill matrix: the user can assign treatments to specific
|
|
73
|
+
pages, and approve routing for selected skills left unassigned. Every section
|
|
74
|
+
names its layout family, skills, assets, interactions, mobile translation,
|
|
75
|
+
fallback, and verification criteria.
|
|
76
|
+
- Render a concise `.dreative/plan.md` for the user and for session re-entry.
|
|
77
|
+
|
|
78
|
+
The approved plan is a delivery contract. A section ends as `shipped`,
|
|
79
|
+
`fallback`, or `cut` with a reason—never silently omitted.
|
|
80
|
+
|
|
81
|
+
At `expressive` and `award`, choose one coherent quality path: `diversity`
|
|
82
|
+
(several mechanisms across several drivers) or `development` (one signature
|
|
83
|
+
mechanism evolving through at least three materially different roles, supported
|
|
84
|
+
by two quieter mechanisms). Experimental work explores one non-obvious candidate
|
|
85
|
+
per major section, then selects only the strongest two or three to ship.
|
|
86
|
+
|
|
87
|
+
### 3.3 Select skills
|
|
88
|
+
|
|
89
|
+
Universal foundation: ux and baseline mobile apply to every web page.
|
|
90
|
+
Add treatments from this complete picker:
|
|
91
|
+
|
|
92
|
+
| Skill | Use it for |
|
|
93
|
+
| --- | --- |
|
|
94
|
+
| `refined` | Premium clean business, commerce, photography, and restrained motion |
|
|
95
|
+
| `motion` | Scroll choreography, entrances, parallax, kinetic type, and transitions |
|
|
96
|
+
| `interaction` | Hover craft, magnetic controls, cursor effects, and tactile feedback |
|
|
97
|
+
| `media` | Generated/sourced image and video production, grading, and media treatments |
|
|
98
|
+
| `3d` | WebGL, three.js/R3F, shaders, models, particles, and fallbacks |
|
|
99
|
+
| `immersive` | Persistent scenes, spatial transitions, preloaders, and scroll-as-journey |
|
|
100
|
+
| `cinematic` | Living surfaces, shader grading, gesture exploration, and sound |
|
|
101
|
+
| `experimental` | High-variance composition, material shifts, and unusual provocations |
|
|
102
|
+
| `ux` | Working navigation, forms, states, accessibility, and interaction audits |
|
|
103
|
+
| `mobile` | Mobile-native composition, touch ergonomics, and phone verification |
|
|
104
|
+
|
|
105
|
+
Skill dependencies are additive:
|
|
106
|
+
|
|
107
|
+
- All skills depend on `ux` and `mobile`.
|
|
108
|
+
- `immersive` depends on `motion`, `interaction`, and `media`.
|
|
109
|
+
- `cinematic` depends on `motion`, `interaction`, and `media`.
|
|
110
|
+
- `experimental` depends on `motion`, `interaction`, and `media`.
|
|
111
|
+
|
|
112
|
+
The user's selected skills are authoritative. Routing recommends placement; it
|
|
113
|
+
never silently activates an unselected optional skill. Explicit page assignments
|
|
114
|
+
always win. The planner resolves dependencies and places selected-but-unassigned
|
|
115
|
+
skills across suitable pages for approval. If the user selects all, every skill
|
|
116
|
+
must appear somewhere in the overall plan, but not on every page.
|
|
117
|
+
|
|
118
|
+
### 3.4 Build
|
|
119
|
+
|
|
120
|
+
- Prepare planned media before section implementation. Record each asset and its
|
|
121
|
+
delivery status in the plan.
|
|
122
|
+
- Follow the chosen framework adapter and the repository's established patterns.
|
|
123
|
+
- Preserve the manifest unless the user explicitly approved a change; record
|
|
124
|
+
approved divergence with a reason.
|
|
125
|
+
- Implement blueprint sections in order. Keep the machine plan status current.
|
|
126
|
+
- Do not open recipe catalogs before `conceptExploration` records three
|
|
127
|
+
brand-native concepts. Record every recipe file and load time in `recipeAccess`.
|
|
128
|
+
- A restructure or reimagine rebuilds markup/component boundaries when necessary;
|
|
129
|
+
it is not a stylesheet-only restyle.
|
|
130
|
+
- Every heavy effect ships with its planned reduced-motion, mobile, loading, and
|
|
131
|
+
runtime fallback.
|
|
132
|
+
|
|
133
|
+
### 3.5 Craft
|
|
134
|
+
|
|
135
|
+
Run one dedicated finish pass with no new features:
|
|
136
|
+
|
|
137
|
+
- typography, wrapping, optical alignment, selection, and scrollbar;
|
|
138
|
+
- coherent surfaces, light direction, shadows, and material cues;
|
|
139
|
+
- hover, focus-visible, active, disabled, loading, empty, and error states;
|
|
140
|
+
- media crop, grading, dimensions, posters, and alt text;
|
|
141
|
+
- motion easing, choreography, intent, and reduced-motion behavior;
|
|
142
|
+
- responsive spacing, touch targets, overflow, and spatial integrity.
|
|
143
|
+
|
|
144
|
+
### 3.6 Verify
|
|
145
|
+
|
|
146
|
+
Verification is evidence, not prose asserting that something was checked.
|
|
147
|
+
|
|
148
|
+
1. Run the repository's targeted tests, typecheck, and build.
|
|
149
|
+
2. Run the page and perform the `ux` functional audit.
|
|
150
|
+
3. Verify desktop and approximately 390px mobile.
|
|
151
|
+
4. Check the console, links, forms, keyboard path, states, reduced motion,
|
|
152
|
+
responsive overflow, and pointer hit areas.
|
|
153
|
+
5. For motion/WebGL/video, record runtime evidence and performance numbers.
|
|
154
|
+
6. Reconcile every plan section and asset against what visibly shipped.
|
|
155
|
+
7. Write `.dreative/verify.json` and run `dreative audit`.
|
|
156
|
+
8. Fix every error. Warnings require either a fix or a recorded justification.
|
|
157
|
+
|
|
158
|
+
Every evidence-backed substitution references passing evidence IDs whose proof
|
|
159
|
+
meets its declared success criteria. Vague reasons such as "it did not fit",
|
|
160
|
+
"restraint", "felt better", or "3D was unnecessary" fail audit.
|
|
161
|
+
|
|
162
|
+
The task is complete only when the plan has no `planned` sections, preservation
|
|
163
|
+
passes, verification contains no failing evidence, and `dreative audit` passes.
|
|
164
|
+
|
|
165
|
+
### 3.7 Learn
|
|
166
|
+
|
|
167
|
+
Append one entry to `.dreative/ledger.json` after delivery:
|
|
168
|
+
|
|
169
|
+
- chosen and rejected concepts;
|
|
170
|
+
- user preferences;
|
|
171
|
+
- treatments already used;
|
|
172
|
+
- runtime failures and the fallback they earned.
|
|
173
|
+
|
|
174
|
+
Use this history to avoid repetitive signatures and known-bad approaches on the
|
|
175
|
+
next run. Never store secrets or unrelated user information.
|
|
176
|
+
|
|
177
|
+
## 4. Ambition tiers
|
|
178
|
+
|
|
179
|
+
- **Solid (`solid`):** complete, accessible, responsive product-quality UI.
|
|
180
|
+
- **Premium (`premium`):** strong design read, deliberate media, signature detail, craft pass.
|
|
181
|
+
- **Expressive (`expressive`):** coordinated motion/interaction system with measured fallbacks.
|
|
182
|
+
- **Award (`award`):** distinctive spatial/media system with performance, occlusion, and
|
|
183
|
+
fallback evidence.
|
|
184
|
+
|
|
185
|
+
Higher tiers inherit lower-tier requirements. Do not impose `award`-tier cost on a
|
|
186
|
+
solid or premium request. See `references/TIERS.md` for exact deliverables.
|
|
187
|
+
|
|
188
|
+
## 5. Preservation rules
|
|
189
|
+
|
|
190
|
+
- Preserve behavior, not necessarily placement or markup shape.
|
|
191
|
+
- Stable IDs, routes, handlers, form fields, visible strings, conditional states,
|
|
192
|
+
analytics hooks, and accessibility labels are contractual unless approved.
|
|
193
|
+
- `dreative audit` checks each manifest needle after implementation.
|
|
194
|
+
- Intentional changes require `intentionallyChanged: true` and `changeReason`.
|
|
195
|
+
- A visually successful redesign that loses behavior fails.
|
|
196
|
+
|
|
197
|
+
## 6. Framework adapters
|
|
198
|
+
|
|
199
|
+
Load exactly one primary adapter from `frameworks/` plus `styling.md` when useful.
|
|
200
|
+
Adapters provide technical implementation guidance only; they do not override the
|
|
201
|
+
plan, design doctrine, preservation contract, or verification gates.
|
|
202
|
+
|
|
203
|
+
## 7. Completion report
|
|
204
|
+
|
|
205
|
+
Report:
|
|
206
|
+
|
|
207
|
+
- chosen concept, tier, depth, and skills;
|
|
208
|
+
- each section as shipped/fallback/cut;
|
|
209
|
+
- preservation result;
|
|
210
|
+
- tests and runtime evidence;
|
|
211
|
+
- known limitations and next step.
|
|
212
|
+
|
|
213
|
+
Never claim a check ran unless it actually ran.
|
|
214
|
+
|
|
215
|
+
## 8. Optional visual round-trip
|
|
216
|
+
|
|
217
|
+
Use only when explicitly requested:
|
|
218
|
+
|
|
219
|
+
1. Extract the relevant pages into `.dreative/project.json` and replica files.
|
|
220
|
+
2. Run `dreative baseline`.
|
|
221
|
+
3. Start the editor and service `dreative wait` events.
|
|
222
|
+
4. Supported requests are `propose-skeletons`, `propose-variants`, `edit-block`,
|
|
223
|
+
`design-page`, and `edit-element`. Read `DESIGN.md` and request-selected skills
|
|
224
|
+
before responding.
|
|
225
|
+
5. On the `finish` event, apply the compact diff to the real source using its
|
|
226
|
+
source pointers, then run the same preservation and verification gates as
|
|
227
|
+
Direct Design.
|
|
228
|
+
|
|
229
|
+
The editor is an optional input surface. It never weakens the Direct Design
|
|
230
|
+
quality, preservation, or verification contract.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# Next.js adapter
|
|
2
|
+
|
|
3
|
+
- Preserve App Router/Pages Router conventions already used by the repository.
|
|
4
|
+
- Prefer Server Components; add `"use client"` only at the smallest interactive
|
|
5
|
+
boundary.
|
|
6
|
+
- Keep metadata, loading, error, not-found, route groups, and parallel routes
|
|
7
|
+
intact during redesigns.
|
|
8
|
+
- Use `next/image` with dimensions/sizes and `next/font` when compatible with the
|
|
9
|
+
existing stack.
|
|
10
|
+
- Dynamically import browser-only animation/WebGL with SSR disabled and a real
|
|
11
|
+
poster/skeleton fallback.
|
|
12
|
+
- Do not move data fetching client-side merely to simplify visual implementation.
|
|
13
|
+
- Verify navigation, hydration, production build, and both server/client states.
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# React and Vite adapter
|
|
2
|
+
|
|
3
|
+
- Follow the repository's component boundaries and state-management conventions.
|
|
4
|
+
- Keep page structure semantic; use components for repeated behavior, not every
|
|
5
|
+
visual wrapper.
|
|
6
|
+
- Lazy-load heavy routes and 3D/media systems with `React.lazy` and `Suspense`.
|
|
7
|
+
- Put browser-only effects in guarded effects and clean up listeners, observers,
|
|
8
|
+
timelines, media, and WebGL resources on unmount.
|
|
9
|
+
- Preserve existing providers, route composition, handlers, and test selectors.
|
|
10
|
+
- Use Vite asset imports or `public/` consistently with the host project.
|
|
11
|
+
- Run the repository's typecheck/build and verify the production bundle, not only
|
|
12
|
+
the development server.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# Styling-system adapter
|
|
2
|
+
|
|
3
|
+
- Keep the repository's existing styling system unless migration was explicitly
|
|
4
|
+
approved.
|
|
5
|
+
- For Tailwind, reuse theme tokens and component recipes; avoid unreadable piles
|
|
6
|
+
of one-off arbitrary values.
|
|
7
|
+
- For CSS Modules, colocate component styles and keep global tokens/utilities in
|
|
8
|
+
the established global layer.
|
|
9
|
+
- For CSS-in-JS, preserve SSR extraction and theme providers; avoid per-render
|
|
10
|
+
style object creation in animated paths.
|
|
11
|
+
- For design systems, compose existing primitives before creating replacements.
|
|
12
|
+
- Put durable color, type, spacing, radius, shadow, and motion decisions in tokens.
|
|
13
|
+
- Verify focus-visible, forced colors where relevant, reduced motion, responsive
|
|
14
|
+
overflow, and browser support for advanced CSS.
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# SvelteKit adapter
|
|
2
|
+
|
|
3
|
+
- Preserve load functions, actions, route layouts, error pages, and progressive
|
|
4
|
+
enhancement.
|
|
5
|
+
- Keep browser-only motion/WebGL inside `onMount` and return cleanup functions.
|
|
6
|
+
- Use actions for reusable DOM behaviors and stores/runes according to the
|
|
7
|
+
repository's established version.
|
|
8
|
+
- Preserve form actions, enhancement behavior, bindings, events, and selectors.
|
|
9
|
+
- Avoid turning server data flows into client-only fetches for visual convenience.
|
|
10
|
+
- Verify SSR/hydration, navigation, actions, production build, and mobile states.
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# Vue and Nuxt adapter
|
|
2
|
+
|
|
3
|
+
- Preserve the repository's Composition/Options API convention and component
|
|
4
|
+
contracts.
|
|
5
|
+
- Keep Nuxt layouts, middleware, route metadata, async data, error, and loading
|
|
6
|
+
behavior intact.
|
|
7
|
+
- Put browser-only effects behind `onMounted`/`ClientOnly`; dispose them in
|
|
8
|
+
`onBeforeUnmount`.
|
|
9
|
+
- Prefer scoped components/composables for behavior and semantic templates for
|
|
10
|
+
structure.
|
|
11
|
+
- Preserve emitted events, model bindings, slots, and test selectors.
|
|
12
|
+
- Verify SSR/hydration, production build, navigation, and state transitions.
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# 3D implementation recipes
|
|
2
|
+
|
|
3
|
+
Load only after three original spatial concepts are recorded. Record access in
|
|
4
|
+
`recipeAccess`.
|
|
5
|
+
|
|
6
|
+
## Recognizable product/subject
|
|
7
|
+
|
|
8
|
+
- R3F Canvas loaded dynamically with SSR off.
|
|
9
|
+
- `useGLTF` + preload, Environment/IBL, one key light, contact shadows, bounded
|
|
10
|
+
camera framing, restrained damped parallax/orbit.
|
|
11
|
+
- Poster occupies the final layout while loading and on mobile/low power.
|
|
12
|
+
- Compress GLB with Draco/Meshopt; measure bytes and triangles.
|
|
13
|
+
|
|
14
|
+
## Photoreal cutout billboard
|
|
15
|
+
|
|
16
|
+
- Real transparent image on a plane (`alphaTest` where appropriate).
|
|
17
|
+
- Depth comes from parallax against other layers, restrained perspective
|
|
18
|
+
rotation, contact shadow, rim/fresnel treatment, and optional angle swaps.
|
|
19
|
+
- Verify alpha, matching light temperature, and no sticker-like overlap.
|
|
20
|
+
|
|
21
|
+
## Shader surface
|
|
22
|
+
|
|
23
|
+
- Plane/fullscreen material with `uTime`, damped input, resolution, and palette
|
|
24
|
+
uniforms from the page system.
|
|
25
|
+
- Slow domain-warp/noise, material response, or media-texture transformation;
|
|
26
|
+
never use rainbow cycling or promote a generic blob as the signature.
|
|
27
|
+
|
|
28
|
+
## Points/data structure
|
|
29
|
+
|
|
30
|
+
- BufferGeometry points or instancing; shader-driven position/size/color.
|
|
31
|
+
- Use when data/spatial subject earns it, not as ambient filler.
|
|
32
|
+
- Desktop count measured; mobile halves or posters; pause off-screen.
|
|
33
|
+
|
|
34
|
+
## DOM-synced media
|
|
35
|
+
|
|
36
|
+
- One shared scene, real DOM images/videos retained, planes follow measured
|
|
37
|
+
bounding rects, exact source assets become textures.
|
|
38
|
+
- Context loss/reduced motion reveals DOM media immediately.
|
|
39
|
+
|
|
40
|
+
## Runtime checklist
|
|
41
|
+
|
|
42
|
+
Live context and nonblank draw; asset loaded; texture/material identity; input
|
|
43
|
+
response; reduced-motion still; mobile fallback; context-loss poster; no
|
|
44
|
+
occlusion; capped DPR; frame-time and transferred-weight evidence.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Cinematic implementation recipes
|
|
2
|
+
|
|
3
|
+
Load after three original cinematic concepts are recorded; log the file and
|
|
4
|
+
timestamp in `recipeAccess`.
|
|
5
|
+
|
|
6
|
+
- **Living shader surface:** slow palette-bound domain warp/refraction with
|
|
7
|
+
damped input and graded grain; static poster fallback.
|
|
8
|
+
- **Velocity-reactive media:** exact image/video texture responds to clamped
|
|
9
|
+
scroll/drag velocity and settles crisp at rest.
|
|
10
|
+
- **Drag-to-explore:** bounded/inertial scene or media movement with keyboard
|
|
11
|
+
chapter controls and visible instruction.
|
|
12
|
+
- **Click/hold focus:** hold changes material/camera/audio state; click/tap toggle
|
|
13
|
+
alternative and Escape restores.
|
|
14
|
+
- **Material transition:** same surface masks/dissolves between chapters while
|
|
15
|
+
content remains semantic DOM.
|
|
16
|
+
- **Audio layer:** opt-in ambient bed plus sparse state cues; mute/pause on hidden
|
|
17
|
+
and route cleanup.
|
|
18
|
+
- **Budget path:** pre-rendered seamless video/sequence carries atmosphere while
|
|
19
|
+
DOM interaction and type provide responsiveness.
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# Immersive implementation recipes
|
|
2
|
+
|
|
3
|
+
Load after three world concepts are recorded; log access in `recipeAccess`.
|
|
4
|
+
|
|
5
|
+
- **Persistent stage:** root canvas/DOM stage plus route-published scene states;
|
|
6
|
+
tween between states without remounting the world.
|
|
7
|
+
- **Scroll journey:** tall semantic DOM chapters drive damped camera/material/
|
|
8
|
+
media state; expose chapter navigation and keep copy selectable.
|
|
9
|
+
- **Shared-object transition:** one subject persists while route content exits,
|
|
10
|
+
camera/material moves, then new content enters.
|
|
11
|
+
- **Portal transition:** mask/plane opens into the next state; direct URLs render
|
|
12
|
+
the destination without requiring the transition.
|
|
13
|
+
- **Preloader:** real progress from fonts/models/textures, useful content/fallback
|
|
14
|
+
immediately available, one choreographed handoff.
|
|
15
|
+
- **Mobile translation:** shorter chapters, no long pins, lower scene complexity,
|
|
16
|
+
poster/static spatial composition where necessary.
|
|
17
|
+
- **Fallback:** conventional routes and content remain complete when the stage is
|
|
18
|
+
absent, reduced, or lost.
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# Media implementation recipes
|
|
2
|
+
|
|
3
|
+
Load only after `conceptExploration` records three original concepts. Record the
|
|
4
|
+
load in `recipeAccess`. These constructions solve technical problems; they do
|
|
5
|
+
not choose the concept.
|
|
6
|
+
|
|
7
|
+
## DOM-tier constructions
|
|
8
|
+
|
|
9
|
+
- **Curtain/window:** overflow-hidden frame; animate an inner clip/mask while
|
|
10
|
+
coordinating nearby type. Keep the image semantic and dimensions explicit.
|
|
11
|
+
- **Strip/slice:** duplicate the same asset into clipped strips with staggered
|
|
12
|
+
offsets; cap strip count on mobile and provide an unsliced fallback.
|
|
13
|
+
- **Print/pixel develop:** reveal a preprocessed dither/mosaic state into the
|
|
14
|
+
final image; avoid per-pixel DOM nodes.
|
|
15
|
+
- **Directional hover:** map entry direction or pointer position to a mask;
|
|
16
|
+
expose the same content by tap/focus.
|
|
17
|
+
- **Drag/inertia gallery:** pointer capture + velocity decay + bounds; keyboard
|
|
18
|
+
controls and conventional links remain available.
|
|
19
|
+
- **Frame scrub:** preload a bounded image sequence, draw into one canvas, map
|
|
20
|
+
scroll/time to frame index, and use a poster on reduced motion.
|
|
21
|
+
|
|
22
|
+
## WebGL media plane
|
|
23
|
+
|
|
24
|
+
1. Keep `<img>`/`<video>` in normal DOM flow with semantics and dimensions.
|
|
25
|
+
2. Use its exact asset as the texture and copy its bounding rect to one shared
|
|
26
|
+
scene plane.
|
|
27
|
+
3. Apply brand-native displacement/refraction/decomposition uniforms driven by
|
|
28
|
+
scroll, pointer, drag, or time.
|
|
29
|
+
4. Compare effect and source rects during verification.
|
|
30
|
+
5. On context loss, low power, or reduced motion, reveal the DOM media.
|
|
31
|
+
|
|
32
|
+
Useful families: noise-mask dissolve, UV flow/refraction, velocity smear/RGB
|
|
33
|
+
split, depth-map parallax, point/particle decomposition, slice/shatter,
|
|
34
|
+
feedback/trails, and material-light response. Use the family that develops the
|
|
35
|
+
concept; do not collect one of each.
|
|
36
|
+
|
|
37
|
+
## Participatory constructions
|
|
38
|
+
|
|
39
|
+
- **Depth dive:** separate foreground/background or depth map; camera/UV scale
|
|
40
|
+
crosses the image plane into layered space; reverse cleanly on scroll-back.
|
|
41
|
+
- **Decompose/reassemble:** image samples become particles/tiles and later
|
|
42
|
+
reorganize into a new semantic state.
|
|
43
|
+
- **Temporal scrub:** visitor controls a meaningful change in time, not a
|
|
44
|
+
decorative autoplay loop.
|
|
45
|
+
- **Physical media:** drag, throw, stack, sort, or peel assets with inertia and
|
|
46
|
+
accessible equivalents.
|
|
47
|
+
- **Refractive exploration:** pointer/scroll changes how the visitor sees the
|
|
48
|
+
same asset rather than layering unrelated noise above it.
|
|
49
|
+
- **Scene-responsive media:** media palette, material, crop, or topology reacts
|
|
50
|
+
to a persistent scene instrument.
|
|
51
|
+
|
|
52
|
+
## Performance and fallbacks
|
|
53
|
+
|
|
54
|
+
- Compress responsive images (AVIF/WebP plus safe fallback), define `sizes`, and
|
|
55
|
+
preload only true LCP media.
|
|
56
|
+
- Keep initial heavy media inside the selected tier budget; lazy-load later
|
|
57
|
+
chapters and pause hidden/off-screen work.
|
|
58
|
+
- Cap canvas DPR, reuse buffers/materials, avoid allocations in render loops.
|
|
59
|
+
- Mobile halves complexity or uses a purpose-designed poster/DOM treatment.
|
|
60
|
+
- Fallback preserves the concept's hierarchy even when the mechanism simplifies.
|