@mstar-harness/dsh 2.1.1
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/README.i18n.yaml +7 -0
- package/README.md +448 -0
- package/README.zh.md +221 -0
- package/bundle/README.md +312 -0
- package/bundle/cordis.patch.yml +17 -0
- package/dist/client/index.d.ts +14 -0
- package/dist/client/panel/PanelView.d.ts +67 -0
- package/dist/client/panel/TabNav.d.ts +28 -0
- package/dist/client/panel/graph/event-log.d.ts +76 -0
- package/dist/client/panel/graph/project-graph.d.ts +499 -0
- package/dist/client/panel/graph/schema.d.ts +224 -0
- package/dist/client/panel/guards.d.ts +12 -0
- package/dist/client/panel/locale.d.ts +134 -0
- package/dist/client/panel/pages/AgentCanvasPage.d.ts +363 -0
- package/dist/client/panel/pages/EventLogPage.d.ts +48 -0
- package/dist/client/panel/pages/IterationInfoSection.d.ts +80 -0
- package/dist/client/panel/pages/IterationTaskPage.d.ts +37 -0
- package/dist/client/panel/panel-meta.d.ts +18 -0
- package/dist/client/panel/plan-sort.d.ts +54 -0
- package/dist/client/panel/sidebar.d.ts +17 -0
- package/dist/client/panel/state-section.d.ts +23 -0
- package/dist/client/panel/use-mstar-engine-status.d.ts +42 -0
- package/dist/client/panel/zones/Legend.d.ts +18 -0
- package/dist/client/panel/zones/TaskBoard.d.ts +40 -0
- package/dist/client.d.ts +1 -0
- package/dist/client.js +4486 -0
- package/dist/gates/_shared.d.ts +198 -0
- package/dist/gates/adapter.d.ts +131 -0
- package/dist/gates/agent-flow.d.ts +320 -0
- package/dist/gates/catalog.d.ts +118 -0
- package/dist/gates/dispatch.d.ts +152 -0
- package/dist/gates/seams.d.ts +152 -0
- package/dist/gates/skill-lint.d.ts +87 -0
- package/dist/gates/status.d.ts +81 -0
- package/dist/gates/tools.d.ts +37 -0
- package/dist/index.d.ts +107 -0
- package/dist/index.js +5748 -0
- package/dist/invariant.d.ts +15 -0
- package/dist/invariant.js +29 -0
- package/dist/service.d.ts +96 -0
- package/dist/types.d.ts +241 -0
- package/harness-commands/codebase-audit.md +40 -0
- package/harness-commands/iteration-drive.md +129 -0
- package/harness-commands/iteration-loop.md +139 -0
- package/harness-commands/iteration-start.md +179 -0
- package/harness-skills/grill-me/SKILL.md +10 -0
- package/harness-skills/mstar-audit/SKILL.md +183 -0
- package/harness-skills/mstar-audit/references/audit-playbook.md +130 -0
- package/harness-skills/mstar-audit/references/finding-format.md +65 -0
- package/harness-skills/mstar-branch-worktree/SKILL.md +219 -0
- package/harness-skills/mstar-branch-worktree/references/parallel-writable-pre-dispatch.md +68 -0
- package/harness-skills/mstar-coding-behavior/SKILL.md +147 -0
- package/harness-skills/mstar-compound/SKILL.md +105 -0
- package/harness-skills/mstar-compound/assets/resolution-template.md +94 -0
- package/harness-skills/mstar-compound/references/category-mapping.md +37 -0
- package/harness-skills/mstar-compound/references/compound-workflow.md +155 -0
- package/harness-skills/mstar-compound/references/concepts-vocabulary.md +44 -0
- package/harness-skills/mstar-compound/references/schema.yaml +122 -0
- package/harness-skills/mstar-compound-refresh/SKILL.md +140 -0
- package/harness-skills/mstar-compound-refresh/references/project-knowledge-bootstrap.md +164 -0
- package/harness-skills/mstar-design-md/SKILL.md +142 -0
- package/harness-skills/mstar-design-md/references/completeness-checklist.md +181 -0
- package/harness-skills/mstar-design-md/references/design-md-spec.md +508 -0
- package/harness-skills/mstar-design-md/references/vercel-example.md +200 -0
- package/harness-skills/mstar-design-md/templates/DESIGN.dark.md.template +354 -0
- package/harness-skills/mstar-design-md/templates/DESIGN.md.template +474 -0
- package/harness-skills/mstar-dispatch-gates/SKILL.md +128 -0
- package/harness-skills/mstar-dispatch-gates/references/leaf-executor-checklist.md +23 -0
- package/harness-skills/mstar-harness-core/SKILL.md +180 -0
- package/harness-skills/mstar-host/SKILL.md +78 -0
- package/harness-skills/mstar-host/references/_shared/host-role-binding-core.md +51 -0
- package/harness-skills/mstar-host/references/_shared/plan-mode-bridge-core.md +91 -0
- package/harness-skills/mstar-host/references/codex.md +61 -0
- package/harness-skills/mstar-host/references/cursor-plan-mode-bridge.md +159 -0
- package/harness-skills/mstar-host/references/cursor.md +183 -0
- package/harness-skills/mstar-host/references/dsh.md +502 -0
- package/harness-skills/mstar-host/references/kimi-plan-mode-bridge.md +36 -0
- package/harness-skills/mstar-host/references/kimi.md +136 -0
- package/harness-skills/mstar-host/references/omp-plan-mode-bridge.md +32 -0
- package/harness-skills/mstar-host/references/omp.md +244 -0
- package/harness-skills/mstar-host/references/opencode.md +76 -0
- package/harness-skills/mstar-host/references/parallel-dispatch.md +68 -0
- package/harness-skills/mstar-host/references/zcode-plan-mode-bridge.md +36 -0
- package/harness-skills/mstar-host/references/zcode.md +129 -0
- package/harness-skills/mstar-iteration/SKILL.md +393 -0
- package/harness-skills/mstar-iteration/references/autonomous-direction-lock.md +90 -0
- package/harness-skills/mstar-iteration/references/iteration-artifact-boundaries.md +103 -0
- package/harness-skills/mstar-iteration/references/iteration-compass-template.md +142 -0
- package/harness-skills/mstar-iteration/references/iteration-corpus-hygiene.md +45 -0
- package/harness-skills/mstar-iteration/references/iteration-workspace-readme-template.md +27 -0
- package/harness-skills/mstar-iteration/references/phase-2-worktree-lease.md +193 -0
- package/harness-skills/mstar-iteration/references/phase-3-iteration-close.md +95 -0
- package/harness-skills/mstar-iteration/references/phase-4-5-pr-delivery.md +84 -0
- package/harness-skills/mstar-iteration/references/phase5-helper-discovery.md +24 -0
- package/harness-skills/mstar-phase-gates/SKILL.md +112 -0
- package/harness-skills/mstar-plan-artifacts/SKILL.md +46 -0
- package/harness-skills/mstar-plan-artifacts/references/done-compaction.md +88 -0
- package/harness-skills/mstar-plan-artifacts/references/knowledge-and-designs.md +100 -0
- package/harness-skills/mstar-plan-artifacts/references/plan-files-and-reports.md +99 -0
- package/harness-skills/mstar-plan-artifacts/references/plan-quality-bar.md +99 -0
- package/harness-skills/mstar-plan-artifacts/references/status-and-residuals.md +570 -0
- package/harness-skills/mstar-plan-artifacts/templates/README.md +9 -0
- package/harness-skills/mstar-plan-artifacts/templates/notes.empty.json +5 -0
- package/harness-skills/mstar-plan-artifacts/templates/plan.main.md +54 -0
- package/harness-skills/mstar-plan-artifacts/templates/plans-done.empty.json +3 -0
- package/harness-skills/mstar-plan-artifacts/templates/status.empty.json +7 -0
- package/harness-skills/mstar-plan-conventions/SKILL.md +165 -0
- package/harness-skills/mstar-plan-conventions/references/artifact-storage-paths.md +50 -0
- package/harness-skills/mstar-plan-conventions/references/effort-estimation.md +38 -0
- package/harness-skills/mstar-plan-conventions/references/harness-bootstrap-and-agents-layering.md +93 -0
- package/harness-skills/mstar-review-qc/SKILL.md +60 -0
- package/harness-skills/mstar-review-qc/references/review-responsibility-boundaries.md +54 -0
- package/harness-skills/mstar-roles/SKILL.md +86 -0
- package/harness-skills/mstar-roles/references/_shared/leaf-executor-core.md +46 -0
- package/harness-skills/mstar-roles/references/architect.md +114 -0
- package/harness-skills/mstar-roles/references/code-reviewer.md +109 -0
- package/harness-skills/mstar-roles/references/frontend-dev.md +70 -0
- package/harness-skills/mstar-roles/references/fullstack-dev-shared.md +89 -0
- package/harness-skills/mstar-roles/references/ops-engineer.md +78 -0
- package/harness-skills/mstar-roles/references/product-manager.md +107 -0
- package/harness-skills/mstar-roles/references/project-manager/dispatch-and-assignment.md +198 -0
- package/harness-skills/mstar-roles/references/project-manager/plan-management.md +61 -0
- package/harness-skills/mstar-roles/references/project-manager/qa-trigger-matrix.md +56 -0
- package/harness-skills/mstar-roles/references/project-manager/qc-and-residuals.md +98 -0
- package/harness-skills/mstar-roles/references/project-manager/routing-and-dev-allocation.md +99 -0
- package/harness-skills/mstar-roles/references/project-manager.md +310 -0
- package/harness-skills/mstar-roles/references/prompt-engineer.md +71 -0
- package/harness-skills/mstar-roles/references/qa-engineer/acceptance-gate.md +62 -0
- package/harness-skills/mstar-roles/references/qa-engineer.md +79 -0
- package/harness-skills/mstar-roles/references/qc-specialist/deep-review-lenses.md +95 -0
- package/harness-skills/mstar-roles/references/qc-specialist/report-template.md +72 -0
- package/harness-skills/mstar-roles/references/qc-specialist/reviewer-checklist.md +44 -0
- package/harness-skills/mstar-roles/references/qc-specialist/reviewer-workflow.md +57 -0
- package/harness-skills/mstar-roles/references/qc-specialist-shared.md +128 -0
- package/harness-skills/mstar-roles/references/writing-specialist.md +59 -0
- package/harness-skills/mstar-sdd/SKILL.md +133 -0
- package/harness-skills/mstar-sdd/references/file-handoffs.md +83 -0
- package/harness-skills/mstar-sdd/references/implementer-continuation-prompt.md +44 -0
- package/harness-skills/mstar-sdd/references/implementer-prompt.md +56 -0
- package/harness-skills/mstar-sdd/references/sticky-implementer-session.md +103 -0
- package/harness-skills/mstar-sdd/references/task-reviewer-prompt.md +53 -0
- package/harness-skills/mstar-skill-authoring/SKILL.md +162 -0
- package/harness-skills/mstar-skill-authoring/references/skillsbench-authoring.md +117 -0
- package/harness-skills/mstar-strategy/SKILL.md +130 -0
- package/harness-skills/pm/SKILL.md +40 -0
- package/package.json +92 -0
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
# DESIGN.md Completeness Checklist
|
|
2
|
+
|
|
3
|
+
Three-level progressive checklist for evaluating whether a `DESIGN.md` is sufficient to drive agent UI generation. Each level builds on the previous level's requirements.
|
|
4
|
+
|
|
5
|
+
## How to use
|
|
6
|
+
|
|
7
|
+
1. Read `DESIGN.md` (and `DESIGN.dark.md` if exists)
|
|
8
|
+
2. **Parse the YAML frontmatter** for structured token values — the frontmatter is the SSOT for colors, typography, spacing, rounded, and components
|
|
9
|
+
3. Review the Markdown body for documented rules, rhythm, and usage intent
|
|
10
|
+
4. Check each item in the target level (and all lower levels)
|
|
11
|
+
5. An item is **complete** only when concrete values exist in the frontmatter (uncommented keys with non-placeholder values) — YAML comments and `[LEVEL*]` placeholder values do not count
|
|
12
|
+
6. A `DESIGN.md` is at **Level N** when all items in Level N and below are complete
|
|
13
|
+
7. Record the result in a comment at the top of DESIGN.md:
|
|
14
|
+
|
|
15
|
+
```
|
|
16
|
+
<!-- COMPLETENESS_LEVEL: N — last audited YYYY-MM-DD -->
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Level 1 — MVP (prevents guesswork)
|
|
20
|
+
|
|
21
|
+
The minimum bar for an agent to produce UI without hallucinating colors and typography. Sufficient for early-stage projects, prototypes, and CLI tools with minimal UI.
|
|
22
|
+
|
|
23
|
+
### Checklist
|
|
24
|
+
|
|
25
|
+
- [ ] **Frontmatter exists** — YAML frontmatter block with `---` delimiters present and parseable
|
|
26
|
+
- [ ] **Frontmatter `version`** — `version: 0.1.0` declared
|
|
27
|
+
- [ ] **Frontmatter `name` and `description`** — design system name and description filled (non-placeholder)
|
|
28
|
+
- [ ] **Overview** — design system name and aesthetic principles stated in body
|
|
29
|
+
- [ ] **Colors — Background** — frontmatter has `colors.background-100` with a concrete hex value (not `"[LEVEL*]"` placeholder)
|
|
30
|
+
- [ ] **Colors — Text** — frontmatter has `colors.gray-1000` and `colors.gray-900` with concrete hex values
|
|
31
|
+
- [ ] **Colors — Accent** — frontmatter has `colors.blue-700` (or brand equivalent) with a concrete hex value
|
|
32
|
+
- [ ] **Colors — Semantic** — frontmatter has `colors.red-700` (error) and `colors.amber-700` (warning) with concrete hex values
|
|
33
|
+
- [ ] **Typography — Body** — frontmatter has at least one `typography.copy-*` token with all five properties filled
|
|
34
|
+
- [ ] **Typography — Heading** — frontmatter has at least one `typography.heading-*` token with all five properties filled
|
|
35
|
+
- [ ] **Spacing** — frontmatter has `spacing.base` declared and at least 5 numbered steps with pixel values
|
|
36
|
+
- [ ] **Rounded** — frontmatter has `rounded.sm` with a concrete pixel value
|
|
37
|
+
- [ ] **Breakpoints** — at least 2 responsive breakpoints documented in body
|
|
38
|
+
|
|
39
|
+
### What an agent CAN do at Level 1
|
|
40
|
+
|
|
41
|
+
- Style a basic page with correct brand colors
|
|
42
|
+
- Choose readable typography
|
|
43
|
+
- Apply consistent spacing
|
|
44
|
+
- Make a responsive layout that works on mobile and desktop
|
|
45
|
+
- Signal errors with the correct color
|
|
46
|
+
|
|
47
|
+
### What an agent CANNOT do at Level 1
|
|
48
|
+
|
|
49
|
+
- Build a consistent component library (no component tokens)
|
|
50
|
+
- Apply elevation/shadow correctly (will guess)
|
|
51
|
+
- Use motion responsibly (will guess)
|
|
52
|
+
- Generate dark mode (no DESIGN.dark.md)
|
|
53
|
+
- Apply voice rules to copy text
|
|
54
|
+
|
|
55
|
+
### Verdict
|
|
56
|
+
|
|
57
|
+
- **All 13 items checked → Level 1 complete**
|
|
58
|
+
- **Missing items → below Level 1 (insufficient for agent UI generation)**
|
|
59
|
+
|
|
60
|
+
## Level 2 — Standard (consistent components)
|
|
61
|
+
|
|
62
|
+
Sufficient for building a consistent, polished UI with reusable components. The expected level for production codebases with a frontend.
|
|
63
|
+
|
|
64
|
+
Prerequisite: Level 1 complete.
|
|
65
|
+
|
|
66
|
+
### Checklist
|
|
67
|
+
|
|
68
|
+
- All Level 1 items complete
|
|
69
|
+
- [ ] **Colors — Full background scale** — frontmatter has `colors.background-100`, `background-200`, `background-300` active (uncommented, filled)
|
|
70
|
+
- [ ] **Colors — Full gray solid scale** — frontmatter has `colors.gray-100` through `gray-1000` (10 steps) all active
|
|
71
|
+
- [ ] **Colors — Gray alpha scale** — frontmatter has `colors.gray-alpha-100` through at least `gray-alpha-600` all active
|
|
72
|
+
- [ ] **Colors — All accent scales** — frontmatter has `blue`, `red`, `amber`, `green`, `teal`, `purple`, `pink` scales, each with at least `700`/`800`/`900`/`1000` steps active
|
|
73
|
+
- [ ] **Typography — Headings** — frontmatter has at least 3 heading levels active (e.g., `heading-32`, `heading-24`, `heading-20`)
|
|
74
|
+
- [ ] **Typography — Labels** — frontmatter has at least one `label-*` token active
|
|
75
|
+
- [ ] **Typography — Buttons** — frontmatter has at least one `button-*` token active
|
|
76
|
+
- [ ] **Spacing** — frontmatter `spacing:` has full 9-step scale active; three-step rhythm documented in body
|
|
77
|
+
- [ ] **Rounded** — frontmatter `rounded:` has `sm`, `md`, `lg`, `full` all active
|
|
78
|
+
- [ ] **Breakpoints** — at least 4 breakpoints documented in body
|
|
79
|
+
- [ ] **Components — Button** — frontmatter `components:` has `button-primary` and `button-secondary` with all properties filled, plus `button-small` size variant; body documents hover/active/disabled/focus states
|
|
80
|
+
- [ ] **Components — Input** — frontmatter `components:` has `input` with all properties filled; body documents states
|
|
81
|
+
|
|
82
|
+
### What an agent CAN do at Level 2
|
|
83
|
+
|
|
84
|
+
- Everything from Level 1
|
|
85
|
+
- Build a consistent Button component with all states
|
|
86
|
+
- Build a consistent Input component with all states
|
|
87
|
+
- Use the full color scale for nuanced visual hierarchy
|
|
88
|
+
- Apply correct typography to every text role
|
|
89
|
+
- Use translucent overlays and borders (alpha scale)
|
|
90
|
+
- Pick the right accent color for each semantic purpose
|
|
91
|
+
|
|
92
|
+
### What an agent CANNOT do at Level 2
|
|
93
|
+
|
|
94
|
+
- Generate dark mode (no DESIGN.dark.md)
|
|
95
|
+
- Apply elevation/shadows with confidence (may guess)
|
|
96
|
+
- Use motion consistently (may guess)
|
|
97
|
+
- Enforce voice rules on copy text
|
|
98
|
+
- Know the correct border radius for each component type
|
|
99
|
+
|
|
100
|
+
### Verdict
|
|
101
|
+
|
|
102
|
+
- **All 11 items checked (on top of Level 1) → Level 2 complete**
|
|
103
|
+
- **1–3 items missing → Level 2 partial; useable but expect component inconsistencies**
|
|
104
|
+
- **4+ items missing → below Level 2; recommend completing Level 1 only deploy**
|
|
105
|
+
|
|
106
|
+
## Level 3 — Production (complete design system)
|
|
107
|
+
|
|
108
|
+
Full design system ready for production at scale. Includes dual theme, motion, and voice.
|
|
109
|
+
|
|
110
|
+
Prerequisite: Level 2 complete.
|
|
111
|
+
|
|
112
|
+
### Checklist
|
|
113
|
+
|
|
114
|
+
- All Level 1 and Level 2 items complete
|
|
115
|
+
- [ ] **DESIGN.dark.md exists** — dark theme file with `---` YAML frontmatter present, same key structure as DESIGN.md
|
|
116
|
+
- [ ] **Dark theme frontmatter parity** — every token in DESIGN.md frontmatter (`colors`, `typography`, `spacing`, `rounded`, `components`) has a corresponding active entry in DESIGN.dark.md frontmatter with dark-appropriate values
|
|
117
|
+
- [ ] **Elevation — Shadows** — at least 3 elevation levels (card, popover, modal) with explicit `box-shadow` values in body
|
|
118
|
+
- [ ] **Motion — Easing** — easing curve declared in body
|
|
119
|
+
- [ ] **Motion — Durations** — at least state change, popover, modal durations in body
|
|
120
|
+
- [ ] **Motion — Reduced motion** — `prefers-reduced-motion` rule declared in body
|
|
121
|
+
- [ ] **Components — Full library** — frontmatter `components:` has at least Card, Modal, Tooltip, Menu/Dropdown variants
|
|
122
|
+
- [ ] **Voice & Content** — writing rules documented in body: casing conventions, action naming, error format, toast format, empty state format
|
|
123
|
+
|
|
124
|
+
### What an agent CAN do at Level 3
|
|
125
|
+
|
|
126
|
+
- Everything from Levels 1 and 2
|
|
127
|
+
- Generate dark-mode-compatible UI
|
|
128
|
+
- Apply elevation correctly for every UI layer
|
|
129
|
+
- Animate state changes consistently
|
|
130
|
+
- Apply correct border radius per element type
|
|
131
|
+
- Write correct microcopy (button labels, errors, toasts, empty states)
|
|
132
|
+
- Build a full component library (Card, Modal, Tooltip, Menu)
|
|
133
|
+
|
|
134
|
+
### Verdict
|
|
135
|
+
|
|
136
|
+
- **All 9 items checked → Level 3 complete (production-ready)**
|
|
137
|
+
- **DESIGN.dark.md missing but rest complete → Level 2+ (partial Level 3, no dark mode)**
|
|
138
|
+
|
|
139
|
+
## Audit workflow
|
|
140
|
+
|
|
141
|
+
### When auditing existing DESIGN.md
|
|
142
|
+
|
|
143
|
+
1. Load the DESIGN.md file
|
|
144
|
+
2. Start at Level 1 checklist — check each item against actual content
|
|
145
|
+
3. If Level 1 complete, proceed to Level 2
|
|
146
|
+
4. If Level 2 complete, proceed to Level 3
|
|
147
|
+
5. Record the level as `<!-- COMPLETENESS_LEVEL: N -->` at top of DESIGN.md
|
|
148
|
+
6. For each incomplete item, note what's missing and which level it belongs to
|
|
149
|
+
7. Check for `LEVEL2_PLACEHOLDER` / `LEVEL3_PLACEHOLDER` markers — if present and the project is ready for upgrade, recommend activation
|
|
150
|
+
|
|
151
|
+
### When creating new DESIGN.md
|
|
152
|
+
|
|
153
|
+
1. Decide target level with PM/architect:
|
|
154
|
+
- Prototype / early project → Level 1
|
|
155
|
+
- Production frontend → Level 2
|
|
156
|
+
- Full design system → Level 3
|
|
157
|
+
2. Copy the template from `templates/DESIGN.md.template`
|
|
158
|
+
3. Fill all items in the target level
|
|
159
|
+
4. Run this checklist to confirm
|
|
160
|
+
5. Leave higher-level placeholders as-is
|
|
161
|
+
|
|
162
|
+
### When upgrading DESIGN.md
|
|
163
|
+
|
|
164
|
+
1. Read current DESIGN.md and note the level tag
|
|
165
|
+
2. Identify which items in the next level are missing
|
|
166
|
+
3. For each missing item, either:
|
|
167
|
+
- Fill with concrete values if known
|
|
168
|
+
- Leave the `LEVEL*_PLACEHOLDER` marker if deferred
|
|
169
|
+
4. Re-audit and update the level tag
|
|
170
|
+
|
|
171
|
+
## Upgrade trigger conditions
|
|
172
|
+
|
|
173
|
+
Agents encountering a DESIGN.md with placeholders should evaluate these conditions:
|
|
174
|
+
|
|
175
|
+
| Condition | Action |
|
|
176
|
+
|-----------|--------|
|
|
177
|
+
| `LEVEL2_PLACEHOLDER` found AND plan includes component work | Recommend completing the Level 2 sections |
|
|
178
|
+
| `LEVEL3_PLACEHOLDER` found AND plan includes dark mode | Recommend creating DESIGN.dark.md |
|
|
179
|
+
| `LEVEL3_PLACEHOLDER` found AND plan targets production release | Recommend completing Level 3 |
|
|
180
|
+
| `COMPLETENESS_LEVEL: 1` AND project has >3 UI views | Recommend upgrading to Level 2 |
|
|
181
|
+
| `COMPLETENESS_LEVEL: 2` AND project has dark mode requirement | Recommend upgrading to Level 3 |
|
|
@@ -0,0 +1,508 @@
|
|
|
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
|
+
- Markdown (`.md`) with YAML frontmatter in project root
|
|
8
|
+
- UTF-8 encoding
|
|
9
|
+
- **YAML frontmatter** (`---` delimited block at top) contains structured, machine-readable token values
|
|
10
|
+
- **Markdown body** (everything after the `---` closing delimiter) contains human/agent-readable documentation, usage rules, and design intent
|
|
11
|
+
- Multi-theme: `DESIGN.md` (light/default) + `DESIGN.dark.md` (dark variant, same token names)
|
|
12
|
+
|
|
13
|
+
## 1.5. YAML Frontmatter — Structured Token Store
|
|
14
|
+
|
|
15
|
+
The YAML frontmatter is the **single source of truth** for token values. The Markdown body is supplementary documentation. Tools and agents MUST parse the frontmatter for token resolution; the body prose explains intent and rules.
|
|
16
|
+
|
|
17
|
+
### Version field
|
|
18
|
+
|
|
19
|
+
```yaml
|
|
20
|
+
version: 0.1.0
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Format version identifier. Current value: `0.1.0`.
|
|
24
|
+
|
|
25
|
+
### Name and description
|
|
26
|
+
|
|
27
|
+
```yaml
|
|
28
|
+
name: "[Design System Name]"
|
|
29
|
+
description: "[Brief description, noting light/dark theme relationship]"
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
### Colors (`colors:`)
|
|
33
|
+
|
|
34
|
+
Flat map of token names to hex (or `oklch()` for P3) values. All scales are flat — not nested:
|
|
35
|
+
|
|
36
|
+
```yaml
|
|
37
|
+
colors:
|
|
38
|
+
background-100: "#ffffff"
|
|
39
|
+
gray-1000: "#171717"
|
|
40
|
+
blue-700: "#006bff"
|
|
41
|
+
blue-700-p3: "oklch(57.61% 0.2508 258.23)"
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
- Color token names follow the `{namespace}-{step}` convention (see §3)
|
|
45
|
+
- `*-p3` variants are optional wide-gamut equivalents in `oklch()` for Display P3 screens
|
|
46
|
+
- Alpha tokens use `#rrggbbaa` hex-with-alpha format (8 hex digits)
|
|
47
|
+
- All tokens are at the top level of `colors:` — no sub-grouping by family
|
|
48
|
+
|
|
49
|
+
### Typography (`typography:`)
|
|
50
|
+
|
|
51
|
+
Map of tokens to structured sub-objects:
|
|
52
|
+
|
|
53
|
+
```yaml
|
|
54
|
+
typography:
|
|
55
|
+
copy-16:
|
|
56
|
+
fontFamily: Geist Sans
|
|
57
|
+
fontSize: 16px
|
|
58
|
+
fontWeight: 400
|
|
59
|
+
lineHeight: 1.6
|
|
60
|
+
letterSpacing: 0
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
Each typography token sub-object contains exactly five properties: `fontFamily`, `fontSize`, `fontWeight`, `lineHeight`, `letterSpacing`. Typography token names follow the `{role}-{size}` convention (see §3).
|
|
64
|
+
|
|
65
|
+
### Spacing (`spacing:`)
|
|
66
|
+
|
|
67
|
+
Flat map of numeric keys to pixel values:
|
|
68
|
+
|
|
69
|
+
```yaml
|
|
70
|
+
spacing:
|
|
71
|
+
base: 4px
|
|
72
|
+
1: 4px
|
|
73
|
+
2: 8px
|
|
74
|
+
3: 12px
|
|
75
|
+
4: 16px
|
|
76
|
+
6: 24px
|
|
77
|
+
8: 32px
|
|
78
|
+
10: 40px
|
|
79
|
+
16: 64px
|
|
80
|
+
24: 96px
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
- `base` declares the base unit (typically `4px` or `8px`)
|
|
84
|
+
- Numeric keys are multipliers on the base unit
|
|
85
|
+
|
|
86
|
+
### Border radius (`rounded:`)
|
|
87
|
+
|
|
88
|
+
Flat map of semantic keys to pixel values:
|
|
89
|
+
|
|
90
|
+
```yaml
|
|
91
|
+
rounded:
|
|
92
|
+
sm: 6px
|
|
93
|
+
md: 12px
|
|
94
|
+
lg: 16px
|
|
95
|
+
full: 9999px
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
### Components (`components:`)
|
|
99
|
+
|
|
100
|
+
Map of component variant names to structured sub-objects. Values reference other frontmatter keys using `{path}` syntax:
|
|
101
|
+
|
|
102
|
+
```yaml
|
|
103
|
+
components:
|
|
104
|
+
button-primary:
|
|
105
|
+
backgroundColor: "{colors.gray-1000}"
|
|
106
|
+
textColor: "{colors.background-100}"
|
|
107
|
+
typography: "{typography.button-14}"
|
|
108
|
+
rounded: "{rounded.sm}"
|
|
109
|
+
padding: "0 10px"
|
|
110
|
+
height: 40px
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
- `{colors.X}` resolves to the value of `colors.X` in the same file's frontmatter
|
|
114
|
+
- `{typography.X}` resolves to the typography object (not a single value — consumers use the full object)
|
|
115
|
+
- `{rounded.X}` resolves to the border-radius value
|
|
116
|
+
- Direct values (like `"#ffffff"` or `40px`) are literal and do not reference other keys
|
|
117
|
+
|
|
118
|
+
### Completeness level in frontmatter
|
|
119
|
+
|
|
120
|
+
The frontmatter always contains the full key structure for every level. Level 2+ keys that are not yet filled are YAML-commented out with `# LEVEL2_PLACEHOLDER:` comments. The audit workflow (see `completeness-checklist.md`) checks which keys are active (uncommented) vs. placeholder (commented or containing `[LEVEL` / placeholder values).
|
|
121
|
+
|
|
122
|
+
### Frontmatter vs. body contract
|
|
123
|
+
|
|
124
|
+
| Aspect | Frontmatter (YAML) | Body (Markdown) |
|
|
125
|
+
|--------|-------------------|-----------------|
|
|
126
|
+
| Token values | **SSOT** — parse here | Descriptive prose referencing tokens |
|
|
127
|
+
| Color hex values | All active tokens here | Explanation of scale intent, usage rules |
|
|
128
|
+
| Typography specs | Exact CSS properties | Role descriptions, intent encoding |
|
|
129
|
+
| Spacing scale | Exact pixel values | Rhythm rules, usage patterns |
|
|
130
|
+
| Component tokens | Variants with references | State rules, size descriptions, focus patterns |
|
|
131
|
+
| Elevation | N/A (body-only) | box-shadow values per element |
|
|
132
|
+
| Motion | N/A (body-only) | Duration and easing tables |
|
|
133
|
+
| Voice rules | N/A (body-only) | Copy conventions and examples |
|
|
134
|
+
|
|
135
|
+
## 2. Section definitions
|
|
136
|
+
|
|
137
|
+
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. Where a section has corresponding YAML frontmatter fields, the frontmatter holds the canonical values and the body provides documentation.
|
|
138
|
+
|
|
139
|
+
### 2.1 Overview
|
|
140
|
+
|
|
141
|
+
**Purpose:** Declare the design system's identity — a short statement that grounds all downstream decisions.
|
|
142
|
+
|
|
143
|
+
**What to include:**
|
|
144
|
+
- Name of the design system
|
|
145
|
+
- Core aesthetic principles (e.g., minimal, high-contrast, playful)
|
|
146
|
+
- Primary audience (developer tools, consumer app, dashboard, etc.)
|
|
147
|
+
- Note whether this is a light theme, dark theme, or references another file for the opposite theme
|
|
148
|
+
|
|
149
|
+
**Example (minimal):**
|
|
150
|
+
|
|
151
|
+
```
|
|
152
|
+
# Acme Design
|
|
153
|
+
|
|
154
|
+
Acme Design is a minimal, high-contrast design system for our developer dashboard.
|
|
155
|
+
Prioritize readability and signal state through color and iconography, not decoration.
|
|
156
|
+
|
|
157
|
+
This is the Light theme. The Dark theme lives at `/DESIGN.dark.md`.
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
**Level relevance:** Level 1+
|
|
161
|
+
|
|
162
|
+
### 2.2 Colors
|
|
163
|
+
|
|
164
|
+
**Purpose:** Define every color used in the UI, organized into scales.
|
|
165
|
+
|
|
166
|
+
**SSOT:** All concrete color values live in the frontmatter `colors:` map. The body prose below explains scale conventions and usage intent.
|
|
167
|
+
|
|
168
|
+
**Conventions:**
|
|
169
|
+
- Each color scale has 10 steps (`100`–`1000`), encoding intent:
|
|
170
|
+
- `100`: default background
|
|
171
|
+
- `200`: hover background
|
|
172
|
+
- `300`: active background
|
|
173
|
+
- `400`: default border
|
|
174
|
+
- `500`: hover border
|
|
175
|
+
- `600`: active border
|
|
176
|
+
- `700`: solid fill
|
|
177
|
+
- `800`: solid fill hover
|
|
178
|
+
- `900`: secondary text/icons
|
|
179
|
+
- `1000`: primary text/icons
|
|
180
|
+
- **Background scales** (`background-100`, `background-200`): page/card surfaces
|
|
181
|
+
- **Alpha scales** (`gray-alpha-*`): translucent overlays, borders, dividers — layer over any background; use `#rrggbbaa` hex-with-alpha or `rgba()` notation
|
|
182
|
+
- **Solid scales** (`gray-*`): text, opaque fills — hold contrast on any surface
|
|
183
|
+
- **Accent scales** (`blue`, `red`, `amber`, `green`, `teal`, `purple`, `pink`): carry meaning — success, error, warning, links, focus
|
|
184
|
+
- Accent scales may use fewer steps if not all needed
|
|
185
|
+
|
|
186
|
+
**Values:** sRGB hex (`#ffffff`), optionally with wide-gamut equivalents in `oklch()` as `*-p3` suffix keys.
|
|
187
|
+
|
|
188
|
+
**Example frontmatter:**
|
|
189
|
+
|
|
190
|
+
```yaml
|
|
191
|
+
colors:
|
|
192
|
+
background-100: "#ffffff"
|
|
193
|
+
background-200: "#f5f5f5"
|
|
194
|
+
gray-100: "#f5f5f5"
|
|
195
|
+
gray-700: "#333333"
|
|
196
|
+
gray-1000: "#111111"
|
|
197
|
+
blue-700: "#0066ff"
|
|
198
|
+
red-700: "#e60000"
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
**Level relevance:** Level 1+ requires at least background, text (gray-900/1000), and one accent (blue-700, red-700, amber-700) active in frontmatter. Level 2+ requires all color scales uncommented and filled.
|
|
202
|
+
|
|
203
|
+
### 2.3 Typography
|
|
204
|
+
|
|
205
|
+
**Purpose:** Define font families, sizes, weights, line heights, and letter spacing for every text role.
|
|
206
|
+
|
|
207
|
+
**SSOT:** All concrete typography values live in the frontmatter `typography:` map. The body prose explains role semantics and usage intent.
|
|
208
|
+
|
|
209
|
+
**Conventions:**
|
|
210
|
+
- **Heading tokens** (`heading-72` through `heading-14`): title pages and section headings
|
|
211
|
+
- **Label tokens** (`label-20` through `label-12`): single-line scannable text — navigation, form labels, table headers
|
|
212
|
+
- **Copy tokens** (`copy-24` through `copy-13`): multi-line body text with taller line height
|
|
213
|
+
- **Button tokens** (`button-16` through `button-12`): medium-weight labels for buttons
|
|
214
|
+
- **Mono tokens**: same metrics with monospace font for code/data
|
|
215
|
+
- Each token carries: `fontFamily`, `fontSize`, `fontWeight`, `lineHeight`, `letterSpacing`
|
|
216
|
+
- Token name encodes intended font size (e.g., `copy-14` ≈ 14px body copy)
|
|
217
|
+
- Use tabular figures for numbers that need alignment
|
|
218
|
+
|
|
219
|
+
**Example frontmatter (minimal):**
|
|
220
|
+
|
|
221
|
+
```yaml
|
|
222
|
+
typography:
|
|
223
|
+
heading-32:
|
|
224
|
+
fontFamily: Inter
|
|
225
|
+
fontSize: 32px
|
|
226
|
+
fontWeight: 600
|
|
227
|
+
lineHeight: 1.2
|
|
228
|
+
letterSpacing: -0.02em
|
|
229
|
+
copy-16:
|
|
230
|
+
fontFamily: Inter
|
|
231
|
+
fontSize: 16px
|
|
232
|
+
fontWeight: 400
|
|
233
|
+
lineHeight: 1.6
|
|
234
|
+
letterSpacing: 0
|
|
235
|
+
```
|
|
236
|
+
|
|
237
|
+
**Level relevance:** Level 1+ requires at least one copy and one heading token active in frontmatter. Level 2+ requires heading, label, copy, and button typography tokens.
|
|
238
|
+
|
|
239
|
+
### 2.4 Spacing & Layout
|
|
240
|
+
|
|
241
|
+
**Purpose:** Define the spatial grid and responsive breakpoints.
|
|
242
|
+
|
|
243
|
+
**SSOT:** Spacing scale values live in the frontmatter `spacing:` map. Border radius values live in `rounded:`. Breakpoints are documented in the body.
|
|
244
|
+
|
|
245
|
+
**Conventions:**
|
|
246
|
+
- Base unit: 4px or 8px (declared as `spacing.base` in frontmatter)
|
|
247
|
+
- Scale: `4, 8, 12, 16, 24, 32, 40, 64, 96` (on 4px) or equivalent on 8px
|
|
248
|
+
- Three-step rhythm: small inside group → medium between groups → large between sections
|
|
249
|
+
- Card padding: 24px default, 16px compact, 32px hero
|
|
250
|
+
- Content max-width with responsive side padding
|
|
251
|
+
- Breakpoints: provide explicit pixel values and names
|
|
252
|
+
|
|
253
|
+
**Example frontmatter:**
|
|
254
|
+
|
|
255
|
+
```yaml
|
|
256
|
+
spacing:
|
|
257
|
+
base: 4px
|
|
258
|
+
1: 4px
|
|
259
|
+
2: 8px
|
|
260
|
+
3: 12px
|
|
261
|
+
4: 16px
|
|
262
|
+
6: 24px
|
|
263
|
+
8: 32px
|
|
264
|
+
10: 40px
|
|
265
|
+
16: 64px
|
|
266
|
+
24: 96px
|
|
267
|
+
|
|
268
|
+
rounded:
|
|
269
|
+
sm: 6px
|
|
270
|
+
md: 12px
|
|
271
|
+
lg: 16px
|
|
272
|
+
full: 9999px
|
|
273
|
+
```
|
|
274
|
+
|
|
275
|
+
**Level relevance:** Level 1+ requires `spacing.base` and at least 5 scale steps in frontmatter, plus at least 2 breakpoints in body.
|
|
276
|
+
|
|
277
|
+
### 2.5 Elevation & Depth
|
|
278
|
+
|
|
279
|
+
**Purpose:** Define shadow values for layered UI elements.
|
|
280
|
+
|
|
281
|
+
**Conventions:**
|
|
282
|
+
- Use tonal surfaces first, shadows second — keep shadows subtle
|
|
283
|
+
- Define shadow values per elevation level: cards, popovers, modals
|
|
284
|
+
- Pair each elevation with a matching border radius
|
|
285
|
+
|
|
286
|
+
**Example:**
|
|
287
|
+
|
|
288
|
+
```
|
|
289
|
+
## Elevation
|
|
290
|
+
|
|
291
|
+
### Shadows
|
|
292
|
+
| Level | Value |
|
|
293
|
+
|-------|-------|
|
|
294
|
+
| Card | 0 2px 2px rgba(0,0,0,0.04) |
|
|
295
|
+
| 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) |
|
|
296
|
+
| 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) |
|
|
297
|
+
```
|
|
298
|
+
|
|
299
|
+
**Level relevance:** Level 3 only.
|
|
300
|
+
|
|
301
|
+
### 2.6 Motion
|
|
302
|
+
|
|
303
|
+
**Purpose:** Define animation durations and easing curves.
|
|
304
|
+
|
|
305
|
+
**Conventions:**
|
|
306
|
+
- Motion clarifies change, never decorates
|
|
307
|
+
- Default: 0ms (instant) is often the best choice
|
|
308
|
+
- When needed: short, physical easing — roughly 150ms state, 200ms popover, 300ms modal
|
|
309
|
+
- Honor `prefers-reduced-motion`
|
|
310
|
+
- No looping or attention-grabbing animations
|
|
311
|
+
|
|
312
|
+
**Example:**
|
|
313
|
+
|
|
314
|
+
```
|
|
315
|
+
## Motion
|
|
316
|
+
|
|
317
|
+
### Easing
|
|
318
|
+
Default: cubic-bezier(0.175, 0.885, 0.32, 1.1)
|
|
319
|
+
|
|
320
|
+
### Durations
|
|
321
|
+
| Context | Duration |
|
|
322
|
+
|---------|----------|
|
|
323
|
+
| State change | 150ms |
|
|
324
|
+
| Popover/Tooltip | 200ms |
|
|
325
|
+
| Modal/Overlay | 300ms |
|
|
326
|
+
```
|
|
327
|
+
|
|
328
|
+
**Level relevance:** Level 3 only.
|
|
329
|
+
|
|
330
|
+
### 2.7 Shapes
|
|
331
|
+
|
|
332
|
+
**Purpose:** Define border radius values.
|
|
333
|
+
|
|
334
|
+
**Conventions:**
|
|
335
|
+
- Keep radii tight and consistent
|
|
336
|
+
- One radius family per view, never mix rounded and sharp corners
|
|
337
|
+
- Common values: 6px (surfaces), 12px (menus/modals), 16px (fullscreen), 9999px (pills)
|
|
338
|
+
|
|
339
|
+
**Example:**
|
|
340
|
+
|
|
341
|
+
```
|
|
342
|
+
## Shapes
|
|
343
|
+
|
|
344
|
+
### Border Radius
|
|
345
|
+
| Context | Value |
|
|
346
|
+
|---------|-------|
|
|
347
|
+
| Surface, Input, Button | 6px |
|
|
348
|
+
| Menu, Modal, Popover | 12px |
|
|
349
|
+
| Fullscreen | 16px |
|
|
350
|
+
| Pill, Avatar | 9999px |
|
|
351
|
+
```
|
|
352
|
+
|
|
353
|
+
**Level relevance:** Level 3 only.
|
|
354
|
+
|
|
355
|
+
### 2.8 Components
|
|
356
|
+
|
|
357
|
+
**Purpose:** Define ready-to-use token values for common components.
|
|
358
|
+
|
|
359
|
+
**SSOT:** Component variant tokens live in the frontmatter `components:` map. Values reference other frontmatter keys using `{colors.X}`, `{typography.X}`, `{rounded.X}` syntax. The body prose documents state rules (hover/active/disabled/focus) and size variants.
|
|
360
|
+
|
|
361
|
+
**Conventions:**
|
|
362
|
+
- Each component variant gets: `backgroundColor`, `textColor`, `typography`, `rounded`, `height` (and `padding`, `borderColor` where applicable)
|
|
363
|
+
- Size variants: default (40px), small (32px), large (48px) — override only typography/padding/height
|
|
364
|
+
- State mappings: hover steps foreground up one, active steps up two; border from 400→500→600
|
|
365
|
+
- Focus ring: two-layer box-shadow (surface gap + accent ring)
|
|
366
|
+
- Disabled: 100 fill + 700 text + not-allowed cursor
|
|
367
|
+
|
|
368
|
+
**Example frontmatter:**
|
|
369
|
+
|
|
370
|
+
```yaml
|
|
371
|
+
components:
|
|
372
|
+
button-primary:
|
|
373
|
+
backgroundColor: "{colors.gray-1000}"
|
|
374
|
+
textColor: "{colors.background-100}"
|
|
375
|
+
typography: "{typography.button-14}"
|
|
376
|
+
rounded: "{rounded.sm}"
|
|
377
|
+
padding: "0 10px"
|
|
378
|
+
height: 40px
|
|
379
|
+
button-secondary:
|
|
380
|
+
backgroundColor: "{colors.background-100}"
|
|
381
|
+
textColor: "{colors.gray-1000}"
|
|
382
|
+
typography: "{typography.button-14}"
|
|
383
|
+
rounded: "{rounded.sm}"
|
|
384
|
+
padding: "0 10px"
|
|
385
|
+
height: 40px
|
|
386
|
+
input:
|
|
387
|
+
backgroundColor: "{colors.background-100}"
|
|
388
|
+
textColor: "{colors.gray-1000}"
|
|
389
|
+
typography: "{typography.label-14}"
|
|
390
|
+
rounded: "{rounded.sm}"
|
|
391
|
+
padding: "0 12px"
|
|
392
|
+
height: 40px
|
|
393
|
+
```
|
|
394
|
+
|
|
395
|
+
**Level relevance:** Level 2+ requires at least Button (primary, secondary) and Input tokens in frontmatter. Level 3 requires full component library.
|
|
396
|
+
|
|
397
|
+
### 2.9 Voice & Content
|
|
398
|
+
|
|
399
|
+
**Purpose:** Define content writing rules for the UI.
|
|
400
|
+
|
|
401
|
+
**Conventions:**
|
|
402
|
+
- Title Case for labels, buttons, titles, tabs
|
|
403
|
+
- Sentence case for body, helper text, toasts
|
|
404
|
+
- Verb + Noun for actions (`Deploy Project`, never `Confirm`)
|
|
405
|
+
- Errors: what happened + what to do
|
|
406
|
+
- Toasts: specific thing + no trailing period + no `successfully`
|
|
407
|
+
- Empty states: describe the first action
|
|
408
|
+
- In-progress: present participle + ellipsis (`Deploying…`)
|
|
409
|
+
- Use numerals, curly quotes, the ellipsis character
|
|
410
|
+
|
|
411
|
+
**Example:**
|
|
412
|
+
|
|
413
|
+
```
|
|
414
|
+
## Voice & Content
|
|
415
|
+
|
|
416
|
+
- Use Title Case for labels, buttons, titles, and tabs
|
|
417
|
+
- Sentence case for body, helper text, and toasts
|
|
418
|
+
- Name actions with a verb and a noun: `Deploy Project`, `Delete Member`
|
|
419
|
+
- Write errors as what happened plus what to do next
|
|
420
|
+
- Toasts name the specific thing that changed, drop the trailing period
|
|
421
|
+
- Empty states point to the first action: `No deployments yet. Push to your Git repository to create one.`
|
|
422
|
+
```
|
|
423
|
+
|
|
424
|
+
**Level relevance:** Level 3 only.
|
|
425
|
+
|
|
426
|
+
## 3. Token naming conventions
|
|
427
|
+
|
|
428
|
+
### Color tokens
|
|
429
|
+
|
|
430
|
+
```
|
|
431
|
+
{namespace}-{step}
|
|
432
|
+
```
|
|
433
|
+
|
|
434
|
+
- `namespace`: `background`, `gray`, `gray-alpha`, `blue`, `red`, `amber`, `green`, `teal`, `purple`, `pink`
|
|
435
|
+
- `step`: `100`–`1000` (10-step scale encoding intent as defined in §2.2)
|
|
436
|
+
|
|
437
|
+
### Typography tokens
|
|
438
|
+
|
|
439
|
+
```
|
|
440
|
+
{role}-{size}
|
|
441
|
+
```
|
|
442
|
+
|
|
443
|
+
- `role`: `heading`, `label`, `copy`, `button`
|
|
444
|
+
- `size`: approximate font size in pixels
|
|
445
|
+
- Mono variant: `{role}-{size}-mono`
|
|
446
|
+
|
|
447
|
+
### Breakpoint tokens
|
|
448
|
+
|
|
449
|
+
Lowercase short names: `sm`, `md`, `lg`, `xl`, `2xl`
|
|
450
|
+
|
|
451
|
+
## 4. Light/Dark dual-theme rules
|
|
452
|
+
|
|
453
|
+
### Contract
|
|
454
|
+
|
|
455
|
+
Dual theme uses **same token names with different values** in two separate files:
|
|
456
|
+
|
|
457
|
+
- `DESIGN.md` — light (or default) theme
|
|
458
|
+
- `DESIGN.dark.md` — dark theme
|
|
459
|
+
|
|
460
|
+
### Rules
|
|
461
|
+
|
|
462
|
+
1. **Token names are identical** across both files
|
|
463
|
+
2. **Only the values differ** — a light `background-100: #ffffff` becomes dark `background-100: #111111`
|
|
464
|
+
3. **Both files define the same token set** — no token can exist in only one file
|
|
465
|
+
4. **DESIGN.md is always the SSOT for token names** — DESIGN.dark.md copies the structure
|
|
466
|
+
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
|
|
467
|
+
6. Add `DESIGN.dark.md` path reference in DESIGN.md Overview
|
|
468
|
+
|
|
469
|
+
### Naming
|
|
470
|
+
|
|
471
|
+
Dark theme file must be named `DESIGN.dark.md` (not `design-dark.md` or `DESIGN_DARK.md`).
|
|
472
|
+
|
|
473
|
+
## 5. Upgrade placeholders
|
|
474
|
+
|
|
475
|
+
Sections not yet filled should use HTML comment markers:
|
|
476
|
+
|
|
477
|
+
```
|
|
478
|
+
<!-- LEVEL2_PLACEHOLDER: Complete the 10-step color scales and add alpha scale when the design matures. See `references/completeness-checklist.md` § Level 2. -->
|
|
479
|
+
```
|
|
480
|
+
|
|
481
|
+
```
|
|
482
|
+
<!-- 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. -->
|
|
483
|
+
```
|
|
484
|
+
|
|
485
|
+
Agents encountering these placeholders understand that:
|
|
486
|
+
- The section is intentionally deferred, not accidentally empty
|
|
487
|
+
- The placeholder describes what's missing and when to revisit
|
|
488
|
+
- An upgrade workflow can detect these markers and recommend progression
|
|
489
|
+
|
|
490
|
+
## 6. Mapping to implementation
|
|
491
|
+
|
|
492
|
+
DESIGN.md tokens should map to implementation as follows:
|
|
493
|
+
|
|
494
|
+
| DESIGN.md | Implementation |
|
|
495
|
+
|-----------|---------------|
|
|
496
|
+
| Frontmatter `colors:` | CSS custom properties (`--color-gray-100`) or theme object |
|
|
497
|
+
| Frontmatter `typography:` | CSS classes or Tailwind prose config |
|
|
498
|
+
| Frontmatter `spacing:` | CSS custom properties or Tailwind spacing config |
|
|
499
|
+
| Frontmatter `rounded:` | CSS custom properties or Tailwind radius config |
|
|
500
|
+
| Body breakpoints | CSS media queries or Tailwind screens |
|
|
501
|
+
| Frontmatter `components:` | Component prop defaults or CSS classes |
|
|
502
|
+
| Body elevation | `box-shadow` or Tailwind shadow config |
|
|
503
|
+
| Body motion | `transition` or animation library config |
|
|
504
|
+
| Body voice rules | Linter rules or prompt context for copy generation |
|
|
505
|
+
|
|
506
|
+
**Frontmatter references** in `components:` (e.g., `"{colors.gray-1000}"`) MUST be resolved by tracing the `{path}` back to the frontmatter key. For example, `"{colors.gray-1000}"` → `colors.gray-1000` → `"#171717"`.
|
|
507
|
+
|
|
508
|
+
The agent consuming DESIGN.md is responsible for frontmatter parsing and reference resolution, not DESIGN.md itself. DESIGN.md stays implementation-agnostic.
|