@rsaglobaltech/specgate 0.19.1 → 0.21.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 (253) hide show
  1. package/CHANGELOG.md +164 -4
  2. package/README.md +31 -31
  3. package/bin/specgate.ts +26 -20
  4. package/dist/bin/specgate.js +16 -11
  5. package/dist/bin/specgate.js.map +1 -1
  6. package/dist/packages/core/src/application/AddRequirementUseCase.js +11 -1
  7. package/dist/packages/core/src/application/AddRequirementUseCase.js.map +1 -1
  8. package/dist/packages/core/src/application/ArchiveChangeUseCase.js +7 -2
  9. package/dist/packages/core/src/application/ArchiveChangeUseCase.js.map +1 -1
  10. package/dist/packages/core/src/application/ValidateProjectUseCase.js +9 -3
  11. package/dist/packages/core/src/application/ValidateProjectUseCase.js.map +1 -1
  12. package/dist/packages/core/src/domain/ArchivePlan.js.map +1 -1
  13. package/dist/packages/core/src/domain/ChangeTemplates.js +19 -0
  14. package/dist/packages/core/src/domain/ChangeTemplates.js.map +1 -1
  15. package/dist/packages/core/src/domain/DeltaSpec.js +14 -7
  16. package/dist/packages/core/src/domain/DeltaSpec.js.map +1 -1
  17. package/dist/packages/core/src/domain/DerivedMatrix.js +2 -2
  18. package/dist/packages/core/src/domain/DerivedMatrix.js.map +1 -1
  19. package/dist/packages/core/src/domain/Diagnostic.js.map +1 -1
  20. package/dist/packages/core/src/domain/DoneVerification.js +12 -4
  21. package/dist/packages/core/src/domain/DoneVerification.js.map +1 -1
  22. package/dist/packages/core/src/domain/DraftChecklist.js +1 -1
  23. package/dist/packages/core/src/domain/DraftChecklist.js.map +1 -1
  24. package/dist/packages/core/src/domain/GherkinQuality.js +5 -2
  25. package/dist/packages/core/src/domain/GherkinQuality.js.map +1 -1
  26. package/dist/packages/core/src/domain/HarnessConfig.js +1 -0
  27. package/dist/packages/core/src/domain/HarnessConfig.js.map +1 -1
  28. package/dist/packages/core/src/domain/HarnessEvents.js +129 -0
  29. package/dist/packages/core/src/domain/HarnessEvents.js.map +1 -0
  30. package/dist/packages/core/src/domain/HarnessRun.js.map +1 -1
  31. package/dist/packages/core/src/domain/Language.js +5 -2
  32. package/dist/packages/core/src/domain/Language.js.map +1 -1
  33. package/dist/packages/core/src/domain/PackContribution.js.map +1 -1
  34. package/dist/packages/core/src/domain/PackDelta.js +5 -2
  35. package/dist/packages/core/src/domain/PackDelta.js.map +1 -1
  36. package/dist/packages/core/src/domain/PackSpec.js +16 -2
  37. package/dist/packages/core/src/domain/PackSpec.js.map +1 -1
  38. package/dist/packages/core/src/domain/QuotedText.js +36 -0
  39. package/dist/packages/core/src/domain/QuotedText.js.map +1 -0
  40. package/dist/packages/core/src/domain/RequirementPlan.js.map +1 -1
  41. package/dist/packages/core/src/domain/SpecParser.js +2 -9
  42. package/dist/packages/core/src/domain/SpecParser.js.map +1 -1
  43. package/dist/packages/core/src/domain/TraceabilityFormat.js.map +1 -1
  44. package/dist/packages/core/src/domain/TraceabilityMatrix.js +3 -3
  45. package/dist/packages/core/src/domain/TraceabilityMatrix.js.map +1 -1
  46. package/dist/packages/core/src/domain/YamlLite.js +3 -0
  47. package/dist/packages/core/src/domain/YamlLite.js.map +1 -1
  48. package/dist/packages/core/src/infrastructure/ChangeWorkspace.js.map +1 -1
  49. package/dist/packages/core/src/infrastructure/ConsoleReporter.js.map +1 -1
  50. package/dist/packages/core/src/infrastructure/DiskLanguageRepository.js +1 -0
  51. package/dist/packages/core/src/infrastructure/DiskLanguageRepository.js.map +1 -1
  52. package/dist/packages/core/src/infrastructure/DiskPackDeltaRepository.js +3 -1
  53. package/dist/packages/core/src/infrastructure/DiskPackDeltaRepository.js.map +1 -1
  54. package/dist/packages/core/src/infrastructure/DiskPackRepository.js +0 -2
  55. package/dist/packages/core/src/infrastructure/DiskPackRepository.js.map +1 -1
  56. package/dist/packages/core/src/infrastructure/DiskRequirementGraphRepository.js.map +1 -1
  57. package/dist/packages/core/src/infrastructure/GitContributionStager.js +0 -4
  58. package/dist/packages/core/src/infrastructure/GitContributionStager.js.map +1 -1
  59. package/dist/packages/core/src/infrastructure/GitMergeDriver.js +0 -3
  60. package/dist/packages/core/src/infrastructure/GitMergeDriver.js.map +1 -1
  61. package/dist/packages/core/src/infrastructure/HarnessConfigFile.js +16 -13
  62. package/dist/packages/core/src/infrastructure/HarnessConfigFile.js.map +1 -1
  63. package/dist/packages/core/src/infrastructure/PackChangeDeposit.js.map +1 -1
  64. package/dist/packages/core/src/infrastructure/RemotePackResolver.js +0 -7
  65. package/dist/packages/core/src/infrastructure/RemotePackResolver.js.map +1 -1
  66. package/dist/packages/core/src/infrastructure/SpecopsConfigFile.js.map +1 -1
  67. package/dist/packages/core/test/unit/declared-artifacts.test.js +6 -2
  68. package/dist/packages/core/test/unit/declared-artifacts.test.js.map +1 -1
  69. package/dist/packages/core/test/unit/derived-matrix.test.js +3 -0
  70. package/dist/packages/core/test/unit/derived-matrix.test.js.map +1 -1
  71. package/dist/packages/core/test/unit/done-verification.test.js +3 -0
  72. package/dist/packages/core/test/unit/done-verification.test.js.map +1 -1
  73. package/dist/packages/core/test/unit/matrix-dependencies.test.js.map +1 -1
  74. package/dist/packages/core/test/unit/reconciliation.test.js.map +1 -1
  75. package/dist/packages/core/test/unit/requirement-readiness.test.js +2 -2
  76. package/dist/packages/core/test/unit/requirement-readiness.test.js.map +1 -1
  77. package/dist/packages/core/test/unit/resume-state.test.js +4 -1
  78. package/dist/packages/core/test/unit/resume-state.test.js.map +1 -1
  79. package/dist/packages/core/test/unit/run-budget.test.js +3 -0
  80. package/dist/packages/core/test/unit/run-budget.test.js.map +1 -1
  81. package/dist/packages/core/test/unit/untouched-delta.test.js +52 -0
  82. package/dist/packages/core/test/unit/untouched-delta.test.js.map +1 -0
  83. package/dist/packages/core/test/unit/validate-project.test.js +6 -2
  84. package/dist/packages/core/test/unit/validate-project.test.js.map +1 -1
  85. package/dist/packages/mcp-spec-driven/src/server.js +4 -3
  86. package/dist/packages/mcp-spec-driven/src/server.js.map +1 -1
  87. package/dist/packages/mcp-spec-driven/src/tools.js.map +1 -1
  88. package/dist/scripts/add.js +10 -0
  89. package/dist/scripts/add.js.map +1 -0
  90. package/dist/scripts/agents/commands.js +49 -37
  91. package/dist/scripts/agents/commands.js.map +1 -1
  92. package/dist/scripts/agents/detect.js.map +1 -1
  93. package/dist/scripts/agents/init.js.map +1 -1
  94. package/dist/scripts/alm/cli.js +2 -2
  95. package/dist/scripts/alm/cli.js.map +1 -1
  96. package/dist/scripts/alm/core.js +1 -0
  97. package/dist/scripts/alm/core.js.map +1 -1
  98. package/dist/scripts/apply.js +9 -0
  99. package/dist/scripts/apply.js.map +1 -0
  100. package/dist/scripts/archive.js +9 -0
  101. package/dist/scripts/archive.js.map +1 -0
  102. package/dist/scripts/change/archive.js.map +1 -1
  103. package/dist/scripts/change/artifacts.js.map +1 -1
  104. package/dist/scripts/change/delta.js +0 -8
  105. package/dist/scripts/change/delta.js.map +1 -1
  106. package/dist/scripts/change/instructions.js +9 -11
  107. package/dist/scripts/change/instructions.js.map +1 -1
  108. package/dist/scripts/cli/commands/alm/PullCommand.js +4 -2
  109. package/dist/scripts/cli/commands/alm/PullCommand.js.map +1 -1
  110. package/dist/scripts/cli/commands/change/ChangeCommand.js +91 -17
  111. package/dist/scripts/cli/commands/change/ChangeCommand.js.map +1 -1
  112. package/dist/scripts/cli/commands/config/ConfigSetCommand.js +20 -11
  113. package/dist/scripts/cli/commands/config/ConfigSetCommand.js.map +1 -1
  114. package/dist/scripts/cli/commands/harness/RunCommand.js +243 -34
  115. package/dist/scripts/cli/commands/harness/RunCommand.js.map +1 -1
  116. package/dist/scripts/cli/commands/mcp/McpInstallCommand.js +1 -0
  117. package/dist/scripts/cli/commands/mcp/McpInstallCommand.js.map +1 -1
  118. package/dist/scripts/cli/commands/pack/BundlePackCommand.js +2 -1
  119. package/dist/scripts/cli/commands/pack/BundlePackCommand.js.map +1 -1
  120. package/dist/scripts/cli/commands/pack/ExpandDomainPackCommand.js +32 -17
  121. package/dist/scripts/cli/commands/pack/ExpandDomainPackCommand.js.map +1 -1
  122. package/dist/scripts/cli/commands/pack/InferPackCommand.js +8 -5
  123. package/dist/scripts/cli/commands/pack/InferPackCommand.js.map +1 -1
  124. package/dist/scripts/cli/commands/pack/LintPackCommand.js +36 -44
  125. package/dist/scripts/cli/commands/pack/LintPackCommand.js.map +1 -1
  126. package/dist/scripts/cli/commands/pack/pack-args.js.map +1 -1
  127. package/dist/scripts/cli/commands/project/AddCommand.js +75 -0
  128. package/dist/scripts/cli/commands/project/AddCommand.js.map +1 -0
  129. package/dist/scripts/cli/commands/project/AdoptCommand.js +4 -2
  130. package/dist/scripts/cli/commands/project/AdoptCommand.js.map +1 -1
  131. package/dist/scripts/cli/commands/project/Forja.js +104 -0
  132. package/dist/scripts/cli/commands/project/Forja.js.map +1 -0
  133. package/dist/scripts/cli/commands/project/InitFromPackCommand.js.map +1 -1
  134. package/dist/scripts/cli/commands/project/InitProjectCommand.js +55 -2
  135. package/dist/scripts/cli/commands/project/InitProjectCommand.js.map +1 -1
  136. package/dist/scripts/cli/commands/project/OnboardCommand.js +40 -4
  137. package/dist/scripts/cli/commands/project/OnboardCommand.js.map +1 -1
  138. package/dist/scripts/cli/commands/project/UpdateCommand.js.map +1 -1
  139. package/dist/scripts/cli/commands/project/WizardCommand.js.map +1 -1
  140. package/dist/scripts/cli/commands/quality/CheckCommand.js +96 -17
  141. package/dist/scripts/cli/commands/quality/CheckCommand.js.map +1 -1
  142. package/dist/scripts/cli/commands/quality/DoctorCommand.js +8 -4
  143. package/dist/scripts/cli/commands/quality/DoctorCommand.js.map +1 -1
  144. package/dist/scripts/cli/commands/quality/FixCommand.js.map +1 -1
  145. package/dist/scripts/cli/commands/quality/LicenseCheckCommand.js +3 -1
  146. package/dist/scripts/cli/commands/quality/LicenseCheckCommand.js.map +1 -1
  147. package/dist/scripts/cli/commands/quality/ReportCommand.js +8 -3
  148. package/dist/scripts/cli/commands/quality/ReportCommand.js.map +1 -1
  149. package/dist/scripts/cli/commands/quality/ValidateSpecsCommand.js +39 -30
  150. package/dist/scripts/cli/commands/quality/ValidateSpecsCommand.js.map +1 -1
  151. package/dist/scripts/cli/commands/quality/VerifyCommand.js +3 -2
  152. package/dist/scripts/cli/commands/quality/VerifyCommand.js.map +1 -1
  153. package/dist/scripts/cli/commands/spec/DoneCommand.js +212 -80
  154. package/dist/scripts/cli/commands/spec/DoneCommand.js.map +1 -1
  155. package/dist/scripts/cli/commands/spec/DraftCommand.js +56 -33
  156. package/dist/scripts/cli/commands/spec/DraftCommand.js.map +1 -1
  157. package/dist/scripts/cli/commands/spec/ExploreCommand.js +224 -0
  158. package/dist/scripts/cli/commands/spec/ExploreCommand.js.map +1 -0
  159. package/dist/scripts/cli/commands/spec/MatrixCommand.js +35 -5
  160. package/dist/scripts/cli/commands/spec/MatrixCommand.js.map +1 -1
  161. package/dist/scripts/cli/commands/spec/NewCommand.js +4 -4
  162. package/dist/scripts/cli/commands/spec/NewCommand.js.map +1 -1
  163. package/dist/scripts/cli/commands/spec/PetCommand.js.map +1 -1
  164. package/dist/scripts/cli/commands/spec/PlanCommand.js +8 -3
  165. package/dist/scripts/cli/commands/spec/PlanCommand.js.map +1 -1
  166. package/dist/scripts/cli/commands/spec/ReqCommand.js +8 -9
  167. package/dist/scripts/cli/commands/spec/ReqCommand.js.map +1 -1
  168. package/dist/scripts/cli/commands/spec/StatusCommand.js +121 -23
  169. package/dist/scripts/cli/commands/spec/StatusCommand.js.map +1 -1
  170. package/dist/scripts/cli/commands/spec/StudioCommand.js +76 -4
  171. package/dist/scripts/cli/commands/spec/StudioCommand.js.map +1 -1
  172. package/dist/scripts/cli/commands/specops/ContributeCommand.js +6 -2
  173. package/dist/scripts/cli/commands/specops/ContributeCommand.js.map +1 -1
  174. package/dist/scripts/cli/commands/specops/DiffCommand.js +19 -5
  175. package/dist/scripts/cli/commands/specops/DiffCommand.js.map +1 -1
  176. package/dist/scripts/cli/commands/specops/SyncCommand.js +4 -2
  177. package/dist/scripts/cli/commands/specops/SyncCommand.js.map +1 -1
  178. package/dist/scripts/docs/build-site.js +81 -1
  179. package/dist/scripts/docs/build-site.js.map +1 -1
  180. package/dist/scripts/docs/components.js +6 -1
  181. package/dist/scripts/docs/components.js.map +1 -1
  182. package/dist/scripts/docs/icons.js +0 -6
  183. package/dist/scripts/docs/icons.js.map +1 -1
  184. package/dist/scripts/docs/journey-storyboard.js +23 -20
  185. package/dist/scripts/docs/journey-storyboard.js.map +1 -1
  186. package/dist/scripts/docs/nav.js +136 -22
  187. package/dist/scripts/docs/nav.js.map +1 -1
  188. package/dist/scripts/docs/record-terminal.js +1 -1
  189. package/dist/scripts/docs/record-terminal.js.map +1 -1
  190. package/dist/scripts/docs/terminal-storyboard.js +24 -21
  191. package/dist/scripts/docs/terminal-storyboard.js.map +1 -1
  192. package/dist/scripts/draft/brief-setup.js +9 -8
  193. package/dist/scripts/draft/brief-setup.js.map +1 -1
  194. package/dist/scripts/draft/confined-agent.js +3 -2
  195. package/dist/scripts/draft/confined-agent.js.map +1 -1
  196. package/dist/scripts/draft/drafting-guide.js +7 -6
  197. package/dist/scripts/draft/drafting-guide.js.map +1 -1
  198. package/dist/scripts/explore.js +10 -0
  199. package/dist/scripts/explore.js.map +1 -0
  200. package/dist/scripts/gen_mcp_tools.js +15 -7
  201. package/dist/scripts/gen_mcp_tools.js.map +1 -1
  202. package/dist/scripts/harness/events.js +202 -0
  203. package/dist/scripts/harness/events.js.map +1 -0
  204. package/dist/scripts/harness/init.js +6 -2
  205. package/dist/scripts/harness/init.js.map +1 -1
  206. package/dist/scripts/harness/run.js +2 -1
  207. package/dist/scripts/harness/run.js.map +1 -1
  208. package/dist/scripts/lib/agent.js.map +1 -1
  209. package/dist/scripts/lib/base-ids.js +179 -0
  210. package/dist/scripts/lib/base-ids.js.map +1 -0
  211. package/dist/scripts/lib/capability-specs.js.map +1 -1
  212. package/dist/scripts/lib/diagnostics.js +0 -10
  213. package/dist/scripts/lib/diagnostics.js.map +1 -1
  214. package/dist/scripts/lib/harness-events.js +74 -0
  215. package/dist/scripts/lib/harness-events.js.map +1 -0
  216. package/dist/scripts/lib/in-flight.js +191 -0
  217. package/dist/scripts/lib/in-flight.js.map +1 -0
  218. package/dist/scripts/lib/live-model.js +145 -0
  219. package/dist/scripts/lib/live-model.js.map +1 -0
  220. package/dist/scripts/lib/live-page.js +89 -0
  221. package/dist/scripts/lib/live-page.js.map +1 -0
  222. package/dist/scripts/lib/monorepo-fanout.js.map +1 -1
  223. package/dist/scripts/lib/placeholders.js.map +1 -1
  224. package/dist/scripts/lib/project-root.js.map +1 -1
  225. package/dist/scripts/lib/run-with-deadline.js +6 -1
  226. package/dist/scripts/lib/run-with-deadline.js.map +1 -1
  227. package/dist/scripts/lib/surface.js +109 -24
  228. package/dist/scripts/lib/surface.js.map +1 -1
  229. package/dist/scripts/lib/tour.js +149 -0
  230. package/dist/scripts/lib/tour.js.map +1 -0
  231. package/dist/scripts/propose.js +21 -0
  232. package/dist/scripts/propose.js.map +1 -0
  233. package/dist/scripts/schema/cli.js +1 -1
  234. package/dist/scripts/schema/cli.js.map +1 -1
  235. package/dist/scripts/schema/registry.js +1 -0
  236. package/dist/scripts/schema/registry.js.map +1 -1
  237. package/dist/scripts/specops/add.js +2 -1
  238. package/dist/scripts/specops/add.js.map +1 -1
  239. package/dist/scripts/specops/against_lock.js +22 -25
  240. package/dist/scripts/specops/against_lock.js.map +1 -1
  241. package/dist/scripts/specops/as_change.js.map +1 -1
  242. package/dist/scripts/specops/lock.js +0 -5
  243. package/dist/scripts/specops/lock.js.map +1 -1
  244. package/dist/scripts/specops/manifest.js +0 -8
  245. package/dist/scripts/specops/manifest.js.map +1 -1
  246. package/dist/scripts/specops/remove.js +2 -1
  247. package/dist/scripts/specops/remove.js.map +1 -1
  248. package/dist/scripts/specops/verify.js.map +1 -1
  249. package/package.json +1 -1
  250. package/templates/adopt/spec.md.tpl +1 -1
  251. package/templates/adopt/traceability.md.tpl +1 -1
  252. package/templates/base/AGENTS.md.tpl +12 -6
  253. package/templates/harness/prompt-prefix.md.tpl +1 -1
package/CHANGELOG.md CHANGED
@@ -8,6 +8,166 @@ The release process is in [`docs/release-process.md`](docs/release-process.md).
8
8
 
9
9
  ## [Unreleased]
10
10
 
11
+ ## [0.21.0] — 2026-10-20
12
+
13
+ The daily loop becomes four verbs over the same gate (ADR-0035), the gate stops
14
+ failing on text that is not a defect (ADR-0036), and the harness can be watched
15
+ while it works (ADR-0037).
16
+
17
+ ### Breaking
18
+
19
+ - **`archive` (and `change archive`) waits for the code.** A change is merged
20
+ into the specs only once every requirement it adds or modifies is
21
+ Implemented; before, it was archived first and delivered after. `--force`
22
+ does not skip this. Drafts from a brief follow the same path: review, apply,
23
+ then archive. Scripts that archived a change before implementing it now get
24
+ `archive_requirements_pending` with the `specgate apply` to run.
25
+ - **`specgate studio` binds to 127.0.0.1** and refuses requests addressed to
26
+ another host name; pass `--host` to serve it elsewhere (a devcontainer).
27
+
28
+ ### Added
29
+
30
+ - **See the harness work** ([ADR-0037](docs/specs/adr/0037-see-the-harness-work.md), change `live-view`).
31
+ - `harness run` writes `.harness/events/<REQ>.jsonl` — attempts, gate stages,
32
+ chain merges — and hands the agent `AGENT_EVENTS_FILE`, `AGENT_EVENTS_REQ`,
33
+ `AGENT_EVENTS_ATTEMPT`.
34
+ - `specgate harness events --from claude` turns Claude Code's stream into
35
+ events; no file contents, tool output or secrets, commands masked.
36
+ - `specgate studio` serves `/live`, `/live.json` and `/live/stream`
37
+ (server-sent events), bound to 127.0.0.1 and refusing foreign Host headers;
38
+ `--host` binds elsewhere on purpose.
39
+ - `specgate explore` — a brief of the project's state for thinking with an
40
+ agent before a change exists; writes nothing.
41
+ - `specgate onboard --tour` — the whole loop on a temporary copy, narrated.
42
+
43
+ - **A gate a team can trust** ([ADR-0036](docs/specs/adr/0036-a-gate-a-team-can-trust.md), change `trust-gate`).
44
+ - `check` compares requirement ids with the base branch (`--base`,
45
+ `SPECGATE_BASE`, or origin's default) and fails on the same id with another
46
+ title (`id_taken_on_base`), naming the next id free on both sides.
47
+ - `harness run --chain`: one requirement at a time, each cut from the
48
+ previous merge, merged with a merge commit when green, the gate run again
49
+ on the merge, a red result undone, the chain stopped at the first failure.
50
+ - `harness run --setup-cmd <cmd|none>`; without it, the install the lockfile
51
+ implies runs in each new worktree. The agent gets `SPECGATE_REQ` and
52
+ `SPECGATE_ATTEMPT`.
53
+ - A corpus fixture of real specification shapes passes `validate --strict`
54
+ with no finding; `SPECGATE_CORPUS` runs the same test over private projects.
55
+
56
+ - **Four verbs, one lifecycle** ([ADR-0035](docs/specs/adr/0035-four-verbs-one-lifecycle.md), change `compact-use`).
57
+ The short help is `init`; `propose`, `apply`, `status`, `archive`; `check`.
58
+ - `specgate propose <id>` opens a change with a delta to write (`change new`);
59
+ `propose --from-brief` drafts the next module of `docs/brief.md` (`draft`).
60
+ - `specgate apply [REQ]` delivers one requirement — the next one when none is
61
+ named: refused while no test names it (`apply_no_test`, with the fix), gated,
62
+ then Implemented. `done` is its old name, with the same result.
63
+ - `specgate archive <id>` merges a change once every requirement it adds or
64
+ modifies is Implemented (`archive_requirements_pending`); `--force` does not
65
+ skip that.
66
+ - **An open change's requirements count while it is in flight.** `status`,
67
+ `apply`, `check` and `harness run` judge the project as it will be after
68
+ archive — a temporary copy with every open change archived into it — and
69
+ `apply` writes the status in the change's delta.
70
+
71
+ ### Changed
72
+
73
+ - The placeholder rule ignores code spans, and the vague-step rule code spans
74
+ and quoted text: `` `tool verify <module>` `` is a command, not a template.
75
+ - TDD-3 asks a matrix row for a requirement a spec *declares* (a heading or a
76
+ requirement table row outside fenced code), not for every id it mentions.
77
+ - A generated matrix is declared `merge=union` in `.gitattributes`: parallel
78
+ branches no longer conflict on it, and `check` regenerates it.
79
+ - `new` and `req add` allocate above the ids open changes reserved.
80
+
81
+ - **A change is archived when its code is done**, not before. Drafts from a
82
+ brief follow the same path: reviewed, applied, then archived. `draft` names
83
+ `specgate apply` once a draft is ready, and the next module to draft skips
84
+ one that is ready.
85
+ - Unchecked tasks are a warning, not a refusal, for a change whose requirements
86
+ all passed the gate; a change with none still needs its tasks ticked.
87
+ - `status` names `specgate apply REQ-…` where it named `specgate done REQ-…`.
88
+ - A delta's scenario findings name their requirement:
89
+ `Scenario "…" of REQ-007 has no steps.`
90
+
91
+ - The codebase compiles under full `strict` TypeScript (`noImplicitAny`,
92
+ `strictNullChecks`, `noUnusedLocals`, `noUnusedParameters`), typed throughout
93
+ instead of `any`; the documentation site, README and CONTRIBUTING teach the
94
+ four-verb loop.
95
+ - Dev dependencies: @cucumber/cucumber 13.3.0, typescript-eslint 8.71.2,
96
+ prettier 3.9.10, js-yaml 5.5.0, marked 18.1.1, @types/node 26.6.5; Pages
97
+ actions `upload-pages-artifact` v5 and `deploy-pages` v5.
98
+
99
+ ### Fixed
100
+
101
+ - `specops diff --as-change` printed `── undefined @ undefined ──` in its human
102
+ output: it read snake_case fields from camelCase results.
103
+ - **The CLI no longer contradicts ADR-0035–0037** (four verbs, trusted gate, live view).
104
+ - `agents init` (and the bundled Claude Code plugin) teaches propose → test →
105
+ apply → archive: `/specgate:propose` opens a change, `/specgate:apply`
106
+ delivers a requirement, `/specgate:archive` runs only once all are applied;
107
+ `/specgate:draft` no longer says to archive before building, and
108
+ `/specgate:done` stays as an alias of apply. `AGENTS.md` says the same.
109
+ - `docs:terminal:check` and `docs:journey:check` no longer crash: the
110
+ storyboards leave the draft open, apply its requirements, and show archive
111
+ waiting for the rest. Recordings and `docs/start/` regenerated.
112
+ - `specgate explore` outside a Specgate project refuses with
113
+ `project_not_found` and a fix line (exit 2) instead of an ENOENT stack.
114
+ - Next-step advice names the new verbs: `propose --from-brief` says
115
+ `specgate propose --from-brief …`, the no-test-command warning and
116
+ `done_needs_clarification` say `apply`, and fixes that named `change new`,
117
+ `change archive` or `done` say `propose`, `archive` or `apply`. The old
118
+ names keep working.
119
+ - `status` with an open draft shows its `questions.md` at the change's real
120
+ path (not under `changes/archive/`), and counts a ready draft as drafted.
121
+ - Right after `specgate propose`, `check` passes: a change whose delta is
122
+ still the untouched skeleton is not judged yet, and `status`/`check` say so
123
+ (`change_delta_unwritten`, info). A delta with real but invalid content
124
+ still fails.
125
+
126
+ ## [0.20.0] — 2026-10-12
127
+
128
+ ### Added
129
+
130
+ - **One front door for a new application** ([ADR-0033](docs/specs/adr/0033-one-front-door-two-engines.md)).
131
+ `specgate init --forja [<name> <flags…>]` generates a whole application with
132
+ [forja](https://github.com/rsaglobaltech/forja) — a Next.js + Expo monorepo in
133
+ TypeScript, or a Spring Boot / Quarkus API with a web app — which adopts
134
+ Specgate as it installs. In a terminal, plain `init` in an empty folder asks
135
+ first. forja is fetched with `npx` only when chosen, so Specgate keeps zero
136
+ runtime dependencies; `SPECGATE_FORJA_CMD` points at another forja.
137
+ - **`specgate add usecase|entity|port`** in a forja project: the class where the
138
+ architecture expects it, its test and its wiring, through `forja add`; `add
139
+ usecase` also creates the requirement and names it in the test. Outside a forja
140
+ project it says to use `new`. In a forja project, `status` suggests it as the
141
+ next step for a requirement with no code.
142
+ - **`arch_cmd`: your architecture check in the gate** ([ADR-0028](docs/specs/adr/0028-architecture-conformance-is-part-of-the-gate.md), points 1–2).
143
+ `specgate config set arch_cmd "<cmd>"` — ArchUnit, dependency-cruiser,
144
+ import-linter… — and `check`, `done` and the harness gate run it between
145
+ validation and the tests; in the harness a failure goes back to the agent.
146
+ Without it the gate passes as before and says the architecture was not checked.
147
+ - **The documentation site carries forja's documentation**, as the "New project
148
+ (forja)" section, and the landing page shows where Specgate and forja sit in
149
+ the DevOps loop.
150
+
151
+ ### Fixed
152
+
153
+ - **Copy did nothing on the documentation site.** The button looked for the code
154
+ inside its own header, found nothing, and gave up silently — on every block of
155
+ every page and the landing page. It copies now; on a terminal block it copies
156
+ the commands without their output; and where the Clipboard API is refused it
157
+ falls back to the browser's copy command.
158
+
159
+ ### Changed
160
+
161
+ - **The Start section of the documentation reads as two journeys, not a list.**
162
+ The sidebar has real subsections (Begin · From scratch · Existing project)
163
+ with numbered steps; every journey page opens with a step indicator — where
164
+ you are, what is behind you, how long this step takes — and an "In this
165
+ phase" card; Previous/Next stay inside the journey. Recorded CLI output is
166
+ drawn as a terminal in the CLI's own colours. Getting started is three
167
+ things in order: install, pick your path, learn the daily loop. The landing
168
+ page starts with three commands that work in an empty folder, and its
169
+ journey snippets show 0.19's output.
170
+
11
171
  ## [0.19.1] — 2026-10-12
12
172
 
13
173
  ### Fixed
@@ -33,24 +193,24 @@ The release process is in [`docs/release-process.md`](docs/release-process.md).
33
193
 
34
194
  ### Fixed
35
195
 
36
- - **`specgate draft --agent "claude -p"` could never write** (#94): in print
196
+ - **`specgate draft --agent "claude -p"` could never write** (#103): in print
37
197
  mode Claude Code has no permission to edit, so it asked "Want to grant
38
198
  permission…?", exited, and `draft` reported `draft_no_front_matter`. `draft`
39
199
  now adds `--permission-mode acceptEdits` when the command brings no
40
200
  permission flag of its own, and says so. An agent that runs and writes
41
201
  nothing is told apart from a draft with findings, with the likely cause.
42
- - **After `draft <module> --agent`, the next step was lost** (#96) at the end of
202
+ - **After `draft <module> --agent`, the next step was lost** (#105) at the end of
43
203
  the agent's long output. A rule now marks where Specgate takes over, the
44
204
  brief's modules show where each stands, and the next steps are numbered —
45
205
  review, questions, archive, then the next module or `status`.
46
206
 
47
- - **A second `draft <module> --agent` pass redrafted blind** (#98): the agent
207
+ - **A second `draft <module> --agent` pass redrafted blind** (#107): the agent
48
208
  may only edit, so it cannot run the checker, and its prompt carried the guide
49
209
  but not the findings. It now gets the open findings, with their fixes. On a
50
210
  real run with `claude -p`: 13 findings after the first pass, 0 after the
51
211
  second.
52
212
  - **Under `--agent`, the agent asked for permission to run `specgate draft`**
53
- (#97), which Specgate runs itself when the agent finishes. The prompt says so.
213
+ (#106), which Specgate runs itself when the agent finishes. The prompt says so.
54
214
 
55
215
  ### Changed
56
216
 
package/README.md CHANGED
@@ -36,24 +36,24 @@ The package is scoped, the binary is not ([ADR-0024](docs/specs/adr/0024-the-too
36
36
 
37
37
  → [Getting started](docs/getting-started.md) · [Your team's first pull request](docs/first-pr.md) · [Quickstart for joiners](docs/quickstart.md)
38
38
 
39
- ## 🔁 The daily loop — five commands
39
+ ## 🔁 The daily loop — four verbs
40
40
 
41
41
  ```bash
42
- specgate status # what is open, and the next command to run
43
- specgate new "Customers download invoices as PDF" # requirement + scenario, in one step
44
- # rewrite the scenario's <placeholders>, then write a test that mentions REQ-007:
45
- # // REQ-007 — a paid invoice downloads as a PDF
46
- specgate done REQ-007 # runs the gate for it, then marks it Implemented
47
- specgate check # the whole gate — the same one CI runs
42
+ specgate propose add-pdf-invoices # a change: proposal, tasks, a delta to write, REQ ids reserved
43
+ # write REQ-007 and its scenario in the delta, a test that mentions REQ-007, the code
44
+ specgate apply # the next requirement through the gate: Implemented when green
45
+ specgate status # what is open, and the next command to run
46
+ specgate archive add-pdf-invoices # once every requirement in it is Implemented
48
47
  ```
49
48
 
50
- That is all most of a team ever types. **Mentioning `REQ-NNN` in a test is the
51
- link** — there is nothing else to declare. The traceability matrix is
52
- generated from `spec.md`, the scenario tags and your tests; nobody edits it,
53
- and CI fails when the committed copy is out of date. `done` writes nothing
54
- while the gate fails, so a requirement it closes is one CI will not reopen.
55
-
56
- Everything else — packs, changes, the harness, ALM sync — is in `specgate --help --all`.
49
+ `specgate check` is the same gate for CI ([ADR-0035](docs/specs/adr/0035-four-verbs-one-lifecycle.md)).
50
+ **A change is archived when its code is done**: while it is open its
51
+ requirements already count — `status` lists them, `apply` and `check` judge the
52
+ project as it will be after archive — and `archive` refuses one still pending.
53
+ `apply` refuses a requirement no test names and writes nothing while the gate
54
+ fails. **Mentioning `REQ-NNN` in a test is the link**; the matrix is generated.
55
+ From a plan: `specgate propose --from-brief`. Old names (`draft`, `done`…) keep
56
+ working; everything else is in `specgate --help --all`.
57
57
 
58
58
  ## 🪜 Adopt one level at a time
59
59
 
@@ -61,7 +61,7 @@ Each level is useful on its own and never requires the ones above it.
61
61
 
62
62
  | Level | You get | Commands | Cost |
63
63
  | ------ | ------------------------------------------------ | ---------------------------- | ------- |
64
- | **L1** | Traceable specs in your repo | `init`, `new`, `done` | ~1 hour |
64
+ | **L1** | Traceable specs in your repo | `init`, `propose`, `apply`, `archive` | ~1 hour |
65
65
  | **L2** | A PR gate enforcing spec and test coverage | `check`, `ci init` | ~1 hour |
66
66
  | **L3** | Versioned, reusable domain requirements | `specops add / sync / diff` | ~1 day |
67
67
  | **L4** | Agent-driven delivery, one requirement at a time | `agents init`, `harness run` | ~1 week |
@@ -76,24 +76,23 @@ stricter with every delivery. Given a test command, it runs your suite too.
76
76
 
77
77
  **Reviews that read intent.** The reviewer reads the requirement, its
78
78
  scenario and the test that names it — the gate has already proved the
79
- mechanical part. A spec that already shipped changes through a reviewable
80
- delta: only what moves, never a copy. Archiving merges it into the spec tree
81
- and writes the feature files, so a merged proposal cannot quietly become
82
- undone work.
79
+ mechanical part. A change is a reviewable delta: only what moves, never a
80
+ copy. It is archived — merged into the spec tree, with its feature files —
81
+ only once every requirement in it passed the gate, in the same pull request.
83
82
  → [Your team's first pull request](docs/first-pr.md) · [Reviewing changes](docs/reviewing-changes.md)
84
83
 
85
84
  **From a brief, or from OpenSpec.** Save your plan as `docs/brief.md`, run
86
- `specgate draft`: module by module, it briefs your agent and holds the draft
87
- to eleven rules — scenarios per actor and surface, sourced laws, every value in the brief or listed as an assumption, open
88
- questions that block, ids each actor can reach. Teams on OpenSpec keep it: `specgate verify` fails while
85
+ `specgate propose --from-brief`: module by module, it briefs your agent and holds
86
+ the draft to eleven rules — scenarios per actor and surface, sourced laws, every
87
+ value in the brief or listed as an assumption, open questions that block, ids each
88
+ actor can reach. Teams on OpenSpec keep it: `specgate verify` fails while
89
89
  a change claims a scenario no test names.
90
90
  → [A new project, step by step](docs/new-project.md) · [From a client brief](docs/from-a-brief.md) · [Already on OpenSpec](docs/openspec.md)
91
91
 
92
- **Your agent works the same loop.** `specgate agents init` gives Claude Code,
93
- Cursor, Copilot, Windsurf, Aider, Gemini, Cline, Codex or Antigravity the five
94
- steps as slash commands (`/specgate:new`, `/specgate:done`, …) from one
95
- definition. Every daily command speaks JSON with stable codes and a `fix` on
96
- each. The MCP server ships in the package: `specgate mcp install --client claude`.
92
+ **Your agent works the same loop.** `specgate agents init` gives Claude Code, Cursor,
93
+ Copilot, Windsurf, Aider, Gemini, Cline, Codex or Antigravity the loop as slash commands
94
+ (`/specgate:propose`, `/specgate:apply`, …) from one definition. Every daily command speaks
95
+ JSON with stable codes and a `fix` on each. MCP ships in the package: `specgate mcp install --client claude`.
97
96
  → [Agents](docs/agents.md) · [The agent contract](docs/specs/agent-contract.md) · [Automation and MCP](docs/automation.md)
98
97
 
99
98
  **Domain knowledge as a dependency.** A pack is a versioned, schema-validated
@@ -102,9 +101,10 @@ upgrade as intent with `specops diff --as-change`, not as a file diff.
102
101
  → [Domain packs: 7 proven in the pilots, 11 starter examples](docs/domain-packs.md) · [Supply chain](docs/supply-chain.md)
103
102
 
104
103
  **Unattended delivery.** `specgate harness run` drives plan → agent → verify →
105
- done for every pending requirement, each in its own git worktree; it never
106
- merges. The agent is any shell command with `{prompt_file}`; it stops where retrying cannot help.
107
- `specgate alm sync` keeps Jira, Azure Boards or GitHub Issues in step.
104
+ apply for every pending requirement, each in its own git worktree; it merges only
105
+ with `--chain`, only what passed the gate. The agent is any shell command with
106
+ `{prompt_file}`; `specgate studio` shows it at work, at `/live`. `specgate alm sync`
107
+ keeps Jira, Azure Boards or GitHub Issues in step.
108
108
  → [The harness](docs/harness.md) · [Jira, Azure Boards and GitHub Issues](docs/alm.md)
109
109
 
110
110
  **Tested as you install it.** Every release runs an end-to-end suite over every
@@ -122,7 +122,7 @@ since 0.14 come from building real products with it, from brief to running app.
122
122
  | Draft checklist from a brief | ✅ | ❌ | ⚠️ | ❌ | ❌ |
123
123
  | Proves OpenSpec's "done" against tests | ✅ `verify` | ❌ | ❌ | ❌ | ❌ |
124
124
  | Vendor-neutral | ✅ | ✅ | ✅ | ❌ | ✅ |
125
- | Commands to learn before the first PR | ✅ 5 (26 more, opt-in) | ✅ | ✅ | ✅ | ✅ |
125
+ | Commands to learn before the first PR | ✅ 6 (31 more, opt-in) | ✅ | ✅ | ✅ | ✅ |
126
126
 
127
127
  OpenSpec is the closest tool: if you want the change loop without packs or an enforced matrix, it fits better.
128
128
  → [Full matrix, trade-offs and migration paths](docs/comparisons.md)
package/bin/specgate.ts CHANGED
@@ -10,6 +10,7 @@ const packageJson = require(path.join(rootDir, "package.json"));
10
10
  const VERSION: string = packageJson.version || "0.0.0";
11
11
  import { ICommand } from "../scripts/lib/command";
12
12
  import { SURFACE, helpRows, coreHelpRows, hiddenCommandCount } from "../scripts/lib/surface";
13
+ import type { Command, HelpSection } from "../scripts/lib/surface";
13
14
  import { findProjectRoot } from "../scripts/lib/project-root";
14
15
 
15
16
  /** Resolve a registry row's `script` segments to a path under dist/scripts. */
@@ -119,18 +120,19 @@ const EXAMPLES =
119
120
  /**
120
121
  * The daily loop, narrowed.
121
122
  *
122
- * The surface grew past twenty, which is more than anyone reads. A new user
123
- * needs `init` or `adopt` once, then lives in status → plan → req → change →
124
- * validate → done. Everything else is real but not first — `--help --all`
125
- * shows it, and `specgate config set profile full` makes that the default.
123
+ * The surface grew past thirty, which is more than anyone reads. A new user
124
+ * needs `init` once, then lives in propose → apply → status → archive, with
125
+ * `check` in CI (ADR-0035). Everything else is real but not first —
126
+ * `--help --all` shows it, and `specgate config set profile full` makes that
127
+ * the default.
126
128
  *
127
129
  * Both help profiles are rendered from the surface registry, so a command
128
130
  * cannot exist without appearing in one of them or being deliberately absent
129
131
  * from both.
130
132
  */
131
- function renderGroups(groups: any[]): string {
133
+ function renderGroups(groups: HelpSection[]): string {
132
134
  return groups
133
- .map((g) => section(g.title) + g.rows.map((r: any) => cmd(r.icon, r.label, r.summary)).join(""))
135
+ .map((g) => section(g.title) + g.rows.map((r) => cmd(r.icon, r.label, r.summary)).join(""))
134
136
  .join("");
135
137
  }
136
138
 
@@ -140,15 +142,16 @@ function usageCore() {
140
142
  section("Usage") +
141
143
  ` ${c.accent}specgate${c.reset} ${c.bold}<command>${c.reset} [options] ${c.muted}specgate <command> --help for its options${c.reset}\n` +
142
144
  renderGroups(coreHelpRows()) +
145
+ section("Examples") +
146
+ example(`npx @rsaglobaltech/specgate@latest init`, "Existing repo or empty directory") +
147
+ example(`specgate propose add-dynamic-pricing`, "An idea becomes a change") +
148
+ example(`specgate propose --from-brief`, "Your plan is in docs/brief.md") +
149
+ example(`specgate apply`, "The next requirement, through the gate") +
150
+ example(`specgate archive add-dynamic-pricing`, "Every requirement in it delivered") +
143
151
  section("More") +
144
152
  ` ${c.muted}${hiddenCommandCount()} more commands cover packs, automation, agents and reporting.${c.reset}\n` +
153
+ ` ${c.accent}specgate config set profile full${c.reset}${c.muted} make the full list the default${c.reset}\n` +
145
154
  ` ${c.accent}specgate --help --all${c.reset}${c.muted} show every command${c.reset}\n` +
146
- ` ${c.accent}specgate config set profile full${c.reset}${c.muted} make that the default${c.reset}\n` +
147
- section("Examples") +
148
- example(`npx @rsaglobaltech/specgate@latest init`, "Existing repo or empty directory") +
149
- example(`specgate draft`, "Your plan is in docs/brief.md") +
150
- example(`specgate status`, "Start of day") +
151
- example(`specgate check`, "Before a pull request") +
152
155
  "\n"
153
156
  );
154
157
  }
@@ -169,10 +172,11 @@ function helpProfile(): string {
169
172
  return "core";
170
173
  }
171
174
 
172
- function groupUsage(row: any) {
175
+ /** Called only for a row that groups sub-commands. */
176
+ function groupUsage(row: Command) {
173
177
  let out = `\n ${c.brand}${sym.brand}${c.reset} ${c.bold}specgate ${row.name}${c.reset} <sub-command> [options]\n`;
174
178
  out += section("Sub-commands");
175
- for (const s of row.subcommands) {
179
+ for (const s of row.subcommands!) {
176
180
  const summary = (s.help && s.help.summary) || (row.help && row.help.summary) || "";
177
181
  out += cmd((s.help && s.help.icon) || "·", `${row.name} ${s.name}`, summary, 20);
178
182
  }
@@ -242,7 +246,7 @@ export class CreateSpecDrivenAppCommand implements ICommand {
242
246
 
243
247
  // Inside a project, a bare `specgate` answers "where am I, and what next?"
244
248
  // — the question people have when they type it — rather than the list of
245
- // every command (#96). Outside one, the help is the useful answer.
249
+ // every command (#105). Outside one, the help is the useful answer.
246
250
  if (args.length === 0 && findProjectRoot(process.cwd())) {
247
251
  process.env.SPECGATE_BARE = "1";
248
252
  args = ["status"];
@@ -260,7 +264,7 @@ export class CreateSpecDrivenAppCommand implements ICommand {
260
264
 
261
265
  const command = args[0];
262
266
 
263
- const row = SURFACE.find((c: any) => c.name === command);
267
+ const row = SURFACE.find((c) => c.name === command);
264
268
  if (!row) {
265
269
  info(`Unknown command: ${command}`);
266
270
  usage();
@@ -277,7 +281,7 @@ export class CreateSpecDrivenAppCommand implements ICommand {
277
281
  process.exit(0);
278
282
  }
279
283
  if (row.subcommands && !row.script && args.length === 1) {
280
- const expected = row.subcommands.map((s: any) => s.name).join(", ");
284
+ const expected = row.subcommands.map((s) => s.name).join(", ");
281
285
  error(`Unknown ${command} sub-command: (none). Expected: ${expected}`);
282
286
  groupUsage(row);
283
287
  process.exit(2);
@@ -300,15 +304,17 @@ export class CreateSpecDrivenAppCommand implements ICommand {
300
304
 
301
305
  // Otherwise the sub-command is the route, and an unknown one stops here.
302
306
  const subName = args[1];
303
- const sub = (row.subcommands || []).find((s: any) => s.name === subName);
307
+ const sub = (row.subcommands || []).find((s) => s.name === subName);
304
308
  if (!sub) {
305
- const expected = (row.subcommands || []).map((s: any) => s.name).join(", ");
309
+ const expected = (row.subcommands || []).map((s) => s.name).join(", ");
306
310
  error(`Unknown ${command} sub-command: ${subName || "(none)"}. Expected: ${expected}`);
307
311
  usage();
308
312
  process.exit(2);
309
313
  }
310
314
 
311
- const target = resolveScript(sub.script);
315
+ // A row without its own script scripts every sub-command; the surface
316
+ // registry test holds the registry to that.
317
+ const target = resolveScript(sub.script!);
312
318
  ensureExecutable(target);
313
319
  runNodeScript(target, args.slice(sub.argsFrom === undefined ? 2 : sub.argsFrom));
314
320
  }
@@ -104,10 +104,11 @@ const EXAMPLES = example(`npx @rsaglobaltech/specgate@latest init`, "Generate a
104
104
  /**
105
105
  * The daily loop, narrowed.
106
106
  *
107
- * The surface grew past twenty, which is more than anyone reads. A new user
108
- * needs `init` or `adopt` once, then lives in status → plan → req → change →
109
- * validate → done. Everything else is real but not first — `--help --all`
110
- * shows it, and `specgate config set profile full` makes that the default.
107
+ * The surface grew past thirty, which is more than anyone reads. A new user
108
+ * needs `init` once, then lives in propose → apply → status → archive, with
109
+ * `check` in CI (ADR-0035). Everything else is real but not first —
110
+ * `--help --all` shows it, and `specgate config set profile full` makes that
111
+ * the default.
111
112
  *
112
113
  * Both help profiles are rendered from the surface registry, so a command
113
114
  * cannot exist without appearing in one of them or being deliberately absent
@@ -123,15 +124,16 @@ function usageCore() {
123
124
  section("Usage") +
124
125
  ` ${ui_1.c.accent}specgate${ui_1.c.reset} ${ui_1.c.bold}<command>${ui_1.c.reset} [options] ${ui_1.c.muted}specgate <command> --help for its options${ui_1.c.reset}\n` +
125
126
  renderGroups((0, surface_1.coreHelpRows)()) +
127
+ section("Examples") +
128
+ example(`npx @rsaglobaltech/specgate@latest init`, "Existing repo or empty directory") +
129
+ example(`specgate propose add-dynamic-pricing`, "An idea becomes a change") +
130
+ example(`specgate propose --from-brief`, "Your plan is in docs/brief.md") +
131
+ example(`specgate apply`, "The next requirement, through the gate") +
132
+ example(`specgate archive add-dynamic-pricing`, "Every requirement in it delivered") +
126
133
  section("More") +
127
134
  ` ${ui_1.c.muted}${(0, surface_1.hiddenCommandCount)()} more commands cover packs, automation, agents and reporting.${ui_1.c.reset}\n` +
135
+ ` ${ui_1.c.accent}specgate config set profile full${ui_1.c.reset}${ui_1.c.muted} make the full list the default${ui_1.c.reset}\n` +
128
136
  ` ${ui_1.c.accent}specgate --help --all${ui_1.c.reset}${ui_1.c.muted} show every command${ui_1.c.reset}\n` +
129
- ` ${ui_1.c.accent}specgate config set profile full${ui_1.c.reset}${ui_1.c.muted} make that the default${ui_1.c.reset}\n` +
130
- section("Examples") +
131
- example(`npx @rsaglobaltech/specgate@latest init`, "Existing repo or empty directory") +
132
- example(`specgate draft`, "Your plan is in docs/brief.md") +
133
- example(`specgate status`, "Start of day") +
134
- example(`specgate check`, "Before a pull request") +
135
137
  "\n");
136
138
  }
137
139
  /**
@@ -152,6 +154,7 @@ function helpProfile() {
152
154
  }
153
155
  return "core";
154
156
  }
157
+ /** Called only for a row that groups sub-commands. */
155
158
  function groupUsage(row) {
156
159
  let out = `\n ${ui_1.c.brand}${ui_1.sym.brand}${ui_1.c.reset} ${ui_1.c.bold}specgate ${row.name}${ui_1.c.reset} <sub-command> [options]\n`;
157
160
  out += section("Sub-commands");
@@ -215,7 +218,7 @@ class CreateSpecDrivenAppCommand {
215
218
  args = args.length ? args : process.argv.slice(2);
216
219
  // Inside a project, a bare `specgate` answers "where am I, and what next?"
217
220
  // — the question people have when they type it — rather than the list of
218
- // every command (#96). Outside one, the help is the useful answer.
221
+ // every command (#105). Outside one, the help is the useful answer.
219
222
  if (args.length === 0 && (0, project_root_1.findProjectRoot)(process.cwd())) {
220
223
  process.env.SPECGATE_BARE = "1";
221
224
  args = ["status"];
@@ -275,6 +278,8 @@ class CreateSpecDrivenAppCommand {
275
278
  usage();
276
279
  process.exit(2);
277
280
  }
281
+ // A row without its own script scripts every sub-command; the surface
282
+ // registry test holds the registry to that.
278
283
  const target = resolveScript(sub.script);
279
284
  ensureExecutable(target);
280
285
  runNodeScript(target, args.slice(sub.argsFrom === undefined ? 2 : sub.argsFrom));
@@ -1 +1 @@
1
- {"version":3,"file":"specgate.js","sourceRoot":"","sources":["../../bin/specgate.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,uCAAyB;AACzB,2CAA6B;AAC7B,iDAA0C;AAE1C,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;AACpD,MAAM,WAAW,GAAG,IAA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,CAAC,IAAI,KAAK,MAAM;IACvB,CAAC,OAAO,CAAC,IAAI;QACX,CAAC,CAAC,CAAC,aAAa,EAAE,aAAa,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QAC/E,CAAC,CAAC,KAAK,CAAC,CAAC;AAEb,IAAI,YAAY,EAAE,CAAC;IACjB,IAAI,0BAA0B,EAAE,CAAC,OAAO,EAAE,CAAC;AAC7C,CAAC"}
@@ -8,9 +8,19 @@ class AddRequirementUseCase {
8
8
  constructor(traceRepo) {
9
9
  this.traceRepo = traceRepo;
10
10
  }
11
- execute(projectDir, fields) {
11
+ /**
12
+ * `reservedUpTo`: the highest id number an open change has reserved. A new
13
+ * id goes above it, so a requirement added while a change is open never takes
14
+ * an id that change will use (ADR-0036).
15
+ */
16
+ execute(projectDir, fields, reservedUpTo = 0) {
12
17
  const rawContent = this.traceRepo.readTraceability(projectDir) || "";
13
18
  const parsed = rawContent ? (0, TraceabilityFormat_1.parseTraceabilityRows)(rawContent) : { rows: [] };
19
+ if (!fields.requirement && reservedUpTo > 0) {
20
+ const next = Number(TraceabilityMatrix_1.TraceabilityMatrix.nextReqId(parsed.rows || []).slice(4));
21
+ const n = Math.max(next, reservedUpTo + 1);
22
+ fields = { ...fields, requirement: `REQ-${String(n).padStart(3, "0")}` };
23
+ }
14
24
  const result = TraceabilityMatrix_1.TraceabilityMatrix.appendRequirement(rawContent, fields, parsed.rows || []);
15
25
  this.traceRepo.writeTraceability(projectDir, result.content);
16
26
  return {
@@ -1 +1 @@
1
- {"version":3,"file":"AddRequirementUseCase.js","sourceRoot":"","sources":["../../../../../packages/core/src/application/AddRequirementUseCase.ts"],"names":[],"mappings":";;;AACA,qEAAkE;AAClE,qEAAqE;AAuBrE,MAAa,qBAAqB;IACZ;IAApB,YAAoB,SAAkC;QAAlC,cAAS,GAAT,SAAS,CAAyB;IAAG,CAAC;IAEnD,OAAO,CAAC,UAAkB,EAAE,MAA4B;QAC7D,MAAM,UAAU,GAAG,IAAI,CAAC,SAAS,CAAC,gBAAgB,CAAC,UAAU,CAAC,IAAI,EAAE,CAAC;QACrE,MAAM,MAAM,GAAG,UAAU,CAAC,CAAC,CAAC,IAAA,0CAAqB,EAAC,UAAU,CAAC,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC;QAE7E,MAAM,MAAM,GAAG,uCAAkB,CAAC,iBAAiB,CAAC,UAAU,EAAE,MAAM,EAAE,MAAM,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC;QAC3F,IAAI,CAAC,SAAS,CAAC,iBAAiB,CAAC,UAAU,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC;QAE7D,OAAO;YACL,EAAE,EAAE,IAAI;YACR,KAAK,EAAE,MAAM,CAAC,KAAK;YACnB,UAAU,EAAE,MAAM,CAAC,UAAU;SAC9B,CAAC;IACJ,CAAC;CACF;AAhBD,sDAgBC"}
1
+ {"version":3,"file":"AddRequirementUseCase.js","sourceRoot":"","sources":["../../../../../packages/core/src/application/AddRequirementUseCase.ts"],"names":[],"mappings":";;;AACA,qEAAkE;AAClE,qEAAqE;AAyBrE,MAAa,qBAAqB;IACZ;IAApB,YAAoB,SAAkC;QAAlC,cAAS,GAAT,SAAS,CAAyB;IAAG,CAAC;IAE1D;;;;OAIG;IACI,OAAO,CACZ,UAAkB,EAClB,MAA4B,EAC5B,YAAY,GAAG,CAAC;QAEhB,MAAM,UAAU,GAAG,IAAI,CAAC,SAAS,CAAC,gBAAgB,CAAC,UAAU,CAAC,IAAI,EAAE,CAAC;QACrE,MAAM,MAAM,GAAG,UAAU,CAAC,CAAC,CAAC,IAAA,0CAAqB,EAAC,UAAU,CAAC,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC;QAC7E,IAAI,CAAC,MAAM,CAAC,WAAW,IAAI,YAAY,GAAG,CAAC,EAAE,CAAC;YAC5C,MAAM,IAAI,GAAG,MAAM,CAAC,uCAAkB,CAAC,SAAS,CAAC,MAAM,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;YAC9E,MAAM,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,YAAY,GAAG,CAAC,CAAC,CAAC;YAC3C,MAAM,GAAG,EAAE,GAAG,MAAM,EAAE,WAAW,EAAE,OAAO,MAAM,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,EAAE,EAAE,CAAC;QAC3E,CAAC;QAED,MAAM,MAAM,GAAG,uCAAkB,CAAC,iBAAiB,CAAC,UAAU,EAAE,MAAM,EAAE,MAAM,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC;QAC3F,IAAI,CAAC,SAAS,CAAC,iBAAiB,CAAC,UAAU,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC;QAE7D,OAAO;YACL,EAAE,EAAE,IAAI;YACR,KAAK,EAAE,MAAM,CAAC,KAAK;YACnB,UAAU,EAAE,MAAM,CAAC,UAAU;SAC9B,CAAC;IACJ,CAAC;CACF;AA9BD,sDA8BC"}
@@ -70,10 +70,15 @@ class ArchiveChangeUseCase {
70
70
  // (`specgate draft`) is what says it is ready, and `change archive`
71
71
  // already refuses one that is not (#57). Asking the person to also tick
72
72
  // boxes nobody wrote was a second gate with nothing behind it (#94).
73
+ // A change whose requirements all passed the gate (`gated`, ADR-0035) has
74
+ // its evidence; unchecked boxes are then said, not enforced.
73
75
  if (progress.remaining > 0 && !o.force && !o.draft) {
74
- plan.diagnostics.push((0, Diagnostic_1.error)("archive_tasks_incomplete", `Change "${changeId}" still has ${progress.remaining} unchecked task(s).`, {
76
+ const finding = o.gated ? Diagnostic_1.warning : Diagnostic_1.error;
77
+ (o.gated ? plan.warnings : plan.diagnostics).push(finding("archive_tasks_incomplete", `Change "${changeId}" still has ${progress.remaining} unchecked task(s).`, {
75
78
  target: changeId,
76
- fix: "Finish the tasks, or pass --force to archive anyway.",
79
+ fix: o.gated
80
+ ? "Tick them in tasks.md if they are done; the gate already passed for every requirement."
81
+ : "Finish the tasks, or pass --force to archive anyway.",
77
82
  }));
78
83
  }
79
84
  const deltas = config.skip_specs ? [] : this.repo.listDeltas(changeId);