purecontext-mcp 1.1.8 → 1.5.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 (328) hide show
  1. package/AGENT_INSTRUCTIONS.md +113 -394
  2. package/AGENT_INSTRUCTIONS_SHORT.md +53 -0
  3. package/AGENT_REFERENCE.md +561 -0
  4. package/AST-SEARCH.md +274 -0
  5. package/CHANGELOG.md +233 -0
  6. package/CODE-INTELLIGENCE.md +369 -0
  7. package/FRAMEWORK-ADAPTERS.md +351 -0
  8. package/HEALTH-DASHBOARDS.md +241 -0
  9. package/LANGUAGE-SUPPORT.md +144 -0
  10. package/README.md +99 -12
  11. package/REFACTORING-SAFELY.md +279 -0
  12. package/UNDERSTANDING-RELATIONSHIPS.md +240 -0
  13. package/USER-GUIDE.md +22 -0
  14. package/VISUALIZING-CODE.md +199 -0
  15. package/WORKFLOW-TECH-DEBT.md +286 -0
  16. package/dist/cli/hooks.d.ts +28 -0
  17. package/dist/cli/hooks.d.ts.map +1 -0
  18. package/dist/cli/hooks.js +570 -0
  19. package/dist/cli/hooks.js.map +1 -0
  20. package/dist/cli/install-detect.d.ts +16 -0
  21. package/dist/cli/install-detect.d.ts.map +1 -0
  22. package/dist/cli/install-detect.js +70 -0
  23. package/dist/cli/install-detect.js.map +1 -0
  24. package/dist/cli/install-writers.d.ts +59 -0
  25. package/dist/cli/install-writers.d.ts.map +1 -0
  26. package/dist/cli/install-writers.js +292 -0
  27. package/dist/cli/install-writers.js.map +1 -0
  28. package/dist/cli/install.d.ts +14 -0
  29. package/dist/cli/install.d.ts.map +1 -0
  30. package/dist/cli/install.js +150 -0
  31. package/dist/cli/install.js.map +1 -0
  32. package/dist/config/config-loader.js +3 -0
  33. package/dist/config/config-loader.js.map +1 -1
  34. package/dist/config/config-schema.d.ts +11 -0
  35. package/dist/config/config-schema.d.ts.map +1 -1
  36. package/dist/config/config-schema.js +15 -0
  37. package/dist/config/config-schema.js.map +1 -1
  38. package/dist/core/db/dep-store.d.ts +75 -0
  39. package/dist/core/db/dep-store.d.ts.map +1 -1
  40. package/dist/core/db/dep-store.js +277 -0
  41. package/dist/core/db/dep-store.js.map +1 -1
  42. package/dist/core/db/schema.d.ts.map +1 -1
  43. package/dist/core/db/schema.js +12 -0
  44. package/dist/core/db/schema.js.map +1 -1
  45. package/dist/core/db/symbol-store.d.ts +1 -0
  46. package/dist/core/db/symbol-store.d.ts.map +1 -1
  47. package/dist/core/db/symbol-store.js +120 -6
  48. package/dist/core/db/symbol-store.js.map +1 -1
  49. package/dist/core/file-discovery.d.ts +6 -0
  50. package/dist/core/file-discovery.d.ts.map +1 -1
  51. package/dist/core/file-discovery.js +20 -13
  52. package/dist/core/file-discovery.js.map +1 -1
  53. package/dist/core/file-processor.d.ts.map +1 -1
  54. package/dist/core/file-processor.js +26 -1
  55. package/dist/core/file-processor.js.map +1 -1
  56. package/dist/core/git-log-reader.d.ts.map +1 -1
  57. package/dist/core/git-log-reader.js +21 -0
  58. package/dist/core/git-log-reader.js.map +1 -1
  59. package/dist/core/index-manager.d.ts.map +1 -1
  60. package/dist/core/index-manager.js +22 -8
  61. package/dist/core/index-manager.js.map +1 -1
  62. package/dist/core/indexing-worker.d.ts.map +1 -1
  63. package/dist/core/indexing-worker.js +14 -0
  64. package/dist/core/indexing-worker.js.map +1 -1
  65. package/dist/core/parse-dispatcher.d.ts.map +1 -1
  66. package/dist/core/parse-dispatcher.js +20 -5
  67. package/dist/core/parse-dispatcher.js.map +1 -1
  68. package/dist/core/search/query-preprocessor.d.ts +69 -3
  69. package/dist/core/search/query-preprocessor.d.ts.map +1 -1
  70. package/dist/core/search/query-preprocessor.js +450 -17
  71. package/dist/core/search/query-preprocessor.js.map +1 -1
  72. package/dist/core/search/relevance-ranker.d.ts +60 -5
  73. package/dist/core/search/relevance-ranker.d.ts.map +1 -1
  74. package/dist/core/search/relevance-ranker.js +931 -33
  75. package/dist/core/search/relevance-ranker.js.map +1 -1
  76. package/dist/core/test-mapper.d.ts.map +1 -1
  77. package/dist/core/test-mapper.js +7 -1
  78. package/dist/core/test-mapper.js.map +1 -1
  79. package/dist/core/types.d.ts +33 -1
  80. package/dist/core/types.d.ts.map +1 -1
  81. package/dist/graph/diagram-renderer.d.ts +83 -0
  82. package/dist/graph/diagram-renderer.d.ts.map +1 -0
  83. package/dist/graph/diagram-renderer.js +294 -0
  84. package/dist/graph/diagram-renderer.js.map +1 -0
  85. package/dist/graph/graph-traversal.d.ts +92 -0
  86. package/dist/graph/graph-traversal.d.ts.map +1 -1
  87. package/dist/graph/graph-traversal.js +440 -2
  88. package/dist/graph/graph-traversal.js.map +1 -1
  89. package/dist/handlers/angular-html.d.ts +3 -0
  90. package/dist/handlers/angular-html.d.ts.map +1 -0
  91. package/dist/handlers/angular-html.js +215 -0
  92. package/dist/handlers/angular-html.js.map +1 -0
  93. package/dist/handlers/c.d.ts.map +1 -1
  94. package/dist/handlers/c.js +19 -0
  95. package/dist/handlers/c.js.map +1 -1
  96. package/dist/handlers/cpp-macro-registry.d.ts +21 -0
  97. package/dist/handlers/cpp-macro-registry.d.ts.map +1 -0
  98. package/dist/handlers/cpp-macro-registry.js +44 -0
  99. package/dist/handlers/cpp-macro-registry.js.map +1 -0
  100. package/dist/handlers/cpp.d.ts.map +1 -1
  101. package/dist/handlers/cpp.js +579 -10
  102. package/dist/handlers/cpp.js.map +1 -1
  103. package/dist/handlers/csharp.d.ts.map +1 -1
  104. package/dist/handlers/csharp.js +39 -2
  105. package/dist/handlers/csharp.js.map +1 -1
  106. package/dist/handlers/css.d.ts +3 -0
  107. package/dist/handlers/css.d.ts.map +1 -0
  108. package/dist/handlers/css.js +154 -0
  109. package/dist/handlers/css.js.map +1 -0
  110. package/dist/handlers/erlang.d.ts.map +1 -1
  111. package/dist/handlers/erlang.js +8 -1
  112. package/dist/handlers/erlang.js.map +1 -1
  113. package/dist/handlers/fortran.js +1 -1
  114. package/dist/handlers/fortran.js.map +1 -1
  115. package/dist/handlers/go.d.ts.map +1 -1
  116. package/dist/handlers/go.js +87 -2
  117. package/dist/handlers/go.js.map +1 -1
  118. package/dist/handlers/handler-registry.d.ts.map +1 -1
  119. package/dist/handlers/handler-registry.js +4 -0
  120. package/dist/handlers/handler-registry.js.map +1 -1
  121. package/dist/handlers/hcl.d.ts +3 -0
  122. package/dist/handlers/hcl.d.ts.map +1 -0
  123. package/dist/handlers/hcl.js +193 -0
  124. package/dist/handlers/hcl.js.map +1 -0
  125. package/dist/handlers/java.d.ts.map +1 -1
  126. package/dist/handlers/java.js +33 -16
  127. package/dist/handlers/java.js.map +1 -1
  128. package/dist/handlers/kotlin.d.ts.map +1 -1
  129. package/dist/handlers/kotlin.js +48 -3
  130. package/dist/handlers/kotlin.js.map +1 -1
  131. package/dist/handlers/less.d.ts +3 -0
  132. package/dist/handlers/less.d.ts.map +1 -0
  133. package/dist/handlers/less.js +255 -0
  134. package/dist/handlers/less.js.map +1 -0
  135. package/dist/handlers/objective-c.d.ts.map +1 -1
  136. package/dist/handlers/objective-c.js +122 -64
  137. package/dist/handlers/objective-c.js.map +1 -1
  138. package/dist/handlers/openapi.d.ts.map +1 -1
  139. package/dist/handlers/openapi.js +30 -5
  140. package/dist/handlers/openapi.js.map +1 -1
  141. package/dist/handlers/php.d.ts.map +1 -1
  142. package/dist/handlers/php.js +287 -41
  143. package/dist/handlers/php.js.map +1 -1
  144. package/dist/handlers/protobuf.d.ts.map +1 -1
  145. package/dist/handlers/protobuf.js +1 -0
  146. package/dist/handlers/protobuf.js.map +1 -1
  147. package/dist/handlers/python.d.ts.map +1 -1
  148. package/dist/handlers/python.js +1 -3
  149. package/dist/handlers/python.js.map +1 -1
  150. package/dist/handlers/ruby-dsl.d.ts +23 -0
  151. package/dist/handlers/ruby-dsl.d.ts.map +1 -0
  152. package/dist/handlers/ruby-dsl.js +251 -0
  153. package/dist/handlers/ruby-dsl.js.map +1 -0
  154. package/dist/handlers/ruby.d.ts.map +1 -1
  155. package/dist/handlers/ruby.js +29 -4
  156. package/dist/handlers/ruby.js.map +1 -1
  157. package/dist/handlers/rust.d.ts.map +1 -1
  158. package/dist/handlers/rust.js +98 -2
  159. package/dist/handlers/rust.js.map +1 -1
  160. package/dist/handlers/scss.d.ts +3 -0
  161. package/dist/handlers/scss.d.ts.map +1 -0
  162. package/dist/handlers/scss.js +290 -0
  163. package/dist/handlers/scss.js.map +1 -0
  164. package/dist/handlers/sql.d.ts.map +1 -1
  165. package/dist/handlers/sql.js +37 -18
  166. package/dist/handlers/sql.js.map +1 -1
  167. package/dist/handlers/typescript.d.ts.map +1 -1
  168. package/dist/handlers/typescript.js +65 -17
  169. package/dist/handlers/typescript.js.map +1 -1
  170. package/dist/handlers/xml.d.ts.map +1 -1
  171. package/dist/handlers/xml.js +35 -2
  172. package/dist/handlers/xml.js.map +1 -1
  173. package/dist/index.d.ts.map +1 -1
  174. package/dist/index.js +91 -0
  175. package/dist/index.js.map +1 -1
  176. package/dist/server/mcp-server.d.ts.map +1 -1
  177. package/dist/server/mcp-server.js +155 -0
  178. package/dist/server/mcp-server.js.map +1 -1
  179. package/dist/server/tools/check-delete-safe.d.ts +50 -0
  180. package/dist/server/tools/check-delete-safe.d.ts.map +1 -0
  181. package/dist/server/tools/check-delete-safe.js +308 -0
  182. package/dist/server/tools/check-delete-safe.js.map +1 -0
  183. package/dist/server/tools/check-move-safe.d.ts +44 -0
  184. package/dist/server/tools/check-move-safe.d.ts.map +1 -0
  185. package/dist/server/tools/check-move-safe.js +266 -0
  186. package/dist/server/tools/check-move-safe.js.map +1 -0
  187. package/dist/server/tools/check-rename-safe.d.ts +48 -0
  188. package/dist/server/tools/check-rename-safe.d.ts.map +1 -0
  189. package/dist/server/tools/check-rename-safe.js +218 -0
  190. package/dist/server/tools/check-rename-safe.js.map +1 -0
  191. package/dist/server/tools/detect-antipatterns.d.ts +1 -1
  192. package/dist/server/tools/diff-health-radar.d.ts +44 -0
  193. package/dist/server/tools/diff-health-radar.d.ts.map +1 -0
  194. package/dist/server/tools/diff-health-radar.js +192 -0
  195. package/dist/server/tools/diff-health-radar.js.map +1 -0
  196. package/dist/server/tools/find-cycles.d.ts +31 -0
  197. package/dist/server/tools/find-cycles.d.ts.map +1 -0
  198. package/dist/server/tools/find-cycles.js +85 -0
  199. package/dist/server/tools/find-cycles.js.map +1 -0
  200. package/dist/server/tools/find-implementations.d.ts +47 -0
  201. package/dist/server/tools/find-implementations.d.ts.map +1 -0
  202. package/dist/server/tools/find-implementations.js +167 -0
  203. package/dist/server/tools/find-implementations.js.map +1 -0
  204. package/dist/server/tools/find-untested-symbols.d.ts +52 -0
  205. package/dist/server/tools/find-untested-symbols.d.ts.map +1 -0
  206. package/dist/server/tools/find-untested-symbols.js +308 -0
  207. package/dist/server/tools/find-untested-symbols.js.map +1 -0
  208. package/dist/server/tools/get-architecture-snapshot.d.ts +43 -0
  209. package/dist/server/tools/get-architecture-snapshot.d.ts.map +1 -0
  210. package/dist/server/tools/get-architecture-snapshot.js +292 -0
  211. package/dist/server/tools/get-architecture-snapshot.js.map +1 -0
  212. package/dist/server/tools/get-call-hierarchy.d.ts +43 -0
  213. package/dist/server/tools/get-call-hierarchy.d.ts.map +1 -0
  214. package/dist/server/tools/get-call-hierarchy.js +119 -0
  215. package/dist/server/tools/get-call-hierarchy.js.map +1 -0
  216. package/dist/server/tools/get-class-hierarchy.d.ts +36 -0
  217. package/dist/server/tools/get-class-hierarchy.d.ts.map +1 -0
  218. package/dist/server/tools/get-class-hierarchy.js +125 -0
  219. package/dist/server/tools/get-class-hierarchy.js.map +1 -0
  220. package/dist/server/tools/get-complexity-hotspots.d.ts +50 -0
  221. package/dist/server/tools/get-complexity-hotspots.d.ts.map +1 -0
  222. package/dist/server/tools/get-complexity-hotspots.js +282 -0
  223. package/dist/server/tools/get-complexity-hotspots.js.map +1 -0
  224. package/dist/server/tools/get-coupling-map.d.ts +39 -0
  225. package/dist/server/tools/get-coupling-map.d.ts.map +1 -0
  226. package/dist/server/tools/get-coupling-map.js +107 -0
  227. package/dist/server/tools/get-coupling-map.js.map +1 -0
  228. package/dist/server/tools/get-debt-report.d.ts +44 -0
  229. package/dist/server/tools/get-debt-report.d.ts.map +1 -0
  230. package/dist/server/tools/get-debt-report.js +606 -0
  231. package/dist/server/tools/get-debt-report.js.map +1 -0
  232. package/dist/server/tools/get-entry-points.d.ts +79 -0
  233. package/dist/server/tools/get-entry-points.d.ts.map +1 -0
  234. package/dist/server/tools/get-entry-points.js +362 -0
  235. package/dist/server/tools/get-entry-points.js.map +1 -0
  236. package/dist/server/tools/get-lexical-scope-matches.d.ts +54 -0
  237. package/dist/server/tools/get-lexical-scope-matches.d.ts.map +1 -0
  238. package/dist/server/tools/get-lexical-scope-matches.js +470 -0
  239. package/dist/server/tools/get-lexical-scope-matches.js.map +1 -0
  240. package/dist/server/tools/get-public-api.d.ts +53 -0
  241. package/dist/server/tools/get-public-api.d.ts.map +1 -0
  242. package/dist/server/tools/get-public-api.js +218 -0
  243. package/dist/server/tools/get-public-api.js.map +1 -0
  244. package/dist/server/tools/get-test-coverage-map.d.ts +66 -0
  245. package/dist/server/tools/get-test-coverage-map.d.ts.map +1 -0
  246. package/dist/server/tools/get-test-coverage-map.js +588 -0
  247. package/dist/server/tools/get-test-coverage-map.js.map +1 -0
  248. package/dist/server/tools/get-todos.d.ts +51 -0
  249. package/dist/server/tools/get-todos.d.ts.map +1 -0
  250. package/dist/server/tools/get-todos.js +180 -0
  251. package/dist/server/tools/get-todos.js.map +1 -0
  252. package/dist/server/tools/get-type-graph.d.ts +73 -0
  253. package/dist/server/tools/get-type-graph.d.ts.map +1 -0
  254. package/dist/server/tools/get-type-graph.js +437 -0
  255. package/dist/server/tools/get-type-graph.js.map +1 -0
  256. package/dist/server/tools/health-radar.d.ts +50 -0
  257. package/dist/server/tools/health-radar.d.ts.map +1 -0
  258. package/dist/server/tools/health-radar.js +426 -0
  259. package/dist/server/tools/health-radar.js.map +1 -0
  260. package/dist/server/tools/plan-refactoring.d.ts +74 -0
  261. package/dist/server/tools/plan-refactoring.d.ts.map +1 -0
  262. package/dist/server/tools/plan-refactoring.js +644 -0
  263. package/dist/server/tools/plan-refactoring.js.map +1 -0
  264. package/dist/server/tools/render-call-graph.d.ts +40 -0
  265. package/dist/server/tools/render-call-graph.d.ts.map +1 -0
  266. package/dist/server/tools/render-call-graph.js +215 -0
  267. package/dist/server/tools/render-call-graph.js.map +1 -0
  268. package/dist/server/tools/render-class-hierarchy.d.ts +42 -0
  269. package/dist/server/tools/render-class-hierarchy.d.ts.map +1 -0
  270. package/dist/server/tools/render-class-hierarchy.js +265 -0
  271. package/dist/server/tools/render-class-hierarchy.js.map +1 -0
  272. package/dist/server/tools/render-dep-matrix.d.ts +38 -0
  273. package/dist/server/tools/render-dep-matrix.d.ts.map +1 -0
  274. package/dist/server/tools/render-dep-matrix.js +186 -0
  275. package/dist/server/tools/render-dep-matrix.js.map +1 -0
  276. package/dist/server/tools/render-diagram.d.ts +47 -0
  277. package/dist/server/tools/render-diagram.d.ts.map +1 -0
  278. package/dist/server/tools/render-diagram.js +266 -0
  279. package/dist/server/tools/render-diagram.js.map +1 -0
  280. package/dist/server/tools/render-import-graph.d.ts +41 -0
  281. package/dist/server/tools/render-import-graph.d.ts.map +1 -0
  282. package/dist/server/tools/render-import-graph.js +158 -0
  283. package/dist/server/tools/render-import-graph.js.map +1 -0
  284. package/dist/server/tools/search-ast.d.ts +55 -0
  285. package/dist/server/tools/search-ast.d.ts.map +1 -0
  286. package/dist/server/tools/search-ast.js +279 -0
  287. package/dist/server/tools/search-ast.js.map +1 -0
  288. package/dist/server/tools/search-by-complexity.d.ts +92 -0
  289. package/dist/server/tools/search-by-complexity.d.ts.map +1 -0
  290. package/dist/server/tools/search-by-complexity.js +268 -0
  291. package/dist/server/tools/search-by-complexity.js.map +1 -0
  292. package/dist/server/tools/search-by-decorator.d.ts +48 -0
  293. package/dist/server/tools/search-by-decorator.d.ts.map +1 -0
  294. package/dist/server/tools/search-by-decorator.js +518 -0
  295. package/dist/server/tools/search-by-decorator.js.map +1 -0
  296. package/dist/server/tools/search-by-signature.d.ts +56 -0
  297. package/dist/server/tools/search-by-signature.d.ts.map +1 -0
  298. package/dist/server/tools/search-by-signature.js +200 -0
  299. package/dist/server/tools/search-by-signature.js.map +1 -0
  300. package/dist/server/tools/search-symbols.d.ts +10 -0
  301. package/dist/server/tools/search-symbols.d.ts.map +1 -1
  302. package/dist/server/tools/search-symbols.js +353 -8
  303. package/dist/server/tools/search-symbols.js.map +1 -1
  304. package/dist/server/tools/trace-invocation-chain.d.ts +53 -0
  305. package/dist/server/tools/trace-invocation-chain.d.ts.map +1 -0
  306. package/dist/server/tools/trace-invocation-chain.js +280 -0
  307. package/dist/server/tools/trace-invocation-chain.js.map +1 -0
  308. package/dist/ui/assets/BlastRadius-QdgESOL8.js +1 -0
  309. package/dist/ui/assets/{DependencyGraph-B60SMPbX.js → DependencyGraph-BSMhzwWV.js} +1 -1
  310. package/dist/ui/assets/{NotFound-Bsg8Wppk.js → NotFound-CipFP_s1.js} +1 -1
  311. package/dist/ui/assets/{RepoDetail-Cie0D4_s.js → RepoDetail-Dfp5z5Kq.js} +1 -1
  312. package/dist/ui/assets/{RepoList-CldNt89M.js → RepoList-BKtST3hB.js} +1 -1
  313. package/dist/ui/assets/{Search-CgvpHMOi.js → Search-DzhGDViy.js} +1 -1
  314. package/dist/ui/assets/{SymbolView-B9h0LZTz.js → SymbolView-ryVEwAHG.js} +1 -1
  315. package/dist/ui/assets/{index-DADf5y_L.css → index-Ny8gn9F0.css} +1 -1
  316. package/dist/ui/assets/{index-eK0wMkUR.js → index-nX2chMqi.js} +2 -2
  317. package/dist/ui/assets/{useSearch-KAl3Qyi2.js → useSearch-BnBCRKui.js} +1 -1
  318. package/dist/ui/index.html +2 -2
  319. package/dist/version.d.ts +1 -1
  320. package/dist/version.js +1 -1
  321. package/docs/02-installation.md +89 -17
  322. package/docs/05-cli-reference.md +89 -0
  323. package/docs/dev/benchmark-findings-eu-za-tebe.md +210 -0
  324. package/docs/dev/jcodemunch-gap-analysis.md +198 -0
  325. package/docs/dev/phase-35-coverage-audit.md +469 -0
  326. package/package.json +12 -1
  327. package/user-manual.md +2466 -0
  328. package/dist/ui/assets/BlastRadius-RP7vJEyQ.js +0 -1
@@ -35,6 +35,31 @@ Always call `list_repos` before any code navigation. If the project is not liste
35
35
  | Get per-file quality scores (complexity, coupling) | `get_quality_metrics` |
36
36
  | Find god classes, circular deps, dead code | `detect_antipatterns` |
37
37
  | Generate an architecture overview doc | `get_architecture_doc` |
38
+ | Find all implementations of an interface / abstract class | `find_implementations` |
39
+ | Trace execution flow (callers / callees tree) | `get_call_hierarchy` |
40
+ | Understand class inheritance (ancestors / descendants) | `get_class_hierarchy` |
41
+ | Detect circular import dependencies | `find_cycles` |
42
+ | Get per-file coupling and instability scores | `get_coupling_map` |
43
+ | Generate a Mermaid / DOT diagram (import graph, call graph, class hierarchy) | `render_diagram` (or specialized variants) |
44
+ | Capture an architectural snapshot for before/after comparison | `get_architecture_snapshot` |
45
+ | Pre-flight check before renaming a symbol | `check_rename_safe` |
46
+ | Pre-flight check before deleting a symbol | `check_delete_safe` |
47
+ | Pre-flight check before moving a symbol to another file | `check_move_safe` |
48
+ | Get a sequenced, risk-annotated refactoring plan | `plan_refactoring` |
49
+ | 5-axis codebase health score (CI gate / dashboard) | `health_radar` |
50
+ | Compare health before and after a refactoring | `diff_health_radar` |
51
+ | Detailed debt report with per-file rankings | `get_debt_report` |
52
+ | Find every occurrence of an AST node type (try/catch, arrow fn, etc.) | `search_ast` |
53
+ | Find symbols matching a type signature pattern | `search_by_signature` |
54
+ | Find all symbols with a specific decorator | `search_by_decorator` |
55
+ | Find the most complex functions by threshold | `search_by_complexity` |
56
+ | Identify where an application starts (main, CLI, Lambda, server) | `get_entry_points` |
57
+ | Audit a module's exported public API surface | `get_public_api` |
58
+ | Find all TODO / FIXME / HACK comments | `get_todos` |
59
+ | Rank symbols by complexity score | `get_complexity_hotspots` |
60
+ | Understand type dependency relationships | `get_type_graph` |
61
+ | Find exported symbols with no test coverage | `find_untested_symbols` |
62
+ | Get a per-file test coverage map | `get_test_coverage_map` |
38
63
 
39
64
  ---
40
65
 
@@ -62,6 +87,14 @@ Always call `list_repos` before any code navigation. If the project is not liste
62
87
 
63
88
  **11. For dbt projects:** always run `dbt compile` before `index_folder`. Use `search_columns` for column lineage, `get_context_bundle` for model dependencies, and `search_symbols` with `kind: "route"` for API endpoints.
64
89
 
90
+ **12. Always run a pre-flight check before rename/delete/move.** Call `check_rename_safe`, `check_delete_safe`, or `check_move_safe` first. If `safe: false`, resolve the listed blockers before proceeding — never bypass string-literal conflicts.
91
+
92
+ **13. Before modifying an interface or base class:** call `find_implementations` to get every class that must be updated, and `get_class_hierarchy` to see the full descendant tree.
93
+
94
+ **14. Use `health_radar` for quick health assessment; `get_debt_report` for actionable detail.** `health_radar` is compact (A–F grade + 5 scores); `get_debt_report` has per-file rankings and recommendations.
95
+
96
+ **15. `search_ast` is for structural patterns, not symbol names.** Use it to find all try/catch blocks, all arrow functions, all JSX elements — things `search_symbols` cannot express. Node type names are case-sensitive tree-sitter names.
97
+
65
98
  ---
66
99
 
67
100
  ## Common patterns
@@ -95,3 +128,23 @@ get_churn_metrics → get_symbol_history for changed symbols → search_symbols
95
128
  ```
96
129
  get_quality_metrics → detect_antipatterns → get_architecture_doc (before) → [refactor] → detect_antipatterns (after)
97
130
  ```
131
+
132
+ **Rename / delete / move a symbol safely**
133
+ ```
134
+ check_rename_safe / check_delete_safe / check_move_safe → [resolve blockers if safe:false] → [edit] → find_dead_code
135
+ ```
136
+
137
+ **Modify an interface or base class**
138
+ ```
139
+ find_implementations → get_class_hierarchy (descendants) → get_blast_radius → [edit] → find_implementations (verify missingMethods=[])
140
+ ```
141
+
142
+ **Tech debt sprint**
143
+ ```
144
+ health_radar → get_debt_report → get_complexity_hotspots → find_untested_symbols → find_cycles → get_architecture_snapshot (before) → [fix] → get_architecture_snapshot (after) → diff_health_radar
145
+ ```
146
+
147
+ **Onboard to a new codebase**
148
+ ```
149
+ get_entry_points → get_public_api → get_context_bundle (from entry point) → get_type_graph → get_todos → get_test_coverage_map
150
+ ```
@@ -0,0 +1,561 @@
1
+ # PureContext MCP — Agent Reference
2
+
3
+ Full tool reference, navigation patterns, search tips, and known limitations.
4
+ The always-on instructions (mandatory workflow, decision rules, anti-patterns) live in `~/.claude/CLAUDE.md`.
5
+
6
+ ---
7
+
8
+ ## Indexing tools
9
+
10
+ ### `list_repos`
11
+ Always call this first. Returns all indexed repos with their `repoId`, path, file count, and last indexed time.
12
+
13
+ ### `index_folder`
14
+ Index a local directory. Returns `repoId`. Re-indexing is incremental — only changed files are re-parsed.
15
+
16
+ - `path` (required) — absolute path to project root
17
+ - `force` (optional) — set `true` to force re-index of all files, even unchanged ones
18
+ - `fileLimit` (optional) — override the configured file limit for this run
19
+
20
+ ### `resolve_repo`
21
+ Convert a local path to its `repoId` without indexing. Use when the project is already indexed but you don't have the `repoId` at hand.
22
+
23
+ ### `invalidate_cache`
24
+ Force a full re-index by clearing content hashes. Use when the index seems stale and `index_folder` is not picking up changes.
25
+
26
+ ### Keeping the index fresh
27
+
28
+ The file watcher triggers incremental re-indexing automatically. If you suspect the index is stale:
29
+
30
+ ```
31
+ index_folder({ path, force: false }) → incremental (changed files only)
32
+ index_folder({ path, force: true }) → full re-index (all files)
33
+ invalidate_cache({ repoId }) → clear hashes, then index_folder
34
+ ```
35
+
36
+ ---
37
+
38
+ ## Symbol search & retrieval
39
+
40
+ ### `search_symbols` — primary navigation tool
41
+ Search by name fragment. Use this for almost all navigation tasks.
42
+
43
+ ```json
44
+ { "repoId": "...", "query": "authenticate", "kind": "function", "limit": 10 }
45
+ ```
46
+
47
+ - Returns signatures and summaries — no source code
48
+ - `kind` filter: `function`, `class`, `method`, `route`, `component`, `hook`, `middleware`, etc.
49
+ - `camelCase`, `snake_case`, and space-separated queries are equivalent
50
+ - Use `mode: "hybrid"` for best recall when unsure of the exact name
51
+ - When the response includes `negative_evidence.verdict: "no_match"` — the symbol does not exist; do not re-search
52
+
53
+ ### `search_semantic`
54
+ Search by meaning, not name. Use when you know what the code does but not what it is called.
55
+
56
+ ```json
57
+ { "repoId": "...", "query": "validates user credentials and returns a session token", "mode": "hybrid", "max_results": 10 }
58
+ ```
59
+
60
+ Requires semantic search enabled in config. Falls back to FTS5 keyword search automatically if unavailable.
61
+
62
+ ### `search_text`
63
+ Grep-style full-text search. Use for literal strings, error messages, config values, comments — anything that is not a symbol name.
64
+
65
+ ```json
66
+ { "repoId": "...", "query": "TODO: fix this", "context_lines": 3 }
67
+ ```
68
+
69
+ ### `get_symbol_source`
70
+ Retrieve the source code of a specific symbol by its ID.
71
+
72
+ ```json
73
+ { "repoId": "...", "symbolId": "8f3a2c1d0e4b5f9a", "context_lines": 2 }
74
+ ```
75
+
76
+ - `symbolId` comes from `search_symbols` or `get_file_outline` results
77
+ - `context_lines` — include surrounding lines for additional context
78
+ - `verify: true` — confirm the source on disk matches the index (after recent file edits)
79
+
80
+ ### `get_symbols`
81
+ Batch-fetch multiple symbols by ID in a single call. Prefer this over calling `get_symbol_source` repeatedly.
82
+
83
+ ```json
84
+ { "repoId": "...", "symbolIds": ["id1", "id2", "id3"] }
85
+ ```
86
+
87
+ ### `get_file_content`
88
+ Retrieve raw file content with optional line range. Use only for content that is not a named symbol — top-level imports, configuration blocks, non-symbol prose.
89
+
90
+ ```json
91
+ { "repoId": "...", "filePath": "src/config/settings.ts", "startLine": 1, "endLine": 40 }
92
+ ```
93
+
94
+ ### `get_file_outline`
95
+ All symbols in a single file with signatures and summaries. Use to survey a file without reading its content.
96
+
97
+ ### `get_repo_outline`
98
+ All files in the repo with their top-level symbols. Use to orient yourself in an unfamiliar project.
99
+
100
+ ### `get_file_tree`
101
+ Directory tree with file counts. Use when you need to understand the project's folder structure.
102
+
103
+ ### `find_references`
104
+ Find all usage sites for a symbol across the repo. Use before renaming or modifying a symbol.
105
+
106
+ ---
107
+
108
+ ## Dependency graph tools
109
+
110
+ ### `get_context_bundle`
111
+ Forward-walk from a symbol — returns the symbol and everything it transitively imports. Use before modifying a function to understand its full context.
112
+
113
+ ```json
114
+ { "repoId": "...", "symbolId": "...", "maxDepth": 2, "maxTokens": 4000 }
115
+ ```
116
+
117
+ Use `maxTokens` to cap the response size when working with deeply connected code.
118
+
119
+ ### `get_blast_radius`
120
+ Reverse-walk — all files that transitively import a symbol. Use before modifying or deleting a symbol to understand what would break.
121
+
122
+ ```json
123
+ { "repoId": "...", "symbolId": "...", "maxDepth": 5 }
124
+ ```
125
+
126
+ ### `find_importers`
127
+ Direct (one-hop) importers of a file. Faster than `get_blast_radius` when you only need the immediate callers.
128
+
129
+ ### `find_dead_code`
130
+ Exported symbols that nothing else imports. Use for cleanup audits. May produce false positives for dynamic imports and symbols consumed by external npm consumers.
131
+
132
+ ---
133
+
134
+ ## Architecture & quality tools
135
+
136
+ ### `get_layer_violations`
137
+ Detect architectural import boundary violations. Requires layer boundaries defined in config.
138
+
139
+ ### `get_quality_metrics`
140
+ Per-file complexity, coupling, cohesion, and documentation coverage scores. Use instead of making subjective assessments from reading source code. Complexity scores are directional signals, not exact measurements.
141
+
142
+ ### `detect_antipatterns`
143
+ Detect common architectural anti-patterns (god classes, circular dependencies, dead code). Returns structured results with severity levels. Cannot detect runtime coupling or dynamic dispatch issues.
144
+
145
+ ### `get_architecture_doc`
146
+ Auto-generate an architecture summary in Markdown or Mermaid format. Requires `ai.allowRemoteAI: true`.
147
+
148
+ **Pre-refactoring workflow:**
149
+ ```
150
+ get_quality_metrics → find worst files
151
+ detect_antipatterns → find structural issues
152
+ get_blast_radius → understand impact scope
153
+ get_architecture_doc → generate "before" snapshot
154
+ [make changes]
155
+ detect_antipatterns → verify anti-patterns resolved
156
+ ```
157
+
158
+ ---
159
+
160
+ ## Git & history tools
161
+
162
+ ### `get_symbol_history`
163
+ Symbol-level git commit history. Returns structured JSON with commits, authors, and diffs.
164
+
165
+ - Rename/move breaks history continuity — symbols in renamed files start fresh history from the rename commit
166
+ - After a rebase, run `invalidate_cache` + `index_folder` to rebuild accurate history
167
+ - Default `maxCommits: 500` cap — increase `git.maxCommits` for history-sensitive workflows
168
+
169
+ ### `get_churn_metrics`
170
+ File and symbol churn metrics. Before modifying any symbol, check churn: if `churnScore > 6`, mention this to the user and suggest extra testing. High-churn files are under active development or chronically buggy.
171
+
172
+ For debugging, use `get_churn_metrics` to find recently-changed symbols — recent changes are the most likely source of new bugs.
173
+
174
+ ---
175
+
176
+ ## Cross-repo tools
177
+
178
+ ### `search_cross_repo`
179
+ Search symbols across multiple indexed repositories simultaneously.
180
+
181
+ ### `find_similar`
182
+ Find semantically similar code across repos. Before implementing new functionality, call this to check if equivalent code already exists. Requires semantic search enabled.
183
+
184
+ Before modifying shared library code, use `get_blast_radius` with `crossRepo: true`.
185
+
186
+ **Note:** `crossRepoDeps` requires explicit package name configuration — no auto-detection of Nx/Turborepo/Lerna workspaces.
187
+
188
+ ---
189
+
190
+ ## Ecosystem & data tools
191
+
192
+ ### `search_columns`
193
+ Search column definitions across dbt models. Returns full upstream/downstream lineage.
194
+
195
+ - dbt-only — does not search columns in raw SQL `CREATE TABLE` statements
196
+ - Always run `dbt compile` before `index_folder` — stale manifests produce incorrect lineage
197
+ - Use `search_symbols` with `kind: "route"` to find API endpoints via the OpenAPI provider
198
+
199
+ **Templating coverage:** Jinja preprocessing is dbt SQL only. Helm, Ansible Jinja2, Kubernetes YAML, ERB, and Kustomize are not preprocessed. Terraform is fully supported.
200
+
201
+ ---
202
+
203
+ ## Advanced relationship analysis tools
204
+
205
+ ### `find_implementations`
206
+ Find all concrete implementations of an interface or abstract class. Returns `implementedMethods` and `missingMethods` per class. Use before modifying an interface to know every class that must be updated.
207
+
208
+ - `includeAbstract` (optional) — also include abstract subclasses (default false)
209
+ - `limit` (optional) — max results (default 50)
210
+
211
+ ### `get_call_hierarchy`
212
+ Return callers and callees of a function, N levels deep, as a tree. Recursive calls marked `cyclic: true`.
213
+
214
+ ```json
215
+ { "repoId": "...", "symbolId": "...", "direction": "callees", "maxDepth": 3, "maxNodes": 50 }
216
+ ```
217
+
218
+ - `direction`: `"callees"`, `"callers"`, or `"both"`
219
+ - Uses import-edge graph, not runtime call data — dynamic dispatch, `eval`, and reflection are invisible
220
+
221
+ ### `get_class_hierarchy`
222
+ Full inheritance tree rooted at a class — ancestors (what it extends) and descendants (what extends it).
223
+
224
+ - `direction`: `"ancestors"`, `"descendants"`, or `"both"` (default)
225
+ - `maxDepth` (optional, default 5)
226
+
227
+ ### `find_cycles`
228
+ Detect circular import dependencies. Returns strongly-connected components with severity ratings.
229
+
230
+ - `scope` (optional) — directory prefix to restrict analysis
231
+ - `minCycleLength` (optional) — ignore trivial self-referential entries (default 2)
232
+
233
+ ### `get_coupling_map`
234
+ Afferent/efferent coupling metrics per file. Returns instability scores (`I = efferent / (afferent + efferent)`).
235
+
236
+ - `scope` (optional), `limit` (optional, default 50)
237
+
238
+ ---
239
+
240
+ ## Visualization tools
241
+
242
+ ### `render_diagram`
243
+ Generate a Mermaid or DOT diagram from the dependency graph.
244
+
245
+ ```json
246
+ { "repoId": "...", "type": "module", "format": "mermaid", "maxNodes": 30, "maxDepth": 3 }
247
+ ```
248
+
249
+ - `type`: `"module"` / `"import"` (file-level), `"call"` (call graph, requires `rootSymbolId`), `"class"` (hierarchy, requires `rootSymbolId`)
250
+ - `format`: `"mermaid"` (renders in GitHub, VS Code, Claude) or `"dot"` (Graphviz)
251
+ - Diagrams with >50 nodes become unreadable — use `maxNodes` to cap
252
+
253
+ ### `render_call_graph` / `render_import_graph` / `render_class_hierarchy` / `render_dep_matrix`
254
+ Specialized variants of `render_diagram` for specific diagram types.
255
+
256
+ ### `get_architecture_snapshot`
257
+ Capture the current architectural state: file count, symbol count, module breakdown, coupling summary, health scores. Take two snapshots (before/after a refactoring) to prove structural improvement objectively.
258
+
259
+ ---
260
+
261
+ ## Refactoring safety tools
262
+
263
+ Always run these before executing a structural change. They give a binary `safe` verdict.
264
+
265
+ ### `check_rename_safe`
266
+ ```json
267
+ { "repoId": "...", "symbolId": "...", "newName": "processOrderV2" }
268
+ ```
269
+ Returns `safe`, `verdict`, and all `affectedSites` with file, line, column, context snippet, and change type. `safe: false` when the new name conflicts with an existing symbol, or when string-literal references exist that require human judgment.
270
+
271
+ ### `check_delete_safe`
272
+ Returns `safe: false` if anything still imports or references the symbol. Lists all blocking references.
273
+
274
+ ### `check_move_safe`
275
+ Validates the move won't break imports, that the target file doesn't already define the same name, and returns all import statements that will need updating.
276
+
277
+ ### `plan_refactoring`
278
+ Generate a sequenced, dependency-ordered plan for a structural change.
279
+
280
+ ```json
281
+ { "repoId": "...", "description": "Extract auth logic from UserService into AuthService", "scope": "src/services/" }
282
+ ```
283
+
284
+ Step ordering is heuristic — validate against actual dependency analysis.
285
+
286
+ ---
287
+
288
+ ## Health & debt tools
289
+
290
+ ### `health_radar`
291
+ Five-axis health radar. Each axis scores 0–100 (100 = perfectly healthy).
292
+
293
+ | Axis | What it measures |
294
+ |------|-----------------|
295
+ | `complexity` | Inverse of average/peak cyclomatic complexity |
296
+ | `coupling` | Inverse of high-coupling file density |
297
+ | `maintainability` | Inverse of dead-code and god-class density |
298
+ | `documentation` | Percentage of symbols with non-trivial summaries |
299
+ | `stability` | Inverse of churn-hotspot density (requires git metadata) |
300
+
301
+ ```json
302
+ { "repoId": "...", "scope": "src/core/", "includeStability": true }
303
+ ```
304
+
305
+ Set `includeStability: false` if the repo has no git history.
306
+
307
+ ### `diff_health_radar`
308
+ Compare two health radar snapshots axis-by-axis. Use with `get_architecture_snapshot` for before/after evidence.
309
+
310
+ ### `get_debt_report`
311
+ Detailed debt report with per-file rankings, priority tiers, and actionable recommendations.
312
+
313
+ - `scope` (optional), `maxFiles` (optional, default 10), `includeDead` (optional)
314
+
315
+ ---
316
+
317
+ ## AST-level search tools
318
+
319
+ These re-parse stored file content using tree-sitter grammars. Only files backed by a WASM grammar are searched — regex-only handlers are silently skipped; use `search_text` for those.
320
+
321
+ ### `search_ast`
322
+ Find every occurrence of a specific tree-sitter node type.
323
+
324
+ ```json
325
+ { "repoId": "...", "nodeType": "try_statement", "filePath": "src/", "limit": 50 }
326
+ ```
327
+
328
+ Common node types:
329
+
330
+ | Language | Node types |
331
+ |----------|-----------|
332
+ | TypeScript/JS | `arrow_function`, `function_declaration`, `class_declaration`, `interface_declaration`, `try_statement`, `await_expression`, `call_expression`, `import_statement`, `jsx_element`, `throw_statement`, `type_alias_declaration` |
333
+ | Python | `function_definition`, `class_definition`, `for_statement`, `with_statement`, `decorated_definition`, `lambda` |
334
+ | Rust | `function_item`, `struct_item`, `impl_item`, `match_expression`, `closure_expression`, `trait_item` |
335
+ | Go | `function_declaration`, `method_declaration`, `go_statement`, `defer_statement`, `type_declaration` |
336
+
337
+ ### `search_by_signature`
338
+ Search symbols by type signature pattern (regex or substring).
339
+
340
+ ```json
341
+ { "repoId": "...", "pattern": "Promise<.*>", "kind": "function" }
342
+ ```
343
+
344
+ ### `search_by_decorator`
345
+ Find all symbols annotated with a specific decorator.
346
+
347
+ ```json
348
+ { "repoId": "...", "decorator": "Injectable", "kind": "class" }
349
+ ```
350
+
351
+ ### `search_by_complexity`
352
+ Find symbols above a complexity threshold.
353
+
354
+ ```json
355
+ { "repoId": "...", "minComplexity": 10, "kind": "function", "limit": 20 }
356
+ ```
357
+
358
+ ---
359
+
360
+ ## Code intelligence tools
361
+
362
+ ### `get_entry_points`
363
+ Identify all runnable entry points: main functions, CLI handlers, HTTP server startups, Lambda handlers, test suites, scripts. Each result includes `kind`, `confidence` (`high`/`medium`/`low`), and the reason for classification.
364
+
365
+ - `kind` (optional): `main_function`, `cli_handler`, `server_startup`, `lambda_handler`, `test_suite`, `script`
366
+ - `minConfidence` (optional): `"high"`, `"medium"`, or `"low"` (default)
367
+
368
+ ### `get_public_api`
369
+ All exported symbols grouped by file — the public API surface of the repo or a module.
370
+
371
+ - `filePath` (optional), `kind` (optional), `includeMembers` (optional), `groupByFile` (optional, default true)
372
+
373
+ ### `get_todos`
374
+ All TODO, FIXME, HACK, NOTE, and XXX comments. Returns file, line, tag type, and comment text.
375
+
376
+ - `tags` (optional), `filePath` (optional), `limit` (optional, default 200)
377
+
378
+ ### `get_complexity_hotspots`
379
+ Symbols ranked by complexity score, highest first.
380
+
381
+ - `kind` (optional), `filePath` (optional), `limit` (optional, default 20), `minComplexity` (optional)
382
+
383
+ ### `get_type_graph`
384
+ Type dependency graph — which types reference which other types.
385
+
386
+ - `symbolId` (optional) — root at a specific type
387
+ - `maxDepth` (optional, default 3)
388
+ - `direction`: `"uses"`, `"usedBy"`, or `"both"`
389
+
390
+ ### `find_untested_symbols`
391
+ Exported symbols with no corresponding test coverage (import-based heuristics, not runtime coverage).
392
+
393
+ - `filePath` (optional), `kind` (optional), `limit` (optional, default 50)
394
+
395
+ ### `get_test_coverage_map`
396
+ Per-file coverage map with `coverageRatio` per file and aggregated totals.
397
+
398
+ - `filePath` (optional), `includeSymbols` (optional, default false)
399
+
400
+ ---
401
+
402
+ ## Navigation patterns
403
+
404
+ ### Understand an unfamiliar codebase
405
+ ```
406
+ 1. list_repos() → check if indexed
407
+ 2. index_folder({ path }) → index if needed, get repoId
408
+ 3. get_repo_outline({ repoId }) → survey the structure
409
+ 4. search_symbols({ query: "..." }) → locate key symbols
410
+ 5. get_context_bundle({ symbolId }) → understand entry + dependencies
411
+ ```
412
+
413
+ ### Modify a function safely
414
+ ```
415
+ 1. search_symbols({ query: "functionName", kind: "function" })
416
+ 2. get_blast_radius({ symbolId }) → know the impact scope BEFORE touching it
417
+ 3. get_context_bundle({ symbolId, maxDepth: 2 }) → understand its context
418
+ 4. get_symbol_source({ symbolId }) → read the implementation
419
+ 5. [make the change]
420
+ 6. find_dead_code({ repoId }) → verify no orphaned exports left behind
421
+ ```
422
+
423
+ ### Modify a high-risk symbol safely
424
+ ```
425
+ 1. search_symbols({ query: "functionName", kind: "function" })
426
+ 2. get_churn_metrics({ repoId, symbolId }) → if churnScore > 6, warn the user
427
+ 3. get_symbol_history({ symbolId }) → understand recent change context
428
+ 4. get_blast_radius({ symbolId }) → know full impact scope
429
+ 5. get_context_bundle({ symbolId, maxDepth: 2 })
430
+ 6. get_symbol_source({ symbolId })
431
+ 7. [make the change]
432
+ 8. find_dead_code({ repoId })
433
+ ```
434
+
435
+ ### Find where something is called
436
+ ```
437
+ 1. search_symbols({ query: "symbolName" })
438
+ 2. find_references({ symbolId }) → all call sites
439
+ 3. get_symbol_source for relevant call sites
440
+ ```
441
+
442
+ ### Search when you know the concept but not the name
443
+ ```
444
+ 1. search_semantic({ query: "natural language description", mode: "hybrid" })
445
+ 2. Review signatures and summaries
446
+ 3. get_symbol_source for the best match
447
+ ```
448
+
449
+ ### Modify an interface or base class safely
450
+ ```
451
+ 1. search_symbols({ query: "InterfaceName", kind: "interface" })
452
+ 2. find_implementations({ symbolId }) → all classes that must be updated
453
+ 3. get_class_hierarchy({ symbolId, direction: "descendants" })
454
+ 4. get_blast_radius({ symbolId })
455
+ 5. [make the change]
456
+ 6. find_implementations({ symbolId }) → verify missingMethods is empty
457
+ ```
458
+
459
+ ### Refactor safely (rename / delete / move)
460
+ ```
461
+ 1. search_symbols({ query: "symbolName" })
462
+ 2. check_rename_safe / check_delete_safe / check_move_safe
463
+ 3. If safe: proceed. If not safe: resolve blockers in affectedSites first, then re-check.
464
+ 4. find_dead_code({ repoId }) → verify no orphaned exports remain
465
+ ```
466
+
467
+ ### Tech debt sprint
468
+ ```
469
+ 1. health_radar({ repoId }) → 5-axis baseline
470
+ 2. get_debt_report({ repoId }) → per-file rankings + recommendations
471
+ 3. get_complexity_hotspots({ repoId }) → worst functions first
472
+ 4. find_untested_symbols({ repoId }) → coverage gaps
473
+ 5. find_cycles({ repoId }) → circular deps to break
474
+ 6. get_architecture_snapshot({ repoId }) → baseline snapshot before changes
475
+ 7. [fix highest-priority items]
476
+ 8. get_architecture_snapshot({ repoId }) → after snapshot
477
+ 9. diff_health_radar({ before, after }) → prove the improvement
478
+ ```
479
+
480
+ ### Debug a recent regression
481
+ ```
482
+ 1. get_churn_metrics({ repoId }) → find recently-changed files
483
+ 2. get_symbol_history({ symbolId }) → check commits in the affected area
484
+ 3. search_symbols in changed files → find the suspect functions
485
+ 4. get_symbol_source → get_context_bundle → read and understand the change
486
+ ```
487
+
488
+ ### PR review
489
+ ```
490
+ 1. [obtain list of changed files from PR]
491
+ 2. get_symbol_history for changed symbols → understand prior context
492
+ 3. get_churn_metrics for changed files → flag hotspots
493
+ 4. get_blast_radius for each modified symbol
494
+ 5. detect_antipatterns({ repoId }) → flag new structural issues
495
+ ```
496
+
497
+ ### Architecture review / onboarding
498
+ ```
499
+ 1. list_repos → index_folder if needed
500
+ 2. get_architecture_doc({ repoId }) → generate project overview
501
+ 3. get_quality_metrics({ repoId }) → identify weakest files
502
+ 4. detect_antipatterns({ repoId }) → find structural issues
503
+ 5. get_repo_outline({ repoId }) → survey specific areas
504
+ ```
505
+
506
+ ---
507
+
508
+ ## Search tips
509
+
510
+ - **camelCase and snake_case are equivalent** — `processOrder` and `process_order` return the same results
511
+ - **Short queries rank better** — `auth` finds more than `authentication middleware function`
512
+ - **Use `kind` to narrow results** — `kind: "function"` eliminates class/method noise
513
+ - **Use `filePath` to scope** — `filePath: "src/auth/"` restricts to a directory
514
+ - **Use `debug: true` to diagnose ranking** — shows BM25 scores and name boost factors
515
+ - **For hybrid mode** — `semantic_weight: 0.6, keyword_weight: 0.4` is a good starting point
516
+
517
+ ---
518
+
519
+ ## `_tokenEstimate` and `_meta`
520
+
521
+ Every response includes:
522
+
523
+ ```json
524
+ "_meta": { "timing_ms": 3, "tokens_saved": 1842, "total_tokens_saved": 45231 }
525
+ ```
526
+
527
+ `_tokenEstimate` — rough token count of the returned payload. Use it to:
528
+ - Decide whether to fetch additional context or stop
529
+ - Cap `maxTokens` in `get_context_bundle` to avoid hitting context limits
530
+ - Track cumulative savings with `get_savings_stats`
531
+
532
+ ---
533
+
534
+ ## Known limitations
535
+
536
+ | Area | Limitation | Workaround |
537
+ |------|-----------|-----------|
538
+ | **AI Summaries** | Summaries describe intent, not contract. Stale summaries exist until re-index. | Always verify with `get_symbol_source` before modifying. |
539
+ | **AI Summaries** | `get_architecture_doc` requires `ai.allowRemoteAI: true`. | `detect_antipatterns` and `get_quality_metrics` work without AI. |
540
+ | **Git History** | Rename/move breaks history continuity. | Future: `git log --follow` tracking. |
541
+ | **Git History** | Rebase invalidates commit hashes — re-index required. | Run `invalidate_cache` + `index_folder` post-rebase. |
542
+ | **Git History** | Default `maxCommits: 500` drops early history on long-lived projects. | Increase `git.maxCommits` in config. |
543
+ | **Git History** | No SVN/Mercurial/Perforce support. | Git is a hard requirement for history features. |
544
+ | **Cross-Repo** | `crossRepoDeps` is manual — no auto-detection of Nx/Turborepo/pnpm workspaces. | Explicitly list package names in each repo's config. |
545
+ | **Cross-Repo** | `find_similar` requires semantic search and an embedding provider. | Use a local Ollama model as a zero-cost alternative. |
546
+ | **Cross-Repo** | MCP Resources `resources/subscribe` not yet supported by Claude Code or Cursor. | Poll with `search_cross_repo`. |
547
+ | **Architecture** | Quality metrics use estimated complexity (nesting heuristics), not true AST branch-counting. | Treat scores as directional signals. |
548
+ | **Architecture** | `detect_antipatterns` cannot detect runtime coupling or dynamic dispatch. | Complement with runtime profiling. |
549
+ | **Architecture** | `get_layer_violations` needs layer boundaries defined in config first. | Requires upfront config investment. |
550
+ | **Ecosystem** | Jinja preprocessing is dbt SQL only — Helm, Ansible, ERB, Kustomize not supported. | Use Terraform for IaC where possible. |
551
+ | **Ecosystem** | `search_columns` is dbt-only — does not cover `CREATE TABLE` SQL columns. | Use `get_symbol_source` on the `CREATE TABLE` symbol. |
552
+ | **Ecosystem** | dbt indexer does not detect stale `manifest.json`. | Always run `dbt compile` before `index_folder`. |
553
+ | **Relationship Analysis** | `find_implementations` may miss implementations in files that don't import the interface. | Check `get_blast_radius` for files that transitively depend on the interface file. |
554
+ | **Relationship Analysis** | `get_call_hierarchy` uses import-edge graph — dynamic dispatch, `eval`, and reflection are invisible. | Complement with runtime profiling for highly dynamic code. |
555
+ | **Visualization** | Mermaid diagrams with >50 nodes become unreadable. | Use `maxNodes` to cap; use `scope`/`filePath` to restrict to a module. |
556
+ | **Visualization** | DOT output requires Graphviz — not available natively in Claude or GitHub. | Use `format: "mermaid"`. |
557
+ | **Refactoring Safety** | `check_rename_safe` flags string-literal references but cannot determine if they are intentional. | String-literal blockers always require human review. |
558
+ | **Refactoring Safety** | `plan_refactoring` generates heuristic step ordering — effort is approximate. | Validate step order against actual dependency analysis. |
559
+ | **Health & Debt** | `health_radar` stability axis requires git metadata. | Set `includeStability: false` if no git history. |
560
+ | **Code Intelligence** | `find_untested_symbols` uses import heuristics, not runtime coverage. | Combine with Istanbul/c8 for precise branch-level coverage data. |
561
+ | **AST Search** | `search_ast` only searches files backed by a WASM grammar — regex-only handlers silently skipped. | Use `search_text` for content in unsupported file types. |