@openspoon/subtask2 0.1.11 → 0.1.13
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 +106 -92
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +41 -29
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,31 +1,117 @@
|
|
|
1
|
-
#
|
|
1
|
+
# subtask2 - a stronger opencode /command handler
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Give super powers to your slash commands with `@openspoon/subtask2`
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
Add subtask2 to your opencode config plugin array
|
|
8
|
+
|
|
9
|
+
```json
|
|
10
|
+
{
|
|
11
|
+
"plugins": ["@openspoon/subtask2"]
|
|
12
|
+
}
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## TL:DR - Keep the agentic loop alive + parallel commands
|
|
16
|
+
|
|
17
|
+
This plugins affects how opencode handles commands with additional frontmatter parameters and enables parallel commands
|
|
18
|
+
|
|
19
|
+
- `return` tells the main agent what to do with subtask(s) results (not just "summarize it and end turn"). Supports multiple sequential prompts.
|
|
20
|
+
- `parallel` runs multiple subtasks concurrently (accepts arguments)
|
|
21
|
+
|
|
22
|
+
⚠️ Requires [this PR](https://github.com/sst/opencode/pull/6478) for `parallel` and non-subtask features, as well as proper model inheritance to work.
|
|
23
|
+
|
|
24
|
+
## Examples
|
|
6
25
|
|
|
7
|
-
|
|
26
|
+
**Parallel subtask with different models (A/B plan comparison)**
|
|
27
|
+
|
|
28
|
+
```yaml
|
|
29
|
+
---
|
|
30
|
+
description: multi-model ensemble, 3 models plan in parallel, best ideas unified
|
|
31
|
+
model: github-copilot/claude-opus-4.5
|
|
32
|
+
subtask: true
|
|
33
|
+
parallel: plan-gemini, plan-gpt
|
|
34
|
+
return:
|
|
35
|
+
- Compare all 3 plans and validate each directly against the codebase. Pick the best ideas from each and create a unified implementation plan.
|
|
36
|
+
- Feed the implementation plan to a @review subagent, let's poke holes.
|
|
37
|
+
---
|
|
38
|
+
Plan the implementation for the following feature
|
|
39
|
+
> $ARGUMENTS
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
**Isolated "Plan" mode**
|
|
43
|
+
|
|
44
|
+
```yaml
|
|
45
|
+
---
|
|
46
|
+
description: two-step implementation planning and validation
|
|
47
|
+
agent: build
|
|
48
|
+
subtask: true
|
|
49
|
+
return:
|
|
50
|
+
- Challenge, verify and validate the plan by reviewing the codebase directly. Then approve, revise, or reject the plan. Implement if solid
|
|
51
|
+
- Take a step back, review what was done/planned for correctness, revise if needed
|
|
52
|
+
---
|
|
53
|
+
In this session you WILL ONLY PLAN AND NOT IMPLEMENT. You are to take the `USER INPUT` and research the codebase until you have gathered enough knowledge to elaborate a full fledged implementation plan
|
|
54
|
+
|
|
55
|
+
You MUST consider alternative paths and keep researching until you are confident you found the BEST possible implementation
|
|
56
|
+
|
|
57
|
+
BEST often means simple, lean, clean, low surface and coupling
|
|
58
|
+
Make it practical, maintainable and not overly abstracted
|
|
59
|
+
|
|
60
|
+
Follow your heart
|
|
61
|
+
> DO NOT OVERENGINEER SHIT
|
|
62
|
+
|
|
63
|
+
USER INPUT
|
|
64
|
+
$ARGUMENTS
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
**Multi-step workflow**
|
|
68
|
+
|
|
69
|
+
```yaml
|
|
70
|
+
---
|
|
71
|
+
description: design, implement, test, document
|
|
72
|
+
agent: build
|
|
73
|
+
model: github-copilot/claude-opus-4.5
|
|
74
|
+
subtask: true
|
|
75
|
+
return:
|
|
76
|
+
- Implement the component following the conceptual design specifications.
|
|
77
|
+
- Write comprehensive unit tests for all edge cases.
|
|
78
|
+
- Update the documentation and add usage examples.
|
|
79
|
+
- Run the test suite and fix any failures.
|
|
80
|
+
---
|
|
81
|
+
Conceptually design a React modal component with the following requirements
|
|
82
|
+
> $ARGUMENTS
|
|
83
|
+
```
|
|
8
84
|
|
|
9
85
|
## Features
|
|
10
86
|
|
|
11
|
-
### 1. `return`
|
|
87
|
+
### 1. `return` - Command return instructions (supports chaining)
|
|
12
88
|
|
|
13
89
|
Tell the main agent exactly what to do after a command completes:
|
|
14
90
|
|
|
15
91
|
```yaml
|
|
16
92
|
---
|
|
17
93
|
subtask: true
|
|
18
|
-
return:
|
|
94
|
+
return: Look again, challenge the findings, then implement the valid fixes.
|
|
19
95
|
---
|
|
20
|
-
Review
|
|
96
|
+
Review the PR# $ARGUMENTS for bugs.
|
|
21
97
|
```
|
|
22
98
|
|
|
23
|
-
|
|
24
|
-
|
|
99
|
+
For multiple sequential prompts, use an array:
|
|
100
|
+
|
|
101
|
+
```yaml
|
|
102
|
+
---
|
|
103
|
+
subtask: true
|
|
104
|
+
return: [Implement the fix, Run the tests]
|
|
105
|
+
---
|
|
106
|
+
Find the bug in auth.ts
|
|
107
|
+
```
|
|
25
108
|
|
|
26
|
-
**
|
|
109
|
+
- **First return** replaces opencode's "summarize" message (for subtasks) or fires as follow-up (for non-subtasks)
|
|
110
|
+
- **Additional returns** fire sequentially after each LLM turn completes
|
|
27
111
|
|
|
28
|
-
|
|
112
|
+
**Note:** For non-subtask commands, requires opencode with `command.execute.before` hook (pending PR).
|
|
113
|
+
|
|
114
|
+
### 2. `parallel` - Run multiple subtasks concurrently ⚠️ **PENDING PR** (ignored for now)
|
|
29
115
|
|
|
30
116
|
Spawn additional command subtasks alongside the main one:
|
|
31
117
|
|
|
@@ -66,7 +152,7 @@ Design a new auth system for $ARGUMENTS
|
|
|
66
152
|
- `research-codebase` gets "auth middleware implementation"
|
|
67
153
|
- `security-audit` inherits the main command's `$ARGUMENTS`
|
|
68
154
|
|
|
69
|
-
**Note:** Parallel commands are forced into subtasks regardless of their own `subtask` setting. Their `return
|
|
155
|
+
**Note:** Parallel commands are forced into subtasks regardless of their own `subtask` setting. Their `return` is ignored — only the parent's `return` applies.
|
|
70
156
|
|
|
71
157
|
**Tip:** If all commands share the same arguments, use the simple syntax:
|
|
72
158
|
|
|
@@ -76,30 +162,19 @@ parallel: research-docs, research-codebase, security-audit
|
|
|
76
162
|
|
|
77
163
|
All three inherit the main command's `$ARGUMENTS`.
|
|
78
164
|
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
Queue user messages that fire after the command completes:
|
|
165
|
+
**Tip:** You can also pass arguments inline using `||` separator:
|
|
82
166
|
|
|
83
|
-
```
|
|
84
|
-
|
|
85
|
-
subtask: true
|
|
86
|
-
return: Implement the fix.
|
|
87
|
-
chain:
|
|
88
|
-
- Now write tests for the fix.
|
|
89
|
-
- Run the tests and fix any failures.
|
|
90
|
-
---
|
|
91
|
-
Find the bug in auth.ts
|
|
167
|
+
```
|
|
168
|
+
/mycommand main args || parallel1 args || parallel2 args
|
|
92
169
|
```
|
|
93
170
|
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
**Note:** For non-subtask commands, requires OpenCode with `command.execute.before` hook (pending PR).
|
|
171
|
+
Each segment maps to a parallel command in order. Priority: **frontmatter args > pipe args > inherit main args**.
|
|
97
172
|
|
|
98
|
-
###
|
|
173
|
+
### 3. Global fallback - 'Better' default for subtasks
|
|
99
174
|
|
|
100
|
-
|
|
175
|
+
By default opencode injects a prompt in the main session once a **subtask** is completed.
|
|
101
176
|
|
|
102
|
-
|
|
177
|
+
For `subtask: true` commands without a `return`, this plugin replaces the opencode generic "summarize" message with by default: "Challenge and validate the task output. Verify assumptions, identify gaps or errors, then continue with the next logical step."
|
|
103
178
|
|
|
104
179
|
Configure in `~/.config/opencode/subtask2.jsonc`:
|
|
105
180
|
|
|
@@ -113,75 +188,14 @@ Configure in `~/.config/opencode/subtask2.jsonc`:
|
|
|
113
188
|
}
|
|
114
189
|
```
|
|
115
190
|
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
When a subtask completes, what message does the main agent see?
|
|
191
|
+
#### Priority Order
|
|
119
192
|
|
|
120
193
|
1. **`return` param** → Your specific instructions (highest priority)
|
|
121
194
|
2. **Config `generic_return`** → Your custom fallback (if `replace_generic: true`)
|
|
122
195
|
3. **Built-in default** → "Challenge and validate..." (if `replace_generic: true`)
|
|
123
196
|
4. **OpenCode original** → "Summarize..." (if `replace_generic: false`)
|
|
124
197
|
|
|
125
|
-
## Installation
|
|
126
|
-
|
|
127
|
-
```json
|
|
128
|
-
{
|
|
129
|
-
"plugins": ["@openspoon/subtask2"]
|
|
130
|
-
}
|
|
131
|
-
```
|
|
132
|
-
|
|
133
|
-
## Quick Examples
|
|
134
|
-
|
|
135
|
-
**Simple: Make the agent act on results**
|
|
136
|
-
|
|
137
|
-
```yaml
|
|
138
|
-
---
|
|
139
|
-
return: Implement the suggested improvements.
|
|
140
|
-
---
|
|
141
|
-
Analyze this function for performance issues.
|
|
142
|
-
```
|
|
143
|
-
|
|
144
|
-
**Parallel: Multiple perspectives at once**
|
|
145
|
-
|
|
146
|
-
```yaml
|
|
147
|
-
---
|
|
148
|
-
subtask: true
|
|
149
|
-
parallel: brainstorm-solutions, research-prior-art
|
|
150
|
-
return: Evaluate all ideas and create an implementation plan.
|
|
151
|
-
---
|
|
152
|
-
Identify the core problem in our auth flow.
|
|
153
|
-
```
|
|
154
|
-
|
|
155
|
-
**Parallel: Same task, different models**
|
|
156
|
-
|
|
157
|
-
```yaml
|
|
158
|
-
---
|
|
159
|
-
description: multi-model ensemble, 3 models plan in parallel, best ideas unified
|
|
160
|
-
agent: build
|
|
161
|
-
model: github-copilot/gpt-5.2
|
|
162
|
-
subtask: true
|
|
163
|
-
parallel: plan-gemini, plan-opus
|
|
164
|
-
return: Compare all 3 plans and validate each directly against the codebase. Pick the best ideas from each and create a unified implementation plan.
|
|
165
|
-
chain:
|
|
166
|
-
- feed the implementation plan to a @review subagent and have it critically review it.
|
|
167
198
|
---
|
|
168
|
-
Plan the implementation for the following feature: $ARGUMENTS
|
|
169
|
-
```
|
|
170
|
-
|
|
171
|
-
**Chain: Multi-step workflow**
|
|
172
|
-
|
|
173
|
-
```yaml
|
|
174
|
-
---
|
|
175
|
-
description: design, implement, test, document
|
|
176
|
-
subtask: true
|
|
177
|
-
return: Implement the component following the conceptual design specifications.
|
|
178
|
-
chain:
|
|
179
|
-
- Write comprehensive unit tests for all edge cases.
|
|
180
|
-
- Update the documentation and add usage examples.
|
|
181
|
-
- Run the test suite and fix any failures.
|
|
182
|
-
---
|
|
183
|
-
Conceptually design a React modal component with the following requirements: $ARGUMENTS
|
|
184
|
-
```
|
|
185
199
|
|
|
186
200
|
## License
|
|
187
201
|
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,MAAM,EAAC,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,MAAM,EAAC,MAAM,qBAAqB,CAAC;AAiKhD,QAAA,MAAM,MAAM,EAAE,MAmIb,CAAC;AAEF,eAAe,MAAM,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -86,8 +86,8 @@ async function buildManifest() {
|
|
|
86
86
|
const name = file.replace(/\.md$/, "");
|
|
87
87
|
const content = await Bun.file(`${dir}/${file}`).text();
|
|
88
88
|
const fm = parseFrontmatter(content);
|
|
89
|
-
const
|
|
90
|
-
const
|
|
89
|
+
const returnVal = fm.return;
|
|
90
|
+
const returnArr = returnVal ? (Array.isArray(returnVal) ? returnVal : [returnVal]) : [];
|
|
91
91
|
const parallel = fm.parallel;
|
|
92
92
|
let parallelArr = [];
|
|
93
93
|
if (parallel) {
|
|
@@ -107,8 +107,7 @@ async function buildManifest() {
|
|
|
107
107
|
}
|
|
108
108
|
}
|
|
109
109
|
manifest[name] = {
|
|
110
|
-
return:
|
|
111
|
-
chain: chainArr,
|
|
110
|
+
return: returnArr,
|
|
112
111
|
parallel: parallelArr,
|
|
113
112
|
agent: fm.agent,
|
|
114
113
|
description: fm.description,
|
|
@@ -124,7 +123,7 @@ let configs = {};
|
|
|
124
123
|
let pluginConfig = { replace_generic: true };
|
|
125
124
|
let client = null;
|
|
126
125
|
const callState = new Map();
|
|
127
|
-
const
|
|
126
|
+
const returnState = new Map();
|
|
128
127
|
const pendingReturns = new Map();
|
|
129
128
|
const pendingNonSubtaskReturns = new Map();
|
|
130
129
|
let hasActiveSubtask = false;
|
|
@@ -137,26 +136,37 @@ const plugin = async (ctx) => {
|
|
|
137
136
|
"command.execute.before": async (input, output) => {
|
|
138
137
|
const cmd = input.command;
|
|
139
138
|
const config = configs[cmd];
|
|
140
|
-
//
|
|
141
|
-
const
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
139
|
+
// Parse pipe-separated arguments: main args || parallel1 args || parallel2 args
|
|
140
|
+
const argSegments = input.arguments.split("||").map((s) => s.trim());
|
|
141
|
+
const mainArgs = argSegments[0] || "";
|
|
142
|
+
const parallelArgs = argSegments.slice(1);
|
|
143
|
+
// Fix main command's parts to use only mainArgs (not the full pipe string)
|
|
144
|
+
if (argSegments.length > 1) {
|
|
145
|
+
for (const part of output.parts) {
|
|
146
|
+
if (part.type === "subtask" && part.prompt) {
|
|
147
|
+
part.prompt = part.prompt.replaceAll(input.arguments, mainArgs);
|
|
148
|
+
}
|
|
149
|
+
if (part.type === "text" && part.text) {
|
|
150
|
+
part.text = part.text.replaceAll(input.arguments, mainArgs);
|
|
151
|
+
}
|
|
148
152
|
}
|
|
149
153
|
}
|
|
154
|
+
// Track non-subtask commands with return for later injection
|
|
155
|
+
const hasSubtaskPart = output.parts.some((p) => p.type === "subtask");
|
|
156
|
+
if (!hasSubtaskPart && config?.return?.length) {
|
|
157
|
+
pendingNonSubtaskReturns.set(input.sessionID, [...config.return]);
|
|
158
|
+
}
|
|
150
159
|
if (!config?.parallel?.length)
|
|
151
160
|
return;
|
|
152
|
-
for (
|
|
161
|
+
for (let i = 0; i < config.parallel.length; i++) {
|
|
162
|
+
const parallelCmd = config.parallel[i];
|
|
153
163
|
const cmdFile = await loadCommandFile(parallelCmd.command);
|
|
154
164
|
if (!cmdFile)
|
|
155
165
|
continue;
|
|
156
166
|
const fm = parseFrontmatter(cmdFile.content);
|
|
157
167
|
let template = getTemplateBody(cmdFile.content);
|
|
158
|
-
//
|
|
159
|
-
const args = parallelCmd.arguments ??
|
|
168
|
+
// Priority: frontmatter args > pipe args > main args
|
|
169
|
+
const args = parallelCmd.arguments ?? parallelArgs[i] ?? mainArgs;
|
|
160
170
|
template = template.replace(/\$ARGUMENTS/g, args);
|
|
161
171
|
// Parse model string "provider/model" into {providerID, modelID}
|
|
162
172
|
let model;
|
|
@@ -181,8 +191,8 @@ const plugin = async (ctx) => {
|
|
|
181
191
|
const cmd = output.args?.command;
|
|
182
192
|
if (cmd && configs[cmd]) {
|
|
183
193
|
callState.set(input.callID, cmd);
|
|
184
|
-
if (configs[cmd].
|
|
185
|
-
|
|
194
|
+
if (configs[cmd].return.length > 1) {
|
|
195
|
+
returnState.set(input.sessionID, [...configs[cmd].return.slice(1)]);
|
|
186
196
|
}
|
|
187
197
|
}
|
|
188
198
|
},
|
|
@@ -191,8 +201,8 @@ const plugin = async (ctx) => {
|
|
|
191
201
|
return;
|
|
192
202
|
const cmd = callState.get(input.callID);
|
|
193
203
|
callState.delete(input.callID);
|
|
194
|
-
if (cmd && configs[cmd]?.return) {
|
|
195
|
-
pendingReturns.set(input.sessionID, configs[cmd].return);
|
|
204
|
+
if (cmd && configs[cmd]?.return?.length) {
|
|
205
|
+
pendingReturns.set(input.sessionID, configs[cmd].return[0]);
|
|
196
206
|
}
|
|
197
207
|
},
|
|
198
208
|
"experimental.chat.messages.transform": async (_input, output) => {
|
|
@@ -217,21 +227,23 @@ const plugin = async (ctx) => {
|
|
|
217
227
|
"experimental.text.complete": async (input) => {
|
|
218
228
|
// Handle non-subtask command returns (inject as follow-up message)
|
|
219
229
|
const pendingReturn = pendingNonSubtaskReturns.get(input.sessionID);
|
|
220
|
-
if (pendingReturn && client) {
|
|
221
|
-
|
|
230
|
+
if (pendingReturn?.length && client) {
|
|
231
|
+
const next = pendingReturn.shift();
|
|
232
|
+
if (!pendingReturn.length)
|
|
233
|
+
pendingNonSubtaskReturns.delete(input.sessionID);
|
|
222
234
|
await client.session.promptAsync({
|
|
223
235
|
path: { id: input.sessionID },
|
|
224
|
-
body: { parts: [{ type: "text", text:
|
|
236
|
+
body: { parts: [{ type: "text", text: next }] },
|
|
225
237
|
});
|
|
226
238
|
return;
|
|
227
239
|
}
|
|
228
|
-
// Handle chain
|
|
229
|
-
const
|
|
230
|
-
if (!
|
|
240
|
+
// Handle remaining returns (formerly chain)
|
|
241
|
+
const remaining = returnState.get(input.sessionID);
|
|
242
|
+
if (!remaining?.length || !client)
|
|
231
243
|
return;
|
|
232
|
-
const next =
|
|
233
|
-
if (!
|
|
234
|
-
|
|
244
|
+
const next = remaining.shift();
|
|
245
|
+
if (!remaining.length)
|
|
246
|
+
returnState.delete(input.sessionID);
|
|
235
247
|
await client.session.promptAsync({
|
|
236
248
|
path: { id: input.sessionID },
|
|
237
249
|
body: { parts: [{ type: "text", text: next }] },
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AACA,OAAO,IAAI,MAAM,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AACA,OAAO,IAAI,MAAM,MAAM,CAAC;AAoBxB,MAAM,cAAc,GAClB,2IAA2I,CAAC;AAE9I,MAAM,WAAW,GAAG,GAAG,GAAG,CAAC,GAAG,CAAC,IAAI,IAAI,EAAE,kCAAkC,CAAC;AAE5E,SAAS,aAAa,CAAC,GAAY;IACjC,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,GAAG,KAAK,IAAI;Q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$schema": "https://json.schemastore.org/package.json",
|
|
3
3
|
"name": "@openspoon/subtask2",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.13",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "Opencode plugin for enhanced subtask control with return context and prompt chaining",
|
|
7
7
|
"main": "./dist/index.js",
|