Product
Industries
Roles
Research
Resources

Research · Coding agents

Definition of done for AI coding agents

A definition of done for AI coding agents lists what a reviewer will check, written before the run, with the evidence each item needs. How to write one.

You open the agent's pull request after lunch. Its last message says "Done. All tests pass," and CI is green. The diff tells another story: the export retries forever, logs nothing, and the docs still describe the old behavior. Two of the four things the ticket asked for are missing, and nobody wrote them anywhere the agent could check.

A definition of done for AI coding agents is a short list of checks a reviewer can confirm, approved before the agent starts. Each item names its evidence, so "done" becomes separate claims a person checks one at a time.

#Why an agent's done means it stopped

An agent ends its turn when the work looks finished to it. Anthropic's own guidance for Claude Code says so plainly: "Claude stops when the work looks done. If it has nothing to run that tells it whether the work actually is done, 'looks done' is all it has to go on."1 The same page names "Claude said it was done and it wasn't quite" as one of the usual reasons a session goes wrong, most often because the agent had no way to check its own work.1

Passing tests close only part of that gap. METR reviewed 15 pull requests that an early-2025 agent wrote for real issues in two large open-source repositories. None were mergeable as they stood, including the ones that passed the maintainers' tests. Missing tests, missing docs, and lint failures held them back. METR estimated that the passing ones still needed 26 minutes of fixes on average.2 The companion post on agents that say done while tests fail covers that gap in depth. A list written before the run gives it less room to open.

#What the Scrum definition of done gets right

Teams of people solved a version of this problem long before agents. The Scrum Guide defines the Definition of Done as "a formal description of the state of the Increment when it meets the quality measures required for the product."3 Work that falls short of it cannot be released or even shown at the Sprint Review. It goes back to the backlog. When an organization sets a definition of done, every team treats it as the minimum.3

The Agile Alliance adds two points that matter more for agents than for people.4 First, much of the value lies in the list being "an explicit contract known to all members of the team." Second, a single story may need its own done criteria on top of the ones that apply to all work.

That gives two layers:

  • The team's rules, which hold for every change: tests pass, lint is clean, public behavior is documented, and nothing merges unreviewed.
  • The item's acceptance criteria, which hold for this change only: the export retries after a 429, and it gives up after five tries.

A person on the team carries most of the first layer in their head and asks about the second. An agent does neither. The unwritten habits a team relies on are the subject of another post. For a definition of done, the conclusion is short: anything not written down is not on the agent's list.

#Acceptance criteria for coding agents

In 2006, Dan North wrote down a rule that testers already knew: "A story's behaviour is simply its acceptance criteria: if the system fulfils all the acceptance criteria, it's behaving correctly; if it doesn't, it isn't."5 His template, Given some context, When an event occurs, Then some outcome, was built so the criteria could be automated. A later section of the same article is titled "Acceptance criteria should be executable."5

For an agent, the criteria do not all have to be executable. Each one has to be checkable. Five rules keep a list checkable:

  1. One sentence a reviewer can confirm. "The export handles rate limits" is not checkable. "The export retries after a 429 with the Retry-After delay" is.
  2. Behavior, not implementation. Name what a user or a caller sees. Leave the design to the agent and to review.
  3. Name the evidence. Say what would show the item is met: a test, a CI check, a file the change touches, or a command and its output.
  4. Write down the dull items. Docs, logging, the give-up case, and the error message are easy to skip. METR's reviewers found key docs missing in 89% of the agent pull requests that failed the tests and 75% of those that passed, out of only 15.2
  5. Keep it short. A reviewer reads every item. Oxagen caps a Done Checklist at 40 items.

Here is one work item's list, written that way:

ItemEvidence that meets it
The export retries after a 429 with the Retry-After delay.A test that answers 429 and then 200, and the CI check that runs it
A test covers the retry.The test file the pull request changes
The retry gives up after 5 attempts and logs the request id.A test for the fifth failure, and the log line in the diff
The docs page lists the retry behavior.The docs file the pull request changes

The right column is what turns a checklist into a review aid. Without it, the agent claims an item and you go looking. With it, the agent knows what to point at, and you know what to open.

#Why the list comes before the run

Vague tasks are common, and agents struggle to tell them from clear ones. When OpenAI and the SWE-bench authors screened 1,699 SWE-bench tasks with 93 developers, 38.3% were flagged for underspecified problem statements.6 Ambig-SWE, an ICLR 2026 study, removed details from SWE-bench Verified tasks on purpose. It found that "models struggle to distinguish between well-specified and underspecified instructions." When agents could ask clarifying questions, results improved by up to 74% over runs with no chance to ask.7

Writing the definition of done first moves those questions to the cheapest moment. Before the run, a missing detail costs a sentence. After the run, it costs a review, a returned pull request, and a second run.

Approval matters as much as the text. The agent should work to one exact version of the list, and a reviewer should judge against that same version. If the list changes after approval, the change needs a new approval. Otherwise the agent and the reviewer each hold a different definition of done, and the review turns into an argument about which one counts.

#Evidence for each item

Not all evidence is equal. A claim the agent typed is worth less than a CI result GitHub reports, and both are worth less than a person reading the change. The difference is who stands behind the evidence.

Who stands behind each kind of evidence

  1. The agent's sentenceA claim that the commit meets the item, or a link the agent chose.
  2. A command it ranA test or script run in the checkout, with its exit code and the end of its output.
  3. A file in the pull requestRead from GitHub, so the change is there whatever the agent says.
  4. A CI check on the head commitRun by your CI on the exact commit under review, and read from GitHub.
  5. A person's acceptanceA reviewer read the claims, the diff, and the checks, and accepted that commit.

Farther from the agent's own word

Ordered by how far each rung sits from the agent's own word, with no measurement behind the order.

#The Done Checklist in Oxagen

A work item in Oxagen carries a Done Checklist, and Oxagen follows that list through the run. The Work page shows each item's list beside the item, and the path of one item looks like this:

How one work item moves from its checklist to done

  1. DraftTriage drafts a first version of the checklist.
  2. ApproveA person edits the list and approves one revision.
  3. SendThe send names that revision, and the agent starts with it as its first prompt.
  4. ClaimAfter each push, the agent claims each item, met or unmet, with its evidence.
  5. ReviewThe item shows the pull request, its head commit, and its required checks.
  6. AcceptA person accepts that head commit or returns the work with a reason.
  7. DoneThe pull request is merged and a person accepted its head commit, in either order.
StageWI-12 after the stage
Draftdrafted
Approveapproved
Sendsent
Claimclaimed
Reviewin review
Acceptaccepted
Donedone
The states of one work item in Oxagen, from the Work docs. Oxagen merges nothing.

Each step has a specific mechanism behind it:8

  • Approval fixes a revision. Approving records who approved the list, when, and its hash. A hash is a short code made from the content, and any change to the content gives a different code. Each item keeps its key, such as c3, through every edit.
  • The agent claims against the list. After it pushes, the agent runs oxagen work claim c3 --text "<how it is met>" --run "<command>" for an item it met. For an item it could not meet, it adds --unmet and gives the reason in --text. A claim can point at a command, a CI check, a file the pull request changes, or a link. Oxagen reads the CI result and the changed files from GitHub and marks each one Checked, Waiting, or Failed. The claim itself is still the agent's word.
  • Oxagen sends the agent back to unclaimed items. When the agent tries to end its turn in a run Oxagen sent, Oxagen reads the checklist. While an item has no claim on the latest commit, Oxagen sends the agent back to it, at most three times per commit. This works in Claude Code, Codex, Cursor, and Stella. If Oxagen cannot answer in time, the turn ends as it would have.
  • A person decides. When the run ends, the item shows the pull request, its head commit, and the checks the base branch requires. Accept records the required checks beside the acceptance. A failing check does not block Accept, because your team decides whether to wait for checks. A new commit voids an earlier acceptance.
  • Done means accepted and merged. An item is done once a person accepted its head commit and the pull request merged, in either order.

The work item WI-12, Retry the export when the API answers 429, with illustrative data. Its Done Checklist holds four items and two are done. The Delivery panel shows the agent it went to and pull request acme/platform#612 with its checks passing.

A work item with its approved Done Checklist

The team's rules belong somewhere else. Rules that hold for every change, such as "every bug fix adds a regression test," go in the instructions every agent reads at the start of a session. What an agent should be told before it starts covers that layer. The checks your base branch requires stay in your CI, and Oxagen reads them at review.

The Work page on a phone with illustrative data. Tiles count 38 Done Checklists waiting for approval and 46 results to accept, and work items in the list show how many of their checklist items are done.

Checklists to approve and results to accept on a phone

#Limits of a checklist

A definition of done catches what it names. It does not catch what nobody thought to write, and it does not make a weak test strong. An agent can claim an item it did not meet, and a claim that points at a link is only as good as the link. The pass that sends the agent back gives up after three tries on one commit, and a reviewer still reads the change before accepting it.

The list costs a person's time before the run. Triage writes the first draft, so your job is to correct it and approve it. In exchange, the work item shows each claim and its evidence status beside the item, so a reviewer can start from the items nothing backs up.

To see the list on a work item and the claims beside it, read the Work docs or the page for engineers who review agent work.

#References

  1. Anthropic (2026). Best practices for Claude Code. Claude Code documentation. https://code.claude.com/docs/en/best-practices ↩ ↩2

  2. Rein, D. (2025). Research Update: Algorithmic vs. Holistic Evaluation. METR, 13 August 2025. Claude 3.7 Sonnet on 18 issues from two open-source repositories, with 15 pull requests reviewed by hand. https://metr.org/blog/2025-08-12-research-update-towards-reconciling-slowdown-with-time-horizons/ ↩ ↩2

  3. Schwaber, K., & Sutherland, J. (2020). The Scrum Guide. https://scrumguides.org/scrum-guide.html ↩ ↩2

  4. Agile Alliance. Definition of Done. Agile Glossary. https://www.agilealliance.org/glossary/definition-of-done/ ↩

  5. North, D. (2006). Introducing BDD. dannorth.net, 20 September 2006. https://dannorth.net/blog/introducing-bdd/ ↩ ↩2

  6. Chowdhury, N., Aung, J., Shern, C. J., Jaffe, O., Sherburn, D., Starace, G., et al. (2024). Introducing SWE-bench Verified. OpenAI, 13 August 2024. https://openai.com/index/introducing-swe-bench-verified/ ↩

  7. Vijayvargiya, S., Zhou, X., Yerukola, A., Sap, M., & Neubig, G. (2025). Ambig-SWE: Interactive Agents to Overcome Underspecificity in Software Engineering. ICLR 2026. https://arxiv.org/abs/2502.13069 ↩

  8. Oxagen (2026). Work. Oxagen docs. https://docs.oxagen.sh/docs/work ↩