opencode-sdlc-plugin 0.3.2 → 1.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 +90 -17
- package/config/presets/event-modeling.json +19 -8
- package/config/presets/minimal.json +29 -16
- package/config/presets/standard.json +19 -8
- package/config/schemas/athena.schema.json +4 -4
- package/config/schemas/sdlc.schema.json +101 -5
- package/dist/cli/index.js +1431 -1336
- package/dist/cli/index.js.map +1 -1
- package/dist/index.d.ts +428 -66
- package/dist/index.js +6262 -2440
- package/dist/index.js.map +1 -1
- package/dist/plugin/index.js +5793 -2010
- package/dist/plugin/index.js.map +1 -1
- package/package.json +2 -1
- package/prompts/agents/adr.md +234 -0
- package/prompts/agents/architect.md +204 -0
- package/prompts/agents/design-facilitator.md +237 -0
- package/prompts/agents/discovery.md +260 -0
- package/prompts/agents/domain.md +148 -34
- package/prompts/agents/file-updater.md +132 -0
- package/prompts/agents/green.md +119 -40
- package/prompts/agents/gwt.md +352 -0
- package/prompts/agents/model-checker.md +332 -0
- package/prompts/agents/red.md +112 -21
- package/prompts/agents/story.md +196 -0
- package/prompts/agents/ux.md +239 -0
- package/prompts/agents/workflow-designer.md +386 -0
- package/prompts/modes/architect.md +219 -0
- package/prompts/modes/build.md +150 -0
- package/prompts/modes/model.md +211 -0
- package/prompts/modes/plan.md +186 -0
- package/prompts/modes/pm.md +269 -0
- package/prompts/modes/prd.md +238 -0
- package/commands/sdlc-adr.md +0 -265
- package/commands/sdlc-debug.md +0 -376
- package/commands/sdlc-design.md +0 -246
- package/commands/sdlc-dev.md +0 -544
- package/commands/sdlc-info.md +0 -325
- package/commands/sdlc-parallel.md +0 -283
- package/commands/sdlc-recall.md +0 -213
- package/commands/sdlc-remember.md +0 -136
- package/commands/sdlc-research.md +0 -343
- package/commands/sdlc-review.md +0 -265
- package/commands/sdlc-status.md +0 -297
- package/config/presets/copilot-only.json +0 -69
- package/config/presets/enterprise.json +0 -79
- package/config/presets/solo-quick.json +0 -70
- package/config/presets/strict-tdd.json +0 -79
package/commands/sdlc-adr.md
DELETED
|
@@ -1,265 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Manage Architecture Decision Records (ADRs)
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
# SDLC ADR - Architecture Decision Records
|
|
6
|
-
|
|
7
|
-
## Overview
|
|
8
|
-
|
|
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
|
|
13
|
-
|
|
14
|
-
## Usage
|
|
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
|
|
129
|
-
|
|
130
|
-
```
|
|
131
|
-
sdlc_adr({
|
|
132
|
-
action: "list"
|
|
133
|
-
})
|
|
134
|
-
```
|
|
135
|
-
|
|
136
|
-
If no accepted ADRs exist:
|
|
137
|
-
```
|
|
138
|
-
No accepted ADRs found.
|
|
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`
|
|
144
|
-
```
|
|
145
|
-
|
|
146
|
-
### Step 2: Synthesize Documentation
|
|
147
|
-
|
|
148
|
-
```
|
|
149
|
-
sdlc_adr({
|
|
150
|
-
action: "synthesize"
|
|
151
|
-
})
|
|
152
|
-
```
|
|
153
|
-
|
|
154
|
-
### Step 3: Confirm Synthesis
|
|
155
|
-
|
|
156
|
-
```
|
|
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?
|
|
169
|
-
```
|
|
170
|
-
|
|
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
|
|
263
|
-
|
|
264
|
-
- `/sdlc:review arch` - Conduct architecture party review
|
|
265
|
-
- `/sdlc:design` - Event modeling and domain discovery
|
package/commands/sdlc-debug.md
DELETED
|
@@ -1,376 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Debug an issue using Oracle's deep reasoning capabilities
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
# SDLC Debug - Oracle-Powered Debugging
|
|
6
|
-
|
|
7
|
-
## Git Operations Policy
|
|
8
|
-
|
|
9
|
-
**⚠️ AUTOMATIC GIT OPERATIONS ARE PROHIBITED**
|
|
10
|
-
|
|
11
|
-
You must NOT perform any git operations automatically:
|
|
12
|
-
- ❌ Do NOT run `git commit` to save changes
|
|
13
|
-
- ❌ Do NOT run `git push` to push to remote
|
|
14
|
-
- ❌ Do NOT run `git checkout -b` or `git branch` to create branches
|
|
15
|
-
- ❌ Do NOT run `git merge`, `git rebase`, or `git cherry-pick`
|
|
16
|
-
- ❌ Do NOT run `gh pr create` or other GitHub CLI operations
|
|
17
|
-
|
|
18
|
-
**Git operations are ONLY permitted if the user explicitly requests them.**
|
|
19
|
-
|
|
20
|
-
Examples of explicit permission:
|
|
21
|
-
- User says: "Please commit these fixes"
|
|
22
|
-
- User says: "Create a branch for this bugfix"
|
|
23
|
-
- User says: "Push to origin" or "Create a PR"
|
|
24
|
-
|
|
25
|
-
**If you believe git operations would be helpful, ASK the user first:**
|
|
26
|
-
```
|
|
27
|
-
I've fixed the issue. Would you like me to:
|
|
28
|
-
1. Commit the fix to git, or
|
|
29
|
-
2. Leave git operations for you to handle manually?
|
|
30
|
-
```
|
|
31
|
-
|
|
32
|
-
**To track story progress without git, use:**
|
|
33
|
-
```
|
|
34
|
-
sdlc_update_status({
|
|
35
|
-
storyId: "X.Y",
|
|
36
|
-
status: "in_progress",
|
|
37
|
-
notes: "Fixed issue: [description]"
|
|
38
|
-
})
|
|
39
|
-
```
|
|
40
|
-
|
|
41
|
-
This updates sprint-status.yaml without requiring git commits.
|
|
42
|
-
|
|
43
|
-
---
|
|
44
|
-
|
|
45
|
-
Use Oracle, the debugging specialist, to analyze and fix complex issues with systematic hypothesis-driven debugging.
|
|
46
|
-
|
|
47
|
-
**You are Sisyphus, the orchestrator.** You will coordinate Oracle's deep reasoning with automated tools to efficiently diagnose and fix issues.
|
|
48
|
-
|
|
49
|
-
## When to Use This Command
|
|
50
|
-
|
|
51
|
-
- Complex bugs that span multiple files
|
|
52
|
-
- Performance issues requiring deep analysis
|
|
53
|
-
- Architectural problems needing strategic solutions
|
|
54
|
-
- Issues where the root cause is unclear
|
|
55
|
-
- Bugs you've tried to fix 2+ times without success
|
|
56
|
-
|
|
57
|
-
## Step 1: Gather Context
|
|
58
|
-
|
|
59
|
-
### 1.1 Check Story Context (if applicable)
|
|
60
|
-
|
|
61
|
-
If debugging during story implementation, load the story context first:
|
|
62
|
-
|
|
63
|
-
```
|
|
64
|
-
sdlc_get_story()
|
|
65
|
-
```
|
|
66
|
-
|
|
67
|
-
This provides:
|
|
68
|
-
- Acceptance criteria (to understand expected behavior)
|
|
69
|
-
- Architecture patterns (to understand design intent)
|
|
70
|
-
- Related code context
|
|
71
|
-
|
|
72
|
-
### 1.2 Collect Error Evidence
|
|
73
|
-
|
|
74
|
-
Before invoking Oracle, gather all available evidence:
|
|
75
|
-
|
|
76
|
-
**Error messages and stack traces:**
|
|
77
|
-
- Copy the exact error message
|
|
78
|
-
- Include the full stack trace if available
|
|
79
|
-
- Note which file/line the error points to
|
|
80
|
-
|
|
81
|
-
**Reproduction information:**
|
|
82
|
-
- Steps to reproduce the issue
|
|
83
|
-
- Input values that trigger the error
|
|
84
|
-
- Environment details (dev/prod, browser, etc.)
|
|
85
|
-
|
|
86
|
-
**What you've already tried:**
|
|
87
|
-
- Previous fix attempts
|
|
88
|
-
- Why they didn't work
|
|
89
|
-
- Any patterns you've noticed
|
|
90
|
-
|
|
91
|
-
### 1.3 Use Explore for Initial Context (Optional but Recommended)
|
|
92
|
-
|
|
93
|
-
Before invoking expensive Oracle, use **@explore** to gather codebase context:
|
|
94
|
-
|
|
95
|
-
```
|
|
96
|
-
@explore I'm debugging an issue in {area of code}.
|
|
97
|
-
|
|
98
|
-
The error is: {error message}
|
|
99
|
-
The problematic behavior is: {description}
|
|
100
|
-
|
|
101
|
-
Please find:
|
|
102
|
-
1. The code paths related to this functionality
|
|
103
|
-
2. Similar error handling in the codebase
|
|
104
|
-
3. Any related tests that might indicate expected behavior
|
|
105
|
-
4. Recent changes to these files (if visible)
|
|
106
|
-
|
|
107
|
-
Return file paths and relevant code sections.
|
|
108
|
-
```
|
|
109
|
-
|
|
110
|
-
**When to skip Explore:**
|
|
111
|
-
- You already know exactly where the bug is
|
|
112
|
-
- You've already traced the code path
|
|
113
|
-
- The issue is architectural, not code-specific
|
|
114
|
-
|
|
115
|
-
## Step 2: Invoke Oracle for Diagnosis
|
|
116
|
-
|
|
117
|
-
Ask **@oracle** to perform systematic debugging:
|
|
118
|
-
|
|
119
|
-
```
|
|
120
|
-
@oracle I need help debugging a complex issue.
|
|
121
|
-
|
|
122
|
-
## Problem Description
|
|
123
|
-
|
|
124
|
-
**Expected Behavior:**
|
|
125
|
-
{what should happen}
|
|
126
|
-
|
|
127
|
-
**Actual Behavior:**
|
|
128
|
-
{what happens instead}
|
|
129
|
-
|
|
130
|
-
**Error Message/Stack Trace:**
|
|
131
|
-
```
|
|
132
|
-
{paste exact error}
|
|
133
|
-
```
|
|
134
|
-
|
|
135
|
-
**Reproduction Steps:**
|
|
136
|
-
1. {step 1}
|
|
137
|
-
2. {step 2}
|
|
138
|
-
3. {step 3}
|
|
139
|
-
|
|
140
|
-
## Context
|
|
141
|
-
|
|
142
|
-
**Affected Files:**
|
|
143
|
-
{list files involved - from Explore or your knowledge}
|
|
144
|
-
|
|
145
|
-
**Architecture Context:**
|
|
146
|
-
{relevant architecture patterns if from story context}
|
|
147
|
-
|
|
148
|
-
**What I've Already Tried:**
|
|
149
|
-
- {attempt 1 and why it failed}
|
|
150
|
-
- {attempt 2 and why it failed}
|
|
151
|
-
|
|
152
|
-
## Debugging Request
|
|
153
|
-
|
|
154
|
-
Please analyze this issue using your systematic debugging approach:
|
|
155
|
-
|
|
156
|
-
1. **Evidence Analysis**: Review the error, stack trace, and context
|
|
157
|
-
2. **Hypothesis Generation**: List 3-5 possible root causes ranked by likelihood
|
|
158
|
-
3. **Hypothesis Testing**: For each hypothesis, describe how to test/verify it
|
|
159
|
-
4. **Root Cause Identification**: Based on testing, identify the most likely root cause
|
|
160
|
-
5. **Solution Design**: Propose a fix that addresses the root cause
|
|
161
|
-
6. **Risk Assessment**: Identify any side effects or risks of the proposed fix
|
|
162
|
-
|
|
163
|
-
Do NOT implement the fix yet. First, present your analysis and get confirmation.
|
|
164
|
-
```
|
|
165
|
-
|
|
166
|
-
## Step 3: Review Oracle's Analysis
|
|
167
|
-
|
|
168
|
-
Oracle will provide:
|
|
169
|
-
|
|
170
|
-
1. **Hypotheses** - Ranked list of possible root causes
|
|
171
|
-
2. **Evidence Mapping** - How each hypothesis explains the observed behavior
|
|
172
|
-
3. **Testing Plan** - How to verify/eliminate each hypothesis
|
|
173
|
-
4. **Recommended Root Cause** - The most likely cause based on analysis
|
|
174
|
-
5. **Proposed Fix** - Solution design
|
|
175
|
-
|
|
176
|
-
### 3.1 Validate the Analysis
|
|
177
|
-
|
|
178
|
-
Before proceeding with the fix:
|
|
179
|
-
|
|
180
|
-
- Does the root cause explain ALL the symptoms?
|
|
181
|
-
- Does the proposed fix address the root cause (not just symptoms)?
|
|
182
|
-
- Are there any risks or side effects?
|
|
183
|
-
|
|
184
|
-
### 3.2 Request Implementation
|
|
185
|
-
|
|
186
|
-
If you agree with Oracle's analysis:
|
|
187
|
-
|
|
188
|
-
```
|
|
189
|
-
@oracle Your analysis looks correct. Please implement the fix you proposed.
|
|
190
|
-
|
|
191
|
-
Specifically:
|
|
192
|
-
- {any additional constraints}
|
|
193
|
-
- {any files to avoid modifying}
|
|
194
|
-
- {any patterns to follow}
|
|
195
|
-
|
|
196
|
-
After implementing, show me what changed and explain how it fixes the root cause.
|
|
197
|
-
```
|
|
198
|
-
|
|
199
|
-
If you disagree or need more investigation:
|
|
200
|
-
|
|
201
|
-
```
|
|
202
|
-
@oracle I have concerns about hypothesis #{N}.
|
|
203
|
-
|
|
204
|
-
{explain your concern}
|
|
205
|
-
|
|
206
|
-
Please investigate further:
|
|
207
|
-
- {specific thing to check}
|
|
208
|
-
- {alternative hypothesis to consider}
|
|
209
|
-
```
|
|
210
|
-
|
|
211
|
-
## Step 4: Verify the Fix
|
|
212
|
-
|
|
213
|
-
### 4.1 Run Automated Checks
|
|
214
|
-
|
|
215
|
-
After Oracle implements the fix:
|
|
216
|
-
|
|
217
|
-
**Run LSP diagnostics on modified files:**
|
|
218
|
-
|
|
219
|
-
```
|
|
220
|
-
lsp_diagnostics(filePath: "<modified file>", severity: "all")
|
|
221
|
-
```
|
|
222
|
-
|
|
223
|
-
**Run the build (if applicable):**
|
|
224
|
-
|
|
225
|
-
```bash
|
|
226
|
-
npm run build
|
|
227
|
-
```
|
|
228
|
-
|
|
229
|
-
**Run tests (if applicable):**
|
|
230
|
-
|
|
231
|
-
```bash
|
|
232
|
-
npm test
|
|
233
|
-
```
|
|
234
|
-
|
|
235
|
-
### 4.2 Reproduce the Original Issue
|
|
236
|
-
|
|
237
|
-
Try to reproduce the original bug:
|
|
238
|
-
|
|
239
|
-
- Follow the same reproduction steps
|
|
240
|
-
- Use the same input values
|
|
241
|
-
- Verify the error no longer occurs
|
|
242
|
-
|
|
243
|
-
### 4.3 Check for Regressions
|
|
244
|
-
|
|
245
|
-
- Does existing functionality still work?
|
|
246
|
-
- Do related tests still pass?
|
|
247
|
-
- Are there any new errors or warnings?
|
|
248
|
-
|
|
249
|
-
## Step 5: Document and Update Status
|
|
250
|
-
|
|
251
|
-
### 5.1 Document the Fix
|
|
252
|
-
|
|
253
|
-
Record what was learned:
|
|
254
|
-
|
|
255
|
-
```markdown
|
|
256
|
-
## Debug Summary
|
|
257
|
-
|
|
258
|
-
**Issue:** {brief description}
|
|
259
|
-
**Root Cause:** {what Oracle identified}
|
|
260
|
-
**Fix Applied:** {what was changed}
|
|
261
|
-
**Files Modified:** {list of files}
|
|
262
|
-
**Verification:** {how it was verified}
|
|
263
|
-
```
|
|
264
|
-
|
|
265
|
-
### 5.2 Update Story Status (if applicable)
|
|
266
|
-
|
|
267
|
-
If debugging was part of a story:
|
|
268
|
-
|
|
269
|
-
**If fix is complete and story can continue:**
|
|
270
|
-
```
|
|
271
|
-
sdlc_update_status({
|
|
272
|
-
storyId: "<story ID>",
|
|
273
|
-
status: "in_progress",
|
|
274
|
-
notes: "Debug complete. Root cause: {cause}. Fixed by: {fix}. Continuing implementation."
|
|
275
|
-
})
|
|
276
|
-
```
|
|
277
|
-
|
|
278
|
-
**If issue was blocking and is now resolved:**
|
|
279
|
-
```
|
|
280
|
-
sdlc_update_status({
|
|
281
|
-
storyId: "<story ID>",
|
|
282
|
-
status: "in_progress",
|
|
283
|
-
notes: "Blocker resolved. Issue was {root cause}. Fixed by {solution}."
|
|
284
|
-
})
|
|
285
|
-
```
|
|
286
|
-
|
|
287
|
-
**If issue requires external help:**
|
|
288
|
-
```
|
|
289
|
-
sdlc_update_status({
|
|
290
|
-
storyId: "<story ID>",
|
|
291
|
-
status: "blocked",
|
|
292
|
-
notes: "Debug identified issue but fix requires {external dependency/decision}. Root cause: {cause}."
|
|
293
|
-
})
|
|
294
|
-
```
|
|
295
|
-
|
|
296
|
-
## Oracle's Debugging Methodology
|
|
297
|
-
|
|
298
|
-
Oracle uses a systematic approach:
|
|
299
|
-
|
|
300
|
-
```
|
|
301
|
-
┌─────────────────────────────────────────────────────────┐
|
|
302
|
-
│ GATHER EVIDENCE │
|
|
303
|
-
│ Collect error messages, stack traces, reproduction │
|
|
304
|
-
│ steps, and context from affected code │
|
|
305
|
-
└─────────────────────────────────────────────────────────┘
|
|
306
|
-
│
|
|
307
|
-
▼
|
|
308
|
-
┌─────────────────────────────────────────────────────────┐
|
|
309
|
-
│ FORM HYPOTHESES │
|
|
310
|
-
│ Generate 3-5 possible root causes, ranked by │
|
|
311
|
-
│ likelihood based on evidence │
|
|
312
|
-
└─────────────────────────────────────────────────────────┘
|
|
313
|
-
│
|
|
314
|
-
▼
|
|
315
|
-
┌─────────────────────────────────────────────────────────┐
|
|
316
|
-
│ TEST HYPOTHESES │
|
|
317
|
-
│ For each hypothesis, identify how to verify or │
|
|
318
|
-
│ eliminate it using tools and code analysis │
|
|
319
|
-
└─────────────────────────────────────────────────────────┘
|
|
320
|
-
│
|
|
321
|
-
▼
|
|
322
|
-
┌─────────────────────────────────────────────────────────┐
|
|
323
|
-
│ IDENTIFY ROOT CAUSE │
|
|
324
|
-
│ Based on testing, determine the most likely │
|
|
325
|
-
│ root cause that explains all symptoms │
|
|
326
|
-
└─────────────────────────────────────────────────────────┘
|
|
327
|
-
│
|
|
328
|
-
▼
|
|
329
|
-
┌─────────────────────────────────────────────────────────┐
|
|
330
|
-
│ IMPLEMENT FIX │
|
|
331
|
-
│ Design and implement a solution that addresses │
|
|
332
|
-
│ the root cause (not just symptoms) │
|
|
333
|
-
└─────────────────────────────────────────────────────────┘
|
|
334
|
-
│
|
|
335
|
-
▼
|
|
336
|
-
┌─────────────────────────────────────────────────────────┐
|
|
337
|
-
│ VERIFY │
|
|
338
|
-
│ Confirm fix resolves the issue without │
|
|
339
|
-
│ introducing regressions │
|
|
340
|
-
└─────────────────────────────────────────────────────────┘
|
|
341
|
-
```
|
|
342
|
-
|
|
343
|
-
## Tips for Effective Debugging
|
|
344
|
-
|
|
345
|
-
### Provide Complete Context
|
|
346
|
-
|
|
347
|
-
- **Include full error messages** - Don't paraphrase, copy exactly
|
|
348
|
-
- **Include stack traces** - The call stack reveals the code path
|
|
349
|
-
- **Show the problematic code** - Oracle needs to see what's happening
|
|
350
|
-
- **Describe reproduction steps** - How to trigger the bug
|
|
351
|
-
|
|
352
|
-
### Don't Jump to Solutions
|
|
353
|
-
|
|
354
|
-
- Let Oracle analyze before implementing
|
|
355
|
-
- Review Oracle's hypotheses critically
|
|
356
|
-
- Confirm root cause before fixing
|
|
357
|
-
|
|
358
|
-
### Verify Thoroughly
|
|
359
|
-
|
|
360
|
-
- The bug should be gone after the fix
|
|
361
|
-
- Nothing else should break
|
|
362
|
-
- Tests should pass
|
|
363
|
-
|
|
364
|
-
### Cost Awareness
|
|
365
|
-
|
|
366
|
-
- **Oracle is expensive** (GPT-5.2 deep reasoning)
|
|
367
|
-
- Use Explore first for context gathering (cheaper)
|
|
368
|
-
- Only invoke Oracle for genuinely complex bugs
|
|
369
|
-
- Simple bugs (typos, obvious errors) don't need Oracle
|
|
370
|
-
|
|
371
|
-
## When NOT to Use This Command
|
|
372
|
-
|
|
373
|
-
- **Simple syntax errors** - LSP diagnostics will catch these
|
|
374
|
-
- **Obvious bugs** - If you can see the issue, just fix it
|
|
375
|
-
- **Configuration issues** - Check docs first
|
|
376
|
-
- **First attempt at fixing** - Try yourself first, use Oracle after 2+ failures
|