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.
@@ -0,0 +1,322 @@
1
+ ---
2
+ description: Implement the current BMAD story using Sisyphus and specialized subagents
3
+ ---
4
+
5
+ # Athena Dev - Story Implementation
6
+
7
+ You are implementing a BMAD story using OpenCode Athena's full capabilities.
8
+
9
+ **You are Sisyphus, the orchestrator.** You will coordinate subagents and tools to implement this story efficiently and correctly.
10
+
11
+ ## Step 1: Load Story Context
12
+
13
+ Call **athena_get_story** to load the current story context:
14
+
15
+ ```
16
+ athena_get_story()
17
+ ```
18
+
19
+ If you need a specific story, pass the story ID:
20
+
21
+ ```
22
+ athena_get_story({ storyId: "2.3" })
23
+ ```
24
+
25
+ This returns:
26
+ - **Story**: Requirements and acceptance criteria
27
+ - **Architecture**: Relevant technical patterns and decisions
28
+ - **PRD**: Relevant functional requirements
29
+ - **Sprint progress**: Where this story fits in the overall sprint
30
+
31
+ ## Step 2: Plan Your Approach
32
+
33
+ Before diving into code, plan your implementation strategy:
34
+
35
+ ### 2.1 Understand Existing Patterns
36
+
37
+ **If this feature is similar to existing code in the codebase**, use **@explore** to find examples:
38
+
39
+ ```
40
+ @explore Find existing implementations similar to <feature>.
41
+
42
+ I need to implement: {brief description}
43
+
44
+ Please search the codebase for:
45
+ 1. Similar features or components
46
+ 2. Patterns that match this use case
47
+ 3. Existing code I can reference or extend
48
+
49
+ Return file paths and brief descriptions of what you found.
50
+ ```
51
+
52
+ **When to use Explore:**
53
+ - ✅ When implementing something similar to existing functionality
54
+ - ✅ When you need to understand project-specific patterns
55
+ - ✅ When you want to ensure consistency with existing code
56
+ - ❌ When implementing something completely new to the codebase
57
+
58
+ ### 2.2 Research Unfamiliar Technologies
59
+
60
+ **If the story involves libraries, frameworks, or patterns you're not deeply familiar with**, use **@librarian** to research:
61
+
62
+ ```
63
+ @librarian I need to implement {feature} using {library/framework}.
64
+
65
+ Context from architecture:
66
+ {paste relevant architecture sections}
67
+
68
+ Please research:
69
+ 1. Best practices for {specific technology}
70
+ 2. Official documentation for {specific APIs}
71
+ 3. Examples from similar projects (GitHub search)
72
+ 4. Any gotchas or common mistakes to avoid
73
+
74
+ Return concrete examples and recommendations.
75
+ ```
76
+
77
+ **When to use Librarian:**
78
+ - ✅ When using unfamiliar npm packages, APIs, or frameworks
79
+ - ✅ When you need official documentation or API references
80
+ - ✅ When you want to see how others solved similar problems
81
+ - ❌ When you're already familiar with the technology
82
+
83
+ ### 2.3 Architectural Decisions
84
+
85
+ **If the story requires architectural decisions** (how to structure code, which pattern to use, trade-offs between approaches), **consult @oracle BEFORE implementing**:
86
+
87
+ ```
88
+ @oracle I need to make an architectural decision for Story {storyId}.
89
+
90
+ **Story Context:**
91
+ {paste story requirements}
92
+
93
+ **Architecture Constraints:**
94
+ {paste relevant architecture sections}
95
+
96
+ **Decision Required:**
97
+ {describe the decision - e.g., "Should I use a microservice or monolith?", "Which state management pattern?", "How to structure this module?"}
98
+
99
+ **Options I'm Considering:**
100
+ 1. {Option A} - {pros/cons}
101
+ 2. {Option B} - {pros/cons}
102
+
103
+ Please provide:
104
+ - Architectural recommendation with rationale
105
+ - How this fits with project architecture
106
+ - Long-term implications of each option
107
+ - Any risks to be aware of
108
+ ```
109
+
110
+ **When to consult Oracle for architecture:**
111
+ - ✅ Before implementing complex features
112
+ - ✅ When multiple architectural approaches exist
113
+ - ✅ When the decision has long-term implications
114
+ - ✅ When deviating from existing patterns
115
+ - ❌ For straightforward implementations following clear patterns
116
+
117
+ ## Step 3: Implement the Story
118
+
119
+ With your research and planning complete, implement the story:
120
+
121
+ ### 3.1 Follow Architecture Patterns
122
+
123
+ - **Reference the architecture sections** loaded in Step 1
124
+ - **Follow naming conventions** from similar code (found via Explore)
125
+ - **Use established patterns** (don't reinvent the wheel)
126
+
127
+ ### 3.2 Use Appropriate Tools
128
+
129
+ **For refactoring:**
130
+ - `lsp_rename` - Rename symbols safely across workspace
131
+ - `lsp_find_references` - Find all usages before changing
132
+ - `lsp_code_actions` - Apply IDE quick fixes
133
+
134
+ **For structural changes:**
135
+ - `ast_grep_search` - Find code patterns to modify
136
+ - `ast_grep_replace` - Replace code patterns safely
137
+
138
+ **For parallel work:**
139
+ - Launch background agents for independent tasks
140
+ - Example: "Frontend implementation" while you work on backend
141
+
142
+ ### 3.3 Frontend Work
143
+
144
+ **If the story involves UI/UX changes** (styling, layout, visual design), **delegate to @frontend-ui-ux-engineer**:
145
+
146
+ ```
147
+ @frontend-ui-ux-engineer Implement the UI for Story {storyId}.
148
+
149
+ **Requirements:**
150
+ {paste UI-related acceptance criteria}
151
+
152
+ **Design Constraints:**
153
+ {any design system, component library, or styling guidelines from architecture}
154
+
155
+ **Components Needed:**
156
+ {list components to create or modify}
157
+
158
+ Please implement the visual/UX aspects. I will handle the business logic and data flow.
159
+ ```
160
+
161
+ **When to delegate to Frontend UI/UX Engineer:**
162
+ - ✅ Styling, colors, spacing, typography
163
+ - ✅ Layout, responsive design, animations
164
+ - ✅ Visual component structure
165
+ - ❌ Business logic, data fetching, state management (you handle these)
166
+
167
+ ## Step 4: Verify Implementation
168
+
169
+ Before marking the story complete, verify your work:
170
+
171
+ ### 4.1 Self-Check Acceptance Criteria
172
+
173
+ For EACH acceptance criterion in the story:
174
+ - [ ] Have you implemented it?
175
+ - [ ] Does it work as specified?
176
+ - [ ] Have you tested it?
177
+
178
+ ### 4.2 Run Automated Checks
179
+
180
+ **Run LSP diagnostics on files you modified:**
181
+
182
+ ```
183
+ lsp_diagnostics(filePath: "<file you changed>", severity: "all")
184
+ ```
185
+
186
+ **Address ALL errors.** Warnings should be addressed if reasonable.
187
+
188
+ **If the project has a build command:**
189
+
190
+ ```bash
191
+ npm run build
192
+ # OR
193
+ pnpm run build
194
+ # OR
195
+ yarn build
196
+ ```
197
+
198
+ **Build MUST pass** before completing the story.
199
+
200
+ **If the project has tests:**
201
+
202
+ ```bash
203
+ npm test
204
+ # OR
205
+ pnpm test
206
+ # OR
207
+ yarn test
208
+ ```
209
+
210
+ **Tests MUST pass** before completing the story.
211
+
212
+ ### 4.3 Code Quality Self-Review
213
+
214
+ Ask yourself:
215
+ - Is the code self-documenting? (minimal comments needed)
216
+ - Are variable and function names clear?
217
+ - Is error handling appropriate?
218
+ - Are there any `any` types, `@ts-ignore`, or other type safety compromises?
219
+ - Does this follow the architecture patterns?
220
+
221
+ **If you're unsure about code quality**, consider running `/athena-review` for a comprehensive quality gate.
222
+
223
+ ## Step 5: Complete the Story
224
+
225
+ When implementation is verified and ready, update the status:
226
+
227
+ ```
228
+ athena_update_status({
229
+ storyId: "<story ID>",
230
+ status: "completed",
231
+ completionSummary: "Implemented {feature}. {What was built}. {Tests status}. {Any notes}."
232
+ })
233
+ ```
234
+
235
+ ### Completion Checklist
236
+
237
+ Before marking complete, ensure:
238
+ - [ ] ALL acceptance criteria met
239
+ - [ ] LSP diagnostics clean (no errors)
240
+ - [ ] Build passes (if applicable)
241
+ - [ ] Tests pass (if applicable)
242
+ - [ ] Code follows architecture patterns
243
+ - [ ] No type safety compromises
244
+ - [ ] Code is self-documenting
245
+
246
+ ### If Not Ready
247
+
248
+ If the story isn't complete but you need to save progress:
249
+
250
+ ```
251
+ athena_update_status({
252
+ storyId: "<story ID>",
253
+ status: "in_progress",
254
+ notes: "Progress: {what's done}. Remaining: {what's left}."
255
+ })
256
+ ```
257
+
258
+ ## If You Get Blocked
259
+
260
+ If you encounter a blocker:
261
+
262
+ ```
263
+ athena_update_status({
264
+ storyId: "<story ID>",
265
+ status: "blocked",
266
+ notes: "Blocked because {specific reason}. Need {what's needed} to proceed."
267
+ })
268
+ ```
269
+
270
+ Then explain the blocker in detail so the user can help resolve it.
271
+
272
+ **If blocked on a technical issue**, consider using `/athena-debug` to invoke Oracle for debugging help.
273
+
274
+ ## Orchestration Summary
275
+
276
+ Your workflow as Sisyphus:
277
+
278
+ ```
279
+ 1. Load story (athena_get_story)
280
+ 2. Plan approach:
281
+ - @explore → Find similar code in codebase
282
+ - @librarian → Research unfamiliar tech
283
+ - @oracle → Get architectural guidance
284
+ 3. Implement:
285
+ - Follow architecture patterns
286
+ - Use LSP/AST tools for refactoring
287
+ - @frontend-ui-ux-engineer → Delegate UI work
288
+ 4. Verify:
289
+ - Check acceptance criteria
290
+ - Run diagnostics, build, tests
291
+ - Self-review code quality
292
+ 5. Complete (athena_update_status)
293
+ ```
294
+
295
+ ## Quality Standards
296
+
297
+ 1. **Meet ALL acceptance criteria** - Non-negotiable
298
+ 2. **Follow architecture patterns exactly** - Consistency is critical
299
+ 3. **Minimize comments** - Code should be self-documenting
300
+ 4. **LSP diagnostics clean** - No errors allowed
301
+ 5. **Tests pass** - If tests exist, they must pass
302
+ 6. **Build succeeds** - If build exists, it must succeed
303
+ 7. **No type safety compromises** - No `any`, no ignores
304
+ 8. **No regressions** - Existing functionality must still work
305
+
306
+ ## When to Use Each Subagent
307
+
308
+ | Subagent | When to Use | Don't Use When |
309
+ |----------|-------------|----------------|
310
+ | **@explore** | Finding existing patterns in codebase | Implementing something brand new |
311
+ | **@librarian** | Researching libraries, APIs, external docs | You already know the tech well |
312
+ | **@oracle** | Architectural decisions, complex debugging | Straightforward implementations |
313
+ | **@frontend-ui-ux-engineer** | UI/visual/styling work | Business logic or data flow |
314
+
315
+ ## Tips for Effective Implementation
316
+
317
+ - **Start with exploration** - Understand what exists before building new
318
+ - **Research before coding** - Know the best practices before implementing
319
+ - **Consult Oracle early** - Don't paint yourself into an architectural corner
320
+ - **Delegate UI work** - Let specialists handle what they do best
321
+ - **Verify continuously** - Don't wait until the end to check quality
322
+ - **Document decisions** - If you made a trade-off, note it in the completion summary
@@ -0,0 +1,325 @@
1
+ ---
2
+ description: Display OpenCode Athena configuration and toolkit information
3
+ ---
4
+
5
+ # Athena Info - Toolkit Information
6
+
7
+ Display current OpenCode Athena configuration, available capabilities, and troubleshooting information.
8
+
9
+ ## View Current Configuration
10
+
11
+ Call **athena_config** to see the current setup:
12
+
13
+ ```
14
+ athena_config()
15
+ ```
16
+
17
+ This displays:
18
+ - Athena version
19
+ - Configured LLM providers
20
+ - Agent model assignments
21
+ - BMAD settings
22
+ - Enabled features
23
+ - MCP servers
24
+
25
+ ## Configuration Sections
26
+
27
+ ### View Specific Section
28
+
29
+ To view only a specific section:
30
+
31
+ ```
32
+ athena_config({ section: "subscriptions" })
33
+ athena_config({ section: "models" })
34
+ athena_config({ section: "bmad" })
35
+ athena_config({ section: "features" })
36
+ athena_config({ section: "mcps" })
37
+ ```
38
+
39
+ ### Section Details
40
+
41
+ **Subscriptions:**
42
+ - Which LLM providers are configured (Claude, OpenAI, Google)
43
+ - Authentication status
44
+
45
+ **Models:**
46
+ - Agent model assignments
47
+ - Sisyphus model (main orchestrator)
48
+ - Oracle model (deep reasoning)
49
+ - Librarian model (research)
50
+ - Frontend Engineer model
51
+ - Document Writer model
52
+ - Multimodal Looker model
53
+
54
+ **BMAD:**
55
+ - Methodology track
56
+ - Auto status update setting
57
+ - Parallel story limit
58
+ - BMAD directory location
59
+
60
+ **Features:**
61
+ - Bridge commands enabled
62
+ - Auto sprint status updates
63
+ - Parallel execution
64
+ - Notifications
65
+ - Context monitoring
66
+ - Comment checker
67
+ - LSP tools
68
+
69
+ **MCPs:**
70
+ - context7 (documentation lookup)
71
+ - websearch_exa (web search)
72
+ - grep_app (GitHub code search)
73
+
74
+ ## Configuration Files
75
+
76
+ Configuration is stored in these locations:
77
+
78
+ ### Global Configuration (all projects)
79
+
80
+ ```
81
+ ~/.config/opencode/
82
+ ├── athena.json # Athena-specific settings
83
+ ├── oh-my-opencode.json # Agent model configuration
84
+ ├── opencode.json # Plugin registration
85
+ └── package.json # Installed plugin packages
86
+ ```
87
+
88
+ ### Project Configuration (overrides global)
89
+
90
+ ```
91
+ [project]/.opencode/
92
+ ├── athena.json # Project-specific Athena settings
93
+ └── oh-my-opencode.json # Project-specific agent models
94
+ ```
95
+
96
+ ## Toolkit Capabilities
97
+
98
+ ### Bridge Commands
99
+
100
+ | Command | Description | Invokes |
101
+ |---------|-------------|---------|
102
+ | `/athena-dev` | Implement a BMAD story | Sisyphus + subagents |
103
+ | `/athena-review` | Quality gate review | Oracle (code + adversarial) |
104
+ | `/athena-debug` | Debug complex issues | Oracle |
105
+ | `/athena-research` | Research patterns/docs | Librarian |
106
+ | `/athena-status` | Sprint status management | Athena tools |
107
+ | `/athena-info` | This command | athena_config |
108
+ | `/athena-parallel` | Parallel story execution | (Planned) |
109
+
110
+ ### Available Subagents
111
+
112
+ | Agent | Model | Specialty |
113
+ |-------|-------|-----------|
114
+ | **Sisyphus** | (configured) | Orchestration, implementation |
115
+ | **Oracle** | (configured) | Deep reasoning, debugging, code review |
116
+ | **Librarian** | (configured) | Research, documentation, examples |
117
+ | **Explore** | (configured) | Fast codebase search |
118
+ | **Frontend UI/UX Engineer** | (configured) | Visual design, UI implementation |
119
+ | **Document Writer** | (configured) | Documentation |
120
+ | **Multimodal Looker** | (configured) | Image/PDF analysis |
121
+
122
+ ### Available Tools
123
+
124
+ **Athena Tools:**
125
+ - `athena_get_story` - Load BMAD story context
126
+ - `athena_update_status` - Update sprint status
127
+ - `athena_get_context` - Get cached story context
128
+ - `athena_config` - View configuration
129
+ - `athena_parallel` - Parallel story execution (planned)
130
+
131
+ **oh-my-opencode Tools:**
132
+ - LSP tools (hover, goto definition, find references, rename, etc.)
133
+ - AST-grep tools (search, replace)
134
+ - Background agent tools
135
+ - Interactive bash (tmux)
136
+
137
+ **MCP Tools:**
138
+ - context7 (documentation lookup)
139
+ - websearch_exa (web search)
140
+ - grep_app (GitHub search)
141
+
142
+ ## Modifying Configuration
143
+
144
+ ### Option 1: Reinstall with Different Options
145
+
146
+ ```bash
147
+ npx opencode-athena install
148
+ ```
149
+
150
+ Interactive installer will prompt for new configuration.
151
+
152
+ ### Option 2: Use a Preset
153
+
154
+ ```bash
155
+ npx opencode-athena install --preset minimal
156
+ npx opencode-athena install --preset standard
157
+ npx opencode-athena install --preset enterprise
158
+ npx opencode-athena install --preset solo-quick
159
+ ```
160
+
161
+ ### Option 3: Edit Config Files Directly
162
+
163
+ **Edit Athena settings:**
164
+ ```bash
165
+ # Global
166
+ nano ~/.config/opencode/athena.json
167
+
168
+ # Project-specific
169
+ nano .opencode/athena.json
170
+ ```
171
+
172
+ **Edit agent models:**
173
+ ```bash
174
+ # Global
175
+ nano ~/.config/opencode/oh-my-opencode.json
176
+
177
+ # Project-specific
178
+ nano .opencode/oh-my-opencode.json
179
+ ```
180
+
181
+ ### Option 4: Update Specific Settings
182
+
183
+ After editing config files, restart OpenCode to apply changes.
184
+
185
+ ## Troubleshooting
186
+
187
+ ### Check Installation Health
188
+
189
+ Run the doctor command in terminal:
190
+
191
+ ```bash
192
+ npx opencode-athena doctor
193
+ ```
194
+
195
+ This checks:
196
+ - Node.js version
197
+ - OpenCode version
198
+ - Plugin installation
199
+ - Configuration validity
200
+ - Authentication status
201
+
202
+ ### Auto-Fix Common Issues
203
+
204
+ ```bash
205
+ npx opencode-athena doctor --fix
206
+ ```
207
+
208
+ This will attempt to:
209
+ - Reinstall missing plugins
210
+ - Fix broken symlinks
211
+ - Repair config files
212
+ - Re-copy bridge commands
213
+
214
+ ### Common Issues
215
+
216
+ | Issue | Solution |
217
+ |-------|----------|
218
+ | Plugin not loading | Run `doctor --fix` to reinstall |
219
+ | Auth errors | Run `opencode auth login` for each provider |
220
+ | BMAD not found | Run `npx bmad-method@alpha install` in project |
221
+ | Commands not available | Verify commands in `~/.config/opencode/command/` |
222
+ | Agent model errors | Check `oh-my-opencode.json` configuration |
223
+
224
+ ### Verify Plugin Installation
225
+
226
+ Check installed plugins:
227
+
228
+ ```bash
229
+ ls ~/.config/opencode/node_modules/ | grep -E '(opencode-athena|oh-my-opencode)'
230
+ ```
231
+
232
+ Check OpenCode config:
233
+
234
+ ```bash
235
+ cat ~/.config/opencode/opencode.json | grep plugin
236
+ ```
237
+
238
+ Should include:
239
+ - `opencode-athena/plugin`
240
+ - `oh-my-opencode`
241
+
242
+ ### Check Authentication
243
+
244
+ For each provider you've configured:
245
+
246
+ ```bash
247
+ opencode auth login
248
+ # Select provider and authenticate
249
+ ```
250
+
251
+ ## Version Information
252
+
253
+ ### Check Versions
254
+
255
+ ```bash
256
+ # Athena CLI version
257
+ npx opencode-athena --version
258
+
259
+ # Installed package versions
260
+ cd ~/.config/opencode
261
+ npm list opencode-athena oh-my-opencode
262
+ ```
263
+
264
+ ### Update to Latest
265
+
266
+ ```bash
267
+ npx opencode-athena update
268
+ ```
269
+
270
+ This updates:
271
+ - opencode-athena CLI
272
+ - oh-my-opencode plugin
273
+ - Auth plugins
274
+ - Bridge commands
275
+
276
+ ## Getting Help
277
+
278
+ ### Documentation
279
+
280
+ - [OpenCode Athena GitHub](https://github.com/ZebulonRouseFrantzich/opencode-athena)
281
+ - [oh-my-opencode GitHub](https://github.com/code-yeongyu/oh-my-opencode)
282
+ - [BMAD METHOD GitHub](https://github.com/bmad-method/bmad-method)
283
+
284
+ ### Report Issues
285
+
286
+ If you encounter bugs:
287
+
288
+ 1. Run `npx opencode-athena doctor` and save output
289
+ 2. Note what you were doing when the issue occurred
290
+ 3. Open an issue on the appropriate GitHub repo
291
+
292
+ ### Quick Reference Card
293
+
294
+ ```
295
+ ┌────────────────────────────────────────────────────────────┐
296
+ │ ATHENA QUICK REFERENCE │
297
+ ├────────────────────────────────────────────────────────────┤
298
+ │ │
299
+ │ COMMANDS: │
300
+ │ /athena-dev → Implement a story │
301
+ │ /athena-review → Quality gate review │
302
+ │ /athena-debug → Debug with Oracle │
303
+ │ /athena-research → Research with Librarian │
304
+ │ /athena-status → Sprint status │
305
+ │ /athena-info → This help │
306
+ │ │
307
+ │ AGENTS: │
308
+ │ @oracle → Deep reasoning, code review │
309
+ │ @librarian → Research, docs, examples │
310
+ │ @explore → Fast codebase search │
311
+ │ @frontend-ui-ux-engineer → UI/UX work │
312
+ │ │
313
+ │ TOOLS: │
314
+ │ athena_get_story → Load story context │
315
+ │ athena_update_status → Update story status │
316
+ │ athena_config → View configuration │
317
+ │ │
318
+ │ CLI: │
319
+ │ npx opencode-athena install → Install/configure │
320
+ │ npx opencode-athena update → Update plugins │
321
+ │ npx opencode-athena doctor → Diagnose issues │
322
+ │ npx opencode-athena info → Show config │
323
+ │ │
324
+ └────────────────────────────────────────────────────────────┘
325
+ ```