opencode-metis 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +140 -0
- package/dist/cli.cjs +63 -0
- package/dist/mcp-server.cjs +51 -0
- package/dist/plugin.cjs +4 -0
- package/dist/worker.cjs +224 -0
- package/opencode/agent/the-analyst/feature-prioritization.md +66 -0
- package/opencode/agent/the-analyst/market-research.md +77 -0
- package/opencode/agent/the-analyst/project-coordination.md +81 -0
- package/opencode/agent/the-analyst/requirements-analysis.md +77 -0
- package/opencode/agent/the-architect/compatibility-review.md +138 -0
- package/opencode/agent/the-architect/complexity-review.md +137 -0
- package/opencode/agent/the-architect/quality-review.md +67 -0
- package/opencode/agent/the-architect/security-review.md +127 -0
- package/opencode/agent/the-architect/system-architecture.md +119 -0
- package/opencode/agent/the-architect/system-documentation.md +83 -0
- package/opencode/agent/the-architect/technology-research.md +85 -0
- package/opencode/agent/the-chief.md +79 -0
- package/opencode/agent/the-designer/accessibility-implementation.md +101 -0
- package/opencode/agent/the-designer/design-foundation.md +74 -0
- package/opencode/agent/the-designer/interaction-architecture.md +75 -0
- package/opencode/agent/the-designer/user-research.md +70 -0
- package/opencode/agent/the-meta-agent.md +155 -0
- package/opencode/agent/the-platform-engineer/ci-cd-pipelines.md +109 -0
- package/opencode/agent/the-platform-engineer/containerization.md +106 -0
- package/opencode/agent/the-platform-engineer/data-architecture.md +81 -0
- package/opencode/agent/the-platform-engineer/dependency-review.md +144 -0
- package/opencode/agent/the-platform-engineer/deployment-automation.md +81 -0
- package/opencode/agent/the-platform-engineer/infrastructure-as-code.md +107 -0
- package/opencode/agent/the-platform-engineer/performance-tuning.md +82 -0
- package/opencode/agent/the-platform-engineer/pipeline-engineering.md +81 -0
- package/opencode/agent/the-platform-engineer/production-monitoring.md +105 -0
- package/opencode/agent/the-qa-engineer/exploratory-testing.md +66 -0
- package/opencode/agent/the-qa-engineer/performance-testing.md +81 -0
- package/opencode/agent/the-qa-engineer/quality-assurance.md +77 -0
- package/opencode/agent/the-qa-engineer/test-execution.md +66 -0
- package/opencode/agent/the-software-engineer/api-development.md +78 -0
- package/opencode/agent/the-software-engineer/component-development.md +79 -0
- package/opencode/agent/the-software-engineer/concurrency-review.md +141 -0
- package/opencode/agent/the-software-engineer/domain-modeling.md +66 -0
- package/opencode/agent/the-software-engineer/performance-optimization.md +113 -0
- package/opencode/command/analyze.md +149 -0
- package/opencode/command/constitution.md +178 -0
- package/opencode/command/debug.md +194 -0
- package/opencode/command/document.md +178 -0
- package/opencode/command/implement.md +225 -0
- package/opencode/command/refactor.md +207 -0
- package/opencode/command/review.md +229 -0
- package/opencode/command/simplify.md +267 -0
- package/opencode/command/specify.md +191 -0
- package/opencode/command/validate.md +224 -0
- package/opencode/skill/accessibility-design/SKILL.md +566 -0
- package/opencode/skill/accessibility-design/checklists/wcag-checklist.md +435 -0
- package/opencode/skill/agent-coordination/SKILL.md +224 -0
- package/opencode/skill/api-contract-design/SKILL.md +550 -0
- package/opencode/skill/api-contract-design/templates/graphql-schema-template.md +818 -0
- package/opencode/skill/api-contract-design/templates/rest-api-template.md +417 -0
- package/opencode/skill/architecture-design/SKILL.md +160 -0
- package/opencode/skill/architecture-design/examples/architecture-examples.md +170 -0
- package/opencode/skill/architecture-design/template.md +749 -0
- package/opencode/skill/architecture-design/validation.md +99 -0
- package/opencode/skill/architecture-selection/SKILL.md +522 -0
- package/opencode/skill/architecture-selection/examples/adrs/001-example-adr.md +71 -0
- package/opencode/skill/architecture-selection/examples/architecture-patterns.md +239 -0
- package/opencode/skill/bug-diagnosis/SKILL.md +235 -0
- package/opencode/skill/code-quality-review/SKILL.md +337 -0
- package/opencode/skill/code-quality-review/examples/anti-patterns.md +629 -0
- package/opencode/skill/code-quality-review/reference.md +322 -0
- package/opencode/skill/code-review/SKILL.md +363 -0
- package/opencode/skill/code-review/reference.md +450 -0
- package/opencode/skill/codebase-analysis/SKILL.md +139 -0
- package/opencode/skill/codebase-navigation/SKILL.md +227 -0
- package/opencode/skill/codebase-navigation/examples/exploration-patterns.md +263 -0
- package/opencode/skill/coding-conventions/SKILL.md +178 -0
- package/opencode/skill/coding-conventions/checklists/accessibility-checklist.md +176 -0
- package/opencode/skill/coding-conventions/checklists/performance-checklist.md +154 -0
- package/opencode/skill/coding-conventions/checklists/security-checklist.md +127 -0
- package/opencode/skill/constitution-validation/SKILL.md +315 -0
- package/opencode/skill/constitution-validation/examples/CONSTITUTION.md +202 -0
- package/opencode/skill/constitution-validation/reference/rule-patterns.md +328 -0
- package/opencode/skill/constitution-validation/template.md +115 -0
- package/opencode/skill/context-preservation/SKILL.md +445 -0
- package/opencode/skill/data-modeling/SKILL.md +385 -0
- package/opencode/skill/data-modeling/templates/schema-design-template.md +268 -0
- package/opencode/skill/deployment-pipeline-design/SKILL.md +579 -0
- package/opencode/skill/deployment-pipeline-design/templates/pipeline-template.md +633 -0
- package/opencode/skill/documentation-extraction/SKILL.md +259 -0
- package/opencode/skill/documentation-sync/SKILL.md +431 -0
- package/opencode/skill/domain-driven-design/SKILL.md +509 -0
- package/opencode/skill/domain-driven-design/examples/ddd-patterns.md +688 -0
- package/opencode/skill/domain-driven-design/reference.md +465 -0
- package/opencode/skill/drift-detection/SKILL.md +383 -0
- package/opencode/skill/drift-detection/reference.md +340 -0
- package/opencode/skill/error-recovery/SKILL.md +162 -0
- package/opencode/skill/error-recovery/examples/error-patterns.md +484 -0
- package/opencode/skill/feature-prioritization/SKILL.md +419 -0
- package/opencode/skill/feature-prioritization/examples/rice-template.md +139 -0
- package/opencode/skill/feature-prioritization/reference.md +256 -0
- package/opencode/skill/git-workflow/SKILL.md +453 -0
- package/opencode/skill/implementation-planning/SKILL.md +215 -0
- package/opencode/skill/implementation-planning/examples/phase-examples.md +217 -0
- package/opencode/skill/implementation-planning/template.md +220 -0
- package/opencode/skill/implementation-planning/validation.md +88 -0
- package/opencode/skill/implementation-verification/SKILL.md +272 -0
- package/opencode/skill/knowledge-capture/SKILL.md +265 -0
- package/opencode/skill/knowledge-capture/reference/knowledge-capture.md +402 -0
- package/opencode/skill/knowledge-capture/reference.md +444 -0
- package/opencode/skill/knowledge-capture/templates/domain-template.md +325 -0
- package/opencode/skill/knowledge-capture/templates/interface-template.md +255 -0
- package/opencode/skill/knowledge-capture/templates/pattern-template.md +144 -0
- package/opencode/skill/observability-design/SKILL.md +291 -0
- package/opencode/skill/observability-design/references/monitoring-patterns.md +461 -0
- package/opencode/skill/pattern-detection/SKILL.md +171 -0
- package/opencode/skill/pattern-detection/examples/common-patterns.md +359 -0
- package/opencode/skill/performance-analysis/SKILL.md +266 -0
- package/opencode/skill/performance-analysis/references/profiling-tools.md +499 -0
- package/opencode/skill/requirements-analysis/SKILL.md +139 -0
- package/opencode/skill/requirements-analysis/examples/good-prd.md +66 -0
- package/opencode/skill/requirements-analysis/template.md +177 -0
- package/opencode/skill/requirements-analysis/validation.md +69 -0
- package/opencode/skill/requirements-elicitation/SKILL.md +518 -0
- package/opencode/skill/requirements-elicitation/examples/interview-questions.md +226 -0
- package/opencode/skill/requirements-elicitation/examples/user-stories.md +414 -0
- package/opencode/skill/safe-refactoring/SKILL.md +312 -0
- package/opencode/skill/safe-refactoring/reference/code-smells.md +347 -0
- package/opencode/skill/security-assessment/SKILL.md +421 -0
- package/opencode/skill/security-assessment/checklists/security-review-checklist.md +285 -0
- package/opencode/skill/specification-management/SKILL.md +143 -0
- package/opencode/skill/specification-management/readme-template.md +32 -0
- package/opencode/skill/specification-management/reference.md +115 -0
- package/opencode/skill/specification-management/spec.py +229 -0
- package/opencode/skill/specification-validation/SKILL.md +397 -0
- package/opencode/skill/specification-validation/reference/3cs-framework.md +306 -0
- package/opencode/skill/specification-validation/reference/ambiguity-detection.md +132 -0
- package/opencode/skill/specification-validation/reference/constitution-validation.md +301 -0
- package/opencode/skill/specification-validation/reference/drift-detection.md +383 -0
- package/opencode/skill/task-delegation/SKILL.md +607 -0
- package/opencode/skill/task-delegation/examples/file-coordination.md +495 -0
- package/opencode/skill/task-delegation/examples/parallel-research.md +337 -0
- package/opencode/skill/task-delegation/examples/sequential-build.md +504 -0
- package/opencode/skill/task-delegation/reference.md +825 -0
- package/opencode/skill/tech-stack-detection/SKILL.md +89 -0
- package/opencode/skill/tech-stack-detection/references/framework-signatures.md +598 -0
- package/opencode/skill/technical-writing/SKILL.md +190 -0
- package/opencode/skill/technical-writing/templates/adr-template.md +205 -0
- package/opencode/skill/technical-writing/templates/system-doc-template.md +380 -0
- package/opencode/skill/test-design/SKILL.md +464 -0
- package/opencode/skill/test-design/examples/test-pyramid.md +724 -0
- package/opencode/skill/testing/SKILL.md +213 -0
- package/opencode/skill/testing/examples/test-pyramid.md +724 -0
- package/opencode/skill/user-insight-synthesis/SKILL.md +576 -0
- package/opencode/skill/user-insight-synthesis/templates/research-plan-template.md +217 -0
- package/opencode/skill/user-research/SKILL.md +508 -0
- package/opencode/skill/user-research/examples/interview-questions.md +265 -0
- package/opencode/skill/user-research/examples/personas.md +267 -0
- package/opencode/skill/vibe-security/SKILL.md +654 -0
- package/package.json +45 -0
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: technical-writing
|
|
3
|
+
description: "Create architectural decision records (ADRs), system documentation, API documentation, and operational runbooks. Use when capturing design decisions, documenting system architecture, creating API references, or writing operational procedures."
|
|
4
|
+
license: MIT
|
|
5
|
+
compatibility: opencode
|
|
6
|
+
metadata:
|
|
7
|
+
category: development
|
|
8
|
+
version: "1.0"
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# Technical Writing
|
|
12
|
+
|
|
13
|
+
Roleplay as a technical writing specialist that creates ADRs, system documentation, API references, and operational runbooks that preserve knowledge and enable informed decision-making.
|
|
14
|
+
|
|
15
|
+
TechnicalWriting {
|
|
16
|
+
Activation {
|
|
17
|
+
Recording architectural or design decisions with context and rationale
|
|
18
|
+
Documenting system architecture for new team members or stakeholders
|
|
19
|
+
Creating API documentation for internal or external consumers
|
|
20
|
+
Writing runbooks for operational procedures and incident response
|
|
21
|
+
Capturing tribal knowledge before it's lost to team changes
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
DocumentationTypes {
|
|
25
|
+
ArchitectureDecisionRecords {
|
|
26
|
+
Purpose => Capture context, options considered, and rationale behind significant architectural decisions
|
|
27
|
+
Value => Historical record that helps future developers understand why the system is built a certain way
|
|
28
|
+
|
|
29
|
+
WhenToCreate {
|
|
30
|
+
Choosing between different technologies, frameworks, or approaches
|
|
31
|
+
Making decisions that are difficult or expensive to reverse
|
|
32
|
+
Establishing patterns that will be followed across the codebase
|
|
33
|
+
Deprecating existing approaches in favor of new ones
|
|
34
|
+
Any decision that a future developer might question
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
Template => See [adr-template.md](templates/adr-template.md)
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
SystemDocumentation {
|
|
41
|
+
Purpose => Comprehensive view of how a system works, its components, and their relationships
|
|
42
|
+
Value => Helps new team members onboard and serves as a reference for operations
|
|
43
|
+
|
|
44
|
+
KeyElements {
|
|
45
|
+
System overview and purpose
|
|
46
|
+
Architecture diagrams showing component relationships
|
|
47
|
+
Data flows and integration points
|
|
48
|
+
Deployment architecture
|
|
49
|
+
Operational requirements
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
Template => See [system-doc-template.md](templates/system-doc-template.md)
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
APIDocumentation {
|
|
56
|
+
Purpose => Describes how to interact with a service
|
|
57
|
+
|
|
58
|
+
KeyElements {
|
|
59
|
+
Authentication and authorization
|
|
60
|
+
Endpoint reference with examples
|
|
61
|
+
Request and response schemas
|
|
62
|
+
Error codes and handling
|
|
63
|
+
Rate limits and quotas
|
|
64
|
+
Versioning strategy
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
Runbooks {
|
|
69
|
+
Purpose => Step-by-step procedures for operational tasks, from routine maintenance to incident response
|
|
70
|
+
|
|
71
|
+
KeyElements {
|
|
72
|
+
Pre-requisites and access requirements
|
|
73
|
+
Step-by-step procedures with expected outcomes
|
|
74
|
+
Troubleshooting common issues
|
|
75
|
+
Escalation paths
|
|
76
|
+
Recovery procedures
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
DocumentationPatterns {
|
|
82
|
+
DecisionContextFirst {
|
|
83
|
+
Rule => Always document the context and constraints that led to a decision before stating the decision itself
|
|
84
|
+
Why => Future readers need to understand the "why" before the "what"
|
|
85
|
+
|
|
86
|
+
Example {
|
|
87
|
+
```markdown
|
|
88
|
+
## Context
|
|
89
|
+
|
|
90
|
+
We need to store user session data that must be:
|
|
91
|
+
- Available across multiple application instances
|
|
92
|
+
- Retrieved in under 10ms
|
|
93
|
+
- Retained for 24 hours after last activity
|
|
94
|
+
|
|
95
|
+
Our current database is PostgreSQL, which would require additional
|
|
96
|
+
infrastructure for session management.
|
|
97
|
+
|
|
98
|
+
## Decision
|
|
99
|
+
|
|
100
|
+
We will use Redis for session storage.
|
|
101
|
+
```
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
LivingDocumentation {
|
|
106
|
+
Rule => Documentation should be updated as part of the development process, not as an afterthought
|
|
107
|
+
Integration => Include documentation updates in definition of done
|
|
108
|
+
|
|
109
|
+
Practices {
|
|
110
|
+
Update ADRs when decisions change (mark old ones as superseded)
|
|
111
|
+
Revise system docs when architecture evolves
|
|
112
|
+
Keep API docs in sync with implementation (prefer generated docs where possible)
|
|
113
|
+
Review runbooks after each incident for accuracy
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
AudienceAppropriateDetail {
|
|
118
|
+
Rule => Tailor documentation depth to its intended audience
|
|
119
|
+
|
|
120
|
+
| Audience | Focus | Detail Level |
|
|
121
|
+
|----------|-------|--------------|
|
|
122
|
+
| New developers | Onboarding, getting started | High-level concepts, step-by-step guides |
|
|
123
|
+
| Experienced team | Reference, troubleshooting | Technical details, edge cases |
|
|
124
|
+
| Operations | Deployment, monitoring | Procedures, commands, expected outputs |
|
|
125
|
+
| Business stakeholders | Capabilities, limitations | Non-technical summaries, diagrams |
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
DiagramsOverProse {
|
|
129
|
+
Rule => Use diagrams to communicate complex relationships
|
|
130
|
+
Why => A well-designed diagram can replace pages of text and is easier to maintain
|
|
131
|
+
|
|
132
|
+
RecommendedDiagramTypes {
|
|
133
|
+
SystemContext => Shows system boundaries and external interactions
|
|
134
|
+
Container => Shows major components and their relationships
|
|
135
|
+
Sequence => Shows how components interact for specific flows
|
|
136
|
+
DataFlow => Shows how data moves through the system
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
ExecutableDocumentation {
|
|
141
|
+
Rule => Where possible, make documentation executable or verifiable
|
|
142
|
+
|
|
143
|
+
Examples {
|
|
144
|
+
API examples that can be run against a test environment
|
|
145
|
+
Code snippets that are extracted from actual tested code
|
|
146
|
+
Configuration examples that are validated in CI
|
|
147
|
+
Runbook steps that have been recently executed
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
ADRLifecycle {
|
|
153
|
+
States {
|
|
154
|
+
Proposed => Decision is being discussed, not yet accepted
|
|
155
|
+
Accepted => Decision has been made and should be followed
|
|
156
|
+
Deprecated => Decision is being phased out, new work should not follow it
|
|
157
|
+
Superseded => Decision has been replaced by a newer ADR (link to new one)
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
SupersedingProcess {
|
|
161
|
+
1. Add "Superseded by ADR-XXX" to the old record
|
|
162
|
+
2. Add "Supersedes ADR-YYY" to the new record
|
|
163
|
+
3. Explain what changed and why in the new ADR's context
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
BestPractices {
|
|
168
|
+
Write documentation close to the code it describes (prefer docs-as-code)
|
|
169
|
+
Use templates consistently to make documentation predictable
|
|
170
|
+
Include diagrams for architecture; text for procedures
|
|
171
|
+
Date all documents and note last review date
|
|
172
|
+
Keep ADRs immutable once accepted (create new ones to supersede)
|
|
173
|
+
Store documentation in version control alongside code
|
|
174
|
+
Review documentation accuracy during code reviews
|
|
175
|
+
Delete or archive documentation for removed features
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
AntiPatterns {
|
|
179
|
+
DocumentationDrift => Docs that no longer match reality are worse than no docs
|
|
180
|
+
OverDocumentation => Documenting obvious code reduces signal-to-noise
|
|
181
|
+
WikiSprawl => Documentation scattered across multiple systems becomes unfindable
|
|
182
|
+
FutureFiction => Documenting features that don't exist yet as if they do
|
|
183
|
+
WriteOnlyDocs => Creating docs that no one reads or maintains
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
## References
|
|
188
|
+
|
|
189
|
+
- [adr-template.md](templates/adr-template.md) - Architecture Decision Record template
|
|
190
|
+
- [system-doc-template.md](templates/system-doc-template.md) - System documentation template
|
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
# Template: Architecture Decision Record (ADR)
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
|
|
5
|
+
Use this template to document significant architectural and design decisions. ADRs capture the context, options considered, and rationale behind decisions that are:
|
|
6
|
+
|
|
7
|
+
- Difficult or expensive to reverse
|
|
8
|
+
- Foundational to how the system works
|
|
9
|
+
- Likely to be questioned by future developers
|
|
10
|
+
- Establishing patterns for the codebase
|
|
11
|
+
|
|
12
|
+
## Template
|
|
13
|
+
|
|
14
|
+
```markdown
|
|
15
|
+
# ADR-[NUMBER]: [SHORT TITLE]
|
|
16
|
+
|
|
17
|
+
**Status:** [Proposed | Accepted | Deprecated | Superseded by ADR-XXX]
|
|
18
|
+
**Date:** [YYYY-MM-DD when decision was made]
|
|
19
|
+
**Decision Makers:** [Names or roles involved in the decision]
|
|
20
|
+
|
|
21
|
+
## Context
|
|
22
|
+
|
|
23
|
+
[Describe the situation that requires a decision. Include:]
|
|
24
|
+
|
|
25
|
+
- What problem are you solving?
|
|
26
|
+
- What constraints exist (technical, business, timeline)?
|
|
27
|
+
- What assumptions are you making?
|
|
28
|
+
- What is the current state of the system?
|
|
29
|
+
|
|
30
|
+
[Be specific enough that someone unfamiliar with the project can understand
|
|
31
|
+
the situation. Avoid jargon without explanation.]
|
|
32
|
+
|
|
33
|
+
## Decision Drivers
|
|
34
|
+
|
|
35
|
+
[List the key factors that will influence this decision:]
|
|
36
|
+
|
|
37
|
+
- [Driver 1: e.g., "Must support 10,000 concurrent users"]
|
|
38
|
+
- [Driver 2: e.g., "Team has limited experience with NoSQL databases"]
|
|
39
|
+
- [Driver 3: e.g., "Budget constraints limit managed service options"]
|
|
40
|
+
|
|
41
|
+
## Options Considered
|
|
42
|
+
|
|
43
|
+
### Option 1: [Name]
|
|
44
|
+
|
|
45
|
+
[Brief description of this option]
|
|
46
|
+
|
|
47
|
+
**Pros:**
|
|
48
|
+
- [Advantage 1]
|
|
49
|
+
- [Advantage 2]
|
|
50
|
+
|
|
51
|
+
**Cons:**
|
|
52
|
+
- [Disadvantage 1]
|
|
53
|
+
- [Disadvantage 2]
|
|
54
|
+
|
|
55
|
+
### Option 2: [Name]
|
|
56
|
+
|
|
57
|
+
[Brief description of this option]
|
|
58
|
+
|
|
59
|
+
**Pros:**
|
|
60
|
+
- [Advantage 1]
|
|
61
|
+
- [Advantage 2]
|
|
62
|
+
|
|
63
|
+
**Cons:**
|
|
64
|
+
- [Disadvantage 1]
|
|
65
|
+
- [Disadvantage 2]
|
|
66
|
+
|
|
67
|
+
### Option 3: [Name]
|
|
68
|
+
|
|
69
|
+
[Brief description of this option]
|
|
70
|
+
|
|
71
|
+
**Pros:**
|
|
72
|
+
- [Advantage 1]
|
|
73
|
+
- [Advantage 2]
|
|
74
|
+
|
|
75
|
+
**Cons:**
|
|
76
|
+
- [Disadvantage 1]
|
|
77
|
+
- [Disadvantage 2]
|
|
78
|
+
|
|
79
|
+
## Decision
|
|
80
|
+
|
|
81
|
+
[State the decision clearly and unambiguously.]
|
|
82
|
+
|
|
83
|
+
We will use **[Option X]** because [primary reason].
|
|
84
|
+
|
|
85
|
+
## Rationale
|
|
86
|
+
|
|
87
|
+
[Explain why this option was chosen over the alternatives:]
|
|
88
|
+
|
|
89
|
+
- How does it address the decision drivers?
|
|
90
|
+
- What trade-offs are being made?
|
|
91
|
+
- Why were other options rejected?
|
|
92
|
+
|
|
93
|
+
[This section should help future readers understand the thinking process,
|
|
94
|
+
not just the outcome.]
|
|
95
|
+
|
|
96
|
+
## Consequences
|
|
97
|
+
|
|
98
|
+
### Positive
|
|
99
|
+
|
|
100
|
+
- [Benefit 1 this decision enables]
|
|
101
|
+
- [Benefit 2 this decision enables]
|
|
102
|
+
|
|
103
|
+
### Negative
|
|
104
|
+
|
|
105
|
+
- [Drawback 1 we are accepting]
|
|
106
|
+
- [Drawback 2 we are accepting]
|
|
107
|
+
|
|
108
|
+
### Neutral
|
|
109
|
+
|
|
110
|
+
- [Side effect that is neither clearly positive nor negative]
|
|
111
|
+
|
|
112
|
+
## Implementation Notes
|
|
113
|
+
|
|
114
|
+
[Optional: Include any specific guidance for implementing this decision:]
|
|
115
|
+
|
|
116
|
+
- Migration path from current state
|
|
117
|
+
- Key technical details
|
|
118
|
+
- Dependencies or prerequisites
|
|
119
|
+
- Estimated effort
|
|
120
|
+
|
|
121
|
+
## Related Decisions
|
|
122
|
+
|
|
123
|
+
- [ADR-XXX: Related decision about Y]
|
|
124
|
+
- [ADR-YYY: This decision supersedes/is superseded by]
|
|
125
|
+
|
|
126
|
+
## References
|
|
127
|
+
|
|
128
|
+
- [Link to relevant documentation, research, or discussions]
|
|
129
|
+
- [Link to spike or proof-of-concept if applicable]
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
## Usage Instructions
|
|
133
|
+
|
|
134
|
+
1. Copy the template above into a new file named `ADR-[NUMBER]-[slug].md`
|
|
135
|
+
2. Number ADRs sequentially (ADR-001, ADR-002, etc.)
|
|
136
|
+
3. Fill in the status as "Proposed" during discussion
|
|
137
|
+
4. Update status to "Accepted" when decision is finalized
|
|
138
|
+
5. Never edit accepted ADRs; create new ones that supersede them
|
|
139
|
+
6. Store ADRs in a `docs/decisions/` or `docs/adr/` directory
|
|
140
|
+
|
|
141
|
+
## Numbering Convention
|
|
142
|
+
|
|
143
|
+
Use zero-padded sequential numbers:
|
|
144
|
+
- `ADR-001-use-postgresql-for-persistence.md`
|
|
145
|
+
- `ADR-002-adopt-event-sourcing-pattern.md`
|
|
146
|
+
- `ADR-003-migrate-to-kubernetes.md`
|
|
147
|
+
|
|
148
|
+
## Status Transitions
|
|
149
|
+
|
|
150
|
+
```
|
|
151
|
+
Proposed --> Accepted --> Deprecated
|
|
152
|
+
--> Superseded by ADR-XXX
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
- **Proposed**: Under discussion, not yet binding
|
|
156
|
+
- **Accepted**: Decision is made and should be followed
|
|
157
|
+
- **Deprecated**: Being phased out, do not use for new work
|
|
158
|
+
- **Superseded**: Replaced by a newer ADR (always link to it)
|
|
159
|
+
|
|
160
|
+
## Examples
|
|
161
|
+
|
|
162
|
+
### Good ADR Title
|
|
163
|
+
- "Use PostgreSQL for primary data storage"
|
|
164
|
+
- "Adopt event-driven architecture for order processing"
|
|
165
|
+
- "Implement feature flags using LaunchDarkly"
|
|
166
|
+
|
|
167
|
+
### Poor ADR Title
|
|
168
|
+
- "Database decision" (too vague)
|
|
169
|
+
- "We should use PostgreSQL because it's better" (includes rationale in title)
|
|
170
|
+
- "ADR about the thing we discussed" (not descriptive)
|
|
171
|
+
|
|
172
|
+
### Good Context Section
|
|
173
|
+
|
|
174
|
+
```markdown
|
|
175
|
+
## Context
|
|
176
|
+
|
|
177
|
+
Our application currently stores all data in a single MySQL 5.7 database
|
|
178
|
+
hosted on AWS RDS. We are experiencing:
|
|
179
|
+
|
|
180
|
+
- Query latency exceeding 500ms for reporting queries
|
|
181
|
+
- Lock contention during high-write periods (daily imports)
|
|
182
|
+
- Storage costs increasing 20% month-over-month
|
|
183
|
+
|
|
184
|
+
The team has been asked to reduce p95 latency to under 100ms while
|
|
185
|
+
supporting 3x current data volume within 6 months. Our team has
|
|
186
|
+
production experience with PostgreSQL and limited experience with
|
|
187
|
+
NoSQL databases.
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
### Poor Context Section
|
|
191
|
+
|
|
192
|
+
```markdown
|
|
193
|
+
## Context
|
|
194
|
+
|
|
195
|
+
We need a better database because the current one is slow.
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
## Tips for Effective ADRs
|
|
199
|
+
|
|
200
|
+
1. **Write for future readers**: Assume the reader has no context about your project
|
|
201
|
+
2. **Be honest about trade-offs**: Every decision has downsides; document them
|
|
202
|
+
3. **Include rejected options**: Understanding why alternatives were rejected is valuable
|
|
203
|
+
4. **Keep it concise**: ADRs should be readable in 5-10 minutes
|
|
204
|
+
5. **Link to evidence**: Reference benchmarks, spikes, or discussions that informed the decision
|
|
205
|
+
6. **Date your decisions**: Context changes; knowing when a decision was made matters
|