Definition of done and definition of ready: the post-op and pre-op of your development process.
Other people have provided slightly different definitions of the definition of done. Still, the one in Ilan Goldstein’s book Scrum Shortcuts without Cutting Corners: Agile Tactics, Tools, & Tips resonates with me the most:
The Definition of Done is a governing agreement that guides all developmental activities, clearly stating what is required for a piece of work to be categorically classified as “done.”
For a good reference on the definition of ready, I turned to Kenneth Rubin’s Essential Scrum:
A checklist of conditions that must be true before a product backlog item is considered ready to pull into a sprint during sprint planning.
The DoD and DoR are the endpoints of the development phase. Before you start coding, you need to ensure that you have everything you need to ensure success. After development is complete, you’ll want to follow some routine steps to ensure code quality and consistency.
Your SDLC (software development lifecycle) isn’t the only process with pre- and post-checklists, so the basic concept should be familiar. Consider online grocery delivery services, for instance.
The popularization of grocery delivery is one of the best things to come out of the recent pandemic. We prepare a grocery list, place our order, and wait for a stranger to drop our groceries at the front door. Gone are the days of trudging through the aisles at the supermarket, waiting in long lines, and picking up unnecessary items that caught our interest. Although this sounds like a dream, the process isn’t entirely effort-free.
First, I must prepare a meal plan for the upcoming week - a task I procrastinate on if I’m being honest. Next, I survey the food remaining in the fridge and add items needed to satisfy my meal plan to a shopping list. I then make my rounds to check on toiletries and other supplies, and anything that seems to be running low gets added to the list.
Then I finalized the order and scheduled a slot for drop-off, ensuring that either my heartmate or myself would be available to retrieve the groceries from the comfort of our front porch. Until our timeframe arrives, we go on about our everyday business.
The doorbell will ring at or near the scheduled time, and typically, my husband will retrieve the groceries. He’ll put everything away, check the quality of fruits and vegetables, and ensure nothing is missing.
If something is missing, he’ll look to see if this is expected. If the store charged us for an item we didn’t receive, he’d start the process of rectifying that situation. If the thing were just out of stock, he’d add it to our ‘while you’re out’ shopping list.
The shoppers need to know certain things before they start picking up our groceries:
The list of items needed
Delivery timeframe (for prioritization)
What to do when items are out of stock (skip or replace)
This list of things that need to be known or accounted for before the shopper begins work is their definition of ready. They’re prepared to start shopping once this information is known.
My husband’s definition of done is a checklist that includes putting away the groceries, checking the quality of the produce, and handling any ancillary processes. Until he finishes all those things, our weekly grocery endeavor is incomplete.
The DOR contains criteria covering the things we must know before we start the work. The DoD includes criteria covering things we must do before the work is complete.
The definition of done and the definition of ready go together like peanut butter and jelly. If you want the middle of your sandwich (or SDLC) to be awesome, you need both a definition of done and a definition of ready. You can have one without the other, but they’re better together.
Although both agreements flank our process, they are at opposite ends and serve different purposes. A better metaphor than the shopping one above would be the phases of surgery.
These three phases are preoperative, Intraoperative, and postoperative. The preoperative phase includes things like shaving the operation site, the intraoperative phase is the surgery itself, and the postoperative phase is checking on the patient and helping them to recover.
The DoR is similar to the preoperative phase. We know the operation is coming, and we’re ensuring we’ve taken all the steps necessary to promote success. The operation is akin to our development phase. We’re making changes to implement new functionality or resolve a bug. Once we finish development, we’ll follow a series of steps to validate our work, release it to production and finalize downstream processes like documentation.
“Both the definition of done and the definition of ready are checklists of the work that must be completed before a product backlog item can be considered to be in the respective state.”
Before a story can move into a started status, it must meet the definition of ready, and before a story can move into a done status, it must meet the definition of done. Both definitions are alike because we use them to determine whether a Product Backlog Item can pass into the next phase of our process.
Both checklists also help development teams be successful in delivering value. The DoR focuses primarily on ensuring that we understand customer requirements and have the necessary information to complete development. The DoD helps ensure that the agile team meets acceptance criteria, quality and consistency standards, and that all the ancillary downstream processes are complete.
Let’s imagine we have a user story that meets the DoR but doesn’t meet the DoD (or the team doesn’t have a DoD). A developer completes the work to the best of their ability, and the code makes its way to production. Unbeknownst to the developer, they missed crucial acceptance criteria in the user story. Although the story made it to production, it doesn’t meet the stakeholder expectations, and now there is re-work we may need to push to a future Sprint.
The team could have avoided this problem by applying a DoD that included the standard check to ensure the development met all acceptance criteria.
On the flip side, if a story meets the definition of ready (or the team doesn’t have one) and we start work on it anyway, we risk building the wrong thing. Here, the odds are we’ve not worked with the product owner to ensure we have the appropriate level of acceptance criteria defined. We also might be missing the required information to enable the story’s completion (API credentials, for instance).
At the end of the Sprint, if we still haven’t been able to complete the work because we’re waiting on credentials - our stakeholders will be upset.
Suppose we did obtain the necessary credentials before the end of the Sprint and completed development based on assumed acceptance criteria. In that case, we could pass the DoD, but we didn’t build usable software because we didn’t understand the need.
The DoR focuses more on whether things are ready to come into the Sprint. Checking off everything on this list will ensure that the team has everything they need to begin work and have a reasonably high chance of completing the work in the Sprint.
Items on the DoR will ensure that we have proper acceptance criteria on the user story and that stakeholders have provided any prerequisites to starting the work. Including a requirement that the user story is estimated is also typical. Each of these checks targets specific impediments to getting work done.
Items around the DoD will center around ensuring that we’ve done all of what was requested, the work meets our quality standards, the dev team has completed code review, passed acceptance tests, and finished any tangental work.
The DoD focuses more on whether all of the essential activities associated with a Product Backlog Item have been completed and reduces the chances of re-work or unplanned associated tasks.
Although development can occur without either a definition of ready (DoR) or the definition of done (DoD), each checklist of criteria ensures that the delivered value meets the customer’s expectations.
The DoR ensures that we understand the customer’s needs well and that we’re in a good place to start the work.
The DoD ensures that the increment meets quality standards and that the team has performed all expected steps before reporting to the customer that the work is done.
Similar to the pre-op and post-op for surgery, you could have surgery without these checks and balances, but it would be ill-advised.