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
validateas tools rather than by scraping terminal output. - The open change at session start — a
SessionStarthook tells the session the project is spec-driven, the open change and its next requirement. - The test before the code — a
PreToolUsehook 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 offto turn it off for a project,SPECGATE_GUARD=offfor a session). - The gate as a
Stophook —specgate validate --strictruns 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.