opencode-sdlc-plugin 0.2.1 → 0.3.1
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/LICENSE +18 -0
- package/README.md +127 -38
- package/commands/sdlc-adr.md +245 -17
- package/commands/sdlc-debug.md +376 -0
- package/commands/sdlc-design.md +205 -47
- package/commands/sdlc-dev.md +544 -0
- package/commands/sdlc-info.md +325 -0
- package/commands/sdlc-parallel.md +283 -0
- package/commands/sdlc-recall.md +203 -8
- package/commands/sdlc-remember.md +126 -9
- package/commands/sdlc-research.md +343 -0
- package/commands/sdlc-review.md +201 -128
- package/commands/sdlc-status.md +297 -0
- package/config/presets/copilot-only.json +69 -0
- package/config/presets/enterprise.json +79 -0
- package/config/presets/event-modeling.json +74 -8
- package/config/presets/minimal.json +70 -0
- package/config/presets/solo-quick.json +70 -0
- package/config/presets/standard.json +78 -0
- package/config/presets/strict-tdd.json +79 -0
- package/config/schemas/athena.schema.json +338 -0
- package/config/schemas/sdlc.schema.json +442 -26
- package/dist/cli/index.d.ts +2 -1
- package/dist/cli/index.js +4285 -562
- package/dist/cli/index.js.map +1 -1
- package/dist/index.d.ts +1781 -1
- package/dist/index.js +7759 -395
- package/dist/index.js.map +1 -1
- package/dist/plugin/index.d.ts +17 -2
- package/dist/plugin/index.js +7730 -397
- package/dist/plugin/index.js.map +1 -1
- package/package.json +68 -33
- package/prompts/agents/code-reviewer.md +229 -0
- package/prompts/agents/domain.md +210 -0
- package/prompts/agents/green.md +148 -0
- package/prompts/agents/mutation.md +278 -0
- package/prompts/agents/red.md +112 -0
- package/prompts/event-modeling/discovery.md +176 -0
- package/prompts/event-modeling/gwt-generation.md +479 -0
- package/prompts/event-modeling/workflow-design.md +318 -0
- package/prompts/personas/amelia-developer.md +43 -0
- package/prompts/personas/bob-sm.md +43 -0
- package/prompts/personas/john-pm.md +43 -0
- package/prompts/personas/mary-analyst.md +43 -0
- package/prompts/personas/murat-tester.md +43 -0
- package/prompts/personas/paige-techwriter.md +43 -0
- package/prompts/personas/sally-ux.md +43 -0
- package/prompts/personas/winston-architect.md +43 -0
- package/agents/design-facilitator.md +0 -8
- package/agents/domain.md +0 -9
- package/agents/exploration.md +0 -8
- package/agents/green.md +0 -9
- package/agents/marvin.md +0 -15
- package/agents/model-checker.md +0 -9
- package/agents/red.md +0 -9
- package/commands/sdlc-domain-audit.md +0 -32
- package/commands/sdlc-plan.md +0 -63
- package/commands/sdlc-pr.md +0 -43
- package/commands/sdlc-setup.md +0 -50
- package/commands/sdlc-start.md +0 -34
- package/commands/sdlc-work.md +0 -118
- package/config/presets/traditional.json +0 -12
- package/skills/adr-policy.md +0 -21
- package/skills/atomic-design.md +0 -39
- package/skills/debugging-protocol.md +0 -47
- package/skills/event-modeling.md +0 -40
- package/skills/git-spice.md +0 -44
- package/skills/github-issues.md +0 -44
- package/skills/memory-protocol.md +0 -41
- package/skills/orchestration.md +0 -118
- package/skills/skill-enforcement.md +0 -56
- package/skills/tdd-constraints.md +0 -63
package/LICENSE
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
MIT No Attribution
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so.
|
|
11
|
+
|
|
12
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
13
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
14
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
15
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
16
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
17
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
18
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,60 +1,149 @@
|
|
|
1
|
-
# SDLC Plugin
|
|
1
|
+
# OpenCode SDLC Plugin
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
> **Strict TDD with domain modeling and event sourcing**
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Enforced software development lifecycle for [OpenCode](https://opencode.ai) with TDD cycle enforcement, domain-driven design, and GitHub Issues integration.
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
7
|
+
[](https://www.npmjs.com/package/opencode-sdlc-plugin)
|
|
8
|
+
[](https://opensource.org/licenses/MIT)
|
|
9
|
+
|
|
10
|
+
## What is OpenCode SDLC?
|
|
11
|
+
|
|
12
|
+
OpenCode SDLC Plugin enforces strict software development practices through automated tooling:
|
|
13
|
+
|
|
14
|
+
- **TDD Cycle Enforcement** - RED → DOMAIN → GREEN → DOMAIN with strict file ownership
|
|
15
|
+
- **Domain Modeling** - Type-driven development with domain agent veto power
|
|
16
|
+
- **Event Modeling** - Optional planning methodology for event-sourced systems
|
|
17
|
+
- **GitHub Issues Integration** - Work items tracked via GitHub Issues and project boards
|
|
18
|
+
- **Orchestrator-Only Pattern** - Main conversation delegates all file writes to agents
|
|
19
|
+
|
|
20
|
+
| Traditional Development | With SDLC Plugin |
|
|
21
|
+
|------------------------|------------------|
|
|
22
|
+
| Manual TDD discipline | Enforced TDD cycle |
|
|
23
|
+
| Domain violations slip through | Domain agent veto power |
|
|
24
|
+
| Mixed test/source edits | Strict file ownership |
|
|
25
|
+
| Manual issue tracking | Automated GitHub sync |
|
|
26
|
+
| Ad-hoc code reviews | 3-stage PR review |
|
|
12
27
|
|
|
13
28
|
## Quick Start
|
|
14
29
|
|
|
15
30
|
```bash
|
|
16
|
-
|
|
17
|
-
opencode-sdlc-plugin install
|
|
18
|
-
opencode
|
|
31
|
+
npx opencode-sdlc install
|
|
19
32
|
```
|
|
20
33
|
|
|
21
|
-
|
|
34
|
+
The interactive installer will:
|
|
35
|
+
1. Ask about your LLM subscriptions (Claude, OpenAI, Google, GitHub Copilot)
|
|
36
|
+
2. Configure agent models for TDD roles
|
|
37
|
+
3. Set up GitHub integration
|
|
38
|
+
4. Install bridge commands
|
|
39
|
+
|
|
40
|
+
## Requirements
|
|
41
|
+
|
|
42
|
+
- [OpenCode](https://opencode.ai/docs) 1.0.132+
|
|
43
|
+
- Node.js 20+
|
|
44
|
+
- GitHub CLI (`gh`) with authentication
|
|
45
|
+
- One or more LLM subscriptions:
|
|
46
|
+
- Claude Pro/Max (recommended)
|
|
47
|
+
- ChatGPT Plus/Pro
|
|
48
|
+
- Google/Gemini
|
|
49
|
+
- GitHub Copilot
|
|
50
|
+
|
|
51
|
+
## TDD Cycle Enforcement
|
|
52
|
+
|
|
53
|
+
The plugin enforces a strict 4-phase TDD cycle:
|
|
22
54
|
|
|
23
|
-
```text
|
|
24
|
-
/sdlc-setup
|
|
25
|
-
/sdlc-start
|
|
26
55
|
```
|
|
56
|
+
RED → DOMAIN → GREEN → DOMAIN → [repeat or refactor]
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
### Phase Details
|
|
60
|
+
|
|
61
|
+
| Phase | Agent | Purpose | Can Edit |
|
|
62
|
+
|-------|-------|---------|----------|
|
|
63
|
+
| **RED** | `sdlc_red` | Write ONE failing test | Test files only |
|
|
64
|
+
| **DOMAIN** (after RED) | `sdlc_domain` | Review test, create types | Type definitions |
|
|
65
|
+
| **GREEN** | `sdlc_green` | Make test pass | Source files only |
|
|
66
|
+
| **DOMAIN** (after GREEN) | `sdlc_domain` | Verify domain integrity | Type definitions |
|
|
67
|
+
|
|
68
|
+
### Domain Agent Veto Power
|
|
69
|
+
|
|
70
|
+
The domain agent can block workflow for:
|
|
71
|
+
- **Primitive obsession** - Using `String` instead of `Email`
|
|
72
|
+
- **Structural types** - Using `NonEmptyString` instead of `UserName`
|
|
73
|
+
- **Invalid states representable** - Using boolean flags instead of enum variants
|
|
74
|
+
- **Parse-don't-validate violations** - Checking email in business logic instead of at boundary
|
|
27
75
|
|
|
28
76
|
## Commands
|
|
29
77
|
|
|
30
|
-
|
|
31
|
-
- `/sdlc-start`: Route to the correct SDLC phase
|
|
32
|
-
- `/sdlc-design`: Exploration, discovery, workflow design, GWT, architecture
|
|
33
|
-
- `/sdlc-plan`: Create GitHub issues from slices
|
|
34
|
-
- `/sdlc-work`: Implement issues with TDD + domain reviews
|
|
35
|
-
- `/sdlc-review`: Quality gate + party review
|
|
36
|
-
- `/sdlc-adr`: ADR management
|
|
37
|
-
- `/sdlc-domain-audit`: On-demand domain audit
|
|
38
|
-
- `/sdlc-remember`: Store knowledge in memento MCP
|
|
39
|
-
- `/sdlc-recall`: Retrieve knowledge from memento MCP
|
|
78
|
+
After installation, these commands are available in OpenCode:
|
|
40
79
|
|
|
41
|
-
|
|
80
|
+
| Command | Description |
|
|
81
|
+
|---------|-------------|
|
|
82
|
+
| `/sdlc-dev` | Start/continue work on current issue |
|
|
83
|
+
| `/sdlc-review` | 3-stage PR review (spec, quality, domain) |
|
|
84
|
+
| `/sdlc-debug` | Debug with Oracle (deep reasoning) |
|
|
85
|
+
| `/sdlc-research` | Research with Librarian + MCPs |
|
|
86
|
+
| `/sdlc-status` | View/update issue status |
|
|
87
|
+
| `/sdlc-info` | Show toolkit configuration |
|
|
42
88
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
-
|
|
48
|
-
-
|
|
89
|
+
## GitHub Issues Integration
|
|
90
|
+
|
|
91
|
+
Work items are tracked via GitHub Issues instead of local files:
|
|
92
|
+
|
|
93
|
+
- Issues are the source of truth
|
|
94
|
+
- Acceptance criteria become todos
|
|
95
|
+
- Todos sync back to issue checkboxes
|
|
96
|
+
- Project board columns track status
|
|
49
97
|
|
|
50
|
-
|
|
98
|
+
### Todo Format
|
|
51
99
|
|
|
52
|
-
|
|
53
|
-
|
|
100
|
+
```
|
|
101
|
+
[#42ΔAC1] Implement login endpoint
|
|
102
|
+
[#42ΔAC2] Add rate limiting
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
## Configuration
|
|
106
|
+
|
|
107
|
+
Configuration files are stored in `~/.config/opencode/`:
|
|
108
|
+
|
|
109
|
+
- `sdlc.json` - SDLC plugin settings
|
|
110
|
+
- `oh-my-opencode.json` - Agent model configuration
|
|
111
|
+
- `opencode.json` - Plugin registration
|
|
54
112
|
|
|
55
|
-
|
|
113
|
+
### Presets
|
|
56
114
|
|
|
57
115
|
```bash
|
|
58
|
-
|
|
59
|
-
|
|
116
|
+
npx opencode-sdlc install --preset minimal # Basic TDD, standard git
|
|
117
|
+
npx opencode-sdlc install --preset standard # TDD + review + memento
|
|
118
|
+
npx opencode-sdlc install --preset strict-tdd # Full TDD + mutation testing
|
|
119
|
+
npx opencode-sdlc install --preset event-modeling # Standard + event modeling
|
|
60
120
|
```
|
|
121
|
+
|
|
122
|
+
### Project Overrides
|
|
123
|
+
|
|
124
|
+
Create `.opencode/sdlc.json` in your project root to override global settings.
|
|
125
|
+
|
|
126
|
+
## Troubleshooting
|
|
127
|
+
|
|
128
|
+
```bash
|
|
129
|
+
npx opencode-sdlc doctor # Diagnose issues
|
|
130
|
+
npx opencode-sdlc doctor --fix # Auto-fix common problems
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
## Development Status
|
|
134
|
+
|
|
135
|
+
This project is currently in active development for v0.3.0. See [AGENTS.md](AGENTS.md) for the implementation plan and GitHub issues.
|
|
136
|
+
|
|
137
|
+
**Project Board:** https://github.com/users/jwilger/projects/27
|
|
138
|
+
|
|
139
|
+
## Credits
|
|
140
|
+
|
|
141
|
+
Built on top of:
|
|
142
|
+
|
|
143
|
+
- [OpenCode](https://opencode.ai) by SST
|
|
144
|
+
- [oh-my-opencode](https://github.com/code-yeongyu/oh-my-opencode) by code-yeongyu
|
|
145
|
+
- [opencode-athena](https://github.com/ZebulonRouseFrantzich/opencode-athena) by ZebulonRouseFrantzich
|
|
146
|
+
|
|
147
|
+
## License
|
|
148
|
+
|
|
149
|
+
MIT - See [LICENSE](LICENSE) for details.
|
package/commands/sdlc-adr.md
CHANGED
|
@@ -1,37 +1,265 @@
|
|
|
1
1
|
---
|
|
2
|
-
description: Manage
|
|
2
|
+
description: Manage Architecture Decision Records (ADRs)
|
|
3
3
|
---
|
|
4
4
|
|
|
5
|
-
# SDLC ADR
|
|
5
|
+
# SDLC ADR - Architecture Decision Records
|
|
6
6
|
|
|
7
|
-
##
|
|
7
|
+
## Overview
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
Architecture Decision Records (ADRs) document significant architectural decisions. This command helps you:
|
|
10
|
+
- Create new ADRs with proper structure
|
|
11
|
+
- List existing ADRs and their status
|
|
12
|
+
- Synthesize accepted ADRs into ARCHITECTURE.md
|
|
10
13
|
|
|
11
|
-
|
|
12
|
-
- Before ANY task, call `sdlc_recall({ query: "adr decision" })`
|
|
13
|
-
- You MUST NOT edit files directly. Delegate to subagents.
|
|
14
|
+
## Usage
|
|
14
15
|
|
|
15
|
-
|
|
16
|
+
```
|
|
17
|
+
/sdlc:adr [action] [arguments]
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
### Actions
|
|
21
|
+
|
|
22
|
+
- `create <title>` - Create a new ADR
|
|
23
|
+
- `list` - List all ADRs with status
|
|
24
|
+
- `synthesize` - Generate ARCHITECTURE.md from accepted ADRs
|
|
25
|
+
- (no action) - Interactive mode
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
## Action 1: Create ADR
|
|
30
|
+
|
|
31
|
+
When user runs `/sdlc:adr create <title>`:
|
|
32
|
+
|
|
33
|
+
### Step 1: Gather Information
|
|
34
|
+
|
|
35
|
+
Ask the user for ADR details:
|
|
36
|
+
|
|
37
|
+
```
|
|
38
|
+
Creating ADR: "{title}"
|
|
39
|
+
|
|
40
|
+
Please provide the following information:
|
|
41
|
+
|
|
42
|
+
1. **Context**: What is the issue we're addressing? What forces are at play?
|
|
43
|
+
|
|
44
|
+
2. **Decision**: What is the change we're proposing or have decided?
|
|
45
|
+
|
|
46
|
+
3. **Consequences**: What are the positive and negative outcomes of this decision?
|
|
47
|
+
|
|
48
|
+
You can provide brief summaries and I'll help structure the ADR.
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
### Step 2: Create the ADR
|
|
52
|
+
|
|
53
|
+
```
|
|
54
|
+
sdlc_adr({
|
|
55
|
+
action: "create",
|
|
56
|
+
title: "<title>",
|
|
57
|
+
context: "<context from user>",
|
|
58
|
+
decision: "<decision from user>",
|
|
59
|
+
consequences: "<consequences from user>"
|
|
60
|
+
})
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
### Step 3: Confirm Creation
|
|
64
|
+
|
|
65
|
+
```
|
|
66
|
+
ADR created successfully!
|
|
67
|
+
|
|
68
|
+
**ADR #{number}**: {title}
|
|
69
|
+
**Status**: Proposed
|
|
70
|
+
**Path**: {path}
|
|
71
|
+
|
|
72
|
+
The ADR has been created with status "Proposed". To accept it:
|
|
73
|
+
1. Review the ADR content
|
|
74
|
+
2. Discuss with stakeholders
|
|
75
|
+
3. Change the status from "Proposed" to "Accepted" in the file
|
|
76
|
+
|
|
77
|
+
Would you like me to open the ADR for editing?
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
---
|
|
81
|
+
|
|
82
|
+
## Action 2: List ADRs
|
|
83
|
+
|
|
84
|
+
When user runs `/sdlc:adr list`:
|
|
85
|
+
|
|
86
|
+
### Step 1: Get ADR List
|
|
87
|
+
|
|
88
|
+
```
|
|
89
|
+
sdlc_adr({
|
|
90
|
+
action: "list"
|
|
91
|
+
})
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
### Step 2: Present ADRs
|
|
95
|
+
|
|
96
|
+
```
|
|
97
|
+
## Architecture Decision Records
|
|
98
|
+
|
|
99
|
+
| # | Title | Status | Date |
|
|
100
|
+
|---|-------|--------|------|
|
|
101
|
+
{for each ADR}
|
|
102
|
+
| {number} | {title} | {status} | {date} |
|
|
103
|
+
{endfor}
|
|
104
|
+
|
|
105
|
+
**Total**: {count} ADRs
|
|
106
|
+
- Proposed: {proposed count}
|
|
107
|
+
- Accepted: {accepted count}
|
|
108
|
+
- Deprecated: {deprecated count}
|
|
109
|
+
- Superseded: {superseded count}
|
|
110
|
+
|
|
111
|
+
{if superseded ADRs exist}
|
|
112
|
+
### Supersession Chain
|
|
113
|
+
{for each superseded ADR}
|
|
114
|
+
- ADR #{superseded} → ADR #{supersededBy}
|
|
115
|
+
{endfor}
|
|
116
|
+
{endif}
|
|
117
|
+
|
|
118
|
+
To view an ADR, open: docs/adr/NNNN-title.md
|
|
119
|
+
To create a new ADR: /sdlc:adr create "Title"
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
---
|
|
123
|
+
|
|
124
|
+
## Action 3: Synthesize
|
|
125
|
+
|
|
126
|
+
When user runs `/sdlc:adr synthesize`:
|
|
127
|
+
|
|
128
|
+
### Step 1: Check for Accepted ADRs
|
|
16
129
|
|
|
17
130
|
```
|
|
18
|
-
|
|
19
|
-
|
|
131
|
+
sdlc_adr({
|
|
132
|
+
action: "list"
|
|
133
|
+
})
|
|
20
134
|
```
|
|
21
135
|
|
|
22
|
-
|
|
136
|
+
If no accepted ADRs exist:
|
|
137
|
+
```
|
|
138
|
+
No accepted ADRs found.
|
|
23
139
|
|
|
140
|
+
To synthesize architecture documentation:
|
|
141
|
+
1. Create ADRs with `/sdlc:adr create`
|
|
142
|
+
2. Review and change status to "Accepted"
|
|
143
|
+
3. Run `/sdlc:adr synthesize`
|
|
24
144
|
```
|
|
25
|
-
|
|
145
|
+
|
|
146
|
+
### Step 2: Synthesize Documentation
|
|
147
|
+
|
|
148
|
+
```
|
|
149
|
+
sdlc_adr({
|
|
150
|
+
action: "synthesize"
|
|
151
|
+
})
|
|
26
152
|
```
|
|
27
153
|
|
|
28
|
-
|
|
154
|
+
### Step 3: Confirm Synthesis
|
|
29
155
|
|
|
30
|
-
If ARCHITECTURE.md needs updates, invoke:
|
|
31
156
|
```
|
|
32
|
-
|
|
157
|
+
ARCHITECTURE.md has been generated!
|
|
158
|
+
|
|
159
|
+
**Included ADRs**: {list of included ADR numbers}
|
|
160
|
+
**Output Path**: {architecturePath}
|
|
161
|
+
|
|
162
|
+
The document includes:
|
|
163
|
+
- High-level system overview
|
|
164
|
+
- Key architectural decisions (from accepted ADRs)
|
|
165
|
+
- Technology choices and rationale
|
|
166
|
+
- Trade-offs and constraints
|
|
167
|
+
|
|
168
|
+
Would you like me to show you the generated content?
|
|
33
169
|
```
|
|
34
170
|
|
|
35
|
-
|
|
171
|
+
---
|
|
172
|
+
|
|
173
|
+
## Interactive Mode
|
|
174
|
+
|
|
175
|
+
When user runs `/sdlc:adr` without arguments:
|
|
176
|
+
|
|
177
|
+
```
|
|
178
|
+
What would you like to do with ADRs?
|
|
179
|
+
|
|
180
|
+
1. **Create** - Create a new Architecture Decision Record
|
|
181
|
+
2. **List** - View all existing ADRs
|
|
182
|
+
3. **Synthesize** - Generate ARCHITECTURE.md from accepted ADRs
|
|
183
|
+
|
|
184
|
+
Please choose (1-3) or describe what you'd like to do.
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
---
|
|
188
|
+
|
|
189
|
+
## ADR Format
|
|
190
|
+
|
|
191
|
+
ADRs are stored in `docs/adr/` with this format:
|
|
192
|
+
|
|
193
|
+
```markdown
|
|
194
|
+
# ADR {number}: {title}
|
|
195
|
+
|
|
196
|
+
## Status
|
|
197
|
+
|
|
198
|
+
Proposed | Accepted | Deprecated | Superseded by ADR {number}
|
|
199
|
+
|
|
200
|
+
## Date
|
|
201
|
+
|
|
202
|
+
YYYY-MM-DD
|
|
203
|
+
|
|
204
|
+
## Context
|
|
205
|
+
|
|
206
|
+
{Background and forces at play}
|
|
207
|
+
|
|
208
|
+
## Decision
|
|
209
|
+
|
|
210
|
+
{The change being made}
|
|
211
|
+
|
|
212
|
+
## Consequences
|
|
213
|
+
|
|
214
|
+
### Positive
|
|
215
|
+
- {Good outcomes}
|
|
216
|
+
|
|
217
|
+
### Negative
|
|
218
|
+
- {Trade-offs and costs}
|
|
219
|
+
|
|
220
|
+
### Neutral
|
|
221
|
+
- {Observations}
|
|
222
|
+
|
|
223
|
+
## References
|
|
224
|
+
|
|
225
|
+
- {Links to related documents}
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
---
|
|
229
|
+
|
|
230
|
+
## Best Practices
|
|
231
|
+
|
|
232
|
+
### When to Create an ADR
|
|
233
|
+
|
|
234
|
+
Create an ADR when:
|
|
235
|
+
- Choosing between significant architectural options
|
|
236
|
+
- Making decisions that affect multiple teams or systems
|
|
237
|
+
- Selecting technologies or frameworks
|
|
238
|
+
- Defining patterns that others should follow
|
|
239
|
+
- Making decisions you might forget the rationale for
|
|
240
|
+
|
|
241
|
+
Don't create an ADR for:
|
|
242
|
+
- Trivial decisions (variable naming, formatting)
|
|
243
|
+
- Decisions that can easily be reversed
|
|
244
|
+
- Standard practices with no alternatives
|
|
245
|
+
|
|
246
|
+
### ADR Lifecycle
|
|
247
|
+
|
|
248
|
+
1. **Proposed** - Initial state, under discussion
|
|
249
|
+
2. **Accepted** - Decision made and ratified
|
|
250
|
+
3. **Deprecated** - No longer recommended, but not replaced
|
|
251
|
+
4. **Superseded** - Replaced by a newer ADR
|
|
252
|
+
|
|
253
|
+
### Synthesizing Architecture Documentation
|
|
254
|
+
|
|
255
|
+
- Only **Accepted** ADRs are included in ARCHITECTURE.md
|
|
256
|
+
- Run `synthesize` after accepting new ADRs
|
|
257
|
+
- The synthesis creates a coherent narrative from individual decisions
|
|
258
|
+
- Original ADRs remain the source of truth for detailed rationale
|
|
259
|
+
|
|
260
|
+
---
|
|
261
|
+
|
|
262
|
+
## Related Commands
|
|
36
263
|
|
|
37
|
-
|
|
264
|
+
- `/sdlc:review arch` - Conduct architecture party review
|
|
265
|
+
- `/sdlc:design` - Event modeling and domain discovery
|