opencodekit 0.12.2 → 0.12.3
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.
- package/dist/index.js +1 -1
- package/dist/template/.opencode/AGENTS.md +40 -417
- package/dist/template/.opencode/agent/build.md +53 -0
- package/dist/template/.opencode/agent/planner.md +0 -1
- package/dist/template/.opencode/agent/rush.md +38 -0
- package/dist/template/.opencode/command/accessibility-check.md +1 -1
- package/dist/template/.opencode/command/commit.md +1 -1
- package/dist/template/.opencode/command/create.md +68 -441
- package/dist/template/.opencode/command/finish.md +82 -252
- package/dist/template/.opencode/command/fix-ci.md +52 -247
- package/dist/template/.opencode/command/fix-types.md +32 -292
- package/dist/template/.opencode/command/fix-ui.md +49 -234
- package/dist/template/.opencode/command/fix.md +57 -194
- package/dist/template/.opencode/command/handoff.md +66 -243
- package/dist/template/.opencode/command/implement.md +67 -231
- package/dist/template/.opencode/command/issue.md +42 -190
- package/dist/template/.opencode/command/plan.md +86 -442
- package/dist/template/.opencode/command/pr.md +3 -1
- package/dist/template/.opencode/command/research-and-implement.md +69 -370
- package/dist/template/.opencode/command/research.md +72 -197
- package/dist/template/.opencode/command/resume.md +70 -438
- package/dist/template/.opencode/command/status.md +11 -11
- package/dist/template/.opencode/command/triage.md +23 -18
- package/dist/template/.opencode/memory/project/commands.md +139 -7
- package/dist/template/.opencode/memory/project/gotchas.md +85 -0
- package/dist/template/.opencode/plugin/beads.ts +181 -16
- package/dist/template/.opencode/skill/beads/SKILL.md +15 -0
- package/dist/template/.opencode/skill/context-engineering/SKILL.md +94 -0
- package/dist/template/.opencode/skill/memory-system/SKILL.md +107 -0
- package/dist/template/.opencode/skill/session-management/SKILL.md +111 -0
- package/dist/template/.opencode/skill/tool-priority/SKILL.md +115 -0
- package/package.json +1 -1
|
@@ -1,321 +1,144 @@
|
|
|
1
1
|
---
|
|
2
|
-
description: Create handoff for next session - save
|
|
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
|
-
|
|
9
|
+
You're pausing work on a task. Save state so the next session can pick up cleanly.
|
|
10
10
|
|
|
11
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
##
|
|
21
|
+
## Gather State
|
|
25
22
|
|
|
26
|
-
|
|
23
|
+
Get current task status:
|
|
27
24
|
|
|
28
|
-
```
|
|
29
|
-
|
|
25
|
+
```bash
|
|
26
|
+
bd show $ARGUMENTS
|
|
30
27
|
```
|
|
31
28
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
```typescript
|
|
35
|
-
bd_show({ id: "$ARGUMENTS" });
|
|
36
|
-
```
|
|
29
|
+
Get git state:
|
|
37
30
|
|
|
38
31
|
```bash
|
|
39
|
-
|
|
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
|
-
|
|
50
|
-
|
|
51
|
-
Check what artifacts exist and are valid:
|
|
38
|
+
Check what artifacts exist:
|
|
52
39
|
|
|
53
40
|
```bash
|
|
54
|
-
ls
|
|
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
|
-
##
|
|
44
|
+
## Commit Work In Progress
|
|
76
45
|
|
|
77
|
-
If uncommitted changes
|
|
46
|
+
If you have uncommitted changes, commit them:
|
|
78
47
|
|
|
79
48
|
```bash
|
|
80
49
|
git add -A
|
|
81
|
-
git commit -m "WIP:
|
|
50
|
+
git commit -m "WIP: $ARGUMENTS - [where you stopped]"
|
|
82
51
|
```
|
|
83
52
|
|
|
84
|
-
|
|
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
|
-
|
|
93
|
-
|
|
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
|
-
|
|
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:
|
|
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
|
-
|
|
143
|
-
|
|
144
|
-
|
|
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
|
-
|
|
72
|
+
What's done:
|
|
152
73
|
|
|
153
|
-
- [
|
|
154
|
-
- [
|
|
74
|
+
- [completed step]
|
|
75
|
+
- [completed step]
|
|
155
76
|
|
|
156
|
-
|
|
77
|
+
What's in progress:
|
|
157
78
|
|
|
158
|
-
- [
|
|
79
|
+
- [current step] - stopped here because [reason]
|
|
159
80
|
|
|
160
|
-
|
|
81
|
+
What's remaining:
|
|
161
82
|
|
|
162
|
-
- [ ]
|
|
163
|
-
- [ ]
|
|
83
|
+
- [next step]
|
|
84
|
+
- [future step]
|
|
164
85
|
|
|
165
86
|
## Context
|
|
166
87
|
|
|
167
|
-
|
|
88
|
+
Key files touched:
|
|
168
89
|
|
|
169
|
-
|
|
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
|
-
|
|
93
|
+
Decisions made:
|
|
175
94
|
|
|
176
|
-
- [
|
|
177
|
-
- [Decision 2] - [reason]
|
|
95
|
+
- [decision]: [why]
|
|
178
96
|
|
|
179
|
-
|
|
97
|
+
## Blockers
|
|
180
98
|
|
|
181
|
-
|
|
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
|
-
|
|
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
|
-
##
|
|
219
|
-
|
|
220
|
-
If session revealed patterns or gotchas:
|
|
110
|
+
## Sync State
|
|
221
111
|
|
|
222
112
|
```typescript
|
|
223
|
-
|
|
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
|
-
|
|
116
|
+
This commits the handoff and pushes to remote.
|
|
242
117
|
|
|
243
|
-
|
|
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
|
-
|
|
261
|
-
|
|
262
|
-
|
|
123
|
+
Branch: [branch]
|
|
124
|
+
Commit: [hash]
|
|
125
|
+
Progress: [X]% complete
|
|
126
|
+
Saved: .beads/artifacts/$ARGUMENTS/handoffs/[timestamp].md
|
|
263
127
|
|
|
264
|
-
|
|
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
|
-
##
|
|
131
|
+
## Record Learnings (If Any)
|
|
132
|
+
|
|
133
|
+
If you discovered something worth remembering:
|
|
281
134
|
|
|
282
135
|
```typescript
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
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
|
-
|
|
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.
|