opencodekit 0.16.4 → 0.16.5
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/dist/index.js +1 -1
- package/dist/template/.opencode/skill/beads/SKILL.md +154 -370
- package/dist/template/.opencode/skill/beads/references/BOUNDARIES.md +23 -22
- package/dist/template/.opencode/skill/beads/references/DEPENDENCIES.md +23 -29
- package/dist/template/.opencode/skill/beads/references/RESUMABILITY.md +5 -8
- package/dist/template/.opencode/skill/beads/references/WORKFLOWS.md +43 -39
- package/dist/template/.opencode/skill/beads-bridge/SKILL.md +16 -6
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -759,7 +759,7 @@ var cac = (name = "") => new CAC(name);
|
|
|
759
759
|
// package.json
|
|
760
760
|
var package_default = {
|
|
761
761
|
name: "opencodekit",
|
|
762
|
-
version: "0.16.
|
|
762
|
+
version: "0.16.5",
|
|
763
763
|
description: "CLI tool for bootstrapping and managing OpenCodeKit projects",
|
|
764
764
|
keywords: ["agents", "cli", "mcp", "opencode", "opencodekit", "template"],
|
|
765
765
|
license: "MIT",
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: beads
|
|
3
3
|
description: >
|
|
4
|
-
Multi-agent task coordination using
|
|
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: "
|
|
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
|
-
**
|
|
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
|
-
- **
|
|
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
|
|
26
|
+
**When to Use br vs TodoWrite**:
|
|
25
27
|
|
|
26
|
-
- "Will I need this context in 2 weeks?" → **YES** =
|
|
27
|
-
- "Does this have blockers/dependencies?" → **YES** =
|
|
28
|
-
- "Multiple agents editing same codebase?" → **YES** =
|
|
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
|
-
|
|
39
|
-
├──
|
|
40
|
-
├──
|
|
41
|
-
│ ├──
|
|
42
|
-
│ └──
|
|
43
|
-
└──
|
|
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
|
-
```
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
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
|
-
|
|
104
|
+
br-a3f8.1 [Database] ──┬──> br-a3f8.2 [Backend] ──┐
|
|
108
105
|
(READY) │ │
|
|
109
106
|
│ ▼
|
|
110
|
-
└──>
|
|
107
|
+
└──> br-a3f8.3 [Frontend] br-a3f8.5 [Testing]
|
|
111
108
|
│ │ ▲
|
|
112
|
-
└──>
|
|
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
|
|
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
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
// Filter by parent prefix in results
|
|
121
|
+
```bash
|
|
122
|
+
# See all open issues
|
|
123
|
+
br list --status open
|
|
128
124
|
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
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:
|
|
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
|
-
```
|
|
157
|
-
|
|
136
|
+
```bash
|
|
137
|
+
br ready
|
|
158
138
|
```
|
|
159
139
|
|
|
160
|
-
Returns highest priority task with no blockers
|
|
140
|
+
Returns highest priority task with no blockers.
|
|
161
141
|
|
|
162
142
|
If no tasks returned, check all open work:
|
|
163
143
|
|
|
164
|
-
```
|
|
165
|
-
|
|
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
|
-
|
|
175
|
-
|
|
176
|
-
### Step 5: Reserve Files Before Editing
|
|
148
|
+
### Step 2: Claim Task
|
|
177
149
|
|
|
178
|
-
```
|
|
179
|
-
|
|
150
|
+
```bash
|
|
151
|
+
br update <id> --status in_progress
|
|
180
152
|
```
|
|
181
153
|
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
Check existing locks first:
|
|
154
|
+
### Step 3: Get Full Context
|
|
185
155
|
|
|
186
|
-
```
|
|
187
|
-
|
|
156
|
+
```bash
|
|
157
|
+
br show <id>
|
|
188
158
|
```
|
|
189
159
|
|
|
190
|
-
|
|
160
|
+
Shows full description, dependencies, notes, history.
|
|
191
161
|
|
|
192
|
-
|
|
162
|
+
### Step 4: Do the Work
|
|
193
163
|
|
|
194
|
-
|
|
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
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
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
|
|
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
|
-
```
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
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
|
|
197
|
+
### With Description
|
|
234
198
|
|
|
235
|
-
```
|
|
236
|
-
|
|
237
|
-
|
|
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
|
-
```
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
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
|
-
|
|
363
|
-
|
|
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
|
-
|
|
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
|
-
|
|
219
|
+
### Manual Sync (Non-Invasive)
|
|
383
220
|
|
|
384
|
-
|
|
221
|
+
**Important:** `br` never executes git commands. You must manually commit changes.
|
|
385
222
|
|
|
386
|
-
|
|
223
|
+
```bash
|
|
224
|
+
# Export changes to JSONL
|
|
225
|
+
br sync --flush-only
|
|
387
226
|
|
|
388
|
-
|
|
389
|
-
|
|
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
|
-
```
|
|
399
|
-
|
|
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 `
|
|
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 `
|
|
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
|
-
```
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
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
|
-
```
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
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:
|
|
289
|
+
### Example 3: Creating Dependencies
|
|
468
290
|
|
|
469
|
-
```
|
|
470
|
-
|
|
471
|
-
|
|
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
|
-
|
|
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
|
-
|
|
487
|
-
|
|
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)
|
|
@@ -540,14 +343,13 @@ beads_sync({ operation: "pull" });
|
|
|
540
343
|
|
|
541
344
|
## Rules
|
|
542
345
|
|
|
543
|
-
1. **
|
|
544
|
-
2. **
|
|
545
|
-
3. **One task per session** - Restart after `
|
|
546
|
-
4. **
|
|
547
|
-
5. **
|
|
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
|
|
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. **
|
|
567
|
-
5. **
|
|
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
|
|
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
|
-
|
|
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
|
-
|
|
384
|
+
br ready → br update <id> --status in_progress → br show <id>
|
|
599
385
|
|
|
600
386
|
DURING WORK:
|
|
601
|
-
|
|
602
|
-
|
|
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
|
-
|
|
391
|
+
br close <id> --reason "..." → br sync --flush-only → git add .beads/ && git commit → RESTART SESSION
|
|
607
392
|
|
|
608
393
|
MAINTENANCE:
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
bd_sync() - git sync
|
|
394
|
+
br doctor - weekly health check
|
|
395
|
+
br cleanup --days 7 - remove old issues
|
|
612
396
|
```
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Boundaries: When to Use
|
|
1
|
+
# Boundaries: When to Use br vs TodoWrite
|
|
2
2
|
|
|
3
3
|
Decision criteria for choosing between beads tools and TodoWrite.
|
|
4
4
|
|
|
@@ -6,12 +6,12 @@ Decision criteria for choosing between beads tools and TodoWrite.
|
|
|
6
6
|
|
|
7
7
|
**"Could I resume this work after 2 weeks away?"**
|
|
8
8
|
|
|
9
|
-
- If beads would help you resume → **use
|
|
9
|
+
- If beads would help you resume → **use br**
|
|
10
10
|
- If markdown skim would suffice → **TodoWrite is fine**
|
|
11
11
|
|
|
12
12
|
## Decision Matrix
|
|
13
13
|
|
|
14
|
-
### Use
|
|
14
|
+
### Use br for:
|
|
15
15
|
|
|
16
16
|
**Multi-Session Work**
|
|
17
17
|
|
|
@@ -78,7 +78,7 @@ Decision criteria for choosing between beads tools and TodoWrite.
|
|
|
78
78
|
|
|
79
79
|
## Detailed Comparison
|
|
80
80
|
|
|
81
|
-
| Aspect |
|
|
81
|
+
| Aspect | br CLI | TodoWrite |
|
|
82
82
|
| ---------------- | --------------------------------- | ---------------------- |
|
|
83
83
|
| **Persistence** | Git-backed, survives compaction | Session-only |
|
|
84
84
|
| **Dependencies** | Graph-based, auto ready detection | Manual |
|
|
@@ -89,10 +89,10 @@ Decision criteria for choosing between beads tools and TodoWrite.
|
|
|
89
89
|
|
|
90
90
|
## Integration Patterns
|
|
91
91
|
|
|
92
|
-
### Pattern 1:
|
|
92
|
+
### Pattern 1: br as Strategic, TodoWrite as Tactical
|
|
93
93
|
|
|
94
94
|
```
|
|
95
|
-
|
|
95
|
+
br task: "Implement user authentication" (epic)
|
|
96
96
|
├─ Child: "Create login endpoint"
|
|
97
97
|
├─ Child: "Add JWT validation" ← Currently working
|
|
98
98
|
└─ Child: "Implement logout"
|
|
@@ -108,16 +108,17 @@ TodoWrite (for JWT validation):
|
|
|
108
108
|
|
|
109
109
|
```
|
|
110
110
|
Session start:
|
|
111
|
-
-
|
|
111
|
+
- br ready gets "Add JWT validation"
|
|
112
|
+
- br update <id> --status in_progress
|
|
112
113
|
- Extract acceptance criteria into TodoWrite
|
|
113
114
|
- Work through TodoWrite items
|
|
114
|
-
- Update
|
|
115
|
-
-
|
|
115
|
+
- Update br notes as you learn
|
|
116
|
+
- br close <id> when TodoWrite complete
|
|
116
117
|
```
|
|
117
118
|
|
|
118
119
|
### Pattern 3: Transition Mid-Session
|
|
119
120
|
|
|
120
|
-
**From TodoWrite to
|
|
121
|
+
**From TodoWrite to br:**
|
|
121
122
|
|
|
122
123
|
Trigger signals:
|
|
123
124
|
|
|
@@ -129,11 +130,11 @@ Trigger signals:
|
|
|
129
130
|
**How to transition:**
|
|
130
131
|
|
|
131
132
|
```
|
|
132
|
-
1.
|
|
133
|
+
1. br create with current TodoWrite content
|
|
133
134
|
2. Note: "Discovered multi-session work"
|
|
134
135
|
3. Add dependencies as discovered
|
|
135
136
|
4. Keep TodoWrite for current session
|
|
136
|
-
5. Update
|
|
137
|
+
5. Update br notes before session ends
|
|
137
138
|
```
|
|
138
139
|
|
|
139
140
|
## Common Mistakes
|
|
@@ -147,9 +148,9 @@ Trigger signals:
|
|
|
147
148
|
- Lose design decisions
|
|
148
149
|
- Duplicate work
|
|
149
150
|
|
|
150
|
-
**Solution:** Use
|
|
151
|
+
**Solution:** Use br instead.
|
|
151
152
|
|
|
152
|
-
### Mistake 2:
|
|
153
|
+
### Mistake 2: br for Simple Linear Tasks
|
|
153
154
|
|
|
154
155
|
**What happens:**
|
|
155
156
|
|
|
@@ -168,9 +169,9 @@ Trigger signals:
|
|
|
168
169
|
- Keep using TodoWrite despite poor fit
|
|
169
170
|
- Lose context when session ends
|
|
170
171
|
|
|
171
|
-
**Solution:** Transition to
|
|
172
|
+
**Solution:** Transition to br when complexity appears.
|
|
172
173
|
|
|
173
|
-
### Mistake 4: Creating Too Many
|
|
174
|
+
### Mistake 4: Creating Too Many br Issues
|
|
174
175
|
|
|
175
176
|
**What happens:**
|
|
176
177
|
|
|
@@ -178,7 +179,7 @@ Trigger signals:
|
|
|
178
179
|
- Database cluttered
|
|
179
180
|
- Hard to find meaningful work
|
|
180
181
|
|
|
181
|
-
**Solution:** Use 2-week test. Would
|
|
182
|
+
**Solution:** Use 2-week test. Would br help after 2 weeks? If no, skip.
|
|
182
183
|
|
|
183
184
|
## The Transition Point
|
|
184
185
|
|
|
@@ -191,28 +192,28 @@ Trigger signals:
|
|
|
191
192
|
- "User might not continue today"
|
|
192
193
|
- "Found three related issues"
|
|
193
194
|
|
|
194
|
-
When you notice these: Create
|
|
195
|
+
When you notice these: Create br issue, preserve context.
|
|
195
196
|
|
|
196
197
|
## Summary Heuristics
|
|
197
198
|
|
|
198
199
|
**Time horizon:**
|
|
199
200
|
|
|
200
201
|
- Same session → TodoWrite
|
|
201
|
-
- Multiple sessions →
|
|
202
|
+
- Multiple sessions → br
|
|
202
203
|
|
|
203
204
|
**Dependency structure:**
|
|
204
205
|
|
|
205
206
|
- Linear steps → TodoWrite
|
|
206
|
-
- Blockers/prerequisites →
|
|
207
|
+
- Blockers/prerequisites → br
|
|
207
208
|
|
|
208
209
|
**Scope clarity:**
|
|
209
210
|
|
|
210
211
|
- Well-defined → TodoWrite
|
|
211
|
-
- Exploratory →
|
|
212
|
+
- Exploratory → br
|
|
212
213
|
|
|
213
214
|
**Multi-agent:**
|
|
214
215
|
|
|
215
216
|
- Single agent → Either
|
|
216
|
-
- Multiple agents →
|
|
217
|
+
- Multiple agents → br
|
|
217
218
|
|
|
218
219
|
**When in doubt:** Use the 2-week test.
|
|
@@ -4,15 +4,13 @@ Beads supports task dependencies for ordering work.
|
|
|
4
4
|
|
|
5
5
|
## Overview
|
|
6
6
|
|
|
7
|
-
Dependencies affect what work is "ready" - tasks with unmet dependencies won't appear in `
|
|
7
|
+
Dependencies affect what work is "ready" - tasks with unmet dependencies won't appear in `br ready` results.
|
|
8
8
|
|
|
9
9
|
## Creating Dependencies
|
|
10
10
|
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
deps: ["task:setup-db"], // depends on setup-db task
|
|
15
|
-
});
|
|
11
|
+
```bash
|
|
12
|
+
br create --title "Implement API endpoint" --blocked-by setup-db
|
|
13
|
+
# This task depends on setup-db completing first
|
|
16
14
|
```
|
|
17
15
|
|
|
18
16
|
## Dependency Patterns
|
|
@@ -23,7 +21,7 @@ bd_add({
|
|
|
23
21
|
setup-db → implement-api → add-tests → deploy
|
|
24
22
|
```
|
|
25
23
|
|
|
26
|
-
Each task depends on the previous. `
|
|
24
|
+
Each task depends on the previous. `br ready` shows only the current step.
|
|
27
25
|
|
|
28
26
|
### Parallel Then Merge
|
|
29
27
|
|
|
@@ -47,19 +45,15 @@ One foundational task blocks multiple features.
|
|
|
47
45
|
|
|
48
46
|
## Epic with Children
|
|
49
47
|
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
parent: "oauth-abc",
|
|
60
|
-
deps: ["task:credentials"],
|
|
61
|
-
});
|
|
62
|
-
bd_add({ title: "Add UI", parent: "oauth-abc", deps: ["task:flow"] });
|
|
48
|
+
```bash
|
|
49
|
+
# Create epic
|
|
50
|
+
br create --title "OAuth Integration" --type epic --priority 1
|
|
51
|
+
# Returns: oauth-abc
|
|
52
|
+
|
|
53
|
+
# Create children with parent
|
|
54
|
+
br create --title "Setup credentials" --parent oauth-abc
|
|
55
|
+
br create --title "Implement flow" --parent oauth-abc --blocked-by credentials
|
|
56
|
+
br create --title "Add UI" --parent oauth-abc --blocked-by flow
|
|
63
57
|
```
|
|
64
58
|
|
|
65
59
|
## Automatic Unblocking
|
|
@@ -67,9 +61,9 @@ bd_add({ title: "Add UI", parent: "oauth-abc", deps: ["task:flow"] });
|
|
|
67
61
|
When you close a task that's blocking others:
|
|
68
62
|
|
|
69
63
|
```
|
|
70
|
-
1.
|
|
64
|
+
1. br close setup-db --reason "Schema created"
|
|
71
65
|
2. Beads automatically updates: implement-api is now ready
|
|
72
|
-
3.
|
|
66
|
+
3. br ready returns implement-api
|
|
73
67
|
4. No manual unblocking needed
|
|
74
68
|
```
|
|
75
69
|
|
|
@@ -91,8 +85,8 @@ docs depends on feature // "prefer to update docs after"
|
|
|
91
85
|
|
|
92
86
|
**Wrong:**
|
|
93
87
|
|
|
94
|
-
```
|
|
95
|
-
|
|
88
|
+
```bash
|
|
89
|
+
br create --title "API" --blocked-by tests # API depends on tests?
|
|
96
90
|
```
|
|
97
91
|
|
|
98
92
|
**Problem:** Usually tests depend on API, not the other way.
|
|
@@ -121,10 +115,10 @@ bd_add({ title: "API", deps: ["task:tests"] }) // API depends on tests?
|
|
|
121
115
|
|
|
122
116
|
## Viewing Dependencies
|
|
123
117
|
|
|
124
|
-
```
|
|
125
|
-
|
|
126
|
-
|
|
118
|
+
```bash
|
|
119
|
+
br show <id>
|
|
120
|
+
# Shows what blocks this task and what this task blocks
|
|
127
121
|
|
|
128
|
-
|
|
129
|
-
|
|
122
|
+
br list --status open
|
|
123
|
+
# Shows all open tasks, check dependencies in details
|
|
130
124
|
```
|
|
@@ -52,28 +52,26 @@ DESIRED OUTPUT:
|
|
|
52
52
|
Actual structure, not just "return markdown"
|
|
53
53
|
```
|
|
54
54
|
|
|
55
|
-
|
|
55
|
+
````
|
|
56
56
|
|
|
57
57
|
## Example: Before vs After
|
|
58
58
|
|
|
59
59
|
### Not Resumable
|
|
60
60
|
|
|
61
61
|
```
|
|
62
|
-
|
|
63
62
|
Title: Add dynamic capabilities
|
|
64
63
|
Notes: Working on it. Made some progress.
|
|
65
|
-
|
|
66
|
-
```
|
|
64
|
+
````
|
|
67
65
|
|
|
68
66
|
**Problem:** Future agent doesn't know:
|
|
67
|
+
|
|
69
68
|
- Which API endpoints to call
|
|
70
69
|
- What responses look like
|
|
71
70
|
- What format to return
|
|
72
71
|
|
|
73
72
|
### Resumable
|
|
74
73
|
|
|
75
|
-
|
|
76
|
-
|
|
74
|
+
````
|
|
77
75
|
Title: Add dynamic capabilities resources
|
|
78
76
|
|
|
79
77
|
Notes:
|
|
@@ -82,12 +80,11 @@ IN PROGRESS: Formatting response as markdown.
|
|
|
82
80
|
NEXT: Add caching for API responses.
|
|
83
81
|
|
|
84
82
|
WORKING CODE:
|
|
85
|
-
|
|
86
83
|
```python
|
|
87
84
|
service = build('drive', 'v3', credentials=creds)
|
|
88
85
|
about = service.about().get(fields='importFormats').execute()
|
|
89
86
|
# Returns dict with 49 entries
|
|
90
|
-
|
|
87
|
+
````
|
|
91
88
|
|
|
92
89
|
DESIRED OUTPUT:
|
|
93
90
|
|
|
@@ -2,17 +2,19 @@
|
|
|
2
2
|
|
|
3
3
|
Detailed step-by-step workflows for common beads usage patterns.
|
|
4
4
|
|
|
5
|
+
**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`.
|
|
6
|
+
|
|
5
7
|
## Session Start Workflow
|
|
6
8
|
|
|
7
9
|
**Every session when beads is available:**
|
|
8
10
|
|
|
9
11
|
```
|
|
10
12
|
Session Start:
|
|
11
|
-
- [ ]
|
|
12
|
-
- [ ]
|
|
13
|
-
- [ ] If none ready,
|
|
14
|
-
- [ ]
|
|
15
|
-
- [ ]
|
|
13
|
+
- [ ] br ready to find unblocked work
|
|
14
|
+
- [ ] br update <id> --status in_progress to claim
|
|
15
|
+
- [ ] If none ready, br list --status open
|
|
16
|
+
- [ ] br show <id> for full context
|
|
17
|
+
- [ ] Begin work
|
|
16
18
|
```
|
|
17
19
|
|
|
18
20
|
## Compaction Survival
|
|
@@ -23,8 +25,8 @@ Session Start:
|
|
|
23
25
|
|
|
24
26
|
```
|
|
25
27
|
After Compaction:
|
|
26
|
-
- [ ]
|
|
27
|
-
- [ ]
|
|
28
|
+
- [ ] br list --status in_progress to see active work
|
|
29
|
+
- [ ] br show <id> for each in_progress task
|
|
28
30
|
- [ ] Read notes: COMPLETED, IN PROGRESS, BLOCKERS, KEY DECISIONS
|
|
29
31
|
- [ ] Reconstruct TodoWrite from notes if needed
|
|
30
32
|
```
|
|
@@ -54,7 +56,7 @@ Working on auth. Made some progress.
|
|
|
54
56
|
Discovery:
|
|
55
57
|
- [ ] Notice bug, improvement, or follow-up
|
|
56
58
|
- [ ] Assess: blocker or deferrable?
|
|
57
|
-
- [ ]
|
|
59
|
+
- [ ] br create --title "..." --type bug --priority 1
|
|
58
60
|
- [ ] If blocker: pause and switch
|
|
59
61
|
- [ ] If deferrable: continue current work
|
|
60
62
|
```
|
|
@@ -86,15 +88,15 @@ A **Ready Front** is the set of tasks with all dependencies satisfied.
|
|
|
86
88
|
|
|
87
89
|
**Example: OAuth Integration**
|
|
88
90
|
|
|
89
|
-
```
|
|
90
|
-
|
|
91
|
-
|
|
91
|
+
```bash
|
|
92
|
+
# Create epic
|
|
93
|
+
br create --title "OAuth integration" --type epic --priority 1
|
|
92
94
|
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
95
|
+
# Walk backward: What does OAuth need?
|
|
96
|
+
br create --title "Login/logout endpoints" --parent oauth-abc
|
|
97
|
+
br create --title "Token storage and refresh" --parent oauth-abc
|
|
98
|
+
br create --title "Authorization code flow" --parent oauth-abc
|
|
99
|
+
br create --title "OAuth client credentials" --parent oauth-abc # foundation
|
|
98
100
|
```
|
|
99
101
|
|
|
100
102
|
## Side Quest Handling
|
|
@@ -102,9 +104,9 @@ bd_add({ title: "OAuth client credentials", parent: "oauth-abc" }); // foundatio
|
|
|
102
104
|
```
|
|
103
105
|
Side Quest:
|
|
104
106
|
- [ ] During main work, discover problem
|
|
105
|
-
- [ ]
|
|
107
|
+
- [ ] br create for side quest
|
|
106
108
|
- [ ] Assess: blocker or deferrable?
|
|
107
|
-
- [ ] If blocker:
|
|
109
|
+
- [ ] If blocker: switch to side quest
|
|
108
110
|
- [ ] If deferrable: note it, continue main work
|
|
109
111
|
```
|
|
110
112
|
|
|
@@ -116,8 +118,10 @@ Side Quest:
|
|
|
116
118
|
Session End:
|
|
117
119
|
- [ ] Work reaching stopping point
|
|
118
120
|
- [ ] Update notes with COMPLETED/IN PROGRESS/NEXT
|
|
119
|
-
- [ ]
|
|
121
|
+
- [ ] br close <id> --reason "..." if task complete
|
|
120
122
|
- [ ] Otherwise leave in_progress with notes
|
|
123
|
+
- [ ] br sync --flush-only
|
|
124
|
+
- [ ] git add .beads/ && git commit -m "session end"
|
|
121
125
|
- [ ] RESTART SESSION
|
|
122
126
|
```
|
|
123
127
|
|
|
@@ -125,8 +129,8 @@ Session End:
|
|
|
125
129
|
|
|
126
130
|
```
|
|
127
131
|
Session Start with in_progress:
|
|
128
|
-
- [ ]
|
|
129
|
-
- [ ]
|
|
132
|
+
- [ ] br list --status in_progress
|
|
133
|
+
- [ ] br show <id> for each
|
|
130
134
|
- [ ] Read notes field
|
|
131
135
|
- [ ] Continue from notes context
|
|
132
136
|
```
|
|
@@ -137,9 +141,8 @@ Session Start with in_progress:
|
|
|
137
141
|
|
|
138
142
|
```
|
|
139
143
|
Unblocking:
|
|
140
|
-
- [ ]
|
|
141
|
-
- [ ]
|
|
142
|
-
- [ ] Identify blocker tasks
|
|
144
|
+
- [ ] br list --status open to see all tasks
|
|
145
|
+
- [ ] Identify blocked tasks and their blockers
|
|
143
146
|
- [ ] Work on blockers first
|
|
144
147
|
- [ ] Closing blocker unblocks dependent work
|
|
145
148
|
```
|
|
@@ -150,14 +153,15 @@ Unblocking:
|
|
|
150
153
|
|
|
151
154
|
```
|
|
152
155
|
Hybrid:
|
|
153
|
-
- [ ]
|
|
156
|
+
- [ ] br ready to find high-level task
|
|
157
|
+
- [ ] br update <id> --status in_progress
|
|
154
158
|
- [ ] Create TodoWrite from acceptance criteria
|
|
155
159
|
- [ ] Work through TodoWrite items
|
|
156
|
-
- [ ] Update
|
|
157
|
-
- [ ] When TodoWrite complete,
|
|
160
|
+
- [ ] Update br notes as you learn
|
|
161
|
+
- [ ] When TodoWrite complete, br close <id>
|
|
158
162
|
```
|
|
159
163
|
|
|
160
|
-
**Why hybrid**:
|
|
164
|
+
**Why hybrid**: br provides persistent structure, TodoWrite provides visible progress.
|
|
161
165
|
|
|
162
166
|
## Common Patterns
|
|
163
167
|
|
|
@@ -166,7 +170,7 @@ Hybrid:
|
|
|
166
170
|
```
|
|
167
171
|
1. Create research task
|
|
168
172
|
2. Update notes with findings
|
|
169
|
-
3.
|
|
173
|
+
3. br create for discoveries
|
|
170
174
|
4. Close research with conclusion
|
|
171
175
|
```
|
|
172
176
|
|
|
@@ -185,7 +189,7 @@ Hybrid:
|
|
|
185
189
|
```
|
|
186
190
|
1. Create tasks for each step
|
|
187
191
|
2. Work through in dependency order
|
|
188
|
-
3.
|
|
192
|
+
3. br ready shows next step
|
|
189
193
|
4. Each completion unblocks next
|
|
190
194
|
```
|
|
191
195
|
|
|
@@ -194,10 +198,9 @@ Hybrid:
|
|
|
194
198
|
### Starting Any Session
|
|
195
199
|
|
|
196
200
|
```
|
|
197
|
-
- [ ]
|
|
198
|
-
- [ ]
|
|
199
|
-
- [ ]
|
|
200
|
-
- [ ] bd_reserve() files
|
|
201
|
+
- [ ] br ready
|
|
202
|
+
- [ ] br update <id> --status in_progress
|
|
203
|
+
- [ ] br show <id> for context
|
|
201
204
|
- [ ] Begin work
|
|
202
205
|
```
|
|
203
206
|
|
|
@@ -205,10 +208,9 @@ Hybrid:
|
|
|
205
208
|
|
|
206
209
|
```
|
|
207
210
|
- [ ] Notice new work needed
|
|
208
|
-
- [ ]
|
|
209
|
-
- [ ] Add context in
|
|
211
|
+
- [ ] br create --title "..." with clear title
|
|
212
|
+
- [ ] Add context in description
|
|
210
213
|
- [ ] Assess blocker vs deferrable
|
|
211
|
-
- [ ] Update statuses
|
|
212
214
|
```
|
|
213
215
|
|
|
214
216
|
### Completing Work
|
|
@@ -216,7 +218,9 @@ Hybrid:
|
|
|
216
218
|
```
|
|
217
219
|
- [ ] Implementation done
|
|
218
220
|
- [ ] Tests passing
|
|
219
|
-
- [ ]
|
|
220
|
-
- [ ]
|
|
221
|
+
- [ ] br close <id> --reason "..."
|
|
222
|
+
- [ ] br sync --flush-only
|
|
223
|
+
- [ ] git add .beads/ && git commit
|
|
224
|
+
- [ ] br ready for next work
|
|
221
225
|
- [ ] RESTART SESSION
|
|
222
226
|
```
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: beads-bridge
|
|
3
3
|
description: >
|
|
4
|
-
Multi-agent task coordination using
|
|
4
|
+
Multi-agent task coordination using br (beads_rust) and OpenCode tools. Use when work spans multiple sessions,
|
|
5
5
|
has dependencies, needs file locking, or requires agent coordination. Covers claim/reserve/done cycle,
|
|
6
6
|
dependency management, hierarchical decomposition, and session protocols.
|
|
7
|
-
version: "
|
|
7
|
+
version: "2.0.0"
|
|
8
8
|
license: MIT
|
|
9
9
|
---
|
|
10
10
|
|
|
@@ -12,11 +12,13 @@ license: MIT
|
|
|
12
12
|
|
|
13
13
|
Bridge between Beads git-backed task tracking, OpenCode's native todo system, and swarm coordination.
|
|
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 Bridge = Beads + OpenCode Todos + Swarm Monitor**
|
|
19
|
+
**Beads Bridge = Beads (br) + OpenCode Todos + Swarm Monitor**
|
|
18
20
|
|
|
19
|
-
- **Beads**: Git-backed task tracking with dependency management
|
|
21
|
+
- **Beads (br)**: Git-backed task tracking with dependency management
|
|
20
22
|
- **OpenCode Todos**: Native session-scoped task lists for subagents
|
|
21
23
|
- **Swarm Monitor**: Real-time progress tracking (visualization only)
|
|
22
24
|
|
|
@@ -166,8 +168,10 @@ await swarm_monitor({
|
|
|
166
168
|
team_name: "api-refactor-swarm",
|
|
167
169
|
});
|
|
168
170
|
|
|
169
|
-
// 7. Close parent Bead
|
|
171
|
+
// 7. Close parent Bead and sync
|
|
170
172
|
await bash("br close parent-task --reason 'Swarm completed all subtasks'");
|
|
173
|
+
await bash("br sync --flush-only");
|
|
174
|
+
await bash("git add .beads/ && git commit -m 'close parent-task'");
|
|
171
175
|
```
|
|
172
176
|
|
|
173
177
|
### Pattern B: Dependency-Aware Task Scheduling
|
|
@@ -240,6 +244,10 @@ Next steps:
|
|
|
240
244
|
mode: "replace",
|
|
241
245
|
});
|
|
242
246
|
|
|
247
|
+
// Sync beads before ending session
|
|
248
|
+
await bash("br sync --flush-only");
|
|
249
|
+
await bash("git add .beads/ && git commit -m 'session handoff'");
|
|
250
|
+
|
|
243
251
|
// Start of session 2: Check status and continue
|
|
244
252
|
const status = await swarm_monitor({
|
|
245
253
|
operation: "status",
|
|
@@ -278,7 +286,8 @@ DURING WORK:
|
|
|
278
286
|
SESSION END:
|
|
279
287
|
beads-sync({ operation: "pull" }) // Sync completed todos back to Beads
|
|
280
288
|
swarm-monitor({ operation: "clear", team_name: "..." }) // Cleanup swarm state
|
|
281
|
-
br sync --flush-only // Export Beads changes
|
|
289
|
+
br sync --flush-only // Export Beads changes
|
|
290
|
+
git add .beads/ && git commit -m "..." // Commit changes to git
|
|
282
291
|
|
|
283
292
|
RECOVERY:
|
|
284
293
|
beads-sync({ operation: "get_shared", list_id: "..." }) // Get shared task list
|
|
@@ -292,3 +301,4 @@ RECOVERY:
|
|
|
292
301
|
3. **Pull completed todos back to Beads** - Keep tracking system in sync
|
|
293
302
|
4. **Check swarm status before spawning** - Avoid duplicate work
|
|
294
303
|
5. **Clear swarm state when done** - Cleanup after completion
|
|
304
|
+
6. **Always sync and commit before session end** - `br sync --flush-only` then `git add .beads/ && git commit`
|
package/package.json
CHANGED