Architecture Decision Records

Recording why decisions were made: what an ADR is, its structure, two worked examples for Apex, recording rejected alternatives, and decision statuses.

  • Intermediate to advanced
  • About 18 minutes
  • Includes an exercise and a knowledge check

The concept Write down why

Two experienced engineers can agree on the problem and still disagree on the implementation. An Architecture Decision Record (ADR) is a short document that records an important decision and its reasoning: the context, the problem, the options, the decision, the reasons, the trade-offs and the consequences. It tells future engineers why the system is the way it is.

ADR-001, payment event duplicate-effect prevention, status proposed, as a document with context, problem, options considered, decision, reasoning and consequences. Beside it three option cards: in-memory deduplication, rejected because it is lost on restart or across instances; broker delivery guarantees alone, rejected because delivery is not the same as a business effect; durable idempotency records, chosen because it survives restarts and supports audit and recovery. Below, the four statuses: proposed, accepted, rejected and superseded.
An ADR keeps the reasoning, including the options you rejected and why.

Worked example ADR-001: duplicate-effect prevention

adrADR-001 (sample)

ADR-001: Payment event duplicate-effect prevention
Status: Proposed

Context
  The integration service may receive the same provider event more than
  once. The current path has no verified atomic protection against
  repeated financial effects.

Problem
  Repeated delivery must not cause duplicate financial posting.

Options considered
  1. Ignore repeats using in-memory application state.
  2. Keep durable event-processing records with transactional safeguards.
  3. Rely only on the message broker's delivery guarantees.

Decision
  Use a durable idempotency mechanism inside the business transaction,
  with concurrency protection.

Reasoning
  - In-memory state is lost on restart and not shared across instances.
  - Broker delivery alone does not make business effects happen once.
  - Durable state supports recovery and auditing.

Consequences
  - New persistent state; event identity and retention must be defined.
  - Processing and recovery must be tested.
  - Monitoring must show repeated deliveries.

Worksheet

Your ADR

Write the ADR for your own next decision, or redo ADR-001 in your own words. Keep the options you rejected and why; that is the part people need most a year later. Answers stay in this browser; Download CSV saves them.

SectionYour ADR
Number and title
Status
Context
Problem
Options considered
Decision
Reasoning
Consequences
Your answers stay in this browser

Worked example API or asynchronous processing?

SectionContent
ContextPayment ingestion must accept events while loan servicing is sometimes unavailable
OptionsSynchronous downstream API; asynchronous queue processing; hybrid acceptance then asynchronous processing
DecisionHybrid, if the business accepts that an event is accepted after validation and durable recording, and posted later
ReasoningIngestion stays responsive; short outages do not reject payments; failures retry under policy; status is tracked
ConsequencesAccepted is not posted; a processing-status model, duplicate handling, recovery and visibility of pending work are required

Good practice Record rejected alternatives and status

Explain what you rejected, and why. For example: Kafka was not selected for this initial workflow because the current workload and integration needs can be met by a managed queue, and the organization does not yet need stream processing. That does not make Kafka worse; it was not justified for this problem.

StatusMeaning
ProposedWritten but not yet approved
AcceptedReviewed and agreed
RejectedConsidered and not chosen
SupersededReplaced by a newer decision; the history stays useful

Practice Write ADR-003

Practical exercise

Rules-based matching versus AI-assisted investigation

Write a short ADR using the seven sections.

  1. Context, problem and at least two options.
  2. Decision, reasoning, consequences and status.
Show a sample ADR
  • Context: matching must be exact and auditable; analysts spend time reading scattered notes.
  • Problem: where, if anywhere, should AI be used in reconciliation?
  • Options: an LLM matches records; rules match and an optional LLM summarizes evidence; no AI.
  • Decision: rules for matching; an optional LLM summarizes approved evidence for analysts, advisory only.
  • Reasoning: matching needs deterministic, testable results; summaries help people without making decisions.
  • Consequences: define evaluation data, grounding checks, access control and cost monitoring for the summaries.
  • Status: proposed.

3 questions

Check your understanding

1. What belongs in an ADR?
2. Why record rejected alternatives?
3. What does superseded mean?
Answer every question to submit.

What you can do now

  • Explain what an ADR is and why it matters.
  • Write an ADR with all seven sections.
  • Record rejected options and statuses.