opencode-swarm-plugin 0.23.5 → 0.24.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.
@@ -1,9 +1,9 @@
1
1
  $ bun build ./src/index.ts --outdir ./dist --target node --external @electric-sql/pglite --external swarm-mail && bun build ./src/plugin.ts --outfile ./dist/plugin.js --target node --external @electric-sql/pglite --external swarm-mail && tsc
2
- Bundled 195 modules in 32ms
2
+ Bundled 196 modules in 42ms
3
3
 
4
- index.js 1.14 MB (entry point)
4
+ index.js 1.16 MB (entry point)
5
5
 
6
- Bundled 196 modules in 30ms
6
+ Bundled 197 modules in 36ms
7
7
 
8
- plugin.js 1.12 MB (entry point)
8
+ plugin.js 1.13 MB (entry point)
9
9
 
package/CHANGELOG.md CHANGED
@@ -1,5 +1,39 @@
1
1
  # opencode-swarm-plugin
2
2
 
3
+ ## 0.24.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`434f48f`](https://github.com/joelhooks/swarm-tools/commit/434f48f207c3509f6b924caeb47cd6e019dcc0e1) Thanks [@joelhooks](https://github.com/joelhooks)! - Add worker survival checklist and Socratic planning for swarm coordination
8
+
9
+ **Worker Survival Checklist (9-step mandatory flow):**
10
+
11
+ - Workers now follow a strict initialization sequence: swarmmail_init → semantic-memory_find → skills_use → swarmmail_reserve
12
+ - Workers reserve their own files (coordinators no longer reserve on behalf of workers)
13
+ - Auto-checkpoint at 25/50/75% progress milestones
14
+ - Workers store learnings via semantic-memory before completing
15
+
16
+ **Socratic Planning:**
17
+
18
+ - New `swarm_plan_interactive` tool with 4 modes: socratic (default), fast, auto, confirm-only
19
+ - Default mode asks clarifying questions before decomposition
20
+ - Escape hatches for experienced users: `--fast`, `--auto`, `--confirm-only` flags on /swarm command
21
+
22
+ **Updated Skills:**
23
+
24
+ - swarm-coordination skill now documents worker survival patterns and coordinator rules
25
+
26
+ ### Patch Changes
27
+
28
+ - [#15](https://github.com/joelhooks/swarm-tools/pull/15) [`299f2d3`](https://github.com/joelhooks/swarm-tools/commit/299f2d3305796bcb411f9b90715cda3513d17b54) Thanks [@tayiorbeii](https://github.com/tayiorbeii)! - Sync bundled skills into the global skills directory during `swarm setup` reinstall, fix bundled-skill path resolution, and make AGENTS.md skill-awareness updates work without relying on `opencode run`.
29
+
30
+ ## 0.23.6
31
+
32
+ ### Patch Changes
33
+
34
+ - Updated dependencies [[`22befbf`](https://github.com/joelhooks/opencode-swarm-plugin/commit/22befbfa120a37a585cfec0709597172efda92a4)]:
35
+ - swarm-mail@0.1.3
36
+
3
37
  ## 0.23.5
4
38
 
5
39
  ### Patch Changes
package/README.md CHANGED
@@ -2,6 +2,9 @@
2
2
 
3
3
  OpenCode plugin for multi-agent swarm coordination with learning capabilities.
4
4
 
5
+ **🌐 Website:** [swarmtools.ai](https://swarmtools.ai)
6
+ **📚 Full Documentation:** [swarmtools.ai/docs](https://swarmtools.ai/docs)
7
+
5
8
  ```
6
9
  ███████╗██╗ ██╗ █████╗ ██████╗ ███╗ ███╗
7
10
  ██╔════╝██║ ██║██╔══██╗██╔══██╗████╗ ████║
@@ -18,7 +21,7 @@ OpenCode plugin for multi-agent swarm coordination with learning capabilities.
18
21
  - **Agent Mail** - Inter-agent messaging with file reservations
19
22
  - **Learning System** - Pattern maturity, anti-pattern detection, confidence decay
20
23
  - **Skills System** - Knowledge injection with bundled and custom skills
21
- - **Checkpointing** - Survive context compaction, resume from last checkpoint
24
+ - **Checkpoint & Recovery** - Auto-checkpoint at 25/50/75%, survive context death (9 integration tests ✅)
22
25
 
23
26
  ## Install
24
27
 
@@ -76,8 +79,8 @@ swarm setup
76
79
  | `swarm_progress` | Report subtask progress to coordinator |
77
80
  | `swarm_complete` | Complete subtask (runs UBS scan, releases) |
78
81
  | `swarm_record_outcome` | Record outcome for learning |
79
- | `swarm_checkpoint` | Save progress snapshot |
80
- | `swarm_recover` | Resume from checkpoint |
82
+ | `swarm_checkpoint` | Save progress snapshot (auto at 25/50/75%) |
83
+ | `swarm_recover` | Resume from checkpoint (returns full context) |
81
84
  | `swarm_learn` | Extract learnings from outcome |
82
85
  | `swarm_broadcast` | Send message to all active agents |
83
86
  | `swarm_accumulate_error` | Track recurring errors (3-strike system) |
@@ -94,6 +97,69 @@ swarm setup
94
97
  | `skills_read` | Read skill content |
95
98
  | `skills_create` | Create new skill |
96
99
 
100
+ ## Checkpoint & Recovery
101
+
102
+ Ensures work survives context compaction or crashes. Proven by 9 integration tests.
103
+
104
+ ### Auto-Checkpoint Milestones
105
+
106
+ When `swarm_progress` reports 25%, 50%, or 75% completion, a checkpoint is automatically saved to PGLite:
107
+
108
+ ```typescript
109
+ // Stored in .swarm-mail/ directory (no external database needed)
110
+ {
111
+ epic_id: "bd-123",
112
+ bead_id: "bd-123.1",
113
+ strategy: "file-based",
114
+ files: ["src/auth.ts", "src/middleware.ts"],
115
+ progress_percent: 50,
116
+ directives: {
117
+ shared_context: "OAuth implementation notes",
118
+ skills_to_load: ["testing-patterns"],
119
+ coordinator_notes: "Watch for race conditions"
120
+ },
121
+ recovery: {
122
+ last_checkpoint: 1234567890,
123
+ files_modified: ["src/auth.ts"],
124
+ error_context: "Optional: error details if checkpoint during error"
125
+ }
126
+ }
127
+ ```
128
+
129
+ ### Tools
130
+
131
+ **swarm_checkpoint** - Manually save a checkpoint:
132
+ ```typescript
133
+ swarm_checkpoint({
134
+ project_key: "/abs/path",
135
+ agent_name: "WorkerA",
136
+ bead_id: "bd-123.1",
137
+ epic_id: "bd-123",
138
+ files_modified: ["src/auth.ts"],
139
+ progress_percent: 30,
140
+ directives: { shared_context: "..." },
141
+ error_context: "Optional"
142
+ })
143
+ ```
144
+
145
+ **swarm_recover** - Resume from last checkpoint:
146
+ ```typescript
147
+ swarm_recover({
148
+ project_key: "/abs/path",
149
+ epic_id: "bd-123"
150
+ })
151
+ // Returns:
152
+ // {
153
+ // found: true,
154
+ // context: { epic_id, bead_id, files, strategy, directives, recovery },
155
+ // age_seconds: 120
156
+ // }
157
+ ```
158
+
159
+ ### Failure Handling
160
+
161
+ Checkpoint failures are **non-fatal**—work continues even if checkpointing fails. Prevents infrastructure from blocking actual work.
162
+
97
163
  ## Bundled Skills
98
164
 
99
165
  Located in `global-skills/`:
@@ -126,6 +192,74 @@ src/
126
192
 
127
193
  ## Dependencies
128
194
 
195
+ ### Required
196
+
197
+ | Dependency | Purpose |
198
+ |------------|---------|
199
+ | [OpenCode](https://opencode.ai) | AI coding agent (the plugin runs inside OpenCode) |
200
+ | [Beads](https://github.com/steveyegge/beads) | Git-backed issue tracking |
201
+
202
+ ### Optional (Highly Recommended)
203
+
204
+ These tools significantly enhance the swarm experience:
205
+
206
+ | Tool | Purpose | Install |
207
+ |------|---------|---------|
208
+ | [CASS](https://github.com/Dicklesworthstone/coding_agent_session_search) | Historical context - queries past sessions for similar decompositions | See below |
209
+ | [UBS](https://github.com/Dicklesworthstone/ultimate_bug_scanner) | Bug scanning - runs on subtask completion to catch issues | See below |
210
+ | [semantic-memory](https://github.com/joelhooks/semantic-memory) | Learning persistence - stores patterns across sessions | See below |
211
+
212
+ #### Installing CASS
213
+
214
+ ```bash
215
+ # Clone and install
216
+ git clone https://github.com/Dicklesworthstone/coding_agent_session_search
217
+ cd coding_agent_session_search
218
+ pip install -e .
219
+
220
+ # Build the index (run periodically to index new sessions)
221
+ cass index
222
+ ```
223
+
224
+ #### Installing UBS
225
+
226
+ ```bash
227
+ # Clone and install
228
+ git clone https://github.com/Dicklesworthstone/ultimate_bug_scanner
229
+ cd ultimate_bug_scanner
230
+ pip install -e .
231
+ ```
232
+
233
+ #### Installing semantic-memory
234
+
235
+ Requires [Ollama](https://ollama.ai) with an embedding model:
236
+
237
+ ```bash
238
+ # 1. Install Ollama (macOS)
239
+ brew install ollama
240
+
241
+ # 2. Start Ollama service
242
+ ollama serve
243
+
244
+ # 3. Pull an embedding model
245
+ ollama pull mxbai-embed-large
246
+
247
+ # 4. Install the OpenCode plugin
248
+ # Add to your OpenCode config
249
+ ```
250
+
251
+ The `semantic-memory_check` tool verifies Ollama is ready.
252
+
253
+ **Why install these?**
254
+
255
+ - **CASS** - When you run `/swarm "Add OAuth"`, the coordinator queries CASS for similar past tasks. Without it, decomposition is based only on the current task description.
256
+ - **UBS** - Every `swarm_complete` runs UBS to scan for bugs. Without it, you lose automatic bug detection.
257
+ - **semantic-memory** - Pattern maturity and anti-pattern detection persist across sessions. Without it, learning resets each session.
258
+
259
+ Run `swarm doctor` to check which dependencies are installed.
260
+
261
+ ### npm Dependencies
262
+
129
263
  - [swarm-mail](../swarm-mail) - Event sourcing primitives (workspace dependency)
130
264
  - [@opencode-ai/plugin](https://www.npmjs.com/package/@opencode-ai/plugin) - OpenCode plugin API
131
265
  - [effect](https://effect.website) - Effect-TS for type-safe composition
@@ -154,6 +288,24 @@ swarm init # Initialize beads in project
154
288
  swarm config # Show config file paths
155
289
  ```
156
290
 
291
+ ## Roadmap
292
+
293
+ ### Planned Features
294
+
295
+ - **Enhanced Learning** - Pattern extraction from successful/failed decompositions
296
+ - **Swarm Observability** - Real-time visualization of agent coordination
297
+ - **Advanced Strategies** - Risk-based decomposition, critical path optimization
298
+ - **Multi-Project Coordination** - Cross-repo dependencies and shared context
299
+ - **Learning Export/Import** - Share pattern maturity across teams
300
+
301
+ ### Experimental
302
+
303
+ - **Auto-healing Swarms** - Agents detect and recover from blockers autonomously
304
+ - **Semantic Code Search** - Vector-based codebase exploration for decomposition context
305
+ - **Prevention Pipeline Integration** - Auto-generate prevention patterns from debug sessions
306
+
307
+ See [swarmtools.ai/docs](https://swarmtools.ai/docs) for latest updates and detailed guides.
308
+
157
309
  ## License
158
310
 
159
311
  MIT