pi-shazam 0.1.8 → 0.3.0

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 (131) hide show
  1. package/README.md +86 -191
  2. package/dist/core/cache.d.ts +14 -0
  3. package/dist/core/cache.d.ts.map +1 -1
  4. package/dist/core/cache.js +41 -2
  5. package/dist/core/cache.js.map +1 -1
  6. package/dist/core/filter.d.ts +8 -0
  7. package/dist/core/filter.d.ts.map +1 -1
  8. package/dist/core/filter.js +36 -0
  9. package/dist/core/filter.js.map +1 -1
  10. package/dist/core/graph.d.ts +15 -3
  11. package/dist/core/graph.d.ts.map +1 -1
  12. package/dist/core/graph.js +94 -18
  13. package/dist/core/graph.js.map +1 -1
  14. package/dist/core/output.d.ts +64 -12
  15. package/dist/core/output.d.ts.map +1 -1
  16. package/dist/core/output.js +373 -107
  17. package/dist/core/output.js.map +1 -1
  18. package/dist/core/scanner.d.ts +8 -2
  19. package/dist/core/scanner.d.ts.map +1 -1
  20. package/dist/core/scanner.js +335 -168
  21. package/dist/core/scanner.js.map +1 -1
  22. package/dist/core/treesitter.d.ts.map +1 -1
  23. package/dist/core/treesitter.js +11 -7
  24. package/dist/core/treesitter.js.map +1 -1
  25. package/dist/hooks/shasam-guide.d.ts +11 -0
  26. package/dist/hooks/shasam-guide.d.ts.map +1 -0
  27. package/dist/hooks/shasam-guide.js +41 -0
  28. package/dist/hooks/shasam-guide.js.map +1 -0
  29. package/dist/hooks/tool-logger.d.ts +14 -0
  30. package/dist/hooks/tool-logger.d.ts.map +1 -0
  31. package/dist/hooks/tool-logger.js +116 -0
  32. package/dist/hooks/tool-logger.js.map +1 -0
  33. package/dist/index.d.ts.map +1 -1
  34. package/dist/index.js +7 -11
  35. package/dist/index.js.map +1 -1
  36. package/dist/lsp/client.d.ts +12 -2
  37. package/dist/lsp/client.d.ts.map +1 -1
  38. package/dist/lsp/client.js +172 -32
  39. package/dist/lsp/client.js.map +1 -1
  40. package/dist/lsp/manager.d.ts +1 -1
  41. package/dist/lsp/manager.d.ts.map +1 -1
  42. package/dist/lsp/manager.js +12 -28
  43. package/dist/lsp/manager.js.map +1 -1
  44. package/dist/mcp/entry.d.ts +3 -0
  45. package/dist/mcp/entry.d.ts.map +1 -0
  46. package/dist/mcp/entry.js +32 -0
  47. package/dist/mcp/entry.js.map +1 -0
  48. package/dist/mcp/tools.d.ts +8 -0
  49. package/dist/mcp/tools.d.ts.map +1 -0
  50. package/dist/mcp/tools.js +175 -0
  51. package/dist/mcp/tools.js.map +1 -0
  52. package/dist/tools/_context.d.ts +13 -0
  53. package/dist/tools/_context.d.ts.map +1 -0
  54. package/dist/tools/_context.js +8 -0
  55. package/dist/tools/_context.js.map +1 -0
  56. package/dist/tools/_factory.d.ts +44 -0
  57. package/dist/tools/_factory.d.ts.map +1 -0
  58. package/dist/tools/_factory.js +71 -0
  59. package/dist/tools/_factory.js.map +1 -0
  60. package/dist/tools/call_chain.d.ts.map +1 -1
  61. package/dist/tools/call_chain.js +15 -39
  62. package/dist/tools/call_chain.js.map +1 -1
  63. package/dist/tools/codesearch.d.ts +14 -0
  64. package/dist/tools/codesearch.d.ts.map +1 -1
  65. package/dist/tools/codesearch.js +148 -38
  66. package/dist/tools/codesearch.js.map +1 -1
  67. package/dist/tools/file_detail.d.ts +4 -0
  68. package/dist/tools/file_detail.d.ts.map +1 -1
  69. package/dist/tools/file_detail.js +62 -22
  70. package/dist/tools/file_detail.js.map +1 -1
  71. package/dist/tools/find_tests.d.ts.map +1 -1
  72. package/dist/tools/find_tests.js +37 -52
  73. package/dist/tools/find_tests.js.map +1 -1
  74. package/dist/tools/fix.d.ts.map +1 -1
  75. package/dist/tools/fix.js +13 -36
  76. package/dist/tools/fix.js.map +1 -1
  77. package/dist/tools/hotspots.d.ts.map +1 -1
  78. package/dist/tools/hotspots.js +12 -31
  79. package/dist/tools/hotspots.js.map +1 -1
  80. package/dist/tools/hover.d.ts.map +1 -1
  81. package/dist/tools/hover.js +16 -27
  82. package/dist/tools/hover.js.map +1 -1
  83. package/dist/tools/impact.d.ts.map +1 -1
  84. package/dist/tools/impact.js +17 -31
  85. package/dist/tools/impact.js.map +1 -1
  86. package/dist/tools/lsp_enrich.d.ts +73 -0
  87. package/dist/tools/lsp_enrich.d.ts.map +1 -0
  88. package/dist/tools/lsp_enrich.js +225 -0
  89. package/dist/tools/lsp_enrich.js.map +1 -0
  90. package/dist/tools/overview.d.ts +18 -0
  91. package/dist/tools/overview.d.ts.map +1 -1
  92. package/dist/tools/overview.js +250 -30
  93. package/dist/tools/overview.js.map +1 -1
  94. package/dist/tools/rename_symbol.d.ts.map +1 -1
  95. package/dist/tools/rename_symbol.js +23 -29
  96. package/dist/tools/rename_symbol.js.map +1 -1
  97. package/dist/tools/safe_delete.d.ts.map +1 -1
  98. package/dist/tools/safe_delete.js +21 -39
  99. package/dist/tools/safe_delete.js.map +1 -1
  100. package/dist/tools/symbol.d.ts +28 -1
  101. package/dist/tools/symbol.d.ts.map +1 -1
  102. package/dist/tools/symbol.js +237 -46
  103. package/dist/tools/symbol.js.map +1 -1
  104. package/dist/tools/type_hierarchy.d.ts.map +1 -1
  105. package/dist/tools/type_hierarchy.js +22 -28
  106. package/dist/tools/type_hierarchy.js.map +1 -1
  107. package/dist/tools/verify.d.ts +24 -9
  108. package/dist/tools/verify.d.ts.map +1 -1
  109. package/dist/tools/verify.js +548 -152
  110. package/dist/tools/verify.js.map +1 -1
  111. package/package.json +11 -5
  112. package/dist/core/lsp-global.d.ts +0 -17
  113. package/dist/core/lsp-global.d.ts.map +0 -1
  114. package/dist/core/lsp-global.js +0 -14
  115. package/dist/core/lsp-global.js.map +0 -1
  116. package/dist/tools/check.d.ts +0 -19
  117. package/dist/tools/check.d.ts.map +0 -1
  118. package/dist/tools/check.js +0 -414
  119. package/dist/tools/check.js.map +0 -1
  120. package/dist/tools/ready.d.ts +0 -18
  121. package/dist/tools/ready.d.ts.map +0 -1
  122. package/dist/tools/ready.js +0 -153
  123. package/dist/tools/ready.js.map +0 -1
  124. package/dist/tools/routes.d.ts +0 -11
  125. package/dist/tools/routes.d.ts.map +0 -1
  126. package/dist/tools/routes.js +0 -188
  127. package/dist/tools/routes.js.map +0 -1
  128. package/dist/tools/state_map.d.ts +0 -8
  129. package/dist/tools/state_map.d.ts.map +0 -1
  130. package/dist/tools/state_map.js +0 -122
  131. package/dist/tools/state_map.js.map +0 -1
package/README.md CHANGED
@@ -1,233 +1,128 @@
1
1
  # pi-shazam
2
2
 
3
- > Native codebase awareness extension for the Pi coding agentunified structural analysis and LSP diagnostics as first-class LLM tools.
3
+ > Give your AI agent structural awareness of your codebasebefore it reads a single file.
4
4
 
5
5
  [![npm version](https://img.shields.io/npm/v/pi-shazam)](https://www.npmjs.com/package/pi-shazam)
6
6
  [![CI](https://github.com/gjczone/pi-shazam/actions/workflows/ci.yml/badge.svg)](https://github.com/gjczone/pi-shazam/actions/workflows/ci.yml)
7
7
 
8
- pi-shazam builds a full dependency graph of your codebase — parsing every source file with tree-sitter, extracting symbols and their call/import relationships, ranking them with PageRank, and exposing the results through LLM-callable Pi tools. The agent sees `shazam_overview` and `shazam_codequery` the same way it sees `read` and `bash`.
8
+ ## What It Solves
9
9
 
10
- ## Installation
10
+ AI coding agents start blind. They see a file tree, maybe a README. They don't know which files are the "spine" of the project, what depends on what, or which callers will break when a function signature changes. They guess. Sometimes they guess wrong.
11
11
 
12
- ```bash
13
- pi install npm:pi-shazam
14
- ```
15
-
16
- Or add to `~/.pi/agent/settings.json`:
17
-
18
- ```json
19
- {
20
- "packages": ["npm:pi-shazam@0.1.1"]
21
- }
22
- ```
23
-
24
- > Requires Node.js ≥ 18.
25
-
26
- ## What It Gives the Agent
27
-
28
- ### Before touching any code — `shazam_overview`
29
-
30
- The first thing the agent should call in an unfamiliar repo. One call returns:
31
-
32
- - **Module dependency map** — which directories depend on which
33
- - **Top-10 files by PageRank** — the structural "spine" of the codebase
34
- - **Entry points** — exported symbols with the most incoming references
35
- - **Suggested reading order** — where to start understanding the code
36
- - **Hotspots** — files with the highest complexity and risk
37
-
38
- ### Before editing a symbol — `shazam_codequery` / `shazam_refs` / `shazam_call_chain`
12
+ pi-shazam answers the questions every agent should ask before touching code:
39
13
 
40
- Before renaming, deleting, or changing any function, the agent checks:
14
+ - "What's the structure of this project?" `shazam_overview`
15
+ - "What will break if I change this file?" → `shazam_impact`
16
+ - "Who calls this function?" → `shazam_call_chain`
17
+ - "Did my edit introduce errors?" → `shazam_verify`
41
18
 
42
- | What | Which tool |
43
- |------|-----------|
44
- | Where is it defined? | `shazam_codequery --symbol <name>` |
45
- | What's its signature and visibility? | `shazam_symbol --symbol <name>` |
46
- | Who calls it? | `shazam_refs --symbol <name>` (incoming edges) |
47
- | What does it call? | `shazam_refs --symbol <name>` (outgoing edges) |
48
- | Full call chain? | `shazam_call_chain --symbol <name> --depth 2` |
19
+ Under the hood it parses **every source file** with tree-sitter (18 languages), builds a **full dependency graph** (symbols, imports, calls, references), ranks them with **PageRank**, and optionally enriches results with **LSP diagnostics** (6 languages). The agent gets precise, ranked answers in one call — no grep, no guesswork.
49
20
 
50
- ### Before editing a file — `shazam_file_detail` / `shazam_codequery --file`
21
+ ## Primary: Pi Package
51
22
 
52
- Reading raw source shows syntax; these tools show **structure**. The agent sees every symbol in the file with signatures, visibility, line ranges, incoming/outgoing reference counts, and PageRank scores so it spots dependencies and side effects that raw reading misses.
23
+ pi-shazam is a **Pi coding agent package** the native, first-class experience. Install once, tools appear alongside `read` and `bash`:
53
24
 
54
- ### Before multi-file edits — `shazam_impact`
55
-
56
- Pass the files you plan to change and get back:
57
-
58
- - **Blast radius** — every file that references the symbols in your target files
59
- - **Key symbols at risk** — high-PageRank symbols that would be affected
60
- - **Suggested tests** — test files most likely to catch regressions
61
- - **Risk level** — low / medium / high with specific reasons
62
-
63
- ### After every edit — `shazam_verify`
64
-
65
- The evidence gate. After each write/edit, the agent runs:
66
-
67
- 1. **Git diff** → what actually changed
68
- 2. **Baseline comparison** → added/removed/modified symbols vs last snapshot
69
- 3. **Orphan detection** → symbols with zero incoming references (dead code candidates)
70
- 4. **Risk assessment** → low / medium / high based on change magnitude
71
- 5. **Call-graph consistency** → broken calls, broken imports
72
-
73
- Use `--quick` for a 2-second risk-only check after each individual edit. Run the full verify before committing.
74
-
75
- ### Before committing — `shazam_ready`
76
-
77
- The final gate. Composes verify + check into a single pass/fail readout:
78
-
79
- ```
80
- Status: ✅ READY or ❌ NOT READY
81
- - Risk level: low / medium / high
82
- - Orphan symbols: N
83
- - Files parsed: N / N
25
+ ```bash
26
+ pi install npm:pi-shazam
84
27
  ```
85
28
 
86
- If not ready, it tells the agent exactly what to fix and which tools to run.
87
-
88
- ### When CI is red — `shazam_check`
89
-
90
- Independent of git state. Runs tree-sitter parse validation across all project files and reports which files failed to parse, symbol counts, and edge statistics. For deeper diagnostics, points the agent to `npx tsc --noEmit` or language-specific linters.
29
+ All 13 analysis tools register as native Pi tools. Automatic hooks inject structural overviews into the system prompt, verify code after every edit, and log tool usage for optimization. This is the recommended setup for Pi users.
91
30
 
92
- ### Format issues — `shazam_fix`
31
+ ## Also: MCP Server
93
32
 
94
- Detects available formatters from project config (prettier, eslint, biome) and scans files for:
33
+ pi-shazam ships with an MCP server (`npx pi-shazam-mcp`) so **any MCP-compatible client** can use the same analysis tools. No Pi required.
95
34
 
96
- - Trailing whitespace
97
- - Tab indentation in space-convention files
98
- - Mixed tabs and spaces
99
- - Missing newline at end of file
100
- - Consecutive blank lines (>2)
35
+ Supported clients: Cursor, Claude Desktop, Windsurf, Qoder, Kimi Code, and any tool that speaks MCP.
101
36
 
102
- Always defaults to **dry-run mode** — shows what would change without touching files. The agent must explicitly pass `{ "dryRun": false }` to apply fixes.
103
-
104
- ### Finding dead code — `shazam_orphan`
105
-
106
- Lists symbols with zero incoming references (filtering out exported entry points, anonymous functions, and test files). Confidence ≥ 70. Before deleting anything, the agent should also check for dynamic references.
107
-
108
- ### Finding complexity problems — `shazam_hotspots`
37
+ ```json
38
+ {
39
+ "mcpServers": {
40
+ "pi-shazam": {
41
+ "command": "npx",
42
+ "args": ["pi-shazam-mcp"]
43
+ }
44
+ }
45
+ }
46
+ ```
109
47
 
110
- Ranks files by a composite of symbol count, edge density, and PageRank sum. The files at the top are where bugs are most likely to hide.
48
+ The same 13 tools, the same analysis engine, the same output format. MCP tools sync with Pi tools in every release.
111
49
 
112
- ### HTTP APIs — `shazam_routes`
50
+ ## Tools
113
51
 
114
- Discovers HTTP route registrations across the project — framework-agnostic pattern matching for Express, Flask, FastAPI, Gin, Actix, and more.
52
+ ### Query (read-only)
115
53
 
116
- ### State machines `shazam_state_map`
54
+ | Tool | What it tells the agent |
55
+ |------|------------------------|
56
+ | `shazam_overview` | Project structure, top-10 files by PageRank, key dependencies, recent commits, HTTP routes |
57
+ | `shazam_impact` | Every file, symbol, and test affected by your planned changes |
58
+ | `shazam_codesearch` | BM25-ranked symbol search — use instead of grep |
59
+ | `shazam_symbol` | Definition, kind, signature, callers, callees for any symbol. `mode: "state"` for enums |
60
+ | `shazam_hover` | Type signatures and JSDoc via LSP — content raw reads miss |
61
+ | `shazam_file_detail` | All symbols in a file with signatures, PageRank, call counts, LSP hierarchy |
62
+ | `shazam_call_chain` | Full upstream/downstream call graph. `flat: true` for reference list |
63
+ | `shazam_find_tests` | Which test files cover a given module |
64
+ | `shazam_hotspots` | Files ranked by complexity — where bugs hurt most |
65
+ | `shazam_type_hierarchy` | Class/interface inheritance chain |
117
66
 
118
- Traces enum and constant definitions, their values, and transition relationships. Useful for understanding configuration states, feature flags, or finite state machines.
67
+ ### Write & Verify
119
68
 
120
- ### Keyword search `shazam_codesearch`
69
+ | Tool | What it tells the agent |
70
+ |------|------------------------|
71
+ | `shazam_verify` | Post-edit gate: LSP diagnostics + risk + orphans + graph diff. PASS/WARN/FAIL |
72
+ | `shazam_fix` | Auto-fix format issues (prettier, biome, eslint, ruff, gofmt) |
73
+ | `shazam_rename_symbol` | Safe project-wide rename via LSP — verifies references first |
74
+ | `shazam_safe_delete` | Confirms zero incoming references before removing a symbol |
121
75
 
122
- BM25-ranked symbol search across the entire codebase. Better than grep for finding "that function that handles authentication" when you don't know its exact name.
76
+ ## Pi-Only Features
123
77
 
124
- ## All Tools at a Glance
78
+ These run automatically when installed as a Pi package:
125
79
 
126
- | Tool | Type | Description |
80
+ | Hook | When | What it does |
127
81
  |------|------|-------------|
128
- | `shazam_overview` | Query | Project structure, modules, Top-10 PageRank files, reading order |
129
- | `shazam_codequery` | Query | Unified lookup: `--symbol`, `--file`, or `--query` (keyword) |
130
- | `shazam_codesearch` | Query | BM25 symbol search across entire codebase |
131
- | `shazam_file_detail` | Query | Deep file analysis: all symbols, signatures, ref counts, imports |
132
- | `shazam_symbol` | Query | Single symbol: definition, kind, visibility, call counts |
133
- | `shazam_refs` | Query | All incoming + outgoing references for a symbol |
134
- | `shazam_impact` | Query | Blast radius of planned file changes with risk level |
135
- | `shazam_call_chain` | Query | Upstream callers → downstream callees with depth control |
136
- | `shazam_routes` | Query | HTTP route inventory (framework-agnostic) |
137
- | `shazam_state_map` | Query | Enum/state definitions and transitions |
138
- | `shazam_orphan` | Query | Dead code candidates (zero incoming references) |
139
- | `shazam_hotspots` | Query | Complexity-ranked file list |
140
- | `shazam_verify` | Verify | Post-edit gate: diff, orphans, risk, call-graph consistency |
141
- | `shazam_check` | Verify | Parse validation and symbol statistics (git-independent) |
142
- | `shazam_fix` | Write | Auto-detect and preview format issues (dry-run by default) |
143
- | `shazam_ready` | Verify | Pre-commit composition of verify + check |
144
-
145
- All tools support `{ "json": true }` for structured output. Write tools use `{ "dryRun": true }` by default and require explicit opt-out to apply changes.
146
-
147
- ## Automatic Hooks
148
-
149
- Two hooks run without the agent asking:
150
-
151
- ### Overview Injection (`before_agent_start`)
152
-
153
- When the agent starts in a project, pi-shazam silently scans the codebase and injects a structural overview into the system prompt. The agent **sees the shape of the code before reading a single file**, eliminating the "where do I even start" problem.
154
-
155
- ### Post-Edit Verification (`tool_result` → `write`/`edit`)
156
-
157
- After every file write or edit, pi-shazam re-scans the project and reports:
158
-
159
- - Total symbols and files
160
- - Graph changes since baseline (added/removed/modified)
161
- - Orphan symbol count (with smarter filtering — skips exported entry points and test files)
162
- - Edge count and file relationship coverage
82
+ | `before_agent_start` | Agent starts | Injects project structure overview into system prompt |
83
+ | `after_write/edit` | Agent writes/edits | Auto-verifies changes, reports structural impact |
84
+ | `shazam-guide` | Key lifecycle events | Nudges agent to use shazam tools at the right moments |
85
+ | `tool-logger` | Every shazam call | Logs usage to `~/.pi/hooks/audit/shazam-calls.log` for optimization |
163
86
 
164
- Findings are sent as a message into the conversation so the agent is immediately aware of structural impacts.
87
+ Plus two commands: `/shazam-setup` (LSP server detection) and `/shazam-doctor` (health check).
165
88
 
166
- ## Commands
89
+ ## Supported Languages
167
90
 
168
- | Command | Purpose |
169
- |---------|---------|
170
- | `/shazam-setup` | Detect installed language servers, print install instructions for missing ones |
171
- | `/shazam-doctor` | Full health check: tree-sitter grammars, LSP servers, cache integrity |
91
+ **Tree-sitter parsing (14)**: TypeScript/TSX, JavaScript/JSX, Python, Rust, Go, Java, C, C++, C#, Ruby, CSS, HTML, JSON
172
92
 
173
- ## Languages
93
+ **LSP diagnostics (6)**: TypeScript/JavaScript, Python (pyright), Rust (rust-analyzer), Go (gopls), JSON, YAML
174
94
 
175
- ### Tree-sitter Parsing (18 languages)
176
-
177
- TypeScript, JavaScript, Python, Rust, Go, Java, C, C++, C#, Ruby, CSS, HTML, JSON, YAML, Bash, Lua, Kotlin, Swift, Scala
178
-
179
- ### LSP Diagnostics (6 languages, auto-spawned)
180
-
181
- | Language | Server |
182
- |----------|--------|
183
- | TypeScript / JavaScript | typescript-language-server |
184
- | Python | pyright |
185
- | Rust | rust-analyzer |
186
- | Go | gopls |
187
- | JSON | vscode-json-languageserver |
188
- | YAML | yaml-language-server |
189
-
190
- When a language server is unavailable, tools fall back to tree-sitter and annotate output with `(tree-sitter only, LSP unavailable)`. They never throw on missing LSP.
191
-
192
- ## Encoding
193
-
194
- Adaptive file reading: UTF-8 → GBK → GB2312. Chinese-character source files are handled automatically. The scanner never assumes UTF-8.
195
-
196
- ## JSON Output Envelope
197
-
198
- ```json
199
- {
200
- "schema_version": "1.0",
201
- "command": "<tool_name>",
202
- "project": "<absolute_path>",
203
- "status": "ok",
204
- "result": { }
205
- }
206
- ```
95
+ When LSP servers are unavailable, tools fall back to tree-sitter only.
207
96
 
208
97
  ## Architecture
209
98
 
210
99
  ```
211
- index.ts ← Pi extension entry point (default export)
212
- ├── core/ ← Pure analysis — zero Pi or LSP imports
213
- ├── treesitter.ts AST parsing + symbol extraction (18 languages)
214
- ├── graph.ts ← Symbol dependency graph (imports, calls, refs)
215
- ├── pagerank.ts ← PageRank scoring
216
- ├── scanner.ts ← Project walking + graph construction
217
- ├── encoding.ts ← Adaptive encoding (UTF-8 → GBK → GB2312)
218
- │ └── cache.ts ← Baseline save/load + graph diff
219
- ├── lsp/ ← Language server process management
220
- │ ├── manager.ts Server lifecycle (spawn, stdio, health, shutdown)
221
- │ ├── client.ts JSON-RPC over stdio via vscode-jsonrpc
222
- ├── servers.ts Language → server config (6 languages)
223
- └── setup.ts ← /shazam-setup command logic
224
- ├── tools/ One file per registerTool call (16 tools)
225
- └── hooks/ ← Automatic event handlers (not LLM-callable)
226
- ├── before-start.ts ← Inject overview into system prompt
227
- └── after-write.ts ← Auto-verify after write/edit operations
100
+ pi-shazam (npm package)
101
+ ├── Pi extension MCP server
102
+ index.ts ──tools/*.ts mcp/entry.ts ──mcp/tools.ts
103
+ │ │ │ │
104
+ └──── core/ + lsp/ ───────────┘──────────────┘
105
+ (shared, no duplication)
106
+
107
+ ├── hooks/
108
+ ├── before-start.ts inject overview into prompt
109
+ │ ├── after-write.ts auto-verify after edits
110
+ │ ├── shazam-guide.ts nudge agent to use tools
111
+ └── tool-logger.ts usage analytics
112
+
113
+ └── core/ + lsp/ pure analysis (zero Pi/MCP imports)
228
114
  ```
229
115
 
230
- Layer direction: `hooks/` → `tools/` → `core/` + `lsp/`. Core never imports from tools, hooks, or lsp.
116
+ ## MCP Sync Discipline
117
+
118
+ Pi and MCP tools ship in the same package, from the same codebase. When Pi tools change, MCP tools must update in the same PR:
119
+
120
+ | Pi change | MCP action |
121
+ |-----------|------------|
122
+ | New tool | Add `registerTool` in `mcp/tools.ts` |
123
+ | Tool deleted | Remove from `mcp/tools.ts` |
124
+ | Schema changed | Update Zod schema |
125
+ | Description updated | Sync to MCP tool description |
231
126
 
232
127
  ## Development
233
128
 
@@ -238,7 +133,7 @@ npm install --legacy-peer-deps
238
133
 
239
134
  npm run dev # tsc --watch
240
135
  npm run typecheck # tsc --noEmit
241
- npm test # vitest (98 tests)
136
+ npm test # vitest (208 tests)
242
137
  npm run build # tsc → dist/
243
138
  ```
244
139
 
@@ -43,6 +43,20 @@ export declare function loadLastSnapshot(projectPath: string): Record<string, un
43
43
  * Returns a structured diff with added/removed/modified symbols and edges.
44
44
  */
45
45
  export declare function diffBaseline(graph: RepoGraph, projectPath: string): GraphDiff | null;
46
+ /**
47
+ * Save the full graph + file mtimes to a persistent cache file.
48
+ */
49
+ export declare function saveGraphCache(graph: RepoGraph, fileMtimes: Map<string, number>, cachePath: string): void;
50
+ export interface GraphCacheData {
51
+ graph: RepoGraph;
52
+ fileMtimes: Map<string, number>;
53
+ timestamp: number;
54
+ }
55
+ /**
56
+ * Load a persistent graph cache. Returns null if missing, corrupt, wrong
57
+ * version, or older than 7 days.
58
+ */
59
+ export declare function loadGraphCache(cachePath: string): GraphCacheData | null;
46
60
  /**
47
61
  * Re-export serialization helpers for convenience.
48
62
  */
@@ -1 +1 @@
1
- {"version":3,"file":"cache.d.ts","sourceRoot":"","sources":["../../core/cache.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAMH,OAAO,EACN,cAAc,EACd,eAAe,EACf,aAAa,EACb,qBAAqB,EACrB,MAAM,YAAY,CAAC;AACpB,OAAO,KAAK,EACX,SAAS,EACT,eAAe,EACf,SAAS,EAGT,MAAM,YAAY,CAAC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import { join, dirname } from "node:path";
12
12
  import { homedir } from "node:os";
13
13
  import { createHash } from "node:crypto";
14
- import { serializeGraph, serializeSymbol, serializeEdge, compareGraphSnapshots, } from "./graph.js";
14
+ import { serializeGraph, serializeSymbol, serializeEdge, serializeGraphV2, deserializeGraphV2, compareGraphSnapshots, } from "./graph.js";
15
15
  // ── Cache directory management ───────────────────────────────────────────────
16
16
  const CACHE_ROOT = join(homedir(), ".cache", "repomap");
17
17
  /**
@@ -57,7 +57,11 @@ export function loadBaseline(projectPath) {
57
57
  return null;
58
58
  try {
59
59
  const raw = readFileSync(symbols, "utf-8");
60
- return JSON.parse(raw);
60
+ const data = JSON.parse(raw);
61
+ if (!data || !Array.isArray(data.symbols) || !Array.isArray(data.edges)) {
62
+ return null;
63
+ }
64
+ return data;
61
65
  }
62
66
  catch {
63
67
  return null;
@@ -109,6 +113,41 @@ export function diffBaseline(graph, projectPath) {
109
113
  }
110
114
  return compareGraphSnapshots(currentSymbols, currentEdges, baseline.symbols, baseline.edges);
111
115
  }
116
+ // ── Persistent graph cache (V2) ──────────────────────────────────────────────
117
+ const CACHE_MAX_AGE_MS = 7 * 24 * 60 * 60 * 1000;
118
+ /**
119
+ * Save the full graph + file mtimes to a persistent cache file.
120
+ */
121
+ export function saveGraphCache(graph, fileMtimes, cachePath) {
122
+ const serialized = serializeGraphV2(graph, fileMtimes);
123
+ mkdirSync(dirname(cachePath), { recursive: true });
124
+ writeFileSync(cachePath, JSON.stringify(serialized), "utf-8");
125
+ }
126
+ /**
127
+ * Load a persistent graph cache. Returns null if missing, corrupt, wrong
128
+ * version, or older than 7 days.
129
+ */
130
+ export function loadGraphCache(cachePath) {
131
+ if (!existsSync(cachePath))
132
+ return null;
133
+ try {
134
+ const raw = readFileSync(cachePath, "utf-8");
135
+ const data = JSON.parse(raw);
136
+ if (!data || data.version !== 2 || !Array.isArray(data.symbols) || !Array.isArray(data.edges))
137
+ return null;
138
+ if (Date.now() - data.timestamp > CACHE_MAX_AGE_MS)
139
+ return null;
140
+ const graph = deserializeGraphV2(data);
141
+ const fileMtimes = new Map();
142
+ for (const [k, v] of Object.entries(data.fileMtimes)) {
143
+ fileMtimes.set(k, v);
144
+ }
145
+ return { graph, fileMtimes, timestamp: data.timestamp };
146
+ }
147
+ catch {
148
+ return null;
149
+ }
150
+ }
112
151
  /**
113
152
  * Re-export serialization helpers for convenience.
114
153
  */
@@ -1 +1 @@
1
- {"version":3,"file":"cache.js","sourceRoot":"","sources":["../../core/cache.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAC7E,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EACN,cAAc,EACd,eAAe,EACf,aAAa,EACb,qBAAqB,GACrB,MAAM,YAAY,CAAC;AASpB,gFAAgF;AAEhF,MAAM,UAAU,GAAG,IAAI,CAAC,OAAO,EAAE,EAAE,QAAQ,EAAE,SAAS,CAAC,CAAC;AAExD;;;GAGG;AACH,MAAM,UAAU,kBAAkB,CAAC,WAAmB;IACrD,MAAM,SAAS,GAAG,WAAW,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;IACjD,MAAM,IAAI,GAAG,UAAU,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IAC3E,MAAM,WAAW,GAAG,SAAS,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,IAAI,SAAS,CAAC;IAC5D,MAAM,QAAQ,GAAG,IAAI,CAAC,UAAU,EAAE,GAAG,WAAW,IAAI,IAAI,EAAE,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AI,CAAC;IACxC,IAAI,CAAC;QACJ,MAAM,GAAG,GAAG,YAAY,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;QAC7C,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QAC7B,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,OAAO,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC;YAAE,OAAO,IAAI,CAAC;QAC3G,IAAI,IAAI,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC,SAAS,GAAG,gBAAgB;YAAE,OAAO,IAAI,CAAC;QAEhE,MAAM,KAAK,GAAG,kBAAkB,CAAC,IAAI,CAAC,CAAC;QACvC,MAAM,UAAU,GAAG,IAAI,GAAG,EAAkB,CAAC;QAC7C,KAAK,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC,EAAE,CAAC;YACtD,UAAU,CAAC,GAAG,CAAC,CAAC,EAAE,CAAW,CAAC,CAAC;QAChC,CAAC;QAED,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,IAAI,CAAC,SAAS,EAAE,CAAC;IACzD,CAAC;IAAC,MAAM,CAAC;QACR,OAAO,IAAI,CAAC;IACb,CAAC;AACF,CAAC;AAED;;GAEG;AACH,OAAO,EACN,cAAc,EACd,eAAe,EACf,aAAa,EACb,qBAAqB,GACrB,CAAC"}
@@ -5,5 +5,13 @@
5
5
  * verify, overview, and check tools. Keeps filtering consistent across the
6
6
  * codebase and avoids pattern duplication.
7
7
  */
8
+ /**
9
+ * Directories to skip during project scanning and LSP detection.
10
+ *
11
+ * Single source of truth -- consumed by core/scanner.ts and lsp/manager.ts.
12
+ * Includes build outputs, dependency caches, virtual environments, IDE
13
+ * directories, and other non-source trees that should never be walked.
14
+ */
15
+ export declare const SKIP_DIRS: Set<string>;
8
16
  export declare function isNonSourceFile(file: string): boolean;
9
17
  //# sourceMappingURL=filter.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"filter.d.ts","sourceRoot":"","sources":["../../core/filter.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAoBH,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAErD"}
1
+ {"version":3,"file":"filter.d.ts","sourceRoot":"","sources":["../../core/filter.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAoBH;;;;;;GAMG;AACH,eAAO,MAAM,SAAS,aA4BpB,CAAC;AAEH,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAErD"}
@@ -22,6 +22,42 @@ const NON_SOURCE_FILE_PATTERNS = [
22
22
  "dist/",
23
23
  ".json",
24
24
  ];
25
+ /**
26
+ * Directories to skip during project scanning and LSP detection.
27
+ *
28
+ * Single source of truth -- consumed by core/scanner.ts and lsp/manager.ts.
29
+ * Includes build outputs, dependency caches, virtual environments, IDE
30
+ * directories, and other non-source trees that should never be walked.
31
+ */
32
+ export const SKIP_DIRS = new Set([
33
+ "node_modules",
34
+ "bower_components",
35
+ "vendor",
36
+ "dist",
37
+ "build",
38
+ "out",
39
+ "target",
40
+ ".git",
41
+ ".cache",
42
+ ".worktrees",
43
+ ".pi-shazam",
44
+ ".qoder",
45
+ "__pycache__",
46
+ "coverage",
47
+ ".nyc_output",
48
+ "tmp",
49
+ "temp",
50
+ ".venv",
51
+ "venv",
52
+ ".tox",
53
+ ".next",
54
+ ".nuxt",
55
+ ".turbo",
56
+ ".vercel",
57
+ ".yarn",
58
+ ".idea",
59
+ ".vscode",
60
+ ]);
25
61
  export function isNonSourceFile(file) {
26
62
  return NON_SOURCE_FILE_PATTERNS.some((p) => file.includes(p));
27
63
  }
@@ -1 +1 @@
1
- {"version":3,"file":"filter.js","sourceRoot":"","sources":["../../core/filter.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH;;;;;;;;GAQG;AACH,MAAM,wBAAwB,GAAsB;IACnD,mBAAmB;IACnB,cAAc;IACd,eAAe;IACf,eAAe;IACf,OAAO;IACP,OAAO;CACP,CAAC;AAEF,MAAM,UAAU,eAAe,CAAC,IAAY;IAC3C,OAAO,wBAAwB,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC;AAC/D,CAAC"}
1
+ {"version":3,"file":"filter.js","sourceRoot":"","sources":["../../core/filter.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH;;;;;;;;GAQG;AACH,MAAM,wBAAwB,GAAsB;IACnD,mBAAmB;IACnB,cAAc;IACd,eAAe;IACf,eAAe;IACf,OAAO;IACP,OAAO;CACP,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG,IAAI,GAAG,CAAC;IAChC,cAAc;IACd,kBAAkB;IAClB,QAAQ;IACR,MAAM;IACN,OAAO;IACP,KAAK;IACL,QAAQ;IACR,MAAM;IACN,QAAQ;IACR,YAAY;IACZ,YAAY;IACZ,QAAQ;IACR,aAAa;IACb,UAAU;IACV,aAAa;IACb,KAAK;IACL,MAAM;IACN,OAAO;IACP,MAAM;IACN,MAAM;IACN,OAAO;IACP,OAAO;IACP,QAAQ;IACR,SAAS;IACT,OAAO;IACP,OAAO;IACP,SAAS;CACT,CAAC,CAAC;AAEH,MAAM,UAAU,eAAe,CAAC,IAAY;IAC3C,OAAO,wBAAwB,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC;AAC/D,CAAC"}
@@ -78,6 +78,7 @@ export interface SerializedEdge {
78
78
  target: string;
79
79
  weight: number;
80
80
  kind: string;
81
+ confidence?: number;
81
82
  }
82
83
  export interface SerializedGraph {
83
84
  symbols: SerializedSymbol[];
@@ -88,6 +89,20 @@ export interface SerializedGraph {
88
89
  export declare function serializeSymbol(sym: Symbol): SerializedSymbol;
89
90
  export declare function serializeEdge(edge: Edge): SerializedEdge;
90
91
  export declare function serializeGraph(graph: RepoGraph): SerializedGraph;
92
+ export interface SerializedGraphV2 {
93
+ version: 2;
94
+ timestamp: number;
95
+ symbols: SerializedSymbol[];
96
+ edges: SerializedEdge[];
97
+ fileSymbols: Record<string, string[]>;
98
+ fileImports: Record<string, string[]>;
99
+ fileCalls: Record<string, [string, number, string][]>;
100
+ fileImportBindings: Record<string, JSImportBinding[]>;
101
+ fileExports: Record<string, JSExportBinding[]>;
102
+ fileMtimes: Record<string, number>;
103
+ }
104
+ export declare function serializeGraphV2(graph: RepoGraph, fileMtimes: Map<string, number>): SerializedGraphV2;
105
+ export declare function deserializeGraphV2(data: SerializedGraphV2): RepoGraph;
91
106
  export interface GraphDiff {
92
107
  summary: {
93
108
  added: number;
@@ -140,7 +155,4 @@ export interface ModifiedSymbol {
140
155
  risk?: "HIGH" | "MEDIUM" | "LOW";
141
156
  }
142
157
  export declare function compareGraphSnapshots(currentSymbols: Symbol[], currentEdges: Edge[], previousSymbols: SerializedSymbol[], previousEdges: SerializedEdge[]): GraphDiff;
143
- export declare const LOW_SIGNAL_KINDS: Set<string>;
144
- export declare const BOILERPLATE_NAMES: Set<string>;
145
- export declare function signalWeightForSymbol(kind: string, name: string, visibility: string): number;
146
158
  //# sourceMappingURL=graph.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"graph.d.ts","sourceRoot":"","sources":["../../core/graph.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,uDAAuD;AACvD,MAAM,WAAW,MAAM;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,M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