Definition of Done as a Quality Gate, Not Bureaucracy
The automatable core of a Definition of Done belongs in a green gate of lint, build and test. Business acceptance and other judgments remain shared quality work.
$ make verify
lint ✓ 0 warnings
build ✓
test ✗ 2 failing, coverage 61 % (threshold 80 %)
Definition of Done: rot
This red is not up for negotiation. Nobody can tick it off, nobody has to interpret it in the review, and everyone on the team reproduces it in seconds on their own machine. The printed twelve-point list next to the board can’t do that. If it says “all tests green” and someone puts a check mark next to it, that doesn’t mean the tests are green – only that someone believes or claims it.
Everything else hinges on this difference. Whatever in a Definition of Done can be expressed as a command belongs in a gate that blocks the merge as long as it is red. Whatever needs human judgment stays honestly named as such, small and visible – and isn’t treated as if it were code.
At first, this sounds like a purely technical shift. In fact, it reaches all the way to the business result: shorter cycles, less friction in the team, higher and above all more reliable quality. If you tie quality to an automated gate, you no longer argue in the review about whether something is done. The pipeline says so.
Why the ritual fails#
The classic Definition of Done as a checklist has a structural problem: it checks at the latest possible moment and with the least reliable checking instrument we have – a tired human at the end of the sprint. If one item says “all tests green”, ticking it off doesn’t mean the tests are green. It means that someone believes they are, or at least claims so.
This is exactly where the ticket battle begins. Because the checklist isn’t binding, the dispute moves into the social realm. Is this “done” or “done done”? Does the refactoring count, too? Has the product owner already accepted it? Each of these questions costs time, creates friction and – worst of all – conveys a certainty that doesn’t exist. A ticked item feels like a guarantee but is only a declaration of intent.
Martin Fowler described the technical counter-design long before. Self-testing code and Continuous Integration form a foundation in which every commit triggers an automatic build and test run. A red build is a stop – “stop the line”. That isn’t a suggestion you can discuss. It is a state. That is exactly the property I want for the Definition of Done: it should be a state, not a consensus.
The Definition of Done as the commit stage#
The decisive conceptual step came for me through the deployment pipeline of Jez Humble and David Farley. Their model turns quality into an automated run. The first stage, the commit stage, compiles the code, runs unit tests and runs linters and static analysis. Only when this stage is green do later stages start at all. Everything else is blocked.
If I take that seriously, a Definition of Done can be mapped almost one to one onto this commit stage. What was on the checklist becomes steps in the pipeline:
commit_stage:
fail_fast: true # any red step blocks the merge
steps:
- name: compile
- name: lint # static analysis, style rules
- name: unit_test
- name: coverage_check # fail below an agreed threshold
- name: contract_test # verify integration boundaries
gate:
rule: merge_blocked_unless(commit_stage == "green")
The interesting thing about this representation is what it enforces. An item that I can’t express as a step doesn’t belong in the automated part of the Definition of Done. I can execute “code compiles”. I can execute “no lint errors”. I can execute “coverage above threshold”. I can’t execute “the code is elegant” – that is a human judgment and stays in the review, where it belongs.
This sharp separation is the real gain. The Definition of Done splits into two cleanly separated parts: a hard, executable gate and a small, honestly named remainder of human checks. No more mixing, no more false precision.
One command, locally and in CI#
For the gate to hold up in everyday work, it needs a property that is often overlooked: developers must be able to run it locally exactly as CI does. If the pipeline checks different things than what I can run before pushing, I lose the fast feedback loop and only get red builds after the push. That is friction, and it is avoidable.
That’s why I bundle the executable core of the Definition of Done in exactly one target. The name is secondary; the idea is what counts:
# One command is the executable Definition of Done.
# Developers run it before push; CI runs the exact same target.
verify: lint build test
@echo "Definition of Done: green"
lint:
eslint . --max-warnings 0
build:
npm run build
test:
npm test -- --coverage
The merge gate in CI doesn’t call a script of its own. It calls the same verify. So: what is green locally is also green in CI, and vice versa. In one sentence: the automatable part of the Definition of Done is a command; the complete agreement remains more than this command.
As a Git hook, this becomes a light safety net that makes the slow detour through CI unnecessary in the first place:
#!/usr/bin/env sh
# .git/hooks/pre-push
# Run the executable DoD before anything leaves the machine.
if ! make verify; then
echo "Push blocked: Definition of Done is red."
exit 1
fi
You can immediately see why this shortens the cycles. The developer gets the red in seconds on their own machine, not minutes later from the pipeline, and certainly not days later in the sprint review. Errors are caught where they are cheapest to fix: right after they come into being.
The path through the gate#
Side by side, the difference jumps out. On one side the ritual, on the other the gate:
flowchart TD
A[Commit] --> B{Ritual or gate?}
B -->|Ritual| C[12-point checklist]
C --> D[manual ticking off]
D --> E[Review meeting]
E --> F[Merge<br/>hope, no proof]
B -->|Gate| G[Commit stage:<br/>lint, build, test, contract]
G --> H{all green?}
H -->|yes| I[Merge]
H -->|no| J[blocked<br/>back to the developer]The left path ends in hope. The right one ends in proof or in a clear block. And the block isn’t an accusation against a person but factual feedback from the system. That also takes enormous pressure off the team dynamics – it isn’t a colleague saying “this isn’t done”, it’s the gate, reproducibly and the same for everyone.
Empirically, this stance is backed by the State of DevOps Reports from 2014 and 2015, on which Nicole Forsgren, Gene Kim and Jez Humble, among others, worked. Their findings refute the widespread reflex that speed comes at the expense of quality. High performers combine high deploy frequency with a low change fail rate. Speed and quality aren’t a trade-off – provided the checks run automatically instead of manually. That is exactly the business case for the executable gate: it makes fast and safe possible at the same time.
Boundaries can be checked as a gate, too#
A common objection: unit tests only check your own unit, but the really expensive bugs arise at the integration boundaries between services. True. And there is an executable way for that, too, instead of an acceptance meeting. Consumer-driven contracts, as Fowler and Ian Robinson described them and as Pact makes them manageable, turn the question “do our interfaces fit together?” into a signal that is green or red.
// A consumer-driven contract turns an integration
// boundary into an executable check.
provider
.given("an order with id 42 exists")
.uponReceiving("a request for order 42")
.withRequest({ method: "GET", path: "/orders/42" })
.willRespondWith({
status: 200,
body: { id: 42, status: "shipped" }
});
The contract test becomes part of the same commit stage. That moves another check that used to happen in meetings and coordination chains into the pipeline. Fewer appointments, more proof. The lever lies wherever coordination is only necessary because nobody can execute the agreement – such coordination can be replaced by executable agreements.
Staying honest: what the gate can’t do#
At this point, I have to argue against my own argument, otherwise it becomes dishonest. A green gate isn’t the same as quality. It is evidence that the agreed checks were executed and passed – not evidence that these checks are meaningful. High coverage with weak assertions is green and still worthless. Tests that don’t really assert anything give a false sense of security that is more dangerous than openly admitted uncertainty.
So the gate measures the execution of checks, not their quality. The quality of the checks themselves remains a human, domain responsibility. If you confuse the two, you only replace the old checklist ritual with a coverage ritual.
Just as honestly: not every item of a Definition of Done can be automated. “Documentation updated”, “accepted by the product owner”, “accessibility checked manually” – that stays human. The mistake would be to pretend that everything turns into code. The right way to handle it is separation: make the automatable core gate hard and blocking, and leave the manual remainder small, visible and consciously standing as a human decision.
And one more distinction that saves a lot of friction in practice: the Definition of Done isn’t the same as acceptance criteria. The Definition of Done is project-wide and stable, a quality standard that applies to every story. Acceptance criteria are per story; they describe what the business wants from this one requirement. If you mix the two, you get back exactly the bloated, constantly renegotiated lists this article is written against.
Conclusion#
The Definition of Done is a good idea that fails in many teams because of its form. Ticked off purely mechanically as a checklist at the latest point, it creates friction and a false sense of security instead of quality. Its automatable core therefore belongs in a gate that checks the same thing locally and in CI. Shared quality criteria and business acceptance don’t disappear as a result; they just aren’t passed off as automatic proof.
The way there is conceptually simple, and that is exactly why it is elegant. Map the automatable core of the Definition of Done onto the commit stage of a pipeline. Bundle it in one verify command. Block the merge as long as it is red. Separate this hard core cleanly from the small manual remainder, and don’t pretend everything is code. And stay honest about the fact that green means “checked”, not “good”.
The business result of this shift is real and measurable. Shorter feedback cycles, fewer meetings about the state of the code, less social friction in the team and a quality that doesn’t rest on hope but on a reproducible state. The Definition of Done turns from a bureaucratic ritual into a quiet, reliable bouncer. And the best bouncer is the one nobody has to talk about anymore.
Further reading#
- Martin Fowler: Continuous Integration and SelfTestingCode, martinfowler.com
- Jez Humble, David Farley: Continuous Delivery, 2010 – deployment pipeline and commit stage
- Puppet Labs: State of DevOps Report 2014 and 2015 (Forsgren, Kim, Humble)
- Ken Schwaber, Jeff Sutherland: The Scrum Guide – Definition of Done
- Martin Fowler, Ian Robinson: Consumer-Driven Contracts, martinfowler.com; tool: Pact
- Michael Nygard: Release It!, 2007 – stability patterns as non-functional check targets
Revised and translated from German with the help of AI.