opencodekit 0.13.0 → 0.13.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/README.md +2 -2
- package/dist/index.js +1 -1
- package/dist/template/.opencode/README.md +2 -2
- package/dist/template/.opencode/command/implement.md +195 -39
- package/dist/template/.opencode/command/new-feature.md +229 -188
- package/dist/template/.opencode/command/plan.md +354 -82
- package/dist/template/.opencode/command/research.md +29 -2
- package/dist/template/.opencode/command/start.md +125 -4
- package/dist/template/.opencode/memory/project/beads-workflow.md +274 -42
- package/dist/template/.opencode/opencode.json +523 -557
- package/dist/template/.opencode/skill/source-code-research/SKILL.md +537 -0
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
description: Start working on a bead - claim it and prepare context
|
|
3
|
-
argument-hint: "<bead-id>"
|
|
3
|
+
argument-hint: "<bead-id> [--worktree] [--research]"
|
|
4
4
|
agent: build
|
|
5
5
|
---
|
|
6
6
|
|
|
@@ -8,6 +8,14 @@ agent: build
|
|
|
8
8
|
|
|
9
9
|
You're claiming a task and preparing to work on it. This is the entry point before implementation.
|
|
10
10
|
|
|
11
|
+
## Parse Arguments
|
|
12
|
+
|
|
13
|
+
| Argument | Default | Description |
|
|
14
|
+
| ------------ | -------- | ---------------------------------------------- |
|
|
15
|
+
| `<bead-id>` | required | The bead to start working on |
|
|
16
|
+
| `--worktree` | false | Create isolated git worktree for this work |
|
|
17
|
+
| `--research` | false | Run parallel subagent research before starting |
|
|
18
|
+
|
|
11
19
|
## Load Skills
|
|
12
20
|
|
|
13
21
|
```typescript
|
|
@@ -45,13 +53,29 @@ If you already have tasks in_progress, warn the user before claiming another.
|
|
|
45
53
|
|
|
46
54
|
!`bd show $ARGUMENTS`
|
|
47
55
|
|
|
56
|
+
Identify the task type from the bead:
|
|
57
|
+
|
|
58
|
+
| Type | Hierarchy Level | Typical Scope |
|
|
59
|
+
| --------- | --------------- | --------------------------------- |
|
|
60
|
+
| `epic` | Parent | Multi-session, has subtasks |
|
|
61
|
+
| `task` | Middle | Single session, may have subtasks |
|
|
62
|
+
| `subtask` | Leaf | Single focused unit of work |
|
|
63
|
+
|
|
64
|
+
Check for parent/child relationships:
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
bd dep tree $ARGUMENTS 2>/dev/null || echo "No dependencies"
|
|
68
|
+
```
|
|
69
|
+
|
|
48
70
|
## Claim The Task
|
|
49
71
|
|
|
50
72
|
```bash
|
|
51
73
|
bd update $ARGUMENTS --status in_progress
|
|
52
74
|
```
|
|
53
75
|
|
|
54
|
-
##
|
|
76
|
+
## Workspace Setup
|
|
77
|
+
|
|
78
|
+
### Option A: Feature Branch (default)
|
|
55
79
|
|
|
56
80
|
If not already on a feature branch:
|
|
57
81
|
|
|
@@ -59,6 +83,75 @@ If not already on a feature branch:
|
|
|
59
83
|
git checkout -b $ARGUMENTS
|
|
60
84
|
```
|
|
61
85
|
|
|
86
|
+
### Option B: Git Worktree (if --worktree flag)
|
|
87
|
+
|
|
88
|
+
For isolated work that won't conflict with main workspace:
|
|
89
|
+
|
|
90
|
+
```typescript
|
|
91
|
+
skill({ name: "using-git-worktrees" });
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
**When to use worktrees:**
|
|
95
|
+
|
|
96
|
+
- Epic-level work spanning multiple sessions
|
|
97
|
+
- Parallel work on different features
|
|
98
|
+
- Need to keep main workspace clean
|
|
99
|
+
- Long-running features with frequent context switches
|
|
100
|
+
|
|
101
|
+
**Worktree setup:**
|
|
102
|
+
|
|
103
|
+
```bash
|
|
104
|
+
# Verify .gitignore has worktree directory
|
|
105
|
+
grep -q "^\.worktrees/$" .gitignore || echo ".worktrees/" >> .gitignore
|
|
106
|
+
|
|
107
|
+
# Create worktree
|
|
108
|
+
git worktree add .worktrees/$ARGUMENTS -b $ARGUMENTS
|
|
109
|
+
|
|
110
|
+
# Navigate to worktree
|
|
111
|
+
cd .worktrees/$ARGUMENTS
|
|
112
|
+
|
|
113
|
+
# Install dependencies (auto-detect project type)
|
|
114
|
+
[ -f package.json ] && npm install
|
|
115
|
+
[ -f Cargo.toml ] && cargo build
|
|
116
|
+
[ -f requirements.txt ] && pip install -r requirements.txt
|
|
117
|
+
[ -f go.mod ] && go mod download
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
**Beads in worktrees:** The `.beads/` database is shared with main repo automatically. No special configuration needed unless using `BEADS_DIR` for external storage.
|
|
121
|
+
|
|
122
|
+
## Parallel Research (if --research flag or epic-level work)
|
|
123
|
+
|
|
124
|
+
For complex tasks, gather context before diving in:
|
|
125
|
+
|
|
126
|
+
```typescript
|
|
127
|
+
// Fire subagents in parallel - don't wait for results
|
|
128
|
+
Task({
|
|
129
|
+
subagent_type: "explore",
|
|
130
|
+
prompt: `Research codebase patterns for $ARGUMENTS:
|
|
131
|
+
- Find similar implementations
|
|
132
|
+
- Identify affected files
|
|
133
|
+
- Note testing patterns used
|
|
134
|
+
Return: File list, patterns found, testing approach`,
|
|
135
|
+
description: "Explore codebase for task",
|
|
136
|
+
});
|
|
137
|
+
|
|
138
|
+
Task({
|
|
139
|
+
subagent_type: "scout",
|
|
140
|
+
prompt: `Research external docs for $ARGUMENTS:
|
|
141
|
+
- API documentation for libraries involved
|
|
142
|
+
- Best practices for the approach
|
|
143
|
+
- Common pitfalls to avoid
|
|
144
|
+
Return: Key findings, code examples, warnings`,
|
|
145
|
+
description: "Scout external resources",
|
|
146
|
+
});
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
**Subagent delegation rules:**
|
|
150
|
+
|
|
151
|
+
- Subagents are **read-only** - they don't modify beads state
|
|
152
|
+
- Results return to you (build agent) for integration
|
|
153
|
+
- Use for research, not for implementation
|
|
154
|
+
|
|
62
155
|
## Existing Artifacts
|
|
63
156
|
|
|
64
157
|
!`ls .beads/artifacts/$ARGUMENTS/ 2>/dev/null || echo "No artifacts yet"`
|
|
@@ -68,10 +161,30 @@ Look for:
|
|
|
68
161
|
- `spec.md` - Requirements and constraints
|
|
69
162
|
- `research.md` - Previous research
|
|
70
163
|
- `plan.md` - Implementation plan
|
|
164
|
+
- `handoffs/` - Previous session handoffs
|
|
165
|
+
|
|
166
|
+
## Check Previous Sessions
|
|
167
|
+
|
|
168
|
+
```typescript
|
|
169
|
+
search_session({ query: "$ARGUMENTS" });
|
|
170
|
+
list_sessions({ limit: 3 });
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
Load context from previous work on this bead.
|
|
71
174
|
|
|
72
175
|
## Determine Next Step
|
|
73
176
|
|
|
74
|
-
Based on what exists:
|
|
177
|
+
Based on task type and what exists:
|
|
178
|
+
|
|
179
|
+
### For Epics (parent tasks)
|
|
180
|
+
|
|
181
|
+
| State | Next Command |
|
|
182
|
+
| ------------------ | --------------------------------- |
|
|
183
|
+
| No subtasks | `/plan $ARGUMENTS --create-beads` |
|
|
184
|
+
| Has ready subtasks | `/start <first-subtask-id>` |
|
|
185
|
+
| All subtasks done | `/finish $ARGUMENTS` |
|
|
186
|
+
|
|
187
|
+
### For Tasks/Subtasks (leaf work)
|
|
75
188
|
|
|
76
189
|
| Artifacts Found | Next Command |
|
|
77
190
|
| --------------------- | ----------------------- |
|
|
@@ -86,15 +199,23 @@ Based on what exists:
|
|
|
86
199
|
Started: $ARGUMENTS
|
|
87
200
|
━━━━━━━━━━━━━━━━━━━
|
|
88
201
|
|
|
202
|
+
Type: [epic/task/subtask]
|
|
89
203
|
Branch: $ARGUMENTS
|
|
204
|
+
Workspace: [main | worktree: .worktrees/$ARGUMENTS]
|
|
90
205
|
Status: in_progress
|
|
91
206
|
|
|
207
|
+
Hierarchy:
|
|
208
|
+
├── Parent: [parent-id or "none"]
|
|
209
|
+
└── Children: [count or "none"]
|
|
210
|
+
|
|
92
211
|
Artifacts:
|
|
93
212
|
• spec.md: [exists/missing]
|
|
94
213
|
• research.md: [exists/missing]
|
|
95
214
|
• plan.md: [exists/missing]
|
|
96
215
|
|
|
97
|
-
|
|
216
|
+
Research: [launched/skipped]
|
|
217
|
+
|
|
218
|
+
Next: [recommended command based on state]
|
|
98
219
|
```
|
|
99
220
|
|
|
100
221
|
## Quick Start
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
purpose: Complete beads workflow mapping for OpenCodeKit commands
|
|
3
|
-
updated: 2025-01-
|
|
3
|
+
updated: 2025-01-08
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Beads Workflow Best Practices
|
|
@@ -17,6 +17,199 @@ Based on Steve Yegge's best practices and official beads documentation.
|
|
|
17
17
|
| "Land the plane" = PUSH | `bd sync` means git push | Always verify push succeeded |
|
|
18
18
|
| Keep DB small | Performance degrades >500 issues | `bd cleanup --days 7` weekly |
|
|
19
19
|
|
|
20
|
+
## Hierarchy Model: Epic → Task → Subtask
|
|
21
|
+
|
|
22
|
+
### Hierarchy Levels
|
|
23
|
+
|
|
24
|
+
```
|
|
25
|
+
Epic (feature-level)
|
|
26
|
+
├── Task 1 (domain or phase)
|
|
27
|
+
│ ├── Subtask 1.1 (atomic work unit)
|
|
28
|
+
│ └── Subtask 1.2
|
|
29
|
+
├── Task 2 (blocked by Task 1)
|
|
30
|
+
│ └── Subtask 2.1
|
|
31
|
+
└── Task 3 (blocked by Task 2)
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
| Level | Scope | Duration | Agent Work |
|
|
35
|
+
| ------- | ------------ | ---------- | ------------------------------------- |
|
|
36
|
+
| Epic | Full feature | Days-weeks | Coordinate, delegate, not implement |
|
|
37
|
+
| Task | Domain/phase | Hours-day | May implement or delegate to subtasks |
|
|
38
|
+
| Subtask | Atomic unit | 30min-2hrs | Implement directly |
|
|
39
|
+
|
|
40
|
+
### Size Estimation
|
|
41
|
+
|
|
42
|
+
| Size | Tool Calls | Hierarchy Level | Session Scope |
|
|
43
|
+
| ---- | ---------- | ------------------ | ----------------- |
|
|
44
|
+
| S | ~10 | Subtask | Quick fix |
|
|
45
|
+
| M | ~30 | Task | Single session |
|
|
46
|
+
| L | ~100 | Task with subtasks | Single session |
|
|
47
|
+
| XL | 100+ | Epic required | Multiple sessions |
|
|
48
|
+
|
|
49
|
+
### Creating Hierarchy
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
# Create epic
|
|
53
|
+
bd create "User Authentication" -t epic -p 2
|
|
54
|
+
# Returns: bd-epic
|
|
55
|
+
|
|
56
|
+
# Create tasks with dependencies
|
|
57
|
+
bd create "Setup database schema" -t task -p 2
|
|
58
|
+
bd dep add bd-xxx1 bd-epic
|
|
59
|
+
|
|
60
|
+
bd create "Implement API endpoints" -t task -p 2
|
|
61
|
+
bd dep add bd-xxx2 bd-epic
|
|
62
|
+
bd dep add bd-xxx2 bd-xxx1 --type blocks # Sequential
|
|
63
|
+
|
|
64
|
+
# Create subtasks for complex tasks
|
|
65
|
+
bd create "POST /api/users endpoint" -t subtask -p 2
|
|
66
|
+
bd dep add bd-xxx2.1 bd-xxx2
|
|
67
|
+
|
|
68
|
+
bd create "GET /api/users/:id endpoint" -t subtask -p 2
|
|
69
|
+
bd dep add bd-xxx2.2 bd-xxx2
|
|
70
|
+
bd dep add bd-xxx2.2 bd-xxx2.1 --type blocks # Sequential subtasks
|
|
71
|
+
|
|
72
|
+
# Verify hierarchy
|
|
73
|
+
bd dep tree bd-epic
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
## Git Worktree Integration
|
|
77
|
+
|
|
78
|
+
### When to Use Worktrees
|
|
79
|
+
|
|
80
|
+
| Scenario | Use Worktree | Why |
|
|
81
|
+
| ---------------------------- | ------------ | -------------------------- |
|
|
82
|
+
| Epic-level work | ✅ Yes | Multi-session isolation |
|
|
83
|
+
| Parallel feature development | ✅ Yes | No context switching |
|
|
84
|
+
| Long-running experiments | ✅ Yes | Keep main workspace clean |
|
|
85
|
+
| Single task (S/M) | ❌ No | Branch is sufficient |
|
|
86
|
+
| Hotfix/quick-build | ❌ No | Overkill for small changes |
|
|
87
|
+
|
|
88
|
+
### Worktree Setup
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
# Verify .gitignore
|
|
92
|
+
grep -q "^\.worktrees/$" .gitignore || echo ".worktrees/" >> .gitignore
|
|
93
|
+
|
|
94
|
+
# Create worktree for feature
|
|
95
|
+
git worktree add .worktrees/bd-xxx -b feature/auth
|
|
96
|
+
|
|
97
|
+
# Navigate and setup
|
|
98
|
+
cd .worktrees/bd-xxx
|
|
99
|
+
npm install # or project-specific setup
|
|
100
|
+
|
|
101
|
+
# Verify clean baseline
|
|
102
|
+
npm test
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
### Beads + Worktree Architecture
|
|
106
|
+
|
|
107
|
+
```
|
|
108
|
+
main-repo/
|
|
109
|
+
├── .beads/ ← Shared database (all worktrees use this)
|
|
110
|
+
├── .worktrees/
|
|
111
|
+
│ ├── feature-a/ ← Worktree 1
|
|
112
|
+
│ │ └── (working copy)
|
|
113
|
+
│ └── feature-b/ ← Worktree 2
|
|
114
|
+
│ └── (working copy)
|
|
115
|
+
└── src/ ← Main working copy
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
**Key insight:** `.beads/` is shared. All worktrees access the same database.
|
|
119
|
+
|
|
120
|
+
### Worktree Daemon Behavior
|
|
121
|
+
|
|
122
|
+
| Mode | Configuration | Use When |
|
|
123
|
+
| ----------- | -------------------------------------- | ------------------------ |
|
|
124
|
+
| Default | Daemon auto-disabled in worktrees | Most cases |
|
|
125
|
+
| Sync branch | `bd config set sync-branch beads-sync` | Full daemon in worktrees |
|
|
126
|
+
| External DB | `export BEADS_DIR=~/project/.beads` | Complete separation |
|
|
127
|
+
| Sandbox | `bd --sandbox` or `BEADS_NO_DAEMON=1` | Claude Code, containers |
|
|
128
|
+
|
|
129
|
+
### Worktree Cleanup
|
|
130
|
+
|
|
131
|
+
```bash
|
|
132
|
+
# When feature complete
|
|
133
|
+
cd /main-repo
|
|
134
|
+
git worktree remove .worktrees/feature-a
|
|
135
|
+
|
|
136
|
+
# Or force if dirty
|
|
137
|
+
git worktree remove --force .worktrees/feature-a
|
|
138
|
+
|
|
139
|
+
# Clean orphaned worktrees
|
|
140
|
+
git worktree prune
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
## Subagent Delegation Patterns
|
|
144
|
+
|
|
145
|
+
### Agent Hierarchy
|
|
146
|
+
|
|
147
|
+
```
|
|
148
|
+
Leader Agents (touch beads, sync, coordinate)
|
|
149
|
+
├── build - Primary implementation agent
|
|
150
|
+
└── rush - Fast-track implementation agent
|
|
151
|
+
|
|
152
|
+
Subagents (read-only, stateless workers)
|
|
153
|
+
├── explore - Codebase search, patterns
|
|
154
|
+
├── scout - External docs, best practices
|
|
155
|
+
├── planner - Architecture, decomposition
|
|
156
|
+
├── review - Code review, debugging
|
|
157
|
+
└── vision - UI/UX, visual analysis
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
### Delegation Rules
|
|
161
|
+
|
|
162
|
+
| Agent | Can Do | Cannot Do |
|
|
163
|
+
| --------- | -------------------------- | ---------------------- |
|
|
164
|
+
| `build` | All beads ops, `bd sync` | - |
|
|
165
|
+
| `rush` | All beads ops, `bd sync` | - |
|
|
166
|
+
| `explore` | Read, grep, glob, ast-grep | Edit, write, `bd sync` |
|
|
167
|
+
| `scout` | Fetch, search, Context7 | Edit, write, `bd sync` |
|
|
168
|
+
| `planner` | Read, create artifacts | Edit files, `bd sync` |
|
|
169
|
+
| `review` | Read, analyze, suggest | Edit files, `bd sync` |
|
|
170
|
+
| `vision` | Analyze images, mockups | All beads operations |
|
|
171
|
+
|
|
172
|
+
### Parallel Research Pattern
|
|
173
|
+
|
|
174
|
+
Fire subagents in parallel, continue working immediately:
|
|
175
|
+
|
|
176
|
+
```typescript
|
|
177
|
+
// Launch both - don't wait
|
|
178
|
+
Task({
|
|
179
|
+
subagent_type: "explore",
|
|
180
|
+
prompt: `Find codebase patterns for [task]:
|
|
181
|
+
- Similar implementations
|
|
182
|
+
- Test patterns
|
|
183
|
+
- Affected files
|
|
184
|
+
Return: File paths, patterns, test approach`,
|
|
185
|
+
description: "Explore codebase",
|
|
186
|
+
});
|
|
187
|
+
|
|
188
|
+
Task({
|
|
189
|
+
subagent_type: "scout",
|
|
190
|
+
prompt: `Research best practices for [task]:
|
|
191
|
+
- Official documentation
|
|
192
|
+
- Common patterns
|
|
193
|
+
- Pitfalls to avoid
|
|
194
|
+
Return: Examples, warnings, recommendations`,
|
|
195
|
+
description: "Scout external docs",
|
|
196
|
+
});
|
|
197
|
+
|
|
198
|
+
// Continue working immediately
|
|
199
|
+
// Collect results when needed
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
### When to Delegate
|
|
203
|
+
|
|
204
|
+
| Situation | Delegate To | Why |
|
|
205
|
+
| ------------------------ | ----------- | -------------------------- |
|
|
206
|
+
| Need codebase patterns | `@explore` | Fast grep/glob/ast-grep |
|
|
207
|
+
| Need library docs | `@scout` | Context7, GitHub patterns |
|
|
208
|
+
| Complex planning | `@planner` | Structured decomposition |
|
|
209
|
+
| Code review before merge | `@review` | Fresh eyes, evidence-based |
|
|
210
|
+
| UI/mockup analysis | `@vision` | Visual expertise |
|
|
211
|
+
| Stuck on implementation | `@explore` | Fresh search perspective |
|
|
212
|
+
|
|
20
213
|
## Maintenance Schedule
|
|
21
214
|
|
|
22
215
|
| Task | Frequency | Command | Why |
|
|
@@ -101,23 +294,28 @@ model: gemini-2.5-pro # Override default model
|
|
|
101
294
|
|
|
102
295
|
### Lifecycle Commands (Touch Beads)
|
|
103
296
|
|
|
104
|
-
| Command
|
|
105
|
-
|
|
|
106
|
-
| `/triage`
|
|
107
|
-
| `/triage --quick`
|
|
108
|
-
| `/start <id>`
|
|
109
|
-
| `/
|
|
110
|
-
| `/
|
|
111
|
-
| `/
|
|
112
|
-
| `/
|
|
113
|
-
| `/
|
|
114
|
-
| `/
|
|
115
|
-
| `/
|
|
116
|
-
| `/
|
|
117
|
-
| `/
|
|
118
|
-
| `/
|
|
119
|
-
| `/
|
|
120
|
-
| `/
|
|
297
|
+
| Command | Agent | Beads Operations | When to Use |
|
|
298
|
+
| ---------------------------- | ------- | ------------------------------------------------------ | --------------------------- |
|
|
299
|
+
| `/triage` | build | `bd doctor`, `bd list`, `bd ready`, `bd cleanup` | Start of day, find work |
|
|
300
|
+
| `/triage --quick` | build | `bd ready`, `bd list --status=in_progress` | Fast check, what's next |
|
|
301
|
+
| `/start <id>` | build | `bd update --status in_progress`, `bd hooks install` | Claim a task |
|
|
302
|
+
| `/start <id> --worktree` | build | + Create git worktree | Isolated feature work |
|
|
303
|
+
| `/start <id> --research` | build | + Parallel subagent research | Complex task preparation |
|
|
304
|
+
| `/create` | build | `bd create`, `bd sync` | Create new tracked task |
|
|
305
|
+
| `/new-feature` | planner | `bd create` (epic + subtasks), `bd dep add`, `bd sync` | Complex feature with phases |
|
|
306
|
+
| `/new-feature --worktree` | planner | + Create git worktree for epic | Isolated feature branch |
|
|
307
|
+
| `/issue <num>` | build | `bd create`, `bd sync`, `gh issue comment` | Import GitHub issue |
|
|
308
|
+
| `/plan <id>` | planner | `bd create` (subtasks), `bd dep add`, `bd sync` | Break down task |
|
|
309
|
+
| `/plan <id> --create-beads` | planner | Create child beads after planning | Auto-hierarchy creation |
|
|
310
|
+
| `/implement <id>` | build | `bd update --status in_progress`, `bd sync` | Do the work |
|
|
311
|
+
| `/implement <id> --parallel` | build | + Aggressive subagent research | Complex implementation |
|
|
312
|
+
| `/commit [id]` | build | `bd sync` (if bead-id provided) | Commit with traceability |
|
|
313
|
+
| `/finish <id>` | build | `bd close`, `bd sync` | Complete task (asks first) |
|
|
314
|
+
| `/handoff <id>` | build | `bd sync` | Pause work, save context |
|
|
315
|
+
| `/resume <id>` | build | `bd update --status in_progress` | Continue previous work |
|
|
316
|
+
| `/pr <id>` | build | `bd-msg`, `bd sync` | Create pull request |
|
|
317
|
+
| `/fix` | build | `bd sync` (after user confirms commit) | Fix bugs with tracking |
|
|
318
|
+
| `/status` | explore | `bd status`, `bd list`, `bd-inbox`, `bd-release` | Dashboard view |
|
|
121
319
|
|
|
122
320
|
### Research Commands (Read-Only Beads)
|
|
123
321
|
|
|
@@ -152,27 +350,34 @@ model: gemini-2.5-pro # Override default model
|
|
|
152
350
|
/pr bd-xxx # Create PR (asks first)
|
|
153
351
|
```
|
|
154
352
|
|
|
155
|
-
### Pattern 2: Complex Feature (L/XL size)
|
|
353
|
+
### Pattern 2: Complex Feature with Worktree (L/XL size)
|
|
156
354
|
|
|
157
355
|
```
|
|
158
|
-
/triage
|
|
159
|
-
/new-feature "Feature"
|
|
160
|
-
/
|
|
161
|
-
/
|
|
162
|
-
/
|
|
163
|
-
/
|
|
356
|
+
/triage # Full triage with health check
|
|
357
|
+
/new-feature "Feature" --worktree # Creates epic + subtasks + worktree
|
|
358
|
+
cd .worktrees/bd-epic # Enter worktree
|
|
359
|
+
/start bd-xxx.1 # Start first task
|
|
360
|
+
/implement bd-xxx.1 # Implement
|
|
361
|
+
/finish bd-xxx.1 # Complete task
|
|
362
|
+
/start bd-xxx.2 # Next task (now unblocked)
|
|
363
|
+
/implement bd-xxx.2 # Continue...
|
|
364
|
+
/finish bd-xxx.2 # Complete
|
|
164
365
|
...
|
|
165
|
-
/finish bd-
|
|
366
|
+
/finish bd-epic # Close epic when all tasks done
|
|
367
|
+
git worktree remove .worktrees/bd-epic # Cleanup worktree
|
|
166
368
|
```
|
|
167
369
|
|
|
168
|
-
### Pattern 3: Research-First
|
|
370
|
+
### Pattern 3: Research-First with Subagent Delegation
|
|
169
371
|
|
|
170
372
|
```
|
|
171
|
-
/create "Complex task"
|
|
172
|
-
/
|
|
173
|
-
/plan bd-xxx
|
|
174
|
-
/implement bd-xxx
|
|
175
|
-
/finish bd-xxx
|
|
373
|
+
/create "Complex task" # Create bead with spec
|
|
374
|
+
/start bd-xxx --research # Claim + parallel subagent research
|
|
375
|
+
/plan bd-xxx --create-beads # Design with auto-hierarchy
|
|
376
|
+
/implement bd-xxx.1 # Implement first subtask
|
|
377
|
+
/finish bd-xxx.1 # Complete subtask
|
|
378
|
+
/implement bd-xxx.2 --parallel # Next subtask with research
|
|
379
|
+
/finish bd-xxx.2 # Complete subtask
|
|
380
|
+
/finish bd-xxx # Close parent task
|
|
176
381
|
```
|
|
177
382
|
|
|
178
383
|
### Pattern 4: Bug Fix
|
|
@@ -201,6 +406,26 @@ model: gemini-2.5-pro # Override default model
|
|
|
201
406
|
/quick-build "fix typo" # Single file, <30 min, commits directly
|
|
202
407
|
```
|
|
203
408
|
|
|
409
|
+
### Pattern 7: Epic with Parallel Workstreams
|
|
410
|
+
|
|
411
|
+
```
|
|
412
|
+
/new-feature "Big Feature" --worktree
|
|
413
|
+
# Creates: bd-epic with bd-xxx1, bd-xxx2, bd-xxx3
|
|
414
|
+
|
|
415
|
+
# Agent 1 (main worktree)
|
|
416
|
+
/start bd-xxx1 --worktree
|
|
417
|
+
/implement bd-xxx1
|
|
418
|
+
/finish bd-xxx1
|
|
419
|
+
|
|
420
|
+
# Agent 2 (separate worktree - if independent)
|
|
421
|
+
/start bd-xxx2 --worktree
|
|
422
|
+
/implement bd-xxx2
|
|
423
|
+
/finish bd-xxx2
|
|
424
|
+
|
|
425
|
+
# Merge when all complete
|
|
426
|
+
/finish bd-epic
|
|
427
|
+
```
|
|
428
|
+
|
|
204
429
|
## Agent Boundaries
|
|
205
430
|
|
|
206
431
|
### Leader Agents (Touch Beads)
|
|
@@ -232,7 +457,7 @@ bd - reserve({ paths: ["src/auth.ts"], ttl: 600 });
|
|
|
232
457
|
bd - release({ paths: ["src/auth.ts"] });
|
|
233
458
|
|
|
234
459
|
// Check active locks
|
|
235
|
-
bd - release(); // No
|
|
460
|
+
bd - release({ _: true }); // No paths = list locks
|
|
236
461
|
```
|
|
237
462
|
|
|
238
463
|
## Commit Message Format
|
|
@@ -253,18 +478,22 @@ Closes: bd-a1b2c3
|
|
|
253
478
|
2. [ ] `bd sync` run (pushes to git)
|
|
254
479
|
3. [ ] If incomplete: `/handoff <id>` created
|
|
255
480
|
4. [ ] If complete: `/finish <id>` run
|
|
256
|
-
5. [ ] No stale file locks
|
|
481
|
+
5. [ ] No stale file locks (`bd-release({ _: true })`)
|
|
482
|
+
6. [ ] Worktrees cleaned up (if used)
|
|
257
483
|
|
|
258
484
|
## Troubleshooting
|
|
259
485
|
|
|
260
|
-
| Problem
|
|
261
|
-
|
|
|
262
|
-
| "bd command not found"
|
|
263
|
-
| Orphaned issues
|
|
264
|
-
| DB too large
|
|
265
|
-
| Sync conflicts
|
|
266
|
-
| Stale handoff
|
|
267
|
-
| Task not in `bd ready`
|
|
486
|
+
| Problem | Solution |
|
|
487
|
+
| ---------------------------- | --------------------------------------------------- |
|
|
488
|
+
| "bd command not found" | `npm install -g beads-village` |
|
|
489
|
+
| Orphaned issues | `bd doctor --fix` |
|
|
490
|
+
| DB too large | `bd cleanup --days 3` |
|
|
491
|
+
| Sync conflicts | `bd sync --force` (careful!) |
|
|
492
|
+
| Stale handoff | Check if rebase needed before `/resume` |
|
|
493
|
+
| Task not in `bd ready` | Check blockers: `bd show <id>` |
|
|
494
|
+
| "Branch already checked out" | `rm -rf .git/beads-worktrees && git worktree prune` |
|
|
495
|
+
| Daemon issues in worktree | `bd config set sync-branch beads-sync` |
|
|
496
|
+
| Sandbox environment | `bd --sandbox` or `BEADS_NO_DAEMON=1` |
|
|
268
497
|
|
|
269
498
|
## Anti-Patterns
|
|
270
499
|
|
|
@@ -276,3 +505,6 @@ Closes: bd-a1b2c3
|
|
|
276
505
|
| Subagents running `bd sync` | Coordination issues | Only leader agents sync |
|
|
277
506
|
| Force through complex with quick-build | Technical debt | Proper `/create` workflow |
|
|
278
507
|
| Ignore `bd doctor` warnings | Corruption risk | Fix issues promptly |
|
|
508
|
+
| Skip worktree for XL features | Merge conflicts | Use `--worktree` flag |
|
|
509
|
+
| Implement epic directly | Too large | Work on subtasks instead |
|
|
510
|
+
| Wait for subagent results | Blocks progress | Fire parallel, continue working |
|