@fodx/codelens 2.4.1 → 2.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +139 -0
- package/adapters/pi/codelens.extension.ts +17 -21
- package/build/src/cli.js +199 -4
- package/build/src/cli.js.map +1 -1
- package/build/src/eval/baseline.js +90 -0
- package/build/src/eval/baseline.js.map +1 -0
- package/build/src/eval/evaluator.js +720 -0
- package/build/src/eval/evaluator.js.map +1 -0
- package/build/src/eval/report.js +268 -0
- package/build/src/eval/report.js.map +1 -0
- package/build/src/eval/task-file.js +130 -0
- package/build/src/eval/task-file.js.map +1 -0
- package/build/src/eval/tasks.js +203 -0
- package/build/src/eval/tasks.js.map +1 -0
- package/build/src/eval/types.js +2 -0
- package/build/src/eval/types.js.map +1 -0
- package/build/src/installer/agents.js +25 -18
- package/build/src/installer/agents.js.map +1 -1
- package/build/src/server.js +1 -1
- package/build/src/server.js.map +1 -1
- package/build/src/tools/search.js +1 -1
- package/build/src/tools/search.js.map +1 -1
- package/docs/agent-guide.md +12 -5
- package/docs/routing.md +27 -24
- package/package.json +1 -1
package/docs/routing.md
CHANGED
|
@@ -5,27 +5,30 @@
|
|
|
5
5
|
|
|
6
6
|
## When to use codelens tools
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
lean and are branch-scoped.
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
8
|
+
Use the codelens tools for code **discovery** before broad raw searches or bulk
|
|
9
|
+
file reads. They keep the context window lean and are branch-scoped. Choose the
|
|
10
|
+
tool by intent:
|
|
11
|
+
|
|
12
|
+
1. Unknown area, conceptual question, execution flow, or unfamiliar subsystem:
|
|
13
|
+
start with `cl_explore` for grouped previews plus relationships.
|
|
14
|
+
2. Find a symbol, behavior, or likely implementation location: use ranked hybrid
|
|
15
|
+
`cl_search` for compact handles.
|
|
16
|
+
3. Find callers, importers, tests, or dependencies of a known file: use
|
|
17
|
+
`cl_related`.
|
|
18
|
+
4. Assess blast radius before changing shared code: use `cl_impact`. Pass
|
|
19
|
+
`symbol` + `path` when both are known; pass `path` alone for module/file
|
|
20
|
+
impact when the symbol is uncertain.
|
|
21
|
+
5. Get a cheap structural outline without reading whole files: use `cl_map`.
|
|
22
|
+
6. Read exact current content after choosing a target: use `cl_expand` or a raw
|
|
23
|
+
read. Persist important context across compaction with `cl_save`/`cl_load`.
|
|
24
|
+
|
|
25
|
+
Call `cl_current` when index readiness is uncertain. Installed MCP configs
|
|
26
|
+
background-index missing branches; if `status` is `indexing`, wait or retry and
|
|
27
|
+
use `indexingStartedAt`/`indexingAgeMs` to judge whether it looks stuck. If
|
|
28
|
+
`status` remains `missing`, call `cl_refresh` explicitly.
|
|
29
|
+
|
|
30
|
+
If a query result has `stale:true` or `freshness:"partial"`, read that file from
|
|
31
|
+
disk before relying on indexed snippets/edges.
|
|
29
32
|
|
|
30
33
|
If `cl_current.inGitRepo` is false or `repo` points outside the current
|
|
31
34
|
workspace, CodeLens is not attached to this workspace. Tell the user to restart
|
|
@@ -41,9 +44,9 @@ not silently fall back to raw `find`/`grep` for discovery.
|
|
|
41
44
|
- you're **verifying** exact code, logs, or user-supplied paths
|
|
42
45
|
- the user explicitly asks for raw command output
|
|
43
46
|
|
|
44
|
-
The routing is about **discovery**, not a ban on raw reads.
|
|
45
|
-
|
|
46
|
-
|
|
47
|
+
The routing is about **discovery**, not a ban on raw reads. Do not start with
|
|
48
|
+
broad `grep`, `find`, or bulk `read` when the target is unknown or the question
|
|
49
|
+
concerns relationships. Do not force codelens for a known exact lookup either.
|
|
47
50
|
|
|
48
51
|
## Branch safety
|
|
49
52
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fodx/codelens",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.5.1",
|
|
4
4
|
"description": "Local, branch-aware code search & relation graph. SQLite FTS5 + tree-sitter symbols + source-graph edges, exposed as an MCP server and CLI. No chat LLM required.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|