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
@@ -6,6 +6,8 @@ agent: build
6
6
 
7
7
  # Import Plan
8
8
 
9
+ **Load skill:** `skill({ name: "executing-plans" })`
10
+
9
11
  Import a markdown plan into Beads epics and issues. Follows Steve Yegge's "plan outside, import inside" pattern.
10
12
 
11
13
  ## Phase 1: Load Plan
@@ -53,8 +55,13 @@ Proceed with import? (yes/modify/cancel)
53
55
 
54
56
  For each epic (top-level section):
55
57
 
56
- ```bash
57
- 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
+ });
58
65
  ```
59
66
 
60
67
  Store epic IDs for dependency linking.
@@ -63,8 +70,14 @@ Store epic IDs for dependency linking.
63
70
 
64
71
  For each issue under an epic:
65
72
 
66
- ```bash
67
- 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
+ });
68
81
  ```
69
82
 
70
83
  **Infer type from content:**
@@ -83,10 +96,15 @@ bd create "[Issue title]" -t task -p 2 -d "[description]" --epic <epic-id> --jso
83
96
 
84
97
  ## Phase 5: Link Dependencies
85
98
 
86
- For issues with dependencies:
99
+ For issues with dependencies, use the `deps` parameter when creating:
87
100
 
88
- ```bash
89
- 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
+ });
90
108
  ```
91
109
 
92
110
  Common patterns to detect:
@@ -123,12 +141,7 @@ Apply suggestions? (yes/no/select)
123
141
 
124
142
  ## Phase 7: Polish (Optional)
125
143
 
126
- If user approves suggestions:
127
-
128
- ```bash
129
- bd edit <bead-id> --title "[improved title]"
130
- bd edit <bead-id> -d "[improved description]"
131
- ```
144
+ If user approves suggestions, update the spec files in `.beads/artifacts/<bead-id>/` directly.
132
145
 
133
146
  Iterate up to 5 times if user requests more refinement.
134
147
 
@@ -150,7 +163,7 @@ Created:
150
163
  │ └── <issue-3-id>: [title]
151
164
  └── ...
152
165
 
153
- Start work: bd ready
166
+ Start work: `bd_ls({ status: "ready", limit: 10, offset: 0 })`
154
167
  First task: /implement <first-unblocked-id>
155
168
  ```
156
169
 
@@ -6,17 +6,21 @@ agent: build
6
6
 
7
7
  # Integration Test: $ARGUMENTS
8
8
 
9
- Use `use_skill("test-driven-development")` for integration testing.
9
+ **Load skills:**
10
+
11
+ - `skill({ name: "test-driven-development" })`
12
+ - `skill({ name: "condition-based-waiting" })` (for async tests)
13
+ - `skill({ name: "testing-anti-patterns" })` (avoid common mistakes)
10
14
 
11
15
  ## Task Validation
12
16
 
13
- 1. **Check bead exists:** `bd show $ARGUMENTS`
17
+ 1. **Check bead exists:** `bd_show({ id: "$ARGUMENTS" })`
14
18
  2. **Read constraints:** `.beads/artifacts/$ARGUMENTS/spec.md` Testing Notes section
15
19
  3. **If missing:** STOP. Create with `/create` first.
16
20
 
17
21
  ## Workflow
18
22
 
19
- 1. **Load skill** - `use_skill("test-driven-development")`
23
+ 1. **Load skill** - `skill({ name: "test-driven-development" })`
20
24
  2. **Follow TDD cycle:**
21
25
  - Write failing integration test first
22
26
  - Verify it fails for the right reason
@@ -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.
@@ -7,6 +7,8 @@ model: proxypal/gemini-3-flash-preview
7
7
 
8
8
  # New Feature: $ARGUMENTS
9
9
 
10
+ **Load skill:** `skill({ name: "brainstorming" })`
11
+
10
12
  Create a complete feature track with bead, specification, and implementation plan.
11
13
 
12
14
  ## Instructions
@@ -21,8 +23,8 @@ Parse from `$ARGUMENTS`:
21
23
 
22
24
  ### Step 1: Create Bead
23
25
 
24
- ```bash
25
- bd new [type] "[feature-name]" --priority [priority]
26
+ ```typescript
27
+ bd_add({ title: "[feature-name]", type: "[type]", pri: [priority] });
26
28
  ```
27
29
 
28
30
  Capture the bead ID from output.
@@ -110,9 +112,7 @@ Tasks:
110
112
 
111
113
  ### Step 4: Update Bead
112
114
 
113
- ```bash
114
- bd update [bead-id] --status planning
115
- ```
115
+ Update bead status by adding a note via `bd_msg` or updating the spec.
116
116
 
117
117
  ## Output
118
118
 
@@ -127,7 +127,7 @@ Report:
127
127
 
128
128
  ```bash
129
129
  # View the feature
130
- bd show [bead-id]
130
+ bd_show({ id: "[bead-id]" })
131
131
 
132
132
  # Start implementation
133
133
  /implement [bead-id]
@@ -6,10 +6,12 @@ agent: planner
6
6
 
7
7
  # Plan
8
8
 
9
+ **Load skill:** `skill({ name: "writing-plans" })`
10
+
9
11
  ## Phase 1: Load Context
10
12
 
11
- ```bash
12
- bd show $ARGUMENTS --json
13
+ ```typescript
14
+ bd_show({ id: "$ARGUMENTS" });
13
15
  ```
14
16
 
15
17
  Read artifacts:
@@ -219,9 +221,7 @@ After approval, write `.beads/artifacts/<bead-id>/plan.md`:
219
221
 
220
222
  ## Phase 7: Update Bead
221
223
 
222
- ```bash
223
- bd edit <bead-id> --note "Plan approved: [option name]. [step count] steps."
224
- ```
224
+ Add a note about plan approval via `bd_msg` or update the spec with the approved approach.
225
225
 
226
226
  ## Output
227
227
 
@@ -3,6 +3,8 @@ description: Create and submit pull request with bead traceability
3
3
  argument-hint: "[bead-id]"
4
4
  ---
5
5
 
6
+ **Load skill:** `skill({ name: "verification-before-completion" })`
7
+
6
8
  ## Create Pull Request
7
9
 
8
10
  **Current Branch:** `!git branch --show-current`
@@ -16,7 +18,7 @@ Create a pull request following these steps:
16
18
  2. **Push branch**: `!git push -u origin $(git branch --show-current)`
17
19
 
18
20
  3. **Check for bead context:**
19
- - 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" })`
20
22
  - Use bead title and spec to inform PR content
21
23
  - Reference the bead in the PR body for traceability
22
24
 
@@ -48,6 +50,4 @@ Closes: bd-XXXXX (if applicable)
48
50
 
49
51
  If a bead ID was provided, update the bead with PR link:
50
52
 
51
- ```bash
52
- bd edit $ARGUMENTS --note "PR created: <pr-url>"
53
- ```
53
+ Update the bead with a note about the PR using the beads messaging or note system.
@@ -12,10 +12,10 @@ 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`
19
- 5. Implement with TDD: `use_skill("test-driven-development")`
19
+ 5. Implement with TDD: `skill({ name: "test-driven-development" })`
20
20
  6. Complete review: `.beads/artifacts/$ARGUMENTS/review.md`
21
21
  7. Run `/finish $ARGUMENTS`
@@ -7,7 +7,7 @@ model: proxypal/gemini-3-flash-preview
7
7
 
8
8
  # Research UI: $ARGUMENTS
9
9
 
10
- use_skill("ui-ux-research")
10
+ skill({ name: "ui-ux-research" })
11
11
 
12
12
  Research UI/UX patterns, implementations, or design topics.
13
13
 
@@ -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
 
@@ -6,6 +6,8 @@ agent: build
6
6
 
7
7
  # Resume
8
8
 
9
+ **Load skill:** `skill({ name: "executing-plans" })`
10
+
9
11
  ## Phase 1: Load Previous Session Context
10
12
 
11
13
  **Check recent sessions:**
@@ -28,8 +30,8 @@ Review:
28
30
 
29
31
  ## Phase 2: Load Bead
30
32
 
31
- ```bash
32
- bd show $ARGUMENTS --json
33
+ ```typescript
34
+ bd_show({ id: "$ARGUMENTS" });
33
35
  ```
34
36
 
35
37
  ## Phase 3: Find Latest Handoff
@@ -7,6 +7,8 @@ model: proxypal/gemini-3-flash-preview
7
7
 
8
8
  # Revert Feature: $ARGUMENTS
9
9
 
10
+ **Load skill:** `skill({ name: "verification-before-completion" })`
11
+
10
12
  Intelligently revert changes for a bead with git awareness.
11
13
 
12
14
  ## Instructions
@@ -22,8 +24,8 @@ Parse from `$ARGUMENTS`:
22
24
 
23
25
  ### Step 1: Analyze Bead History
24
26
 
25
- ```bash
26
- bd show [bead-id] --history
27
+ ```typescript
28
+ bd_show({ id: "[bead-id]" });
27
29
  ```
28
30
 
29
31
  Identify:
@@ -85,9 +87,7 @@ git revert --no-commit [commits...]
85
87
 
86
88
  ### Step 5: Update Bead
87
89
 
88
- ```bash
89
- bd update [bead-id] --status reverted --note "Reverted [scope]"
90
- ```
90
+ Update bead status by adding a note via `bd_msg` about the revert.
91
91
 
92
92
  ## Safety Checks
93
93
 
@@ -117,10 +117,10 @@ Report:
117
117
 
118
118
  ```bash
119
119
  # View bead history
120
- bd show [bead-id] --history
120
+ bd_show({ id: "[bead-id]" })
121
121
 
122
122
  # Check current status
123
- bd status
123
+ bd_status({ include_agents: false })
124
124
 
125
125
  # Re-implement after revert
126
126
  /implement [bead-id]
@@ -6,7 +6,7 @@ agent: review
6
6
 
7
7
  # Review: $ARGUMENTS
8
8
 
9
- use_skill("requesting-code-review")
9
+ skill({ name: "requesting-code-review" })
10
10
 
11
11
  If bead exists, review against `.beads/artifacts/$ARGUMENTS/spec.md` constraints.
12
12
 
@@ -6,11 +6,11 @@ agent: build
6
6
 
7
7
  # Create Skill: $ARGUMENTS
8
8
 
9
- Use `use_skill("writing-skills")` to create a new skill.
9
+ Use `skill({ name: "writing-skills" })` to create a new skill.
10
10
 
11
11
  ## Workflow
12
12
 
13
- 1. **Load skill** - `use_skill("writing-skills")`
13
+ 1. **Load skill** - `skill({ name: "writing-skills" })`
14
14
  2. **Follow by TDD process** - Test with subagents before writing
15
15
  3. **Save to** `.opencode/skill/$ARGUMENTS/`
16
16
 
@@ -25,5 +25,5 @@ Use `use_skill("writing-skills")` to create a new skill.
25
25
 
26
26
  ## After Creation
27
27
 
28
- - Test with `use_skill("testing-skills-with-subagents")`
29
- - Share upstream with `use_skill("sharing-skills")`
28
+ - Test with `skill({ name: "testing-skills-with-subagents" })`
29
+ - Share upstream with `skill({ name: "sharing-skills" })`
@@ -6,14 +6,14 @@ agent: build
6
6
 
7
7
  # Optimize Skill: $ARGUMENTS
8
8
 
9
- Use `use_skill("writing-skills")` to optimize an existing skill.
9
+ Use `skill({ name: "writing-skills" })` to optimize an existing skill.
10
10
 
11
11
  ## Workflow
12
12
 
13
13
  1. **Read current skill** from `.opencode/skill/$ARGUMENTS/` or `.opencode/superpowers/skills/$ARGUMENTS/`
14
- 2. **Load skill** - `use_skill("writing-skills")`
14
+ 2. **Load skill** - `skill({ name: "writing-skills" })`
15
15
  3. **Apply TDD process** - Test, refine, verify
16
- 4. **Test changes** with `use_skill("testing-skills-with-subagents")`
16
+ 4. **Test changes** with `skill({ name: "testing-skills-with-subagents" })`
17
17
 
18
18
  ## Optimization Goals
19
19
 
@@ -25,4 +25,4 @@ Use `use_skill("writing-skills")` to optimize an existing skill.
25
25
  ## After Optimization
26
26
 
27
27
  - Verify with subagent testing
28
- - Share improvements upstream with `use_skill("sharing-skills")`
28
+ - Share improvements upstream with `skill({ name: "sharing-skills" })`
@@ -8,7 +8,7 @@ agent: explore
8
8
  ## Quick Summary
9
9
 
10
10
  1. **Git:** Current branch, uncommitted changes
11
- 2. **Tasks:** `bd list` - count by status
11
+ 2. **Tasks:** `bd_ls()` - count by status
12
12
  3. **CI:** Any build issues
13
13
  4. **Sessions:** Recent activity
14
14
 
@@ -43,8 +43,8 @@ Activity: 2 sessions, 73 messages, 20 files modified
43
43
 
44
44
  ## Task Compliance
45
45
 
46
- ```bash
47
- bd list --status open
46
+ ```typescript
47
+ bd_ls({ status: "open" });
48
48
  ```
49
49
 
50
50
  For each bead, check `.beads/artifacts/<bead-id>/`:
@@ -70,7 +70,7 @@ Compliance: X/Y beads complete
70
70
 
71
71
  ## Active Tasks
72
72
 
73
- For `bd list --status in-progress`:
73
+ For `bd_ls({ status: "in_progress" })`:
74
74
 
75
75
  - Bead ID, Title, Priority
76
76
  - Goal from spec.md
@@ -7,8 +7,8 @@ model: proxypal/gemini-3-pro-preview
7
7
 
8
8
  # UI Review: $ARGUMENTS
9
9
 
10
- use_skill("frontend-aesthetics")
11
- use_skill("visual-analysis")
10
+ skill({ name: "frontend-aesthetics" })
11
+ skill({ name: "visual-analysis" })
12
12
 
13
13
  Review UI/UX design for quality, aesthetics, and best practices.
14
14
 
@@ -24,8 +24,18 @@
24
24
  "memory-read",
25
25
  "memory-update",
26
26
  "observation",
27
- "use_skill",
28
- "skill"
27
+ "skill",
28
+ "lsp",
29
+ "lsp_lsp_rename",
30
+ "lsp_lsp_code_actions",
31
+ "lsp_lsp_code_action_apply",
32
+ "lsp_lsp_organize_imports",
33
+ "bd_init",
34
+ "bd_claim",
35
+ "bd_done",
36
+ "bd_show",
37
+ "bd_reserve",
38
+ "bd_reservations"
29
39
  ]
30
40
  },
31
41
  // Removes tool content from context without preservation (for completed tasks or noise)
@@ -51,6 +61,14 @@
51
61
  "supersedeWrites": {
52
62
  "enabled": true
53
63
  },
64
+ // Prune tool inputs for errored tools after X turns
65
+ "purgeErrors": {
66
+ "enabled": true,
67
+ // Number of turns before errored tool inputs are pruned
68
+ "turns": 4,
69
+ // Additional tools to protect from pruning
70
+ "protectedTools": []
71
+ },
54
72
  // (Legacy) Run an LLM to analyze what tool calls are no longer relevant on idle
55
73
  "onIdle": {
56
74
  "enabled": false,