dsh-plugin-strict-spec 0.0.0-stage → 0.5.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.
Files changed (33) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +236 -2
  3. package/README.zh.md +191 -0
  4. package/cordis.patch.yml +5 -0
  5. package/dist/cli/strict-spec-cli.js +38892 -0
  6. package/dist/client.js +50 -0
  7. package/dist/host.js +154 -0
  8. package/dist/skills/strict-roadmap-plan/SKILL.md +176 -0
  9. package/dist/skills/strict-roadmap-recommend/SKILL.md +321 -0
  10. package/dist/skills/strict-roadmap-reorder/SKILL.md +194 -0
  11. package/dist/skills/strict-roadmap-review/SKILL.md +180 -0
  12. package/dist/skills/strict-roadmap-transition/SKILL.md +323 -0
  13. package/dist/skills/strict-scene-edit/SKILL.md +156 -0
  14. package/dist/skills/strict-spec-apply/SKILL.md +212 -0
  15. package/dist/skills/strict-spec-architecture/SKILL.md +143 -0
  16. package/dist/skills/strict-spec-archive/SKILL.md +165 -0
  17. package/dist/skills/strict-spec-auto/SKILL.md +334 -0
  18. package/dist/skills/strict-spec-brainstorm/SKILL.md +228 -0
  19. package/dist/skills/strict-spec-bugfix/SKILL.md +285 -0
  20. package/dist/skills/strict-spec-design/SKILL.md +168 -0
  21. package/dist/skills/strict-spec-design-sync/SKILL.md +165 -0
  22. package/dist/skills/strict-spec-init/SKILL.md +123 -0
  23. package/dist/skills/strict-spec-maintenance/SKILL.md +130 -0
  24. package/dist/skills/strict-spec-modify/SKILL.md +148 -0
  25. package/dist/skills/strict-spec-propose/SKILL.md +553 -0
  26. package/dist/skills/strict-spec-review/SKILL.md +315 -0
  27. package/dist/skills/strict-spec-ship/SKILL.md +94 -0
  28. package/dist/skills/strict-spec-spec-edit/SKILL.md +117 -0
  29. package/dist/skills/strict-spec-sync-specs/SKILL.md +128 -0
  30. package/dist/skills/strict-spec-verify/SKILL.md +79 -0
  31. package/dist/skills/strict-tech-edit/SKILL.md +161 -0
  32. package/dist/skills/strict-tech-sync/SKILL.md +202 -0
  33. package/package.json +109 -4
@@ -0,0 +1,323 @@
1
+ ---
2
+ name: strict-roadmap-transition
3
+ description: Perform one strict roadmap state transition — pause, resume, defer, refine, move, reopen, archive, or sync — through its owning strict CLI command, selected by an explicit operation named in the request.
4
+ metadata:
5
+ skill_id: strict_roadmap_transition
6
+ author: strict-spec-driven
7
+ type: agent_skill
8
+ version: 1.0.0
9
+ ---
10
+
11
+ You are helping the user move strict roadmap state from one condition to
12
+ another. Every transition this skill performs is one CLI command against
13
+ `.strict-spec-driven/roadmap/`. The skill's job is to pick the right one, check
14
+ the preconditions that command does not check for you, run it once, and report
15
+ what moved.
16
+
17
+ ## This Skill's Commands
18
+
19
+ If you cannot remember the exact command used by this skill, look it up here
20
+ before running anything. Do not guess.
21
+
22
+ ```yaml
23
+ check-workflow-state: strict-spec-cli check-workflow-state
24
+ roadmap-status: strict-spec-cli roadmap-status
25
+ roadmap-overview: strict-spec-cli roadmap-overview
26
+ roadmap-recommend: strict-spec-cli roadmap-recommend [--details] [--milestone <milestone-id>]
27
+ roadmap-pause: strict-spec-cli roadmap-pause <milestone-id> [--reason "..."]
28
+ roadmap-resume: strict-spec-cli roadmap-resume <milestone-id> [--reason "..."]
29
+ roadmap-defer: strict-spec-cli roadmap-defer <milestone-id> [--reason "..."]
30
+ roadmap-refine: strict-spec-cli roadmap-refine <milestone-id> [--reason "..."]
31
+ roadmap-move-planned-change: strict-spec-cli roadmap-move-planned-change <planned-change-id> --milestone <milestone-id> [--allow-complete]
32
+ roadmap-reopen: strict-spec-cli roadmap-reopen <milestone-id> [--reason "..."]
33
+ roadmap-archive: strict-spec-cli roadmap-archive [milestone-id]
34
+ roadmap-sync: strict-spec-cli roadmap-sync
35
+ roadmap-sync-materialize: strict-spec-cli roadmap-sync --materialize-planned-changes
36
+ roadmap-sync-fix-names: strict-spec-cli roadmap-sync --fix-names
37
+ roadmap-generate-planned-change: strict-spec-cli roadmap-generate planned-change --milestone <milestone-id> --id <planned-change-id> --summary "..." --details "..."
38
+ ```
39
+
40
+ ## Operations
41
+
42
+ The request names exactly one operation. Each maps one to one onto its owning
43
+ CLI command; there is no operation this skill performs by combining two.
44
+
45
+ | operation | target | owning command | effect |
46
+ | --- | --- | --- | --- |
47
+ | `pause` | milestone | `roadmap-pause` | hold a milestone out of recommendation and force it `blocked` |
48
+ | `resume` | milestone | `roadmap-resume` | clear a pause so status re-derives from planned-change state |
49
+ | `defer` | milestone | `roadmap-defer` | declare a milestone planned but not yet elaborated |
50
+ | `refine` | milestone | `roadmap-refine` | clear an awaiting-refinement declaration once its precondition matured |
51
+ | `move` | planned change | `roadmap-move-planned-change` | move one planned change to another milestone and rename it canonically |
52
+ | `reopen` | milestone | `roadmap-reopen` | reopen a completed milestone and seed a follow-up planned change |
53
+ | `archive` | milestone | `roadmap-archive` | relocate completed milestones and their completed planned changes |
54
+ | `sync` | whole roadmap | `roadmap-sync` | reconcile roadmap state against active and archived strict changes |
55
+
56
+ ## Selecting the Operation
57
+
58
+ **The operation must be explicit.** Read it from the request — the operation
59
+ name, the slash-command form, or an unambiguous restatement of exactly one row
60
+ above.
61
+
62
+ When the request names no operation, or its wording fits more than one row,
63
+ stop and ask the user which of the eight is intended before running anything.
64
+ Do not infer the operation from roadmap state, and do not pick the operation
65
+ that seems most useful. Naming the wrong row is not a recoverable mistake:
66
+ `pause` and `resume` undo each other, `defer` and `refine` undo each other, and
67
+ `archive` and `reopen` move milestones in opposite directions.
68
+
69
+ Two neighbouring requests are not this skill's work at all:
70
+
71
+ - authoring or elaborating milestone and planned-change content is
72
+ `/strict-roadmap-plan` and `/strict-roadmap-review`
73
+ - choosing and scaffolding the next change is `/strict-roadmap-recommend`
74
+ - changing a milestone's position in roadmap order is `/strict-roadmap-reorder`
75
+
76
+ ## Roadmap Linking Rules
77
+
78
+ - Milestone ownership for standalone work items is defined by
79
+ `planned_change.milestone`.
80
+ - Do not expect milestone files to list standalone planned-change file paths.
81
+ - Use `roadmap-status` output to locate planned-change source files; each
82
+ `plannedChanges[]` entry reports its `path`.
83
+ - Treat filenames as helpful conventions only. `planned_change.id` and
84
+ `planned_change.milestone` are the source of truth.
85
+ - Use `roadmap-status` or `roadmap-overview` order, never id-prefix order, as
86
+ the sequencing source.
87
+
88
+ ## Preconditions Every Operation Shares
89
+
90
+ - **Archived milestones and archived planned changes are frozen history.** No
91
+ operation here may pause, resume, defer, refine, move, reopen, or
92
+ re-archive them. If the user names an archived target, report that and stop
93
+ rather than reviving it.
94
+ - **Completed planned changes are immutable.** Follow-up work is always a new
95
+ standalone planned-change artifact, never an edit to one that shipped.
96
+ - **Filenames are computed, never chosen.** A standalone planned-change file's
97
+ basename must be the canonical `<milestone-id>-<planned-change-id>.yaml` form
98
+ (the prefix is not duplicated when the id already starts with the milestone
99
+ id). `roadmap-generate planned-change` and `roadmap-move-planned-change`
100
+ compute it; `roadmap-sync --fix-names` repairs it. Never pick or rename a
101
+ planned-change filename by hand — a mismatched basename is a blocking
102
+ validation diagnostic.
103
+ - **A roadmap with unresolved diagnostics blocks the transition.** Run
104
+ `roadmap-status` first and resolve blocking diagnostics before the mutation;
105
+ most of these commands refuse to run against an invalid roadmap.
106
+ - **One command, once.** Translate the request into a single owning-command
107
+ invocation. If it cannot be expressed as one, that is a signal the operation
108
+ was misidentified, not an invitation to chain commands.
109
+
110
+ ## Operation Semantics
111
+
112
+ ### pause and resume — a reversible inverse pair
113
+
114
+ - Pause records a sticky top-level `paused` mapping (`status: true`, optional
115
+ `reason`, deterministic `paused_on` date). While paused, the milestone's
116
+ effective status is forced to `blocked`, surviving `roadmap-sync` canonical
117
+ rewrite, and `roadmap-recommend` skips every planned change it owns with a
118
+ `milestone-paused` skip reason.
119
+ - Pause is allowed on any non-archived milestone regardless of declared status.
120
+ Pausing a complete milestone forces it back to blocked and prevents
121
+ `archive` from relocating it until the pause is cleared.
122
+ - Resume deletes the `paused` field and lets status re-derive from
123
+ planned-change state. Resuming a milestone that carries no pause exits
124
+ non-zero and changes nothing.
125
+ - Neither ever modifies a planned-change file. Pause is meaningful only when
126
+ there is real work to defer; for a complete milestone with no pending work,
127
+ suggest `archive` instead. Pair every pause with a clear resume criterion in
128
+ the `--reason`.
129
+
130
+ ### defer and refine — a reversible inverse pair
131
+
132
+ - Deferring records a sticky `awaiting_refinement` mapping (`status: true`,
133
+ optional `reason`, deterministic `deferred_on` date) that survives
134
+ `roadmap-sync` canonical rewrite.
135
+ - **Deferral is not a pause.** It does not force `blocked`; the milestone keeps
136
+ the status derived from its planned-change state, because work whose detail
137
+ is deferred is not work that is blocked.
138
+ - `roadmap-recommend` follows strict roadmap order, so when the
139
+ earliest-ordered incomplete milestone is deferred the command returns
140
+ `status: refine-milestone` and does not fall through to later milestones'
141
+ work. Say that plainly to the user: a long-lived deferral blocks downstream
142
+ work, and `pause` is the supported release valve.
143
+ - Deferral is rejected for a milestone whose derived status is `complete`, and
144
+ it never relaxes the milestone schema. A deferred milestone still needs
145
+ `goal`, `scope`, `done_criteria`, and at least one intake question. Record the
146
+ unmatured precondition as an intake question and as the `--reason`; never
147
+ invent content to satisfy the schema.
148
+ - Refine records the operator's judgement that the precondition matured and
149
+ clears the declaration. It elaborates nothing: the elaboration itself is
150
+ ordinary in-place editing through `roadmap-generate`. Ask the user directly
151
+ whether the recorded precondition is now true — repository evidence cannot
152
+ answer that, and a milestone that merely gained content has not matured.
153
+ - The milestone is one continuous artifact. Never create a successor milestone
154
+ or split it during refinement.
155
+
156
+ ### move — check work state, then dependency order
157
+
158
+ - A move rewrites the declared `planned_change.milestone` and renames the file
159
+ to its canonical basename in one command, because both must agree.
160
+ - The target must be an existing active milestone. If the user names an
161
+ archived or absent milestone, report that rather than creating one.
162
+ - A planned change whose strict change is already archived is completed work.
163
+ Moving it can flip the source milestone from complete back to proposed and
164
+ makes the target report work it never contained. Confirm the user really
165
+ wants that before adding `--allow-complete`.
166
+ - Inspect `depends_on` edges touching the planned change. If the move would
167
+ leave an earlier milestone depending on work that now sits in a later
168
+ milestone, report that dependency-order concern and stop for an explicit
169
+ human answer.
170
+ - The command never edits summary, details, status, or `depends_on`, never
171
+ touches another planned change, and never writes under
172
+ `.strict-spec-driven/changes/`. Relay its non-blocking warnings — a stale
173
+ `proposal.yaml` roadmap linkage is refreshed with the reported
174
+ `strict-spec-cli generate <change-name> proposal` command, by the operator,
175
+ not by this skill.
176
+ - Reordering milestones themselves is `/strict-roadmap-reorder`, not this one.
177
+
178
+ ### reopen — only a complete milestone, and history stays frozen
179
+
180
+ - Reopen appends a dated note, seeds exactly one pending follow-up planned
181
+ change, and rewrites the milestone to the status derived from planned-change
182
+ state — `proposed` while only the seeded follow-up is pending. Milestone
183
+ status is never held sticky.
184
+ - If the milestone is `active`, `blocked`, `proposed`, or `planned`, there is
185
+ nothing to reopen; add the follow-up work directly through
186
+ `/strict-roadmap-plan` instead.
187
+ - Confirm `frozenPlannedChanges` lists every completed planned change that must
188
+ remain untouched, and refine the seeded follow-up at
189
+ `seededFollowUp.path` with `roadmap-generate planned-change`. Additional gaps
190
+ become further new standalone planned-change artifacts owned by the same
191
+ milestone — never folded back into a completed one.
192
+ - Run the `sync` operation afterwards so the reopened milestone and its new
193
+ planned changes participate in the canonical index.
194
+
195
+ ### archive — completed milestones only, all of them by default
196
+
197
+ - With no `milestone-id`, `roadmap-archive` must default to all unarchived
198
+ milestones, and it archives only milestones whose derived status is complete.
199
+ - It moves each archived milestone and its completed standalone planned-change
200
+ files into `.strict-spec-driven/roadmap/archive/`, then rewrites the active
201
+ roadmap index.
202
+ - Incomplete milestones and incomplete planned changes stay active and are
203
+ reported as skipped. Read `skippedMilestones` and relay why each was skipped
204
+ rather than reporting a clean archive.
205
+ - A paused complete milestone is not archivable until the pause is cleared with
206
+ the `resume` operation.
207
+
208
+ ### sync — reconcile, never invent
209
+
210
+ - `roadmap-sync` regenerates canonical index state and reconciles milestone and
211
+ planned-change completion against active and archived strict changes.
212
+ - When diagnostics report legacy inline milestone `planned_changes`, use
213
+ `roadmap-sync --materialize-planned-changes` to convert them into standalone
214
+ files before reconciliation.
215
+ - When diagnostics report a non-canonical planned-change basename, use
216
+ `roadmap-sync --fix-names`; plain `roadmap-sync` only reports the diagnostic.
217
+ - Do not invent planned changes during a sync. If the roadmap cannot be
218
+ reconciled safely, stop and ask the user.
219
+
220
+ ## CLI-Only YAML Authoring Protocol
221
+
222
+ Every mutation of repository-owned YAML in this skill goes through the strict
223
+ CLI. This skill writes `roadmap-state`. Before the first mutation run
224
+ `strict-spec-cli yaml-authoring-protocol roadmap-state`: that command reports
225
+ the ordered authoring steps, the owning command for each operation, and the
226
+ bundled schema and example keys with their cache-resolved paths, bound to the
227
+ artifact kind and current where a copy would go stale. Validate the result with
228
+ `strict-spec-cli roadmap-status`.
229
+
230
+ **Stop rather than edit YAML directly.** When a required command, argument, or
231
+ artifact kind is unavailable, stop and report the missing capability. Editing
232
+ the YAML directly, writing a raw payload, or scripting around the CLI is never
233
+ an available fallback, and an unavailable command is a reason to stop rather
234
+ than a reason to improvise.
235
+
236
+ ## Preferred Human Language
237
+
238
+ Comply with `preferred_human_language` from `.strict-spec-driven/config.yaml` —
239
+ the user's common human language, not a programming language — for all
240
+ user-facing and generated operator-facing text, unless that file is absent or
241
+ the active user message asks otherwise.
242
+
243
+ ## Steps
244
+
245
+ Before any other step, run `strict-spec-cli check-workflow-state`. If `.strict-spec-driven/` is
246
+ missing, stop immediately and tell the user to run `/strict-spec-init`. Do not
247
+ run `init` from this skill.
248
+
249
+ 1. **Resolve the operation** — identify which one of the eight rows in the
250
+ Operations table the request names. If the request names none, or fits more
251
+ than one, stop and ask the user which is intended. Do not proceed on a guess.
252
+
253
+ 2. **Load targeted roadmap context** — read `.strict-spec-driven/config.yaml`,
254
+ `.strict-spec-driven/roadmap/INDEX.yaml`, the target milestone YAML file
255
+ under `.strict-spec-driven/roadmap/milestones/`, and the standalone
256
+ planned-change files the operation touches. Read only what the resolved
257
+ operation needs.
258
+
259
+ 3. **Inspect deterministic state** — run:
260
+ ```bash
261
+ strict-spec-cli roadmap-status
262
+ ```
263
+ If human-readable context helps, also run `roadmap-overview`. Use the
264
+ reported milestone order, ids, `declaredStatus`, `derivedStatus`, planned
265
+ change `state` and `path` values, and diagnostics as the facts for this
266
+ transition. Resolve blocking diagnostics before mutating.
267
+
268
+ 4. **Check the operation's own preconditions** — apply the shared preconditions
269
+ and the Operation Semantics section for the resolved operation: the
270
+ archived-artifact immutability rule for every operation, the dependency-order
271
+ confirmation for `move`, the completed-work confirmation before
272
+ `--allow-complete`, the complete-status requirement for `reopen` and
273
+ `archive`, the not-complete requirement for `defer`, the
274
+ declaration-present requirement for `resume` and `refine`, and the human
275
+ confirmation that a deferred precondition has matured before `refine`. Stop
276
+ for an explicit human answer when a precondition is unmet or ambiguous.
277
+
278
+ 5. **Capture the reason** — for `pause`, `resume`, `defer`, `refine`, and
279
+ `reopen`, collect a short concrete reason from the user if one was not
280
+ supplied. A good reason names an observable condition, not a feeling.
281
+
282
+ 6. **Run the owning command once** — run the single command the Operations
283
+ table names for the resolved operation. Inspect the structured result rather
284
+ than assuming success: confirm it is valid, that it reports the expected
285
+ target, and that the changed paths are only the milestone or planned-change
286
+ artifact plus the roadmap index.
287
+
288
+ 7. **Confirm the effect on recommendation when it applies** — for `pause`,
289
+ `resume`, `defer`, and `refine`, run:
290
+ ```bash
291
+ strict-spec-cli roadmap-recommend --details
292
+ ```
293
+ Verify the expected skip reason appeared or cleared: `milestone-paused` for
294
+ pause and resume, `milestone-awaiting-refinement` and the `refineAction` for
295
+ defer and refine.
296
+
297
+ 8. **Report the result** — summarize the operation, the target id, previous and
298
+ new status, the structured field written or cleared, any warnings the command
299
+ relayed, any milestones or planned changes it deliberately left untouched,
300
+ and the natural next step — the inverse operation for `pause` and `defer`,
301
+ `/strict-roadmap-recommend` once work is recommendable again, and
302
+ `roadmap-generate planned-change` to refine a seeded follow-up after `reopen`.
303
+
304
+ ## Rules
305
+
306
+ - Perform exactly one operation per invocation, through its one owning command
307
+ - Require an explicit operation; stop and ask rather than inferring one from
308
+ roadmap state or from what seems most useful
309
+ - Keep every artifact this skill touches rooted in `.strict-spec-driven/roadmap/`
310
+ - Archived milestones and archived planned changes are frozen history; never
311
+ mutate them, and never rewrite a completed planned change
312
+ - Never hand-edit a milestone or planned-change file to add, clear, or change a
313
+ `paused`, `awaiting_refinement`, `milestone`, or status field — the
314
+ owning command exists so the canonical write and index sync stay deterministic
315
+ - Never pick or rename a planned-change filename yourself; the CLI computes the
316
+ canonical name and `roadmap-sync --fix-names` repairs it
317
+ - Never write under `.strict-spec-driven/changes/` from this skill; relay the
318
+ reported proposal refresh command instead
319
+ - Stop for an explicit human answer when a move appears to violate dependency
320
+ order, when a transition moves completed work, or when it would resolve a
321
+ deferral on the user's behalf
322
+ - Do not invent planned changes, milestone content, or planned-change state to
323
+ satisfy a schema; record what is unknown as an intake question instead
@@ -0,0 +1,156 @@
1
+ ---
2
+ name: strict-scene-edit
3
+ description: Create or modify individual strict YAML scene files through the CLI, describing who acts, what must already be true, the main flow, and the exception flows before requirements are recalled.
4
+ metadata:
5
+ skill_id: strict_scene_edit
6
+ author: strict-spec-driven
7
+ type: agent_skill
8
+ version: 1.0.0
9
+ ---
10
+
11
+ You are helping the user create or modify strict YAML scenes under
12
+ `.strict-spec-driven/scenes/` through the artifact-aware CLI, without going
13
+ through the strict change workflow.
14
+
15
+ A scene is one end-to-end situation a real actor goes through. It records the
16
+ actors, the preconditions, the ordered main flow, and the exception flows that
17
+ branch off it, and every flow step declares either the requirements that cover
18
+ it or an explicit reason it is waived. The scene is independent of any single
19
+ spec: one step may name covering requirements belonging to several specs.
20
+
21
+ ## This Skill's Commands
22
+
23
+ If you cannot remember the exact command used by this skill, look it up here
24
+ before running anything. Do not guess.
25
+
26
+ ```yaml
27
+ check-workflow-state: strict-spec-cli check-workflow-state
28
+ scene-edit: strict-spec-cli scene-edit <scene-id> [named fields and removals | --delete]
29
+ scene-status: strict-spec-cli scene-status [--area <area>] [--scene <scene-id>]
30
+ ```
31
+
32
+ ## CLI-Only YAML Authoring Protocol
33
+
34
+ Every mutation of repository-owned YAML in this skill goes through the strict
35
+ CLI. This skill writes `scene-state`. Before the first mutation run
36
+ `strict-spec-cli yaml-authoring-protocol scene-state`: that command reports the
37
+ ordered authoring steps, the owning command for each operation, and the bundled
38
+ schema and example keys with their cache-resolved paths, bound to the artifact
39
+ kind and current where a copy would go stale. Validate the result with
40
+ `strict-spec-cli scene-status`.
41
+
42
+ **Stop rather than edit YAML directly.** When a required command, argument, or
43
+ artifact kind is unavailable, stop and report the missing capability. Editing
44
+ the YAML directly, writing a raw payload, or scripting around the CLI is never
45
+ an available fallback, and an unavailable command is a reason to stop rather
46
+ than a reason to improvise.
47
+
48
+ ## Preferred Human Language
49
+
50
+ Comply with `preferred_human_language` from `.strict-spec-driven/config.yaml` —
51
+ the user's common human language, not a programming language — for all
52
+ user-facing and generated operator-facing text, unless that file is absent or
53
+ the active user message asks otherwise.
54
+
55
+ ## Steps
56
+
57
+ Before any other step, run `strict-spec-cli check-workflow-state`. If `.strict-spec-driven/` is
58
+ missing, stop immediately and tell the user to run `/strict-spec-init`. Do not
59
+ run `init` from this skill.
60
+
61
+ 1. **Read strict scene context first** — before making any changes, read:
62
+ - `.strict-spec-driven/config.yaml`
63
+ - `.strict-spec-driven/scenes/INDEX.yaml`, when the project records scenes
64
+ - `.strict-spec-driven/specs/INDEX.yaml`, because every covering reference
65
+ names a recorded spec id and requirement id
66
+ - run `strict-spec-cli scene-status` to see the recorded scenes and each
67
+ step's coverage state, narrowing with `--area` or `--scene` when the
68
+ project records many scenes
69
+
70
+ 2. **Understand the request** — identify whether the user wants to:
71
+ - author a new scene for a situation no recorded scene describes
72
+ - add or correct actors, preconditions, main-flow steps, or exception flows
73
+ - record, correct, or waive the coverage of one or more steps
74
+ - remove named entries, or retire the whole scene
75
+
76
+ 3. **Interrogate the situation before writing it down** — a scene exists to stop
77
+ an author skipping the questions a requirement set silently assumes. Ask the
78
+ user, and do not infer the answers from the code:
79
+ - who acts, and what each actor does in this situation
80
+ - what must already be true before the main flow begins
81
+ - what happens, step by ordered step, when nothing goes wrong
82
+ - what can go wrong, what triggers each exception flow, and what happens then
83
+ Record an answer you could not get as an open question for the user rather
84
+ than filling the field with a plausible guess.
85
+
86
+ 4. **Choose the target** — use the scene index to decide where the scene belongs:
87
+ - if a recorded scene already describes this situation, edit that scene
88
+ - otherwise choose the kebab-case `area` key that groups it, which is also the
89
+ subdirectory the scene is stored in
90
+ - reuse a recorded area unless the situation clearly belongs to a new one
91
+
92
+ 5. **Resolve coverage for every step** — each step names either the requirements
93
+ that cover it or an explicit reason it is deliberately covered by none:
94
+ - read `.strict-spec-driven/specs/INDEX.yaml` and the spec files it names to
95
+ find the covering spec id and requirement id
96
+ - a step may name covering requirements in more than one spec area
97
+ - use a no-coverage reason only when the step is deliberately uncovered, and
98
+ say why; it is a recorded decision, not a way to silence a gap
99
+ - a requirement that ought to exist but does not is a finding to report, not
100
+ a reason to invent a covering reference
101
+
102
+ 6. **Present and confirm** — show the user:
103
+ - which scene will be created or changed, and under which area
104
+ - the actors, preconditions, main-flow steps, and exception flows being set
105
+ - the coverage or waiver recorded for each step
106
+ - whether `.strict-spec-driven/scenes/INDEX.yaml` will gain or lose an entry
107
+
108
+ Wait for explicit confirmation before writing anything.
109
+
110
+ 7. **Apply the confirmed edits through the CLI** — after confirmation, issue one
111
+ or more `scene-edit` invocations with named semantic arguments:
112
+ - create a scene with `scene-edit <scene-id> --title <text> --area <area>
113
+ --actor <name> --role <text> --precondition <text> --step <id>
114
+ --action <text> --covered-by <spec-id>:<requirement-id>
115
+ --exception-flow <flow-id> --trigger <text>
116
+ --exception-step <flow-id>:<step-id> --action <text>`
117
+ - update one entry by restating its id or name and only the fields that
118
+ changed; unnamed content is preserved
119
+ - declare an exception flow before adding a step to it
120
+ - waive one step with `--no-coverage-reason <text>`, which clears its
121
+ recorded covering references, and record coverage with `--covered-by`,
122
+ which clears a recorded waiver
123
+ - remove keyed content with `--remove-actor`, `--remove-precondition`,
124
+ `--remove-exception-flow`, `--remove-step`, or `--remove-covered-by`
125
+ - set `--status draft|active|obsolete` when the lifecycle state changes
126
+ - use an isolated `scene-edit <scene-id> --delete` only when the confirmed
127
+ change retires the whole scene
128
+ Never edit the scene YAML or the scene index text. The command validates the
129
+ complete candidate and reconciles the index in the same transaction.
130
+
131
+ 8. **Validate the result** — after editing, run `strict-spec-cli scene-status`
132
+ and confirm:
133
+ - the command result reports both the scene artifact and the reconciled index
134
+ - every step reports as covered or as a deliberate waiver
135
+ - no step reports an unresolved covering reference
136
+
137
+ 9. **Summarize** — tell the user which scene changed, what was added, modified,
138
+ removed, or waived, and which steps still report a coverage gap.
139
+
140
+ ## Rules
141
+
142
+ - Ask the interrogation questions before authoring; a scene filled in from the
143
+ code reproduces the blind spot it exists to expose
144
+ - Always read the recorded scenes and the spec index before authoring through
145
+ `scene-edit`
146
+ - Present the exact changes and wait for confirmation before writing
147
+ - Every step carries covering requirements or an explicit reason it has none
148
+ - Never invent a covering reference to silence a coverage gap; report the
149
+ missing requirement instead
150
+ - Describe observable situations, not implementation details
151
+ - Do not implement product code
152
+ - Do not create or interact with `.strict-spec-driven/changes/`; a scene change
153
+ that belongs to an active strict change is authored as a delta scene by the
154
+ change workflow, not here
155
+ - Never hand-edit scene or scene-index YAML; express every mutation through
156
+ `strict-spec-cli scene-edit` with named arguments