-
Notifications
You must be signed in to change notification settings - Fork 3
Architecture Decision (AD) Guide
An architectural Decision Record (ADR) is a document that captures an important architectural decision made along with its context and consequences.
- 1. Definitions
- 2. Architecture Decision Workflows
- 3. How to start using ADRs
- 4. Tools to help you with ADRs
- 5. ADR Style Guidelines and Conventions
- 6. Suggestions for writing good ADRs
- 7. Changing Decisions: ADR Deprecation
- 8. ADR Sample Templates
- 9. More information
- 10. References and Attributions
- Architecture Decision (AD)
- A software design choice that addresses a significant functional or non-functional requirement.
- Architecture Decision Record (ADR)
- A document that captures an important architectural decision made⏤proposed, accepted, rejected, or deprecated and superseded by ${ADR-ID}⏤along with its context and consequences.
- Architecture Decision Log (ADL)
- The collection of all ADRs created and maintained for software products, as well as the teams and organizations that design, develop, assess, maintain, and distribute software products.
- Architecturally-Significant Requirement (ASR)
- A requirement that has a measurable effect on a software system's architecture.
Architecture Decision Records are resulting artifacts of community-driven, lightweight workflow.
graph TD
subgraph ADR Workflow
A(("start")) --> B(Significant requirement, challenge, or change)
B --> C("Create GitLab Issue (with the ADR Template)")
C --> D("Field Comments and Discussions")
D --> E("Vote (lazy consensus)")
E --> F{"Tally 👍 👎 reactions"}
F --> |"👍 majority 'accepted'"| G("Apply badge 'ADR accepted'")
F --> |"👎 majority 'rejected'"| H("Apply badge 'ADR rejected'")
G --> I
H --> I("Merge ADR into `master`")
I --> J(("stop"))
end
In many cases, the Architecture Decision will require:
-
Software changes, e.g., refactoring source code
-
Constraint enforcement, e.g., detect and prevent data-leakage before committing to source control.
graph TD
subgraph ASR Workflow
A(("start")) --> B("Create GitLab Issue (with 'Feature' Template)")
B --> |Think about the consequences of the decision| C("Express consequences as Acceptance Criteria")
C --> |Apply label 'help wanted'| D("Develop validation software ('Fitness Functions')")
D --> E{"Test"}
E --> |Pass| F("Deploy")
E --> |Fail| D
F --> G("Invoke Fitness Function as CI Job or Webhook")
G --> H(("stop"))
end
To start using ADRs, talk with your teammates about these areas.
-
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.
-
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.
-
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.
-
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.
-
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.
-
Group decision making is an active research topic.
-
Many templates and tools for decisison 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.
-
The steps above are adopted from the Wikipedia entry on Architectural Decision
-
A number of decision making techniques exists, both general ones and software and software architecture specific ones, for instance, dialogue mapping.
You can start using ADRs with tools any way you want.
If you like using Google Drive and online editing, then you can create a Google Doc, or Google Sheet.
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.
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.
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 follow the kebab-case format.
Examples:
-
choose-database.md
-
format-timestamps.md
-
manage-passwords.md
-
handle-exceptions.md
Always use:
-
Present tense verbs
Why:
The name has a present tense imperative verb phrase. This helps readability and matches our commit message format.
-
Lowercase words separated by dashes
Why:
The name uses lowercase and dashes (just like this repo). This is a balance of readability, usability, SEO, and commit message consistency.
-
.md
File ExtensionWhy:
The extension is markdown. Markdown renders consistently, and it's easy to read even as raw text.
There are five (6) required sections in every ADR: Title, Decision date, Status, Context, Decision, and Consequences.
You may include an optional References section immediately following the Consequences section if you need to cite other works.
-
Prefix the title with "Architecture Decision Record: "
Why:
This helps search engines index ADRs consistently, and it clearly identifies the purpose of each ADR in isolation.
-
Keep the File Name and Title Consistent
How:
If you named an ADR file
format-timestamps.md
then your Title section SHOULD read
Architecture Decision Record: Format Timestamps
Why:
File names that differ from their titles are confusing, and SEO results rank higher when there is consistency.
...
...
...
...
...
...
-
Stateful: Identify when the AD was made using ISO8601 YYYY-MM-DD
-
Rational Explain the reason for making the particular AD.
-
Immutable: The decisions made in a previously published ADR should not be altered
-
Specific: Each ADR should be about a single AD
-
Explain your organization's situation and business priorities
-
Include rationale and considerations based on social and skills makeups of your teams
-
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.
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 (more Markdown)
-
ADR template using Planguage (more quality assurance oriented)
-
Documenting architecture decisions - Michael Nygard (thinkrelevance.com)
-
Markdown Architectural Decision Records (adr.github.io) - provided by the adr GitHub organization
-
Template for documenting architecture alternatives and decisions (stackoverflow.com)
-
The Decision View's Role in Software Architecture Practice (computer.org)
-
Documenting Software Architectures: Views and Beyond (resources.sei.cmu.edu)
-
Architecture Decisions: Demystifying Architecture (utdallas.edu)
-
ThoughtWorks Technology Radar: Lightweight Architecture Decision Records (thoughtworks.com)
-
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
GitLab Markdown | GitLab. (2019). Docs.gitlab.com. Retrieved 8 March 2019, from https://docs.gitlab.com/ee/user/markdown.html
This document is an adaptation of joelparkerhenderson/architecture_decision_record. (2019). GitHub. Retrieved 8 March 2019, from https://github.com/joelparkerhenderson/architecture_decision_record/blob/master/README.md#architecture-decision-record-adr