baldart 3.10.0 → 3.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -9,6 +9,23 @@ Define design review process and UI/UX quality standards.
9
9
  **In**: UI review criteria, design consistency, accessibility.
10
10
  **Out**: Implementation details (see agents/coding-standards.md).
11
11
 
12
+ ## Registry-First Pre-Work (BLOCKING when `features.has_design_system: true`)
13
+
14
+ Before walking the checklist below, execute the cascade defined in
15
+ [`framework/agents/design-system-protocol.md`](design-system-protocol.md):
16
+
17
+ 1. Read `${paths.design_system}/INDEX.md` and extract the Authority Matrix for
18
+ every primitive present on the route under review.
19
+ 2. Read `${paths.design_system}/tokens-reference.md` and use it as the SSOT
20
+ when judging color / shadow / radius / spacing decisions.
21
+ 3. For each component visible in the screenshots/DOM, read the corresponding
22
+ `${paths.design_system}/components/<Name>.md` spec.
23
+
24
+ When `features.has_design_system: false`, skip the registry reads and run the
25
+ checklist using `${paths.ui_guidelines}` alone — but flag in the report that
26
+ the absence of a registry is preventing systematic conformance checks, and
27
+ recommend `/design-system-init`.
28
+
12
29
  ## Do
13
30
 
14
31
  - Review designs before implementation
@@ -24,6 +41,19 @@ Define design review process and UI/UX quality standards.
24
41
 
25
42
  ## Design Review Checklist
26
43
 
44
+ ### Design-System Conformance (when `has_design_system: true`)
45
+
46
+ - [ ] Every primitive in the DOM is listed in `${paths.design_system}/INDEX.md`
47
+ - [ ] No reinvented variant of an existing registry primitive
48
+ - [ ] No hardcoded color / shadow / radius / spacing values that bypass
49
+ `${paths.design_system}/tokens-reference.md`
50
+ - [ ] Each component matches its `components/<Name>.md` spec (props, variants,
51
+ a11y hooks)
52
+ - [ ] Authority Matrix respected — no local override of registry-authoritative
53
+ decisions
54
+ - [ ] New primitives introduced in the change ship with their per-component
55
+ spec in the same change
56
+
27
57
  ### Visual Design
28
58
 
29
59
  - [ ] Follows design system/style guide
@@ -170,3 +200,24 @@ Define supported devices:
170
200
  - **Approved with minor changes**: Small tweaks needed
171
201
  - **Needs revision**: Significant changes required
172
202
  - **Rejected**: Fundamental issues, needs redesign
203
+
204
+ ## Report Template
205
+
206
+ Every `/design-review` report MUST include a top-level section
207
+ **Design-System Conformance** with these subsections (when
208
+ `has_design_system: true`):
209
+
210
+ - **Primitives reused** — list of `<Name>` taken from
211
+ `${paths.design_system}/INDEX.md`.
212
+ - **Primitives reinvented** — DOM components that duplicate or overlap with an
213
+ existing registry primitive. HIGH severity.
214
+ - **Tokens bypassed** — hardcoded values that should have used a token from
215
+ `tokens-reference.md`. HIGH severity.
216
+ - **Spec drift** — components in the diff that diverge from their
217
+ `components/<Name>.md`. MEDIUM severity.
218
+ - **New primitives proposed** — components that legitimately need a new
219
+ registry entry, with a one-line justification.
220
+
221
+ When `has_design_system: false`, replace the section with:
222
+ > Design-system conformance check skipped — `features.has_design_system: false`.
223
+ > Run `/design-system-init` to enable systematic conformance checks.
@@ -0,0 +1,363 @@
1
+ # Design-System Protocol
2
+
3
+ ## Purpose
4
+
5
+ Define a deterministic, registry-first discipline for any agent or skill that
6
+ touches a visual surface (component, page, mockup, design review). The goal is
7
+ twofold:
8
+
9
+ 1. **Visual coherence** across the whole product — every UI passes through the
10
+ same canonical inventory of primitives + tokens, never reinvents one.
11
+ 2. **Code economy** — the component registry is interrogated **before**
12
+ implementation, so existing primitives are reused instead of duplicated.
13
+
14
+ This is the textual SSOT for the registry-first protocol. Skills (`ui-design`,
15
+ `frontend-design`, `design-system-init`), agents (`ui-expert`, `code-reviewer`),
16
+ and the `/design-review` command all reference this module instead of
17
+ duplicating the BLOCKING-read cascade.
18
+
19
+ ## Scope
20
+
21
+ **In**: How to discover, reuse, and extend the project component registry
22
+ before producing or reviewing UI. Token contract enforcement. Authority matrix.
23
+ What to do when a primitive is missing.
24
+
25
+ **Out**: Aesthetic direction (see `${paths.ui_guidelines}` and
26
+ `identity.design_philosophy`), motion specs (see `motion-design` skill),
27
+ illustration assets (see `visual-designer` agent).
28
+
29
+ ## Gating
30
+
31
+ This protocol is **conditional** on `features.has_design_system: true` in
32
+ `baldart.config.yml`. When the flag is `false` or missing, the registry reads
33
+ in step 1 below are SKIPPED — agents/skills still respect
34
+ `${paths.ui_guidelines}` but do not block on a registry that does not exist.
35
+
36
+ When the flag is `true`, the registry reads are **BLOCKING**: skipping them is
37
+ a protocol violation and the agent must refuse to proceed.
38
+
39
+ To bootstrap a registry on a project that does not yet have one, invoke the
40
+ `design-system-init` skill (`/design-system-init`).
41
+
42
+ ## Canonical sources (resolve via `baldart.config.yml`)
43
+
44
+ - `${paths.design_system}/INDEX.md` — component index + Canonical Authority
45
+ Matrix + quick MUST rules. Entry point for every UI task.
46
+ - `${paths.design_system}/tokens-reference.md` — human-readable token contract
47
+ (colors, spacing, shadows, radii, motion). Single source of truth for any
48
+ value that would otherwise be hardcoded.
49
+ - `${paths.design_system}/components/<Name>.md` — per-component spec (props,
50
+ variants, accessibility, anti-patterns). One file per primitive.
51
+ - `${paths.design_system}/patterns/*.md` — opt-in pattern docs (theming,
52
+ overlays, motion choreography, multi-tenant pairing rules).
53
+ - `${paths.ui_guidelines}` — brand voice, typography, philosophy. Always read.
54
+ - `${paths.components_primitives}` / `${paths.components_root}` — source roots
55
+ where the registry primitives are actually implemented.
56
+
57
+ ## BLOCKING pre-work (when `has_design_system: true`)
58
+
59
+ Before producing any new UI code, mockup, or design review:
60
+
61
+ 1. **BLOCKING** — read `${paths.design_system}/INDEX.md`. Extract: the
62
+ component index, the Authority Matrix for the surface you are about to
63
+ touch, any pattern docs the index points to.
64
+ 2. **BLOCKING** — read `${paths.ui_guidelines}` for visual language, typography,
65
+ accessibility, and brand voice. The `identity.design_philosophy` (when set)
66
+ is the lens through which these guidelines apply.
67
+ 3. **BLOCKING** — read `${paths.design_system}/tokens-reference.md`. Treat it
68
+ as the SSOT for every color / spacing / shadow / radius / duration value.
69
+ 4. **BLOCKING per primitive in scope** — read the relevant
70
+ `${paths.design_system}/components/<Name>.md`. For every component the task
71
+ will create, modify, or visually depend on.
72
+ 5. **BLOCKING per pattern in scope** — read the relevant
73
+ `${paths.design_system}/patterns/<topic>.md` (e.g. theming pattern when
74
+ `features.multi_tenant_theming: true`).
75
+
76
+ Skipping any of the above when the gating flag is `true` is a protocol
77
+ violation. The correct response to a missing file is to flag it and propose
78
+ adding it via `design-system-init` or a follow-up card — **not** to proceed
79
+ without it.
80
+
81
+ ## Component Discovery Cascade
82
+
83
+ For every visual element the task introduces or touches, walk the cascade in
84
+ order. Stop at the first match.
85
+
86
+ 1. **Registry hit** — `${paths.design_system}/INDEX.md` lists a primitive that
87
+ covers the use case. Use the per-component spec to implement.
88
+ 2. **Source-tree hit** — a component exists under
89
+ `${paths.components_primitives}` (or `${paths.components_root}/shared/*`)
90
+ that is not yet documented in the registry. Use it, then **propose adding
91
+ it to the registry** as a follow-up — the registry is the canonical
92
+ inventory and silent primitives create drift.
93
+ 3. **External catalog candidate** — no in-repo match but a catalog primitive
94
+ (shadcn, 21st.dev, Radix UI, etc.) fits the canonical stack. Use it,
95
+ document it as a new entry in the registry.
96
+ 4. **Create from scratch** — only after 1–3 fail. Any newly created primitive
97
+ MUST be tokens-compliant and must ship with its per-component spec in the
98
+ same change.
99
+
100
+ The cascade is identical for design (mockups, HTML prototypes) and for
101
+ implementation (component code).
102
+
103
+ ## Token Contract
104
+
105
+ When `features.has_design_system: true`, the following are **forbidden** in
106
+ any code or mockup produced under this protocol:
107
+
108
+ - Hardcoded hex / rgb / hsl color literals (use the color tokens).
109
+ - Hardcoded shadow tuples (use the shadow tokens).
110
+ - Hardcoded border-width / border-radius numeric literals (use the radius and
111
+ border tokens).
112
+ - Hardcoded spacing numbers outside the spacing scale (use the spacing tokens).
113
+ - Hardcoded motion durations or easings (use the motion tokens, or escalate to
114
+ the `motion-design` skill).
115
+
116
+ The exact token consumption mechanism (CSS custom properties, Tailwind theme
117
+ extend, theme provider) is project-specific — defer to
118
+ `${paths.design_system}/tokens-reference.md` and the project's chosen
119
+ mechanism.
120
+
121
+ ## Reference Tables (embed)
122
+
123
+ These tables are the SSOT for the *numeric ranges* every agent/skill should
124
+ cite verbatim instead of guessing. They complement
125
+ `${paths.design_system}/tokens-reference.md` (which holds the *project-specific*
126
+ values) by providing the canonical menu of options from which a project
127
+ typically derives its tokens.
128
+
129
+ ### Type scale (base 16px)
130
+
131
+ | Ratio | Name | Use | Example sequence (rounded) |
132
+ |---|---|---|---|
133
+ | 1.125 | Major Second | Dense UI, dashboards | 12 / 14 / 16 / 18 / 20 / 23 / 26 |
134
+ | 1.200 | Minor Third | Default web app | 12 / 14 / 16 / 19 / 23 / 28 / 33 |
135
+ | 1.250 | Major Third | Marketing, landing | 13 / 16 / 20 / 25 / 31 / 39 / 49 |
136
+ | 1.333 | Perfect Fourth | Editorial, blog | 12 / 16 / 21 / 28 / 37 / 50 / 67 |
137
+ | 1.414 | Augmented Fourth | Display-led | 12 / 17 / 24 / 34 / 48 / 67 / 95 |
138
+ | 1.618 | Golden | Hero / poster | 10 / 16 / 26 / 42 / 68 / 110 |
139
+
140
+ Line-height pairing (inverse to size): 12–14px → 1.5 · 16–18px → 1.5 ·
141
+ 20–24px → 1.35 · 28–40px → 1.2 · 48px+ → 1.1. Limit the scale to **6–9
142
+ deliberate steps**. More steps = chaos. Extra hierarchy comes from weight,
143
+ color, and spacing — not from new sizes.
144
+
145
+ ### Color contrast targets (WCAG 2.x + APCA secondary gate)
146
+
147
+ | Case | WCAG 2.x ratio | APCA Lc | Notes |
148
+ |---|---|---|---|
149
+ | Body text (<18pt regular / <14pt bold) | ≥ 4.5 (AA), ≥ 7 (AAA) | ≥ 75 | Reading-flow text |
150
+ | Large text (≥18pt or ≥14pt bold) | ≥ 3 (AA), ≥ 4.5 (AAA) | ≥ 60 | Headlines, large UI labels |
151
+ | UI components / focus indicator | ≥ 3 | ≥ 45 | Borders, icons, focus rings |
152
+ | Disabled / decorative text | exempt | Lc 30–45 | Still must be distinguishable |
153
+ | Placeholder text | ≥ 4.5 if treated as content | ≥ 60 | Many a11y audits flag low-contrast placeholders |
154
+
155
+ WCAG 2.x remains the legal requirement. **APCA is the secondary gate**: it
156
+ captures perceived legibility considering weight, polarity, and size, so a
157
+ project that satisfies WCAG can still have specific text-on-background pairs
158
+ that fail APCA — those are real readability bugs.
159
+
160
+ ### Spacing scale (base-4 vs base-8)
161
+
162
+ | Step | base-4 (px) | base-8 (px) | Typical use |
163
+ |---|---|---|---|
164
+ | 0 | 0 | 0 | reset |
165
+ | 1 | 4 | 8 | icon ↔ label inline |
166
+ | 2 | 8 | 16 | padding-x button sm |
167
+ | 3 | 12 | 24 | padding-x button md, gap between cards |
168
+ | 4 | 16 | 32 | section gap mobile |
169
+ | 5 | 24 | 48 | section gap desktop |
170
+ | 6 | 32 | 64 | hero spacing |
171
+ | 7 | 48 | 96 | landing section |
172
+ | 8 | 64 | 128 | landing hero |
173
+
174
+ **base-4** preferred for dense product UI (dashboards, IDE-like tools);
175
+ **base-8** preferred for marketing / editorial. **Never mix** the two scales
176
+ in the same product — pick one and derive every token from it. Arbitrary
177
+ values outside the scale (`padding: 13px`) are a token violation.
178
+
179
+ ### Density tiers
180
+
181
+ | Tier | Row height | Button md padding-y | Table cell padding | Primary use |
182
+ |---|---|---|---|---|
183
+ | Compact | 28–32px | 4–6px | 6–8px | Power user, data tables, IDE-like surfaces |
184
+ | Cozy | 36–40px | 8–10px | 10–12px | Default web app |
185
+ | Comfortable | 44–48px | 12–14px | 14–16px | Mobile primary, consumer surfaces |
186
+ | Spacious | 56–64px | 16–20px | 20–24px | Marketing, onboarding |
187
+
188
+ **Touch-primary surfaces must use Comfortable or above** (44px = WCAG 2.5.5
189
+ enhanced target). Mixing tiers within the same view is allowed only when the
190
+ information density genuinely demands it (e.g. compact data table inside a
191
+ cozy app shell) — document the exception in the registry.
192
+
193
+ ## Token Cascade: primitive → semantic → component
194
+
195
+ A mature token system has **three layers**, and components consume only the
196
+ top of the cascade:
197
+
198
+ 1. **Primitive tokens** — raw palette / scale values (`color-blue-500`,
199
+ `space-4`, `radius-md`). Stable, machine-generated, named by *what they
200
+ are*. Components must **never reference these directly**.
201
+ 2. **Semantic tokens** — purpose-named aliases (`color-action-primary`,
202
+ `color-surface-elevated`, `color-text-on-action`, `space-section-gap`).
203
+ Resolve to a primitive in the active theme. Named by *what they mean*.
204
+ The theming layer (light / dark / high-contrast / multi-brand) swaps
205
+ semantics → primitives — primitives themselves don't change per theme.
206
+ 3. **Component tokens** (optional) — per-component aliases when a primitive
207
+ appears in many components but a semantic is too generic
208
+ (`button-bg-primary`, `card-shadow-elevated`). Resolve to a semantic.
209
+
210
+ **Why it matters**: components written against semantic tokens become
211
+ theme-agnostic and multi-brand-ready by construction. A brand swap touches
212
+ the semantic-layer mapping only, not the component code. Dark mode is a
213
+ semantic-layer concern (different primitive mappings per theme), **never**
214
+ implemented via `filter: invert()` or naïve color flips — that produces
215
+ washed-out brights, inverted shadows, and inverted images.
216
+
217
+ When the project's `tokens-reference.md` doesn't yet expose a semantic
218
+ layer, propose adding one rather than letting components reach into
219
+ primitives — that drift is the entry door to inconsistent theming.
220
+
221
+ For palette *generation*, prefer **OKLCH** (or LCH) over HSL: it's
222
+ perceptually uniform, so equal lightness numbers across hues read as equal
223
+ brightness, dark/light variants stay tonally consistent, and palette steps
224
+ land at predictable contrast levels. HSL `lighten()` / `darken()` produces
225
+ visually uneven steps because HSL lightness is not perceptual.
226
+
227
+ ## Authority Matrix
228
+
229
+ `${paths.design_system}/INDEX.md` declares, for each primitive, who is
230
+ authoritative over which dimension:
231
+
232
+ - **Visual authority** — colors, spacing, shadows, radii: the registry +
233
+ tokens-reference. Agents/skills may not deviate.
234
+ - **Behavioral authority** — props, variants, accessibility hooks: the
235
+ per-component spec.
236
+ - **Composition authority** — how primitives are combined into patterns: the
237
+ pattern docs.
238
+
239
+ When a task would violate any of these authorities, the agent must:
240
+
241
+ 1. Stop and surface the conflict.
242
+ 2. Propose a registry update (new variant, new token, new pattern) instead of
243
+ bypassing the authority locally.
244
+
245
+ ## When a primitive is missing
246
+
247
+ If the cascade reaches step 3 or 4 (no registry hit, no source-tree hit), the
248
+ agent has two choices:
249
+
250
+ - **Add to the registry** — preferred when the primitive is broadly useful.
251
+ Create the per-component spec, the implementation under
252
+ `${paths.components_primitives}/<Name>`, and an INDEX.md entry in the same
253
+ change.
254
+ - **Local one-off** — only when the use case is genuinely surface-specific
255
+ (e.g. a marketing-page hero illustration). Even then, prefer composing
256
+ existing primitives over hand-rolling a new one. Justify the local choice
257
+ in the change description.
258
+
259
+ Never silently introduce a new component that overlaps with an existing
260
+ registry primitive — that is the exact failure mode this protocol prevents.
261
+
262
+ ## Post-Intervention Coherence Check (BLOCKING completion gate)
263
+
264
+ The BLOCKING pre-work above enforces *reads* before any UI change. This
265
+ section enforces *writes* before completion. **No UI task is considered
266
+ complete** when `features.has_design_system: true` until the registry has
267
+ been verified against the change that was just made.
268
+
269
+ The check runs at end-of-task by the agent that performed the work (`ui-expert`,
270
+ `ui-design`, `frontend-design`, `code-reviewer`). It is **not** delegated to
271
+ the weekly `ds-drift` routine — that routine is a safety net, not the primary
272
+ mechanism. Drift introduced today must be reconciled today, not next Monday.
273
+
274
+ ### What to verify
275
+
276
+ For each item in the diff that touched a visual surface, run these 4 checks:
277
+
278
+ 1. **New primitive ⇒ new spec**: did the change introduce a component under
279
+ `${paths.components_primitives}` that has no
280
+ `${paths.design_system}/components/<Name>.md`? If yes, the spec MUST ship
281
+ in the same change. Missing spec = `DS_INDEX_DRIFT` finding, task blocked.
282
+ 2. **Modified primitive ⇒ updated spec**: did the change alter a primitive's
283
+ props / variants / accessibility behavior? If yes, the corresponding
284
+ `components/<Name>.md` MUST be updated to match. Stale spec =
285
+ `DS_COMPONENT_STALE` finding, task blocked.
286
+ 3. **New / changed token ⇒ updated reference**: did the change introduce or
287
+ modify a token (color, spacing, shadow, radius, motion)? If yes,
288
+ `${paths.design_system}/tokens-reference.md` MUST reflect it. Stale
289
+ reference = `DS_TOKENS_DRIFT` finding, task blocked.
290
+ 4. **Surfaced silent primitive ⇒ added to INDEX**: during the work, did you
291
+ reuse a primitive that exists in the source tree but is **not** in
292
+ `INDEX.md`? If yes, add it to the INDEX in the same change (or open a
293
+ follow-up card if the registry entry requires design judgement beyond
294
+ the current scope). Silent primitive = `DS_INDEX_DRIFT` finding.
295
+
296
+ ### Decision matrix
297
+
298
+ | Situation | Action |
299
+ |---|---|
300
+ | Spec / token update is trivial (variant added, prop renamed, token value tweaked) | Apply inline — same commit as the code change |
301
+ | Spec / token update requires design judgement (new variant semantics, breaking change, accessibility decision) | Open a follow-up card; **document the gap explicitly** in the change description; flag for `code-reviewer` |
302
+ | Reused undocumented primitive that is broadly useful | Add INDEX entry inline; if a full spec needs design work, scaffold a stub spec marked `status: needs-review` |
303
+ | Reused undocumented primitive that is surface-specific | Add INDEX entry with `scope: local` and a 2-line note explaining why no full spec is needed |
304
+ | Introduced a primitive that **duplicates** an existing registry entry | **Stop**. This is the failure mode the cascade exists to prevent. Revert and reuse the existing primitive, or escalate to refactor the existing primitive if the new requirement is legitimately broader |
305
+
306
+ ### Reporting
307
+
308
+ When any of checks 1–4 trip, the agent must surface them explicitly to the
309
+ user before declaring task done — never silent. The recommended phrasing:
310
+
311
+ > Registry coherence check: <N> finding(s)
312
+ > - `DS_INDEX_DRIFT`: <Name> created without INDEX entry → resolved inline
313
+ > - `DS_COMPONENT_STALE`: <Name>.md not updated for variant `xyz` → follow-up CARD-NNNN opened
314
+ > - `DS_TOKENS_DRIFT`: `--color-action-secondary` added without tokens-reference entry → resolved inline
315
+
316
+ This makes drift **visible at the source of introduction**, which is the
317
+ only place it can be cheaply reconciled.
318
+
319
+ ### Interaction with the weekly routine
320
+
321
+ The `ds-drift` routine (`framework/routines/ds-drift.routine.yml`) still
322
+ runs weekly and catches what slips through (e.g. changes made by tools that
323
+ bypass the agents, or by humans editing directly). But the per-intervention
324
+ check above is **first-line**: if it fires correctly, the weekly routine
325
+ should find very little to report.
326
+
327
+ ## Bootstrap (when no registry exists)
328
+
329
+ If `features.has_design_system: false`:
330
+
331
+ - The BLOCKING reads above are skipped.
332
+ - Skills still respect `${paths.ui_guidelines}` and the project's existing
333
+ components under `${paths.components_primitives}`.
334
+ - Recommend `/design-system-init` to the user when the absence of a registry
335
+ is creating obvious drift (token hardcoding, duplicate primitives, divergent
336
+ styling across pages).
337
+
338
+ The `design-system-init` skill scaffolds `INDEX.md`, `tokens-reference.md`,
339
+ and a `components/<Name>.md` file for every primitive already in the codebase,
340
+ then flips `features.has_design_system: true` in `baldart.config.yml`.
341
+
342
+ ## Consumers of this protocol
343
+
344
+ The following files reference this module instead of duplicating its rules:
345
+
346
+ - `framework/.claude/agents/ui-expert.md`
347
+ - `framework/.claude/agents/code-reviewer.md`
348
+ - `framework/.claude/skills/ui-design/SKILL.md`
349
+ - `framework/.claude/skills/frontend-design/SKILL.md`
350
+ - `framework/.claude/skills/design-system-init/SKILL.md`
351
+ - `framework/.claude/commands/design-review.md`
352
+ - `framework/agents/design-review.md`
353
+
354
+ When changing the BLOCKING cascade, change it here — not in the consumers.
355
+
356
+ ## See also
357
+
358
+ - `framework/agents/project-context.md` — always-ask / never-assume contract
359
+ and the `baldart.config.yml` resolution flow.
360
+ - `framework/agents/design-review.md` — design-review workflow and report
361
+ template (uses this protocol's step 0).
362
+ - `framework/.claude/skills/design-system-init/SKILL.md` — bootstrap a
363
+ registry on a project that does not yet have one.
@@ -18,6 +18,7 @@ Route agents to the right module with minimal reading.
18
18
  - If touching API endpoints or request/response shape -> read `agents/api-contracts.md` and `${paths.references_dir}/api/index.md` (then specific API module for your domain).
19
19
  - If touching database schema or fields -> read `agents/data-model.md` and `${paths.references_dir}/data-model.md`.
20
20
  - If touching UI pages/routes or flows -> read `${paths.references_dir}/ui/index.md` (then specific UI module for your domain).
21
+ - If touching ANY visual surface (component, page, mockup, design review) and `features.has_design_system: true` -> read `agents/design-system-protocol.md` and treat the BLOCKING cascade (`${paths.design_system}/INDEX.md` + `tokens-reference.md` + `components/<Name>.md`) as mandatory pre-work. When the flag is `false`, recommend `/design-system-init` to scaffold a registry.
21
22
  - If touching design-review workflows or UI guidelines -> read `agents/design-review.md` and project-specific UI guidelines.
22
23
  - If touching architecture, auth, or tech stack -> read `agents/architecture.md`.
23
24
  - If touching workflow/process/commits/backlog -> read `agents/workflows.md`.
@@ -59,6 +60,7 @@ When adding or updating agents, update REGISTRY.md — not this file.
59
60
  - `agents/llm-wiki-methodology.md` — LLM wiki overlay methodology + auto-learning loop (since v2.0.0)
60
61
  - `agents/project-context.md` — Project context protocol: `baldart.config.yml` + overlays + missing-key handling (since v3.0.0)
61
62
  - `agents/code-search-protocol.md` — Retrieval hierarchy for code search: RAG → LSP → Grep → Git (since v3.10.0, gated on `features.has_lsp_layer`)
63
+ - `agents/design-system-protocol.md` — Registry-first discipline for UI work: BLOCKING cascade on `INDEX.md` + `tokens-reference.md` + `components/<Name>.md` (since v3.11.0, gated on `features.has_design_system`)
62
64
 
63
65
  ## Where to Document (Decision Tree)
64
66