Let’s think about what the definition of done is first: definition of done is a set of requirements that the team have stipulated a PBI must meet in order for it to be considered done. It applies to the PBI as a whole and basically should be the list of needs for your PBI to ship. It is a shared understanding of what value means, it can include functional and non functional requirements, design documents, release notes etc. It should be a value-driven process of making sure the team focus on what is needed to create a working piece of functionality.
Done == shippable/releaseable/off you go
But what does that look like John? It’s funny you should ask actually, possibly something like this:
Unit tests passed?
Code peer reviewed?
Functional tests passed?
Product Owner reviewed?
Runs on prod server.
The DoD is your goal for completion of the work you do. Quality will not suffer and the team are clear what needs to be done. It might change as the team/product grows but ultimately it’s the end game.
The acceptance criteria is a little different. The AC of a PBI is a set of test scenarios which need to be met in order for the software to be considered working. They are unique to the PBI and will likely be different each time.
The goal of this is to make sure the team are clear on what they should build before work starts, ensure a understanding of the problem and informs when the PBI is completed.
The way to think about it is this: you are a house builder and you have a plot of land which you will build 2 houses on. Both houses have sold. The definition of done might be:
Needs a roof
Needs a boiler
Then the acceptance criteria for house 1 might be:
Needs 2 bedrooms
For house 2:
Needs 4 bedrooms
Ensuite on master
Double glazing with PVC grey surround
The DoD will give you an overarching goal that the PBI must meet to ship, regardless of whether it will be accepted by a user. The AC will make sure what you are building is what will be accepted.