ui-ux-master 1.2.1 → 1.5.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.
@@ -0,0 +1,407 @@
1
+ # Design System Schema
2
+
3
+ This file defines the portable 9-section design system format used by UI/UX Master. Every project should have a `.ui-ux-memory.md` at its root that follows this schema. Every design output reads from this schema — when it's populated, no design decision needs to be re-established.
4
+
5
+ Use this as the template for creating or updating a project's design system record.
6
+
7
+ ---
8
+
9
+ ## How to Use
10
+
11
+ When starting work on a project:
12
+
13
+ 1. Look for `.ui-ux-memory.md` at the project root.
14
+ 2. If it exists: read all 9 sections before designing. Follow the schema as the source of truth.
15
+ 3. If it doesn't exist: create it using this template. Fill in what is known. Mark unknown sections with `[not yet defined]`.
16
+ 4. After each design session: update the schema with any new durable decisions (new component pattern, new color token, new spacing rule).
17
+ 5. The schema is **living documentation** — it grows with the project.
18
+
19
+ ---
20
+
21
+ ## The 9-Section Schema
22
+
23
+ ---
24
+
25
+ ### Section 1 — Color
26
+
27
+ ```markdown
28
+ ## Color
29
+
30
+ ### Palette
31
+ | Role | Token | Hex | OKLch | Usage |
32
+ |------|-------|-----|-------|-------|
33
+ | Background | --color-bg | #FAFAFA | oklch(99% 0.002 264) | Page background |
34
+ | Surface | --color-surface | #F4F4F6 | oklch(97% 0.003 264) | Card, panel backgrounds |
35
+ | Surface raised | --color-surface-2 | #EDEDF0 | oklch(94% 0.004 264) | Hover states, nested surfaces |
36
+ | Border | --color-border | #DDDDE3 | oklch(88% 0.005 264) | Dividers, input borders |
37
+ | Text primary | --color-text-primary | #1A1A22 | oklch(15% 0.010 264) | Body copy, headings |
38
+ | Text secondary | --color-text-secondary | #666677 | oklch(45% 0.010 264) | Meta, captions, labels |
39
+ | Text muted | --color-text-muted | #999AAA | oklch(65% 0.008 264) | Placeholders, disabled |
40
+ | Accent / Brand | --color-accent | #4361EE | oklch(52% 0.18 264) | CTAs, links, active states |
41
+ | Accent hover | --color-accent-hover | #3451DE | oklch(45% 0.18 264) | Hover on accent |
42
+ | Success | --color-success | #1A7F5A | oklch(52% 0.16 142) | Positive states |
43
+ | Warning | --color-warning | #D4A017 | oklch(72% 0.18 72) | Caution states |
44
+ | Error | --color-error | #C0392B | oklch(52% 0.22 25) | Error states |
45
+ | Info | --color-info | #0072CE | oklch(52% 0.18 230) | Informational states |
46
+
47
+ ### Dark Mode
48
+ [yes / no — if yes, include dark-mode token overrides]
49
+
50
+ ### Color Rules
51
+ - Primary brand color: [token] — used for CTAs, active navigation, key links only.
52
+ - Maximum accent colors active simultaneously: [number].
53
+ - Gradient: [allowed / not allowed — if allowed, describe usage].
54
+ - Background: [light / dark / both].
55
+ ```
56
+
57
+ ---
58
+
59
+ ### Section 2 — Typography
60
+
61
+ ```markdown
62
+ ## Typography
63
+
64
+ ### Fonts
65
+ | Role | Family | Fallback | Weights loaded |
66
+ |------|--------|----------|----------------|
67
+ | Display / heading | [name] | [fallback] | [400, 600, 700] |
68
+ | Body | [name] | system-ui, sans-serif | [400, 500] |
69
+ | Mono / code | [name] | monospace | [400] |
70
+
71
+ ### Scale
72
+ | Token | Size | Line-height | Weight | Tracking | Use |
73
+ |-------|------|-------------|--------|----------|-----|
74
+ | --text-xs | 11px | 1.4 | 400 | normal | Captions, labels |
75
+ | --text-sm | 13px | 1.5 | 400 | normal | Secondary body |
76
+ | --text-base | 15px | 1.6 | 400 | normal | Primary body |
77
+ | --text-lg | 17px | 1.6 | 400-500 | normal | Lead text |
78
+ | --text-xl | 20px | 1.4 | 500-600 | -0.01em | Section headings |
79
+ | --text-2xl | 24px | 1.3 | 600 | -0.02em | Page subheadings |
80
+ | --text-3xl | 32px | 1.2 | 600-700 | -0.02em | H2 |
81
+ | --text-4xl | 40-56px | 1.1 | 700 | -0.03em | H1, hero |
82
+
83
+ ### Typography Rules
84
+ - Heading font pairing with body: [describe].
85
+ - Max heading size at desktop: [size].
86
+ - Max heading size at mobile: [size].
87
+ - Line-length (prose): max [60-72]ch.
88
+ - Minimum body font size: [14px].
89
+ ```
90
+
91
+ ---
92
+
93
+ ### Section 3 — Spacing
94
+
95
+ ```markdown
96
+ ## Spacing
97
+
98
+ ### System
99
+ Base unit: [4px / 8px]
100
+
101
+ | Token | Value | Use |
102
+ |-------|-------|-----|
103
+ | --space-1 | 4px | Micro gaps, icon padding |
104
+ | --space-2 | 8px | Tight stacks, inline gaps |
105
+ | --space-3 | 12px | Dense component padding |
106
+ | --space-4 | 16px | Standard component padding |
107
+ | --space-6 | 24px | Card padding, section inner |
108
+ | --space-8 | 32px | Between components |
109
+ | --space-12 | 48px | Section separation |
110
+ | --space-16 | 64px | Major section gaps |
111
+ | --space-24 | 96px | Hero / CTA section padding |
112
+
113
+ ### Spacing Rules
114
+ - Component padding: [token].
115
+ - Card inner padding: [token].
116
+ - Page horizontal padding (mobile): [token].
117
+ - Page horizontal padding (desktop): [token].
118
+ - Grid gutter: [token].
119
+ - Max content width: [px].
120
+ ```
121
+
122
+ ---
123
+
124
+ ### Section 4 — Layout
125
+
126
+ ```markdown
127
+ ## Layout
128
+
129
+ ### Grid
130
+ | Breakpoint | Columns | Gutter | Margin |
131
+ |------------|---------|--------|--------|
132
+ | Mobile 375px | 4 | 16px | 16px |
133
+ | Tablet 768px | 8 | 20px | 24px |
134
+ | Desktop 1024px | 12 | 24px | 40px |
135
+ | Wide 1440px+ | 12 | 24px | auto (centered) |
136
+
137
+ ### Container
138
+ - Max content width: [px].
139
+ - Centered: yes.
140
+ - Full-bleed sections: [allowed / not — describe when].
141
+
142
+ ### Responsive Rules
143
+ - Mobile-first: [yes / no].
144
+ - Primary breakpoints: [list].
145
+ - Touch targets minimum: 44×44px.
146
+ - Any mobile-specific patterns: [describe].
147
+
148
+ ### Brand Method
149
+ - Primary design method: [Product Cinema / Utility Command Center / Editorial Brand World / etc.]
150
+ - Reference file: `references/brand-method-[name].md`
151
+ ```
152
+
153
+ ---
154
+
155
+ ### Section 5 — Components
156
+
157
+ ```markdown
158
+ ## Components
159
+
160
+ List all established component patterns. For each component, record the key decisions so they are not re-decided.
161
+
162
+ ### Button
163
+ - Primary: background [token], text [token], border-radius [token], padding [token].
164
+ - Secondary: [outlined / ghost / filled-muted].
165
+ - Sizes: [sm / md / lg].
166
+ - Loading state: [spinner inside / text change].
167
+ - Disabled: [opacity / different color].
168
+ - Focus: [ring spec].
169
+
170
+ ### Input / Form
171
+ - Border: [token], focus border: [accent token].
172
+ - Label: above or floating?
173
+ - Error state: [border color + message below].
174
+ - Helper text: [below input, muted color].
175
+ - Required marker: [asterisk / word].
176
+
177
+ ### Card
178
+ - Background: [token].
179
+ - Border: [token] or shadow: [token].
180
+ - Border-radius: [token].
181
+ - Padding: [token].
182
+ - Hover state: [describe].
183
+
184
+ ### Navigation
185
+ - Type: [sticky / scroll-away / sidebar / bottom-nav].
186
+ - Background: [on-scroll behavior].
187
+ - Mobile: [hamburger / bottom-nav / other].
188
+
189
+ ### [Additional components — add as they are established]
190
+ ```
191
+
192
+ ---
193
+
194
+ ### Section 6 — Motion
195
+
196
+ ```markdown
197
+ ## Motion
198
+
199
+ ### Principles
200
+ - Motion philosophy: [purposeful / minimal / expressive / none].
201
+ - Default easing: [ease-out / ease-in-out / spring].
202
+ - Default duration: [150ms / 200ms / 300ms].
203
+
204
+ ### Token Set
205
+ | Token | Value | Use |
206
+ |-------|-------|-----|
207
+ | --duration-instant | 100ms | Immediate feedback (button tap) |
208
+ | --duration-fast | 150ms | Hover states, small transitions |
209
+ | --duration-normal | 250ms | Panel open/close, dropdown |
210
+ | --duration-slow | 400ms | Page transitions, large reveals |
211
+ | --duration-slower | 600ms | Scroll-triggered animations |
212
+ | --ease-default | cubic-bezier(0.16, 1, 0.3, 1) | Standard ease-out |
213
+ | --ease-spring | cubic-bezier(0.34, 1.56, 0.64, 1) | Playful/springy |
214
+ | --ease-in-out | cubic-bezier(0.4, 0, 0.2, 1) | Symmetric transitions |
215
+
216
+ ### Reduced Motion
217
+ - All animations wrapped in `@media (prefers-reduced-motion: no-preference)`.
218
+ - Reduced motion fallback: [instant transition / static].
219
+
220
+ ### Allowed Animations
221
+ [List what is allowed — e.g., fade-in on scroll, hover lifts, page transitions]
222
+
223
+ ### Forbidden Animations
224
+ [List what is not allowed — e.g., no autoplay videos with sound, no infinite spinning logos]
225
+ ```
226
+
227
+ ---
228
+
229
+ ### Section 7 — Voice and Copy
230
+
231
+ ```markdown
232
+ ## Voice and Copy
233
+
234
+ ### Brand Voice
235
+ - Tone: [formal / conversational / technical / playful / authoritative].
236
+ - Person: [first person "we" / second person "you" / impersonal].
237
+ - Reading level: [general / professional / expert].
238
+
239
+ ### Copy Rules
240
+ - Headlines: [sentence case / title case / all-caps].
241
+ - CTA copy: [imperative verb first — "Start free trial" not "Free trial"].
242
+ - Error messages: [describe the problem + say what to do — never just "Error"].
243
+ - Empty states: [explain why it's empty + offer an action — never just "No results"].
244
+ - Loading states: [describe what's loading — "Loading your projects…"].
245
+ - Confirmation messages: [specific — "Project saved" not just "Saved"].
246
+
247
+ ### Forbidden Copy Patterns
248
+ - No: "Seamlessly", "Effortlessly", "Powerful yet simple", "All-in-one".
249
+ - No invented metrics without a source.
250
+ - No lorem ipsum in high-fidelity output.
251
+ - No "Click here" as link text.
252
+
253
+ ### Localization
254
+ - Primary language: [language].
255
+ - RTL support: [yes / no].
256
+ - Key markets for i18n: [list if known].
257
+ ```
258
+
259
+ ---
260
+
261
+ ### Section 8 — Brand
262
+
263
+ ```markdown
264
+ ## Brand
265
+
266
+ ### Identity
267
+ - Brand name: [name].
268
+ - Tagline: [tagline or "not defined"].
269
+ - Brand personality: [3 adjectives].
270
+ - Brand anti-personality: [3 things the brand is NOT].
271
+
272
+ ### Assets
273
+ - Logo: [path or "not yet available"].
274
+ - Favicon: [path or "not yet available"].
275
+ - Icon set: [Lucide / Heroicons / Phosphor / custom].
276
+ - Illustration style: [describe or "none"].
277
+ - Photography style: [describe or "none"].
278
+
279
+ ### Brand Extraction
280
+ - Source: [URL / file / "not extracted"].
281
+ - Extracted on: [date or "not yet"].
282
+ - Confidence: [HIGH / MEDIUM / LOW / "not extracted"].
283
+ - Notes: [any caveats or approximations].
284
+
285
+ ### Visual Direction (if no brand)
286
+ - Active direction: [Neutral Modern / Dark Technical / Warm Editorial / Bold Energetic / Calm Trust / "not selected"].
287
+ - Status: [provisional — update when brand is confirmed / confirmed].
288
+ ```
289
+
290
+ ---
291
+
292
+ ### Section 9 — Anti-Patterns
293
+
294
+ ```markdown
295
+ ## Anti-Patterns
296
+
297
+ Record project-specific patterns that have been tried and rejected, in addition to the universal list in `references/output-quality-gates.md`.
298
+
299
+ ### Visual Anti-Patterns
300
+ - [Pattern]: [Why it was rejected for this project].
301
+ - [Add as patterns are identified and rejected].
302
+
303
+ ### Copy Anti-Patterns
304
+ - [Pattern]: [Why].
305
+
306
+ ### UX Anti-Patterns
307
+ - [Pattern]: [Why].
308
+
309
+ ### Technical Anti-Patterns
310
+ - [Pattern]: [Why — e.g. "No inline styles — we use CSS tokens only"].
311
+
312
+ ---
313
+ *Last updated: [date]*
314
+ *Updated by: [agent session or designer name]*
315
+ ```
316
+
317
+ ---
318
+
319
+ ## Schema Maintenance Rules
320
+
321
+ 1. **Read before design.** Always read the schema before starting any new screen or component on an existing project.
322
+ 2. **Write after design.** After any session that establishes a new durable decision, update the relevant section.
323
+ 3. **Tokens must be consistent.** If a new token is added to the schema, it must be consistent with existing tokens. No ad-hoc magic numbers.
324
+ 4. **Anti-patterns are permanent.** Once a pattern is added to Section 9, it stays unless explicitly reversed by the user.
325
+ 5. **Version the schema.** Update the "Last updated" line at the bottom of Section 9 after every meaningful change.
326
+ 6. **The schema is not a spec.** It records decisions, not deliverables. Component specs and screen specs live in `templates/component-spec.md` and `templates/ui-ux-brief.md`.
327
+
328
+ ---
329
+
330
+ ## MASTER + Page Overrides Hierarchy
331
+
332
+ For multi-page products, use a hierarchical design system file structure. This prevents global tokens from being re-established per page and allows page-specific deviations without polluting the master.
333
+
334
+ ### File Structure
335
+
336
+ ```
337
+ design-system/
338
+ ├── MASTER.md ← Global source of truth (all 9 sections)
339
+ └── pages/
340
+ ├── landing.md ← Landing page overrides only
341
+ ├── dashboard.md ← Dashboard overrides only
342
+ ├── checkout.md ← Checkout overrides only
343
+ ├── onboarding.md ← Onboarding overrides only
344
+ └── [page].md ← Any page-specific deviations
345
+ ```
346
+
347
+ ### MASTER.md
348
+
349
+ Contains the full 9-section schema. This is the global design system. Every page inherits from it unless overridden.
350
+
351
+ ### pages/[page].md
352
+
353
+ Contains **only the deviations** from the master. Do not repeat tokens from MASTER.md — only write what is different.
354
+
355
+ **Example `pages/dashboard.md`:**
356
+ ```markdown
357
+ # Dashboard — Design System Overrides
358
+
359
+ Inherits from: design-system/MASTER.md
360
+
361
+ ## Color Overrides
362
+ - --color-bg: var(--neutral-950) ← Dark mode for dashboard only
363
+ - --color-surface: var(--neutral-900)
364
+ - --color-text-primary: var(--neutral-50)
365
+
366
+ ## Layout Overrides
367
+ - Grid: sidebar (240px fixed) + main content (fluid)
368
+ - No hero section
369
+ - Compact spacing: --space-4 for most gaps (vs. --space-6 in master)
370
+
371
+ ## Component Overrides
372
+ - Nav: Left sidebar (not top nav from master)
373
+ - Cards: Dense data variant — --space-4 inner padding (vs. --space-6)
374
+ ```
375
+
376
+ ### Retrieval Protocol
377
+
378
+ When building any page, always follow this lookup order:
379
+
380
+ ```
381
+ 1. Check if design-system/pages/[current-page].md exists.
382
+ 2. If YES → Read the page file. Its rules override the master for this page.
383
+ 3. Read design-system/MASTER.md for everything NOT overridden in the page file.
384
+ 4. Combined rules = the complete design system for this page.
385
+ ```
386
+
387
+ **Context-aware prompt pattern:**
388
+ ```
389
+ I am building the [Page Name] page.
390
+ Please read design-system/MASTER.md for the global design system.
391
+ Also check if design-system/pages/[page-name].md exists.
392
+ If it exists, apply its rules as overrides on top of the master.
393
+ If not, use MASTER.md exclusively.
394
+ ```
395
+
396
+ ### When to Create a Page Override
397
+
398
+ Create a page override file when:
399
+ - The page uses a significantly different layout (sidebar nav, full-bleed, etc.)
400
+ - The page has a different color scheme (dark dashboard on a light-mode product)
401
+ - The page needs denser or more spacious spacing than the master
402
+ - The page has unique component variants not used elsewhere
403
+
404
+ Do **not** create a page override for:
405
+ - Minor copy differences
406
+ - Individual component states
407
+ - One-off color tweaks that should be global tokens anyway