dsh-plugin-strict-spec 0.0.0-stage → 0.5.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/LICENSE +201 -0
- package/README.md +236 -2
- package/README.zh.md +191 -0
- package/cordis.patch.yml +5 -0
- package/dist/cli/strict-spec-cli.js +38892 -0
- package/dist/client.js +50 -0
- package/dist/host.js +154 -0
- package/dist/skills/strict-roadmap-plan/SKILL.md +176 -0
- package/dist/skills/strict-roadmap-recommend/SKILL.md +321 -0
- package/dist/skills/strict-roadmap-reorder/SKILL.md +194 -0
- package/dist/skills/strict-roadmap-review/SKILL.md +180 -0
- package/dist/skills/strict-roadmap-transition/SKILL.md +323 -0
- package/dist/skills/strict-scene-edit/SKILL.md +156 -0
- package/dist/skills/strict-spec-apply/SKILL.md +212 -0
- package/dist/skills/strict-spec-architecture/SKILL.md +143 -0
- package/dist/skills/strict-spec-archive/SKILL.md +165 -0
- package/dist/skills/strict-spec-auto/SKILL.md +334 -0
- package/dist/skills/strict-spec-brainstorm/SKILL.md +228 -0
- package/dist/skills/strict-spec-bugfix/SKILL.md +285 -0
- package/dist/skills/strict-spec-design/SKILL.md +168 -0
- package/dist/skills/strict-spec-design-sync/SKILL.md +165 -0
- package/dist/skills/strict-spec-init/SKILL.md +123 -0
- package/dist/skills/strict-spec-maintenance/SKILL.md +130 -0
- package/dist/skills/strict-spec-modify/SKILL.md +148 -0
- package/dist/skills/strict-spec-propose/SKILL.md +553 -0
- package/dist/skills/strict-spec-review/SKILL.md +315 -0
- package/dist/skills/strict-spec-ship/SKILL.md +94 -0
- package/dist/skills/strict-spec-spec-edit/SKILL.md +117 -0
- package/dist/skills/strict-spec-sync-specs/SKILL.md +128 -0
- package/dist/skills/strict-spec-verify/SKILL.md +79 -0
- package/dist/skills/strict-tech-edit/SKILL.md +161 -0
- package/dist/skills/strict-tech-sync/SKILL.md +202 -0
- package/package.json +109 -4
|
@@ -0,0 +1,553 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: strict-spec-propose
|
|
3
|
+
description: Propose a new strict change from a user request, standalone or scoped to a named roadmap milestone. Use to scaffold proposal.yaml, design.yaml, tasks.yaml, questions.yaml, and optional delta artifacts under .strict-spec-driven/changes/<name>/, sourcing the planned change from roadmap-recommend when the request names a milestone and stopping at proposal validation either way.
|
|
4
|
+
metadata:
|
|
5
|
+
skill_id: strict_spec_propose
|
|
6
|
+
author: strict-spec-driven
|
|
7
|
+
type: agent_skill
|
|
8
|
+
version: 1.0.0
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
You are helping the user create a strict YAML change proposal.
|
|
12
|
+
|
|
13
|
+
Do not ask follow-up questions or require confirmation during the proposal
|
|
14
|
+
stage. Derive the strongest proposal you can from the user request, project
|
|
15
|
+
context, and existing strict specs. Record remaining ambiguity in
|
|
16
|
+
`questions.yaml` for `strict-spec-auto` or `strict-spec-apply` to surface
|
|
17
|
+
before implementation.
|
|
18
|
+
|
|
19
|
+
## This Skill's Commands
|
|
20
|
+
|
|
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
|
+
```yaml
|
|
25
|
+
check-workflow-state: strict-spec-cli check-workflow-state
|
|
26
|
+
tech-status: strict-spec-cli tech-status
|
|
27
|
+
lesson-status: strict-spec-cli lesson-status [--category <category>]
|
|
28
|
+
roadmap-status: strict-spec-cli roadmap-status
|
|
29
|
+
roadmap-recommend: strict-spec-cli roadmap-recommend [--milestone <milestone-id>] [--create]
|
|
30
|
+
propose: strict-spec-cli propose <change-name>
|
|
31
|
+
generate: strict-spec-cli generate <change-name> <proposal|design|questions|tasks|delta-spec|delta-tech> --<named-args>
|
|
32
|
+
generate-delta-scene: strict-spec-cli generate <change-name> delta-scene --<named-args>
|
|
33
|
+
scene-status: strict-spec-cli scene-status [--area <area>] [--scene <scene-id>]
|
|
34
|
+
ready: strict-spec-cli ready <change-name>
|
|
35
|
+
verify: strict-spec-cli verify <change-name>
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## YAML Writing Rules
|
|
39
|
+
|
|
40
|
+
- Keep artifacts in valid strict YAML structures. Do not switch to Markdown
|
|
41
|
+
prose or freeform notes inside YAML files.
|
|
42
|
+
- If artifact fields are unclear, use `strict-spec-cli schema-show <schema-name>`;
|
|
43
|
+
installed skills do not carry a `templates` directory.
|
|
44
|
+
- 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.
|
|
45
|
+
- If a valid artifact example would clarify the shape, use
|
|
46
|
+
`strict-spec-cli sample-show <sample-name>`; installed skills do not rely on a
|
|
47
|
+
local `examples` directory.
|
|
48
|
+
- Use block scalars only for free-text content. Prefer `>-` for wrapped prose
|
|
49
|
+
such as longer `summary`, `approach`, `decision`, `rationale`, `question`,
|
|
50
|
+
`context`, `answer`, and spec `statement` values. Use `|` only when literal
|
|
51
|
+
line breaks must be preserved as part of the value.
|
|
52
|
+
- Quote short strings that may contain YAML-sensitive characters or ambiguous
|
|
53
|
+
scalar values, including `command` strings, URLs, paths, text containing `:`
|
|
54
|
+
or `#`, leading `-`, JSON-like fragments, boolean-like words, and timestamp-
|
|
55
|
+
like values.
|
|
56
|
+
- Keep short structural fields as plain scalars unless quoting is needed for
|
|
57
|
+
correctness. Do not force IDs, enums, schema identifiers, artifact types,
|
|
58
|
+
task references, or similar fields into block scalars.
|
|
59
|
+
- Before handing off, self-check indentation, list nesting, quote closure, and
|
|
60
|
+
colon spacing, then run `verify` to catch remaining schema or YAML issues.
|
|
61
|
+
|
|
62
|
+
## CLI-Only YAML Authoring Protocol
|
|
63
|
+
|
|
64
|
+
Every mutation of repository-owned YAML in this skill goes through the strict
|
|
65
|
+
CLI. This skill writes `change-planning-state`, `change-delta-state`,
|
|
66
|
+
`scene-state`. Before the first mutation run `strict-spec-cli yaml-authoring-protocol
|
|
67
|
+
<artifact-kind>` for each of them: that command reports the ordered authoring
|
|
68
|
+
steps, the owning command for each operation, and the bundled schema and
|
|
69
|
+
example keys with their cache-resolved paths, bound to the artifact kind and
|
|
70
|
+
current where a copy would go stale. Validate the result with `strict-spec-cli
|
|
71
|
+
verify <change-name>`.
|
|
72
|
+
|
|
73
|
+
**Stop rather than edit YAML directly.** When a required command, argument, or
|
|
74
|
+
artifact kind is unavailable, stop and report the missing capability. Editing
|
|
75
|
+
the YAML directly, writing a raw payload, or scripting around the CLI is never
|
|
76
|
+
an available fallback, and an unavailable command is a reason to stop rather
|
|
77
|
+
than a reason to improvise.
|
|
78
|
+
|
|
79
|
+
## Preferred Human Language
|
|
80
|
+
|
|
81
|
+
Comply with `preferred_human_language` from `.strict-spec-driven/config.yaml` —
|
|
82
|
+
the user's common human language, not a programming language — for all
|
|
83
|
+
user-facing and generated operator-facing text, unless that file is absent or
|
|
84
|
+
the active user message asks otherwise.
|
|
85
|
+
|
|
86
|
+
## Requirement Interrogation
|
|
87
|
+
|
|
88
|
+
Run this before the change-intake checklist below. That checklist interrogates
|
|
89
|
+
the proposed solution — scope, files, tests, rules. This one interrogates the
|
|
90
|
+
need, and it comes first because a well-scoped change built against a misread
|
|
91
|
+
need is still the wrong change.
|
|
92
|
+
|
|
93
|
+
Requirement answers are **never answered from repository evidence**. Code shows
|
|
94
|
+
what the system does; it cannot show what a person wants. Only the requester's
|
|
95
|
+
own words, or replayed roadmap planned-change and milestone detail, may answer
|
|
96
|
+
these. What the requester already said in the active request counts — never
|
|
97
|
+
re-ask something they have already told you.
|
|
98
|
+
|
|
99
|
+
Authoring `questions.yaml` seeds these five as open questions, so a fresh change starts blocked:
|
|
100
|
+
|
|
101
|
+
- `requirement-problem` — what is concretely going wrong today, and for whom
|
|
102
|
+
- `requirement-outcome` — what observable difference proves it is solved
|
|
103
|
+
- `requirement-trigger` — why now, what forced this
|
|
104
|
+
- `requirement-non-goals` — what must explicitly not change
|
|
105
|
+
- `requirement-interpretation` — which reading is intended, where more than one exists
|
|
106
|
+
|
|
107
|
+
Resolve each with:
|
|
108
|
+
|
|
109
|
+
```bash
|
|
110
|
+
strict-spec-cli generate <change-name> questions --resolve <id> --answer "..." --answered-by human
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
### How to ask
|
|
114
|
+
|
|
115
|
+
Asking these badly collects five restated solutions and passes the gate, so the
|
|
116
|
+
technique is part of the requirement:
|
|
117
|
+
|
|
118
|
+
- **Ask one question at a time**, and let each answer shape the next. A batch of
|
|
119
|
+
five questions returns five shallow answers.
|
|
120
|
+
- **Carry a concrete guess into every question** rather than posing a blank
|
|
121
|
+
prompt. People correct a wrong specific statement far more readily than they
|
|
122
|
+
fill in a blank. Where the harness provides `AskUserQuestion`, use it with two
|
|
123
|
+
to four concrete options so you must commit to a guess.
|
|
124
|
+
- **Ask about the last concrete occurrence**, not the general case. Episodic
|
|
125
|
+
memory produces facts; general questions produce theories, and people theorize
|
|
126
|
+
badly about their own workflows.
|
|
127
|
+
- **Reject an answer that names a solution** instead of a problem. If it names a
|
|
128
|
+
button, field, page, or endpoint, ask what they would do next once that
|
|
129
|
+
existed, until the answer is a behavior.
|
|
130
|
+
- **Ask what happens if nothing is done.** This tests whether the trigger is real.
|
|
131
|
+
- **Replay a deliberately imperfect summary** and let them correct it. A
|
|
132
|
+
correction carries more information than agreement.
|
|
133
|
+
|
|
134
|
+
### Explain before you ask
|
|
135
|
+
|
|
136
|
+
Never assume the requester knows how to answer. Before posing a question,
|
|
137
|
+
**explain why the question matters** and what a sufficient answer contains,
|
|
138
|
+
defining any workflow vocabulary — problem versus solution, observable outcome,
|
|
139
|
+
non-goal — in plain terms. The requester is the domain expert; you are the
|
|
140
|
+
workflow expert, so the vocabulary is your job to explain.
|
|
141
|
+
|
|
142
|
+
When an answer cannot be used yet, **state the reason for the pushback** and
|
|
143
|
+
supply the missing criterion. Never silently re-ask the same question: that
|
|
144
|
+
reads as not having listened, and it pushes the requester into repeating
|
|
145
|
+
themselves rather than adding what is missing.
|
|
146
|
+
|
|
147
|
+
When interrogation cannot land — the requester will not engage, or the answer
|
|
148
|
+
stays a restated solution — record `--answered-by assumption` rather than
|
|
149
|
+
inventing a plausible answer. An assumption blocks `ready` and forces an
|
|
150
|
+
explicit human decision; a fabricated answer passes silently and is worse.
|
|
151
|
+
|
|
152
|
+
## Scene-First Requirement Routing
|
|
153
|
+
|
|
154
|
+
Run this after the requirement interrogation and before any requirement is
|
|
155
|
+
drafted. The interrogation establishes the need; this establishes the situation
|
|
156
|
+
it occurs in, so the requirement set is derived from that situation rather than
|
|
157
|
+
recalled. Ask all four in every proposal, whatever the change turns out to be:
|
|
158
|
+
|
|
159
|
+
- who acts, and what each actor does
|
|
160
|
+
- what must already be true before the main flow begins
|
|
161
|
+
- what happens, step by ordered step, when nothing goes wrong
|
|
162
|
+
- what can go wrong, what triggers each exception flow, and what happens then
|
|
163
|
+
|
|
164
|
+
A requirement set written without those answers has systematic holes — skipped
|
|
165
|
+
actors, assumed preconditions, unwritten exception flows — and they are
|
|
166
|
+
invisible in the requirements themselves, because nothing in a requirement
|
|
167
|
+
records the question that was never asked.
|
|
168
|
+
|
|
169
|
+
**Author the scene before the delta spec.** Run `strict-spec-cli scene-status`,
|
|
170
|
+
narrowed with `--area` or `--scene`, to find a recorded scene that already
|
|
171
|
+
describes the situation; then write the change's delta scene and draft each
|
|
172
|
+
delta-spec requirement against a flow step it covers.
|
|
173
|
+
|
|
174
|
+
The scene is mandatory as a question and optional as an artifact. It is authored
|
|
175
|
+
when the change touches user-observable behavior. When the change is purely
|
|
176
|
+
technical — a refactor, build or test tooling, repository maintenance, an
|
|
177
|
+
architecture constraint, a script, or skill guidance — there is no actor flow to
|
|
178
|
+
describe: **record why no scene applies** as a design decision and leave
|
|
179
|
+
`scenes/` absent. Do not invent an actor flow to fill the artifact, and do not
|
|
180
|
+
skip the questions to avoid the answer.
|
|
181
|
+
|
|
182
|
+
Scene checking is triggered by the presence of a scene, never by the presence of
|
|
183
|
+
a spec, so a project recording no scene sees no new diagnostic. Once a change
|
|
184
|
+
carries a delta scene, `ready` and `verify` block on any step of the scenes it
|
|
185
|
+
touches naming neither a covering requirement nor an explicit no-coverage
|
|
186
|
+
reason, and the diagnostic names the runnable command that records the coverage.
|
|
187
|
+
|
|
188
|
+
## Change Intake Question Gate
|
|
189
|
+
|
|
190
|
+
Before implementation handoff or proposal validation, perform the required
|
|
191
|
+
plain change-intake checklist from the strict workflow contract. First use
|
|
192
|
+
project evidence to answer every recoverable item: `.strict-spec-driven/config.yaml`,
|
|
193
|
+
relevant strict specs, technical standards, existing change artifacts, the
|
|
194
|
+
implementation and test files the change touches, `git status`, and focused code
|
|
195
|
+
search for the affected behavior.
|
|
196
|
+
|
|
197
|
+
- Do not ask the human for information already recoverable from the request or
|
|
198
|
+
repository evidence.
|
|
199
|
+
- Do ask when a required answer remains absent after discovery, even if you have
|
|
200
|
+
a plausible guess.
|
|
201
|
+
- Record missing required answers in `questions.yaml.open` with stable
|
|
202
|
+
language-neutral ids, `preferred_human_language` question text, concrete
|
|
203
|
+
context that includes impact analysis and a recommended answer or options.
|
|
204
|
+
The `questions` generator has no `--impact` or `--recommendation` flags; put
|
|
205
|
+
those details in the `--context` text.
|
|
206
|
+
- Stop before implementation while `questions.yaml.open` is non-empty.
|
|
207
|
+
- When the user answers, resolve the item into `questions.yaml.resolved` before
|
|
208
|
+
continuing implementation or automatic workflow execution.
|
|
209
|
+
|
|
210
|
+
Keep the proposal checkpoint focused on what changes, what stays the same,
|
|
211
|
+
where the work likely lives, how it will be tested, and which technical rules
|
|
212
|
+
apply.
|
|
213
|
+
|
|
214
|
+
## Spec and Technical Artifact Routing
|
|
215
|
+
|
|
216
|
+
A strict change may legitimately have no delta spec. Do not invent a
|
|
217
|
+
`delta-spec` just to satisfy artifact shape.
|
|
218
|
+
|
|
219
|
+
- Create `delta-scene` artifacts when the change touches user-observable
|
|
220
|
+
behavior, before the delta specs covering them.
|
|
221
|
+
- Create `delta-spec` artifacts only when the change modifies user-observable
|
|
222
|
+
behavior or another requirement that belongs in a strict YAML main spec.
|
|
223
|
+
- For purely technical changes such as refactors, build or test tooling,
|
|
224
|
+
repository maintenance, architecture constraints, scripts, validation flows,
|
|
225
|
+
archive behavior, or skill guidance, leave `specs/` empty when no main spec
|
|
226
|
+
requirement changes.
|
|
227
|
+
- If a technical-only change alters, adds, or retires an engineering rule,
|
|
228
|
+
create a `delta-tech` artifact for the affected standard. If it only complies
|
|
229
|
+
with existing standards, leave `tech/` absent too.
|
|
230
|
+
- A technical-only change still needs complete workflow tasks: script or
|
|
231
|
+
tooling edits when applicable, focused tests, validation commands,
|
|
232
|
+
`ready`/`verify` checks, and archive-readiness or archive-merge checks when
|
|
233
|
+
the change affects artifacts consumed by archive.
|
|
234
|
+
|
|
235
|
+
## Roadmap-Backed Milestone Mode
|
|
236
|
+
|
|
237
|
+
A request that names a milestone — an exact milestone id, a bare number, or a
|
|
238
|
+
recognizable part of a milestone id or title — is a roadmap-backed proposal.
|
|
239
|
+
Source it from the roadmap rather than deriving scope from the request text.
|
|
240
|
+
|
|
241
|
+
Resolve the selector to exactly one milestone id first, consulting
|
|
242
|
+
`.strict-spec-driven/roadmap/INDEX.yaml` or `strict-spec-cli roadmap-status`
|
|
243
|
+
for that resolution only:
|
|
244
|
+
|
|
245
|
+
- an exact milestone id is used as given
|
|
246
|
+
- a bare number resolves to the milestone whose id carries that numeric prefix
|
|
247
|
+
once leading zeros are ignored, so `5` resolves to a single milestone id such
|
|
248
|
+
as `0005-migration-and-self-hosting`
|
|
249
|
+
- any other hint is matched first as an exact milestone id, then as a
|
|
250
|
+
case-insensitive substring of a milestone id or title
|
|
251
|
+
- zero matches, or more than one, is a blocker: report the ambiguity and stop
|
|
252
|
+
rather than picking a milestone
|
|
253
|
+
|
|
254
|
+
Then obtain the planned change, and its change, from the command that owns
|
|
255
|
+
selection:
|
|
256
|
+
|
|
257
|
+
```bash
|
|
258
|
+
strict-spec-cli roadmap-recommend --milestone <resolved-milestone-id> --create
|
|
259
|
+
```
|
|
260
|
+
|
|
261
|
+
The change is created in the same call that recommends it: `--create` makes the
|
|
262
|
+
command create the empty change container, named exactly after the recommended
|
|
263
|
+
planned change id rather than by you or by the request, only when it recommends
|
|
264
|
+
one.
|
|
265
|
+
|
|
266
|
+
Roadmap order, dependency resolution, pauses, and awaiting-refinement handling
|
|
267
|
+
all live in that command, so treat the command's selected planned change as
|
|
268
|
+
authoritative and run it before reading broad roadmap context. Never choose
|
|
269
|
+
among a milestone's planned changes yourself. Open only the selected
|
|
270
|
+
planned-change artifact and its owning milestone, and carry that planned
|
|
271
|
+
change's `summary`, `details`, `depends_on`, and labels forward as change-intake
|
|
272
|
+
evidence instead of re-asking what they already answer.
|
|
273
|
+
|
|
274
|
+
That one `--create` call scaffolds exactly one recommended planned change as a
|
|
275
|
+
normal strict change, so do not run `roadmap-recommend` again. Use the reported
|
|
276
|
+
`createdChange.name` as `<change-name>` for every later command, in place of the
|
|
277
|
+
`propose` call in step 3. Roadmap status matches a
|
|
278
|
+
change to its planned change by directory name alone, so a roadmap-backed
|
|
279
|
+
change named anything else is never marked complete when it archives. When
|
|
280
|
+
`createdChange` is `null`, report the command's diagnostics and stop rather than
|
|
281
|
+
falling back to `propose`. Record the roadmap link when generating the proposal
|
|
282
|
+
so archive can reconcile the planned change; the command refuses a link whose
|
|
283
|
+
planned change is absent, owned by another milestone, or named differently from
|
|
284
|
+
the change:
|
|
285
|
+
|
|
286
|
+
```bash
|
|
287
|
+
strict-spec-cli generate <change-name> proposal --what "..." --why "..." --milestone <milestone-id> --planned-change <change-name>
|
|
288
|
+
```
|
|
289
|
+
|
|
290
|
+
**When no planned change comes back, report the reason and stop.** A
|
|
291
|
+
`no-candidate`, `roadmap-error`, or `refine-milestone` result already names why
|
|
292
|
+
the milestone yields no work — an incomplete dependency, a paused milestone, a
|
|
293
|
+
milestone awaiting refinement, or invalid roadmap state. Report the resolved
|
|
294
|
+
milestone id, the returned status, and those named blockers, and stop there. Do
|
|
295
|
+
not select a planned change by hand, do not quietly fall back to a standalone
|
|
296
|
+
proposal under the same name, and do not add `--allow-unrefined`: that flag is a
|
|
297
|
+
deliberate human decision, so surface the refusal and let the human take it.
|
|
298
|
+
|
|
299
|
+
Everything after selection is the ordinary proposal flow in the steps below,
|
|
300
|
+
including the handoff that stops at proposal validation.
|
|
301
|
+
|
|
302
|
+
## Steps
|
|
303
|
+
|
|
304
|
+
Before any other step, run `strict-spec-cli check-workflow-state`. If `.strict-spec-driven/` is
|
|
305
|
+
missing, stop immediately and tell the user to run `/strict-spec-init`. Do not
|
|
306
|
+
run `init` from this skill.
|
|
307
|
+
|
|
308
|
+
1. **Determine the proposal mode and the change name** — when the request names
|
|
309
|
+
a milestone, follow the roadmap-backed milestone mode above before anything
|
|
310
|
+
else; the planned change it selects supplies the scope, and its id is the
|
|
311
|
+
change name, whatever name the request suggests. Without a milestone selector this
|
|
312
|
+
is a standalone proposal: use the user-provided kebab-case name when it
|
|
313
|
+
already exists, and otherwise derive one from the request and scope.
|
|
314
|
+
`/strict-roadmap-recommend` still owns whole-roadmap selection, where no
|
|
315
|
+
milestone is named and the recommendation continues into the automatic
|
|
316
|
+
workflow.
|
|
317
|
+
|
|
318
|
+
2. **Read project context, existing strict specs, and technical standards** — read:
|
|
319
|
+
- `.strict-spec-driven/config.yaml`
|
|
320
|
+
- `.strict-spec-driven/specs/INDEX.yaml`
|
|
321
|
+
- every strict YAML main spec the change is likely to touch, if any; for a
|
|
322
|
+
purely technical change, confirm from the spec index that no main spec
|
|
323
|
+
requirement is implicated instead of forcing one
|
|
324
|
+
- the technical standards that govern the code this change will touch by
|
|
325
|
+
running `strict-spec-cli tech-status` and
|
|
326
|
+
reading the relevant files under `.strict-spec-driven/tech/`. Treat every
|
|
327
|
+
applicable MUST rule as a binding design constraint and every SHOULD rule
|
|
328
|
+
as the default the proposal follows unless it records an explicit
|
|
329
|
+
justification. If no standards apply, note that and continue.
|
|
330
|
+
- select the lesson category that matches the affected spec or technical area, run
|
|
331
|
+
`strict-spec-cli lesson-status --category <category>`, and read the lessons it ranks first.
|
|
332
|
+
Repeat for another category when the proposal genuinely spans more than one; use the
|
|
333
|
+
unfiltered command only when repository evidence cannot identify a relevant category.
|
|
334
|
+
Lessons are recorded experience, not binding rules: they carry no MUST or
|
|
335
|
+
SHOULD strength, so treat each one as a warning worth checking against this
|
|
336
|
+
change rather than a constraint to satisfy. Match on `applies_when` — that
|
|
337
|
+
field states the condition under which the lesson is worth recalling. A
|
|
338
|
+
lesson with several occurrences has bitten this project repeatedly and
|
|
339
|
+
deserves weight even though nothing enforces it.
|
|
340
|
+
- Decide the relationship to each standard: most changes only *comply* with
|
|
341
|
+
existing standards. If this change's intent is to *alter* a standard (add,
|
|
342
|
+
modify, or retire a rule, or introduce a whole new standard), plan a delta
|
|
343
|
+
tech artifact for it in step 8b instead of editing the live standard.
|
|
344
|
+
- For user interface work, split it the same way: capture user-observable UI
|
|
345
|
+
behavior as delta-spec requirements, capture UI engineering and design rules
|
|
346
|
+
(design-system usage, styling, accessibility, i18n) as a `ui`-category
|
|
347
|
+
technical standard, and govern pixel-level visual fidelity with
|
|
348
|
+
visual-regression snapshots referenced from mappings rather than inlined.
|
|
349
|
+
- Run the change-intake question gate from project evidence before generating
|
|
350
|
+
proposal artifacts. If any required answer is still missing, carry it as an
|
|
351
|
+
open question rather than guessing.
|
|
352
|
+
|
|
353
|
+
3. **Scaffold the change** — for a standalone proposal, run the command below;
|
|
354
|
+
a roadmap-backed proposal was already created by `roadmap-recommend --create`
|
|
355
|
+
in the milestone mode above, so skip it:
|
|
356
|
+
```bash
|
|
357
|
+
strict-spec-cli propose <change-name>
|
|
358
|
+
```
|
|
359
|
+
After scaffolding, generate every supported artifact, including `tasks.yaml`,
|
|
360
|
+
through direct CLI invocations in the exact ordered steps below. Do not create
|
|
361
|
+
JSON payload files.
|
|
362
|
+
|
|
363
|
+
4. **Generate `proposal.yaml`** — run a direct CLI invocation with named
|
|
364
|
+
arguments:
|
|
365
|
+
```bash
|
|
366
|
+
strict-spec-cli generate <change-name> proposal --what "..." --why "..." --in "..." --out "..." --unchanged "..."
|
|
367
|
+
```
|
|
368
|
+
Populate:
|
|
369
|
+
- `summary.what`
|
|
370
|
+
- `summary.why`
|
|
371
|
+
- `scope.in`
|
|
372
|
+
- `scope.out`
|
|
373
|
+
- `unchanged_behavior`
|
|
374
|
+
Keep the content observable and concrete.
|
|
375
|
+
|
|
376
|
+
5. **Generate `design.yaml`** — run one direct CLI invocation with named
|
|
377
|
+
arguments:
|
|
378
|
+
```bash
|
|
379
|
+
strict-spec-cli generate <change-name> design --approach "..." --decision <decision-id> --decision-text "..." --rationale "..."
|
|
380
|
+
```
|
|
381
|
+
Populate:
|
|
382
|
+
- `approach`
|
|
383
|
+
- `decisions`
|
|
384
|
+
- `alternatives`
|
|
385
|
+
- `risks`
|
|
386
|
+
Make the design conform to the applicable technical standards from step 2.
|
|
387
|
+
When a standard meaningfully shapes the approach, record it as a `decision`
|
|
388
|
+
with a `rationale` that cites the standard. If the design must deviate from a
|
|
389
|
+
SHOULD rule, record the deviation and its justification as a decision; if it
|
|
390
|
+
would violate a MUST rule, record an open question in `questions.yaml`
|
|
391
|
+
instead of silently breaking the standard.
|
|
392
|
+
|
|
393
|
+
6. **Generate `tasks.yaml` with one CLI invocation per task** — run
|
|
394
|
+
`strict-spec-cli generate <change-name> tasks` once for each task so no task
|
|
395
|
+
list is hand-written. Keep concrete task sections for `Implementation`,
|
|
396
|
+
`Testing`, and `Verification`. Read `strict-spec-cli generate --help --json`
|
|
397
|
+
(or `--help`) first. Choose `--implementation`, `--testing`, or `--verification`
|
|
398
|
+
for the corresponding section. Each takes no value and opens one task group;
|
|
399
|
+
following task fields belong to it. Repeat a selector for each task in a
|
|
400
|
+
multi-task call. Removal and gate flags are global and need no selector.
|
|
401
|
+
- first task is one invocation; the task list starts absent and is created by this call:
|
|
402
|
+
```bash
|
|
403
|
+
strict-spec-cli generate <change-name> tasks --implementation --task <task-id> --text "..."
|
|
404
|
+
```
|
|
405
|
+
No flag rebuilds the list. Remove a task explicitly with `--remove <task-id>`.
|
|
406
|
+
Whole-artifact `--delete` is isolated and refuses while completed tasks exist.
|
|
407
|
+
- each later task is one more invocation:
|
|
408
|
+
```bash
|
|
409
|
+
strict-spec-cli generate <change-name> tasks --testing --task <task-id> --text "..." --command "..."
|
|
410
|
+
```
|
|
411
|
+
- `--status` defaults to `pending`; testing tasks should pass a runnable
|
|
412
|
+
`--command`
|
|
413
|
+
- restating an existing `(section, task-id)` is a field-level merge — it
|
|
414
|
+
overwrites only the fields you pass, so a task's `status: complete` and
|
|
415
|
+
`command` survive a text-only edit; a brand-new task still needs `--text`
|
|
416
|
+
- delete a task with `--remove <task-id>`; to move a task between sections,
|
|
417
|
+
`--remove` it and restate it under the new section in the same call
|
|
418
|
+
- place a task with `--before <task-id>` or `--after <task-id>` instead of letting
|
|
419
|
+
it append; task order is the order `apply` walks, so a task that must run before
|
|
420
|
+
existing pending work is anchored rather than appended, and naming an existing
|
|
421
|
+
task id with an anchor moves it there while preserving its `status` and `command`
|
|
422
|
+
- values may begin with a dash via `--text=...` or `--command=...`
|
|
423
|
+
- set the gates with `--validation-task <task-id>` and
|
|
424
|
+
`--unit-test-task <task-id>`; both must reference `Testing` task ids
|
|
425
|
+
- the command upserts by `(section, task-id)` and is idempotent; each call
|
|
426
|
+
returns `{valid, ready, diagnostics}` — `valid` reports write success and
|
|
427
|
+
`ready` reports completeness, so a `ready: false` result naming empty
|
|
428
|
+
sections or unset gates is not a failed write; keep adding tasks and
|
|
429
|
+
confirm with `verify` before handoff
|
|
430
|
+
- for technical-only changes, include the concrete scripts, tooling,
|
|
431
|
+
generated assets, documentation, or skill-prompt edits in scope; include
|
|
432
|
+
validation, strict `ready`/`verify`, and archive-readiness or archive-merge
|
|
433
|
+
checks when relevant
|
|
434
|
+
|
|
435
|
+
7. **Generate `questions.yaml`** — run one direct CLI invocation for the full
|
|
436
|
+
artifact. Restating an id overwrites just that entry:
|
|
437
|
+
```bash
|
|
438
|
+
strict-spec-cli generate <change-name> questions --open <question-id> --question "..." --context "..." --resolved <question-id> --question "..." --context "..." --answer "..."
|
|
439
|
+
```
|
|
440
|
+
Record open questions as structured entries under `open` using fields such
|
|
441
|
+
as `id`, `question`, and `context`; the script writes the status. Include
|
|
442
|
+
impact analysis and recommendation/options in `--context`, not as separate
|
|
443
|
+
CLI flags. If everything is clear, leave `open: []`.
|
|
444
|
+
|
|
445
|
+
7b. **Author the scene before the requirements** — carrying the four answers
|
|
446
|
+
collected under Scene-First Requirement Routing into the change's delta
|
|
447
|
+
scene, after `scene-status` has been checked for a scene describing it:
|
|
448
|
+
```bash
|
|
449
|
+
strict-spec-cli generate <change-name> delta-scene --target-scene <scene-id> --title "..." --area <area> --actor <name> --role "..." --precondition "..." --operation ADDED --step <step-id> --action "..." --covered-by <spec-id>:<requirement-id> --exception-flow <flow-id> --trigger "..." --exception-step <flow-id>:<step-id> --action "..." --no-coverage-reason "..."
|
|
450
|
+
```
|
|
451
|
+
A target no scene index records is a new scene, additionally requiring
|
|
452
|
+
`--title`, `--area`, `--actor` with `--role`, and `--precondition`. A step
|
|
453
|
+
may name covering requirements across several spec areas, and requirements
|
|
454
|
+
this change adds are referenced by the ids step 8 will create. Skip this step
|
|
455
|
+
for a purely technical change.
|
|
456
|
+
|
|
457
|
+
8. **Generate strict YAML delta specs only when specs change** — run this step
|
|
458
|
+
only when the change has observable spec impact. Use one direct CLI
|
|
459
|
+
invocation per target spec and include all requirement operations needed for
|
|
460
|
+
that target in the same command:
|
|
461
|
+
```bash
|
|
462
|
+
strict-spec-cli generate <change-name> delta-spec --target-spec <spec-id> --operation ADDED --requirement <requirement-id> --strength MUST --statement "..." --scenario <scenario-id> --given "..." --when "..." --then "..." --operation MODIFIED --requirement <requirement-id> --strength MUST --statement "..."
|
|
463
|
+
```
|
|
464
|
+
One requirement can include multiple scenario groups by repeating
|
|
465
|
+
`--scenario`. A later compatible call for the same operation, requirement id,
|
|
466
|
+
strength, and statement appends new scenario ids and remains idempotent for
|
|
467
|
+
equivalent scenarios. Scenarios append on their own, so nothing needs rebuilding or hand-editing to add one. Drop a single scenario with `--remove-scenario <requirement-id>:<scenario-id>` and a whole requirement with `--remove-requirement <id>`.
|
|
468
|
+
The generated files under `.strict-spec-driven/changes/<name>/specs/` should
|
|
469
|
+
mirror the target main spec paths.
|
|
470
|
+
- use strict YAML delta artifacts with `target_spec` and `operations`
|
|
471
|
+
- populate `operations.ADDED`, `operations.MODIFIED`, and `operations.REMOVED`
|
|
472
|
+
only as needed
|
|
473
|
+
- added and replacement requirements use structured fields such as `id`,
|
|
474
|
+
`strength`, `statement`, `scenarios`, and ordered `steps`
|
|
475
|
+
- if the change has no observable spec impact, leave the `specs/` directory
|
|
476
|
+
empty rather than inventing a prose-only file
|
|
477
|
+
|
|
478
|
+
8b. **Generate strict YAML delta tech (only when the change alters a standard)** —
|
|
479
|
+
if step 2 identified that this change must add, modify, or retire a technical
|
|
480
|
+
standard, generate delta tech artifacts under
|
|
481
|
+
`.strict-spec-driven/changes/<change-name>/tech/` with one direct CLI
|
|
482
|
+
invocation per target standard:
|
|
483
|
+
```bash
|
|
484
|
+
strict-spec-cli generate <change-name> delta-tech --target-standard <standard-id> --operation ADDED --rule <rule-id> --strength MUST --statement "..." --rationale "..." --method review --operation REMOVED --rule <rule-id> --reason "..."
|
|
485
|
+
```
|
|
486
|
+
`ADDED`/`MODIFIED` rules require `--strength`, `--statement`, `--rationale`,
|
|
487
|
+
and `--method` (one of lint, ci, test, review, manual), with optional
|
|
488
|
+
`--detail`, `--example-good`, `--example-bad`, and `--exception`; `REMOVED`
|
|
489
|
+
rules take only `--reason`. To introduce a brand new standard, pass
|
|
490
|
+
`--target-standard <new-id> --title "..." --category <category>`; archive
|
|
491
|
+
creates the standard file and merges the rules. Run
|
|
492
|
+
`strict-spec-cli schema-show delta-tech` if
|
|
493
|
+
you need the full contract. Leave the `tech/` directory absent when the
|
|
494
|
+
change only complies with existing standards and changes none of them.
|
|
495
|
+
|
|
496
|
+
9. **Run the proposal checkpoint over generated planning artifacts** — before
|
|
497
|
+
validation, perform a semantic self-check of every generated or edited file under
|
|
498
|
+
`.strict-spec-driven/changes/<change-name>/` against the user request, the
|
|
499
|
+
relevant main specs, technical standards, and the existing project constraints.
|
|
500
|
+
Check for decision-ready detail in scope, unchanged behavior, design
|
|
501
|
+
decisions, task coverage, unresolved-question impact, delta spec scenarios,
|
|
502
|
+
and delta tech use when applicable. When no delta specs are appropriate,
|
|
503
|
+
replace delta spec scenario review with a justified absence check for the
|
|
504
|
+
technical-only change. For technical-only changes,
|
|
505
|
+
verify that tasks cover scripts or tooling, validation commands,
|
|
506
|
+
`ready`/`verify`, and archive or archive-merge checks when archive behavior
|
|
507
|
+
is affected. The checkpoint
|
|
508
|
+
should fix safe, in-scope documentation gaps immediately by rerunning the
|
|
509
|
+
supported `generate` commands for script-owned artifacts, including
|
|
510
|
+
`generate <change-name> tasks` for task-list structure. Do not expand scope
|
|
511
|
+
or answer unresolved human questions during this checkpoint; record ambiguity in
|
|
512
|
+
`questions.yaml`.
|
|
513
|
+
|
|
514
|
+
10. **Validate proposal readiness and artifact structure** — run:
|
|
515
|
+
```bash
|
|
516
|
+
strict-spec-cli ready <change-name>
|
|
517
|
+
```
|
|
518
|
+
Use this as the deterministic proposal-handoff check. It reports missing
|
|
519
|
+
planning artifacts, open questions, delta-spec gaps, and schema issues
|
|
520
|
+
without deciding product scope. Then run:
|
|
521
|
+
```bash
|
|
522
|
+
strict-spec-cli verify <change-name>
|
|
523
|
+
```
|
|
524
|
+
Use the command as a strict YAML schema and artifact-shape sanity check. At
|
|
525
|
+
proposal time, pending-task diagnostics are expected because implementation
|
|
526
|
+
has not started yet. Repair schema or structure issues before handing the
|
|
527
|
+
proposal off. Do not stop for human question resolution during
|
|
528
|
+
`strict-spec-propose`; leave open questions in `questions.yaml`.
|
|
529
|
+
|
|
530
|
+
11. **Hand off** — summarize the scope, key decisions, proposal checkpoint
|
|
531
|
+
refinements made, task count, unchanged behavior, and any open questions. Explicitly
|
|
532
|
+
recommend `/strict-spec-auto` as the primary next step. If `questions.yaml`
|
|
533
|
+
still has open entries, make clear that `/strict-spec-auto` or
|
|
534
|
+
`/strict-spec-apply` must surface and resolve them before coding starts.
|
|
535
|
+
|
|
536
|
+
## Rules
|
|
537
|
+
|
|
538
|
+
- Do not implement anything during proposal
|
|
539
|
+
- Ask the scene questions in every proposal, author the scene before the delta
|
|
540
|
+
spec whenever the change touches user-observable behavior, and never invent an
|
|
541
|
+
actor flow to fill one
|
|
542
|
+
- Do not pause for user confirmation or question resolution during proposal
|
|
543
|
+
- Keep all change artifacts in strict YAML structures
|
|
544
|
+
- Document ambiguity in `questions.yaml` instead of guessing
|
|
545
|
+
- Do not auto-invoke `/strict-spec-auto` during strict-spec-propose; hand off
|
|
546
|
+
after proposal validation instead
|
|
547
|
+
- Treat applicable technical standards under `.strict-spec-driven/tech/` as
|
|
548
|
+
binding: design within MUST rules, follow SHOULD rules by default, and record
|
|
549
|
+
any deviation or conflict as a decision or open question
|
|
550
|
+
- When the change must alter a standard, carry that change as a delta tech
|
|
551
|
+
artifact under the change's `tech/` directory so it merges through archive;
|
|
552
|
+
never edit live standards under `.strict-spec-driven/tech/` directly during a
|
|
553
|
+
change
|