codebaseiq 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 (432) hide show
  1. package/CHANGELOG.md +481 -0
  2. package/LICENSE +202 -0
  3. package/README.md +349 -0
  4. package/dist/augment-vue-worker.js +2 -0
  5. package/dist/call-graph-evidence-gNsxjCW8.d.ts +16 -0
  6. package/dist/change-analysis-types-CCtoCHbC.d.ts +9 -0
  7. package/dist/chunk-2Q2LW5JW.js +14 -0
  8. package/dist/chunk-2X7V4HS4.js +88 -0
  9. package/dist/chunk-34WBMAYK.js +2 -0
  10. package/dist/chunk-35NLDRZC.js +2 -0
  11. package/dist/chunk-362QOSFD.js +3 -0
  12. package/dist/chunk-3IER7Q6H.js +12 -0
  13. package/dist/chunk-3JSXXYTZ.js +345 -0
  14. package/dist/chunk-3LCDIREB.js +4 -0
  15. package/dist/chunk-476NR5B7.js +2 -0
  16. package/dist/chunk-4FC325IF.js +30 -0
  17. package/dist/chunk-4WKDMDEW.js +9 -0
  18. package/dist/chunk-4XTAUQFD.js +2 -0
  19. package/dist/chunk-5PUWMSDU.js +26 -0
  20. package/dist/chunk-5VKBFZZU.js +3 -0
  21. package/dist/chunk-6BQ3DSPK.js +2 -0
  22. package/dist/chunk-6CS3UQTN.js +3 -0
  23. package/dist/chunk-6MUIJMVL.js +6 -0
  24. package/dist/chunk-6NW7MU72.js +40 -0
  25. package/dist/chunk-6OAHRI2D.js +6 -0
  26. package/dist/chunk-6YTSKJJ3.js +2 -0
  27. package/dist/chunk-7FND7D7N.js +2 -0
  28. package/dist/chunk-7MGU3HPH.js +2 -0
  29. package/dist/chunk-7NVGT435.js +2 -0
  30. package/dist/chunk-7XAN6GKB.js +2 -0
  31. package/dist/chunk-AAQQPKCU.js +2 -0
  32. package/dist/chunk-ADTBPVUZ.js +21 -0
  33. package/dist/chunk-AKB7V7TV.js +2 -0
  34. package/dist/chunk-ANFVSJWQ.js +11 -0
  35. package/dist/chunk-B2OB55RR.js +3 -0
  36. package/dist/chunk-B3UYV66Z.js +4 -0
  37. package/dist/chunk-B75HZHUP.js +2 -0
  38. package/dist/chunk-BFFZDZQV.js +2 -0
  39. package/dist/chunk-BGBBVSH4.js +2 -0
  40. package/dist/chunk-BH5F2Q4O.js +2 -0
  41. package/dist/chunk-BJ6SQAEN.js +2 -0
  42. package/dist/chunk-BMYOV5GP.js +77 -0
  43. package/dist/chunk-BVAJLC5A.js +7 -0
  44. package/dist/chunk-C6SBF2WH.js +4 -0
  45. package/dist/chunk-C74PPYLA.js +3 -0
  46. package/dist/chunk-C7QOQX32.js +8 -0
  47. package/dist/chunk-CAUCPUOF.js +7 -0
  48. package/dist/chunk-CO5R3UNA.js +2 -0
  49. package/dist/chunk-CQP3THUZ.js +7 -0
  50. package/dist/chunk-CVYSU6BX.js +16 -0
  51. package/dist/chunk-CWONGW6P.js +3 -0
  52. package/dist/chunk-DDZ7VHWV.js +20 -0
  53. package/dist/chunk-DGXRDLV5.js +2 -0
  54. package/dist/chunk-DO6WQD2T.js +3 -0
  55. package/dist/chunk-DQMDCD24.js +2 -0
  56. package/dist/chunk-DR2LURYU.js +3 -0
  57. package/dist/chunk-DRENNWRG.js +2 -0
  58. package/dist/chunk-ECQBG7PW.js +564 -0
  59. package/dist/chunk-EF2R3WNQ.js +2 -0
  60. package/dist/chunk-ELNRLMC5.js +29 -0
  61. package/dist/chunk-EMNIHCRB.js +18 -0
  62. package/dist/chunk-ENCCHKM6.js +5 -0
  63. package/dist/chunk-EZNMUY67.js +5 -0
  64. package/dist/chunk-FAJQ7LWY.js +3 -0
  65. package/dist/chunk-FDGD5AB5.js +2 -0
  66. package/dist/chunk-FETNQCFO.js +117 -0
  67. package/dist/chunk-FM5BPL4V.js +60 -0
  68. package/dist/chunk-FQKZWM4L.js +49 -0
  69. package/dist/chunk-FW53T7EB.js +2 -0
  70. package/dist/chunk-G6XFR4ZL.js +4 -0
  71. package/dist/chunk-GCHRX4YW.js +4 -0
  72. package/dist/chunk-GTIYTDRE.js +562 -0
  73. package/dist/chunk-GTXSJDCO.js +2 -0
  74. package/dist/chunk-GW6Z3WGY.js +2 -0
  75. package/dist/chunk-H3LGFZVK.js +2 -0
  76. package/dist/chunk-HKQUXIFO.js +2 -0
  77. package/dist/chunk-HOA5YGOH.js +3 -0
  78. package/dist/chunk-HPJRBHVT.js +3 -0
  79. package/dist/chunk-HRWGYWRJ.js +49 -0
  80. package/dist/chunk-I2T2LLK2.js +4 -0
  81. package/dist/chunk-ICFDQHAM.js +3 -0
  82. package/dist/chunk-ID63777H.js +4 -0
  83. package/dist/chunk-IJ4HMYBE.js +3 -0
  84. package/dist/chunk-ILMHV3KM.js +2 -0
  85. package/dist/chunk-IOP6FWIM.js +2 -0
  86. package/dist/chunk-IRQOAM5G.js +2 -0
  87. package/dist/chunk-J77SU6VA.js +38 -0
  88. package/dist/chunk-JE3WZ6II.js +2 -0
  89. package/dist/chunk-JEJLSICM.js +4 -0
  90. package/dist/chunk-JOIRNPPY.js +2 -0
  91. package/dist/chunk-JSOYNVWH.js +3 -0
  92. package/dist/chunk-KMITESMT.js +2 -0
  93. package/dist/chunk-KUW32IRO.js +2 -0
  94. package/dist/chunk-KWVHSKHK.js +31 -0
  95. package/dist/chunk-L4NRUAGJ.js +18 -0
  96. package/dist/chunk-L57ZKWVG.js +6 -0
  97. package/dist/chunk-LTA3BRZX.js +2 -0
  98. package/dist/chunk-LU3BMVH2.js +10 -0
  99. package/dist/chunk-LZYFLFEH.js +2 -0
  100. package/dist/chunk-MOVBWNIP.js +16 -0
  101. package/dist/chunk-MVB3DAEY.js +3 -0
  102. package/dist/chunk-N3IQCBCF.js +29 -0
  103. package/dist/chunk-NAUD7LCA.js +2 -0
  104. package/dist/chunk-NCZUNH3E.js +109 -0
  105. package/dist/chunk-NE6IU5ZD.js +5 -0
  106. package/dist/chunk-NEDP5RFQ.js +60 -0
  107. package/dist/chunk-NMTSZXCL.js +2 -0
  108. package/dist/chunk-NNJ2KZZG.js +4 -0
  109. package/dist/chunk-NNO6A2PO.js +2 -0
  110. package/dist/chunk-NNOKTMZT.js +20 -0
  111. package/dist/chunk-O6QTXQPJ.js +13 -0
  112. package/dist/chunk-OANDYLJQ.js +2 -0
  113. package/dist/chunk-OFBE4NGP.js +2 -0
  114. package/dist/chunk-OGTFJ3XD.js +2 -0
  115. package/dist/chunk-OL6KJP3N.js +16 -0
  116. package/dist/chunk-OLF4MA5W.js +8 -0
  117. package/dist/chunk-OTOKVOJ3.js +2 -0
  118. package/dist/chunk-OVTS4DKB.js +2 -0
  119. package/dist/chunk-OZYRSMSH.js +3 -0
  120. package/dist/chunk-P5XHIJHI.js +2 -0
  121. package/dist/chunk-PBI2LFKH.js +2 -0
  122. package/dist/chunk-PIOMTC27.js +2 -0
  123. package/dist/chunk-PTAWHLVJ.js +6 -0
  124. package/dist/chunk-PX4RYAAK.js +2 -0
  125. package/dist/chunk-PYAB5SM6.js +7 -0
  126. package/dist/chunk-Q5ELPRKQ.js +2 -0
  127. package/dist/chunk-Q65CQ4XL.js +2 -0
  128. package/dist/chunk-Q72QSKXC.js +308 -0
  129. package/dist/chunk-QCN62RTF.js +3 -0
  130. package/dist/chunk-QDCCHMVZ.js +2 -0
  131. package/dist/chunk-QHRNXP3C.js +3 -0
  132. package/dist/chunk-QKPLA6IC.js +2 -0
  133. package/dist/chunk-QOKYJ33H.js +2 -0
  134. package/dist/chunk-QW7EP6WI.js +21 -0
  135. package/dist/chunk-R2NOK63J.js +4 -0
  136. package/dist/chunk-RBAS5ZHI.js +2 -0
  137. package/dist/chunk-RDBI2RXU.js +9 -0
  138. package/dist/chunk-RKEJ6VTF.js +73 -0
  139. package/dist/chunk-RR7SX44N.js +35 -0
  140. package/dist/chunk-RU65DDUP.js +215 -0
  141. package/dist/chunk-SELM5MER.js +2 -0
  142. package/dist/chunk-SGX43S2L.js +2 -0
  143. package/dist/chunk-SMRBZ6EC.js +2 -0
  144. package/dist/chunk-SNNWPCN7.js +4 -0
  145. package/dist/chunk-ST7V3SKN.js +2 -0
  146. package/dist/chunk-SWHMHUKF.js +2 -0
  147. package/dist/chunk-SYDJMPES.js +2 -0
  148. package/dist/chunk-SZD2KF7Q.js +2 -0
  149. package/dist/chunk-T3DGWPXM.js +3 -0
  150. package/dist/chunk-TFZB6XTM.js +239 -0
  151. package/dist/chunk-TIIC3ZE7.js +2 -0
  152. package/dist/chunk-TRRC4ZJ7.js +2 -0
  153. package/dist/chunk-TXXOEMZJ.js +2 -0
  154. package/dist/chunk-UBGWN7I4.js +2 -0
  155. package/dist/chunk-UCD3H3UZ.js +5 -0
  156. package/dist/chunk-UDS562V4.js +5 -0
  157. package/dist/chunk-UNBY47BC.js +3 -0
  158. package/dist/chunk-UP3BUZR5.js +74 -0
  159. package/dist/chunk-UXM43C7T.js +3 -0
  160. package/dist/chunk-UZGZB3VB.js +3 -0
  161. package/dist/chunk-VE5AVNMP.js +2 -0
  162. package/dist/chunk-VEXUL62T.js +2 -0
  163. package/dist/chunk-VFY6Y2H6.js +61 -0
  164. package/dist/chunk-VUIYB2V3.js +2 -0
  165. package/dist/chunk-VXYS3FZD.js +23 -0
  166. package/dist/chunk-WE5RZHZ7.js +5 -0
  167. package/dist/chunk-WMPRTGH2.js +2 -0
  168. package/dist/chunk-WOQBZPIF.js +2 -0
  169. package/dist/chunk-XLQ3GLWZ.js +2 -0
  170. package/dist/chunk-XME3HPXZ.js +2 -0
  171. package/dist/chunk-XMQ23E27.js +2 -0
  172. package/dist/chunk-XWUOUWYI.js +2 -0
  173. package/dist/chunk-XZEE23VG.js +5 -0
  174. package/dist/chunk-Y6KHROC3.js +7 -0
  175. package/dist/chunk-YESXMKX3.js +3 -0
  176. package/dist/chunk-YMGZZEW4.js +2 -0
  177. package/dist/chunk-YSNONTJ2.js +2 -0
  178. package/dist/chunk-YUKYB54I.js +1 -0
  179. package/dist/chunk-YVCIMIOC.js +12 -0
  180. package/dist/chunk-Z54RD7VL.js +3 -0
  181. package/dist/chunk-ZKX2FRS6.js +15 -0
  182. package/dist/chunk-ZMI2JSX2.js +2 -0
  183. package/dist/chunk-ZV3JV5G5.js +8 -0
  184. package/dist/chunk-ZZ3MWF33.js +4 -0
  185. package/dist/chunk-ZZXSWSN6.js +2 -0
  186. package/dist/cli-context-3SNLDYBM.js +3 -0
  187. package/dist/cli-context-T3B7W6GG.js +2 -0
  188. package/dist/cli-program-YNOXO72B.js +7 -0
  189. package/dist/cli.js +3 -0
  190. package/dist/code-DlqpBDd0.d.ts +121 -0
  191. package/dist/command-descriptors-6AOUKWW7.js +346 -0
  192. package/dist/command-descriptors-ZFKJSRUP.js +344 -0
  193. package/dist/command-panels-SZONPMLJ.js +3 -0
  194. package/dist/config-types-BNoC96J3.d.ts +560 -0
  195. package/dist/db-D7sauVFH.d.ts +95 -0
  196. package/dist/direct-navigation-DP4LVMRX.js +3 -0
  197. package/dist/direct-navigation-FLUS3BT6.js +2 -0
  198. package/dist/exploration-topology-BG4v30HZ.d.ts +256 -0
  199. package/dist/file-dep-graph-Bqg3t3Px.d.ts +4 -0
  200. package/dist/file-kind-BKCVMNUf.d.ts +10 -0
  201. package/dist/frontend-behavior-evidence-EfM4_9bc.d.ts +4 -0
  202. package/dist/git-history-ChNHbfZQ.d.ts +13 -0
  203. package/dist/graph-evidence-BIFqyisO.d.ts +131 -0
  204. package/dist/health-DJaZXg8I.d.ts +340 -0
  205. package/dist/index.d.ts +183 -0
  206. package/dist/index.js +2 -0
  207. package/dist/invocation-command-descriptors-QT2JMY5J.js +3 -0
  208. package/dist/invocation-command-descriptors-YN4QJEAX.js +2 -0
  209. package/dist/next-anchor-candidates-BwMczMvX.d.ts +90 -0
  210. package/dist/output-continuation-command-2V2SL4TD.js +2 -0
  211. package/dist/output-continuation-command-65J5IP3O.js +3 -0
  212. package/dist/postinstall.js +3 -0
  213. package/dist/project-reindex-5JOKXAXT.js +2 -0
  214. package/dist/project-reindex-UQBIKO4M.js +3 -0
  215. package/dist/queries/affected.d.ts +40 -0
  216. package/dist/queries/affected.js +2 -0
  217. package/dist/queries/anchors.d.ts +123 -0
  218. package/dist/queries/anchors.js +2 -0
  219. package/dist/queries/architecture.d.ts +166 -0
  220. package/dist/queries/architecture.js +2 -0
  221. package/dist/queries/bottlenecks.d.ts +68 -0
  222. package/dist/queries/bottlenecks.js +2 -0
  223. package/dist/queries/by-kind.d.ts +27 -0
  224. package/dist/queries/by-kind.js +2 -0
  225. package/dist/queries/call-graph.d.ts +52 -0
  226. package/dist/queries/call-graph.js +2 -0
  227. package/dist/queries/change-surface.d.ts +55 -0
  228. package/dist/queries/change-surface.js +2 -0
  229. package/dist/queries/cleanup-plan.d.ts +66 -0
  230. package/dist/queries/cleanup-plan.js +2 -0
  231. package/dist/queries/co-change.d.ts +90 -0
  232. package/dist/queries/co-change.js +2 -0
  233. package/dist/queries/code.d.ts +6 -0
  234. package/dist/queries/code.js +2 -0
  235. package/dist/queries/complexity-hotspots.d.ts +61 -0
  236. package/dist/queries/complexity-hotspots.js +2 -0
  237. package/dist/queries/complexity.d.ts +74 -0
  238. package/dist/queries/complexity.js +2 -0
  239. package/dist/queries/context.d.ts +146 -0
  240. package/dist/queries/context.js +2 -0
  241. package/dist/queries/convergence.d.ts +33 -0
  242. package/dist/queries/convergence.js +2 -0
  243. package/dist/queries/coupling.d.ts +32 -0
  244. package/dist/queries/coupling.js +2 -0
  245. package/dist/queries/cycles.d.ts +66 -0
  246. package/dist/queries/cycles.js +2 -0
  247. package/dist/queries/dataflow.d.ts +77 -0
  248. package/dist/queries/dataflow.js +2 -0
  249. package/dist/queries/dead.d.ts +58 -0
  250. package/dist/queries/dead.js +2 -0
  251. package/dist/queries/decorative-checkers.d.ts +34 -0
  252. package/dist/queries/decorative-checkers.js +2 -0
  253. package/dist/queries/deep-chains.d.ts +5 -0
  254. package/dist/queries/deep-chains.js +2 -0
  255. package/dist/queries/dependence-slice.d.ts +46 -0
  256. package/dist/queries/dependence-slice.js +2 -0
  257. package/dist/queries/dependency-depth.d.ts +49 -0
  258. package/dist/queries/dependency-depth.js +2 -0
  259. package/dist/queries/deps.d.ts +15 -0
  260. package/dist/queries/deps.js +2 -0
  261. package/dist/queries/diff-impact.d.ts +165 -0
  262. package/dist/queries/diff-impact.js +2 -0
  263. package/dist/queries/doc-drift.d.ts +115 -0
  264. package/dist/queries/doc-drift.js +2 -0
  265. package/dist/queries/drift.d.ts +79 -0
  266. package/dist/queries/drift.js +2 -0
  267. package/dist/queries/duplicate-bodies.d.ts +55 -0
  268. package/dist/queries/duplicate-bodies.js +2 -0
  269. package/dist/queries/entry-map.d.ts +121 -0
  270. package/dist/queries/entry-map.js +2 -0
  271. package/dist/queries/evidence.d.ts +70 -0
  272. package/dist/queries/evidence.js +2 -0
  273. package/dist/queries/extract-candidates.d.ts +52 -0
  274. package/dist/queries/extract-candidates.js +2 -0
  275. package/dist/queries/fan.d.ts +53 -0
  276. package/dist/queries/fan.js +2 -0
  277. package/dist/queries/files.d.ts +20 -0
  278. package/dist/queries/files.js +2 -0
  279. package/dist/queries/health.d.ts +8 -0
  280. package/dist/queries/health.js +2 -0
  281. package/dist/queries/hierarchy.d.ts +21 -0
  282. package/dist/queries/hierarchy.js +2 -0
  283. package/dist/queries/hotspots.d.ts +42 -0
  284. package/dist/queries/hotspots.js +2 -0
  285. package/dist/queries/imports.d.ts +34 -0
  286. package/dist/queries/imports.js +2 -0
  287. package/dist/queries/incomplete-migration.d.ts +90 -0
  288. package/dist/queries/incomplete-migration.js +2 -0
  289. package/dist/queries/index.d.ts +180 -0
  290. package/dist/queries/index.js +2 -0
  291. package/dist/queries/isolated.d.ts +24 -0
  292. package/dist/queries/isolated.js +2 -0
  293. package/dist/queries/locality-candidates.d.ts +51 -0
  294. package/dist/queries/locality-candidates.js +2 -0
  295. package/dist/queries/members.d.ts +21 -0
  296. package/dist/queries/members.js +2 -0
  297. package/dist/queries/methods.d.ts +43 -0
  298. package/dist/queries/methods.js +2 -0
  299. package/dist/queries/not-implemented.d.ts +33 -0
  300. package/dist/queries/not-implemented.js +2 -0
  301. package/dist/queries/outline.d.ts +22 -0
  302. package/dist/queries/outline.js +2 -0
  303. package/dist/queries/passthrough-candidates.d.ts +41 -0
  304. package/dist/queries/passthrough-candidates.js +2 -0
  305. package/dist/queries/plan-context.d.ts +33 -0
  306. package/dist/queries/plan-context.js +2 -0
  307. package/dist/queries/react-component-duplicates.d.ts +39 -0
  308. package/dist/queries/react-component-duplicates.js +2 -0
  309. package/dist/queries/react-hook-candidates.d.ts +44 -0
  310. package/dist/queries/react-hook-candidates.js +2 -0
  311. package/dist/queries/react-large-component-pressure.d.ts +34 -0
  312. package/dist/queries/react-large-component-pressure.js +2 -0
  313. package/dist/queries/recent-duplicates.d.ts +79 -0
  314. package/dist/queries/recent-duplicates.js +2 -0
  315. package/dist/queries/redundant-reexports.d.ts +37 -0
  316. package/dist/queries/redundant-reexports.js +2 -0
  317. package/dist/queries/reference-neighborhood.d.ts +4 -0
  318. package/dist/queries/reference-neighborhood.js +2 -0
  319. package/dist/queries/reference-reachability.d.ts +48 -0
  320. package/dist/queries/reference-reachability.js +2 -0
  321. package/dist/queries/refs.d.ts +13 -0
  322. package/dist/queries/refs.js +2 -0
  323. package/dist/queries/self-audit.d.ts +65 -0
  324. package/dist/queries/self-audit.js +2 -0
  325. package/dist/queries/similar-chains.d.ts +48 -0
  326. package/dist/queries/similar-chains.js +2 -0
  327. package/dist/queries/similar-files.d.ts +35 -0
  328. package/dist/queries/similar-files.js +2 -0
  329. package/dist/queries/similar-signatures.d.ts +46 -0
  330. package/dist/queries/similar-signatures.js +2 -0
  331. package/dist/queries/similar.d.ts +187 -0
  332. package/dist/queries/similar.js +2 -0
  333. package/dist/queries/slice.d.ts +4 -0
  334. package/dist/queries/slice.js +2 -0
  335. package/dist/queries/source-inspection.d.ts +209 -0
  336. package/dist/queries/source-inspection.js +2 -0
  337. package/dist/queries/source-search.d.ts +85 -0
  338. package/dist/queries/source-search.js +2 -0
  339. package/dist/queries/stale-abstractions.d.ts +72 -0
  340. package/dist/queries/stale-abstractions.js +2 -0
  341. package/dist/queries/stats.d.ts +15 -0
  342. package/dist/queries/stats.js +2 -0
  343. package/dist/queries/surface.d.ts +22 -0
  344. package/dist/queries/surface.js +2 -0
  345. package/dist/queries/symbols.d.ts +14 -0
  346. package/dist/queries/symbols.js +2 -0
  347. package/dist/queries/system-map.d.ts +449 -0
  348. package/dist/queries/system-map.js +2 -0
  349. package/dist/queries/system.d.ts +21 -0
  350. package/dist/queries/system.js +2 -0
  351. package/dist/queries/test-quality.d.ts +56 -0
  352. package/dist/queries/test-quality.js +2 -0
  353. package/dist/queries/trace.d.ts +68 -0
  354. package/dist/queries/trace.js +2 -0
  355. package/dist/queries/twin-ab.d.ts +66 -0
  356. package/dist/queries/twin-ab.js +2 -0
  357. package/dist/queries/twin-drift.d.ts +119 -0
  358. package/dist/queries/twin-drift.js +2 -0
  359. package/dist/queries/unused-imports.d.ts +4 -0
  360. package/dist/queries/unused-imports.js +2 -0
  361. package/dist/queries/unused-params.d.ts +38 -0
  362. package/dist/queries/unused-params.js +2 -0
  363. package/dist/queries/value-flow.d.ts +42 -0
  364. package/dist/queries/value-flow.js +2 -0
  365. package/dist/queries/vue-component-duplicates.d.ts +43 -0
  366. package/dist/queries/vue-component-duplicates.js +2 -0
  367. package/dist/queries/vue-composable-candidates.d.ts +44 -0
  368. package/dist/queries/vue-composable-candidates.js +2 -0
  369. package/dist/queries/vue-large-view-pressure.d.ts +41 -0
  370. package/dist/queries/vue-large-view-pressure.js +2 -0
  371. package/dist/queries/wrapper-candidates.d.ts +34 -0
  372. package/dist/queries/wrapper-candidates.js +2 -0
  373. package/dist/reindex-worker.js +3 -0
  374. package/dist/reindex.d.ts +254 -0
  375. package/dist/reindex.js +298 -0
  376. package/dist/repository-text-C0Q8VYdN.d.ts +19 -0
  377. package/dist/runtime.d.ts +555 -0
  378. package/dist/runtime.js +4 -0
  379. package/dist/rust-semantic-session-server.js +2 -0
  380. package/dist/rust-semantic-session-worker.js +2 -0
  381. package/dist/rust-semantic-worker.js +2 -0
  382. package/dist/scip-cli-B7N3haxa.d.ts +67 -0
  383. package/dist/source-snippet-_wrcgmZc.d.ts +15 -0
  384. package/dist/symbol-types-BIQwfoAx.d.ts +74 -0
  385. package/dist/typescript-mailbox-worker.js +2 -0
  386. package/dist/watch-server.js +8 -0
  387. package/docs/AGENT_GUIDE.md +148 -0
  388. package/docs/AI_FAILURE_MODES.md +43 -0
  389. package/docs/API.md +40 -0
  390. package/docs/API_EVOLUTION.md +77 -0
  391. package/docs/CLI_JSON_OUTPUT.md +389 -0
  392. package/docs/COMMAND_REFERENCE.md +294 -0
  393. package/docs/CONFIGURATION_WRITE_SAFETY.md +131 -0
  394. package/docs/DETECTOR_GUIDE.md +46 -0
  395. package/docs/DURABILITY.md +159 -0
  396. package/docs/INDEX_GENERATIONS.md +167 -0
  397. package/docs/LOCK_PROTOCOL.md +133 -0
  398. package/docs/MAILBOX_LIFECYCLE.md +224 -0
  399. package/docs/REGEX_POLICY.md +36 -0
  400. package/docs/REINDEX_METADATA_COMPATIBILITY.md +104 -0
  401. package/docs/RUST_DURABLE_SESSION_PROTOCOL.md +126 -0
  402. package/docs/SECURITY_MODEL.md +125 -0
  403. package/docs/TELEMETRY_RETENTION.md +84 -0
  404. package/docs/TIME_SEMANTICS.md +77 -0
  405. package/docs/WATCH_REFRESH_REQUESTS.md +123 -0
  406. package/docs/WINDOWS_SIDECAR_RELEASE.md +424 -0
  407. package/docs/accuracy-audit-checklist.md +304 -0
  408. package/docs/accuracy-hardening-goal.md +500 -0
  409. package/docs/analyzer-inventory.md +78 -0
  410. package/docs/analyzer-validation-protocol.md +84 -0
  411. package/docs/architecture-coherence-vision.md +254 -0
  412. package/docs/assets/codebaseiq-logo-dark.svg +21 -0
  413. package/docs/assets/codebaseiq-logo.svg +24 -0
  414. package/docs/locality-analyzer-design.md +193 -0
  415. package/docs/schemas/cli-json-envelope.schema.json +237 -0
  416. package/docs/schemas/cli-output-page.schema.json +104 -0
  417. package/docs/schemas/npm-release-state.schema.json +146 -0
  418. package/docs/schemas/observation-receipt.schema.json +164 -0
  419. package/docs/schemas/project-config.schema.json +318 -0
  420. package/docs/schemas/suppression-record.schema.json +79 -0
  421. package/docs/schemas/windows-sidecar-provenance.schema.json +137 -0
  422. package/package.json +482 -0
  423. package/scripts/build-codebaseiq-windows.mjs +197 -0
  424. package/scripts/codebaseiq-windows-provenance.mjs +364 -0
  425. package/scripts/evidence-product-contract.mjs +197 -0
  426. package/scripts/verify-codebaseiq-windows.mjs +29 -0
  427. package/skills/codebaseiq/SKILL.md +75 -0
  428. package/skills/codebaseiq/agents/openai.yaml +4 -0
  429. package/skills/codebaseiq-explore/SKILL.md +34 -0
  430. package/skills/codebaseiq-explore/agents/openai.yaml +4 -0
  431. package/skills/concrete-plan/SKILL.md +79 -0
  432. package/skills/concrete-plan/agents/openai.yaml +4 -0
@@ -0,0 +1,364 @@
1
+ import { createHash } from 'node:crypto';
2
+ import { readFileSync } from 'node:fs';
3
+ import { join } from 'node:path';
4
+
5
+ export const WINDOWS_SIDECAR_PROVENANCE_KIND = 'codebaseiq-windows-sidecar-provenance';
6
+ export const WINDOWS_SIDECAR_PROVENANCE_VERSION = 1;
7
+ export const WINDOWS_SIDECAR_PROVENANCE_FILE = 'provenance.json';
8
+ export const DEFAULT_SCIP_REPOSITORY = 'https://github.com/scip-code/scip.git';
9
+ export const DEFAULT_SCIP_TAG = 'v0.8.1';
10
+ export const PINNED_GO_VERSION = 'go1.26.4';
11
+
12
+ export const WINDOWS_SIDECAR_BUILD = Object.freeze({
13
+ command: 'go build',
14
+ package: './cmd/scip',
15
+ flags: Object.freeze(['-trimpath', '-ldflags=-s -w']),
16
+ environment: Object.freeze({
17
+ CGO_ENABLED: '0',
18
+ GOOS: 'windows',
19
+ }),
20
+ });
21
+
22
+ export const WINDOWS_SIDECAR_TARGETS = Object.freeze([
23
+ Object.freeze({
24
+ goarch: 'amd64',
25
+ packageArch: 'x64',
26
+ filename: 'scip-win32-x64.exe',
27
+ peMachine: 'AMD64',
28
+ peMachineCode: 0x8664,
29
+ }),
30
+ Object.freeze({
31
+ goarch: 'arm64',
32
+ packageArch: 'arm64',
33
+ filename: 'scip-win32-arm64.exe',
34
+ peMachine: 'ARM64',
35
+ peMachineCode: 0xaa64,
36
+ }),
37
+ ]);
38
+
39
+ export class WindowsSidecarProvenanceError extends Error {
40
+ constructor(code, message) {
41
+ super(message);
42
+ this.name = 'WindowsSidecarProvenanceError';
43
+ this.code = code;
44
+ }
45
+ }
46
+
47
+ export function sha256(bytes) {
48
+ return createHash('sha256').update(bytes).digest('hex');
49
+ }
50
+
51
+ export function inspectPortableExecutable(bytes, filename = '<binary>') {
52
+ if (!Buffer.isBuffer(bytes) || bytes.length < 0x40) {
53
+ throw provenanceError('malformed-binary', `${filename} is too short to be a PE executable.`);
54
+ }
55
+ if (bytes[0] !== 0x4d || bytes[1] !== 0x5a) {
56
+ throw provenanceError('malformed-binary', `${filename} is missing the DOS MZ signature.`);
57
+ }
58
+
59
+ const peOffset = bytes.readUInt32LE(0x3c);
60
+ if (!Number.isSafeInteger(peOffset) || peOffset < 0x40 || peOffset + 26 > bytes.length) {
61
+ throw provenanceError('malformed-binary', `${filename} has an invalid PE header offset.`);
62
+ }
63
+ if (
64
+ bytes[peOffset] !== 0x50 ||
65
+ bytes[peOffset + 1] !== 0x45 ||
66
+ bytes[peOffset + 2] !== 0 ||
67
+ bytes[peOffset + 3] !== 0
68
+ ) {
69
+ throw provenanceError('malformed-binary', `${filename} is missing the PE signature.`);
70
+ }
71
+
72
+ const machineCode = bytes.readUInt16LE(peOffset + 4);
73
+ const target = WINDOWS_SIDECAR_TARGETS.find((candidate) => candidate.peMachineCode === machineCode);
74
+ if (!target) {
75
+ throw provenanceError(
76
+ 'wrong-architecture',
77
+ `${filename} has unsupported PE machine 0x${machineCode.toString(16).padStart(4, '0')}.`,
78
+ );
79
+ }
80
+
81
+ const optionalHeaderMagic = bytes.readUInt16LE(peOffset + 24);
82
+ if (optionalHeaderMagic !== 0x20b) {
83
+ throw provenanceError(
84
+ 'malformed-binary',
85
+ `${filename} is not a PE32+ executable (optional-header magic 0x${optionalHeaderMagic
86
+ .toString(16)
87
+ .padStart(4, '0')}).`,
88
+ );
89
+ }
90
+
91
+ return {
92
+ peMachine: target.peMachine,
93
+ peMachineCode: `0x${machineCode.toString(16).padStart(4, '0')}`,
94
+ };
95
+ }
96
+
97
+ export function inspectWindowsSidecarBinary(file, readFile = readFileSync) {
98
+ const bytes = readFile(file);
99
+ const pe = inspectPortableExecutable(bytes, file);
100
+ return {
101
+ size: bytes.length,
102
+ sha256: sha256(bytes),
103
+ ...pe,
104
+ };
105
+ }
106
+
107
+ export function createWindowsSidecarProvenance({
108
+ sidecarDir,
109
+ packageName,
110
+ packageVersion,
111
+ sourceRepository = DEFAULT_SCIP_REPOSITORY,
112
+ sourceTag = DEFAULT_SCIP_TAG,
113
+ sourceCommit,
114
+ goVersion = PINNED_GO_VERSION,
115
+ readFile = readFileSync,
116
+ }) {
117
+ if (!isCommit(sourceCommit)) {
118
+ throw provenanceError('invalid-build-input', `Source commit must be a full 40-character Git commit.`);
119
+ }
120
+
121
+ return {
122
+ kind: WINDOWS_SIDECAR_PROVENANCE_KIND,
123
+ schemaVersion: WINDOWS_SIDECAR_PROVENANCE_VERSION,
124
+ package: {
125
+ name: packageName,
126
+ version: packageVersion,
127
+ },
128
+ source: {
129
+ repository: sourceRepository,
130
+ tag: sourceTag,
131
+ commit: sourceCommit,
132
+ },
133
+ toolchain: {
134
+ goVersion,
135
+ },
136
+ build: {
137
+ command: WINDOWS_SIDECAR_BUILD.command,
138
+ package: WINDOWS_SIDECAR_BUILD.package,
139
+ flags: [...WINDOWS_SIDECAR_BUILD.flags],
140
+ environment: {
141
+ ...WINDOWS_SIDECAR_BUILD.environment,
142
+ },
143
+ },
144
+ binaries: WINDOWS_SIDECAR_TARGETS.map((target) => {
145
+ const inspected = inspectWindowsSidecarBinary(join(sidecarDir, target.filename), readFile);
146
+ if (inspected.peMachine !== target.peMachine) {
147
+ throw provenanceError(
148
+ 'wrong-architecture',
149
+ `${target.filename} declares ${target.packageArch} but contains ${inspected.peMachine}.`,
150
+ );
151
+ }
152
+ return {
153
+ filename: target.filename,
154
+ target: {
155
+ goos: 'windows',
156
+ goarch: target.goarch,
157
+ packageArch: target.packageArch,
158
+ },
159
+ size: inspected.size,
160
+ sha256: inspected.sha256,
161
+ peMachine: inspected.peMachine,
162
+ peMachineCode: inspected.peMachineCode,
163
+ };
164
+ }),
165
+ };
166
+ }
167
+
168
+ export function verifyWindowsSidecarProvenance({
169
+ sidecarDir,
170
+ expectedSourceRepository = DEFAULT_SCIP_REPOSITORY,
171
+ expectedSourceTag = DEFAULT_SCIP_TAG,
172
+ expectedGoVersion = PINNED_GO_VERSION,
173
+ readFile = readFileSync,
174
+ }) {
175
+ const packageRecord = parseJsonFile(join(sidecarDir, 'package.json'), 'sidecar package', readFile);
176
+ const manifest = parseJsonFile(
177
+ join(sidecarDir, WINDOWS_SIDECAR_PROVENANCE_FILE),
178
+ 'sidecar provenance manifest',
179
+ readFile,
180
+ );
181
+ const decoded = decodeWindowsSidecarProvenance(manifest);
182
+
183
+ requireEqual(decoded.package.name, packageRecord.name, 'package name');
184
+ requireEqual(decoded.package.version, packageRecord.version, 'package version');
185
+ requireEqual(decoded.source.repository, expectedSourceRepository, 'SCIP source repository');
186
+ requireEqual(decoded.source.tag, expectedSourceTag, 'SCIP source tag');
187
+ requireEqual(decoded.toolchain.goVersion, expectedGoVersion, 'pinned Go version');
188
+ requireBuildContract(decoded.build);
189
+
190
+ const entries = new Map(decoded.binaries.map((binary) => [binary.filename, binary]));
191
+ for (const target of WINDOWS_SIDECAR_TARGETS) {
192
+ const expected = entries.get(target.filename);
193
+ if (!expected) {
194
+ throw provenanceError('malformed-manifest', `Manifest is missing ${target.filename}.`);
195
+ }
196
+
197
+ requireEqual(expected.target.goos, 'windows', `${target.filename} GOOS`);
198
+ requireEqual(expected.target.goarch, target.goarch, `${target.filename} GOARCH`);
199
+ requireEqual(expected.target.packageArch, target.packageArch, `${target.filename} package arch`);
200
+ requireEqual(expected.peMachine, target.peMachine, `${target.filename} PE machine`);
201
+ requireEqual(
202
+ expected.peMachineCode,
203
+ `0x${target.peMachineCode.toString(16).padStart(4, '0')}`,
204
+ `${target.filename} PE machine code`,
205
+ );
206
+
207
+ let actual;
208
+ try {
209
+ actual = inspectWindowsSidecarBinary(join(sidecarDir, target.filename), readFile);
210
+ } catch (error) {
211
+ if (error?.code === 'ENOENT') {
212
+ throw provenanceError('missing-binary', `${target.filename} is missing.`);
213
+ }
214
+ throw error;
215
+ }
216
+ requireEqual(actual.peMachine, target.peMachine, `${target.filename} actual PE machine`);
217
+ requireEqual(actual.size, expected.size, `${target.filename} byte size`);
218
+ requireEqual(actual.sha256, expected.sha256, `${target.filename} SHA-256`);
219
+ }
220
+
221
+ return decoded;
222
+ }
223
+
224
+ export function decodeWindowsSidecarProvenance(value) {
225
+ const record = requireRecord(value, 'manifest');
226
+ requireEqual(record.kind, WINDOWS_SIDECAR_PROVENANCE_KIND, 'manifest kind');
227
+ if (record.schemaVersion !== WINDOWS_SIDECAR_PROVENANCE_VERSION) {
228
+ throw provenanceError(
229
+ 'unsupported-manifest',
230
+ `Unsupported Windows sidecar provenance schema ${String(record.schemaVersion)}; expected ${WINDOWS_SIDECAR_PROVENANCE_VERSION}.`,
231
+ );
232
+ }
233
+
234
+ const packageRecord = requireRecord(record.package, 'package');
235
+ const source = requireRecord(record.source, 'source');
236
+ const toolchain = requireRecord(record.toolchain, 'toolchain');
237
+ const build = requireRecord(record.build, 'build');
238
+ if (!Array.isArray(record.binaries) || record.binaries.length !== WINDOWS_SIDECAR_TARGETS.length) {
239
+ throw provenanceError(
240
+ 'malformed-manifest',
241
+ `binaries must contain exactly ${WINDOWS_SIDECAR_TARGETS.length} entries.`,
242
+ );
243
+ }
244
+
245
+ const binaries = record.binaries.map((value, index) => {
246
+ const binary = requireRecord(value, `binaries[${index}]`);
247
+ const target = requireRecord(binary.target, `binaries[${index}].target`);
248
+ requireNonEmptyString(binary.filename, `binaries[${index}].filename`);
249
+ requireNonEmptyString(target.goos, `binaries[${index}].target.goos`);
250
+ requireNonEmptyString(target.goarch, `binaries[${index}].target.goarch`);
251
+ requireNonEmptyString(target.packageArch, `binaries[${index}].target.packageArch`);
252
+ requirePositiveSafeInteger(binary.size, `binaries[${index}].size`);
253
+ if (typeof binary.sha256 !== 'string' || !/^[a-f0-9]{64}$/.test(binary.sha256)) {
254
+ throw provenanceError('malformed-manifest', `binaries[${index}].sha256 must be lowercase SHA-256.`);
255
+ }
256
+ requireNonEmptyString(binary.peMachine, `binaries[${index}].peMachine`);
257
+ if (typeof binary.peMachineCode !== 'string' || !/^0x[a-f0-9]{4}$/.test(binary.peMachineCode)) {
258
+ throw provenanceError(
259
+ 'malformed-manifest',
260
+ `binaries[${index}].peMachineCode must be a four-digit hexadecimal code.`,
261
+ );
262
+ }
263
+ return binary;
264
+ });
265
+
266
+ requireNonEmptyString(packageRecord.name, 'package.name');
267
+ requireNonEmptyString(packageRecord.version, 'package.version');
268
+ requireNonEmptyString(source.repository, 'source.repository');
269
+ requireNonEmptyString(source.tag, 'source.tag');
270
+ if (!isCommit(source.commit)) {
271
+ throw provenanceError('malformed-manifest', `source.commit must be a full 40-character Git commit.`);
272
+ }
273
+ requireNonEmptyString(toolchain.goVersion, 'toolchain.goVersion');
274
+ requireNonEmptyString(build.command, 'build.command');
275
+ requireNonEmptyString(build.package, 'build.package');
276
+ if (!Array.isArray(build.flags) || !build.flags.every((flag) => typeof flag === 'string')) {
277
+ throw provenanceError('malformed-manifest', `build.flags must be an array of strings.`);
278
+ }
279
+ requireRecord(build.environment, 'build.environment');
280
+
281
+ const filenames = binaries.map((binary) => binary.filename);
282
+ if (new Set(filenames).size !== filenames.length) {
283
+ throw provenanceError('malformed-manifest', `binaries contains duplicate filenames.`);
284
+ }
285
+
286
+ return {
287
+ ...record,
288
+ package: packageRecord,
289
+ source,
290
+ toolchain,
291
+ build,
292
+ binaries,
293
+ };
294
+ }
295
+
296
+ function requireBuildContract(build) {
297
+ requireEqual(build.command, WINDOWS_SIDECAR_BUILD.command, 'build command');
298
+ requireEqual(build.package, WINDOWS_SIDECAR_BUILD.package, 'build package');
299
+ if (JSON.stringify(build.flags) !== JSON.stringify(WINDOWS_SIDECAR_BUILD.flags)) {
300
+ throw provenanceError(
301
+ 'build-input-mismatch',
302
+ `Build flags do not match the pinned contract (${WINDOWS_SIDECAR_BUILD.flags.join(' ')}).`,
303
+ );
304
+ }
305
+ const environment = requireRecord(build.environment, 'build.environment');
306
+ requireEqual(environment.CGO_ENABLED, WINDOWS_SIDECAR_BUILD.environment.CGO_ENABLED, 'CGO_ENABLED');
307
+ requireEqual(environment.GOOS, WINDOWS_SIDECAR_BUILD.environment.GOOS, 'GOOS');
308
+ }
309
+
310
+ function parseJsonFile(file, label, readFile) {
311
+ let bytes;
312
+ try {
313
+ bytes = readFile(file);
314
+ } catch (error) {
315
+ if (error?.code === 'ENOENT') {
316
+ throw provenanceError(
317
+ label === 'sidecar provenance manifest' ? 'missing-manifest' : 'missing-package',
318
+ `${label} is missing at ${file}.`,
319
+ );
320
+ }
321
+ throw error;
322
+ }
323
+ try {
324
+ return JSON.parse(bytes.toString('utf8'));
325
+ } catch {
326
+ throw provenanceError('malformed-manifest', `${label} is not valid JSON at ${file}.`);
327
+ }
328
+ }
329
+
330
+ function requireRecord(value, field) {
331
+ if (value === null || typeof value !== 'object' || Array.isArray(value)) {
332
+ throw provenanceError('malformed-manifest', `${field} must be an object.`);
333
+ }
334
+ return value;
335
+ }
336
+
337
+ function requireNonEmptyString(value, field) {
338
+ if (typeof value !== 'string' || value.trim().length === 0) {
339
+ throw provenanceError('malformed-manifest', `${field} must be a non-empty string.`);
340
+ }
341
+ }
342
+
343
+ function requirePositiveSafeInteger(value, field) {
344
+ if (typeof value !== 'number' || !Number.isSafeInteger(value) || value <= 0) {
345
+ throw provenanceError('malformed-manifest', `${field} must be a positive safe integer.`);
346
+ }
347
+ }
348
+
349
+ function requireEqual(actual, expected, field) {
350
+ if (actual !== expected) {
351
+ throw provenanceError(
352
+ 'build-input-mismatch',
353
+ `${field} mismatch: expected ${JSON.stringify(expected)}, received ${JSON.stringify(actual)}.`,
354
+ );
355
+ }
356
+ }
357
+
358
+ function isCommit(value) {
359
+ return typeof value === 'string' && /^[a-f0-9]{40}$/.test(value);
360
+ }
361
+
362
+ function provenanceError(code, message) {
363
+ return new WindowsSidecarProvenanceError(code, message);
364
+ }
@@ -0,0 +1,197 @@
1
+ #!/usr/bin/env node
2
+ import { spawnSync } from 'node:child_process';
3
+ import { createHash } from 'node:crypto';
4
+ import { existsSync, mkdirSync, rmSync, statSync, appendFileSync } from 'node:fs';
5
+ import { dirname, join, resolve } from 'node:path';
6
+ import { performance } from 'node:perf_hooks';
7
+
8
+ const DEFAULT_COMMANDS = [
9
+ ['dead', '--json'],
10
+ ['doc-drift', '--json'],
11
+ ['recent-duplicates', '--json'],
12
+ ['similar', '--json', '--full'],
13
+ ['health', '--json', '--full'],
14
+ ];
15
+
16
+ const args = parseArgs(process.argv.slice(2));
17
+ const projectRoot = process.cwd();
18
+ const cliPath = resolve(projectRoot, 'dist/cli.js');
19
+ const date = new Date().toISOString().slice(0, 10);
20
+ const runHistoryPath = resolve(projectRoot, args.out ?? `docs/benchmarks/runs/${date}-evidence-products.jsonl`);
21
+ const profilePath = resolve(
22
+ projectRoot,
23
+ args.profileOut ?? `docs/benchmarks/runs/${date}-evidence-products.profile.jsonl`,
24
+ );
25
+ const commands = args.commands.length > 0 ? args.commands : DEFAULT_COMMANDS;
26
+
27
+ mkdirSync(dirname(runHistoryPath), { recursive: true });
28
+ mkdirSync(dirname(profilePath), { recursive: true });
29
+
30
+ const status = runCli(['status', '--json'], { profile: false });
31
+ if (status.exitCode !== 0) {
32
+ process.stderr.write(status.stderr.toString());
33
+ process.exit(status.exitCode ?? 1);
34
+ }
35
+
36
+ const statusJson = JSON.parse(status.stdout.toString());
37
+ const dbPath = statusJson.result?.dbPath;
38
+ if (typeof dbPath !== 'string') {
39
+ throw new Error('status --json did not include result.dbPath');
40
+ }
41
+
42
+ const evidencePath = join(dirname(dbPath), 'evidence.db');
43
+ if (!args.noClear) clearEvidence(evidencePath);
44
+
45
+ const runId = new Date().toISOString();
46
+ const records = [];
47
+ for (let iteration = 1; iteration <= args.coldIterations; iteration += 1) {
48
+ for (const command of commands) {
49
+ records.push(recordCommand({ runId, phase: 'cold-fill', iteration, command, evidencePath }));
50
+ }
51
+ }
52
+ for (let iteration = 1; iteration <= args.warmIterations; iteration += 1) {
53
+ for (const command of commands) {
54
+ records.push(recordCommand({ runId, phase: 'warm-hit', iteration, command, evidencePath }));
55
+ }
56
+ }
57
+
58
+ const failed = records.filter((record) => record.exitCode !== 0 || record.signal || record.error);
59
+ const summary = {
60
+ runId,
61
+ runHistoryPath,
62
+ profilePath,
63
+ evidencePath,
64
+ commands: commands.map((command) => command.join(' ')),
65
+ coldIterations: args.coldIterations,
66
+ warmIterations: args.warmIterations,
67
+ failed: failed.length,
68
+ records: records.map(
69
+ ({ phase, iteration, command, durationMs, exitCode, stdoutBytes, stderrBytes, evidenceBytes }) => ({
70
+ phase,
71
+ iteration,
72
+ command,
73
+ durationMs,
74
+ exitCode,
75
+ stdoutBytes,
76
+ stderrBytes,
77
+ evidenceBytes,
78
+ }),
79
+ ),
80
+ };
81
+
82
+ process.stdout.write(`${JSON.stringify(summary, null, 2)}\n`);
83
+ if (failed.length > 0) process.exit(1);
84
+
85
+ function recordCommand({ runId, phase, iteration, command, evidencePath }) {
86
+ const result = runCli(command, { profile: true });
87
+ const record = {
88
+ timestamp: new Date().toISOString(),
89
+ runId,
90
+ target: 'evidence-products',
91
+ phase,
92
+ iteration,
93
+ command: `codebaseiq ${command.join(' ')}`,
94
+ durationMs: result.durationMs,
95
+ exitCode: result.exitCode,
96
+ signal: result.signal,
97
+ error: result.error?.message,
98
+ stdoutBytes: result.stdout.length,
99
+ stderrBytes: result.stderr.length,
100
+ stdoutSha256: sha256(result.stdout),
101
+ evidenceBytes: fileSize(evidencePath),
102
+ profilePath,
103
+ };
104
+ appendFileSync(runHistoryPath, `${JSON.stringify(record)}\n`);
105
+ return record;
106
+ }
107
+
108
+ function runCli(command, opts) {
109
+ const started = performance.now();
110
+ const result = spawnSync(process.execPath, [cliPath, ...command], {
111
+ cwd: projectRoot,
112
+ env: opts.profile
113
+ ? {
114
+ ...process.env,
115
+ CODEBASEIQ_PROFILE: '1',
116
+ CODEBASEIQ_PROFILE_COMMAND: `codebaseiq ${command.join(' ')}`,
117
+ CODEBASEIQ_PROFILE_OUT: profilePath,
118
+ }
119
+ : process.env,
120
+ encoding: 'buffer',
121
+ maxBuffer: 100 * 1024 * 1024,
122
+ });
123
+ return {
124
+ durationMs: Math.round(performance.now() - started),
125
+ exitCode: result.status,
126
+ signal: result.signal,
127
+ error: result.error,
128
+ stdout: result.stdout ?? Buffer.alloc(0),
129
+ stderr: result.stderr ?? Buffer.alloc(0),
130
+ };
131
+ }
132
+
133
+ function clearEvidence(evidencePath) {
134
+ for (const path of [evidencePath, `${evidencePath}-wal`, `${evidencePath}-shm`]) {
135
+ if (existsSync(path)) rmSync(path, { force: true });
136
+ }
137
+ }
138
+
139
+ function fileSize(path) {
140
+ try {
141
+ return statSync(path).size;
142
+ } catch {
143
+ return 0;
144
+ }
145
+ }
146
+
147
+ function sha256(buffer) {
148
+ return createHash('sha256').update(buffer).digest('hex');
149
+ }
150
+
151
+ function parseArgs(argv) {
152
+ const parsed = {
153
+ coldIterations: 1,
154
+ warmIterations: 2,
155
+ commands: [],
156
+ noClear: false,
157
+ out: undefined,
158
+ profileOut: undefined,
159
+ };
160
+ for (let index = 0; index < argv.length; index += 1) {
161
+ const arg = argv[index];
162
+ if (arg === '--cold-iterations') {
163
+ parsed.coldIterations = positiveInteger(argv[++index], '--cold-iterations');
164
+ } else if (arg === '--warm-iterations') {
165
+ parsed.warmIterations = positiveInteger(argv[++index], '--warm-iterations');
166
+ } else if (arg === '--command') {
167
+ const value = argv[++index];
168
+ if (!value) throw new Error('--command requires a value');
169
+ parsed.commands.push(splitCommand(value));
170
+ } else if (arg === '--out') {
171
+ parsed.out = argv[++index];
172
+ if (!parsed.out) throw new Error('--out requires a value');
173
+ } else if (arg === '--profile-out') {
174
+ parsed.profileOut = argv[++index];
175
+ if (!parsed.profileOut) throw new Error('--profile-out requires a value');
176
+ } else if (arg === '--no-clear') {
177
+ parsed.noClear = true;
178
+ } else {
179
+ throw new Error(`unknown option: ${arg}`);
180
+ }
181
+ }
182
+ return parsed;
183
+ }
184
+
185
+ function positiveInteger(value, flag) {
186
+ const parsed = Number(value);
187
+ if (!Number.isInteger(parsed) || parsed < 0) throw new Error(`${flag} must be a non-negative integer`);
188
+ return parsed;
189
+ }
190
+
191
+ function splitCommand(value) {
192
+ return value
193
+ .trim()
194
+ .split(/\s+/)
195
+ .filter(Boolean)
196
+ .filter((part, index) => !(index === 0 && part === 'codebaseiq'));
197
+ }
@@ -0,0 +1,29 @@
1
+ #!/usr/bin/env node
2
+ import { dirname, resolve } from 'node:path';
3
+ import { fileURLToPath } from 'node:url';
4
+ import {
5
+ DEFAULT_SCIP_REPOSITORY,
6
+ DEFAULT_SCIP_TAG,
7
+ PINNED_GO_VERSION,
8
+ verifyWindowsSidecarProvenance,
9
+ } from './codebaseiq-windows-provenance.mjs';
10
+
11
+ const root = resolve(dirname(fileURLToPath(import.meta.url)), '..');
12
+ const sidecarDir = resolve(root, 'packages', 'codebaseiq-windows');
13
+
14
+ try {
15
+ const manifest = verifyWindowsSidecarProvenance({
16
+ sidecarDir,
17
+ expectedSourceRepository: process.env.SCIP_REPO_URL ?? DEFAULT_SCIP_REPOSITORY,
18
+ expectedSourceTag: process.env.SCIP_VERSION ?? DEFAULT_SCIP_TAG,
19
+ expectedGoVersion: process.env.SCIP_GO_VERSION ?? PINNED_GO_VERSION,
20
+ });
21
+ console.log(
22
+ `Verified ${manifest.package.name}@${manifest.package.version}: ${manifest.source.tag} (${manifest.source.commit.slice(0, 12)}), ${manifest.toolchain.goVersion}, ${manifest.binaries.length} PE binaries.`,
23
+ );
24
+ } catch (error) {
25
+ console.error(
26
+ `Windows sidecar provenance check FAILED:\n - ${error instanceof Error ? error.message : String(error)}`,
27
+ );
28
+ process.exitCode = 1;
29
+ }
@@ -0,0 +1,75 @@
1
+ ---
2
+ name: codebaseiq
3
+ description: Use FIRST for codebase work when compiler-resolved identity, runtime boundaries, callers, dependencies, consumers, architecture, change impact, or cleanup relationships can affect the answer. It exposes exact referents, explicit typed-graph projections, and source evidence; it does not infer task relevance.
4
+ commands:
5
+ - template: 'codebaseiq search <text>'
6
+ when: 'Locate exact repository text, a runtime key, or a compiler symbol; use `codebaseiq search -- <text>` when the literal starts with a dash.'
7
+ - template: 'codebaseiq outline <file>'
8
+ when: 'Locate compiler-owned constructs in a known file.'
9
+ - template: 'codebaseiq entrypoints <text>'
10
+ when: 'Locate an external callable root when its entry surface is known.'
11
+ - template: 'codebaseiq evidence --symbol <symbol> --edge <family> --direction <direction> --depth <n> --max-edges <n>'
12
+ when: 'Project explicitly selected typed relationships from one exact root.'
13
+ - template: 'codebaseiq inspect --at <file:line> --view behavior'
14
+ when: 'Read connected behavior for a named implementation gap.'
15
+ - template: 'codebaseiq code <selector>'
16
+ when: 'Read exact source only when syntax itself can change the decision.'
17
+ - template: 'codebaseiq diff-impact'
18
+ when: 'Map changed symbols and downstream consumers after an edit.'
19
+ - template: 'codebaseiq architecture'
20
+ when: 'Validate declared structural boundaries.'
21
+ - template: 'codebaseiq health --full'
22
+ when: 'Run configured cleanup and quality detectors.'
23
+ ---
24
+
25
+ # codebaseiq
26
+
27
+ <!-- BEGIN GENERATED SKILL COMMANDS -->
28
+ ## Commands for this skill
29
+
30
+ | Command | When |
31
+ | --- | --- |
32
+ | `codebaseiq search <text>` | Locate exact repository text, a runtime key, or a compiler symbol; use \`codebaseiq search -- <text>\` when the literal starts with a dash. |
33
+ | `codebaseiq outline <file>` | Locate compiler-owned constructs in a known file. |
34
+ | `codebaseiq entrypoints <text>` | Locate an external callable root when its entry surface is known. |
35
+ | `codebaseiq evidence --symbol <symbol> --edge <family> --direction <direction> --depth <n> --max-edges <n>` | Project explicitly selected typed relationships from one exact root. |
36
+ | `codebaseiq inspect --at <file:line> --view behavior` | Read connected behavior for a named implementation gap. |
37
+ | `codebaseiq code <selector>` | Read exact source only when syntax itself can change the decision. |
38
+ | `codebaseiq diff-impact` | Map changed symbols and downstream consumers after an edit. |
39
+ | `codebaseiq architecture` | Validate declared structural boundaries. |
40
+ | `codebaseiq health --full` | Run configured cleanup and quality detectors. |
41
+
42
+ Use this shortlist first. Run a command's `--help` only when a named uncertainty needs another option.
43
+ <!-- END GENERATED SKILL COMMANDS -->
44
+
45
+ <!-- BEGIN GENERATED EXPLORATION MANUAL -->
46
+ ### Choose a relationship deliberately
47
+
48
+ | Question | Evidence family | Direction |
49
+ |---|---|---|
50
+ | Who can call or reach this? | `execution` | `incoming` |
51
+ | What can this call or reach? | `execution` | `outgoing` |
52
+ | Where can this value come from? | `dataflow` | `incoming` |
53
+ | Where can this value go? | `dataflow` | `outgoing` |
54
+ | Which producer and consumer rendezvous? | `runtime` | `both` |
55
+ | What resource is observed or changed? | `state` | `both` |
56
+ | What occurs before or after this? | `temporal` | `both` |
57
+ | What interface constrains this? | `contract` | `both` |
58
+ | Are these observations the same entity? | `identity` | `both` |
59
+ | What contains or owns this? | `ownership` | `both` |
60
+ | What does this statically rely on? | `dependencies` | `outgoing` |
61
+
62
+ Use exact evidence as an observed fact only within its coverage. Derived evidence is deterministically computed; candidate evidence is a lead; mixed evidence must retain its constituent strengths; unknown evidence cannot support a stronger claim. Missing output is not evidence of absence.
63
+
64
+ The controls above are complete for ordinary exploration. Run `codebaseiq capabilities --matrix` only when a named claim depends on uncertain provider support; do not run it for routine orientation.
65
+ <!-- END GENERATED EXPLORATION MANUAL -->
66
+
67
+ codebaseiq is a repository exploration surface: an indexed code reader that joins exact current text to compiler-owned constructs, typed relationships, compressed behavior, exact source, and recoverable omissions. It performs the graph or read operation the agent selects; it does not infer task relevance, choose a subsystem, or decide that the user's question is complete.
68
+
69
+ Privately name the material facts the answer requires. Locate the smallest owner or entry with `search`, `outline`, or `entrypoints`; choose the relationship and direction that can establish each fact; batch compatible roots into `evidence`; then use one batched `inspect` or exact `code` read only for named implementation gaps. There is no anchor-discovery phase or mandatory map. Do not locate every ledger row independently: a symbol or file/line returned by the first successful locator is already a graph root. When the question supplies several exact literals or independent participants, pass repeated `--search`, `--symbol`, or `--at` selectors directly to one `evidence` command. Do not run `capabilities` or command help merely to orient yourself; the command table and templates above are the normal operating manual.
70
+
71
+ Read request, observed facts, calibration, coverage, and recovery together. A completed bounded projection is not a completed user task. Continue while a material fact remains unresolved and an exact in-scope recovery path exists; query count is never a correctness cutoff. Before every new query, check whether the missing fact is already present in an earlier packet; if it is, update the ledger or draft instead of querying again. Treat rendered source as already read, batch independent gaps, and run an unchanged `Continue exactly:` command until transport completes. Do not inspect tests, documentation, or examples after current implementation source has established the fact unless a named ambiguity specifically requires corroboration.
72
+
73
+ Before answering, compare the draft to the selected statement-complete behavior—not merely to a remembered narrative. Preserve every observed behavior-changing predicate, returned default, separately merged field, cache invalidation, and cleanup effect that is material to the question. When two named fields use different merge or lifecycle operations, do not collapse them into a generic word such as “properties.” If the evidence already contains a missing detail, repair the answer; do not reopen exploration.
74
+
75
+ Use codebaseiq rather than a parallel grep/read workflow for tracked text. Native tools are for edits, checks, binary content, or an explicitly reported unsupported gap. After edits, use `diff-impact` when consumers matter, `architecture` for declared boundaries, and `health` for quality or cleanup analysis.
@@ -0,0 +1,4 @@
1
+ interface:
2
+ display_name: "CodebaseIQ"
3
+ short_description: "Map code relationships before nonlocal work"
4
+ default_prompt: "Use $codebaseiq to map compiler-resolved relationships that can affect this task, then keep ownership of the plan and implementation."