Skip to main content

Welcome to a Grasp lesson

Create a free account to keep studying and create your own study path.

Lesson 19

Understanding ADRs: Purpose & Structure

Recommended resources

Introduction

In our last lesson, we focused on specifying architectural guardrails—the automated rules that balance team autonomy with system-wide coherence. A guardrail, such as a mandatory policy for encrypting storage buckets, represents a significant architectural decision. But the rule itself doesn't tell the whole story. Why was that rule created? What other options were considered? What were the expected trade-offs? Over time, this vital context is often lost, turning a well-reasoned decision into what feels like arbitrary bureaucracy.

This lesson introduces the mechanism to prevent this loss of institutional knowledge. Your objective is to explain the purpose and structure of Architecture Decision Records (ADRs), a lightweight yet powerful practice for documenting and communicating your architectural choices. We will explore why ADRs are essential in modern software organizations, break down their common structure, and see how they function as a lasting record of your system's evolution.


The Purpose of ADRs: Capturing the "Why"

As an experienced engineer, you've likely encountered parts of a system and wondered, "Why on earth was it built this way?" The code shows what was implemented, but the reasoning—the context, the trade-offs, the rejected alternatives—is invisible. This is the core problem that Architecture Decision Records (ADRs) are designed to solve.

The following video from CodeOpinion provides an excellent introduction to this common pain point and sets the stage for why a formal record is so valuable.

Architecture Decision Records (ADR) as a LOG that answers "WHY?"

This video frames the problem of lost institutional knowledge and introduces ADRs as a solution for capturing the vital context behind decisions.

Please watch from the beginning up to the introduction of the ADR template, focusing on the distinction between a decision and the context surrounding it. You can watch from the start.

As the video highlights, decisions are made based on the context at a specific point in time. When that context is lost, future teams can neither confidently build upon the decision nor intelligently challenge it.

An ADR is a short, text-based document that captures a single, architecturally significant decision. The primary purpose is to create an immutable log that answers four fundamental questions:

  1. What was the problem or context?
  2. What decision was made?
  3. Why was this decision made over other options?
  4. What are the consequences of this decision?

By systematically answering these questions, ADRs serve several key purposes in a decentralized engineering culture:

  • Preserving Rationale: They provide a historical record of the forces and constraints that shaped the architecture, preventing "architectural amnesia."
  • Enabling Asynchronous Collaboration: A well-written ADR allows stakeholders to understand and weigh in on a decision without needing to be in the same room at the same time.
  • Accelerating Onboarding: New team members can read through the ADRs to quickly understand the evolution of the system and the principles behind its design.
  • Improving Decision Quality: The act of writing an ADR forces clarity. It serves as a "thinking tool," compelling you to articulate the problem, evaluate options systematically, and consider the consequences with intellectual honesty.

The Structure of an ADR: A Common Template

While various templates exist, most share a common set of core components designed to capture the essential information about a decision. The following article from the Archyl blog provides an excellent breakdown of a standard, effective template.

Architecture Decision Records (ADR): The Complete Guide - Archyl Blog

This resource presents a practical ADR template and explains the purpose and content of each section in detail.

Please read the sections titled The Standard ADR Template and "Breaking Down Each Section." Pay close attention to the role each field plays in creating a complete picture of the decision.

Based on the reading, let's synthesize the essential anatomy of an ADR:

  • Title: A short, numbered phrase that uniquely identifies the decision (e.g., "ADR-0023: Use Apache Kafka for Inter-Service Communication").
  • Status: Tracks the lifecycle of the decision. Common statuses are Proposed, Accepted, Deprecated, or Superseded by ADR-XXXX. Importantly, ADRs are an append-only log; you supersede old decisions with new ones, but you never delete the historical record.
  • Context: This is arguably the most crucial section. It describes the problem, the forces at play, and the constraints that necessitate a decision. A good context section allows a reader from the future to understand the landscape at the time the decision was made.
  • Decision: A clear and unambiguous statement of the choice. It should be written in the active voice, for example, "We will adopt a centralized message broker" rather than "A centralized broker should be considered."
  • Alternatives Considered: This section documents the other options that were evaluated. For each alternative, you should briefly describe it and state why it was rejected. This is the part that saves countless hours by preventing teams from relitigating the same debates.
  • Consequences: Every decision involves trade-offs. This section captures both the positive outcomes (what becomes easier or better) and the negative ones (what becomes harder, new risks introduced). This demonstrates intellectual honesty and helps future teams understand when the trade-offs might no longer be acceptable.

Some teams use more elaborate templates that include additional metadata. The image below shows a very comprehensive ADR template that includes fields for analyzing the decision's scope, reversibility, duration, and ownership. While you might not need every field for every decision, it illustrates how the basic structure can be expanded to capture a richer analysis.

A comprehensive ADR template from IASA. This shows how the core sections can be augmented with fields for analyzing the decision's characteristics (like reversibility and effort) and authority.

An ADR in Practice: A Worked Example

To see how these sections come together, let's look at a realistic scenario. The following video from Software Architecture Monday walks through the process of making a decision about message broker topology and documenting it in an ADR.

Lesson 55 - Architecture Decision Records

This video provides a clear, step-by-step demonstration of how to populate an ADR based on a concrete architectural problem.

Please watch the segment from the scenario walkthrough. Notice how the presenter translates the technical problem, the options, and the justifications into the structured format of the ADR's Context, Decision, and Consequences sections.

The video provides a great visual walkthrough. For a detailed text-based example, the Archyl blog also contains a complete and realistic ADR for adopting Kafka.

Architecture Decision Records (ADR): The Complete Guide - Archyl Blog

This example provides a well-written ADR that you can use as a reference for structure, tone, and level of detail.

Please read the section A Complete ADR Example. Observe how it balances brevity with sufficient detail, especially in the "Context" and "Alternatives Considered" sections.

These examples show that a well-crafted ADR is concise but comprehensive. It gives a future reader everything they need to understand the "what" and the "why" in just a few minutes.


The Strategic Value of ADRs: Guiding Humans and AI

Finally, let's connect this practice to your interests in system design and AI. ADRs are not just administrative overhead; they are a strategic asset, especially as our tools become more intelligent.

The true power of ADRs emerges when they become a living part of your team's workflow, stored in a version-controlled repository alongside the code they describe. This makes them discoverable and ties them directly to the evolution of the software.

Crucially, this practice takes on new importance in the age of AI. As AI agents become more involved in the software development lifecycle, they need context to be effective. An agent that can read your ADRs can understand your architectural principles, your past decisions, and the trade-offs you've already considered.

Architecture Decision Records (ADR): The Complete Guide - Archyl Blog

This section makes a direct and compelling link between ADRs and the effective use of AI in software engineering.

Please read the short section titled Why ADRs Matter More. This perspective positions ADRs not merely as documentation but as a critical input for intelligent systems.

By documenting decisions in a structured, machine-readable format like Markdown, you are essentially creating guardrails for AI. An AI assistant can be prompted to respect existing ADRs, preventing it from suggesting a technology you've already rejected for good reason. This transforms ADRs from a passive record into an active guide for both human and artificial developers, which is a powerful concept from an architect's perspective.


Conclusion

In this lesson, we have established the critical role of Architecture Decision Records in a modern software organization. You've learned that their purpose is not to create bureaucracy, but to preserve the valuable context and rationale that so often evaporates over time.

Key Takeaways:

  • Purpose: ADRs exist to capture the "why" behind significant architectural decisions, creating an immutable log of a system's evolution.
  • Structure: A standard ADR is a short document with a core structure: Title, Status, Context, Decision, Alternatives Considered, and Consequences.
  • Value: They save time by preventing repeated debates, accelerate onboarding for new team members, and force a higher degree of rigor in the decision-making process itself.
  • Strategic Impact: When stored with code, ADRs become a strategic asset that can guide both human engineers and AI agents, ensuring architectural coherence as the system grows.

Preview of the Next Lesson

Understanding the purpose and structure of ADRs is the first step. The next is to apply that knowledge. In our next lesson, you will move from theory to practice and write an effective ADR for a cross-cutting architectural change, tackling a realistic scenario that requires you to weigh options and document your choice systematically.