dreative 0.5.1 → 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 +45 -9
- 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 +121 -93
- package/skill/dreative/PLAN.md +229 -92
- package/skill/dreative/SKILL.md +218 -137
- 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 -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 +135 -564
- package/skill/dreative/skills/mobile.md +128 -117
- package/skill/dreative/skills/motion.md +89 -256
- 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,149 +1,230 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: dreative
|
|
3
|
-
description: Frontend design skill
|
|
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
4
|
---
|
|
5
5
|
|
|
6
|
-
# Dreative
|
|
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.
|
|
7
202
|
|
|
8
|
-
|
|
203
|
+
## 7. Completion report
|
|
9
204
|
|
|
10
|
-
|
|
11
|
-
- **Mode B — Visual round-trip (only when asked).** The user explicitly wants the visual editor ("open dreative", "let me edit visually"). Flow: **extract → baseline → serve requests → finish → apply** (§0–§4 below). Be token-frugal at every step: read only the files you need, never re-read the whole app, and keep JSON compact.
|
|
205
|
+
Report:
|
|
12
206
|
|
|
13
|
-
|
|
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.
|
|
14
212
|
|
|
15
|
-
|
|
16
|
-
2. **Probe capabilities** (PLAN.md §1): image-gen, video-gen, 3D tooling, browser tools, ffmpeg. Verify by looking — a capability you didn't verify doesn't exist.
|
|
17
|
-
3. **Blueprint** (PLAN.md §2): section-by-section table (layout / media plan / motion / interaction / fallback) BEFORE asking the user anything.
|
|
18
|
-
4. **Questions — one at a time** (PLAN.md §3): AskUserQuestion, ONE question per call; skip what the prompt already answers clearly, re-ask narrowly what's ambiguous. The pool (incl. the treatments picker and its option list) lives in PLAN.md §3.
|
|
19
|
-
5. **Persist the plan** to `.dreative/plan.md` (PLAN.md §4), including the full Q&A transcript and skipped-question inferences.
|
|
20
|
-
6. **Mockups** if the user opted in (PLAN.md §4b): 1:1 visual replicas of the 1–2 highest-impact pages; approval gate before real code.
|
|
21
|
-
7. **Read the doctrine before code**: `DESIGN.md` + each chosen `skills/<name>.md`, ONCE. Run DESIGN.md §2's explore → commit passes (three divergent concepts, rejects recorded in the plan file; consult the choice ledger at `~/.dreative/ledger.md` if it exists). Commit (one line, to yourself) to register + design read + signature element — can't name all three ⇒ you're about to produce the generic default; stop and commit first.
|
|
22
|
-
8. **Assets first** (skills/media.md §1): generate AND edit (grade, crop, loop-cut, poster) every planned asset before section code. Record each in `.dreative/assets.json` (media.md §1) and reuse instead of regenerating.
|
|
23
|
-
9. **Build**: foundation (install + WIRE the animation stack, fonts, tokens, providers) → sections in blueprint order → page-level choreography + signature element. The Hard rules below apply throughout. **After the FIRST page is built, write `.dreative/system.md`** — the committed visual system as actually shipped: color tokens, type roles + sizes, radius rule, spacing base, motion vocabulary (the durations/eases in use), icon set, signature element. Every subsequent page — same session, resumed session, or later edit — reads it before designing; "the first page sets the system" only holds if the system survives context loss as a file.
|
|
24
|
-
10. **Craft pass — one full pass for finish only, no new features.** Top-tier and almost-there are separated by the last 5%, and it never survives being folded into the build step. Sweep and fix: (a) **easing audit** — every animation uses the build's motion signature (motion.md §5.5); grep for unexamined `ease`/default/`linear` and replace; (b) **surface audit** — every major surface passes DESIGN.md's surface & light doctrine (material cue present, one light direction, tinted shadows, no banding); (c) **state completeness** — every interactive element has designed hover, focus-visible, and active states (no browser defaults, no dead hovers); (d) **type finish** — `text-wrap: balance` on headlines, no orphan words in heroes, optical alignment of numerals/quotes, real `::selection` color, themed scrollbar where the register supports it; (e) **media finish** — every image/video sits at correct aspect with no CLS, posters graded to match the page, `alt` text real; (f) **the quiet check** — anything moving without a reason to (motion on task-flow surfaces: forms, checkout, dense data) gets stilled; clean-when-needed is part of craft, not a lesser mode. List what the pass changed in verify.md under `craft:`.
|
|
25
|
-
11. **Verify and write `.dreative/verify.md`** (§V). You may not declare done until that file exists with real evidence.
|
|
26
|
-
12. **Append the choice ledger**: one line to `~/.dreative/ledger.md` (DESIGN.md §2 — date · project · fonts · palette strategy · signature type · hero concept; create the file if missing).
|
|
27
|
-
13. **Report** against the plan — each blueprint row shipped / fallback / cut with reason — and close with the one editor tip: *"Tip: run `dreative start` / say 'open dreative' if you want to tweak this visually."* That's the only place the editor comes up.
|
|
213
|
+
Never claim a check ran unless it actually ran.
|
|
28
214
|
|
|
29
|
-
|
|
215
|
+
## 8. Optional visual round-trip
|
|
30
216
|
|
|
31
|
-
|
|
32
|
-
- **Depth honesty** (DESIGN.md §11): a confirmed restructure/reimagine rebuilds markup, component trees, and routing for real — never just restyles the old skeleton.
|
|
33
|
-
- **Real motion engineering** (skills/motion.md): chosen motion/3d/immersive/cinematic treatments ship with the proper libraries (GSAP + ScrollTrigger, Lenis, `motion/react`, three.js/R3F) — dependencies actually installed (`npm i gsap lenis` …), providers/render loops wired, choreography built. A static page with a few CSS transitions does not fulfill a motion request; the shipped result must clear motion.md §9's inventory.
|
|
34
|
-
- **No static media** (skills/media.md §0): a bare `background-image` or `<img>` behind text is a failure — every image/video gets an entrance/idle/response treatment (reveal, dissolve, pixel-develop, hover-wake, media plane…) and is edited/graded to the page before shipping. At award-site ambition, media planes with scroll-driven shader response are MANDATORY for hero + key gallery imagery (media.md §3). Generated media per DESIGN.md §7 — hero imagery, textures, seamless video loops woven into the motion system — is among the highest-impact upgrades available.
|
|
35
|
-
- **No coded organic 3D** (skills/3d.md §3): never model a real-world organic/textured object from primitives — realistic 3D subjects use a real GLB or a cutout image billboard (generated, or a sourced/matted photo when no image-gen tool exists); coded geometry is for abstract forms only and must carry real texture maps (generated, sourced, or procedural-shader). This ban is tool-independent: a missing image-gen MCP means the organic 3D element gets CUT or replaced (3d.md §3 rung 4), never coded from primitives.
|
|
36
|
-
- **References are studied, never guessed.** Screenshots/images → read with image tools, extract palette/type/layout/motion cues. URLs → fetch (browser tools or web fetch; look at real script/font/class evidence). Videos → watch only if tooling allows (PLAN.md §3's optional video-MCP offer); otherwise work from the user's description and say so.
|
|
217
|
+
Use only when explicitly requested:
|
|
37
218
|
|
|
38
|
-
|
|
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.
|
|
39
228
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
*Stage 1 — runtime gates (functional).* Run the app with browser tools and prove the page WORKS: (a) **console clean** — zero uncaught errors/unhandled rejections while loading, scrolling the full page, and interacting; (b) **effects provably running** — if WebGL shipped, the canvas has a live context and draws (not black/blank); if animations shipped, sample a moving element's transform twice ~500ms apart and confirm it changes (record both values in verify.md), and confirm scroll triggers fire at their positions — **but for image/media elements at dial ≥ 6, a sample whose only delta is uniform scale, translate, or opacity is NOT treatment evidence: that pattern IS the banned ken-burns/fade floor (media.md §0). Media evidence must name the mechanism and show it changing — clip-path/mask values mid-scroll, diverging parallax-layer offsets, a sampled shader uniform, a hover-response property — one line per hero/key image in verify.md, and a page whose per-image lines are all scale/opacity deltas fails item 10 below**; if video shipped, confirm `!video.paused` and the poster shows pre-play; (c) **interaction smoke test** — run `skills/ux.md` §7's functional audit (click nav links, open/close the mobile menu, submit a form invalid+valid, tab through, hit-test controls inside effect-heavy regions); (d) the mobile pass per `skills/mobile.md` §5 when mobile shipped; (e) **performance gate** (whenever WebGL, video, or heavy scroll choreography shipped — always at award-site ambition): scroll the full page and watch for stutter — sample `requestAnimationFrame` deltas for a few seconds of scrolling (via the console/javascript tool) and flag sustained frames > 33ms; check total transferred weight against the tier budget (~3–5MB initial at award-site, less below); record both numbers in verify.md. A janky award-site is worse than a smooth expressive one — jank routes to the same failure doctrine as a broken effect (fix, tier down per DESIGN.md §13's tiering, or ship the planned fallback). **Failure doctrine:** any effect that fails a runtime gate is fixed or replaced with its planned fallback (PLAN.md §2) before done — never shipped broken, never silently removed; verify.md and the final report name what fell back and why.
|
|
43
|
-
|
|
44
|
-
*Stage 2 — visual self-critique.* Screenshot at ~390px mobile AND desktop — **one desktop screenshot PER blueprint section** (scrolled to each, saved to `.dreative/screenshots/`; a section without a screenshot is unverified, and mid-page sections are where traveling objects park on text), plus, if any persistent/traveling scene object shipped, an **occlusion sweep**: step the scroll 0→100% in ~10 increments and at each stop check the object against every visible headline/paragraph/control (screenshot or bounding-rect intersection via the console — `getBoundingClientRect` overlap between the object and text nodes; `pointer-events:none` does not excuse visual coverage). Any stop where decor covers words fails DESIGN.md §15's travel-map rule: fix the object's scripted berth, then re-sweep. Then grade the screenshots against this rubric — (1) would a stranger name the brand's register and audience from one glance? (2) does it pass DESIGN.md §2's slop tests *as rendered* (not as intended)? (3) is the signature element actually visible, working, and honoring its commit mini-spec (right driver, brand-native — not swapped for a generic effect mid-build)? (4) spatial integrity per DESIGN.md §15 — scan for anything overlapping anything else: controls covered, rows/text clipped at an edge, floating widgets fighting for a corner, fixed bars hiding content; overlap failures outrank aesthetic ones — fix them first? (4b) any contrast failure, unloaded font/image, or motion jank? (5) does mobile hold up per DESIGN.md §13? (6) preservation ledger clean — every link, action, form field, text string, and tab/modal/state from the manifest present or logged as intentional? (7) if motion treatments were chosen: are the animation libraries actually installed and imported, and can you name ≥3 specific shipped animations (element + trigger + duration) visible in the running page? (8) if generated media shipped: posters present, loops playing, treatments wired per `skills/media.md` §5's floors? (9) **object honesty** — screenshot every custom 3D element and ask: would a stranger name it as the real object it claims to be (a coffee bean, a bottle), or does it read as an untextured blob/primitive? A blob FAILS: replace it with the cutout-billboard rung of 3d.md §3 (or cut it) before done. This check is answered with MECHANICAL evidence, not adjectives: quote the material line from the scene code in verify.md and confirm it carries a texture map or custom shader (3d.md §3's texture test) — writing "textured/physical/sculptural roast core" over a flat-color primitive is self-deception the screenshot won't argue with, and the subject test goes by what the plan/copy says the element represents, not what the code names it. Passing the texture test does NOT save an abstract signature: if the page's promoted signature object is a coded sphere/orb/blob/torus (3d.md §3 — abstract forms are supporting-only), it fails here however well-shaded, and especially if it floats over a photograph; replace it with a recognizable rung-1/rung-2 subject or demote it to background atmosphere before done. Also check STAGING (3d.md §1.5): does every 3D prop sit in its planned berth — and does any prop's bounding rect overlap a photograph/media element without being genuinely composited into it (matched light + cast shadow)? A prop floating over other imagery, or with no reserved berth in the plan, fails here. At award-site ambition also confirm the REQUIRED prop shipped (3d.md §0): at least one recognizable dimensional object (GLB or cutout billboard) with its dimensional behaviors provably running — a page with zero real-looking props, or only a shader background, fails the tier. (10) at motion dial ≥ 6 / expressive ambition and up: do hero + key section images each have a scroll- or cursor-DRIVEN treatment (media.md §0's zoom/fade-floor rule) — fade-in + ken-burns everywhere fails, sourced/stock images included; at dial ≥ 7 additionally: does the planned media SET-PIECE (media.md §0 — tornado/vortex, disintegration, shatter, living overlay…) provably run (named element + driver + evidence), and at dial ≥ 8 is it PIXEL-transforming per media.md §0 (sampled uniform/particle count/frame index changing with scroll — rectangle choreography like orbit/collapse does not qualify)? A page of uniformly quiet treatments with no set-piece fails; at award-site ambition additionally: is at least one image provably a scroll-reactive media plane (media.md §3's sampled-uniform evidence in verify.md), and does the page meet media.md §0's PIXEL-class coverage floor — tally every hero/key image in verify.md as quiet-class or pixel-class with its named mechanism: at dial ≥ 8 at least half (minimum 3, set-piece included) must be pixel-class, each a different mechanism, quiet ones justified as intensity-curve rests? One set-piece + curtains everywhere else fails the tally. All images flat/static ⇒ the tier is not met. Each pixel-class entry also passes media.md §0's PERCEIVABILITY bar with screenshot-pair evidence: capture the element at two scroll/input states (save both to `.dreative/screenshots/`, reference the pair in verify.md) and confirm the image's CONTENT differs unmistakably between them — pieces apart, pixels displaced, particles detached; a pair a stranger would describe as "it zoomed/slid" is a FAIL however the uniforms moved (raise amplitude or swap mechanism, then re-shoot). Confirm the tally spans more than one mechanism FAMILY (all-depth or all-particles is monotone — media.md §0's choice disciplines), that the set-piece family differs from the previous build's per the choice ledger, and shoot the same two-state pair for the required 3D prop's motion. If a second set-piece shipped, confirm its stated purpose, different family, and the rest between them. (11) **wholeheartedness, dial ≥ 7 / expressive+** — re-count PLAN.md §2's mechanism-diversity quota against what actually SHIPPED (≥4 distinct mechanisms, ≥3 distinct drivers, none used more than twice; tallies in verify.md); confirm plan.md records the entropy draw (literal command + output) and the rolled provocation is visibly on the page, not token-gestured; then name the THREE moments a visitor would screenshot or describe to someone — if you can't name three, the page is compliant, not designed: build them before done. A build where every media/motion item sits exactly at its rule's minimum is a failed build at this tier — floors are where fallbacks land, never where designs aim. Fix what fails and re-check once; grades go in verify.md.
|
|
45
|
-
|
|
46
|
-
*Stage 2b — comparative critique (expressive/award-site ambition).* Rubrics catch rule-breaks; they can't measure taste. Put the desktop screenshot next to the closest reference actually studied for this build — the user's reference if one was given, else the nearest calibration site from PLAN.md §3 (fetch/screenshot it now if browser tools exist) — and name the THREE biggest gaps between yours and theirs (type confidence, spacing rhythm, motion cohesion, image quality, compositional courage…). Fix what's fixable in this pass; log each gap + action (fixed / accepted with reason) in verify.md. "No meaningful gaps" is almost never the honest answer — finding none means look harder.
|
|
47
|
-
|
|
48
|
-
*§9 hard gate (expressive/award-site ambition).* motion.md §9's shipped-motion inventory is a completion gate, not a checklist: for the chosen dial, every inventory item must be either PROVEN running by Stage 1 (named element + trigger + evidence in verify.md) or logged in verify.md as a deliberate cut with the reason. An item that is merely absent — no evidence, no cut-reason — means the task is NOT done: build it (or its PLAN.md fallback), then re-verify; never report done with an unexplained §9 gap. Grade the mobile pass against the shifted dial (mobile.md maps desktop dial N to mobile N−2), not the desktop inventory.
|
|
49
|
-
|
|
50
|
-
If you cannot run the app or screenshot (no browser available), say so explicitly and degrade honestly: walk the rendered DOM/CSS mentally against both stages' rubrics, grep for the runtime-gate evidence (imports wired, providers mounted, pointer-events on overlay layers, fallback branches present), and record in verify.md which gates could NOT be verified — never silently skip the pass.
|
|
51
|
-
|
|
52
|
-
## Doctrine (applies to BOTH modes)
|
|
53
|
-
|
|
54
|
-
**Design quality is a hard requirement.** `DESIGN.md` (same folder as this file) is the design doctrine. Read it ONCE before servicing the first `propose-skeletons`, `propose-variants`, `design-page`, or `edit-element` request, keep it in mind for all later ones, and run its pre-flight checklist (§12) before every respond. Requests may carry a `brief` object (aesthetic preset + vibe + dials set by the user in the UI); when present it is the user's explicit direction and overrides doctrine defaults. Before writing any `design-page` code, state (to yourself, one line) the register, the design read, and the signature element — if you cannot name all three, you are about to produce the generic default; stop and commit first.
|
|
55
|
-
|
|
56
|
-
**Specialist skills.** The `skills/` folder next to this file holds expert playbooks for advanced work: `motion.md` (animation & scroll choreography), `3d.md` (WebGL/three.js/shaders), `interaction.md` (micro-interactions & effect craft), `immersive.md` (award-site worlds, spatial page transitions, scroll-as-journey), `cinematic.md` (dark shader-graded experiential interfaces: fluid/particle surfaces, drag-to-explore, click & hold, sound design — opt-in aesthetic), `refined.md` (premium clean business/DTC/e-commerce: restraint, photography, whitespace — the calm pole), `media.md` (generated images/video as motion material: production pipeline, DOM and WebGL media treatments, media planes), `ux.md` (the working-page contract: nav, forms, states, keyboard, pointer-events audit — load for any product-register page), `mobile.md` (mobile as a first-class surface: calm-premium motion translation, ergonomics, mobile verification). All are universal: they apply directly to any codebase in Mode A; the editor is never required. When a request's `plan.skills` lists names, read each listed `skills/<name>.md` ONCE before writing code (then keep it in mind, like DESIGN.md); when `plan.sections[].skills` tags a section, that section gets that treatment (e.g. "this hero has 3d"). If the brief/prompt clearly calls for one of these but the plan missed it, read it anyway. If a listed file isn't installed, proceed on DESIGN.md alone and note it to the user (`dreative install-skill` installs all).
|
|
57
|
-
|
|
58
|
-
Everything below describes Mode B.
|
|
59
|
-
|
|
60
|
-
## 0. Setup
|
|
61
|
-
|
|
62
|
-
Requires `dreative` on PATH (`npm i -g dreative` or `npx dreative`). All commands run from the user's project root. State lives in `.dreative/` (paths in payloads are relative to `.dreative/`).
|
|
63
|
-
|
|
64
|
-
## 1. Extract (code → layout + replica)
|
|
65
|
-
|
|
66
|
-
Goal: replicate the app's current UI **view-by-view** so the user recognizes every screen. Do this **one page at a time** — find the routes/pages first (router config, pages/ dir, app/ dir), then open only each page's component files. **Single pass per page:** while the source is in front of you, produce all three outputs at once (layout JSON, replica file, summaries) — never revisit a file for a second output.
|
|
67
|
-
|
|
68
|
-
**One Dreative page per VIEW, not per route file.** If a route renders mutually-exclusive views — tab panels, admin vs viewer modes, auth states, wizard steps, a modal that fills the screen — each view becomes its own Dreative page. A page's layout must show exactly what the user sees at one moment; never stack multiple tab panels' content into one layout. Name split views `"<Screen> — <View>"` (e.g. "Admin Studio — Library", "Admin Studio — Ranking Board"), give them the same `source`, the same `group` (e.g. `"group": "Admin Studio"`), and cluster them on the canvas. Shared chrome (header, tab bar) repeats in each view's layout, with the active tab noted in its `text`.
|
|
69
|
-
|
|
70
|
-
**Expose hidden UI.** UI that exists but isn't visible by default must still surface, or the user gets a wrong picture of their app:
|
|
71
|
-
- *Full-screen or view-sized* hidden UI (modals, dialogs, drawers, overlay panels with real content) → its own Dreative page, grouped with its parent screen (e.g. "Library — Edit Show modal").
|
|
72
|
-
- *Small* hidden UI (dropdown menus, tooltips-with-actions, hover-revealed buttons, expandable rows) → model it as a block **inside its trigger's parent**, labeled for what it is (e.g. label "Sort dropdown (opens on click)"), with a `summary` saying when it appears. Don't invent open-state visuals in the replica — the replica shows the default state; the layout is where hidden things are enumerated.
|
|
73
|
-
|
|
74
|
-
**Fidelity is the whole point.** The wireframe and replica must be recognizable as *that* page at a glance. Model every visible major section in order — hero/banner, search+filter bars, stat/KPI rows, each shelf/carousel with its cards, footers. A real page with 8 visible sections must yield ~8 top-level children, not 3 generic boxes. Card grids get realistic counts (a shelf showing 7 posters → a card-grid the user reads as a row of posters, with real show titles in `text`). Before moving on, self-check: *would the user, seeing only this wireframe, name which page of their app it is?* If not, you under-extracted — fix it before the next page.
|
|
75
|
-
|
|
76
|
-
Per page, produce:
|
|
77
|
-
|
|
78
|
-
1. **Layout** — the block tree in `project.json` (schema below).
|
|
79
|
-
2. **Replica** — `.dreative/replica/<pageId>.tsx`: a stripped, non-functional **1:1 visual copy** of the real page. Single file, default export, no imports beyond react, Tailwind classes (translate other styling to Tailwind or inline styles). Strip everything behavioral: no handlers, no hooks, no data fetching; replace dynamic state/props with representative literal values (the ones a real user would see). It only needs to LOOK identical, not work. Every block id from the layout appears as `data-dreative-id="<id>"` on the matching element. Set `replicaFile` on the page.
|
|
80
|
-
3. **Summaries** — on each meaningful block, `summary`: one plain line of what it shows or does ("Submits the signup form and redirects to /dashboard", "Lists the 6 most recent orders from the API"). These render as hover tooltips in the replica so the user understands behavior without you re-reading code later, and they are your own re-entry notes at apply time. Keep each under ~120 chars.
|
|
81
|
-
|
|
82
|
-
Write `.dreative/project.json`:
|
|
83
|
-
|
|
84
|
-
```json
|
|
85
|
-
{ "version": 1, "brief": { "aesthetic": "minimal", "vibe": "", "audience": "", "variance": 7, "motion": 5, "density": 4, "notes": "" }, "pages": [ {
|
|
86
|
-
"id": "pg_home", "name": "Home", "canvasPos": {"x": 40, "y": 40},
|
|
87
|
-
"theme": { "bg": "#0d0d0f", "fg": "#e8e8ea", "accent": "#f59e0b" },
|
|
88
|
-
"status": "skeleton", "source": "src/pages/Home.tsx",
|
|
89
|
-
"layout": { "id": "blk_root", "type": "section", "label": "Home", "direction": "column", "children": [ … ] }
|
|
90
|
-
} ] }
|
|
91
|
-
```
|
|
92
|
-
|
|
93
|
-
(page objects also take `"replicaFile": "replica/pg_home.tsx"` and `"group": "Admin Studio"` for split views of one screen)
|
|
94
|
-
|
|
95
|
-
Block: `{ id, type, label, text?, summary?, direction?, sizeHint?, source?, children? }`
|
|
96
|
-
- `type`: section | row | column | nav | hero | card-grid | list | form | footer | text | image | button
|
|
97
|
-
- `label`: short recognizable name (shown on hover/inspector).
|
|
98
|
-
- `text`: the **actual visible copy** (heading text, button caption, first ~80 chars of a paragraph) — set it on every text/button/hero leaf; it renders verbatim in the wireframe so the user recognizes the page.
|
|
99
|
-
- Page `theme` `{bg, fg, accent}`: pull the real CSS colors (page background, main text color, brand accent) so the wireframe card matches the app's look. Set it on every page.
|
|
100
|
-
- `source`: the real file that owns this block (component path). Set it on every block whose owner differs from its parent's — this is what lets you apply the diff later without re-searching.
|
|
101
|
-
- Keep depth sensible (3–5 levels); every meaningful visible element should exist, but don't model every span.
|
|
102
|
-
- Ids must be unique and stable; prefix `pg_`/`blk_` plus a slug.
|
|
103
|
-
- Space pages on the canvas: x += 480 per page.
|
|
104
|
-
- Top-level `brief` is optional at extraction time (the user edits it in the UI); if the app has an obvious existing aesthetic, seed it so redesigns preserve the brand.
|
|
105
|
-
|
|
106
|
-
Then snapshot the baseline: `dreative baseline` (start the server first, step 2, if not running).
|
|
107
|
-
|
|
108
|
-
## 2. Launch
|
|
109
|
-
|
|
110
|
-
```
|
|
111
|
-
dreative start # serves http://localhost:4820, opens browser (background this)
|
|
112
|
-
```
|
|
113
|
-
|
|
114
|
-
Tell the user the UI is open: they can view the **Replica** tab (1:1 copy of their real page, hover shows your summaries), drag elements in **Layout**, add/remove blocks, set the **Design brief** (preset + dials), attach reference images and prompts, hit **🎨 Design all**, and click **Finish** when done.
|
|
115
|
-
|
|
116
|
-
## 3. Service requests (the wait loop)
|
|
117
|
-
|
|
118
|
-
Repeat until finish:
|
|
119
|
-
|
|
120
|
-
```
|
|
121
|
-
dreative wait # blocks up to ~8 min; prints ONE event as JSON
|
|
122
|
-
```
|
|
123
|
-
|
|
124
|
-
- `{"kind":"none"}` → just run `dreative wait` again.
|
|
125
|
-
- `{"kind":"request","id","type","payload"}` → handle per table below, then
|
|
126
|
-
`dreative respond <id> <resultFile>` (write the result JSON to a temp file) or `dreative respond <id> --error "why"`.
|
|
127
|
-
- `{"kind":"finish","diff":…}` → go to step 4.
|
|
128
|
-
|
|
129
|
-
| type | payload | result to respond with |
|
|
130
|
-
|---|---|---|
|
|
131
|
-
| `propose-skeletons` | `{prompt, brief?}` | Array of 1–3 `{name, layout}` page proposals (block schema above), structured per DESIGN.md layout rules |
|
|
132
|
-
| `propose-variants` | `{pageName, layout, brief?}` | Array of 1–3 `{name, layout}` variants |
|
|
133
|
-
| `edit-block` | `{block, instruction}` | The updated block JSON (same id) |
|
|
134
|
-
| `design-page` | `{pageName, layout, brief?, plan?, refImage?, blockRefs, designPrompt?, previousFile?, siblingPages, outFile}` | Write a single-file React+Tailwind component (default export, no imports beyond react) to `.dreative/<outFile>`; every block id in layout must appear as `data-dreative-id="<id>"`. **`plan` is Dreative's pre-computed design decision — execute it, don't re-decide:** it carries resolved dials, a layout family per section (`plan.sections`, sections may carry `skills` tags like `["3d"]`), spacing/motion budgets (`plan.directives`), doctrine violations to fix (`plan.lints`), and required specialist skills (`plan.skills` → read `skills/<name>.md` first). DESIGN.md still governs everything the plan doesn't specify. Read `refImage`/`blockRefs[].refImage` (paths under `.dreative/`) with your image tools; if `previousFile` set, read it and preserve prior element edits. Respond `{"ok":true}` |
|
|
135
|
-
| `edit-element` | `{file, elementId, instruction, refImage?}` | Edit `.dreative/<file>` in place, only the element with `data-dreative-id=elementId`, keeping DESIGN.md rules intact. Respond `{"ok":true}` |
|
|
136
|
-
|
|
137
|
-
A "Design all pages" click in the UI arrives as one `design-page` request per page, back to back: keep visual consistency across them (same accent, type scale, radius system — the first page you design sets the system for the rest). Persist that system to `.dreative/system.md` after the first page and re-read it before each later page or `edit-element`, so consistency survives session boundaries.
|
|
138
|
-
|
|
139
|
-
Token rules: only read ref images when a request names them; never dump whole files into responses; for edits, edit files directly instead of returning code.
|
|
140
|
-
|
|
141
|
-
## 4. Apply (finish)
|
|
142
|
-
|
|
143
|
-
The finish event's `diff` (also saved at `.dreative/finish.json`) contains only what changed vs the baseline:
|
|
144
|
-
|
|
145
|
-
- `pagesAdded` — full layouts; create real pages/components for them.
|
|
146
|
-
- `pagesRemoved` — confirm with the user before deleting real code.
|
|
147
|
-
- `pagesChanged` — per page: `blocksMoved` (reorder in the source), `blocksAdded`, `blocksRemoved`, `blocksChanged` (only differing props listed; `refImage` = style reference to match, `intents` = behavior notes), plus page-level `refImage`/`designPrompt`.
|
|
148
|
-
|
|
149
|
-
Use each block's/page's `source` pointer to open **only the owning files**, and each block's `summary` to recall what an element does **without re-reading unrelated code**. Read annotated ref images now (paths relative to `.dreative/`). Make the real code match the final layout and annotations, run the project's checks, and summarize what you changed.
|
|
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.
|