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.
- package/README.md +13 -13
- package/README.zh.md +10 -12
- package/dist/cli/strict-spec-cli.js +111 -778
- package/dist/skills/strict-roadmap-plan/SKILL.md +49 -139
- package/dist/skills/strict-roadmap-recommend/SKILL.md +63 -282
- package/dist/skills/strict-roadmap-reorder/SKILL.md +40 -158
- package/dist/skills/strict-roadmap-review/SKILL.md +48 -144
- package/dist/skills/strict-roadmap-transition/SKILL.md +52 -274
- package/dist/skills/strict-scene-edit/SKILL.md +51 -121
- package/dist/skills/strict-spec-apply/SKILL.md +63 -173
- package/dist/skills/strict-spec-architecture/SKILL.md +39 -97
- package/dist/skills/strict-spec-archive/SKILL.md +57 -127
- package/dist/skills/strict-spec-auto/SKILL.md +95 -271
- package/dist/skills/strict-spec-brainstorm/SKILL.md +73 -176
- package/dist/skills/strict-spec-bugfix/SKILL.md +101 -225
- package/dist/skills/strict-spec-design/SKILL.md +55 -124
- package/dist/skills/strict-spec-design-sync/SKILL.md +55 -123
- package/dist/skills/strict-spec-init/SKILL.md +45 -93
- package/dist/skills/strict-spec-maintenance/SKILL.md +44 -94
- package/dist/skills/strict-spec-modify/SKILL.md +44 -113
- package/dist/skills/strict-spec-propose/SKILL.md +180 -495
- package/dist/skills/strict-spec-review/SKILL.md +138 -274
- package/dist/skills/strict-spec-ship/SKILL.md +25 -60
- package/dist/skills/strict-spec-spec-edit/SKILL.md +35 -84
- package/dist/skills/strict-spec-sync-specs/SKILL.md +44 -94
- package/dist/skills/strict-tech-edit/SKILL.md +43 -124
- package/dist/skills/strict-tech-sync/SKILL.md +60 -162
- package/package.json +2 -1
- package/dist/skills/strict-spec-verify/SKILL.md +0 -79
|
@@ -8,15 +8,13 @@ metadata:
|
|
|
8
8
|
version: 1.0.0
|
|
9
9
|
---
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
`.strict-spec-driven/specs/`
|
|
13
|
-
|
|
11
|
+
Make a lightweight, intent-driven edit to the live main specs under
|
|
12
|
+
`.strict-spec-driven/specs/` outside the change workflow. Drift found by
|
|
13
|
+
scanning the repository belongs to `strict-spec-sync-specs`; behavior changes
|
|
14
|
+
that ship with code belong in a change's delta spec.
|
|
14
15
|
|
|
15
16
|
## This Skill's Commands
|
|
16
17
|
|
|
17
|
-
If you cannot remember the exact command used by this skill, look it up here
|
|
18
|
-
before running anything. Do not guess.
|
|
19
|
-
|
|
20
18
|
```yaml
|
|
21
19
|
check-workflow-state: strict-spec-cli check-workflow-state
|
|
22
20
|
spec-edit: strict-spec-cli spec-edit <spec-id> [--spec-path <path>] --<named-args>
|
|
@@ -24,26 +22,16 @@ spec-edit: strict-spec-cli spec-edit <spec-id> [--spec-path <path>] --<named-arg
|
|
|
24
22
|
|
|
25
23
|
## CLI-Only YAML Authoring Protocol
|
|
26
24
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
schema and example keys with their cache-resolved paths, bound to the artifact
|
|
32
|
-
kind and current where a copy would go stale. Validate the result with
|
|
33
|
-
`strict-spec-cli check-workflow-state`.
|
|
34
|
-
|
|
35
|
-
**Stop rather than edit YAML directly.** When a required command, argument, or
|
|
36
|
-
artifact kind is unavailable, stop and report the missing capability. Editing
|
|
37
|
-
the YAML directly, writing a raw payload, or scripting around the CLI is never
|
|
38
|
-
an available fallback, and an unavailable command is a reason to stop rather
|
|
39
|
-
than a reason to improvise.
|
|
25
|
+
This skill writes `spec-state`. Before its first mutation, run
|
|
26
|
+
`strict-spec-cli yaml-authoring-protocol <artifact-kind>` for each kind and
|
|
27
|
+
follow it, including its rule to stop and report a missing command rather than
|
|
28
|
+
work around it; validate the result with `strict-spec-cli check-workflow-state`.
|
|
40
29
|
|
|
41
30
|
## Preferred Human Language
|
|
42
31
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
user
|
|
46
|
-
the active user message asks otherwise.
|
|
32
|
+
Write user-facing and generated operator-facing text in the human language named
|
|
33
|
+
by `preferred_human_language` in `.strict-spec-driven/config.yaml`, unless the
|
|
34
|
+
active user message asks otherwise.
|
|
47
35
|
|
|
48
36
|
## Steps
|
|
49
37
|
|
|
@@ -51,67 +39,30 @@ Before any other step, run `strict-spec-cli check-workflow-state`. If `.strict-s
|
|
|
51
39
|
missing, stop immediately and tell the user to run `/strict-spec-init`. Do not
|
|
52
40
|
run `init` from this skill.
|
|
53
41
|
|
|
54
|
-
1. **Read
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
-
|
|
69
|
-
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
- for removals, identify the exact requirement entries to remove
|
|
75
|
-
- describe observable behavior only, not implementation details
|
|
76
|
-
|
|
77
|
-
5. **Present and confirm** — show the user:
|
|
78
|
-
- which strict YAML spec file or files will change
|
|
79
|
-
- the exact content that will be added, modified, or removed
|
|
80
|
-
- whether `.strict-spec-driven/specs/INDEX.yaml` needs updating
|
|
81
|
-
|
|
82
|
-
Wait for explicit confirmation before writing anything.
|
|
83
|
-
|
|
84
|
-
6. **Apply the confirmed edits through the CLI** — after confirmation, issue
|
|
85
|
-
one or more `spec-edit` invocations with named semantic arguments:
|
|
86
|
-
- create a spec with `spec-edit <spec-id> --spec-path <path> --title <text>
|
|
87
|
-
--requirement <id> --strength <MUST|SHOULD|MAY> --statement <text>
|
|
88
|
-
--scenario <id> --given <text> --when <text> --then <text>`
|
|
89
|
-
- update one requirement or scenario by restating its id and only the fields
|
|
90
|
-
that changed; unnamed content is preserved
|
|
91
|
-
- remove keyed content with `--remove-requirement <id>` or
|
|
92
|
-
`--remove-scenario <requirement-id>:<scenario-id>`
|
|
93
|
-
- use an isolated `spec-edit <spec-id> --delete` only when the confirmed
|
|
94
|
-
change removes the whole spec; deletion is refused while active deltas
|
|
95
|
-
target it
|
|
96
|
-
Never edit the main-spec YAML or `INDEX.yaml` text. The command validates
|
|
97
|
-
the complete candidate and reconciles the index in the same transaction.
|
|
98
|
-
|
|
99
|
-
7. **Validate the result** — after editing, verify:
|
|
100
|
-
- each edited file remains valid strict YAML
|
|
101
|
-
- requirement and scenario structures still match the strict schema contract
|
|
102
|
-
- the command result reports both the main artifact and reconciled index
|
|
103
|
-
|
|
104
|
-
8. **Summarize** — tell the user which strict YAML spec files changed, what was
|
|
105
|
-
added, modified, or removed, and whether `INDEX.yaml` was updated.
|
|
42
|
+
1. **Read the recorded specs** — read the spec index and every main spec the
|
|
43
|
+
request touches.
|
|
44
|
+
|
|
45
|
+
2. **Place the content** — put it in an existing spec that covers the behavior;
|
|
46
|
+
create a new spec, or a new category, only when none fits. A requirement
|
|
47
|
+
states observable behavior; an implementation rule belongs in a technical
|
|
48
|
+
standard through `strict-tech-edit`.
|
|
49
|
+
|
|
50
|
+
3. **Confirm the exact edit** — show the user each spec file that changes and
|
|
51
|
+
the requirements and scenarios being added, modified (before and after), or
|
|
52
|
+
removed. Write nothing until the user explicitly approves.
|
|
53
|
+
|
|
54
|
+
4. **Apply** — express each approved edit through `spec-edit` with stable ids
|
|
55
|
+
and only the named fields that change; read
|
|
56
|
+
`strict-spec-cli spec-edit --help --json` for creation, update, removal, and
|
|
57
|
+
whole-spec deletion arguments. Done when each result reports the spec and the
|
|
58
|
+
reconciled index and `check-workflow-state` passes.
|
|
59
|
+
|
|
60
|
+
5. **Summarize** — report the files changed and what was added, modified, or
|
|
61
|
+
removed.
|
|
106
62
|
|
|
107
63
|
## Rules
|
|
108
64
|
|
|
109
|
-
-
|
|
110
|
-
-
|
|
111
|
-
-
|
|
112
|
-
|
|
113
|
-
- Describe observable behavior only, not implementation details
|
|
114
|
-
- Do not implement product code
|
|
115
|
-
- Do not create or interact with `.strict-spec-driven/changes/`
|
|
116
|
-
- Never hand-edit main-spec or spec-index YAML; express every mutation through
|
|
117
|
-
`strict-spec-cli spec-edit` with named arguments
|
|
65
|
+
- Change no product code and do not touch `.strict-spec-driven/changes/`.
|
|
66
|
+
- Prefer existing categories and files.
|
|
67
|
+
- Never edit main-spec or spec-index YAML directly; every mutation goes through
|
|
68
|
+
`spec-edit`.
|
|
@@ -8,14 +8,13 @@ metadata:
|
|
|
8
8
|
version: 1.0.0
|
|
9
9
|
---
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
Bring the live main specs under `.strict-spec-driven/specs/` back in line with
|
|
12
|
+
observable behavior the repository already implements. This skill owns
|
|
13
|
+
repository-drift synchronization; intent edits belong to
|
|
14
|
+
`strict-spec-spec-edit`.
|
|
13
15
|
|
|
14
16
|
## This Skill's Commands
|
|
15
17
|
|
|
16
|
-
If you cannot remember the exact command used by this skill, look it up here
|
|
17
|
-
before running anything. Do not guess.
|
|
18
|
-
|
|
19
18
|
```yaml
|
|
20
19
|
check-workflow-state: strict-spec-cli check-workflow-state
|
|
21
20
|
spec-edit: strict-spec-cli spec-edit <spec-id> [--spec-path <path>] --<named-args>
|
|
@@ -24,26 +23,16 @@ scene-status: strict-spec-cli scene-status [--area <area>] [--scene <scene-id>]
|
|
|
24
23
|
|
|
25
24
|
## CLI-Only YAML Authoring Protocol
|
|
26
25
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
schema and example keys with their cache-resolved paths, bound to the artifact
|
|
32
|
-
kind and current where a copy would go stale. Validate the result with
|
|
33
|
-
`strict-spec-cli check-workflow-state`.
|
|
34
|
-
|
|
35
|
-
**Stop rather than edit YAML directly.** When a required command, argument, or
|
|
36
|
-
artifact kind is unavailable, stop and report the missing capability. Editing
|
|
37
|
-
the YAML directly, writing a raw payload, or scripting around the CLI is never
|
|
38
|
-
an available fallback, and an unavailable command is a reason to stop rather
|
|
39
|
-
than a reason to improvise.
|
|
26
|
+
This skill writes `spec-state`. Before its first mutation, run
|
|
27
|
+
`strict-spec-cli yaml-authoring-protocol <artifact-kind>` for each kind and
|
|
28
|
+
follow it, including its rule to stop and report a missing command rather than
|
|
29
|
+
work around it; validate the result with `strict-spec-cli check-workflow-state`.
|
|
40
30
|
|
|
41
31
|
## Preferred Human Language
|
|
42
32
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
user
|
|
46
|
-
the active user message asks otherwise.
|
|
33
|
+
Write user-facing and generated operator-facing text in the human language named
|
|
34
|
+
by `preferred_human_language` in `.strict-spec-driven/config.yaml`, unless the
|
|
35
|
+
active user message asks otherwise.
|
|
47
36
|
|
|
48
37
|
## Steps
|
|
49
38
|
|
|
@@ -51,78 +40,39 @@ Before any other step, run `strict-spec-cli check-workflow-state`. If `.strict-s
|
|
|
51
40
|
missing, stop immediately and tell the user to run `/strict-spec-init`. Do not
|
|
52
41
|
run `init` from this skill.
|
|
53
42
|
|
|
54
|
-
1. **Choose the scan scope** —
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
- existing strict requirements that appear outdated or incomplete
|
|
85
|
-
- ambiguous findings that need human confirmation before they become specs
|
|
86
|
-
- areas with no meaningful drift in the scanned scope
|
|
87
|
-
|
|
88
|
-
5. **Report the drift summary in chat** — present a concise summary covering:
|
|
89
|
-
- the scan scope that was analyzed
|
|
90
|
-
- confirmed gaps or outdated strict spec areas, with specific file references
|
|
91
|
-
- ambiguous findings that need human input
|
|
92
|
-
- areas in scope where no meaningful drift was found
|
|
93
|
-
|
|
94
|
-
6. **Get user confirmation** — before editing any strict YAML spec file, ask the
|
|
95
|
-
user to confirm the proposed changes. List each strict spec file that will be
|
|
96
|
-
added, modified, or removed. Do not proceed until the user explicitly
|
|
97
|
-
approves.
|
|
98
|
-
|
|
99
|
-
7. **Synchronize through `spec-edit`** — for each confirmed gap, invoke the CLI
|
|
100
|
-
with the stable spec id and only the named semantic fields that changed:
|
|
101
|
-
- create a new main spec with `--spec-path`, `--title`, and one complete
|
|
102
|
-
`--requirement` / `--scenario` group
|
|
103
|
-
- add or update requirements and scenarios by stable id
|
|
104
|
-
- remove obsolete keyed entries with `--remove-requirement` or
|
|
105
|
-
`--remove-scenario`
|
|
106
|
-
Describe observable behavior only. Never edit the main-spec YAML or spec
|
|
107
|
-
index text; `spec-edit` validates both and reconciles `INDEX.yaml`
|
|
108
|
-
transactionally.
|
|
109
|
-
|
|
110
|
-
8. **Refresh supporting spec state** — after all strict spec edits are complete:
|
|
111
|
-
- confirm each mutation result reports the reconciled spec index
|
|
112
|
-
|
|
113
|
-
9. **Report final changes** — summarize:
|
|
114
|
-
- which strict spec files were added, modified, or removed
|
|
115
|
-
- a brief description of the drift fixed in each file
|
|
116
|
-
- any ambiguous findings that were left unresolved and why
|
|
43
|
+
1. **Choose the scan scope** — use the scope the user gave; otherwise ask
|
|
44
|
+
whether to scan the whole repository or a named directory, module, or
|
|
45
|
+
feature area.
|
|
46
|
+
|
|
47
|
+
2. **Read the recorded specs first** — read the spec index and every main spec
|
|
48
|
+
relevant to the scope. When the project records scenes, run `scene-status`
|
|
49
|
+
for the scope: a covered step names the requirement that should describe it,
|
|
50
|
+
which turns a drift question into a located comparison, and a waived step is
|
|
51
|
+
a recorded decision, not a coverage gap.
|
|
52
|
+
|
|
53
|
+
3. **Find the drift** — compare the code, tests, and nearby docs in scope
|
|
54
|
+
against the specs. Classify each finding as behavior missing from the specs,
|
|
55
|
+
a requirement that is outdated or incomplete (including a scene step whose
|
|
56
|
+
covering requirement no longer matches the code), or an ambiguity that needs
|
|
57
|
+
a human decision. Only observable behavior counts; internal implementation
|
|
58
|
+
detail is not a requirement.
|
|
59
|
+
|
|
60
|
+
4. **Report and confirm** — present in chat the scope analyzed, each finding
|
|
61
|
+
with file references, the ambiguities, and the clean areas, plus every spec
|
|
62
|
+
file to be added, modified, or removed. Write nothing until the user
|
|
63
|
+
explicitly approves.
|
|
64
|
+
|
|
65
|
+
5. **Synchronize** — apply each approved finding through `spec-edit` with the
|
|
66
|
+
stable spec id and only the named fields that change; read
|
|
67
|
+
`strict-spec-cli spec-edit --help --json` for creation, update, and removal
|
|
68
|
+
arguments. Done when every mutation reports the reconciled spec index and
|
|
69
|
+
`check-workflow-state` passes.
|
|
70
|
+
|
|
71
|
+
6. **Report** — summarize the files changed, the drift fixed in each, and any
|
|
72
|
+
finding left unresolved and why.
|
|
117
73
|
|
|
118
74
|
## Rules
|
|
119
75
|
|
|
120
|
-
-
|
|
121
|
-
-
|
|
122
|
-
-
|
|
123
|
-
- Use code, tests, and nearby docs as evidence, but write only observable
|
|
124
|
-
behavior into the strict specs
|
|
125
|
-
- Do not create a strict change — author live specs through `spec-edit`
|
|
126
|
-
- Do not write a standalone report file; the summary belongs in chat
|
|
127
|
-
- Get explicit user confirmation before editing any strict YAML spec file
|
|
128
|
-
- Never hand-edit main-spec or spec-index YAML
|
|
76
|
+
- Change no product code, create no strict change, and write no report file.
|
|
77
|
+
- Never edit main-spec or spec-index YAML directly; every mutation goes through
|
|
78
|
+
`spec-edit`.
|
|
@@ -8,28 +8,16 @@ metadata:
|
|
|
8
8
|
version: 1.0.0
|
|
9
9
|
---
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
or API design baselines. A main spec says what the system does; a technical
|
|
19
|
-
standard says how the code that implements it must be built.
|
|
20
|
-
|
|
21
|
-
Use this skill only for standalone, lightweight standard maintenance that is not
|
|
22
|
-
part of an active strict change. When a standard change is part of a code change
|
|
23
|
-
— so it must be reviewed and merged alongside that change — do not edit the live
|
|
24
|
-
standard here; carry it as a delta tech artifact under
|
|
25
|
-
`.strict-spec-driven/changes/<name>/tech/` through `/strict-spec-propose`,
|
|
26
|
-
`/strict-spec-apply`, and archive instead.
|
|
11
|
+
Make a lightweight, standalone edit to the live technical standards under
|
|
12
|
+
`.strict-spec-driven/tech/`. A main spec says what the system does; a technical
|
|
13
|
+
standard says how the code that implements it must be built — technology
|
|
14
|
+
choices, coding conventions, architecture rules, and security, performance, or
|
|
15
|
+
API baselines. A standard change that ships with a code change is not edited
|
|
16
|
+
here: it travels as delta tech inside that change through `strict-spec-propose`
|
|
17
|
+
and `strict-spec-apply`.
|
|
27
18
|
|
|
28
19
|
## This Skill's Commands
|
|
29
20
|
|
|
30
|
-
If you cannot remember the exact command used by this skill, look it up here
|
|
31
|
-
before running anything. Do not guess.
|
|
32
|
-
|
|
33
21
|
```yaml
|
|
34
22
|
check-workflow-state: strict-spec-cli check-workflow-state
|
|
35
23
|
tech-edit: strict-spec-cli tech-edit <standard-id> [--tech-path <path>] --<named-args>
|
|
@@ -41,26 +29,16 @@ schema-show: strict-spec-cli schema-show main-tech
|
|
|
41
29
|
|
|
42
30
|
## CLI-Only YAML Authoring Protocol
|
|
43
31
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
schema and example keys with their cache-resolved paths, bound to the artifact
|
|
49
|
-
kind and current where a copy would go stale. Validate the result with
|
|
50
|
-
`strict-spec-cli tech-status`.
|
|
51
|
-
|
|
52
|
-
**Stop rather than edit YAML directly.** When a required command, argument, or
|
|
53
|
-
artifact kind is unavailable, stop and report the missing capability. Editing
|
|
54
|
-
the YAML directly, writing a raw payload, or scripting around the CLI is never
|
|
55
|
-
an available fallback, and an unavailable command is a reason to stop rather
|
|
56
|
-
than a reason to improvise.
|
|
32
|
+
This skill writes `tech-state`. Before its first mutation, run
|
|
33
|
+
`strict-spec-cli yaml-authoring-protocol <artifact-kind>` for each kind and
|
|
34
|
+
follow it, including its rule to stop and report a missing command rather than
|
|
35
|
+
work around it; validate the result with `strict-spec-cli tech-status`.
|
|
57
36
|
|
|
58
37
|
## Preferred Human Language
|
|
59
38
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
user
|
|
63
|
-
the active user message asks otherwise.
|
|
39
|
+
Write user-facing and generated operator-facing text in the human language named
|
|
40
|
+
by `preferred_human_language` in `.strict-spec-driven/config.yaml`, unless the
|
|
41
|
+
active user message asks otherwise.
|
|
64
42
|
|
|
65
43
|
## Steps
|
|
66
44
|
|
|
@@ -68,94 +46,35 @@ Before any other step, run `strict-spec-cli check-workflow-state`. If `.strict-s
|
|
|
68
46
|
missing, stop immediately and tell the user to run `/strict-spec-init`. Do not
|
|
69
47
|
run `init` from this skill.
|
|
70
48
|
|
|
71
|
-
1. **Read
|
|
72
|
-
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
-
|
|
90
|
-
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
- if an existing standard file covers the area, use it
|
|
96
|
-
- only create a new standard file if no existing file fits
|
|
97
|
-
- keep one standard file focused on one category
|
|
98
|
-
(`coding`, `architecture`, `security`, `performance`, `api`, `testing`,
|
|
99
|
-
`tooling`, `operations`, or `documentation`)
|
|
100
|
-
|
|
101
|
-
5. **Prepare the changes** — draft the exact structured edits. Every rule must
|
|
102
|
-
carry:
|
|
103
|
-
- `strength`: MUST (required, no exceptions), SHOULD (default unless
|
|
104
|
-
justified), or MAY (genuinely optional)
|
|
105
|
-
- `statement`: the rule itself, phrased as an enforceable engineering
|
|
106
|
-
constraint
|
|
107
|
-
- `rationale`: why the rule exists — this is what separates a standard from
|
|
108
|
-
arbitrary preference
|
|
109
|
-
- `enforcement`: a `method` of `lint`, `ci`, `test`, `review`, or `manual`,
|
|
110
|
-
plus optional `detail`
|
|
111
|
-
- optional `examples.good` / `examples.bad` and `exceptions`
|
|
112
|
-
|
|
113
|
-
6. **Present and confirm** — show the user:
|
|
114
|
-
- which strict YAML standard file or files will change
|
|
115
|
-
- the exact content that will be added, modified, or removed
|
|
116
|
-
- whether `.strict-spec-driven/tech/INDEX.yaml` needs updating
|
|
117
|
-
|
|
118
|
-
Wait for explicit confirmation before writing anything.
|
|
119
|
-
|
|
120
|
-
7. **Apply the confirmed edits through `tech-edit`** — after confirmation:
|
|
121
|
-
- create a standard with `tech-edit <standard-id> --tech-path <path>
|
|
122
|
-
--title <text> --category <category> --rule <id> --strength
|
|
123
|
-
<MUST|SHOULD|MAY> --statement <text> --rationale <text> --method
|
|
124
|
-
<lint|ci|test|review|manual>`
|
|
125
|
-
- update one rule by restating `--rule <id>` and only the scalar, enforcement,
|
|
126
|
-
example, or exception fields that changed
|
|
127
|
-
- remove keyed content with `--remove-rule`, or rule-scoped examples and
|
|
128
|
-
exceptions with their named removal flags
|
|
129
|
-
- use isolated `tech-edit <standard-id> --delete` only for a confirmed whole
|
|
130
|
-
standard removal; active delta-tech references block deletion
|
|
131
|
-
Never edit main-tech or tech-index YAML text. The command validates the full
|
|
132
|
-
candidate and reconciles the index in the same transaction.
|
|
133
|
-
- link any lesson the new rule came from, now that the standard exists:
|
|
134
|
-
```bash
|
|
135
|
-
strict-spec-cli lesson-edit <lesson-id> --promoted-standard <standard-id> --promoted-rule <rule-id>
|
|
136
|
-
```
|
|
137
|
-
This sets the lesson to `promoted` and drops it from the default lesson
|
|
138
|
-
list so the same guidance is not surfaced twice. Never delete the lesson —
|
|
139
|
-
a rule states what must be done but omits the failure that motivated it,
|
|
140
|
-
and the lesson is the only remaining record of that failure.
|
|
141
|
-
|
|
142
|
-
8. **Validate the result** — after editing, verify:
|
|
143
|
-
- each edited file remains valid strict YAML matching the `main-tech` schema
|
|
144
|
-
- the mutation result reports the reconciled tech index
|
|
145
|
-
- run `tech-status` to confirm the standards and rules read back correctly
|
|
146
|
-
|
|
147
|
-
9. **Summarize** — tell the user which strict YAML standard files changed, what
|
|
148
|
-
was added, modified, or removed, and whether `INDEX.yaml` was updated.
|
|
49
|
+
1. **Read the recorded standards** — run `tech-status` and read the standards
|
|
50
|
+
the request touches; `schema-show main-tech` renders the rule shape.
|
|
51
|
+
|
|
52
|
+
2. **Check for a lesson behind the rule** — run `lesson-status` for the target
|
|
53
|
+
category. A lesson with repeated occurrences is the strongest evidence a rule
|
|
54
|
+
is needed, and its observation supplies the rationale; note it for linking.
|
|
55
|
+
|
|
56
|
+
3. **Place the rule** — use the existing standard that covers the area; create
|
|
57
|
+
a new standard only when none fits, and keep each standard to one category.
|
|
58
|
+
|
|
59
|
+
4. **Confirm the exact edit** — show the user each standard that changes and
|
|
60
|
+
every rule added, modified, or removed, with its strength, statement,
|
|
61
|
+
rationale, and enforcement. A rule without a rationale and an enforcement
|
|
62
|
+
method is preference, not a standard. Write nothing until the user
|
|
63
|
+
explicitly approves.
|
|
64
|
+
|
|
65
|
+
5. **Apply** — express each approved edit through `tech-edit` with stable ids
|
|
66
|
+
and only the named fields that change; read
|
|
67
|
+
`strict-spec-cli tech-edit --help --json` for its arguments. Then link each
|
|
68
|
+
originating lesson through `lesson-edit`, which marks it promoted.
|
|
69
|
+
|
|
70
|
+
6. **Validate and summarize** — done when each result reports the reconciled
|
|
71
|
+
tech index and `tech-status` reads the standards back correctly; report what
|
|
72
|
+
changed.
|
|
149
73
|
|
|
150
74
|
## Rules
|
|
151
75
|
|
|
152
|
-
-
|
|
153
|
-
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
-
|
|
157
|
-
rules
|
|
158
|
-
- Do not implement product code
|
|
159
|
-
- Do not create or interact with `.strict-spec-driven/changes/`
|
|
160
|
-
- Never hand-edit main-tech or tech-index YAML; express every standalone
|
|
161
|
-
mutation through `strict-spec-cli tech-edit`
|
|
76
|
+
- Change no product code and do not touch `.strict-spec-driven/changes/`.
|
|
77
|
+
- Never delete a promoted lesson: the rule omits the failure that motivated it,
|
|
78
|
+
and the lesson is the only remaining record of that failure.
|
|
79
|
+
- Never edit main-tech or tech-index YAML directly; every mutation goes through
|
|
80
|
+
`tech-edit`.
|