opencodekit 0.12.0 → 0.12.2
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 +43 -15
- package/dist/template/.opencode/AGENTS.md +33 -23
- package/dist/template/.opencode/agent/explore.md +6 -6
- package/dist/template/.opencode/command/brainstorm.md +1 -1
- package/dist/template/.opencode/command/fix-types.md +3 -3
- package/dist/template/.opencode/command/new-feature.md +1 -1
- package/dist/template/.opencode/command/research-ui.md +1 -1
- package/dist/template/.opencode/command/research.md +7 -3
- package/dist/template/.opencode/command/resume.md +11 -2
- package/dist/template/.opencode/command/review-codebase.md +1 -1
- package/dist/template/.opencode/command/status.md +3 -0
- package/dist/template/.opencode/command/triage.md +4 -0
- package/dist/template/.opencode/dcp.jsonc +16 -33
- package/dist/template/.opencode/memory/project/commands.md +44 -5
- package/dist/template/.opencode/memory/project/conventions.md +104 -5
- package/dist/template/.opencode/memory/project/gotchas.md +43 -9
- package/dist/template/.opencode/opencode.json +48 -17
- package/dist/template/.opencode/package.json +1 -1
- package/dist/template/.opencode/plugin/sessions.ts +295 -38
- package/package.json +1 -1
- package/dist/template/.opencode/tool/lsp.ts +0 -786
package/dist/index.js
CHANGED
|
@@ -750,7 +750,7 @@ var cac = (name = "") => new CAC(name);
|
|
|
750
750
|
// package.json
|
|
751
751
|
var package_default = {
|
|
752
752
|
name: "opencodekit",
|
|
753
|
-
version: "0.12.
|
|
753
|
+
version: "0.12.2",
|
|
754
754
|
description: "CLI tool for bootstrapping and managing OpenCodeKit projects",
|
|
755
755
|
type: "module",
|
|
756
756
|
repository: {
|
|
@@ -3133,6 +3133,8 @@ async function copyOpenCodeOnly(templateRoot, targetDir) {
|
|
|
3133
3133
|
return true;
|
|
3134
3134
|
}
|
|
3135
3135
|
async function initCommand(options = {}) {
|
|
3136
|
+
if (process.argv.includes("--quiet"))
|
|
3137
|
+
return;
|
|
3136
3138
|
const targetDir = process.cwd();
|
|
3137
3139
|
const mode = detectMode(targetDir);
|
|
3138
3140
|
oe(import_picocolors7.default.bgCyan(import_picocolors7.default.black(" OpenCodeKit ")));
|
|
@@ -3203,9 +3205,9 @@ version: 1
|
|
|
3203
3205
|
}
|
|
3204
3206
|
|
|
3205
3207
|
// src/commands/menu.ts
|
|
3208
|
+
import { existsSync as existsSync6, lstatSync as lstatSync3, readdirSync as readdirSync5 } from "node:fs";
|
|
3209
|
+
import { basename as basename2, join as join6 } from "node:path";
|
|
3206
3210
|
var import_picocolors10 = __toESM(require_picocolors(), 1);
|
|
3207
|
-
import { existsSync as existsSync6, readdirSync as readdirSync5, lstatSync as lstatSync3 } from "node:fs";
|
|
3208
|
-
import { join as join6, basename as basename2 } from "node:path";
|
|
3209
3211
|
|
|
3210
3212
|
// src/commands/skill.ts
|
|
3211
3213
|
import { join as join4 } from "node:path";
|
|
@@ -3367,16 +3369,16 @@ async function viewSkill(opencodePath, skillName) {
|
|
|
3367
3369
|
}
|
|
3368
3370
|
|
|
3369
3371
|
// src/commands/upgrade.ts
|
|
3370
|
-
import { join as join5, dirname as dirname2 } from "node:path";
|
|
3371
|
-
import { fileURLToPath as fileURLToPath2 } from "node:url";
|
|
3372
3372
|
import {
|
|
3373
|
+
copyFileSync,
|
|
3373
3374
|
existsSync as existsSync5,
|
|
3375
|
+
mkdirSync as mkdirSync3,
|
|
3374
3376
|
readFileSync as readFileSync5,
|
|
3375
|
-
writeFileSync as writeFileSync4,
|
|
3376
3377
|
readdirSync as readdirSync4,
|
|
3377
|
-
|
|
3378
|
-
copyFileSync
|
|
3378
|
+
writeFileSync as writeFileSync4
|
|
3379
3379
|
} from "node:fs";
|
|
3380
|
+
import { dirname as dirname2, join as join5 } from "node:path";
|
|
3381
|
+
import { fileURLToPath as fileURLToPath2 } from "node:url";
|
|
3380
3382
|
var import_picocolors9 = __toESM(require_picocolors(), 1);
|
|
3381
3383
|
var PRESERVE_FILES = [
|
|
3382
3384
|
"opencode.json"
|
|
@@ -3495,6 +3497,8 @@ function copyDirPreserveExisting(src, dest) {
|
|
|
3495
3497
|
return { updated, preserved };
|
|
3496
3498
|
}
|
|
3497
3499
|
async function upgradeCommand(options = {}) {
|
|
3500
|
+
if (process.argv.includes("--quiet"))
|
|
3501
|
+
return;
|
|
3498
3502
|
const cwd = process.cwd();
|
|
3499
3503
|
const opencodeDir = join5(cwd, ".opencode");
|
|
3500
3504
|
if (!existsSync5(opencodeDir)) {
|
|
@@ -3610,6 +3614,8 @@ async function interactiveMenu(version) {
|
|
|
3610
3614
|
}
|
|
3611
3615
|
}
|
|
3612
3616
|
async function doctorCommand() {
|
|
3617
|
+
if (process.argv.includes("--quiet"))
|
|
3618
|
+
return;
|
|
3613
3619
|
const cwd = process.cwd();
|
|
3614
3620
|
const opencodeDir = join6(cwd, ".opencode");
|
|
3615
3621
|
const checks = [];
|
|
@@ -3662,6 +3668,8 @@ async function doctorCommand() {
|
|
|
3662
3668
|
}
|
|
3663
3669
|
}
|
|
3664
3670
|
async function statusCommand() {
|
|
3671
|
+
if (process.argv.includes("--quiet"))
|
|
3672
|
+
return;
|
|
3665
3673
|
const cwd = process.cwd();
|
|
3666
3674
|
const opencodeDir = join6(cwd, ".opencode");
|
|
3667
3675
|
if (!existsSync6(opencodeDir)) {
|
|
@@ -3715,18 +3723,38 @@ async function statusCommand() {
|
|
|
3715
3723
|
// src/utils/logger.ts
|
|
3716
3724
|
var import_picocolors11 = __toESM(require_picocolors(), 1);
|
|
3717
3725
|
var logger = {
|
|
3718
|
-
log: (message) =>
|
|
3719
|
-
|
|
3720
|
-
|
|
3721
|
-
|
|
3722
|
-
|
|
3726
|
+
log: (message) => {
|
|
3727
|
+
if (!process.argv.includes("--quiet")) {
|
|
3728
|
+
console.log(message);
|
|
3729
|
+
}
|
|
3730
|
+
},
|
|
3731
|
+
info: (message) => {
|
|
3732
|
+
if (!process.argv.includes("--quiet")) {
|
|
3733
|
+
console.log(import_picocolors11.default.blue(`[i] ${message}`));
|
|
3734
|
+
}
|
|
3735
|
+
},
|
|
3736
|
+
success: (message) => {
|
|
3737
|
+
if (!process.argv.includes("--quiet")) {
|
|
3738
|
+
console.log(import_picocolors11.default.green(`[+] ${message}`));
|
|
3739
|
+
}
|
|
3740
|
+
},
|
|
3741
|
+
warn: (message) => {
|
|
3742
|
+
if (!process.argv.includes("--quiet")) {
|
|
3743
|
+
console.warn(import_picocolors11.default.yellow(`[!] ${message}`));
|
|
3744
|
+
}
|
|
3745
|
+
},
|
|
3746
|
+
error: (message) => {
|
|
3747
|
+
if (!process.argv.includes("--quiet")) {
|
|
3748
|
+
console.error(import_picocolors11.default.red(`[x] ${message}`));
|
|
3749
|
+
}
|
|
3750
|
+
},
|
|
3723
3751
|
debug: (message) => {
|
|
3724
|
-
if (process.env.DEBUG || process.argv.includes("--verbose")) {
|
|
3752
|
+
if ((process.env.DEBUG || process.argv.includes("--verbose")) && !process.argv.includes("--quiet")) {
|
|
3725
3753
|
console.log(import_picocolors11.default.dim(`[DEBUG] ${message}`));
|
|
3726
3754
|
}
|
|
3727
3755
|
},
|
|
3728
3756
|
verbose: (message) => {
|
|
3729
|
-
if (process.argv.includes("--verbose")) {
|
|
3757
|
+
if (process.argv.includes("--verbose") && !process.argv.includes("--quiet")) {
|
|
3730
3758
|
console.log(import_picocolors11.default.dim(message));
|
|
3731
3759
|
}
|
|
3732
3760
|
}
|
|
@@ -36,7 +36,7 @@ Codebase complexity is a primary difficulty knob. Context is how you pay it down
|
|
|
36
36
|
|
|
37
37
|
**Practical implications:**
|
|
38
38
|
|
|
39
|
-
- Prefer `
|
|
39
|
+
- Prefer `lsp_lsp_document_symbols` over reading entire files
|
|
40
40
|
- Read specific line ranges, not whole documents
|
|
41
41
|
- Navigate AGENTS.md hierarchy: root → subsystem → details (progressive disclosure)
|
|
42
42
|
- Prune context aggressively; completed work doesn't need to stay loaded
|
|
@@ -217,51 +217,51 @@ Ask yourself: **"Am I looking for code structure or just text?"**
|
|
|
217
217
|
|
|
218
218
|
**Use LSP tools when you need to:**
|
|
219
219
|
|
|
220
|
-
- Understand what a symbol is → `
|
|
221
|
-
- Jump to where something is defined → `
|
|
222
|
-
- Find all usages before refactoring → `
|
|
223
|
-
- Rename across the entire codebase → `
|
|
220
|
+
- Understand what a symbol is → `lsp_lsp_hover`
|
|
221
|
+
- Jump to where something is defined → `lsp_lsp_goto_definition`
|
|
222
|
+
- Find all usages before refactoring → `lsp_lsp_find_references`
|
|
223
|
+
- Rename across the entire codebase → `lsp_lsp_rename`
|
|
224
224
|
|
|
225
225
|
**Rule**: Always `read` before `edit` to verify content.
|
|
226
226
|
|
|
227
227
|
### LSP Tools (10 tools)
|
|
228
228
|
|
|
229
|
-
Semantic code intelligence via Language Server Protocol
|
|
229
|
+
Semantic code intelligence via Language Server Protocol. **Uses `lsp_lsp_*` prefix** (built-in experimental).
|
|
230
230
|
|
|
231
231
|
**Navigation & Understanding:**
|
|
232
232
|
|
|
233
|
-
- `
|
|
234
|
-
- `
|
|
235
|
-
- `
|
|
236
|
-
- `
|
|
237
|
-
- `
|
|
233
|
+
- `lsp_lsp_hover(filePath, line, character)` - Get type info and docs at cursor
|
|
234
|
+
- `lsp_lsp_goto_definition(filePath, line, character)` - Jump to where symbol is defined
|
|
235
|
+
- `lsp_lsp_find_references(filePath, line, character)` - Find all usages of a symbol
|
|
236
|
+
- `lsp_lsp_document_symbols(filePath)` - Get file outline (classes, functions, etc.)
|
|
237
|
+
- `lsp_lsp_workspace_symbols(query, filePath)` - Fuzzy search symbols across workspace
|
|
238
238
|
|
|
239
239
|
**Diagnostics:**
|
|
240
240
|
|
|
241
|
-
- `
|
|
241
|
+
- `lsp_lsp_diagnostics(filePath, severity?)` - Get errors/warnings from language server
|
|
242
242
|
|
|
243
243
|
**Refactoring:**
|
|
244
244
|
|
|
245
|
-
- `
|
|
246
|
-
- `
|
|
247
|
-
- `
|
|
248
|
-
- `
|
|
245
|
+
- `lsp_lsp_rename(filePath, line, character, newName)` - Rename symbol across codebase
|
|
246
|
+
- `lsp_lsp_code_actions(filePath, startLine, startChar, endLine, endChar)` - Get available refactorings
|
|
247
|
+
- `lsp_lsp_code_action_apply(...)` - Apply a specific code action
|
|
248
|
+
- `lsp_lsp_organize_imports(filePath)` - Clean up and sort imports
|
|
249
249
|
|
|
250
250
|
**When to use each tool:**
|
|
251
251
|
|
|
252
|
-
**"What type is this variable?"** → Use `
|
|
252
|
+
**"What type is this variable?"** → Use `lsp_lsp_hover` to see type signature without reading the entire definition file.
|
|
253
253
|
|
|
254
|
-
**"Where is this function defined?"** → Use `
|
|
254
|
+
**"Where is this function defined?"** → Use `lsp_lsp_goto_definition` to jump directly to source instead of grepping.
|
|
255
255
|
|
|
256
|
-
**"What uses this function?"** → Use `
|
|
256
|
+
**"What uses this function?"** → Use `lsp_lsp_find_references` before changing anything to see all call sites.
|
|
257
257
|
|
|
258
|
-
**"What's in this file?"** → Use `
|
|
258
|
+
**"What's in this file?"** → Use `lsp_lsp_document_symbols` for a quick outline without reading the entire file.
|
|
259
259
|
|
|
260
|
-
**"Where is UserService defined?"** → Use `
|
|
260
|
+
**"Where is UserService defined?"** → Use `lsp_lsp_workspace_symbols` to fuzzy search across all files.
|
|
261
261
|
|
|
262
|
-
**"Are there type errors?"** → Use `
|
|
262
|
+
**"Are there type errors?"** → Use `lsp_lsp_diagnostics` to check before running tests.
|
|
263
263
|
|
|
264
|
-
**"Rename this function safely"** → Use `
|
|
264
|
+
**"Rename this function safely"** → Use `lsp_lsp_rename` to update all references automatically.
|
|
265
265
|
|
|
266
266
|
**Caveat**: LSP tools modify files directly. Re-read files before further edits.
|
|
267
267
|
|
|
@@ -401,6 +401,16 @@ read_session("today") # Today's first session
|
|
|
401
401
|
read_session("ses_abc123", focus="file changes") # Specific aspect
|
|
402
402
|
```
|
|
403
403
|
|
|
404
|
+
**`search_session`** - Full-text search across sessions
|
|
405
|
+
|
|
406
|
+
```
|
|
407
|
+
search_session(query="auth bug") # Search all sessions
|
|
408
|
+
search_session(query="OAuth", session_id="ses_abc") # Search specific session
|
|
409
|
+
search_session(query="error", limit=10) # Limit results
|
|
410
|
+
```
|
|
411
|
+
|
|
412
|
+
Use to find past discussions, decisions, or work on a topic before starting new work.
|
|
413
|
+
|
|
404
414
|
**`summarize_session`** - Generate AI summary of a session
|
|
405
415
|
|
|
406
416
|
```
|
|
@@ -35,9 +35,9 @@ File search specialist. Navigate and explore codebases efficiently.
|
|
|
35
35
|
|
|
36
36
|
**Progressive disclosure**: Start broad, narrow based on findings.
|
|
37
37
|
|
|
38
|
-
1. Use `
|
|
39
|
-
2. Use `
|
|
40
|
-
3. Use `
|
|
38
|
+
1. Use `lsp_lsp_workspace_symbols` or `lsp_lsp_document_symbols` to understand structure without reading whole files
|
|
39
|
+
2. Use `lsp_lsp_goto_definition` to jump directly to source instead of grepping
|
|
40
|
+
3. Use `lsp_lsp_find_references` to map usage before returning
|
|
41
41
|
4. Only `read` the specific lines that matter
|
|
42
42
|
|
|
43
43
|
**Avoid blind exploration**: Don't grep for generic terms. Use semantic tools first.
|
|
@@ -52,8 +52,8 @@ File search specialist. Navigate and explore codebases efficiently.
|
|
|
52
52
|
|
|
53
53
|
## Thoroughness Levels
|
|
54
54
|
|
|
55
|
-
**Quick**: Single ast-grep,
|
|
55
|
+
**Quick**: Single ast-grep, lsp_lsp_workspace_symbols, or glob. Read 1-3 files. Return immediately.
|
|
56
56
|
|
|
57
|
-
**Medium**: AST-grep + LSP verification. Check 2-3 naming conventions. Read 3-5 files. Use `
|
|
57
|
+
**Medium**: AST-grep + LSP verification. Check 2-3 naming conventions. Read 3-5 files. Use `lsp_lsp_find_references` to trace usage.
|
|
58
58
|
|
|
59
|
-
**Very Thorough**: Comprehensive search across multiple terms and locations. Use `
|
|
59
|
+
**Very Thorough**: Comprehensive search across multiple terms and locations. Use `lsp_lsp_find_references` to build dependency map. Report with file:line references.
|
|
@@ -97,7 +97,7 @@ grep({ pattern: "[related concept]", include: "*.ts" });
|
|
|
97
97
|
ast - grep({ pattern: "[code pattern]" });
|
|
98
98
|
|
|
99
99
|
// Understand existing architecture
|
|
100
|
-
|
|
100
|
+
lsp_lsp_document_symbols({ filePath: "<relevant file>" });
|
|
101
101
|
```
|
|
102
102
|
|
|
103
103
|
For each promising idea, note:
|
|
@@ -78,14 +78,14 @@ Files affected: [N]
|
|
|
78
78
|
Get errors with full context:
|
|
79
79
|
|
|
80
80
|
```typescript
|
|
81
|
-
|
|
81
|
+
lsp_lsp_diagnostics({ filePath: "<file>", severity: "error" });
|
|
82
82
|
```
|
|
83
83
|
|
|
84
84
|
For each file with errors:
|
|
85
85
|
|
|
86
86
|
```typescript
|
|
87
|
-
|
|
88
|
-
|
|
87
|
+
lsp_lsp_hover({ filePath: "<file>", line: N, character: N }); // Understand types
|
|
88
|
+
lsp_lsp_goto_definition({ filePath: "<file>", line: N, character: N }); // Find source
|
|
89
89
|
```
|
|
90
90
|
|
|
91
91
|
## Phase 4: Categorize Errors
|
|
@@ -39,7 +39,7 @@ bd_ls({ status: "all", limit: 20, offset: 0 })
|
|
|
39
39
|
|
|
40
40
|
# Analyze codebase structure
|
|
41
41
|
glob pattern="src/**/*.{ts,tsx,py}"
|
|
42
|
-
|
|
42
|
+
lsp_lsp_workspace_symbols({ query: "[relevant-terms]" })
|
|
43
43
|
|
|
44
44
|
# Check recent changes in related areas
|
|
45
45
|
git log --oneline -10 -- src/[relevant-path]/
|
|
@@ -68,7 +68,7 @@ const parseTarget = (input: string) => {
|
|
|
68
68
|
glob({ pattern: `${path}/**/*.{tsx,jsx,css,scss,vue,svelte}` });
|
|
69
69
|
|
|
70
70
|
// Analyze component structure
|
|
71
|
-
|
|
71
|
+
lsp_lsp_document_symbols({ filePath: mainComponentFile });
|
|
72
72
|
|
|
73
73
|
// Search for styling patterns
|
|
74
74
|
ast_grep({ pattern: "className={$$$}", path });
|
|
@@ -39,6 +39,10 @@ bd_reserve({
|
|
|
39
39
|
**Check for previous research:**
|
|
40
40
|
|
|
41
41
|
```typescript
|
|
42
|
+
// Search for past research on this topic
|
|
43
|
+
search_session({ query: "<topic keywords>" });
|
|
44
|
+
|
|
45
|
+
// Also check recent sessions
|
|
42
46
|
list_sessions({ project: "current", since: "this week", limit: 5 });
|
|
43
47
|
```
|
|
44
48
|
|
|
@@ -84,9 +88,9 @@ Prioritize sources in this order:
|
|
|
84
88
|
|
|
85
89
|
```typescript
|
|
86
90
|
// Semantic understanding
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
91
|
+
lsp_lsp_find_references({ filePath: "<file>", line: N, character: N });
|
|
92
|
+
lsp_lsp_hover({ filePath: "<file>", line: N, character: N });
|
|
93
|
+
lsp_lsp_document_symbols({ filePath: "<file>" });
|
|
90
94
|
|
|
91
95
|
// Pattern search
|
|
92
96
|
ast-grep({ pattern: "<code pattern>" });
|
|
@@ -94,13 +94,22 @@ Options:
|
|
|
94
94
|
|
|
95
95
|
## Phase 4: Load Previous Session Context
|
|
96
96
|
|
|
97
|
-
### Step 1:
|
|
97
|
+
### Step 1: Search for Related Work
|
|
98
|
+
|
|
99
|
+
```typescript
|
|
100
|
+
// Search past sessions for work on this bead
|
|
101
|
+
search_session({ query: "$ARGUMENTS" });
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
This finds all sessions that discussed or worked on this bead.
|
|
105
|
+
|
|
106
|
+
### Step 2: Find Related Sessions
|
|
98
107
|
|
|
99
108
|
```typescript
|
|
100
109
|
list_sessions({ project: "current", limit: 10, _: true });
|
|
101
110
|
```
|
|
102
111
|
|
|
103
|
-
### Step
|
|
112
|
+
### Step 3: Identify Relevant Session
|
|
104
113
|
|
|
105
114
|
Look for sessions that:
|
|
106
115
|
|
|
@@ -30,6 +30,9 @@ bd_reservations({ reason: "Check file locks" });
|
|
|
30
30
|
// Sessions
|
|
31
31
|
list_sessions({ project: "current", since: "today", limit: 5, _: true });
|
|
32
32
|
|
|
33
|
+
// Search for recent activity on current work (if bead in progress)
|
|
34
|
+
search_session({ query: "<current-bead-id>", limit: 5 });
|
|
35
|
+
|
|
33
36
|
// Git state
|
|
34
37
|
bash("git status --porcelain");
|
|
35
38
|
bash("git branch --show-current");
|
|
@@ -29,6 +29,9 @@ bd_status({ include_agents: true });
|
|
|
29
29
|
bd_ls({ status: "open", limit: 50, offset: 0 });
|
|
30
30
|
bd_reservations({ reason: "Check active file locks" });
|
|
31
31
|
bd_inbox({ n: 10, unread: true, global: true });
|
|
32
|
+
|
|
33
|
+
// Search for past discussions on recurring issues
|
|
34
|
+
search_session({ query: "blocked OR regression OR urgent", limit: 10 });
|
|
32
35
|
```
|
|
33
36
|
|
|
34
37
|
Capture:
|
|
@@ -38,6 +41,7 @@ Capture:
|
|
|
38
41
|
- Active agents
|
|
39
42
|
- File locks
|
|
40
43
|
- Pending messages
|
|
44
|
+
- Past context on recurring issues
|
|
41
45
|
|
|
42
46
|
## Phase 3: Analyze Dependencies
|
|
43
47
|
|
|
@@ -1,32 +1,31 @@
|
|
|
1
1
|
{
|
|
2
|
-
// Enable or disable the plugin
|
|
3
2
|
"enabled": true,
|
|
4
|
-
// Enable debug logging to ~/.config/opencode/logs/dcp/
|
|
5
3
|
"debug": false,
|
|
6
|
-
//
|
|
4
|
+
// "minimal" shows prune activity without noise; "off" if you want silence
|
|
7
5
|
"pruneNotification": "off",
|
|
8
|
-
// Protect from pruning for <turns> message turns
|
|
9
6
|
"turnProtection": {
|
|
10
7
|
"enabled": true,
|
|
11
|
-
|
|
8
|
+
// 3 turns = faster cleanup while still protecting recent context
|
|
9
|
+
"turns": 3
|
|
12
10
|
},
|
|
13
|
-
// LLM-driven context pruning tools
|
|
14
11
|
"tools": {
|
|
15
|
-
// Shared settings for all prune tools
|
|
16
12
|
"settings": {
|
|
17
|
-
// Nudge the LLM to use prune tools (every <nudgeFrequency> tool results)
|
|
18
13
|
"nudgeEnabled": true,
|
|
19
|
-
|
|
20
|
-
|
|
14
|
+
// Nudge every 8 tool calls (slightly more aggressive than default 10)
|
|
15
|
+
"nudgeFrequency": 8,
|
|
16
|
+
// Protect state-modifying and critical workflow tools
|
|
21
17
|
"protectedTools": [
|
|
22
18
|
"write",
|
|
23
19
|
"edit",
|
|
24
20
|
"memory-read",
|
|
25
21
|
"memory-update",
|
|
22
|
+
"memory-search",
|
|
26
23
|
"observation",
|
|
27
24
|
"skill",
|
|
28
|
-
"
|
|
25
|
+
"skill_mcp",
|
|
29
26
|
"lsp_lsp_rename",
|
|
27
|
+
"lsp_lsp_find_references",
|
|
28
|
+
"lsp_lsp_goto_definition",
|
|
30
29
|
"lsp_lsp_code_actions",
|
|
31
30
|
"lsp_lsp_code_action_apply",
|
|
32
31
|
"lsp_lsp_organize_imports",
|
|
@@ -35,49 +34,33 @@
|
|
|
35
34
|
"bd_done",
|
|
36
35
|
"bd_show",
|
|
37
36
|
"bd_reserve",
|
|
38
|
-
"bd_reservations"
|
|
37
|
+
"bd_reservations",
|
|
38
|
+
"bd_sync"
|
|
39
39
|
]
|
|
40
40
|
},
|
|
41
|
-
// Removes tool content from context without preservation (for completed tasks or noise)
|
|
42
41
|
"discard": {
|
|
43
42
|
"enabled": true
|
|
44
43
|
},
|
|
45
|
-
// Distills key findings into preserved knowledge before removing raw content
|
|
46
44
|
"extract": {
|
|
47
45
|
"enabled": true,
|
|
48
|
-
// Show distillation content as an ignored message notification
|
|
49
46
|
"showDistillation": false
|
|
50
47
|
}
|
|
51
48
|
},
|
|
52
|
-
// Automatic pruning strategies
|
|
53
49
|
"strategies": {
|
|
54
|
-
//
|
|
50
|
+
// Dedup = zero LLM cost, high impact - always enable
|
|
55
51
|
"deduplication": {
|
|
56
52
|
"enabled": true,
|
|
57
|
-
// Additional tools to protect from pruning
|
|
58
53
|
"protectedTools": []
|
|
59
54
|
},
|
|
60
|
-
//
|
|
55
|
+
// Supersede writes = zero cost, removes redundant write inputs after read
|
|
61
56
|
"supersedeWrites": {
|
|
62
57
|
"enabled": true
|
|
63
58
|
},
|
|
64
|
-
//
|
|
59
|
+
// Purge error inputs after 3 turns
|
|
65
60
|
"purgeErrors": {
|
|
66
61
|
"enabled": true,
|
|
67
|
-
|
|
68
|
-
"turns": 4,
|
|
69
|
-
// Additional tools to protect from pruning
|
|
62
|
+
"turns": 3,
|
|
70
63
|
"protectedTools": []
|
|
71
|
-
},
|
|
72
|
-
// (Legacy) Run an LLM to analyze what tool calls are no longer relevant on idle
|
|
73
|
-
"onIdle": {
|
|
74
|
-
"enabled": false,
|
|
75
|
-
// Additional tools to protect from pruning
|
|
76
|
-
"protectedTools": [],
|
|
77
|
-
// Show toast notifications when model selection fails
|
|
78
|
-
"showModelErrorToasts": true,
|
|
79
|
-
// When true, fallback models are not permitted
|
|
80
|
-
"strictModelSelection": false
|
|
81
64
|
}
|
|
82
65
|
}
|
|
83
66
|
}
|
|
@@ -1,17 +1,23 @@
|
|
|
1
1
|
---
|
|
2
2
|
purpose: Build, test, lint, deploy commands discovered for this project
|
|
3
|
-
updated:
|
|
3
|
+
updated: 2025-01-05
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Project Commands
|
|
7
7
|
|
|
8
8
|
## Build
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
```bash
|
|
11
|
+
npm run type-check # TypeScript type checking only (no emit)
|
|
12
|
+
```
|
|
11
13
|
|
|
12
14
|
## Test
|
|
13
15
|
|
|
14
|
-
|
|
16
|
+
```bash
|
|
17
|
+
pytest tests/ -v # Run all Python tests
|
|
18
|
+
pytest tests/test_specific.py -v # Run single test file
|
|
19
|
+
pytest tests/ --cov=. --cov-report=html # Coverage report
|
|
20
|
+
```
|
|
15
21
|
|
|
16
22
|
## Lint
|
|
17
23
|
|
|
@@ -21,6 +27,39 @@ updated: 2024-12-21
|
|
|
21
27
|
|
|
22
28
|
<!-- Deployment commands if applicable -->
|
|
23
29
|
|
|
24
|
-
##
|
|
30
|
+
## OpenCode Configuration
|
|
25
31
|
|
|
26
|
-
|
|
32
|
+
### Environment Variables
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
OPENCODE_EXPERIMENTAL=true # Enable experimental features (LSP, batch)
|
|
36
|
+
OPENCODE_EXPERIMENTAL_LSP_TOOL=true # Enable built-in LSP navigation tool
|
|
37
|
+
OPENCODE_DISABLE_LSP_DOWNLOAD=true # Skip auto-downloading LSP servers
|
|
38
|
+
OPENCODE_DISABLE_AUTOCOMPACT=true # Disable automatic session compaction
|
|
39
|
+
OPENCODE_DISABLE_PRUNE=true # Disable DCP pruning
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
### Configuration File Priorities
|
|
43
|
+
|
|
44
|
+
1. Global: `~/.config/opencode/opencode.json` or `dcp.jsonc`
|
|
45
|
+
2. Config Dir: `$OPENCODE_CONFIG_DIR/opencode.json`
|
|
46
|
+
3. Project: `.opencode/opencode.json` (highest priority)
|
|
47
|
+
|
|
48
|
+
### DCP Nudge Tuning
|
|
49
|
+
|
|
50
|
+
```jsonc
|
|
51
|
+
// Lower nudgeFrequency = more aggressive pruning suggestions
|
|
52
|
+
"nudgeFrequency": 8 // LLM nudged every 8 tool calls (default: 10)
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
## Beads Workflow
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
bd ready # Show issues ready to work (no blockers)
|
|
59
|
+
bd list --status=open # All open issues
|
|
60
|
+
bd show <id> # Full issue details with dependencies
|
|
61
|
+
bd create --title="..." --type=task --priority=2
|
|
62
|
+
bd update <id> --status=in_progress
|
|
63
|
+
bd close <id> --reason="Completed"
|
|
64
|
+
bd sync # Commit and push changes
|
|
65
|
+
```
|