A design document is a tool we use to thoroughly discover problems and examine potential solutions before moving into the delivery phase of a project. Design documents can tackle different classes of problems, including customer needs and internal technical challenges. The important part of a design document is being crisp about the exact problem we're tackling, explaining all of the options being considered for tackling that problem, and recording why we ended up moving forward with a particular solution.
Writing a design document takes time. It requires a certain amount of legwork to get started, and it can require a meaningful amount of collaboration to get to a shareable state. We actively are making a choice here: to move slower at the beginning of the project management process in order to move faster and more confidently when we enter the delivery phase.
Once a design document is written, it is required to host a discussion meeting. Asynchronous, text-only communication tends to drag out the process and doesn't get the same kind of broad feedback that live meetings solicit. It is expected that attendees are given time to read, digest, and engage with the design document before the meeting. It is not expected that all open questions will be answered before the meeting starts.
Design document meetings are not meant for open-ended brainstorming, nor are they meant to act as a review body. The intention of this process is not to design by committee. Instead, the author is responsible for driving the process to a conclusion that is satisfactory to the relevant stakeholders. Not every design document will result in complete consensus. Outcomes from the meeting are recorded as a comment on the respective PR.
Examples (some "in spirit", because the design doc template changed over time):
As stated earlier, the goal of a design document is to thoroughly discover problems and examine potential solutions before moving into the delivery phase of a project. In order to do this, each design document should:
If any of these goals are unclear to you, or if the specific requirements of the document are unclear once you kick off a design process, reach out to your manager.
These are not explicitly required for a good design document. You should, however, use your own judgment to determine what is and isn't required for your specific case.
Design docs should be written for all changes where an implementation does not immediately follow from the problem.
Definitely write a design document:
Consider writing a design document:
Many smaller changes do still benefit from a quick design doc to clarify thinking. Err on the side of writing a design document. If in doubt, keep it short.
Feel free to do prototyping or experimental work before writing a design document. Prototypes and experiments can be an effective way to further clarify your thinking and inform the writing process.
design
directory of the repository you're
working in, and fill it in.Once you've had your design document approved, you will move into the delivery phase of the project management process. On the happy path, your design will work as planned and the implementation will match what you've already documented. In that case, your design document will not require any refinement. On the unhappy path, you might discover that the design you proposed needs to be updated.
If you discover major flaws in your design during implementation, you will need to update your design document and get a new round of approvals (effectively repeating Steps 3-9 above). If you discover minor flaws, you can correct the design document alongside the implementation changes, instead.
Use your judgment as to which scenario applies, and reach out to your manager if you need guidance.
You should not maintain the design doc forever. The doc is meant to be a point-in-time artifact that describes the historical context for the design. Once the described work is complete, you can stop updating the design doc.
Instead, invest in evergreen content. Add comments in the code itself (module
comments can be particularly valuable) and reference documentation. For larger
components, consider putting together an architecture presentation (see, for
example, the persist
lectures
(internal));
slides and a talk track can be a more efficient means of communicating some
types of technical content.
As a reviewer, you play a key role in making the design review process a pleasant and productive experience:
If you don't know how to productively push back on aspects of a design document, consult the draft Raising an objection about a design Rustacean doc for guidance.