@openspoon/subtask2 0.1.4 → 0.1.5

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.
Files changed (2) hide show
  1. package/README.md +30 -7
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,11 +1,21 @@
1
1
  # @openspoon/subtask2
2
2
 
3
- OpenCode plugin for enhanced subtask control with **return context injection** and **prompt chaining**.
3
+ OpenCode plugin that controls what happens **after** a subtask completes.
4
4
 
5
- ## Features
5
+ ## The Problem
6
6
 
7
- - **`return`**: Append context to subtask output, ensuring the parent agent receives specific information
8
- - **`chain`**: Queue follow-up user messages that execute sequentially after the subtask completes
7
+ When a subtask (subagent) finishes and returns to the main agent, the main agent typically just relays the response:
8
+
9
+ > "Here's what the subagent found: [result]" — _end of turn_
10
+
11
+ The main agent becomes a passive messenger rather than an active participant.
12
+
13
+ ## The Solution
14
+
15
+ This plugin adds two frontmatter parameters to subtask commands:
16
+
17
+ - **`return`**: Injects a prompt at the end of the subtask output, giving the main agent its own task instead of just relaying information
18
+ - **`chain`**: Queues follow-up prompts that execute sequentially after the subtask completes
9
19
 
10
20
  ## Installation
11
21
 
@@ -41,9 +51,22 @@ Review PR#355 for bugs, security issues, and code style problems.
41
51
 
42
52
  ## How It Works
43
53
 
44
- 1. When a subtask command with `return` executes, the return prompt is appended to the task output
45
- 2. When the subtask completes, each `chain` prompt is sent as a user message
46
- 3. Chain prompts execute sequentially
54
+ **Without `return`:**
55
+
56
+ ```
57
+ Subagent → "Found 3 bugs in the code" → Main agent → "The subagent found 3 bugs" → END
58
+ ```
59
+
60
+ **With `return`:**
61
+
62
+ ```
63
+ Subagent → "Found 3 bugs" + "Now assess and implement fixes" → Main agent → *starts working on fixes*
64
+ ```
65
+
66
+ The `return` prompt is injected into the subagent's response, so the main agent receives instructions rather than just information to relay.
67
+
68
+ `chain` then allows you to queue additional prompts that fire sequentially after each completion, enabling simple multi-step automated workflows.
69
+
47
70
  ## License
48
71
 
49
72
  MIT
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",
4
+ "version": "0.1.5",
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",