dsh-plugin-strict-spec 0.5.1 → 0.6.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 +108 -770
  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 +98 -270
  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 +121 -273
  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-spec-verify/SKILL.md +28 -43
  27. package/dist/skills/strict-tech-edit/SKILL.md +43 -124
  28. package/dist/skills/strict-tech-sync/SKILL.md +60 -162
  29. package/package.json +2 -1
@@ -8,15 +8,13 @@ metadata:
8
8
  version: 1.0.0
9
9
  ---
10
10
 
11
- You are helping the user create or modify strict YAML main spec files under
12
- `.strict-spec-driven/specs/` through the artifact-aware CLI, without going
13
- through the strict change workflow.
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
- Every mutation of repository-owned YAML in this skill goes through the strict
28
- CLI. This skill writes `spec-state`. Before the first mutation run
29
- `strict-spec-cli yaml-authoring-protocol spec-state`: that command reports the
30
- ordered authoring steps, the owning command for each operation, and the bundled
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
- Comply with `preferred_human_language` from `.strict-spec-driven/config.yaml` —
44
- the user's common human language, not a programming language — for all
45
- user-facing and generated operator-facing text, unless that file is absent or
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 strict spec context first** — before making any changes, read:
55
- - `.strict-spec-driven/config.yaml`
56
- - `.strict-spec-driven/specs/INDEX.yaml`
57
- - any existing strict YAML main spec files relevant to the user's request
58
-
59
- 2. **Understand the request** — identify whether the user wants to:
60
- - add a new strict YAML spec file or category
61
- - add new structured requirements to an existing strict spec file
62
- - modify an existing requirement
63
- - remove one or more existing requirements
64
-
65
- 3. **Choose the target** — use `INDEX.yaml` to determine where the content
66
- belongs:
67
- - if one or more existing strict spec files cover the behavior, use those
68
- - only create a new strict spec file if no existing file fits
69
- - only create a new category if no existing category fits
70
-
71
- 4. **Prepare the changes** — draft the exact structured edits:
72
- - for additions, identify the requirement entry and any scenario entries to add
73
- - for modifications, show the before and after requirement content
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
- - Always read existing strict specs before authoring through `spec-edit`
110
- - Present the exact changes and wait for confirmation before writing
111
- - Prefer existing categories and files unless the content clearly requires a new
112
- path
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
- You are helping the user synchronize `.strict-spec-driven/specs/` with behavior
12
- that already exists in the repository.
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
- Every mutation of repository-owned YAML in this skill goes through the strict
28
- CLI. This skill writes `spec-state`. Before the first mutation run
29
- `strict-spec-cli yaml-authoring-protocol spec-state`: that command reports the
30
- ordered authoring steps, the owning command for each operation, and the bundled
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
- Comply with `preferred_human_language` from `.strict-spec-driven/config.yaml` —
44
- the user's common human language, not a programming language — for all
45
- user-facing and generated operator-facing text, unless that file is absent or
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** — determine whether the user wants:
55
- - a repository-wide scan
56
- - a scoped scan for a specific directory, module, or feature area
57
-
58
- If the user already gave a scope, use it. If not, ask whether to scan the
59
- whole repository or a narrower target.
60
-
61
- 2. **Read strict spec context first** — before deciding that any drift exists,
62
- read:
63
- - `.strict-spec-driven/config.yaml`
64
- - `.strict-spec-driven/specs/INDEX.yaml`
65
- - every strict YAML main spec file that appears relevant to the chosen scope
66
- - the recorded scenes covering that scope, through
67
- `strict-spec-cli scene-status --area <area>`, when the project records any.
68
- A step reported as covered names the requirement that is supposed to
69
- describe it, which turns a drift question into a located comparison; a step
70
- reported as a deliberate waiver is not a gap. A project recording no scene
71
- produces nothing here and the scan proceeds unchanged.
72
-
73
- 3. **Read repository evidence in the chosen scope** — inspect the code, tests,
74
- and nearby docs that define current observable behavior in that area.
75
- Prefer behavior-facing files, and do not treat internal implementation
76
- details as requirements.
77
-
78
- 4. **Classify drift findings** — compare repository evidence to the current
79
- strict specs and sort findings into:
80
- - confirmed behavior that exists in code but is missing from strict specs
81
- - a recorded scene step whose covering requirement no longer describes what
82
- the code does, which is drift the scene located rather than drift found by
83
- reading code alone
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
- - This is a documentation skill only — do not change product code
121
- - Read strict spec context before judging drift
122
- - Respect the user-selected scope
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,13 +8,11 @@ metadata:
8
8
  version: 1.0.0
9
9
  ---
10
10
 
11
- You are helping the user verify a strict YAML change before archive.
11
+ Establish, from repository evidence rather than checked boxes, that an
12
+ implemented strict change is complete and consistent enough to review.
12
13
 
13
14
  ## This Skill's Commands
14
15
 
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
16
  ```yaml
19
17
  check-workflow-state: strict-spec-cli check-workflow-state
20
18
  modify: strict-spec-cli modify [change-name|archive-dir]
@@ -23,10 +21,9 @@ verify: strict-spec-cli verify <change-name>
23
21
 
24
22
  ## Preferred Human Language
25
23
 
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.
24
+ Write user-facing and generated operator-facing text in the human language named
25
+ by `preferred_human_language` in `.strict-spec-driven/config.yaml`, unless the
26
+ active user message asks otherwise.
30
27
 
31
28
  ## Steps
32
29
 
@@ -34,46 +31,34 @@ Before any other step, run `strict-spec-cli check-workflow-state`. If `.strict-s
34
31
  missing, stop immediately and tell the user to run `/strict-spec-init`. Do not
35
32
  run `init` from this skill.
36
33
 
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.
34
+ 1. **Select the change** — use the change the user named; otherwise `modify`
35
+ without an argument lists the active ones.
45
36
 
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
37
+ 2. **Run strict verification** — run `verify <change-name>`; every diagnostic
38
+ it returns is a blocker until resolved. A scene coverage gap is a finding to
39
+ resolve, not something to waive.
54
40
 
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
41
+ 3. **Check the evidence behind the tasks** — read the change's planning
42
+ artifacts and delta specs, the relevant main specs, and the implementation
43
+ and test files the change touches, and confirm the repository matches every
44
+ completed task. Blockers: an unfinished task, a non-empty
45
+ `questions.yaml.open`, a delta spec that does not describe what was built,
46
+ and any regression of a `proposal.yaml.unchanged_behavior` item.
65
47
 
66
- 5. **Check unchanged behavior** — compare the implementation against
67
- `proposal.yaml.unchanged_behavior` and treat regressions as blockers.
48
+ 4. **Honor the declared coverage contract** — when the workflow config declares
49
+ one under `review_evidence.project_regression.coverage`, the configured
50
+ regression command enforces it through its exit code. The coverage contract
51
+ is blocking evidence, never advisory: a coverage failure blocks exactly like
52
+ a failing test. Never measure coverage yourself or second-guess the
53
+ threshold.
68
54
 
69
- 6. **Fix safe blockers automatically** — if a verification issue is clearly
70
- fixable, fix it and rerun `verify`.
55
+ 5. **Fix safe blockers** — fix what is clearly fixable within the change's
56
+ scope and rerun `verify`; done when it passes and no blocker remains.
71
57
 
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.
58
+ 6. **Report** — give a tiered summary of blockers, warnings, and optional
59
+ suggestions, and recommend `strict-spec-review` when the change is clean.
75
60
 
76
61
  ## Rules
77
62
 
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
63
+ - Be honest: a checked task is not proof by itself, and the current YAML
64
+ artifacts and repository state are the source of truth.
@@ -8,28 +8,16 @@ metadata:
8
8
  version: 1.0.0
9
9
  ---
10
10
 
11
- You are helping the user create or modify strict YAML technical standard files
12
- under `.strict-spec-driven/tech/` through the artifact-aware CLI, without going
13
- through the strict change workflow.
14
-
15
- Technical standards capture the implementation-facing engineering rules that
16
- main specs deliberately exclude: technology choices, coding conventions,
17
- architecture rules, internal structure constraints, and security, performance,
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
- Every mutation of repository-owned YAML in this skill goes through the strict
45
- CLI. This skill writes `tech-state`. Before the first mutation run
46
- `strict-spec-cli yaml-authoring-protocol tech-state`: that command reports the
47
- ordered authoring steps, the owning command for each operation, and the bundled
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
- Comply with `preferred_human_language` from `.strict-spec-driven/config.yaml` —
61
- the user's common human language, not a programming language — for all
62
- user-facing and generated operator-facing text, unless that file is absent or
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 strict tech context first** — before making any changes, read:
72
- - `.strict-spec-driven/config.yaml`
73
- - `.strict-spec-driven/tech/INDEX.yaml`
74
- - run `tech-status` to see existing standards and their rules
75
- - any existing strict YAML technical standard files relevant to the request
76
- - the schema contract via `schema-show main-tech` when unsure of the shape
77
-
78
- 2. **Check whether a lesson is being promoted** — run
79
- `strict-spec-cli lesson-status --category <category>` with the target standard's category and
80
- check whether recorded experience already
81
- covers the rule being added. A lesson with repeated occurrences is the
82
- strongest case for a new standard: the recurrence count is objective evidence
83
- that the rule is needed, and the lesson's `observation` already supplies the
84
- `rationale`. Note any lesson the rule originates from; step 7 links them once
85
- the standard exists.
86
-
87
- 3. **Understand the request** — identify whether the user wants to:
88
- - add a new strict YAML technical standard file or category
89
- - add new structured rules to an existing standard file
90
- - modify an existing rule
91
- - remove one or more existing rules
92
-
93
- 4. **Choose the target** — use `INDEX.yaml` and `tech-status` to determine where
94
- the content belongs:
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
- - Always read existing standards before authoring through `tech-edit`
153
- - Present the exact changes and wait for confirmation before writing
154
- - Prefer existing categories and files unless the content clearly requires a new
155
- path
156
- - Every rule MUST carry a rationale and an enforcement method — no rationale-free
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`.