Architecture Decision Records | ADR Guide
Create Architecture Decision Records (ADRs) to capture context, reasoning, and consequences of technical decisions. Store ADRs in GitScrum NoteVault.
7 min read
Technical decisions made today will be questioned tomorrow by new team members, auditors, or your future self. Architecture Decision Records (ADRs) capture not just what was decided, but why, what alternatives were considered, and what consequences to expect.
ADR Benefits
| Without ADRs | With ADRs |
|---|---|
| "Why did we use X?" | Documented reasoning |
| Revisiting old debates | Decision history |
| Inconsistent approaches | Established patterns |
| Lost context | Preserved knowledge |
| New hire confusion | Clear onboarding |
ADR Format
Standard Template
ARCHITECTURE DECISION RECORD TEMPLATE
βββββββββββββββββββββββββββββββββββββ
# ADR-[NUMBER]: [TITLE]
## Status
[Proposed | Accepted | Deprecated | Superseded by ADR-XXX]
## Date
[YYYY-MM-DD when decided]
## Context
[What is the situation? What problem are we trying to solve?
What constraints do we have? What forces are at play?]
## Decision
[What is the decision we're making? Be clear and specific.]
## Alternatives Considered
### Alternative 1: [Name]
- Pros: [list]
- Cons: [list]
- Why not chosen: [reason]
### Alternative 2: [Name]
- Pros: [list]
- Cons: [list]
- Why not chosen: [reason]
## Consequences
### Positive
- [benefit 1]
- [benefit 2]
### Negative
- [drawback 1]
- [drawback 2]
### Risks
- [risk and mitigation]
## Related Decisions
- [ADR-XXX: Related decision]
## References
- [Links to relevant documentation, RFCs, etc.]
Real Example
# ADR-005: Use PostgreSQL for Primary Database
## Status
Accepted
## Date
2024-01-15
## Context
We need to select a primary database for our SaaS application.
Requirements:
- Strong consistency for financial transactions
- Complex queries for analytics
- JSON support for flexible schemas
- Proven reliability at scale
- Team familiarity
- Reasonable operational complexity
Current team has experience with MySQL and PostgreSQL.
Expected load: 10K transactions/day initially, scaling to 1M+.
## Decision
Use PostgreSQL 16 as our primary database, deployed on
AWS RDS with Multi-AZ configuration.
## Alternatives Considered
### Alternative 1: MySQL
- Pros: Team familiarity, simple setup, good performance
- Cons: Weaker JSON support, fewer advanced features
- Why not chosen: JSON support critical for our schema needs
### Alternative 2: MongoDB
- Pros: Flexible schema, good for documents
- Cons: Eventual consistency concerns for transactions
- Why not chosen: Need strong consistency for financial data
### Alternative 3: CockroachDB
- Pros: Distributed by design, PostgreSQL compatible
- Cons: Complexity overkill for current scale, cost
- Why not chosen: Premature optimization for our scale
## Consequences
### Positive
- Strong ecosystem with extensive tooling
- JSONB support for flexible portions of schema
- Excellent query planner for complex analytics
- Team can leverage existing PostgreSQL knowledge
- RDS simplifies operations
### Negative
- Horizontal scaling will require read replicas or sharding
- Not ideal for time-series data (may need separate solution)
- RDS costs higher than self-managed
### Risks
- Scale ceiling: Mitigate with read replicas, caching layer
- Vendor lock-in to RDS: Acceptable trade-off for reduced ops
## Related Decisions
- ADR-012: TimescaleDB for metrics data
- ADR-003: Redis for caching layer
## References
- PostgreSQL docs: https://postgresql.org/docs/16/
- AWS RDS pricing analysis: [internal doc]
When to Create ADRs
Decision Criteria
CREATE AN ADR WHEN:
βββββββββββββββββββ
HIGH IMPACT:
βββ Affects multiple services/components
βββ Difficult or expensive to reverse
βββ Significant development effort
βββ Team had substantial debate
βββ External stakeholder interest
EXAMPLES:
βββ Choosing a database
βββ Selecting a framework
βββ Defining API architecture
βββ Choosing authentication approach
βββ Deciding deployment strategy
βββ Establishing coding standards
βββ Picking cloud provider
βββ Defining data retention policy
DON'T NEED ADR:
βββ Choosing variable names
βββ Minor library selection
βββ Bug fix approaches
βββ UI component styling
βββ Easily reversible choices
ADR Workflow
ADR CREATION WORKFLOW
βββββββββββββββββββββ
STEP 1: Identify Decision
βββ Significant technical choice ahead
βββ Team has different opinions
βββ Will affect future development
βββ Worth documenting
STEP 2: Draft ADR
βββ Author creates draft
βββ Includes context and constraints
βββ Lists alternatives considered
βββ Proposes decision
βββ Status: "Proposed"
STEP 3: Review
βββ Share with affected teams
βββ Collect feedback (comments/PR)
βββ Technical discussion
βββ May revise based on input
βββ Time-box: 1 week typical
STEP 4: Decide
βββ Team meeting or async vote
βββ Make final decision
βββ Update ADR with decision
βββ Status: "Accepted"
STEP 5: Communicate
βββ Announce decision
βββ Link from relevant code/docs
βββ Reference in implementation PRs
βββ Add to onboarding materials
Organizing ADRs
Folder Structure
ADR ORGANIZATION
ββββββββββββββββ
IN REPOSITORY:
βββββββββββββββββββββββββββββββββββββ
project/
βββ docs/
β βββ adr/
β βββ README.md (index)
β βββ 0001-record-architecture-decisions.md
β βββ 0002-use-typescript.md
β βββ 0003-graphql-api-design.md
β βββ 0004-microservices-vs-monolith.md
β βββ 0005-postgresql-database.md
βββ src/
βββ ...
README.md INDEX:
βββββββββββββββββββββββββββββββββββββ
# Architecture Decision Records
| # | Title | Status | Date |
|---|-------|--------|------|
| 1 | Record architecture decisions | Accepted | 2024-01-01 |
| 2 | Use TypeScript | Accepted | 2024-01-05 |
| 3 | GraphQL API design | Accepted | 2024-01-10 |
| 4 | Microservices vs monolith | Accepted | 2024-01-15 |
| 5 | PostgreSQL database | Accepted | 2024-01-15 |
NUMBERING:
βββ Sequential: 0001, 0002, 0003...
βββ Never reuse numbers
βββ Deprecated ADRs keep numbers
βββ Superseded points to replacement
In GitScrum NoteVault
ADRS IN NOTEVAULT
βββββββββββββββββ
ORGANIZATION:
βββ Create "Architecture Decisions" space
βββ Tag ADRs with #adr
βββ Link to related projects
βββ Link to implementation tasks
βββ Search across all ADRs
LINKING:
βββ ADR β Task that implements it
βββ Task β ADR that explains why
βββ Project β Key ADRs
βββ Bidirectional references
TEMPLATES:
βββ Save ADR template in NoteVault
βββ Create new ADR from template
βββ Consistent structure
βββ Required fields enforced
Maintaining ADRs
Lifecycle Management
ADR LIFECYCLE
βββββββββββββ
PROPOSED:
βββ Draft stage
βββ Open for discussion
βββ Not yet decided
βββ May be rejected
ACCEPTED:
βββ Decision made
βββ Implementation can proceed
βββ Reference in code
βββ Most common final state
DEPRECATED:
βββ No longer relevant
βββ Technology changed
βββ Business changed
βββ Keep for history
βββ Note why deprecated
SUPERSEDED:
βββ Replaced by newer ADR
βββ Link to replacement
βββ Original still valuable for history
βββ "Superseded by ADR-XXX"
EXAMPLE:
# ADR-003: Use REST API
## Status
Superseded by ADR-015 (GraphQL migration)
[Original content preserved for history]
Best Practices
For ADRs
Anti-Patterns
ADR MISTAKES:
β Writing months after decision
β Too long (multiple pages)
β Storing separately from code
β Deleting deprecated ADRs
β No alternatives documented
β No consequences listed
β No review process
β Never referenced again