dsh-plugin-strict-spec 0.5.1 → 0.6.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/README.md +13 -13
- package/README.zh.md +10 -12
- package/dist/cli/strict-spec-cli.js +108 -770
- package/dist/skills/strict-roadmap-plan/SKILL.md +49 -139
- package/dist/skills/strict-roadmap-recommend/SKILL.md +63 -282
- package/dist/skills/strict-roadmap-reorder/SKILL.md +40 -158
- package/dist/skills/strict-roadmap-review/SKILL.md +48 -144
- package/dist/skills/strict-roadmap-transition/SKILL.md +52 -274
- package/dist/skills/strict-scene-edit/SKILL.md +51 -121
- package/dist/skills/strict-spec-apply/SKILL.md +63 -173
- package/dist/skills/strict-spec-architecture/SKILL.md +39 -97
- package/dist/skills/strict-spec-archive/SKILL.md +57 -127
- package/dist/skills/strict-spec-auto/SKILL.md +98 -270
- package/dist/skills/strict-spec-brainstorm/SKILL.md +73 -176
- package/dist/skills/strict-spec-bugfix/SKILL.md +101 -225
- package/dist/skills/strict-spec-design/SKILL.md +55 -124
- package/dist/skills/strict-spec-design-sync/SKILL.md +55 -123
- package/dist/skills/strict-spec-init/SKILL.md +45 -93
- package/dist/skills/strict-spec-maintenance/SKILL.md +44 -94
- package/dist/skills/strict-spec-modify/SKILL.md +44 -113
- package/dist/skills/strict-spec-propose/SKILL.md +180 -495
- package/dist/skills/strict-spec-review/SKILL.md +121 -273
- package/dist/skills/strict-spec-ship/SKILL.md +25 -60
- package/dist/skills/strict-spec-spec-edit/SKILL.md +35 -84
- package/dist/skills/strict-spec-sync-specs/SKILL.md +44 -94
- package/dist/skills/strict-spec-verify/SKILL.md +28 -43
- package/dist/skills/strict-tech-edit/SKILL.md +43 -124
- package/dist/skills/strict-tech-sync/SKILL.md +60 -162
- package/package.json +2 -1
|
@@ -8,19 +8,12 @@ metadata:
|
|
|
8
8
|
version: 1.0.0
|
|
9
9
|
---
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
bug, reproducing it before touching production code, keeping the fix minimal,
|
|
15
|
-
and proving it with before-and-after regression evidence. The general workflow
|
|
16
|
-
procedures it sits on top of are owned by the skills listed under Delegated
|
|
17
|
-
Procedures below, and this skill does not restate them.
|
|
11
|
+
Fix a known bug through a narrow strict change: reproduce it before touching
|
|
12
|
+
production code, make the smallest fix, and prove it with regression evidence
|
|
13
|
+
that fails before the fix and passes after it.
|
|
18
14
|
|
|
19
15
|
## This Skill's Commands
|
|
20
16
|
|
|
21
|
-
If you cannot remember the exact command used by this skill, look it up here
|
|
22
|
-
before running anything. Do not guess.
|
|
23
|
-
|
|
24
17
|
```yaml
|
|
25
18
|
check-workflow-state: strict-spec-cli check-workflow-state
|
|
26
19
|
tech-status: strict-spec-cli tech-status
|
|
@@ -36,77 +29,41 @@ verify: strict-spec-cli verify <change-name>
|
|
|
36
29
|
archive: strict-spec-cli archive <change-name>
|
|
37
30
|
```
|
|
38
31
|
|
|
39
|
-
## YAML Writing Rules
|
|
40
|
-
|
|
41
|
-
- Keep strict artifacts in valid YAML structures at every stage. Do not replace
|
|
42
|
-
structured fields with Markdown prose.
|
|
43
|
-
- If artifact fields are unclear, use `strict-spec-cli schema-show <schema-name>`;
|
|
44
|
-
installed skills do not carry a `templates` directory.
|
|
45
|
-
- Shared schema cache root: `~/.strict-spec-schemas/`. When a YAML artifact already declares `schema_file`, resolve that relative path under the shared cache root to inspect the concrete schema file without relying on a local templates directory.
|
|
46
|
-
- If a valid artifact example would clarify the shape, use
|
|
47
|
-
`strict-spec-cli sample-show <sample-name>`; installed skills do not rely on a
|
|
48
|
-
local `examples` directory.
|
|
49
|
-
- Use block scalars only for free-text content. Prefer `>-` for wrapped prose
|
|
50
|
-
such as longer `summary`, `approach`, `decision`, `rationale`, `question`,
|
|
51
|
-
`context`, `answer`, and spec `statement` values. Use `|` only when literal
|
|
52
|
-
line breaks must be preserved.
|
|
53
|
-
- Quote short strings that may contain YAML-sensitive characters or ambiguous
|
|
54
|
-
scalar values, including `command` strings, URLs, paths, text containing `:`
|
|
55
|
-
or `#`, leading `-`, JSON-like fragments, boolean-like words, and timestamp-
|
|
56
|
-
like values.
|
|
57
|
-
- Keep short structural fields as plain scalars unless quoting is needed for
|
|
58
|
-
correctness. Do not force IDs, enums, schema identifiers, artifact types,
|
|
59
|
-
task references, or similar fields into block scalars.
|
|
60
|
-
- Before moving between workflow stages, self-check indentation, list nesting,
|
|
61
|
-
quote closure, and colon spacing, then use the documented verification
|
|
62
|
-
commands to catch remaining schema or YAML issues.
|
|
63
|
-
|
|
64
32
|
## CLI-Only YAML Authoring Protocol
|
|
65
33
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
`spec-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
operation, and the bundled schema and example keys with their cache-resolved
|
|
72
|
-
paths, bound to the artifact kind and current where a copy would go stale.
|
|
73
|
-
Validate the result with `strict-spec-cli verify <change-name>`,
|
|
34
|
+
This skill writes `change-planning-state`, `change-delta-state`, `spec-state`,
|
|
35
|
+
`tech-state`, `lessons-state`. Before its first mutation, run
|
|
36
|
+
`strict-spec-cli yaml-authoring-protocol <artifact-kind>` for each kind and
|
|
37
|
+
follow it, including its rule to stop and report a missing command rather than
|
|
38
|
+
work around it; validate the result with `strict-spec-cli verify <change-name>`,
|
|
74
39
|
`strict-spec-cli lesson-status`.
|
|
75
40
|
|
|
76
|
-
**Stop rather than edit YAML directly.** When a required command, argument, or
|
|
77
|
-
artifact kind is unavailable, stop and report the missing capability. Editing
|
|
78
|
-
the YAML directly, writing a raw payload, or scripting around the CLI is never
|
|
79
|
-
an available fallback, and an unavailable command is a reason to stop rather
|
|
80
|
-
than a reason to improvise.
|
|
81
|
-
|
|
82
41
|
## Preferred Human Language
|
|
83
42
|
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
user
|
|
87
|
-
the active user message asks otherwise.
|
|
43
|
+
Write user-facing and generated operator-facing text in the human language named
|
|
44
|
+
by `preferred_human_language` in `.strict-spec-driven/config.yaml`, unless the
|
|
45
|
+
active user message asks otherwise.
|
|
88
46
|
|
|
89
47
|
## Delegated Procedures
|
|
90
48
|
|
|
91
|
-
Each procedure below is owned by the skill named beside it
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
the running harness provides.
|
|
49
|
+
Each procedure below is owned by the skill named beside it, whose guidance is
|
|
50
|
+
authoritative; follow it at the step that needs it, however the running harness
|
|
51
|
+
loads it.
|
|
95
52
|
|
|
96
53
|
- requirement-interrogation: owned by `strict-spec-propose`
|
|
97
54
|
- change-intake-gate: owned by `strict-spec-propose`
|
|
98
55
|
- spec-artifact-routing: owned by `strict-spec-propose`
|
|
56
|
+
- task-list-authoring: owned by `strict-spec-propose`
|
|
99
57
|
- delta-artifact-authoring: owned by `strict-spec-propose`
|
|
100
58
|
- implementation-order: owned by `strict-spec-apply`
|
|
59
|
+
- review-independence: owned by `strict-spec-review`
|
|
101
60
|
- lesson-outcome: owned by `strict-spec-review`
|
|
102
61
|
|
|
103
|
-
Delegation moves where a procedure is stated, never whether it runs
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
The one that shapes every later step: interrogate the defect's real impact and
|
|
109
|
-
the outcome the requester expects, not the patch you already have in mind.
|
|
62
|
+
Delegation moves where a procedure is stated, never whether it runs: every gate
|
|
63
|
+
below still binds, and a delegated procedure that cannot be followed stops the
|
|
64
|
+
run. What a bugfix adds stays at the step that needs it, and the one that shapes
|
|
65
|
+
every step is to interrogate the defect's real impact and the outcome the
|
|
66
|
+
requester expects, not the patch already in mind.
|
|
110
67
|
|
|
111
68
|
## Steps
|
|
112
69
|
|
|
@@ -114,172 +71,91 @@ Before any other step, run `strict-spec-cli check-workflow-state`. If `.strict-s
|
|
|
114
71
|
missing, stop immediately and tell the user to run `/strict-spec-init`. Do not
|
|
115
72
|
run `init` from this skill.
|
|
116
73
|
|
|
117
|
-
1. **Confirm bugfix fit** —
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
planning artifacts.
|
|
167
|
-
|
|
168
|
-
5. **Populate bugfix planning artifacts** — for new or empty scaffolds, generate
|
|
169
|
-
supported artifacts in this order and keep every artifact scoped to the bug.
|
|
170
|
-
- `proposal.yaml`: state the observed bug, expected behavior, why the
|
|
171
|
-
current behavior violates a strict spec or intended contract, in-scope
|
|
172
|
-
affected paths, explicit out-of-scope adjacent issues, and unchanged
|
|
173
|
-
behavior.
|
|
174
|
-
- `design.yaml`: record the minimal fix strategy, why the fix belongs at the
|
|
175
|
-
selected layer, and any risk to unchanged behavior.
|
|
176
|
-
- `tasks.yaml`: use concrete sections for Reproduction, Implementation,
|
|
177
|
-
Testing, and Verification. Include a failing-regression-test or equivalent
|
|
178
|
-
deterministic reproduction task before the production fix. Testing tasks
|
|
179
|
-
must include runnable `command` fields. For technical-only bugfixes,
|
|
180
|
-
include the concrete scripts, tooling, generated assets, documentation, or
|
|
181
|
-
skill-prompt edits in scope; include validation, strict `ready`/`verify`,
|
|
182
|
-
and archive-readiness or archive-merge checks when relevant.
|
|
183
|
-
The reproduction task must come first in list order, so place a task with
|
|
184
|
-
`--before <task-id>` or `--after <task-id>` instead of letting it append;
|
|
185
|
-
task order is the order `apply` walks, so a task that must run before
|
|
186
|
-
existing pending work is anchored rather than appended, and naming an
|
|
187
|
-
existing task id with an anchor moves it there while preserving its
|
|
188
|
-
`status` and `command`.
|
|
189
|
-
- `questions.yaml`: resolve the seeded requirement questions through the
|
|
190
|
-
delegated requirement-interrogation procedure. Leave `open: []` only when
|
|
191
|
-
reproduction, scope, expected behavior, and regression validation are all
|
|
192
|
-
clear. Otherwise record the missing decision and stop before
|
|
193
|
-
implementation.
|
|
194
|
-
- delta specs: route them with the delegated spec-artifact-routing and
|
|
195
|
-
delta-artifact-authoring procedures, and prefer `MODIFIED` operations when
|
|
196
|
-
the bug corrects an existing requirement; use `ADDED` only when the
|
|
197
|
-
expected behavior is not already represented. Leave `specs/` empty only for
|
|
198
|
-
a purely internal defect with no observable spec impact.
|
|
199
|
-
|
|
200
|
-
6. **Run the proposal checkpoint** — before implementation, semantically check
|
|
201
|
-
every generated or edited file under `.strict-spec-driven/changes/<change-name>/`
|
|
202
|
-
against the known bug, reproduction evidence, expected behavior, relevant
|
|
203
|
-
main specs, applicable technical standards, unchanged behavior, task
|
|
204
|
-
coverage, unresolved-question impact, delta spec scenarios, and delta tech
|
|
205
|
-
use when applicable. When no delta specs are appropriate, replace delta spec
|
|
206
|
-
scenario review with a justified absence check for the technical-only bugfix. For technical-only bugfixes, verify that
|
|
207
|
-
tasks cover reproduction evidence, scripts or tooling, validation commands,
|
|
208
|
-
`ready`/`verify`, and archive or archive-merge checks when archive behavior
|
|
209
|
-
is affected. The checkpoint should fix safe, in-scope
|
|
210
|
-
documentation gaps immediately. Do not expand scope or answer unresolved
|
|
211
|
-
human questions silently.
|
|
212
|
-
|
|
213
|
-
7. **Validate readiness** — run:
|
|
214
|
-
```bash
|
|
215
|
-
strict-spec-cli ready <change-name>
|
|
216
|
-
```
|
|
217
|
-
If you use `verify` before implementation, treat pending-task diagnostics as
|
|
218
|
-
expected. If `questions.yaml.open` is not empty, explain each blocker,
|
|
219
|
-
recommend concrete answers or options with tradeoffs, and stop.
|
|
74
|
+
1. **Confirm bugfix fit** — a known bug has observed and expected behavior, an
|
|
75
|
+
affected path, and reproduction evidence or a credible failing assertion.
|
|
76
|
+
Route an issue that cannot be reproduced or still needs evidence gathering
|
|
77
|
+
to `strict-spec-brainstorm`, and new product behavior or a broad design
|
|
78
|
+
decision to `strict-spec-brainstorm` or `strict-spec-propose`, then stop.
|
|
79
|
+
|
|
80
|
+
2. **Load context** — treat prior chat as stale until revalidated. Read the
|
|
81
|
+
config, the spec index and every main spec the bug violates or touches (for
|
|
82
|
+
an internal defect, confirm none is implicated), the implementation and test
|
|
83
|
+
files, the standards `tech-status` shows apply, and the lessons
|
|
84
|
+
`lesson-status --category <category>` ranks for the failing area by
|
|
85
|
+
`applies_when` — warnings weighted by occurrence, not rules. Then run the
|
|
86
|
+
delegated change-intake-gate from that evidence.
|
|
87
|
+
|
|
88
|
+
3. **Reproduce before fixing** — prove the failure with an existing failing
|
|
89
|
+
test, a new minimal failing regression test, or a deterministic command;
|
|
90
|
+
code inspection alone never justifies a production edit. When reproduction
|
|
91
|
+
is impossible locally, record the blocker in `questions.yaml` and stop, or
|
|
92
|
+
route the investigation to `strict-spec-brainstorm`.
|
|
93
|
+
|
|
94
|
+
4. **Propose or resume a narrow change** — `propose` a short kebab-case name,
|
|
95
|
+
usually `fix-…`; resume a populated change without regenerating it.
|
|
96
|
+
|
|
97
|
+
5. **Plan the fix** — every artifact stays scoped to the bug.
|
|
98
|
+
- The proposal states observed and expected behavior, the spec or contract
|
|
99
|
+
violated, affected paths, adjacent issues out of scope, and unchanged
|
|
100
|
+
behavior; the design records the minimal fix, why it belongs at that
|
|
101
|
+
layer, and its risk to unchanged behavior.
|
|
102
|
+
- Tasks follow the delegated task-list-authoring procedure, with the
|
|
103
|
+
failing-regression task anchored ahead of the production fix; a
|
|
104
|
+
technical-only fix still covers reproduction evidence, validation
|
|
105
|
+
commands, `ready`/`verify`, and archive or archive-merge checks.
|
|
106
|
+
- The seeded requirement questions go through the delegated
|
|
107
|
+
requirement-interrogation procedure; `open` empties only once
|
|
108
|
+
reproduction, scope, expected behavior, and regression validation are
|
|
109
|
+
clear.
|
|
110
|
+
- Delta specs follow the delegated spec-artifact-routing and
|
|
111
|
+
delta-artifact-authoring procedures, preferring `MODIFIED` when the bug
|
|
112
|
+
corrects an existing requirement; `specs/` stays empty only for a purely
|
|
113
|
+
internal defect.
|
|
114
|
+
|
|
115
|
+
6. **Run the proposal checkpoint** — check every change artifact against the
|
|
116
|
+
bug, its reproduction evidence, expected behavior, main specs, standards,
|
|
117
|
+
unchanged behavior, task coverage, unresolved-question impact, and delta
|
|
118
|
+
spec and delta tech use. Fix safe in-scope documentation gaps; never expand
|
|
119
|
+
scope or silently answer a human question.
|
|
120
|
+
|
|
121
|
+
7. **Validate readiness** — `ready <change-name>` must pass; with open
|
|
122
|
+
questions, explain each blocker with recommended answers and stop.
|
|
220
123
|
|
|
221
124
|
8. **Implement the minimal fix** — follow the delegated implementation-order
|
|
222
|
-
procedure
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
10. **Verify and review before archive** — run:
|
|
243
|
-
```bash
|
|
244
|
-
strict-spec-cli verify <change-name>
|
|
245
|
-
```
|
|
246
|
-
When the running harness provides it, hand this review to
|
|
247
|
-
a sub-agent started with a fresh context, briefed with the change name and
|
|
248
|
-
this step rather than an account of the fix; it reads and reports,
|
|
249
|
-
edits no file, and you keep the fixes and reruns that follow.
|
|
250
|
-
This is a recommendation, not a requirement: without such a capability, or
|
|
251
|
-
when the operator prefers otherwise, review in the current context to the
|
|
252
|
-
same standard. The reviewer reads the
|
|
253
|
-
changed implementation, tests, strict artifacts, relevant main specs, and
|
|
254
|
-
tracked diff directly. Check correctness, spec alignment,
|
|
255
|
-
unchanged behavior, regression assertions, error handling, and technical
|
|
256
|
-
standard compliance. Automatically fix safe in-scope review findings and
|
|
257
|
-
rerun strict verification plus the configured complete regression command
|
|
258
|
-
after review-time changes. Do not call or rely on a `strict-spec-cli review` command.
|
|
125
|
+
procedure under a narrower bar: the failing regression exists before any
|
|
126
|
+
production edit, the change is the smallest that meets the expected
|
|
127
|
+
behavior, every `unchanged_behavior` item holds, and no adjacent refactor,
|
|
128
|
+
rename, reformat, or fix rides along unless the target fix requires it.
|
|
129
|
+
|
|
130
|
+
9. **Run regression evidence** — run every Testing task's command: the targeted
|
|
131
|
+
regression fails before the fix and passes after it, or the blocker is
|
|
132
|
+
recorded and the bug is not claimed fixed. Then run the configured complete
|
|
133
|
+
project regression command from `.strict-spec-driven/config.yaml`. That
|
|
134
|
+
evidence survives step 11: a write the configured regression command neither
|
|
135
|
+
compiles nor reads — currently a change-local delta-tech artifact or a
|
|
136
|
+
lesson — does not invalidate passing complete project regression evidence.
|
|
137
|
+
Any other later write, a delta spec, planning artifact, source, or test file
|
|
138
|
+
included, forces a rerun before archive.
|
|
139
|
+
|
|
140
|
+
10. **Verify and review** — `verify <change-name>`, then direct review under the
|
|
141
|
+
delegated review-independence procedure, reading the changed code, tests,
|
|
142
|
+
strict artifacts, main specs, and diff yourself; no `strict-spec-cli review`
|
|
143
|
+
command stands in for it. Fix safe in-scope findings, then rerun `verify`
|
|
144
|
+
and the complete regression command.
|
|
259
145
|
|
|
260
146
|
11. **Declare the lesson outcome (required)** — follow the delegated
|
|
261
|
-
lesson-outcome procedure
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
record one is a gap that will let the next defect through too — a missing
|
|
265
|
-
test shape, a misleading error message, an invariant nothing enforces. A fix
|
|
266
|
-
for a plain typo teaches nothing and is declared "no lesson".
|
|
147
|
+
lesson-outcome procedure. Record a lesson when the gap that let this defect
|
|
148
|
+
through — a missing test shape, a misleading error, an unenforced invariant
|
|
149
|
+
— will let the next one through too; a plain typo is "no lesson".
|
|
267
150
|
|
|
268
|
-
12. **Archive only when clean** — archive
|
|
269
|
-
direct review, targeted regression, and complete regression
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
```
|
|
273
|
-
Summarize the fixed bug, regression evidence, updated specs, archive
|
|
274
|
-
destination, and any follow-up that remains outside the bugfix scope.
|
|
151
|
+
12. **Archive only when clean** — `archive <change-name>` once strict
|
|
152
|
+
verification, direct review, targeted regression, and complete regression
|
|
153
|
+
evidence pass; summarize the bug, evidence, updated specs, archive
|
|
154
|
+
destination, and follow-up outside the fix's scope.
|
|
275
155
|
|
|
276
156
|
## Rules
|
|
277
157
|
|
|
278
|
-
-
|
|
279
|
-
- Reproduce before fixing
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
- Keep the change narrow and preserve documented unchanged behavior.
|
|
283
|
-
- Do not implement adjacent fixes or refactors unless required for the target bug.
|
|
284
|
-
- Stop for explicit human input when reproduction, expected behavior, or scope is ambiguous.
|
|
285
|
-
- Archive only after strict verification, direct review, targeted regression, and complete project regression evidence pass.
|
|
158
|
+
- Known bugs only; unclear or unreproduced issues go to `strict-spec-brainstorm`.
|
|
159
|
+
- Reproduce before fixing, keep the fix minimal, preserve unchanged behavior,
|
|
160
|
+
and stop for a human answer when reproduction, expected behavior, or scope is
|
|
161
|
+
ambiguous.
|
|
@@ -8,23 +8,14 @@ metadata:
|
|
|
8
8
|
version: 1.0.0
|
|
9
9
|
---
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
and render
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
design tokens, then a generated banner, then the canonical sections. Your job is
|
|
17
|
-
the design-system artifact; the CLI owns rendering, comparison, and validation.
|
|
18
|
-
|
|
19
|
-
The design-system artifact is optional. A project with no user interface — a
|
|
20
|
-
library, a backend service, a CLI — simply does not have one, and `init`
|
|
21
|
-
deliberately does not scaffold it. Do not create one to satisfy artifact shape.
|
|
11
|
+
Author or refresh `.strict-spec-driven/design-system.yaml` from the interface's
|
|
12
|
+
real visual identity and render `DESIGN.md` from it. The document is generated
|
|
13
|
+
and never hand-edited; the CLI owns rendering, comparison, and validation. The
|
|
14
|
+
artifact is optional: a project with no user interface has none, and `init`
|
|
15
|
+
never scaffolds one.
|
|
22
16
|
|
|
23
17
|
## This Skill's Commands
|
|
24
18
|
|
|
25
|
-
If you cannot remember the exact command used by this skill, look it up here
|
|
26
|
-
before running anything. Do not guess.
|
|
27
|
-
|
|
28
19
|
```yaml
|
|
29
20
|
check-workflow-state: strict-spec-cli check-workflow-state
|
|
30
21
|
design-status: strict-spec-cli design-status
|
|
@@ -39,51 +30,31 @@ tech-status: strict-spec-cli tech-status
|
|
|
39
30
|
|
|
40
31
|
## CLI-Only YAML Authoring Protocol
|
|
41
32
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
the bundled schema and example keys with their cache-resolved paths, bound to
|
|
47
|
-
the artifact kind and current where a copy would go stale. Validate the result
|
|
48
|
-
with `strict-spec-cli design-status`.
|
|
49
|
-
|
|
50
|
-
**Stop rather than edit YAML directly.** When a required command, argument, or
|
|
51
|
-
artifact kind is unavailable, stop and report the missing capability. Editing
|
|
52
|
-
the YAML directly, writing a raw payload, or scripting around the CLI is never
|
|
53
|
-
an available fallback, and an unavailable command is a reason to stop rather
|
|
54
|
-
than a reason to improvise.
|
|
33
|
+
This skill writes `design-system-state`. Before its first mutation, run
|
|
34
|
+
`strict-spec-cli yaml-authoring-protocol <artifact-kind>` for each kind and
|
|
35
|
+
follow it, including its rule to stop and report a missing command rather than
|
|
36
|
+
work around it; validate the result with `strict-spec-cli design-status`.
|
|
55
37
|
|
|
56
38
|
## Preferred Human Language
|
|
57
39
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
prose, unless that file is absent or the active user message asks otherwise.
|
|
40
|
+
Write user-facing and generated operator-facing text in the human language named
|
|
41
|
+
by `preferred_human_language` in `.strict-spec-driven/config.yaml`, including
|
|
42
|
+
generated design prose, unless the active user message asks otherwise.
|
|
62
43
|
|
|
63
44
|
## What Belongs in the Design-System Artifact
|
|
64
45
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
- **
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
internationalization. These belong in `.strict-spec-driven/tech/`, not here.
|
|
78
|
-
|
|
79
|
-
Pixel-level visual fidelity is governed by visual-regression snapshots. Reference
|
|
80
|
-
them from `components.<id>.mapping.snapshots` so `design-status` can report a
|
|
81
|
-
snapshot path that no longer exists; never inline pixel detail into the artifact.
|
|
82
|
-
|
|
83
|
-
Token groups are fixed by the schema, but the entries inside each group are
|
|
84
|
-
open: no schema decides what a project's palette or spacing scale is named. A
|
|
85
|
-
token group you do not declare is omitted from the rendered document rather than
|
|
86
|
-
rendered empty, so declare only what the project actually has.
|
|
46
|
+
User interface work splits three ways, and this artifact owns only the first:
|
|
47
|
+
|
|
48
|
+
- **Visual identity** — design tokens, the components that consume them, and the
|
|
49
|
+
guidance explaining the identity. Pixel fidelity stays in visual-regression
|
|
50
|
+
snapshots the components reference by path, never inlined.
|
|
51
|
+
- **Observable UI behavior** — what is shown, what is interactive, state
|
|
52
|
+
changes, and loading, error, and empty conditions — belongs in a main spec.
|
|
53
|
+
- **UI engineering rules** — design-system usage, styling, accessibility, and
|
|
54
|
+
internationalization — belong in a `ui`-category technical standard.
|
|
55
|
+
|
|
56
|
+
Declare only token groups and entries the project actually has; an undeclared
|
|
57
|
+
group is omitted from the rendered document.
|
|
87
58
|
|
|
88
59
|
## Steps
|
|
89
60
|
|
|
@@ -91,78 +62,38 @@ Before any other step, run `strict-spec-cli check-workflow-state`. If
|
|
|
91
62
|
`.strict-spec-driven/` is missing, stop immediately and tell the user to run
|
|
92
63
|
`/strict-spec-init`. Do not run `init` from this skill.
|
|
93
64
|
|
|
94
|
-
1. **
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
`
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
identity you record is consistent with the rules that bind the code.
|
|
121
|
-
|
|
122
|
-
6. **Write or update `.strict-spec-driven/design-system.yaml` through the CLI** — invoke `strict-spec-cli design-edit` once per identity, token, component, guidance, mapping, snapshot, or exact named removal. Never edit the YAML directly. Keep token and
|
|
123
|
-
component ids stable across edits: they are the anchors readers, diffs, and
|
|
124
|
-
component token references rely on. Preserve authoring order within a group,
|
|
125
|
-
because the renderer emits entries in document order. Reference tokens from
|
|
126
|
-
components by their dotted path, such as `colors.primary`, so a reader can
|
|
127
|
-
follow a component property back to the token that defines it.
|
|
128
|
-
|
|
129
|
-
7. **Render the document** — run `strict-spec-cli design-generate`. It writes
|
|
130
|
-
`DESIGN.md` at the repository root, or the path given to `--output`.
|
|
131
|
-
|
|
132
|
-
8. **Confirm the result** — run `strict-spec-cli design-status` again for a clean
|
|
133
|
-
validation and no mapping drift, then `strict-spec-cli design-generate --check`
|
|
134
|
-
to confirm the rendered document matches its source. Check mode exits non-zero
|
|
135
|
-
and names the stale source artifact when it does not.
|
|
136
|
-
|
|
137
|
-
## Detecting Staleness Later
|
|
138
|
-
|
|
139
|
-
`strict-spec-cli design-generate --check` is the drift gate. It renders in
|
|
140
|
-
memory, compares against the file on disk, never writes, and exits non-zero when
|
|
141
|
-
the document is stale or absent, naming which source artifact changed. It is an
|
|
142
|
-
on-demand check: it is deliberately not wired into `verify`, `ready`, or
|
|
143
|
-
`archive`. A project that wants it run on a schedule instead declares a
|
|
144
|
-
`generated-doc-check` entry under `maintenance.checks` in
|
|
145
|
-
`.strict-spec-driven/config.yaml`, which reports a stale document as a
|
|
146
|
-
maintenance finding.
|
|
147
|
-
|
|
148
|
-
That check compares the document against the artifact. It cannot tell that the
|
|
149
|
-
artifact itself has fallen behind the interface code — that a component was
|
|
150
|
-
deleted or a palette retuned. Use `/strict-spec-design-sync` for that: it scans
|
|
151
|
-
the UI sources, reports the divergence, and reconciles the artifact after you
|
|
152
|
-
confirm each edit.
|
|
65
|
+
1. **Read the current state** — run `design-status`; it exits non-zero when the
|
|
66
|
+
artifact is absent, which is expected for a project with no interface.
|
|
67
|
+
Fix reported mapping drift; never delete a mapping to silence it.
|
|
68
|
+
|
|
69
|
+
2. **Create the artifact when absent** — only once the project is confirmed to
|
|
70
|
+
have a user interface, run `design-init` for a valid skeleton; it never
|
|
71
|
+
overwrites an existing artifact.
|
|
72
|
+
|
|
73
|
+
3. **Gather evidence** — derive tokens and components from the stylesheets,
|
|
74
|
+
theme files, component-library configuration, and UI source the interface
|
|
75
|
+
actually uses, and run `tech-status` to read any `ui` standard.
|
|
76
|
+
`schema-show design-system` and `sample-show design-system` render the shape.
|
|
77
|
+
|
|
78
|
+
4. **Write through `design-edit`** — one named upsert or exact removal at a
|
|
79
|
+
time; read `strict-spec-cli design-edit --help --json` for its arguments.
|
|
80
|
+
Keep token and component ids stable, since components reference tokens by
|
|
81
|
+
dotted path such as `colors.primary`, and keep authoring order, which is
|
|
82
|
+
render order.
|
|
83
|
+
|
|
84
|
+
5. **Render and confirm** — run `design-generate`, then `design-status` and
|
|
85
|
+
`design-generate --check`. Done when status is clean with no mapping drift
|
|
86
|
+
and the check passes.
|
|
87
|
+
|
|
88
|
+
`design-generate --check` is the on-demand artifact-to-document drift gate
|
|
89
|
+
(schedulable as the `generated-doc-check` maintenance check); drift between the
|
|
90
|
+
artifact and the interface code is `strict-spec-design-sync`'s job.
|
|
153
91
|
|
|
154
92
|
## Rules
|
|
155
93
|
|
|
156
94
|
- Never hand-edit `DESIGN.md` or any file carrying the generated banner; change
|
|
157
|
-
the source artifact and re-render
|
|
158
|
-
- Never
|
|
159
|
-
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
readers see as a deletion plus an addition, and it silently breaks every
|
|
163
|
-
component token reference that points at it
|
|
164
|
-
- Map components to real repo-relative implementation and snapshot paths and fix
|
|
165
|
-
mapping drift rather than deleting the mapping to silence it
|
|
166
|
-
- Do not create a design-system artifact for a project with no user interface,
|
|
167
|
-
and do not invent tokens or components the interface does not have; ask the
|
|
168
|
-
user when the intended identity is genuinely ambiguous
|
|
95
|
+
the source artifact and re-render.
|
|
96
|
+
- Never edit `.strict-spec-driven/design-system.yaml` directly; use
|
|
97
|
+
`design-edit`.
|
|
98
|
+
- Do not create an artifact for a project with no user interface, and do not
|
|
99
|
+
invent tokens or components; ask the user when the identity is ambiguous.
|