{"id":35,"date":"2024-02-13T14:09:12","date_gmt":"2024-02-13T11:09:12","guid":{"rendered":"http:\/\/caitiem.com\/?p=35"},"modified":"2024-02-13T15:28:45","modified_gmt":"2024-02-13T12:28:45","slug":"design-docs-markdown-and-git","status":"publish","type":"post","link":"http:\/\/www.caitiem.com\/2020\/03\/29\/design-docs-markdown-and-git\/","title":{"rendered":"Design Docs, Markdown, and\u00a0Git"},"content":{"rendered":"\n
About a year ago my software engineering team, the Azure Sphere Security Services (AS3) team, found ourselves struggling with our design document process.\u00a0 So we ran an experiment, moving all our design documents to be written in Markdown, checked into Git, and reviewed via a pull request (PR). The experiment has been incredibly successful, so we\u2019ve iterated and refined it, and have even expanded it to the broader Azure Sphere team.\u00a0 The goal of this blog post is to share our process and what we learned along the way.\u00a0\u00a0<\/p>\n\n\n\n
Our original design doc process involved writing a Microsoft Word document and sharing it via SharePoint. Feedback was gathered via in person reviews, doc comments, and emails. Approval was then done over email. To signal that a document was the \u201capproved plan of record\u201d versus \u201can under review draft\u201d, we toggled a property on the document. Users could filter documents on the SharePoint by this property to disambiguate between the two states. <\/p>\n\n\n\n
This worked fine when we were a small team, with a small number of documents, but became challenging as the team grew.\u00a0 For context the Azure Sphere team, started out as a handful of people working in Microsoft Research and has grown rapidly over the past 3 years as we\u2019ve went from research project to Generally Available Product.<\/p>\n\n\n\n
Some specific challenges were identified via the AS3 retrospective process. When evaluating new options we kept these pain points in mind:<\/p>\n\n\n\n
To address some of these challenges the AS3 team began writing design documents in Markdown and checking them into a new EngineeringDocs Git repo in Azure DevOps (ADO). Reviews are conducted via pull requests by adding comments, pushing changes, and then resolving comments. Approval was given by signing off on a pull request, anything in master is considered the approved plan of record. Versioning was also greatly simplified as anyone could submit a pull request to update the document. <\/p>\n\n\n\n
One of the first early decisions we made was where in the codebase design documents should live. We discussed two options<\/p>\n\n\n\n
We chose to use a Single Repo for several reasons:<\/p>\n\n\n\n
The Azure Sphere team uses the OARP model for making decisions, so the below section describes approval and stakeholders in this context.\u00a0 I recommend having a well defined decision making process and integrating whatever that is for your team into the design document process.\u00a0\u00a0<\/p>\n\n\n\n
Identify Reviewers and Approvers via a Pull Request<\/strong><\/p>\n\n\n\n The first step in our Design process is identifying the stakeholders. The first pull request includes the title of the Design Doc and a table listing the OARP assignments for this document. The pull request author is always the Owner. <\/p>\n\n\n\n This serves a few purposes: <\/p>\n\n\n\n Once the stakeholders are all identified, the Approver approves the pull requests, and the Owner checks in the pull request. <\/p>\n\n\n\n Writing the Design Document<\/strong><\/p>\n\n\n\n To author the design document the owner creates a new branch modifying the checked in shell document. It is highly recommended that input from Reviewers and Approvers is informally gathered prior to writing the document. This can be via white board session, chats, hallway conversations, etc\u2026 This ensures that the design review process is more collaborative, and there are few surprises during the formal review process. <\/p>\n\n\n\n Design docs are written in Markdown.\u00a0 Architectural diagrams are added to the design doc by checking in images or using Mermaid.\u00a0 The AS3 team often generates architectural images using Microsoft Visio.\u00a0 It is highly recommended that these Visio diagrams are checked in as well for ease in modifying later.\u00a0\u00a0<\/p>\n\n\n\n Once the design doc is ready for review, the engineer submits a new pull request. All members of the OARP model are listed as reviewers on the pull request. <\/p>\n\n\n\n Design Pull Request<\/strong><\/p>\n\n\n\n Once the pull request has been submitted, design review stakeholders can read and submit feedback via comments on the pull request. All comments must be addressed and marked as either resolved via document updates or won\u2019t fix. <\/p>\n\n\n\n The document can be committed to master once the Approver has approved the pull request. This design is now considered a plan of record.<\/p>\n\n\n\n Design Review Meeting<\/strong><\/p>\n\n\n\n Design review meetings are not required but often held. A meeting invite is sent out ahead of time. Owners, Approvers and Reviewers are considered Required attendees, Participants are considered optional. <\/p>\n\n\n\n The meeting invite should be updated with a link to the pull request for the design doc to be reviewed, at least one business day prior to the meeting. The first 10-15 minutes of the meeting are set aside for folks to read the document and add comments to the pull request if they have not done so already. In either scenario feedback is added via comments on the pull request. <\/p>\n\n\n\n We provide two ways for folks to review the document, ahead of time or in the meeting to accommodate multiple working styles on the team. So folks prefer to digest and think about a design document for a while before providing feedback, others are more comfortable providing feedback on the spot. <\/p>\n\n\n\n After the reading period the design review meeting spends time focusing and discussing the comments. The owner takes notes and records the in room decisions in the pull request comments. <\/p>\n\n\n\n Updating the Design<\/strong><\/p>\n\n\n\n Throughout the course of the project design docs may need to be updated. This can happen after design if a major change was made in implementation, or could be later in the life of the project as a new feature or requirement requires a modification. <\/p>\n\n\n\n Updating the design doc, follows a very similar process. A pull request with proposed changes are submitted. The original Owner and Approver should be considered required reviewers.<\/p>\n\n\n\n The AS3 team considers the experiment incredibly successful so much so that the broader Azure Sphere team has begun adopting it, including the Program Managers. <\/p>\n\n\n\n To summarize all the challenges we experienced with Word Documents and SharePoint were addressed by using Git and Markdown. <\/p>\n\n\n\n By utilizing a toolchain that developers already use day to day the process feels more lightweight, and writing design documents feels like a less arduous process. The Program Management team has also been incredibly receptive to using Markdown and Git. While these are new tools for some of them, they\u2019ve embraced our growth mindset culture and dove right in. <\/p>\n\n\n\n One of the biggest benefits I\u2019ve observed is the clarity it has brought to how decisions are made, and durably recording when things are done. On a fast growing team like Azure Sphere having clarity and durable communication are key to successfully scaling the business and the team.<\/p>\n","protected":false},"excerpt":{"rendered":" About a year ago my software engineering team, the Azure Sphere Security Services (AS3) team, found ourselves struggling with our design document process.\u00a0 So we ran an experiment, moving all our design documents to be written in Markdown, checked into Git, and reviewed via a pull request (PR). The experiment…<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[],"class_list":["post-35","post","type-post","status-publish","format-standard","hentry","category-tech-insights"],"yoast_head":"\n\n
Conclusion<\/h2>\n\n\n\n
\n