opencodekit 0.6.7 → 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 (62) hide show
  1. package/dist/index.js +654 -651
  2. package/dist/template/.opencode/AGENTS.md +97 -13
  3. package/dist/template/.opencode/README.md +18 -16
  4. package/dist/template/.opencode/command/accessibility-check.md +1 -1
  5. package/dist/template/.opencode/command/analyze-mockup.md +1 -1
  6. package/dist/template/.opencode/command/analyze-project.md +11 -9
  7. package/dist/template/.opencode/command/brainstorm.md +1 -1
  8. package/dist/template/.opencode/command/commit.md +1 -1
  9. package/dist/template/.opencode/command/create.md +16 -2
  10. package/dist/template/.opencode/command/design-audit.md +1 -1
  11. package/dist/template/.opencode/command/design.md +1 -1
  12. package/dist/template/.opencode/command/finish.md +20 -8
  13. package/dist/template/.opencode/command/fix-ci.md +14 -9
  14. package/dist/template/.opencode/command/fix-types.md +6 -11
  15. package/dist/template/.opencode/command/fix-ui.md +1 -1
  16. package/dist/template/.opencode/command/fix.md +1 -1
  17. package/dist/template/.opencode/command/handoff.md +8 -6
  18. package/dist/template/.opencode/command/implement.md +33 -3
  19. package/dist/template/.opencode/command/import-plan.md +27 -14
  20. package/dist/template/.opencode/command/integration-test.md +7 -3
  21. package/dist/template/.opencode/command/issue.md +10 -9
  22. package/dist/template/.opencode/command/new-feature.md +6 -6
  23. package/dist/template/.opencode/command/plan.md +5 -5
  24. package/dist/template/.opencode/command/pr.md +4 -4
  25. package/dist/template/.opencode/command/research-and-implement.md +2 -2
  26. package/dist/template/.opencode/command/research-ui.md +1 -1
  27. package/dist/template/.opencode/command/research.md +3 -5
  28. package/dist/template/.opencode/command/resume.md +4 -2
  29. package/dist/template/.opencode/command/revert-feature.md +7 -7
  30. package/dist/template/.opencode/command/review-codebase.md +1 -1
  31. package/dist/template/.opencode/command/skill-create.md +4 -4
  32. package/dist/template/.opencode/command/skill-optimize.md +4 -4
  33. package/dist/template/.opencode/command/status.md +4 -4
  34. package/dist/template/.opencode/command/ui-review.md +2 -2
  35. package/dist/template/.opencode/dcp.jsonc +20 -2
  36. package/dist/template/.opencode/opencode.json +496 -491
  37. package/dist/template/.opencode/package.json +20 -20
  38. package/dist/template/.opencode/plugin/beads.ts +667 -0
  39. package/dist/template/.opencode/plugin/compaction.ts +80 -0
  40. package/dist/template/.opencode/skill/beads/SKILL.md +419 -0
  41. package/dist/template/.opencode/skill/beads/references/BOUNDARIES.md +218 -0
  42. package/dist/template/.opencode/skill/beads/references/DEPENDENCIES.md +130 -0
  43. package/dist/template/.opencode/skill/beads/references/RESUMABILITY.md +180 -0
  44. package/dist/template/.opencode/skill/beads/references/WORKFLOWS.md +222 -0
  45. package/dist/template/.opencode/skill/brainstorming/SKILL.md +2 -2
  46. package/dist/template/.opencode/skill/executing-plans/SKILL.md +1 -1
  47. package/dist/template/.opencode/skill/sharing-skills/SKILL.md +13 -4
  48. package/dist/template/.opencode/skill/subagent-driven-development/SKILL.md +1 -1
  49. package/dist/template/.opencode/skill/systematic-debugging/SKILL.md +2 -2
  50. package/dist/template/.opencode/skill/using-git-worktrees/SKILL.md +27 -18
  51. package/dist/template/.opencode/skill/{using-superpowers → using-skills}/SKILL.md +6 -3
  52. package/dist/template/.opencode/skill/writing-plans/SKILL.md +3 -3
  53. package/dist/template/.opencode/skill/writing-skills/SKILL.md +2 -2
  54. package/package.json +2 -1
  55. package/dist/template/.opencode/memory/handoffs/2025-12-27T103000Z.md +0 -76
  56. package/dist/template/.opencode/plugin/skill.ts +0 -275
  57. package/dist/template/.opencode/skill/systematic-debugging/CREATION-LOG.md +0 -119
  58. package/dist/template/.opencode/skill/systematic-debugging/test-academic.md +0 -14
  59. package/dist/template/.opencode/skill/systematic-debugging/test-pressure-1.md +0 -58
  60. package/dist/template/.opencode/skill/systematic-debugging/test-pressure-2.md +0 -68
  61. package/dist/template/.opencode/skill/systematic-debugging/test-pressure-3.md +0 -69
  62. package/dist/template/.opencode/skill/testing-skills-with-subagents/examples/CLAUDE_MD_TESTING.md +0 -189
@@ -5,7 +5,7 @@
5
5
  1. Security constraints (always first)
6
6
  2. Anti-hallucination rule (overrides all except security)
7
7
  3. Delegation rules (check before tool calls)
8
- 4. Skills check (`find_skills` → `use_skill`)
8
+ 4. Skills check (native `skill` tool)
9
9
  5. User explicit requests
10
10
  6. Base prompt behaviors
11
11
  7. Global rules (this file)
@@ -296,15 +296,103 @@ 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 Tools (Multi-Agent Coordination)
306
+
307
+ Native plugin tools for task coordination and file locking between agents.
308
+
309
+ ### When to Use
310
+
311
+ - **Multi-agent work**: Multiple agents on same codebase
312
+ - **File conflict prevention**: Reserve files before editing
313
+ - **Cross-workspace coordination**: FE/BE/Mobile agents communicating
314
+
315
+ ### Core Workflow
316
+
317
+ ```
318
+ bd_init() → bd_claim() → bd_reserve(paths) → [work] → bd_done(id, msg) → RESTART
319
+ ```
320
+
321
+ ### Tool Reference
322
+
323
+ **Lifecycle Tools**
324
+
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
+
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
+
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
+
331
+ **Task Management Tools**
332
+
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
+
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
+
337
+ **File Reservation Tools**
338
+
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
+
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
+
343
+ **Messaging Tools**
344
+
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
+ ```
377
+
378
+ ### Rules
379
+
380
+ - **Always `bd_init()` first** in any session using beads tools
381
+ - **Reserve before edit** to prevent conflicts
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
+ ```
392
+
305
393
  ## Skills System
306
394
 
307
- Use `find_skills` `use_skill` when:
395
+ OpenCode has a native `skill` tool that auto-discovers skills from `.opencode/skill/` and `~/.config/opencode/skill/`. Use `skill({ name: "skill-name" })` when:
308
396
 
309
397
  - Creating something new → `brainstorming`
310
398
  - Bug or unexpected behavior → `systematic-debugging`
@@ -321,16 +409,12 @@ Use `find_skills` → `use_skill` when:
321
409
 
322
410
  Skip for simple questions, quick edits, or conversations.
323
411
 
324
- ### Progressive Skill Loading
325
-
326
- Skills consume context. Manage them actively:
327
-
328
- 1. **Load on-demand**: Only load skills when starting relevant work
329
- 2. **Read linked files lazily**: Don't load all skill references immediately—read only when needed
330
- 3. **Unload after completion**: When task completes, skill context is no longer needed
331
- 4. **One skill at a time**: Avoid loading multiple skills unless task requires it
412
+ ### How It Works
332
413
 
333
- **IMPORTANT**: Always unload irrelevant skills to free context space. Loaded skills that aren't actively needed are context debt.
414
+ 1. Available skills are listed in the `skill` tool description (auto-discovered)
415
+ 2. Load a skill: `skill({ name: "brainstorming" })`
416
+ 3. Skills consume context - load on-demand, one at a time
417
+ 4. Skill permissions can be configured in `opencode.json` (`allow`/`deny`/`ask`)
334
418
 
335
419
  ## Core Constraints
336
420
 
@@ -41,7 +41,7 @@ opencode
41
41
 
42
42
  ├── agent/ # Custom agents (5 total)
43
43
  ├── command/ # Custom commands (26 workflows)
44
- ├── superpowers/skills/ # Domain expertise (16 skills)
44
+ ├── skill/ # Domain expertise (27 skills)
45
45
  ├── tool/ # Custom MCP tools (memory-*, observation, ast-grep)
46
46
  ├── plugin/ # Background plugins (enforcer, compactor, truncator)
47
47
  └── memory/ # Persistent context
@@ -105,22 +105,23 @@ GOOGLE_APPLICATION_CREDENTIALS=/path/to/key.json
105
105
 
106
106
  - `/commit` - Intelligent git commits
107
107
  - `/pr` - Create pull requests
108
- - `/design` - Thoughtful design with brainstorming
109
- - `/fix` - Systematic debugging
110
- - `/research` - Deep documentation search
111
- - `/review-codebase` - Comprehensive audit
108
+ - `/design` - Thoughtful design with brainstorming expertise
109
+ - `/fix` - Systematic debugging with root-cause analysis
110
+ - `/implement` - High-quality implementation with TDD and subagents
111
+ - `/finish` - Verified completion with structured integration options
112
112
 
113
113
  **See:** `.opencode/command/` for all commands
114
114
 
115
115
  ---
116
116
 
117
- ## Skills System (16 skills)
117
+ ## Skills System (27 skills)
118
118
 
119
- **Core:** brainstorming, writing-plans, executing-plans, verification-before-completion
120
- **Code:** requesting-code-review, receiving-code-review, root-cause-tracing
121
- **Advanced:** gemini-large-context, subagent-driven-development, dispatching-parallel-agents
119
+ **Core:** brainstorming, writing-plans, executing-plans, verification-before-completion, using-superpowers, finishing-a-development-branch
120
+ **Code:** requesting-code-review, receiving-code-review, root-cause-tracing, test-driven-development, testing-anti-patterns, condition-based-waiting, defense-in-depth, systematic-debugging
121
+ **UI/UX:** frontend-aesthetics, mockup-to-code, visual-analysis, ui-ux-research, accessibility-audit, design-system-audit
122
+ **Workflow:** gemini-large-context, subagent-driven-development, dispatching-parallel-agents, using-git-worktrees, sharing-skills, writing-skills, testing-skills-with-subagents
122
123
 
123
- **Note:** Skills load via `use_skill()` in commands
124
+ **Note:** Skills load via native `skill()` tool. Commands auto-load relevant expertise.
124
125
 
125
126
  ---
126
127
 
@@ -287,9 +288,10 @@ fi
287
288
 
288
289
  **"Skills not loading":**
289
290
 
290
- - Skills load via commands with `use_skill()`
291
+ - Skills load via native `skill()` tool (auto-discovered)
291
292
  - Use /design to load brainstorming
292
- - Use /fix to load debugging skills
293
+ - Use /fix to load systematic-debugging
294
+ - Check `.opencode/skill/` directory exists
293
295
 
294
296
  ---
295
297
 
@@ -324,12 +326,12 @@ fi
324
326
  - **OpenCode Docs:** https://opencode.ai/docs
325
327
  - **Context7 API:** https://context7.com
326
328
  - **Exa API:** https://exa.ai
327
- - **Skills Documentation:** `superpowers/skills/`
329
+ - **Skills Documentation:** `.opencode/skill/`
328
330
  - **Architecture Guide:** `AGENTS.md`
329
331
 
330
332
  ---
331
333
 
332
- **OpenCodeKit v0.3.0**
334
+ **OpenCodeKit v0.7.0**
333
335
  **Architecture:** Two-Layer (Memory + Beads + Git)
334
- **New in v0.3.0:** Background plugins (enforcer, compactor, truncator) + ast-grep tool
335
- **Last Updated:** December 17, 2025
336
+ **New in v0.7.0:** Native skill tool integration, Beads Village MCP, 27 skills, enhanced commands
337
+ **Last Updated:** December 30, 2025
@@ -7,7 +7,7 @@ model: proxypal/gemini-3-flash-preview
7
7
 
8
8
  # Accessibility Check: $ARGUMENTS
9
9
 
10
- use_skill("accessibility-audit")
10
+ skill({ name: "accessibility-audit" })
11
11
 
12
12
  Perform WCAG accessibility audit.
13
13
 
@@ -7,7 +7,7 @@ model: proxypal/gemini-3-flash-preview
7
7
 
8
8
  # Analyze Mockup: $ARGUMENTS
9
9
 
10
- use_skill("visual-analysis")
10
+ skill({ name: "visual-analysis" })
11
11
 
12
12
  Analyze the provided UI mockup or screenshot.
13
13
 
@@ -5,10 +5,12 @@ agent: planner
5
5
 
6
6
  # Analyze Project
7
7
 
8
+ **For large codebases:** `skill({ name: "gemini-large-context" })`
9
+
8
10
  ## Quick Status
9
11
 
10
12
  1. **Git:** `git status` - current branch, changes
11
- 2. **Tasks:** `bd list` - active beads
13
+ 2. **Tasks:** `bd_ls({ status: "open" })` - active beads
12
14
  3. **CI:** Check build status
13
15
  4. **Dependencies:** Check for outdated packages
14
16
 
@@ -16,8 +18,8 @@ agent: planner
16
18
 
17
19
  Find actionable tasks with no blockers:
18
20
 
19
- ```bash
20
- bd ready
21
+ ```typescript
22
+ bd_ls({ status: "ready", limit: 10, offset: 0 });
21
23
  ```
22
24
 
23
25
  This shows beads that are unblocked and ready to start. Use `/implement <bead-id>` to begin work on any of these.
@@ -26,9 +28,9 @@ This shows beads that are unblocked and ready to start. Use `/implement <bead-id
26
28
 
27
29
  ### Task Overview
28
30
 
29
- ```bash
30
- bd list --status open
31
- bd ready
31
+ ```typescript
32
+ bd_ls({ status: "open", limit: 10, offset: 0 });
33
+ bd_ls({ status: "ready", limit: 10, offset: 0 });
32
34
  ```
33
35
 
34
36
  For active beads, read spec from `.beads/artifacts/<bead-id>/spec.md`
@@ -37,8 +39,8 @@ For active beads, read spec from `.beads/artifacts/<bead-id>/spec.md`
37
39
 
38
40
  Check what's blocking progress:
39
41
 
40
- ```bash
41
- bd list --status blocked
42
+ ```typescript
43
+ bd_ls({ status: "blocked", limit: 10, offset: 0 });
42
44
  ```
43
45
 
44
46
  For each blocked bead, identify the blocker and either resolve it or escalate.
@@ -53,7 +55,7 @@ For each blocked bead, identify the blocker and either resolve it or escalate.
53
55
 
54
56
  ### Recommendations
55
57
 
56
- - **Immediate:** Tasks from `bd ready` to start now
58
+ - **Immediate:** Tasks from `bd_ls({ status: "ready" })` to start now
57
59
  - **Blocked:** Dependencies preventing progress
58
60
  - **Attention:** Areas needing cleanup or refactoring
59
61
  - **Updates:** Dependency updates needed
@@ -6,7 +6,7 @@ agent: build
6
6
 
7
7
  # Brainstorm: $ARGUMENTS
8
8
 
9
- use_skill("brainstorming")
9
+ skill({ name: "brainstorming" })
10
10
 
11
11
  Follow the skill for ideation, then explore the codebase to validate feasibility. Create quick prototypes or code spikes if helpful.
12
12
 
@@ -5,7 +5,7 @@ argument-hint: "[bead-id]"
5
5
 
6
6
  # Commit
7
7
 
8
- use_skill("verification-before-completion")
8
+ skill({ name: "verification-before-completion" })
9
9
 
10
10
  ## Workflow
11
11
 
@@ -40,16 +40,30 @@ Creating:
40
40
  Type: [type]
41
41
  Priority: [0-4]
42
42
  Complexity: [quick/deep]
43
+ Role: [fe/be/mobile/devops/qa] (optional, for multi-agent)
43
44
 
44
45
  Approve? (yes/modify)
45
46
  ```
46
47
 
47
48
  On approval:
48
49
 
49
- ```bash
50
- 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
+ });
51
57
  ```
52
58
 
59
+ **If using Beads Village for multi-agent coordination:** Add role tags so tasks can be auto-assigned to the right agent:
60
+
61
+ ```typescript
62
+ bd_add({ title: "[title]", type: "[type]", pri: [priority], tags: ["[role]"] });
63
+ ```
64
+
65
+ This makes the task claimable by agents with matching roles.
66
+
53
67
  ## Phase 4: Create Spec
54
68
 
55
69
  ```bash
@@ -7,7 +7,7 @@ model: proxypal/gemini-3-pro-preview
7
7
 
8
8
  # Design Audit: $ARGUMENTS
9
9
 
10
- use_skill("design-system-audit")
10
+ skill({ name: "design-system-audit" })
11
11
 
12
12
  Perform a comprehensive design system audit.
13
13
 
@@ -6,7 +6,7 @@ agent: vision
6
6
 
7
7
  # Design: $ARGUMENTS
8
8
 
9
- use_skill("frontend-aesthetics")
9
+ skill({ name: "frontend-aesthetics" })
10
10
 
11
11
  Focus on visual design: typography, color, spacing, layout, accessibility. Avoid AI slop aesthetics.
12
12
 
@@ -6,10 +6,15 @@ agent: build
6
6
 
7
7
  # Finish
8
8
 
9
+ **Load skills:**
10
+
11
+ - `skill({ name: "verification-before-completion" })`
12
+ - `skill({ name: "finishing-a-development-branch" })`
13
+
9
14
  ## Phase 1: Load Bead
10
15
 
11
- ```bash
12
- bd show $ARGUMENTS --json
16
+ ```typescript
17
+ bd_show({ id: "$ARGUMENTS" });
13
18
  ```
14
19
 
15
20
  Verify status is `in-progress` or `open`.
@@ -170,21 +175,25 @@ Closes: <bead-id>"
170
175
 
171
176
  ## Phase 7: Close Bead
172
177
 
173
- ```bash
174
- bd close $ARGUMENTS --reason "Implemented: [1-liner summary]"
178
+ Complete the task and release any file reservations:
179
+
180
+ ```typescript
181
+ bd_done({ id: "$ARGUMENTS", msg: "Implemented: [1-liner summary]" });
175
182
  ```
176
183
 
184
+ This closes the bead, releases file locks, and syncs with git.
185
+
177
186
  ## Phase 8: Database Health Check
178
187
 
179
188
  Check issue count:
180
189
 
181
- ```bash
182
- bd list --status all 2>/dev/null | wc -l
190
+ ```typescript
191
+ bd_ls({ status: "all", limit: 1 });
183
192
  ```
184
193
 
185
194
  **If >200 issues:** Warn about performance.
186
195
 
187
- **If >500 issues:** Strongly recommend cleanup.
196
+ **If >500 issues:** Strongly recommend cleanup with `bd_cleanup({ days: 7 })`.
188
197
 
189
198
  ## Output
190
199
 
@@ -209,7 +218,8 @@ Branch: <bead-id>
209
218
 
210
219
  ```
211
220
  ⚠️ Database has [count] issues. Consider running:
212
- bd cleanup --older-than 7d && bd sync
221
+ bd_cleanup({ days: 7 })
222
+ bd_sync()
213
223
  ```
214
224
 
215
225
  **Session recommendation:**
@@ -223,6 +233,8 @@ Task complete. For best performance:
223
233
  Next: Create PR or merge to main
224
234
  ```
225
235
 
236
+ After calling `bd_done()`, restart your session for a fresh context. The one-task-per-session pattern keeps agents fast and focused.
237
+
226
238
  **If work was interrupted or partially complete:**
227
239
 
228
240
  ```
@@ -3,6 +3,10 @@ description: Analyze Github Actions logs and fix issues with bead tracking
3
3
  argument-hint: "[github-actions-url]"
4
4
  ---
5
5
 
6
+ **Load skill:** `skill({ name: "systematic-debugging" })`
7
+
8
+ For deep tracing: `skill({ name: "root-cause-tracing" })`
9
+
6
10
  ## Github Actions URL
7
11
 
8
12
  <url>$ARGUMENTS</url>
@@ -11,15 +15,16 @@ argument-hint: "[github-actions-url]"
11
15
 
12
16
  CI failures are P0 bugs. Create a bead to track:
13
17
 
14
- ```bash
15
- 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
+ });
16
25
  ```
17
26
 
18
- Save the bead ID for tracking. Add the CI run reference:
19
-
20
- ```bash
21
- bd edit <bead-id> --note "CI Run: $ARGUMENTS"
22
- ```
27
+ Save the bead ID for tracking. Add the CI run reference via `bd_msg` or notes.
23
28
 
24
29
  ## Workflow
25
30
 
@@ -37,8 +42,8 @@ bd edit <bead-id> --note "CI Run: $ARGUMENTS"
37
42
 
38
43
  Once CI passes:
39
44
 
40
- ```bash
41
- bd close <bead-id> --reason "CI fixed: <summary of fix>"
45
+ ```typescript
46
+ bd_done({ id: "<bead-id>", msg: "CI fixed: <summary of fix>" });
42
47
  ```
43
48
 
44
49
  ## Notes
@@ -5,6 +5,8 @@ argument-hint: "[bead-id]"
5
5
 
6
6
  # Fix Type Errors
7
7
 
8
+ **Load skill:** `skill({ name: "systematic-debugging" })`
9
+
8
10
  Run `bun run typecheck` and fix all type errors.
9
11
 
10
12
  ## Rules
@@ -17,19 +19,12 @@ Run `bun run typecheck` and fix all type errors.
17
19
 
18
20
  If a bead ID is provided (`$ARGUMENTS`), track the type fixing work:
19
21
 
20
- 1. **Before fixing:** Note the initial error count
21
-
22
- ```bash
23
- bd edit $ARGUMENTS --note "Type errors found: <count>"
24
- ```
22
+ 1. **Before fixing:** Note the initial error count via `bd_msg` or notes
25
23
 
26
- 2. **After fixing:** Update with resolution
27
- ```bash
28
- bd edit $ARGUMENTS --note "Type errors resolved: <summary of fixes>"
29
- ```
24
+ 2. **After fixing:** Update with resolution summary
30
25
 
31
26
  If type errors reveal deeper issues requiring refactoring, create a follow-up bead:
32
27
 
33
- ```bash
34
- 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 });
35
30
  ```
@@ -6,7 +6,7 @@ agent: build
6
6
 
7
7
  # Fix UI: $ARGUMENTS
8
8
 
9
- use_skill("frontend-aesthetics")
9
+ skill({ name: "frontend-aesthetics" })
10
10
 
11
11
  1. **Analyze:** Delegate to @vision for initial assessment
12
12
  - If screenshots/videos provided, @vision describes issue in detail
@@ -10,7 +10,7 @@ agent: build
10
10
 
11
11
  **Complex (unclear cause, multiple files):**
12
12
 
13
- use_skill("systematic-debugging")
13
+ skill({ name: "systematic-debugging" })
14
14
 
15
15
  Follow four phases:
16
16
 
@@ -6,12 +6,16 @@ agent: build
6
6
 
7
7
  # Handoff
8
8
 
9
+ **Load skill:** `skill({ name: "verification-before-completion" })`
10
+
9
11
  ## Phase 1: Gather State
10
12
 
11
- ```bash
12
- # Bead info
13
- bd show $ARGUMENTS --json
13
+ ```typescript
14
+ // Bead info
15
+ bd_show({ id: "$ARGUMENTS" });
16
+ ```
14
17
 
18
+ ```bash
15
19
  # Git state
16
20
  git remote get-url origin 2>/dev/null
17
21
  git branch --show-current
@@ -121,9 +125,7 @@ read_session("last", project="current")
121
125
 
122
126
  ## Phase 4: Update Bead
123
127
 
124
- ```bash
125
- bd edit <bead-id> --note "Handoff created. Resume with /resume <bead-id>"
126
- ```
128
+ Add a note about the handoff via `bd_msg` or update spec with handoff reference.
127
129
 
128
130
  ## Output
129
131
 
@@ -6,10 +6,14 @@ agent: build
6
6
 
7
7
  # Implement
8
8
 
9
+ **Load skill:** `skill({ name: "test-driven-development" })`
10
+
11
+ For large tasks with 3+ phases, also load: `skill({ name: "subagent-driven-development" })`
12
+
9
13
  ## Phase 1: Setup Workspace
10
14
 
11
- ```bash
12
- bd show $ARGUMENTS --json
15
+ ```typescript
16
+ bd_show({ id: "$ARGUMENTS" });
13
17
  ```
14
18
 
15
19
  Check git state:
@@ -27,6 +31,16 @@ Create branch if not on bead branch:
27
31
  git checkout -b <bead-id>
28
32
  ```
29
33
 
34
+ **Multi-agent coordination:**
35
+
36
+ Initialize your agent session and claim the task:
37
+
38
+ ```typescript
39
+ bd_init({ team: "project", role: "<your-role>" });
40
+ ```
41
+
42
+ This registers you in the workspace. If another agent is working on the same task, you'll be notified.
43
+
30
44
  ## Phase 2: Load Context
31
45
 
32
46
  **Check for previous session work:**
@@ -96,6 +110,16 @@ Mode: [Quick/Planned]
96
110
 
97
111
  ## Phase 4: Implementation
98
112
 
113
+ **Reserve files before editing:**
114
+
115
+ Before making changes, lock the files you'll modify to prevent conflicts with other agents:
116
+
117
+ ```typescript
118
+ bd_reserve({ paths: ["src/auth.ts", "src/utils/**"] });
119
+ ```
120
+
121
+ This creates an advisory lock. Other agents will see your reservation and avoid those files.
122
+
99
123
  ### With Plan (Planned Mode)
100
124
 
101
125
  For each unchecked step in plan.md:
@@ -139,7 +163,13 @@ If "pause" or "stop": Run `/handoff <bead-id>`.
139
163
 
140
164
  ## Phase 6: Complete
141
165
 
142
- When done:
166
+ When done, release any file reservations:
167
+
168
+ ```typescript
169
+ bd_release();
170
+ ```
171
+
172
+ Then report:
143
173
 
144
174
  ```
145
175
  Implementation Complete: <bead-id>