opencode-enhancer-plugin 1.0.1 â 1.5.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 +159 -13
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +756 -18
- package/dist/index.js.map +1 -1
- package/dist/types.d.ts +28 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +2 -0
- package/dist/types.js.map +1 -0
- package/dist/utils/sessionStore.d.ts +21 -0
- package/dist/utils/sessionStore.d.ts.map +1 -0
- package/dist/utils/sessionStore.js +70 -0
- package/dist/utils/sessionStore.js.map +1 -0
- package/dist/utils/todoParser.d.ts +9 -0
- package/dist/utils/todoParser.d.ts.map +1 -0
- package/dist/utils/todoParser.js +79 -0
- package/dist/utils/todoParser.js.map +1 -0
- package/package.json +4 -2
package/README.md
CHANGED
|
@@ -14,6 +14,8 @@ The **Enhancer** is a third primary agent mode for OpenCode that sits alongside
|
|
|
14
14
|
|
|
15
15
|
- **đ Intelligent Context Analysis** - Automatically explores your project structure, tech stack, and relevant files
|
|
16
16
|
- **đ§ Intent Classification** - Categorizes requests as FIX, FEAT, REFACTOR, TEST, or EXPLAIN
|
|
17
|
+
- **đ Todo Enforcer System** - Tracks TODOs and prevents stopping until all tasks are completed (for ultraplan and strategos agents)
|
|
18
|
+
- **đŻ Strategos Mode** - Strategic planning with interview mode for complex tasks
|
|
17
19
|
- **đ Context7 Integration** - Conditionally includes `use context7` when documentation-heavy frameworks are detected
|
|
18
20
|
- **đ¨ Style-Aware** - Mimics your project's coding style and patterns
|
|
19
21
|
- **⥠One-Click Workflow** - Generates copy-pasteable prompts ready for Build mode
|
|
@@ -66,6 +68,7 @@ Plan â Build â Enhancer â Plan
|
|
|
66
68
|
### Version Management
|
|
67
69
|
|
|
68
70
|
- **Latest version**: `"opencode-enhancer-plugin@latest"`
|
|
71
|
+
- **Current version**: `"opencode-enhancer-plugin@1.4.0"`
|
|
69
72
|
- **Specific version**: `"opencode-enhancer-plugin@1.0.0"`
|
|
70
73
|
- **Update**: OpenCode auto-updates plugins on startup, or run `opencode --update-plugins`
|
|
71
74
|
|
|
@@ -102,6 +105,37 @@ Remove from your `opencode.json`:
|
|
|
102
105
|
4. **Receive enhanced prompt** - Structured markdown with context, instructions, and technical requirements
|
|
103
106
|
5. **Copy & Execute** - Switch to Build mode and run the generated prompt
|
|
104
107
|
|
|
108
|
+
## đ Changelog
|
|
109
|
+
|
|
110
|
+
### v1.5.0 - Specialized Subagents
|
|
111
|
+
- **đ Librarian** - Documentation and research specialist with Context7 and Code Search
|
|
112
|
+
- **đŽ Oracle** - Debugging and code architecture specialist
|
|
113
|
+
- **đď¸ Architect** - Dependencies and system design specialist
|
|
114
|
+
- **â
Reviewer** - Plan validation specialist
|
|
115
|
+
- **đ¤ Interviewer** - Requirements clarification specialist
|
|
116
|
+
- Optimized 4+1 subagent structure (4 specialists + 1 interviewer)
|
|
117
|
+
- Simplified, focused prompts for better performance
|
|
118
|
+
|
|
119
|
+
### v1.4.0 - Todo Enforcer & Strategos Mode
|
|
120
|
+
- **đ Todo Enforcer System** - Tracks TODOs and prevents stopping until all tasks are completed (for ultraplan and strategos agents)
|
|
121
|
+
- **đŻ Strategos Mode** - New primary agent with strategic planning and interview mode for complex multi-phase tasks
|
|
122
|
+
- strategos-interviewer subagent for stakeholder requirement gathering
|
|
123
|
+
- Enhanced hooks for session management and TODO tracking
|
|
124
|
+
- Auto-activation of strategos mode on keyword detection
|
|
125
|
+
|
|
126
|
+
### v1.2.0 - New Agents & Model Configuration
|
|
127
|
+
- **ultraplan** & **ask** primary agents
|
|
128
|
+
- **review-plan** subagent for critical analysis
|
|
129
|
+
- Enhanced model configuration with environment variables
|
|
130
|
+
|
|
131
|
+
### v1.0.0 - Initial Release
|
|
132
|
+
- **enhancer** primary agent
|
|
133
|
+
- **explore-context** subagent for project analysis
|
|
134
|
+
- Intent classification and Context7 integration
|
|
135
|
+
- Style-aware prompt generation
|
|
136
|
+
|
|
137
|
+
---
|
|
138
|
+
|
|
105
139
|
## đ¨ Example Output
|
|
106
140
|
|
|
107
141
|
```markdown
|
|
@@ -133,11 +167,26 @@ use context7
|
|
|
133
167
|
|
|
134
168
|
### Components
|
|
135
169
|
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
|
140
|
-
|
|
170
|
+
#### Primary Agents (User-Facing)
|
|
171
|
+
Activated via `Tab` key in OpenCode:
|
|
172
|
+
|
|
173
|
+
| Agent | Color | Steps | Description |
|
|
174
|
+
|-------|-------|-------|-------------|
|
|
175
|
+
| **enhancer** | Purple (#9C27B0) | 15 | Universal Technical Architect - analyzes intent and generates executable prompts |
|
|
176
|
+
| **ultraplan** | Orange (#FF5722) | 20 | Iterative Planner with Todo Enforcement - creates plans through parallel subagent analysis and review loops |
|
|
177
|
+
| **ask** | Blue (#2196F3) | 15 | Research Assistant - answers codebase questions via multi-source context gathering |
|
|
178
|
+
| **strategos** | Deep Orange (#BF360C) | 30 | Strategic Planner with Interview Mode - handles complex multi-phase tasks with strategic planning and stakeholder interviews |
|
|
179
|
+
|
|
180
|
+
#### Subagents (Background Workers)
|
|
181
|
+
Called automatically by primary agents via `task` tool:
|
|
182
|
+
|
|
183
|
+
| Subagent | Called By | Description |
|
|
184
|
+
|----------|-----------|-------------|
|
|
185
|
+
| **librarian** | All primary agents | Documentation and codebase research specialist (Context7 + codesearch) |
|
|
186
|
+
| **oracle** | All primary agents | Debugging and code architecture specialist |
|
|
187
|
+
| **architect** | ultraplan, strategos, ask | Dependencies and system design specialist |
|
|
188
|
+
| **reviewer** | ultraplan, strategos | Plan validation and critical analysis specialist |
|
|
189
|
+
| **interviewer** | strategos only | Requirements clarification and stakeholder interview specialist |
|
|
141
190
|
|
|
142
191
|
### Supported Tech Stacks
|
|
143
192
|
|
|
@@ -152,28 +201,120 @@ use context7
|
|
|
152
201
|
|
|
153
202
|
### Agent Configuration
|
|
154
203
|
|
|
155
|
-
The plugin automatically registers
|
|
204
|
+
The plugin automatically registers agents via the `config` hook with **configurable models**:
|
|
156
205
|
|
|
157
206
|
```typescript
|
|
158
|
-
// Enhancer (Primary Agent)
|
|
207
|
+
// Enhancer (Primary Agent) - Model configurable via opencode.json or env vars
|
|
159
208
|
{
|
|
160
209
|
mode: "primary",
|
|
161
|
-
model: "opencode/kimi-k2.5-free",
|
|
210
|
+
model: "opencode/kimi-k2.5-free", // Default, can be overridden
|
|
162
211
|
description: "Universal Technical Architect & Prompt Enhancer",
|
|
163
212
|
color: "#9C27B0",
|
|
164
213
|
steps: 15,
|
|
165
214
|
tools: { task: true, read: true }
|
|
166
215
|
}
|
|
167
216
|
|
|
168
|
-
// Explore-Context (Subagent)
|
|
217
|
+
// Explore-Context (Subagent) - Model configurable via opencode.json or env vars
|
|
169
218
|
{
|
|
170
219
|
mode: "subagent",
|
|
171
220
|
hidden: true,
|
|
172
|
-
model: "opencode/kimi-k2.5-free",
|
|
221
|
+
model: "opencode/kimi-k2.5-free", // Default, can be overridden
|
|
173
222
|
tools: { list: true, read: true, grep: true, bash: true }
|
|
174
223
|
}
|
|
175
224
|
```
|
|
176
225
|
|
|
226
|
+
### Model Configuration
|
|
227
|
+
|
|
228
|
+
You can configure custom models for Enhancer agents. This is useful for:
|
|
229
|
+
- Using more powerful models for complex planning tasks
|
|
230
|
+
- Saving costs by using simpler models for subagents
|
|
231
|
+
- Testing specific models for certain task types
|
|
232
|
+
|
|
233
|
+
#### Configuration Methods (Priority: Highest â Lowest)
|
|
234
|
+
|
|
235
|
+
##### 1. OpenCode Agent Config (Recommended)
|
|
236
|
+
Configure models directly in your `opencode.json`:
|
|
237
|
+
|
|
238
|
+
```json
|
|
239
|
+
{
|
|
240
|
+
"agent": {
|
|
241
|
+
"strategos": {
|
|
242
|
+
"model": "anthropic/claude-sonnet-4-5"
|
|
243
|
+
},
|
|
244
|
+
"oracle": {
|
|
245
|
+
"model": "anthropic/claude-sonnet-4-5"
|
|
246
|
+
},
|
|
247
|
+
"librarian": {
|
|
248
|
+
"model": "opencode/kimi-k2.5-free"
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
```
|
|
253
|
+
|
|
254
|
+
##### 2. Environment Variables
|
|
255
|
+
Use environment variables for CI/CD or temporary changes:
|
|
256
|
+
|
|
257
|
+
```bash
|
|
258
|
+
# All Subagents
|
|
259
|
+
export ENHANCER_MODEL_SUBAGENT="opencode/kimi-k2.5-free"
|
|
260
|
+
|
|
261
|
+
# All Primary Agents
|
|
262
|
+
export ENHANCER_MODEL_PRIMARY="anthropic/claude-sonnet-4-5"
|
|
263
|
+
|
|
264
|
+
# Specific Agent (highest priority among env vars)
|
|
265
|
+
export ENHANCER_MODEL_STRATEGOS="anthropic/claude-opus-4"
|
|
266
|
+
export ENHANCER_MODEL_ORACLE="anthropic/claude-sonnet-4-5"
|
|
267
|
+
```
|
|
268
|
+
|
|
269
|
+
#### Model Recommendations by Agent Type
|
|
270
|
+
|
|
271
|
+
**Primary Agents** (Use stronger models for complex reasoning):
|
|
272
|
+
|
|
273
|
+
| Agent | Recommended | Minimum | Purpose |
|
|
274
|
+
|-------|-----------|---------|---------|
|
|
275
|
+
| strategos | anthropic/claude-sonnet-4-5 | opencode/kimi-k2.5-free | Strategic planning with interview mode |
|
|
276
|
+
| ultraplan | anthropic/claude-sonnet-4-5 | opencode/kimi-k2.5-free | Planning with todo enforcement |
|
|
277
|
+
| enhancer | opencode/kimi-k2.5-free | opencode/kimi-k2.5-free | Prompt enhancement & analysis |
|
|
278
|
+
| ask | opencode/kimi-k2.5-free | opencode/kimi-k2.5-free | Q&A and research |
|
|
279
|
+
|
|
280
|
+
**Subagents** (Lightweight models sufficient for information gathering):
|
|
281
|
+
|
|
282
|
+
| Subagent | Recommended | Minimum | Purpose |
|
|
283
|
+
|----------|-------------|---------|---------|
|
|
284
|
+
| librarian | opencode/kimi-k2.5-free | opencode/kimi-k2.5-free | Documentation & research (Context7 + codesearch) |
|
|
285
|
+
| oracle | anthropic/claude-sonnet-4-5 | opencode/kimi-k2.5-free | Debugging & code architecture |
|
|
286
|
+
| architect | opencode/kimi-k2.5-free | opencode/kimi-k2.5-free | Dependencies & system design |
|
|
287
|
+
| reviewer | opencode/kimi-k2.5-free | opencode/kimi-k2.5-free | Plan validation |
|
|
288
|
+
| interviewer | anthropic/claude-sonnet-4-5 | opencode/kimi-k2.5-free | Requirements clarification |
|
|
289
|
+
|
|
290
|
+
#### Validation
|
|
291
|
+
|
|
292
|
+
The plugin validates configured models against known providers:
|
|
293
|
+
- `opencode/*`
|
|
294
|
+
- `anthropic/*`
|
|
295
|
+
- `openai/*`
|
|
296
|
+
- `google/*`
|
|
297
|
+
- `mistral/*`
|
|
298
|
+
- `cohere/*`
|
|
299
|
+
- `ollama/*`
|
|
300
|
+
|
|
301
|
+
Invalid models automatically fall back to the default (`opencode/kimi-k2.5-free`).
|
|
302
|
+
|
|
303
|
+
#### đ¨ Ready-to-Use Templates
|
|
304
|
+
|
|
305
|
+
Siehe [`MODEL-TEMPLATES.md`](./MODEL-TEMPLATES.md) fĂźr vorgefertigte Konfigurationen:
|
|
306
|
+
|
|
307
|
+
- đ **Performance First** - Beste Ergebnisse mit Claude
|
|
308
|
+
- đ° **Budget First** - Kosten sparen mit Kimi
|
|
309
|
+
- ⥠**Hybrid** - Intelligente Aufteilung nach Aufgabe
|
|
310
|
+
- đ§ **Custom Models** - OpenAI, Google, etc.
|
|
311
|
+
|
|
312
|
+
**Quick-Start:**
|
|
313
|
+
```bash
|
|
314
|
+
# Hybrid Template (empfohlen fĂźr den Anfang)
|
|
315
|
+
curl -s https://raw.githubusercontent.com/MaansenV/opencode-enhancer-plugin/main/MODEL-TEMPLATES.md | grep -A 50 "Template 3: Hybrid"
|
|
316
|
+
```
|
|
317
|
+
|
|
177
318
|
### Context7 Integration
|
|
178
319
|
|
|
179
320
|
The plugin automatically detects libraries that benefit from Context7:
|
|
@@ -201,9 +342,14 @@ opencode-enhancer-plugin/
|
|
|
201
342
|
|
|
202
343
|
### Hooks
|
|
203
344
|
|
|
204
|
-
- **`config`** - Registers
|
|
205
|
-
- **`tool.execute.before`** - Logs
|
|
206
|
-
- **`message.updated`** - Appends Build mode hint
|
|
345
|
+
- **`config`** - Registers agents on startup
|
|
346
|
+
- **`tool.execute.before`** - Logs subagent calls
|
|
347
|
+
- **`message.updated`** - Appends Build mode hint
|
|
348
|
+
- **`message.completed`** - Extracts and stores TODOs
|
|
349
|
+
- **`stop.requested`** - Prevents stop when TODOs are open
|
|
350
|
+
- **`session.start`** - Manages todo store lifecycle
|
|
351
|
+
- **`session.end`** - Manages todo store lifecycle
|
|
352
|
+
- **`user.prompt.submitted`** - Auto-activates strategos mode on keywords
|
|
207
353
|
|
|
208
354
|
## đ¤ Contributing
|
|
209
355
|
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAA;AAqHjD,eAAO,MAAM,cAAc,EAAE,MAqwB5B,CAAA;AAED,eAAe,cAAc,CAAA"}
|