opencode-hive 0.9.0 → 0.9.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-hive",
3
- "version": "0.9.0",
3
+ "version": "0.9.1",
4
4
  "type": "module",
5
5
  "description": "OpenCode plugin for Agent Hive - from vibe coding to hive coding",
6
6
  "license": "MIT WITH Commons-Clause",
@@ -5,56 +5,143 @@ description: Execute Hive feature tasks with worktree isolation, parallel orches
5
5
 
6
6
  # Hive Execution
7
7
 
8
- Quick reference for executing Hive tasks.
8
+ Quick reference for executing Hive tasks (Receiver Mode).
9
9
 
10
- ## Workflow Summary
10
+ ## Architecture
11
11
 
12
- 1. **Feature create** → Discovery guide injected
13
- 2. **Discovery** → Q&A documented in plan.md
14
- 3. **Plan write** → GATE: requires ## Discovery section
15
- 4. **Approval** → User reviews in VS Code
16
- 5. **Exec start** Delegation guide (Master), TDD+debugging (Worker)
17
- 6. **Complete** → GATE: requires verification mention
18
- 7. **Merge** → Squash into feature branch
12
+ ```
13
+ @hive (Receiver Mode)
14
+
15
+
16
+ hive_exec_start ──► Forager Worker (isolated worktree)
17
+ │ │
18
+ │ ▼
19
+ │ background_task (research if needed)
20
+ │ │
21
+ │ ▼
22
+ │ hive_exec_complete
23
+
24
+ hive_merge ──► Main branch
25
+ ```
19
26
 
20
- ## Gates
27
+ ---
21
28
 
22
- | Tool | Gate | Error |
23
- |------|------|-------|
24
- | hive_plan_write | ## Discovery section | "BLOCKED: Discovery required" |
25
- | hive_exec_complete | Verification in summary | "BLOCKED: No verification" |
29
+ ## Workflow Summary
30
+
31
+ 1. **Tasks sync** Generate from approved plan
32
+ 2. **Exec start** Spawns Forager in worktree
33
+ 3. **Worker executes** → Implements, verifies, reports
34
+ 4. **Complete** → GATE: requires verification mention
35
+ 5. **Merge** → Squash into feature branch
36
+
37
+ ---
26
38
 
27
39
  ## Task Lifecycle
28
40
 
29
41
  ```
30
- hive_exec_start(task) # Creates worktree
42
+ hive_exec_start({ task }) # Creates worktree, spawns Forager
31
43
 
32
- [implement in worktree]
44
+ [Forager implements in worktree]
33
45
 
34
- hive_exec_complete(task, summary) # Commits to branch
46
+ hive_exec_complete({ task, summary, status }) # Commits to branch
35
47
 
36
- hive_merge(task, strategy: "squash") # Integrates to main
48
+ hive_merge({ task, strategy: "squash" }) # Integrates to main
49
+ ```
50
+
51
+ ---
52
+
53
+ ## Parallel Execution (Swarming)
54
+
55
+ For parallelizable tasks:
56
+
57
+ ```
58
+ hive_exec_start({ task: "02-task-a" })
59
+ hive_exec_start({ task: "03-task-b" })
60
+ hive_exec_start({ task: "04-task-c" })
61
+
62
+ hive_worker_status() # Monitor all
63
+ ```
64
+
65
+ ---
66
+
67
+ ## Blocker Handling
68
+
69
+ ### Quick Decision
70
+
71
+ ```
72
+ hive_worker_status() # Get blocker details
73
+ → Ask user via question tool
74
+ → hive_exec_start({ task, continueFrom: "blocked", decision: "..." })
37
75
  ```
38
76
 
39
- ## Quick Reference
77
+ ### Plan Gap (Replan)
78
+
79
+ If blocker suggests plan is incomplete:
80
+
81
+ 1. Ask user: Revise Plan / Quick Fix / Abort
82
+ 2. If revise:
83
+ ```
84
+ hive_exec_abort({ task })
85
+ hive_context_write({ name: "learnings", content: "..." })
86
+ hive_plan_write({ content: "..." }) // Updated plan
87
+ ```
88
+ 3. Wait for re-approval, then `hive_tasks_sync()`
89
+
90
+ ---
91
+
92
+ ## Research During Execution
93
+
94
+ Workers can delegate research:
95
+
96
+ ```
97
+ background_task({
98
+ agent: "explorer", // or librarian, oracle, designer
99
+ prompt: "Find usage patterns for...",
100
+ sync: true
101
+ })
102
+ ```
103
+
104
+ ---
105
+
106
+ ## Gates
107
+
108
+ | Tool | Gate | Error |
109
+ |------|------|-------|
110
+ | hive_plan_write | ## Discovery section | "BLOCKED: Discovery required" |
111
+ | hive_exec_complete | Verification in summary | "BLOCKED: No verification" |
112
+
113
+ ---
114
+
115
+ ## Tool Reference
40
116
 
41
117
  | Tool | Purpose |
42
118
  |------|---------|
43
- | hive_status | Check overall progress |
44
- | hive_worker_status | Check delegated workers |
119
+ | hive_status | Check overall progress + phase |
120
+ | hive_tasks_sync | Generate tasks from plan |
121
+ | hive_exec_start | Spawn Forager worker |
122
+ | hive_exec_complete | Mark task done |
45
123
  | hive_exec_abort | Discard changes, restart |
46
- | hive_merge | Integrate completed task |
124
+ | hive_worker_status | Check workers/blockers |
125
+ | hive_merge | Integrate to main |
47
126
  | hive_worktree_list | See active worktrees |
127
+ | background_task | Research delegation |
128
+
129
+ ---
48
130
 
49
131
  ## Error Recovery
50
132
 
51
133
  ### Task Failed
52
134
  ```
53
- hive_exec_abort(task) # Discards changes
54
- hive_exec_start(task) # Fresh start
135
+ hive_exec_abort({ task }) # Discards changes
136
+ hive_exec_start({ task }) # Fresh start
55
137
  ```
56
138
 
139
+ ### After 3 Failures
140
+ 1. Stop all workers
141
+ 2. Consult: `background_task({ agent: "oracle", prompt: "Analyze..." })`
142
+ 3. Ask user how to proceed
143
+
57
144
  ### Merge Conflicts
58
145
  1. Resolve conflicts in worktree
59
146
  2. Commit resolution
60
- 3. Run hive_merge again
147
+ 3. Run `hive_merge` again