opencodekit 0.12.2 → 0.12.4

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 (33) hide show
  1. package/dist/index.js +1 -1
  2. package/dist/template/.opencode/AGENTS.md +40 -417
  3. package/dist/template/.opencode/agent/build.md +119 -9
  4. package/dist/template/.opencode/agent/planner.md +0 -1
  5. package/dist/template/.opencode/agent/rush.md +81 -19
  6. package/dist/template/.opencode/command/accessibility-check.md +1 -1
  7. package/dist/template/.opencode/command/commit.md +1 -1
  8. package/dist/template/.opencode/command/create.md +68 -441
  9. package/dist/template/.opencode/command/finish.md +82 -252
  10. package/dist/template/.opencode/command/fix-ci.md +52 -247
  11. package/dist/template/.opencode/command/fix-types.md +32 -292
  12. package/dist/template/.opencode/command/fix-ui.md +49 -234
  13. package/dist/template/.opencode/command/fix.md +57 -194
  14. package/dist/template/.opencode/command/handoff.md +66 -243
  15. package/dist/template/.opencode/command/implement.md +67 -231
  16. package/dist/template/.opencode/command/issue.md +42 -190
  17. package/dist/template/.opencode/command/plan.md +86 -442
  18. package/dist/template/.opencode/command/pr.md +3 -1
  19. package/dist/template/.opencode/command/research-and-implement.md +69 -370
  20. package/dist/template/.opencode/command/research.md +72 -197
  21. package/dist/template/.opencode/command/resume.md +70 -438
  22. package/dist/template/.opencode/command/status.md +11 -11
  23. package/dist/template/.opencode/command/triage.md +23 -18
  24. package/dist/template/.opencode/memory/project/commands.md +139 -7
  25. package/dist/template/.opencode/memory/project/gotchas.md +85 -0
  26. package/dist/template/.opencode/opencode.json +556 -510
  27. package/dist/template/.opencode/plugin/beads.ts +181 -16
  28. package/dist/template/.opencode/skill/beads/SKILL.md +15 -0
  29. package/dist/template/.opencode/skill/context-engineering/SKILL.md +94 -0
  30. package/dist/template/.opencode/skill/memory-system/SKILL.md +107 -0
  31. package/dist/template/.opencode/skill/session-management/SKILL.md +111 -0
  32. package/dist/template/.opencode/skill/tool-priority/SKILL.md +115 -0
  33. package/package.json +1 -1
@@ -1,321 +1,144 @@
1
1
  ---
2
- description: Create handoff for next session - save state with repo provenance
2
+ description: Create handoff for next session - save progress and context
3
3
  argument-hint: "<bead-id> [instructions]"
4
4
  agent: build
5
5
  ---
6
6
 
7
- # Handoff
7
+ # Handoff: $ARGUMENTS
8
8
 
9
- **Load skills:**
9
+ You're pausing work on a task. Save state so the next session can pick up cleanly.
10
10
 
11
- ```typescript
12
- skill({ name: "beads" }); // Session protocol
13
- skill({ name: "verification-before-completion" });
14
- ```
15
-
16
- ## Phase 1: Check Messages
11
+ ## Why Handoff?
17
12
 
18
- Check for any messages that might affect handoff:
13
+ - Context window getting full
14
+ - Hit budget limit
15
+ - Blocked on something external
16
+ - End of work session
17
+ - Switching to different task
19
18
 
20
- ```typescript
21
- bd_inbox({ n: 5, unread: true, global: true });
22
- ```
19
+ Don't grind past diminishing returns. A clean handoff beats degraded output.
23
20
 
24
- ## Phase 2: Release Locks
21
+ ## Gather State
25
22
 
26
- Release any file reservations you hold:
23
+ Get current task status:
27
24
 
28
- ```typescript
29
- bd_release({ _: true });
25
+ ```bash
26
+ bd show $ARGUMENTS
30
27
  ```
31
28
 
32
- ## Phase 3: Gather State
33
-
34
- ```typescript
35
- bd_show({ id: "$ARGUMENTS" });
36
- ```
29
+ Get git state:
37
30
 
38
31
  ```bash
39
- # Git state
40
- git remote get-url origin 2>/dev/null
32
+ git remote get-url origin 2>/dev/null || echo "No remote"
41
33
  git branch --show-current
42
- git rev-parse HEAD
34
+ git rev-parse --short HEAD
43
35
  git status --porcelain
44
-
45
- # Uncommitted changes
46
- git diff --stat
47
36
  ```
48
37
 
49
- ## Phase 4: Verify Artifacts
50
-
51
- Check what artifacts exist and are valid:
38
+ Check what artifacts exist:
52
39
 
53
40
  ```bash
54
- ls -la .beads/artifacts/<bead-id>/ 2>/dev/null
55
- ```
56
-
57
- For each artifact, verify it's not empty:
58
-
59
- ```bash
60
- wc -l .beads/artifacts/<bead-id>/spec.md 2>/dev/null
61
- wc -l .beads/artifacts/<bead-id>/research.md 2>/dev/null
62
- wc -l .beads/artifacts/<bead-id>/plan.md 2>/dev/null
63
- ```
64
-
65
- ```
66
- Artifact Check:
67
- ━━━━━━━━━━━━━━
68
-
69
- - spec.md: [exists/missing] ([N] lines)
70
- - research.md: [exists/missing] ([N] lines)
71
- - plan.md: [exists/missing] ([N] lines)
72
- - review.md: [exists/missing] ([N] lines)
41
+ ls .beads/artifacts/$ARGUMENTS/ 2>/dev/null || echo "No artifacts yet"
73
42
  ```
74
43
 
75
- ## Phase 5: Commit WIP (if needed)
44
+ ## Commit Work In Progress
76
45
 
77
- If uncommitted changes exist:
46
+ If you have uncommitted changes, commit them:
78
47
 
79
48
  ```bash
80
49
  git add -A
81
- git commit -m "WIP: <bead-id> - [current step]"
50
+ git commit -m "WIP: $ARGUMENTS - [where you stopped]"
82
51
  ```
83
52
 
84
- ## Phase 6: Calculate Session Stats
85
-
86
- Track estimation accuracy:
53
+ Don't leave uncommitted work. The next session needs a clean starting point.
87
54
 
88
- ```
89
- Session Stats:
90
- ━━━━━━━━━━━━━━
55
+ ## Create The Handoff
91
56
 
92
- Estimate: [S/M/L] (~[N] tool calls)
93
- Actual: [N] tool calls
94
- Variance: [+/-N%]
95
-
96
- Progress: [N]% complete
97
- Time in session: [estimated duration]
57
+ ```bash
58
+ mkdir -p .beads/artifacts/$ARGUMENTS/handoffs
98
59
  ```
99
60
 
100
- ## Phase 7: Create Handoff
101
-
102
- Write `.beads/artifacts/<bead-id>/handoffs/<timestamp>.md`:
61
+ Write `.beads/artifacts/$ARGUMENTS/handoffs/$(date +%Y%m%d-%H%M).md`:
103
62
 
104
63
  ```markdown
105
- # Handoff: <bead-id>
106
-
107
- **Created:** <ISO timestamp>
108
- **Agent:** build
109
-
110
- ## Provenance
111
-
112
- | Field | Value |
113
- | ------ | ---------------- |
114
- | Repo | [git remote URL] |
115
- | Branch | [branch name] |
116
- | Commit | [commit hash] |
117
- | Clean | [yes/no] |
118
-
119
- ## Session Stats
120
-
121
- | Metric | Value |
122
- | -------- | ------------- |
123
- | Estimate | [S/M/L] |
124
- | Budget | ~[N] calls |
125
- | Actual | [N] calls |
126
- | Variance | [+/-N%] |
127
- | Progress | [N]% complete |
128
-
129
- ## Session Context
130
-
131
- **Current Session:** [session ID]
132
-
133
- Next session can load context with:
134
- ```
135
-
136
- read_session("last", project="current")
137
-
138
- ```
139
-
140
- ## Bead State
64
+ # Handoff: $ARGUMENTS
141
65
 
142
- | Field | Value |
143
- | -------- | ---------- |
144
- | ID | <bead-id> |
145
- | Title | [title] |
146
- | Status | [status] |
147
- | Priority | [priority] |
66
+ **Created:** [timestamp]
67
+ **Branch:** [branch]
68
+ **Commit:** [hash]
148
69
 
149
70
  ## Progress
150
71
 
151
- ### Completed
72
+ What's done:
152
73
 
153
- - [x] [Step/task completed]
154
- - [x] [Step/task completed]
74
+ - [completed step]
75
+ - [completed step]
155
76
 
156
- ### In Progress
77
+ What's in progress:
157
78
 
158
- - [ ] [Current step] - [where stopped, what's next]
79
+ - [current step] - stopped here because [reason]
159
80
 
160
- ### Remaining
81
+ What's remaining:
161
82
 
162
- - [ ] [Step not started]
163
- - [ ] [Step not started]
83
+ - [next step]
84
+ - [future step]
164
85
 
165
86
  ## Context
166
87
 
167
- ### Key Files
88
+ Key files touched:
168
89
 
169
- | File | Relevance |
170
- | ----------------- | ---------------- |
171
- | `src/foo.ts:42` | [why relevant] |
172
- | `src/bar.ts` | [why relevant] |
90
+ - `src/foo.ts` - [what was changed]
91
+ - `src/bar.ts` - [what was changed]
173
92
 
174
- ### Decisions Made
93
+ Decisions made:
175
94
 
176
- - [Decision 1] - [reason]
177
- - [Decision 2] - [reason]
95
+ - [decision]: [why]
178
96
 
179
- ### Blockers/Issues
97
+ ## Blockers
180
98
 
181
- - [Issue 1] - [status: resolved/pending/blocked]
182
-
183
- ## Lessons Learned
184
-
185
- ### What Went Well
186
-
187
- - [Thing that worked smoothly]
188
-
189
- ### What Was Harder Than Expected
190
-
191
- - [Challenge encountered]
192
- - [Why it was harder]
193
-
194
- ### Patterns Discovered
195
-
196
- - [Pattern worth remembering]
99
+ [If any blockers, list them. Otherwise "None"]
197
100
 
198
101
  ## Resume Instructions
199
102
 
200
- [Specific instructions for next session]
201
-
202
103
  1. [First thing to do]
203
104
  2. [Second thing to do]
204
105
  3. [Third thing to do]
205
106
 
206
- **Recommended:** Start next session with `/resume <bead-id>`
207
-
208
- ## Artifacts
209
-
210
- | Artifact | Status | Lines |
211
- | ------------ | ------- | ----- |
212
- | spec.md | [✓/✗] | [N] |
213
- | research.md | [✓/✗] | [N] |
214
- | plan.md | [✓/✗] | [N] |
215
- | review.md | [✓/✗] | [N] |
107
+ Start next session with: `/resume $ARGUMENTS`
216
108
  ```
217
109
 
218
- ## Phase 8: Create Observation (if notable learnings)
219
-
220
- If session revealed patterns or gotchas:
110
+ ## Sync State
221
111
 
222
112
  ```typescript
223
- observation({
224
- type: "learning",
225
- title: "Session learning: [topic]",
226
- content: `
227
- ## What Happened
228
- [Brief description]
229
-
230
- ## Lesson
231
- [What we learned]
232
-
233
- ## Application
234
- [When to apply this learning]
235
- `,
236
- concepts: "[keywords]",
237
- bead_id: "<bead-id>",
238
- });
113
+ bd_sync();
239
114
  ```
240
115
 
241
- ## Phase 9: Update Memory (if gotchas found)
116
+ This commits the handoff and pushes to remote.
242
117
 
243
- If you discovered issues worth remembering:
118
+ ## Output
244
119
 
245
- ```typescript
246
- memory -
247
- update({
248
- file: "project/gotchas",
249
- content: `
250
- ## [Gotcha Title]
251
-
252
- **Symptom:** [What you see]
253
- **Cause:** [Root cause]
254
- **Fix:** [How to resolve]
255
- `,
256
- mode: "append",
257
- });
258
120
  ```
121
+ Handoff: $ARGUMENTS
259
122
 
260
- ## Phase 10: Notify Blockers (if any)
261
-
262
- If there are blockers for next session:
123
+ Branch: [branch]
124
+ Commit: [hash]
125
+ Progress: [X]% complete
126
+ Saved: .beads/artifacts/$ARGUMENTS/handoffs/[timestamp].md
263
127
 
264
- ```typescript
265
- bd_msg({
266
- subj: "Handoff: <bead-id> - Blocked",
267
- body: `
268
- Blockers:
269
- - [Blocker 1]
270
- - [Blocker 2]
271
-
272
- Needs: [what's required to unblock]
273
- `,
274
- to: "all",
275
- importance: "high",
276
- global: true,
277
- });
128
+ Next session: /resume $ARGUMENTS
278
129
  ```
279
130
 
280
- ## Phase 11: Update Bead & Sync
131
+ ## Record Learnings (If Any)
132
+
133
+ If you discovered something worth remembering:
281
134
 
282
135
  ```typescript
283
- bd_msg({
284
- subj: "Handoff created",
285
- body: "Progress: [N]%\nNext: [what needs to happen]",
286
- to: "all",
287
- importance: "normal",
288
- global: false,
136
+ observation({
137
+ type: "learning",
138
+ title: "[what you learned]",
139
+ content: "[details]",
140
+ bead_id: "$ARGUMENTS",
289
141
  });
290
-
291
- bd_sync({ reason: "Handoff created for $ARGUMENTS" });
292
- ```
293
-
294
- ## Output
295
-
296
142
  ```
297
- Handoff Created: <bead-id>
298
- ━━━━━━━━━━━━━━━━━━━━━━━━━━
299
-
300
- Commit: [hash]
301
- Branch: [branch]
302
- Progress: [N]% complete
303
-
304
- Session Stats:
305
- - Estimate: [S/M/L] (~[N] calls)
306
- - Actual: [N] calls
307
- - Variance: [+/-N%]
308
143
 
309
- Artifacts verified: [N]/[N]
310
- Saved: .beads/artifacts/<bead-id>/handoffs/<timestamp>.md
311
-
312
- ━━━━━━━━━━━━━━━━━━━━━━━━━━
313
- To continue: /resume <bead-id>
314
- ━━━━━━━━━━━━━━━━━━━━━━━━━━
315
-
316
- The handoff is saved. Start a fresh session for best performance.
317
-
318
- Next session will auto-load:
319
- - This handoff document
320
- - Previous session context via read_session("last")
321
- ```
144
+ Start fresh session for best performance. Context accumulation degrades output quality.