scip-query 0.19.8 → 0.20.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 (366) hide show
  1. package/CHANGELOG.md +97 -0
  2. package/README.md +158 -48
  3. package/dist/augment-vue-worker.js +1 -1
  4. package/dist/chunk-26QA6FAI.js +8 -0
  5. package/dist/{chunk-KJ2IIBZN.js → chunk-2HPVVXM5.js} +2 -2
  6. package/dist/chunk-2KAZEZ6M.js +2 -0
  7. package/dist/chunk-32LVLCLN.js +40 -0
  8. package/dist/{chunk-24GTWJ3N.js → chunk-3CLX5EOX.js} +2 -2
  9. package/dist/{chunk-QGGLL3UH.js → chunk-3G66UZBH.js} +2 -2
  10. package/dist/{chunk-AA4UWRNL.js → chunk-3ORVDL3H.js} +2 -2
  11. package/dist/chunk-4MAK2HOY.js +6 -0
  12. package/dist/{chunk-QIQ63BHW.js → chunk-4TURLRL5.js} +2 -2
  13. package/dist/chunk-4UQVNCQE.js +2 -0
  14. package/dist/chunk-55Q3WLZX.js +2 -0
  15. package/dist/{chunk-CTF2GDEX.js → chunk-5E4WNAVD.js} +2 -2
  16. package/dist/{chunk-ZCEJ63SP.js → chunk-5I5G2QOX.js} +2 -2
  17. package/dist/chunk-6LDJQXAH.js +2 -0
  18. package/dist/{chunk-3EDFLQ6A.js → chunk-6O5TICIZ.js} +2 -2
  19. package/dist/{chunk-ACAM6O5R.js → chunk-6SHPK5ZE.js} +2 -2
  20. package/dist/chunk-7BAVHKMJ.js +49 -0
  21. package/dist/chunk-7O5IKBTZ.js +16 -0
  22. package/dist/{chunk-WJL2L6MV.js → chunk-7PIO7NKH.js} +2 -2
  23. package/dist/chunk-7S5E7KWT.js +2 -0
  24. package/dist/{chunk-YLFORA5G.js → chunk-7SQQWSY3.js} +2 -2
  25. package/dist/chunk-7WPLAODU.js +5 -0
  26. package/dist/chunk-A73XVBCR.js +20 -0
  27. package/dist/chunk-AFHORGLH.js +42 -0
  28. package/dist/chunk-AIE7TFJW.js +9 -0
  29. package/dist/{chunk-TWMJ3Y3G.js → chunk-AZJQQKDD.js} +2 -2
  30. package/dist/{chunk-BDOIKGDI.js → chunk-B2PX5I6M.js} +2 -2
  31. package/dist/{chunk-DQBCO2UY.js → chunk-B7PBSLZN.js} +2 -2
  32. package/dist/chunk-BBW6JFHN.js +2 -0
  33. package/dist/{chunk-YTVWB7YJ.js → chunk-BDCC2NPY.js} +2 -2
  34. package/dist/{chunk-O23I56NA.js → chunk-BNXCIFVY.js} +2 -2
  35. package/dist/{chunk-MLFZP76A.js → chunk-BPAPWKP6.js} +2 -2
  36. package/dist/chunk-BS2NMXQZ.js +4 -0
  37. package/dist/chunk-C3KV2II6.js +2 -0
  38. package/dist/chunk-C43RDDP4.js +20 -0
  39. package/dist/{chunk-K2WO7XY7.js → chunk-CJST5ETY.js} +2 -2
  40. package/dist/chunk-DAFAHMNB.js +42 -0
  41. package/dist/{chunk-KKME5ZAI.js → chunk-DQGFVPUV.js} +2 -2
  42. package/dist/chunk-DQLPXMH6.js +8 -0
  43. package/dist/chunk-EKZTZXHZ.js +117 -0
  44. package/dist/{chunk-FJ5UDTQF.js → chunk-EN3O7VJA.js} +2 -2
  45. package/dist/{chunk-HZYDQPNY.js → chunk-EW2NTSFA.js} +2 -2
  46. package/dist/chunk-F3Z4OUDS.js +8 -0
  47. package/dist/chunk-FJH2NW7J.js +66 -0
  48. package/dist/{chunk-MSBDMFER.js → chunk-FKSELJQF.js} +2 -2
  49. package/dist/chunk-FTFP6O3L.js +11 -0
  50. package/dist/chunk-FYLK2DEJ.js +2 -0
  51. package/dist/{chunk-WUW7YUAH.js → chunk-GH74ASD6.js} +2 -2
  52. package/dist/{chunk-464PLI5O.js → chunk-GMXWZP2B.js} +2 -2
  53. package/dist/chunk-GOUBFH5O.js +3 -0
  54. package/dist/{chunk-FIJCV235.js → chunk-HLF2TX6R.js} +2 -2
  55. package/dist/{chunk-WWKWUPSU.js → chunk-HX4GQPZP.js} +2 -2
  56. package/dist/chunk-HX7M4BDI.js +30 -0
  57. package/dist/chunk-HZ72SESS.js +128 -0
  58. package/dist/{chunk-SERUIGV5.js → chunk-IB2N4FIY.js} +2 -2
  59. package/dist/chunk-ILMHV3KM.js +2 -0
  60. package/dist/chunk-IZYYAFN5.js +2 -0
  61. package/dist/{chunk-GNC4JVAN.js → chunk-JAYYFEQY.js} +2 -2
  62. package/dist/{chunk-QJIVBYEK.js → chunk-JDOEX4E6.js} +2 -2
  63. package/dist/chunk-JFGGXWQF.js +947 -0
  64. package/dist/chunk-JN4NMBEX.js +8 -0
  65. package/dist/{chunk-6M7RONVB.js → chunk-JVYA47YU.js} +2 -2
  66. package/dist/{chunk-7KYNAMMH.js → chunk-JW56N3KI.js} +2 -2
  67. package/dist/{chunk-OUBAF226.js → chunk-JZ2OXNWB.js} +2 -2
  68. package/dist/chunk-KMKTIO2G.js +8 -0
  69. package/dist/chunk-L5GJNV2T.js +8 -0
  70. package/dist/{chunk-MNSTUIDD.js → chunk-L7AW2QB5.js} +2 -2
  71. package/dist/chunk-L7JDSCDF.js +4 -0
  72. package/dist/chunk-LU47HG23.js +14 -0
  73. package/dist/chunk-LVY7NPF7.js +2 -0
  74. package/dist/chunk-LY4WC4AD.js +74 -0
  75. package/dist/{chunk-7FT5Y65S.js → chunk-MKCDWWGV.js} +2 -2
  76. package/dist/chunk-MNE7YG56.js +2 -0
  77. package/dist/{chunk-7QHY3H7P.js → chunk-MRXBEXSY.js} +2 -2
  78. package/dist/chunk-MV7OWDUX.js +2 -0
  79. package/dist/{chunk-ZJ5CBXK3.js → chunk-N5W4YZMK.js} +2 -2
  80. package/dist/chunk-NGEXCJJW.js +11 -0
  81. package/dist/{chunk-7SWJEWJF.js → chunk-NIW6JDC5.js} +2 -2
  82. package/dist/{chunk-O3O4XXO6.js → chunk-O64IZ6UX.js} +2 -2
  83. package/dist/{chunk-3ZSJ3PWF.js → chunk-PBUQFCNB.js} +2 -2
  84. package/dist/{chunk-7RAG65VK.js → chunk-POAVPHH7.js} +2 -2
  85. package/dist/{chunk-A3QXWFBK.js → chunk-PQCI4SQX.js} +2 -2
  86. package/dist/{chunk-4BV4QAZJ.js → chunk-PXY7F6Y4.js} +2 -2
  87. package/dist/chunk-RDO52JGY.js +2 -0
  88. package/dist/chunk-RJT3TUUZ.js +2 -0
  89. package/dist/{chunk-S4S2WOIX.js → chunk-RUJURYSV.js} +2 -2
  90. package/dist/{chunk-JAY7YWS3.js → chunk-RVLDN63O.js} +2 -2
  91. package/dist/chunk-RXOXSKY3.js +2 -0
  92. package/dist/chunk-S7OYBOCK.js +2 -0
  93. package/dist/chunk-SMNXQT5Z.js +3 -0
  94. package/dist/{chunk-NE3TZUCI.js → chunk-SRAFT254.js} +2 -2
  95. package/dist/{chunk-ELLMY7XJ.js → chunk-SXP2MBJH.js} +2 -2
  96. package/dist/chunk-T7YQSHPQ.js +3 -0
  97. package/dist/{chunk-WY45BHKQ.js → chunk-TFRAYKN6.js} +2 -2
  98. package/dist/{chunk-2SNGN6U4.js → chunk-UJCOIXDY.js} +2 -2
  99. package/dist/{chunk-MZZBAITE.js → chunk-UJPRPGCO.js} +2 -2
  100. package/dist/chunk-W4ETQAXM.js +2 -0
  101. package/dist/chunk-WCCFZ7V7.js +113 -0
  102. package/dist/chunk-WUPW3UN3.js +3 -0
  103. package/dist/{chunk-7LSVMFX7.js → chunk-WXZLAAWK.js} +2 -2
  104. package/dist/{chunk-5ML2BNRH.js → chunk-X54AGLVX.js} +2 -2
  105. package/dist/chunk-XKWKXZKW.js +20 -0
  106. package/dist/{chunk-5YLUDDAF.js → chunk-XSRF6Q77.js} +2 -2
  107. package/dist/chunk-Y2MVPNKY.js +5 -0
  108. package/dist/{chunk-JHF3E4YM.js → chunk-YKUU5AIC.js} +2 -2
  109. package/dist/{chunk-E3HYEQO7.js → chunk-YLCJLTPL.js} +2 -2
  110. package/dist/{chunk-7VCOXZH3.js → chunk-YTQVETEO.js} +2 -2
  111. package/dist/chunk-Z4N3MZYA.js +38 -0
  112. package/dist/chunk-ZHXX42OH.js +18 -0
  113. package/dist/chunk-ZJOOT3BG.js +2 -0
  114. package/dist/{chunk-P3UO3EH3.js → chunk-ZK26BAQL.js} +2 -2
  115. package/dist/{chunk-33KUO7CG.js → chunk-ZTETIQ35.js} +2 -2
  116. package/dist/cli.js +3 -8
  117. package/dist/command-descriptors-DSS46KXI.js +642 -0
  118. package/dist/{config-types-B6MEoRNy.d.ts → config-types-jVM3D7MA.d.ts} +68 -2
  119. package/dist/{db-DYLKr9Wn.d.ts → db-B5PM5yNk.d.ts} +20 -2
  120. package/dist/{diff-gate-types-C9BoYwYD.d.ts → diff-gate-types-B0QYpDv1.d.ts} +2 -1
  121. package/dist/direct-navigation-6YHV6IB5.js +3 -0
  122. package/dist/{health-DgxIDXJC.d.ts → health-Do5TKSJI.d.ts} +1 -1
  123. package/dist/index.d.ts +3 -3
  124. package/dist/index.js +1 -1
  125. package/dist/postinstall.js +1 -1
  126. package/dist/queries/affected.d.ts +2 -2
  127. package/dist/queries/affected.js +1 -1
  128. package/dist/queries/architecture.d.ts +2 -2
  129. package/dist/queries/architecture.js +1 -1
  130. package/dist/queries/bottlenecks.d.ts +2 -2
  131. package/dist/queries/bottlenecks.js +1 -1
  132. package/dist/queries/by-kind.d.ts +2 -2
  133. package/dist/queries/by-kind.js +1 -1
  134. package/dist/queries/call-graph.d.ts +2 -2
  135. package/dist/queries/call-graph.js +1 -1
  136. package/dist/queries/change-surface.d.ts +22 -3
  137. package/dist/queries/change-surface.js +1 -1
  138. package/dist/queries/cleanup-plan.d.ts +2 -2
  139. package/dist/queries/cleanup-plan.js +1 -1
  140. package/dist/queries/co-change.d.ts +2 -2
  141. package/dist/queries/co-change.js +1 -1
  142. package/dist/queries/code.d.ts +2 -2
  143. package/dist/queries/code.js +1 -1
  144. package/dist/queries/complexity-hotspots.d.ts +3 -3
  145. package/dist/queries/complexity-hotspots.js +1 -1
  146. package/dist/queries/complexity.d.ts +3 -3
  147. package/dist/queries/complexity.js +1 -1
  148. package/dist/queries/convergence.d.ts +2 -2
  149. package/dist/queries/convergence.js +1 -1
  150. package/dist/queries/coupling.d.ts +2 -2
  151. package/dist/queries/coupling.js +1 -1
  152. package/dist/queries/cycles.d.ts +2 -2
  153. package/dist/queries/cycles.js +1 -1
  154. package/dist/queries/dataflow.d.ts +2 -2
  155. package/dist/queries/dataflow.js +1 -1
  156. package/dist/queries/dead.d.ts +2 -2
  157. package/dist/queries/dead.js +1 -1
  158. package/dist/queries/decorative-checkers.d.ts +2 -2
  159. package/dist/queries/decorative-checkers.js +1 -1
  160. package/dist/queries/deep-chains.d.ts +2 -2
  161. package/dist/queries/deep-chains.js +1 -1
  162. package/dist/queries/deps.d.ts +2 -2
  163. package/dist/queries/deps.js +1 -1
  164. package/dist/queries/diff-gate.d.ts +40 -7
  165. package/dist/queries/diff-gate.js +1 -1
  166. package/dist/queries/diff-impact.d.ts +84 -6
  167. package/dist/queries/diff-impact.js +1 -1
  168. package/dist/queries/doc-drift.d.ts +3 -3
  169. package/dist/queries/doc-drift.js +1 -1
  170. package/dist/queries/drift.d.ts +2 -2
  171. package/dist/queries/drift.js +1 -1
  172. package/dist/queries/duplicate-bodies.d.ts +3 -3
  173. package/dist/queries/duplicate-bodies.js +1 -1
  174. package/dist/queries/extract-candidates.d.ts +2 -2
  175. package/dist/queries/extract-candidates.js +1 -1
  176. package/dist/queries/fan.d.ts +2 -2
  177. package/dist/queries/fan.js +1 -1
  178. package/dist/queries/files.d.ts +12 -3
  179. package/dist/queries/files.js +1 -1
  180. package/dist/queries/health.d.ts +3 -3
  181. package/dist/queries/health.js +1 -1
  182. package/dist/queries/hierarchy.d.ts +2 -2
  183. package/dist/queries/hierarchy.js +1 -1
  184. package/dist/queries/hotspots.d.ts +2 -2
  185. package/dist/queries/hotspots.js +1 -1
  186. package/dist/queries/imports.d.ts +2 -2
  187. package/dist/queries/imports.js +1 -1
  188. package/dist/queries/incomplete-migration.d.ts +8 -6
  189. package/dist/queries/incomplete-migration.js +1 -1
  190. package/dist/queries/index.d.ts +141 -10
  191. package/dist/queries/index.js +1 -1
  192. package/dist/queries/isolated.d.ts +2 -2
  193. package/dist/queries/isolated.js +1 -1
  194. package/dist/queries/locality-candidates.d.ts +2 -2
  195. package/dist/queries/locality-candidates.js +1 -1
  196. package/dist/queries/members.d.ts +2 -2
  197. package/dist/queries/members.js +1 -1
  198. package/dist/queries/methods.d.ts +34 -3
  199. package/dist/queries/methods.js +1 -1
  200. package/dist/queries/not-implemented.d.ts +2 -2
  201. package/dist/queries/not-implemented.js +1 -1
  202. package/dist/queries/outline.d.ts +2 -2
  203. package/dist/queries/outline.js +1 -1
  204. package/dist/queries/passthrough-candidates.d.ts +3 -3
  205. package/dist/queries/passthrough-candidates.js +1 -1
  206. package/dist/queries/plan-context.d.ts +3 -3
  207. package/dist/queries/plan-context.js +1 -1
  208. package/dist/queries/react-component-duplicates.d.ts +2 -2
  209. package/dist/queries/react-component-duplicates.js +1 -1
  210. package/dist/queries/react-hook-candidates.d.ts +2 -2
  211. package/dist/queries/react-hook-candidates.js +1 -1
  212. package/dist/queries/react-large-component-pressure.d.ts +2 -2
  213. package/dist/queries/react-large-component-pressure.js +1 -1
  214. package/dist/queries/recent-duplicates.d.ts +2 -2
  215. package/dist/queries/recent-duplicates.js +1 -1
  216. package/dist/queries/redundant-reexports.d.ts +2 -2
  217. package/dist/queries/redundant-reexports.js +1 -1
  218. package/dist/queries/refs.d.ts +2 -2
  219. package/dist/queries/refs.js +1 -1
  220. package/dist/queries/self-audit.d.ts +2 -2
  221. package/dist/queries/self-audit.js +1 -1
  222. package/dist/queries/similar-chains.d.ts +2 -2
  223. package/dist/queries/similar-chains.js +1 -1
  224. package/dist/queries/similar-files.d.ts +2 -2
  225. package/dist/queries/similar-files.js +1 -1
  226. package/dist/queries/similar-signatures.d.ts +2 -2
  227. package/dist/queries/similar-signatures.js +1 -1
  228. package/dist/queries/similar.d.ts +2 -2
  229. package/dist/queries/similar.js +1 -1
  230. package/dist/queries/slice.d.ts +2 -2
  231. package/dist/queries/slice.js +1 -1
  232. package/dist/queries/stale-abstractions.d.ts +2 -2
  233. package/dist/queries/stale-abstractions.js +1 -1
  234. package/dist/queries/stats.d.ts +2 -2
  235. package/dist/queries/surface.d.ts +2 -2
  236. package/dist/queries/surface.js +1 -1
  237. package/dist/queries/symbols.d.ts +2 -2
  238. package/dist/queries/symbols.js +1 -1
  239. package/dist/queries/system.d.ts +2 -2
  240. package/dist/queries/system.js +1 -1
  241. package/dist/queries/test-quality.d.ts +2 -2
  242. package/dist/queries/test-quality.js +1 -1
  243. package/dist/queries/trace.d.ts +2 -2
  244. package/dist/queries/trace.js +1 -1
  245. package/dist/queries/twin-ab.d.ts +14 -3
  246. package/dist/queries/twin-ab.js +1 -1
  247. package/dist/queries/twin-drift.d.ts +2 -2
  248. package/dist/queries/twin-drift.js +1 -1
  249. package/dist/queries/unused-imports.d.ts +2 -2
  250. package/dist/queries/unused-imports.js +1 -1
  251. package/dist/queries/unused-params.d.ts +2 -2
  252. package/dist/queries/unused-params.js +1 -1
  253. package/dist/queries/vue-component-duplicates.d.ts +2 -2
  254. package/dist/queries/vue-component-duplicates.js +1 -1
  255. package/dist/queries/vue-composable-candidates.d.ts +2 -2
  256. package/dist/queries/vue-composable-candidates.js +1 -1
  257. package/dist/queries/vue-large-view-pressure.d.ts +2 -2
  258. package/dist/queries/vue-large-view-pressure.js +1 -1
  259. package/dist/queries/wrapper-candidates.d.ts +2 -2
  260. package/dist/queries/wrapper-candidates.js +1 -1
  261. package/dist/reindex-worker.js +21 -21
  262. package/dist/reindex.d.ts +3 -3
  263. package/dist/reindex.js +33 -33
  264. package/dist/runtime.d.ts +5 -3
  265. package/dist/runtime.js +3 -3
  266. package/dist/rust-semantic-session-server.js +1 -1
  267. package/dist/rust-semantic-session-worker.js +1 -1
  268. package/dist/rust-semantic-worker.js +1 -1
  269. package/dist/{scip-cli-Cc6c00-a.d.ts → scip-cli-BnEwZRLJ.d.ts} +1 -1
  270. package/dist/{symbol-types-BgWU6lhL.d.ts → symbol-types-BIQwfoAx.d.ts} +7 -1
  271. package/dist/typescript-mailbox-worker.js +2 -0
  272. package/dist/watch-server.js +2 -42
  273. package/docs/AGENT_GUIDE.md +13 -6
  274. package/docs/CLI_JSON_OUTPUT.md +110 -22
  275. package/docs/COMMAND_REFERENCE.md +88 -88
  276. package/docs/COMMITTED_RECORD_COMPATIBILITY.md +55 -18
  277. package/docs/DURABILITY.md +88 -38
  278. package/docs/INDEX_GENERATIONS.md +65 -19
  279. package/docs/MAILBOX_LIFECYCLE.md +28 -1
  280. package/docs/REINDEX_METADATA_COMPATIBILITY.md +18 -8
  281. package/docs/SECURITY_MODEL.md +31 -14
  282. package/docs/TELEMETRY_RETENTION.md +11 -4
  283. package/docs/WATCH_REFRESH_REQUESTS.md +34 -21
  284. package/docs/WINDOWS_SIDECAR_RELEASE.md +9 -4
  285. package/docs/analyzer-inventory.md +31 -22
  286. package/docs/analyzer-validation-ledger.md +8 -0
  287. package/docs/schemas/outcome-event-record.schema.json +57 -1
  288. package/docs/schemas/project-config.schema.json +82 -1
  289. package/docs/schemas/suppression-record.schema.json +84 -3
  290. package/package.json +5 -5
  291. package/skills/_shared/SKILL.md +2 -2
  292. package/skills/_shared/references/agent-contract-catalog.md +1 -1
  293. package/skills/_shared/references/detector-precision-and-diffgate.md +1 -1
  294. package/skills/scip-audit/SKILL.md +6 -6
  295. package/skills/scip-audit/references/claims.md +1 -1
  296. package/skills/scip-audit/references/cleanup.md +19 -20
  297. package/skills/scip-audit/references/directory.md +4 -4
  298. package/skills/scip-audit/references/frontend.md +10 -10
  299. package/skills/scip-audit/references/twin-drift.md +2 -2
  300. package/skills/scip-diagnose/references/debug.md +8 -8
  301. package/skills/scip-diagnose/references/root-cause.md +3 -3
  302. package/skills/scip-diagnose/references/triage.md +10 -10
  303. package/skills/scip-explore/SKILL.md +3 -3
  304. package/skills/scip-improve/SKILL.md +10 -10
  305. package/skills/scip-improve/references/cleanup-batches.md +3 -3
  306. package/skills/scip-improve/references/directory-moves.md +3 -3
  307. package/skills/scip-improve/references/doc-reconcile.md +1 -1
  308. package/skills/scip-improve/references/frontend-extraction.md +2 -2
  309. package/skills/scip-improve/references/twin-drift.md +3 -3
  310. package/skills/scip-plan/SKILL.md +2 -2
  311. package/skills/scip-plan/references/api-impact.md +5 -5
  312. package/skills/scip-plan/references/conductor.md +2 -2
  313. package/skills/scip-plan/references/hyper-optimization.md +1 -1
  314. package/skills/scip-query/SKILL.md +15 -5
  315. package/skills/scip-setup/references/bootstrap-workflow.md +7 -8
  316. package/skills/scip-setup/references/language-verification.md +2 -2
  317. package/skills/scip-setup/references/per-repo-triage.md +1 -1
  318. package/skills/scip-verify/SKILL.md +10 -10
  319. package/skills/scip-verify/references/calibrate-detectors.md +7 -7
  320. package/dist/chunk-2465DLHK.js +0 -3
  321. package/dist/chunk-2U3OLUNJ.js +0 -61
  322. package/dist/chunk-33XTHFKR.js +0 -2
  323. package/dist/chunk-43KC6EQZ.js +0 -2
  324. package/dist/chunk-47BU5Z4T.js +0 -8
  325. package/dist/chunk-4YTUWQ6M.js +0 -18
  326. package/dist/chunk-64MNV6AB.js +0 -8
  327. package/dist/chunk-67QRR5YC.js +0 -6
  328. package/dist/chunk-6GXYN7YA.js +0 -40
  329. package/dist/chunk-A2TNXAXO.js +0 -8
  330. package/dist/chunk-APMMR5Y2.js +0 -2
  331. package/dist/chunk-AZFUMCQB.js +0 -2
  332. package/dist/chunk-BNXICU42.js +0 -33
  333. package/dist/chunk-C5Q44Q5D.js +0 -3
  334. package/dist/chunk-DQGSM7RZ.js +0 -20
  335. package/dist/chunk-E2LAW7SL.js +0 -30
  336. package/dist/chunk-E4NFOAD4.js +0 -6
  337. package/dist/chunk-E5HNT4X2.js +0 -3
  338. package/dist/chunk-FD3HFKXR.js +0 -5
  339. package/dist/chunk-GHKEJTCE.js +0 -35
  340. package/dist/chunk-GLZTVKAB.js +0 -16
  341. package/dist/chunk-HIB452NU.js +0 -949
  342. package/dist/chunk-IF6FP6B2.js +0 -66
  343. package/dist/chunk-JORHF5AL.js +0 -108
  344. package/dist/chunk-KSGTULOS.js +0 -9
  345. package/dist/chunk-KXDJAG4N.js +0 -38
  346. package/dist/chunk-L4S2A7BV.js +0 -2
  347. package/dist/chunk-LP3ARJKF.js +0 -8
  348. package/dist/chunk-LSOR3LQG.js +0 -3
  349. package/dist/chunk-NTUMF2X3.js +0 -56
  350. package/dist/chunk-QOXBSI6G.js +0 -20
  351. package/dist/chunk-QXK6UUSM.js +0 -2
  352. package/dist/chunk-RA3AYNWP.js +0 -112
  353. package/dist/chunk-RJMDJR3A.js +0 -2
  354. package/dist/chunk-RLH5VUMG.js +0 -2
  355. package/dist/chunk-SMQWE25B.js +0 -3
  356. package/dist/chunk-TAVELHYR.js +0 -2
  357. package/dist/chunk-VAXNI5NE.js +0 -146
  358. package/dist/chunk-VVY2G5ET.js +0 -2
  359. package/dist/chunk-W3DBTGL4.js +0 -11
  360. package/dist/chunk-WANA4KAQ.js +0 -5
  361. package/dist/chunk-X4FR5BZF.js +0 -9
  362. package/dist/chunk-X6RKPDY7.js +0 -2
  363. package/dist/chunk-YCPASUCX.js +0 -2
  364. package/dist/chunk-ZL2OGDCD.js +0 -2
  365. package/dist/command-descriptors-ZW5J4ZEM.js +0 -631
  366. package/dist/direct-navigation-42YHQPOI.js +0 -3
@@ -16,12 +16,12 @@ Load shared mechanics from [`../../_shared/SKILL.md`](../../_shared/SKILL.md) on
16
16
  | `scip-query code <entry-or-error-symbol>` | Trace the failing path: read the exact source (complete coverage: definition identity, source, line range). For stack traces, read the exact range with `scip-query code 'file:start-end'`. |
17
17
  | `scip-query call-graph <entry-symbol>` | Trace the failing path: callers and callees (bounded coverage). |
18
18
  | `scip-query dataflow <state-or-input-symbol>` / `scip-query slice <state-or-input-symbol>` | Trace the failing path: data flow and slices from the suspect input or state. |
19
- | `scip-query similar <suspect-symbol> --json --full` | Compare and bound: nearby implementations for missing handling (bounded coverage: symbol pairs, similarity scores, shared evidence). |
19
+ | `scip-query similar <suspect-symbol> --full` | Compare and bound: nearby implementations for missing handling (bounded coverage: symbol pairs, similarity scores, shared evidence). |
20
20
  | `scip-query similar <suspect-symbol> <comparison-symbol> --plan` | Compare and bound: two specific implementations directly. |
21
- | `scip-query similar-files <suspect-file> --json --full` | Compare and bound: nearby files for missing handling. |
22
- | `scip-query co-change <suspect-file> --json --full` | Compare and bound: files that historically changed with the suspect file. |
23
- | `scip-query change-surface <suspect-file> --json --full` | Compare and bound: exports, consumers, and blast-radius risk. |
24
- | `scip-query affected <suspect-symbol> --json` | Compare and bound: transitive impact bound for the fix plan (bounded coverage). |
21
+ | `scip-query similar-files <suspect-file> --full` | Compare and bound: nearby files for missing handling. |
22
+ | `scip-query co-change <suspect-file> --full` | Compare and bound: files that historically changed with the suspect file. |
23
+ | `scip-query change-surface <suspect-file> --full` | Compare and bound: exports, consumers, and blast-radius risk. |
24
+ | `scip-query affected <suspect-symbol>` | Compare and bound: transitive impact bound for the fix plan (bounded coverage). |
25
25
 
26
26
  ## Rules
27
27
 
@@ -70,12 +70,12 @@ This step is complete only when a suspected root cause is tied to source evidenc
70
70
  ### 4. Compare and bound
71
71
 
72
72
  ```bash
73
- scip-query similar <suspect-symbol> --json --full
73
+ scip-query similar <suspect-symbol> --full
74
74
  scip-query similar <suspect-symbol> <comparison-symbol> --plan
75
- scip-query similar-files <suspect-file> --json --full
76
- scip-query co-change <suspect-file> --json --full
77
- scip-query change-surface <suspect-file> --json --full
78
- scip-query affected <suspect-symbol> --json
75
+ scip-query similar-files <suspect-file> --full
76
+ scip-query co-change <suspect-file> --full
77
+ scip-query change-surface <suspect-file> --full
78
+ scip-query affected <suspect-symbol>
79
79
  ```
80
80
 
81
81
  This step is complete only when the packet has a narrow test shape and an impact bound.
@@ -6,7 +6,7 @@ commands:
6
6
  when: "Orient to a module's files, symbols, dependencies, and consumers."
7
7
  - template: "scip-query trace <entry-symbol>"
8
8
  when: "Connect an entry symbol to its definition and references."
9
- - template: "scip-query affected <symbol> --json"
9
+ - template: "scip-query affected <symbol>"
10
10
  when: "Measure the transitive downstream blast radius of a change."
11
11
  ---
12
12
 
@@ -21,7 +21,7 @@ Build verified understanding of how a system works end to end — entry points,
21
21
  | --- | --- | --- | --- | --- |
22
22
  | `scip-query system <module-or-scope>` | Full module map: files, symbols, deps in/out | module file paths; exported symbols with line ranges; internal dependencies; reverse dependencies | `complete` | Orient to a module's files, symbols, dependencies, and consumers. |
23
23
  | `scip-query trace <entry-symbol>` | Trace a symbol: definition + all references | definition sites with source and signature; referencing files with line numbers | `bounded` | Connect an entry symbol to its definition and references. |
24
- | `scip-query affected <symbol> --json` | Transitive closure of symbols that could break if this symbol changes | affected symbol identities, files, and traversal depths | `bounded` | Measure the transitive downstream blast radius of a change. |
24
+ | `scip-query affected <symbol>` | Transitive closure of symbols that could break if this symbol changes | affected symbol identities, files, and traversal depths | `bounded` | Measure the transitive downstream blast radius of a change. |
25
25
 
26
26
  Use this shortlist first. Open [`../_shared/SKILL.md`](../_shared/SKILL.md) only when it is insufficient.
27
27
  <!-- END GENERATED SKILL COMMANDS -->
@@ -46,7 +46,7 @@ Done when: module files, key symbols, dependencies, and reverse dependencies are
46
46
  **2. Trace entry points.** Run `trace <entry-symbol>` (definition + every reference, bounded), `call-graph <entry-symbol>` (incoming callers, outgoing callees, bounded), `code <entry-symbol>`, `dataflow <entry-symbol>` — repeat for important callees until the path reaches a side effect, a returned value, or a terminal output.
47
47
  Done when: the traced path connects entry point to observable effect.
48
48
 
49
- **3. Map dependencies and consumers.** Run `deps <file>`, `rdeps <file>`, `fan-out <file>`, `surface <module>`, `affected <symbol> --json` (transitive closure of symbols that could break if this symbol changes: identities, files, traversal depths, bounded).
49
+ **3. Map dependencies and consumers.** Run `deps <file>`, `rdeps <file>`, `fan-out <file>`, `surface <module>`, `affected <symbol>` (transitive closure of symbols that could break if this symbol changes: identities, files, traversal depths, bounded).
50
50
  Done when: direct dependencies, public surface, and downstream blast radius are named.
51
51
 
52
52
  **4. Follow data and state.** Run `dataflow <symbol-or-variable>` (definition sites, usage sites, producers, consumers, bounded), `slice <symbol-or-variable>`, `slice <symbol-or-variable> --forward`.
@@ -2,11 +2,11 @@
2
2
  name: scip-improve
3
3
  description: Use when edits should actually be made: fix confirmed cleanup findings batch by batch, consolidate a drifted twin into one canonical helper, implement a named maintainability mechanism, extract a React hook or Vue composable, move files to fix locality, or bring AGENTS.md/standards/docs back in sync with code. Requires findings already confirmed — audit first if they are not. For reducing one symbol's cognitive complexity, use `complexity-cleanup`; for deciding where a boundary belongs at design time, use `decomposition`.
4
4
  commands:
5
- - template: "scip-query cleanup-plan --verify --json"
5
+ - template: "scip-query cleanup-plan --verify"
6
6
  when: "Build compiler-checked deletion batches from confirmed dead-code findings."
7
- - template: "scip-query cleanup-apply --verified --batch <n>"
7
+ - template: "scip-query cleanup-apply --verified --batch <n> --dry-run"
8
8
  when: "Apply one already verified cleanup batch."
9
- - template: "scip-query diff-gate --json --compact"
9
+ - template: "scip-query diff-gate"
10
10
  when: "Gate each implemented improvement slice before declaring it complete."
11
11
  ---
12
12
 
@@ -31,12 +31,12 @@ with its evidence and disposition.
31
31
 
32
32
  | Situation | Do this | Reference |
33
33
  |---|---|---|
34
- | Fix confirmed cleanup findings, raise health, "keep cleaning" | `health` → `cleanup-plan --verify` → `cleanup-apply --verified --batch <n>` in a loop | `references/cleanup-batches.md` |
34
+ | Fix confirmed cleanup findings, raise health, "keep cleaning" | `health` → `cleanup-plan --verify` → preview then apply one `cleanup-apply --verified --batch <n>` in a loop | `references/cleanup-batches.md` |
35
35
  | AGENTS.md/CLAUDE.md/standards/command docs are stale or cite moved code | `doc-drift` → `outline`/`trace`/`code` per doc → rerun `doc-drift` | `references/doc-reconcile.md` |
36
- | Same-name/near-name functions diverged, one-sided fix, drifted threshold | `twin-drift --json --full` → classify → consolidate → rerun `twin-drift` | `references/twin-drift.md` |
36
+ | Same-name/near-name functions diverged, one-sided fix, drifted threshold | `twin-drift --full` → classify → consolidate → rerun `twin-drift` | `references/twin-drift.md` |
37
37
  | Implement a confirmed maintainability register entry (hidden policy, thin wrapper, dead re-export) | `extract-candidates` / `passthrough-candidates` / `wrapper-candidates` / `stale-abstractions` / `redundant-reexports` to confirm, then implement the disposition | `references/maintainability-mechanism.md` |
38
38
  | Extract a React hook/component or Vue composable/component | cross-check confirmed candidates, classify reuse/extract/split, extract | `references/frontend-extraction.md` |
39
- | Move files to fix locality, declare/close an architecture boundary | `locality-candidates --json --full` → migration slice → boundary config → postchecks | `references/directory-moves.md` |
39
+ | Move files to fix locality, declare/close an architecture boundary | `locality-candidates --full` → migration slice → boundary config → postchecks | `references/directory-moves.md` |
40
40
 
41
41
  ## Owned commands
42
42
 
@@ -48,9 +48,9 @@ with its evidence and disposition.
48
48
 
49
49
  | Command | Purpose | Returns | Coverage | When |
50
50
  | --- | --- | --- | --- | --- |
51
- | `scip-query cleanup-plan --verify --json` | Ordered, batched deletion plan: graph-fact dead code plus the cascade candidates it unlocks | ordered cleanup batches, evidence, and optional verification outcomes | `bounded` | Build compiler-checked deletion batches from confirmed dead-code findings. |
52
- | `scip-query cleanup-apply --verified --batch <n>` | Apply a compiler-verified cleanup-plan batch to the working tree | applied files, deletions, verification, and refusal reasons | `bounded` | Apply one already verified cleanup batch. |
53
- | `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` | Gate each implemented improvement slice before declaring it complete. |
51
+ | `scip-query cleanup-plan --verify` | Ordered, batched deletion plan: graph-fact dead code plus the cascade candidates it unlocks | ordered cleanup batches, evidence, and optional verification outcomes | `bounded` | Build compiler-checked deletion batches from confirmed dead-code findings. |
52
+ | `scip-query cleanup-apply --verified --batch <n> --dry-run` | Apply a compiler-verified cleanup-plan batch to the working tree | applied files, deletions, verification, and refusal reasons | `bounded` | Apply one already verified cleanup batch. |
53
+ | `scip-query diff-gate` | 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` | Gate each implemented improvement slice before declaring it complete. |
54
54
 
55
55
  Use this shortlist first. Open [`../_shared/SKILL.md`](../_shared/SKILL.md) only when it is insufficient.
56
- <!-- END GENERATED SKILL COMMANDS -->
56
+ <!-- END GENERATED SKILL COMMANDS -->
@@ -8,7 +8,7 @@ If cleanup findings have not been swept and confirmed yet, run the cleanup
8
8
  scenario in `scip-audit` first. Then report a markdown block before touching
9
9
  any code:
10
10
 
11
- - current score from `scip-query health --json`
11
+ - current score from `scip-query health`
12
12
  - the first confirmed batch: finding, evidence, planned fix, verification plan
13
13
  - remaining signals with status
14
14
 
@@ -28,9 +28,9 @@ Work top to bottom, one item at a time:
28
28
 
29
29
  Repeat until stopping:
30
30
 
31
- 1. Apply one verified deletion batch — `scip-query cleanup-apply --verified --batch <n>` against the plan from `scip-query cleanup-plan --verify --json` — or one small targeted refactor for the next prioritized item.
31
+ 1. Preview one verified deletion batch with `scip-query cleanup-apply --verified --batch <n> --dry-run`. Confirm the exact files, symbol ranges, LOC, and verifier match the intended batch; then run the same command without `--dry-run` to apply it. Otherwise make one small targeted refactor for the next prioritized item.
32
32
  2. Run the narrow project check for the touched behavior (tests/typecheck scoped to what changed).
33
- 3. Run `scip-query health --json`.
33
+ 3. Run `scip-query health`.
34
34
  4. Invoke the `scip-verify` skill.
35
35
  5. If `docs/scip-query/health-dossier.md` exists (or a custom `--dossier-dir` was used), refresh it by rerunning `scip-query setup --json` with the same `--dossier-dir` if one was used.
36
36
  6. Pick the next highest-priority confirmed item and repeat.
@@ -8,7 +8,7 @@ on its own.
8
8
 
9
9
  ## Find and confirm the move
10
10
 
11
- Run `scip-query locality-candidates --json --full` for directory-locality and ancestry candidates from consumer ownership (symbols, current homes, consumer locality, suggested homes). Cross-check current placement with `scip-query system <scope>` (files, exported symbols with line ranges, internal deps, reverse deps).
11
+ Run `scip-query locality-candidates --full` for directory-locality and ancestry candidates from consumer ownership (symbols, current homes, consumer locality, suggested homes). Cross-check current placement with `scip-query system <scope>` (files, exported symbols with line ranges, internal deps, reverse deps).
12
12
 
13
13
  Concepts that decide whether a move is safe:
14
14
 
@@ -32,7 +32,7 @@ Add mature boundary path patterns to `.scipquery.json` under `architecture.bound
32
32
  ] } }
33
33
  ```
34
34
 
35
- Then run `scip-query config-validate --json`, then `scip-query architecture --json`.
35
+ Then run `scip-query config-validate`, then `scip-query architecture`.
36
36
 
37
37
  An `allowedDependencies` row is closed: an outgoing target omitted from a present row is forbidden, but a missing row makes no dependency claim at all. Example: `{ "architecture": { "boundaries": [...], "allowedDependencies": { "domain": [], "runtime": ["domain"] }, "requireAcyclic": true } }`. For each closed row, record the evidence for its intended direction. Never copy the current dependency graph into the allow-list merely to obtain zero findings; leave emerging or disputed rules undeclared rather than closing the row prematurely.
38
38
 
@@ -48,6 +48,6 @@ The default `diff-gate` architecture check compares only architecture identities
48
48
 
49
49
  Run `scip-query incomplete-migration`, `scip-query recent-duplicates`, and `scip-query co-change <moved-file-or-config>`, plus the project's tests or typecheck for the affected workspace.
50
50
 
51
- If `.scipquery.json` locality changed, also run `scip-query config-validate`, `scip-query locality-candidates --json --full`, `scip-query architecture --json`, `scip-query drift --architecture`, and `scip-query diff-gate`.
51
+ If `.scipquery.json` locality changed, also run `scip-query config-validate`, `scip-query locality-candidates --full`, `scip-query architecture`, `scip-query drift --architecture`, and `scip-query diff-gate`.
52
52
 
53
53
  Then invoke `scip-verify`. The implementation is complete only when imports, tests, locality signals, and verification are all checked.
@@ -9,7 +9,7 @@ The core distinction driving every edit:
9
9
 
10
10
  ## Step 1 — Build the worklist
11
11
 
12
- Run `scip-query doc-drift --json --full` for the ranked worklist (document paths, coupled code subjects, history evidence), plus `scip-query doc-drift <doc-or-tree>` for anything scoped. Prioritize broken references first, then highest staleness, then the docs agents read most. Done only when each target doc is selected for a current-use reason.
12
+ Run `scip-query doc-drift --full` for the ranked worklist (document paths, coupled code subjects, history evidence), plus `scip-query doc-drift <doc-or-tree>` for anything scoped. Prioritize broken references first, then highest staleness, then the docs agents read most. Done only when each target doc is selected for a current-use reason.
13
13
 
14
14
  ## Step 2 — Reconcile one doc
15
15
 
@@ -10,7 +10,7 @@ nothing is confirmed yet, run that scenario first, then cross-check, then act.
10
10
 
11
11
  ## Scan (only if not already done)
12
12
 
13
- React: `scip-query react-component-duplicates`, `react-hook-candidates`, `react-large-component-pressure`, `recent-duplicates`, `health` — all `--scope <scope> --full --json`, uncapped.
13
+ React: `scip-query react-component-duplicates`, `react-hook-candidates`, `react-large-component-pressure`, `recent-duplicates`, `health` — all `--scope <scope> --full`, uncapped.
14
14
 
15
15
  Vue: same shape, using `vue-component-duplicates`, `vue-composable-candidates`, `vue-large-view-pressure`. Before scanning, when component references, imported composables, script blocks, or linked external scripts matter, run `scip-query augment-vue --project <path-to-tsconfig>` to add compiler-resolved Vue SFC references via Volar — Vue needs this step; React doesn't.
16
16
 
@@ -18,7 +18,7 @@ Record scope, counts, and uncapped/full status.
18
18
 
19
19
  ## Cross-check before acting
20
20
 
21
- Use `scip-query outline <file>`, `deps <file>`, `rdeps <file>`, `similar-files --scope <scope>`, and either `scip-query similar <closest-existing-component-or-hook>` (React) or `scip-query recent-duplicates --scope <scope> --full --json` (Vue) to validate each candidate. Classify every top candidate as reuse, extract, split, skip, or blocked:
21
+ Use `scip-query outline <file>`, `deps <file>`, `rdeps <file>`, `similar-files --scope <scope>`, and either `scip-query similar <closest-existing-component-or-hook>` (React) or `scip-query recent-duplicates --scope <scope> --full` (Vue) to validate each candidate. Classify every top candidate as reuse, extract, split, skip, or blocked:
22
22
 
23
23
  - Component-duplicate-only → look for a shared presentational component or existing reuse.
24
24
  - Hook/composable-candidate-only → look for shared state lifecycle, effects, requests, validation, persistence, or derived-state policy.
@@ -6,7 +6,7 @@ A twin drift group is a same-leaf-name family of callables spanning at least two
6
6
 
7
7
  ## Detect
8
8
 
9
- Run `scip-query twin-drift --json --full` to surface every DIVERGENT and near-name group in scope; scope it with `-s/--scope <path>` when the review should be bounded. Cross-check against `scip-query duplicate-bodies --json --full` — IDENTICAL groups belong there, not here; don't re-report them. Homonyms (similarity below `--min-similarity`, default 0.3) are noise — skip them unless `--include-homonyms` was explicitly requested. Record group count, member count, and `maxDivergence` per group. Done only when every group in scope is enumerated with its relationship (divergent vs. suppressed homonym).
9
+ Run `scip-query twin-drift --full` to surface every DIVERGENT and near-name group in scope; scope it with `-s/--scope <path>` when the review should be bounded. Cross-check against `scip-query duplicate-bodies --full` — IDENTICAL groups belong there, not here; don't re-report them. Homonyms (similarity below `--min-similarity`, default 0.3) are noise — skip them unless `--include-homonyms` was explicitly requested. Record group count, member count, and `maxDivergence` per group. Done only when every group in scope is enumerated with its relationship (divergent vs. suppressed homonym).
10
10
 
11
11
  ## Classify
12
12
 
@@ -26,10 +26,10 @@ Done only when every DIVERGENT group is either consolidated (old copies gone or
26
26
 
27
27
  ## Verify
28
28
 
29
- Rerun `scip-query twin-drift --json --full` to confirm consolidated groups no longer appear as DIVERGENT, then run the routed postchecks from `scip-verify`. The twin-partner check inside `diff-gate` is advisory and never blocks the gate by itself — but a finding there on your own diff means you've reproduced the exact defect class this skill exists to catch; treat it as a signal to run this workflow, not just to suppress the finding. Fix it or explicitly accept it before finishing.
29
+ Rerun `scip-query twin-drift --full` to confirm consolidated groups no longer appear as DIVERGENT, then run the routed postchecks from `scip-verify`. The twin-partner check inside `diff-gate` is advisory and never blocks the gate by itself — but a finding there on your own diff means you've reproduced the exact defect class this skill exists to catch; treat it as a signal to run this workflow, not just to suppress the finding. Fix it or explicitly accept it before finishing.
30
30
 
31
31
  Done only when `twin-drift` shows no unclassified DIVERGENT groups in scope and any `diff-gate` findings are resolved or explained.
32
32
 
33
33
  ## Report
34
34
 
35
- Scope, groups found (total / divergent / suppressed homonyms), each divergent group with its classification and action taken, and the verification results of `twin-drift --json --full` and `diff-gate --json`.
35
+ Scope, groups found (total / divergent / suppressed homonyms), each divergent group with its classification and action taken, and the verification results of `twin-drift --full` and `diff-gate`.
@@ -6,7 +6,7 @@ commands:
6
6
  when: "Anchor the current flow, consumers, reuse options, and change risks."
7
7
  - template: "scip-query refs <symbol>"
8
8
  when: "Complete or narrow the direct consumer set for a planned symbol change."
9
- - template: "scip-query affected <symbol> --json"
9
+ - template: "scip-query affected <symbol>"
10
10
  when: "Measure transitive impact when the change is not consumer-local."
11
11
  ---
12
12
 
@@ -19,7 +19,7 @@ commands:
19
19
  | --- | --- | --- | --- | --- |
20
20
  | `scip-query plan-context <target>` | Pre-edit planning context for a symbol, file, or module | definitions and references; callers and callees; dataflow producers and consumers; backward and forward slices; affected symbols; change-surface risk; dependencies and reverse dependencies; module files and exports; external surface use; complexity; churn; co-change partners; active suppressions | `bounded` | Anchor the current flow, consumers, reuse options, and change risks. |
21
21
  | `scip-query refs <symbol>` | Find all files referencing a symbol | referencing file paths; reference line numbers grouped by file | `bounded` | Complete or narrow the direct consumer set for a planned symbol change. |
22
- | `scip-query affected <symbol> --json` | Transitive closure of symbols that could break if this symbol changes | affected symbol identities, files, and traversal depths | `bounded` | Measure transitive impact when the change is not consumer-local. |
22
+ | `scip-query affected <symbol>` | Transitive closure of symbols that could break if this symbol changes | affected symbol identities, files, and traversal depths | `bounded` | Measure transitive impact when the change is not consumer-local. |
23
23
 
24
24
  Use this shortlist first. Open [`../_shared/SKILL.md`](../_shared/SKILL.md) only when it is insufficient.
25
25
  <!-- END GENERATED SKILL COMMANDS -->
@@ -4,15 +4,15 @@ Use before changing anything another process or person depends on: a callable, e
4
4
 
5
5
  ## Scenario: assess what breaks before editing a public surface
6
6
 
7
- **Step 1 — identify the actual surface.** Run `scip-query surface <module-or-package>`, `scip-query outline <file>`, `scip-query trace <symbol-or-command>`, `scip-query code <symbol-or-command>`, and `scip-query hierarchy <symbol> --json`. Done only when the real surface is named as one of: member, class, module, package, route, schema, command, or config field.
7
+ **Step 1 — identify the actual surface.** Run `scip-query surface <module-or-package>`, `scip-query outline <file>`, `scip-query trace <symbol-or-command>`, `scip-query code <symbol-or-command>`, and `scip-query hierarchy <symbol>`. Done only when the real surface is named as one of: member, class, module, package, route, schema, command, or config field.
8
8
 
9
- **Step 2 — find consumers.** Run `scip-query refs <symbol>`, `scip-query fan-in <symbol>`, `scip-query rdeps <file>`, `scip-query affected <symbol> --json`, and `scip-query change-surface <file> --json --full`. Record direct consumers separately from transitive consumers. Done only when direct breakage and regression blast radius are both known.
9
+ **Step 2 — find consumers.** Run `scip-query refs <symbol>`, `scip-query fan-in <symbol>`, `scip-query rdeps <file>`, `scip-query affected <symbol>`, and `scip-query change-surface <file> --full`. Record direct consumers separately from transitive consumers. Done only when direct breakage and regression blast radius are both known.
10
10
 
11
- **Step 3 — find hidden partners.** Run `scip-query co-change <file> --json --full` (files historically coupled without a dependency edge), `scip-query doc-drift --json --full` (docs describing the surface), `scip-query similar <symbol> --json --full`, and `scip-query similar-files <file> --json --full`. Docs, generated files, tests, and config count as part of the API when they describe or enforce the surface. Done only when docs, generated files, fixtures, sibling APIs, and hand-synchronized partners are accounted for or ruled out.
11
+ **Step 3 — find hidden partners.** Run `scip-query co-change <file> --full` (files historically coupled without a dependency edge), `scip-query doc-drift --full` (docs describing the surface), `scip-query similar <symbol> --full`, and `scip-query similar-files <file> --full`. Docs, generated files, tests, and config count as part of the API when they describe or enforce the surface. Done only when docs, generated files, fixtures, sibling APIs, and hand-synchronized partners are accounted for or ruled out.
12
12
 
13
- **Step 4 — choose the migration shape.** Pick one of: compatible extension, two-step migration, breaking coordinated change, or an adapter shim for external consumers/compatibility windows. Prefer backward-compatible migrations when consumers are broad or external. Reject speculative new parameters or empty wrappers using `scip-query unused-params --json --full`, `scip-query wrapper-candidates --json --full`, and `scip-query passthrough-candidates --json --full`. Done only when the migration shape explains deploy order, rollback, and compatibility risk.
13
+ **Step 4 — choose the migration shape.** Pick one of: compatible extension, two-step migration, breaking coordinated change, or an adapter shim for external consumers/compatibility windows. Prefer backward-compatible migrations when consumers are broad or external. Reject speculative new parameters or empty wrappers using `scip-query unused-params --full`, `scip-query wrapper-candidates --full`, and `scip-query passthrough-candidates --full`. Done only when the migration shape explains deploy order, rollback, and compatibility risk.
14
14
 
15
- **Step 5 — write the plan and verify.** Plan template: Surface; a Consumer dispositions table (Consumer | Kind: direct/transitive/doc/config/test | Disposition: unchanged-safe/update/shim/defer); Required co-changes; Migration; Verification (targeted tests, `scip-query diff-impact --json`, `scip-verify`, `scip-query doc-drift --json --full` if docs changed, `scip-query config-validate` if config changed). Every consumer returned by refs/affected must appear as a row — a blank disposition means the analysis is unfinished. Non-indexed consumers (SQL, fixtures, dynamic strings, external callers) must be checked with `rg` and rowed the same way as indexed consumers.
15
+ **Step 5 — write the plan and verify.** Plan template: Surface; a Consumer dispositions table (Consumer | Kind: direct/transitive/doc/config/test | Disposition: unchanged-safe/update/shim/defer); Required co-changes; Migration; Verification (targeted tests, `scip-query diff-impact`, `scip-verify`, `scip-query doc-drift --full` if docs changed, `scip-query config-validate` if config changed). Every consumer returned by refs/affected must appear as a row — a blank disposition means the analysis is unfinished. Non-indexed consumers (SQL, fixtures, dynamic strings, external callers) must be checked with `rg` and rowed the same way as indexed consumers.
16
16
 
17
17
  After editing, run the routed checks from `_shared` and invoke `scip-verify`. The workflow is complete only when direct consumers, docs/config partners, and scip-verify have all been checked.
18
18
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  This governs running a program of work — planning, delegation, review, closure — across multiple steps, not how to write a single change plan (use the main SKILL.md's ordinary-mode scenario, or `references/high-assurance.md`, for that). Act like a skeptical principal engineer.
4
4
 
5
- Key commands: `scip-query plan-context <target>` anchors each phase's step before delegating it; `scip-query diff-gate --json` verifies a handoff before accepting it and before closing the program; `scip-query health --json` pre-registers or checks a program-level health benchmark.
5
+ Key commands: `scip-query plan-context <target>` anchors each phase's step before delegating it; `scip-query diff-gate` verifies a handoff before accepting it and before closing the program; `scip-query health` pre-registers or checks a program-level health benchmark.
6
6
 
7
7
  ## The three laws
8
8
 
@@ -24,7 +24,7 @@ Working agreement to include in the plan: ONE COMMIT PER STEP — bisectability
24
24
 
25
25
  Delegate breadth, keep judgment: fan out mechanical/scoped work to subagents, but personally own anything requiring taste, cross-cutting context, or the final word on "is this real." Concurrent agents must get disjoint write scopes, named in their briefs; if a collision happens anyway, stop racing, apply-verify-commit atomically in one action, and re-sequence to a single writer.
26
26
 
27
- Never accept a report at face value — reproduce its evidence. On every handoff, choose the minimal discriminating probe (the one command most likely to expose the report being wrong: a mutation input, a hand count, the benchmark number) and run it yourself; a report verified only by reading it is not verified. Loop until `scip-query diff-gate --json` is quiet: fix, re-run the discriminating probe, re-run the gate, and only then move on.
27
+ Never accept a report at face value — reproduce its evidence. On every handoff, choose the minimal discriminating probe (the one command most likely to expose the report being wrong: a mutation input, a hand count, the benchmark number) and run it yourself; a report verified only by reading it is not verified. Loop until `scip-query diff-gate` is quiet: fix, re-run the discriminating probe, re-run the gate, and only then move on.
28
28
 
29
29
  Verify your verifier: a gate check that cannot fail is no gate (e.g. a lint grep that only matches one linter's output, a diff-gate run on a clean tree, a test suite that skips the new path) — prove the check catches a planted failure once before trusting its green. After any "all green," ask what that check does NOT cover (eslint vs prettier; unit vs integration; clean-tree vacuity).
30
30
 
@@ -33,7 +33,7 @@ QUICK mode skips this and goes straight to tracing behavior, using the single ru
33
33
 
34
34
  ## Scenario: trace behavior
35
35
 
36
- Run `scip-query plan-context`, `trace`, `call-graph`, `code`, `dataflow`, and `complexity` on the entry/hot symbol — `call-graph <entry-symbol>` returns callers/callees, `complexity <hot-symbol>` returns LOC, branch, complexity, callee, fan-in/out counts — then `scip-query change-surface <touched-file> --json --full` to verify blast radius. Record input parsing, option resolution, subprocesses, lookups, database queries, graph traversal, source scans, semantic calls, cache reads/writes, rendering, serialization, and verification. Done only when each major pipeline step can be timed as a profile span.
36
+ Run `scip-query plan-context`, `trace`, `call-graph`, `code`, `dataflow`, and `complexity` on the entry/hot symbol — `call-graph <entry-symbol>` returns callers/callees, `complexity <hot-symbol>` returns LOC, branch, complexity, callee, fan-in/out counts — then `scip-query change-surface <touched-file> --full` to verify blast radius. Record input parsing, option resolution, subprocesses, lookups, database queries, graph traversal, source scans, semantic calls, cache reads/writes, rendering, serialization, and verification. Done only when each major pipeline step can be timed as a profile span.
37
37
 
38
38
  Before adding profiling spans, check whether the target app already has an instrumentation layer — a bespoke profiling harness competes with the one the codebase already trusts. When the optimization target is scip-query itself, its instrumentation is `src/instrumentation/profile.ts` (`profileSpan`/`profileAsyncSpan`), env-gated by `SCIP_QUERY_PROFILE` and `SCIP_QUERY_PROFILE_OUT`, with `SCIP_QUERY_PROFILE_CACHE_STATE` for cache-state labels and inherited workload/subsystem identities — use it instead of adding a parallel harness.
39
39
 
@@ -17,6 +17,16 @@ insufficient. The shared reference contains the complete command vocabulary,
17
17
  coverage rules, and evidence contract; loading it before a route is selected
18
18
  adds choices without adding direction.
19
19
 
20
+ Run commands normally for agent reading: the human renderer preserves
21
+ hierarchy, whitespace, and line numbers without transport metadata. Select
22
+ `--json` only when a program will parse the response; add `--result-only` when
23
+ that program needs only the command result rather than the stable public
24
+ envelope. Do not select `--compact` or `--output-page-size` for readability.
25
+ Follow an emitted continuation command only when the command itself says the
26
+ output is incomplete. The final transport-complete footer means every rendered
27
+ character was retrieved; inspect command coverage separately before claiming
28
+ the logical result is exhaustive.
29
+
20
30
  ## Routes
21
31
 
22
32
  | The request starts from… | Owning skill | Completion criterion |
@@ -62,11 +72,11 @@ Top commands per routed skill, generated from each skill's own `commands:` front
62
72
 
63
73
  | Skill | Top commands |
64
74
  | --- | --- |
65
- | `scip-audit` | `scip-query health --json`, `scip-query decorative-checkers --json --full`, `scip-query doc-drift --json --full` |
75
+ | `scip-audit` | `scip-query health`, `scip-query decorative-checkers --full`, `scip-query doc-drift --full` |
66
76
  | `scip-diagnose` | `scip-query files <feature-or-error-term>`, `scip-query trace <candidate-symbol>`, `scip-query call-graph <entry-symbol>` |
67
- | `scip-explore` | `scip-query system <module-or-scope>`, `scip-query trace <entry-symbol>`, `scip-query affected <symbol> --json` |
68
- | `scip-improve` | `scip-query cleanup-plan --verify --json`, `scip-query cleanup-apply --verified --batch <n>`, `scip-query diff-gate --json --compact` |
69
- | `scip-plan` | `scip-query plan-context <target>`, `scip-query refs <symbol>`, `scip-query affected <symbol> --json` |
77
+ | `scip-explore` | `scip-query system <module-or-scope>`, `scip-query trace <entry-symbol>`, `scip-query affected <symbol>` |
78
+ | `scip-improve` | `scip-query cleanup-plan --verify`, `scip-query cleanup-apply --verified --batch <n> --dry-run`, `scip-query diff-gate` |
79
+ | `scip-plan` | `scip-query plan-context <target>`, `scip-query refs <symbol>`, `scip-query affected <symbol>` |
70
80
  | `scip-setup` | `scip-query setup --json`, `scip-query doctor`, `scip-query status --capabilities` |
71
- | `scip-verify` | `scip-query doctor`, `scip-query diff-impact --json`, `scip-query diff-gate --json --compact` |
81
+ | `scip-verify` | `scip-query doctor`, `scip-query diff-impact`, `scip-query diff-gate` |
72
82
  <!-- END GENERATED ROUTER COMMAND PREVIEW -->
@@ -58,15 +58,14 @@ every written, skipped, or blocked artifact.
58
58
 
59
59
  ```bash
60
60
  scip-query doctor
61
- scip-query status --json
61
+ scip-query status
62
62
  scip-query capabilities --matrix
63
- scip-query config-validate --json
63
+ scip-query config-validate
64
64
  ```
65
65
 
66
- `doctor` is the human diagnostic surface for config, index freshness, and
67
- dependency readiness. `status --json` is the machine surface for freshness
68
- and config. `capabilities --matrix` reports which evidence/verification
69
- capabilities are available. `config-validate --json` validates
66
+ `doctor` reports config, index freshness, and dependency readiness. `status`
67
+ reports freshness and config. `capabilities --matrix` reports which
68
+ evidence/verification capabilities are available. `config-validate` validates
70
69
  `.scipquery.json`.
71
70
 
72
71
  Fix missing indexers, stale indexes, invalid config, or unavailable
@@ -84,8 +83,8 @@ language and how to interpret `stopped`/idle service states.
84
83
 
85
84
  ```bash
86
85
  scip-query status --capabilities
87
- scip-query reindex --json
88
- scip-query watch --status --json
86
+ scip-query reindex
87
+ scip-query watch --status
89
88
  ```
90
89
 
91
90
  Complete only when every selected language has an explicit
@@ -56,6 +56,6 @@ never as a clean semantic analysis.
56
56
 
57
57
  ```bash
58
58
  scip-query status --capabilities
59
- scip-query reindex --json
60
- scip-query watch --status --json
59
+ scip-query reindex
60
+ scip-query watch --status
61
61
  ```
@@ -4,7 +4,7 @@ New repos surface standing findings that are intentional. Encode them once so
4
4
  every later gate run is precise, instead of re-litigating the same findings
5
5
  every time `diff-gate` runs.
6
6
 
7
- 1. Sweep initial findings with `health --json` and `diff-gate --json`. For
7
+ 1. Sweep initial findings with `health` and `diff-gate`. For
8
8
  each accepted finding, run `suppress <id> --reason <why>` — reasons are
9
9
  required and audited.
10
10
  2. Declare files that legitimately change together in `.scipquery.json`
@@ -4,9 +4,9 @@ description: Use after finishing a change and before committing: ensure the watc
4
4
  commands:
5
5
  - template: "scip-query doctor"
6
6
  when: "Prove the workspace and configuration are usable before trusting evidence."
7
- - template: "scip-query diff-impact --json"
7
+ - template: "scip-query diff-impact"
8
8
  when: "Compare changed files, symbols, and affected consumers with the intended diff."
9
- - template: "scip-query diff-gate --json --compact"
9
+ - template: "scip-query diff-gate"
10
10
  when: "Run the complete finished-diff gate without blind line truncation."
11
11
  ---
12
12
 
@@ -32,8 +32,8 @@ Load shared mechanics — command syntax, the evidence contract, diff-gate's
32
32
  | Command | Purpose | Returns | Coverage | When |
33
33
  | --- | --- | --- | --- | --- |
34
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. |
35
+ | `scip-query diff-impact` | 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` | 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. |
37
37
 
38
38
  Use this shortlist first. Open [`../_shared/SKILL.md`](../_shared/SKILL.md) only when it is insufficient.
39
39
  <!-- END GENERATED SKILL COMMANDS -->
@@ -67,7 +67,7 @@ environment and index freshness before trusting any graph fact that follows.
67
67
  ### 2. Assess the diff
68
68
 
69
69
  ```bash
70
- scip-query diff-impact --json
70
+ scip-query diff-impact
71
71
  ```
72
72
 
73
73
  Compare changed files, changed symbols, and downstream consumers against the
@@ -91,8 +91,8 @@ you expected to need going in:
91
91
  | Changed React components or hooks | the React commands in `_shared` |
92
92
  | Changed Vue SFCs or composables | the Vue commands in `_shared` |
93
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
94
+ Add `--full` to any of these when an unbounded result is needed rather than
95
+ the bounded default. This table is authoritative — the
96
96
  shared reference links here instead of duplicating it, so don't assume a
97
97
  different mapping. Complete only when each applicable postcheck has a result
98
98
  and every actionable finding is fixed, accepted with evidence, or blocked by
@@ -108,7 +108,7 @@ scip-query config-validate
108
108
  ### 4. Run the gate
109
109
 
110
110
  ```bash
111
- scip-query diff-gate --json
111
+ scip-query diff-gate
112
112
  ```
113
113
 
114
114
  This is the primary blocker for diff-specific risk: architecture regressions
@@ -142,7 +142,7 @@ when a committed baseline exists. If docs, AGENTS.md, CLAUDE.md, command
142
142
  docs, generated docs, or skill instructions changed, run
143
143
 
144
144
  ```bash
145
- scip-query doc-drift --json --full
145
+ scip-query doc-drift --full
146
146
  ```
147
147
 
148
148
  and read the returned stale-doc candidates against the diff.
@@ -202,7 +202,7 @@ Postchecks:
202
202
  - <command>: <result>
203
203
 
204
204
  Gate:
205
- - `scip-query diff-gate --json`: <result>
205
+ - `scip-query diff-gate`: <result>
206
206
 
207
207
  Health/docs/self-audit:
208
208
  - <commands and results>
@@ -43,10 +43,10 @@ Run the full detector battery and don't react to any of the numbers yet —
43
43
  big counts here are sampling frames, not findings:
44
44
 
45
45
  ```bash
46
- scip-query health --json
47
- scip-query dead --json
46
+ scip-query health
47
+ scip-query dead
48
48
  scip-query similar <symbol>
49
- scip-query twin-drift -s <scope> --json
49
+ scip-query twin-drift -s <scope>
50
50
  ```
51
51
 
52
52
  Complete only when every detector's finding count is recorded.
@@ -57,7 +57,7 @@ Replay the gate against the last 15-20 real commits, using a worktree per
57
57
  commit — never the user's live tree:
58
58
 
59
59
  ```bash
60
- scip-query diff-gate --base <commit> --json
60
+ scip-query diff-gate --base <commit>
61
61
  ```
62
62
 
63
63
  This is the stage that exposes finding WALLS: one hub file or one convention
@@ -114,7 +114,7 @@ until it's fixed.
114
114
  Confirm the repair:
115
115
 
116
116
  ```bash
117
- scip-query diff-gate --json
117
+ scip-query diff-gate
118
118
  ```
119
119
 
120
120
  run before and after, to check it worked.
@@ -147,11 +147,11 @@ Each of these has been observed in a real calibration:
147
147
 
148
148
  The finding-outcome ledger keeps calibrating automatically. Once the repo
149
149
  uses `diff-gate`, per-detector precision is recomputed from real outcomes as
150
- `detectorPrecision` in `health --json`. The committed event ledger under
150
+ `detectorPrecision` in `health`. The committed event ledger under
151
151
  `.scipquery/events/*.json` makes those outcomes durable and queryable:
152
152
 
153
153
  ```bash
154
- scip-query effectiveness --since 30d --json
154
+ scip-query effectiveness --since 30d
155
155
  ```
156
156
 
157
157
  reports, per check, caught / comparison-verified-fixed / suppressed / open /
@@ -1,3 +0,0 @@
1
- #!/usr/bin/env node
2
- import{$c as A,Aa as D,Ba as b,Cd as me,Dd as ge,Ea as se,Fa as E,Ga as M,Na as oe,Oa as ae,Qa as R,Ra as G,Rd as ye,Sa as ce,Sd as Se,Ua as j,Va as de,Wa as ue,Yd as ve,Za as N,ad as le,bd as pe,f as I,id as $,ld as F,md as he,n as re,nd as H,od as fe,x as v,xa as y,ya as ne,za as ie}from"./chunk-HIB452NU.js";import{spawn as dt}from"child_process";import{existsSync as ut,rmSync as ke}from"fs";import{dirname as lt,resolve as L}from"path";import{fileURLToPath as pt}from"url";import{createHash as He,randomUUID as Ie}from"crypto";import{existsSync as Ve,linkSync as Ue,mkdirSync as Re,readdirSync as Be,rmSync as ze}from"fs";import{basename as Ke,dirname as Je,join as S}from"path";var T=1,Ye=10*6e4,_t=10080*6e4,V="requests",Qe="claims",Xe="completions",Ze="staging";function we(e,t,r={}){let n=r.now?.()??new Date,i=ot(r.ttlMs),s=at(r.idempotencyKey),a=s?`key-${He("sha256").update(s).digest("hex")}`:`request-${(r.randomId??Ie)()}`,o={version:T,requestId:a,...s?{idempotencyKey:s}:{},createdAt:n.toISOString(),deadlineAt:new Date(n.getTime()+i).toISOString(),detail:t.trim().slice(0,2048)||"stale index observed by a command"},c=st(e,a);if(rt(e,c,o,r.onStage))return{disposition:"accepted",request:o};let u=U(c);if(!u)throw new Error(`Watch refresh request identity ${a} exists but is malformed.`);return{disposition:"duplicate",request:u}}function Lt(e){let t=nt(e),r=new Map,n=it(S(e,V),U);for(let c of P(S(e,Xe))){let d=tt(c);if(!d){n++;continue}r.set(d.requestId,d)}let i=new Set;for(let c of P(S(e,Qe))){let d=et(c);if(!d){n++;continue}i.add(d.requestId)}let s=t.filter(c=>!r.has(c.requestId)&&!i.has(c.requestId)),a=[...r.values()].filter(c=>c.outcome==="completed").length,o=[...r.values()].filter(c=>c.outcome==="expired").length;return{pending:s.length,claimed:t.filter(c=>!r.has(c.requestId)&&i.has(c.requestId)).length,completed:a,expired:o,invalid:n,...s.length>0?{oldestPendingAt:s.map(c=>c.createdAt).reduce((c,d)=>ct(c,d))}:{}}}function U(e){return B(e,t=>{let r=t;return r.version===T&&w(r.requestId)&&(r.idempotencyKey===void 0||typeof r.idempotencyKey=="string")&&I(r.createdAt)&&I(r.deadlineAt)&&Date.parse(r.deadlineAt)>=Date.parse(r.createdAt)&&typeof r.detail=="string"&&r.detail.length>0})}function et(e){return B(e,t=>{let r=t;return r.version===T&&w(r.requestId)&&w(r.claimId)&&I(r.claimedAt)})}function tt(e){return B(e,t=>{let r=t;return r.version===T&&w(r.requestId)&&(r.claimId===void 0||w(r.claimId))&&(r.outcome==="completed"||r.outcome==="expired")&&I(r.completedAt)})}function rt(e,t,r,n){let i=S(e,Ze),s=Je(t);Re(i,{recursive:!0}),Re(s,{recursive:!0});let a=S(i,`${Ke(t)}.${process.pid}.${Ie()}.tmp`);try{M(a,r,{spacing:2,trailingNewline:!0}),n?.("after-staged");try{Ue(a,t)}catch(o){if(o.code==="EEXIST")return!1;throw o}return se(s),n?.("after-published"),!0}finally{ze(a,{force:!0})}}function nt(e){let t=[];for(let r of P(S(e,V))){let n=U(r);n&&t.push(n)}return t}function it(e,t){return P(e).filter(r=>!t(r)).length}function P(e,t=".json"){return Ve(e)?Be(e,{withFileTypes:!0}).filter(r=>r.isFile()&&r.name.endsWith(t)).map(r=>S(e,r.name)).sort():[]}function B(e,t){try{let r=JSON.parse(v(e,"watch refresh request record"));return t(r)?r:null}catch{return null}}function st(e,t){return S(e,V,`${t}.json`)}function ot(e){if(e===void 0)return Ye;if(!Number.isFinite(e)||e<=0)throw new Error("Watch refresh request ttlMs must be positive.");return Math.floor(e)}function at(e){let t=e?.trim();return t?t.slice(0,512):void 0}function w(e){return typeof e=="string"&&/^[a-z0-9][a-z0-9-]{0,127}$/i.test(e)}function ct(e,t){return Date.parse(t)<Date.parse(e)?t:e}var We=5e3,ht=2e3,be=10,ft=new Set(["bench","config-validate","hook-context","hook-stop","init","reindex","setup","setup-agent","setup-ci","setup-hooks","uninstall","watch","work-audit"]);function Kt(e){let t=e.classification;if(t.kind!=="live")return;let{state:r}=t;return r.watcher.state==="idle"&&r.lastError===void 0?r.indexGeneration:void 0}function mt(e,t=process.env){return t.SCIP_QUERY_SKIP_WATCH_SERVICE!=="1"&&!e.startsWith("__")&&!ft.has(e)}function Jt(e){let t=e.env??process.env;if(t.SCIP_QUERY_SKIP_WATCH_SERVICE==="1")return{kind:"skipped",reason:"environment"};if(!mt(e.commandName,t))return{kind:"skipped",reason:"excluded-command"};if(e.config.watch?.enabled!==!0)return{kind:"skipped",reason:"disabled"};try{let r=gt({projectRoot:e.projectRoot,cacheDir:e.cacheDir,cliVersion:e.cliVersion,gitContext:e.gitContext,runtime:e.runtime});return{kind:r.disposition,state:r.state}}catch(r){return{kind:"failed",message:r instanceof Error?r.message:String(r)}}}function Ee(e,t,r){let n=N(L(e));if(r&&N(r.projectRoot)===n)return{projectRoot:n,worktreeKind:"git",worktreeId:r.worktreeId,cliVersion:t};let i=de(n);if(i.kind==="error")throw new Error(`Could not establish Git worktree identity for ${n}: ${i.message}`);return i.kind==="non-git"?{projectRoot:n,worktreeKind:"non-git",cliVersion:t}:{projectRoot:n,worktreeKind:"git",worktreeId:i.identity.worktreeId,cliVersion:t}}function Yt(e){return q(e,Ee(e.projectRoot,e.cliVersion,e.gitContext))}function q(e,t){let r=e.runtime??Q,n=R(e.cacheDir),i=G(n.statePath),s=Y(n.lockPath);return{identity:t,classification:yt(i,t,r.now(),r.isProcessAlive),lock:s,lockIsLive:s!==null&&r.isProcessAlive(s.pid),paths:n}}function gt(e){let t=e.runtime??Q,r=Ee(e.projectRoot,e.cliVersion,e.gitContext),n=q(e,r),i=K("ensure",n.classification);if(i.kind==="reuse")return x(n.paths.activityPath,t),{disposition:"reused",state:i.state};if(i.kind==="refuse-replace")throw new Error(`scip-query watch service pid ${i.state.pid} is still alive but its heartbeat is old. Refusing automatic replacement because civil-clock age alone cannot authorize a process signal.`);if(i.kind==="replace")J(i.state,e,t),k(n.paths,i.state.pid,t);else if(i.kind==="start"){if(n.lockIsLive){let o=Ce(e,r,t,Math.min(e.startupTimeoutMs??1e3,1e3));if(o)return x(n.paths.activityPath,t),{disposition:"reused",state:o};throw new Error(`scip-query watch is already running for ${L(e.projectRoot)} (pid ${n.lock?.pid}; lock: ${n.paths.lockPath}) without compatible daemon state. Stop the foreground watcher before starting the service.`)}n.classification.kind==="stale"&&k(n.paths,n.classification.state.pid,t)}else throw new Error(`Unexpected ensure action: ${i.kind}`);if(n=q(e,r),i=K("ensure",n.classification),i.kind==="reuse")return x(n.paths.activityPath,t),{disposition:"reused",state:i.state};if(i.kind==="refuse-replace")throw new Error(`scip-query watch service pid ${i.state.pid} remains alive with an old heartbeat; automatic replacement is not authorized.`);let s=e.serverPath??pt(new URL("./watch-server.js",import.meta.url));t.spawnServer(s,r.projectRoot,e.cliVersion,e.watchOverrides??{});let a=Ce(e,r,t,e.startupTimeoutMs??We);if(!a)throw new Error(`scip-query watch service did not become ready within ${e.startupTimeoutMs??We}ms.`);return x(n.paths.activityPath,t),{disposition:"started",state:a}}function Ae(e){let t=e.runtime??Q,r=R(e.cacheDir),n=G(r.statePath),i=n?t.isProcessAlive(n.pid)?{kind:"live",state:n}:{kind:"stale",state:n,reason:"dead-process"}:{kind:"stopped"},s=K("stop",i);if(s.kind==="signal-stop")return J(s.state,e,t),k(r,s.state.pid,t),{disposition:"stopped",pid:s.state.pid};if(s.kind==="clean-stale")return k(r,s.state.pid,t),{disposition:"stopped",pid:s.state.pid};let a=Y(r.lockPath);return s.kind==="already-stopped"&&a&&t.isProcessAlive(a.pid)?(J(a,e,t),k(r,a.pid,t),{disposition:"stopped",pid:a.pid}):{disposition:"already-stopped"}}function Pe(e,t=Date.now()){E(e,{version:1,at:new Date(t).toISOString()})}function Qt(e,t,r=Date.now(),n={}){we(R(lt(e)).refreshRequestsPath,t,{...n,now:()=>new Date(r)}),Pe(e,r)}function Xt(e,t,r={}){let n=r.pid??process.pid,i=r.isProcessAlive??y,s=()=>{},a=r.readProcessIdentity??D,o=r.now??(()=>new Date),c={...F,wallNow:()=>o().getTime(),isProcessAlive:i,readProcessIdentity:a},d=he(e,{kind:"watch",pid:n,processIdentity:a(n),detail:{projectRoot:L(t)},parseLegacy:_,runtime:c});if(d.kind==="contended"){let u=Te(d.observation);return{acquired:!1,lockPath:e,message:St(e,t,u),release:s}}return{acquired:!0,lockPath:e,message:"",release:()=>{d.lock.release()}}}function Y(e){return Te(H(e,{parseLegacy:_}))}var _=e=>{let t=xe(e);return t?{pid:t.pid,...t.processIdentity?{processIdentity:t.processIdentity}:{}}:null};function Te(e){if(e.state==="valid"&&e.record?.kind==="watch"){let t=e.record.detail?.projectRoot;return typeof t!="string"?null:{version:1,pid:e.record.pid,...e.record.processIdentity?{processIdentity:e.record.processIdentity}:{},projectRoot:t,startedAt:e.record.startedAt}}return xe(e.parsed)}function xe(e){try{let t=e;if(t.version!==1||typeof t.pid!="number"||!Number.isInteger(t.pid)||t.pid<=0||typeof t.projectRoot!="string"||!ce(t.startedAt))return null;let r=t.processIdentity===void 0?null:ne(t.processIdentity);return t.processIdentity!==void 0&&(!r||r.pid!==t.pid)?null:{version:1,pid:t.pid,...r?{processIdentity:r}:{},projectRoot:t.projectRoot,startedAt:t.startedAt}}catch{return null}}function yt(e,t,r,n){if(!e)return{kind:"stopped"};if(e.protocolVersion!==oe)return{kind:"incompatible",state:e,reason:"protocol"};if(e.projectRoot!==t.projectRoot)return{kind:"incompatible",state:e,reason:"project"};let i=t.worktreeKind==="git"?t.worktreeId:void 0;if(e.worktreeId!==i)return{kind:"incompatible",state:e,reason:"worktree"};if(e.cliVersion!==t.cliVersion)return{kind:"incompatible",state:e,reason:"cli-version"};if(!n(e.pid))return{kind:"stale",state:e,reason:"dead-process"};let s=Date.parse(e.heartbeatAt);return r-s>ae?{kind:"stale",state:e,reason:"old-heartbeat"}:{kind:"live",state:e}}function K(e,t){switch(e){case"status":return{kind:"report",classification:t};case"ensure":switch(t.kind){case"stopped":return{kind:"start"};case"stale":return t.reason==="old-heartbeat"?{kind:"refuse-replace",state:t.state,reason:"old-heartbeat"}:{kind:"start"};case"live":return{kind:"reuse",state:t.state};case"incompatible":return{kind:"replace",state:t.state};default:return z(t)}case"stop":switch(t.kind){case"stopped":return{kind:"already-stopped"};case"stale":return t.reason==="old-heartbeat"?{kind:"signal-stop",state:t.state}:{kind:"clean-stale",state:t.state};case"live":case"incompatible":return{kind:"signal-stop",state:t.state};default:return z(t)}default:return z(e)}}function Ce(e,t,r,n){let i=r.monotonicNow??b,s=i()+n;for(;i()<=s;){let a=q(e,t).classification;if(a.kind==="live")return a.state;r.sleep(be)}return null}function J(e,t,r){let{pid:n}=e;if(!r.isProcessAlive(n))return;Rt(e,r),r.signalProcess(n);let i=t.stopTimeoutMs??ht,s=r.monotonicNow??b,a=s()+i;for(;s()<=a;){if(!r.isProcessAlive(n))return;r.sleep(be)}throw new Error(`scip-query watch service pid ${n} did not stop within ${i}ms.`)}function k(e,t,r){if(ke(e.statePath,{force:!0}),ke(e.activityPath,{force:!0}),Y(e.lockPath)?.pid===t&&!r.isProcessAlive(t)){let i={...F,wallNow:r.now,isProcessAlive:r.isProcessAlive,readProcessIdentity:r.readProcessIdentity},s=H(e.lockPath,{parseLegacy:_,runtime:i});fe(e.lockPath,s,{parseLegacy:_,runtime:i})}}function St(e,t,r){return`error: scip-query watch is already running for ${L(t)}${r?` (pid ${r.pid}, started ${r.startedAt}; lock: ${e})`:` (lock: ${e})`}. Stop that watcher before starting another.`}function x(e,t){try{(t.recordActivity??Pe)(e,t.now())}catch(r){let n=vt(r);if(n!=="EPERM"&&n!=="EACCES"&&n!=="EROFS")throw r}}function vt(e){return e.code}var Q={now:Date.now,monotonicNow:b,isProcessAlive:y,readProcessIdentity:D,spawnServer(e,t,r,n){if(!ut(e))throw new Error(`Watch service helper was not found at ${e}. Run npm run build first.`);dt(process.execPath,[e,t,r,JSON.stringify(n)],{detached:!0,stdio:"ignore",env:{...process.env,SCIP_QUERY_SKIP_WATCH_SERVICE:"1"}}).unref()},signalProcess(e){process.kill(e,"SIGTERM")},sleep(e){let t=new Int32Array(new SharedArrayBuffer(4));Atomics.wait(t,0,0,e)}};function Rt(e,t){if(!e.processIdentity)throw new Error(`Refusing to signal scip-query watch pid ${e.pid}: its ownership record has no process identity.`);let r=t.readProcessIdentity(e.pid);if(!r)throw new Error(`Refusing to signal scip-query watch pid ${e.pid}: its process identity is unavailable.`);if(!ie(e.processIdentity,r))throw new Error(`Refusing to signal scip-query watch pid ${e.pid}: its process identity does not match the ownership record.`)}function z(e){throw new Error(`Unhandled watch service value: ${JSON.stringify(e)}`)}import{existsSync as Oe,lstatSync as O,readdirSync as De,realpathSync as qe,rmSync as W,statSync as Me}from"fs";import{join as h,resolve as C,sep as _e}from"path";var It=3600*1e3,wt=2*1024*1024*1024,kt=300*1e3;function Wt(e){let t=e.leases.filter(o=>o.managed&&!o.live&&!o.busy),r=Ge(e.leases,e.locks),n={};for(let o of e.generations)r.has(o.generationId)||(n[o.generationId]=o.unreferencedAt??e.nowMs);let i=e.generations.filter(o=>!r.has(o.generationId)).sort((o,c)=>n[o.generationId]-n[c.generationId]||o.generationId.localeCompare(c.generationId)),s=new Set;for(let o of i)e.nowMs-n[o.generationId]>=e.policy.generationTtlMs&&s.add(o.generationId);let a=e.generations.filter(o=>!s.has(o.generationId)).reduce((o,c)=>o+c.size,0);for(let o of i){if(a<=e.policy.budgetBytes)break;s.has(o.generationId)||(s.add(o.generationId),a-=o.size)}for(let o of s)delete n[o];return{deleteWorktrees:t,deleteGenerations:e.generations.filter(o=>s.has(o.generationId)),deleteLocks:e.locks.filter(o=>!o.live),deleteTemporaries:e.temporaries.filter(o=>!o.live),protectedGenerationIds:[...r].sort(),unreferencedSince:n}}function Ge(e,t){let r=new Set(e.filter(n=>n.managed&&(n.live||n.busy)).flatMap(n=>[n.lease.baseGenerationId,n.lease.activeGenerationId]).filter(n=>n!==void 0));for(let n of t)n.live&&r.add(n.generationId);return r}function pr(e,t,r={}){if(!pe())return{kind:"disabled"};let n=j(e);if(!n)return{kind:"unavailable"};let i=h(A(),"repositories",n.repositoryId);if(!Oe(i))return{kind:"unavailable"};let s=(r.now??Date.now)(),a=h(i,"gc-state.json"),o=Fe(a);if(!r.force&&o&&s-Date.parse(o.lastSweepAt)<kt)return{kind:"throttled",sweptAt:o.lastSweepAt};let c=me(i,{now:()=>s});if(!c)return{kind:"busy"};try{let d=je(e,i,n.repositoryId,o?.unreferencedSince??{}),u=Wt({nowMs:s,...d,policy:{generationTtlMs:r.policy?.generationTtlMs??It,budgetBytes:r.policy?.budgetBytes??wt}}),p=0,f=0;for(let l of u.deleteWorktrees){if(!Ne(l.lease))continue;let te=ge(h(l.lease.localCacheDir,"cache-lifecycle.lock"));if(te)try{if(Z(l.lease,!0))continue;try{Ae({projectRoot:l.lease.projectRoot,cacheDir:l.lease.localCacheDir,cliVersion:t})}catch{continue}if(Z(l.lease,!0))continue;W(l.lease.localCacheDir,{recursive:!0,force:!0}),W(l.leasePath,{force:!0}),f+=1}finally{te.release()}}for(let l of u.deleteLocks)W(l.path,{force:!0});for(let l of u.deleteTemporaries)W(l.path,{recursive:!0,force:!0});for(let l of u.deleteGenerations)W(l.path,{recursive:!0,force:!0}),p+=l.size;re(h(i,"evidence.db"));let g={kind:"swept",sweptAt:new Date(s).toISOString(),deletedWorktrees:f,deletedGenerations:u.deleteGenerations.length,deletedBytes:p,protectedGenerations:u.protectedGenerationIds.length},m={version:1,lastSweepAt:g.sweptAt,unreferencedSince:u.unreferencedSince,lastResult:g};return E(a,m,{spacing:2,trailingNewline:!0}),g}catch(d){return{kind:"failed",error:d instanceof Error?d.message:String(d)}}finally{c.release()}}function hr(e,t,r){let n=ye(e,r.dbPath,t);if(n)return{state:"bypassed",reason:n,localCacheDir:r.cacheDir,generations:0,generationBytes:0,protectedGenerations:0,unreferencedGenerations:0,unreferencedBytes:0,temporaryGenerations:0,sharedEvidence:{exists:!1,bytes:0}};let i=j(e);if(!i)return{state:"unavailable",reason:"Git worktree identity is unavailable",localCacheDir:r.cacheDir,generations:0,generationBytes:0,protectedGenerations:0,unreferencedGenerations:0,unreferencedBytes:0,temporaryGenerations:0,sharedEvidence:{exists:!1,bytes:0}};let s=h(A(),"repositories",i.repositoryId),a=$e(h(s,"worktrees",`${i.worktreeId}.json`)),o=Fe(h(s,"gc-state.json")),c=je(e,s,i.repositoryId,o?.unreferencedSince??{}),d=Ge(c.leases,c.locks),u=c.generations.filter(m=>!d.has(m.generationId)),p=c.generations.reduce((m,l)=>m+l.size,0),f=Se(e,t),g=0;return f&&(g=Ct(f)),{state:"managed",repositoryId:i.repositoryId,worktreeId:i.worktreeId,localCacheDir:r.cacheDir,...a?{baseGenerationId:a.baseGenerationId,activeGenerationId:a.activeGenerationId,lastAction:a.lastAction,reason:a.lastReason,lastSeenAt:a.lastSeenAt}:{},generations:c.generations.length,generationBytes:p,protectedGenerations:c.generations.filter(m=>d.has(m.generationId)).length,unreferencedGenerations:u.length,unreferencedBytes:u.reduce((m,l)=>m+l.size,0),temporaryGenerations:c.temporaries.length,sharedEvidence:{path:f,exists:g>0,bytes:g},cleanup:o?.lastResult}}function Ct(e){return[e,`${e}-wal`,`${e}-shm`].reduce((t,r)=>{try{return t+Me(r).size}catch{return t}},0)}function je(e,t,r,n){let i=new Set(ue(e).map(d=>C(d.path))),s=[];for(let d of X(h(t,"worktrees"))){if(!d.endsWith(".json"))continue;let u=h(t,"worktrees",d),p=$e(u);if(!p)continue;let f=C(p.projectRoot);s.push({leasePath:u,lease:p,managed:p.repositoryId===r&&Ne(p),live:i.has(f)||Oe(f),busy:Z(p)})}let a=[];for(let d of X(h(t,"locks"))){let u=/^([a-f0-9]{64})\.lock$/.exec(d);if(!u)continue;let p=h(t,"locks",d),f=ee(p),g=f!==void 0&&y(f),m=u[1];a.push({generationId:m,path:p,live:g})}let o=[],c=[];for(let d of X(h(t,"generations"))){let u=/^\.tmp-(\d+)-/.exec(d);if(u){let g=h(t,"generations",d),m=Number(u[1]);try{c.push({path:g,size:Le(g),live:Number.isSafeInteger(m)&&y(m)})}catch{}continue}if(!/^[a-f0-9]{64}$/.test(d))continue;let p=h(t,"generations",d),f;try{f=O(p)}catch{continue}!f.isDirectory()||f.isSymbolicLink()||o.push({generationId:d,path:p,size:Le(p),...n[d]===void 0?{}:{unreferencedAt:n[d]}})}return{leases:s,generations:o,locks:a,temporaries:c}}function Ne(e){if(e.ownershipChecksum!==ve(e)||$(e.localCacheDir)!==$(le(e.projectRoot)))return!1;let t=C(A()),r=C(h(t,"projects")),n=C(e.localCacheDir);if(!n.startsWith(`${r}${_e}`))return!1;try{let i=O(t),s=O(r),a=O(n);if(!i.isDirectory()||i.isSymbolicLink()||!s.isDirectory()||s.isSymbolicLink()||!a.isDirectory()||a.isSymbolicLink())return!1;let o=qe(r);return qe(n).startsWith(`${o}${_e}`)}catch{return!1}}function Z(e,t=!1){for(let n of t?["index.lock"]:["index.lock","cache-lifecycle.lock"]){let i=ee(h(e.localCacheDir,n));if(i!==void 0&&y(i))return!0}let r=ee(R(e.localCacheDir).lockPath);return r!==void 0&&y(r)}function $e(e){try{let t=JSON.parse(v(e,"worktree cache lease"));return t.version!==1||typeof t.repositoryId!="string"||typeof t.worktreeId!="string"||typeof t.projectRoot!="string"||t.treeOid!==void 0&&typeof t.treeOid!="string"||typeof t.localCacheDir!="string"||t.baseGenerationId!==void 0&&typeof t.baseGenerationId!="string"||t.activeGenerationId!==void 0&&typeof t.activeGenerationId!="string"||typeof t.ownershipChecksum!="string"||!/^[a-f0-9]{64}$/.test(t.ownershipChecksum)||typeof t.lastAction!="string"||t.lastReason!==void 0&&typeof t.lastReason!="string"||typeof t.lastSeenAt!="string"?null:t}catch{return null}}function ee(e){try{let t=JSON.parse(v(e,"watch lock record"));return typeof t.pid=="number"&&Number.isSafeInteger(t.pid)&&t.pid>0?t.pid:void 0}catch{return}}function Fe(e){try{let t=JSON.parse(v(e,"repository cache GC state"));return t.version!==1||typeof t.lastSweepAt!="string"||!Number.isFinite(Date.parse(t.lastSweepAt))||!t.unreferencedSince||typeof t.unreferencedSince!="object"||!t.lastResult?null:t}catch{return null}}function X(e){try{return De(e)}catch{return[]}}function Le(e){let t=0,r=[e];for(;r.length>0;){let n=r.pop();for(let i of De(n,{withFileTypes:!0})){let s=h(n,i.name);i.isDirectory()?r.push(s):i.isFile()&&(t+=Me(s).size)}}return t}export{Lt as a,Kt as b,mt as c,Jt as d,Yt as e,gt as f,Ae as g,Qt as h,Xt as i,pr as j,hr as k};
3
- //# sourceMappingURL=chunk-2465DLHK.js.map