@backbencher/brain 0.0.0-stage → 0.1.1

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 (319) hide show
  1. package/CHANGELOG.md +298 -0
  2. package/EMBEDDINGS.md +355 -0
  3. package/LICENSE +21 -0
  4. package/README.md +415 -2
  5. package/bin/bb +13 -0
  6. package/dist/analysis-exclusions-7ZJDXOVZ.js +35 -0
  7. package/dist/brain-index-health-Q5APTJQL.js +17 -0
  8. package/dist/brain-relationship-enrichment-MYR2AM4F.js +558 -0
  9. package/dist/brain.sql-EIM4WS4D.js +29 -0
  10. package/dist/chunk-22V37YTK.js +1758 -0
  11. package/dist/chunk-2BSKD7O3.js +40 -0
  12. package/dist/chunk-2DE27DVC.js +1314 -0
  13. package/dist/chunk-2RRBMNBQ.js +322 -0
  14. package/dist/chunk-2WXYNLBA.js +29 -0
  15. package/dist/chunk-3CTFIJJB.js +17 -0
  16. package/dist/chunk-3ZTOHHSW.js +2104 -0
  17. package/dist/chunk-4H22TLOT.js +543 -0
  18. package/dist/chunk-5BVAH26D.js +340 -0
  19. package/dist/chunk-62DHLYW6.js +3427 -0
  20. package/dist/chunk-7AN7U5IZ.js +371 -0
  21. package/dist/chunk-7DRPNVIN.js +782 -0
  22. package/dist/chunk-7MBYT777.js +174 -0
  23. package/dist/chunk-AHDWGM7Q.js +236 -0
  24. package/dist/chunk-B5GEAAYF.js +818 -0
  25. package/dist/chunk-BEIZZ73B.js +1479 -0
  26. package/dist/chunk-BQ3OVQ3P.js +125 -0
  27. package/dist/chunk-D2Q4Y47A.js +53 -0
  28. package/dist/chunk-DIYAGQJL.js +34 -0
  29. package/dist/chunk-DWKXZ6IF.js +336 -0
  30. package/dist/chunk-DYM4FQEE.js +90 -0
  31. package/dist/chunk-ENW4BTBA.js +930 -0
  32. package/dist/chunk-EWMWK7WN.js +75 -0
  33. package/dist/chunk-EY5ZZUUA.js +626 -0
  34. package/dist/chunk-GBI7V7KY.js +69 -0
  35. package/dist/chunk-GEFFO6O2.js +152 -0
  36. package/dist/chunk-HJEWO5EV.js +247 -0
  37. package/dist/chunk-HQSPJDHI.js +613 -0
  38. package/dist/chunk-KAET47ZL.js +125 -0
  39. package/dist/chunk-KCDECRJY.js +440 -0
  40. package/dist/chunk-L5TDYKYK.js +76 -0
  41. package/dist/chunk-MLKGABMK.js +9 -0
  42. package/dist/chunk-NO3U3FJQ.js +201 -0
  43. package/dist/chunk-OWISBAOF.js +61 -0
  44. package/dist/chunk-QKTRECYS.js +1119 -0
  45. package/dist/chunk-QLK6ED4Q.js +235 -0
  46. package/dist/chunk-R2GW4F6R.js +19 -0
  47. package/dist/chunk-RCMTFSEF.js +87 -0
  48. package/dist/chunk-RM3PY6TG.js +376 -0
  49. package/dist/chunk-ROMM6KMC.js +433 -0
  50. package/dist/chunk-SGGCSHAX.js +12050 -0
  51. package/dist/chunk-SK6YVHFZ.js +211 -0
  52. package/dist/chunk-SM7RFQRO.js +214 -0
  53. package/dist/chunk-UGR4QIGS.js +67 -0
  54. package/dist/chunk-UQNQZXHY.js +711 -0
  55. package/dist/chunk-UUNHHX4M.js +13 -0
  56. package/dist/chunk-VL52PL2T.js +71 -0
  57. package/dist/chunk-WIG36E67.js +196 -0
  58. package/dist/chunk-XHK3WWGB.js +7436 -0
  59. package/dist/chunk-XTQM2IP3.js +2863 -0
  60. package/dist/chunk-ZE2LG76D.js +1296 -0
  61. package/dist/chunk-ZETTGPAW.js +6950 -0
  62. package/dist/cli/index.js +37 -0
  63. package/dist/config-HZAAYDP3.js +10 -0
  64. package/dist/content-search-7XIP555Q.js +593 -0
  65. package/dist/database-76RP44JG.js +9 -0
  66. package/dist/doctor-ANGETYMN.js +395 -0
  67. package/dist/edit-engine-CG72LDZD.js +51 -0
  68. package/dist/engine-BKEOGN7N.js +11 -0
  69. package/dist/engine-VIW6NSKO.js +18 -0
  70. package/dist/fingerprint-OBLIMZLP.js +33 -0
  71. package/dist/framework-intelligence-3LORTPOX.js +860 -0
  72. package/dist/freshness-3K6VU5OT.js +174 -0
  73. package/dist/graph-engine-HBSQNPTB.js +21 -0
  74. package/dist/graph_request-Q6NKB6N2.js +350 -0
  75. package/dist/impact_request-LYP672WE.js +68 -0
  76. package/dist/index-space-IUUN5WYV.js +15 -0
  77. package/dist/index-status-7OVGYSGW.js +34 -0
  78. package/dist/index.js +159 -0
  79. package/dist/instance-FO6QZRLH.js +19 -0
  80. package/dist/language-detection-DFCAU5DZ.js +11 -0
  81. package/dist/lsp/server.js +4301 -0
  82. package/dist/mcp/server.js +132 -0
  83. package/dist/onboard-DIQZV2NW.js +161 -0
  84. package/dist/override-companion-pass-XR7MHTP7.js +117 -0
  85. package/dist/parallel-indexer-FK2XKZXY.js +88 -0
  86. package/dist/pool-worker.js +1153 -0
  87. package/dist/project-health-6XPENVAA.js +94 -0
  88. package/dist/project-index-5SDPHITE.js +57 -0
  89. package/dist/project-registry-ZJ3DVUGO.js +355 -0
  90. package/dist/real-bash-analyzer-EJAU5LW5.js +2201 -0
  91. package/dist/real-c-analyzer-HBD3FNNH.js +5942 -0
  92. package/dist/real-clean-analyzer-4EEZLPV5.js +3470 -0
  93. package/dist/real-clojure-analyzer-Q55EBOO2.js +2818 -0
  94. package/dist/real-cpp-analyzer-IVVOD25R.js +4101 -0
  95. package/dist/real-csharp-analyzer-ZBNLNJZJ.js +3298 -0
  96. package/dist/real-css-analyzer-6XRQLUN7.js +15 -0
  97. package/dist/real-dart-analyzer-OLR72EFW.js +3944 -0
  98. package/dist/real-elixir-analyzer-MQWGAH2I.js +2192 -0
  99. package/dist/real-erlang-analyzer-7BVPQEHO.js +1731 -0
  100. package/dist/real-fsharp-analyzer-C2UPFNOA.js +2390 -0
  101. package/dist/real-go-analyzer-UKGI43YS.js +4126 -0
  102. package/dist/real-graphql-analyzer-VE2EEFII.js +1442 -0
  103. package/dist/real-groovy-analyzer-W26VACFW.js +2285 -0
  104. package/dist/real-haskell-analyzer-5CVVAJRX.js +2533 -0
  105. package/dist/real-hcl-analyzer-5ZT4U43N.js +725 -0
  106. package/dist/real-html-analyzer-JWNX3C6I.js +1759 -0
  107. package/dist/real-java-analyzer-GU42VBGQ.js +4677 -0
  108. package/dist/real-javascript-analyzer-QA4QOJ6W.js +14 -0
  109. package/dist/real-json-analyzer-MPA6PRXL.js +1640 -0
  110. package/dist/real-julia-analyzer-22CWYQMN.js +2085 -0
  111. package/dist/real-kotlin-analyzer-QDZJLXXU.js +3956 -0
  112. package/dist/real-lua-analyzer-G7NHLYKS.js +1957 -0
  113. package/dist/real-makefile-analyzer-OCY3GT5N.js +920 -0
  114. package/dist/real-markdown-analyzer-TEJK2JXJ.js +1215 -0
  115. package/dist/real-matlab-analyzer-Q5SWLN7Z.js +480 -0
  116. package/dist/real-nim-analyzer-YLXSK563.js +3603 -0
  117. package/dist/real-objective-c-analyzer-D23ACC2R.js +1518 -0
  118. package/dist/real-perl-analyzer-WWTRHYDT.js +1865 -0
  119. package/dist/real-php-analyzer-JNKJHTCL.js +9368 -0
  120. package/dist/real-powershell-analyzer-XRSNQERV.js +2915 -0
  121. package/dist/real-protobuf-analyzer-3OKUCZ7T.js +867 -0
  122. package/dist/real-python-analyzer-VXAFWI72.js +4880 -0
  123. package/dist/real-r-analyzer-ZGAIDVI4.js +2596 -0
  124. package/dist/real-ruby-analyzer-X2KTLVBH.js +2429 -0
  125. package/dist/real-rust-analyzer-OFFHPL2A.js +3359 -0
  126. package/dist/real-scala-analyzer-TSTW27J6.js +3293 -0
  127. package/dist/real-scss-analyzer-AVWYPSOQ.js +1515 -0
  128. package/dist/real-solidity-analyzer-UCI2KWUB.js +2608 -0
  129. package/dist/real-sql-analyzer-F77ZMQXR.js +3840 -0
  130. package/dist/real-svelte-analyzer-SF7NRUO5.js +2532 -0
  131. package/dist/real-swift-analyzer-MN5QT3QN.js +2311 -0
  132. package/dist/real-toml-analyzer-66L7BDCQ.js +929 -0
  133. package/dist/real-typescript-analyzer-6KEMVDWQ.js +14 -0
  134. package/dist/real-vb-analyzer-VICVPOP7.js +3145 -0
  135. package/dist/real-vba-analyzer-HXLTTHKM.js +466 -0
  136. package/dist/real-vue-analyzer-QXR56CFV.js +2680 -0
  137. package/dist/real-xml-analyzer-YL465ZJW.js +2405 -0
  138. package/dist/real-yaml-analyzer-SUBCBNSI.js +3528 -0
  139. package/dist/real-zig-analyzer-HIQLZMGY.js +2430 -0
  140. package/dist/regex-search-NJKHMZNO.js +239 -0
  141. package/dist/rules-ACHPB7QU.js +152 -0
  142. package/dist/scoped-path-MJYWJZQX.js +11 -0
  143. package/dist/setup-show-NT5ZHYNE.js +15 -0
  144. package/dist/setup-wizard-G5YYR5T6.js +24 -0
  145. package/dist/symbol-search-GZJIM2J2.js +16 -0
  146. package/dist/taint-KXUHHPIE.js +202 -0
  147. package/dist/taint-analyzer-N7YLZU3N.js +163 -0
  148. package/dist/tool-handlers-OJDC35DI.js +72 -0
  149. package/dist/tool-registry-BPEJNSZG.js +17 -0
  150. package/dist/tool-validation-Q57YMMBX.js +32 -0
  151. package/dist/type-inference-QMT2RMLV.js +13 -0
  152. package/dist/vector-binary-LMY4QGAN.js +19 -0
  153. package/dist/version-ABP2TUL2.js +9 -0
  154. package/dist/wasm-NMWO3WXY.js +16 -0
  155. package/docs/EMBEDDINGS.md +132 -0
  156. package/docs/README.md +178 -0
  157. package/docs/data/m10-baseline.json +602 -0
  158. package/docs/data/m10-benchmark-baseline.json +57 -0
  159. package/docs/data/m10-benchmark-last-run.json +127 -0
  160. package/docs/data/m10-final-audit.json +215 -0
  161. package/docs/data/m12-final-audit.json +138 -0
  162. package/docs/data/m12-surface-matrix.json +50 -0
  163. package/docs/data/public-tools.json +1902 -0
  164. package/docs/indexing/DEAD-ASSETS.md +88 -0
  165. package/docs/indexing/INDEXER-REVIEW.md +634 -0
  166. package/docs/indexing/PERFORMANCE-FINDINGS.md +106 -0
  167. package/docs/indexing/README.md +427 -0
  168. package/docs/indexing/discovery-matrix.md +41 -0
  169. package/docs/indexing/embeddings.md +325 -0
  170. package/docs/indexing/environment-variables.md +77 -0
  171. package/docs/indexing/performance.md +323 -0
  172. package/docs/indexing/resume.md +345 -0
  173. package/docs/indexing/troubleshooting.md +391 -0
  174. package/docs/man/bb.1 +190 -0
  175. package/docs/tools/bb_analyze.md +147 -0
  176. package/docs/tools/bb_annotate.md +110 -0
  177. package/docs/tools/bb_annotations.md +106 -0
  178. package/docs/tools/bb_ask.md +101 -0
  179. package/docs/tools/bb_cross_language.md +103 -0
  180. package/docs/tools/bb_doc.md +169 -0
  181. package/docs/tools/bb_edit.md +185 -0
  182. package/docs/tools/bb_graph.md +169 -0
  183. package/docs/tools/bb_health.md +156 -0
  184. package/docs/tools/bb_impact.md +117 -0
  185. package/docs/tools/bb_index.md +108 -0
  186. package/docs/tools/bb_migrate.md +135 -0
  187. package/docs/tools/bb_patterns.md +140 -0
  188. package/docs/tools/bb_search.md +150 -0
  189. package/docs/tools/bb_security.md +100 -0
  190. package/docs/tools/bb_visualize.md +184 -0
  191. package/grammars/README.md +57 -0
  192. package/grammars/THIRD-PARTY-NOTICES.md +50 -0
  193. package/grammars/tree-sitter-c/LICENSE +21 -0
  194. package/grammars/tree-sitter-clojure/LICENSE.md +21 -0
  195. package/grammars/tree-sitter-cpp/LICENSE +21 -0
  196. package/grammars/tree-sitter-csharp/LICENSE +21 -0
  197. package/grammars/tree-sitter-css/LICENSE +21 -0
  198. package/grammars/tree-sitter-css/README.md +21 -0
  199. package/grammars/tree-sitter-dart/LICENSE +20 -0
  200. package/grammars/tree-sitter-dart-upstream/LICENSE +20 -0
  201. package/grammars/tree-sitter-dart-upstream/README.md +18 -0
  202. package/grammars/tree-sitter-elixir/LICENSE +176 -0
  203. package/grammars/tree-sitter-elixir/README.md +11 -0
  204. package/grammars/tree-sitter-fsharp/LICENSE +21 -0
  205. package/grammars/tree-sitter-fsharp/README.md +45 -0
  206. package/grammars/tree-sitter-graphql/LICENSE +21 -0
  207. package/grammars/tree-sitter-graphql/README.md +106 -0
  208. package/grammars/tree-sitter-groovy/LICENSE +21 -0
  209. package/grammars/tree-sitter-groovy/README.md +4 -0
  210. package/grammars/tree-sitter-haskell/LICENSE +21 -0
  211. package/grammars/tree-sitter-haskell/README.md +394 -0
  212. package/grammars/tree-sitter-hcl/CHANGELOG.md +102 -0
  213. package/grammars/tree-sitter-hcl/LICENSE +201 -0
  214. package/grammars/tree-sitter-hcl/README.md +39 -0
  215. package/grammars/tree-sitter-html/LICENSE +21 -0
  216. package/grammars/tree-sitter-html/README.md +21 -0
  217. package/grammars/tree-sitter-julia/LICENSE +21 -0
  218. package/grammars/tree-sitter-julia/README.md +24 -0
  219. package/grammars/tree-sitter-kotlin/LICENSE +9 -0
  220. package/grammars/tree-sitter-lua/LICENSE.md +21 -0
  221. package/grammars/tree-sitter-lua/README.md +29 -0
  222. package/grammars/tree-sitter-make/LICENSE +21 -0
  223. package/grammars/tree-sitter-matlab/LICENSE +19 -0
  224. package/grammars/tree-sitter-matlab/README.md +99 -0
  225. package/grammars/tree-sitter-nim/LICENSE +373 -0
  226. package/grammars/tree-sitter-nim/README.md +46 -0
  227. package/grammars/tree-sitter-objc/LICENSE +21 -0
  228. package/grammars/tree-sitter-objc/README.md +20 -0
  229. package/grammars/tree-sitter-perl/LICENSE +7 -0
  230. package/grammars/tree-sitter-perl/README.md +100 -0
  231. package/grammars/tree-sitter-powershell/LICENSE +21 -0
  232. package/grammars/tree-sitter-powershell/README.md +7 -0
  233. package/grammars/tree-sitter-proto/LICENSE +21 -0
  234. package/grammars/tree-sitter-proto/README.md +105 -0
  235. package/grammars/tree-sitter-r/LICENSE +9 -0
  236. package/grammars/tree-sitter-r/README.md +66 -0
  237. package/grammars/tree-sitter-ruby/LICENSE +22 -0
  238. package/grammars/tree-sitter-scss/LICENSE +21 -0
  239. package/grammars/tree-sitter-scss/README.md +17 -0
  240. package/grammars/tree-sitter-solidity/LICENSE +7 -0
  241. package/grammars/tree-sitter-sql/LICENSE +21 -0
  242. package/grammars/tree-sitter-typescript/LICENSE +21 -0
  243. package/grammars/tree-sitter-vba/LICENSE +21 -0
  244. package/grammars/tree-sitter-vba/README.md +738 -0
  245. package/grammars/tree-sitter-vbnet/LICENSE +21 -0
  246. package/grammars/tree-sitter-vbnet/README.md +322 -0
  247. package/grammars/tree-sitter-xml/LICENSE +19 -0
  248. package/grammars/tree-sitter-yaml/LICENSE +20 -0
  249. package/grammars/tree-sitter-yaml/README.md +21 -0
  250. package/package.json +184 -4
  251. package/wasm/dart.wasm +0 -0
  252. package/wasm/tree-sitter-bash.wasm +0 -0
  253. package/wasm/tree-sitter-c.wasm +0 -0
  254. package/wasm/tree-sitter-c_sharp.wasm +0 -0
  255. package/wasm/tree-sitter-clean.wasm +0 -0
  256. package/wasm/tree-sitter-clojure.wasm +0 -0
  257. package/wasm/tree-sitter-core_schema.wasm +0 -0
  258. package/wasm/tree-sitter-cpp.wasm +0 -0
  259. package/wasm/tree-sitter-css.wasm +0 -0
  260. package/wasm/tree-sitter-dart.wasm +0 -0
  261. package/wasm/tree-sitter-elisp.wasm +0 -0
  262. package/wasm/tree-sitter-elixir.wasm +0 -0
  263. package/wasm/tree-sitter-elm.wasm +0 -0
  264. package/wasm/tree-sitter-embedded_template.wasm +0 -0
  265. package/wasm/tree-sitter-erlang.wasm +0 -0
  266. package/wasm/tree-sitter-fsharp.wasm +0 -0
  267. package/wasm/tree-sitter-fsharp_signature.wasm +0 -0
  268. package/wasm/tree-sitter-go.wasm +0 -0
  269. package/wasm/tree-sitter-graphql.wasm +0 -0
  270. package/wasm/tree-sitter-groovy.wasm +0 -0
  271. package/wasm/tree-sitter-haskell.wasm +0 -0
  272. package/wasm/tree-sitter-hcl.wasm +0 -0
  273. package/wasm/tree-sitter-html.wasm +0 -0
  274. package/wasm/tree-sitter-java.wasm +0 -0
  275. package/wasm/tree-sitter-javascript.wasm +0 -0
  276. package/wasm/tree-sitter-json.wasm +0 -0
  277. package/wasm/tree-sitter-json_schema.wasm +0 -0
  278. package/wasm/tree-sitter-julia.wasm +0 -0
  279. package/wasm/tree-sitter-kotlin.wasm +0 -0
  280. package/wasm/tree-sitter-lua.wasm +0 -0
  281. package/wasm/tree-sitter-make.wasm +0 -0
  282. package/wasm/tree-sitter-markdown.wasm +0 -0
  283. package/wasm/tree-sitter-markdown_inline.wasm +0 -0
  284. package/wasm/tree-sitter-matlab.wasm +0 -0
  285. package/wasm/tree-sitter-nim.wasm +0 -0
  286. package/wasm/tree-sitter-objc.wasm +0 -0
  287. package/wasm/tree-sitter-ocaml.wasm +0 -0
  288. package/wasm/tree-sitter-perl.wasm +0 -0
  289. package/wasm/tree-sitter-php.wasm +0 -0
  290. package/wasm/tree-sitter-php_only.wasm +0 -0
  291. package/wasm/tree-sitter-powershell.wasm +0 -0
  292. package/wasm/tree-sitter-protobuf.wasm +0 -0
  293. package/wasm/tree-sitter-python.wasm +0 -0
  294. package/wasm/tree-sitter-ql.wasm +0 -0
  295. package/wasm/tree-sitter-r.wasm +0 -0
  296. package/wasm/tree-sitter-rescript.wasm +0 -0
  297. package/wasm/tree-sitter-ruby.wasm +0 -0
  298. package/wasm/tree-sitter-rust.wasm +0 -0
  299. package/wasm/tree-sitter-scala.wasm +0 -0
  300. package/wasm/tree-sitter-scss.wasm +0 -0
  301. package/wasm/tree-sitter-solidity.wasm +0 -0
  302. package/wasm/tree-sitter-sql.wasm +0 -0
  303. package/wasm/tree-sitter-svelte.wasm +0 -0
  304. package/wasm/tree-sitter-swift.wasm +0 -0
  305. package/wasm/tree-sitter-systemrdl.wasm +0 -0
  306. package/wasm/tree-sitter-terraform.wasm +0 -0
  307. package/wasm/tree-sitter-tlaplus.wasm +0 -0
  308. package/wasm/tree-sitter-toml.wasm +0 -0
  309. package/wasm/tree-sitter-tsx.wasm +0 -0
  310. package/wasm/tree-sitter-typescript.wasm +0 -0
  311. package/wasm/tree-sitter-vba.wasm +0 -0
  312. package/wasm/tree-sitter-vbnet.wasm +0 -0
  313. package/wasm/tree-sitter-vue.wasm +0 -0
  314. package/wasm/tree-sitter-xml.wasm +0 -0
  315. package/wasm/tree-sitter-yaml.wasm +0 -0
  316. package/wasm/tree-sitter-zig.wasm +0 -0
  317. package/wasm/tree-sitter.wasm +0 -0
  318. package/wasm/tsx.wasm +0 -0
  319. package/wasm/typescript.wasm +0 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 ishaq2321 (https://github.com/ishaq2321)
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,416 @@
1
- # Temporary Holding Version
1
+ # Backbencher Brain (`bb`)
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ <p align="center">
4
+ <a href="https://backbencher.cc"><img src="https://backbencher.cc/web-app-manifest-512x512.png" width="88" alt="bb logo" /></a>
5
+ </p>
6
+
7
+ <p align="center">
8
+ <a href="https://www.npmjs.com/package/@backbencher/brain"><img src="https://img.shields.io/npm/v/@backbencher%2Fbrain.svg" alt="npm version"></a>
9
+ <a href="https://github.com/backbencher-hq/backbencher-brain/actions/workflows/ci.yml"><img src="https://github.com/backbencher-hq/backbencher-brain/actions/workflows/ci.yml/badge.svg" alt="CI"></a>
10
+ <a href="https://github.com/backbencher-hq/backbencher-brain/blob/main/LICENSE"><img src="https://img.shields.io/github/license/backbencher-hq/backbencher-brain.svg" alt="MIT license"></a>
11
+ </p>
12
+
13
+ **Evidence is the answer.** `bb` is local-first, runtime-agnostic code intelligence: it indexes a repository with
14
+ **50 Tree-sitter language analyzers**, stores the result in a per-project SQLite database, and answers
15
+ questions about it from a CLI, an **MCP server** for agent hosts, or a library. Node **and** Bun are
16
+ supported. No telemetry, no server, no account required.
17
+
18
+ ```
19
+ source ──▶ AST index (SQLite) ──▶ graph / search / evidence ──▶ bb CLI · MCP · library
20
+ ```
21
+
22
+ The index stores symbols, relationships (including cross-language edges), complexity, framework and
23
+ security-flow inputs, and optional embeddings. Every answer declares whether it is fresh or stale; a
24
+ missing answer is reported as missing rather than guessed. Embeddings are model-labeled per row, and
25
+ `bb_ask` never compares across vector spaces: rows written by a different model are not searched
26
+ until `bb index --force` re-embeds them, and the answer says so instead of returning a mixed index
27
+ as if it were one space.
28
+
29
+ - **Docs index:** [`docs/README.md`](https://github.com/backbencher-hq/backbencher-brain/blob/main/docs/README.md)
30
+ - **Indexing guide:** [`docs/indexing/README.md`](docs/indexing/README.md)
31
+ - **Analyzers:** one canonical page per language — [`docs/analyzers/README.md`](https://github.com/backbencher-hq/backbencher-brain/blob/main/docs/analyzers/README.md)
32
+ - **Tools:** [`docs/tools/`](docs/tools/) (generated from the tool registry)
33
+
34
+ ---
35
+
36
+ ## Install
37
+
38
+ Backbencher ships as an npm package. Node.js 18 or newer is the only requirement.
39
+
40
+ ```bash
41
+ npm install -g @backbencher/brain
42
+ bb --version
43
+ ```
44
+
45
+ The package is the primary and version-exact path — it is what `bb upgrade` reports as the install command.
46
+
47
+ ### Installer scripts (alternative)
48
+
49
+ On Linux, macOS and Windows the `install.sh` / `install.ps1` installers are also available. They **prefer
50
+ npm** and only fall back to a checksum-verified GitHub release binary when npm is not available.
51
+
52
+ **Linux and macOS**
53
+
54
+ ```bash
55
+ curl -fsSL https://backbencher.cc/install.sh | bash
56
+ ```
57
+
58
+ **Windows PowerShell**
59
+
60
+ ```powershell
61
+ irm https://backbencher.cc/install.ps1 | iex
62
+ ```
63
+
64
+ When the scripts fall back to a release binary they install it to `~/.local/bin` (`%USERPROFILE%\.local\bin`
65
+ on Windows); add that directory to your `PATH`.
66
+
67
+ ### Pin a release
68
+
69
+ ```bash
70
+ npm install -g @backbencher/brain@0.1.1
71
+ # or with the installer scripts:
72
+ VERSION=0.1.0 curl -fsSL https://backbencher.cc/install.sh | bash
73
+ ```
74
+
75
+ ### From source (contributors)
76
+
77
+ The compiled `dist/` path runs under Node (better-sqlite3); the source path runs under Bun (`bun:sqlite`)
78
+ and is what the analyzer gates use:
79
+
80
+ ```bash
81
+ git clone https://github.com/backbencher-hq/backbencher-brain.git
82
+ cd backbencher-brain
83
+ npm ci
84
+ npm run build
85
+ node bin/bb --help
86
+ # or, without a build, under Bun:
87
+ bun src/cli/index.ts --help
88
+ ```
89
+
90
+ ### Requirements
91
+
92
+ | | |
93
+ | --- | --- |
94
+ | OS / arch | Linux x64 & arm64, macOS x64 & arm64, Windows x64 & arm64 (WSL: use the Linux path) |
95
+ | npm install | Node.js **>= 18** (better-sqlite3 native module; prebuilt binaries are used automatically) |
96
+ | Installer scripts | npm on `PATH`, or a published release binary whose sha256 verifies against the release's `checksums.txt` |
97
+ | Build from source | Node >= 18, `npm ci`, `npm run build`; Bun optional for the source/dev path |
98
+ | Network | none for indexing; only the embedding provider you configure and the `bb upgrade` check |
99
+ | Disk | one SQLite database per project under `~/.bb` (see [Linux notes](#linux-notes) and [performance](docs/indexing/performance.md)) |
100
+
101
+ `bb` is a foreground CLI and a stdio MCP server. There is no daemon, no systemd unit and no background
102
+ service to install.
103
+
104
+ ---
105
+
106
+ ## Quick start
107
+
108
+ ```bash
109
+ # 1. Index a project (runs in parallel; safe to re-run — only changed files are parsed)
110
+ bb index ~/my-project
111
+
112
+ # 2. Search the index
113
+ bb search "calculateTotal" --dir ~/my-project
114
+
115
+ # 3. Index counts, health and freshness
116
+ bb stats ~/my-project
117
+ bb health ~/my-project
118
+
119
+ # 4. Optional: semantic retrieval over the index (local fallback works without a key)
120
+ bb setup
121
+ bb tool bb_ask --dir ~/my-project --args '{"query":"how does request authentication flow?"}'
122
+ ```
123
+
124
+ `bb index` reports what it actually did — files parsed, skipped and unchanged, symbols and relationships,
125
+ how long each phase took, and the final index health. The first run on a large repository takes minutes;
126
+ later runs only parse changed files. `bb index --force` rebuilds from scratch, and `bb index --changed`
127
+ does an incremental pass. The complete mode/flag matrix and every failure mode are in the
128
+ [indexing guide](docs/indexing/README.md).
129
+
130
+ ---
131
+
132
+ ## Linux notes
133
+
134
+ Linux-specific operational details, because this is the platform most installs run on:
135
+
136
+ - **Where data lives.** `~/.bb/projects/<sha1-of-realpath>/brain.db` (one database per indexed project),
137
+ with the WASM parser cache under `~/.bb/wasm`. `bb projects` lists every project with its database path,
138
+ size, counts and last index time; `bb projects --remove <id>` deletes one (`--force` skips the
139
+ confirmation).
140
+ - **Read-only home, containers, CI.** `BB_DATA_DIR` relocates the whole data directory, which is the
141
+ supported way to run where `$HOME` is read-only or where you want the index next to the repo:
142
+
143
+ ```bash
144
+ BB_DATA_DIR=/abs/project/.bb-data bb index /abs/project
145
+ BB_DATA_DIR=/abs/project/.bb-data bb mcp --dir /abs/project
146
+ ```
147
+
148
+ - **No root, no service.** Everything runs as your user. Config written by `bb setup` is `0600`; API keys
149
+ are never printed in full (`bb setup show` shows a truncated fingerprint). There is no daemon to start —
150
+ the MCP server runs over stdio for as long as the host keeps it open.
151
+ - **WAL needs a writable filesystem.** The database uses SQLite WAL mode; it needs a filesystem where
152
+ `brain.db` and its `-wal`/`-shm` files can be created and renamed. Network filesystems with broken POSIX
153
+ locking are not a supported data directory.
154
+ - **Headless and SSH.** Indexing and the CLI work without a display or TTY. Live progress is a redrawing
155
+ line on a TTY and rate-limited milestone lines in a pipe/log (with ETA), so `ssh host bb index … | tee`
156
+ stays readable.
157
+ - **CPU and memory.** The parse pool uses `min(cpus - 1, 12)` workers; one run per project is enough.
158
+ `bb index --concurrency <n>` (1–64) or `BB_INDEX_CONCURRENCY` pins the worker count for a machine where
159
+ you want to leave headroom. Memory scales with the worker count and file size; very large files are
160
+ capped by the discovery rules described in [`docs/indexing/discovery-matrix.md`](docs/indexing/discovery-matrix.md).
161
+ - **Updating and removing.**
162
+ - npm install: `npm install -g @backbencher/brain@latest`; `bb upgrade` tells you whether a newer release
163
+ exists and prints the exact command, but deliberately does not replace its own files;
164
+ - installer scripts: re-run the installer (or prefix `VERSION=…` to pin);
165
+ - remove the program with `npm rm -g backbencher-brain` (or delete the release binary); remove `~/.bb`
166
+ (or your `BB_DATA_DIR`) to delete every index and the embedding config.
167
+ - **WSL.** Use the Linux installer inside the WSL distribution; the index lives on the Linux filesystem, so
168
+ index projects from inside the distro rather than across `/mnt/c` when you care about speed.
169
+
170
+ ---
171
+
172
+ ## CLI
173
+
174
+ ```bash
175
+ bb --help # every command
176
+ bb <command> --help # per-command options
177
+ bb help <command> # same, via the help command
178
+ ```
179
+
180
+ | Command | Purpose |
181
+ | --- | --- |
182
+ | `bb index [dir]` | Build/refresh the index (modes: full, `--changed`, `--resume`, `--post`, `--skip-post-processing`, `--file`, `--exclude`, `--concurrency`, `--force`) |
183
+ | `bb search [query]` | Search the index: modes `symbols` (default), `content`, `symbol`, `file` |
184
+ | `bb stats [dir]` | Counts only (files/symbols/relationships/embeddings) and the database path |
185
+ | `bb status [dir]` | In-flight/last-run state and per-phase timings (discovery, parse, db flush) |
186
+ | `bb health [dir]` | Index health and file freshness |
187
+ | `bb projects` | Every indexed project: DB path, size, counts, last index (`--remove <id>`, `--force`) |
188
+ | `bb setup` | Interactive embedding-provider setup (key validated before saving, written `0600`) |
189
+ | `bb setup show` | Print effective embedding config (key as truncated fingerprint only, never the full key) |
190
+ | `bb doctor [--dir] [--fix]` | Read-only diagnosis of embedding setup and index consistency (`--fix` repairs config permissions only) |
191
+ | `bb upgrade` | Report whether a newer `bb` is published and print the install command |
192
+ | `bb onboard [dir]` | Write the generated bb-tools section into `<dir>/AGENTS.md` |
193
+ | `bb tool <name> --args '<json>'` | Run one public tool with JSON arguments (the MCP surface, scriptable) |
194
+ | `bb mcp [--dir]` | Start the MCP server over stdio |
195
+ | `bb version` | Print the version (same as `bb -v` / `bb --version`) |
196
+ | `bb -v` / `bb version` | Print the version (same as `bb --version`) |
197
+
198
+ Global flags: `--verbose` (debug logs, per-file worker/WASM lines), `--quiet` (warnings/errors only).
199
+ A mistyped command suggests the closest real one and points to `bb --help`. `bb <command> --help` is
200
+ authoritative for that command's options; `bb help <command>` is the same. `bb docter` suggests `doctor`).
201
+ The full manual ships with npm installs and is available as `man bb` after `npm install -g @backbencher/brain`.
202
+
203
+ Example outputs are honest by construction: `bb status` shows the actual per-phase timings, `bb health`
204
+ reports a *sample* for freshness (and says so), and a run that stored fewer files than it discovered
205
+ reports the index as incomplete rather than exit 0 in silence.
206
+
207
+ ### Help and manual
208
+
209
+ `bb <command> --help` shows that command's options. `bb help <command>` is the same.
210
+ The full manual ships with npm installs and is available as `man bb` after `npm install -g @backbencher/brain`.
211
+
212
+ ### Fingerprint-only and permissions-only claims (M32)
213
+
214
+ `bb setup show` prints the key as its last-4 fingerprint only, never the full key.
215
+ `bb doctor --fix` mutates exactly one thing: file permissions of embedding config files to `0600`.
216
+
217
+ key as last-4 fingerprint only, never the full key
218
+
219
+ ---
220
+
221
+ ## MCP server and agent hosts
222
+
223
+ Start the server for a project:
224
+
225
+ ```bash
226
+ bb mcp --dir /abs/path/to/project
227
+ ```
228
+
229
+ Claude Desktop (`claude_desktop_config.json`):
230
+
231
+ ```json
232
+ {
233
+ "mcpServers": {
234
+ "bb-brain": {
235
+ "command": "bb",
236
+ "args": ["mcp", "--dir", "/abs/path/to/project"]
237
+ }
238
+ }
239
+ }
240
+ ```
241
+
242
+ VS Code workspace (`<project>/.vscode/mcp.json`):
243
+
244
+ ```json
245
+ {
246
+ "servers": {
247
+ "bb-brain": {
248
+ "type": "stdio",
249
+ "command": "bb",
250
+ "cwd": "${workspaceFolder}",
251
+ "args": ["mcp", "--dir", "${workspaceFolder}"],
252
+ "env": { "BB_DATA_DIR": "${workspaceFolder}/.bb-data" }
253
+ }
254
+ }
255
+ }
256
+ ```
257
+
258
+ When the CLI is installed globally, `command` is just `bb`. From a source checkout, use the absolute path
259
+ to `bin/bb` (Node) or `bun run src/mcp/server.ts` (Bun) — see the
260
+ [MCP, CLI and Indexer Guide](https://github.com/backbencher-hq/backbencher-brain/blob/main/docs/MCP_CLI_INDEXER_GUIDE.md) for host setup for Claude Code, Cursor, Zed and
261
+ opencode, plus the stdout-safety and stdio lifecycle rules.
262
+
263
+ `bb onboard <project>` writes a generated “use the bb tools” section into that project's `AGENTS.md` so an
264
+ agent host discovers the tools without being told. The section is generated from the registry (it cannot
265
+ name a tool that does not exist) and is idempotent.
266
+
267
+ ### The sixteen public tools
268
+
269
+ `bb_search`, `bb_ask`, `bb_analyze`, `bb_patterns`, `bb_security`, `bb_doc`, `bb_visualize`, `bb_migrate`,
270
+ `bb_edit`, `bb_health`, `bb_index`, `bb_graph`, `bb_impact`, `bb_cross_language`, `bb_annotate`,
271
+ `bb_annotations`.
272
+
273
+ Read tools answer from the index and declare staleness; `bb_edit` is the only advertised mutation surface
274
+ and confines itself to the project, validates ASTs, writes atomically and reindexes. Key
275
+ [`docs/data/public-tools.json`](docs/data/public-tools.json) is the machine-readable contract (schemas,
276
+ defaults, examples, returns, errors, limitations, performance, safety and evidence guidance); the generated
277
+ human reference is [`docs/tools/`](docs/tools/). `bb --help` lists exactly these sixteen; the legacy tool
278
+ names retired before the first public release are documented in
279
+ [MCP_TOOL_MIGRATION.md](https://github.com/backbencher-hq/backbencher-brain/blob/main/archive/docs-pre-consolidation/MCP_TOOL_MIGRATION.md).
280
+
281
+ ---
282
+
283
+ ## Embedding providers (optional)
284
+
285
+ `bb` indexes without any provider; embeddings only power `bb_ask` / `bb_search` semantic ranking.
286
+ When you want them:
287
+
288
+ - **`bb setup`** opens an interactive wizard: it validates the key against the provider, then writes
289
+ the config with mode `0600`. The wizard prompts only once per provider and can be re-run any time.
290
+ - **`bb setup show`** prints the effective configuration and where each value came from, with the key
291
+ reduced to its last-4
292
+ fingerprint only — never the full key.
293
+ - **`bb doctor`** is read-only diagnosis of the embedding setup and index consistency; `bb doctor --fix`
294
+ mutates exactly one thing: config file permissions back to `0600`.
295
+
296
+ Vectors are model-labeled and the ask path never compares across vector spaces: after adding a model,
297
+ run `bb index --force` to re-embed, or those rows are reported as not searchable instead of being
298
+ silently mixed. See EMBEDDINGS.md for the full provider list, precedence rules (env > `~/.bb/config.json`
299
+ > `bb.json`) and the `--force` behaviour.
300
+
301
+ ## Language support
302
+
303
+ **50 languages**, all first-class in discovery, parsing, relationship extraction and the
304
+ cross-language graph:
305
+
306
+ Bash, C, C#, C++, Clean, Clojure, CSS, Dart, Elixir, Erlang, F#, Go, GraphQL, Groovy, Haskell, HCL, HTML,
307
+ Java, JavaScript, JSON, Julia, Kotlin, Lua, Make, Markdown, MATLAB, Nim, Objective-C, Perl, PHP, PowerShell,
308
+ Protobuf, Python, R, Ruby, Rust, Scala, SCSS, Solidity, SQL, Svelte, Swift, TOML, TypeScript, VB, VBA,
309
+ Vue, XML, YAML, Zig.
310
+
311
+ Each **analyzer** has exactly one canonical documentation page —
312
+ [`docs/analyzers/README.md`](https://github.com/backbencher-hq/backbencher-brain/blob/main/docs/analyzers/README.md) indexes all fifty —
313
+ covering its symbol contract, relationship ontology, supported/unsupported constructs, regex inventory,
314
+ complexity envelope, differential ground truth, corpus validation, mutation evidence and declared
315
+ limitations. That page is measured by `script/m14/verify-analyzer-docs.ts`; the implementation for
316
+ `<name>` is `src/ast/real-<name>-analyzer.ts` (`make` lives in `real-makefile-analyzer.ts`).
317
+
318
+ ## Editor and IDE
319
+
320
+ The same index powers an LSP 3.18 server — `dist/lsp/server.js --stdio`, shipped in the npm
321
+ package — and four editor integrations under [`ide/`](https://github.com/backbencher-hq/backbencher-brain/tree/main/ide):
322
+
323
+ - **VS Code family** (VS Code, Cursor, Antigravity): the `bb_lsp-vscode` extension (one VSIX)
324
+ provides hover with evidence tier and staleness, go-to-definition, references, document
325
+ symbols, workspace symbols and call hierarchy.
326
+ - **Zed**, **Helix** and **JetBrains** (via LSP4IJ): manifests and configuration templates that
327
+ point the editor at the same server.
328
+
329
+ They are complements to your editor's own language servers, by declared design: **no completion,
330
+ no diagnostics, no rename** — navigation, graph and evidence only
331
+ ([honesty contract](https://github.com/backbencher-hq/backbencher-brain/blob/main/docs/IDE-HONESTY-CONTRACT.md)).
332
+ The editor integration serves 49 languages (the 50 minus Objective-C, excluded because `.m` is shared
333
+ with MATLAB); 48 carry recorded editor evidence, and a language outside the launch set gets a
334
+ declared not-indexed answer rather than a guess. Per-request-ID claim levels are in
335
+ [`docs/m24/TOOL-DOC.md`](https://github.com/backbencher-hq/backbencher-brain/blob/main/docs/m24/TOOL-DOC.md),
336
+ per-editor install and verification status in
337
+ [`ide/README.md`](https://github.com/backbencher-hq/backbencher-brain/blob/main/ide/README.md) and on
338
+ [backbencher.cc/editors](https://backbencher.cc/editors). The extension's status bar shows the same
339
+ generated claim table the documentation ships.
340
+
341
+ Three request IDs ride an existing analyzer rather than adding a language: **TSX** is served by the
342
+ TypeScript analyzer, **Sass** by the CSS analyzer, and **Terraform** by the HCL analyzer. The editor integration
343
+ cannot exceed the analyzers — it is the same set, minus Objective-C: `bb_lsp` serves **49 languages** in
344
+ the editor (Objective-C is excluded because `.m` is shared with MATLAB and cannot be disambiguated by
345
+ extension), and **48** of those carry recorded in-editor evidence. MATLAB and Sass are sealed terminal
346
+ dispositions and are never counted as verified. See
347
+ [`docs/m24/TOOL-DOC.md`](https://github.com/backbencher-hq/backbencher-brain/blob/main/docs/m24/TOOL-DOC.md)
348
+ for the per-request-ID claim levels.
349
+
350
+ ---
351
+
352
+ ## Embeddings (optional)
353
+
354
+ The `bb_ask` tool (and semantic search) uses embeddings. Without a configured provider, `bb` falls back to local word
355
+ vectors — weaker by design, and labelled as such. `bb setup` offers prefilled free providers (OpenRouter,
356
+ NVIDIA NIM), validates the key with one `/embeddings` call before saving, and writes the config `0600`.
357
+ Changing the model or dimension requires `bb index --force`; vectors from different models or dimensions
358
+ are never compared. The full guide, precedence rules and every `BB_EMBEDDING_*` variable are in
359
+ [EMBEDDINGS.md](EMBEDDINGS.md) and [`docs/indexing/embeddings.md`](docs/indexing/embeddings.md).
360
+
361
+ The only network calls the product makes are the embedding provider you configure and the update check in
362
+ `bb upgrade`. Your source code is never uploaded, and there is no telemetry.
363
+
364
+ ---
365
+
366
+ ## Documentation map
367
+
368
+ | Document | Read it for |
369
+ | --- | --- |
370
+ | [`docs/README.md`](https://github.com/backbencher-hq/backbencher-brain/blob/main/docs/README.md) | the documentation index (start here if not sure) |
371
+ | [`docs/indexing/README.md`](docs/indexing/README.md) | the flag matrix, what each indexing mode does, how to read a run's report |
372
+ | [`docs/indexing/resume.md`](docs/indexing/resume.md) | interrupt/checkpoint/resume and the `skipped-unchanged` trap |
373
+ | [`docs/indexing/performance.md`](docs/indexing/performance.md) | measured timings, why a big repo takes time, what is **not** measured |
374
+ | [`docs/indexing/troubleshooting.md`](docs/indexing/troubleshooting.md) | worker-pool failures and other common errors |
375
+ | [`docs/indexing/environment-variables.md`](docs/indexing/environment-variables.md) | every `BB_*` variable and whether it is a user knob |
376
+ | [`docs/indexing/discovery-matrix.md`](docs/indexing/discovery-matrix.md) | exactly what is scanned (and what is not), case by case |
377
+ | [`docs/ARCHITECTURE.md`](https://github.com/backbencher-hq/backbencher-brain/blob/main/docs/ARCHITECTURE.md) | module layout, evidence and mutation contracts |
378
+ | [`docs/GRAPH_ENGINE.md`](https://github.com/backbencher-hq/backbencher-brain/blob/main/docs/GRAPH_ENGINE.md) | what each relationship edge means and how it is resolved |
379
+ | [`docs/tools/`](docs/tools/) | the generated per-tool reference (schemas, examples, errors, limits) |
380
+ | [`docs/analyzers/README.md`](https://github.com/backbencher-hq/backbencher-brain/blob/main/docs/analyzers/README.md) | the 50 analyzer pages |
381
+ | [`docs/MCP_CLI_INDEXER_GUIDE.md`](https://github.com/backbencher-hq/backbencher-brain/blob/main/docs/MCP_CLI_INDEXER_GUIDE.md) | the end-to-end operational lifecycle (CLI/MCP parity, host setup, evidence semantics) |
382
+ | [`EMBEDDINGS.md`](EMBEDDINGS.md) | the shipped embedding setup guide |
383
+ | [`CHANGELOG.md`](CHANGELOG.md) | release history and removed aliases |
384
+ | `man bb` | the CLI manual, installed with the npm package |
385
+
386
+ ---
387
+
388
+ ## Architecture and verification
389
+
390
+ `src/ast/` parses languages into the evidence substrate; `src/storage/` persists canonical `brain_*` tables
391
+ in a per-project SQLite database; `src/intelligence/` contains the search, semantic, graph, analysis,
392
+ pattern, security, documentation, visualization, migration, edit and health engines; `src/mcp/` and
393
+ `src/cli/` are thin adapters over the same registry and handlers. Read-only tools never refresh implicitly.
394
+ `bb_edit` is the only advertised mutation surface. See [ARCHITECTURE.md](https://github.com/backbencher-hq/backbencher-brain/blob/main/docs/ARCHITECTURE.md).
395
+
396
+ The engine and indexer suites run under both runtimes — Node (compiled `dist/`, better-sqlite3) and Bun
397
+ (`src/`, `bun:sqlite`):
398
+
399
+ ```bash
400
+ npm run build
401
+ npx tsx script/verify-engine.ts # parser surface
402
+ npx tsx script/verify-index.ts # indexer, store, resume, health
403
+ npx tsx script/verify-embed.ts # embeddings
404
+ npx tsx script/verify-cli-surface.ts # CLI surface
405
+ npm test # engine + schema + tool registry + public surface
406
+ npm run docs:verify # generated tool docs and documentation truth
407
+ ```
408
+
409
+ Documentation numbers are enforced rather than remembered: the indexing pages are gated against `src/`,
410
+ the per-tool references are generated from the registry, each analyzer page is measured against its
411
+ template, and `script/m14/verify-doc-truth-emissions.ts` fails when an analyzer page contradicts the
412
+ analyzer's emitted relationships.
413
+
414
+ ---
415
+
416
+ MIT licensed. Repository: [github.com/backbencher-hq/backbencher-brain](https://github.com/backbencher-hq/backbencher-brain).
package/bin/bb ADDED
@@ -0,0 +1,13 @@
1
+ #!/usr/bin/env node
2
+ // Global `bb` binary — runs the compiled CLI (plain Node, no tsx needed).
3
+ import { runCli } from "../dist/cli/index.js"
4
+
5
+ try {
6
+ await runCli(process.argv.slice(2))
7
+ } catch (error) {
8
+ // Keep CLI failures machine-readable and symmetric with MCP tool errors.
9
+ // Commander/handler stack traces are implementation detail, not API output.
10
+ const message = error instanceof Error ? error.message : String(error)
11
+ console.error(`error: ${message}`)
12
+ process.exitCode = 1
13
+ }
@@ -0,0 +1,35 @@
1
+ import {
2
+ NON_CODE_LANGUAGES,
3
+ analysisPathScopeSQL,
4
+ analysisScopeConditions,
5
+ analysisSymbolNameConditions,
6
+ analysisSymbolNameScopeSQL,
7
+ analysis_exclusions_exports,
8
+ isAnalysisExcluded,
9
+ isHardNoisePath,
10
+ isIndexArtifactName,
11
+ isIndexArtifactNameStrict,
12
+ isNoiseSymbolName,
13
+ isNonCodeLanguage,
14
+ isTestPath,
15
+ nonCodeLanguageSQL
16
+ } from "./chunk-SM7RFQRO.js";
17
+ import "./chunk-L5TDYKYK.js";
18
+ import "./chunk-ROMM6KMC.js";
19
+ import "./chunk-MLKGABMK.js";
20
+ export {
21
+ analysis_exclusions_exports as AnalysisExclusions,
22
+ NON_CODE_LANGUAGES,
23
+ analysisPathScopeSQL,
24
+ analysisScopeConditions,
25
+ analysisSymbolNameConditions,
26
+ analysisSymbolNameScopeSQL,
27
+ isAnalysisExcluded,
28
+ isHardNoisePath,
29
+ isIndexArtifactName,
30
+ isIndexArtifactNameStrict,
31
+ isNoiseSymbolName,
32
+ isNonCodeLanguage,
33
+ isTestPath,
34
+ nonCodeLanguageSQL
35
+ };
@@ -0,0 +1,17 @@
1
+ import {
2
+ checkEmbeddingCoverage,
3
+ formatHealthReport,
4
+ preFlightCheck,
5
+ runIndexHealthCheck
6
+ } from "./chunk-UQNQZXHY.js";
7
+ import "./chunk-QLK6ED4Q.js";
8
+ import "./chunk-QKTRECYS.js";
9
+ import "./chunk-2BSKD7O3.js";
10
+ import "./chunk-ROMM6KMC.js";
11
+ import "./chunk-MLKGABMK.js";
12
+ export {
13
+ checkEmbeddingCoverage,
14
+ formatHealthReport,
15
+ preFlightCheck,
16
+ runIndexHealthCheck
17
+ };