scip-query 0.19.5 → 0.19.8

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 (421) hide show
  1. package/CHANGELOG.md +85 -1
  2. package/README.md +259 -53
  3. package/dist/augment-vue-worker.js +1 -1
  4. package/dist/chunk-2465DLHK.js +3 -0
  5. package/dist/{chunk-7GXM52MI.js → chunk-24GTWJ3N.js} +2 -2
  6. package/dist/{chunk-NH5ALKPW.js → chunk-2SNGN6U4.js} +2 -2
  7. package/dist/{chunk-3SVWW4PN.js → chunk-2U3OLUNJ.js} +2 -2
  8. package/dist/{chunk-XLTP42QA.js → chunk-33KUO7CG.js} +2 -2
  9. package/dist/{chunk-54HA4ZXH.js → chunk-33XTHFKR.js} +2 -2
  10. package/dist/{chunk-ZGZUZ7XE.js → chunk-3EDFLQ6A.js} +2 -2
  11. package/dist/chunk-3ZSJ3PWF.js +16 -0
  12. package/dist/{chunk-F6O7AAC3.js → chunk-43KC6EQZ.js} +2 -2
  13. package/dist/{chunk-I5RJM53C.js → chunk-464PLI5O.js} +2 -2
  14. package/dist/chunk-46XGSFNI.js +2 -0
  15. package/dist/{chunk-M7AIS73L.js → chunk-47BU5Z4T.js} +2 -2
  16. package/dist/chunk-4BV4QAZJ.js +5 -0
  17. package/dist/chunk-4YTUWQ6M.js +18 -0
  18. package/dist/{chunk-RV2FQIX3.js → chunk-5ML2BNRH.js} +2 -2
  19. package/dist/{chunk-6NSFJYRC.js → chunk-5YLUDDAF.js} +2 -2
  20. package/dist/chunk-67QRR5YC.js +6 -0
  21. package/dist/{chunk-GPBBJ5Y4.js → chunk-6GXYN7YA.js} +3 -3
  22. package/dist/{chunk-4333ETTV.js → chunk-6M7RONVB.js} +2 -2
  23. package/dist/chunk-6YTSKJJ3.js +2 -0
  24. package/dist/{chunk-QDV6RDCP.js → chunk-7FT5Y65S.js} +2 -2
  25. package/dist/{chunk-XTX6QHOF.js → chunk-7KYNAMMH.js} +2 -2
  26. package/dist/{chunk-DZ74OMG6.js → chunk-7LSVMFX7.js} +2 -2
  27. package/dist/{chunk-VTKGCT3V.js → chunk-7QHY3H7P.js} +2 -2
  28. package/dist/{chunk-MITTUCEH.js → chunk-7RAG65VK.js} +2 -2
  29. package/dist/{chunk-25LPM4DG.js → chunk-7SWJEWJF.js} +2 -2
  30. package/dist/{chunk-52ZYCAEO.js → chunk-7VCOXZH3.js} +2 -2
  31. package/dist/chunk-A2TNXAXO.js +8 -0
  32. package/dist/{chunk-IUFDSKGG.js → chunk-A3QXWFBK.js} +2 -2
  33. package/dist/{chunk-4T3LTWUS.js → chunk-AA4UWRNL.js} +2 -2
  34. package/dist/{chunk-4SALD7RU.js → chunk-ACAM6O5R.js} +2 -2
  35. package/dist/chunk-APMMR5Y2.js +2 -0
  36. package/dist/chunk-AQOFWNQJ.js +1 -0
  37. package/dist/chunk-AZFUMCQB.js +2 -0
  38. package/dist/{chunk-M7MTH5NR.js → chunk-BDOIKGDI.js} +2 -2
  39. package/dist/{chunk-BTEE5NZQ.js → chunk-BNXICU42.js} +2 -2
  40. package/dist/chunk-C5Q44Q5D.js +3 -0
  41. package/dist/{chunk-EOOJGLDU.js → chunk-CTF2GDEX.js} +2 -2
  42. package/dist/chunk-DHEQMPLW.js +2 -0
  43. package/dist/{chunk-IZKFSVBV.js → chunk-DQBCO2UY.js} +2 -2
  44. package/dist/{chunk-7B3UPBVA.js → chunk-DQGSM7RZ.js} +2 -2
  45. package/dist/chunk-E2LAW7SL.js +30 -0
  46. package/dist/chunk-E3HYEQO7.js +2 -0
  47. package/dist/chunk-E4NFOAD4.js +6 -0
  48. package/dist/chunk-E5HNT4X2.js +3 -0
  49. package/dist/{chunk-J77UIT3I.js → chunk-ELLMY7XJ.js} +2 -2
  50. package/dist/chunk-FD3HFKXR.js +5 -0
  51. package/dist/{chunk-SOAT6NLA.js → chunk-FIJCV235.js} +2 -2
  52. package/dist/{chunk-H7UKLTWJ.js → chunk-FJ5UDTQF.js} +2 -2
  53. package/dist/{chunk-HEXVUYFQ.js → chunk-GHKEJTCE.js} +2 -2
  54. package/dist/{chunk-LBMJEAEW.js → chunk-GLZTVKAB.js} +3 -3
  55. package/dist/{chunk-FWUUZTIO.js → chunk-GNC4JVAN.js} +2 -2
  56. package/dist/chunk-HIB452NU.js +949 -0
  57. package/dist/{chunk-NRCXJDHL.js → chunk-HZYDQPNY.js} +2 -2
  58. package/dist/chunk-IF6FP6B2.js +66 -0
  59. package/dist/{chunk-4RSI5EMG.js → chunk-JAY7YWS3.js} +2 -2
  60. package/dist/{chunk-STOL2BTL.js → chunk-JHF3E4YM.js} +2 -2
  61. package/dist/chunk-JORHF5AL.js +108 -0
  62. package/dist/{chunk-A2EZV2UM.js → chunk-K2WO7XY7.js} +2 -2
  63. package/dist/chunk-KFZNKUNT.js +2 -0
  64. package/dist/{chunk-YVVCVR2L.js → chunk-KJ2IIBZN.js} +2 -2
  65. package/dist/{chunk-QGXBRIM5.js → chunk-KKME5ZAI.js} +2 -2
  66. package/dist/chunk-KSGTULOS.js +9 -0
  67. package/dist/{chunk-UOAV44HR.js → chunk-KXDJAG4N.js} +3 -3
  68. package/dist/{chunk-UKZBVX4U.js → chunk-L4S2A7BV.js} +2 -2
  69. package/dist/chunk-LP3ARJKF.js +8 -0
  70. package/dist/chunk-LSOR3LQG.js +3 -0
  71. package/dist/{chunk-Q4IIEGXJ.js → chunk-MLFZP76A.js} +2 -2
  72. package/dist/{chunk-WQTAC523.js → chunk-MNSTUIDD.js} +2 -2
  73. package/dist/{chunk-VXQNNXJE.js → chunk-MSBDMFER.js} +2 -2
  74. package/dist/{chunk-X6D5IC6I.js → chunk-MZZBAITE.js} +5 -5
  75. package/dist/{chunk-I5AWSI2G.js → chunk-NE3TZUCI.js} +2 -2
  76. package/dist/{chunk-6E7UTQY7.js → chunk-NTUMF2X3.js} +2 -2
  77. package/dist/{chunk-S44IULR6.js → chunk-O23I56NA.js} +2 -2
  78. package/dist/{chunk-CFMXJPHH.js → chunk-O3O4XXO6.js} +2 -2
  79. package/dist/{chunk-IG7N5ZIK.js → chunk-OUBAF226.js} +2 -2
  80. package/dist/chunk-P3UO3EH3.js +2 -0
  81. package/dist/{chunk-YNRNA5LK.js → chunk-QGGLL3UH.js} +2 -2
  82. package/dist/chunk-QIQ63BHW.js +16 -0
  83. package/dist/{chunk-VGRICIQI.js → chunk-QJIVBYEK.js} +2 -2
  84. package/dist/chunk-QOXBSI6G.js +20 -0
  85. package/dist/chunk-QXK6UUSM.js +2 -0
  86. package/dist/{chunk-XYADIZHU.js → chunk-RA3AYNWP.js} +2 -2
  87. package/dist/chunk-RJMDJR3A.js +2 -0
  88. package/dist/{chunk-NSS46APD.js → chunk-RLH5VUMG.js} +2 -2
  89. package/dist/{chunk-GBQ5NYPR.js → chunk-S4S2WOIX.js} +6 -6
  90. package/dist/{chunk-YIJ7ZAA4.js → chunk-SERUIGV5.js} +2 -2
  91. package/dist/{chunk-FECYOO5O.js → chunk-SMQWE25B.js} +2 -2
  92. package/dist/{chunk-R4FQGQ4X.js → chunk-TAVELHYR.js} +2 -2
  93. package/dist/{chunk-U6WNH5GC.js → chunk-TWMJ3Y3G.js} +2 -2
  94. package/dist/chunk-VAXNI5NE.js +146 -0
  95. package/dist/chunk-VVY2G5ET.js +2 -0
  96. package/dist/{chunk-WER3B7MI.js → chunk-W3DBTGL4.js} +2 -2
  97. package/dist/{chunk-CNKAGUPL.js → chunk-WANA4KAQ.js} +2 -2
  98. package/dist/chunk-WJL2L6MV.js +60 -0
  99. package/dist/chunk-WUW7YUAH.js +11 -0
  100. package/dist/{chunk-QVWS2VWZ.js → chunk-WWKWUPSU.js} +2 -2
  101. package/dist/{chunk-ABMYA4TN.js → chunk-WY45BHKQ.js} +2 -2
  102. package/dist/chunk-X4FR5BZF.js +9 -0
  103. package/dist/chunk-X6RKPDY7.js +2 -0
  104. package/dist/{chunk-ZXJYMGD3.js → chunk-YLFORA5G.js} +2 -2
  105. package/dist/{chunk-KP6XRY5Z.js → chunk-YTVWB7YJ.js} +2 -2
  106. package/dist/{chunk-4XTA5OMB.js → chunk-ZCEJ63SP.js} +2 -2
  107. package/dist/{chunk-HKEHS2AS.js → chunk-ZJ5CBXK3.js} +2 -2
  108. package/dist/chunk-ZL2OGDCD.js +2 -0
  109. package/dist/cli.js +8 -3
  110. package/dist/command-descriptors-ZW5J4ZEM.js +631 -0
  111. package/dist/{config-types-D20KuvvZ.d.ts → config-types-B6MEoRNy.d.ts} +8 -0
  112. package/dist/{db-G_II8yXU.d.ts → db-DYLKr9Wn.d.ts} +18 -1
  113. package/dist/direct-navigation-42YHQPOI.js +3 -0
  114. package/dist/{health-oblXYgkF.d.ts → health-DgxIDXJC.d.ts} +1 -1
  115. package/dist/index.d.ts +2 -2
  116. package/dist/index.js +1 -1
  117. package/dist/postinstall.js +1 -1
  118. package/dist/queries/affected.d.ts +2 -2
  119. package/dist/queries/affected.js +1 -1
  120. package/dist/queries/architecture.d.ts +2 -2
  121. package/dist/queries/architecture.js +1 -1
  122. package/dist/queries/bottlenecks.d.ts +2 -2
  123. package/dist/queries/bottlenecks.js +1 -1
  124. package/dist/queries/by-kind.d.ts +2 -2
  125. package/dist/queries/by-kind.js +1 -1
  126. package/dist/queries/call-graph.d.ts +2 -2
  127. package/dist/queries/call-graph.js +1 -1
  128. package/dist/queries/change-surface.d.ts +2 -2
  129. package/dist/queries/change-surface.js +1 -1
  130. package/dist/queries/cleanup-plan.d.ts +2 -2
  131. package/dist/queries/cleanup-plan.js +1 -1
  132. package/dist/queries/co-change.d.ts +2 -2
  133. package/dist/queries/co-change.js +1 -1
  134. package/dist/queries/code.d.ts +2 -2
  135. package/dist/queries/code.js +1 -1
  136. package/dist/queries/complexity-hotspots.d.ts +2 -2
  137. package/dist/queries/complexity-hotspots.js +1 -1
  138. package/dist/queries/complexity.d.ts +2 -2
  139. package/dist/queries/complexity.js +1 -1
  140. package/dist/queries/convergence.d.ts +2 -2
  141. package/dist/queries/convergence.js +1 -1
  142. package/dist/queries/coupling.d.ts +2 -2
  143. package/dist/queries/coupling.js +1 -1
  144. package/dist/queries/cycles.d.ts +2 -2
  145. package/dist/queries/cycles.js +1 -1
  146. package/dist/queries/dataflow.d.ts +2 -2
  147. package/dist/queries/dataflow.js +1 -1
  148. package/dist/queries/dead.d.ts +2 -2
  149. package/dist/queries/dead.js +1 -1
  150. package/dist/queries/decorative-checkers.d.ts +3 -3
  151. package/dist/queries/decorative-checkers.js +1 -1
  152. package/dist/queries/deep-chains.d.ts +2 -2
  153. package/dist/queries/deep-chains.js +1 -1
  154. package/dist/queries/deps.d.ts +2 -2
  155. package/dist/queries/deps.js +1 -1
  156. package/dist/queries/diff-gate.d.ts +30 -2
  157. package/dist/queries/diff-gate.js +1 -1
  158. package/dist/queries/diff-impact.d.ts +2 -2
  159. package/dist/queries/diff-impact.js +1 -1
  160. package/dist/queries/doc-drift.d.ts +2 -2
  161. package/dist/queries/doc-drift.js +1 -1
  162. package/dist/queries/drift.d.ts +2 -2
  163. package/dist/queries/drift.js +1 -1
  164. package/dist/queries/duplicate-bodies.d.ts +2 -2
  165. package/dist/queries/duplicate-bodies.js +1 -1
  166. package/dist/queries/extract-candidates.d.ts +2 -2
  167. package/dist/queries/extract-candidates.js +1 -1
  168. package/dist/queries/fan.d.ts +2 -2
  169. package/dist/queries/fan.js +1 -1
  170. package/dist/queries/files.d.ts +2 -2
  171. package/dist/queries/health.d.ts +3 -3
  172. package/dist/queries/health.js +1 -1
  173. package/dist/queries/hierarchy.d.ts +2 -2
  174. package/dist/queries/hierarchy.js +1 -1
  175. package/dist/queries/hotspots.d.ts +2 -2
  176. package/dist/queries/hotspots.js +1 -1
  177. package/dist/queries/imports.d.ts +2 -2
  178. package/dist/queries/imports.js +1 -1
  179. package/dist/queries/incomplete-migration.d.ts +2 -2
  180. package/dist/queries/incomplete-migration.js +1 -1
  181. package/dist/queries/index.d.ts +17 -3
  182. package/dist/queries/index.js +1 -1
  183. package/dist/queries/isolated.d.ts +2 -2
  184. package/dist/queries/isolated.js +1 -1
  185. package/dist/queries/locality-candidates.d.ts +2 -2
  186. package/dist/queries/locality-candidates.js +1 -1
  187. package/dist/queries/members.d.ts +2 -2
  188. package/dist/queries/members.js +1 -1
  189. package/dist/queries/methods.d.ts +2 -2
  190. package/dist/queries/methods.js +1 -1
  191. package/dist/queries/not-implemented.d.ts +3 -3
  192. package/dist/queries/not-implemented.js +1 -1
  193. package/dist/queries/outline.d.ts +2 -2
  194. package/dist/queries/outline.js +1 -1
  195. package/dist/queries/passthrough-candidates.d.ts +2 -2
  196. package/dist/queries/passthrough-candidates.js +1 -1
  197. package/dist/queries/plan-context.d.ts +2 -2
  198. package/dist/queries/plan-context.js +1 -1
  199. package/dist/queries/react-component-duplicates.d.ts +2 -2
  200. package/dist/queries/react-component-duplicates.js +1 -1
  201. package/dist/queries/react-hook-candidates.d.ts +2 -2
  202. package/dist/queries/react-hook-candidates.js +1 -1
  203. package/dist/queries/react-large-component-pressure.d.ts +2 -2
  204. package/dist/queries/react-large-component-pressure.js +1 -1
  205. package/dist/queries/recent-duplicates.d.ts +2 -2
  206. package/dist/queries/recent-duplicates.js +1 -1
  207. package/dist/queries/redundant-reexports.d.ts +2 -2
  208. package/dist/queries/redundant-reexports.js +1 -1
  209. package/dist/queries/refs.d.ts +2 -2
  210. package/dist/queries/refs.js +1 -1
  211. package/dist/queries/self-audit.d.ts +2 -2
  212. package/dist/queries/self-audit.js +1 -1
  213. package/dist/queries/similar-chains.d.ts +2 -2
  214. package/dist/queries/similar-chains.js +1 -1
  215. package/dist/queries/similar-files.d.ts +2 -2
  216. package/dist/queries/similar-files.js +1 -1
  217. package/dist/queries/similar-signatures.d.ts +2 -2
  218. package/dist/queries/similar-signatures.js +1 -1
  219. package/dist/queries/similar.d.ts +2 -2
  220. package/dist/queries/similar.js +1 -1
  221. package/dist/queries/slice.d.ts +2 -2
  222. package/dist/queries/slice.js +1 -1
  223. package/dist/queries/stale-abstractions.d.ts +2 -2
  224. package/dist/queries/stale-abstractions.js +1 -1
  225. package/dist/queries/stats.d.ts +2 -2
  226. package/dist/queries/stats.js +1 -1
  227. package/dist/queries/surface.d.ts +2 -2
  228. package/dist/queries/surface.js +1 -1
  229. package/dist/queries/symbols.d.ts +2 -2
  230. package/dist/queries/symbols.js +1 -1
  231. package/dist/queries/system.d.ts +2 -2
  232. package/dist/queries/system.js +1 -1
  233. package/dist/queries/test-quality.d.ts +2 -2
  234. package/dist/queries/test-quality.js +1 -1
  235. package/dist/queries/trace.d.ts +2 -2
  236. package/dist/queries/trace.js +1 -1
  237. package/dist/queries/twin-ab.d.ts +3 -3
  238. package/dist/queries/twin-ab.js +1 -1
  239. package/dist/queries/twin-drift.d.ts +2 -2
  240. package/dist/queries/twin-drift.js +1 -1
  241. package/dist/queries/unused-imports.d.ts +2 -2
  242. package/dist/queries/unused-imports.js +1 -1
  243. package/dist/queries/unused-params.d.ts +2 -2
  244. package/dist/queries/unused-params.js +1 -1
  245. package/dist/queries/vue-component-duplicates.d.ts +2 -2
  246. package/dist/queries/vue-component-duplicates.js +1 -1
  247. package/dist/queries/vue-composable-candidates.d.ts +2 -2
  248. package/dist/queries/vue-composable-candidates.js +1 -1
  249. package/dist/queries/vue-large-view-pressure.d.ts +2 -2
  250. package/dist/queries/vue-large-view-pressure.js +1 -1
  251. package/dist/queries/wrapper-candidates.d.ts +2 -2
  252. package/dist/queries/wrapper-candidates.js +1 -1
  253. package/dist/reindex-worker.js +26 -26
  254. package/dist/reindex.d.ts +14 -4
  255. package/dist/reindex.js +34 -38
  256. package/dist/runtime.d.ts +167 -18
  257. package/dist/runtime.js +3 -2
  258. package/dist/rust-semantic-session-server.js +1 -1
  259. package/dist/rust-semantic-session-worker.js +1 -1
  260. package/dist/rust-semantic-worker.js +1 -1
  261. package/dist/{scip-cli-kRpaexVJ.d.ts → scip-cli-Cc6c00-a.d.ts} +6 -2
  262. package/dist/watch-server.js +5 -5
  263. package/docs/AGENT_GUIDE.md +20 -4
  264. package/docs/AI_FAILURE_MODES.md +17 -17
  265. package/docs/API_EVOLUTION.md +71 -0
  266. package/docs/CLI_JSON_OUTPUT.md +168 -0
  267. package/docs/COMMAND_REFERENCE.md +10 -6
  268. package/docs/COMMITTED_RECORD_COMPATIBILITY.md +117 -0
  269. package/docs/CONFIGURATION_WRITE_SAFETY.md +130 -0
  270. package/docs/DETECTOR_GUIDE.md +46 -46
  271. package/docs/DURABILITY.md +103 -0
  272. package/docs/INDEX_GENERATIONS.md +121 -0
  273. package/docs/LOCK_PROTOCOL.md +133 -0
  274. package/docs/MAILBOX_LIFECYCLE.md +197 -0
  275. package/docs/REINDEX_METADATA_COMPATIBILITY.md +84 -0
  276. package/docs/RUST_DURABLE_SESSION_PROTOCOL.md +126 -0
  277. package/docs/SECURITY_MODEL.md +129 -0
  278. package/docs/TELEMETRY_RETENTION.md +77 -0
  279. package/docs/TIME_SEMANTICS.md +77 -0
  280. package/docs/WATCH_REFRESH_REQUESTS.md +110 -0
  281. package/docs/WINDOWS_SIDECAR_RELEASE.md +298 -0
  282. package/docs/analyzer-validation-ledger.md +24 -23
  283. package/docs/schemas/cli-json-envelope.schema.json +53 -0
  284. package/docs/schemas/cli-output-page.schema.json +104 -0
  285. package/docs/schemas/npm-release-state.schema.json +146 -0
  286. package/docs/schemas/outcome-event-record.schema.json +39 -0
  287. package/docs/schemas/project-config.schema.json +247 -0
  288. package/docs/schemas/suppression-record.schema.json +31 -0
  289. package/docs/schemas/windows-sidecar-provenance.schema.json +137 -0
  290. package/package.json +21 -10
  291. package/scripts/build-scip-windows.mjs +180 -61
  292. package/scripts/scip-windows-provenance.mjs +364 -0
  293. package/scripts/verify-scip-windows.mjs +29 -0
  294. package/skills/_shared/SKILL.md +90 -229
  295. package/skills/_shared/agents/openai.yaml +1 -1
  296. package/skills/_shared/references/agent-contract-catalog.md +105 -0
  297. package/skills/_shared/references/command-catalog.md +118 -0
  298. package/skills/_shared/references/detector-precision-and-diffgate.md +59 -0
  299. package/skills/_shared/references/evidence-and-dead-code.md +25 -0
  300. package/skills/scip-audit/SKILL.md +77 -0
  301. package/skills/scip-audit/agents/openai.yaml +4 -0
  302. package/skills/scip-audit/references/claims.md +98 -0
  303. package/skills/scip-audit/references/cleanup.md +101 -0
  304. package/skills/scip-audit/references/directory.md +222 -0
  305. package/skills/scip-audit/references/frontend.md +130 -0
  306. package/skills/scip-audit/references/integrity.md +154 -0
  307. package/skills/scip-audit/references/maintainability.md +162 -0
  308. package/skills/scip-audit/references/twin-drift.md +104 -0
  309. package/skills/scip-diagnose/SKILL.md +52 -0
  310. package/skills/scip-diagnose/agents/openai.yaml +4 -0
  311. package/skills/scip-diagnose/references/debug.md +117 -0
  312. package/skills/{scip-probe-reachability/SKILL.md → scip-diagnose/references/probe-reachability.md} +11 -27
  313. package/skills/scip-diagnose/references/root-cause.md +145 -0
  314. package/skills/scip-diagnose/references/triage.md +119 -0
  315. package/skills/scip-explore/SKILL.md +54 -85
  316. package/skills/scip-explore/agents/openai.yaml +2 -2
  317. package/skills/scip-explore/references/diagrams.md +40 -0
  318. package/skills/scip-explore/references/language-playbook.md +49 -0
  319. package/skills/scip-improve/SKILL.md +56 -0
  320. package/skills/scip-improve/agents/openai.yaml +4 -0
  321. package/skills/scip-improve/references/cleanup-batches.md +53 -0
  322. package/skills/scip-improve/references/directory-moves.md +53 -0
  323. package/skills/scip-improve/references/doc-reconcile.md +30 -0
  324. package/skills/scip-improve/references/frontend-extraction.md +39 -0
  325. package/skills/scip-improve/references/maintainability-mechanism.md +43 -0
  326. package/skills/scip-improve/references/twin-drift.md +35 -0
  327. package/skills/scip-plan/SKILL.md +68 -0
  328. package/skills/scip-plan/agents/openai.yaml +4 -0
  329. package/skills/scip-plan/references/api-impact.md +19 -0
  330. package/skills/scip-plan/references/conductor.md +41 -0
  331. package/skills/scip-plan/references/high-assurance.md +43 -0
  332. package/skills/scip-plan/references/hyper-optimization.md +50 -0
  333. package/skills/scip-plan/references/tla-model.md +88 -0
  334. package/skills/scip-query/SKILL.md +53 -98
  335. package/skills/scip-query/agents/openai.yaml +2 -2
  336. package/skills/scip-setup/SKILL.md +69 -181
  337. package/skills/scip-setup/agents/openai.yaml +3 -3
  338. package/skills/scip-setup/references/bootstrap-workflow.md +120 -0
  339. package/skills/scip-setup/references/language-verification.md +61 -0
  340. package/skills/scip-setup/references/lifecycle-commands.md +119 -0
  341. package/skills/scip-setup/references/per-repo-triage.md +24 -0
  342. package/skills/scip-verify/SKILL.md +126 -84
  343. package/skills/scip-verify/agents/openai.yaml +2 -2
  344. package/skills/scip-verify/references/calibrate-detectors.md +170 -0
  345. package/dist/chunk-2CTX5CMX.js +0 -4
  346. package/dist/chunk-2Y373BDD.js +0 -2
  347. package/dist/chunk-2YU7I3QO.js +0 -2
  348. package/dist/chunk-3MJ5YA4Y.js +0 -16
  349. package/dist/chunk-64RFXJT5.js +0 -16
  350. package/dist/chunk-7UY7SD7D.js +0 -927
  351. package/dist/chunk-B5NLK2B3.js +0 -6
  352. package/dist/chunk-C2QSK7E7.js +0 -2
  353. package/dist/chunk-C7NIYIQ4.js +0 -67
  354. package/dist/chunk-D4U5Q3FT.js +0 -7
  355. package/dist/chunk-DGAGY7RJ.js +0 -60
  356. package/dist/chunk-DLWR3NUU.js +0 -5
  357. package/dist/chunk-K2ERX4UT.js +0 -3
  358. package/dist/chunk-KHE7J5ZN.js +0 -3
  359. package/dist/chunk-L7SPDE73.js +0 -84
  360. package/dist/chunk-LHMNRHGV.js +0 -3
  361. package/dist/chunk-LM72NQ7T.js +0 -3
  362. package/dist/chunk-MSWVMDAH.js +0 -122
  363. package/dist/chunk-NH7WNNQC.js +0 -20
  364. package/dist/chunk-NPKYOIFM.js +0 -18
  365. package/dist/chunk-NZL2DBT7.js +0 -2
  366. package/dist/chunk-OMPZHGHO.js +0 -2
  367. package/dist/chunk-P2PC2WGR.js +0 -2
  368. package/dist/chunk-Q3AFUTGB.js +0 -8
  369. package/dist/chunk-QRGV2F7L.js +0 -2
  370. package/dist/chunk-TW4OG5FC.js +0 -4
  371. package/dist/chunk-U7DSEKOM.js +0 -30
  372. package/dist/chunk-V27BEQJN.js +0 -7
  373. package/dist/chunk-XAGAZSFE.js +0 -6
  374. package/dist/chunk-XBN5VO53.js +0 -2
  375. package/dist/chunk-YGAGTIDK.js +0 -11
  376. package/dist/command-descriptors-N2TL4XM2.js +0 -613
  377. package/dist/direct-navigation-DUCZCTOE.js +0 -3
  378. package/skills/scip-api-impact/SKILL.md +0 -140
  379. package/skills/scip-api-impact/agents/openai.yaml +0 -4
  380. package/skills/scip-calibrate/SKILL.md +0 -131
  381. package/skills/scip-calibrate/agents/openai.yaml +0 -4
  382. package/skills/scip-claim-audit/SKILL.md +0 -107
  383. package/skills/scip-claim-audit/agents/openai.yaml +0 -4
  384. package/skills/scip-cleanup-audit/SKILL.md +0 -130
  385. package/skills/scip-cleanup-audit/agents/openai.yaml +0 -4
  386. package/skills/scip-cleanup-improve/SKILL.md +0 -85
  387. package/skills/scip-cleanup-improve/agents/openai.yaml +0 -4
  388. package/skills/scip-concrete-plan/HIGH_ASSURANCE.md +0 -317
  389. package/skills/scip-concrete-plan/SKILL.md +0 -105
  390. package/skills/scip-concrete-plan/agents/openai.yaml +0 -4
  391. package/skills/scip-conductor/SKILL.md +0 -133
  392. package/skills/scip-conductor/agents/openai.yaml +0 -4
  393. package/skills/scip-debug/SKILL.md +0 -130
  394. package/skills/scip-debug/agents/openai.yaml +0 -4
  395. package/skills/scip-diagram/SKILL.md +0 -110
  396. package/skills/scip-diagram/agents/openai.yaml +0 -4
  397. package/skills/scip-directory-architecture/SKILL.md +0 -266
  398. package/skills/scip-directory-architecture/agents/openai.yaml +0 -4
  399. package/skills/scip-doc-reconcile/SKILL.md +0 -89
  400. package/skills/scip-doc-reconcile/agents/openai.yaml +0 -4
  401. package/skills/scip-hyper-optimization/SKILL.md +0 -156
  402. package/skills/scip-hyper-optimization/agents/openai.yaml +0 -4
  403. package/skills/scip-integrity-audit/SKILL.md +0 -152
  404. package/skills/scip-integrity-audit/agents/openai.yaml +0 -4
  405. package/skills/scip-language-playbook/SKILL.md +0 -106
  406. package/skills/scip-language-playbook/agents/openai.yaml +0 -4
  407. package/skills/scip-maintainability/SKILL.md +0 -158
  408. package/skills/scip-maintainability/agents/openai.yaml +0 -4
  409. package/skills/scip-probe-reachability/agents/openai.yaml +0 -4
  410. package/skills/scip-react-maintainability/SKILL.md +0 -101
  411. package/skills/scip-react-maintainability/agents/openai.yaml +0 -4
  412. package/skills/scip-root-cause/SKILL.md +0 -151
  413. package/skills/scip-root-cause/agents/openai.yaml +0 -4
  414. package/skills/scip-tla-model-system/SKILL.md +0 -148
  415. package/skills/scip-tla-model-system/agents/openai.yaml +0 -4
  416. package/skills/scip-triage-issue/SKILL.md +0 -133
  417. package/skills/scip-triage-issue/agents/openai.yaml +0 -4
  418. package/skills/scip-twin-drift/SKILL.md +0 -109
  419. package/skills/scip-twin-drift/agents/openai.yaml +0 -4
  420. package/skills/scip-vue-maintainability/SKILL.md +0 -107
  421. package/skills/scip-vue-maintainability/agents/openai.yaml +0 -4
@@ -1,52 +1,52 @@
1
1
  ---
2
2
  name: scip-verify
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.
3
+ description: Use after finishing a change and before committing: ensure the watcher has produced a fresh index generation, run the postchecks matching what you edited, diff-gate, and try to refute your own PASS — including verifying that a React or Vue refactor actually achieved the reuse it claimed. Also use to calibrate detector precision once a repo is already set up and its findings look too noisy or too clean. For an existing status claim with no just-finished diff, use scip-audit instead. Distinct from the `review` skill: that one reviews a branch against coding standards and the originating spec; this one runs freshness, routed postchecks and diff-gate checks on a change you just made.
4
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.'
5
+ - template: "scip-query doctor"
6
+ when: "Prove the workspace and configuration are usable before trusting evidence."
7
+ - template: "scip-query diff-impact --json"
8
+ when: "Compare changed files, symbols, and affected consumers with the intended diff."
9
+ - template: "scip-query diff-gate --json --compact"
10
+ when: "Run the complete finished-diff gate without blind line truncation."
17
11
  ---
18
12
 
19
13
  # scip-verify
20
14
 
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.
15
+ ## Purpose
22
16
 
23
- Load shared mechanics from [`../_shared/SKILL.md`](../_shared/SKILL.md).
17
+ Verification is the evidence pass that proves a finished change is wired,
18
+ safe, and regression-free: the workspace can answer, the index is current,
19
+ the changed symbols and files match intent, every postcheck the edit calls
20
+ for ran, and diff-gate findings are resolved. A PASS is the verdict nobody
21
+ re-checks, so the flow below ends by trying to break it before it's claimed.
22
+
23
+ Calibration is the companion problem: a detector tuned on one codebase's
24
+ conventions can be precise there and noisy elsewhere, so before any of the
25
+ above output is trusted on a repo, someone has to find out which it is.
26
+
27
+ Load shared mechanics — command syntax, the evidence contract, diff-gate's
24
28
 
25
29
  <!-- BEGIN GENERATED SKILL COMMANDS -->
26
30
  ## Commands for this skill
27
31
 
28
32
  | Command | Purpose | Returns | Coverage | When |
29
33
  | --- | --- | --- | --- | --- |
30
- | `scip-query doctor` | Diagnose config, index freshness, dependency readiness, and project capabilities | config, freshness, dependency, and capability diagnostics | `complete` | Prove the workspace: index freshness and dependency readiness. |
31
- | `scip-query status --capabilities` | Show index status for this project | freshness, generation, language shards, watcher, and optional capabilities | `complete` | 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 | changed symbols, downstream consumer identities, and impact paths | `bounded` | Assess the diff: changed symbols and downstream consumers. |
33
- | `scip-query diff-gate --json` | Gate the current diff: architecture regressions plus echo, migration, coordination, doc-drift, unused-param, and new-dead candidates; exit 1 on blocking findings | blocking findings with check id, message, and remediation; advisory findings; root-cause groups; changed file and symbol counts; process exit status (1 when blocking findings exist) | `bounded` | Run the gate: the primary blocker for diff-specific risk. |
34
- | `scip-query health --baseline` | Composite codebase health report with prioritized action list | health score, findings, priorities, baselines, and coverage notes | `bounded` | 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 | document paths, coupled code subjects, and history evidence | `bounded` | Check docs: run when docs, AGENTS.md, or command surfaces changed. |
34
+ | `scip-query doctor` | Diagnose config, index freshness, dependency readiness, and project capabilities | config, freshness, dependency, and capability diagnostics | `complete` | Prove the workspace and configuration are usable before trusting evidence. |
35
+ | `scip-query diff-impact --json` | Compute changed symbols and downstream consumers from current git diff | changed symbols, downstream consumer identities, and impact paths | `bounded` | Compare changed files, symbols, and affected consumers with the intended diff. |
36
+ | `scip-query diff-gate --json --compact` | Runtime-bounded, single-flight gate for the current diff: architecture regressions plus echo, migration, coordination, doc-drift, unused-param, and new-dead candidates; exit 1 on blocking findings | blocking findings with check id, message, and remediation; advisory findings; root-cause groups; changed file and symbol counts; process exit status (1 when blocking findings exist) | `bounded` | Run the complete finished-diff gate without blind line truncation. |
36
37
 
37
38
  Use this shortlist first. Open [`../_shared/SKILL.md`](../_shared/SKILL.md) only when it is insufficient.
38
39
  <!-- END GENERATED SKILL COMMANDS -->
40
+ ten checks, detector-precision tiers — from `_shared`. This skill's own
41
+ shortlist covers `doctor`, `status`, `diff-impact`, `diff-gate`, `health`,
42
+ `doc-drift`, `self-audit`, `suppress`, and `config-validate`.
39
43
 
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
- 6. A PASS ends scrutiny, so it must survive refutation first: construct the cheapest checks that could still break this diff and run them before claiming PASS. A FAIL needs no refutation — report it with the evidence.
44
+ | Situation | Go to |
45
+ | --- | --- |
46
+ | You just finished editing and need to verify it before committing | Verify a finished change, below |
47
+ | Findings on this repo feel too noisy, too clean, or you're adopting scip-query in a new repo | [`references/calibrate-detectors.md`](references/calibrate-detectors.md) |
48
48
 
49
- ## Flow
49
+ ## Verify a finished change
50
50
 
51
51
  ### 1. Prove the workspace
52
52
 
@@ -55,7 +55,14 @@ scip-query doctor
55
55
  scip-query status --capabilities
56
56
  ```
57
57
 
58
- This step is complete only when missing indexers, invalid config, stale indexes, or unavailable relevant capabilities are fixed or reported as blockers.
58
+ Apply `_shared`'s freshness gate here: if the watcher is already refreshing or
59
+ has accepted a refresh request, wait and check once more rather than launching
60
+ a parallel reindex. Use manual `scip-query reindex` only when the index is
61
+ stale, missing, or unknown and the watcher is disabled, unavailable, or failed.
62
+
63
+ Complete only when missing indexers, invalid config, stale indexes, or
64
+ unavailable relevant capabilities are fixed or reported as blockers. Verify
65
+ environment and index freshness before trusting any graph fact that follows.
59
66
 
60
67
  ### 2. Assess the diff
61
68
 
@@ -63,31 +70,40 @@ This step is complete only when missing indexers, invalid config, stale indexes,
63
70
  scip-query diff-impact --json
64
71
  ```
65
72
 
66
- Compare changed files, changed symbols, and downstream consumers with the intended work. Unexpected blast radius is a finding even if later gates pass.
67
-
68
- This step is complete only when the diff shape is understood.
73
+ Compare changed files, changed symbols, and downstream consumers against the
74
+ intended work. An unexpected blast radius is itself a finding even if every
75
+ later gate passes. Complete only when the diff's shape is understood.
69
76
 
70
77
  ### 3. Run routed postchecks
71
78
 
72
- Run every row matching what the diff actually did — not only the check you expected to need:
73
-
74
- | Change made | Check |
75
- | ------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- |
76
- | Extracted a helper or abstraction | `scip-query incomplete-migration` |
77
- | Added a helper, module, component, hook, composable, or adapter | `scip-query recent-duplicates` (and `similar <symbol>`) |
78
- | Added parameters, options, props, config flags, or option objects | `scip-query unused-params` |
79
- | Added a wrapper, facade, forwarding layer, alias, or re-export | `scip-query wrapper-candidates`, `passthrough-candidates`, `redundant-reexports` |
80
- | Added an interface, base class, adapter contract, or type alias | `scip-query stale-abstractions` |
81
- | Changed schema, config, generated files, public contracts, command descriptors, or docs-backed behavior | `scip-query co-change <file>` and `doc-drift` |
82
- | Deleted code | `scip-query cleanup-plan --verify` |
83
- | Changed React components or hooks | the React commands in the shared reference |
84
- | Changed Vue SFCs or composables | the Vue commands in the shared reference |
79
+ Run every row that matches what the diff actually did — not only the check
80
+ you expected to need going in:
81
+
82
+ | Change made | Check |
83
+ | --- | --- |
84
+ | Extracted a helper or abstraction | `scip-query incomplete-migration` |
85
+ | Added a helper, module, component, hook, composable, or adapter | `scip-query recent-duplicates` (and `similar <symbol>`) |
86
+ | Added parameters, options, props, config flags, or option objects | `scip-query unused-params` |
87
+ | Added a wrapper, facade, forwarding layer, alias, or re-export | `scip-query wrapper-candidates`, `passthrough-candidates`, `redundant-reexports` |
88
+ | Added an interface, base class, adapter contract, or type alias | `scip-query stale-abstractions` |
89
+ | Changed schema, config, generated files, public contracts, command descriptors, or docs-backed behavior | `scip-query co-change <file>` and `doc-drift` |
90
+ | Deleted code | `scip-query cleanup-plan --verify` |
91
+ | Changed React components or hooks | the React commands in `_shared` |
92
+ | Changed Vue SFCs or composables | the Vue commands in `_shared` |
93
+
94
+ Add `--json --full` to any of these when an unbounded machine-readable result
95
+ is needed rather than the bounded default. This table is authoritative — the
96
+ shared reference links here instead of duplicating it, so don't assume a
97
+ different mapping. Complete only when each applicable postcheck has a result
98
+ and every actionable finding is fixed, accepted with evidence, or blocked by
99
+ a named constraint.
100
+
101
+ If `.scipquery.json` or a suppression file changed as part of the diff, also
102
+ run:
85
103
 
86
- Add `--json --full` when you need an unbounded machine-readable result rather than the default.
87
- This is the authoritative edit-to-postcheck mapping; the shared reference links here instead of
88
- duplicating it.
89
-
90
- 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.
104
+ ```bash
105
+ scip-query config-validate
106
+ ```
91
107
 
92
108
  ### 4. Run the gate
93
109
 
@@ -95,93 +111,119 @@ This step is complete only when each applicable postcheck has a result and every
95
111
  scip-query diff-gate --json
96
112
  ```
97
113
 
98
- If it reports findings, fix them or record the acceptance reason. If a suppression is needed:
114
+ This is the primary blocker for diff-specific risk: architecture regressions
115
+ plus echo, migration, coordination, doc-drift, unused-param, and new-dead
116
+ candidates, exiting 1 on blocking findings. Fix findings or record the
117
+ acceptance reason. Prefer fixing a real finding over suppressing it — only
118
+ suppress intentional design, compatibility shims, framework entry points, or
119
+ an accepted false positive, and only with a specific reason:
99
120
 
100
121
  ```bash
101
122
  scip-query suppress <id> --reason "<specific reason>"
102
123
  ```
103
124
 
104
125
  `suppress` writes one file per suppression under `.scipquery/suppressions/` —
105
- commit that file with your change. Suppressing is a real decision, not a
106
- bypass: every suppression counts against that detector's precision in
107
- `scip-query effectiveness`, while a rerun against the same resolved comparison
108
- base earns verified credit. After `HEAD` advances, a clean run replays that
109
- stored base automatically. Prefer the fix whenever the finding is real.
126
+ commit it with the change that produced it. Suppressing is a real decision,
127
+ not a bypass: every suppression counts against that detector's precision in
128
+ `scip-query effectiveness`. A rerun against the same resolved comparison base
129
+ earns verified credit instead; once `HEAD` advances, a clean run replays that
130
+ stored base automatically. Complete only when `diff-gate` passes or every
131
+ finding has a durable explanation.
110
132
 
111
- This step is complete only when `diff-gate` passes or every finding has a durable explanation.
133
+ ### 5. Check health, docs, and generated surfaces when relevant
112
134
 
113
- ### 5. Check health, docs, and config when relevant
114
-
115
- Run:
135
+ Run
116
136
 
117
137
  ```bash
118
138
  scip-query health --baseline
119
139
  ```
120
140
 
121
- when a committed baseline exists. If docs, AGENTS.md, CLAUDE.md, command docs, generated docs, or skill instructions changed, run:
141
+ when a committed baseline exists. If docs, AGENTS.md, CLAUDE.md, command
142
+ docs, generated docs, or skill instructions changed, run
122
143
 
123
144
  ```bash
124
145
  scip-query doc-drift --json --full
125
146
  ```
126
147
 
127
- If the repository provides a self-audit command and the change touches generated command surfaces, analyzers, or evidence-labeling behavior, also run:
148
+ and read the returned stale-doc candidates against the diff.
149
+
150
+ If the change touches generated command surfaces, detectors/analyzers, or
151
+ evidence-labeling behavior, also run
128
152
 
129
153
  ```bash
130
154
  scip-query self-audit
131
155
  ```
132
156
 
133
- This step is complete only when changed documentation and config surfaces are checked or explicitly out of scope.
157
+ It scores scip-query's own cheap evidence paths (source-fallback, regex)
158
+ against the best available semantic/compiler oracle on sampled symbols. Read
159
+ whether the surface you just changed still agrees with the oracle at the
160
+ sampled sites before trusting its output elsewhere in this flow — a
161
+ regression here means every downstream postcheck may be reading
162
+ degraded evidence, not just this one command.
134
163
 
135
- ### 6. Refute the PASS
164
+ Complete only when changed documentation and config surfaces are checked or
165
+ explicitly declared out of scope.
136
166
 
137
- A PASS is the verdict nobody re-checks — attack it before making it. Construct at least two refutation attempts and run the cheapest check that would expose each. Prefer executed probes (run the consumer's test, invoke the command, feed the edge input) over argued ones. Pick attacks that fit the diff:
167
+ ### 6. Refute the PASS
138
168
 
139
- - an unexercised consumer: a caller in `diff-impact` output whose tests did not run — run them, or trace the contract it depends on;
140
- - an unexercised input: an edge the changed code newly handles or newly rejects — execute it;
141
- - the intent gap: one case the stated goal implies that the diff does not visibly cover — find where it is handled or show it missing.
169
+ A PASS ends scrutiny, so attack it before making it. Construct at least two
170
+ refutation attempts and run the cheapest check that would expose each. Prefer
171
+ an executed probe — run the consumer's test, invoke the command, feed the
172
+ edge input — over an argued one. Pick attacks that fit the diff:
142
173
 
143
- Record every attempt; an attempt that breaks the diff converts the verdict to FAIL with a finding, and the attempt stays in the record either way.
174
+ - **Unexercised consumer** — take a caller from step 2's `diff-impact` output
175
+ whose tests did not run, and either run them or trace the contract it
176
+ depends on.
177
+ - **Unexercised input** — find an edge the changed code newly handles or
178
+ newly rejects, and execute it.
179
+ - **The intent gap** — find one case the stated goal implies that the diff
180
+ does not visibly cover, then show where it's handled or show it's missing.
144
181
 
145
- This step is complete only when every refutation attempt has an executed result.
182
+ Record every attempt. An attempt that breaks the diff converts the verdict to
183
+ FAIL with a finding; the attempt stays in the record either way. Complete
184
+ only when every refutation attempt has an executed result.
146
185
 
147
- ## Report
186
+ ### Report
148
187
 
149
- End with:
188
+ End with this fixed template:
150
189
 
151
190
  ```markdown
152
191
  Verification: PASS/FAIL — <n> postchecks, <m> refutation attempts, <k> broke
153
192
 
154
193
  Environment:
155
-
156
194
  - doctor:
157
195
  - status:
158
196
 
159
197
  Diff:
160
-
161
198
  - changed files/symbols:
162
199
  - unexpected blast radius:
163
200
 
164
201
  Postchecks:
165
-
166
202
  - <command>: <result>
167
203
 
168
204
  Gate:
169
-
170
205
  - `scip-query diff-gate --json`: <result>
171
206
 
172
- Health/docs/config:
173
-
207
+ Health/docs/self-audit:
174
208
  - <commands and results>
175
209
 
176
210
  Refutation attempts:
177
-
178
211
  - R1: <attack> → survived (evidence) | broke (finding)
179
212
 
180
213
  Remaining risk:
181
-
182
214
  - <accepted findings, unavailable capabilities, or checks not run>
183
215
  ```
184
216
 
185
- Do not claim ready-to-ship unless freshness is `fresh` after the final edit, diff-gate is passed or fully explained, and the PASS survived every refutation attempt.
217
+ Do not claim ready-to-ship unless index freshness is `fresh` after the final
218
+ edit, `diff-gate` is passed or fully explained, and the PASS survived every
219
+ refutation attempt.
220
+
221
+ ### Detector reliability for this flow
186
222
 
187
- - `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`.
223
+ `dead`/`new-dead` correctly resolve `import type` consumers, tsconfig
224
+ `paths` aliases, pnpm/npm/yarn workspace cross-package imports, and Vue
225
+ `<script setup>` composables — these are not sources of false positives. The
226
+ one residual gap is a same-named symbol reached only through a re-exporting
227
+ barrel file in a workspace package; that shape self-labels `unconfirmed
228
+ (cross-package ambiguous-name resolution gap)` in the finding, and only that
229
+ specific label should be treated as unconfirmed until `refs` agrees.
@@ -1,4 +1,4 @@
1
1
  interface:
2
2
  display_name: "SCIP Verify"
3
- short_description: "Verify changes with SCIP diff gates"
4
- default_prompt: "Use $scip-verify to verify this change with reindexing, routed postchecks, and diff-gate."
3
+ short_description: "Verify a finished change before it ships"
4
+ default_prompt: "Use $scip-verify to confirm this change is wired, safe and regression-free before committing it."
@@ -0,0 +1,170 @@
1
+ # Calibrate detectors
2
+
3
+ Use this when adopting scip-query in a new or foreign codebase, after major
4
+ detector changes, when a health score or gate output seems too noisy or too
5
+ clean, or before letting `diff-gate` block anyone's work.
6
+
7
+ ## The stance
8
+
9
+ A detector tuned on one codebase's conventions can be precise there and
10
+ noisy elsewhere. Calibration finds out which, on this repo, and converts
11
+ every noise archetype into either a repo-side knob or an upstream detector
12
+ bug. A health score that hasn't been calibrated is a number, not a fact:
13
+ never present detector output from an uncalibrated repo as findings —
14
+ present it as candidate findings pending classification. A calibrated score
15
+ has to earn trust the same way a checker earns it in the integrity scenario
16
+ of `scip-audit`:
17
+ by being witnessed telling the truth on samples verified by hand.
18
+
19
+ Run all five stages below. Each has a checkable completion criterion — don't
20
+ move on until it's met.
21
+
22
+ ## Stage 1 — Index and inventory
23
+
24
+ ```bash
25
+ scip-query reindex
26
+ scip-query status --capabilities
27
+ ```
28
+
29
+ Record which languages got which evidence tier (SCIP-indexed vs
30
+ source-fallback vs regex): a detector's expected precision differs per tier,
31
+ and a repo that is 80% fallback-tier must be judged against fallback
32
+ expectations, not SCIP-tier expectations. Note the monorepo shape
33
+ (workspaces, cross-package imports) — historically the single largest
34
+ false-positive source is `dead`/`new-dead` findings on cross-package
35
+ consumers.
36
+
37
+ Complete only when languages, evidence tiers, and workspace shape are
38
+ written down.
39
+
40
+ ## Stage 2 — Battery sweep
41
+
42
+ Run the full detector battery and don't react to any of the numbers yet —
43
+ big counts here are sampling frames, not findings:
44
+
45
+ ```bash
46
+ scip-query health --json
47
+ scip-query dead --json
48
+ scip-query similar <symbol>
49
+ scip-query twin-drift -s <scope> --json
50
+ ```
51
+
52
+ Complete only when every detector's finding count is recorded.
53
+
54
+ ## Stage 3 — Retro-gate replay
55
+
56
+ Replay the gate against the last 15-20 real commits, using a worktree per
57
+ commit — never the user's live tree:
58
+
59
+ ```bash
60
+ scip-query diff-gate --base <commit> --json
61
+ ```
62
+
63
+ This is the stage that exposes finding WALLS: one hub file or one convention
64
+ mismatch generating dozens of near-identical findings per commit. A finding
65
+ wall is always either a missing repo knob or a detector bug — it is never
66
+ simply "the repo is just bad."
67
+
68
+ Complete only when per-commit finding counts and every wall are recorded.
69
+
70
+ ## Stage 4 — Sample and classify
71
+
72
+ This is the actual calibration. For each detector with findings: sample
73
+ about 10 of them (all of them if fewer), read the code at each cited site,
74
+ and classify actionable vs noise.
75
+
76
+ - Classify from the code, never from the finding text. A finding that
77
+ sounds plausible and a finding that is true are different things, and the
78
+ difference is only visible at the cited file and line.
79
+ - For every noise finding, name the archetype (e.g. "type-only import
80
+ invisible to indexer", "delegation chain flagged as twin", "generic
81
+ shared helpers saturating similarity"). Archetypes are the deliverable —
82
+ a noise rate without archetypes cannot be fixed.
83
+
84
+ Give each detector a verdict: **keep** (precision acceptable), **retune**
85
+ (name the threshold and the value), or **demote to advisory** for this repo.
86
+
87
+ Complete only when every detector has sampled precision, named archetypes,
88
+ and a verdict.
89
+
90
+ ## Stage 5 — Tune the knobs, file the bugs
91
+
92
+ Apply repo-side fixes for what belongs to the repo, and file upstream for
93
+ what belongs to the detector:
94
+
95
+ - `.scipquery.json` suppressions — one per accepted finding, each with a
96
+ reason. A reasonless suppression is hiding, not tuning.
97
+ - `docs.snapshotPaths` — mark dated/archival docs that must never generate
98
+ doc-reference findings.
99
+ - Coverage contracts — declare enumerations the gate should police.
100
+ - `commandAnalysisBudget` — cap analysis honestly on very large indexes.
101
+
102
+ Validate any config change:
103
+
104
+ ```bash
105
+ scip-query config-validate
106
+ ```
107
+
108
+ Detector bugs — noise archetypes no config knob can express — go to the
109
+ tool's followup ledger with the archetype, a concrete example, and the
110
+ sampled rate. Never tune a threshold to hide an archetype; that trades
111
+ visible noise for invisible blindness. File it and live with the noise
112
+ until it's fixed.
113
+
114
+ Confirm the repair:
115
+
116
+ ```bash
117
+ scip-query diff-gate --json
118
+ ```
119
+
120
+ run before and after, to check it worked.
121
+
122
+ Complete only when the stage-3 gate replay re-runs materially quieter and
123
+ every remaining finding class is actionable, suppressed-with-reason, or
124
+ filed upstream.
125
+
126
+ ## Failure modes
127
+
128
+ Each of these has been observed in a real calibration:
129
+
130
+ - **Sampling too few.** One good finding does not make a detector precise;
131
+ one bad finding does not make it noise. Ten samples per detector is the
132
+ floor.
133
+ - **Classifying from the finding text.** The finding always sounds right —
134
+ it was generated to. Only the code knows.
135
+ - **Tuning to green.** Raising a threshold until the noise disappears also
136
+ disappears the real findings. If the archetype is a detector bug, file it
137
+ and live with the noise rather than tuning it away.
138
+ - **Trusting a clean run.** Zero findings on a detector can mean precision,
139
+ or it can mean the detector cannot see this repo's conventions at all
140
+ (wrong import style, unindexed language). Verify at least one known-true
141
+ positive per major detector — plant one if none exists.
142
+ - **Calibrating the wrong tree.** Use clones or worktrees for anything that
143
+ mutates during calibration. The target repo is read-only unless its owner
144
+ said otherwise.
145
+
146
+ ## After calibration
147
+
148
+ The finding-outcome ledger keeps calibrating automatically. Once the repo
149
+ uses `diff-gate`, per-detector precision is recomputed from real outcomes as
150
+ `detectorPrecision` in `health --json`. The committed event ledger under
151
+ `.scipquery/events/*.json` makes those outcomes durable and queryable:
152
+
153
+ ```bash
154
+ scip-query effectiveness --since 30d --json
155
+ ```
156
+
157
+ reports, per check, caught / comparison-verified-fixed / suppressed / open /
158
+ unverified counts, precision, and median days-to-fix, sourced from those
159
+ individual records.
160
+
161
+ If `HEAD` advances during or after calibration, use a clean worktree so
162
+ scip-query can replay the stored comparison base instead of mistaking an
163
+ empty diff for a fix. Re-run this protocol only after major detector
164
+ upgrades, or when the ledger's precision numbers drift from what was
165
+ measured previously.
166
+
167
+ Write the calibration report to
168
+ `docs/validation/YYYY-MM-DD-external-calibration-<repo>.md`, shaped like the
169
+ exemplars this protocol was distilled from: battery table, retro-gate walls,
170
+ per-detector verdicts, noise archetypes, caps and deviations.
@@ -1,4 +0,0 @@
1
- import{a as O,c as X}from"./chunk-LM72NQ7T.js";import{a as I}from"./chunk-7B3UPBVA.js";import{d as G,g as N,s as B,v as J,x as K}from"./chunk-L7SPDE73.js";import{a as V}from"./chunk-64MNV6AB.js";import{execFileSync as Z}from"child_process";import{existsSync as L,readFileSync as je}from"fs";import{createRequire as xe}from"module";import{platform as Q}from"os";import{dirname as Y,join as R}from"path";var Fe=xe(import.meta.url),At={language:"rust",indexerBinary:"rust-analyzer",installUrl:"https://github.com/rust-lang/rust-analyzer"};function W(t){return[t.indexerBinary,...t.binaryAliases??[]]}function Pe(t){let e=W(t);return e.length===1?e[0]:e.join(" or ")}function _(t){for(let e of W(t))if(Q()==="win32"){let n=X(e);if(n)return n}else if(O(e))return e;return Re(t)}function Et(t){return _(t)!==null||Ie(t)}function Ie(t){return ee(t)!==null}function Re(t){let e=ee(t);if(!e)return null;let r=JSON.parse(je(e,"utf8")).bin;if(!r)return null;if(typeof r=="string")return R(Y(e),r);for(let i of W(t)){let s=r[i];if(s)return R(Y(e),s)}return null}function ee(t){if(!t.bundledNpmPackage)return null;try{return Fe.resolve(`${t.bundledNpmPackage}/package.json`)}catch{return null}}function Te(t,e){for(let n of t.projectLocalBinaries??[]){let r=R(e,n);if(L(r))return r}return null}function ve(t,e){return Te(t,e)??_(t)}function Dt(t,e=process.env,n=t.indexerBinary){if(t.indexerBinary!=="scip-dotnet"||$(n,e))return e;let r=te(n,e);return r?{...e,DOTNET_ROOT:r}:e}function Nt(t,e){let n=Pe(t),r=e?ve(t,e):_(t);if(!r)return{language:t.language,binaryLabel:n,installed:!1,runnable:!1,resolvedBinary:null,installUrl:t.installUrl};if(t.indexerBinary!=="scip-dotnet")return{language:t.language,binaryLabel:n,installed:!0,runnable:!0,resolvedBinary:r};let i=ke(r);return{language:t.language,binaryLabel:n,installed:!0,runnable:i.runnable,resolvedBinary:r,installUrl:t.installUrl,note:i.note}}function ke(t){if($(t,process.env))return{runnable:!0};let e=te(t,process.env);if(e)return{runnable:!0,note:`using .NET 9 runtime from ${e}`};let n=ne(process.env);return{runnable:!1,note:n.length>0?`.NET 9 runtime still unavailable after checking ${n.join(", ")}`:"binary is present, but scip-dotnet still needs a .NET 9 runtime"}}function te(t,e){for(let n of ne(e))if($(t,{...e,DOTNET_ROOT:n}))return n;return null}function ne(t){let e=[],n=t.DOTNET_ROOT;if(n&&L(n)&&e.push(n),Q()==="darwin"&&O("brew"))try{let r=Z("brew",["--prefix","dotnet@9"],{stdio:"pipe",env:t}).toString().trim(),i=R(r,"libexec");L(i)&&!e.includes(i)&&e.push(i)}catch{}return e}function $(t,e){try{return Z(t,["--version"],{stdio:"pipe",env:e}),!0}catch{return!1}}function Ot(t){try{return process.kill(t,0),!0}catch(e){return typeof e=="object"&&e!==null&&"code"in e&&e.code==="EPERM"}}import{mkdirSync as we,renameSync as Ce,writeFileSync as Me}from"fs";import{dirname as Ae}from"path";function $t(t,e,n={}){we(Ae(t),{recursive:!0});let r=`${t}.${process.pid}.${Date.now()}.tmp`,i=JSON.stringify(e,null,n.spacing);Me(r,n.trailingNewline?`${i}
2
- `:i),Ce(r,t)}function z(t,e){let n=t.split("/").at(-1)??t;if(ce.has(n)||n===".scipquery.json"||/^tsconfig(?:\..+)?\.json$/.test(n))return"config";if(/\.d\.(?:ts|mts|cts)$/.test(t.toLowerCase()))return"ambient";let r=t.includes(".")?`.${t.split(".").at(-1).toLowerCase()}`:"";return e.some(i=>(pe[i]??[]).includes(r))?"source":"other"}function oe(t,e,n){let r=t.split("/").at(-1)??t;if(n?.includes(t)||n?.includes(r)||ce.has(r))return!0;let i=t.includes(".")?`.${t.split(".").at(-1).toLowerCase()}`:"";return(pe[e]??[]).includes(i)}function ae(t){if(typeof t!="object"||t===null)return null;let e=t;return typeof e.version!="number"||!re(e.languages)||typeof e.pnpmWorkspaces!="boolean"||typeof e.typescriptProjectMode!="string"||!re(e.typescriptProjects)||e.clojureConfigPath!==void 0&&typeof e.clojureConfigPath!="string"||!Array.isArray(e.files)||!e.files.every(Ee)?null:e}function Ut(t,e){let n=new Map((t?.files??[]).map(a=>[a.path,a])),r=new Map(e.files.map(a=>[a.path,a])),i=new Set([...n.keys(),...r.keys()]),s=[];for(let a of[...i].sort()){let p=n.get(a),u=r.get(a),d=z(a,e.languages);!p&&u?s.push({kind:"added",path:a,inputKind:d,after:u}):p&&!u?s.push({kind:"deleted",path:a,inputKind:d,before:p}):p&&u&&(p.hash!==u.hash||p.size!==u.size)&&s.push({kind:"modified",path:a,inputKind:d,before:p,after:u})}let o=new Set;return t||o.add("prior-snapshot-unavailable"),t&&t.version!==e.version&&o.add("snapshot-version-changed"),(ie(t?.files??[])||ie(e.files))&&o.add("duplicate-input-path"),[...t?.files??[],...e.files].some(De)&&o.add("unreadable-input"),{version:1,changes:s,projectIdentityChanged:t?!Ne(t,e):!0,uncertainty:[...o].sort()}}function re(t){return Array.isArray(t)&&t.every(e=>typeof e=="string")}function ie(t){return new Set(t.map(e=>e.path)).size!==t.length}function Ee(t){if(typeof t!="object"||t===null)return!1;let e=t;return typeof e.path=="string"&&typeof e.size=="number"&&typeof e.hash=="string"}function De(t){return t.hash==="unreadable"||t.size<0}function Ne(t,e){return se(t.languages,e.languages)&&t.pnpmWorkspaces===e.pnpmWorkspaces&&t.typescriptProjectMode===e.typescriptProjectMode&&se(t.typescriptProjects,e.typescriptProjects)&&t.clojureConfigPath===e.clojureConfigPath}function se(t,e){if(t.length!==e.length)return!1;let n=[...t].sort(),r=[...e].sort();return n.every((i,s)=>i===r[s])}var ce=new Set(["package.json","package-lock.json","pnpm-lock.yaml","yarn.lock","bun.lockb","tsconfig.json","tsconfig.base.json","pyproject.toml","setup.py","setup.cfg","Cargo.toml","Cargo.lock","go.mod","go.sum","pom.xml","build.gradle","build.gradle.kts","build.sbt","compile_commands.json","CMakeLists.txt","Makefile","Gemfile","Gemfile.lock","composer.json","composer.lock","pubspec.yaml","pubspec.lock","deps.edn","project.clj","bb.edn","shadow-cljs.edn"]),pe={typescript:[".ts",".tsx",".mts",".cts"],javascript:[".js",".jsx",".mjs",".cjs"],java:[".java"],scala:[".scala"],kotlin:[".kt",".kts"],rust:[".rs"],python:[".py",".pyi"],ruby:[".rb"],go:[".go"],cpp:[".cc",".cpp",".cxx",".hpp",".hh",".hxx"],c:[".c",".h"],csharp:[".cs"],vb:[".vb"],dart:[".dart"],php:[".php"],clojure:[".clj",".cljs",".cljc"]};import{execFileSync as Be}from"child_process";import{createHash as le}from"crypto";import{lstatSync as Oe,readdirSync as Le,readFileSync as We,readlinkSync as _e,realpathSync as ue}from"fs";import{isAbsolute as $e,join as de,relative as ze,sep as Ue}from"path";function He(t){return[...new Set((t??[]).map(e=>e.trim()).filter(Boolean))].sort((e,n)=>e.localeCompare(n))}function qe(t){return(Je(t)??Ke(t)).filter(e=>e&&!fe(e)).sort()}function Ge(t,e={}){let n=qe(t).filter(i=>!e.language||oe(i,e.language,e.markerFiles)).filter(i=>!e.includePath||e.includePath(i)),r=ue(t);return n.map(i=>{let s=de(t,i);try{if(Oe(s).isSymbolicLink()){let a=ue(s),p=ze(r,a);if(p===".."||p.startsWith(`..${Ue}`)||$e(p))throw new Error("external symlink");let u=_e(s);return{path:i,size:Buffer.byteLength(u),hash:le("sha256").update("symlink\0").update(u).digest("hex")}}let o=We(s);return{path:i,size:o.byteLength,hash:le("sha256").update(o).digest("hex")}}catch{return{path:i,size:-1,hash:"unreadable"}}})}function Xt(t,e,n){return{version:2,languages:[...e].sort(),pnpmWorkspaces:n.typescriptProjectMode!=="workspace"&&n.pnpmWorkspaces===!0,typescriptProjectMode:n.typescriptProjectMode??"single",typescriptProjects:He(n.typescriptProjects),clojureConfigPath:Ve(n.clojureConfigPath),files:Ge(t)}}function Ve(t){return t?.trim()||void 0}function Je(t){try{return Be("git",["-C",t,"ls-files","-co","--exclude-standard","--","."],{encoding:"utf-8",maxBuffer:50*1024*1024,stdio:["ignore","pipe","ignore"]}).split(`
3
- `).filter(Boolean)}catch{return null}}function Ke(t){let e=[],n=[""];for(;n.length>0;){let r=n.pop(),i=r?de(t,r):t,s;try{s=Le(i,{withFileTypes:!0})}catch{continue}for(let o of s){let a=r?`${r}/${o.name}`:o.name;if(o.isDirectory()){fe(a)||n.push(a);continue}e.push(a)}}return e}function fe(t){let e=t.split("/");return t==="meta.json"||e.some(n=>Xe.has(n))||t.endsWith(".db")||t.endsWith(".db-wal")||t.endsWith(".db-shm")||t.endsWith(".scip")}var Xe=new Set([".git","node_modules",".scipquery-cache",".scipquery-generations",".stryker-tmp","dist","build","coverage",".next",".nuxt","target"]);import{readFileSync as rt}from"fs";import{dirname as it,join as st}from"path";var Ye=[".ts",".tsx",".mts",".cts",".js",".jsx",".mjs",".cjs"];function T(t){let e=t.toLowerCase();return Ye.some(n=>e.endsWith(n))}function k(t){let e=v(t.projectFiles),n=new Set(e),r=new Map(t.snapshot.files.map(c=>[c.path,c])),i=t.snapshot.files.filter(c=>{let f=z(c.path,["typescript"]);return f==="config"||f==="ambient"}).map(c=>c.path),s=v([...e,...i]),o=s.find(c=>!r.has(c)),a=new Set(t.snapshot.files.map(c=>c.path)).size!==t.snapshot.files.length,p=!o&&s.some(c=>me(r.get(c))),u=N(JSON.stringify({pnpmWorkspaces:t.snapshot.pnpmWorkspaces,typescriptProjectMode:t.snapshot.typescriptProjectMode,typescriptProjects:v(t.snapshot.typescriptProjects),membership:e})),d=new Map;return{identityFor(c,f){if(!n.has(c))return b("target-outside-project");if(a)return b("duplicate-input-path");if(o)return b("missing-input-fingerprint");if(p)return b("unreadable-input");let h=[],l,S;if(t.graph===null)h.push("dependency-graph-unavailable"),S="whole-project",l=s;else{let P=Qe(c,t.graph,d);if(P.find(D=>!r.has(D)))return b("missing-input-fingerprint");if(l=v([...P,...i]),l.some(D=>me(r.get(D))))return b("unreadable-input");S="dependency-closure"}let F=l.map(P=>et(r.get(P)));return{version:1,key:N(JSON.stringify({version:1,engineIdentity:t.engineIdentity,schemaVersion:f,projectIdentity:u,inputs:F})),mode:S,inputFiles:l,reasons:h}}}}function Ze(t,e){let n=new Set,r=[t];for(let i=0;i<r.length;i+=1){let s=r[i];if(!(s===void 0||n.has(s))){n.add(s);for(let o of[...e.get(s)??[]].sort())n.has(o)||r.push(o)}}return[...n].sort()}function Qe(t,e,n){let r=n.get(t);if(r)return r;let i=Ze(t,e);return n.set(t,i),i}function et(t){return{path:t.path,size:t.size,hash:t.hash}}function me(t){return t.size<0||t.hash==="unreadable"}function b(t){return{version:1,key:null,mode:"unkeyed",inputFiles:[],reasons:[t]}}function v(t){return[...new Set(t)].sort()}import{createRequire as tt}from"module";var ge=tt(import.meta.url),j,w;function nt(){if(j!==void 0)return j;try{j=ge("ts-morph")}catch{j=null}return j}function C(){if(w)return w;let t=nt();if(!t)return"ts-morph:unavailable";let e="unknown";try{e=ge("ts-morph/package.json").version??"unknown"}catch{}return w=`ts-morph:${e}:typescript:${t.ts.version}`,w}function rn(t,e){return e.map(n=>({tsconfigPath:n,project:new t.Project({tsConfigFilePath:n,skipFileDependencyResolution:!0})}))}function sn(t,e,n){return{language:"typescript",availability:()=>({available:!1,reason:t,tsconfigPath:e,tsconfigPaths:n}),importUsage:()=>[],referencesFor:()=>[],calleesFor:()=>[],signatureFor:()=>null}}var ot=G("typescript-semantic-identity-context",{clearGroups:["whole-project"]});function U(t,e,n){let r=ot.get(t,()=>at(t));if(!r)return null;let i=`${n}\0${e}`,s=r.identities.get(i);if(s)return s;let o=r.builder.identityFor(e,n);return r.identities.set(i,o),o}function x(t){return V(t,{includeIgnored:!1}).filter(T).sort()}function at(t){try{let e=JSON.parse(rt(st(it(t.config.dbPath),"meta.json"),"utf8")),n=ae(e.fingerprint);return n?{builder:k({projectFiles:x(t),snapshot:n,graph:I(t),engineIdentity:C()}),identities:new Map}:null}catch{return null}}function M(t,e){let n=new Map(t.map(i=>[i.symbol,i])),r=new Map(t.map(i=>[i.symbolId,[]]));for(let i of e.values())for(let s of i){let o=n.get(s.targetSymbol);o&&r.get(o.symbolId).push(s.location)}for(let[i,s]of r)r.set(i,ct(s));return r}function Se(t,e,n){let r=he(t,e),i=he(t,n),s=[...r].filter(c=>!i.has(c)).sort(),o=[...i].filter(c=>!r.has(c)).sort(),a=ye(t,e),p=ye(t,n),u=[...a].filter(c=>!p.has(c)).sort(),d=[...p].filter(c=>!a.has(c)).sort();return{passed:s.length===0&&o.length===0,expectedCount:r.size,actualCount:i.size,missing:s,extra:o,callerFiles:{passed:u.length===0&&d.length===0,expectedCount:a.size,actualCount:p.size,missing:u,extra:d}}}function ye(t,e){let n=new Set;for(let r of t)for(let i of e.get(r.symbolId)??[])i.file!==r.relativePath&&n.add(`${r.symbol}\0${i.file}`);return n}function hn(t,e,n){let r=new Set(n),i=new Map(n.map(s=>[s,[]]));for(let s of t)for(let o of e.get(s.symbolId)??[])r.has(o.file)&&i.get(o.file).push({targetSymbol:s.symbol,location:o});for(let[s,o]of i)i.set(s,pt(o));return i}function he(t,e){let n=new Set;for(let r of t)for(let i of e.get(r.symbolId)??[])n.add(`${r.symbol}\0${i.file}\0${i.line}\0${i.column}`);return n}function ct(t){let e=new Map;for(let n of t)e.set(`${n.file}\0${n.line}\0${n.column}`,n);return[...e.values()].sort(be)}function pt(t){let e=new Map;for(let n of t){let{location:r}=n;e.set(`${n.targetSymbol}\0${r.file}\0${r.line}\0${r.column}`,n)}return[...e.values()].sort((n,r)=>n.targetSymbol.localeCompare(r.targetSymbol)||be(n.location,r.location))}function be(t,e){return t.file.localeCompare(e.file)||t.line-e.line||t.column-e.column}var H="typescript-reference-fragment-v2",E=J({kind:"typescript-reference-fragments",invalidation:K("typescript-reference-fragments"),serialize:t=>JSON.stringify(t),deserialize:ut});function vn(t,e,n,r=t){let i=x(t),s=k({projectFiles:i,snapshot:e,graph:I(t),engineIdentity:C()}),o=[...n].map(([a,p])=>({relativePath:a,contentHash:s.identityFor(a,H).key,value:[...p]}));if(o.some(a=>a.contentHash===null))throw new Error("TypeScript reference fragment identity is unavailable for an affected document.");return E.writeBatch(r,o.map(a=>({...a,contentHash:a.contentHash}))),o.length}function kn(t,e,n,r){let i=e.filter(o=>T(o.relativePath));if(i.length===0)return A("no TypeScript definitions");let s=A("shadow did not run");return B("typescript.reference-fragments.shadow",()=>{try{let o=r(i[0].relativePath);if(!o.availability().available||!o.referenceFragmentsForFiles)return s=A("TypeScript reference fragment provider is unavailable"),s;let a=x(t),p=new Set(a),u=o.referenceFragmentsForFiles(a),d=M(i,u),c=Se(i,lt(n,p),d);if(!c.passed)return s={state:"failing",files:a.length,keyedFiles:0,writtenFiles:0,...c},s;let f=[];for(let h of a){let l=U(t,h,H);l?.key&&f.push({relativePath:h,contentHash:l.key,value:u.get(h)??[]})}return E.writeBatch(t,f),s={state:"passing",files:a.length,keyedFiles:f.length,writtenFiles:f.length,...c},s}catch(o){return s=A(o instanceof Error?o.message:String(o)),s}},()=>({...s}))}function lt(t,e){return new Map([...t].map(([n,r])=>[n,r.filter(i=>e.has(i.file))]))}function wn(t,e,n){if(e.length===0)return{references:new Map,files:0,cacheHits:0,cacheMisses:0,computedFiles:0};let r="fallback",i=0,s=0,o=0,a=0;return B("typescript.reference-fragments.materialize",()=>{try{let p=x(t);i=p.length;let u=new Map,d=new Map,c=[];for(let l of p){let S=U(t,l,H);if(!S?.key)return null;u.set(l,S.key);let F=E.read(t,l,S.key);F===null?(o+=1,c.push(l)):(s+=1,d.set(l,F))}if(o===0)return r="hit",{references:M(e,d),files:i,cacheHits:s,cacheMisses:o,computedFiles:a};let f=n(e[0].relativePath);if(!f.availability().available||!f.referenceFragmentsForFiles)return null;let h=f.referenceFragmentsForFiles(c);if(c.some(l=>!h.has(l)))return null;a=h.size,E.writeBatch(t,c.map(l=>({relativePath:l,contentHash:u.get(l),value:h.get(l)??[]})));for(let[l,S]of h)d.set(l,S);return r="computed",{references:M(e,d),files:i,cacheHits:s,cacheMisses:o,computedFiles:a}}catch{return null}},()=>({state:r,files:i,cacheHits:s,cacheMisses:o,computedFiles:a}))}function A(t){return{state:"unavailable",files:0,keyedFiles:0,writtenFiles:0,expectedCount:0,actualCount:0,missing:[],extra:[],reason:t}}function ut(t){try{let e=JSON.parse(t);return!Array.isArray(e)||!e.every(dt)?null:e}catch{return null}}function dt(t){if(!t||typeof t!="object")return!1;let e=t,n=e.location;return typeof e.targetSymbol=="string"&&!!n&&typeof n.file=="string"&&typeof n.line=="number"&&typeof n.column=="number"}import{readFileSync as ft}from"fs";import{join as q}from"path";var En=5e3,mt="watch.lock",gt="watch-state.json",yt="watch-activity.json";function Dn(t){return{lockPath:q(t,mt),statePath:q(t,gt),activityPath:q(t,yt)}}function Nn(t){try{return ht(JSON.parse(ft(t,"utf8")))}catch{return null}}function ht(t){if(!t||typeof t!="object")return null;let e=t;return e.version!==1||typeof e.protocolVersion!="number"||typeof e.pid!="number"||!Number.isInteger(e.pid)||e.pid<=0||typeof e.projectRoot!="string"||e.worktreeId!==void 0&&(typeof e.worktreeId!="string"||e.worktreeId.length===0)||typeof e.cliVersion!="string"||!y(e.startedAt)||!y(e.heartbeatAt)||!y(e.lastActivityAt)||!St(e.watcher)||e.idleDeadlineAt!==void 0&&!y(e.idleDeadlineAt)||e.indexGeneration!==void 0&&!/^[a-f0-9]{64}$/.test(e.indexGeneration)||e.lastError!==void 0&&!bt(e.lastError)||e.lastRefresh!==void 0&&!jt(e.lastRefresh)||e.reindexActivity!==void 0&&!xt(e.reindexActivity)||e.typescriptSemantic!==void 0&&!Ft(e.typescriptSemantic)||e.typescriptIndex!==void 0&&!Pt(e.typescriptIndex)?null:e}function y(t){return typeof t=="string"&&Number.isFinite(Date.parse(t))}function St(t){if(!t||typeof t!="object"||!("state"in t))return!1;let e=t;switch(e.state){case"idle":return!0;case"waiting":return g(e.changedFiles)&&g(e.reindexAt);case"indexing":return g(e.startedAt);case"cooldown":return g(e.until)&&typeof e.dirty=="boolean";default:return!1}}function bt(t){if(!t||typeof t!="object")return!1;let e=t;return y(e.at)&&typeof e.message=="string"}function jt(t){if(!t||typeof t!="object")return!1;let e=t;return typeof e.trigger?.kind=="string"&&typeof e.result=="string"&&y(e.startedAt)&&y(e.completedAt)&&g(e.durationMs)}function xt(t){if(!t||typeof t!="object")return!1;let e=t;return!y(e.windowStartedAt)||!y(e.windowEndedAt)||!m(e.runs)||!m(e.rebuilt)||!m(e.reused)||!m(e.failed)||!m(e.suppressed)||!g(e.estimatedLogicalOutputBytes)||e.estimatedLogicalOutputBytes<0||!e.byTrigger||typeof e.byTrigger!="object"?!1:Object.values(e.byTrigger).every(n=>n===void 0||m(n))}function Ft(t){if(!t||typeof t!="object")return!1;let e=t;return typeof e.protocolVersion=="number"&&(e.state==="idle"||e.state==="ready"||e.state==="unavailable"||e.state==="error")&&g(e.requests)&&g(e.sessionsCreated)&&g(e.sessionsReused)&&g(e.sessionsRefreshed)&&g(e.sessionsReplaced)&&g(e.projectsCreated)&&(e.lastRequestAt===void 0||y(e.lastRequestAt))&&(e.lastError===void 0||typeof e.lastError=="string")&&(e.busyUntil===void 0||y(e.busyUntil))}function Pt(t){if(!t||typeof t!="object")return!1;let e=t;return typeof e.protocolVersion=="number"&&(e.state==="idle"||e.state==="ready"||e.state==="unavailable"||e.state==="error")&&m(e.requests)&&m(e.sessionsCreated)&&m(e.sessionsReplaced)&&m(e.initializations)&&m(e.programUpdates)&&m(e.documentsEmitted)&&m(e.documentsRemoved)&&(e.lastRequestAt===void 0||y(e.lastRequestAt))&&(e.lastDurationMs===void 0||g(e.lastDurationMs)&&e.lastDurationMs>=0)&&(e.lastError===void 0||typeof e.lastError=="string")&&(e.busyUntil===void 0||y(e.busyUntil))}function g(t){return typeof t=="number"&&Number.isFinite(t)}function m(t){return typeof t=="number"&&Number.isInteger(t)&&t>=0}export{At as a,Pe as b,_ as c,Et as d,Te as e,Dt as f,Nt as g,Ot as h,$t as i,z as j,ae as k,Ut as l,He as m,Ge as n,Xt as o,En as p,Dn as q,Nn as r,Ye as s,T as t,nt as u,rn as v,sn as w,hn as x,k as y,U as z,vn as A,kn as B,wn as C};
4
- //# sourceMappingURL=chunk-2CTX5CMX.js.map
@@ -1,2 +0,0 @@
1
- import{b as r}from"./chunk-54HA4ZXH.js";import{x as e}from"./chunk-XYADIZHU.js";function l(t,s){let o=r(t,s);return e(t,o).map(({relativePath:n,...a})=>a)}export{l as a};
2
- //# sourceMappingURL=chunk-2Y373BDD.js.map
@@ -1,2 +0,0 @@
1
- import{a as f,b as m}from"./chunk-QZ4JVECJ.js";import{a as u}from"./chunk-X6D5IC6I.js";import{B as g,E as d}from"./chunk-YGAGTIDK.js";import{y as l}from"./chunk-L7SPDE73.js";import{readFileSync as E,readdirSync as h}from"fs";import{basename as k,join as c}from"path";function S(t,e,r={}){let a=new Set(t),n=new Set(e),o=[...n].filter(i=>!a.has(i)).sort(),s=r.allowExtra?[]:[...a].filter(i=>!n.has(i)).sort();return{missing:o,extra:s}}function b(t,e){let r=N(t,e.file,e.keys);if(!r.ok)return{name:e.name,file:e.file,status:"unavailable",missing:[],extra:[],unavailableReason:r.reason};let a=L(t.config.projectRoot,e.mustEqual),n=S(r.keys,a,{allowExtra:e.allowExtra??!1}),o=n.missing.length>0||n.extra.length>0?"violated":"ok";return{name:e.name,file:e.file,status:o,missing:n.missing,extra:n.extra}}function O(t,e){return e.map(r=>b(t,r))}function G(t,e){if(e.has(t.file))return!0;let r=t.mustEqual;switch(r.type){case"top-level-dirs":return[...e].some(a=>a===r.path||a.startsWith(`${r.path}/`));case"file-glob":return[...e].some(a=>f(r.pattern,a));case"registered-commands":return e.has("docs/COMMAND_REFERENCE.md");case"builtin-skills":return[...e].some(a=>a.startsWith("skills/"))}}function I(t){if(t.status==="unavailable")return`[coverage-contract] ${t.name}: DISCLOSED \u2014 could not evaluate (${t.unavailableReason})`;let e=[];return t.missing.length>0&&e.push(`missing ${t.missing.join(", ")}`),t.extra.length>0&&e.push(`extra ${t.extra.join(", ")}`),`[coverage-contract] ${t.name}: ${e.join("; ")}`}function N(t,e,r){return r.type==="markdown-list"?T(t,e,r.marker):R(t,e,r)}function R(t,e,r){if(!l(t,e))return{ok:!1,reason:`file not found: ${e}`};let n=g(e);if(!n)return{ok:!1,reason:`unsupported file type for ${r.type} extraction: ${e}`};let o=d(t,e);if(!o)return{ok:!1,reason:`tree-sitter parser unavailable for ${n} (${e}) \u2014 contract skipped, not silently passed`,disclosedUnavailable:{language:n,reason:"parser-unavailable"}};let s=r.type==="object-literal-keys"?D(o,r.identifier):w(o,r.identifier);return s===null?{ok:!1,reason:`no ${r.type==="object-literal-keys"?"object literal":"string array"} named "${r.identifier}" found in ${e}`}:{ok:!0,keys:s}}function y(t){let e=t.childForFieldName("value");return e?e.type==="as_expression"||e.type==="satisfies_expression"?e.namedChild(0):e:null}function D(t,e){for(let r of t.rootNode.descendantsOfType("variable_declarator")){if(r.childForFieldName("name")?.text!==e)continue;let n=y(r);if(n?.type==="object")return $(n)}return null}function $(t){let e=new Set;for(let r of t.namedChildren)if(r.type==="pair"){let a=r.childForFieldName("key");a&&e.add(C(a.text))}else r.type==="shorthand_property_identifier"&&e.add(r.text);return[...e].sort()}function w(t,e){for(let r of t.rootNode.descendantsOfType("variable_declarator")){if(r.childForFieldName("name")?.text!==e)continue;let n=y(r);if(n?.type!=="array")continue;let o=new Set;for(let s of n.namedChildren)s.type==="string"&&o.add(C(s.text));return[...o].sort()}return null}function C(t){return t.length>=2&&(t[0]==="'"&&t.endsWith("'")||t[0]==='"'&&t.endsWith('"'))?t.slice(1,-1):t}function T(t,e,r){let a=l(t,e);if(!a)return{ok:!1,reason:`file not found: ${e}`};let n=v(a,r);return n===null?{ok:!1,reason:`no <!-- BEGIN GENERATED ${r} --> ... <!-- END GENERATED ${r} --> block in ${e}`}:{ok:!0,keys:x(n)}}function v(t,e){let r=u(e),n=new RegExp(`<!--\\s*BEGIN GENERATED ${r}\\s*-->([\\s\\S]*?)<!--\\s*END GENERATED ${r}\\s*-->`).exec(t);return n?n[1]:null}function x(t){let e=new Set;for(let r of t.matchAll(/`([a-z][a-z0-9-]*)`/g))e.add(r[1]);for(let r of t.matchAll(/\[([a-z][a-z0-9-]*)\]\([^)]*\)/g))e.add(r[1]);return[...e].sort()}function L(t,e){switch(e.type){case"top-level-dirs":return p(c(t,e.path));case"file-glob":return[...new Set(m(t,e.pattern).map(r=>k(r)))].sort();case"registered-commands":return A(t);case"builtin-skills":return p(c(t,"skills"))}}function p(t){let e;try{e=h(t,{withFileTypes:!0})}catch{return[]}return e.filter(r=>r.isDirectory()&&!r.name.startsWith(".")).map(r=>r.name).sort()}function A(t){let e;try{e=E(c(t,"docs/COMMAND_REFERENCE.md"),"utf-8")}catch{return[]}let r=v(e,"COMMAND REFERENCE");return r?x(r):[]}var z={dead:{minLoc:3,skipBarrels:!0,deadCodeOnly:!0},isolated:{minLoc:3},similar:{minSimilarity:.6,limit:50,minCallees:4},duplicateBodies:{maxLoc:15,limit:50},extract:{minLoc:15,minCallees:5,limit:50},wrappers:{maxLoc:15,limit:50},passthroughs:{maxLoc:15,limit:50},stale:{minLoc:3,limit:50},drift:{},twinDrift:{minSimilarity:.3}};export{b as a,O as b,G as c,I as d,z as e};
2
- //# sourceMappingURL=chunk-2YU7I3QO.js.map
@@ -1,16 +0,0 @@
1
- import{c as d}from"./chunk-NH5ALKPW.js";import{a as h}from"./chunk-FECYOO5O.js";import{d as f}from"./chunk-XYADIZHU.js";import{b as u}from"./chunk-X6D5IC6I.js";import{E as l}from"./chunk-YGAGTIDK.js";import{readFileSync as E}from"fs";import{join as B}from"path";function j(t,e,s={}){let n=h(t,e);if(!n)return null;let a=new d(t),o=N(t,n),r=n.endLine-n.startLine+1,m=a.calleeMap([n],{additive:!0,semantic:s.semantic}).get(n.symbolId)??[],c=new Set(m.map(x=>x.symbol));return{symbol:n.symbol,shortName:f(n.symbol),relativePath:n.relativePath,startLine:n.startLine,endLine:n.endLine,loc:r,branches:o.branches,estimateBasis:o.estimateBasis,cyclomaticEstimate:o.branches+1,calleeCount:c.size,fanIn:P(t,n.symbolId),fanOut:w(m,n.relativePath)}}function N(t,e){let s=l(t,e.relativePath);if(s){let n=g(s.rootNode,e.startLine,e.endLine);if(n)return{branches:v(n),estimateBasis:"ast"}}return{branches:_(p(t,e.relativePath,e.startLine,e.endLine),y(t,e.relativePath)),estimateBasis:"regex-fallback"}}function H(t,e){let s=new Map,n=new Map;for(let a of e){let o=n.get(a.relativePath)??[];o.push(a),n.set(a.relativePath,o)}for(let[a,o]of n){let r=l(t,a),i=r===null?[]:o.filter(c=>r.rootNode.startPosition.row<=c.startLine&&r.rootNode.endPosition.row>=c.endLine),m=new Set(i.map(c=>c.symbolId));if(r&&i.length>0){for(let c of i)s.set(c.symbolId,{branches:0,estimateBasis:"ast"});C(r.rootNode,i,s)}for(let c of o)m.has(c.symbolId)||s.set(c.symbolId,L(t,c))}return s}function L(t,e){return{branches:_(p(t,e.relativePath,e.startLine,e.endLine),y(t,e.relativePath)),estimateBasis:"regex-fallback"}}function y(t,e){return t.get("SELECT language FROM documents WHERE relative_path = ?",e)?.language??"unknown"}function p(t,e,s,n){try{return E(B(t.config.projectRoot,e),"utf-8").split(`
2
- `).slice(s,n+1).join(`
3
- `)}catch{return""}}function P(t,e){return t.get(`SELECT COUNT(DISTINCT c.document_id) AS c
4
- FROM mentions m
5
- JOIN chunks c ON m.chunk_id = c.id
6
- JOIN (
7
- SELECT m2.symbol_id, c2.document_id
8
- FROM mentions m2
9
- JOIN chunks c2 ON m2.chunk_id = c2.id
10
- WHERE m2.role = 1
11
- GROUP BY m2.symbol_id
12
- ) sym_def ON sym_def.symbol_id = m.symbol_id
13
- WHERE m.symbol_id = ?
14
- AND m.role != 1
15
- AND sym_def.document_id != c.document_id`,e)?.c??0}function w(t,e){return new Set(t.filter(s=>s.file!==e).map(s=>s.symbol)).size}function v(t){let e=0;return b(t,s=>{e+=S(s)}),e}function C(t,e,s){let n=[...e].sort((a,o)=>a.startLine-o.startLine||o.endLine-a.endLine);b(t,a=>{let o=S(a);if(o===0)return;let r=a.startPosition.row,i=a.endPosition.row;for(let m of n){if(m.startLine>r)break;if(m.endLine<i)continue;let c=s.get(m.symbolId);c&&(c.branches+=o)}})}function b(t,e){e(t);for(let s of t.namedChildren)b(s,e)}function g(t,e,s){if(t.startPosition.row>e||t.endPosition.row<s)return null;for(let n of t.namedChildren){let a=g(n,e,s);if(a)return a}return t}var D=new Set(["if_statement","conditional_expression","ternary_expression","for_statement","for_in_statement","for_of_statement","while_statement","do_statement","switch_case","case_statement","catch_clause","except_clause","elif_clause","match_arm"]);function S(t){return D.has(t.type)?1:t.type==="binary_expression"&&t.parent?.type!=="binary_expression"&&(t.text.includes("&&")||t.text.includes("||"))?I(t.text):0}function I(t){return(t.match(/&&|\|\|/g)??[]).length}function _(t,e){let s=u(t),n=0,a=[/\bif\b/g,/\belse\s+if\b/g,/\belse\b/g,/\bfor\b/g,/\bwhile\b/g,/\bswitch\b/g,/\bcase\b/g,/\bcatch\b/g,/\?\s*[^?]/g,/&&/g,/\|\|/g];for(let o of a){let r=s.match(o);r&&(n+=r.length)}if(e==="python"){let o=[/\belif\b/g,/\bexcept\b/g,/\bfinally\b/g];for(let r of o){let i=s.match(r);i&&(n+=i.length)}}else if(e==="rust"){let o=[/\bmatch\b/g,/=>/g,/\bloop\b/g];for(let r of o){let i=s.match(r);i&&(n+=i.length)}}else if(e==="ruby"){let o=[/\belsif\b/g,/\bunless\b/g,/\brescue\b/g,/\bwhen\b/g];for(let r of o){let i=s.match(r);i&&(n+=i.length)}}else if(e==="go"){let o=[/\bselect\b/g,/\bdefer\b/g];for(let r of o){let i=s.match(r);i&&(n+=i.length)}}return n}export{j as a,N as b,H as c,v as d};
16
- //# sourceMappingURL=chunk-3MJ5YA4Y.js.map