cyber-sdd 0.7.0 → 0.7.1

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 (149) hide show
  1. package/.claude-plugin/plugin.json +1 -2
  2. package/.codex-plugin/plugin.json +1 -2
  3. package/agents/sdd-scanner.md +1 -1
  4. package/package.json +11 -13
  5. package/plugin.json +55 -0
  6. package/skills/align-spec/SKILL.md +1 -1
  7. package/skills/align-spec/scripts/align-spec.mjs +6755 -12
  8. package/skills/blast-estimate/README.md +3 -3
  9. package/skills/blast-estimate/scripts/blast-estimate.mjs +601 -12
  10. package/skills/check-field-mandates/scripts/check-field-mandates.mjs +253 -12
  11. package/skills/check-partition-quality/scripts/check-partition-quality.mjs +235 -12
  12. package/skills/check-plan-safety/SKILL.md +2 -3
  13. package/skills/check-plan-safety/scripts/check-plan-safety.mjs +109 -12
  14. package/skills/check-plugin-manifests/scripts/check-plugin-manifests.mjs +250 -12
  15. package/skills/check-project-specs/SKILL.md +1 -1
  16. package/skills/check-project-specs/scripts/check-project-specs.mjs +593 -12
  17. package/skills/check-retired-terms/SKILL.md +2 -3
  18. package/skills/check-retired-terms/scripts/check-retired-terms.mjs +186 -12
  19. package/skills/check-scenario-overlap/SKILL.md +1 -2
  20. package/skills/check-scenario-overlap/scripts/check-scenario-overlap.mjs +177 -12
  21. package/skills/check-spec-references/SKILL.md +2 -2
  22. package/skills/check-spec-references/scripts/check-spec-references.mjs +287 -12
  23. package/skills/check-spec-structure/SKILL.md +1 -2
  24. package/skills/check-spec-structure/scripts/check-spec-structure.mjs +243 -12
  25. package/skills/collision-ladder/README.md +2 -2
  26. package/skills/collision-ladder/scripts/collision-ladder.mjs +7047 -12
  27. package/skills/combat-log-governance/SKILL.md +1 -1
  28. package/skills/concept-index/SKILL.md +1 -1
  29. package/skills/concept-index/scripts/concept-index.mjs +183 -12
  30. package/skills/discover-plans/README.md +3 -3
  31. package/skills/discover-plans/SKILL.md +1 -1
  32. package/skills/discover-plans/scripts/discover-plans.mjs +137 -12
  33. package/skills/discover-specs/README.md +3 -3
  34. package/skills/discover-specs/SKILL.md +1 -1
  35. package/skills/discover-specs/scripts/discover-specs.mjs +321 -12
  36. package/skills/doctrine-loop/SKILL.md +1 -1
  37. package/skills/gate-validation-governance/SKILL.md +1 -1
  38. package/skills/init/README.md +2 -2
  39. package/skills/init/scripts/wire-statusline.mjs +168 -12
  40. package/skills/manage-ignore/README.md +3 -3
  41. package/skills/manage-ignore/SKILL.md +1 -2
  42. package/skills/manage-ignore/scripts/manage-ignore.mjs +285 -12
  43. package/skills/manage-scenario-bridge/README.md +3 -3
  44. package/skills/manage-scenario-bridge/SKILL.md +1 -1
  45. package/skills/manage-scenario-bridge/scripts/manage-scenario-bridge.mjs +239 -12
  46. package/skills/manage-spec-anchors/README.md +3 -3
  47. package/skills/manage-spec-anchors/SKILL.md +1 -1
  48. package/skills/manage-spec-anchors/scripts/manage-spec-anchors.mjs +310 -12
  49. package/skills/mission-graph/README.md +2 -2
  50. package/skills/mission-graph/SKILL.md +1 -1
  51. package/skills/mission-graph/scripts/mission-graph.mjs +1040 -12
  52. package/skills/pause-mission/SKILL.md +1 -1
  53. package/skills/place-node/SKILL.md +2 -2
  54. package/skills/place-node/scripts/place-node.mjs +117 -12
  55. package/skills/plan-retirement/README.md +2 -2
  56. package/skills/plan-retirement/scripts/retire-plans.mjs +123 -12
  57. package/skills/resolve-governances/README.md +3 -3
  58. package/skills/resolve-governances/SKILL.md +1 -1
  59. package/skills/resolve-governances/scripts/resolve-governances.mjs +352 -12
  60. package/skills/resolve-tracking/SKILL.md +1 -1
  61. package/skills/resolve-tracking/scripts/resolve-tracking.mjs +152 -12
  62. package/skills/scaffold-project-spec/SKILL.md +1 -1
  63. package/skills/spec-gate/README.md +12 -9
  64. package/skills/spec-gate/SKILL.md +2 -2
  65. package/skills/spec-gate/scripts/check-spec-state.mjs +422 -12
  66. package/skills/spec-gate/scripts/check-suite.mjs +6500 -12
  67. package/skills/spec-gate/scripts/classify-edit-class.mjs +6579 -12
  68. package/skills/spec-producer-governance/SKILL.md +2 -2
  69. package/skills/start-mission/SKILL.md +1 -1
  70. package/skills/suite-format-governance/README.md +1 -1
  71. package/skills/suite-format-governance/SKILL.md +1 -1
  72. package/skills/touch-set-correction/README.md +5 -5
  73. package/skills/touch-set-correction/SKILL.md +1 -1
  74. package/skills/touch-set-correction/scripts/touch-set-correction.mjs +6663 -12
  75. package/skills/verify-scenarios/README.md +6 -6
  76. package/skills/verify-scenarios/scripts/verify-scenarios.mjs +6539 -12
  77. package/.plugin/pins.json +0 -3
  78. package/.plugin/plugin.json +0 -19
  79. package/dist/align-spec/scripts/align-spec.js +0 -102
  80. package/dist/check-project-specs/scripts/check-project-specs.js +0 -312
  81. package/dist/check-scenario-overlap/scripts/check-scenario-overlap.js +0 -175
  82. package/dist/check-spec-references/scripts/check-spec-references.js +0 -285
  83. package/dist/check-spec-structure/scripts/check-spec-structure.js +0 -241
  84. package/dist/concept-index/scripts/concept-index.js +0 -181
  85. package/dist/discover-specs/scripts/discover-specs.js +0 -318
  86. package/dist/spec-gate/scripts/check-spec-state.js +0 -420
  87. package/dist/spec-gate/scripts/check-suite.js +0 -317
  88. package/dist/spec-gate/scripts/classify-edit-class.js +0 -263
  89. package/dist/spec-gate/vendor/gherkin-cli.js +0 -6369
  90. package/skills/align-spec/scripts/align-spec.bundle.mjs +0 -6753
  91. package/skills/align-spec/scripts/align-spec.mts +0 -188
  92. package/skills/blast-estimate/scripts/blast-estimate.bundle.mjs +0 -593
  93. package/skills/blast-estimate/scripts/blast-estimate.mts +0 -586
  94. package/skills/check-field-mandates/scripts/check-field-mandates.bundle.mjs +0 -251
  95. package/skills/check-field-mandates/scripts/check-field-mandates.mts +0 -337
  96. package/skills/check-partition-quality/scripts/check-partition-quality.bundle.mjs +0 -233
  97. package/skills/check-partition-quality/scripts/check-partition-quality.mts +0 -338
  98. package/skills/check-plan-safety/scripts/check-plan-safety.bundle.mjs +0 -107
  99. package/skills/check-plan-safety/scripts/check-plan-safety.mts +0 -148
  100. package/skills/check-plugin-manifests/scripts/check-plugin-manifests.bundle.mjs +0 -248
  101. package/skills/check-plugin-manifests/scripts/check-plugin-manifests.mts +0 -303
  102. package/skills/check-project-specs/scripts/check-project-specs.bundle.mjs +0 -584
  103. package/skills/check-project-specs/scripts/check-project-specs.mts +0 -370
  104. package/skills/check-retired-terms/scripts/check-retired-terms.bundle.mjs +0 -184
  105. package/skills/check-retired-terms/scripts/check-retired-terms.mts +0 -293
  106. package/skills/check-scenario-overlap/scripts/check-scenario-overlap.bundle.mjs +0 -175
  107. package/skills/check-scenario-overlap/scripts/check-scenario-overlap.mts +0 -250
  108. package/skills/check-spec-references/scripts/check-spec-references.bundle.mjs +0 -285
  109. package/skills/check-spec-references/scripts/check-spec-references.mts +0 -422
  110. package/skills/check-spec-structure/scripts/check-spec-structure.bundle.mjs +0 -241
  111. package/skills/check-spec-structure/scripts/check-spec-structure.mts +0 -347
  112. package/skills/collision-ladder/scripts/collision-ladder.bundle.mjs +0 -7041
  113. package/skills/collision-ladder/scripts/collision-ladder.mts +0 -662
  114. package/skills/concept-index/scripts/concept-index.bundle.mjs +0 -181
  115. package/skills/concept-index/scripts/concept-index.mts +0 -246
  116. package/skills/discover-plans/scripts/discover-plans.bundle.mjs +0 -135
  117. package/skills/discover-plans/scripts/discover-plans.mts +0 -215
  118. package/skills/discover-specs/scripts/discover-specs.bundle.mjs +0 -319
  119. package/skills/discover-specs/scripts/discover-specs.mts +0 -420
  120. package/skills/init/scripts/wire-statusline.bundle.mjs +0 -166
  121. package/skills/init/scripts/wire-statusline.mts +0 -279
  122. package/skills/manage-ignore/scripts/manage-ignore.bundle.mjs +0 -244
  123. package/skills/manage-ignore/scripts/manage-ignore.mts +0 -297
  124. package/skills/manage-scenario-bridge/scripts/manage-scenario-bridge.bundle.mjs +0 -237
  125. package/skills/manage-scenario-bridge/scripts/manage-scenario-bridge.mts +0 -159
  126. package/skills/manage-spec-anchors/scripts/manage-spec-anchors.bundle.mjs +0 -308
  127. package/skills/manage-spec-anchors/scripts/manage-spec-anchors.mts +0 -331
  128. package/skills/mission-graph/scripts/mission-graph.bundle.mjs +0 -1038
  129. package/skills/mission-graph/scripts/mission-graph.mts +0 -1333
  130. package/skills/place-node/scripts/place-node.bundle.mjs +0 -115
  131. package/skills/place-node/scripts/place-node.mts +0 -158
  132. package/skills/plan-retirement/scripts/retire-plans.bundle.mjs +0 -121
  133. package/skills/plan-retirement/scripts/retire-plans.mts +0 -205
  134. package/skills/resolve-governances/scripts/resolve-governances.bundle.mjs +0 -350
  135. package/skills/resolve-governances/scripts/resolve-governances.mts +0 -518
  136. package/skills/resolve-tracking/scripts/resolve-tracking.bundle.mjs +0 -150
  137. package/skills/resolve-tracking/scripts/resolve-tracking.mts +0 -214
  138. package/skills/spec-gate/scripts/check-spec-state.bundle.mjs +0 -420
  139. package/skills/spec-gate/scripts/check-spec-state.mts +0 -637
  140. package/skills/spec-gate/scripts/check-suite.bundle.mjs +0 -6498
  141. package/skills/spec-gate/scripts/check-suite.mts +0 -538
  142. package/skills/spec-gate/scripts/classify-edit-class.bundle.mjs +0 -6577
  143. package/skills/spec-gate/scripts/classify-edit-class.mts +0 -414
  144. package/skills/spec-gate/vendor/gherkin-cli.d.mts +0 -2
  145. package/skills/spec-gate/vendor/gherkin-cli.mjs +0 -6545
  146. package/skills/touch-set-correction/scripts/touch-set-correction.bundle.mjs +0 -6655
  147. package/skills/touch-set-correction/scripts/touch-set-correction.mts +0 -429
  148. package/skills/verify-scenarios/scripts/verify-scenarios.bundle.mjs +0 -6537
  149. package/skills/verify-scenarios/scripts/verify-scenarios.mts +0 -470
@@ -40,7 +40,7 @@ USER_ANSWERS: <answers to previously returned QUESTIONS — or null>
40
40
 
41
41
  **A `Given` is a test vector, not specification** (`sdd:suite-format-governance` carries the canonical bar and the swap test). Author each `Given`'s apparatus — its domain, entities, names, framing — from a domain **the artifact does not illustrate**. On a revise CR the apparatus never reuses the artifact's existing worked examples; on `BACKFILL` it never reuses the illustrations you read out of source. Read those examples in full at step 1 — they are evidence of the behavior you are specifying; exclude them only from the apparatus you author into a `Given`.
42
42
 
43
- 5. **Self-check the `.feature` form before returning.** Run the deterministic form check — the `check-suite` engine (`scripts/check-suite.mts` in the `spec-gate` skill), the executable form of `sdd:suite-format-governance` — scoped to what you just authored:
43
+ 5. **Self-check the `.feature` form before returning.** Run the deterministic form check — the `check-suite` engine (`scripts/check-suite.mjs` in the `spec-gate` skill), the executable form of `sdd:suite-format-governance` — scoped to what you just authored:
44
44
 
45
45
  ```bash
46
46
  node "<spec-gate skill>/scripts/check-suite.mjs" --files <the authored .feature path(s)>
@@ -58,7 +58,7 @@ USER_ANSWERS: <answers to previously returned QUESTIONS — or null>
58
58
 
59
59
  **Check coverage and mirroring before returning.** Every outcome and carve-out the node's `## Use Cases` / README states — including an exception named only in prose — must have at least one scenario; do not report `STATUS: complete` while a stated outcome or carve-out has none — add the missing scenario. A **duty specified on one node of a mirrored pair** (producer/judge, sender/receiver) must be **mirrored on the counterpart node**; do not report complete while only one side carries the duty — specify it on the counterpart too (`sdd:suite-format-governance`).
60
60
 
61
- Also self-run **referenced-artifact-exists** — `check-spec-state.mts` in `scripts/`, scoped to
61
+ Also self-run **referenced-artifact-exists** — `check-spec-state.mjs` in `scripts/`, scoped to
62
62
  the `spec.md`/`README.md` you just authored or touched:
63
63
 
64
64
  ```bash
@@ -90,7 +90,7 @@ For each unit the CR touches:
90
90
  3. On convergence → exit to the spec gate.
91
91
  4. On `blocked`, or the cap hit without converging → **do not auto-accept**. Present the failing scenarios and ask the user to **accept as-is**, **keep looping** (reset the count), or **change direction**.
92
92
 
93
- **Freeze re-open guard.** A node at `status: approved` or `implemented` has a **frozen `.feature`**. The unfreeze trigger is **risk, not phase** (`sdd:lifecycle-governance`), so what you may do to that file depends on the *edit class*, not on it being frozen — read the edit class **structurally**, per named `Scenario`, **never from a raw line diff** (a step orphaned off a frozen scenario onto a new adjacent scenario shows no `-` line and would misread as additive): `npx gherkin-cli@0.0.2 diff --base <baseref> <file> --format json` (`addOnly` / only `added` ⇒ additive; any `modified`/`removed` ⇒ examine for narrowing), or the spec-gate's `plugins/sdd/skills/spec-gate/scripts/classify-edit-class.mts` which wraps this same structural diff plus git rename detection. An **additive** scenario (new behavior, nothing weakened) **self-clears — it stays `@frozen`, needs no re-open**; a **pure move/rename** (`git mv`, zero content delta) likewise **preserves freeze and is not a gate-able edit**. Only a **narrowing or rewriting** edit to an existing scenario is a re-open — a freeze transition and a `status` write you do not own, so confirm it was **ratified** (the lightweight async re-open flag) before touching that scenario's content. **Never narrow or rewrite a frozen scenario without the ratified re-open**; adding and relocating need none.
93
+ **Freeze re-open guard.** A node at `status: approved` or `implemented` has a **frozen `.feature`**. The unfreeze trigger is **risk, not phase** (`sdd:lifecycle-governance`), so what you may do to that file depends on the *edit class*, not on it being frozen — read the edit class **structurally**, per named `Scenario`, **never from a raw line diff** (a step orphaned off a frozen scenario onto a new adjacent scenario shows no `-` line and would misread as additive): `npx gherkin-cli@0.0.2 diff --base <baseref> <file> --format json` (`addOnly` / only `added` ⇒ additive; any `modified`/`removed` ⇒ examine for narrowing), or the spec-gate's `plugins/sdd/skills/spec-gate/scripts/classify-edit-class.mjs` which wraps this same structural diff plus git rename detection. An **additive** scenario (new behavior, nothing weakened) **self-clears — it stays `@frozen`, needs no re-open**; a **pure move/rename** (`git mv`, zero content delta) likewise **preserves freeze and is not a gate-able edit**. Only a **narrowing or rewriting** edit to an existing scenario is a re-open — a freeze transition and a `status` write you do not own, so confirm it was **ratified** (the lightweight async re-open flag) before touching that scenario's content. **Never narrow or rewrite a frozen scenario without the ratified re-open**; adding and relocating need none.
94
94
 
95
95
  **Route observations.** Each production-chain producer (spec-, impl-, solution-producer) may surface typed `OBSERVATIONS` (`architect` | `strategist`); never act on them silently. When several producers surface observations in one segment, **forward every producer's observations to the plan — drop or filter none of them** — and **spawn no spec of your own** from them. A granularity / split observation becomes a **new node** or a **project-spec** operation (the plan's or the user's call) — never a marker grown into this node, and never a spawn you make here. An observation the plan or user then **declines** is dropped by that decision — an explicit call, not silent loss.
96
96
 
@@ -40,7 +40,7 @@ order, stepping down from the happy path to its branches and errors.
40
40
  ## The executable check — `check-suite`
41
41
 
42
42
  The mechanical rules — Gherkin validity, boolean `Then`s, section comments, Outline coverage, and
43
- the scenario-map binding — are linted by `check-suite` (`spec-gate/scripts/check-suite.mts`). The
43
+ the scenario-map binding — are linted by `check-suite` (`spec-gate/scripts/check-suite.mjs`). The
44
44
  spec-producer self-runs it before returning, and the spec gate runs it fail-closed before the cold
45
45
  judge. It checks **form only**: whether the map's rows actually cover the drawn CFG — coverage,
46
46
  discrimination, consistency — is judged, never linted, so a green check clears no coverage
@@ -304,7 +304,7 @@ every scenario carries a map row, every row names a real scenario, and no two ro
304
304
  *and* a path class. Whether the rows **cover the CFG** is judged, not linted: that needs the drawn
305
305
  CFG's semantics, so a green check clears no coverage question. A spec with no `## Scenario map`
306
306
  section is skipped, not failed — run as `check-suite`
307
- (`spec-gate/scripts/check-suite.mts`): the spec-producer self-runs it before returning, and the spec
307
+ (`spec-gate/scripts/check-suite.mjs`): the spec-producer self-runs it before returning, and the spec
308
308
  gate runs it fail-closed before the cold judge.
309
309
 
310
310
  **Form only** — coverage adequacy, discrimination,
@@ -9,11 +9,11 @@ cyberplace repository, not shipped in this package) carries the authoritative be
9
9
  and the frozen 21-scenario contract.
10
10
 
11
11
  - **Skill contract:** [`SKILL.md`](./SKILL.md)
12
- - **Script:** [`scripts/touch-set-correction.mts`](./scripts/touch-set-correction.mts)
13
- - **Tests:** [`scripts/touch-set-correction.test.mts`](./scripts/touch-set-correction.test.mts)
12
+ - **Script:** [`scripts/touch-set-correction.mjs`](./scripts/touch-set-correction.mjs)
13
+ - **Tests:** [`src/touch-set-correction/touch-set-correction.test.mts`](../../src/touch-set-correction/touch-set-correction.test.mts)
14
14
  (`node:test`) — one test per frozen scenario, titled `scenario: <verbatim frozen scenario name>`.
15
- [`scripts/touch-set-correction-installed.test.mts`](./scripts/touch-set-correction-installed.test.mts)
15
+ [`src/touch-set-correction/touch-set-correction-installed.test.mts`](../../src/touch-set-correction/touch-set-correction-installed.test.mts)
16
16
  runs the engine from a copy of the plugin's files, with no `node_modules`.
17
17
 
18
- The engine imports gherkin-cli from the spec gate's committed bundle
19
- (`../spec-gate/vendor/gherkin-cli.mjs`), so it runs from an installed plugin.
18
+ The build inlines gherkin-cli into the compiled script from the committed bundle
19
+ `src/vendor/gherkin-cli.mjs`, so it runs from an installed plugin.
@@ -36,7 +36,7 @@ touched.
36
36
  Pure derivations (`isFeature`, `fileToNode`, `reconcile`, `assembleCorrection`) take and return
37
37
  plain data — no fs/network access — kept apart from a thin IO seam (`readChangedFiles`,
38
38
  `resolveArtifactType`, `changedScenarios`, `collectChangedFiles`, `discoverLayouts`) that shells out
39
- to `git`, `resolve-governances.mts`, and `npx gherkin-cli`.
39
+ to `git`, `resolve-governances.mjs`, and `npx gherkin-cli`.
40
40
 
41
41
  ## Run it
42
42