Start#
Two paths, a few commands each. Pick the one that matches your folder.
You need: Node.js 22 or later, git, and the test runner your project already uses.
An existing project#
A local repository whose code already works.
- Install Specgate in the project:
npm i -D @rsaglobaltech/specgate - Adopt it, touching no code:
npx specgate adopt— it saves the test command it detects, sets your agent when one is installed (asking first; with no terminal — run by an agent or a script — it does not ask and setsclaude --permission-mode acceptEdits), writes the areas it found todocs/specs/adoption.mdinstead of inventing requirements, and ends with a list of what is ready. Prefer an app?npx specgate studioand press Adopt on its start screen. - Set up your agent with one command, its commands and Build's agent:
npx specgate agents init --tool claude - Write down one behaviour you rely on, picked from
docs/specs/adoption.mdwhen adoption wrote one:npx specgate new "<a behaviour you rely on>"— then replace the sentence it wrote inspec.mdand the<placeholders>of its scenario underfeatures/with the real ones - Name the new id (
REQ-002) in a test that proves it — one you already have will do — then deliver it through the gate:npx specgate apply REQ-002 - Before each pull request, run the gate CI runs too:
npx specgate check
A new project#
An empty folder, maybe with a client's brief.
- Create the project, answering a few questions —
npx @rsaglobaltech/specgate@latest init— then, in its folder, set up your agent:npx specgate agents init --tool claude - Save the plan as
docs/brief.mdand turn one module into a draft a person reviews:npx specgate propose --from-brief - Once you have read the draft, approve it yourself, at your terminal — an agent cannot, and
applywaits for it:npx specgate change approve <change-id> - Write a test that names a requirement of the draft — its ids start at
REQ-002;REQ-001is the baselineinitwrote — write the code, and deliver it:npx specgate apply REQ-002 - Once every requirement of the change is applied, merge it into the specification:
npx specgate archive <change-id> - Before each pull request, run the gate CI runs too:
npx specgate check
Next#
- Concepts — the words: change, delta, gate, matrix
- Command reference — every command
- The studio — the same paths in an app
- Specify a system that already runs — requirements drafted from the code itself
- Joining a project — someone else set it up
- Step by step, with recorded output: existing code · a new project