# Definition of done

## What it is

A Definition of Done sets the common quality conditions work must meet before the team regards it
as part of a completed product increment. “It runs on my laptop” identifies one observation. A
Definition of Done gives everyone a way to tell when the same work is integrated, verified at the
appropriate level and ready for another person to use or maintain. Its purpose is to make the
state of the product visible.

The Scrum Guide calls the Definition of Done a formal description of the Increment when it meets
the product's required quality measures. Work that falls short cannot be released or presented as
part of the Increment at the Sprint Review. It returns to the Product Backlog for future
consideration. If the organization sets a standard, Scrum teams follow it as a minimum. Teams
working together on one product use a common Definition of Done. Two development groups can still
use different tools to collect the evidence.

Acceptance criteria name what a particular change must do. A change to an export, for instance,
can require that archived accounts appear only when requested. A Definition of Done can require
that changes with persistent data are integrated, verified on representative existing records and
accompanied by updated operating instructions when those instructions are affected. The export
criteria describe its particular behavior. The completion standard governs the quality of work
across the product. Both claims need evidence when the export changes.

## Why it matters

A shared finish line reduces uncertainty in planning and handover. Suppose a background job has
passed unit tests but no one has run the migration against older records. The author may view the
item as effectively complete, while the operator sees an unresolved release risk. A completion
standard states what needs to happen before another team plans around the change. It also gives
people a straightforward way to say which evidence is missing.

Select conditions based on the failure modes the team repeatedly needs to manage. A library might
require tests of changed public behavior, compatibility evidence for affected versions and a
clear upgrade note for a breaking change. A service that processes personal information may need
a review of how each changed data path handles that information. An interface team might have
shared keyboard requirements and a check of the changed text in its supported editions. The
conditions describe a state that can be inspected. The command, artifact or review that
demonstrates each state can be recorded separately.

The Definition of Done also makes comparisons meaningful. If one team calls an item complete at
code review and another waits until validation on representative data, counting both items under
the same status obscures the amount of work left. A common standard does not make two features
equally hard. It lets the people using the status understand what still needs to happen before
relying on the result.

## What it looks like in practice

Consider a fictional reporting product. It loads a supplier's file overnight and keeps the
previously verified report available when an import fails. The next change accepts a new optional
field. Its acceptance criteria cover the new field and what readers see when the field is
missing. The shared Definition of Done for import changes might include the following conditions.

- The change is integrated into the product version that will be evaluated as a whole. The
  acceptance examples and affected existing behavior are verified with representative input.
- A retry and a partially completed import are exercised in a safe test environment. The previous
  verified report stays available when the new import cannot finish, and a retry does not
  duplicate data.
- Any changed operator procedure is updated where the operator will look for it. The release
  record identifies the test inputs, outcomes and any limitations that matter to the team.

Use a real candidate build in this example, not a sequence of screenshots of unconnected parts.
Run the job once with an existing file, once with the new field and once with a controlled
failure. Record the report identifier before and after the failure. Run the retry and compare
totals and row identities. Ask another operator to find the revised instructions and identify the
available report. That quick check can catch a useful procedure placed where no one will find it.
If a test cannot observe the affected state, mark the evidence incomplete and fix the
verification.

Our [service levels page](/service-levels/) describes documentation and a handover covering code,
access, credentials and current status. These are examples of results someone can inspect. A team
could explicitly require a handover note that another maintainer can use, then ask that person to
show where they would find a relevant procedure or open issue. This illustrates one possible
completion condition. The page describes our published commitments, independent of any team's
choice of process.

## Where it goes wrong

Problems start when the wording cannot settle a decision. “Test thoroughly” offers little help in
discussing the stalled import. “Verify recovery once” leaves room to stop before the first report
becomes readable again. State which relevant behavior has to be observed and what would show that
it still works. For work to which a check genuinely does not apply, call out the reason and
preserve the checks that do apply. Changing the completion status should not require inventing an
exception from scratch.

Another trap is turning the Definition of Done into a long task inventory. A shared condition
states what must be true. The route to that state depends on the change. One team checks
recoverability with a fixture containing valid old reports, while another must rehearse a restore
from an actual backup. The evidence differs. The condition about recoverability remains
understandable to both groups. Keep instructions near the tools, and update the common conditions
when experience shows that an important state is still unclear.

Finally, a successful test suite can establish only its assertions. A test might verify that a
report exists and still fail to notice that the report is yesterday's. Ask what each signal
proves and whether the evidence came from the same candidate that would advance. If an item
cannot meet the standard this time, record the missing evidence and the next required work.
People can then distinguish useful progress from an increment ready to rely on.

## Further reading

- [Scrum Guide on the Definition of
  Done](https://scrumguides.org/scrum-guide.html#commitment-definition-of-done)
- [Scrum.org's guidance on the Definition of
  Done](https://www.scrum.org/resources/what-definition-done)
- [UK Government Service Manual on user stories and acceptance
  criteria](https://www.gov.uk/service-manual/agile-delivery/writing-user-stories)

<https://engineer.company/glossary/definition-of-done/>
