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.
Files changed (48) hide show
  1. package/README.md +49 -27
  2. package/dist/cli/audit.js +206 -0
  3. package/dist/cli/audit.test.js +79 -0
  4. package/dist/cli/docsCheck.js +163 -0
  5. package/dist/cli/docsCheck.test.js +8 -0
  6. package/dist/cli/index.js +45 -9
  7. package/dist/server/preview.js +73 -73
  8. package/dist/server/store.js +11 -0
  9. package/dist/shared/artifacts.js +162 -0
  10. package/dist/shared/design.js +42 -22
  11. package/dist/shared/ruleSystem.js +130 -0
  12. package/dist/shared/ruleSystem.test.js +187 -0
  13. package/dist/shared/skillSystem.js +173 -0
  14. package/dist/shared/skillSystem.test.js +110 -0
  15. package/dist/ui/assets/{index--vztc_MR.js → index-CKwmbx2j.js} +13 -13
  16. package/dist/ui/index.html +12 -12
  17. package/package.json +5 -3
  18. package/skill/dreative/DESIGN.md +121 -93
  19. package/skill/dreative/PLAN.md +229 -92
  20. package/skill/dreative/SKILL.md +218 -137
  21. package/skill/dreative/frameworks/nextjs.md +13 -0
  22. package/skill/dreative/frameworks/react-vite.md +12 -0
  23. package/skill/dreative/frameworks/styling.md +14 -0
  24. package/skill/dreative/frameworks/sveltekit.md +10 -0
  25. package/skill/dreative/frameworks/vue-nuxt.md +12 -0
  26. package/skill/dreative/recipes/3d-recipes.md +44 -0
  27. package/skill/dreative/recipes/cinematic-recipes.md +19 -0
  28. package/skill/dreative/recipes/immersive-recipes.md +18 -0
  29. package/skill/dreative/recipes/media-recipes.md +60 -0
  30. package/skill/dreative/recipes/motion-recipes.md +44 -0
  31. package/skill/dreative/references/ARTIFACTS.md +180 -0
  32. package/skill/dreative/references/REFLEX_FONTS.json +44 -0
  33. package/skill/dreative/references/RULES.json +186 -0
  34. package/skill/dreative/references/SKILL_CONTRACT.md +30 -0
  35. package/skill/dreative/references/TIERS.md +42 -0
  36. package/skill/dreative/schemas/plan.schema.json +241 -0
  37. package/skill/dreative/schemas/verify.schema.json +61 -0
  38. package/skill/dreative/skills/3d.md +94 -267
  39. package/skill/dreative/skills/cinematic.md +56 -232
  40. package/skill/dreative/skills/experimental.md +108 -95
  41. package/skill/dreative/skills/immersive.md +61 -223
  42. package/skill/dreative/skills/interaction.md +9 -1
  43. package/skill/dreative/skills/media.md +135 -564
  44. package/skill/dreative/skills/mobile.md +128 -117
  45. package/skill/dreative/skills/motion.md +89 -256
  46. package/skill/dreative/skills/refined.md +116 -102
  47. package/skill/dreative/skills/ux.md +155 -144
  48. package/dist/server/ai.js +0 -177
@@ -1,117 +1,128 @@
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 craftedone 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
- columnnever 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 shipped2): 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.
1
+ # Dreative Specialist Skill — Mobile Excellence
2
+
3
+ ## Contract
4
+
5
+ Universal foundation: ux and baseline mobile apply to every web page.
6
+
7
+ Follow `../references/SKILL_CONTRACT.md`. Dependency: `ux`. This skill is
8
+ universal for web work. Deliver a section-by-section mobile translation, touch
9
+ targets, responsive media/effect budgets, and approximately 390px verification.
10
+ It is never satisfied by shrinking desktop. Done means navigation, content,
11
+ forms, orientation/viewport behavior, performance, and reduced motion pass on a
12
+ coarse pointer.
13
+
14
+ Load this file when `plan.skills` includes `mobile`, when the brief says
15
+ mobile-first / most users are on phones / "make the mobile version great", or
16
+ when an app-register product is primarily used on mobile. It EXTENDS DESIGN.md
17
+ §13 (which governs how desktop effects DEGRADE); this file is about designing
18
+ mobile as a first-class surface in its own right clean, tidy, and still
19
+ genuinely animated and premium, just calibrated to a 390px viewport, a thumb,
20
+ and a battery. It STACKS with whatever treatments were chosen: motion/3d/
21
+ immersive briefs get their mobile-native expression here, never a cropped
22
+ desktop.
23
+
24
+ ## 0. The register: calm confidence, not shrunken desktop
25
+
26
+ Mobile premium reads differently from desktop premium: less simultaneous
27
+ motion, more focus per viewport, perfect ergonomics. The dial translation:
28
+ desktop ambition N mobile ambition N−2. A desktop dial-8 site ships a
29
+ dial-6 phone experience that feels JUST as crafted one hero moment, silky
30
+ scroll reveals, tactile presses rather than a stuttering copy of the desktop
31
+ choreography.
32
+
33
+ - **One idea per viewport.** The phone viewport is a frame; compose each
34
+ screenful like one (hero = one headline + one visual + one CTA, nothing
35
+ else). If a desktop section held three things, the mobile version stacks
36
+ them as three clean beats or cuts to the strongest one.
37
+ - **Tidy is the aesthetic.** Consistent gutters (20-24px), one column
38
+ discipline, generous vertical rhythm (56-80px between sections), no element
39
+ closer than 8px to another. Clutter reads twice as loud at 390px.
40
+ - **Type recalibrated, not just clamped**: hero 2-3rem (2 lines max with the
41
+ REAL copy), body stays ≥16px, line-length falls out of the gutters — check
42
+ headlines don't orphan single words (`text-wrap: balance`).
43
+
44
+ ## 1. Layout patterns that are mobile-native
45
+
46
+ - Asymmetric desktop grids collapse to intentional single-column ORDER
47
+ (decide what comes first usually visual headline → support → CTA), not
48
+ DOM-order accidents. Check the collapsed order reads as a story.
49
+ - Horizontal scroll is mobile's extra axis: card shelves, galleries, and
50
+ chip rows as swipeable strips (`overflow-x-auto` + `scroll-snap-type: x
51
+ mandatory` on short strips, edge inset, visible peek of the next card —
52
+ the peek IS the affordance; no scrollbars, no arrows).
53
+ - Sticky bottom bar for the primary action on conversion/product pages
54
+ (add-to-cart, main CTA): thumb-reach beats footer CTA; respect
55
+ `env(safe-area-inset-bottom)`.
56
+ - Accordions/tabs for secondary density (specs, FAQs) instead of long walls;
57
+ tables become stacked cards or a scrollable container with sticky first
58
+ column never squeezed 6-column tables.
59
+ - Nav: the fullscreen menu is mobile's one theatrical moment — staggered
60
+ link entrance (line-mask, 60ms stagger), big touch-sized links (≥ 48px
61
+ rows), contact/socials in the footer of the overlay. Wired per ux.md §1
62
+ (focus trap, scroll lock, Esc/back closes).
63
+
64
+ ## 2. Motion on mobile (still premium, never crazy)
65
+
66
+ The motion inventory scaled to touch (extends motion.md §5):
67
+
68
+ - **Keep**: one composed hero entrance (≤ 600ms total), line-mask headline
69
+ reveals, in-view section reveals (2-3, `once: true`), press states on
70
+ EVERYTHING tappable (`active:scale-[0.98]` on mobile this is the main
71
+ interaction feedback, since hover doesn't exist), marquees (pause
72
+ off-screen), counters, accordion springs.
73
+ - **Translate**: parallax halves or dies (§13); pinned sequences short
74
+ sticky sections (≤ 1.5 viewports) or plain stacked beats; hover-woken media
75
+ in-view-woken (loop plays while 60% visible, pauses off-screen) or
76
+ tap-to-play; magnetic/cursor effects → gone entirely, replaced by press
77
+ feedback; drag-to-explore swipe carousel or index list as PRIMARY
78
+ (DESIGN.md §13).
79
+ - **Ban on mobile**: smooth-scroll libraries at full strength (Lenis: disable
80
+ or `syncTouch` carefully fighting native momentum feels broken), more than
81
+ one scrubbed sequence, simultaneous animation of > 4 elements, any effect
82
+ that drops the scroll below 60fps on a mid-range phone.
83
+ - Scroll reveals trigger earlier (`margin: "-10% 0px"` not -20%) — mobile
84
+ viewports are short and users scroll fast; late reveals = users see blank.
85
+
86
+ ## 3. 3D and heavy media on mobile
87
+
88
+ - Default: replace live 3D with the poster or a pre-rendered loop (3d.md §5,
89
+ media.md). A generated video loop IS the mobile 3D strategy in most cases —
90
+ visually near-identical, thermally free.
91
+ - If live 3D ships: dpr capped at 2, sim/particle counts halved, post-FX off,
92
+ `frameloop="demand"` where possible, pause on scroll-out and
93
+ `document.hidden`. Test the thermal story: 30s of idling must not heat the
94
+ phone (no full-rate rAF on static scenes).
95
+ - Video: one playing loop per viewport, 2MB mobile variants
96
+ (`<source media>` or renditions), `playsinline` mandatory, poster always.
97
+ - Images: serve mobile-sized renditions (`srcset/sizes`) a 2400px hero on a
98
+ 390px screen is a failed budget even when it looks fine.
99
+
100
+ ## 4. Ergonomics (the thumb is the cursor)
101
+
102
+ - Tap targets 44px (48px preferred) with ≥ 8px gaps; small text links get
103
+ padded hit areas. Primary actions in the bottom half on app-register
104
+ screens; destructive actions OUT of easy thumb reach.
105
+ - Respect the gesture map: horizontal edge swipes (back), bottom edge (home)
106
+ don't hang custom gestures on them; carousels stop 16px short of edges.
107
+ - Inputs: correct `type/inputmode/autocomplete` (ux.md §2), font-size ≥ 16px
108
+ (iOS zoom), the focused field scrolls above the keyboard, forms in one
109
+ column, no fixed elements covering inputs while the keyboard is up.
110
+ - Safe areas: `viewport-fit=cover` + `env(safe-area-inset-*)` padding on
111
+ fixed bars/corners; nothing under the notch or home indicator.
112
+ - No hover-dependent anything: whatever desktop hover revealed is visible by
113
+ default, in-view-triggered, or behind an explicit tap (DESIGN.md §13).
114
+
115
+ ## 5. Mobile verification (part of the runtime pass)
116
+
117
+ At 390×844 (plus one small check at 320px):
118
+
119
+ 1. Walk every section: no horizontal body scroll, no clipped text/controls,
120
+ no element under fixed bars (DESIGN.md §15 at mobile widths).
121
+ 2. Run ux.md §7's audit at this width (menu, forms, taps, console).
122
+ 3. Scroll the full page fast: reveals keep up, nothing janks, sticky elements
123
+ behave through the URL-bar resize.
124
+ 4. Confirm the motion translation shipped (§2): press states everywhere, hero
125
+ ≤ 600ms, heavy effects swapped for their mobile strategy — name what runs
126
+ on mobile vs desktop in the final report.
127
+ 5. If media/3D shipped: posters load, loops play inline (not fullscreen),
128
+ pause off-screen.