opencode-athena 0.0.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 +178 -0
- package/commands/athena-debug.md +338 -0
- package/commands/athena-dev.md +322 -0
- package/commands/athena-info.md +325 -0
- package/commands/athena-parallel.md +266 -0
- package/commands/athena-research.md +326 -0
- package/commands/athena-review.md +441 -0
- package/commands/athena-status.md +279 -0
- package/config/presets/enterprise.json +37 -0
- package/config/presets/minimal.json +34 -0
- package/config/presets/solo-quick.json +34 -0
- package/config/presets/standard.json +37 -0
- package/config/schemas/athena.schema.json +128 -0
- package/dist/cli/index.d.ts +2 -0
- package/dist/cli/index.js +2185 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/index.d.ts +628 -0
- package/dist/index.js +1360 -0
- package/dist/index.js.map +1 -0
- package/dist/plugin/index.d.ts +20 -0
- package/dist/plugin/index.js +1343 -0
- package/dist/plugin/index.js.map +1 -0
- package/package.json +83 -0
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
ADDED
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
# OpenCode Athena
|
|
2
|
+
|
|
3
|
+
> **Strategic wisdom meets practical execution**
|
|
4
|
+
|
|
5
|
+
Unified [oh-my-opencode](https://github.com/code-yeongyu/oh-my-opencode) + [BMAD METHOD v6](https://github.com/bmad-method/bmad-method) toolkit for [OpenCode](https://opencode.ai).
|
|
6
|
+
|
|
7
|
+
[](https://www.npmjs.com/package/opencode-athena)
|
|
8
|
+
[](https://opensource.org/licenses/MIT-0)
|
|
9
|
+
|
|
10
|
+
## What is Athena?
|
|
11
|
+
|
|
12
|
+
OpenCode Athena bridges the gap between **BMAD METHOD's rigorous planning** and **oh-my-opencode's superior execution**:
|
|
13
|
+
|
|
14
|
+
- **Planning** (BMAD): PRD → Architecture → Epics → Stories
|
|
15
|
+
- **Execution** (oh-my-opencode): Sisyphus + Oracle + Librarian + LSP tools + parallel agents
|
|
16
|
+
- **Bridge** (Athena): Automatic handoff, status tracking, context injection
|
|
17
|
+
|
|
18
|
+
| Without Athena | With Athena |
|
|
19
|
+
|----------------|-------------|
|
|
20
|
+
| Manual oh-my-opencode setup | One-command installation |
|
|
21
|
+
| Manual BMAD ↔ Sisyphus handoff | Automated bridge commands |
|
|
22
|
+
| Manual sprint-status.yaml updates | Auto-tracking |
|
|
23
|
+
| Separate context management | Unified context injection |
|
|
24
|
+
| Manual auth configuration | Guided setup wizard |
|
|
25
|
+
|
|
26
|
+
## Quick Start
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
npx opencode-athena install
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
The interactive installer will:
|
|
33
|
+
1. Ask about your LLM subscriptions (Claude, OpenAI, Google)
|
|
34
|
+
2. Configure oh-my-opencode with optimal agent models
|
|
35
|
+
3. Set up authentication plugins
|
|
36
|
+
4. Install bridge commands
|
|
37
|
+
|
|
38
|
+
## Requirements
|
|
39
|
+
|
|
40
|
+
- [OpenCode](https://opencode.ai/docs) 1.0.132+
|
|
41
|
+
- Node.js 20+
|
|
42
|
+
- One or more LLM subscriptions:
|
|
43
|
+
- Claude Pro/Max (recommended)
|
|
44
|
+
- ChatGPT Plus/Pro
|
|
45
|
+
- Google/Gemini
|
|
46
|
+
|
|
47
|
+
## Commands
|
|
48
|
+
|
|
49
|
+
After installation, these commands are available in OpenCode:
|
|
50
|
+
|
|
51
|
+
| Command | Description |
|
|
52
|
+
|---------|-------------|
|
|
53
|
+
| `/athena-dev` | Implement current BMAD story with Sisyphus |
|
|
54
|
+
| `/athena-review` | Combined quality gate (BMAD + oh-my-opencode) |
|
|
55
|
+
| `/athena-debug` | Debug with Oracle (GPT-5.1 reasoning) |
|
|
56
|
+
| `/athena-research` | Research with Librarian + MCPs |
|
|
57
|
+
| `/athena-parallel` | Execute multiple stories in parallel |
|
|
58
|
+
| `/athena-status` | View/update sprint status |
|
|
59
|
+
| `/athena-info` | Show toolkit configuration |
|
|
60
|
+
|
|
61
|
+
## Workflow
|
|
62
|
+
|
|
63
|
+
### 1. Plan with BMAD (Phases 1-3)
|
|
64
|
+
|
|
65
|
+
Use BMAD agents for planning:
|
|
66
|
+
|
|
67
|
+
```
|
|
68
|
+
Load PM agent → *prd
|
|
69
|
+
Load Architect agent → *create-architecture
|
|
70
|
+
Load SM agent → *sprint-planning → *create-story
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
### 2. Implement with Athena (Phase 4)
|
|
74
|
+
|
|
75
|
+
Use Athena bridge commands:
|
|
76
|
+
|
|
77
|
+
```
|
|
78
|
+
/athena-dev # Load story, implement with Sisyphus
|
|
79
|
+
/athena-review # Quality gate
|
|
80
|
+
/athena-status # Mark complete, get next story
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
### 3. Repeat
|
|
84
|
+
|
|
85
|
+
Continue until sprint is complete, then run retrospective with BMAD SM.
|
|
86
|
+
|
|
87
|
+
## Configuration
|
|
88
|
+
|
|
89
|
+
Configuration files are stored in `~/.config/opencode/`:
|
|
90
|
+
|
|
91
|
+
- `athena.json` - Athena-specific settings
|
|
92
|
+
- `oh-my-opencode.json` - Agent model configuration
|
|
93
|
+
- `opencode.json` - Plugin registration
|
|
94
|
+
|
|
95
|
+
### Presets
|
|
96
|
+
|
|
97
|
+
Use `--preset` during installation:
|
|
98
|
+
|
|
99
|
+
```bash
|
|
100
|
+
npx opencode-athena install --preset minimal # Bare essentials
|
|
101
|
+
npx opencode-athena install --preset standard # Recommended (default)
|
|
102
|
+
npx opencode-athena install --preset enterprise # Full features
|
|
103
|
+
npx opencode-athena install --preset solo-quick # Solo dev quick flow
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
### Project Overrides
|
|
107
|
+
|
|
108
|
+
Create `.opencode/athena.json` in your project root to override global settings.
|
|
109
|
+
|
|
110
|
+
## Architecture
|
|
111
|
+
|
|
112
|
+
```
|
|
113
|
+
┌─────────────────────────────────────────────────────────────────────────────┐
|
|
114
|
+
│ OPENCODE ATHENA │
|
|
115
|
+
├─────────────────────────────────────────────────────────────────────────────┤
|
|
116
|
+
│ │
|
|
117
|
+
│ ┌─────────────────────────────────────────────────────────────────────┐ │
|
|
118
|
+
│ │ CLI Installer │ │
|
|
119
|
+
│ │ npx opencode-athena install npx opencode-athena doctor │ │
|
|
120
|
+
│ │ npx opencode-athena update npx opencode-athena uninstall │ │
|
|
121
|
+
│ └─────────────────────────────────────────────────────────────────────┘ │
|
|
122
|
+
│ │
|
|
123
|
+
│ ┌─────────────────────────────────────────────────────────────────────┐ │
|
|
124
|
+
│ │ OpenCode Plugin │ │
|
|
125
|
+
│ │ Custom Tools: Event Hooks: │ │
|
|
126
|
+
│ │ • athena_get_story • session.idle │ │
|
|
127
|
+
│ │ • athena_update_status • session.created │ │
|
|
128
|
+
│ │ • athena_get_context • tool.execute.before │ │
|
|
129
|
+
│ │ • athena_parallel • tool.execute.after │ │
|
|
130
|
+
│ │ • athena_config • session.compacting │ │
|
|
131
|
+
│ └─────────────────────────────────────────────────────────────────────┘ │
|
|
132
|
+
│ │
|
|
133
|
+
│ ┌─────────────────────────────────────────────────────────────────────┐ │
|
|
134
|
+
│ │ Bridge Commands │ │
|
|
135
|
+
│ │ /athena-dev /athena-review /athena-debug │ │
|
|
136
|
+
│ │ /athena-research /athena-parallel /athena-status │ │
|
|
137
|
+
│ └─────────────────────────────────────────────────────────────────────┘ │
|
|
138
|
+
│ │
|
|
139
|
+
│ ┌──────────────────────┐ ┌──────────────────────┐ ┌────────────────┐ │
|
|
140
|
+
│ │ oh-my-opencode │ │ BMAD METHOD v6 │ │ Auth Plugins │ │
|
|
141
|
+
│ │ (managed) │ │ (per-project) │ │ (managed) │ │
|
|
142
|
+
│ └──────────────────────┘ └──────────────────────┘ └────────────────┘ │
|
|
143
|
+
└─────────────────────────────────────────────────────────────────────────────┘
|
|
144
|
+
│
|
|
145
|
+
▼
|
|
146
|
+
┌─────────────┐
|
|
147
|
+
│ OpenCode │
|
|
148
|
+
│ (Base) │
|
|
149
|
+
└─────────────┘
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
## Troubleshooting
|
|
153
|
+
|
|
154
|
+
```bash
|
|
155
|
+
npx opencode-athena doctor # Diagnose issues
|
|
156
|
+
npx opencode-athena doctor --fix # Auto-fix common problems
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
Common issues:
|
|
160
|
+
|
|
161
|
+
| Issue | Solution |
|
|
162
|
+
|-------|----------|
|
|
163
|
+
| Plugin not loading | Run `doctor --fix` to reinstall |
|
|
164
|
+
| Auth errors | Run `opencode auth login` for each provider |
|
|
165
|
+
| BMAD not found | Run `npx bmad-method@alpha install` in your project |
|
|
166
|
+
| Commands not available | Verify commands are in `~/.config/opencode/command/` |
|
|
167
|
+
|
|
168
|
+
## Credits
|
|
169
|
+
|
|
170
|
+
Built on top of:
|
|
171
|
+
|
|
172
|
+
- [OpenCode](https://opencode.ai) by SST
|
|
173
|
+
- [oh-my-opencode](https://github.com/code-yeongyu/oh-my-opencode) by code-yeongyu
|
|
174
|
+
- [BMAD METHOD](https://github.com/bmad-method/bmad-method) by bmad-method
|
|
175
|
+
|
|
176
|
+
## License
|
|
177
|
+
|
|
178
|
+
MIT-0 (MIT No Attribution) - See [LICENSE](LICENSE) for details.
|
|
@@ -0,0 +1,338 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Debug an issue using Oracle's deep reasoning capabilities
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Athena Debug - Oracle-Powered Debugging
|
|
6
|
+
|
|
7
|
+
Use Oracle, the debugging specialist, to analyze and fix complex issues with systematic hypothesis-driven debugging.
|
|
8
|
+
|
|
9
|
+
**You are Sisyphus, the orchestrator.** You will coordinate Oracle's deep reasoning with automated tools to efficiently diagnose and fix issues.
|
|
10
|
+
|
|
11
|
+
## When to Use This Command
|
|
12
|
+
|
|
13
|
+
- Complex bugs that span multiple files
|
|
14
|
+
- Performance issues requiring deep analysis
|
|
15
|
+
- Architectural problems needing strategic solutions
|
|
16
|
+
- Issues where the root cause is unclear
|
|
17
|
+
- Bugs you've tried to fix 2+ times without success
|
|
18
|
+
|
|
19
|
+
## Step 1: Gather Context
|
|
20
|
+
|
|
21
|
+
### 1.1 Check Story Context (if applicable)
|
|
22
|
+
|
|
23
|
+
If debugging during story implementation, load the story context first:
|
|
24
|
+
|
|
25
|
+
```
|
|
26
|
+
athena_get_story()
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
This provides:
|
|
30
|
+
- Acceptance criteria (to understand expected behavior)
|
|
31
|
+
- Architecture patterns (to understand design intent)
|
|
32
|
+
- Related code context
|
|
33
|
+
|
|
34
|
+
### 1.2 Collect Error Evidence
|
|
35
|
+
|
|
36
|
+
Before invoking Oracle, gather all available evidence:
|
|
37
|
+
|
|
38
|
+
**Error messages and stack traces:**
|
|
39
|
+
- Copy the exact error message
|
|
40
|
+
- Include the full stack trace if available
|
|
41
|
+
- Note which file/line the error points to
|
|
42
|
+
|
|
43
|
+
**Reproduction information:**
|
|
44
|
+
- Steps to reproduce the issue
|
|
45
|
+
- Input values that trigger the error
|
|
46
|
+
- Environment details (dev/prod, browser, etc.)
|
|
47
|
+
|
|
48
|
+
**What you've already tried:**
|
|
49
|
+
- Previous fix attempts
|
|
50
|
+
- Why they didn't work
|
|
51
|
+
- Any patterns you've noticed
|
|
52
|
+
|
|
53
|
+
### 1.3 Use Explore for Initial Context (Optional but Recommended)
|
|
54
|
+
|
|
55
|
+
Before invoking expensive Oracle, use **@explore** to gather codebase context:
|
|
56
|
+
|
|
57
|
+
```
|
|
58
|
+
@explore I'm debugging an issue in {area of code}.
|
|
59
|
+
|
|
60
|
+
The error is: {error message}
|
|
61
|
+
The problematic behavior is: {description}
|
|
62
|
+
|
|
63
|
+
Please find:
|
|
64
|
+
1. The code paths related to this functionality
|
|
65
|
+
2. Similar error handling in the codebase
|
|
66
|
+
3. Any related tests that might indicate expected behavior
|
|
67
|
+
4. Recent changes to these files (if visible)
|
|
68
|
+
|
|
69
|
+
Return file paths and relevant code sections.
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
**When to skip Explore:**
|
|
73
|
+
- You already know exactly where the bug is
|
|
74
|
+
- You've already traced the code path
|
|
75
|
+
- The issue is architectural, not code-specific
|
|
76
|
+
|
|
77
|
+
## Step 2: Invoke Oracle for Diagnosis
|
|
78
|
+
|
|
79
|
+
Ask **@oracle** to perform systematic debugging:
|
|
80
|
+
|
|
81
|
+
```
|
|
82
|
+
@oracle I need help debugging a complex issue.
|
|
83
|
+
|
|
84
|
+
## Problem Description
|
|
85
|
+
|
|
86
|
+
**Expected Behavior:**
|
|
87
|
+
{what should happen}
|
|
88
|
+
|
|
89
|
+
**Actual Behavior:**
|
|
90
|
+
{what happens instead}
|
|
91
|
+
|
|
92
|
+
**Error Message/Stack Trace:**
|
|
93
|
+
```
|
|
94
|
+
{paste exact error}
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
**Reproduction Steps:**
|
|
98
|
+
1. {step 1}
|
|
99
|
+
2. {step 2}
|
|
100
|
+
3. {step 3}
|
|
101
|
+
|
|
102
|
+
## Context
|
|
103
|
+
|
|
104
|
+
**Affected Files:**
|
|
105
|
+
{list files involved - from Explore or your knowledge}
|
|
106
|
+
|
|
107
|
+
**Architecture Context:**
|
|
108
|
+
{relevant architecture patterns if from story context}
|
|
109
|
+
|
|
110
|
+
**What I've Already Tried:**
|
|
111
|
+
- {attempt 1 and why it failed}
|
|
112
|
+
- {attempt 2 and why it failed}
|
|
113
|
+
|
|
114
|
+
## Debugging Request
|
|
115
|
+
|
|
116
|
+
Please analyze this issue using your systematic debugging approach:
|
|
117
|
+
|
|
118
|
+
1. **Evidence Analysis**: Review the error, stack trace, and context
|
|
119
|
+
2. **Hypothesis Generation**: List 3-5 possible root causes ranked by likelihood
|
|
120
|
+
3. **Hypothesis Testing**: For each hypothesis, describe how to test/verify it
|
|
121
|
+
4. **Root Cause Identification**: Based on testing, identify the most likely root cause
|
|
122
|
+
5. **Solution Design**: Propose a fix that addresses the root cause
|
|
123
|
+
6. **Risk Assessment**: Identify any side effects or risks of the proposed fix
|
|
124
|
+
|
|
125
|
+
Do NOT implement the fix yet. First, present your analysis and get confirmation.
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
## Step 3: Review Oracle's Analysis
|
|
129
|
+
|
|
130
|
+
Oracle will provide:
|
|
131
|
+
|
|
132
|
+
1. **Hypotheses** - Ranked list of possible root causes
|
|
133
|
+
2. **Evidence Mapping** - How each hypothesis explains the observed behavior
|
|
134
|
+
3. **Testing Plan** - How to verify/eliminate each hypothesis
|
|
135
|
+
4. **Recommended Root Cause** - The most likely cause based on analysis
|
|
136
|
+
5. **Proposed Fix** - Solution design
|
|
137
|
+
|
|
138
|
+
### 3.1 Validate the Analysis
|
|
139
|
+
|
|
140
|
+
Before proceeding with the fix:
|
|
141
|
+
|
|
142
|
+
- Does the root cause explain ALL the symptoms?
|
|
143
|
+
- Does the proposed fix address the root cause (not just symptoms)?
|
|
144
|
+
- Are there any risks or side effects?
|
|
145
|
+
|
|
146
|
+
### 3.2 Request Implementation
|
|
147
|
+
|
|
148
|
+
If you agree with Oracle's analysis:
|
|
149
|
+
|
|
150
|
+
```
|
|
151
|
+
@oracle Your analysis looks correct. Please implement the fix you proposed.
|
|
152
|
+
|
|
153
|
+
Specifically:
|
|
154
|
+
- {any additional constraints}
|
|
155
|
+
- {any files to avoid modifying}
|
|
156
|
+
- {any patterns to follow}
|
|
157
|
+
|
|
158
|
+
After implementing, show me what changed and explain how it fixes the root cause.
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
If you disagree or need more investigation:
|
|
162
|
+
|
|
163
|
+
```
|
|
164
|
+
@oracle I have concerns about hypothesis #{N}.
|
|
165
|
+
|
|
166
|
+
{explain your concern}
|
|
167
|
+
|
|
168
|
+
Please investigate further:
|
|
169
|
+
- {specific thing to check}
|
|
170
|
+
- {alternative hypothesis to consider}
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
## Step 4: Verify the Fix
|
|
174
|
+
|
|
175
|
+
### 4.1 Run Automated Checks
|
|
176
|
+
|
|
177
|
+
After Oracle implements the fix:
|
|
178
|
+
|
|
179
|
+
**Run LSP diagnostics on modified files:**
|
|
180
|
+
|
|
181
|
+
```
|
|
182
|
+
lsp_diagnostics(filePath: "<modified file>", severity: "all")
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
**Run the build (if applicable):**
|
|
186
|
+
|
|
187
|
+
```bash
|
|
188
|
+
npm run build
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
**Run tests (if applicable):**
|
|
192
|
+
|
|
193
|
+
```bash
|
|
194
|
+
npm test
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
### 4.2 Reproduce the Original Issue
|
|
198
|
+
|
|
199
|
+
Try to reproduce the original bug:
|
|
200
|
+
|
|
201
|
+
- Follow the same reproduction steps
|
|
202
|
+
- Use the same input values
|
|
203
|
+
- Verify the error no longer occurs
|
|
204
|
+
|
|
205
|
+
### 4.3 Check for Regressions
|
|
206
|
+
|
|
207
|
+
- Does existing functionality still work?
|
|
208
|
+
- Do related tests still pass?
|
|
209
|
+
- Are there any new errors or warnings?
|
|
210
|
+
|
|
211
|
+
## Step 5: Document and Update Status
|
|
212
|
+
|
|
213
|
+
### 5.1 Document the Fix
|
|
214
|
+
|
|
215
|
+
Record what was learned:
|
|
216
|
+
|
|
217
|
+
```markdown
|
|
218
|
+
## Debug Summary
|
|
219
|
+
|
|
220
|
+
**Issue:** {brief description}
|
|
221
|
+
**Root Cause:** {what Oracle identified}
|
|
222
|
+
**Fix Applied:** {what was changed}
|
|
223
|
+
**Files Modified:** {list of files}
|
|
224
|
+
**Verification:** {how it was verified}
|
|
225
|
+
```
|
|
226
|
+
|
|
227
|
+
### 5.2 Update Story Status (if applicable)
|
|
228
|
+
|
|
229
|
+
If debugging was part of a story:
|
|
230
|
+
|
|
231
|
+
**If fix is complete and story can continue:**
|
|
232
|
+
```
|
|
233
|
+
athena_update_status({
|
|
234
|
+
storyId: "<story ID>",
|
|
235
|
+
status: "in_progress",
|
|
236
|
+
notes: "Debug complete. Root cause: {cause}. Fixed by: {fix}. Continuing implementation."
|
|
237
|
+
})
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
**If issue was blocking and is now resolved:**
|
|
241
|
+
```
|
|
242
|
+
athena_update_status({
|
|
243
|
+
storyId: "<story ID>",
|
|
244
|
+
status: "in_progress",
|
|
245
|
+
notes: "Blocker resolved. Issue was {root cause}. Fixed by {solution}."
|
|
246
|
+
})
|
|
247
|
+
```
|
|
248
|
+
|
|
249
|
+
**If issue requires external help:**
|
|
250
|
+
```
|
|
251
|
+
athena_update_status({
|
|
252
|
+
storyId: "<story ID>",
|
|
253
|
+
status: "blocked",
|
|
254
|
+
notes: "Debug identified issue but fix requires {external dependency/decision}. Root cause: {cause}."
|
|
255
|
+
})
|
|
256
|
+
```
|
|
257
|
+
|
|
258
|
+
## Oracle's Debugging Methodology
|
|
259
|
+
|
|
260
|
+
Oracle uses a systematic approach:
|
|
261
|
+
|
|
262
|
+
```
|
|
263
|
+
┌─────────────────────────────────────────────────────────┐
|
|
264
|
+
│ GATHER EVIDENCE │
|
|
265
|
+
│ Collect error messages, stack traces, reproduction │
|
|
266
|
+
│ steps, and context from affected code │
|
|
267
|
+
└─────────────────────────────────────────────────────────┘
|
|
268
|
+
│
|
|
269
|
+
▼
|
|
270
|
+
┌─────────────────────────────────────────────────────────┐
|
|
271
|
+
│ FORM HYPOTHESES │
|
|
272
|
+
│ Generate 3-5 possible root causes, ranked by │
|
|
273
|
+
│ likelihood based on evidence │
|
|
274
|
+
└─────────────────────────────────────────────────────────┘
|
|
275
|
+
│
|
|
276
|
+
▼
|
|
277
|
+
┌─────────────────────────────────────────────────────────┐
|
|
278
|
+
│ TEST HYPOTHESES │
|
|
279
|
+
│ For each hypothesis, identify how to verify or │
|
|
280
|
+
│ eliminate it using tools and code analysis │
|
|
281
|
+
└─────────────────────────────────────────────────────────┘
|
|
282
|
+
│
|
|
283
|
+
▼
|
|
284
|
+
┌─────────────────────────────────────────────────────────┐
|
|
285
|
+
│ IDENTIFY ROOT CAUSE │
|
|
286
|
+
│ Based on testing, determine the most likely │
|
|
287
|
+
│ root cause that explains all symptoms │
|
|
288
|
+
└─────────────────────────────────────────────────────────┘
|
|
289
|
+
│
|
|
290
|
+
▼
|
|
291
|
+
┌─────────────────────────────────────────────────────────┐
|
|
292
|
+
│ IMPLEMENT FIX │
|
|
293
|
+
│ Design and implement a solution that addresses │
|
|
294
|
+
│ the root cause (not just symptoms) │
|
|
295
|
+
└─────────────────────────────────────────────────────────┘
|
|
296
|
+
│
|
|
297
|
+
▼
|
|
298
|
+
┌─────────────────────────────────────────────────────────┐
|
|
299
|
+
│ VERIFY │
|
|
300
|
+
│ Confirm fix resolves the issue without │
|
|
301
|
+
│ introducing regressions │
|
|
302
|
+
└─────────────────────────────────────────────────────────┘
|
|
303
|
+
```
|
|
304
|
+
|
|
305
|
+
## Tips for Effective Debugging
|
|
306
|
+
|
|
307
|
+
### Provide Complete Context
|
|
308
|
+
|
|
309
|
+
- **Include full error messages** - Don't paraphrase, copy exactly
|
|
310
|
+
- **Include stack traces** - The call stack reveals the code path
|
|
311
|
+
- **Show the problematic code** - Oracle needs to see what's happening
|
|
312
|
+
- **Describe reproduction steps** - How to trigger the bug
|
|
313
|
+
|
|
314
|
+
### Don't Jump to Solutions
|
|
315
|
+
|
|
316
|
+
- Let Oracle analyze before implementing
|
|
317
|
+
- Review Oracle's hypotheses critically
|
|
318
|
+
- Confirm root cause before fixing
|
|
319
|
+
|
|
320
|
+
### Verify Thoroughly
|
|
321
|
+
|
|
322
|
+
- The bug should be gone after the fix
|
|
323
|
+
- Nothing else should break
|
|
324
|
+
- Tests should pass
|
|
325
|
+
|
|
326
|
+
### Cost Awareness
|
|
327
|
+
|
|
328
|
+
- **Oracle is expensive** (GPT-5.2 deep reasoning)
|
|
329
|
+
- Use Explore first for context gathering (cheaper)
|
|
330
|
+
- Only invoke Oracle for genuinely complex bugs
|
|
331
|
+
- Simple bugs (typos, obvious errors) don't need Oracle
|
|
332
|
+
|
|
333
|
+
## When NOT to Use This Command
|
|
334
|
+
|
|
335
|
+
- **Simple syntax errors** - LSP diagnostics will catch these
|
|
336
|
+
- **Obvious bugs** - If you can see the issue, just fix it
|
|
337
|
+
- **Configuration issues** - Check docs first
|
|
338
|
+
- **First attempt at fixing** - Try yourself first, use Oracle after 2+ failures
|