@rsaglobaltech/specgate 0.12.1 → 0.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +164 -0
- package/README.md +66 -58
- package/bin/specgate.ts +35 -0
- package/dist/bin/specgate.js +31 -0
- package/dist/bin/specgate.js.map +1 -1
- package/dist/packages/core/src/application/ArchiveChangeUseCase.js +22 -0
- package/dist/packages/core/src/application/ArchiveChangeUseCase.js.map +1 -1
- package/dist/packages/core/src/application/ValidateProjectUseCase.js +12 -5
- package/dist/packages/core/src/application/ValidateProjectUseCase.js.map +1 -1
- package/dist/packages/core/src/domain/AgentPrompt.js +2 -1
- package/dist/packages/core/src/domain/AgentPrompt.js.map +1 -1
- package/dist/packages/core/src/domain/DeltaFeature.js +39 -0
- package/dist/packages/core/src/domain/DeltaFeature.js.map +1 -0
- package/dist/packages/core/src/domain/DerivedMatrix.js +25 -19
- package/dist/packages/core/src/domain/DerivedMatrix.js.map +1 -1
- package/dist/packages/core/src/domain/RequirementReadiness.js +7 -2
- package/dist/packages/core/src/domain/RequirementReadiness.js.map +1 -1
- package/dist/packages/core/src/domain/SpecSections.js +1 -1
- package/dist/packages/core/src/domain/SpecSections.js.map +1 -1
- package/dist/packages/core/test/unit/delta-feature.test.js +74 -0
- package/dist/packages/core/test/unit/delta-feature.test.js.map +1 -0
- package/dist/packages/mcp-spec-driven/src/native-tools.js +256 -0
- package/dist/packages/mcp-spec-driven/src/native-tools.js.map +1 -0
- package/dist/packages/mcp-spec-driven/src/server.js +276 -0
- package/dist/packages/mcp-spec-driven/src/server.js.map +1 -0
- package/dist/packages/mcp-spec-driven/src/tools.js +684 -0
- package/dist/packages/mcp-spec-driven/src/tools.js.map +1 -0
- package/dist/scripts/agents/init.js +1 -1
- package/dist/scripts/agents/init.js.map +1 -1
- package/dist/scripts/alm/cli.js +4 -0
- package/dist/scripts/alm/cli.js.map +1 -1
- package/dist/scripts/change/instructions.js +5 -4
- package/dist/scripts/change/instructions.js.map +1 -1
- package/dist/scripts/cli/commands/config/CiInitCommand.js +47 -3
- package/dist/scripts/cli/commands/config/CiInitCommand.js.map +1 -1
- package/dist/scripts/cli/commands/harness/RunCommand.js +3 -2
- package/dist/scripts/cli/commands/harness/RunCommand.js.map +1 -1
- package/dist/scripts/cli/commands/mcp/McpInstallCommand.js +8 -2
- package/dist/scripts/cli/commands/mcp/McpInstallCommand.js.map +1 -1
- package/dist/scripts/cli/commands/mcp/index.js +52 -0
- package/dist/scripts/cli/commands/mcp/index.js.map +1 -1
- package/dist/scripts/cli/commands/pack/ExpandDomainPackCommand.js +38 -0
- package/dist/scripts/cli/commands/pack/ExpandDomainPackCommand.js.map +1 -1
- package/dist/scripts/cli/commands/project/OnboardCommand.js +1 -1
- package/dist/scripts/cli/commands/project/OnboardCommand.js.map +1 -1
- package/dist/scripts/cli/commands/quality/DoctorCommand.js +4 -2
- package/dist/scripts/cli/commands/quality/DoctorCommand.js.map +1 -1
- package/dist/scripts/cli/commands/quality/ValidateSpecsCommand.js +27 -10
- package/dist/scripts/cli/commands/quality/ValidateSpecsCommand.js.map +1 -1
- package/dist/scripts/cli/commands/spec/DoneCommand.js +39 -7
- package/dist/scripts/cli/commands/spec/DoneCommand.js.map +1 -1
- package/dist/scripts/cli/commands/spec/StatusCommand.js +27 -6
- package/dist/scripts/cli/commands/spec/StatusCommand.js.map +1 -1
- package/dist/scripts/docs/blocks.js +4 -1
- package/dist/scripts/docs/blocks.js.map +1 -1
- package/dist/scripts/docs/build-site.js +1 -1
- package/dist/scripts/docs/nav.js +23 -3
- package/dist/scripts/docs/nav.js.map +1 -1
- package/dist/scripts/gen_mcp_tools.js +20 -4
- package/dist/scripts/gen_mcp_tools.js.map +1 -1
- package/dist/scripts/lib/derived-writes.js +21 -6
- package/dist/scripts/lib/derived-writes.js.map +1 -1
- package/dist/scripts/lib/surface.js +15 -12
- package/dist/scripts/lib/surface.js.map +1 -1
- package/package.json +12 -3
- package/templates/adopt/spec.md.tpl +5 -6
package/CHANGELOG.md
CHANGED
|
@@ -8,6 +8,170 @@ The release process is in [`docs/release-process.md`](docs/release-process.md).
|
|
|
8
8
|
|
|
9
9
|
## [Unreleased]
|
|
10
10
|
|
|
11
|
+
## [0.14.0] — 2026-10-07
|
|
12
|
+
|
|
13
|
+
### Changed
|
|
14
|
+
|
|
15
|
+
- **`done` will not close a requirement no test mentions.** On a generated
|
|
16
|
+
matrix the requirement being closed is judged as delivered, so `done` refuses
|
|
17
|
+
what the next `check` would — it used to judge it as still `Draft`, write
|
|
18
|
+
Implemented, and leave `[TDD-1]` for CI.
|
|
19
|
+
- **`status` after adoption points at a first real requirement**
|
|
20
|
+
(`specgate new "…"`), then at `specgate done REQ-NNN` for the newest one —
|
|
21
|
+
not "`specgate check` — write REQ-001's test" for the baseline.
|
|
22
|
+
- **The documentation site has a new design ("Editorial").** A warm paper
|
|
23
|
+
ground, a serif display face (Newsreader) over a quiet sans (Instrument
|
|
24
|
+
Sans), one deep green accent, and a warm dark theme from the same tokens —
|
|
25
|
+
so the diagrams follow. The landing page is rebuilt around the five-command
|
|
26
|
+
loop, what each status owes, the four roles on a team and the harness, with
|
|
27
|
+
reveal-on-scroll and a slow parallax that both stop under reduced motion.
|
|
28
|
+
The pack gallery is redesigned to match: centred, monograms instead of emoji,
|
|
29
|
+
a search bar of its own, and install commands that no longer overflow.
|
|
30
|
+
|
|
31
|
+
### Fixed
|
|
32
|
+
|
|
33
|
+
Found by following the documentation step by step on the published 0.13.0:
|
|
34
|
+
|
|
35
|
+
- **The docs' recipes run as written.** Adding a scenario no longer tells you
|
|
36
|
+
to hand-edit the generated matrix (whose next regeneration removed the row);
|
|
37
|
+
getting started no longer copies an example file that only exists inside the
|
|
38
|
+
package; the `plan --format json` sample and the agent recipe use the real
|
|
39
|
+
keys (`next`, `actionable`, …); an unclosed code fence no longer swallows the
|
|
40
|
+
`--strict-coverage` section; the `Deferred` status, which does not exist, is
|
|
41
|
+
gone.
|
|
42
|
+
- **An orphan feature on a generated matrix is told to tag its scenario**, not
|
|
43
|
+
to add a row the next `check` removes.
|
|
44
|
+
- **`Deprecated` owes nothing.** It failed `[TDD-1]`, while `req rm` past Draft
|
|
45
|
+
recommends Deprecated — the advice was a loop.
|
|
46
|
+
- **`done --json` (and MCP) says why the gate refused**: the validate findings
|
|
47
|
+
come before `done_validate_failed`, instead of that code alone.
|
|
48
|
+
- **MCP tools declare their argument**: `specgate_change_*` an `id`,
|
|
49
|
+
`specgate_req_*` a `requirement` or `title`.
|
|
50
|
+
- **Generated text teaches the current loop**: the adopted `spec.md` header,
|
|
51
|
+
the retro-fill advice, readiness fixes and the harness prompt recommend
|
|
52
|
+
`specgate new`, a test that mentions the id and `done` — `req link` only for
|
|
53
|
+
hand-kept matrices.
|
|
54
|
+
|
|
55
|
+
### Added
|
|
56
|
+
|
|
57
|
+
- **The documentation site tells the current story.** The landing page opens
|
|
58
|
+
on `init` and the five-command loop — status, new, a test that mentions the
|
|
59
|
+
requirement, done, check — with a section on what the author, the reviewer,
|
|
60
|
+
CI and the agent each do. Three new pages: [How Specgate thinks](docs/concepts.md)
|
|
61
|
+
(six ideas: what each status owes, where the matrix comes from), [The MCP
|
|
62
|
+
server](docs/mcp.md) (install, tools, the contract-edit guard) and an
|
|
63
|
+
[FAQ](docs/faq.md). The landing still taught `onboard`/`adopt`, a four-command
|
|
64
|
+
loop on `plan` and `validate`, and a harness gating on `--strict-tdd`.
|
|
65
|
+
|
|
66
|
+
### Fixed
|
|
67
|
+
|
|
68
|
+
- **The pack gallery names Specgate and installs what it shows.** Every card
|
|
69
|
+
offered `npx create-spec-driven-app expand --pack-root ./packs …` — the old
|
|
70
|
+
package name, against a `./packs` folder the reader does not have. Cards now
|
|
71
|
+
show `specgate specops add` from this repository, pinned to the release tag.
|
|
72
|
+
- **A change to the site generator redeploys the site.** The Pages workflow
|
|
73
|
+
only watched `docs/**`, so the diagram fix reached `main` and was never
|
|
74
|
+
published.
|
|
75
|
+
- **Diagrams render on every docs page.** A blank line inside an inlined SVG
|
|
76
|
+
ended Markdown's HTML block, so the rest of the diagram showed as a block of
|
|
77
|
+
escaped markup on *Domain packs* and in *Specs that cannot lie*. Blank lines
|
|
78
|
+
are dropped when a diagram is inlined, and a test fails on any page showing
|
|
79
|
+
diagram markup as text.
|
|
80
|
+
- **`mcp install --help` names the clients it supports.** It offered
|
|
81
|
+
`vscode` and `kiro`, which fail with `unsupported_client`; it supports
|
|
82
|
+
`claude` and `cursor`. The docs no longer mention a `windsurf` client either.
|
|
83
|
+
|
|
84
|
+
## [0.13.0] — 2026-10-07
|
|
85
|
+
|
|
86
|
+
### Added
|
|
87
|
+
|
|
88
|
+
- **The README teaches the five-command loop** — the test mention as the link,
|
|
89
|
+
`done` gating, `ci init` detection, the MCP server in the package — and
|
|
90
|
+
points to the first-PR guide. npm shows it from this release, with a link to
|
|
91
|
+
the documentation site.
|
|
92
|
+
- **[Your team's first pull request](docs/first-pr.md)** — what the author
|
|
93
|
+
writes, what the reviewer reads (and skips), and every failure a first PR
|
|
94
|
+
meets with its fix.
|
|
95
|
+
- **`ci init` detects the provider** from the repository's CI files or its
|
|
96
|
+
`origin` remote. `init` ends by suggesting `specgate ci init`, which answered
|
|
97
|
+
"--provider is required".
|
|
98
|
+
|
|
99
|
+
- **The E2E suite covers every command** (61/61): ALM against a stand-in Jira
|
|
100
|
+
server, and MCP from `mcp install` to a tool call over stdio.
|
|
101
|
+
|
|
102
|
+
### Changed
|
|
103
|
+
|
|
104
|
+
- **`done` runs the gate before it writes.** Closing a requirement as
|
|
105
|
+
`Implemented`, `Verified` or `Released` now runs what `check` runs and writes
|
|
106
|
+
nothing when it fails. Plain `done` used to print ✔ over a scenario of
|
|
107
|
+
unfilled `<placeholders>` and no test, and the next `check` — the one in CI —
|
|
108
|
+
failed on the same requirement. `--no-check` writes the status without it;
|
|
109
|
+
`--check`/`--strict` still work and are now the default for those statuses.
|
|
110
|
+
|
|
111
|
+
### Fixed
|
|
112
|
+
|
|
113
|
+
- **Fix lines and agent rules speak the generated matrix.** On a generated
|
|
114
|
+
matrix, `[TDD-1]`–`[TDD-3]` no longer tell you to edit a matrix column, and
|
|
115
|
+
`change instructions apply` no longer names an `In Dev` status that does not
|
|
116
|
+
exist or `req link`: mention the requirement in the test, close it with
|
|
117
|
+
`done`, run `check`.
|
|
118
|
+
- **The daily loop over MCP.** `check` and `new` were not MCP tools, so an
|
|
119
|
+
MCP-only client (Claude Desktop, Cursor) could not add a requirement or run
|
|
120
|
+
the gate; they are now `specgate_check` and `specgate_new`. Every tool that
|
|
121
|
+
takes an argument besides the project directory — `new`'s title, `done`'s
|
|
122
|
+
requirement, a change id — declares it in its schema; it used to be passed
|
|
123
|
+
only if an agent guessed to send it.
|
|
124
|
+
- **The MCP server starts.** `mcp install`, `agents init` and the Claude plugin
|
|
125
|
+
configured clients to run `npx -y @specgate/mcp-server`, a package that was
|
|
126
|
+
never published: every client set up that way started nothing. The server now
|
|
127
|
+
ships inside the CLI package as `specgate mcp serve`, its tools call the CLI
|
|
128
|
+
that serves them, and it announces that CLI's version. Re-run `mcp install`
|
|
129
|
+
(or `agents init`) to rewrite an existing config.
|
|
130
|
+
- **`change archive` writes the feature file the delta describes.** It only
|
|
131
|
+
copied `.feature` files an author had placed inside the change folder — which
|
|
132
|
+
neither the template nor `change instructions` asks for — so the documented
|
|
133
|
+
cycle archived a matrix row naming a feature file that never existed. When
|
|
134
|
+
the change brings none, the delta's scenarios are rendered as Gherkin, tagged
|
|
135
|
+
`@REQ-NNN` (and `@SCN-NNN` when the scenario has one). An author's file still
|
|
136
|
+
wins.
|
|
137
|
+
- **A requirement archived into a capability spec can be closed.** On a
|
|
138
|
+
generated matrix, `done` and `req link` wrote only to `spec.md`, so an archived
|
|
139
|
+
requirement got "has no section in spec.md" and a pointer to `req add`. They
|
|
140
|
+
now write its `csda:trace` comment in the capability spec, and archived
|
|
141
|
+
requirements link tests and code by mention like any other.
|
|
142
|
+
- **A freshly installed pack no longer fails its own lock gate.** `expand`
|
|
143
|
+
wrote matrix rows per scenario, so a requirement the pack declares without a
|
|
144
|
+
scenario yet — the multi-tenant pack's REQ-004 — never reached the matrix,
|
|
145
|
+
and `validate --against-lock` failed right after `specops add` with
|
|
146
|
+
`pack_requirement_missing`. The `specops sync` it suggested re-expanded the
|
|
147
|
+
same matrix. With a lockfile, `ci init`'s workflow runs that gate, so every
|
|
148
|
+
project installing such a pack had a red CI from the first commit. The
|
|
149
|
+
requirement now gets a `Draft` row with no scenario. Found by the new E2E
|
|
150
|
+
packs journey.
|
|
151
|
+
- **Asking any command for help is never an error.** `specgate ci --help`,
|
|
152
|
+
`pack`, `specops`, `harness`, `config`, `agents`, `alm` and `mcp` answered
|
|
153
|
+
"Unknown … sub-command: --help" over the global usage; `expand`,
|
|
154
|
+
`harness prompt` and `mcp install` refused `--help` as an unknown argument or
|
|
155
|
+
a missing value. A group now lists its sub-commands with their summaries, and
|
|
156
|
+
each of the three answers with its own usage. Found by a new E2E journey that
|
|
157
|
+
asks every command on the surface.
|
|
158
|
+
|
|
159
|
+
### Added
|
|
160
|
+
|
|
161
|
+
- **E2E coverage is measured and can only grow.** The end-to-end suite is split
|
|
162
|
+
by area (`e2e/journeys/*.mjs`) and runs its files in parallel; each journey
|
|
163
|
+
declares the commands it covers. `npm run e2e:coverage` compares them with
|
|
164
|
+
the command surface and with `e2e/uncovered.json` — commands not covered yet,
|
|
165
|
+
a list that can only shrink — and fails a new command that has neither. A
|
|
166
|
+
unit test and the E2E workflow run it. Journeys for the utilities — `doctor`,
|
|
167
|
+
`fix`, `plan`, `report`, `req list/done/rm`, `config`, `schema`,
|
|
168
|
+
`completion`, `studio`, `onboard` — take it from 14 to 34 of 60 commands, and
|
|
169
|
+
offline journeys for packs — `specops add/diff/sync/remove` against a local
|
|
170
|
+
git remote with tags, `pack bundle` for an air-gapped install, `pack
|
|
171
|
+
init/lint/infer`, `expand` — to 43, and the change cycle (`new` → `archive`
|
|
172
|
+
→ delivered with `done`), `change author` reverting an agent's write outside
|
|
173
|
+
the change, `harness init/prompt/run/report` and `specops contribute` to 55.
|
|
174
|
+
|
|
11
175
|
## [0.12.1] — 2026-10-07
|
|
12
176
|
|
|
13
177
|
**Java builds run the current CLI.** The Maven and Gradle plugins were running
|
package/README.md
CHANGED
|
@@ -24,19 +24,42 @@
|
|
|
24
24
|
> unscoped name ([ADR-0024](docs/specs/adr/0024-the-tool-is-renamed-the-format-is-not.md)). You type `specgate`; `csda` still works too.
|
|
25
25
|
|
|
26
26
|
```bash
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
27
|
+
npm i -g @rsaglobaltech/specgate # or prefix every command with npx @rsaglobaltech/specgate@latest
|
|
28
|
+
|
|
29
|
+
cd your-repo # or an empty directory
|
|
30
|
+
specgate init # adopts the code that is there, touching none of it;
|
|
31
|
+
# scaffolds a new project where there is none
|
|
32
|
+
specgate ci init # the gate as a CI job — GitHub, GitLab, Azure or Jenkins,
|
|
33
|
+
# detected from the repository
|
|
34
|
+
specgate check # the gate, locally
|
|
31
35
|
```
|
|
32
36
|
|
|
33
37
|
Requires **Node.js ≥ 22** — or none at all with the Docker image:
|
|
34
38
|
|
|
35
39
|
```bash
|
|
36
|
-
docker run --rm -v "$PWD:/workspace" ghcr.io/rsaglobaltech/specgate
|
|
40
|
+
docker run --rm -v "$PWD:/workspace" ghcr.io/rsaglobaltech/specgate check
|
|
37
41
|
```
|
|
38
42
|
|
|
39
|
-
→ [Getting started](docs/getting-started.md) · [Quickstart for joiners](docs/quickstart.md)
|
|
43
|
+
→ [Getting started](docs/getting-started.md) · [Your team's first pull request](docs/first-pr.md) · [Quickstart for joiners](docs/quickstart.md)
|
|
44
|
+
|
|
45
|
+
## 🔁 The daily loop — five commands
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
specgate status # what is open, and the next command to run
|
|
49
|
+
specgate new "Customers download invoices as PDF" # requirement + scenario, in one step
|
|
50
|
+
# rewrite the scenario's <placeholders>, then write a test that mentions REQ-007:
|
|
51
|
+
# // REQ-007 — a paid invoice downloads as a PDF
|
|
52
|
+
specgate done REQ-007 # runs the gate for it, then marks it Implemented
|
|
53
|
+
specgate check # the whole gate — the same one CI runs
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
That is all most of a team ever types. **Mentioning `REQ-NNN` in a test is the
|
|
57
|
+
link** — there is nothing else to declare. The traceability matrix is
|
|
58
|
+
generated from `spec.md`, the scenario tags and your tests; nobody edits it,
|
|
59
|
+
and CI fails when the committed copy is out of date. `done` writes nothing
|
|
60
|
+
while the gate fails, so a requirement it closes is one CI will not reopen.
|
|
61
|
+
|
|
62
|
+
Everything else — packs, changes, the harness, ALM sync — is in `specgate --help --all`.
|
|
40
63
|
|
|
41
64
|
## 🪜 Adopt one level at a time
|
|
42
65
|
|
|
@@ -44,57 +67,47 @@ Each level is useful on its own and never requires the ones above it.
|
|
|
44
67
|
|
|
45
68
|
| Level | You get | Commands | Cost |
|
|
46
69
|
| --- | --- | --- | --- |
|
|
47
|
-
| **L1** | Traceable specs in your repo | `init`, `new` | ~1 hour |
|
|
70
|
+
| **L1** | Traceable specs in your repo | `init`, `new`, `done` | ~1 hour |
|
|
48
71
|
| **L2** | A PR gate enforcing spec and test coverage | `check`, `ci init` | ~1 hour |
|
|
49
72
|
| **L3** | Versioned, reusable domain requirements | `specops add / sync / diff` | ~1 day |
|
|
50
73
|
| **L4** | Agent-driven delivery, one requirement at a time | `agents init`, `harness run` | ~1 week |
|
|
51
74
|
|
|
52
75
|
## 🛠️ What it does
|
|
53
76
|
|
|
54
|
-
**A
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
→ [
|
|
59
|
-
|
|
60
|
-
**
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
77
|
+
**A gate that does not lie.** `specgate check` fails when a delivered
|
|
78
|
+
requirement has no scenario, template steps, no test that mentions it, or
|
|
79
|
+
points at a file that is gone. A Draft owes nothing yet: green on day one,
|
|
80
|
+
stricter with every delivery. Given a test command, it runs your suite too.
|
|
81
|
+
→ [Writing specs](docs/writing-specs.md) · [Validating](docs/validating.md) · [Command reference](docs/commands.md)
|
|
82
|
+
|
|
83
|
+
**Reviews that read intent.** The reviewer reads the requirement, its
|
|
84
|
+
scenario and the test that names it — the gate has already proved the
|
|
85
|
+
mechanical part. A spec that already shipped changes through a reviewable
|
|
86
|
+
delta: only what moves, never a copy. Archiving merges it into the spec tree
|
|
87
|
+
and writes the feature files, so a merged proposal cannot quietly become
|
|
88
|
+
undone work.
|
|
89
|
+
→ [Your team's first pull request](docs/first-pr.md) · [Reviewing changes](docs/reviewing-changes.md)
|
|
90
|
+
|
|
91
|
+
**Your agent works the same loop.** `specgate agents init` gives Claude Code,
|
|
92
|
+
Cursor, Copilot, Windsurf, Aider, Gemini, Cline, Codex or Antigravity the five
|
|
93
|
+
steps as slash commands (`/specgate:new`, `/specgate:done`, …) from one
|
|
94
|
+
definition. Every daily command speaks JSON with stable codes and a `fix` on
|
|
95
|
+
each. The MCP server ships in the package: `specgate mcp install --client claude`.
|
|
96
|
+
→ [Agents](docs/agents.md) · [The agent contract](docs/specs/agent-contract.md) · [Automation and MCP](docs/automation.md)
|
|
70
97
|
|
|
71
98
|
**Domain knowledge as a dependency.** A pack is a versioned, schema-validated
|
|
72
99
|
domain model. Install it, pin it, upgrade it deliberately — and review the
|
|
73
100
|
upgrade as intent with `specops diff --as-change`, not as a file diff.
|
|
74
|
-
→ [Domain packs](docs/domain-packs.md)
|
|
75
|
-
|
|
76
|
-
**
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
→ [
|
|
81
|
-
|
|
82
|
-
**
|
|
83
|
-
|
|
84
|
-
`specgate ci init` generates the gate for GitHub, GitLab, Azure or Jenkins, and
|
|
85
|
-
`specgate alm sync` keeps Jira or Azure Boards in step.
|
|
86
|
-
|
|
87
|
-
**Any agent CLI.** No agent runtime, no SDK dependency: the agent is any shell
|
|
88
|
-
command containing `{prompt_file}` — `claude -p < {prompt_file}`, `aider --yes
|
|
89
|
-
--message-file {prompt_file}`, or `my-wrapper.sh {prompt_file}` for anything
|
|
90
|
-
else. Commit your team's commands in `.harness/profiles.yaml` and pick one by
|
|
91
|
-
name.
|
|
92
|
-
→ [Automation](docs/automation.md) · [The harness](docs/harness.md) · [Jira and Azure Boards](docs/alm.md)
|
|
93
|
-
|
|
94
|
-
**It stays current.** `specgate update` refreshes the generated agent files after an
|
|
95
|
-
upgrade, three-way merging your edits rather than clobbering them. `specgate doctor`
|
|
96
|
-
reports what has drifted, with a fix per finding.
|
|
97
|
-
→ [Command reference](docs/commands.md)
|
|
101
|
+
→ [Domain packs](docs/domain-packs.md) · [Supply chain](docs/supply-chain.md)
|
|
102
|
+
|
|
103
|
+
**Unattended delivery.** `specgate harness run` drives plan → agent → verify →
|
|
104
|
+
done for every pending requirement, each in its own git worktree; it never
|
|
105
|
+
merges. The agent is any shell command with `{prompt_file}` — no runtime or SDK.
|
|
106
|
+
`specgate alm sync` keeps Jira, Azure Boards or GitHub Issues in step.
|
|
107
|
+
→ [The harness](docs/harness.md) · [Jira, Azure Boards and GitHub Issues](docs/alm.md)
|
|
108
|
+
|
|
109
|
+
**Tested as you install it.** Every release runs an end-to-end suite over every
|
|
110
|
+
command, against the packed tarball, on Linux, macOS and Windows.
|
|
98
111
|
|
|
99
112
|
## 🆚 How it compares
|
|
100
113
|
|
|
@@ -105,7 +118,7 @@ reports what has drifted, with a fix per finding.
|
|
|
105
118
|
| Traceability matrix + CI gate | ✅ | ❌ | ⚠️ | ❌ | ❌ |
|
|
106
119
|
| Agent JSON contract | ✅ | ✅ | ❌ | ❌ | ❌ |
|
|
107
120
|
| Vendor-neutral | ✅ | ✅ | ✅ | ❌ | ✅ |
|
|
108
|
-
| Smaller surface to learn | ⚠️ five daily
|
|
121
|
+
| Smaller surface to learn | ⚠️ five daily commands | ✅ | ✅ | ✅ | ✅ |
|
|
109
122
|
|
|
110
123
|
OpenSpec is the closest tool and the honest comparison: if you want the change
|
|
111
124
|
loop without versioned packs or an enforced matrix, theirs is the better fit.
|
|
@@ -113,20 +126,15 @@ loop without versioned packs or an enforced matrix, theirs is the better fit.
|
|
|
113
126
|
|
|
114
127
|
## 📚 Documentation
|
|
115
128
|
|
|
116
|
-
- [
|
|
117
|
-
- [How-to guides](docs/how-to.md)
|
|
118
|
-
- [Tutorial](docs/tutorial.md) — long-form, on a real public pack
|
|
119
|
-
- [Supply chain](docs/supply-chain.md) — pack pinning, digests, signing, air-gapped installs, SBOM
|
|
120
|
-
- [Architecture](docs/specs/architecture.md) — three repos, three lifecycles
|
|
121
|
-
- [Bootstrap prompt](docs/bootstrap-prompt.md) — the one freeform-AI step
|
|
129
|
+
- [Getting started](docs/getting-started.md) · [Your team's first pull request](docs/first-pr.md) · [Command reference](docs/commands.md)
|
|
130
|
+
- [How-to guides](docs/how-to.md) · [Tutorial](docs/tutorial.md) · [Supply chain](docs/supply-chain.md) · [Architecture](docs/specs/architecture.md)
|
|
122
131
|
- [Case study](docs/case-studies/case-1.md) · [ADRs](docs/specs/adr/README.md) · [Docs site](https://rsaglobaltech.github.io/specgate/) · [Spec coverage report](https://rsaglobaltech.github.io/specgate/report.html)
|
|
123
132
|
|
|
124
133
|
## 🧰 Companion tools
|
|
125
134
|
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
plugins** for teams that do not want Node on the build agent.
|
|
135
|
+
[Language server](packages/lsp-spec-driven) · [VS Code extension](packages/vscode-spec-driven) ·
|
|
136
|
+
[Maven](packages/maven-plugin) and [Gradle](packages/gradle-plugin) plugins for builds
|
|
137
|
+
without Node · Docker image `ghcr.io/rsaglobaltech/specgate`
|
|
130
138
|
|
|
131
139
|
## 🤝 Contributing
|
|
132
140
|
|
package/bin/specgate.ts
CHANGED
|
@@ -175,6 +175,17 @@ function helpProfile(): string {
|
|
|
175
175
|
return "core";
|
|
176
176
|
}
|
|
177
177
|
|
|
178
|
+
function groupUsage(row: any) {
|
|
179
|
+
let out = `\n ${c.bold}specgate ${row.name}${c.reset} <sub-command> [options]\n`;
|
|
180
|
+
out += section("SUB-COMMANDS");
|
|
181
|
+
for (const s of row.subcommands) {
|
|
182
|
+
const summary = (s.help && s.help.summary) || (row.help && row.help.summary) || "";
|
|
183
|
+
out += cmd((s.help && s.help.icon) || "·", `${row.name} ${s.name}`, summary, 20);
|
|
184
|
+
}
|
|
185
|
+
out += `\n ${c.dim}Run ‘specgate ${row.name} <sub-command> --help’ for its own options.${c.reset}\n\n`;
|
|
186
|
+
process.stdout.write(out);
|
|
187
|
+
}
|
|
188
|
+
|
|
178
189
|
function usage(opts?: { all?: boolean }) {
|
|
179
190
|
if (opts && opts.all) return usageFull();
|
|
180
191
|
if (helpProfile() === "full") return usageFull();
|
|
@@ -250,6 +261,22 @@ export class CreateSpecDrivenAppCommand implements ICommand {
|
|
|
250
261
|
process.exit(2);
|
|
251
262
|
}
|
|
252
263
|
|
|
264
|
+
// `ci --help`, `pack`, `harness -h`…: a command that groups sub-commands
|
|
265
|
+
// answered "Unknown ci sub-command: --help" and the global usage, so
|
|
266
|
+
// asking what a group does was an error. The answer is the group's own
|
|
267
|
+
// sub-commands, from the same registry the top-level help reads.
|
|
268
|
+
// A row with its own script (`req`, `mcp`) answers for its sub-commands.
|
|
269
|
+
if (row.subcommands && !row.script && (args[1] === "--help" || args[1] === "-h")) {
|
|
270
|
+
groupUsage(row);
|
|
271
|
+
process.exit(0);
|
|
272
|
+
}
|
|
273
|
+
if (row.subcommands && !row.script && args.length === 1) {
|
|
274
|
+
const expected = row.subcommands.map((s: any) => s.name).join(", ");
|
|
275
|
+
error(`Unknown ${command} sub-command: (none). Expected: ${expected}`);
|
|
276
|
+
groupUsage(row);
|
|
277
|
+
process.exit(2);
|
|
278
|
+
}
|
|
279
|
+
|
|
253
280
|
// Three commands need more than a table row. Each is a genuine parsing
|
|
254
281
|
// decision, not a route, which is why it lives here and not in the registry.
|
|
255
282
|
if (command === "init") return dispatchInit(args.slice(1));
|
|
@@ -361,6 +388,14 @@ function dispatchValidate(validateArgs: string[]): void {
|
|
|
361
388
|
* agent and no gate.
|
|
362
389
|
*/
|
|
363
390
|
function dispatchHarnessPrompt(args: string[]): void {
|
|
391
|
+
if (args.includes("--help") || args.includes("-h")) {
|
|
392
|
+
process.stdout.write(
|
|
393
|
+
"\n specgate harness prompt <REQ-id> [--project-dir <path>]\n\n" +
|
|
394
|
+
" Prints the prompt `harness run` would hand an agent for one requirement,\n" +
|
|
395
|
+
" and runs nothing.\n\n"
|
|
396
|
+
);
|
|
397
|
+
process.exit(0);
|
|
398
|
+
}
|
|
364
399
|
const reqId = args[2];
|
|
365
400
|
if (!reqId || !/^REQ-\d+$/.test(reqId)) {
|
|
366
401
|
error("`harness prompt` expects a REQ-id, e.g. `specgate harness prompt REQ-001`.");
|
package/dist/bin/specgate.js
CHANGED
|
@@ -156,6 +156,16 @@ function helpProfile() {
|
|
|
156
156
|
}
|
|
157
157
|
return "core";
|
|
158
158
|
}
|
|
159
|
+
function groupUsage(row) {
|
|
160
|
+
let out = `\n ${c.bold}specgate ${row.name}${c.reset} <sub-command> [options]\n`;
|
|
161
|
+
out += section("SUB-COMMANDS");
|
|
162
|
+
for (const s of row.subcommands) {
|
|
163
|
+
const summary = (s.help && s.help.summary) || (row.help && row.help.summary) || "";
|
|
164
|
+
out += cmd((s.help && s.help.icon) || "·", `${row.name} ${s.name}`, summary, 20);
|
|
165
|
+
}
|
|
166
|
+
out += `\n ${c.dim}Run ‘specgate ${row.name} <sub-command> --help’ for its own options.${c.reset}\n\n`;
|
|
167
|
+
process.stdout.write(out);
|
|
168
|
+
}
|
|
159
169
|
function usage(opts) {
|
|
160
170
|
if (opts && opts.all)
|
|
161
171
|
return usageFull();
|
|
@@ -219,6 +229,21 @@ class CreateSpecDrivenAppCommand {
|
|
|
219
229
|
usage();
|
|
220
230
|
process.exit(2);
|
|
221
231
|
}
|
|
232
|
+
// `ci --help`, `pack`, `harness -h`…: a command that groups sub-commands
|
|
233
|
+
// answered "Unknown ci sub-command: --help" and the global usage, so
|
|
234
|
+
// asking what a group does was an error. The answer is the group's own
|
|
235
|
+
// sub-commands, from the same registry the top-level help reads.
|
|
236
|
+
// A row with its own script (`req`, `mcp`) answers for its sub-commands.
|
|
237
|
+
if (row.subcommands && !row.script && (args[1] === "--help" || args[1] === "-h")) {
|
|
238
|
+
groupUsage(row);
|
|
239
|
+
process.exit(0);
|
|
240
|
+
}
|
|
241
|
+
if (row.subcommands && !row.script && args.length === 1) {
|
|
242
|
+
const expected = row.subcommands.map((s) => s.name).join(", ");
|
|
243
|
+
error(`Unknown ${command} sub-command: (none). Expected: ${expected}`);
|
|
244
|
+
groupUsage(row);
|
|
245
|
+
process.exit(2);
|
|
246
|
+
}
|
|
222
247
|
// Three commands need more than a table row. Each is a genuine parsing
|
|
223
248
|
// decision, not a route, which is why it lives here and not in the registry.
|
|
224
249
|
if (command === "init")
|
|
@@ -319,6 +344,12 @@ function dispatchValidate(validateArgs) {
|
|
|
319
344
|
* agent and no gate.
|
|
320
345
|
*/
|
|
321
346
|
function dispatchHarnessPrompt(args) {
|
|
347
|
+
if (args.includes("--help") || args.includes("-h")) {
|
|
348
|
+
process.stdout.write("\n specgate harness prompt <REQ-id> [--project-dir <path>]\n\n" +
|
|
349
|
+
" Prints the prompt `harness run` would hand an agent for one requirement,\n" +
|
|
350
|
+
" and runs nothing.\n\n");
|
|
351
|
+
process.exit(0);
|
|
352
|
+
}
|
|
322
353
|
const reqId = args[2];
|
|
323
354
|
if (!reqId || !/^REQ-\d+$/.test(reqId)) {
|
|
324
355
|
error("`harness prompt` expects a REQ-id, e.g. `specgate harness prompt REQ-001`.");
|
package/dist/bin/specgate.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"specgate.js","sourceRoot":"","sources":["../../bin/specgate.ts"],"names":[],"mappings":";;;;;;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K,CAAC,4EAA4E,CAAC,CAAC;QACpF,KAAK,EAAE,CAAC;QACR,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;IACD,MAAM,MAAM,GAAG,aAAa,CAAC,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC,CAAC;IACpD,gBAAgB,CAAC,MAAM,CAAC,CAAC;IACzB,aAAa,CAAC,MAAM,EAAE,CAAC,WAAW,EAAE,OAAO,EAAE,KAAK,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AACzE,CAAC;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,YAAY,GAChB,OAAO,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"}
|
|
@@ -35,6 +35,7 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
36
|
exports.ArchiveChangeUseCase = void 0;
|
|
37
37
|
const path = __importStar(require("node:path"));
|
|
38
|
+
const DeltaFeature_1 = require("../domain/DeltaFeature");
|
|
38
39
|
const ArchivePlan_1 = require("../domain/ArchivePlan");
|
|
39
40
|
const DeltaSpec_1 = require("../domain/DeltaSpec");
|
|
40
41
|
const TraceabilityMatrix_1 = require("../domain/TraceabilityMatrix");
|
|
@@ -145,6 +146,27 @@ class ArchiveChangeUseCase {
|
|
|
145
146
|
kind: "feature",
|
|
146
147
|
});
|
|
147
148
|
}
|
|
149
|
+
// A requirement whose trace names a feature file that neither exists nor
|
|
150
|
+
// came with the change gets one rendered from the delta's own scenarios.
|
|
151
|
+
// An author's `.feature` in the change folder, or a file already in the
|
|
152
|
+
// project, always wins.
|
|
153
|
+
const featureTargets = new Set(plan.writes.filter((w) => w.kind === "feature").map((w) => w.file));
|
|
154
|
+
for (const { req, capability } of applied.upserts) {
|
|
155
|
+
const rel = String((req.trace || {}).feature || "")
|
|
156
|
+
.replace(/`/g, "")
|
|
157
|
+
.trim();
|
|
158
|
+
if (!rel.endsWith(".feature") || !(req.scenarios || []).length)
|
|
159
|
+
continue;
|
|
160
|
+
const target = path.join(p.root, rel);
|
|
161
|
+
if (featureTargets.has(target) || this.repo.readFile(target) !== null)
|
|
162
|
+
continue;
|
|
163
|
+
plan.writes.push({
|
|
164
|
+
file: target,
|
|
165
|
+
contents: (0, DeltaFeature_1.renderDeltaFeature)(req, capability),
|
|
166
|
+
kind: "feature",
|
|
167
|
+
});
|
|
168
|
+
featureTargets.add(target);
|
|
169
|
+
}
|
|
148
170
|
let traceTotals = { added: 0, updated: 0, removed: 0, legacyDropped: 0 };
|
|
149
171
|
if (applied.upserts.length > 0 || applied.removals.length > 0) {
|
|
150
172
|
const existingContent = this.repo.readFile(p.traceability);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ArchiveChangeUseCase.js","sourceRoot":"","sources":["../../../../../packages/core/src/application/ArchiveChangeUseCase.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,gDAAkC;
|
|
1
|
+
{"version":3,"file":"ArchiveChangeUseCase.js","sourceRoot":"","sources":["../../../../../packages/core/src/application/ArchiveChangeUseCase.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,gDAAkC;AAClC,yDAA4D;AAE5D,uDAAoD;AACpD,mDAAgD;AAChD,qEAAkE;AAClE,qDAAkD;AAClD,qDAAsD;AAEtD,MAAa,oBAAoB;IACX;IAApB,YAAoB,I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CAAC;IACjB,CAAC;IAEO,UAAU,CAAC,GAAU;QAC3B,MAAM,CAAC,GAAG,GAAG,YAAY,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,IAAI,EAAE,CAAC;QACjD,MAAM,GAAG,GAAG,CAAC,CAAS,EAAE,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;QACtD,OAAO,GAAG,CAAC,CAAC,WAAW,EAAE,IAAI,GAAG,CAAC,CAAC,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC,EAAE,CAAC;IAC3E,CAAC;CACF;AArND,oDAqNC"}
|
|
@@ -103,11 +103,18 @@ class ValidateProjectUseCase {
|
|
|
103
103
|
}
|
|
104
104
|
if (!strictTdd)
|
|
105
105
|
continue;
|
|
106
|
-
|
|
107
|
-
|
|
106
|
+
// `Deprecated` owes nothing: its files may be gone on purpose, and
|
|
107
|
+
// `req rm` past Draft points at Deprecated — a TDD-1 here made the
|
|
108
|
+
// advice a loop.
|
|
109
|
+
const judged = opts.delivering && requirementId === opts.delivering && status === "Draft"
|
|
110
|
+
? "Implemented"
|
|
111
|
+
: status;
|
|
112
|
+
const owesTdd = judged && TraceabilityFormat_1.POST_DRAFT_STATUS.has(judged) && judged !== "Deprecated";
|
|
113
|
+
if (testArtifact.toUpperCase() === "TBD" && owesTdd) {
|
|
114
|
+
report.addError("strict_tdd_violation", `[TDD-1] Test artifact is TBD but status is '${judged}' (scenario: ${scenarioId || "(no id)"})`, { target: "TDD-1" });
|
|
108
115
|
}
|
|
109
|
-
if (mode === "rich" && !scenarioId &&
|
|
110
|
-
report.addError("strict_tdd_violation", `[TDD-2] Traceability row missing Scenario ID with status '${
|
|
116
|
+
if (mode === "rich" && !scenarioId && owesTdd) {
|
|
117
|
+
report.addError("strict_tdd_violation", `[TDD-2] Traceability row missing Scenario ID with status '${judged}' (requirement: ${requirementId || "(none)"})`, { target: "TDD-2" });
|
|
111
118
|
}
|
|
112
119
|
}
|
|
113
120
|
if (strictTdd && mode === "rich" && typeof opts.specContent === "string") {
|
|
@@ -142,7 +149,7 @@ class ValidateProjectUseCase {
|
|
|
142
149
|
`This becomes an error in 1.0 (ADR-0026).`, {
|
|
143
150
|
target: reqId,
|
|
144
151
|
file: "spec.md",
|
|
145
|
-
fix: `Write its prose — \`specgate
|
|
152
|
+
fix: `Write its prose — \`specgate new\` does it for a new one, and \`## ${reqId} — ` +
|
|
146
153
|
`<title>\` by hand works too. Until then the harness prompt cannot tell an ` +
|
|
147
154
|
`agent what ${reqId} requires.`,
|
|
148
155
|
});
|