opencode-mad 0.3.1 → 0.3.3
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/agents/orchestrator.md +52 -0
- package/package.json +1 -1
- package/plugins/mad-plugin.ts +2 -2
package/agents/orchestrator.md
CHANGED
|
@@ -78,6 +78,58 @@ Task(subagent_type: "mad-tester", description: "Test frontend", prompt: "Test wo
|
|
|
78
78
|
|
|
79
79
|
---
|
|
80
80
|
|
|
81
|
+
## CRITICAL: WAIT FOR ALL AGENTS TO COMPLETE
|
|
82
|
+
|
|
83
|
+
When you spawn multiple agents in parallel, **SOME MAY FINISH BEFORE OTHERS**. This is normal!
|
|
84
|
+
|
|
85
|
+
### What happens:
|
|
86
|
+
- You spawn 5 developers in parallel
|
|
87
|
+
- Developer 1, 2, 3 finish quickly
|
|
88
|
+
- Developer 4, 5 are still working
|
|
89
|
+
- You get partial results back
|
|
90
|
+
|
|
91
|
+
### What to do:
|
|
92
|
+
|
|
93
|
+
1. **After spawning parallel agents, ALWAYS check `mad_status` or `mad_visualize`**
|
|
94
|
+
2. **If some tasks are still "IN PROGRESS", WAIT and check again**
|
|
95
|
+
3. **Only proceed to merge when ALL tasks are "DONE"**
|
|
96
|
+
|
|
97
|
+
### Pattern for handling partial completion:
|
|
98
|
+
|
|
99
|
+
```
|
|
100
|
+
# After spawning agents, check status
|
|
101
|
+
mad_visualize()
|
|
102
|
+
|
|
103
|
+
# If you see tasks still IN PROGRESS:
|
|
104
|
+
# - DO NOT proceed to merge yet
|
|
105
|
+
# - DO NOT assume they failed
|
|
106
|
+
# - Check status again after a moment
|
|
107
|
+
# - Resume incomplete tasks if needed with Task(task_id: "previous_task_id", ...)
|
|
108
|
+
|
|
109
|
+
# Only when ALL tasks show DONE:
|
|
110
|
+
# - Proceed to testing
|
|
111
|
+
# - Then merge
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
### Resuming incomplete tasks:
|
|
115
|
+
|
|
116
|
+
If an agent didn't return a summary but the worktree shows work was done:
|
|
117
|
+
1. Check the worktree status with `mad_status`
|
|
118
|
+
2. If work is committed but not marked done, spawn a new agent to finish:
|
|
119
|
+
```
|
|
120
|
+
Task(
|
|
121
|
+
subagent_type: "mad-developer",
|
|
122
|
+
description: "Finish [task]",
|
|
123
|
+
prompt: "Continue work in worktree '[name]'.
|
|
124
|
+
Check what's already done, complete any remaining work,
|
|
125
|
+
commit, and call mad_done."
|
|
126
|
+
)
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
**NEVER merge until ALL parallel tasks are DONE!**
|
|
130
|
+
|
|
131
|
+
---
|
|
132
|
+
|
|
81
133
|
## Complete Workflow
|
|
82
134
|
|
|
83
135
|
```
|
package/package.json
CHANGED
package/plugins/mad-plugin.ts
CHANGED
|
@@ -13,7 +13,7 @@ import { execSync } from "child_process"
|
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
15
|
// Current version of opencode-mad
|
|
16
|
-
const CURRENT_VERSION = "0.3.
|
|
16
|
+
const CURRENT_VERSION = "0.3.3"
|
|
17
17
|
|
|
18
18
|
// Update notification state (shown only once per session)
|
|
19
19
|
let updateNotificationShown = false
|
|
@@ -434,7 +434,7 @@ Handles merge conflicts by reporting them.`,
|
|
|
434
434
|
return getUpdateNotification() + `Cannot merge: worktree ${args.worktree} is not marked as done. Complete the task first.`
|
|
435
435
|
}
|
|
436
436
|
|
|
437
|
-
const result = runCommand(`git merge ${branch} --no-edit`, gitRoot)
|
|
437
|
+
const result = runCommand(`git merge --no-ff ${branch} --no-edit`, gitRoot)
|
|
438
438
|
if (result.success) {
|
|
439
439
|
return getUpdateNotification() + `✅ Successfully merged ${branch}!\n\n${result.output}`
|
|
440
440
|
} else {
|