RFCs & ADRs
Request for Comments, Architectural Decision Records, and decision logs.
Decision Logs
The biggest problem in software architecture isn't making the wrong decision; it's forgetting why you made it.
Without written records, teams re-litigate the same arguments every 6 months. We solve this using RFCs (process) and ADRs (artifacts).
ADRs (Architectural Decision Records)
An ADR is a short text file that captures a significant architectural decision, along with its context and consequences.
Treat Decisions as Code
Store your ADRs in your git repository (e.g., /docs/adr/).
This keeps the history next to the code. When you git blame a weird piece of infrastructure, you can look at the ADRs from that year to understand the constraints they were under.
The Lifecycle
An ADR is immutable once finalized. If you change your mind later, you create a new ADR that supersedes the old one.
Proposed
The idea is currently under review.
Accepted
We agreed to do this. Implementation begins.
Rejected
We decided NOT to do this. (Valuable to prevent re-hashing).
Deprecated
We used to do this, but a new ADR (005) supersedes it.
RFC vs. ADR
People confuse these. They are two sides of the same coin.
- The RFC (Request For Comments): This is the Active Discussion. It is a document (often a Google Doc or a PR) where people comment, argue, and suggest changes.
- The ADR (Record): This is the Snapshot. Once the RFC discussion settles and a decision is made, you summarize the outcome into a frozen ADR file committed to the repo.
The MADR Template
Markdown Architectural Decision Record. This is the industry standard format (Michael Nygard style).
Example: ADR 001- Database Technology Selection
Status: Accepted
Date: 2023-06-15
Deciders: Architecture Team (Alice and Bob)
Context and Problem Statement
Our e-commerce platform is experiencing rapid growth, and our current MongoDB setup is struggling with transaction consistency and complex reporting requirements. We need a database solution that can handle ACID transactions for orders while supporting high-traffic product catalog queries.
Decision Drivers
- Transaction consistency for financial operations
- Performance for read-heavy product catalog
- Team expertise and hiring considerations
- Operational complexity and maintenance overhead
- Cost optimization for scaling
Considered Options
- PostgreSQL - Traditional relational database
- MongoDB (Current) - Document database
- Hybrid Approach - PostgreSQL for transactions, MongoDB for catalog
Decision Outcome
Chosen option: Option 3 (Hybrid Approach)
Positive Consequences
- Best of both worlds: ACID transactions where needed, document flexibility elsewhere
- Team can leverage existing MongoDB expertise
- Gradual migration path reduces risk
- Optimized for different access patterns
Negative Consequences
- Increased operational complexity
- Data synchronization challenges
- Higher infrastructure costs
- Need for polyglot persistence skills
Example: ADR 002- Authentication Strategy
Status: Accepted
Date: 2023-08-22
Deciders: Security Team (Alice and Bob)
Context and Problem Statement
Our current authentication system uses custom JWT implementation with multiple auth providers (Google, Facebook, email). This has led to security vulnerabilities, maintenance overhead, and difficulty adding new providers.
Decision Drivers
- Security compliance requirements
- Developer productivity
- User experience improvements
- Maintenance burden reduction
- Future extensibility
Considered Options
- Continue Custom Implementation - Maintain current system
- Auth0 Implementation - Third-party authentication service
- Keycloak Open Source - Self-hosted identity provider
- AWS Cognito - Cloud-native identity service
Decision Outcome
Chosen option: Option 2 (Auth0 Implementation)
Positive Consequences
- Enterprise-grade security features
- Reduced development time for auth features
- Built-in social login providers
- Comprehensive audit and compliance tools
- 24/7 security monitoring
Negative Consequences
- Additional monthly cost (~$3,000/month)
- Vendor dependency
- Potential data privacy concerns
- Migration complexity
Best Practices for RFCs & ADRs
Writing Good ADRs
Be Specific:
- Include exact technologies, versions, and configurations
- Quantify benefits and costs where possible
- Reference specific requirements or constraints
Include Context:
- What business problem are we solving?
- What constraints influenced the decision?
- What were the timeline and resource limitations?
Consider Alternatives:
- Document why other options were rejected
- Include trade-offs for each option
- Acknowledge when decision was close call
Managing the Process
RFC Workflow:
- Proposal: Create draft RFC in collaborative document
- Review: Share with stakeholders for feedback period (5-10 days)
- Discussion: Schedule RFC review meeting with key decision makers
- Decision: Approve, reject, or request changes
- Documentation: Convert approved RFC to ADR in repository
- Implementation: Begin work with clear requirements
ADR Organization:
docs/architecture/adr/
├── 001-database-selection.md
├── 002-authentication-strategy.md
├── 003-api-gateway-choice.md
├── 004-monitoring-platform.md
├── 005-deprecated-database-selection.md
└── README.md # Index of all ADRsIntegration with Development
Link to Code:
- Reference ADR numbers in commit messages
- Link ADRs from relevant code directories
- Include ADR status in architecture diagrams
- Tag releases with major ADR implementations
Review Process:
- Review ADRs annually for continued relevance
- Update deprecated status when superseded
- Consider ADR impacts during code reviews
- Include ADR compliance in architectural reviews
Tools and Automation
ADR Management Tools
Simple Approach:
- Markdown files in git repository
- Manual numbering and organization
- Template-based creation process
Advanced Tools:
- ADR Tools: Automated ADR generation and management
- MADR-Tools: Enhanced Markdown ADR workflow
- Confluence/Notion: Integrated documentation platforms
Automation Ideas
Validation Scripts:
- Check ADR format compliance
- Validate required sections are present
- Ensure consistent numbering
- Generate index automatically
Integration Hooks:
- Git hooks to prompt for ADR on significant changes
- CI/CD pipeline to check ADR references
- Automated documentation updates
- Slack notifications for new ADRs