opencodekit 0.21.9 → 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.
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.9";
23
+ var version = "0.21.10";
24
24
 
25
25
  //#endregion
26
26
  //#region src/utils/license.ts
@@ -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
 
@@ -1,9 +1,10 @@
1
1
  {
2
2
  "$schema": "https://opencode.ai/config.json",
3
+ "lsp": true,
3
4
  "agent": {
4
5
  "build": {
5
6
  "description": "Primary development agent with full codebase access",
6
- "model": "github-copilot/gpt-5.5"
7
+ "model": "github-copilot/gpt-5.4"
7
8
  },
8
9
  "compaction": {
9
10
  "description": "Session summarizer for context continuity across compactions"
@@ -39,8 +40,8 @@
39
40
  },
40
41
  "autoupdate": false,
41
42
  "compaction": {
42
- "auto": false,
43
- "reserved": 16000
43
+ "auto": true,
44
+ "reserved": 2048
44
45
  },
45
46
  "formatter": {
46
47
  "biome": {
@@ -61,25 +62,6 @@
61
62
  "laravel-pint": {
62
63
  "command": ["npx", "laravel-pint", "--preset", "psr12", "$FILE"],
63
64
  "extensions": [".php"]
64
- },
65
- "oxfmt": {
66
- "command": ["npx", "oxfmt", "--write", "$FILE"],
67
- "extensions": [
68
- ".js",
69
- ".jsx",
70
- ".ts",
71
- ".tsx",
72
- ".json",
73
- ".jsonc",
74
- ".html",
75
- ".css",
76
- ".scss",
77
- ".sass",
78
- ".md",
79
- ".mdx",
80
- ".yaml",
81
- ".yml"
82
- ]
83
65
  }
84
66
  },
85
67
  "instructions": [
@@ -90,6 +72,9 @@
90
72
  ],
91
73
  "keybinds": {
92
74
  "leader": "ctrl+x",
75
+ "session_child_first": "<leader>down",
76
+ "session_child_cycle": "right",
77
+ "session_child_cycle_reverse": "left",
93
78
  "session_parent": "up"
94
79
  },
95
80
  "mcp": {
@@ -99,15 +84,6 @@
99
84
  "timeout": 120000,
100
85
  "type": "local"
101
86
  },
102
- "tilth": {
103
- "command": ["npx", "-y", "tilth", "--mcp", "--edit"],
104
- "enabled": true,
105
- "environment": {
106
- "TILTH_THREADS": "8"
107
- },
108
- "timeout": 120000,
109
- "type": "local"
110
- },
111
87
  "webclaw": {
112
88
  "command": ["webclaw-mcp"],
113
89
  "enabled": true,
@@ -115,7 +91,7 @@
115
91
  "type": "local"
116
92
  }
117
93
  },
118
- "model": "github-copilot/gpt-5.5",
94
+ "model": "github-copilot/gpt-5.4",
119
95
  "permission": {
120
96
  "bash": {
121
97
  "*": "allow",
@@ -197,11 +173,11 @@
197
173
  }
198
174
  }
199
175
  },
200
- "claude-opus-4.5": {
176
+ "claude-opus-4.7": {
201
177
  "attachment": true,
202
178
  "limit": {
203
179
  "context": 216000,
204
- "output": 32000
180
+ "output": 64000
205
181
  },
206
182
  "options": {
207
183
  "reasoningEffort": "medium"
@@ -210,16 +186,6 @@
210
186
  "temperature": true,
211
187
  "tool_call": true,
212
188
  "variants": {
213
- "high": {
214
- "options": {
215
- "reasoningEffort": "high"
216
- }
217
- },
218
- "low": {
219
- "options": {
220
- "reasoningEffort": "low"
221
- }
222
- },
223
189
  "medium": {
224
190
  "options": {
225
191
  "reasoningEffort": "medium"
@@ -257,36 +223,6 @@
257
223
  }
258
224
  }
259
225
  },
260
- "claude-sonnet-4.5": {
261
- "attachment": true,
262
- "limit": {
263
- "context": 216000,
264
- "output": 32000
265
- },
266
- "options": {
267
- "reasoningEffort": "medium"
268
- },
269
- "reasoning": true,
270
- "temperature": true,
271
- "tool_call": true,
272
- "variants": {
273
- "high": {
274
- "options": {
275
- "reasoningEffort": "high"
276
- }
277
- },
278
- "low": {
279
- "options": {
280
- "reasoningEffort": "low"
281
- }
282
- },
283
- "medium": {
284
- "options": {
285
- "reasoningEffort": "medium"
286
- }
287
- }
288
- }
289
- },
290
226
  "claude-sonnet-4.6": {
291
227
  "attachment": true,
292
228
  "limit": {
@@ -317,16 +253,6 @@
317
253
  }
318
254
  }
319
255
  },
320
- "gemini-2.5-pro": {
321
- "attachment": true,
322
- "limit": {
323
- "context": 173000,
324
- "output": 64000
325
- },
326
- "reasoning": true,
327
- "temperature": true,
328
- "tool_call": true
329
- },
330
256
  "gemini-3-flash-preview": {
331
257
  "attachment": true,
332
258
  "limit": {
@@ -357,82 +283,6 @@
357
283
  "temperature": true,
358
284
  "tool_call": true
359
285
  },
360
- "gpt-5.2": {
361
- "attachment": true,
362
- "limit": {
363
- "context": 192000,
364
- "output": 128000
365
- },
366
- "options": {
367
- "reasoningEffort": "medium",
368
- "reasoningSummary": "auto",
369
- "textVerbosity": "medium"
370
- },
371
- "reasoning": true,
372
- "temperature": true,
373
- "tool_call": true,
374
- "variants": {
375
- "xhigh": {
376
- "include": ["reasoning.encrypted_content"],
377
- "reasoningEffort": "xhigh",
378
- "reasoningSummary": "auto"
379
- },
380
- "high": {
381
- "include": ["reasoning.encrypted_content"],
382
- "reasoningEffort": "high",
383
- "reasoningSummary": "auto"
384
- },
385
- "low": {
386
- "reasoningEffort": "low",
387
- "reasoningSummary": "auto"
388
- },
389
- "medium": {
390
- "reasoningEffort": "medium",
391
- "reasoningSummary": "auto"
392
- }
393
- }
394
- },
395
- "gpt-5.2-codex": {
396
- "attachment": true,
397
- "limit": {
398
- "context": 400000,
399
- "input": 400000,
400
- "output": 128000
401
- },
402
- "options": {
403
- "reasoningEffort": "medium",
404
- "reasoningSummary": "auto",
405
- "textVerbosity": "medium"
406
- },
407
- "reasoning": true,
408
- "temperature": true,
409
- "tool_call": true,
410
- "variants": {
411
- "fast": {
412
- "disabled": true
413
- },
414
- "xhigh": {
415
- "include": ["reasoning.encrypted_content"],
416
- "reasoningEffort": "xhigh",
417
- "reasoningSummary": "auto"
418
- },
419
- "high": {
420
- "include": ["reasoning.encrypted_content"],
421
- "reasoningEffort": "high",
422
- "reasoningSummary": "auto",
423
- "textVerbosity": "medium"
424
- },
425
- "low": {
426
- "reasoningEffort": "low",
427
- "reasoningSummary": "auto"
428
- },
429
- "medium": {
430
- "reasoningEffort": "medium",
431
- "reasoningSummary": "auto",
432
- "textVerbosity": "medium"
433
- }
434
- }
435
- },
436
286
  "gpt-5.3-codex": {
437
287
  "attachment": true,
438
288
  "limit": {
@@ -595,120 +445,12 @@
595
445
  "reasoningSummary": "auto"
596
446
  }
597
447
  }
598
- },
599
- "grok-code-fast": {
600
- "attachment": true,
601
- "limit": {
602
- "context": 173000,
603
- "output": 64000
604
- },
605
- "reasoning": true,
606
- "temperature": true,
607
- "tool_call": true
608
- },
609
- "grok-code-fast-1": {
610
- "attachment": true,
611
- "limit": {
612
- "context": 173000,
613
- "output": 64000
614
- },
615
- "reasoning": true,
616
- "temperature": true,
617
- "tool_call": true
618
- },
619
- "minimax-m2.5": {
620
- "attachment": true,
621
- "limit": {
622
- "context": 204800,
623
- "output": 16384
624
- },
625
- "options": {
626
- "temperature": 1,
627
- "top_k": 40,
628
- "top_p": 0.95
629
- },
630
- "reasoning": true,
631
- "temperature": true,
632
- "tool_call": true
633
448
  }
634
449
  },
635
450
  "options": {
636
451
  "timeout": 600000
637
452
  }
638
453
  },
639
- "kimi-for-coding": {
640
- "models": {
641
- "k2p5": {
642
- "limit": {
643
- "context": 262144,
644
- "output": 32768
645
- },
646
- "options": {
647
- "interleaved": {
648
- "field": "reasoning_content"
649
- },
650
- "thinking": {
651
- "budgetTokens": 8192,
652
- "reasoning_effort": "high",
653
- "type": "enabled"
654
- }
655
- },
656
- "reasoning": true,
657
- "temperature": true,
658
- "tool_call": true,
659
- "variants": {
660
- "high": {
661
- "interleaved": {
662
- "field": "reasoning_content"
663
- },
664
- "options": {
665
- "reasoning_effort": "high",
666
- "thinkingBudget": 16384,
667
- "type": "enabled"
668
- }
669
- },
670
- "max": {
671
- "interleaved": {
672
- "field": "reasoning_content"
673
- },
674
- "options": {
675
- "reasoning_effort": "high",
676
- "thinkingBudget": 32768,
677
- "type": "enabled"
678
- }
679
- }
680
- }
681
- }
682
- }
683
- },
684
- "modal": {
685
- "models": {
686
- "zai-org/GLM-5-FP8": {
687
- "modalities": {
688
- "input": ["text", "image", "pdf"],
689
- "output": ["text"]
690
- },
691
- "name": "GLM-5",
692
- "options": {
693
- "maxOutputTokens": 131072,
694
- "reasoningEffort": "high",
695
- "reasoningSummary": "true",
696
- "temperature": 1,
697
- "thinking": {
698
- "type": "enabled"
699
- },
700
- "top_k": 40,
701
- "top_p": 0.95
702
- },
703
- "reasoning": true
704
- }
705
- },
706
- "name": "Modal",
707
- "options": {
708
- "apiKey": "{env:MODAL_API_KEY}",
709
- "baseURL": "https://api.us-west-2.modal.direct/v1"
710
- }
711
- },
712
454
  "openai": {
713
455
  "models": {
714
456
  "gpt-5.2": {
@@ -816,19 +558,6 @@
816
558
  }
817
559
  }
818
560
  },
819
- "opencode": {
820
- "models": {
821
- "big-pickle": {
822
- "options": {
823
- "reasoningEffort": "high",
824
- "temperature": 1,
825
- "top_k": 40,
826
- "top_p": 0.95
827
- },
828
- "reasoning": true
829
- }
830
- }
831
- },
832
561
  "proxypal": {
833
562
  "models": {
834
563
  "claude-opus-4.6": {
@@ -1080,57 +809,6 @@
1080
809
  "baseURL": "http://127.0.0.1:8317/v1",
1081
810
  "includeUsage": true
1082
811
  }
1083
- },
1084
- "zai-coding-plan": {
1085
- "models": {
1086
- "glm-4.6": {
1087
- "limit": {
1088
- "context": 128000,
1089
- "output": 16384
1090
- },
1091
- "options": {
1092
- "temperature": 1,
1093
- "thinking": {
1094
- "type": "enabled"
1095
- }
1096
- },
1097
- "reasoning": true,
1098
- "temperature": true,
1099
- "tool_call": true
1100
- },
1101
- "glm-4.7": {
1102
- "id": "glm-4.7",
1103
- "interleaved": true,
1104
- "limit": {
1105
- "context": 200000,
1106
- "output": 128000
1107
- },
1108
- "name": "GLM-4.7",
1109
- "options": {
1110
- "temperature": 1,
1111
- "thinking": {
1112
- "type": "enabled"
1113
- }
1114
- },
1115
- "reasoning": true
1116
- },
1117
- "glm-5": {
1118
- "name": "GLM-5",
1119
- "options": {
1120
- "maxOutputTokens": 131072,
1121
- "reasoningEffort": "high",
1122
- "reasoningSummary": "true",
1123
- "temperature": 1,
1124
- "thinking": {
1125
- "type": "enabled"
1126
- },
1127
- "top_k": 40,
1128
- "top_p": 0.95
1129
- },
1130
- "reasoning": true
1131
- }
1132
- },
1133
- "name": "Z.AI Coding Plan"
1134
812
  }
1135
813
  },
1136
814
  "share": "manual",
@@ -124,7 +124,7 @@ A single run can be lucky. For a skill you're seriously evaluating:
124
124
  | Anti-pattern avoidance | `grep` for the banned pattern → expect 0 |
125
125
  | Required output shape | JSON schema validation, presence of required sections |
126
126
  | Code correctness | run the code, run its tests, check exit code |
127
- | Behavior change | call site count via `tilth_search`, file existence, line counts |
127
+ | Behavior change | call site count via `srcwalk callers`, file existence, line counts |
128
128
  | UI / visual | Playwright screenshot + pixel diff against expected, or DOM query |
129
129
  | Refusal / safety | grep for forbidden phrases or correct refusal pattern |
130
130
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: code-search-patterns
3
- description: Use when navigating unfamiliar code with search-first patterns, combining built-in/LSP navigation with tilth MCP (main agent) and tilth CLI (subagents)
3
+ description: Use when navigating unfamiliar code with search-first patterns, combining built-in/LSP navigation with srcwalk CLI
4
4
  version: 1.0.0
5
5
  tags: [workflow, code-quality, context, subagent]
6
6
  dependencies: []
@@ -8,10 +8,10 @@ dependencies: []
8
8
 
9
9
  # Code Search Patterns
10
10
 
11
- Unified navigation skill for fast, low-waste code understanding across both execution modes:
11
+ Unified navigation skill for fast, low-waste code understanding:
12
12
 
13
- - **Main agent**: built-in tools + LSP + tilth MCP
14
- - **Subagents**: Bash + `npx -y tilth` CLI
13
+ - **Main agent**: built-in tools + LSP + srcwalk CLI
14
+ - **Subagents**: Bash + `srcwalk` CLI
15
15
 
16
16
  This skill merges practical navigation heuristics with concrete tool usage so you can locate behavior, trace impact, and edit safely with fewer calls.
17
17
 
@@ -42,7 +42,7 @@ Start with symbol/content search to find exact locations, then read only the nee
42
42
  - **Good**: `search -> targeted read`
43
43
  - **Avoid**: `read many files -> search later`
44
44
 
45
- Use LSP (`findReferences`, `outgoingCalls`) or tilth search first; read deep only after narrowing scope.
45
+ Use LSP (`findReferences`, `outgoingCalls`) or srcwalk search first; read deep only after narrowing scope.
46
46
 
47
47
  ### 2) Multi-Symbol Search
48
48
 
@@ -65,7 +65,7 @@ Re-read only when you need:
65
65
  Before renaming/removing/changing signatures, inspect downstream impact first.
66
66
 
67
67
  - LSP: `findReferences`, `incomingCalls`
68
- - tilth: `tilth_tilth_deps` or `--deps`
68
+ - srcwalk: `srcwalk impact <symbol>` or `srcwalk callers <symbol>`
69
69
 
70
70
  Then apply edits from dependents inward.
71
71
 
@@ -74,7 +74,7 @@ Then apply edits from dependents inward.
74
74
  Prefer nearby package/module scope first.
75
75
 
76
76
  - built-in search: constrain `path`
77
- - tilth: pass `scope` / `context`
77
+ - srcwalk: pass `--scope <dir>` to restrict the scan area
78
78
 
79
79
  Locality reduces irrelevant matches and token churn.
80
80
 
@@ -83,7 +83,7 @@ Locality reduces irrelevant matches and token churn.
83
83
  For large files, inspect structure first (symbols/outline), then read only target sections.
84
84
 
85
85
  - LSP: `documentSymbol`
86
- - tilth read: smart outline by default, then section drill-in
86
+ - srcwalk read: smart outline by default, then section drill-in
87
87
 
88
88
  ### 7) Follow Call Chain, Not File Tree
89
89
 
@@ -91,34 +91,18 @@ Start at entry behavior and walk calls (`definition -> outgoing -> next definiti
91
91
 
92
92
  This exposes real execution flow with fewer reads.
93
93
 
94
- ## tilth MCP (Main Agent)
94
+ ## srcwalk CLI
95
95
 
96
- Use MCP variants when available in the main agent session:
97
-
98
- - `tilth_tilth_search`
99
- - `tilth_tilth_read`
100
- - `tilth_tilth_files`
101
- - `tilth_tilth_deps`
102
-
103
- ### Built-in/LSP vs tilth MCP (when to choose which)
104
-
105
- | Need | Built-in / LSP | Prefer tilth MCP when | Why tilth helps |
106
- | ----------------------- | -------------------------------------- | ----------------------------------------------------------- | ----------------------------------- |
107
- | Find symbols/usages | `grep` / `lsp.findReferences` | You want definitions + usages + expanded source in one call | Reduces search+read round trips |
108
- | Read file content | `read` | File is large or you only need structure first | Smart outline + section targeting |
109
- | List candidate files | `glob` | You want quick glob results with token-aware relevance | Faster triage for large directories |
110
- | Pre-change impact check | `lsp.incomingCalls` + manual follow-up | You need import + dependent view before breaking change | Single blast-radius view via deps |
111
-
112
- Guideline: if tilth MCP is active, use it as default for navigation; fall back to built-in/LSP when you need language-server-specific semantics or exact editor-position operations.
113
-
114
- ## tilth CLI (Subagents)
115
-
116
- ### Why this exists
117
-
118
- Subagents typically cannot call MCP tools directly. They can still use tilth through Bash:
96
+ `srcwalk` is available to all agents (main agent and subagents) via Bash. It combines grep + tree-sitter AST into one CLI tool.
119
97
 
120
98
  ```bash
121
- npx -y tilth <query> [flags]
99
+ srcwalk guide # Print agent routing policy (run once per session)
100
+ srcwalk find <symbol> # Symbol search (definitions + usages)
101
+ srcwalk <file> # Smart file read (outline for large files)
102
+ srcwalk map # Codebase structural overview
103
+ srcwalk files '<glob>' # Find files by pattern
104
+ srcwalk callers <sym> # Reverse call graph
105
+ srcwalk impact <sym> # Blast-radius heuristic
122
106
  ```
123
107
 
124
108
  ### Auto-detection
@@ -127,103 +111,90 @@ npx -y tilth <query> [flags]
127
111
  | --------------------------------- | ------------------------------------ |
128
112
  | Existing file path (`src/foo.ts`) | Read file (smart outline/full) |
129
113
  | Identifier (`initCommand`) | Symbol search (definitions + usages) |
130
- | Glob (`*.test.ts`) | List files |
131
- | Plain text / phrase | Content search |
132
-
133
- Use `--kind` to force a specific mode when needed.
114
+ | `find <symbol>` | Explicit symbol search |
115
+ | `files <glob>` | File discovery |
134
116
 
135
117
  ### Core operations
136
118
 
137
119
  #### 1) Read file
138
120
 
139
121
  ```bash
140
- npx -y tilth src/index.ts
141
- npx -y tilth src/index.ts --full
142
- npx -y tilth src/index.ts --section 45-89
122
+ srcwalk src/index.ts
123
+ srcwalk src/index.ts --full
124
+ srcwalk src/index.ts --section 45-89
143
125
  ```
144
126
 
145
127
  #### 2) Search symbols
146
128
 
147
129
  ```bash
148
- npx -y tilth initCommand --scope src/
149
- npx -y tilth "initCommand,detectMode" --scope src/
130
+ srcwalk find initCommand --scope src/
131
+ srcwalk find "initCommand,detectMode" --scope src/
150
132
  ```
151
133
 
152
134
  #### 3) Search text/regex
153
135
 
154
136
  ```bash
155
- npx -y tilth --kind content "TODO" --scope src/
156
- npx -y tilth --kind regex "/TODO.*fix/" --scope src/
137
+ srcwalk find "TODO" --scope src/
138
+ srcwalk find "/TODO.*fix/" --scope src/
157
139
  ```
158
140
 
159
141
  #### 4) Find callers
160
142
 
161
143
  ```bash
162
- npx -y tilth --kind callers initCommand --scope src/
144
+ srcwalk callers initCommand --scope src/
163
145
  ```
164
146
 
165
147
  #### 5) List files
166
148
 
167
149
  ```bash
168
- npx -y tilth "*.test.ts" --scope src/
150
+ srcwalk files "*.test.ts" --scope src/
169
151
  ```
170
152
 
171
- #### 6) Blast radius / deps
153
+ #### 6) Blast radius
172
154
 
173
155
  ```bash
174
- npx -y tilth --deps src/commands/init.ts --scope src/
156
+ srcwalk impact initCommand --scope src/
157
+ srcwalk callers initCommand --scope src/
175
158
  ```
176
159
 
177
160
  #### 7) Codebase map
178
161
 
179
162
  ```bash
180
- npx -y tilth --map --scope src/
163
+ srcwalk map --scope src/
181
164
  ```
182
165
 
183
166
  ### Useful flags
184
167
 
185
- | Flag | Purpose | Example |
186
- | ----------------- | ------------------------------ | ---------------------------- | ------------------- | ----------------- | ---------------- |
187
- | `--scope <dir>` | Restrict scan area | `--scope src/commands/` |
188
- | `--section <range | heading>` | Targeted file slice | `--section 120-180` |
189
- | `--full` | Force full file output | `--full` |
190
- | `--budget <n>` | Limit output size | `--budget 2000` |
191
- | `--json` | Machine-readable output | `--json` |
192
- | `--map` | Structural project skeleton | `--map --scope src/` |
193
- | `--kind <symbol | content | regex | callers>` | Force search mode | `--kind callers` |
194
- | `--deps <file>` | Import/dependent blast radius | `--deps src/utils/errors.ts` |
195
- | `--expand <n>` | Expand top matches with source | `--expand 3` |
196
-
197
- ### MCP vs CLI
198
-
199
- | Capability | MCP (main agent) | CLI (subagents) |
200
- | ---------------------------- | -------------------------------------------------- | ------------------------------------------ |
201
- | Access mode | Tool call | Bash command |
202
- | Session dedup/context carry | Yes | No |
203
- | Hash-anchored edit flow | Yes (via MCP edit tools) | No |
204
- | Symbol/content/regex/callers | Yes | Yes |
205
- | Deps/blast-radius | Yes | Yes |
206
- | Codebase map | Limited by toolset | Yes (`--map`) |
207
- | Best for | Interactive main-agent navigation + edit workflows | Subagent discovery/exploration without MCP |
168
+ | Flag | Purpose | Example |
169
+ | ----------------------- | --------------------------------------------- | ----------------------------------- |
170
+ | `--scope <dir>` | Restrict scan area | `--scope src/commands/` |
171
+ | `--section <range\|sym>` | Targeted file slice (line range or symbol) | `--section 120-180`, `--section fn` |
172
+ | `--full` | Force full file output (no outline) | `--full` |
173
+ | `--budget <n>` | Limit output token size | `--budget 2000` |
174
+ | `--json` | Machine-readable output | `--json` |
175
+ | `--filter <qualifiers>` | Filter find results by field:value | `--filter kind:fn` |
176
+ | `--glob <pattern>` | File pattern filter within find | `--glob "*.ts"` |
177
+ | `--expand[=<n>]` | Inline source for top N matches | `--expand 3` |
178
+ | `--depth <n>` | Depth for callers/callees traversal | `--depth 2` |
208
179
 
209
180
  ### Example subagent dispatch
210
181
 
211
182
  ```ts
212
183
  task({
213
184
  subagent_type: "general",
214
- prompt: `Use tilth CLI via Bash for navigation.
185
+ prompt: `Use srcwalk via Bash for navigation.
215
186
 
216
187
  1) Locate symbol and usages:
217
- npx -y tilth initCommand --scope src/
188
+ srcwalk find initCommand --scope src/
218
189
 
219
190
  2) Find callers:
220
- npx -y tilth --kind callers initCommand --scope src/
191
+ srcwalk callers initCommand --scope src/
221
192
 
222
193
  3) Check blast radius before edits:
223
- npx -y tilth --deps src/commands/init.ts --scope src/
194
+ srcwalk impact initCommand --scope src/
224
195
 
225
196
  4) Read only the relevant section:
226
- npx -y tilth src/commands/init.ts --section 500-620
197
+ srcwalk src/commands/init.ts --section 500-620
227
198
 
228
199
  Then implement the requested change with minimal file edits.`,
229
200
  });
@@ -249,5 +220,5 @@ Target heuristic: understand a symbol and its direct impact in **≤3 calls** wh
249
220
  | Serially tracing one function at a time | Multi-symbol search + callers/deps |
250
221
  | Ignoring blast radius before API/signature edits | Run references/incoming/deps first |
251
222
  | Unscoped repository-wide search | Use `path`/`--scope` to localize |
252
- | Using CLI defaults when mode is ambiguous | Force with `--kind` |
223
+ | Using CLI defaults when mode is ambiguous | Use explicit subcommand (`find`, `files`, `callers`) or `--filter kind:<label>` |
253
224
  | Overusing `--full` on large files | Outline first, then `--section` |
@@ -21,9 +21,9 @@ dependencies: []
21
21
 
22
22
  ### 1. Verify Templates
23
23
 
24
- ```typescript
25
- tilth_tilth_files({ pattern: "*.md", scope: ".opencode/memory/_templates" });
26
- // Required templates: project.md, roadmap.md, state.md
24
+ ```bash
25
+ srcwalk files "*.md" --scope .opencode/memory/_templates
26
+ # Required templates: project.md, roadmap.md, state.md
27
27
  ```
28
28
 
29
29
  Stop if missing.
@@ -62,8 +62,8 @@ Skip if `--skip-questions` flag set.
62
62
 
63
63
  ### 4. Verify
64
64
 
65
- ```typescript
66
- tilth_tilth_files({ pattern: "*.md", scope: ".opencode/memory/project" });
65
+ ```bash
66
+ srcwalk files "*.md" --scope .opencode/memory/project
67
67
  ```
68
68
 
69
69
  Report created files with their injection status (auto-injected vs on-demand).
@@ -22,7 +22,7 @@ Core rule: **opt in explicitly, verify rewrites, preserve raw evidence when corr
22
22
 
23
23
  ## When NOT to Use
24
24
 
25
- - Code inspection or editing: prefer `tilth_tilth_read`, `tilth_tilth_search`, LSP, Read, Grep, and Edit.
25
+ - Code inspection or editing: prefer `srcwalk find`/`srcwalk <path>`, LSP, Read, Grep, and Edit.
26
26
  - Full verification evidence is required and compressed summaries would hide diagnostics.
27
27
  - The user has not approved installing binaries, changing global OpenCode config, or adding plugins.
28
28
 
@@ -28,7 +28,7 @@ WHEN: Looking up library APIs, checking function signatures, finding usage examp
28
28
  SKIP: Searching your own codebase (use grep/LSP), general web research (use websearch).
29
29
 
30
30
  Common mistakes:
31
- - DON'T search for internal project code (use grep/tilth instead)
31
+ - DON'T search for internal project code (use grep/srcwalk instead)
32
32
  - DON'T guess library versions — always resolve first, then query
33
33
  - DON'T use for general web research (use websearch instead)
34
34
 
@@ -18,7 +18,7 @@ export default tool({
18
18
  description: `Search real-world code examples from GitHub repositories via grep.app. Replaces asking "how do others use X?" — use this for finding production patterns and real-world API usage.
19
19
 
20
20
  WHEN: Implementing unfamiliar APIs, looking for production patterns, understanding library integrations.
21
- SKIP: Searching your own codebase (use grep/tilth), looking up docs (use context7), general research (use websearch).
21
+ SKIP: Searching your own codebase (use grep/srcwalk), looking up docs (use context7), general research (use websearch).
22
22
 
23
23
  Common mistakes:
24
24
  - DON'T search for keywords like "react tutorial" — search for literal code: "useState("
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencodekit",
3
- "version": "0.21.9",
3
+ "version": "0.21.10",
4
4
  "description": "CLI tool for bootstrapping and managing OpenCodeKit projects",
5
5
  "keywords": [
6
6
  "agents",