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.
- 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,212 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: strict-spec-apply
|
|
3
|
+
description: Implement the tasks in a strict YAML change. Read the current change artifacts, work through tasks in order, and use the strict apply command only to mark the next pending task complete.
|
|
4
|
+
metadata:
|
|
5
|
+
skill_id: strict_spec_apply
|
|
6
|
+
author: strict-spec-driven
|
|
7
|
+
type: agent_skill
|
|
8
|
+
version: 1.0.0
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
You are helping the user implement a strict YAML change.
|
|
12
|
+
|
|
13
|
+
## This Skill's Commands
|
|
14
|
+
|
|
15
|
+
If you cannot remember the exact command used by this skill, look it up here
|
|
16
|
+
before running anything. Do not guess.
|
|
17
|
+
|
|
18
|
+
```yaml
|
|
19
|
+
check-workflow-state: strict-spec-cli check-workflow-state
|
|
20
|
+
tech-status: strict-spec-cli tech-status
|
|
21
|
+
lesson-status: strict-spec-cli lesson-status [--category <category>]
|
|
22
|
+
modify: strict-spec-cli modify [change-name|archive-dir]
|
|
23
|
+
generate: strict-spec-cli generate <change-name> tasks --<named-args>
|
|
24
|
+
apply: strict-spec-cli apply <change-name>
|
|
25
|
+
scene-status: strict-spec-cli scene-status [--area <area>] [--scene <scene-id>]
|
|
26
|
+
verify: strict-spec-cli verify <change-name>
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## YAML Writing Rules
|
|
30
|
+
|
|
31
|
+
- Preserve valid strict YAML structures when updating `tasks.yaml`,
|
|
32
|
+
`questions.yaml`, and delta specs. Do not replace structured fields with
|
|
33
|
+
Markdown prose.
|
|
34
|
+
- If artifact fields are unclear, use `strict-spec-cli schema-show <schema-name>`;
|
|
35
|
+
installed skills do not carry a `templates` directory.
|
|
36
|
+
- 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.
|
|
37
|
+
- If a valid artifact example would clarify the shape, use
|
|
38
|
+
`strict-spec-cli sample-show <sample-name>`; installed skills do not rely on a
|
|
39
|
+
local `examples` directory.
|
|
40
|
+
- Use block scalars only for free-text content. Prefer `>-` for wrapped prose
|
|
41
|
+
such as longer `question`, `context`, `answer`, and spec `statement` values.
|
|
42
|
+
Use `|` only when literal line breaks must be preserved as part of the value.
|
|
43
|
+
- Quote short strings that may contain YAML-sensitive characters or ambiguous
|
|
44
|
+
scalar values, including `command` strings, URLs, paths, text containing `:`
|
|
45
|
+
or `#`, leading `-`, JSON-like fragments, boolean-like words, and timestamp-
|
|
46
|
+
like values.
|
|
47
|
+
- Keep short structural fields as plain scalars unless quoting is needed for
|
|
48
|
+
correctness. Do not force IDs, enums, schema identifiers, artifact types,
|
|
49
|
+
task references, or similar fields into block scalars.
|
|
50
|
+
- After editing YAML artifacts, self-check indentation, list nesting, quote
|
|
51
|
+
closure, and colon spacing before running the documented strict commands.
|
|
52
|
+
|
|
53
|
+
## CLI-Only YAML Authoring Protocol
|
|
54
|
+
|
|
55
|
+
Every mutation of repository-owned YAML in this skill goes through the strict
|
|
56
|
+
CLI. This skill writes `change-planning-state`. Before the first mutation run
|
|
57
|
+
`strict-spec-cli yaml-authoring-protocol change-planning-state`: that command
|
|
58
|
+
reports the ordered authoring steps, the owning command for each operation, and
|
|
59
|
+
the bundled schema and example keys with their cache-resolved paths, bound to
|
|
60
|
+
the artifact kind and current where a copy would go stale. Validate the result
|
|
61
|
+
with `strict-spec-cli verify <change-name>`.
|
|
62
|
+
|
|
63
|
+
**Stop rather than edit YAML directly.** When a required command, argument, or
|
|
64
|
+
artifact kind is unavailable, stop and report the missing capability. Editing
|
|
65
|
+
the YAML directly, writing a raw payload, or scripting around the CLI is never
|
|
66
|
+
an available fallback, and an unavailable command is a reason to stop rather
|
|
67
|
+
than a reason to improvise.
|
|
68
|
+
|
|
69
|
+
## Preferred Human Language
|
|
70
|
+
|
|
71
|
+
Comply with `preferred_human_language` from `.strict-spec-driven/config.yaml` —
|
|
72
|
+
the user's common human language, not a programming language — for all
|
|
73
|
+
user-facing and generated operator-facing text, unless that file is absent or
|
|
74
|
+
the active user message asks otherwise.
|
|
75
|
+
|
|
76
|
+
## Steps
|
|
77
|
+
|
|
78
|
+
Before any other step, run `strict-spec-cli check-workflow-state`. If `.strict-spec-driven/` is
|
|
79
|
+
missing, stop immediately and tell the user to run `/strict-spec-init`. Do not
|
|
80
|
+
run `init` from this skill.
|
|
81
|
+
|
|
82
|
+
1. **Select the change** — run `modify` without an argument to list active
|
|
83
|
+
changes. If the change is already specified, use it.
|
|
84
|
+
|
|
85
|
+
2. **Load current strict context** — treat prior chat context as stale unless it
|
|
86
|
+
has been revalidated from the repository. Read:
|
|
87
|
+
- `.strict-spec-driven/changes/<name>/proposal.yaml`
|
|
88
|
+
- `.strict-spec-driven/changes/<name>/design.yaml`
|
|
89
|
+
- `.strict-spec-driven/changes/<name>/tasks.yaml`
|
|
90
|
+
- `.strict-spec-driven/changes/<name>/questions.yaml`
|
|
91
|
+
- every strict YAML delta spec under `changes/<name>/specs/`
|
|
92
|
+
- `.strict-spec-driven/config.yaml`
|
|
93
|
+
- `.strict-spec-driven/specs/INDEX.yaml`
|
|
94
|
+
- every relevant strict YAML main spec
|
|
95
|
+
- the technical standards that govern the files this change will touch: run
|
|
96
|
+
`strict-spec-cli tech-status` and read the
|
|
97
|
+
relevant files under `.strict-spec-driven/tech/`. These are the engineering
|
|
98
|
+
rules the implementation must satisfy.
|
|
99
|
+
- select the lesson category that matches the affected spec or technical area, run
|
|
100
|
+
`strict-spec-cli lesson-status --category <category>`, and read the lessons it ranks first.
|
|
101
|
+
Repeat for another category when the change genuinely spans more than one; use the unfiltered
|
|
102
|
+
command only when repository evidence cannot identify a relevant category.
|
|
103
|
+
Lessons are recorded experience, not binding rules: they carry no MUST or
|
|
104
|
+
SHOULD strength, so treat each one as a warning worth checking against this
|
|
105
|
+
change rather than a constraint to satisfy. Match on `applies_when` — that
|
|
106
|
+
field states the condition under which the lesson is worth recalling. A
|
|
107
|
+
lesson with several occurrences has bitten this project repeatedly and
|
|
108
|
+
deserves weight even though nothing enforces it.
|
|
109
|
+
|
|
110
|
+
3. **Gate on open questions** — inspect `questions.yaml`.
|
|
111
|
+
- if `open` contains entries, do not infer answers or continue
|
|
112
|
+
automatically
|
|
113
|
+
- for each unresolved question, explain the missing decision or information,
|
|
114
|
+
the impact on scope, implementation, testing, or spec behavior, and the
|
|
115
|
+
recommended answer or options with tradeoffs
|
|
116
|
+
- stop and wait for an explicit human reply
|
|
117
|
+
- only continue once every entry is moved to `resolved` with an explicit
|
|
118
|
+
answer and removed from `open`
|
|
119
|
+
|
|
120
|
+
4. **Implement tasks in order** — work through the pending tasks in
|
|
121
|
+
`tasks.yaml.sections` from top to bottom.
|
|
122
|
+
- read relevant code before editing
|
|
123
|
+
- implement the next pending task
|
|
124
|
+
- preserve every item in `proposal.yaml.unchanged_behavior`
|
|
125
|
+
- write code that satisfies the applicable technical standards from step 2:
|
|
126
|
+
never violate a MUST rule, and follow each SHOULD rule unless the change's
|
|
127
|
+
design already records an explicit justified deviation. If a task can only
|
|
128
|
+
be completed by violating a MUST rule, stop and raise it as an open
|
|
129
|
+
question rather than breaking the standard; if the standard itself is wrong
|
|
130
|
+
and must change as part of this change, carry that change as a delta tech
|
|
131
|
+
artifact under `changes/<name>/tech/` (run
|
|
132
|
+
`strict-spec-cli schema-show delta-tech`
|
|
133
|
+
for the contract) so it merges on archive — do not edit the live standard
|
|
134
|
+
under `.strict-spec-driven/tech/` directly.
|
|
135
|
+
|
|
136
|
+
5. **Mark tasks with the strict apply command** — after you finish the next
|
|
137
|
+
pending task, run:
|
|
138
|
+
```bash
|
|
139
|
+
strict-spec-cli apply <change-name>
|
|
140
|
+
```
|
|
141
|
+
and confirm the returned `sectionName` and `taskId` match the task you just
|
|
142
|
+
completed.
|
|
143
|
+
|
|
144
|
+
`apply` is positional, not addressed: it completes whichever task is next in
|
|
145
|
+
list order, so a returned `taskId` that does not match your work means the
|
|
146
|
+
list order and the work order have diverged. Work finished out of list order
|
|
147
|
+
is recorded by addressing the task by id with
|
|
148
|
+
`strict-spec-cli generate <change-name> tasks --implementation --task <id> --status complete`
|
|
149
|
+
rather than by running `apply` again. Read `strict-spec-cli generate --help --json`
|
|
150
|
+
(or `--help`) first. Choose `--implementation`, `--testing`, or `--verification`
|
|
151
|
+
to match the recorded section. Each takes no value and opens one task group;
|
|
152
|
+
following task fields belong to it, and each additional task needs its own
|
|
153
|
+
selector. Existing task text and commands survive this status-only edit.
|
|
154
|
+
When the remaining tasks are simply in
|
|
155
|
+
the wrong sequence, fix the list itself with `--before <task-id>` or
|
|
156
|
+
`--after <task-id>` so later `apply` calls land on the right task.
|
|
157
|
+
|
|
158
|
+
6. **Do not use `apply` as a read-only status command** — the strict apply
|
|
159
|
+
command mutates `tasks.yaml` by marking the first pending task complete. Read
|
|
160
|
+
`tasks.yaml` directly when you need task status without changing it.
|
|
161
|
+
|
|
162
|
+
7. **Handle testing tasks carefully** — for tasks in the `Testing` section, run
|
|
163
|
+
the task's `command` and confirm it succeeds before marking the task
|
|
164
|
+
complete.
|
|
165
|
+
|
|
166
|
+
8. **Update delta specs and delta tech after coding** — re-read the strict YAML
|
|
167
|
+
delta specs and make sure they match what was actually implemented. If the
|
|
168
|
+
change carries delta tech artifacts under `changes/<name>/tech/`, re-read
|
|
169
|
+
them too and confirm the rule operations still match the standard change
|
|
170
|
+
that was actually implemented.
|
|
171
|
+
|
|
172
|
+
8b. **Recheck scene coverage when the change carries delta scenes** — if
|
|
173
|
+
`changes/<name>/scenes/` holds any artifact, re-read those scenes against
|
|
174
|
+
what was built and run `strict-spec-cli scene-status --scene <scene-id>` for
|
|
175
|
+
each one. `verify` blocks on a flow step naming neither a covering
|
|
176
|
+
requirement nor an explicit no-coverage reason, and its diagnostic names the
|
|
177
|
+
runnable command that records the coverage, so treat that diagnostic as the
|
|
178
|
+
remedy rather than rediscovering the rule. A step whose covering requirement
|
|
179
|
+
changed id during implementation is corrected through that command; a step
|
|
180
|
+
that turned out to need a requirement nobody wrote is a finding to raise,
|
|
181
|
+
never a waiver to invent. A change carrying no delta scene has nothing to
|
|
182
|
+
recheck here.
|
|
183
|
+
|
|
184
|
+
9. **Gitignore hygiene** — once all tasks are complete, check for non-source
|
|
185
|
+
artifacts that should not be committed:
|
|
186
|
+
- run `git status --short` to find newly created untracked files
|
|
187
|
+
- identify non-source artifacts such as build output (`dist/`, `build/`,
|
|
188
|
+
`out/`), dependency directories (`node_modules/`, `vendor/`), cache
|
|
189
|
+
directories (`.cache/`, `.tmp/`), log files (`*.log`), and other
|
|
190
|
+
generated files
|
|
191
|
+
- add matching entries to `.gitignore` automatically
|
|
192
|
+
- do not ignore source code, configuration, or files that are part of the
|
|
193
|
+
deliberate project output
|
|
194
|
+
|
|
195
|
+
10. **Finish cleanly** — read `tasks.yaml` again to confirm there are no
|
|
196
|
+
remaining `status: pending` entries, then suggest `strict-spec-verify`.
|
|
197
|
+
|
|
198
|
+
## Rules
|
|
199
|
+
|
|
200
|
+
- Read existing code before modifying it
|
|
201
|
+
- Complete tasks in order unless a clear dependency requires otherwise
|
|
202
|
+
- Mark each task complete immediately after implementing it
|
|
203
|
+
- Never run `apply` just to inspect status
|
|
204
|
+
- Open questions require a problem explanation, impact analysis, recommendation,
|
|
205
|
+
and explicit human answer before continuing; encode the impact and
|
|
206
|
+
recommendation in `questions.yaml.open[*].context`
|
|
207
|
+
- Implemented code must satisfy applicable technical standards under
|
|
208
|
+
`.strict-spec-driven/tech/`: never break a MUST rule, follow SHOULD rules by
|
|
209
|
+
default, and raise a conflict instead of silently violating a standard
|
|
210
|
+
- When a change must alter a standard, do it through a delta tech artifact under
|
|
211
|
+
the change's `tech/` directory, never by editing the live standard during the
|
|
212
|
+
change
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: strict-spec-architecture
|
|
3
|
+
description: Author or refresh the strict YAML architecture artifact from repository evidence, then render the generated ARCHITECTURE.md through the strict architecture CLI.
|
|
4
|
+
metadata:
|
|
5
|
+
skill_id: strict_spec_architecture
|
|
6
|
+
author: strict-spec-driven
|
|
7
|
+
type: agent_skill
|
|
8
|
+
version: 1.0.0
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
You are helping the user author or refresh `.strict-spec-driven/architecture.yaml`
|
|
12
|
+
and render the generated architecture document from it.
|
|
13
|
+
|
|
14
|
+
`ARCHITECTURE.md` is a generated file. It is never hand-edited. Everything a reader
|
|
15
|
+
sees in it comes from strict YAML: the components, data flows, and architecture
|
|
16
|
+
decisions come from the architecture artifact, and the specification-surface and
|
|
17
|
+
technical-standard sections are projected from the spec index, the main specs,
|
|
18
|
+
and `.strict-spec-driven/tech/`. Your job is the architecture artifact; the CLI
|
|
19
|
+
owns rendering, comparison, and validation.
|
|
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
|
+
architecture-status: strict-spec-cli architecture-status
|
|
29
|
+
architecture-edit: strict-spec-cli architecture-edit [named semantic fields or removals]
|
|
30
|
+
architecture-generate: strict-spec-cli architecture-generate
|
|
31
|
+
architecture-check: strict-spec-cli architecture-generate --check
|
|
32
|
+
schema-show: strict-spec-cli schema-show architecture
|
|
33
|
+
sample-show: strict-spec-cli sample-show architecture
|
|
34
|
+
tech-status: strict-spec-cli tech-status
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## CLI-Only YAML Authoring Protocol
|
|
38
|
+
|
|
39
|
+
Every mutation of repository-owned YAML in this skill goes through the strict
|
|
40
|
+
CLI. This skill writes `architecture-state`. Before the first mutation run
|
|
41
|
+
`strict-spec-cli yaml-authoring-protocol architecture-state`: that command
|
|
42
|
+
reports the ordered authoring steps, the owning command for each operation, and
|
|
43
|
+
the bundled schema and example keys with their cache-resolved paths, bound to
|
|
44
|
+
the artifact kind and current where a copy would go stale. Validate the result
|
|
45
|
+
with `strict-spec-cli architecture-status`.
|
|
46
|
+
|
|
47
|
+
**Stop rather than edit YAML directly.** When a required command, argument, or
|
|
48
|
+
artifact kind is unavailable, stop and report the missing capability. Editing
|
|
49
|
+
the YAML directly, writing a raw payload, or scripting around the CLI is never
|
|
50
|
+
an available fallback, and an unavailable command is a reason to stop rather
|
|
51
|
+
than a reason to improvise.
|
|
52
|
+
|
|
53
|
+
## Preferred Human Language
|
|
54
|
+
|
|
55
|
+
Comply with `preferred_human_language` from `.strict-spec-driven/config.yaml` —
|
|
56
|
+
the user's common human language, not a programming language — for all
|
|
57
|
+
user-facing and generated operator-facing text, including generated
|
|
58
|
+
architecture prose, unless that file is absent or the active user message asks
|
|
59
|
+
otherwise.
|
|
60
|
+
|
|
61
|
+
## What Belongs in the Architecture Artifact
|
|
62
|
+
|
|
63
|
+
Put in it only what no other strict artifact holds:
|
|
64
|
+
|
|
65
|
+
- **components** — each component's responsibility, the boundaries that say what
|
|
66
|
+
it deliberately does not own, the components it depends on, and the
|
|
67
|
+
repo-relative implementation files it maps to
|
|
68
|
+
- **data_flows** — the trigger that starts a flow, the ordered steps, and the
|
|
69
|
+
components the flow crosses
|
|
70
|
+
- **decisions** — the architectural decision, its rationale, the alternatives
|
|
71
|
+
that were rejected, and its status
|
|
72
|
+
|
|
73
|
+
Keep out of it anything the renderer already projects:
|
|
74
|
+
|
|
75
|
+
- spec ids, titles, paths, or requirement counts — these come from
|
|
76
|
+
`.strict-spec-driven/specs/INDEX.yaml` and the main specs
|
|
77
|
+
- technical-standard rules, strengths, or categories — these come from
|
|
78
|
+
`.strict-spec-driven/tech/`
|
|
79
|
+
- project context prose — this comes from the `context` field of
|
|
80
|
+
`.strict-spec-driven/config.yaml`
|
|
81
|
+
|
|
82
|
+
Duplicating projected content creates a second source of truth that drifts.
|
|
83
|
+
|
|
84
|
+
## Steps
|
|
85
|
+
|
|
86
|
+
Before any other step, run `strict-spec-cli check-workflow-state`. If
|
|
87
|
+
`.strict-spec-driven/` is missing, stop immediately and tell the user to run
|
|
88
|
+
`/strict-spec-init`. Do not run `init` from this skill.
|
|
89
|
+
|
|
90
|
+
1. **Check workflow state** — run `strict-spec-cli check-workflow-state` first.
|
|
91
|
+
|
|
92
|
+
2. **Read the current state** — run `strict-spec-cli architecture-status`. It reports
|
|
93
|
+
whether the artifact validates, how many components, data flows, and
|
|
94
|
+
decisions it declares, and which mapped implementation paths no longer exist.
|
|
95
|
+
Treat reported mapping drift as work to do: a component mapped to a deleted
|
|
96
|
+
file is either a stale mapping or a component that no longer exists.
|
|
97
|
+
|
|
98
|
+
3. **Inspect the schema when the shape is unclear** — run
|
|
99
|
+
`strict-spec-cli schema-show architecture` and
|
|
100
|
+
`strict-spec-cli sample-show architecture`. Do not guess field names.
|
|
101
|
+
|
|
102
|
+
4. **Gather repository evidence before writing** — derive components from the
|
|
103
|
+
real source layout, not from an idealized picture: read the top-level source
|
|
104
|
+
directories, the CLI or entry-point wiring, the test layout, and the existing
|
|
105
|
+
strict artifacts. Run `strict-spec-cli tech-status` so the architecture you
|
|
106
|
+
describe is consistent with the standards that bind the code.
|
|
107
|
+
|
|
108
|
+
5. **Write or update `.strict-spec-driven/architecture.yaml` through the CLI** — invoke `strict-spec-cli architecture-edit` once per header, component, data-flow, decision, nested list addition, or exact named removal. Never edit the YAML directly. Keep component,
|
|
109
|
+
flow, and decision ids stable across edits: they are the anchors readers and
|
|
110
|
+
diffs rely on. Preserve authoring order, because the renderer emits
|
|
111
|
+
components, flows, and decisions in document order. Record a decision only
|
|
112
|
+
when it constrains future work; a decision with no rationale and no rejected
|
|
113
|
+
alternative is a description, not a decision.
|
|
114
|
+
|
|
115
|
+
6. **Render the document** — run `strict-spec-cli architecture-generate`. It writes
|
|
116
|
+
`ARCHITECTURE.md` at the repository root, or the path given to `--output`.
|
|
117
|
+
|
|
118
|
+
7. **Confirm the result** — run `strict-spec-cli architecture-status` again for a clean
|
|
119
|
+
validation and no mapping drift, then `strict-spec-cli architecture-generate --check`
|
|
120
|
+
to confirm the rendered document matches its sources. Check mode exits
|
|
121
|
+
non-zero and names the stale source artifacts when it does not.
|
|
122
|
+
|
|
123
|
+
## Detecting Staleness Later
|
|
124
|
+
|
|
125
|
+
`strict-spec-cli architecture-generate --check` is the drift gate. It renders in
|
|
126
|
+
memory, compares against the file on disk, never writes, and exits non-zero when
|
|
127
|
+
the document is stale or absent, naming which source artifact changed. It is an
|
|
128
|
+
on-demand check: it is deliberately not wired into `verify`, `ready`, or
|
|
129
|
+
`archive`.
|
|
130
|
+
|
|
131
|
+
## Rules
|
|
132
|
+
|
|
133
|
+
- Never hand-edit `ARCHITECTURE.md` or any file carrying the generated banner; change
|
|
134
|
+
the source artifact and re-render
|
|
135
|
+
- Never hand-edit `.strict-spec-driven/architecture.yaml`; use `architecture-edit` named fields and removals so unrelated entries are preserved and the full candidate validates before commit
|
|
136
|
+
- Never duplicate spec or technical-standard content into the architecture
|
|
137
|
+
artifact
|
|
138
|
+
- Keep component, data flow, and decision ids stable; renaming an id is a
|
|
139
|
+
content change readers see as a deletion plus an addition
|
|
140
|
+
- Map components to real repo-relative implementation paths and fix mapping
|
|
141
|
+
drift rather than deleting the mapping to silence it
|
|
142
|
+
- Do not invent components, flows, or decisions that the repository does not
|
|
143
|
+
support; ask the user when the intended boundary is genuinely ambiguous
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: strict-spec-archive
|
|
3
|
+
description: Archive a completed strict YAML change. Uses the strict archive command to merge delta specs into main specs, regenerate the spec index, reconcile roadmap status when present, and move the change into archive.
|
|
4
|
+
metadata:
|
|
5
|
+
skill_id: strict_spec_archive
|
|
6
|
+
author: strict-spec-driven
|
|
7
|
+
type: agent_skill
|
|
8
|
+
version: 1.0.0
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
You are helping the user archive a completed strict YAML change.
|
|
12
|
+
|
|
13
|
+
## This Skill's Commands
|
|
14
|
+
|
|
15
|
+
If you cannot remember the exact command used by this skill, look it up here
|
|
16
|
+
before running anything. Do not guess.
|
|
17
|
+
|
|
18
|
+
```yaml
|
|
19
|
+
check-workflow-state: strict-spec-cli check-workflow-state
|
|
20
|
+
modify: strict-spec-cli modify [change-name|archive-dir]
|
|
21
|
+
verify: strict-spec-cli verify <change-name>
|
|
22
|
+
generate: strict-spec-cli generate <change-name> delta-tech --<named-args>
|
|
23
|
+
archive: strict-spec-cli archive <change-name>
|
|
24
|
+
lesson-status: strict-spec-cli lesson-status [--category <category>]
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Responsibility Split
|
|
28
|
+
|
|
29
|
+
**Handled by CLI scripts**
|
|
30
|
+
- merge strict YAML delta specs into main specs during archive
|
|
31
|
+
- merge strict YAML delta scenes into `.strict-spec-driven/scenes/` and regenerate the scene index
|
|
32
|
+
- regenerate `.strict-spec-driven/specs/INDEX.yaml`
|
|
33
|
+
- reconcile `.strict-spec-driven/roadmap/` milestone and index status when archive changes roadmap-derived completion state
|
|
34
|
+
- move the change directory into `.strict-spec-driven/changes/archive/`
|
|
35
|
+
|
|
36
|
+
**Handled by the AI**
|
|
37
|
+
- choose the change to archive
|
|
38
|
+
- perform a final current-change-scoped technical-standard synchronization
|
|
39
|
+
- decide and apply the recommendation when a possible reusable convention is not
|
|
40
|
+
covered by applicable standards or current delta tech
|
|
41
|
+
- confirm verification and review readiness
|
|
42
|
+
- interpret archive output and summarize the final result
|
|
43
|
+
|
|
44
|
+
## CLI-Only YAML Authoring Protocol
|
|
45
|
+
|
|
46
|
+
Every mutation of repository-owned YAML in this skill goes through the strict
|
|
47
|
+
CLI. This skill writes `change-planning-state`, `change-delta-state`,
|
|
48
|
+
`spec-state`, `tech-state`, `scene-state`. Before the first mutation run `strict-spec-cli
|
|
49
|
+
yaml-authoring-protocol <artifact-kind>` for each of them: that command reports
|
|
50
|
+
the ordered authoring steps, the owning command for each operation, and the
|
|
51
|
+
bundled schema and example keys with their cache-resolved paths, bound to the
|
|
52
|
+
artifact kind and current where a copy would go stale. Validate the result with
|
|
53
|
+
`strict-spec-cli verify <change-name>`.
|
|
54
|
+
|
|
55
|
+
**Stop rather than edit YAML directly.** When a required command, argument, or
|
|
56
|
+
artifact kind is unavailable, stop and report the missing capability. Editing
|
|
57
|
+
the YAML directly, writing a raw payload, or scripting around the CLI is never
|
|
58
|
+
an available fallback, and an unavailable command is a reason to stop rather
|
|
59
|
+
than a reason to improvise.
|
|
60
|
+
|
|
61
|
+
## Preferred Human Language
|
|
62
|
+
|
|
63
|
+
Comply with `preferred_human_language` from `.strict-spec-driven/config.yaml` —
|
|
64
|
+
the user's common human language, not a programming language — for all
|
|
65
|
+
user-facing and generated operator-facing text, unless that file is absent or
|
|
66
|
+
the active user message asks otherwise.
|
|
67
|
+
|
|
68
|
+
## Steps
|
|
69
|
+
|
|
70
|
+
Before any other step, run `strict-spec-cli check-workflow-state`. If `.strict-spec-driven/` is
|
|
71
|
+
missing, stop immediately and tell the user to run `/strict-spec-init`. Do not
|
|
72
|
+
run `init` from this skill.
|
|
73
|
+
|
|
74
|
+
1. **Select the change** — run `modify` without an argument to list active
|
|
75
|
+
changes. If the change is already specified, use it.
|
|
76
|
+
|
|
77
|
+
2. **Run the final current-change tech sync** — before final verification or
|
|
78
|
+
invoking the raw archive command, apply the active-change procedure from
|
|
79
|
+
`strict-tech-sync` to the selected change.
|
|
80
|
+
- bound the scan to the selected change's proposal, design, tasks, questions,
|
|
81
|
+
delta specs, delta tech, attributable tracked and untracked files, and
|
|
82
|
+
applicable technical standards
|
|
83
|
+
- exclude unrelated repository drift and surface ambiguous file ownership
|
|
84
|
+
instead of silently widening the archive scope
|
|
85
|
+
- continue immediately when applicable main standards and current delta tech
|
|
86
|
+
already cover the change and no reusable convention gap remains
|
|
87
|
+
- when a possible reusable convention is uncovered, state the target or
|
|
88
|
+
proposed standard, operation, stable rule id, strength, statement,
|
|
89
|
+
rationale, and enforcement, then apply the recommendation the bounded
|
|
90
|
+
evidence supports without pausing for operator confirmation: capture a
|
|
91
|
+
convention the evidence shows is reusable as current-change delta tech, or
|
|
92
|
+
record the classification that the pattern is not reusable together with the
|
|
93
|
+
reason it is specific to this change
|
|
94
|
+
- report the applied decision in the archive summary, because removing the
|
|
95
|
+
confirmation removes the operator's only view of what the checkpoint decided
|
|
96
|
+
- never defer a convention confirmed as reusable until after archive; use
|
|
97
|
+
`generate <change-name> delta-tech ...` so it remains part of the active
|
|
98
|
+
change rather than editing a live main standard directly
|
|
99
|
+
- after any delta-tech edit, review the final delta artifact and rerun strict
|
|
100
|
+
verification; a write the configured regression command neither compiles
|
|
101
|
+
nor reads — currently a change-local delta-tech artifact or a lesson — does
|
|
102
|
+
not invalidate passing complete project regression evidence, so rerun the
|
|
103
|
+
configured regression command here only when this step also changed a file
|
|
104
|
+
outside that carve-out
|
|
105
|
+
|
|
106
|
+
3. **Confirm the lesson declaration** — confirm that review declared either a
|
|
107
|
+
recorded lesson or a justified "no lesson" for this change. Experience is
|
|
108
|
+
learned during implementation and is lost the moment the change is archived,
|
|
109
|
+
so this is the last point at which it can be captured cheaply. If the
|
|
110
|
+
declaration was never made, make it now against the objective criteria in
|
|
111
|
+
`strict-spec-review` — an overturned design decision, an unforeseen question,
|
|
112
|
+
a task added from a discovery, or a regression exposing a pre-existing trap —
|
|
113
|
+
and record the lesson before continuing. Do not invent one to fill the slot.
|
|
114
|
+
Recording it here costs no regression rerun: a lesson is inside the carve-out
|
|
115
|
+
named in the previous step.
|
|
116
|
+
|
|
117
|
+
4. **Confirm readiness** — after the final tech-sync checkpoint and any required
|
|
118
|
+
evidence reruns, run:
|
|
119
|
+
```bash
|
|
120
|
+
strict-spec-cli verify <change-name>
|
|
121
|
+
```
|
|
122
|
+
Stop if the command reports blockers.
|
|
123
|
+
|
|
124
|
+
5. **Check for observable spec impact** — inspect
|
|
125
|
+
`.strict-spec-driven/changes/<name>/specs/`.
|
|
126
|
+
- if it is empty, treat the change as having no delta specs to merge and
|
|
127
|
+
continue directly to archive
|
|
128
|
+
- otherwise proceed
|
|
129
|
+
|
|
130
|
+
5b. **Check for scene impact** — inspect
|
|
131
|
+
`.strict-spec-driven/changes/<name>/scenes/`.
|
|
132
|
+
- if it is absent or empty, the change merges no scene and the recorded
|
|
133
|
+
scenes are left untouched
|
|
134
|
+
- otherwise the archive command merges those delta scenes into
|
|
135
|
+
`.strict-spec-driven/scenes/` and regenerates the scene index in the same
|
|
136
|
+
transaction. Step 4's verification already blocked an uncovered flow step,
|
|
137
|
+
so nothing is re-derived here; note which scenes will be merged so the
|
|
138
|
+
summary can report them.
|
|
139
|
+
|
|
140
|
+
6. **Archive the change** — use the raw command only as the deterministic
|
|
141
|
+
verification, delta-merge, index-regeneration, roadmap-reconciliation, and
|
|
142
|
+
change-move mechanism:
|
|
143
|
+
```bash
|
|
144
|
+
strict-spec-cli archive <change-name>
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
7. **Confirm the result** — summarize:
|
|
148
|
+
- the archive destination
|
|
149
|
+
- the strict main specs that were updated
|
|
150
|
+
- the recorded scenes the archive command merged, if any
|
|
151
|
+
- any roadmap files the archive command reconciled
|
|
152
|
+
- the tech-sync decision applied at step 2, or that the checkpoint found
|
|
153
|
+
nothing uncovered
|
|
154
|
+
|
|
155
|
+
## Rules
|
|
156
|
+
|
|
157
|
+
- Never archive a change with verification blockers
|
|
158
|
+
- Never invoke archive before the final current-change tech-sync checkpoint is
|
|
159
|
+
resolved
|
|
160
|
+
- Never defer a confirmed reusable convention until after archive; capture it as
|
|
161
|
+
current-change delta tech
|
|
162
|
+
- Never put an archive-time tech-sync finding to the operator as a question;
|
|
163
|
+
decide it from the bounded evidence, apply it, and report what was applied
|
|
164
|
+
- Use the strict archive command rather than manually moving change directories
|
|
165
|
+
- Treat the current YAML artifacts and repository state as authoritative
|