opencodekit 0.12.5 → 0.12.7

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 (44) hide show
  1. package/dist/index.js +2 -2
  2. package/dist/template/.opencode/agent/build.md +54 -29
  3. package/dist/template/.opencode/agent/explore.md +27 -16
  4. package/dist/template/.opencode/agent/planner.md +103 -63
  5. package/dist/template/.opencode/agent/review.md +31 -23
  6. package/dist/template/.opencode/agent/rush.md +33 -23
  7. package/dist/template/.opencode/agent/scout.md +27 -19
  8. package/dist/template/.opencode/agent/vision.md +29 -19
  9. package/dist/template/.opencode/command/accessibility-check.md +1 -0
  10. package/dist/template/.opencode/command/analyze-mockup.md +1 -0
  11. package/dist/template/.opencode/command/analyze-project.md +2 -1
  12. package/dist/template/.opencode/command/brainstorm.md +2 -1
  13. package/dist/template/.opencode/command/design-audit.md +1 -0
  14. package/dist/template/.opencode/command/finish.md +39 -4
  15. package/dist/template/.opencode/command/implement.md +26 -6
  16. package/dist/template/.opencode/command/init.md +1 -0
  17. package/dist/template/.opencode/command/pr.md +28 -1
  18. package/dist/template/.opencode/command/research-ui.md +1 -0
  19. package/dist/template/.opencode/command/research.md +1 -0
  20. package/dist/template/.opencode/command/review-codebase.md +1 -0
  21. package/dist/template/.opencode/command/status.md +3 -2
  22. package/dist/template/.opencode/command/summarize.md +2 -1
  23. package/dist/template/.opencode/command/ui-review.md +1 -0
  24. package/dist/template/.opencode/memory/project/architecture.md +59 -6
  25. package/dist/template/.opencode/memory/project/commands.md +20 -164
  26. package/dist/template/.opencode/memory/user.md +24 -7
  27. package/dist/template/.opencode/opencode.json +496 -542
  28. package/dist/template/.opencode/package.json +1 -1
  29. package/dist/template/.opencode/skill/condition-based-waiting/example.ts +71 -65
  30. package/dist/template/.opencode/tool/memory-read.ts +57 -57
  31. package/dist/template/.opencode/tool/memory-update.ts +53 -53
  32. package/dist/template/.opencode/tsconfig.json +19 -19
  33. package/package.json +1 -1
  34. package/dist/template/.opencode/command.backup/analyze-project.md +0 -465
  35. package/dist/template/.opencode/command.backup/finish.md +0 -167
  36. package/dist/template/.opencode/command.backup/implement.md +0 -143
  37. package/dist/template/.opencode/command.backup/pr.md +0 -252
  38. package/dist/template/.opencode/command.backup/status.md +0 -376
  39. package/dist/template/.opencode/lib/lsp/client.ts +0 -614
  40. package/dist/template/.opencode/lib/lsp/config.ts +0 -199
  41. package/dist/template/.opencode/lib/lsp/constants.ts +0 -339
  42. package/dist/template/.opencode/lib/lsp/types.ts +0 -138
  43. package/dist/template/.opencode/lib/lsp/utils.ts +0 -190
  44. package/dist/template/.opencode/memory/project/SHELL_OUTPUT_MIGRATION_PLAN.md +0 -551
@@ -1,143 +0,0 @@
1
- ---
2
- description: Implement a bead - load context, make changes, verify
3
- argument-hint: "<bead-id>"
4
- agent: build
5
- ---
6
-
7
- # Implement: $ARGUMENTS
8
-
9
- You're implementing a tracked task. Stay focused, verify as you go, hand off if you hit limits.
10
-
11
- ## First: Load Context
12
-
13
- ```typescript
14
- skill({ name: "beads" });
15
- skill({ name: "test-driven-development" });
16
- skill({ name: "verification-before-completion" });
17
- ```
18
-
19
- Get the task details and check for messages:
20
-
21
- ```bash
22
- bd show $ARGUMENTS
23
- bd list --status=in_progress # See what else is active
24
- ```
25
-
26
- Check git state. If dirty, ask whether to stash, commit, or continue:
27
-
28
- ```bash
29
- git status --porcelain
30
- git branch --show-current
31
- ```
32
-
33
- Create a branch if not already on one for this task:
34
-
35
- ```bash
36
- git checkout -b $ARGUMENTS
37
- ```
38
-
39
- Mark the task in progress:
40
-
41
- ```bash
42
- bd update $ARGUMENTS --status in_progress
43
- ```
44
-
45
- ## Load Artifacts
46
-
47
- Check what context exists:
48
-
49
- ```bash
50
- ls .beads/artifacts/$ARGUMENTS/ 2>/dev/null || echo "No artifacts"
51
- ```
52
-
53
- If `plan.md` exists, follow it step by step. If only `spec.md` exists, implement directly from requirements. If nothing exists, work from the bead description.
54
-
55
- Check for previous session work:
56
-
57
- ```typescript
58
- list_sessions({ project: "current", limit: 3 });
59
- read_session({ session_reference: "last", project: "current" });
60
- ```
61
-
62
- ## Estimate Your Budget
63
-
64
- Look at the task complexity and set limits:
65
-
66
- - **Small** (~10 tool calls): Simple change, one file, clear path
67
- - **Medium** (~30 tool calls): Multiple files, some exploration needed
68
- - **Large** (~100 tool calls): Cross-cutting, needs research, checkpoint often
69
- - **XL**: Should be decomposed into smaller tasks first
70
-
71
- If you hit 80% of budget without finishing, create a handoff. Don't push past limits and produce garbage.
72
-
73
- ## Do The Work
74
-
75
- Detect project type and know your verification commands:
76
-
77
- ```bash
78
- ls package.json Cargo.toml pyproject.toml go.mod Makefile 2>/dev/null
79
- ```
80
-
81
- Node/TypeScript: `npm test`, `npm run lint && npm run type-check`
82
- Rust: `cargo test`, `cargo clippy -- -D warnings`
83
- Python: `pytest`, `ruff check . && mypy .`
84
- Go: `go test ./...`, `golangci-lint run`
85
-
86
- **Rules while implementing:**
87
-
88
- 1. Read before edit. Always.
89
- 2. Run verification after each logical change
90
- 3. If something fails 3 times, stop and try a different approach
91
- 4. Checkpoint commit after significant progress: `git commit -m "WIP: $ARGUMENTS - [step]"`
92
- 5. If blocked on external dependency, create a new bead for it and move on
93
-
94
- Track your progress. Every 10 tool calls, check: Am I on track? Should I checkpoint? Am I approaching budget?
95
-
96
- ## Before Claiming Done
97
-
98
- Verify against success criteria in the spec:
99
-
100
- ```bash
101
- cat .beads/artifacts/$ARGUMENTS/spec.md | grep -A 20 "Success Criteria"
102
- ```
103
-
104
- Run each verification command. All must pass. No exceptions.
105
-
106
- Run the full test suite one more time:
107
-
108
- ```bash
109
- # Whatever your project uses
110
- npm test && npm run type-check
111
- ```
112
-
113
- ## Complete
114
-
115
- If all gates pass:
116
-
117
- ```bash
118
- git add -A
119
- git commit -m "$ARGUMENTS: [summary]"
120
- bd sync
121
- ```
122
-
123
- Report what was done and suggest next step:
124
-
125
- ```
126
- Done: $ARGUMENTS
127
-
128
- Changes: [files modified]
129
- Tests: Pass
130
- Next: /finish $ARGUMENTS
131
- ```
132
-
133
- If gates fail, fix them. Don't proceed with broken code.
134
-
135
- ## If You Can't Finish
136
-
137
- Hit budget limit or context getting too large? Create a handoff:
138
-
139
- ```
140
- /handoff $ARGUMENTS "Stopped at [step]. Next: [what to do]"
141
- ```
142
-
143
- Then start a fresh session. Don't grind past diminishing returns.
@@ -1,252 +0,0 @@
1
- ---
2
- description: Create and submit pull request with bead traceability
3
- argument-hint: "<bead-id> [--draft] [--wait]"
4
- agent: build
5
- ---
6
-
7
- # Pull Request
8
-
9
- **Load skills:**
10
-
11
- ```typescript
12
- skill({ name: "beads" }); // Session protocol
13
- skill({ name: "verification-before-completion" });
14
- ```
15
-
16
- ## Options
17
-
18
- - `--draft`: Create as draft PR (for WIP or early feedback)
19
- - `--wait`: Wait for CI checks to pass after creation
20
-
21
- ## Phase 1: Pre-PR Verification
22
-
23
- Before creating PR, run verification gates:
24
-
25
- ```bash
26
- git status --porcelain # Check for uncommitted changes
27
- ```
28
-
29
- If uncommitted changes exist, ask: "Commit these changes first?"
30
-
31
- Run project gates:
32
-
33
- ```bash
34
- npm run build 2>&1 | tail -5
35
- npm test 2>&1 | tail -10
36
- npm run lint 2>&1 | tail -5
37
- ```
38
-
39
- ```
40
- Pre-PR Gates:
41
- ━━━━━━━━━━━━━
42
-
43
- Build: [✓/✗]
44
- Tests: [✓/✗]
45
- Lint: [✓/✗]
46
- ```
47
-
48
- **If any gate fails: STOP.**
49
-
50
- ```
51
- Cannot create PR: [gate] failed.
52
-
53
- Fix errors first, then run /pr again.
54
- ```
55
-
56
- ## Phase 2: Check for Conflicts
57
-
58
- ```bash
59
- git fetch origin main
60
- git merge-base --is-ancestor origin/main HEAD || git diff origin/main...HEAD --name-only
61
- ```
62
-
63
- Check for merge conflicts:
64
-
65
- ```bash
66
- git merge --no-commit --no-ff origin/main 2>&1 || true
67
- git merge --abort 2>/dev/null || true
68
- ```
69
-
70
- If conflicts detected:
71
-
72
- ```
73
- ⚠️ Merge conflicts detected with main:
74
- - [file1]
75
- - [file2]
76
-
77
- Resolve conflicts before creating PR:
78
- git fetch origin main
79
- git rebase origin/main
80
- # Fix conflicts, then /pr again
81
- ```
82
-
83
- ## Phase 3: Gather Context
84
-
85
- **Current state:**
86
-
87
- ```bash
88
- git branch --show-current
89
- git diff main...HEAD --stat
90
- git log main...HEAD --oneline
91
- ```
92
-
93
- **Load bead context (if provided):**
94
-
95
- ```bash
96
- bd show $ARGUMENTS
97
- ```
98
-
99
- **Load artifacts:**
100
-
101
- ```bash
102
- ls .beads/artifacts/<bead-id>/ 2>/dev/null
103
- cat .beads/artifacts/<bead-id>/spec.md 2>/dev/null | head -30
104
- cat .beads/artifacts/<bead-id>/review.md 2>/dev/null | head -30
105
- ```
106
-
107
- Extract from artifacts:
108
-
109
- - **Goal** from spec.md
110
- - **Changes Made** from review.md
111
- - **Estimation Accuracy** from review.md
112
- - **Success Criteria** verification
113
-
114
- ## Phase 4: Push Branch
115
-
116
- ```bash
117
- git push -u origin $(git branch --show-current)
118
- ```
119
-
120
- ## Phase 5: Create PR
121
-
122
- Generate PR content from context:
123
-
124
- ```bash
125
- gh pr create --title "<title>" --body "$(cat <<'EOF'
126
- ## Summary
127
-
128
- [1-2 sentence description of what this PR does and why]
129
-
130
- ## Changes
131
-
132
- | File | Change |
133
- | ---- | ------ |
134
- | `src/foo.ts` | [description] |
135
- | `src/bar.ts` | [description] |
136
-
137
- ## Testing
138
-
139
- **Automated:**
140
- - All tests pass ✓
141
- - Lint passes ✓
142
- - Type check passes ✓
143
-
144
- **Manual verification:**
145
- - [ ] [How to test manually]
146
-
147
- ## Screenshots
148
-
149
- [If UI changes, include before/after screenshots]
150
-
151
- ## Estimation
152
-
153
- | Metric | Value |
154
- | ------ | ----- |
155
- | Estimated | [S/M/L] (~N calls) |
156
- | Actual | N calls |
157
- | Accuracy | [+/-N%] |
158
-
159
- ## Checklist
160
-
161
- - [x] Tests added/updated
162
- - [x] All gates pass
163
- - [ ] Docs updated (if applicable)
164
- - [ ] Breaking changes documented (if any)
165
-
166
- ## Artifacts
167
-
168
- - [spec.md](.beads/artifacts/<bead-id>/spec.md)
169
- - [review.md](.beads/artifacts/<bead-id>/review.md)
170
- [- research.md, plan.md, adr.md if they exist]
171
-
172
- ## Bead Reference
173
-
174
- Closes: <bead-id>
175
- EOF
176
- )"
177
- ```
178
-
179
- **For draft PRs (--draft):**
180
-
181
- ```bash
182
- gh pr create --draft --title "<title>" --body "..."
183
- ```
184
-
185
- ## Phase 6: Wait for CI (if --wait)
186
-
187
- ```bash
188
- gh pr checks --watch
189
- ```
190
-
191
- Report CI status:
192
-
193
- ```
194
- CI Status:
195
- ━━━━━━━━━━
196
-
197
- - build: [✓/✗/pending]
198
- - test: [✓/✗/pending]
199
- - lint: [✓/✗/pending]
200
-
201
- [If all pass] CI passed ✓
202
- [If any fail] CI failed: [which check]
203
- ```
204
-
205
- ## Phase 7: Update Bead & Sync
206
-
207
- ```bash
208
- bd-msg --subj "PR created" --body "PR: <pr-url>\nStatus: [ready/draft]\nCI: [passing/pending]" --to "all" --importance normal
209
- bd sync
210
- ```
211
-
212
- ## Output
213
-
214
- ```
215
- PR Created: <bead-id>
216
- ━━━━━━━━━━━━━━━━━━━━
217
-
218
- URL: <pr-url>
219
- Status: [Ready for Review / Draft]
220
- Branch: <branch> → main
221
-
222
- Pre-PR Gates: All passed ✓
223
- Conflicts: None ✓
224
- [CI: Passed ✓ (if --wait)]
225
-
226
- Artifacts linked:
227
- - spec.md ✓
228
- - review.md ✓
229
- [- research.md, plan.md, adr.md]
230
- ```
231
-
232
- **Next steps:**
233
-
234
- ```
235
- ━━━━━━━━━━━━━━━━━━━━
236
-
237
- Request review:
238
- gh pr edit <pr-number> --add-reviewer <username>
239
-
240
- Check CI:
241
- gh pr checks
242
-
243
- Merge when approved:
244
- gh pr merge --squash
245
- ```
246
-
247
- **If draft PR:**
248
-
249
- ```
250
- Draft PR created. When ready:
251
- gh pr ready
252
- ```