scip-query 0.10.11 → 0.11.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 (374) hide show
  1. package/CHANGELOG.md +45 -0
  2. package/{vendor/scip/LICENSE.scip → LICENSE} +1 -0
  3. package/README.md +168 -55
  4. package/dist/augment-vue-worker.js +1 -1
  5. package/dist/chunk-2VSDXOG5.js +2 -0
  6. package/dist/chunk-343O6EVV.js +2 -0
  7. package/dist/chunk-3KDUITBE.js +7 -0
  8. package/dist/chunk-3T2FNHIU.js +2 -0
  9. package/dist/chunk-3V6JQQM5.js +2 -0
  10. package/dist/chunk-5AAAEZ2Z.js +2 -0
  11. package/dist/chunk-6Q6OFLFQ.js +8 -0
  12. package/dist/chunk-6XA4LDHY.js +2 -0
  13. package/dist/chunk-75X52JTA.js +2 -0
  14. package/dist/{chunk-54KGX7EX.js → chunk-7HB3CZFD.js} +2 -2
  15. package/dist/chunk-7JZRFDCU.js +2 -0
  16. package/dist/chunk-7XL7J7PT.js +3 -0
  17. package/dist/chunk-ALHNAPS2.js +2 -0
  18. package/dist/{chunk-JATUZIEH.js → chunk-BDRBPG7Y.js} +2 -2
  19. package/dist/chunk-BN5SXXQS.js +40 -0
  20. package/dist/chunk-C4ICAIJ4.js +3 -0
  21. package/dist/{chunk-LSET2TXH.js → chunk-CMHYBXJB.js} +2 -2
  22. package/dist/{chunk-YWYFU2V3.js → chunk-DRPAQAFM.js} +6 -6
  23. package/dist/chunk-FERAXG6Y.js +72 -0
  24. package/dist/chunk-FLJJLSGB.js +2 -0
  25. package/dist/chunk-FXG3PHVW.js +9 -0
  26. package/dist/chunk-GCN2P4EJ.js +2 -0
  27. package/dist/chunk-GHXRVCIY.js +21 -0
  28. package/dist/chunk-GNG622H3.js +3 -0
  29. package/dist/chunk-H4LUPLEJ.js +2 -0
  30. package/dist/{chunk-BASVXNY3.js → chunk-H56MGERE.js} +4 -4
  31. package/dist/chunk-H7NSJ7L2.js +5 -0
  32. package/dist/chunk-HINMXZ6J.js +2 -0
  33. package/dist/chunk-HXXMPYEF.js +2 -0
  34. package/dist/{chunk-Z3YYR4OS.js → chunk-HZKMEXA3.js} +2 -2
  35. package/dist/chunk-IFSX6YVU.js +4 -0
  36. package/dist/chunk-ISLWJ4PY.js +10 -0
  37. package/dist/chunk-J5WVNZ6O.js +2 -0
  38. package/dist/chunk-K2HYR5A7.js +3 -0
  39. package/dist/chunk-K6UI6EBZ.js +2 -0
  40. package/dist/chunk-KJCDEDQW.js +2 -0
  41. package/dist/{chunk-Z4HICZGY.js → chunk-KKMOB3OJ.js} +2 -2
  42. package/dist/{chunk-YWOOQ4FF.js → chunk-KMVGRIO2.js} +2 -2
  43. package/dist/chunk-LWOOTRHC.js +2 -0
  44. package/dist/{chunk-EY43NV4M.js → chunk-LZNLRE4X.js} +17 -8
  45. package/dist/chunk-M2YXL62V.js +23 -0
  46. package/dist/chunk-MNEJYEHW.js +3 -0
  47. package/dist/chunk-MTDBHTSF.js +2 -0
  48. package/dist/{chunk-ZQDIXAF5.js → chunk-N2Z3CU7X.js} +2 -2
  49. package/dist/chunk-N7PNFLGY.js +2 -0
  50. package/dist/chunk-NAH5EAZS.js +6 -0
  51. package/dist/chunk-NBXK32I6.js +2 -0
  52. package/dist/chunk-NJJ7AS4F.js +2 -0
  53. package/dist/{chunk-FDEQIPPK.js → chunk-NLMRJ7SI.js} +2 -2
  54. package/dist/chunk-ODVITBYU.js +26 -0
  55. package/dist/chunk-ORBRX2QJ.js +2 -0
  56. package/dist/chunk-P36UR5II.js +2 -0
  57. package/dist/chunk-PYZZBIEU.js +3 -0
  58. package/dist/chunk-PZS6J5YG.js +16 -0
  59. package/dist/{chunk-LM5SHAN4.js → chunk-QARYU7R3.js} +2 -2
  60. package/dist/chunk-QJ3FK4TB.js +38 -0
  61. package/dist/chunk-QXGTGE2C.js +35 -0
  62. package/dist/chunk-QZ4JVECJ.js +2 -0
  63. package/dist/chunk-R3JY4EZ4.js +102 -0
  64. package/dist/{chunk-VOYOYC5T.js → chunk-R5336VHZ.js} +2 -2
  65. package/dist/chunk-RJMXSHKM.js +2 -0
  66. package/dist/chunk-STBXCPKY.js +5 -0
  67. package/dist/chunk-T2FQ4GHD.js +9 -0
  68. package/dist/chunk-TFWDJDGO.js +2 -0
  69. package/dist/chunk-TG7QSYCJ.js +2 -0
  70. package/dist/{chunk-FKCGBZAC.js → chunk-TTS75UF2.js} +5 -5
  71. package/dist/{chunk-BVRS7RKQ.js → chunk-U7I373V4.js} +2 -2
  72. package/dist/chunk-UIKLA3F5.js +2 -0
  73. package/dist/{chunk-P753MDDE.js → chunk-UMPNL7T6.js} +2 -2
  74. package/dist/chunk-URSSPS5H.js +2 -0
  75. package/dist/chunk-VGMUFW3J.js +2 -0
  76. package/dist/chunk-VXTNADIW.js +18 -0
  77. package/dist/chunk-VYF5HA76.js +2 -0
  78. package/dist/chunk-WFGOH2UI.js +43 -0
  79. package/dist/chunk-WGA5BBTA.js +4 -0
  80. package/dist/chunk-WIBFXSYB.js +6 -0
  81. package/dist/chunk-WPSS37EW.js +2 -0
  82. package/dist/chunk-WQHWIVA7.js +3 -0
  83. package/dist/chunk-WS3Z6W3M.js +65 -0
  84. package/dist/chunk-WXVGNFAO.js +2 -0
  85. package/dist/{chunk-6LJHXREW.js → chunk-WZLPXFZU.js} +2 -2
  86. package/dist/chunk-X4O6K47U.js +2 -0
  87. package/dist/chunk-X6OGDTQH.js +2 -0
  88. package/dist/chunk-XEMQUN3Z.js +20 -0
  89. package/dist/{chunk-7B6LP46R.js → chunk-XHWLNQVZ.js} +2 -2
  90. package/dist/chunk-XMR747CP.js +2 -0
  91. package/dist/chunk-Y6L4LXPG.js +2 -0
  92. package/dist/chunk-YCPASUCX.js +2 -0
  93. package/dist/chunk-YZXV3CU3.js +60 -0
  94. package/dist/chunk-ZEKBR4OK.js +10 -0
  95. package/dist/chunk-ZMGBWSFZ.js +2 -0
  96. package/dist/cli.js +462 -274
  97. package/dist/{config-types-BDIWAYzr.d.ts → config-types-BrHl3Bge.d.ts} +61 -1
  98. package/dist/{db-Djj3Nqrb.d.ts → db-_Bdx0E1W.d.ts} +1 -1
  99. package/dist/diff-gate-types-CG2YQ_ei.d.ts +4 -0
  100. package/dist/{frontend-behavior-evidence-BxKpKWUu.d.ts → frontend-behavior-evidence-EfM4_9bc.d.ts} +1 -1
  101. package/dist/{health-D5J42g4D.d.ts → health-BEZ1Rt0S.d.ts} +54 -2
  102. package/dist/index.d.ts +10 -70
  103. package/dist/index.js +2 -2
  104. package/dist/postinstall.js +1 -4
  105. package/dist/queries/affected.d.ts +2 -2
  106. package/dist/queries/affected.js +1 -1
  107. package/dist/queries/bottlenecks.d.ts +2 -2
  108. package/dist/queries/bottlenecks.js +1 -1
  109. package/dist/queries/by-kind.d.ts +2 -2
  110. package/dist/queries/by-kind.js +1 -1
  111. package/dist/queries/call-graph.d.ts +2 -2
  112. package/dist/queries/call-graph.js +1 -1
  113. package/dist/queries/change-surface.d.ts +2 -2
  114. package/dist/queries/change-surface.js +1 -1
  115. package/dist/queries/cleanup-plan.d.ts +2 -2
  116. package/dist/queries/cleanup-plan.js +1 -1
  117. package/dist/queries/co-change.d.ts +12 -2
  118. package/dist/queries/co-change.js +1 -1
  119. package/dist/queries/code.d.ts +2 -2
  120. package/dist/queries/code.js +1 -1
  121. package/dist/queries/complexity-hotspots.d.ts +7 -3
  122. package/dist/queries/complexity-hotspots.js +1 -1
  123. package/dist/queries/complexity.d.ts +42 -4
  124. package/dist/queries/complexity.js +1 -1
  125. package/dist/queries/convergence.d.ts +2 -2
  126. package/dist/queries/convergence.js +1 -1
  127. package/dist/queries/coupling.d.ts +2 -2
  128. package/dist/queries/coupling.js +1 -1
  129. package/dist/queries/cycles.d.ts +12 -3
  130. package/dist/queries/cycles.js +1 -1
  131. package/dist/queries/dataflow.d.ts +2 -2
  132. package/dist/queries/dataflow.js +1 -1
  133. package/dist/queries/dead.d.ts +3 -3
  134. package/dist/queries/dead.js +1 -1
  135. package/dist/queries/deep-chains.d.ts +2 -2
  136. package/dist/queries/deep-chains.js +1 -1
  137. package/dist/queries/deps.d.ts +2 -2
  138. package/dist/queries/deps.js +1 -1
  139. package/dist/queries/diff-gate.d.ts +65 -8
  140. package/dist/queries/diff-gate.js +1 -1
  141. package/dist/queries/diff-impact.d.ts +21 -3
  142. package/dist/queries/diff-impact.js +1 -1
  143. package/dist/queries/doc-drift.d.ts +29 -2
  144. package/dist/queries/doc-drift.js +1 -1
  145. package/dist/queries/drift.d.ts +15 -3
  146. package/dist/queries/drift.js +1 -1
  147. package/dist/queries/duplicate-bodies.d.ts +55 -0
  148. package/dist/queries/duplicate-bodies.js +2 -0
  149. package/dist/queries/extract-candidates.d.ts +2 -2
  150. package/dist/queries/extract-candidates.js +1 -1
  151. package/dist/queries/fan.d.ts +2 -2
  152. package/dist/queries/fan.js +1 -1
  153. package/dist/queries/files.d.ts +4 -3
  154. package/dist/queries/files.js +1 -1
  155. package/dist/queries/health.d.ts +3 -3
  156. package/dist/queries/health.js +1 -1
  157. package/dist/queries/hierarchy.d.ts +2 -2
  158. package/dist/queries/hierarchy.js +1 -1
  159. package/dist/queries/hotspots.d.ts +2 -2
  160. package/dist/queries/hotspots.js +1 -1
  161. package/dist/queries/imports.d.ts +2 -2
  162. package/dist/queries/imports.js +1 -1
  163. package/dist/queries/incomplete-migration.d.ts +3 -2
  164. package/dist/queries/incomplete-migration.js +1 -1
  165. package/dist/queries/index.d.ts +12 -7
  166. package/dist/queries/index.js +1 -1
  167. package/dist/queries/isolated.d.ts +2 -2
  168. package/dist/queries/isolated.js +1 -1
  169. package/dist/queries/locality-candidates.d.ts +2 -2
  170. package/dist/queries/locality-candidates.js +1 -1
  171. package/dist/queries/members.d.ts +2 -2
  172. package/dist/queries/members.js +1 -1
  173. package/dist/queries/methods.d.ts +2 -2
  174. package/dist/queries/methods.js +1 -1
  175. package/dist/queries/outline.d.ts +2 -2
  176. package/dist/queries/outline.js +1 -1
  177. package/dist/queries/passthrough-candidates.d.ts +11 -3
  178. package/dist/queries/passthrough-candidates.js +1 -1
  179. package/dist/queries/plan-context.d.ts +3 -2
  180. package/dist/queries/plan-context.js +1 -1
  181. package/dist/queries/react-component-duplicates.d.ts +7 -2
  182. package/dist/queries/react-component-duplicates.js +1 -1
  183. package/dist/queries/react-hook-candidates.d.ts +3 -3
  184. package/dist/queries/react-hook-candidates.js +1 -1
  185. package/dist/queries/react-large-component-pressure.d.ts +2 -2
  186. package/dist/queries/react-large-component-pressure.js +1 -1
  187. package/dist/queries/recent-duplicates.d.ts +2 -2
  188. package/dist/queries/recent-duplicates.js +1 -1
  189. package/dist/queries/redundant-reexports.d.ts +2 -2
  190. package/dist/queries/redundant-reexports.js +1 -1
  191. package/dist/queries/refs.d.ts +2 -2
  192. package/dist/queries/refs.js +1 -1
  193. package/dist/queries/self-audit.d.ts +9 -4
  194. package/dist/queries/self-audit.js +1 -1
  195. package/dist/queries/similar-chains.d.ts +2 -2
  196. package/dist/queries/similar-chains.js +1 -1
  197. package/dist/queries/similar-files.d.ts +2 -2
  198. package/dist/queries/similar-files.js +1 -1
  199. package/dist/queries/similar-signatures.d.ts +17 -10
  200. package/dist/queries/similar-signatures.js +1 -1
  201. package/dist/queries/similar.d.ts +85 -17
  202. package/dist/queries/similar.js +1 -1
  203. package/dist/queries/slice.d.ts +2 -2
  204. package/dist/queries/slice.js +1 -1
  205. package/dist/queries/stale-abstractions.d.ts +2 -2
  206. package/dist/queries/stale-abstractions.js +1 -1
  207. package/dist/queries/stats.d.ts +2 -2
  208. package/dist/queries/surface.d.ts +2 -2
  209. package/dist/queries/surface.js +1 -1
  210. package/dist/queries/symbols.d.ts +2 -2
  211. package/dist/queries/symbols.js +1 -1
  212. package/dist/queries/system.d.ts +2 -2
  213. package/dist/queries/system.js +1 -1
  214. package/dist/queries/trace.d.ts +2 -2
  215. package/dist/queries/trace.js +1 -1
  216. package/dist/queries/twin-ab.d.ts +55 -0
  217. package/dist/queries/twin-ab.js +2 -0
  218. package/dist/queries/twin-drift.d.ts +97 -0
  219. package/dist/queries/twin-drift.js +2 -0
  220. package/dist/queries/unused-imports.d.ts +2 -2
  221. package/dist/queries/unused-imports.js +1 -1
  222. package/dist/queries/unused-params.d.ts +2 -2
  223. package/dist/queries/unused-params.js +1 -1
  224. package/dist/queries/vue-component-duplicates.d.ts +7 -2
  225. package/dist/queries/vue-component-duplicates.js +1 -1
  226. package/dist/queries/vue-composable-candidates.d.ts +3 -3
  227. package/dist/queries/vue-composable-candidates.js +1 -1
  228. package/dist/queries/vue-large-view-pressure.d.ts +6 -2
  229. package/dist/queries/vue-large-view-pressure.js +1 -1
  230. package/dist/queries/wrapper-candidates.d.ts +2 -2
  231. package/dist/queries/wrapper-candidates.js +1 -1
  232. package/dist/reindex-worker.js +9 -9
  233. package/dist/reindex.d.ts +30 -4
  234. package/dist/reindex.js +19 -19
  235. package/dist/runtime.d.ts +12 -6
  236. package/dist/runtime.js +2 -2
  237. package/dist/{scip-cli-CnK9Va4O.d.ts → scip-cli-C7cg4ZHR.d.ts} +1 -1
  238. package/dist/symbol-types-DaoeXKUt.d.ts +66 -0
  239. package/docs/AGENT_GUIDE.md +20 -18
  240. package/docs/AI_FAILURE_MODES.md +36 -13
  241. package/docs/API.md +1 -1
  242. package/docs/COMMAND_REFERENCE.md +57 -14
  243. package/docs/DETECTOR_GUIDE.md +20 -3
  244. package/docs/REGEX_POLICY.md +34 -0
  245. package/docs/analyzer-inventory.md +48 -3
  246. package/docs/analyzer-validation-ledger.md +41 -6
  247. package/package.json +23 -7
  248. package/scripts/build-scip-windows.mjs +10 -7
  249. package/scripts/evidence-product-contract.mjs +197 -0
  250. package/skills/_shared/SKILL.md +243 -0
  251. package/skills/_shared/agents/openai.yaml +4 -0
  252. package/skills/scip-api-impact/SKILL.md +55 -71
  253. package/skills/scip-claim-audit/SKILL.md +105 -0
  254. package/skills/scip-claim-audit/agents/openai.yaml +4 -0
  255. package/skills/scip-cleanup-audit/SKILL.md +122 -0
  256. package/skills/scip-cleanup-audit/agents/openai.yaml +4 -0
  257. package/skills/scip-cleanup-improve/SKILL.md +84 -0
  258. package/skills/scip-cleanup-improve/agents/openai.yaml +4 -0
  259. package/skills/scip-concrete-plan/SKILL.md +181 -0
  260. package/skills/scip-concrete-plan/agents/openai.yaml +4 -0
  261. package/skills/scip-conductor/SKILL.md +133 -0
  262. package/skills/scip-conductor/agents/openai.yaml +4 -0
  263. package/skills/scip-debug/SKILL.md +60 -58
  264. package/skills/scip-diagram/SKILL.md +64 -94
  265. package/skills/scip-directory-architecture/SKILL.md +65 -107
  266. package/skills/scip-doc-reconcile/SKILL.md +56 -67
  267. package/skills/scip-explore/SKILL.md +78 -210
  268. package/skills/scip-hyper-optimization/SKILL.md +124 -198
  269. package/skills/scip-integrity-audit/SKILL.md +103 -0
  270. package/skills/scip-integrity-audit/agents/openai.yaml +4 -0
  271. package/skills/scip-language-playbook/SKILL.md +56 -326
  272. package/skills/scip-maintainability/SKILL.md +80 -219
  273. package/skills/scip-probe-reachability/SKILL.md +92 -0
  274. package/skills/scip-probe-reachability/agents/openai.yaml +4 -0
  275. package/skills/scip-query/SKILL.md +108 -124
  276. package/skills/scip-react-maintainability/SKILL.md +64 -82
  277. package/skills/scip-setup/SKILL.md +121 -0
  278. package/skills/scip-setup/agents/openai.yaml +4 -0
  279. package/skills/scip-tla-model-system/SKILL.md +138 -0
  280. package/skills/scip-tla-model-system/agents/openai.yaml +4 -0
  281. package/skills/scip-triage-issue/SKILL.md +53 -41
  282. package/skills/scip-twin-drift/SKILL.md +107 -0
  283. package/skills/scip-twin-drift/agents/openai.yaml +4 -0
  284. package/skills/scip-verify/SKILL.md +70 -88
  285. package/skills/scip-vue-maintainability/SKILL.md +67 -94
  286. package/dist/chunk-2KHTSEIL.js +0 -102
  287. package/dist/chunk-3VD3JMK2.js +0 -2
  288. package/dist/chunk-4UZO3XCV.js +0 -35
  289. package/dist/chunk-5GOLFJEO.js +0 -8
  290. package/dist/chunk-5OST6GYB.js +0 -2
  291. package/dist/chunk-65AU3HFZ.js +0 -2
  292. package/dist/chunk-6GN7FXCH.js +0 -2
  293. package/dist/chunk-6IR2AOBM.js +0 -7
  294. package/dist/chunk-6JRV4MY2.js +0 -23
  295. package/dist/chunk-6QSOCTZT.js +0 -18
  296. package/dist/chunk-72KY2ZFO.js +0 -2
  297. package/dist/chunk-7GO4EQF5.js +0 -2
  298. package/dist/chunk-7IVSJJZU.js +0 -7
  299. package/dist/chunk-7TWLSZK5.js +0 -2
  300. package/dist/chunk-A536TEU4.js +0 -3
  301. package/dist/chunk-AVWPHM2Q.js +0 -4
  302. package/dist/chunk-B32FX5KB.js +0 -2
  303. package/dist/chunk-B6MJ5VQV.js +0 -2
  304. package/dist/chunk-BFXPG2VN.js +0 -2
  305. package/dist/chunk-BSN22NRK.js +0 -9
  306. package/dist/chunk-BZ53S4ZN.js +0 -2
  307. package/dist/chunk-C5CTSJ6X.js +0 -6
  308. package/dist/chunk-CO5GJRP7.js +0 -2
  309. package/dist/chunk-CW5YFOCP.js +0 -5
  310. package/dist/chunk-DS6QEB3G.js +0 -5
  311. package/dist/chunk-E35O7UCB.js +0 -2
  312. package/dist/chunk-EXDQ35NN.js +0 -2
  313. package/dist/chunk-FAYI6KZ5.js +0 -2
  314. package/dist/chunk-FFVIFETB.js +0 -2
  315. package/dist/chunk-FG4NT6VY.js +0 -2
  316. package/dist/chunk-FXNWFMKW.js +0 -25
  317. package/dist/chunk-G5UPYQGL.js +0 -4
  318. package/dist/chunk-GQBMH2TQ.js +0 -2
  319. package/dist/chunk-GRJY65YT.js +0 -2
  320. package/dist/chunk-HF25DFSC.js +0 -3
  321. package/dist/chunk-HHN2B5KA.js +0 -2
  322. package/dist/chunk-IHUETYFW.js +0 -2
  323. package/dist/chunk-JCLDUKT6.js +0 -38
  324. package/dist/chunk-JGN2ZFJR.js +0 -2
  325. package/dist/chunk-JM72FNGA.js +0 -2
  326. package/dist/chunk-JME7OWD3.js +0 -2
  327. package/dist/chunk-KDFONWTW.js +0 -40
  328. package/dist/chunk-LPL4MA6R.js +0 -2
  329. package/dist/chunk-LZHUWKGD.js +0 -2
  330. package/dist/chunk-M4COR2H6.js +0 -2
  331. package/dist/chunk-NOJAM5ZV.js +0 -21
  332. package/dist/chunk-O6ZH6C6Y.js +0 -2
  333. package/dist/chunk-OBGRLXWF.js +0 -3
  334. package/dist/chunk-OLTESY4K.js +0 -3
  335. package/dist/chunk-ONPCQ2PM.js +0 -6
  336. package/dist/chunk-P4KYUPBD.js +0 -4
  337. package/dist/chunk-P5RYBRIO.js +0 -4
  338. package/dist/chunk-P7AL7Y37.js +0 -2
  339. package/dist/chunk-PFOCOG57.js +0 -2
  340. package/dist/chunk-QLAUCRDJ.js +0 -2
  341. package/dist/chunk-QPU7EXAW.js +0 -2
  342. package/dist/chunk-QYB5P7GL.js +0 -2
  343. package/dist/chunk-RNM6LMCF.js +0 -2
  344. package/dist/chunk-RVWSAMTT.js +0 -2
  345. package/dist/chunk-TK7O5ER5.js +0 -3
  346. package/dist/chunk-TQ5W2H3S.js +0 -4
  347. package/dist/chunk-USPV3T5K.js +0 -2
  348. package/dist/chunk-UUBMFL3F.js +0 -59
  349. package/dist/chunk-VCQYSG2M.js +0 -10
  350. package/dist/chunk-VUKC6F77.js +0 -20
  351. package/dist/chunk-W2CBNBEL.js +0 -71
  352. package/dist/chunk-W6BVEKYC.js +0 -3
  353. package/dist/chunk-WUCEKFQC.js +0 -3
  354. package/dist/chunk-XUGQU7PM.js +0 -41
  355. package/dist/chunk-Y5NBHMQX.js +0 -2
  356. package/dist/chunk-YCOFCT4B.js +0 -2
  357. package/dist/chunk-YZA6PPZL.js +0 -3
  358. package/skills/concrete-plan/SKILL.md +0 -372
  359. package/skills/concrete-plan/agents/openai.yaml +0 -4
  360. package/skills/scip-adoption/SKILL.md +0 -122
  361. package/skills/scip-adoption/agents/openai.yaml +0 -4
  362. package/skills/scip-ai-cleanup/SKILL.md +0 -153
  363. package/skills/scip-ai-cleanup/agents/openai.yaml +0 -4
  364. package/skills/scip-debloat/SKILL.md +0 -439
  365. package/skills/scip-debloat/agents/openai.yaml +0 -4
  366. package/skills/scip-health-audit/SKILL.md +0 -162
  367. package/skills/scip-health-audit/agents/openai.yaml +0 -4
  368. package/skills/scip-health-improve/SKILL.md +0 -155
  369. package/skills/scip-health-improve/agents/openai.yaml +0 -4
  370. package/skills/scip-query-setup/SKILL.md +0 -170
  371. package/skills/scip-query-setup/agents/openai.yaml +0 -3
  372. package/vendor/scip/README.md +0 -6
  373. package/vendor/scip/win32-arm64/scip.exe +0 -0
  374. package/vendor/scip/win32-x64/scip.exe +0 -0
@@ -1,70 +1,76 @@
1
1
  ---
2
2
  name: scip-verify
3
- description: Post-implementation verification using scip-query's modern gate model. Use after making code, docs, config, refactor, cleanup, or setup changes; before committing; when the user asks whether a change is wired correctly, safe, verified, regression-free, or ready to ship.
3
+ description: Verify finished code, docs, config, refactor, cleanup, setup, React, Vue, or API changes with scip-query. Use before committing or when the user asks whether a change is wired, safe, regression-free, or ready.
4
+ commands:
5
+ - template: "scip-query doctor"
6
+ when: "Prove the workspace: index freshness and dependency readiness."
7
+ - template: "scip-query status --capabilities"
8
+ when: "Prove the workspace: which evidence and verification capabilities are available."
9
+ - template: "scip-query diff-impact --json"
10
+ when: "Assess the diff: changed symbols and downstream consumers."
11
+ - template: "scip-query diff-gate --json"
12
+ when: "Run the gate: the primary blocker for diff-specific risk."
13
+ - template: "scip-query health --baseline"
14
+ when: "Check health: compare findings against the committed baseline."
15
+ - template: "scip-query doc-drift --json --full"
16
+ when: "Check docs: run when docs, AGENTS.md, or command surfaces changed."
4
17
  ---
5
18
 
6
- # Post-Implementation Verification with scip-query
19
+ # scip-verify
7
20
 
8
- Verify the actual diff, not your intention. A verification pass proves that the current workspace has a runnable scip-query environment, a current index, expected blast radius, no diff-gate findings, and no relevant health or config regression.
21
+ Use this skill to verify the actual diff. Verification is the evidence pass that proves the workspace can answer, the index is current, the changed symbols and files match intent, routed postchecks ran, and diff-gate findings are resolved.
9
22
 
10
- ## Hard Rules
23
+ Load shared mechanics from [`../_shared/SKILL.md`](../_shared/SKILL.md).
11
24
 
12
- 1. Run environment checks before trusting graph facts.
13
- 2. Check index freshness before final verification. Reindex only when freshness is `stale`, `missing`, or `unknown`, unless a just-finished command already refreshed the index and no files changed afterward.
14
- 3. Treat `scip-query diff-gate --json` as the primary blocker for diff-specific risk. Manual checks are drill-down evidence, not a replacement.
15
- 4. Run the postchecks that match the actual change type.
16
- 5. Prefer fixing findings. Use `scip-query suppress <id> --reason "<specific reason>"` only for intentional design, compatibility shims, framework entry points, or accepted false positives with durable evidence.
17
- 6. If `.scipquery.json` or suppressions changed, run `scip-query config-validate`.
25
+ <!-- BEGIN GENERATED SKILL COMMANDS -->
26
+ ## Commands for this skill
18
27
 
19
- ## Default Verification Flow
28
+ | Command | Purpose | When |
29
+ | --- | --- | --- |
30
+ | `scip-query doctor` | Diagnose config, index freshness, dependency readiness, and project capabilities | Prove the workspace: index freshness and dependency readiness. |
31
+ | `scip-query status --capabilities` | Show index status for this project | Prove the workspace: which evidence and verification capabilities are available. |
32
+ | `scip-query diff-impact --json` | Compute changed symbols and downstream consumers from current git diff | Assess the diff: changed symbols and downstream consumers. |
33
+ | `scip-query diff-gate --json` | Gate the current diff: echo candidates, incomplete migrations, missing co-change partners, unedited twin partners (advisory), uncited doc updates, unused params, new dead symbols; exit 1 on blocking findings | Run the gate: the primary blocker for diff-specific risk. |
34
+ | `scip-query health --baseline` | Composite codebase health report with prioritized action list | Check health: compare findings against the committed baseline. |
35
+ | `scip-query doc-drift --json --full` | Stale-doc candidates: code the doc references or co-changed with kept changing after the doc stopped | Check docs: run when docs, AGENTS.md, or command surfaces changed. |
20
36
 
21
- ### 1. Prove the workspace can answer
37
+ Use this shortlist first. Open [`../_shared/SKILL.md`](../_shared/SKILL.md) only when it is insufficient.
38
+ <!-- END GENERATED SKILL COMMANDS -->
39
+
40
+ ## Rules
41
+
42
+ 1. Verify environment and index freshness before trusting graph facts.
43
+ 2. Treat `scip-query diff-gate --json` as the primary blocker for diff-specific risk.
44
+ 3. Run every postcheck that matches the actual edit, not only the check you expected to need.
45
+ 4. If `.scipquery.json` or suppressions changed, run `scip-query config-validate`.
46
+ 5. Prefer fixing findings. Suppress only intentional design, compatibility shims, framework entry points, or accepted false positives with a specific reason.
47
+
48
+ ## Flow
49
+
50
+ ### 1. Prove the workspace
22
51
 
23
52
  ```bash
24
53
  scip-query doctor
25
54
  scip-query status --capabilities
26
55
  ```
27
56
 
28
- If either command reports missing indexers, stale indexes, invalid config, or unavailable capabilities relevant to the change, resolve that first or report it as a blocker. Unavailable is not clean; it means that signal class was not proven.
57
+ This step is complete only when missing indexers, invalid config, stale indexes, or unavailable relevant capabilities are fixed or reported as blockers.
29
58
 
30
- ### 2. Refresh and assess the diff
59
+ ### 2. Assess the diff
31
60
 
32
61
  ```bash
33
- scip-query status --capabilities
34
- # If freshness is stale, missing, or unknown:
35
- # scip-query reindex
36
62
  scip-query diff-impact --json
37
63
  ```
38
64
 
39
- Use `diff-impact` to check whether the changed files, changed symbols, and downstream consumers match the work you intended to do. Unexpected symbols or a much wider blast radius are findings even if `diff-gate` later passes.
40
-
41
- ### 3. Run routed postchecks
65
+ Compare changed files, changed symbols, and downstream consumers with the intended work. Unexpected blast radius is a finding even if later gates pass.
42
66
 
43
- Run every row that applies to the work just performed.
67
+ This step is complete only when the diff shape is understood.
44
68
 
45
- | Change type | Required checks |
46
- |---|---|
47
- | Extracted a helper or created an abstraction | `scip-query incomplete-migration --json --full` |
48
- | Added a new helper, module, component, or adapter | `scip-query similar <symbol> --json --full` and `scip-query recent-duplicates --json --full` |
49
- | Added parameters, options, or config flags | `scip-query unused-params --json --full` |
50
- | Added a forwarding or wrapper layer | `scip-query wrapper-candidates --json --full` and `scip-query passthrough-candidates --json --full` |
51
- | Added an interface, base class, adapter contract, or type alias | `scip-query stale-abstractions --json --full` |
52
- | Changed schema, config, generated artifacts, or public contracts | `scip-query co-change <file> --json --full` |
53
- | Changed code described by docs or changed docs that cite code | `scip-query doc-drift --json --full` |
54
- | Deleted code | `scip-query cleanup-plan --verify --json` |
55
- | Changed React components or hooks | `scip-query react-component-duplicates --json --full`, `scip-query react-hook-candidates --json --full`, and `scip-query react-large-component-pressure --json --full` |
56
- | Changed Vue SFCs or composables | `scip-query vue-component-duplicates --json --full`, `scip-query vue-composable-candidates --json --full`, and `scip-query vue-large-view-pressure --json --full` |
69
+ ### 3. Run routed postchecks
57
70
 
58
- Use focused probes when a finding needs explanation:
71
+ Use the postcheck table in the shared reference. Run all rows that apply to the change type.
59
72
 
60
- ```bash
61
- scip-query code <symbol-or-file>
62
- scip-query refs <symbol>
63
- scip-query fan-in <symbol>
64
- scip-query fan-out <symbol>
65
- scip-query affected <symbol> --json
66
- scip-query change-surface <file> --json --full
67
- ```
73
+ This step is complete only when each applicable postcheck has a result and every actionable finding is fixed, accepted with evidence, or blocked by a named constraint.
68
74
 
69
75
  ### 4. Run the gate
70
76
 
@@ -72,89 +78,65 @@ scip-query change-surface <file> --json --full
72
78
  scip-query diff-gate --json
73
79
  ```
74
80
 
75
- On any finding, fix it or explicitly accept it with evidence. Do not ignore a nonzero gate. If a suppression is the right outcome, record the reason and validate config:
81
+ If it reports findings, fix them or record the acceptance reason. If a suppression is needed:
76
82
 
77
83
  ```bash
78
84
  scip-query suppress <id> --reason "<specific reason>"
79
85
  scip-query config-validate
80
86
  ```
81
87
 
82
- ### 5. Check baseline health when present
88
+ This step is complete only when `diff-gate` passes or every finding has a durable explanation.
83
89
 
84
- Run this when the repository has a committed scip-query baseline:
85
-
86
- ```bash
87
- scip-query health --baseline
88
- ```
90
+ ### 5. Check health, docs, and config when relevant
89
91
 
90
- If no baseline exists and the user asked for broad health verification, run:
92
+ Run:
91
93
 
92
94
  ```bash
93
- scip-query health --json --full
95
+ scip-query health --baseline
94
96
  ```
95
97
 
96
- Health score changes are diagnostic, not the objective. A score drop matters when it corresponds to a real new signal; a score increase does not excuse unverified behavior.
97
-
98
- ### 6. Validate config and docs when touched
99
-
100
- If `.scipquery.json`, AGENTS.md, CLAUDE.md, command docs, or skill instructions changed, run the relevant check:
98
+ when a committed baseline exists. If docs, AGENTS.md, CLAUDE.md, command docs, generated docs, or skill instructions changed, run:
101
99
 
102
100
  ```bash
103
- scip-query config-validate
104
101
  scip-query doc-drift --json --full
105
102
  ```
106
103
 
107
- For generated command docs, also run the repo's descriptor or docs test if one exists.
108
-
109
- If you are maintaining scip-query analyzers or command descriptors inside the scip-query repository itself, add:
104
+ If the repository provides a self-audit command and the change touches generated command surfaces, analyzers, or evidence-labeling behavior, also run:
110
105
 
111
106
  ```bash
112
107
  scip-query self-audit
113
108
  ```
114
109
 
115
- This is a maintainer check for analyzer consistency, not a general app-developer verification step.
110
+ This step is complete only when changed documentation and config surfaces are checked or explicitly out of scope.
116
111
 
117
- ## Manual Drill-Down Checks
112
+ ## Report
118
113
 
119
- Use these when `diff-impact`, routed postchecks, or `diff-gate` point to a structural risk:
120
-
121
- ```bash
122
- scip-query cycles
123
- scip-query dead --json --full
124
- scip-query isolated --json --full
125
- scip-query coupling
126
- scip-query bottlenecks
127
- ```
128
-
129
- These commands are not a substitute for `diff-gate`; they explain or bound the finding.
130
-
131
- ## Verification Report
132
-
133
- End with a compact report:
114
+ End with:
134
115
 
135
116
  ```markdown
136
117
  Verification: PASS/FAIL
137
118
 
138
119
  Environment:
139
- - doctor: PASS/FAIL
140
- - status capabilities: PASS/FAIL or unavailable checks
120
+ - doctor:
121
+ - status:
141
122
 
142
123
  Diff:
143
- - changed files/symbols from `scip-query diff-impact --json`
144
- - unexpected blast radius, if any
124
+ - changed files/symbols:
125
+ - unexpected blast radius:
145
126
 
146
127
  Postchecks:
147
- - <command>: PASS/FAIL and finding count
128
+ - <command>: <result>
148
129
 
149
130
  Gate:
150
- - `scip-query diff-gate --json`: PASS/FAIL
131
+ - `scip-query diff-gate --json`: <result>
151
132
 
152
- Health/config:
153
- - baseline or health result
154
- - config validation result when applicable
133
+ Health/docs/config:
134
+ - <commands and results>
155
135
 
156
136
  Remaining risk:
157
- - accepted suppressions, blocked capabilities, or checks not run
137
+ - <accepted findings, unavailable capabilities, or checks not run>
158
138
  ```
159
139
 
160
- Do not claim "safe to commit" unless freshness is `fresh` after the final file edit and `scip-query diff-gate --json` passed.
140
+ Do not claim ready-to-ship unless freshness is `fresh` after the final edit and diff-gate is passed or fully explained.
141
+
142
+ - `dead`/`new-dead` correctly resolve `import type` consumers, tsconfig `paths` aliases, pnpm/npm/yarn workspace cross-package imports, and Vue `<script setup>` composables. The one residual gap is a same-named symbol reached only through a re-exporting barrel file in a workspace package; that shape self-labels `unconfirmed (cross-package ambiguous-name resolution gap)` in the finding — treat only that label as unconfirmed until `refs` agrees. See the Detector Reliability section in `../_shared/SKILL.md`.
@@ -1,134 +1,107 @@
1
1
  ---
2
2
  name: scip-vue-maintainability
3
- description: Vue frontend maintainability review using scip-query's Vue SFC, template-duplicate, composable-candidate, large-view, and health commands. Use when reviewing Vue or Nuxt codebases, investigating duplicated components or composables, checking frontend health score pressure, or asking whether agents are reusing Vue code correctly.
3
+ description: Review Vue maintainability with scip-query. Use for Vue, Nuxt, SFCs, duplicated templates, composable candidates, large views, frontend health pressure, or verifying Vue reuse after refactors.
4
+ commands:
5
+ - template: "scip-query augment-vue --project <path-to-tsconfig>"
6
+ when: "Bound and augment: add compiler-resolved Vue SFC references first."
7
+ - template: "scip-query vue-component-duplicates --scope <scope> --full --json"
8
+ when: "Scan: duplicated template structure candidates."
9
+ - template: "scip-query vue-composable-candidates --scope <scope> --full --json"
10
+ when: "Scan: shared state/lifecycle extraction candidates."
11
+ - template: "scip-query vue-large-view-pressure --scope <scope> --full --json"
12
+ when: "Scan: SFCs carrying several reasons to change."
13
+ - template: "scip-query recent-duplicates --scope <scope> --full --json"
14
+ when: "Scan: recent code re-implementing established components."
15
+ - template: "scip-query health --json"
16
+ when: "Scan: frontend health pressure baseline."
4
17
  ---
5
18
 
6
- # SCIP Vue Maintainability Review
19
+ # scip-vue-maintainability
7
20
 
8
- This skill reviews Vue frontends by treating `.vue` single-file components as first-class code units. It uses `scip-query` evidence to decide where templates, scripts, styles, external scripts, components, and composables are carrying duplicated concepts or too many reasons to change.
21
+ Use this skill to review Vue frontends as maintainable systems of single-file components, templates, scripts, styles, external scripts, components, and composables.
9
22
 
10
- A Vue component duplicate candidate is a pair or group of rendered interface structures that repeat the same user-facing arrangement, controls, states, or data-presentation shape enough that a shared component may reduce future divergence.
23
+ Load shared mechanics from [`../_shared/SKILL.md`](../_shared/SKILL.md).
11
24
 
12
- A Vue composable candidate is a pair or group of script behaviors that repeat the same state lifecycle, effects, requests, validation, persistence, or derived-data policy enough that a shared composable may make the behavior easier to preserve.
25
+ <!-- BEGIN GENERATED SKILL COMMANDS -->
26
+ ## Commands for this skill
13
27
 
14
- Large view pressure is a maintainability signal that one SFC or linked view file contains several kinds of knowledge that change for different reasons, such as layout structure, state management, data loading, styling, and feature policy.
28
+ | Command | Purpose | When |
29
+ | --- | --- | --- |
30
+ | `scip-query augment-vue --project <path-to-tsconfig>` | Add compiler-resolved Vue SFC references to the SQLite index using Volar | Bound and augment: add compiler-resolved Vue SFC references first. |
31
+ | `scip-query vue-component-duplicates --scope <scope> --full --json` | Find heuristic duplicated Vue component structure candidates from template tags, bindings, slots, and directives | Scan: duplicated template structure candidates. |
32
+ | `scip-query vue-composable-candidates --scope <scope> --full --json` | Find heuristic Vue composable extraction candidates from shared state, effects, requests, and template bindings | Scan: shared state/lifecycle extraction candidates. |
33
+ | `scip-query vue-large-view-pressure --scope <scope> --full --json` | Find heuristic large Vue view pressure candidates from template, script, style, and external script line counts | Scan: SFCs carrying several reasons to change. |
34
+ | `scip-query recent-duplicates --scope <scope> --full --json` | Directional duplicate candidates: recent code that re-implements established callable, React, or Vue code | Scan: recent code re-implementing established components. |
35
+ | `scip-query health --json` | Composite codebase health report with prioritized action list | Scan: frontend health pressure baseline. |
15
36
 
16
- Vue health is a repo-grounded frontend pressure map. It is useful for ranking review attention, but it is not proof that code is bad and not the goal of a refactor.
37
+ Use this shortlist first. Open [`../_shared/SKILL.md`](../_shared/SKILL.md) only when it is insufficient.
38
+ <!-- END GENERATED SKILL COMMANDS -->
17
39
 
18
- ## Quick Start
40
+ ## Terms
19
41
 
20
- Refresh the code intelligence before trusting graph facts:
42
+ A Vue component duplicate candidate is a pair or group of rendered structures that repeat the same user-facing arrangement, controls, states, or data-presentation shape enough that a shared component may reduce drift.
21
43
 
22
- ```bash
23
- scip-query status
24
- scip-query status --capabilities
25
- # If freshness is stale, missing, or unknown:
26
- # scip-query reindex
27
- ```
44
+ A Vue composable candidate is a pair or group of script behaviors that repeat the same state lifecycle, effects, requests, validation, persistence, or derived-data policy enough that a shared composable may preserve behavior better.
45
+
46
+ Large view pressure means one SFC or linked view file contains several kinds of knowledge that change for different reasons.
47
+
48
+ ## Workflow
49
+
50
+ ### 1. Bound and augment
28
51
 
29
- If Vue files need rich internals, find the relevant TypeScript project and augment the index:
52
+ Pick the narrowest Vue source root, feature area, or changed-file scope that still includes likely reuse partners. When component references, imported composables, script blocks, or linked external scripts matter, run:
30
53
 
31
54
  ```bash
32
- find . -name 'tsconfig*.json' -not -path '*/node_modules/*'
33
55
  scip-query augment-vue --project <path-to-tsconfig>
34
56
  ```
35
57
 
36
- Run the Vue review commands uncapped when doing a serious frontend pass. Do not combine `--full` with `--limit`.
58
+ This step is complete only when the review scope and augmentation decision are recorded.
59
+
60
+ ### 2. Scan
61
+
62
+ Run uncapped commands:
37
63
 
38
64
  ```bash
39
- scip-query vue-component-duplicates --scope <vue-source-scope> --full --json
40
- scip-query vue-composable-candidates --scope <vue-source-scope> --full --json
41
- scip-query vue-large-view-pressure --scope <vue-source-scope> --full --json
65
+ scip-query vue-component-duplicates --scope <scope> --full --json
66
+ scip-query vue-composable-candidates --scope <scope> --full --json
67
+ scip-query vue-large-view-pressure --scope <scope> --full --json
68
+ scip-query recent-duplicates --scope <scope> --full --json
42
69
  scip-query health --json
43
70
  ```
44
71
 
45
- ## Workflow
72
+ This step is complete only when command scope, counts, and uncapped/full status are recorded.
73
+
74
+ ### 3. Cross-check candidates
75
+
76
+ - Component duplicate only: inspect for shared presentational component or existing component reuse.
77
+ - Composable candidate only: inspect for shared lifecycle, request, validation, persistence, event, or derived-state policy.
78
+ - Both: inspect for a feature-level concept needing both component and composable boundaries.
79
+ - Large view only: split by reason to change, not by line count.
46
80
 
47
- 1. Bound the review to a Vue source root, feature area, or changed files. Prefer the narrowest scope that still includes likely reuse partners.
48
- 2. Run `augment-vue` when component references, imported composables, script blocks, or linked external scripts matter to the question.
49
- 3. Run the three Vue commands: component duplicates, composable candidates, and large view pressure.
50
- 4. Cross-check the result sets before recommending an extraction:
51
- - Component duplicate only: inspect for a shared presentational component or an existing component that callers should reuse.
52
- - Composable candidate only: inspect for a shared behavior, lifecycle, request pattern, validation rule, persistence rule, or derived-state policy.
53
- - Both component and composable candidate: inspect for a feature-level concept that may need both a component boundary and a composable boundary.
54
- - Large view only: split by reason to change, not by line count alone.
55
- 5. Open the source files for the top candidates. Similarity is evidence to inspect, not a verdict.
56
- 6. Check existing exports, imports, and call sites before proposing anything new:
81
+ Use:
57
82
 
58
83
  ```bash
59
84
  scip-query outline <file>
60
85
  scip-query deps <file>
61
86
  scip-query rdeps <file>
62
- scip-query similar-files --scope <vue-source-scope>
63
- scip-query recent-duplicates --scope <vue-source-scope> --full --json
87
+ scip-query similar-files --scope <scope>
88
+ scip-query recent-duplicates --scope <scope> --full --json
64
89
  ```
65
90
 
66
- ## Acting on Findings
91
+ This step is complete only when each top candidate is reuse, extract, split, skip, or blocked.
67
92
 
68
- Prefer reuse before extraction. If an existing component or composable already names the concept, migrate callers to it instead of creating another one.
93
+ ### 4. Act and verify
69
94
 
70
- When extracting:
95
+ Prefer reuse before extraction. Extract components for repeated template structure, props, slots, states, or design-system composition. Extract composables for repeated state, lifecycle, requests, validation, persistence, derived data, or event policy. Keep essential variation at the call site.
71
96
 
72
- - Extract a component when the repeated knowledge is rendered template structure, props, slots, empty/loading/error states, or design-system composition.
73
- - Extract a composable when the repeated knowledge is state, lifecycle, requests, validation, persistence, derived data, or shared event policy.
74
- - Split a large view by reason to change: data loading, permission/policy, layout shell, table/list rendering, form state, and action handling are different reasons.
75
- - Keep domain-specific variation at the call site when the variation is essential. Do not hide different product rules behind broad option objects.
97
+ Run routed postchecks from the shared reference, including Vue commands, `incomplete-migration`, `recent-duplicates`, `unused-params`, and wrapper/passthrough/stale checks, then invoke `scip-verify`.
76
98
 
77
- ## Post-Change Verification
78
-
79
- After implementing a component reuse, composable extraction, or large-view split, prove both sides of the work: the new abstraction exists and the old inline copies were migrated.
80
-
81
- Run the checks that match what changed:
82
-
83
- ```bash
84
- scip-query diff-impact --json
85
- scip-query vue-component-duplicates --scope <vue-source-scope> --full --json
86
- scip-query vue-composable-candidates --scope <vue-source-scope> --full --json
87
- scip-query vue-large-view-pressure --scope <vue-source-scope> --full --json
88
- scip-query recent-duplicates --scope <vue-source-scope> --full --json
89
- scip-query incomplete-migration
90
- scip-query unused-params
91
- scip-query wrapper-candidates --scope <vue-source-scope> --full --json
92
- scip-query passthrough-candidates --scope <vue-source-scope> --full --json
93
- scip-query stale-abstractions --scope <vue-source-scope> --include-low-confidence --full --json
94
- scip-query status --capabilities
95
- # If freshness is stale, missing, or unknown:
96
- # scip-query reindex
97
- scip-query diff-gate --json
98
- ```
99
-
100
- Use the results this way:
101
-
102
- - `incomplete-migration`: if a new composable/helper was created and wired somewhere, migrate every unchanged site that still contains the same logic or document why it is not the same behavior.
103
- - `recent-duplicates`: if the new component/composable is still an echo of established code, delete the echo or reuse the established concept.
104
- - Vue duplicate commands: the specific candidate pair you acted on should disappear, weaken materially, or be explicitly accepted as essential variation.
105
- - `unused-params`: remove speculative props/options introduced "for later."
106
- - wrapper/pass-through/stale checks: remove local wrapper components, composable aliases, or type abstractions that do not enforce a real policy.
107
- - `diff-gate`: treat every finding as unfinished work unless there is a written reason to accept it.
99
+ The work is complete only when acted-on candidate pairs disappear, weaken materially, or are explicitly accepted as essential variation.
108
100
 
109
101
  ## False Positive Checks
110
102
 
111
- - Shared design-system primitives, CSS utility classes, icons, labels, or test IDs are not enough to justify an extraction.
112
- - Similar templates with different domain lifecycles may justify a presentational component but not a composable.
113
- - Shared composable usage may mean the right concept is already extracted; look for drift around the shared call, not just another extraction.
114
- - A large style block creates review pressure, but it is not proof that behavior is duplicated.
115
- - A local wrapper is justified only when it names a real product concept, enforces a policy, or prevents drift across callers.
116
-
117
- ## Reporting Shape
118
-
119
- Report findings as a frontend maintainability register:
120
-
121
- - Executive read: whether the Vue code is consolidating or drifting.
122
- - Command evidence: exact commands, scope, counts, and whether results were uncapped.
123
- - Candidate groups: files, repeated UI structure, repeated behavior, and large-view pressure.
124
- - Recommended extractions: component, composable, view split, reuse existing API, or no action.
125
- - Post-change proof: commands rerun, candidate pairs resolved or accepted, migration completeness checked, and `diff-gate` result.
126
-
127
- ## Stable Management Calibration
103
+ Shared design-system primitives, CSS utilities, icons, labels, or test IDs are not enough. Similar templates with different domain lifecycles may justify a presentational component but not a composable. A large style block is pressure, not proof.
128
104
 
129
- When validating against Stable Management, use these known shapes as calibration examples, not hard-coded rules:
105
+ ## Report
130
106
 
131
- - `IncidentCategoriesPanel.vue` and `RecordLabelsPanel.vue` should read as both component and behavior pressure.
132
- - `CardActionMenu.vue` and `CardStatusMenu.vue` should read as behavior/composable pressure.
133
- - `HorseProfileFarrierVisitsSection.vue` and `HorseProfileVetRecordsSection.vue` should read as component pressure without forcing a composable.
134
- - `InventoryView.vue` and `FacilityBookingView.vue` should count linked external script pressure when measuring large views.
107
+ Report executive read, command evidence, candidate groups, recommended action, post-change proof, and remaining accepted variation.
@@ -1,102 +0,0 @@
1
- import{a as N,b as m,c as F,d as E,e as p,g as M}from"./chunk-JM72FNGA.js";import{c as R}from"./chunk-72KY2ZFO.js";import{a as f}from"./chunk-DS6QEB3G.js";import{b,c as S,d as I,e as h,j as D}from"./chunk-XUGQU7PM.js";import{a as _}from"./chunk-64MNV6AB.js";import{c as g}from"./chunk-7S5E7KWT.js";function pe(e,n){return e.all(`SELECT gs.id, gs.symbol, der.document_id, der.start_line, der.end_line, d.relative_path, gs.display_name, gs.documentation
2
- FROM global_symbols gs
3
- JOIN defn_enclosing_ranges der ON gs.id = der.symbol_id
4
- JOIN documents d ON der.document_id = d.id
5
- WHERE ${n.where}
6
- ${e.pathExclusionsFor("d")}
7
- ${k(n.orderBy)}
8
- ${w(n.limit)}`,...n.params??[])}function ye(e,n){return e.all(`SELECT
9
- gs.id,
10
- gs.symbol,
11
- c.document_id,
12
- MIN(c.start_line) AS start_line,
13
- MAX(c.end_line) AS end_line,
14
- d.relative_path,
15
- gs.display_name,
16
- gs.documentation
17
- FROM global_symbols gs
18
- JOIN mentions m ON m.symbol_id = gs.id
19
- JOIN chunks c ON m.chunk_id = c.id
20
- JOIN documents d ON c.document_id = d.id
21
- WHERE m.role = 1
22
- AND ${n.where}
23
- ${e.pathExclusionsFor("d")}
24
- GROUP BY gs.id, gs.symbol, c.document_id, d.relative_path, gs.display_name, gs.documentation
25
- ${k(n.orderBy)}
26
- ${w(n.limit)}`,...n.params??[])}function k(e){return e?`ORDER BY ${e}`:""}function w(e){return typeof e=="number"?`LIMIT ${e}`:""}function $(e){return!e||!e.trim()?null:e.replace(/^```\w*\s*/,"").replace(/\s*```$/,"").replace(/^\(method\)\s*/,"").replace(/^\(property\)\s*/,"").replace(/^\(function\)\s*/,"").replace(/^\(class\)\s*/,"").replace(/^\(interface\)\s*/,"").replace(/^\(enum\)\s*/,"").replace(/^\(type alias\)\s*/,"").replace(/^\(const\)\s*/,"").replace(/^\(var\)\s*/,"").trim()||null}function C(e){if(!e)return null;let n=O(e);if(n)return n.replace(/\n/g," ");let t=e.indexOf("|");if(t===-1)return e.replace(/\n/g," ");let i=e.slice(t+1);return(O(i)??i).replace(/\n/g," ")}function O(e){return/^```(?:\w+)?\s*\n?([\s\S]*?)\n?```/.exec(e.trimStart())?.[1]?.trim()||null}function j(e){if(m(e.symbol)!==null)return!1;let t=(e.documentation??"").replace(/^```\w*\s*/,"").replace(/\s*```$/,"").trim();return/^(?:var|let|const|function|class|interface|type|enum)\b/.test(t)}function L(e,n,t={}){let i=new Map;for(let r of n)e.length>0&&!j(r)||i.set(r.id,r);for(let r of e)i.set(r.id,r);let o=[...i.values()];return t.sort?o.sort((r,s)=>r.start_line-s.start_line||r.end_line-s.end_line||r.symbol.localeCompare(s.symbol)):o}var W=g("file-definitions",{clearGroups:["definition-catalog"]}),Y=g("file-function-like-definitions",{clearGroups:["definition-catalog"]}),A=new WeakMap;function x(e,n){return W.get(e,n,()=>{let t=P(e,n);if(t)return t;let i=B(e,n),o=S(e),r=f(e,n);return o&&r&&h(e,"file-definitions",n,b(e,n,r),JSON.stringify({projectFingerprint:o,definitions:i.map(s=>({...s}))})),i})}function z(e,n){return Y.get(e,n,()=>{let t=P(e,n);return t?t.filter(i=>i.isFunctionLike):B(e,n,i=>i.isFunctionLike)})}function P(e,n){let t=S(e);if(!t)return null;let i=f(e,n);if(!i)return null;let o=I(e,"file-definitions",n,b(e,n,i));return o?G(o,t,n):null}function G(e,n,t){try{let i=JSON.parse(e);if(!D(i)||i.projectFingerprint!==n||!Array.isArray(i.definitions))return null;let o=[];for(let r of i.definitions){let s=K(r,t);if(!s)return null;o.push(s)}return o}catch{return null}}function K(e,n){return!D(e)||typeof e.symbolId!="number"||typeof e.symbol!="string"||typeof e.documentId!="number"||typeof e.startLine!="number"||typeof e.endLine!="number"||e.relativePath!==n||typeof e.leaf!="string"||typeof e.parentTypeName!="string"&&e.parentTypeName!==null||typeof e.isFunctionLike!="boolean"||typeof e.isTypeLike!="boolean"||typeof e.kind!="number"&&e.kind!==null||typeof e.documentation!="string"&&e.documentation!==null||typeof e.enclosingSymbol!="string"&&e.enclosingSymbol!==null?null:{symbolId:e.symbolId,symbol:e.symbol,documentId:e.documentId,startLine:e.startLine,endLine:e.endLine,relativePath:e.relativePath,leaf:e.leaf,parentTypeName:e.parentTypeName,isFunctionLike:e.isFunctionLike,isTypeLike:e.isTypeLike,kind:e.kind,documentation:e.documentation,enclosingSymbol:e.enclosingSymbol}}function B(e,n,t){let i=L(U(e,n),q(e,n),{sort:!0}).map(J);return t&&(i=i.filter(t)),v(e,n,i)}function U(e,n){return e.all(`SELECT
27
- gs.id,
28
- gs.symbol,
29
- der.document_id,
30
- der.start_line,
31
- der.end_line,
32
- d.relative_path,
33
- gs.display_name,
34
- gs.kind,
35
- gs.documentation,
36
- gs.enclosing_symbol
37
- FROM global_symbols gs
38
- JOIN defn_enclosing_ranges der ON gs.id = der.symbol_id
39
- JOIN documents d ON der.document_id = d.id
40
- WHERE d.relative_path = ?
41
- ${e.symbolNoiseFor("gs")}
42
- ORDER BY der.start_line, der.end_line`,n)}function q(e,n){return e.all(`SELECT
43
- gs.id,
44
- gs.symbol,
45
- c.document_id,
46
- MIN(c.start_line) AS start_line,
47
- MAX(c.end_line) AS end_line,
48
- d.relative_path,
49
- gs.display_name,
50
- gs.kind,
51
- gs.documentation,
52
- gs.enclosing_symbol
53
- FROM global_symbols gs
54
- JOIN mentions m ON m.symbol_id = gs.id
55
- JOIN chunks c ON m.chunk_id = c.id
56
- JOIN documents d ON c.document_id = d.id
57
- WHERE d.relative_path = ?
58
- AND m.role = 1
59
- ${e.symbolNoiseFor("gs")}
60
- GROUP BY gs.id, gs.symbol, c.document_id, d.relative_path
61
- ORDER BY start_line, end_line`,n)}function J(e){return{symbolId:e.id,symbol:e.symbol,documentId:e.document_id,startLine:e.start_line,endLine:e.end_line,relativePath:e.relative_path,leaf:E(e.symbol),parentTypeName:m(e.symbol),isFunctionLike:M(e.symbol),isTypeLike:p(e.symbol)==="type",kind:e.kind??null,documentation:e.documentation??null,enclosingSymbol:e.enclosing_symbol??null}}function Ee(e,n={}){return X(e,n.scope)}function X(e,n){return _(e,{scope:n,includeIgnored:!1}).flatMap(t=>x(e,t)).filter(t=>!e.isIgnored(t.relativePath))}function Me(e,n){return _(e,{scope:n,includeIgnored:!1}).flatMap(t=>z(e,t)).filter(t=>!e.isIgnored(t.relativePath))}function Oe(e,n){let t=T(Z(e,n.scope,n.sqlPrefilter)),i=T(V(e,n.scope,n.sqlPrefilter)),o=new Set([...t.keys(),...i.keys()]),r=[];for(let s of[...o].sort()){if(e.isIgnored(s))continue;let l=L(t.get(s)??[],i.get(s)??[],{sort:!0}).filter(a=>n.symbolMatches(a.symbol));l.length!==0&&r.push(...v(e,s,l.map(J)))}return r}function Z(e,n,t){let i=n?"AND d.relative_path LIKE ?":"",o=t?`AND ${H("gs",t)}`:"",r=n?[`%${n}%`]:[];return e.all(`SELECT
62
- gs.id,
63
- gs.symbol,
64
- der.document_id,
65
- der.start_line,
66
- der.end_line,
67
- d.relative_path,
68
- gs.display_name,
69
- gs.kind,
70
- gs.documentation,
71
- gs.enclosing_symbol
72
- FROM global_symbols gs
73
- JOIN defn_enclosing_ranges der ON gs.id = der.symbol_id
74
- JOIN documents d ON der.document_id = d.id
75
- WHERE 1 = 1
76
- ${e.pathExclusionsFor("d")}
77
- ${i}
78
- ${o}
79
- ${e.symbolNoiseFor("gs")}
80
- ORDER BY d.relative_path, der.start_line, der.end_line`,...r)}function V(e,n,t){let i=n?"AND d.relative_path LIKE ?":"",o=t?`AND ${H("gs",t)}`:"",r=n?[`%${n}%`]:[];return e.all(`SELECT
81
- gs.id,
82
- gs.symbol,
83
- c.document_id,
84
- MIN(c.start_line) AS start_line,
85
- MAX(c.end_line) AS end_line,
86
- d.relative_path,
87
- gs.display_name,
88
- gs.kind,
89
- gs.documentation,
90
- gs.enclosing_symbol
91
- FROM global_symbols gs
92
- JOIN mentions m ON m.symbol_id = gs.id
93
- JOIN chunks c ON m.chunk_id = c.id
94
- JOIN documents d ON c.document_id = d.id
95
- WHERE m.role = 1
96
- ${e.pathExclusionsFor("d")}
97
- ${i}
98
- ${o}
99
- ${e.symbolNoiseFor("gs")}
100
- GROUP BY gs.id, gs.symbol, c.document_id, d.relative_path
101
- ORDER BY d.relative_path, start_line, end_line`,...r)}function ee(e){return`(${e}.symbol LIKE '%().' OR ${e}.symbol LIKE '%()')`}function H(e,n){return n==="callable"?ee(e):ne(e)}function ne(e){return`${e}.symbol LIKE '%.'`}function T(e){let n=new Map;for(let t of e){let i=n.get(t.relative_path);i?i.push(t):n.set(t.relative_path,[t])}return n}function ke(e,n,t={}){if(n.length===0)return[];let i=n.flatMap(o=>x(e,o)).filter(o=>!e.isIgnored(o.relativePath));return t.onlyDocumented&&(i=i.filter(o=>o.documentation!==null&&o.documentation!=="")),t.sort&&(i=i.sort((o,r)=>o.relativePath.localeCompare(r.relativePath)||o.startLine-r.startLine||o.endLine-r.endLine)),i.map(o=>({startLine:o.startLine,endLine:o.endLine,symbol:o.symbol,shortName:F(o.symbol),signature:$(C(o.documentation)),relativePath:o.relativePath,enclosingSymbol:o.enclosingSymbol}))}function te(e){let n=new Map,t=e.map((i,o)=>({definition:i,index:o,span:i.endLine-i.startLine})).sort((i,o)=>i.span-o.span||i.index-o.index);for(let{definition:i}of t)for(let o=i.startLine;o<=i.endLine;o+=1)n.has(o)||n.set(o,i);return n}function we(e,n){let t=A.get(e);return t||(t=te(e),A.set(e,t)),t.get(n)??null}function $e(e,n){let t=x(e,n.relative_path).find(i=>i.symbolId===n.id);return t?{symbolId:t.symbolId,symbol:t.symbol,documentId:t.documentId,startLine:t.startLine,endLine:t.endLine,relativePath:t.relativePath}:{symbolId:n.id,symbol:n.symbol,documentId:n.document_id,startLine:n.start_line,endLine:n.end_line,relativePath:n.relative_path}}function v(e,n,t){let i=f(e,n),o=R(e,n);return o?ae(t,o,i):i?ie(t,i):t}function ie(e,n){let t=n.split(/\r?\n/),i=oe(e,t),o=re(e,i),r=se(o,t);return le(e,r)}function oe(e,n){let t=e.some(o=>y(o.symbol))?me(n):null,i=new Map;for(let o of e)i.set(o.symbolId,de(n,t,o));return i}function re(e,n){return e.filter(t=>y(t.symbol)).map(t=>({definition:t,startLine:n.get(t.symbolId)??t.startLine})).sort((t,i)=>t.startLine-i.startLine||t.definition.startLine-i.definition.startLine||t.definition.symbol.localeCompare(i.definition.symbol))}function se(e,n){let t=new Map;for(let i=0;i<e.length;i+=1){let o=e[i],r=e[i+1],s=r?Math.max(o.startLine,r.startLine-1):n.length-1;t.set(o.definition.symbolId,{startLine:o.startLine,endLine:ue(n,o.definition,o.startLine,s)})}return t}function le(e,n){return e.map(t=>{let i=n.get(t.symbolId);return i?{...t,startLine:i.startLine,endLine:i.endLine}:t})}function ae(e,n,t=null){let i=new Map;for(let o of n){let r=i.get(o.name);r?r.push(o):i.set(o.name,[o])}return e.map(o=>{if(!ce(o)||!o.leaf)return Q(o,t);let r=i.get(o.leaf);if(!r||r.length===0)return Q(o,t);let s=r[0],l=Math.abs(s.startLine-o.startLine);for(let a=1;a<r.length;a+=1){let c=r[a],d=Math.abs(c.startLine-o.startLine);d<l&&(s=c,l=d)}return{...o,startLine:s.startLine,endLine:s.endLine}})}function ce(e){return y(e.symbol)?!0:p(e.symbol)==="term"&&m(e.symbol)===null}function Q(e,n){if(!n||!e.leaf||p(e.symbol)!=="term"||m(e.symbol)!==null)return e;let t=e.leaf.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),i=new RegExp(`\\b(?:export\\s+)?(?:const|let|var)\\s+${t}\\b`),r=n.split(/\r?\n/).findIndex(s=>i.test(s));return r>=0?{...e,startLine:r,endLine:r}:e}function de(e,n,t){if(!y(t.symbol))return t.startLine;let i=Math.max(0,Math.min(t.startLine,e.length-1));if(!n)return i;let o=n.get(t.leaf);if(!o||o.length===0)return i;let r=null;for(let s of o){let l=Math.abs(s-t.startLine);(!r||l<r.distance)&&(r={line:s,distance:l})}return r?.line??i}function me(e){let n=/\b(?:function|def|fn)\s+([A-Za-z_$][\w$]*)/g,t=/\b([A-Za-z_$][\w$]*)\s*[:=]\s*(?:async\s*)?(?:function\b|\()/g,i=/^\s*(?:(?:export|public|private|protected|static|readonly|async|abstract|get|set)\s+)*([A-Za-z_$][\w$]*)\s*(?:<[^(]*>)?\s*\(/,o=/\b([A-Za-z_$][\w$]*)\s*\(/g,r=new Map,s=(l,a)=>{let c=r.get(l);if(!c){r.set(l,[a]);return}c[c.length-1]!==a&&c.push(a)};for(let l=0;l<e.length;l+=1){let a=e[l]??"";for(let d of a.matchAll(n))d[1]&&s(d[1],l);for(let d of a.matchAll(t))d[1]&&s(d[1],l);let c=a.match(i);c?.[1]&&s(c[1],l);for(let d of a.matchAll(o))d[1]&&s(d[1],l)}return r}function ue(e,n,t,i){let o=Math.max(t,Math.min(e.length-1,i)),r=Math.max(t,Math.min(o,n.endLine)),s=0,l=0,a=!1;for(let c=t;c<=o;c+=1){let d=fe(e[c]??"");for(let u of d)u==="{"?(s+=1,a=!0):u==="}"?s=Math.max(0,s-1):u==="("?l+=1:u===")"&&(l=Math.max(0,l-1));if(a&&s===0||!a&&l===0&&c>=r)return c}return r}function fe(e){let n="",t=null,i=!1;for(let o=0;o<e.length;o+=1){let r=e[o],s=e[o+1];if(!t&&r==="/"&&s==="/"){n+=" ".repeat(e.length-o);break}if(t){if(i){i=!1,n+=" ";continue}if(r==="\\"){i=!0,n+=" ";continue}r===t&&(t=null),n+=" ";continue}if(r==='"'||r==="'"||r==="`"){t=r,n+=" ";continue}n+=r}return n}function y(e){return e.includes("().")}function Ce(e){let n=N(e);if("kind"in n)return[];let t=[];for(let i=n.descriptors.length-2;i>=0;i-=1){let o=n.descriptors[i];o?.suffix==="type"&&o.name&&t.push(o.name)}return t}export{pe as a,ye as b,$ as c,C as d,L as e,x as f,Ee as g,X as h,Me as i,Oe as j,ke as k,te as l,we as m,$e as n,Ce as o};
102
- //# sourceMappingURL=chunk-2KHTSEIL.js.map
@@ -1,2 +0,0 @@
1
- function o(e){let f=[];if(e.filePattern){let l=e.profiles.find(r=>r.file.includes(e.filePattern));if(!l)return[];for(let r of e.profiles){if(r.file===l.file||e.focusFiles&&!e.focusFiles.has(l.file)&&!e.focusFiles.has(r.file))continue;let i=e.compare(l,r);i&&f.push(i)}}else{if(e.focusFiles?.size===0)return[];let l=e.focusFiles?e.profiles.map((i,n)=>e.focusFiles.has(i.file)?n:-1).filter(i=>i>=0):[],r=typeof e.overrunFactor=="number"&&Number.isFinite(e.limit)?e.limit*e.overrunFactor:Number.POSITIVE_INFINITY;for(let i=0;i<e.profiles.length;i+=1){let n=e.profiles[i];if(e.focusFiles&&!e.focusFiles.has(n.file))for(let s of l){if(s<=i)continue;let t=e.compare(n,e.profiles[s]);t&&f.push(t)}else for(let s=i+1;s<e.profiles.length;s+=1){let t=e.compare(n,e.profiles[s]);t&&f.push(t)}if(f.length>r)break}}return f.sort(e.sort??((l,r)=>r.similarity-l.similarity)),f.slice(0,e.limit)}export{o as a};
2
- //# sourceMappingURL=chunk-3VD3JMK2.js.map
@@ -1,35 +0,0 @@
1
- import{a as g}from"./chunk-7B6LP46R.js";import{c as u}from"./chunk-OLTESY4K.js";import{a as p}from"./chunk-TK7O5ER5.js";import{b as a}from"./chunk-P5RYBRIO.js";import{c as l,d as c,h as f}from"./chunk-JM72FNGA.js";import{a as d}from"./chunk-64MNV6AB.js";function J(e,s,t={}){return I(e,s,t)?.map(r=>({symbol:r.symbol,shortName:r.shortName,fromFile:r.fromFile}))??[]}function P(e,s){let t=N(e,s);return t.length>0?t:E(e,s)}function v(e,s,t={}){return I(e,s,t)?.filter(r=>!r.used).map(r=>({symbol:r.symbol,shortName:r.shortName,importedIn:r.importer}))??[]}function N(e,s){return e.all(`SELECT DISTINCT gs.symbol, d.relative_path AS importer
2
- FROM mentions m
3
- JOIN chunks c ON m.chunk_id = c.id
4
- JOIN documents d ON c.document_id = d.id
5
- JOIN global_symbols gs ON m.symbol_id = gs.id
6
- WHERE gs.symbol LIKE ?
7
- AND m.role = 2
8
- ORDER BY d.relative_path`,`%${s}%`).filter(r=>!e.isIgnored(r.importer)).map(r=>({symbol:r.symbol,shortName:l(r.symbol),fromFile:r.importer}))}function E(e,s){let t=p(e,s),r=t?.relativePath??null,o=t?c(t.symbol):s.replace(/\(\)$/,""),m=t?f(t.symbol):!1,i=new Set;for(let n of d(e,{includeIgnored:!1}))for(let _ of a(e,n))S(_,n,{targetFile:r,targetLeaf:o,targetIsModule:m})&&i.add(n);return[...i].sort().map(n=>({symbol:t?.symbol??o,shortName:t?l(t.symbol):o,fromFile:n}))}function S(e,s,t){return!e.sourcePath||t.targetFile&&b(e.sourcePath)!==b(t.targetFile)?!1:e.kind==="side-effect"||t.targetFile&&R(s)||t.targetIsModule||e.kind==="named"&&e.importedName===t.targetLeaf?!0:e.kind==="namespace"&&e.usedMembers.includes(t.targetLeaf)}function I(e,s,t={}){let r=g(e,s);return r?y(e,r,t)??(t.semantic===!1?null:F(e,r))??O(e,r):null}function y(e,s,t){let o=e.all(`SELECT DISTINCT
9
- gs.symbol,
10
- def_d.relative_path AS from_file,
11
- imp_d.relative_path AS importer,
12
- EXISTS (
13
- SELECT 1
14
- FROM mentions ref_m
15
- JOIN chunks ref_c ON ref_m.chunk_id = ref_c.id
16
- WHERE ref_m.symbol_id = gs.id
17
- AND ref_m.role != 1
18
- AND ref_c.document_id = imp_d.id
19
- ) AS used
20
- FROM mentions m
21
- JOIN chunks c ON m.chunk_id = c.id
22
- JOIN documents imp_d ON c.document_id = imp_d.id
23
- JOIN global_symbols gs ON m.symbol_id = gs.id
24
- LEFT JOIN (
25
- SELECT m2.symbol_id, c2.document_id
26
- FROM mentions m2
27
- JOIN chunks c2 ON m2.chunk_id = c2.id
28
- WHERE m2.role = 1
29
- GROUP BY m2.symbol_id
30
- ) sym_def ON sym_def.symbol_id = gs.id
31
- LEFT JOIN documents def_d ON sym_def.document_id = def_d.id
32
- WHERE imp_d.relative_path = ?
33
- AND m.role = 2
34
- ORDER BY def_d.relative_path, gs.symbol`,s).filter(m=>!e.isIgnored(m.importer));if(o.length>0){let m=t.semantic===!1?[]:u(e,s);return o.map(i=>({symbol:i.symbol,shortName:l(i.symbol),fromFile:i.from_file??"(external)",importer:i.importer,used:i.used!==0||m.some(n=>n.isUsed&&n.sourcePath===i.from_file)}))}return null}function F(e,s){let t=u(e,s);return t.length>0?t.map(r=>{let o=h(r.importedName,r.localName,r.kind);return{symbol:o,shortName:o,fromFile:r.sourcePath??"(external)",importer:s,used:r.kind==="side-effect"?!0:r.isUsed}}):null}function O(e,s){return a(e,s).map(t=>{let r=h(t.importedName,t.localName,t.kind),o=t.kind==="side-effect"?!0:t.used;return{symbol:r,shortName:r,fromFile:t.sourcePath??"(external)",importer:s,used:o}})}function h(e,s,t){return t==="namespace"&&e==="*"&&s?`* as ${s}`:t==="default"&&s?`default as ${s}`:t==="side-effect"?"(side effect import)":s&&s!==e?`${e} as ${s}`:e}function b(e){return e.replace(/\\/g,"/")}function R(e){return/\.(?:c|h|cc|cpp|cxx|hpp|hh|hxx)$/i.test(e)}export{J as a,P as b,v as c};
35
- //# sourceMappingURL=chunk-4UZO3XCV.js.map
@@ -1,8 +0,0 @@
1
- import{g as H,j as O}from"./chunk-CW5YFOCP.js";import{d as D}from"./chunk-YWOOQ4FF.js";import{b as _,d as T,h as E,i as L}from"./chunk-NOJAM5ZV.js";import{a as w}from"./chunk-5OST6GYB.js";import{c as C,d as F}from"./chunk-JM72FNGA.js";var V=5;function re(e,t={}){let{base:a="HEAD",minContainment:o=.7,minCallees:r=3,minSiteCoverage:n=.4,maxHelpers:c=Number.POSITIVE_INFINITY,limit:m=20,scanLimit:g}=t,f=t.semantic!==!1,s=t.diffPlan??T(e,{base:a}),l={available:s.note!==_,base:a,changedFiles:s.changedFiles,helpersChecked:0,skipped:[],findings:[]};if(!l.available||s.changedFiles.length===0)return l;let x=new w(e),k=new Set(s.changedFiles),$=new Map(s.renamedFiles.map(i=>[i.to,i.from])),z=t.baseContentAt??E(e.config.projectRoot,a,L(s)),h=X(x,k,$,z);if(h.length===0)return l;let R=h.slice(0,c);h.length>c&&(l.note=`helper scoring capped at ${c} of ${h.length} new symbols`);let j=x.calleeMap(R,{semantic:f}),q=R.map(i=>({def:i,callees:O((j.get(i.symbolId)??[]).map(p=>p.symbol))})),M,B=()=>(M??=H(e,{minCallees:Math.min(3,r),scanLimit:g,semantic:f}),M);for(let{def:i,callees:p}of q){let d=C(i.symbol);if(p.size<r){l.skipped.push({helperShortName:d,helperFile:i.relativePath,reason:`fewer than ${r} meaningful callees \u2014 too small to score`});continue}let P=B(),N=W(p,P);if(N===0){l.skipped.push({helperShortName:d,helperFile:i.relativePath,reason:"helper callee pattern is all project-wide infrastructure \u2014 too generic to score"});continue}let b=Y(e,i.symbolId);if(b.length===0){l.skipped.push({helperShortName:d,helperFile:i.relativePath,reason:"no references yet \u2014 covered by the new-dead check"});continue}l.helpersChecked+=1;let I=G({candidateIndex:P,changed:k,helperCallees:p,helperFile:i.relativePath,helperSymbol:i.symbol,minContainment:o,minSiteCoverage:n,migratedFiles:b});I.length!==0&&(I.sort((u,S)=>A(S.migrationScope)-A(u.migrationScope)||S.containment-u.containment||S.siteCoverage-u.siteCoverage||u.file.localeCompare(S.file)),l.findings.push({helperSymbol:i.symbol,helperShortName:d,helperFile:i.relativePath,helperShape:"specific-callee-cluster",helperCalleeCount:p.size,specificHelperCalleeCount:N,migratedFiles:b.sort(),leftovers:I.slice(0,V)}))}return l.findings.sort((i,p)=>(p.leftovers[0]?.containment??0)-(i.leftovers[0]?.containment??0)||i.helperFile.localeCompare(p.helperFile)),l.findings=l.findings.slice(0,m),l}function G(e){let t=[],a=J(e.helperSymbol,e.helperFile,e.migratedFiles),o=new Set;for(let r of e.helperCallees)for(let n of e.candidateIndex.candidateIndexesByCallee.get(r)??[])o.add(n);for(let r of o){let n=e.candidateIndex.corpus[r];if(n.symbol===e.helperSymbol||e.changed.has(n.file)||n.callees.has(e.helperSymbol))continue;let c=D(e.helperCallees,n.callees);if(c<e.minContainment)continue;let m=[...e.helperCallees].filter(s=>n.callees.has(s)),g=n.callees.size===0?0:m.length/n.callees.size;if(g<e.minSiteCoverage||!m.some(s=>(e.candidateIndex.docFreq.get(s)??0)<=e.candidateIndex.ubiquityThreshold))continue;let f=K(a,n.symbol,n.file);t.push({symbol:n.symbol,shortName:C(n.symbol),file:n.file,...f,containment:c,siteCoverage:g,uniqueSiteCalleeCount:Math.max(0,n.callees.size-m.length),sharedCallees:m.map(C).sort()})}return t}function A(e){return e==="same-scope"?2:e==="unknown"?1:0}function J(e,t,a){let o=new Set([...y(t),...v(F(e))]);for(let r of a)for(let n of y(r))o.add(n);return o}function K(e,t,a){let o=new Set([...y(a),...v(F(t))]);if(e.size===0||o.size===0)return{migrationScope:"unknown",migrationScopeReasons:["insufficient path/name tokens to infer migration scope"]};let r=[...o].filter(n=>e.has(n)).sort();return r.length>0?{migrationScope:"same-scope",migrationScopeReasons:[`shares migration-scope token(s): ${r.slice(0,5).join(", ")}`]}:{migrationScope:"possible-subtype",migrationScopeReasons:["no path/name tokens shared with the helper or already migrated files"]}}var U=new Set(["app","apps","common","component","components","helper","helpers","index","lib","package","packages","page","pages","route","routes","service","services","shared","spec","src","test","tests","util","utils"]);function y(e){return v(e.replace(/\.[^.]+$/,""))}function v(e){return e.replace(/([a-z0-9])([A-Z])/g,"$1 $2").toLowerCase().split(/[^a-z0-9]+/).filter(t=>t.length>1&&!U.has(t))}function W(e,t){let a=0;for(let o of e)(t.docFreq.get(o)??0)<=t.ubiquityThreshold&&(a+=1);return a}function X(e,t,a,o){return e.productionCallableDefinitions({files:[...t],requireFunctionLikeSymbol:!0}).filter(r=>{if(!t.has(r.relativePath))return!1;let n=a.get(r.relativePath)??r.relativePath,c=o(n);return c===null||!new RegExp(`\\b${Z(r.leaf)}\\b`).test(c)})}function Y(e,t){return e.all(`SELECT DISTINCT ref_d.relative_path
2
- FROM mentions m
3
- JOIN chunks c ON m.chunk_id = c.id
4
- JOIN documents ref_d ON c.document_id = ref_d.id
5
- WHERE m.symbol_id = ?
6
- AND m.role != 1
7
- ${e.pathExclusionsFor("ref_d")}`,t).map(o=>o.relative_path)}function Z(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}export{re as a};
8
- //# sourceMappingURL=chunk-5GOLFJEO.js.map