Make Coding Agents Prove They Are Done
A coding agent can change the right files and still leave a task unfinished. Turn “done” into a small acceptance contract with observable checks, evidence, and an independent verifier.
A coding agent can edit the right-looking files, write a confident summary, and still leave the task unfinished. A test may not have run, a migration may work only on an empty database, or a UI bug may sit outside the agent's viewport.
Jack M's guide to an executable definition of done makes the useful distinction: the agent can propose that implementation is complete, but acceptance needs separate evidence.
Start with an acceptance contract
Before the agent gets write access, describe four things:
- the outcome a user or system should observe;
- the paths, resources, and operations inside the task's scope;
- the checks that can verify the outcome;
- the evidence a reviewer should receive.
“Handle tax correctly” is hard to verify. “The order total shows a tax row for the California fixture, the tax test exits 0, and no files outside apps/checkout/** changed” is a contract. It names an observable result, a command, and a boundary.
Keep the contract small. Three to five criteria are often enough when they cover the outcome and the risky edges. A long checklist that does not change the decision is ceremony, not proof.
Treat the final message as a proposal
An agent's summary is useful context, but it is not acceptance evidence. The agent may have misunderstood the requirement, stopped after a partial fix, or run a passing command that says nothing about the user-visible result.
Separate two decisions:
- Did the agent make the proposed change?
- Does independent evidence show that the requested outcome is true and the change stayed within its boundary?
The second question should be answered by a CI job, a read-and-test-only verifier, or a human with the right checks. Do not let the implementer widen the contract, rewrite a failing test, or silently skip a criterion.
Keep an evidence receipt
For every criterion, record enough for someone else to replay the check:
{
"criterion": "tax-test",
"status": "passed",
"command": "pnpm test --filter tax -- --runInBand",
"exit_code": 0,
"commit": "9ac63c1",
"artifact": "artifacts/tax-test.log",
"checked_at": "2026-11-11T10:20:00Z"
}For a browser check, record the route, viewport, screenshot, and time. For an API check, record a redacted request shape and the assertion. Keep secrets and raw personal data out of the receipt. A green command without its output, environment, or commit is a clue, not a durable proof.
The commit or checkout matters. A receipt from one revision must not be used to accept another. If the contract changes, treat it as a new review event.
Use the right evidence for the risk
Tests do not cover every failure mode.
- For UI work, check the relevant viewport and keyboard path, not only a unit test.
- For data changes, verify constraints, row counts, idempotency, and a rollback or disposable dataset.
- For integrations, check the intended side effect and that a retry does not create a duplicate.
- For security-sensitive changes, inspect dependencies, secrets, permissions, and egress before functional tests.
Run the verifier from a clean checkout or isolated worktree when possible. Protect the acceptance contract and test files from the implementer's normal write scope.
Where 2build fits
2build's published product facts describe a workflow that takes a feature or bug through plan, implementation, review, tests, and QA. It leaves the change uncommitted for the user to review and save, together with verification evidence. Its documented DONE state requires the checks and gates to pass; it does not push, open a pull request, or deploy.
That boundary is useful for a small team: the coding agent can do the work and prepare evidence, while the person still decides whether the change is ready to save or release. If a required check or browser/runtime is missing, the documented outcome is a blocker, not verified work. See the 2build product facts and the 2build documentation for the current workflow and prerequisites.
A practical starting point
Pick one workflow that already creates review churn. Before the next run:
- Write three acceptance criteria with commands or visible assertions.
- Add one boundary, such as an allowed-path list or a maximum file count.
- Decide who or what can accept the evidence independently.
- Store the receipt with the revision, artifacts, and timestamp.
- Track why criteria are rejected or reopened.
The goal is not more paperwork. It is a finish line that another process can inspect without trusting the agent's last paragraph.
