opencodekit 0.18.1 → 0.18.2
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/memory.db +0 -0
- package/dist/template/.opencode/memory.db-shm +0 -0
- package/dist/template/.opencode/memory.db-wal +0 -0
- package/dist/template/.opencode/skill/accessibility-audit/SKILL.md +11 -5
- package/dist/template/.opencode/skill/agent-browser/SKILL.md +55 -18
- package/dist/template/.opencode/skill/agent-teams/SKILL.md +12 -1
- package/dist/template/.opencode/skill/augment-context-engine/SKILL.md +11 -1
- package/dist/template/.opencode/skill/beads/SKILL.md +57 -390
- package/dist/template/.opencode/skill/beads/references/BEST_PRACTICES.md +27 -0
- package/dist/template/.opencode/skill/beads/references/EXAMPLES.md +45 -0
- package/dist/template/.opencode/skill/beads/references/FILE_CLAIMING.md +101 -0
- package/dist/template/.opencode/skill/beads/references/GIT_SYNC.md +25 -0
- package/dist/template/.opencode/skill/beads/references/HIERARCHY.md +71 -0
- package/dist/template/.opencode/skill/beads/references/MULTI_AGENT.md +40 -0
- package/dist/template/.opencode/skill/beads/references/SESSION_PROTOCOL.md +61 -0
- package/dist/template/.opencode/skill/beads/references/TASK_CREATION.md +38 -0
- package/dist/template/.opencode/skill/beads/references/TROUBLESHOOTING.md +13 -0
- package/dist/template/.opencode/skill/beads-bridge/SKILL.md +10 -10
- package/dist/template/.opencode/skill/brainstorming/SKILL.md +13 -0
- package/dist/template/.opencode/skill/chrome-devtools/SKILL.md +11 -1
- package/dist/template/.opencode/skill/cloudflare/SKILL.md +87 -67
- package/dist/template/.opencode/skill/compaction/SKILL.md +11 -3
- package/dist/template/.opencode/skill/condition-based-waiting/SKILL.md +11 -25
- package/dist/template/.opencode/skill/context-engineering/SKILL.md +13 -2
- package/dist/template/.opencode/skill/context-initialization/SKILL.md +11 -1
- package/dist/template/.opencode/skill/context-management/SKILL.md +13 -1
- package/dist/template/.opencode/skill/core-data-expert/SKILL.md +13 -2
- package/dist/template/.opencode/skill/deep-research/SKILL.md +5 -8
- package/dist/template/.opencode/skill/defense-in-depth/SKILL.md +13 -0
- package/dist/template/.opencode/skill/design-system-audit/SKILL.md +9 -3
- package/dist/template/.opencode/skill/development-lifecycle/SKILL.md +51 -0
- package/dist/template/.opencode/skill/dispatching-parallel-agents/SKILL.md +19 -30
- package/dist/template/.opencode/skill/executing-plans/SKILL.md +36 -0
- package/dist/template/.opencode/skill/figma/SKILL.md +11 -1
- package/dist/template/.opencode/skill/finishing-a-development-branch/SKILL.md +31 -0
- package/dist/template/.opencode/skill/frontend-design/SKILL.md +13 -3
- package/dist/template/.opencode/skill/gemini-large-context/SKILL.md +11 -0
- package/dist/template/.opencode/skill/index-knowledge/SKILL.md +11 -1
- package/dist/template/.opencode/skill/jira/SKILL.md +11 -1
- package/dist/template/.opencode/skill/memory-system/SKILL.md +13 -1
- package/dist/template/.opencode/skill/mockup-to-code/SKILL.md +9 -3
- package/dist/template/.opencode/skill/mqdh/SKILL.md +11 -1
- package/dist/template/.opencode/skill/obsidian/SKILL.md +11 -1
- package/dist/template/.opencode/skill/opensrc/SKILL.md +18 -6
- package/dist/template/.opencode/skill/pdf-extract/SKILL.md +11 -1
- package/dist/template/.opencode/skill/playwright/SKILL.md +11 -1
- package/dist/template/.opencode/skill/playwriter/SKILL.md +11 -1
- package/dist/template/.opencode/skill/polar/SKILL.md +11 -1
- package/dist/template/.opencode/skill/prd/SKILL.md +13 -4
- package/dist/template/.opencode/skill/prd-task/SKILL.md +13 -3
- package/dist/template/.opencode/skill/ralph/SKILL.md +4 -8
- package/dist/template/.opencode/skill/react-best-practices/SKILL.md +24 -16
- package/dist/template/.opencode/skill/receiving-code-review/SKILL.md +22 -0
- package/dist/template/.opencode/skill/requesting-code-review/SKILL.md +30 -2
- package/dist/template/.opencode/skill/resend/SKILL.md +11 -1
- package/dist/template/.opencode/skill/root-cause-tracing/SKILL.md +12 -23
- package/dist/template/.opencode/skill/session-management/SKILL.md +11 -1
- package/dist/template/.opencode/skill/sharing-skills/SKILL.md +11 -0
- package/dist/template/.opencode/skill/skill-creator/SKILL.md +12 -11
- package/dist/template/.opencode/skill/source-code-research/SKILL.md +20 -266
- package/dist/template/.opencode/skill/source-code-research/references/analysis-tips.md +43 -0
- package/dist/template/.opencode/skill/source-code-research/references/anti-patterns.md +36 -0
- package/dist/template/.opencode/skill/source-code-research/references/common-patterns.md +57 -0
- package/dist/template/.opencode/skill/source-code-research/references/example-workflow.md +60 -0
- package/dist/template/.opencode/skill/source-code-research/references/further-reading.md +5 -0
- package/dist/template/.opencode/skill/source-code-research/references/source-structure.md +45 -0
- package/dist/template/.opencode/skill/stitch/SKILL.md +11 -1
- package/dist/template/.opencode/skill/structured-edit/SKILL.md +13 -0
- package/dist/template/.opencode/skill/subagent-driven-development/SKILL.md +13 -14
- package/dist/template/.opencode/skill/supabase/SKILL.md +11 -1
- package/dist/template/.opencode/skill/supabase-postgres-best-practices/SKILL.md +23 -15
- package/dist/template/.opencode/skill/swarm-coordination/SKILL.md +23 -923
- package/dist/template/.opencode/skill/swarm-coordination/references/architecture.md +39 -0
- package/dist/template/.opencode/skill/swarm-coordination/references/delegation-worker-protocol.md +145 -0
- package/dist/template/.opencode/skill/swarm-coordination/references/dependency-graph.md +50 -0
- package/dist/template/.opencode/skill/swarm-coordination/references/drift-check.md +90 -0
- package/dist/template/.opencode/skill/swarm-coordination/references/integration-beads.md +20 -0
- package/dist/template/.opencode/skill/swarm-coordination/references/launch-flow.md +186 -0
- package/dist/template/.opencode/skill/swarm-coordination/references/reconciler.md +172 -0
- package/dist/template/.opencode/skill/swarm-coordination/references/tier-enforcement.md +78 -0
- package/dist/template/.opencode/skill/swarm-coordination/references/tmux-integration.md +134 -0
- package/dist/template/.opencode/skill/swift-concurrency/SKILL.md +22 -2
- package/dist/template/.opencode/skill/swiftui-expert-skill/SKILL.md +58 -19
- package/dist/template/.opencode/skill/systematic-debugging/SKILL.md +25 -25
- package/dist/template/.opencode/skill/test-driven-development/SKILL.md +19 -15
- package/dist/template/.opencode/skill/testing-anti-patterns/SKILL.md +13 -0
- package/dist/template/.opencode/skill/testing-skills-with-subagents/SKILL.md +13 -15
- package/dist/template/.opencode/skill/tool-priority/SKILL.md +13 -0
- package/dist/template/.opencode/skill/ui-ux-research/SKILL.md +9 -3
- package/dist/template/.opencode/skill/using-git-worktrees/SKILL.md +11 -0
- package/dist/template/.opencode/skill/using-skills/SKILL.md +13 -0
- package/dist/template/.opencode/skill/v0/SKILL.md +11 -1
- package/dist/template/.opencode/skill/v1-run/SKILL.md +11 -1
- package/dist/template/.opencode/skill/vercel-deploy-claimable/SKILL.md +14 -2
- package/dist/template/.opencode/skill/verification-before-completion/SKILL.md +22 -0
- package/dist/template/.opencode/skill/visual-analysis/SKILL.md +9 -3
- package/dist/template/.opencode/skill/web-design-guidelines/SKILL.md +12 -5
- package/dist/template/.opencode/skill/writing-plans/SKILL.md +13 -0
- package/dist/template/.opencode/skill/writing-skills/SKILL.md +26 -421
- package/dist/template/.opencode/skill/writing-skills/references/anti-patterns.md +25 -0
- package/dist/template/.opencode/skill/writing-skills/references/claude-search-optimization.md +140 -0
- package/dist/template/.opencode/skill/writing-skills/references/discovery-workflow.md +11 -0
- package/dist/template/.opencode/skill/writing-skills/references/file-organization.md +32 -0
- package/dist/template/.opencode/skill/writing-skills/references/flowcharts-and-examples.md +57 -0
- package/dist/template/.opencode/skill/writing-skills/references/rationalization-hardening.md +75 -0
- package/dist/template/.opencode/skill/writing-skills/references/testing-skill-types.md +52 -0
- package/package.json +15 -4
|
@@ -6,13 +6,21 @@ description: >
|
|
|
6
6
|
claim/reserve/done cycle, dependency management, hierarchical decomposition, and session protocols.
|
|
7
7
|
version: "2.0.0"
|
|
8
8
|
license: MIT
|
|
9
|
+
tags: [workflow, agent-coordination]
|
|
10
|
+
dependencies: []
|
|
9
11
|
---
|
|
10
12
|
|
|
11
13
|
# Beads Workflow - Multi-Agent Task Coordination
|
|
12
14
|
|
|
13
|
-
|
|
15
|
+
## When to Use
|
|
14
16
|
|
|
15
|
-
|
|
17
|
+
- Coordinating multi-session work with dependencies, blockers, or file locking needs
|
|
18
|
+
- Running multi-agent work where tasks must persist across sessions and handoffs
|
|
19
|
+
|
|
20
|
+
## When NOT to Use
|
|
21
|
+
|
|
22
|
+
- Single-session, linear tasks tracked via TodoWrite
|
|
23
|
+
- Quick changes with no dependencies or handoff needs
|
|
16
24
|
|
|
17
25
|
## Overview
|
|
18
26
|
|
|
@@ -44,302 +52,54 @@ br close <id> --reason "Completed"
|
|
|
44
52
|
br sync --flush-only # Export to JSONL (then git add/commit manually)
|
|
45
53
|
```
|
|
46
54
|
|
|
47
|
-
##
|
|
48
|
-
|
|
49
|
-
**Beads supports up to 3 levels of hierarchy using hierarchical IDs:**
|
|
50
|
-
|
|
51
|
-
```
|
|
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)
|
|
58
|
-
```
|
|
59
|
-
|
|
60
|
-
### When to Decompose
|
|
61
|
-
|
|
62
|
-
| Scenario | Structure |
|
|
63
|
-
| ---------------------------- | ------------------------------------ |
|
|
64
|
-
| Bug fix, config change | Single bead |
|
|
65
|
-
| Small feature (1-2 files) | Single bead |
|
|
66
|
-
| Feature crossing FE/BE | Epic + tasks by domain |
|
|
67
|
-
| New system/service | Epic + tasks by component |
|
|
68
|
-
| Multi-day work | Epic + tasks for parallelization |
|
|
69
|
-
| Work needing multiple agents | Epic + tasks (agents claim children) |
|
|
70
|
-
|
|
71
|
-
### Creating Hierarchical Beads
|
|
72
|
-
|
|
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
|
|
88
|
-
```
|
|
89
|
-
|
|
90
|
-
### Dependency Types
|
|
91
|
-
|
|
92
|
-
Beads supports four dependency types:
|
|
93
|
-
|
|
94
|
-
| Type | Meaning | Use Case |
|
|
95
|
-
| ----------------- | ------------------------- | ------------------- |
|
|
96
|
-
| `blocks` | Task A blocks Task B | Sequential work |
|
|
97
|
-
| `related` | Tasks are connected | Cross-references |
|
|
98
|
-
| `parent-child` | Hierarchy (via `parent:`) | Epic → Task |
|
|
99
|
-
| `discovered-from` | Found during work | New work discovered |
|
|
100
|
-
|
|
101
|
-
### Parallel Execution with Dependencies
|
|
102
|
-
|
|
103
|
-
```
|
|
104
|
-
br-a3f8.1 [Database] ──┬──> br-a3f8.2 [Backend] ──┐
|
|
105
|
-
(READY) │ │
|
|
106
|
-
│ ▼
|
|
107
|
-
└──> br-a3f8.3 [Frontend] br-a3f8.5 [Testing]
|
|
108
|
-
│ │ ▲
|
|
109
|
-
└──> br-a3f8.4 [Docs] ──────────┘
|
|
110
|
-
|
|
111
|
-
Parallel tracks:
|
|
112
|
-
• Agent 1 (backend): .1 → .2
|
|
113
|
-
• Agent 2 (frontend): wait for .1, then .3
|
|
114
|
-
• Agent 3 (qa): wait for .2 and .3, then .5
|
|
115
|
-
```
|
|
116
|
-
|
|
117
|
-
**Key insight**: After br-a3f8.1 completes, .2, .3, and .4 all become READY simultaneously. Multiple agents can claim them in parallel.
|
|
118
|
-
|
|
119
|
-
### Querying Hierarchy
|
|
120
|
-
|
|
121
|
-
```bash
|
|
122
|
-
# See all open issues
|
|
123
|
-
br list --status open
|
|
124
|
-
|
|
125
|
-
# See ready work (unblocked tasks)
|
|
126
|
-
br ready
|
|
127
|
-
# Returns tasks where all dependencies are closed
|
|
128
|
-
```
|
|
129
|
-
|
|
130
|
-
## Session Start Protocol
|
|
131
|
-
|
|
132
|
-
**Every session, follow these steps:**
|
|
133
|
-
|
|
134
|
-
### Step 1: Find Ready Work
|
|
135
|
-
|
|
136
|
-
```bash
|
|
137
|
-
br ready
|
|
138
|
-
```
|
|
139
|
-
|
|
140
|
-
Returns highest priority task with no blockers.
|
|
141
|
-
|
|
142
|
-
If no tasks returned, check all open work:
|
|
143
|
-
|
|
144
|
-
```bash
|
|
145
|
-
br list --status open
|
|
146
|
-
```
|
|
147
|
-
|
|
148
|
-
### Step 2: Claim Task
|
|
55
|
+
## Hierarchy & Dependencies (Summary)
|
|
149
56
|
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
57
|
+
- Beads supports up to 3 levels of hierarchy: Epic → Task → Subtask
|
|
58
|
+
- Use hierarchy for multi-day, cross-domain, or multi-agent work
|
|
59
|
+
- Dependencies unblock parallel work when parents close
|
|
153
60
|
|
|
154
|
-
|
|
61
|
+
See: `references/HIERARCHY.md` and `references/DEPENDENCIES.md` for full details.
|
|
155
62
|
|
|
156
|
-
|
|
157
|
-
br show <id>
|
|
158
|
-
```
|
|
63
|
+
## Session Protocol (Summary)
|
|
159
64
|
|
|
160
|
-
|
|
65
|
+
**Start:** `br ready` → `br update <id> --status in_progress` → `br show <id>`
|
|
161
66
|
|
|
162
|
-
|
|
67
|
+
**End:** `br close <id> --reason "..."` → `br sync --flush-only` → commit `.beads/` → restart session
|
|
163
68
|
|
|
164
|
-
|
|
69
|
+
See: `references/SESSION_PROTOCOL.md` and `references/WORKFLOWS.md` for detailed steps and checklists.
|
|
165
70
|
|
|
166
|
-
|
|
71
|
+
## Task Creation (Summary)
|
|
167
72
|
|
|
168
|
-
|
|
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
|
|
174
|
-
```
|
|
175
|
-
|
|
176
|
-
Always restart session after closing a task. One task per session.
|
|
177
|
-
|
|
178
|
-
## Task Creation
|
|
179
|
-
|
|
180
|
-
### When to Create Tasks
|
|
181
|
-
|
|
182
|
-
Create tasks when:
|
|
183
|
-
|
|
184
|
-
- User mentions tracking work across sessions
|
|
185
|
-
- User says "we should fix/build/add X"
|
|
186
|
-
- Work has dependencies or blockers
|
|
187
|
-
- Discovered work while implementing (>2 min effort)
|
|
188
|
-
|
|
189
|
-
### Basic Task Creation
|
|
73
|
+
Create tasks when work spans sessions, has dependencies, or is discovered mid-implementation (>2 min).
|
|
190
74
|
|
|
191
75
|
```bash
|
|
192
76
|
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
|
|
195
|
-
```
|
|
196
|
-
|
|
197
|
-
### With Description
|
|
198
|
-
|
|
199
|
-
```bash
|
|
200
|
-
br create --title "Implement OAuth" --type feature --priority 1 \
|
|
201
|
-
--description "Add OAuth2 support for Google, GitHub. Use passport.js."
|
|
202
77
|
```
|
|
203
78
|
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
```bash
|
|
207
|
-
# Create parent epic
|
|
208
|
-
br create --title "Epic: OAuth Implementation" --priority 0 --type epic
|
|
209
|
-
# Returns: oauth-abc
|
|
210
|
-
|
|
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
|
|
215
|
-
```
|
|
216
|
-
|
|
217
|
-
## Git Sync
|
|
218
|
-
|
|
219
|
-
### Manual Sync (Non-Invasive)
|
|
220
|
-
|
|
221
|
-
**Important:** `br` never executes git commands. You must manually commit changes.
|
|
79
|
+
See: `references/TASK_CREATION.md` for full examples and patterns.
|
|
222
80
|
|
|
223
|
-
|
|
224
|
-
# Export changes to JSONL
|
|
225
|
-
br sync --flush-only
|
|
226
|
-
|
|
227
|
-
# Then manually commit
|
|
228
|
-
git add .beads/
|
|
229
|
-
git commit -m "sync beads"
|
|
230
|
-
git push
|
|
231
|
-
```
|
|
232
|
-
|
|
233
|
-
**Use when**: End of session, before handoff, after major progress.
|
|
234
|
-
|
|
235
|
-
### Cleanup Old Issues
|
|
236
|
-
|
|
237
|
-
```bash
|
|
238
|
-
br cleanup --days 7
|
|
239
|
-
```
|
|
81
|
+
## Git Sync (Summary)
|
|
240
82
|
|
|
241
|
-
|
|
83
|
+
`br` never runs git commands. Always `br sync --flush-only` and commit `.beads/` manually.
|
|
242
84
|
|
|
243
|
-
|
|
85
|
+
See: `references/GIT_SYNC.md` for detailed flow and cleanup guidance.
|
|
244
86
|
|
|
245
|
-
|
|
87
|
+
## Troubleshooting (Summary)
|
|
246
88
|
|
|
247
|
-
|
|
89
|
+
- No ready tasks → `br list --status open`, check blockers via `br show <id>`
|
|
90
|
+
- Sync failures → `br doctor`
|
|
248
91
|
|
|
249
|
-
|
|
250
|
-
- Some may be blocked - check dependencies with `br show <id>`
|
|
251
|
-
|
|
252
|
-
**Sync failures**
|
|
253
|
-
|
|
254
|
-
- Run `br doctor` to repair database
|
|
255
|
-
- Check git remote access
|
|
92
|
+
See: `references/TROUBLESHOOTING.md` for common issues and fixes.
|
|
256
93
|
|
|
257
94
|
## Examples
|
|
258
95
|
|
|
259
|
-
|
|
260
|
-
|
|
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
|
|
278
|
-
```
|
|
279
|
-
|
|
280
|
-
### Example 2: Discovered Work
|
|
281
|
-
|
|
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
|
|
287
|
-
```
|
|
288
|
-
|
|
289
|
-
### Example 3: Creating Dependencies
|
|
290
|
-
|
|
291
|
-
```bash
|
|
292
|
-
# Create tasks with dependencies
|
|
293
|
-
br create --title "Setup database" --type task --priority 1
|
|
294
|
-
# Returns: setup-db
|
|
295
|
-
|
|
296
|
-
br create --title "Implement API" --type task --priority 2 --blocked-by setup-db
|
|
297
|
-
# Returns: impl-api (blocked until setup-db closes)
|
|
298
|
-
|
|
299
|
-
br create --title "Add tests" --type task --priority 2 --blocked-by impl-api
|
|
300
|
-
# Returns: add-tests
|
|
301
|
-
```
|
|
302
|
-
|
|
303
|
-
## Multi-Agent Coordination (Swarm Mode)
|
|
304
|
-
|
|
305
|
-
For parallel execution with multiple subagents, use the **beads-bridge** skill:
|
|
96
|
+
See: `references/EXAMPLES.md` for complete usage examples.
|
|
306
97
|
|
|
307
|
-
|
|
308
|
-
skill({ name: "beads-bridge" });
|
|
309
|
-
```
|
|
310
|
-
|
|
311
|
-
**beads-bridge** provides (via unified `swarm` tool):
|
|
312
|
-
|
|
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
|
|
317
|
-
|
|
318
|
-
**When to use beads vs beads-bridge:**
|
|
319
|
-
|
|
320
|
-
| Scenario | Use |
|
|
321
|
-
| ------------------------------ | -------------------------------- |
|
|
322
|
-
| Single agent, linear work | `beads` skill only |
|
|
323
|
-
| Multiple agents in parallel | `beads-bridge` + `beads` |
|
|
324
|
-
| Need subagents to see tasks | `beads-bridge` (swarm sync push) |
|
|
325
|
-
| Track worker progress visually | `beads-bridge` (swarm monitor) |
|
|
98
|
+
## Multi-Agent Coordination (Summary)
|
|
326
99
|
|
|
327
|
-
**
|
|
100
|
+
For parallel execution with multiple subagents, use the **beads-bridge** skill.
|
|
328
101
|
|
|
329
|
-
|
|
330
|
-
// 1. Push beads to OpenCode todos (subagents can see via todoread)
|
|
331
|
-
swarm({ operation: "sync", action: "push" });
|
|
332
|
-
|
|
333
|
-
// 2. Spawn workers in parallel using Task tool
|
|
334
|
-
Task({ subagent_type: "general", description: "Worker 1", prompt: "..." });
|
|
335
|
-
Task({ subagent_type: "general", description: "Worker 2", prompt: "..." });
|
|
336
|
-
|
|
337
|
-
// 3. Monitor progress
|
|
338
|
-
swarm({ operation: "monitor", action: "render_block", team_name: "my-swarm" });
|
|
339
|
-
|
|
340
|
-
// 4. Pull completed work back to beads
|
|
341
|
-
swarm({ operation: "sync", action: "pull" });
|
|
342
|
-
```
|
|
102
|
+
See: `references/MULTI_AGENT.md` for swarm tool usage and examples.
|
|
343
103
|
|
|
344
104
|
## Rules
|
|
345
105
|
|
|
@@ -350,128 +110,19 @@ swarm({ operation: "sync", action: "pull" });
|
|
|
350
110
|
5. **Write notes for future agents** - Assume zero conversation context
|
|
351
111
|
6. **Claim file paths before editing** - Use reserve to declare ownership (multi-agent only)
|
|
352
112
|
|
|
353
|
-
## File Path Claiming (
|
|
113
|
+
## File Path Claiming (Summary)
|
|
354
114
|
|
|
355
|
-
|
|
115
|
+
Claim files before editing in multi-agent work using `br reserve <id> --files "..."`.
|
|
356
116
|
|
|
357
|
-
|
|
117
|
+
See: `references/FILE_CLAIMING.md` for the full protocol and examples.
|
|
358
118
|
|
|
359
|
-
|
|
360
|
-
- **2-10 agents**: Recommended for files touched by multiple tasks
|
|
361
|
-
- **10+ agents**: Required — every file must be claimed before editing
|
|
119
|
+
## Best Practices (Summary)
|
|
362
120
|
|
|
363
|
-
|
|
121
|
+
- One task per session, then restart
|
|
122
|
+
- File issues for work >2 minutes
|
|
123
|
+
- Weekly `br doctor`, periodic `br cleanup --days 7`
|
|
364
124
|
|
|
365
|
-
|
|
366
|
-
# 1. CLAIM: Declare intent to edit before touching the file
|
|
367
|
-
br reserve <bead-id> --files "src/auth/service.ts,src/auth/types.ts"
|
|
368
|
-
# → Marks files as owned by this bead
|
|
369
|
-
# → Other agents see the reservation and must wait
|
|
370
|
-
|
|
371
|
-
# 2. EDIT: Make your changes
|
|
372
|
-
# (edit files as normal)
|
|
373
|
-
|
|
374
|
-
# 3. VERIFY: Run gates before releasing
|
|
375
|
-
npm run typecheck && npm run lint
|
|
376
|
-
|
|
377
|
-
# 4. CLOSE: Release ownership when done
|
|
378
|
-
br close <bead-id> --reason "Auth service implemented. Gates passed."
|
|
379
|
-
# → Ownership released automatically on close
|
|
380
|
-
```
|
|
381
|
-
|
|
382
|
-
### Checking for Conflicts Before Claiming
|
|
383
|
-
|
|
384
|
-
Before claiming, check if another bead already owns the file:
|
|
385
|
-
|
|
386
|
-
```bash
|
|
387
|
-
# See all reserved files across active beads
|
|
388
|
-
br list --status in_progress --json | jq '.[].reserved_files'
|
|
389
|
-
|
|
390
|
-
# If conflict detected:
|
|
391
|
-
# → Wait for the other bead to close
|
|
392
|
-
# → Or coordinate with the agent owning that bead
|
|
393
|
-
```
|
|
394
|
-
|
|
395
|
-
### Claiming in Delegation Packets
|
|
396
|
-
|
|
397
|
-
Workers MUST declare file claims in their delegation packet:
|
|
398
|
-
|
|
399
|
-
```markdown
|
|
400
|
-
# Delegation Packet
|
|
401
|
-
|
|
402
|
-
- TASK: task-1 - Implement auth service
|
|
403
|
-
- FILES TO CLAIM BEFORE EDITING:
|
|
404
|
-
- src/auth/service.ts
|
|
405
|
-
- src/auth/types.ts
|
|
406
|
-
- src/auth/middleware.ts
|
|
407
|
-
- MUST NOT EDIT (owned by other tasks):
|
|
408
|
-
- src/db/schema.ts (owned by task-0)
|
|
409
|
-
- src/config.ts (owned by task-2)
|
|
410
|
-
```
|
|
411
|
-
|
|
412
|
-
### Conflict Resolution Protocol
|
|
413
|
-
|
|
414
|
-
When two agents want the same file:
|
|
415
|
-
|
|
416
|
-
| Scenario | Resolution |
|
|
417
|
-
| ------------------------------------ | ----------------------------------------------- |
|
|
418
|
-
| File not claimed | Claim it and proceed |
|
|
419
|
-
| File claimed by completed bead | Safe to claim (no active owner) |
|
|
420
|
-
| File claimed by in_progress bead | Wait for bead to close, then claim |
|
|
421
|
-
| Urgent: same file, different workers | Escalate to lead agent to split the file change |
|
|
422
|
-
|
|
423
|
-
### Anti-Pattern: Claiming After Editing
|
|
424
|
-
|
|
425
|
-
```bash
|
|
426
|
-
# WRONG — edit first, claim after → conflict already happened
|
|
427
|
-
edit src/auth/service.ts
|
|
428
|
-
br reserve bead-1 --files "src/auth/service.ts"
|
|
429
|
-
|
|
430
|
-
# RIGHT — claim first, then edit
|
|
431
|
-
br reserve bead-1 --files "src/auth/service.ts"
|
|
432
|
-
edit src/auth/service.ts
|
|
433
|
-
```
|
|
434
|
-
|
|
435
|
-
### Quick Reference: File Claiming
|
|
436
|
-
|
|
437
|
-
```
|
|
438
|
-
BEFORE EDITING (multi-agent):
|
|
439
|
-
br reserve <id> --files "src/file.ts"
|
|
440
|
-
|
|
441
|
-
CHECK OWNERSHIP:
|
|
442
|
-
br list --status in_progress --json | jq '.[].reserved_files'
|
|
443
|
-
|
|
444
|
-
RELEASE:
|
|
445
|
-
br close <id> --reason "..." ← auto-releases files
|
|
446
|
-
```
|
|
447
|
-
|
|
448
|
-
## Best Practices
|
|
449
|
-
|
|
450
|
-
### Daily/Weekly Maintenance
|
|
451
|
-
|
|
452
|
-
| Task | Frequency | Command | Why |
|
|
453
|
-
| ------------ | -------------- | --------------------- | ---------------------------------------------- |
|
|
454
|
-
| Health check | Weekly | `br doctor` | Repairs database issues, detects orphaned work |
|
|
455
|
-
| Cleanup | Every few days | `br cleanup --days 7` | Keep DB under 200-500 issues for performance |
|
|
456
|
-
|
|
457
|
-
### Key Principles
|
|
458
|
-
|
|
459
|
-
1. **Plan outside Beads first** - Use planning tools, then import tasks to beads
|
|
460
|
-
2. **One task per session, then restart** - Fresh context prevents confusion
|
|
461
|
-
3. **File lots of issues** - Any work >2 minutes should be tracked
|
|
462
|
-
4. **"Land the plane" = PUSH** - `br sync --flush-only` + git commit/push, not "ready when you are"
|
|
463
|
-
5. **Include issue ID in commits** - `git commit -m "Fix bug (br-abc)"`
|
|
464
|
-
|
|
465
|
-
### Database Health
|
|
466
|
-
|
|
467
|
-
```bash
|
|
468
|
-
# Check database size
|
|
469
|
-
br list --status all --json | wc -l
|
|
470
|
-
|
|
471
|
-
# Target: under 200-500 issues
|
|
472
|
-
# If over, run cleanup more aggressively:
|
|
473
|
-
br cleanup --days 3
|
|
474
|
-
```
|
|
125
|
+
See: `references/BEST_PRACTICES.md` for maintenance and database health guidance.
|
|
475
126
|
|
|
476
127
|
## Quick Reference
|
|
477
128
|
|
|
@@ -490,3 +141,19 @@ MAINTENANCE:
|
|
|
490
141
|
br doctor - weekly health check
|
|
491
142
|
br cleanup --days 7 - remove old issues
|
|
492
143
|
```
|
|
144
|
+
|
|
145
|
+
## References
|
|
146
|
+
|
|
147
|
+
- `references/BOUNDARIES.md`
|
|
148
|
+
- `references/RESUMABILITY.md`
|
|
149
|
+
- `references/DEPENDENCIES.md`
|
|
150
|
+
- `references/WORKFLOWS.md`
|
|
151
|
+
- `references/HIERARCHY.md`
|
|
152
|
+
- `references/SESSION_PROTOCOL.md`
|
|
153
|
+
- `references/TASK_CREATION.md`
|
|
154
|
+
- `references/GIT_SYNC.md`
|
|
155
|
+
- `references/TROUBLESHOOTING.md`
|
|
156
|
+
- `references/EXAMPLES.md`
|
|
157
|
+
- `references/MULTI_AGENT.md`
|
|
158
|
+
- `references/FILE_CLAIMING.md`
|
|
159
|
+
- `references/BEST_PRACTICES.md`
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# Best Practices
|
|
2
|
+
|
|
3
|
+
## Daily/Weekly Maintenance
|
|
4
|
+
|
|
5
|
+
| Task | Frequency | Command | Why |
|
|
6
|
+
| ------------ | -------------- | --------------------- | ---------------------------------------------- |
|
|
7
|
+
| Health check | Weekly | `br doctor` | Repairs database issues, detects orphaned work |
|
|
8
|
+
| Cleanup | Every few days | `br cleanup --days 7` | Keep DB under 200-500 issues for performance |
|
|
9
|
+
|
|
10
|
+
## Key Principles
|
|
11
|
+
|
|
12
|
+
1. **Plan outside Beads first** - Use planning tools, then import tasks to beads
|
|
13
|
+
2. **One task per session, then restart** - Fresh context prevents confusion
|
|
14
|
+
3. **File lots of issues** - Any work >2 minutes should be tracked
|
|
15
|
+
4. **"Land the plane" = PUSH** - `br sync --flush-only` + git commit/push, not "ready when you are"
|
|
16
|
+
5. **Include issue ID in commits** - `git commit -m "Fix bug (br-abc)"`
|
|
17
|
+
|
|
18
|
+
## Database Health
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
# Check database size
|
|
22
|
+
br list --status all --json | wc -l
|
|
23
|
+
|
|
24
|
+
# Target: under 200-500 issues
|
|
25
|
+
# If over, run cleanup more aggressively:
|
|
26
|
+
br cleanup --days 3
|
|
27
|
+
```
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# Examples
|
|
2
|
+
|
|
3
|
+
## Example 1: Standard Session
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
# 1. Find and claim work
|
|
7
|
+
br ready
|
|
8
|
+
br update auth-123 --status in_progress
|
|
9
|
+
|
|
10
|
+
# 2. Get context
|
|
11
|
+
br show auth-123
|
|
12
|
+
|
|
13
|
+
# 3. Do the work...
|
|
14
|
+
# [implementation]
|
|
15
|
+
|
|
16
|
+
# 4. Complete and sync
|
|
17
|
+
br close auth-123 --reason "Login form with validation, hooks for auth state"
|
|
18
|
+
br sync --flush-only
|
|
19
|
+
git add .beads/
|
|
20
|
+
git commit -m "close auth-123"
|
|
21
|
+
# RESTART SESSION
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## Example 2: Discovered Work
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
# Working on task, found more work
|
|
28
|
+
br create --title "Fix edge case in validation" --type bug --priority 1 \
|
|
29
|
+
--description "Empty strings bypass email check - discovered while implementing login"
|
|
30
|
+
# Continue current task, new task tracked for later
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## Example 3: Creating Dependencies
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
# Create tasks with dependencies
|
|
37
|
+
br create --title "Setup database" --type task --priority 1
|
|
38
|
+
# Returns: setup-db
|
|
39
|
+
|
|
40
|
+
br create --title "Implement API" --type task --priority 2 --blocked-by setup-db
|
|
41
|
+
# Returns: impl-api (blocked until setup-db closes)
|
|
42
|
+
|
|
43
|
+
br create --title "Add tests" --type task --priority 2 --blocked-by impl-api
|
|
44
|
+
# Returns: add-tests
|
|
45
|
+
```
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
# File Path Claiming (Multi-Agent Safety)
|
|
2
|
+
|
|
3
|
+
At multi-agent scale, agents editing the same files cause merge conflicts. File path claiming prevents this by making ownership explicit before any edit happens.
|
|
4
|
+
|
|
5
|
+
## When to Use
|
|
6
|
+
|
|
7
|
+
- **Single agent**: Optional — no conflicts possible
|
|
8
|
+
- **2-10 agents**: Recommended for files touched by multiple tasks
|
|
9
|
+
- **10+ agents**: Required — every file must be claimed before editing
|
|
10
|
+
|
|
11
|
+
## The Claim/Edit/Release Cycle
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
# 1. CLAIM: Declare intent to edit before touching the file
|
|
15
|
+
br reserve <bead-id> --files "src/auth/service.ts,src/auth/types.ts"
|
|
16
|
+
# → Marks files as owned by this bead
|
|
17
|
+
# → Other agents see the reservation and must wait
|
|
18
|
+
|
|
19
|
+
# 2. EDIT: Make your changes
|
|
20
|
+
# (edit files as normal)
|
|
21
|
+
|
|
22
|
+
# 3. VERIFY: Run gates before releasing
|
|
23
|
+
npm run typecheck && npm run lint
|
|
24
|
+
|
|
25
|
+
# 4. CLOSE: Release ownership when done
|
|
26
|
+
br close <bead-id> --reason "Auth service implemented. Gates passed."
|
|
27
|
+
# → Ownership released automatically on close
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## File Claiming Checklist
|
|
31
|
+
|
|
32
|
+
- [ ] Check for conflicts: `br list --status in_progress --json | jq '.[].reserved_files'`
|
|
33
|
+
- [ ] Reserve files before editing: `br reserve <id> --files "..."`
|
|
34
|
+
- [ ] Run gates before closing: `npm run typecheck && npm run lint`
|
|
35
|
+
- [ ] Close bead to release ownership
|
|
36
|
+
|
|
37
|
+
## Checking for Conflicts Before Claiming
|
|
38
|
+
|
|
39
|
+
Before claiming, check if another bead already owns the file:
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
# See all reserved files across active beads
|
|
43
|
+
br list --status in_progress --json | jq '.[].reserved_files'
|
|
44
|
+
|
|
45
|
+
# If conflict detected:
|
|
46
|
+
# → Wait for the other bead to close
|
|
47
|
+
# → Or coordinate with the agent owning that bead
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## Claiming in Delegation Packets
|
|
51
|
+
|
|
52
|
+
Workers MUST declare file claims in their delegation packet:
|
|
53
|
+
|
|
54
|
+
```markdown
|
|
55
|
+
# Delegation Packet
|
|
56
|
+
|
|
57
|
+
- TASK: task-1 - Implement auth service
|
|
58
|
+
- FILES TO CLAIM BEFORE EDITING:
|
|
59
|
+
- src/auth/service.ts
|
|
60
|
+
- src/auth/types.ts
|
|
61
|
+
- src/auth/middleware.ts
|
|
62
|
+
- MUST NOT EDIT (owned by other tasks):
|
|
63
|
+
- src/db/schema.ts (owned by task-0)
|
|
64
|
+
- src/config.ts (owned by task-2)
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
## Conflict Resolution Protocol
|
|
68
|
+
|
|
69
|
+
When two agents want the same file:
|
|
70
|
+
|
|
71
|
+
| Scenario | Resolution |
|
|
72
|
+
| ------------------------------------ | ----------------------------------------------- |
|
|
73
|
+
| File not claimed | Claim it and proceed |
|
|
74
|
+
| File claimed by completed bead | Safe to claim (no active owner) |
|
|
75
|
+
| File claimed by in_progress bead | Wait for bead to close, then claim |
|
|
76
|
+
| Urgent: same file, different workers | Escalate to lead agent to split the file change |
|
|
77
|
+
|
|
78
|
+
## Anti-Pattern: Claiming After Editing
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
# WRONG — edit first, claim after → conflict already happened
|
|
82
|
+
edit src/auth/service.ts
|
|
83
|
+
br reserve bead-1 --files "src/auth/service.ts"
|
|
84
|
+
|
|
85
|
+
# RIGHT — claim first, then edit
|
|
86
|
+
br reserve bead-1 --files "src/auth/service.ts"
|
|
87
|
+
edit src/auth/service.ts
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
## Quick Reference: File Claiming
|
|
91
|
+
|
|
92
|
+
```
|
|
93
|
+
BEFORE EDITING (multi-agent):
|
|
94
|
+
br reserve <id> --files "src/file.ts"
|
|
95
|
+
|
|
96
|
+
CHECK OWNERSHIP:
|
|
97
|
+
br list --status in_progress --json | jq '.[].reserved_files'
|
|
98
|
+
|
|
99
|
+
RELEASE:
|
|
100
|
+
br close <id> --reason "..." ← auto-releases files
|
|
101
|
+
```
|