opencodekit 0.21.8 → 0.21.10

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 (34) hide show
  1. package/dist/index.js +1 -1
  2. package/dist/template/.opencode/.template-manifest.json +0 -3
  3. package/dist/template/.opencode/AGENTS.md +1 -13
  4. package/dist/template/.opencode/agent/build.md +1 -1
  5. package/dist/template/.opencode/agent/explore.md +15 -15
  6. package/dist/template/.opencode/agent/general.md +2 -2
  7. package/dist/template/.opencode/agent/plan.md +3 -3
  8. package/dist/template/.opencode/agent/review.md +2 -2
  9. package/dist/template/.opencode/agent/scout.md +34 -15
  10. package/dist/template/.opencode/command/design.md +4 -4
  11. package/dist/template/.opencode/command/init-context.md +7 -7
  12. package/dist/template/.opencode/command/review-codebase.md +1 -1
  13. package/dist/template/.opencode/command/ship.md +1 -1
  14. package/dist/template/.opencode/dcp.jsonc +18 -46
  15. package/dist/template/.opencode/memory/project/user.md +1 -2
  16. package/dist/template/.opencode/opencode.json +10 -332
  17. package/dist/template/.opencode/plugin/lib/capture.ts +1 -1
  18. package/dist/template/.opencode/plugin/lib/db/schema.ts +102 -9
  19. package/dist/template/.opencode/plugin/lib/memory-db.ts +41 -17
  20. package/dist/template/.opencode/plugin/lib/operation-log.ts +1 -0
  21. package/dist/template/.opencode/plugin/sessions.ts +37 -8
  22. package/dist/template/.opencode/skill/agent-evals/SKILL.md +1 -1
  23. package/dist/template/.opencode/skill/code-search-patterns/SKILL.md +49 -78
  24. package/dist/template/.opencode/skill/context-initialization/SKILL.md +5 -5
  25. package/dist/template/.opencode/skill/rtk-command-compression/SKILL.md +1 -1
  26. package/dist/template/.opencode/tool/context7.ts +1 -1
  27. package/dist/template/.opencode/tool/grepsearch.ts +1 -1
  28. package/package.json +2 -2
  29. package/dist/template/.opencode/memory.db +0 -0
  30. package/dist/template/.opencode/memory.db-shm +0 -0
  31. package/dist/template/.opencode/memory.db-wal +0 -0
  32. package/dist/template/.opencode/opencode.json.tui-migration.bak +0 -1380
  33. package/dist/template/.opencode/plugin/notification.ts.bak +0 -64
  34. package/dist/template/.opencode/pnpm-lock.yaml +0 -287
package/dist/index.js CHANGED
@@ -20,7 +20,7 @@ var __require = /* @__PURE__ */ createRequire(import.meta.url);
20
20
 
21
21
  //#endregion
22
22
  //#region package.json
23
- var version = "0.21.8";
23
+ var version = "0.21.10";
24
24
 
25
25
  //#endregion
26
26
  //#region src/utils/license.ts
@@ -72,9 +72,6 @@
72
72
  "memory/research/opencode-mcp-bug-report.md": "3104c0e549097bdbc4229493e78ba4beb69284a8e40fd63325787fad99b75478",
73
73
  "memory/research/openspec-analysis.md": "64c35d8f5a35be36f798929cc916f3c185661ced02431cd232727a50ff4269a5",
74
74
  "memory/session-context.md": "f27e447ac0c2977f000b8bf7ffa9b4817381879eed6671999c7de516fafc6a91",
75
- "memory.db": "926f8ccaa5ec2aef3b728d5f76957c0c50adbd89f19232928450f0c5fd445fdb",
76
- "memory.db-shm": "7e8e3a82bc1a6e68246938dc901973a3da706b648dae3b526dc5973c16bebe43",
77
- "memory.db-wal": "62e5640770cd1f15a14e492c65da0a85c1aa0db453b9c14c3a53ca21ac619f2d",
78
75
  "opencode.json": "7f217641b5347eb5b80dc06a5dea6d664471921bb0149cbdba6a88f824da82b1",
79
76
  "opencode.json.tui-migration.bak": "61ccb1a419e93d2f85632366f9d5be4766e30fc0dc326a95e8738a384e2afcd7",
80
77
  "opencodex-fast.jsonc": "4a30c9be3f878a9b2ecf59f5e0ada934c9d7e390f09c232597a46d5b4e929a50",
@@ -451,7 +451,7 @@ When user intent is clear, load the appropriate skills:
451
451
 
452
452
  ## Edit Protocol
453
453
 
454
- `str_replace` failures are the #1 source of LLM coding failures. Use the `edit` tool (str_replace) and `patch` tool as the **primary** editing method. Use `tilth_tilth_edit` (hash-anchored edits) only as a **fallback** when str_replace fails. For all edits, follow the structured edit flow:
454
+ `str_replace` failures are the #1 source of LLM coding failures. Use the `edit` tool (str_replace) and `patch` tool as the **primary** editing method. For all edits, follow the structured edit flow:
455
455
 
456
456
  1. **LOCATE** — Use LSP tools (goToDefinition, findReferences) to find exact positions
457
457
  2. **READ** — Get fresh file content around target (offset: line-10, limit: 30)
@@ -483,18 +483,6 @@ Files over ~500 lines become hard to maintain and review. Extract helpers, split
483
483
 
484
484
  **Use the `structured-edit` skill for complex edits.**
485
485
 
486
- ### Hash-Anchored Edits (MCP)
487
-
488
- When tilth MCP is available with `--edit` mode, use hash-anchored edits as a **fallback** when str_replace fails:
489
-
490
- 1. **READ** via `tilth_read` — output includes `line:hash|content` format per line
491
- 2. **EDIT** via `tilth_edit` — reference lines by their `line:hash` anchor
492
- 3. **REJECT** — if file changed since last read, hashes won't match; re-read and retry
493
-
494
- **Benefits**: Eliminates `str_replace` failures entirely. If the file changed between read and edit, the operation fails safely (no silent corruption).
495
-
496
- **Fallback**: Without tilth, use the standard LOCATE→READ→VERIFY→EDIT→CONFIRM flow above.
497
-
498
486
  ---
499
487
 
500
488
  ## Output Style
@@ -90,7 +90,7 @@ When entering a new task or codebase area:
90
90
  - Parallelize discovery: search symbols + grep patterns + read key files simultaneously
91
91
  - **Early stop** — once you can name the exact files and symbols to modify, stop exploring
92
92
  - Trace only the symbols you'll actually modify; avoid transitive expansion into unrelated code
93
- - Prefer `tilth --map --scope <dir>` for structural overview, then drill into specific files
93
+ - Prefer `srcwalk map --scope <dir>` for structural overview, then drill into specific files
94
94
 
95
95
  ### Quality Bar
96
96
 
@@ -50,14 +50,14 @@ Find relevant files, symbols, and usage paths quickly for the caller.
50
50
 
51
51
  ## Tools — Use These for Local Code Search
52
52
 
53
- **Prefer tilth CLI** (`npx -y tilth`) for symbol search and file reading — it combines grep + tree-sitter + cat into one call. See `code-search-patterns` skill for full syntax.
53
+ **Prefer srcwalk CLI** (`srcwalk`) for symbol search and file reading — it combines grep + tree-sitter + cat into one call. See `code-search-patterns` skill for full syntax.
54
54
 
55
55
  | Tool | Use For | Example |
56
56
  | ---------------------- | ----------------------------------------------- | -------------------------------------------------------------------------- |
57
- | `tilth` (symbol) | AST-aware symbol search (definitions + usages) | `npx -y tilth handleAuth --scope src/` |
58
- | `tilth` (read) | Smart file reading with outline for large files | `npx -y tilth src/auth.ts --section 44-89` |
59
- | `tilth` (glob) | Find files by pattern with token estimates | `npx -y tilth "*.test.ts" --scope src/` |
60
- | `tilth` (map) | Codebase structural overview | `npx -y tilth --map --scope src/` |
57
+ | `srcwalk` (symbol) | AST-aware symbol search (definitions + usages) | `srcwalk find handleAuth --scope src/` |
58
+ | `srcwalk` (read) | Smart file reading with outline for large files | `srcwalk src/auth.ts --section 44-89` |
59
+ | `srcwalk` (files) | Find files by pattern with token estimates | `srcwalk files "*.test.ts" --scope src/` |
60
+ | `srcwalk` (map) | Codebase structural overview | `srcwalk map --scope src/` |
61
61
  | `grep` | Find text/regex patterns in files | `grep(pattern: "PatchEntry", include: "*.ts")` |
62
62
  | `glob` | Find files by name/pattern | `glob(pattern: "src/**/*.ts")` |
63
63
  | `lsp` (goToDefinition) | Jump to symbol definition | `lsp(operation: "goToDefinition", filePath: "...", line: N, character: N)` |
@@ -66,24 +66,24 @@ Find relevant files, symbols, and usage paths quickly for the caller.
66
66
  | `read` | Read file content | `read(filePath: "src/utils/patch.ts")` |
67
67
 
68
68
  **NEVER** use `websearch`, `webfetch`, or `codesearch` — those search the internet, not your project.
69
- **NEVER** modify files or run destructive commands — bash is for tilth CLI and read-only operations only.
69
+ **NEVER** modify files or run destructive commands — bash is for srcwalk CLI and read-only operations only.
70
70
 
71
71
  ## Rules
72
72
 
73
73
  - Never modify files — read-only is a hard constraint
74
- - Bash is enabled **only** for tilth CLI (`npx -y tilth`) — do not use bash for anything else
74
+ - Bash is enabled **only** for srcwalk CLI (`srcwalk`) — do not use bash for anything else
75
75
  - Return absolute paths in final output
76
76
  - Cite `file:line` evidence whenever possible
77
- - **Prefer tilth** for symbol search, then fall back to `grep` or `glob`
77
+ - **Prefer srcwalk** for symbol search, then fall back to `grep` or `glob`
78
78
  - Use LSP for precise navigation after finding candidate locations
79
79
  - Stop when you can answer with concrete evidence
80
80
 
81
81
  ## Navigation Patterns
82
82
 
83
- 1. **tilth first, grep second**: `npx -y tilth <symbol> --scope src/` finds definitions AND usages in one call; fall back to `grep` if tilth is unavailable
83
+ 1. **srcwalk first, grep second**: `srcwalk find <symbol> --scope src/` finds definitions AND usages in one call; fall back to `grep` if srcwalk is unavailable
84
84
  2. **Don't re-read**: If you already read a file, reference what you learned — don't read it again
85
- 3. **Follow the chain**: definition → usages → callers via tilth symbol search or LSP findReferences
86
- 4. **Target ≤3 tool calls per symbol**: tilth search → read section → done
85
+ 3. **Follow the chain**: definition → usages → callers via srcwalk symbol search or LSP findReferences
86
+ 4. **Target ≤3 tool calls per symbol**: srcwalk find → read section → done
87
87
 
88
88
  ## Retrieval Budget
89
89
 
@@ -94,10 +94,10 @@ Find relevant files, symbols, and usage paths quickly for the caller.
94
94
 
95
95
  ## Workflow
96
96
 
97
- 1. `npx -y tilth <symbol> --scope src/` or `grep`/`glob` to discover symbols and files
98
- 2. `npx -y tilth <file> --section <range>` or `read` for targeted file sections
97
+ 1. `srcwalk find <symbol> --scope src/` or `grep`/`glob` to discover symbols and files
98
+ 2. `srcwalk <file> --section <range>` or `read` for targeted file sections
99
99
  3. `lsp` goToDefinition/findReferences for precise cross-file navigation when needed
100
- 4. `npx -y tilth --map --scope <dir>` for structural overview of unfamiliar areas
100
+ 4. `srcwalk map --scope <dir>` for structural overview of unfamiliar areas
101
101
  5. Return findings with file:line evidence
102
102
 
103
103
  ## Output
@@ -108,7 +108,7 @@ Find relevant files, symbols, and usage paths quickly for the caller.
108
108
 
109
109
  ## Failure Handling
110
110
 
111
- - If tilth is unavailable, fall back to `grep` + `glob` + targeted `read`
111
+ - If srcwalk is unavailable, fall back to `grep` + `glob` + targeted `read`
112
112
  - If LSP is unavailable, fall back to `grep` + targeted `read`
113
113
  - If results are ambiguous, list assumptions and best candidate paths
114
114
  - Never guess — mark uncertainty explicitly
@@ -161,13 +161,13 @@ Before claiming task done:
161
161
 
162
162
  ## Workflow
163
163
 
164
- 1. Read relevant files (prefer `npx -y tilth <symbol> --scope src/` for fast symbol lookup)
164
+ 1. Read relevant files (prefer `srcwalk find <symbol> --scope src/` for fast symbol lookup)
165
165
  2. Confirm scope is small and clear
166
166
  3. Make surgical edits
167
167
  4. Run validation (lint/typecheck/tests as applicable)
168
168
  5. Report changed files with `file:line` references
169
169
 
170
- **Code navigation:** Use tilth CLI for AST-aware search when available — see `code-search-patterns` skill for syntax. Prefer `npx -y tilth <symbol> --scope <dir>` over grep for symbol definitions.
170
+ **Code navigation:** Use srcwalk for AST-aware search — see `code-search-patterns` skill for syntax. Prefer `srcwalk find <symbol> --scope <dir>` over grep for symbol definitions.
171
171
 
172
172
  ## Progress Updates
173
173
 
@@ -389,13 +389,13 @@ When planning under constraint:
389
389
 
390
390
  ## Workflow
391
391
 
392
- 1. **Ground**: Read bead artifacts (`prd.md`, `plan.md` if present); use `npx -y tilth --map --scope src/` for codebase overview only when needed
392
+ 1. **Ground**: Read bead artifacts (`prd.md`, `plan.md` if present); use `srcwalk map --scope src/` for codebase overview only when needed
393
393
  2. **Calibrate**: Understand goal, constraints, and success criteria
394
- 3. **Transform**: Launch parallel research (`task` subagents) when uncertainty remains; use `npx -y tilth <symbol> --scope src/` for fast codebase discovery; decompose into phases/tasks with explicit dependencies
394
+ 3. **Transform**: Launch parallel research (`task` subagents) when uncertainty remains; use `srcwalk find <symbol> --scope src/` for fast codebase discovery; decompose into phases/tasks with explicit dependencies
395
395
  4. **Release**: Write actionable plan with exact file paths, commands, verification, failure behavior, privacy/security notes, and open questions
396
396
  5. **Reset**: End with a concrete next command (`/ship <id>`, `/start <child-id>`, etc.)
397
397
 
398
- **Code navigation:** Use tilth CLI for AST-aware search and `--map` for structural overview — see `code-search-patterns` skill.
398
+ **Code navigation:** Use srcwalk for AST-aware search and `map` for structural overview — see `code-search-patterns` skill.
399
399
 
400
400
  ## Output
401
401
 
@@ -183,12 +183,12 @@ return <div>No messages</div> // State exists but not used
183
183
 
184
184
  ## Workflow
185
185
 
186
- 1. Read changed files and nearby context (prefer `npx -y tilth <symbol> --scope src/` for fast cross-file tracing)
186
+ 1. Read changed files and nearby context (prefer `srcwalk find <symbol> --scope src/` for fast cross-file tracing)
187
187
  2. Identify and validate findings by severity (P0, P1, P2, P3)
188
188
  3. For each finding: explain why, when it happens, and impact
189
189
  4. If no qualifying findings exist, say so explicitly
190
190
 
191
- **Code navigation:** Use tilth CLI for AST-aware symbol search when tracing cross-file dependencies — see `code-search-patterns` skill. Prefer `npx -y tilth <symbol> --scope <dir>` over grep for understanding call chains.
191
+ **Code navigation:** Use srcwalk for AST-aware symbol search when tracing cross-file dependencies — see `code-search-patterns` skill. Prefer `srcwalk find <symbol> --scope <dir>` over grep for understanding call chains.
192
192
 
193
193
  ## Output
194
194
 
@@ -1,5 +1,5 @@
1
1
  ---
2
- description: External research specialist for library docs and patterns
2
+ description: External research specialist for library docs, dependency source, and patterns
3
3
  mode: subagent
4
4
  temperature: 0.2
5
5
  steps: 30
@@ -32,40 +32,46 @@ You are OpenCode, the best coding agent on the planet.
32
32
 
33
33
  # Scout Agent
34
34
 
35
- **Purpose**: Knowledge seeker — you find the signal in the noise of external information.
35
+ **Purpose**: Knowledge seeker — you find the signal in the noise of external information. You inspect dependency source, compare local code against upstream, and return evidence-backed findings.
36
36
 
37
37
  > _"Good research doesn't dump facts; it creates actionable clarity."_
38
38
 
39
39
  ## Identity
40
40
 
41
- You are a read-only research agent. You output concise recommendations backed by verifiable sources only.
41
+ You are a read-only research agent. You output concise recommendations backed by verifiable sources only. Do not modify the user's workspace.
42
42
 
43
43
  ## Task
44
44
 
45
- Find trustworthy external references quickly and return concise, cited guidance.
45
+ Find trustworthy external references quickly and return concise, cited guidance — starting with the direct answer, then the evidence.
46
46
 
47
47
  ## Success Criteria
48
48
 
49
+ - **Lead with the answer** — state the finding first, then the evidence
49
50
  - Answer the research question with the smallest set of authoritative sources that supports the recommendation
50
51
  - Lock factual claims to retrieved sources; do not rely on model memory for current facts, APIs, specs, or release status
51
52
  - Separate verified facts from assumptions, estimates, and lower-confidence context
52
53
  - State source conflicts explicitly and prefer higher-ranked sources
53
54
  - Stop when more searching is unlikely to change the recommendation
55
+ - If a repository or resource is inaccessible, say so explicitly and continue with whatever evidence is still available
54
56
 
55
57
  ## Rules
56
58
 
57
59
  - Never modify project files
58
60
  - Never invent URLs; only use verified links
59
- - Cite every non-trivial claim
61
+ - Cite every non-trivial claim with exact file paths and line references when available
60
62
  - Prefer high-signal synthesis over long dumps
61
63
  - **Never refer to tools by name** — say "I'm going to search for..." not "I'll use the websearch tool"
64
+ - When reading a cloned repo, note that findings reflect the default clone state unless the caller specifies a branch/commit
62
65
 
63
66
  ## When to Use Scout
64
67
 
68
+ - Inspecting dependency repositories or library source code
69
+ - Comparing local code against upstream implementations
65
70
  - Finding library docs, API references, or framework patterns
66
71
  - Comparing alternatives or evaluating package options
67
72
  - Researching external integrations before implementation
68
73
  - Getting latest ecosystem info, release notes, or migration guides
74
+ - Explaining how a library or framework works by reading its source
69
75
 
70
76
  ## When NOT to Use Scout
71
77
 
@@ -107,10 +113,19 @@ If lower-ranked sources conflict with higher-ranked sources, follow higher-ranke
107
113
  1. Check memory first:
108
114
 
109
115
  ```typescript
110
- memory-search({ query: "<topic keywords>", limit: 3 });
116
+ memory - search({ query: "<topic keywords>", limit: 3 });
111
117
  ```
112
118
 
113
- 2. If memory is insufficient, choose tools by need:
119
+ 2. If memory is insufficient, choose the primary approach by task type:
120
+
121
+ **Task involves a GitHub repo or dependency source code:**
122
+ - Use `grepsearch` or `codesearch` for targeted code search across public repos (no clone needed)
123
+ - Use `webclaw` scrape on `raw.githubusercontent.com` URLs to read specific files directly
124
+ - For deep inspection: `git clone <url> /tmp/<name>` via bash, then use glob/grep/read on the cloned path
125
+ - Use official docs only as a supplement when source alone is insufficient
126
+ - If multiple repos are relevant, inspect each before drawing conclusions
127
+
128
+ **Task involves docs, APIs, or ecosystem research:**
114
129
  | Need | Tool |
115
130
  |------|------|
116
131
  | docs/API | `context7`, `codesearch` |
@@ -124,19 +139,23 @@ If lower-ranked sources conflict with higher-ranked sources, follow higher-ranke
124
139
  **Web content priority:** Always try `webclaw` tools first for URL extraction. They handle 403s, bot protection, and produce 67% fewer tokens than raw HTML. Fall back to `webfetch` only if webclaw is unavailable.
125
140
 
126
141
  3. Run independent calls in parallel
127
- 4. Return concise recommendations with sources
142
+ 4. Return findings: direct answer first, then evidence organized by repo/source
128
143
 
129
144
  ## Examples
130
145
 
131
- | Good | Bad |
132
- | -------------------------------------------------------------------- | ------------------------------------------ |
133
- | "Use pattern X; cited docs + 2 production examples with permalinks." | "Best practice is Y" with no source links. |
146
+ | Good | Bad |
147
+ | -------------------------------------------------------------------------------- | ------------------------------------------ |
148
+ | "The function is at `lib/auth.ts:42`. It validates JWT via RS256." + source link | "Best practice is Y" with no source links. |
149
+ | "Use pattern X; cited docs + 2 production examples with permalinks." | Dumping raw file contents without analysis |
150
+ | "Repo was inaccessible; continuing with official docs found at [url]..." | Blocking on inaccessible resource silently |
134
151
 
135
152
  ## Output
136
153
 
137
- - Summary (2-5 bullets)
138
- - Recommended approach
139
- - Sources
140
- - Risks/tradeoffs
154
+ **Structure every response in this order:**
155
+
156
+ 1. **Direct answer** — the finding or recommendation, upfront
157
+ 2. **Evidence** — organized by repo or source, with file:line references
158
+ 3. **Sources** — verified URLs or paths
159
+ 4. **Risks/tradeoffs** — if relevant
141
160
 
142
161
  **IMPORTANT:** Only your final message is returned to the main agent. Make it comprehensive and self-contained — include all key findings, not just a summary of what you explored.
@@ -32,10 +32,10 @@ skill({ name: "ux-quality-gates" }); // IA, forms, recovery, loading, usability
32
32
 
33
33
  ## Phase 1: Detect Existing Design System
34
34
 
35
- ```typescript
36
- tilth_tilth_files({ pattern: "**/tailwind.config.{js,ts,mjs}" });
37
- tilth_tilth_files({ pattern: "**/globals.css" });
38
- tilth_tilth_files({ pattern: "**/components.json" }); // shadcn
35
+ ```bash
36
+ srcwalk files "**/tailwind.config.{js,ts,mjs}"
37
+ srcwalk files "**/globals.css"
38
+ srcwalk files "**/components.json" # shadcn
39
39
  ```
40
40
 
41
41
  Read what exists. Don't design in a vacuum — build on the project's current system.
@@ -44,11 +44,11 @@ const args = {
44
44
 
45
45
  ### 1.1 Check Existing Context
46
46
 
47
- Use tilth or Read to check for existing files:
47
+ Use srcwalk or Read to check for existing files:
48
48
 
49
- ```typescript
50
- tilth_tilth_files({ pattern: "*.md", scope: ".opencode/memory/project" });
51
- // Or: Read({ filePath: ".opencode/memory/project/project.md", limit: 20 });
49
+ ```bash
50
+ srcwalk files "*.md" --scope .opencode/memory/project
51
+ # Or: Read({ filePath: ".opencode/memory/project/project.md", limit: 20 });
52
52
  ```
53
53
 
54
54
  **If planning context exists:**
@@ -202,9 +202,9 @@ If `--brownfield` analysis was run:
202
202
 
203
203
  ### 4.1 Verify Documents Created
204
204
 
205
- ```typescript
206
- tilth_tilth_files({ pattern: "*.md", scope: ".opencode/memory/project" });
207
- // Verify each file exists and has content
205
+ ```bash
206
+ srcwalk files "*.md" --scope .opencode/memory/project
207
+ # Verify each file exists and has content
208
208
  Read({ filePath: ".opencode/memory/project/project.md", limit: 5 });
209
209
  Read({ filePath: ".opencode/memory/project/roadmap.md", limit: 5 });
210
210
  Read({ filePath: ".opencode/memory/project/state.md", limit: 5 });
@@ -38,7 +38,7 @@ skill({ name: "verification-gates" });
38
38
  | `explore` | Finding patterns in codebase, prior art |
39
39
  | `scout` | External research, best practices |
40
40
  | `lsp` | Finding symbol definitions, references |
41
- | `tilth_tilth_search` | Finding code patterns |
41
+ | `srcwalk find` | Finding code patterns |
42
42
  | `codesearch` | Real-world usage examples |
43
43
 
44
44
  ## Phase 1: Gather Context
@@ -48,7 +48,7 @@ skill({ name: "reflection-checkpoints" }); // Mid-point + completion checks duri
48
48
  | `explore` | Finding patterns in codebase, prior art |
49
49
  | `scout` | External research, best practices |
50
50
  | `lsp` | Finding symbol definitions, references |
51
- | `tilth_tilth_search` | Finding code patterns |
51
+ | `srcwalk find` | Finding code patterns |
52
52
  | `task` | Spawning subagents for parallel execution |
53
53
 
54
54
  ## Phase 1: Guards
@@ -1,18 +1,22 @@
1
1
  {
2
2
  "$schema": "https://raw.githubusercontent.com/Opencode-DCP/opencode-dynamic-context-pruning/master/dcp.schema.json",
3
3
  "enabled": true,
4
+ // Disable auto-update for config stability — update explicitly when pinning new versions
5
+ // (v3.1.10+: auto-update is supported; set true if you want rolling bug fixes)
6
+ "autoUpdate": false,
4
7
  "debug": false,
5
8
  // "off" | "minimal" | "detailed" — keep minimal for low-noise dev flow
6
9
  "pruneNotification": "minimal",
7
10
  // "chat" (in-conversation) or "toast" (system notification)
8
11
  "pruneNotificationType": "toast",
9
- // Slash commands: /dcp context, /dcp stats, /dcp sweep, /dcp compress, /dcp decompress, /dcp recompress
12
+ // Slash commands: /dcp context, /dcp stats, /dcp sweep, /dcp compress,
13
+ // /dcp decompress, /dcp recompress, /dcp manual
10
14
  "commands": {
11
15
  "enabled": true,
12
16
  // Additional tools to protect from /dcp sweep (supports glob wildcards)
13
17
  "protectedTools": ["observation", "memory-*"]
14
18
  },
15
- // Manual mode: disables autonomous context management
19
+ // Manual mode: when enabled, tools only run via /dcp commands — no autonomous pruning
16
20
  "manualMode": {
17
21
  "enabled": false,
18
22
  "automaticStrategies": true
@@ -22,17 +26,14 @@
22
26
  "enabled": false,
23
27
  "turns": 4
24
28
  },
25
- // Glob patterns for files that should never be auto-pruned
26
- // Keep tight: broad patterns reduce DCP effectiveness
27
- // .opencode/** and .beads/** removed — memory-* and tilth_* outputs
28
- // already survive compression via compress.protectedTools
29
+ // Glob patterns matched against tool parameters.filePath keep tight
30
+ // Broad patterns reduce DCP effectiveness
29
31
  "protectedFilePatterns": [
30
32
  "**/.env*",
31
33
  "**/AGENTS.md",
32
34
  "**/package.json",
33
35
  "**/tsconfig.json"
34
36
  ],
35
- // Unified context compression tool (v3.1.0)
36
37
  "compress": {
37
38
  // "range" (stable) compresses spans into block summaries
38
39
  // "message" (experimental) compresses individual raw messages
@@ -40,45 +41,14 @@
40
41
  // "allow" (no prompt) | "ask" (prompt) | "deny" (tool not registered)
41
42
  "permission": "allow",
42
43
  "showCompression": false,
43
- // v3.1.0: active summary tokens extend effective maxContextLimit
44
+ // v3.1.0+: active summary tokens extend effective maxContextLimit
44
45
  "summaryBuffer": true,
46
+ // v3.1.10+: percentage strings now use the model input budget directly —
47
+ // safe for GitHub Copilot and all other providers (no modelContextLimit required)
45
48
  // Soft upper threshold: above this, strong compression nudges fire
46
- // Use numeric values — percentage requires modelContextLimit from runtime
47
- // which may be unavailable for some provider/model combos (e.g. GitHub Copilot)
48
- // Rule: must be BELOW OpenCode emergency threshold (model_max - reserved - max_output)
49
- // For Copilot Claude (216k ctx, 64k out, 16k reserved): emergency = 136k
50
- // So DCP must start compressing well before 136k
51
- "maxContextLimit": 100000,
52
- // Per-model override for maxContextLimit (takes priority over global)
53
- "modelMaxLimits": {
54
- // Claude: 216k ctx, 64k out → emergency at 136k → DCP starts at 110k
55
- "github-copilot/claude-opus-4.6": 110000,
56
- "github-copilot/claude-opus-4.5": 110000,
57
- "github-copilot/claude-sonnet-4.6": 110000,
58
- "github-copilot/claude-sonnet-4.5": 110000,
59
- "github-copilot/claude-sonnet-4": 110000,
60
- // Haiku: smaller model, be more conservative
61
- "github-copilot/claude-haiku-4.5": 90000,
62
- // GPT/Gemini: assume similar 200k+ windows
63
- "github-copilot/gpt-5.4": 110000,
64
- "github-copilot/gpt-5.3-codex": 110000,
65
- "github-copilot/gemini-3.1-pro-preview": 110000
66
- },
49
+ "maxContextLimit": "75%",
67
50
  // Soft lower threshold: below this, turn/iteration reminders are off
68
- // Use numeric values — same reason as maxContextLimit above
69
- "minContextLimit": 50000,
70
- // Per-model override for minContextLimit (takes priority over global)
71
- "modelMinLimits": {
72
- "github-copilot/claude-opus-4.6": 65000,
73
- "github-copilot/claude-opus-4.5": 65000,
74
- "github-copilot/claude-sonnet-4.6": 65000,
75
- "github-copilot/claude-sonnet-4.5": 65000,
76
- "github-copilot/claude-sonnet-4": 65000,
77
- "github-copilot/claude-haiku-4.5": 50000,
78
- "github-copilot/gpt-5.4": 65000,
79
- "github-copilot/gpt-5.3-codex": 65000,
80
- "github-copilot/gemini-3.1-pro-preview": 65000
81
- },
51
+ "minContextLimit": "30%",
82
52
  // How often context-limit nudge fires above maxContextLimit (1 = every fetch)
83
53
  "nudgeFrequency": 5,
84
54
  // Messages since last user message before adding compression reminders
@@ -87,11 +57,13 @@
87
57
  "nudgeForce": "soft",
88
58
  // Keep user messages compressible to avoid permanent context growth
89
59
  "protectUserMessages": false,
90
- // Auto-protected by DCP: task, skill, todowrite, todoread, compress, batch, plan_enter, plan_exit, write, edit
60
+ // v3.1.11+: preserve text wrapped in <protect>...</protect> during compression
61
+ "protectTags": false,
62
+ // Auto-protected by DCP: task, skill, todowrite, todoread, compress, batch,
63
+ // plan_enter, plan_exit, write, edit
91
64
  // Only list ADDITIONAL tools whose outputs should be appended to compression summaries
92
- "protectedTools": ["observation", "memory-*", "tilth_*"]
65
+ "protectedTools": ["observation", "memory-*"]
93
66
  },
94
- // Experimental features
95
67
  "experimental": {
96
68
  // Allow DCP processing in subagent sessions (default: false)
97
69
  "allowSubAgents": false,
@@ -30,8 +30,7 @@ updated: 2025-01-06
30
30
  ## Editing Tool Preferences
31
31
 
32
32
  - **Primary**: `edit` tool (str_replace) and `patch` tool
33
- - **Secondary/Fallback**: `tilth_tilth_edit` (hash-anchored edits)only when str_replace fails
34
- - **Reading/Search**: `tilth_tilth_read` and `tilth_tilth_search` are fine to use freely
33
+ - **Reading/Search**: `srcwalk` CLI via bash `srcwalk find <symbol>`, `srcwalk <file>`, `srcwalk map`
35
34
 
36
35
  ## Rules to Always Follow
37
36