opencodekit 0.13.2 → 0.14.1
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 +50 -3
- package/dist/template/.opencode/AGENTS.md +51 -7
- package/dist/template/.opencode/README.md +98 -2
- package/dist/template/.opencode/agent/build.md +44 -1
- package/dist/template/.opencode/agent/explore.md +1 -0
- package/dist/template/.opencode/agent/planner.md +40 -1
- package/dist/template/.opencode/agent/review.md +1 -0
- package/dist/template/.opencode/agent/rush.md +35 -0
- package/dist/template/.opencode/agent/scout.md +1 -0
- package/dist/template/.opencode/command/brainstorm.md +83 -5
- package/dist/template/.opencode/command/finish.md +39 -12
- package/dist/template/.opencode/command/fix.md +24 -15
- package/dist/template/.opencode/command/handoff.md +17 -0
- package/dist/template/.opencode/command/implement.md +81 -18
- package/dist/template/.opencode/command/import-plan.md +30 -8
- package/dist/template/.opencode/command/new-feature.md +37 -4
- package/dist/template/.opencode/command/plan.md +51 -1
- package/dist/template/.opencode/command/pr.md +25 -15
- package/dist/template/.opencode/command/research.md +61 -5
- package/dist/template/.opencode/command/resume.md +31 -0
- package/dist/template/.opencode/command/revert-feature.md +15 -3
- package/dist/template/.opencode/command/skill-optimize.md +71 -7
- package/dist/template/.opencode/command/start.md +81 -5
- package/dist/template/.opencode/command/triage.md +16 -1
- package/dist/template/.opencode/dcp.jsonc +11 -7
- package/dist/template/.opencode/memory/observations/.gitkeep +0 -0
- package/dist/template/.opencode/memory/observations/2026-01-09-pattern-ampcode-mcp-json-includetools-pattern.md +42 -0
- package/dist/template/.opencode/memory/project/conventions.md +31 -0
- package/dist/template/.opencode/memory/project/gotchas.md +52 -5
- package/dist/template/.opencode/memory/vector_db/memories.lance/_transactions/0-0d25ba80-ba3b-4209-9046-b45d6093b4da.txn +0 -0
- package/dist/template/.opencode/memory/vector_db/memories.lance/_versions/1.manifest +0 -0
- package/dist/template/.opencode/memory/vector_db/memories.lance/data/1111100101010101011010004a9ef34df6b29f36a9a53a2892.lance +0 -0
- package/dist/template/.opencode/opencode.json +5 -3
- package/dist/template/.opencode/package.json +3 -1
- package/dist/template/.opencode/plugin/memory.ts +686 -0
- package/dist/template/.opencode/plugin/package.json +1 -1
- package/dist/template/.opencode/plugin/skill-mcp.ts +155 -36
- package/dist/template/.opencode/skill/chrome-devtools/SKILL.md +43 -65
- package/dist/template/.opencode/skill/chrome-devtools/mcp.json +19 -0
- package/dist/template/.opencode/skill/executing-plans/SKILL.md +32 -2
- package/dist/template/.opencode/skill/finishing-a-development-branch/SKILL.md +42 -17
- package/dist/template/.opencode/skill/playwright/SKILL.md +58 -133
- package/dist/template/.opencode/skill/playwright/mcp.json +16 -0
- package/dist/template/.opencode/tool/memory-embed.ts +183 -0
- package/dist/template/.opencode/tool/memory-index.ts +769 -0
- package/dist/template/.opencode/tool/memory-search.ts +358 -66
- package/dist/template/.opencode/tool/observation.ts +301 -12
- package/dist/template/.opencode/tool/repo-map.ts +451 -0
- package/package.json +1 -1
|
@@ -150,7 +150,37 @@ Rules:
|
|
|
150
150
|
|
|
151
151
|
### Clarification Techniques
|
|
152
152
|
|
|
153
|
-
|
|
153
|
+
````
|
|
154
|
+
BEFORE (vague):
|
|
155
|
+
──────────────
|
|
156
|
+
"Check that the configuration is correct."
|
|
157
|
+
|
|
158
|
+
AFTER (specific):
|
|
159
|
+
────────────────
|
|
160
|
+
"Verify config:
|
|
161
|
+
1. Run: `npm run config:check`
|
|
162
|
+
2. Confirm output shows: 'Configuration valid'
|
|
163
|
+
3. If errors, check [specific file] for [specific issue]"
|
|
164
|
+
|
|
165
|
+
Rules:
|
|
166
|
+
- Replace "check" with specific verification command
|
|
167
|
+
- Include expected output
|
|
168
|
+
- Add troubleshooting for failures
|
|
169
|
+
|
|
170
|
+
Use question tool to confirm:
|
|
171
|
+
```typescript
|
|
172
|
+
question({
|
|
173
|
+
questions: [{
|
|
174
|
+
header: "Verify",
|
|
175
|
+
question: "Configuration verified. Ready to continue?",
|
|
176
|
+
options: [
|
|
177
|
+
{ label: "Yes, continue", description: "Proceed with optimization" },
|
|
178
|
+
{ label: "No, fix issues", description: "Address validation errors first" }
|
|
179
|
+
]
|
|
180
|
+
}]
|
|
181
|
+
});
|
|
182
|
+
````
|
|
183
|
+
|
|
154
184
|
BEFORE (vague):
|
|
155
185
|
───────────────
|
|
156
186
|
"Check that the configuration is correct."
|
|
@@ -158,19 +188,23 @@ BEFORE (vague):
|
|
|
158
188
|
AFTER (specific):
|
|
159
189
|
─────────────────
|
|
160
190
|
"Verify config:
|
|
191
|
+
|
|
161
192
|
1. Run: `npm run config:check`
|
|
162
193
|
2. Confirm output shows: 'Configuration valid'
|
|
163
194
|
3. If errors, check [specific file] for [specific issue]"
|
|
164
195
|
|
|
165
196
|
Rules:
|
|
197
|
+
|
|
166
198
|
- Replace "check" with specific verification command
|
|
167
199
|
- Include expected output
|
|
168
200
|
- Add troubleshooting for failures
|
|
201
|
+
|
|
169
202
|
```
|
|
170
203
|
|
|
171
204
|
### Hardening Techniques
|
|
172
205
|
|
|
173
206
|
```
|
|
207
|
+
|
|
174
208
|
BEFORE (soft):
|
|
175
209
|
──────────────
|
|
176
210
|
"You should generally avoid committing directly to main."
|
|
@@ -180,20 +214,24 @@ AFTER (hardened):
|
|
|
180
214
|
"NEVER commit directly to main. ALWAYS use feature branches.
|
|
181
215
|
|
|
182
216
|
If tempted to commit to main because 'it's just a small fix':
|
|
217
|
+
|
|
183
218
|
- STOP
|
|
184
219
|
- Create branch anyway: git checkout -b fix/small-fix
|
|
185
220
|
- This is NOT optional"
|
|
186
221
|
|
|
187
222
|
Rules:
|
|
223
|
+
|
|
188
224
|
- Add MUST/NEVER to critical rules
|
|
189
225
|
- Anticipate rationalizations
|
|
190
226
|
- Explicitly reject common excuses
|
|
191
227
|
- Name the anti-pattern
|
|
228
|
+
|
|
192
229
|
```
|
|
193
230
|
|
|
194
231
|
### Expansion Techniques
|
|
195
232
|
|
|
196
233
|
```
|
|
234
|
+
|
|
197
235
|
BEFORE (incomplete):
|
|
198
236
|
────────────────────
|
|
199
237
|
"Handle errors appropriately."
|
|
@@ -203,23 +241,28 @@ AFTER (comprehensive):
|
|
|
203
241
|
"Error Handling:
|
|
204
242
|
|
|
205
243
|
Network Errors:
|
|
244
|
+
|
|
206
245
|
- Retry 2x with exponential backoff
|
|
207
246
|
- If still failing, log and surface to user
|
|
208
247
|
|
|
209
248
|
Validation Errors:
|
|
249
|
+
|
|
210
250
|
- Display specific field errors
|
|
211
251
|
- Do NOT proceed with invalid data
|
|
212
252
|
|
|
213
253
|
Permission Errors:
|
|
254
|
+
|
|
214
255
|
- Log with full context
|
|
215
256
|
- Display user-friendly message
|
|
216
257
|
- Do NOT expose internal details"
|
|
217
258
|
|
|
218
259
|
Rules:
|
|
260
|
+
|
|
219
261
|
- List specific error categories
|
|
220
262
|
- Provide handling for each
|
|
221
263
|
- Include what NOT to do
|
|
222
|
-
|
|
264
|
+
|
|
265
|
+
````
|
|
223
266
|
|
|
224
267
|
## Phase 5: Test Optimizations
|
|
225
268
|
|
|
@@ -232,9 +275,9 @@ task({
|
|
|
232
275
|
description: "Test original skill",
|
|
233
276
|
prompt: `
|
|
234
277
|
Load skill: skill({ name: "$ARGUMENTS" })
|
|
235
|
-
|
|
278
|
+
|
|
236
279
|
Scenario: [test scenario]
|
|
237
|
-
|
|
280
|
+
|
|
238
281
|
Follow the skill and report each step.
|
|
239
282
|
`,
|
|
240
283
|
});
|
|
@@ -245,13 +288,13 @@ task({
|
|
|
245
288
|
description: "Test optimized skill",
|
|
246
289
|
prompt: `
|
|
247
290
|
Load skill: skill({ name: "$ARGUMENTS" })
|
|
248
|
-
|
|
291
|
+
|
|
249
292
|
Scenario: [same test scenario]
|
|
250
|
-
|
|
293
|
+
|
|
251
294
|
Follow the skill and report each step.
|
|
252
295
|
`,
|
|
253
296
|
});
|
|
254
|
-
|
|
297
|
+
````
|
|
255
298
|
|
|
256
299
|
### Compare Results
|
|
257
300
|
|
|
@@ -367,6 +410,27 @@ write({
|
|
|
367
410
|
skill({ name: "$ARGUMENTS" });
|
|
368
411
|
```
|
|
369
412
|
|
|
413
|
+
```typescript
|
|
414
|
+
question({
|
|
415
|
+
questions: [
|
|
416
|
+
{
|
|
417
|
+
header: "Verify",
|
|
418
|
+
question: "Skill optimized and saved. Ready to deploy?",
|
|
419
|
+
options: [
|
|
420
|
+
{
|
|
421
|
+
label: "Yes, deploy (Recommended)",
|
|
422
|
+
description: "All verifications passed",
|
|
423
|
+
},
|
|
424
|
+
{
|
|
425
|
+
label: "No, fix issues",
|
|
426
|
+
description: "Need to address verification failures",
|
|
427
|
+
},
|
|
428
|
+
],
|
|
429
|
+
},
|
|
430
|
+
],
|
|
431
|
+
});
|
|
432
|
+
```
|
|
433
|
+
|
|
370
434
|
Confirm:
|
|
371
435
|
|
|
372
436
|
- [ ] Skill loads without error
|
|
@@ -75,14 +75,40 @@ bd update $ARGUMENTS --status in_progress
|
|
|
75
75
|
|
|
76
76
|
## Workspace Setup
|
|
77
77
|
|
|
78
|
-
###
|
|
78
|
+
### Create Feature Branch
|
|
79
79
|
|
|
80
|
-
|
|
80
|
+
Extract task info and parent branch for a readable branch name:
|
|
81
81
|
|
|
82
82
|
```bash
|
|
83
|
-
|
|
83
|
+
# Get current branch (parent branch)
|
|
84
|
+
PARENT_BRANCH=$(git rev-parse --abbrev-ref HEAD)
|
|
85
|
+
|
|
86
|
+
# Get task title and type from bead
|
|
87
|
+
BEAD_INFO=$(bd show $ARGUMENTS --json 2>/dev/null)
|
|
88
|
+
BEAD_TITLE=$(echo "$BEAD_INFO" | jq -r '.title // ""' | tr '[:upper:]' '[:lower:]' | sed 's/[^a-z0-9]/-/g' | sed 's/--*/-/g' | cut -c1-40)
|
|
89
|
+
BEAD_TYPE=$(echo "$BEAD_INFO" | jq -r '.type // "task"')
|
|
90
|
+
|
|
91
|
+
# Map bead type to branch prefix
|
|
92
|
+
case "$BEAD_TYPE" in
|
|
93
|
+
"bug") PREFIX="fix" ;;
|
|
94
|
+
"feature"|"epic") PREFIX="feat" ;;
|
|
95
|
+
"refactor") PREFIX="refactor" ;;
|
|
96
|
+
"chore") PREFIX="chore" ;;
|
|
97
|
+
*) PREFIX="feat" ;;
|
|
98
|
+
esac
|
|
99
|
+
|
|
100
|
+
# Create branch: <parent>/<type>/<bead-id>-<description>
|
|
101
|
+
BRANCH_NAME="${PARENT_BRANCH}/${PREFIX}/$ARGUMENTS-${BEAD_TITLE}"
|
|
102
|
+
git checkout -b "$BRANCH_NAME" 2>/dev/null || echo "Branch already exists or already on it"
|
|
84
103
|
```
|
|
85
104
|
|
|
105
|
+
**Branch naming convention:**
|
|
106
|
+
| Parent Branch | Bead Type | Example |
|
|
107
|
+
|---------------|-----------|---------|
|
|
108
|
+
| main | bug | `main/fix/bd-a1b2-login-error` |
|
|
109
|
+
| develop | feature | `develop/feat/bd-c3d4-user-auth` |
|
|
110
|
+
| release-v2 | chore | `release-v2/chore/bd-e5f6-update-deps` |
|
|
111
|
+
|
|
86
112
|
### Option B: Git Worktree (if --worktree flag)
|
|
87
113
|
|
|
88
114
|
For isolated work that won't conflict with main workspace:
|
|
@@ -101,11 +127,30 @@ skill({ name: "using-git-worktrees" });
|
|
|
101
127
|
**Worktree setup:**
|
|
102
128
|
|
|
103
129
|
```bash
|
|
130
|
+
# Get current branch (parent branch)
|
|
131
|
+
PARENT_BRANCH=$(git rev-parse --abbrev-ref HEAD)
|
|
132
|
+
|
|
133
|
+
# Get task title for readable worktree name
|
|
134
|
+
BEAD_INFO=$(bd show $ARGUMENTS --json 2>/dev/null)
|
|
135
|
+
BEAD_TITLE=$(echo "$BEAD_INFO" | jq -r '.title // ""' | tr '[:upper:]' '[:lower:]' | sed 's/[^a-z0-9]/-/g' | sed 's/--*/-/g' | cut -c1-40)
|
|
136
|
+
BEAD_TYPE=$(echo "$BEAD_INFO" | jq -r '.type // "task"')
|
|
137
|
+
|
|
138
|
+
# Map bead type to branch prefix
|
|
139
|
+
case "$BEAD_TYPE" in
|
|
140
|
+
"bug") PREFIX="fix" ;;
|
|
141
|
+
"feature"|"epic") PREFIX="feat" ;;
|
|
142
|
+
"refactor") PREFIX="refactor" ;;
|
|
143
|
+
*) PREFIX="feat" ;;
|
|
144
|
+
esac
|
|
145
|
+
|
|
146
|
+
# Create branch: <parent>/<type>/<bead-id>-<description>
|
|
147
|
+
BRANCH_NAME="${PARENT_BRANCH}/${PREFIX}/$ARGUMENTS-${BEAD_TITLE}"
|
|
148
|
+
|
|
104
149
|
# Verify .gitignore has worktree directory
|
|
105
150
|
grep -q "^\.worktrees/$" .gitignore || echo ".worktrees/" >> .gitignore
|
|
106
151
|
|
|
107
|
-
# Create worktree
|
|
108
|
-
git worktree add .worktrees/$ARGUMENTS -b $
|
|
152
|
+
# Create worktree with readable branch name
|
|
153
|
+
git worktree add ".worktrees/$ARGUMENTS" -b "$BRANCH_NAME"
|
|
109
154
|
|
|
110
155
|
# Navigate to worktree
|
|
111
156
|
cd .worktrees/$ARGUMENTS
|
|
@@ -172,6 +217,37 @@ list_sessions({ limit: 3 });
|
|
|
172
217
|
|
|
173
218
|
Load context from previous work on this bead.
|
|
174
219
|
|
|
220
|
+
## Load Related Memory (Semantic Search)
|
|
221
|
+
|
|
222
|
+
Search for relevant past work and learnings before starting:
|
|
223
|
+
|
|
224
|
+
```typescript
|
|
225
|
+
// Find similar past work (semantic similarity)
|
|
226
|
+
memory -
|
|
227
|
+
search({
|
|
228
|
+
query: "[task title/description from bead]",
|
|
229
|
+
mode: "semantic",
|
|
230
|
+
limit: 3,
|
|
231
|
+
});
|
|
232
|
+
|
|
233
|
+
// Find related observations (gotchas, patterns, learnings)
|
|
234
|
+
memory -
|
|
235
|
+
search({
|
|
236
|
+
query: "[task keywords]",
|
|
237
|
+
mode: "semantic",
|
|
238
|
+
type: "observation",
|
|
239
|
+
limit: 3,
|
|
240
|
+
});
|
|
241
|
+
```
|
|
242
|
+
|
|
243
|
+
**Review findings before diving in.** Past observations may contain:
|
|
244
|
+
|
|
245
|
+
- Gotchas to avoid
|
|
246
|
+
- Patterns that worked well
|
|
247
|
+
- Decisions already made
|
|
248
|
+
|
|
249
|
+
If memory search fails (Ollama not running), continue without it.
|
|
250
|
+
|
|
175
251
|
## Determine Next Step
|
|
176
252
|
|
|
177
253
|
Based on task type and what exists:
|
|
@@ -340,7 +340,22 @@ bd list --status=closed --json | wc -l # Check closed count
|
|
|
340
340
|
|
|
341
341
|
**Best Practice (from Steve Yegge):** Run `bd cleanup` every few days to prevent database bloat.
|
|
342
342
|
|
|
343
|
-
## Phase 10:
|
|
343
|
+
## Phase 10: Check Memory Health
|
|
344
|
+
|
|
345
|
+
```typescript
|
|
346
|
+
memory - index({ action: "status" });
|
|
347
|
+
```
|
|
348
|
+
|
|
349
|
+
If documents count is low or index is stale:
|
|
350
|
+
|
|
351
|
+
```
|
|
352
|
+
⚠️ Vector store may be stale.
|
|
353
|
+
Run: memory-index rebuild
|
|
354
|
+
```
|
|
355
|
+
|
|
356
|
+
Optionally trigger background reindex if many observations were created recently.
|
|
357
|
+
|
|
358
|
+
## Phase 11: Sync and Notify
|
|
344
359
|
|
|
345
360
|
```typescript
|
|
346
361
|
|
|
@@ -14,28 +14,32 @@
|
|
|
14
14
|
// Nudge every 8 tool calls (slightly more aggressive than default 10)
|
|
15
15
|
"nudgeFrequency": 8,
|
|
16
16
|
// Protect state-modifying and critical workflow tools
|
|
17
|
+
// Updated for v1.1.8: Added question tool, removed legacy bd_* (use CLI)
|
|
17
18
|
"protectedTools": [
|
|
18
19
|
"write",
|
|
19
20
|
"edit",
|
|
21
|
+
"question",
|
|
20
22
|
"memory-read",
|
|
21
23
|
"memory-update",
|
|
22
24
|
"memory-search",
|
|
23
25
|
"observation",
|
|
24
26
|
"skill",
|
|
25
27
|
"skill_mcp",
|
|
28
|
+
"task",
|
|
29
|
+
"batch",
|
|
30
|
+
"todowrite",
|
|
31
|
+
"todoread",
|
|
32
|
+
"lsp",
|
|
26
33
|
"lsp_lsp_rename",
|
|
27
34
|
"lsp_lsp_find_references",
|
|
28
35
|
"lsp_lsp_goto_definition",
|
|
29
36
|
"lsp_lsp_code_actions",
|
|
30
37
|
"lsp_lsp_code_action_apply",
|
|
31
38
|
"lsp_lsp_organize_imports",
|
|
32
|
-
"
|
|
33
|
-
"
|
|
34
|
-
"
|
|
35
|
-
"
|
|
36
|
-
"bd_reserve",
|
|
37
|
-
"bd_reservations",
|
|
38
|
-
"bd_sync"
|
|
39
|
+
"bd-reserve",
|
|
40
|
+
"bd-release",
|
|
41
|
+
"bd-msg",
|
|
42
|
+
"bd-inbox"
|
|
39
43
|
]
|
|
40
44
|
},
|
|
41
45
|
"discard": {
|
|
File without changes
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: pattern
|
|
3
|
+
created: 2026-01-09T08:04:40.257Z
|
|
4
|
+
confidence: high
|
|
5
|
+
valid_until: null
|
|
6
|
+
superseded_by: null
|
|
7
|
+
concepts: ["mcp", "includeTools", "ampcode", "skill", "token-optimization", "lazy-load", "filtering"]
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# 🔄 Ampcode mcp.json includeTools pattern
|
|
11
|
+
|
|
12
|
+
🟢 **Confidence:** high
|
|
13
|
+
|
|
14
|
+
Learned from Ampcode's ui-preview skill (https://github.com/ampcode/amp-contrib/tree/main/.agents/skills/ui-preview):
|
|
15
|
+
|
|
16
|
+
## Pattern: Lazy-load MCP with includeTools filtering
|
|
17
|
+
|
|
18
|
+
1. **mcp.json file** (separate from SKILL.md):
|
|
19
|
+
```json
|
|
20
|
+
{
|
|
21
|
+
"chrome-devtools": {
|
|
22
|
+
"command": "npx",
|
|
23
|
+
"args": ["-y", "chrome-devtools-mcp@latest"],
|
|
24
|
+
"includeTools": ["navigate_page", "take_screenshot", "new_page", "list_pages"]
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
2. **SKILL.md documents ONLY filtered tools**:
|
|
30
|
+
- "Available Tools" section lists only the filtered tools
|
|
31
|
+
- Workflow examples use only those tools
|
|
32
|
+
- Note at bottom explains how to expand filter if needed
|
|
33
|
+
|
|
34
|
+
3. **Token savings**: ~90% reduction (4 tools vs 26+ for chrome-devtools)
|
|
35
|
+
|
|
36
|
+
## Applied to OpenCodeKit:
|
|
37
|
+
- chrome-devtools: 11 tools (from 26+)
|
|
38
|
+
- playwright: 8 tools (from 17+)
|
|
39
|
+
- Other MCP skills already minimal (2-4 tools), no filtering needed
|
|
40
|
+
|
|
41
|
+
## Key insight:
|
|
42
|
+
SKILL.md and mcp.json must be synchronized - don't document tools that aren't in includeTools filter, or agents get confused.
|
|
@@ -85,6 +85,37 @@ Always protect these tools from auto-pruning:
|
|
|
85
85
|
]
|
|
86
86
|
```
|
|
87
87
|
|
|
88
|
+
### Prompt Injection Pattern (Nudges)
|
|
89
|
+
|
|
90
|
+
Use `chat.message` hook to inject prompts (nudges) based on user triggers:
|
|
91
|
+
|
|
92
|
+
```typescript
|
|
93
|
+
"chat.message": async (input, output) => {
|
|
94
|
+
const { message, parts } = output;
|
|
95
|
+
if (message.role !== "user") return;
|
|
96
|
+
|
|
97
|
+
// 1. Detect trigger keywords
|
|
98
|
+
const fullText = parts.map(p => p.text).join(" ");
|
|
99
|
+
if (!fullText.match(/trigger pattern/)) return;
|
|
100
|
+
|
|
101
|
+
// 2. Inject synthetic prompt
|
|
102
|
+
parts.push({
|
|
103
|
+
type: "text",
|
|
104
|
+
text: "━━━━━━━━\n[TRIGGER DETECTED]\nAction required: ...\n━━━━━━━━",
|
|
105
|
+
synthetic: true
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
This transforms passive detection into active agent behavior (e.g., Memory plugin triggers).
|
|
111
|
+
|
|
112
|
+
## Agent Behavior Rules
|
|
113
|
+
|
|
114
|
+
### Active LSP Nudge
|
|
115
|
+
|
|
116
|
+
When a tool output displays `[LSP NAVIGATION AVAILABLE]`, it means relevant code files were found.
|
|
117
|
+
**Rule**: You MUST immediately execute the suggested `lsp_lsp_*` tool calls to retrieve code context without waiting for user instruction. This ensures you always have the latest code context for your implementation.
|
|
118
|
+
|
|
88
119
|
## Patterns to Avoid
|
|
89
120
|
|
|
90
121
|
### Anti-Pattern: Mixing LSP Systems
|
|
@@ -1,12 +1,46 @@
|
|
|
1
1
|
---
|
|
2
2
|
purpose: Footguns, edge cases, and "don't forget this" warnings
|
|
3
|
-
updated: 2025-01-
|
|
3
|
+
updated: 2025-01-09
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Project Gotchas
|
|
7
7
|
|
|
8
8
|
## Configuration Quirks
|
|
9
9
|
|
|
10
|
+
### OpenCode v1.1.7 → v1.1.8 Changes
|
|
11
|
+
|
|
12
|
+
**v1.1.7 Features:**
|
|
13
|
+
|
|
14
|
+
- **Question tool**: New interactive tool for gathering user preferences/clarifying instructions
|
|
15
|
+
- **Config precedence fix**: Local `.opencode/opencode.json` now correctly overrides remote/global config
|
|
16
|
+
- **`.claude` loading toggle**: Can disable via `--no-claude-prompts` / `--no-claude-skills` flags
|
|
17
|
+
- **Task tool filtering**: Simplified subagent filtering
|
|
18
|
+
|
|
19
|
+
**v1.1.8 Features:**
|
|
20
|
+
|
|
21
|
+
- **Multi-select questions**: Question tool now supports `multiple: true` for multi-select
|
|
22
|
+
- **Performance**: Chunked message loading, lazy diff rendering
|
|
23
|
+
- **Full path fuzzy matching**: Autocomplete uses full file paths
|
|
24
|
+
- **OpenTUI v0.1.70**: UI improvements
|
|
25
|
+
|
|
26
|
+
**Plugin SDK Update Required:**
|
|
27
|
+
|
|
28
|
+
```json
|
|
29
|
+
"@opencode-ai/plugin": "^1.1.8" // Was ^1.1.2
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
### DCP Protected Tools (v1.1.8)
|
|
33
|
+
|
|
34
|
+
Legacy `bd_*` tool names don't exist - use actual custom tool names:
|
|
35
|
+
|
|
36
|
+
| Old (Wrong) | New (Correct) |
|
|
37
|
+
| ----------------- | ------------- |
|
|
38
|
+
| `bd_init` | N/A (use CLI) |
|
|
39
|
+
| `bd_claim` | N/A (use CLI) |
|
|
40
|
+
| `bd_reserve` | `bd-reserve` |
|
|
41
|
+
| `bd_reservations` | `bd-release` |
|
|
42
|
+
| `bd_sync` | N/A (use CLI) |
|
|
43
|
+
|
|
10
44
|
### DCP v1.1.3 Schema Breaking Changes
|
|
11
45
|
|
|
12
46
|
1. **Legacy `strategies.onIdle` removed**: v1.1.2+ no longer supports this field
|
|
@@ -35,10 +69,23 @@ updated: 2025-01-05
|
|
|
35
69
|
|
|
36
70
|
### Protected Tools in DCP
|
|
37
71
|
|
|
38
|
-
v1.1.
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
72
|
+
v1.1.8 recognizes more tool variants. Ensure these are protected:
|
|
73
|
+
|
|
74
|
+
```jsonc
|
|
75
|
+
"protectedTools": [
|
|
76
|
+
// State-modifying
|
|
77
|
+
"write", "edit", "question",
|
|
78
|
+
// Memory/observation
|
|
79
|
+
"memory-read", "memory-update", "memory-search", "observation",
|
|
80
|
+
// Skills/tasks
|
|
81
|
+
"skill", "skill_mcp", "task", "batch", "todowrite", "todoread",
|
|
82
|
+
// LSP
|
|
83
|
+
"lsp", "lsp_lsp_rename", "lsp_lsp_find_references", "lsp_lsp_goto_definition",
|
|
84
|
+
"lsp_lsp_code_actions", "lsp_lsp_code_action_apply", "lsp_lsp_organize_imports",
|
|
85
|
+
// Beads (custom tools only - CLI uses bash)
|
|
86
|
+
"bd-reserve", "bd-release", "bd-msg", "bd-inbox"
|
|
87
|
+
]
|
|
88
|
+
```
|
|
42
89
|
|
|
43
90
|
## Time Wasters
|
|
44
91
|
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -6,7 +6,8 @@
|
|
|
6
6
|
"model": "proxypal/gemini-claude-opus-4-5-thinking"
|
|
7
7
|
},
|
|
8
8
|
"compaction": {
|
|
9
|
-
"description": "Session summarizer for context continuity across compactions"
|
|
9
|
+
"description": "Session summarizer for context continuity across compactions",
|
|
10
|
+
"model": "opencode/big-pickle"
|
|
10
11
|
},
|
|
11
12
|
"explore": {
|
|
12
13
|
"description": "Fast codebase search specialist",
|
|
@@ -24,7 +25,7 @@
|
|
|
24
25
|
},
|
|
25
26
|
"review": {
|
|
26
27
|
"description": "Code review, debugging, and security audit specialist",
|
|
27
|
-
"model": "proxypal/gemini-
|
|
28
|
+
"model": "proxypal/gemini-3-pro-preview"
|
|
28
29
|
},
|
|
29
30
|
"rush": {
|
|
30
31
|
"description": "Fast primary agent for small, well-defined tasks",
|
|
@@ -98,7 +99,7 @@
|
|
|
98
99
|
"url": "https://mcp.grep.app"
|
|
99
100
|
}
|
|
100
101
|
},
|
|
101
|
-
"model": "
|
|
102
|
+
"model": "opencode/glm-4.7-free",
|
|
102
103
|
"permission": {
|
|
103
104
|
"bash": {
|
|
104
105
|
"*": "allow",
|
|
@@ -121,6 +122,7 @@
|
|
|
121
122
|
"doom_loop": "ask",
|
|
122
123
|
"edit": "allow",
|
|
123
124
|
"external_directory": "ask",
|
|
125
|
+
"question": "allow",
|
|
124
126
|
"read": {
|
|
125
127
|
"*": "allow",
|
|
126
128
|
"*.env": "deny",
|