scip-query 0.17.2 → 0.19.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 (300) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/README.md +3 -1
  3. package/dist/augment-vue-worker.js +1 -1
  4. package/dist/{chunk-ATC4MEVA.js → chunk-2FAJTZSX.js} +2 -2
  5. package/dist/{chunk-W7FNZKX5.js → chunk-2ZNZSNVW.js} +2 -2
  6. package/dist/chunk-35NLDRZC.js +2 -0
  7. package/dist/{chunk-PQD7P6WB.js → chunk-3KQOIXLO.js} +2 -2
  8. package/dist/{chunk-VCRMI56V.js → chunk-3OSRXJKK.js} +2 -2
  9. package/dist/chunk-42QYU6FD.js +3 -0
  10. package/dist/{chunk-BEGHYHOQ.js → chunk-4ZCNFENR.js} +2 -2
  11. package/dist/{chunk-O7NA5FCA.js → chunk-4ZHJAHLE.js} +2 -2
  12. package/dist/chunk-547VY366.js +18 -0
  13. package/dist/{chunk-NX2YAXVQ.js → chunk-54UYBTZW.js} +2 -2
  14. package/dist/{chunk-7ROLM67J.js → chunk-6DHPQS72.js} +2 -2
  15. package/dist/chunk-6SHX42QQ.js +6 -0
  16. package/dist/{chunk-FVLZB54V.js → chunk-7EI4MU5A.js} +2 -2
  17. package/dist/{chunk-J7IMQRCU.js → chunk-7FG5M53V.js} +2 -2
  18. package/dist/chunk-A45K6VUK.js +2 -0
  19. package/dist/{chunk-SXDXR5FH.js → chunk-AEDB4WXE.js} +2 -2
  20. package/dist/{chunk-O5A7BTMA.js → chunk-AERYQJ52.js} +2 -2
  21. package/dist/chunk-AM2LGOEX.js +3 -0
  22. package/dist/{chunk-P6FOIU7O.js → chunk-AWSRND4W.js} +2 -2
  23. package/dist/{chunk-5GAUXLOE.js → chunk-BOXAKNN6.js} +2 -2
  24. package/dist/{chunk-IKMOYFUM.js → chunk-BYPVNKJT.js} +2 -2
  25. package/dist/chunk-DQIJMKNE.js +3 -0
  26. package/dist/{chunk-K65T4TJS.js → chunk-DV6B262O.js} +2 -2
  27. package/dist/chunk-DWN7QDTV.js +26 -0
  28. package/dist/{chunk-G6DDSHMD.js → chunk-EZGT3NJX.js} +2 -2
  29. package/dist/{chunk-MFIA6EIT.js → chunk-EZHARAL4.js} +2 -2
  30. package/dist/chunk-F334Z5UA.js +38 -0
  31. package/dist/{chunk-2A7LUMZP.js → chunk-F5L7WEZF.js} +2 -2
  32. package/dist/{chunk-5CJ6AQN7.js → chunk-FLIF3JWA.js} +2 -2
  33. package/dist/chunk-FMC3BI4I.js +2 -0
  34. package/dist/{chunk-YMFHC5J2.js → chunk-G6QQCX45.js} +2 -2
  35. package/dist/{chunk-Q4GKL4CC.js → chunk-G6RQVDTI.js} +2 -2
  36. package/dist/chunk-GBB2RUDN.js +927 -0
  37. package/dist/{chunk-LL5NQB5V.js → chunk-GJ3FR5WG.js} +2 -2
  38. package/dist/chunk-GMZYT44R.js +5 -0
  39. package/dist/{chunk-OQFPCIXO.js → chunk-GNJHHPZE.js} +2 -2
  40. package/dist/chunk-HOXI4F5I.js +4 -0
  41. package/dist/{chunk-4QBRVI7D.js → chunk-IWK562KR.js} +2 -2
  42. package/dist/chunk-IXORBCMR.js +120 -0
  43. package/dist/chunk-J3U47L4Q.js +2 -0
  44. package/dist/{chunk-K4XL4HOK.js → chunk-J65FQLDL.js} +2 -2
  45. package/dist/{chunk-45QWQSWS.js → chunk-J6BR4MD6.js} +2 -2
  46. package/dist/{chunk-J7WYG63U.js → chunk-JFGUBZWE.js} +2 -2
  47. package/dist/{chunk-BPMBOZAN.js → chunk-KD6TPIXM.js} +2 -2
  48. package/dist/{chunk-3M2UCPFS.js → chunk-KHE7J5ZN.js} +1 -1
  49. package/dist/{chunk-IG6X65MG.js → chunk-KWBA6FDD.js} +2 -2
  50. package/dist/{chunk-KA7RMBVU.js → chunk-LJD7V7UO.js} +2 -2
  51. package/dist/{chunk-ROMKXEUM.js → chunk-MDDF67O2.js} +2 -2
  52. package/dist/{chunk-S22ICAWV.js → chunk-MFBXBLHA.js} +2 -2
  53. package/dist/{chunk-A2GX3PYV.js → chunk-MTFHE7ZO.js} +2 -2
  54. package/dist/chunk-NEG77KKH.js +4 -0
  55. package/dist/{chunk-WA64GKWB.js → chunk-NH7WNNQC.js} +3 -3
  56. package/dist/{chunk-K3UVTL3J.js → chunk-OGHGTD6Z.js} +2 -2
  57. package/dist/chunk-OYYZLJVT.js +2 -0
  58. package/dist/{chunk-DJI446FQ.js → chunk-PAZFJMXB.js} +2 -2
  59. package/dist/{chunk-U244OVE6.js → chunk-PBADFBRR.js} +2 -2
  60. package/dist/{chunk-UWR52GNZ.js → chunk-PKAPOFF5.js} +2 -2
  61. package/dist/{chunk-APCXCRED.js → chunk-PXJIEMND.js} +2 -2
  62. package/dist/{chunk-NJD4C5G5.js → chunk-QB5WSOTY.js} +2 -2
  63. package/dist/{chunk-AY44MGWS.js → chunk-QHOUNTDZ.js} +2 -2
  64. package/dist/chunk-QN67MWDU.js +2 -0
  65. package/dist/{chunk-JLZUM476.js → chunk-QNMOZ3CJ.js} +2 -2
  66. package/dist/{chunk-AWYKDRYV.js → chunk-RIGY5DDE.js} +2 -2
  67. package/dist/chunk-RJLU7IMR.js +10 -0
  68. package/dist/{chunk-N3JH45WR.js → chunk-S65OEY2G.js} +2 -2
  69. package/dist/chunk-SATRCB5O.js +20 -0
  70. package/dist/chunk-T5CSWYAZ.js +2 -0
  71. package/dist/{chunk-H4T2AST4.js → chunk-TC3X33N6.js} +2 -2
  72. package/dist/{chunk-3CJXFMR5.js → chunk-TCVRJ56J.js} +2 -2
  73. package/dist/{chunk-7XP7ZRSI.js → chunk-TDGCALH6.js} +2 -2
  74. package/dist/chunk-TDZXQAH7.js +2 -0
  75. package/dist/{chunk-SUYCF4SX.js → chunk-TOYQTO44.js} +2 -2
  76. package/dist/chunk-UJL3N6TC.js +5 -0
  77. package/dist/chunk-UVMME4FI.js +16 -0
  78. package/dist/{chunk-6JSTKSZH.js → chunk-UXOVHGT6.js} +2 -2
  79. package/dist/chunk-VV5WJLRO.js +67 -0
  80. package/dist/{chunk-4H7T7FIM.js → chunk-WT7TOU2C.js} +2 -2
  81. package/dist/{chunk-4FLF7BHJ.js → chunk-X36LKKVG.js} +2 -2
  82. package/dist/{chunk-C7MBQSIC.js → chunk-X3OOU7CF.js} +2 -2
  83. package/dist/chunk-X65VYV2S.js +2 -0
  84. package/dist/chunk-XBN5VO53.js +2 -0
  85. package/dist/{chunk-TLTLJ4SW.js → chunk-XDSB47KO.js} +2 -2
  86. package/dist/{chunk-4L4X66GE.js → chunk-XDVT7QPG.js} +2 -2
  87. package/dist/chunk-XESK6725.js +2 -0
  88. package/dist/{chunk-OQFA2SUQ.js → chunk-XPYXEEDO.js} +2 -2
  89. package/dist/{chunk-T4P27T6S.js → chunk-XTSVYYAL.js} +2 -2
  90. package/dist/{chunk-27YDE22N.js → chunk-YBAC3RON.js} +2 -2
  91. package/dist/{chunk-2DBY4MO7.js → chunk-YHYTDWFT.js} +2 -2
  92. package/dist/chunk-YYR7ADNB.js +2 -0
  93. package/dist/chunk-ZL5Y23AJ.js +3 -0
  94. package/dist/{chunk-CMLHZWRS.js → chunk-ZNSLF5AC.js} +2 -2
  95. package/dist/chunk-ZXWFN7CK.js +2 -0
  96. package/dist/cli.js +2 -2
  97. package/dist/{command-descriptors-7UUURHWT.js → command-descriptors-SWFWGIFK.js} +173 -167
  98. package/dist/{config-types-70s7NxKB.d.ts → config-types-BA3xLCfG.d.ts} +28 -1
  99. package/dist/{db-BBmJ0v3b.d.ts → db-CzA-9_rL.d.ts} +6 -18
  100. package/dist/direct-navigation-RKMPBXMI.js +3 -0
  101. package/dist/{health-CWpFL_6z.d.ts → health-DYy13GAe.d.ts} +3 -1
  102. package/dist/index.d.ts +23 -41
  103. package/dist/index.js +1 -1
  104. package/dist/postinstall.js +1 -1
  105. package/dist/queries/affected.d.ts +2 -2
  106. package/dist/queries/affected.js +1 -1
  107. package/dist/queries/architecture.d.ts +83 -0
  108. package/dist/queries/architecture.js +2 -0
  109. package/dist/queries/bottlenecks.d.ts +2 -2
  110. package/dist/queries/bottlenecks.js +1 -1
  111. package/dist/queries/by-kind.d.ts +2 -2
  112. package/dist/queries/by-kind.js +1 -1
  113. package/dist/queries/call-graph.d.ts +2 -2
  114. package/dist/queries/call-graph.js +1 -1
  115. package/dist/queries/change-surface.d.ts +2 -2
  116. package/dist/queries/change-surface.js +1 -1
  117. package/dist/queries/cleanup-plan.d.ts +2 -2
  118. package/dist/queries/cleanup-plan.js +1 -1
  119. package/dist/queries/co-change.d.ts +2 -2
  120. package/dist/queries/co-change.js +1 -1
  121. package/dist/queries/code.d.ts +2 -2
  122. package/dist/queries/code.js +1 -1
  123. package/dist/queries/complexity-hotspots.d.ts +2 -2
  124. package/dist/queries/complexity-hotspots.js +1 -1
  125. package/dist/queries/complexity.d.ts +2 -2
  126. package/dist/queries/complexity.js +1 -1
  127. package/dist/queries/convergence.d.ts +2 -2
  128. package/dist/queries/convergence.js +1 -1
  129. package/dist/queries/coupling.d.ts +2 -2
  130. package/dist/queries/coupling.js +1 -1
  131. package/dist/queries/cycles.d.ts +2 -2
  132. package/dist/queries/cycles.js +1 -1
  133. package/dist/queries/dataflow.d.ts +2 -2
  134. package/dist/queries/dataflow.js +1 -1
  135. package/dist/queries/dead.d.ts +2 -2
  136. package/dist/queries/dead.js +1 -1
  137. package/dist/queries/decorative-checkers.d.ts +2 -2
  138. package/dist/queries/decorative-checkers.js +1 -1
  139. package/dist/queries/deep-chains.d.ts +2 -2
  140. package/dist/queries/deep-chains.js +1 -1
  141. package/dist/queries/deps.d.ts +2 -2
  142. package/dist/queries/deps.js +1 -1
  143. package/dist/queries/diff-gate.d.ts +5 -3
  144. package/dist/queries/diff-gate.js +1 -1
  145. package/dist/queries/diff-impact.d.ts +2 -2
  146. package/dist/queries/diff-impact.js +1 -1
  147. package/dist/queries/doc-drift.d.ts +2 -2
  148. package/dist/queries/doc-drift.js +1 -1
  149. package/dist/queries/drift.d.ts +27 -10
  150. package/dist/queries/drift.js +1 -1
  151. package/dist/queries/duplicate-bodies.d.ts +2 -2
  152. package/dist/queries/duplicate-bodies.js +1 -1
  153. package/dist/queries/extract-candidates.d.ts +2 -2
  154. package/dist/queries/extract-candidates.js +1 -1
  155. package/dist/queries/fan.d.ts +2 -2
  156. package/dist/queries/fan.js +1 -1
  157. package/dist/queries/files.d.ts +2 -2
  158. package/dist/queries/health.d.ts +3 -3
  159. package/dist/queries/health.js +1 -1
  160. package/dist/queries/hierarchy.d.ts +2 -2
  161. package/dist/queries/hierarchy.js +1 -1
  162. package/dist/queries/hotspots.d.ts +2 -2
  163. package/dist/queries/hotspots.js +1 -1
  164. package/dist/queries/imports.d.ts +2 -2
  165. package/dist/queries/imports.js +1 -1
  166. package/dist/queries/incomplete-migration.d.ts +2 -2
  167. package/dist/queries/incomplete-migration.js +1 -1
  168. package/dist/queries/index.d.ts +5 -4
  169. package/dist/queries/index.js +1 -1
  170. package/dist/queries/isolated.d.ts +2 -2
  171. package/dist/queries/isolated.js +1 -1
  172. package/dist/queries/locality-candidates.d.ts +2 -2
  173. package/dist/queries/locality-candidates.js +1 -1
  174. package/dist/queries/members.d.ts +2 -2
  175. package/dist/queries/members.js +1 -1
  176. package/dist/queries/methods.d.ts +2 -2
  177. package/dist/queries/methods.js +1 -1
  178. package/dist/queries/not-implemented.d.ts +2 -2
  179. package/dist/queries/not-implemented.js +1 -1
  180. package/dist/queries/outline.d.ts +2 -2
  181. package/dist/queries/outline.js +1 -1
  182. package/dist/queries/passthrough-candidates.d.ts +2 -2
  183. package/dist/queries/passthrough-candidates.js +1 -1
  184. package/dist/queries/plan-context.d.ts +2 -2
  185. package/dist/queries/plan-context.js +1 -1
  186. package/dist/queries/react-component-duplicates.d.ts +2 -2
  187. package/dist/queries/react-component-duplicates.js +1 -1
  188. package/dist/queries/react-hook-candidates.d.ts +2 -2
  189. package/dist/queries/react-hook-candidates.js +1 -1
  190. package/dist/queries/react-large-component-pressure.d.ts +2 -2
  191. package/dist/queries/react-large-component-pressure.js +1 -1
  192. package/dist/queries/recent-duplicates.d.ts +2 -2
  193. package/dist/queries/recent-duplicates.js +1 -1
  194. package/dist/queries/redundant-reexports.d.ts +2 -2
  195. package/dist/queries/redundant-reexports.js +1 -1
  196. package/dist/queries/refs.d.ts +2 -2
  197. package/dist/queries/refs.js +1 -1
  198. package/dist/queries/self-audit.d.ts +2 -2
  199. package/dist/queries/self-audit.js +1 -1
  200. package/dist/queries/similar-chains.d.ts +2 -2
  201. package/dist/queries/similar-chains.js +1 -1
  202. package/dist/queries/similar-files.d.ts +2 -2
  203. package/dist/queries/similar-files.js +1 -1
  204. package/dist/queries/similar-signatures.d.ts +2 -2
  205. package/dist/queries/similar-signatures.js +1 -1
  206. package/dist/queries/similar.d.ts +2 -2
  207. package/dist/queries/similar.js +1 -1
  208. package/dist/queries/slice.d.ts +2 -2
  209. package/dist/queries/slice.js +1 -1
  210. package/dist/queries/stale-abstractions.d.ts +2 -2
  211. package/dist/queries/stale-abstractions.js +1 -1
  212. package/dist/queries/stats.d.ts +2 -2
  213. package/dist/queries/surface.d.ts +2 -2
  214. package/dist/queries/surface.js +1 -1
  215. package/dist/queries/symbols.d.ts +2 -2
  216. package/dist/queries/symbols.js +1 -1
  217. package/dist/queries/system.d.ts +2 -2
  218. package/dist/queries/system.js +1 -1
  219. package/dist/queries/test-quality.d.ts +2 -2
  220. package/dist/queries/test-quality.js +1 -1
  221. package/dist/queries/trace.d.ts +2 -2
  222. package/dist/queries/trace.js +1 -1
  223. package/dist/queries/twin-ab.d.ts +2 -2
  224. package/dist/queries/twin-ab.js +1 -1
  225. package/dist/queries/twin-drift.d.ts +2 -2
  226. package/dist/queries/twin-drift.js +1 -1
  227. package/dist/queries/unused-imports.d.ts +2 -2
  228. package/dist/queries/unused-imports.js +1 -1
  229. package/dist/queries/unused-params.d.ts +2 -2
  230. package/dist/queries/unused-params.js +1 -1
  231. package/dist/queries/vue-component-duplicates.d.ts +2 -2
  232. package/dist/queries/vue-component-duplicates.js +1 -1
  233. package/dist/queries/vue-composable-candidates.d.ts +2 -2
  234. package/dist/queries/vue-composable-candidates.js +1 -1
  235. package/dist/queries/vue-large-view-pressure.d.ts +2 -2
  236. package/dist/queries/vue-large-view-pressure.js +1 -1
  237. package/dist/queries/wrapper-candidates.d.ts +2 -2
  238. package/dist/queries/wrapper-candidates.js +1 -1
  239. package/dist/reindex-worker.js +24 -24
  240. package/dist/reindex.d.ts +12 -10
  241. package/dist/reindex.js +38 -38
  242. package/dist/runtime.d.ts +10 -9
  243. package/dist/runtime.js +2 -1
  244. package/dist/rust-semantic-session-server.js +1 -1
  245. package/dist/{scip-cli-CoMzb7Zu.d.ts → scip-cli-1bVKJgXi.d.ts} +1 -1
  246. package/dist/watch-server.js +7 -6
  247. package/docs/AI_FAILURE_MODES.md +1 -0
  248. package/docs/COMMAND_REFERENCE.md +4 -3
  249. package/docs/DETECTOR_GUIDE.md +5 -3
  250. package/docs/analyzer-inventory.md +16 -6
  251. package/docs/analyzer-validation-ledger.md +12 -1
  252. package/docs/architecture-coherence-vision.md +219 -0
  253. package/package.json +5 -1
  254. package/skills/_shared/SKILL.md +5 -4
  255. package/skills/scip-api-impact/SKILL.md +5 -1
  256. package/skills/scip-claim-audit/SKILL.md +1 -0
  257. package/skills/scip-cleanup-audit/SKILL.md +4 -0
  258. package/skills/scip-concrete-plan/SKILL.md +129 -48
  259. package/skills/scip-conductor/SKILL.md +1 -1
  260. package/skills/scip-debug/SKILL.md +6 -1
  261. package/skills/scip-directory-architecture/SKILL.md +116 -2
  262. package/skills/scip-explore/SKILL.md +2 -1
  263. package/skills/scip-integrity-audit/SKILL.md +17 -0
  264. package/skills/scip-maintainability/SKILL.md +9 -4
  265. package/skills/scip-query/SKILL.md +4 -1
  266. package/skills/scip-root-cause/SKILL.md +150 -0
  267. package/skills/scip-root-cause/agents/openai.yaml +4 -0
  268. package/skills/scip-tla-model-system/SKILL.md +7 -9
  269. package/skills/scip-twin-drift/SKILL.md +1 -1
  270. package/skills/scip-verify/SKILL.md +20 -3
  271. package/dist/chunk-6AITNECC.js +0 -928
  272. package/dist/chunk-7LERNHDG.js +0 -5
  273. package/dist/chunk-7VR5TNOI.js +0 -2
  274. package/dist/chunk-CHJ3QROR.js +0 -2
  275. package/dist/chunk-CVWX24IY.js +0 -2
  276. package/dist/chunk-ELLPMCWA.js +0 -3
  277. package/dist/chunk-IS7DZ7TB.js +0 -2
  278. package/dist/chunk-K53GNKY3.js +0 -2
  279. package/dist/chunk-KJOKTZUE.js +0 -2
  280. package/dist/chunk-KSD6IWF4.js +0 -38
  281. package/dist/chunk-LEKXKHIQ.js +0 -5
  282. package/dist/chunk-LFPQFRCX.js +0 -26
  283. package/dist/chunk-MBVHEPHQ.js +0 -16
  284. package/dist/chunk-NJTIAQY7.js +0 -3
  285. package/dist/chunk-OINSINYW.js +0 -2
  286. package/dist/chunk-QEIGJJBC.js +0 -20
  287. package/dist/chunk-RUQE7DZT.js +0 -2
  288. package/dist/chunk-RUV4KHWA.js +0 -2
  289. package/dist/chunk-SALRDXWM.js +0 -121
  290. package/dist/chunk-SMBIGBGN.js +0 -67
  291. package/dist/chunk-SON6DQNK.js +0 -7
  292. package/dist/chunk-SSGACGAD.js +0 -3
  293. package/dist/chunk-TFWDJDGO.js +0 -2
  294. package/dist/chunk-U4G4UYLB.js +0 -2
  295. package/dist/chunk-WD3PAQJT.js +0 -10
  296. package/dist/chunk-XLJORP6N.js +0 -4
  297. package/dist/chunk-XTF6ELXT.js +0 -3
  298. package/dist/chunk-YYYERNQL.js +0 -18
  299. package/dist/chunk-Z4MCFCGX.js +0 -3
  300. package/dist/direct-navigation-CVCFER5G.js +0 -3
@@ -23,7 +23,7 @@ Load shared mechanics from [`../_shared/SKILL.md`](../_shared/SKILL.md) when you
23
23
  | --- | --- | --- |
24
24
  | `scip-query status --capabilities` | Show index status for this project | Before routing: confirm the index is fresh. |
25
25
  | `scip-query plan-context <target>` | Pre-edit planning context for a symbol, file, or module | Default loop: anchor a plan for the routed skill. |
26
- | `scip-query diff-gate --json` | Gate the current diff: echo candidates, incomplete migrations, missing co-change partners, unedited twin partners (advisory), uncited doc updates, unused params, new dead symbols; exit 1 on blocking findings | Default loop: the loop is complete only when this passes or is explained. |
26
+ | `scip-query diff-gate --json` | Gate the current diff: architecture regressions plus echo, migration, coordination, doc-drift, unused-param, and new-dead candidates; exit 1 on blocking findings | Default loop: the loop is complete only when this passes or is explained. |
27
27
 
28
28
  Use this shortlist first. Open [`../_shared/SKILL.md`](../_shared/SKILL.md) only when it is insufficient.
29
29
  <!-- END GENERATED SKILL COMMANDS -->
@@ -44,6 +44,7 @@ The loop is complete only when `scip-verify` passes or each remaining finding ha
44
44
  | --- | --- | --- |
45
45
  | Understand a system before answering or editing | `scip-explore` | `system`, `trace`, `call-graph`, `dataflow` |
46
46
  | Root-cause a bug or regression | `scip-debug` | `trace`, `dataflow`, `change-surface` |
47
+ | Diagnose the design flaw behind a family of recurring bugs | `scip-root-cause` | `co-change`, `similar`, `refs` |
47
48
  | Turn a report into a fix packet | `scip-triage-issue` | `files`, `trace`, `affected` |
48
49
  | Create a code flow, dependency, or blast-radius diagram | `scip-diagram` | `call-graph`, `dataflow`, `affected` |
49
50
  | Plan a feature, fix, or refactor | `scip-concrete-plan` | `plan-context` |
@@ -72,6 +73,7 @@ Routing is complete only when one owning skill is selected or the task is small
72
73
 
73
74
  - "Is this implementation real / does it actually work" → `scip-integrity-audit`; "is this well-organized" → `scip-maintainability`; same-name drifted twins specifically → `scip-twin-drift`.
74
75
  - One change → `scip-concrete-plan`; a program of changes with delegation → `scip-conductor`.
76
+ - One failing behavior → `scip-debug`; a family of similar bugs whose fixes keep recurring, or "what is really wrong with this system" backed by bug history → `scip-root-cause`; structure smells with no bug evidence → `scip-maintainability`.
75
77
 
76
78
  - Use `scip-cleanup-audit` for reports, ranking, confirmation, or recent AI-residue triage without edits.
77
79
  - Use `scip-cleanup-improve` when the user asks to fix, improve, continue cleaning, or raise health autonomously.
@@ -105,6 +107,7 @@ Top commands per routed skill, generated from each skill's own `commands:` front
105
107
  | `scip-maintainability` | `scip-query stats`, `scip-query system <scope>`, `scip-query surface <scope>` |
106
108
  | `scip-probe-reachability` | `scip-query outline <file> --signatures`, `scip-query code <symbol>`, `scip-query trace <symbol>` |
107
109
  | `scip-react-maintainability` | `scip-query react-component-duplicates --scope <scope> --full --json`, `scip-query react-hook-candidates --scope <scope> --full --json`, `scip-query react-large-component-pressure --scope <scope> --full --json` |
110
+ | `scip-root-cause` | `scip-query trace <mechanism-symbol>`, `scip-query co-change <fix-site-file>`, `scip-query system <system-scope>` |
108
111
  | `scip-setup` | `scip-query setup --json`, `scip-query doctor`, `scip-query status --json` |
109
112
  | `scip-tla-model-system` | `scip-query tla scaffold <file>`, `scip-query tla verify <spec>`, `scip-query tla instrument <spec>` |
110
113
  | `scip-triage-issue` | `scip-query files <issue-term>`, `scip-query trace <entry-or-error-symbol>`, `scip-query code <entry-or-error-symbol>` |
@@ -0,0 +1,150 @@
1
+ ---
2
+ name: scip-root-cause
3
+ description: Diagnose the design flaw behind a family of related bugs with scip-query evidence. Use when similar bugs keep recurring, the same subsystem keeps needing patches, or the user lists fixed/observed bugs and asks what is really wrong; produces a falsifiable flaw diagnosis, a latent-instance hunt, and the least invasive remedy that kills the class.
4
+ commands:
5
+ - template: "scip-query trace <mechanism-symbol>"
6
+ when: "Assemble the family: mechanism and violated invariant for each bug."
7
+ - template: "scip-query co-change <fix-site-file>"
8
+ when: "Assemble the family: files that historically changed with each fix site."
9
+ - template: "scip-query system <system-scope>"
10
+ when: "Define the system: real responsibilities, files, dependencies in and out."
11
+ - template: "scip-query similar <fixed-symbol> --json --full"
12
+ when: "Predict: hunt latent instances among sibling implementations of the fixed code."
13
+ - template: "scip-query refs <invariant-carrier>"
14
+ when: "Predict: every site that touches the violated invariant's state."
15
+ - template: "scip-query affected <remedy-symbol> --json"
16
+ when: "Choose the rung: blast radius of the candidate remedy."
17
+ ---
18
+
19
+ # scip-root-cause
20
+
21
+ Use this skill to move from a family of related bugs to the design flaw that produces them, and to the least invasive remedy that eliminates the class. `scip-debug` takes one failure to one minimal fix; `scip-maintainability` finds structural smells without bug evidence; this skill starts from the evidence that patching has not worked — the same kind of bug keeps coming back — and asks what the system's design gets wrong.
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 trace <mechanism-symbol>` | Trace a symbol: definition + all references | Assemble the family: mechanism and violated invariant for each bug. |
31
+ | `scip-query co-change <fix-site-file>` | Files that change together in git history without a dependency edge — hidden coupling candidates | Assemble the family: files that historically changed with each fix site. |
32
+ | `scip-query system <system-scope>` | Full module map: files, symbols, deps in/out | Define the system: real responsibilities, files, dependencies in and out. |
33
+ | `scip-query similar <fixed-symbol> --json --full` | Find heuristic function similarity candidates from callee fingerprints | Predict: hunt latent instances among sibling implementations of the fixed code. |
34
+ | `scip-query refs <invariant-carrier>` | Find all files referencing a symbol | Predict: every site that touches the violated invariant's state. |
35
+ | `scip-query affected <remedy-symbol> --json` | Transitive closure of symbols that could break if this symbol changes | Choose the rung: blast radius of the candidate remedy. |
36
+
37
+ Use this shortlist first. Open [`../_shared/SKILL.md`](../_shared/SKILL.md) only when it is insufficient.
38
+ <!-- END GENERATED SKILL COMMANDS -->
39
+
40
+ ## Terms
41
+
42
+ A bug family is a set of failures whose mechanisms violate the same invariant; what makes it a family rather than a coincidence is that one stated flaw derives every member, so fixing members one at a time treats symptoms of a shared cause.
43
+
44
+ A design flaw is a mismatch between what a system's design assumes and what its real responsibilities require; what makes it the root cause is that it is the earliest fact from which every family member's mechanism follows, so removing it removes the class.
45
+
46
+ Retrodiction is deriving each already-known bug from the hypothesized flaw; what makes it a test is that a family member the flaw cannot derive either shrinks the family or kills the hypothesis.
47
+
48
+ A latent instance is a not-yet-reported bug the flaw predicts must exist in unfixed code; what makes it decisive is that it is checkable now — finding one confirms the diagnosis and becomes a fix target, while an honest hunt that finds none weakens the diagnosis and must be reported as weakening it.
49
+
50
+ The remedy ladder is the ordered set of interventions from least to most invasive; what makes the order binding is that each rung is only justified when a constructed family member survives the rung below it.
51
+
52
+ ## Rules
53
+
54
+ 1. Every bug in the family gets a mechanism traced to source, not a symptom description: which invariant broke, where, and what the fix did. Sources: fix commits (`git log`, `git show`) plus `trace`/`code`/`dataflow`.
55
+ 2. The flaw hypothesis must be falsifiable and stated as a design claim — "the design assumes X, but the system's responsibilities include Y" — never as a narrative about unlucky bugs.
56
+ 3. State at least two rivals and kill them with evidence: unrelated coincidences, caller misuse rather than design, one missed edge case rather than a structural flaw.
57
+ 4. The hypothesis must retrodict every family member and predict at least one latent instance, and the latent-instance hunt must be executed (`similar`, `refs` over the invariant's carriers, or a constructed probe), not argued.
58
+ 5. Choose the lowest remedy rung that kills the whole class — retrodicted and latent members both. Climb a rung only when a constructed family member survives the rung below, and keep that counterexample in the record.
59
+ 6. Root-cause stories are the most rationalization-prone artifact in software: prefer delegating the attack on the diagnosis and the remedy to a fresh subagent given only the family table, system definition, and hypothesis — briefed to win by refuting. Solo fallback: write the rival hypotheses and the latent-instance predictions before reading any more code.
60
+ 7. The verdict is derived with counts, and the diagnosis hands off to `scip-concrete-plan` for implementation — this skill does not edit application code.
61
+
62
+ ## Workflow
63
+
64
+ ### 1. Assemble the bug family
65
+
66
+ For each reported or fixed bug, fill one row:
67
+
68
+ ```markdown
69
+ | Bug | Symptom | Mechanism (file:symbol) | Invariant violated | Fix applied | Source |
70
+ | --- | --- | --- | --- | --- | --- |
71
+ ```
72
+
73
+ Evidence: the user's description, fix commits (`git log --follow`, `git show`), `scip-query trace`/`code` on the mechanism symbols, `scip-query co-change` on fix sites to find members the user forgot.
74
+
75
+ This step is complete only when every row has a source-traced mechanism and a named invariant — a bug whose mechanism cannot be traced is listed as `unconfirmed member`, not silently included.
76
+
77
+ ### 2. Define the system
78
+
79
+ Define the system that owns the family, contextually: its wider class, then the essential responsibility that explains its other traits in this codebase — with referents from `scip-query system <scope>` and `surface <scope>`. Then list the design's load-bearing assumptions as the code actually embodies them (not as the README states them), each with a `Source:` citation.
80
+
81
+ This step is complete only when the system's real responsibilities and embodied assumptions are stated with citations.
82
+
83
+ ### 3. Hypothesize the flaw — and its rivals
84
+
85
+ State the flaw as a falsifiable design claim:
86
+
87
+ ```markdown
88
+ Flaw hypothesis: the design assumes <X> (Source: <citation>), but the system's
89
+ responsibilities include <Y> (Source: <citation>); every family member is an
90
+ instance of the X∧Y collision.
91
+
92
+ Rivals:
93
+ - R1. Coincidence — the members have unrelated causes. Killed by: <evidence> | ALIVE
94
+ - R2. Misuse — callers hold the bug, the design is sound. Killed by: <evidence> | ALIVE
95
+ - R3. <next-most-plausible> — Killed by: <evidence> | ALIVE
96
+ ```
97
+
98
+ A rival still marked `ALIVE` at the end of the workflow caps the diagnosis at `CANDIDATE`, not `CONFIRMED`.
99
+
100
+ ### 4. Retrodict and predict
101
+
102
+ Retrodiction: derive each family-table row from the flaw in one sentence each. A member that cannot be derived is removed from the family (say so) or refutes the hypothesis (start over).
103
+
104
+ Prediction: the flaw implies unfixed instances exist. Name where they must be, then hunt:
105
+
106
+ ```bash
107
+ scip-query similar <fixed-symbol> --json --full
108
+ scip-query refs <invariant-carrier>
109
+ ```
110
+
111
+ plus a constructed probe when the claim is cheaply executable. Record each prediction with an executed result:
112
+
113
+ ```markdown
114
+ - L1. <predicted latent instance> → FOUND at <file:line> (new fix target) | NOT FOUND after <hunt executed>
115
+ ```
116
+
117
+ This step is complete only when every family member is retrodicted and every prediction has an executed hunt result. Zero latent instances found is a reportable weakness of the diagnosis, not a detail to omit.
118
+
119
+ ### 5. Choose the lowest rung
120
+
121
+ The remedy ladder, in order:
122
+
123
+ 1. **Enforce the invariant at a boundary** — type, guard, constraint, lint, trigger — without moving code.
124
+ 2. **Consolidate the responsibility into one owner** — the scattered decision gets one named mechanism.
125
+ 3. **Redesign the core behind its existing interface** — consumers untouched.
126
+ 4. **Redesign the interfaces** — last resort; consumers migrate.
127
+
128
+ For the chosen rung, run the attack: construct a family member — retrodicted or latent — that survives the rung. If one survives, keep the counterexample in the record and climb one rung. Check blast radius with `scip-query affected` before proposing any rung above 1. For protocol- or lifecycle-shaped flaws whose remedy must hold across interleavings, note the escalation path to `scip-tla-model-system`.
129
+
130
+ This step is complete only when the chosen rung has an attack record showing no family member survives it, and every rejected lower rung keeps its surviving counterexample.
131
+
132
+ ### 6. Report and hand off
133
+
134
+ ```markdown
135
+ ## Root-cause diagnosis
136
+
137
+ System: <definition with referents>
138
+ Bug family: <n> members traced, <u> unconfirmed
139
+ Flaw: <the design claim> — CONFIRMED | CANDIDATE (rival <id> alive)
140
+ Rivals: <r> stated, <k> killed with evidence
141
+ Retrodiction: <n>/<n> members derived
142
+ Latent instances: <p> predicted, <f> found (each a fix target), hunts executed
143
+ Remedy: rung <1-4> — <the intervention>; lower rungs rejected by <counterexamples>
144
+ Blast radius: <affected summary>
145
+ Escalation: <none | scip-tla-model-system for <property>>
146
+ ```
147
+
148
+ Hand the diagnosis to `scip-concrete-plan`: the flaw and invariants become its Definitions & Invariants, the family table and hunt results become premises, and the surviving-counterexample record seeds its attack pass.
149
+
150
+ The diagnosis is complete only when the verdict line carries the counts and every count is backed by an entry in the record above it.
@@ -0,0 +1,4 @@
1
+ interface:
2
+ display_name: "SCIP Root Cause"
3
+ short_description: "Diagnose the design flaw behind a family of recurring bugs"
4
+ default_prompt: "Use scip-query to trace a family of related bugs to the design flaw that produces them: retrodict every member, hunt the latent instances the flaw predicts, and propose the least invasive remedy that eliminates the class."
@@ -21,19 +21,17 @@ Use this skill when a TypeScript system needs a TLA+ model tied to code evidence
21
21
  Load shared mechanics from [`../_shared/SKILL.md`](../_shared/SKILL.md).
22
22
 
23
23
  <!-- BEGIN GENERATED SKILL COMMANDS -->
24
-
25
24
  ## Commands for this skill
26
25
 
27
- | Command | Purpose | When |
28
- | -------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- |
29
- | `scip-query tla scaffold <file>` | TLA+ model workflow: verify a model and mapping contract, scaffold a draft model from indexed code, generate a trace recorder, or check a recorded trace against the next-state relation | Start here for a new model: derive a draft spec, config, and mapping from indexed code. |
30
- | `scip-query tla verify <spec>` | TLA+ model workflow: verify a model and mapping contract, scaffold a draft model from indexed code, generate a trace recorder, or check a recorded trace against the next-state relation | Mechanical conformance: referents, reads/writes, calls, and the model checker. |
31
- | `scip-query tla instrument <spec>` | TLA+ model workflow: verify a model and mapping contract, scaffold a draft model from indexed code, generate a trace recorder, or check a recorded trace against the next-state relation | Generate a trace recorder plus wiring sites for each mapped action. |
32
- | `scip-query tla trace-check <spec> --trace <file>` | TLA+ model workflow: verify a model and mapping contract, scaffold a draft model from indexed code, generate a trace recorder, or check a recorded trace against the next-state relation | Semantic conformance: check a recorded execution against the model's Next relation. |
33
- | `scip-query tla fetch-tools` | TLA+ model workflow: verify a model and mapping contract, scaffold a draft model from indexed code, generate a trace recorder, or check a recorded trace against the next-state relation | Download the pinned tla2tools.jar into the cache when the checker is unavailable. |
26
+ | Command | Purpose | When |
27
+ | --- | --- | --- |
28
+ | `scip-query tla scaffold <file>` | TLA+ model workflow: verify a model and mapping contract, scaffold a draft model from indexed code, generate a trace recorder, or check a recorded trace against the next-state relation | Start here for a new model: derive a draft spec, config, and mapping from indexed code. |
29
+ | `scip-query tla verify <spec>` | TLA+ model workflow: verify a model and mapping contract, scaffold a draft model from indexed code, generate a trace recorder, or check a recorded trace against the next-state relation | Mechanical conformance: referents, reads/writes, calls, and the model checker. |
30
+ | `scip-query tla instrument <spec>` | TLA+ model workflow: verify a model and mapping contract, scaffold a draft model from indexed code, generate a trace recorder, or check a recorded trace against the next-state relation | Generate a trace recorder plus wiring sites for each mapped action. |
31
+ | `scip-query tla trace-check <spec> --trace <file>` | TLA+ model workflow: verify a model and mapping contract, scaffold a draft model from indexed code, generate a trace recorder, or check a recorded trace against the next-state relation | Semantic conformance: check a recorded execution against the model's Next relation. |
32
+ | `scip-query tla fetch-tools` | TLA+ model workflow: verify a model and mapping contract, scaffold a draft model from indexed code, generate a trace recorder, or check a recorded trace against the next-state relation | Download the pinned tla2tools.jar into the cache when the checker is unavailable. |
34
33
 
35
34
  Use this shortlist first. Open [`../_shared/SKILL.md`](../_shared/SKILL.md) only when it is insufficient.
36
-
37
35
  <!-- END GENERATED SKILL COMMANDS -->
38
36
 
39
37
  ## Choose the Slice
@@ -29,7 +29,7 @@ Load shared mechanics from [`../_shared/SKILL.md`](../_shared/SKILL.md).
29
29
  | `scip-query duplicate-bodies --json --full` | Find exact duplicate small-body candidates across files | Cross-check: IDENTICAL groups are duplicate-bodies' job, not this skill's. |
30
30
  | `scip-query code <symbol>` | Read the source code for a symbol (bounded to its definition range) | Classify a divergent group: read every member's body. |
31
31
  | `scip-query refs <symbol>` | Find all files referencing a symbol | Pick the canonical twin: consumer count per member. |
32
- | `scip-query diff-gate --json` | Gate the current diff: echo candidates, incomplete migrations, missing co-change partners, unedited twin partners (advisory), uncited doc updates, unused params, new dead symbols; exit 1 on blocking findings | Verify: the twin-partner check must not flag a one-sided fix. |
32
+ | `scip-query diff-gate --json` | Gate the current diff: architecture regressions plus echo, migration, coordination, doc-drift, unused-param, and new-dead candidates; exit 1 on blocking findings | Verify: the twin-partner check must not flag a one-sided fix. |
33
33
 
34
34
  Use this shortlist first. Open [`../_shared/SKILL.md`](../_shared/SKILL.md) only when it is insufficient.
35
35
  <!-- END GENERATED SKILL COMMANDS -->
@@ -30,7 +30,7 @@ Load shared mechanics from [`../_shared/SKILL.md`](../_shared/SKILL.md).
30
30
  | `scip-query doctor` | Diagnose config, index freshness, dependency readiness, and project capabilities | Prove the workspace: index freshness and dependency readiness. |
31
31
  | `scip-query status --capabilities` | Show index status for this project | Prove the workspace: which evidence and verification capabilities are available. |
32
32
  | `scip-query diff-impact --json` | Compute changed symbols and downstream consumers from current git diff | Assess the diff: changed symbols and downstream consumers. |
33
- | `scip-query diff-gate --json` | Gate the current diff: echo candidates, incomplete migrations, missing co-change partners, unedited twin partners (advisory), uncited doc updates, unused params, new dead symbols; exit 1 on blocking findings | Run the gate: the primary blocker for diff-specific risk. |
33
+ | `scip-query diff-gate --json` | Gate the current diff: architecture regressions plus echo, migration, coordination, doc-drift, unused-param, and new-dead candidates; exit 1 on blocking findings | Run the gate: the primary blocker for diff-specific risk. |
34
34
  | `scip-query health --baseline` | Composite codebase health report with prioritized action list | Check health: compare findings against the committed baseline. |
35
35
  | `scip-query doc-drift --json --full` | Stale-doc candidates: code the doc references or co-changed with kept changing after the doc stopped | Check docs: run when docs, AGENTS.md, or command surfaces changed. |
36
36
 
@@ -44,6 +44,7 @@ Use this shortlist first. Open [`../_shared/SKILL.md`](../_shared/SKILL.md) only
44
44
  3. Run every postcheck that matches the actual edit, not only the check you expected to need.
45
45
  4. If `.scipquery.json` or suppressions changed, run `scip-query config-validate`.
46
46
  5. Prefer fixing findings. Suppress only intentional design, compatibility shims, framework entry points, or accepted false positives with a specific reason.
47
+ 6. A PASS ends scrutiny, so it must survive refutation first: construct the cheapest checks that could still break this diff and run them before claiming PASS. A FAIL needs no refutation — report it with the evidence.
47
48
 
48
49
  ## Flow
49
50
 
@@ -115,12 +116,24 @@ scip-query self-audit
115
116
 
116
117
  This step is complete only when changed documentation and config surfaces are checked or explicitly out of scope.
117
118
 
119
+ ### 6. Refute the PASS
120
+
121
+ A PASS is the verdict nobody re-checks — attack it before making it. Construct at least two refutation attempts and run the cheapest check that would expose each. Prefer executed probes (run the consumer's test, invoke the command, feed the edge input) over argued ones. Pick attacks that fit the diff:
122
+
123
+ - an unexercised consumer: a caller in `diff-impact` output whose tests did not run — run them, or trace the contract it depends on;
124
+ - an unexercised input: an edge the changed code newly handles or newly rejects — execute it;
125
+ - the intent gap: one case the stated goal implies that the diff does not visibly cover — find where it is handled or show it missing.
126
+
127
+ Record every attempt; an attempt that breaks the diff converts the verdict to FAIL with a finding, and the attempt stays in the record either way.
128
+
129
+ This step is complete only when every refutation attempt has an executed result.
130
+
118
131
  ## Report
119
132
 
120
133
  End with:
121
134
 
122
135
  ```markdown
123
- Verification: PASS/FAIL
136
+ Verification: PASS/FAIL — <n> postchecks, <m> refutation attempts, <k> broke
124
137
 
125
138
  Environment:
126
139
 
@@ -144,11 +157,15 @@ Health/docs/config:
144
157
 
145
158
  - <commands and results>
146
159
 
160
+ Refutation attempts:
161
+
162
+ - R1: <attack> → survived (evidence) | broke (finding)
163
+
147
164
  Remaining risk:
148
165
 
149
166
  - <accepted findings, unavailable capabilities, or checks not run>
150
167
  ```
151
168
 
152
- Do not claim ready-to-ship unless freshness is `fresh` after the final edit and diff-gate is passed or fully explained.
169
+ Do not claim ready-to-ship unless freshness is `fresh` after the final edit, diff-gate is passed or fully explained, and the PASS survived every refutation attempt.
153
170
 
154
171
  - `dead`/`new-dead` correctly resolve `import type` consumers, tsconfig `paths` aliases, pnpm/npm/yarn workspace cross-package imports, and Vue `<script setup>` composables. The one residual gap is a same-named symbol reached only through a re-exporting barrel file in a workspace package; that shape self-labels `unconfirmed (cross-package ambiguous-name resolution gap)` in the finding — treat only that label as unconfirmed until `refs` agrees. See the Detector Reliability section in `../_shared/SKILL.md`.