@openspoon/subtask2 0.1.9 → 0.1.12
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 +94 -42
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +54 -31
- package/dist/index.js.map +1 -1
- package/package.json +7 -6
package/README.md
CHANGED
|
@@ -1,42 +1,53 @@
|
|
|
1
|
-
# @openspoon/subtask2
|
|
1
|
+
# @openspoon/subtask2
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
`@openspoon/subtask2` gives super powers to your slash commands with new frontmatter parameters and more...
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
- `return` — Tell the main agent what to do with subtask results (not just "summarize")
|
|
6
|
+
- `parallel` — To run multiple subtasks concurrently (accepts arguments)
|
|
7
|
+
- `chain` — Queue follow-up prompts that fire automatically
|
|
8
|
+
- 'better' defaults — Replace the generic "summarize" on subtask return with something that keeps the agent working or a custom generic prompt
|
|
6
9
|
|
|
7
|
-
|
|
10
|
+
⚠️ Requires [this PR](https://github.com/sst/opencode/pull/6478) for `parallel` and non-subtask features, and for proper model inheritance to work.
|
|
11
|
+
|
|
12
|
+
## Installation
|
|
13
|
+
|
|
14
|
+
Add subtask2 to your opencode config plugin array
|
|
15
|
+
|
|
16
|
+
```json
|
|
17
|
+
{
|
|
18
|
+
"plugins": ["@openspoon/subtask2"]
|
|
19
|
+
}
|
|
20
|
+
```
|
|
8
21
|
|
|
9
22
|
## Features
|
|
10
23
|
|
|
11
|
-
### 1. `return`
|
|
24
|
+
### 1. `return` - Command 'return' instructions or the old 'look again' trick.
|
|
12
25
|
|
|
13
26
|
Tell the main agent exactly what to do after a command completes:
|
|
14
27
|
|
|
15
|
-
```
|
|
28
|
+
```yaml
|
|
16
29
|
---
|
|
17
30
|
subtask: true
|
|
18
|
-
return:
|
|
31
|
+
return: Look again, assess the code review. Challenge the findings, then implement the valid fixes.
|
|
19
32
|
---
|
|
20
|
-
|
|
21
|
-
Review this PR for bugs.
|
|
33
|
+
Review the PR# $ARGUMENTS for bugs.
|
|
22
34
|
```
|
|
23
35
|
|
|
24
|
-
- For `subtask: true` commands, it replaces
|
|
36
|
+
- For `subtask: true` commands, it replaces opencode's default injected "summarize" message.
|
|
25
37
|
- For regular commands, it's injected as a follow-up message after the LLM turn ends, identical to what the "chain" param does
|
|
26
38
|
|
|
27
|
-
**Note:** For non-subtask commands, requires
|
|
39
|
+
**Note:** For non-subtask commands, requires opencode with `command.execute.before` hook (pending PR).
|
|
28
40
|
|
|
29
|
-
### 2. `parallel`
|
|
41
|
+
### 2. `parallel` - Run multiple subtasks concurrently ⚠️ **PENDING PR** (ignored for now)
|
|
30
42
|
|
|
31
43
|
Spawn additional command subtasks alongside the main one:
|
|
32
44
|
|
|
33
|
-
```
|
|
45
|
+
```yaml
|
|
34
46
|
---
|
|
35
47
|
subtask: true
|
|
36
48
|
parallel: security-review, perf-review
|
|
37
49
|
return: Synthesize all review results and create a unified action plan.
|
|
38
50
|
---
|
|
39
|
-
|
|
40
51
|
Review this code for correctness.
|
|
41
52
|
```
|
|
42
53
|
|
|
@@ -48,33 +59,66 @@ This runs 3 subtasks in parallel:
|
|
|
48
59
|
|
|
49
60
|
When ALL complete, the main agent gets the `return` prompt.
|
|
50
61
|
|
|
51
|
-
**
|
|
62
|
+
**With custom arguments per command:**
|
|
63
|
+
|
|
64
|
+
```yaml
|
|
65
|
+
---
|
|
66
|
+
subtask: true
|
|
67
|
+
parallel:
|
|
68
|
+
- command: research-docs
|
|
69
|
+
arguments: authentication flow
|
|
70
|
+
- command: research-codebase
|
|
71
|
+
arguments: auth middleware implementation
|
|
72
|
+
- security-audit
|
|
73
|
+
return: Synthesize all findings into an implementation plan.
|
|
74
|
+
---
|
|
75
|
+
Design a new auth system for $ARGUMENTS
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
- `research-docs` gets "authentication flow" as `$ARGUMENTS`
|
|
79
|
+
- `research-codebase` gets "auth middleware implementation"
|
|
80
|
+
- `security-audit` inherits the main command's `$ARGUMENTS`
|
|
81
|
+
|
|
82
|
+
**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.
|
|
83
|
+
|
|
84
|
+
**Tip:** If all commands share the same arguments, use the simple syntax:
|
|
85
|
+
|
|
86
|
+
```yaml
|
|
87
|
+
parallel: research-docs, research-codebase, security-audit
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
All three inherit the main command's `$ARGUMENTS`.
|
|
91
|
+
|
|
92
|
+
**Tip:** You can also pass arguments inline using `||` separator:
|
|
52
93
|
|
|
53
|
-
|
|
94
|
+
```
|
|
95
|
+
/mycommand main args || parallel1 args || parallel2 args
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
Each segment maps to a parallel command in order. Priority: **frontmatter args > pipe args > inherit main args**.
|
|
54
99
|
|
|
55
|
-
### 3. `chain`
|
|
100
|
+
### 3. `chain` - Sequential follow-up prompts
|
|
56
101
|
|
|
57
102
|
Queue user messages that fire after the command completes:
|
|
58
103
|
|
|
59
|
-
```
|
|
104
|
+
```yaml
|
|
60
105
|
---
|
|
61
106
|
subtask: true
|
|
62
107
|
return: Implement the fix.
|
|
63
108
|
chain:
|
|
64
|
-
-
|
|
65
|
-
-
|
|
109
|
+
- Review your implementation for correctness, make sure this work on the first try
|
|
110
|
+
- Tell me a joke
|
|
66
111
|
---
|
|
67
|
-
|
|
68
112
|
Find the bug in auth.ts
|
|
69
113
|
```
|
|
70
114
|
|
|
71
115
|
Flow: Command → return prompt → LLM works → chain[0] fires → LLM works → chain[1] fires → ...
|
|
72
116
|
|
|
73
|
-
**Note:** For non-subtask commands, requires
|
|
117
|
+
**Note:** For non-subtask commands, requires opencode with `command.execute.before` hook (pending PR).
|
|
74
118
|
|
|
75
|
-
### 4. Global fallback
|
|
119
|
+
### 4. Global fallback - 'Better' default for subtasks
|
|
76
120
|
|
|
77
|
-
For `subtask: true` commands without a `return`, this plugin replaces
|
|
121
|
+
For `subtask: true` commands without a `return`, this plugin replaces opencode's generic "summarize" message with something better.
|
|
78
122
|
|
|
79
123
|
Default: "Challenge and validate the task output. Verify assumptions, identify gaps or errors, then continue with the next logical step."
|
|
80
124
|
|
|
@@ -99,49 +143,57 @@ When a subtask completes, what message does the main agent see?
|
|
|
99
143
|
3. **Built-in default** → "Challenge and validate..." (if `replace_generic: true`)
|
|
100
144
|
4. **OpenCode original** → "Summarize..." (if `replace_generic: false`)
|
|
101
145
|
|
|
102
|
-
## Installation
|
|
103
|
-
|
|
104
|
-
```json
|
|
105
|
-
{
|
|
106
|
-
"plugins": ["@openspoon/subtask2"]
|
|
107
|
-
}
|
|
108
|
-
```
|
|
109
|
-
|
|
110
146
|
## Quick Examples
|
|
111
147
|
|
|
112
148
|
**Simple: Make the agent act on results**
|
|
113
149
|
|
|
114
|
-
```
|
|
150
|
+
```yaml
|
|
115
151
|
---
|
|
116
152
|
return: Implement the suggested improvements.
|
|
117
153
|
---
|
|
118
|
-
|
|
119
154
|
Analyze this function for performance issues.
|
|
120
155
|
```
|
|
121
156
|
|
|
122
157
|
**Parallel: Multiple perspectives at once**
|
|
123
158
|
|
|
124
|
-
```
|
|
159
|
+
```yaml
|
|
125
160
|
---
|
|
126
161
|
subtask: true
|
|
127
162
|
parallel: brainstorm-solutions, research-prior-art
|
|
128
163
|
return: Evaluate all ideas and create an implementation plan.
|
|
129
164
|
---
|
|
130
|
-
|
|
131
165
|
Identify the core problem in our auth flow.
|
|
132
166
|
```
|
|
133
167
|
|
|
134
|
-
**
|
|
168
|
+
**Parallel: Same task, different models**
|
|
135
169
|
|
|
136
|
-
```
|
|
170
|
+
```yaml
|
|
137
171
|
---
|
|
138
|
-
|
|
172
|
+
description: multi-model ensemble, 3 models plan in parallel, best ideas unified
|
|
173
|
+
agent: build
|
|
174
|
+
model: github-copilot/gpt-5.2
|
|
175
|
+
subtask: true
|
|
176
|
+
parallel: plan-gemini, plan-opus
|
|
177
|
+
return: Compare all 3 plans and validate each directly against the codebase. Pick the best ideas from each and create a unified implementation plan.
|
|
139
178
|
chain:
|
|
140
|
-
-
|
|
141
|
-
- Update the documentation.
|
|
179
|
+
- feed the implementation plan to a @review subagent, let's poke holes.
|
|
142
180
|
---
|
|
181
|
+
Plan the implementation for the following feature: $ARGUMENTS
|
|
182
|
+
```
|
|
143
183
|
|
|
144
|
-
|
|
184
|
+
**Chain: Multi-step workflow**
|
|
185
|
+
|
|
186
|
+
```yaml
|
|
187
|
+
---
|
|
188
|
+
description: design, implement, test, document
|
|
189
|
+
subtask: true
|
|
190
|
+
return: Implement the component following the conceptual design specifications.
|
|
191
|
+
chain:
|
|
192
|
+
- Write comprehensive unit tests for all edge cases.
|
|
193
|
+
- Update the documentation and add usage examples.
|
|
194
|
+
- Run the test suite and fix any failures.
|
|
195
|
+
---
|
|
196
|
+
Conceptually design a React modal component with the following requirements: $ARGUMENTS
|
|
145
197
|
```
|
|
146
198
|
|
|
147
199
|
## License
|
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;AAmKhD,QAAA,MAAM,MAAM,EAAE,
|
|
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,MAuIb,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,
|
|
@@ -140,6 +137,21 @@ const plugin = async (ctx) => {
|
|
|
140
137
|
"command.execute.before": async (input, output) => {
|
|
141
138
|
const cmd = input.command;
|
|
142
139
|
const config = configs[cmd];
|
|
140
|
+
// Parse pipe-separated arguments: main args || parallel1 args || parallel2 args
|
|
141
|
+
const argSegments = input.arguments.split("||").map((s) => s.trim());
|
|
142
|
+
const mainArgs = argSegments[0] || "";
|
|
143
|
+
const parallelArgs = argSegments.slice(1);
|
|
144
|
+
// Fix main command's parts to use only mainArgs (not the full pipe string)
|
|
145
|
+
if (argSegments.length > 1) {
|
|
146
|
+
for (const part of output.parts) {
|
|
147
|
+
if (part.type === "subtask" && part.prompt) {
|
|
148
|
+
part.prompt = part.prompt.replaceAll(input.arguments, mainArgs);
|
|
149
|
+
}
|
|
150
|
+
if (part.type === "text" && part.text) {
|
|
151
|
+
part.text = part.text.replaceAll(input.arguments, mainArgs);
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
}
|
|
143
155
|
// Track non-subtask commands with return/chain for later injection
|
|
144
156
|
const hasSubtaskPart = output.parts.some((p) => p.type === "subtask");
|
|
145
157
|
if (!hasSubtaskPart && config) {
|
|
@@ -152,17 +164,28 @@ const plugin = async (ctx) => {
|
|
|
152
164
|
}
|
|
153
165
|
if (!config?.parallel?.length)
|
|
154
166
|
return;
|
|
155
|
-
for (
|
|
156
|
-
const
|
|
167
|
+
for (let i = 0; i < config.parallel.length; i++) {
|
|
168
|
+
const parallelCmd = config.parallel[i];
|
|
169
|
+
const cmdFile = await loadCommandFile(parallelCmd.command);
|
|
157
170
|
if (!cmdFile)
|
|
158
171
|
continue;
|
|
159
172
|
const fm = parseFrontmatter(cmdFile.content);
|
|
160
|
-
|
|
173
|
+
let template = getTemplateBody(cmdFile.content);
|
|
174
|
+
// Priority: frontmatter args > pipe args > main args
|
|
175
|
+
const args = parallelCmd.arguments ?? parallelArgs[i] ?? mainArgs;
|
|
176
|
+
template = template.replace(/\$ARGUMENTS/g, args);
|
|
177
|
+
// Parse model string "provider/model" into {providerID, modelID}
|
|
178
|
+
let model;
|
|
179
|
+
if (typeof fm.model === "string" && fm.model.includes("/")) {
|
|
180
|
+
const [providerID, ...rest] = fm.model.split("/");
|
|
181
|
+
model = { providerID, modelID: rest.join("/") };
|
|
182
|
+
}
|
|
161
183
|
output.parts.push({
|
|
162
184
|
type: "subtask",
|
|
163
185
|
agent: fm.agent || "general",
|
|
164
|
-
|
|
165
|
-
|
|
186
|
+
model,
|
|
187
|
+
description: fm.description || `Parallel: ${parallelCmd.command}`,
|
|
188
|
+
command: parallelCmd.command,
|
|
166
189
|
prompt: template,
|
|
167
190
|
});
|
|
168
191
|
}
|
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,CA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oon/subtask2",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.12",
|
|
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": [
|