optave-codegraph 3.13.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 (1672) hide show
  1. package/LICENSE +190 -0
  2. package/README.md +984 -0
  3. package/dist/ast-analysis/engine.d.ts +19 -0
  4. package/dist/ast-analysis/engine.d.ts.map +1 -0
  5. package/dist/ast-analysis/engine.js +660 -0
  6. package/dist/ast-analysis/engine.js.map +1 -0
  7. package/dist/ast-analysis/metrics.d.ts +34 -0
  8. package/dist/ast-analysis/metrics.d.ts.map +1 -0
  9. package/dist/ast-analysis/metrics.js +123 -0
  10. package/dist/ast-analysis/metrics.js.map +1 -0
  11. package/dist/ast-analysis/rules/b2.d.ts +7 -0
  12. package/dist/ast-analysis/rules/b2.d.ts.map +1 -0
  13. package/dist/ast-analysis/rules/b2.js +240 -0
  14. package/dist/ast-analysis/rules/b2.js.map +1 -0
  15. package/dist/ast-analysis/rules/b3.d.ts +6 -0
  16. package/dist/ast-analysis/rules/b3.d.ts.map +1 -0
  17. package/dist/ast-analysis/rules/b3.js +105 -0
  18. package/dist/ast-analysis/rules/b3.js.map +1 -0
  19. package/dist/ast-analysis/rules/b4.d.ts +9 -0
  20. package/dist/ast-analysis/rules/b4.d.ts.map +1 -0
  21. package/dist/ast-analysis/rules/b4.js +361 -0
  22. package/dist/ast-analysis/rules/b4.js.map +1 -0
  23. package/dist/ast-analysis/rules/b5.d.ts +4 -0
  24. package/dist/ast-analysis/rules/b5.d.ts.map +1 -0
  25. package/dist/ast-analysis/rules/b5.js +52 -0
  26. package/dist/ast-analysis/rules/b5.js.map +1 -0
  27. package/dist/ast-analysis/rules/c.d.ts +4 -0
  28. package/dist/ast-analysis/rules/c.d.ts.map +1 -0
  29. package/dist/ast-analysis/rules/c.js +143 -0
  30. package/dist/ast-analysis/rules/c.js.map +1 -0
  31. package/dist/ast-analysis/rules/csharp.d.ts +7 -0
  32. package/dist/ast-analysis/rules/csharp.d.ts.map +1 -0
  33. package/dist/ast-analysis/rules/csharp.js +196 -0
  34. package/dist/ast-analysis/rules/csharp.js.map +1 -0
  35. package/dist/ast-analysis/rules/go.d.ts +7 -0
  36. package/dist/ast-analysis/rules/go.d.ts.map +1 -0
  37. package/dist/ast-analysis/rules/go.js +173 -0
  38. package/dist/ast-analysis/rules/go.js.map +1 -0
  39. package/dist/ast-analysis/rules/index.d.ts +13 -0
  40. package/dist/ast-analysis/rules/index.d.ts.map +1 -0
  41. package/dist/ast-analysis/rules/index.js +325 -0
  42. package/dist/ast-analysis/rules/index.js.map +1 -0
  43. package/dist/ast-analysis/rules/java.d.ts +7 -0
  44. package/dist/ast-analysis/rules/java.d.ts.map +1 -0
  45. package/dist/ast-analysis/rules/java.js +167 -0
  46. package/dist/ast-analysis/rules/java.js.map +1 -0
  47. package/dist/ast-analysis/rules/javascript.d.ts +7 -0
  48. package/dist/ast-analysis/rules/javascript.d.ts.map +1 -0
  49. package/dist/ast-analysis/rules/javascript.js +233 -0
  50. package/dist/ast-analysis/rules/javascript.js.map +1 -0
  51. package/dist/ast-analysis/rules/php.d.ts +7 -0
  52. package/dist/ast-analysis/rules/php.d.ts.map +1 -0
  53. package/dist/ast-analysis/rules/php.js +212 -0
  54. package/dist/ast-analysis/rules/php.js.map +1 -0
  55. package/dist/ast-analysis/rules/python.d.ts +7 -0
  56. package/dist/ast-analysis/rules/python.d.ts.map +1 -0
  57. package/dist/ast-analysis/rules/python.js +189 -0
  58. package/dist/ast-analysis/rules/python.js.map +1 -0
  59. package/dist/ast-analysis/rules/ruby.d.ts +7 -0
  60. package/dist/ast-analysis/rules/ruby.d.ts.map +1 -0
  61. package/dist/ast-analysis/rules/ruby.js +193 -0
  62. package/dist/ast-analysis/rules/ruby.js.map +1 -0
  63. package/dist/ast-analysis/rules/rust.d.ts +7 -0
  64. package/dist/ast-analysis/rules/rust.d.ts.map +1 -0
  65. package/dist/ast-analysis/rules/rust.js +166 -0
  66. package/dist/ast-analysis/rules/rust.js.map +1 -0
  67. package/dist/ast-analysis/shared.d.ts +12 -0
  68. package/dist/ast-analysis/shared.d.ts.map +1 -0
  69. package/dist/ast-analysis/shared.js +166 -0
  70. package/dist/ast-analysis/shared.js.map +1 -0
  71. package/dist/ast-analysis/visitor-utils.d.ts +70 -0
  72. package/dist/ast-analysis/visitor-utils.d.ts.map +1 -0
  73. package/dist/ast-analysis/visitor-utils.js +235 -0
  74. package/dist/ast-analysis/visitor-utils.js.map +1 -0
  75. package/dist/ast-analysis/visitor.d.ts +27 -0
  76. package/dist/ast-analysis/visitor.d.ts.map +1 -0
  77. package/dist/ast-analysis/visitor.js +178 -0
  78. package/dist/ast-analysis/visitor.js.map +1 -0
  79. package/dist/ast-analysis/visitors/ast-store-visitor.d.ts +4 -0
  80. package/dist/ast-analysis/visitors/ast-store-visitor.d.ts.map +1 -0
  81. package/dist/ast-analysis/visitors/ast-store-visitor.js +288 -0
  82. package/dist/ast-analysis/visitors/ast-store-visitor.js.map +1 -0
  83. package/dist/ast-analysis/visitors/cfg-conditionals.d.ts +5 -0
  84. package/dist/ast-analysis/visitors/cfg-conditionals.d.ts.map +1 -0
  85. package/dist/ast-analysis/visitors/cfg-conditionals.js +166 -0
  86. package/dist/ast-analysis/visitors/cfg-conditionals.js.map +1 -0
  87. package/dist/ast-analysis/visitors/cfg-loops.d.ts +7 -0
  88. package/dist/ast-analysis/visitors/cfg-loops.d.ts.map +1 -0
  89. package/dist/ast-analysis/visitors/cfg-loops.js +73 -0
  90. package/dist/ast-analysis/visitors/cfg-loops.js.map +1 -0
  91. package/dist/ast-analysis/visitors/cfg-shared.d.ts +56 -0
  92. package/dist/ast-analysis/visitors/cfg-shared.d.ts.map +1 -0
  93. package/dist/ast-analysis/visitors/cfg-shared.js +107 -0
  94. package/dist/ast-analysis/visitors/cfg-shared.js.map +1 -0
  95. package/dist/ast-analysis/visitors/cfg-try-catch.d.ts +4 -0
  96. package/dist/ast-analysis/visitors/cfg-try-catch.d.ts.map +1 -0
  97. package/dist/ast-analysis/visitors/cfg-try-catch.js +100 -0
  98. package/dist/ast-analysis/visitors/cfg-try-catch.js.map +1 -0
  99. package/dist/ast-analysis/visitors/cfg-visitor.d.ts +5 -0
  100. package/dist/ast-analysis/visitors/cfg-visitor.d.ts.map +1 -0
  101. package/dist/ast-analysis/visitors/cfg-visitor.js +231 -0
  102. package/dist/ast-analysis/visitors/cfg-visitor.js.map +1 -0
  103. package/dist/ast-analysis/visitors/complexity-visitor.d.ts +8 -0
  104. package/dist/ast-analysis/visitors/complexity-visitor.d.ts.map +1 -0
  105. package/dist/ast-analysis/visitors/complexity-visitor.js +233 -0
  106. package/dist/ast-analysis/visitors/complexity-visitor.js.map +1 -0
  107. package/dist/ast-analysis/visitors/dataflow-visitor.d.ts +5 -0
  108. package/dist/ast-analysis/visitors/dataflow-visitor.d.ts.map +1 -0
  109. package/dist/ast-analysis/visitors/dataflow-visitor.js +378 -0
  110. package/dist/ast-analysis/visitors/dataflow-visitor.js.map +1 -0
  111. package/dist/cli/commands/ast.d.ts +3 -0
  112. package/dist/cli/commands/ast.d.ts.map +1 -0
  113. package/dist/cli/commands/ast.js +23 -0
  114. package/dist/cli/commands/ast.js.map +1 -0
  115. package/dist/cli/commands/audit.d.ts +3 -0
  116. package/dist/cli/commands/audit.d.ts.map +1 -0
  117. package/dist/cli/commands/audit.js +47 -0
  118. package/dist/cli/commands/audit.js.map +1 -0
  119. package/dist/cli/commands/batch.d.ts +3 -0
  120. package/dist/cli/commands/batch.d.ts.map +1 -0
  121. package/dist/cli/commands/batch.js +66 -0
  122. package/dist/cli/commands/batch.js.map +1 -0
  123. package/dist/cli/commands/branch-compare.d.ts +3 -0
  124. package/dist/cli/commands/branch-compare.d.ts.map +1 -0
  125. package/dist/cli/commands/branch-compare.js +26 -0
  126. package/dist/cli/commands/branch-compare.js.map +1 -0
  127. package/dist/cli/commands/brief.d.ts +3 -0
  128. package/dist/cli/commands/brief.d.ts.map +1 -0
  129. package/dist/cli/commands/brief.js +12 -0
  130. package/dist/cli/commands/brief.js.map +1 -0
  131. package/dist/cli/commands/build.d.ts +3 -0
  132. package/dist/cli/commands/build.d.ts.map +1 -0
  133. package/dist/cli/commands/build.js +33 -0
  134. package/dist/cli/commands/build.js.map +1 -0
  135. package/dist/cli/commands/cfg.d.ts +3 -0
  136. package/dist/cli/commands/cfg.d.ts.map +1 -0
  137. package/dist/cli/commands/cfg.js +27 -0
  138. package/dist/cli/commands/cfg.js.map +1 -0
  139. package/dist/cli/commands/check.d.ts +3 -0
  140. package/dist/cli/commands/check.d.ts.map +1 -0
  141. package/dist/cli/commands/check.js +65 -0
  142. package/dist/cli/commands/check.js.map +1 -0
  143. package/dist/cli/commands/children.d.ts +3 -0
  144. package/dist/cli/commands/children.d.ts.map +1 -0
  145. package/dist/cli/commands/children.js +33 -0
  146. package/dist/cli/commands/children.js.map +1 -0
  147. package/dist/cli/commands/co-change.d.ts +3 -0
  148. package/dist/cli/commands/co-change.d.ts.map +1 -0
  149. package/dist/cli/commands/co-change.js +66 -0
  150. package/dist/cli/commands/co-change.js.map +1 -0
  151. package/dist/cli/commands/communities.d.ts +3 -0
  152. package/dist/cli/commands/communities.d.ts.map +1 -0
  153. package/dist/cli/commands/communities.js +20 -0
  154. package/dist/cli/commands/communities.js.map +1 -0
  155. package/dist/cli/commands/complexity.d.ts +3 -0
  156. package/dist/cli/commands/complexity.d.ts.map +1 -0
  157. package/dist/cli/commands/complexity.js +47 -0
  158. package/dist/cli/commands/complexity.js.map +1 -0
  159. package/dist/cli/commands/config.d.ts +3 -0
  160. package/dist/cli/commands/config.d.ts.map +1 -0
  161. package/dist/cli/commands/config.js +275 -0
  162. package/dist/cli/commands/config.js.map +1 -0
  163. package/dist/cli/commands/context.d.ts +3 -0
  164. package/dist/cli/commands/context.d.ts.map +1 -0
  165. package/dist/cli/commands/context.js +35 -0
  166. package/dist/cli/commands/context.js.map +1 -0
  167. package/dist/cli/commands/cycles.d.ts +3 -0
  168. package/dist/cli/commands/cycles.d.ts.map +1 -0
  169. package/dist/cli/commands/cycles.js +33 -0
  170. package/dist/cli/commands/cycles.js.map +1 -0
  171. package/dist/cli/commands/dataflow.d.ts +3 -0
  172. package/dist/cli/commands/dataflow.d.ts.map +1 -0
  173. package/dist/cli/commands/dataflow.js +29 -0
  174. package/dist/cli/commands/dataflow.js.map +1 -0
  175. package/dist/cli/commands/deps.d.ts +3 -0
  176. package/dist/cli/commands/deps.d.ts.map +1 -0
  177. package/dist/cli/commands/deps.js +18 -0
  178. package/dist/cli/commands/deps.js.map +1 -0
  179. package/dist/cli/commands/diff-impact.d.ts +3 -0
  180. package/dist/cli/commands/diff-impact.d.ts.map +1 -0
  181. package/dist/cli/commands/diff-impact.js +29 -0
  182. package/dist/cli/commands/diff-impact.js.map +1 -0
  183. package/dist/cli/commands/embed.d.ts +3 -0
  184. package/dist/cli/commands/embed.d.ts.map +1 -0
  185. package/dist/cli/commands/embed.js +75 -0
  186. package/dist/cli/commands/embed.js.map +1 -0
  187. package/dist/cli/commands/export.d.ts +3 -0
  188. package/dist/cli/commands/export.d.ts.map +1 -0
  189. package/dist/cli/commands/export.js +72 -0
  190. package/dist/cli/commands/export.js.map +1 -0
  191. package/dist/cli/commands/exports.d.ts +3 -0
  192. package/dist/cli/commands/exports.d.ts.map +1 -0
  193. package/dist/cli/commands/exports.js +14 -0
  194. package/dist/cli/commands/exports.js.map +1 -0
  195. package/dist/cli/commands/flow.d.ts +3 -0
  196. package/dist/cli/commands/flow.d.ts.map +1 -0
  197. package/dist/cli/commands/flow.js +32 -0
  198. package/dist/cli/commands/flow.js.map +1 -0
  199. package/dist/cli/commands/fn-impact.d.ts +3 -0
  200. package/dist/cli/commands/fn-impact.d.ts.map +1 -0
  201. package/dist/cli/commands/fn-impact.js +33 -0
  202. package/dist/cli/commands/fn-impact.js.map +1 -0
  203. package/dist/cli/commands/impact.d.ts +3 -0
  204. package/dist/cli/commands/impact.d.ts.map +1 -0
  205. package/dist/cli/commands/impact.js +12 -0
  206. package/dist/cli/commands/impact.js.map +1 -0
  207. package/dist/cli/commands/implementations.d.ts +3 -0
  208. package/dist/cli/commands/implementations.d.ts.map +1 -0
  209. package/dist/cli/commands/implementations.js +29 -0
  210. package/dist/cli/commands/implementations.js.map +1 -0
  211. package/dist/cli/commands/info.d.ts +3 -0
  212. package/dist/cli/commands/info.d.ts.map +1 -0
  213. package/dist/cli/commands/info.js +67 -0
  214. package/dist/cli/commands/info.js.map +1 -0
  215. package/dist/cli/commands/interfaces.d.ts +3 -0
  216. package/dist/cli/commands/interfaces.d.ts.map +1 -0
  217. package/dist/cli/commands/interfaces.js +29 -0
  218. package/dist/cli/commands/interfaces.js.map +1 -0
  219. package/dist/cli/commands/map.d.ts +3 -0
  220. package/dist/cli/commands/map.d.ts.map +1 -0
  221. package/dist/cli/commands/map.js +19 -0
  222. package/dist/cli/commands/map.js.map +1 -0
  223. package/dist/cli/commands/mcp.d.ts +3 -0
  224. package/dist/cli/commands/mcp.d.ts.map +1 -0
  225. package/dist/cli/commands/mcp.js +18 -0
  226. package/dist/cli/commands/mcp.js.map +1 -0
  227. package/dist/cli/commands/models.d.ts +3 -0
  228. package/dist/cli/commands/models.d.ts.map +1 -0
  229. package/dist/cli/commands/models.js +19 -0
  230. package/dist/cli/commands/models.js.map +1 -0
  231. package/dist/cli/commands/owners.d.ts +3 -0
  232. package/dist/cli/commands/owners.d.ts.map +1 -0
  233. package/dist/cli/commands/owners.js +27 -0
  234. package/dist/cli/commands/owners.js.map +1 -0
  235. package/dist/cli/commands/path.d.ts +3 -0
  236. package/dist/cli/commands/path.d.ts.map +1 -0
  237. package/dist/cli/commands/path.js +41 -0
  238. package/dist/cli/commands/path.js.map +1 -0
  239. package/dist/cli/commands/plot.d.ts +3 -0
  240. package/dist/cli/commands/plot.d.ts.map +1 -0
  241. package/dist/cli/commands/plot.js +96 -0
  242. package/dist/cli/commands/plot.js.map +1 -0
  243. package/dist/cli/commands/query.d.ts +3 -0
  244. package/dist/cli/commands/query.d.ts.map +1 -0
  245. package/dist/cli/commands/query.js +51 -0
  246. package/dist/cli/commands/query.js.map +1 -0
  247. package/dist/cli/commands/registry.d.ts +3 -0
  248. package/dist/cli/commands/registry.d.ts.map +1 -0
  249. package/dist/cli/commands/registry.js +95 -0
  250. package/dist/cli/commands/registry.js.map +1 -0
  251. package/dist/cli/commands/roles.d.ts +3 -0
  252. package/dist/cli/commands/roles.d.ts.map +1 -0
  253. package/dist/cli/commands/roles.js +36 -0
  254. package/dist/cli/commands/roles.js.map +1 -0
  255. package/dist/cli/commands/search.d.ts +3 -0
  256. package/dist/cli/commands/search.d.ts.map +1 -0
  257. package/dist/cli/commands/search.js +43 -0
  258. package/dist/cli/commands/search.js.map +1 -0
  259. package/dist/cli/commands/sequence.d.ts +3 -0
  260. package/dist/cli/commands/sequence.d.ts.map +1 -0
  261. package/dist/cli/commands/sequence.js +29 -0
  262. package/dist/cli/commands/sequence.js.map +1 -0
  263. package/dist/cli/commands/snapshot.d.ts +3 -0
  264. package/dist/cli/commands/snapshot.d.ts.map +1 -0
  265. package/dist/cli/commands/snapshot.js +61 -0
  266. package/dist/cli/commands/snapshot.js.map +1 -0
  267. package/dist/cli/commands/stats.d.ts +3 -0
  268. package/dist/cli/commands/stats.d.ts.map +1 -0
  269. package/dist/cli/commands/stats.js +15 -0
  270. package/dist/cli/commands/stats.js.map +1 -0
  271. package/dist/cli/commands/structure.d.ts +3 -0
  272. package/dist/cli/commands/structure.d.ts.map +1 -0
  273. package/dist/cli/commands/structure.js +50 -0
  274. package/dist/cli/commands/structure.js.map +1 -0
  275. package/dist/cli/commands/triage.d.ts +3 -0
  276. package/dist/cli/commands/triage.d.ts.map +1 -0
  277. package/dist/cli/commands/triage.js +89 -0
  278. package/dist/cli/commands/triage.js.map +1 -0
  279. package/dist/cli/commands/watch.d.ts +3 -0
  280. package/dist/cli/commands/watch.d.ts.map +1 -0
  281. package/dist/cli/commands/watch.js +28 -0
  282. package/dist/cli/commands/watch.js.map +1 -0
  283. package/dist/cli/commands/where.d.ts +3 -0
  284. package/dist/cli/commands/where.d.ts.map +1 -0
  285. package/dist/cli/commands/where.js +20 -0
  286. package/dist/cli/commands/where.js.map +1 -0
  287. package/dist/cli/index.d.ts +22 -0
  288. package/dist/cli/index.d.ts.map +1 -0
  289. package/dist/cli/index.js +139 -0
  290. package/dist/cli/index.js.map +1 -0
  291. package/dist/cli/shared/open-graph.d.ts +11 -0
  292. package/dist/cli/shared/open-graph.d.ts.map +1 -0
  293. package/dist/cli/shared/open-graph.js +9 -0
  294. package/dist/cli/shared/open-graph.js.map +1 -0
  295. package/dist/cli/shared/options.d.ts +25 -0
  296. package/dist/cli/shared/options.d.ts.map +1 -0
  297. package/dist/cli/shared/options.js +66 -0
  298. package/dist/cli/shared/options.js.map +1 -0
  299. package/dist/cli/shared/output.d.ts +2 -0
  300. package/dist/cli/shared/output.d.ts.map +1 -0
  301. package/dist/cli/shared/output.js +2 -0
  302. package/dist/cli/shared/output.js.map +1 -0
  303. package/dist/cli/types.d.ts +32 -0
  304. package/dist/cli/types.d.ts.map +1 -0
  305. package/dist/cli/types.js +2 -0
  306. package/dist/cli/types.js.map +1 -0
  307. package/dist/cli.d.ts +3 -0
  308. package/dist/cli.d.ts.map +1 -0
  309. package/dist/cli.js +38 -0
  310. package/dist/cli.js.map +1 -0
  311. package/dist/db/better-sqlite3.d.ts +4 -0
  312. package/dist/db/better-sqlite3.d.ts.map +1 -0
  313. package/dist/db/better-sqlite3.js +19 -0
  314. package/dist/db/better-sqlite3.js.map +1 -0
  315. package/dist/db/connection.d.ts +82 -0
  316. package/dist/db/connection.d.ts.map +1 -0
  317. package/dist/db/connection.js +444 -0
  318. package/dist/db/connection.js.map +1 -0
  319. package/dist/db/index.d.ts +6 -0
  320. package/dist/db/index.d.ts.map +1 -0
  321. package/dist/db/index.js +6 -0
  322. package/dist/db/index.js.map +1 -0
  323. package/dist/db/migrations.d.ts +11 -0
  324. package/dist/db/migrations.d.ts.map +1 -0
  325. package/dist/db/migrations.js +416 -0
  326. package/dist/db/migrations.js.map +1 -0
  327. package/dist/db/query-builder.d.ts +88 -0
  328. package/dist/db/query-builder.d.ts.map +1 -0
  329. package/dist/db/query-builder.js +321 -0
  330. package/dist/db/query-builder.js.map +1 -0
  331. package/dist/db/repository/base.d.ts +103 -0
  332. package/dist/db/repository/base.d.ts.map +1 -0
  333. package/dist/db/repository/base.js +172 -0
  334. package/dist/db/repository/base.js.map +1 -0
  335. package/dist/db/repository/build-stmts.d.ts +16 -0
  336. package/dist/db/repository/build-stmts.d.ts.map +1 -0
  337. package/dist/db/repository/build-stmts.js +76 -0
  338. package/dist/db/repository/build-stmts.js.map +1 -0
  339. package/dist/db/repository/cached-stmt.d.ts +9 -0
  340. package/dist/db/repository/cached-stmt.d.ts.map +1 -0
  341. package/dist/db/repository/cached-stmt.js +15 -0
  342. package/dist/db/repository/cached-stmt.js.map +1 -0
  343. package/dist/db/repository/cfg.d.ts +34 -0
  344. package/dist/db/repository/cfg.d.ts.map +1 -0
  345. package/dist/db/repository/cfg.js +46 -0
  346. package/dist/db/repository/cfg.js.map +1 -0
  347. package/dist/db/repository/cochange.d.ts +14 -0
  348. package/dist/db/repository/cochange.d.ts.map +1 -0
  349. package/dist/db/repository/cochange.js +38 -0
  350. package/dist/db/repository/cochange.js.map +1 -0
  351. package/dist/db/repository/complexity.d.ts +7 -0
  352. package/dist/db/repository/complexity.d.ts.map +1 -0
  353. package/dist/db/repository/complexity.js +12 -0
  354. package/dist/db/repository/complexity.js.map +1 -0
  355. package/dist/db/repository/dataflow.d.ts +11 -0
  356. package/dist/db/repository/dataflow.d.ts.map +1 -0
  357. package/dist/db/repository/dataflow.js +30 -0
  358. package/dist/db/repository/dataflow.js.map +1 -0
  359. package/dist/db/repository/edges.d.ts +66 -0
  360. package/dist/db/repository/edges.d.ts.map +1 -0
  361. package/dist/db/repository/edges.js +175 -0
  362. package/dist/db/repository/edges.js.map +1 -0
  363. package/dist/db/repository/embeddings.d.ts +14 -0
  364. package/dist/db/repository/embeddings.d.ts.map +1 -0
  365. package/dist/db/repository/embeddings.js +40 -0
  366. package/dist/db/repository/embeddings.js.map +1 -0
  367. package/dist/db/repository/graph-read.d.ts +18 -0
  368. package/dist/db/repository/graph-read.d.ts.map +1 -0
  369. package/dist/db/repository/graph-read.js +33 -0
  370. package/dist/db/repository/graph-read.js.map +1 -0
  371. package/dist/db/repository/in-memory-repository.d.ts +88 -0
  372. package/dist/db/repository/in-memory-repository.d.ts.map +1 -0
  373. package/dist/db/repository/in-memory-repository.js +541 -0
  374. package/dist/db/repository/in-memory-repository.js.map +1 -0
  375. package/dist/db/repository/index.d.ts +16 -0
  376. package/dist/db/repository/index.d.ts.map +1 -0
  377. package/dist/db/repository/index.js +16 -0
  378. package/dist/db/repository/index.js.map +1 -0
  379. package/dist/db/repository/native-repository.d.ts +70 -0
  380. package/dist/db/repository/native-repository.d.ts.map +1 -0
  381. package/dist/db/repository/native-repository.js +418 -0
  382. package/dist/db/repository/native-repository.js.map +1 -0
  383. package/dist/db/repository/nodes.d.ts +86 -0
  384. package/dist/db/repository/nodes.d.ts.map +1 -0
  385. package/dist/db/repository/nodes.js +203 -0
  386. package/dist/db/repository/nodes.js.map +1 -0
  387. package/dist/db/repository/sqlite-repository.d.ts +59 -0
  388. package/dist/db/repository/sqlite-repository.d.ts.map +1 -0
  389. package/dist/db/repository/sqlite-repository.js +199 -0
  390. package/dist/db/repository/sqlite-repository.js.map +1 -0
  391. package/dist/domain/analysis/brief.d.ts +25 -0
  392. package/dist/domain/analysis/brief.d.ts.map +1 -0
  393. package/dist/domain/analysis/brief.js +136 -0
  394. package/dist/domain/analysis/brief.js.map +1 -0
  395. package/dist/domain/analysis/context.d.ts +241 -0
  396. package/dist/domain/analysis/context.d.ts.map +1 -0
  397. package/dist/domain/analysis/context.js +361 -0
  398. package/dist/domain/analysis/context.js.map +1 -0
  399. package/dist/domain/analysis/dependencies.d.ts +158 -0
  400. package/dist/domain/analysis/dependencies.d.ts.map +1 -0
  401. package/dist/domain/analysis/dependencies.js +522 -0
  402. package/dist/domain/analysis/dependencies.js.map +1 -0
  403. package/dist/domain/analysis/diff-impact.d.ts +90 -0
  404. package/dist/domain/analysis/diff-impact.d.ts.map +1 -0
  405. package/dist/domain/analysis/diff-impact.js +301 -0
  406. package/dist/domain/analysis/diff-impact.js.map +1 -0
  407. package/dist/domain/analysis/exports.d.ts +8 -0
  408. package/dist/domain/analysis/exports.d.ts.map +1 -0
  409. package/dist/domain/analysis/exports.js +178 -0
  410. package/dist/domain/analysis/exports.js.map +1 -0
  411. package/dist/domain/analysis/fn-impact.d.ts +61 -0
  412. package/dist/domain/analysis/fn-impact.d.ts.map +1 -0
  413. package/dist/domain/analysis/fn-impact.js +190 -0
  414. package/dist/domain/analysis/fn-impact.js.map +1 -0
  415. package/dist/domain/analysis/impact.d.ts +11 -0
  416. package/dist/domain/analysis/impact.d.ts.map +1 -0
  417. package/dist/domain/analysis/impact.js +11 -0
  418. package/dist/domain/analysis/impact.js.map +1 -0
  419. package/dist/domain/analysis/implementations.d.ts +59 -0
  420. package/dist/domain/analysis/implementations.d.ts.map +1 -0
  421. package/dist/domain/analysis/implementations.js +65 -0
  422. package/dist/domain/analysis/implementations.js.map +1 -0
  423. package/dist/domain/analysis/module-map.d.ts +86 -0
  424. package/dist/domain/analysis/module-map.d.ts.map +1 -0
  425. package/dist/domain/analysis/module-map.js +468 -0
  426. package/dist/domain/analysis/module-map.js.map +1 -0
  427. package/dist/domain/analysis/query-helpers.d.ts +27 -0
  428. package/dist/domain/analysis/query-helpers.d.ts.map +1 -0
  429. package/dist/domain/analysis/query-helpers.js +41 -0
  430. package/dist/domain/analysis/query-helpers.js.map +1 -0
  431. package/dist/domain/analysis/roles.d.ts +20 -0
  432. package/dist/domain/analysis/roles.d.ts.map +1 -0
  433. package/dist/domain/analysis/roles.js +74 -0
  434. package/dist/domain/analysis/roles.js.map +1 -0
  435. package/dist/domain/analysis/symbol-lookup.d.ts +125 -0
  436. package/dist/domain/analysis/symbol-lookup.d.ts.map +1 -0
  437. package/dist/domain/analysis/symbol-lookup.js +206 -0
  438. package/dist/domain/analysis/symbol-lookup.js.map +1 -0
  439. package/dist/domain/graph/builder/call-resolver.d.ts +89 -0
  440. package/dist/domain/graph/builder/call-resolver.d.ts.map +1 -0
  441. package/dist/domain/graph/builder/call-resolver.js +212 -0
  442. package/dist/domain/graph/builder/call-resolver.js.map +1 -0
  443. package/dist/domain/graph/builder/cha.d.ts +69 -0
  444. package/dist/domain/graph/builder/cha.d.ts.map +1 -0
  445. package/dist/domain/graph/builder/cha.js +158 -0
  446. package/dist/domain/graph/builder/cha.js.map +1 -0
  447. package/dist/domain/graph/builder/context.d.ts +91 -0
  448. package/dist/domain/graph/builder/context.d.ts.map +1 -0
  449. package/dist/domain/graph/builder/context.js +66 -0
  450. package/dist/domain/graph/builder/context.js.map +1 -0
  451. package/dist/domain/graph/builder/helpers.d.ts +97 -0
  452. package/dist/domain/graph/builder/helpers.d.ts.map +1 -0
  453. package/dist/domain/graph/builder/helpers.js +558 -0
  454. package/dist/domain/graph/builder/helpers.js.map +1 -0
  455. package/dist/domain/graph/builder/incremental.d.ts +53 -0
  456. package/dist/domain/graph/builder/incremental.d.ts.map +1 -0
  457. package/dist/domain/graph/builder/incremental.js +647 -0
  458. package/dist/domain/graph/builder/incremental.js.map +1 -0
  459. package/dist/domain/graph/builder/native-db-proxy.d.ts +24 -0
  460. package/dist/domain/graph/builder/native-db-proxy.d.ts.map +1 -0
  461. package/dist/domain/graph/builder/native-db-proxy.js +91 -0
  462. package/dist/domain/graph/builder/native-db-proxy.js.map +1 -0
  463. package/dist/domain/graph/builder/pipeline.d.ts +9 -0
  464. package/dist/domain/graph/builder/pipeline.d.ts.map +1 -0
  465. package/dist/domain/graph/builder/pipeline.js +448 -0
  466. package/dist/domain/graph/builder/pipeline.js.map +1 -0
  467. package/dist/domain/graph/builder/stages/build-edges.d.ts +3 -0
  468. package/dist/domain/graph/builder/stages/build-edges.d.ts.map +1 -0
  469. package/dist/domain/graph/builder/stages/build-edges.js +1425 -0
  470. package/dist/domain/graph/builder/stages/build-edges.js.map +1 -0
  471. package/dist/domain/graph/builder/stages/build-structure.d.ts +3 -0
  472. package/dist/domain/graph/builder/stages/build-structure.d.ts.map +1 -0
  473. package/dist/domain/graph/builder/stages/build-structure.js +250 -0
  474. package/dist/domain/graph/builder/stages/build-structure.js.map +1 -0
  475. package/dist/domain/graph/builder/stages/collect-files.d.ts +3 -0
  476. package/dist/domain/graph/builder/stages/collect-files.d.ts.map +1 -0
  477. package/dist/domain/graph/builder/stages/collect-files.js +161 -0
  478. package/dist/domain/graph/builder/stages/collect-files.js.map +1 -0
  479. package/dist/domain/graph/builder/stages/detect-changes.d.ts +27 -0
  480. package/dist/domain/graph/builder/stages/detect-changes.d.ts.map +1 -0
  481. package/dist/domain/graph/builder/stages/detect-changes.js +593 -0
  482. package/dist/domain/graph/builder/stages/detect-changes.js.map +1 -0
  483. package/dist/domain/graph/builder/stages/finalize.d.ts +3 -0
  484. package/dist/domain/graph/builder/stages/finalize.d.ts.map +1 -0
  485. package/dist/domain/graph/builder/stages/finalize.js +274 -0
  486. package/dist/domain/graph/builder/stages/finalize.js.map +1 -0
  487. package/dist/domain/graph/builder/stages/insert-nodes.d.ts +35 -0
  488. package/dist/domain/graph/builder/stages/insert-nodes.d.ts.map +1 -0
  489. package/dist/domain/graph/builder/stages/insert-nodes.js +351 -0
  490. package/dist/domain/graph/builder/stages/insert-nodes.js.map +1 -0
  491. package/dist/domain/graph/builder/stages/native-db-lifecycle.d.ts +14 -0
  492. package/dist/domain/graph/builder/stages/native-db-lifecycle.d.ts.map +1 -0
  493. package/dist/domain/graph/builder/stages/native-db-lifecycle.js +77 -0
  494. package/dist/domain/graph/builder/stages/native-db-lifecycle.js.map +1 -0
  495. package/dist/domain/graph/builder/stages/native-orchestrator.d.ts +62 -0
  496. package/dist/domain/graph/builder/stages/native-orchestrator.d.ts.map +1 -0
  497. package/dist/domain/graph/builder/stages/native-orchestrator.js +1763 -0
  498. package/dist/domain/graph/builder/stages/native-orchestrator.js.map +1 -0
  499. package/dist/domain/graph/builder/stages/parse-files.d.ts +3 -0
  500. package/dist/domain/graph/builder/stages/parse-files.d.ts.map +1 -0
  501. package/dist/domain/graph/builder/stages/parse-files.js +22 -0
  502. package/dist/domain/graph/builder/stages/parse-files.js.map +1 -0
  503. package/dist/domain/graph/builder/stages/resolve-imports.d.ts +7 -0
  504. package/dist/domain/graph/builder/stages/resolve-imports.d.ts.map +1 -0
  505. package/dist/domain/graph/builder/stages/resolve-imports.js +231 -0
  506. package/dist/domain/graph/builder/stages/resolve-imports.js.map +1 -0
  507. package/dist/domain/graph/builder/stages/run-analyses.d.ts +3 -0
  508. package/dist/domain/graph/builder/stages/run-analyses.d.ts.map +1 -0
  509. package/dist/domain/graph/builder/stages/run-analyses.js +23 -0
  510. package/dist/domain/graph/builder/stages/run-analyses.js.map +1 -0
  511. package/dist/domain/graph/builder.d.ts +4 -0
  512. package/dist/domain/graph/builder.d.ts.map +1 -0
  513. package/dist/domain/graph/builder.js +6 -0
  514. package/dist/domain/graph/builder.js.map +1 -0
  515. package/dist/domain/graph/change-journal.d.ts +50 -0
  516. package/dist/domain/graph/change-journal.d.ts.map +1 -0
  517. package/dist/domain/graph/change-journal.js +97 -0
  518. package/dist/domain/graph/change-journal.js.map +1 -0
  519. package/dist/domain/graph/cycles.d.ts +19 -0
  520. package/dist/domain/graph/cycles.d.ts.map +1 -0
  521. package/dist/domain/graph/cycles.js +142 -0
  522. package/dist/domain/graph/cycles.js.map +1 -0
  523. package/dist/domain/graph/journal.d.ts +30 -0
  524. package/dist/domain/graph/journal.d.ts.map +1 -0
  525. package/dist/domain/graph/journal.js +360 -0
  526. package/dist/domain/graph/journal.js.map +1 -0
  527. package/dist/domain/graph/resolve.d.ts +67 -0
  528. package/dist/domain/graph/resolve.d.ts.map +1 -0
  529. package/dist/domain/graph/resolve.js +521 -0
  530. package/dist/domain/graph/resolve.js.map +1 -0
  531. package/dist/domain/graph/resolver/points-to.d.ts +53 -0
  532. package/dist/domain/graph/resolver/points-to.d.ts.map +1 -0
  533. package/dist/domain/graph/resolver/points-to.js +261 -0
  534. package/dist/domain/graph/resolver/points-to.js.map +1 -0
  535. package/dist/domain/graph/resolver/strategy.d.ts +61 -0
  536. package/dist/domain/graph/resolver/strategy.d.ts.map +1 -0
  537. package/dist/domain/graph/resolver/strategy.js +222 -0
  538. package/dist/domain/graph/resolver/strategy.js.map +1 -0
  539. package/dist/domain/graph/resolver/ts-resolver.d.ts +9 -0
  540. package/dist/domain/graph/resolver/ts-resolver.d.ts.map +1 -0
  541. package/dist/domain/graph/resolver/ts-resolver.js +476 -0
  542. package/dist/domain/graph/resolver/ts-resolver.js.map +1 -0
  543. package/dist/domain/graph/watcher.d.ts +23 -0
  544. package/dist/domain/graph/watcher.d.ts.map +1 -0
  545. package/dist/domain/graph/watcher.js +272 -0
  546. package/dist/domain/graph/watcher.js.map +1 -0
  547. package/dist/domain/parser.d.ts +128 -0
  548. package/dist/domain/parser.d.ts.map +1 -0
  549. package/dist/domain/parser.js +1246 -0
  550. package/dist/domain/parser.js.map +1 -0
  551. package/dist/domain/queries.d.ts +22 -0
  552. package/dist/domain/queries.d.ts.map +1 -0
  553. package/dist/domain/queries.js +26 -0
  554. package/dist/domain/queries.js.map +1 -0
  555. package/dist/domain/search/generator.d.ts +16 -0
  556. package/dist/domain/search/generator.d.ts.map +1 -0
  557. package/dist/domain/search/generator.js +181 -0
  558. package/dist/domain/search/generator.js.map +1 -0
  559. package/dist/domain/search/index.d.ts +15 -0
  560. package/dist/domain/search/index.d.ts.map +1 -0
  561. package/dist/domain/search/index.js +13 -0
  562. package/dist/domain/search/index.js.map +1 -0
  563. package/dist/domain/search/models.d.ts +63 -0
  564. package/dist/domain/search/models.d.ts.map +1 -0
  565. package/dist/domain/search/models.js +303 -0
  566. package/dist/domain/search/models.js.map +1 -0
  567. package/dist/domain/search/search/cli-formatter.d.ts +10 -0
  568. package/dist/domain/search/search/cli-formatter.d.ts.map +1 -0
  569. package/dist/domain/search/search/cli-formatter.js +134 -0
  570. package/dist/domain/search/search/cli-formatter.js.map +1 -0
  571. package/dist/domain/search/search/filters.d.ts +9 -0
  572. package/dist/domain/search/search/filters.d.ts.map +1 -0
  573. package/dist/domain/search/search/filters.js +31 -0
  574. package/dist/domain/search/search/filters.js.map +1 -0
  575. package/dist/domain/search/search/hybrid.d.ts +21 -0
  576. package/dist/domain/search/search/hybrid.d.ts.map +1 -0
  577. package/dist/domain/search/search/hybrid.js +122 -0
  578. package/dist/domain/search/search/hybrid.js.map +1 -0
  579. package/dist/domain/search/search/keyword.d.ts +18 -0
  580. package/dist/domain/search/search/keyword.d.ts.map +1 -0
  581. package/dist/domain/search/search/keyword.js +58 -0
  582. package/dist/domain/search/search/keyword.js.map +1 -0
  583. package/dist/domain/search/search/prepare.d.ts +25 -0
  584. package/dist/domain/search/search/prepare.d.ts.map +1 -0
  585. package/dist/domain/search/search/prepare.js +63 -0
  586. package/dist/domain/search/search/prepare.js.map +1 -0
  587. package/dist/domain/search/search/semantic.d.ts +41 -0
  588. package/dist/domain/search/search/semantic.d.ts.map +1 -0
  589. package/dist/domain/search/search/semantic.js +135 -0
  590. package/dist/domain/search/search/semantic.js.map +1 -0
  591. package/dist/domain/search/stores/fts5.d.ts +10 -0
  592. package/dist/domain/search/stores/fts5.d.ts.map +1 -0
  593. package/dist/domain/search/stores/fts5.js +27 -0
  594. package/dist/domain/search/stores/fts5.js.map +1 -0
  595. package/dist/domain/search/stores/sqlite-blob.d.ts +5 -0
  596. package/dist/domain/search/stores/sqlite-blob.d.ts.map +1 -0
  597. package/dist/domain/search/stores/sqlite-blob.js +16 -0
  598. package/dist/domain/search/stores/sqlite-blob.js.map +1 -0
  599. package/dist/domain/search/strategies/source.d.ts +6 -0
  600. package/dist/domain/search/strategies/source.d.ts.map +1 -0
  601. package/dist/domain/search/strategies/source.js +14 -0
  602. package/dist/domain/search/strategies/source.js.map +1 -0
  603. package/dist/domain/search/strategies/structured.d.ts +10 -0
  604. package/dist/domain/search/strategies/structured.d.ts.map +1 -0
  605. package/dist/domain/search/strategies/structured.js +35 -0
  606. package/dist/domain/search/strategies/structured.js.map +1 -0
  607. package/dist/domain/search/strategies/text-utils.d.ts +9 -0
  608. package/dist/domain/search/strategies/text-utils.d.ts.map +1 -0
  609. package/dist/domain/search/strategies/text-utils.js +45 -0
  610. package/dist/domain/search/strategies/text-utils.js.map +1 -0
  611. package/dist/domain/wasm-worker-entry.d.ts +24 -0
  612. package/dist/domain/wasm-worker-entry.d.ts.map +1 -0
  613. package/dist/domain/wasm-worker-entry.js +749 -0
  614. package/dist/domain/wasm-worker-entry.js.map +1 -0
  615. package/dist/domain/wasm-worker-pool.d.ts +59 -0
  616. package/dist/domain/wasm-worker-pool.d.ts.map +1 -0
  617. package/dist/domain/wasm-worker-pool.js +363 -0
  618. package/dist/domain/wasm-worker-pool.js.map +1 -0
  619. package/dist/domain/wasm-worker-protocol.d.ts +81 -0
  620. package/dist/domain/wasm-worker-protocol.d.ts.map +1 -0
  621. package/dist/domain/wasm-worker-protocol.js +13 -0
  622. package/dist/domain/wasm-worker-protocol.js.map +1 -0
  623. package/dist/extractors/bash.d.ts +6 -0
  624. package/dist/extractors/bash.d.ts.map +1 -0
  625. package/dist/extractors/bash.js +91 -0
  626. package/dist/extractors/bash.js.map +1 -0
  627. package/dist/extractors/c.d.ts +6 -0
  628. package/dist/extractors/c.d.ts.map +1 -0
  629. package/dist/extractors/c.js +223 -0
  630. package/dist/extractors/c.js.map +1 -0
  631. package/dist/extractors/clojure.d.ts +12 -0
  632. package/dist/extractors/clojure.d.ts.map +1 -0
  633. package/dist/extractors/clojure.js +245 -0
  634. package/dist/extractors/clojure.js.map +1 -0
  635. package/dist/extractors/cpp.d.ts +6 -0
  636. package/dist/extractors/cpp.d.ts.map +1 -0
  637. package/dist/extractors/cpp.js +365 -0
  638. package/dist/extractors/cpp.js.map +1 -0
  639. package/dist/extractors/csharp.d.ts +6 -0
  640. package/dist/extractors/csharp.d.ts.map +1 -0
  641. package/dist/extractors/csharp.js +430 -0
  642. package/dist/extractors/csharp.js.map +1 -0
  643. package/dist/extractors/cuda.d.ts +11 -0
  644. package/dist/extractors/cuda.d.ts.map +1 -0
  645. package/dist/extractors/cuda.js +419 -0
  646. package/dist/extractors/cuda.js.map +1 -0
  647. package/dist/extractors/dart.d.ts +6 -0
  648. package/dist/extractors/dart.d.ts.map +1 -0
  649. package/dist/extractors/dart.js +277 -0
  650. package/dist/extractors/dart.js.map +1 -0
  651. package/dist/extractors/elixir.d.ts +9 -0
  652. package/dist/extractors/elixir.d.ts.map +1 -0
  653. package/dist/extractors/elixir.js +327 -0
  654. package/dist/extractors/elixir.js.map +1 -0
  655. package/dist/extractors/erlang.d.ts +14 -0
  656. package/dist/extractors/erlang.d.ts.map +1 -0
  657. package/dist/extractors/erlang.js +275 -0
  658. package/dist/extractors/erlang.js.map +1 -0
  659. package/dist/extractors/fsharp.d.ts +20 -0
  660. package/dist/extractors/fsharp.d.ts.map +1 -0
  661. package/dist/extractors/fsharp.js +312 -0
  662. package/dist/extractors/fsharp.js.map +1 -0
  663. package/dist/extractors/gleam.d.ts +14 -0
  664. package/dist/extractors/gleam.d.ts.map +1 -0
  665. package/dist/extractors/gleam.js +225 -0
  666. package/dist/extractors/gleam.js.map +1 -0
  667. package/dist/extractors/go.d.ts +6 -0
  668. package/dist/extractors/go.d.ts.map +1 -0
  669. package/dist/extractors/go.js +460 -0
  670. package/dist/extractors/go.js.map +1 -0
  671. package/dist/extractors/groovy.d.ts +10 -0
  672. package/dist/extractors/groovy.d.ts.map +1 -0
  673. package/dist/extractors/groovy.js +403 -0
  674. package/dist/extractors/groovy.js.map +1 -0
  675. package/dist/extractors/haskell.d.ts +8 -0
  676. package/dist/extractors/haskell.d.ts.map +1 -0
  677. package/dist/extractors/haskell.js +261 -0
  678. package/dist/extractors/haskell.js.map +1 -0
  679. package/dist/extractors/hcl.d.ts +6 -0
  680. package/dist/extractors/hcl.d.ts.map +1 -0
  681. package/dist/extractors/hcl.js +114 -0
  682. package/dist/extractors/hcl.js.map +1 -0
  683. package/dist/extractors/helpers.d.ts +144 -0
  684. package/dist/extractors/helpers.d.ts.map +1 -0
  685. package/dist/extractors/helpers.js +360 -0
  686. package/dist/extractors/helpers.js.map +1 -0
  687. package/dist/extractors/index.d.ts +33 -0
  688. package/dist/extractors/index.d.ts.map +1 -0
  689. package/dist/extractors/index.js +33 -0
  690. package/dist/extractors/index.js.map +1 -0
  691. package/dist/extractors/java.d.ts +6 -0
  692. package/dist/extractors/java.d.ts.map +1 -0
  693. package/dist/extractors/java.js +390 -0
  694. package/dist/extractors/java.js.map +1 -0
  695. package/dist/extractors/javascript.d.ts +10 -0
  696. package/dist/extractors/javascript.d.ts.map +1 -0
  697. package/dist/extractors/javascript.js +3618 -0
  698. package/dist/extractors/javascript.js.map +1 -0
  699. package/dist/extractors/julia.d.ts +16 -0
  700. package/dist/extractors/julia.d.ts.map +1 -0
  701. package/dist/extractors/julia.js +411 -0
  702. package/dist/extractors/julia.js.map +1 -0
  703. package/dist/extractors/kotlin.d.ts +6 -0
  704. package/dist/extractors/kotlin.d.ts.map +1 -0
  705. package/dist/extractors/kotlin.js +340 -0
  706. package/dist/extractors/kotlin.js.map +1 -0
  707. package/dist/extractors/lua.d.ts +6 -0
  708. package/dist/extractors/lua.d.ts.map +1 -0
  709. package/dist/extractors/lua.js +162 -0
  710. package/dist/extractors/lua.js.map +1 -0
  711. package/dist/extractors/objc.d.ts +9 -0
  712. package/dist/extractors/objc.d.ts.map +1 -0
  713. package/dist/extractors/objc.js +543 -0
  714. package/dist/extractors/objc.js.map +1 -0
  715. package/dist/extractors/ocaml.d.ts +6 -0
  716. package/dist/extractors/ocaml.d.ts.map +1 -0
  717. package/dist/extractors/ocaml.js +310 -0
  718. package/dist/extractors/ocaml.js.map +1 -0
  719. package/dist/extractors/php.d.ts +6 -0
  720. package/dist/extractors/php.d.ts.map +1 -0
  721. package/dist/extractors/php.js +381 -0
  722. package/dist/extractors/php.js.map +1 -0
  723. package/dist/extractors/python.d.ts +6 -0
  724. package/dist/extractors/python.d.ts.map +1 -0
  725. package/dist/extractors/python.js +428 -0
  726. package/dist/extractors/python.js.map +1 -0
  727. package/dist/extractors/r.d.ts +13 -0
  728. package/dist/extractors/r.d.ts.map +1 -0
  729. package/dist/extractors/r.js +267 -0
  730. package/dist/extractors/r.js.map +1 -0
  731. package/dist/extractors/ruby.d.ts +6 -0
  732. package/dist/extractors/ruby.d.ts.map +1 -0
  733. package/dist/extractors/ruby.js +281 -0
  734. package/dist/extractors/ruby.js.map +1 -0
  735. package/dist/extractors/rust.d.ts +6 -0
  736. package/dist/extractors/rust.d.ts.map +1 -0
  737. package/dist/extractors/rust.js +354 -0
  738. package/dist/extractors/rust.js.map +1 -0
  739. package/dist/extractors/scala.d.ts +6 -0
  740. package/dist/extractors/scala.d.ts.map +1 -0
  741. package/dist/extractors/scala.js +315 -0
  742. package/dist/extractors/scala.js.map +1 -0
  743. package/dist/extractors/solidity.d.ts +9 -0
  744. package/dist/extractors/solidity.d.ts.map +1 -0
  745. package/dist/extractors/solidity.js +351 -0
  746. package/dist/extractors/solidity.js.map +1 -0
  747. package/dist/extractors/swift.d.ts +6 -0
  748. package/dist/extractors/swift.d.ts.map +1 -0
  749. package/dist/extractors/swift.js +326 -0
  750. package/dist/extractors/swift.js.map +1 -0
  751. package/dist/extractors/verilog.d.ts +9 -0
  752. package/dist/extractors/verilog.d.ts.map +1 -0
  753. package/dist/extractors/verilog.js +351 -0
  754. package/dist/extractors/verilog.js.map +1 -0
  755. package/dist/extractors/zig.d.ts +9 -0
  756. package/dist/extractors/zig.d.ts.map +1 -0
  757. package/dist/extractors/zig.js +274 -0
  758. package/dist/extractors/zig.js.map +1 -0
  759. package/dist/features/ast.d.ts +78 -0
  760. package/dist/features/ast.d.ts.map +1 -0
  761. package/dist/features/ast.js +228 -0
  762. package/dist/features/ast.js.map +1 -0
  763. package/dist/features/audit.d.ts +15 -0
  764. package/dist/features/audit.d.ts.map +1 -0
  765. package/dist/features/audit.js +275 -0
  766. package/dist/features/audit.js.map +1 -0
  767. package/dist/features/batch.d.ts +54 -0
  768. package/dist/features/batch.d.ts.map +1 -0
  769. package/dist/features/batch.js +97 -0
  770. package/dist/features/batch.js.map +1 -0
  771. package/dist/features/boundaries.d.ts +51 -0
  772. package/dist/features/boundaries.d.ts.map +1 -0
  773. package/dist/features/boundaries.js +248 -0
  774. package/dist/features/boundaries.js.map +1 -0
  775. package/dist/features/branch-compare.d.ts +71 -0
  776. package/dist/features/branch-compare.d.ts.map +1 -0
  777. package/dist/features/branch-compare.js +444 -0
  778. package/dist/features/branch-compare.js.map +1 -0
  779. package/dist/features/cfg.d.ts +79 -0
  780. package/dist/features/cfg.d.ts.map +1 -0
  781. package/dist/features/cfg.js +483 -0
  782. package/dist/features/cfg.js.map +1 -0
  783. package/dist/features/check.d.ts +84 -0
  784. package/dist/features/check.d.ts.map +1 -0
  785. package/dist/features/check.js +290 -0
  786. package/dist/features/check.js.map +1 -0
  787. package/dist/features/cochange.d.ts +68 -0
  788. package/dist/features/cochange.d.ts.map +1 -0
  789. package/dist/features/cochange.js +384 -0
  790. package/dist/features/cochange.js.map +1 -0
  791. package/dist/features/communities.d.ts +26 -0
  792. package/dist/features/communities.d.ts.map +1 -0
  793. package/dist/features/communities.js +149 -0
  794. package/dist/features/communities.js.map +1 -0
  795. package/dist/features/complexity-query.d.ts +37 -0
  796. package/dist/features/complexity-query.d.ts.map +1 -0
  797. package/dist/features/complexity-query.js +268 -0
  798. package/dist/features/complexity-query.js.map +1 -0
  799. package/dist/features/complexity.d.ts +52 -0
  800. package/dist/features/complexity.d.ts.map +1 -0
  801. package/dist/features/complexity.js +490 -0
  802. package/dist/features/complexity.js.map +1 -0
  803. package/dist/features/dataflow.d.ts +129 -0
  804. package/dist/features/dataflow.d.ts.map +1 -0
  805. package/dist/features/dataflow.js +1079 -0
  806. package/dist/features/dataflow.js.map +1 -0
  807. package/dist/features/export.d.ts +35 -0
  808. package/dist/features/export.d.ts.map +1 -0
  809. package/dist/features/export.js +340 -0
  810. package/dist/features/export.js.map +1 -0
  811. package/dist/features/flow.d.ts +21 -0
  812. package/dist/features/flow.d.ts.map +1 -0
  813. package/dist/features/flow.js +195 -0
  814. package/dist/features/flow.js.map +1 -0
  815. package/dist/features/graph-enrichment.d.ts +44 -0
  816. package/dist/features/graph-enrichment.d.ts.map +1 -0
  817. package/dist/features/graph-enrichment.js +312 -0
  818. package/dist/features/graph-enrichment.js.map +1 -0
  819. package/dist/features/manifesto.d.ts +23 -0
  820. package/dist/features/manifesto.d.ts.map +1 -0
  821. package/dist/features/manifesto.js +382 -0
  822. package/dist/features/manifesto.js.map +1 -0
  823. package/dist/features/owners.d.ts +60 -0
  824. package/dist/features/owners.d.ts.map +1 -0
  825. package/dist/features/owners.js +248 -0
  826. package/dist/features/owners.js.map +1 -0
  827. package/dist/features/sequence.d.ts +42 -0
  828. package/dist/features/sequence.d.ts.map +1 -0
  829. package/dist/features/sequence.js +271 -0
  830. package/dist/features/sequence.js.map +1 -0
  831. package/dist/features/shared/find-nodes.d.ts +7 -0
  832. package/dist/features/shared/find-nodes.d.ts.map +1 -0
  833. package/dist/features/shared/find-nodes.js +18 -0
  834. package/dist/features/shared/find-nodes.js.map +1 -0
  835. package/dist/features/snapshot.d.ts +25 -0
  836. package/dist/features/snapshot.d.ts.map +1 -0
  837. package/dist/features/snapshot.js +188 -0
  838. package/dist/features/snapshot.js.map +1 -0
  839. package/dist/features/structure-query.d.ts +76 -0
  840. package/dist/features/structure-query.d.ts.map +1 -0
  841. package/dist/features/structure-query.js +274 -0
  842. package/dist/features/structure-query.js.map +1 -0
  843. package/dist/features/structure.d.ts +39 -0
  844. package/dist/features/structure.d.ts.map +1 -0
  845. package/dist/features/structure.js +796 -0
  846. package/dist/features/structure.js.map +1 -0
  847. package/dist/features/triage.d.ts +47 -0
  848. package/dist/features/triage.d.ts.map +1 -0
  849. package/dist/features/triage.js +123 -0
  850. package/dist/features/triage.js.map +1 -0
  851. package/dist/graph/algorithms/bfs.d.ts +14 -0
  852. package/dist/graph/algorithms/bfs.d.ts.map +1 -0
  853. package/dist/graph/algorithms/bfs.js +72 -0
  854. package/dist/graph/algorithms/bfs.js.map +1 -0
  855. package/dist/graph/algorithms/centrality.d.ts +12 -0
  856. package/dist/graph/algorithms/centrality.d.ts.map +1 -0
  857. package/dist/graph/algorithms/centrality.js +42 -0
  858. package/dist/graph/algorithms/centrality.js.map +1 -0
  859. package/dist/graph/algorithms/index.d.ts +7 -0
  860. package/dist/graph/algorithms/index.d.ts.map +1 -0
  861. package/dist/graph/algorithms/index.js +7 -0
  862. package/dist/graph/algorithms/index.js.map +1 -0
  863. package/dist/graph/algorithms/leiden/adapter.d.ts +37 -0
  864. package/dist/graph/algorithms/leiden/adapter.d.ts.map +1 -0
  865. package/dist/graph/algorithms/leiden/adapter.js +173 -0
  866. package/dist/graph/algorithms/leiden/adapter.js.map +1 -0
  867. package/dist/graph/algorithms/leiden/cpm.d.ts +28 -0
  868. package/dist/graph/algorithms/leiden/cpm.d.ts.map +1 -0
  869. package/dist/graph/algorithms/leiden/cpm.js +48 -0
  870. package/dist/graph/algorithms/leiden/cpm.js.map +1 -0
  871. package/dist/graph/algorithms/leiden/index.d.ts +37 -0
  872. package/dist/graph/algorithms/leiden/index.d.ts.map +1 -0
  873. package/dist/graph/algorithms/leiden/index.js +157 -0
  874. package/dist/graph/algorithms/leiden/index.js.map +1 -0
  875. package/dist/graph/algorithms/leiden/modularity.d.ts +33 -0
  876. package/dist/graph/algorithms/leiden/modularity.d.ts.map +1 -0
  877. package/dist/graph/algorithms/leiden/modularity.js +80 -0
  878. package/dist/graph/algorithms/leiden/modularity.js.map +1 -0
  879. package/dist/graph/algorithms/leiden/optimiser.d.ts +62 -0
  880. package/dist/graph/algorithms/leiden/optimiser.d.ts.map +1 -0
  881. package/dist/graph/algorithms/leiden/optimiser.js +530 -0
  882. package/dist/graph/algorithms/leiden/optimiser.js.map +1 -0
  883. package/dist/graph/algorithms/leiden/partition.d.ts +44 -0
  884. package/dist/graph/algorithms/leiden/partition.d.ts.map +1 -0
  885. package/dist/graph/algorithms/leiden/partition.js +438 -0
  886. package/dist/graph/algorithms/leiden/partition.js.map +1 -0
  887. package/dist/graph/algorithms/leiden/rng.d.ts +9 -0
  888. package/dist/graph/algorithms/leiden/rng.d.ts.map +1 -0
  889. package/dist/graph/algorithms/leiden/rng.js +17 -0
  890. package/dist/graph/algorithms/leiden/rng.js.map +1 -0
  891. package/dist/graph/algorithms/louvain.d.ts +20 -0
  892. package/dist/graph/algorithms/louvain.d.ts.map +1 -0
  893. package/dist/graph/algorithms/louvain.js +52 -0
  894. package/dist/graph/algorithms/louvain.js.map +1 -0
  895. package/dist/graph/algorithms/shortest-path.d.ts +10 -0
  896. package/dist/graph/algorithms/shortest-path.d.ts.map +1 -0
  897. package/dist/graph/algorithms/shortest-path.js +55 -0
  898. package/dist/graph/algorithms/shortest-path.js.map +1 -0
  899. package/dist/graph/algorithms/tarjan.d.ts +9 -0
  900. package/dist/graph/algorithms/tarjan.d.ts.map +1 -0
  901. package/dist/graph/algorithms/tarjan.js +52 -0
  902. package/dist/graph/algorithms/tarjan.js.map +1 -0
  903. package/dist/graph/builders/dependency.d.ts +18 -0
  904. package/dist/graph/builders/dependency.d.ts.map +1 -0
  905. package/dist/graph/builders/dependency.js +101 -0
  906. package/dist/graph/builders/dependency.js.map +1 -0
  907. package/dist/graph/builders/index.d.ts +4 -0
  908. package/dist/graph/builders/index.d.ts.map +1 -0
  909. package/dist/graph/builders/index.js +4 -0
  910. package/dist/graph/builders/index.js.map +1 -0
  911. package/dist/graph/builders/structure.d.ts +10 -0
  912. package/dist/graph/builders/structure.d.ts.map +1 -0
  913. package/dist/graph/builders/structure.js +33 -0
  914. package/dist/graph/builders/structure.js.map +1 -0
  915. package/dist/graph/builders/temporal.d.ts +13 -0
  916. package/dist/graph/builders/temporal.d.ts.map +1 -0
  917. package/dist/graph/builders/temporal.js +29 -0
  918. package/dist/graph/builders/temporal.js.map +1 -0
  919. package/dist/graph/classifiers/index.d.ts +3 -0
  920. package/dist/graph/classifiers/index.d.ts.map +1 -0
  921. package/dist/graph/classifiers/index.js +3 -0
  922. package/dist/graph/classifiers/index.js.map +1 -0
  923. package/dist/graph/classifiers/risk.d.ts +39 -0
  924. package/dist/graph/classifiers/risk.d.ts.map +1 -0
  925. package/dist/graph/classifiers/risk.js +78 -0
  926. package/dist/graph/classifiers/risk.js.map +1 -0
  927. package/dist/graph/classifiers/roles.d.ts +48 -0
  928. package/dist/graph/classifiers/roles.d.ts.map +1 -0
  929. package/dist/graph/classifiers/roles.js +180 -0
  930. package/dist/graph/classifiers/roles.js.map +1 -0
  931. package/dist/graph/index.d.ts +5 -0
  932. package/dist/graph/index.d.ts.map +1 -0
  933. package/dist/graph/index.js +6 -0
  934. package/dist/graph/index.js.map +1 -0
  935. package/dist/graph/model.d.ts +57 -0
  936. package/dist/graph/model.d.ts.map +1 -0
  937. package/dist/graph/model.js +205 -0
  938. package/dist/graph/model.js.map +1 -0
  939. package/dist/index.cjs +16 -0
  940. package/dist/index.d.ts +37 -0
  941. package/dist/index.d.ts.map +1 -0
  942. package/dist/index.js +36 -0
  943. package/dist/index.js.map +1 -0
  944. package/dist/infrastructure/config.d.ts +281 -0
  945. package/dist/infrastructure/config.d.ts.map +1 -0
  946. package/dist/infrastructure/config.js +857 -0
  947. package/dist/infrastructure/config.js.map +1 -0
  948. package/dist/infrastructure/logger.d.ts +7 -0
  949. package/dist/infrastructure/logger.d.ts.map +1 -0
  950. package/dist/infrastructure/logger.js +21 -0
  951. package/dist/infrastructure/logger.js.map +1 -0
  952. package/dist/infrastructure/native.d.ts +38 -0
  953. package/dist/infrastructure/native.d.ts.map +1 -0
  954. package/dist/infrastructure/native.js +182 -0
  955. package/dist/infrastructure/native.js.map +1 -0
  956. package/dist/infrastructure/registry.d.ts +81 -0
  957. package/dist/infrastructure/registry.d.ts.map +1 -0
  958. package/dist/infrastructure/registry.js +229 -0
  959. package/dist/infrastructure/registry.js.map +1 -0
  960. package/dist/infrastructure/result-formatter.d.ts +2 -0
  961. package/dist/infrastructure/result-formatter.d.ts.map +1 -0
  962. package/dist/infrastructure/result-formatter.js +3 -0
  963. package/dist/infrastructure/result-formatter.js.map +1 -0
  964. package/dist/infrastructure/suppress.d.ts +25 -0
  965. package/dist/infrastructure/suppress.d.ts.map +1 -0
  966. package/dist/infrastructure/suppress.js +43 -0
  967. package/dist/infrastructure/suppress.js.map +1 -0
  968. package/dist/infrastructure/test-filter.d.ts +5 -0
  969. package/dist/infrastructure/test-filter.d.ts.map +1 -0
  970. package/dist/infrastructure/test-filter.js +7 -0
  971. package/dist/infrastructure/test-filter.js.map +1 -0
  972. package/dist/infrastructure/update-check.d.ts +26 -0
  973. package/dist/infrastructure/update-check.d.ts.map +1 -0
  974. package/dist/infrastructure/update-check.js +164 -0
  975. package/dist/infrastructure/update-check.js.map +1 -0
  976. package/dist/mcp/index.d.ts +3 -0
  977. package/dist/mcp/index.d.ts.map +1 -0
  978. package/dist/mcp/index.js +3 -0
  979. package/dist/mcp/index.js.map +1 -0
  980. package/dist/mcp/middleware.d.ts +26 -0
  981. package/dist/mcp/middleware.d.ts.map +1 -0
  982. package/dist/mcp/middleware.js +32 -0
  983. package/dist/mcp/middleware.js.map +1 -0
  984. package/dist/mcp/server.d.ts +14 -0
  985. package/dist/mcp/server.d.ts.map +1 -0
  986. package/dist/mcp/server.js +193 -0
  987. package/dist/mcp/server.js.map +1 -0
  988. package/dist/mcp/tool-registry.d.ts +21 -0
  989. package/dist/mcp/tool-registry.d.ts.map +1 -0
  990. package/dist/mcp/tool-registry.js +839 -0
  991. package/dist/mcp/tool-registry.js.map +1 -0
  992. package/dist/mcp/tools/ast-query.d.ts +14 -0
  993. package/dist/mcp/tools/ast-query.d.ts.map +1 -0
  994. package/dist/mcp/tools/ast-query.js +13 -0
  995. package/dist/mcp/tools/ast-query.js.map +1 -0
  996. package/dist/mcp/tools/audit.d.ts +15 -0
  997. package/dist/mcp/tools/audit.d.ts.map +1 -0
  998. package/dist/mcp/tools/audit.js +20 -0
  999. package/dist/mcp/tools/audit.js.map +1 -0
  1000. package/dist/mcp/tools/batch-query.d.ts +13 -0
  1001. package/dist/mcp/tools/batch-query.d.ts.map +1 -0
  1002. package/dist/mcp/tools/batch-query.js +11 -0
  1003. package/dist/mcp/tools/batch-query.js.map +1 -0
  1004. package/dist/mcp/tools/branch-compare.d.ts +12 -0
  1005. package/dist/mcp/tools/branch-compare.d.ts.map +1 -0
  1006. package/dist/mcp/tools/branch-compare.js +10 -0
  1007. package/dist/mcp/tools/branch-compare.js.map +1 -0
  1008. package/dist/mcp/tools/brief.d.ts +9 -0
  1009. package/dist/mcp/tools/brief.d.ts.map +1 -0
  1010. package/dist/mcp/tools/brief.js +8 -0
  1011. package/dist/mcp/tools/brief.js.map +1 -0
  1012. package/dist/mcp/tools/cfg.d.ts +14 -0
  1013. package/dist/mcp/tools/cfg.d.ts.map +1 -0
  1014. package/dist/mcp/tools/cfg.js +20 -0
  1015. package/dist/mcp/tools/cfg.js.map +1 -0
  1016. package/dist/mcp/tools/check.d.ts +20 -0
  1017. package/dist/mcp/tools/check.d.ts.map +1 -0
  1018. package/dist/mcp/tools/check.js +39 -0
  1019. package/dist/mcp/tools/check.js.map +1 -0
  1020. package/dist/mcp/tools/co-changes.d.ts +12 -0
  1021. package/dist/mcp/tools/co-changes.d.ts.map +1 -0
  1022. package/dist/mcp/tools/co-changes.js +19 -0
  1023. package/dist/mcp/tools/co-changes.js.map +1 -0
  1024. package/dist/mcp/tools/code-owners.d.ts +12 -0
  1025. package/dist/mcp/tools/code-owners.d.ts.map +1 -0
  1026. package/dist/mcp/tools/code-owners.js +12 -0
  1027. package/dist/mcp/tools/code-owners.js.map +1 -0
  1028. package/dist/mcp/tools/communities.d.ts +13 -0
  1029. package/dist/mcp/tools/communities.d.ts.map +1 -0
  1030. package/dist/mcp/tools/communities.js +14 -0
  1031. package/dist/mcp/tools/communities.js.map +1 -0
  1032. package/dist/mcp/tools/complexity.d.ts +16 -0
  1033. package/dist/mcp/tools/complexity.d.ts.map +1 -0
  1034. package/dist/mcp/tools/complexity.js +16 -0
  1035. package/dist/mcp/tools/complexity.js.map +1 -0
  1036. package/dist/mcp/tools/context.d.ts +16 -0
  1037. package/dist/mcp/tools/context.d.ts.map +1 -0
  1038. package/dist/mcp/tools/context.js +16 -0
  1039. package/dist/mcp/tools/context.js.map +1 -0
  1040. package/dist/mcp/tools/dataflow.d.ts +15 -0
  1041. package/dist/mcp/tools/dataflow.d.ts.map +1 -0
  1042. package/dist/mcp/tools/dataflow.js +25 -0
  1043. package/dist/mcp/tools/dataflow.js.map +1 -0
  1044. package/dist/mcp/tools/diff-impact.d.ts +14 -0
  1045. package/dist/mcp/tools/diff-impact.d.ts.map +1 -0
  1046. package/dist/mcp/tools/diff-impact.js +23 -0
  1047. package/dist/mcp/tools/diff-impact.js.map +1 -0
  1048. package/dist/mcp/tools/execution-flow.d.ts +15 -0
  1049. package/dist/mcp/tools/execution-flow.d.ts.map +1 -0
  1050. package/dist/mcp/tools/execution-flow.js +25 -0
  1051. package/dist/mcp/tools/execution-flow.js.map +1 -0
  1052. package/dist/mcp/tools/export-graph.d.ts +11 -0
  1053. package/dist/mcp/tools/export-graph.d.ts.map +1 -0
  1054. package/dist/mcp/tools/export-graph.js +57 -0
  1055. package/dist/mcp/tools/export-graph.js.map +1 -0
  1056. package/dist/mcp/tools/file-deps.d.ts +11 -0
  1057. package/dist/mcp/tools/file-deps.d.ts.map +1 -0
  1058. package/dist/mcp/tools/file-deps.js +11 -0
  1059. package/dist/mcp/tools/file-deps.js.map +1 -0
  1060. package/dist/mcp/tools/file-exports.d.ts +12 -0
  1061. package/dist/mcp/tools/file-exports.d.ts.map +1 -0
  1062. package/dist/mcp/tools/file-exports.js +12 -0
  1063. package/dist/mcp/tools/file-exports.js.map +1 -0
  1064. package/dist/mcp/tools/find-cycles.d.ts +7 -0
  1065. package/dist/mcp/tools/find-cycles.d.ts.map +1 -0
  1066. package/dist/mcp/tools/find-cycles.js +15 -0
  1067. package/dist/mcp/tools/find-cycles.js.map +1 -0
  1068. package/dist/mcp/tools/fn-impact.d.ts +14 -0
  1069. package/dist/mcp/tools/fn-impact.d.ts.map +1 -0
  1070. package/dist/mcp/tools/fn-impact.js +14 -0
  1071. package/dist/mcp/tools/fn-impact.js.map +1 -0
  1072. package/dist/mcp/tools/impact-analysis.d.ts +9 -0
  1073. package/dist/mcp/tools/impact-analysis.d.ts.map +1 -0
  1074. package/dist/mcp/tools/impact-analysis.js +8 -0
  1075. package/dist/mcp/tools/impact-analysis.js.map +1 -0
  1076. package/dist/mcp/tools/implementations.d.ts +13 -0
  1077. package/dist/mcp/tools/implementations.d.ts.map +1 -0
  1078. package/dist/mcp/tools/implementations.js +13 -0
  1079. package/dist/mcp/tools/implementations.js.map +1 -0
  1080. package/dist/mcp/tools/index.d.ts +7 -0
  1081. package/dist/mcp/tools/index.d.ts.map +1 -0
  1082. package/dist/mcp/tools/index.js +76 -0
  1083. package/dist/mcp/tools/index.js.map +1 -0
  1084. package/dist/mcp/tools/interfaces.d.ts +13 -0
  1085. package/dist/mcp/tools/interfaces.d.ts.map +1 -0
  1086. package/dist/mcp/tools/interfaces.js +13 -0
  1087. package/dist/mcp/tools/interfaces.js.map +1 -0
  1088. package/dist/mcp/tools/list-functions.d.ts +12 -0
  1089. package/dist/mcp/tools/list-functions.d.ts.map +1 -0
  1090. package/dist/mcp/tools/list-functions.js +13 -0
  1091. package/dist/mcp/tools/list-functions.js.map +1 -0
  1092. package/dist/mcp/tools/list-repos.d.ts +8 -0
  1093. package/dist/mcp/tools/list-repos.d.ts.map +1 -0
  1094. package/dist/mcp/tools/list-repos.js +11 -0
  1095. package/dist/mcp/tools/list-repos.js.map +1 -0
  1096. package/dist/mcp/tools/module-map.d.ts +9 -0
  1097. package/dist/mcp/tools/module-map.d.ts.map +1 -0
  1098. package/dist/mcp/tools/module-map.js +6 -0
  1099. package/dist/mcp/tools/module-map.js.map +1 -0
  1100. package/dist/mcp/tools/node-roles.d.ts +12 -0
  1101. package/dist/mcp/tools/node-roles.d.ts.map +1 -0
  1102. package/dist/mcp/tools/node-roles.js +13 -0
  1103. package/dist/mcp/tools/node-roles.js.map +1 -0
  1104. package/dist/mcp/tools/path.d.ts +15 -0
  1105. package/dist/mcp/tools/path.d.ts.map +1 -0
  1106. package/dist/mcp/tools/path.js +21 -0
  1107. package/dist/mcp/tools/path.js.map +1 -0
  1108. package/dist/mcp/tools/query.d.ts +20 -0
  1109. package/dist/mcp/tools/query.d.ts.map +1 -0
  1110. package/dist/mcp/tools/query.js +29 -0
  1111. package/dist/mcp/tools/query.js.map +1 -0
  1112. package/dist/mcp/tools/semantic-search.d.ts +13 -0
  1113. package/dist/mcp/tools/semantic-search.d.ts.map +1 -0
  1114. package/dist/mcp/tools/semantic-search.js +62 -0
  1115. package/dist/mcp/tools/semantic-search.js.map +1 -0
  1116. package/dist/mcp/tools/sequence.d.ts +16 -0
  1117. package/dist/mcp/tools/sequence.d.ts.map +1 -0
  1118. package/dist/mcp/tools/sequence.js +16 -0
  1119. package/dist/mcp/tools/sequence.js.map +1 -0
  1120. package/dist/mcp/tools/structure.d.ts +13 -0
  1121. package/dist/mcp/tools/structure.d.ts.map +1 -0
  1122. package/dist/mcp/tools/structure.js +14 -0
  1123. package/dist/mcp/tools/structure.js.map +1 -0
  1124. package/dist/mcp/tools/symbol-children.d.ts +13 -0
  1125. package/dist/mcp/tools/symbol-children.d.ts.map +1 -0
  1126. package/dist/mcp/tools/symbol-children.js +13 -0
  1127. package/dist/mcp/tools/symbol-children.js.map +1 -0
  1128. package/dist/mcp/tools/triage.d.ts +17 -0
  1129. package/dist/mcp/tools/triage.d.ts.map +1 -0
  1130. package/dist/mcp/tools/triage.js +34 -0
  1131. package/dist/mcp/tools/triage.js.map +1 -0
  1132. package/dist/mcp/tools/where.d.ts +12 -0
  1133. package/dist/mcp/tools/where.d.ts.map +1 -0
  1134. package/dist/mcp/tools/where.js +12 -0
  1135. package/dist/mcp/tools/where.js.map +1 -0
  1136. package/dist/mcp/types.d.ts +19 -0
  1137. package/dist/mcp/types.d.ts.map +1 -0
  1138. package/dist/mcp/types.js +6 -0
  1139. package/dist/mcp/types.js.map +1 -0
  1140. package/dist/presentation/audit.d.ts +15 -0
  1141. package/dist/presentation/audit.d.ts.map +1 -0
  1142. package/dist/presentation/audit.js +78 -0
  1143. package/dist/presentation/audit.js.map +1 -0
  1144. package/dist/presentation/batch.d.ts +20 -0
  1145. package/dist/presentation/batch.d.ts.map +1 -0
  1146. package/dist/presentation/batch.js +21 -0
  1147. package/dist/presentation/batch.js.map +1 -0
  1148. package/dist/presentation/branch-compare.d.ts +13 -0
  1149. package/dist/presentation/branch-compare.d.ts.map +1 -0
  1150. package/dist/presentation/branch-compare.js +91 -0
  1151. package/dist/presentation/branch-compare.js.map +1 -0
  1152. package/dist/presentation/brief.d.ts +9 -0
  1153. package/dist/presentation/brief.d.ts.map +1 -0
  1154. package/dist/presentation/brief.js +39 -0
  1155. package/dist/presentation/brief.js.map +1 -0
  1156. package/dist/presentation/cfg.d.ts +13 -0
  1157. package/dist/presentation/cfg.d.ts.map +1 -0
  1158. package/dist/presentation/cfg.js +62 -0
  1159. package/dist/presentation/cfg.js.map +1 -0
  1160. package/dist/presentation/check.d.ts +19 -0
  1161. package/dist/presentation/check.d.ts.map +1 -0
  1162. package/dist/presentation/check.js +74 -0
  1163. package/dist/presentation/check.js.map +1 -0
  1164. package/dist/presentation/cochange.d.ts +32 -0
  1165. package/dist/presentation/cochange.d.ts.map +1 -0
  1166. package/dist/presentation/cochange.js +33 -0
  1167. package/dist/presentation/cochange.js.map +1 -0
  1168. package/dist/presentation/colors.d.ts +12 -0
  1169. package/dist/presentation/colors.d.ts.map +1 -0
  1170. package/dist/presentation/colors.js +47 -0
  1171. package/dist/presentation/colors.js.map +1 -0
  1172. package/dist/presentation/communities.d.ts +11 -0
  1173. package/dist/presentation/communities.d.ts.map +1 -0
  1174. package/dist/presentation/communities.js +57 -0
  1175. package/dist/presentation/communities.js.map +1 -0
  1176. package/dist/presentation/complexity.d.ts +17 -0
  1177. package/dist/presentation/complexity.d.ts.map +1 -0
  1178. package/dist/presentation/complexity.js +59 -0
  1179. package/dist/presentation/complexity.js.map +1 -0
  1180. package/dist/presentation/dataflow.d.ts +14 -0
  1181. package/dist/presentation/dataflow.d.ts.map +1 -0
  1182. package/dist/presentation/dataflow.js +100 -0
  1183. package/dist/presentation/dataflow.js.map +1 -0
  1184. package/dist/presentation/diff-impact-mermaid.d.ts +11 -0
  1185. package/dist/presentation/diff-impact-mermaid.d.ts.map +1 -0
  1186. package/dist/presentation/diff-impact-mermaid.js +114 -0
  1187. package/dist/presentation/diff-impact-mermaid.js.map +1 -0
  1188. package/dist/presentation/export.d.ts +130 -0
  1189. package/dist/presentation/export.d.ts.map +1 -0
  1190. package/dist/presentation/export.js +311 -0
  1191. package/dist/presentation/export.js.map +1 -0
  1192. package/dist/presentation/flow.d.ts +16 -0
  1193. package/dist/presentation/flow.d.ts.map +1 -0
  1194. package/dist/presentation/flow.js +85 -0
  1195. package/dist/presentation/flow.js.map +1 -0
  1196. package/dist/presentation/manifesto.d.ts +13 -0
  1197. package/dist/presentation/manifesto.d.ts.map +1 -0
  1198. package/dist/presentation/manifesto.js +51 -0
  1199. package/dist/presentation/manifesto.js.map +1 -0
  1200. package/dist/presentation/owners.d.ts +16 -0
  1201. package/dist/presentation/owners.d.ts.map +1 -0
  1202. package/dist/presentation/owners.js +42 -0
  1203. package/dist/presentation/owners.js.map +1 -0
  1204. package/dist/presentation/queries-cli/exports.d.ts +12 -0
  1205. package/dist/presentation/queries-cli/exports.d.ts.map +1 -0
  1206. package/dist/presentation/queries-cli/exports.js +100 -0
  1207. package/dist/presentation/queries-cli/exports.js.map +1 -0
  1208. package/dist/presentation/queries-cli/impact.d.ts +23 -0
  1209. package/dist/presentation/queries-cli/impact.d.ts.map +1 -0
  1210. package/dist/presentation/queries-cli/impact.js +208 -0
  1211. package/dist/presentation/queries-cli/impact.js.map +1 -0
  1212. package/dist/presentation/queries-cli/index.d.ts +6 -0
  1213. package/dist/presentation/queries-cli/index.d.ts.map +1 -0
  1214. package/dist/presentation/queries-cli/index.js +6 -0
  1215. package/dist/presentation/queries-cli/index.js.map +1 -0
  1216. package/dist/presentation/queries-cli/inspect.d.ts +23 -0
  1217. package/dist/presentation/queries-cli/inspect.d.ts.map +1 -0
  1218. package/dist/presentation/queries-cli/inspect.js +376 -0
  1219. package/dist/presentation/queries-cli/inspect.js.map +1 -0
  1220. package/dist/presentation/queries-cli/overview.d.ts +19 -0
  1221. package/dist/presentation/queries-cli/overview.d.ts.map +1 -0
  1222. package/dist/presentation/queries-cli/overview.js +196 -0
  1223. package/dist/presentation/queries-cli/overview.js.map +1 -0
  1224. package/dist/presentation/queries-cli/path.d.ts +15 -0
  1225. package/dist/presentation/queries-cli/path.d.ts.map +1 -0
  1226. package/dist/presentation/queries-cli/path.js +101 -0
  1227. package/dist/presentation/queries-cli/path.js.map +1 -0
  1228. package/dist/presentation/queries-cli.d.ts +12 -0
  1229. package/dist/presentation/queries-cli.d.ts.map +1 -0
  1230. package/dist/presentation/queries-cli.js +12 -0
  1231. package/dist/presentation/queries-cli.js.map +1 -0
  1232. package/dist/presentation/query.d.ts +2 -0
  1233. package/dist/presentation/query.d.ts.map +1 -0
  1234. package/dist/presentation/query.js +2 -0
  1235. package/dist/presentation/query.js.map +1 -0
  1236. package/dist/presentation/result-formatter.d.ts +23 -0
  1237. package/dist/presentation/result-formatter.d.ts.map +1 -0
  1238. package/dist/presentation/result-formatter.js +122 -0
  1239. package/dist/presentation/result-formatter.js.map +1 -0
  1240. package/dist/presentation/sequence-renderer.d.ts +19 -0
  1241. package/dist/presentation/sequence-renderer.d.ts.map +1 -0
  1242. package/dist/presentation/sequence-renderer.js +23 -0
  1243. package/dist/presentation/sequence-renderer.js.map +1 -0
  1244. package/dist/presentation/sequence.d.ts +15 -0
  1245. package/dist/presentation/sequence.d.ts.map +1 -0
  1246. package/dist/presentation/sequence.js +26 -0
  1247. package/dist/presentation/sequence.js.map +1 -0
  1248. package/dist/presentation/structure.d.ts +46 -0
  1249. package/dist/presentation/structure.d.ts.map +1 -0
  1250. package/dist/presentation/structure.js +50 -0
  1251. package/dist/presentation/structure.js.map +1 -0
  1252. package/dist/presentation/table.d.ts +24 -0
  1253. package/dist/presentation/table.d.ts.map +1 -0
  1254. package/dist/presentation/table.js +33 -0
  1255. package/dist/presentation/table.js.map +1 -0
  1256. package/dist/presentation/triage.d.ts +19 -0
  1257. package/dist/presentation/triage.d.ts.map +1 -0
  1258. package/dist/presentation/triage.js +34 -0
  1259. package/dist/presentation/triage.js.map +1 -0
  1260. package/dist/presentation/viewer.d.ts +102 -0
  1261. package/dist/presentation/viewer.d.ts.map +1 -0
  1262. package/dist/presentation/viewer.js +618 -0
  1263. package/dist/presentation/viewer.js.map +1 -0
  1264. package/dist/shared/constants.d.ts +33 -0
  1265. package/dist/shared/constants.d.ts.map +1 -0
  1266. package/dist/shared/constants.js +54 -0
  1267. package/dist/shared/constants.js.map +1 -0
  1268. package/dist/shared/errors.d.ts +46 -0
  1269. package/dist/shared/errors.d.ts.map +1 -0
  1270. package/dist/shared/errors.js +69 -0
  1271. package/dist/shared/errors.js.map +1 -0
  1272. package/dist/shared/file-utils.d.ts +27 -0
  1273. package/dist/shared/file-utils.d.ts.map +1 -0
  1274. package/dist/shared/file-utils.js +186 -0
  1275. package/dist/shared/file-utils.js.map +1 -0
  1276. package/dist/shared/generators.d.ts +57 -0
  1277. package/dist/shared/generators.d.ts.map +1 -0
  1278. package/dist/shared/generators.js +106 -0
  1279. package/dist/shared/generators.js.map +1 -0
  1280. package/dist/shared/globs.d.ts +40 -0
  1281. package/dist/shared/globs.d.ts.map +1 -0
  1282. package/dist/shared/globs.js +126 -0
  1283. package/dist/shared/globs.js.map +1 -0
  1284. package/dist/shared/hierarchy.d.ts +9 -0
  1285. package/dist/shared/hierarchy.d.ts.map +1 -0
  1286. package/dist/shared/hierarchy.js +68 -0
  1287. package/dist/shared/hierarchy.js.map +1 -0
  1288. package/dist/shared/kinds.d.ts +12 -0
  1289. package/dist/shared/kinds.d.ts.map +1 -0
  1290. package/dist/shared/kinds.js +67 -0
  1291. package/dist/shared/kinds.js.map +1 -0
  1292. package/dist/shared/normalize.d.ts +49 -0
  1293. package/dist/shared/normalize.d.ts.map +1 -0
  1294. package/dist/shared/normalize.js +57 -0
  1295. package/dist/shared/normalize.js.map +1 -0
  1296. package/dist/shared/paginate.d.ts +32 -0
  1297. package/dist/shared/paginate.d.ts.map +1 -0
  1298. package/dist/shared/paginate.js +82 -0
  1299. package/dist/shared/paginate.js.map +1 -0
  1300. package/dist/shared/version.d.ts +2 -0
  1301. package/dist/shared/version.d.ts.map +1 -0
  1302. package/dist/shared/version.js +5 -0
  1303. package/dist/shared/version.js.map +1 -0
  1304. package/dist/types.d.ts +2468 -0
  1305. package/dist/types.d.ts.map +1 -0
  1306. package/dist/types.js +10 -0
  1307. package/dist/types.js.map +1 -0
  1308. package/grammars/tree-sitter-bash.wasm +0 -0
  1309. package/grammars/tree-sitter-c.wasm +0 -0
  1310. package/grammars/tree-sitter-c_sharp.wasm +0 -0
  1311. package/grammars/tree-sitter-clojure.wasm +0 -0
  1312. package/grammars/tree-sitter-cpp.wasm +0 -0
  1313. package/grammars/tree-sitter-cuda.wasm +0 -0
  1314. package/grammars/tree-sitter-dart.wasm +0 -0
  1315. package/grammars/tree-sitter-elixir.wasm +0 -0
  1316. package/grammars/tree-sitter-erlang.wasm +0 -0
  1317. package/grammars/tree-sitter-fsharp.wasm +0 -0
  1318. package/grammars/tree-sitter-fsharp_signature.wasm +0 -0
  1319. package/grammars/tree-sitter-gleam.wasm +0 -0
  1320. package/grammars/tree-sitter-go.wasm +0 -0
  1321. package/grammars/tree-sitter-groovy.wasm +0 -0
  1322. package/grammars/tree-sitter-haskell.wasm +0 -0
  1323. package/grammars/tree-sitter-hcl.wasm +0 -0
  1324. package/grammars/tree-sitter-java.wasm +0 -0
  1325. package/grammars/tree-sitter-javascript.wasm +0 -0
  1326. package/grammars/tree-sitter-julia.wasm +0 -0
  1327. package/grammars/tree-sitter-kotlin.wasm +0 -0
  1328. package/grammars/tree-sitter-lua.wasm +0 -0
  1329. package/grammars/tree-sitter-objc.wasm +0 -0
  1330. package/grammars/tree-sitter-ocaml.wasm +0 -0
  1331. package/grammars/tree-sitter-ocaml_interface.wasm +0 -0
  1332. package/grammars/tree-sitter-php.wasm +0 -0
  1333. package/grammars/tree-sitter-python.wasm +0 -0
  1334. package/grammars/tree-sitter-r.wasm +0 -0
  1335. package/grammars/tree-sitter-ruby.wasm +0 -0
  1336. package/grammars/tree-sitter-rust.wasm +0 -0
  1337. package/grammars/tree-sitter-scala.wasm +0 -0
  1338. package/grammars/tree-sitter-solidity.wasm +0 -0
  1339. package/grammars/tree-sitter-swift.wasm +0 -0
  1340. package/grammars/tree-sitter-tsx.wasm +0 -0
  1341. package/grammars/tree-sitter-typescript.wasm +0 -0
  1342. package/grammars/tree-sitter-verilog.wasm +0 -0
  1343. package/grammars/tree-sitter-zig.wasm +0 -0
  1344. package/package.json +188 -0
  1345. package/src/ast-analysis/engine.ts +926 -0
  1346. package/src/ast-analysis/metrics.ts +150 -0
  1347. package/src/ast-analysis/rules/b2.ts +263 -0
  1348. package/src/ast-analysis/rules/b3.ts +127 -0
  1349. package/src/ast-analysis/rules/b4.ts +378 -0
  1350. package/src/ast-analysis/rules/b5.ts +65 -0
  1351. package/src/ast-analysis/rules/c.ts +157 -0
  1352. package/src/ast-analysis/rules/csharp.ts +210 -0
  1353. package/src/ast-analysis/rules/go.ts +187 -0
  1354. package/src/ast-analysis/rules/index.ts +380 -0
  1355. package/src/ast-analysis/rules/java.ts +181 -0
  1356. package/src/ast-analysis/rules/javascript.ts +249 -0
  1357. package/src/ast-analysis/rules/php.ts +226 -0
  1358. package/src/ast-analysis/rules/python.ts +202 -0
  1359. package/src/ast-analysis/rules/ruby.ts +209 -0
  1360. package/src/ast-analysis/rules/rust.ts +179 -0
  1361. package/src/ast-analysis/shared.ts +223 -0
  1362. package/src/ast-analysis/visitor-utils.ts +278 -0
  1363. package/src/ast-analysis/visitor.ts +266 -0
  1364. package/src/ast-analysis/visitors/ast-store-visitor.ts +334 -0
  1365. package/src/ast-analysis/visitors/cfg-conditionals.ts +227 -0
  1366. package/src/ast-analysis/visitors/cfg-loops.ts +136 -0
  1367. package/src/ast-analysis/visitors/cfg-shared.ts +196 -0
  1368. package/src/ast-analysis/visitors/cfg-try-catch.ts +142 -0
  1369. package/src/ast-analysis/visitors/cfg-visitor.ts +367 -0
  1370. package/src/ast-analysis/visitors/complexity-visitor.ts +328 -0
  1371. package/src/ast-analysis/visitors/dataflow-visitor.ts +571 -0
  1372. package/src/cli/commands/ast.ts +24 -0
  1373. package/src/cli/commands/audit.ts +48 -0
  1374. package/src/cli/commands/batch.ts +66 -0
  1375. package/src/cli/commands/branch-compare.ts +27 -0
  1376. package/src/cli/commands/brief.ts +13 -0
  1377. package/src/cli/commands/build.ts +35 -0
  1378. package/src/cli/commands/cfg.ts +28 -0
  1379. package/src/cli/commands/check.ts +72 -0
  1380. package/src/cli/commands/children.ts +34 -0
  1381. package/src/cli/commands/co-change.ts +72 -0
  1382. package/src/cli/commands/communities.ts +21 -0
  1383. package/src/cli/commands/complexity.ts +48 -0
  1384. package/src/cli/commands/config.ts +353 -0
  1385. package/src/cli/commands/context.ts +36 -0
  1386. package/src/cli/commands/cycles.ts +33 -0
  1387. package/src/cli/commands/dataflow.ts +30 -0
  1388. package/src/cli/commands/deps.ts +18 -0
  1389. package/src/cli/commands/diff-impact.ts +30 -0
  1390. package/src/cli/commands/embed.ts +82 -0
  1391. package/src/cli/commands/export.ts +79 -0
  1392. package/src/cli/commands/exports.ts +15 -0
  1393. package/src/cli/commands/flow.ts +34 -0
  1394. package/src/cli/commands/fn-impact.ts +34 -0
  1395. package/src/cli/commands/impact.ts +13 -0
  1396. package/src/cli/commands/implementations.ts +30 -0
  1397. package/src/cli/commands/info.ts +79 -0
  1398. package/src/cli/commands/interfaces.ts +30 -0
  1399. package/src/cli/commands/map.ts +20 -0
  1400. package/src/cli/commands/mcp.ts +19 -0
  1401. package/src/cli/commands/models.ts +29 -0
  1402. package/src/cli/commands/owners.ts +28 -0
  1403. package/src/cli/commands/path.ts +42 -0
  1404. package/src/cli/commands/plot.ts +110 -0
  1405. package/src/cli/commands/query.ts +51 -0
  1406. package/src/cli/commands/registry.ts +106 -0
  1407. package/src/cli/commands/roles.ts +38 -0
  1408. package/src/cli/commands/search.ts +45 -0
  1409. package/src/cli/commands/sequence.ts +30 -0
  1410. package/src/cli/commands/snapshot.ts +67 -0
  1411. package/src/cli/commands/stats.ts +16 -0
  1412. package/src/cli/commands/structure.ts +55 -0
  1413. package/src/cli/commands/triage.ts +93 -0
  1414. package/src/cli/commands/watch.ts +29 -0
  1415. package/src/cli/commands/where.ts +21 -0
  1416. package/src/cli/index.ts +159 -0
  1417. package/src/cli/shared/open-graph.ts +13 -0
  1418. package/src/cli/shared/options.ts +69 -0
  1419. package/src/cli/shared/output.ts +1 -0
  1420. package/src/cli/types.ts +35 -0
  1421. package/src/cli.ts +37 -0
  1422. package/src/db/better-sqlite3.ts +21 -0
  1423. package/src/db/connection.ts +478 -0
  1424. package/src/db/index.ts +84 -0
  1425. package/src/db/migrations.ts +440 -0
  1426. package/src/db/query-builder.ts +371 -0
  1427. package/src/db/repository/base.ts +269 -0
  1428. package/src/db/repository/build-stmts.ts +126 -0
  1429. package/src/db/repository/cached-stmt.ts +20 -0
  1430. package/src/db/repository/cfg.ts +81 -0
  1431. package/src/db/repository/cochange.ts +48 -0
  1432. package/src/db/repository/complexity.ts +21 -0
  1433. package/src/db/repository/dataflow.ts +35 -0
  1434. package/src/db/repository/edges.ts +281 -0
  1435. package/src/db/repository/embeddings.ts +47 -0
  1436. package/src/db/repository/graph-read.ts +62 -0
  1437. package/src/db/repository/in-memory-repository.ts +657 -0
  1438. package/src/db/repository/index.ts +53 -0
  1439. package/src/db/repository/native-repository.ts +546 -0
  1440. package/src/db/repository/nodes.ts +322 -0
  1441. package/src/db/repository/sqlite-repository.ts +303 -0
  1442. package/src/domain/analysis/brief.ts +165 -0
  1443. package/src/domain/analysis/context.ts +537 -0
  1444. package/src/domain/analysis/dependencies.ts +738 -0
  1445. package/src/domain/analysis/diff-impact.ts +381 -0
  1446. package/src/domain/analysis/exports.ts +262 -0
  1447. package/src/domain/analysis/fn-impact.ts +311 -0
  1448. package/src/domain/analysis/impact.ts +11 -0
  1449. package/src/domain/analysis/implementations.ts +81 -0
  1450. package/src/domain/analysis/module-map.ts +576 -0
  1451. package/src/domain/analysis/query-helpers.ts +52 -0
  1452. package/src/domain/analysis/roles.ts +95 -0
  1453. package/src/domain/analysis/symbol-lookup.ts +284 -0
  1454. package/src/domain/graph/builder/call-resolver.ts +289 -0
  1455. package/src/domain/graph/builder/cha.ts +192 -0
  1456. package/src/domain/graph/builder/context.ts +120 -0
  1457. package/src/domain/graph/builder/helpers.ts +665 -0
  1458. package/src/domain/graph/builder/incremental.ts +987 -0
  1459. package/src/domain/graph/builder/native-db-proxy.ts +104 -0
  1460. package/src/domain/graph/builder/pipeline.ts +517 -0
  1461. package/src/domain/graph/builder/stages/build-edges.ts +1986 -0
  1462. package/src/domain/graph/builder/stages/build-structure.ts +330 -0
  1463. package/src/domain/graph/builder/stages/collect-files.ts +175 -0
  1464. package/src/domain/graph/builder/stages/detect-changes.ts +751 -0
  1465. package/src/domain/graph/builder/stages/finalize.ts +321 -0
  1466. package/src/domain/graph/builder/stages/insert-nodes.ts +489 -0
  1467. package/src/domain/graph/builder/stages/native-db-lifecycle.ts +74 -0
  1468. package/src/domain/graph/builder/stages/native-orchestrator.ts +2241 -0
  1469. package/src/domain/graph/builder/stages/parse-files.ts +26 -0
  1470. package/src/domain/graph/builder/stages/resolve-imports.ts +285 -0
  1471. package/src/domain/graph/builder/stages/run-analyses.ts +26 -0
  1472. package/src/domain/graph/builder.ts +11 -0
  1473. package/src/domain/graph/change-journal.ts +141 -0
  1474. package/src/domain/graph/cycles.ts +155 -0
  1475. package/src/domain/graph/journal.ts +377 -0
  1476. package/src/domain/graph/resolve.ts +579 -0
  1477. package/src/domain/graph/resolver/points-to.ts +377 -0
  1478. package/src/domain/graph/resolver/strategy.ts +265 -0
  1479. package/src/domain/graph/resolver/ts-resolver.ts +536 -0
  1480. package/src/domain/graph/watcher.ts +339 -0
  1481. package/src/domain/parser.ts +1437 -0
  1482. package/src/domain/queries.ts +50 -0
  1483. package/src/domain/search/generator.ts +260 -0
  1484. package/src/domain/search/index.ts +15 -0
  1485. package/src/domain/search/models.ts +356 -0
  1486. package/src/domain/search/search/cli-formatter.ts +179 -0
  1487. package/src/domain/search/search/filters.ts +38 -0
  1488. package/src/domain/search/search/hybrid.ts +197 -0
  1489. package/src/domain/search/search/keyword.ts +101 -0
  1490. package/src/domain/search/search/prepare.ts +95 -0
  1491. package/src/domain/search/search/semantic.ts +226 -0
  1492. package/src/domain/search/stores/fts5.ts +27 -0
  1493. package/src/domain/search/stores/sqlite-blob.ts +15 -0
  1494. package/src/domain/search/strategies/source.ts +19 -0
  1495. package/src/domain/search/strategies/structured.ts +48 -0
  1496. package/src/domain/search/strategies/text-utils.ts +41 -0
  1497. package/src/domain/wasm-worker-entry.ts +921 -0
  1498. package/src/domain/wasm-worker-pool.ts +375 -0
  1499. package/src/domain/wasm-worker-protocol.ts +98 -0
  1500. package/src/extractors/bash.ts +97 -0
  1501. package/src/extractors/c.ts +231 -0
  1502. package/src/extractors/clojure.ts +273 -0
  1503. package/src/extractors/cpp.ts +383 -0
  1504. package/src/extractors/csharp.ts +448 -0
  1505. package/src/extractors/cuda.ts +433 -0
  1506. package/src/extractors/dart.ts +304 -0
  1507. package/src/extractors/elixir.ts +350 -0
  1508. package/src/extractors/erlang.ts +295 -0
  1509. package/src/extractors/fsharp.ts +357 -0
  1510. package/src/extractors/gleam.ts +247 -0
  1511. package/src/extractors/go.ts +512 -0
  1512. package/src/extractors/groovy.ts +436 -0
  1513. package/src/extractors/haskell.ts +276 -0
  1514. package/src/extractors/hcl.ts +136 -0
  1515. package/src/extractors/helpers.ts +449 -0
  1516. package/src/extractors/index.ts +32 -0
  1517. package/src/extractors/java.ts +439 -0
  1518. package/src/extractors/javascript.ts +3844 -0
  1519. package/src/extractors/julia.ts +432 -0
  1520. package/src/extractors/kotlin.ts +358 -0
  1521. package/src/extractors/lua.ts +169 -0
  1522. package/src/extractors/objc.ts +555 -0
  1523. package/src/extractors/ocaml.ts +337 -0
  1524. package/src/extractors/php.ts +399 -0
  1525. package/src/extractors/python.ts +439 -0
  1526. package/src/extractors/r.ts +275 -0
  1527. package/src/extractors/ruby.ts +292 -0
  1528. package/src/extractors/rust.ts +371 -0
  1529. package/src/extractors/scala.ts +335 -0
  1530. package/src/extractors/solidity.ts +375 -0
  1531. package/src/extractors/swift.ts +337 -0
  1532. package/src/extractors/verilog.ts +383 -0
  1533. package/src/extractors/zig.ts +291 -0
  1534. package/src/features/ast.ts +405 -0
  1535. package/src/features/audit.ts +446 -0
  1536. package/src/features/batch.ts +182 -0
  1537. package/src/features/boundaries.ts +345 -0
  1538. package/src/features/branch-compare.ts +618 -0
  1539. package/src/features/cfg.ts +750 -0
  1540. package/src/features/check.ts +454 -0
  1541. package/src/features/cochange.ts +506 -0
  1542. package/src/features/communities.ts +232 -0
  1543. package/src/features/complexity-query.ts +388 -0
  1544. package/src/features/complexity.ts +753 -0
  1545. package/src/features/dataflow.ts +1654 -0
  1546. package/src/features/export.ts +486 -0
  1547. package/src/features/flow.ts +307 -0
  1548. package/src/features/graph-enrichment.ts +493 -0
  1549. package/src/features/manifesto.ts +508 -0
  1550. package/src/features/owners.ts +360 -0
  1551. package/src/features/sequence.ts +410 -0
  1552. package/src/features/shared/find-nodes.ts +28 -0
  1553. package/src/features/snapshot.ts +221 -0
  1554. package/src/features/structure-query.ts +456 -0
  1555. package/src/features/structure.ts +1100 -0
  1556. package/src/features/triage.ts +199 -0
  1557. package/src/graph/algorithms/bfs.ts +92 -0
  1558. package/src/graph/algorithms/centrality.ts +50 -0
  1559. package/src/graph/algorithms/index.ts +6 -0
  1560. package/src/graph/algorithms/leiden/LICENSE +24 -0
  1561. package/src/graph/algorithms/leiden/adapter.ts +252 -0
  1562. package/src/graph/algorithms/leiden/cpm.ts +77 -0
  1563. package/src/graph/algorithms/leiden/index.ts +224 -0
  1564. package/src/graph/algorithms/leiden/modularity.ts +122 -0
  1565. package/src/graph/algorithms/leiden/optimiser.ts +706 -0
  1566. package/src/graph/algorithms/leiden/partition.ts +577 -0
  1567. package/src/graph/algorithms/leiden/rng.ts +20 -0
  1568. package/src/graph/algorithms/louvain.ts +75 -0
  1569. package/src/graph/algorithms/shortest-path.ts +59 -0
  1570. package/src/graph/algorithms/tarjan.ts +55 -0
  1571. package/src/graph/builders/dependency.ts +148 -0
  1572. package/src/graph/builders/index.ts +3 -0
  1573. package/src/graph/builders/structure.ts +58 -0
  1574. package/src/graph/builders/temporal.ts +51 -0
  1575. package/src/graph/classifiers/index.ts +2 -0
  1576. package/src/graph/classifiers/risk.ts +123 -0
  1577. package/src/graph/classifiers/roles.ts +226 -0
  1578. package/src/graph/index.ts +13 -0
  1579. package/src/graph/model.ts +238 -0
  1580. package/src/index.cjs +16 -0
  1581. package/src/index.ts +72 -0
  1582. package/src/infrastructure/config.ts +954 -0
  1583. package/src/infrastructure/logger.ts +24 -0
  1584. package/src/infrastructure/native.ts +199 -0
  1585. package/src/infrastructure/registry.ts +313 -0
  1586. package/src/infrastructure/result-formatter.ts +2 -0
  1587. package/src/infrastructure/suppress.ts +47 -0
  1588. package/src/infrastructure/test-filter.ts +7 -0
  1589. package/src/infrastructure/update-check.ts +196 -0
  1590. package/src/mcp/index.ts +2 -0
  1591. package/src/mcp/middleware.ts +38 -0
  1592. package/src/mcp/server.ts +259 -0
  1593. package/src/mcp/tool-registry.ts +890 -0
  1594. package/src/mcp/tools/ast-query.ts +25 -0
  1595. package/src/mcp/tools/audit.ts +33 -0
  1596. package/src/mcp/tools/batch-query.ts +22 -0
  1597. package/src/mcp/tools/branch-compare.ts +22 -0
  1598. package/src/mcp/tools/brief.ts +15 -0
  1599. package/src/mcp/tools/cfg.ts +32 -0
  1600. package/src/mcp/tools/check.ts +60 -0
  1601. package/src/mcp/tools/co-changes.ts +29 -0
  1602. package/src/mcp/tools/code-owners.ts +22 -0
  1603. package/src/mcp/tools/communities.ts +25 -0
  1604. package/src/mcp/tools/complexity.ts +30 -0
  1605. package/src/mcp/tools/context.ts +30 -0
  1606. package/src/mcp/tools/dataflow.ts +38 -0
  1607. package/src/mcp/tools/diff-impact.ts +35 -0
  1608. package/src/mcp/tools/execution-flow.ts +38 -0
  1609. package/src/mcp/tools/export-graph.ts +67 -0
  1610. package/src/mcp/tools/file-deps.ts +20 -0
  1611. package/src/mcp/tools/file-exports.ts +22 -0
  1612. package/src/mcp/tools/find-cycles.ts +19 -0
  1613. package/src/mcp/tools/fn-impact.ts +26 -0
  1614. package/src/mcp/tools/impact-analysis.ts +15 -0
  1615. package/src/mcp/tools/implementations.ts +24 -0
  1616. package/src/mcp/tools/index.ts +81 -0
  1617. package/src/mcp/tools/interfaces.ts +24 -0
  1618. package/src/mcp/tools/list-functions.ts +23 -0
  1619. package/src/mcp/tools/list-repos.ts +17 -0
  1620. package/src/mcp/tools/module-map.ts +13 -0
  1621. package/src/mcp/tools/node-roles.ts +23 -0
  1622. package/src/mcp/tools/path.ts +34 -0
  1623. package/src/mcp/tools/query.ts +47 -0
  1624. package/src/mcp/tools/semantic-search.ts +76 -0
  1625. package/src/mcp/tools/sequence.ts +30 -0
  1626. package/src/mcp/tools/structure.ts +25 -0
  1627. package/src/mcp/tools/symbol-children.ts +24 -0
  1628. package/src/mcp/tools/triage.ts +50 -0
  1629. package/src/mcp/tools/where.ts +22 -0
  1630. package/src/mcp/types.ts +21 -0
  1631. package/src/presentation/audit.ts +109 -0
  1632. package/src/presentation/batch.ts +50 -0
  1633. package/src/presentation/branch-compare.ts +148 -0
  1634. package/src/presentation/brief.ts +63 -0
  1635. package/src/presentation/cfg.ts +103 -0
  1636. package/src/presentation/check.ts +138 -0
  1637. package/src/presentation/cochange.ts +57 -0
  1638. package/src/presentation/colors.ts +51 -0
  1639. package/src/presentation/communities.ts +114 -0
  1640. package/src/presentation/complexity.ts +127 -0
  1641. package/src/presentation/dataflow.ts +179 -0
  1642. package/src/presentation/diff-impact-mermaid.ts +169 -0
  1643. package/src/presentation/export.ts +509 -0
  1644. package/src/presentation/flow.ts +147 -0
  1645. package/src/presentation/manifesto.ts +92 -0
  1646. package/src/presentation/owners.ts +89 -0
  1647. package/src/presentation/queries-cli/exports.ts +152 -0
  1648. package/src/presentation/queries-cli/impact.ts +340 -0
  1649. package/src/presentation/queries-cli/index.ts +13 -0
  1650. package/src/presentation/queries-cli/inspect.ts +594 -0
  1651. package/src/presentation/queries-cli/overview.ts +375 -0
  1652. package/src/presentation/queries-cli/path.ts +187 -0
  1653. package/src/presentation/queries-cli.ts +30 -0
  1654. package/src/presentation/query.ts +17 -0
  1655. package/src/presentation/result-formatter.ts +161 -0
  1656. package/src/presentation/sequence-renderer.ts +46 -0
  1657. package/src/presentation/sequence.ts +43 -0
  1658. package/src/presentation/structure.ts +109 -0
  1659. package/src/presentation/table.ts +45 -0
  1660. package/src/presentation/triage.ts +84 -0
  1661. package/src/presentation/viewer.ts +715 -0
  1662. package/src/shared/constants.ts +70 -0
  1663. package/src/shared/errors.ts +85 -0
  1664. package/src/shared/file-utils.ts +233 -0
  1665. package/src/shared/generators.ts +176 -0
  1666. package/src/shared/globs.ts +121 -0
  1667. package/src/shared/hierarchy.ts +81 -0
  1668. package/src/shared/kinds.ts +85 -0
  1669. package/src/shared/normalize.ts +106 -0
  1670. package/src/shared/paginate.ts +93 -0
  1671. package/src/shared/version.ts +10 -0
  1672. package/src/types.ts +2871 -0
package/README.md ADDED
@@ -0,0 +1,984 @@
1
+ <p align="center">
2
+ <img src="https://img.shields.io/badge/codegraph-dependency%20intelligence-blue?style=for-the-badge&logo=graphql&logoColor=white" alt="codegraph" />
3
+ </p>
4
+
5
+ <h1 align="center">codegraph</h1>
6
+
7
+ <p align="center">
8
+ <strong>Give your AI the map before it starts exploring.</strong>
9
+ </p>
10
+
11
+ <p align="center">
12
+ <a href="https://www.npmjs.com/package/@optave/codegraph"><img src="https://img.shields.io/npm/v/@optave/codegraph?style=flat-square&logo=npm&logoColor=white&label=npm" alt="npm version" /></a>
13
+ <a href="https://github.com/optave/ops-codegraph-tool/blob/main/LICENSE"><img src="https://img.shields.io/github/license/optave/ops-codegraph-tool?style=flat-square&logo=opensourceinitiative&logoColor=white" alt="Apache-2.0 License" /></a>
14
+ <a href="https://github.com/optave/ops-codegraph-tool/actions"><img src="https://img.shields.io/github/actions/workflow/status/optave/ops-codegraph-tool/codegraph-impact.yml?style=flat-square&logo=githubactions&logoColor=white&label=CI" alt="CI" /></a>
15
+ <img src="https://img.shields.io/badge/node-%3E%3D22.6-339933?style=flat-square&logo=node.js&logoColor=white" alt="Node >= 22.6" />
16
+ </p>
17
+
18
+ <p align="center">
19
+ <a href="#the-problem">The Problem</a> &middot;
20
+ <a href="#what-codegraph-does">What It Does</a> &middot;
21
+ <a href="#-quick-start">Quick Start</a> &middot;
22
+ <a href="#-commands">Commands</a> &middot;
23
+ <a href="#-language-support">Languages</a> &middot;
24
+ <a href="#-ai-agent-integration-core">AI Integration</a> &middot;
25
+ <a href="#-how-it-works">How It Works</a> &middot;
26
+ <a href="#-recommended-practices">Practices</a> &middot;
27
+ <a href="#-roadmap">Roadmap</a>
28
+ </p>
29
+
30
+ ---
31
+
32
+ ## The Problem
33
+
34
+ AI agents face an impossible trade-off. They either spend thousands of tokens reading files to understand a codebase's structure — blowing up their context window until quality degrades — or they assume how things work, and the assumptions are often wrong. Either way, things break. The larger the codebase, the worse it gets.
35
+
36
+ An agent modifies a function without knowing 9 files import it. It misreads what a helper does and builds logic on top of that misunderstanding. It leaves dead code behind after a refactor. The PR gets opened, and your reviewer — human or automated — flags the same structural issues again and again: _"this breaks 14 callers,"_ _"that function already exists,"_ _"this export is now dead."_ If the reviewer catches it, that's multiple rounds of back-and-forth. If they don't, it can ship to production. Multiply that by every PR, every developer, every repo.
37
+
38
+ The information to prevent these issues exists — it's in the code itself. But without a structured map, agents lack the context to get it right consistently, reviewers waste cycles on preventable issues, and architecture degrades one unreviewed change at a time.
39
+
40
+ ## What Codegraph Does
41
+
42
+ Codegraph builds a function-level dependency graph of your entire codebase — every function, every caller, every dependency — and keeps it current with sub-second incremental rebuilds.
43
+
44
+ It parses your code with [tree-sitter](https://tree-sitter.github.io/) (native Rust or WASM), stores the graph in SQLite, and exposes it where it matters most:
45
+
46
+ - **MCP server** — AI agents query the graph directly through 34 tools — one call instead of dozens of `grep`/`find`/`cat` invocations
47
+ - **CLI** — developers and agents explore, query, and audit code from the terminal
48
+ - **CI gates** — `check` and `manifesto` commands enforce quality thresholds with exit codes
49
+ - **Programmatic API** — embed codegraph in your own tools via `npm install`
50
+
51
+ Instead of an agent editing code without structural context and letting reviewers catch the fallout, it knows _"this function has 14 callers across 9 files"_ before it touches anything. Dead exports, circular dependencies, and boundary violations surface during development — not during review. The result: PRs that need fewer review rounds.
52
+
53
+ **Free. Open source. Fully local.** Zero network calls, zero telemetry. Your code stays on your machine. When you want deeper intelligence, bring your own LLM provider — your code only goes where you choose to send it.
54
+
55
+ **Three commands to a queryable graph:**
56
+
57
+ ```bash
58
+ npm install -g @optave/codegraph
59
+ cd your-project
60
+ codegraph build
61
+ ```
62
+
63
+ No config files, no Docker, no JVM, no API keys, no accounts. Point your agent at the MCP server and it has structural awareness of your codebase.
64
+
65
+ ### Why it matters
66
+
67
+ | | Without codegraph | With codegraph |
68
+ |---|---|---|
69
+ | **Code review** | Reviewers flag broken callers, dead code, and boundary violations round after round | Structural issues are caught during development — PRs pass review with fewer rounds |
70
+ | **AI agents** | Modify `parseConfig()` without knowing 9 files import it — reviewer catches it | `fn-impact parseConfig` shows every caller before the edit — agent fixes it proactively |
71
+ | **AI agents** | Leave dead exports and duplicate helpers behind after refactors | Dead code, cycles, and duplicates surface in real time via hooks and MCP queries |
72
+ | **AI agents** | Produce code that works but doesn't fit the codebase structure | `context <name> -T` returns source, deps, callers, and tests — the agent writes code that fits |
73
+ | **CI pipelines** | Catch test failures but miss structural degradation | `check --staged` fails the build when blast radius or complexity thresholds are exceeded |
74
+ | **Developers** | Inherit a codebase and grep for hours to understand what calls what | `context handleAuth -T` gives the same structured view agents use |
75
+ | **Architects** | Draw boundary rules that erode within weeks | `manifesto` and `boundaries` enforce architecture rules on every commit |
76
+
77
+ ### Feature comparison
78
+
79
+ <sub>Comparison last verified: June 2026. Claims verified against each repo's README/docs. Full analysis: <a href="generated/competitive/COMPETITIVE_ANALYSIS.md">COMPETITIVE_ANALYSIS.md</a></sub>
80
+
81
+ | Capability | codegraph (this repo) | [code-review-graph](https://github.com/tirth8205/code-review-graph) | [narsil-mcp](https://github.com/postrv/narsil-mcp) | [codegraph (other)¹](https://github.com/colbymchenry/codegraph) | [axon](https://github.com/harshkedia177/axon) | [GitNexus](https://github.com/abhigyanpatwari/GitNexus) |
82
+ |---|:---:|:---:|:---:|:---:|:---:|:---:|
83
+ | GitHub stars | ![](https://img.shields.io/github/stars/optave/ops-codegraph-tool?style=flat-square&label=%E2%AD%90) | ![](https://img.shields.io/github/stars/tirth8205/code-review-graph?style=flat-square&label=%E2%AD%90) | ![](https://img.shields.io/github/stars/postrv/narsil-mcp?style=flat-square&label=%E2%AD%90) | ![](https://img.shields.io/github/stars/colbymchenry/codegraph?style=flat-square&label=%E2%AD%90) | ![](https://img.shields.io/github/stars/harshkedia177/axon?style=flat-square&label=%E2%AD%90) | ![](https://img.shields.io/github/stars/abhigyanpatwari/GitNexus?style=flat-square&label=%E2%AD%90) |
84
+ | Languages | **34** | ~30 | **32** | ~20 | 3 | 13 |
85
+ | MCP server | **Yes** | **Yes** | **Yes** | **Yes** | **Yes** | **Yes** |
86
+ | Dataflow + CFG + AST querying | **Yes** | AST only | **Yes**² | — | — | — |
87
+ | Hybrid search (BM25 + semantic) | **Yes** | **Yes** | — | Keyword only | **Yes** | **Yes** |
88
+ | Git-aware (diff impact, co-change, branch diff) | **All 3** | **All 3** | — | — | **All 3** | — |
89
+ | Dead code / role classification | **Yes** | **Yes** | **Yes** | — | **Yes** | — |
90
+ | Incremental rebuilds | **O(changed)** | **O(changed)** | O(n) | O(n)³ | **Yes**⁴ | O(n)⁵ |
91
+ | Architecture rules + CI gate | **Yes** | — | — | — | — | — |
92
+ | Security scanning (SAST / vuln detection) | Intentionally out of scope⁶ | — | **Yes** | — | — | — |
93
+ | Zero config, `npm install` | **Yes** | — (pip) | **Yes** | **Yes** | **Yes** | **Yes** |
94
+ | Graph export (GraphML / Neo4j / DOT) | **Yes** | — | — | — | — | — |
95
+ | Open source + commercial use | **Yes** (Apache-2.0) | **Yes** (MIT) | **Yes** (MIT/Apache-2.0) | **Yes** (MIT) | Source-available⁷ | Non-commercial⁸ |
96
+
97
+ <sup>¹ colbymchenry/codegraph is an unrelated tool that shares the name. It focuses on reducing AI agent token consumption by pre-indexing code structure for fast context retrieval — not on structural analysis, CI gates, or complexity metrics. ² narsil-mcp added CFG and dataflow in recent versions. ³ colbymchenry/codegraph uses OS file watchers (chokidar) for auto-sync — rebuild triggers on file change but re-parses from scratch per file, not O(changed) hashing. ⁴ axon caches file-level parse results; the rebuild strategy is consistent with file-level incremental behaviour but has not been independently benchmarked for O(changed) complexity. ⁵ GitNexus skips re-index if the git commit hasn't changed, but re-processes the entire repo when it does — no per-file incremental parsing. ⁶ Codegraph focuses on structural understanding, not vulnerability detection — use dedicated SAST tools (Semgrep, CodeQL, Snyk) for that. ⁷ axon claims MIT in pyproject.toml but has no LICENSE file in the repo. ⁸ GitNexus uses the PolyForm Noncommercial 1.0.0 license.</sup>
98
+
99
+ ### What makes codegraph different
100
+
101
+ | | Differentiator | In practice |
102
+ |---|---|---|
103
+ | **🤖** | **AI-first architecture** | 34-tool [MCP server](https://modelcontextprotocol.io/) — agents query the graph directly instead of scraping the filesystem. One call replaces 20+ grep/find/cat invocations |
104
+ | **🏷️** | **Role classification** | Every symbol auto-tagged as `entry`/`core`/`utility`/`adapter`/`dead`/`leaf` — agents understand a symbol's architectural role without reading surrounding code |
105
+ | **🔬** | **Function-level, not just files** | Traces `handleAuth()` → `validateToken()` → `decryptJWT()` and shows 14 callers across 9 files break if `decryptJWT` changes |
106
+ | **⚡** | **Always-fresh graph** | Three-tier change detection: journal (O(changed)) → mtime+size (O(n) stats) → hash (O(changed) reads). Sub-second rebuilds — agents work with current data |
107
+ | **💥** | **Git diff impact** | `codegraph diff-impact` shows changed functions, their callers, and full blast radius — enriched with historically coupled files from git co-change analysis. Ships with a GitHub Actions workflow |
108
+ | **🌐** | **Multi-language, one graph** | 34 languages in a single graph — JS/TS, Python, Go, Rust, Java, C#, PHP, Ruby, C/C++, Kotlin, Swift, Scala, Bash, HCL, Elixir, Lua, Dart, Zig, Haskell, OCaml, F#, Gleam, Clojure, Julia, R, Erlang, Solidity, Objective-C, CUDA, Groovy, Verilog — agents don't need per-language tools |
109
+ | **🧠** | **Hybrid search** | BM25 keyword + semantic embeddings fused via RRF — `hybrid` (default), `semantic`, or `keyword` mode; multi-query via `"auth; token; JWT"` |
110
+ | **🔬** | **Dataflow + CFG** | Track how data flows through and between functions — function-level edges (`flows_to`, `returns`, `mutates`), interprocedural variable-level edges (`arg_in`, `return_out`, `def_use`), and intraprocedural control flow graphs — all 34 languages |
111
+ | **🔓** | **Fully local, zero cost** | No API keys, no accounts, no network calls. Optionally bring your own LLM provider — your code only goes where you choose |
112
+
113
+ ---
114
+
115
+ ## 🚀 Quick Start
116
+
117
+ ```bash
118
+ npm install -g @optave/codegraph
119
+ cd your-project
120
+ codegraph build # → .codegraph/graph.db created
121
+ ```
122
+
123
+ That's it. The graph is ready. Now connect your AI agent.
124
+
125
+ ### For AI agents (primary use case)
126
+
127
+ Connect directly via MCP — your agent gets 34 tools to query the graph:
128
+
129
+ ```bash
130
+ codegraph mcp # 34-tool MCP server — AI queries the graph directly
131
+ ```
132
+
133
+ Or add codegraph to your agent's instructions (e.g. `CLAUDE.md`):
134
+
135
+ ```markdown
136
+ Before modifying code, always:
137
+ 1. `codegraph where <name>` — find where the symbol lives
138
+ 2. `codegraph context <name> -T` — get full context (source, deps, callers)
139
+ 3. `codegraph fn-impact <name> -T` — check blast radius before editing
140
+
141
+ After modifying code:
142
+ 4. `codegraph diff-impact --staged -T` — verify impact before committing
143
+ ```
144
+
145
+ Full agent setup: [AI Agent Guide](docs/guides/ai-agent-guide.md) &middot; [CLAUDE.md template](docs/guides/ai-agent-guide.md#claudemd-template)
146
+
147
+ ### For developers
148
+
149
+ The same graph is available via CLI:
150
+
151
+ ```bash
152
+ codegraph map # see most-connected files
153
+ codegraph query myFunc # find any function, see callers & callees
154
+ codegraph deps src/index.ts # file-level import/export map
155
+ ```
156
+
157
+ Or install from source:
158
+
159
+ ```bash
160
+ git clone https://github.com/optave/ops-codegraph-tool.git
161
+ cd codegraph && npm install && npm link
162
+ ```
163
+
164
+ > **Dev builds:** Pre-release tarballs are attached to [GitHub Releases](https://github.com/optave/ops-codegraph-tool/releases). Install with `npm install -g <path-to-tarball>`. Note that `npm install -g <tarball-url>` does not work because npm cannot resolve optional platform-specific dependencies from a URL — download the `.tgz` first, then install from the local file.
165
+
166
+ ---
167
+
168
+ ## ✨ Features
169
+
170
+ | | Feature | Description |
171
+ |---|---|---|
172
+ | 🤖 | **MCP server** | 34-tool MCP server for AI assistants; single-repo by default, opt-in multi-repo |
173
+ | 🎯 | **Deep context** | `context` gives agents source, deps, callers, signature, and tests for a function in one call; `audit --quick` gives structural summaries |
174
+ | 🏷️ | **Node role classification** | Every symbol auto-tagged as `entry`/`core`/`utility`/`adapter`/`dead`/`leaf` based on connectivity — agents instantly know architectural role |
175
+ | 📦 | **Batch querying** | Accept a list of targets and return all results in one JSON payload — enables multi-agent parallel dispatch |
176
+ | 💥 | **Impact analysis** | Trace every file affected by a change (transitive) |
177
+ | 🧬 | **Function-level tracing** | Call chains, caller trees, function-level impact, and A→B pathfinding with qualified call resolution |
178
+ | 📍 | **Fast lookup** | `where` shows exactly where a symbol is defined and used — minimal, fast |
179
+ | 🔍 | **Symbol search** | Find any function, class, or method by name — exact match priority, relevance scoring, `--file` and `--kind` filters |
180
+ | 📁 | **File dependencies** | See what a file imports and what imports it |
181
+ | 📊 | **Diff impact** | Parse `git diff`, find overlapping functions, trace their callers |
182
+ | 🔗 | **Co-change analysis** | Analyze git history for files that always change together — surfaces hidden coupling the static graph can't see; enriches `diff-impact` with historically coupled files |
183
+ | 🗺️ | **Module map** | Bird's-eye view of your most-connected files |
184
+ | 🏗️ | **Structure & hotspots** | Directory cohesion scores, fan-in/fan-out hotspot detection, module boundaries |
185
+ | 🔄 | **Cycle detection** | Find circular dependencies at file or function level |
186
+ | 📤 | **Export** | DOT, Mermaid, JSON, GraphML, GraphSON, and Neo4j CSV graph export |
187
+ | 🧠 | **Semantic search** | Embeddings-powered natural language search with multi-query RRF ranking |
188
+ | 👀 | **Watch mode** | Incrementally update the graph as files change |
189
+ | ⚡ | **Always fresh** | Three-tier incremental detection — sub-second rebuilds even on large codebases |
190
+ | 🔬 | **Data flow analysis** | Intraprocedural parameter tracking, return consumers, argument flows, and mutation detection — all 34 languages |
191
+ | 🧮 | **Complexity metrics** | Cognitive, cyclomatic, nesting depth, Halstead, and Maintainability Index per function |
192
+ | 🏘️ | **Community detection** | Leiden clustering to discover natural module boundaries and architectural drift |
193
+ | 📜 | **Manifesto rule engine** | Configurable pass/fail rules with warn/fail thresholds for CI gates via `check` (exit code 1 on fail) |
194
+ | 👥 | **CODEOWNERS integration** | Map graph nodes to CODEOWNERS entries — see who owns each function, ownership boundaries in `diff-impact` |
195
+ | 💾 | **Graph snapshots** | `snapshot save`/`restore` for instant DB backup and rollback — checkpoint before refactoring, restore without rebuilding |
196
+ | 🔎 | **Hybrid BM25 + semantic search** | FTS5 keyword search + embedding-based semantic search fused via Reciprocal Rank Fusion — `hybrid`, `semantic`, or `keyword` modes |
197
+ | 📄 | **Pagination & NDJSON streaming** | Universal `--limit`/`--offset` pagination on all MCP tools and CLI commands; `--ndjson` for newline-delimited JSON streaming |
198
+ | 🔀 | **Branch structural diff** | Compare code structure between two git refs — added/removed/changed symbols with transitive caller impact |
199
+ | 🛡️ | **Architecture boundaries** | User-defined dependency rules between modules with onion architecture preset — violations flagged in manifesto and CI |
200
+ | ✅ | **CI validation predicates** | `check` command with configurable gates: complexity, blast radius, cycles, boundary violations — exit code 0/1 for CI |
201
+ | 📋 | **Composite audit** | Single `audit` command combining explain + impact + health metrics per function — one call instead of 3-4 |
202
+ | 🚦 | **Triage queue** | `triage` merges connectivity, hotspots, roles, and complexity into a ranked audit priority queue |
203
+ | 🔬 | **Dataflow analysis** | Track how data moves through and between functions — function-level (`flows_to`, `returns`, `mutates`) and interprocedural variable-level edges (`arg_in`, `return_out`, `def_use`) — all 34 languages, included by default, skip with `--no-dataflow` |
204
+ | 🧩 | **Control flow graph** | Intraprocedural CFG construction for all 34 languages — `cfg` command with text/DOT/Mermaid output, included by default, skip with `--no-cfg` |
205
+ | 🔎 | **AST node querying** | Stored queryable AST nodes (calls, `new`, string, regex, throw, await) — `ast` command with SQL GLOB pattern matching |
206
+ | 🧬 | **Expanded node/edge types** | `parameter`, `property`, `constant` node kinds with `parent_id` for sub-declaration queries; `contains`, `parameter_of`, `receiver` edge kinds |
207
+ | 📊 | **Exports analysis** | `exports <file>` shows all exported symbols with per-symbol consumers, re-export detection, and counts |
208
+ | 📈 | **Interactive viewer** | `codegraph plot` generates an interactive HTML graph viewer with hierarchical/force/radial layouts, complexity overlays, and drill-down |
209
+ | 🏷️ | **Stable JSON schema** | `normalizeSymbol` utility ensures consistent 7-field output (name, kind, file, line, endLine, role, fileHash) across all commands |
210
+
211
+ See [docs/examples](docs/examples) for real-world CLI and MCP usage examples.
212
+
213
+ ## 📦 Commands
214
+
215
+ ### Build & Watch
216
+
217
+ ```bash
218
+ codegraph build [dir] # Parse and build the dependency graph
219
+ codegraph build --no-incremental # Force full rebuild
220
+ codegraph build --dataflow # Extract data flow edges (flows_to, returns, mutates)
221
+ codegraph build --engine wasm # Force WASM engine (skip native)
222
+ codegraph watch [dir] # Watch for changes, update graph incrementally
223
+ ```
224
+
225
+ ### Query & Explore
226
+
227
+ ```bash
228
+ codegraph query <name> # Find a symbol — shows callers and callees
229
+ codegraph deps <file> # File imports/exports
230
+ codegraph map # Top 20 most-connected files
231
+ codegraph map -n 50 --no-tests # Top 50, excluding test files
232
+ codegraph where <name> # Where is a symbol defined and used?
233
+ codegraph where --file src/db.js # List symbols, imports, exports for a file
234
+ codegraph stats # Graph health: nodes, edges, languages, quality score
235
+ codegraph roles # Node role classification (entry, core, utility, adapter, dead, leaf)
236
+ codegraph roles --role dead -T # Find dead code (unreferenced, non-exported symbols)
237
+ codegraph roles --role core --file src/ # Core symbols in src/
238
+ codegraph exports src/queries.js # Per-symbol consumer analysis (who calls each export)
239
+ codegraph children <name> # List parameters, properties, constants of a symbol
240
+ ```
241
+
242
+ ### Deep Context (designed for AI agents)
243
+
244
+ ```bash
245
+ codegraph context <name> # Full context: source, deps, callers, signature, tests
246
+ codegraph context <name> --depth 2 --no-tests # Include callee source 2 levels deep
247
+ codegraph brief <file> # Token-efficient file summary: symbols, roles, risk tiers
248
+ codegraph audit <file> --quick # Structural summary: public API, internals, data flow
249
+ codegraph audit <function> --quick # Function summary: signature, calls, callers, tests
250
+ ```
251
+
252
+ ### Impact Analysis
253
+
254
+ ```bash
255
+ codegraph impact <file> # Transitive reverse dependency trace
256
+ codegraph query <name> # Function-level: callers, callees, call chain
257
+ codegraph query <name> --no-tests --depth 5
258
+ codegraph fn-impact <name> # What functions break if this one changes
259
+ codegraph path <from> <to> # Shortest path between two symbols (A calls...calls B)
260
+ codegraph path <from> <to> --reverse # Follow edges backward
261
+ codegraph path <from> <to> --depth 5 --kinds calls,imports
262
+ codegraph diff-impact # Impact of unstaged git changes
263
+ codegraph diff-impact --staged # Impact of staged changes
264
+ codegraph diff-impact HEAD~3 # Impact vs a specific ref
265
+ codegraph diff-impact main --format mermaid -T # Mermaid flowchart of blast radius
266
+ codegraph branch-compare main feature-branch # Structural diff between two refs
267
+ codegraph branch-compare main HEAD --no-tests # Symbols added/removed/changed vs main
268
+ codegraph branch-compare v2.4.0 v2.5.0 --json # JSON output for programmatic use
269
+ codegraph branch-compare main HEAD --format mermaid # Mermaid diagram of structural changes
270
+ ```
271
+
272
+ ### Co-Change Analysis
273
+
274
+ Analyze git history to find files that always change together — surfaces hidden coupling the static graph can't see. Requires a git repository.
275
+
276
+ ```bash
277
+ codegraph co-change --analyze # Scan git history and populate co-change data
278
+ codegraph co-change src/queries.js # Show co-change partners for a file
279
+ codegraph co-change # Show top co-changing file pairs globally
280
+ codegraph co-change --since 6m # Limit to last 6 months of history
281
+ codegraph co-change --min-jaccard 0.5 # Only show strong coupling (Jaccard >= 0.5)
282
+ codegraph co-change --min-support 5 # Minimum co-commit count
283
+ codegraph co-change --full # Include all details
284
+ ```
285
+
286
+ Co-change data also enriches `diff-impact` — historically coupled files appear in a `historicallyCoupled` section alongside the static dependency analysis.
287
+
288
+ ### Structure & Hotspots
289
+
290
+ ```bash
291
+ codegraph structure # Directory overview with cohesion scores
292
+ codegraph triage --level file # Files with extreme fan-in, fan-out, or density
293
+ codegraph triage --level directory --sort coupling --no-tests
294
+ ```
295
+
296
+ ### Code Health & Architecture
297
+
298
+ ```bash
299
+ codegraph complexity # Per-function cognitive, cyclomatic, nesting, MI
300
+ codegraph complexity --health -T # Full Halstead health view (volume, effort, bugs, MI)
301
+ codegraph complexity --sort mi -T # Sort by worst maintainability index
302
+ codegraph complexity --above-threshold -T # Only functions exceeding warn thresholds
303
+ codegraph communities # Leiden community detection — natural module boundaries
304
+ codegraph communities --drift -T # Drift analysis only — split/merge candidates
305
+ codegraph communities --functions # Function-level community detection
306
+ codegraph check # Pass/fail rule engine (exit code 1 on fail)
307
+ codegraph check -T # Exclude test files from rule evaluation
308
+ ```
309
+
310
+ ### Dataflow, CFG & AST
311
+
312
+ ```bash
313
+ codegraph dataflow <name> # Data flow edges for a function (flows_to, returns, mutates)
314
+ codegraph dataflow <name> --impact # Transitive data-dependent blast radius
315
+ codegraph cfg <name> # Control flow graph (text format)
316
+ codegraph cfg <name> --format dot # CFG as Graphviz DOT
317
+ codegraph cfg <name> --format mermaid # CFG as Mermaid diagram
318
+ codegraph ast # List all stored AST nodes
319
+ codegraph ast "handleAuth" # Search AST nodes by pattern (GLOB)
320
+ codegraph ast -k call # Filter by kind: call, new, string, regex, throw, await
321
+ codegraph ast -k throw --file src/ # Combine kind and file filters
322
+ ```
323
+
324
+ > **Note:** Dataflow and CFG are included by default for all 34 languages. Use `--no-dataflow` / `--no-cfg` for faster builds.
325
+
326
+
327
+ ### Audit, Triage & Batch
328
+
329
+ Composite commands for risk-driven workflows and multi-agent dispatch.
330
+
331
+ ```bash
332
+ codegraph audit <file-or-function> # Combined structural summary + impact + health in one report
333
+ codegraph audit <target> --quick # Structural summary only (skip impact and health)
334
+ codegraph audit src/queries.js -T # Audit all functions in a file
335
+ codegraph explain <target> # Alias for audit — same output, easier to discover
336
+ codegraph triage # Ranked audit priority queue (connectivity + hotspots + roles)
337
+ codegraph triage -T --limit 20 # Top 20 riskiest functions, excluding tests
338
+ codegraph triage --level file -T # File-level hotspot analysis
339
+ codegraph triage --level directory -T # Directory-level hotspot analysis
340
+ codegraph batch target1 target2 ... # Batch query multiple targets in one call
341
+ codegraph batch --json targets.json # Batch from a JSON file
342
+ ```
343
+
344
+ ### CI Validation
345
+
346
+ `codegraph check` provides configurable pass/fail predicates for CI gates and state machines. Exit code 0 = pass, 1 = fail.
347
+
348
+ ```bash
349
+ codegraph check # Run manifesto rules on whole codebase
350
+ codegraph check --staged # Check staged changes (diff predicates)
351
+ codegraph check --staged --rules # Run both diff predicates AND manifesto rules
352
+ codegraph check --no-new-cycles # Fail if staged changes introduce cycles
353
+ codegraph check --max-complexity 30 # Fail if any function exceeds complexity threshold
354
+ codegraph check --max-blast-radius 50 # Fail if blast radius exceeds limit
355
+ codegraph check --no-boundary-violations # Fail on architecture boundary violations
356
+ codegraph check main # Check current branch vs main
357
+ ```
358
+
359
+ ### CODEOWNERS
360
+
361
+ Map graph symbols to CODEOWNERS entries. Shows who owns each function and surfaces ownership boundaries.
362
+
363
+ ```bash
364
+ codegraph owners # Show ownership for all symbols
365
+ codegraph owners src/queries.js # Ownership for symbols in a specific file
366
+ codegraph owners --boundary # Show ownership boundaries between modules
367
+ codegraph owners --owner @backend # Filter by owner
368
+ ```
369
+
370
+ Ownership data also enriches `diff-impact` — affected owners and suggested reviewers appear alongside the static dependency analysis.
371
+
372
+ ### Snapshots
373
+
374
+ Lightweight SQLite DB backup and restore — checkpoint before refactoring, instantly rollback without rebuilding.
375
+
376
+ ```bash
377
+ codegraph snapshot save before-refactor # Save a named snapshot
378
+ codegraph snapshot list # List all snapshots
379
+ codegraph snapshot restore before-refactor # Restore a snapshot
380
+ codegraph snapshot delete before-refactor # Delete a snapshot
381
+ ```
382
+
383
+ ### Export & Visualization
384
+
385
+ ```bash
386
+ codegraph export -f dot # Graphviz DOT format
387
+ codegraph export -f mermaid # Mermaid diagram
388
+ codegraph export -f json # JSON graph
389
+ codegraph export -f graphml # GraphML (XML standard)
390
+ codegraph export -f graphson # GraphSON (TinkerPop v3 / Gremlin)
391
+ codegraph export -f neo4j # Neo4j CSV (bulk import, separate nodes/relationships files)
392
+ codegraph export --functions -o graph.dot # Function-level, write to file
393
+ codegraph plot # Interactive HTML viewer with force/hierarchical/radial layouts
394
+ codegraph cycles # Detect circular dependencies
395
+ codegraph cycles --functions # Function-level cycles
396
+ ```
397
+
398
+ ### Semantic Search
399
+
400
+ Local embeddings for every function, method, and class — search by natural language. Everything runs locally using [@huggingface/transformers](https://huggingface.co/docs/transformers.js) — no API keys needed.
401
+
402
+ ```bash
403
+ codegraph embed # Build embeddings (default: nomic)
404
+ codegraph embed --model nomic-v1.5 # Use a different model
405
+ codegraph search "handle authentication"
406
+ codegraph search "parse config" --min-score 0.4 -n 10
407
+ codegraph search "parseConfig" --mode keyword # BM25 keyword-only (exact names)
408
+ codegraph search "auth flow" --mode semantic # Embedding-only (conceptual)
409
+ codegraph search "auth flow" --mode hybrid # BM25 + semantic RRF fusion (default)
410
+ codegraph models # List available models
411
+ ```
412
+
413
+ #### Multi-query search
414
+
415
+ Separate queries with `;` to search from multiple angles at once. Results are ranked using [Reciprocal Rank Fusion (RRF)](https://plg.uwaterloo.ca/~gvcormac/cormacksigir09-rrf.pdf) — items that rank highly across multiple queries rise to the top.
416
+
417
+ ```bash
418
+ codegraph search "auth middleware; JWT validation"
419
+ codegraph search "parse config; read settings; load env" -n 20
420
+ codegraph search "error handling; retry logic" --kind function
421
+ codegraph search "database connection; query builder" --rrf-k 30
422
+ ```
423
+
424
+ A single trailing semicolon is ignored (falls back to single-query mode). The `--rrf-k` flag controls the RRF smoothing constant (default 60) — lower values give more weight to top-ranked results.
425
+
426
+ #### Available Models
427
+
428
+ Per-model retrieval quality (Hit@N) and timing are measured on every release — see [EMBEDDING-BENCHMARKS.md](generated/benchmarks/EMBEDDING-BENCHMARKS.md).
429
+
430
+ | Flag | Model | Dimensions | Size | License | Notes |
431
+ |---|---|---|---|---|---|
432
+ | `minilm` | all-MiniLM-L6-v2 | 384 | ~23 MB | Apache-2.0 | Fastest, good for quick iteration |
433
+ | `jina-small` | jina-embeddings-v2-small-en | 512 | ~33 MB | Apache-2.0 | Better quality, still small |
434
+ | `jina-base` | jina-embeddings-v2-base-en | 768 | ~137 MB | Apache-2.0 | High quality, 8192 token context |
435
+ | `jina-code` | jina-embeddings-v2-base-code | 768 | ~137 MB | Apache-2.0 | Best for code search, trained on code+text |
436
+ | `nomic` (default) | nomic-embed-text-v1 | 768 | ~137 MB | Apache-2.0 | Good quality, 8192 context |
437
+ | `nomic-v1.5` | nomic-embed-text-v1.5 | 768 | ~137 MB | Apache-2.0 | Matryoshka MRL training (unused — codegraph stores full 768d); v1 scores higher on our benchmark |
438
+ | `bge-large` | bge-large-en-v1.5 | 1024 | ~335 MB | MIT | Best general retrieval, top MTEB scores |
439
+ | `mxbai-xsmall` | mxbai-embed-xsmall-v1 | 384 | ~50 MB | Apache-2.0 | Tiny + long context (4096) |
440
+ | `mxbai-large` | mxbai-embed-large-v1 | 1024 | ~400 MB | Apache-2.0 | Top MTEB BERT-large |
441
+ | `bge-m3` | bge-m3 | 1024 | ~600 MB | MIT | **Multilingual** (100+ languages), 8192 context |
442
+ | `modernbert` | modernbert-embed-base | 768 | ~150 MB | Apache-2.0 | ModernBERT architecture, 8192 ctx, English |
443
+
444
+ The model used during `embed` is stored in the database, so `search` auto-detects it — no need to pass `--model` when searching.
445
+
446
+ ### Multi-Repo Registry
447
+
448
+ Manage a global registry of codegraph-enabled projects. The registry stores paths to your built graphs so the MCP server can query them when multi-repo mode is enabled.
449
+
450
+ ```bash
451
+ codegraph registry list # List all registered repos
452
+ codegraph registry list --json # JSON output
453
+ codegraph registry add <dir> # Register a project directory
454
+ codegraph registry add <dir> -n my-name # Custom name
455
+ codegraph registry remove <name> # Unregister
456
+ ```
457
+
458
+ `codegraph build` auto-registers the project — no manual setup needed.
459
+
460
+ ### Configuration
461
+
462
+ Inspect and manage `.codegraphrc.json` settings.
463
+
464
+ ```bash
465
+ codegraph config # Show all config keys with values and sources
466
+ codegraph config --json # JSON output of the merged config
467
+ codegraph config --init # Scaffold a .codegraphrc.json with all sections pre-populated
468
+ codegraph config --edit # Open .codegraphrc.json in $EDITOR
469
+ codegraph config --enable-global # Opt this repo into user-level global config
470
+ codegraph config --disable-global # Opt this repo out of user-level global config
471
+ codegraph config --list-global # Show the contents of the global config file
472
+ ```
473
+
474
+ A user-level config file at `~/.config/codegraph/config.json` (XDG) or `~/.codegraph/config.json` lets you set personal defaults once and apply them to opted-in repos. The merge order is: DEFAULTS → global (if consented) → project → env. Non-interactive contexts (CI, MCP) never apply the global config without explicit consent. See [docs/guides/configuration.md](docs/guides/configuration.md) for full details.
475
+
476
+ ### Common Flags
477
+
478
+ | Flag | Description |
479
+ |---|---|
480
+ | `-d, --db <path>` | Custom path to `graph.db` |
481
+ | `-T, --no-tests` | Exclude `.test.`, `.spec.`, `__test__` files (available on most query commands including `query`, `fn-impact`, `path`, `context`, `where`, `diff-impact`, `search`, `map`, `roles`, `co-change`, `deps`, `impact`, `complexity`, `communities`, `branch-compare`, `audit`, `triage`, `check`, `dataflow`, `cfg`, `ast`, `exports`, `children`) |
482
+ | `--depth <n>` | Transitive trace depth (default varies by command) |
483
+ | `-j, --json` | Output as JSON |
484
+ | `-v, --verbose` | Enable debug output |
485
+ | `--engine <engine>` | Parser engine: `native`, `wasm`, or `auto` (default: `auto`) |
486
+ | `-k, --kind <kind>` | Filter by kind: `function`, `method`, `class`, `interface`, `type`, `struct`, `enum`, `trait`, `record`, `module`, `parameter`, `property`, `constant` |
487
+ | `-f, --file <path>` | Scope to a specific file (`fn`, `context`, `where`) |
488
+ | `--mode <mode>` | Search mode: `hybrid` (default), `semantic`, or `keyword` (`search`) |
489
+ | `--ndjson` | Output as newline-delimited JSON (one object per line) |
490
+ | `--table` | Output as auto-column aligned table |
491
+ | `--csv` | Output as CSV (RFC 4180, nested objects flattened) |
492
+ | `--limit <n>` | Limit number of results |
493
+ | `--offset <n>` | Skip first N results (pagination) |
494
+ | `--rrf-k <n>` | RRF smoothing constant for multi-query search (default 60) |
495
+ | `--user-config [path]` | Apply global user config for this run; optionally specify a custom path instead of the XDG default (`~/.config/codegraph/config.json`) |
496
+ | `--no-user-config` | Skip global user config for this run (CI/non-interactive safe) |
497
+
498
+ ## 🌐 Language Support
499
+
500
+ | Language | Extensions | Imports | Exports | Call Sites | Heritage¹ | Type Inference² | Dataflow |
501
+ |---|---|:---:|:---:|:---:|:---:|:---:|:---:|
502
+ | ![JavaScript](https://img.shields.io/badge/-JavaScript-F7DF1E?style=flat-square&logo=javascript&logoColor=black) | `.js`, `.jsx`, `.mjs`, `.cjs` | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
503
+ | ![TypeScript](https://img.shields.io/badge/-TypeScript-3178C6?style=flat-square&logo=typescript&logoColor=white) | `.ts`, `.tsx` | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
504
+ | ![Python](https://img.shields.io/badge/-Python-3776AB?style=flat-square&logo=python&logoColor=white) | `.py`, `.pyi` | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
505
+ | ![Go](https://img.shields.io/badge/-Go-00ADD8?style=flat-square&logo=go&logoColor=white) | `.go` | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
506
+ | ![Rust](https://img.shields.io/badge/-Rust-000000?style=flat-square&logo=rust&logoColor=white) | `.rs` | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
507
+ | ![Java](https://img.shields.io/badge/-Java-ED8B00?style=flat-square&logo=openjdk&logoColor=white) | `.java` | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
508
+ | ![C#](https://img.shields.io/badge/-C%23-512BD4?style=flat-square&logo=dotnet&logoColor=white) | `.cs` | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
509
+ | ![PHP](https://img.shields.io/badge/-PHP-777BB4?style=flat-square&logo=php&logoColor=white) | `.php`, `.phtml` | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
510
+ | ![Ruby](https://img.shields.io/badge/-Ruby-CC342D?style=flat-square&logo=ruby&logoColor=white) | `.rb`, `.rake`, `.gemspec` | ✓ | ✓ | ✓ | ✓ | —³ | ✓ |
511
+ | ![C](https://img.shields.io/badge/-C-A8B9CC?style=flat-square&logo=c&logoColor=black) | `.c`, `.h` | ✓ | ✓ | ✓ | —⁴ | —⁴ | ✓ |
512
+ | ![C++](https://img.shields.io/badge/-C++-00599C?style=flat-square&logo=cplusplus&logoColor=white) | `.cpp`, `.hpp`, `.cc`, `.cxx` | ✓ | ✓ | ✓ | ✓ | — | ✓ |
513
+ | ![Kotlin](https://img.shields.io/badge/-Kotlin-7F52FF?style=flat-square&logo=kotlin&logoColor=white) | `.kt`, `.kts` | ✓ | ✓ | ✓ | ✓ | — | ✓ |
514
+ | ![Swift](https://img.shields.io/badge/-Swift-F05138?style=flat-square&logo=swift&logoColor=white) | `.swift` | ✓ | ✓ | ✓ | ✓ | — | ✓ |
515
+ | ![Scala](https://img.shields.io/badge/-Scala-DC322F?style=flat-square&logo=scala&logoColor=white) | `.scala`, `.sc` | ✓ | ✓ | ✓ | ✓ | — | ✓ |
516
+ | ![Bash](https://img.shields.io/badge/-Bash-4EAA25?style=flat-square&logo=gnubash&logoColor=white) | `.sh`, `.bash` | ✓ | ✓ | ✓ | —⁴ | —⁴ | ✓ |
517
+ | ![Elixir](https://img.shields.io/badge/-Elixir-4B275F?style=flat-square&logo=elixir&logoColor=white) | `.ex`, `.exs` | ✓ | ✓ | ✓ | — | — | ✓ |
518
+ | ![Lua](https://img.shields.io/badge/-Lua-2C2D72?style=flat-square&logo=lua&logoColor=white) | `.lua` | ✓ | ✓ | ✓ | — | — | ✓ |
519
+ | ![Dart](https://img.shields.io/badge/-Dart-0175C2?style=flat-square&logo=dart&logoColor=white) | `.dart` | ✓ | ✓ | ✓ | ✓ | — | ✓ |
520
+ | ![Zig](https://img.shields.io/badge/-Zig-F7A41D?style=flat-square&logo=zig&logoColor=white) | `.zig` | ✓ | ✓ | ✓ | — | — | ✓ |
521
+ | ![Haskell](https://img.shields.io/badge/-Haskell-5D4F85?style=flat-square&logo=haskell&logoColor=white) | `.hs` | ✓ | ✓ | ✓ | — | — | ✓ |
522
+ | ![OCaml](https://img.shields.io/badge/-OCaml-EC6813?style=flat-square&logo=ocaml&logoColor=white) | `.ml`, `.mli` | ✓ | ✓ | ✓ | — | — | ✓ |
523
+ | ![F#](https://img.shields.io/badge/-F%23-378BBA?style=flat-square&logo=fsharp&logoColor=white) | `.fs`, `.fsx`, `.fsi` | ✓ | ✓ | ✓ | — | — | ✓ |
524
+ | ![Gleam](https://img.shields.io/badge/-Gleam-FFAFF3?style=flat-square&logoColor=black) | `.gleam` | ✓ | ✓ | ✓ | — | — | ✓ |
525
+ | ![Clojure](https://img.shields.io/badge/-Clojure-5881D8?style=flat-square&logo=clojure&logoColor=white) | `.clj`, `.cljs`, `.cljc` | ✓ | ✓ | ✓ | — | — | ✓ |
526
+ | ![Julia](https://img.shields.io/badge/-Julia-9558B2?style=flat-square&logo=julia&logoColor=white) | `.jl` | ✓ | ✓ | ✓ | — | — | ✓ |
527
+ | ![R](https://img.shields.io/badge/-R-276DC3?style=flat-square&logo=r&logoColor=white) | `.r`, `.R` | ✓ | ✓ | ✓ | — | — | ✓ |
528
+ | ![Erlang](https://img.shields.io/badge/-Erlang-A90533?style=flat-square&logo=erlang&logoColor=white) | `.erl`, `.hrl` | ✓ | ✓ | ✓ | — | — | ✓ |
529
+ | ![Solidity](https://img.shields.io/badge/-Solidity-363636?style=flat-square&logo=solidity&logoColor=white) | `.sol` | ✓ | ✓ | ✓ | ✓ | — | ✓ |
530
+ | ![Objective-C](https://img.shields.io/badge/-Objective--C-438EFF?style=flat-square&logoColor=white) | `.m` | ✓ | ✓ | ✓ | ✓ | — | ✓ |
531
+ | ![CUDA](https://img.shields.io/badge/-CUDA-76B900?style=flat-square&logo=nvidia&logoColor=white) | `.cu`, `.cuh` | ✓ | ✓ | ✓ | ✓ | — | ✓ |
532
+ | ![Groovy](https://img.shields.io/badge/-Groovy-4298B8?style=flat-square&logo=apachegroovy&logoColor=white) | `.groovy`, `.gvy` | ✓ | ✓ | ✓ | ✓ | — | ✓ |
533
+ | ![Verilog](https://img.shields.io/badge/-Verilog-848484?style=flat-square&logoColor=white) | `.v`, `.sv` | ✓ | ✓ | ✓ | — | — | ✓ |
534
+ | ![Terraform](https://img.shields.io/badge/-Terraform-844FBA?style=flat-square&logo=terraform&logoColor=white) | `.tf`, `.hcl` | ✓ | —³ | —³ | —³ | —³ | —³ |
535
+
536
+ > ¹ **Heritage** = `extends`, `implements`, `include`/`extend` (Ruby), trait `impl` (Rust), receiver methods (Go).
537
+ > ² **Type Inference** extracts a per-file type map from annotations (`const x: Router`, `MyType x`, `x: MyType`) and `new` expressions, enabling the edge resolver to connect `x.method()` → `Type.method()`.
538
+ > ³ Not applicable — Ruby is dynamically typed; Terraform/HCL is declarative (no functions, classes, or type system).
539
+ > ⁴ Not applicable — C and Bash have no class/inheritance system.
540
+ > All languages have full **parity** between the native Rust engine and the WASM fallback.
541
+
542
+ ## ⚙️ How It Works
543
+
544
+ ```
545
+ ┌──────────┐ ┌───────────┐ ┌───────────┐ ┌──────────┐ ┌─────────┐
546
+ │ Source │──▶│ tree-sitter│──▶│ Extract │──▶│ Resolve │──▶│ SQLite │
547
+ │ Files │ │ Parse │ │ Symbols │ │ Imports │ │ DB │
548
+ └──────────┘ └───────────┘ └───────────┘ └──────────┘ └─────────┘
549
+
550
+
551
+ ┌─────────┐
552
+ │ Query │
553
+ └─────────┘
554
+ ```
555
+
556
+ 1. **Parse** — tree-sitter parses every source file into an AST (native Rust engine or WASM fallback)
557
+ 2. **Extract** — Functions, classes, methods, interfaces, imports, exports, call sites, parameters, properties, and constants are extracted
558
+ 3. **Resolve** — Imports are resolved to actual files (handles ESM conventions, `tsconfig.json` path aliases, `baseUrl`)
559
+ 4. **Store** — Everything goes into SQLite as nodes + edges with tree-sitter node boundaries, plus structural edges (`contains`, `parameter_of`, `receiver`)
560
+ 5. **Analyze** (opt-in) — Complexity metrics, control flow graphs (`--cfg`), dataflow edges (`--dataflow`), and AST node storage
561
+ 6. **Query** — All queries run locally against the SQLite DB — typically under 100ms
562
+
563
+ ### Incremental Rebuilds
564
+
565
+ The graph stays current without re-parsing your entire codebase. Three-tier change detection ensures rebuilds are proportional to what changed, not the size of the project:
566
+
567
+ 1. **Tier 0 — Journal (O(changed)):** If `codegraph watch` was running, a change journal records exactly which files were touched. The next build reads the journal and only processes those files — zero filesystem scanning
568
+ 2. **Tier 1 — mtime+size (O(n) stats, O(changed) reads):** No journal? Codegraph stats every file and compares mtime + size against stored values. Matching files are skipped without reading a single byte
569
+ 3. **Tier 2 — Hash (O(changed) reads):** Files that fail the mtime/size check are read and MD5-hashed. Only files whose hash actually changed get re-parsed and re-inserted
570
+
571
+ **Result:** change one file in a 3,000-file project and the rebuild completes in under a second. Put it in a commit hook, a file watcher, or let your AI agent trigger it.
572
+
573
+ #### What incremental rebuilds refresh — and what they don't
574
+
575
+ Incremental builds re-parse changed files and rebuild their edges, structure metrics, and role classifications. But some data is **only fully refreshed on a full rebuild:**
576
+
577
+ | Data | Incremental | Full rebuild |
578
+ |------|:-----------:|:------------:|
579
+ | Symbols & edges for changed files | Yes | Yes |
580
+ | Reverse-dependency cascade (importers of changed files) | Yes | Yes |
581
+ | AST nodes, complexity, CFG, dataflow for changed files | Yes | Yes |
582
+ | Directory-level cohesion metrics | Partial (skipped for ≤5 files) | Yes |
583
+ | Advisory checks (orphaned embeddings, stale embeddings, unused exports) | Skipped | Yes |
584
+ | Build metadata persistence | Skipped for ≤3 files | Yes |
585
+ | Incremental drift detection | Skipped | Yes |
586
+
587
+ **When to run a full rebuild:**
588
+
589
+ ```bash
590
+ codegraph build --no-incremental # Force full rebuild
591
+ ```
592
+
593
+ - **After large refactors** (renames, moves, deleted files) — the reverse-dependency cascade handles most cases, but a full rebuild ensures nothing is stale
594
+ - **If you suspect stale analysis data** — complexity or dataflow results for files you didn't directly edit won't update incrementally
595
+ - **Periodically** — if you rely heavily on `complexity`, `dataflow`, `roles --role dead`, or `communities` queries, run a full rebuild weekly or after major merges
596
+ - **After upgrading codegraph** — engine, schema, or version changes trigger an automatic full rebuild, but if you skip versions you may want to force one
597
+
598
+ Codegraph auto-detects and forces a full rebuild when the engine, schema version, or codegraph version changes between builds. For everything else, incremental is the safe default — a full rebuild is a correctness guarantee, not a frequent necessity.
599
+
600
+ > **Detailed guide:** See [docs/guides/incremental-builds.md](docs/guides/incremental-builds.md) for a complete breakdown of what each build mode refreshes and recommended rebuild schedules.
601
+
602
+ ### Dual Engine
603
+
604
+ Codegraph ships with two parsing engines:
605
+
606
+ | Engine | How it works | When it's used |
607
+ |--------|-------------|----------------|
608
+ | **Native** (Rust) | napi-rs addon built from `crates/codegraph-core/` — parallel multi-core parsing via rayon | Auto-selected when the prebuilt binary is available |
609
+ | **WASM** | `web-tree-sitter` with pre-built `.wasm` grammars in `grammars/` | Fallback when the native addon isn't installed |
610
+
611
+ Both engines produce identical output. Use `--engine native|wasm|auto` to control selection (default: `auto`).
612
+
613
+ On the native path, Rust handles the entire hot pipeline end-to-end:
614
+
615
+ | Phase | What Rust does |
616
+ |-------|---------------|
617
+ | **Parse** | Parallel multi-file tree-sitter parsing via rayon (3.5× faster than WASM) |
618
+ | **Extract** | Symbols, imports, calls, classes, type maps, AST nodes — all in one pass |
619
+ | **Analyze** | Complexity (cognitive, cyclomatic, Halstead), CFG, and dataflow pre-computed per function during parse |
620
+ | **Resolve** | Import resolution with 6-level priority system and confidence scoring |
621
+ | **Edges** | Call, receiver, extends, and implements edge inference |
622
+ | **DB writes** | All inserts (nodes, edges, AST nodes, complexity, CFG, dataflow) via rusqlite — `better-sqlite3` is lazy-loaded only for the WASM fallback path |
623
+
624
+ The Rust crate (`crates/codegraph-core/`) exposes a `NativeDatabase` napi-rs class that holds a persistent `rusqlite::Connection` for the full build lifecycle, eliminating JS↔SQLite round-trips on every operation.
625
+
626
+ ### Call Resolution
627
+
628
+ Calls are resolved with **qualified resolution** — method calls (`obj.method()`) are distinguished from standalone function calls, and built-in receivers (`console`, `Math`, `JSON`, `Array`, `Promise`, etc.) are filtered out automatically. Import scope is respected: a call to `foo()` only resolves to functions that are actually imported or defined in the same file, eliminating false positives from name collisions.
629
+
630
+ | Priority | Source | Confidence |
631
+ |---|---|---|
632
+ | 1 | **Import-aware** — `import { foo } from './bar'` → link to `bar` | `1.0` |
633
+ | 2 | **Same-file** — definitions in the current file | `1.0` |
634
+ | 3 | **Same directory** — definitions in sibling files (standalone calls only) | `0.7` |
635
+ | 4 | **Same parent directory** — definitions in sibling dirs (standalone calls only) | `0.5` |
636
+ | 5 | **Method hierarchy** — resolved through `extends`/`implements` | varies |
637
+
638
+ Method calls on unknown receivers skip global fallback entirely — `stmt.run()` will never resolve to a standalone `run` function in another file. Duplicate caller/callee edges are deduplicated automatically. Dynamic patterns like `fn.call()`, `fn.apply()`, `fn.bind()`, and `obj["method"]()` are also detected on a best-effort basis.
639
+
640
+ Codegraph also extracts symbols from common callback patterns: Commander `.command().action()` callbacks (as `command:build`), Express route handlers (as `route:GET /api/users`), and event emitter listeners (as `event:data`).
641
+
642
+ ## 📊 Performance
643
+
644
+ Self-measured on every release via CI ([build benchmarks](generated/benchmarks/BUILD-BENCHMARKS.md) | [embedding benchmarks](generated/benchmarks/EMBEDDING-BENCHMARKS.md) | [query benchmarks](generated/benchmarks/QUERY-BENCHMARKS.md) | [incremental benchmarks](generated/benchmarks/INCREMENTAL-BENCHMARKS.md) | [resolution precision/recall](tests/benchmarks/resolution/)):
645
+
646
+ *Last updated: v3.14.0 (2026-06-19)*
647
+
648
+ | Metric | Native | WASM |
649
+ |---|---|---|
650
+ | Build speed | **4.5 ms/file** | **27.4 ms/file** |
651
+ | Query time | **42ms** | **58ms** |
652
+ | No-op rebuild | **26ms** | **25ms** |
653
+ | 1-file rebuild | **108ms** | **78ms** |
654
+ | Query: fn-deps | **2.8ms** | **2.8ms** |
655
+ | Query: path | **2.9ms** | **2.5ms** |
656
+ | ~50,000 files (est.) | **~225.0s build** | **~1370.0s build** |
657
+ | Resolution precision | **93.1%** | — |
658
+ | Resolution recall | **61.0%** | — |
659
+
660
+ Metrics are normalized per file for cross-version comparability. Times above are for a full initial build — incremental rebuilds only re-parse changed files.
661
+
662
+ <details><summary>Per-language resolution precision/recall</summary>
663
+
664
+ | Language | Precision | Recall | TP | FP | FN | Edges | Dynamic |
665
+ |----------|----------:|-------:|---:|---:|---:|------:|--------:|
666
+ | javascript | 100.0% | 100.0% | 42 | 0 | 0 | 42 | 14/32 |
667
+ | typescript | 95.9% | 100.0% | 47 | 2 | 0 | 47 | — |
668
+ | bash | 100.0% | 100.0% | 12 | 0 | 0 | 12 | 0/1 |
669
+ | c | 100.0% | 100.0% | 9 | 0 | 0 | 9 | — |
670
+ | clojure | 80.0% | 26.7% | 4 | 1 | 11 | 15 | — |
671
+ | cpp | 100.0% | 57.1% | 8 | 0 | 6 | 14 | — |
672
+ | csharp | 100.0% | 100.0% | 23 | 0 | 0 | 23 | — |
673
+ | cuda | 50.0% | 33.3% | 4 | 4 | 8 | 12 | — |
674
+ | dart | 0.0% | 0.0% | 0 | 0 | 18 | 18 | — |
675
+ | elixir | 100.0% | 81.0% | 17 | 0 | 4 | 21 | — |
676
+ | erlang | 0.0% | 0.0% | 0 | 0 | 12 | 12 | — |
677
+ | fsharp | 0.0% | 0.0% | 0 | 11 | 12 | 12 | — |
678
+ | gleam | 100.0% | 26.7% | 4 | 0 | 11 | 15 | — |
679
+ | go | 100.0% | 69.2% | 9 | 0 | 4 | 13 | 13/14 |
680
+ | groovy | 100.0% | 7.7% | 1 | 0 | 12 | 13 | — |
681
+ | haskell | 100.0% | 33.3% | 4 | 0 | 8 | 12 | — |
682
+ | hcl | 0.0% | 0.0% | 0 | 0 | 2 | 2 | — |
683
+ | java | 100.0% | 80.0% | 16 | 0 | 4 | 20 | — |
684
+ | julia | 100.0% | 73.3% | 11 | 0 | 4 | 15 | — |
685
+ | kotlin | 92.3% | 63.2% | 12 | 1 | 7 | 19 | — |
686
+ | lua | 100.0% | 15.4% | 2 | 0 | 11 | 13 | — |
687
+ | objc | 100.0% | 46.2% | 6 | 0 | 7 | 13 | — |
688
+ | ocaml | 100.0% | 8.3% | 1 | 0 | 11 | 12 | — |
689
+ | php | 100.0% | 57.9% | 11 | 0 | 8 | 19 | — |
690
+ | pts-javascript | 100.0% | 100.0% | 13 | 0 | 0 | 13 | — |
691
+ | python | 100.0% | 60.0% | 9 | 0 | 6 | 15 | 15/15 |
692
+ | r | 100.0% | 100.0% | 11 | 0 | 0 | 11 | — |
693
+ | ruby | 100.0% | 100.0% | 11 | 0 | 0 | 11 | 11/11 |
694
+ | rust | 100.0% | 64.3% | 9 | 0 | 5 | 14 | — |
695
+ | scala | 100.0% | 100.0% | 7 | 0 | 0 | 7 | — |
696
+ | solidity | 33.3% | 7.7% | 1 | 2 | 12 | 13 | — |
697
+ | swift | 75.0% | 42.9% | 6 | 2 | 8 | 14 | 9/9 |
698
+ | tsx | 100.0% | 100.0% | 13 | 0 | 0 | 13 | — |
699
+ | verilog | 0.0% | 0.0% | 0 | 0 | 4 | 4 | — |
700
+ | zig | 66.7% | 13.3% | 2 | 1 | 13 | 15 | — |
701
+
702
+ **By resolution mode (all languages):**
703
+
704
+ | Mode | Resolved | Expected | Recall |
705
+ |------|--------:|---------:|-------:|
706
+ | receiver-typed | 32 | 112 | 28.6% |
707
+ | module-function | 36 | 112 | 32.1% |
708
+ | static | 82 | 97 | 84.5% |
709
+ | same-file | 66 | 90 | 73.3% |
710
+ | interface-dispatched | 22 | 22 | 100.0% |
711
+ | class-inheritance | 8 | 12 | 66.7% |
712
+ | callback | 7 | 7 | 100.0% |
713
+ | pts-spread | 4 | 4 | 100.0% |
714
+ | pts-define-property | 3 | 3 | 100.0% |
715
+ | dynamic | 3 | 3 | 100.0% |
716
+ | pts-create-prototype | 2 | 2 | 100.0% |
717
+ | points-to | 2 | 2 | 100.0% |
718
+ | re-export | 2 | 2 | 100.0% |
719
+ | pts-for-of | 2 | 2 | 100.0% |
720
+ | pts-set | 2 | 2 | 100.0% |
721
+ | pts-array-from | 2 | 2 | 100.0% |
722
+ | trait-dispatch | 0 | 2 | 0.0% |
723
+ | define-property | 1 | 1 | 100.0% |
724
+ | defineProperty-accessor | 1 | 1 | 100.0% |
725
+ | package-function | 1 | 1 | 100.0% |
726
+
727
+ </details>
728
+
729
+ ### Lightweight Footprint
730
+
731
+ <a href="https://www.npmjs.com/package/@optave/codegraph"><img src="https://img.shields.io/npm/unpacked-size/@optave/codegraph?style=flat-square&label=unpacked%20size" alt="npm unpacked size" /></a>
732
+
733
+ Only **3 runtime dependencies** — everything else is optional or a devDependency:
734
+
735
+ | Dependency | What it does | | |
736
+ |---|---|---|---|
737
+ | [better-sqlite3](https://github.com/WiseLibs/better-sqlite3) | SQLite driver (WASM engine; lazy-loaded, not used for native-engine reads) | ![GitHub stars](https://img.shields.io/github/stars/WiseLibs/better-sqlite3?style=flat-square&label=%E2%AD%90) | ![npm downloads](https://img.shields.io/npm/dw/better-sqlite3?style=flat-square&label=%F0%9F%93%A5%2Fwk) |
738
+ | [commander](https://github.com/tj/commander.js) | CLI argument parsing | ![GitHub stars](https://img.shields.io/github/stars/tj/commander.js?style=flat-square&label=%E2%AD%90) | ![npm downloads](https://img.shields.io/npm/dw/commander?style=flat-square&label=%F0%9F%93%A5%2Fwk) |
739
+ | [web-tree-sitter](https://github.com/tree-sitter/tree-sitter) | WASM tree-sitter bindings | ![GitHub stars](https://img.shields.io/github/stars/tree-sitter/tree-sitter?style=flat-square&label=%E2%AD%90) | ![npm downloads](https://img.shields.io/npm/dw/web-tree-sitter?style=flat-square&label=%F0%9F%93%A5%2Fwk) |
740
+
741
+ Optional: `@huggingface/transformers` (semantic search), `@modelcontextprotocol/sdk` (MCP server) — lazy-loaded only when needed.
742
+
743
+ ## 🤖 AI Agent Integration (Core)
744
+
745
+ ### MCP Server
746
+
747
+ Codegraph is built around a [Model Context Protocol](https://modelcontextprotocol.io/) server with 34 tools (35 in multi-repo mode) — the primary way agents consume the graph:
748
+
749
+ ```bash
750
+ codegraph mcp # Single-repo mode (default) — only local project
751
+ codegraph mcp --multi-repo # Enable access to all registered repos
752
+ codegraph mcp --repos a,b # Restrict to specific repos (implies --multi-repo)
753
+ ```
754
+
755
+ **Single-repo mode (default):** Tools operate only on the local `.codegraph/graph.db`. The `repo` parameter and `list_repos` tool are not exposed to the AI agent.
756
+
757
+ **Multi-repo mode (`--multi-repo`):** All tools gain an optional `repo` parameter to target any registered repository, and `list_repos` becomes available. Use `--repos` to restrict which repos the agent can access.
758
+
759
+ ### CLAUDE.md / Agent Instructions
760
+
761
+ Add this to your project's `CLAUDE.md` to help AI agents use codegraph. Full template with all commands in the [AI Agent Guide](docs/guides/ai-agent-guide.md#claudemd-template).
762
+
763
+ ```markdown
764
+ ## Codegraph
765
+
766
+ This project uses codegraph for dependency analysis. The graph is at `.codegraph/graph.db`.
767
+
768
+ ### Before modifying code:
769
+ 1. `codegraph where <name>` — find where the symbol lives
770
+ 2. `codegraph audit --quick <target>` — understand the structure
771
+ 3. `codegraph context <name> -T` — get full context (source, deps, callers)
772
+ 4. `codegraph fn-impact <name> -T` — check blast radius before editing
773
+
774
+ ### After modifying code:
775
+ 5. `codegraph diff-impact --staged -T` — verify impact before committing
776
+
777
+ ### Other useful commands
778
+ - `codegraph build .` — rebuild graph (incremental by default)
779
+ - `codegraph map` — module overview · `codegraph stats` — graph health
780
+ - `codegraph query <name> -T` — call chain · `codegraph path <from> <to> -T` — shortest path
781
+ - `codegraph deps <file>` — file deps · `codegraph exports <file> -T` — export consumers
782
+ - `codegraph audit <target> -T` — full risk report · `codegraph triage -T` — priority queue
783
+ - `codegraph check --staged` — CI gate · `codegraph batch t1 t2 -T --json` — batch query
784
+ - `codegraph search "<query>"` — semantic search · `codegraph cycles` — cycle detection
785
+ - `codegraph roles --role dead -T` — dead code · `codegraph complexity -T` — metrics
786
+ - `codegraph dataflow <name> -T` — data flow · `codegraph cfg <name> -T` — control flow
787
+
788
+ ### Flags
789
+ - `-T` — exclude test files (use by default) · `-j` — JSON output
790
+ - `-f, --file <path>` — scope to file · `-k, --kind <kind>` — filter kind
791
+ ```
792
+
793
+ ## 📋 Recommended Practices
794
+
795
+ See **[docs/guides/recommended-practices.md](docs/guides/recommended-practices.md)** for integration guides:
796
+
797
+ - **Git hooks** — auto-rebuild on commit, impact checks on push, commit message enrichment
798
+ - **CI/CD** — PR impact comments, threshold gates, graph caching
799
+ - **AI agents** — MCP server, CLAUDE.md templates, Claude Code hooks
800
+ - **Developer workflow** — watch mode, explore-before-you-edit, semantic search
801
+ - **Secure credentials** — `apiKeyCommand` with 1Password, Bitwarden, Vault, macOS Keychain, `pass`
802
+
803
+ For AI-specific integration, see the **[AI Agent Guide](docs/guides/ai-agent-guide.md)** — a comprehensive reference covering the 6-step agent workflow, complete command-to-MCP mapping, Claude Code hooks, and token-saving patterns.
804
+
805
+ ## 🔁 CI / GitHub Actions
806
+
807
+ Codegraph ships with a ready-to-use GitHub Actions workflow that comments impact analysis on every pull request.
808
+
809
+ Copy `.github/workflows/codegraph-impact.yml` to your repo, and every PR will get a comment like:
810
+
811
+ > **3 functions changed** → **12 callers affected** across **7 files**
812
+
813
+ ## 🛠️ Configuration
814
+
815
+ Create a `.codegraphrc.json` in your project root to customize behavior. The snippets below cover the most-used keys — see **[docs/guides/configuration.md](docs/guides/configuration.md)** for the full reference (every group, every key, every default).
816
+
817
+ **Global (user-level) config:** you can also define personal defaults once at `~/.config/codegraph/config.json` and opt individual repos into it with `codegraph config --enable-global`. The global layer merges below the project config so repos always win, and non-interactive contexts (CI, MCP) never apply it without explicit consent. See [docs/guides/configuration.md#user-level-global-configuration](docs/guides/configuration.md#user-level-global-configuration).
818
+
819
+ ```json
820
+ {
821
+ "include": ["src/**", "lib/**"],
822
+ "exclude": ["**/*.test.js", "**/__mocks__/**"],
823
+ "ignoreDirs": ["node_modules", ".git", "dist"],
824
+ "extensions": [".js", ".ts", ".tsx", ".py"],
825
+ "aliases": {
826
+ "@/": "./src/",
827
+ "@utils/": "./src/utils/"
828
+ },
829
+ "build": {
830
+ "incremental": true
831
+ },
832
+ "query": {
833
+ "excludeTests": true
834
+ }
835
+ }
836
+ ```
837
+
838
+ > **Tip:** `excludeTests` can also be set at the top level as a shorthand — `{ "excludeTests": true }` is equivalent to nesting it under `query`. If both are present, the nested `query.excludeTests` takes precedence.
839
+
840
+ ### Manifesto rules
841
+
842
+ Configure pass/fail thresholds for `codegraph check` (manifesto mode):
843
+
844
+ ```json
845
+ {
846
+ "manifesto": {
847
+ "rules": {
848
+ "cognitive_complexity": { "warn": 15, "fail": 30 },
849
+ "cyclomatic_complexity": { "warn": 10, "fail": 20 },
850
+ "nesting_depth": { "warn": 4, "fail": 6 },
851
+ "maintainability_index": { "warn": 40, "fail": 20 },
852
+ "halstead_bugs": { "warn": 0.5, "fail": 1.0 }
853
+ }
854
+ }
855
+ }
856
+ ```
857
+
858
+ When any function exceeds a `fail` threshold, `codegraph check` exits with code 1 — perfect for CI gates.
859
+
860
+ ### LLM credentials
861
+
862
+ Codegraph supports an `apiKeyCommand` field for secure credential management. Instead of storing API keys in config files or environment variables, you can shell out to a secret manager at runtime:
863
+
864
+ ```json
865
+ {
866
+ "llm": {
867
+ "provider": "openai",
868
+ "apiKeyCommand": "op read op://vault/openai/api-key"
869
+ }
870
+ }
871
+ ```
872
+
873
+ The command is split on whitespace and executed with `execFileSync` (no shell injection risk). Priority: **command output > `CODEGRAPH_LLM_API_KEY` env var > file config**. On failure, codegraph warns and falls back to the next source.
874
+
875
+ Works with any secret manager: 1Password CLI (`op`), Bitwarden (`bw`), `pass`, HashiCorp Vault, macOS Keychain (`security`), AWS Secrets Manager, etc.
876
+
877
+ ### MCP tool filtering
878
+
879
+ Codegraph's MCP server exposes 34 tools by default. For models with a small context window, you can shrink the schema by disabling tools you don't use:
880
+
881
+ ```json
882
+ {
883
+ "mcp": {
884
+ "disabledTools": ["execution_flow", "sequence", "communities", "co_changes"]
885
+ }
886
+ }
887
+ ```
888
+
889
+ Names are matched case-insensitively and a leading `codegraph<digits>_` prefix (e.g. `codegraph2_module_map`) is stripped before comparison. Disabled tools are removed from `tools/list` and any `tools/call` invocation returns `Unknown tool: <name>`. See **[docs/guides/configuration.md#mcp-tool-filtering](docs/guides/configuration.md#mcp-tool-filtering)** for the full tool catalog, and the rest of that guide for every other config option.
890
+
891
+ ## 📖 Programmatic API
892
+
893
+ Codegraph also exports a full API for use in your own tools:
894
+
895
+ ```js
896
+ import { buildGraph, queryNameData, findCycles, exportDOT, normalizeSymbol } from '@optave/codegraph';
897
+
898
+ // Build the graph
899
+ buildGraph('/path/to/project');
900
+
901
+ // Query programmatically
902
+ const results = queryNameData('myFunction', '/path/to/.codegraph/graph.db');
903
+ // All query results use normalizeSymbol for a stable 7-field schema
904
+ ```
905
+
906
+ ```js
907
+ import { parseFileAuto, getActiveEngine, isNativeAvailable } from '@optave/codegraph';
908
+
909
+ // Check which engine is active
910
+ console.log(getActiveEngine()); // 'native' or 'wasm'
911
+ console.log(isNativeAvailable()); // true if Rust addon is installed
912
+
913
+ // Parse a single file (uses auto-selected engine)
914
+ const symbols = await parseFileAuto('/path/to/file.ts');
915
+ ```
916
+
917
+ ```js
918
+ import { searchData, multiSearchData, buildEmbeddings } from '@optave/codegraph';
919
+
920
+ // Build embeddings (one-time)
921
+ await buildEmbeddings('/path/to/project');
922
+
923
+ // Single-query search
924
+ const { results } = await searchData('handle auth', dbPath);
925
+
926
+ // Multi-query search with RRF ranking
927
+ const { results: fused } = await multiSearchData(
928
+ ['auth middleware', 'JWT validation'],
929
+ dbPath,
930
+ { limit: 10, minScore: 0.3 }
931
+ );
932
+ // Each result has: { name, kind, file, line, rrf, queryScores[] }
933
+ ```
934
+
935
+ ## ⚠️ Limitations
936
+
937
+ - **TypeScript compiler integration is auto-enabled** — when `typescript` is installed and a `tsconfig.json` is found, the TypeScript compiler API pass runs automatically; disable with `"build": { "typescriptResolver": false }` in `.codegraphrc.json` if you want faster builds without it; heuristic type inference (annotations, `new` expressions, assignment chains) is always active as a baseline
938
+ - **Dynamic calls are best-effort** — complex computed property access and `eval` patterns are not resolved
939
+ - **Python imports** — resolves relative imports but doesn't follow `sys.path` or virtual environment packages
940
+ - **Dataflow analysis** — interprocedural edges (`arg_in`, `return_out`) require a full build after adding new callee files; incremental re-stitch fires automatically on both the JS and native engine paths
941
+
942
+ ## 🗺️ Roadmap
943
+
944
+ See **[ROADMAP.md](docs/roadmap/ROADMAP.md)** for the full development roadmap and **[STABILITY.md](STABILITY.md)** for the stability policy and versioning guarantees. Current plan:
945
+
946
+ 1. ~~**Rust Core**~~ — **Complete** (v1.3.0) — native tree-sitter parsing via napi-rs, parallel multi-core parsing, incremental re-parsing, import resolution & cycle detection in Rust
947
+ 2. ~~**Foundation Hardening**~~ — **Complete** (v1.5.0) — parser registry, complete MCP, test coverage, enhanced config, multi-repo MCP
948
+ 3. ~~**Analysis Expansion**~~ — **Complete** (v2.7.0) — complexity metrics, community detection, flow tracing, co-change, manifesto, boundary rules, check, triage, audit, batch, hybrid search
949
+ 4. ~~**Deep Analysis & Graph Enrichment**~~ — **Complete** (v3.0.0) — dataflow analysis, intraprocedural CFG, AST node storage, expanded node/edge types, interactive viewer, exports command
950
+ 5. ~~**Architectural Refactoring**~~ — **Complete** (v3.1.5) — unified AST analysis, composable MCP, domain errors, builder pipeline, graph model, qualified names, presentation layer, CLI composability
951
+ 6. ~~**Resolution Accuracy**~~ — **Complete** (v3.3.1) — type inference, receiver type tracking, dead role sub-categories, resolution benchmarks, `package.json` exports, monorepo workspace resolution
952
+ 7. ~~**TypeScript Migration**~~ — **Complete** (v3.4.0) — all 271 source files migrated from JS to TS, zero `.js` remaining
953
+ 8. ~~**Native Analysis Acceleration**~~ — **Complete** (v3.5.0) — all build phases in Rust/rusqlite, sub-100ms incremental rebuilds, better-sqlite3 lazy-loaded as fallback only
954
+ 9. ~~**Expanded Language Support**~~ — **Complete** (v3.8.0) — 23 new languages in 4 batches (11 → 34), dual-engine WASM + Rust support for all
955
+ 10. ~~**Analysis Depth**~~ — **Complete** (v3.12.0) — TypeScript-native resolution, inter-procedural type propagation, field-based points-to analysis, barrel re-export chain resolution, CHA+RTA dynamic dispatch
956
+ 11. **Runtime & Extensibility** — event-driven pipeline, plugin system, query caching, pagination
957
+ 12. **Quality, Security & Technical Debt** — supply-chain security (SBOM, SLSA), CI coverage gates, timer cleanup, tech debt kill list
958
+ 13. **Intelligent Embeddings** — LLM-generated descriptions, enhanced embeddings, module summaries
959
+ 14. **Natural Language Queries** — `codegraph ask` command, conversational sessions
960
+ 15. **GitHub Integration & CI** — reusable GitHub Action, LLM-enhanced PR review, SARIF output
961
+ 16. **Advanced Features** — dead code detection, monorepo support, agentic search
962
+
963
+ ## 🤝 Contributing
964
+
965
+ Contributions are welcome! See **[CONTRIBUTING.md](CONTRIBUTING.md)** for the full guide — setup, workflow, commit convention, testing, and architecture notes.
966
+
967
+ ```bash
968
+ git clone https://github.com/optave/ops-codegraph-tool.git
969
+ cd codegraph
970
+ npm install
971
+ npm test
972
+ ```
973
+
974
+ Looking to add a new language? Check out **[Adding a New Language](docs/contributing/adding-a-language.md)**.
975
+
976
+ ## 📄 License
977
+
978
+ [Apache-2.0](LICENSE)
979
+
980
+ ---
981
+
982
+ <p align="center">
983
+ <sub>Built with <a href="https://tree-sitter.github.io/">tree-sitter</a> and <a href="https://github.com/WiseLibs/better-sqlite3">better-sqlite3</a>. Your code stays on your machine.</sub>
984
+ </p>