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.
@@ -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