// Use this skill when documenting significant architectural decisions. Provides ADR templates following the Nygard format with sections for context, decision, consequences, and alternatives. Helps teams maintain architectural memory and rationale for backend systems, API designs, database choices, and infrastructure decisions.
| name | architecture-decision-record |
| description | Use this skill when documenting significant architectural decisions. Provides ADR templates following the Nygard format with sections for context, decision, consequences, and alternatives. Helps teams maintain architectural memory and rationale for backend systems, API designs, database choices, and infrastructure decisions. |
| version | 1.0.0 |
| author | AI Agent Hub |
| tags | ["architecture","documentation","decision-making","backend"] |
Architecture Decision Records (ADRs) are lightweight documents that capture important architectural decisions along with their context and consequences. This skill provides templates, examples, and best practices for creating and maintaining ADRs in your projects.
When to use this skill:
ADRs serve as architectural memory for your team:
Each ADR should follow this structure:
Format: ADR-####: [Decision Title]
Example: ADR-0001: Adopt Microservices Architecture
Current state of the decision:
What to include:
Example:
## Context
Our monolithic application is experiencing scalability issues:
- Database connection pool exhausted during peak traffic
- Deployment of any feature requires full application restart
- Teams blocked waiting for shared resources
- 45-minute build times impacting developer productivity
Business requirements:
- Support 10x traffic growth over next 12 months
- Enable independent team deployments
- Improve time-to-market for new features
Technical constraints:
- Team familiar with Node.js and Python
- AWS infrastructure already in place
- Budget for 2 senior devops engineers
What to include:
Be specific and actionable:
Example:
## Decision
We will migrate from our monolithic architecture to microservices using:
**Technology Stack:**
- Node.js 20+ with Express for service implementation
- PostgreSQL for transactional data (per service)
- Redis for caching and session management
- RabbitMQ for async communication between services
- Docker + Kubernetes for deployment orchestration
**Service Boundaries:**
- User Service: Authentication, profiles, preferences
- Order Service: Order processing, payment integration
- Inventory Service: Product catalog, stock management
- Notification Service: Email, SMS, push notifications
**Migration Strategy:**
- Strangler Fig pattern: Gradually extract services from monolith
- Start with Notification Service (lowest risk, clear boundaries)
- Complete migration within 6 months (Q1-Q2 2026)
**Responsibility:**
- Backend Architect: Service design and API contracts
- DevOps Team: Kubernetes setup and deployment pipelines
- Team Leads: Migration execution per service
What to include:
Be honest about trade-offs:
## Consequences
### Positive
- **Scalability**: Each service can scale independently based on load
- **Development Velocity**: Teams can deploy services without coordination
- **Technology Freedom**: Services can use different tech stacks if needed
- **Fault Isolation**: Failure in one service doesn't crash entire system
- **Faster Build Times**: Services build in 2-5 minutes vs 45 minutes
### Negative
- **Operational Complexity**: Managing 4+ services vs 1 application
- **Network Latency**: Inter-service calls add 10-50ms per hop
- **Distributed Debugging**: Harder to trace requests across services
- **Data Consistency**: Eventually consistent vs immediate consistency
- **Learning Curve**: Team needs to learn Kubernetes, service mesh concepts
- **Initial Slowdown**: 2-3 months of infrastructure setup before benefits
### Neutral
- **Testing Strategy**: Shift from integration tests to contract tests
- **Monitoring**: Need distributed tracing (Jaeger) vs simple logs
- **Cost**: Higher infrastructure costs offset by improved developer productivity
Document at least 2 alternatives:
For each alternative, explain:
Example:
## Alternatives Considered
### Alternative 1: Optimize Existing Monolith
**Description:**
- Add read replicas for database
- Implement caching layer (Redis)
- Use horizontal scaling with load balancer
**Pros:**
- Lower complexity, team already familiar
- Faster implementation (4-6 weeks)
- No architectural re-work needed
**Cons:**
- Doesn't solve deployment coupling
- Limited scalability ceiling
- Build times remain slow
- Teams still blocked on shared resources
**Why not chosen:**
This addresses symptoms but not root causes. We'd face the same issues again in 12-18 months as we continue growing.
### Alternative 2: Serverless Architecture (AWS Lambda)
**Description:**
- Break application into Lambda functions
- Use API Gateway for routing
- DynamoDB for storage
**Pros:**
- Extreme scalability
- Pay-per-use pricing model
- No server management
**Cons:**
- Vendor lock-in to AWS
- Cold start latency (500ms+)
- Limited to 15-minute execution time
- Team has no serverless experience
- Harder to debug and test locally
**Why not chosen:**
Risk too high given team inexperience. Cold starts unacceptable for our real-time features. Microservices provide similar benefits with more control.
Links to relevant resources:
Proposed โ Accepted โ [Implemented] โ (Eventually) Superseded/Deprecated
โ
Rejected
State Transitions:
Once accepted, don't edit ADRs. Create new ADRs that supersede old ones.
ADRs are historical records written as if the decision is being made now.
ADRs capture decisions, not implementation details.
Get input from relevant stakeholders before accepting.
Use 4-digit zero-padded numbers: ADR-0001, ADR-0002, etc. Maintain a single sequence even with multiple projects.
Keep ADRs in version control alongside code:
/docs/adr/ or /architecture/decisions//templates/adr-template.mdโ Too Technical: "We'll use Kubernetes with these 50 YAML configs..." โ Right Level: "We'll use Kubernetes for container orchestration because..."
โ Too Vague: "We'll use a better database" โ Specific: "We'll use PostgreSQL 15+ for transactional data because..."
โ No Alternatives: Only documenting the chosen solution โ Comparative: Document why alternatives weren't chosen
โ Missing Consequences: Only listing benefits โ Balanced: Honest about costs and trade-offs
โ No Context: "We decided to use Redis" โ Contextual: "Given our 1M+ concurrent users and sub-50ms latency requirement..."
See /examples/ for complete ADR samples:
adr-0001-adopt-microservices.md - System architecture decisionadr-0002-choose-postgresql.md - Database selectionadr-0003-api-versioning-strategy.md - API design patternSkill Version: 1.0.0 Last Updated: 2025-10-31 Maintained by: AI Agent Hub Team