Video in progress

How do you document architecture decisions (ADRs) so the knowledge isn't lost when people leave?

For each significant decision, a short ADR: context, decision, options considered and consequences, stored next to the code in git. If a decision changes, the old one isn't deleted; it is marked "superseded".

📖 Answer

The most expensive question in a company is "Why was this done this way?" If the person who could answer left two years ago, the team either preserves the old decision blindly, or breaks it without knowing the reasons and runs into the same problem again.

An ADR (Architecture Decision Record) should be short: one page. Nobody writes or reads a long document.

# ADR-017: We chose Kafka for order events

Status: Accepted (2026-03-12). Supersedes ADR-009.

## Context
DB polling adds a 30 s delay, and the table grows by 5 million rows a day.

## Decision
Kafka, 12 partitions, key is orderId. We write with the outbox pattern.

## Options considered
- RabbitMQ: we needed replay, so it was rejected.
- PostgreSQL LISTEN/NOTIFY: risk of lost messages, so it was rejected.

## Consequences
+ latency < 1 s, replay is available
- cluster load on the platform team, on-call is added

Practical rules:

  • It lives next to the code: in a docs/adr/ folder, in git. A wiki loses things, while this moves along with the code and is reviewed through PRs.
  • For decisions that are expensive to reverse: DB, protocol, service boundary, security model. Not for every library choice.
  • Old ADRs aren't deleted. If a new decision overrides the old one, the old one gets "superseded by ADR-023". The history stays.
  • Be sure to write down the rejected options: when the next person asks "why not RabbitMQ?", the answer is ready.
  • A shared repository and search for cross-team decisions. As a staff engineer, I also add the ADRs to the onboarding material.