Architecture Decision Record (ADR)
An architectural decision record (ADR) is a document that captures an important architectural decision made along with its context and consequences.
Contents:
- What is an Architecture Decision Record?
- ADR example templates
- How to start using ADRs
- How to start using ADRs with tools
- How to start using ADRs with git
- ADR file name conventions
- Suggestions for writing good ADRs
- Organizations and Projects using ADRs
- Contributing
- Sources
What is an Architecture Decision Record?
An architectural decision record (ADR) is a document that captures an important architectural decision made along with its context and consequences.
An architectural decision (AD) is a software design choice that addresses a significant requirement.
An architecturally significant requirement (ASR) is a requirement that has a measurable effect on a software system’s architecture.
A decision log is the collection of all ADRs created and maintained for a particular project (or organization).
All these are within the topic of architectural knowledge management (AKM).
The goal of this document is to provide a fast overview of ADRs, how to create them, and where to look for more information.
ADR example templates
ADR example templates that we have collected on the net:
- ADR template by Michael Nygard (simple and popular)
- ADR template by Jeff Tyree and Art Akerman (more sophisticated)
- ADR template for Alexandrian pattern (simple with context specifics)
- ADR template for business case (more MBA-oriented, with costs, SWOT, and more opinions)
- ADR template MADR (focuses on considered options)
- ADR template using Planguage (more quality assurance oriented)
- ADR template for microservices (more microservices oriented)
How to start using ADRs
To start using ADRs, talk with your teammates about these areas.
-
Decision identification
- How urgent and how important is the AD?
- Does it have to be made now, or can it wait until more is known?
- Both personal and collective experience, as well as recognized design methods and practices, can assist with decision identification.
- Ideally maintain a decision todo list that complements the product todo list.
-
Decision making
- A number of decision making techniques exists, both general ones and software and software architecture specific ones, for instance, dialogue mapping.
- Group decision making is an active research topic.
-
Decision documentation
- Many templates and tools for decision capturing exist.
- See agile communities, e.g. M. Nygard's ADRs.
- See traditional software engineering and architecture design processes, e.g. table layouts suggested by IBM UMF and by Tyree and Akerman from CapitalOne.
-
Decision enactment and enforcement
- ADs are used in software design; hence they have to be communicated to, and accepted by, the stakeholders of the system that fund, develop, and operate it.
- Architecturally evident coding styles and code reviews that focus on architectural concerns and decisions are two related practices.
- ADs also have to be (re-)considered when modernizing a software sytem in software evolution.
-
Decision sharing (optional)
- Many ADs recur across projects.
- Hence, experiences with past decisions, both good and bad, can be valuable reusable assets when employing an explicit knowledge management strategy.
The steps above are adopted from the Wikipedia entry on Architectural Decision
How to start using ADRs with tools
You can start using ADRs with tools any way you want.
For example:
* If you like using Google Drive and online editing, then you can create a Google Doc, or Google Sheet.
* If you like use source code version control, such as git, then you can create a file for each ADR.
* If you like using project planning tools, such as Atlassian Jira, then you can use the tool's planning tracker.
* If you like using wikis, such as MediaWiki, then you can create an ADR wiki.
How to start using ADRs with git
If you like using git version control, then here is how we like to start using ADRs with git for a typical software project with source code.
-
Create a directory for ADR files.
mkdir adr
-
For each ADR, create a text file, such as
database.txt
.vi database.txt
-
Write anything you want in the ADR. See the templates in this repository for ideas.
-
Commit the ADR to your git repo
ADR file name conventions
If you choose to create your ADRs using typical text files, then you may want to come up with your own ADR file name convention.
We prefer to use a file name convention that has a specific format.
Examples:
* choose_database.md
* format_timestamps.md
* manage_passwords.md
* handle_exceptions.md
Our file name convention:
* The name has a present tense imperative verb phrase. This helps readability and matches our commit message format.
* The name uses lowercase and underscores (same as this repo). This is a balance of readability and system usability.
* The extension is markdown. This can be useful for easy formatting.
Suggestions for writing good ADRs
-
Characteristics of a good ADR:
- Point in Time - Identify when the AD was made
- Rationality - Explain the reason for making the particular AD
- Immutable record - The decisions made in a previously published ADR should not be altered
- Specificity - Each ADR should be about a single AD
-
Characteristics of good Context in an ADR:
- Explain your organization's situation and business priorities
- Include rationale and considerations based on social and skills makeups of your teams
-
Characteristics of good Consequences in an ADR:
- Right approach - "We need to start doing X instead of Y"
- Wrong approach - Do not explain the AD in terms of "Pros" and "Cons" of having made the particular AD
-
A new ADR may take the place of a previous ADR
- When an AD is made that replaces or invalidates a previous ADR, a new ADR should be created
Organizations and Projects using ADRs
Contributing
Your comments and suggestions are welcome.
You can open a GitHub issue, or create a pull request, or email joel@joelparkerhenderson.com.
Sources
Introduction:
Templates:
- Documenting architecture decisions - Michael Nygard
- Markdown Architectural Decision Records - provided by the adr GitHub organization
- Template for documenting architecture alternatives and decisions - Stack Overflow
In-depth:
- ADMentor XML project - GitHub
- Architectural Decision Guidance across Projects: Problem Space Modeling, Decision Backlog Management and Cloud Computing Knowledge
- The Decision View's Role in Software Architecture Practice
- Documenting Software Architectures: Views and Beyond
- Architecture Decisions: Demystifying Architecture
- ThoughtWorks Technology Radar: Lightweight Architecture Decision Records
Tools:
Examples:
See also:
- REMAP (Representation and Maintenance of Process Knowledge)
- DRL (Decision Representation Language)
- IBIS (Issue-Based Information System)
- QOC (Questions, Options, and Criteria)
- IBM’s e-Business Reference Architecture Framework