When a customer asks for a CSV export of their invoices, “add CSV export” seems like enough to give a coding agent. By the afternoon the button works, the file opens and the pull request looks ready. Then someone in finance tries the export with a date filter applied and gets a year's worth of invoices. The agent and the reviewer both understood what an export was. They had different ideas about which rows belonged in it.
Acceptance criteria are the conditions a specific piece of work must satisfy before a reviewer can accept it. To write them, describe what someone should be able to observe, give examples where the outcome depends on the starting conditions, and say what evidence the reviewer should see. When an agent does the work, put those details where its reviewer and whoever picks up the next session can find the same version.
Write down the behavior a customer can see
For the invoice export, the most useful conversation starts with two people looking at the same small set of invoices. A product manager opens the invoice list, filters it to October, and points to the three rows she expects to download. The engineer notices that the table only displays two of them on the current page. They agree that the export should contain all three matching invoices. A request to “export what's on the screen” would have left that choice open.
The team then makes a test account with three October invoices, one September invoice and an October invoice belonging to a different account. With a page size of two, this tiny fixture exposes three independent errors: exporting only the current page, ignoring the filter, and including a row from the wrong account. The team can reuse it as an example in the brief and as data for a test.
One way to write the criteria is:
With the October filter applied, the export contains all three matching invoices for the signed in account, including the one on the next page. It excludes the September invoice and the other account's invoice.
The first row contains the agreed column names. Invoice dates use the same calendar dates the customer sees in the list.
When no invoices match the filter, the export returns the header row with no data rows.
A person without invoice export permission cannot download data, including by requesting the download directly.
The last criterion describes the behavior of the application. It doesn't give the coding agent permission to look at customer invoices. Use synthetic records for the test, and keep any real data access under the agent's assigned permissions.
Pick a format people will read
An acceptance criterion can be a plain sentence. Where the starting state changes the outcome, the Given, When, Then form can make a useful example. The Cucumber Gherkin reference calls these the initial context, event and expected result. A team can write the scenario in ordinary language first and later connect it to automated checks.
Given an authorized user has three October invoices across two pages, when they export with the October filter applied, then the CSV contains those three invoices and no other data rows.
A separate scenario can cover the empty result. Keeping those cases apart helps a reader see which one failed. For work that calls for judgment, use a few requirements a knowledgeable reviewer can assess. A renewal brief, for example, may be acceptable if it identifies the current contract, attributes each open issue to a dated source and leaves any recommendation that depends on an unconfirmed date visibly unresolved. It can satisfy all three without following a particular outline.
A product requirements document can give an agent the wider release goal and explain why the invoice feature matters. The criteria in its Task tell the reviewer what this particular change must do. The team's definition of done can still require a review or passing CI across all changes. The GAO agile assessment guide discusses acceptance criteria and a definition of done as separate responsibilities; both are useful when the same team ships many kinds of work.
Give the reviewer something to check
Add a short evidence request to the brief. For the export, ask for the test case names and outcomes, a sample CSV from the fixture, and a link to the change under review. Specify the version tested when it matters. A passing test from the previous commit tells the reviewer little about a later change to the query.
This is also a good place to say how to report a gap. If the agent can exercise the export in a local test but cannot check the staging permission configuration, record the permission check as unverified in staging. The reviewer may pick it up herself or assign a separate test. The software test plan template is useful when that work crosses several environments or needs a wider set of cases.
Keep the criteria with the work in Swarm
In a Swarm Space, save the brief as a Task with the criteria, the fixture and any decision that settled an ambiguity. Use the same brief with your connected coding tool. Ask the agent to report what it verified, point to the supporting result, and surface any condition it could not check. The Task and its linked Runs let someone return to the assignment and see what happened on a particular attempt.
This matters when the brief changes midstream. Suppose finance decides refunds should appear as separate rows after seeing the first CSV. Update the Task before requesting the next attempt, and leave a short note about what changed. The first result is still evidence of the earlier behavior. The next reviewer needs the revised rule and a fixture that includes a refund. Where a decision needs formal review, the approval workflow guide explains how to make the review explicit.
Try this on an assignment your team already plans to delegate. Spend a few minutes on the example most likely to make two reviewers disagree, and add it to the Task with the evidence you expect back. You may discover a product decision worth making before anyone starts.