You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+12-2Lines changed: 12 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -132,12 +132,13 @@ src/api/checkout.ts:89 (Route handler for /pay)
132
132
| Don't know the function name |`codebase_search`| Semantic search finds by meaning |
133
133
| Exploring unfamiliar codebase |`codebase_search`| Discovers related code across files |
134
134
| Just need to find locations |`codebase_peek`| Returns metadata only, saves ~90% tokens |
135
+
| Need the authoritative definition site |`implementation_lookup`| Prioritizes real implementation definitions over docs/tests |
135
136
| Understand code flow |`call_graph`| Find callers/callees of any function |
136
137
| Know exact identifier |`grep`| Faster, finds all occurrences |
137
138
| Need ALL matches |`grep`| Semantic returns top N only |
138
139
| Mixed discovery + precision |`/find` (hybrid) | Best of both worlds |
139
140
140
-
**Rule of thumb**: `codebase_peek` to find locations → `Read` to examine → `grep` for precision.
141
+
**Rule of thumb**: `codebase_peek` to find locations → `Read` to examine → `grep` for precision. For symbol-definition questions, use `implementation_lookup` first.
141
142
142
143
## 📊 Token Usage
143
144
@@ -296,6 +297,12 @@ The plugin exposes these tools to the OpenCode agent:
296
297
```
297
298
-**Workflow**: `codebase_peek` → find locations → `Read` specific files
298
299
300
+
### `implementation_lookup`
301
+
**Definition-first lookup.** Jumps to the authoritative definition site for a symbol or natural-language definition query.
302
+
-**Use for**: "Where is X defined?", symbol-definition requests, and cases where you want the implementation site rather than all usages.
303
+
-**Behavior**: Prefers real implementation files over tests, docs, examples, and fixtures.
304
+
-**Fallback**: If nothing authoritative is found, use `codebase_search` for broader discovery.
|`rerankTopN`|`20`| Deterministic rerank depth cap. Applies lightweight name/path/chunk-type rerank to top-N only |
602
610
|`contextLines`|`0`| Extra lines to include before/after each match |
611
+
|`routingHints`|`true`| Inject lightweight runtime hints for local conceptual discovery and definition lookups. Set to `false` to disable plugin-side routing nudges. |
603
612
|**reranker**|| Optional second-stage model reranker for the top candidate pool |
|`provider`|`"custom"`| Hosted shortcuts: `cohere`, `jina`, or `custom`|
@@ -621,6 +630,7 @@ String values in `codebase-index.json` can reference environment variables with
621
630
### Retrieval ranking behavior
622
631
623
632
-`codebase_search` and `codebase_peek` use the hybrid path: semantic + keyword retrieval → fusion (`fusionStrategy`) → deterministic rerank (`rerankTopN`) → optional external reranker (`reranker`) → filtering.
633
+
- When `search.routingHints` is enabled (default), the plugin adds tiny per-turn runtime hints for local conceptual discovery and definition queries. Conceptual discovery is nudged toward `codebase_peek` / `codebase_search`, while definition questions are nudged toward `implementation_lookup`. Exact identifier and unrelated operational tasks are left alone.
624
634
-`find_similar` stays semantic-only: semantic retrieval + deterministic rerank only (no keyword retrieval, no RRF).
625
635
- For compatibility rollbacks, set `search.fusionStrategy` to `"weighted"` to use the legacy weighted fusion path.
626
636
- When enabled, the external reranker sees path metadata plus a bounded on-disk code snippet for each candidate so it can distinguish real implementations from docs/tests more reliably.
0 commit comments