grepmax 0.26.7 → 0.26.8

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.
@@ -10,7 +10,7 @@
10
10
  "name": "grepmax",
11
11
  "source": "./plugins/grepmax",
12
12
  "description": "Semantic code search for Claude Code. Automatically indexes your project and provides intelligent search capabilities.",
13
- "version": "0.26.7",
13
+ "version": "0.26.8",
14
14
  "author": {
15
15
  "name": "Robert Owens",
16
16
  "email": "robowens@me.com"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "grepmax",
3
- "version": "0.26.7",
3
+ "version": "0.26.8",
4
4
  "author": "Robert Owens <78518764+reowens@users.noreply.github.com>",
5
5
  "homepage": "https://github.com/reowens/grepmax",
6
6
  "bugs": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "grepmax",
3
- "version": "0.26.7",
3
+ "version": "0.26.8",
4
4
  "description": "Semantic code search for Claude Code. Automatically indexes your project and provides intelligent search capabilities.",
5
5
  "author": {
6
6
  "name": "Robert Owens",
@@ -49,11 +49,26 @@ gmax skeleton src/lib/auth.ts
49
49
  gmax project
50
50
  ```
51
51
 
52
+ **Dependency shape** — god nodes, hub files, cycles, dead candidates in one pass:
53
+ ```
54
+ gmax audit --agent --top 10
55
+ ```
56
+ Start here for "explain this codebase" and "what's central here" questions. Rows are
57
+ `god <symbol> <path:line> <refs> <chunks>`, `hub <file> <refs> <deps>`, `cycle <files> <n>`,
58
+ `dead <symbol> <path:line>`. Dead candidates are hypotheses — dynamic dispatch and reflection
59
+ are invisible to the static graph.
60
+
52
61
  **Related files** — dependencies and dependents:
53
62
  ```
54
63
  gmax related src/lib/auth.ts
55
64
  ```
56
65
 
66
+ **Blast radius / test coverage** — before reporting on the risk of a change:
67
+ ```
68
+ gmax impact handleAuth --agent # dependents + affected tests
69
+ gmax test handleAuth --agent # tests exercising the symbol
70
+ ```
71
+
57
72
  ### Secondary: Standard tools
58
73
 
59
74
  - `Grep` — for exact string matches (identifiers, error codes, imports)
@@ -62,13 +77,18 @@ gmax related src/lib/auth.ts
62
77
 
63
78
  ## Strategy
64
79
 
80
+ 0. **Never start a local model.** `gmax investigate`, `review`, `summarize`, and `llm start` load a
81
+ multi-GB LLM and can stall the machine. They are not part of your toolkit — the index answers
82
+ these questions without them.
65
83
  1. **Start semantic** — use `gmax "query" --agent` first. Be specific (5+ words).
66
84
  2. **Peek before reading** — `gmax peek <symbol>` gives you signature + context in one call. Only `Read` the file if you need more.
67
85
  3. **Skeleton before reading** — `gmax skeleton <path>` before reading large files.
68
86
  4. **Trace for flow** — `gmax trace <symbol>` to understand call chains.
69
87
  5. **Use `--role ORCHESTRATION`** to skip type definitions and find actual logic.
70
88
  6. **Use `--agent` on everything** — compact output saves tokens.
71
- 7. **Parallelize** — fire multiple gmax/grep/read calls in parallel when independent.
89
+ 7. **Scope big repos** — `--in <subpath>` / `--exclude <subpath>` (repeatable) on audit, dead, log,
90
+ surprises, and search.
91
+ 8. **Parallelize** — fire multiple gmax/grep/read calls in parallel when independent.
72
92
 
73
93
  ## If gmax search returns nothing
74
94
 
@@ -9,6 +9,7 @@ allowed-tools: "Bash(gmax:*), Read"
9
9
  - **Know the exact string/symbol?** → `Grep` tool (fastest, zero overhead)
10
10
  - **Know the file already?** → `Read` tool directly
11
11
  - **Searching by concept/behavior?** → `Bash(gmax "query" --agent)` (semantic search)
12
+ - **New to the codebase?** → `Bash(gmax audit --agent)` (god nodes, hubs, cycles in one pass)
12
13
  - **Need full function body?** → `Bash(gmax extract <symbol>)` (complete source with line numbers)
13
14
  - **Quick symbol overview?** → `Bash(gmax peek <symbol>)` (signature + callers + callees)
14
15
  - **Need file structure?** → `Bash(gmax skeleton <path>)`
@@ -186,6 +187,25 @@ gmax dead handleAuth --in src/ # restrict to a sub-path
186
187
  ```
187
188
  Status is `DEAD` (no callers, not exported), `PUBLIC EXPORT` (no internal callers but the defining chunk is exported — check external usage), or `LIVE` (with caller count + top-3 file:line). The call graph reflects what tree-sitter chunked: dynamic dispatch, reflection, eval, and string-built call sites won't show up — `DEAD` is a hypothesis, not a proof.
188
189
 
190
+ ### Audit — `gmax audit`
191
+ ```
192
+ gmax audit # god nodes, hub files, cycles, dead candidates
193
+ gmax audit --agent --top 5 # compact TSV, 5 per category
194
+ gmax audit --in src/ --exclude tests/ # scope to a sub-path
195
+ ```
196
+ One pass over the static reference graph — the fastest way to get the shape of an unfamiliar
197
+ codebase. Agent rows are `god <symbol> <path:line> <refs> <chunks>`, `hub <file> <refs> <deps>`,
198
+ `cycle <comma-separated files> <n>`, `dead <symbol> <path:line>`, plus `scanned`/`dead_total`.
199
+ Dynamic dispatch, reflection, and eval are invisible to it, so dead candidates are hypotheses.
200
+
201
+ ### Surprises — `gmax surprises` (experimental)
202
+ ```
203
+ gmax surprises --agent # embedding-similar file pairs the static graph misses
204
+ gmax surprises --top 10 --min-sim 0.7 # tighten the similarity floor
205
+ ```
206
+ Orientation only — surfaces cross-directory pairs that look related by embedding but share no
207
+ static edge. Useful for spotting duplication or missing abstractions, not for proving anything.
208
+
189
209
  ### Context — `gmax context <topic-or-path> --budget <tokens>`
190
210
  ```
191
211
  gmax context "authentication system" --budget 4000
@@ -195,7 +215,16 @@ gmax context src/lib/auth/ --budget 3000
195
215
  ```
196
216
  Use the path form when you already know the file or directory; it skips semantic search and gives deterministic structure/excerpt context.
197
217
 
198
- ### Investigate — `gmax investigate "question"` (requires LLM)
218
+ ### Investigate — `gmax investigate "question"` (loads a multi-GB local LLM)
219
+
220
+ > **Ask the user first.** `investigate`, `review`, and `summarize` start `llama-server` with a
221
+ > multi-GB local model. On memory-constrained machines that can stall or hang the host. Never run
222
+ > them — or `gmax llm start` — on your own initiative, including "just to check" or as a fallback
223
+ > when search seems insufficient. Run them only when the user asks for that command in the moment.
224
+ >
225
+ > You almost never need them: `gmax context`, `--context-for-llm`, and `trace`/`impact` answer the
226
+ > same questions using the index you already have, with no model load.
227
+
199
228
  ```
200
229
  gmax investigate "how does authentication work?"
201
230
  gmax investigate "what would break if I changed VectorDB?" -v
@@ -210,16 +239,19 @@ gmax status --agent # compact: name\tchunks\tage\tstatus
210
239
  gmax related src/file.ts --agent # compact: dep:/rev: path\tcount
211
240
  gmax project --agent # compact: key\tvalue pairs
212
241
  gmax index # reindex current directory
242
+ gmax help-agent # reprint this cheatsheet in the terminal
213
243
  gmax config # view/change settings
214
244
  gmax doctor # health check
215
245
  gmax doctor --fix # auto-repair (compact, prune, clear stale locks)
216
- gmax llm on/off/start/stop/status # manage local LLM server
246
+ gmax repair --rebuild # last resort: destructive whole-store rebuild
247
+ gmax llm on/off/start/stop/status # local LLM server — see the warning above; ask first
217
248
  ```
218
249
 
219
250
  ## Workflow
220
251
 
221
252
  1. **Add** — `Bash(gmax add)` to register and index a new project
222
- 2. **Explore** — `Bash(gmax project)` for overview of a new codebase
253
+ 2. **Explore** — `Bash(gmax project)` for overview of a new codebase, then
254
+ `Bash(gmax audit --agent)` for the dependency shape (god nodes, hubs, cycles)
223
255
  3. **Search** — `Bash(gmax "query" --agent)` to find code. Add `--symbol` for function/class names.
224
256
  4. **Peek** — `Bash(gmax peek <symbol>)` for a quick overview (signature + callers + callees)
225
257
  5. **Extract** — `Bash(gmax extract <symbol>)` for the full function body with line numbers
@@ -244,6 +276,8 @@ gmax llm on/off/start/stop/status # manage local LLM server
244
276
  - **Use `--skeleton`** when `--agent` results aren't enough — shows file structure for top matches.
245
277
  - **Use `--imports`** when you need to understand a file's dependencies.
246
278
  - **Use `--root <dir>`** to search/trace/query a different project from your current directory.
279
+ - **Scope with `--in <subpath>` / `--exclude <subpath>`** (both repeatable) on `audit`, `surprises`,
280
+ `dead`, `log`, and search — narrows a big repo to the area you care about.
247
281
  - **Don't search for exact strings** — use grep/Grep for that. gmax finds concepts.
248
282
 
249
283
  ## If search fails or returns nothing