@openspoon/subtask2 0.1.7 → 0.1.9
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 +101 -61
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +81 -9
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,108 +1,148 @@
|
|
|
1
|
-
# @openspoon/subtask2
|
|
2
|
-
|
|
3
|
-
OpenCode plugin that controls what happens **after** a subtask completes.
|
|
1
|
+
# @openspoon/subtask2 - an opencode plugin
|
|
4
2
|
|
|
5
3
|
## The Problem
|
|
6
4
|
|
|
7
|
-
When a subtask
|
|
5
|
+
When a subtask command completes, OpenCode tells the main agent to "summarize the findings." The main agent reports back to you and no further action is taken on the subtask results. The agentic loop dies.
|
|
8
6
|
|
|
9
|
-
This
|
|
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.
|
|
10
8
|
|
|
11
|
-
|
|
9
|
+
## Features
|
|
12
10
|
|
|
13
|
-
|
|
11
|
+
### 1. `return` — Per-command instructions
|
|
14
12
|
|
|
15
|
-
|
|
13
|
+
Tell the main agent exactly what to do after a command completes:
|
|
16
14
|
|
|
17
|
-
|
|
15
|
+
```markdown
|
|
16
|
+
---
|
|
17
|
+
subtask: true
|
|
18
|
+
return: Assess the code review. Challenge the findings, then implement the valid fixes.
|
|
19
|
+
---
|
|
18
20
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
3. **`chain`** — Queue follow-up prompts that execute sequentially after the subtask completes
|
|
21
|
+
Review this PR for bugs.
|
|
22
|
+
```
|
|
22
23
|
|
|
23
|
-
|
|
24
|
+
- For `subtask: true` commands, it replaces OpenCode's "summarize" message.
|
|
25
|
+
- For regular commands, it's injected as a follow-up message after the LLM turn ends, identical to what the "chain" param does
|
|
24
26
|
|
|
25
|
-
|
|
27
|
+
**Note:** For non-subtask commands, requires OpenCode with `command.execute.before` hook (pending PR).
|
|
26
28
|
|
|
27
|
-
|
|
28
|
-
{
|
|
29
|
-
"plugins": ["@openspoon/subtask2"]
|
|
30
|
-
}
|
|
31
|
-
```
|
|
29
|
+
### 2. `parallel` — Run multiple subtasks concurrently ⚠️ **PENDING PR** (ignored for now)
|
|
32
30
|
|
|
33
|
-
|
|
31
|
+
Spawn additional command subtasks alongside the main one:
|
|
34
32
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
33
|
+
```markdown
|
|
34
|
+
---
|
|
35
|
+
subtask: true
|
|
36
|
+
parallel: security-review, perf-review
|
|
37
|
+
return: Synthesize all review results and create a unified action plan.
|
|
38
|
+
---
|
|
41
39
|
|
|
42
|
-
|
|
43
|
-
// "prompt": "Your custom prompt here"
|
|
44
|
-
}
|
|
40
|
+
Review this code for correctness.
|
|
45
41
|
```
|
|
46
42
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
| Option | Type | Default | Description |
|
|
50
|
-
|--------|------|---------|-------------|
|
|
51
|
-
| `replace_generic` | boolean | `true` | Replace the generic prompt for subtasks without a `return` param |
|
|
52
|
-
| `prompt` | string | (built-in) | Custom replacement prompt. Default: "Challenge and validate the task output above. Verify assumptions, identify gaps or errors, then continue with the next logical step." |
|
|
43
|
+
This runs 3 subtasks in parallel:
|
|
53
44
|
|
|
54
|
-
|
|
45
|
+
1. The main command (correctness review)
|
|
46
|
+
2. `security-review` command
|
|
47
|
+
3. `perf-review` command
|
|
55
48
|
|
|
56
|
-
|
|
57
|
-
2. Config `prompt` → used when no `return` and `replace_generic: true`
|
|
58
|
-
3. Built-in default → used when no `return`, `replace_generic: true`, and no custom `prompt`
|
|
59
|
-
4. OpenCode's original → only if `replace_generic: false`
|
|
49
|
+
When ALL complete, the main agent gets the `return` prompt.
|
|
60
50
|
|
|
61
|
-
|
|
51
|
+
**Note:** Parallel commands are forced into subtasks regardless of their own `subtask` setting. Their own `return`/`chain` are ignored — only the parent's `return` applies.
|
|
62
52
|
|
|
63
|
-
|
|
53
|
+
**Requires:** OpenCode with `command.execute.before` hook (pending PR).
|
|
64
54
|
|
|
65
|
-
###
|
|
55
|
+
### 3. `chain` — Sequential follow-up prompts
|
|
66
56
|
|
|
67
|
-
|
|
57
|
+
Queue user messages that fire after the command completes:
|
|
68
58
|
|
|
69
59
|
```markdown
|
|
70
60
|
---
|
|
71
|
-
description: subtask2 return and chain prompt example
|
|
72
|
-
agent: general
|
|
73
61
|
subtask: true
|
|
74
|
-
return:
|
|
62
|
+
return: Implement the fix.
|
|
75
63
|
chain:
|
|
76
|
-
-
|
|
77
|
-
-
|
|
64
|
+
- Now write tests for the fix.
|
|
65
|
+
- Run the tests and fix any failures.
|
|
78
66
|
---
|
|
79
67
|
|
|
80
|
-
|
|
68
|
+
Find the bug in auth.ts
|
|
81
69
|
```
|
|
82
70
|
|
|
83
|
-
|
|
71
|
+
Flow: Command → return prompt → LLM works → chain[0] fires → LLM works → chain[1] fires → ...
|
|
84
72
|
|
|
85
|
-
**
|
|
73
|
+
**Note:** For non-subtask commands, requires OpenCode with `command.execute.before` hook (pending PR).
|
|
86
74
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
75
|
+
### 4. Global fallback — Better default for subtasks
|
|
76
|
+
|
|
77
|
+
For `subtask: true` commands without a `return`, this plugin replaces OpenCode's generic "summarize" message with something better.
|
|
90
78
|
|
|
91
|
-
|
|
79
|
+
Default: "Challenge and validate the task output. Verify assumptions, identify gaps or errors, then continue with the next logical step."
|
|
92
80
|
|
|
81
|
+
Configure in `~/.config/opencode/subtask2.jsonc`:
|
|
82
|
+
|
|
83
|
+
```jsonc
|
|
84
|
+
{
|
|
85
|
+
// Replace generic prompt when no 'return' is specified
|
|
86
|
+
"replace_generic": true,
|
|
87
|
+
|
|
88
|
+
// Custom fallback (optional - has built-in default)
|
|
89
|
+
"generic_return": "your custom return prompt here"
|
|
90
|
+
}
|
|
93
91
|
```
|
|
94
|
-
|
|
92
|
+
|
|
93
|
+
## Priority Order
|
|
94
|
+
|
|
95
|
+
When a subtask completes, what message does the main agent see?
|
|
96
|
+
|
|
97
|
+
1. **`return` param** → Your specific instructions (highest priority)
|
|
98
|
+
2. **Config `generic_return`** → Your custom fallback (if `replace_generic: true`)
|
|
99
|
+
3. **Built-in default** → "Challenge and validate..." (if `replace_generic: true`)
|
|
100
|
+
4. **OpenCode original** → "Summarize..." (if `replace_generic: false`)
|
|
101
|
+
|
|
102
|
+
## Installation
|
|
103
|
+
|
|
104
|
+
```json
|
|
105
|
+
{
|
|
106
|
+
"plugins": ["@openspoon/subtask2"]
|
|
107
|
+
}
|
|
95
108
|
```
|
|
96
109
|
|
|
97
|
-
|
|
110
|
+
## Quick Examples
|
|
111
|
+
|
|
112
|
+
**Simple: Make the agent act on results**
|
|
113
|
+
|
|
114
|
+
```markdown
|
|
115
|
+
---
|
|
116
|
+
return: Implement the suggested improvements.
|
|
117
|
+
---
|
|
98
118
|
|
|
119
|
+
Analyze this function for performance issues.
|
|
99
120
|
```
|
|
100
|
-
|
|
121
|
+
|
|
122
|
+
**Parallel: Multiple perspectives at once**
|
|
123
|
+
|
|
124
|
+
```markdown
|
|
125
|
+
---
|
|
126
|
+
subtask: true
|
|
127
|
+
parallel: brainstorm-solutions, research-prior-art
|
|
128
|
+
return: Evaluate all ideas and create an implementation plan.
|
|
129
|
+
---
|
|
130
|
+
|
|
131
|
+
Identify the core problem in our auth flow.
|
|
101
132
|
```
|
|
102
133
|
|
|
103
|
-
|
|
134
|
+
**Chain: Multi-step workflow**
|
|
104
135
|
|
|
105
|
-
|
|
136
|
+
```markdown
|
|
137
|
+
---
|
|
138
|
+
return: Create the component.
|
|
139
|
+
chain:
|
|
140
|
+
- Add unit tests.
|
|
141
|
+
- Update the documentation.
|
|
142
|
+
---
|
|
143
|
+
|
|
144
|
+
Design a React modal component.
|
|
145
|
+
```
|
|
106
146
|
|
|
107
147
|
## License
|
|
108
148
|
|
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,MAyGb,CAAC;AAEF,eAAe,MAAM,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -6,7 +6,7 @@ function isValidConfig(obj) {
|
|
|
6
6
|
const cfg = obj;
|
|
7
7
|
if (typeof cfg.replace_generic !== "boolean")
|
|
8
8
|
return false;
|
|
9
|
-
if (cfg.
|
|
9
|
+
if (cfg.generic_return !== undefined && typeof cfg.generic_return !== "string")
|
|
10
10
|
return false;
|
|
11
11
|
return true;
|
|
12
12
|
}
|
|
@@ -33,7 +33,7 @@ async function loadConfig() {
|
|
|
33
33
|
"replace_generic": true
|
|
34
34
|
|
|
35
35
|
// Custom prompt to use (uses subtask2 substitution prompt by default)
|
|
36
|
-
// "
|
|
36
|
+
// "generic_return": "Challenge and validate the task tool output above. Verify assumptions, identify gaps or errors, then continue with the next logical step."
|
|
37
37
|
}
|
|
38
38
|
`);
|
|
39
39
|
return defaultConfig;
|
|
@@ -65,6 +65,28 @@ function parseFrontmatter(content) {
|
|
|
65
65
|
}
|
|
66
66
|
return fm;
|
|
67
67
|
}
|
|
68
|
+
function getTemplateBody(content) {
|
|
69
|
+
const match = content.match(/^---\n[\s\S]*?\n---\n([\s\S]*)$/);
|
|
70
|
+
return match ? match[1].trim() : content.trim();
|
|
71
|
+
}
|
|
72
|
+
async function loadCommandFile(name) {
|
|
73
|
+
const home = Bun.env.HOME ?? "";
|
|
74
|
+
const dirs = [
|
|
75
|
+
`${home}/.config/opencode/command`,
|
|
76
|
+
`${Bun.env.PWD ?? "."}/.opencode/command`,
|
|
77
|
+
];
|
|
78
|
+
for (const dir of dirs) {
|
|
79
|
+
const path = `${dir}/${name}.md`;
|
|
80
|
+
try {
|
|
81
|
+
const file = Bun.file(path);
|
|
82
|
+
if (await file.exists()) {
|
|
83
|
+
return { content: await file.text(), path };
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
catch { }
|
|
87
|
+
}
|
|
88
|
+
return null;
|
|
89
|
+
}
|
|
68
90
|
async function buildManifest() {
|
|
69
91
|
const manifest = {};
|
|
70
92
|
const home = Bun.env.HOME ?? "";
|
|
@@ -81,12 +103,20 @@ async function buildManifest() {
|
|
|
81
103
|
const fm = parseFrontmatter(content);
|
|
82
104
|
const chain = fm.chain;
|
|
83
105
|
const chainArr = chain ? (Array.isArray(chain) ? chain : [chain]) : [];
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
106
|
+
const parallel = fm.parallel;
|
|
107
|
+
const parallelArr = parallel
|
|
108
|
+
? Array.isArray(parallel)
|
|
109
|
+
? parallel
|
|
110
|
+
: parallel.split(",").map((s) => s.trim()).filter(Boolean)
|
|
111
|
+
: [];
|
|
112
|
+
manifest[name] = {
|
|
113
|
+
return: fm.return,
|
|
114
|
+
chain: chainArr,
|
|
115
|
+
parallel: parallelArr,
|
|
116
|
+
agent: fm.agent,
|
|
117
|
+
description: fm.description,
|
|
118
|
+
template: getTemplateBody(content),
|
|
119
|
+
};
|
|
90
120
|
}
|
|
91
121
|
}
|
|
92
122
|
catch { }
|
|
@@ -99,6 +129,7 @@ let client = null;
|
|
|
99
129
|
const callState = new Map();
|
|
100
130
|
const chainState = new Map();
|
|
101
131
|
const pendingReturns = new Map();
|
|
132
|
+
const pendingNonSubtaskReturns = new Map();
|
|
102
133
|
let hasActiveSubtask = false;
|
|
103
134
|
const OPENCODE_GENERIC = "Summarize the task tool output above and continue with your task.";
|
|
104
135
|
const plugin = async (ctx) => {
|
|
@@ -106,6 +137,36 @@ const plugin = async (ctx) => {
|
|
|
106
137
|
pluginConfig = await loadConfig();
|
|
107
138
|
client = ctx.client;
|
|
108
139
|
return {
|
|
140
|
+
"command.execute.before": async (input, output) => {
|
|
141
|
+
const cmd = input.command;
|
|
142
|
+
const config = configs[cmd];
|
|
143
|
+
// Track non-subtask commands with return/chain for later injection
|
|
144
|
+
const hasSubtaskPart = output.parts.some((p) => p.type === "subtask");
|
|
145
|
+
if (!hasSubtaskPart && config) {
|
|
146
|
+
if (config.return) {
|
|
147
|
+
pendingNonSubtaskReturns.set(input.sessionID, config.return);
|
|
148
|
+
}
|
|
149
|
+
if (config.chain.length) {
|
|
150
|
+
chainState.set(input.sessionID, [...config.chain]);
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
if (!config?.parallel?.length)
|
|
154
|
+
return;
|
|
155
|
+
for (const parallelCmd of config.parallel) {
|
|
156
|
+
const cmdFile = await loadCommandFile(parallelCmd);
|
|
157
|
+
if (!cmdFile)
|
|
158
|
+
continue;
|
|
159
|
+
const fm = parseFrontmatter(cmdFile.content);
|
|
160
|
+
const template = getTemplateBody(cmdFile.content);
|
|
161
|
+
output.parts.push({
|
|
162
|
+
type: "subtask",
|
|
163
|
+
agent: fm.agent || "general",
|
|
164
|
+
description: fm.description || `Parallel: ${parallelCmd}`,
|
|
165
|
+
command: parallelCmd,
|
|
166
|
+
prompt: template,
|
|
167
|
+
});
|
|
168
|
+
}
|
|
169
|
+
},
|
|
109
170
|
"tool.execute.before": async (input, output) => {
|
|
110
171
|
if (input.tool !== "task")
|
|
111
172
|
return;
|
|
@@ -138,7 +199,7 @@ const plugin = async (ctx) => {
|
|
|
138
199
|
return;
|
|
139
200
|
}
|
|
140
201
|
if (hasActiveSubtask && pluginConfig.replace_generic) {
|
|
141
|
-
part.text = pluginConfig.
|
|
202
|
+
part.text = pluginConfig.generic_return ?? DEFAULT_PROMPT;
|
|
142
203
|
hasActiveSubtask = false;
|
|
143
204
|
return;
|
|
144
205
|
}
|
|
@@ -147,6 +208,17 @@ const plugin = async (ctx) => {
|
|
|
147
208
|
}
|
|
148
209
|
},
|
|
149
210
|
"experimental.text.complete": async (input) => {
|
|
211
|
+
// Handle non-subtask command returns (inject as follow-up message)
|
|
212
|
+
const pendingReturn = pendingNonSubtaskReturns.get(input.sessionID);
|
|
213
|
+
if (pendingReturn && client) {
|
|
214
|
+
pendingNonSubtaskReturns.delete(input.sessionID);
|
|
215
|
+
await client.session.promptAsync({
|
|
216
|
+
path: { id: input.sessionID },
|
|
217
|
+
body: { parts: [{ type: "text", text: pendingReturn }] },
|
|
218
|
+
});
|
|
219
|
+
return;
|
|
220
|
+
}
|
|
221
|
+
// Handle chain
|
|
150
222
|
const chain = chainState.get(input.sessionID);
|
|
151
223
|
if (!chain?.length || !client)
|
|
152
224
|
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":"AAgBA,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,UAAU,UAAU;IACvB,MAAM,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I,EAAE,EAAC,KAAK,EAAE,CAAC,EAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,aAAa,EAAC,CAAC,EAAC;iBACrD,CAAC,CAAC;gBACH,OAAO;YACT,CAAC;YAED,eAAe;YACf,MAAM,KAAK,GAAG,UAAU,CAAC,GAAG,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;YAC9C,IAAI,CAAC,KAAK,EAAE,MAAM,IAAI,CAAC,MAAM;gBAAE,OAAO;YACtC,MAAM,IAAI,GAAG,KAAK,CAAC,KAAK,EAAG,CAAC;YAC5B,IAAI,CAAC,KAAK,CAAC,MAAM;gBAAE,UAAU,CAAC,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;YACtD,MAAM,MAAM,CAAC,OAAO,CAAC,WAAW,CAAC;gBAC/B,IAAI,EAAE,EAAC,EAAE,EAAE,KAAK,CAAC,SAAS,EAAC;gBAC3B,IAAI,EAAE,EAAC,KAAK,EAAE,CAAC,EAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAC,CAAC,EAAC;aAC5C,CAAC,CAAC;QACL,CAAC;KACF,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,MAAM,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/package.json",
|
|
3
3
|
"name": "@openspoon/subtask2",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.9",
|
|
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",
|