Guest User

adr-template

a guest
Mar 6th, 2026
200
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.24 KB | None | 0 0
  1. # ADR Templates Reference
  2.  
  3. Read this file when you need the exact template text to populate an ADR, or when a project
  4. uses a non-MADR format and you need to match their convention.
  5.  
  6. ## Table of Contents
  7.  
  8. 1. MADR 4.0 — Full Template (default)
  9. 2. MADR 4.0 — Minimal Template
  10. 3. Nygard Template (original ADR format)
  11. 4. Y-Statement Template (one-liner format)
  12. 5. Bootstrapping ADR (ADR-0000)
  13. 6. Retrospective ADR Guide
  14.  
  15. ---
  16.  
  17. ## 1. MADR 4.0 — Full Template
  18.  
  19. Use this for Standard and Heavyweight decisions. All sections marked `<!-- optional -->` can
  20. be removed if not applicable.
  21.  
  22. ```markdown
  23. ---
  24. status: "{proposed | accepted | rejected | deprecated | superseded}"
  25. date: {YYYY-MM-DD}
  26. decision-makers: {list} <!-- optional -->
  27. consulted: {list} <!-- optional -->
  28. informed: {list} <!-- optional -->
  29. ---
  30.  
  31. # {Short Noun Phrase Title}
  32.  
  33. ## Context and Problem Statement
  34.  
  35. {Describe the context and problem statement, e.g., in free form using two to three
  36. sentences or in the form of an illustrative story. You may want to articulate the problem
  37. in the form of a question and add links to collaboration boards or issue management systems.}
  38.  
  39. ## Decision Drivers <!-- optional -->
  40.  
  41. * {Decision driver 1, e.g., a force, facing concern, …}
  42. * {Decision driver 2, e.g., a force, facing concern, …}
  43. * …
  44.  
  45. ## Considered Options
  46.  
  47. 1. {Title of option 1}
  48. 2. {Title of option 2}
  49. 3. {Title of option 3}
  50. * …
  51.  
  52. ## Decision Outcome
  53.  
  54. Chosen option: "{title of option 1}", because {justification. e.g., only option which
  55. meets k.o. criterion decision driver | which resolves force {force} | … | comes out
  56. best (see below)}.
  57.  
  58. ### Consequences <!-- optional -->
  59.  
  60. * Good, because {positive consequence, e.g., improvement of one or more desired qualities, …}
  61. * Bad, because {negative consequence, e.g., compromising one or more desired qualities, …}
  62. * …
  63.  
  64. ### Confirmation <!-- optional -->
  65.  
  66. {Describe how the implementation of/compliance with the ADR can/will be confirmed. E.g.,
  67. by a review or an automated test. Is the chosen design and its implementation in line
  68. with the decision? Note that although we classify this element as optional, it is included
  69. in many ADRs.}
  70.  
  71. ## Pros and Cons of the Options <!-- optional -->
  72.  
  73. ### {Title of Option 1}
  74.  
  75. {Example | description | pointer to more information | …}
  76.  
  77. * Good, because {argument a}
  78. * Good, because {argument b}
  79. * Neutral, because {argument c}
  80. * Bad, because {argument d}
  81. * …
  82.  
  83. ### {Title of Option 2}
  84.  
  85. {Example | description | pointer to more information | …}
  86.  
  87. * Good, because {argument a}
  88. * Good, because {argument b}
  89. * Neutral, because {argument c}
  90. * Bad, because {argument d}
  91. * …
  92.  
  93. ### {Title of Option 3}
  94.  
  95. {Example | description | pointer to more information | …}
  96.  
  97. * Good, because {argument a}
  98. * Good, because {argument b}
  99. * Neutral, because {argument c}
  100. * Bad, because {argument d}
  101. * …
  102.  
  103. ## More Information <!-- optional -->
  104.  
  105. {You might want to provide additional evidence/confidence for the decision outcome here
  106. and/or document the team agreement on the decision and/or define when/how this decision
  107. should be realized and if/when it should be re-visited. Links to other decisions and
  108. resources might appear here as well.}
  109. ```
  110.  
  111. ---
  112.  
  113. ## 2. MADR 4.0 — Minimal Template
  114.  
  115. Use this for Lightweight decisions or when the project prefers brevity.
  116.  
  117. ```markdown
  118. ---
  119. status: "{proposed | accepted | rejected | deprecated | superseded}"
  120. date: {YYYY-MM-DD}
  121. ---
  122.  
  123. # {Short Noun Phrase Title}
  124.  
  125. ## Context and Problem Statement
  126.  
  127. {Describe context and problem in free form, two to three sentences.}
  128.  
  129. ## Considered Options
  130.  
  131. 1. {Title of option 1}
  132. 2. {Title of option 2}
  133. 3. {Title of option 3}
  134. * …
  135.  
  136. ## Decision Outcome
  137.  
  138. Chosen option: "{title of option 1}", because {justification}.
  139. ```
  140.  
  141. ---
  142.  
  143. ## 3. Nygard Template
  144.  
  145. Michael Nygard's original format from 2011. Simpler, more narrative. Use this if the project
  146. already follows this convention, or if the team prefers prose over structured lists.
  147.  
  148. ```markdown
  149. # {ADR Number}. {Title}
  150.  
  151. Date: {YYYY-MM-DD}
  152.  
  153. ## Status
  154.  
  155. {Proposed | Accepted | Deprecated | Superseded by [ADR NNNN](NNNN-title.md)}
  156.  
  157. ## Context
  158.  
  159. {The forces at play, including technological, political, social, and project local. These
  160. forces are probably in tension, and should be called out as such. The language in this
  161. section is value-neutral. It is simply describing facts.}
  162.  
  163. ## Decision
  164.  
  165. {The response to the forces. Stated in full sentences, with active voice. "We will …"}
  166.  
  167. ## Consequences
  168.  
  169. {The resulting context, after applying the decision. All consequences should be listed here,
  170. not just the "positive" ones. A particular decision may have positive, negative, and neutral
  171. consequences, but all of them affect the team and project in the future.}
  172. ```
  173.  
  174. ---
  175.  
  176. ## 4. Y-Statement Template
  177.  
  178. A one-liner summary format from Zdun et al. Useful for quick capture that can be expanded
  179. later, or as the TL;DR at the top of a longer ADR.
  180.  
  181. **Short form:**
  182. ```
  183. In the context of {use case/user story}, facing {concern},
  184. we decided for {option} to achieve {quality}, accepting {downside}.
  185. ```
  186.  
  187. **Long form:**
  188. ```
  189. In the context of {use case/user story}, facing {concern},
  190. we decided for {option} and neglected {other options},
  191. to achieve {system qualities/desired consequences},
  192. accepting {downside/undesired consequences},
  193. because {additional rationale}.
  194. ```
  195.  
  196. ### When to use
  197.  
  198. - As a summary line at the top of a MADR or Nygard ADR
  199. - In meeting notes or chat as a quick capture before writing the full ADR
  200. - When the decision is simple enough that one sentence suffices
  201.  
  202. ---
  203.  
  204. ## 5. Bootstrapping ADR (ADR-0000)
  205.  
  206. When initializing a new decision log, create this as the first ADR. It serves as both the
  207. meta-decision and a working example of the chosen format.
  208.  
  209. ```markdown
  210. ---
  211. status: "accepted"
  212. date: {YYYY-MM-DD}
  213. ---
  214.  
  215. # Use MADR for Architecture Decision Records
  216.  
  217. ## Context and Problem Statement
  218.  
  219. We need to record architecturally significant decisions made in this project. Which format
  220. and structure should these records follow?
  221.  
  222. ## Decision Drivers
  223.  
  224. * Decisions must be version-controlled alongside code
  225. * Format must be easy to write and read without special tooling
  226. * Template should encourage structured thinking (context, options, tradeoffs)
  227. * Must be adoptable incrementally — not all-or-nothing
  228.  
  229. ## Considered Options
  230.  
  231. 1. MADR 4.0 (Markdown Architectural Decision Records)
  232. 2. Nygard's original template
  233. 3. Y-Statements only
  234. 4. Free-form wiki pages
  235. 5. No formal decision records
  236.  
  237. ## Decision Outcome
  238.  
  239. Chosen option: "MADR 4.0", because it provides structured sections for context, options,
  240. and consequences while remaining lightweight enough for regular use. The minimal template
  241. keeps the barrier low; the full template is available when deeper analysis is warranted.
  242.  
  243. ### Consequences
  244.  
  245. * Good, because decisions are captured close to the code in version control
  246. * Good, because the template forces explicit consideration of alternatives and tradeoffs
  247. * Good, because the format is plain Markdown — no special tools required
  248. * Bad, because maintaining ADRs requires discipline that must be reinforced in code review
  249. * Neutral, because the team needs to agree on when a decision warrants an ADR
  250.  
  251. ### Confirmation
  252.  
  253. Verify during code reviews that architecturally significant changes reference or include
  254. relevant ADRs.
  255.  
  256. ## More Information
  257.  
  258. * MADR project: https://adr.github.io/madr/
  259. * ADR overview: https://adr.github.io/
  260. * Nygard's original post: https://www.cognitect.com/blog/2011/11/15/documenting-architecture-decisions
  261. ```
  262.  
  263. ---
  264.  
  265. ## 6. Retrospective ADR Guide
  266.  
  267. When documenting a decision that was already made (possibly long ago), follow this approach:
  268.  
  269. 1. **State clearly this is retrospective.** Add a note in Context:
  270. "This ADR retroactively documents a decision made in {month/year}."
  271.  
  272. 2. **Reconstruct context from evidence.** Git history, old PRs, Slack threads, commit
  273. messages. State what you can verify and flag what you're inferring.
  274.  
  275. 3. **List the options that were likely considered.** Even if you only know what was chosen,
  276. list the obvious alternatives for completeness. Mark inferred options: "Likely considered
  277. but not documented."
  278.  
  279. 4. **Be honest about gaps.** If you don't know why Option B was rejected, say so. A partial
  280. ADR is better than no ADR.
  281.  
  282. 5. **Set the status to Accepted** (or Deprecated/Superseded if the decision has since
  283. changed).
  284.  
  285. 6. **Use this pattern in Context:**
  286. ```
  287. This decision was made approximately {date/period} during {project phase/initiative}.
  288. The original rationale was not formally documented. This ADR reconstructs the context
  289. from {sources: git history, team interviews, code comments, etc.}.
  290. ```
  291.  
  292. ---
  293.  
  294. ## Format Detection
  295.  
  296. When working in an existing project, detect the ADR format before creating new ones:
  297.  
  298. 1. Check `docs/decisions/`, `docs/adr/`, `adr/`, or `decisions/` directories
  299. 2. Read 2-3 existing ADRs to identify the template in use
  300. 3. Match the existing format — consistency within a project trumps template preference
  301. 4. If no existing ADRs but the project has an `.adr-dir` file, honor its path setting
  302. 5. If multiple formats coexist, suggest standardizing in a new ADR-0000
  303.  
Advertisement
Add Comment
Please, Sign In to add comment