dsh-plugin-strict-spec 0.5.1 → 0.7.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 (29) hide show
  1. package/README.md +13 -13
  2. package/README.zh.md +10 -12
  3. package/dist/cli/strict-spec-cli.js +111 -778
  4. package/dist/skills/strict-roadmap-plan/SKILL.md +49 -139
  5. package/dist/skills/strict-roadmap-recommend/SKILL.md +63 -282
  6. package/dist/skills/strict-roadmap-reorder/SKILL.md +40 -158
  7. package/dist/skills/strict-roadmap-review/SKILL.md +48 -144
  8. package/dist/skills/strict-roadmap-transition/SKILL.md +52 -274
  9. package/dist/skills/strict-scene-edit/SKILL.md +51 -121
  10. package/dist/skills/strict-spec-apply/SKILL.md +63 -173
  11. package/dist/skills/strict-spec-architecture/SKILL.md +39 -97
  12. package/dist/skills/strict-spec-archive/SKILL.md +57 -127
  13. package/dist/skills/strict-spec-auto/SKILL.md +95 -271
  14. package/dist/skills/strict-spec-brainstorm/SKILL.md +73 -176
  15. package/dist/skills/strict-spec-bugfix/SKILL.md +101 -225
  16. package/dist/skills/strict-spec-design/SKILL.md +55 -124
  17. package/dist/skills/strict-spec-design-sync/SKILL.md +55 -123
  18. package/dist/skills/strict-spec-init/SKILL.md +45 -93
  19. package/dist/skills/strict-spec-maintenance/SKILL.md +44 -94
  20. package/dist/skills/strict-spec-modify/SKILL.md +44 -113
  21. package/dist/skills/strict-spec-propose/SKILL.md +180 -495
  22. package/dist/skills/strict-spec-review/SKILL.md +138 -274
  23. package/dist/skills/strict-spec-ship/SKILL.md +25 -60
  24. package/dist/skills/strict-spec-spec-edit/SKILL.md +35 -84
  25. package/dist/skills/strict-spec-sync-specs/SKILL.md +44 -94
  26. package/dist/skills/strict-tech-edit/SKILL.md +43 -124
  27. package/dist/skills/strict-tech-sync/SKILL.md +60 -162
  28. package/package.json +2 -1
  29. package/dist/skills/strict-spec-verify/SKILL.md +0 -79
@@ -8,20 +8,12 @@ metadata:
8
8
  version: 1.0.0
9
9
  ---
10
10
 
11
- You are helping the user synchronize `.strict-spec-driven/tech/` with the
12
- implementation conventions that already exist in the repository.
13
-
14
- Technical standards capture implementation-facing engineering rules — technology
15
- choices, coding conventions, architecture rules, internal structure constraints,
16
- and security, performance, or API design baselines. This skill detects where the
17
- codebase already follows (or violates) such conventions and reconciles the
18
- written standards with that reality.
11
+ Reconcile the technical standards under `.strict-spec-driven/tech/` with the
12
+ implementation conventions the repository actually follows: capture reusable
13
+ conventions the standards lack, and correct rules the code contradicts.
19
14
 
20
15
  ## This Skill's Commands
21
16
 
22
- If you cannot remember the exact command used by this skill, look it up here
23
- before running anything. Do not guess.
24
-
25
17
  ```yaml
26
18
  check-workflow-state: strict-spec-cli check-workflow-state
27
19
  tech-status: strict-spec-cli tech-status
@@ -35,27 +27,17 @@ verify: strict-spec-cli verify <change-name>
35
27
 
36
28
  ## CLI-Only YAML Authoring Protocol
37
29
 
38
- Every mutation of repository-owned YAML in this skill goes through the strict
39
- CLI. This skill writes `tech-state`, `change-delta-state`. Before the first
40
- mutation run `strict-spec-cli yaml-authoring-protocol <artifact-kind>` for each
41
- of them: that command reports the ordered authoring steps, the owning command
42
- for each operation, and the bundled schema and example keys with their
43
- cache-resolved paths, bound to the artifact kind and current where a copy would
44
- go stale. Validate the result with `strict-spec-cli tech-status`,
30
+ This skill writes `tech-state`, `change-delta-state`. Before its first mutation,
31
+ run `strict-spec-cli yaml-authoring-protocol <artifact-kind>` for each kind and
32
+ follow it, including its rule to stop and report a missing command rather than
33
+ work around it; validate the result with `strict-spec-cli tech-status`,
45
34
  `strict-spec-cli verify <change-name>`.
46
35
 
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
36
  ## Preferred Human Language
54
37
 
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, unless that file is absent or
58
- the active user message asks otherwise.
38
+ Write user-facing and generated operator-facing text in the human language named
39
+ by `preferred_human_language` in `.strict-spec-driven/config.yaml`, unless the
40
+ active user message asks otherwise.
59
41
 
60
42
  ## Steps
61
43
 
@@ -63,140 +45,56 @@ Before any other step, run `strict-spec-cli check-workflow-state`. If `.strict-s
63
45
  missing, stop immediately and tell the user to run `/strict-spec-init`. Do not
64
46
  run `init` from this skill.
65
47
 
66
- 1. **Choose the synchronization mode and scan scope** — determine whether the
67
- user wants:
68
- - an **active-change sync** for a selected change that is still under
69
- `.strict-spec-driven/changes/`; use `modify` without an argument to list
70
- candidates when the user did not name one
71
- - a **standalone sync** that directly reconciles live standards outside an
72
- active change
73
-
74
- Then determine whether the requested scope is:
75
- - a repository-wide scan
76
- - a scoped scan for a specific directory, module, layer, or concern
77
- (for example: error handling, logging, API surface, build tooling)
78
-
79
- An active-change sync is always bounded to the selected change. Build its
80
- scope from the selected change's proposal, design, tasks, questions, delta
81
- specs, delta tech, and repository changes attributable to the change. Use
82
- attributable tracked and untracked files only as supporting evidence; surface
83
- ambiguous ownership instead of absorbing unrelated repository drift.
84
- If a standalone user already gave a scope, use it. Otherwise ask whether to
85
- scan the whole repository or a narrower target.
86
-
87
- 2. **Read strict tech context first** — before deciding that any drift exists,
88
- read:
89
- - `.strict-spec-driven/config.yaml`
90
- - `.strict-spec-driven/tech/INDEX.yaml`
91
- - run `tech-status` to enumerate existing standards and rules
92
- - every strict YAML standard file relevant to the chosen scope
93
- - run `lesson-status --category <category>` for each technical category in scope to see recorded
94
- experience in the same area. Use unfiltered status only when no relevant category can be
95
- identified. A lesson
96
- with repeated occurrences is the strongest evidence that a convention has
97
- earned a binding rule: the occurrence count is objective proof the project
98
- keeps hitting it, and the lesson's observation already supplies the
99
- rationale. Treat repeated lessons as promotion candidates for this sync.
100
-
101
- 3. **Read repository evidence in the chosen scope** — inspect the code,
102
- configuration, build files, lint/format configs, CI definitions, and tests
103
- that reveal current implementation conventions. Look for conventions that are
104
- followed consistently enough to be a de facto standard, and for inconsistent
105
- areas where a standard is missing. For active-change sync, inspect only the
106
- selected change evidence and the applicable standards; do not turn the scan
107
- into repository-wide maintenance.
108
-
109
- 4. **Classify drift findings** — compare repository evidence to current
110
- standards and sort findings into:
111
- - conventions already covered by applicable main standards or the active
112
- change's delta tech
113
- - established conventions present in the codebase but missing from standards
114
- - existing standard rules that are outdated, contradicted by the code, or
115
- unenforced
116
- - inconsistent areas where the team should pick a standard (needs human input)
117
- - patterns that are specific to this change and are not reusable engineering
118
- conventions
119
- - unrelated repository drift excluded from an active-change scan
120
- - areas with no meaningful drift in the scanned scope
121
-
122
- 5. **Report the drift summary in chat** — present a concise summary covering:
123
- - the scan scope that was analyzed
124
- - confirmed convention gaps or outdated standard rules, with file references
125
- - inconsistencies that need a human decision before becoming a rule
126
- - areas in scope where no meaningful drift was found
127
-
128
- 6. **Get operator confirmation, except at archive time** — before writing any
129
- standard or delta-tech artifact when this skill is invoked on its own, ask the
130
- operator to confirm each proposed change. For every finding,
131
- provide the target standard (or proposed new standard), operation, stable rule
132
- id, strength, normative statement, rationale, and enforcement method. Do not
133
- proceed until the operator explicitly approves both the normative content and
134
- its strength. A convention only becomes a MUST when the operator agrees it is
135
- mandatory. A surfaced
136
- pattern may instead be explicitly classified as not reusable; a convention
137
- confirmed as reusable may not be deferred until after its active change is
138
- archived.
139
- When these steps are applied as the pre-archive checkpoint that
140
- `strict-spec-archive` owns, that skill's rule replaces this confirmation: the
141
- same finding detail is stated, the decision is taken from the bounded
142
- evidence, and it is reported rather than put to the operator.
143
-
144
- 7. **Write confirmed findings through the selected mode** — for each confirmed
145
- finding:
146
- - in active-change mode, use `generate <change-name> delta-tech ...` to add or
147
- update a strict delta-tech artifact under the selected change; never edit a
148
- live main standard directly
149
- - in standalone mode, invoke `tech-edit <standard-id>` with named semantic
150
- arguments for each confirmed scalar, keyed rule, example, or exception
151
- mutation; use `--tech-path`, title, category, and one complete rule when
152
- creating a standard
153
- - add, modify, or remove structured rules with `strength`, `statement`,
154
- `rationale`, and `enforcement`
155
- - if no existing category or file fits, create a new standard through the
156
- selected mode with the correct relative path and category
157
- - never edit live main-tech or tech-index YAML text; `tech-edit` validates and
158
- reconciles both atomically in standalone mode
159
-
160
- 8. **Link any lesson this sync promoted** — when a rule written in the previous
161
- step originated from a recorded lesson, mark that lesson promoted now that
162
- the standard or delta tech exists:
163
- ```bash
164
- strict-spec-cli lesson-edit <lesson-id> --promoted-standard <standard-id> --promoted-rule <rule-id>
165
- ```
166
- This drops the lesson from the default lesson list so the same guidance is
167
- not surfaced twice at consumption points. Never delete a promoted lesson: the
168
- rule states what must be done but omits the failure that motivated it, and
169
- the lesson is the only remaining record of that failure.
170
-
171
- 9. **Refresh supporting tech state** — after all edits are complete:
172
- - in active-change mode, run `verify <change-name>` and review every generated
173
- delta-tech operation against the confirmed finding before archive continues;
174
- a write the configured regression command neither compiles nor reads —
175
- currently a change-local delta-tech artifact or a lesson — does not
176
- invalidate passing complete project regression evidence, so rerun the
177
- configured regression command only when this sync also changed a file
178
- outside that carve-out, which covers both the delta tech this sync wrote
179
- and the lesson promotion that recorded it
180
- - in standalone mode, confirm `tech-edit` reported the reconciled tech index
181
- - run `tech-status` to confirm the standards read back correctly
182
-
183
- 10. **Report final changes** — summarize:
184
- - which standard files were added, modified, or removed
185
- - a brief description of the drift fixed in each file
186
- - any inconsistencies that were left unresolved and why
48
+ 1. **Choose the mode and scope** — the two modes write to different places:
49
+ - **active-change sync** for a change still under
50
+ `.strict-spec-driven/changes/` (`modify` without an argument lists them).
51
+ Scope is that change only: its proposal, design, tasks, questions, delta
52
+ specs, and delta tech, with attributable tracked and untracked files as
53
+ supporting evidence. Surface ambiguous ownership instead of absorbing
54
+ unrelated repository drift.
55
+ - **standalone sync** of the live standards, over the scope the user gave or
56
+ the whole repository or a named area when asked.
57
+
58
+ 2. **Find the drift** — run `tech-status`, read the standards in scope, and run
59
+ `lesson-status` per category in scope; a repeatedly recurring lesson is the
60
+ strongest case for a binding rule. Then read the code, configuration, CI, and
61
+ tests in scope and classify each finding: already covered, a consistent
62
+ convention the standards lack, a rule the code contradicts or never enforces,
63
+ an inconsistency needing a human decision, or a change-specific pattern that
64
+ is not reusable.
65
+
66
+ 3. **Report and confirm** — present the scope, findings with file references,
67
+ inconsistencies, and clean areas in chat, stating for each proposed write the
68
+ target standard, operation, stable rule id, strength, statement, rationale,
69
+ and enforcement method.
70
+ - Standalone, get operator confirmation before writing: proceed only when the
71
+ operator explicitly approves the normative content and its strength; a
72
+ convention becomes MUST only when the operator agrees it is mandatory.
73
+ - When these steps run as the pre-archive checkpoint `strict-spec-archive`
74
+ owns, that skill's rule replaces the confirmation: the decision follows the
75
+ bounded evidence and is reported rather than put to the operator.
76
+ - A pattern may be classified as not reusable, but a convention confirmed as
77
+ reusable is never deferred until after its change is archived.
78
+
79
+ 4. **Write the confirmed findings** — active-change mode writes delta tech under
80
+ the selected change through `generate` and never edits a live standard;
81
+ standalone mode writes through `tech-edit`. Read the owning command's
82
+ `--help --json` for its arguments. Link each lesson a rule came from through
83
+ `lesson-edit`; never delete a promoted lesson, the only record of the failure
84
+ its rule omits.
85
+
86
+ 5. **Re-check and report** — in active-change mode, run `verify` and review each
87
+ delta-tech operation against its finding. Rerun the regression command only
88
+ when this sync changed a file outside the carve-out: a write the configured
89
+ regression command neither compiles nor reads — currently a change-local
90
+ delta-tech artifact or a lesson — does not invalidate passing complete
91
+ project regression evidence. Done when `tech-status` reads the
92
+ standards back correctly; summarize what changed and what stays unresolved.
187
93
 
188
94
  ## Rules
189
95
 
190
- - Do not change product code; synchronize only strict technical-standard state
191
- - Read strict tech context before judging drift
192
- - Respect the user-selected scope
193
- - Use code, configs, CI, and tests as evidence; record the rule plus its
194
- rationale and enforcement, not raw implementation detail
195
- - Do not create a strict change. In active-change mode write confirmed findings
196
- only as delta tech inside the already selected change; use `tech-edit` for
197
- live standards only in standalone mode.
198
- - Do not write a standalone report file; the summary belongs in chat
199
- - Get explicit user confirmation before editing any strict YAML standard file,
200
- except when these steps run as the pre-archive checkpoint `strict-spec-archive`
201
- owns, which decides from the bounded evidence and reports what it applied
202
- - Never hand-edit main-tech or tech-index YAML
96
+ - Change no product code, create no strict change, and write no report file.
97
+ - Record the rule with its rationale and enforcement, not raw implementation
98
+ detail.
99
+ - Use `tech-edit` for live standards only in standalone mode.
100
+ - Never edit main-tech or tech-index YAML directly.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-plugin-strict-spec",
3
- "version": "0.5.1",
3
+ "version": "0.7.0",
4
4
  "description": "Strict workflow document viewer plugin for DeepSeek Harness",
5
5
  "type": "module",
6
6
  "main": "./dist/host.js",
@@ -47,6 +47,7 @@
47
47
  "scripts": {
48
48
  "build": "bun scripts/build-client.ts",
49
49
  "lint": "tsc --noEmit -p .",
50
+ "prepare": "node -e \"const fs=require('node:fs');const files=['dist/host.js','dist/client.js','dist/cli/strict-spec-cli.js'];if(files.every((file)=>fs.existsSync(file)&&fs.statSync(file).size>0)){process.exit(0);}console.error('dsh-plugin-strict-spec: the tracked bundle is incomplete, rebuilding it');try{require('node:child_process').execSync('bun run build',{stdio:'inherit'});}catch(error){console.error('dsh-plugin-strict-spec: the rebuild failed; install bun, then run bun install && bun run build in plugins/dsh-strict-spec');process.exit(1);}\"",
50
51
  "prepublishOnly": "bun run build"
51
52
  },
52
53
  "devDependencies": {
@@ -1,79 +0,0 @@
1
- ---
2
- name: strict-spec-verify
3
- description: Verify a strict YAML change before archive. Checks strict artifact structure, task completion, open questions, and unchanged behavior.
4
- metadata:
5
- skill_id: strict_spec_verify
6
- author: strict-spec-driven
7
- type: agent_skill
8
- version: 1.0.0
9
- ---
10
-
11
- You are helping the user verify a strict YAML change before archive.
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
- ```
23
-
24
- ## Preferred Human Language
25
-
26
- Comply with `preferred_human_language` from `.strict-spec-driven/config.yaml` —
27
- the user's common human language, not a programming language — for all
28
- user-facing and generated operator-facing text, unless that file is absent or
29
- the active user message asks otherwise.
30
-
31
- ## Steps
32
-
33
- Before any other step, run `strict-spec-cli check-workflow-state`. If `.strict-spec-driven/` is
34
- missing, stop immediately and tell the user to run `/strict-spec-init`. Do not
35
- run `init` from this skill.
36
-
37
- 1. **Select the change** — run `modify` without an argument to list active
38
- changes. If the change is already specified, use it.
39
-
40
- 2. **Run strict verification first** — run:
41
- ```bash
42
- strict-spec-cli verify <change-name>
43
- ```
44
- Treat the returned diagnostics as lifecycle blockers until resolved.
45
-
46
- 3. **Read the current change artifacts** — inspect:
47
- - `proposal.yaml`
48
- - `design.yaml`
49
- - `tasks.yaml`
50
- - `questions.yaml`
51
- - strict YAML delta specs under `changes/<name>/specs/`
52
- - relevant strict YAML main specs and the implementation and test files the
53
- change touches
54
-
55
- 4. **Check completion evidence** — confirm the repository state matches every
56
- completed task.
57
- - unfinished work in `tasks.yaml` is a blocker
58
- - non-empty `questions.yaml.open` is a blocker
59
- - delta specs must match what was implemented
60
- - when the workflow config declares a coverage contract under
61
- `review_evidence.project_regression.coverage`, the configured regression
62
- command enforces it through its exit code: a coverage failure is a blocker
63
- exactly like failing tests, never advisory output, and verification never
64
- measures coverage itself or second-guesses the declared threshold
65
-
66
- 5. **Check unchanged behavior** — compare the implementation against
67
- `proposal.yaml.unchanged_behavior` and treat regressions as blockers.
68
-
69
- 6. **Fix safe blockers automatically** — if a verification issue is clearly
70
- fixable, fix it and rerun `verify`.
71
-
72
- 7. **Report the result** — provide a tiered summary of blockers, warnings, and
73
- optional suggestions, then recommend `strict-spec-review` when the change is
74
- clean.
75
-
76
- ## Rules
77
-
78
- - Be honest; do not treat checked tasks as proof by themselves
79
- - Use the current YAML artifacts and repository state as the source of truth