scip-query 0.10.12 → 0.12.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 (354) hide show
  1. package/CHANGELOG.md +45 -0
  2. package/{vendor/scip/LICENSE.scip → LICENSE} +1 -0
  3. package/README.md +164 -49
  4. package/dist/augment-vue-worker.js +1 -1
  5. package/dist/{chunk-RUV5IY25.js → chunk-2LQWMYG4.js} +2 -2
  6. package/dist/{chunk-KZ4MG5NY.js → chunk-2QGE5AEP.js} +2 -2
  7. package/dist/chunk-4D54JIU3.js +2 -0
  8. package/dist/{chunk-2GLNBCHB.js → chunk-52Q4JFDW.js} +2 -2
  9. package/dist/chunk-5AAAEZ2Z.js +2 -0
  10. package/dist/chunk-64PRNLKP.js +2 -0
  11. package/dist/chunk-6XA4LDHY.js +2 -0
  12. package/dist/chunk-72MFTCU5.js +38 -0
  13. package/dist/chunk-75X52JTA.js +2 -0
  14. package/dist/{chunk-LEHVP4DY.js → chunk-7ITCOJGD.js} +2 -2
  15. package/dist/chunk-7JZRFDCU.js +2 -0
  16. package/dist/{chunk-XRUGSM76.js → chunk-AZLKLZ5S.js} +2 -2
  17. package/dist/chunk-B4VYXRCQ.js +26 -0
  18. package/dist/chunk-BCNT6ODA.js +5 -0
  19. package/dist/chunk-BP2NAIAZ.js +2 -0
  20. package/dist/chunk-BVNO67DB.js +2 -0
  21. package/dist/{chunk-XHMVZFA6.js → chunk-CW3KZ7UF.js} +2 -2
  22. package/dist/{chunk-6BN3EHQE.js → chunk-D64L53WX.js} +2 -2
  23. package/dist/{chunk-T3AEVJBG.js → chunk-D7J6GZAG.js} +2 -2
  24. package/dist/chunk-ECVXWZ4Q.js +3 -0
  25. package/dist/chunk-EDB7Y442.js +2 -0
  26. package/dist/{chunk-4ISHQ7UW.js → chunk-ETU2I5JM.js} +4 -4
  27. package/dist/chunk-EXKLAEB4.js +18 -0
  28. package/dist/chunk-EZ5WDZ2Q.js +3 -0
  29. package/dist/{chunk-S2MRVIJ5.js → chunk-F5BJSNU5.js} +6 -6
  30. package/dist/chunk-FBCOFKEC.js +2 -0
  31. package/dist/chunk-FERAXG6Y.js +72 -0
  32. package/dist/chunk-FXG3PHVW.js +9 -0
  33. package/dist/{chunk-XUCZ3RQ5.js → chunk-G2UBOONK.js} +4 -4
  34. package/dist/chunk-GNG622H3.js +3 -0
  35. package/dist/{chunk-JS6B76AQ.js → chunk-H2NMIZFD.js} +2 -2
  36. package/dist/chunk-H7NSJ7L2.js +5 -0
  37. package/dist/chunk-HSU3M25J.js +21 -0
  38. package/dist/chunk-HXXMPYEF.js +2 -0
  39. package/dist/chunk-IRJDYTNZ.js +3 -0
  40. package/dist/chunk-ISLWJ4PY.js +10 -0
  41. package/dist/chunk-J5WVNZ6O.js +2 -0
  42. package/dist/{chunk-UVPY3RUZ.js → chunk-K6UI6EBZ.js} +2 -2
  43. package/dist/{chunk-MNCQPMCH.js → chunk-KJCDEDQW.js} +2 -2
  44. package/dist/{chunk-ELC77ZDE.js → chunk-KMVGRIO2.js} +2 -2
  45. package/dist/chunk-KSUZS77X.js +16 -0
  46. package/dist/{chunk-A4UTLKHU.js → chunk-L2CX5GHZ.js} +2 -2
  47. package/dist/chunk-LFM3O5KX.js +2 -0
  48. package/dist/{chunk-ZUUNREKS.js → chunk-M72ZFN6E.js} +5 -5
  49. package/dist/chunk-MBKJ7GHT.js +102 -0
  50. package/dist/chunk-MJKJMWIM.js +2 -0
  51. package/dist/chunk-MKM7NBZK.js +43 -0
  52. package/dist/chunk-MTDBHTSF.js +2 -0
  53. package/dist/chunk-NAH5EAZS.js +6 -0
  54. package/dist/chunk-NJJ7AS4F.js +2 -0
  55. package/dist/{chunk-EOLGSSDR.js → chunk-NKT5EMEX.js} +2 -2
  56. package/dist/{chunk-ANUEY5WV.js → chunk-NLMRJ7SI.js} +2 -2
  57. package/dist/chunk-NQ75OVUU.js +40 -0
  58. package/dist/{chunk-TBCHRDAC.js → chunk-O3WDE26W.js} +2 -2
  59. package/dist/{chunk-VB2EZZPA.js → chunk-OPE5YXFE.js} +2 -2
  60. package/dist/chunk-ORBRX2QJ.js +2 -0
  61. package/dist/{chunk-OFXN2BCT.js → chunk-OSWF3HSF.js} +2 -2
  62. package/dist/{chunk-JJ5SAWBT.js → chunk-OVMUVXKQ.js} +2 -2
  63. package/dist/{chunk-NTSR6SRP.js → chunk-PH7ZFK6L.js} +2 -2
  64. package/dist/chunk-PXHPCWX5.js +2 -0
  65. package/dist/chunk-Q3B3FNCU.js +3 -0
  66. package/dist/{chunk-SQNHOOJ5.js → chunk-Q7S2DADC.js} +2 -2
  67. package/dist/{chunk-3XSNW5XB.js → chunk-QARYU7R3.js} +2 -2
  68. package/dist/chunk-QZ4JVECJ.js +2 -0
  69. package/dist/{chunk-FX6ULETZ.js → chunk-R5336VHZ.js} +2 -2
  70. package/dist/chunk-RA5MTIOO.js +2 -0
  71. package/dist/{chunk-RXINFVBN.js → chunk-RIQED5OU.js} +2 -2
  72. package/dist/chunk-T2FQ4GHD.js +9 -0
  73. package/dist/chunk-T6NGEV5I.js +2 -0
  74. package/dist/chunk-T7VQG55Q.js +2 -0
  75. package/dist/chunk-TFWDJDGO.js +2 -0
  76. package/dist/chunk-TG7QSYCJ.js +2 -0
  77. package/dist/{chunk-DQ6433ZG.js → chunk-TTMKELT7.js} +17 -8
  78. package/dist/{chunk-DDQONX6B.js → chunk-U7I373V4.js} +2 -2
  79. package/dist/chunk-UAHZ57BR.js +2 -0
  80. package/dist/chunk-URSSPS5H.js +2 -0
  81. package/dist/chunk-V3Z3IOWO.js +2 -0
  82. package/dist/{chunk-7C6JBBE4.js → chunk-V7CVBPWX.js} +2 -2
  83. package/dist/{chunk-PWAK75BU.js → chunk-VYF5HA76.js} +2 -2
  84. package/dist/chunk-WIBFXSYB.js +6 -0
  85. package/dist/chunk-WS3Z6W3M.js +65 -0
  86. package/dist/chunk-WXVGNFAO.js +2 -0
  87. package/dist/chunk-XEMQUN3Z.js +20 -0
  88. package/dist/chunk-YCPASUCX.js +2 -0
  89. package/dist/chunk-YDDGCJJG.js +3 -0
  90. package/dist/{chunk-2UVCH7CQ.js → chunk-YPKBZ77R.js} +2 -2
  91. package/dist/chunk-YZXV3CU3.js +60 -0
  92. package/dist/chunk-Z3IPJKJP.js +4 -0
  93. package/dist/chunk-ZMGBWSFZ.js +2 -0
  94. package/dist/{chunk-GKB4JJDU.js → chunk-ZOIPAYRP.js} +2 -2
  95. package/dist/chunk-ZRIOGL7F.js +8 -0
  96. package/dist/cli.js +446 -280
  97. package/dist/{config-types-dvHOz0zU.d.ts → config-types-BrHl3Bge.d.ts} +57 -0
  98. package/dist/{db-rMZO5JFK.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-CtTIGh6H.d.ts → health-BEZ1Rt0S.d.ts} +54 -2
  102. package/dist/index.d.ts +4 -68
  103. package/dist/index.js +1 -1
  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 +4 -2
  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 +42 -3
  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 +23 -4
  234. package/dist/reindex.js +19 -19
  235. package/dist/runtime.d.ts +11 -6
  236. package/dist/runtime.js +2 -2
  237. package/dist/{scip-cli-trnNvymv.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 +40 -3
  246. package/docs/analyzer-validation-ledger.md +34 -6
  247. package/package.json +39 -7
  248. package/scripts/build-scip-windows.mjs +10 -7
  249. package/skills/_shared/SKILL.md +243 -0
  250. package/skills/_shared/agents/openai.yaml +4 -0
  251. package/skills/scip-api-impact/SKILL.md +55 -71
  252. package/skills/scip-claim-audit/SKILL.md +105 -0
  253. package/skills/scip-claim-audit/agents/openai.yaml +4 -0
  254. package/skills/scip-cleanup-audit/SKILL.md +122 -0
  255. package/skills/scip-cleanup-audit/agents/openai.yaml +4 -0
  256. package/skills/scip-cleanup-improve/SKILL.md +84 -0
  257. package/skills/scip-cleanup-improve/agents/openai.yaml +4 -0
  258. package/skills/scip-concrete-plan/SKILL.md +181 -0
  259. package/skills/scip-concrete-plan/agents/openai.yaml +4 -0
  260. package/skills/scip-conductor/SKILL.md +133 -0
  261. package/skills/scip-conductor/agents/openai.yaml +4 -0
  262. package/skills/scip-debug/SKILL.md +60 -58
  263. package/skills/scip-diagram/SKILL.md +64 -94
  264. package/skills/scip-directory-architecture/SKILL.md +65 -107
  265. package/skills/scip-doc-reconcile/SKILL.md +56 -67
  266. package/skills/scip-explore/SKILL.md +78 -210
  267. package/skills/scip-hyper-optimization/SKILL.md +124 -198
  268. package/skills/scip-integrity-audit/SKILL.md +103 -0
  269. package/skills/scip-integrity-audit/agents/openai.yaml +4 -0
  270. package/skills/scip-language-playbook/SKILL.md +56 -326
  271. package/skills/scip-maintainability/SKILL.md +80 -219
  272. package/skills/scip-probe-reachability/SKILL.md +92 -0
  273. package/skills/scip-probe-reachability/agents/openai.yaml +4 -0
  274. package/skills/scip-query/SKILL.md +108 -124
  275. package/skills/scip-react-maintainability/SKILL.md +64 -82
  276. package/skills/scip-setup/SKILL.md +121 -0
  277. package/skills/scip-setup/agents/openai.yaml +4 -0
  278. package/skills/scip-tla-model-system/SKILL.md +150 -0
  279. package/skills/scip-tla-model-system/agents/openai.yaml +4 -0
  280. package/skills/scip-triage-issue/SKILL.md +53 -41
  281. package/skills/scip-twin-drift/SKILL.md +107 -0
  282. package/skills/scip-twin-drift/agents/openai.yaml +4 -0
  283. package/skills/scip-verify/SKILL.md +70 -88
  284. package/skills/scip-vue-maintainability/SKILL.md +67 -94
  285. package/dist/chunk-2DOW7QCA.js +0 -71
  286. package/dist/chunk-2FMFF4RI.js +0 -2
  287. package/dist/chunk-5GXTUANY.js +0 -2
  288. package/dist/chunk-5JHEN5VN.js +0 -25
  289. package/dist/chunk-62ULXMQ7.js +0 -18
  290. package/dist/chunk-63CI3IXR.js +0 -102
  291. package/dist/chunk-7EK7OSWS.js +0 -2
  292. package/dist/chunk-7IWIMNHI.js +0 -2
  293. package/dist/chunk-7XTO4YXB.js +0 -8
  294. package/dist/chunk-AOWFUGDL.js +0 -2
  295. package/dist/chunk-AREANYIA.js +0 -3
  296. package/dist/chunk-AZBELWZQ.js +0 -7
  297. package/dist/chunk-B32FX5KB.js +0 -2
  298. package/dist/chunk-B6MJ5VQV.js +0 -2
  299. package/dist/chunk-CXWCLVYL.js +0 -2
  300. package/dist/chunk-CYHIKTJN.js +0 -3
  301. package/dist/chunk-DFSEARAU.js +0 -2
  302. package/dist/chunk-DVFP6PZI.js +0 -2
  303. package/dist/chunk-E3ADDB43.js +0 -2
  304. package/dist/chunk-F6IXELII.js +0 -20
  305. package/dist/chunk-FMGVZBS2.js +0 -2
  306. package/dist/chunk-GG5LHT27.js +0 -2
  307. package/dist/chunk-H7JF2CKK.js +0 -2
  308. package/dist/chunk-HHOMJCP5.js +0 -4
  309. package/dist/chunk-HRDSU5FN.js +0 -9
  310. package/dist/chunk-HWVYTJOV.js +0 -2
  311. package/dist/chunk-JNMLBL36.js +0 -2
  312. package/dist/chunk-L446VQYQ.js +0 -2
  313. package/dist/chunk-LDJUB7XW.js +0 -2
  314. package/dist/chunk-MYTUWXHK.js +0 -4
  315. package/dist/chunk-N25HPUOK.js +0 -2
  316. package/dist/chunk-NABVR6B7.js +0 -2
  317. package/dist/chunk-NBNEVLRC.js +0 -3
  318. package/dist/chunk-ONPCQ2PM.js +0 -6
  319. package/dist/chunk-Q5P7NOVM.js +0 -2
  320. package/dist/chunk-RGKRYO22.js +0 -4
  321. package/dist/chunk-RM2WQ75T.js +0 -2
  322. package/dist/chunk-ROGZXWN2.js +0 -2
  323. package/dist/chunk-RSSXKJ6J.js +0 -38
  324. package/dist/chunk-RVGEZYMQ.js +0 -2
  325. package/dist/chunk-SA3DPTHT.js +0 -7
  326. package/dist/chunk-SGTKURU6.js +0 -52
  327. package/dist/chunk-T4N2ZRVY.js +0 -21
  328. package/dist/chunk-THB6AM3V.js +0 -11
  329. package/dist/chunk-ULHLDOD6.js +0 -4
  330. package/dist/chunk-UQ73QF5D.js +0 -43
  331. package/dist/chunk-UUBMFL3F.js +0 -59
  332. package/dist/chunk-V5FGK3DZ.js +0 -2
  333. package/dist/chunk-WTY5FERW.js +0 -2
  334. package/dist/chunk-WUOB4DHH.js +0 -6
  335. package/dist/chunk-YFQIKYOP.js +0 -2
  336. package/dist/chunk-Z2LDWIJV.js +0 -5
  337. package/dist/chunk-ZNWWVYQL.js +0 -3
  338. package/skills/concrete-plan/SKILL.md +0 -372
  339. package/skills/concrete-plan/agents/openai.yaml +0 -4
  340. package/skills/scip-adoption/SKILL.md +0 -122
  341. package/skills/scip-adoption/agents/openai.yaml +0 -4
  342. package/skills/scip-ai-cleanup/SKILL.md +0 -153
  343. package/skills/scip-ai-cleanup/agents/openai.yaml +0 -4
  344. package/skills/scip-debloat/SKILL.md +0 -439
  345. package/skills/scip-debloat/agents/openai.yaml +0 -4
  346. package/skills/scip-health-audit/SKILL.md +0 -162
  347. package/skills/scip-health-audit/agents/openai.yaml +0 -4
  348. package/skills/scip-health-improve/SKILL.md +0 -155
  349. package/skills/scip-health-improve/agents/openai.yaml +0 -4
  350. package/skills/scip-query-setup/SKILL.md +0 -170
  351. package/skills/scip-query-setup/agents/openai.yaml +0 -3
  352. package/vendor/scip/README.md +0 -6
  353. package/vendor/scip/win32-arm64/scip.exe +0 -0
  354. package/vendor/scip/win32-x64/scip.exe +0 -0
@@ -1,49 +1,73 @@
1
1
  ---
2
2
  name: scip-debug
3
- description: Root-cause bugs and regressions with scip-query evidence. Use when the user reports a bug, failing behavior, regression, confusing runtime path, broken data flow, or asks to debug, diagnose, reproduce, trace, or explain why code behaves incorrectly before fixing it.
3
+ description: Debug bugs and regressions with scip-query evidence. Use for failing behavior, wrong data flow, confusing runtime paths, broken tests, root-cause analysis, reproduction, tracing, or minimal fixes.
4
+ commands:
5
+ - template: "scip-query files <feature-or-error-term>"
6
+ when: "Find the entry point from a feature name or error term."
7
+ - template: "scip-query trace <candidate-symbol>"
8
+ when: "Find the entry point: definition plus every reference."
9
+ - template: "scip-query call-graph <entry-symbol>"
10
+ when: "Follow execution: callers and callees along the failing path."
11
+ - template: "scip-query dataflow <symbol-or-variable>"
12
+ when: "Follow data: producers, consumers, and usage sites."
13
+ - template: "scip-query similar <suspect-symbol> --json --full"
14
+ when: "Compare nearby implementations for missing guards or handling."
15
+ - template: "scip-query change-surface <suspect-file> --json --full"
16
+ when: "Bound the fix: exports, consumers, and blast-radius risk."
4
17
  ---
5
18
 
6
- # SCIP Debug
19
+ # scip-debug
7
20
 
8
- Use this skill to move from a reported failure to a minimal verified fix. A bug is a mismatch between expected behavior and observed behavior in a concrete execution path. A root cause is the earliest code fact in that path that explains the mismatch and makes the later symptoms possible.
21
+ Use this skill to move from a reported failure to a minimal verified fix. A bug is a mismatch between expected behavior and observed behavior in a concrete execution path. A root cause is the earliest code fact in that path that explains the mismatch.
22
+
23
+ Load shared mechanics from [`../_shared/SKILL.md`](../_shared/SKILL.md).
24
+
25
+ <!-- BEGIN GENERATED SKILL COMMANDS -->
26
+ ## Commands for this skill
27
+
28
+ | Command | Purpose | When |
29
+ | --- | --- | --- |
30
+ | `scip-query files <feature-or-error-term>` | Find files matching a pattern | Find the entry point from a feature name or error term. |
31
+ | `scip-query trace <candidate-symbol>` | Trace a symbol: definition + all references | Find the entry point: definition plus every reference. |
32
+ | `scip-query call-graph <entry-symbol>` | Show incoming callers and outgoing callees for a symbol | Follow execution: callers and callees along the failing path. |
33
+ | `scip-query dataflow <symbol-or-variable>` | Reference-level dataflow: definition sites, usage sites, producers, consumers | Follow data: producers, consumers, and usage sites. |
34
+ | `scip-query similar <suspect-symbol> --json --full` | Find heuristic function similarity candidates from callee fingerprints | Compare nearby implementations for missing guards or handling. |
35
+ | `scip-query change-surface <suspect-file> --json --full` | Pre-change briefing: exports, consumers, and blast-radius risk | Bound the fix: exports, consumers, and blast-radius risk. |
36
+
37
+ Use this shortlist first. Open [`../_shared/SKILL.md`](../_shared/SKILL.md) only when it is insufficient.
38
+ <!-- END GENERATED SKILL COMMANDS -->
9
39
 
10
40
  ## Rules
11
41
 
12
- 1. Reproduce or restate the failure before changing code.
13
- 2. Use scip-query to identify entry points, call paths, data flow, and blast radius. Do not debug from filename guesses alone.
14
- 3. Prefer one narrow fix over broad cleanup. If cleanup is also needed, record it after the bug fix unless it is required for correctness.
15
- 4. Verify the fix with the repo's test or smoke command, then run `scip-verify`.
42
+ 1. Reproduce or restate the failure before editing.
43
+ 2. Use scip-query to find entry points, call paths, data flow, and blast radius.
44
+ 3. Prefer one narrow fix over broad cleanup.
45
+ 4. Verify with the narrowest repo test or smoke command, then invoke `scip-verify`.
16
46
 
17
47
  ## Workflow
18
48
 
19
49
  ### 1. Pin the failure
20
50
 
21
- Record:
51
+ Record observed behavior, expected behavior, reproducing command/route/UI action/test/job/file, error text or wrong output, and regression window if known.
22
52
 
23
- - observed behavior;
24
- - expected behavior;
25
- - command, route, UI action, test, job, or file that exposes it;
26
- - error text or wrong output;
27
- - suspected time window if it is a regression.
53
+ If no reproduction is provided, build the smallest runnable reproduction from existing tests, scripts, CLI, or app entry points.
28
54
 
29
- If the user provides no reproduction, make the smallest runnable reproduction you can from the repo's existing tests, scripts, CLI, or app entry points.
55
+ This step is complete only when the mismatch is concrete enough to test or the missing external fact is named.
30
56
 
31
57
  ### 2. Find the entry point
32
58
 
33
59
  ```bash
34
- scip-query status --capabilities
35
- scip-query status --capabilities
36
- # If freshness is stale, missing, or unknown:
37
- # scip-query reindex
38
60
  scip-query files <feature-or-error-term>
39
61
  scip-query outline <candidate-file>
40
62
  scip-query trace <candidate-symbol>
41
63
  scip-query code <candidate-symbol>
42
64
  ```
43
65
 
44
- Use `scip-query by-kind function --scope <scope>` or `scip-query kind-counts --scope <scope>` when the codebase is unfamiliar and you need an inventory before selecting an entry point.
66
+ Use `kind-counts` or `by-kind` when the codebase is unfamiliar.
67
+
68
+ This step is complete only when the failing path has a plausible entry point with source evidence.
45
69
 
46
- ### 3. Follow execution
70
+ ### 3. Follow execution and data
47
71
 
48
72
  ```bash
49
73
  scip-query call-graph <entry-symbol>
@@ -51,73 +75,51 @@ scip-query code <callee-symbol>
51
75
  scip-query refs <state-or-api-symbol>
52
76
  scip-query fan-in <suspect-symbol>
53
77
  scip-query fan-out <suspect-file>
54
- ```
55
-
56
- Build the smallest path that explains the observed behavior. Stop expanding once the path reaches the first code fact that can cause the symptom.
57
-
58
- ### 4. Follow data and state
59
-
60
- ```bash
61
78
  scip-query dataflow <symbol-or-variable>
62
79
  scip-query slice <symbol-or-variable>
63
80
  scip-query slice <symbol-or-variable> --forward
64
81
  ```
65
82
 
66
- Use dataflow when the bug looks like wrong state, wrong input normalization, missing validation, stale cache, dropped field, wrong async order, or an unexpected output value.
83
+ Stop expanding when the first code fact that can cause the symptom is found.
67
84
 
68
- ### 5. Compare nearby implementations
85
+ This step is complete only when the path explains the symptom or the missing evidence is explicit.
86
+
87
+ ### 4. Compare nearby implementations
69
88
 
70
89
  ```bash
71
90
  scip-query similar <suspect-symbol> --json --full
72
- scip-query convergence <suspect-symbol> <similar-symbol>
91
+ scip-query similar <suspect-symbol> <similar-symbol> --plan
73
92
  scip-query similar-files <suspect-file> --json --full
74
93
  ```
75
94
 
76
- A similar implementation can reveal the missing branch, guard, conversion, lifecycle step, or error handling path. Preserve essential differences; do not copy behavior blindly.
95
+ Use comparisons to find missing guards, conversions, lifecycle steps, or error handling. Preserve essential differences.
96
+
97
+ This step is complete only when comparisons either support the fix or are rejected with a reason.
77
98
 
78
- ### 6. Bound the fix
99
+ ### 5. Bound and fix
79
100
 
80
101
  ```bash
81
102
  scip-query change-surface <suspect-file> --json --full
82
103
  scip-query affected <suspect-symbol> --json
83
- scip-query diff-impact --json
84
104
  ```
85
105
 
86
- Name the smallest symbol or file that should change. If the blast radius is larger than the bug's scope, explain why before editing.
87
-
88
- ### 7. Fix and verify
106
+ Make the smallest code change that fixes the root cause.
89
107
 
90
- Apply the minimal code change, then run:
108
+ This step is complete only when the changed symbol/file is justified by blast-radius evidence.
91
109
 
92
- ```bash
93
- scip-query status --capabilities
94
- # If freshness is stale, missing, or unknown:
95
- # scip-query reindex
96
- scip-query diff-gate --json
97
- ```
110
+ ### 6. Verify
98
111
 
99
- Also run the narrowest repo test, app smoke test, or command that reproduces the failure. Invoke `scip-verify` before calling the bug fixed.
112
+ Run the reproduction, narrow test or smoke command, and invoke `scip-verify`.
100
113
 
101
- ## Report Format
114
+ ## Report
102
115
 
103
116
  ```markdown
104
- Bug: <observed mismatch>
105
-
117
+ Bug:
106
118
  Entry point:
107
- - <file/symbol> from <command>
108
-
109
119
  Root cause:
110
- - <code fact> from <command>
111
-
112
120
  Fix:
113
- - <minimal change>
114
-
115
121
  Verification:
116
- - <repo test or smoke command>
117
- - `scip-query diff-gate --json`
118
-
119
122
  Remaining risk:
120
- - <blast radius, unavailable capability, or follow-up cleanup>
121
123
  ```
122
124
 
123
- If no root cause is proven, say what evidence is missing and what command or reproduction would unblock it. Do not present a guess as a fix.
125
+ Do not present a guess as a root cause. If no root cause is proven, report the missing evidence.
@@ -1,43 +1,68 @@
1
1
  ---
2
2
  name: scip-diagram
3
- description: Create evidence-backed HTML diagrams of how code works using scip-query. Use when the user asks for a code flow diagram, architecture diagram, data-flow diagram, dependency map, blast-radius visualization, module map, or an HTML artifact that explains a system.
3
+ description: Diagram code with scip-query evidence. Use for code flow diagrams, architecture diagrams, data-flow maps, dependency maps, blast-radius visuals, module maps, or HTML artifacts explaining a system.
4
+ commands:
5
+ - template: "scip-query system <module>"
6
+ when: "Collect evidence: module map for a dependency or architecture diagram."
7
+ - template: "scip-query trace <symbol>"
8
+ when: "Collect evidence: definition plus references for a call-flow diagram."
9
+ - template: "scip-query call-graph <symbol>"
10
+ when: "Collect evidence: callers/callees for a call-flow diagram."
11
+ - template: "scip-query dataflow <symbol>"
12
+ when: "Collect evidence: producers/consumers for a data-flow diagram."
13
+ - template: "scip-query affected <symbol> --json"
14
+ when: "Collect evidence: blast-radius nodes and edges."
15
+ - template: "scip-query change-surface <file> --json --full"
16
+ when: "Collect evidence: exports and consumers for a change-surface map."
4
17
  ---
5
18
 
6
- # SCIP Diagram
19
+ # scip-diagram
7
20
 
8
- Use this skill to build a visual explanation from compiler-resolved code facts. A code diagram is an HTML artifact that turns source units, calls, dependencies, data flow, or blast radius into a visual map. Its defining trait is that every node and edge comes from scip-query evidence, not from guessed folder structure.
21
+ Use this skill to build a visual explanation from compiler-resolved facts. A code diagram is an HTML artifact that turns source units, calls, dependencies, data flow, or blast radius into a visual map; every node and edge must trace to scip-query evidence.
22
+
23
+ Load shared mechanics from [`../_shared/SKILL.md`](../_shared/SKILL.md).
24
+
25
+ <!-- BEGIN GENERATED SKILL COMMANDS -->
26
+ ## Commands for this skill
27
+
28
+ | Command | Purpose | When |
29
+ | --- | --- | --- |
30
+ | `scip-query system <module>` | Full module map: files, symbols, deps in/out | Collect evidence: module map for a dependency or architecture diagram. |
31
+ | `scip-query trace <symbol>` | Trace a symbol: definition + all references | Collect evidence: definition plus references for a call-flow diagram. |
32
+ | `scip-query call-graph <symbol>` | Show incoming callers and outgoing callees for a symbol | Collect evidence: callers/callees for a call-flow diagram. |
33
+ | `scip-query dataflow <symbol>` | Reference-level dataflow: definition sites, usage sites, producers, consumers | Collect evidence: producers/consumers for a data-flow diagram. |
34
+ | `scip-query affected <symbol> --json` | Transitive closure of symbols that could break if this symbol changes | Collect evidence: blast-radius nodes and edges. |
35
+ | `scip-query change-surface <file> --json --full` | Pre-change briefing: exports, consumers, and blast-radius risk | Collect evidence: exports and consumers for a change-surface map. |
36
+
37
+ Use this shortlist first. Open [`../_shared/SKILL.md`](../_shared/SKILL.md) only when it is insufficient.
38
+ <!-- END GENERATED SKILL COMMANDS -->
9
39
 
10
40
  ## Rules
11
41
 
12
- 1. Run scip-query evidence first, then draw. Do not invent nodes or arrows.
13
- 2. Make a self-contained HTML file unless the user asks for another format.
14
- 3. Include command provenance in the HTML so readers can see which scip-query commands produced the diagram.
15
- 4. Keep diagrams scoped. If the graph is huge, summarize clusters and link to detailed evidence rather than rendering a hairball.
16
- 5. Verify the HTML opens cleanly and contains the expected diagram content.
42
+ 1. Run evidence before drawing.
43
+ 2. Default to a self-contained HTML file.
44
+ 3. Include command provenance in the artifact.
45
+ 4. Scope large graphs into clusters instead of rendering a hairball.
46
+ 5. Verify the HTML opens and the diagram is nonblank.
17
47
 
18
- ## Pick the Diagram Type
48
+ ## Workflow
19
49
 
20
- | User wants | Use |
21
- |---|---|
22
- | "How does this feature work?" | Call-flow diagram |
23
- | "Where does this value come from?" | Data-flow diagram |
24
- | "What depends on this?" | Blast-radius diagram |
25
- | "What is this module's architecture?" | Module/dependency diagram |
26
- | "Why is this hard to change?" | Change-surface or bottleneck diagram |
27
- | "Show classes or ownership" | Hierarchy and surface diagram |
50
+ ### 1. Pick diagram type
28
51
 
29
- ## Evidence Commands
52
+ | User wants | Diagram |
53
+ | --- | --- |
54
+ | Feature flow | Call flow |
55
+ | Value origin or mutation | Data flow |
56
+ | Dependents | Blast radius |
57
+ | Module architecture | Dependency map |
58
+ | Hard-to-change explanation | Change surface or bottleneck map |
59
+ | Classes or ownership | Hierarchy and surface map |
30
60
 
31
- Start with current graph facts:
61
+ This step is complete only when the diagram's node and edge types are chosen.
32
62
 
33
- ```bash
34
- scip-query status --capabilities
35
- scip-query status --capabilities
36
- # If freshness is stale, missing, or unknown:
37
- # scip-query reindex
38
- ```
63
+ ### 2. Collect evidence
39
64
 
40
- Collect only the commands needed for the diagram:
65
+ Use only commands needed for the chosen diagram:
41
66
 
42
67
  ```bash
43
68
  scip-query system <module>
@@ -55,86 +80,31 @@ scip-query affected <symbol> --json
55
80
  scip-query change-surface <file> --json --full
56
81
  scip-query hierarchy <symbol> --json
57
82
  scip-query fan-out <file> --json
58
- scip-query bottlenecks
59
- scip-query cycles
60
83
  ```
61
84
 
62
- Use `scip-query kind-counts --scope <scope>` and `scip-query by-kind <kind> --scope <scope>` when the diagram needs an inventory of symbols.
85
+ This step is complete only when every planned node and edge has a source command.
63
86
 
64
- ## Build the HTML
87
+ ### 3. Build the artifact
65
88
 
66
- Write the artifact under:
89
+ Write to:
67
90
 
68
91
  ```text
69
92
  docs/scip-query/diagrams/YYYY-MM-DD-<scope>.html
70
93
  ```
71
94
 
72
- If the repo has a different reports convention, follow it. The file should include:
73
-
74
- - title and scope;
75
- - short textual summary;
76
- - the visual diagram;
77
- - legend for node colors, edge styles, and risk labels;
78
- - evidence table listing every scip-query command used;
79
- - notes for omitted nodes, collapsed clusters, or unavailable capabilities.
80
-
81
- Implementation guidance:
82
-
83
- - Use inline CSS and either semantic HTML layout or inline SVG.
84
- - Use stable dimensions and labels that wrap cleanly.
85
- - Use one visual encoding per meaning: call edges, data edges, dependency edges, and risk edges should look different.
86
- - Keep colors accessible and avoid relying on color alone; include labels or edge styles.
87
- - For large graphs, group by module, ownership, lifecycle phase, or public surface.
88
-
89
- ## Diagram Recipes
90
-
91
- ### Call Flow
92
-
93
- ```bash
94
- scip-query trace <entry-symbol>
95
- scip-query call-graph <entry-symbol>
96
- scip-query code <entry-symbol>
97
- ```
98
-
99
- Render entry point -> major callees -> side effects or terminal outputs. Label each edge with the call or branch reason when `code` proves it.
100
-
101
- ### Data Flow
102
-
103
- ```bash
104
- scip-query dataflow <value-symbol>
105
- scip-query slice <value-symbol>
106
- scip-query slice <value-symbol> --forward
107
- ```
108
-
109
- Render producers, transformations, validators, storage, and consumers. Mark inferred or unavailable parts explicitly.
95
+ Include title, scope, summary, visual diagram, legend, evidence table, omitted/collapsed nodes, and unavailable capabilities.
110
96
 
111
- ### Dependency or Module Map
112
-
113
- ```bash
114
- scip-query system <module>
115
- scip-query deps <file>
116
- scip-query rdeps <file>
117
- scip-query surface <module>
118
- ```
119
-
120
- Render internal files, imported modules, reverse consumers, and public surfaces. Distinguish internal dependencies from external consumers.
121
-
122
- ### Blast Radius
123
-
124
- ```bash
125
- scip-query affected <symbol> --json
126
- scip-query change-surface <file> --json --full
127
- ```
97
+ Use inline CSS and semantic HTML or inline SVG. Give stable dimensions, wrapping labels, accessible colors, and distinct edge styles for calls, data, dependencies, and risk.
128
98
 
129
- Render the changed symbol, direct consumers, transitive consumers, and high-risk surfaces. Show depth so the user can see how far the change travels.
99
+ This step is complete only when the HTML contains the visual and provenance table.
130
100
 
131
- ## Verification
101
+ ### 4. Verify
132
102
 
133
- After writing the HTML:
103
+ Open the file locally or use a browser/screenshot tool when available. Confirm:
134
104
 
135
- 1. Open it locally or use a browser/screenshot tool when available.
136
- 2. Confirm the diagram is nonblank and labels do not overlap badly.
137
- 3. Confirm every major node and edge is traceable to the evidence table.
138
- 4. Run `scip-query diff-gate --json` if the diagram is part of a code or docs change.
105
+ - diagram is nonblank;
106
+ - labels do not overlap badly;
107
+ - major nodes and edges trace to evidence;
108
+ - `scip-verify` has been invoked when this is part of a docs/code change.
139
109
 
140
- End by giving the file path and a short summary of what the diagram proves.
110
+ End with the file path and what the diagram proves.
@@ -1,71 +1,73 @@
1
1
  ---
2
2
  name: scip-directory-architecture
3
- description: Review and improve repository directory architecture with scip-query evidence. Use when the user asks to design, evaluate, reorganize, or migrate source folder structure; identify feature/module ownership boundaries; turn a messy or AI-generated codebase into clearer folders; decide whether locality boundaries are mature enough for config; or plan safe directory migrations without guessing from filenames alone.
3
+ description: Review directory architecture with scip-query evidence. Use to evaluate, design, reorganize, or migrate folder structure, ownership boundaries, locality config, messy repos, AI-generated layout, or safe file-move slices.
4
+ commands:
5
+ - template: "scip-query system <scope>"
6
+ when: "Inventory evidence: files, symbols, deps in/out for the scope."
7
+ - template: "scip-query locality-candidates --json --full"
8
+ when: "Inventory evidence: directory-locality candidates from consumer ownership."
9
+ - template: "scip-query similar-files --full --json"
10
+ when: "Inventory evidence: files with overlapping dependency profiles."
11
+ - template: "scip-query cycles"
12
+ when: "Inventory evidence: circular dependency chains between files."
13
+ - template: "scip-query co-change --json --full"
14
+ when: "Inventory evidence: hidden file-level coupling from git history."
15
+ - template: "scip-query config-validate --json"
16
+ when: "Implement a slice: validate locality config after a move."
4
17
  ---
5
18
 
6
- # SCIP Directory Architecture
19
+ # scip-directory-architecture
7
20
 
8
- ## Overview
21
+ Use this skill to answer where code should live. Directory architecture is the filesystem arrangement of source files by their main reason to change; what distinguishes a good structure is that a maintainer can predict where a concept belongs before reading every import.
9
22
 
10
- Use this skill to turn source layout questions into an evidence-backed architecture review. Do not treat the current folder tree as authoritative, and do not invent an "optimal" structure without proving the ownership concepts from code, tests, docs, and dependency evidence.
23
+ Load shared mechanics from [`../_shared/SKILL.md`](../_shared/SKILL.md).
11
24
 
12
- A directory architecture is the filesystem arrangement of source files by their main reason to change. Its defining trait is that a maintainer can predict where a concept belongs before reading every import.
25
+ <!-- BEGIN GENERATED SKILL COMMANDS -->
26
+ ## Commands for this skill
13
27
 
14
- An ownership boundary is a folder, package, module, or convention that groups code around one stable responsibility. Its defining trait is that code inside the boundary should usually change for the same kind of reason.
28
+ | Command | Purpose | When |
29
+ | --- | --- | --- |
30
+ | `scip-query system <scope>` | Full module map: files, symbols, deps in/out | Inventory evidence: files, symbols, deps in/out for the scope. |
31
+ | `scip-query locality-candidates --json --full` | Find directory-locality and ancestry candidates from consumer ownership | Inventory evidence: directory-locality candidates from consumer ownership. |
32
+ | `scip-query similar-files --full --json` | Find heuristic similar-file candidates from dependency profiles | Inventory evidence: files with overlapping dependency profiles. |
33
+ | `scip-query cycles` | Detect circular dependency chains between files | Inventory evidence: circular dependency chains between files. |
34
+ | `scip-query co-change --json --full` | Files that change together in git history without a dependency edge — hidden coupling candidates | Inventory evidence: hidden file-level coupling from git history. |
35
+ | `scip-query config-validate --json` | Validate .scipquery.json, including structured suppressions and declared coupling groups | Implement a slice: validate locality config after a move. |
15
36
 
16
- A target structure is a proposed future folder layout for the repo or scope. Its defining trait is that it expresses the desired ownership model, not merely a prettier tree.
37
+ Use this shortlist first. Open [`../_shared/SKILL.md`](../_shared/SKILL.md) only when it is insufficient.
38
+ <!-- END GENERATED SKILL COMMANDS -->
17
39
 
18
- A migration slice is the smallest set of file moves and import updates that can be verified independently. Its defining trait is that it reduces one structural ambiguity without requiring the whole architecture to move at once.
40
+ ## Terms
19
41
 
20
- ## Non-Negotiables
42
+ An ownership boundary is a folder, package, module, or convention that groups code around one stable responsibility.
21
43
 
22
- 1. Start with evidence, not taste. Refresh the index when stale, then ground claims in `scip-query` outputs plus project docs and tests.
23
- 2. Separate review from migration. A directory architecture review may propose moves; it does not move files unless the user asked for implementation or approved a specific migration slice.
24
- 3. Preserve working conventions. Existing boundaries are not wrong just because they are broad; central folders such as `errors`, `routes`, `workflows`, `schemas`, `contracts`, or `features` may be doing real work.
25
- 4. Do not reward generic `shared`. A shared folder is justified only when the shared concept has a name, owner, and consumers across real boundaries.
26
- 5. Treat messy repos honestly. If ownership concepts are not stable, produce a discovery map and decision list instead of pretending the repo has a clean target structure.
27
- 6. Prefer small verified moves. Broad reorganizations need staged migration slices with import updates, tests, a fresh scip-query index, and `scip-query diff-gate --json`.
44
+ A target structure is a proposed future layout that expresses an ownership model, not merely a prettier tree.
28
45
 
29
- ## Workflow
30
-
31
- ### 1. Bound the Question
32
-
33
- Identify whether the user wants:
34
-
35
- - a review of the existing structure;
36
- - a proposed target structure;
37
- - a locality config decision;
38
- - a migration plan;
39
- - or an actual file-moving implementation.
46
+ A migration slice is the smallest set of file moves and import updates that can be verified independently.
40
47
 
41
- If the user asks for "the best folder structure," translate that into: "What ownership model is supported by this repo's code, tests, product domains, and change history?"
48
+ A slop codebase is a codebase whose files are arranged by accident, convenience, or recent edits rather than stable ownership rules.
42
49
 
43
- ### 2. Refresh and Inventory
50
+ ## Rules
44
51
 
45
- Run:
52
+ 1. Start with evidence, not taste.
53
+ 2. Separate review from migration; do not move files unless asked.
54
+ 3. Preserve broad boundaries when evidence shows they are intentional.
55
+ 4. Do not reward generic `shared` unless the shared concept has a name, owner, and cross-boundary consumers.
56
+ 5. For messy repos, produce a discovery map and decisions instead of pretending the target is obvious.
57
+ 6. Prefer small verified moves.
46
58
 
47
- ```bash
48
- scip-query status
49
- scip-query status --capabilities
50
- # If freshness is stale, missing, or unknown:
51
- # scip-query reindex
52
- scip-query stats
53
- find . -maxdepth 3 -type d | sort
54
- ```
55
-
56
- Read durable project guidance before judging structure:
59
+ ## Workflow
57
60
 
58
- ```bash
59
- rg -n "architecture|structure|feature|module|boundary|shared|workflow|route|contract|domain|ownership" AGENTS.md README.md docs agent-os .codex -g '!node_modules'
60
- ```
61
+ ### 1. Bound the question
61
62
 
62
- Use `rg --files` to sample real files in each important folder. Ignore generated, build, coverage, vendored, and dependency directories unless they are part of the architecture question.
63
+ Classify the request: review, target structure, locality config, migration plan, or implementation.
63
64
 
64
- ### 3. Build the Evidence Map
65
+ This step is complete only when the scope and deliverable are explicit.
65
66
 
66
- Use these probes as evidence, not as verdicts:
67
+ ### 2. Inventory evidence
67
68
 
68
69
  ```bash
70
+ scip-query stats
69
71
  scip-query system <scope>
70
72
  scip-query files <pattern>
71
73
  scip-query surface <scope>
@@ -82,101 +84,57 @@ scip-query recent-duplicates
82
84
  scip-query drift
83
85
  ```
84
86
 
85
- For each folder under review, record:
87
+ Also read durable project guidance that names architecture, modules, ownership, routes, workflows, contracts, or domains.
86
88
 
87
- - real-world concept or product area represented by the folder;
88
- - public exports, entry points, routes, commands, or package surfaces;
89
- - main consumers and cross-boundary consumers;
90
- - tests that define the folder's behavior;
91
- - co-change partners and repeated edit patterns;
92
- - duplicated or parallel folder patterns;
93
- - docs or standards that claim ownership rules.
89
+ This step is complete only when each folder under review has evidence for exports, entry points, consumers, tests, co-change partners, and claimed ownership rules.
94
90
 
95
- ### 4. Classify Boundary Maturity
91
+ ### 3. Classify boundary maturity
96
92
 
97
- Classify each candidate folder:
93
+ Classify each candidate:
98
94
 
99
95
  - Mature: repeated, documented, and enforced by imports, tests, routes, packages, standards, or review history.
100
- - Emerging: meaningful and partly repeated, but not yet consistent enough to configure or enforce.
101
- - Accidental: a convenience bucket, legacy pile, generated artifact, recent edit cluster, or mixed folder with unrelated reasons to change.
96
+ - Emerging: meaningful and partly repeated, but not consistent enough to configure.
97
+ - Accidental: convenience bucket, legacy pile, generated artifact, recent edit cluster, or mixed reasons to change.
102
98
 
103
- A slop codebase is a codebase whose files are arranged by accident, convenience, or recent edits rather than stable ownership rules. Its defining trait is that directory names do not reliably predict where code should live. For this case, stop at discovery and decision prompts unless the user explicitly asks for a first migration slice.
99
+ This step is complete only when mature, emerging, and accidental boundaries are separated.
104
100
 
105
- ### 5. Propose the Target Structure
101
+ ### 4. Propose structure or decisions
106
102
 
107
- Produce an architecture proposal with this shape:
103
+ Use this shape:
108
104
 
109
- ````markdown
105
+ ```markdown
110
106
  # Directory Architecture Review
111
107
 
112
108
  ## Scope
113
109
  ## Current Structure Map
114
110
  ## Boundary Maturity
115
-
116
- | Boundary | Evidence | Maturity | Judgment |
117
- | --- | --- | --- | --- |
118
-
119
111
  ## Target Structure
120
-
121
- ```text
122
- src/
123
- ...
124
- ```
125
-
126
112
  ## Move Ledger
127
-
128
- | Slice | Current files | Proposed home | Why | Verification |
129
- | --- | --- | --- | --- | --- |
130
-
131
113
  ## Locality Config
114
+ ## No-Move Decisions
132
115
  ## Deferred Decisions
133
116
  ## Migration Order
134
- ````
135
-
136
- The target structure should name ownership concepts, not just folder labels. Prefer existing names when they already carry meaning. Introduce a new folder only when it removes ambiguity for multiple files or consumers.
137
-
138
- ### 6. Decide What Not to Move
139
-
140
- Explicitly list no-move decisions when:
141
-
142
- - a broad consumer set proves a central boundary is useful;
143
- - a folder is route-facing, package-facing, or contract-facing;
144
- - consumers cross boundaries because the concept is infrastructure;
145
- - moving would hide a domain-specific concept under generic `shared`;
146
- - the evidence is too weak and needs a human ownership decision.
117
+ ```
147
118
 
148
- ### 7. Implement Only a Migration Slice
119
+ List no-move decisions when broad consumers, route/package/contract surfaces, infrastructure roles, generic shared risk, or weak evidence make a move harmful.
149
120
 
150
- When the user asks to proceed, pick the smallest high-confidence slice. Before editing, state:
121
+ This step is complete only when every proposed move has a reason and verification path.
151
122
 
152
- - files to move;
153
- - imports/exports/tests/docs to update;
154
- - expected verification commands;
155
- - rollback risk.
123
+ ### 5. Implement one slice when asked
156
124
 
157
- Then move files with normal filesystem tools, update imports with project tooling where available, and run:
125
+ Before editing, state files to move, imports/exports/tests/docs to update, expected verification, and rollback risk. Then move the smallest high-confidence slice and run:
158
126
 
159
127
  ```bash
160
- scip-query status --capabilities
161
- # If freshness is stale, missing, or unknown:
162
- # scip-query reindex
163
128
  scip-query incomplete-migration
164
129
  scip-query recent-duplicates
165
130
  scip-query co-change <moved-file-or-config>
166
- scip-query diff-gate --json
167
131
  ```
168
132
 
169
- Also run the repo's normal tests or typecheck for the affected workspace. If the migration adds or changes `.scipquery.json` locality settings, run:
133
+ Also run project tests or typecheck for the affected workspace. If `.scipquery.json` locality changed, run:
170
134
 
171
135
  ```bash
172
136
  scip-query config-validate
173
137
  scip-query locality-candidates --json --full
174
138
  ```
175
139
 
176
- ## Output Rules
177
-
178
- - Lead with findings and judgments, not command transcripts.
179
- - Every proposed boundary needs evidence from at least two independent signals or a clear note that it is only a candidate.
180
- - Every proposed move needs a verification path.
181
- - For messy repos, output "discovery mode" and decision questions instead of a fake complete architecture.
182
- - For implementation, never batch unrelated folder moves just because they fit the same target structure.
140
+ Then invoke `scip-verify`. The implementation is complete only when imports, tests, locality signals, and verification are checked.