ADR Writer — Architecture Decision Record Pipeline
An agent team collaborates to execute the full workflow: context analysis, alternative comparison, tradeoff evaluation, decision documentation, and impact tracking for architecture decisions.
Execution Mode
Agent Team — Five agents communicate directly via SendMessage and perform cross-validation.
Agent Composition
| Agent |
File |
Role |
Type |
| context-analyst |
.claude/agents/context-analyst.md |
Current architecture, problem, and constraint analysis |
general-purpose |
| alternative-researcher |
.claude/agents/alternative-researcher.md |
Technology alternative exploration, benchmark collection |
general-purpose |
| tradeoff-evaluator |
.claude/agents/tradeoff-evaluator.md |
Weighted evaluation, risk-reward analysis |
general-purpose |
| adr-author |
.claude/agents/adr-author.md |
ADR standard format document writing |
general-purpose |
| impact-tracker |
.claude/agents/impact-tracker.md |
Impact analysis, migration roadmap |
general-purpose |
Workflow
Phase 1: Preparation (Performed Directly by Orchestrator)
- Extract from user input:
- Decision Topic: What architecture decision is being made
- Project Context (optional): Technology stack, team size, project phase
- Constraints (optional): Budget, timeline, technical constraints
- Existing ADRs (optional): Previously written ADR list or codebase
- Create the
_workspace/ directory in the project root
- Organize inputs and save to
_workspace/00_input.md
- If a codebase is available, instruct the context analyst to explore it
- Determine the execution mode based on the scope of the request (see "Execution Modes by Request Scope" below)
Phase 2: Team Assembly and Execution
| Order |
Task |
Owner |
Dependencies |
Deliverable |
| 1 |
Technical Context Analysis |
context-analyst |
None |
_workspace/01_context_analysis.md |
| 2 |
Alternatives Research |
alternative-researcher |
Task 1 |
_workspace/02_alternatives_report.md |
| 3 |
Tradeoff Evaluation |
tradeoff-evaluator |
Tasks 1, 2 |
_workspace/03_tradeoff_matrix.md |
| 4a |
ADR Document Writing |
adr-author |
Tasks 1, 2, 3 |
_workspace/04_adr_document.md |
| 4b |
Impact Assessment |
impact-tracker |
Tasks 1, 2, 3 |
_workspace/05_impact_assessment.md |
Tasks 4a (ADR document) and 4b (impact assessment) are executed in parallel. Both depend only on Tasks 1-3, so they can start simultaneously.
Inter-agent Communication Flow:
- context-analyst completes -> Delivers constraints and technology stack to alternative-researcher; delivers quality attribute priorities to tradeoff-evaluator
- alternative-researcher completes -> Delivers alternatives list and data to tradeoff-evaluator
- tradeoff-evaluator completes -> Delivers recommendation to adr-author; delivers risk list to impact-tracker
- adr-author <-> impact-tracker: Cross-verify consistency between ADR document and impact assessment
Phase 3: Integration and Final Deliverables
- Review all files in
_workspace/
- Validate consistency between the ADR document and impact assessment
- Present the final summary to the user:
- Technical Context —
01_context_analysis.md
- Alternatives Research —
02_alternatives_report.md
- Tradeoff Evaluation —
03_tradeoff_matrix.md
- ADR Document —
04_adr_document.md
- Impact Assessment —
05_impact_assessment.md
Execution Modes by Request Scope
| User Request Pattern |
Execution Mode |
Deployed Agents |
| "Write an ADR," "Architecture decision record" |
Full Pipeline |
All 5 agents |
| "Just compare alternatives" |
Alternatives Analysis Mode |
context-analyst + alternative-researcher + tradeoff-evaluator |
| "Document this decision" (decision already made) |
Documentation Mode |
adr-author + impact-tracker |
| "Analyze the impact of this ADR" (existing ADR) |
Impact Analysis Mode |
impact-tracker solo |
| "Organize the technical context" |
Context Mode |
context-analyst solo |
Using Existing Files: If the user already provides analysis materials, copy them to _workspace/ and skip the corresponding agent's phase.
Data Transfer Protocol
| Strategy |
Method |
Purpose |
| File-based |
_workspace/ directory |
Primary deliverable storage and sharing |
| Message-based |
SendMessage |
Real-time critical information transfer, revision requests |
| Code exploration |
Read/Grep/Glob |
Extract architecture information from codebase |
Error Handling
| Error Type |
Strategy |
| No codebase available |
Analyze context based on user description; mark as "inference-based" |
| Web search failure |
Research alternatives based on general technical knowledge; mark as "latest data unverified" |
| Insufficient quantitative data |
Substitute with qualitative evaluation; mark as "estimates" in the tradeoff matrix |
| Agent failure |
Retry once; if still failing, proceed without that deliverable; note omission in final report |
| Decision deferred |
Set ADR status to "Proposed"; specify additional information needed |
Test Scenarios
Normal Flow
Prompt: "Write an ADR on whether to transition from monolith to microservices. We're currently on Java Spring Boot with a team of 5."
Expected Results:
- Context Analysis: Monolith current state, transition triggers, team size constraints
- Alternatives: At least 3 options including microservices, modular monolith, and status quo
- Tradeoff: Weighted evaluation matrix considering the 5-person team's capabilities
- ADR: MADR format, including both decision rationale and rejection reasons
- Impact Assessment: Phased migration roadmap with rollback strategies
Existing Materials Flow
Prompt: "We already compared Redis vs Memcached. Please organize it into an ADR document." + comparison materials provided
Expected Results:
- Copy provided comparison materials to
_workspace/
- Skip or only supplement context-analyst and alternative-researcher phases
- Focus on adr-author + impact-tracker for documentation
Error Flow
Prompt: "Write a database selection ADR."
Expected Results:
- Context is insufficient, so context-analyst suggests questions about requirements (data types, scale, access patterns)
- Proceed with work under general scenario assumptions; note assumptions in the ADR
- Add "assumption verification needed" items to the impact assessment
Agent Extension Skills
Extension skills that enhance each agent's domain expertise:
| Agent |
Extension Skill |
Role |
| tradeoff-evaluator |
quality-attribute-analyzer |
Quality attribute dictionary, CAP theorem, weighted evaluation matrix, simplified ATAM |
| adr-author, impact-tracker |
madr-template-engine |
MADR standard format, ADR status management, numbering system, dependency graph |
1---2name: adr-writer3description: A pipeline where an agent team systematically creates Architecture Decision Records (ADRs). Use this skill for requests such as 'write an ADR,' 'architecture decision record,' 'document a technical decision,' 'architecture decision record,' 'organize architecture selection rationale,' 'technology stack decision,' 'alternative comparison analysis,' 'tradeoff analysis,' or 'architecture decision history.' Note: actual code migration execution, infrastructure provisioning, and performance test execution are outside the scope of this skill.4---56# ADR Writer — Architecture Decision Record Pipeline78An agent team collaborates to execute the full workflow: context analysis, alternative comparison, tradeoff evaluation, decision documentation, and impact tracking for architecture decisions.910## Execution Mode1112**Agent Team** — Five agents communicate directly via SendMessage and perform cross-validation.1314## Agent Composition1516| Agent | File | Role | Type |17|-------|------|------|------|18| context-analyst | `.claude/agents/context-analyst.md` | Current architecture, problem, and constraint analysis | general-purpose |19| alternative-researcher | `.claude/agents/alternative-researcher.md` | Technology alternative exploration, benchmark collection | general-purpose |20| tradeoff-evaluator | `.claude/agents/tradeoff-evaluator.md` | Weighted evaluation, risk-reward analysis | general-purpose |21| adr-author | `.claude/agents/adr-author.md` | ADR standard format document writing | general-purpose |22| impact-tracker | `.claude/agents/impact-tracker.md` | Impact analysis, migration roadmap | general-purpose |2324## Workflow2526### Phase 1: Preparation (Performed Directly by Orchestrator)27281. Extract from user input:29 - **Decision Topic**: What architecture decision is being made30 - **Project Context** (optional): Technology stack, team size, project phase31 - **Constraints** (optional): Budget, timeline, technical constraints32 - **Existing ADRs** (optional): Previously written ADR list or codebase332. Create the `_workspace/` directory in the project root343. Organize inputs and save to `_workspace/00_input.md`354. If a codebase is available, instruct the context analyst to explore it365. Determine the **execution mode** based on the scope of the request (see "Execution Modes by Request Scope" below)3738### Phase 2: Team Assembly and Execution3940| Order | Task | Owner | Dependencies | Deliverable |41|-------|------|-------|-------------|-------------|42| 1 | Technical Context Analysis | context-analyst | None | `_workspace/01_context_analysis.md` |43| 2 | Alternatives Research | alternative-researcher | Task 1 | `_workspace/02_alternatives_report.md` |44| 3 | Tradeoff Evaluation | tradeoff-evaluator | Tasks 1, 2 | `_workspace/03_tradeoff_matrix.md` |45| 4a | ADR Document Writing | adr-author | Tasks 1, 2, 3 | `_workspace/04_adr_document.md` |46| 4b | Impact Assessment | impact-tracker | Tasks 1, 2, 3 | `_workspace/05_impact_assessment.md` |4748Tasks 4a (ADR document) and 4b (impact assessment) are executed **in parallel**. Both depend only on Tasks 1-3, so they can start simultaneously.4950**Inter-agent Communication Flow:**51- context-analyst completes -> Delivers constraints and technology stack to alternative-researcher; delivers quality attribute priorities to tradeoff-evaluator52- alternative-researcher completes -> Delivers alternatives list and data to tradeoff-evaluator53- tradeoff-evaluator completes -> Delivers recommendation to adr-author; delivers risk list to impact-tracker54- adr-author <-> impact-tracker: Cross-verify consistency between ADR document and impact assessment5556### Phase 3: Integration and Final Deliverables57581. Review all files in `_workspace/`592. Validate consistency between the ADR document and impact assessment603. Present the final summary to the user:61 - Technical Context — `01_context_analysis.md`62 - Alternatives Research — `02_alternatives_report.md`63 - Tradeoff Evaluation — `03_tradeoff_matrix.md`64 - ADR Document — `04_adr_document.md`65 - Impact Assessment — `05_impact_assessment.md`6667## Execution Modes by Request Scope6869| User Request Pattern | Execution Mode | Deployed Agents |70|---------------------|---------------|-----------------|71| "Write an ADR," "Architecture decision record" | **Full Pipeline** | All 5 agents |72| "Just compare alternatives" | **Alternatives Analysis Mode** | context-analyst + alternative-researcher + tradeoff-evaluator |73| "Document this decision" (decision already made) | **Documentation Mode** | adr-author + impact-tracker |74| "Analyze the impact of this ADR" (existing ADR) | **Impact Analysis Mode** | impact-tracker solo |75| "Organize the technical context" | **Context Mode** | context-analyst solo |7677**Using Existing Files**: If the user already provides analysis materials, copy them to `_workspace/` and skip the corresponding agent's phase.7879## Data Transfer Protocol8081| Strategy | Method | Purpose |82|----------|--------|---------|83| File-based | `_workspace/` directory | Primary deliverable storage and sharing |84| Message-based | SendMessage | Real-time critical information transfer, revision requests |85| Code exploration | Read/Grep/Glob | Extract architecture information from codebase |8687## Error Handling8889| Error Type | Strategy |90|-----------|----------|91| No codebase available | Analyze context based on user description; mark as "inference-based" |92| Web search failure | Research alternatives based on general technical knowledge; mark as "latest data unverified" |93| Insufficient quantitative data | Substitute with qualitative evaluation; mark as "estimates" in the tradeoff matrix |94| Agent failure | Retry once; if still failing, proceed without that deliverable; note omission in final report |95| Decision deferred | Set ADR status to "Proposed"; specify additional information needed |9697## Test Scenarios9899### Normal Flow100**Prompt**: "Write an ADR on whether to transition from monolith to microservices. We're currently on Java Spring Boot with a team of 5."101**Expected Results**:102- Context Analysis: Monolith current state, transition triggers, team size constraints103- Alternatives: At least 3 options including microservices, modular monolith, and status quo104- Tradeoff: Weighted evaluation matrix considering the 5-person team's capabilities105- ADR: MADR format, including both decision rationale and rejection reasons106- Impact Assessment: Phased migration roadmap with rollback strategies107108### Existing Materials Flow109**Prompt**: "We already compared Redis vs Memcached. Please organize it into an ADR document." + comparison materials provided110**Expected Results**:111- Copy provided comparison materials to `_workspace/`112- Skip or only supplement context-analyst and alternative-researcher phases113- Focus on adr-author + impact-tracker for documentation114115### Error Flow116**Prompt**: "Write a database selection ADR."117**Expected Results**:118- Context is insufficient, so context-analyst suggests questions about requirements (data types, scale, access patterns)119- Proceed with work under general scenario assumptions; note assumptions in the ADR120- Add "assumption verification needed" items to the impact assessment121122## Agent Extension Skills123124Extension skills that enhance each agent's domain expertise:125126| Agent | Extension Skill | Role |127|-------|----------------|------|128| tradeoff-evaluator | `quality-attribute-analyzer` | Quality attribute dictionary, CAP theorem, weighted evaluation matrix, simplified ATAM |129| adr-author, impact-tracker | `madr-template-engine` | MADR standard format, ADR status management, numbering system, dependency graph |