opencodekit 0.12.6 → 0.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (65) hide show
  1. package/README.md +2 -2
  2. package/dist/index.js +2756 -523
  3. package/dist/template/.opencode/AGENTS.md +35 -128
  4. package/dist/template/.opencode/README.md +4 -3
  5. package/dist/template/.opencode/agent/build.md +32 -21
  6. package/dist/template/.opencode/agent/explore.md +27 -16
  7. package/dist/template/.opencode/agent/planner.md +103 -63
  8. package/dist/template/.opencode/agent/review.md +31 -23
  9. package/dist/template/.opencode/agent/rush.md +27 -19
  10. package/dist/template/.opencode/agent/scout.md +27 -19
  11. package/dist/template/.opencode/agent/vision.md +29 -19
  12. package/dist/template/.opencode/command/accessibility-check.md +1 -0
  13. package/dist/template/.opencode/command/analyze-mockup.md +1 -0
  14. package/dist/template/.opencode/command/analyze-project.md +2 -1
  15. package/dist/template/.opencode/command/brainstorm.md +2 -1
  16. package/dist/template/.opencode/command/design-audit.md +1 -0
  17. package/dist/template/.opencode/command/design.md +1 -0
  18. package/dist/template/.opencode/command/finish.md +39 -4
  19. package/dist/template/.opencode/command/fix.md +28 -1
  20. package/dist/template/.opencode/command/implement.md +26 -6
  21. package/dist/template/.opencode/command/init.md +1 -0
  22. package/dist/template/.opencode/command/pr.md +28 -1
  23. package/dist/template/.opencode/command/research-ui.md +1 -0
  24. package/dist/template/.opencode/command/research.md +1 -4
  25. package/dist/template/.opencode/command/review-codebase.md +1 -0
  26. package/dist/template/.opencode/command/start.md +106 -0
  27. package/dist/template/.opencode/command/status.md +3 -2
  28. package/dist/template/.opencode/command/summarize.md +2 -1
  29. package/dist/template/.opencode/command/triage.md +66 -12
  30. package/dist/template/.opencode/command/ui-review.md +1 -0
  31. package/dist/template/.opencode/memory/project/architecture.md +59 -6
  32. package/dist/template/.opencode/memory/project/beads-workflow.md +278 -0
  33. package/dist/template/.opencode/memory/project/commands.md +20 -164
  34. package/dist/template/.opencode/memory/session-context.md +40 -0
  35. package/dist/template/.opencode/memory/user.md +24 -7
  36. package/dist/template/.opencode/opencode.json +77 -16
  37. package/dist/template/.opencode/package.json +1 -1
  38. package/dist/template/.opencode/plugin/compaction.ts +62 -18
  39. package/dist/template/.opencode/plugin/lib/notify.ts +2 -3
  40. package/dist/template/.opencode/plugin/sessions.ts +1 -1
  41. package/dist/template/.opencode/plugin/skill-mcp.ts +11 -12
  42. package/dist/template/.opencode/skill/beads/SKILL.md +44 -0
  43. package/dist/template/.opencode/skill/condition-based-waiting/example.ts +71 -65
  44. package/dist/template/.opencode/tool/ast-grep.ts +3 -3
  45. package/dist/template/.opencode/tool/bd-inbox.ts +7 -6
  46. package/dist/template/.opencode/tool/bd-msg.ts +3 -3
  47. package/dist/template/.opencode/tool/bd-release.ts +2 -2
  48. package/dist/template/.opencode/tool/bd-reserve.ts +5 -4
  49. package/dist/template/.opencode/tool/memory-read.ts +58 -58
  50. package/dist/template/.opencode/tool/memory-search.ts +2 -2
  51. package/dist/template/.opencode/tool/memory-update.ts +53 -54
  52. package/dist/template/.opencode/tool/observation.ts +6 -6
  53. package/dist/template/.opencode/tsconfig.json +19 -19
  54. package/package.json +8 -17
  55. package/dist/template/.opencode/command.backup/analyze-project.md +0 -465
  56. package/dist/template/.opencode/command.backup/finish.md +0 -167
  57. package/dist/template/.opencode/command.backup/implement.md +0 -143
  58. package/dist/template/.opencode/command.backup/pr.md +0 -252
  59. package/dist/template/.opencode/command.backup/status.md +0 -376
  60. package/dist/template/.opencode/lib/lsp/client.ts +0 -614
  61. package/dist/template/.opencode/lib/lsp/config.ts +0 -199
  62. package/dist/template/.opencode/lib/lsp/constants.ts +0 -339
  63. package/dist/template/.opencode/lib/lsp/types.ts +0 -138
  64. package/dist/template/.opencode/lib/lsp/utils.ts +0 -190
  65. package/dist/template/.opencode/memory/project/SHELL_OUTPUT_MIGRATION_PLAN.md +0 -551
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  description: AI-powered task triage, prioritization, and workload analysis
3
- argument-hint: "[--auto-assign] [--sla] [--bottleneck]"
3
+ argument-hint: "[--quick] [--auto-assign] [--sla] [--bottleneck]"
4
4
  agent: build
5
5
  ---
6
6
 
@@ -14,11 +14,54 @@ skill({ name: "beads" });
14
14
 
15
15
  Analyze open tasks and optimize prioritization using dependency graph analysis, SLA tracking, and multi-agent coordination.
16
16
 
17
- ## Phase 1: Initialize Beads Connection
17
+ ## Quick Mode
18
+
19
+ If `--quick` flag is passed, skip deep analysis and provide immediate actionable output:
20
+
21
+ ```bash
22
+ bd ready --json
23
+ bd list --status=in_progress --json
24
+ ```
25
+
26
+ **Quick Output:**
27
+
28
+ ```
29
+ Quick Triage
30
+ ━━━━━━━━━━━━
31
+
32
+ Ready to start:
33
+ • bd-abc12: "Task title" (P1)
34
+ • bd-def34: "Task title" (P2)
35
+
36
+ In progress:
37
+ • bd-ghi56: "Task title" - claimed by [agent]
38
+
39
+ Next: /start <bead-id>
40
+ ```
41
+
42
+ Then stop. Don't run full analysis phases.
43
+
44
+ ## Full Triage (Default)
45
+
46
+ ## Phase 1: Health Check
47
+
48
+ Run `bd doctor` to ensure database integrity (recommended weekly):
49
+
50
+ ```bash
51
+ bd doctor --fix 2>/dev/null || bd doctor
52
+ ```
53
+
54
+ This detects and auto-fixes:
55
+
56
+ - Orphaned issues (work committed but issue not closed)
57
+ - Database/JSONL sync issues
58
+ - Migration updates
59
+
60
+ ## Phase 2: Initialize Beads Connection
18
61
 
19
62
  !`bd status`
20
63
 
21
- ## Phase 2: Gather Workspace State
64
+ ## Phase 3: Gather Workspace State
22
65
 
23
66
  Run in parallel:
24
67
 
@@ -27,8 +70,8 @@ Run in parallel:
27
70
 
28
71
  ```typescript
29
72
  // Custom tools (not shell commands)
30
- bd-release(); // Lists active locks when called with no args
31
- bd-inbox({ n: 10, unread: true, to: "all" });
73
+ bd - release(); // Lists active locks when called with no args
74
+ bd - inbox({ n: 10, unread: true, to: "all" });
32
75
 
33
76
  // Search for past discussions on recurring issues
34
77
  search_session({ query: "blocked OR regression OR urgent", limit: 10 });
@@ -43,7 +86,7 @@ Capture:
43
86
  - Pending messages
44
87
  - Past context on recurring issues
45
88
 
46
- ## Phase 3: Analyze Dependencies
89
+ ## Phase 4: Analyze Dependencies
47
90
 
48
91
  Use `bd dep tree` to understand blocking relationships:
49
92
 
@@ -55,7 +98,7 @@ This provides:
55
98
  - **Keystones**: High-impact tasks that unlock multiple paths
56
99
  - **Cycles**: Circular dependencies (must break)
57
100
 
58
- ## Phase 4: Priority Classification
101
+ ## Phase 5: Priority Classification
59
102
 
60
103
  ### Priority Matrix
61
104
 
@@ -112,7 +155,7 @@ const slaStatus =
112
155
  : "OK";
113
156
  ```
114
157
 
115
- ## Phase 5: Bottleneck Analysis
158
+ ## Phase 6: Bottleneck Analysis
116
159
 
117
160
  Identify blocking patterns:
118
161
 
@@ -154,7 +197,7 @@ Resolution Options:
154
197
  Run: bd update <id> --remove-dep <dep-id>
155
198
  ```
156
199
 
157
- ## Phase 6: Generate Triage Report
200
+ ## Phase 7: Generate Triage Report
158
201
 
159
202
  ```
160
203
  ╔══════════════════════════════════════════════════════════════════════════╗
@@ -210,7 +253,7 @@ RECOMMENDATIONS
210
253
  ╚══════════════════════════════════════════════════════════════════════════╝
211
254
  ```
212
255
 
213
- ## Phase 7: Auto-Assignment (Optional)
256
+ ## Phase 8: Auto-Assignment (Optional)
214
257
 
215
258
  If `--auto-assign` flag:
216
259
 
@@ -261,7 +304,7 @@ Skipped:
261
304
  - bd-old88: No matching role detected (manual assignment needed)
262
305
  ```
263
306
 
264
- ## Phase 8: Batch Operations
307
+ ## Phase 9: Batch Operations
265
308
 
266
309
  ### Bulk Priority Update
267
310
 
@@ -286,7 +329,18 @@ console.log("2. Move to P4 backlog");
286
329
  console.log("3. Review individually");
287
330
  ```
288
331
 
289
- ## Phase 9: Sync and Notify
332
+ ### Database Cleanup (Weekly Maintenance)
333
+
334
+ Keep database small for performance (target: under 200-500 issues):
335
+
336
+ ```bash
337
+ bd cleanup --days 7 # Remove closed issues older than 7 days
338
+ bd list --status=closed --json | wc -l # Check closed count
339
+ ```
340
+
341
+ **Best Practice (from Steve Yegge):** Run `bd cleanup` every few days to prevent database bloat.
342
+
343
+ ## Phase 10: Sync and Notify
290
344
 
291
345
  ```typescript
292
346
 
@@ -3,6 +3,7 @@ description: Review UI/UX design for quality, aesthetics, and best practices
3
3
  argument-hint: "<image-or-component-path> [--bead=<id>] [--responsive] [--dark-mode]"
4
4
  agent: vision
5
5
  model: proxypal/gemini-3-pro-preview
6
+ subtask: true
6
7
  ---
7
8
 
8
9
  # UI Review: $ARGUMENTS
@@ -1,26 +1,79 @@
1
1
  ---
2
2
  purpose: Key modules, directory structure, architectural decisions
3
- updated: 2024-12-21
3
+ updated: 2025-01-06
4
4
  ---
5
5
 
6
6
  # Project Architecture
7
7
 
8
8
  ## Directory Structure
9
9
 
10
- <!-- Key directories and their purpose -->
10
+ ```
11
+ src/
12
+ index.ts # CLI entry point (cac-based)
13
+ commands/
14
+ init.ts # ock init - scaffolds .opencode/
15
+ agent.ts # ock agent - manage agents
16
+ skill.ts # ock skill - manage skills
17
+ config.ts # ock config - edit opencode.json
18
+ upgrade.ts # ock upgrade - update templates
19
+ menu.ts # Interactive menu, doctor, status
20
+ completion.ts # Shell completions
21
+ utils/
22
+ logger.ts # Logging utilities
23
+ errors.ts # Error handling
24
+ safe-prompts.ts # @clack/prompts wrappers
25
+
26
+ dist/
27
+ index.js # Built CLI bundle
28
+ template/.opencode/ # Template files copied during init
29
+
30
+ .opencode/ # OpenCode configuration (source of truth)
31
+ agent/ # Agent definitions
32
+ command/ # Workflow commands
33
+ skills/ # Skills library
34
+ tool/ # Custom tools (memory-*, bd-*)
35
+ plugin/ # OpenCode plugins
36
+ memory/ # Persistent knowledge
37
+
38
+ .beads/ # Task tracking database
39
+ ```
11
40
 
12
41
  ## Key Modules
13
42
 
14
- <!-- Core files/modules and what they do -->
43
+ ### CLI (src/index.ts)
44
+
45
+ Entry point using `cac` library. Registers commands, parses args, handles errors.
46
+
47
+ ### Init Command (src/commands/init.ts)
48
+
49
+ Core command - copies `.opencode/` template from dist to target project.
50
+
51
+ ### Build Process
52
+
53
+ 1. `bun build` bundles src/index.ts → dist/index.js
54
+ 2. rsync copies .opencode/ → dist/template/.opencode/
55
+ 3. Published package includes dist/ only
15
56
 
16
57
  ## Data Flow
17
58
 
18
- <!-- How data moves through the system -->
59
+ ```
60
+ User runs: npx opencodekit init
61
+ → dist/index.js executes
62
+ → init command copies dist/template/.opencode/ to ./.opencode/
63
+ → User has full OpenCode setup
64
+ ```
19
65
 
20
66
  ## External Dependencies
21
67
 
22
- <!-- Critical third-party services, APIs -->
68
+ - **cac**: CLI framework
69
+ - **@clack/prompts**: Interactive prompts
70
+ - **zod**: Schema validation
71
+ - **beads-village**: Task tracking integration
72
+ - **@opencode-ai/plugin**: Plugin SDK
23
73
 
24
74
  ## Architectural Decisions
25
75
 
26
- <!-- Why things are structured this way -->
76
+ 1. **Bun-first**: Uses Bun for speed, but builds to Node-compatible output
77
+ 2. **Template bundling**: .opencode/ copied at build time, not runtime
78
+ 3. **No transpilation**: TypeScript bundled directly by Bun
79
+ 4. **Colocated tests**: Tests live next to source files (*.test.ts)
@@ -0,0 +1,278 @@
1
+ ---
2
+ purpose: Complete beads workflow mapping for OpenCodeKit commands
3
+ updated: 2025-01-07
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 `bd close` |
15
+ | Plan outside beads first | Better planning tools exist | Use `/brainstorm` → `/plan` → import |
16
+ | File lots of issues | Track any work >2 minutes | `bd create` liberally |
17
+ | "Land the plane" = PUSH | `bd sync` means git push | Always verify push succeeded |
18
+ | Keep DB small | Performance degrades >500 issues | `bd cleanup --days 7` weekly |
19
+
20
+ ## Maintenance Schedule
21
+
22
+ | Task | Frequency | Command | Why |
23
+ | ------------ | -------------- | --------------------- | -------------------------------------- |
24
+ | Health check | Weekly | `bd doctor --fix` | Repairs orphaned issues, sync problems |
25
+ | Cleanup | Every few days | `bd cleanup --days 7` | Keep DB under 200-500 issues |
26
+ | Upgrade | Weekly | `bd upgrade` | Latest features and fixes |
27
+ | Git hooks | Once per repo | `bd hooks install` | Auto-sync on commit/merge/checkout |
28
+
29
+ ## Command Configuration Best Practices
30
+
31
+ Based on [OpenCode Command Docs](https://opencode.ai/docs/commands/).
32
+
33
+ ### Frontmatter Options
34
+
35
+ ```yaml
36
+ ---
37
+ description: Short description shown in TUI command list
38
+ argument-hint: "<required> [optional] [--flag]"
39
+ agent: build | planner | scout | explore | review | vision
40
+ subtask: true # Run as subagent (doesn't pollute primary context)
41
+ model: gemini-2.5-pro # Override default model
42
+ ---
43
+ ```
44
+
45
+ ### Prompt Syntax
46
+
47
+ | Syntax | Purpose | Example |
48
+ | ------------ | ------------------------ | ----------------------------- |
49
+ | `$ARGUMENTS` | All arguments as string | `/fix $ARGUMENTS` |
50
+ | `$1`, `$2` | Positional arguments | `/start $1` → `/start bd-abc` |
51
+ | `!`command`` | Inject shell output | `!`git status`` |
52
+ | `@filepath` | Include file content | `@src/config.ts` |
53
+ | `$SELECTION` | Current editor selection | For IDE integrations |
54
+
55
+ ### When to Use `subtask: true`
56
+
57
+ **Use subtask for research/analysis** - prevents context pollution in primary agent:
58
+
59
+ | Command Type | `subtask: true`? | Why |
60
+ | ------------------------ | ---------------- | ------------------------------------ |
61
+ | Research/exploration | ✅ Yes | Heavy reads, doesn't need to persist |
62
+ | Code review/analysis | ✅ Yes | Analysis output, not implementation |
63
+ | UI/UX analysis | ✅ Yes | Design feedback, not code changes |
64
+ | Status/dashboard | ✅ Yes | Read-only information gathering |
65
+ | Implementation | ❌ No | Needs full context for edits |
66
+ | Lifecycle (start/finish) | ❌ No | Coordinates state, needs persistence |
67
+ | Generation (artifacts) | ❌ No | Creates files that need tracking |
68
+
69
+ ### Commands by Category
70
+
71
+ #### Research Commands (`subtask: true`)
72
+
73
+ ```
74
+ /research, /analyze-project, /review-codebase, /brainstorm,
75
+ /status, /summarize, /init, /ui-review, /accessibility-check,
76
+ /analyze-mockup, /design-audit, /research-ui, /design
77
+ ```
78
+
79
+ #### Lifecycle Commands (NO subtask)
80
+
81
+ ```
82
+ /triage, /start, /create, /new-feature, /issue, /plan,
83
+ /implement, /commit, /finish, /handoff, /resume, /pr, /fix
84
+ ```
85
+
86
+ #### Generation Commands (NO subtask)
87
+
88
+ ```
89
+ /generate-image, /generate-icon, /generate-diagram,
90
+ /generate-pattern, /generate-storyboard, /edit-image, /restore-image
91
+ ```
92
+
93
+ #### Utility Commands (NO subtask)
94
+
95
+ ```
96
+ /quick-build, /fix-ci, /fix-types, /fix-ui,
97
+ /revert-feature, /integration-test, /skill-create, /skill-optimize
98
+ ```
99
+
100
+ ## Command → Beads Mapping
101
+
102
+ ### Lifecycle Commands (Touch Beads)
103
+
104
+ | Command | Agent | Beads Operations | When to Use |
105
+ | ----------------- | ------- | ------------------------------------------------------ | --------------------------- |
106
+ | `/triage` | build | `bd doctor`, `bd list`, `bd ready`, `bd cleanup` | Start of day, find work |
107
+ | `/triage --quick` | build | `bd ready`, `bd list --status=in_progress` | Fast check, what's next |
108
+ | `/start <id>` | build | `bd update --status in_progress`, `bd hooks install` | Claim a task |
109
+ | `/create` | build | `bd create`, `bd sync` | Create new tracked task |
110
+ | `/new-feature` | planner | `bd create` (epic + subtasks), `bd dep add`, `bd sync` | Complex feature with phases |
111
+ | `/issue <num>` | build | `bd create`, `bd sync`, `gh issue comment` | Import GitHub issue |
112
+ | `/plan <id>` | planner | `bd create` (subtasks), `bd dep add`, `bd sync` | Break down task |
113
+ | `/implement <id>` | build | `bd update --status in_progress`, `bd sync` | Do the work |
114
+ | `/commit [id]` | build | `bd sync` (if bead-id provided) | Commit with traceability |
115
+ | `/finish <id>` | build | `bd close`, `bd sync` | Complete task (asks first) |
116
+ | `/handoff <id>` | build | `bd sync` | Pause work, save context |
117
+ | `/resume <id>` | build | `bd update --status in_progress` | Continue previous work |
118
+ | `/pr <id>` | build | `bd-msg`, `bd sync` | Create pull request |
119
+ | `/fix` | build | `bd sync` (after user confirms commit) | Fix bugs with tracking |
120
+ | `/status` | explore | `bd status`, `bd list`, `bd-inbox`, `bd-release` | Dashboard view |
121
+
122
+ ### Research Commands (Read-Only Beads)
123
+
124
+ | Command | Agent | Beads Operations | Notes |
125
+ | ------------------ | ------- | --------------------- | -------------------------- |
126
+ | `/research <id>` | scout | `bd show` (read-only) | NO `bd sync` - subagent |
127
+ | `/brainstorm` | planner | None | Pure planning, no tracking |
128
+ | `/analyze-project` | explore | None | Codebase exploration |
129
+ | `/summarize` | explore | None | Session/code summary |
130
+ | `/review-codebase` | review | None | Code review |
131
+
132
+ ### Non-Beads Commands
133
+
134
+ | Command | Agent | Purpose |
135
+ | ---------------------- | ------- | ------------------------------ |
136
+ | `/quick-build` | build | Trivial fixes, no bead created |
137
+ | `/design` | planner | Architecture design |
138
+ | `/ui-review` | vision | UI/UX analysis |
139
+ | `/accessibility-check` | vision | A11y audit |
140
+ | `/fix-ci` | build | CI pipeline fixes |
141
+ | `/fix-types` | build | TypeScript errors |
142
+
143
+ ## Workflow Patterns
144
+
145
+ ### Pattern 1: Standard Task (S/M size)
146
+
147
+ ```
148
+ /triage --quick # Find ready work
149
+ /start bd-xxx # Claim task, create branch
150
+ /implement bd-xxx # Do the work
151
+ /finish bd-xxx # Verify, commit (asks first), close
152
+ /pr bd-xxx # Create PR (asks first)
153
+ ```
154
+
155
+ ### Pattern 2: Complex Feature (L/XL size)
156
+
157
+ ```
158
+ /triage # Full triage with health check
159
+ /new-feature "Feature" # Creates epic + spec + plan + subtasks
160
+ /start bd-xxx.1 # Start first subtask
161
+ /implement bd-xxx.1 # Implement
162
+ /finish bd-xxx.1 # Complete subtask
163
+ /start bd-xxx.2 # Next subtask (now unblocked)
164
+ ...
165
+ /finish bd-xxx # Close epic when all subtasks done
166
+ ```
167
+
168
+ ### Pattern 3: Research-First
169
+
170
+ ```
171
+ /create "Complex task" # Create bead with spec
172
+ /research bd-xxx # Gather information (scout agent)
173
+ /plan bd-xxx # Design approach (planner agent)
174
+ /implement bd-xxx # Now implement with full context
175
+ /finish bd-xxx # Complete
176
+ ```
177
+
178
+ ### Pattern 4: Bug Fix
179
+
180
+ ```
181
+ /issue 123 # Import GitHub issue as bead
182
+ /start bd-xxx # Claim
183
+ /fix bd-xxx # Diagnose + fix (asks before commit)
184
+ /finish bd-xxx # Verify + close
185
+ /pr bd-xxx # Create PR
186
+ ```
187
+
188
+ ### Pattern 5: Session Handoff
189
+
190
+ ```
191
+ /implement bd-xxx # Working on task...
192
+ # Context getting large or end of day
193
+ /handoff bd-xxx # Save progress, creates handoff.md
194
+ # New session
195
+ /resume bd-xxx # Load context, continue
196
+ ```
197
+
198
+ ### Pattern 6: Trivial Fix (No Bead)
199
+
200
+ ```
201
+ /quick-build "fix typo" # Single file, <30 min, commits directly
202
+ ```
203
+
204
+ ## Agent Boundaries
205
+
206
+ ### Leader Agents (Touch Beads)
207
+
208
+ | Agent | Can Do | Cannot Do |
209
+ | ------- | ------------------------------- | --------- |
210
+ | `build` | All beads operations, `bd sync` | - |
211
+ | `rush` | All beads operations, `bd sync` | - |
212
+
213
+ ### Subagents (Read-Only Beads)
214
+
215
+ | Agent | Can Do | Cannot Do |
216
+ | --------- | -------------------------------------- | --------------------- |
217
+ | `planner` | `bd show`, `bd list`, create artifacts | `bd sync`, `bd close` |
218
+ | `scout` | `bd show` (read context) | Any writes |
219
+ | `explore` | `bd show`, `bd list` | Any writes |
220
+ | `review` | `bd show` | Any writes |
221
+ | `vision` | None | All beads operations |
222
+
223
+ ## File Locking (Multi-Agent)
224
+
225
+ ```typescript
226
+ // Before editing shared files
227
+ bd - reserve({ paths: ["src/auth.ts"], ttl: 600 });
228
+
229
+ // Do work...
230
+
231
+ // After completing edits
232
+ bd - release({ paths: ["src/auth.ts"] });
233
+
234
+ // Check active locks
235
+ bd - release(); // No args = list locks
236
+ ```
237
+
238
+ ## Commit Message Format
239
+
240
+ Always include bead ID for traceability:
241
+
242
+ ```
243
+ feat(auth): add token refresh (bd-a1b2c3)
244
+
245
+ Implement automatic token refresh when access token expires.
246
+
247
+ Closes: bd-a1b2c3
248
+ ```
249
+
250
+ ## Session End Checklist
251
+
252
+ 1. [ ] All work committed
253
+ 2. [ ] `bd sync` run (pushes to git)
254
+ 3. [ ] If incomplete: `/handoff <id>` created
255
+ 4. [ ] If complete: `/finish <id>` run
256
+ 5. [ ] No stale file locks
257
+
258
+ ## Troubleshooting
259
+
260
+ | Problem | Solution |
261
+ | ---------------------- | --------------------------------------- |
262
+ | "bd command not found" | `npm install -g beads-village` |
263
+ | Orphaned issues | `bd doctor --fix` |
264
+ | DB too large | `bd cleanup --days 3` |
265
+ | Sync conflicts | `bd sync --force` (careful!) |
266
+ | Stale handoff | Check if rebase needed before `/resume` |
267
+ | Task not in `bd ready` | Check blockers: `bd show <id>` |
268
+
269
+ ## Anti-Patterns
270
+
271
+ | Don't | Why | Do Instead |
272
+ | -------------------------------------- | --------------------- | -------------------------------- |
273
+ | Skip `bd sync` at session end | Changes won't persist | Always sync before stopping |
274
+ | Create beads for trivial fixes | DB bloat | Use `/quick-build` |
275
+ | Work on blocked tasks | Wastes time | Use `bd ready` to find unblocked |
276
+ | Subagents running `bd sync` | Coordination issues | Only leader agents sync |
277
+ | Force through complex with quick-build | Technical debt | Proper `/create` workflow |
278
+ | Ignore `bd doctor` warnings | Corruption risk | Fix issues promptly |