Skip to content

Commit e60ce18

Browse files
authored
Add Architecture Decision Records (#32)
Signed-off-by: Federico Busetti <729029+febus982@users.noreply.github.com>
1 parent 4de4043 commit e60ce18

8 files changed

+158
-0
lines changed

docs/.pages

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
nav:
2+
- Home: index.md
3+
- ...
4+
- ADR: adr

docs/adr/.markdownlint

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# source: https://github.com/adr/madr/blob/3.0.0/template/.markdownlint.yml
2+
default: true
3+
4+
# Allow arbitrary line length
5+
#
6+
# Reason: We apply the one-sentence-per-line rule. A sentence may get longer than 80 characters, especially if links are contained.
7+
#
8+
# Details: https://github.com/DavidAnson/markdownlint/blob/main/doc/Rules.md#md013---line-length
9+
MD013: false
10+
11+
# Allow duplicate headings
12+
#
13+
# Reasons:
14+
#
15+
# - The chosen option is considerably often used as title of the ADR (e.g., ADR-0015). Thus, that title repeats.
16+
# - We use "Examples" multiple times (e.g., ADR-0010).
17+
# - Markdown lint should support the user and not annoy them.
18+
#
19+
# Details: https://github.com/DavidAnson/markdownlint/blob/main/doc/Rules.md#md024---multiple-headings-with-the-same-content
20+
MD024: false

docs/adr/.pages

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
nav:
2+
- Summary: summary.md
3+
- ... | regex=^\d{4}-
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
---
2+
# source: https://github.com/adr/madr/blob/3.0.0/template/adr-template.md
3+
# These are optional elements. Feel free to remove any of them.
4+
status: accepted
5+
date: 2024-02-03
6+
# status: {proposed | rejected | accepted | deprecated | … | superseded by [ADR-0005](0005-example.md)}
7+
# date: {YYYY-MM-DD when the decision was last updated}
8+
# deciders: {list everyone involved in the decision}
9+
# consulted: {list everyone whose opinions are sought (typically subject-matter experts); and with whom there is a two-way communication}
10+
# informed: {list everyone who is kept up-to-date on progress; and with whom there is a one-way communication}
11+
---
12+
# Use Markdown Any Decision Records V3
13+
14+
## Context and Problem Statement
15+
16+
We want to record any decisions made in this project independent whether decisions concern the architecture ("architectural decision record"), the code, or other fields.
17+
Which format and structure should these records follow?
18+
19+
## Considered Options
20+
21+
* [MADR](https://adr.github.io/madr/) 3.0.0 – The Markdown Any Decision Records
22+
* [Michael Nygard's template](http://thinkrelevance.com/blog/2011/11/15/documenting-architecture-decisions) – The first incarnation of the term "ADR"
23+
* Other templates listed at <https://schubmat.github.io/DecisionCapture>
24+
* Formless – No conventions for file format and structure
25+
26+
## Decision Outcome
27+
28+
Chosen option: "MADR 3.0.0", because
29+
30+
* Implicit assumptions should be made explicit.
31+
Design documentation is important to enable people understanding the decisions later on.
32+
See also [A rational design process: How and why to fake it](https://doi.org/10.1109/TSE.1986.6312940).
33+
* MADR allows for structured capturing of any decision.
34+
* The MADR format is lean and fits our development style.
35+
* The MADR structure is comprehensible and facilitates usage & maintenance.
36+
* The MADR project is vivid.

docs/adr/adr-template.md

+80
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
---
2+
# source: https://github.com/adr/madr/blob/3.0.0/template/adr-template.md
3+
# These are optional elements. Feel free to remove any of them.
4+
status: {proposed | rejected | accepted | deprecated | … | superseded by [ADR-0005](0005-example.md)}
5+
date: {YYYY-MM-DD when the decision was last updated}
6+
deciders: {list everyone involved in the decision}
7+
consulted: {list everyone whose opinions are sought (typically subject-matter experts); and with whom there is a two-way communication}
8+
informed: {list everyone who is kept up-to-date on progress; and with whom there is a one-way communication}
9+
---
10+
# {short title of solved problem and solution}
11+
12+
## Context and Problem Statement
13+
14+
{Describe the context and problem statement, e.g., in free form using two to three sentences or in the form of an illustrative story.
15+
You may want to articulate the problem in form of a question and add links to collaboration boards or issue management systems.}
16+
17+
<!-- This is an optional element. Feel free to remove. -->
18+
## Decision Drivers
19+
20+
* {decision driver 1, e.g., a force, facing concern, …}
21+
* {decision driver 2, e.g., a force, facing concern, …}
22+
*<!-- numbers of drivers can vary -->
23+
24+
## Considered Options
25+
26+
* {title of option 1}
27+
* {title of option 2}
28+
* {title of option 3}
29+
*<!-- numbers of options can vary -->
30+
31+
## Decision Outcome
32+
33+
Chosen option: "{title of option 1}", because
34+
{justification. e.g., only option, which meets k.o. criterion decision driver | which resolves force {force} | … | comes out best (see below)}.
35+
36+
<!-- This is an optional element. Feel free to remove. -->
37+
### Consequences
38+
39+
* Good, because {positive consequence, e.g., improvement of one or more desired qualities, …}
40+
* Bad, because {negative consequence, e.g., compromising one or more desired qualities, …}
41+
*<!-- numbers of consequences can vary -->
42+
43+
<!-- This is an optional element. Feel free to remove. -->
44+
## Validation
45+
46+
{describe how the implementation of/compliance with the ADR is validated. E.g., by a review or an ArchUnit test}
47+
48+
<!-- This is an optional element. Feel free to remove. -->
49+
## Pros and Cons of the Options
50+
51+
### {title of option 1}
52+
53+
<!-- This is an optional element. Feel free to remove. -->
54+
{example | description | pointer to more information | …}
55+
56+
* Good, because {argument a}
57+
* Good, because {argument b}
58+
<!-- use "neutral" if the given argument weights neither for good nor bad -->
59+
* Neutral, because {argument c}
60+
* Bad, because {argument d}
61+
*<!-- numbers of pros and cons can vary -->
62+
63+
### {title of other option}
64+
65+
{example | description | pointer to more information | …}
66+
67+
* Good, because {argument a}
68+
* Good, because {argument b}
69+
* Neutral, because {argument c}
70+
* Bad, because {argument d}
71+
*
72+
73+
<!-- This is an optional element. Feel free to remove. -->
74+
## More Information
75+
76+
{You might want to provide additional evidence/confidence for the decision outcome here and/or
77+
document the team agreement on the decision and/or
78+
define when this decision when and how the decision should be realized and if/when it should be re-visited and/or
79+
how the decision is validated.
80+
Links to other decisions and resources might here appear as well.}

docs/adr/summary.md

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# ADR Summary
2+
3+
{{ adr_summary(adr_path="docs/adr", adr_style="MADR3") }}

mkdocs.yml

+10
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ repo_url: 'https://github.com/febus982/bootstrap-python-package'
1010
plugins:
1111
- search
1212
- mike
13+
- awesome-pages
14+
- macros:
15+
modules:
16+
- mkdocs_macros_adr_summary
1317
- gen-files:
1418
scripts:
1519
- scripts/gen_pages.py # or any other name or path
@@ -20,6 +24,12 @@ plugins:
2024
docstring_style: sphinx
2125
docstring_section_style: spacy
2226

27+
# Do not use the nav section in this file but reference to the .pages files
28+
# in the docs/ directory and subdirectories (awesome-pages plugin)
29+
# https://github.com/lukasgeiter/mkdocs-awesome-pages-plugin
30+
#nav:
31+
# - Home: index.md
32+
2333
theme:
2434
name: material
2535
custom_dir: mkdocs-overrides

pyproject.toml

+2
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@ optional = true
4848
coverage = ">=6.5.0"
4949
mkdocs = ">=1.4.3"
5050
mkdocstrings = { version = ">=0.24.0", extras = ["python"] }
51+
mkdocs-awesome-pages-plugin = "*"
52+
mkdocs-macros-adr-summary = "*"
5153
mkdocs-gen-files = ">=0.5.0"
5254
mkdocs-material = ">=9.1.16"
5355
mike = ">=2.0.0"

0 commit comments

Comments
 (0)