@mstar-harness/opencode 0.6.12 → 0.6.14
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/harness-agents/architect.md +0 -1
- package/harness-agents/frontend-dev.md +0 -1
- package/harness-agents/fullstack-dev-2.md +0 -1
- package/harness-agents/fullstack-dev.md +0 -1
- package/harness-agents/ops-engineer.md +0 -1
- package/harness-agents/product-manager.md +0 -1
- package/harness-agents/project-manager.md +0 -1
- package/harness-agents/prompt-engineer.md +0 -1
- package/harness-agents/qa-engineer.md +0 -1
- package/harness-agents/qc-specialist-2.md +0 -1
- package/harness-agents/qc-specialist-3.md +0 -1
- package/harness-agents/qc-specialist.md +0 -1
- package/harness-agents/writing-specialist.md +0 -1
- package/harness-skills/mstar-design-md/SKILL.md +143 -0
- package/harness-skills/mstar-design-md/references/completeness-checklist.md +175 -0
- package/harness-skills/mstar-design-md/references/design-md-spec.md +378 -0
- package/harness-skills/mstar-design-md/references/vercel-example.md +138 -0
- package/harness-skills/mstar-design-md/templates/DESIGN.dark.md.template +133 -0
- package/harness-skills/mstar-design-md/templates/DESIGN.md.template +273 -0
- package/harness-skills/mstar-harness-core/SKILL.md +3 -2
- package/harness-skills/mstar-phase-gates/SKILL.md +6 -5
- package/harness-skills/mstar-roles/SKILL.md +5 -4
- package/harness-skills/mstar-roles/references/architect.md +3 -2
- package/harness-skills/mstar-roles/references/frontend-dev.md +2 -2
- package/harness-skills/mstar-roles/references/fullstack-dev-shared.md +1 -1
- package/harness-skills/mstar-roles/references/product-manager.md +1 -1
- package/harness-skills/mstar-roles/references/qa-engineer.md +1 -1
- package/harness-skills/mstar-roles/references/qc-specialist-shared.md +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,378 @@
|
|
|
1
|
+
# DESIGN.md Normative Spec
|
|
2
|
+
|
|
3
|
+
This document defines the normative structure, token naming conventions, and rules for a properly formed `DESIGN.md` file. It is the single source of truth for what each section means and how tokens should be defined.
|
|
4
|
+
|
|
5
|
+
## 1. File format
|
|
6
|
+
|
|
7
|
+
- Plain Markdown (`.md`) in project root
|
|
8
|
+
- UTF-8 encoding
|
|
9
|
+
- Multi-theme: `DESIGN.md` (light/default) + `DESIGN.dark.md` (dark variant, same token names)
|
|
10
|
+
|
|
11
|
+
## 2. Section definitions
|
|
12
|
+
|
|
13
|
+
Each section below maps to one heading in `DESIGN.md`. Sections are ordered as shown in Vercel Geist (recommended), but projects may omit sections not yet relevant.
|
|
14
|
+
|
|
15
|
+
### 2.1 Overview
|
|
16
|
+
|
|
17
|
+
**Purpose:** Declare the design system's identity — a short statement that grounds all downstream decisions.
|
|
18
|
+
|
|
19
|
+
**What to include:**
|
|
20
|
+
- Name of the design system
|
|
21
|
+
- Core aesthetic principles (e.g., minimal, high-contrast, playful)
|
|
22
|
+
- Primary audience (developer tools, consumer app, dashboard, etc.)
|
|
23
|
+
- Note whether this is a light theme, dark theme, or references another file for the opposite theme
|
|
24
|
+
|
|
25
|
+
**Example (minimal):**
|
|
26
|
+
|
|
27
|
+
```
|
|
28
|
+
# Acme Design
|
|
29
|
+
|
|
30
|
+
Acme Design is a minimal, high-contrast design system for our developer dashboard.
|
|
31
|
+
Prioritize readability and signal state through color and iconography, not decoration.
|
|
32
|
+
|
|
33
|
+
This is the Light theme. The Dark theme lives at `/DESIGN.dark.md`.
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
**Level relevance:** Level 1+
|
|
37
|
+
|
|
38
|
+
### 2.2 Colors
|
|
39
|
+
|
|
40
|
+
**Purpose:** Define every color used in the UI, organized into scales.
|
|
41
|
+
|
|
42
|
+
**Conventions:**
|
|
43
|
+
- Each color scale has 10 steps (`100`–`1000`), encoding intent:
|
|
44
|
+
- `100`: default background
|
|
45
|
+
- `200`: hover background
|
|
46
|
+
- `300`: active background
|
|
47
|
+
- `400`: default border
|
|
48
|
+
- `500`: hover border
|
|
49
|
+
- `600`: active border
|
|
50
|
+
- `700`: solid fill
|
|
51
|
+
- `800`: solid fill hover
|
|
52
|
+
- `900`: secondary text/icons
|
|
53
|
+
- `1000`: primary text/icons
|
|
54
|
+
- **Background scales** (`background-100`, `background-200`): page/card surfaces
|
|
55
|
+
- **Alpha scales** (`gray-alpha-*`): translucent overlays, borders, dividers — layer over any background
|
|
56
|
+
- **Solid scales** (`gray-*`): text, opaque fills — hold contrast on any surface
|
|
57
|
+
- **Accent scales** (`blue`, `red`, `amber`, `green`, `teal`, `purple`, `pink`): carry meaning — success, error, warning, links, focus
|
|
58
|
+
- Accent scales may use fewer steps if not all needed
|
|
59
|
+
|
|
60
|
+
**Values:** sRGB hex (`#ffffff`), optionally with wide-gamut equivalents in `oklch()`.
|
|
61
|
+
|
|
62
|
+
**Example:**
|
|
63
|
+
|
|
64
|
+
```
|
|
65
|
+
## Colors
|
|
66
|
+
|
|
67
|
+
### Background
|
|
68
|
+
| Token | Value |
|
|
69
|
+
|-------|-------|
|
|
70
|
+
| background-100 | #ffffff |
|
|
71
|
+
| background-200 | #f5f5f5 |
|
|
72
|
+
|
|
73
|
+
### Gray (solid)
|
|
74
|
+
| Token | Value |
|
|
75
|
+
|-------|-------|
|
|
76
|
+
| gray-100 | #f5f5f5 |
|
|
77
|
+
| gray-700 | #333333 |
|
|
78
|
+
| gray-1000 | #111111 |
|
|
79
|
+
|
|
80
|
+
### Accent
|
|
81
|
+
| Token | Value |
|
|
82
|
+
|-------|-------|
|
|
83
|
+
| blue-700 | #0066ff |
|
|
84
|
+
| red-700 | #e60000 |
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
**Level relevance:** Level 1+ requires at least background, gray, and one accent. Level 2+ requires full 10-step scales, alpha scale, and all accent colors.
|
|
88
|
+
|
|
89
|
+
### 2.3 Typography
|
|
90
|
+
|
|
91
|
+
**Purpose:** Define font families, sizes, weights, line heights, and letter spacing for every text role.
|
|
92
|
+
|
|
93
|
+
**Conventions:**
|
|
94
|
+
- **Heading tokens** (`heading-72` through `heading-14`): title pages and section headings
|
|
95
|
+
- **Label tokens** (`label-20` through `label-12`): single-line scannable text — navigation, form labels, table headers
|
|
96
|
+
- **Copy tokens** (`copy-24` through `copy-13`): multi-line body text with taller line height
|
|
97
|
+
- **Button tokens** (`button-16` through `button-12`): medium-weight labels for buttons
|
|
98
|
+
- **Mono tokens**: same metrics with monospace font for code/data
|
|
99
|
+
- Each token carries: `fontFamily`, `fontSize`, `fontWeight`, `lineHeight`, `letterSpacing`
|
|
100
|
+
- Token name encodes intended font size (e.g., `copy-14` ≈ 14px body copy)
|
|
101
|
+
- Use tabular figures for numbers that need alignment
|
|
102
|
+
|
|
103
|
+
**Example (minimal):**
|
|
104
|
+
|
|
105
|
+
```
|
|
106
|
+
## Typography
|
|
107
|
+
|
|
108
|
+
### Headings
|
|
109
|
+
| Token | Font | Size | Weight | Line | Spacing |
|
|
110
|
+
|-------|------|------|--------|------|---------|
|
|
111
|
+
| heading-32 | Inter | 32px | 600 | 1.2 | -0.02em |
|
|
112
|
+
| heading-20 | Inter | 20px | 600 | 1.3 | -0.01em |
|
|
113
|
+
|
|
114
|
+
### Body
|
|
115
|
+
| Token | Font | Size | Weight | Line | Spacing |
|
|
116
|
+
|-------|------|------|--------|------|---------|
|
|
117
|
+
| copy-16 | Inter | 16px | 400 | 1.6 | 0 |
|
|
118
|
+
| copy-14 | Inter | 14px | 400 | 1.5 | 0 |
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
**Level relevance:** Level 1+ requires at least body text (one copy token) and one heading token. Level 2+ requires full heading/label/copy/button typography scale.
|
|
122
|
+
|
|
123
|
+
### 2.4 Spacing & Layout
|
|
124
|
+
|
|
125
|
+
**Purpose:** Define the spatial grid and responsive breakpoints.
|
|
126
|
+
|
|
127
|
+
**Conventions:**
|
|
128
|
+
- Base unit: 4px or 8px (consistent across the system)
|
|
129
|
+
- Scale: `4, 8, 12, 16, 24, 32, 40, 64, 96` (on 4px) or equivalent on 8px
|
|
130
|
+
- Three-step rhythm: small inside group → medium between groups → large between sections
|
|
131
|
+
- Card padding: 24px default, 16px compact, 32px hero
|
|
132
|
+
- Content max-width with responsive side padding
|
|
133
|
+
- Breakpoints: provide explicit pixel values and names
|
|
134
|
+
|
|
135
|
+
**Example:**
|
|
136
|
+
|
|
137
|
+
```
|
|
138
|
+
## Layout
|
|
139
|
+
|
|
140
|
+
### Spacing scale
|
|
141
|
+
4px, 8px, 12px, 16px, 24px, 32px, 40px, 64px, 96px
|
|
142
|
+
|
|
143
|
+
### Rhythm
|
|
144
|
+
- 8px: inside a group (label + input, icon + text)
|
|
145
|
+
- 16px: between related groups
|
|
146
|
+
- 32-40px: between sections
|
|
147
|
+
|
|
148
|
+
### Breakpoints
|
|
149
|
+
| Name | Width |
|
|
150
|
+
|------|-------|
|
|
151
|
+
| sm | 401px |
|
|
152
|
+
| md | 601px |
|
|
153
|
+
| lg | 961px |
|
|
154
|
+
| xl | 1200px |
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
**Level relevance:** Level 1+ requires spacing scale and at least 2 breakpoints.
|
|
158
|
+
|
|
159
|
+
### 2.5 Elevation & Depth
|
|
160
|
+
|
|
161
|
+
**Purpose:** Define shadow values for layered UI elements.
|
|
162
|
+
|
|
163
|
+
**Conventions:**
|
|
164
|
+
- Use tonal surfaces first, shadows second — keep shadows subtle
|
|
165
|
+
- Define shadow values per elevation level: cards, popovers, modals
|
|
166
|
+
- Pair each elevation with a matching border radius
|
|
167
|
+
|
|
168
|
+
**Example:**
|
|
169
|
+
|
|
170
|
+
```
|
|
171
|
+
## Elevation
|
|
172
|
+
|
|
173
|
+
### Shadows
|
|
174
|
+
| Level | Value |
|
|
175
|
+
|-------|-------|
|
|
176
|
+
| Card | 0 2px 2px rgba(0,0,0,0.04) |
|
|
177
|
+
| Popover | 0 1px 1px rgba(0,0,0,0.02), 0 4px 8px -4px rgba(0,0,0,0.04), 0 16px 24px -8px rgba(0,0,0,0.06) |
|
|
178
|
+
| Modal | 0 1px 1px rgba(0,0,0,0.02), 0 8px 16px -4px rgba(0,0,0,0.04), 0 24px 32px -8px rgba(0,0,0,0.06) |
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
**Level relevance:** Level 3 only.
|
|
182
|
+
|
|
183
|
+
### 2.6 Motion
|
|
184
|
+
|
|
185
|
+
**Purpose:** Define animation durations and easing curves.
|
|
186
|
+
|
|
187
|
+
**Conventions:**
|
|
188
|
+
- Motion clarifies change, never decorates
|
|
189
|
+
- Default: 0ms (instant) is often the best choice
|
|
190
|
+
- When needed: short, physical easing — roughly 150ms state, 200ms popover, 300ms modal
|
|
191
|
+
- Honor `prefers-reduced-motion`
|
|
192
|
+
- No looping or attention-grabbing animations
|
|
193
|
+
|
|
194
|
+
**Example:**
|
|
195
|
+
|
|
196
|
+
```
|
|
197
|
+
## Motion
|
|
198
|
+
|
|
199
|
+
### Easing
|
|
200
|
+
Default: cubic-bezier(0.175, 0.885, 0.32, 1.1)
|
|
201
|
+
|
|
202
|
+
### Durations
|
|
203
|
+
| Context | Duration |
|
|
204
|
+
|---------|----------|
|
|
205
|
+
| State change | 150ms |
|
|
206
|
+
| Popover/Tooltip | 200ms |
|
|
207
|
+
| Modal/Overlay | 300ms |
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
**Level relevance:** Level 3 only.
|
|
211
|
+
|
|
212
|
+
### 2.7 Shapes
|
|
213
|
+
|
|
214
|
+
**Purpose:** Define border radius values.
|
|
215
|
+
|
|
216
|
+
**Conventions:**
|
|
217
|
+
- Keep radii tight and consistent
|
|
218
|
+
- One radius family per view, never mix rounded and sharp corners
|
|
219
|
+
- Common values: 6px (surfaces), 12px (menus/modals), 16px (fullscreen), 9999px (pills)
|
|
220
|
+
|
|
221
|
+
**Example:**
|
|
222
|
+
|
|
223
|
+
```
|
|
224
|
+
## Shapes
|
|
225
|
+
|
|
226
|
+
### Border Radius
|
|
227
|
+
| Context | Value |
|
|
228
|
+
|---------|-------|
|
|
229
|
+
| Surface, Input, Button | 6px |
|
|
230
|
+
| Menu, Modal, Popover | 12px |
|
|
231
|
+
| Fullscreen | 16px |
|
|
232
|
+
| Pill, Avatar | 9999px |
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
**Level relevance:** Level 3 only.
|
|
236
|
+
|
|
237
|
+
### 2.8 Components
|
|
238
|
+
|
|
239
|
+
**Purpose:** Define ready-to-use token values for common components.
|
|
240
|
+
|
|
241
|
+
**Conventions:**
|
|
242
|
+
- Each component gets: `backgroundColor`, `textColor`, `rounded`, `height` (and `borderColor` where applicable)
|
|
243
|
+
- Size variants: default (40px), small (32px), large (48px)
|
|
244
|
+
- State mappings: hover steps foreground up one, active steps up two; border from 400→500→600
|
|
245
|
+
- Focus ring: two-layer box-shadow (surface gap + accent ring)
|
|
246
|
+
- Disabled: 100 fill + 700 text + not-allowed cursor
|
|
247
|
+
|
|
248
|
+
**Example:**
|
|
249
|
+
|
|
250
|
+
```
|
|
251
|
+
## Components
|
|
252
|
+
|
|
253
|
+
### Button
|
|
254
|
+
| Variant | Background | Text | Border | Radius | Height |
|
|
255
|
+
|---------|-----------|------|--------|--------|--------|
|
|
256
|
+
| primary | gray-1000 | background-100 | — | 6px | 40px |
|
|
257
|
+
| secondary | background-100 | gray-1000 | gray-alpha-400 | 6px | 40px |
|
|
258
|
+
| tertiary | transparent | gray-1000 | — | 6px | 40px |
|
|
259
|
+
| error | red-800 | #fff | — | 6px | 40px |
|
|
260
|
+
|
|
261
|
+
### Input
|
|
262
|
+
| Variant | Background | Text | Border | Radius | Height |
|
|
263
|
+
|---------|-----------|------|--------|--------|--------|
|
|
264
|
+
| default | background-100 | gray-1000 | gray-alpha-400 | 6px | 40px |
|
|
265
|
+
```
|
|
266
|
+
|
|
267
|
+
**Level relevance:** Level 2+ requires at least Button and Input tokens. Level 3 requires full component library.
|
|
268
|
+
|
|
269
|
+
### 2.9 Voice & Content
|
|
270
|
+
|
|
271
|
+
**Purpose:** Define content writing rules for the UI.
|
|
272
|
+
|
|
273
|
+
**Conventions:**
|
|
274
|
+
- Title Case for labels, buttons, titles, tabs
|
|
275
|
+
- Sentence case for body, helper text, toasts
|
|
276
|
+
- Verb + Noun for actions (`Deploy Project`, never `Confirm`)
|
|
277
|
+
- Errors: what happened + what to do
|
|
278
|
+
- Toasts: specific thing + no trailing period + no `successfully`
|
|
279
|
+
- Empty states: describe the first action
|
|
280
|
+
- In-progress: present participle + ellipsis (`Deploying…`)
|
|
281
|
+
- Use numerals, curly quotes, the ellipsis character
|
|
282
|
+
|
|
283
|
+
**Example:**
|
|
284
|
+
|
|
285
|
+
```
|
|
286
|
+
## Voice & Content
|
|
287
|
+
|
|
288
|
+
- Use Title Case for labels, buttons, titles, and tabs
|
|
289
|
+
- Sentence case for body, helper text, and toasts
|
|
290
|
+
- Name actions with a verb and a noun: `Deploy Project`, `Delete Member`
|
|
291
|
+
- Write errors as what happened plus what to do next
|
|
292
|
+
- Toasts name the specific thing that changed, drop the trailing period
|
|
293
|
+
- Empty states point to the first action: `No deployments yet. Push to your Git repository to create one.`
|
|
294
|
+
```
|
|
295
|
+
|
|
296
|
+
**Level relevance:** Level 3 only.
|
|
297
|
+
|
|
298
|
+
## 3. Token naming conventions
|
|
299
|
+
|
|
300
|
+
### Color tokens
|
|
301
|
+
|
|
302
|
+
```
|
|
303
|
+
{namespace}-{step}
|
|
304
|
+
```
|
|
305
|
+
|
|
306
|
+
- `namespace`: `background`, `gray`, `gray-alpha`, `blue`, `red`, `amber`, `green`, `teal`, `purple`, `pink`
|
|
307
|
+
- `step`: `100`–`1000` (10-step scale encoding intent as defined in §2.2)
|
|
308
|
+
|
|
309
|
+
### Typography tokens
|
|
310
|
+
|
|
311
|
+
```
|
|
312
|
+
{role}-{size}
|
|
313
|
+
```
|
|
314
|
+
|
|
315
|
+
- `role`: `heading`, `label`, `copy`, `button`
|
|
316
|
+
- `size`: approximate font size in pixels
|
|
317
|
+
- Mono variant: `{role}-{size}-mono`
|
|
318
|
+
|
|
319
|
+
### Breakpoint tokens
|
|
320
|
+
|
|
321
|
+
Lowercase short names: `sm`, `md`, `lg`, `xl`, `2xl`
|
|
322
|
+
|
|
323
|
+
## 4. Light/Dark dual-theme rules
|
|
324
|
+
|
|
325
|
+
### Contract
|
|
326
|
+
|
|
327
|
+
Dual theme uses **same token names with different values** in two separate files:
|
|
328
|
+
|
|
329
|
+
- `DESIGN.md` — light (or default) theme
|
|
330
|
+
- `DESIGN.dark.md` — dark theme
|
|
331
|
+
|
|
332
|
+
### Rules
|
|
333
|
+
|
|
334
|
+
1. **Token names are identical** across both files
|
|
335
|
+
2. **Only the values differ** — a light `background-100: #ffffff` becomes dark `background-100: #111111`
|
|
336
|
+
3. **Both files define the same token set** — no token can exist in only one file
|
|
337
|
+
4. **DESIGN.md is always the SSOT for token names** — DESIGN.dark.md copies the structure
|
|
338
|
+
5. If a token isn't relevant to dark mode (e.g., a light-only accent), include it in DESIGN.dark.md anyway with a sensible dark-equivalent value
|
|
339
|
+
6. Add `DESIGN.dark.md` path reference in DESIGN.md Overview
|
|
340
|
+
|
|
341
|
+
### Naming
|
|
342
|
+
|
|
343
|
+
Dark theme file must be named `DESIGN.dark.md` (not `design-dark.md` or `DESIGN_DARK.md`).
|
|
344
|
+
|
|
345
|
+
## 5. Upgrade placeholders
|
|
346
|
+
|
|
347
|
+
Sections not yet filled should use HTML comment markers:
|
|
348
|
+
|
|
349
|
+
```
|
|
350
|
+
<!-- LEVEL2_PLACEHOLDER: Complete the 10-step color scales and add alpha scale when the design matures. See `references/completeness-checklist.md` § Level 2. -->
|
|
351
|
+
```
|
|
352
|
+
|
|
353
|
+
```
|
|
354
|
+
<!-- LEVEL3_PLACEHOLDER: Add Elevation, Motion, Shapes, Voice & Content, and full Component library when ready for production design system. See `references/completeness-checklist.md` § Level 3. -->
|
|
355
|
+
```
|
|
356
|
+
|
|
357
|
+
Agents encountering these placeholders understand that:
|
|
358
|
+
- The section is intentionally deferred, not accidentally empty
|
|
359
|
+
- The placeholder describes what's missing and when to revisit
|
|
360
|
+
- An upgrade workflow can detect these markers and recommend progression
|
|
361
|
+
|
|
362
|
+
## 6. Mapping to implementation
|
|
363
|
+
|
|
364
|
+
DESIGN.md tokens should map to implementation as follows:
|
|
365
|
+
|
|
366
|
+
| DESIGN.md | Implementation |
|
|
367
|
+
|-----------|---------------|
|
|
368
|
+
| Color tokens | CSS custom properties (`--color-gray-100`) or theme object |
|
|
369
|
+
| Typography tokens | CSS classes or Tailwind prose config |
|
|
370
|
+
| Spacing scale | CSS custom properties or Tailwind spacing config |
|
|
371
|
+
| Breakpoints | CSS media queries or Tailwind screens |
|
|
372
|
+
| Elevation | `box-shadow` or Tailwind shadow config |
|
|
373
|
+
| Motion | `transition` or animation library config |
|
|
374
|
+
| Shapes | `border-radius` or Tailwind radius config |
|
|
375
|
+
| Component tokens | Component prop defaults or CSS classes |
|
|
376
|
+
| Voice rules | Linter rules or prompt context for copy generation |
|
|
377
|
+
|
|
378
|
+
The agent consuming DESIGN.md is responsible for this mapping, not DESIGN.md itself. DESIGN.md stays implementation-agnostic.
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
# Vercel Geist DESIGN.md — Annotated Reference
|
|
2
|
+
|
|
3
|
+
This is Vercel's Geist design system as published at `vercel.com/design.md`, presented as a reference for creating new DESIGN.md files. Annotations are inline as `> **Design note:**` blockquotes explaining the rationale behind key decisions.
|
|
4
|
+
|
|
5
|
+
**Source:** <https://vercel.com/design.md>
|
|
6
|
+
|
|
7
|
+
**Why this as reference:**
|
|
8
|
+
- Vercel's DESIGN.md is the canonical example of the `DESIGN.md` format in the `awesome-design-md` ecosystem
|
|
9
|
+
- It defines a complete Level 3 design system covering all sections
|
|
10
|
+
- The token naming conventions (100-1000 step scale with intent encoding) are widely adopted
|
|
11
|
+
- Light/Dark dual-theme pattern shows how to split same-name tokens across two files
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
# Geist
|
|
16
|
+
|
|
17
|
+
## Overview
|
|
18
|
+
|
|
19
|
+
Geist is Vercel's design system for building consistent, developer-focused interfaces. The aesthetic is minimal and high-contrast: plenty of whitespace, restrained color, and content set on near-neutral surfaces. Prioritize readability and accessibility, and use color to signal state or hierarchy rather than decoration.
|
|
20
|
+
|
|
21
|
+
This is the Light theme. The Dark theme uses the same token names with different values and lives at `/design.dark.md`. Colors are sRGB hex with Display P3 equivalents.
|
|
22
|
+
|
|
23
|
+
> **Design note:** The Overview does two things well: (1) it states the aesthetic in terms an agent can operationalize ("minimal and high-contrast", "color to signal state or hierarchy rather than decoration"), and (2) it declares the multi-theme structure upfront.
|
|
24
|
+
|
|
25
|
+
## Colors
|
|
26
|
+
|
|
27
|
+
Each non-background scale runs 10 steps (`100`–`1000`), and the step encodes intent, not just lightness:
|
|
28
|
+
|
|
29
|
+
- `100` default background
|
|
30
|
+
- `200` hover background
|
|
31
|
+
- `300` active background
|
|
32
|
+
- `400` default border
|
|
33
|
+
- `500` hover border
|
|
34
|
+
- `600` active border
|
|
35
|
+
- `700` solid fill, high contrast
|
|
36
|
+
- `800` solid fill, hover
|
|
37
|
+
- `900` secondary text and icons
|
|
38
|
+
- `1000` primary text and icons
|
|
39
|
+
|
|
40
|
+
`background-100` is the primary page and card surface; `background-200` is a secondary surface for subtle separation. The `gray-alpha-*` tokens are translucent, so they layer over any background; use them for borders, dividers, overlays, and hover states. Solid `gray-*` holds its contrast on any surface, so use it for text and opaque fills. Accent scales carry meaning: `blue` for success, links, and focus; `red` for errors; `amber` for warnings; plus `green`, `teal`, `purple`, and `pink`. Use the hex tokens everywhere; each accent scale also ships a `*-p3` wide-gamut value in `oklch()` for Display P3 screens. The Dark theme redefines the same names at `/design.dark.md`.
|
|
41
|
+
|
|
42
|
+
> **Design note:** This is the key innovation of Vercel's approach: the 10-step scale encodes **intent**, not just a lightness gradient. An agent reading this knows that `700` means "solid fill" and `400` means "border", regardless of the actual hex value. This makes the scale **self-documenting** — an agent can apply tokens correctly without memorizing specific colors. The separation of `gray-alpha` (translucent, layers over any background) from `gray` (solid, holds contrast) is another critical design decision that prevents common UI mistakes.
|
|
43
|
+
|
|
44
|
+
## Typography
|
|
45
|
+
|
|
46
|
+
Geist Sans sets UI and prose; Geist Mono sets code, data, and tabular figures. Both are open-source. The `typography` tokens above carry concrete `fontFamily`, `fontSize`, `fontWeight`, `lineHeight`, and `letterSpacing`:
|
|
47
|
+
|
|
48
|
+
- Headings, `heading-72` through `heading-14`, title pages and sections; `letterSpacing` tightens as the size grows.
|
|
49
|
+
- Labels, `label-20` through `label-12`, carry single-line, scannable text: navigation, form labels, table headers, metadata.
|
|
50
|
+
- Copy, `copy-24` through `copy-13`, set multi-line body text with a taller `lineHeight`.
|
|
51
|
+
- Buttons, `button-16` through `button-12`, are medium-weight labels for buttons and compact controls.
|
|
52
|
+
|
|
53
|
+
`copy-14` and `label-14` cover most text. The `-mono` tokens pair Geist Mono with the same metrics; prefer tabular figures when numbers need to align.
|
|
54
|
+
|
|
55
|
+
> **Design note:** The typography system encodes **role** plus **size** in the token name (`copy-14`, `label-14`, `button-16`). An agent knows `copy-14` is body text (multi-line, taller line-height) and `label-14` is single-line scannable text — even though they share the same font size. This is the same "intent encoding" pattern as the color scales.
|
|
56
|
+
|
|
57
|
+
## Layout
|
|
58
|
+
|
|
59
|
+
Spacing follows a 4px scale: 4, 8, 12, 16, 24, 32, 40, 64, 96px. Keep a three-step rhythm: 8px inside a group, 16px between groups, 32–40px between sections. Cards use 24px padding, 16px when compact and 32px for hero areas. Center content in a 1200px column with side padding that grows at wider breakpoints, and make every layout work on mobile and desktop. Breakpoints are `sm` 401px, `md` 601px, `lg` 961px, `xl` 1200px, and `2xl` 1400px.
|
|
60
|
+
|
|
61
|
+
> **Design note:** The "three-step rhythm" rule (8px/16px/32px) gives an agent a clear, mechanical way to decide how much space to put between elements. Without this, agents tend to use arbitrary spacing. The card padding variants (24px/16px/32px) similarly prevent inconsistent padding choices.
|
|
62
|
+
|
|
63
|
+
## Elevation & Depth
|
|
64
|
+
|
|
65
|
+
Hierarchy comes from tonal surfaces and borders first, so shadows stay subtle. Apply these `box-shadow` values for the light theme:
|
|
66
|
+
|
|
67
|
+
- Raised cards: `0 2px 2px rgba(0, 0, 0, 0.04)`
|
|
68
|
+
- Popovers and menus: `0 1px 1px rgba(0, 0, 0, 0.02), 0 4px 8px -4px rgba(0, 0, 0, 0.04), 0 16px 24px -8px rgba(0, 0, 0, 0.06)`
|
|
69
|
+
- Modals and dialogs: `0 1px 1px rgba(0, 0, 0, 0.02), 0 8px 16px -4px rgba(0, 0, 0, 0.04), 0 24px 32px -8px rgba(0, 0, 0, 0.06)`
|
|
70
|
+
|
|
71
|
+
Tooltips take the lightest of these. Pair each elevation with the matching radius below.
|
|
72
|
+
|
|
73
|
+
> **Design note:** The hierarchy principle is stated first ("tonal surfaces and borders first, so shadows stay subtle"). This prevents agents from over-using shadows. Each elevation is tied to a specific UI element (card, popover, modal) — not an abstract level number — making it trivial for an agent to pick the right shadow.
|
|
74
|
+
|
|
75
|
+
## Motion
|
|
76
|
+
|
|
77
|
+
Use motion only when it clarifies a change, never for decoration. Most interactions should feel instant: a duration of `0ms` is often the snappiest and best choice, and the call is context-dependent. When motion genuinely helps, such as revealing or moving an element, keep it short and physical with the easing `cubic-bezier(0.175, 0.885, 0.32, 1.1)`: roughly 150ms for state changes, 200ms for popovers and tooltips, and 300ms for overlays and modals. Avoid long, looping, or attention-grabbing animation, and honor `prefers-reduced-motion` by dropping nonessential motion.
|
|
78
|
+
|
|
79
|
+
> **Design note:** The explicit "0ms is often the best choice" is crucial — it prevents agents from defaulting to the common 300ms ease-out. The duration table maps cleanly to element types (state change → popover → modal), making it self-documenting.
|
|
80
|
+
|
|
81
|
+
## Shapes
|
|
82
|
+
|
|
83
|
+
Radii stay tight: 6px for everyday surfaces and controls, 12px for menus and modals, 16px for fullscreen surfaces. Reserve 9999px for pills, avatars, and circular controls. Keep one radius family per view rather than mixing rounded and sharp corners.
|
|
84
|
+
|
|
85
|
+
> **Design note:** "One radius family per view" is a strong constraint that prevents inconsistent corner radius mixing — a common agent mistake.
|
|
86
|
+
|
|
87
|
+
## Components
|
|
88
|
+
|
|
89
|
+
The `components` tokens above give ready-to-use values per element (`backgroundColor`, `textColor`, `rounded`, `height`) drawn from this theme:
|
|
90
|
+
|
|
91
|
+
- Primary button: solid `gray-1000` fill with a `background-100` label, for the single most important action on a view.
|
|
92
|
+
- Secondary button: `background-100` fill with a translucent `gray-alpha-400` border.
|
|
93
|
+
- Tertiary button: transparent fill with `gray-1000` text for low-emphasis actions; it tints with `gray-alpha` on hover.
|
|
94
|
+
- Error button: solid `red-800` fill with white text, for destructive actions.
|
|
95
|
+
- Input: `background-100` fill, translucent border, 6px radius.
|
|
96
|
+
|
|
97
|
+
The variant tokens are the default medium (40px) size. Use the `button-small`/`input-small` (32px) and `button-large`/`input-large` (48px) tokens for the other sizes; large buttons step up to `button-16`. Hover and active states step up the scale: a `100` fill becomes `200` on hover and `300` on active, and borders move from `400` to `500` to `600`. Disabled uses a `gray-100` fill, `gray-700` text, and a not-allowed cursor. Focus shows a two-layer ring (`box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px #006bff`): a 2px gap in the surface color, then a 2px `blue-700` ring.
|
|
98
|
+
|
|
99
|
+
> **Design note:** The component tokens reference the color/typography/shape tokens defined above — there is no duplication. The state progression rule ("100 → 200 → 300 fill on hover → active") is a **systematic rule**, not a per-component value table. An agent can derive any component's hover state from this rule alone. The focus ring pattern (surface gap + accent ring) is explicitly described with box-shadow values, preventing agents from guessing focus styles.
|
|
100
|
+
|
|
101
|
+
## Voice & Content
|
|
102
|
+
|
|
103
|
+
Copy is part of the design; keep it precise and free of filler.
|
|
104
|
+
|
|
105
|
+
- Use Title Case for labels, buttons, titles, and tabs; sentence case for body, helper text, and toasts.
|
|
106
|
+
- Name actions with a verb and a noun (`Deploy Project`, `Delete Member`), never `Confirm`, `OK`, or a bare verb.
|
|
107
|
+
- Write errors as what happened plus what to do next: `Build failed. Bundle exceeds 50 MB. Reduce it or raise the limit.`
|
|
108
|
+
- Toasts name the specific thing that changed, drop the trailing period, and never say `successfully`: `Project deleted`, not `Successfully deleted the project.`
|
|
109
|
+
- Empty states point to the first action: `No deployments yet. Push to your Git repository to create one.`
|
|
110
|
+
- Use the present participle with an ellipsis for in-progress states: `Deploying…`, `Saving…`.
|
|
111
|
+
- Use numerals (`3 projects`), curly quotes, and the ellipsis character; skip `please` and marketing superlatives.
|
|
112
|
+
|
|
113
|
+
> **Design note:** Voice rules are highly actionable for agents because they give negative examples ("never `Confirm`, `OK`") and positive patterns ("what happened + what to do next"). This turns copy generation from guesswork into a mechanical fill-in-the-blank exercise.
|
|
114
|
+
|
|
115
|
+
## Do's and Don'ts
|
|
116
|
+
|
|
117
|
+
- Use the gray scale to rank information: `1000` for primary text, `900` for secondary, `700` for disabled.
|
|
118
|
+
- Keep solid accent color for state and the single most important action on a view.
|
|
119
|
+
- Hold WCAG AA contrast (4.5:1 for body text).
|
|
120
|
+
- Show the focus ring on every interactive element at `:focus-visible`, and never remove an outline without a visible replacement.
|
|
121
|
+
- Apply the typography tokens instead of setting font size, line height, or weight by hand.
|
|
122
|
+
- Don't signal state with color alone; pair it with an icon or text label.
|
|
123
|
+
- Don't use `background-200` as a general fill; it is for subtle separation only.
|
|
124
|
+
- Don't mix rounded and sharp corners, or more than two font weights, in one view.
|
|
125
|
+
- Don't swap `gray-*` for `background-*`; they are separate scales.
|
|
126
|
+
|
|
127
|
+
> **Design note:** The Do's and Don'ts section serves as a **correctness checklist** for agents. Each item is a specific, verifiable rule. Agents can self-check their UI output against this list. The "Don't" items prevent common mistakes ("don't mix rounded and sharp corners", "don't use `background-200` as a general fill").
|
|
128
|
+
|
|
129
|
+
---
|
|
130
|
+
|
|
131
|
+
## Key takeaways for creating your own DESIGN.md
|
|
132
|
+
|
|
133
|
+
1. **Encode intent in token names**, not just values — `gray-400 = border`, `copy-14 = body text`
|
|
134
|
+
2. **State rules, not just values** — "three-step spacing rhythm" is more useful than a raw scale
|
|
135
|
+
3. **Give negative examples** — agents need to know what NOT to do as much as what to do
|
|
136
|
+
4. **Make state derivable** — "100 → 200 → 300 on hover" means the agent can compute any component's state
|
|
137
|
+
5. **Tie tokens to concrete UI elements** — "card shadow", not "level-1 shadow"
|
|
138
|
+
6. **Voice rules should be mechanical** — fill-in-the-blank templates, not vague principles
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
<!-- COMPLETENESS_LEVEL: 3 — dark theme companion to DESIGN.md -->
|
|
2
|
+
|
|
3
|
+
# [Design System Name] — Dark
|
|
4
|
+
|
|
5
|
+
## Overview
|
|
6
|
+
|
|
7
|
+
[Design System Name] Dark is the dark theme companion to [Design System Name]. Use the same token names as DESIGN.md; only the values change. Every token defined in DESIGN.md must have a corresponding entry in this file.
|
|
8
|
+
|
|
9
|
+
This file uses the same structure as DESIGN.md. When DESIGN.md is updated, update this file with the dark-equivalent values.
|
|
10
|
+
|
|
11
|
+
<!--
|
|
12
|
+
IMPORTANT: Switch to dark mode by loading this file's values in place of DESIGN.md values.
|
|
13
|
+
Consumers reference tokens by name, not by value — the switch is transparent.
|
|
14
|
+
-->
|
|
15
|
+
|
|
16
|
+
## Colors
|
|
17
|
+
|
|
18
|
+
### Background
|
|
19
|
+
|
|
20
|
+
<!-- Dark backgrounds are dark grays instead of whites. background-100 is the primary dark surface. -->
|
|
21
|
+
|
|
22
|
+
| Token | Value |
|
|
23
|
+
|-------|-------|
|
|
24
|
+
| background-100 | #[dark page/card surface, e.g., #111111] |
|
|
25
|
+
|
|
26
|
+
<!-- LEVEL2_PLACEHOLDER: Match DESIGN.md Level 2 background tokens -->
|
|
27
|
+
<!--
|
|
28
|
+
| background-200 | #[slightly lighter dark surface] |
|
|
29
|
+
| background-300 | #[active dark surface] |
|
|
30
|
+
-->
|
|
31
|
+
|
|
32
|
+
### Gray (text and fills)
|
|
33
|
+
|
|
34
|
+
<!-- Dark text colors are light grays. Invert the scale: gray-1000 is light (primary text on dark), gray-100 is dark. -->
|
|
35
|
+
|
|
36
|
+
| Token | Value |
|
|
37
|
+
|-------|-------|
|
|
38
|
+
| gray-1000 | #[primary text on dark, e.g., #eeeeee] |
|
|
39
|
+
| gray-900 | #[secondary text on dark, e.g., #999999] |
|
|
40
|
+
|
|
41
|
+
<!-- LEVEL2_PLACEHOLDER: Match DESIGN.md Level 2 gray scale with dark-appropriate values -->
|
|
42
|
+
<!--
|
|
43
|
+
| gray-100 | #[darkest fill, e.g., #1a1a1a] |
|
|
44
|
+
| gray-200 | #[hover fill, e.g., #222222] |
|
|
45
|
+
| gray-300 | #[active fill, e.g., #333333] |
|
|
46
|
+
| gray-400 | #[border, e.g., #444444] |
|
|
47
|
+
| gray-500 | #[hover border, e.g., #555555] |
|
|
48
|
+
| gray-600 | #[active border, e.g., #666666] |
|
|
49
|
+
| gray-700 | #[disabled text, e.g., #777777] |
|
|
50
|
+
| gray-800 | #[solid hover, e.g., #888888] |
|
|
51
|
+
-->
|
|
52
|
+
|
|
53
|
+
<!-- LEVEL2_PLACEHOLDER: Add gray-alpha scale with white-based transparency for dark backgrounds -->
|
|
54
|
+
<!--
|
|
55
|
+
### Gray Alpha (translucent overlays)
|
|
56
|
+
|
|
57
|
+
| Token | Value |
|
|
58
|
+
|-------|-------|
|
|
59
|
+
| gray-alpha-100 | rgba(255, 255, 255, 0.04) |
|
|
60
|
+
| gray-alpha-200 | rgba(255, 255, 255, 0.06) |
|
|
61
|
+
| gray-alpha-300 | rgba(255, 255, 255, 0.08) |
|
|
62
|
+
| gray-alpha-400 | rgba(255, 255, 255, 0.12) |
|
|
63
|
+
| gray-alpha-500 | rgba(255, 255, 255, 0.16) |
|
|
64
|
+
| gray-alpha-600 | rgba(255, 255, 255, 0.24) |
|
|
65
|
+
-->
|
|
66
|
+
|
|
67
|
+
### Accent
|
|
68
|
+
|
|
69
|
+
<!-- Accent colors may shift to maintain contrast on dark backgrounds. Same token names, adjusted values. -->
|
|
70
|
+
|
|
71
|
+
| Token | Value | Usage |
|
|
72
|
+
|-------|-------|-------|
|
|
73
|
+
| blue-700 | #[adjusted for dark, typically lighter to maintain contrast] | Interactive elements |
|
|
74
|
+
| red-700 | #[adjusted for dark, typically lighter] | Errors |
|
|
75
|
+
| amber-700 | #[adjusted for dark, typically lighter] | Warnings |
|
|
76
|
+
|
|
77
|
+
<!-- LEVEL2_PLACEHOLDER: Match all accent scales from DESIGN.md with dark-appropriate values -->
|
|
78
|
+
|
|
79
|
+
## Typography
|
|
80
|
+
|
|
81
|
+
<!-- Typography tokens typically remain the same in dark mode. Copy verbatim from DESIGN.md. -->
|
|
82
|
+
|
|
83
|
+
| Token | Font Family | Size | Weight | Line Height | Letter Spacing |
|
|
84
|
+
|-------|------------|------|--------|-------------|----------------|
|
|
85
|
+
| copy-16 | [same as DESIGN.md] | 16px | 400 | 1.6 | 0 |
|
|
86
|
+
| heading-32 | [same as DESIGN.md] | 32px | 600 | 1.2 | -0.02em |
|
|
87
|
+
|
|
88
|
+
## Spacing & Layout
|
|
89
|
+
|
|
90
|
+
<!-- Spacing and breakpoints are identical to DESIGN.md. Copy verbatim. -->
|
|
91
|
+
|
|
92
|
+
Base unit: [same as DESIGN.md]
|
|
93
|
+
|
|
94
|
+
| Step | Value |
|
|
95
|
+
|------|-------|
|
|
96
|
+
| 1x | [base × 1] |
|
|
97
|
+
| 2x | [base × 2] |
|
|
98
|
+
| 3x | [base × 3] |
|
|
99
|
+
| 4x | [base × 4] |
|
|
100
|
+
| 6x | [base × 6] |
|
|
101
|
+
|
|
102
|
+
| Name | Min Width | Target |
|
|
103
|
+
|------|-----------|--------|
|
|
104
|
+
| sm | 401px | Mobile landscape |
|
|
105
|
+
| lg | 961px | Desktop |
|
|
106
|
+
|
|
107
|
+
<!-- LEVEL3_PLACEHOLDER: Add dark-mode Elevation, Components tokens, and full dark theme parity with DESIGN.md -->
|
|
108
|
+
<!--
|
|
109
|
+
## Elevation & Depth
|
|
110
|
+
|
|
111
|
+
Shadows on dark backgrounds use lighter, more subtle values. Hierarchy still comes from tonal surfaces first.
|
|
112
|
+
|
|
113
|
+
### Shadows (dark theme)
|
|
114
|
+
|
|
115
|
+
| Element | Value |
|
|
116
|
+
|---------|-------|
|
|
117
|
+
| Card | 0 2px 2px rgba(0, 0, 0, 0.12) |
|
|
118
|
+
| Popover | 0 1px 1px rgba(0, 0, 0, 0.08), 0 4px 8px -4px rgba(0, 0, 0, 0.12), 0 16px 24px -8px rgba(0, 0, 0, 0.16) |
|
|
119
|
+
| Modal | 0 1px 1px rgba(0, 0, 0, 0.08), 0 8px 16px -4px rgba(0, 0, 0, 0.12), 0 24px 32px -8px rgba(0, 0, 0, 0.16) |
|
|
120
|
+
|
|
121
|
+
## Components
|
|
122
|
+
|
|
123
|
+
Button tokens reference dark color values. Same structure as DESIGN.md, different color references.
|
|
124
|
+
|
|
125
|
+
### Button
|
|
126
|
+
|
|
127
|
+
| Variant | Background | Text | Border | Radius | Height |
|
|
128
|
+
|---------|-----------|------|--------|--------|--------|
|
|
129
|
+
| primary | gray-100 (dark value) | background-100 (dark value) | — | 6px | 40px |
|
|
130
|
+
| secondary | background-100 | gray-1000 | gray-alpha-400 | 6px | 40px |
|
|
131
|
+
|
|
132
|
+
States, sizes, and focus follow the same rules as DESIGN.md.
|
|
133
|
+
-->
|