An ADR is a architecturally significant decision that there is a consensus to adhere to.
Most often it relates to decisions taken in the software development process that affects the software.
From this definition it is possible to delve into academia or heavy enterprise process management.
However.
For our intents a simple model is proposed with a simplified workflow based around Git and GitHub for reviewing, discussing, and accepting proposals as a group.
The intent of using a ADR process is:
The ADR template can be found here: https://github.com/amedia/adr/blob/master/ADR_TEMPLATE.md
The components of it are:
Title and date are self-explanatory.
The *status* is the current status of the document, so it can change from "proposed" to "accepted" to "superseded".
The *context* should provide information on what motivates the decision or change.
The decision is what is being proposed, and the consequences goes into the trade-offs (good and bad).
Decisions should not be written in stone, but they should have some inertia in order to be a useful tool to prevent having the same discussion time and again.
The questions that should be answered when challenging an ADR include:
There are different ways to write an ADR that ranges from hyper-specific to general.
All can be valid ADRs, but the longer lasting ones are usually the strategic and general decisions that needs to hold up over time to provide their full benefits.
Some examples:
package.json
files should have specific scripts
and functions, e.g. build
, lint
, and test
should be
predictable even if one uses webpack
to build and another uses
esbuild
.
Some bad examples would be:
ReSveltUI
for all browser facing
applications.
PreBlackIt
for code formatting.
They are too specific and dogmatic to be useful as good guidelines. They are either impossible to follow in all situations, or will become outdated and/or obsolete, forcing the discussion to be revisited again.
It is better to have an ADR that supports the long-term strategic goal and allow developers to make the best choice that supports that goal for the time being.
It also makes it easier to enforce the ADR, and, as a bonus, harder to challenge.