The agent says the screen is built. Edge cases handled, all tests pass, a tidy summary with headings. I open the app, tap the new button, and nothing happens.

The agent wasn't lying. It had no way to know. Agents made code cheap to produce, but proof did not get any cheaper. So my fix fits in one line: write how you will know the ticket is done before any code exists, and make it a check the agent cannot pass by saying so.

Why "done" drifts

Most people hand an agent a task description. A task description says what to build. It says nothing about when to stop, so the agent stops when the work looks finished.

I can't fix the model. I can fix the ticket. And the ticket is the one place where I get to say, in advance and in writing, what finished means.

Before

A ticket with a task

  • Says what to build
  • The agent decides when it's finished
  • "All tests pass" arrives with nothing behind it
  • You find the gap when you open the app

After

A ticket with a proof

  • Says what to build and how we will know
  • A check that comes back pass or fail decides
  • Evidence arrives with the summary
  • A named human approves before anything merges

The three lines I add to every ticket

I write a short section called how we will know into each ticket, before anyone, human or agent, touches the code. It has three parts, and none of them is optional.

  1. 1A smoke run to executeOne command that comes back pass or fail. In my tickets it's usually a test file, a build's exit code, a linter, or a script that diffs output against a fixture. If the answer can be "mostly", it isn't a check yet.
  2. 2A screen to openThe exact screen, the state to put it in, and what I should see there. On mobile this is where "looks done" usually falls apart. A screenshot next to the mockup turns it into something I compare instead of something I trust.
  3. 3A human who mergesA person's name on the ticket. The agent proposes the change; that person decides it ships. The agent cannot mark its own work as passed.
The section, as it sits in a ticket

Make the agent show its work

A check only helps if I see it run. So every summary comes with evidence: the command the agent ran and its output, or the screenshot. A sentence that says the tests pass is a claim. The output is the proof.

Then I get a second pair of eyes that didn't write the code: a fresh agent session that never saw the conversation, so the reasoning that produced the change can't talk it into agreeing. I tell it to skip style and look for what breaks.

Put the rule where nobody can skip it

A line in a prompt or a CLAUDE.md file is a request. I treat anything that must hold every time as something code enforces, and the merge is the place I enforce it hardest.

On GitHub, branch protection can require approving reviews from people with write access, or from a designated code owner, before a pull request merges into the protected branch. A merge with pending or rejected reviews is blocked, and whoever tries it gets an error. It can also require status checks, and a required status set by any other person or integration does not allow the merge. That's where the smoke run's result gates the merge, next to the human's approval.

From ticket to merge
  1. 1I write how we will know
  2. 2Agent builds
  3. 3Agent runs the check
  4. 4Agent shows the evidence
  5. 5Fresh reviewer reads it
  6. 6A named human approves the merge

What stays mine

I let agents do most of the work. Three things I keep: starting the run, deciding what "done" means this time, and approving the merge at the end.

When I don't know yet what done means, I let the agent interview me and write a spec file, then start a fresh session to build from it. The build starts with the definition of done already on paper.

An agent can write the code. It can't be the one who says it's finished.

The rule behind every ticket I hand over

Free checklistThe Done Gate: 5 proofs before a ticket closesFor mobile teams shipping with AI agents: the five proofs a ticket carries before anyone may call it done, why each one exists, and a template to paste into your pull requests.Get the checklist