4 min read · For teams moving from vibe-coding to repeatable AI development
mission.md, tech-stack.md, roadmap.md — plus per-feature plan / requirements / validation docs. The spec only works if the agent cannot drift outside it. ThumbGate is the runtime enforcement layer that blocks tool calls that violate the spec, at the PreToolUse hook layer.Spec-driven development replaces conversational LLM iteration with a small set of source-of-truth documents stored in the repo. The agent reads them, the team reads them, and they get updated together.
The why. What this project is, who it serves, what the non-goals are.
Approved technical choices, deployment process, the rails the agent must stay on.
Phases, planned features, current priorities. Updated as work lands.
Each feature gets its own dated directory (2026-05-14-feature-name/) with three files:
The spec only matters if the agent stays inside it. In practice, the agent reads the constitution into context once, then drifts as the conversation grows. Context compaction evicts tech-stack.md before it evicts the last 200 lines of the chat. Long-running sessions touch files the spec never mentioned.
ThumbGate ingests the constitution files and uses them as the policy source for PreToolUse checks:
tech-stack.md says Postgres but the agent runs npm install mongoose, the install is blockedrequirements.md lists src/auth/* as in-scope, writes to src/billing/* require confirmationvalidation.md says "no merge without integration tests passing", merge tool calls are gatedroadmap.md marks a feature as "Phase 3" and you are in Phase 1, related code paths are protectedSpec-driven dev usually starts with CLAUDE.md or .cursorrules referencing the constitution. Those files live inside the agent's context. They compete with the live conversation for attention. When the context window pressures up, prompt rules are the first thing to lose weight.
Pre-action checks live outside the agent. They run in a separate process at the hook boundary. The agent cannot reason its way around a closed file handle.
mission.md, tech-stack.md, roadmap.md. Keep them short.npx thumbgate init — auto-detects the agent and wires the PreToolUse hooks. Point ThumbGate at the constitution path.From there, the agent reads the spec into context every session, and ThumbGate enforces it on every tool call.
Spec-driven development is real only when the spec is enforced. Install ThumbGate and let the gate do the policing.