cyber-sdd 0.6.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 (126) hide show
  1. package/.claude-plugin/plugin.json +1 -1
  2. package/.codex-plugin/plugin.json +2 -2
  3. package/.plugin/plugin.json +1 -1
  4. package/agents/sdd-spec-judge.md +3 -3
  5. package/agents/sdd-warden.md +8 -0
  6. package/dist/check-project-specs/scripts/check-project-specs.js +1 -0
  7. package/package.json +2 -2
  8. package/skills/align-spec/README.md +3 -3
  9. package/skills/align-spec/SKILL.md +1 -1
  10. package/skills/align-spec/scripts/align-spec.bundle.mjs +6753 -0
  11. package/skills/align-spec/scripts/align-spec.mjs +12 -0
  12. package/skills/architect-impl-governance/SKILL.md +3 -1
  13. package/skills/architect-spec-governance/SKILL.md +5 -1
  14. package/skills/blast-estimate/README.md +1 -1
  15. package/skills/blast-estimate/SKILL.md +1 -1
  16. package/skills/blast-estimate/scripts/blast-estimate.bundle.mjs +593 -0
  17. package/skills/blast-estimate/scripts/blast-estimate.mjs +12 -0
  18. package/skills/check-field-mandates/SKILL.md +1 -1
  19. package/skills/check-field-mandates/scripts/check-field-mandates.bundle.mjs +251 -0
  20. package/skills/check-field-mandates/scripts/check-field-mandates.mjs +12 -0
  21. package/skills/check-partition-quality/SKILL.md +1 -1
  22. package/skills/check-partition-quality/scripts/check-partition-quality.bundle.mjs +233 -0
  23. package/skills/check-partition-quality/scripts/check-partition-quality.mjs +12 -0
  24. package/skills/check-plan-safety/README.md +3 -3
  25. package/skills/check-plan-safety/SKILL.md +1 -1
  26. package/skills/check-plan-safety/scripts/check-plan-safety.bundle.mjs +107 -0
  27. package/skills/check-plan-safety/scripts/check-plan-safety.mjs +12 -0
  28. package/skills/check-plugin-manifests/SKILL.md +1 -1
  29. package/skills/check-plugin-manifests/scripts/check-plugin-manifests.bundle.mjs +248 -0
  30. package/skills/check-plugin-manifests/scripts/check-plugin-manifests.mjs +12 -0
  31. package/skills/check-project-specs/README.md +3 -3
  32. package/skills/check-project-specs/SKILL.md +2 -2
  33. package/skills/check-project-specs/scripts/check-project-specs.bundle.mjs +584 -0
  34. package/skills/check-project-specs/scripts/check-project-specs.mjs +12 -0
  35. package/skills/check-project-specs/scripts/check-project-specs.mts +1 -0
  36. package/skills/check-retired-terms/README.md +2 -2
  37. package/skills/check-retired-terms/SKILL.md +2 -2
  38. package/skills/check-retired-terms/scripts/check-retired-terms.bundle.mjs +184 -0
  39. package/skills/check-retired-terms/scripts/check-retired-terms.mjs +12 -0
  40. package/skills/check-scenario-overlap/README.md +2 -2
  41. package/skills/check-scenario-overlap/SKILL.md +1 -1
  42. package/skills/check-scenario-overlap/scripts/check-scenario-overlap.bundle.mjs +175 -0
  43. package/skills/check-scenario-overlap/scripts/check-scenario-overlap.mjs +12 -0
  44. package/skills/check-spec-references/README.md +1 -1
  45. package/skills/check-spec-references/SKILL.md +1 -1
  46. package/skills/check-spec-references/scripts/check-spec-references.bundle.mjs +285 -0
  47. package/skills/check-spec-references/scripts/check-spec-references.mjs +12 -0
  48. package/skills/check-spec-structure/README.md +2 -2
  49. package/skills/check-spec-structure/SKILL.md +1 -1
  50. package/skills/check-spec-structure/scripts/check-spec-structure.bundle.mjs +241 -0
  51. package/skills/check-spec-structure/scripts/check-spec-structure.mjs +12 -0
  52. package/skills/collision-ladder/SKILL.md +2 -2
  53. package/skills/collision-ladder/scripts/collision-ladder.bundle.mjs +7041 -0
  54. package/skills/collision-ladder/scripts/collision-ladder.mjs +12 -0
  55. package/skills/collision-ladder/scripts/collision-ladder.mts +4 -2
  56. package/skills/concept-index/README.md +2 -2
  57. package/skills/concept-index/SKILL.md +1 -1
  58. package/skills/concept-index/scripts/concept-index.bundle.mjs +181 -0
  59. package/skills/concept-index/scripts/concept-index.mjs +12 -0
  60. package/skills/discover-plans/README.md +2 -2
  61. package/skills/discover-plans/SKILL.md +1 -1
  62. package/skills/discover-plans/scripts/discover-plans.bundle.mjs +135 -0
  63. package/skills/discover-plans/scripts/discover-plans.mjs +12 -0
  64. package/skills/discover-specs/README.md +1 -1
  65. package/skills/discover-specs/SKILL.md +1 -1
  66. package/skills/discover-specs/scripts/discover-specs.bundle.mjs +319 -0
  67. package/skills/discover-specs/scripts/discover-specs.mjs +12 -0
  68. package/skills/doctrine-loop/SKILL.md +2 -2
  69. package/skills/formation-loop/SKILL.md +10 -0
  70. package/skills/gate-validation-governance/SKILL.md +1 -1
  71. package/skills/init/README.md +3 -3
  72. package/skills/init/SKILL.md +3 -3
  73. package/skills/init/scripts/wire-statusline.bundle.mjs +166 -0
  74. package/skills/init/scripts/wire-statusline.mjs +12 -0
  75. package/skills/manage-ignore/README.md +5 -5
  76. package/skills/manage-ignore/SKILL.md +1 -1
  77. package/skills/manage-ignore/scripts/manage-ignore.bundle.mjs +244 -0
  78. package/skills/manage-ignore/scripts/manage-ignore.mjs +12 -0
  79. package/skills/manage-scenario-bridge/README.md +3 -3
  80. package/skills/manage-scenario-bridge/SKILL.md +1 -1
  81. package/skills/manage-scenario-bridge/scripts/manage-scenario-bridge.bundle.mjs +237 -0
  82. package/skills/manage-scenario-bridge/scripts/manage-scenario-bridge.mjs +12 -0
  83. package/skills/manage-spec-anchors/README.md +4 -4
  84. package/skills/manage-spec-anchors/SKILL.md +1 -1
  85. package/skills/manage-spec-anchors/scripts/manage-spec-anchors.bundle.mjs +308 -0
  86. package/skills/manage-spec-anchors/scripts/manage-spec-anchors.mjs +12 -0
  87. package/skills/mission-graph/SKILL.md +9 -9
  88. package/skills/mission-graph/scripts/mission-graph.bundle.mjs +1038 -0
  89. package/skills/mission-graph/scripts/mission-graph.mjs +12 -0
  90. package/skills/pause-mission/SKILL.md +1 -1
  91. package/skills/place-node/README.md +1 -1
  92. package/skills/place-node/SKILL.md +1 -1
  93. package/skills/place-node/scripts/place-node.bundle.mjs +115 -0
  94. package/skills/place-node/scripts/place-node.mjs +12 -0
  95. package/skills/plan-retirement/SKILL.md +1 -1
  96. package/skills/plan-retirement/scripts/retire-plans.bundle.mjs +121 -0
  97. package/skills/plan-retirement/scripts/retire-plans.mjs +12 -0
  98. package/skills/plan-retirement/scripts/retire-plans.mts +6 -0
  99. package/skills/resolve-governances/README.md +1 -1
  100. package/skills/resolve-governances/SKILL.md +1 -1
  101. package/skills/resolve-governances/scripts/resolve-governances.bundle.mjs +350 -0
  102. package/skills/resolve-governances/scripts/resolve-governances.mjs +12 -0
  103. package/skills/resolve-tracking/SKILL.md +1 -1
  104. package/skills/resolve-tracking/scripts/resolve-tracking.bundle.mjs +150 -0
  105. package/skills/resolve-tracking/scripts/resolve-tracking.mjs +12 -0
  106. package/skills/scaffold-project-spec/SKILL.md +2 -2
  107. package/skills/sdd/SKILL.md +1 -1
  108. package/skills/spec-gate/SKILL.md +4 -4
  109. package/skills/spec-gate/scripts/check-spec-state.bundle.mjs +420 -0
  110. package/skills/spec-gate/scripts/check-spec-state.mjs +12 -0
  111. package/skills/spec-gate/scripts/check-suite.bundle.mjs +6498 -0
  112. package/skills/spec-gate/scripts/check-suite.mjs +12 -0
  113. package/skills/spec-gate/scripts/classify-edit-class.bundle.mjs +6577 -0
  114. package/skills/spec-gate/scripts/classify-edit-class.mjs +12 -0
  115. package/skills/spec-producer-governance/SKILL.md +2 -2
  116. package/skills/spec-structure-governance/README.md +4 -2
  117. package/skills/spec-structure-governance/SKILL.md +42 -7
  118. package/skills/start-mission/SKILL.md +1 -1
  119. package/skills/touch-set-correction/SKILL.md +1 -1
  120. package/skills/touch-set-correction/scripts/touch-set-correction.bundle.mjs +6655 -0
  121. package/skills/touch-set-correction/scripts/touch-set-correction.mjs +12 -0
  122. package/skills/touch-set-correction/scripts/touch-set-correction.mts +12 -3
  123. package/skills/verify-scenarios/README.md +3 -3
  124. package/skills/verify-scenarios/SKILL.md +2 -2
  125. package/skills/verify-scenarios/scripts/verify-scenarios.bundle.mjs +6537 -0
  126. package/skills/verify-scenarios/scripts/verify-scenarios.mjs +12 -0
@@ -0,0 +1,12 @@
1
+ // Launcher for the engine of the same name. Run it as `node <skill>/scripts/<engine>.mjs`.
2
+ // A checkout runs the .mts source. An npm install keeps the skill under node_modules, where Node
3
+ // will not strip types, so it runs the self-contained bundle built for the package.
4
+ import { spawnSync } from 'node:child_process'
5
+ import { fileURLToPath } from 'node:url'
6
+
7
+ const self = fileURLToPath(import.meta.url)
8
+ const installed = /[\\/]node_modules[\\/]/.test(self)
9
+ const target = self.replace(/\.mjs$/, installed ? '.bundle.mjs' : '.mts')
10
+ const run = spawnSync(process.execPath, [...process.execArgv, target, ...process.argv.slice(2)], { stdio: 'inherit' })
11
+ if (run.error) throw run.error
12
+ process.exitCode = run.status ?? 1
@@ -43,7 +43,7 @@ USER_ANSWERS: <answers to previously returned QUESTIONS — or null>
43
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:
44
44
 
45
45
  ```bash
46
- node "<spec-gate skill>/scripts/check-suite.mts" --files <the authored .feature path(s)>
46
+ node "<spec-gate skill>/scripts/check-suite.mjs" --files <the authored .feature path(s)>
47
47
  ```
48
48
 
49
49
  Exit `0` = form clean; exit `1` prints each `✗ <file>: <reason>`. **Fix every violation** (a non-boolean/hedged `Then`, leaked rubric lingo in an untagged scenario, a missing `Feature`/`Then`, or missing section comments over the sectioning threshold) and re-run until clean **before reporting `STATUS: complete`**. Settling this mechanical bar here spends no cold-judge round on a defect a linter catches every time; the same engine runs fail-closed at the gate (`../spec-gate/`), so an unfixed violation would block there anyway. If `node` is unavailable, self-review against the suite-format bar by hand.
@@ -62,7 +62,7 @@ USER_ANSWERS: <answers to previously returned QUESTIONS — or null>
62
62
  the `spec.md`/`README.md` you just authored or touched:
63
63
 
64
64
  ```bash
65
- node "<spec-gate skill>/scripts/check-spec-state.mts" --files <the authored spec.md/README.md path(s)>
65
+ node "<spec-gate skill>/scripts/check-spec-state.mjs" --files <the authored spec.md/README.md path(s)>
66
66
  ```
67
67
 
68
68
  Exit `0` = every referenced path resolves; exit `1` prints each `✗ <file>: references nonexistent
@@ -21,8 +21,10 @@ Read `SKILL.md` beside this file for the law itself — that is what those four
21
21
  - **The node taxonomy** — descriptive, reference artifact, behavioral artifact; declared in
22
22
  frontmatter, never guessed from which files happen to exist.
23
23
  - **Placement** — screaming architecture (folders named for capabilities), the three deliberate
24
- non-capability folders, rules-in-design vs behavior-in-capability, the two-level depth cap, and
25
- the concept axis for anything that cuts across.
24
+ non-capability folders, rules-in-design vs behavior-in-capability, the two-level depth cap on
25
+ capability nodes, the concept axis for anything that cuts across, and the shape of `design/` —
26
+ the current design at the top and, while one is under construction, the next design in a version
27
+ folder beside it.
26
28
  - **One spec per project** — and when a spec is hoisted out of its project directory rather than
27
29
  colocated in it.
28
30
  - **Strategy is policy, homes are data** — the layout strategy is a choice, so it is declared once
@@ -41,7 +41,7 @@ folder names say what the project does. Three folders are deliberately *not* cap
41
41
 
42
42
  | Folder | Holds |
43
43
  |---|---|
44
- | `design/` | the **rules** — the model and the *why* (descriptive docs) |
44
+ | `design/` | the **rules** — the model and the *why* (descriptive docs), in its own shape (below) |
45
45
  | `workflows/` | the **usage** — how capabilities compose into whole flows (the project-level suite) |
46
46
  | `ledger/` | the **provenance** — durable audit records; data, outside the node taxonomy |
47
47
 
@@ -55,9 +55,38 @@ mandated set stays minimal: anything that is one document lives as a **root file
55
55
  `glossary.md` — the project's ubiquitous language, every load-bearing term defined once — is
56
56
  required of every project spec.
57
57
 
58
- **Two levels, never three.** A node is `<capability>/<unit>` and never sits three deep. A
59
- sub-grouping inside a capability is a **cross-cutting concern**, so it is expressed as a `concept:`
60
- tag and recovered through the generated by-concept index — never as a third folder level.
58
+ **Two levels, never three — for capability nodes.** A capability node is `<capability>/<unit>` and
59
+ never sits three deep. A sub-grouping inside a capability is a **cross-cutting concern**, so it is
60
+ expressed as a `concept:` tag and recovered through the generated by-concept index — never as a
61
+ third folder level. The rule covers capability nodes only: its reason does not reach a design
62
+ version, which is a whole alternate snapshot of the model that no `concept:` tag can express.
63
+
64
+ **The `design/` shape — current at the top, the next design beside it.** `design/` is the single
65
+ description of the system; ADRs are the frozen record of why it changed. A design stays trustworthy
66
+ only if it is updated as a whole, so:
67
+
68
+ - **Current at the top level, one file per perspective** — the angles a reader takes on the whole
69
+ system, one file each, **never a perspective folder**. The ADR log `design/decisions/` is the one
70
+ standing sub-folder.
71
+ - **A version folder holds the next design while one exists.** The project names it (`design/next/`
72
+ is a suggestion; `design/v2/` works as well). It holds a **full copy** of the perspective files,
73
+ never a diff, so each version reads on its own and `diff -r` shows the whole change. It holds no
74
+ `decisions/`. At most one exists at a time.
75
+ - **The cut is one commit**: the version folder's contents replace the top-level perspective files,
76
+ and the folder and its placement-map record go. Git keeps the previous version; `design/` never
77
+ carries a `previous/`.
78
+ - **The cut trigger is recorded and checkable.** While a version folder exists, the root `spec.md`
79
+ placement map names it and what cuts it over — a capability set reaching `implemented`, or a named
80
+ release. Without a checkable trigger the next design drifts into an unofficial current. Making it
81
+ checkable is the author's duty; the formation Warden checks that one is recorded. A
82
+ sub-folder of `design/` the map does not name, other than `decisions/`, is a perspective folder.
83
+
84
+ Current stays at the top rather than in `design/current/` so that links to a design doc survive
85
+ every cut: most of a project's life has no next design, and links accumulate from ADRs, capability
86
+ specs, and the docs site.
87
+
88
+ **Rejected — a fourth exempt top-level folder** (`design-next/`). It grows the mandated set this
89
+ governance keeps minimal, and it would sit among the capability folders as if it were one.
61
90
 
62
91
  **The concept axis.** The tree can privilege only one axis, and it privileges capability; a concern
63
92
  enacted across several capabilities is declared in `concept:` frontmatter and navigated through the
@@ -107,6 +136,8 @@ decisions the strategy alone does not settle, so a node placed by an explicit ro
107
136
  the strategy alone therefore reports false findings against exactly the placements a human already
108
137
  adjudicated. The test is a disjunction: a node is misplaced only when it **neither** follows the
109
138
  declared strategy **nor** matches a routing-table row.
139
+ While a next design exists, the map also names the **design version** folder and its cut trigger
140
+ (the `design/` shape above); a judgment of `design/` reads that entry.
110
141
 
111
142
  This is the same split the corpus-discovery rule already makes — fixed conventions are scanned,
112
143
  while an off-convention anchor list is declared and curated. "No drift" means *do not store what you
@@ -162,8 +193,12 @@ entry condition.
162
193
  folder, reference artifacts to the capability that owns them.
163
194
  3. **Screaming architecture** with three non-capability folders (`design/`, `workflows/`, `ledger/`)
164
195
  and **root files, not folders**, for single documents (`glossary.md` required).
165
- 4. **Two levels, never three** — deeper sub-grouping is a `concept:` tag, not a folder.
166
- 5. **One spec per project**; colocate by default and **hoist only when the spec cannot be kept out of
196
+ 4. **Two levels, never three, for capability nodes** — deeper sub-grouping is a `concept:` tag,
197
+ not a folder.
198
+ 5. **`design/` has its own shape** — current at the top, one file per perspective (never a
199
+ perspective folder), at most one project-named version folder holding a full copy of the next
200
+ design, a one-commit cut, and the cut trigger recorded in the placement map.
201
+ 6. **One spec per project**; colocate by default and **hoist only when the spec cannot be kept out of
167
202
  what ships** (the agentic plugin) — nesting is never the reason.
168
- 6. **Strategy is policy, homes are data** — read the declared strategy from the placement map, derive
203
+ 7. **Strategy is policy, homes are data** — read the declared strategy from the placement map, derive
169
204
  homes from `concept:` tags, and let the strategy pick the derivation.
@@ -62,7 +62,7 @@ Get the CR into the system and create its plan brief — the plan is a step-1 ar
62
62
  - **Recover the request.** From a general change prompt, name the change and the target. From a **source URL** (`work on <github issue url>`), fetch the issue and read it as the CR body.
63
63
  - **Locate the project spec** by running the **`discover-specs`** skill (the `corpus/discovery` engine) — it returns the TOON list of every project spec at the SDD spec locations (the three fixed conventions plus any declared extra anchors, ADR-0019) with its `status` and `project-path`. Resolve the CR's target to one spec by folder slug or `project-path`; an ambiguous match is disambiguated with the user, never guessed. One project is one spec — there is no spec fleet to pick from. If `discover-specs` finds **no** spec for the target project, that is the **backfill** path (load `scaffold-project-spec`).
64
64
  - **Scaffold `.agents/plans/<cr-ref>-<what>.plan.md`** — name the brief with a short kebab `<what>` slug naming what the CR does, even when the ref comes from an external source (`github-34-rejudge-sweep.plan.md`, not `github-34.plan.md`). The source name (`github`) is **optional** — most projects draw from one external source, so a bare `34-rejudge-sweep.plan.md` is fine; keep the source prefix only when a project mixes sources. Fill from a basic template: frontmatter `todos` (ordered, `status: pending`, each `content` a **short summary < 120 chars**) + a `## NEXT` anchor + the CR link. Keep the plan body **concise** — it is read by the agent each resume, so phrase for an agent first while staying human-legible (terse lead, no prose padding). This is the portable handoff brief `pause-mission` / `resume-mission` operate on. **Safe-to-publish floor** (the same one the combat log carries in `combat-log-governance`): the brief is **tracked and committed**, so it references **only repo-relative paths** — never an absolute path, `$HOME`/`$USER`, an OS username, or any machine-local location outside the repo. When the CR's design came from a plan-mode doc under a machine-local path (e.g. `~/.claude/plans/…`), bring that content **into** the repo (a sibling `<cr-ref>.design.md` beside the brief) and reference it repo-relative — do not link the external absolute path. The `check-plan-safety` engine enforces this mechanically. **When that brought-in content is a plan-mode preview** (a drafted spec + scenario list from a prior `### Plan-mode preview` run), the explore phase **adopts it as the settled draft** (see Step 2) rather than re-grilling from scratch.
65
- - **Escape a non-CR.** If the grill shows no suite-relevant behavior, escape: create no draft, invoke no gate, write no record. Independently, **escape by tracking**: for each artifact the request touches, run the **`resolve-tracking`** skill (`intake/resolve-tracking`'s concrete engine) — `node "<skill>/scripts/resolve-tracking.mts" --root . --path <path> [--artifact-type <type>] [--explicit tracked|ignored]`, passing `--explicit` when the requester stated tracking directly and `--artifact-type` when convention already makes it obvious. If **every** touched artifact resolves `ignored`, escape the whole request the same way. If the request is **mixed**, carve the tracked artifacts into the CR and escape the ignored ones (the same carve-and-escape shape already used for the no-behavior case). Escaping does not mean stopping: if the artifact-type has a producer with an escaped-request entry point (`define-skill` for `skill`), invoke it directly to do the work; only state "leaving the lifecycle" and stop when no such producer exists.
65
+ - **Escape a non-CR.** If the grill shows no suite-relevant behavior, escape: create no draft, invoke no gate, write no record. Independently, **escape by tracking**: for each artifact the request touches, run the **`resolve-tracking`** skill (`intake/resolve-tracking`'s concrete engine) — `node "<skill>/scripts/resolve-tracking.mjs" --root . --path <path> [--artifact-type <type>] [--explicit tracked|ignored]`, passing `--explicit` when the requester stated tracking directly and `--artifact-type` when convention already makes it obvious. If **every** touched artifact resolves `ignored`, escape the whole request the same way. If the request is **mixed**, carve the tracked artifacts into the CR and escape the ignored ones (the same carve-and-escape shape already used for the no-behavior case). Escaping does not mean stopping: if the artifact-type has a producer with an escaped-request entry point (`define-skill` for `skill`), invoke it directly to do the work; only state "leaving the lifecycle" and stop when no such producer exists.
66
66
 
67
67
  ## Step 2 — explore: grill the spec + suite, build to learn
68
68
 
@@ -41,7 +41,7 @@ to `git`, `resolve-governances.mts`, and `npx gherkin-cli`.
41
41
  ## Run it
42
42
 
43
43
  ```bash
44
- node "<skill>/scripts/touch-set-correction.mts" --base <ref> --declared a,b,c \
44
+ node "<skill>/scripts/touch-set-correction.mjs" --base <ref> --declared a,b,c \
45
45
  [--head HEAD] [--root .] \
46
46
  [--layout 'sdd:.agents/specs/sdd,plugins/sdd/skills']... \
47
47
  [--format toon|json]