baldart 4.69.1 → 4.70.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.
- package/CHANGELOG.md +15 -0
- package/README.md +2 -2
- package/VERSION +1 -1
- package/framework/.claude/skills/ds-edit/SKILL.md +184 -0
- package/framework/.claude/skills/new/references/implement.md +6 -1
- package/framework/.claude/skills/prd/references/ui-design-phase.md +11 -0
- package/framework/agents/component-manifest-schema.md +3 -0
- package/framework/agents/design-system-protocol.md +1 -0
- package/framework/agents/index.md +1 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,21 @@ All notable changes to BALDART will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [4.70.0] - 2026-06-25
|
|
9
|
+
|
|
10
|
+
**`/ds-edit` — the deliberate-edit twin of `/ds-new`, completing the single-element lifecycle.** `/ds-new` creates (its reuse-first step STOPS if the element exists); there was no symmetric guided entry to *change* an existing canonical element. "Update a component" decomposes into three cases — two were already covered: the **mechanical doc-resync** after a code change is automatic (serializer regenerates the HEAD from source, preserving agentic + prose; the BLOCKING `DS_COMPONENT_STALE` gate enforces it), and **agentic re-curation** is `doc-reviewer`'s domain. The gap was the **deliberate change with a decision** — add a variant/prop, a breaking change, or re-governing a closed-set role.
|
|
11
|
+
|
|
12
|
+
**MINOR** — adds a skill; no new config key (rides on `features.has_design_system`). A pure orchestrator over the same scripts as `/ds-new` — zero rule duplication, and the SAME canonical template (`framework/templates/component-spec.template.md`).
|
|
13
|
+
|
|
14
|
+
### Added
|
|
15
|
+
|
|
16
|
+
- **`/ds-edit` skill** (`framework/.claude/skills/ds-edit/SKILL.md`) — update ONE existing canonical component or token. Pre-flight locates the element (refuses + suggests `/ds-new` if it doesn't exist), then classifies the change via the edit decision tree: **resync** (spec catches up to changed source) / **extend** (new variant/prop — within the role contract, else it's a NEW role = `/ds-new`) / **breaking** (removed/renamed variant or prop → migration + spec Changelog) / **re-govern** (the edit changes `canonical_for`/`use_when`/closure). Delegates the source change to `ui-expert`, the agentic re-verify to `doc-reviewer`, and regenerates the spec via the serializer — which **preserves the existing prose + non-empty agentic fields** (`source_sha` anchor) and fills the canonical template only when a spec is missing, so an edited spec keeps the SAME standardized shape as a created one. Verifies via `ds-gate` + `DS_COMPONENT_STALE`. Codex-portable (deterministic spine zero-subagent; agentic/scaffold steps degrade to TODO). Token edits follow the Token Cascade (rename/removal is breaking — migrate the affected `token_bindings`).
|
|
17
|
+
|
|
18
|
+
### Changed
|
|
19
|
+
|
|
20
|
+
- **`/prd` routes a REUSE+VARIANT extension to `/ds-edit`** (`ui-design-phase.md`, new step 7b) — when the reconciliation gate finds a region maps to an existing component but needs a variant/prop not yet in its spec and the user confirms extending, route to `/ds-edit` (create-now) or a "modify Component X" card (defer) — symmetric to the NEW→`/ds-new` routing. A "variant" that is really a new role is a `NEW (governed)` case, not an extend.
|
|
21
|
+
- **`/new` (ui-expert Post-Intervention) follows the `/ds-edit` discipline for a MODIFIED primitive** (`implement.md`) — re-run the serializer to regenerate the HEAD from the new source (preserving agentic + prose), never hand-edit; a breaking change adds a spec Changelog entry. Registered in `design-system-protocol.md` (Consumers), `component-manifest-schema.md` (Producers), and `agents/index.md` routing. Propagates to `new2` (shared reference modules).
|
|
22
|
+
|
|
8
23
|
## [4.69.1] - 2026-06-24
|
|
9
24
|
|
|
10
25
|
**`/prd` and `/new` now actually USE `/ds-new` when a new STANDARDIZED component is detected** (v4.69.0 only wired it as an opt-in arm + left `/new`'s spec production unspecified). A new canonical element should be materialized through the one discipline, not hand-rolled per surface.
|
package/README.md
CHANGED
|
@@ -211,14 +211,14 @@ Skills always-ask when required keys are missing — never silently default.
|
|
|
211
211
|
never overwrites your file. Full guide:
|
|
212
212
|
[`framework/docs/PROJECT-CONFIGURATION.md`](framework/docs/PROJECT-CONFIGURATION.md).
|
|
213
213
|
|
|
214
|
-
### Skills (
|
|
214
|
+
### Skills (37 portable skills)
|
|
215
215
|
|
|
216
216
|
Skills live under `.claude/skills/` and are auto-discovered by Claude Code.
|
|
217
217
|
Bundled skills:
|
|
218
218
|
|
|
219
219
|
- **Workflow**: `new`, `new2` (v4.16.0 — EXPERIMENTAL workflow-hosted `/new`, Claude-only, for A/B testing context economy), `prd`, `prd-add`, `bug`, `simplify`, `worktree-manager`, `issue-review`, `context-primer`
|
|
220
220
|
- **Code quality**: `skill-creator`, `find-skills`, `webapp-testing`, `playwright-skill`, `lsp-bootstrap` (v3.10.0), `graphify-bootstrap` (v4.21.0 — code knowledge graph), `graph-align` (v4.21.0 — doc↔graph alignment), `toolchain-bootstrap` (v4.41.0 — curated dev toolchain), `e2e-review` (v3.18.0)
|
|
221
|
-
- **Design**: `frontend-design`, `ui-design`, `motion-design`, `gamification-design`, `design-system-init` (v3.11.0 — bulk registry bootstrap/upgrade), `ds-new` (v4.69.0 — single-element guided creation: one component or token, reuse-first → optional scaffold → document + register + govern + verify; the on-the-fly twin of `design-system-init`)
|
|
221
|
+
- **Design**: `frontend-design`, `ui-design`, `motion-design`, `gamification-design`, `design-system-init` (v3.11.0 — bulk registry bootstrap/upgrade), `ds-new` (v4.69.0 — single-element guided creation: one component or token, reuse-first → optional scaffold → document + register + govern + verify; the on-the-fly twin of `design-system-init`), `ds-edit` (v4.70.0 — deliberate edit of one existing element: resync / extend-variant / breaking / re-govern; regenerates the spec preserving agentic fields + prose, same canonical template)
|
|
222
222
|
- **Product**: `seo-audit`, `copywriting`, `api-design-principles`
|
|
223
223
|
- **Knowledge**: `doc-writing-for-rag`, `capture` (LLM wiki overlay)
|
|
224
224
|
- **Internationalization**: `i18n` (v4.52.0 — audit the context registry + context-aware translation into native locale files), `i18n-adopt` (v4.52.0 — one-shot migration that externalizes all hardcoded strings on an existing codebase); both gated on `features.has_i18n`
|
package/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
4.
|
|
1
|
+
4.70.0
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ds-edit
|
|
3
|
+
effort: medium
|
|
4
|
+
description: >
|
|
5
|
+
Update ONE existing canonical design-system element correctly — the deliberate
|
|
6
|
+
edit twin of /ds-new. Classifies the change (resync the spec to changed source /
|
|
7
|
+
extend with a new variant or prop / breaking change with migration / re-govern
|
|
8
|
+
the closed-set role) and runs it end to end: apply the source change (delegated
|
|
9
|
+
to ui-expert), regenerate the spec via the serializer (HEAD from source, agentic
|
|
10
|
+
+ prose PRESERVED, the canonical template
|
|
11
|
+
framework/templates/component-spec.template.md filled if a spec is missing),
|
|
12
|
+
re-govern if needed, verify. A THIN orchestrator — delegates every rule to the
|
|
13
|
+
existing SSOTs, never hand-writes a spec HEAD. Use when the user says /ds-edit,
|
|
14
|
+
"aggiorna un componente", "modifica una primitive", "aggiungi una variante",
|
|
15
|
+
"estendi il componente", "resync dello spec", "breaking change su un
|
|
16
|
+
componente", or when `/prd` confirms a REUSE+VARIANT extension. The pure
|
|
17
|
+
mechanical doc-resync after a code change is ALREADY automatic (serializer +
|
|
18
|
+
`DS_COMPONENT_STALE` gate) — this skill is for the DELIBERATE change. Gated on
|
|
19
|
+
features.has_design_system.
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
# DS Edit — update one existing canonical element
|
|
23
|
+
|
|
24
|
+
The deliberate-edit twin of `/ds-new`. `/ds-new` creates (its reuse-first step
|
|
25
|
+
STOPS if the element exists); this skill takes an element that **already exists**
|
|
26
|
+
and changes it with the right discipline. It is a conductor: each step DELEGATES
|
|
27
|
+
to an existing module and cross-pointers to it — **no schema/closed-set/token rule
|
|
28
|
+
is re-described here**, and the spec is always **serializer-emitted, never
|
|
29
|
+
hand-written**.
|
|
30
|
+
|
|
31
|
+
**What this skill is NOT for.** The *mechanical doc-resync* after a code change
|
|
32
|
+
(props/variants changed, no decision) is already automatic: the serializer
|
|
33
|
+
regenerates the deterministic HEAD from the new source (preserving agentic +
|
|
34
|
+
prose) and the BLOCKING `DS_COMPONENT_STALE` gate (Post-Intervention Coherence
|
|
35
|
+
Check) enforces it. Use this skill for a **deliberate** change with a decision.
|
|
36
|
+
|
|
37
|
+
## Project Context
|
|
38
|
+
|
|
39
|
+
**Reads from `baldart.config.yml`:** `paths.design_system`,
|
|
40
|
+
`paths.components_primitives`, `paths.components_root`, `paths.design_tokens`,
|
|
41
|
+
`design_tokens.outputs`, `paths.ui_guidelines`, `identity.brand_name`,
|
|
42
|
+
`git.trunk_branch`.
|
|
43
|
+
|
|
44
|
+
**Writes:** the changed source (via `ui-expert`), the regenerated
|
|
45
|
+
`${paths.design_system}/components/<Name>.md` + INDEX + Selection Policy, and —
|
|
46
|
+
when tokens change — the DTCG source + regenerated outputs. Source-read-only by
|
|
47
|
+
default; source edits are delegated to `ui-expert`.
|
|
48
|
+
|
|
49
|
+
**Schema + template:** the frontmatter HEAD is defined in
|
|
50
|
+
`framework/agents/component-manifest-schema.md` and is **emitted by the
|
|
51
|
+
serializer, never hand-written**. The standardized prose body is the canonical
|
|
52
|
+
template `framework/templates/component-spec.template.md` — the SAME template
|
|
53
|
+
`/ds-new` uses. On regeneration the serializer **preserves existing prose +
|
|
54
|
+
non-empty agentic fields** (`source_sha` anchor) and only fills the template when
|
|
55
|
+
a component has no prose body yet. The edit rules are the SSOT in
|
|
56
|
+
`framework/agents/design-system-protocol.md` (Post-Intervention Coherence Check,
|
|
57
|
+
§ Closed-Set Selection Policy, § Token Contract).
|
|
58
|
+
|
|
59
|
+
**Gated by features:** `features.has_design_system` (BLOCKING). When `false`,
|
|
60
|
+
REFUSE.
|
|
61
|
+
|
|
62
|
+
**Overlay:** loads `.baldart/overlays/ds-edit.md` if present.
|
|
63
|
+
|
|
64
|
+
**On missing keys:** ask the user; do not assume defaults. See
|
|
65
|
+
`framework/agents/project-context.md` § 3.
|
|
66
|
+
|
|
67
|
+
## Effort
|
|
68
|
+
|
|
69
|
+
**Baseline:** `effort: medium` (frontmatter). **Inline override:** pass
|
|
70
|
+
`effort=<low|medium|high|xhigh|max>` anywhere in the invocation. Mapping +
|
|
71
|
+
parsing contract: `framework/agents/effort-protocol.md`.
|
|
72
|
+
|
|
73
|
+
## Invocation
|
|
74
|
+
|
|
75
|
+
`/ds-edit <Name>` (component) · `/ds-edit token <id>` (token) · `/ds-edit` (ask).
|
|
76
|
+
Optionally state the change (e.g. "add variant `compact`", "remove `size=xl`",
|
|
77
|
+
"resync"). When called by `/prd` (the reconciliation gate's REUSE+VARIANT branch),
|
|
78
|
+
the target component + intended variant are pre-resolved.
|
|
79
|
+
|
|
80
|
+
## Pre-flight
|
|
81
|
+
|
|
82
|
+
- **P0 — gate.** `features.has_design_system: false` → REFUSE.
|
|
83
|
+
- **P1 — locate.** Resolve the existing component (`${paths.design_system}/components/<Name>.md`
|
|
84
|
+
+ its `source`). If it does NOT exist → STOP and suggest `/ds-new` (this skill
|
|
85
|
+
edits; it does not create).
|
|
86
|
+
- **P2 — classify the change** (the edit decision tree; ask the user when unclear):
|
|
87
|
+
- **resync** — the source already changed (props/variants/a11y); only the spec
|
|
88
|
+
needs to catch up. (Often you don't even need this skill — see "What this skill
|
|
89
|
+
is NOT for".)
|
|
90
|
+
- **extend** — add a variant / prop / slot. Decide: does it stay WITHIN the
|
|
91
|
+
component's role contract (→ extend in place), or is it really a NEW role (→
|
|
92
|
+
that is `/ds-new` + a governance/closed-set decision, not an in-place edit)?
|
|
93
|
+
- **breaking** — remove/rename a variant or prop, or change a default. Requires a
|
|
94
|
+
migration plan + a spec Changelog entry (DELEGATE `templates/breaking-change-checklist.md`).
|
|
95
|
+
- **re-govern** — the change alters `canonical_for` / `use_when` / closure.
|
|
96
|
+
|
|
97
|
+
---
|
|
98
|
+
|
|
99
|
+
## Component edit path
|
|
100
|
+
|
|
101
|
+
Each step is a delegation. Read the cited SSOT; do not paraphrase it.
|
|
102
|
+
|
|
103
|
+
1. **Read the current spec + source.** Read the component HEAD (agentic fields to
|
|
104
|
+
PRESERVE) + prose body + its `source`. Establish the baseline before changing.
|
|
105
|
+
2. **Apply the source change (conditional).** *extend / breaking* → DELEGATE
|
|
106
|
+
`ui-expert` (Task tool) to modify the source under
|
|
107
|
+
`${paths.components_primitives}/<Name>` (tokens-compliant; its Token Contract +
|
|
108
|
+
Functional Traceability pre-work apply). *resync* → the source already changed;
|
|
109
|
+
skip. The skill itself NEVER writes component source. Codex (no subagents) →
|
|
110
|
+
describe the required source change as a TODO and require the user to apply it.
|
|
111
|
+
3. **Re-extract the deterministic HEAD.**
|
|
112
|
+
`node .framework/framework/.claude/skills/design-system-init/scripts/extract-one.mjs --source <path.tsx> --json`
|
|
113
|
+
→ the updated `props` / `variants` / `composes` / `source_sha` from the new source.
|
|
114
|
+
4. **Re-verify the agentic fields.** DELEGATE `doc-reviewer` to update ONLY what the
|
|
115
|
+
change affects (`must_rules` / `a11y` / `token_bindings` / `purpose`) and keep the
|
|
116
|
+
rest. Existing values are preserved by the serializer; never blank a field you
|
|
117
|
+
did not deliberately change. Codex → carry the existing values forward + TODO.
|
|
118
|
+
5. **Re-govern (conditional).** When the edit changes the role: update
|
|
119
|
+
`canonical_for` / `use_when` / `selection_closed` per `design-system-protocol.md`
|
|
120
|
+
§ Closed-Set Selection Policy + § Governance. **A variant added to a `closed`
|
|
121
|
+
family member is fine IF it stays within the role; a change that creates a NEW
|
|
122
|
+
role/standard is a governance decision** — flag it, don't self-approve.
|
|
123
|
+
For a **breaking** change, add a spec Changelog entry + a migration note.
|
|
124
|
+
6. **Regenerate the spec (standardized, agentic preserved).** Build a 1-component
|
|
125
|
+
bundle with the updated fields, merged with the HEADs of ALL existing components
|
|
126
|
+
(so the regenerated `--index` + Selection Policy stay complete), and run:
|
|
127
|
+
```
|
|
128
|
+
node .framework/framework/.claude/skills/design-system-init/scripts/serialize-spec.mjs \
|
|
129
|
+
--bundle <bundle.json> --out-dir ${paths.design_system}/components \
|
|
130
|
+
--index ${paths.design_system}/INDEX.md --brand "${identity.brand_name}" \
|
|
131
|
+
--tokens ${paths.design_tokens} --verify-usage
|
|
132
|
+
```
|
|
133
|
+
The serializer regenerates the valid-YAML HEAD from the new fields, **preserves
|
|
134
|
+
the existing prose body verbatim** (no clobber), and fills the canonical template
|
|
135
|
+
`framework/templates/component-spec.template.md` ONLY if this component had no
|
|
136
|
+
prose yet — the SAME standardized shape as `/ds-new`. Self-validates, fails closed.
|
|
137
|
+
Review `droppedBindings` / `unverifiedBindings`.
|
|
138
|
+
7. **Verify.** Serializer exit 0. Run `npx baldart ds-gate --json` — a closed-set
|
|
139
|
+
edit that introduced a new canonical must NOT trip `DS_CLOSED_SET_VIOLATION`. The
|
|
140
|
+
change + the regenerated spec ship in the SAME commit (the `DS_COMPONENT_STALE`
|
|
141
|
+
gate is satisfied by the resync). If a closure changed, the INDEX (with the
|
|
142
|
+
updated Selection Policy) must be committed for `ds-gate` to enforce it.
|
|
143
|
+
8. **Coherence report (never silent).** Emit the protocol's "Registry coherence
|
|
144
|
+
check: N findings" block: spec updated (incl. HEAD), INDEX/policy reconciled,
|
|
145
|
+
tokens reconciled, breaking change documented + migration noted.
|
|
146
|
+
|
|
147
|
+
## Token edit path
|
|
148
|
+
|
|
149
|
+
Edit the DTCG node in `${paths.design_tokens}` → `npx baldart tokens build` →
|
|
150
|
+
round-trip diff surfaced (never auto-accepted) → if a token's id/semantics
|
|
151
|
+
changed, update affected components' `token_bindings` and re-serialize → coherence
|
|
152
|
+
report. A token **rename/removal** is breaking (consumers reference the id) — list
|
|
153
|
+
the affected component bindings + migrate them. DELEGATE `design-system-protocol.md`
|
|
154
|
+
§ Token Cascade + Token Contract; never hand-edit generated output.
|
|
155
|
+
|
|
156
|
+
## Inline fallbacks (portability + fail-safe)
|
|
157
|
+
|
|
158
|
+
- No `Workflow` tool needed (prose-orchestrated).
|
|
159
|
+
- Codex (no subagents): the deterministic spine (`extract-one` → `serialize-spec` →
|
|
160
|
+
`tokens build` → `ds-gate`) runs unchanged; the `ui-expert` source edit + agentic
|
|
161
|
+
re-verify degrade to TODO + a clear note.
|
|
162
|
+
- Older CLI: `baldart ds-gate` / `baldart tokens build` absent → SKIP-with-reason,
|
|
163
|
+
never block. Surface the SKIP.
|
|
164
|
+
|
|
165
|
+
## /prd integration
|
|
166
|
+
|
|
167
|
+
`/prd`'s reconciliation gate (`prd/references/ui-design-phase.md`) classifies a
|
|
168
|
+
region as **REUSE+VARIANT** when an existing component covers it but the mockup
|
|
169
|
+
needs a prop/variant not yet in its spec. On user confirmation, `/prd` routes that
|
|
170
|
+
to **`/ds-edit`** (create-now extend) or a "modify Component X" card (defer) —
|
|
171
|
+
symmetric to how a `NEW (governed)` standard routes to `/ds-new`. `/prd` owns the
|
|
172
|
+
*decision* (reuse-as-is vs extend vs new role); `/ds-edit` executes the *edit*.
|
|
173
|
+
|
|
174
|
+
## See Also
|
|
175
|
+
|
|
176
|
+
- `framework/.claude/skills/ds-new/SKILL.md` — the create twin (shared scripts +
|
|
177
|
+
the SAME canonical template).
|
|
178
|
+
- `framework/templates/component-spec.template.md` — the canonical prose template
|
|
179
|
+
the serializer fills/preserves (the standardized doc shape).
|
|
180
|
+
- `framework/agents/design-system-protocol.md` — Post-Intervention Coherence Check,
|
|
181
|
+
Closed-Set Selection Policy, Token Contract.
|
|
182
|
+
- `framework/agents/component-manifest-schema.md` — the HEAD schema + the
|
|
183
|
+
regeneration contract (preserve agentic, regenerate deterministic).
|
|
184
|
+
- `framework/templates/breaking-change-checklist.md` — for breaking edits.
|
|
@@ -209,7 +209,12 @@
|
|
|
209
209
|
`use_when` / `selection_closed` per `design-system-protocol.md § Closed-Set
|
|
210
210
|
Selection Policy` (a closure is a governance decision — flag it, don't self-approve).
|
|
211
211
|
A genuinely surface-specific one-off (`scope: local`) may use a lighter spec, but
|
|
212
|
-
still tokens-compliant + INDEX-registered.
|
|
212
|
+
still tokens-compliant + INDEX-registered. **A MODIFIED existing primitive (you
|
|
213
|
+
changed its props/variants/visual) follows the `/ds-edit` discipline**
|
|
214
|
+
(`framework/.claude/skills/ds-edit/SKILL.md`): re-run the serializer to regenerate
|
|
215
|
+
the HEAD from the new source — it **preserves the existing agentic fields + prose**
|
|
216
|
+
and only fills the template when a spec is missing — never hand-edit the HEAD. A
|
|
217
|
+
breaking change (removed/renamed variant or prop) adds a spec Changelog entry.
|
|
213
218
|
- `${paths.design_system}/tokens-reference.md` — add / update token entries
|
|
214
219
|
when introducing new semantic tokens. Drift code: `DS_TOKENS_DRIFT`.
|
|
215
220
|
|
|
@@ -206,6 +206,17 @@ Before invoking `ui-design`:
|
|
|
206
206
|
the *creation* — no rule is duplicated. (Offline / non-interactive `/prd`: record
|
|
207
207
|
the `/ds-new` create-now intent for the standard so it is not silently deferred.)
|
|
208
208
|
|
|
209
|
+
7b. **Extend an existing element — `REUSE+VARIANT`.** When the mockup maps to an
|
|
210
|
+
existing component but needs a prop/variant not yet in its spec, and the user
|
|
211
|
+
confirmed extending it (rather than reuse-as-is or a new role): route to
|
|
212
|
+
**`/ds-edit`** (create-now extend) with the target + intended variant, OR a
|
|
213
|
+
"modify Component X: add variant Y" card (bind-and-defer) — symmetric to 7's
|
|
214
|
+
NEW→`/ds-new` routing. `/ds-edit` applies the source change (via `ui-expert`) +
|
|
215
|
+
regenerates the standardized spec (serializer, agentic preserved) + re-governs if
|
|
216
|
+
the role changes. If the "variant" is really a NEW role, it is a `NEW (governed)`
|
|
217
|
+
case (step 7), not an extend. A pure doc-resync (source already changed, no
|
|
218
|
+
decision) needs no skill — the `DS_COMPONENT_STALE` gate + serializer handle it.
|
|
219
|
+
|
|
209
220
|
Pass the resolved inventory to `ui-design`:
|
|
210
221
|
|
|
211
222
|
```
|
|
@@ -196,6 +196,9 @@ This keeps consumers that have not yet upgraded (and non-TS stacks) from becomin
|
|
|
196
196
|
- **Single-element create**: `/ds-new` (one component or token, on-the-fly or
|
|
197
197
|
called by `/prd`; same scripts — `extract-one`/`serialize-spec` — as the bulk
|
|
198
198
|
skill, so the HEAD it writes is identical).
|
|
199
|
+
- **Single-element edit**: `/ds-edit` (update one existing component/token —
|
|
200
|
+
resync / extend / breaking / re-govern; regenerates the HEAD from the new source
|
|
201
|
+
via the same scripts, **preserving non-empty agentic fields + prose**).
|
|
199
202
|
- **Per-task write**: `ui-expert` / `ui-design` / `frontend-design` in the
|
|
200
203
|
Post-Intervention Coherence Check — a new/modified primitive regenerates its
|
|
201
204
|
HEAD in the same change.
|
|
@@ -658,6 +658,7 @@ The following files reference this module instead of duplicating its rules:
|
|
|
658
658
|
- `framework/.claude/skills/frontend-design/SKILL.md`
|
|
659
659
|
- `framework/.claude/skills/design-system-init/SKILL.md` (bulk registry bootstrap/upgrade)
|
|
660
660
|
- `framework/.claude/skills/ds-new/SKILL.md` (single-element guided creation)
|
|
661
|
+
- `framework/.claude/skills/ds-edit/SKILL.md` (single-element guided edit — resync / extend / breaking / re-govern)
|
|
661
662
|
- `framework/.claude/commands/design-review.md`
|
|
662
663
|
- `framework/agents/design-review.md`
|
|
663
664
|
|
|
@@ -22,6 +22,7 @@ Route agents to the right module with minimal reading.
|
|
|
22
22
|
- 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.
|
|
23
23
|
- If a UI change might INTRODUCE a component (designing from a mockup, building a new primitive) and `features.has_design_system: true` -> read `agents/design-system-protocol.md` § "Closed-Set Selection Policy": query the registry by ROLE (`INDEX.md` § Selection Policy), reuse the canonical member of any `closed` family, honor the card's `component_bindings`, and run `baldart ds-gate` (a `DS_CLOSED_SET_VIOLATION` — a new canonical in a closed family, the "third header" failure mode — BLOCKS). A new member of a closed family is a governance decision (`/prd` reconciliation + ADR), never an implementation act.
|
|
24
24
|
- If creating ONE new canonical design-system element on-the-fly (a component or a token) and `features.has_design_system: true` -> use the `/ds-new` skill (reuse-first → optional scaffold via `ui-expert` → document + register + govern + verify); it produces the standardized spec by filling `framework/templates/component-spec.template.md` via the serializer, never hand-writing a HEAD. The bulk analogue (whole registry) is `/design-system-init`.
|
|
25
|
+
- If EDITING one existing design-system element (add a variant/prop, breaking change, re-govern, or resync the spec) and `features.has_design_system: true` -> use the `/ds-edit` skill (classify the change → apply source via `ui-expert` → regenerate the spec via the serializer, PRESERVING agentic fields + prose, same canonical template as `/ds-new` → verify). The pure mechanical doc-resync after a code change is already automatic (serializer + `DS_COMPONENT_STALE` gate); `/ds-edit` is for the deliberate change.
|
|
25
26
|
- If CREATING, UPDATING, or READING a per-component spec (`${paths.design_system}/components/<Name>.md`) -> read `agents/component-manifest-schema.md` for the machine-readable frontmatter HEAD (deterministic-from-TS + agentic fields) and the on-demand read contract (INDEX router → frontmatter-first, prose only when modifying). The drift codes + gate stay in `design-system-protocol.md`.
|
|
26
27
|
- If touching design-review workflows or UI guidelines -> read `agents/design-review.md` and project-specific UI guidelines.
|
|
27
28
|
- If touching architecture, auth, or tech stack -> read `agents/architecture.md`.
|