scip-query 0.10.11 → 0.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (374) hide show
  1. package/CHANGELOG.md +45 -0
  2. package/{vendor/scip/LICENSE.scip → LICENSE} +1 -0
  3. package/README.md +168 -55
  4. package/dist/augment-vue-worker.js +1 -1
  5. package/dist/chunk-2VSDXOG5.js +2 -0
  6. package/dist/chunk-343O6EVV.js +2 -0
  7. package/dist/chunk-3KDUITBE.js +7 -0
  8. package/dist/chunk-3T2FNHIU.js +2 -0
  9. package/dist/chunk-3V6JQQM5.js +2 -0
  10. package/dist/chunk-5AAAEZ2Z.js +2 -0
  11. package/dist/chunk-6Q6OFLFQ.js +8 -0
  12. package/dist/chunk-6XA4LDHY.js +2 -0
  13. package/dist/chunk-75X52JTA.js +2 -0
  14. package/dist/{chunk-54KGX7EX.js → chunk-7HB3CZFD.js} +2 -2
  15. package/dist/chunk-7JZRFDCU.js +2 -0
  16. package/dist/chunk-7XL7J7PT.js +3 -0
  17. package/dist/chunk-ALHNAPS2.js +2 -0
  18. package/dist/{chunk-JATUZIEH.js → chunk-BDRBPG7Y.js} +2 -2
  19. package/dist/chunk-BN5SXXQS.js +40 -0
  20. package/dist/chunk-C4ICAIJ4.js +3 -0
  21. package/dist/{chunk-LSET2TXH.js → chunk-CMHYBXJB.js} +2 -2
  22. package/dist/{chunk-YWYFU2V3.js → chunk-DRPAQAFM.js} +6 -6
  23. package/dist/chunk-FERAXG6Y.js +72 -0
  24. package/dist/chunk-FLJJLSGB.js +2 -0
  25. package/dist/chunk-FXG3PHVW.js +9 -0
  26. package/dist/chunk-GCN2P4EJ.js +2 -0
  27. package/dist/chunk-GHXRVCIY.js +21 -0
  28. package/dist/chunk-GNG622H3.js +3 -0
  29. package/dist/chunk-H4LUPLEJ.js +2 -0
  30. package/dist/{chunk-BASVXNY3.js → chunk-H56MGERE.js} +4 -4
  31. package/dist/chunk-H7NSJ7L2.js +5 -0
  32. package/dist/chunk-HINMXZ6J.js +2 -0
  33. package/dist/chunk-HXXMPYEF.js +2 -0
  34. package/dist/{chunk-Z3YYR4OS.js → chunk-HZKMEXA3.js} +2 -2
  35. package/dist/chunk-IFSX6YVU.js +4 -0
  36. package/dist/chunk-ISLWJ4PY.js +10 -0
  37. package/dist/chunk-J5WVNZ6O.js +2 -0
  38. package/dist/chunk-K2HYR5A7.js +3 -0
  39. package/dist/chunk-K6UI6EBZ.js +2 -0
  40. package/dist/chunk-KJCDEDQW.js +2 -0
  41. package/dist/{chunk-Z4HICZGY.js → chunk-KKMOB3OJ.js} +2 -2
  42. package/dist/{chunk-YWOOQ4FF.js → chunk-KMVGRIO2.js} +2 -2
  43. package/dist/chunk-LWOOTRHC.js +2 -0
  44. package/dist/{chunk-EY43NV4M.js → chunk-LZNLRE4X.js} +17 -8
  45. package/dist/chunk-M2YXL62V.js +23 -0
  46. package/dist/chunk-MNEJYEHW.js +3 -0
  47. package/dist/chunk-MTDBHTSF.js +2 -0
  48. package/dist/{chunk-ZQDIXAF5.js → chunk-N2Z3CU7X.js} +2 -2
  49. package/dist/chunk-N7PNFLGY.js +2 -0
  50. package/dist/chunk-NAH5EAZS.js +6 -0
  51. package/dist/chunk-NBXK32I6.js +2 -0
  52. package/dist/chunk-NJJ7AS4F.js +2 -0
  53. package/dist/{chunk-FDEQIPPK.js → chunk-NLMRJ7SI.js} +2 -2
  54. package/dist/chunk-ODVITBYU.js +26 -0
  55. package/dist/chunk-ORBRX2QJ.js +2 -0
  56. package/dist/chunk-P36UR5II.js +2 -0
  57. package/dist/chunk-PYZZBIEU.js +3 -0
  58. package/dist/chunk-PZS6J5YG.js +16 -0
  59. package/dist/{chunk-LM5SHAN4.js → chunk-QARYU7R3.js} +2 -2
  60. package/dist/chunk-QJ3FK4TB.js +38 -0
  61. package/dist/chunk-QXGTGE2C.js +35 -0
  62. package/dist/chunk-QZ4JVECJ.js +2 -0
  63. package/dist/chunk-R3JY4EZ4.js +102 -0
  64. package/dist/{chunk-VOYOYC5T.js → chunk-R5336VHZ.js} +2 -2
  65. package/dist/chunk-RJMXSHKM.js +2 -0
  66. package/dist/chunk-STBXCPKY.js +5 -0
  67. package/dist/chunk-T2FQ4GHD.js +9 -0
  68. package/dist/chunk-TFWDJDGO.js +2 -0
  69. package/dist/chunk-TG7QSYCJ.js +2 -0
  70. package/dist/{chunk-FKCGBZAC.js → chunk-TTS75UF2.js} +5 -5
  71. package/dist/{chunk-BVRS7RKQ.js → chunk-U7I373V4.js} +2 -2
  72. package/dist/chunk-UIKLA3F5.js +2 -0
  73. package/dist/{chunk-P753MDDE.js → chunk-UMPNL7T6.js} +2 -2
  74. package/dist/chunk-URSSPS5H.js +2 -0
  75. package/dist/chunk-VGMUFW3J.js +2 -0
  76. package/dist/chunk-VXTNADIW.js +18 -0
  77. package/dist/chunk-VYF5HA76.js +2 -0
  78. package/dist/chunk-WFGOH2UI.js +43 -0
  79. package/dist/chunk-WGA5BBTA.js +4 -0
  80. package/dist/chunk-WIBFXSYB.js +6 -0
  81. package/dist/chunk-WPSS37EW.js +2 -0
  82. package/dist/chunk-WQHWIVA7.js +3 -0
  83. package/dist/chunk-WS3Z6W3M.js +65 -0
  84. package/dist/chunk-WXVGNFAO.js +2 -0
  85. package/dist/{chunk-6LJHXREW.js → chunk-WZLPXFZU.js} +2 -2
  86. package/dist/chunk-X4O6K47U.js +2 -0
  87. package/dist/chunk-X6OGDTQH.js +2 -0
  88. package/dist/chunk-XEMQUN3Z.js +20 -0
  89. package/dist/{chunk-7B6LP46R.js → chunk-XHWLNQVZ.js} +2 -2
  90. package/dist/chunk-XMR747CP.js +2 -0
  91. package/dist/chunk-Y6L4LXPG.js +2 -0
  92. package/dist/chunk-YCPASUCX.js +2 -0
  93. package/dist/chunk-YZXV3CU3.js +60 -0
  94. package/dist/chunk-ZEKBR4OK.js +10 -0
  95. package/dist/chunk-ZMGBWSFZ.js +2 -0
  96. package/dist/cli.js +462 -274
  97. package/dist/{config-types-BDIWAYzr.d.ts → config-types-BrHl3Bge.d.ts} +61 -1
  98. package/dist/{db-Djj3Nqrb.d.ts → db-_Bdx0E1W.d.ts} +1 -1
  99. package/dist/diff-gate-types-CG2YQ_ei.d.ts +4 -0
  100. package/dist/{frontend-behavior-evidence-BxKpKWUu.d.ts → frontend-behavior-evidence-EfM4_9bc.d.ts} +1 -1
  101. package/dist/{health-D5J42g4D.d.ts → health-BEZ1Rt0S.d.ts} +54 -2
  102. package/dist/index.d.ts +10 -70
  103. package/dist/index.js +2 -2
  104. package/dist/postinstall.js +1 -4
  105. package/dist/queries/affected.d.ts +2 -2
  106. package/dist/queries/affected.js +1 -1
  107. package/dist/queries/bottlenecks.d.ts +2 -2
  108. package/dist/queries/bottlenecks.js +1 -1
  109. package/dist/queries/by-kind.d.ts +2 -2
  110. package/dist/queries/by-kind.js +1 -1
  111. package/dist/queries/call-graph.d.ts +2 -2
  112. package/dist/queries/call-graph.js +1 -1
  113. package/dist/queries/change-surface.d.ts +2 -2
  114. package/dist/queries/change-surface.js +1 -1
  115. package/dist/queries/cleanup-plan.d.ts +2 -2
  116. package/dist/queries/cleanup-plan.js +1 -1
  117. package/dist/queries/co-change.d.ts +12 -2
  118. package/dist/queries/co-change.js +1 -1
  119. package/dist/queries/code.d.ts +2 -2
  120. package/dist/queries/code.js +1 -1
  121. package/dist/queries/complexity-hotspots.d.ts +7 -3
  122. package/dist/queries/complexity-hotspots.js +1 -1
  123. package/dist/queries/complexity.d.ts +42 -4
  124. package/dist/queries/complexity.js +1 -1
  125. package/dist/queries/convergence.d.ts +2 -2
  126. package/dist/queries/convergence.js +1 -1
  127. package/dist/queries/coupling.d.ts +2 -2
  128. package/dist/queries/coupling.js +1 -1
  129. package/dist/queries/cycles.d.ts +12 -3
  130. package/dist/queries/cycles.js +1 -1
  131. package/dist/queries/dataflow.d.ts +2 -2
  132. package/dist/queries/dataflow.js +1 -1
  133. package/dist/queries/dead.d.ts +3 -3
  134. package/dist/queries/dead.js +1 -1
  135. package/dist/queries/deep-chains.d.ts +2 -2
  136. package/dist/queries/deep-chains.js +1 -1
  137. package/dist/queries/deps.d.ts +2 -2
  138. package/dist/queries/deps.js +1 -1
  139. package/dist/queries/diff-gate.d.ts +65 -8
  140. package/dist/queries/diff-gate.js +1 -1
  141. package/dist/queries/diff-impact.d.ts +21 -3
  142. package/dist/queries/diff-impact.js +1 -1
  143. package/dist/queries/doc-drift.d.ts +29 -2
  144. package/dist/queries/doc-drift.js +1 -1
  145. package/dist/queries/drift.d.ts +15 -3
  146. package/dist/queries/drift.js +1 -1
  147. package/dist/queries/duplicate-bodies.d.ts +55 -0
  148. package/dist/queries/duplicate-bodies.js +2 -0
  149. package/dist/queries/extract-candidates.d.ts +2 -2
  150. package/dist/queries/extract-candidates.js +1 -1
  151. package/dist/queries/fan.d.ts +2 -2
  152. package/dist/queries/fan.js +1 -1
  153. package/dist/queries/files.d.ts +4 -3
  154. package/dist/queries/files.js +1 -1
  155. package/dist/queries/health.d.ts +3 -3
  156. package/dist/queries/health.js +1 -1
  157. package/dist/queries/hierarchy.d.ts +2 -2
  158. package/dist/queries/hierarchy.js +1 -1
  159. package/dist/queries/hotspots.d.ts +2 -2
  160. package/dist/queries/hotspots.js +1 -1
  161. package/dist/queries/imports.d.ts +2 -2
  162. package/dist/queries/imports.js +1 -1
  163. package/dist/queries/incomplete-migration.d.ts +3 -2
  164. package/dist/queries/incomplete-migration.js +1 -1
  165. package/dist/queries/index.d.ts +12 -7
  166. package/dist/queries/index.js +1 -1
  167. package/dist/queries/isolated.d.ts +2 -2
  168. package/dist/queries/isolated.js +1 -1
  169. package/dist/queries/locality-candidates.d.ts +2 -2
  170. package/dist/queries/locality-candidates.js +1 -1
  171. package/dist/queries/members.d.ts +2 -2
  172. package/dist/queries/members.js +1 -1
  173. package/dist/queries/methods.d.ts +2 -2
  174. package/dist/queries/methods.js +1 -1
  175. package/dist/queries/outline.d.ts +2 -2
  176. package/dist/queries/outline.js +1 -1
  177. package/dist/queries/passthrough-candidates.d.ts +11 -3
  178. package/dist/queries/passthrough-candidates.js +1 -1
  179. package/dist/queries/plan-context.d.ts +3 -2
  180. package/dist/queries/plan-context.js +1 -1
  181. package/dist/queries/react-component-duplicates.d.ts +7 -2
  182. package/dist/queries/react-component-duplicates.js +1 -1
  183. package/dist/queries/react-hook-candidates.d.ts +3 -3
  184. package/dist/queries/react-hook-candidates.js +1 -1
  185. package/dist/queries/react-large-component-pressure.d.ts +2 -2
  186. package/dist/queries/react-large-component-pressure.js +1 -1
  187. package/dist/queries/recent-duplicates.d.ts +2 -2
  188. package/dist/queries/recent-duplicates.js +1 -1
  189. package/dist/queries/redundant-reexports.d.ts +2 -2
  190. package/dist/queries/redundant-reexports.js +1 -1
  191. package/dist/queries/refs.d.ts +2 -2
  192. package/dist/queries/refs.js +1 -1
  193. package/dist/queries/self-audit.d.ts +9 -4
  194. package/dist/queries/self-audit.js +1 -1
  195. package/dist/queries/similar-chains.d.ts +2 -2
  196. package/dist/queries/similar-chains.js +1 -1
  197. package/dist/queries/similar-files.d.ts +2 -2
  198. package/dist/queries/similar-files.js +1 -1
  199. package/dist/queries/similar-signatures.d.ts +17 -10
  200. package/dist/queries/similar-signatures.js +1 -1
  201. package/dist/queries/similar.d.ts +85 -17
  202. package/dist/queries/similar.js +1 -1
  203. package/dist/queries/slice.d.ts +2 -2
  204. package/dist/queries/slice.js +1 -1
  205. package/dist/queries/stale-abstractions.d.ts +2 -2
  206. package/dist/queries/stale-abstractions.js +1 -1
  207. package/dist/queries/stats.d.ts +2 -2
  208. package/dist/queries/surface.d.ts +2 -2
  209. package/dist/queries/surface.js +1 -1
  210. package/dist/queries/symbols.d.ts +2 -2
  211. package/dist/queries/symbols.js +1 -1
  212. package/dist/queries/system.d.ts +2 -2
  213. package/dist/queries/system.js +1 -1
  214. package/dist/queries/trace.d.ts +2 -2
  215. package/dist/queries/trace.js +1 -1
  216. package/dist/queries/twin-ab.d.ts +55 -0
  217. package/dist/queries/twin-ab.js +2 -0
  218. package/dist/queries/twin-drift.d.ts +97 -0
  219. package/dist/queries/twin-drift.js +2 -0
  220. package/dist/queries/unused-imports.d.ts +2 -2
  221. package/dist/queries/unused-imports.js +1 -1
  222. package/dist/queries/unused-params.d.ts +2 -2
  223. package/dist/queries/unused-params.js +1 -1
  224. package/dist/queries/vue-component-duplicates.d.ts +7 -2
  225. package/dist/queries/vue-component-duplicates.js +1 -1
  226. package/dist/queries/vue-composable-candidates.d.ts +3 -3
  227. package/dist/queries/vue-composable-candidates.js +1 -1
  228. package/dist/queries/vue-large-view-pressure.d.ts +6 -2
  229. package/dist/queries/vue-large-view-pressure.js +1 -1
  230. package/dist/queries/wrapper-candidates.d.ts +2 -2
  231. package/dist/queries/wrapper-candidates.js +1 -1
  232. package/dist/reindex-worker.js +9 -9
  233. package/dist/reindex.d.ts +30 -4
  234. package/dist/reindex.js +19 -19
  235. package/dist/runtime.d.ts +12 -6
  236. package/dist/runtime.js +2 -2
  237. package/dist/{scip-cli-CnK9Va4O.d.ts → scip-cli-C7cg4ZHR.d.ts} +1 -1
  238. package/dist/symbol-types-DaoeXKUt.d.ts +66 -0
  239. package/docs/AGENT_GUIDE.md +20 -18
  240. package/docs/AI_FAILURE_MODES.md +36 -13
  241. package/docs/API.md +1 -1
  242. package/docs/COMMAND_REFERENCE.md +57 -14
  243. package/docs/DETECTOR_GUIDE.md +20 -3
  244. package/docs/REGEX_POLICY.md +34 -0
  245. package/docs/analyzer-inventory.md +48 -3
  246. package/docs/analyzer-validation-ledger.md +41 -6
  247. package/package.json +23 -7
  248. package/scripts/build-scip-windows.mjs +10 -7
  249. package/scripts/evidence-product-contract.mjs +197 -0
  250. package/skills/_shared/SKILL.md +243 -0
  251. package/skills/_shared/agents/openai.yaml +4 -0
  252. package/skills/scip-api-impact/SKILL.md +55 -71
  253. package/skills/scip-claim-audit/SKILL.md +105 -0
  254. package/skills/scip-claim-audit/agents/openai.yaml +4 -0
  255. package/skills/scip-cleanup-audit/SKILL.md +122 -0
  256. package/skills/scip-cleanup-audit/agents/openai.yaml +4 -0
  257. package/skills/scip-cleanup-improve/SKILL.md +84 -0
  258. package/skills/scip-cleanup-improve/agents/openai.yaml +4 -0
  259. package/skills/scip-concrete-plan/SKILL.md +181 -0
  260. package/skills/scip-concrete-plan/agents/openai.yaml +4 -0
  261. package/skills/scip-conductor/SKILL.md +133 -0
  262. package/skills/scip-conductor/agents/openai.yaml +4 -0
  263. package/skills/scip-debug/SKILL.md +60 -58
  264. package/skills/scip-diagram/SKILL.md +64 -94
  265. package/skills/scip-directory-architecture/SKILL.md +65 -107
  266. package/skills/scip-doc-reconcile/SKILL.md +56 -67
  267. package/skills/scip-explore/SKILL.md +78 -210
  268. package/skills/scip-hyper-optimization/SKILL.md +124 -198
  269. package/skills/scip-integrity-audit/SKILL.md +103 -0
  270. package/skills/scip-integrity-audit/agents/openai.yaml +4 -0
  271. package/skills/scip-language-playbook/SKILL.md +56 -326
  272. package/skills/scip-maintainability/SKILL.md +80 -219
  273. package/skills/scip-probe-reachability/SKILL.md +92 -0
  274. package/skills/scip-probe-reachability/agents/openai.yaml +4 -0
  275. package/skills/scip-query/SKILL.md +108 -124
  276. package/skills/scip-react-maintainability/SKILL.md +64 -82
  277. package/skills/scip-setup/SKILL.md +121 -0
  278. package/skills/scip-setup/agents/openai.yaml +4 -0
  279. package/skills/scip-tla-model-system/SKILL.md +138 -0
  280. package/skills/scip-tla-model-system/agents/openai.yaml +4 -0
  281. package/skills/scip-triage-issue/SKILL.md +53 -41
  282. package/skills/scip-twin-drift/SKILL.md +107 -0
  283. package/skills/scip-twin-drift/agents/openai.yaml +4 -0
  284. package/skills/scip-verify/SKILL.md +70 -88
  285. package/skills/scip-vue-maintainability/SKILL.md +67 -94
  286. package/dist/chunk-2KHTSEIL.js +0 -102
  287. package/dist/chunk-3VD3JMK2.js +0 -2
  288. package/dist/chunk-4UZO3XCV.js +0 -35
  289. package/dist/chunk-5GOLFJEO.js +0 -8
  290. package/dist/chunk-5OST6GYB.js +0 -2
  291. package/dist/chunk-65AU3HFZ.js +0 -2
  292. package/dist/chunk-6GN7FXCH.js +0 -2
  293. package/dist/chunk-6IR2AOBM.js +0 -7
  294. package/dist/chunk-6JRV4MY2.js +0 -23
  295. package/dist/chunk-6QSOCTZT.js +0 -18
  296. package/dist/chunk-72KY2ZFO.js +0 -2
  297. package/dist/chunk-7GO4EQF5.js +0 -2
  298. package/dist/chunk-7IVSJJZU.js +0 -7
  299. package/dist/chunk-7TWLSZK5.js +0 -2
  300. package/dist/chunk-A536TEU4.js +0 -3
  301. package/dist/chunk-AVWPHM2Q.js +0 -4
  302. package/dist/chunk-B32FX5KB.js +0 -2
  303. package/dist/chunk-B6MJ5VQV.js +0 -2
  304. package/dist/chunk-BFXPG2VN.js +0 -2
  305. package/dist/chunk-BSN22NRK.js +0 -9
  306. package/dist/chunk-BZ53S4ZN.js +0 -2
  307. package/dist/chunk-C5CTSJ6X.js +0 -6
  308. package/dist/chunk-CO5GJRP7.js +0 -2
  309. package/dist/chunk-CW5YFOCP.js +0 -5
  310. package/dist/chunk-DS6QEB3G.js +0 -5
  311. package/dist/chunk-E35O7UCB.js +0 -2
  312. package/dist/chunk-EXDQ35NN.js +0 -2
  313. package/dist/chunk-FAYI6KZ5.js +0 -2
  314. package/dist/chunk-FFVIFETB.js +0 -2
  315. package/dist/chunk-FG4NT6VY.js +0 -2
  316. package/dist/chunk-FXNWFMKW.js +0 -25
  317. package/dist/chunk-G5UPYQGL.js +0 -4
  318. package/dist/chunk-GQBMH2TQ.js +0 -2
  319. package/dist/chunk-GRJY65YT.js +0 -2
  320. package/dist/chunk-HF25DFSC.js +0 -3
  321. package/dist/chunk-HHN2B5KA.js +0 -2
  322. package/dist/chunk-IHUETYFW.js +0 -2
  323. package/dist/chunk-JCLDUKT6.js +0 -38
  324. package/dist/chunk-JGN2ZFJR.js +0 -2
  325. package/dist/chunk-JM72FNGA.js +0 -2
  326. package/dist/chunk-JME7OWD3.js +0 -2
  327. package/dist/chunk-KDFONWTW.js +0 -40
  328. package/dist/chunk-LPL4MA6R.js +0 -2
  329. package/dist/chunk-LZHUWKGD.js +0 -2
  330. package/dist/chunk-M4COR2H6.js +0 -2
  331. package/dist/chunk-NOJAM5ZV.js +0 -21
  332. package/dist/chunk-O6ZH6C6Y.js +0 -2
  333. package/dist/chunk-OBGRLXWF.js +0 -3
  334. package/dist/chunk-OLTESY4K.js +0 -3
  335. package/dist/chunk-ONPCQ2PM.js +0 -6
  336. package/dist/chunk-P4KYUPBD.js +0 -4
  337. package/dist/chunk-P5RYBRIO.js +0 -4
  338. package/dist/chunk-P7AL7Y37.js +0 -2
  339. package/dist/chunk-PFOCOG57.js +0 -2
  340. package/dist/chunk-QLAUCRDJ.js +0 -2
  341. package/dist/chunk-QPU7EXAW.js +0 -2
  342. package/dist/chunk-QYB5P7GL.js +0 -2
  343. package/dist/chunk-RNM6LMCF.js +0 -2
  344. package/dist/chunk-RVWSAMTT.js +0 -2
  345. package/dist/chunk-TK7O5ER5.js +0 -3
  346. package/dist/chunk-TQ5W2H3S.js +0 -4
  347. package/dist/chunk-USPV3T5K.js +0 -2
  348. package/dist/chunk-UUBMFL3F.js +0 -59
  349. package/dist/chunk-VCQYSG2M.js +0 -10
  350. package/dist/chunk-VUKC6F77.js +0 -20
  351. package/dist/chunk-W2CBNBEL.js +0 -71
  352. package/dist/chunk-W6BVEKYC.js +0 -3
  353. package/dist/chunk-WUCEKFQC.js +0 -3
  354. package/dist/chunk-XUGQU7PM.js +0 -41
  355. package/dist/chunk-Y5NBHMQX.js +0 -2
  356. package/dist/chunk-YCOFCT4B.js +0 -2
  357. package/dist/chunk-YZA6PPZL.js +0 -3
  358. package/skills/concrete-plan/SKILL.md +0 -372
  359. package/skills/concrete-plan/agents/openai.yaml +0 -4
  360. package/skills/scip-adoption/SKILL.md +0 -122
  361. package/skills/scip-adoption/agents/openai.yaml +0 -4
  362. package/skills/scip-ai-cleanup/SKILL.md +0 -153
  363. package/skills/scip-ai-cleanup/agents/openai.yaml +0 -4
  364. package/skills/scip-debloat/SKILL.md +0 -439
  365. package/skills/scip-debloat/agents/openai.yaml +0 -4
  366. package/skills/scip-health-audit/SKILL.md +0 -162
  367. package/skills/scip-health-audit/agents/openai.yaml +0 -4
  368. package/skills/scip-health-improve/SKILL.md +0 -155
  369. package/skills/scip-health-improve/agents/openai.yaml +0 -4
  370. package/skills/scip-query-setup/SKILL.md +0 -170
  371. package/skills/scip-query-setup/agents/openai.yaml +0 -3
  372. package/vendor/scip/README.md +0 -6
  373. package/vendor/scip/win32-arm64/scip.exe +0 -0
  374. package/vendor/scip/win32-x64/scip.exe +0 -0
@@ -1,372 +0,0 @@
1
- ---
2
- name: concrete-plan
3
- description: Build concrete, checklist-driven implementation plans using scip-query for every code reference. Plans are stress-tested against 11 engineering principles before shipping.
4
- ---
5
-
6
- # Concrete Implementation Planning
7
-
8
- You are writing a production implementation plan as a markdown checklist. Every step must be concrete — exact file paths, line numbers, what the code does today, what it should do after the change. No hand-waving. No "consider doing X." Every claim about existing code must be verified against the actual codebase using `scip-query`.
9
-
10
- ---
11
-
12
- ## Hard Rules
13
-
14
- 1. **Every code reference must come from scip-query.** Run `scip-query status --capabilities` or `scip-query status --json` before starting. If freshness is `fresh`, keep going; if it is `stale`, `missing`, or `unknown`, run `scip-query reindex` before using graph facts. No reference from memory, grep, or file reads.
15
-
16
- 2. **Every step must cite its source.** Each step in the plan includes a `Source` field naming the scip-query command that produced the file path, line number, and behavioral claim. A step without a Source is unverified and must not appear in the plan.
17
-
18
- 3. **Every step must be actionable.** Never write "update this file." Write "In `foo.service.ts:142-158`, the `catch` block swallows `AbortError` — re-throw it instead of logging." Exact lines, current behavior, target behavior.
19
-
20
- 4. **The plan goes in `docs/plans/YYYY-MM-DD-<short-name>.md`.** Use today's date. The file is a living document — update it as stress-testing reveals new steps.
21
-
22
- ---
23
-
24
- ## Gather Context Fast
25
-
26
- Start every plan with the bundled context command — it replaces a half-dozen
27
- separate queries and adds evidence no single query has:
28
-
29
- ```bash
30
- scip-query plan-context <symbol-or-file>
31
- ```
32
-
33
- Use its sections directly in the plan:
34
-
35
- - **DEFINITIONS / REFERENCES / CALL GRAPH / DOWNSTREAM IMPACT** — the Source
36
- citations for your steps.
37
- - **HISTORY** — files that usually change together with the target. If the
38
- plan edits the target, the plan MUST either cover its co-change partners or
39
- state why they're untouched this time. This is how plans stop causing drift.
40
- - **CHANGE RISK** — high-risk consumers get their own verification steps.
41
-
42
- Two pre-plan checks that prevent planning mistakes:
43
-
44
- ```bash
45
- scip-query doc-drift <standard.md> # is the standard this plan follows stale?
46
- scip-query recent-duplicates # does the helper you're about to plan already exist?
47
- ```
48
-
49
- If `doc-drift` shows the standard's referenced code moved on without it,
50
- updating that standard becomes step 0 of the plan. If the plan creates a new
51
- helper, cite the `similar` / `recent-duplicates` evidence that nothing
52
- established already does the job.
53
-
54
- ## Symbol Lookup Tips
55
-
56
- `scip-query` accepts partial symbol names — you don't need the full SCIP symbol path. These all work:
57
-
58
- ```bash
59
- scip-query code processVegaMention # just the function name
60
- scip-query call-graph ChatService # just the class name
61
- scip-query trace getActiveInferenceConfig # any unique substring
62
- ```
63
-
64
- **Avoid parentheses** — `()` causes shell parse errors in zsh/bash:
65
- ```bash
66
- # BAD — shell tries to execute a subshell
67
- scip-query code processVegaMention()
68
-
69
- # GOOD — no parens needed, scip-query strips them internally
70
- scip-query code processVegaMention
71
-
72
- # ALSO GOOD — single quotes protect special characters
73
- scip-query code 'processVegaMention'
74
- ```
75
-
76
- **Read source by file + line range** when the symbol name is ambiguous:
77
- ```bash
78
- scip-query code 'src/modules/chat/chat.service.ts:100-200'
79
- ```
80
-
81
- **If "Symbol not found":**
82
- 1. Try a shorter/simpler name — `login` instead of `AuthService:login`
83
- 2. Try `scip-query outline <file>` to see what symbols exist in the file
84
- 3. Try `scip-query trace <name>` which uses a different lookup path
85
- 4. Use the `file:line-line` syntax for `code` if you know the location
86
-
87
- ---
88
-
89
- ## Forbidden Tools and Patterns
90
-
91
- This skill deliberately excludes `Grep` and `Read` from its allowed tools. This is intentional.
92
-
93
- **DO NOT work around this by:**
94
- - Running `grep`, `rg`, or `cat` through Bash. If you catch yourself typing `grep` or `rg`, stop — you are doing it wrong.
95
- - Using `Read` via a subagent to browse files for discovery. Subagents must also use scip-query.
96
- - Spawning Explore agents that fall back to grep and file reads. If a subagent's output does not cite scip-query commands, reject its findings and re-run.
97
-
98
- **Instead, use scip-query (full reference at `/Users/aydansalois/Documents/GitHub/scip-query/docs/COMMAND_REFERENCE.md`):**
99
-
100
- | You want to... | Use this |
101
- |---|---|
102
- | **Read source code** | `scip-query code <symbol>` (reads file, bounded to definition range) |
103
- | **Read source with context** | `scip-query code <symbol> -C 5` (5 extra lines above/below) |
104
- | Find a symbol / list file contents | `scip-query outline <file>` (all symbols with line ranges + signatures) |
105
- | Find files by name | `scip-query files <pattern>` |
106
- | See callers + callees | `scip-query call-graph <symbol>` |
107
- | Full module map | `scip-query system <module>` |
108
- | True public API | `scip-query surface <module>` |
109
- | Every file referencing a symbol | `scip-query refs <symbol>` |
110
- | Definition + all references | `scip-query trace <symbol>` |
111
- | Forward dependencies | `scip-query deps <file>` |
112
- | Reverse dependencies | `scip-query rdeps <file>` |
113
- | **Full transitive blast radius** | `scip-query affected <symbol>` |
114
- | **Pre-change risk briefing** | `scip-query change-surface <file>` |
115
- | **Git diff impact analysis** | `scip-query diff-impact --json` |
116
- | **Complexity analysis** | `scip-query complexity <symbol>` (branches, cyclomatic, fan-in/out) |
117
- | **Dataflow: what feeds in/out** | `scip-query dataflow <symbol>` (producers, consumers, usage sites) |
118
- | **Backward slice (what affects this)** | `scip-query slice <symbol>` |
119
- | **Forward slice (what this affects)** | `scip-query slice <symbol> --forward` |
120
- | Find similar functions | `scip-query similar <symbol>` |
121
- | Find same-shape functions | `scip-query similar-signatures` |
122
- | Refactoring prescription | `scip-query convergence <a> <b>` |
123
- | Find redundant re-exports | `scip-query redundant-reexports` |
124
- | Find dead code | `scip-query dead --min-loc 10 --skip-barrels` |
125
- | Codebase health report | `scip-query health` |
126
- | Coupling pressure points | `scip-query bottlenecks` |
127
- | Complexity hotspots | `scip-query complexity-hotspots` |
128
- | Circular dependencies | `scip-query cycles` |
129
- | Pattern drift | `scip-query drift` |
130
- | Unnecessary wrappers | `scip-query wrapper-candidates` |
131
- | Stale abstractions | `scip-query stale-abstractions` |
132
- | Check if a file exists | `Glob` with the exact path pattern |
133
-
134
- If none of these can answer your question, say so explicitly in the plan rather than silently falling back to grep.
135
-
136
- ### Full Documentation
137
-
138
- - **Every command with options and examples:** `/Users/aydansalois/Documents/GitHub/scip-query/docs/COMMAND_REFERENCE.md`
139
- - **Goal-oriented agent workflows:** `/Users/aydansalois/Documents/GitHub/scip-query/docs/AGENT_GUIDE.md`
140
-
141
- ---
142
-
143
- ## The 11 Principles
144
-
145
- After designing the core implementation, stress-test it against every principle below. Each principle is a lens — apply it to every step in the plan and ask whether the design holds up. If it doesn't, add steps until it does. Use scip-query to verify your answers, not assumptions.
146
-
147
- ### 1. Understand before you touch
148
-
149
- Why does this code exist? What production failure shaped it? What does it handle that isn't obvious? You don't earn the right to change something until you can explain why it was written that way.
150
-
151
- **Key question**: Can you explain the purpose of every piece of code you're modifying or removing?
152
- **Tools**: `scip-query call-graph <symbol>` for callers/callees. `scip-query code <symbol>` to read the implementation.
153
-
154
- ### 2. Map the blast radius
155
-
156
- Every symbol you change has consumers. Find all of them — direct callers, transitive dependents, tests that mock it, types that reference it, re-exports. The question isn't "what am I changing" — it's "what else moves when I move this."
157
-
158
- **Key question**: For every changed symbol, do you know every consumer?
159
- **Tools**: `scip-query affected <symbol>` for full transitive closure. `scip-query rdeps` on every modified file. `scip-query surface` on every modified module. `scip-query change-surface <file>` for a per-file risk briefing.
160
-
161
- ### 3. Every intermediate state must be valid
162
-
163
- You can't teleport from old to new. Every commit, every deploy between here and there must leave the system working. No "it'll work once we finish all the steps." If the migration has 5 phases, each of the 5 intermediate states must build, pass tests, and be deployable.
164
-
165
- **Key question**: If you deployed only Phase 1, would the system still work?
166
- **Tools**: `scip-query deps` to verify no phase depends on code that hasn't been written yet.
167
-
168
- ### 4. Reversibility determines rigor
169
-
170
- One-way doors (dropping tables, changing public APIs, deleting data) get maximum scrutiny. Two-way doors (internal refactors, new internal functions) get proportional scrutiny. Know which kind of door you're walking through at every step, and say so in the plan.
171
-
172
- **Key question**: For each step, can you undo it? What's the rollback plan if it goes wrong?
173
-
174
- ### 5. Design for failure, not success
175
-
176
- The happy path works — that's the easy part. What happens when the database is slow? The network drops? The API returns garbage? The process crashes mid-write? A user hits the button twice? Every new path needs a concrete failure mode answer.
177
-
178
- **Key question**: For every new async path, what's the worst that happens and does the system recover?
179
- **Tools**: `scip-query dataflow <symbol>` to trace data flow through error paths. `scip-query code <symbol>` to read existing catch blocks.
180
-
181
- ### 6. Assume concurrency
182
-
183
- Can this run twice at the same time? Can events arrive out of order? Can state be half-written when something else reads it? Can a cleanup path fire after a retry already recovered? Can a "done" signal arrive before its prerequisite state is written?
184
-
185
- **Key question**: What shared mutable state does this touch, and what happens when two things touch it at once?
186
- **Tools**: `scip-query dataflow <symbol>` to find what flows through shared state. `scip-query slice <symbol>` to trace what affects a variable.
187
-
188
- ### 7. Defend the boundaries
189
-
190
- Every entry point — API endpoint, WebSocket message, webhook, CLI command — is a trust boundary. Who can trigger this? On whose resources? With what input? Can user A act on user B's resources? Is the payload validated? Validate at the boundary, trust internally.
191
-
192
- **Key question**: For every entry point, who is allowed to call it, and what happens when someone who isn't allowed tries?
193
- **Tools**: `scip-query code <handler>` to read the handler. `scip-query refs <authFunction>` to see where auth middleware is applied.
194
-
195
- ### 8. Protect data integrity
196
-
197
- When you remove something, what references it? Foreign keys, orphaned rows, in-flight operations, unique constraints. When you change a schema, what happens to existing data? Data outlives code — you can revert a deploy but you can't un-corrupt a database.
198
-
199
- **Key question**: What happens to existing data during and after this change?
200
- **Tools**: `scip-query refs` on table/column names. `scip-query files` to find schema references.
201
-
202
- ### 9. Make it observable
203
-
204
- When this breaks at 3am, can the on-call engineer diagnose it from logs alone without reading the source code? Every error path needs structured context. Every state transition should be traceable. If you can't tell what happened, you can't fix it.
205
-
206
- **Key question**: For every new error path, is there a log line with enough context to diagnose the problem?
207
- **Tools**: `scip-query code <symbol>` to check existing logging patterns.
208
-
209
- ### 10. Consider the human
210
-
211
- What does the user experience during and after this change? Features that disappear without explanation, loading states that lie, error messages that confuse, flows that silently change behavior — these are bugs, not polish items.
212
-
213
- **Key question**: If a real user walked through this flow, would anything surprise, confuse, or frustrate them?
214
-
215
- ### 11. Reuse over re-implement; match what already exists
216
-
217
- Two implementations of the same logic is worse than either alone — they drift, diverge, and slowly contradict each other until nobody knows which is canonical. Before designing any new code path, find the existing implementations of the same problem class and reuse them. The codebase already has utilities, error-handling patterns, naming conventions, and abstractions for this — use them. If you genuinely need a new pattern, justify why in the plan with a citation to what existed and why it didn't fit. Your implementation should be indistinguishable from the surrounding code — same patterns, same utilities, same conventions, same libraries.
218
-
219
- This principle backstops the Gate C **Reuse Audit** — by stress-test time, every new symbol in the plan should already be tied to a reuse target or a written justification. Use this lens to catch ones that slipped through.
220
-
221
- **Key question**: For every new function, type, or module in the plan, does an existing one already do this — or 80% of this? If you'd be writing logic that's *similar-but-not-identical* to existing code, you are creating future drift.
222
- **Tools**: `scip-query similar-chains` (parallel end-to-end flows). `scip-query similar-files` (structurally similar modules). `scip-query similar <symbol>` (overlapping callee sets). `scip-query similar-signatures` (same-shape functions). `scip-query convergence <a> <b>` (merge prescription for near-duplicates). `scip-query surface <module>` (what's already exposed). `scip-query deps <file>` (what libraries are already adopted). `scip-query code <symbol>` (read the canonical example).
223
-
224
- ---
225
-
226
- ## Workflow
227
-
228
- ### 1. Discover — three gates before you design
229
-
230
- You may not write a single design step until you have produced written answers to all three gates below. Each gate becomes a section in the final plan. A plan that skips any gate is rejected — it means you don't understand the problem, the system, or what already exists.
231
-
232
- #### Gate A — Restate the goal
233
-
234
- What is the user actually trying to accomplish? Not the literal request — the underlying job. State it in your own words, then state what "done" looks like for the user (not for the code). If the goal is ambiguous, stop and ask the user before designing. A correct plan for the wrong goal is worse than no plan.
235
-
236
- #### Gate B — Explain the current end-to-end flow
237
-
238
- Walk the affected slice of the system from entry point to side effect, citing scip-query at every hop. Use:
239
-
240
- - `scip-query system <module>` — full module map of the area
241
- - `scip-query call-graph <symbol>` — callers and callees of every entry point you'll touch
242
- - `scip-query trace <symbol>` — definition + signature + every reference
243
- - `scip-query dataflow <symbol>` — what feeds in, where it ends up
244
- - `scip-query change-surface <file>` — pre-change risk briefing on each file you'll modify
245
- - `scip-query affected <symbol>` — full transitive blast radius
246
-
247
- If you can't explain how the code works today, you have not earned the right to change it. Surface the non-obvious invariants — what does this code handle that you'd never guess from its shape? What production failures shaped it? What edge cases does the current implementation already cover?
248
-
249
- #### Gate C — Reuse audit (search before you write)
250
-
251
- For every new function, type, helper, or module you are about to propose, verify the logic doesn't already exist somewhere in the codebase. **Reuse > extend > write-new.** Two implementations of the same logic is worse than either alone — they drift, diverge, and slowly contradict each other.
252
-
253
- Run, in roughly broad-to-narrow order:
254
-
255
- - `scip-query similar-chains` — does an equivalent end-to-end flow already exist? (the most powerful reuse-finder — catches architectural duplication that function-level checks miss)
256
- - `scip-query similar-files <closest-existing-file>` — does a structurally similar module already exist?
257
- - `scip-query similar <closest-existing-symbol>` — does a function already do most of this? (TF-IDF weighted cosine on callee fingerprints)
258
- - `scip-query similar-signatures` — does a function with this parameter+return shape already exist?
259
- - `scip-query surface <module>` — what utilities does the area you're touching already expose?
260
-
261
- Once a candidate surfaces, confirm fit with:
262
-
263
- - `scip-query code <candidate>` — read it
264
- - `scip-query convergence <yours> <candidate>` — merge prescription if it's a near-duplicate
265
-
266
- The plan must include a **Reuse Audit** subsection. For every new symbol you're proposing, list either (a) the existing function/utility you'll reuse or extend (with scip-query citation), or (b) the specific reason existing code doesn't fit and a new symbol is justified. "I didn't find anything" is not an acceptable answer — name the queries you ran.
267
-
268
- ### 2. Design
269
-
270
- Write the implementation as a numbered checklist grouped into phases (5-8 files max per phase). Each step uses this format:
271
-
272
- ```markdown
273
- ### N.M — Short imperative title
274
-
275
- - [ ] **File**: `path/to/file.ts:LINE-LINE`
276
- - **Source**: `scip-query trace <symbol>` (the command that found this)
277
- - **What**: What the code does today (verified via scip-query code).
278
- - **Change**: Exactly what to change. Include code snippets for non-obvious changes.
279
- - **Why**: Why this step is necessary.
280
- ```
281
-
282
- Include an execution order showing dependencies between phases. Mark which phases can be deployed independently.
283
-
284
- ### 3. Stress-test
285
-
286
- Apply the 11 Principles against every step in the design. For each principle, ask the key question and use the listed scip-query commands to verify the answer. If a principle reveals a gap, add steps to the plan until the gap is closed. Document what you checked and what you found.
287
-
288
- ### 4. Verify
289
-
290
- After stress-testing is complete:
291
-
292
- 1. **Freshness**: Run `scip-query status --capabilities`; reindex only if freshness is not `fresh`.
293
- 2. **Verify references**: Spawn parallel subagents (one per phase) using the **Subagent Briefing Template**. Each agent confirms that every file path exists, every line number is within +-5 lines, and every described behavior matches reality. Reject output that doesn't cite scip-query commands.
294
- 3. **Fix drift**: Update any stale references.
295
- 4. **Check execution order**: No phase depends on a later phase. No step within a phase depends on a later step.
296
- 5. **Check validation coverage**: Every behavior-changing step should have a corresponding validation step. Flag gaps in tests, manual checks, or runtime verification.
297
- 6. **Run diff-impact**: `scip-query diff-impact --json` to verify the blast radius matches what the plan predicted.
298
-
299
- ---
300
-
301
- ## Subagent Briefing Template
302
-
303
- When spawning any subagent for this planning process, **include the following block verbatim** — subagents do not inherit your instructions.
304
-
305
- ```
306
- ## Code Intelligence Tool — Required
307
-
308
- You have the `scip-query` CLI for compiler-resolved code intelligence. Use it for ALL code references — do not use grep, rg, Read, or cat.
309
-
310
- ### scip-query commands
311
-
312
- Navigation:
313
- - `scip-query code <symbol>` — read source code (bounded to definition range)
314
- - `scip-query code <symbol> -C 5` — read source with 5 extra context lines
315
- - `scip-query outline <file>` — all symbols in a file with line ranges + signatures
316
- - `scip-query files <pattern>` — find files by name
317
- - `scip-query refs <symbol>` — every file referencing a symbol
318
- - `scip-query trace <symbol>` — definition + signature + all references
319
- - `scip-query call-graph <symbol>` — incoming callers + outgoing callees
320
- - `scip-query system <module>` — full module map: files, symbols, deps in/out
321
- - `scip-query surface <module>` — symbols consumers actually use
322
-
323
- Dependencies & Impact:
324
- - `scip-query deps <file>` — files this file depends on
325
- - `scip-query rdeps <file>` — files that depend on this file
326
- - `scip-query affected <symbol>` — transitive closure of breakage
327
- - `scip-query change-surface <file>` — pre-change risk briefing
328
- - `scip-query diff-impact --json` — git diff impact analysis
329
-
330
- Analysis:
331
- - `scip-query complexity <symbol>` — branches, cyclomatic estimate, fan-in/out
332
- - `scip-query dataflow <symbol>` — definition sites, usage sites, producers, consumers
333
- - `scip-query slice <symbol>` — backward slice (what affects this)
334
- - `scip-query slice <symbol> --forward` — forward slice (what this affects)
335
- - `scip-query similar <symbol>` — find functions with similar callee patterns
336
- - `scip-query convergence <a> <b>` — refactoring prescription for similar pair
337
-
338
- Quality:
339
- - `scip-query health` — composite codebase health report
340
- - `scip-query dead --min-loc 10` — find dead code
341
- - `scip-query bottlenecks` — coupling pressure points
342
- - `scip-query complexity-hotspots` — riskiest symbols
343
- - `scip-query cycles` — circular dependencies
344
-
345
- Full command reference: /Users/aydansalois/Documents/GitHub/scip-query/docs/COMMAND_REFERENCE.md
346
- Agent workflows guide: /Users/aydansalois/Documents/GitHub/scip-query/docs/AGENT_GUIDE.md
347
-
348
- ### Rules
349
- - Use scip-query for ALL discovery. Do NOT use grep, rg, or Read.
350
- - To read source code, use `scip-query code <symbol>`.
351
- - Every file path, line number, and behavioral claim must cite the specific scip-query command that produced it.
352
- - If you cannot verify a claim with scip-query, say so explicitly — do not guess.
353
- - Your output will be rejected if it contains findings without scip-query citations.
354
- ```
355
-
356
- **Reject any subagent output that cites grep, rg, cat, or Read as evidence instead of scip-query.**
357
-
358
- ---
359
-
360
- ## Output Format
361
-
362
- The plan is a single markdown file with:
363
-
364
- 1. Title and date
365
- 2. **Goal** (Gate A — what the user is actually trying to accomplish, what "done" looks like for them)
366
- 3. **Current state** (Gate B — end-to-end flow today with scip-query citations, plus the non-obvious invariants the current code already handles)
367
- 4. **Reuse audit** (Gate C — for each new symbol proposed, the reuse target or the justification for writing new, with the queries that were run)
368
- 5. Design phases (numbered checklists with Source fields)
369
- 6. Stress-test findings (inline with the relevant phase or as addenda)
370
- 7. Execution order (dependency graph between phases)
371
- 8. Ship order (recommended deployment sequence, one-way doors flagged)
372
- 9. Summary (files modified/created/deleted, net code delta)
@@ -1,4 +0,0 @@
1
- interface:
2
- display_name: "Concrete Plan"
3
- short_description: "SCIP-grounded implementation plans"
4
- default_prompt: "Use $concrete-plan to create a SCIP-grounded implementation plan for this change."
@@ -1,122 +0,0 @@
1
- ---
2
- name: scip-adoption
3
- description: Adopt scip-query in a repository from first run through verified local readiness. Use when the user wants to install, bootstrap, onboard, set up, refresh, or roll out scip-query in a project, including skills, indexers, local capabilities, health dossier, and post-setup cleanup handoff.
4
- ---
5
-
6
- # SCIP Adoption
7
-
8
- Use this skill when a repository needs to become a reliable scip-query workspace. A scip-query workspace is a source repository with a current SCIP index, runnable language indexers, installed agent skills, project guidance, and health evidence that agents can use before editing.
9
-
10
- ## Rules
11
-
12
- 1. Make local setup reliable before recommending cleanup.
13
- 2. Do not run `scip-query setup-ci` in the default adoption path. CI is a separate explicit workflow.
14
- 3. Treat missing capabilities as unavailable evidence, not as clean results.
15
- 4. After setup, tell the user the health score and confirmed issue list before application-code cleanup begins.
16
-
17
- ## Adoption Workflow
18
-
19
- ### 1. Establish the project
20
-
21
- ```bash
22
- pwd
23
- git rev-parse --show-toplevel
24
- scip-query --version
25
- ```
26
-
27
- If `scip-query` is not available, install or link the package through the repo's package manager, then rerun the checks.
28
-
29
- ### 2. Install skills and run setup
30
-
31
- ```bash
32
- scip-query install-skills
33
- scip-query setup-hooks --json
34
- scip-query setup --json
35
- ```
36
-
37
- Use `scip-query setup --git-hook --json` only when the user wants the local Git pre-commit diff-gate hook. Do not treat that hook as a replacement for final verification.
38
- Use `scip-query setup-hooks --json` when hook config needs to be repaired for the current repository without rerunning the full setup pass.
39
-
40
- ### 3. Resolve blockers
41
-
42
- If setup reports `blocked` or `partial`, inspect dependencies and capabilities:
43
-
44
- ```bash
45
- scip-query check-deps
46
- scip-query doctor
47
- scip-query capability-matrix --json
48
- scip-query status --capabilities
49
- ```
50
-
51
- Fix missing indexers, toolchain dependencies, invalid config, or stale indexes. If a toolchain cannot be installed safely, record exact manual commands and keep the adoption state blocked.
52
-
53
- ### 4. Initialize or validate config
54
-
55
- ```bash
56
- scip-query init
57
- scip-query config-validate
58
- ```
59
-
60
- Run `init` only when `.scipquery.json` is absent and the project needs config. Keep config minimal and evidence-backed. Use suppressions only for accepted findings with specific reasons:
61
-
62
- ```bash
63
- scip-query suppress <id> --reason "<specific reason>"
64
- scip-query config-validate
65
- ```
66
-
67
- ### 5. Prove ongoing local usefulness
68
-
69
- ```bash
70
- scip-query status --capabilities
71
- # If freshness is stale, missing, or unknown:
72
- # scip-query reindex
73
- scip-query stats
74
- scip-query files <known-source-term>
75
- scip-query outline <known-source-file>
76
- scip-query health --json --full
77
- scip-query diff-gate --json
78
- ```
79
-
80
- Use `scip-query watch` only for an active local work session where automatic reindexing is useful. Do not leave it running as a hidden setup side effect.
81
-
82
- ### 6. Hand off to health audit
83
-
84
- Invoke `scip-health-audit` after setup if the user wants cleanup or a perfect-code pass. The first user-facing message after the audit must include:
85
-
86
- - health score;
87
- - confirmed items that need attention;
88
- - unconfirmed signals;
89
- - unavailable or blocked checks;
90
- - recommended first cleanup batch.
91
-
92
- Then start cleanup only if the current request already asks for cleanup or the user approves the batch.
93
-
94
- ## Adoption Report
95
-
96
- End with:
97
-
98
- ```markdown
99
- Adoption: ready/partial/blocked
100
-
101
- Installed:
102
- - skills, hooks, indexers, config files, guidance files
103
-
104
- Capabilities:
105
- - available checks
106
- - unavailable checks and why
107
-
108
- Health:
109
- - score
110
- - dossier path
111
- - confirmed cleanup queue or audit handoff
112
-
113
- Verification:
114
- - `scip-query status --capabilities`, then `scip-query reindex` only if freshness is `stale`, `missing`, or `unknown`
115
- - `scip-query diff-gate --json`
116
- - targeted smoke commands
117
-
118
- Deferred:
119
- - CI setup, external toolchains, product decisions, or blocked checks
120
- ```
121
-
122
- Do not claim adoption is ready until the index is current, core commands smoke-test, and `scip-query diff-gate --json` passes.
@@ -1,4 +0,0 @@
1
- interface:
2
- display_name: "SCIP Adoption"
3
- short_description: "Adopt scip-query in a repository"
4
- default_prompt: "Set up scip-query in this repository, verify local capabilities, write the health dossier, and hand off confirmed cleanup work."
@@ -1,153 +0,0 @@
1
- ---
2
- name: scip-ai-cleanup
3
- description: Clean up AI-generated code rot using scip-query's change-graph and verification tooling. Finds recent re-implementations of established code, drifting standards docs, speculative parameters, hidden coupling, and produces compiler-verified deletion plans. Sets up the CI ratchet so findings never regress.
4
- ---
5
-
6
- # AI-Generated Code Cleanup with scip-query
7
-
8
- AI-assisted development rots a codebase in specific, detectable ways: agents
9
- re-implement helpers they didn't know existed, leave half-wired parallel
10
- implementations behind, add parameters "for later" that never come, and the
11
- standards docs written FOR agents drift away from the code — so the next agent
12
- implements against a dead spec. None of this is visible in a single file;
13
- all of it is visible in the reference graph + the git change graph.
14
-
15
- This skill runs the full sweep and ends with a compiler-verified deletion
16
- plan and a CI ratchet.
17
-
18
- ## When to Use This Skill
19
-
20
- - "Clean up the AI slop in this repo"
21
- - "Did the agents duplicate code?"
22
- - "Are our standards docs stale?"
23
- - "What can we safely delete?"
24
- - "Set up a quality gate for agent-written code"
25
-
26
- ## Hard Rules
27
-
28
- 1. **Evidence first.** Run `scip-query status --capabilities`; reindex only when freshness is `stale`, `missing`, or `unknown` before
29
- trusting graph facts. All detectors print whether they're heuristic.
30
- 2. **Verify before deleting.** Findings are candidates; only
31
- `cleanup-plan --verify` output stamped COMPILER-VERIFIED is proof.
32
- A FAILED verification is signal too — its errors name the references the
33
- static evidence missed. Never delete on a failed batch.
34
- 3. **Echoes consolidate INTO the established side.** When recent code
35
- duplicates older code, extend the original and delete the echo — not the
36
- reverse. The established side has the consumers and the bug-fix history.
37
- 4. **Fix the doc or delete the doc — never leave it lying.** A stale standards
38
- doc actively misleads every agent that reads it.
39
-
40
- ## The Sweep
41
-
42
- ### Step 1: Recent re-implementations (echoes)
43
-
44
- ```bash
45
- scip-query recent-duplicates --window 100
46
- ```
47
-
48
- - `ECHO` — recent code duplicating established code. Read both sides, then
49
- migrate the echo's callers to the established symbol and delete the echo.
50
- - `TWIN` — both sides landed recently (often one agent session duplicating
51
- itself). Pick the better-placed one, consolidate before they diverge.
52
- - Widen `--window` on slow-moving repos; narrow it right after a big agent
53
- session.
54
-
55
- ### Step 2: Drifting and lying docs
56
-
57
- ```bash
58
- scip-query doc-drift
59
- scip-query doc-drift AGENTS.md # detail mode for one doc
60
- ```
61
-
62
- - `BROKEN REFERENCE` lines are the worst class: the doc cites files that no
63
- longer exist. Fix those citations first.
64
- - `referenced by doc` subjects changed after the doc's last update — re-read
65
- the subject files and update the doc's claims (or delete the doc).
66
- - Re-run after updating: staleness should drop to 0 for the docs you touched.
67
-
68
- ### Step 3: Speculative generality
69
-
70
- ```bash
71
- scip-query unused-params
72
- ```
73
-
74
- Trailing parameters no body uses — already scoped to removals that are
75
- type-safe by construction (TS/JS, trailing-only, no parameter properties).
76
- Drop the parameters and any arguments at call sites.
77
-
78
- ### Step 4: Hidden coupling
79
-
80
- ```bash
81
- scip-query co-change
82
- ```
83
-
84
- File pairs that repeatedly change in the same commits with NO dependency
85
- edge: hand-synchronized artifacts (schema ↔ inventory doc ↔ generator
86
- script, backend schema ↔ frontend store, .env.example ↔ env parser).
87
- For each pair, either name the shared concept in code (one source of truth)
88
- or add a contract test that fails when one side changes without the other.
89
-
90
- ### Step 5: Compiler-verified deletion
91
-
92
- ```bash
93
- scip-query cleanup-plan --verify --json
94
- ```
95
-
96
- - Batches are ordered: batch 0 is graph-fact dead now; batch n is dead once
97
- batch n-1 lands (the cascade). Apply ONE batch at a time.
98
- - `COMPILER-VERIFIED` means the deletion was applied in a throwaway worktree
99
- and your own checker (tsc / cargo check / go build / ruff) passed differentially.
100
- - `FAILED` errors name real references — usually barrel export lines or
101
- imports that must be removed together with the symbol, occasionally a
102
- detector false positive. Investigate before deleting anything.
103
- - The `blocked` list explains why candidates can't cascade (e.g. a spec file
104
- still references them).
105
-
106
- Apply only compiler-verified batches:
107
-
108
- ```bash
109
- scip-query cleanup-apply --verified --batch 0
110
- ```
111
-
112
- Use `--all` only after explicit human approval. Use `--force-dirty` only when
113
- you have inspected the touched files and know the existing edits are unrelated
114
- to the cleanup batch.
115
-
116
- ### Step 6: Ratchet it
117
-
118
- ```bash
119
- scip-query health --write-baseline # commit .scipquery-baseline.json
120
- scip-query health --baseline # exit 1 on any NEW finding — wire into CI
121
- scip-query diff-gate --json # per-diff gate: echoes, missing partners, uncited docs
122
- ```
123
-
124
- `diff-gate` is the leading indicator: run it on every agent commit / PR
125
- (`--base origin/main` in CI). Each finding carries a remediation the agent
126
- can apply directly.
127
-
128
- After each cleanup round, re-run `--write-baseline` to ratchet the count
129
- down. The gate is "don't get worse" — objective and ungameable.
130
-
131
- ## Before Writing New Code (prevention)
132
-
133
- Tell implementing agents to run these BEFORE writing a helper or reading a
134
- standard:
135
-
136
- ```bash
137
- scip-query plan-context <symbol-or-file> # structure + HISTORY (churn, co-change partners)
138
- scip-query similar <new-function-name> # does this already exist?
139
- scip-query doc-drift <standard.md> # is the standard I'm about to follow stale?
140
- ```
141
-
142
- The HISTORY section of plan-context lists the files that usually change with
143
- the target — the edit checklist that prevents the drift this skill cleans up.
144
-
145
- ## Reporting
146
-
147
- End with a prioritized summary:
148
-
149
- 1. Echoes/twins consolidated (LOC removed, callers migrated)
150
- 2. Docs fixed vs deleted (staleness before → after)
151
- 3. Compiler-verified deletions applied (LOC, batches)
152
- 4. Hidden couplings resolved (named mechanism or contract test added)
153
- 5. Baseline ratcheted: N findings → M
@@ -1,4 +0,0 @@
1
- interface:
2
- display_name: "SCIP AI Cleanup"
3
- short_description: "Clean up AI-generated code rot"
4
- default_prompt: "Use $scip-ai-cleanup to find and fix AI-generated duplication, partial migrations, and stale cleanup fallout."