@openspoon/subtask2 0.1.8 → 0.1.11
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 +69 -48
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +59 -30
- package/dist/index.js.map +1 -1
- package/package.json +7 -6
package/README.md
CHANGED
|
@@ -6,42 +6,35 @@ When a subtask command completes, OpenCode tells the main agent to "summarize th
|
|
|
6
6
|
|
|
7
7
|
This plugin replaces that "summarize" message with the instructions you want to give it, sending the main agent off on a mission given the subtask results.
|
|
8
8
|
|
|
9
|
-
## Prerequisites
|
|
10
|
-
|
|
11
|
-
**This plugin ONLY works with commands that have `subtask: true` in their frontmatter.**
|
|
12
|
-
|
|
13
|
-
```markdown
|
|
14
|
-
---
|
|
15
|
-
subtask: true ← REQUIRED for this plugin to do anything
|
|
16
|
-
---
|
|
17
|
-
```
|
|
18
|
-
|
|
19
9
|
## Features
|
|
20
10
|
|
|
21
11
|
### 1. `return` — Per-command instructions
|
|
22
12
|
|
|
23
|
-
Tell the main agent exactly what to do after
|
|
13
|
+
Tell the main agent exactly what to do after a command completes:
|
|
24
14
|
|
|
25
|
-
```
|
|
15
|
+
```yaml
|
|
26
16
|
---
|
|
27
17
|
subtask: true
|
|
28
18
|
return: Assess the code review. Challenge the findings, then implement the valid fixes.
|
|
29
19
|
---
|
|
30
|
-
|
|
31
20
|
Review this PR for bugs.
|
|
32
21
|
```
|
|
33
22
|
|
|
23
|
+
- For `subtask: true` commands, it replaces OpenCode's "summarize" message.
|
|
24
|
+
- For regular commands, it's injected as a follow-up message after the LLM turn ends, identical to what the "chain" param does
|
|
25
|
+
|
|
26
|
+
**Note:** For non-subtask commands, requires OpenCode with `command.execute.before` hook (pending PR).
|
|
27
|
+
|
|
34
28
|
### 2. `parallel` — Run multiple subtasks concurrently ⚠️ **PENDING PR** (ignored for now)
|
|
35
29
|
|
|
36
30
|
Spawn additional command subtasks alongside the main one:
|
|
37
31
|
|
|
38
|
-
```
|
|
32
|
+
```yaml
|
|
39
33
|
---
|
|
40
34
|
subtask: true
|
|
41
35
|
parallel: security-review, perf-review
|
|
42
36
|
return: Synthesize all review results and create a unified action plan.
|
|
43
37
|
---
|
|
44
|
-
|
|
45
38
|
Review this code for correctness.
|
|
46
39
|
```
|
|
47
40
|
|
|
@@ -53,15 +46,41 @@ This runs 3 subtasks in parallel:
|
|
|
53
46
|
|
|
54
47
|
When ALL complete, the main agent gets the `return` prompt.
|
|
55
48
|
|
|
56
|
-
**
|
|
49
|
+
**With custom arguments per command:**
|
|
57
50
|
|
|
58
|
-
|
|
51
|
+
```yaml
|
|
52
|
+
---
|
|
53
|
+
subtask: true
|
|
54
|
+
parallel:
|
|
55
|
+
- command: research-docs
|
|
56
|
+
arguments: authentication flow
|
|
57
|
+
- command: research-codebase
|
|
58
|
+
arguments: auth middleware implementation
|
|
59
|
+
- security-audit
|
|
60
|
+
return: Synthesize all findings into an implementation plan.
|
|
61
|
+
---
|
|
62
|
+
Design a new auth system for $ARGUMENTS
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
- `research-docs` gets "authentication flow" as `$ARGUMENTS`
|
|
66
|
+
- `research-codebase` gets "auth middleware implementation"
|
|
67
|
+
- `security-audit` inherits the main command's `$ARGUMENTS`
|
|
68
|
+
|
|
69
|
+
**Note:** Parallel commands are forced into subtasks regardless of their own `subtask` setting. Their `return`/`chain` are ignored — only the parent's `return`/`chain` applies.
|
|
70
|
+
|
|
71
|
+
**Tip:** If all commands share the same arguments, use the simple syntax:
|
|
72
|
+
|
|
73
|
+
```yaml
|
|
74
|
+
parallel: research-docs, research-codebase, security-audit
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
All three inherit the main command's `$ARGUMENTS`.
|
|
59
78
|
|
|
60
79
|
### 3. `chain` — Sequential follow-up prompts
|
|
61
80
|
|
|
62
|
-
Queue user messages that fire after the
|
|
81
|
+
Queue user messages that fire after the command completes:
|
|
63
82
|
|
|
64
|
-
```
|
|
83
|
+
```yaml
|
|
65
84
|
---
|
|
66
85
|
subtask: true
|
|
67
86
|
return: Implement the fix.
|
|
@@ -69,16 +88,18 @@ chain:
|
|
|
69
88
|
- Now write tests for the fix.
|
|
70
89
|
- Run the tests and fix any failures.
|
|
71
90
|
---
|
|
72
|
-
|
|
73
91
|
Find the bug in auth.ts
|
|
74
92
|
```
|
|
75
93
|
|
|
76
|
-
Flow:
|
|
94
|
+
Flow: Command → return prompt → LLM works → chain[0] fires → LLM works → chain[1] fires → ...
|
|
95
|
+
|
|
96
|
+
**Note:** For non-subtask commands, requires OpenCode with `command.execute.before` hook (pending PR).
|
|
77
97
|
|
|
78
|
-
### 4. Global fallback — Better default for
|
|
98
|
+
### 4. Global fallback — Better default for subtasks
|
|
79
99
|
|
|
80
|
-
|
|
81
|
-
|
|
100
|
+
For `subtask: true` commands without a `return`, this plugin replaces OpenCode's generic "summarize" message with something better.
|
|
101
|
+
|
|
102
|
+
Default: "Challenge and validate the task output. Verify assumptions, identify gaps or errors, then continue with the next logical step."
|
|
82
103
|
|
|
83
104
|
Configure in `~/.config/opencode/subtask2.jsonc`:
|
|
84
105
|
|
|
@@ -113,54 +134,54 @@ When a subtask completes, what message does the main agent see?
|
|
|
113
134
|
|
|
114
135
|
**Simple: Make the agent act on results**
|
|
115
136
|
|
|
116
|
-
```
|
|
137
|
+
```yaml
|
|
117
138
|
---
|
|
118
|
-
subtask: true
|
|
119
139
|
return: Implement the suggested improvements.
|
|
120
140
|
---
|
|
121
|
-
|
|
122
141
|
Analyze this function for performance issues.
|
|
123
142
|
```
|
|
124
143
|
|
|
125
144
|
**Parallel: Multiple perspectives at once**
|
|
126
145
|
|
|
127
|
-
```
|
|
146
|
+
```yaml
|
|
128
147
|
---
|
|
129
148
|
subtask: true
|
|
130
149
|
parallel: brainstorm-solutions, research-prior-art
|
|
131
150
|
return: Evaluate all ideas and create an implementation plan.
|
|
132
151
|
---
|
|
133
|
-
|
|
134
152
|
Identify the core problem in our auth flow.
|
|
135
153
|
```
|
|
136
154
|
|
|
137
|
-
**
|
|
155
|
+
**Parallel: Same task, different models**
|
|
138
156
|
|
|
139
|
-
```
|
|
157
|
+
```yaml
|
|
140
158
|
---
|
|
159
|
+
description: multi-model ensemble, 3 models plan in parallel, best ideas unified
|
|
160
|
+
agent: build
|
|
161
|
+
model: github-copilot/gpt-5.2
|
|
141
162
|
subtask: true
|
|
142
|
-
|
|
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.
|
|
143
165
|
chain:
|
|
144
|
-
-
|
|
145
|
-
- Update the documentation.
|
|
166
|
+
- feed the implementation plan to a @review subagent and have it critically review it.
|
|
146
167
|
---
|
|
147
|
-
|
|
148
|
-
Design a React modal component.
|
|
168
|
+
Plan the implementation for the following feature: $ARGUMENTS
|
|
149
169
|
```
|
|
150
170
|
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
**Q: Why doesn't this work with my command?**
|
|
154
|
-
A: Check that you have `subtask: true` in the frontmatter.
|
|
155
|
-
|
|
156
|
-
**Q: Why doesn't this affect Task tool calls the LLM makes?**
|
|
157
|
-
A: OpenCode only injects the "summarize" message after `subtask: true` commands, not regular task tool usage. This plugin can only replace what OpenCode injects.
|
|
158
|
-
|
|
159
|
-
**Q: Can I use `return` with regular (non-subtask) commands?**
|
|
160
|
-
A: No. Without `subtask: true`, there's no injected message to replace.
|
|
171
|
+
**Chain: Multi-step workflow**
|
|
161
172
|
|
|
162
|
-
|
|
163
|
-
|
|
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
|
+
```
|
|
164
185
|
|
|
165
186
|
## License
|
|
166
187
|
|
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;AAmKhD,QAAA,MAAM,MAAM,EAAE,MAqHb,CAAC;AAEF,eAAe,MAAM,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import YAML from "yaml";
|
|
1
2
|
const DEFAULT_PROMPT = "Challenge and validate the task tool output above. Verify assumptions, identify gaps or errors, then continue with the next logical step.";
|
|
2
3
|
const CONFIG_PATH = `${Bun.env.HOME ?? ""}/.config/opencode/subtask2.jsonc`;
|
|
3
4
|
function isValidConfig(obj) {
|
|
@@ -42,28 +43,12 @@ function parseFrontmatter(content) {
|
|
|
42
43
|
const match = content.match(/^---\n([\s\S]*?)\n---/);
|
|
43
44
|
if (!match)
|
|
44
45
|
return {};
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
if (!keyMatch)
|
|
51
|
-
continue;
|
|
52
|
-
const [, key, value] = keyMatch;
|
|
53
|
-
if (!value.trim()) {
|
|
54
|
-
const items = [];
|
|
55
|
-
while (i + 1 < lines.length && lines[i + 1].match(/^\s+-\s+/)) {
|
|
56
|
-
i++;
|
|
57
|
-
items.push(lines[i].replace(/^\s+-\s+/, "").trim());
|
|
58
|
-
}
|
|
59
|
-
if (items.length) {
|
|
60
|
-
fm[key] = items;
|
|
61
|
-
continue;
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
fm[key] = value.trim();
|
|
46
|
+
try {
|
|
47
|
+
return YAML.parse(match[1]) ?? {};
|
|
48
|
+
}
|
|
49
|
+
catch {
|
|
50
|
+
return {};
|
|
65
51
|
}
|
|
66
|
-
return fm;
|
|
67
52
|
}
|
|
68
53
|
function getTemplateBody(content) {
|
|
69
54
|
const match = content.match(/^---\n[\s\S]*?\n---\n([\s\S]*)$/);
|
|
@@ -104,11 +89,23 @@ async function buildManifest() {
|
|
|
104
89
|
const chain = fm.chain;
|
|
105
90
|
const chainArr = chain ? (Array.isArray(chain) ? chain : [chain]) : [];
|
|
106
91
|
const parallel = fm.parallel;
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
92
|
+
let parallelArr = [];
|
|
93
|
+
if (parallel) {
|
|
94
|
+
if (Array.isArray(parallel)) {
|
|
95
|
+
parallelArr = parallel.map((p) => {
|
|
96
|
+
if (typeof p === "string") {
|
|
97
|
+
return { command: p.trim() };
|
|
98
|
+
}
|
|
99
|
+
if (typeof p === "object" && p.command) {
|
|
100
|
+
return { command: p.command, arguments: p.arguments };
|
|
101
|
+
}
|
|
102
|
+
return null;
|
|
103
|
+
}).filter((p) => p !== null);
|
|
104
|
+
}
|
|
105
|
+
else if (typeof parallel === "string") {
|
|
106
|
+
parallelArr = parallel.split(",").map((s) => ({ command: s.trim() })).filter((p) => p.command);
|
|
107
|
+
}
|
|
108
|
+
}
|
|
112
109
|
manifest[name] = {
|
|
113
110
|
return: fm.return,
|
|
114
111
|
chain: chainArr,
|
|
@@ -129,6 +126,7 @@ let client = null;
|
|
|
129
126
|
const callState = new Map();
|
|
130
127
|
const chainState = new Map();
|
|
131
128
|
const pendingReturns = new Map();
|
|
129
|
+
const pendingNonSubtaskReturns = new Map();
|
|
132
130
|
let hasActiveSubtask = false;
|
|
133
131
|
const OPENCODE_GENERIC = "Summarize the task tool output above and continue with your task.";
|
|
134
132
|
const plugin = async (ctx) => {
|
|
@@ -139,19 +137,39 @@ const plugin = async (ctx) => {
|
|
|
139
137
|
"command.execute.before": async (input, output) => {
|
|
140
138
|
const cmd = input.command;
|
|
141
139
|
const config = configs[cmd];
|
|
140
|
+
// Track non-subtask commands with return/chain for later injection
|
|
141
|
+
const hasSubtaskPart = output.parts.some((p) => p.type === "subtask");
|
|
142
|
+
if (!hasSubtaskPart && config) {
|
|
143
|
+
if (config.return) {
|
|
144
|
+
pendingNonSubtaskReturns.set(input.sessionID, config.return);
|
|
145
|
+
}
|
|
146
|
+
if (config.chain.length) {
|
|
147
|
+
chainState.set(input.sessionID, [...config.chain]);
|
|
148
|
+
}
|
|
149
|
+
}
|
|
142
150
|
if (!config?.parallel?.length)
|
|
143
151
|
return;
|
|
144
152
|
for (const parallelCmd of config.parallel) {
|
|
145
|
-
const cmdFile = await loadCommandFile(parallelCmd);
|
|
153
|
+
const cmdFile = await loadCommandFile(parallelCmd.command);
|
|
146
154
|
if (!cmdFile)
|
|
147
155
|
continue;
|
|
148
156
|
const fm = parseFrontmatter(cmdFile.content);
|
|
149
|
-
|
|
157
|
+
let template = getTemplateBody(cmdFile.content);
|
|
158
|
+
// Replace $ARGUMENTS with parallel-specific args or inherit from main command
|
|
159
|
+
const args = parallelCmd.arguments ?? input.arguments;
|
|
160
|
+
template = template.replace(/\$ARGUMENTS/g, args);
|
|
161
|
+
// Parse model string "provider/model" into {providerID, modelID}
|
|
162
|
+
let model;
|
|
163
|
+
if (typeof fm.model === "string" && fm.model.includes("/")) {
|
|
164
|
+
const [providerID, ...rest] = fm.model.split("/");
|
|
165
|
+
model = { providerID, modelID: rest.join("/") };
|
|
166
|
+
}
|
|
150
167
|
output.parts.push({
|
|
151
168
|
type: "subtask",
|
|
152
169
|
agent: fm.agent || "general",
|
|
153
|
-
|
|
154
|
-
|
|
170
|
+
model,
|
|
171
|
+
description: fm.description || `Parallel: ${parallelCmd.command}`,
|
|
172
|
+
command: parallelCmd.command,
|
|
155
173
|
prompt: template,
|
|
156
174
|
});
|
|
157
175
|
}
|
|
@@ -197,6 +215,17 @@ const plugin = async (ctx) => {
|
|
|
197
215
|
}
|
|
198
216
|
},
|
|
199
217
|
"experimental.text.complete": async (input) => {
|
|
218
|
+
// Handle non-subtask command returns (inject as follow-up message)
|
|
219
|
+
const pendingReturn = pendingNonSubtaskReturns.get(input.sessionID);
|
|
220
|
+
if (pendingReturn && client) {
|
|
221
|
+
pendingNonSubtaskReturns.delete(input.sessionID);
|
|
222
|
+
await client.session.promptAsync({
|
|
223
|
+
path: { id: input.sessionID },
|
|
224
|
+
body: { parts: [{ type: "text", text: pendingReturn }] },
|
|
225
|
+
});
|
|
226
|
+
return;
|
|
227
|
+
}
|
|
228
|
+
// Handle chain
|
|
200
229
|
const chain = chainState.get(input.sessionID);
|
|
201
230
|
if (!chain?.length || !client)
|
|
202
231
|
return;
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AACA,OAAO,IAAI,MAAM,MAAM,CAAC;AAqBxB,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;QAAE,OAAO,KAAK,CAAC;IAC1D,MAAM,GAAG,GAAG,GAA8B,CAAC;IAC3C,IAAI,OAAO,GAAG,CAAC,eAAe,KAAK,SAAS;QAAE,OAAO,KAAK,CAAC;IAC3D,IAAI,GAAG,CAAC,cAAc,KAAK,SAAS,IAAI,OAAO,GAAG,CAAC,cAAc,KAAK,QAAQ;QAAE,OAAO,KAAK,CAAC;IAC7F,OAAO,IAAI,CAAC;AACd,CAAC;AAED,KAAK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",
|
|
3
3
|
"name": "@openspoon/subtask2",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.11",
|
|
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",
|
|
@@ -29,15 +29,16 @@
|
|
|
29
29
|
"access": "public"
|
|
30
30
|
},
|
|
31
31
|
"peerDependencies": {
|
|
32
|
-
"@opencode-ai/plugin": "
|
|
32
|
+
"@opencode-ai/plugin": "^1.0.216"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@opencode-ai/sdk": "latest"
|
|
35
|
+
"@opencode-ai/sdk": "latest",
|
|
36
|
+
"yaml": "^2.8.2"
|
|
36
37
|
},
|
|
37
38
|
"devDependencies": {
|
|
38
|
-
"@opencode-ai/plugin": "^1.0.
|
|
39
|
-
"@types/node": "^
|
|
40
|
-
"bun-types": "^1.3.
|
|
39
|
+
"@opencode-ai/plugin": "^1.0.217",
|
|
40
|
+
"@types/node": "^25.0.3",
|
|
41
|
+
"bun-types": "^1.3.5",
|
|
41
42
|
"typescript": "^5.9.3"
|
|
42
43
|
},
|
|
43
44
|
"files": [
|