opencodekit 0.7.0 → 0.8.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 (31) hide show
  1. package/dist/index.js +1 -1
  2. package/dist/template/.opencode/AGENTS.md +60 -21
  3. package/dist/template/.opencode/command/analyze-project.md +9 -9
  4. package/dist/template/.opencode/command/create.md +9 -4
  5. package/dist/template/.opencode/command/finish.md +12 -17
  6. package/dist/template/.opencode/command/fix-ci.md +10 -9
  7. package/dist/template/.opencode/command/fix-types.md +4 -11
  8. package/dist/template/.opencode/command/handoff.md +6 -6
  9. package/dist/template/.opencode/command/implement.md +11 -11
  10. package/dist/template/.opencode/command/import-plan.md +25 -14
  11. package/dist/template/.opencode/command/integration-test.md +1 -1
  12. package/dist/template/.opencode/command/issue.md +10 -9
  13. package/dist/template/.opencode/command/new-feature.md +4 -6
  14. package/dist/template/.opencode/command/plan.md +3 -5
  15. package/dist/template/.opencode/command/pr.md +2 -4
  16. package/dist/template/.opencode/command/research-and-implement.md +1 -1
  17. package/dist/template/.opencode/command/research.md +3 -5
  18. package/dist/template/.opencode/command/resume.md +2 -2
  19. package/dist/template/.opencode/command/revert-feature.md +5 -7
  20. package/dist/template/.opencode/command/status.md +4 -4
  21. package/dist/template/.opencode/dcp.jsonc +20 -2
  22. package/dist/template/.opencode/opencode.json +19 -12
  23. package/dist/template/.opencode/package.json +1 -1
  24. package/dist/template/.opencode/plugin/beads.ts +667 -0
  25. package/dist/template/.opencode/plugin/compaction.ts +80 -0
  26. package/dist/template/.opencode/skill/beads/SKILL.md +419 -0
  27. package/dist/template/.opencode/skill/beads/references/BOUNDARIES.md +218 -0
  28. package/dist/template/.opencode/skill/beads/references/DEPENDENCIES.md +130 -0
  29. package/dist/template/.opencode/skill/beads/references/RESUMABILITY.md +180 -0
  30. package/dist/template/.opencode/skill/beads/references/WORKFLOWS.md +222 -0
  31. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -750,7 +750,7 @@ var cac = (name = "") => new CAC(name);
750
750
  // package.json
751
751
  var package_default = {
752
752
  name: "opencodekit",
753
- version: "0.7.0",
753
+ version: "0.8.0",
754
754
  description: "CLI tool for bootstrapping and managing OpenCodeKit projects",
755
755
  type: "module",
756
756
  repository: {
@@ -296,15 +296,15 @@ Use all three:
296
296
 
297
297
  ## Beads Usage
298
298
 
299
- **Session start**: `bd doctor --fix` then `bd ready`
299
+ **Session start**: `bd_doctor()` then `bd_claim()`
300
300
  **Session end**: Complete one bead fully before starting next
301
- **Weekly**: `bd cleanup --older-than 7d` then `bd sync`
301
+ **Weekly**: `bd_cleanup(days=7)` then `bd_sync()`
302
302
 
303
303
  **Philosophy**: Beads is execution, not planning. Plan elsewhere, track in Beads.
304
304
 
305
- ## Beads Village (Multi-Agent Coordination)
305
+ ## Beads Tools (Multi-Agent Coordination)
306
306
 
307
- MCP server for task coordination and file locking between agents.
307
+ Native plugin tools for task coordination and file locking between agents.
308
308
 
309
309
  ### When to Use
310
310
 
@@ -315,41 +315,80 @@ MCP server for task coordination and file locking between agents.
315
315
  ### Core Workflow
316
316
 
317
317
  ```
318
- init() → claim() → reserve(paths) → [work] → done(id, msg) → RESTART
318
+ bd_init() → bd_claim() → bd_reserve(paths) → [work] → bd_done(id, msg) → RESTART
319
319
  ```
320
320
 
321
- ### Key Tools
321
+ ### Tool Reference
322
322
 
323
- **Session Management**
323
+ **Lifecycle Tools**
324
324
 
325
- Start every session by calling `init` with your team name and role. This registers you in the workspace and enables role-based task filtering. For example, `init(team="project", role="fe")` joins as a frontend agent.
325
+ Start every session by calling `bd_init` with your team name and role. This registers you in the workspace and enables role-based task filtering. For example, `bd_init({ team: "project", role: "fe" })` joins as a frontend agent.
326
326
 
327
- Check workspace state with `status(include_agents=true)` to see active agents, file locks, and pending messages.
327
+ Call `bd_claim` to get the next ready task assigned to your role. It auto-filters based on task tags matching your role and marks the task as in_progress.
328
328
 
329
- **Task Operations**
329
+ When work is complete, call `bd_done` with the task ID and completion message. This closes the task, releases all file reservations, and syncs with git. After `bd_done`, restart your session for fresh context.
330
330
 
331
- Call `claim` to get the next ready task assigned to your role. It auto-filters based on task tags matching your role.
331
+ **Task Management Tools**
332
332
 
333
- When work is complete, call `done(id="bd-42", msg="Implemented feature X")` to close the task and notify other agents. After `done`, restart your session for a fresh context.
333
+ Use `bd_add` to create new tasks for discovered work. Specify title, optional description, and priority (0=critical through 4=backlog). Use `bd_assign` to assign tasks to specific roles like fe, be, mobile, devops, or qa.
334
334
 
335
- **File Reservations**
335
+ Call `bd_ls` to list tasks filtered by status: open, closed, in_progress, ready, or all. Use `bd_show` with a task ID to get full details including description, notes, and history.
336
336
 
337
- Before editing files, call `reserve(paths=["src/auth.ts"])` to lock them. This prevents other agents from modifying the same files. Call `release` when finished to unlock.
337
+ **File Reservation Tools**
338
338
 
339
- **Messaging**
339
+ Before editing any file, call `bd_reserve` with the file paths you need. This creates locks that prevent other agents from modifying the same files. Locks expire after 600 seconds by default.
340
340
 
341
- Send messages with `msg(subj="API Ready", global=true, to="all")` for cross-workspace announcements. Check incoming messages with `inbox(unread=true)`.
341
+ Call `bd_release` to unlock files early, or let `bd_done` release them automatically. Use `bd_reservations` to see all active locks across the workspace before editing.
342
342
 
343
- ### Integration with Commands
343
+ **Messaging Tools**
344
344
 
345
- Use `/create` for the full spec workflow instead of the Village `add` tool. When implementing, `claim` gets your task and `reserve` locks files - Village handles the coordination while your `/implement` command handles the actual work. When finishing, `done` syncs state and notifies other agents.
345
+ Send messages with `bd_msg` using a subject and optional body. Set `to: "all"` for broadcast messages visible to all agents. Check incoming messages with `bd_inbox`, optionally filtering to unread only.
346
+
347
+ **Status and Maintenance Tools**
348
+
349
+ Call `bd_status` to get workspace overview including ready task count, in-progress tasks, and active locks. Use `bd_sync` to manually sync with git.
350
+
351
+ Run `bd_cleanup` periodically to remove old closed issues. Use `bd_doctor` to check and repair database health.
352
+
353
+ **Analysis Tools**
354
+
355
+ Call `bd_insights` for graph analysis showing bottlenecks and high-priority keystones. Use `bd_plan` to see a parallel execution plan with tasks grouped by priority tracks.
356
+
357
+ Get `bd_priority` recommendations for what to work on next based on graph analysis. Use `bd_diff` to compare issue changes between git revisions.
358
+
359
+ ### Quick Start
360
+
361
+ ```typescript
362
+ // 1. Join workspace
363
+ bd_init({ team: "project", role: "fe" });
364
+
365
+ // 2. Get next task
366
+ const task = bd_claim();
367
+
368
+ // 3. Lock files before editing
369
+ bd_reserve({ paths: ["src/auth.ts", "src/types.ts"] });
370
+
371
+ // 4. Do the work...
372
+
373
+ // 5. Complete and restart
374
+ bd_done({ id: task.id, msg: "Implemented auth" });
375
+ // RESTART SESSION
376
+ ```
346
377
 
347
378
  ### Rules
348
379
 
349
- - **Always `init()` first** in any session using Village tools
380
+ - **Always `bd_init()` first** in any session using beads tools
350
381
  - **Reserve before edit** to prevent conflicts
351
- - **One task per session** - restart after `done()`
352
- - **Use `msg(global=true)`** for cross-workspace announcements
382
+ - **One task per session** - restart after `bd_done()`
383
+ - **Use `bd_msg(to="all")`** for team-wide announcements
384
+
385
+ ### Skill
386
+
387
+ Load `beads` skill for detailed workflow guidance:
388
+
389
+ ```
390
+ skill({ name: "beads" })
391
+ ```
353
392
 
354
393
  ## Skills System
355
394
 
@@ -10,7 +10,7 @@ agent: planner
10
10
  ## Quick Status
11
11
 
12
12
  1. **Git:** `git status` - current branch, changes
13
- 2. **Tasks:** `bd list` - active beads
13
+ 2. **Tasks:** `bd_ls({ status: "open" })` - active beads
14
14
  3. **CI:** Check build status
15
15
  4. **Dependencies:** Check for outdated packages
16
16
 
@@ -18,8 +18,8 @@ agent: planner
18
18
 
19
19
  Find actionable tasks with no blockers:
20
20
 
21
- ```bash
22
- bd ready
21
+ ```typescript
22
+ bd_ls({ status: "ready", limit: 10, offset: 0 });
23
23
  ```
24
24
 
25
25
  This shows beads that are unblocked and ready to start. Use `/implement <bead-id>` to begin work on any of these.
@@ -28,9 +28,9 @@ This shows beads that are unblocked and ready to start. Use `/implement <bead-id
28
28
 
29
29
  ### Task Overview
30
30
 
31
- ```bash
32
- bd list --status open
33
- bd ready
31
+ ```typescript
32
+ bd_ls({ status: "open", limit: 10, offset: 0 });
33
+ bd_ls({ status: "ready", limit: 10, offset: 0 });
34
34
  ```
35
35
 
36
36
  For active beads, read spec from `.beads/artifacts/<bead-id>/spec.md`
@@ -39,8 +39,8 @@ For active beads, read spec from `.beads/artifacts/<bead-id>/spec.md`
39
39
 
40
40
  Check what's blocking progress:
41
41
 
42
- ```bash
43
- bd list --status blocked
42
+ ```typescript
43
+ bd_ls({ status: "blocked", limit: 10, offset: 0 });
44
44
  ```
45
45
 
46
46
  For each blocked bead, identify the blocker and either resolve it or escalate.
@@ -55,7 +55,7 @@ For each blocked bead, identify the blocker and either resolve it or escalate.
55
55
 
56
56
  ### Recommendations
57
57
 
58
- - **Immediate:** Tasks from `bd ready` to start now
58
+ - **Immediate:** Tasks from `bd_ls({ status: "ready" })` to start now
59
59
  - **Blocked:** Dependencies preventing progress
60
60
  - **Attention:** Areas needing cleanup or refactoring
61
61
  - **Updates:** Dependency updates needed
@@ -47,14 +47,19 @@ Approve? (yes/modify)
47
47
 
48
48
  On approval:
49
49
 
50
- ```bash
51
- bd create "[title]" -t [type] -p [priority] -d "[description]" --json
50
+ ```typescript
51
+ bd_add({
52
+ title: "[title]",
53
+ type: "[type]",
54
+ pri: [priority],
55
+ desc: "[description]",
56
+ });
52
57
  ```
53
58
 
54
59
  **If using Beads Village for multi-agent coordination:** Add role tags so tasks can be auto-assigned to the right agent:
55
60
 
56
- ```
57
- add(title="[title]", tags=["[role]"], priority=[0-4])
61
+ ```typescript
62
+ bd_add({ title: "[title]", type: "[type]", pri: [priority], tags: ["[role]"] });
58
63
  ```
59
64
 
60
65
  This makes the task claimable by agents with matching roles.
@@ -13,8 +13,8 @@ agent: build
13
13
 
14
14
  ## Phase 1: Load Bead
15
15
 
16
- ```bash
17
- bd show $ARGUMENTS --json
16
+ ```typescript
17
+ bd_show({ id: "$ARGUMENTS" });
18
18
  ```
19
19
 
20
20
  Verify status is `in-progress` or `open`.
@@ -175,31 +175,25 @@ Closes: <bead-id>"
175
175
 
176
176
  ## Phase 7: Close Bead
177
177
 
178
- **If using Beads Village:** Complete the task and notify other agents:
178
+ Complete the task and release any file reservations:
179
179
 
180
- ```
181
- done(id="$ARGUMENTS", msg="Implemented: [1-liner summary]")
180
+ ```typescript
181
+ bd_done({ id: "$ARGUMENTS", msg: "Implemented: [1-liner summary]" });
182
182
  ```
183
183
 
184
- This closes the bead, releases any file reservations, and broadcasts completion to the workspace.
185
-
186
- **Otherwise:** Close via CLI:
187
-
188
- ```bash
189
- bd close $ARGUMENTS --reason "Implemented: [1-liner summary]"
190
- ```
184
+ This closes the bead, releases file locks, and syncs with git.
191
185
 
192
186
  ## Phase 8: Database Health Check
193
187
 
194
188
  Check issue count:
195
189
 
196
- ```bash
197
- bd list --status all 2>/dev/null | wc -l
190
+ ```typescript
191
+ bd_ls({ status: "all", limit: 1 });
198
192
  ```
199
193
 
200
194
  **If >200 issues:** Warn about performance.
201
195
 
202
- **If >500 issues:** Strongly recommend cleanup.
196
+ **If >500 issues:** Strongly recommend cleanup with `bd_cleanup({ days: 7 })`.
203
197
 
204
198
  ## Output
205
199
 
@@ -224,7 +218,8 @@ Branch: <bead-id>
224
218
 
225
219
  ```
226
220
  ⚠️ Database has [count] issues. Consider running:
227
- bd cleanup --older-than 7d && bd sync
221
+ bd_cleanup({ days: 7 })
222
+ bd_sync()
228
223
  ```
229
224
 
230
225
  **Session recommendation:**
@@ -238,7 +233,7 @@ Task complete. For best performance:
238
233
  Next: Create PR or merge to main
239
234
  ```
240
235
 
241
- **If using Beads Village:** After calling `done()`, restart your session for a fresh context. The one-task-per-session pattern keeps agents fast and focused.
236
+ After calling `bd_done()`, restart your session for a fresh context. The one-task-per-session pattern keeps agents fast and focused.
242
237
 
243
238
  **If work was interrupted or partially complete:**
244
239
 
@@ -15,15 +15,16 @@ For deep tracing: `skill({ name: "root-cause-tracing" })`
15
15
 
16
16
  CI failures are P0 bugs. Create a bead to track:
17
17
 
18
- ```bash
19
- bd create --title "Fix CI: <failure summary>" --type bug --priority p0 --json
18
+ ```typescript
19
+ bd_add({
20
+ title: "Fix CI: <failure summary>",
21
+ type: "task",
22
+ pri: 0,
23
+ tags: ["bug"],
24
+ });
20
25
  ```
21
26
 
22
- Save the bead ID for tracking. Add the CI run reference:
23
-
24
- ```bash
25
- bd edit <bead-id> --note "CI Run: $ARGUMENTS"
26
- ```
27
+ Save the bead ID for tracking. Add the CI run reference via `bd_msg` or notes.
27
28
 
28
29
  ## Workflow
29
30
 
@@ -41,8 +42,8 @@ bd edit <bead-id> --note "CI Run: $ARGUMENTS"
41
42
 
42
43
  Once CI passes:
43
44
 
44
- ```bash
45
- bd close <bead-id> --reason "CI fixed: <summary of fix>"
45
+ ```typescript
46
+ bd_done({ id: "<bead-id>", msg: "CI fixed: <summary of fix>" });
46
47
  ```
47
48
 
48
49
  ## Notes
@@ -19,19 +19,12 @@ Run `bun run typecheck` and fix all type errors.
19
19
 
20
20
  If a bead ID is provided (`$ARGUMENTS`), track the type fixing work:
21
21
 
22
- 1. **Before fixing:** Note the initial error count
22
+ 1. **Before fixing:** Note the initial error count via `bd_msg` or notes
23
23
 
24
- ```bash
25
- bd edit $ARGUMENTS --note "Type errors found: <count>"
26
- ```
27
-
28
- 2. **After fixing:** Update with resolution
29
- ```bash
30
- bd edit $ARGUMENTS --note "Type errors resolved: <summary of fixes>"
31
- ```
24
+ 2. **After fixing:** Update with resolution summary
32
25
 
33
26
  If type errors reveal deeper issues requiring refactoring, create a follow-up bead:
34
27
 
35
- ```bash
36
- bd create --title "Refactor: <type issue summary>" --type task --related $ARGUMENTS
28
+ ```typescript
29
+ bd_add({ title: "Refactor: <type issue summary>", type: "task", pri: 2 });
37
30
  ```
@@ -10,10 +10,12 @@ agent: build
10
10
 
11
11
  ## Phase 1: Gather State
12
12
 
13
- ```bash
14
- # Bead info
15
- bd show $ARGUMENTS --json
13
+ ```typescript
14
+ // Bead info
15
+ bd_show({ id: "$ARGUMENTS" });
16
+ ```
16
17
 
18
+ ```bash
17
19
  # Git state
18
20
  git remote get-url origin 2>/dev/null
19
21
  git branch --show-current
@@ -123,9 +125,7 @@ read_session("last", project="current")
123
125
 
124
126
  ## Phase 4: Update Bead
125
127
 
126
- ```bash
127
- bd edit <bead-id> --note "Handoff created. Resume with /resume <bead-id>"
128
- ```
128
+ Add a note about the handoff via `bd_msg` or update spec with handoff reference.
129
129
 
130
130
  ## Output
131
131
 
@@ -12,8 +12,8 @@ For large tasks with 3+ phases, also load: `skill({ name: "subagent-driven-devel
12
12
 
13
13
  ## Phase 1: Setup Workspace
14
14
 
15
- ```bash
16
- bd show $ARGUMENTS --json
15
+ ```typescript
16
+ bd_show({ id: "$ARGUMENTS" });
17
17
  ```
18
18
 
19
19
  Check git state:
@@ -31,12 +31,12 @@ Create branch if not on bead branch:
31
31
  git checkout -b <bead-id>
32
32
  ```
33
33
 
34
- **Multi-agent coordination (if Beads Village available):**
34
+ **Multi-agent coordination:**
35
35
 
36
36
  Initialize your agent session and claim the task:
37
37
 
38
- ```
39
- init(team="project", role="<your-role>")
38
+ ```typescript
39
+ bd_init({ team: "project", role: "<your-role>" });
40
40
  ```
41
41
 
42
42
  This registers you in the workspace. If another agent is working on the same task, you'll be notified.
@@ -110,12 +110,12 @@ Mode: [Quick/Planned]
110
110
 
111
111
  ## Phase 4: Implementation
112
112
 
113
- **Reserve files before editing (if Beads Village available):**
113
+ **Reserve files before editing:**
114
114
 
115
115
  Before making changes, lock the files you'll modify to prevent conflicts with other agents:
116
116
 
117
- ```
118
- reserve(paths=["src/auth.ts", "src/utils/**"])
117
+ ```typescript
118
+ bd_reserve({ paths: ["src/auth.ts", "src/utils/**"] });
119
119
  ```
120
120
 
121
121
  This creates an advisory lock. Other agents will see your reservation and avoid those files.
@@ -163,10 +163,10 @@ If "pause" or "stop": Run `/handoff <bead-id>`.
163
163
 
164
164
  ## Phase 6: Complete
165
165
 
166
- When done, release any file reservations (if Beads Village available):
166
+ When done, release any file reservations:
167
167
 
168
- ```
169
- release()
168
+ ```typescript
169
+ bd_release();
170
170
  ```
171
171
 
172
172
  Then report:
@@ -55,8 +55,13 @@ Proceed with import? (yes/modify/cancel)
55
55
 
56
56
  For each epic (top-level section):
57
57
 
58
- ```bash
59
- bd create "[Epic title]" -t epic -p 2 -d "[description from plan]" --json
58
+ ```typescript
59
+ bd_add({
60
+ title: "[Epic title]",
61
+ type: "epic",
62
+ pri: 2,
63
+ desc: "[description from plan]",
64
+ });
60
65
  ```
61
66
 
62
67
  Store epic IDs for dependency linking.
@@ -65,8 +70,14 @@ Store epic IDs for dependency linking.
65
70
 
66
71
  For each issue under an epic:
67
72
 
68
- ```bash
69
- bd create "[Issue title]" -t task -p 2 -d "[description]" --epic <epic-id> --json
73
+ ```typescript
74
+ bd_add({
75
+ title: "[Issue title]",
76
+ type: "task",
77
+ pri: 2,
78
+ desc: "[description]",
79
+ parent: "<epic-id>",
80
+ });
70
81
  ```
71
82
 
72
83
  **Infer type from content:**
@@ -85,10 +96,15 @@ bd create "[Issue title]" -t task -p 2 -d "[description]" --epic <epic-id> --jso
85
96
 
86
97
  ## Phase 5: Link Dependencies
87
98
 
88
- For issues with dependencies:
99
+ For issues with dependencies, use the `deps` parameter when creating:
89
100
 
90
- ```bash
91
- bd link <issue-id> --blocks <dependent-id>
101
+ ```typescript
102
+ bd_add({
103
+ title: "[title]",
104
+ type: "task",
105
+ pri: 2,
106
+ deps: ["<blocking-issue-id>"],
107
+ });
92
108
  ```
93
109
 
94
110
  Common patterns to detect:
@@ -125,12 +141,7 @@ Apply suggestions? (yes/no/select)
125
141
 
126
142
  ## Phase 7: Polish (Optional)
127
143
 
128
- If user approves suggestions:
129
-
130
- ```bash
131
- bd edit <bead-id> --title "[improved title]"
132
- bd edit <bead-id> -d "[improved description]"
133
- ```
144
+ If user approves suggestions, update the spec files in `.beads/artifacts/<bead-id>/` directly.
134
145
 
135
146
  Iterate up to 5 times if user requests more refinement.
136
147
 
@@ -152,7 +163,7 @@ Created:
152
163
  │ └── <issue-3-id>: [title]
153
164
  └── ...
154
165
 
155
- Start work: bd ready
166
+ Start work: `bd_ls({ status: "ready", limit: 10, offset: 0 })`
156
167
  First task: /implement <first-unblocked-id>
157
168
  ```
158
169
 
@@ -14,7 +14,7 @@ agent: build
14
14
 
15
15
  ## Task Validation
16
16
 
17
- 1. **Check bead exists:** `bd show $ARGUMENTS`
17
+ 1. **Check bead exists:** `bd_show({ id: "$ARGUMENTS" })`
18
18
  2. **Read constraints:** `.beads/artifacts/$ARGUMENTS/spec.md` Testing Notes section
19
19
  3. **If missing:** STOP. Create with `/create` first.
20
20
 
@@ -23,15 +23,11 @@ gh issue view $ARGUMENTS
23
23
 
24
24
  Create a bead to track this work, linking it to the GitHub issue:
25
25
 
26
- ```bash
27
- bd create --title "<issue title>" --type task --priority <p1|p2|p3> --json
26
+ ```typescript
27
+ bd_add({ title: "<issue title>", type: "task", pri: 2 });
28
28
  ```
29
29
 
30
- Save the bead ID for subsequent commands. Add the GitHub issue reference:
31
-
32
- ```bash
33
- bd edit <bead-id> --note "GitHub issue: #$ARGUMENTS"
34
- ```
30
+ Save the bead ID for subsequent commands. Add the GitHub issue reference via `bd_msg` or in the spec.
35
31
 
36
32
  ## Create Spec from PRD Template
37
33
 
@@ -87,8 +83,13 @@ Save to `.beads/artifacts/<bead-id>/spec.md`:
87
83
 
88
84
  If analysis reveals additional issues, create child beads:
89
85
 
90
- ```bash
91
- bd create --title "<discovered issue>" --type discovered --parent <parent-bead-id>
86
+ ```typescript
87
+ bd_add({
88
+ title: "<discovered issue>",
89
+ type: "task",
90
+ pri: 2,
91
+ parent: "<parent-bead-id>",
92
+ });
92
93
  ```
93
94
 
94
95
  **Next:** Use `/implement <bead-id>` to start implementation.
@@ -23,8 +23,8 @@ Parse from `$ARGUMENTS`:
23
23
 
24
24
  ### Step 1: Create Bead
25
25
 
26
- ```bash
27
- bd new [type] "[feature-name]" --priority [priority]
26
+ ```typescript
27
+ bd_add({ title: "[feature-name]", type: "[type]", pri: [priority] });
28
28
  ```
29
29
 
30
30
  Capture the bead ID from output.
@@ -112,9 +112,7 @@ Tasks:
112
112
 
113
113
  ### Step 4: Update Bead
114
114
 
115
- ```bash
116
- bd update [bead-id] --status planning
117
- ```
115
+ Update bead status by adding a note via `bd_msg` or updating the spec.
118
116
 
119
117
  ## Output
120
118
 
@@ -129,7 +127,7 @@ Report:
129
127
 
130
128
  ```bash
131
129
  # View the feature
132
- bd show [bead-id]
130
+ bd_show({ id: "[bead-id]" })
133
131
 
134
132
  # Start implementation
135
133
  /implement [bead-id]
@@ -10,8 +10,8 @@ agent: planner
10
10
 
11
11
  ## Phase 1: Load Context
12
12
 
13
- ```bash
14
- bd show $ARGUMENTS --json
13
+ ```typescript
14
+ bd_show({ id: "$ARGUMENTS" });
15
15
  ```
16
16
 
17
17
  Read artifacts:
@@ -221,9 +221,7 @@ After approval, write `.beads/artifacts/<bead-id>/plan.md`:
221
221
 
222
222
  ## Phase 7: Update Bead
223
223
 
224
- ```bash
225
- bd edit <bead-id> --note "Plan approved: [option name]. [step count] steps."
226
- ```
224
+ Add a note about plan approval via `bd_msg` or update the spec with the approved approach.
227
225
 
228
226
  ## Output
229
227
 
@@ -18,7 +18,7 @@ Create a pull request following these steps:
18
18
  2. **Push branch**: `!git push -u origin $(git branch --show-current)`
19
19
 
20
20
  3. **Check for bead context:**
21
- - If `$ARGUMENTS` contains a bead ID, fetch bead details: `bd show $ARGUMENTS --json`
21
+ - If `$ARGUMENTS` contains a bead ID, fetch bead details: `bd_show({ id: "$ARGUMENTS" })`
22
22
  - Use bead title and spec to inform PR content
23
23
  - Reference the bead in the PR body for traceability
24
24
 
@@ -50,6 +50,4 @@ Closes: bd-XXXXX (if applicable)
50
50
 
51
51
  If a bead ID was provided, update the bead with PR link:
52
52
 
53
- ```bash
54
- bd edit $ARGUMENTS --note "PR created: <pr-url>"
55
- ```
53
+ Update the bead with a note about the PR using the beads messaging or note system.
@@ -12,7 +12,7 @@ Fix directly with clear comments. Commit.
12
12
 
13
13
  ## Structured work (bead-based)
14
14
 
15
- 1. Validate bead exists: `bd show $ARGUMENTS`
15
+ 1. Validate bead exists: `bd_show({ id: "$ARGUMENTS" })`
16
16
  2. Load constraints from `.beads/artifacts/$ARGUMENTS/spec.md`
17
17
  3. Research within scope: `/research $ARGUMENTS`
18
18
  4. Plan approach: `/plan $ARGUMENTS`
@@ -8,8 +8,8 @@ agent: build
8
8
 
9
9
  ## Phase 1: Load Bead Context
10
10
 
11
- ```bash
12
- bd show $ARGUMENTS --json
11
+ ```typescript
12
+ bd_show({ id: "$ARGUMENTS" });
13
13
  ```
14
14
 
15
15
  **Check for previous research:**
@@ -130,9 +130,7 @@ Existing code that informs implementation:
130
130
 
131
131
  ## Phase 5: Update Bead
132
132
 
133
- ```bash
134
- bd edit <bead-id> --note "Research complete. Key findings: [1-liner]"
135
- ```
133
+ Add a note about research completion via `bd_msg` or update the spec with key findings.
136
134
 
137
135
  ## Output
138
136
 
@@ -30,8 +30,8 @@ Review:
30
30
 
31
31
  ## Phase 2: Load Bead
32
32
 
33
- ```bash
34
- bd show $ARGUMENTS --json
33
+ ```typescript
34
+ bd_show({ id: "$ARGUMENTS" });
35
35
  ```
36
36
 
37
37
  ## Phase 3: Find Latest Handoff