scip-query 0.10.0 → 0.10.2

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 (293) hide show
  1. package/README.md +115 -58
  2. package/dist/augment-vue-worker.js +1 -1
  3. package/dist/chunk-3KLLFNT4.js +2 -0
  4. package/dist/{chunk-UIWAZ2NT.js → chunk-3UVJJ6Z7.js} +1 -1
  5. package/dist/chunk-3UW7VM4H.js +62 -0
  6. package/dist/chunk-3ZYF3ELZ.js +2 -0
  7. package/dist/{chunk-MN75T4UB.js → chunk-47UA45TU.js} +2 -2
  8. package/dist/{chunk-NC4IUW25.js → chunk-4ZUJJRWT.js} +2 -2
  9. package/dist/chunk-5B53WB6E.js +4 -0
  10. package/dist/{chunk-2WEH5QHC.js → chunk-5FOPAXWY.js} +2 -2
  11. package/dist/{chunk-VZRILF2Z.js → chunk-5M4TYWVI.js} +2 -2
  12. package/dist/{chunk-QJWN6LA5.js → chunk-5QJXH6ZL.js} +5 -5
  13. package/dist/{chunk-NN3O7TPH.js → chunk-64MNV6AB.js} +1 -1
  14. package/dist/chunk-77YBOOYT.js +2 -0
  15. package/dist/chunk-7KCSELEV.js +2 -0
  16. package/dist/{chunk-ZZ2W5P3D.js → chunk-7OHWPJ5N.js} +2 -2
  17. package/dist/chunk-7S5E7KWT.js +2 -0
  18. package/dist/chunk-A3VNUGKJ.js +2 -0
  19. package/dist/{chunk-ISCKLDSS.js → chunk-A4L36SZS.js} +3 -3
  20. package/dist/{chunk-IVAIPXNO.js → chunk-AUVBR62P.js} +2 -2
  21. package/dist/chunk-AW4N6MGC.js +18 -0
  22. package/dist/{chunk-PG3ZI5IH.js → chunk-B6MJ5VQV.js} +2 -2
  23. package/dist/chunk-B75HZHUP.js +2 -0
  24. package/dist/chunk-BGBBVSH4.js +2 -0
  25. package/dist/chunk-BKDXBJDQ.js +2 -0
  26. package/dist/{chunk-AQYBOORI.js → chunk-C2QSK7E7.js} +1 -1
  27. package/dist/chunk-C3MZZ2ZN.js +2 -0
  28. package/dist/{chunk-AP5GTKSG.js → chunk-CAWSSEVM.js} +2 -2
  29. package/dist/chunk-CFL2CNIF.js +10 -0
  30. package/dist/{chunk-4HTJZC6G.js → chunk-CJJP64OC.js} +2 -2
  31. package/dist/chunk-CNTEQMHA.js +2 -0
  32. package/dist/{chunk-WEJYUS5O.js → chunk-CRU42NJU.js} +2 -2
  33. package/dist/chunk-CSWZFD46.js +2 -0
  34. package/dist/{chunk-ZOT3WUZW.js → chunk-CTCAF3YA.js} +2 -2
  35. package/dist/chunk-D322LMSA.js +5 -0
  36. package/dist/{chunk-772YYL6I.js → chunk-DAI74TJU.js} +2 -2
  37. package/dist/chunk-DE7MA6OD.js +3 -0
  38. package/dist/chunk-DJMK4DBL.js +2 -0
  39. package/dist/chunk-DRAZH77R.js +7 -0
  40. package/dist/{chunk-L2KFPRMA.js → chunk-E44ZMVNA.js} +2 -2
  41. package/dist/{chunk-BNW3Q24R.js → chunk-E7KERP7E.js} +2 -2
  42. package/dist/{chunk-QKO474FG.js → chunk-EOZIZWW4.js} +2 -2
  43. package/dist/chunk-ERHOS6AW.js +2 -0
  44. package/dist/{chunk-ADRYSISR.js → chunk-ESG4HBEF.js} +2 -2
  45. package/dist/chunk-EWC3UK4V.js +3 -0
  46. package/dist/chunk-FGCL6NDB.js +8 -0
  47. package/dist/chunk-FIB4JPEX.js +2 -0
  48. package/dist/chunk-FNRPGGVI.js +2 -0
  49. package/dist/chunk-FOQHUKNZ.js +4 -0
  50. package/dist/chunk-FPMVCDIJ.js +2 -0
  51. package/dist/chunk-FUPDW5AC.js +3 -0
  52. package/dist/chunk-G3WGZU5Q.js +2 -0
  53. package/dist/chunk-GS33KGAY.js +2 -0
  54. package/dist/chunk-GZCQTZLK.js +2 -0
  55. package/dist/{chunk-VGBSY6N7.js → chunk-HVTYSC26.js} +2 -2
  56. package/dist/{chunk-2BMFRBV6.js → chunk-ICXVNWMI.js} +2 -2
  57. package/dist/chunk-JM72FNGA.js +2 -0
  58. package/dist/chunk-KPHKX4LP.js +71 -0
  59. package/dist/{chunk-6DEX3XP6.js → chunk-LPLGJ4HO.js} +2 -2
  60. package/dist/chunk-MHK7Z53U.js +2 -0
  61. package/dist/chunk-MHTDOFV7.js +5 -0
  62. package/dist/chunk-MUULWXSJ.js +2 -0
  63. package/dist/chunk-MZ7APUFN.js +3 -0
  64. package/dist/chunk-NNDYO2DX.js +2 -0
  65. package/dist/chunk-NP5HYVLX.js +20 -0
  66. package/dist/{chunk-Y5H7TBVE.js → chunk-NVFERV4U.js} +2 -2
  67. package/dist/{chunk-LWYIGRHR.js → chunk-NXIAHE7F.js} +1 -1
  68. package/dist/chunk-O3OKSF6O.js +2 -0
  69. package/dist/chunk-O4L4AB3T.js +2 -0
  70. package/dist/chunk-OBBDKQAG.js +3 -0
  71. package/dist/chunk-OLD6PBU6.js +7 -0
  72. package/dist/{chunk-V76FCF5F.js → chunk-PFOCOG57.js} +2 -2
  73. package/dist/chunk-PVZMPG5I.js +2 -0
  74. package/dist/chunk-QLNGUWR7.js +2 -0
  75. package/dist/chunk-QSXQT3NE.js +2 -0
  76. package/dist/{chunk-OLCKSG3Y.js → chunk-QVCCLDZI.js} +2 -2
  77. package/dist/chunk-RHTJBYZ5.js +2 -0
  78. package/dist/chunk-SPE4YCOT.js +7 -0
  79. package/dist/{chunk-FVIKFWUL.js → chunk-TM6GVHA6.js} +2 -2
  80. package/dist/chunk-TO54DY4O.js +2 -0
  81. package/dist/chunk-UMNENNTX.js +2 -0
  82. package/dist/chunk-UNJG7P2I.js +2 -0
  83. package/dist/{chunk-TKDJQ2WD.js → chunk-UUBMFL3F.js} +1 -1
  84. package/dist/chunk-VAA5FFIW.js +2 -0
  85. package/dist/chunk-WDUTG2ZR.js +4 -0
  86. package/dist/chunk-X7ZY6FFF.js +4 -0
  87. package/dist/{chunk-BGRPMGTD.js → chunk-YQH353VA.js} +2 -2
  88. package/dist/chunk-YTR4CO5S.js +38 -0
  89. package/dist/chunk-YUOAAR24.js +2 -0
  90. package/dist/{chunk-YWZBKYLS.js → chunk-YYD245WG.js} +2 -2
  91. package/dist/{chunk-SCEMECW7.js → chunk-Z4VHYJ5U.js} +2 -2
  92. package/dist/chunk-ZFMPHDAT.js +4 -0
  93. package/dist/chunk-ZQLO2SCU.js +6 -0
  94. package/dist/chunk-ZSLT7NWQ.js +61 -0
  95. package/dist/cli.js +276 -271
  96. package/dist/{config-types-CGIeLEpY.d.ts → config-types-Bj4sh28g.d.ts} +37 -1
  97. package/dist/{db-DdTPetj5.d.ts → db-CTarohbZ.d.ts} +1 -1
  98. package/dist/git-history-Dao3_Pu9.d.ts +12 -0
  99. package/dist/{health-C6r2VgpA.d.ts → health-Bx0x1HAG.d.ts} +64 -4
  100. package/dist/index.d.ts +7 -6
  101. package/dist/index.js +1 -1
  102. package/dist/postinstall.js +2 -2
  103. package/dist/queries/affected.d.ts +2 -2
  104. package/dist/queries/affected.js +1 -1
  105. package/dist/queries/bottlenecks.d.ts +6 -2
  106. package/dist/queries/bottlenecks.js +1 -1
  107. package/dist/queries/by-kind.d.ts +2 -2
  108. package/dist/queries/by-kind.js +1 -1
  109. package/dist/queries/call-graph.d.ts +2 -2
  110. package/dist/queries/call-graph.js +1 -1
  111. package/dist/queries/change-surface.d.ts +2 -2
  112. package/dist/queries/change-surface.js +1 -1
  113. package/dist/queries/cleanup-plan.d.ts +2 -2
  114. package/dist/queries/cleanup-plan.js +1 -1
  115. package/dist/queries/co-change.d.ts +40 -5
  116. package/dist/queries/co-change.js +1 -1
  117. package/dist/queries/code.d.ts +2 -2
  118. package/dist/queries/code.js +1 -1
  119. package/dist/queries/complexity-hotspots.d.ts +2 -2
  120. package/dist/queries/complexity-hotspots.js +1 -1
  121. package/dist/queries/complexity.d.ts +2 -2
  122. package/dist/queries/complexity.js +1 -1
  123. package/dist/queries/convergence.d.ts +2 -2
  124. package/dist/queries/convergence.js +1 -1
  125. package/dist/queries/coupling.d.ts +6 -2
  126. package/dist/queries/coupling.js +1 -1
  127. package/dist/queries/cycles.d.ts +2 -2
  128. package/dist/queries/cycles.js +1 -1
  129. package/dist/queries/dataflow.d.ts +2 -2
  130. package/dist/queries/dataflow.js +1 -1
  131. package/dist/queries/dead.d.ts +10 -3
  132. package/dist/queries/dead.js +1 -1
  133. package/dist/queries/deep-chains.d.ts +6 -2
  134. package/dist/queries/deep-chains.js +1 -1
  135. package/dist/queries/deps.d.ts +2 -2
  136. package/dist/queries/deps.js +1 -1
  137. package/dist/queries/diff-gate.d.ts +66 -3
  138. package/dist/queries/diff-gate.js +1 -1
  139. package/dist/queries/diff-impact.d.ts +20 -4
  140. package/dist/queries/diff-impact.js +1 -1
  141. package/dist/queries/doc-drift.d.ts +20 -3
  142. package/dist/queries/doc-drift.js +1 -1
  143. package/dist/queries/drift.d.ts +10 -3
  144. package/dist/queries/drift.js +1 -1
  145. package/dist/queries/extract-candidates.d.ts +11 -3
  146. package/dist/queries/extract-candidates.js +1 -1
  147. package/dist/queries/fan.d.ts +2 -2
  148. package/dist/queries/fan.js +1 -1
  149. package/dist/queries/files.d.ts +2 -2
  150. package/dist/queries/files.js +1 -1
  151. package/dist/queries/health.d.ts +3 -3
  152. package/dist/queries/health.js +1 -1
  153. package/dist/queries/hierarchy.d.ts +2 -2
  154. package/dist/queries/hierarchy.js +1 -1
  155. package/dist/queries/hotspots.d.ts +2 -2
  156. package/dist/queries/hotspots.js +1 -1
  157. package/dist/queries/imports.d.ts +2 -2
  158. package/dist/queries/imports.js +1 -1
  159. package/dist/queries/incomplete-migration.d.ts +16 -3
  160. package/dist/queries/incomplete-migration.js +1 -1
  161. package/dist/queries/index.d.ts +20 -12
  162. package/dist/queries/index.js +1 -1
  163. package/dist/queries/isolated.d.ts +2 -2
  164. package/dist/queries/isolated.js +1 -1
  165. package/dist/queries/locality-candidates.d.ts +51 -0
  166. package/dist/queries/locality-candidates.js +2 -0
  167. package/dist/queries/members.d.ts +2 -2
  168. package/dist/queries/members.js +1 -1
  169. package/dist/queries/methods.d.ts +2 -2
  170. package/dist/queries/methods.js +1 -1
  171. package/dist/queries/outline.d.ts +2 -2
  172. package/dist/queries/outline.js +1 -1
  173. package/dist/queries/passthrough-candidates.d.ts +8 -3
  174. package/dist/queries/passthrough-candidates.js +1 -1
  175. package/dist/queries/plan-context.d.ts +4 -2
  176. package/dist/queries/plan-context.js +1 -1
  177. package/dist/queries/react-component-duplicates.d.ts +31 -0
  178. package/dist/queries/react-component-duplicates.js +2 -0
  179. package/dist/queries/react-hook-candidates.d.ts +40 -0
  180. package/dist/queries/react-hook-candidates.js +2 -0
  181. package/dist/queries/react-large-component-pressure.d.ts +34 -0
  182. package/dist/queries/react-large-component-pressure.js +2 -0
  183. package/dist/queries/recent-duplicates.d.ts +32 -3
  184. package/dist/queries/recent-duplicates.js +1 -1
  185. package/dist/queries/redundant-reexports.d.ts +7 -3
  186. package/dist/queries/redundant-reexports.js +1 -1
  187. package/dist/queries/refs.d.ts +2 -2
  188. package/dist/queries/refs.js +1 -1
  189. package/dist/queries/self-audit.d.ts +2 -2
  190. package/dist/queries/self-audit.js +1 -1
  191. package/dist/queries/similar-chains.d.ts +2 -2
  192. package/dist/queries/similar-chains.js +1 -1
  193. package/dist/queries/similar-files.d.ts +2 -2
  194. package/dist/queries/similar-files.js +1 -1
  195. package/dist/queries/similar-signatures.d.ts +2 -2
  196. package/dist/queries/similar-signatures.js +1 -1
  197. package/dist/queries/similar.d.ts +21 -3
  198. package/dist/queries/similar.js +1 -1
  199. package/dist/queries/slice.d.ts +2 -2
  200. package/dist/queries/slice.js +1 -1
  201. package/dist/queries/stale-abstractions.d.ts +10 -3
  202. package/dist/queries/stale-abstractions.js +1 -1
  203. package/dist/queries/stats.d.ts +2 -2
  204. package/dist/queries/stats.js +1 -1
  205. package/dist/queries/surface.d.ts +2 -2
  206. package/dist/queries/surface.js +1 -1
  207. package/dist/queries/symbols.d.ts +2 -2
  208. package/dist/queries/symbols.js +1 -1
  209. package/dist/queries/system.d.ts +2 -2
  210. package/dist/queries/system.js +1 -1
  211. package/dist/queries/trace.d.ts +2 -2
  212. package/dist/queries/trace.js +1 -1
  213. package/dist/queries/unused-imports.d.ts +4 -0
  214. package/dist/queries/unused-imports.js +2 -0
  215. package/dist/queries/unused-params.d.ts +2 -2
  216. package/dist/queries/unused-params.js +1 -1
  217. package/dist/queries/vue-component-duplicates.d.ts +35 -0
  218. package/dist/queries/vue-component-duplicates.js +2 -0
  219. package/dist/queries/vue-composable-candidates.d.ts +40 -0
  220. package/dist/queries/vue-composable-candidates.js +2 -0
  221. package/dist/queries/vue-large-view-pressure.d.ts +37 -0
  222. package/dist/queries/vue-large-view-pressure.js +2 -0
  223. package/dist/queries/wrapper-candidates.d.ts +6 -3
  224. package/dist/queries/wrapper-candidates.js +1 -1
  225. package/dist/reindex-worker.js +10 -10
  226. package/dist/reindex.d.ts +1 -1
  227. package/dist/reindex.js +22 -22
  228. package/dist/runtime.d.ts +1 -1
  229. package/dist/runtime.js +2 -2
  230. package/docs/AGENT_GUIDE.md +353 -0
  231. package/docs/AI_FAILURE_MODES.md +278 -0
  232. package/docs/API.md +40 -0
  233. package/docs/COMMAND_REFERENCE.md +131 -0
  234. package/docs/DETECTOR_GUIDE.md +119 -0
  235. package/docs/accuracy-hardening-goal.md +54 -0
  236. package/docs/analyzer-inventory.md +162 -0
  237. package/docs/analyzer-validation-ledger.md +262 -0
  238. package/docs/analyzer-validation-protocol.md +192 -0
  239. package/docs/assets/scip-query-logo-dark.svg +21 -0
  240. package/docs/assets/scip-query-logo.svg +24 -0
  241. package/docs/locality-analyzer-design.md +193 -0
  242. package/package.json +44 -5
  243. package/skills/scip-directory-architecture/SKILL.md +178 -0
  244. package/skills/scip-maintainability/SKILL.md +24 -3
  245. package/skills/scip-query/SKILL.md +4 -2
  246. package/skills/scip-query-setup/SKILL.md +118 -0
  247. package/skills/scip-react-maintainability/SKILL.md +114 -0
  248. package/skills/scip-vue-maintainability/SKILL.md +130 -0
  249. package/dist/chunk-4DAPXOWD.js +0 -2
  250. package/dist/chunk-4JQFTUKD.js +0 -2
  251. package/dist/chunk-4MHT7LKP.js +0 -3
  252. package/dist/chunk-5OHZEO3U.js +0 -3
  253. package/dist/chunk-5QJIEYFB.js +0 -34
  254. package/dist/chunk-6IGXZZQ4.js +0 -4
  255. package/dist/chunk-6K2JQ2VI.js +0 -61
  256. package/dist/chunk-6QVCPUK6.js +0 -2
  257. package/dist/chunk-6VL4AIEO.js +0 -8
  258. package/dist/chunk-A2VTV2QB.js +0 -7
  259. package/dist/chunk-AI2ECT7L.js +0 -2
  260. package/dist/chunk-BUAC4Q4G.js +0 -2
  261. package/dist/chunk-BZ6LCGE6.js +0 -2
  262. package/dist/chunk-CMXFASVD.js +0 -2
  263. package/dist/chunk-CO3AL7NZ.js +0 -2
  264. package/dist/chunk-FVVT7GV6.js +0 -4
  265. package/dist/chunk-HXXRN77A.js +0 -2
  266. package/dist/chunk-IC3RC3KJ.js +0 -4
  267. package/dist/chunk-ITHQJZTG.js +0 -2
  268. package/dist/chunk-IW7ASGVF.js +0 -2
  269. package/dist/chunk-JODYQDE4.js +0 -2
  270. package/dist/chunk-MCW36F2D.js +0 -2
  271. package/dist/chunk-MX6F756F.js +0 -2
  272. package/dist/chunk-NGI4V4AB.js +0 -18
  273. package/dist/chunk-O6KCZPJQ.js +0 -62
  274. package/dist/chunk-OAI5GEIN.js +0 -6
  275. package/dist/chunk-OH5HIAID.js +0 -4
  276. package/dist/chunk-OXKEUWMJ.js +0 -2
  277. package/dist/chunk-PBGTMPJ7.js +0 -2
  278. package/dist/chunk-PRVDXGSK.js +0 -2
  279. package/dist/chunk-QYKKTYBN.js +0 -6
  280. package/dist/chunk-R3G6ERW7.js +0 -7
  281. package/dist/chunk-R6XDPWJA.js +0 -10
  282. package/dist/chunk-SJR4SB7B.js +0 -2
  283. package/dist/chunk-SYKCO25G.js +0 -16
  284. package/dist/chunk-T22X7WT6.js +0 -2
  285. package/dist/chunk-TH4JVC34.js +0 -71
  286. package/dist/chunk-VDY4HYNK.js +0 -2
  287. package/dist/chunk-VDZIEDJB.js +0 -2
  288. package/dist/chunk-VDZL45XI.js +0 -2
  289. package/dist/chunk-WJIS6BNI.js +0 -3
  290. package/dist/chunk-WN5Z3UVT.js +0 -7
  291. package/dist/chunk-XCW7DYHM.js +0 -2
  292. package/dist/chunk-ZF6P2NAT.js +0 -63
  293. package/dist/chunk-ZGIK464P.js +0 -2
@@ -0,0 +1,193 @@
1
+ # Locality Analyzer Design
2
+
3
+ This document designs the missing analyzer family identified during the analyzer inventory: a tool that evaluates where extracted code belongs. It is intentionally a design document, not a production implementation.
4
+
5
+ The problem shows up most clearly after React or Vue large-component work. An agent can reduce a large file by extracting components, hooks, helpers, or composables, but it may dump all of them into a flat folder beside the original file. That can make the size metric better while making ownership, reuse, and navigation worse.
6
+
7
+ ## Core Concepts
8
+
9
+ Code locality is the placement relation between a source unit and the files that use it. It concerns real files, directories, imports, consumers, tests, and package boundaries; its essential characteristic is that code belongs at the nearest stable home that all legitimate consumers can reach without making the API broader than the concept deserves.
10
+
11
+ A source unit is a file, symbol, component, hook, composable, type, or helper that the analyzer can name and trace. It is the smallest unit whose placement can be judged from references, imports, and directory structure.
12
+
13
+ A consumer set is the set of files or symbols that import, call, render, instantiate, or otherwise rely on a source unit. Its essential role is to reveal whether a unit is private to one place, shared within a feature, shared across a domain, or actually reusable across the application.
14
+
15
+ An ownership boundary is a directory, package, route, feature, domain, or module boundary that indicates who should be allowed to change a unit. It is not just a path prefix; it is the codebase's visible grouping of reasons to change.
16
+
17
+ An abstraction level is the height of a unit's meaning relative to product code. A button primitive, route panel, invoice calculation, GraphQL client, and test fixture can all be TypeScript functions or components, but they belong at different levels because they serve different kinds of callers.
18
+
19
+ A shared folder is a directory whose name or import pattern says that multiple nearby units may depend on it. Its essential risk is that it can either preserve local reuse or become a dumping ground that erases ownership.
20
+
21
+ A global shared folder is a repository-wide shared directory such as `src/shared`, `src/lib`, `src/components`, or `packages/shared`. Its essential risk is API inflation: code placed there becomes easier to depend on from anywhere, so the placement should require cross-feature or cross-package evidence.
22
+
23
+ ## Command Shape
24
+
25
+ Proposed command:
26
+
27
+ ```sh
28
+ scip-query locality-candidates [symbol-or-file]
29
+ ```
30
+
31
+ Useful options:
32
+
33
+ ```sh
34
+ scip-query locality-candidates apps/web/src/routes/HorsesView.tsx --json
35
+ scip-query locality-candidates --scope apps/web/src --since HEAD~20
36
+ scip-query locality-candidates --changed-only --base origin/main
37
+ ```
38
+
39
+ The command should be report-only at first. Its action tier is contextual signal: it guides placement and review, but it should not move files automatically.
40
+
41
+ ## Inputs
42
+
43
+ The analyzer should combine existing evidence rather than invent a separate world model.
44
+
45
+ | Input | Source | Why it matters |
46
+ | ----------------------------- | ----------------------------------------------------------------------------------- | --------------------------------------------------------------------- |
47
+ | Candidate source unit | Explicit argument, changed files, large component/view pressure, extract candidates | Chooses what placement is being judged |
48
+ | Consumer files and symbols | `refs`, `imported-by`, `rdeps`, call graph, JSX/Vue render facts | Shows who actually uses the unit |
49
+ | Current path and import path | filesystem path, import graph | Reveals whether the unit is already local, feature-shared, or global |
50
+ | Nearest common ancestor | consumer file paths | Finds the smallest directory all consumers share |
51
+ | Feature and route roots | path names such as `routes`, `pages`, `features`, `modules`, `domains` | Distinguishes product areas from generic infrastructure |
52
+ | Package or workspace boundary | package manifests, tsconfig references, workspace layout | Prevents app-local concepts from leaking into shared packages |
53
+ | Test adjacency | test file paths and references | Keeps test helpers near their tests unless production consumers exist |
54
+ | Naming evidence | source unit name, directory names, imported symbols | Distinguishes product concepts from generic primitives |
55
+ | Historical co-change | `co-change`, git history | Shows whether the unit changes with one feature or several |
56
+ | Existing local conventions | sibling folder names and import patterns | Avoids recommendations that fight the codebase's own organization |
57
+
58
+ ## Placement Tiers
59
+
60
+ | Tier | Recommendation | Strong evidence | Common mistake caught |
61
+ | ---------------------- | ------------------------------------------------------ | ----------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------ |
62
+ | `same-file` | Keep the unit in the original file. | One consumer, no independent tests, name only makes sense inside the parent. | Extracting a private branch into a needless helper file. |
63
+ | `sibling-private` | Put it next to the parent in a private local folder. | Two or more consumers under one page/component folder, no outside imports. | Creating a route-local `components` folder under global `src/components`. |
64
+ | `feature-local-shared` | Put it under the nearest feature/module shared folder. | Consumers span files in one feature root but not outside it. | Moving feature-specific hooks into app-wide `shared`. |
65
+ | `domain-shared` | Put it under a domain or bounded context folder. | Consumers cross feature roots but share domain nouns and co-change history. | Duplicating business rules in several features or over-generalizing them into `lib`. |
66
+ | `app-shared` | Put it under app-level shared UI or utility space. | Consumers cross domains inside one app and the name is generic enough for app reuse. | Keeping a genuinely reusable primitive hidden inside one feature. |
67
+ | `package-shared` | Put it in a shared workspace package. | Consumers cross package/workspace boundaries, and package API ownership is intended. | Importing across workspace internals or copying contracts between packages. |
68
+ | `no-extraction` | Do not extract, or inline it back. | One consumer, weak name, no independent concept, extraction only satisfies a size metric. | Size-score gaming through thin files and local indirection. |
69
+
70
+ The output should include confidence, reasons, counterevidence, and the exact consumer set.
71
+
72
+ ```json
73
+ {
74
+ "candidate": "apps/web/src/features/horses/HorseStatusPanel.tsx",
75
+ "currentTier": "app-shared",
76
+ "recommendedTier": "feature-local-shared",
77
+ "confidence": "medium",
78
+ "consumers": ["apps/web/src/features/horses/HorseProfile.tsx", "apps/web/src/features/horses/HorseList.tsx"],
79
+ "nearestCommonAncestor": "apps/web/src/features/horses",
80
+ "reasons": [
81
+ "all production consumers are inside one feature root",
82
+ "candidate name uses the Horses domain noun",
83
+ "no package or cross-domain consumers found"
84
+ ],
85
+ "counterevidence": ["component name is presentational enough that future app-level reuse is possible"],
86
+ "suggestedHome": "apps/web/src/features/horses/components/HorseStatusPanel.tsx"
87
+ }
88
+ ```
89
+
90
+ ## Analyzer Pairing
91
+
92
+ The locality analyzer should not replace existing analyzers. It should complete their story.
93
+
94
+ | Existing analyzer | What it says today | Locality companion question |
95
+ | ---------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------------------------------------------------------- |
96
+ | `react-large-component-pressure` | This React component is too large. | If pieces are extracted, which ones are private, feature-local, or shared? |
97
+ | `vue-large-view-pressure` | This Vue SFC is too large. | Should extracted child components/composables live beside the view, in the feature, or in app shared? |
98
+ | `extract-candidates` | This function contains a possible extraction cluster. | Would the extracted helper have one real owner or a broader consumer set? |
99
+ | `react-hook-candidates`, `vue-composable-candidates` | Several components repeat behavior. | Is the hook/composable local to one feature or reusable across domains? |
100
+ | `recent-duplicates`, `echo` | New code duplicates older code. | Which existing owner should the new code reuse, and would reuse widen the wrong API? |
101
+ | `incomplete-migration` | A helper extraction stopped halfway. | Is the helper in the right place for all remaining call sites? |
102
+ | `co-change` | Files move together historically. | Does history imply a hidden shared owner or only a local synchronization point? |
103
+
104
+ ## Algorithm Sketch
105
+
106
+ 1. Resolve the candidate to a file or symbol.
107
+ 2. Collect direct consumers through references, imports, render facts, and reverse dependencies.
108
+ 3. Remove consumers that are tests unless the candidate is test-only.
109
+ 4. Compute the nearest common ancestor of production consumers.
110
+ 5. Identify boundary markers in and above that ancestor: `app`, `apps`, `packages`, `routes`, `pages`, `features`, `modules`, `domains`, `shared`, `components`, `hooks`, `composables`, `lib`, `utils`, `services`, `stores`, and `contracts`.
111
+ 6. Classify the current home and the smallest legitimate home.
112
+ 7. Compare names from the candidate, directories, and consumers to decide whether the concept is domain-specific or generic.
113
+ 8. Check workspace/package boundaries to prevent cross-package leakage.
114
+ 9. Use co-change history as supporting evidence, not as a hard rule.
115
+ 10. Emit a recommendation only when the consumer set and boundary evidence agree.
116
+
117
+ The first implementation can avoid automatic tree moves entirely. The valuable output is a review-grade explanation: "this extracted component is global today, but all consumers are in one feature, so feature-local shared is the smallest honest home."
118
+
119
+ ## Precision Rules
120
+
121
+ The analyzer should prefer "no confident recommendation" over pretending all placement is obvious.
122
+
123
+ Report `same-file` or `no-extraction` when a candidate has one consumer and no independent concept name.
124
+
125
+ Report `sibling-private` when all consumers sit below one component, route, or view folder and no outside production import exists.
126
+
127
+ Report `feature-local-shared` when consumers share a feature root and imports do not cross into other feature roots.
128
+
129
+ Report `domain-shared` only when path names, symbol names, or co-change evidence show the same product domain across multiple feature roots.
130
+
131
+ Report `app-shared` only when consumers cross domains inside one app and the unit is not named after one feature.
132
+
133
+ Report `package-shared` only when consumers cross package boundaries and package exports make that sharing intentional.
134
+
135
+ Downrank a recommendation when imports come only through barrels, tests are the only second consumer, the candidate name is generic but behavior is domain-specific, or the nearest common ancestor is the repo root.
136
+
137
+ ## Skill-First Option
138
+
139
+ Before production implementation, this can ship as a bundled workflow skill.
140
+
141
+ Proposed skill name:
142
+
143
+ ```text
144
+ scip-locality-review
145
+ ```
146
+
147
+ The skill would tell agents to run:
148
+
149
+ ```sh
150
+ scip-query plan-context <target> --full
151
+ scip-query imported-by <symbol>
152
+ scip-query rdeps <file>
153
+ scip-query co-change <file> --full
154
+ scip-query react-large-component-pressure <scope> --full
155
+ scip-query vue-large-view-pressure <scope> --full
156
+ ```
157
+
158
+ Then it would require the agent to answer:
159
+
160
+ 1. What is the exact consumer set?
161
+ 2. What is the nearest common owner all consumers share?
162
+ 3. Is the concept product-specific, feature-specific, app-generic, or package-level?
163
+ 4. Does the current path make the API wider than the consumer set requires?
164
+ 5. Would a move reduce imports and ownership confusion without creating a new global dumping ground?
165
+
166
+ This is a good first step because it turns the product question into a repeatable checklist while we gather validation labels for the eventual command.
167
+
168
+ ## Validation Plan
169
+
170
+ Use the validation corpus from `docs/analyzer-validation-protocol.md` and track the work under `docs/analyzer-validation-ledger.md`.
171
+
172
+ For React, inspect Vega_2.0 large components and hook candidates. A true positive is a recommendation that would place an extracted unit closer to its actual consumers without hiding a real shared primitive.
173
+
174
+ For Vue, inspect Stable_Management large views and composable candidates. A true positive is a recommendation that distinguishes route-local child components from feature-level composables and app-level UI primitives.
175
+
176
+ For scip-query itself, inspect analyzer/helper extractions. A true positive is a recommendation that keeps detector-private helpers near their detector unless multiple detector families actually consume them.
177
+
178
+ For Rust smoke coverage, run the command only after SCIP data supports the same source-unit questions. Until then, locality validation on Rust should be marked unsupported rather than failed.
179
+
180
+ Validation result: `docs/validation/2026-06-21-locality-analyzer-validation-result.md` recommends a report-only or skill-first implementation, with `actionTier: "signal"` and explicit consumer-coverage caveats. React `.tsx` samples had usable `rdeps` evidence, but Vue SFC samples had weak reverse-dependency coverage, so the first implementation must not recommend concrete destinations unless exact consumers are known.
181
+
182
+ ## Score Integration
183
+
184
+ Locality findings should not immediately reduce health like dead code. They are contextual signals.
185
+
186
+ The health score can later use them as signal backlog pressure when they combine with other evidence:
187
+
188
+ - Large component pressure plus globalized local children.
189
+ - Extract candidates plus one-consumer helper files.
190
+ - Recent duplicates plus a clear existing local owner.
191
+ - Co-change clusters plus no shared owner directory.
192
+
193
+ The score should not punish a single "could be more local" suggestion. It should punish repeated evidence that code organization is being flattened until ownership is unclear.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "scip-query",
3
- "version": "0.10.0",
4
- "description": "Language-agnostic code intelligence CLI powered by SCIP indexes",
3
+ "version": "0.10.2",
4
+ "description": "Evidence and verification for AI coding agents: map code, reuse concepts, finish migrations, and gate diffs.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",
@@ -11,6 +11,8 @@
11
11
  "files": [
12
12
  "dist/**/*.js",
13
13
  "dist/**/*.d.ts",
14
+ "docs/assets/**/*",
15
+ "docs/*.md",
14
16
  "skills/**/SKILL.md"
15
17
  ],
16
18
  "sideEffects": false,
@@ -147,6 +149,10 @@
147
149
  "import": "./dist/queries/isolated.js",
148
150
  "types": "./dist/queries/isolated.d.ts"
149
151
  },
152
+ "./queries/locality-candidates": {
153
+ "import": "./dist/queries/locality-candidates.js",
154
+ "types": "./dist/queries/locality-candidates.d.ts"
155
+ },
150
156
  "./queries/members": {
151
157
  "import": "./dist/queries/members.js",
152
158
  "types": "./dist/queries/members.d.ts"
@@ -195,6 +201,30 @@
195
201
  "import": "./dist/queries/similar-files.js",
196
202
  "types": "./dist/queries/similar-files.d.ts"
197
203
  },
204
+ "./queries/react-component-duplicates": {
205
+ "import": "./dist/queries/react-component-duplicates.js",
206
+ "types": "./dist/queries/react-component-duplicates.d.ts"
207
+ },
208
+ "./queries/react-hook-candidates": {
209
+ "import": "./dist/queries/react-hook-candidates.js",
210
+ "types": "./dist/queries/react-hook-candidates.d.ts"
211
+ },
212
+ "./queries/react-large-component-pressure": {
213
+ "import": "./dist/queries/react-large-component-pressure.js",
214
+ "types": "./dist/queries/react-large-component-pressure.d.ts"
215
+ },
216
+ "./queries/vue-component-duplicates": {
217
+ "import": "./dist/queries/vue-component-duplicates.js",
218
+ "types": "./dist/queries/vue-component-duplicates.d.ts"
219
+ },
220
+ "./queries/vue-composable-candidates": {
221
+ "import": "./dist/queries/vue-composable-candidates.js",
222
+ "types": "./dist/queries/vue-composable-candidates.d.ts"
223
+ },
224
+ "./queries/vue-large-view-pressure": {
225
+ "import": "./dist/queries/vue-large-view-pressure.js",
226
+ "types": "./dist/queries/vue-large-view-pressure.d.ts"
227
+ },
198
228
  "./queries/similar-signatures": {
199
229
  "import": "./dist/queries/similar-signatures.js",
200
230
  "types": "./dist/queries/similar-signatures.d.ts"
@@ -231,6 +261,10 @@
231
261
  "import": "./dist/queries/unused-params.js",
232
262
  "types": "./dist/queries/unused-params.d.ts"
233
263
  },
264
+ "./queries/unused-imports": {
265
+ "import": "./dist/queries/unused-imports.js",
266
+ "types": "./dist/queries/unused-imports.d.ts"
267
+ },
234
268
  "./queries/wrapper-candidates": {
235
269
  "import": "./dist/queries/wrapper-candidates.js",
236
270
  "types": "./dist/queries/wrapper-candidates.d.ts"
@@ -245,14 +279,16 @@
245
279
  }
246
280
  },
247
281
  "scripts": {
248
- "build": "tsup",
282
+ "build": "node --max-old-space-size=8192 ./node_modules/tsup/dist/cli-default.js",
249
283
  "dev": "tsup --watch",
284
+ "format": "prettier --write \"{src,tests,scripts}/**/*.{ts,tsx,js,mjs,json}\" \"*.{ts,js,json}\"",
285
+ "format:check": "prettier --check \"{src,tests,scripts}/**/*.{ts,tsx,js,mjs,json}\" \"*.{ts,js,json}\"",
250
286
  "test": "vitest run",
251
287
  "test:watch": "vitest",
252
288
  "typecheck": "tsc --noEmit",
253
- "lint": "eslint src tests tsup.config.ts",
289
+ "lint": "npm run format:check && eslint src tests tsup.config.ts",
254
290
  "calibrate": "node scripts/accuracy-calibration.mjs",
255
- "docs:commands": "vite-node scripts/render-command-reference.ts",
291
+ "docs:commands": "vite-node scripts/render-command-reference.ts --write",
256
292
  "prepublishOnly": "npm run build",
257
293
  "postinstall": "node dist/postinstall.js || true"
258
294
  },
@@ -280,6 +316,8 @@
280
316
  "dependencies": {
281
317
  "@bufbuild/protobuf": "^2.11.0",
282
318
  "@c4312/scip": "^0.1.0",
319
+ "@vue/compiler-dom": "^3.5.38",
320
+ "@vue/compiler-sfc": "^3.5.38",
283
321
  "better-sqlite3": "^12.9.0",
284
322
  "commander": "^13.1.0",
285
323
  "ignore": "^7.0.3",
@@ -309,6 +347,7 @@
309
347
  "@types/node": "^22.10.0",
310
348
  "eslint": "^10.2.0",
311
349
  "globals": "^17.5.0",
350
+ "prettier": "^3.8.4",
312
351
  "tsup": "^8.3.0",
313
352
  "typescript": "^5.7.0",
314
353
  "typescript-eslint": "^8.58.1",
@@ -0,0 +1,178 @@
1
+ ---
2
+ name: scip-directory-architecture
3
+ description: Review and improve repository directory architecture with scip-query evidence. Use when the user asks to design, evaluate, reorganize, or migrate source folder structure; identify feature/module ownership boundaries; turn a messy or AI-generated codebase into clearer folders; decide whether locality boundaries are mature enough for config; or plan safe directory migrations without guessing from filenames alone.
4
+ ---
5
+
6
+ # SCIP Directory Architecture
7
+
8
+ ## Overview
9
+
10
+ Use this skill to turn source layout questions into an evidence-backed architecture review. Do not treat the current folder tree as authoritative, and do not invent an "optimal" structure without proving the ownership concepts from code, tests, docs, and dependency evidence.
11
+
12
+ A directory architecture is the filesystem arrangement of source files by their main reason to change. Its defining trait is that a maintainer can predict where a concept belongs before reading every import.
13
+
14
+ An ownership boundary is a folder, package, module, or convention that groups code around one stable responsibility. Its defining trait is that code inside the boundary should usually change for the same kind of reason.
15
+
16
+ A target structure is a proposed future folder layout for the repo or scope. Its defining trait is that it expresses the desired ownership model, not merely a prettier tree.
17
+
18
+ A migration slice is the smallest set of file moves and import updates that can be verified independently. Its defining trait is that it reduces one structural ambiguity without requiring the whole architecture to move at once.
19
+
20
+ ## Non-Negotiables
21
+
22
+ 1. Start with evidence, not taste. Refresh the index when stale, then ground claims in `scip-query` outputs plus project docs and tests.
23
+ 2. Separate review from migration. A directory architecture review may propose moves; it does not move files unless the user asked for implementation or approved a specific migration slice.
24
+ 3. Preserve working conventions. Existing boundaries are not wrong just because they are broad; central folders such as `errors`, `routes`, `workflows`, `schemas`, `contracts`, or `features` may be doing real work.
25
+ 4. Do not reward generic `shared`. A shared folder is justified only when the shared concept has a name, owner, and consumers across real boundaries.
26
+ 5. Treat messy repos honestly. If ownership concepts are not stable, produce a discovery map and decision list instead of pretending the repo has a clean target structure.
27
+ 6. Prefer small verified moves. Broad reorganizations need staged migration slices with import updates, tests, `scip-query reindex`, and `scip-query diff-gate`.
28
+
29
+ ## Workflow
30
+
31
+ ### 1. Bound the Question
32
+
33
+ Identify whether the user wants:
34
+
35
+ - a review of the existing structure;
36
+ - a proposed target structure;
37
+ - a locality config decision;
38
+ - a migration plan;
39
+ - or an actual file-moving implementation.
40
+
41
+ If the user asks for "the best folder structure," translate that into: "What ownership model is supported by this repo's code, tests, product domains, and change history?"
42
+
43
+ ### 2. Refresh and Inventory
44
+
45
+ Run:
46
+
47
+ ```bash
48
+ scip-query status
49
+ scip-query reindex
50
+ scip-query stats
51
+ find . -maxdepth 3 -type d | sort
52
+ ```
53
+
54
+ Read durable project guidance before judging structure:
55
+
56
+ ```bash
57
+ rg -n "architecture|structure|feature|module|boundary|shared|workflow|route|contract|domain|ownership" AGENTS.md README.md docs agent-os .codex -g '!node_modules'
58
+ ```
59
+
60
+ Use `rg --files` to sample real files in each important folder. Ignore generated, build, coverage, vendored, and dependency directories unless they are part of the architecture question.
61
+
62
+ ### 3. Build the Evidence Map
63
+
64
+ Use these probes as evidence, not as verdicts:
65
+
66
+ ```bash
67
+ scip-query system <scope>
68
+ scip-query files <pattern>
69
+ scip-query surface <scope>
70
+ scip-query deps <file>
71
+ scip-query rdeps <file>
72
+ scip-query change-surface <file>
73
+ scip-query plan-context <file-or-symbol>
74
+ scip-query locality-candidates --json --full
75
+ scip-query cycles
76
+ scip-query co-change
77
+ scip-query similar-files --min-similarity 0.6 --min-deps 3
78
+ scip-query similar-chains --min-similarity 0.5
79
+ scip-query recent-duplicates
80
+ scip-query drift
81
+ ```
82
+
83
+ For each folder under review, record:
84
+
85
+ - real-world concept or product area represented by the folder;
86
+ - public exports, entry points, routes, commands, or package surfaces;
87
+ - main consumers and cross-boundary consumers;
88
+ - tests that define the folder's behavior;
89
+ - co-change partners and repeated edit patterns;
90
+ - duplicated or parallel folder patterns;
91
+ - docs or standards that claim ownership rules.
92
+
93
+ ### 4. Classify Boundary Maturity
94
+
95
+ Classify each candidate folder:
96
+
97
+ - Mature: repeated, documented, and enforced by imports, tests, routes, packages, standards, or review history.
98
+ - Emerging: meaningful and partly repeated, but not yet consistent enough to configure or enforce.
99
+ - Accidental: a convenience bucket, legacy pile, generated artifact, recent edit cluster, or mixed folder with unrelated reasons to change.
100
+
101
+ A slop codebase is a codebase whose files are arranged by accident, convenience, or recent edits rather than stable ownership rules. Its defining trait is that directory names do not reliably predict where code should live. For this case, stop at discovery and decision prompts unless the user explicitly asks for a first migration slice.
102
+
103
+ ### 5. Propose the Target Structure
104
+
105
+ Produce an architecture proposal with this shape:
106
+
107
+ ````markdown
108
+ # Directory Architecture Review
109
+
110
+ ## Scope
111
+ ## Current Structure Map
112
+ ## Boundary Maturity
113
+
114
+ | Boundary | Evidence | Maturity | Judgment |
115
+ | --- | --- | --- | --- |
116
+
117
+ ## Target Structure
118
+
119
+ ```text
120
+ src/
121
+ ...
122
+ ```
123
+
124
+ ## Move Ledger
125
+
126
+ | Slice | Current files | Proposed home | Why | Verification |
127
+ | --- | --- | --- | --- | --- |
128
+
129
+ ## Locality Config
130
+ ## Deferred Decisions
131
+ ## Migration Order
132
+ ````
133
+
134
+ The target structure should name ownership concepts, not just folder labels. Prefer existing names when they already carry meaning. Introduce a new folder only when it removes ambiguity for multiple files or consumers.
135
+
136
+ ### 6. Decide What Not to Move
137
+
138
+ Explicitly list no-move decisions when:
139
+
140
+ - a broad consumer set proves a central boundary is useful;
141
+ - a folder is route-facing, package-facing, or contract-facing;
142
+ - consumers cross boundaries because the concept is infrastructure;
143
+ - moving would hide a domain-specific concept under generic `shared`;
144
+ - the evidence is too weak and needs a human ownership decision.
145
+
146
+ ### 7. Implement Only a Migration Slice
147
+
148
+ When the user asks to proceed, pick the smallest high-confidence slice. Before editing, state:
149
+
150
+ - files to move;
151
+ - imports/exports/tests/docs to update;
152
+ - expected verification commands;
153
+ - rollback risk.
154
+
155
+ Then move files with normal filesystem tools, update imports with project tooling where available, and run:
156
+
157
+ ```bash
158
+ scip-query reindex
159
+ scip-query incomplete-migration
160
+ scip-query recent-duplicates
161
+ scip-query co-change <moved-file-or-config>
162
+ scip-query diff-gate
163
+ ```
164
+
165
+ Also run the repo's normal tests or typecheck for the affected workspace. If the migration adds or changes `.scipquery.json` locality settings, run:
166
+
167
+ ```bash
168
+ scip-query config-validate
169
+ scip-query locality-candidates --json --full
170
+ ```
171
+
172
+ ## Output Rules
173
+
174
+ - Lead with findings and judgments, not command transcripts.
175
+ - Every proposed boundary needs evidence from at least two independent signals or a clear note that it is only a candidate.
176
+ - Every proposed move needs a verification path.
177
+ - For messy repos, output "discovery mode" and decision questions instead of a fake complete architecture.
178
+ - For implementation, never batch unrelated folder moves just because they fit the same target structure.
@@ -1,8 +1,7 @@
1
1
  ---
2
2
  name: scip-maintainability
3
- description: Principled maintainability review using scip-query. Finds hidden policies, scattered concepts, accidental variation, weak boundaries, and system-compression opportunities, then proposes or executes structural improvements without chasing health scores.
3
+ description: Principled maintainability review using scip-query. Finds hidden policies, scattered concepts, accidental variation, weak boundaries, and system-compression opportunities, then proposes or executes structural improvements and verifies post-change wiring without chasing health scores.
4
4
  allowed-tools: [Bash, Write, Edit, Glob, Agent, TaskCreate, TaskUpdate, TaskGet, TaskList]
5
- keywords: [maintainability, architecture, compression, simplify, principal, staff, smell, hidden-policy, concept-boundary, accidental-variation, refactor]
6
5
  ---
7
6
 
8
7
  # SCIP Maintainability Review
@@ -244,12 +243,34 @@ scip-query passthrough-candidates
244
243
  scip-query similar-files
245
244
  ```
246
245
 
246
+ Then run the post-change checks that match what the fix actually did:
247
+
248
+ | Change made | Required post-check |
249
+ | --- | --- |
250
+ | Extracted a helper, hook, composable, component logic, or named abstraction | `scip-query incomplete-migration`; migrate every unchanged site that still contains the extracted logic or document essential variation |
251
+ | Added a new helper, module, component, hook, or composable | `scip-query similar <new-symbol>` when symbol-like, plus `scip-query recent-duplicates --full`; delete echoes of established code |
252
+ | Consolidated duplicated files, command handlers, adapters, or workflows | rerun the detector that motivated the change: `similar-files`, `similar-chains`, `wrapper-candidates`, `passthrough-candidates`, frontend duplicate commands, or `health` |
253
+ | Added parameters, options, config flags, props, or broad option objects | `scip-query unused-params`; remove speculative inputs that no body uses |
254
+ | Added a wrapper, adapter, facade, re-export, or forwarding layer | `scip-query wrapper-candidates`, `scip-query passthrough-candidates`, and `scip-query redundant-reexports` when exports changed |
255
+ | Added an interface, base class, type alias, or abstraction boundary | `scip-query stale-abstractions --include-low-confidence`; prove the abstraction has real consumers and policy |
256
+ | Changed schema, config, generated files, command descriptors, package surface, or docs-backed behavior | `scip-query co-change <file>` and `scip-query doc-drift`; update historical partners and stale docs |
257
+ | Deleted code | `scip-query cleanup-plan --verify`; take the compiler-proven cascade or explain why not |
258
+
259
+ Always finish implemented maintainability work with:
260
+
261
+ ```bash
262
+ scip-query diff-impact
263
+ scip-query reindex && scip-query diff-gate
264
+ ```
265
+
266
+ Treat `diff-gate` findings as unfinished work. Fix them or state a concrete acceptance reason; do not silently report success.
267
+
247
268
  Report:
248
269
 
249
270
  - the named smell addressed
250
271
  - the mechanism introduced, deleted, or simplified
251
272
  - what was deliberately not compressed
252
- - verification results
273
+ - verification results, including the post-change checks that matched the edit
253
274
  - commit hash, when committed
254
275
 
255
276
  ---
@@ -2,7 +2,6 @@
2
2
  name: scip-query
3
3
  description: Router for codebase work in scip-query-indexed projects. Use whenever exploring, planning, implementing, refactoring, extracting helpers, verifying changes, hunting duplication or bloat, fixing stale docs, or cleaning up after an AI coding session — or when unsure which scip-* skill applies. Picks the right specialist skill and the commands that must run for each phase of work.
4
4
  allowed-tools: [Bash, Skill]
5
- keywords: [scip, codebase, explore, plan, implement, refactor, extract, verify, check-work, cleanup, duplication, bloat, drift, route, which-skill]
6
5
  ---
7
6
 
8
7
  # scip-query Router
@@ -38,7 +37,10 @@ When the user asks you to build, change, or fix something non-trivial:
38
37
  | Find dead code, duplication, or structural bloat | `scip-debloat` | `scip-query health` |
39
38
  | Clean up after AI-assisted coding sessions | `scip-ai-cleanup` | `scip-query recent-duplicates`, `scip-query incomplete-migration` |
40
39
  | Reconcile docs/standards that drifted from the code | `scip-doc-reconcile` | `scip-query doc-drift <doc>` |
41
- | Review architecture, boundaries, hidden policies | `scip-maintainability` | `scip-query bottlenecks`, `scip-query coupling` |
40
+ | Review or redesign source folder structure and ownership boundaries | `scip-directory-architecture` | `scip-query locality-candidates --json --full`, `scip-query similar-files --full` |
41
+ | Review architecture, hidden policies, weak boundaries beyond folder structure | `scip-maintainability` | `scip-query bottlenecks`, `scip-query coupling` |
42
+ | Review React frontend reuse, components, hooks, or TSX/JSX maintainability | `scip-react-maintainability` | `scip-query react-component-duplicates --full`, `scip-query react-hook-candidates --full` |
43
+ | Review Vue frontend reuse, SFCs, templates, or composables | `scip-vue-maintainability` | `scip-query vue-component-duplicates --full`, `scip-query vue-composable-candidates --full` |
42
44
 
43
45
  Invoke skills by name (Skill tool or slash command). If skill invocation is
44
46
  unavailable in this harness, read `~/.agents/skills/<name>/SKILL.md` and