scip-query 0.10.12 → 0.11.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 +45 -0
- package/{vendor/scip/LICENSE.scip → LICENSE} +1 -0
- package/README.md +141 -49
- package/dist/augment-vue-worker.js +1 -1
- package/dist/chunk-2VSDXOG5.js +2 -0
- package/dist/chunk-343O6EVV.js +2 -0
- package/dist/{chunk-RUV5IY25.js → chunk-3KDUITBE.js} +2 -2
- package/dist/chunk-3T2FNHIU.js +2 -0
- package/dist/{chunk-EOLGSSDR.js → chunk-3V6JQQM5.js} +2 -2
- package/dist/chunk-5AAAEZ2Z.js +2 -0
- package/dist/chunk-6Q6OFLFQ.js +8 -0
- package/dist/chunk-6XA4LDHY.js +2 -0
- package/dist/chunk-75X52JTA.js +2 -0
- package/dist/{chunk-LEHVP4DY.js → chunk-7HB3CZFD.js} +2 -2
- package/dist/chunk-7JZRFDCU.js +2 -0
- package/dist/{chunk-SQNHOOJ5.js → chunk-7XL7J7PT.js} +2 -2
- package/dist/{chunk-GKB4JJDU.js → chunk-ALHNAPS2.js} +2 -2
- package/dist/{chunk-TBCHRDAC.js → chunk-BDRBPG7Y.js} +2 -2
- package/dist/chunk-BN5SXXQS.js +40 -0
- package/dist/chunk-C4ICAIJ4.js +3 -0
- package/dist/{chunk-2GLNBCHB.js → chunk-CMHYBXJB.js} +2 -2
- package/dist/{chunk-S2MRVIJ5.js → chunk-DRPAQAFM.js} +6 -6
- package/dist/chunk-FERAXG6Y.js +72 -0
- package/dist/chunk-FLJJLSGB.js +2 -0
- package/dist/chunk-FXG3PHVW.js +9 -0
- package/dist/{chunk-JS6B76AQ.js → chunk-GCN2P4EJ.js} +2 -2
- package/dist/chunk-GHXRVCIY.js +21 -0
- package/dist/chunk-GNG622H3.js +3 -0
- package/dist/chunk-H4LUPLEJ.js +2 -0
- package/dist/{chunk-XUCZ3RQ5.js → chunk-H56MGERE.js} +4 -4
- package/dist/chunk-H7NSJ7L2.js +5 -0
- package/dist/chunk-HINMXZ6J.js +2 -0
- package/dist/chunk-HXXMPYEF.js +2 -0
- package/dist/{chunk-A4UTLKHU.js → chunk-HZKMEXA3.js} +2 -2
- package/dist/{chunk-T3AEVJBG.js → chunk-IFSX6YVU.js} +2 -2
- package/dist/chunk-ISLWJ4PY.js +10 -0
- package/dist/chunk-J5WVNZ6O.js +2 -0
- package/dist/chunk-K2HYR5A7.js +3 -0
- package/dist/{chunk-UVPY3RUZ.js → chunk-K6UI6EBZ.js} +2 -2
- package/dist/{chunk-MNCQPMCH.js → chunk-KJCDEDQW.js} +2 -2
- package/dist/{chunk-KZ4MG5NY.js → chunk-KKMOB3OJ.js} +2 -2
- package/dist/{chunk-ELC77ZDE.js → chunk-KMVGRIO2.js} +2 -2
- package/dist/chunk-LWOOTRHC.js +2 -0
- package/dist/{chunk-DQ6433ZG.js → chunk-LZNLRE4X.js} +17 -8
- package/dist/{chunk-7C6JBBE4.js → chunk-M2YXL62V.js} +2 -2
- package/dist/chunk-MNEJYEHW.js +3 -0
- package/dist/chunk-MTDBHTSF.js +2 -0
- package/dist/{chunk-VB2EZZPA.js → chunk-N2Z3CU7X.js} +2 -2
- package/dist/{chunk-2UVCH7CQ.js → chunk-N7PNFLGY.js} +2 -2
- package/dist/chunk-NAH5EAZS.js +6 -0
- package/dist/{chunk-XHMVZFA6.js → chunk-NBXK32I6.js} +2 -2
- package/dist/chunk-NJJ7AS4F.js +2 -0
- package/dist/{chunk-ANUEY5WV.js → chunk-NLMRJ7SI.js} +2 -2
- package/dist/chunk-ODVITBYU.js +26 -0
- package/dist/chunk-ORBRX2QJ.js +2 -0
- package/dist/{chunk-NTSR6SRP.js → chunk-P36UR5II.js} +2 -2
- package/dist/chunk-PYZZBIEU.js +3 -0
- package/dist/chunk-PZS6J5YG.js +16 -0
- package/dist/{chunk-3XSNW5XB.js → chunk-QARYU7R3.js} +2 -2
- package/dist/chunk-QJ3FK4TB.js +38 -0
- package/dist/{chunk-4ISHQ7UW.js → chunk-QXGTGE2C.js} +4 -4
- package/dist/chunk-QZ4JVECJ.js +2 -0
- package/dist/{chunk-63CI3IXR.js → chunk-R3JY4EZ4.js} +10 -10
- package/dist/{chunk-FX6ULETZ.js → chunk-R5336VHZ.js} +2 -2
- package/dist/chunk-RJMXSHKM.js +2 -0
- package/dist/chunk-STBXCPKY.js +5 -0
- package/dist/chunk-T2FQ4GHD.js +9 -0
- package/dist/chunk-TFWDJDGO.js +2 -0
- package/dist/chunk-TG7QSYCJ.js +2 -0
- package/dist/{chunk-ZUUNREKS.js → chunk-TTS75UF2.js} +5 -5
- package/dist/{chunk-DDQONX6B.js → chunk-U7I373V4.js} +2 -2
- package/dist/chunk-UIKLA3F5.js +2 -0
- package/dist/{chunk-6BN3EHQE.js → chunk-UMPNL7T6.js} +2 -2
- package/dist/chunk-URSSPS5H.js +2 -0
- package/dist/chunk-VGMUFW3J.js +2 -0
- package/dist/chunk-VXTNADIW.js +18 -0
- package/dist/{chunk-PWAK75BU.js → chunk-VYF5HA76.js} +2 -2
- package/dist/chunk-WFGOH2UI.js +43 -0
- package/dist/chunk-WGA5BBTA.js +4 -0
- package/dist/chunk-WIBFXSYB.js +6 -0
- package/dist/chunk-WPSS37EW.js +2 -0
- package/dist/chunk-WQHWIVA7.js +3 -0
- package/dist/chunk-WS3Z6W3M.js +65 -0
- package/dist/chunk-WXVGNFAO.js +2 -0
- package/dist/{chunk-RXINFVBN.js → chunk-WZLPXFZU.js} +2 -2
- package/dist/chunk-X4O6K47U.js +2 -0
- package/dist/chunk-X6OGDTQH.js +2 -0
- package/dist/chunk-XEMQUN3Z.js +20 -0
- package/dist/{chunk-OFXN2BCT.js → chunk-XHWLNQVZ.js} +2 -2
- package/dist/chunk-XMR747CP.js +2 -0
- package/dist/{chunk-JJ5SAWBT.js → chunk-Y6L4LXPG.js} +2 -2
- package/dist/chunk-YCPASUCX.js +2 -0
- package/dist/chunk-YZXV3CU3.js +60 -0
- package/dist/{chunk-XRUGSM76.js → chunk-ZEKBR4OK.js} +2 -2
- package/dist/chunk-ZMGBWSFZ.js +2 -0
- package/dist/cli.js +446 -280
- package/dist/{config-types-dvHOz0zU.d.ts → config-types-BrHl3Bge.d.ts} +57 -0
- package/dist/{db-rMZO5JFK.d.ts → db-_Bdx0E1W.d.ts} +1 -1
- package/dist/diff-gate-types-CG2YQ_ei.d.ts +4 -0
- package/dist/{frontend-behavior-evidence-BxKpKWUu.d.ts → frontend-behavior-evidence-EfM4_9bc.d.ts} +1 -1
- package/dist/{health-CtTIGh6H.d.ts → health-BEZ1Rt0S.d.ts} +54 -2
- package/dist/index.d.ts +4 -68
- package/dist/index.js +1 -1
- package/dist/postinstall.js +1 -4
- package/dist/queries/affected.d.ts +2 -2
- package/dist/queries/affected.js +1 -1
- package/dist/queries/bottlenecks.d.ts +2 -2
- 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 +2 -2
- 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 +12 -2
- package/dist/queries/co-change.js +1 -1
- package/dist/queries/code.d.ts +2 -2
- package/dist/queries/code.js +1 -1
- package/dist/queries/complexity-hotspots.d.ts +7 -3
- package/dist/queries/complexity-hotspots.js +1 -1
- package/dist/queries/complexity.d.ts +42 -4
- package/dist/queries/complexity.js +1 -1
- package/dist/queries/convergence.d.ts +2 -2
- package/dist/queries/convergence.js +1 -1
- package/dist/queries/coupling.d.ts +2 -2
- package/dist/queries/coupling.js +1 -1
- package/dist/queries/cycles.d.ts +12 -3
- package/dist/queries/cycles.js +1 -1
- package/dist/queries/dataflow.d.ts +2 -2
- package/dist/queries/dataflow.js +1 -1
- package/dist/queries/dead.d.ts +3 -3
- package/dist/queries/dead.js +1 -1
- package/dist/queries/deep-chains.d.ts +2 -2
- package/dist/queries/deep-chains.js +1 -1
- package/dist/queries/deps.d.ts +2 -2
- package/dist/queries/deps.js +1 -1
- package/dist/queries/diff-gate.d.ts +65 -8
- package/dist/queries/diff-gate.js +1 -1
- package/dist/queries/diff-impact.d.ts +21 -3
- package/dist/queries/diff-impact.js +1 -1
- package/dist/queries/doc-drift.d.ts +29 -2
- package/dist/queries/doc-drift.js +1 -1
- package/dist/queries/drift.d.ts +15 -3
- package/dist/queries/drift.js +1 -1
- package/dist/queries/duplicate-bodies.d.ts +55 -0
- package/dist/queries/duplicate-bodies.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 +2 -2
- package/dist/queries/fan.js +1 -1
- package/dist/queries/files.d.ts +4 -3
- package/dist/queries/files.js +1 -1
- package/dist/queries/health.d.ts +3 -3
- package/dist/queries/health.js +1 -1
- package/dist/queries/hierarchy.d.ts +2 -2
- package/dist/queries/hierarchy.js +1 -1
- package/dist/queries/hotspots.d.ts +2 -2
- 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 +3 -2
- package/dist/queries/incomplete-migration.js +1 -1
- package/dist/queries/index.d.ts +12 -7
- 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/outline.d.ts +2 -2
- package/dist/queries/outline.js +1 -1
- package/dist/queries/passthrough-candidates.d.ts +11 -3
- package/dist/queries/passthrough-candidates.js +1 -1
- package/dist/queries/plan-context.d.ts +3 -2
- package/dist/queries/plan-context.js +1 -1
- package/dist/queries/react-component-duplicates.d.ts +7 -2
- package/dist/queries/react-component-duplicates.js +1 -1
- package/dist/queries/react-hook-candidates.d.ts +3 -3
- 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/refs.d.ts +2 -2
- package/dist/queries/refs.js +1 -1
- package/dist/queries/self-audit.d.ts +4 -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 +17 -10
- package/dist/queries/similar-signatures.js +1 -1
- package/dist/queries/similar.d.ts +42 -3
- package/dist/queries/similar.js +1 -1
- package/dist/queries/slice.d.ts +2 -2
- package/dist/queries/slice.js +1 -1
- 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 +2 -2
- 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.d.ts +2 -2
- package/dist/queries/system.js +1 -1
- package/dist/queries/trace.d.ts +2 -2
- package/dist/queries/trace.js +1 -1
- package/dist/queries/twin-ab.d.ts +55 -0
- package/dist/queries/twin-ab.js +2 -0
- package/dist/queries/twin-drift.d.ts +97 -0
- package/dist/queries/twin-drift.js +2 -0
- 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/vue-component-duplicates.d.ts +7 -2
- package/dist/queries/vue-component-duplicates.js +1 -1
- package/dist/queries/vue-composable-candidates.d.ts +3 -3
- package/dist/queries/vue-composable-candidates.js +1 -1
- package/dist/queries/vue-large-view-pressure.d.ts +6 -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/reindex-worker.js +9 -9
- package/dist/reindex.d.ts +3 -3
- package/dist/reindex.js +19 -19
- package/dist/runtime.d.ts +11 -6
- package/dist/runtime.js +2 -2
- package/dist/{scip-cli-trnNvymv.d.ts → scip-cli-C7cg4ZHR.d.ts} +1 -1
- package/dist/symbol-types-DaoeXKUt.d.ts +66 -0
- package/docs/AGENT_GUIDE.md +20 -18
- package/docs/AI_FAILURE_MODES.md +36 -13
- package/docs/API.md +1 -1
- package/docs/COMMAND_REFERENCE.md +56 -13
- package/docs/DETECTOR_GUIDE.md +20 -3
- package/docs/REGEX_POLICY.md +34 -0
- package/docs/analyzer-inventory.md +40 -3
- package/docs/analyzer-validation-ledger.md +34 -6
- package/package.json +21 -7
- package/scripts/build-scip-windows.mjs +10 -7
- package/skills/_shared/SKILL.md +243 -0
- package/skills/_shared/agents/openai.yaml +4 -0
- package/skills/scip-api-impact/SKILL.md +55 -71
- package/skills/scip-claim-audit/SKILL.md +105 -0
- package/skills/scip-claim-audit/agents/openai.yaml +4 -0
- package/skills/scip-cleanup-audit/SKILL.md +122 -0
- package/skills/scip-cleanup-audit/agents/openai.yaml +4 -0
- package/skills/scip-cleanup-improve/SKILL.md +84 -0
- package/skills/scip-cleanup-improve/agents/openai.yaml +4 -0
- package/skills/scip-concrete-plan/SKILL.md +181 -0
- package/skills/scip-concrete-plan/agents/openai.yaml +4 -0
- package/skills/scip-conductor/SKILL.md +133 -0
- package/skills/scip-conductor/agents/openai.yaml +4 -0
- package/skills/scip-debug/SKILL.md +60 -58
- package/skills/scip-diagram/SKILL.md +64 -94
- package/skills/scip-directory-architecture/SKILL.md +65 -107
- package/skills/scip-doc-reconcile/SKILL.md +56 -67
- package/skills/scip-explore/SKILL.md +78 -210
- package/skills/scip-hyper-optimization/SKILL.md +124 -198
- package/skills/scip-integrity-audit/SKILL.md +103 -0
- package/skills/scip-integrity-audit/agents/openai.yaml +4 -0
- package/skills/scip-language-playbook/SKILL.md +56 -326
- package/skills/scip-maintainability/SKILL.md +80 -219
- package/skills/scip-probe-reachability/SKILL.md +92 -0
- package/skills/scip-probe-reachability/agents/openai.yaml +4 -0
- package/skills/scip-query/SKILL.md +108 -124
- package/skills/scip-react-maintainability/SKILL.md +64 -82
- package/skills/scip-setup/SKILL.md +121 -0
- package/skills/scip-setup/agents/openai.yaml +4 -0
- package/skills/scip-tla-model-system/SKILL.md +138 -0
- package/skills/scip-tla-model-system/agents/openai.yaml +4 -0
- package/skills/scip-triage-issue/SKILL.md +53 -41
- package/skills/scip-twin-drift/SKILL.md +107 -0
- package/skills/scip-twin-drift/agents/openai.yaml +4 -0
- package/skills/scip-verify/SKILL.md +70 -88
- package/skills/scip-vue-maintainability/SKILL.md +67 -94
- package/dist/chunk-2DOW7QCA.js +0 -71
- package/dist/chunk-2FMFF4RI.js +0 -2
- package/dist/chunk-5GXTUANY.js +0 -2
- package/dist/chunk-5JHEN5VN.js +0 -25
- package/dist/chunk-62ULXMQ7.js +0 -18
- package/dist/chunk-7EK7OSWS.js +0 -2
- package/dist/chunk-7IWIMNHI.js +0 -2
- package/dist/chunk-7XTO4YXB.js +0 -8
- package/dist/chunk-AOWFUGDL.js +0 -2
- package/dist/chunk-AREANYIA.js +0 -3
- package/dist/chunk-AZBELWZQ.js +0 -7
- package/dist/chunk-B32FX5KB.js +0 -2
- package/dist/chunk-B6MJ5VQV.js +0 -2
- package/dist/chunk-CXWCLVYL.js +0 -2
- package/dist/chunk-CYHIKTJN.js +0 -3
- package/dist/chunk-DFSEARAU.js +0 -2
- package/dist/chunk-DVFP6PZI.js +0 -2
- package/dist/chunk-E3ADDB43.js +0 -2
- package/dist/chunk-F6IXELII.js +0 -20
- package/dist/chunk-FMGVZBS2.js +0 -2
- package/dist/chunk-GG5LHT27.js +0 -2
- package/dist/chunk-H7JF2CKK.js +0 -2
- package/dist/chunk-HHOMJCP5.js +0 -4
- package/dist/chunk-HRDSU5FN.js +0 -9
- package/dist/chunk-HWVYTJOV.js +0 -2
- package/dist/chunk-JNMLBL36.js +0 -2
- package/dist/chunk-L446VQYQ.js +0 -2
- package/dist/chunk-LDJUB7XW.js +0 -2
- package/dist/chunk-MYTUWXHK.js +0 -4
- package/dist/chunk-N25HPUOK.js +0 -2
- package/dist/chunk-NABVR6B7.js +0 -2
- package/dist/chunk-NBNEVLRC.js +0 -3
- package/dist/chunk-ONPCQ2PM.js +0 -6
- package/dist/chunk-Q5P7NOVM.js +0 -2
- package/dist/chunk-RGKRYO22.js +0 -4
- package/dist/chunk-RM2WQ75T.js +0 -2
- package/dist/chunk-ROGZXWN2.js +0 -2
- package/dist/chunk-RSSXKJ6J.js +0 -38
- package/dist/chunk-RVGEZYMQ.js +0 -2
- package/dist/chunk-SA3DPTHT.js +0 -7
- package/dist/chunk-SGTKURU6.js +0 -52
- package/dist/chunk-T4N2ZRVY.js +0 -21
- package/dist/chunk-THB6AM3V.js +0 -11
- package/dist/chunk-ULHLDOD6.js +0 -4
- package/dist/chunk-UQ73QF5D.js +0 -43
- package/dist/chunk-UUBMFL3F.js +0 -59
- package/dist/chunk-V5FGK3DZ.js +0 -2
- package/dist/chunk-WTY5FERW.js +0 -2
- package/dist/chunk-WUOB4DHH.js +0 -6
- package/dist/chunk-YFQIKYOP.js +0 -2
- package/dist/chunk-Z2LDWIJV.js +0 -5
- package/dist/chunk-ZNWWVYQL.js +0 -3
- package/skills/concrete-plan/SKILL.md +0 -372
- package/skills/concrete-plan/agents/openai.yaml +0 -4
- package/skills/scip-adoption/SKILL.md +0 -122
- package/skills/scip-adoption/agents/openai.yaml +0 -4
- package/skills/scip-ai-cleanup/SKILL.md +0 -153
- package/skills/scip-ai-cleanup/agents/openai.yaml +0 -4
- package/skills/scip-debloat/SKILL.md +0 -439
- package/skills/scip-debloat/agents/openai.yaml +0 -4
- package/skills/scip-health-audit/SKILL.md +0 -162
- package/skills/scip-health-audit/agents/openai.yaml +0 -4
- package/skills/scip-health-improve/SKILL.md +0 -155
- package/skills/scip-health-improve/agents/openai.yaml +0 -4
- package/skills/scip-query-setup/SKILL.md +0 -170
- package/skills/scip-query-setup/agents/openai.yaml +0 -3
- package/vendor/scip/README.md +0 -6
- package/vendor/scip/win32-arm64/scip.exe +0 -0
- package/vendor/scip/win32-x64/scip.exe +0 -0
|
@@ -1,439 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: scip-debloat
|
|
3
|
-
description: Comprehensive codebase de-bloating using scip-query. Use when the user asks to clean up a codebase, find dead code, delete bloat, remove duplication, consolidate variants, shrink a module, or audit structural waste. Finds dead code, duplication, unnecessary abstractions, pattern drift, and consolidation opportunities, then produces a prioritized action list. Use scip-health-improve instead when the user wants an autonomous health-score campaign.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Codebase De-Bloating with scip-query
|
|
7
|
-
|
|
8
|
-
You are performing a comprehensive codebase audit to find every opportunity to reduce bloat, eliminate duplication, consolidate similar code, remove unnecessary abstractions, and improve structural health. You are thorough — you check from every angle, not just the obvious ones. Every finding must come from `scip-query`.
|
|
9
|
-
|
|
10
|
-
This is not a score-maxing workflow. Health scores, finding counts, and LOC totals are diagnostic signals. The objective is to make the codebase easier to understand and safer to change by removing unnecessary structure, naming hidden policies, and preserving real behavior.
|
|
11
|
-
|
|
12
|
-
---
|
|
13
|
-
|
|
14
|
-
## Scope Boundary
|
|
15
|
-
|
|
16
|
-
Use `scip-debloat` for bloat-specific discovery and action planning. Use
|
|
17
|
-
`scip-health-improve` when the user wants the agent to keep applying confirmed
|
|
18
|
-
fixes until the health score is as high as reasonably possible.
|
|
19
|
-
|
|
20
|
-
---
|
|
21
|
-
|
|
22
|
-
## Hard Rules
|
|
23
|
-
|
|
24
|
-
1. **Run `scip-query health` first.** It aggregates all analyses and gives you the prioritized starting point. Don't skip it.
|
|
25
|
-
|
|
26
|
-
2. **Do not chase the score.** Do not recommend work merely because it raises `health`, reduces a detector count, or deletes LOC. A finding is actionable only when the change removes a real maintenance burden while preserving required behavior.
|
|
27
|
-
|
|
28
|
-
3. **Check from every angle.** Dead code is the easy win. Go deeper — similar functions, stale abstractions, wrapper indirection, pattern drift, convergence opportunities, passthrough functions. Each catches a different class of bloat.
|
|
29
|
-
|
|
30
|
-
4. **Verify before recommending deletion.** Before saying "delete X," confirm it's truly unused: check `scip-query refs`, `scip-query affected`, and whether it's an entry point (CLI, worker, test file). Entry points appear dead because nothing imports them.
|
|
31
|
-
|
|
32
|
-
5. **Distinguish accidental variation from essential variation.** Accidental variation is difference in code shape that does not reflect a real behavior, domain, runtime, or compatibility difference. Essential variation is difference that must remain because the real units differ. Consolidate the first; preserve the second.
|
|
33
|
-
|
|
34
|
-
6. **Produce concrete actions.** Don't say "there's some duplication." Say "functions A and B have 80% callee overlap — consolidate into a shared helper with the 2 divergent callees as parameters (per `scip-query convergence A B`)."
|
|
35
|
-
|
|
36
|
-
7. **The report goes in `reports/debloat/YYYY-MM-DD-<scope>.md`.** If no reports directory exists, use the project root.
|
|
37
|
-
|
|
38
|
-
---
|
|
39
|
-
|
|
40
|
-
## Start Here: The Verified Pipeline
|
|
41
|
-
|
|
42
|
-
Before working the angles below one by one, run the high-leverage trio:
|
|
43
|
-
|
|
44
|
-
```bash
|
|
45
|
-
scip-query cleanup-plan --verify --json # cascade dead-code plan, COMPILER-VERIFIED per batch
|
|
46
|
-
scip-query recent-duplicates # recent code that re-implements established code
|
|
47
|
-
scip-query doc-drift # docs whose referenced code moved on without them
|
|
48
|
-
```
|
|
49
|
-
|
|
50
|
-
`cleanup-plan --verify` subsumes the manual dead-code workflow: it runs dead
|
|
51
|
-
code to a fixpoint (deleting batch 0 makes batch 1 dead), applies each batch
|
|
52
|
-
in a throwaway worktree, and runs the project's own checker (tsc / cargo
|
|
53
|
-
check) differentially. Only act on batches stamped COMPILER-VERIFIED; FAILED
|
|
54
|
-
output names the references the static evidence missed. For AI-generated
|
|
55
|
-
codebases specifically, prefer the dedicated scip-ai-cleanup skill.
|
|
56
|
-
|
|
57
|
-
Apply one verified batch at a time:
|
|
58
|
-
|
|
59
|
-
```bash
|
|
60
|
-
scip-query cleanup-apply --verified --batch 0
|
|
61
|
-
```
|
|
62
|
-
|
|
63
|
-
Use `--all` only after explicit human approval. Use `--force-dirty` only after
|
|
64
|
-
inspecting the touched files and confirming existing edits are unrelated.
|
|
65
|
-
|
|
66
|
-
After cleanup, ratchet the result so it never regresses:
|
|
67
|
-
|
|
68
|
-
```bash
|
|
69
|
-
scip-query health --write-baseline # commit .scipquery-baseline.json
|
|
70
|
-
scip-query health --baseline # CI gate: exit 1 on any NEW finding
|
|
71
|
-
```
|
|
72
|
-
|
|
73
|
-
## Symbol Lookup Tips
|
|
74
|
-
|
|
75
|
-
`scip-query` accepts partial symbol names — you don't need the full SCIP symbol path. These all work:
|
|
76
|
-
|
|
77
|
-
```bash
|
|
78
|
-
scip-query code processVegaMention # just the function name
|
|
79
|
-
scip-query call-graph ChatService # just the class name
|
|
80
|
-
scip-query trace getActiveInferenceConfig # any unique substring
|
|
81
|
-
```
|
|
82
|
-
|
|
83
|
-
**Avoid parentheses** — `()` causes shell parse errors in zsh/bash:
|
|
84
|
-
```bash
|
|
85
|
-
# BAD — shell tries to execute a subshell
|
|
86
|
-
scip-query code processVegaMention()
|
|
87
|
-
|
|
88
|
-
# GOOD — no parens needed, scip-query strips them internally
|
|
89
|
-
scip-query code processVegaMention
|
|
90
|
-
|
|
91
|
-
# ALSO GOOD — single quotes protect special characters
|
|
92
|
-
scip-query code 'processVegaMention'
|
|
93
|
-
```
|
|
94
|
-
|
|
95
|
-
**Read source by file + line range** when the symbol name is ambiguous:
|
|
96
|
-
```bash
|
|
97
|
-
scip-query code 'src/modules/chat/chat.service.ts:100-200'
|
|
98
|
-
```
|
|
99
|
-
|
|
100
|
-
**If "Symbol not found":**
|
|
101
|
-
1. Try a shorter/simpler name — `login` instead of `AuthService:login`
|
|
102
|
-
2. Try `scip-query outline <file>` to see what symbols exist in the file
|
|
103
|
-
3. Try `scip-query trace <name>` which uses a different lookup path
|
|
104
|
-
4. Use the `file:line-line` syntax for `code` if you know the location
|
|
105
|
-
|
|
106
|
-
---
|
|
107
|
-
|
|
108
|
-
## The 12 Angles of Bloat
|
|
109
|
-
|
|
110
|
-
Run every one of these. Each catches a different class of problem. Skip none.
|
|
111
|
-
|
|
112
|
-
### Angle 1: Dead Code (zero references)
|
|
113
|
-
|
|
114
|
-
```bash
|
|
115
|
-
scip-query dead --min-loc 5 --skip-barrels
|
|
116
|
-
```
|
|
117
|
-
|
|
118
|
-
Symbols with zero cross-file references. The `--skip-barrels` flag excludes references through barrel re-exports (index.ts) which can hide truly dead code.
|
|
119
|
-
|
|
120
|
-
**What to look for:**
|
|
121
|
-
- "dead code" = not referenced anywhere, not even in same file → safe to delete
|
|
122
|
-
- "dead export" = used locally but never imported → make private or delete the export
|
|
123
|
-
- Ignore entry points: `cli.ts`, worker files, `index.ts` barrels appear dead because they're consumed by the runtime, not by other source files
|
|
124
|
-
|
|
125
|
-
**Action:** Delete dead code. Remove `export` from dead exports.
|
|
126
|
-
|
|
127
|
-
### Angle 2: Isolated Symbols (completely disconnected)
|
|
128
|
-
|
|
129
|
-
```bash
|
|
130
|
-
scip-query isolated --min-loc 3
|
|
131
|
-
```
|
|
132
|
-
|
|
133
|
-
Stricter than dead code — these symbols reference nothing AND are referenced by nothing. Completely disconnected from the codebase graph.
|
|
134
|
-
|
|
135
|
-
**Action:** Delete. These are the safest deletions possible.
|
|
136
|
-
|
|
137
|
-
### Angle 3: Similar Functions (callee overlap)
|
|
138
|
-
|
|
139
|
-
```bash
|
|
140
|
-
scip-query similar --min-similarity 0.5 --min-callees 3
|
|
141
|
-
```
|
|
142
|
-
|
|
143
|
-
Functions that call the same set of symbols. Uses TF-IDF weighted cosine similarity over the callee set, so rare shared callees score higher than ubiquitous infrastructure ones — a high score means the pair shares meaningful work, not just the same `db` and `logger`.
|
|
144
|
-
|
|
145
|
-
For each high-similarity pair, get the consolidation prescription:
|
|
146
|
-
|
|
147
|
-
```bash
|
|
148
|
-
scip-query convergence <symbolA> <symbolB>
|
|
149
|
-
```
|
|
150
|
-
|
|
151
|
-
This shows: shared callees (common body), unique callees (parameterization points), and a recommended strategy.
|
|
152
|
-
|
|
153
|
-
**What to look for:**
|
|
154
|
-
- Pairs above 70% = strong consolidation candidates
|
|
155
|
-
- Pairs above 50% = worth investigating, may share a common helper
|
|
156
|
-
- Same file = less interesting. Cross-file = more valuable to consolidate.
|
|
157
|
-
|
|
158
|
-
**Action:** Extract shared logic into a common helper. Pass divergent callees as parameters or strategy callbacks.
|
|
159
|
-
|
|
160
|
-
### Angle 4: Similar Files (dependency profile overlap)
|
|
161
|
-
|
|
162
|
-
```bash
|
|
163
|
-
scip-query similar-files --min-similarity 0.6 --min-deps 3
|
|
164
|
-
```
|
|
165
|
-
|
|
166
|
-
Files that import the same set of modules. These are structurally doing the same job.
|
|
167
|
-
|
|
168
|
-
**What to look for:**
|
|
169
|
-
- 90%+ similarity with different unique deps = copy-paste variants
|
|
170
|
-
- 100% similarity = likely redundant modules that should be merged or share a base
|
|
171
|
-
|
|
172
|
-
**Action:** Merge or extract a shared base module.
|
|
173
|
-
|
|
174
|
-
### Angle 5: Similar Chains (parallel end-to-end flows)
|
|
175
|
-
|
|
176
|
-
```bash
|
|
177
|
-
scip-query similar-chains --min-similarity 0.5
|
|
178
|
-
```
|
|
179
|
-
|
|
180
|
-
End-to-end dependency flows that are structurally similar but diverge at a few points. These represent "two parallel mechanisms doing the same thing."
|
|
181
|
-
|
|
182
|
-
**What to look for:**
|
|
183
|
-
- Chains with 1-2 divergence points = strongest consolidation signal
|
|
184
|
-
- Common prefix = shared entry path
|
|
185
|
-
- Common suffix = shared exit path
|
|
186
|
-
- Divergence points = where to extract a shared abstraction
|
|
187
|
-
|
|
188
|
-
**Action:** Extract the common chain into a shared pipeline. The divergence points become pluggable strategies.
|
|
189
|
-
|
|
190
|
-
### Angle 6: Extraction Candidates (large functions with callee clusters)
|
|
191
|
-
|
|
192
|
-
```bash
|
|
193
|
-
scip-query extract-candidates --min-loc 15 --min-callees 5
|
|
194
|
-
```
|
|
195
|
-
|
|
196
|
-
Large functions where the callees form distinct, isolated clusters. Each cluster is a natural "Extract Method" seam.
|
|
197
|
-
|
|
198
|
-
**What to look for:**
|
|
199
|
-
- Clusters with high isolation (>80%) = clean extraction
|
|
200
|
-
- Multiple clusters in one function = the function is doing too many things
|
|
201
|
-
|
|
202
|
-
**Action:** Extract each isolated cluster into its own function.
|
|
203
|
-
|
|
204
|
-
### Angle 7: Wrapper Functions (single-consumer indirection)
|
|
205
|
-
|
|
206
|
-
```bash
|
|
207
|
-
scip-query wrapper-candidates --max-loc 15
|
|
208
|
-
```
|
|
209
|
-
|
|
210
|
-
Small functions called by exactly one consumer. If the consumer is widely used but the wrapper has only one caller, the wrapper may be unnecessary indirection.
|
|
211
|
-
|
|
212
|
-
**What to look for:**
|
|
213
|
-
- LOC < 10 + single caller = strong inline candidate
|
|
214
|
-
- The caller's fan-in tells you how "public" the wrapper's consumer is
|
|
215
|
-
|
|
216
|
-
**Action:** Inline the wrapper into its single consumer, unless it serves a testing/dependency-inversion purpose.
|
|
217
|
-
|
|
218
|
-
### Angle 8: Passthrough Functions (pure forwarding)
|
|
219
|
-
|
|
220
|
-
```bash
|
|
221
|
-
scip-query passthrough-candidates --max-loc 15
|
|
222
|
-
```
|
|
223
|
-
|
|
224
|
-
Functions with exactly one callee and small LOC. They just forward to another function without adding logic.
|
|
225
|
-
|
|
226
|
-
**Action:** Inline or verify they exist for a structural reason (DI, testing boundary).
|
|
227
|
-
|
|
228
|
-
### Angle 9: Stale Abstractions (over-engineering)
|
|
229
|
-
|
|
230
|
-
```bash
|
|
231
|
-
scip-query stale-abstractions --min-loc 3
|
|
232
|
-
```
|
|
233
|
-
|
|
234
|
-
Types, interfaces, and classes with 0-1 cross-file consumers. An interface with one implementation isn't an abstraction — it's indirection. A type used by one file isn't reusable — it's premature.
|
|
235
|
-
|
|
236
|
-
**What to look for:**
|
|
237
|
-
- 0 consumers = completely unused type → delete
|
|
238
|
-
- 1 consumer = single-use abstraction → inline into the consumer or merge
|
|
239
|
-
|
|
240
|
-
**Action:** Delete unused types. Inline single-consumer types.
|
|
241
|
-
|
|
242
|
-
### Angle 10: Pattern Drift (convention violations)
|
|
243
|
-
|
|
244
|
-
```bash
|
|
245
|
-
scip-query drift
|
|
246
|
-
```
|
|
247
|
-
|
|
248
|
-
Files that deviate from their directory's typical dependency pattern. If 8 of 10 services import a validator and 2 don't, those 2 are flagged.
|
|
249
|
-
|
|
250
|
-
**What to look for:**
|
|
251
|
-
- Missing expected deps = the file isn't following conventions (may be missing validation, logging, etc.)
|
|
252
|
-
- Unexpected deps = the file depends on things its siblings don't (may be reaching into the wrong layer)
|
|
253
|
-
- Barrel files (index.ts) and orchestrators naturally deviate — ignore those
|
|
254
|
-
|
|
255
|
-
**Action:** Bring drifted files into line with their neighbors, or document why the deviation is intentional.
|
|
256
|
-
|
|
257
|
-
### Angle 11: Redundant Re-exports (dead barrel entries)
|
|
258
|
-
|
|
259
|
-
```bash
|
|
260
|
-
scip-query redundant-reexports
|
|
261
|
-
```
|
|
262
|
-
|
|
263
|
-
Barrel files (index.ts) that re-export symbols nobody actually imports through the barrel. If every consumer imports directly from the source file, the re-export is dead weight.
|
|
264
|
-
|
|
265
|
-
**What to look for:**
|
|
266
|
-
- Symbols with 0 barrel consumers = completely redundant re-export
|
|
267
|
-
- Symbols where barrel consumers < direct consumers = barrel mostly bypassed
|
|
268
|
-
|
|
269
|
-
**Action:** Remove unused re-exports from barrel files to reduce indirection.
|
|
270
|
-
|
|
271
|
-
### Angle 12: Similar Signatures (same-shape functions)
|
|
272
|
-
|
|
273
|
-
```bash
|
|
274
|
-
scip-query similar-signatures --min-loc 5
|
|
275
|
-
```
|
|
276
|
-
|
|
277
|
-
Functions with the same parameter types and return type but different names. "Same shape" is a different signal from "same callees" — catches cases where two functions accept and return the same things even if they do different work internally.
|
|
278
|
-
|
|
279
|
-
**What to look for:**
|
|
280
|
-
- Groups of 3+ functions with identical signatures = strong consolidation signal
|
|
281
|
-
- Groups of 2 with identical signatures + similar callees = very strong signal
|
|
282
|
-
- Cross-reference with `scip-query convergence` for the consolidation prescription
|
|
283
|
-
|
|
284
|
-
**Action:** Investigate whether same-shape functions can share an implementation or a common interface.
|
|
285
|
-
|
|
286
|
-
---
|
|
287
|
-
|
|
288
|
-
## Structural Assessment (run alongside the 12 angles)
|
|
289
|
-
|
|
290
|
-
These provide context for the cleanup, not direct actions:
|
|
291
|
-
|
|
292
|
-
```bash
|
|
293
|
-
scip-query cycles # Circular dependencies (must fix)
|
|
294
|
-
scip-query deep-chains --min-depth 5 # Excessively deep dependency chains
|
|
295
|
-
scip-query bottlenecks -n 10 # Coupling pressure points
|
|
296
|
-
scip-query complexity-hotspots -n 10 # Riskiest symbols
|
|
297
|
-
scip-query hotspots -n 10 # Most-referenced symbols
|
|
298
|
-
```
|
|
299
|
-
|
|
300
|
-
---
|
|
301
|
-
|
|
302
|
-
## Workflow
|
|
303
|
-
|
|
304
|
-
### Phase 1: Health Check (5 minutes)
|
|
305
|
-
|
|
306
|
-
```bash
|
|
307
|
-
scip-query status --capabilities # Ensure freshness; reindex only if stale, missing, or unknown
|
|
308
|
-
scip-query health # Get the full report
|
|
309
|
-
```
|
|
310
|
-
|
|
311
|
-
Read the health score, the findings breakdown, and the prioritized action list as evidence. They are not the goal. Use them to find places where unnecessary structure, hidden policy, accidental variation, or disconnected code creates maintenance cost.
|
|
312
|
-
|
|
313
|
-
### Phase 2: Deep Scan (10-15 minutes)
|
|
314
|
-
|
|
315
|
-
Run all 12 angles plus the structural assessment. For each:
|
|
316
|
-
1. Run the command
|
|
317
|
-
2. Record the count and top findings
|
|
318
|
-
3. For actionable findings, drill deeper (e.g., `convergence` for similar pairs)
|
|
319
|
-
|
|
320
|
-
Use parallel subagents for speed — each angle is independent.
|
|
321
|
-
|
|
322
|
-
### Phase 3: Synthesize (5 minutes)
|
|
323
|
-
|
|
324
|
-
Produce the de-bloat report. Group findings by priority:
|
|
325
|
-
|
|
326
|
-
1. **Safe deletions** (dead code, isolated symbols) — zero risk, immediate LOC reduction
|
|
327
|
-
2. **Structural fixes** (cycles, stale abstractions) — fix architecture issues
|
|
328
|
-
3. **Consolidation** (similar functions, similar files, similar chains) — reduce duplication
|
|
329
|
-
4. **Extraction** (extract candidates, large functions) — reduce complexity
|
|
330
|
-
5. **Indirection removal** (wrappers, passthroughs) — simplify call chains
|
|
331
|
-
6. **Convention alignment** (drift) — improve consistency
|
|
332
|
-
|
|
333
|
-
### Phase 4: Estimate Impact
|
|
334
|
-
|
|
335
|
-
For each group, calculate:
|
|
336
|
-
- Number of symbols affected
|
|
337
|
-
- Lines of code recoverable
|
|
338
|
-
- Risk level (low/medium/high)
|
|
339
|
-
- Effort level (low/medium/high)
|
|
340
|
-
|
|
341
|
-
---
|
|
342
|
-
|
|
343
|
-
## Output Format
|
|
344
|
-
|
|
345
|
-
The report is a markdown file with:
|
|
346
|
-
|
|
347
|
-
```markdown
|
|
348
|
-
# De-Bloat Report: [project/module]
|
|
349
|
-
**Date:** YYYY-MM-DD
|
|
350
|
-
**Health Score:** N/100
|
|
351
|
-
**Scope:** [files analyzed]
|
|
352
|
-
|
|
353
|
-
## Summary
|
|
354
|
-
- Total findings: N
|
|
355
|
-
- Estimated recoverable LOC: N
|
|
356
|
-
- Safe deletions: N symbols
|
|
357
|
-
- Consolidation candidates: N pairs
|
|
358
|
-
- Structural issues: N
|
|
359
|
-
|
|
360
|
-
## Priority 1: Safe Deletions
|
|
361
|
-
[List of dead code and isolated symbols with file:line references]
|
|
362
|
-
|
|
363
|
-
## Priority 2: Structural Fixes
|
|
364
|
-
[Cycles, stale abstractions with fix recommendations]
|
|
365
|
-
|
|
366
|
-
## Priority 3: Consolidation Opportunities
|
|
367
|
-
[Similar pairs with convergence prescriptions]
|
|
368
|
-
|
|
369
|
-
## Priority 4: Extraction Opportunities
|
|
370
|
-
[Large functions with cluster analysis]
|
|
371
|
-
|
|
372
|
-
## Priority 5: Indirection Removal
|
|
373
|
-
[Wrappers and passthroughs with inline recommendations]
|
|
374
|
-
|
|
375
|
-
## Priority 6: Convention Alignment
|
|
376
|
-
[Drifted files with expected vs actual deps]
|
|
377
|
-
|
|
378
|
-
## Structural Metrics
|
|
379
|
-
- Circular dependencies: N
|
|
380
|
-
- Max dependency chain depth: N
|
|
381
|
-
- Coupling bottlenecks: [top 5]
|
|
382
|
-
- Complexity hotspots: [top 5]
|
|
383
|
-
```
|
|
384
|
-
|
|
385
|
-
Every finding includes the scip-query command that produced it.
|
|
386
|
-
|
|
387
|
-
---
|
|
388
|
-
|
|
389
|
-
## Subagent Briefing Template
|
|
390
|
-
|
|
391
|
-
When using parallel subagents to scan different angles simultaneously:
|
|
392
|
-
|
|
393
|
-
```
|
|
394
|
-
## Task: Run de-bloat angle [N]
|
|
395
|
-
|
|
396
|
-
You are scanning a codebase for cleanup opportunities using scip-query.
|
|
397
|
-
|
|
398
|
-
Run the following command and analyze the results:
|
|
399
|
-
[specific scip-query command]
|
|
400
|
-
|
|
401
|
-
For each finding:
|
|
402
|
-
1. Record the symbol, file, line range, and LOC
|
|
403
|
-
2. Verify it's a true positive (not an entry point, not a test helper)
|
|
404
|
-
3. Classify: safe deletion / consolidation candidate / extraction candidate / indirection
|
|
405
|
-
4. Estimate effort: low (delete/inline) / medium (extract/refactor) / high (restructure)
|
|
406
|
-
|
|
407
|
-
Report format: one finding per line with file:line, symbol name, classification, and the scip-query command that found it.
|
|
408
|
-
|
|
409
|
-
Do NOT use grep, rg, or Read. Use only scip-query commands.
|
|
410
|
-
```
|
|
411
|
-
|
|
412
|
-
---
|
|
413
|
-
|
|
414
|
-
## scip-query Quick Reference
|
|
415
|
-
|
|
416
|
-
| Angle | Command |
|
|
417
|
-
|---|---|
|
|
418
|
-
| Full health report | `scip-query health` |
|
|
419
|
-
| Dead code | `scip-query dead --min-loc 5 --skip-barrels` |
|
|
420
|
-
| Isolated symbols | `scip-query isolated --min-loc 3` |
|
|
421
|
-
| Similar functions | `scip-query similar --min-similarity 0.5` |
|
|
422
|
-
| Consolidation prescription | `scip-query convergence <a> <b>` |
|
|
423
|
-
| Similar files | `scip-query similar-files --min-similarity 0.6` |
|
|
424
|
-
| Similar chains | `scip-query similar-chains --min-similarity 0.5` |
|
|
425
|
-
| Extraction candidates | `scip-query extract-candidates --min-loc 15` |
|
|
426
|
-
| Wrappers | `scip-query wrapper-candidates --max-loc 15` |
|
|
427
|
-
| Passthroughs | `scip-query passthrough-candidates` |
|
|
428
|
-
| Stale abstractions | `scip-query stale-abstractions --min-loc 3` |
|
|
429
|
-
| Pattern drift | `scip-query drift` |
|
|
430
|
-
| Circular dependencies | `scip-query cycles` |
|
|
431
|
-
| Dependency depth | `scip-query deep-chains --min-depth 5` |
|
|
432
|
-
| Coupling pressure | `scip-query bottlenecks -n 10` |
|
|
433
|
-
| Complexity hotspots | `scip-query complexity-hotspots -n 10` |
|
|
434
|
-
| Most-referenced | `scip-query hotspots -n 10` |
|
|
435
|
-
| Redundant re-exports | `scip-query redundant-reexports` |
|
|
436
|
-
| Similar signatures | `scip-query similar-signatures --min-loc 5` |
|
|
437
|
-
| Read source | `scip-query code <symbol>` |
|
|
438
|
-
| Verify references | `scip-query refs <symbol>` |
|
|
439
|
-
| Check blast radius | `scip-query affected <symbol>` |
|
|
@@ -1,162 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: scip-health-audit
|
|
3
|
-
description: Confirm and prioritize scip-query health signals before cleanup. Use after `scip-query setup`, when reviewing `docs/scip-query/health-dossier.*`, when a user asks for a health audit, issue cleanup, perfect-code pass, setup follow-through, or confirmation of raw scip-query findings before an agent starts fixing them.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# SCIP Health Audit
|
|
7
|
-
|
|
8
|
-
Use this skill to turn raw scip-query health output into a confirmed cleanup queue.
|
|
9
|
-
|
|
10
|
-
A health signal is a scip-query reported fact about source code, references, docs, or capability coverage that may indicate maintenance risk. A confirmed issue is a health signal the agent has checked against the current code and SCIP evidence, then classified as a real fix target, an intentional design choice, a false positive, or a blocked investigation.
|
|
11
|
-
|
|
12
|
-
For autonomous score improvement after this confirmation pass, invoke
|
|
13
|
-
`scip-health-improve`. This skill is the confirmation and ranking pass; the
|
|
14
|
-
improvement skill owns the keep-working cleanup loop.
|
|
15
|
-
|
|
16
|
-
## Non-Negotiables
|
|
17
|
-
|
|
18
|
-
1. Start from current evidence. Run `scip-query reindex` when the index is stale, missing, or uncertain.
|
|
19
|
-
2. Do not start cleanup before telling the user the health score and listing the confirmed items that need attention.
|
|
20
|
-
3. Do not call raw analyzer output an issue until you inspect the code or graph evidence that makes it real.
|
|
21
|
-
4. Do not defer confirmed fix targets into vague future work. If the active user request asks for cleanup, start the safest confirmed batch after the visible health report.
|
|
22
|
-
5. Do not use `scip-query setup-ci` in this workflow. CI setup is intentionally outside first-run setup and health cleanup for now.
|
|
23
|
-
|
|
24
|
-
## Evidence Collection
|
|
25
|
-
|
|
26
|
-
If setup just ran, read the dossier first:
|
|
27
|
-
|
|
28
|
-
```bash
|
|
29
|
-
scip-query setup --json
|
|
30
|
-
```
|
|
31
|
-
|
|
32
|
-
Then collect the current state:
|
|
33
|
-
|
|
34
|
-
```bash
|
|
35
|
-
scip-query doctor
|
|
36
|
-
scip-query status --capabilities
|
|
37
|
-
scip-query status --capabilities
|
|
38
|
-
# If freshness is stale, missing, or unknown:
|
|
39
|
-
# scip-query reindex
|
|
40
|
-
scip-query health --json --full
|
|
41
|
-
scip-query diff-gate --json
|
|
42
|
-
scip-query capability-matrix --json
|
|
43
|
-
scip-query config-validate --json
|
|
44
|
-
```
|
|
45
|
-
|
|
46
|
-
If `doctor`, `status`, or `capability-matrix` reports unavailable capabilities, record them as unavailable checks. Unavailable is not clean; it means this signal class was not proven in this repository.
|
|
47
|
-
|
|
48
|
-
## Signal Sweep
|
|
49
|
-
|
|
50
|
-
Run the relevant commands for the repository and scope. Prefer `--json` where supported so the dossier can be updated without scraping prose.
|
|
51
|
-
|
|
52
|
-
```bash
|
|
53
|
-
scip-query cleanup-plan --verify --json
|
|
54
|
-
scip-query recent-duplicates --json --full
|
|
55
|
-
scip-query incomplete-migration --json --full
|
|
56
|
-
scip-query unused-params --json --full
|
|
57
|
-
scip-query stale-abstractions --json --full
|
|
58
|
-
scip-query wrapper-candidates --json --full
|
|
59
|
-
scip-query passthrough-candidates --json --full
|
|
60
|
-
scip-query dead --json --full
|
|
61
|
-
scip-query isolated --json --full
|
|
62
|
-
scip-query cycles
|
|
63
|
-
scip-query co-change --json --full
|
|
64
|
-
scip-query doc-drift --json --full
|
|
65
|
-
```
|
|
66
|
-
|
|
67
|
-
For React projects, add:
|
|
68
|
-
|
|
69
|
-
```bash
|
|
70
|
-
scip-query react-component-duplicates --json --full
|
|
71
|
-
scip-query react-hook-candidates --json --full
|
|
72
|
-
scip-query react-large-component-pressure --json --full
|
|
73
|
-
```
|
|
74
|
-
|
|
75
|
-
For Vue projects, add:
|
|
76
|
-
|
|
77
|
-
```bash
|
|
78
|
-
scip-query vue-component-duplicates --json --full
|
|
79
|
-
scip-query vue-composable-candidates --json --full
|
|
80
|
-
scip-query vue-large-view-pressure --json --full
|
|
81
|
-
```
|
|
82
|
-
|
|
83
|
-
## Confirm Findings
|
|
84
|
-
|
|
85
|
-
For every candidate that could become a fix target, inspect the relevant code and graph evidence.
|
|
86
|
-
|
|
87
|
-
Use these probes as needed:
|
|
88
|
-
|
|
89
|
-
```bash
|
|
90
|
-
scip-query code <symbol-or-file>
|
|
91
|
-
scip-query refs <symbol>
|
|
92
|
-
scip-query fan-in <symbol>
|
|
93
|
-
scip-query fan-out <symbol>
|
|
94
|
-
scip-query affected <symbol> --json
|
|
95
|
-
scip-query change-surface <file> --json --full
|
|
96
|
-
scip-query convergence <symbolA> <symbolB>
|
|
97
|
-
scip-query co-change <file> --json --full
|
|
98
|
-
```
|
|
99
|
-
|
|
100
|
-
Classify each candidate:
|
|
101
|
-
|
|
102
|
-
- `confirmed fix target`: the code evidence shows unnecessary code, broken migration, stale docs, accidental duplication, hidden coupling, or another real maintenance burden.
|
|
103
|
-
- `intentional design`: the finding is real but the current shape exists for a documented product, compatibility, performance, API, or ownership reason.
|
|
104
|
-
- `false positive`: the analyzer report contradicts inspected code or graph evidence. Record the analyzer improvement needed.
|
|
105
|
-
- `blocked`: confirmation needs a missing toolchain, missing test command, missing product decision, or unavailable capability.
|
|
106
|
-
|
|
107
|
-
Use `scip-query suppress <id> --reason "<specific reason>"` only for accepted findings that have stable finding IDs and a durable reason. A suppression is an explicit design record, not a way to hide uncertainty.
|
|
108
|
-
|
|
109
|
-
## User Handoff Before Cleanup
|
|
110
|
-
|
|
111
|
-
Before editing application code, send the user a compact report in this order:
|
|
112
|
-
|
|
113
|
-
```markdown
|
|
114
|
-
Health score: N/100
|
|
115
|
-
|
|
116
|
-
Confirmed items to address:
|
|
117
|
-
- [priority] <finding> - <evidence command> - <first safe action>
|
|
118
|
-
|
|
119
|
-
Unconfirmed signals:
|
|
120
|
-
- <signal> - <what evidence is still needed>
|
|
121
|
-
|
|
122
|
-
Unavailable or blocked checks:
|
|
123
|
-
- <check> - <why it could not be proven>
|
|
124
|
-
|
|
125
|
-
Recommended first cleanup batch:
|
|
126
|
-
- <batch> - <why this is safe to start now>
|
|
127
|
-
```
|
|
128
|
-
|
|
129
|
-
If there are no confirmed fix targets, say that clearly and list remaining unconfirmed or unavailable signals.
|
|
130
|
-
|
|
131
|
-
## Cleanup Order
|
|
132
|
-
|
|
133
|
-
When the user has asked for cleanup or the current workflow is post-setup cleanup, start after the handoff with the safest confirmed batch:
|
|
134
|
-
|
|
135
|
-
1. Compiler-verified deletion batches from `scip-query cleanup-plan --verify --json`, applied with `scip-query cleanup-apply --verified --batch <n>`.
|
|
136
|
-
2. Broken or stale docs from `scip-query doc-drift --json --full`.
|
|
137
|
-
3. Incomplete migrations and recent duplicate echoes from `scip-query incomplete-migration --json --full` and `scip-query recent-duplicates --json --full`.
|
|
138
|
-
4. Unused trailing parameters from `scip-query unused-params --json --full`.
|
|
139
|
-
5. Thin wrappers, passthroughs, stale abstractions, and hidden co-change couplings after confirming behavior.
|
|
140
|
-
|
|
141
|
-
After every batch:
|
|
142
|
-
|
|
143
|
-
```bash
|
|
144
|
-
scip-query status --capabilities
|
|
145
|
-
# If freshness is stale, missing, or unknown:
|
|
146
|
-
# scip-query reindex
|
|
147
|
-
scip-query diff-gate --json
|
|
148
|
-
scip-query health --json --full
|
|
149
|
-
```
|
|
150
|
-
|
|
151
|
-
Update `docs/scip-query/health-dossier.md` and `docs/scip-query/health-dossier.json` when they exist. Preserve raw signals, confirmation status, evidence commands, fixes applied, and remaining blockers.
|
|
152
|
-
|
|
153
|
-
## Finish Criteria
|
|
154
|
-
|
|
155
|
-
The audit is complete only when every collected signal is one of:
|
|
156
|
-
|
|
157
|
-
- fixed and verified;
|
|
158
|
-
- confirmed intentional with a durable reason;
|
|
159
|
-
- recorded as a false positive with analyzer-improvement notes;
|
|
160
|
-
- blocked by a named external constraint or user decision.
|
|
161
|
-
|
|
162
|
-
End with the final health score, the verification commands run, and the remaining blocked or intentionally accepted items.
|