Baseframe Labs

How to check an AI coding agent's work before you merge

Updated · Baseframe Labs

Agree the scope and the required checks before the agent edits anything. Watch the session for edits outside that scope, run the tests and linters your project already has, and treat a skipped check as unfinished, not passed. Then approve or reject from the recorded evidence instead of re-reading the whole diff.

Why "done" is not proof

A coding agent can report a task as done when the tests never ran, when its edits drifted into files nobody asked it to touch, or when verification stopped halfway. The diff looks finished, so the reviewer ends up re-reading it line by line to find out what actually happened.

The fix is to make the agent's work checkable. Write down what it may change and what proof it owes before it starts, then compare the result against that record. Each step below works with Codex, Claude Code, Cursor and other agents, and every tool named here runs on your machine.

1. Agree the scope before the first edit

Name the goal, the files in scope and the checks that must pass. ProjScan writes this down as a Proof Contract: projscan prove --intent "..." records the files the agent may touch and the proof it owes.

If the agent works in a loop, AgentLoopKit holds the same contract for the whole loop. Run npx agentloopkit init in the repo, and after each iteration it decides whether to continue, ask you, stop or mark the task ready.

2. Give the agent the context it needs

Many bad edits start with a file the agent never read. Before the edit, ProjScan lists the files to read for the feature being changed and ranks the risks nearby. An agent can call the same checks through ProjScan's MCP server, so it reads the evidence itself.

3. Watch for drift while it works

projscan guard --contract .projscan/proof-contract.json --watch flags an edit the moment it leaves the approved boundary. Add --fail-on-drift to make CI fail on it.

AgentFlight shows the session's state as it changes: readiness, changed files, proof gaps and scope drift. agentflight guard --once exits non-zero until the work is ready, so a loop or CI job can wait on it.

4. Run the checks you already have, and read them honestly

A list of green checkmarks can hide the check that was skipped. VerisKit runs the TypeScript, Vitest, Jest, node:test, ESLint and Biome checks your project already has and returns one verdict: verified, failed or partial.

Partial means nothing failed but something was skipped or unknown, and VerisKit never counts it as verified. Run npx veriskit init once, then veris verify. An agent can ask for the same verdict through veriskit-mcp.

5. Decide from the evidence

projscan review-gate reads the contract and the recorded proof and returns one decision: ready, needs-proof, drifted or blocked. agentflight finish writes a Review Passport in JSON and Markdown that lists what changed, what was verified and what still needs a look.

The reviewer starts from that record. If the decision is ready and the passport shows no gaps, the review is a confirmation. If not, it says where to look first.

Questions and answers

How can I tell whether an AI agent's tests actually ran?
Run the checks yourself through a tool that reads real exit codes. VerisKit reports a skipped or unknown check as partial instead of passed, and AgentFlight marks interrupted verification as incomplete.
Do these tools send my code to a server?
No. ProjScan, AgentLoopKit, AgentFlight and VerisKit run on your machine. None of them uploads source code or needs an account.
Do I need all four tools?
No. Each works on its own. Start with VerisKit for an honest test verdict, or ProjScan for scope and review decisions, and add the others when you need them.
Does this work with Claude Code and Codex?
Yes. All four work with Codex, Claude Code and Cursor, and the MCP servers let an agent call the checks directly.

Tools in this guide