dreative 0.3.2 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli/index.js +1 -1
- package/package.json +1 -1
- package/skill/dreative/DESIGN.md +85 -3
- package/skill/dreative/PLAN.md +143 -0
- package/skill/dreative/SKILL.md +10 -3
- package/skill/dreative/skills/3d.md +24 -1
- package/skill/dreative/skills/cinematic.md +10 -3
- package/skill/dreative/skills/immersive.md +5 -2
- package/skill/dreative/skills/interaction.md +3 -0
- package/skill/dreative/skills/media.md +216 -0
- package/skill/dreative/skills/mobile.md +117 -0
- package/skill/dreative/skills/motion.md +9 -2
- package/skill/dreative/skills/refined.md +5 -2
- package/skill/dreative/skills/ux.md +144 -0
package/dist/cli/index.js
CHANGED
|
@@ -107,7 +107,7 @@ async function main() {
|
|
|
107
107
|
fs.writeFileSync(agentsMd, stripped + pointer);
|
|
108
108
|
}
|
|
109
109
|
console.log(`installed skill to ${destDir}${forCodex ? " (Codex mode: AGENTS.md pointer added)" : ""}`);
|
|
110
|
-
console.log(` core: SKILL.md, DESIGN.md`);
|
|
110
|
+
console.log(` core: SKILL.md, DESIGN.md, PLAN.md`);
|
|
111
111
|
console.log(` specialist skills: ${picked.length ? picked.join(", ") : "(none)"}`);
|
|
112
112
|
console.log(`next: ask your coding agent to "open dreative" or "redesign my app's UI visually"`);
|
|
113
113
|
return;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dreative",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"description": "Layout-first visual editor skill for coding CLIs: extract your app's UI into editable wireframes, tweak with drag-drop + ref images, then the agent applies the diff back to your code.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
package/skill/dreative/DESIGN.md
CHANGED
|
@@ -6,7 +6,8 @@ because LLM-designed UIs converge on one templated look. Every rule corrects a k
|
|
|
6
6
|
model default; none is a suggestion. Requests may carry a `plan` (Dreative's
|
|
7
7
|
pre-computed decision: dials, per-section layout families, budgets, lints) — execute
|
|
8
8
|
the plan, apply this doctrine to everything the plan doesn't specify. When
|
|
9
|
-
`plan.skills` names specialist skills (`motion`, `3d`, `interaction`
|
|
9
|
+
`plan.skills` names specialist skills (`motion`, `3d`, `interaction`, `immersive`,
|
|
10
|
+
`cinematic`, `refined`, `media`, `ux`, `mobile`), the matching
|
|
10
11
|
`skills/<name>.md` files extend this doctrine for that request — read them first;
|
|
11
12
|
where they go deeper than a section here, they win.
|
|
12
13
|
|
|
@@ -313,6 +314,11 @@ capability found as a first-class design material, not a nice-to-have:
|
|
|
313
314
|
the client's actual photography when those exist.
|
|
314
315
|
- If no generation capability exists, say so and fall back down the §7 priority
|
|
315
316
|
list — never fake a video with a div animation.
|
|
317
|
+
- `skills/media.md` is this section's deep dive: the production pipeline
|
|
318
|
+
(prompting for the page's light, compression targets, frame sequences), the
|
|
319
|
+
full DOM-tier and WebGL media-plane treatment vocabulary, and the
|
|
320
|
+
entrance/idle/response reasoning frame. Read it whenever generated media or
|
|
321
|
+
motion-integrated imagery ships.
|
|
316
322
|
|
|
317
323
|
## 8. Content and copy
|
|
318
324
|
|
|
@@ -342,7 +348,10 @@ tactile press (`scale-[0.98]`). Same button shape, form vocabulary, and icon sty
|
|
|
342
348
|
on every screen — if "save" looks different in two places, one is wrong. Modals are
|
|
343
349
|
usually laziness; exhaust inline/progressive first. Dropdowns escape
|
|
344
350
|
overflow-hidden ancestors via popover API/position-fixed/portal. Touch targets
|
|
345
|
-
≥ 44px. Never disable zoom.
|
|
351
|
+
≥ 44px. Never disable zoom. This section is the floor; `skills/ux.md` is the
|
|
352
|
+
full working-page contract (nav that resolves, forms that submit, all states
|
|
353
|
+
reachable, keyboard walk, the pointer-events audit) — load it for any
|
|
354
|
+
product-register page and any redesign touching navigation, forms, or state.
|
|
346
355
|
|
|
347
356
|
## 10. Banned AI tells (match-and-refuse)
|
|
348
357
|
|
|
@@ -510,11 +519,27 @@ the output is not done.
|
|
|
510
519
|
conditional state verified present (or logged as intentional) in the new
|
|
511
520
|
code; preservation ledger reported. If motion skills were chosen, the
|
|
512
521
|
implemented animations are named and present in the code.
|
|
522
|
+
17. Spatial integrity (§15): every positioned/fixed element has an anchor and
|
|
523
|
+
reserved space; no interactive element overlaps another at 320/768/1280;
|
|
524
|
+
one occupant per overlay corner; overflow-capable rows wrap or scroll
|
|
525
|
+
inside their container (nothing clips at a viewport edge); animation
|
|
526
|
+
end-states and parallax extremes collide with nothing; decoration layers
|
|
527
|
+
are pointer-events-none below content.
|
|
528
|
+
18. Runtime gate (Mode A, whenever motion/3d/media/interactive treatments
|
|
529
|
+
shipped): console clean while loading + scrolling + interacting; every
|
|
530
|
+
shipped effect provably runs (canvas draws, transforms change, videos
|
|
531
|
+
play); ux.md §7's functional audit passes (nav, menu, forms, tab walk,
|
|
532
|
+
hit-tests); failed effects replaced by their planned fallback (PLAN.md),
|
|
533
|
+
never shipped broken. If no browser is available, the ungated items are
|
|
534
|
+
reported to the user by name.
|
|
513
535
|
|
|
514
536
|
## 13. Mobile & touch adaptation (how ambitious effects degrade)
|
|
515
537
|
|
|
516
538
|
Ambitious designs die on phones first. Every effect gets an explicit mobile
|
|
517
|
-
strategy DECIDED AT DESIGN TIME, not patched after.
|
|
539
|
+
strategy DECIDED AT DESIGN TIME, not patched after. (This section governs how
|
|
540
|
+
desktop effects degrade; when mobile is a primary surface — mobile-first
|
|
541
|
+
briefs, app-register products — load `skills/mobile.md`, which designs the
|
|
542
|
+
phone experience as first-class.) The rule of thumb: touch
|
|
518
543
|
devices get a *different good design*, never a broken half-version of the
|
|
519
544
|
desktop one.
|
|
520
545
|
|
|
@@ -599,3 +624,60 @@ not replace the brand-voice reasoning. Self-host via Fontshare/google-webfonts
|
|
|
599
624
|
downloads (`font-display: swap`, preload the display weight only). Never ship
|
|
600
625
|
more than 2 families / ~5 weight files. If the brief names a commercial font
|
|
601
626
|
the project already licenses, use the real thing.
|
|
627
|
+
|
|
628
|
+
## 15. Spatial integrity (nothing overlaps by accident)
|
|
629
|
+
|
|
630
|
+
The most common way an otherwise-good AI design dies: elements sitting ON TOP of
|
|
631
|
+
each other — a menu button overlapping the nav, a chip row clipped off the
|
|
632
|
+
viewport edge, a floating widget covering the CTA. Beautiful animation cannot
|
|
633
|
+
rescue a page where things collide. These rules are a hard floor, same tier as §5.
|
|
634
|
+
|
|
635
|
+
**Every out-of-flow element must justify itself.** Before writing
|
|
636
|
+
`absolute`/`fixed`/`sticky`/negative margin/transform-offset, answer: what is
|
|
637
|
+
this anchored to, and what reserves the space it covers? If there's no answer,
|
|
638
|
+
put it in flow. Decoration layers (glows, grain, orbs, canvas backgrounds) are
|
|
639
|
+
`absolute inset-0 -z-10 pointer-events-none` — below content, never intercepting
|
|
640
|
+
clicks, never between the user and a control.
|
|
641
|
+
|
|
642
|
+
**Interactive elements never overlap other interactive elements.** Not at any
|
|
643
|
+
breakpoint, not mid-animation, not after a toast appears. Two clickable things
|
|
644
|
+
occupying the same pixels is an automatic fail — one of them is unreachable.
|
|
645
|
+
Mentally hit-test every control: is anything rendered above it (higher z-index,
|
|
646
|
+
later stacking context) covering any part of its hit area?
|
|
647
|
+
|
|
648
|
+
**Fixed/floating overlays get a slot system.** The viewport has at most 4 overlay
|
|
649
|
+
slots (the corners), plus optional top/bottom bars. ONE occupant per slot —
|
|
650
|
+
before adding a floating element (toast, install prompt, chat bubble, back-to-top,
|
|
651
|
+
cookie notice, desktop-pet promo), check what already lives in that corner,
|
|
652
|
+
including the site's own nav controls. Overlays keep ≥16px from viewport edges
|
|
653
|
+
(safe-area insets on mobile), never cover the hero CTA or nav actions, and
|
|
654
|
+
anything persistent is dismissible. If two things want the same corner, stack them
|
|
655
|
+
in one container or queue them — never let them fight.
|
|
656
|
+
|
|
657
|
+
**Nav is one coherent bar.** Menu toggles, theme switches, and account buttons
|
|
658
|
+
live INSIDE the nav's flex row — never as separately-positioned fixed elements
|
|
659
|
+
that visually land on top of the bar. If a control is fixed so it survives scroll,
|
|
660
|
+
the nav itself is fixed and the control stays part of it.
|
|
661
|
+
|
|
662
|
+
**Rows that can overflow must have a plan.** Chip rows, tab bars, button groups,
|
|
663
|
+
breadcrumbs: at every width they either wrap (`flex-wrap`), scroll within their
|
|
664
|
+
own container (`overflow-x-auto` with visible affordance, content inset from the
|
|
665
|
+
container edge, `scroll-padding`), or truncate deliberately. Content silently
|
|
666
|
+
sliding under the viewport edge or under a sibling is a bug. Centered rows wider
|
|
667
|
+
than their container clip on BOTH ends — left-align scrollable rows.
|
|
668
|
+
|
|
669
|
+
**Animation end-states count.** An element's resting position after its entrance
|
|
670
|
+
(and every scroll-linked position in between) obeys these same rules. Parallax
|
|
671
|
+
and floating loops need enough clearance that their extremes never touch
|
|
672
|
+
neighboring text or controls. Pinned sections must not leave the pinned layer
|
|
673
|
+
hovering over the next section's content when unpinned.
|
|
674
|
+
|
|
675
|
+
**Reserve space for the dynamic.** Text that will be swapped/typed, badges with
|
|
676
|
+
counts, localized labels: size the container for the longest realistic value.
|
|
677
|
+
Fixed bars get matching `padding` on the scroll container (or `scroll-margin`)
|
|
678
|
+
so content can't hide beneath them — anchored headings included.
|
|
679
|
+
|
|
680
|
+
**Verification is spatial, not stylistic.** At 320 / 768 / 1280, walk the page
|
|
681
|
+
top to bottom and ask of every element: what is under it, what is above it, and
|
|
682
|
+
was that intentional? Any unintentional occlusion, clipped edge, or double-booked
|
|
683
|
+
corner gets fixed before the respond — this is checklist §12 item 17.
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
# Dreative Plan Mode — decide everything before the first line of code
|
|
2
|
+
|
|
3
|
+
Run this protocol at the start of ANY non-trivial Mode A request (new page/site,
|
|
4
|
+
redesign at rung 2+, any request implying motion/3d/immersive/cinematic/media, or
|
|
5
|
+
"make it amazing/like <reference>"). Skip it only for trivial single-element
|
|
6
|
+
restyles and rung-1 token refreshes — and even then run §1's capability probe
|
|
7
|
+
once per session. The failure this file prevents: jumping into code with half a
|
|
8
|
+
brief, discovering mid-build that media/tools/structure are missing, and shipping
|
|
9
|
+
a page that is 60% of what the user actually wanted.
|
|
10
|
+
|
|
11
|
+
Plan Mode is ONE planning pass → ONE structured question round → a written plan
|
|
12
|
+
→ execution in the plan's order. Never turn it into a long interview; the user
|
|
13
|
+
answers once and you build.
|
|
14
|
+
|
|
15
|
+
## 1. Capability probe (before proposing anything)
|
|
16
|
+
|
|
17
|
+
Enumerate what your environment can actually produce, and write the result down
|
|
18
|
+
(one line per capability in the plan file, §4). Check for:
|
|
19
|
+
|
|
20
|
+
- **Image generation** — an image-gen tool/MCP, or a CLI that produces images.
|
|
21
|
+
- **Video generation** — a video-gen tool/MCP (seamless loops, image-to-video).
|
|
22
|
+
- **Browser tools** — screenshot + console + interaction (needed for the
|
|
23
|
+
verification protocol; note it if absent).
|
|
24
|
+
- **Asset tooling** — anything for compression/conversion (ffmpeg on PATH,
|
|
25
|
+
sharp/squoosh in the project) for posters, loops, and frame sequences.
|
|
26
|
+
|
|
27
|
+
Rules:
|
|
28
|
+
- Probe by LOOKING (list your tools, `which ffmpeg`, check MCP config), never by
|
|
29
|
+
assuming. A capability you didn't verify doesn't exist.
|
|
30
|
+
- If a capability is missing but the design clearly wants it (e.g. a cinematic
|
|
31
|
+
brief with no video-gen), include an **offer to install** in the question round
|
|
32
|
+
(§3): name the concrete option (an MCP server the user can add, or
|
|
33
|
+
falling back to generated stills / pre-rendered loops from image sequences)
|
|
34
|
+
and let the user decide. Never install tools silently; never silently degrade
|
|
35
|
+
either — the user must know the fancy version was available.
|
|
36
|
+
- The probe result changes the blueprint: no video-gen → hero loops become
|
|
37
|
+
generated stills + ken-burns or a shader surface; no browser tools → the
|
|
38
|
+
verification protocol's manual fallback (SKILL.md) must be declared up front.
|
|
39
|
+
|
|
40
|
+
## 2. The blueprint (section-by-section, media-first)
|
|
41
|
+
|
|
42
|
+
Draft the page as a compact table BEFORE asking anything — the question round
|
|
43
|
+
presents choices about a concrete plan, not abstractions. Per section:
|
|
44
|
+
|
|
45
|
+
| section | layout family | media plan | motion treatment | interaction | fallback |
|
|
46
|
+
|
|
47
|
+
- **media plan** — one of: `generate-image` (subject + exact aspect + palette/
|
|
48
|
+
light-temperature prompt notes), `generate-video` (loop subject, 5-10s,
|
|
49
|
+
seamless), `generate-sequence` (N frames for scroll scrub), `real-asset`
|
|
50
|
+
(exists in repo / user must supply — name it), `none`. Media enters through
|
|
51
|
+
the motion system per `skills/media.md` — name the treatment (curtain reveal,
|
|
52
|
+
mask-shaped, hover-woken, media-plane distortion…), never "add an image".
|
|
53
|
+
- **motion treatment** — from motion.md/immersive.md/cinematic.md vocabulary,
|
|
54
|
+
with the dial-appropriate ambition (motion.md §9 inventory is the target).
|
|
55
|
+
- **fallback** — for every ambitious cell (WebGL, sim, scrubbed sequence,
|
|
56
|
+
generated video), the concrete boring version that ships if the fancy one
|
|
57
|
+
fails runtime verification. A plan cell without a fallback is not ambitious,
|
|
58
|
+
it's fragile.
|
|
59
|
+
|
|
60
|
+
Plus four page-level lines: register + design read (DESIGN.md §2), signature
|
|
61
|
+
element, animation stack (ONE system: GSAP+Lenis or motion/react — motion.md §0),
|
|
62
|
+
and the mobile strategy per ambitious effect (DESIGN.md §13).
|
|
63
|
+
|
|
64
|
+
## 3. The question round (one AskUserQuestion call, ≤4 questions)
|
|
65
|
+
|
|
66
|
+
Bundle EVERYTHING the user must decide into one structured round (multi-select
|
|
67
|
+
where choices stack). The pool below holds more than 4 questions — pick the
|
|
68
|
+
ones the request leaves genuinely open, most-decision-changing first; skip any
|
|
69
|
+
the request already answers. Structured tools always offer an "Other" free-text
|
|
70
|
+
option, so every question doubles as a remarks channel — and the round's last
|
|
71
|
+
question should explicitly invite extra direction.
|
|
72
|
+
|
|
73
|
+
1. **Depth** (redesigns of existing code only) — the §11 transformation-depth
|
|
74
|
+
ladder: restyle / re-layout / restructure / reimagine.
|
|
75
|
+
2. **Treatments** (multi-select) — the specialist skills with one-line plain
|
|
76
|
+
descriptions, obvious ones marked "(Recommended)":
|
|
77
|
+
motion · interaction · 3d · immersive · cinematic · refined · media
|
|
78
|
+
(generated images/video woven into the motion system) · ux (make every
|
|
79
|
+
control, form, and state actually work — recommended by default) · mobile
|
|
80
|
+
(first-class phone experience, calmer but equally crafted) · none.
|
|
81
|
+
3. **Generated media** — the concrete offer from your probe: e.g. "Generate a
|
|
82
|
+
hero video loop + 4 section images (Recommended)" / "Images only" /
|
|
83
|
+
"Placeholders, I'll supply assets". If a needed tool is missing, this is
|
|
84
|
+
where the install offer goes ("I can add <X> MCP for video generation — ok?").
|
|
85
|
+
4. **Ambition tier** — safe (clean + light motion) / expressive (full motion.md
|
|
86
|
+
dial 7-8 inventory) / award-site (dial 9-10, immersive/cinematic
|
|
87
|
+
architecture). State the cost honestly: higher tiers mean heavier builds and
|
|
88
|
+
a mandatory runtime verification pass.
|
|
89
|
+
5. **References** — "Do you have a reference — a website you love, a
|
|
90
|
+
screenshot, a brand whose feel to chase?" Options like: paste a URL /
|
|
91
|
+
attach screenshots / "surprise me — invent it from the brand" / match the
|
|
92
|
+
existing brand. When a URL or image arrives, actually study it before
|
|
93
|
+
designing (SKILL.md's references rule: fetch the site / read the image,
|
|
94
|
+
distill what specifically to borrow — palette, type feel, layout family,
|
|
95
|
+
motion cues — never guess a named site from memory).
|
|
96
|
+
6. **Vibe & audience** (when the brief is thin) — 3-4 contrasting directions
|
|
97
|
+
as options, each a one-line register + palette + energy sketch ("quiet
|
|
98
|
+
luxury: bone, near-black serif, almost no motion" vs "electric launch:
|
|
99
|
+
drenched color, kinetic type"), plus who the page must convince (buyers /
|
|
100
|
+
investors / recruiters / fans). This seeds DESIGN.md §2's design read.
|
|
101
|
+
7. **Scope & priorities** (multi-page or vague requests) — which pages/flows
|
|
102
|
+
matter most, what's in this pass vs later, and any hard constraints
|
|
103
|
+
(existing brand tokens to keep, CMS/content that must survive, deadline
|
|
104
|
+
implying the safe tier).
|
|
105
|
+
8. **Final remarks** — close the round with an open catch-all: "Anything else
|
|
106
|
+
I should know or you'd love to see — specific effects, colors you hate,
|
|
107
|
+
sections to add or kill?" Options: "no, go build" / "yes (write it in
|
|
108
|
+
Other)". Everything written here lands verbatim in the plan file and is
|
|
109
|
+
honored like the brief.
|
|
110
|
+
|
|
111
|
+
Cap at 4 per round: depth/treatments/media/references usually win; fold
|
|
112
|
+
ambition into treatments' recommendations when crowded, and vibe/scope into
|
|
113
|
+
the blueprint you present for approval. Never re-ask in later rounds;
|
|
114
|
+
ambiguity discovered mid-build resolves by the plan's spirit + doctrine
|
|
115
|
+
defaults.
|
|
116
|
+
|
|
117
|
+
## 4. Write the plan, then execute it
|
|
118
|
+
|
|
119
|
+
Persist the approved plan to `.dreative/plan.md` (or the scratchpad if
|
|
120
|
+
`.dreative/` doesn't exist): capability manifest, every answer verbatim
|
|
121
|
+
(including references studied — with the distilled borrow-list — and all
|
|
122
|
+
free-text remarks), blueprint table, stack, mobile strategy, fallbacks. Long sessions lose context; the plan file is
|
|
123
|
+
the re-entry point — re-read it instead of re-deciding.
|
|
124
|
+
|
|
125
|
+
**Execution order (always):**
|
|
126
|
+
|
|
127
|
+
1. **Assets first.** Generate every planned image/video/sequence NOW, at the
|
|
128
|
+
blueprint's aspect ratios, graded to the palette (media.md §1). Sections get
|
|
129
|
+
designed around real assets, not around placeholders that "will be swapped".
|
|
130
|
+
2. **Foundation.** Install and WIRE the animation stack (motion.md §8), fonts,
|
|
131
|
+
tokens, providers — before any section code.
|
|
132
|
+
3. **Sections** in blueprint order, each honoring its row (skills tagged per
|
|
133
|
+
section apply to that section).
|
|
134
|
+
4. **Effects + choreography** across sections (page-level timelines, transitions,
|
|
135
|
+
the signature element).
|
|
136
|
+
5. **Verification** — the full runtime protocol (SKILL.md self-critique +
|
|
137
|
+
runtime gates). Any effect that fails gets its planned fallback, and the
|
|
138
|
+
final report says so: "shipped the §2 fallback for X because Y".
|
|
139
|
+
|
|
140
|
+
Report against the plan when done: each blueprint row → shipped / fallback /
|
|
141
|
+
cut (with reason), plus the motion inventory (motion.md §9) and the preservation
|
|
142
|
+
ledger when §11 applies. A build that silently diverges from its approved plan
|
|
143
|
+
is a bug even when it looks good.
|
package/skill/dreative/SKILL.md
CHANGED
|
@@ -7,13 +7,16 @@ description: Frontend design skill + optional visual round-trip editor. Use for
|
|
|
7
7
|
|
|
8
8
|
You (the coding agent) are the intelligence. Dreative has **two modes**:
|
|
9
9
|
|
|
10
|
-
- **Mode A — Direct design (default).** The user asks you to design, redesign, restyle, animate, or build UI. Read `DESIGN.md` (and any specialist `skills/<name>.md` the
|
|
10
|
+
- **Mode A — Direct design (default).** The user asks you to design, redesign, restyle, animate, or build UI. For any non-trivial request, FIRST run Plan Mode per `PLAN.md` (same folder): probe your environment's capabilities (image-gen, video-gen, browser tools), draft a section-by-section blueprint with a media plan and fallbacks, bundle every user decision into one structured question round, persist the approved plan, then execute assets-first. Read `DESIGN.md` (and any specialist `skills/<name>.md` the plan calls for), then design/edit the real code directly. No server, no extraction, no wireframes. When you finish, add one closing note: *"Tip: run `dreative start` / say 'open dreative' if you want to tweak this visually — I'll extract the pages into an editable canvas."* That's the only place the editor should come up; never force the round-trip on a plain design request. **Depth first:** when the request implies more than a fresh coat of paint ("redesign", "change it entirely", "make it like <reference site>"), present DESIGN.md §11's transformation-depth ladder (restyle → re-layout → restructure → reimagine) as explicit options and let the user pick BEFORE designing; a confirmed restructure/reimagine means rebuilding markup, component trees, and routing for real — never just editing stylesheets on the old skeleton. **Preservation contract (non-negotiable when redesigning existing code):** BEFORE editing any existing page, build the preservation manifest per DESIGN.md §11 (every link, id/data-attribute, handler, form field, visible string, data view, and conditional state — tabs, modals, auth branches); AFTER redesigning, mechanically verify each entry survives in the new code and report the preservation ledger. Restructure moves things; it never loses them. **Real motion engineering:** when motion/3d/immersive/cinematic treatments are chosen, deliver them with the proper libraries per the skill files (GSAP + ScrollTrigger, Lenis, `motion/react`, three.js/R3F) — actually add the dependencies to the project (`npm i gsap lenis` etc.), wire providers/render loops, and build the choreography. A static page with a few CSS transitions does not fulfill a motion request; the target is unseen.co-grade coordinated animation, the shipped result must clear the motion-dial inventory in `skills/motion.md` §9, and the self-critique pass must name the specific animations shipped. **Generated media:** probe your environment for image/video generation tools before designing and use them per DESIGN.md §7 — generated hero imagery, textures, and especially seamless video loops (hero backgrounds, pre-rendered living surfaces, hover previews) integrated into the motion system are among the highest-impact upgrades available. **Skill picker:** in Plan Mode's single question round (PLAN.md §3 — use the agent's structured question tool, e.g. AskUserQuestion, multi-select), offer the specialist skills with a one-line plain-language description each so the user chooses the treatments they want — recommend the ones the request obviously implies and mark them "(Recommended)":
|
|
11
11
|
- **motion** — scroll animations, staggered entrances, parallax, kinetic type
|
|
12
12
|
- **interaction** — micro-interactions: hover states, magnetic buttons, cursor effects, tactile feedback
|
|
13
13
|
- **3d** — WebGL / three.js scenes, shader backgrounds, 3D product showcases
|
|
14
14
|
- **immersive** — award-site feel: the page becomes a spatial world, scroll-as-journey, page transitions
|
|
15
15
|
- **cinematic** — dark, shader-graded experiential look: fluid/particle surfaces, drag-to-explore, sound
|
|
16
16
|
- **refined** — premium clean business look: whitespace, photography, calm minimal motion (the professional pole)
|
|
17
|
+
- **media** — generated images/video woven into the motion system: hero video loops, distortion galleries, living thumbnails
|
|
18
|
+
- **ux** — make everything actually work: nav, mobile menu, forms, states, keyboard, nothing blocks clicks (recommend by default)
|
|
19
|
+
- **mobile** — first-class phone experience: clean, tidy, thumb-ergonomic, with animations scaled to mobile (calmer than desktop, still premium)
|
|
17
20
|
Plus a "none — plain design doctrine only" option. Skip the question only when the user already named the treatments or the request is trivially a restyle; read each chosen `skills/<name>.md` before designing.
|
|
18
21
|
- **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**. Be token-frugal at every step: read only the files you need, never re-read the whole app, and keep JSON compact.
|
|
19
22
|
|
|
@@ -21,11 +24,15 @@ Everything below §0 describes Mode B; the design doctrine paragraphs apply to b
|
|
|
21
24
|
|
|
22
25
|
**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.
|
|
23
26
|
|
|
24
|
-
**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). 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).
|
|
27
|
+
**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).
|
|
25
28
|
|
|
26
29
|
**References the user gives you.** If the user attaches screenshots/images, read them with your image tools and treat them as the visual target (extract palette, type feel, layout family, motion cues from any described behavior). If the user names reference URLs, fetch them (browser tools if available, else web fetch of the HTML — look at real script/font/class evidence, not just the text) and distill what specifically to borrow before designing; never guess at a named reference from memory alone when you can look.
|
|
27
30
|
|
|
28
|
-
**
|
|
31
|
+
**Verification pass (Mode A, required before declaring done).** Doctrine at write-time is weaker than judgment at review-time, and screenshots alone cannot catch broken function — a dead WebGL canvas, a menu that won't close, an invisible layer eating clicks all screenshot fine. Verification is TWO stages, both mandatory.
|
|
32
|
+
|
|
33
|
+
*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, and confirm scroll triggers fire at their positions; 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) at ~390px too (`skills/mobile.md` §5 when mobile shipped). **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; the final report names what fell back and why.
|
|
34
|
+
|
|
35
|
+
*Stage 2 — visual self-critique.* Screenshot the result at desktop AND ~390px mobile width, 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 and working? (4) spatial integrity per DESIGN.md §15 — scan the screenshot for anything overlapping anything else: controls covered by other elements, rows/text clipped at a viewport or container edge, two floating widgets fighting for the same 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? Fix what fails and re-check once. 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 tell the user which gates could not be verified — never silently skip the pass.
|
|
29
36
|
|
|
30
37
|
## 0. Setup
|
|
31
38
|
|
|
@@ -21,7 +21,9 @@ Cheaper substitutes to consider first: CSS 3D transforms (`perspective` +
|
|
|
21
21
|
`rotateX/Y` on real DOM — free, accessible, great for cards/mockups/tilt), a
|
|
22
22
|
pre-rendered video/image sequence scrubbed on scroll, or a Lottie/Rive vector
|
|
23
23
|
animation. If the object never needs live lighting or user-driven rotation,
|
|
24
|
-
pre-render it
|
|
24
|
+
pre-render it — and if a video-generation tool exists in the environment
|
|
25
|
+
(PLAN.md §1's probe), a generated loop or frame sequence (media.md §1) is
|
|
26
|
+
usually the strongest pre-render source.
|
|
25
27
|
|
|
26
28
|
## 1. Stack
|
|
27
29
|
|
|
@@ -83,6 +85,27 @@ animated gradient meshes, flowfields, displacement on hover, image transitions.
|
|
|
83
85
|
- Image effects: sample two textures + a noise mask for transitions; barrel/flow
|
|
84
86
|
distortion on scroll velocity for editorial galleries.
|
|
85
87
|
|
|
88
|
+
## 4.5 Media in the scene (images & video as textures)
|
|
89
|
+
|
|
90
|
+
The other half of shader craft: real page media rendered THROUGH WebGL so
|
|
91
|
+
effects can touch it (the unseen.co gallery mechanic — full pattern in
|
|
92
|
+
`skills/media.md` §3):
|
|
93
|
+
|
|
94
|
+
- **DOM-synced media planes**: the page's `<img>`/`<video>` elements stay in
|
|
95
|
+
the DOM (a11y/layout/fallback, `opacity: 0` never `display:none`) while
|
|
96
|
+
textured planes copy their `getBoundingClientRect()` per rAF (lerped).
|
|
97
|
+
One scene owns ALL planes — never a canvas per image.
|
|
98
|
+
- **Video textures**: `new THREE.VideoTexture(videoEl)` with the element
|
|
99
|
+
`muted playsinline` and playing; `texture.colorSpace = SRGBColorSpace`;
|
|
100
|
+
generated seamless loops (media.md §1) make the best texture sources —
|
|
101
|
+
a pre-rendered loop as a texture often beats a live sim for cost.
|
|
102
|
+
- Effects on media planes: hover ripple/lens (damped `uMouse` + radial UV
|
|
103
|
+
displacement), velocity stretch + RGB split (clamped, damped decay),
|
|
104
|
+
noise-mask dissolves between textures (§4), subtle vertex curvature for
|
|
105
|
+
the floating-paper look.
|
|
106
|
+
- Failure path is wired, not theoretical: WebGL missing/lost or
|
|
107
|
+
reduced-motion → un-hide the DOM media (`opacity: 1`). Verify it fires.
|
|
108
|
+
|
|
86
109
|
## 5. Particles and points
|
|
87
110
|
|
|
88
111
|
Points/instancing, never meshes-per-particle: `<Points>` + `BufferAttribute`
|
|
@@ -58,7 +58,11 @@ Rules: ONE simulation per site, palette fed from the page tokens, `uTime` slow
|
|
|
58
58
|
damped — the surface reacts like water, not like a cursor-following gimmick.
|
|
59
59
|
Images/media on the page render INTO the canvas layer (texture planes synced to
|
|
60
60
|
DOM rects — measure, don't guess) so the distortion can touch them; keep real
|
|
61
|
-
DOM (invisible or fallback-visible) underneath for a11y/SEO/selection
|
|
61
|
+
DOM (invisible or fallback-visible) underneath for a11y/SEO/selection — the
|
|
62
|
+
full media-plane pattern, video textures, and the wired fallback rule live in
|
|
63
|
+
`media.md` §3. When a video-generation tool exists, the pre-rendered-loop
|
|
64
|
+
budget path (§6) becomes first-class: generate the sim-like loop instead of
|
|
65
|
+
building the GPGPU sim (media.md §1).
|
|
62
66
|
|
|
63
67
|
## 2. Interaction vocabulary
|
|
64
68
|
|
|
@@ -212,8 +216,11 @@ root layout, outside the router swap point (immersive.md §1).
|
|
|
212
216
|
7. **The floor.** Reduced-motion still frame, degrade ladder, contrast scrim,
|
|
213
217
|
mobile strategy (poster or halved sim), pause on hidden (§5).
|
|
214
218
|
|
|
215
|
-
Ship checkpoint after every layer: run it, screenshot it,
|
|
216
|
-
|
|
219
|
+
Ship checkpoint after every layer: run it, screenshot it, READ THE CONSOLE,
|
|
220
|
+
click through it (ux.md §7's audit on the touched surface), keep it working.
|
|
221
|
+
A failed step 4 must not take down steps 1–3 — each layer's fallback is the
|
|
222
|
+
previous layer, and the runtime gate (DESIGN.md §12.18) runs on the final
|
|
223
|
+
stack, not just the last layer added.
|
|
217
224
|
|
|
218
225
|
## 7. Changing an existing site into this
|
|
219
226
|
|
|
@@ -30,7 +30,9 @@ intentional. Decide up front:
|
|
|
30
30
|
No metaphor = you'll produce disconnected effects. The metaphor decides what
|
|
31
31
|
transitions, camera moves, and layout make sense — everything below serves it.
|
|
32
32
|
- Immersive sites still need an **escape hatch**: visible menu with plain links,
|
|
33
|
-
working back button, deep-linkable routes
|
|
33
|
+
working back button, deep-linkable routes — all held to ux.md's working-page
|
|
34
|
+
contract (the menu closes, links resolve, back plays reverse, nothing
|
|
35
|
+
invisible eats clicks: run ux.md §7 on the world too). Lost visitors close tabs. On touch
|
|
34
36
|
devices the escape hatch becomes the PRIMARY route (DESIGN.md §13): drag/
|
|
35
37
|
spatial navigation conflicts with native scroll, so mobile gets the index-list
|
|
36
38
|
world view or a swipe carousel, with the full world behind an explicit tap-in.
|
|
@@ -193,7 +195,8 @@ Everything in motion.md §6 and 3d.md §7 applies, plus genre-specific:
|
|
|
193
195
|
CTA top-right, awards rail on the edge) stays fixed through every inversion.
|
|
194
196
|
DOM-only, no WebGL — the spatial feel comes purely from theme travel + scale.
|
|
195
197
|
- **World portfolio**: persistent canvas; works as textured planes arranged in
|
|
196
|
-
depth
|
|
198
|
+
depth (DOM-synced media planes per media.md §3 — real images underneath);
|
|
199
|
+
scroll flies the camera past them; hover tilts a plane + cursor says
|
|
197
200
|
"View"; click = camera dives to the plane which morphs into the project hero
|
|
198
201
|
(shared-element). Back = reverse flight.
|
|
199
202
|
- **Scene-hopping studio site (epic-style)**: stylized environment as stage;
|
|
@@ -125,6 +125,9 @@ the static design, not a broken half-effect. All of these are decoration — cap
|
|
|
125
125
|
`prefers-reduced-motion` disables tracking (element stays styled, static).
|
|
126
126
|
- Nothing in this file may cause layout shift, block scrolling, steal focus, or
|
|
127
127
|
attach a raw `scroll`/`mousemove` listener without rAF batching + cleanup.
|
|
128
|
+
- Effect layers (spotlight overlays, cursor followers, glow/beam wrappers) are
|
|
129
|
+
`pointer-events: none` — run ux.md §4's pointer-events audit after adding
|
|
130
|
+
any; an overlay that eats one click fails the whole page's runtime gate.
|
|
128
131
|
- Every effect must survive keyboard use: whatever hover reveals, focus reveals.
|
|
129
132
|
- Effects use palette tokens (accent/neutral), never introduce new hues.
|
|
130
133
|
- If an effect can't be justified in one sentence of communication value
|
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
# Dreative Specialist Skill — Media as Motion Material
|
|
2
|
+
|
|
3
|
+
Load this file when `plan.skills` includes `media`, when the plan's blueprint
|
|
4
|
+
contains any `generate-*` media cell, or when the brief involves imagery/video
|
|
5
|
+
on a page with motion dial ≥ 6. It EXTENDS DESIGN.md §7 (sourcing priority and
|
|
6
|
+
bans still apply) and STACKS with motion.md (timing), 3d.md (shader craft), and
|
|
7
|
+
cinematic.md (the living surface). This file exists because agents know how to
|
|
8
|
+
*embed* media but not how to *use* it: award-grade sites (unseen.co family)
|
|
9
|
+
treat images and video as the raw material the motion system acts on — media is
|
|
10
|
+
choreographed, distorted, revealed, and lit, never just placed.
|
|
11
|
+
|
|
12
|
+
## 0. The doctrine
|
|
13
|
+
|
|
14
|
+
- **No bare media at dial ≥ 7.** Every meaningful image/video gets three
|
|
15
|
+
decisions: an **entrance** (how it arrives — reveal, wipe, materialize), an
|
|
16
|
+
**idle** (what it does at rest — loop, drift, ken-burns, nothing-on-purpose),
|
|
17
|
+
and a **response** (what interaction does to it — hover wake, distortion,
|
|
18
|
+
parallax). "None" is a valid answer per axis, but it must be chosen, not
|
|
19
|
+
defaulted.
|
|
20
|
+
- **Media and type arrive as one beat.** Time the media entrance with the
|
|
21
|
+
section's line-mask type reveal (motion.md §4) — image and headline landing
|
|
22
|
+
together reads as choreography; landing separately reads as two plugins.
|
|
23
|
+
- **One treatment vocabulary per page.** Pick 1-2 media treatments and stamp
|
|
24
|
+
them consistently (all work cards hover-wake; all section images curtain-
|
|
25
|
+
reveal). Five different reveal styles = assembled, not designed.
|
|
26
|
+
- **Invent, don't pick.** §2/§3 are springboards, not a menu — the signature
|
|
27
|
+
media treatment should be COMPOSED for this brand and this prompt using the
|
|
28
|
+
grammar in §2.5 (a torn-paper archive scrolls differently than a liquid
|
|
29
|
+
fashion film). Stock-vocabulary media reads as template exactly like stock
|
|
30
|
+
layouts do; if the user's prompt describes an effect ("images tear apart on
|
|
31
|
+
scroll"), build THAT effect for real, at the tier it needs.
|
|
32
|
+
- **Real assets outrank generated ones** (DESIGN.md §7). Generated media fills
|
|
33
|
+
gaps and creates atmosphere; it never replaces the client's product shots.
|
|
34
|
+
|
|
35
|
+
## 1. Production pipeline (generate → grade → compress)
|
|
36
|
+
|
|
37
|
+
When the plan calls for generated media, produce it BEFORE section code
|
|
38
|
+
(PLAN.md §4) and produce it correctly:
|
|
39
|
+
|
|
40
|
+
- **Prompt for the world, grade for the page.** Prompt the brand's physical
|
|
41
|
+
subject (DESIGN.md §7) PLUS the page's light: temperature ("warm tungsten
|
|
42
|
+
side-light", "cool overcast daylight"), palette anchors ("deep green shadows,
|
|
43
|
+
bone highlights"), and grain/mood. Every asset on a page shares ONE lighting
|
|
44
|
+
logic — mismatched light is the #1 generated-media tell.
|
|
45
|
+
- **Exact aspect ratios** from the blueprint (16:9 hero, 4:5 cards, 1:1
|
|
46
|
+
thumbnails, 21:9 banners). Never generate square and crop-hope.
|
|
47
|
+
- **Video loops**: 5-10s, prompt explicitly for seamlessness ("seamless loop,
|
|
48
|
+
continuous motion, no scene change") and slow motion content (drift, steam,
|
|
49
|
+
fabric, water — fast action never loops cleanly). Generate or extract a
|
|
50
|
+
**poster frame** for every video (first frame, same grade).
|
|
51
|
+
- **Image sequences** for scroll scrubs: 40-80 frames of one continuous
|
|
52
|
+
transformation (assemble/rotate/morph). Image-to-video tools can produce
|
|
53
|
+
these from a single generated still; export frames with ffmpeg
|
|
54
|
+
(`ffmpeg -i loop.mp4 -vf fps=12,scale=1280:-1 frames/f_%03d.webp`).
|
|
55
|
+
- **Compress before committing**: images → WebP/AVIF at the largest displayed
|
|
56
|
+
size ×2 max; video → H.264 + AV1 sources, CRF ~28-32, no audio track, ≤ 2-4MB
|
|
57
|
+
per loop (`ffmpeg -i in.mp4 -an -c:v libx264 -crf 30 -movflags +faststart`).
|
|
58
|
+
A 40MB hero loop fails the plan even if it's beautiful.
|
|
59
|
+
- Textures too: grain tiles, masks, mattes, displacement maps — generate them
|
|
60
|
+
instead of hand-rolling SVG (which is banned, DESIGN.md §7).
|
|
61
|
+
|
|
62
|
+
## 2. DOM-tier treatments (no WebGL — the budget vocabulary)
|
|
63
|
+
|
|
64
|
+
80% of the effect at 5% of the cost; the right tier below dial 8 or without a
|
|
65
|
+
canvas already on the page. All honor the floors in §5.
|
|
66
|
+
|
|
67
|
+
- **Curtain / inset reveal**: media enters behind a wipe —
|
|
68
|
+
`clip-path: inset(100% 0 0 0) → inset(0)` (or 2-4 panel slides), 900ms
|
|
69
|
+
expo-out, triggered in-view once, synced to the headline's line-mask.
|
|
70
|
+
- **Hover-woken loop**: still poster crossfades to its video loop on
|
|
71
|
+
hover/focus (240ms), `video.play()` on enter, pause + reset to poster on
|
|
72
|
+
leave. The "living thumbnail" for work/product cards. Preload `metadata`
|
|
73
|
+
only; play() only after the crossfade starts.
|
|
74
|
+
- **Mask-shaped video**: the loop plays inside display type
|
|
75
|
+
(`background-clip: text` on 10vw+ headlines), an arch/circle `clip-path`, or
|
|
76
|
+
the brand mark (SVG mask). Video becomes identity, not a rectangle. One per
|
|
77
|
+
page.
|
|
78
|
+
- **Floating media**: 3-5 images hovering in depth — slow damped drift
|
|
79
|
+
(±6-10px, 4-8s loops, each phase-offset), parallax differential by depth
|
|
80
|
+
layer, soft tinted contact shadow. The "paper sheets in space" look, pure CSS
|
|
81
|
+
+ one IntersectionObserver.
|
|
82
|
+
- **Ken-burns**: slow scale 1.0→1.06 over 12-20s inside a fixed frame,
|
|
83
|
+
alternate direction per instance. The refined register's entire motion budget
|
|
84
|
+
for imagery (refined.md).
|
|
85
|
+
- **Pixel/dither swap**: stepped `image-rendering: pixelated` downscale swap
|
|
86
|
+
(24px mosaic → full res in 4-6 steps) on scroll progress or hover. Digital-
|
|
87
|
+
craft registers.
|
|
88
|
+
- **Inner-zoom parallax**: image at 115% height inside `overflow-hidden` frame,
|
|
89
|
+
`object-position` or translateY driven by scroll (-8%→8%). Media moves, frame
|
|
90
|
+
doesn't — never parallax the frame itself past text.
|
|
91
|
+
- **Scroll-scrubbed `<canvas>` sequence**: preload frames (§1), draw the frame
|
|
92
|
+
for the current damped scroll progress; sticky wrapper ≤ 2.5 viewports
|
|
93
|
+
(motion.md §7's scrub showcase). No WebGL needed.
|
|
94
|
+
|
|
95
|
+
## 2.5 The invention grammar (compose the signature treatment)
|
|
96
|
+
|
|
97
|
+
Every media effect — including any the user describes in their own words — is
|
|
98
|
+
three choices multiplied together. Compose deliberately:
|
|
99
|
+
|
|
100
|
+
- **PROPERTY** (what changes): position/scale · opacity · clip/mask SHAPE
|
|
101
|
+
(inset, circle, arch, brand mark, jagged polygon) · slices/fragments (the
|
|
102
|
+
media cut into strips, tiles, or shards that move independently) · UV
|
|
103
|
+
distortion (WebGL: ripple, stretch, melt, swirl) · resolution (mosaic →
|
|
104
|
+
sharp) · color channels (RGB split, duotone → full color) · blend/exposure
|
|
105
|
+
(media develops like a photo print).
|
|
106
|
+
- **DRIVER** (what pushes it): scroll progress (scrubbed) · scroll VELOCITY
|
|
107
|
+
(agitation that decays) · in-view trigger (one-shot) · hover/focus ·
|
|
108
|
+
cursor position within the element (directional!) · drag · hold · time.
|
|
109
|
+
- **SHAPE OF PROGRESSION** (how it travels across the media): uniform ·
|
|
110
|
+
directional sweep (left→right, top→bottom) · radial from a point (often the
|
|
111
|
+
cursor's entry point) · per-slice stagger · noise-mask (organic, torn) ·
|
|
112
|
+
along the brand mark's silhouette.
|
|
113
|
+
|
|
114
|
+
The user's prompt usually fixes one or two axes; you compose the rest from the
|
|
115
|
+
brand's world. "Tearing" = slices + jagged noise-mask edges, driven by scroll.
|
|
116
|
+
"Video fades from left to right on hover" = opacity/mask, hover-driven,
|
|
117
|
+
directional sweep — a gradient `mask-image` whose position animates, 400ms,
|
|
118
|
+
from the edge the cursor entered. Name the composed treatment in the plan
|
|
119
|
+
blueprint like a signature element, and stamp it consistently (§0).
|
|
120
|
+
|
|
121
|
+
**Worked exotics (copy the construction, not the skin):**
|
|
122
|
+
|
|
123
|
+
- **Paper tear on scroll**: image duplicated into 2-3 layers, each clipped by
|
|
124
|
+
a jagged `clip-path` polygon sharing torn edges; scroll progress translates/
|
|
125
|
+
rotates the pieces apart (±2-6°) with a hairline of background showing
|
|
126
|
+
through; WebGL version displaces UV along a noise seam. Archive/editorial/
|
|
127
|
+
punk registers.
|
|
128
|
+
- **Strip-slice reveal**: media as 5-9 vertical strips (repeated
|
|
129
|
+
`background-image` with offset `background-position`, or plane-per-strip);
|
|
130
|
+
strips slide in staggered from alternating directions, or shear on scroll
|
|
131
|
+
velocity. The classic award-site gallery entrance.
|
|
132
|
+
- **Directional hover wipe**: detect the pointer's entry edge (compare
|
|
133
|
+
enter coordinates to bounds); the reveal (opacity mask, color→duotone,
|
|
134
|
+
still→video crossfade) sweeps FROM that edge. Feels alive because it
|
|
135
|
+
answers the gesture's direction.
|
|
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.
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
# Dreative Specialist Skill — Mobile Excellence
|
|
2
|
+
|
|
3
|
+
Load this file when `plan.skills` includes `mobile`, when the brief says
|
|
4
|
+
mobile-first / most users are on phones / "make the mobile version great", or
|
|
5
|
+
when an app-register product is primarily used on mobile. It EXTENDS DESIGN.md
|
|
6
|
+
§13 (which governs how desktop effects DEGRADE); this file is about designing
|
|
7
|
+
mobile as a first-class surface in its own right — clean, tidy, and still
|
|
8
|
+
genuinely animated and premium, just calibrated to a 390px viewport, a thumb,
|
|
9
|
+
and a battery. It STACKS with whatever treatments were chosen: motion/3d/
|
|
10
|
+
immersive briefs get their mobile-native expression here, never a cropped
|
|
11
|
+
desktop.
|
|
12
|
+
|
|
13
|
+
## 0. The register: calm confidence, not shrunken desktop
|
|
14
|
+
|
|
15
|
+
Mobile premium reads differently from desktop premium: less simultaneous
|
|
16
|
+
motion, more focus per viewport, perfect ergonomics. The dial translation:
|
|
17
|
+
desktop ambition N ≈ mobile ambition N−2. A desktop dial-8 site ships a
|
|
18
|
+
dial-6 phone experience that feels JUST as crafted — one hero moment, silky
|
|
19
|
+
scroll reveals, tactile presses — rather than a stuttering copy of the desktop
|
|
20
|
+
choreography.
|
|
21
|
+
|
|
22
|
+
- **One idea per viewport.** The phone viewport is a frame; compose each
|
|
23
|
+
screenful like one (hero = one headline + one visual + one CTA, nothing
|
|
24
|
+
else). If a desktop section held three things, the mobile version stacks
|
|
25
|
+
them as three clean beats or cuts to the strongest one.
|
|
26
|
+
- **Tidy is the aesthetic.** Consistent gutters (20-24px), one column
|
|
27
|
+
discipline, generous vertical rhythm (56-80px between sections), no element
|
|
28
|
+
closer than 8px to another. Clutter reads twice as loud at 390px.
|
|
29
|
+
- **Type recalibrated, not just clamped**: hero 2-3rem (2 lines max with the
|
|
30
|
+
REAL copy), body stays ≥16px, line-length falls out of the gutters — check
|
|
31
|
+
headlines don't orphan single words (`text-wrap: balance`).
|
|
32
|
+
|
|
33
|
+
## 1. Layout patterns that are mobile-native
|
|
34
|
+
|
|
35
|
+
- Asymmetric desktop grids collapse to intentional single-column ORDER
|
|
36
|
+
(decide what comes first — usually visual → headline → support → CTA), not
|
|
37
|
+
DOM-order accidents. Check the collapsed order reads as a story.
|
|
38
|
+
- Horizontal scroll is mobile's extra axis: card shelves, galleries, and
|
|
39
|
+
chip rows as swipeable strips (`overflow-x-auto` + `scroll-snap-type: x
|
|
40
|
+
mandatory` on short strips, edge inset, visible peek of the next card —
|
|
41
|
+
the peek IS the affordance; no scrollbars, no arrows).
|
|
42
|
+
- Sticky bottom bar for the primary action on conversion/product pages
|
|
43
|
+
(add-to-cart, main CTA): thumb-reach beats footer CTA; respect
|
|
44
|
+
`env(safe-area-inset-bottom)`.
|
|
45
|
+
- Accordions/tabs for secondary density (specs, FAQs) instead of long walls;
|
|
46
|
+
tables become stacked cards or a scrollable container with sticky first
|
|
47
|
+
column — never squeezed 6-column tables.
|
|
48
|
+
- Nav: the fullscreen menu is mobile's one theatrical moment — staggered
|
|
49
|
+
link entrance (line-mask, 60ms stagger), big touch-sized links (≥ 48px
|
|
50
|
+
rows), contact/socials in the footer of the overlay. Wired per ux.md §1
|
|
51
|
+
(focus trap, scroll lock, Esc/back closes).
|
|
52
|
+
|
|
53
|
+
## 2. Motion on mobile (still premium, never crazy)
|
|
54
|
+
|
|
55
|
+
The motion inventory scaled to touch (extends motion.md §9):
|
|
56
|
+
|
|
57
|
+
- **Keep**: one composed hero entrance (≤ 600ms total), line-mask headline
|
|
58
|
+
reveals, in-view section reveals (2-3, `once: true`), press states on
|
|
59
|
+
EVERYTHING tappable (`active:scale-[0.98]` — on mobile this is the main
|
|
60
|
+
interaction feedback, since hover doesn't exist), marquees (pause
|
|
61
|
+
off-screen), counters, accordion springs.
|
|
62
|
+
- **Translate**: parallax halves or dies (§13); pinned sequences → short
|
|
63
|
+
sticky sections (≤ 1.5 viewports) or plain stacked beats; hover-woken media
|
|
64
|
+
→ in-view-woken (loop plays while ≥ 60% visible, pauses off-screen) or
|
|
65
|
+
tap-to-play; magnetic/cursor effects → gone entirely, replaced by press
|
|
66
|
+
feedback; drag-to-explore → swipe carousel or index list as PRIMARY
|
|
67
|
+
(DESIGN.md §13).
|
|
68
|
+
- **Ban on mobile**: smooth-scroll libraries at full strength (Lenis: disable
|
|
69
|
+
or `syncTouch` carefully — fighting native momentum feels broken), more than
|
|
70
|
+
one scrubbed sequence, simultaneous animation of > 4 elements, any effect
|
|
71
|
+
that drops the scroll below 60fps on a mid-range phone.
|
|
72
|
+
- Scroll reveals trigger earlier (`margin: "-10% 0px"` not -20%) — mobile
|
|
73
|
+
viewports are short and users scroll fast; late reveals = users see blank.
|
|
74
|
+
|
|
75
|
+
## 3. 3D and heavy media on mobile
|
|
76
|
+
|
|
77
|
+
- Default: replace live 3D with the poster or a pre-rendered loop (3d.md §7,
|
|
78
|
+
media.md). A generated video loop IS the mobile 3D strategy in most cases —
|
|
79
|
+
visually near-identical, thermally free.
|
|
80
|
+
- If live 3D ships: dpr capped at 2, sim/particle counts halved, post-FX off,
|
|
81
|
+
`frameloop="demand"` where possible, pause on scroll-out and
|
|
82
|
+
`document.hidden`. Test the thermal story: 30s of idling must not heat the
|
|
83
|
+
phone (no full-rate rAF on static scenes).
|
|
84
|
+
- Video: one playing loop per viewport, ≤ 2MB mobile variants
|
|
85
|
+
(`<source media>` or renditions), `playsinline` mandatory, poster always.
|
|
86
|
+
- Images: serve mobile-sized renditions (`srcset/sizes`) — a 2400px hero on a
|
|
87
|
+
390px screen is a failed budget even when it looks fine.
|
|
88
|
+
|
|
89
|
+
## 4. Ergonomics (the thumb is the cursor)
|
|
90
|
+
|
|
91
|
+
- Tap targets ≥ 44px (48px preferred) with ≥ 8px gaps; small text links get
|
|
92
|
+
padded hit areas. Primary actions in the bottom half on app-register
|
|
93
|
+
screens; destructive actions OUT of easy thumb reach.
|
|
94
|
+
- Respect the gesture map: horizontal edge swipes (back), bottom edge (home)
|
|
95
|
+
— don't hang custom gestures on them; carousels stop 16px short of edges.
|
|
96
|
+
- Inputs: correct `type/inputmode/autocomplete` (ux.md §2), font-size ≥ 16px
|
|
97
|
+
(iOS zoom), the focused field scrolls above the keyboard, forms in one
|
|
98
|
+
column, no fixed elements covering inputs while the keyboard is up.
|
|
99
|
+
- Safe areas: `viewport-fit=cover` + `env(safe-area-inset-*)` padding on
|
|
100
|
+
fixed bars/corners; nothing under the notch or home indicator.
|
|
101
|
+
- No hover-dependent anything: whatever desktop hover revealed is visible by
|
|
102
|
+
default, in-view-triggered, or behind an explicit tap (DESIGN.md §13).
|
|
103
|
+
|
|
104
|
+
## 5. Mobile verification (part of the runtime pass)
|
|
105
|
+
|
|
106
|
+
At 390×844 (plus one small check at 320px):
|
|
107
|
+
|
|
108
|
+
1. Walk every section: no horizontal body scroll, no clipped text/controls,
|
|
109
|
+
no element under fixed bars (DESIGN.md §15 at mobile widths).
|
|
110
|
+
2. Run ux.md §7's audit at this width (menu, forms, taps, console).
|
|
111
|
+
3. Scroll the full page fast: reveals keep up, nothing janks, sticky elements
|
|
112
|
+
behave through the URL-bar resize.
|
|
113
|
+
4. Confirm the motion translation shipped (§2): press states everywhere, hero
|
|
114
|
+
≤ 600ms, heavy effects swapped for their mobile strategy — name what runs
|
|
115
|
+
on mobile vs desktop in the final report.
|
|
116
|
+
5. If media/3D shipped: posters load, loops play inline (not fullscreen),
|
|
117
|
+
pause off-screen.
|
|
@@ -10,7 +10,12 @@ halved parallax, 600ms mobile entrance budget) — decide it at design time.
|
|
|
10
10
|
If the requested motion needs structure the current markup can't express (pinned
|
|
11
11
|
sections, split text, persistent stages), use DESIGN.md §11's transformation-depth
|
|
12
12
|
ladder: offer restructure as an option and, once confirmed, rebuild the markup —
|
|
13
|
-
don't fake choreography onto the old skeleton.
|
|
13
|
+
don't fake choreography onto the old skeleton. When the page's imagery or video
|
|
14
|
+
participates in the choreography (reveals, scrubbed sequences, distortion,
|
|
15
|
+
hover-woken loops), read `media.md` — media is motion material there, with the
|
|
16
|
+
DOM-tier and WebGL treatment vocabularies and the generation pipeline.
|
|
17
|
+
On phones the whole inventory recalibrates: `mobile.md` §2 is the translation
|
|
18
|
+
table (what keeps, what halves, what dies) — decide it at design time.
|
|
14
19
|
|
|
15
20
|
## 0. Pick the tool by the job, not by habit
|
|
16
21
|
|
|
@@ -219,4 +224,6 @@ A motion request is fulfilled only if the final code contains, verifiably
|
|
|
219
224
|
Before reporting done, list which inventory items shipped and where (element +
|
|
220
225
|
trigger). "The page has hover states" does not clear dial 7+. If a listed item
|
|
221
226
|
was deliberately cut, say so and why. This inventory is what the SKILL.md
|
|
222
|
-
|
|
227
|
+
verification pass checks against — and its runtime stage must PROVE the items
|
|
228
|
+
run (transforms changing, triggers firing, console clean), not just find them
|
|
229
|
+
in the source.
|
|
@@ -10,8 +10,11 @@ craft discipline, not the absence of one.
|
|
|
10
10
|
|
|
11
11
|
It EXTENDS DESIGN.md (everything applies; this file tightens the dials). It does
|
|
12
12
|
NOT stack with `immersive`/`cinematic` — those are different registers. It pairs
|
|
13
|
-
well with a light dose of `interaction` (press states, underline draws)
|
|
14
|
-
first tier of `motion` (one hero sequence, 2-3 in-view reveals)
|
|
13
|
+
well with a light dose of `interaction` (press states, underline draws), the
|
|
14
|
+
first tier of `motion` (one hero sequence, 2-3 in-view reveals), `ux` (this
|
|
15
|
+
register's audience punishes broken function hardest), and media.md's quiet
|
|
16
|
+
treatments only (ken-burns, curtain reveals, one hover-woken loop — imagery
|
|
17
|
+
here is generated/sourced to ONE photographic grade, media.md §1).
|
|
15
18
|
|
|
16
19
|
## 0. The register: expensive silence
|
|
17
20
|
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
# Dreative Specialist Skill — Functional UX (everything works)
|
|
2
|
+
|
|
3
|
+
Load this file when `plan.skills` includes `ux`, for ANY product-register page,
|
|
4
|
+
and whenever a redesign touches navigation, forms, or stateful views. It EXTENDS
|
|
5
|
+
DESIGN.md §9 (the product floor) into a full working-page contract. Its premise:
|
|
6
|
+
a beautiful page where the menu doesn't open, a link 404s, or an effect eats
|
|
7
|
+
clicks is a FAILED page — visual craft cannot compensate for broken function.
|
|
8
|
+
This skill is the reason "immersive but broken" never ships: it defines what
|
|
9
|
+
"works" means, mechanically, and the runtime verification pass (SKILL.md) tests
|
|
10
|
+
against it.
|
|
11
|
+
|
|
12
|
+
## 0. The working-page contract
|
|
13
|
+
|
|
14
|
+
Every page you ship satisfies, verifiably:
|
|
15
|
+
|
|
16
|
+
1. Every visible control does something real (or is explicitly disabled with a
|
|
17
|
+
reason). No dead buttons, no `href="#"`, no `onClick={() => {}}`.
|
|
18
|
+
2. Every navigation target resolves — internal routes exist, anchors match real
|
|
19
|
+
ids, external links open safely (`rel="noopener"`, `target="_blank"` only
|
|
20
|
+
for true externals).
|
|
21
|
+
3. Every stateful view renders all its states (loading/empty/error/success),
|
|
22
|
+
not just the happy path.
|
|
23
|
+
4. Keyboard alone can operate everything a pointer can.
|
|
24
|
+
5. Nothing decorative intercepts input, blocks scroll, or steals focus.
|
|
25
|
+
|
|
26
|
+
## 1. Navigation
|
|
27
|
+
|
|
28
|
+
- **Links resolve.** Before shipping, list every `href`/`to`/`navigate` target
|
|
29
|
+
and check each exists (route table, file, or real URL). A designed 404 is
|
|
30
|
+
still a 404.
|
|
31
|
+
- **Active state**: the nav marks the current page/section (aria-current +
|
|
32
|
+
visual). Section-scroll pages update it via IntersectionObserver.
|
|
33
|
+
- **Mobile menu is a component, not a hope**: opens AND closes (button, Esc,
|
|
34
|
+
backdrop click, and on route change); scroll-locks the body while open
|
|
35
|
+
(`overflow:hidden` on html, restore on close — with scrollbar-gutter
|
|
36
|
+
compensation so the page doesn't shift); traps focus while open and returns
|
|
37
|
+
focus to the trigger on close; the toggle reflects state
|
|
38
|
+
(`aria-expanded`, icon morph). Test the open→navigate→back sequence — stale
|
|
39
|
+
open menus after route changes are the #1 shipped-menu bug.
|
|
40
|
+
- **Anchors under fixed headers**: every in-page anchor target gets
|
|
41
|
+
`scroll-margin-top` ≥ header height; smooth-scroll respects reduced-motion.
|
|
42
|
+
- **Logo → home. Back button works** — spatial/SPA transitions must not break
|
|
43
|
+
history (immersive.md §1); modals and drawers close on back where users
|
|
44
|
+
expect it (mobile especially).
|
|
45
|
+
- **Custom scroll (Lenis)** must not break anchors, keyboard scrolling
|
|
46
|
+
(space/PgDn/arrows), or focus-into-view; wire `lenis.scrollTo` for anchor
|
|
47
|
+
clicks and leave native behavior for the rest.
|
|
48
|
+
|
|
49
|
+
## 2. Forms
|
|
50
|
+
|
|
51
|
+
- Every form submits somewhere real, or is explicitly wired to a stub with a
|
|
52
|
+
visible success simulation — never a button that swallows the click.
|
|
53
|
+
- Labels above inputs (placeholder-as-label banned, DESIGN.md §9);
|
|
54
|
+
autocomplete attributes on identity fields; correct `type`/`inputmode`
|
|
55
|
+
(email, tel, numeric) so mobile keyboards match.
|
|
56
|
+
- Validate on submit first (not on first keystroke); after first submit,
|
|
57
|
+
re-validate per field on blur/change. Errors inline, next to the field,
|
|
58
|
+
specific ("Enter a valid email"), with `aria-describedby` wiring and focus
|
|
59
|
+
moved to the first invalid field.
|
|
60
|
+
- Submit feedback: button enters loading state (spinner inside, fixed width,
|
|
61
|
+
interaction.md §5), double-submit prevented, success confirmed visibly
|
|
62
|
+
(inline message or state change — not just a toast that may be missed),
|
|
63
|
+
failure recoverable (inputs keep their values; never wipe a form on error).
|
|
64
|
+
- Enter submits single-field forms (newsletter). Required fields marked; the
|
|
65
|
+
disabled-until-valid pattern only when errors show on hover/focus of the
|
|
66
|
+
disabled button, otherwise keep the button enabled and validate on click.
|
|
67
|
+
|
|
68
|
+
## 3. State coverage (every data view)
|
|
69
|
+
|
|
70
|
+
For each list/table/feed/detail view, all four states are designed and
|
|
71
|
+
reachable: **loading** (skeleton shaped like the content, DESIGN.md §9),
|
|
72
|
+
**empty** (teaches the interface: what this will show + the action that fills
|
|
73
|
+
it — never a blank area or a lonely "No data"), **error** (what happened + a
|
|
74
|
+
retry affordance), **populated** (including the long-content case: 100 items,
|
|
75
|
+
40-character names, overflow handled per DESIGN.md §15). Async actions get
|
|
76
|
+
optimistic UI only when low-stakes (DESIGN.md §6); destructive actions get
|
|
77
|
+
confirmation and, ideally, undo instead of a scary modal.
|
|
78
|
+
|
|
79
|
+
## 4. Keyboard, focus, and the hit-area audit
|
|
80
|
+
|
|
81
|
+
- Full tab walk: every interactive element reachable in visual order, operable
|
|
82
|
+
(Enter/Space), with a visible `:focus-visible` ring (interaction.md §0), and
|
|
83
|
+
escapable (no traps outside intentional modal traps).
|
|
84
|
+
- Whatever hover reveals, focus reveals (cards' secondary actions, hover-woken
|
|
85
|
+
media, dropdown menus). Custom gestures (drag, click-and-hold) always have a
|
|
86
|
+
plain keyboard/click equivalent (cinematic.md §2).
|
|
87
|
+
- **The pointer-events audit** (the #1 cause of "cool but broken"): walk every
|
|
88
|
+
overlay in the stacking order — canvases, gradient/grain layers, custom
|
|
89
|
+
cursor layers, transition curtains, closed menus, preloaders — and verify
|
|
90
|
+
each is `pointer-events: none` (or removed from the DOM) whenever it is not
|
|
91
|
+
actively being interacted with. A finished preloader or a closed fullscreen
|
|
92
|
+
menu sitting at `opacity:0` with pointer-events on is an invisible wall over
|
|
93
|
+
the whole page. Then hit-test the controls: click every button/link at its
|
|
94
|
+
visual position — if something above it swallows the click, that's a §15
|
|
95
|
+
spatial-integrity fail, fix the layer not the button.
|
|
96
|
+
- Modals/drawers: focus trapped inside, Esc closes, focus returns to trigger,
|
|
97
|
+
`aria-modal` + labelled; scrim click closes (unless data-loss risk).
|
|
98
|
+
- Semantic HTML first: real `<button>`/`<a>`/`<nav>`/`<main>`/headings in
|
|
99
|
+
order — divs-with-onClick fail half this section automatically.
|
|
100
|
+
|
|
101
|
+
## 5. Scroll and layout stability
|
|
102
|
+
|
|
103
|
+
- Zero layout shift from async content: media boxes sized up front (media.md
|
|
104
|
+
§5), fonts `swap` with metric-compatible fallbacks, skeletons the same size
|
|
105
|
+
as what replaces them, no banners that push content after load.
|
|
106
|
+
- Scroll restoration: back/forward returns to the previous position (default
|
|
107
|
+
browser behavior — don't break it with manual scroll-to-top on every route;
|
|
108
|
+
scroll to top only on forward navigation to a NEW page).
|
|
109
|
+
- Fixed bars: content padded so nothing hides beneath them (DESIGN.md §15);
|
|
110
|
+
100dvh not 100vh; no horizontal body scroll at 320px.
|
|
111
|
+
- Long pages get orientation aids: sticky nav or progress indication, and a
|
|
112
|
+
footer that actually ends the page (no infinite-feeling voids).
|
|
113
|
+
|
|
114
|
+
## 6. Feedback and perceived performance
|
|
115
|
+
|
|
116
|
+
- Every async action acknowledges input within 100ms (pressed state, spinner,
|
|
117
|
+
optimistic change) — silence after a click reads as broken even when it
|
|
118
|
+
works.
|
|
119
|
+
- Toasts only for transient global events; they stack in ONE corner slot
|
|
120
|
+
(DESIGN.md §15), auto-dismiss ≥ 4s, pause on hover, and are `aria-live`.
|
|
121
|
+
- Destructive/irreversible actions: confirm with specifics ("Delete 3 items?"),
|
|
122
|
+
never bare "Are you sure?"; prefer undo-toast over confirm-modal when safe.
|
|
123
|
+
- Copy per DESIGN.md §8's UX-writing rules: buttons say what they do, errors
|
|
124
|
+
say what to do next.
|
|
125
|
+
|
|
126
|
+
## 7. The functional audit (run at verification time)
|
|
127
|
+
|
|
128
|
+
This is the checklist the runtime verification pass (SKILL.md) executes with
|
|
129
|
+
browser tools — or walks mentally, file by file, when no browser exists:
|
|
130
|
+
|
|
131
|
+
1. Click every nav link + the logo; confirm each lands where labeled.
|
|
132
|
+
2. Open and close the mobile menu (both directions, plus Esc, plus navigate-
|
|
133
|
+
while-open) at 390px width.
|
|
134
|
+
3. Submit each form empty → see inline errors; submit valid → see success
|
|
135
|
+
state; confirm no double-submit.
|
|
136
|
+
4. Tab through the page start to finish; note any unreachable/invisible-focus/
|
|
137
|
+
trapped stop.
|
|
138
|
+
5. Hit-test 5+ controls in effect-heavy regions (hero, canvas overlays,
|
|
139
|
+
floating elements) — every click must land.
|
|
140
|
+
6. Trigger each data view's empty/error state if reachable (or verify the
|
|
141
|
+
branch exists in code).
|
|
142
|
+
7. Console: zero uncaught errors during all of the above.
|
|
143
|
+
|
|
144
|
+
Report the result as a pass/fail list, fix fails, re-run the failed items once.
|