A layer-2 harness for coding agents
The quality gate for AI coding agents
AI agents will tell you they’re done. Chalk makes them prove it.
Ship agent-written code through gates, not vibes — a locked spec decides success, not the model.
npm install -g chalk-protocol - Claude Code
- Cursor
- opencode
- aider
Bring your own executor. Chalk is the referee — and it drives itself: this site ships through the same four gates.
The four levers
One rule: the agent never certifies itself
Each lever closes a way an agent can fake “done.” Together they make success an external fact.
-
Locked test
A real test, locked read-only. The agent can’t weaken the spec to pass.
Read more -
Verify
The real toolchain decides GREEN — never the agent’s self-report.
Read more -
Adversarial review
A second agent tries to refute the change before it can land.
Read more -
Merge gate
Nothing merges until verify is green, locks intact, review passed.
Read more
Without / with Chalk
The difference a gate makes
The same agent, the same task — one path ships a bug, the other can’t.
Agent without Chalk
- Agent marks the task done
- The failing test was quietly deleted
- Review never happened
- The bug ships
Agent with Chalk
chalk done refuses — verify is REDLocked tests can’t be touchedAn adversary must sign off firstThe gate closes only on real green
The loop
The loop — four gates every change must clear
A specced task enters the loop; nothing merges until all four gates say so.
- Locked test A real test is authored for the acceptance criteria, then locked read-only. The agent cannot weaken or delete it to pass.
- Verify The real toolchain plus a test-integrity check must print GREEN. The gate decides success — never the agent.
- Adversarial review A second agent tries to refute the change. Every blocking finding must be fixed before it passes.
- Merge gate `chalk done` only succeeds when verify is green, locked tests are untouched, and review passed.
Quickstart
The per-task loop, start to merge
- 01
chalk nextfind the one task to work on - 02
chalk context <id>read the acceptance criteria and at-risk tests before coding - 03
chalk start <id>begin — it refuses tasks with no acceptance criteria - 04
write codesatisfy the criteria, keep the diff small - 05
chalk verifyloop until the gate prints GREEN - 06
chalk review <id>survive the adversarial reviewer - 07
chalk done <id>the merge gate closes the task
Docs
Rendered from the source of truth
Rendered here at build time from the parent repo — the source of truth this site cannot drift from.
- What Chalk Protocol is and why it exists.
- The full contract — every gate, spelled out.
- From zero to a gated loop in minutes.
- The evidence behind the design.