scip-query 0.19.5 → 0.19.6

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 (401) hide show
  1. package/CHANGELOG.md +48 -1
  2. package/README.md +241 -48
  3. package/dist/augment-vue-worker.js +1 -1
  4. package/dist/{chunk-2YU7I3QO.js → chunk-24QNP7MN.js} +2 -2
  5. package/dist/{chunk-CNKAGUPL.js → chunk-26X7KCJR.js} +2 -2
  6. package/dist/{chunk-GPBBJ5Y4.js → chunk-273W2U4Y.js} +3 -3
  7. package/dist/{chunk-7GXM52MI.js → chunk-2CVXCGL4.js} +2 -2
  8. package/dist/{chunk-ABMYA4TN.js → chunk-2EZSOTSY.js} +2 -2
  9. package/dist/{chunk-HKEHS2AS.js → chunk-2GSQR6YA.js} +2 -2
  10. package/dist/{chunk-FECYOO5O.js → chunk-2OXVAGGT.js} +2 -2
  11. package/dist/chunk-2ZOCHAL2.js +8 -0
  12. package/dist/{chunk-QGXBRIM5.js → chunk-336DC5NJ.js} +2 -2
  13. package/dist/chunk-35SQLYCQ.js +2 -0
  14. package/dist/{chunk-VXQNNXJE.js → chunk-3OIKRYU5.js} +2 -2
  15. package/dist/{chunk-52ZYCAEO.js → chunk-47X75ZKH.js} +2 -2
  16. package/dist/{chunk-NPKYOIFM.js → chunk-4CGVLUDP.js} +2 -2
  17. package/dist/chunk-4RI4BJGT.js +8 -0
  18. package/dist/{chunk-P2PC2WGR.js → chunk-52HQTTPB.js} +2 -2
  19. package/dist/{chunk-YNRNA5LK.js → chunk-5OC3HWP5.js} +2 -2
  20. package/dist/{chunk-STOL2BTL.js → chunk-6XFC7PQ5.js} +2 -2
  21. package/dist/{chunk-J77UIT3I.js → chunk-6XHTISLI.js} +2 -2
  22. package/dist/chunk-6YTSKJJ3.js +2 -0
  23. package/dist/{chunk-BTEE5NZQ.js → chunk-7E3TH5ZN.js} +2 -2
  24. package/dist/{chunk-X6D5IC6I.js → chunk-7LABSJSR.js} +2 -2
  25. package/dist/chunk-7Q6VYYCH.js +2 -0
  26. package/dist/{chunk-FWUUZTIO.js → chunk-A43URCQ3.js} +2 -2
  27. package/dist/chunk-A63U2W3P.js +3 -0
  28. package/dist/{chunk-3MJ5YA4Y.js → chunk-ADFSIJP2.js} +2 -2
  29. package/dist/chunk-AOLE4DYM.js +6 -0
  30. package/dist/chunk-APMMR5Y2.js +2 -0
  31. package/dist/chunk-B5MHCHP3.js +107 -0
  32. package/dist/{chunk-4RSI5EMG.js → chunk-CSTYYXKC.js} +2 -2
  33. package/dist/{chunk-25LPM4DG.js → chunk-CYJM7CYF.js} +2 -2
  34. package/dist/{chunk-S44IULR6.js → chunk-DD5BOU5I.js} +2 -2
  35. package/dist/{chunk-YGAGTIDK.js → chunk-DGMCFMPG.js} +7 -7
  36. package/dist/{chunk-UOAV44HR.js → chunk-E2ZXPB7J.js} +2 -2
  37. package/dist/{chunk-IZKFSVBV.js → chunk-EVOC5I5I.js} +2 -2
  38. package/dist/{chunk-XTX6QHOF.js → chunk-F42A3AKG.js} +2 -2
  39. package/dist/{chunk-Q4IIEGXJ.js → chunk-FHCTEANE.js} +2 -2
  40. package/dist/{chunk-3SVWW4PN.js → chunk-FKGN4A4E.js} +2 -2
  41. package/dist/{chunk-IG7N5ZIK.js → chunk-FQTPPXNA.js} +2 -2
  42. package/dist/{chunk-F6O7AAC3.js → chunk-G4UQL4CP.js} +2 -2
  43. package/dist/chunk-GA64UPMI.js +6 -0
  44. package/dist/{chunk-ZXJYMGD3.js → chunk-GK3GRUJX.js} +2 -2
  45. package/dist/chunk-HEBAY673.js +2 -0
  46. package/dist/chunk-HELS7KFF.js +2 -0
  47. package/dist/{chunk-B5NLK2B3.js → chunk-IPDCSB6N.js} +2 -2
  48. package/dist/{chunk-M7MTH5NR.js → chunk-IYAOX36F.js} +2 -2
  49. package/dist/{chunk-YVVCVR2L.js → chunk-J7VT2CRB.js} +2 -2
  50. package/dist/{chunk-4333ETTV.js → chunk-JELJLXEE.js} +2 -2
  51. package/dist/{chunk-LBMJEAEW.js → chunk-JERWGHQT.js} +2 -2
  52. package/dist/chunk-JJJCO4QC.js +945 -0
  53. package/dist/{chunk-6E7UTQY7.js → chunk-JZNLMHWY.js} +2 -2
  54. package/dist/{chunk-R4FQGQ4X.js → chunk-K42M2KWT.js} +2 -2
  55. package/dist/{chunk-H7UKLTWJ.js → chunk-KLVJABXA.js} +2 -2
  56. package/dist/chunk-KP4KBDVF.js +3 -0
  57. package/dist/{chunk-RV2FQIX3.js → chunk-LMFVTUW2.js} +2 -2
  58. package/dist/chunk-LRTP3DKL.js +3 -0
  59. package/dist/{chunk-U6WNH5GC.js → chunk-MGBJHRFB.js} +2 -2
  60. package/dist/{chunk-QDV6RDCP.js → chunk-MLGTCX56.js} +2 -2
  61. package/dist/{chunk-54HA4ZXH.js → chunk-N3SE646F.js} +2 -2
  62. package/dist/{chunk-KP6XRY5Z.js → chunk-NBRUH7OE.js} +2 -2
  63. package/dist/{chunk-M7AIS73L.js → chunk-NN4ZIRPK.js} +2 -2
  64. package/dist/{chunk-I5RJM53C.js → chunk-NQLSSVOB.js} +2 -2
  65. package/dist/{chunk-4SALD7RU.js → chunk-OBKDTVZ3.js} +2 -2
  66. package/dist/{chunk-GBQ5NYPR.js → chunk-OHWZKLVA.js} +6 -6
  67. package/dist/{chunk-6NSFJYRC.js → chunk-OP3MTFJR.js} +2 -2
  68. package/dist/{chunk-EOOJGLDU.js → chunk-OQ2A4G2G.js} +2 -2
  69. package/dist/{chunk-DLWR3NUU.js → chunk-P6HBYNBE.js} +2 -2
  70. package/dist/{chunk-QVWS2VWZ.js → chunk-PC44K7RF.js} +2 -2
  71. package/dist/{chunk-A2EZV2UM.js → chunk-QBYYWGAT.js} +2 -2
  72. package/dist/{chunk-QRGV2F7L.js → chunk-QHKUY4FW.js} +2 -2
  73. package/dist/chunk-QHRL4LKM.js +2 -0
  74. package/dist/{chunk-I5AWSI2G.js → chunk-QQWOFXNW.js} +2 -2
  75. package/dist/{chunk-WQTAC523.js → chunk-RBFFD4V2.js} +2 -2
  76. package/dist/{chunk-SOAT6NLA.js → chunk-RJHCPSZ7.js} +2 -2
  77. package/dist/{chunk-VGRICIQI.js → chunk-RWRLUZ6U.js} +2 -2
  78. package/dist/{chunk-4T3LTWUS.js → chunk-S2GP3CU3.js} +2 -2
  79. package/dist/{chunk-HEXVUYFQ.js → chunk-SHKZ7OVJ.js} +2 -2
  80. package/dist/{chunk-NSS46APD.js → chunk-TFUU5MQQ.js} +2 -2
  81. package/dist/{chunk-IUFDSKGG.js → chunk-TYQ76QHQ.js} +2 -2
  82. package/dist/{chunk-NRCXJDHL.js → chunk-U5CNPPTZ.js} +2 -2
  83. package/dist/{chunk-MITTUCEH.js → chunk-UQK5CRUK.js} +2 -2
  84. package/dist/{chunk-XLTP42QA.js → chunk-UUJBLG6J.js} +2 -2
  85. package/dist/chunk-UXP636P5.js +144 -0
  86. package/dist/{chunk-64RFXJT5.js → chunk-VEVBIAOJ.js} +6 -6
  87. package/dist/chunk-VKRQDBW5.js +9 -0
  88. package/dist/{chunk-C7NIYIQ4.js → chunk-VOQFGC2W.js} +4 -4
  89. package/dist/{chunk-DZ74OMG6.js → chunk-VP542C25.js} +2 -2
  90. package/dist/{chunk-Q3AFUTGB.js → chunk-WMXRRBII.js} +2 -2
  91. package/dist/{chunk-ZGZUZ7XE.js → chunk-WXAAURU7.js} +2 -2
  92. package/dist/chunk-X3NLZHPA.js +20 -0
  93. package/dist/{chunk-WER3B7MI.js → chunk-XF3KLXN3.js} +2 -2
  94. package/dist/{chunk-NH5ALKPW.js → chunk-XVJ3V7LM.js} +2 -2
  95. package/dist/{chunk-4XTA5OMB.js → chunk-YGQN3XGZ.js} +2 -2
  96. package/dist/{chunk-CFMXJPHH.js → chunk-YHXBD52M.js} +2 -2
  97. package/dist/{chunk-7B3UPBVA.js → chunk-YLVE3SXZ.js} +2 -2
  98. package/dist/{chunk-YIJ7ZAA4.js → chunk-YTUD45PU.js} +2 -2
  99. package/dist/{chunk-VTKGCT3V.js → chunk-YWB2EBNB.js} +2 -2
  100. package/dist/{chunk-UKZBVX4U.js → chunk-Z2LHPIOM.js} +2 -2
  101. package/dist/chunk-Z5QQPJ3U.js +30 -0
  102. package/dist/{chunk-NZL2DBT7.js → chunk-ZLJLE6LK.js} +2 -2
  103. package/dist/{chunk-XYADIZHU.js → chunk-ZTTISZ7J.js} +2 -2
  104. package/dist/cli.js +3 -3
  105. package/dist/command-descriptors-SJDZ7QGR.js +617 -0
  106. package/dist/{config-types-D20KuvvZ.d.ts → config-types-BWQ5xPGI.d.ts} +4 -0
  107. package/dist/{db-G_II8yXU.d.ts → db-B0r1o7Vt.d.ts} +18 -1
  108. package/dist/direct-navigation-HTKOZEOM.js +3 -0
  109. package/dist/{health-oblXYgkF.d.ts → health-CFnlCiTz.d.ts} +1 -1
  110. package/dist/index.d.ts +2 -2
  111. package/dist/index.js +1 -1
  112. package/dist/postinstall.js +1 -1
  113. package/dist/queries/affected.d.ts +2 -2
  114. package/dist/queries/affected.js +1 -1
  115. package/dist/queries/architecture.d.ts +2 -2
  116. package/dist/queries/architecture.js +1 -1
  117. package/dist/queries/bottlenecks.d.ts +2 -2
  118. package/dist/queries/bottlenecks.js +1 -1
  119. package/dist/queries/by-kind.d.ts +2 -2
  120. package/dist/queries/by-kind.js +1 -1
  121. package/dist/queries/call-graph.d.ts +2 -2
  122. package/dist/queries/call-graph.js +1 -1
  123. package/dist/queries/change-surface.d.ts +2 -2
  124. package/dist/queries/change-surface.js +1 -1
  125. package/dist/queries/cleanup-plan.d.ts +2 -2
  126. package/dist/queries/cleanup-plan.js +1 -1
  127. package/dist/queries/co-change.d.ts +2 -2
  128. package/dist/queries/co-change.js +1 -1
  129. package/dist/queries/code.d.ts +2 -2
  130. package/dist/queries/code.js +1 -1
  131. package/dist/queries/complexity-hotspots.d.ts +2 -2
  132. package/dist/queries/complexity-hotspots.js +1 -1
  133. package/dist/queries/complexity.d.ts +2 -2
  134. package/dist/queries/complexity.js +1 -1
  135. package/dist/queries/convergence.d.ts +2 -2
  136. package/dist/queries/convergence.js +1 -1
  137. package/dist/queries/coupling.d.ts +2 -2
  138. package/dist/queries/coupling.js +1 -1
  139. package/dist/queries/cycles.d.ts +2 -2
  140. package/dist/queries/cycles.js +1 -1
  141. package/dist/queries/dataflow.d.ts +2 -2
  142. package/dist/queries/dataflow.js +1 -1
  143. package/dist/queries/dead.d.ts +2 -2
  144. package/dist/queries/dead.js +1 -1
  145. package/dist/queries/decorative-checkers.d.ts +3 -3
  146. package/dist/queries/decorative-checkers.js +1 -1
  147. package/dist/queries/deep-chains.d.ts +2 -2
  148. package/dist/queries/deep-chains.js +1 -1
  149. package/dist/queries/deps.d.ts +2 -2
  150. package/dist/queries/deps.js +1 -1
  151. package/dist/queries/diff-gate.d.ts +30 -2
  152. package/dist/queries/diff-gate.js +1 -1
  153. package/dist/queries/diff-impact.d.ts +2 -2
  154. package/dist/queries/diff-impact.js +1 -1
  155. package/dist/queries/doc-drift.d.ts +2 -2
  156. package/dist/queries/doc-drift.js +1 -1
  157. package/dist/queries/drift.d.ts +2 -2
  158. package/dist/queries/drift.js +1 -1
  159. package/dist/queries/duplicate-bodies.d.ts +2 -2
  160. package/dist/queries/duplicate-bodies.js +1 -1
  161. package/dist/queries/extract-candidates.d.ts +2 -2
  162. package/dist/queries/extract-candidates.js +1 -1
  163. package/dist/queries/fan.d.ts +2 -2
  164. package/dist/queries/fan.js +1 -1
  165. package/dist/queries/files.d.ts +2 -2
  166. package/dist/queries/health.d.ts +3 -3
  167. package/dist/queries/health.js +1 -1
  168. package/dist/queries/hierarchy.d.ts +2 -2
  169. package/dist/queries/hierarchy.js +1 -1
  170. package/dist/queries/hotspots.d.ts +2 -2
  171. package/dist/queries/hotspots.js +1 -1
  172. package/dist/queries/imports.d.ts +2 -2
  173. package/dist/queries/imports.js +1 -1
  174. package/dist/queries/incomplete-migration.d.ts +2 -2
  175. package/dist/queries/incomplete-migration.js +1 -1
  176. package/dist/queries/index.d.ts +17 -3
  177. package/dist/queries/index.js +1 -1
  178. package/dist/queries/isolated.d.ts +2 -2
  179. package/dist/queries/isolated.js +1 -1
  180. package/dist/queries/locality-candidates.d.ts +2 -2
  181. package/dist/queries/locality-candidates.js +1 -1
  182. package/dist/queries/members.d.ts +2 -2
  183. package/dist/queries/members.js +1 -1
  184. package/dist/queries/methods.d.ts +2 -2
  185. package/dist/queries/methods.js +1 -1
  186. package/dist/queries/not-implemented.d.ts +3 -3
  187. package/dist/queries/not-implemented.js +1 -1
  188. package/dist/queries/outline.d.ts +2 -2
  189. package/dist/queries/outline.js +1 -1
  190. package/dist/queries/passthrough-candidates.d.ts +2 -2
  191. package/dist/queries/passthrough-candidates.js +1 -1
  192. package/dist/queries/plan-context.d.ts +2 -2
  193. package/dist/queries/plan-context.js +1 -1
  194. package/dist/queries/react-component-duplicates.d.ts +2 -2
  195. package/dist/queries/react-component-duplicates.js +1 -1
  196. package/dist/queries/react-hook-candidates.d.ts +2 -2
  197. package/dist/queries/react-hook-candidates.js +1 -1
  198. package/dist/queries/react-large-component-pressure.d.ts +2 -2
  199. package/dist/queries/react-large-component-pressure.js +1 -1
  200. package/dist/queries/recent-duplicates.d.ts +2 -2
  201. package/dist/queries/recent-duplicates.js +1 -1
  202. package/dist/queries/redundant-reexports.d.ts +2 -2
  203. package/dist/queries/redundant-reexports.js +1 -1
  204. package/dist/queries/refs.d.ts +2 -2
  205. package/dist/queries/refs.js +1 -1
  206. package/dist/queries/self-audit.d.ts +2 -2
  207. package/dist/queries/self-audit.js +1 -1
  208. package/dist/queries/similar-chains.d.ts +2 -2
  209. package/dist/queries/similar-chains.js +1 -1
  210. package/dist/queries/similar-files.d.ts +2 -2
  211. package/dist/queries/similar-files.js +1 -1
  212. package/dist/queries/similar-signatures.d.ts +2 -2
  213. package/dist/queries/similar-signatures.js +1 -1
  214. package/dist/queries/similar.d.ts +2 -2
  215. package/dist/queries/similar.js +1 -1
  216. package/dist/queries/slice.d.ts +2 -2
  217. package/dist/queries/slice.js +1 -1
  218. package/dist/queries/stale-abstractions.d.ts +2 -2
  219. package/dist/queries/stale-abstractions.js +1 -1
  220. package/dist/queries/stats.d.ts +2 -2
  221. package/dist/queries/stats.js +1 -1
  222. package/dist/queries/surface.d.ts +2 -2
  223. package/dist/queries/surface.js +1 -1
  224. package/dist/queries/symbols.d.ts +2 -2
  225. package/dist/queries/symbols.js +1 -1
  226. package/dist/queries/system.d.ts +2 -2
  227. package/dist/queries/system.js +1 -1
  228. package/dist/queries/test-quality.d.ts +2 -2
  229. package/dist/queries/test-quality.js +1 -1
  230. package/dist/queries/trace.d.ts +2 -2
  231. package/dist/queries/trace.js +1 -1
  232. package/dist/queries/twin-ab.d.ts +3 -3
  233. package/dist/queries/twin-ab.js +1 -1
  234. package/dist/queries/twin-drift.d.ts +2 -2
  235. package/dist/queries/twin-drift.js +1 -1
  236. package/dist/queries/unused-imports.d.ts +2 -2
  237. package/dist/queries/unused-imports.js +1 -1
  238. package/dist/queries/unused-params.d.ts +2 -2
  239. package/dist/queries/unused-params.js +1 -1
  240. package/dist/queries/vue-component-duplicates.d.ts +2 -2
  241. package/dist/queries/vue-component-duplicates.js +1 -1
  242. package/dist/queries/vue-composable-candidates.d.ts +2 -2
  243. package/dist/queries/vue-composable-candidates.js +1 -1
  244. package/dist/queries/vue-large-view-pressure.d.ts +2 -2
  245. package/dist/queries/vue-large-view-pressure.js +1 -1
  246. package/dist/queries/wrapper-candidates.d.ts +2 -2
  247. package/dist/queries/wrapper-candidates.js +1 -1
  248. package/dist/reindex-worker.js +23 -24
  249. package/dist/reindex.d.ts +10 -4
  250. package/dist/reindex.js +33 -38
  251. package/dist/runtime.d.ts +167 -11
  252. package/dist/runtime.js +3 -2
  253. package/dist/rust-semantic-session-server.js +1 -1
  254. package/dist/rust-semantic-session-worker.js +1 -1
  255. package/dist/rust-semantic-worker.js +1 -1
  256. package/dist/{scip-cli-kRpaexVJ.d.ts → scip-cli-DCvnlZCu.d.ts} +5 -1
  257. package/dist/watch-server.js +5 -5
  258. package/docs/AGENT_GUIDE.md +1 -1
  259. package/docs/AI_FAILURE_MODES.md +17 -17
  260. package/docs/API_EVOLUTION.md +71 -0
  261. package/docs/CLI_JSON_OUTPUT.md +83 -0
  262. package/docs/COMMAND_REFERENCE.md +5 -3
  263. package/docs/COMMITTED_RECORD_COMPATIBILITY.md +117 -0
  264. package/docs/CONFIGURATION_WRITE_SAFETY.md +130 -0
  265. package/docs/DETECTOR_GUIDE.md +46 -46
  266. package/docs/DURABILITY.md +103 -0
  267. package/docs/INDEX_GENERATIONS.md +121 -0
  268. package/docs/LOCK_PROTOCOL.md +133 -0
  269. package/docs/MAILBOX_LIFECYCLE.md +197 -0
  270. package/docs/REINDEX_METADATA_COMPATIBILITY.md +84 -0
  271. package/docs/RUST_DURABLE_SESSION_PROTOCOL.md +126 -0
  272. package/docs/TELEMETRY_RETENTION.md +72 -0
  273. package/docs/TIME_SEMANTICS.md +77 -0
  274. package/docs/WATCH_REFRESH_REQUESTS.md +110 -0
  275. package/docs/WINDOWS_SIDECAR_RELEASE.md +298 -0
  276. package/docs/analyzer-validation-ledger.md +24 -23
  277. package/docs/schemas/cli-json-envelope.schema.json +53 -0
  278. package/docs/schemas/npm-release-state.schema.json +146 -0
  279. package/docs/schemas/outcome-event-record.schema.json +39 -0
  280. package/docs/schemas/project-config.schema.json +247 -0
  281. package/docs/schemas/suppression-record.schema.json +31 -0
  282. package/docs/schemas/windows-sidecar-provenance.schema.json +137 -0
  283. package/package.json +15 -5
  284. package/scripts/build-scip-windows.mjs +180 -61
  285. package/scripts/scip-windows-provenance.mjs +364 -0
  286. package/scripts/verify-scip-windows.mjs +29 -0
  287. package/skills/_shared/SKILL.md +88 -229
  288. package/skills/_shared/agents/openai.yaml +1 -1
  289. package/skills/_shared/references/agent-contract-catalog.md +105 -0
  290. package/skills/_shared/references/command-catalog.md +118 -0
  291. package/skills/_shared/references/detector-precision-and-diffgate.md +59 -0
  292. package/skills/_shared/references/evidence-and-dead-code.md +25 -0
  293. package/skills/scip-audit/SKILL.md +76 -0
  294. package/skills/scip-audit/agents/openai.yaml +4 -0
  295. package/skills/scip-audit/references/claims.md +98 -0
  296. package/skills/scip-audit/references/cleanup.md +101 -0
  297. package/skills/scip-audit/references/directory.md +222 -0
  298. package/skills/scip-audit/references/frontend.md +130 -0
  299. package/skills/scip-audit/references/integrity.md +154 -0
  300. package/skills/scip-audit/references/maintainability.md +162 -0
  301. package/skills/scip-audit/references/twin-drift.md +104 -0
  302. package/skills/scip-diagnose/SKILL.md +52 -0
  303. package/skills/scip-diagnose/agents/openai.yaml +4 -0
  304. package/skills/scip-diagnose/references/debug.md +117 -0
  305. package/skills/{scip-probe-reachability/SKILL.md → scip-diagnose/references/probe-reachability.md} +11 -27
  306. package/skills/scip-diagnose/references/root-cause.md +145 -0
  307. package/skills/scip-diagnose/references/triage.md +119 -0
  308. package/skills/scip-explore/SKILL.md +54 -85
  309. package/skills/scip-explore/agents/openai.yaml +2 -2
  310. package/skills/scip-explore/references/diagrams.md +40 -0
  311. package/skills/scip-explore/references/language-playbook.md +49 -0
  312. package/skills/scip-improve/SKILL.md +56 -0
  313. package/skills/scip-improve/agents/openai.yaml +4 -0
  314. package/skills/scip-improve/references/cleanup-batches.md +53 -0
  315. package/skills/scip-improve/references/directory-moves.md +53 -0
  316. package/skills/scip-improve/references/doc-reconcile.md +30 -0
  317. package/skills/scip-improve/references/frontend-extraction.md +39 -0
  318. package/skills/scip-improve/references/maintainability-mechanism.md +43 -0
  319. package/skills/scip-improve/references/twin-drift.md +35 -0
  320. package/skills/scip-plan/SKILL.md +68 -0
  321. package/skills/scip-plan/agents/openai.yaml +4 -0
  322. package/skills/scip-plan/references/api-impact.md +19 -0
  323. package/skills/scip-plan/references/conductor.md +41 -0
  324. package/skills/scip-plan/references/high-assurance.md +43 -0
  325. package/skills/scip-plan/references/hyper-optimization.md +50 -0
  326. package/skills/scip-plan/references/tla-model.md +88 -0
  327. package/skills/scip-query/SKILL.md +53 -98
  328. package/skills/scip-query/agents/openai.yaml +2 -2
  329. package/skills/scip-setup/SKILL.md +69 -181
  330. package/skills/scip-setup/agents/openai.yaml +3 -3
  331. package/skills/scip-setup/references/bootstrap-workflow.md +120 -0
  332. package/skills/scip-setup/references/language-verification.md +61 -0
  333. package/skills/scip-setup/references/lifecycle-commands.md +119 -0
  334. package/skills/scip-setup/references/per-repo-triage.md +24 -0
  335. package/skills/scip-verify/SKILL.md +121 -84
  336. package/skills/scip-verify/agents/openai.yaml +2 -2
  337. package/skills/scip-verify/references/calibrate-detectors.md +170 -0
  338. package/dist/chunk-2CTX5CMX.js +0 -4
  339. package/dist/chunk-2Y373BDD.js +0 -2
  340. package/dist/chunk-7UY7SD7D.js +0 -927
  341. package/dist/chunk-C2QSK7E7.js +0 -2
  342. package/dist/chunk-D4U5Q3FT.js +0 -7
  343. package/dist/chunk-K2ERX4UT.js +0 -3
  344. package/dist/chunk-KHE7J5ZN.js +0 -3
  345. package/dist/chunk-L7SPDE73.js +0 -84
  346. package/dist/chunk-LHMNRHGV.js +0 -3
  347. package/dist/chunk-LM72NQ7T.js +0 -3
  348. package/dist/chunk-MSWVMDAH.js +0 -122
  349. package/dist/chunk-NH7WNNQC.js +0 -20
  350. package/dist/chunk-OMPZHGHO.js +0 -2
  351. package/dist/chunk-TW4OG5FC.js +0 -4
  352. package/dist/chunk-U7DSEKOM.js +0 -30
  353. package/dist/chunk-V27BEQJN.js +0 -7
  354. package/dist/chunk-XAGAZSFE.js +0 -6
  355. package/dist/chunk-XBN5VO53.js +0 -2
  356. package/dist/command-descriptors-N2TL4XM2.js +0 -613
  357. package/dist/direct-navigation-DUCZCTOE.js +0 -3
  358. package/skills/scip-api-impact/SKILL.md +0 -140
  359. package/skills/scip-api-impact/agents/openai.yaml +0 -4
  360. package/skills/scip-calibrate/SKILL.md +0 -131
  361. package/skills/scip-calibrate/agents/openai.yaml +0 -4
  362. package/skills/scip-claim-audit/SKILL.md +0 -107
  363. package/skills/scip-claim-audit/agents/openai.yaml +0 -4
  364. package/skills/scip-cleanup-audit/SKILL.md +0 -130
  365. package/skills/scip-cleanup-audit/agents/openai.yaml +0 -4
  366. package/skills/scip-cleanup-improve/SKILL.md +0 -85
  367. package/skills/scip-cleanup-improve/agents/openai.yaml +0 -4
  368. package/skills/scip-concrete-plan/HIGH_ASSURANCE.md +0 -317
  369. package/skills/scip-concrete-plan/SKILL.md +0 -105
  370. package/skills/scip-concrete-plan/agents/openai.yaml +0 -4
  371. package/skills/scip-conductor/SKILL.md +0 -133
  372. package/skills/scip-conductor/agents/openai.yaml +0 -4
  373. package/skills/scip-debug/SKILL.md +0 -130
  374. package/skills/scip-debug/agents/openai.yaml +0 -4
  375. package/skills/scip-diagram/SKILL.md +0 -110
  376. package/skills/scip-diagram/agents/openai.yaml +0 -4
  377. package/skills/scip-directory-architecture/SKILL.md +0 -266
  378. package/skills/scip-directory-architecture/agents/openai.yaml +0 -4
  379. package/skills/scip-doc-reconcile/SKILL.md +0 -89
  380. package/skills/scip-doc-reconcile/agents/openai.yaml +0 -4
  381. package/skills/scip-hyper-optimization/SKILL.md +0 -156
  382. package/skills/scip-hyper-optimization/agents/openai.yaml +0 -4
  383. package/skills/scip-integrity-audit/SKILL.md +0 -152
  384. package/skills/scip-integrity-audit/agents/openai.yaml +0 -4
  385. package/skills/scip-language-playbook/SKILL.md +0 -106
  386. package/skills/scip-language-playbook/agents/openai.yaml +0 -4
  387. package/skills/scip-maintainability/SKILL.md +0 -158
  388. package/skills/scip-maintainability/agents/openai.yaml +0 -4
  389. package/skills/scip-probe-reachability/agents/openai.yaml +0 -4
  390. package/skills/scip-react-maintainability/SKILL.md +0 -101
  391. package/skills/scip-react-maintainability/agents/openai.yaml +0 -4
  392. package/skills/scip-root-cause/SKILL.md +0 -151
  393. package/skills/scip-root-cause/agents/openai.yaml +0 -4
  394. package/skills/scip-tla-model-system/SKILL.md +0 -148
  395. package/skills/scip-tla-model-system/agents/openai.yaml +0 -4
  396. package/skills/scip-triage-issue/SKILL.md +0 -133
  397. package/skills/scip-triage-issue/agents/openai.yaml +0 -4
  398. package/skills/scip-twin-drift/SKILL.md +0 -109
  399. package/skills/scip-twin-drift/agents/openai.yaml +0 -4
  400. package/skills/scip-vue-maintainability/SKILL.md +0 -107
  401. package/skills/scip-vue-maintainability/agents/openai.yaml +0 -4
@@ -0,0 +1,59 @@
1
+ # Detector precision, diff-gate, and the event ledger
2
+
3
+ ## Weight findings by measured precision, not volume
4
+
5
+ Detector precision was calibrated against two external production repos on 2026-07-01 (`docs/validation/2026-07-01-external-calibration-*.md`). Use that calibration to decide how much a finding is worth acting on alone versus needing corroboration.
6
+
7
+ **Strong signal — act on directly:**
8
+ - `complexity-hotspots` (~90% precision)
9
+ - `recent-duplicates` (~75% precision)
10
+ - Graph facts from `refs`, `trace`, `deps`
11
+ - Compiler-verified `cleanup-plan --verify` output
12
+
13
+ **Good with review — read the cited code before acting:**
14
+ - `duplicate-bodies`, `similar`, `co-change`, `doc-drift`, `twin-drift` (post-retune defaults)
15
+
16
+ **Exploration only — near-zero precision on codebases with intentional layering or ambient types:**
17
+ - `wrapper-candidates`, `stale-abstractions`, `drift --patterns`
18
+
19
+ Never file a finding from an exploration-only detector without reading the cited code first. `convergence <s1> <s2>` and `capability-matrix` are deprecated aliases (`similar <s1> <s2> --plan` and `capabilities --matrix` respectively) — prefer the modern form.
20
+
21
+ ## diff-gate
22
+
23
+ `diff-gate` gates the current diff for architecture regressions plus echo, migration, coordination, doc-drift, unused-param, and new-dead candidates, and exits 1 on blocking findings. It recognizes ten checks, any of which can be skipped individually with `--skip <check>`:
24
+
25
+ | Check | Flags |
26
+ |---|---|
27
+ | `echo` | recent-duplicate-style echoes in the diff |
28
+ | `incomplete-migration` | partially-completed extractions left in the diff |
29
+ | `co-change-partner` | a missing historically-paired file |
30
+ | `twin-partner` | an unedited same-name twin — **advisory**, never blocks |
31
+ | `coverage-contract` | a configured `coverageContracts` enumeration drifted from ground truth (see `scip-setup`) |
32
+ | `architecture` | a declared boundary violation absent from the shared baseline |
33
+ | `doc-reference` | an uncited or stale doc claim |
34
+ | `unused-params` | trailing parameters no body uses |
35
+ | `new-dead` | dead code introduced by this diff |
36
+ | `baseline` | only active with `--baseline`; compares all non-architecture health identities against `.scipquery-baseline.json` — distinct from `health --baseline` |
37
+
38
+ The `architecture` check runs by default only when enforceable architecture rules and a baseline exist, and it reads that baseline file directly without running the full health suite.
39
+
40
+ **Reading grouped output:** findings print grouped under a `Root-cause groups (N):` header before the flat list. A root-cause group's remediation usually clears every finding under it. The same remediation may repeat afterward in the flat list below the groups — that repetition is expected, not a separate issue.
41
+
42
+ **actionTier** on baseline-backed findings tells you how directly to act:
43
+ - `direct` — act on this finding alone.
44
+ - `signal` — corroborating evidence; read before acting.
45
+ - `support` — context only.
46
+
47
+ Findings marked `(advisory)` never block; treat them as context, not obligations. Fix every finding, or record a specific acceptance reason for each one left unresolved — never report success while a finding is unexplained.
48
+
49
+ ## Event ledger
50
+
51
+ Every completed diff-gate run — including JSON and hook mode — writes each caught/resolved/suppressed transition to its own committed `.scipquery/events/*.json` file. Independent branches should add independent event files rather than editing a shared log, and commit them with the corresponding change. Legacy `.scipquery/ledger/events.jsonl` records remain readable and migrate automatically on the next gate write.
52
+
53
+ ## Effectiveness
54
+
55
+ `scip-query effectiveness [--since 30d] [--check <check>] [--json]` reports, per check: findings caught, comparison-verified fixed, suppressed, still open, "moved" (rename noise), legacy/non-comparable "unverified" resolutions, precision (verified-fixed ÷ (verified-fixed + suppressed)), and median days-to-fix.
56
+
57
+ A pre-commit rerun of diff-gate reuses the same comparison base directly. After HEAD advances, a clean diff-gate run automatically replays the stored comparison commit. A dirty or unavailable replay leaves the effectiveness finding pending instead of manufacturing a fix result. Standalone detector commands (outside diff-gate) are not outcome-tracked in this ledger until they expose complete-scan evidence.
58
+
59
+ When `diff-gate --hook` reports that a check is rarely acted on in this repo: tune that check's config, suppress the standing findings with reasons, or consciously accept the noise. Do not let unresolved findings accumulate as wallpaper.
@@ -0,0 +1,25 @@
1
+ # Subagent evidence boundary and dead-code resolution status
2
+
3
+ ## Subagent evidence boundary
4
+
5
+ When a subagent is used to gather scip-query evidence, its prompt must include these rules verbatim:
6
+ - Use scip-query for compiler-resolved identity and completeness claims.
7
+ - Native search/file reads are valid for literal source content and local logic, including an unambiguous helper visible in the same file.
8
+ - Cite the evidence source appropriate to each claim.
9
+ - State explicitly when neither source establishes a claim completely.
10
+
11
+ The trigger for requiring scip-query evidence is **resolution or completeness, not whether execution crosses a call boundary.** Asserting what `handler(x)` does without resolving what `handler` is constitutes a resolution claim and requires scip-query evidence. Reading a helper defined two lines down in the same file is not a resolution claim and does not require it.
12
+
13
+ Reject a subagent's finding if it sources a resolution or completeness claim from text search alone. Do not reject a literal-content claim merely for citing a file read as its evidence.
14
+
15
+ ## Dead-code reference-counting status (as of the 2026-07-02 remediation, `docs/plans/2026-07-02-followups.md` items 1-3)
16
+
17
+ The shared reference-counting layer used by `dead`, `isolated`, `new-dead`, and `stale-abstractions` correctly resolves as consumers:
18
+ - import type-only consumers, including tsconfig paths-aliased specifiers;
19
+ - pnpm/npm/yarn workspace cross-package consumers, including unbuilt `dist/` exports-map consumers.
20
+
21
+ Vue `<script setup>` composable consumers were already correctly resolved before this remediation — verified live, no code change needed.
22
+
23
+ **One residual gap remains:** a symbol with an ambiguous leaf name (a same-named definition exists elsewhere in the project) reached only through a re-exporting barrel file in a workspace package can still be misattributed as dead. For that case, `new-dead` labels the finding `unconfirmed (cross-package ambiguous-name resolution gap)` with evidence `heuristic` and lowered confidence, instead of asserting dead — treat it as "verify manually," not fact.
24
+
25
+ Outside that one residual gap, dead-code findings in this class are normal graph-fact dead claims: confirm with `refs` when in doubt, same as any other finding.
@@ -0,0 +1,76 @@
1
+ ---
2
+ name: scip-audit
3
+ description: Use to find and confirm problems WITHOUT editing: is this implementation real (decorative checkers, not-implemented, lying metrics), is a status word derived or merely asserted, are cleanup findings worth acting on, has a same-name twin silently drifted, have the living docs (AGENTS.md, standards, command docs) drifted from the code, and are there hidden policies, scattered concepts, accidental variation or weak boundaries — including React/Vue component and directory-locality pressure. Proactive: needs no reported symptom. Hand confirmed findings to scip-improve. Distinct from `complexity-cleanup` and `principal-maintainability-review`: those reason about a specific symbol's complexity or a reviewer's judgement; this one runs detectors across the repo and ranks confirmed findings by evidence.
4
+ commands:
5
+ - template: "scip-query health --json"
6
+ when: "Orient to the repository-wide finding inventory before confirming candidates."
7
+ - template: "scip-query decorative-checkers --json --full"
8
+ when: "Audit whether validation-shaped code has a reachable failure exit."
9
+ - template: "scip-query doc-drift --json --full"
10
+ when: "Find current-guidance documents whose cited or coupled code moved."
11
+ ---
12
+
13
+ # scip-audit
14
+
15
+ Read-only evidence audits. Every audit here classifies something —
16
+ real-vs-decorative, derived-vs-asserted, confirmed-vs-noise, drifted-vs-stable
17
+ — and ends in a ranked, evidenced verdict. None of them edit code or docs.
18
+ When a finding needs a fix, hand it to `scip-improve`; do not apply it here.
19
+
20
+ Load shared mechanics (evidence freshness, lookup, the full command
21
+
22
+ <!-- BEGIN GENERATED SKILL COMMANDS -->
23
+ ## Commands for this skill
24
+
25
+ | Command | Purpose | Returns | Coverage | When |
26
+ | --- | --- | --- | --- | --- |
27
+ | `scip-query health --json` | Composite codebase health report with prioritized action list | health score, findings, priorities, baselines, and coverage notes | `bounded` | Orient to the repository-wide finding inventory before confirming candidates. |
28
+ | `scip-query decorative-checkers --json --full` | Decorative checker candidates: validate*/verify*/check*/assert*/is*/has* callables with no reachable failure exit anywhere in their body | checker identities, call sites, and decorative behavior evidence | `bounded` | Audit whether validation-shaped code has a reachable failure exit. |
29
+ | `scip-query doc-drift --json --full` | Stale-doc candidates: code the doc references or co-changed with kept changing after the doc stopped | document paths, coupled code subjects, and history evidence | `bounded` | Find current-guidance documents whose cited or coupled code moved. |
30
+
31
+ Use this shortlist first. Open [`../_shared/SKILL.md`](../_shared/SKILL.md) only when it is insufficient.
32
+ <!-- END GENERATED SKILL COMMANDS -->
33
+ catalogue) from `../_shared/SKILL.md` — each reference file below carries its
34
+ own shortlist first and only defers to `_shared` when that shortlist runs
35
+ out. Before trusting any graph fact, confirm the index is fresh with
36
+ `scip-query status --capabilities` (reindex if `stale`/`missing`/`unknown`).
37
+
38
+ ## Triage
39
+
40
+ | Situation | Open | Core commands |
41
+ |---|---|---|
42
+ | A checker/verifier/metric/feature might be decorative, half-built, or a fallback might be masking a dead primary path | [`references/integrity.md`](references/integrity.md) | `decorative-checkers`, `not-implemented`, `twin-ab`, `test-quality`, `refs`, `code`, `call-graph` |
43
+ | A status word ("available", "verified", "safe", "PASS", "complete") needs classifying as derived, hedged, or asserted | [`references/claims.md`](references/claims.md) | `files`, `refs`, `code`, `trace`, `capabilities` |
44
+ | Turning a health report, de-bloat report, AI-residue sweep, or raw detector output into a confirmed cleanup queue | [`references/cleanup.md`](references/cleanup.md) | `health`, `cleanup-plan`, `duplicate-bodies`, `recent-duplicates`, `incomplete-migration`, `doc-drift`, `unused-params`, `passthrough-candidates`, `dead`, `isolated`, `cycles`, `co-change` |
45
+ | Same-name or near-name functions across files whose bodies have silently diverged | [`references/twin-drift.md`](references/twin-drift.md) | `twin-drift`, `duplicate-bodies`, `code`, `refs`, `diff-gate` |
46
+ | Hidden policy, scattered concepts, accidental variation, weak boundaries — general structural/maintainability pressure | [`references/maintainability.md`](references/maintainability.md) | `stats`, `system`, `surface`, `change-surface`, `affected`, `drift`, `health`, `similar*`, `extract-candidates`, `wrapper-candidates`, `stale-abstractions`, `cycles` |
47
+ | React or Vue component/hook/composable duplication, or large-component/view pressure | [`references/frontend.md`](references/frontend.md) | `react-component-duplicates`, `react-hook-candidates`, `react-large-component-pressure`, `vue-component-duplicates`, `vue-composable-candidates`, `vue-large-view-pressure`, `augment-vue`, `recent-duplicates`, `similar`, `health` |
48
+ | Folder structure, ownership boundaries, locality config, a messy or AI-generated layout, safe move slices | [`references/directory.md`](references/directory.md) | `system`, `locality-candidates`, `similar-files`, `cycles`, `architecture`, `drift`, `co-change`, `config-validate`, `diff-gate`, `health` |
49
+
50
+ Rows are not exclusive. A "does this actually work" investigation that turns
51
+ up structural mess routes that mess to `references/maintainability.md`
52
+ instead of forcing it into the integrity verdict — real-but-messy is a
53
+ different failure mode than fake-but-green. A twin-drift finding that
54
+ surfaces on your own diff (via `diff-gate`) is a live instance of that defect
55
+ class, not just a gate finding — open `references/twin-drift.md`.
56
+
57
+ ## Cross-cutting rules
58
+
59
+ - **Classify, don't just list.** Every audit in this skill assigns each item
60
+ in scope to exactly one label from its taxonomy (real/decorative,
61
+ derived/hedged/asserted, confirmed/intentional/false-positive/blocked,
62
+ intentional-variation/drifted-policy/one-sided-fix, mature/emerging/
63
+ accidental). A count that doesn't sum to the scope size is an unfinished
64
+ audit.
65
+ - **Ground every claim in evidence**, not opinion or a variable's name — a
66
+ variable called `verified` that nothing ever checked is still asserted.
67
+ Name concrete files/symbols before naming a smell.
68
+ - **Preserve essential variation.** Difference that reflects real behavior,
69
+ domain facts, runtime constraints, or external contracts is not a defect;
70
+ consolidating it away is a false abstraction. Any merge/consolidate
71
+ recommendation must carry the single trait that makes the cited sites one
72
+ concept — if that trait can't be stated, they aren't one concept.
73
+ - **A clean run is itself a claim.** A suspect scope that produces zero
74
+ findings needs a stated reason the suspicion was wrong, not silence.
75
+ - **This skill never edits.** Findings, evidence, and a fix direction are the
76
+ deliverable; route action to `scip-improve`.
@@ -0,0 +1,4 @@
1
+ interface:
2
+ display_name: "SCIP Audit"
3
+ short_description: "Find and confirm real problems without editing"
4
+ default_prompt: "Use $scip-audit to proactively find and confirm real problems in this codebase without changing any code."
@@ -0,0 +1,98 @@
1
+ # Claims: derived, hedged, or asserted?
2
+
3
+ Classify whether an "available", "verified", "safe", "PASS", or "complete"
4
+ status word is derived from a real check, hedged as a candidate, or merely
5
+ asserted without being probed.
6
+
7
+ Command shortlist: `files <pattern>` (inventory), `refs <symbol>` /
8
+ `code <symbol>` / `trace <symbol>` (classify), `capabilities --matrix --json`
9
+ (spot-check against a known-good derived surface).
10
+
11
+ ## Taxonomy
12
+
13
+ - **Derived** — the producer computes the value from a real probe, scan, or
14
+ computation (a compiler run, a runtime capability probe, a graph
15
+ traversal).
16
+ - **Hedged** — the code or its label already says it is a candidate,
17
+ heuristic, or unverified. Hedged is not a finding — the label already
18
+ discloses the uncertainty.
19
+ - **Asserted** — the value is a constant, a hardcoded table entry, or a
20
+ string literal presented with the same confidence as a derived value but
21
+ backed by nothing the code actually checked at that call site.
22
+
23
+ Asserted status words that are agent-facing and trust-bearing — an agent
24
+ would route a decision ("use this evidence", "skip this check", "delete
25
+ this") based on the word — are the highest-severity class this audit exists
26
+ to find.
27
+
28
+ Ground every claim in the producing function's source, not its label or
29
+ variable name alone: a variable named `verified` that is never checked
30
+ against a real result is still asserted. Every status word in scope gets
31
+ exactly one of the three labels.
32
+
33
+ ## Severity rubric
34
+
35
+ Asserted + agent-facing + trust-bearing = high. Asserted + internal-only or
36
+ low-consequence = low. Hedged is not a finding.
37
+
38
+ A status that used to be asserted and now calls a real probe is fixed — say
39
+ so and move on, do not re-report it.
40
+
41
+ ## Step 1 — Inventory
42
+
43
+ Grep the target scope (a file, module, or command family) for user-visible
44
+ or JSON-facing status words (`available`, `unavailable`, `partial`,
45
+ `verified`, `safe`, `PASS`, `FAIL`, `complete`, `derived`, `asserted`),
46
+ noting the file:line and the renderer or JSON field surfacing each hit. Use
47
+ `scip-query files <target-file-or-pattern>` to locate the renderer or
48
+ status-producing module for a claim.
49
+
50
+ **Complete when:** every status-bearing string or field in scope is listed
51
+ with its surface (human output, `--json` field, or both).
52
+
53
+ ## Step 2 — Classify
54
+
55
+ For each status word's producing function, run `refs`, `code`, and `trace`,
56
+ read the function body, and classify it as derived (computed from a probe,
57
+ scan, spawn result, file check, or graph query performed at or near that
58
+ call site), hedged, or asserted.
59
+
60
+ **Complete when:** every producer has one of the three labels with the one
61
+ line of source evidence that justifies it.
62
+
63
+ Use `scip-query capabilities --matrix --json` as a spot-check: an
64
+ already-known example of a fixed derived-status surface, useful for
65
+ calibrating what "derived" looks like in this codebase before judging
66
+ ambiguous cases.
67
+
68
+ ## Step 3 — File and fix
69
+
70
+ File findings as a table, not prose. Finding format:
71
+
72
+ - **Claim** — the status word and where it appears.
73
+ - **Producer** — file:line, function name.
74
+ - **Classification** — asserted.
75
+ - **Severity** — high or low (per the rubric above).
76
+ - **Fix** — probe it (name the real check to add), generate it (derive from
77
+ a registry/config that is itself kept honest), or soften the language
78
+ (hedge the label to match what is actually known).
79
+
80
+ **Complete when:** every asserted status in scope has a filed finding with a
81
+ fix direction, and every derived/hedged status is confirmed correct (not
82
+ silently asserted behind a computed-looking name).
83
+
84
+ ## Report
85
+
86
+ Write the audit report under `docs/scip-query/` unless the user asked only
87
+ for a conversational answer. Template:
88
+
89
+ - Scope
90
+ - Status words inventoried: N
91
+ - Classified: `<d>` derived / `<h>` hedged / `<a>` asserted — must sum to N;
92
+ a gap is an unfinished audit
93
+ - Claim table: Claim, Producer, Classification, Fix
94
+ - "Fixed since last audit" — claims now derived that were previously
95
+ reported asserted
96
+
97
+ The audit is complete only when every status word in scope is classified and
98
+ every asserted, trust-bearing claim has a filed finding.
@@ -0,0 +1,101 @@
1
+ # Cleanup: raw signal to confirmed queue
2
+
3
+ Turn raw scip-query cleanup signals into a confirmed cleanup queue. Use for
4
+ health reports, de-bloat reports, recent AI-residue audits, score-framed
5
+ cleanup queues, confirming raw findings, or preparing a cleanup plan.
6
+
7
+ This audit never edits application code — it only audits and classifies
8
+ signals; applying fixes is `scip-improve`'s job.
9
+
10
+ Three common modes, same underlying workflow:
11
+
12
+ - **Whole-repo audit** — rank all cleanup signals across the codebase.
13
+ - **Recent-AI-residue** — focus specifically on echoes, twins, incomplete
14
+ migrations, speculative params, stale agent-facing docs, and hidden
15
+ couplings.
16
+ - **Score-framed** — explain the health score's deductions and identify the
17
+ safest first cleanup batch.
18
+
19
+ ## Step 1 — Establish evidence
20
+
21
+ Before any sweeping begins, run `scip-query doctor`, `scip-query status
22
+ --capabilities`, `scip-query health --json`, `scip-query capabilities
23
+ --json`, and `scip-query config-validate --json`.
24
+
25
+ **Complete when:** unavailable capabilities are explicitly recorded as
26
+ unavailable, not silently skipped.
27
+
28
+ ## Step 2 — Sweep signals
29
+
30
+ Run every relevant detector class or explicitly record why it is
31
+ unavailable — never silently omit a class.
32
+
33
+ Core sweep set:
34
+
35
+ ```
36
+ scip-query cleanup-plan --verify --json # compiler-verified batched deletion plan
37
+ scip-query duplicate-bodies --json --full # exact duplicate small-body candidates
38
+ scip-query recent-duplicates --json --full # recent code re-implementing established code
39
+ scip-query incomplete-migration --json --full # partially-completed extractions
40
+ scip-query unused-params --json --full
41
+ scip-query passthrough-candidates --json --full
42
+ scip-query dead --json --full
43
+ scip-query isolated --json --full
44
+ scip-query cycles
45
+ scip-query co-change --json --full # hidden file-level coupling from git history
46
+ scip-query doc-drift --json --full # docs whose referenced/co-changed code kept moving
47
+ ```
48
+
49
+ `scip-query health --json` establishes the composite score and prioritized
50
+ action list; `scip-query cleanup-plan --verify --json` combines graph-fact
51
+ dead code with the cascade candidates it unlocks. `scip-query doc-drift
52
+ --json --full` finds stale-doc candidates: code a doc references, or
53
+ co-changed with, that kept changing after the doc stopped — run it whenever
54
+ the audit is about living-doc drift, not just code cleanup.
55
+
56
+ For frontend repos, add the React/Vue duplicate, hook/composable, and
57
+ large-component/view detector commands (see `references/frontend.md`) to the
58
+ sweep.
59
+
60
+ **Optional deep dives**, run only after the main sweep is exhausted:
61
+ `scip-query stale-abstractions --json --full` and `scip-query
62
+ wrapper-candidates --json --full` have near-zero precision on codebases with
63
+ intentional layering or ambient types — treat every hit as a lead to
64
+ confirm, never a finding on its own.
65
+
66
+ ## Step 3 — Confirm each candidate
67
+
68
+ Classify every cleanup candidate as exactly one of: **confirmed fix
69
+ target**, **intentional design**, **false positive**, or **blocked**.
70
+
71
+ To confirm a high-priority candidate, inspect source and graph evidence with
72
+ `scip-query code`, `scip-query refs`, `scip-query fan-in`, `scip-query
73
+ fan-out`, `scip-query affected --json`, `scip-query change-surface --json
74
+ --full`, `scip-query similar --plan`, and `scip-query co-change --json
75
+ --full`.
76
+
77
+ Because a deletion is this audit's scrutiny-ending verdict, a candidate
78
+ classified "confirmed fix target" that deletes code must survive refutation
79
+ checks before being finalized:
80
+
81
+ 1. Run `rg` for the symbol name as a plain string to catch dynamic dispatch,
82
+ config keys, serialized references, and CLI/doc text that graph-based
83
+ detectors cannot see.
84
+ 2. Check for the cross-package barrel re-export gap — the one blind spot
85
+ `dead` self-labels as "unconfirmed."
86
+
87
+ Record `refutation: survived — <checks run>` on a confirmed-deletion entry
88
+ once the blind-spot checks pass, or reclassify the entry if they don't;
89
+ either way the note must be recorded.
90
+
91
+ ## Report
92
+
93
+ Final report must include: health score, classification counts
94
+ (confirmed/intentional/false positive/blocked — must cover every collected
95
+ signal, none left uncounted), confirmed items with evidence and first safe
96
+ action, unconfirmed signals with evidence still needed, unavailable/blocked
97
+ checks with reasons, and a recommended first cleanup batch with why it's
98
+ safe now.
99
+
100
+ A run is complete only when each collected signal is classified and the
101
+ next action is visible.
@@ -0,0 +1,222 @@
1
+ # Directory architecture: boundaries, locality, and safe moves
2
+
3
+ Evaluate, design, reorganize, or migrate folder structure, ownership
4
+ boundaries, locality config, messy repos, AI-generated layout, or safe
5
+ file-move slices.
6
+
7
+ Command shortlist: `system <scope>`, `locality-candidates --json --full`,
8
+ `similar-files --full --json`, `cycles`, `architecture --json`, `drift
9
+ --architecture`, `co-change --json --full`, `health --write-baseline`,
10
+ `diff-gate`, `config-validate --json`.
11
+
12
+ ## Definitions
13
+
14
+ - **Ownership boundary** — a folder, package, module, or convention that
15
+ groups code around one stable responsibility.
16
+ - **Dependency edge** — points from code that relies on something to the
17
+ code it relies on; for imports, A → B means A imports B.
18
+ - **Forbidden edge** — an actual cross-boundary dependency rejected by an
19
+ explicit project rule. Directory distance or an unusual import alone does
20
+ not make an edge forbidden.
21
+ - **Layer** — a responsibility ordered by dependency direction, such as
22
+ presentation depending on application.
23
+ - **Subsystem** — a responsibility that owns an end-to-end capability, such
24
+ as authentication or rendering.
25
+ - **Package** — a publication or build unit. **Service** — an independently
26
+ running unit. Do not force the layer, subsystem, package, and service
27
+ concepts all into one single layer hierarchy.
28
+ - **Reciprocal dependency** — dependency traffic in both directions between
29
+ two boundaries; it is a review signal because the boundaries exert mutual
30
+ change pressure, not proof that either import is wrong.
31
+ - **Architecture ratchet** — an enforcement rule that records existing
32
+ violations while preventing new ones, allowing a large codebase to improve
33
+ without a speculative rewrite.
34
+ - **Target structure** — a proposed future layout that expresses an
35
+ ownership model, not merely a prettier tree.
36
+ - **Migration slice** — the smallest set of file moves and import updates
37
+ that can be verified independently.
38
+ - **Slop codebase** — one whose files are arranged by accident, convenience,
39
+ or recent edits rather than stable ownership rules.
40
+
41
+ ## Operating principles
42
+
43
+ Start with evidence, not taste. Separate review from migration — do not move
44
+ files unless asked. Preserve broad boundaries when evidence shows they are
45
+ intentional; do not reward a generic "shared" boundary/directory unless the
46
+ shared concept has a name, owner, and cross-boundary consumers. For messy
47
+ repos, produce a discovery map and decisions instead of pretending the
48
+ target structure is obvious. Prefer small verified moves over large
49
+ speculative reorganizations. Configure descriptive boundaries before closing
50
+ (declaring) dependency rules. Treat graph shape (dependency structure) as
51
+ evidence about responsibilities, never as a substitute for identifying them.
52
+
53
+ ## Step 1 — Bound the question
54
+
55
+ Classify the request as review, target structure, locality config,
56
+ migration plan, or implementation.
57
+
58
+ **Complete when:** scope and deliverable are explicit.
59
+
60
+ ## Step 2 — Inventory evidence
61
+
62
+ Run `stats`, `system <scope>`, `files <pattern>`, `surface <scope>`, `deps
63
+ <file>`, `rdeps <file>`, `change-surface <file>`, `plan-context
64
+ <file-or-symbol>`, `locality-candidates --json --full`, `cycles`,
65
+ `architecture --json`, `drift --architecture`, `co-change`, `similar-files
66
+ --min-similarity 0.6 --min-deps 3`, `similar-chains --min-similarity 0.5`,
67
+ `recent-duplicates`, and `drift`.
68
+
69
+ - `system <scope>` returns module file paths, exported symbols with line
70
+ ranges, internal dependencies, and reverse dependencies.
71
+ - `locality-candidates --json --full` returns directory-locality and
72
+ ancestry candidates from consumer ownership — symbols, current homes,
73
+ consumer locality, and suggested homes.
74
+ - `similar-files --full --json` returns file pairs with similarity scores
75
+ and shared symbols (overlapping dependency profiles).
76
+ - `cycles` detects circular dependency chains between files.
77
+ - `architecture --json` measures configured boundaries, actual dependency
78
+ traffic, forbidden edges, reciprocal pairs, and boundary cycles.
79
+ - `drift --architecture` reviews direct drift findings together with
80
+ boundary coverage and architecture signals.
81
+ - `co-change --json --full` inventories hidden file-level coupling from git
82
+ history — files that change together without a dependency edge.
83
+
84
+ Also read durable project guidance that names architecture, modules,
85
+ ownership, routes, workflows, contracts, or domains.
86
+
87
+ **Complete when:** each folder under review has evidence for exports, entry
88
+ points, consumers, tests, co-change partners, and claimed ownership rules.
89
+
90
+ ## Step 3 — Classify boundary maturity
91
+
92
+ Classify each boundary candidate as:
93
+
94
+ - **Mature** — repeated, documented, and enforced by imports, tests,
95
+ routes, packages, standards, or review history.
96
+ - **Emerging** — meaningful and partly repeated but not consistent enough
97
+ to configure.
98
+ - **Accidental** — a convenience bucket, legacy pile, generated artifact,
99
+ recent edit cluster, or mixed reasons to change.
100
+
101
+ **Complete when:** mature, emerging, and accidental boundaries are
102
+ separated.
103
+
104
+ ## Step 4 — Build a descriptive architecture model
105
+
106
+ For a large existing codebase, before calling anything a "layer," inventory:
107
+ workspace packages/public exports; applications/services/deployable entry
108
+ points; domain capabilities/end-to-end subsystems;
109
+ persistence/network/rendering/compiler/other technical responsibilities;
110
+ tests/routes/contracts/ownership or architecture documentation; and
111
+ dependency/co-change evidence showing which files already move as a unit.
112
+
113
+ Add mature boundary path patterns to `.scipquery.json` under
114
+ `architecture.boundaries` WITHOUT `allowedDependencies` rows first:
115
+
116
+ ```json
117
+ {
118
+ "architecture": {
119
+ "boundaries": [
120
+ { "name": "domain", "paths": ["src/domain/**"] },
121
+ { "name": "runtime", "paths": ["src/runtime/**"] }
122
+ ]
123
+ }
124
+ }
125
+ ```
126
+
127
+ After adding boundaries, run `scip-query config-validate --json` then
128
+ `scip-query architecture --json` to check the new boundary configuration.
129
+ Use unmapped and ambiguous files to repair boundary membership, and use
130
+ actual boundary edges, reciprocal pairs, and strongly connected groups to
131
+ test whether boundary names describe real separation.
132
+
133
+ **Complete when:** every configured boundary has a stated responsibility and
134
+ the mapping gaps are understood.
135
+
136
+ ## Step 5 — Declare only supported dependency rules
137
+
138
+ An `allowedDependencies` row is closed: an outgoing target omitted from a
139
+ present row is forbidden, but a missing row makes no dependency claim at
140
+ all. Example closed config:
141
+
142
+ ```json
143
+ {
144
+ "architecture": {
145
+ "boundaries": [ ... ],
146
+ "allowedDependencies": {
147
+ "domain": [],
148
+ "runtime": ["domain"]
149
+ },
150
+ "requireAcyclic": true
151
+ }
152
+ }
153
+ ```
154
+
155
+ For each closed `allowedDependencies` row, record the evidence for its
156
+ intended direction. Do not copy the current dependency graph into the
157
+ allow-list merely to obtain zero findings. Leave emerging or disputed
158
+ dependency rules undeclared rather than closing the row prematurely.
159
+
160
+ **Complete when:** every forbidden edge is understood as either
161
+ implementation debt, a false boundary, or a policy mistake.
162
+
163
+ ## Step 6 — Propose structure or decisions
164
+
165
+ Structure a directory architecture review/proposal using this exact section
166
+ order:
167
+
168
+ 1. Scope
169
+ 2. Current Structure Map
170
+ 3. Boundary Maturity
171
+ 4. Descriptive Architecture Model
172
+ 5. Dependency Rules
173
+ 6. Forbidden-Edge Ledger
174
+ 7. Reciprocal and Cycle Review
175
+ 8. Target Structure
176
+ 9. Move Ledger
177
+ 10. Locality Config
178
+ 11. No-Move Decisions
179
+ 12. Deferred Decisions
180
+ 13. Migration Order
181
+
182
+ List a decision as No-Move when broad consumers, route/package/contract
183
+ surfaces, infrastructure roles, generic shared risk, or weak evidence make a
184
+ move harmful.
185
+
186
+ **Complete when:** every proposed move has a reason and a verification path.
187
+
188
+ ## Step 7 — Ratchet, then implement one slice (when asked)
189
+
190
+ For a large repository with existing violations, review the direct findings
191
+ with `scip-query drift --architecture` and write the shared health baseline
192
+ with `scip-query health --write-baseline`. The baseline records stable
193
+ architecture identities by boundary pair, not by whichever example file
194
+ happens to sort first.
195
+
196
+ The default `scip-query diff-gate` architecture check compares only
197
+ architecture identities and does not run every health detector; `diff-gate
198
+ --baseline` is the opt-in full health ratchet and does not duplicate
199
+ architecture findings. Commit `.scipquery-baseline.json` together with
200
+ `.scipquery.json`. A missing baseline causes the architecture gate to report
201
+ that enforcement is not enabled — it does NOT silently treat the current
202
+ dependency graph as accepted.
203
+
204
+ Prefer inspecting the least-broad edge inside a boundary cycle first, then
205
+ determine whether the repair is a move, dependency inversion, named shared
206
+ contract, boundary merge, or policy correction.
207
+
208
+ Before editing to implement a migration slice, state the files to move, the
209
+ imports/exports/tests/docs to update, the expected verification, and the
210
+ rollback risk.
211
+
212
+ After moving the smallest high-confidence slice, run `scip-query
213
+ incomplete-migration`, `scip-query recent-duplicates`, and `scip-query
214
+ co-change <moved-file-or-config>`. Also run the project's tests or typecheck
215
+ for the affected workspace.
216
+
217
+ If `.scipquery.json` locality changed, run `scip-query config-validate`,
218
+ `scip-query locality-candidates --json --full`, `scip-query architecture
219
+ --json`, `scip-query drift --architecture`, and `scip-query diff-gate`.
220
+
221
+ Then invoke `scip-verify`; the implementation is complete only when imports,
222
+ tests, locality signals, and verification are checked.