TL;DR
The Definition of Done (DoD) is a living document that supports collaboration. As such, it’s primarily a communications tool that provides process transparency.
A good Definition of Done defines a minimum baseline for quality. It doesn’t define a maximum for quality or create an immutable rule set. Teams can and do adjust the DoD for specific work items; they just need to ensure that they communicate variations or deviations from the standard effectively within the team and to their stakeholders.
It’s up to the team and the stakeholders whether the Definition of Done should be a fine-grained procedure document, or if a broader policy document makes more sense. In short, it’s a negotiable agreement, and should be treated as such.
Because it’s a living document, an agile team should inspect-and-adapt the Definition of Done periodically. The document should be updated whenever working agreements or the “rules of engagement” change. This shouldn’t be a frequent occurrence, but can be done as often as necessary.
More Ways to Think of the Definition of Done
Some useful and pragmatic ways to think of the Definition of Done are:
As the agreement the Scrum Team has made internally regarding what constitutes a complete increment of work.
This will generally include basic elements of TDD, BDD, linting, style-checking, documentation, and so forth. It only needs to be as detailed as “done” really is.
As the contract between the Scrum Team and the organization regarding the minimum guarantees for each increment of work.
For example, if your Definition of Done includes successful acceptance testing, then a story or task doesn’t have to be written for acceptance testing because the DoD is an explicit checklist that is implicitly part of every Product Backlog Item delivered. If a user story is delivered, stakeholders can feel confident that they story has met the Definition of Done.
As a quality baseline that can be added to, amended, or modified as needed.
A documentation story wouldn’t necessarily require unit tests or have to meet test-coverage targets. A database story probably wouldn’t require linting. A well-written DoD covers the general use cases that define “done” to a specific level of quality. You don’t have to apply rules that don’t make sense for that story, nor are you precluded from adding to the DoD for a specific work item.
Additionally, if you treat the DoD as a baseline, then you will have cases where there needs to be additional criteria for “done.” You might have a story to embiggen a widget where the story won’t be considered as done until the widget soaks in the anti-ensmallening bath for an hour. That is part of the Definition of Done for that story, but is probably too specific for the baseline DoD.
These facets of the Definition of Done are not orthogonal. You can combine them, as well as other interpretations, in any number of ways. The trick is to ensure the Definition of Done is sufficiently complete to describe “done” without being overly prescriptive. As always, the devil is in the details.
Specificity vs. Generalization
The Definition of Done should be general enough to set expectations of quality and doneness for the majority of Product Backlog Items. There will be exceptions, and it is not intended to be a straitjacket. However, there are some practical guidelines.
If the team is frequently eliding elements of the Definition of Done, it’s probably too specific, too granular, or poorly written.
If the team is frequently adding criteria for doneness to individual stories, the Definition of Done probably needs to be written more broadly, or to capture the essence of increment quality in a less granular way.
In the same way that finding the optimal granularity of user stories is an art form, so is finding the right level of detail for the Definition of Done. The DoD should provide confidence in the quality of deliverables, but it should never take on a life of its own. The goal is to reliably deliver working product increments, not to check off boxes on a list.
When the Definition of Done stops being a mechanism to improve collaboration, and becomes an end unto itself, then it’s probably time to review it in a team retrospective and with the stakeholders. Agile frameworks value collaboration and working agreements, not detailed specifications. Treat your DoD as a living document that captures key elements of collaboration and you’ll be on the right track.