seer-mcp 0.1.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 (371) hide show
  1. package/.vscode/settings.json +3 -0
  2. package/LICENSE +176 -0
  3. package/README.md +272 -0
  4. package/README_dev.md +199 -0
  5. package/dist/bundle/ci.d.ts +47 -0
  6. package/dist/bundle/ci.d.ts.map +1 -0
  7. package/dist/bundle/ci.js +113 -0
  8. package/dist/bundle/ci.js.map +1 -0
  9. package/dist/bundle/contract.d.ts +111 -0
  10. package/dist/bundle/contract.d.ts.map +1 -0
  11. package/dist/bundle/contract.js +352 -0
  12. package/dist/bundle/contract.js.map +1 -0
  13. package/dist/bundle/export.d.ts +36 -0
  14. package/dist/bundle/export.d.ts.map +1 -0
  15. package/dist/bundle/export.js +152 -0
  16. package/dist/bundle/export.js.map +1 -0
  17. package/dist/bundle/external.d.ts +66 -0
  18. package/dist/bundle/external.d.ts.map +1 -0
  19. package/dist/bundle/external.js +238 -0
  20. package/dist/bundle/external.js.map +1 -0
  21. package/dist/bundle/format.d.ts +94 -0
  22. package/dist/bundle/format.d.ts.map +1 -0
  23. package/dist/bundle/format.js +42 -0
  24. package/dist/bundle/format.js.map +1 -0
  25. package/dist/bundle/import.d.ts +49 -0
  26. package/dist/bundle/import.d.ts.map +1 -0
  27. package/dist/bundle/import.js +116 -0
  28. package/dist/bundle/import.js.map +1 -0
  29. package/dist/cli/index.d.ts +3 -0
  30. package/dist/cli/index.d.ts.map +1 -0
  31. package/dist/cli/index.js +1402 -0
  32. package/dist/cli/index.js.map +1 -0
  33. package/dist/cli/init.d.ts +48 -0
  34. package/dist/cli/init.d.ts.map +1 -0
  35. package/dist/cli/init.js +284 -0
  36. package/dist/cli/init.js.map +1 -0
  37. package/dist/db/schema.d.ts +3 -0
  38. package/dist/db/schema.d.ts.map +1 -0
  39. package/dist/db/schema.js +616 -0
  40. package/dist/db/schema.js.map +1 -0
  41. package/dist/db/store.d.ts +1011 -0
  42. package/dist/db/store.d.ts.map +1 -0
  43. package/dist/db/store.js +3888 -0
  44. package/dist/db/store.js.map +1 -0
  45. package/dist/graph/pagerank.d.ts +9 -0
  46. package/dist/graph/pagerank.d.ts.map +1 -0
  47. package/dist/graph/pagerank.js +47 -0
  48. package/dist/graph/pagerank.js.map +1 -0
  49. package/dist/indexer/architecture.d.ts +72 -0
  50. package/dist/indexer/architecture.d.ts.map +1 -0
  51. package/dist/indexer/architecture.js +112 -0
  52. package/dist/indexer/architecture.js.map +1 -0
  53. package/dist/indexer/behavior.d.ts +75 -0
  54. package/dist/indexer/behavior.d.ts.map +1 -0
  55. package/dist/indexer/behavior.js +395 -0
  56. package/dist/indexer/behavior.js.map +1 -0
  57. package/dist/indexer/boundaries.d.ts +60 -0
  58. package/dist/indexer/boundaries.d.ts.map +1 -0
  59. package/dist/indexer/boundaries.js +366 -0
  60. package/dist/indexer/boundaries.js.map +1 -0
  61. package/dist/indexer/churn.d.ts +15 -0
  62. package/dist/indexer/churn.d.ts.map +1 -0
  63. package/dist/indexer/churn.js +49 -0
  64. package/dist/indexer/churn.js.map +1 -0
  65. package/dist/indexer/classify.d.ts +9 -0
  66. package/dist/indexer/classify.d.ts.map +1 -0
  67. package/dist/indexer/classify.js +90 -0
  68. package/dist/indexer/classify.js.map +1 -0
  69. package/dist/indexer/context.d.ts +176 -0
  70. package/dist/indexer/context.d.ts.map +1 -0
  71. package/dist/indexer/context.js +193 -0
  72. package/dist/indexer/context.js.map +1 -0
  73. package/dist/indexer/continuity.d.ts +67 -0
  74. package/dist/indexer/continuity.d.ts.map +1 -0
  75. package/dist/indexer/continuity.js +288 -0
  76. package/dist/indexer/continuity.js.map +1 -0
  77. package/dist/indexer/detectchanges.d.ts +32 -0
  78. package/dist/indexer/detectchanges.d.ts.map +1 -0
  79. package/dist/indexer/detectchanges.js +74 -0
  80. package/dist/indexer/detectchanges.js.map +1 -0
  81. package/dist/indexer/discovery.d.ts +37 -0
  82. package/dist/indexer/discovery.d.ts.map +1 -0
  83. package/dist/indexer/discovery.js +136 -0
  84. package/dist/indexer/discovery.js.map +1 -0
  85. package/dist/indexer/externaldeps.d.ts +18 -0
  86. package/dist/indexer/externaldeps.d.ts.map +1 -0
  87. package/dist/indexer/externaldeps.js +288 -0
  88. package/dist/indexer/externaldeps.js.map +1 -0
  89. package/dist/indexer/freshness.d.ts +48 -0
  90. package/dist/indexer/freshness.d.ts.map +1 -0
  91. package/dist/indexer/freshness.js +128 -0
  92. package/dist/indexer/freshness.js.map +1 -0
  93. package/dist/indexer/git.d.ts +144 -0
  94. package/dist/indexer/git.d.ts.map +1 -0
  95. package/dist/indexer/git.js +444 -0
  96. package/dist/indexer/git.js.map +1 -0
  97. package/dist/indexer/index.d.ts +145 -0
  98. package/dist/indexer/index.d.ts.map +1 -0
  99. package/dist/indexer/index.js +930 -0
  100. package/dist/indexer/index.js.map +1 -0
  101. package/dist/indexer/modules.d.ts +62 -0
  102. package/dist/indexer/modules.d.ts.map +1 -0
  103. package/dist/indexer/modules.js +293 -0
  104. package/dist/indexer/modules.js.map +1 -0
  105. package/dist/indexer/preflight.d.ts +154 -0
  106. package/dist/indexer/preflight.d.ts.map +1 -0
  107. package/dist/indexer/preflight.js +399 -0
  108. package/dist/indexer/preflight.js.map +1 -0
  109. package/dist/indexer/protoScanner.d.ts +34 -0
  110. package/dist/indexer/protoScanner.d.ts.map +1 -0
  111. package/dist/indexer/protoScanner.js +133 -0
  112. package/dist/indexer/protoScanner.js.map +1 -0
  113. package/dist/indexer/risk.d.ts +115 -0
  114. package/dist/indexer/risk.d.ts.map +1 -0
  115. package/dist/indexer/risk.js +194 -0
  116. package/dist/indexer/risk.js.map +1 -0
  117. package/dist/indexer/serviceHostScanner.d.ts +25 -0
  118. package/dist/indexer/serviceHostScanner.d.ts.map +1 -0
  119. package/dist/indexer/serviceHostScanner.js +95 -0
  120. package/dist/indexer/serviceHostScanner.js.map +1 -0
  121. package/dist/indexer/serviceLinks.d.ts +105 -0
  122. package/dist/indexer/serviceLinks.d.ts.map +1 -0
  123. package/dist/indexer/serviceLinks.js +509 -0
  124. package/dist/indexer/serviceLinks.js.map +1 -0
  125. package/dist/indexer/shapehash.d.ts +98 -0
  126. package/dist/indexer/shapehash.d.ts.map +1 -0
  127. package/dist/indexer/shapehash.js +354 -0
  128. package/dist/indexer/shapehash.js.map +1 -0
  129. package/dist/indexer/skeleton.d.ts +15 -0
  130. package/dist/indexer/skeleton.d.ts.map +1 -0
  131. package/dist/indexer/skeleton.js +136 -0
  132. package/dist/indexer/skeleton.js.map +1 -0
  133. package/dist/indexer/symbolhistory.d.ts +41 -0
  134. package/dist/indexer/symbolhistory.d.ts.map +1 -0
  135. package/dist/indexer/symbolhistory.js +124 -0
  136. package/dist/indexer/symbolhistory.js.map +1 -0
  137. package/dist/indexer/watcher.d.ts +68 -0
  138. package/dist/indexer/watcher.d.ts.map +1 -0
  139. package/dist/indexer/watcher.js +179 -0
  140. package/dist/indexer/watcher.js.map +1 -0
  141. package/dist/mcp/server.d.ts +80 -0
  142. package/dist/mcp/server.d.ts.map +1 -0
  143. package/dist/mcp/server.js +1610 -0
  144. package/dist/mcp/server.js.map +1 -0
  145. package/dist/parser/index.d.ts +8 -0
  146. package/dist/parser/index.d.ts.map +1 -0
  147. package/dist/parser/index.js +33 -0
  148. package/dist/parser/index.js.map +1 -0
  149. package/dist/parser/languages/cpp.d.ts +3 -0
  150. package/dist/parser/languages/cpp.d.ts.map +1 -0
  151. package/dist/parser/languages/cpp.js +350 -0
  152. package/dist/parser/languages/cpp.js.map +1 -0
  153. package/dist/parser/languages/csharp.d.ts +3 -0
  154. package/dist/parser/languages/csharp.d.ts.map +1 -0
  155. package/dist/parser/languages/csharp.js +239 -0
  156. package/dist/parser/languages/csharp.js.map +1 -0
  157. package/dist/parser/languages/go.d.ts +3 -0
  158. package/dist/parser/languages/go.d.ts.map +1 -0
  159. package/dist/parser/languages/go.js +259 -0
  160. package/dist/parser/languages/go.js.map +1 -0
  161. package/dist/parser/languages/java.d.ts +3 -0
  162. package/dist/parser/languages/java.d.ts.map +1 -0
  163. package/dist/parser/languages/java.js +391 -0
  164. package/dist/parser/languages/java.js.map +1 -0
  165. package/dist/parser/languages/python.d.ts +3 -0
  166. package/dist/parser/languages/python.d.ts.map +1 -0
  167. package/dist/parser/languages/python.js +396 -0
  168. package/dist/parser/languages/python.js.map +1 -0
  169. package/dist/parser/languages/rust.d.ts +3 -0
  170. package/dist/parser/languages/rust.d.ts.map +1 -0
  171. package/dist/parser/languages/rust.js +159 -0
  172. package/dist/parser/languages/rust.js.map +1 -0
  173. package/dist/parser/languages/typescript.d.ts +3 -0
  174. package/dist/parser/languages/typescript.d.ts.map +1 -0
  175. package/dist/parser/languages/typescript.js +1442 -0
  176. package/dist/parser/languages/typescript.js.map +1 -0
  177. package/dist/parser/parserContext.d.ts +77 -0
  178. package/dist/parser/parserContext.d.ts.map +1 -0
  179. package/dist/parser/parserContext.js +354 -0
  180. package/dist/parser/parserContext.js.map +1 -0
  181. package/dist/parser/walker.d.ts +81 -0
  182. package/dist/parser/walker.d.ts.map +1 -0
  183. package/dist/parser/walker.js +217 -0
  184. package/dist/parser/walker.js.map +1 -0
  185. package/dist/parser/worker.d.ts +66 -0
  186. package/dist/parser/worker.d.ts.map +1 -0
  187. package/dist/parser/worker.js +129 -0
  188. package/dist/parser/worker.js.map +1 -0
  189. package/dist/parser/workerpool.d.ts +107 -0
  190. package/dist/parser/workerpool.d.ts.map +1 -0
  191. package/dist/parser/workerpool.js +383 -0
  192. package/dist/parser/workerpool.js.map +1 -0
  193. package/dist/scip/format.d.ts +87 -0
  194. package/dist/scip/format.d.ts.map +1 -0
  195. package/dist/scip/format.js +31 -0
  196. package/dist/scip/format.js.map +1 -0
  197. package/dist/scip/import.d.ts +37 -0
  198. package/dist/scip/import.d.ts.map +1 -0
  199. package/dist/scip/import.js +180 -0
  200. package/dist/scip/import.js.map +1 -0
  201. package/dist/types.d.ts +392 -0
  202. package/dist/types.d.ts.map +1 -0
  203. package/dist/types.js +4 -0
  204. package/dist/types.js.map +1 -0
  205. package/docs/architecture.md +105 -0
  206. package/docs/benchmarks/methodology.md +134 -0
  207. package/docs/benchmarks/raw-results.md +71 -0
  208. package/docs/benchmarks.md +74 -0
  209. package/docs/cli.md +148 -0
  210. package/docs/examples/behavior-tests.md +70 -0
  211. package/docs/examples/change-history.md +85 -0
  212. package/docs/examples/pre-edit-context.md +81 -0
  213. package/docs/examples/service-links.md +88 -0
  214. package/docs/examples.md +80 -0
  215. package/docs/faq.md +70 -0
  216. package/docs/internals.md +104 -0
  217. package/docs/languages.md +70 -0
  218. package/docs/limits.md +52 -0
  219. package/docs/mcp.md +199 -0
  220. package/docs/quickstart.md +119 -0
  221. package/docs/testing.md +123 -0
  222. package/docs/tools.md +115 -0
  223. package/package.json +52 -0
  224. package/research-codebase.md +578 -0
  225. package/seer-cli-docs.md +326 -0
  226. package/seer-master-guide.md +246 -0
  227. package/src/bundle/ci.ts +141 -0
  228. package/src/bundle/contract.ts +387 -0
  229. package/src/bundle/export.ts +175 -0
  230. package/src/bundle/external.ts +285 -0
  231. package/src/bundle/format.ts +92 -0
  232. package/src/bundle/import.ts +157 -0
  233. package/src/cli/index.ts +1249 -0
  234. package/src/cli/init.ts +389 -0
  235. package/src/db/schema.ts +614 -0
  236. package/src/db/store.ts +4306 -0
  237. package/src/graph/pagerank.ts +53 -0
  238. package/src/indexer/architecture.ts +148 -0
  239. package/src/indexer/behavior.ts +466 -0
  240. package/src/indexer/boundaries.ts +374 -0
  241. package/src/indexer/churn.ts +58 -0
  242. package/src/indexer/classify.ts +96 -0
  243. package/src/indexer/context.ts +340 -0
  244. package/src/indexer/continuity.ts +322 -0
  245. package/src/indexer/detectchanges.ts +94 -0
  246. package/src/indexer/discovery.ts +176 -0
  247. package/src/indexer/externaldeps.ts +243 -0
  248. package/src/indexer/freshness.ts +166 -0
  249. package/src/indexer/git.ts +453 -0
  250. package/src/indexer/index.ts +1092 -0
  251. package/src/indexer/modules.ts +358 -0
  252. package/src/indexer/preflight.ts +548 -0
  253. package/src/indexer/protoScanner.ts +147 -0
  254. package/src/indexer/risk.ts +304 -0
  255. package/src/indexer/serviceHostScanner.ts +92 -0
  256. package/src/indexer/serviceLinks.ts +543 -0
  257. package/src/indexer/shapehash.ts +370 -0
  258. package/src/indexer/skeleton.ts +169 -0
  259. package/src/indexer/symbolhistory.ts +172 -0
  260. package/src/indexer/watcher.ts +206 -0
  261. package/src/mcp/server.ts +1659 -0
  262. package/src/parser/index.ts +37 -0
  263. package/src/parser/languages/cpp.ts +361 -0
  264. package/src/parser/languages/csharp.ts +235 -0
  265. package/src/parser/languages/go.ts +259 -0
  266. package/src/parser/languages/java.ts +382 -0
  267. package/src/parser/languages/python.ts +370 -0
  268. package/src/parser/languages/rust.ts +164 -0
  269. package/src/parser/languages/typescript.ts +1435 -0
  270. package/src/parser/parserContext.ts +392 -0
  271. package/src/parser/walker.ts +306 -0
  272. package/src/parser/worker.ts +181 -0
  273. package/src/parser/workerpool.ts +448 -0
  274. package/src/scip/format.ts +83 -0
  275. package/src/scip/import.ts +216 -0
  276. package/src/types.ts +457 -0
  277. package/tests/benchmark-service-links.ts +244 -0
  278. package/tests/bug-regressions.ts +626 -0
  279. package/tests/filters.ts +264 -0
  280. package/tests/fixtures/Counter.tsx +38 -0
  281. package/tests/fixtures/caller.ts +7 -0
  282. package/tests/fixtures/collisions.ts +23 -0
  283. package/tests/fixtures/local_helper.ts +5 -0
  284. package/tests/fixtures/overloads.java +17 -0
  285. package/tests/fixtures/remote_helper.ts +4 -0
  286. package/tests/fixtures/sample.c +15 -0
  287. package/tests/fixtures/sample.cpp +47 -0
  288. package/tests/fixtures/sample.cs +62 -0
  289. package/tests/fixtures/sample.go +68 -0
  290. package/tests/fixtures/sample.h +30 -0
  291. package/tests/fixtures/sample.java +85 -0
  292. package/tests/fixtures/sample.py +46 -0
  293. package/tests/fixtures/sample.rs +78 -0
  294. package/tests/fixtures/sample.ts +76 -0
  295. package/tests/fixtures-service/HttpClients.cs +30 -0
  296. package/tests/fixtures-service/HttpClients.java +24 -0
  297. package/tests/fixtures-service/billing.ts +15 -0
  298. package/tests/fixtures-service/docker-compose.yml +15 -0
  299. package/tests/fixtures-service/gateway.ts +10 -0
  300. package/tests/fixtures-service/get_user.ts +11 -0
  301. package/tests/fixtures-service/graphql_client.ts +63 -0
  302. package/tests/fixtures-service/graphql_server.ts +30 -0
  303. package/tests/fixtures-service/grpc_client.go +30 -0
  304. package/tests/fixtures-service/http_clients.go +23 -0
  305. package/tests/fixtures-service/http_clients.py +38 -0
  306. package/tests/fixtures-service/http_clients.ts +49 -0
  307. package/tests/fixtures-service/k8s/payment-service.yaml +22 -0
  308. package/tests/fixtures-service/k8s_calls.ts +20 -0
  309. package/tests/fixtures-service/messaging.ts +87 -0
  310. package/tests/fixtures-service/trpc_client.ts +39 -0
  311. package/tests/fixtures-service/trpc_server.ts +39 -0
  312. package/tests/fixtures-service/user_service.proto +33 -0
  313. package/tests/fixtures-trackcd/Cargo.toml +11 -0
  314. package/tests/fixtures-trackcd/SpringController.java +36 -0
  315. package/tests/fixtures-trackcd/auth_service.ts +19 -0
  316. package/tests/fixtures-trackcd/complex_module.py +50 -0
  317. package/tests/fixtures-trackcd/express_app.js +30 -0
  318. package/tests/fixtures-trackcd/fastapi_app.py +49 -0
  319. package/tests/fixtures-trackcd/fastify_object_routes.js +32 -0
  320. package/tests/fixtures-trackcd/go.mod +8 -0
  321. package/tests/fixtures-trackcd/package.json +15 -0
  322. package/tests/fixtures-trackcd/requirements.txt +4 -0
  323. package/tests/fixtures-trackcd/tests/auth_service.test.ts +13 -0
  324. package/tests/fixtures-tracke/auth/AuthService.ts +23 -0
  325. package/tests/fixtures-tracke/auth/crypto.ts +7 -0
  326. package/tests/fixtures-tracke/billing/Billing.ts +20 -0
  327. package/tests/fixtures-tracke/billing/Invoice.ts +10 -0
  328. package/tests/fixtures-tracke/billing/server.ts +17 -0
  329. package/tests/fixtures-tracke/package.json +7 -0
  330. package/tests/fixtures-tracke/tests/auth.test.ts +23 -0
  331. package/tests/fixtures-tracke/tests/billing.test.ts +14 -0
  332. package/tests/fixtures-trackf/package.json +5 -0
  333. package/tests/fixtures-trackf/src/auth.ts +26 -0
  334. package/tests/fixtures-trackf/src/handlers.ts +35 -0
  335. package/tests/fixtures-tracki/billing/routes.ts +12 -0
  336. package/tests/fixtures-tracki/gateway/client.ts +13 -0
  337. package/tests/git-features.ts +267 -0
  338. package/tests/init.ts +141 -0
  339. package/tests/mcp-jit.ts +130 -0
  340. package/tests/mcp-smoke.ts +191 -0
  341. package/tests/mcp-trackcd.ts +169 -0
  342. package/tests/mcp-tracke.ts +229 -0
  343. package/tests/mcp-trackf.ts +330 -0
  344. package/tests/mcp-trackg.ts +219 -0
  345. package/tests/mcp-tracki.ts +174 -0
  346. package/tests/mcp-watcher.ts +126 -0
  347. package/tests/optspec.ts +194 -0
  348. package/tests/parallel-index.ts +333 -0
  349. package/tests/parallel-read.ts +125 -0
  350. package/tests/parallel-recovery.ts +241 -0
  351. package/tests/perf-callers.ts +145 -0
  352. package/tests/query-parity.ts +184 -0
  353. package/tests/query-perf.ts +55 -0
  354. package/tests/scale-parallel-parity.ts +225 -0
  355. package/tests/scale-test.ts +523 -0
  356. package/tests/smoke.ts +396 -0
  357. package/tests/trackcd.ts +325 -0
  358. package/tests/tracke-collisions.ts +255 -0
  359. package/tests/tracke.ts +314 -0
  360. package/tests/trackf-bugs.ts +406 -0
  361. package/tests/trackf.ts +390 -0
  362. package/tests/trackg.ts +1372 -0
  363. package/tests/tracki-boundaries.ts +202 -0
  364. package/tests/tracki-continuity.ts +253 -0
  365. package/tests/tracki-contract-diff.ts +249 -0
  366. package/tests/tracki-external-bundles.ts +341 -0
  367. package/tests/tracki-preflight.ts +251 -0
  368. package/tests/verify-roles.ts +51 -0
  369. package/tests/worker-parity.ts +286 -0
  370. package/tests/worker-pool.ts +262 -0
  371. package/tsconfig.json +20 -0
@@ -0,0 +1,3 @@
1
+ {
2
+ "git.ignoreLimitWarning": true
3
+ }
package/LICENSE ADDED
@@ -0,0 +1,176 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. for the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that you changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the LICENSE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
package/README.md ADDED
@@ -0,0 +1,272 @@
1
+ <div align="center">
2
+
3
+ # Seer
4
+
5
+ Give your AI agents a map of your repo before they edit.
6
+
7
+ [![License](https://img.shields.io/badge/license-Apache--2.0-blue.svg)](#license)
8
+ [![MCP](https://img.shields.io/badge/MCP-Enabled-brightgreen.svg)](docs/mcp.md)
9
+ [![NodeJS](https://img.shields.io/badge/Node.js-%3E%3D_18-green.svg?logo=nodedotjs)](https://nodejs.org/)
10
+ [![CI](https://img.shields.io/badge/CI-passing-brightgreen.svg)](https://github.com/vladimirhegai/Seer-Core/actions)
11
+ <br/><br/>
12
+ [![Benchmarks](https://img.shields.io/badge/Benchmarks-View_Report-green?style=for-the-badge)](docs/benchmarks.md)
13
+ [![Testing](https://img.shields.io/badge/Testing-View_Specs-brightgreen?style=for-the-badge)](docs/testing.md)
14
+
15
+ </div>
16
+
17
+ AI agents are good at writing code. However, they are much worse at knowing **what** they are about to affect.
18
+
19
+ Instead of making agents piece together context from repeated searches, Seer compresses callers, tests, routes, service links, boundaries, risk signals, and yes, **even your git history**, into context agents can actually use all whilst **<u>improving</u>** token usage, speed, and accuracy.
20
+
21
+ Oh, and Seer can absolutely help agents find their way inside large, messy repositories. Using signals like **call graphs**, **Louvain-style module clustering**, **service links**, and **symbol history**, agents can orient toward the right subsystem before they touch code.
22
+
23
+
24
+ - **Difference from IDE-style agent tools (e.g. Serena):**
25
+ Seer focuses less on editing symbols and refactoring code, and more on helping agents understand the impact of a change before they make it.
26
+
27
+ - **Difference from graph-first codebase tools (e.g. Codebase-Memory):**
28
+ Graph-first tools help agents explore structure. Seer focuses on edit-aware context: tests, risk, history, and change impact.
29
+
30
+ *Tested across real repositories and agent workflows, with measurable gains in context quality, speed, and token efficiency (see [Benchmarks](docs/benchmarks.md)).*
31
+
32
+ [pimage]
33
+
34
+ [benchmark summary block]
35
+
36
+
37
+ ---
38
+
39
+ ## Quick Start
40
+
41
+ ```bash
42
+ # 1. Get the engine (Node 18+; 26+ recommended)
43
+ git clone https://github.com/vladimirhegai/Seer-Core.git
44
+ cd Seer-Core && npm install && npm run build
45
+
46
+ # 2. Wire it into your AI agents, from inside the repo you want indexed
47
+ seer init # writes MCP config for Claude Code, Cursor, VS Code, Codex, Gemini
48
+ # and drops an AGENTS.md so the agent knows Seer exists
49
+
50
+ # 3. Reload your agent and ask it to call seer_health
51
+ ```
52
+
53
+ Seer indexes the workspace automatically on the first query, so there is no
54
+ separate build step. Prefer to paste the config yourself, or use Codex /
55
+ Antigravity? Every client's snippet is in [MCP Setup](docs/mcp.md).
56
+
57
+ → [Full Quick Start](docs/quickstart.md)
58
+
59
+ ---
60
+
61
+ ## Docs
62
+
63
+ - [Quick Start](docs/quickstart.md)
64
+ - [MCP Setup](docs/mcp.md)
65
+ - [Tool Guide](docs/tools.md)
66
+ - [CLI Reference](docs/cli.md)
67
+ - [Examples](docs/examples.md)
68
+ - [Benchmarks](docs/benchmarks.md)
69
+ - [Architecture](docs/architecture.md)
70
+ - [Known Limits](docs/limits.md)
71
+
72
+ ---
73
+
74
+ ## Why Seer Exists
75
+
76
+ [problem framing]
77
+
78
+ [pimage]
79
+
80
+ ---
81
+
82
+ ## What Agents Can Ask Seer
83
+
84
+ ### Before editing unfamiliar code
85
+
86
+ [pimage]
87
+
88
+ → [Example Workflow](docs/examples/pre-edit-context.md)
89
+
90
+ ### Find connected tests
91
+
92
+ [pimage]
93
+
94
+ → [Behavior / Test Examples](docs/examples/behavior-tests.md)
95
+
96
+ ### Follow routes and service boundaries
97
+
98
+ [pimage]
99
+
100
+ → [Service Links Guide](docs/examples/service-links.md)
101
+
102
+ ### Understand recent changes
103
+
104
+ [pimage]
105
+
106
+ → [History / Change Context Examples](docs/examples/change-history.md)
107
+
108
+ ---
109
+
110
+ ## Benchmarks
111
+
112
+ [pimage]
113
+
114
+ [small summary table]
115
+
116
+ → [Benchmark Summary](docs/benchmarks.md)
117
+
118
+ → [Methodology](docs/benchmarks/methodology.md)
119
+
120
+ → [Raw Results](docs/benchmarks/raw-results.md)
121
+
122
+ ---
123
+
124
+ ## FAQ
125
+
126
+ ### Is Seer another codebase graph MCP?
127
+
128
+ ### How is Seer different from codebase-memory?
129
+
130
+ ### How is Seer different from Serena?
131
+
132
+ ### Does Seer replace Claude / Cursor / Codex?
133
+
134
+ ### How is Seer different from grep?
135
+
136
+ → [Expanded FAQ / Positioning Notes](docs/faq.md)
137
+
138
+ ---
139
+
140
+ ## Installation
141
+
142
+ Seer is a local MCP server with zero native dependencies, so install is mostly
143
+ "point your agent at it." The one command that does this for every agent is
144
+ `seer init`.
145
+
146
+ ### From source (works today)
147
+
148
+ ```bash
149
+ git clone https://github.com/vladimirhegai/Seer-Core.git
150
+ cd Seer-Core
151
+ npm install
152
+ npm run build # produces dist/cli/index.js
153
+ npm link # optional: puts `seer` on your PATH
154
+ ```
155
+
156
+ ### From npm (once published)
157
+
158
+ ```bash
159
+ npx -y seer-mcp mcp # no global install, runs anywhere
160
+ ```
161
+
162
+ ### Connect your agents
163
+
164
+ From inside the repo you want indexed:
165
+
166
+ ```bash
167
+ seer init # Claude Code, Cursor, VS Code, Codex, Gemini (project-local)
168
+ seer init --client all # also Antigravity and the user-level configs
169
+ seer init --print # dry run: show the snippets, write nothing
170
+ seer init --npx # emit a portable npx launcher instead of a local path
171
+ ```
172
+
173
+ `seer init` is idempotent and merges into existing config files without clobbering
174
+ them. It also writes an `AGENTS.md` block so the agent actually reaches for Seer
175
+ instead of grepping. Supported clients and their exact config formats:
176
+
177
+ | Client | Config file | Root key |
178
+ |---|---|---|
179
+ | Claude Code | `.mcp.json` | `mcpServers` |
180
+ | Cursor | `.cursor/mcp.json` | `mcpServers` |
181
+ | VS Code (Copilot) | `.vscode/mcp.json` | `servers` |
182
+ | Codex | `~/.codex/config.toml` | `[mcp_servers.seer]` |
183
+ | Gemini CLI | `.gemini/settings.json` | `mcpServers` |
184
+ | Antigravity | `~/.gemini/config/mcp_config.json` | `mcpServers` |
185
+
186
+ ### Prebuilt / CI bundles
187
+
188
+ To share a prebuilt index (for example across a team or in CI), export a portable
189
+ bundle and import it elsewhere:
190
+
191
+ ```bash
192
+ seer ci bundle # fresh-index and emit a .seerbundle (for CI)
193
+ seer ci workflow # print a ready-to-paste GitHub Actions workflow
194
+ seer bundle import repo.seerbundle --external --alias upstream
195
+ ```
196
+
197
+ → [Full Installation Guide](docs/quickstart.md)
198
+
199
+ → [MCP Configuration](docs/mcp.md)
200
+
201
+ ---
202
+
203
+ ## CLI + MCP Reference
204
+
205
+ ### Core CLI commands
206
+
207
+ ### MCP tools overview
208
+
209
+ ### Common workflows
210
+
211
+ → [CLI Reference](docs/cli.md)
212
+
213
+ → [Tool Reference](docs/tools.md)
214
+
215
+ ---
216
+
217
+ ## Internals
218
+
219
+ [pimage]
220
+
221
+ ### Indexing
222
+
223
+ ### Symbol layers
224
+
225
+ ### Service links
226
+
227
+ ### Change context
228
+
229
+ ### Storage / bundles
230
+
231
+ → [Architecture](docs/architecture.md)
232
+
233
+ → [Implementation Notes](docs/internals.md)
234
+
235
+ ---
236
+
237
+ ## Testing + Validation
238
+
239
+ ### Unit / integration / scale testing
240
+
241
+ ### MCP parity testing
242
+
243
+ ### Benchmark validation
244
+
245
+ → [Testing Guide](docs/testing.md)
246
+
247
+ → [Benchmarks](docs/benchmarks.md)
248
+
249
+ ---
250
+
251
+ ## Supported Languages
252
+
253
+ → [Language Support Matrix](docs/languages.md)
254
+
255
+ ---
256
+
257
+ ## Known Limits
258
+
259
+ → [Known Limits](docs/limits.md)
260
+
261
+ ---
262
+
263
+ ## Contributing
264
+
265
+ → [CONTRIBUTING.md]
266
+
267
+ ---
268
+
269
+ ## License
270
+
271
+ This project is licensed under the Apache License, Version 2.0. See the [LICENSE](LICENSE) file for the full license text.
272
+
package/README_dev.md ADDED
@@ -0,0 +1,199 @@
1
+ # Seer — Developer & Implementation Guide
2
+
3
+ This document is the implementation-level companion to [seer-master-guide.md](seer-master-guide.md). It outlines what has been built, the environment setup, the local project architecture, key technical decisions, and the testing/scaling benchmarks.
4
+
5
+ For agent-facing usage and MCP commands, refer to the compact reference card at [seer-cli-docs.md](seer-cli-docs.md).
6
+ To extend language parsing, refer to the checklist in [adding-new-languages.md](adding-new-languages.md).
7
+
8
+ ---
9
+
10
+ ## 1. Environment & Technical Stack
11
+
12
+ | Category | Technology | Rationale |
13
+ |----------|------------|-----------|
14
+ | **Runtime** | Node.js 26+ | Fast local script execution and standard worker thread support. |
15
+ | **Language** | TypeScript (CommonJS output) | High type-safety for complex graph structures; CommonJS maps to standard Node tools. |
16
+ | **Database** | Synchronous `node:sqlite` (built-in) | Zero native npm dependencies; bypasses the compiler traps of native libraries on Node 26. |
17
+ | **Parser** | `web-tree-sitter` (WASM) | Fast Tree-Sitter AST parsing in V8 without native C++ compilation. |
18
+ | **Grammars** | `tree-sitter-wasms` | Pre-compiled WASM grammars for 8 supported languages loaded lazily. |
19
+
20
+ ---
21
+
22
+ ## 2. Quick Start
23
+
24
+ ```bash
25
+ # Install dependencies
26
+ npm install
27
+
28
+ # Transpile TypeScript to dist/
29
+ npm run build
30
+
31
+ # Index a target workspace
32
+ node dist/cli/index.js index /path/to/repo
33
+
34
+ # Query top symbols by PageRank
35
+ node dist/cli/index.js symbols --top 20
36
+
37
+ # Run the Model Context Protocol (MCP) server
38
+ node dist/cli/index.js mcp --workspace /path/to/repo
39
+
40
+ # Run all automated tests (smoke, parallel index, regressions, git, etc.)
41
+ npm test
42
+
43
+ # Run the large-codebase scale suite ( Helix, client-go, React, Godot, Linux, Unreal, etc.)
44
+ npm run scale-test
45
+
46
+ # Run the serial-vs-parallel row parity gate
47
+ npm run test:scale-parallel-parity
48
+ ```
49
+
50
+ ---
51
+
52
+ ## 3. Project Directory Map
53
+
54
+ ```text
55
+ src/
56
+ types.ts Core shared types (SymbolDef, SymbolRef, SymbolRow, etc.)
57
+ db/
58
+ schema.ts Idempotent DDL migrations + CURRENT_SCHEMA_VERSION (v10).
59
+ store.ts Database wrapper (transactions, read-only opens, indexers).
60
+ parser/
61
+ parserContext.ts Isolate WASM parser, grammar registry, and query cache.
62
+ walker.ts AST walker and LanguageExtractor interface.
63
+ worker.ts Thread worker implementation for parser pooling.
64
+ workerpool.ts Parser worker thread pool (crash respawning, lag buffer).
65
+ languages/ Language extractors (Python, TS/JS, Go, Java, Rust, C/C++, C#).
66
+ indexer/
67
+ discovery.ts File discovery with .gitignore & .seerignore logic.
68
+ classify.ts File classification mapping roles (project, vendor, test, generated).
69
+ index.ts Indexer engine: orchestrates parsing, caching, and post-passes.
70
+ skeleton.ts Structural skeleton renderer: signature preservation, body elision, focusSymbol.
71
+ modules.ts Louvain modular clustering over weighted graph edges.
72
+ behavior.ts Ranked tests-as-behavioral-spec engine.
73
+ risk.ts Decomposed deterministic edit-risk scoring.
74
+ context.ts One-call compact pre-edit context packets.
75
+ freshness.ts JIT sync checking dirty file hashes before MCP queries.
76
+ watcher.ts Chokidar file watcher mapping background updates.
77
+ boundaries.ts Monorepo package boundary identification.
78
+ continuity.ts Rename and cross-file move tracking engine.
79
+ bundle/
80
+ format.ts / ci.ts .seerbundle layout and reproducible CI bundle utilities.
81
+ export.ts / import.ts Bundle archive serialization, db vacuuming, and extraction.
82
+ contract.ts Protocol-aware API contract diff engine.
83
+ scip/ JSON SCIP precision overlay imports.
84
+ mcp/
85
+ server.ts MCP stdio server mapping JIT and watch cycles to 42+ tools.
86
+ cli/
87
+ index.ts Commander CLI endpoint mapping all query and setup verbs.
88
+ ```
89
+
90
+ ---
91
+
92
+ ## 4. Technical Foundations
93
+
94
+ ### 1. Database Schema (v10)
95
+ Seer uses a single `.seer/graph.db` SQLite database with **CURRENT_SCHEMA_VERSION = 10**. Migrations are fully idempotent and run automatically on writer opens using `ALTER TABLE ADD COLUMN` or `CREATE TABLE IF NOT EXISTS` checks.
96
+
97
+ ```mermaid
98
+ erDiagram
99
+ FILES ||--o{ SYMBOLS : defines
100
+ FILES ||--o{ FILE_IMPORTS : "declares imports"
101
+ SYMBOLS ||--o{ EDGES : "acts as from_id/to_id"
102
+ MODULES ||--o{ MODULE_MEMBERS : clusters
103
+ BOUNDARIES ||--o{ BOUNDARY_MEMBERS : groups
104
+ EXTERNAL_BUNDLES ||--o{ ROUTES : embeds
105
+ ```
106
+
107
+ #### Core Database Table Blueprint:
108
+ * **`_schema_meta`**: Tracks database metadata and schema integer version.
109
+ * **`files`**: Paths, sizes, content hashes, languages, and structural role classifications (`'project' | 'vendor' | 'generated' | 'test'`).
110
+ * **`symbols`**: Definition nodes carrying short `name`, qualified context-aware `qualified_name`, lexical bounds, `symbol_role` (`'definition' | 'declaration' | 'type_ref'`), and `is_rankable` flags.
111
+ * **`edges`**: Directed caller-callee call and import relationships tracking resolved target symbol IDs (`to_id`).
112
+ * **`file_imports`**: Syntactic import paths mapped to actual indexed files during post-processing.
113
+ * **`routes`**: Web framework API handlers (Express, Spring, tRPC, gRPC, MQ, etc.) with protocol, methods, and paths.
114
+ * **`external_dependencies`**: Manifest-declared packages (npm, cargo, poetry) mapping global dependency edges.
115
+ * **`config_keys`**: Config or environment variables read by symbols.
116
+ * **`modules` / `module_members` / `module_edges`**: Louvain clustering entities of modular file graphs.
117
+ * **`scip_imports`**: Precision overlays mapping provenance back to compiler sources.
118
+ * **`service_calls` / `service_links`**: Outbound network requests mapped to concrete routes.
119
+ * **`external_bundles`**: Read-only layers imported from third-party services representing API boundaries.
120
+ * **`boundaries` / `boundary_members` / `boundary_edges`**: Monorepo package partitions and their crossings.
121
+ * **`symbol_history_continuity`**: Resolved rename/move historical linkages.
122
+
123
+ ---
124
+
125
+ ### 2. Incremental Caching & Lazy PageRank
126
+ * **Per-File Content Hashing:** Seer records file content SHA-256 hashes. If a file is unchanged, parsing is completely skipped. Old definitions are maintained, and foreign keys cascade deletes cleanly when files *do* change.
127
+ * **Lazy PageRank:** PageRank computation runs over rankable symbols (functions, methods, classes) only. If no graph changes occurred (no files indexed, no new edge links, no file deletions), PageRank recomputation is skipped entirely, saving substantial time on large workspaces.
128
+
129
+ ---
130
+
131
+ ### 3. Parser Worker Pooling
132
+ WASM parsers in `web-tree-sitter` share one single V8 isolate runtime, which blocks standard Promise concurrency. To solve CPU bottlenecks:
133
+ * Seer utilizes a `WorkerPool` of native `worker_threads`.
134
+ * Each worker has an isolated WASM heap and `ParserContext` for reading, hashing, and parsing.
135
+ * The main thread handles all SQLite transactions sequentially in input order to keep `AUTOINCREMENT` IDs perfectly deterministic.
136
+ * *JIT freshness syncs* remain serial to bypass thread overhead on tiny delta edits.
137
+
138
+ ---
139
+
140
+ ### 4. Scope-Aware Edge Resolution
141
+ Resolving a callee symbol (`to_name`) to a target definition ID (`to_id`) uses a strict, three-pass post-index linking strategy. Passes only resolve remaining NULL links, ensuring the most narrow scope wins:
142
+ 1. **Same-File:** Matches a callee defined in the caller's own file.
143
+ 2. **Imported-File:** Scans the caller's imported files (via `file_imports`) to locate matching definitions.
144
+ 3. **Global Fallback:** Binds to a global definition of the matching name (used only when scope cannot resolve the target).
145
+
146
+ ---
147
+
148
+ ### 5. Monorepo Boundaries & Risk Signals
149
+ Monorepo borders are parsed from standard package files (`package.json`, `go.mod`, etc.). When a call edge originates in boundary A but resolves to a symbol in boundary B, it is recorded as a **Boundary Crossing**. These crossings are integrated directly into the `boundaryCrossings` risk profile within `seer_risk` and context packs.
150
+
151
+ ---
152
+
153
+ ### 6. Rename/Move Continuity
154
+ For accurate per-symbol history, Seer traces symbol refactoring:
155
+ * **Exact Shape matching:** Uses a 64-bit SimHash over identifier-folded AST subtrees.
156
+ * **Heuristic Matching:** Compares Hamming distance and scope similarity.
157
+ * **Ambiguity Guards:** Common shapes (e.g. standard getters) with multiple matches are restricted to low confidence, requiring name or scope corroboration to prevent false-positives.
158
+
159
+ ---
160
+
161
+ ## 5. Large Codebase Scale Benchmarks
162
+
163
+ The automated scale runner (`npm run scale-test`) validates Seer against 8 large open-source repositories to assert database integrity, execution speeds, and consistency invariants.
164
+
165
+ ### Measured Scale Matrix:
166
+ * **Helix (Rust):** ~240 files | ~5,000 symbols | ~24,000 edges
167
+ * **client-go (Go):** ~2,300 files | ~17,500 symbols | ~41,000 edges
168
+ * **React (TS/JS):** ~4,300 files | ~20,500 symbols | ~48,000 edges
169
+ * **Godot (C++/C#/Java):** ~4,200 files | ~134,000 symbols | ~541,000 edges
170
+ * **Linux (C/C++):** ~63,000 files | ~1,000,000 symbols | ~4,380,000 edges
171
+ * **TypeScript-main (TS):** ~39,000 files | ~133,000 symbols | ~118,000 edges
172
+ * **Unreal Engine (C++):** ~84,000 files | ~1,540,000 symbols | ~5,028,000 edges
173
+ * **Codebase-Memory (C/TS):** ~440 files | ~3,600 symbols | ~49,500 edges
174
+
175
+ ### Default Exclude Strategy:
176
+ By default, file discovery excludes:
177
+ * **Dependencies:** `node_modules/`, `vendor/`, `third_party/`, etc.
178
+ * **Build Artifacts:** `dist/`, `build/`, `target/`, `obj/`, `.next/`, `__pycache__/`, etc.
179
+ * **Generated Files:** `*.pb.go`, `*.generated.h`, `package-lock.json`, etc.
180
+ * All patterns matching `.gitignore` or `.seerignore` layers.
181
+
182
+ ---
183
+
184
+ ## 6. Testing Strategy
185
+
186
+ Seer maintains a zero-regression policy validated across four key testing layers:
187
+
188
+ ```mermaid
189
+ graph TD
190
+ Smoke[Smoke Fixtures<br/>Verify Extractors] --> Reg[Regression Tests<br/>Secure bug fixes]
191
+ Reg --> Operations[Operational Tests<br/>Verify caching & watch]
192
+ Operations --> Scale[Scale Checks<br/>Verify row determinism]
193
+ ```
194
+
195
+ 1. **Smoke Fixtures (`tests/smoke.ts`):** Validates AST extractors, qualified names, and basic call resolution across 15+ micro-fixtures for Python, TSX, Rust, Go, C/C++, Java, and C#.
196
+ 2. **Regression Suites (`tests/bug-regressions.ts`):** Hardens Seer against prior gaps including migration locks, Spring request mapping, Fastify object parsing, Fastify prefixes, and overload sibling ID counts.
197
+ 3. **Operational Tests (`tests/mcp-jit.ts`, `tests/mcp-watcher.ts`):** Validates background watch processes, transaction batch boundaries, JIT dirty sync delays, and read-only opens.
198
+ 4. **Scale Invariants (`tests/scale-test.ts`):** Enforces that immediate cached re-runs yield row-identical symbols, edges, and PageRank weights as their fresh database indexes.
199
+ 5. **MCP Optimization Spec (`tests/optspec.ts`):** Asserts 35 distinct constraints validating token-budget list prefix-trimming, did-you-mean search suggestions on zero-result queries, deterministic skeleton body folding, batch nesting refusal, and umbrella trace routing.