Skip to content

rsaglobaltech/specgate

v1.2.0MIT

Specs as executable contracts: the daily loop as commands, the spec tree over MCP, the test before the code, and the gate as a hook that runs before the session can end.

specgate — Claude Code plugin

Generated by specgate agents init --tool claude-plugin. Do not edit by hand: the commands come from the same definition every other agent tool is wired from, so editing here makes them drift.

What it adds

  • 9 slash commands — /specgate:explore, /specgate:draft, /specgate:propose, /specgate:new, /specgate:apply, /specgate:check, /specgate:archive, /specgate:done, /specgate:onboard.
  • The spec tree over MCP — read specs, list requirements and run validate as tools rather than by scraping terminal output.
  • The open change at session start — a SessionStart hook tells the session the project is spec-driven, the open change and its next requirement.
  • The test before the code — a PreToolUse hook refuses a write to a source file until a test new or changed in the working tree names a requirement of an open change (specgate config set agent_guard off to turn it off for a project, SPECGATE_GUARD=off for a session).
  • The gate as a Stop hook — specgate validate --strict runs when the session is about to end, and refuses the stop while it is red.

Install it once for every project: specgate agents install --global prints the two /plugin commands.

The hook, and why it does not trap you

It blocks once per prompt. The second time the same prompt reaches the hook it reports the findings and lets the session end: by then the agent has been told, and a human needs to see the answer more than the loop needs another turn. A project with no spec.md, or a machine with no specgate on PATH, is left alone entirely.