Create ADR Spike
Standardized workflow for creating Architecture Decision Records (ADRs) and conducting research spikes for technical decisions.
When to Use This Skill
Explicit Triggers:
- "Create an ADR for [decision]"
- "Architecture decision for [problem]"
- "Research spike on [topic]"
- "Evaluate options for [choice]"
- "Document technical decision about [subject]"
- "Should we use X or Y?"
Implicit Triggers:
- Comparing multiple technical alternatives
- Making architectural choices that affect system design
- Evaluating libraries, frameworks, or patterns
- Deciding on refactoring approaches
- Documenting important technical trade-offs
Debugging/Analysis Triggers:
- "What decisions led to this architecture?"
- "Why did we choose [technology/pattern]?"
- "Search existing ADRs for [topic]"
When NOT to Use:
- Simple code refactoring (no architectural impact)
- Bug fixes without design implications
- Minor configuration changes
- Routine maintenance tasks
Table of Contents
Core Sections
Project Integration
Supporting Resources
- reference.md - Technical documentation, ADR template deep-dive, and comprehensive examples
- Scripts - Utility scripts for ADR number finding and validation
- Templates - ADR and migration templates for structured decision records
Additional Information
Templates
This skill includes comprehensive ADR and migration templates:
Usage: Reference these templates when creating ADRs from spikes or planning complex migrations/refactors.
Quick Start
Invoke this skill when you need to:
- Document an architectural decision
- Research technical alternatives
- Evaluate competing solutions
- Create a formal decision record
Example invocation:
"Create an ADR for choosing between PostgreSQL and Neo4j for our graph storage"
Workflow
Phase 1: Research (Discovery)
Objective: Gather all relevant context before making a recommendation.
Identify the Decision:
- What problem are we solving?
- What constraints exist (performance, cost, expertise)?
- What are the success criteria?
Search Existing Knowledge:
# Search existing ADRs for related decisions
find docs/adr -name "*.md" -type f -exec grep -l "keyword" {} \;
# Search project memory for patterns
mcp__memory__search_memories(query="related topic")
Research External Resources (if needed):
- Use
mcp__context7__resolve-library-id to find library documentation
- Use
mcp__context7__get-library-docs to get detailed technical info
- Use
WebSearch for recent discussions, benchmarks, or comparisons
- Use
WebFetch to extract specific documentation pages
Document Findings:
Phase 2: Analysis (Evaluation)
Objective: Evaluate alternatives systematically.
Identify Options (minimum 2-3):
- List all viable alternatives
- Include "do nothing" if applicable
- Consider hybrid approaches
Evaluate Each Option:
For each alternative, document:
- Pros: Benefits and strengths
- Cons: Drawbacks and weaknesses
- Performance: Speed, scalability, resource usage
- Maintainability: Code complexity, debugging, testability
- Cost: Development time, operational cost, learning curve
- Team Fit: Expertise required, training needed
- Risks: What could go wrong?
- Trade-offs: What are we giving up?
Create Comparison Matrix:
| Criteria |
Option A |
Option B |
Option C |
| Performance |
High |
Medium |
Low |
| Maintainability |
Medium |
High |
Low |
| Cost |
Low |
High |
Medium |
| Team Fit |
High |
Medium |
Low |
Phase 3: Decision (Recommendation)
Objective: Make a clear, justified recommendation.
Recommend Preferred Option:
- State choice clearly
- Provide 2-3 sentence rationale
- Reference evaluation criteria
Document Justification:
- Why this option over others?
- What criteria weighted most heavily?
- What assumptions are we making?
- What constraints influenced the decision?
Identify Consequences:
- Positive: What improves?
- Negative: What gets harder?
- Risks: What could fail?
- Mitigations: How to reduce risks?
Phase 4: Documentation (Formalization)
Objective: Create permanent ADR record.
Determine ADR Number:
# Find highest existing ADR number across all status directories
find docs/adr -name "[0-9]*.md" | \
sed 's/.*\/\([0-9]*\)-.*/\1/' | \
sort -n | tail -1
Choose ADR Directory:
docs/adr/not_started/ - Decision made, implementation not started
docs/adr/in_progress/ - Implementation currently underway
docs/adr/implemented/ - Fully implemented and verified
Default: Use not_started/ for new decisions unless implementation begins immediately.
Create ADR from Template:
- Copy template:
templates/adr-template.md or templates/migration-template.md
- Fill all required sections (no placeholders)
- Use next sequential number (e.g., ADR-028)
- Use kebab-case for filename:
028-descriptive-title.md
Complete Required Sections:
- Status: Proposed | Accepted | In Progress | Completed
- Date: Current date (YYYY-MM-DD)
- Context: Problem statement, current state, motivation
- Decision: Chosen approach, scope, pattern
- Consequences: Positive, negative, migration strategy
- Alternatives Considered: At least 2-3 options with pros/cons
- References: Links to research, docs, discussions
Add Implementation Tracking (if applicable):
- Files affected
- Completion criteria
- Testing strategy
- Code marker guidelines
Phase 5: Memory Storage (Persistence)
Objective: Store decision in memory graph for future retrieval.
Create Memory Entity:
mcp__memory__create_entities(entities=[{
"name": f"ADR-{number}: {title}",
"type": "ArchitectureDecision",
"observations": [
f"Status: {status}",
f"Decision: {chosen_option}",
f"Rationale: {key_reason}",
f"Date: {date}",
f"Location: docs/adr/{status_dir}/{number}-{kebab-case-title}/"
]
}])
Create Relations to Existing Entities:
- Link to affected components
- Link to related ADRs (supersedes, relates-to)
- Link to architectural patterns
Verify Document Structure:
- Maximum 2 files per ADR - see "Document Structure Rule" section
- For
not_started/: Only ADR.md
- For
in_progress/: ADR.md + IMPLEMENTATION_PLAN.md
- NO separate RESEARCH.md, ANALYSIS.md, EXECUTIVE_SUMMARY.md, or IMPLEMENTATION_NOTES.md
- NO documents in
.claude/artifacts/
Quality Checklist
Before marking the spike complete, verify:
Document Structure Rule (CRITICAL)
Minimal documents. No redundancy. Human-readable.
Document Count by Status
| Status |
Documents |
Contents |
not_started/ |
1 file: ADR.md |
Research + Analysis + Decision |
in_progress/ |
2 files: ADR.md + IMPLEMENTATION_PLAN.md |
Add implementation details |
implemented/ |
1-2 files |
Same as in_progress (plan becomes historical record) |
✅ CORRECT Structure
For not_started/ (decision made, not yet implementing):
docs/adr/not_started/005-subprocess-daemon-architecture/
└── ADR.md # Contains: Executive Summary, Research, Analysis, Decision, Alternatives
For in_progress/ (actively implementing):
docs/adr/in_progress/005-subprocess-daemon-architecture/
├── ADR.md # The decision (research + analysis + decision)
└── IMPLEMENTATION_PLAN.md # How to build it (phases + tasks + notes)
❌ WRONG Structure (Too Many Documents)
docs/adr/in_progress/005-.../
├── ADR.md
├── RESEARCH.md # ❌ WRONG: Put in ADR.md
├── ANALYSIS.md # ❌ WRONG: Put in ADR.md
├── EXECUTIVE_SUMMARY.md # ❌ WRONG: Put in ADR.md
├── IMPLEMENTATION_PLAN.md
└── IMPLEMENTATION_NOTES.md # ❌ WRONG: Put in IMPLEMENTATION_PLAN.md
The Rule
- ADR.md = Research + Analysis + Executive Summary + Decision + Alternatives
- IMPLEMENTATION_PLAN.md = Phases + Tasks + Developer Notes (only when
in_progress/)
- That's it. 1-2 files maximum.
Anti-Patterns to Avoid
Single Option Presented:
- ❌ BAD: "We should use PostgreSQL" (no alternatives)
- ✅ GOOD: "PostgreSQL vs Neo4j vs Hybrid approach" (multiple options)
Missing Trade-off Analysis:
- ❌ BAD: "Option A is better in every way"
- ✅ GOOD: "Option A is faster but harder to maintain"
No Consequence Documentation:
- ❌ BAD: Decision without discussing impact
- ✅ GOOD: Positive/negative consequences documented
Skipping Memory Storage:
- ❌ BAD: ADR created but not in memory graph
- ✅ GOOD: ADR entity created with relations
Placeholder Text in ADR:
- ❌ BAD: "[TODO: Add alternatives]"
- ✅ GOOD: All sections fully completed
Wrong Directory:
- ❌ BAD: Implementation ADR in
not_started/
- ✅ GOOD: ADR directory matches status
No External Research:
- ❌ BAD: Decision based only on opinion
- ✅ GOOD: Research references documentation, benchmarks, community discussion
Ignoring Existing ADRs:
- ❌ BAD: Creating conflicting ADR without checking existing
- ✅ GOOD: Search existing ADRs, note conflicts/supersessions
Splitting Documents Across Locations:
- ❌ BAD: ADR in
docs/adr/, research in .claude/artifacts/
- ✅ GOOD: ALL documents in
docs/adr/{status_dir}/{number}-{kebab-case-title}/
Project-Specific Conventions
ADR Directory Structure (This Project)
docs/adr/
├── implemented/ # Completed ADRs (11+ ADRs)
├── in_progress/ # Active implementation (4+ ADRs)
├── not_started/ # Proposed/accepted, not started (10+ ADRs)
├── TEMPLATE-refactor-migration.md
└── README.md
Numbering Convention
- Use 3-digit format:
001, 028, 127
- Find highest number across ALL status directories
- Use next sequential number
- Do not reuse numbers
Filename Convention
- Format:
{number}-{kebab-case-title}.md
- Example:
028-indexing-orchestrator-extraction.md
- Keep titles concise (3-7 words)
Status Values
- Proposed: Initial draft, seeking approval
- Accepted: Approved, awaiting implementation
- In Progress: Currently implementing
- Completed: Fully implemented and verified
- Superseded: Replaced by newer ADR
Refactor Markers (for in-progress ADRs)
If ADR is in in_progress/, add file-level markers in affected code:
# =============================================================================
# TODO: "Section Name"
# REFACTOR: [ADR-XXX] Brief description
# WHY: One-line reason
# STARTED: YYYY-MM-DD
# STATUS: IN_PROGRESS
# PERMANENT_RECORD: docs/adr/in_progress/XXX-title.md
# ACTIVE_TRACKING: todo.md "Section Name"
# =============================================================================
See: Refactor Marker Guide
Integration with todo.md
For ADRs requiring implementation:
- Create section in
./todo.md tracking tasks
- Reference in ADR's "Active Tracking" section
- Update ADR's "Progress Log" as work proceeds
Examples
Python Examples
Complete Walkthroughs
See references/reference.md for detailed examples of:
- Simple architectural decision (library choice)
- Complex refactor/migration ADR
- Research spike with external investigation
- Superseding an existing ADR
Supporting Files
- references/reference.md: Detailed technical documentation, ADR template deep-dive, and comprehensive examples
- templates/adr-template.md: Complete ADR structure with all required sections
- templates/migration-template.md: Detailed migration/refactor planning template
- scripts/validate_adr.py: Validation script for ADR completeness
- scripts/find_next_adr_number.sh: Utility to find next ADR number
Requirements
Skills & Tools:
- Skill tool access: Read, Grep, Glob, Bash, Write
- MCP tools: mcp__memory__, mcp__context7__ (for research)
- Web tools: WebSearch, WebFetch (for external research)
Project Setup:
docs/adr/ directory structure exists with status subdirectories (in projects using this skill)
- ADR templates available at
templates/adr-template.md and templates/migration-template.md
- Memory system configured for entity storage
Knowledge:
- Understanding of Clean Architecture principles (for this project)
- Ability to evaluate technical trade-offs
- Familiarity with ADR format and structure
Troubleshooting
Issue: Can't find next ADR number
# Solution: Use helper script
./scripts/find_next_adr_number.sh
# Or manually:
find docs/adr -name "[0-9]*.md" | sed 's/.*\/\([0-9]*\)-.*/\1/' | sort -n | tail -1
Issue: Don't know which directory to use
- not_started/: Decision made, no implementation yet (default)
- in_progress/: Currently implementing
- implemented/: Fully complete and verified
Issue: Alternatives seem equivalent
- Good! Document that in the ADR
- Explain why you chose one over the other (team fit, learning curve, etc.)
- Consider hybrid approaches
Issue: Only one viable option
- ❌ RED FLAG - dig deeper
- Minimum 2-3 alternatives required
- Include "do nothing" as an option if applicable
- Consider different implementation approaches of the same technology
Issue: Research taking too long
- Set time box (1-2 hours for simple decisions, 4-8 hours for complex)
- Focus on key decision criteria
- Note what you didn't research in ADR limitations section
- Can always update ADR later with more research
Issue: Memory entity creation fails
- Verify memory system is configured and running
- Check entity name doesn't already exist
- Simplify observations if too complex
- Skip memory storage if blocked, but note in ADR
Success Criteria
An ADR spike is complete when:
- ✅ Research conducted (existing ADRs, memory, external sources)
- ✅ Alternatives evaluated (2-3+ options)
- ✅ Recommendation made with justification
- ✅ ADR created with all required sections
- ✅ ADR placed in correct directory with proper numbering
- ✅ Memory entity created with relations
- ✅ Research artifacts saved and referenced
- ✅ Quality checklist verified
Output Format
When completing an ADR spike, provide:
Executive Summary:
- Decision made
- Key rationale (2-3 sentences)
- Alternatives considered
ADR Location:
- Full path to created ADR
- ADR number and title
Memory Entity:
- Entity name
- Key observations stored
Next Steps (if applicable):
- Implementation tasks
- todo.md section created
- Refactor markers needed
References
- Refactor Marker Guide
- ADR Template
- Migration Template
- Reference Documentation - Detailed examples and walkthroughs
Skill Type: Project Skill (team workflow)
Audience: @researcher, @planner, any agent making architectural decisions
Last Updated: 2025-10-17
1---2name: create-adr-spike3description: Creates Architecture Decision Records (ADRs) and conducts research spikes for technical decisions using a structured 5-phase workflow: Research, Analysis, Decision, Documentation, and Memory Storage. Use when asked to "create an ADR", "architectural decision for", "research spike on", "evaluate options for", "document technical decision", "should we use X or Y", or when comparing technical alternatives. Provides systematic evaluation (minimum 2-3 alternatives), trade-off analysis, consequence documentation, and memory graph persistence. Manages ADR lifecycle across not_started, in_progress, and implemented directories with proper numbering and status tracking. Works with docs/adr/ directories, ADR templates, memory MCP tools, and external research tools (WebSearch, WebFetch, context7 library docs).4---5
6# Create ADR Spike
7
8Standardized workflow for creating Architecture Decision Records (ADRs) and conducting research spikes for technical decisions.
9
10## When to Use This Skill
11
12**Explicit Triggers:**
13- "Create an ADR for [decision]"
14- "Architecture decision for [problem]"
15- "Research spike on [topic]"
16- "Evaluate options for [choice]"
17- "Document technical decision about [subject]"
18- "Should we use X or Y?"
19
20**Implicit Triggers:**
21- Comparing multiple technical alternatives
22- Making architectural choices that affect system design
23- Evaluating libraries, frameworks, or patterns
24- Deciding on refactoring approaches
25- Documenting important technical trade-offs
26
27**Debugging/Analysis Triggers:**
28- "What decisions led to this architecture?"
29- "Why did we choose [technology/pattern]?"
30- "Search existing ADRs for [topic]"
31
32**When NOT to Use:**
33- Simple code refactoring (no architectural impact)
34- Bug fixes without design implications
35- Minor configuration changes
36- Routine maintenance tasks
37
38## Table of Contents
39
40### Core Sections
41- [Quick Start](#quick-start) - What this skill does and when to use it
42- [Workflow](#workflow) - Complete 5-phase ADR creation process
43 - [Phase 1: Research (Discovery)](#phase-1-research-discovery) - Gather context and search existing knowledge
44 - [Phase 2: Analysis (Evaluation)](#phase-2-analysis-evaluation) - Evaluate alternatives systematically
45 - [Phase 3: Decision (Recommendation)](#phase-3-decision-recommendation) - Make clear, justified recommendation
46 - [Phase 4: Documentation (Formalization)](#phase-4-documentation-formalization) - Create permanent ADR record
47 - [Phase 5: Memory Storage (Persistence)](#phase-5-memory-storage-persistence) - Store decision in memory graph
48- [Quality Checklist](#quality-checklist) - Verification before marking spike complete
49- [Anti-Patterns to Avoid](#anti-patterns-to-avoid) - Common mistakes and correct approaches
50
51### Project Integration
52- [Project-Specific Conventions](#project-specific-conventions) - ADR directory structure and naming
53- [Examples](#examples) - Complete walkthroughs and use cases
54- [Output Format](#output-format) - How to present completed ADR spike results
55- [Success Criteria](#success-criteria) - When an ADR spike is complete
56
57### Supporting Resources
58- [reference.md](references/reference.md) - Technical documentation, ADR template deep-dive, and comprehensive examples
59- [Scripts](scripts/) - Utility scripts for ADR number finding and validation
60- [Templates](templates/) - ADR and migration templates for structured decision records
61
62### Additional Information
63- [Requirements](#requirements) - Skills, tools, project setup, and knowledge needed
64- [Troubleshooting](#troubleshooting) - Common issues and solutions
65- [References](#references) - Related documentation and guides
66
67## Templates
68
69This skill includes comprehensive ADR and migration templates:
70
71- **[templates/adr-template.md](templates/adr-template.md)** - Complete ADR structure with:
72 - Status and metadata frontmatter
73 - Context, decision, and consequences sections
74 - Implementation strategy and validation plan
75 - Migration path with before/after examples
76 - Alternatives considered and trade-off analysis
77 - Related decisions and references
78
79- **[templates/migration-template.md](templates/migration-template.md)** - Detailed migration/refactor plan with:
80 - Current state and desired state analysis
81 - Phased migration path with detailed steps
82 - Risk analysis and mitigation strategies
83 - Comprehensive rollback procedures
84 - Testing strategy and monitoring plan
85 - Communication and training plans
86
87**Usage:** Reference these templates when creating ADRs from spikes or planning complex migrations/refactors.
88
89## Quick Start
90
91**Invoke this skill when you need to:**
92- Document an architectural decision
93- Research technical alternatives
94- Evaluate competing solutions
95- Create a formal decision record
96
97**Example invocation:**
98```
99"Create an ADR for choosing between PostgreSQL and Neo4j for our graph storage"
100```
101
102## Workflow
103
104### Phase 1: Research (Discovery)
105
106**Objective:** Gather all relevant context before making a recommendation.
107
1081. **Identify the Decision:**
109 - What problem are we solving?
110 - What constraints exist (performance, cost, expertise)?
111 - What are the success criteria?
112
1132. **Search Existing Knowledge:**
114 ```bash
115 # Search existing ADRs for related decisions
116 find docs/adr -name "*.md" -type f -exec grep -l "keyword" {} \;
117
118 # Search project memory for patterns
119 mcp__memory__search_memories(query="related topic")
120 ```
121
1223. **Research External Resources (if needed):**
123 - Use `mcp__context7__resolve-library-id` to find library documentation
124 - Use `mcp__context7__get-library-docs` to get detailed technical info
125 - Use `WebSearch` for recent discussions, benchmarks, or comparisons
126 - Use `WebFetch` to extract specific documentation pages
127
1284. **Document Findings:**
129 - Create ADR directory and start drafting `ADR.md`:
130 ```
131 docs/adr/not_started/{number}-{kebab-case-title}/
132 └── ADR.md # Draft: add research findings to "Context" and "Research" sections
133 ```
134 - **DO NOT** create separate RESEARCH.md, ANALYSIS.md, or EXECUTIVE_SUMMARY.md files
135 - **DO NOT** put research in `.claude/artifacts/`
136 - All research goes directly into ADR.md sections
137
138### Phase 2: Analysis (Evaluation)
139
140**Objective:** Evaluate alternatives systematically.
141
1421. **Identify Options (minimum 2-3):**
143 - List all viable alternatives
144 - Include "do nothing" if applicable
145 - Consider hybrid approaches
146
1472. **Evaluate Each Option:**
148 For each alternative, document:
149 - **Pros:** Benefits and strengths
150 - **Cons:** Drawbacks and weaknesses
151 - **Performance:** Speed, scalability, resource usage
152 - **Maintainability:** Code complexity, debugging, testability
153 - **Cost:** Development time, operational cost, learning curve
154 - **Team Fit:** Expertise required, training needed
155 - **Risks:** What could go wrong?
156 - **Trade-offs:** What are we giving up?
157
1583. **Create Comparison Matrix:**
159 | Criteria | Option A | Option B | Option C |
160 |----------|----------|----------|----------|
161 | Performance | High | Medium | Low |
162 | Maintainability | Medium | High | Low |
163 | Cost | Low | High | Medium |
164 | Team Fit | High | Medium | Low |
165
166### Phase 3: Decision (Recommendation)
167
168**Objective:** Make a clear, justified recommendation.
169
1701. **Recommend Preferred Option:**
171 - State choice clearly
172 - Provide 2-3 sentence rationale
173 - Reference evaluation criteria
174
1752. **Document Justification:**
176 - Why this option over others?
177 - What criteria weighted most heavily?
178 - What assumptions are we making?
179 - What constraints influenced the decision?
180
1813. **Identify Consequences:**
182 - **Positive:** What improves?
183 - **Negative:** What gets harder?
184 - **Risks:** What could fail?
185 - **Mitigations:** How to reduce risks?
186
187### Phase 4: Documentation (Formalization)
188
189**Objective:** Create permanent ADR record.
190
1911. **Determine ADR Number:**
192 ```bash
193 # Find highest existing ADR number across all status directories
194 find docs/adr -name "[0-9]*.md" | \
195 sed 's/.*\/\([0-9]*\)-.*/\1/' | \
196 sort -n | tail -1
197 ```
198
1992. **Choose ADR Directory:**
200 - `docs/adr/not_started/` - Decision made, implementation not started
201 - `docs/adr/in_progress/` - Implementation currently underway
202 - `docs/adr/implemented/` - Fully implemented and verified
203
204 **Default:** Use `not_started/` for new decisions unless implementation begins immediately.
205
2063. **Create ADR from Template:**
207 - Copy template: `templates/adr-template.md` or `templates/migration-template.md`
208 - Fill all required sections (no placeholders)
209 - Use next sequential number (e.g., ADR-028)
210 - Use kebab-case for filename: `028-descriptive-title.md`
211
2124. **Complete Required Sections:**
213 - **Status:** Proposed | Accepted | In Progress | Completed
214 - **Date:** Current date (YYYY-MM-DD)
215 - **Context:** Problem statement, current state, motivation
216 - **Decision:** Chosen approach, scope, pattern
217 - **Consequences:** Positive, negative, migration strategy
218 - **Alternatives Considered:** At least 2-3 options with pros/cons
219 - **References:** Links to research, docs, discussions
220
2215. **Add Implementation Tracking (if applicable):**
222 - Files affected
223 - Completion criteria
224 - Testing strategy
225 - Code marker guidelines
226
227### Phase 5: Memory Storage (Persistence)
228
229**Objective:** Store decision in memory graph for future retrieval.
230
2311. **Create Memory Entity:**
232 ```python
233 mcp__memory__create_entities(entities=[{
234 "name": f"ADR-{number}: {title}",
235 "type": "ArchitectureDecision",
236 "observations": [
237 f"Status: {status}",
238 f"Decision: {chosen_option}",
239 f"Rationale: {key_reason}",
240 f"Date: {date}",
241 f"Location: docs/adr/{status_dir}/{number}-{kebab-case-title}/"
242 ]
243 }])
244 ```
245
2462. **Create Relations to Existing Entities:**
247 - Link to affected components
248 - Link to related ADRs (supersedes, relates-to)
249 - Link to architectural patterns
250
2513. **Verify Document Structure:**
252 - **Maximum 2 files per ADR** - see "Document Structure Rule" section
253 - For `not_started/`: Only ADR.md
254 - For `in_progress/`: ADR.md + IMPLEMENTATION_PLAN.md
255 - **NO separate** RESEARCH.md, ANALYSIS.md, EXECUTIVE_SUMMARY.md, or IMPLEMENTATION_NOTES.md
256 - **NO documents in** `.claude/artifacts/`
257
258## Quality Checklist
259
260Before marking the spike complete, verify:
261
262- [ ] **Minimum 2-3 alternatives** evaluated
263- [ ] **Clear recommendation** with justification
264- [ ] **Consequences documented** (positive AND negative)
265- [ ] **ADR created** in correct directory with proper numbering
266- [ ] **All required sections** completed (no placeholder text)
267- [ ] **Memory entity created** with proper observations and relations
268- [ ] **Max 2 files**: ADR.md only (not_started) or ADR.md + IMPLEMENTATION_PLAN.md (in_progress)
269- [ ] **No extra files**: No RESEARCH.md, ANALYSIS.md, EXECUTIVE_SUMMARY.md, IMPLEMENTATION_NOTES.md
270- [ ] **No single-option analysis** (red flag: only one option presented)
271- [ ] **Trade-offs documented** (no "silver bullet" claims)
272- [ ] **Risks identified** with mitigation strategies
273
274## Document Structure Rule (CRITICAL)
275
276**Minimal documents. No redundancy. Human-readable.**
277
278### Document Count by Status
279
280| Status | Documents | Contents |
281|--------|-----------|----------|
282| `not_started/` | **1 file**: ADR.md | Research + Analysis + Decision |
283| `in_progress/` | **2 files**: ADR.md + IMPLEMENTATION_PLAN.md | Add implementation details |
284| `implemented/` | **1-2 files** | Same as in_progress (plan becomes historical record) |
285
286### ✅ CORRECT Structure
287
288**For `not_started/` (decision made, not yet implementing):**
289```
290docs/adr/not_started/005-subprocess-daemon-architecture/
291└── ADR.md # Contains: Executive Summary, Research, Analysis, Decision, Alternatives
292```
293
294**For `in_progress/` (actively implementing):**
295```
296docs/adr/in_progress/005-subprocess-daemon-architecture/
297├── ADR.md # The decision (research + analysis + decision)
298└── IMPLEMENTATION_PLAN.md # How to build it (phases + tasks + notes)
299```
300
301### ❌ WRONG Structure (Too Many Documents)
302```
303docs/adr/in_progress/005-.../
304├── ADR.md
305├── RESEARCH.md # ❌ WRONG: Put in ADR.md
306├── ANALYSIS.md # ❌ WRONG: Put in ADR.md
307├── EXECUTIVE_SUMMARY.md # ❌ WRONG: Put in ADR.md
308├── IMPLEMENTATION_PLAN.md
309└── IMPLEMENTATION_NOTES.md # ❌ WRONG: Put in IMPLEMENTATION_PLAN.md
310```
311
312### The Rule
313
314- **ADR.md** = Research + Analysis + Executive Summary + Decision + Alternatives
315- **IMPLEMENTATION_PLAN.md** = Phases + Tasks + Developer Notes (only when `in_progress/`)
316- **That's it. 1-2 files maximum.**
317
318## Anti-Patterns to Avoid
319
3201. **Single Option Presented:**
321 - ❌ BAD: "We should use PostgreSQL" (no alternatives)
322 - ✅ GOOD: "PostgreSQL vs Neo4j vs Hybrid approach" (multiple options)
323
3242. **Missing Trade-off Analysis:**
325 - ❌ BAD: "Option A is better in every way"
326 - ✅ GOOD: "Option A is faster but harder to maintain"
327
3283. **No Consequence Documentation:**
329 - ❌ BAD: Decision without discussing impact
330 - ✅ GOOD: Positive/negative consequences documented
331
3324. **Skipping Memory Storage:**
333 - ❌ BAD: ADR created but not in memory graph
334 - ✅ GOOD: ADR entity created with relations
335
3365. **Placeholder Text in ADR:**
337 - ❌ BAD: "[TODO: Add alternatives]"
338 - ✅ GOOD: All sections fully completed
339
3406. **Wrong Directory:**
341 - ❌ BAD: Implementation ADR in `not_started/`
342 - ✅ GOOD: ADR directory matches status
343
3447. **No External Research:**
345 - ❌ BAD: Decision based only on opinion
346 - ✅ GOOD: Research references documentation, benchmarks, community discussion
347
3488. **Ignoring Existing ADRs:**
349 - ❌ BAD: Creating conflicting ADR without checking existing
350 - ✅ GOOD: Search existing ADRs, note conflicts/supersessions
351
3529. **Splitting Documents Across Locations:**
353 - ❌ BAD: ADR in `docs/adr/`, research in `.claude/artifacts/`
354 - ✅ GOOD: ALL documents in `docs/adr/{status_dir}/{number}-{kebab-case-title}/`
355
356## Project-Specific Conventions
357
358### ADR Directory Structure (This Project)
359```
360docs/adr/
361├── implemented/ # Completed ADRs (11+ ADRs)
362├── in_progress/ # Active implementation (4+ ADRs)
363├── not_started/ # Proposed/accepted, not started (10+ ADRs)
364├── TEMPLATE-refactor-migration.md
365└── README.md
366```
367
368### Numbering Convention
369- Use 3-digit format: `001`, `028`, `127`
370- Find highest number across ALL status directories
371- Use next sequential number
372- **Do not reuse numbers**
373
374### Filename Convention
375- Format: `{number}-{kebab-case-title}.md`
376- Example: `028-indexing-orchestrator-extraction.md`
377- Keep titles concise (3-7 words)
378
379### Status Values
380- **Proposed:** Initial draft, seeking approval
381- **Accepted:** Approved, awaiting implementation
382- **In Progress:** Currently implementing
383- **Completed:** Fully implemented and verified
384- **Superseded:** Replaced by newer ADR
385
386### Refactor Markers (for in-progress ADRs)
387If ADR is in `in_progress/`, add file-level markers in affected code:
388```python
389# =============================================================================
390# TODO: "Section Name"
391# REFACTOR: [ADR-XXX] Brief description
392# WHY: One-line reason
393# STARTED: YYYY-MM-DD
394# STATUS: IN_PROGRESS
395# PERMANENT_RECORD: docs/adr/in_progress/XXX-title.md
396# ACTIVE_TRACKING: todo.md "Section Name"
397# =============================================================================
398```
399
400See: [Refactor Marker Guide](../quality-detect-refactor-markers/references/refactor-marker-guide.md)
401
402### Integration with todo.md
403For ADRs requiring implementation:
404- Create section in `./todo.md` tracking tasks
405- Reference in ADR's "Active Tracking" section
406- Update ADR's "Progress Log" as work proceeds
407
408## Examples
409
410### Python Examples
411
412- [validate_adr.py](./scripts/validate_adr.py) - Validate ADR completeness and format
413- [find_next_adr_number.sh](./scripts/find_next_adr_number.sh) - Find next ADR number in sequence
414
415### Complete Walkthroughs
416
417See [references/reference.md](references/reference.md) for detailed examples of:
418- Simple architectural decision (library choice)
419- Complex refactor/migration ADR
420- Research spike with external investigation
421- Superseding an existing ADR
422
423## Supporting Files
424
425- **[references/reference.md](references/reference.md):** Detailed technical documentation, ADR template deep-dive, and comprehensive examples
426- **[templates/adr-template.md](templates/adr-template.md):** Complete ADR structure with all required sections
427- **[templates/migration-template.md](templates/migration-template.md):** Detailed migration/refactor planning template
428- **[scripts/validate_adr.py](scripts/validate_adr.py):** Validation script for ADR completeness
429- **[scripts/find_next_adr_number.sh](scripts/find_next_adr_number.sh):** Utility to find next ADR number
430
431## Requirements
432
433**Skills & Tools:**
434- Skill tool access: Read, Grep, Glob, Bash, Write
435- MCP tools: mcp__memory__, mcp__context7__ (for research)
436- Web tools: WebSearch, WebFetch (for external research)
437
438**Project Setup:**
439- `docs/adr/` directory structure exists with status subdirectories (in projects using this skill)
440- ADR templates available at `templates/adr-template.md` and `templates/migration-template.md`
441- Memory system configured for entity storage
442
443**Knowledge:**
444- Understanding of Clean Architecture principles (for this project)
445- Ability to evaluate technical trade-offs
446- Familiarity with ADR format and structure
447
448## Troubleshooting
449
450**Issue: Can't find next ADR number**
451```bash
452# Solution: Use helper script
453./scripts/find_next_adr_number.sh
454
455# Or manually:
456find docs/adr -name "[0-9]*.md" | sed 's/.*\/\([0-9]*\)-.*/\1/' | sort -n | tail -1
457```
458
459**Issue: Don't know which directory to use**
460- **not_started/**: Decision made, no implementation yet (default)
461- **in_progress/**: Currently implementing
462- **implemented/**: Fully complete and verified
463
464**Issue: Alternatives seem equivalent**
465- Good! Document that in the ADR
466- Explain why you chose one over the other (team fit, learning curve, etc.)
467- Consider hybrid approaches
468
469**Issue: Only one viable option**
470- ❌ RED FLAG - dig deeper
471- Minimum 2-3 alternatives required
472- Include "do nothing" as an option if applicable
473- Consider different implementation approaches of the same technology
474
475**Issue: Research taking too long**
476- Set time box (1-2 hours for simple decisions, 4-8 hours for complex)
477- Focus on key decision criteria
478- Note what you didn't research in ADR limitations section
479- Can always update ADR later with more research
480
481**Issue: Memory entity creation fails**
482- Verify memory system is configured and running
483- Check entity name doesn't already exist
484- Simplify observations if too complex
485- Skip memory storage if blocked, but note in ADR
486
487## Success Criteria
488
489An ADR spike is complete when:
4901. ✅ Research conducted (existing ADRs, memory, external sources)
4912. ✅ Alternatives evaluated (2-3+ options)
4923. ✅ Recommendation made with justification
4934. ✅ ADR created with all required sections
4945. ✅ ADR placed in correct directory with proper numbering
4956. ✅ Memory entity created with relations
4967. ✅ Research artifacts saved and referenced
4978. ✅ Quality checklist verified
498
499## Output Format
500
501When completing an ADR spike, provide:
502
5031. **Executive Summary:**
504 - Decision made
505 - Key rationale (2-3 sentences)
506 - Alternatives considered
507
5082. **ADR Location:**
509 - Full path to created ADR
510 - ADR number and title
511
5123. **Memory Entity:**
513 - Entity name
514 - Key observations stored
515
5164. **Next Steps (if applicable):**
517 - Implementation tasks
518 - todo.md section created
519 - Refactor markers needed
520
521## References
522
523- [Refactor Marker Guide](../quality-detect-refactor-markers/references/refactor-marker-guide.md)
524- [ADR Template](templates/adr-template.md)
525- [Migration Template](templates/migration-template.md)
526- [Reference Documentation](references/reference.md) - Detailed examples and walkthroughs
527
528---
529
530**Skill Type:** Project Skill (team workflow)
531**Audience:** @researcher, @planner, any agent making architectural decisions
532**Last Updated:** 2025-10-17