@mstar-harness/opencode 0.6.13 → 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.
@@ -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
+ -->
@@ -0,0 +1,273 @@
1
+ <!-- COMPLETENESS_LEVEL: 1 — last audited [DATE] -->
2
+
3
+ # [Design System Name]
4
+
5
+ ## Overview
6
+
7
+ [Design System Name] is a [adjective, e.g., minimal, playful, bold] design system for [project/product name].
8
+ [Aesthetic principles — one sentence describing the visual identity: e.g., "Prioritize readability and clarity with plenty of whitespace and restrained color."]
9
+
10
+ This is the Light theme.
11
+ <!-- LEVEL2_PLACEHOLDER: When ready for dark theme, create DESIGN.dark.md with same token names and different values. See references/completeness-checklist.md § Level 3. -->
12
+ <!-- Uncomment when dark theme exists: The Dark theme uses the same token names with different values and lives at /DESIGN.dark.md. -->
13
+
14
+ ## Colors
15
+
16
+ ### Background
17
+
18
+ <!-- Level 1 — Fill in at least background-100. Level 2 adds background-200 and background-300. -->
19
+
20
+ | Token | Value |
21
+ |-------|-------|
22
+ | background-100 | #[primary page/card surface] |
23
+
24
+ <!-- LEVEL2_PLACEHOLDER: Add background-200 and background-300 for subtle surface separation. See references/completeness-checklist.md § Level 2/Colors. -->
25
+ <!--
26
+ | background-200 | #[secondary surface] |
27
+ | background-300 | #[active surface] |
28
+ -->
29
+
30
+ ### Gray (text and fills)
31
+
32
+ <!-- Level 1 — Fill in at least gray-1000 (primary text) and gray-900 (secondary text). -->
33
+
34
+ | Token | Value |
35
+ |-------|-------|
36
+ | gray-1000 | #[primary text] |
37
+ | gray-900 | #[secondary text] |
38
+
39
+ <!-- LEVEL2_PLACEHOLDER: Complete the full 10-step scale (gray-100 through gray-1000). See references/design-md-spec.md § Colors. -->
40
+ <!--
41
+ | gray-100 | #[lightest fill] |
42
+ | gray-200 | #[hover fill] |
43
+ | gray-300 | #[active fill] |
44
+ | gray-400 | #[border] |
45
+ | gray-500 | #[hover border] |
46
+ | gray-600 | #[active border] |
47
+ | gray-700 | #[solid fill / disabled text] |
48
+ | gray-800 | #[solid hover] |
49
+ | gray-900 | #[secondary text] |
50
+ | gray-1000 | #[primary text] |
51
+ -->
52
+
53
+ <!-- LEVEL2_PLACEHOLDER: Add gray-alpha scale for translucent borders, overlays, and hover states. See references/design-md-spec.md § Colors. -->
54
+ <!--
55
+ ### Gray Alpha (translucent overlays)
56
+
57
+ | Token | Value |
58
+ |-------|-------|
59
+ | gray-alpha-100 | rgba(0, 0, 0, 0.04) |
60
+ | gray-alpha-200 | rgba(0, 0, 0, 0.06) |
61
+ | gray-alpha-300 | rgba(0, 0, 0, 0.08) |
62
+ | gray-alpha-400 | rgba(0, 0, 0, 0.12) |
63
+ | gray-alpha-500 | rgba(0, 0, 0, 0.16) |
64
+ | gray-alpha-600 | rgba(0, 0, 0, 0.24) |
65
+ -->
66
+
67
+ ### Accent
68
+
69
+ <!-- Level 1 — Fill in at least one accent (blue or brand color) for links/actions, plus red for errors and amber for warnings. -->
70
+
71
+ | Token | Value | Usage |
72
+ |-------|-------|-------|
73
+ | blue-700 | #[links, focus, primary actions] | Interactive elements |
74
+ | red-700 | #[errors, destructive actions] | Errors, delete buttons |
75
+ | amber-700 | #[warnings, alerts] | Warning states |
76
+
77
+ <!-- LEVEL2_PLACEHOLDER: Complete all accent scales (blue, red, amber, green, teal, purple, pink). Add at minimum 700/800/900/1000 steps per scale. See references/completeness-checklist.md § Level 2/Colors. -->
78
+ <!--
79
+ | green | Success states |
80
+ | teal | Info, secondary brand |
81
+ | purple | Special emphasis |
82
+ | pink | Highlights, badges |
83
+ -->
84
+
85
+ ## Typography
86
+
87
+ <!-- Level 1 — Fill in at least one body token (copy-*) and one heading token (heading-*). -->
88
+ <!-- Token naming: {role}-{size}. Roles: heading, label, copy, button. Size: approximate font size in px. -->
89
+
90
+ ### Body text
91
+
92
+ | Token | Font Family | Size | Weight | Line Height | Letter Spacing |
93
+ |-------|------------|------|--------|-------------|----------------|
94
+ | copy-16 | [font-family] | 16px | 400 | 1.6 | 0 |
95
+
96
+ ### Headings
97
+
98
+ | Token | Font Family | Size | Weight | Line Height | Letter Spacing |
99
+ |-------|------------|------|--------|-------------|----------------|
100
+ | heading-32 | [font-family] | 32px | 600 | 1.2 | -0.02em |
101
+
102
+ <!-- LEVEL2_PLACEHOLDER: Complete the typography scale. Add at least 3 heading levels, 1 label token, and 1 button typography token. See references/completeness-checklist.md § Level 2/Typography. -->
103
+ <!--
104
+ ### Labels (single-line, scannable)
105
+
106
+ | Token | Font Family | Size | Weight | Line Height | Letter Spacing |
107
+ |-------|------------|------|--------|-------------|----------------|
108
+ | label-14 | [font-family] | 14px | 500 | 1.3 | 0 |
109
+
110
+ ### Buttons
111
+
112
+ | Token | Font Family | Size | Weight | Line Height | Letter Spacing |
113
+ |-------|------------|------|--------|-------------|----------------|
114
+ | button-14 | [font-family] | 14px | 500 | 1.3 | 0 |
115
+
116
+ ### Additional headings
117
+ | heading-24 | [font-family] | 24px | 600 | 1.3 | -0.01em |
118
+ | heading-20 | [font-family] | 20px | 600 | 1.3 | 0 |
119
+ -->
120
+
121
+ ## Spacing & Layout
122
+
123
+ ### Spacing scale
124
+
125
+ <!-- Level 1 — Declare base unit and at least 5 scale steps. Base unit is typically 4px or 8px. -->
126
+
127
+ Base unit: [4px or 8px]
128
+
129
+ | Step | Value |
130
+ |------|-------|
131
+ | 1x | [base × 1] |
132
+ | 2x | [base × 2] |
133
+ | 3x | [base × 3] |
134
+ | 4x | [base × 4] |
135
+ | 6x | [base × 6] |
136
+
137
+ <!-- LEVEL2_PLACEHOLDER: Complete the full 9-step scale and add three-step rhythm rules. See references/design-md-spec.md § Spacing & Layout. -->
138
+ <!--
139
+ | 8x | [base × 8] |
140
+ | 10x | [base × 10] |
141
+ | 16x | [base × 16] |
142
+ | 24x | [base × 24] |
143
+
144
+ ### Rhythm
145
+
146
+ - [small]: inside a group (label + input, icon + text)
147
+ - [medium]: between related groups
148
+ - [large]: between sections
149
+ -->
150
+
151
+ ### Breakpoints
152
+
153
+ <!-- Level 1 — At least 2 breakpoints for responsive layout. -->
154
+
155
+ | Name | Min Width | Target |
156
+ |------|-----------|--------|
157
+ | sm | 401px | Mobile landscape |
158
+ | lg | 961px | Desktop |
159
+
160
+ <!-- LEVEL2_PLACEHOLDER: Add intermediate breakpoints (md, xl, 2xl). See references/completeness-checklist.md § Level 2/Breakpoints. -->
161
+ <!--
162
+ | md | 601px | Tablet |
163
+ | xl | 1200px | Large desktop |
164
+ | 2xl | 1400px | Ultra-wide |
165
+ -->
166
+
167
+ <!-- LEVEL2_PLACEHOLDER: Add Components section — at minimum Button (primary, secondary) and Input tokens with size variants and all states. See references/design-md-spec.md § Components. -->
168
+ <!--
169
+ ## Components
170
+
171
+ ### Button
172
+
173
+ | Variant | Background | Text | Border | Radius | Height |
174
+ |---------|-----------|------|--------|--------|--------|
175
+ | primary | gray-1000 | background-100 | — | 6px | 40px |
176
+ | secondary | background-100 | gray-1000 | gray-alpha-400 | 6px | 40px |
177
+
178
+ **Size variants:**
179
+ | Size | Height | Typography |
180
+ |------|--------|------------|
181
+ | small | 32px | button-12 |
182
+ | default | 40px | button-14 |
183
+ | large | 48px | button-16 |
184
+
185
+ **States:** Fill steps up: 100→200 (hover), 100→300 (active). Border steps up: 400→500→600. Disabled: gray-100 fill, gray-700 text, not-allowed cursor. Focus: 0 0 0 2px background-100, 0 0 0 4px blue-700.
186
+
187
+ ### Input
188
+
189
+ | Variant | Background | Text | Border | Radius | Height |
190
+ |---------|-----------|------|--------|--------|--------|
191
+ | default | background-100 | gray-1000 | gray-alpha-400 | 6px | 40px |
192
+
193
+ **Size variants:** Same as Button (32px/40px/48px).
194
+
195
+ **States:** Same state progression as Button. Error: border red-700, add error message below.
196
+ -->
197
+
198
+ <!-- LEVEL3_PLACEHOLDER: Add Elevation & Depth, Motion, Shapes, Voice & Content, and full Component library. See references/completeness-checklist.md § Level 3. -->
199
+ <!--
200
+ ## Elevation & Depth
201
+
202
+ Hierarchy comes from tonal surfaces and borders first; shadows stay subtle.
203
+
204
+ ### Shadows (light theme)
205
+
206
+ | Element | Value |
207
+ |---------|-------|
208
+ | Card | 0 2px 2px rgba(0, 0, 0, 0.04) |
209
+ | 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) |
210
+ | 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) |
211
+
212
+ Pair each elevation with the matching radius below.
213
+
214
+ ## Motion
215
+
216
+ Motion clarifies change, never decorates. Default 0ms is often the best choice.
217
+
218
+ ### Easing
219
+
220
+ Default: cubic-bezier(0.175, 0.885, 0.32, 1.1)
221
+
222
+ ### Durations
223
+
224
+ | Context | Duration |
225
+ |---------|----------|
226
+ | State change | 150ms |
227
+ | Popover/Tooltip | 200ms |
228
+ | Modal/Overlay | 300ms |
229
+
230
+ Honor prefers-reduced-motion: drop nonessential motion.
231
+
232
+ ## Shapes
233
+
234
+ ### Border Radius
235
+
236
+ | Context | Value |
237
+ |---------|-------|
238
+ | Surface, Input, Button | 6px |
239
+ | Menu, Modal, Popover | 12px |
240
+ | Fullscreen | 16px |
241
+ | Pill, Avatar | 9999px |
242
+
243
+ Keep one radius family per view; never mix rounded and sharp corners.
244
+
245
+ ## Components — Extended
246
+
247
+ Add Card, Modal, Tooltip, Menu/Dropdown, Badge tokens following the same pattern as Button/Input.
248
+
249
+ ## Voice & Content
250
+
251
+ - Use Title Case for labels, buttons, titles, and tabs
252
+ - Sentence case for body, helper text, and toasts
253
+ - Name actions with a verb and a noun: [Create Project], [Delete Item]
254
+ - Write errors as what happened + what to do: [Error description. Suggested fix.]
255
+ - Toasts name the specific thing, no trailing period, no "successfully": [Item deleted]
256
+ - Empty states point to the first action: [No items yet. Create one to get started.]
257
+ - In-progress states: present participle + ellipsis: [Saving…], [Loading…]
258
+ - Use numerals, curly quotes, the ellipsis character
259
+ - Skip "please" and marketing superlatives
260
+ -->
261
+
262
+ ## Do's and Don'ts
263
+
264
+ <!-- Fill in with rules specific to this design system. Examples to customize: -->
265
+
266
+ - Use [gray-1000] for primary text, [gray-900] for secondary.
267
+ - Keep accent color for state and the single most important action on a view.
268
+ - Hold WCAG AA contrast (4.5:1 for body text).
269
+ - Show focus ring on every interactive element at :focus-visible.
270
+ - Apply typography tokens instead of setting font properties by hand.
271
+ - Don't signal state with color alone; pair it with an icon or text label.
272
+ - Don't use more than two font weights in one view.
273
+ - Don't mix rounded and sharp corners in one view.
@@ -31,8 +31,8 @@ description: Morning Star (启明星) harness **强制全局入口** —— 信
31
31
  | 角色 | 始终 | 按任务追加(典型) |
32
32
  |------|------|-------------------|
33
33
  | **全部** | 本 skill | — |
34
- | **`@project-manager`** | 本 skill | `mstar-dispatch-gates`、`mstar-phase-gates`、`mstar-plan-conventions`、`mstar-superpowers-align`、`mstar-roles`;派 QC 前 `mstar-review-qc`;并行/审查 `mstar-branch-worktree`;plan/status/reports `mstar-plan-artifacts`。**不**读 `mstar-coding-behavior` |
35
- | **实现/审查/QA/运维** | 本 skill + `mstar-coding-behavior` + 角色 ref | 有 git 写:`mstar-branch-worktree`;有 plan 路径:`mstar-plan-conventions`(路径符号节);QC/QA:`mstar-review-qc`;改 status/residual:`mstar-plan-artifacts` |
34
+ | **`@project-manager`** | 本 skill | `mstar-dispatch-gates`、`mstar-phase-gates`、`mstar-plan-conventions`、`mstar-superpowers-align`、`mstar-roles`;派 QC 前 `mstar-review-qc`;并行/审查 `mstar-branch-worktree`;plan/status/reports `mstar-plan-artifacts`;UI 类 plan Prepare 阶段 `mstar-design-md`(DESIGN.md 门禁)。**不**读 `mstar-coding-behavior` |
35
+ | **实现/审查/QA/运维** | 本 skill + `mstar-coding-behavior` + 角色 ref | 有 git 写:`mstar-branch-worktree`;有 plan 路径:`mstar-plan-conventions`(路径符号节);QC/QA:`mstar-review-qc`;改 status/residual:`mstar-plan-artifacts`;UI 任务:`mstar-design-md`(读取 DESIGN.md tokens) |
36
36
  | **leaf 承接方** | 上栏 + **`mstar-dispatch-gates`**(反递归节) | — |
37
37
 
38
38
  Routing eval(Cursor 维护)→ `.cursor/skills/mstar-routing-eval/`,**非**运行时必读。
@@ -83,6 +83,7 @@ PM 在 Assignment 写 **`Task category`**(主类 + 可选 `secondary`):
83
83
  | `mstar-branch-worktree` | 功能分支、worktree、QC/QA 检出对齐 |
84
84
  | `mstar-plan-conventions` | `{HARNESS_DIR}` 发现、初始化、Spec 分支模型摘要 |
85
85
  | `mstar-plan-artifacts` | 主 plan、reports、`status.json`、residual、knowledge、Done 归档 |
86
+ | `mstar-design-md` | DESIGN.md 设计系统规范 —— 创建/审计/维护 design tokens,三级检查清单,light/dark 双主题 |
86
87
  | `mstar-review-qc` | QC 工作流、模板、verdict、residual 留档 |
87
88
  | `mstar-coding-behavior` | Think / Simplicity / Surgical / Goal-Driven |
88
89
  | `mstar-superpowers-align` | Superpowers × harness 优先级与短语 |
@@ -111,11 +111,12 @@ description: Morning Star (启明星) Spec-Driven 双阶段门禁 —— Prepare
111
111
  2. `clarify` 是否完成(高影响歧义是否收敛)?
112
112
  3. 意图门禁是否满足(真实目标 / 成功判据 / 非目标已写明)?
113
113
  4. `plan` 是否完成并可引用?
114
- 5. 若分批/暂缓/临时绕行,roadmap 是否落在 plan/status 中,而不是只在对话里?
115
- 6. `tasks` 是否完成?
116
- 7. Assignment 是否含 **`Task category`**(实现类任务)并与 Owner 一致?
117
- 8. 若中途出现 plan drift,是否先回写再继续?
118
- 9. 实现说明中是否体现"最小耐久切片 + 手术式改动 + 可验证检查"?
114
+ 5. plan 涉及 UI 工作:`DESIGN.md` 是否存在且满足声明的 completeness level(见 `mstar-design-md`)?
115
+ 6. 若分批/暂缓/临时绕行,roadmap 是否落在 plan/status 中,而不是只在对话里?
116
+ 7. `tasks` 是否完成?
117
+ 8. Assignment 是否含 **`Task category`**(实现类任务)并与 Owner 一致?
118
+ 9. 若中途出现 plan drift,是否先回写再继续?
119
+ 10. 实现说明中是否体现"最小耐久切片 + 手术式改动 + 可验证检查"?
119
120
 
120
121
  任一项为「否」时,`Gate decision` 必须是 `blocked`。
121
122
 
@@ -45,6 +45,7 @@ Treat these as baseline dependencies **where the role touches implementation, re
45
45
  | `mstar-branch-worktree` | Git write, parallel worktrees, QC/QA checkout fields |
46
46
  | `mstar-plan-conventions` | `{HARNESS_DIR}` discovery, init, Spec branch naming, `writing-plans` path |
47
47
  | `mstar-plan-artifacts` | Main plan, `reports/`, `status.json`, residual, knowledge/iteration, Done compaction |
48
+ | `mstar-design-md` | DESIGN.md design system spec — create/audit/maintain tokens, completeness checklist, light/dark dual-theme |
48
49
  | `mstar-review-qc` | QC workflow, template, verdict, high-risk checks |
49
50
  | `mstar-coding-behavior` | Implementation/debug/refactor (**not** PM orchestration-only) |
50
51
  | `mstar-superpowers-align` | Superpowers plugin on; Assignment `Superpowers` lines |
@@ -55,10 +56,10 @@ Treat these as baseline dependencies **where the role touches implementation, re
55
56
  | Role | Typical adds |
56
57
  | --- | --- |
57
58
  | `project-manager` | `mstar-dispatch-gates`, `mstar-phase-gates`, `mstar-plan-conventions`, `mstar-superpowers-align`, `mstar-roles` ref; + `mstar-review-qc` before QC; + `mstar-branch-worktree` / `mstar-plan-artifacts` as the round requires |
58
- | `fullstack-dev*`, `frontend-dev` | `mstar-coding-behavior`, `mstar-dispatch-gates`, `mstar-branch-worktree` (if repo writes); plan path symbols from `mstar-plan-conventions` (minimal) |
59
- | `qc-specialist*` | `mstar-review-qc`, `mstar-branch-worktree`, `mstar-plan-artifacts` (report paths) |
60
- | `qa-engineer` | `mstar-review-qc`, `mstar-branch-worktree`, `mstar-plan-artifacts` (closing R#) |
61
- | `architect`, `product-manager` | `mstar-phase-gates` (Prepare), `mstar-plan-artifacts` (knowledge/specs) |
59
+ | `fullstack-dev*`, `frontend-dev` | `mstar-coding-behavior`, `mstar-dispatch-gates`, `mstar-branch-worktree` (if repo writes); plan path symbols from `mstar-plan-conventions` (minimal); `mstar-design-md` when implementing styled UI |
60
+ | `qc-specialist*` | `mstar-review-qc`, `mstar-branch-worktree`, `mstar-plan-artifacts` (report paths); `mstar-design-md` when reviewing UI |
61
+ | `qa-engineer` | `mstar-review-qc`, `mstar-branch-worktree`, `mstar-plan-artifacts` (closing R#); `mstar-design-md` when verifying visual output |
62
+ | `architect`, `product-manager` | `mstar-phase-gates` (Prepare), `mstar-plan-artifacts` (knowledge/specs); `mstar-design-md` (creator + design intent) |
62
63
  | `ops-engineer` | `mstar-coding-behavior`, `mstar-branch-worktree` |
63
64
  | `prompt-engineer` | All topic skills when editing harness text |
64
65
 
@@ -4,7 +4,7 @@
4
4
 
5
5
  **Always:** `mstar-harness-core`, `mstar-dispatch-gates`, `mstar-phase-gates` (Prepare: specify/clarify/plan), `mstar-plan-conventions` (`{PLAN_DIR}`, `writing-plans` path).
6
6
 
7
- **Typically:** `mstar-plan-artifacts` (knowledge/specs/ADR placement); `mstar-coding-behavior` (surgical doc edits); `mstar-superpowers-align` (when plugin on).
7
+ **Typically:** `mstar-plan-artifacts` (knowledge/specs/ADR placement); `mstar-design-md` (DESIGN.md design system spec — architect is primary creator); `mstar-coding-behavior` (surgical doc edits); `mstar-superpowers-align` (when plugin on).
8
8
 
9
9
  **On demand:** `mstar-branch-worktree` (when committing architecture docs to the business repo).
10
10
 
@@ -52,7 +52,8 @@ Use as applicable:
52
52
  2. Module boundaries and interface contracts
53
53
  3. Technical decision records (ADR-style)
54
54
  4. Risk/rollback strategy and validation plan
55
- 5. Architecture-spec documentation in repository paths assigned by PM
55
+ 5. DESIGN.md creation and maintenance design token selection, naming, completeness level decisions (see `mstar-design-md`)
56
+ 6. Architecture-spec documentation in repository paths assigned by PM
56
57
 
57
58
  ## Scope Boundaries
58
59
 
@@ -6,7 +6,7 @@
6
6
 
7
7
  **Typically:** `mstar-plan-conventions` (paths + spec metadata); `mstar-superpowers-align` (when plugin on).
8
8
 
9
- **On demand:** `mstar-branch-worktree` (repo writes); `mstar-phase-gates` (Execute / hotfix when referenced in assignment).
9
+ **On demand:** `mstar-branch-worktree` (repo writes); `mstar-phase-gates` (Execute / hotfix when referenced in assignment); `mstar-design-md` (when implementing styled UI — read DESIGN.md for tokens before writing components).
10
10
 
11
11
  **Host:** `mstar-host` (detect; `references/opencode.md` | `cursor.md` | `codex.md`).
12
12
 
@@ -35,7 +35,7 @@ If any item below matches, **stop** and return `Blocked` to `project-manager` in
35
35
  ## Core Responsibilities
36
36
 
37
37
  1. Implement pages/components/interactions with maintainable frontend architecture
38
- 2. Maintain component consistency and design-system alignment
38
+ 2. Maintain component consistency and DESIGN.md alignment — read design tokens before writing styled components
39
39
  3. Ensure accessibility and frontend performance quality
40
40
  4. Add or update frontend tests where assigned
41
41
 
@@ -16,7 +16,7 @@ Behavior is shared; track identity is parameterized.
16
16
 
17
17
  **Typically:** `mstar-plan-conventions` (path symbols + `metadata.primary_spec` / `spec_refs`); `mstar-superpowers-align` (when plugin on).
18
18
 
19
- **On demand:** `mstar-branch-worktree` (repo writes, `Working branch`); `mstar-phase-gates` (Execute / hotfix sections when gate fields are in the assignment).
19
+ **On demand:** `mstar-branch-worktree` (repo writes, `Working branch`); `mstar-phase-gates` (Execute / hotfix sections when gate fields are in the assignment); `mstar-design-md` (when task includes UI implementation — read DESIGN.md for design tokens).
20
20
 
21
21
  **Host:** `mstar-host` (detect; `references/opencode.md` | `cursor.md` | `codex.md`).
22
22