Architectural Decision Records (ADRs) are lightweight documents used to record important decisions in your project, and the reasons behind them.
These records aren't limited to architectural choices but can encompass any crucial decision made by the team, making ADRs versatile as "Architecture/Any Decision Records".
Typically, this is the data it will have:
The act of documenting an important decision, forces developers to think more objectively about their decision. If the decision is likely to cause contention it may be quicker to document it via an ADR and get feedback, than it would be to implement the change and let the reviewer try to infer your reasoning.
Additionally, documenting decision 'deciders' ensures that we have a 2nd pair of eyes across the decision, just like we do with the checked by rule, test please rule, and pull-requests.
ADRs can also help with knowledge sharing across teams, as other Solution Architects will have access to a succinct explanation of the problem and the decided solution.
Another benefit is that future developers joining the project now have access to the historical context as to why certain decisions were made.
They should be stored wherever the technical documentation for your project lives. Storing them in Git along with your code works well, but alternatively wherever your technical documentation lives (i.e. a wiki).
An ADR can be in any format, but it should be easily readable and accessible. Some options are:
Log4Brains can help to create and view ADRs.
This can be installed by running:
npm install -g log4brains
You can then initialize your git repo by running:
log4brains init
Which will guide you through a simple setup process.
To create a new ADR, run:
log4brains adr new
Lastly, to preview your ADRs, run:
log4brains preview
Figure: SSW.CleanArchitecture KB showing all ADRs
Figure: Example of a single ADR from SSW.CleanArchitecture
You can see more examples of ADRs with log4brains in action on our SSW.CleanArchitecture template.