opencodekit 0.16.4 → 0.16.6

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.
Files changed (56) hide show
  1. package/dist/index.js +1 -1
  2. package/dist/template/.opencode/AGENTS.md +106 -384
  3. package/dist/template/.opencode/README.md +170 -104
  4. package/dist/template/.opencode/agent/build.md +39 -32
  5. package/dist/template/.opencode/agent/explore.md +2 -0
  6. package/dist/template/.opencode/agent/review.md +3 -0
  7. package/dist/template/.opencode/agent/scout.md +22 -11
  8. package/dist/template/.opencode/command/create.md +164 -106
  9. package/dist/template/.opencode/command/design.md +5 -1
  10. package/dist/template/.opencode/command/handoff.md +6 -4
  11. package/dist/template/.opencode/command/init.md +1 -1
  12. package/dist/template/.opencode/command/plan.md +26 -23
  13. package/dist/template/.opencode/command/research.md +13 -6
  14. package/dist/template/.opencode/command/resume.md +8 -6
  15. package/dist/template/.opencode/command/ship.md +1 -1
  16. package/dist/template/.opencode/command/start.md +30 -25
  17. package/dist/template/.opencode/command/status.md +9 -42
  18. package/dist/template/.opencode/command/verify.md +11 -11
  19. package/dist/template/.opencode/memory/README.md +67 -37
  20. package/dist/template/.opencode/memory/_templates/prd.md +102 -18
  21. package/dist/template/.opencode/memory/project/gotchas.md +31 -0
  22. package/dist/template/.opencode/memory.db +0 -0
  23. package/dist/template/.opencode/memory.db-shm +0 -0
  24. package/dist/template/.opencode/memory.db-wal +0 -0
  25. package/dist/template/.opencode/opencode.json +0 -10
  26. package/dist/template/.opencode/package.json +1 -1
  27. package/dist/template/.opencode/skill/beads/SKILL.md +164 -380
  28. package/dist/template/.opencode/skill/beads/references/BOUNDARIES.md +23 -22
  29. package/dist/template/.opencode/skill/beads/references/DEPENDENCIES.md +23 -29
  30. package/dist/template/.opencode/skill/beads/references/RESUMABILITY.md +5 -8
  31. package/dist/template/.opencode/skill/beads/references/WORKFLOWS.md +43 -39
  32. package/dist/template/.opencode/skill/beads-bridge/SKILL.md +80 -53
  33. package/dist/template/.opencode/skill/brainstorming/SKILL.md +19 -5
  34. package/dist/template/.opencode/skill/context-engineering/SKILL.md +30 -63
  35. package/dist/template/.opencode/skill/context-management/SKILL.md +115 -0
  36. package/dist/template/.opencode/skill/deep-research/SKILL.md +4 -4
  37. package/dist/template/.opencode/skill/development-lifecycle/SKILL.md +305 -0
  38. package/dist/template/.opencode/skill/memory-system/SKILL.md +3 -3
  39. package/dist/template/.opencode/skill/prd/SKILL.md +47 -122
  40. package/dist/template/.opencode/skill/prd-task/SKILL.md +48 -4
  41. package/dist/template/.opencode/skill/prd-task/references/prd-schema.json +120 -24
  42. package/dist/template/.opencode/skill/swarm-coordination/SKILL.md +79 -61
  43. package/dist/template/.opencode/skill/tool-priority/SKILL.md +31 -22
  44. package/dist/template/.opencode/tool/context7.ts +183 -0
  45. package/dist/template/.opencode/tool/memory-admin.ts +445 -0
  46. package/dist/template/.opencode/tool/swarm.ts +572 -0
  47. package/package.json +1 -1
  48. package/dist/template/.opencode/memory/_templates/spec.md +0 -66
  49. package/dist/template/.opencode/tool/beads-sync.ts +0 -657
  50. package/dist/template/.opencode/tool/context7-query-docs.ts +0 -89
  51. package/dist/template/.opencode/tool/context7-resolve-library-id.ts +0 -113
  52. package/dist/template/.opencode/tool/memory-maintain.ts +0 -167
  53. package/dist/template/.opencode/tool/memory-migrate.ts +0 -319
  54. package/dist/template/.opencode/tool/swarm-delegate.ts +0 -180
  55. package/dist/template/.opencode/tool/swarm-monitor.ts +0 -388
  56. package/dist/template/.opencode/tool/swarm-plan.ts +0 -697
@@ -1,10 +1,10 @@
1
1
  ---
2
2
  name: beads
3
3
  description: >
4
- Multi-agent task coordination using Beads Village plugin tools. Use when work spans multiple
4
+ Multi-agent task coordination using br (beads_rust) CLI. Use when work spans multiple
5
5
  sessions, has dependencies, needs file locking, or requires agent coordination. Covers
6
6
  claim/reserve/done cycle, dependency management, hierarchical decomposition, and session protocols.
7
- version: "1.1.0"
7
+ version: "2.0.0"
8
8
  license: MIT
9
9
  ---
10
10
 
@@ -12,35 +12,49 @@ license: MIT
12
12
 
13
13
  Graph-based task tracker with file locking for multi-agent coordination. Persists across sessions.
14
14
 
15
+ **Note:** `br` (beads_rust) is non-invasive and never executes git commands. After `br sync --flush-only`, you must manually run `git add .beads/ && git commit`.
16
+
15
17
  ## Overview
16
18
 
17
- **Beads plugin tools** (`bd_*`) replace MCP beads-village with native tools for lower token overhead.
19
+ **br (beads_rust) CLI** replaces the old `bd` (beads) CLI with a faster Rust implementation.
18
20
 
19
21
  **Key Distinction**:
20
22
 
21
- - **bd\_\* tools**: Multi-session work, dependencies, file locking, agent coordination
23
+ - **br CLI**: Multi-session work, dependencies, file locking, agent coordination
22
24
  - **TodoWrite**: Single-session tasks, linear execution, conversation-scoped
23
25
 
24
- **When to Use bd\_\* vs TodoWrite**:
26
+ **When to Use br vs TodoWrite**:
25
27
 
26
- - "Will I need this context in 2 weeks?" → **YES** = bd\_\*
27
- - "Does this have blockers/dependencies?" → **YES** = bd\_\*
28
- - "Multiple agents editing same codebase?" → **YES** = bd\_\*
28
+ - "Will I need this context in 2 weeks?" → **YES** = br
29
+ - "Does this have blockers/dependencies?" → **YES** = br
30
+ - "Multiple agents editing same codebase?" → **YES** = br
29
31
  - "Will this be done in this session?" → **YES** = TodoWrite
30
32
 
31
33
  **Decision Rule**: If resuming in 2 weeks would be hard without beads, use beads.
32
34
 
35
+ ## Essential Commands
36
+
37
+ ```bash
38
+ br ready # Show issues ready to work (no blockers)
39
+ br list --status open # All open issues
40
+ br show <id> # Full issue details with dependencies
41
+ br create --title "Fix bug" --type bug --priority 2 --description "Details here"
42
+ br update <id> --status in_progress
43
+ br close <id> --reason "Completed"
44
+ br sync --flush-only # Export to JSONL (then git add/commit manually)
45
+ ```
46
+
33
47
  ## Hierarchical Structure: Epic → Task → Subtask
34
48
 
35
49
  **Beads supports up to 3 levels of hierarchy using hierarchical IDs:**
36
50
 
37
51
  ```
38
- bd-a3f8 (Epic - parent feature)
39
- ├── bd-a3f8.1 (Task - first child)
40
- ├── bd-a3f8.2 (Task - second child)
41
- │ ├── bd-a3f8.2.1 (Subtask - child of .2)
42
- │ └── bd-a3f8.2.2 (Subtask - child of .2)
43
- └── bd-a3f8.3 (Task - third child)
52
+ br-a3f8 (Epic - parent feature)
53
+ ├── br-a3f8.1 (Task - first child)
54
+ ├── br-a3f8.2 (Task - second child)
55
+ │ ├── br-a3f8.2.1 (Subtask - child of .2)
56
+ │ └── br-a3f8.2.2 (Subtask - child of .2)
57
+ └── br-a3f8.3 (Task - third child)
44
58
  ```
45
59
 
46
60
  ### When to Decompose
@@ -56,38 +70,21 @@ bd-a3f8 (Epic - parent feature)
56
70
 
57
71
  ### Creating Hierarchical Beads
58
72
 
59
- ```typescript
60
- // Step 1: Create Epic (parent)
61
- const epic = bd_add({
62
- title: "User Authentication System",
63
- type: "epic",
64
- pri: 1,
65
- desc: "Complete auth with OAuth, sessions, and protected routes",
66
- tags: ["epic", "auth"],
67
- });
68
- // Returns: { id: "bd-a3f8" }
69
-
70
- // Step 2: Create child tasks with `parent` parameter
71
- const task1 = bd_add({
72
- title: "Database schema for auth",
73
- type: "task",
74
- pri: 2,
75
- parent: "bd-a3f8", // Links to epic
76
- desc: "Create user and session tables",
77
- tags: ["backend", "database"],
78
- });
79
- // Returns: { id: "bd-a3f8.1" } ← Hierarchical ID!
80
-
81
- // Step 3: Create dependent tasks with `deps` parameter
82
- const task2 = bd_add({
83
- title: "OAuth integration",
84
- type: "task",
85
- pri: 2,
86
- parent: "bd-a3f8",
87
- deps: ["bd-a3f8.1"], // Blocked until .1 completes
88
- tags: ["backend"],
89
- });
90
- // Returns: { id: "bd-a3f8.2" }
73
+ ```bash
74
+ # Step 1: Create Epic (parent)
75
+ br create --title "User Authentication System" --type epic --priority 1 \
76
+ --description "Complete auth with OAuth, sessions, and protected routes"
77
+ # Returns: br-a3f8
78
+
79
+ # Step 2: Create child tasks with parent
80
+ br create --title "Database schema for auth" --type task --priority 2 \
81
+ --parent br-a3f8 --description "Create user and session tables"
82
+ # Returns: br-a3f8.1 ← Hierarchical ID!
83
+
84
+ # Step 3: Create dependent tasks
85
+ br create --title "OAuth integration" --type task --priority 2 \
86
+ --parent br-a3f8 --blocked-by br-a3f8.1
87
+ # Returns: br-a3f8.2
91
88
  ```
92
89
 
93
90
  ### Dependency Types
@@ -104,12 +101,12 @@ Beads supports four dependency types:
104
101
  ### Parallel Execution with Dependencies
105
102
 
106
103
  ```
107
- bd-a3f8.1 [Database] ──┬──> bd-a3f8.2 [Backend] ──┐
104
+ br-a3f8.1 [Database] ──┬──> br-a3f8.2 [Backend] ──┐
108
105
  (READY) │ │
109
106
  │ ▼
110
- └──> bd-a3f8.3 [Frontend] bd-a3f8.5 [Testing]
107
+ └──> br-a3f8.3 [Frontend] br-a3f8.5 [Testing]
111
108
  │ │ ▲
112
- └──> bd-a3f8.4 [Docs] ──────────┘
109
+ └──> br-a3f8.4 [Docs] ──────────┘
113
110
 
114
111
  Parallel tracks:
115
112
  • Agent 1 (backend): .1 → .2
@@ -117,97 +114,66 @@ Parallel tracks:
117
114
  • Agent 3 (qa): wait for .2 and .3, then .5
118
115
  ```
119
116
 
120
- **Key insight**: After bd-a3f8.1 completes, .2, .3, and .4 all become READY simultaneously. Multiple agents can claim them in parallel.
117
+ **Key insight**: After br-a3f8.1 completes, .2, .3, and .4 all become READY simultaneously. Multiple agents can claim them in parallel.
121
118
 
122
119
  ### Querying Hierarchy
123
120
 
124
- ````typescript
125
- // See all children of an epic
126
- bd_ls({ status: "all", limit: 20 });
127
- // Filter by parent prefix in results
121
+ ```bash
122
+ # See all open issues
123
+ br list --status open
128
124
 
129
- // See ready work (unblocked tasks)
130
- bd_ready();
131
- // Returns tasks where all dependencies are closed
125
+ # See ready work (unblocked tasks)
126
+ br ready
127
+ # Returns tasks where all dependencies are closed
132
128
  ```
133
129
 
134
130
  ## Session Start Protocol
135
131
 
136
132
  **Every session, follow these steps:**
137
133
 
138
- ### Step 1: Initialize
139
-
140
- ```typescript
141
- bd_init({ team: "project", role: "fe" });
142
- ````
143
-
144
- Joins workspace, enables role-based task filtering. Roles: fe, be, mobile, devops, qa.
145
-
146
- ### Step 2: Check Health (Weekly)
147
-
148
- ```typescript
149
- bd_doctor();
150
- ```
151
-
152
- Repairs database issues. Run at start of week or after sync problems.
153
-
154
- ### Step 3: Find Ready Work
134
+ ### Step 1: Find Ready Work
155
135
 
156
- ```typescript
157
- bd_claim();
136
+ ```bash
137
+ br ready
158
138
  ```
159
139
 
160
- Returns highest priority task with no blockers, marks it in_progress.
140
+ Returns highest priority task with no blockers.
161
141
 
162
142
  If no tasks returned, check all open work:
163
143
 
164
- ```typescript
165
- bd_ls({ status: "open" });
166
- ```
167
-
168
- ### Step 4: Get Full Context
169
-
170
- ```typescript
171
- bd_show({ id: "task-abc" });
144
+ ```bash
145
+ br list --status open
172
146
  ```
173
147
 
174
- Shows full description, dependencies, notes, history.
175
-
176
- ### Step 5: Reserve Files Before Editing
148
+ ### Step 2: Claim Task
177
149
 
178
- ```typescript
179
- bd_reserve({ paths: ["src/auth.ts", "src/types.ts"] });
150
+ ```bash
151
+ br update <id> --status in_progress
180
152
  ```
181
153
 
182
- **Critical**: Always reserve before editing. Prevents conflicts with other agents.
183
-
184
- Check existing locks first:
154
+ ### Step 3: Get Full Context
185
155
 
186
- ```typescript
187
- bd_reservations();
156
+ ```bash
157
+ br show <id>
188
158
  ```
189
159
 
190
- ### Step 6: Add Notes as You Work
160
+ Shows full description, dependencies, notes, history.
191
161
 
192
- Use `bd_show` output's notes field. Write notes as if explaining to a future agent with zero conversation context.
162
+ ### Step 4: Do the Work
193
163
 
194
- **Note Format** (best practice):
164
+ Implement the task, adding notes as you learn.
195
165
 
196
- ```
197
- COMPLETED: Specific deliverables (e.g., "implemented JWT refresh endpoint")
198
- IN PROGRESS: Current state + next immediate step
199
- BLOCKERS: What's preventing progress
200
- KEY DECISIONS: Important context or user guidance
201
- ```
166
+ ### Step 5: Complete and Sync
202
167
 
203
- ### Step 7: Complete and Restart
204
-
205
- ```typescript
206
- bd_done({ id: "task-abc", msg: "Implemented auth with JWT tokens" });
207
- // RESTART SESSION - fresh context
168
+ ```bash
169
+ br close <id> --reason "Implemented auth with JWT tokens"
170
+ br sync --flush-only
171
+ git add .beads/
172
+ git commit -m "sync beads"
173
+ # RESTART SESSION - fresh context
208
174
  ```
209
175
 
210
- Always restart session after `bd_done()`. One task per session.
176
+ Always restart session after closing a task. One task per session.
211
177
 
212
178
  ## Task Creation
213
179
 
@@ -222,181 +188,54 @@ Create tasks when:
222
188
 
223
189
  ### Basic Task Creation
224
190
 
225
- ```typescript
226
- bd_add({
227
- title: "Fix authentication bug",
228
- pri: 0, // 0=critical, 1=high, 2=normal, 3=low, 4=backlog
229
- type: "bug", // task, bug, feature, epic, chore
230
- });
191
+ ```bash
192
+ br create --title "Fix authentication bug" --priority 0 --type bug
193
+ # Priority: 0=critical, 1=high, 2=normal, 3=low, 4=backlog
194
+ # Types: task, bug, feature, epic, chore
231
195
  ```
232
196
 
233
- ### With Description and Tags
197
+ ### With Description
234
198
 
235
- ```typescript
236
- bd_add({
237
- title: "Implement OAuth",
238
- desc: "Add OAuth2 support for Google, GitHub. Use passport.js.",
239
- pri: 1,
240
- type: "feature",
241
- tags: ["be", "security"], // Role tags for assignment
242
- });
199
+ ```bash
200
+ br create --title "Implement OAuth" --type feature --priority 1 \
201
+ --description "Add OAuth2 support for Google, GitHub. Use passport.js."
243
202
  ```
244
203
 
245
204
  ### Epic with Children
246
205
 
247
- ```typescript
248
- // Create parent epic
249
- bd_add({ title: "Epic: OAuth Implementation", pri: 0, type: "epic" });
250
- // Returns: { id: "oauth-abc" }
251
-
252
- // Create child tasks with parent
253
- bd_add({ title: "Research OAuth providers", pri: 1, parent: "oauth-abc" });
254
- bd_add({ title: "Implement auth endpoints", pri: 1, parent: "oauth-abc" });
255
- bd_add({ title: "Add frontend login UI", pri: 2, parent: "oauth-abc" });
256
- ```
257
-
258
- ## File Reservation
259
-
260
- ### Reserve Before Edit
261
-
262
- ```typescript
263
- bd_reserve({
264
- paths: ["src/auth.ts", "src/middleware/jwt.ts"],
265
- reason: "Implementing auth feature",
266
- ttl: 600, // seconds until expiry (default)
267
- });
268
- ```
269
-
270
- **Returns**:
271
-
272
- ```json
273
- {
274
- "granted": ["src/auth.ts"],
275
- "conflicts": [{ "path": "src/middleware/jwt.ts", "holder": "agent-xyz" }]
276
- }
277
- ```
278
-
279
- ### Check Active Locks
280
-
281
- ```typescript
282
- bd_reservations();
283
- ```
284
-
285
- Shows all locks across workspace with agent IDs and expiry times.
286
-
287
- ### Handle Conflicts
288
-
289
- If file reserved by another agent:
290
-
291
- 1. **Can wait** → Work on different files first
292
- 2. **Urgent** → Message the agent:
293
-
294
- ```typescript
295
- bd_msg({
296
- subj: "Need src/middleware/jwt.ts",
297
- body: "Working on auth, can you release?",
298
- to: "agent-xyz",
299
- });
300
- ```
301
-
302
- 3. **Alternative** → Refactor to avoid that file
303
-
304
- ### Release Early
305
-
306
- ```typescript
307
- bd_release({ paths: ["src/auth.ts"] }); // Specific files
308
- bd_release(); // All your reservations
309
- ```
310
-
311
- Note: `bd_done()` auto-releases all your reservations.
312
-
313
- ## Messaging
314
-
315
- ### Send Message
316
-
317
- ```typescript
318
- bd_msg({
319
- subj: "API Ready",
320
- body: "Auth endpoints deployed to staging",
321
- to: "all", // or specific agent ID
322
- importance: "high", // low, normal, high
323
- });
324
- ```
325
-
326
- ### Team Broadcast
327
-
328
- ```typescript
329
- bd_msg({
330
- subj: "Breaking Change",
331
- body: "User schema updated, run migrations",
332
- to: "all",
333
- global: true, // Cross-workspace
334
- });
335
- ```
336
-
337
- ### Check Inbox
338
-
339
- ```typescript
340
- bd_inbox({ unread: true, n: 10 });
341
- ```
342
-
343
- ### Acknowledge Messages
344
-
345
- ```typescript
346
- bd_ack({ ids: ["msg-abc", "msg-def"] }); // Mark as read
347
- ```
348
-
349
- ## Agent Coordination
350
-
351
- ### Who's Working on What
352
-
353
- ```typescript
354
- bd_whois(); // All agents with their files and tasks
355
- bd_whois({ agent: "build-abc" }); // Specific agent lookup
356
- ```
357
-
358
- ## Status and Analysis
359
-
360
- ### Workspace Overview
206
+ ```bash
207
+ # Create parent epic
208
+ br create --title "Epic: OAuth Implementation" --priority 0 --type epic
209
+ # Returns: oauth-abc
361
210
 
362
- ```typescript
363
- bd_status({ include_agents: true });
211
+ # Create child tasks with parent
212
+ br create --title "Research OAuth providers" --priority 1 --parent oauth-abc
213
+ br create --title "Implement auth endpoints" --priority 1 --parent oauth-abc
214
+ br create --title "Add frontend login UI" --priority 2 --parent oauth-abc
364
215
  ```
365
216
 
366
- Shows ready tasks, in-progress count, active locks, agent info.
367
-
368
- ### Find Blocked Work
369
-
370
- ```typescript
371
- bd_blocked();
372
- ```
373
-
374
- Returns tasks that have unresolved dependencies.
375
-
376
- ### View Dependencies
377
-
378
- ```typescript
379
- bd_dep({ action: "tree", child: "<task-id>", type: "blocks" });
380
- ```
217
+ ## Git Sync
381
218
 
382
- Shows dependency tree for a specific task.
219
+ ### Manual Sync (Non-Invasive)
383
220
 
384
- ## Git Sync
221
+ **Important:** `br` never executes git commands. You must manually commit changes.
385
222
 
386
- ### Manual Sync
223
+ ```bash
224
+ # Export changes to JSONL
225
+ br sync --flush-only
387
226
 
388
- ```typescript
389
- bd_sync();
227
+ # Then manually commit
228
+ git add .beads/
229
+ git commit -m "sync beads"
230
+ git push
390
231
  ```
391
232
 
392
- Commits `.beads/` changes, pulls from remote, pushes local commits.
393
-
394
233
  **Use when**: End of session, before handoff, after major progress.
395
234
 
396
235
  ### Cleanup Old Issues
397
236
 
398
- ```typescript
399
- bd_cleanup({ days: 7 });
237
+ ```bash
238
+ br cleanup --days 7
400
239
  ```
401
240
 
402
241
  Removes closed issues older than N days. Run weekly.
@@ -405,96 +244,60 @@ Removes closed issues older than N days. Run weekly.
405
244
 
406
245
  ### Common Issues
407
246
 
408
- **"Call bd_init() first"**
409
-
410
- - Always call `bd_init()` at session start
411
-
412
- **File conflicts**
413
-
414
- - Check `bd_reservations()` before editing
415
- - Message holder or work on other files
416
-
417
247
  **No ready tasks**
418
248
 
419
- - Run `bd_ls({ status: "open" })` to see all tasks
420
- - Some may be blocked - check dependencies
249
+ - Run `br list --status open` to see all tasks
250
+ - Some may be blocked - check dependencies with `br show <id>`
421
251
 
422
252
  **Sync failures**
423
253
 
424
- - Run `bd_doctor()` to repair database
254
+ - Run `br doctor` to repair database
425
255
  - Check git remote access
426
256
 
427
257
  ## Examples
428
258
 
429
259
  ### Example 1: Standard Session
430
260
 
431
- ```typescript
432
- // 1. Join and claim
433
- bd_init({ team: "project", role: "fe" });
434
- const task = bd_claim();
435
- // { id: "auth-123", t: "Implement login form", p: 1 }
436
-
437
- // 2. Get context
438
- bd_show({ id: "auth-123" });
439
-
440
- // 3. Reserve files
441
- bd_reserve({ paths: ["src/components/Login.tsx", "src/hooks/useAuth.ts"] });
442
-
443
- // 4. Do the work...
444
- // [implementation]
445
-
446
- // 5. Complete
447
- bd_done({
448
- id: "auth-123",
449
- msg: "Login form with validation, hooks for auth state",
450
- });
451
- // RESTART SESSION
261
+ ```bash
262
+ # 1. Find and claim work
263
+ br ready
264
+ br update auth-123 --status in_progress
265
+
266
+ # 2. Get context
267
+ br show auth-123
268
+
269
+ # 3. Do the work...
270
+ # [implementation]
271
+
272
+ # 4. Complete and sync
273
+ br close auth-123 --reason "Login form with validation, hooks for auth state"
274
+ br sync --flush-only
275
+ git add .beads/
276
+ git commit -m "close auth-123"
277
+ # RESTART SESSION
452
278
  ```
453
279
 
454
280
  ### Example 2: Discovered Work
455
281
 
456
- ```typescript
457
- // Working on task, found more work
458
- bd_add({
459
- title: "Fix edge case in validation",
460
- desc: "Empty strings bypass email check - discovered while implementing login",
461
- pri: 1,
462
- type: "bug",
463
- });
464
- // Continue current task, new task tracked for later
282
+ ```bash
283
+ # Working on task, found more work
284
+ br create --title "Fix edge case in validation" --type bug --priority 1 \
285
+ --description "Empty strings bypass email check - discovered while implementing login"
286
+ # Continue current task, new task tracked for later
465
287
  ```
466
288
 
467
- ### Example 3: Blocked Work
289
+ ### Example 3: Creating Dependencies
468
290
 
469
- ```typescript
470
- // API is down, can't continue
471
- bd_release(); // Free files for others
472
-
473
- // Message team
474
- bd_msg({
475
- subj: "Blocked: API 503",
476
- body: "Auth endpoint returning 503, switching tasks",
477
- to: "all",
478
- });
479
-
480
- // Claim different task
481
- const newTask = bd_claim();
482
- ```
291
+ ```bash
292
+ # Create tasks with dependencies
293
+ br create --title "Setup database" --type task --priority 1
294
+ # Returns: setup-db
483
295
 
484
- ### Example 4: Multi-Agent Coordination
296
+ br create --title "Implement API" --type task --priority 2 --blocked-by setup-db
297
+ # Returns: impl-api (blocked until setup-db closes)
485
298
 
486
- ```typescript
487
- // Agent A (backend)
488
- bd_init({ team: "project", role: "be" });
489
- bd_reserve({ paths: ["src/api/auth.ts"] });
490
- // ... implements API ...
491
- bd_msg({ subj: "Auth API Ready", to: "all" });
492
- bd_done({ id: "api-task", msg: "Auth endpoints complete" });
493
-
494
- // Agent B (frontend) - sees message
495
- bd_inbox({ unread: true });
496
- // { msgs: [{ subj: "Auth API Ready", from: "agent-a" }] }
497
- bd_claim(); // Gets frontend task that was waiting on API
299
+ br create --title "Add tests" --type task --priority 2 --blocked-by impl-api
300
+ # Returns: add-tests
498
301
  ```
499
302
 
500
303
  ## Multi-Agent Coordination (Swarm Mode)
@@ -505,12 +308,12 @@ For parallel execution with multiple subagents, use the **beads-bridge** skill:
505
308
  skill({ name: "beads-bridge" });
506
309
  ```
507
310
 
508
- **beads-bridge** provides:
311
+ **beads-bridge** provides (via unified `swarm` tool):
509
312
 
510
- - `beads-sync` - Sync Beads tasks to OpenCode todos for subagent visibility
511
- - `swarm-monitor` - Real-time progress tracking and visualization
512
- - `swarm-plan` - Task classification and dependency analysis
513
- - `swarm-delegate` - Create delegation packets for workers
313
+ - `swarm({ operation: "sync" })` - Sync Beads tasks to OpenCode todos for subagent visibility
314
+ - `swarm({ operation: "monitor" })` - Real-time progress tracking and visualization
315
+ - `swarm({ operation: "plan" })` - Task classification and dependency analysis
316
+ - `swarm({ operation: "delegate" })` - Create delegation packets for workers
514
317
 
515
318
  **When to use beads vs beads-bridge:**
516
319
 
@@ -518,36 +321,35 @@ skill({ name: "beads-bridge" });
518
321
  | ------------------------------ | -------------------------------- |
519
322
  | Single agent, linear work | `beads` skill only |
520
323
  | Multiple agents in parallel | `beads-bridge` + `beads` |
521
- | Need subagents to see tasks | `beads-bridge` (beads-sync push) |
522
- | Track worker progress visually | `beads-bridge` (swarm-monitor) |
324
+ | Need subagents to see tasks | `beads-bridge` (swarm sync push) |
325
+ | Track worker progress visually | `beads-bridge` (swarm monitor) |
523
326
 
524
327
  **Example swarm workflow:**
525
328
 
526
329
  ```typescript
527
330
  // 1. Push beads to OpenCode todos (subagents can see via todoread)
528
- beads_sync({ operation: "push" });
331
+ swarm({ operation: "sync", action: "push" });
529
332
 
530
333
  // 2. Spawn workers in parallel using Task tool
531
334
  Task({ subagent_type: "general", description: "Worker 1", prompt: "..." });
532
335
  Task({ subagent_type: "general", description: "Worker 2", prompt: "..." });
533
336
 
534
337
  // 3. Monitor progress
535
- swarm_monitor({ operation: "render_block", team_name: "my-swarm" });
338
+ swarm({ operation: "monitor", action: "render_block", team_name: "my-swarm" });
536
339
 
537
340
  // 4. Pull completed work back to beads
538
- beads_sync({ operation: "pull" });
341
+ swarm({ operation: "sync", action: "pull" });
539
342
  ```
540
343
 
541
344
  ## Rules
542
345
 
543
- 1. **Always `bd_init()` first** - Required before any other bd\_\* tool
544
- 2. **Reserve before edit** - Prevents conflicts with other agents
545
- 3. **One task per session** - Restart after `bd_done()`
546
- 4. **Write notes for future agents** - Assume zero conversation context
547
- 5. **Use `bd_msg(to="all")`** - For team-wide announcements
548
- 6. **Sync regularly** - `bd_sync()` at session end
346
+ 1. **Check `br ready` first** - Find unblocked work before starting
347
+ 2. **Claim before editing** - `br update <id> --status in_progress`
348
+ 3. **One task per session** - Restart after `br close`
349
+ 4. **Always sync and commit** - `br sync --flush-only` then `git add .beads/ && git commit`
350
+ 5. **Write notes for future agents** - Assume zero conversation context
549
351
 
550
- ## Best Practices (from Steve Yegge)
352
+ ## Best Practices
551
353
 
552
354
  ### Daily/Weekly Maintenance
553
355
 
@@ -555,58 +357,40 @@ beads_sync({ operation: "pull" });
555
357
  | ------------ | -------------- | --------------------- | ---------------------------------------------- |
556
358
  | Health check | Weekly | `br doctor` | Repairs database issues, detects orphaned work |
557
359
  | Cleanup | Every few days | `br cleanup --days 7` | Keep DB under 200-500 issues for performance |
558
- | Upgrade | Weekly | `br upgrade` | Get latest features and fixes |
559
- | Git hooks | Once per repo | `br hooks install` | Auto-sync on commit/merge/checkout |
560
360
 
561
361
  ### Key Principles
562
362
 
563
363
  1. **Plan outside Beads first** - Use planning tools, then import tasks to beads
564
364
  2. **One task per session, then restart** - Fresh context prevents confusion
565
365
  3. **File lots of issues** - Any work >2 minutes should be tracked
566
- 4. **Use short prefixes** - `br-`, `vc-`, `wy-` etc.
567
- 5. **"Land the plane" = PUSH** - `br sync --flush-only` means git push, not "ready when you are"
568
- 6. **Include issue ID in commits** - `git commit -m "Fix bug (bd-abc)"`
366
+ 4. **"Land the plane" = PUSH** - `br sync --flush-only` + git commit/push, not "ready when you are"
367
+ 5. **Include issue ID in commits** - `git commit -m "Fix bug (br-abc)"`
569
368
 
570
369
  ### Database Health
571
370
 
572
371
  ```bash
573
372
  # Check database size
574
- br list --status=all --json | wc -l
373
+ br list --status all --json | wc -l
575
374
 
576
375
  # Target: under 200-500 issues
577
376
  # If over, run cleanup more aggressively:
578
- bd cleanup --days 3
579
- ```
580
-
581
- ### Git Hooks (Essential)
582
-
583
- ```bash
584
- bd hooks install
377
+ br cleanup --days 3
585
378
  ```
586
379
 
587
- Installs hooks for:
588
-
589
- - **pre-commit**: Sync before commit
590
- - **post-merge**: Import changes after merge
591
- - **pre-push**: Ensure sync before push
592
- - **post-checkout**: Refresh after branch switch
593
-
594
380
  ## Quick Reference
595
381
 
596
382
  ```
597
383
  SESSION START:
598
- bd_init()bd_claim() bd_show()bd_reserve()
384
+ br ready br update <id> --status in_progress br show <id>
599
385
 
600
386
  DURING WORK:
601
- bd_reserve() additional files
602
- bd_add() for discovered work (>2min)
603
- bd_msg() to coordinate
387
+ br create for discovered work (>2min)
388
+ br show <id> for context
604
389
 
605
390
  SESSION END:
606
- bd_done() → RESTART SESSION
391
+ br close <id> --reason "..." br sync --flush-only → git add .beads/ && git commit → RESTART SESSION
607
392
 
608
393
  MAINTENANCE:
609
- bd_doctor() - weekly health check
610
- bd_cleanup() - remove old issues
611
- bd_sync() - git sync
394
+ br doctor - weekly health check
395
+ br cleanup --days 7 - remove old issues
612
396
  ```