opencodekit 0.20.6 → 0.20.8
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 +48 -0
- package/dist/template/.opencode/agent/build.md +3 -2
- package/dist/template/.opencode/agent/explore.md +14 -14
- package/dist/template/.opencode/agent/general.md +1 -1
- package/dist/template/.opencode/agent/plan.md +1 -1
- package/dist/template/.opencode/agent/review.md +1 -1
- package/dist/template/.opencode/agent/vision.md +0 -9
- package/dist/template/.opencode/command/compound.md +102 -28
- package/dist/template/.opencode/command/curate.md +299 -0
- package/dist/template/.opencode/command/lfg.md +1 -0
- package/dist/template/.opencode/command/ship.md +1 -0
- package/dist/template/.opencode/memory.db +0 -0
- package/dist/template/.opencode/memory.db-shm +0 -0
- package/dist/template/.opencode/memory.db-wal +0 -0
- package/dist/template/.opencode/opencode.json +0 -5
- package/dist/template/.opencode/package.json +1 -1
- package/dist/template/.opencode/pnpm-lock.yaml +791 -9
- package/dist/template/.opencode/skill/api-and-interface-design/SKILL.md +162 -0
- package/dist/template/.opencode/skill/beads/SKILL.md +10 -9
- package/dist/template/.opencode/skill/beads/references/MULTI_AGENT.md +10 -10
- package/dist/template/.opencode/skill/ci-cd-and-automation/SKILL.md +202 -0
- package/dist/template/.opencode/skill/code-search-patterns/SKILL.md +253 -0
- package/dist/template/.opencode/skill/code-simplification/SKILL.md +211 -0
- package/dist/template/.opencode/skill/condition-based-waiting/SKILL.md +12 -0
- package/dist/template/.opencode/skill/defense-in-depth/SKILL.md +16 -6
- package/dist/template/.opencode/skill/deprecation-and-migration/SKILL.md +189 -0
- package/dist/template/.opencode/skill/development-lifecycle/SKILL.md +12 -48
- package/dist/template/.opencode/skill/documentation-and-adrs/SKILL.md +220 -0
- package/dist/template/.opencode/skill/incremental-implementation/SKILL.md +191 -0
- package/dist/template/.opencode/skill/performance-optimization/SKILL.md +236 -0
- package/dist/template/.opencode/skill/receiving-code-review/SKILL.md +11 -0
- package/dist/template/.opencode/skill/reflection-checkpoints/SKILL.md +183 -0
- package/dist/template/.opencode/skill/security-and-hardening/SKILL.md +296 -0
- package/dist/template/.opencode/skill/structured-edit/SKILL.md +10 -0
- package/dist/template/.opencode/skill/swarm-coordination/SKILL.md +66 -1
- package/package.json +1 -1
- package/dist/template/.opencode/skill/beads-bridge/SKILL.md +0 -321
- package/dist/template/.opencode/skill/code-navigation/SKILL.md +0 -130
- package/dist/template/.opencode/skill/mqdh/SKILL.md +0 -171
- package/dist/template/.opencode/skill/obsidian/SKILL.md +0 -192
- package/dist/template/.opencode/skill/obsidian/mcp.json +0 -22
- package/dist/template/.opencode/skill/pencil/SKILL.md +0 -72
- package/dist/template/.opencode/skill/ralph/SKILL.md +0 -296
- package/dist/template/.opencode/skill/tilth-cli/SKILL.md +0 -207
- package/dist/template/.opencode/skill/tool-priority/SKILL.md +0 -299
|
@@ -0,0 +1,299 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Organize, deduplicate, and curate knowledge in project memory
|
|
3
|
+
argument-hint: "[--scope recent|all] [--auto-merge]"
|
|
4
|
+
agent: build
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Curate: $ARGUMENTS
|
|
8
|
+
|
|
9
|
+
Organize accumulated knowledge. Surface conflicts, merge duplicates, archive stale observations.
|
|
10
|
+
|
|
11
|
+
> **Workflow:** `/ship` → `/compound` → **`/curate`** → `/pr`
|
|
12
|
+
>
|
|
13
|
+
> Run periodically (weekly or after major work) to keep memory sharp. Inspired by ByteRover's structured curation pipeline.
|
|
14
|
+
|
|
15
|
+
## Load Skills
|
|
16
|
+
|
|
17
|
+
```typescript
|
|
18
|
+
skill({ name: "memory-system" });
|
|
19
|
+
skill({ name: "verification-before-completion" });
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## Parse Arguments
|
|
23
|
+
|
|
24
|
+
| Argument | Default | Description |
|
|
25
|
+
| -------------- | -------- | ------------------------------------------------ |
|
|
26
|
+
| `--scope` | `recent` | `recent` = last 30 days, `all` = entire memory |
|
|
27
|
+
| `--auto-merge` | false | Auto-merge exact duplicates without confirmation |
|
|
28
|
+
|
|
29
|
+
## Phase 1: Inventory
|
|
30
|
+
|
|
31
|
+
Take stock of current memory state:
|
|
32
|
+
|
|
33
|
+
```typescript
|
|
34
|
+
memory_admin({ operation: "status" });
|
|
35
|
+
memory_admin({ operation: "capture-stats" });
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
Report:
|
|
39
|
+
|
|
40
|
+
```
|
|
41
|
+
## Memory Inventory
|
|
42
|
+
|
|
43
|
+
| Metric | Count |
|
|
44
|
+
|--------|-------|
|
|
45
|
+
| Total observations | [N] |
|
|
46
|
+
| Recent (30 days) | [N] |
|
|
47
|
+
| By type | pattern: N, decision: N, bugfix: N, ... |
|
|
48
|
+
| Confidence distribution | high: N, medium: N, low: N |
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
## Phase 2: Domain Detection
|
|
52
|
+
|
|
53
|
+
Analyze observations to extract semantic domains — groups of related knowledge.
|
|
54
|
+
|
|
55
|
+
```typescript
|
|
56
|
+
// Get memory status for inventory
|
|
57
|
+
memory_admin({ operation: "status" });
|
|
58
|
+
|
|
59
|
+
// Search by common concept categories to build domain map
|
|
60
|
+
const domains = [];
|
|
61
|
+
for (const concept of ["build", "test", "memory", "git", "agent", "auth", "ui", "config"]) {
|
|
62
|
+
const results = memory_search({ query: concept, limit: 20 });
|
|
63
|
+
// Group results by concept affinity
|
|
64
|
+
}
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
Categorize observations into domains based on their `concepts` and `title` fields:
|
|
68
|
+
|
|
69
|
+
| Domain | Example Concepts | Observation Count |
|
|
70
|
+
| -------------- | ---------------------------------- | ----------------- |
|
|
71
|
+
| `build_system` | build, tsdown, rsync, dist | [N] |
|
|
72
|
+
| `testing` | vitest, test, TDD, coverage | [N] |
|
|
73
|
+
| `memory` | observation, FTS5, sqlite, handoff | [N] |
|
|
74
|
+
| `git_workflow` | commit, branch, push, PR | [N] |
|
|
75
|
+
| `agent_system` | subagent, delegation, skills | [N] |
|
|
76
|
+
|
|
77
|
+
**Domain naming rules:**
|
|
78
|
+
|
|
79
|
+
- snake_case, 1-3 words
|
|
80
|
+
- Semantically meaningful (not just "misc")
|
|
81
|
+
- Maximum 10 domains (merge small groups)
|
|
82
|
+
|
|
83
|
+
## Phase 3: Conflict & Duplicate Detection
|
|
84
|
+
|
|
85
|
+
### 3a. Exact Duplicates
|
|
86
|
+
|
|
87
|
+
```typescript
|
|
88
|
+
memory_admin({ operation: "lint" });
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
Flag observations with identical or near-identical titles and narratives. Present for merge:
|
|
92
|
+
|
|
93
|
+
```
|
|
94
|
+
### Duplicates Found
|
|
95
|
+
|
|
96
|
+
| Obs A | Obs B | Similarity | Recommended Action |
|
|
97
|
+
|-------|-------|------------|-------------------|
|
|
98
|
+
| #12 "Use JWT for auth" | #45 "JWT chosen for auth" | 95% title match | MERGE → keep #45 (newer) |
|
|
99
|
+
| #8 "Build copies .opencode/" | #33 "Build copies .opencode/" | 100% title match | MERGE → keep #33 (newer) |
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
### 3b. Contradictions
|
|
103
|
+
|
|
104
|
+
Search for observations where:
|
|
105
|
+
|
|
106
|
+
- Same concepts but different decisions
|
|
107
|
+
- Same file paths but conflicting patterns
|
|
108
|
+
- Confidence downgrade without supersedes link
|
|
109
|
+
|
|
110
|
+
```
|
|
111
|
+
### Contradictions Found
|
|
112
|
+
|
|
113
|
+
| Obs A | Obs B | Conflict | Recommended Action |
|
|
114
|
+
|-------|-------|----------|-------------------|
|
|
115
|
+
| #5 "Always use X pattern" | #29 "Avoid X pattern" | Opposite recommendations | RESOLVE — ask user which is current |
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
### 3c. Stale Observations
|
|
119
|
+
|
|
120
|
+
Flag observations where:
|
|
121
|
+
|
|
122
|
+
- Referenced files no longer exist
|
|
123
|
+
- Referenced patterns no longer appear in codebase
|
|
124
|
+
- Over 90 days old with no related recent activity
|
|
125
|
+
|
|
126
|
+
```
|
|
127
|
+
### Stale Observations
|
|
128
|
+
|
|
129
|
+
| Obs | Age | Reason | Recommended Action |
|
|
130
|
+
|-----|-----|--------|-------------------|
|
|
131
|
+
| #3 "src/old-file.ts pattern" | 120 days | File deleted | ARCHIVE |
|
|
132
|
+
| #7 "Use moment.js for dates" | 95 days | Dependency removed | ARCHIVE |
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
## Phase 4: Present Curation Plan
|
|
136
|
+
|
|
137
|
+
Compile all findings into a review table:
|
|
138
|
+
|
|
139
|
+
```
|
|
140
|
+
## Curation Plan
|
|
141
|
+
|
|
142
|
+
### Actions Required
|
|
143
|
+
|
|
144
|
+
| # | Observation | Action | Reason |
|
|
145
|
+
|---|------------|--------|--------|
|
|
146
|
+
| 1 | #12 + #45 | MERGE | Duplicate — keep newer |
|
|
147
|
+
| 2 | #5 vs #29 | RESOLVE | Contradicting patterns |
|
|
148
|
+
| 3 | #3 | ARCHIVE | Referenced file deleted |
|
|
149
|
+
| 4 | #7 | ARCHIVE | Dependency removed |
|
|
150
|
+
| 5 | #18 | UPDATE | Low confidence → verify |
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
```typescript
|
|
154
|
+
question({
|
|
155
|
+
questions: [
|
|
156
|
+
{
|
|
157
|
+
header: "Curation Plan",
|
|
158
|
+
question: "Review the curation plan. Proceed with all actions?",
|
|
159
|
+
options: [
|
|
160
|
+
{ label: "Execute all (Recommended)", description: "Apply all actions above" },
|
|
161
|
+
{ label: "Let me cherry-pick", description: "I'll approve individually" },
|
|
162
|
+
{ label: "Skip curation", description: "No changes to memory" },
|
|
163
|
+
],
|
|
164
|
+
},
|
|
165
|
+
],
|
|
166
|
+
});
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
## Phase 5: Execute Curation
|
|
170
|
+
|
|
171
|
+
For each approved action:
|
|
172
|
+
|
|
173
|
+
### MERGE (duplicates)
|
|
174
|
+
|
|
175
|
+
```typescript
|
|
176
|
+
// Read both observations
|
|
177
|
+
const older = memory_get({ ids: "<older-id>" });
|
|
178
|
+
const newer = memory_get({ ids: "<newer-id>" });
|
|
179
|
+
|
|
180
|
+
// Union-merge: combine comma-separated lists, deduplicate (case-insensitive), existing items first
|
|
181
|
+
// Example: older.facts="auth, jwt" + newer.facts="jwt, session" → "auth, jwt, session"
|
|
182
|
+
|
|
183
|
+
// Create merged observation (newer as base, merge fields from older)
|
|
184
|
+
observation({
|
|
185
|
+
type: newer.type,
|
|
186
|
+
title: newer.title,
|
|
187
|
+
narrative: newer.narrative,
|
|
188
|
+
// Manually combine comma-separated fields: keep all unique items from both
|
|
189
|
+
facts: "[combined unique facts from older + newer]",
|
|
190
|
+
concepts: "[combined unique concepts from older + newer]",
|
|
191
|
+
files_modified: "[combined unique file paths from older + newer]",
|
|
192
|
+
confidence: newer.confidence, // Newer confidence wins
|
|
193
|
+
supersedes: "<older-id>",
|
|
194
|
+
subtitle: "Merged from #<older-id> + #<newer-id>",
|
|
195
|
+
});
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
**Union merge rule:** Combine comma-separated lists, deduplicate (case-insensitive), existing items first.
|
|
199
|
+
|
|
200
|
+
### RESOLVE (contradictions)
|
|
201
|
+
|
|
202
|
+
Present the conflicting observations side-by-side:
|
|
203
|
+
|
|
204
|
+
```
|
|
205
|
+
### Contradiction: #5 vs #29
|
|
206
|
+
|
|
207
|
+
**#5 (older, high confidence):**
|
|
208
|
+
> Always use X pattern for Y components
|
|
209
|
+
|
|
210
|
+
**#29 (newer, medium confidence):**
|
|
211
|
+
> Avoid X pattern — causes Z issues
|
|
212
|
+
|
|
213
|
+
Which is the current truth?
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
```typescript
|
|
217
|
+
question({
|
|
218
|
+
questions: [
|
|
219
|
+
{
|
|
220
|
+
header: "Resolve Conflict",
|
|
221
|
+
question: "Which observation reflects the current codebase reality?",
|
|
222
|
+
options: [
|
|
223
|
+
{ label: "#5 (older) is correct", description: "Archive #29, keep #5" },
|
|
224
|
+
{ label: "#29 (newer) is correct", description: "Supersede #5 with #29" },
|
|
225
|
+
{ label: "Both partially correct", description: "I'll write a reconciled version" },
|
|
226
|
+
],
|
|
227
|
+
},
|
|
228
|
+
],
|
|
229
|
+
});
|
|
230
|
+
```
|
|
231
|
+
|
|
232
|
+
### ARCHIVE (stale)
|
|
233
|
+
|
|
234
|
+
```typescript
|
|
235
|
+
// Verify staleness by checking codebase
|
|
236
|
+
// If file doesn't exist or pattern not found:
|
|
237
|
+
observation({
|
|
238
|
+
type: "warning",
|
|
239
|
+
title: "Archived: [original title]",
|
|
240
|
+
narrative: "Archived during curation — [reason]. Original observation #<id>.",
|
|
241
|
+
supersedes: "<stale-id>",
|
|
242
|
+
confidence: "low",
|
|
243
|
+
});
|
|
244
|
+
```
|
|
245
|
+
|
|
246
|
+
### UPDATE (low confidence → verify)
|
|
247
|
+
|
|
248
|
+
```typescript
|
|
249
|
+
// Search codebase for evidence
|
|
250
|
+
// If evidence found → upgrade confidence
|
|
251
|
+
// If evidence not found → archive
|
|
252
|
+
```
|
|
253
|
+
|
|
254
|
+
## Phase 6: Compile Knowledge Index
|
|
255
|
+
|
|
256
|
+
After curation, regenerate the knowledge index:
|
|
257
|
+
|
|
258
|
+
```typescript
|
|
259
|
+
memory_admin({ operation: "compile" });
|
|
260
|
+
memory_admin({ operation: "index" });
|
|
261
|
+
```
|
|
262
|
+
|
|
263
|
+
## Phase 7: Report
|
|
264
|
+
|
|
265
|
+
```
|
|
266
|
+
## Curation Summary
|
|
267
|
+
|
|
268
|
+
**Scope:** [recent / all]
|
|
269
|
+
**Observations reviewed:** [N]
|
|
270
|
+
**Domains identified:** [N]
|
|
271
|
+
|
|
272
|
+
| Action | Count | Details |
|
|
273
|
+
|--------|-------|---------|
|
|
274
|
+
| Merged | [N] | [list merged pairs] |
|
|
275
|
+
| Resolved | [N] | [list resolved conflicts] |
|
|
276
|
+
| Archived | [N] | [list archived observations] |
|
|
277
|
+
| Updated | [N] | [list confidence changes] |
|
|
278
|
+
| No change | [N] | |
|
|
279
|
+
|
|
280
|
+
**Memory health:** [Healthy / Needs attention: describe]
|
|
281
|
+
**Next recommended:** /pr or continue work
|
|
282
|
+
```
|
|
283
|
+
|
|
284
|
+
## When Nothing to Curate
|
|
285
|
+
|
|
286
|
+
If all observations are clean, well-organized, and non-conflicting:
|
|
287
|
+
|
|
288
|
+
> "Memory is clean. No duplicates, contradictions, or stale observations found. [N] observations across [M] domains."
|
|
289
|
+
|
|
290
|
+
Don't force curation. Quality memory means less curation needed.
|
|
291
|
+
|
|
292
|
+
## Related Commands
|
|
293
|
+
|
|
294
|
+
| Need | Command |
|
|
295
|
+
| ----------------------- | ------------------------------ |
|
|
296
|
+
| Extract learnings first | `/compound` |
|
|
297
|
+
| Full chain | `/lfg` |
|
|
298
|
+
| Check memory health | `/health` |
|
|
299
|
+
| Search memory | Use `memory-search()` directly |
|
|
@@ -61,6 +61,7 @@ Execute the plan:
|
|
|
61
61
|
|
|
62
62
|
```typescript
|
|
63
63
|
skill({ name: "executing-plans" });
|
|
64
|
+
skill({ name: "reflection-checkpoints" }); // Phase transition + mid-point checks
|
|
64
65
|
// Load plan.md, execute wave-by-wave
|
|
65
66
|
// Per-task commits after each task passes verification
|
|
66
67
|
```
|
|
@@ -19,6 +19,7 @@ skill({ name: "beads" });
|
|
|
19
19
|
skill({ name: "memory-grounding" });
|
|
20
20
|
skill({ name: "workspace-setup" });
|
|
21
21
|
skill({ name: "verification-before-completion" });
|
|
22
|
+
skill({ name: "reflection-checkpoints" }); // Mid-point + completion checks during execution
|
|
22
23
|
```
|
|
23
24
|
|
|
24
25
|
## Determine Input Type
|
|
Binary file
|
|
Binary file
|
|
Binary file
|