Agent-assisted delivery with spec gates
A product team wanted the speed of coding agents without the risk. We made the spec the only way work enters the codebase.
This is an illustrative example of how we work, not a record of a client engagement or its results.
- traced to an acceptance criterion
- Every change
- without passing checks and a senior review
- No merge
React
TypeScript
Next.js
Vitest
Playwright
Jenkins
Context
The team shipped onboarding, account and payment flows, where a wrong state or a stale number costs users money.
Challenge
Agent-written pull requests were large and hard to review. Reviewers could not tell which requirement a change served, so they slowed down or waved it through.
Approach
- Wrote a constitution for the repository: architecture rules, the security baseline, test levels and what agents may and may not touch.
- Turned each feature into a spec with acceptance criteria, then into small tasks an agent can finish in one pull request.
- Wrote a Playwright or Vitest check for every criterion, so CI shows, criterion by criterion, what a change proves.
- Ran agents in a sandbox without production secrets, with a senior engineer as the approver of every merge, reviewing against the task and its criteria instead of reading code cold.
What changed
Pull requests became small and traceable. Reviews are faster because each one answers one question: does this change meet its criteria?