opencode-enhancer-plugin 1.0.1 → 1.4.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 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,28 @@ 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.4.0 - Todo Enforcer & Strategos Mode
111
+ - **🔒 Todo Enforcer System** - Tracks TODOs and prevents stopping until all tasks are completed (for ultraplan and strategos agents)
112
+ - **🎯 Strategos Mode** - New primary agent with strategic planning and interview mode for complex multi-phase tasks
113
+ - **strategos-interviewer** subagent for stakeholder requirement gathering
114
+ - Enhanced hooks for session management and TODO tracking
115
+ - Auto-activation of strategos mode on keyword detection
116
+
117
+ ### v1.2.0 - New Agents & Model Configuration
118
+ - **ultraplan** & **ask** primary agents
119
+ - **review-plan** subagent for critical analysis
120
+ - Enhanced model configuration with environment variables
121
+
122
+ ### v1.0.0 - Initial Release
123
+ - **enhancer** primary agent
124
+ - **explore-context** subagent for project analysis
125
+ - Intent classification and Context7 integration
126
+ - Style-aware prompt generation
127
+
128
+ ---
129
+
105
130
  ## 🎨 Example Output
106
131
 
107
132
  ```markdown
@@ -133,11 +158,27 @@ use context7
133
158
 
134
159
  ### Components
135
160
 
136
- | Component | Type | Description |
137
- |-----------|------|-------------|
138
- | **Enhancer** | Primary Agent | Main interface, intent classification, prompt generation |
139
- | **Explore-Context** | Subagent | Read-only codebase analysis, tech stack detection |
140
- | **check_context7** | Tool | Decides if libraries need Context7 documentation |
161
+ #### Primary Agents (User-Facing)
162
+ Activated via `Tab` key in OpenCode:
163
+
164
+ | Agent | Color | Steps | Description |
165
+ |-------|-------|-------|-------------|
166
+ | **enhancer** | Purple (#9C27B0) | 15 | Universal Technical Architect - analyzes intent and generates executable prompts |
167
+ | **ultraplan** | Orange (#FF5722) | 20 | Iterative Planner with Todo Enforcement - creates plans through parallel subagent analysis and review loops |
168
+ | **ask** | Blue (#2196F3) | 15 | Research Assistant - answers codebase questions via multi-source context gathering |
169
+ | **strategos** | Deep Orange (#BF360C) | 30 | Strategic Planner with Interview Mode - handles complex multi-phase tasks with strategic planning and stakeholder interviews |
170
+
171
+ #### Subagents (Background Workers)
172
+ Called automatically by primary agents via `task` tool:
173
+
174
+ | Subagent | Called By | Description |
175
+ |----------|-----------|-------------|
176
+ | **explore-context** | enhancer, ultraplan, ask | Maps project structure, detects tech stack, identifies entry points |
177
+ | **explore-code** | enhancer, ultraplan, ask | Deep-dive source code analysis for relevant files and patterns |
178
+ | **explore-deps** | enhancer, ultraplan, ask | Analyzes dependencies, imports, and external libraries |
179
+ | **explore-tests** | ultraplan, ask (for TEST intent) | Discovers test framework, patterns, and existing coverage |
180
+ | **review-plan** | ultraplan only | Critical analysis of implementation plans during review loop |
181
+ | **strategos-interviewer** | strategos only | Conducts stakeholder interviews to gather strategic requirements and constraints |
141
182
 
142
183
  ### Supported Tech Stacks
143
184
 
@@ -152,28 +193,101 @@ use context7
152
193
 
153
194
  ### Agent Configuration
154
195
 
155
- The plugin automatically registers both agents via the `config` hook:
196
+ The plugin automatically registers agents via the `config` hook with **configurable models**:
156
197
 
157
198
  ```typescript
158
- // Enhancer (Primary Agent)
199
+ // Enhancer (Primary Agent) - Model configurable via opencode.json or env vars
159
200
  {
160
201
  mode: "primary",
161
- model: "opencode/kimi-k2.5-free",
202
+ model: "opencode/kimi-k2.5-free", // Default, can be overridden
162
203
  description: "Universal Technical Architect & Prompt Enhancer",
163
204
  color: "#9C27B0",
164
205
  steps: 15,
165
206
  tools: { task: true, read: true }
166
207
  }
167
208
 
168
- // Explore-Context (Subagent)
209
+ // Explore-Context (Subagent) - Model configurable via opencode.json or env vars
169
210
  {
170
211
  mode: "subagent",
171
212
  hidden: true,
172
- model: "opencode/kimi-k2.5-free",
213
+ model: "opencode/kimi-k2.5-free", // Default, can be overridden
173
214
  tools: { list: true, read: true, grep: true, bash: true }
174
215
  }
175
216
  ```
176
217
 
218
+ ### Model Configuration
219
+
220
+ You can configure custom models for Enhancer agents. This is useful for:
221
+ - Using more powerful models for complex planning tasks
222
+ - Saving costs by using simpler models for subagents
223
+ - Testing specific models for certain task types
224
+
225
+ #### Configuration Methods (Priority: Highest → Lowest)
226
+
227
+ ##### 1. OpenCode Agent Config (Recommended)
228
+ Configure models directly in your `opencode.json`:
229
+
230
+ ```json
231
+ {
232
+ "agent": {
233
+ "review-plan": {
234
+ "model": "anthropic/claude-sonnet-4-5"
235
+ },
236
+ "enhancer": {
237
+ "model": "anthropic/claude-sonnet-4-5"
238
+ }
239
+ }
240
+ }
241
+ ```
242
+
243
+ ##### 2. Environment Variables
244
+ Use environment variables for CI/CD or temporary changes:
245
+
246
+ ```bash
247
+ # All Subagents
248
+ export ENHANCER_MODEL_SUBAGENT="opencode/kimi-k2.5-free"
249
+
250
+ # All Primary Agents
251
+ export ENHANCER_MODEL_PRIMARY="anthropic/claude-sonnet-4-5"
252
+
253
+ # Specific Agent (highest priority among env vars)
254
+ export ENHANCER_MODEL_REVIEW_PLAN="anthropic/claude-opus-4"
255
+ export ENHANCER_MODEL_ENHANCER="anthropic/claude-sonnet-4-5"
256
+ ```
257
+
258
+ #### Model Recommendations by Agent Type
259
+
260
+ **Primary Agents** (Use stronger models for complex reasoning):
261
+
262
+ | Agent | Recommended | Minimum | Purpose |
263
+ |-------|-----------|---------|---------|
264
+ | enhancer | anthropic/claude-sonnet-4-5 | opencode/kimi-k2.5-free | Intent classification & prompt generation |
265
+ | ultraplan | anthropic/claude-sonnet-4-5 | opencode/kimi-k2.5-free | Iterative planning with review loops |
266
+ | ask | anthropic/claude-sonnet-4-5 | opencode/kimi-k2.5-free | Multi-source research & synthesis |
267
+
268
+ **Subagents** (Lightweight models sufficient for information gathering):
269
+
270
+ | Subagent | Recommended | Minimum | Purpose |
271
+ |----------|-------------|---------|---------|
272
+ | review-plan | anthropic/claude-sonnet-4-5 | opencode/kimi-k2.5-free | Critical plan analysis (called by ultraplan) |
273
+ | explore-context | opencode/kimi-k2.5-free | opencode/kimi-k2.5-free | Project structure mapping |
274
+ | explore-code | opencode/kimi-k2.5-free | opencode/kimi-k2.5-free | Source code analysis |
275
+ | explore-deps | opencode/kimi-k2.5-free | opencode/kimi-k2.5-free | Dependency analysis |
276
+ | explore-tests | opencode/kimi-k2.5-free | opencode/kimi-k2.5-free | Test pattern discovery |
277
+
278
+ #### Validation
279
+
280
+ The plugin validates configured models against known providers:
281
+ - `opencode/*`
282
+ - `anthropic/*`
283
+ - `openai/*`
284
+ - `google/*`
285
+ - `mistral/*`
286
+ - `cohere/*`
287
+ - `ollama/*`
288
+
289
+ Invalid models automatically fall back to the default (`opencode/kimi-k2.5-free`).
290
+
177
291
  ### Context7 Integration
178
292
 
179
293
  The plugin automatically detects libraries that benefit from Context7:
@@ -201,9 +315,14 @@ opencode-enhancer-plugin/
201
315
 
202
316
  ### Hooks
203
317
 
204
- - **`config`** - Registers both agents on startup
205
- - **`tool.execute.before`** - Logs explore-context calls
206
- - **`message.updated`** - Appends Build mode hint to outputs
318
+ - **`config`** - Registers agents on startup
319
+ - **`tool.execute.before`** - Logs subagent calls
320
+ - **`message.updated`** - Appends Build mode hint
321
+ - **`message.completed`** - Extracts and stores TODOs
322
+ - **`stop.requested`** - Prevents stop when TODOs are open
323
+ - **`session.start`** - Manages todo store lifecycle
324
+ - **`session.end`** - Manages todo store lifecycle
325
+ - **`user.prompt.submitted`** - Auto-activates strategos mode on keywords
207
326
 
208
327
  ## 🤝 Contributing
209
328
 
@@ -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;AAEjD,eAAO,MAAM,cAAc,EAAE,MA0E5B,CAAA;AAED,eAAe,cAAc,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAA;AAmHjD,eAAO,MAAM,cAAc,EAAE,MA8xB5B,CAAA;AAED,eAAe,cAAc,CAAA"}