Architecture decision record conventions¶
This page lists the conventions for architecture decision records (ADRs) across the division. We
use MADR 4 as published. This page adds only what our process needs
on top of it, which is the 0000 placeholder for proposals, the meaning of date and how to name
people and teams. The reasons behind them are in the
explanation of ADRs, and the
steps for writing one are in
Propose an architecture decision.
Location¶
| Scope of the decision | Repository | Directory |
|---|---|---|
| One project or service | The project's repository | docs/decisions/ |
| A copier boilerplate | The boilerplate's repository, outside its template directory | docs/decisions/ |
| Several teams or the whole division | Tech Lead Forum project | docs/decisions/ |
Repositories that already keep ADRs in another directory can keep using it.
File names¶
ADR files are named NNNN-title-with-dashes.md.
NNNNis a four-digit number, padded with zeros.0000is reserved for proposals on open merge requests. Accepted ADRs are numbered from0001.- The number is assigned when the decision is made, as the next free number on the default branch.
- Numbers are never reused, including those of rejected, deprecated and superseded ADRs.
- The title is lowercase, with words separated by dashes, and names the decision rather than the
problem. For example,
0007-use-pub-sub-for-notifications.md. - In prose, refer to an ADR by its number, as ADR-0007.
Frontmatter¶
MADR's frontmatter fields are all optional. Our process relies on status and date, so always
include those two.
| Field | Contents |
|---|---|
status |
One of the status values. |
date |
The date the decision was made, as "YYYY-MM-DD". Empty while the ADR is proposed. |
decision-makers |
Who decided. Use "@crsid" for people, or a team or body name when the group decided. |
consulted |
Who was asked for input before the decision, as "@crsid" or a team or body name. |
informed |
Who needs to know about the decision, as "@crsid" or a team or body name. |
Values are quoted. The three people fields are YAML lists, so ADRs can be filtered by script, and a list can mix people and teams.
Name people by their CRSid, which is also their GitLab username. The @ marks the value as a person.
It doesn't notify them, because GitLab only sends mentions from comments and descriptions, not from
committed files.
Name teams exactly as the teams page does, such as "Platforms Team" or
"Holberton Team", so that every ADR spells them the same way. When the Tech Lead Forum decides,
name it as "Technical Leads Forum (TLF)".
decision-makers:
- "@abc123"
- "@def456"
consulted:
- "Platforms Team"
informed:
- "DevOps Division"
Status values¶
| Status | Meaning | File name |
|---|---|---|
proposed |
Under discussion on an open merge request. Never on the default branch. | 0000-… |
accepted |
Decided, and in force. | Numbered |
rejected |
Decided against, and kept because the reasoning is worth recording. | Numbered |
deprecated |
No longer applies, with nothing replacing it. | Numbered |
superseded by ADR-NNNN |
Replaced by the ADR named. | Numbered |
What can change after acceptance¶
| Change | Allowed? | Approved by |
|---|---|---|
| Fix typos, broken links or formatting | Yes | Ordinary merge request review |
| Correct the context, decision drivers or considered options without affecting the decision | Yes | The decision makers |
| Make a small fix to the decision's wording that leaves its meaning intact | Yes | The decision makers |
Set status to deprecated or superseded by ADR-NNNN |
Yes | The decision makers |
| Change the meaning of the decision | No. Write a new ADR that supersedes it. | n/a |
Templates¶
Start from one of MADR's templates and copy it into a file named 0000-<short-title>.md.
| Template | Contents |
|---|---|
adr-template.md |
Every section, with guidance on what to write in each. Start here if you are new to MADR. |
adr-template-minimal.md |
The mandatory sections only, with guidance. |
adr-template-bare.md |
Every section, without guidance. |
adr-template-bare-minimal.md |
The mandatory sections only, without guidance. |
The two minimal templates have no frontmatter. If you use one, add at least status and date
from the frontmatter section.
The guidance in the templates is written as long placeholder lines. Replace it as you write, so the finished ADR passes the project's markdownlint checks.
Further reading¶
- Documenting architecture decisions, Michael Nygard's original article.
- Documenting architecture decisions in the GDS Way.