opencode-mad 0.2.0
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/LICENSE +21 -0
- package/README.md +235 -0
- package/agents/mad-developer.md +165 -0
- package/agents/mad-fixer.md +202 -0
- package/agents/mad-merger.md +215 -0
- package/agents/mad-planner.md +245 -0
- package/agents/mad-tester.md +224 -0
- package/agents/orchestrator.md +430 -0
- package/commands/mad-fix.md +12 -0
- package/commands/mad-merge-all.md +14 -0
- package/commands/mad-status.md +8 -0
- package/commands/mad-visualize.md +95 -0
- package/commands/mad.md +36 -0
- package/install.js +67 -0
- package/package.json +36 -0
- package/plugins/mad-plugin.ts +669 -0
- package/skills/mad-workflow/SKILL.md +109 -0
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: mad-workflow
|
|
3
|
+
description: Multi-Agent Dev workflow for parallel development with git worktrees and subagents
|
|
4
|
+
license: MIT
|
|
5
|
+
compatibility: opencode
|
|
6
|
+
metadata:
|
|
7
|
+
category: orchestration
|
|
8
|
+
author: Nistro-dev
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# MAD Workflow
|
|
12
|
+
|
|
13
|
+
MAD (Multi-Agent Dev) enables parallel software development by decomposing tasks into independent subtasks, each running in isolated git worktrees with dedicated subagents.
|
|
14
|
+
|
|
15
|
+
## Core Concepts
|
|
16
|
+
|
|
17
|
+
### Worktrees
|
|
18
|
+
Git worktrees provide isolated working directories, each on its own branch. This allows multiple tasks to be developed simultaneously without conflicts.
|
|
19
|
+
|
|
20
|
+
### Subagents
|
|
21
|
+
- **mad-developer**: Implements a single focused task in a worktree
|
|
22
|
+
- **mad-fixer**: Resolves build errors, test failures, and conflicts
|
|
23
|
+
|
|
24
|
+
### Signal Files
|
|
25
|
+
- `.agent-task`: Task description (created by orchestrator)
|
|
26
|
+
- `.agent-done`: Completion marker with summary
|
|
27
|
+
- `.agent-blocked`: Block marker with reason
|
|
28
|
+
- `.agent-error`: Error details from failed tests
|
|
29
|
+
|
|
30
|
+
## Workflow Steps
|
|
31
|
+
|
|
32
|
+
### 1. Decomposition
|
|
33
|
+
Analyze the request and identify parallelizable components:
|
|
34
|
+
- Different modules/features
|
|
35
|
+
- Independent files
|
|
36
|
+
- Separable concerns
|
|
37
|
+
|
|
38
|
+
### 2. Worktree Creation
|
|
39
|
+
For each subtask:
|
|
40
|
+
```
|
|
41
|
+
mad_worktree_create(
|
|
42
|
+
branch: "feat/feature-name",
|
|
43
|
+
task: "Detailed task description"
|
|
44
|
+
)
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
### 3. Parallel Execution
|
|
48
|
+
Spawn subagents simultaneously:
|
|
49
|
+
```
|
|
50
|
+
Task(subagent_type: "mad-developer", ...)
|
|
51
|
+
Task(subagent_type: "mad-developer", ...)
|
|
52
|
+
Task(subagent_type: "mad-developer", ...)
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
### 4. Monitoring
|
|
56
|
+
Check progress:
|
|
57
|
+
```
|
|
58
|
+
mad_status()
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
### 5. Testing
|
|
62
|
+
Verify each worktree:
|
|
63
|
+
```
|
|
64
|
+
mad_test(worktree: "feat-feature-name")
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
### 6. Merging
|
|
68
|
+
Merge completed work:
|
|
69
|
+
```
|
|
70
|
+
mad_merge(worktree: "feat-feature-name")
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
### 7. Cleanup
|
|
74
|
+
Remove finished worktrees:
|
|
75
|
+
```
|
|
76
|
+
mad_cleanup(worktree: "feat-feature-name")
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
## Best Practices
|
|
80
|
+
|
|
81
|
+
1. **Keep subtasks focused** - Each should be completable in one session
|
|
82
|
+
2. **Name branches clearly** - `feat/`, `fix/`, `refactor/` prefixes
|
|
83
|
+
3. **Test before merge** - Always run mad_test first
|
|
84
|
+
4. **Handle blocks promptly** - Don't let blocked tasks linger
|
|
85
|
+
5. **Merge sequentially** - Avoid merge conflict cascades
|
|
86
|
+
|
|
87
|
+
## Available Tools
|
|
88
|
+
|
|
89
|
+
| Tool | Purpose |
|
|
90
|
+
|------|---------|
|
|
91
|
+
| `mad_worktree_create` | Create isolated branch |
|
|
92
|
+
| `mad_status` | Dashboard of all worktrees |
|
|
93
|
+
| `mad_test` | Run tests on worktree |
|
|
94
|
+
| `mad_merge` | Merge completed branch |
|
|
95
|
+
| `mad_cleanup` | Remove worktree |
|
|
96
|
+
| `mad_done` | Mark task complete |
|
|
97
|
+
| `mad_blocked` | Mark task blocked |
|
|
98
|
+
| `mad_read_task` | Read task description |
|
|
99
|
+
|
|
100
|
+
## Example
|
|
101
|
+
|
|
102
|
+
Request: "Add user authentication with login, signup, and password reset"
|
|
103
|
+
|
|
104
|
+
1. Create 3 worktrees: `feat/auth-login`, `feat/auth-signup`, `feat/auth-reset`
|
|
105
|
+
2. Spawn 3 developer subagents in parallel
|
|
106
|
+
3. Monitor until all complete
|
|
107
|
+
4. Test each, merge sequentially
|
|
108
|
+
5. Cleanup worktrees
|
|
109
|
+
6. Final integration test
|