@wazir-dev/cli 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (629) hide show
  1. package/AGENTS.md +111 -0
  2. package/CHANGELOG.md +14 -0
  3. package/CONTRIBUTING.md +101 -0
  4. package/LICENSE +21 -0
  5. package/README.md +314 -0
  6. package/assets/composition-engine.mmd +34 -0
  7. package/assets/demo-script.sh +17 -0
  8. package/assets/logo-dark.svg +14 -0
  9. package/assets/logo.svg +14 -0
  10. package/assets/pipeline.mmd +39 -0
  11. package/assets/record-demo.sh +51 -0
  12. package/docs/README.md +51 -0
  13. package/docs/adapters/context-mode.md +60 -0
  14. package/docs/concepts/architecture.md +87 -0
  15. package/docs/concepts/artifact-model.md +60 -0
  16. package/docs/concepts/composition-engine.md +36 -0
  17. package/docs/concepts/indexing-and-recall.md +160 -0
  18. package/docs/concepts/observability.md +41 -0
  19. package/docs/concepts/roles-and-workflows.md +59 -0
  20. package/docs/concepts/terminology-policy.md +27 -0
  21. package/docs/getting-started/01-installation.md +78 -0
  22. package/docs/getting-started/02-first-run.md +102 -0
  23. package/docs/getting-started/03-adding-to-project.md +15 -0
  24. package/docs/getting-started/04-host-setup.md +15 -0
  25. package/docs/guides/ci-integration.md +15 -0
  26. package/docs/guides/creating-skills.md +15 -0
  27. package/docs/guides/expertise-module-authoring.md +15 -0
  28. package/docs/guides/hook-development.md +15 -0
  29. package/docs/guides/memory-and-learnings.md +34 -0
  30. package/docs/guides/multi-host-export.md +15 -0
  31. package/docs/guides/troubleshooting.md +101 -0
  32. package/docs/guides/writing-custom-roles.md +15 -0
  33. package/docs/plans/2026-03-15-cli-pipeline-integration-design.md +592 -0
  34. package/docs/plans/2026-03-15-cli-pipeline-integration-plan.md +598 -0
  35. package/docs/plans/2026-03-15-docs-enforcement-plan.md +238 -0
  36. package/docs/readmes/INDEX.md +99 -0
  37. package/docs/readmes/features/expertise/README.md +171 -0
  38. package/docs/readmes/features/exports/README.md +222 -0
  39. package/docs/readmes/features/hooks/README.md +103 -0
  40. package/docs/readmes/features/hooks/loop-cap-guard.md +133 -0
  41. package/docs/readmes/features/hooks/post-tool-capture.md +121 -0
  42. package/docs/readmes/features/hooks/post-tool-lint.md +130 -0
  43. package/docs/readmes/features/hooks/pre-compact-summary.md +122 -0
  44. package/docs/readmes/features/hooks/pre-tool-capture-route.md +100 -0
  45. package/docs/readmes/features/hooks/protected-path-write-guard.md +128 -0
  46. package/docs/readmes/features/hooks/session-start.md +119 -0
  47. package/docs/readmes/features/hooks/stop-handoff-harvest.md +125 -0
  48. package/docs/readmes/features/roles/README.md +157 -0
  49. package/docs/readmes/features/roles/clarifier.md +152 -0
  50. package/docs/readmes/features/roles/content-author.md +190 -0
  51. package/docs/readmes/features/roles/designer.md +193 -0
  52. package/docs/readmes/features/roles/executor.md +184 -0
  53. package/docs/readmes/features/roles/learner.md +210 -0
  54. package/docs/readmes/features/roles/planner.md +182 -0
  55. package/docs/readmes/features/roles/researcher.md +164 -0
  56. package/docs/readmes/features/roles/reviewer.md +184 -0
  57. package/docs/readmes/features/roles/specifier.md +162 -0
  58. package/docs/readmes/features/roles/verifier.md +215 -0
  59. package/docs/readmes/features/schemas/README.md +178 -0
  60. package/docs/readmes/features/skills/README.md +63 -0
  61. package/docs/readmes/features/skills/brainstorming.md +96 -0
  62. package/docs/readmes/features/skills/debugging.md +148 -0
  63. package/docs/readmes/features/skills/design.md +120 -0
  64. package/docs/readmes/features/skills/prepare-next.md +109 -0
  65. package/docs/readmes/features/skills/run-audit.md +159 -0
  66. package/docs/readmes/features/skills/scan-project.md +109 -0
  67. package/docs/readmes/features/skills/self-audit.md +176 -0
  68. package/docs/readmes/features/skills/tdd.md +137 -0
  69. package/docs/readmes/features/skills/using-skills.md +92 -0
  70. package/docs/readmes/features/skills/verification.md +120 -0
  71. package/docs/readmes/features/skills/writing-plans.md +104 -0
  72. package/docs/readmes/features/tooling/README.md +320 -0
  73. package/docs/readmes/features/workflows/README.md +186 -0
  74. package/docs/readmes/features/workflows/author.md +181 -0
  75. package/docs/readmes/features/workflows/clarify.md +154 -0
  76. package/docs/readmes/features/workflows/design-review.md +171 -0
  77. package/docs/readmes/features/workflows/design.md +169 -0
  78. package/docs/readmes/features/workflows/discover.md +162 -0
  79. package/docs/readmes/features/workflows/execute.md +173 -0
  80. package/docs/readmes/features/workflows/learn.md +167 -0
  81. package/docs/readmes/features/workflows/plan-review.md +165 -0
  82. package/docs/readmes/features/workflows/plan.md +170 -0
  83. package/docs/readmes/features/workflows/prepare-next.md +167 -0
  84. package/docs/readmes/features/workflows/review.md +169 -0
  85. package/docs/readmes/features/workflows/run-audit.md +191 -0
  86. package/docs/readmes/features/workflows/spec-challenge.md +159 -0
  87. package/docs/readmes/features/workflows/specify.md +160 -0
  88. package/docs/readmes/features/workflows/verify.md +177 -0
  89. package/docs/readmes/packages/README.md +50 -0
  90. package/docs/readmes/packages/ajv.md +117 -0
  91. package/docs/readmes/packages/context-mode.md +118 -0
  92. package/docs/readmes/packages/gray-matter.md +116 -0
  93. package/docs/readmes/packages/node-test.md +137 -0
  94. package/docs/readmes/packages/yaml.md +112 -0
  95. package/docs/reference/configuration-reference.md +159 -0
  96. package/docs/reference/expertise-index.md +52 -0
  97. package/docs/reference/git-flow.md +43 -0
  98. package/docs/reference/hooks.md +87 -0
  99. package/docs/reference/host-exports.md +50 -0
  100. package/docs/reference/launch-checklist.md +172 -0
  101. package/docs/reference/marketplace-listings.md +76 -0
  102. package/docs/reference/release-process.md +34 -0
  103. package/docs/reference/roles-reference.md +77 -0
  104. package/docs/reference/skills.md +33 -0
  105. package/docs/reference/templates.md +29 -0
  106. package/docs/reference/tooling-cli.md +94 -0
  107. package/docs/truth-claims.yaml +222 -0
  108. package/expertise/PROGRESS.md +63 -0
  109. package/expertise/README.md +18 -0
  110. package/expertise/antipatterns/PROGRESS.md +56 -0
  111. package/expertise/antipatterns/backend/api-design-antipatterns.md +1271 -0
  112. package/expertise/antipatterns/backend/auth-antipatterns.md +1195 -0
  113. package/expertise/antipatterns/backend/caching-antipatterns.md +622 -0
  114. package/expertise/antipatterns/backend/database-antipatterns.md +1038 -0
  115. package/expertise/antipatterns/backend/index.md +24 -0
  116. package/expertise/antipatterns/backend/microservices-antipatterns.md +850 -0
  117. package/expertise/antipatterns/code/architecture-antipatterns.md +919 -0
  118. package/expertise/antipatterns/code/async-antipatterns.md +622 -0
  119. package/expertise/antipatterns/code/code-smells.md +1186 -0
  120. package/expertise/antipatterns/code/dependency-antipatterns.md +1209 -0
  121. package/expertise/antipatterns/code/error-handling-antipatterns.md +1360 -0
  122. package/expertise/antipatterns/code/index.md +27 -0
  123. package/expertise/antipatterns/code/naming-and-abstraction.md +1118 -0
  124. package/expertise/antipatterns/code/state-management-antipatterns.md +1076 -0
  125. package/expertise/antipatterns/code/testing-antipatterns.md +1053 -0
  126. package/expertise/antipatterns/design/accessibility-antipatterns.md +1136 -0
  127. package/expertise/antipatterns/design/dark-patterns.md +1121 -0
  128. package/expertise/antipatterns/design/index.md +22 -0
  129. package/expertise/antipatterns/design/ui-antipatterns.md +1202 -0
  130. package/expertise/antipatterns/design/ux-antipatterns.md +680 -0
  131. package/expertise/antipatterns/frontend/css-layout-antipatterns.md +691 -0
  132. package/expertise/antipatterns/frontend/flutter-antipatterns.md +1827 -0
  133. package/expertise/antipatterns/frontend/index.md +23 -0
  134. package/expertise/antipatterns/frontend/mobile-antipatterns.md +573 -0
  135. package/expertise/antipatterns/frontend/react-antipatterns.md +1128 -0
  136. package/expertise/antipatterns/frontend/spa-antipatterns.md +1235 -0
  137. package/expertise/antipatterns/index.md +31 -0
  138. package/expertise/antipatterns/performance/index.md +20 -0
  139. package/expertise/antipatterns/performance/performance-antipatterns.md +1013 -0
  140. package/expertise/antipatterns/performance/premature-optimization.md +623 -0
  141. package/expertise/antipatterns/performance/scaling-antipatterns.md +785 -0
  142. package/expertise/antipatterns/process/ai-coding-antipatterns.md +853 -0
  143. package/expertise/antipatterns/process/code-review-antipatterns.md +656 -0
  144. package/expertise/antipatterns/process/deployment-antipatterns.md +920 -0
  145. package/expertise/antipatterns/process/index.md +23 -0
  146. package/expertise/antipatterns/process/technical-debt-antipatterns.md +647 -0
  147. package/expertise/antipatterns/security/index.md +20 -0
  148. package/expertise/antipatterns/security/secrets-antipatterns.md +849 -0
  149. package/expertise/antipatterns/security/security-theater.md +843 -0
  150. package/expertise/antipatterns/security/vulnerability-patterns.md +801 -0
  151. package/expertise/architecture/PROGRESS.md +70 -0
  152. package/expertise/architecture/data/caching-architecture.md +671 -0
  153. package/expertise/architecture/data/data-consistency.md +574 -0
  154. package/expertise/architecture/data/data-modeling.md +536 -0
  155. package/expertise/architecture/data/event-streams-and-queues.md +634 -0
  156. package/expertise/architecture/data/index.md +25 -0
  157. package/expertise/architecture/data/search-architecture.md +663 -0
  158. package/expertise/architecture/data/sql-vs-nosql.md +708 -0
  159. package/expertise/architecture/decisions/architecture-decision-records.md +640 -0
  160. package/expertise/architecture/decisions/build-vs-buy.md +616 -0
  161. package/expertise/architecture/decisions/index.md +23 -0
  162. package/expertise/architecture/decisions/monolith-to-microservices.md +790 -0
  163. package/expertise/architecture/decisions/technology-selection.md +616 -0
  164. package/expertise/architecture/distributed/cap-theorem-and-tradeoffs.md +800 -0
  165. package/expertise/architecture/distributed/circuit-breaker-bulkhead.md +741 -0
  166. package/expertise/architecture/distributed/consensus-and-coordination.md +796 -0
  167. package/expertise/architecture/distributed/distributed-systems-fundamentals.md +564 -0
  168. package/expertise/architecture/distributed/idempotency-and-retry.md +796 -0
  169. package/expertise/architecture/distributed/index.md +25 -0
  170. package/expertise/architecture/distributed/saga-pattern.md +797 -0
  171. package/expertise/architecture/foundations/architectural-thinking.md +460 -0
  172. package/expertise/architecture/foundations/coupling-and-cohesion.md +770 -0
  173. package/expertise/architecture/foundations/design-principles-solid.md +649 -0
  174. package/expertise/architecture/foundations/domain-driven-design.md +719 -0
  175. package/expertise/architecture/foundations/index.md +25 -0
  176. package/expertise/architecture/foundations/separation-of-concerns.md +472 -0
  177. package/expertise/architecture/foundations/twelve-factor-app.md +797 -0
  178. package/expertise/architecture/index.md +34 -0
  179. package/expertise/architecture/integration/api-design-graphql.md +638 -0
  180. package/expertise/architecture/integration/api-design-grpc.md +804 -0
  181. package/expertise/architecture/integration/api-design-rest.md +892 -0
  182. package/expertise/architecture/integration/index.md +25 -0
  183. package/expertise/architecture/integration/third-party-integration.md +795 -0
  184. package/expertise/architecture/integration/webhooks-and-callbacks.md +1152 -0
  185. package/expertise/architecture/integration/websockets-realtime.md +791 -0
  186. package/expertise/architecture/mobile-architecture/index.md +22 -0
  187. package/expertise/architecture/mobile-architecture/mobile-app-architecture.md +780 -0
  188. package/expertise/architecture/mobile-architecture/mobile-backend-for-frontend.md +670 -0
  189. package/expertise/architecture/mobile-architecture/offline-first.md +719 -0
  190. package/expertise/architecture/mobile-architecture/push-and-sync.md +782 -0
  191. package/expertise/architecture/patterns/cqrs-event-sourcing.md +717 -0
  192. package/expertise/architecture/patterns/event-driven.md +797 -0
  193. package/expertise/architecture/patterns/hexagonal-clean-architecture.md +870 -0
  194. package/expertise/architecture/patterns/index.md +27 -0
  195. package/expertise/architecture/patterns/layered-architecture.md +736 -0
  196. package/expertise/architecture/patterns/microservices.md +753 -0
  197. package/expertise/architecture/patterns/modular-monolith.md +692 -0
  198. package/expertise/architecture/patterns/monolith.md +626 -0
  199. package/expertise/architecture/patterns/plugin-architecture.md +735 -0
  200. package/expertise/architecture/patterns/serverless.md +780 -0
  201. package/expertise/architecture/scaling/database-scaling.md +615 -0
  202. package/expertise/architecture/scaling/feature-flags-and-rollouts.md +757 -0
  203. package/expertise/architecture/scaling/horizontal-vs-vertical.md +606 -0
  204. package/expertise/architecture/scaling/index.md +24 -0
  205. package/expertise/architecture/scaling/multi-tenancy.md +800 -0
  206. package/expertise/architecture/scaling/stateless-design.md +787 -0
  207. package/expertise/backend/embedded-firmware.md +625 -0
  208. package/expertise/backend/go.md +853 -0
  209. package/expertise/backend/index.md +24 -0
  210. package/expertise/backend/java-spring.md +448 -0
  211. package/expertise/backend/node-typescript.md +625 -0
  212. package/expertise/backend/python-fastapi.md +724 -0
  213. package/expertise/backend/rust.md +458 -0
  214. package/expertise/backend/solidity.md +711 -0
  215. package/expertise/composition-map.yaml +443 -0
  216. package/expertise/content/foundations/content-modeling.md +395 -0
  217. package/expertise/content/foundations/editorial-standards.md +449 -0
  218. package/expertise/content/foundations/index.md +24 -0
  219. package/expertise/content/foundations/microcopy.md +455 -0
  220. package/expertise/content/foundations/terminology-governance.md +509 -0
  221. package/expertise/content/index.md +34 -0
  222. package/expertise/content/patterns/accessibility-copy.md +518 -0
  223. package/expertise/content/patterns/index.md +24 -0
  224. package/expertise/content/patterns/notification-content.md +433 -0
  225. package/expertise/content/patterns/sample-content.md +486 -0
  226. package/expertise/content/patterns/state-copy.md +439 -0
  227. package/expertise/design/PROGRESS.md +58 -0
  228. package/expertise/design/disciplines/dark-mode-theming.md +577 -0
  229. package/expertise/design/disciplines/design-systems.md +595 -0
  230. package/expertise/design/disciplines/index.md +25 -0
  231. package/expertise/design/disciplines/information-architecture.md +800 -0
  232. package/expertise/design/disciplines/interaction-design.md +788 -0
  233. package/expertise/design/disciplines/responsive-design.md +552 -0
  234. package/expertise/design/disciplines/usability-testing.md +516 -0
  235. package/expertise/design/disciplines/user-research.md +792 -0
  236. package/expertise/design/foundations/accessibility-design.md +796 -0
  237. package/expertise/design/foundations/color-theory.md +797 -0
  238. package/expertise/design/foundations/iconography.md +795 -0
  239. package/expertise/design/foundations/index.md +26 -0
  240. package/expertise/design/foundations/motion-and-animation.md +653 -0
  241. package/expertise/design/foundations/rtl-design.md +585 -0
  242. package/expertise/design/foundations/spacing-and-layout.md +607 -0
  243. package/expertise/design/foundations/typography.md +800 -0
  244. package/expertise/design/foundations/visual-hierarchy.md +761 -0
  245. package/expertise/design/index.md +32 -0
  246. package/expertise/design/patterns/authentication-flows.md +474 -0
  247. package/expertise/design/patterns/content-consumption.md +789 -0
  248. package/expertise/design/patterns/data-display.md +618 -0
  249. package/expertise/design/patterns/e-commerce.md +1494 -0
  250. package/expertise/design/patterns/feedback-and-states.md +642 -0
  251. package/expertise/design/patterns/forms-and-input.md +819 -0
  252. package/expertise/design/patterns/gamification.md +801 -0
  253. package/expertise/design/patterns/index.md +31 -0
  254. package/expertise/design/patterns/microinteractions.md +449 -0
  255. package/expertise/design/patterns/navigation.md +800 -0
  256. package/expertise/design/patterns/notifications.md +705 -0
  257. package/expertise/design/patterns/onboarding.md +700 -0
  258. package/expertise/design/patterns/search-and-filter.md +601 -0
  259. package/expertise/design/patterns/settings-and-preferences.md +768 -0
  260. package/expertise/design/patterns/social-and-community.md +748 -0
  261. package/expertise/design/platforms/desktop-native.md +612 -0
  262. package/expertise/design/platforms/index.md +25 -0
  263. package/expertise/design/platforms/mobile-android.md +825 -0
  264. package/expertise/design/platforms/mobile-cross-platform.md +983 -0
  265. package/expertise/design/platforms/mobile-ios.md +699 -0
  266. package/expertise/design/platforms/tablet.md +794 -0
  267. package/expertise/design/platforms/web-dashboard.md +790 -0
  268. package/expertise/design/platforms/web-responsive.md +550 -0
  269. package/expertise/design/psychology/behavioral-nudges.md +449 -0
  270. package/expertise/design/psychology/cognitive-load.md +1191 -0
  271. package/expertise/design/psychology/error-psychology.md +778 -0
  272. package/expertise/design/psychology/index.md +22 -0
  273. package/expertise/design/psychology/persuasive-design.md +736 -0
  274. package/expertise/design/psychology/user-mental-models.md +623 -0
  275. package/expertise/design/tooling/open-pencil.md +266 -0
  276. package/expertise/frontend/angular.md +1073 -0
  277. package/expertise/frontend/desktop-electron.md +546 -0
  278. package/expertise/frontend/flutter.md +782 -0
  279. package/expertise/frontend/index.md +27 -0
  280. package/expertise/frontend/native-android.md +409 -0
  281. package/expertise/frontend/native-ios.md +490 -0
  282. package/expertise/frontend/react-native.md +1160 -0
  283. package/expertise/frontend/react.md +808 -0
  284. package/expertise/frontend/vue.md +1089 -0
  285. package/expertise/humanize/domain-rules-code.md +79 -0
  286. package/expertise/humanize/domain-rules-content.md +67 -0
  287. package/expertise/humanize/domain-rules-technical-docs.md +56 -0
  288. package/expertise/humanize/index.md +35 -0
  289. package/expertise/humanize/self-audit-checklist.md +87 -0
  290. package/expertise/humanize/sentence-patterns.md +218 -0
  291. package/expertise/humanize/vocabulary-blacklist.md +105 -0
  292. package/expertise/i18n/PROGRESS.md +65 -0
  293. package/expertise/i18n/advanced/accessibility-and-i18n.md +28 -0
  294. package/expertise/i18n/advanced/bidirectional-text-algorithm.md +38 -0
  295. package/expertise/i18n/advanced/complex-scripts.md +30 -0
  296. package/expertise/i18n/advanced/performance-and-i18n.md +27 -0
  297. package/expertise/i18n/advanced/testing-i18n.md +28 -0
  298. package/expertise/i18n/content/content-adaptation.md +23 -0
  299. package/expertise/i18n/content/locale-specific-formatting.md +23 -0
  300. package/expertise/i18n/content/machine-translation-integration.md +28 -0
  301. package/expertise/i18n/content/translation-management.md +29 -0
  302. package/expertise/i18n/foundations/date-time-calendars.md +67 -0
  303. package/expertise/i18n/foundations/i18n-architecture.md +272 -0
  304. package/expertise/i18n/foundations/locale-and-language-tags.md +79 -0
  305. package/expertise/i18n/foundations/numbers-currency-units.md +61 -0
  306. package/expertise/i18n/foundations/pluralization-and-gender.md +109 -0
  307. package/expertise/i18n/foundations/string-externalization.md +236 -0
  308. package/expertise/i18n/foundations/text-direction-bidi.md +241 -0
  309. package/expertise/i18n/foundations/unicode-and-encoding.md +86 -0
  310. package/expertise/i18n/index.md +38 -0
  311. package/expertise/i18n/platform/backend-i18n.md +31 -0
  312. package/expertise/i18n/platform/flutter-i18n.md +148 -0
  313. package/expertise/i18n/platform/native-android-i18n.md +36 -0
  314. package/expertise/i18n/platform/native-ios-i18n.md +36 -0
  315. package/expertise/i18n/platform/react-i18n.md +103 -0
  316. package/expertise/i18n/platform/web-css-i18n.md +81 -0
  317. package/expertise/i18n/rtl/arabic-specific.md +175 -0
  318. package/expertise/i18n/rtl/hebrew-specific.md +149 -0
  319. package/expertise/i18n/rtl/rtl-animations-and-transitions.md +111 -0
  320. package/expertise/i18n/rtl/rtl-forms-and-input.md +161 -0
  321. package/expertise/i18n/rtl/rtl-fundamentals.md +211 -0
  322. package/expertise/i18n/rtl/rtl-icons-and-images.md +181 -0
  323. package/expertise/i18n/rtl/rtl-layout-mirroring.md +252 -0
  324. package/expertise/i18n/rtl/rtl-navigation-and-gestures.md +107 -0
  325. package/expertise/i18n/rtl/rtl-testing-and-qa.md +147 -0
  326. package/expertise/i18n/rtl/rtl-typography.md +160 -0
  327. package/expertise/index.md +113 -0
  328. package/expertise/index.yaml +216 -0
  329. package/expertise/infrastructure/cloud-aws.md +597 -0
  330. package/expertise/infrastructure/cloud-gcp.md +599 -0
  331. package/expertise/infrastructure/cybersecurity.md +816 -0
  332. package/expertise/infrastructure/database-mongodb.md +447 -0
  333. package/expertise/infrastructure/database-postgres.md +400 -0
  334. package/expertise/infrastructure/devops-cicd.md +787 -0
  335. package/expertise/infrastructure/index.md +27 -0
  336. package/expertise/performance/PROGRESS.md +50 -0
  337. package/expertise/performance/backend/api-latency.md +1204 -0
  338. package/expertise/performance/backend/background-jobs.md +506 -0
  339. package/expertise/performance/backend/connection-pooling.md +1209 -0
  340. package/expertise/performance/backend/database-query-optimization.md +515 -0
  341. package/expertise/performance/backend/index.md +23 -0
  342. package/expertise/performance/backend/rate-limiting-and-throttling.md +971 -0
  343. package/expertise/performance/foundations/algorithmic-complexity.md +954 -0
  344. package/expertise/performance/foundations/caching-strategies.md +489 -0
  345. package/expertise/performance/foundations/concurrency-and-parallelism.md +847 -0
  346. package/expertise/performance/foundations/index.md +24 -0
  347. package/expertise/performance/foundations/measuring-and-profiling.md +440 -0
  348. package/expertise/performance/foundations/memory-management.md +964 -0
  349. package/expertise/performance/foundations/performance-budgets.md +1314 -0
  350. package/expertise/performance/index.md +31 -0
  351. package/expertise/performance/infrastructure/auto-scaling.md +1059 -0
  352. package/expertise/performance/infrastructure/cdn-and-edge.md +1081 -0
  353. package/expertise/performance/infrastructure/index.md +22 -0
  354. package/expertise/performance/infrastructure/load-balancing.md +1081 -0
  355. package/expertise/performance/infrastructure/observability.md +1079 -0
  356. package/expertise/performance/mobile/index.md +23 -0
  357. package/expertise/performance/mobile/mobile-animations.md +544 -0
  358. package/expertise/performance/mobile/mobile-memory-battery.md +416 -0
  359. package/expertise/performance/mobile/mobile-network.md +452 -0
  360. package/expertise/performance/mobile/mobile-rendering.md +599 -0
  361. package/expertise/performance/mobile/mobile-startup-time.md +505 -0
  362. package/expertise/performance/platform-specific/flutter-performance.md +647 -0
  363. package/expertise/performance/platform-specific/index.md +22 -0
  364. package/expertise/performance/platform-specific/node-performance.md +1307 -0
  365. package/expertise/performance/platform-specific/postgres-performance.md +1366 -0
  366. package/expertise/performance/platform-specific/react-performance.md +1403 -0
  367. package/expertise/performance/web/bundle-optimization.md +1239 -0
  368. package/expertise/performance/web/image-and-media.md +636 -0
  369. package/expertise/performance/web/index.md +24 -0
  370. package/expertise/performance/web/network-optimization.md +1133 -0
  371. package/expertise/performance/web/rendering-performance.md +1098 -0
  372. package/expertise/performance/web/ssr-and-hydration.md +918 -0
  373. package/expertise/performance/web/web-vitals.md +1374 -0
  374. package/expertise/quality/accessibility.md +985 -0
  375. package/expertise/quality/evidence-based-verification.md +499 -0
  376. package/expertise/quality/index.md +24 -0
  377. package/expertise/quality/ml-model-audit.md +614 -0
  378. package/expertise/quality/performance.md +600 -0
  379. package/expertise/quality/testing-api.md +891 -0
  380. package/expertise/quality/testing-mobile.md +496 -0
  381. package/expertise/quality/testing-web.md +849 -0
  382. package/expertise/security/PROGRESS.md +54 -0
  383. package/expertise/security/agentic-identity.md +540 -0
  384. package/expertise/security/compliance-frameworks.md +601 -0
  385. package/expertise/security/data/data-encryption.md +364 -0
  386. package/expertise/security/data/data-privacy-gdpr.md +692 -0
  387. package/expertise/security/data/database-security.md +1171 -0
  388. package/expertise/security/data/index.md +22 -0
  389. package/expertise/security/data/pii-handling.md +531 -0
  390. package/expertise/security/foundations/authentication.md +1041 -0
  391. package/expertise/security/foundations/authorization.md +603 -0
  392. package/expertise/security/foundations/cryptography.md +1001 -0
  393. package/expertise/security/foundations/index.md +25 -0
  394. package/expertise/security/foundations/owasp-top-10.md +1354 -0
  395. package/expertise/security/foundations/secrets-management.md +1217 -0
  396. package/expertise/security/foundations/secure-sdlc.md +700 -0
  397. package/expertise/security/foundations/supply-chain-security.md +698 -0
  398. package/expertise/security/index.md +31 -0
  399. package/expertise/security/infrastructure/cloud-security-aws.md +1296 -0
  400. package/expertise/security/infrastructure/cloud-security-gcp.md +1376 -0
  401. package/expertise/security/infrastructure/container-security.md +721 -0
  402. package/expertise/security/infrastructure/incident-response.md +1295 -0
  403. package/expertise/security/infrastructure/index.md +24 -0
  404. package/expertise/security/infrastructure/logging-and-monitoring.md +1618 -0
  405. package/expertise/security/infrastructure/network-security.md +1337 -0
  406. package/expertise/security/mobile/index.md +23 -0
  407. package/expertise/security/mobile/mobile-android-security.md +1218 -0
  408. package/expertise/security/mobile/mobile-binary-protection.md +1229 -0
  409. package/expertise/security/mobile/mobile-data-storage.md +1265 -0
  410. package/expertise/security/mobile/mobile-ios-security.md +1401 -0
  411. package/expertise/security/mobile/mobile-network-security.md +1520 -0
  412. package/expertise/security/smart-contract-security.md +594 -0
  413. package/expertise/security/testing/index.md +22 -0
  414. package/expertise/security/testing/penetration-testing.md +1258 -0
  415. package/expertise/security/testing/security-code-review.md +1765 -0
  416. package/expertise/security/testing/threat-modeling.md +1074 -0
  417. package/expertise/security/testing/vulnerability-scanning.md +1062 -0
  418. package/expertise/security/web/api-security.md +586 -0
  419. package/expertise/security/web/cors-and-headers.md +433 -0
  420. package/expertise/security/web/csrf.md +562 -0
  421. package/expertise/security/web/file-upload.md +1477 -0
  422. package/expertise/security/web/index.md +25 -0
  423. package/expertise/security/web/injection.md +1375 -0
  424. package/expertise/security/web/session-management.md +1101 -0
  425. package/expertise/security/web/xss.md +1158 -0
  426. package/exports/README.md +17 -0
  427. package/exports/hosts/claude/.claude/agents/clarifier.md +42 -0
  428. package/exports/hosts/claude/.claude/agents/content-author.md +63 -0
  429. package/exports/hosts/claude/.claude/agents/designer.md +55 -0
  430. package/exports/hosts/claude/.claude/agents/executor.md +55 -0
  431. package/exports/hosts/claude/.claude/agents/learner.md +51 -0
  432. package/exports/hosts/claude/.claude/agents/planner.md +53 -0
  433. package/exports/hosts/claude/.claude/agents/researcher.md +43 -0
  434. package/exports/hosts/claude/.claude/agents/reviewer.md +54 -0
  435. package/exports/hosts/claude/.claude/agents/specifier.md +47 -0
  436. package/exports/hosts/claude/.claude/agents/verifier.md +71 -0
  437. package/exports/hosts/claude/.claude/commands/author.md +42 -0
  438. package/exports/hosts/claude/.claude/commands/clarify.md +38 -0
  439. package/exports/hosts/claude/.claude/commands/design-review.md +46 -0
  440. package/exports/hosts/claude/.claude/commands/design.md +44 -0
  441. package/exports/hosts/claude/.claude/commands/discover.md +37 -0
  442. package/exports/hosts/claude/.claude/commands/execute.md +48 -0
  443. package/exports/hosts/claude/.claude/commands/learn.md +38 -0
  444. package/exports/hosts/claude/.claude/commands/plan-review.md +42 -0
  445. package/exports/hosts/claude/.claude/commands/plan.md +39 -0
  446. package/exports/hosts/claude/.claude/commands/prepare-next.md +37 -0
  447. package/exports/hosts/claude/.claude/commands/review.md +40 -0
  448. package/exports/hosts/claude/.claude/commands/run-audit.md +41 -0
  449. package/exports/hosts/claude/.claude/commands/spec-challenge.md +41 -0
  450. package/exports/hosts/claude/.claude/commands/specify.md +38 -0
  451. package/exports/hosts/claude/.claude/commands/verify.md +37 -0
  452. package/exports/hosts/claude/.claude/settings.json +34 -0
  453. package/exports/hosts/claude/CLAUDE.md +19 -0
  454. package/exports/hosts/claude/export.manifest.json +38 -0
  455. package/exports/hosts/claude/host-package.json +67 -0
  456. package/exports/hosts/codex/AGENTS.md +19 -0
  457. package/exports/hosts/codex/export.manifest.json +38 -0
  458. package/exports/hosts/codex/host-package.json +41 -0
  459. package/exports/hosts/cursor/.cursor/hooks.json +16 -0
  460. package/exports/hosts/cursor/.cursor/rules/wazir-core.mdc +19 -0
  461. package/exports/hosts/cursor/export.manifest.json +38 -0
  462. package/exports/hosts/cursor/host-package.json +42 -0
  463. package/exports/hosts/gemini/GEMINI.md +19 -0
  464. package/exports/hosts/gemini/export.manifest.json +38 -0
  465. package/exports/hosts/gemini/host-package.json +41 -0
  466. package/hooks/README.md +18 -0
  467. package/hooks/definitions/loop_cap_guard.yaml +21 -0
  468. package/hooks/definitions/post_tool_capture.yaml +24 -0
  469. package/hooks/definitions/pre_compact_summary.yaml +19 -0
  470. package/hooks/definitions/pre_tool_capture_route.yaml +19 -0
  471. package/hooks/definitions/protected_path_write_guard.yaml +19 -0
  472. package/hooks/definitions/session_start.yaml +19 -0
  473. package/hooks/definitions/stop_handoff_harvest.yaml +20 -0
  474. package/hooks/loop-cap-guard +17 -0
  475. package/hooks/post-tool-lint +36 -0
  476. package/hooks/protected-path-write-guard +17 -0
  477. package/hooks/session-start +41 -0
  478. package/llms-full.txt +2355 -0
  479. package/llms.txt +43 -0
  480. package/package.json +79 -0
  481. package/roles/README.md +20 -0
  482. package/roles/clarifier.md +42 -0
  483. package/roles/content-author.md +63 -0
  484. package/roles/designer.md +55 -0
  485. package/roles/executor.md +55 -0
  486. package/roles/learner.md +51 -0
  487. package/roles/planner.md +53 -0
  488. package/roles/researcher.md +43 -0
  489. package/roles/reviewer.md +54 -0
  490. package/roles/specifier.md +47 -0
  491. package/roles/verifier.md +71 -0
  492. package/schemas/README.md +24 -0
  493. package/schemas/accepted-learning.schema.json +20 -0
  494. package/schemas/author-artifact.schema.json +156 -0
  495. package/schemas/clarification.schema.json +19 -0
  496. package/schemas/design-artifact.schema.json +80 -0
  497. package/schemas/docs-claim.schema.json +18 -0
  498. package/schemas/export-manifest.schema.json +20 -0
  499. package/schemas/hook.schema.json +67 -0
  500. package/schemas/host-export-package.schema.json +18 -0
  501. package/schemas/implementation-plan.schema.json +19 -0
  502. package/schemas/proposed-learning.schema.json +19 -0
  503. package/schemas/research.schema.json +18 -0
  504. package/schemas/review.schema.json +29 -0
  505. package/schemas/run-manifest.schema.json +18 -0
  506. package/schemas/spec-challenge.schema.json +18 -0
  507. package/schemas/spec.schema.json +20 -0
  508. package/schemas/usage.schema.json +102 -0
  509. package/schemas/verification-proof.schema.json +29 -0
  510. package/schemas/wazir-manifest.schema.json +173 -0
  511. package/skills/README.md +40 -0
  512. package/skills/brainstorming/SKILL.md +77 -0
  513. package/skills/debugging/SKILL.md +50 -0
  514. package/skills/design/SKILL.md +61 -0
  515. package/skills/dispatching-parallel-agents/SKILL.md +128 -0
  516. package/skills/executing-plans/SKILL.md +70 -0
  517. package/skills/finishing-a-development-branch/SKILL.md +169 -0
  518. package/skills/humanize/SKILL.md +123 -0
  519. package/skills/init-pipeline/SKILL.md +124 -0
  520. package/skills/prepare-next/SKILL.md +20 -0
  521. package/skills/receiving-code-review/SKILL.md +123 -0
  522. package/skills/requesting-code-review/SKILL.md +105 -0
  523. package/skills/requesting-code-review/code-reviewer.md +108 -0
  524. package/skills/run-audit/SKILL.md +197 -0
  525. package/skills/scan-project/SKILL.md +41 -0
  526. package/skills/self-audit/SKILL.md +153 -0
  527. package/skills/subagent-driven-development/SKILL.md +154 -0
  528. package/skills/subagent-driven-development/code-quality-reviewer-prompt.md +26 -0
  529. package/skills/subagent-driven-development/implementer-prompt.md +102 -0
  530. package/skills/subagent-driven-development/spec-reviewer-prompt.md +61 -0
  531. package/skills/tdd/SKILL.md +23 -0
  532. package/skills/using-git-worktrees/SKILL.md +163 -0
  533. package/skills/using-skills/SKILL.md +95 -0
  534. package/skills/verification/SKILL.md +22 -0
  535. package/skills/wazir/SKILL.md +463 -0
  536. package/skills/writing-plans/SKILL.md +30 -0
  537. package/skills/writing-skills/SKILL.md +157 -0
  538. package/skills/writing-skills/anthropic-best-practices.md +122 -0
  539. package/skills/writing-skills/persuasion-principles.md +50 -0
  540. package/templates/README.md +20 -0
  541. package/templates/artifacts/README.md +10 -0
  542. package/templates/artifacts/accepted-learning.md +19 -0
  543. package/templates/artifacts/accepted-learning.template.json +12 -0
  544. package/templates/artifacts/author.md +74 -0
  545. package/templates/artifacts/author.template.json +19 -0
  546. package/templates/artifacts/clarification.md +21 -0
  547. package/templates/artifacts/clarification.template.json +12 -0
  548. package/templates/artifacts/execute-notes.md +19 -0
  549. package/templates/artifacts/implementation-plan.md +21 -0
  550. package/templates/artifacts/implementation-plan.template.json +11 -0
  551. package/templates/artifacts/learning-proposal.md +19 -0
  552. package/templates/artifacts/next-run-handoff.md +21 -0
  553. package/templates/artifacts/plan-review.md +19 -0
  554. package/templates/artifacts/proposed-learning.template.json +12 -0
  555. package/templates/artifacts/research.md +21 -0
  556. package/templates/artifacts/research.template.json +12 -0
  557. package/templates/artifacts/review-findings.md +19 -0
  558. package/templates/artifacts/review.template.json +11 -0
  559. package/templates/artifacts/run-manifest.template.json +8 -0
  560. package/templates/artifacts/spec-challenge.md +19 -0
  561. package/templates/artifacts/spec-challenge.template.json +11 -0
  562. package/templates/artifacts/spec.md +21 -0
  563. package/templates/artifacts/spec.template.json +12 -0
  564. package/templates/artifacts/verification-proof.md +19 -0
  565. package/templates/artifacts/verification-proof.template.json +11 -0
  566. package/templates/examples/accepted-learning.example.json +14 -0
  567. package/templates/examples/author.example.json +152 -0
  568. package/templates/examples/clarification.example.json +15 -0
  569. package/templates/examples/docs-claim.example.json +8 -0
  570. package/templates/examples/export-manifest.example.json +7 -0
  571. package/templates/examples/host-export-package.example.json +11 -0
  572. package/templates/examples/implementation-plan.example.json +17 -0
  573. package/templates/examples/proposed-learning.example.json +13 -0
  574. package/templates/examples/research.example.json +15 -0
  575. package/templates/examples/research.example.md +6 -0
  576. package/templates/examples/review.example.json +17 -0
  577. package/templates/examples/run-manifest.example.json +9 -0
  578. package/templates/examples/spec-challenge.example.json +14 -0
  579. package/templates/examples/spec.example.json +21 -0
  580. package/templates/examples/verification-proof.example.json +21 -0
  581. package/templates/examples/wazir-manifest.example.yaml +65 -0
  582. package/templates/task-definition-schema.md +99 -0
  583. package/tooling/README.md +20 -0
  584. package/tooling/src/adapters/context-mode.js +50 -0
  585. package/tooling/src/capture/command.js +376 -0
  586. package/tooling/src/capture/store.js +99 -0
  587. package/tooling/src/capture/usage.js +270 -0
  588. package/tooling/src/checks/branches.js +50 -0
  589. package/tooling/src/checks/brand-truth.js +110 -0
  590. package/tooling/src/checks/changelog.js +231 -0
  591. package/tooling/src/checks/command-registry.js +36 -0
  592. package/tooling/src/checks/commits.js +102 -0
  593. package/tooling/src/checks/docs-drift.js +103 -0
  594. package/tooling/src/checks/docs-truth.js +201 -0
  595. package/tooling/src/checks/runtime-surface.js +156 -0
  596. package/tooling/src/cli.js +116 -0
  597. package/tooling/src/command-options.js +56 -0
  598. package/tooling/src/commands/validate.js +320 -0
  599. package/tooling/src/doctor/command.js +91 -0
  600. package/tooling/src/export/command.js +77 -0
  601. package/tooling/src/export/compiler.js +498 -0
  602. package/tooling/src/guards/loop-cap-guard.js +52 -0
  603. package/tooling/src/guards/protected-path-write-guard.js +67 -0
  604. package/tooling/src/index/command.js +152 -0
  605. package/tooling/src/index/storage.js +1061 -0
  606. package/tooling/src/index/summarizers.js +261 -0
  607. package/tooling/src/loaders.js +18 -0
  608. package/tooling/src/project-root.js +22 -0
  609. package/tooling/src/recall/command.js +225 -0
  610. package/tooling/src/schema-validator.js +30 -0
  611. package/tooling/src/state-root.js +40 -0
  612. package/tooling/src/status/command.js +71 -0
  613. package/wazir.manifest.yaml +135 -0
  614. package/workflows/README.md +19 -0
  615. package/workflows/author.md +42 -0
  616. package/workflows/clarify.md +38 -0
  617. package/workflows/design-review.md +46 -0
  618. package/workflows/design.md +44 -0
  619. package/workflows/discover.md +37 -0
  620. package/workflows/execute.md +48 -0
  621. package/workflows/learn.md +38 -0
  622. package/workflows/plan-review.md +42 -0
  623. package/workflows/plan.md +39 -0
  624. package/workflows/prepare-next.md +37 -0
  625. package/workflows/review.md +40 -0
  626. package/workflows/run-audit.md +41 -0
  627. package/workflows/spec-challenge.md +41 -0
  628. package/workflows/specify.md +38 -0
  629. package/workflows/verify.md +37 -0
@@ -0,0 +1,640 @@
1
+ # Architecture Decision Records — Architecture Expertise Module
2
+
3
+ > Architecture Decision Records (ADRs) document significant architectural decisions with context, consequences, and status. They answer "why did we choose X?" months or years later. Without ADRs, teams redebate the same decisions, new team members don't understand constraints, and architectural drift goes unnoticed.
4
+
5
+ > **Category:** Decision
6
+ > **Complexity:** Simple
7
+ > **Applies when:** Any project making architectural decisions that will be questioned later — which is every project lasting more than 3 months
8
+
9
+ **Cross-references:** [architectural-thinking], [technology-selection], [build-vs-buy], [domain-driven-design]
10
+
11
+ ---
12
+
13
+ ## What This Is (and What It Isn't)
14
+
15
+ An Architecture Decision Record is a short document — typically one to two pages — that captures a single architectural decision: the context that made the decision necessary, the options that were considered, the decision that was made, and the consequences (both positive and negative) that are expected or observed. The format was introduced by Michael Nygard in his 2011 blog post "Documenting Architecture Decisions" at Cognitect, and has since become the de facto standard for lightweight architectural decision documentation across the industry. AWS, Google Cloud, Microsoft Azure, and the UK Government Digital Service (GDS) all formally recommend ADRs in their architecture guidance.
16
+
17
+ Nygard's original format is deliberately minimal. It has exactly five sections:
18
+
19
+ 1. **Title** — A short noun phrase. "ADR-007: Use PostgreSQL for the Orders Service," not "We should probably think about databases."
20
+ 2. **Status** — One of: Proposed, Accepted, Deprecated, Superseded. The status changes over time; the record itself does not. When a decision is reversed, the original ADR's status is updated to "Superseded by ADR-NNN" and a new ADR documents the reversal.
21
+ 3. **Context** — The forces at play. What problem are we facing? What constraints exist? What requirements drove this decision? This section is the most important and most often under-written. Context without specifics — "we need a scalable solution" — is useless. Context with specifics — "our projected write volume is 50k orders/day with 3x seasonal spikes, we have two engineers with PostgreSQL production experience and zero with MongoDB, and our query patterns require joins across 4 tables" — is the information that makes the decision intelligible six months later.
22
+ 4. **Decision** — The decision itself, stated in active voice. "We will use PostgreSQL 16 with pgBouncer connection pooling." Not "It was decided that..." — passive voice obscures accountability.
23
+ 5. **Consequences** — What happens because of this decision, both positive and negative. Good ADRs are honest about the negative consequences. "We accept that horizontal write scaling will require a sharding strategy if volume exceeds 50k writes/minute" is a consequence worth recording because it tells a future team member exactly when to revisit this decision.
24
+
25
+ This is what an ADR **is**: a decision record. It captures the reasoning at a specific point in time, under specific constraints, with specific information available.
26
+
27
+ This is what an ADR **is not**:
28
+
29
+ **ADRs are not architecture documentation.** They do not describe the system's structure, component interactions, or deployment topology. That is the job of C4 diagrams, arc42 templates, or whatever structural documentation the team maintains. An ADR answers "why did we choose X?" — it does not answer "how does the system work?" Conflating the two produces documents that are too long, too broad, and serve neither purpose well. Olaf Zimmermann, professor at OST and a leading voice on ADR methodology, calls the conflation anti-pattern "Blueprint in Disguise" — an ADR that reads like a design document because the author stuffed component responsibilities, collaboration diagrams, and implementation details into what should have been a focused decision record.
30
+
31
+ **ADRs are not requirements documents.** They do not specify what the system must do. They document a response to requirements and constraints that already exist. If the context section of your ADR reads like a requirements specification, the ADR is doing too much.
32
+
33
+ **ADRs are not meeting minutes.** They capture the outcome and rationale of a decision, not the discussion that led to it. The meeting discussion is ephemeral; the decision and its reasoning are durable. Teams that try to capture the full discussion in the ADR produce documents that nobody reads because they are 12 pages long and buried in conversational tangents.
34
+
35
+ **ADRs are not approval gates.** Some organizations turn ADRs into bureaucratic checkpoints where an Architecture Review Board must approve every decision before work can proceed. This is a misuse of the format. Nygard designed ADRs to be lightweight, written by the people closest to the decision, and reviewed by peers — not escalated through a hierarchy. When ADRs become approval gates, teams stop writing them because the overhead exceeds the value, and the decision history becomes invisible again.
36
+
37
+ The power of the ADR format is its constraint. Five sections. One decision per record. Short enough that a new team member can read the entire ADR log in an afternoon and understand why the system has the shape it does. The moment an ADR format grows beyond these bounds — adding sections for "stakeholder sign-off," "risk assessment matrices," "implementation timelines," and "rollback plans" — the format has been corrupted by process and will be abandoned by practitioners.
38
+
39
+ ---
40
+
41
+ ## When to Use It
42
+
43
+ ADRs are warranted whenever a decision meets the "would I explain this to a new team member?" test. If a new engineer joins the team in six months and would need to understand why this particular choice was made in order to work effectively with the system, that decision deserves an ADR. The test is practical, not theoretical: would the absence of this record cause confusion, wasted investigation, or a re-debate of a settled question?
44
+
45
+ **Any team larger than one person.** The moment a second person joins a project, the reasoning behind decisions can no longer live exclusively in one person's head. Even in a two-person team, decisions made by one engineer while the other was on vacation will be questioned when the second engineer encounters a surprising structural choice in the codebase. The ADR eliminates the "why did you do it this way?" conversation by providing the answer before the question is asked.
46
+
47
+ **Decisions that are hard to reverse.** Jeff Bezos's one-way door / two-way door framework applies directly. One-way doors — choices that are expensive or impossible to undo once made — deserve the 15 to 30 minutes it takes to write an ADR. The storage engine for a service, the inter-service communication protocol, the authentication mechanism, the data consistency model, the choice to adopt or reject a framework that will be woven through the entire codebase — these are one-way doors. Recording the reasoning is insurance against the future moment when someone asks "why didn't we use X instead?" and no one who was present for the original decision is still on the team.
48
+
49
+ **Technology choices.** Choosing between PostgreSQL and MongoDB, between REST and gRPC, between React and Vue, between AWS Lambda and ECS — each of these decisions has consequences that cascade through the system for years. An ADR captures not just what was chosen but what was rejected and why. This is critical: the rejected alternatives are often more informative than the chosen one, because they explain the constraints that shaped the decision.
50
+
51
+ **Pattern choices.** Adopting event sourcing, choosing CQRS, selecting a modular monolith over microservices, implementing the strangler fig pattern for a legacy migration — these are structural decisions that define how the system works at a fundamental level. Without an ADR, a new team member encountering event sourcing in the codebase has no way to know whether it was a deliberate, considered choice or an experiment that was never cleaned up.
52
+
53
+ **Organizational and process decisions with architectural impact.** The decision to adopt trunk-based development, to require feature flags for all new functionality, to use contract testing between services, or to adopt a specific branching strategy for database migrations — these are not code decisions, but they shape the architecture as surely as a technology choice does.
54
+
55
+ **Cross-team decisions.** Any decision that affects more than one team — a shared API contract, a common authentication service, a standardized event schema — requires an ADR because the reasoning must be accessible to all affected teams, not just the one that made the decision.
56
+
57
+ **Compliance and regulatory contexts.** In regulated industries (finance, healthcare, government), ADRs serve as an audit trail showing that architectural decisions were made deliberately, with consideration of alternatives and consequences. The UK Government Digital Service mandates ADRs for all technology decisions in government projects, and Google Cloud's Architecture Center recommends them as part of their Well-Architected Framework.
58
+
59
+ ---
60
+
61
+ ## When NOT to Use It
62
+
63
+ The failure modes of over-applying ADRs are as real and as damaging as the failure modes of not having them at all. An organization drowning in unread ADRs is not better off than one with no ADRs — it is worse off, because team members develop the habit of ignoring architectural documentation entirely, and that habit persists even when a genuinely important ADR is written.
64
+
65
+ **Trivial decisions that are easily reversible.** Choosing a logging library, selecting a date formatting utility, picking a folder structure for test files, naming a REST endpoint — these are two-way doors. They can be changed in hours or days with minimal impact. Writing an ADR for every minor library choice buries the important decisions in a sea of noise. If your ADR log has 200 entries and 180 of them document trivial choices, the 20 that matter are invisible. The signal-to-noise ratio of the ADR log is its most important property.
66
+
67
+ **When ADRs become bureaucratic overhead.** If writing an ADR requires scheduling a meeting with an Architecture Review Board, filling out a 15-field template, getting three levels of sign-off, and waiting two weeks for approval before any work can proceed, the ADR process has been weaponized against the people it was meant to help. Teams in this situation stop writing ADRs — or worse, they write performative ADRs that satisfy the process without capturing real reasoning. The ADR becomes a tax on productivity rather than an investment in clarity. Nygard designed ADRs to be written by the decision-maker in 15 to 30 minutes. Any process that inflates that to days or weeks has broken the format.
68
+
69
+ **When nobody reads them.** An ADR that is written and never read is waste. If the team's ADR log exists in a Confluence space that no one visits, or in a docs/ folder that is not part of the onboarding process, or in a GitHub wiki that is not linked from the README, the effort of writing ADRs is producing no value. Before adding more ADRs, fix the discoverability problem. Put the ADR log where people actually look: in the repository alongside the code, linked from the README, referenced in code comments at the point where the decision manifests in the implementation.
70
+
71
+ **When they are never updated.** A stale ADR is worse than no ADR. An ADR with status "Accepted" for a decision that was reversed six months ago actively misleads anyone who reads it. If the team does not have the discipline to update ADR statuses when decisions change — marking old ADRs as "Superseded by ADR-NNN" and writing new ADRs for the replacement decisions — the ADR log becomes a historical fiction that erodes trust in all architectural documentation. Teams that cannot maintain ADR status should not start an ADR practice until they solve the maintenance problem, typically by integrating ADR review into their regular retrospective or architectural review cadence.
72
+
73
+ **Solo projects with no expected team growth.** A single developer working on a personal project or a prototype with no expectation of collaboration does not need ADRs. The developer's own memory and the git history are sufficient. The ROI of ADRs comes from communication across people and across time — if there is only one person and no expectation of a future audience, the overhead of formal decision records exceeds the benefit. The exception is when the solo developer expects to hand the project off or to return to it after a long absence; in those cases, ADRs serve as messages to a future self who will have forgotten the original context.
74
+
75
+ **When the team is moving too fast for the format.** During a one-week hackathon, a two-week spike, or the first 48 hours of incident response, stopping to write formal ADRs is counterproductive. The decisions being made are either temporary (and will be revisited when the pressure eases) or urgent (and the time spent documenting them is time not spent resolving the incident). The right approach is to capture decisions informally during the crunch — a Slack message, a comment in the PR, a bullet in the incident timeline — and formalize them into ADRs afterward if they turn out to be durable.
76
+
77
+ **When ADRs substitute for conversation.** If a team uses ADRs as a way to avoid face-to-face (or video-call) discussion — writing a long ADR and posting it for asynchronous approval rather than having a 30-minute conversation with the affected parties — the format is being misused. ADRs document the outcome of a decision process; they do not replace the process itself. The conversation produces alignment and shared understanding; the ADR preserves it.
78
+
79
+ ---
80
+
81
+ ## How It Works
82
+
83
+ ### The ADR Format in Detail
84
+
85
+ The canonical ADR has five sections, each with a specific purpose and common mistakes:
86
+
87
+ **Title.** Format: "ADR-NNN: [Decision Statement]." The number provides a stable, unambiguous reference. Sequential numbering is conventional. The title should be a noun phrase that states the decision, not a question. "ADR-012: Use gRPC for inter-service communication" — not "ADR-012: What protocol should we use?" and not "ADR-012: Inter-service communication." The title must be specific enough that someone scanning the ADR index can determine whether this ADR is relevant to their question without opening it.
88
+
89
+ **Status.** The lifecycle of an ADR status:
90
+
91
+ - **Proposed** — The ADR has been written but not yet reviewed or accepted. In teams using a PR-based workflow, the ADR's PR being open is itself the "Proposed" status, making a separate status field redundant. The UK Government Digital Service recommends this approach: the PR status is the ADR status until the PR is merged.
92
+ - **Accepted** — The decision has been reviewed, discussed, and approved by the relevant stakeholders. The ADR is merged into the main branch. This is the default state for most ADRs in an active log.
93
+ - **Superseded** — The decision has been replaced by a newer decision. The superseded ADR's status is updated to "Superseded by ADR-NNN" with a link to the replacement. The old ADR is never deleted — it remains as historical context showing the evolution of the architecture.
94
+ - **Deprecated** — The decision is no longer relevant because the component, service, or system it applied to has been decommissioned. Deprecated ADRs remain in the log as historical records.
95
+ - **Amended** — Some teams add this status for minor updates to an accepted ADR that do not constitute a full reversal. Use this sparingly; if the amendment changes the core decision, it should be a new ADR that supersedes the original.
96
+
97
+ **Context.** This is the section that determines whether the ADR will be useful in six months or useless. Good context sections answer: What problem are we solving? What constraints exist (technical, organizational, budgetary, timeline)? What quality attributes are most important for this decision? What assumptions are we making? What information do we have and what information is missing?
98
+
99
+ The most common failure in context sections is vagueness. "We need a scalable, reliable database" is not context — it is a tautology. Every team wants scalability and reliability. Context that adds value is specific: "Our orders service processes 12k writes/minute at peak, growing 40% year-over-year. Our SLA requires 99.95% availability. The team has three years of PostgreSQL operational experience and no MongoDB experience. Our query patterns require multi-table joins for order reporting."
100
+
101
+ **Decision.** State the decision in one or two sentences, using active voice. "We will use..." or "We adopt..." — not "It was decided that..." The decision section should be the shortest section of the ADR. If it takes more than a paragraph to state the decision, the ADR is trying to capture multiple decisions and should be split.
102
+
103
+ **Consequences.** List both positive and negative consequences. This is where intellectual honesty matters most. Every architectural decision has downsides — constraints it introduces, capabilities it forecloses, risks it accepts. An ADR that lists only positive consequences is marketing, not documentation. The negative consequences are particularly valuable because they tell future teams what to watch for: "We accept that this choice limits our ability to X. If requirement Y changes, this decision should be revisited."
104
+
105
+ ### The MADR Variant
106
+
107
+ The Markdown Architectural Decision Records (MADR) format, maintained by the adr.github.io community, extends Nygard's original with additional optional sections while preserving the lightweight spirit. MADR provides four template variants — full, minimal, and bare versions of each — so teams can choose their level of detail.
108
+
109
+ MADR adds several sections beyond Nygard's original:
110
+
111
+ - **Considered Options** — A dedicated section listing all alternatives evaluated, with brief pros and cons for each. Nygard's format folds this into Context and Consequences; MADR gives it its own section for clarity.
112
+ - **Decision Outcome** — Combines the decision with a brief rationale statement.
113
+ - **Confirmation** — How the team will verify that the decision was implemented correctly. This is particularly useful for decisions that have measurable properties: "We will confirm this by running load tests showing p99 latency under 200ms with the chosen database."
114
+ - **Pros and Cons of the Options** — A structured comparison of each considered option.
115
+ - **More Information** — Links to relevant documents, diagrams, or external resources.
116
+
117
+ The choice between Nygard's original and MADR is itself an architectural decision (and a good candidate for the team's first ADR). Nygard's format is simpler and faster to write; MADR provides more structure for complex decisions with many alternatives. Teams that find themselves consistently adding "Alternatives Considered" sections to Nygard-format ADRs should switch to MADR. Teams that find MADR's sections mostly empty should simplify to Nygard's original.
118
+
119
+ ### The ADR Lifecycle
120
+
121
+ An ADR is written at decision time — not before (when the decision is still being discussed) and not after (when the context has faded from memory). The worst ADRs are retroactive: written weeks or months after the decision was made, they inevitably omit the constraints and alternatives that were vivid at decision time but have since been forgotten.
122
+
123
+ The lifecycle follows this pattern:
124
+
125
+ 1. **A decision needs to be made.** Someone on the team identifies that a choice is coming that will be difficult to reverse and will affect the system's structure or quality attributes.
126
+ 2. **Draft the ADR.** The person closest to the decision writes the first draft. This should take 15 to 30 minutes. If it takes longer, the ADR is either too detailed or the decision is not yet well enough understood to document.
127
+ 3. **Review.** The ADR is reviewed by the people who will be affected by the decision. In a PR-based workflow, this is a pull request with the ADR as the only file. Reviewers should focus on: Is the context complete and accurate? Are the alternatives reasonable? Are the consequences honest? Is anything important missing?
128
+ 4. **Accept or revise.** After review, the ADR is either accepted (merged) or revised based on feedback. If the review surfaces a fundamentally different alternative, the decision may need more investigation before the ADR can be accepted.
129
+ 5. **Implement.** The decision is implemented in the codebase. Where possible, link the ADR to the code: a comment at the relevant architectural boundary that says "See ADR-012 for rationale" makes the decision discoverable from the code, not just from the ADR index.
130
+ 6. **Review periodically.** At regular intervals (monthly for fast-moving projects, quarterly for stable ones), the team scans the ADR log and asks: Which ADRs are still valid? Which decisions were made in a context that no longer applies? Which ADRs should be superseded?
131
+
132
+ ### Linking ADRs to Code
133
+
134
+ An ADR that exists only in a docs/ folder is half as valuable as one that is also referenced from the code it governs. When a developer encounters a surprising architectural choice in the codebase — "Why is this service using gRPC when everything else uses REST?" — the answer should be discoverable from the code itself, not from a separate search through a documentation repository.
135
+
136
+ Effective linking strategies:
137
+
138
+ - **Code comments at architectural boundaries.** A comment at the top of a gRPC service definition: `// Architecture: gRPC chosen for inter-service communication. See docs/adr/0012-use-grpc-for-inter-service-communication.md`
139
+ - **README references.** The service's README links to the ADRs that govern its major architectural choices.
140
+ - **Commit messages.** The commit that implements an architectural decision references the ADR: `feat(orders): implement PostgreSQL storage layer (ADR-007)`
141
+ - **PR descriptions.** The pull request that implements the decision links to the ADR and summarizes the key consequences.
142
+
143
+ ### The "Would I Explain This?" Test
144
+
145
+ The simplest heuristic for whether a decision warrants an ADR: imagine a competent new team member joining in six months. Would you need to explain this decision to them? Would the explanation take more than two sentences? Would the explanation involve context that is not obvious from the code itself?
146
+
147
+ If the answer to all three is yes, write an ADR. If the answer to any is no, the decision probably does not need one. A decision that is obvious from the code ("we use TypeScript because the project is a TypeScript project") does not need an ADR. A decision that is surprising or counterintuitive ("we use MongoDB for the orders service even though we use PostgreSQL everywhere else, because...") absolutely does.
148
+
149
+ ---
150
+
151
+ ## Trade-Offs Matrix
152
+
153
+ | You Get | You Pay |
154
+ |---------|---------|
155
+ | **Decision history** — future team members can read the full reasoning behind every significant architectural choice without asking anyone | **Writing discipline** — someone must spend 15–30 minutes writing each ADR at decision time, which feels like overhead during delivery pressure |
156
+ | **Onboarding acceleration** — new engineers understand the system's shape and rationale in days instead of months of tribal-knowledge absorption | **Maintenance burden** — ADR statuses must be updated when decisions change; stale ADRs actively mislead readers |
157
+ | **Reduced decision re-litigation** — teams stop debating settled questions because the reasoning and constraints are documented and linkable | **False authority risk** — an outdated ADR can block a valid new approach if the team treats accepted ADRs as permanent mandates rather than context-dependent decisions |
158
+ | **Explicit trade-off awareness** — the consequences section forces the decision-maker to articulate what they are giving up, not just what they are gaining | **Honesty requirement** — documenting negative consequences requires intellectual honesty that some organizational cultures discourage |
159
+ | **Audit trail for regulated environments** — compliance and regulatory reviews can verify that architectural decisions were deliberate and considered | **Process overhead risk** — in bureaucratic organizations, ADRs can be co-opted as approval gates, adding weeks of delay to decisions that should take hours |
160
+ | **Cross-team alignment** — shared ADRs ensure that teams affected by a decision understand why it was made and what constraints they must respect | **Coordination cost** — cross-team ADRs require review from multiple teams, which takes longer and introduces scheduling friction |
161
+ | **Architectural coherence over time** — the ADR log reveals patterns, trends, and drift in the system's evolution that would be invisible without records | **Index maintenance** — the ADR log must be indexed, organized, and searchable; an unsorted pile of ADR files provides minimal navigability |
162
+ | **Risk documentation** — the consequences section identifies risks that the team is knowingly accepting, enabling proactive monitoring | **Premature specificity risk** — writing an ADR too early can lock the team into a decision before sufficient information is available |
163
+ | **Conflict resolution** — disputes about architectural direction can be resolved by examining the recorded context and reasoning | **Context decay** — the context that made a decision correct changes over time; the ADR captures a snapshot, not a living evaluation |
164
+ | **Git-native workflow** — ADRs stored as markdown in the repository are versioned, diffable, reviewable in PRs, and co-located with code | **Repository clutter** — large ADR logs add files to the repository that are not code, which some teams resist |
165
+
166
+ ---
167
+
168
+ ## Evolution Path
169
+
170
+ ### Stage 1: First ADR (Day 1)
171
+
172
+ The first ADR a team writes should be "ADR-001: Use Architecture Decision Records." This is not a joke — it is a pattern recommended by the MADR documentation, the AWS Architecture Blog, and the Google Cloud Architecture Center. The first ADR documents the decision to use ADRs: what format the team will follow, where the ADRs will be stored, and what criteria will be used to determine whether a decision warrants an ADR. This bootstrapping ADR sets the norms for all subsequent records.
173
+
174
+ At this stage, keep the format minimal. Use Nygard's original five sections. Store ADRs in a `docs/adr/` or `docs/decisions/` directory in the repository. Number them sequentially. Do not install any tooling yet — a markdown file is sufficient.
175
+
176
+ ### Stage 2: Establish Rhythm (Weeks 1–4)
177
+
178
+ The first month is about building the habit. Every significant decision gets an ADR, reviewed in a PR. The team discusses: Was this decision worth recording? Was the ADR too long or too short? Did the context section capture enough information?
179
+
180
+ Common adjustments at this stage:
181
+ - Teams discover that Nygard's format needs an explicit "Alternatives Considered" section and switch to MADR.
182
+ - Teams realize they are writing too many ADRs for trivial decisions and tighten the criteria.
183
+ - Teams find that no one reads the ADRs and add links from the README and from code comments.
184
+
185
+ ### Stage 3: Integrate with Workflow (Months 2–3)
186
+
187
+ ADRs become part of the standard engineering workflow:
188
+ - Every PR that implements a significant architectural change includes or references an ADR.
189
+ - The onboarding checklist includes "read the ADR log."
190
+ - The sprint retrospective includes a standing item: "Are there any recent decisions that should have been ADRs?"
191
+ - The team adopts tooling if the manual approach becomes friction: `adr-tools` CLI for generating ADR files from templates, or Log4brains for publishing ADRs as a searchable static website.
192
+
193
+ ### Stage 4: Periodic Review (Quarterly)
194
+
195
+ The team schedules a quarterly ADR review — a 30-minute meeting where the team scans the ADR log and asks:
196
+ - Which accepted ADRs are still valid?
197
+ - Which ADRs were made in a context that has changed materially?
198
+ - Are there any implicit decisions (made without ADRs) that should be retroactively documented?
199
+ - Are any ADR statuses stale (decision was reversed but the ADR still says "Accepted")?
200
+
201
+ AWS's prescriptive guidance recommends reviewing each ADR one month after acceptance to compare the documented expectations with actual practice — a feedback loop that improves both the quality of future ADRs and the team's decision-making.
202
+
203
+ ### Stage 5: Cross-Team ADR Practice (6+ months)
204
+
205
+ For organizations with multiple teams, establish a shared ADR repository or index for decisions that affect more than one team. Platform decisions, shared API contracts, authentication standards, and data governance policies belong in a cross-team ADR log that all affected teams can discover and reference.
206
+
207
+ At this stage, consider Log4brains or a similar tool that aggregates ADRs from multiple repositories into a single searchable interface. The UK Government Digital Service uses a centralized ADR index across all government technology projects, enabling cross-team discovery of decisions and rationale.
208
+
209
+ ---
210
+
211
+ ## Failure Modes
212
+
213
+ ### The ADR Graveyard
214
+
215
+ The most common failure mode. The team writes ADRs enthusiastically for the first few months, then stops. The existing ADRs are never updated. New decisions are not recorded. The ADR log becomes a historical artifact from a specific period of the project's life, not a living record of its architectural evolution.
216
+
217
+ Root causes: lack of habit reinforcement (no retrospective item, no PR checklist item, no onboarding reference), the departure of the team member who championed ADRs, or the perception that ADRs are "extra work" rather than a core engineering practice.
218
+
219
+ The diagnostic signal: the most recent ADR is more than three months old, but significant architectural decisions have been made in that period.
220
+
221
+ The intervention: integrate ADR writing into existing workflows rather than treating it as a separate activity. Add "Does this PR need an ADR?" to the PR template. Add "Review the ADR log" to the quarterly retrospective. Make the ADR log the first thing new team members read during onboarding. The habit survives when it is embedded in processes the team already follows, not when it depends on individual motivation.
222
+
223
+ ### Over-Documentation (The Mega-ADR)
224
+
225
+ The failure mode where ADRs become 8-page documents covering component responsibilities, sequence diagrams, deployment procedures, and implementation timelines. Zimmermann calls this the "Mega-ADR" anti-pattern: an ADR that has been inflated into a design document because the author could not resist documenting everything they knew about the topic.
226
+
227
+ The consequence: no one reads them. A developer looking for the rationale behind a specific decision does not want to wade through 8 pages of tangential implementation details. The team stops writing ADRs because each one takes half a day, and the format is abandoned.
228
+
229
+ The fix: enforce a length limit. A good ADR fits on one printed page — roughly 400 to 600 words. If the ADR is longer than that, it is either trying to capture multiple decisions (split it) or mixing decision documentation with design documentation (move the design content to a separate document and link to it from the ADR). The ADR should capture only what someone needs to understand the decision and its rationale, not everything the author knows about the topic.
230
+
231
+ ### Missing Context
232
+
233
+ The failure mode where the ADR records what was decided but not why. "We will use PostgreSQL" — without any explanation of the constraints, requirements, alternatives considered, or consequences accepted — is a record that adds almost no value. Six months later, a new team member reading this ADR knows what was chosen but has no basis for evaluating whether the decision is still appropriate, what constraints it was optimizing for, or what alternatives were rejected and why.
234
+
235
+ This failure mode is most common in teams that treat ADRs as a compliance checkbox ("we wrote the ADR") rather than a communication tool ("we documented our reasoning so future us can evaluate it"). The fix: during ADR review, the reviewer's primary question should be "Would I understand this decision if I joined the team tomorrow with no prior context?" If the answer is no, the context section needs work.
236
+
237
+ ### No Status Updates
238
+
239
+ The failure mode where decisions are reversed or superseded in practice but the ADR log still shows them as "Accepted." A new team member reads ADR-005 ("Use MongoDB for the user service"), sees it is Accepted, and builds a new feature accordingly — only to discover that the team migrated to PostgreSQL three months ago and ADR-005 should have been marked "Superseded by ADR-023."
240
+
241
+ This failure mode erodes trust in the entire ADR log. Once a team member discovers that ADR statuses are unreliable, they stop trusting any ADR without verbal confirmation from a senior engineer — which defeats the purpose of having ADRs at all.
242
+
243
+ The fix: treat ADR status updates as a required part of the architectural change process. When a new ADR supersedes an old one, the PR that introduces the new ADR must also update the old ADR's status. Automate this where possible: a CI check that verifies all "Superseded" links are bidirectional (the old ADR links forward to the new one, and the new one links back to the old one).
244
+
245
+ ### Blueprint in Disguise
246
+
247
+ Zimmermann's term for an ADR whose writing style resembles a design specification or a policy document rather than a decision record. The telltale signs: imperative language ("teams SHALL use..."), excessive implementation detail ("the service MUST implement the following interface..."), multiple embedded diagrams, and section headers that look like a design document table of contents rather than the five ADR sections.
248
+
249
+ The root cause is usually organizational: someone in a governance role has been told to "use ADRs" and has reshaped the format to serve their existing design-review or policy-enforcement process. The result is a document that developers perceive as bureaucratic overhead rather than useful documentation.
250
+
251
+ The fix: return to Nygard's original format. Five sections, one decision, one page. If the organization needs design documents or policy documents, those are separate document types with separate templates. An ADR is not a substitute for either.
252
+
253
+ ### Premature ADR
254
+
255
+ Writing an ADR before the decision has been sufficiently explored. A team writes "ADR-015: Use Kafka for event streaming," accepts it, and begins implementation — only to discover during implementation that their actual message volume does not justify Kafka's operational complexity and a simpler solution like Redis Streams would suffice. The premature ADR must now be superseded, and the implementation work must be partially redone.
256
+
257
+ The fix: use the "Proposed" status (or draft PR) for decisions that are still being investigated. Do not accept an ADR until the decision has been validated through spikes, prototypes, or sufficient analysis. The ADR should document a decision that has been made, not a decision that is being considered.
258
+
259
+ ---
260
+
261
+ ## Technology Landscape
262
+
263
+ ### adr-tools (CLI)
264
+
265
+ The original ADR management tool, created by Nat Pryce. A bash-based CLI that automates ADR file creation, numbering, and linking. Commands: `adr new "Use PostgreSQL for orders"` creates a new ADR file from a template with the next sequential number. `adr list` shows all ADRs. `adr link` creates relationships between ADRs. `adr generate toc` generates a table of contents.
266
+
267
+ Strengths: extremely simple, no dependencies beyond bash, follows Nygard's format by default. Limitations: the original repository has been archived, and the tool does not support MADR format out of the box. Several community forks maintain compatibility and add features. Best suited for teams that want the simplest possible tooling with no external dependencies.
268
+
269
+ ### Log4brains
270
+
271
+ A more comprehensive ADR management and publication tool. Log4brains provides a CLI for creating ADRs from templates (MADR by default), a local preview server, and a static site generator that publishes the ADR log as a searchable, navigable website. It supports multiple ADR repositories (for multi-team setups) and integrates with CI/CD pipelines for automated publishing.
272
+
273
+ Strengths: generates a browsable static site from the ADR log, supports MADR and custom templates, supports multi-package monorepo setups, active maintenance. Limitations: requires Node.js, adds a build step to the documentation pipeline, and some teams report performance issues with large ADR logs (50+ records). Best suited for teams that want a published, searchable ADR knowledge base.
274
+
275
+ ### ADR in Plain Markdown Files
276
+
277
+ The zero-tooling approach: create a `docs/adr/` directory, number files manually (`0001-use-adrs.md`, `0002-choose-postgresql.md`), and maintain a `README.md` in the directory as a table of contents. This is the approach recommended by the UK Government Digital Service and used by many open-source projects.
278
+
279
+ Strengths: no tooling dependencies, works with any editor, fully portable, versioned by git, reviewable in PRs. Limitations: manual numbering requires coordination in large teams, no automated table of contents, no search beyond git grep. Best suited for small to medium teams that value simplicity over tooling features.
280
+
281
+ ### GitHub PR-Based ADR Workflow
282
+
283
+ A workflow pattern (not a tool) where the ADR lifecycle is mapped directly to GitHub's pull request workflow. A new ADR is submitted as a PR. The PR review process serves as the decision review. The PR being open means the ADR is "Proposed." The PR being merged means the ADR is "Accepted." This eliminates the need for a separate status field in the ADR file — the git history is the status history.
284
+
285
+ The GDS way documents this approach explicitly: "When the team agrees, the pull request is merged, and the ADR is now 'accepted.' If a decision is reversed later, you write a new ADR, rather than editing the old one."
286
+
287
+ Strengths: uses existing git workflow, provides built-in review and approval mechanisms, creates an audit trail of who approved each decision and when. Limitations: does not handle "Superseded" status as cleanly (requires a separate commit to update the old ADR), and the decision discussion is spread across PR comments rather than consolidated in a single document.
288
+
289
+ ### Notion/Confluence Templates
290
+
291
+ Enterprise teams often maintain ADRs in Notion or Confluence rather than in the code repository. Templates are available for both platforms that implement Nygard's or MADR's format as structured pages with metadata fields for status, date, and author.
292
+
293
+ Strengths: familiar to non-engineering stakeholders, supports rich formatting and embedded diagrams, searchable within the organization's existing knowledge management system. Limitations: ADRs are decoupled from the codebase (not versioned with code, not reviewable in PRs), discoverability depends on the organization's wiki discipline, and the temptation to add process (approval workflows, stakeholder sign-off fields) is stronger in enterprise wiki platforms. Teams using this approach should establish a clear link from the codebase to the wiki — at minimum, a `docs/adr/README.md` in the repository that links to the Confluence space.
294
+
295
+ ### Structurizr
296
+
297
+ Simon Brown's architecture-as-code tool supports embedding ADR references directly in the architecture model. ADRs can be defined alongside C4 model definitions in the Structurizr DSL, creating a direct link between structural diagrams and the decisions that shaped them. This is the tightest integration between architectural documentation and decision records currently available.
298
+
299
+ ### ADR Manager (VS Code Extension)
300
+
301
+ A Visual Studio Code extension that provides a graphical interface for creating, browsing, and managing ADRs within the editor. Supports MADR format and integrates with the file explorer for navigation. Useful for teams where developers prefer GUI tooling over CLI.
302
+
303
+ ---
304
+
305
+ ## Decision Tree
306
+
307
+ ```
308
+ START
309
+ |
310
+ v
311
+ Is this an architectural decision (affects structure, quality attributes,
312
+ technology choices, or is difficult to reverse)?
313
+ |
314
+ +-- NO --> Do not write an ADR.
315
+ | Document in commit message, PR description, or code comment.
316
+ |
317
+ +-- YES --> Is the team using ADRs already?
318
+ |
319
+ +-- NO --> Write ADR-001: "Use Architecture Decision Records."
320
+ | Choose format (Nygard or MADR).
321
+ | Choose storage location (docs/adr/ in repo recommended).
322
+ | Then write the ADR for the current decision as ADR-002.
323
+ |
324
+ +-- YES --> Has this decision been sufficiently explored?
325
+ |
326
+ +-- NO --> Is a spike/prototype needed to reduce uncertainty?
327
+ | |
328
+ | +-- YES --> Run the spike first. Write the ADR
329
+ | | after the spike produces evidence.
330
+ | |
331
+ | +-- NO --> Draft the ADR as "Proposed."
332
+ | Submit as a draft PR for discussion.
333
+ | Accept after the team aligns.
334
+ |
335
+ +-- YES --> Write the ADR now.
336
+ |
337
+ v
338
+ Does this decision affect more than one team?
339
+ |
340
+ +-- YES --> Include reviewers from all affected
341
+ | teams. Store in a shared location
342
+ | or cross-reference from team repos.
343
+ |
344
+ +-- NO --> Review within the team.
345
+ |
346
+ v
347
+ Does this decision supersede an existing ADR?
348
+ |
349
+ +-- YES --> Update the old ADR's status to
350
+ | "Superseded by ADR-NNN."
351
+ | Link from the new ADR back to
352
+ | the old one for history.
353
+ |
354
+ +-- NO --> Submit the ADR PR.
355
+ Merge when approved.
356
+ Link from code where relevant.
357
+ ```
358
+
359
+ **Concrete thresholds for when to write an ADR:**
360
+ - Any technology choice that the team will live with for more than 6 months.
361
+ - Any decision that affects the system's data model, service boundaries, or inter-service communication.
362
+ - Any decision where two or more viable alternatives were seriously considered.
363
+ - Any decision that a new team member would find surprising or counterintuitive.
364
+ - Any decision with compliance or regulatory implications.
365
+ - Any decision that affects more than one team's codebase or workflow.
366
+
367
+ ---
368
+
369
+ ## Implementation Sketch
370
+
371
+ ### ADR Folder Structure
372
+
373
+ ```
374
+ project-root/
375
+ docs/
376
+ adr/
377
+ README.md # Index of all ADRs with links and status
378
+ 0001-use-architecture-decision-records.md
379
+ 0002-use-postgresql-for-orders-service.md
380
+ 0003-adopt-grpc-for-inter-service-communication.md
381
+ 0004-use-event-sourcing-for-audit-trail.md
382
+ 0005-choose-react-for-frontend.md
383
+ 0006-deprecate-mongodb-migrate-to-postgresql.md # Supersedes ADR-0002 context
384
+ templates/
385
+ adr-template-nygard.md # Nygard's original 5-section format
386
+ adr-template-madr.md # MADR full template
387
+ ```
388
+
389
+ ### ADR Index (README.md)
390
+
391
+ ```markdown
392
+ # Architecture Decision Records
393
+
394
+ | ADR | Title | Status | Date |
395
+ |-----|-------|--------|------|
396
+ | [ADR-0001](0001-use-architecture-decision-records.md) | Use Architecture Decision Records | Accepted | 2026-01-15 |
397
+ | [ADR-0002](0002-use-postgresql-for-orders-service.md) | Use PostgreSQL for Orders Service | Accepted | 2026-01-22 |
398
+ | [ADR-0003](0003-adopt-grpc-for-inter-service-communication.md) | Adopt gRPC for Inter-Service Communication | Accepted | 2026-02-03 |
399
+ | [ADR-0004](0004-use-event-sourcing-for-audit-trail.md) | Use Event Sourcing for Audit Trail | Proposed | 2026-02-10 |
400
+ | [ADR-0005](0005-choose-react-for-frontend.md) | Choose React for Frontend | Accepted | 2026-02-17 |
401
+ | [ADR-0006](0006-deprecate-mongodb-migrate-to-postgresql.md) | Deprecate MongoDB, Migrate to PostgreSQL | Accepted | 2026-03-01 |
402
+ ```
403
+
404
+ ### Example ADR: Choosing PostgreSQL over MongoDB (Nygard Format)
405
+
406
+ ```markdown
407
+ # ADR-0002: Use PostgreSQL for Orders Service
408
+
409
+ ## Status
410
+ Accepted — 2026-01-22
411
+
412
+ ## Context
413
+ We are building an orders service for our e-commerce platform. The service must handle
414
+ order lifecycle management including creation, payment processing, fulfillment tracking,
415
+ and returns. Our requirements:
416
+
417
+ - **Consistency:** Order creation involves multiple entities (order header, line items,
418
+ payment record, inventory reservation). These must be created atomically — a partially
419
+ created order is a data integrity bug that causes customer-visible errors and accounting
420
+ discrepancies.
421
+ - **Query patterns:** The operations team requires reporting queries that join orders with
422
+ line items, payments, and customer records. These queries run in real-time dashboards
423
+ and are not suitable for eventual-consistency models.
424
+ - **Write volume:** Projected peak is 2,000 orders/minute during seasonal sales events.
425
+ Expected steady-state is 200 orders/minute. Growth projection is 40% year-over-year.
426
+ - **Team expertise:** Three of four backend engineers have 3+ years of PostgreSQL
427
+ production experience. No one on the team has operated MongoDB or DynamoDB in production.
428
+ - **Existing infrastructure:** We already run PostgreSQL 16 for the customer service and
429
+ product catalog service. Operational tooling (monitoring, backups, failover) is
430
+ established.
431
+
432
+ We evaluated three options: PostgreSQL, MongoDB, and DynamoDB.
433
+
434
+ ## Decision
435
+ We will use PostgreSQL 16 for the orders service, with pgBouncer for connection pooling
436
+ and streaming replication to a read replica for reporting queries.
437
+
438
+ ## Consequences
439
+ **Positive:**
440
+ - ACID transactions across order creation eliminate an entire class of partial-state bugs
441
+ that would require application-level compensation logic with eventually-consistent stores.
442
+ - Complex reporting queries with multi-table joins are straightforward in SQL and perform
443
+ well with proper indexing.
444
+ - No new operational skills required — the team can deploy, monitor, and troubleshoot
445
+ PostgreSQL immediately using existing tooling and knowledge.
446
+ - Infrastructure reuse — shared PostgreSQL operational playbooks, monitoring dashboards,
447
+ and backup procedures across services.
448
+
449
+ **Negative:**
450
+ - Horizontal write scaling is limited. If order volume exceeds approximately 50,000
451
+ writes/minute, we will need a sharding strategy (Citus, application-level sharding,
452
+ or vertical partitioning). At current growth rates, this threshold is approximately
453
+ 3 years away. **Action:** Revisit this ADR when write volume reaches 20,000/minute.
454
+ - Schema rigidity. Schema changes require coordinated migrations across the service.
455
+ MongoDB's flexible schema would allow faster iteration on the order data model. We
456
+ accept this trade-off because our order schema has been stable for 18 months in the
457
+ legacy system and is unlikely to change frequently.
458
+ - Vendor lock-in to relational data modeling. If future requirements demand graph
459
+ traversal, time-series, or document-oriented access patterns for order data, PostgreSQL
460
+ may not be the optimal choice. We mitigate this through a repository abstraction layer
461
+ that isolates storage-specific logic from business logic.
462
+
463
+ ## Alternatives Considered
464
+ - **MongoDB:** Flexible schema and horizontal scaling via sharding are attractive. Rejected
465
+ because: (1) multi-document transactions, while supported since MongoDB 4.0, add
466
+ complexity and performance overhead that our consistency requirements would trigger on
467
+ every write; (2) our query patterns require joins that MongoDB handles less efficiently
468
+ than PostgreSQL; (3) no team member has MongoDB production operations experience, adding
469
+ operational risk during launch.
470
+ - **DynamoDB:** Excellent horizontal scaling and managed operations. Rejected because:
471
+ (1) single-table design requires significant data modeling investment and couples our
472
+ query patterns permanently to DynamoDB's access patterns (one-way door); (2) complex
473
+ reporting queries require export to a secondary analytics store, adding infrastructure
474
+ complexity; (3) cost model is unpredictable for our bursty write patterns during
475
+ seasonal sales.
476
+ ```
477
+
478
+ ### Example ADR: Superseding a Previous Decision
479
+
480
+ ```markdown
481
+ # ADR-0006: Deprecate MongoDB, Migrate User Service to PostgreSQL
482
+
483
+ ## Status
484
+ Accepted — 2026-03-01
485
+ Supersedes: [ADR-0009](0009-use-mongodb-for-user-service.md)
486
+
487
+ ## Context
488
+ In ADR-0009 (accepted 2025-06-15), we chose MongoDB for the user service because user
489
+ profiles had a highly variable schema — different user types (individual, business,
490
+ enterprise) had different field sets, and the product team was iterating rapidly on
491
+ profile features.
492
+
493
+ Since that decision, three things have changed:
494
+ 1. The user profile schema has stabilized. The product team completed the profile feature
495
+ set in Q3 2025 and has made no schema changes in 4 months.
496
+ 2. We have encountered recurring issues with MongoDB's multi-document transactions when
497
+ updating user profiles and their associated preferences atomically. Three production
498
+ incidents in Q4 2025 were traced to partial updates under transaction retry storms.
499
+ 3. Operational burden: our team now maintains two database technologies (PostgreSQL for
500
+ 4 services, MongoDB for 1 service). The MongoDB instance requires separate monitoring
501
+ dashboards, backup procedures, and upgrade playbooks. Engineering time spent on
502
+ MongoDB operations exceeds the time saved by its flexible schema.
503
+
504
+ ## Decision
505
+ We will migrate the user service from MongoDB to PostgreSQL. User profile variability
506
+ will be handled using PostgreSQL's JSONB column for type-specific fields, with common
507
+ fields in typed columns.
508
+
509
+ ## Consequences
510
+ **Positive:**
511
+ - Single database technology across all services reduces operational overhead.
512
+ - ACID transactions eliminate the partial-update bugs we experienced with MongoDB.
513
+ - JSONB provides sufficient schema flexibility for the remaining variable fields.
514
+
515
+ **Negative:**
516
+ - Migration effort estimated at 3 weeks of engineering time including data migration,
517
+ query rewriting, and testing.
518
+ - JSONB queries are less performant than MongoDB's native document queries for deeply
519
+ nested field access. We accept this because our profile queries access top-level
520
+ fields only.
521
+ ```
522
+
523
+ ### ADR Template (Nygard Original)
524
+
525
+ ```markdown
526
+ # ADR-NNNN: [Short title of the decision]
527
+
528
+ ## Status
529
+ [Proposed | Accepted | Deprecated | Superseded by [ADR-NNNN](link)]
530
+
531
+ ## Context
532
+ [Describe the context and problem. What forces are at play? What constraints exist?
533
+ What requirements drove this decision? Be specific — include numbers, team composition,
534
+ timeline, and technical constraints. Vague context produces useless ADRs.]
535
+
536
+ ## Decision
537
+ [State the decision in active voice. "We will..." or "We adopt..." Keep this short —
538
+ one to three sentences.]
539
+
540
+ ## Consequences
541
+ [List both positive and negative consequences. Be honest about the downsides.
542
+ Include triggers for revisiting this decision: "If X changes, revisit this ADR."]
543
+ ```
544
+
545
+ ### ADR Template (MADR)
546
+
547
+ ```markdown
548
+ # [Short title of solved problem and solution]
549
+
550
+ ## Status
551
+ [Proposed | Accepted | Deprecated | Superseded by [ADR-NNNN](link)]
552
+
553
+ Date: [YYYY-MM-DD]
554
+
555
+ ## Context and Problem Statement
556
+ [Describe the context and problem in 2-5 sentences. What is forcing this decision?]
557
+
558
+ ## Decision Drivers
559
+ - [Driver 1: e.g., required consistency model]
560
+ - [Driver 2: e.g., team expertise]
561
+ - [Driver 3: e.g., operational constraints]
562
+
563
+ ## Considered Options
564
+ 1. [Option 1]
565
+ 2. [Option 2]
566
+ 3. [Option 3]
567
+
568
+ ## Decision Outcome
569
+ Chosen option: "[Option N]", because [justification in one sentence].
570
+
571
+ ### Confirmation
572
+ [How will you verify the decision was implemented correctly? Optional but recommended
573
+ for measurable decisions.]
574
+
575
+ ### Consequences
576
+ **Good:**
577
+ - [Positive consequence 1]
578
+ - [Positive consequence 2]
579
+
580
+ **Bad:**
581
+ - [Negative consequence 1]
582
+ - [Negative consequence 2]
583
+
584
+ **Neutral:**
585
+ - [Side effect that is neither clearly good nor bad]
586
+
587
+ ## Pros and Cons of the Options
588
+
589
+ ### [Option 1]
590
+ - Good, because [argument]
591
+ - Bad, because [argument]
592
+
593
+ ### [Option 2]
594
+ - Good, because [argument]
595
+ - Bad, because [argument]
596
+
597
+ ### [Option 3]
598
+ - Good, because [argument]
599
+ - Bad, because [argument]
600
+
601
+ ## More Information
602
+ [Links to related ADRs, design documents, spike results, or external resources.]
603
+ ```
604
+
605
+ ---
606
+
607
+ ## Summary
608
+
609
+ Architecture Decision Records are the simplest high-leverage practice in software architecture. They require no tooling, no process changes, and no organizational buy-in beyond the team itself. A markdown file with five sections — Title, Status, Context, Decision, Consequences — written in 15 to 30 minutes at decision time, prevents hours of re-debate, confusion, and architectural drift over the following months and years.
610
+
611
+ The minimum viable ADR practice is:
612
+ 1. Create a `docs/adr/` directory in the repository.
613
+ 2. Write ADR-001: "Use Architecture Decision Records" — documenting the format and criteria.
614
+ 3. Write an ADR for every decision that is difficult to reverse and would need to be explained to a new team member.
615
+ 4. Review ADRs in PRs. Link accepted ADRs from the code they govern.
616
+ 5. Review the ADR log quarterly. Update statuses. Write retroactive ADRs for decisions that were made without them.
617
+
618
+ The failure modes are symmetric: too few ADRs (undocumented decisions, tribal knowledge, re-litigation) and too many ADRs (noise, bureaucracy, abandonment). The sweet spot is a log where every entry answers a question that someone will actually ask.
619
+
620
+ Michael Nygard's original insight remains the foundation: "If you do a Google search, you'll find that most software architecture documentation discusses the structure or the behavior of the system, but rarely discusses why particular solutions were chosen over other possible alternatives. The short answer of how to document architecture decisions is: keep a collection of short text files, one per decision."
621
+
622
+ ---
623
+
624
+ *Researched: 2026-03-08 | Sources:*
625
+ - *[Documenting Architecture Decisions — Michael Nygard / Cognitect](https://www.cognitect.com/blog/2011/11/15/documenting-architecture-decisions)*
626
+ - *[Master ADRs: Best Practices for Effective Decision-Making — AWS Architecture Blog](https://aws.amazon.com/blogs/architecture/master-architecture-decision-records-adrs-best-practices-for-effective-decision-making/)*
627
+ - *[Best Practices — AWS Prescriptive Guidance](https://docs.aws.amazon.com/prescriptive-guidance/latest/architectural-decision-records/best-practices.html)*
628
+ - *[Architecture Decision Records Overview — Google Cloud Architecture Center](https://cloud.google.com/architecture/architecture-decision-records)*
629
+ - *[Maintain an Architecture Decision Record — Microsoft Azure Well-Architected Framework](https://learn.microsoft.com/en-us/azure/well-architected/architect-role/architecture-decision-record)*
630
+ - *[Documenting Architecture Decisions — UK Government Digital Service (GDS)](https://gds-way.digital.cabinet-office.gov.uk/standards/architecture-decisions.html)*
631
+ - *[MADR — Markdown Architectural Decision Records](https://adr.github.io/madr/)*
632
+ - *[ADR Templates — adr.github.io](https://adr.github.io/adr-templates/)*
633
+ - *[Architecture Decision Record Examples — Joel Parker Henderson / GitHub](https://github.com/joelparkerhenderson/architecture-decision-record)*
634
+ - *[How to Create ADRs — and How Not To — Olaf Zimmermann](https://ozimmer.ch/practices/2023/04/03/ADRCreation.html)*
635
+ - *[The MADR Template Explained and Distilled — Olaf Zimmermann](https://www.ozimmer.ch/practices/2022/11/22/MADRTemplatePrimer.html)*
636
+ - *[8 Best Practices for Creating Architecture Decision Records — TechTarget](https://www.techtarget.com/searchapparchitecture/tip/4-best-practices-for-creating-architecture-decision-records)*
637
+ - *[Log4brains — ADR Management and Publication Tool](https://github.com/thomvaill/log4brains)*
638
+ - *[adr-tools — Command-Line Tools for ADRs — Nat Pryce](https://github.com/npryce/adr-tools)*
639
+ - *[Why You Should Be Using ADRs — Red Hat](https://www.redhat.com/en/blog/architecture-decision-records)*
640
+ - *[A Documentation Framework for Architecture Decisions — MIT](https://www.mit.edu/~richh/writings/doc-framework-decisions.pdf)*