opencodekit 0.16.6 → 0.16.8
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/command/design.md +1 -1
- package/dist/template/.opencode/command/review-codebase.md +2 -2
- package/dist/template/.opencode/command/ui-review.md +1 -1
- package/dist/template/.opencode/dcp.jsonc +2 -0
- package/dist/template/.opencode/memory/project/tech-stack.md +1 -1
- package/dist/template/.opencode/opencode.json +65 -5
- package/dist/template/.opencode/package.json +1 -1
- package/package.json +1 -1
- package/dist/template/.opencode/memory/beads-workflow.md +0 -564
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.8",
|
|
763
763
|
description: "CLI tool for bootstrapping and managing OpenCodeKit projects",
|
|
764
764
|
keywords: ["agents", "cli", "mcp", "opencode", "opencodekit", "template"],
|
|
765
765
|
license: "MIT",
|
|
@@ -35,7 +35,7 @@ Parse `$ARGUMENTS` to determine what to review:
|
|
|
35
35
|
| Input | Scope | How to Get Code |
|
|
36
36
|
| ------------------------ | ---------------------- | ------------------------------------------- |
|
|
37
37
|
| File/directory path | That path only | `read` or `glob` + `read` |
|
|
38
|
-
| Bead ID (e.g., `
|
|
38
|
+
| Bead ID (e.g., `bd-123`) | Implementation vs spec | `br show` then `git diff` from spec |
|
|
39
39
|
| PR number (e.g., `#45`) | PR changes | `gh pr diff 45` |
|
|
40
40
|
| `all` or empty | Recent changes | `git diff main...HEAD` or `git diff HEAD~5` |
|
|
41
41
|
|
|
@@ -123,7 +123,7 @@ Review each category with specific focus:
|
|
|
123
123
|
For each Critical or Important finding:
|
|
124
124
|
|
|
125
125
|
```bash
|
|
126
|
-
br create "[Review] <brief issue description>"
|
|
126
|
+
br create "[Review] <brief issue description>" --type bug --priority 1
|
|
127
127
|
```
|
|
128
128
|
|
|
129
129
|
Skip creating beads for Minor issues (just report them).
|
|
@@ -284,7 +284,7 @@ If `--bead=<id>` provided:
|
|
|
284
284
|
|
|
285
285
|
```bash
|
|
286
286
|
# Create issues for critical findings
|
|
287
|
-
br create "[UI] Fix invisible focus states"
|
|
287
|
+
br create "[UI] Fix invisible focus states" --type bug --priority 1
|
|
288
288
|
|
|
289
289
|
# Then link to parent bead
|
|
290
290
|
br dep add <task-id> <bead-id>
|
|
@@ -30,6 +30,8 @@
|
|
|
30
30
|
"settings": {
|
|
31
31
|
"nudgeEnabled": true,
|
|
32
32
|
"nudgeFrequency": 10,
|
|
33
|
+
// Trigger compression at ~94% of Copilot's 128k context limit
|
|
34
|
+
"contextLimit": 120000,
|
|
33
35
|
// Protect state-modifying and critical workflow tools
|
|
34
36
|
// LSP excluded: ephemeral exploration, prune after understanding
|
|
35
37
|
"protectedTools": [
|
|
@@ -45,7 +45,7 @@ This file is automatically injected into ALL AI prompts via `opencode.json` inst
|
|
|
45
45
|
## Active Integrations
|
|
46
46
|
|
|
47
47
|
- **OpenCode AI:** @opencode-ai/plugin (^1.1.12) - OpenCode integration
|
|
48
|
-
- **Beads CLI:**
|
|
48
|
+
- **Beads CLI:** beads_rust (br) - Task tracking CLI
|
|
49
49
|
|
|
50
50
|
---
|
|
51
51
|
|
|
@@ -165,17 +165,34 @@
|
|
|
165
165
|
"reasoning": true,
|
|
166
166
|
"tool_call": true,
|
|
167
167
|
"options": {
|
|
168
|
-
"
|
|
168
|
+
"thinking": {
|
|
169
|
+
"type": "enabled",
|
|
170
|
+
"budgetTokens": 8192,
|
|
171
|
+
"reasoning_effort": "high"
|
|
172
|
+
},
|
|
173
|
+
"interleaved": {
|
|
174
|
+
"field": "reasoning_content"
|
|
175
|
+
}
|
|
169
176
|
},
|
|
170
177
|
"variants": {
|
|
171
178
|
"high": {
|
|
172
179
|
"options": {
|
|
173
|
-
"
|
|
180
|
+
"thinkingBudget": 16384,
|
|
181
|
+
"type": "enabled",
|
|
182
|
+
"reasoning_effort": "high"
|
|
183
|
+
},
|
|
184
|
+
"interleaved": {
|
|
185
|
+
"field": "reasoning_content"
|
|
174
186
|
}
|
|
175
187
|
},
|
|
176
188
|
"max": {
|
|
177
189
|
"options": {
|
|
178
|
-
"
|
|
190
|
+
"thinkingBudget": 32768,
|
|
191
|
+
"type": "enabled",
|
|
192
|
+
"reasoning_effort": "high"
|
|
193
|
+
},
|
|
194
|
+
"interleaved": {
|
|
195
|
+
"field": "reasoning_content"
|
|
179
196
|
}
|
|
180
197
|
}
|
|
181
198
|
}
|
|
@@ -257,7 +274,8 @@
|
|
|
257
274
|
"tool_call": true,
|
|
258
275
|
"options": {
|
|
259
276
|
"reasoningEffort": "medium",
|
|
260
|
-
"reasoningSummary": "auto"
|
|
277
|
+
"reasoningSummary": "auto",
|
|
278
|
+
"textVerbosity": "medium"
|
|
261
279
|
},
|
|
262
280
|
"variants": {
|
|
263
281
|
"high": {
|
|
@@ -282,7 +300,8 @@
|
|
|
282
300
|
"tool_call": true,
|
|
283
301
|
"options": {
|
|
284
302
|
"reasoningEffort": "medium",
|
|
285
|
-
"reasoningSummary": "auto"
|
|
303
|
+
"reasoningSummary": "auto",
|
|
304
|
+
"textVerbosity": "medium"
|
|
286
305
|
},
|
|
287
306
|
"variants": {
|
|
288
307
|
"fast": {
|
|
@@ -359,6 +378,47 @@
|
|
|
359
378
|
"top_p": 0.95
|
|
360
379
|
},
|
|
361
380
|
"reasoning": true
|
|
381
|
+
},
|
|
382
|
+
"kimi-k2.5-free": {
|
|
383
|
+
"limit": {
|
|
384
|
+
"context": 262144,
|
|
385
|
+
"output": 32768
|
|
386
|
+
},
|
|
387
|
+
"temperature": true,
|
|
388
|
+
"reasoning": true,
|
|
389
|
+
"tool_call": true,
|
|
390
|
+
"options": {
|
|
391
|
+
"thinking": {
|
|
392
|
+
"type": "enabled",
|
|
393
|
+
"budgetTokens": 8192,
|
|
394
|
+
"reasoning_effort": "high"
|
|
395
|
+
},
|
|
396
|
+
"interleaved": {
|
|
397
|
+
"field": "reasoning_content"
|
|
398
|
+
}
|
|
399
|
+
},
|
|
400
|
+
"variants": {
|
|
401
|
+
"high": {
|
|
402
|
+
"options": {
|
|
403
|
+
"thinkingBudget": 16384,
|
|
404
|
+
"type": "enabled",
|
|
405
|
+
"reasoning_effort": "high"
|
|
406
|
+
},
|
|
407
|
+
"interleaved": {
|
|
408
|
+
"field": "reasoning_content"
|
|
409
|
+
}
|
|
410
|
+
},
|
|
411
|
+
"max": {
|
|
412
|
+
"options": {
|
|
413
|
+
"thinkingBudget": 32768,
|
|
414
|
+
"type": "enabled",
|
|
415
|
+
"reasoning_effort": "high"
|
|
416
|
+
},
|
|
417
|
+
"interleaved": {
|
|
418
|
+
"field": "reasoning_content"
|
|
419
|
+
}
|
|
420
|
+
}
|
|
421
|
+
}
|
|
362
422
|
}
|
|
363
423
|
}
|
|
364
424
|
},
|
package/package.json
CHANGED
|
@@ -1,564 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
purpose: Complete beads workflow mapping for OpenCodeKit commands
|
|
3
|
-
updated: 2025-01-08
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Beads Workflow Best Practices
|
|
7
|
-
|
|
8
|
-
Based on Steve Yegge's best practices and official beads documentation.
|
|
9
|
-
|
|
10
|
-
## Core Principles
|
|
11
|
-
|
|
12
|
-
| Principle | Why | How |
|
|
13
|
-
| ------------------------ | -------------------------------- | ------------------------------------ |
|
|
14
|
-
| One task per session | Fresh context prevents confusion | Restart after `br close` |
|
|
15
|
-
| Plan outside beads first | Better planning tools exist | Use `/brainstorm` → `/plan` → import |
|
|
16
|
-
| File lots of issues | Track any work >2 minutes | `br create` liberally |
|
|
17
|
-
| "Land the plane" = PUSH | `br sync --flush-only` means git push | Always verify push succeeded |
|
|
18
|
-
| Keep DB small | Performance degrades >500 issues | `br cleanup --days 7` weekly |
|
|
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
|
-
br create "User Authentication" -t epic -p 2
|
|
54
|
-
# Returns: bd-epic
|
|
55
|
-
|
|
56
|
-
# Create tasks with dependencies
|
|
57
|
-
br create "Setup database schema" -t task -p 2
|
|
58
|
-
br dep add bd-xxx1 bd-epic
|
|
59
|
-
|
|
60
|
-
br create "Implement API endpoints" -t task -p 2
|
|
61
|
-
br dep add bd-xxx2 bd-epic
|
|
62
|
-
br dep add bd-xxx2 bd-xxx1 --type blocks # Sequential
|
|
63
|
-
|
|
64
|
-
# Create subtasks for complex tasks
|
|
65
|
-
br create "POST /api/users endpoint" -t subtask -p 2
|
|
66
|
-
br dep add bd-xxx2.1 bd-xxx2
|
|
67
|
-
|
|
68
|
-
br create "GET /api/users/:id endpoint" -t subtask -p 2
|
|
69
|
-
br dep add bd-xxx2.2 bd-xxx2
|
|
70
|
-
br dep add bd-xxx2.2 bd-xxx2.1 --type blocks # Sequential subtasks
|
|
71
|
-
|
|
72
|
-
# Verify hierarchy
|
|
73
|
-
br 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 | `br config set sync-branch beads-sync` | Full daemon in worktrees |
|
|
126
|
-
| External DB | `export BEADS_DIR=~/project/.beads` | Complete separation |
|
|
127
|
-
| Sandbox | `br --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
|
-
└── plan - Architecture and planning agent
|
|
151
|
-
|
|
152
|
-
Subagents (read-only, stateless workers)
|
|
153
|
-
├── general - Fast, well-defined tasks
|
|
154
|
-
├── explore - Codebase search, patterns
|
|
155
|
-
├── scout - External docs, best practices
|
|
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, `br sync --flush-only` | - |
|
|
165
|
-
| `plan` | All beads ops, `br sync --flush-only` | - |
|
|
166
|
-
| `general` | Read, small edits | `br sync --flush-only`, beads write |
|
|
167
|
-
| `explore` | Read, grep, glob | Edit, write, `br sync --flush-only` |
|
|
168
|
-
| `scout` | Fetch, search, Context7 | Edit, write, `br sync --flush-only` |
|
|
169
|
-
| `plan` | Read, create artifacts | Edit files, `br sync --flush-only` |
|
|
170
|
-
| `review` | Read, analyze, suggest | Edit files, `br sync --flush-only` |
|
|
171
|
-
| `vision` | Analyze images, mockups | All beads operations |
|
|
172
|
-
|
|
173
|
-
### Parallel Research Pattern
|
|
174
|
-
|
|
175
|
-
Fire subagents in parallel, continue working immediately:
|
|
176
|
-
|
|
177
|
-
```typescript
|
|
178
|
-
// Launch both - don't wait
|
|
179
|
-
Task({
|
|
180
|
-
subagent_type: "explore",
|
|
181
|
-
prompt: `Find codebase patterns for [task]:
|
|
182
|
-
- Similar implementations
|
|
183
|
-
- Test patterns
|
|
184
|
-
- Affected files
|
|
185
|
-
Return: File paths, patterns, test approach`,
|
|
186
|
-
description: "Explore codebase",
|
|
187
|
-
});
|
|
188
|
-
|
|
189
|
-
Task({
|
|
190
|
-
subagent_type: "scout",
|
|
191
|
-
prompt: `Research best practices for [task]:
|
|
192
|
-
- Official documentation
|
|
193
|
-
- Common patterns
|
|
194
|
-
- Pitfalls to avoid
|
|
195
|
-
Return: Examples, warnings, recommendations`,
|
|
196
|
-
description: "Scout external docs",
|
|
197
|
-
});
|
|
198
|
-
|
|
199
|
-
// Continue working immediately
|
|
200
|
-
// Collect results when needed
|
|
201
|
-
```
|
|
202
|
-
|
|
203
|
-
### When to Delegate
|
|
204
|
-
|
|
205
|
-
| Situation | Delegate To | Why |
|
|
206
|
-
| ------------------------ | ----------- | -------------------------- |
|
|
207
|
-
| Need codebase patterns | `@explore` | Fast grep/glob |
|
|
208
|
-
| Need library docs | `@scout` | Context7, GitHub patterns |
|
|
209
|
-
| Complex planning | `@plan` | Structured decomposition |
|
|
210
|
-
| Code review before merge | `@review` | Fresh eyes, evidence-based |
|
|
211
|
-
| UI/mockup analysis | `@vision` | Visual expertise |
|
|
212
|
-
| Stuck on implementation | `@explore` | Fresh search perspective |
|
|
213
|
-
|
|
214
|
-
## Maintenance Schedule
|
|
215
|
-
|
|
216
|
-
| Task | Frequency | Command | Why |
|
|
217
|
-
| ------------ | -------------- | --------------------- | -------------------------------------- |
|
|
218
|
-
| Health check | Weekly | `br doctor --fix` | Repairs orphaned issues, sync problems |
|
|
219
|
-
| Cleanup | Every few days | `br cleanup --days 7` | Keep DB under 200-500 issues |
|
|
220
|
-
| Upgrade | Weekly | `br upgrade` | Latest features and fixes |
|
|
221
|
-
| Git hooks | Once per repo | `br hooks install` | Auto-sync on commit/merge/checkout |
|
|
222
|
-
|
|
223
|
-
## Command Configuration Best Practices
|
|
224
|
-
|
|
225
|
-
Based on [OpenCode Command Docs](https://opencode.ai/docs/commands/).
|
|
226
|
-
|
|
227
|
-
### Frontmatter Options
|
|
228
|
-
|
|
229
|
-
```yaml
|
|
230
|
-
---
|
|
231
|
-
description: Short description shown in TUI command list
|
|
232
|
-
argument-hint: "<required> [optional] [--flag]"
|
|
233
|
-
agent: build | plan | scout | explore | review | vision
|
|
234
|
-
subtask: true # Run as subagent (doesn't pollute primary context)
|
|
235
|
-
model: gemini-2.5-pro # Override default model
|
|
236
|
-
---
|
|
237
|
-
```
|
|
238
|
-
|
|
239
|
-
### Prompt Syntax
|
|
240
|
-
|
|
241
|
-
| Syntax | Purpose | Example |
|
|
242
|
-
| ------------ | ------------------------ | ----------------------------- |
|
|
243
|
-
| `$ARGUMENTS` | All arguments as string | `/fix $ARGUMENTS` |
|
|
244
|
-
| `$1`, `$2` | Positional arguments | `/start $1` → `/start bd-abc` |
|
|
245
|
-
| `!`command`` | Inject shell output | `!`git status`` |
|
|
246
|
-
| `@filepath` | Include file content | `@src/config.ts` |
|
|
247
|
-
| `$SELECTION` | Current editor selection | For IDE integrations |
|
|
248
|
-
|
|
249
|
-
### When to Use `subtask: true`
|
|
250
|
-
|
|
251
|
-
**Use subtask for research/analysis** - prevents context pollution in primary agent:
|
|
252
|
-
|
|
253
|
-
| Command Type | `subtask: true`? | Why |
|
|
254
|
-
| ------------------------ | ---------------- | ------------------------------------ |
|
|
255
|
-
| Research/exploration | ✅ Yes | Heavy reads, doesn't need to persist |
|
|
256
|
-
| Code review/analysis | ✅ Yes | Analysis output, not implementation |
|
|
257
|
-
| UI/UX analysis | ✅ Yes | Design feedback, not code changes |
|
|
258
|
-
| Status/dashboard | ✅ Yes | Read-only information gathering |
|
|
259
|
-
| Implementation | ❌ No | Needs full context for edits |
|
|
260
|
-
| Lifecycle (start/finish) | ❌ No | Coordinates state, needs persistence |
|
|
261
|
-
| Generation (artifacts) | ❌ No | Creates files that need tracking |
|
|
262
|
-
|
|
263
|
-
### Commands by Category
|
|
264
|
-
|
|
265
|
-
#### Research Commands (`subtask: true`)
|
|
266
|
-
|
|
267
|
-
```
|
|
268
|
-
/research, /analyze-project, /review-codebase, /brainstorm,
|
|
269
|
-
/status, /summarize, /init, /ui-review, /accessibility-check,
|
|
270
|
-
/analyze-mockup, /design-audit, /research-ui, /design
|
|
271
|
-
```
|
|
272
|
-
|
|
273
|
-
#### Lifecycle Commands (NO subtask)
|
|
274
|
-
|
|
275
|
-
```
|
|
276
|
-
/triage, /start, /create, /new-feature, /issue, /plan,
|
|
277
|
-
/implement, /commit, /finish, /handoff, /resume, /pr, /fix
|
|
278
|
-
```
|
|
279
|
-
|
|
280
|
-
#### Generation Commands (NO subtask)
|
|
281
|
-
|
|
282
|
-
```
|
|
283
|
-
/generate-image, /generate-icon, /generate-diagram,
|
|
284
|
-
/generate-pattern, /generate-storyboard, /edit-image, /restore-image
|
|
285
|
-
```
|
|
286
|
-
|
|
287
|
-
#### Utility Commands (NO subtask)
|
|
288
|
-
|
|
289
|
-
```
|
|
290
|
-
/quick-build, /fix-ci, /fix-types, /fix-ui,
|
|
291
|
-
/revert-feature, /integration-test, /skill-create, /skill-optimize
|
|
292
|
-
```
|
|
293
|
-
|
|
294
|
-
## Command → Beads Mapping
|
|
295
|
-
|
|
296
|
-
### Lifecycle Commands (Touch Beads)
|
|
297
|
-
|
|
298
|
-
| Command | Agent | Beads Operations | When to Use |
|
|
299
|
-
| ---------------------------- | ------- | ------------------------------------------------------ | --------------------------- |
|
|
300
|
-
| `/triage` | build | `br doctor`, `br list`, `br ready`, `br cleanup` | Start of day, find work |
|
|
301
|
-
| `/triage --quick` | build | `br ready`, `br list --status=in_progress` | Fast check, what's next |
|
|
302
|
-
| `/start <id>` | build | `br update --status in_progress`, `br hooks install` | Claim a task |
|
|
303
|
-
| `/start <id> --worktree` | build | + Create git worktree | Isolated feature work |
|
|
304
|
-
| `/start <id> --research` | build | + Parallel subagent research | Complex task preparation |
|
|
305
|
-
| `/create` | build | `br create`, `br sync --flush-only` | Create new tracked task |
|
|
306
|
-
| `/new-feature` | plan | `br create` (epic + subtasks), `br dep add`, `br sync --flush-only` | Complex feature with phases |
|
|
307
|
-
| `/new-feature --worktree` | plan | + Create git worktree for epic | Isolated feature branch |
|
|
308
|
-
| `/issue <num>` | build | `br create`, `br sync --flush-only`, `gh issue comment` | Import GitHub issue |
|
|
309
|
-
| `/plan <id>` | plan | `br create` (subtasks), `br dep add`, `br sync --flush-only` | Break down task |
|
|
310
|
-
| `/plan <id> --create-beads` | plan | Create child beads after planning | Auto-hierarchy creation |
|
|
311
|
-
| `/implement <id>` | build | `br update --status in_progress`, `br sync --flush-only` | Do the work |
|
|
312
|
-
| `/implement <id> --parallel` | build | + Aggressive subagent research | Complex implementation |
|
|
313
|
-
| `/commit [id]` | build | `br sync --flush-only` (if bead-id provided) | Commit with traceability |
|
|
314
|
-
| `/finish <id>` | build | `br close`, `br sync --flush-only` | Complete task (asks first) |
|
|
315
|
-
| `/handoff <id>` | build | `br sync --flush-only` | Pause work, save context |
|
|
316
|
-
| `/resume <id>` | build | `br update --status in_progress` | Continue previous work |
|
|
317
|
-
| `/pr <id>` | build | `br-msg`, `br sync --flush-only` | Create pull request |
|
|
318
|
-
| `/fix` | build | `br sync --flush-only` (after user confirms commit) | Fix bugs with tracking |
|
|
319
|
-
| `/status` | explore | `br status`, `br list`, `br-inbox`, `br-release` | Dashboard view |
|
|
320
|
-
|
|
321
|
-
### Research Commands (Read-Only Beads)
|
|
322
|
-
|
|
323
|
-
| Command | Agent | Beads Operations | Notes |
|
|
324
|
-
| ------------------ | ------- | --------------------- | -------------------------- |
|
|
325
|
-
| `/research <id>` | scout | `br show` (read-only) | NO `br sync --flush-only` - subagent |
|
|
326
|
-
| `/brainstorm` | plan | None | Pure planning, no tracking |
|
|
327
|
-
| `/analyze-project` | explore | None | Codebase exploration |
|
|
328
|
-
| `/summarize` | explore | None | Session/code summary |
|
|
329
|
-
| `/review-codebase` | review | None | Code review |
|
|
330
|
-
|
|
331
|
-
### Non-Beads Commands
|
|
332
|
-
|
|
333
|
-
| Command | Agent | Purpose |
|
|
334
|
-
| ---------------------- | ------ | ------------------------------ |
|
|
335
|
-
| `/quick-build` | build | Trivial fixes, no bead created |
|
|
336
|
-
| `/design` | plan | Architecture design |
|
|
337
|
-
| `/ui-review` | vision | UI/UX analysis |
|
|
338
|
-
| `/accessibility-check` | vision | A11y audit |
|
|
339
|
-
| `/fix-ci` | build | CI pipeline fixes |
|
|
340
|
-
| `/fix-types` | build | TypeScript errors |
|
|
341
|
-
|
|
342
|
-
## Workflow Patterns
|
|
343
|
-
|
|
344
|
-
### Pattern 1: Standard Task (S/M size)
|
|
345
|
-
|
|
346
|
-
```
|
|
347
|
-
/triage --quick # Find ready work
|
|
348
|
-
/start bd-xxx # Claim task, create branch
|
|
349
|
-
/implement bd-xxx # Do the work
|
|
350
|
-
/finish bd-xxx # Verify, commit (asks first), close
|
|
351
|
-
/pr bd-xxx # Create PR (asks first)
|
|
352
|
-
```
|
|
353
|
-
|
|
354
|
-
### Pattern 2: Complex Feature with Worktree (L/XL size)
|
|
355
|
-
|
|
356
|
-
```
|
|
357
|
-
/triage # Full triage with health check
|
|
358
|
-
/new-feature "Feature" --worktree # Creates epic + subtasks + worktree
|
|
359
|
-
cd .worktrees/bd-epic # Enter worktree
|
|
360
|
-
/start bd-xxx.1 # Start first task
|
|
361
|
-
/implement bd-xxx.1 # Implement
|
|
362
|
-
/finish bd-xxx.1 # Complete task
|
|
363
|
-
/start bd-xxx.2 # Next task (now unblocked)
|
|
364
|
-
/implement bd-xxx.2 # Continue...
|
|
365
|
-
/finish bd-xxx.2 # Complete
|
|
366
|
-
...
|
|
367
|
-
/finish bd-epic # Close epic when all tasks done
|
|
368
|
-
git worktree remove .worktrees/bd-epic # Cleanup worktree
|
|
369
|
-
```
|
|
370
|
-
|
|
371
|
-
### Pattern 3: Research-First with Subagent Delegation
|
|
372
|
-
|
|
373
|
-
```
|
|
374
|
-
/create "Complex task" # Create bead with spec
|
|
375
|
-
/start bd-xxx --research # Claim + parallel subagent research
|
|
376
|
-
/plan bd-xxx --create-beads # Design with auto-hierarchy
|
|
377
|
-
/implement bd-xxx.1 # Implement first subtask
|
|
378
|
-
/finish bd-xxx.1 # Complete subtask
|
|
379
|
-
/implement bd-xxx.2 --parallel # Next subtask with research
|
|
380
|
-
/finish bd-xxx.2 # Complete subtask
|
|
381
|
-
/finish bd-xxx # Close parent task
|
|
382
|
-
```
|
|
383
|
-
|
|
384
|
-
### Pattern 4: Bug Fix
|
|
385
|
-
|
|
386
|
-
```
|
|
387
|
-
/issue 123 # Import GitHub issue as bead
|
|
388
|
-
/start bd-xxx # Claim
|
|
389
|
-
/fix bd-xxx # Diagnose + fix (asks before commit)
|
|
390
|
-
/finish bd-xxx # Verify + close
|
|
391
|
-
/pr bd-xxx # Create PR
|
|
392
|
-
```
|
|
393
|
-
|
|
394
|
-
### Pattern 5: Session Handoff
|
|
395
|
-
|
|
396
|
-
```
|
|
397
|
-
/implement bd-xxx # Working on task...
|
|
398
|
-
# Context getting large or end of day
|
|
399
|
-
/handoff bd-xxx # Save progress, creates handoff.md
|
|
400
|
-
# New session
|
|
401
|
-
/resume bd-xxx # Load context, continue
|
|
402
|
-
```
|
|
403
|
-
|
|
404
|
-
### Pattern 6: Trivial Fix (No Bead)
|
|
405
|
-
|
|
406
|
-
```
|
|
407
|
-
/quick-build "fix typo" # Single file, <30 min, commits directly
|
|
408
|
-
```
|
|
409
|
-
|
|
410
|
-
### Pattern 7: Epic with Parallel Workstreams
|
|
411
|
-
|
|
412
|
-
```
|
|
413
|
-
/new-feature "Big Feature" --worktree
|
|
414
|
-
# Creates: bd-epic with bd-xxx1, bd-xxx2, bd-xxx3
|
|
415
|
-
|
|
416
|
-
# Agent 1 (main worktree)
|
|
417
|
-
/start bd-xxx1 --worktree
|
|
418
|
-
/implement bd-xxx1
|
|
419
|
-
/finish bd-xxx1
|
|
420
|
-
|
|
421
|
-
# Agent 2 (separate worktree - if independent)
|
|
422
|
-
/start bd-xxx2 --worktree
|
|
423
|
-
/implement bd-xxx2
|
|
424
|
-
/finish bd-xxx2
|
|
425
|
-
|
|
426
|
-
# Merge when all complete
|
|
427
|
-
/finish bd-epic
|
|
428
|
-
```
|
|
429
|
-
|
|
430
|
-
### Pattern 8: Ralph Wiggum Autonomous Loop
|
|
431
|
-
|
|
432
|
-
For tasks that can run autonomously until completion. The agent loops until it outputs `<promise>COMPLETE</promise>` or hits max iterations.
|
|
433
|
-
|
|
434
|
-
```
|
|
435
|
-
/ralph-loop "Migrate all Jest tests to Vitest"
|
|
436
|
-
# Or with PRD file:
|
|
437
|
-
/ralph-loop "Complete PRD tasks" --prd PRD.md --max 50
|
|
438
|
-
|
|
439
|
-
# Agent automatically:
|
|
440
|
-
# 1. Picks highest-priority incomplete task
|
|
441
|
-
# 2. Implements ONE feature
|
|
442
|
-
# 3. Runs feedback loops (typecheck, test, lint)
|
|
443
|
-
# 4. Commits if all pass
|
|
444
|
-
# 5. Updates progress.txt
|
|
445
|
-
# 6. Loops until <promise>COMPLETE</promise> or max iterations
|
|
446
|
-
```
|
|
447
|
-
|
|
448
|
-
**When to use Ralph:**
|
|
449
|
-
|
|
450
|
-
| Scenario | Use Ralph? | Why |
|
|
451
|
-
| ------------------------- | ---------- | ------------------------------------ |
|
|
452
|
-
| Test coverage improvement | ✅ Yes | Clear success criteria, safe to loop |
|
|
453
|
-
| Linting fixes | ✅ Yes | Deterministic, feedback-driven |
|
|
454
|
-
| Migration (Jest→Vitest) | ✅ Yes | Repetitive, well-defined end state |
|
|
455
|
-
| Feature implementation | ⚠️ HITL | Need oversight for design decisions |
|
|
456
|
-
| Architectural changes | ❌ No | Too risky for autonomous work |
|
|
457
|
-
| Vague "improve X" tasks | ❌ No | No clear completion criteria |
|
|
458
|
-
|
|
459
|
-
**Ralph + Beads Integration:**
|
|
460
|
-
|
|
461
|
-
```bash
|
|
462
|
-
# Create PRD from beads
|
|
463
|
-
br list --status=open --json > PRD.json
|
|
464
|
-
|
|
465
|
-
# Start Ralph loop
|
|
466
|
-
/ralph-loop "Complete all open tasks" --prd PRD.json
|
|
467
|
-
|
|
468
|
-
# Ralph will work through tasks, you can:
|
|
469
|
-
ralph-status # Check progress
|
|
470
|
-
ralph-stop # Stop gracefully
|
|
471
|
-
|
|
472
|
-
# After completion, sync beads
|
|
473
|
-
br sync --flush-only
|
|
474
|
-
```
|
|
475
|
-
|
|
476
|
-
**Key constraints:**
|
|
477
|
-
|
|
478
|
-
- ONE feature per iteration (prevents context rot)
|
|
479
|
-
- MUST pass all feedback loops before commit
|
|
480
|
-
- Small steps > large changes
|
|
481
|
-
- Always cap iterations (never infinite loops)
|
|
482
|
-
|
|
483
|
-
## Agent Boundaries
|
|
484
|
-
|
|
485
|
-
### Leader Agents (Touch Beads)
|
|
486
|
-
|
|
487
|
-
| Agent | Can Do | Cannot Do |
|
|
488
|
-
| ------- | ------------------------------- | --------- |
|
|
489
|
-
| `build` | All beads operations, `br sync --flush-only` | - |
|
|
490
|
-
| `plan` | All beads operations, `br sync --flush-only` | - |
|
|
491
|
-
|
|
492
|
-
### Subagents (Read-Only Beads)
|
|
493
|
-
|
|
494
|
-
| Agent | Can Do | Cannot Do |
|
|
495
|
-
| --------- | -------------------------------------- | --------------------- |
|
|
496
|
-
| `plan` | `br show`, `br list`, create artifacts | `br sync --flush-only`, `br close` |
|
|
497
|
-
| `scout` | `br show` (read context) | Any writes |
|
|
498
|
-
| `explore` | `br show`, `br list` | Any writes |
|
|
499
|
-
| `review` | `br show` | Any writes |
|
|
500
|
-
| `vision` | None | All beads operations |
|
|
501
|
-
|
|
502
|
-
## File Locking (Multi-Agent)
|
|
503
|
-
|
|
504
|
-
```typescript
|
|
505
|
-
// Before editing shared files
|
|
506
|
-
bd - reserve({ paths: ["src/auth.ts"], ttl: 600 });
|
|
507
|
-
|
|
508
|
-
// Do work...
|
|
509
|
-
|
|
510
|
-
// After completing edits
|
|
511
|
-
bd - release({ paths: ["src/auth.ts"] });
|
|
512
|
-
|
|
513
|
-
// Check active locks
|
|
514
|
-
bd - release({ _: true }); // No paths = list locks
|
|
515
|
-
```
|
|
516
|
-
|
|
517
|
-
## Commit Message Format
|
|
518
|
-
|
|
519
|
-
Always include bead ID for traceability:
|
|
520
|
-
|
|
521
|
-
```
|
|
522
|
-
feat(auth): add token refresh (bd-a1b2c3)
|
|
523
|
-
|
|
524
|
-
Implement automatic token refresh when access token expires.
|
|
525
|
-
|
|
526
|
-
Closes: bd-a1b2c3
|
|
527
|
-
```
|
|
528
|
-
|
|
529
|
-
## Session End Checklist
|
|
530
|
-
|
|
531
|
-
1. [ ] All work committed
|
|
532
|
-
2. [ ] `br sync --flush-only` run (pushes to git)
|
|
533
|
-
3. [ ] If incomplete: `/handoff <id>` created
|
|
534
|
-
4. [ ] If complete: `/finish <id>` run
|
|
535
|
-
5. [ ] No stale file locks (`br-release({ _: true })`)
|
|
536
|
-
6. [ ] Worktrees cleaned up (if used)
|
|
537
|
-
|
|
538
|
-
## Troubleshooting
|
|
539
|
-
|
|
540
|
-
| Problem | Solution |
|
|
541
|
-
| ---------------------------- | --------------------------------------------------- |
|
|
542
|
-
| "bd command not found" | `npm install -g beads-village` |
|
|
543
|
-
| Orphaned issues | `br doctor --fix` |
|
|
544
|
-
| DB too large | `br cleanup --days 3` |
|
|
545
|
-
| Sync conflicts | `br sync --force` (careful!) |
|
|
546
|
-
| Stale handoff | Check if rebase needed before `/resume` |
|
|
547
|
-
| Task not in `br ready` | Check blockers: `br show <id>` |
|
|
548
|
-
| "Branch already checked out" | `rm -rf .git/beads-worktrees && git worktree prune` |
|
|
549
|
-
| Daemon issues in worktree | `br config set sync-branch beads-sync` |
|
|
550
|
-
| Sandbox environment | `br --sandbox` or `BEADS_NO_DAEMON=1` |
|
|
551
|
-
|
|
552
|
-
## Anti-Patterns
|
|
553
|
-
|
|
554
|
-
| Don't | Why | Do Instead |
|
|
555
|
-
| -------------------------------------- | --------------------- | -------------------------------- |
|
|
556
|
-
| Skip `br sync --flush-only` at session end | Changes won't persist | Always sync before stopping |
|
|
557
|
-
| Create beads for trivial fixes | DB bloat | Use `/quick-build` |
|
|
558
|
-
| Work on blocked tasks | Wastes time | Use `br ready` to find unblocked |
|
|
559
|
-
| Subagents running `br sync --flush-only` | Coordination issues | Only leader agents sync |
|
|
560
|
-
| Force through complex with quick-build | Technical debt | Proper `/create` workflow |
|
|
561
|
-
| Ignore `br doctor` warnings | Corruption risk | Fix issues promptly |
|
|
562
|
-
| Skip worktree for XL features | Merge conflicts | Use `--worktree` flag |
|
|
563
|
-
| Implement epic directly | Too large | Work on subtasks instead |
|
|
564
|
-
| Wait for subagent results | Blocks progress | Fire parallel, continue working |
|