scip-query 0.20.0 → 0.21.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.
- package/CHANGELOG.md +69 -0
- package/README.md +255 -884
- package/dist/augment-vue-worker.js +1 -1
- package/dist/by-kind-CI3O6PQG.js +2 -0
- package/dist/call-graph-6QTUTXH7.js +2 -0
- package/dist/call-graph-evidence-lZa2dwQA.d.ts +11 -0
- package/dist/change-analysis-types-CCtoCHbC.d.ts +9 -0
- package/dist/chunk-26CT72HM.js +2 -0
- package/dist/{chunk-7PIO7NKH.js → chunk-2COFMIVK.js} +2 -2
- package/dist/chunk-2H4IAJHO.js +2 -0
- package/dist/chunk-2I3RSUWX.js +16 -0
- package/dist/chunk-2RP27XLR.js +2 -0
- package/dist/chunk-2ZBMOQGG.js +3 -0
- package/dist/{chunk-HX4GQPZP.js → chunk-32A42O5B.js} +3 -3
- package/dist/chunk-35ELD3RM.js +2 -0
- package/dist/chunk-35IW3P4H.js +2 -0
- package/dist/{chunk-DQGFVPUV.js → chunk-3653GTR7.js} +3 -3
- package/dist/chunk-3EX7DNBC.js +2 -0
- package/dist/chunk-3FQ3KMCD.js +2 -0
- package/dist/{chunk-5E4WNAVD.js → chunk-3PII3JI5.js} +2 -2
- package/dist/chunk-3TNRNKAT.js +2 -0
- package/dist/chunk-3VLJ2DCA.js +2 -0
- package/dist/{chunk-XSRF6Q77.js → chunk-46JLFIGA.js} +2 -2
- package/dist/chunk-4DCKBY6T.js +5 -0
- package/dist/chunk-4EXFZP6H.js +2 -0
- package/dist/chunk-4IIMPWMR.js +29 -0
- package/dist/chunk-4ILHWBYF.js +2 -0
- package/dist/chunk-4N6QSEMZ.js +10 -0
- package/dist/chunk-4OE2JO6I.js +2 -0
- package/dist/{chunk-7BAVHKMJ.js → chunk-4S4DF62J.js} +9 -9
- package/dist/chunk-4UUCUASK.js +554 -0
- package/dist/chunk-5236NQV3.js +2 -0
- package/dist/chunk-54EOGFBR.js +2 -0
- package/dist/{chunk-LY4WC4AD.js → chunk-5H7IWVXJ.js} +2 -2
- package/dist/chunk-5IZTXSOL.js +117 -0
- package/dist/{chunk-AZJQQKDD.js → chunk-5SE323LF.js} +2 -2
- package/dist/chunk-5ZJH6DDE.js +2 -0
- package/dist/chunk-63MBA7EG.js +3 -0
- package/dist/chunk-6BJ7SOY7.js +2 -0
- package/dist/chunk-6GJAP4OE.js +2 -0
- package/dist/chunk-6IEVHGWG.js +26 -0
- package/dist/chunk-6SWA6B24.js +7 -0
- package/dist/chunk-6T7H2AFY.js +3 -0
- package/dist/chunk-73Z33VFI.js +4 -0
- package/dist/chunk-7COHFNJK.js +38 -0
- package/dist/chunk-7HU2IJ2T.js +3 -0
- package/dist/chunk-7IOAZRVL.js +60 -0
- package/dist/chunk-7KCZELVM.js +2 -0
- package/dist/chunk-7PPYXENX.js +2 -0
- package/dist/chunk-7TWP3MCP.js +2 -0
- package/dist/chunk-AA7K3XLM.js +21 -0
- package/dist/chunk-AJVMVE7X.js +7 -0
- package/dist/chunk-ANWGXPPN.js +4 -0
- package/dist/chunk-APLKXICZ.js +3 -0
- package/dist/{chunk-JDOEX4E6.js → chunk-AQDWTCDC.js} +2 -2
- package/dist/chunk-AUP6YI5M.js +2 -0
- package/dist/chunk-B7ECWJAZ.js +2 -0
- package/dist/{chunk-ZHXX42OH.js → chunk-BATIVRU2.js} +4 -4
- package/dist/chunk-BBEDPVPB.js +4 -0
- package/dist/chunk-BBWPOMGU.js +2 -0
- package/dist/chunk-BD6CV7PN.js +2 -0
- package/dist/{chunk-XKWKXZKW.js → chunk-BHE44MHT.js} +2 -2
- package/dist/chunk-BOJ5SVE2.js +2 -0
- package/dist/chunk-BZYSGZRK.js +2 -0
- package/dist/chunk-CA5RE6H7.js +2 -0
- package/dist/chunk-CKDOY6JA.js +2 -0
- package/dist/chunk-CN2WGM7D.js +2 -0
- package/dist/chunk-COTMS5KM.js +3 -0
- package/dist/chunk-CSDDOUA4.js +3 -0
- package/dist/chunk-CT5SI2I4.js +2 -0
- package/dist/chunk-D5EKVZPI.js +2 -0
- package/dist/{chunk-FKSELJQF.js → chunk-D5W4UZY5.js} +2 -2
- package/dist/{chunk-RUJURYSV.js → chunk-DEUGHURX.js} +2 -2
- package/dist/chunk-DHKBIOXF.js +7 -0
- package/dist/chunk-DMQ7ZKJG.js +81 -0
- package/dist/chunk-DMUGTKMD.js +2 -0
- package/dist/chunk-DOPCR5BY.js +2 -0
- package/dist/chunk-DRENNWRG.js +2 -0
- package/dist/chunk-E4EJBGDZ.js +2 -0
- package/dist/chunk-E7BJXRNV.js +2 -0
- package/dist/chunk-EA4SH4U5.js +5 -0
- package/dist/{chunk-L7AW2QB5.js → chunk-EKZRF57O.js} +2 -2
- package/dist/chunk-ELNRLMC5.js +29 -0
- package/dist/chunk-F4FNK44D.js +2 -0
- package/dist/chunk-F7WQ337U.js +308 -0
- package/dist/chunk-FEQIQ26E.js +2 -0
- package/dist/chunk-FGB567HK.js +23 -0
- package/dist/chunk-FHV7NMFU.js +29 -0
- package/dist/chunk-FN6EJM6Q.js +2 -0
- package/dist/chunk-FTSQNONX.js +2 -0
- package/dist/chunk-FUG6RPYY.js +6 -0
- package/dist/chunk-G2F6T5BV.js +2 -0
- package/dist/chunk-G6OGPXJW.js +9 -0
- package/dist/chunk-GFLTPNWV.js +3 -0
- package/dist/chunk-GTDP2SKQ.js +2 -0
- package/dist/chunk-H46QMB7E.js +2 -0
- package/dist/chunk-H5EXS3HM.js +2 -0
- package/dist/chunk-HEOMG7IM.js +8 -0
- package/dist/chunk-HG5YI7PV.js +2 -0
- package/dist/{chunk-7SQQWSY3.js → chunk-HGKEAP7F.js} +2 -2
- package/dist/chunk-HUZNZ3H2.js +2 -0
- package/dist/chunk-HWLCBKFE.js +2 -0
- package/dist/chunk-I3U2FN2T.js +13 -0
- package/dist/{chunk-JAYYFEQY.js → chunk-I7PFL5P3.js} +2 -2
- package/dist/{chunk-2HPVVXM5.js → chunk-ICHBVITH.js} +2 -2
- package/dist/chunk-ICUQONOG.js +38 -0
- package/dist/chunk-IDPLC3FI.js +5 -0
- package/dist/{chunk-A73XVBCR.js → chunk-IGKKTHJR.js} +2 -2
- package/dist/chunk-IOKWFRFQ.js +4 -0
- package/dist/chunk-IPAL6DP2.js +3 -0
- package/dist/chunk-IUJ3ZFEE.js +7 -0
- package/dist/chunk-IXJ26KJJ.js +16 -0
- package/dist/chunk-IYV2YBHM.js +2 -0
- package/dist/chunk-JVZNWJBH.js +2 -0
- package/dist/chunk-K5MZYZV7.js +3 -0
- package/dist/{chunk-3G66UZBH.js → chunk-KFK7GF5C.js} +2 -2
- package/dist/chunk-KTRGJLY7.js +18 -0
- package/dist/chunk-KW6B5OL4.js +2 -0
- package/dist/chunk-KWARB5FZ.js +2 -0
- package/dist/chunk-LHTT5C3Z.js +2 -0
- package/dist/chunk-LPGDO2XA.js +3 -0
- package/dist/chunk-LXLD46LH.js +21 -0
- package/dist/chunk-MEI3PTUK.js +2 -0
- package/dist/chunk-MJNV7OCG.js +5 -0
- package/dist/chunk-MO226P4Q.js +4 -0
- package/dist/{chunk-3CLX5EOX.js → chunk-MOBF2GH6.js} +2 -2
- package/dist/chunk-MXNGIEPU.js +3 -0
- package/dist/chunk-MYUKI5VN.js +4 -0
- package/dist/{chunk-TFRAYKN6.js → chunk-N5C65OFK.js} +2 -2
- package/dist/{chunk-PXY7F6Y4.js → chunk-O2RM7E7L.js} +5 -5
- package/dist/chunk-OFUBXBYX.js +3 -0
- package/dist/chunk-OFY4HTMI.js +2 -0
- package/dist/chunk-OIRWZIYL.js +38 -0
- package/dist/chunk-OIVZ7PW6.js +438 -0
- package/dist/chunk-ORBKAUCH.js +4 -0
- package/dist/chunk-OUB4J26T.js +2 -0
- package/dist/chunk-OVPS2ILI.js +20 -0
- package/dist/chunk-PHSPBQM6.js +5 -0
- package/dist/{chunk-JVYA47YU.js → chunk-PIZY2GX6.js} +2 -2
- package/dist/chunk-PNISDVYC.js +3 -0
- package/dist/chunk-PQOL42AW.js +2 -0
- package/dist/chunk-PUVZNFVY.js +11 -0
- package/dist/chunk-PZEI2TVL.js +4 -0
- package/dist/{chunk-ZK26BAQL.js → chunk-Q2J2VZZT.js} +2 -2
- package/dist/chunk-Q7HB7BFJ.js +2 -0
- package/dist/{chunk-ZTETIQ35.js → chunk-QBANU5BQ.js} +2 -2
- package/dist/chunk-QD7IFBCR.js +10 -0
- package/dist/chunk-QDCCHMVZ.js +2 -0
- package/dist/chunk-QLQBZOJH.js +3 -0
- package/dist/{chunk-PQCI4SQX.js → chunk-QXR5QPSF.js} +2 -2
- package/dist/chunk-R2MOKIVO.js +2 -0
- package/dist/{chunk-EN3O7VJA.js → chunk-RFWAUHVW.js} +2 -2
- package/dist/chunk-RGCJ4646.js +16 -0
- package/dist/{chunk-BPAPWKP6.js → chunk-S3RTPPLQ.js} +8 -8
- package/dist/chunk-S73HBCGI.js +11 -0
- package/dist/chunk-SDPA5DKN.js +210 -0
- package/dist/chunk-SEUJVWT2.js +3 -0
- package/dist/chunk-SF7X6QNW.js +2 -0
- package/dist/chunk-SKUMCCC5.js +2 -0
- package/dist/chunk-SSSJO4RG.js +2 -0
- package/dist/chunk-SWFAFA4G.js +49 -0
- package/dist/chunk-SYUNTKO2.js +2 -0
- package/dist/chunk-T6FRID7Y.js +3 -0
- package/dist/chunk-TGWNNMPF.js +3 -0
- package/dist/chunk-TM5XEDDR.js +4 -0
- package/dist/chunk-TNOHGHZQ.js +2 -0
- package/dist/chunk-U2GPTA5U.js +3 -0
- package/dist/{chunk-SXP2MBJH.js → chunk-U7DR7MJD.js} +2 -2
- package/dist/chunk-U7LRSQG6.js +3 -0
- package/dist/chunk-UL4VJUMD.js +2 -0
- package/dist/chunk-UNORWZIJ.js +16 -0
- package/dist/chunk-UQ7XPRWU.js +2 -0
- package/dist/{chunk-6SHPK5ZE.js → chunk-URMZLV2N.js} +2 -2
- package/dist/chunk-URTX2BEA.js +6 -0
- package/dist/chunk-UZFCZ7SJ.js +2 -0
- package/dist/{chunk-KMKTIO2G.js → chunk-V7LQZTTZ.js} +2 -2
- package/dist/chunk-VETXXOYU.js +3 -0
- package/dist/chunk-VGRUM7JI.js +3 -0
- package/dist/{chunk-WXZLAAWK.js → chunk-VNKYRJKN.js} +2 -2
- package/dist/chunk-VWLIOEEF.js +11 -0
- package/dist/chunk-WB6LGCFB.js +6 -0
- package/dist/{chunk-W4ETQAXM.js → chunk-WK4FD4PG.js} +2 -2
- package/dist/{chunk-O64IZ6UX.js → chunk-WKPZCQLI.js} +2 -2
- package/dist/chunk-WSG3DK5H.js +2 -0
- package/dist/chunk-WULAPQUD.js +38 -0
- package/dist/chunk-WZQFY5S7.js +4 -0
- package/dist/chunk-X434XZAI.js +2 -0
- package/dist/chunk-X7PJJYKX.js +29 -0
- package/dist/chunk-XDAUYDFT.js +2 -0
- package/dist/chunk-XITQLISP.js +2 -0
- package/dist/chunk-XRXCANFQ.js +4 -0
- package/dist/chunk-XVDMJMES.js +3 -0
- package/dist/chunk-XXJ7WL3F.js +35 -0
- package/dist/chunk-Y4XQ7LES.js +9 -0
- package/dist/chunk-YIEFEPG6.js +16 -0
- package/dist/chunk-YRVERHJR.js +49 -0
- package/dist/{chunk-CJST5ETY.js → chunk-YUFWLWIC.js} +2 -2
- package/dist/chunk-YUKYB54I.js +1 -0
- package/dist/chunk-Z3GCK3PD.js +3 -0
- package/dist/chunk-ZBNL3QCY.js +4 -0
- package/dist/chunk-ZD3Z54IW.js +2 -0
- package/dist/chunk-ZDVDSDFG.js +4 -0
- package/dist/{chunk-32LVLCLN.js → chunk-ZHSARYVS.js} +3 -3
- package/dist/{chunk-BDCC2NPY.js → chunk-ZW44MCJM.js} +2 -2
- package/dist/{chunk-N5W4YZMK.js → chunk-ZYREOING.js} +2 -2
- package/dist/cli-main.js +8 -0
- package/dist/cli.js +1 -3
- package/dist/code-CczEvHui.d.ts +121 -0
- package/dist/code-EQL6ZBLH.js +2 -0
- package/dist/code-result-json-6E4J6LGZ.js +2 -0
- package/dist/command-descriptors-QH3G2OVD.js +346 -0
- package/dist/{config-types-jVM3D7MA.d.ts → config-types-Cm-VSEBb.d.ts} +189 -23
- package/dist/dataflow-2BLMUZBP.js +2 -0
- package/dist/{db-B5PM5yNk.d.ts → db-LKJXAlNS.d.ts} +1 -1
- package/dist/dependence-slice-MGAJDZXB.js +2 -0
- package/dist/deps-GQMUYVKW.js +2 -0
- package/dist/direct-navigation-6RUJKLAV.js +3 -0
- package/dist/entry-map-V2NQP5JU.js +2 -0
- package/dist/exploration-topology-BG4v30HZ.d.ts +256 -0
- package/dist/file-dep-graph-Bqg3t3Px.d.ts +4 -0
- package/dist/file-kind-BKCVMNUf.d.ts +10 -0
- package/dist/files-VM53I4IU.js +2 -0
- package/dist/graph-evidence-CbUPCSKV.d.ts +126 -0
- package/dist/graph-exploration-contract-CqDsnPQL.d.ts +7 -0
- package/dist/{health-Do5TKSJI.d.ts → health-Wl5G_LRt.d.ts} +33 -34
- package/dist/hierarchy-D553WRSZ.js +2 -0
- package/dist/imports-DOZAJWLW.js +2 -0
- package/dist/index.d.ts +4 -31
- package/dist/index.js +1 -1
- package/dist/members-HE67475K.js +2 -0
- package/dist/methods-K5JK4PPH.js +2 -0
- package/dist/next-anchor-candidates-BwMczMvX.d.ts +90 -0
- package/dist/output-continuation-command-LKBUTNRL.js +3 -0
- package/dist/output-pagination-VAWOGX4R.js +19 -0
- package/dist/postinstall.js +1 -1
- package/dist/project-reindex-4ARU6QCM.js +3 -0
- package/dist/queries/affected.d.ts +22 -4
- package/dist/queries/affected.js +1 -1
- package/dist/queries/anchors.d.ts +123 -0
- package/dist/queries/anchors.js +2 -0
- package/dist/queries/architecture.d.ts +3 -2
- package/dist/queries/architecture.js +1 -1
- package/dist/queries/bottlenecks.d.ts +26 -7
- package/dist/queries/bottlenecks.js +1 -1
- package/dist/queries/by-kind.d.ts +2 -2
- package/dist/queries/by-kind.js +1 -1
- package/dist/queries/call-graph.d.ts +17 -3
- package/dist/queries/call-graph.js +1 -1
- package/dist/queries/change-surface.d.ts +2 -2
- package/dist/queries/change-surface.js +1 -1
- package/dist/queries/cleanup-plan.d.ts +2 -2
- package/dist/queries/cleanup-plan.js +1 -1
- package/dist/queries/co-change.d.ts +2 -2
- package/dist/queries/co-change.js +1 -1
- package/dist/queries/code.d.ts +5 -26
- package/dist/queries/code.js +1 -1
- package/dist/queries/complexity-hotspots.d.ts +2 -2
- package/dist/queries/complexity-hotspots.js +1 -1
- package/dist/queries/complexity.d.ts +2 -2
- package/dist/queries/complexity.js +1 -1
- package/dist/queries/context.d.ts +145 -0
- package/dist/queries/context.js +2 -0
- package/dist/queries/convergence.d.ts +2 -2
- package/dist/queries/convergence.js +1 -1
- package/dist/queries/coupling.d.ts +8 -3
- package/dist/queries/coupling.js +1 -1
- package/dist/queries/cycles.d.ts +34 -7
- package/dist/queries/cycles.js +1 -1
- package/dist/queries/dataflow.d.ts +40 -14
- package/dist/queries/dataflow.js +1 -1
- package/dist/queries/dead.d.ts +2 -2
- package/dist/queries/dead.js +1 -1
- package/dist/queries/decorative-checkers.d.ts +3 -3
- package/dist/queries/decorative-checkers.js +1 -1
- package/dist/queries/deep-chains.d.ts +4 -38
- package/dist/queries/deep-chains.js +1 -1
- package/dist/queries/dependence-slice.d.ts +47 -0
- package/dist/queries/dependence-slice.js +2 -0
- package/dist/queries/dependency-depth.d.ts +49 -0
- package/dist/queries/dependency-depth.js +2 -0
- package/dist/queries/deps.d.ts +4 -2
- package/dist/queries/deps.js +1 -1
- package/dist/queries/diff-impact.d.ts +3 -3
- package/dist/queries/diff-impact.js +1 -1
- package/dist/queries/doc-drift.d.ts +4 -4
- package/dist/queries/doc-drift.js +1 -1
- package/dist/queries/drift.d.ts +2 -2
- package/dist/queries/drift.js +1 -1
- package/dist/queries/duplicate-bodies.d.ts +2 -2
- package/dist/queries/duplicate-bodies.js +1 -1
- package/dist/queries/entry-map.d.ts +121 -0
- package/dist/queries/entry-map.js +2 -0
- package/dist/queries/evidence.d.ts +70 -0
- package/dist/queries/evidence.js +2 -0
- package/dist/queries/extract-candidates.d.ts +2 -2
- package/dist/queries/extract-candidates.js +1 -1
- package/dist/queries/fan.d.ts +18 -5
- package/dist/queries/fan.js +1 -1
- package/dist/queries/files.d.ts +2 -2
- package/dist/queries/files.js +1 -1
- package/dist/queries/health.d.ts +4 -3
- package/dist/queries/health.js +1 -1
- package/dist/queries/hierarchy.d.ts +5 -3
- package/dist/queries/hierarchy.js +1 -1
- package/dist/queries/hotspots.d.ts +11 -5
- package/dist/queries/hotspots.js +1 -1
- package/dist/queries/imports.d.ts +2 -2
- package/dist/queries/imports.js +1 -1
- package/dist/queries/incomplete-migration.d.ts +4 -4
- package/dist/queries/incomplete-migration.js +1 -1
- package/dist/queries/index.d.ts +56 -136
- package/dist/queries/index.js +1 -1
- package/dist/queries/isolated.d.ts +2 -2
- package/dist/queries/isolated.js +1 -1
- package/dist/queries/locality-candidates.d.ts +2 -2
- package/dist/queries/locality-candidates.js +1 -1
- package/dist/queries/members.d.ts +2 -2
- package/dist/queries/members.js +1 -1
- package/dist/queries/methods.d.ts +2 -2
- package/dist/queries/methods.js +1 -1
- package/dist/queries/not-implemented.d.ts +3 -3
- package/dist/queries/not-implemented.js +1 -1
- package/dist/queries/outline.d.ts +2 -2
- package/dist/queries/outline.js +1 -1
- package/dist/queries/passthrough-candidates.d.ts +5 -9
- package/dist/queries/passthrough-candidates.js +1 -1
- package/dist/queries/plan-context.d.ts +27 -64
- package/dist/queries/plan-context.js +1 -1
- package/dist/queries/react-component-duplicates.d.ts +2 -2
- package/dist/queries/react-component-duplicates.js +1 -1
- package/dist/queries/react-hook-candidates.d.ts +2 -2
- package/dist/queries/react-hook-candidates.js +1 -1
- package/dist/queries/react-large-component-pressure.d.ts +2 -2
- package/dist/queries/react-large-component-pressure.js +1 -1
- package/dist/queries/recent-duplicates.d.ts +2 -2
- package/dist/queries/recent-duplicates.js +1 -1
- package/dist/queries/redundant-reexports.d.ts +2 -2
- package/dist/queries/redundant-reexports.js +1 -1
- package/dist/queries/reference-neighborhood.d.ts +4 -0
- package/dist/queries/reference-neighborhood.js +2 -0
- package/dist/queries/reference-reachability.d.ts +48 -0
- package/dist/queries/reference-reachability.js +2 -0
- package/dist/queries/refs.d.ts +2 -2
- package/dist/queries/refs.js +1 -1
- package/dist/queries/self-audit.d.ts +2 -2
- package/dist/queries/self-audit.js +1 -1
- package/dist/queries/similar-chains.d.ts +2 -2
- package/dist/queries/similar-chains.js +1 -1
- package/dist/queries/similar-files.d.ts +2 -2
- package/dist/queries/similar-files.js +1 -1
- package/dist/queries/similar-signatures.d.ts +2 -2
- package/dist/queries/similar-signatures.js +1 -1
- package/dist/queries/similar.d.ts +2 -2
- package/dist/queries/similar.js +1 -1
- package/dist/queries/slice.d.ts +3 -36
- package/dist/queries/slice.js +1 -1
- package/dist/queries/source-inspection.d.ts +209 -0
- package/dist/queries/source-inspection.js +2 -0
- package/dist/queries/source-search.d.ts +13 -0
- package/dist/queries/source-search.js +2 -0
- package/dist/queries/stale-abstractions.d.ts +2 -2
- package/dist/queries/stale-abstractions.js +1 -1
- package/dist/queries/stats.d.ts +2 -2
- package/dist/queries/surface.d.ts +13 -4
- package/dist/queries/surface.js +1 -1
- package/dist/queries/symbols.d.ts +2 -2
- package/dist/queries/symbols.js +1 -1
- package/dist/queries/system-map.d.ts +449 -0
- package/dist/queries/system-map.js +2 -0
- package/dist/queries/system.d.ts +5 -3
- package/dist/queries/system.js +1 -1
- package/dist/queries/test-quality.d.ts +2 -2
- package/dist/queries/test-quality.js +1 -1
- package/dist/queries/trace.d.ts +47 -3
- package/dist/queries/trace.js +1 -1
- package/dist/queries/twin-ab.d.ts +3 -3
- package/dist/queries/twin-ab.js +1 -1
- package/dist/queries/twin-drift.d.ts +3 -3
- package/dist/queries/twin-drift.js +1 -1
- package/dist/queries/unused-imports.d.ts +2 -2
- package/dist/queries/unused-imports.js +1 -1
- package/dist/queries/unused-params.d.ts +2 -2
- package/dist/queries/unused-params.js +1 -1
- package/dist/queries/value-flow.d.ts +43 -0
- package/dist/queries/value-flow.js +2 -0
- package/dist/queries/vue-component-duplicates.d.ts +2 -2
- package/dist/queries/vue-component-duplicates.js +1 -1
- package/dist/queries/vue-composable-candidates.d.ts +2 -2
- package/dist/queries/vue-composable-candidates.js +1 -1
- package/dist/queries/vue-large-view-pressure.d.ts +2 -2
- package/dist/queries/vue-large-view-pressure.js +1 -1
- package/dist/queries/wrapper-candidates.d.ts +2 -2
- package/dist/queries/wrapper-candidates.js +1 -1
- package/dist/query-service-fastpath.js +6 -0
- package/dist/query-service-server.js +5 -0
- package/dist/refs-NBHKL4UQ.js +2 -0
- package/dist/refs-pagination-BBVTIHMH.js +2 -0
- package/dist/reindex-worker.js +27 -45
- package/dist/reindex.d.ts +62 -42
- package/dist/reindex.js +32 -33
- package/dist/repository-text-C0Q8VYdN.d.ts +19 -0
- package/dist/runtime.d.ts +286 -7
- package/dist/runtime.js +4 -3
- package/dist/rust-semantic-session-server.js +1 -1
- package/dist/rust-semantic-session-worker.js +1 -1
- package/dist/rust-semantic-worker.js +1 -1
- package/dist/{scip-cli-BnEwZRLJ.d.ts → scip-cli-CppzF5MK.d.ts} +33 -2
- package/dist/slice-U6S6LBSB.js +2 -0
- package/dist/source-search-types-Dwz8KeuW.d.ts +79 -0
- package/dist/source-snippet-_wrcgmZc.d.ts +15 -0
- package/dist/stats-OOJ74B32.js +2 -0
- package/dist/surface-C7SS5CDQ.js +2 -0
- package/dist/symbol-resolution-3FVEKDTJ.js +2 -0
- package/dist/system-6K2NOO5C.js +2 -0
- package/dist/trace-II5K2TMH.js +2 -0
- package/dist/typescript-mailbox-worker.js +1 -1
- package/dist/value-flow-MKFUUE5B.js +2 -0
- package/dist/watch-server.js +3 -2
- package/docs/AGENT_GUIDE.md +133 -476
- package/docs/AI_FAILURE_MODES.md +30 -301
- package/docs/API.md +1 -1
- package/docs/API_EVOLUTION.md +6 -0
- package/docs/CLI_JSON_OUTPUT.md +207 -29
- package/docs/COMMAND_REFERENCE.md +255 -154
- package/docs/CONFIGURATION_WRITE_SAFETY.md +14 -13
- package/docs/DETECTOR_EVIDENCE_CONTRACTS.md +84 -0
- package/docs/DETECTOR_GUIDE.md +46 -138
- package/docs/DURABILITY.md +7 -1
- package/docs/INDEX_GENERATIONS.md +6 -0
- package/docs/LOCK_PROTOCOL.md +8 -0
- package/docs/REINDEX_METADATA_COMPATIBILITY.md +13 -3
- package/docs/SECURITY_MODEL.md +39 -42
- package/docs/accuracy-audit-checklist.md +4 -0
- package/docs/accuracy-hardening-goal.md +9 -2
- package/docs/analyzer-inventory.md +59 -264
- package/docs/analyzer-validation-protocol.md +62 -170
- package/docs/architecture-coherence-vision.md +18 -12
- package/docs/locality-analyzer-design.md +1 -1
- package/docs/schemas/cli-json-envelope.schema.json +212 -27
- package/docs/schemas/cli-json-export-receipt.schema.json +25 -0
- package/docs/schemas/cli-output-page.schema.json +1 -1
- package/docs/schemas/observation-receipt.schema.json +164 -0
- package/docs/schemas/project-config.schema.json +27 -45
- package/docs/schemas/suppression-record.schema.json +1 -34
- package/package.json +65 -8
- package/skills/concrete-plan/SKILL.md +8 -0
- package/skills/concrete-plan/agents/openai.yaml +4 -0
- package/skills/scip-explore/SKILL.md +3 -85
- package/skills/scip-explore/agents/openai.yaml +3 -3
- package/skills/scip-integrity-audit/SKILL.md +185 -0
- package/skills/scip-integrity-audit/agents/openai.yaml +4 -0
- package/skills/scip-plan/SKILL.md +67 -49
- package/skills/scip-plan/agents/openai.yaml +3 -3
- package/skills/scip-query/SKILL.md +77 -77
- package/skills/scip-query/agents/openai.yaml +3 -3
- package/skills/scip-setup/SKILL.md +10 -102
- package/skills/scip-setup/agents/openai.yaml +3 -3
- package/dist/chunk-26QA6FAI.js +0 -8
- package/dist/chunk-2KAZEZ6M.js +0 -2
- package/dist/chunk-3ORVDL3H.js +0 -2
- package/dist/chunk-46XGSFNI.js +0 -2
- package/dist/chunk-4MAK2HOY.js +0 -6
- package/dist/chunk-4TURLRL5.js +0 -16
- package/dist/chunk-4UQVNCQE.js +0 -2
- package/dist/chunk-55Q3WLZX.js +0 -2
- package/dist/chunk-5I5G2QOX.js +0 -3
- package/dist/chunk-6LDJQXAH.js +0 -2
- package/dist/chunk-6O5TICIZ.js +0 -3
- package/dist/chunk-7O5IKBTZ.js +0 -16
- package/dist/chunk-7S5E7KWT.js +0 -2
- package/dist/chunk-7WPLAODU.js +0 -5
- package/dist/chunk-AFHORGLH.js +0 -42
- package/dist/chunk-AIE7TFJW.js +0 -9
- package/dist/chunk-AQOFWNQJ.js +0 -1
- package/dist/chunk-B2PX5I6M.js +0 -2
- package/dist/chunk-B75HZHUP.js +0 -2
- package/dist/chunk-B7PBSLZN.js +0 -2
- package/dist/chunk-BBW6JFHN.js +0 -2
- package/dist/chunk-BNXCIFVY.js +0 -2
- package/dist/chunk-BS2NMXQZ.js +0 -4
- package/dist/chunk-C3KV2II6.js +0 -2
- package/dist/chunk-C43RDDP4.js +0 -20
- package/dist/chunk-DAFAHMNB.js +0 -42
- package/dist/chunk-DQLPXMH6.js +0 -8
- package/dist/chunk-EKZTZXHZ.js +0 -117
- package/dist/chunk-EW2NTSFA.js +0 -18
- package/dist/chunk-F3Z4OUDS.js +0 -8
- package/dist/chunk-FJH2NW7J.js +0 -66
- package/dist/chunk-FTFP6O3L.js +0 -11
- package/dist/chunk-FYLK2DEJ.js +0 -2
- package/dist/chunk-GH74ASD6.js +0 -11
- package/dist/chunk-GMXWZP2B.js +0 -2
- package/dist/chunk-GOUBFH5O.js +0 -3
- package/dist/chunk-HLF2TX6R.js +0 -2
- package/dist/chunk-HX7M4BDI.js +0 -30
- package/dist/chunk-HZ72SESS.js +0 -128
- package/dist/chunk-IB2N4FIY.js +0 -10
- package/dist/chunk-IZYYAFN5.js +0 -2
- package/dist/chunk-JFGGXWQF.js +0 -947
- package/dist/chunk-JN4NMBEX.js +0 -8
- package/dist/chunk-JW56N3KI.js +0 -4
- package/dist/chunk-JZ2OXNWB.js +0 -2
- package/dist/chunk-KFZNKUNT.js +0 -2
- package/dist/chunk-L5GJNV2T.js +0 -8
- package/dist/chunk-L7JDSCDF.js +0 -4
- package/dist/chunk-LU47HG23.js +0 -14
- package/dist/chunk-LVY7NPF7.js +0 -2
- package/dist/chunk-MKCDWWGV.js +0 -4
- package/dist/chunk-MNE7YG56.js +0 -2
- package/dist/chunk-MRXBEXSY.js +0 -26
- package/dist/chunk-MV7OWDUX.js +0 -2
- package/dist/chunk-NGEXCJJW.js +0 -11
- package/dist/chunk-NIW6JDC5.js +0 -29
- package/dist/chunk-PBUQFCNB.js +0 -16
- package/dist/chunk-POAVPHH7.js +0 -2
- package/dist/chunk-QZ4JVECJ.js +0 -2
- package/dist/chunk-RDO52JGY.js +0 -2
- package/dist/chunk-RJT3TUUZ.js +0 -2
- package/dist/chunk-RVLDN63O.js +0 -4
- package/dist/chunk-RXOXSKY3.js +0 -2
- package/dist/chunk-S7OYBOCK.js +0 -2
- package/dist/chunk-SMNXQT5Z.js +0 -3
- package/dist/chunk-SRAFT254.js +0 -2
- package/dist/chunk-T7YQSHPQ.js +0 -3
- package/dist/chunk-UJCOIXDY.js +0 -2
- package/dist/chunk-UJPRPGCO.js +0 -13
- package/dist/chunk-WCCFZ7V7.js +0 -113
- package/dist/chunk-WUPW3UN3.js +0 -3
- package/dist/chunk-X54AGLVX.js +0 -2
- package/dist/chunk-Y2MVPNKY.js +0 -5
- package/dist/chunk-YKUU5AIC.js +0 -3
- package/dist/chunk-YLCJLTPL.js +0 -2
- package/dist/chunk-YTQVETEO.js +0 -2
- package/dist/chunk-Z4N3MZYA.js +0 -38
- package/dist/chunk-ZJOOT3BG.js +0 -2
- package/dist/command-descriptors-DSS46KXI.js +0 -642
- package/dist/diff-gate-types-B0QYpDv1.d.ts +0 -11
- package/dist/direct-navigation-6YHV6IB5.js +0 -3
- package/dist/queries/diff-gate.d.ts +0 -253
- package/dist/queries/diff-gate.js +0 -2
- package/docs/COMMITTED_RECORD_COMPATIBILITY.md +0 -154
- package/docs/analyzer-validation-ledger.md +0 -516
- package/docs/schemas/outcome-event-record.schema.json +0 -95
- package/skills/_shared/SKILL.md +0 -101
- package/skills/_shared/agents/openai.yaml +0 -4
- package/skills/_shared/references/agent-contract-catalog.md +0 -105
- package/skills/_shared/references/command-catalog.md +0 -118
- package/skills/_shared/references/detector-precision-and-diffgate.md +0 -59
- package/skills/_shared/references/evidence-and-dead-code.md +0 -25
- package/skills/scip-audit/SKILL.md +0 -77
- package/skills/scip-audit/agents/openai.yaml +0 -4
- package/skills/scip-audit/references/claims.md +0 -98
- package/skills/scip-audit/references/cleanup.md +0 -100
- package/skills/scip-audit/references/directory.md +0 -222
- package/skills/scip-audit/references/frontend.md +0 -130
- package/skills/scip-audit/references/integrity.md +0 -154
- package/skills/scip-audit/references/maintainability.md +0 -162
- package/skills/scip-audit/references/twin-drift.md +0 -104
- package/skills/scip-diagnose/SKILL.md +0 -52
- package/skills/scip-diagnose/agents/openai.yaml +0 -4
- package/skills/scip-diagnose/references/debug.md +0 -117
- package/skills/scip-diagnose/references/probe-reachability.md +0 -77
- package/skills/scip-diagnose/references/root-cause.md +0 -145
- package/skills/scip-diagnose/references/triage.md +0 -119
- package/skills/scip-explore/references/diagrams.md +0 -40
- package/skills/scip-explore/references/language-playbook.md +0 -49
- package/skills/scip-improve/SKILL.md +0 -56
- package/skills/scip-improve/agents/openai.yaml +0 -4
- package/skills/scip-improve/references/cleanup-batches.md +0 -53
- package/skills/scip-improve/references/directory-moves.md +0 -53
- package/skills/scip-improve/references/doc-reconcile.md +0 -30
- package/skills/scip-improve/references/frontend-extraction.md +0 -39
- package/skills/scip-improve/references/maintainability-mechanism.md +0 -43
- package/skills/scip-improve/references/twin-drift.md +0 -35
- package/skills/scip-plan/references/api-impact.md +0 -19
- package/skills/scip-plan/references/conductor.md +0 -41
- package/skills/scip-plan/references/high-assurance.md +0 -43
- package/skills/scip-plan/references/hyper-optimization.md +0 -50
- package/skills/scip-plan/references/tla-model.md +0 -88
- package/skills/scip-setup/references/bootstrap-workflow.md +0 -119
- package/skills/scip-setup/references/language-verification.md +0 -61
- package/skills/scip-setup/references/lifecycle-commands.md +0 -119
- package/skills/scip-setup/references/per-repo-triage.md +0 -24
- package/skills/scip-verify/SKILL.md +0 -229
- package/skills/scip-verify/agents/openai.yaml +0 -4
- package/skills/scip-verify/references/calibrate-detectors.md +0 -170
package/README.md
CHANGED
|
@@ -1,963 +1,334 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
## How Agents Use It
|
|
30
|
-
|
|
31
|
-
Two layers, wired by `scip-query setup`:
|
|
32
|
-
|
|
33
|
-
**Ambient** — no invocation required. Session-start hooks supply index state and routing context; the Stop-hook / pre-commit **diff gate** checks every finished diff for echoes of existing code, unfinished migrations, missing co-change partners, stale doc citations, and new dead code — and feeds findings back to the agent.
|
|
34
|
-
|
|
35
|
-
**Invoked** — the agent routes work through skills, each carrying its own short command list so it never navigates the full CLI:
|
|
36
|
-
|
|
37
|
-
| Phase | Skill | Commands underneath (also usable directly) |
|
|
38
|
-
| -------- | ------------------------------------------------ | ----------------------------------------------- |
|
|
39
|
-
| Orient | `scip-explore` | `system`, `trace`, `affected`, `call-graph` |
|
|
40
|
-
| Plan | `scip-plan` | `plan-context`, `change-surface`, `co-change` |
|
|
41
|
-
| Diagnose | `scip-diagnose` | `files`, `trace`, `call-graph`, `outline` |
|
|
42
|
-
| Audit | `scip-audit` | `cleanup-plan --verify`, `dead`, `twin-drift` |
|
|
43
|
-
| Improve | `scip-improve` | `incomplete-migration`, `recent-duplicates` |
|
|
44
|
-
| Verify | `scip-verify` (closeout) + the ambient diff gate | `diff-impact`, `diff-gate`, `health --baseline` |
|
|
45
|
-
| Set up | `scip-setup` | `doctor`, `setup`, `setup-hooks`, `setup-agent` |
|
|
46
|
-
|
|
47
|
-
The consolidated skills retain the former specialist lenses as routed
|
|
48
|
-
scenarios: API impact and formal/performance planning live in `scip-plan`;
|
|
49
|
-
root cause and reachability probes live in `scip-diagnose`; integrity,
|
|
50
|
-
maintainability, claim, framework, directory, and twin-drift review live in
|
|
51
|
-
`scip-audit`; and cleanup or documentation repair lives in `scip-improve`.
|
|
52
|
-
Every command remains directly invocable for humans and scripts.
|
|
53
|
-
|
|
54
|
-
React and Vue repositories get additional framework-aware checks for repeated component/template structure, hook/composable behavior, and large-component or large-view pressure. These extend the same reuse and completion workflow; the core graph, history, planning, cleanup, and diff-gate commands are not frontend-specific.
|
|
1
|
+
# scip-query
|
|
2
|
+
|
|
3
|
+
scip-query is a compiler-backed repository-understanding system for coding
|
|
4
|
+
agents.
|
|
5
|
+
|
|
6
|
+
A repository-understanding system turns indexed code facts into accurate,
|
|
7
|
+
navigable abstractions of the systems in a codebase. Its essential service is
|
|
8
|
+
structure-preserving compression: an agent can see the relevant regions and
|
|
9
|
+
relationships before an edit, drill into several material regions together,
|
|
10
|
+
and keep exact source identities for its plan without reading every
|
|
11
|
+
implementation. scip-query differs from text search because it uses
|
|
12
|
+
compiler-produced SCIP indexes: two matching words count as the same symbol
|
|
13
|
+
only when the language tooling resolves them to the same definition. It also
|
|
14
|
+
reports coverage gaps, so omitted evidence is not mistaken for evidence that a
|
|
15
|
+
relationship does not exist.
|
|
16
|
+
|
|
17
|
+
The tool helps an agent answer four practical questions:
|
|
18
|
+
|
|
19
|
+
- What is this code connected to?
|
|
20
|
+
- Which systems participate in this behavior from entry to final effect?
|
|
21
|
+
- Who consumes it, and what could a change affect?
|
|
22
|
+
- Does the repository declare a structural rule for this dependency?
|
|
23
|
+
- Where do React, Vue, duplication, drift, complexity, or cleanup detectors
|
|
24
|
+
point to code worth inspecting?
|
|
25
|
+
|
|
26
|
+
The agent still owns the task, plan, implementation, tests, and final judgment.
|
|
27
|
+
scip-query does not create goals, act as an acceptance test, or decide that work
|
|
28
|
+
is complete.
|
|
55
29
|
|
|
56
30
|
## Install
|
|
57
31
|
|
|
58
|
-
|
|
32
|
+
scip-query requires Node.js 22 or newer. Node.js 24 LTS is recommended.
|
|
59
33
|
|
|
60
34
|
```bash
|
|
61
|
-
npm install -g scip-query
|
|
62
|
-
|
|
35
|
+
npm install -g scip-query
|
|
36
|
+
cd your-repository
|
|
37
|
+
scip-query setup
|
|
63
38
|
```
|
|
64
39
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
For automation, use `scip-query setup --yes` to accept recommended defaults or
|
|
73
|
-
`scip-query setup --json` for a non-interactive machine-readable report. Use
|
|
74
|
-
`--no-hooks`, `--no-skills`, `--no-parsers`, or `--no-health` only when that
|
|
75
|
-
scope is intentionally managed elsewhere. Or run without a global install:
|
|
76
|
-
`npx scip-query@latest setup`.
|
|
77
|
-
|
|
78
|
-
Human output is the default for people and agents: reports retain their
|
|
79
|
-
sections, while `code` preserves indentation and one-based source line
|
|
80
|
-
numbers. Oversized human results paginate at complete line boundaries whenever
|
|
81
|
-
possible, so continuation pages preserve that hierarchy. Every public
|
|
82
|
-
JSON-capable command also supports the same structured forms: `--json` emits
|
|
83
|
-
the stable envelope, `--json --result-only` emits only the command result, and
|
|
84
|
-
`--json --compact` minifies output for a program. See the
|
|
85
|
-
[CLI output contract](docs/CLI_JSON_OUTPUT.md) for mode selection,
|
|
86
|
-
compatibility, pagination, the decoder API, and machine-readable schemas.
|
|
87
|
-
|
|
88
|
-
Logical `refs --limit` pages use a generation-bound `(path, line)` cursor, so
|
|
89
|
-
ordinary continuations resume after the prior row instead of rebuilding and
|
|
90
|
-
discarding it. Follow every emitted `refs --cursor` continuation before
|
|
91
|
-
claiming a complete reference set. JSON identifies semantic, Ruby, or SCIP
|
|
92
|
-
fallback providers that still require complete analysis as
|
|
93
|
-
`pagination.producer: "complete-only"`.
|
|
94
|
-
|
|
95
|
-
Contributors changing exported TypeScript declarations should also follow the
|
|
96
|
-
[public API evolution workflow](docs/API_EVOLUTION.md). Its committed manifest
|
|
97
|
-
makes every package-subpath signature change explicit before release.
|
|
98
|
-
|
|
99
|
-
### If npm warns about install scripts
|
|
100
|
-
|
|
101
|
-
On npm setups with script approval enabled (`allow-scripts`), the install prints warnings like
|
|
102
|
-
`15 packages have install scripts not yet covered by allowScripts` — and **skips those scripts**,
|
|
103
|
-
which leaves the affected native modules unbuilt. Every remaining script on that list is expected:
|
|
104
|
-
|
|
105
|
-
- `scip-query` — its own postinstall (non-fatal by construction: `... || true`)
|
|
106
|
-
- `tree-sitter` + the per-language grammars — native parsers behind multi-language source facts
|
|
107
|
-
|
|
108
|
-
`better-sqlite3` 13 does not need lifecycle-script approval: it ships stable
|
|
109
|
-
N-API SQLite binaries for the supported platforms inside its npm package.
|
|
110
|
-
Although npm infers a default `node-gyp rebuild` from the addon's source
|
|
111
|
-
metadata, scip-query explicitly denies that unnecessary fallback in its own
|
|
112
|
-
development install policy. A real database test verifies that the bundled
|
|
113
|
-
binary works with scripts disabled.
|
|
114
|
-
Seeing `prebuild-install` during a scip-query install therefore means an older
|
|
115
|
-
scip-query dependency tree was selected.
|
|
116
|
-
|
|
117
|
-
Approve them and re-run the builds (`--allow-scripts-pending` only _lists_ — the approving forms
|
|
118
|
-
are `npm approve-scripts <pkg> ...` or `--all`):
|
|
40
|
+
Setup detects supported languages, installs or checks their indexers, builds
|
|
41
|
+
the local index, installs the bundled skills, and writes concise agent guidance.
|
|
42
|
+
When the repository declares valid architecture rules, setup also installs one
|
|
43
|
+
checkout-local Stop hook that checks those rules after indexed source changes.
|
|
44
|
+
It does not install a completion gate, pre-commit gate, or CI enforcement.
|
|
45
|
+
|
|
46
|
+
Check a setup with:
|
|
119
47
|
|
|
120
48
|
```bash
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
npm rebuild # run the now-approved build scripts
|
|
124
|
-
scip-query status --capabilities # verify: languages should show as available
|
|
49
|
+
scip-query doctor
|
|
50
|
+
scip-query capabilities
|
|
125
51
|
```
|
|
126
52
|
|
|
127
|
-
|
|
128
|
-
and one that tried would be exactly the kind of supply-chain behavior to distrust.
|
|
53
|
+
## The normal workflow
|
|
129
54
|
|
|
130
|
-
|
|
55
|
+
Use scip-query as the primary reading surface for indexed source. First name the
|
|
56
|
+
few material repository facts the answer depends on. Locate exact referents with
|
|
57
|
+
`search` for trustworthy text, `outline` for a known file, or `entrypoints` for
|
|
58
|
+
an external callable surface. Then select exact symbols or file/line constructs
|
|
59
|
+
and project only the relationship families and directions capable of establishing
|
|
60
|
+
those facts. scip-query resolves identity, typed edges, evidence strength, provider
|
|
61
|
+
support, and bounded coverage; it does not decide which facts matter to the task.
|
|
131
62
|
|
|
132
63
|
```bash
|
|
133
|
-
|
|
134
|
-
scip-query
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
64
|
+
scip-query search 'work_session_stream_events'
|
|
65
|
+
scip-query evidence \
|
|
66
|
+
--symbol 'appendWorkSessionStreamEvents' \
|
|
67
|
+
--edge execution \
|
|
68
|
+
--edge runtime \
|
|
69
|
+
--direction both \
|
|
70
|
+
--depth 2 \
|
|
71
|
+
--max-edges 32
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
Treat the evidence inventory, facts, calibration, coverage, and recovery paths as
|
|
75
|
+
one contract. Missing output is not evidence of absence. If a material fact still
|
|
76
|
+
requires implementation behavior, batch its exact constructs into `inspect --view
|
|
77
|
+
behavior`. Use `code` only when exact syntax can change the decision. Do not reread
|
|
78
|
+
source already rendered by either command, and do not expand unrelated frontiers.
|
|
79
|
+
|
|
80
|
+
Before answering, audit the draft itself against the material claims. A fact
|
|
81
|
+
seen in evidence but left implicit in the answer is not recovered. Copy returned
|
|
82
|
+
file and line identities exactly rather than reconstructing citation paths.
|
|
83
|
+
|
|
84
|
+
A broad literal is counted exactly and returned with recoverable structural scopes.
|
|
85
|
+
Narrow only when a named material fact requires one of those scopes.
|
|
86
|
+
|
|
87
|
+
`code` accepts up to 24 exact symbols, ranges, or indexed file paths. A file
|
|
88
|
+
path returns its exported definitions—or its top-level definitions when the
|
|
89
|
+
language has no explicit export surface—plus the file-local definitions they
|
|
90
|
+
reference, then lists every omitted local definition as an exact range. This
|
|
91
|
+
keeps the default source surface small without hiding what remains available.
|
|
92
|
+
Use `--members all` only when the complete file matters. If a proposed packet
|
|
93
|
+
would exceed the active output budget, `code` emits no partial source and
|
|
94
|
+
prints exact complete-packet splits; narrow to the exact units still needed
|
|
95
|
+
before deciding whether every split remains necessary.
|
|
96
|
+
|
|
97
|
+
Start an unknown path with `search`; batch related text, symbol, and file-line
|
|
98
|
+
anchors with `inspect`; use `evidence` when one symbol and its real uses are the
|
|
99
|
+
center of the question. For tracked nonbinary repository content, keep
|
|
100
|
+
exploration on scip-query. Native tools are for applying edits, running checks,
|
|
101
|
+
binary content, or a specific unsupported gap that scip-query has explicitly
|
|
102
|
+
reported.
|
|
148
103
|
|
|
149
104
|
```bash
|
|
150
|
-
scip-query
|
|
151
|
-
scip-query
|
|
152
|
-
scip-query
|
|
153
|
-
|
|
154
|
-
|
|
105
|
+
scip-query search work_session_stream_events
|
|
106
|
+
scip-query inspect --search sessionStreamEvents --search work_session_stream_events --view behavior
|
|
107
|
+
scip-query evidence appendWorkSessionStreamEvents --include definition,references,callers,callees
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
`inspect --view behavior` returns the cheapest faithful syntax-derived view of
|
|
111
|
+
each complete source unit. Compact units stay raw. Larger units become
|
|
112
|
+
hierarchical outlines only when that representation is materially smaller;
|
|
113
|
+
every source statement is represented, and unsupported or
|
|
114
|
+
compression-sensitive statements are copied verbatim. Coverage reports the
|
|
115
|
+
represented, copied, and omitted counts. Exact source can be requested for any
|
|
116
|
+
unit whose complete implementation matters. `inspect --symbol` includes definitions,
|
|
117
|
+
references, callers, callees, dependencies, and consumers by default.
|
|
118
|
+
|
|
119
|
+
Search, location, and relationship evidence is deduplicated into one ranked
|
|
120
|
+
packet. Exact locations and definitions rank first; later units must add new
|
|
121
|
+
file, role, scope, symbol, or behavior coverage. A default packet materializes
|
|
122
|
+
at most 12 matching lines per text selector, then applies a soft ceiling of 48
|
|
123
|
+
units or 60,000 displayed-evidence characters without clipping a returned
|
|
124
|
+
syntax unit. Its omission ledger groups everything withheld by scope and role,
|
|
125
|
+
reports what each group contains, and gives an exact command for drilling into
|
|
126
|
+
that group. Drill into several relevant groups together; use `--full` only when
|
|
127
|
+
all omitted evidence can change the decision. Large rendered output from other
|
|
128
|
+
commands can still use the universal byte-transport continuation printed by
|
|
129
|
+
every command.
|
|
130
|
+
|
|
131
|
+
Before a nonlocal change:
|
|
155
132
|
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
A claim you can't trace to evidence is a vibe. `scip-query` labels every answer with where it came from and how much weight it deserves:
|
|
159
|
-
|
|
160
|
-
```mermaid
|
|
161
|
-
flowchart LR
|
|
162
|
-
A["SCIP graph facts"] --> F["evidence-ranked findings"]
|
|
163
|
-
B["semantic augmentation"] --> F
|
|
164
|
-
C["source-backed candidates"] --> F
|
|
165
|
-
D["git-history signals"] --> F
|
|
166
|
-
E["repository checks"] --> F
|
|
167
|
-
```
|
|
168
|
-
|
|
169
|
-
1. **SCIP graph facts** for definitions, references, imports, calls, and dependencies.
|
|
170
|
-
2. **Semantic augmentation** for TypeScript where the SCIP index needs more detail.
|
|
171
|
-
3. **Source-backed candidates** for similarity, maintainability, and cleanup checks.
|
|
172
|
-
4. **Git-history signals** for churn, co-change, recency, and documentation drift.
|
|
173
|
-
5. **Repository-toolchain verification** for supported cleanup plans.
|
|
174
|
-
|
|
175
|
-
Heuristic findings are candidates for inspection, not verdicts — the finding always sounds right, because it was generated to; only the code knows. Run `scip-query capabilities` to see which evidence and verification layers are available for the current repository and language.
|
|
176
|
-
|
|
177
|
-
## Language and Framework Coverage
|
|
178
|
-
|
|
179
|
-
Graph navigation works through supported [SCIP](https://github.com/sourcegraph/scip) indexers. Higher-confidence augmentation and verification vary by language and project toolchain. TypeScript currently has the richest semantic augmentation. React and Vue add built-in framework-aware maintainability checks on top of the core workflow.
|
|
180
|
-
|
|
181
|
-
Rust projects are indexed through rust-analyzer's SCIP output. Compiler-backed
|
|
182
|
-
Rust reference, callee, signature, and module/use evidence runs through a
|
|
183
|
-
demand-started durable rust-analyzer session with bounded worker fallback.
|
|
184
|
-
Capability and status output distinguish indexer readiness, semantic readiness,
|
|
185
|
-
the selected transport, and whether the idle helper is currently stopped or
|
|
186
|
-
live.
|
|
187
|
-
|
|
188
|
-
Clojure projects are indexed through `scip-clojure`. Source fallback adds namespace imports, callable/callsite evidence, and protocol/record member evidence for `.clj`, `.cljs`, and `.cljc` files. When the project has `clj-kondo` available, cleanup-plan verification can use `clj-kondo --lint .`. Clojure does not currently have a scip-query semantic provider equivalent to TypeScript's `ts-morph` layer; capability output reports that boundary explicitly.
|
|
189
|
-
|
|
190
|
-
## Cleaning Up AI-Generated Code
|
|
191
|
-
|
|
192
|
-
Every check here exists because I watched the failure mode happen — in AI-generated codebases I inherited and rebuilt, and in my own agent sessions. AI-assisted development doesn't rot a codebase in general; it rots it in specific, recurring shapes, and each shape gets its own detector. The full catalog, with prevention wiring for each one, is in [docs/AI_FAILURE_MODES.md](docs/AI_FAILURE_MODES.md):
|
|
193
|
-
|
|
194
|
-
**1. Find the echoes.** Agents re-implement helpers, hooks, composables, and frontend components they didn't know existed. `recent-duplicates` makes similarity _directional_ using git file ages - which side is the established original, which is the recent echo.
|
|
195
|
-
|
|
196
|
-
Illustrative output:
|
|
197
|
-
|
|
198
|
-
```
|
|
199
|
-
91% ECHO react-component src/components/ProjectCardVisual.tsx ProjectCardVisual (added 62 commits ago)
|
|
200
|
-
duplicates established src/pages/HomePage.tsx RecentProjectRow()
|
|
201
|
-
basis: jsx-structure
|
|
202
|
-
shared: component:ProjectCard, prop:title, event:click
|
|
203
|
-
100% TWIN src/workflows/a.ts ensureAccessible() / src/workflows/b.ts ensureAccessible()
|
|
204
|
-
(both new - one agent session duplicated itself; consolidate before they diverge)
|
|
133
|
+
```bash
|
|
134
|
+
scip-query context RetryPolicy
|
|
205
135
|
```
|
|
206
136
|
|
|
207
|
-
|
|
137
|
+
`context` returns a bounded evidence packet for a symbol, file, or module. It
|
|
138
|
+
combines definitions, references, calls, data flow, dependencies, consumers,
|
|
139
|
+
change risk, history, suppressions, and possible reuse sites. A bounded packet
|
|
140
|
+
is a deliberately limited result: it is useful for a decision but does not
|
|
141
|
+
claim to contain every possible relationship.
|
|
208
142
|
|
|
209
|
-
|
|
143
|
+
After a coherent edit:
|
|
210
144
|
|
|
211
|
-
```
|
|
212
|
-
|
|
213
|
-
wired into: src/cards/price-summary-a.ts
|
|
214
|
-
un-migrated: 100% buildReportB() (src/cards/price-summary-b.ts)
|
|
215
|
-
un-migrated: 100% buildReportC() (src/cards/price-summary-c.ts)
|
|
145
|
+
```bash
|
|
146
|
+
scip-query diff-impact
|
|
216
147
|
```
|
|
217
148
|
|
|
218
|
-
|
|
149
|
+
`diff-impact` maps changed symbols to downstream consumers. It is a change map,
|
|
150
|
+
not a pass/fail gate. The agent uses it with native tests and source inspection.
|
|
219
151
|
|
|
220
|
-
|
|
221
|
-
staleness 94 product/domain-model.md
|
|
222
|
-
BROKEN REFERENCE: cites src/api/servicePlans.ts — that file no longer exists
|
|
223
|
-
22 change(s) since doc update src/workflows/serviceTasks.ts (referenced by doc)
|
|
224
|
-
```
|
|
152
|
+
When structure matters:
|
|
225
153
|
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
```
|
|
229
|
-
── Batch 0: deletable now (graph-fact, 67 LOC) ──
|
|
230
|
-
── Batch 1: dead once batch 0 lands (cascade, 21 LOC) ──
|
|
231
|
-
Batch 0: COMPILER-VERIFIED
|
|
154
|
+
```bash
|
|
155
|
+
scip-query architecture
|
|
232
156
|
```
|
|
233
157
|
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
and
|
|
239
|
-
without `--dry-run`; use `--all` only when the entire printed target set is
|
|
240
|
-
intended.
|
|
241
|
-
|
|
242
|
-
**5. Trim speculative generality.** `unused-params` finds trailing parameters no body ever uses (the classic "options for later"), scoped to removals that are type-safe by construction.
|
|
243
|
-
|
|
244
|
-
**6. Keep frontend reuse honest.** React and Vue have dedicated frontend hygiene checks: component-duplicate commands compare JSX/template structure, hook/composable commands compare state/effect/request behavior, and large-component/view commands flag files that concentrate too many reasons to change. `health` includes these as hygiene pressure, while `incomplete-migration` remains the direct check for a hook/composable/helper extraction that was wired into some sites but not all of them.
|
|
158
|
+
An architecture rule is repository policy that permits or forbids dependency
|
|
159
|
+
edges between named file groups. Its defining trait is that it states a team
|
|
160
|
+
constraint, not a detector guess. Rules live in `.scipquery.json` and can cover
|
|
161
|
+
closed dependency rows, cycles, unresolved boundaries, fan-out, boundary size,
|
|
162
|
+
and test placement.
|
|
245
163
|
|
|
246
|
-
|
|
164
|
+
When cleanup or drift matters:
|
|
247
165
|
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
<!-- BEGIN GENERATED DIFF-GATE CHECKS -->
|
|
251
|
-
|
|
252
|
-
| Check | What it catches | When it runs |
|
|
253
|
-
| ---------------------- | --------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
254
|
-
| `echo` | Changed symbols that newly echo established code elsewhere. | Default diff gate. |
|
|
255
|
-
| `incomplete-migration` | New helpers or abstractions wired into some sites while older inline sites remain. | Default diff gate. |
|
|
256
|
-
| `co-change-partner` | Historically coupled files that usually change together but are missing from this diff. | Default diff gate. |
|
|
257
|
-
| `twin-partner` | A changed symbol has a same-(near-)name twin (identical or already-divergent) elsewhere that this diff left untouched. | Default diff gate. Advisory: findings print but never cause a nonzero exit by themselves. |
|
|
258
|
-
| `coverage-contract` | A configured `coverageContracts` entry (.scipquery.json) drifted: its declared key set no longer matches its ground-truth source. | Default diff gate, only when either side of a configured contract changed. |
|
|
259
|
-
| `architecture` | A declared architecture boundary rule has a violation absent from the committed health baseline. | Default diff gate when closed dependency rows, requireCompletePolicy, requireAcyclic, requireResolvedBoundaries, requireMinimalPolicy, maxBoundaryFanOut/maxBoundaryFiles, or testPaths are configured and a baseline exists. |
|
|
260
|
-
| `doc-reference` | Docs that cite changed files and may need a matching update. Dated snapshot docs (docs.snapshotPaths) are excluded by policy. | Default diff gate. Advisory (21.2) for bare file-mention citations; blocking when the citation has a line anchor or the cited file was deleted/renamed. |
|
|
261
|
-
| `unused-params` | Fresh trailing parameters or options that no changed body uses. | Default diff gate. |
|
|
262
|
-
| `new-dead` | Changed production symbols with zero indexed consumers. | Default diff gate. |
|
|
263
|
-
| `baseline` | New health finding identities compared with the committed health baseline. | Only with `diff-gate --baseline`. |
|
|
264
|
-
|
|
265
|
-
<!-- END GENERATED DIFF-GATE CHECKS -->
|
|
266
|
-
|
|
267
|
-
Illustrative output:
|
|
268
|
-
|
|
269
|
-
```
|
|
270
|
-
[co-change-partner] schema.prisma changed, but scripts/scope-inventory.mjs did not — they change together 12x (86% of the time)
|
|
271
|
-
-> Update scripts/scope-inventory.mjs alongside this change, or confirm the coupling no longer holds.
|
|
166
|
+
```bash
|
|
167
|
+
scip-query health --full
|
|
272
168
|
```
|
|
273
169
|
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
**11. Catch a same-name function that drifted apart.** `twin-drift` finds functions with the same (or near-same) name in different files whose bodies have diverged — a strong signal one side got a bug fix, edge case, or feature the other never received. Synthetic leaves and test-only groups are excluded by default.
|
|
170
|
+
Health is a collection of repository analyses, not a correctness grade. It
|
|
171
|
+
reports graph facts and heuristic candidates separately. A heuristic candidate
|
|
172
|
+
is a source location selected by a pattern that may indicate a problem; the
|
|
173
|
+
agent must read the source before treating it as a defect.
|
|
279
174
|
|
|
280
|
-
|
|
175
|
+
## React and Vue
|
|
281
176
|
|
|
282
|
-
|
|
177
|
+
React and Vue analysis remains a first-class part of the product.
|
|
283
178
|
|
|
284
179
|
```bash
|
|
285
|
-
scip-query
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
--evidence source:src/compat.ts \
|
|
289
|
-
--reason "the v1 export remains an intentional compatibility surface"
|
|
290
|
-
```
|
|
291
|
-
|
|
292
|
-
This writes one file per suppression under `.scipquery/suppressions/` — commit
|
|
293
|
-
it with your change. One-file-per-suppression means two branches suppressing
|
|
294
|
-
different findings merge without conflict. The command requires an exact
|
|
295
|
-
current finding ID, a controlled reason code, and at least one inspectable
|
|
296
|
-
counterevidence referent. `source:`, `config:`, and `test:` referents are
|
|
297
|
-
content-hashed when the record is written, so changing their bytes reopens the
|
|
298
|
-
finding. A `graph:` referent is an exact `scip-query ...` command:
|
|
180
|
+
scip-query react-component-duplicates --full
|
|
181
|
+
scip-query react-hook-candidates --full
|
|
182
|
+
scip-query react-large-component-pressure --full
|
|
299
183
|
|
|
300
|
-
|
|
301
|
-
scip-query
|
|
302
|
-
|
|
303
|
-
--evidence 'graph:scip-query refs CompatExport --full' \
|
|
304
|
-
--reason "all compiler-resolved consumers still require this export"
|
|
184
|
+
scip-query vue-component-duplicates --full
|
|
185
|
+
scip-query vue-composable-candidates --full
|
|
186
|
+
scip-query vue-large-view-pressure --full
|
|
305
187
|
```
|
|
306
188
|
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
`pass-with-suppressions`, not an ordinary clean pass. The legacy
|
|
312
|
-
`suppressions[]` array in `.scipquery.json` and v1 record files remain readable,
|
|
313
|
-
but do not automatically waive findings until explicitly replaced with
|
|
314
|
-
structured counterevidence. `diff-gate` reports active findings,
|
|
315
|
-
accepted suppressions, escalation reasons, and summary counts.
|
|
316
|
-
|
|
317
|
-
The first suppression for an identity is created exclusively. Repeating the
|
|
318
|
-
same decision is idempotent, but a different reason, expiry, check, or file is
|
|
319
|
-
a policy change and never silently overwrites the existing file. The command
|
|
320
|
-
reports the existing SHA-256 revision:
|
|
321
|
-
|
|
322
|
-
```text
|
|
323
|
-
error: A different suppression decision already exists at ...
|
|
324
|
-
Current revision: 0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef.
|
|
325
|
-
```
|
|
189
|
+
These commands find repeated component structure, hook or composable behavior
|
|
190
|
+
that may deserve reuse, and files carrying unusually broad responsibility.
|
|
191
|
+
They tell an agent where to inspect and clean up. They do not order an automatic
|
|
192
|
+
refactor: intentional variation and real framework constraints must survive.
|
|
326
193
|
|
|
327
|
-
|
|
194
|
+
Vue repositories can add source facts when their indexer needs them:
|
|
328
195
|
|
|
329
196
|
```bash
|
|
330
|
-
scip-query
|
|
331
|
-
--reason-code compatibility-shim \
|
|
332
|
-
--evidence source:src/compat.ts \
|
|
333
|
-
--reason "superseded by a narrower compatibility exception" \
|
|
334
|
-
--replace 0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef
|
|
197
|
+
scip-query augment-vue
|
|
335
198
|
```
|
|
336
199
|
|
|
337
|
-
|
|
338
|
-
and the newer bytes remain intact. New records declare their schema version,
|
|
339
|
-
record kind, stable suppression identity, writer version, adjudication policy,
|
|
340
|
-
counterevidence, and invalidation conditions. Older unversioned and v1 records
|
|
341
|
-
remain readable and are upgraded only by an explicit replacement. If a
|
|
342
|
-
malformed or future record cannot be used, `diff-gate` reports exact
|
|
343
|
-
incomplete-coverage counts and keeps findings conservatively unsuppressed. The
|
|
344
|
-
wire schemas and merge rules are documented in
|
|
345
|
-
[`docs/COMMITTED_RECORD_COMPATIBILITY.md`](docs/COMMITTED_RECORD_COMPATIBILITY.md).
|
|
200
|
+
## Cleanup and drift commands
|
|
346
201
|
|
|
347
|
-
|
|
202
|
+
The health report is an overview. Focused commands expose the evidence behind
|
|
203
|
+
particular kinds of pressure:
|
|
348
204
|
|
|
349
205
|
```bash
|
|
350
|
-
scip-query
|
|
351
|
-
|
|
206
|
+
scip-query duplicate-bodies --full
|
|
207
|
+
scip-query twin-drift --full
|
|
208
|
+
scip-query recent-duplicates --full
|
|
209
|
+
scip-query incomplete-migration --full
|
|
210
|
+
scip-query doc-drift --full
|
|
211
|
+
scip-query unused-params --full
|
|
212
|
+
scip-query dead --full
|
|
213
|
+
scip-query isolated --full
|
|
214
|
+
scip-query cycles --full
|
|
215
|
+
scip-query co-change --full
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
`incomplete-migration` looks for a new helper used at some matching sites while
|
|
219
|
+
older inline forms remain. `twin-drift` looks for same-concept implementations
|
|
220
|
+
that have diverged. `co-change` uses Git history to find files that repeatedly
|
|
221
|
+
change together without a visible dependency edge. Each is evidence for
|
|
222
|
+
inspection, not proof that code must be rewritten.
|
|
223
|
+
|
|
224
|
+
For compiler-checked dead-code removal:
|
|
352
225
|
|
|
226
|
+
```bash
|
|
227
|
+
scip-query cleanup-plan --verify
|
|
353
228
|
```
|
|
354
|
-
check caught fixed suppressed open moved unverified resolution-vs-suppression evaluation-precision authority median-days-to-fix
|
|
355
|
-
echo 14 10 2 1 0 1 83% - local-writable-telemetry 0.8
|
|
356
|
-
new-dead 6 5 0 1 0 0 100% - local-writable-telemetry 0.3
|
|
357
|
-
```
|
|
358
|
-
|
|
359
|
-
`resolution-vs-suppression` is verified fixed ÷ (verified fixed + suppressed). Repository-local event and suppression files are writable by the same agent doing the work, so this ratio is operational telemetry, not an independent correctness grade. `evaluation-precision` is populated only when a protected external evaluator supplies both protected-CI records and a separately controlled attestation for their gate-run IDs; a JSON field cannot attest itself. Ordinary local-agent and local-human runs leave it blank. `moved` separates rename churn, while `unverified` is reserved for legacy or otherwise non-comparable resolutions that lack replay proof. Run diff-gate once to record the finding and again after the repair; a pre-commit rerun uses the same base directly, while clean post-commit runs advance through stored bases incrementally. Filter with `--check <name>`, window with `--since 30d|12w|<ISO date>`, and get machine-readable provenance, anomaly samples, and record-compatibility counts with `--json`. Local runs default to `local-agent`; a person running the gate directly may set `SCIP_QUERY_OUTCOME_OBSERVER_KIND=local-human` and optionally `SCIP_QUERY_OUTCOME_OBSERVER_SOURCE=<label>`. Both remain `repository-writable`; neither environment variable can claim protected authority. Because the event files are committed, the numbers survive re-clones and aggregate across every machine and agent working the repo, but missing or deliberately deleted history cannot be inferred from the remaining directory. Current event files carry an additive v1 discriminator, stable semantic identity, writer version, gate-run identity, observer authority, and observation receipt; existing unversioned files remain readable. `effectiveness` reports accepted and omitted record counts when history is partial, and cross-HEAD verification defers fixes rather than trusting an incomplete lifecycle. Legacy `.scipquery/ledger/events.jsonl` records remain readable and are migrated to individual files on the next gate write only when every non-empty line is compatible; otherwise the source ledger is preserved. Historical cross-`HEAD` events without stored comparison evidence remain unverified rather than being reclassified speculatively. Standalone health/cleanup commands are not yet outcome-tracked because they do not all expose a complete-scan contract.
|
|
360
229
|
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
deadline, or 180 seconds with `--full`; timeout terminates and reaps that child
|
|
365
|
-
and fails the gate explicitly. Before and after every detector, the child
|
|
366
|
-
publishes a private progress record; a timeout therefore names the active
|
|
367
|
-
detector or phase and the last completed detector instead of reporting only
|
|
368
|
-
the total elapsed time. Operators may set
|
|
369
|
-
`SCIP_QUERY_DIFF_GATE_TIMEOUT_MS` to a positive millisecond value, capped at
|
|
370
|
-
10 minutes.
|
|
230
|
+
Review its batches before applying them. Cleanup is complete only when the
|
|
231
|
+
retired path, unused wiring, and misleading residue are gone and native checks
|
|
232
|
+
still pass.
|
|
371
233
|
|
|
372
|
-
|
|
373
|
-
A logical observation is one completed detector evaluation named by an
|
|
374
|
-
observation ID; unlike a process attempt, a retry of that evaluation reuses the
|
|
375
|
-
same ID. SQLite serializes these observations before deriving their
|
|
376
|
-
transitions. Two different IDs that report the same finding therefore add two
|
|
377
|
-
to `timesShown`, while an exact retry with the same ID and evidence adds
|
|
378
|
-
nothing. Reusing an ID for different evidence is rejected and reported. A
|
|
379
|
-
writer-lock timeout skips the local counter update rather than delaying or
|
|
380
|
-
changing the gate decision, and the next distinct run may try again. The
|
|
381
|
-
dedupe records live as long as that rebuildable `evidence.db`; deleting the
|
|
382
|
-
database resets both the counters and their retry memory. These local counters
|
|
383
|
-
feed detector-precision hints, not the committed `effectiveness` totals above.
|
|
234
|
+
## Focused graph queries
|
|
384
235
|
|
|
385
|
-
|
|
236
|
+
Use the aggregate `context` command first for ordinary planning. Reach for a
|
|
237
|
+
focused query when one unresolved relationship can change the decision:
|
|
386
238
|
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
Score Breakdown (100 minus the following):
|
|
399
|
-
- 5 hidden-coupling: 5 co-changing pair(s) without a dependency edge
|
|
400
|
-
|
|
401
|
-
Axes:
|
|
402
|
-
Deletable: 1,027 LOC across 89 symbols
|
|
403
|
-
Change amplification: 5 files/commit median, 23 p90
|
|
404
|
-
Evidence quality: 5 graph-fact, 150 heuristic, 0 user-suppressed
|
|
405
|
-
Validation: flagged fix-density 0.12 vs baseline 0.20 (0.6x)
|
|
239
|
+
```bash
|
|
240
|
+
scip-query refs SomeSymbol --full
|
|
241
|
+
scip-query trace SomeSymbol
|
|
242
|
+
scip-query call-graph SomeSymbol
|
|
243
|
+
scip-query value-flow SomeSymbol
|
|
244
|
+
scip-query affected SomeSymbol --full
|
|
245
|
+
scip-query system src/payments
|
|
246
|
+
scip-query surface src/payments
|
|
247
|
+
scip-query deps src/payments/service.ts
|
|
248
|
+
scip-query rdeps src/payments/service.ts
|
|
406
249
|
```
|
|
407
250
|
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
- **The validation axis is a falsifiability loop**: it measures whether flagged files actually attract more fix commits than the rest _in your repo_, per detector. On some codebases a detector tracks repeated fixes; on others it is mostly noise — the tool reports which, instead of assuming.
|
|
411
|
-
- **Suppressions are data**: every `// scip-query: ignore-*` comment is a precision label, counted and reported.
|
|
412
|
-
|
|
413
|
-
## Accuracy Model
|
|
251
|
+
Do not repeat an unchanged query after context compaction. Re-run when source,
|
|
252
|
+
the index generation, the command input, or the required coverage changed.
|
|
414
253
|
|
|
415
|
-
|
|
254
|
+
## Suppressions
|
|
416
255
|
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
4. **Compiler verification** for deletions — the only tier that earns the word "safe."
|
|
421
|
-
|
|
422
|
-
And because accuracy you don't measure is a feeling, `self-audit` samples symbols and scores the cheap paths against the TypeScript compiler.
|
|
423
|
-
|
|
424
|
-
Illustrative output:
|
|
425
|
-
|
|
426
|
-
```
|
|
427
|
-
references precision 1.0 recall 0.9 (the cheap path doesn't fabricate; it occasionally misses)
|
|
428
|
-
```
|
|
429
|
-
|
|
430
|
-
Heuristic detectors carry guardrails learned from real codebases: published `package.json` surfaces are exempt from "unused" advice, `contracts/` and `types/` modules are exempt from "definer never uses it," test files and component-sibling files don't count as hidden coupling, and changelogs-by-policy aren't drift.
|
|
431
|
-
|
|
432
|
-
## Agent Skills
|
|
433
|
-
|
|
434
|
-
`scip-query install-skills` symlinks bundled skills into Claude Code, Codex, and shared agent roots (`~/.agents/skills/`) so they update automatically with the package. The `scip-query` router skill dispatches codebase work to the specialist below; when unsure which owns a task, start there.
|
|
435
|
-
|
|
436
|
-
### Bundled skills
|
|
437
|
-
|
|
438
|
-
One-line "essential difference" per skill — read this table before the Routes table in `skills/scip-query/SKILL.md` if two names sound alike.
|
|
439
|
-
|
|
440
|
-
| Skill | Essential difference |
|
|
441
|
-
| --------------- | ------------------------------------------------------------------------------ |
|
|
442
|
-
| `scip-query` | Router: select the smallest workflow that answers the request. |
|
|
443
|
-
| `scip-explore` | Understand or diagram existing code without changing it. |
|
|
444
|
-
| `scip-plan` | Prove the blast radius and specify one change or a multi-phase program. |
|
|
445
|
-
| `scip-diagnose` | Trace a failure, recurring design flaw, issue, or unreachable branch to cause. |
|
|
446
|
-
| `scip-audit` | Classify integrity, maintainability, drift, framework, and cleanup evidence. |
|
|
447
|
-
| `scip-improve` | Act on confirmed audit or documentation findings and ratchet the result. |
|
|
448
|
-
| `scip-verify` | Test and challenge a finished change before declaring it complete. |
|
|
449
|
-
| `scip-setup` | Adopt or repair scip-query in a repository. |
|
|
450
|
-
| `_shared` | Manual-only command/evidence reference loaded by another workflow when needed. |
|
|
451
|
-
|
|
452
|
-
The important boundary is read-only versus mutating work: `scip-audit`
|
|
453
|
-
classifies current evidence, while `scip-improve` changes confirmed findings.
|
|
454
|
-
`scip-plan` is prospective evidence before implementation; `scip-verify`
|
|
455
|
-
challenges a concrete finished diff. `scip-explore` explains working behavior;
|
|
456
|
-
`scip-diagnose` starts from a failure or contradiction.
|
|
457
|
-
|
|
458
|
-
Project setup writes reviewable checkout-local lifecycle hooks for Codex and Claude Code (`.codex/hooks.json` and `.claude/settings.local.json`). A checkout-local hook is an agent-tool preference whose defining trait is that it applies to one clone rather than expressing team policy. Setup adds both paths to that clone's `.git/info/exclude`, so they do not appear in commits, and refuses to rewrite either path if it is already tracked. `setup-hooks --shared` remains accepted only as a deprecated compatibility flag; it no longer writes `.claude/settings.json`. These hooks add scip-query context at session start, route prompts toward the right skill, and run an advisory Stop-hook wrapper around the diff gate only for that repository. The Stop hook sends feedback to the agent by default instead of blocking; set `SCIP_QUERY_STOP_HOOK_MODE=warn` for a warning-only hook response, or `SCIP_QUERY_STOP_HOOK_MODE=block` to enforce the gate. Set `SCIP_QUERY_SKIP_HOOK_INSTALL=1` or run `scip-query setup --no-hooks` to skip hook installation during setup, and run `scip-query setup-hooks --json` later to repair the current checkout's hooks. Preview hook removal with `scip-query setup-hooks --remove --dry-run`; `--force` is an installation-only mode and cannot be combined with removal. A scope-free `scip-query uninstall --dry-run` safely previews both global and project integrations, while real uninstall requires exactly one of `--global` or `--project`.
|
|
459
|
-
|
|
460
|
-
Setup/configuration writers are conflict-aware. They reread the latest file
|
|
461
|
-
under a short token-owned lock, preserve unknown JSON fields and prose outside
|
|
462
|
-
owned Markdown markers, and publish complete bytes with flushed files and,
|
|
463
|
-
where the host supports it, a synchronized complete directory path. An unrelated
|
|
464
|
-
intervening JSON edit is merged; a stale decision about the same project-config
|
|
465
|
-
field, malformed latest JSON, malformed managed markers, or an edit that wins
|
|
466
|
-
the final revision check produces an explicit conflict and leaves the latest
|
|
467
|
-
file untouched. Reload the file and rerun the command after resolving that
|
|
468
|
-
conflict. See [Configuration and setup write safety](docs/CONFIGURATION_WRITE_SAFETY.md).
|
|
469
|
-
|
|
470
|
-
For a project, run `scip-query setup`. It enables demand-started automatic
|
|
471
|
-
indexing unless the project already has an explicit `watch.enabled: false`,
|
|
472
|
-
starts or reuses the project service, verifies its clean-idle deadline, and
|
|
473
|
-
reports Rust's final durable/worker semantic selection and lifecycle state.
|
|
474
|
-
The status read is passive; the setup health audit may make a semantic request
|
|
475
|
-
that wakes rust-analyzer, after which the helper exits on clean idle.
|
|
476
|
-
It also installs/refreshes skills, configures project-local hooks unless
|
|
477
|
-
skipped, checks indexer readiness, performs explicitly approved pinned indexer
|
|
478
|
-
remediation,
|
|
479
|
-
refreshes the index, smoke-tests representative command families, writes
|
|
480
|
-
`docs/scip-query/health-dossier.md` and `.json` when the optional health pass is
|
|
481
|
-
selected, reports the health score and items needing attention, and seeds
|
|
482
|
-
AGENTS.md/CLAUDE.md guidance. Use
|
|
483
|
-
the default terminal checklist to accept or decline the recommended automatic
|
|
484
|
-
indexing action and other project-local changes (`--guided` requires an
|
|
485
|
-
interactive terminal and reopens it explicitly; automation should use
|
|
486
|
-
`--yes` or `--json`). After setup,
|
|
487
|
-
`scip-audit` confirms raw signals and `scip-improve` keeps
|
|
488
|
-
fixing the worst confirmed items until no safe confirmed cleanup remains. Use
|
|
489
|
-
`scip-query setup --git-hook` when you also want a local pre-commit diff gate.
|
|
490
|
-
Non-interactive setup and ordinary reindex report missing global tools without
|
|
491
|
-
installing them; pass `--install-missing` only when that operation may install
|
|
492
|
-
the reviewed immutable package versions. CI setup is intentionally separate.
|
|
493
|
-
|
|
494
|
-
Setup classifies every change by where its facts belong:
|
|
495
|
-
|
|
496
|
-
- **Repository records (commit):** shared project policy and history whose value comes from surviving clones and branches, including `.scipquery.json`, AGENTS/CLAUDE guidance, health dossiers, `.scipquery/suppressions/*.json`, and `.scipquery/ledger/`.
|
|
497
|
-
- **Checkout preferences (do not commit):** integration settings for one clone, including `.codex/hooks.json`, `.claude/settings.local.json`, `.git/info/exclude`, and an optional `.git/hooks/pre-commit` backstop.
|
|
498
|
-
- **User environment:** installed skills and language indexers used across checkouts on that machine.
|
|
499
|
-
|
|
500
|
-
Rebuildable indexes, caches, and service state are runtime state: generated working data whose defining trait is that source plus configuration can reproduce it. They remain outside the repository by default. `setup --guided` labels each question with its scope, and both human and JSON setup reports return the resulting scope buckets.
|
|
501
|
-
|
|
502
|
-
## Formal Models (TLA+)
|
|
503
|
-
|
|
504
|
-
For the parts of a system where the risk lives in interleaving — retries, concurrency, partial failure, money, a state machine with guards — `scip-query` scaffolds a TLA+ model tied to indexed code and keeps it honest against that code:
|
|
256
|
+
A suppression is a versioned repository record that says one detector finding
|
|
257
|
+
is accepted or is not actionable for a stated reason. Its defining trait is
|
|
258
|
+
that it addresses one finding without weakening unrelated analysis.
|
|
505
259
|
|
|
506
260
|
```bash
|
|
507
|
-
scip-query
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
261
|
+
scip-query suppress SQ123 \
|
|
262
|
+
--check twin-drift \
|
|
263
|
+
--file src/example.ts \
|
|
264
|
+
--reason-code intentional-variation \
|
|
265
|
+
--reason "The two implementations follow different external contracts."
|
|
512
266
|
```
|
|
513
267
|
|
|
514
|
-
|
|
268
|
+
Commit relevant `.scipquery/suppressions/*.json` files with the code or policy
|
|
269
|
+
that justifies them. Suppressions are merge-friendly because each finding uses
|
|
270
|
+
its own file.
|
|
515
271
|
|
|
516
|
-
|
|
517
|
-
default. It streams bytes through the SHA-256 verifier instead of buffering the
|
|
518
|
-
response, rejects malformed or oversized `Content-Length`, and enforces the
|
|
519
|
-
same ceiling when the header is absent. Callers for one cache path serialize on
|
|
520
|
-
a token-owned lock and recheck the winner's checksum before fetching. Failed,
|
|
521
|
-
aborted, or competing operations remove only their random-token staging file;
|
|
522
|
-
the previously accepted cache remains available. Successful promotion flushes
|
|
523
|
-
the verified file and its containing directory before acknowledging the new
|
|
524
|
-
cache where the platform supports directory sync.
|
|
272
|
+
## Output and coverage
|
|
525
273
|
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
for the guarantees, failure outcomes, Windows limitation, and call-site matrix.
|
|
529
|
-
Process coordination uses one versioned, token-owned format with conservative
|
|
530
|
-
malformed-file recovery; see
|
|
531
|
-
[Process Lock Ownership and Recovery](docs/LOCK_PROTOCOL.md).
|
|
532
|
-
|
|
533
|
-
## Quick Start
|
|
274
|
+
Human output is the default because it keeps hierarchy, whitespace, and source
|
|
275
|
+
line numbers readable. Programmatic consumers can use:
|
|
534
276
|
|
|
535
277
|
```bash
|
|
536
|
-
scip-query
|
|
537
|
-
scip-query status --capabilities
|
|
538
|
-
|
|
539
|
-
scip-query stats
|
|
540
|
-
scip-query system src/auth
|
|
541
|
-
scip-query plan-context login
|
|
542
|
-
scip-query diff-impact
|
|
543
|
-
scip-query health
|
|
544
|
-
scip-query cleanup-plan --verify
|
|
545
|
-
scip-query health --write-baseline # start the ratchet
|
|
278
|
+
scip-query context RetryPolicy --json --result-only
|
|
546
279
|
```
|
|
547
280
|
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
- A language-specific SCIP indexer for your project
|
|
554
|
-
|
|
555
|
-
On Windows, the `scip` binary is installed automatically from npm:
|
|
556
|
-
`scip-query-scip-windows` is an OS-gated optional dependency (universal
|
|
557
|
-
package, x64 + ARM64) that only Windows installs fetch. Resolution order:
|
|
558
|
-
`scip` on PATH, then `SCIP_QUERY_SCIP_BIN`, then the sidecar package. Run
|
|
559
|
-
`scip-query check-deps` for platform-specific install instructions. The
|
|
560
|
-
[Windows sidecar release guide](docs/WINDOWS_SIDECAR_RELEASE.md) defines its
|
|
561
|
-
executable provenance, fail-closed build/pack checks, and registry identity
|
|
562
|
-
gate. Release operators can run `npm run verify:scip-windows-registry` for a
|
|
563
|
-
sidecar-only read, or `npm run release:npm:dry-run` for the complete
|
|
564
|
-
main-plus-sidecar preflight and registry reconciliation without publication.
|
|
565
|
-
The publishing command is `npm run release:npm`; direct `npm publish` refuses
|
|
566
|
-
to run because it cannot own the recoverable two-package ordering.
|
|
567
|
-
|
|
568
|
-
| Language | Indexer | Install |
|
|
569
|
-
| ----------------------------- | ---------------- | ----------------------------------------------------------------------------------------------------------------------------- |
|
|
570
|
-
| TypeScript / JavaScript / Vue | scip-typescript | `npm install -g @sourcegraph/scip-typescript` |
|
|
571
|
-
| Java / Scala / Kotlin | scip-java | [releases](https://github.com/sourcegraph/scip-java/releases) |
|
|
572
|
-
| Rust | rust-analyzer | Ships with rust-analyzer: `rust-analyzer scip` |
|
|
573
|
-
| Python | scip-python-plus | `npm install -g scip-python-plus` |
|
|
574
|
-
| Go | scip-go | `go install github.com/sourcegraph/scip-go@latest` |
|
|
575
|
-
| Ruby | scip-ruby | [releases](https://github.com/sourcegraph/scip-ruby/releases) |
|
|
576
|
-
| C / C++ | scip-clang | [releases](https://github.com/sourcegraph/scip-clang/releases) |
|
|
577
|
-
| C# / VB | scip-dotnet | [releases](https://github.com/sourcegraph/scip-dotnet/releases) |
|
|
578
|
-
| Dart | scip-dart | [releases](https://github.com/Workiva/scip-dart/releases) or `dart pub global activate scip_dart` |
|
|
579
|
-
| PHP | scip-php | [releases](https://github.com/davidrjenni/scip-php/releases) or Composer package `davidrjenni/scip-php` |
|
|
580
|
-
| Clojure / ClojureScript | scip-clojure | Requires a `scip-clojure` binary on PATH; source: [PlunderStruck/scip-clojure](https://github.com/PlunderStruck/scip-clojure) |
|
|
581
|
-
|
|
582
|
-
For Python, the executable may be `scip-python`, `scip-python-plus`, or both. `scip-query` accepts either name.
|
|
583
|
-
|
|
584
|
-
Vue single-file components are handled through the JavaScript/TypeScript indexer. `scip-query` also extracts the `<script>` or `<script setup>` block so symbol, reference, and import queries cover Vue components alongside regular `.ts` and `.js` files.
|
|
585
|
-
|
|
586
|
-
`augment-vue` uses one in-process Volar context by default. Calibrated projects
|
|
587
|
-
can opt into parallel computation with `SCIP_QUERY_AUGMENT_VUE_WORKERS=<count>`.
|
|
588
|
-
The CLI then owns every worker until exit: a timeout or peer failure terminates
|
|
589
|
-
and awaits all unfinished workers before removing their private result
|
|
590
|
-
directory. `SCIP_QUERY_AUGMENT_VUE_WORKER_TIMEOUT_MS` defaults to five minutes,
|
|
591
|
-
and `SCIP_QUERY_AUGMENT_VUE_WORKER_RESULT_MAX_BYTES` defaults to 64 MiB per
|
|
592
|
-
worker. Every result carries its run, worker, and task identities and is
|
|
593
|
-
size-checked before parsing, so a stale, partial, or mismatched result cannot
|
|
594
|
-
enter the deterministic worker-order merge.
|
|
595
|
-
|
|
596
|
-
`scip-query capabilities` prints project-level readiness plus a per-language matrix for SCIP indexing, source fallback evidence, semantic provider support, cleanup detector support, and cleanup verification coverage. Use it when you need to know whether a finding is graph-backed, semantic, heuristic, or compiler-verified for the language in front of you.
|
|
597
|
-
|
|
598
|
-
## How It Works
|
|
599
|
-
|
|
600
|
-
1. A SCIP indexer analyzes source code with the actual compiler, type checker, or language server and produces `index.scip`.
|
|
601
|
-
2. The `scip` CLI converts that protobuf file to a SQLite database: `index.db`.
|
|
602
|
-
3. `scip-query` runs SQL queries, language-aware source augmentation, and git-history analysis against it.
|
|
603
|
-
|
|
604
|
-
By default, indexes live in `~/.cache/scip-query/projects/<hash>/`, keeping project directories clean. Override paths with `.scipquery.json` or `SCIP_QUERY_*` environment variables. Reindexing writes per-language SCIP shards next to the SQLite index, so a mixed-language repo can reuse unchanged language outputs and rerun only the languages whose source/config inputs changed.
|
|
605
|
-
|
|
606
|
-
Each accepted worktree-local index is also stored beneath an immutable
|
|
607
|
-
`.scipquery-generations/<identity>/` directory. An atomic `state.json` pointer
|
|
608
|
-
selects the database, SCIP companion, and metadata as one unit; every
|
|
609
|
-
`ScipDatabase` retains that unit for its lifetime. The familiar top-level
|
|
610
|
-
`index.db`, `index.scip`, and `meta.json` files remain compatibility mirrors,
|
|
611
|
-
but internal queries do not reread them after opening a generation. This keeps
|
|
612
|
-
cursor identities and semantic requests attached to the same rows even during
|
|
613
|
-
a concurrent reindex. Each live reader publishes a process-identity lease.
|
|
614
|
-
Automatic collection retains the current and recovery generations, every
|
|
615
|
-
live-reader generation, and enough recent generations to stay within both an
|
|
616
|
-
eight-generation and 2 GiB logical default bound. Malformed reader ownership
|
|
617
|
-
fails closed; dead readers are reclaimed. `status` reports retained count,
|
|
618
|
-
logical bytes, oldest age, protected/readers counts, limits, and the last
|
|
619
|
-
collection result. The publication, crash, legacy-overlap, and retention rules
|
|
620
|
-
are documented in [Local Index Generations](docs/INDEX_GENERATIONS.md).
|
|
621
|
-
|
|
622
|
-
All `meta.json` consumers share one version decoder and an explicit capability
|
|
623
|
-
matrix. Version 2 remains readable, version 3 is current, and version 4 is a
|
|
624
|
-
reserved unsupported migration boundary. See
|
|
625
|
-
[Reindex Metadata Compatibility](docs/REINDEX_METADATA_COMPATIBILITY.md).
|
|
626
|
-
|
|
627
|
-
Git worktrees in the same repository also share immutable generations under
|
|
628
|
-
`~/.cache/scip-query/repositories/<repository-id>/`. A shared generation is a
|
|
629
|
-
complete index for one exact committed tree, indexing configuration, artifact
|
|
630
|
-
schema, and scip-query producer version; its immutability lets several
|
|
631
|
-
worktrees trust it without sharing later writes.
|
|
632
|
-
Before an index-reading command opens SQLite, a clean worktree with an exact
|
|
633
|
-
generation clones it into that worktree's normal writable cache. Filesystem
|
|
634
|
-
copy-on-write cloning is used when available, with an ordinary copy fallback;
|
|
635
|
-
hard links are never used. Dirty edits, watcher refreshes, locks, and local
|
|
636
|
-
`evidence.db` state therefore remain private to the worktree.
|
|
637
|
-
|
|
638
|
-
Each worktree lease names the exact shared generation protected from
|
|
639
|
-
collection. Lease publication, liveness touches, and repository cleanup share
|
|
640
|
-
one repository-cache lock. A touch rereads the current lease only after
|
|
641
|
-
acquiring that lock, validates its ownership checksum and current local
|
|
642
|
-
generation, and changes only `lastSeenAt`. If a newer generation was attached,
|
|
643
|
-
the lease was deleted or recreated, or its ownership changed while the touch
|
|
644
|
-
waited, the touch preserves that current state instead of replaying its stale
|
|
645
|
-
observation.
|
|
646
|
-
|
|
647
|
-
Automatic refresh follows the same boundary. When `watch.enabled` is true,
|
|
648
|
-
the first watcher-eligible command in each worktree starts or reuses a daemon
|
|
649
|
-
identified by that checkout's Git worktree ID. A Git worktree ID is a checkout
|
|
650
|
-
identifier derived from its filesystem path after symbolic-link redirects are
|
|
651
|
-
resolved and its checkout-specific Git control directory; that combination
|
|
652
|
-
distinguishes sibling worktrees even though they share repository objects. The
|
|
653
|
-
daemon observes only that worktree's files and Git index, and every reindex
|
|
654
|
-
child writes only to that worktree's writable `index.scip` and `index.db`. A
|
|
655
|
-
cross-platform source watcher maintains the directory subscriptions needed to
|
|
656
|
-
detect ordinary unstaged edits even when Node does not provide recursive
|
|
657
|
-
filesystem events, while separate Git polling detects commit and staging-state
|
|
658
|
-
changes. File events that arrive during a reindex still mark the watcher dirty,
|
|
659
|
-
but the queued rerun is suppressed when the completed index's source
|
|
660
|
-
fingerprint proves those events are already represented; a stale or unreadable
|
|
661
|
-
fingerprint always preserves the rerun. If the host refuses an event-backed
|
|
662
|
-
subscription because its open-file allowance is exhausted, that project
|
|
663
|
-
retries with 500 ms file polling; ordinary event-backed watchers do not pay
|
|
664
|
-
that polling cost. A
|
|
665
|
-
shared generation is only a warm starting snapshot; it never implies a shared
|
|
666
|
-
watcher or shared later writes. A daemon that exits after its configured idle
|
|
667
|
-
timeout starts warm again when that worktree is next used.
|
|
668
|
-
|
|
669
|
-
Command-triggered refresh intent is stored separately from disposable activity
|
|
670
|
-
timestamps. Each accepted demand is an immutable request with a deadline and
|
|
671
|
-
optional idempotency key; the daemon claims pending requests exclusively,
|
|
672
|
-
coalesces them deliberately, and acknowledges them only after the corresponding
|
|
673
|
-
reindex completes. A failed attempt returns its requests to pending, and a
|
|
674
|
-
successor daemon recovers claims left by a crashed owner. `watch --status`
|
|
675
|
-
reports pending, claimed, completed, and expired counts. The complete
|
|
676
|
-
at-least-once and retention contract is documented in
|
|
677
|
-
[Watch Refresh Requests](docs/WATCH_REFRESH_REQUESTS.md).
|
|
678
|
-
|
|
679
|
-
The primary checkout is only a possible source of a generation, never an
|
|
680
|
-
authority for a linked worktree. If its local cache already contains
|
|
681
|
-
uncommitted changes that are absent from a new worktree's `HEAD`, the full
|
|
682
|
-
source fingerprint differs and that cache is rejected. The new worktree uses
|
|
683
|
-
an existing immutable generation for its own `HEAD` or performs the one clean
|
|
684
|
-
build that creates it.
|
|
685
|
-
|
|
686
|
-
The same behavior applies whether a worktree was created by Git, Conductor, or
|
|
687
|
-
an agent. Concurrent cold worktrees at one snapshot coordinate one shared
|
|
688
|
-
publication. A removed managed worktree cache is deleted by the next
|
|
689
|
-
opportunistic sweep after its watcher, hydration, and index-build processes
|
|
690
|
-
have exited; a shared generation stays while a live worktree or process
|
|
691
|
-
references it, then remains for one unreferenced hour unless the 2 GiB
|
|
692
|
-
repository budget requires earlier eviction. Ownership checksums and physical
|
|
693
|
-
path containment prevent cleanup from following forged records or symlinks.
|
|
694
|
-
Explicit `dbPath`, `SCIP_QUERY_CACHE_DIR`, and
|
|
695
|
-
`SCIP_QUERY_INDEX_DB` locations are never shared or automatically deleted.
|
|
696
|
-
Those explicit overrides also bypass default path isolation, so pointing two
|
|
697
|
-
worktrees at the same mutable override is intentionally outside automatic
|
|
698
|
-
per-worktree protection.
|
|
699
|
-
Set `SCIP_QUERY_SHARED_CACHE=0` to restore worktree-local-only behavior.
|
|
700
|
-
|
|
701
|
-
Each rebuilt generation also records an affected-set shadow beside the index:
|
|
702
|
-
the files a future incremental writer would recompute, the normalized
|
|
703
|
-
documents/facts that the authoritative full rebuild actually changed, recall,
|
|
704
|
-
and any conservative fallback reason. `scip-query status` shows a compact
|
|
705
|
-
summary and telemetry path; `status --json` exposes the structured
|
|
706
|
-
`affectedSetShadow` object. Shadow results are observational in this phase and
|
|
707
|
-
never decide which indexer runs or which generation publishes.
|
|
708
|
-
Historical shadow rows are compact calibration summaries. They rotate at
|
|
709
|
-
8 MiB and retain one previous segment, bounding history near 16 MiB per
|
|
710
|
-
project; the complete latest record remains available for status diagnostics.
|
|
711
|
-
After acquiring a project's exclusive reindex lock, each reindex also removes
|
|
712
|
-
staging directories abandoned by interrupted earlier reindexes.
|
|
713
|
-
Watch and watcher-triggered reindex ownership records include the operating
|
|
714
|
-
system process start identity as well as the PID. `watch stop`, daemon
|
|
715
|
-
replacement, and manual preemption verify both values before signaling. A
|
|
716
|
-
legacy record or a platform lookup failure therefore fails closed with an
|
|
717
|
-
explicit recovery error instead of treating a reused PID as the old
|
|
718
|
-
tool-owned process.
|
|
719
|
-
Watcher shutdown stops new work and gives subscriptions and active reindex
|
|
720
|
-
ownership five seconds to drain. A dedicated watch service that cannot prove a
|
|
721
|
-
clean stop reports a degraded shutdown and exits so the operating system can
|
|
722
|
-
close stuck descriptors. `watch stop` allows six seconds for that graceful
|
|
723
|
-
path, then revalidates the exact process-start identity before forced
|
|
724
|
-
termination and waits up to one additional second to observe exit. A changed
|
|
725
|
-
or unavailable identity is never signaled, and ownership files are not cleaned
|
|
726
|
-
until the original process is known to have exited.
|
|
727
|
-
|
|
728
|
-
Finite subprocesses use explicit wall-time and output budgets. Quick binary
|
|
729
|
-
probes default to 10 seconds, Git operations to 30 seconds, isolated analysis
|
|
730
|
-
workers to 180 seconds, installers and index conversion to 300 seconds, and
|
|
731
|
-
language indexers to 600 seconds. Set `SCIP_QUERY_INDEXER_TIMEOUT_MS` to a
|
|
732
|
-
positive integer to override the indexer deadline. Command-specific checker,
|
|
733
|
-
TLA+, benchmark, and Rust semantic budgets continue to use their documented
|
|
734
|
-
options or environment settings. When an asynchronous finite child exceeds
|
|
735
|
-
its deadline or output budget, scip-query drains both streams, sends `TERM`,
|
|
736
|
-
escalates to `KILL` after a one-second grace period only while the recorded
|
|
737
|
-
process identity still matches, and reports completion only after the child
|
|
738
|
-
has closed. Detached watch and semantic services are deliberate exceptions:
|
|
739
|
-
their persisted identity, lease, request deadlines, and stop protocol own
|
|
740
|
-
their lifetime.
|
|
741
|
-
|
|
742
|
-
TypeScript monorepos can opt into project sharding with `indexer.typescript.projectMode: "workspace"`. In that mode, `scip-query` discovers repo-local TypeScript project roots, runs one `scip-typescript` process per project with bounded concurrency, merges the shard protobufs, and still publishes one TypeScript language index. Set `indexer.typescript.projects` to an explicit list of project directories or tsconfig paths when automatic discovery is too broad. When `projects` is set to a non-empty list, it is authoritative: only the listed projects are indexed, automatic discovery does not run, and the repo root is not re-added alongside them (even if the root tsconfig covers subdirectories) — files that are only covered by an excluded root tsconfig (e.g. shared ambient `.d.ts` files) drop out of the index, so pick the list deliberately. An empty or absent `projects` falls back to full discovery, unchanged. Workspace mode also caches each project shard: reindexing after an edit reruns only the changed projects and their dependents (workspace `package.json` dependencies and tsconfig `paths`/`references` targets count as dependencies), serves untouched projects from `language-indexes/typescript-projects/`, and reports every reuse decision in `reindex --json` shard diagnostics. Set `indexerConcurrency` when a repo needs a persistent worker cap; CLI `--indexer-concurrency` and `SCIP_QUERY_INDEXER_CONCURRENCY` still override ad hoc runs.
|
|
743
|
-
Use `indexer.typescript.pnpmWorkspaces` only with the default single-project mode; workspace mode passes explicit projects instead.
|
|
744
|
-
|
|
745
|
-
Do not enable workspace mode merely because a repository uses TypeScript. Use
|
|
746
|
-
it when the repository has multiple real tsconfig/project boundaries and the
|
|
747
|
-
setup/readiness evidence confirms them. Single-project repositories already
|
|
748
|
-
reuse unchanged TypeScript documents and keep a persistent ts-morph Project in
|
|
749
|
-
the demand-started service.
|
|
750
|
-
|
|
751
|
-
Clojure projects can pass a project-local `scip-clojure` config file through `.scipquery.json`:
|
|
752
|
-
|
|
753
|
-
```json
|
|
754
|
-
{
|
|
755
|
-
"$schema": "./node_modules/scip-query/docs/schemas/project-config.schema.json",
|
|
756
|
-
"schemaVersion": 2,
|
|
757
|
-
"languages": ["clojure"],
|
|
758
|
-
"indexer": {
|
|
759
|
-
"clojure": {
|
|
760
|
-
"configPath": ".scip-clojure.json"
|
|
761
|
-
}
|
|
762
|
-
}
|
|
763
|
-
}
|
|
764
|
-
```
|
|
281
|
+
Search output separates a complete occurrence ledger from source
|
|
282
|
+
materialization. Every exact matching path and line is listed with its owner;
|
|
283
|
+
the default expands only a representative source subset. Use the emitted
|
|
284
|
+
batched drilldowns for selected owners. `search --full` expands every source
|
|
285
|
+
window and is not needed to establish complete text-match coverage.
|
|
765
286
|
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
"schemaVersion": 1,
|
|
773
|
-
"producer": { "name": "scip-query", "version": "0.20.0" },
|
|
774
|
-
"command": "fan-in",
|
|
775
|
-
"resultSchemaVersion": 1,
|
|
776
|
-
"args": ["login"],
|
|
777
|
-
"options": { "json": true },
|
|
778
|
-
"result": []
|
|
779
|
-
}
|
|
780
|
-
```
|
|
287
|
+
Cross-command evidence citations are off by default. With an explicit
|
|
288
|
+
`SCIP_QUERY_SESSION`, a complete source unit, a byte-identical exact subset of a
|
|
289
|
+
prior exact source read, or a graph unit/edge may be replaced by a visible
|
|
290
|
+
receipt from the same index generation. Preview coverage never suppresses an
|
|
291
|
+
exact unit. Changed bytes, changed graph content, a new generation, or
|
|
292
|
+
`--reemit` force full evidence.
|
|
781
293
|
|
|
782
|
-
|
|
294
|
+
If output prints `Continue exactly:`, run the emitted command unchanged until
|
|
295
|
+
transport is complete. Transport completion means every rendered character was
|
|
296
|
+
retrieved; it does not make bounded analysis exhaustive.
|
|
783
297
|
|
|
784
|
-
|
|
298
|
+
Use `--full` only when complete command coverage can change a decision. Always
|
|
299
|
+
read a command's coverage note before claiming that every caller, consumer, or
|
|
300
|
+
finding was considered.
|
|
785
301
|
|
|
786
|
-
|
|
787
|
-
scip-query init
|
|
788
|
-
```
|
|
302
|
+
## Configuration
|
|
789
303
|
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
{
|
|
794
|
-
"$schema": "./node_modules/scip-query/docs/schemas/project-config.schema.json",
|
|
795
|
-
"schemaVersion": 2,
|
|
796
|
-
"languages": ["typescript"],
|
|
797
|
-
"watch": {
|
|
798
|
-
"enabled": true,
|
|
799
|
-
"debounceMs": 250,
|
|
800
|
-
"cooldownMs": 5000,
|
|
801
|
-
"gitPollMs": 2000,
|
|
802
|
-
"idleTimeoutMs": 600000,
|
|
803
|
-
"autoRefresh": true
|
|
804
|
-
}
|
|
805
|
-
}
|
|
806
|
-
```
|
|
304
|
+
Project policy lives in `.scipquery.json`. Common sections configure source
|
|
305
|
+
paths, generated or vendor exclusions, documentation snapshots, architecture
|
|
306
|
+
boundaries, declared coupling, coverage contracts, and watcher behavior.
|
|
807
307
|
|
|
808
|
-
|
|
809
|
-
the current format. The CLI reads both unversioned/explicit-v1 legacy files
|
|
810
|
-
and version 2. A setup command migrates a legacy file on its next authorized
|
|
811
|
-
config write, preserving fields it does not own. An unsupported future
|
|
812
|
-
version or malformed discriminator fails before any option is used and is
|
|
813
|
-
left byte-for-byte unchanged. `$schema` points editors at the JSON Schema
|
|
814
|
-
bundled with the installed package.
|
|
815
|
-
|
|
816
|
-
Creation is exclusive: if another process creates `.scipquery.json` first,
|
|
817
|
-
`init` preserves that complete file rather than replacing it.
|
|
818
|
-
|
|
819
|
-
Add optional fields such as `indexerConcurrency`, `indexer`, `entryRoots`,
|
|
820
|
-
`declaredCouplings`, and `suppressions` only when the project needs them.
|
|
821
|
-
|
|
822
|
-
`scip-query init` and a first `scip-query setup` enable this lifecycle. An
|
|
823
|
-
existing explicit `watch.enabled: false` remains an opt-out unless guided setup
|
|
824
|
-
selects the recommended enable action. With `watch.enabled`, normal commands
|
|
825
|
-
and agent hooks wake one per-project
|
|
826
|
-
background service. Relevant file/Git activity keeps it alive; it exits after
|
|
827
|
-
`idleTimeoutMs` of clean inactivity and wakes on the next command. Set the idle
|
|
828
|
-
timeout to `0` to keep it running. `scip-query watch` still provides foreground
|
|
829
|
-
mode, while `watch --daemon`, `watch --status`, and `watch --stop` expose the
|
|
830
|
-
background lifecycle. Command-line timing flags are process-local and apply
|
|
831
|
-
only when a foreground watcher or daemon starts; a live daemon refuses those
|
|
832
|
-
flags and names the required stop/start sequence instead of pretending its
|
|
833
|
-
timing changed. The default 5-second cooldown coalesces change bursts
|
|
834
|
-
into one refresh plus, when necessary, one trailing refresh; explicitly setting
|
|
835
|
-
`cooldownMs` to `0` opts into immediate scheduling. Both modes share one project
|
|
836
|
-
lock, so only one can own an
|
|
837
|
-
index cache. Stopping is an asynchronous drain: the watcher first rejects new
|
|
838
|
-
refreshes, continuously consumes a bounded tail of the active worker's output,
|
|
839
|
-
closes every source subscription, and waits for the worker to exit after
|
|
840
|
-
`TERM`/`KILL` escalation before it removes service state or releases the lock.
|
|
841
|
-
`watch --status` reports `Stopping safely` while that work is in progress. If a
|
|
842
|
-
subscription cannot close or worker exit cannot be established, the service
|
|
843
|
-
keeps an explicit degraded draining record and its ownership files instead of
|
|
844
|
-
advertising a clean stop; the reported reason is the recovery evidence.
|
|
845
|
-
Elapsed waits and idle control use a process-local monotonic clock; shared
|
|
846
|
-
heartbeats remain civil-time diagnostics and never authorize replacement or a
|
|
847
|
-
process signal by age alone. See [Time Semantics](docs/TIME_SEMANTICS.md).
|
|
848
|
-
|
|
849
|
-
The same demand-started service lazily owns TypeScript compiler Projects after
|
|
850
|
-
the first command that needs ts-morph semantics. Separate CLI processes reuse
|
|
851
|
-
that session through a repository-local bounded mailbox; source-only index
|
|
852
|
-
generations refresh the existing Projects, while configuration or uncertain
|
|
853
|
-
changes replace them. `watch --status` reports Project/session/request counts.
|
|
854
|
-
Current TypeScript and durable Rust mailbox operations use stable
|
|
855
|
-
content-derived identities, pending/inflight/response states, atomic
|
|
856
|
-
owner-expiring claims, retained idempotent completions, FIFO enqueue ordering,
|
|
857
|
-
typed item/byte backpressure, bounded cleanup, and pressure telemetry. Client
|
|
858
|
-
timeout or exit no longer deletes shared work; a service crash before response
|
|
859
|
-
is reclaimable, while a response published before a crash prevents
|
|
860
|
-
re-execution. The service rereads the clock before each claimed operation and
|
|
861
|
-
again after handler completion, so time spent on an earlier request cannot let
|
|
862
|
-
a later expired request begin or publish success. Idle mailbox polling backs
|
|
863
|
-
off from 50 ms to 250 ms and returns to 10 ms while draining work; mailbox
|
|
864
|
-
directories are initialized once per service ownership rather than on every
|
|
865
|
-
poll. The precise state machine, default limits, legacy overlap, and
|
|
866
|
-
failure matrix are documented in
|
|
867
|
-
[`docs/MAILBOX_LIFECYCLE.md`](docs/MAILBOX_LIFECYCLE.md).
|
|
868
|
-
Rust v3 additionally binds every accepted response to its request ID,
|
|
869
|
-
operation ID, mailbox-session identity, and authoritative absolute deadline;
|
|
870
|
-
its old/current/future compatibility matrix is in
|
|
871
|
-
[`docs/RUST_DURABLE_SESSION_PROTOCOL.md`](docs/RUST_DURABLE_SESSION_PROTOCOL.md).
|
|
872
|
-
The Rust semantic worker retains at most four rust-analyzer sessions. Linked
|
|
873
|
-
Cargo projects are resolved, deduplicated, and sorted before session reuse, so
|
|
874
|
-
equivalent project sets share one session regardless of input order. When the
|
|
875
|
-
capacity is full, the least-recently-used session completes its LSP shutdown
|
|
876
|
-
and process-tree reap before a replacement starts; an unproven shutdown blocks
|
|
877
|
-
replacement instead of allowing overlapping language servers.
|
|
878
|
-
It also reports a rolling 24-hour reindex activity summary: rebuilt, reused,
|
|
879
|
-
failed, and freshness-proven suppressed refreshes plus estimated logical output
|
|
880
|
-
bytes. The estimate counts scip-query artifacts emitted by rebuilt refreshes;
|
|
881
|
-
it is not a measurement of physical SSD writes. The underlying
|
|
882
|
-
`reindex-activity.jsonl` history uses two bounded 1 MiB segments. Append,
|
|
883
|
-
rotation, and retained-set reads share a process-instance lock; incomplete
|
|
884
|
-
crash tails are trimmed or ignored without deleting earlier complete lines.
|
|
885
|
-
Status labels the resulting summary `complete`, `partial`, or `unavailable`
|
|
886
|
-
and reports read, invalid, skipped, read-error, and incomplete-tail counts.
|
|
887
|
-
Telemetry append failure never changes the authoritative reindex result, but
|
|
888
|
-
it is returned to the caller and surfaced as a warning or watch-state error
|
|
889
|
-
instead of disappearing. These observations are process-visible rather than
|
|
890
|
-
crash-durable. See
|
|
891
|
-
[`docs/TELEMETRY_RETENTION.md`](docs/TELEMETRY_RETENTION.md).
|
|
892
|
-
The refresh-request counters reported beside it describe durable demand
|
|
893
|
-
admission and processing state, not reindex frequency.
|
|
894
|
-
If the service is stopped, incompatible, busy beyond its bound, or returns an
|
|
895
|
-
invalid response, the command falls back to the existing in-process ts-morph
|
|
896
|
-
provider.
|
|
897
|
-
|
|
898
|
-
Rust semantic requests use a separate demand-started durable rust-analyzer
|
|
899
|
-
session by default. It remains stopped until a Rust semantic request needs it,
|
|
900
|
-
exits after its clean idle period, and automatically falls back to the
|
|
901
|
-
per-command worker on helper/readiness/timeout/request failure. Set
|
|
902
|
-
`SCIP_RUST_SEMANTIC_DURABLE_SESSION=0` for an explicit worker-only opt-out.
|
|
903
|
-
The LSP transport accepts at most a 16 KiB response header and a 64 MiB JSON
|
|
904
|
-
message by default, with a 64 KiB header ceiling and a 256 MiB combined
|
|
905
|
-
wire-buffer ceiling even for programmatic overrides. Missing, invalid,
|
|
906
|
-
duplicate, unsafe, or oversized `Content-Length` framing kills that transport
|
|
907
|
-
once, clears its retained bytes, and fails all outstanding semantic/readiness
|
|
908
|
-
work so the normal worker or graph/source fallback can take over.
|
|
909
|
-
|
|
910
|
-
Use `declaredCouplings` for files that intentionally form one maintenance unit.
|
|
911
|
-
These pairs are treated as structurally linked by `co-change` and health, while
|
|
912
|
-
still appearing in file-specific exploration. The cleanup detector example
|
|
913
|
-
keeps dead-code, isolated-callable, and stale-abstraction detectors together
|
|
914
|
-
because they share candidate and evidence policy changes:
|
|
915
|
-
|
|
916
|
-
```json
|
|
917
|
-
{
|
|
918
|
-
"declaredCouplings": [
|
|
919
|
-
{
|
|
920
|
-
"name": "cleanup detector family",
|
|
921
|
-
"reason": "These detectors share candidate, evidence, and health policy changes.",
|
|
922
|
-
"files": [
|
|
923
|
-
"src/queries/cleanup/dead.ts",
|
|
924
|
-
"src/queries/cleanup/isolated.ts",
|
|
925
|
-
"src/queries/cleanup/stale-abstractions.ts"
|
|
926
|
-
]
|
|
927
|
-
}
|
|
928
|
-
]
|
|
929
|
-
}
|
|
930
|
-
```
|
|
308
|
+
Validate it with:
|
|
931
309
|
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
dead and isolated cleanup detectors.
|
|
936
|
-
|
|
937
|
-
Useful environment variables:
|
|
310
|
+
```bash
|
|
311
|
+
scip-query config-validate
|
|
312
|
+
```
|
|
938
313
|
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
| `SCIP_QUERY_PROJECT_ROOT` | Override the project root directory |
|
|
942
|
-
| `SCIP_QUERY_INDEX_DB` | Override the SQLite database path and bypass automatic worktree sharing |
|
|
943
|
-
| `SCIP_QUERY_INDEX_SCIP` | Override the SCIP protobuf path |
|
|
944
|
-
| `SCIP_QUERY_CACHE_DIR` | Override the cache directory and bypass automatic worktree sharing |
|
|
945
|
-
| `SCIP_QUERY_SHARED_CACHE` | Set to `0` to disable shared generations, evidence, leases, and cleanup |
|
|
946
|
-
| `SCIP_QUERY_SCIP_BIN` | Path to a local `scip` binary (overrides PATH and the Windows sidecar) |
|
|
314
|
+
Keep configuration small. Add a rule only when an observed repository fact or
|
|
315
|
+
team policy requires it.
|
|
947
316
|
|
|
948
|
-
|
|
317
|
+
## Command reference
|
|
949
318
|
|
|
950
|
-
|
|
319
|
+
The generated syntax catalog is in
|
|
320
|
+
[`docs/COMMAND_REFERENCE.md`](docs/COMMAND_REFERENCE.md). The one bundled
|
|
321
|
+
`scip-query` skill teaches mapping, ordinary planning, architecture checks,
|
|
322
|
+
and focused use of the React, Vue, and general cleanup detectors.
|
|
951
323
|
|
|
952
|
-
|
|
953
|
-
- [Detector Guide](docs/DETECTOR_GUIDE.md): what each detector measures, the differences between the confusable ones, and which check to run after which kind of change.
|
|
954
|
-
- [Agent Guide](docs/AGENT_GUIDE.md): goal-oriented workflows for tracing, planning, cleanup, quality checks, and change verification.
|
|
955
|
-
- [Command Reference](docs/COMMAND_REFERENCE.md): generated command syntax, descriptions, and options.
|
|
956
|
-
- [CLI JSON output contract](docs/CLI_JSON_OUTPUT.md): versioned envelopes, compatibility rules, and schema.
|
|
957
|
-
- [Security model](docs/SECURITY_MODEL.md): untrusted-checkout boundaries, authority flags, input budgets, and complete-output pagination.
|
|
958
|
-
- [Programmatic API](docs/API.md): using the query functions from TypeScript.
|
|
959
|
-
- [Historical plans](https://github.com/PlunderStruck/scip-query/tree/main/docs/plans): implementation notes and completed cleanup plans.
|
|
324
|
+
## Development
|
|
960
325
|
|
|
961
|
-
|
|
326
|
+
```bash
|
|
327
|
+
npm install
|
|
328
|
+
npm run typecheck
|
|
329
|
+
npm test
|
|
330
|
+
npm run build
|
|
331
|
+
```
|
|
962
332
|
|
|
963
|
-
|
|
333
|
+
The React and Vue detector suites are part of the normal test surface and must
|
|
334
|
+
remain passing when the workflow or command surface changes.
|