What 1.0 promises#
From 1.0 on, Specgate follows semantic versioning, and the build enforces it: a change that would break a project, a script or a tool built on the CLI waits for the next major version, and is announced before it goes.
What is promised#
Within a major version (1.x), none of these disappears or changes meaning:
| Surface | Examples |
|---|---|
| Commands and sub-commands | specgate apply, specgate change show |
| Their flags | apply --test-cmd, status --json |
| Diagnostic codes | apply_no_test, harness_config_invalid |
| The keys of the JSON answers a tool reads, and their types | status --json's requirements[].id, next.argv |
| MCP tools | specgate_status |
| The library API | @rsaglobaltech/specgate/api: status(), API_VERSION |
| Configuration keys | harness.config.yaml's lanes:, config set keys |
| Exit codes | 0 done, 1 failed, 2 usage error, 3 missing prerequisite, 130 cancelled |
A minor version (1.1, 1.2…) may add to all of these: a new command, a new flag, a new key in an answer. A tool reading the JSON should ignore keys it does not know. A patch version (1.0.1) fixes behaviour and adds nothing.
What is not promised: the wording of messages and of --help (read code, not
message), the human output's layout, and anything under docs/ that is not a
format Specgate reads.
How it is kept#
contract/surface.json lists the public surface as the last release left it —
every command, flag, code, MCP tool, API export, configuration key and JSON key
with its type, read from the CLI and the code, not written by hand. Every pull
request runs npm run contract:check, which builds the same list from the code
being merged and compares the two (REQ-568):
- an item that disappears, or a JSON key whose type changes, fails the build;
- an item that appears is listed, and the release that ships it is at least a
minor (
contract:check --release <version>).
Projects of every release#
A project as each release wrote it — 0.35.0 and 1.0.0 today, then each release
after — is kept under tests/compat/<version>/. Every build reads each one:
validate, status, config list, change validate, and, for a project from
before 1.0, migrate 1.0 and validate --strict after it (REQ-570).
When a version is published#
Before the tag publishes anything, contract:check --release <version> checks
the version against the surface: a patch that adds to it, or a removal outside
a major, stops the release (REQ-571). After it, the published package is
installed from npm under its dist-tag and used — --version, init,
status (REQ-572).
Behaviour that changes in 1.6#
No command, flag, code or key goes away in 1.6, but two commands now refuse what they used to do. A script or an agent that relied on either breaks:
| Command | Until 1.5 | From 1.6 | What to do |
|---|---|---|---|
specgate change approve <id> | Approved the change from anywhere | Without a terminal — an agent's tool, a CI step, a script — it fails with approve_needs_person and records nothing (REQ-748) | A person runs it in a terminal, or approves in the studio's Review |
specgate apply <REQ> | Delivered a requirement whatever its change's approval | Refuses a requirement whose open change nobody approved, with change_not_approved (REQ-745) | Approve the change first: specgate change approve <id>. A project that never wants approvals sets approvals: { required: never } in harness.config.yaml |
Every code, with its fix: Read a gate failure.
Deprecation, then removal#
Something is removed in two steps, never one (REQ-569):
- A minor release lists it in
contract/deprecations.json— the item, the version that deprecated it, and what to use instead — and the CHANGELOG says so. It keeps working. - The next major release removes it. Removing an item that was never deprecated fails the build, major or not.
Upgrading across a major#
specgate migrate <version> does what can be done for you and lists what
cannot, file by file. → Migrating to 1.0
Next#
- Migrating to 1.0 — from 0.35 or older
- The agent contract — the JSON rules and codes in full