scip-query 0.19.4 → 0.19.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +75 -1
- package/README.md +242 -49
- package/dist/augment-vue-worker.js +1 -1
- package/dist/{chunk-2YU7I3QO.js → chunk-24QNP7MN.js} +2 -2
- package/dist/{chunk-CNKAGUPL.js → chunk-26X7KCJR.js} +2 -2
- package/dist/{chunk-GPBBJ5Y4.js → chunk-273W2U4Y.js} +3 -3
- package/dist/{chunk-7GXM52MI.js → chunk-2CVXCGL4.js} +2 -2
- package/dist/{chunk-ABMYA4TN.js → chunk-2EZSOTSY.js} +2 -2
- package/dist/{chunk-HKEHS2AS.js → chunk-2GSQR6YA.js} +2 -2
- package/dist/{chunk-FECYOO5O.js → chunk-2OXVAGGT.js} +2 -2
- package/dist/chunk-2ZOCHAL2.js +8 -0
- package/dist/{chunk-QGXBRIM5.js → chunk-336DC5NJ.js} +2 -2
- package/dist/chunk-35SQLYCQ.js +2 -0
- package/dist/{chunk-VXQNNXJE.js → chunk-3OIKRYU5.js} +2 -2
- package/dist/{chunk-52ZYCAEO.js → chunk-47X75ZKH.js} +2 -2
- package/dist/{chunk-NPKYOIFM.js → chunk-4CGVLUDP.js} +2 -2
- package/dist/chunk-4RI4BJGT.js +8 -0
- package/dist/{chunk-P2PC2WGR.js → chunk-52HQTTPB.js} +2 -2
- package/dist/{chunk-YNRNA5LK.js → chunk-5OC3HWP5.js} +2 -2
- package/dist/{chunk-STOL2BTL.js → chunk-6XFC7PQ5.js} +2 -2
- package/dist/{chunk-J77UIT3I.js → chunk-6XHTISLI.js} +2 -2
- package/dist/chunk-6YTSKJJ3.js +2 -0
- package/dist/{chunk-BTEE5NZQ.js → chunk-7E3TH5ZN.js} +2 -2
- package/dist/{chunk-X6D5IC6I.js → chunk-7LABSJSR.js} +2 -2
- package/dist/chunk-7Q6VYYCH.js +2 -0
- package/dist/{chunk-FWUUZTIO.js → chunk-A43URCQ3.js} +2 -2
- package/dist/chunk-A63U2W3P.js +3 -0
- package/dist/{chunk-3MJ5YA4Y.js → chunk-ADFSIJP2.js} +2 -2
- package/dist/chunk-AOLE4DYM.js +6 -0
- package/dist/chunk-APMMR5Y2.js +2 -0
- package/dist/chunk-B5MHCHP3.js +107 -0
- package/dist/{chunk-4RSI5EMG.js → chunk-CSTYYXKC.js} +2 -2
- package/dist/{chunk-25LPM4DG.js → chunk-CYJM7CYF.js} +2 -2
- package/dist/{chunk-S44IULR6.js → chunk-DD5BOU5I.js} +2 -2
- package/dist/{chunk-YGAGTIDK.js → chunk-DGMCFMPG.js} +7 -7
- package/dist/{chunk-UOAV44HR.js → chunk-E2ZXPB7J.js} +2 -2
- package/dist/{chunk-IZKFSVBV.js → chunk-EVOC5I5I.js} +2 -2
- package/dist/{chunk-XTX6QHOF.js → chunk-F42A3AKG.js} +2 -2
- package/dist/{chunk-Q4IIEGXJ.js → chunk-FHCTEANE.js} +2 -2
- package/dist/{chunk-3SVWW4PN.js → chunk-FKGN4A4E.js} +2 -2
- package/dist/{chunk-IG7N5ZIK.js → chunk-FQTPPXNA.js} +2 -2
- package/dist/{chunk-F6O7AAC3.js → chunk-G4UQL4CP.js} +2 -2
- package/dist/chunk-GA64UPMI.js +6 -0
- package/dist/{chunk-ZXJYMGD3.js → chunk-GK3GRUJX.js} +2 -2
- package/dist/chunk-HEBAY673.js +2 -0
- package/dist/chunk-HELS7KFF.js +2 -0
- package/dist/{chunk-B5NLK2B3.js → chunk-IPDCSB6N.js} +2 -2
- package/dist/{chunk-M7MTH5NR.js → chunk-IYAOX36F.js} +2 -2
- package/dist/{chunk-YVVCVR2L.js → chunk-J7VT2CRB.js} +2 -2
- package/dist/{chunk-4333ETTV.js → chunk-JELJLXEE.js} +2 -2
- package/dist/{chunk-LBMJEAEW.js → chunk-JERWGHQT.js} +2 -2
- package/dist/chunk-JJJCO4QC.js +945 -0
- package/dist/{chunk-6E7UTQY7.js → chunk-JZNLMHWY.js} +2 -2
- package/dist/{chunk-R4FQGQ4X.js → chunk-K42M2KWT.js} +2 -2
- package/dist/{chunk-H7UKLTWJ.js → chunk-KLVJABXA.js} +2 -2
- package/dist/chunk-KP4KBDVF.js +3 -0
- package/dist/{chunk-RV2FQIX3.js → chunk-LMFVTUW2.js} +2 -2
- package/dist/chunk-LRTP3DKL.js +3 -0
- package/dist/{chunk-U6WNH5GC.js → chunk-MGBJHRFB.js} +2 -2
- package/dist/{chunk-QDV6RDCP.js → chunk-MLGTCX56.js} +2 -2
- package/dist/{chunk-54HA4ZXH.js → chunk-N3SE646F.js} +2 -2
- package/dist/{chunk-KP6XRY5Z.js → chunk-NBRUH7OE.js} +2 -2
- package/dist/{chunk-M7AIS73L.js → chunk-NN4ZIRPK.js} +2 -2
- package/dist/{chunk-I5RJM53C.js → chunk-NQLSSVOB.js} +2 -2
- package/dist/{chunk-4SALD7RU.js → chunk-OBKDTVZ3.js} +2 -2
- package/dist/{chunk-GBQ5NYPR.js → chunk-OHWZKLVA.js} +6 -6
- package/dist/{chunk-6NSFJYRC.js → chunk-OP3MTFJR.js} +2 -2
- package/dist/{chunk-EOOJGLDU.js → chunk-OQ2A4G2G.js} +2 -2
- package/dist/{chunk-DLWR3NUU.js → chunk-P6HBYNBE.js} +2 -2
- package/dist/{chunk-QVWS2VWZ.js → chunk-PC44K7RF.js} +2 -2
- package/dist/{chunk-A2EZV2UM.js → chunk-QBYYWGAT.js} +2 -2
- package/dist/{chunk-QRGV2F7L.js → chunk-QHKUY4FW.js} +2 -2
- package/dist/chunk-QHRL4LKM.js +2 -0
- package/dist/{chunk-I5AWSI2G.js → chunk-QQWOFXNW.js} +2 -2
- package/dist/{chunk-WQTAC523.js → chunk-RBFFD4V2.js} +2 -2
- package/dist/{chunk-SOAT6NLA.js → chunk-RJHCPSZ7.js} +2 -2
- package/dist/{chunk-VGRICIQI.js → chunk-RWRLUZ6U.js} +2 -2
- package/dist/{chunk-4T3LTWUS.js → chunk-S2GP3CU3.js} +2 -2
- package/dist/{chunk-HEXVUYFQ.js → chunk-SHKZ7OVJ.js} +2 -2
- package/dist/{chunk-NSS46APD.js → chunk-TFUU5MQQ.js} +2 -2
- package/dist/{chunk-IUFDSKGG.js → chunk-TYQ76QHQ.js} +2 -2
- package/dist/{chunk-NRCXJDHL.js → chunk-U5CNPPTZ.js} +2 -2
- package/dist/{chunk-MITTUCEH.js → chunk-UQK5CRUK.js} +2 -2
- package/dist/{chunk-XLTP42QA.js → chunk-UUJBLG6J.js} +2 -2
- package/dist/chunk-UXP636P5.js +144 -0
- package/dist/{chunk-64RFXJT5.js → chunk-VEVBIAOJ.js} +6 -6
- package/dist/chunk-VKRQDBW5.js +9 -0
- package/dist/{chunk-C7NIYIQ4.js → chunk-VOQFGC2W.js} +4 -4
- package/dist/{chunk-DZ74OMG6.js → chunk-VP542C25.js} +2 -2
- package/dist/{chunk-Q3AFUTGB.js → chunk-WMXRRBII.js} +2 -2
- package/dist/{chunk-ZGZUZ7XE.js → chunk-WXAAURU7.js} +2 -2
- package/dist/chunk-X3NLZHPA.js +20 -0
- package/dist/{chunk-WER3B7MI.js → chunk-XF3KLXN3.js} +2 -2
- package/dist/{chunk-NH5ALKPW.js → chunk-XVJ3V7LM.js} +2 -2
- package/dist/{chunk-4XTA5OMB.js → chunk-YGQN3XGZ.js} +2 -2
- package/dist/{chunk-CFMXJPHH.js → chunk-YHXBD52M.js} +2 -2
- package/dist/{chunk-7B3UPBVA.js → chunk-YLVE3SXZ.js} +2 -2
- package/dist/{chunk-YIJ7ZAA4.js → chunk-YTUD45PU.js} +2 -2
- package/dist/{chunk-VTKGCT3V.js → chunk-YWB2EBNB.js} +2 -2
- package/dist/{chunk-UKZBVX4U.js → chunk-Z2LHPIOM.js} +2 -2
- package/dist/chunk-Z5QQPJ3U.js +30 -0
- package/dist/{chunk-NZL2DBT7.js → chunk-ZLJLE6LK.js} +2 -2
- package/dist/{chunk-XYADIZHU.js → chunk-ZTTISZ7J.js} +2 -2
- package/dist/cli.js +3 -3
- package/dist/command-descriptors-SJDZ7QGR.js +617 -0
- package/dist/{config-types-D20KuvvZ.d.ts → config-types-BWQ5xPGI.d.ts} +4 -0
- package/dist/{db-G_II8yXU.d.ts → db-B0r1o7Vt.d.ts} +18 -1
- package/dist/direct-navigation-HTKOZEOM.js +3 -0
- package/dist/{health-oblXYgkF.d.ts → health-CFnlCiTz.d.ts} +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/dist/postinstall.js +1 -1
- package/dist/queries/affected.d.ts +2 -2
- package/dist/queries/affected.js +1 -1
- package/dist/queries/architecture.d.ts +2 -2
- package/dist/queries/architecture.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 +2 -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 +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/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 +2 -2
- 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 +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 +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 +30 -2
- package/dist/queries/diff-gate.js +1 -1
- package/dist/queries/diff-impact.d.ts +2 -2
- package/dist/queries/diff-impact.js +1 -1
- package/dist/queries/doc-drift.d.ts +2 -2
- 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/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 +2 -2
- 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 +2 -2
- package/dist/queries/incomplete-migration.js +1 -1
- package/dist/queries/index.d.ts +17 -3
- 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 +2 -2
- package/dist/queries/passthrough-candidates.js +1 -1
- package/dist/queries/plan-context.d.ts +2 -2
- 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/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 +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/stats.js +1 -1
- 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/test-quality.d.ts +2 -2
- package/dist/queries/test-quality.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 +3 -3
- package/dist/queries/twin-ab.js +1 -1
- package/dist/queries/twin-drift.d.ts +2 -2
- 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/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/reindex-worker.js +23 -24
- package/dist/reindex.d.ts +10 -4
- package/dist/reindex.js +33 -38
- package/dist/runtime.d.ts +167 -11
- package/dist/runtime.js +3 -2
- 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-kRpaexVJ.d.ts → scip-cli-DCvnlZCu.d.ts} +5 -1
- package/dist/watch-server.js +5 -5
- package/docs/AGENT_GUIDE.md +1 -1
- package/docs/AI_FAILURE_MODES.md +18 -18
- package/docs/API_EVOLUTION.md +71 -0
- package/docs/CLI_JSON_OUTPUT.md +83 -0
- package/docs/COMMAND_REFERENCE.md +10 -8
- package/docs/COMMITTED_RECORD_COMPATIBILITY.md +117 -0
- package/docs/CONFIGURATION_WRITE_SAFETY.md +130 -0
- package/docs/DETECTOR_GUIDE.md +47 -47
- package/docs/DURABILITY.md +103 -0
- package/docs/INDEX_GENERATIONS.md +121 -0
- package/docs/LOCK_PROTOCOL.md +133 -0
- package/docs/MAILBOX_LIFECYCLE.md +197 -0
- package/docs/REINDEX_METADATA_COMPATIBILITY.md +84 -0
- package/docs/RUST_DURABLE_SESSION_PROTOCOL.md +126 -0
- package/docs/TELEMETRY_RETENTION.md +72 -0
- package/docs/TIME_SEMANTICS.md +77 -0
- package/docs/WATCH_REFRESH_REQUESTS.md +110 -0
- package/docs/WINDOWS_SIDECAR_RELEASE.md +298 -0
- package/docs/analyzer-validation-ledger.md +24 -23
- package/docs/schemas/cli-json-envelope.schema.json +53 -0
- package/docs/schemas/npm-release-state.schema.json +146 -0
- package/docs/schemas/outcome-event-record.schema.json +39 -0
- package/docs/schemas/project-config.schema.json +247 -0
- package/docs/schemas/suppression-record.schema.json +31 -0
- package/docs/schemas/windows-sidecar-provenance.schema.json +137 -0
- package/package.json +15 -5
- package/scripts/build-scip-windows.mjs +180 -61
- package/scripts/scip-windows-provenance.mjs +364 -0
- package/scripts/verify-scip-windows.mjs +29 -0
- package/skills/_shared/SKILL.md +91 -242
- package/skills/_shared/agents/openai.yaml +1 -1
- package/skills/_shared/references/agent-contract-catalog.md +105 -0
- package/skills/_shared/references/command-catalog.md +118 -0
- package/skills/_shared/references/detector-precision-and-diffgate.md +59 -0
- package/skills/_shared/references/evidence-and-dead-code.md +25 -0
- package/skills/scip-audit/SKILL.md +76 -0
- package/skills/scip-audit/agents/openai.yaml +4 -0
- package/skills/scip-audit/references/claims.md +98 -0
- package/skills/scip-audit/references/cleanup.md +101 -0
- package/skills/scip-audit/references/directory.md +222 -0
- package/skills/scip-audit/references/frontend.md +130 -0
- package/skills/scip-audit/references/integrity.md +154 -0
- package/skills/scip-audit/references/maintainability.md +162 -0
- package/skills/scip-audit/references/twin-drift.md +104 -0
- package/skills/scip-diagnose/SKILL.md +52 -0
- package/skills/scip-diagnose/agents/openai.yaml +4 -0
- package/skills/scip-diagnose/references/debug.md +117 -0
- package/skills/{scip-probe-reachability/SKILL.md → scip-diagnose/references/probe-reachability.md} +12 -27
- package/skills/scip-diagnose/references/root-cause.md +145 -0
- package/skills/scip-diagnose/references/triage.md +119 -0
- package/skills/scip-explore/SKILL.md +53 -84
- package/skills/scip-explore/agents/openai.yaml +2 -2
- package/skills/scip-explore/references/diagrams.md +40 -0
- package/skills/scip-explore/references/language-playbook.md +49 -0
- package/skills/scip-improve/SKILL.md +56 -0
- package/skills/scip-improve/agents/openai.yaml +4 -0
- package/skills/scip-improve/references/cleanup-batches.md +53 -0
- package/skills/scip-improve/references/directory-moves.md +53 -0
- package/skills/scip-improve/references/doc-reconcile.md +30 -0
- package/skills/scip-improve/references/frontend-extraction.md +39 -0
- package/skills/scip-improve/references/maintainability-mechanism.md +43 -0
- package/skills/scip-improve/references/twin-drift.md +35 -0
- package/skills/scip-plan/SKILL.md +68 -0
- package/skills/scip-plan/agents/openai.yaml +4 -0
- package/skills/scip-plan/references/api-impact.md +19 -0
- package/skills/scip-plan/references/conductor.md +41 -0
- package/skills/scip-plan/references/high-assurance.md +43 -0
- package/skills/scip-plan/references/hyper-optimization.md +50 -0
- package/skills/scip-plan/references/tla-model.md +88 -0
- package/skills/scip-query/SKILL.md +52 -97
- package/skills/scip-query/agents/openai.yaml +2 -2
- package/skills/scip-setup/SKILL.md +65 -176
- package/skills/scip-setup/agents/openai.yaml +3 -3
- package/skills/scip-setup/references/bootstrap-workflow.md +120 -0
- package/skills/scip-setup/references/language-verification.md +61 -0
- package/skills/scip-setup/references/lifecycle-commands.md +119 -0
- package/skills/scip-setup/references/per-repo-triage.md +24 -0
- package/skills/scip-verify/SKILL.md +123 -70
- package/skills/scip-verify/agents/openai.yaml +2 -2
- package/skills/scip-verify/references/calibrate-detectors.md +170 -0
- package/dist/chunk-2CTX5CMX.js +0 -4
- package/dist/chunk-2Y373BDD.js +0 -2
- package/dist/chunk-C2QSK7E7.js +0 -2
- package/dist/chunk-D4U5Q3FT.js +0 -7
- package/dist/chunk-K2ERX4UT.js +0 -3
- package/dist/chunk-KHE7J5ZN.js +0 -3
- package/dist/chunk-L7SPDE73.js +0 -84
- package/dist/chunk-LHMNRHGV.js +0 -3
- package/dist/chunk-LM72NQ7T.js +0 -3
- package/dist/chunk-MSWVMDAH.js +0 -122
- package/dist/chunk-NH7WNNQC.js +0 -20
- package/dist/chunk-OMPZHGHO.js +0 -2
- package/dist/chunk-SVLTAG5O.js +0 -927
- package/dist/chunk-U7DSEKOM.js +0 -30
- package/dist/chunk-V27BEQJN.js +0 -7
- package/dist/chunk-VMNZB6WI.js +0 -4
- package/dist/chunk-XBN5VO53.js +0 -2
- package/dist/chunk-ZAIILQNP.js +0 -5
- package/dist/command-descriptors-MFU4BCJ7.js +0 -612
- package/dist/direct-navigation-MRMQFIRB.js +0 -3
- package/skills/scip-api-impact/SKILL.md +0 -139
- package/skills/scip-api-impact/agents/openai.yaml +0 -4
- package/skills/scip-calibrate/SKILL.md +0 -131
- package/skills/scip-calibrate/agents/openai.yaml +0 -4
- package/skills/scip-claim-audit/SKILL.md +0 -106
- package/skills/scip-claim-audit/agents/openai.yaml +0 -4
- package/skills/scip-cleanup-audit/SKILL.md +0 -126
- package/skills/scip-cleanup-audit/agents/openai.yaml +0 -4
- package/skills/scip-cleanup-improve/SKILL.md +0 -84
- package/skills/scip-cleanup-improve/agents/openai.yaml +0 -4
- package/skills/scip-concrete-plan/SKILL.md +0 -262
- package/skills/scip-concrete-plan/agents/openai.yaml +0 -4
- package/skills/scip-conductor/SKILL.md +0 -133
- package/skills/scip-conductor/agents/openai.yaml +0 -4
- package/skills/scip-debug/SKILL.md +0 -130
- package/skills/scip-debug/agents/openai.yaml +0 -4
- package/skills/scip-diagram/SKILL.md +0 -110
- package/skills/scip-diagram/agents/openai.yaml +0 -4
- package/skills/scip-directory-architecture/SKILL.md +0 -254
- package/skills/scip-directory-architecture/agents/openai.yaml +0 -4
- package/skills/scip-doc-reconcile/SKILL.md +0 -89
- package/skills/scip-doc-reconcile/agents/openai.yaml +0 -4
- package/skills/scip-hyper-optimization/SKILL.md +0 -156
- package/skills/scip-hyper-optimization/agents/openai.yaml +0 -4
- package/skills/scip-integrity-audit/SKILL.md +0 -152
- package/skills/scip-integrity-audit/agents/openai.yaml +0 -4
- package/skills/scip-language-playbook/SKILL.md +0 -106
- package/skills/scip-language-playbook/agents/openai.yaml +0 -4
- package/skills/scip-maintainability/SKILL.md +0 -158
- package/skills/scip-maintainability/agents/openai.yaml +0 -4
- package/skills/scip-probe-reachability/agents/openai.yaml +0 -4
- package/skills/scip-react-maintainability/SKILL.md +0 -101
- package/skills/scip-react-maintainability/agents/openai.yaml +0 -4
- package/skills/scip-root-cause/SKILL.md +0 -150
- package/skills/scip-root-cause/agents/openai.yaml +0 -4
- package/skills/scip-tla-model-system/SKILL.md +0 -148
- package/skills/scip-tla-model-system/agents/openai.yaml +0 -4
- package/skills/scip-triage-issue/SKILL.md +0 -126
- package/skills/scip-triage-issue/agents/openai.yaml +0 -4
- package/skills/scip-twin-drift/SKILL.md +0 -107
- package/skills/scip-twin-drift/agents/openai.yaml +0 -4
- package/skills/scip-vue-maintainability/SKILL.md +0 -107
- package/skills/scip-vue-maintainability/agents/openai.yaml +0 -4
|
@@ -1,121 +1,90 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: scip-explore
|
|
3
|
-
description:
|
|
3
|
+
description: Use to understand a system before editing it: what calls what, how data flows, what depends on it, what a change would reach, and what historically changed together. Includes choosing high-signal commands for an unfamiliar language and rendering the result as a flow, dependency, or blast-radius diagram. For understanding a failure mode class rather than this codebase, use `engineering-lenses`.
|
|
4
4
|
commands:
|
|
5
|
-
- template: "scip-query stats"
|
|
6
|
-
when: "Orient: repo-wide size and shape before naming a scope."
|
|
7
5
|
- template: "scip-query system <module-or-scope>"
|
|
8
|
-
when: "Orient
|
|
6
|
+
when: "Orient to a module's files, symbols, dependencies, and consumers."
|
|
9
7
|
- template: "scip-query trace <entry-symbol>"
|
|
10
|
-
when: "
|
|
11
|
-
- template: "scip-query call-graph <entry-symbol>"
|
|
12
|
-
when: "Trace entry points: callers and callees for the path."
|
|
13
|
-
- template: "scip-query dataflow <symbol-or-variable>"
|
|
14
|
-
when: "Follow data and state through producers and consumers."
|
|
8
|
+
when: "Connect an entry symbol to its definition and references."
|
|
15
9
|
- template: "scip-query affected <symbol> --json"
|
|
16
|
-
when: "
|
|
10
|
+
when: "Measure the transitive downstream blast radius of a change."
|
|
17
11
|
---
|
|
18
12
|
|
|
19
|
-
|
|
13
|
+
## Purpose
|
|
20
14
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
Load shared mechanics from [`../_shared/SKILL.md`](../_shared/SKILL.md).
|
|
15
|
+
Build verified understanding of how a system works end to end — entry points, call flow, data flow, dependencies, consumers, and risk — before answering or editing. Exploration means tracing code from entry points to effects against the SCIP index, not against memory or folder guesses. Load shared mechanics from `../_shared/SKILL.md`; use this skill's own shortlist first and open `_shared` only when it is insufficient.
|
|
24
16
|
|
|
25
17
|
<!-- BEGIN GENERATED SKILL COMMANDS -->
|
|
26
18
|
## Commands for this skill
|
|
27
19
|
|
|
28
|
-
| Command | Purpose | When |
|
|
29
|
-
| --- | --- | --- |
|
|
30
|
-
| `scip-query
|
|
31
|
-
| `scip-query
|
|
32
|
-
| `scip-query
|
|
33
|
-
| `scip-query call-graph <entry-symbol>` | Show incoming callers and outgoing callees for a symbol | Trace entry points: callers and callees for the path. |
|
|
34
|
-
| `scip-query dataflow <symbol-or-variable>` | Reference-level dataflow: definition sites, usage sites, producers, consumers | Follow data and state through producers and consumers. |
|
|
35
|
-
| `scip-query affected <symbol> --json` | Transitive closure of symbols that could break if this symbol changes | Map dependencies and consumers: downstream blast radius. |
|
|
20
|
+
| Command | Purpose | Returns | Coverage | When |
|
|
21
|
+
| --- | --- | --- | --- | --- |
|
|
22
|
+
| `scip-query system <module-or-scope>` | Full module map: files, symbols, deps in/out | module file paths; exported symbols with line ranges; internal dependencies; reverse dependencies | `complete` | Orient to a module's files, symbols, dependencies, and consumers. |
|
|
23
|
+
| `scip-query trace <entry-symbol>` | Trace a symbol: definition + all references | definition sites with source and signature; referencing files with line numbers | `bounded` | Connect an entry symbol to its definition and references. |
|
|
24
|
+
| `scip-query affected <symbol> --json` | Transitive closure of symbols that could break if this symbol changes | affected symbol identities, files, and traversal depths | `bounded` | Measure the transitive downstream blast radius of a change. |
|
|
36
25
|
|
|
37
26
|
Use this shortlist first. Open [`../_shared/SKILL.md`](../_shared/SKILL.md) only when it is insufficient.
|
|
38
27
|
<!-- END GENERATED SKILL COMMANDS -->
|
|
39
28
|
|
|
40
|
-
##
|
|
41
|
-
|
|
42
|
-
1. Use a current index before trusting graph facts.
|
|
43
|
-
2. Every behavior, path, consumer, and risk claim cites a scip-query command.
|
|
44
|
-
3. Read source with `scip-query code`; do not describe what a function probably does.
|
|
45
|
-
4. Follow the graph before trusting folder structure.
|
|
46
|
-
5. Start wide, then narrow.
|
|
47
|
-
6. Descriptions need citations; conclusions need discriminators. A conclusion — why something happens, what a unit is for, which intent explains a shape — states one rival explanation and the trace evidence that rules it out.
|
|
48
|
-
|
|
49
|
-
## Workflow
|
|
29
|
+
## Evidence rules (apply to every step below)
|
|
50
30
|
|
|
51
|
-
|
|
31
|
+
- Use a current index before trusting graph facts: check `scip-query status --capabilities` freshness (`_shared` has the exact command); reindex if it reports `stale`, `missing`, or `unknown`.
|
|
32
|
+
- Relationship, consumer, and completeness claims must cite a `scip-query` command. Literal local-source claims may cite a native file read instead.
|
|
33
|
+
- Resolve ambiguous symbols before describing behavior — `scip-query code` is the usual tool, but it isn't mandatory when you already have an exact native range.
|
|
34
|
+
- Follow the graph before trusting folder structure. Start wide, then narrow.
|
|
35
|
+
- Descriptions need citations; conclusions need discriminators. A conclusion — why something happens, what a unit is for, which intent explains a shape — must state one rival explanation and the trace evidence that ruled it out.
|
|
52
36
|
|
|
53
|
-
|
|
54
|
-
scip-query stats
|
|
55
|
-
scip-query kind-counts
|
|
56
|
-
scip-query system <module-or-scope>
|
|
57
|
-
scip-query outline <entry-file>
|
|
58
|
-
scip-query by-kind function --scope <scope>
|
|
59
|
-
```
|
|
37
|
+
Each `scip-query` command below carries a coverage rating: **complete** (exhaustive) or **bounded** (capped — a follow-up command may be needed to fill in the picture).
|
|
60
38
|
|
|
61
|
-
|
|
39
|
+
## The core workflow
|
|
62
40
|
|
|
63
|
-
|
|
41
|
+
Run these five steps in order. Skip a step only when its evidence is already in hand from an earlier step.
|
|
64
42
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
scip-query call-graph <entry-symbol>
|
|
68
|
-
scip-query code <entry-symbol>
|
|
69
|
-
scip-query dataflow <entry-symbol>
|
|
70
|
-
```
|
|
43
|
+
**1. Orient.** Run `stats` (repo-wide size/shape, complete), `kind-counts`, `system <module-or-scope>` (file paths, exported symbols with line ranges, internal/reverse deps, complete), `outline <entry-file>`, and `by-kind function --scope <scope>`.
|
|
44
|
+
Done when: module files, key symbols, dependencies, and reverse dependencies are mapped.
|
|
71
45
|
|
|
72
|
-
|
|
46
|
+
**2. Trace entry points.** Run `trace <entry-symbol>` (definition + every reference, bounded), `call-graph <entry-symbol>` (incoming callers, outgoing callees, bounded), `code <entry-symbol>`, `dataflow <entry-symbol>` — repeat for important callees until the path reaches a side effect, a returned value, or a terminal output.
|
|
47
|
+
Done when: the traced path connects entry point to observable effect.
|
|
73
48
|
|
|
74
|
-
|
|
49
|
+
**3. Map dependencies and consumers.** Run `deps <file>`, `rdeps <file>`, `fan-out <file>`, `surface <module>`, `affected <symbol> --json` (transitive closure of symbols that could break if this symbol changes: identities, files, traversal depths, bounded).
|
|
50
|
+
Done when: direct dependencies, public surface, and downstream blast radius are named.
|
|
75
51
|
|
|
76
|
-
|
|
52
|
+
**4. Follow data and state.** Run `dataflow <symbol-or-variable>` (definition sites, usage sites, producers, consumers, bounded), `slice <symbol-or-variable>`, `slice <symbol-or-variable> --forward`.
|
|
53
|
+
Done when: producers, transformations, storage, and consumers are identified — or explicitly marked unavailable.
|
|
77
54
|
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
scip-query rdeps <file>
|
|
81
|
-
scip-query fan-out <file>
|
|
82
|
-
scip-query surface <module>
|
|
83
|
-
scip-query affected <symbol>
|
|
84
|
-
```
|
|
55
|
+
**5. Assess risk.** Run `complexity <symbol>`, `complexity-hotspots`, `bottlenecks`, `change-surface <file>` (pre-change briefing: exports, consumers, blast-radius risk), `cycles`, `deep-chains --min-depth 5` (longest condensed dependency-component chains — flags fragile long call paths).
|
|
56
|
+
Done when: the explanation names the risky symbols, or states that no relevant risks appeared.
|
|
85
57
|
|
|
86
|
-
|
|
58
|
+
## Route by question type
|
|
87
59
|
|
|
88
|
-
|
|
60
|
+
| Question | Commands |
|
|
61
|
+
|---|---|
|
|
62
|
+
| Function behavior | `code`, `hierarchy`, `call-graph`, `dataflow`, `complexity` |
|
|
63
|
+
| User-action flow | `files` or `outline` to find the handler, then `code` and `call-graph` down the path |
|
|
64
|
+
| Safe to change? | `change-surface`, `affected`, `similar` |
|
|
65
|
+
| Module architecture | `system`, `surface`, `deep-chains`, `bottlenecks`, `cycles`, `hotspots` (`hotspots` lists the most-referenced symbols — choke points where any change ripples widely) |
|
|
66
|
+
| Relationship between two units | `coupling`, `similar --plan`, `similar-chains` |
|
|
89
67
|
|
|
90
|
-
|
|
91
|
-
scip-query dataflow <symbol-or-variable>
|
|
92
|
-
scip-query slice <symbol-or-variable>
|
|
93
|
-
scip-query slice <symbol-or-variable> --forward
|
|
94
|
-
```
|
|
68
|
+
## Other owned commands
|
|
95
69
|
|
|
96
|
-
|
|
70
|
+
These four don't have a dedicated workflow step above but come up constantly once you're inside a module — use them as needed, not in sequence:
|
|
97
71
|
|
|
98
|
-
|
|
72
|
+
- **`imported-by <symbol>`** — which files import this symbol. Run before changing or removing a shared export, to know exactly which files to check. If the list is empty, confirm with `dead` before deleting rather than trusting the empty result alone.
|
|
73
|
+
- **`unused-imports <file>`** — imports not referenced in that same file. Run on a file you're about to touch, or one a de-bloat pass flagged; remove only entries you've confirmed are safe.
|
|
74
|
+
- **`similar-signatures`** — functions with near-identical type signatures. Run when hunting duplicate-shaped functions to consolidate. This is a *good-with-review* signal — check each match with `code` before merging, don't act on the list alone.
|
|
75
|
+
- **`co-change [file]`** — files that change together in git history with no dependency edge between them: hidden coupling. Run when `change-surface` or `affected` reports a small blast radius but you suspect the graph is missing something. This is also *good-with-review* — a paired file is a prompt to check manually, not proof the current change must touch it too. (`diff-gate`'s `co-change-partner` check is the automated version of this same signal.)
|
|
99
76
|
|
|
100
|
-
|
|
101
|
-
scip-query complexity <symbol>
|
|
102
|
-
scip-query complexity-hotspots
|
|
103
|
-
scip-query bottlenecks
|
|
104
|
-
scip-query change-surface <file>
|
|
105
|
-
scip-query cycles
|
|
106
|
-
scip-query deep-chains --min-depth 5
|
|
107
|
-
```
|
|
77
|
+
## Report the exploration
|
|
108
78
|
|
|
109
|
-
|
|
79
|
+
Cover: overview, entry points, call flow, data flow, dependencies, consumers, risk areas, and the command citation that proves each claim. For every conclusion-bearing claim, name the rival explanation you considered and the evidence that ruled it out. Exploration is complete only when the reader can see what was proven, what remains unverified, and which conclusions rest on a discriminator rather than a single story.
|
|
110
80
|
|
|
111
|
-
##
|
|
81
|
+
## Deeper references
|
|
112
82
|
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
-
|
|
116
|
-
|
|
117
|
-
- Relationship between units: `coupling`, `similar --plan`, `similar-chains`.
|
|
83
|
+
| Need | Reference |
|
|
84
|
+
|---|---|
|
|
85
|
+
| Entering an unfamiliar language (TypeScript, Python, Java, Scala, Kotlin, Rust, Go, C, C++, Ruby, C#, Visual Basic, Dart, PHP, Clojure/ClojureScript, Vue) and picking the highest-signal commands, including de-bloat sets | `references/language-playbook.md` |
|
|
86
|
+
| Turning exploration evidence into an HTML flow, dependency, data-flow, or blast-radius diagram | `references/diagrams.md` |
|
|
118
87
|
|
|
119
|
-
##
|
|
88
|
+
## Constraint
|
|
120
89
|
|
|
121
|
-
|
|
90
|
+
scip-explore's OpenAI-agent interface binds to display name "SCIP Explore" with default prompt "Use $scip-explore to understand this system end to end with SCIP-backed code evidence."
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
interface:
|
|
2
2
|
display_name: "SCIP Explore"
|
|
3
|
-
short_description: "
|
|
4
|
-
default_prompt: "Use $scip-explore to understand this system end to end with SCIP-backed code evidence."
|
|
3
|
+
short_description: "Understand a system with SCIP evidence"
|
|
4
|
+
default_prompt: "Use $scip-explore to understand this system end to end with SCIP-backed code evidence before editing it."
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# Diagrams
|
|
2
|
+
|
|
3
|
+
Use this for code flow diagrams, architecture diagrams, data-flow maps, dependency maps, blast-radius visuals, module maps, or any HTML artifact that explains a system — built from `scip-query` evidence. A code diagram is an HTML artifact that turns source units, calls, dependencies, data flow, or blast radius into a visual map. Every node and edge must trace to `scip-query` evidence — gather it before drawing.
|
|
4
|
+
|
|
5
|
+
## Workflow
|
|
6
|
+
|
|
7
|
+
**1. Pick the diagram type.** Map the user's intent to a diagram type:
|
|
8
|
+
|
|
9
|
+
| Intent | Diagram type |
|
|
10
|
+
|---|---|
|
|
11
|
+
| Feature flow | Call flow |
|
|
12
|
+
| Value origin or mutation | Data flow |
|
|
13
|
+
| Who depends on this | Blast radius |
|
|
14
|
+
| Module architecture | Dependency map |
|
|
15
|
+
| Why this is hard to change | Change surface / bottleneck map |
|
|
16
|
+
| Classes or ownership | Hierarchy and surface map |
|
|
17
|
+
|
|
18
|
+
Done when: the diagram's node and edge types are chosen.
|
|
19
|
+
|
|
20
|
+
**2. Collect evidence.** Use only the commands the chosen diagram type needs, from:
|
|
21
|
+
|
|
22
|
+
- `system <module>` — module map (file paths, exported symbols with line ranges, internal/reverse deps) for a dependency or architecture diagram.
|
|
23
|
+
- `trace <symbol>` — definition sites plus all references, for a call-flow diagram.
|
|
24
|
+
- `call-graph <symbol>` — incoming callers and outgoing callees, for a call-flow diagram.
|
|
25
|
+
- `dataflow <symbol>` — definition sites, usage sites, producer symbols, consumer symbols, for a data-flow diagram.
|
|
26
|
+
- `affected <symbol> --json` — transitive closure of symbols that could break if this symbol changes, for blast-radius nodes and edges.
|
|
27
|
+
- `change-surface <file> --json --full` — exports, external consumer counts, and risk levels, for a change-surface map.
|
|
28
|
+
- Also available as needed: `surface`, `outline`, `code`, `slice`, `slice --forward`, `deps`, `rdeps`, `hierarchy --json`, `fan-out --json`.
|
|
29
|
+
|
|
30
|
+
Done when: every planned node and edge has a source command behind it.
|
|
31
|
+
|
|
32
|
+
**3. Build the artifact.** Write it to `docs/scip-query/diagrams/YYYY-MM-DD-<scope>.html`. It must include: title, scope, summary, the visual diagram, a legend, an evidence table (which command produced which nodes/edges — command provenance lives inside the artifact, not just in your chat reply), omitted/collapsed nodes, and unavailable capabilities. Use inline CSS and semantic HTML or inline SVG: stable dimensions, wrapping labels, accessible colors, and distinct edge styles for calls, data, dependencies, and risk. Scope large graphs into clusters instead of rendering a hairball.
|
|
33
|
+
|
|
34
|
+
Done when: the HTML contains both the visual diagram and the provenance/evidence table.
|
|
35
|
+
|
|
36
|
+
**4. Verify.** Open the diagram file locally, or use a browser/screenshot tool when available. Confirm: the diagram is nonblank, labels don't overlap badly, and major nodes/edges trace to evidence. If the diagram is part of a docs/code change, invoke `scip-verify`.
|
|
37
|
+
|
|
38
|
+
End the deliverable with the file path and a statement of what the diagram proves.
|
|
39
|
+
|
|
40
|
+
Load shared mechanics from `../_shared/SKILL.md` — use this skill's own command shortlist first and open `_shared` only when it's insufficient.
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# Language playbook
|
|
2
|
+
|
|
3
|
+
Choose the shortest command path from "what is this system doing?" to a verified, language-specific answer. Start with the active language's row before reaching for broader or noisier commands. Pair relationship commands (`call-graph`, `imports`, `imported-by`, `refs`) with `code` to confirm behavior claims — don't stop at the relationship alone. For de-bloat work, cross-check multiple detector families rather than trusting one. When a command is weaker for a given language, use that language's fallback note instead of forcing it.
|
|
4
|
+
|
|
5
|
+
## Universal first pass (any language)
|
|
6
|
+
|
|
7
|
+
Run in order: `stats` (repo-wide size/shape, complete) → `kind-counts` → `files <feature-or-module-name>` (locate the files, complete) → `outline <file>` (symbol tree with line ranges, complete) → `by-kind function --scope <feature-or-module-name>` → `trace <symbol>` (definition + every reference, bounded) → `hierarchy <symbol>` → `code <symbol>` (confirm behavior with source, complete).
|
|
8
|
+
|
|
9
|
+
## Per-language shortlists
|
|
10
|
+
|
|
11
|
+
Each row gives the commands to reach for first, a de-bloat set for cleanup passes, and a fallback note for where that language's evidence is weaker or stronger than usual.
|
|
12
|
+
|
|
13
|
+
**TypeScript** — first: `system`, `surface`, `call-graph`, `dataflow`, `change-surface`. De-bloat: `health`, `dead`, `similar`, `similar --plan`, `wrapper-candidates`, `passthrough-candidates`, `stale-abstractions`, `unused-imports`, `redundant-reexports`. Fallback: strongest verified surface of any language here; Vue script blocks use this same command path.
|
|
14
|
+
|
|
15
|
+
**Python** — first: `outline`, `kind-counts --scope`, `system`, `imports`, `imported-by`, `call-graph`. De-bloat: `dead`, `unused-imports`, `drift`, `similar-signatures`, `complexity`, `complexity-hotspots`. Fallback: prefer source-backed fallbacks when call/kind metadata is sparse.
|
|
16
|
+
|
|
17
|
+
**Java** — first: `system`, `surface`, `call-graph`, `deps`, `rdeps`, `slice`. De-bloat: `health`, `dead`, `similar-files`, `similar-chains`, `wrapper-candidates`, `stale-abstractions`, `extract-candidates`. Fallback: use module/package surfaces to avoid class-only tunnel vision.
|
|
18
|
+
|
|
19
|
+
**Scala** — first: `surface`, `trace`, `call-graph`, `imports`, `imported-by`. De-bloat: `dead`, `similar-files`, `similar-chains`, `extract-candidates`, `stale-abstractions`, `unused-imports`. Fallback: confirm behavior with `code`.
|
|
20
|
+
|
|
21
|
+
**Kotlin** — first: `surface`, `trace`, `call-graph`, `imports`, `imported-by`. De-bloat: `dead`, `similar-files`, `similar-chains`, `extract-candidates`, `stale-abstractions`, `unused-imports`. Fallback: confirm behavior with `code`.
|
|
22
|
+
|
|
23
|
+
**Rust** — first: `trace`, `call-graph`, `refs`, `methods`, `surface`. De-bloat: `dead`, `wrapper-candidates`, `passthrough-candidates`, `stale-abstractions`, `similar-signatures`, `redundant-reexports`. Fallback: `methods` and `surface` are usually high signal here.
|
|
24
|
+
|
|
25
|
+
**Go** — first: `surface`, `trace`, `call-graph`, `refs`, `fan-in`. De-bloat: `dead`, `wrapper-candidates`, `passthrough-candidates`, `similar-files`, `similar-signatures`, `complexity`. Fallback: use package-level surfaces and confirm exported APIs before cleanup.
|
|
26
|
+
|
|
27
|
+
**C++** — first: `trace`, `refs`, `methods`, `surface`, `code`. De-bloat: `dead`, `wrapper-candidates`, `similar-files`, `similar-chains`, `extract-candidates`, `unused-imports`. Fallback: try `call-graph` after trace/refs/code.
|
|
28
|
+
|
|
29
|
+
**C** — first: `trace`, `call-graph`, `refs`, `outline`, `fan-out`. De-bloat: `dead`, `wrapper-candidates`, `similar-files`, `similar-chains`, `extract-candidates`, `unused-imports`. Fallback: skip class/member commands — they don't apply.
|
|
30
|
+
|
|
31
|
+
**Ruby** — first: `trace`, `call-graph`, `refs`, `imports`, `imported-by`. De-bloat: `dead`, `wrapper-candidates`, `passthrough-candidates`, `stale-abstractions`, `similar-files`, `similar-signatures`. Fallback: confirm dynamic-looking paths with source.
|
|
32
|
+
|
|
33
|
+
**C#** — first: `surface`, `call-graph`, `trace`, `methods`, `refs`. De-bloat: `dead`, `wrapper-candidates`, `passthrough-candidates`, `stale-abstractions`, `similar-files`, `extract-candidates`. Fallback: use surfaces and methods together.
|
|
34
|
+
|
|
35
|
+
**Visual Basic** — first: `surface`, `call-graph`, `trace`, `methods`, `refs`. De-bloat: `dead`, `wrapper-candidates`, `passthrough-candidates`, `stale-abstractions`, `similar-files`, `extract-candidates`. Fallback: use surfaces and methods together.
|
|
36
|
+
|
|
37
|
+
**Dart** — first: `surface`, `call-graph`, `trace`, `imports`, `imported-by`. De-bloat: `dead`, `wrapper-candidates`, `stale-abstractions`, `similar-files`, `similar-signatures`, `redundant-reexports`. Fallback: confirm exported API shape with `surface`.
|
|
38
|
+
|
|
39
|
+
**PHP** — first: `trace`, `refs`, `methods`, `surface`, `code`. De-bloat: `dead`, `wrapper-candidates`, `stale-abstractions`, `similar-files`, `similar-signatures`, `extract-candidates`. Fallback: try `call-graph` after trace/refs/code.
|
|
40
|
+
|
|
41
|
+
**Clojure / ClojureScript** — first: `files`, `outline`, `trace`, `refs`, `call-graph`. De-bloat: `dead`, `similar-files`, `similar-signatures`, `complexity`, `complexity-hotspots`. Constraint: SCIP indexing comes from scip-clojure — there is no TypeScript-style semantic provider available for it, so don't expect the same depth of type-aware results.
|
|
42
|
+
|
|
43
|
+
## Minimal workflows
|
|
44
|
+
|
|
45
|
+
**Understand a feature:** `files <feature>` → `outline <file>` → `kind-counts --scope <feature>` → `fan-out <file>` → `trace <entry-symbol>` → `call-graph <entry-symbol>` → `code <entry-symbol>` → `surface <module>`.
|
|
46
|
+
|
|
47
|
+
**Find DRY and de-bloat wins:** `health` → `dead` → `wrapper-candidates` → `passthrough-candidates` → `stale-abstractions` → `similar-files` → `similar-chains` → `similar-signatures` → `extract-candidates`.
|
|
48
|
+
|
|
49
|
+
When recommending a command sequence, name the language and say why these commands are highest-signal for it — don't just list commands.
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: scip-improve
|
|
3
|
+
description: Use when edits should actually be made: fix confirmed cleanup findings batch by batch, consolidate a drifted twin into one canonical helper, implement a named maintainability mechanism, extract a React hook or Vue composable, move files to fix locality, or bring AGENTS.md/standards/docs back in sync with code. Requires findings already confirmed — audit first if they are not. For reducing one symbol's cognitive complexity, use `complexity-cleanup`; for deciding where a boundary belongs at design time, use `decomposition`.
|
|
4
|
+
commands:
|
|
5
|
+
- template: "scip-query cleanup-plan --verify --json"
|
|
6
|
+
when: "Build compiler-checked deletion batches from confirmed dead-code findings."
|
|
7
|
+
- template: "scip-query cleanup-apply --verified --batch <n>"
|
|
8
|
+
when: "Apply one already verified cleanup batch."
|
|
9
|
+
- template: "scip-query diff-gate --json --compact"
|
|
10
|
+
when: "Gate each implemented improvement slice before declaring it complete."
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## Purpose
|
|
14
|
+
|
|
15
|
+
This skill edits the working tree. It does not discover findings — it acts on
|
|
16
|
+
findings someone already confirmed: a cleanup-plan batch, a twin-drift group,
|
|
17
|
+
a maintainability register entry, a React/Vue duplicate or extraction
|
|
18
|
+
candidate, a directory move ledger, or a doc-drift worklist. If nothing has
|
|
19
|
+
been confirmed yet, run the matching scenario in `scip-audit` and come back
|
|
20
|
+
with its evidence and disposition.
|
|
21
|
+
|
|
22
|
+
## Ground rules, every scenario
|
|
23
|
+
|
|
24
|
+
- Work in small, independently verifiable batches or slices — one verified deletion batch, one migration slice, one twin group, one register entry. Never apply everything unattended.
|
|
25
|
+
- State the plan before editing: what's confirmed, the evidence, the intended change, how you'll verify it.
|
|
26
|
+
- Re-derive evidence from current `scip-query` output, not from memory or the stale text you're replacing.
|
|
27
|
+
- After every applied change, run the routed postchecks in the `scip-verify` skill, in addition to whatever narrow rerun this scenario names.
|
|
28
|
+
- Load command mechanics from `_shared` first; this file only names the commands each scenario needs and what to do with their output.
|
|
29
|
+
|
|
30
|
+
## Triage
|
|
31
|
+
|
|
32
|
+
| Situation | Do this | Reference |
|
|
33
|
+
|---|---|---|
|
|
34
|
+
| Fix confirmed cleanup findings, raise health, "keep cleaning" | `health` → `cleanup-plan --verify` → `cleanup-apply --verified --batch <n>` in a loop | `references/cleanup-batches.md` |
|
|
35
|
+
| AGENTS.md/CLAUDE.md/standards/command docs are stale or cite moved code | `doc-drift` → `outline`/`trace`/`code` per doc → rerun `doc-drift` | `references/doc-reconcile.md` |
|
|
36
|
+
| Same-name/near-name functions diverged, one-sided fix, drifted threshold | `twin-drift --json --full` → classify → consolidate → rerun `twin-drift` | `references/twin-drift.md` |
|
|
37
|
+
| Implement a confirmed maintainability register entry (hidden policy, thin wrapper, dead re-export) | `extract-candidates` / `passthrough-candidates` / `wrapper-candidates` / `stale-abstractions` / `redundant-reexports` to confirm, then implement the disposition | `references/maintainability-mechanism.md` |
|
|
38
|
+
| Extract a React hook/component or Vue composable/component | cross-check confirmed candidates, classify reuse/extract/split, extract | `references/frontend-extraction.md` |
|
|
39
|
+
| Move files to fix locality, declare/close an architecture boundary | `locality-candidates --json --full` → migration slice → boundary config → postchecks | `references/directory-moves.md` |
|
|
40
|
+
|
|
41
|
+
## Owned commands
|
|
42
|
+
|
|
43
|
+
`cleanup-apply`, `cleanup-plan`, `twin-drift`, `doc-drift`, `locality-candidates`, `extract-candidates`, `passthrough-candidates`, `wrapper-candidates`, `redundant-reexports`, `stale-abstractions` — each has a worked scenario in the references above; none should be run without reading the reference's evidence caveat first (several of these detectors are exploration-only with near-zero precision on codebases with intentional layering).
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
<!-- BEGIN GENERATED SKILL COMMANDS -->
|
|
47
|
+
## Commands for this skill
|
|
48
|
+
|
|
49
|
+
| Command | Purpose | Returns | Coverage | When |
|
|
50
|
+
| --- | --- | --- | --- | --- |
|
|
51
|
+
| `scip-query cleanup-plan --verify --json` | Ordered, batched deletion plan: graph-fact dead code plus the cascade candidates it unlocks | ordered cleanup batches, evidence, and optional verification outcomes | `bounded` | Build compiler-checked deletion batches from confirmed dead-code findings. |
|
|
52
|
+
| `scip-query cleanup-apply --verified --batch <n>` | Apply a compiler-verified cleanup-plan batch to the working tree | applied files, deletions, verification, and refusal reasons | `bounded` | Apply one already verified cleanup batch. |
|
|
53
|
+
| `scip-query diff-gate --json --compact` | Gate the current diff: architecture regressions plus echo, migration, coordination, doc-drift, unused-param, and new-dead candidates; exit 1 on blocking findings | blocking findings with check id, message, and remediation; advisory findings; root-cause groups; changed file and symbol counts; process exit status (1 when blocking findings exist) | `bounded` | Gate each implemented improvement slice before declaring it complete. |
|
|
54
|
+
|
|
55
|
+
Use this shortlist first. Open [`../_shared/SKILL.md`](../_shared/SKILL.md) only when it is insufficient.
|
|
56
|
+
<!-- END GENERATED SKILL COMMANDS -->
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# Cleanup batches
|
|
2
|
+
|
|
3
|
+
Use when the user asks to fix cleanup findings, raise health, keep cleaning, continue after setup, or work until no safe confirmed cleanup remains. The target is not a higher health score for its own sake — it's fixing confirmed issues that make the codebase harder to understand, verify, or change.
|
|
4
|
+
|
|
5
|
+
## Before editing
|
|
6
|
+
|
|
7
|
+
If cleanup findings have not been swept and confirmed yet, run the cleanup
|
|
8
|
+
scenario in `scip-audit` first. Then report a markdown block before touching
|
|
9
|
+
any code:
|
|
10
|
+
|
|
11
|
+
- current score from `scip-query health --json`
|
|
12
|
+
- the first confirmed batch: finding, evidence, planned fix, verification plan
|
|
13
|
+
- remaining signals with status
|
|
14
|
+
|
|
15
|
+
## Priority order
|
|
16
|
+
|
|
17
|
+
Work top to bottom, one item at a time:
|
|
18
|
+
|
|
19
|
+
1. Compiler-verified deletion batches (`cleanup-plan --verify`).
|
|
20
|
+
2. Incomplete migrations (`incomplete-migration --json --full`) and recent duplicate echoes (`duplicate-bodies --json --full`, exact small-body echoes).
|
|
21
|
+
3. Unused params/imports, dead symbols, isolated symbols.
|
|
22
|
+
4. Broken or stale docs, config validation issues, missing co-change partners.
|
|
23
|
+
5. Thin wrappers, passthroughs, stale abstractions, speculative generality.
|
|
24
|
+
6. Frontend component/hook/composable duplication and large-view pressure.
|
|
25
|
+
7. Directory architecture and maintainability repairs — only when evidence is strong and blast radius is bounded.
|
|
26
|
+
|
|
27
|
+
## The loop
|
|
28
|
+
|
|
29
|
+
Repeat until stopping:
|
|
30
|
+
|
|
31
|
+
1. Apply one verified deletion batch — `scip-query cleanup-apply --verified --batch <n>` against the plan from `scip-query cleanup-plan --verify --json` — or one small targeted refactor for the next prioritized item.
|
|
32
|
+
2. Run the narrow project check for the touched behavior (tests/typecheck scoped to what changed).
|
|
33
|
+
3. Run `scip-query health --json`.
|
|
34
|
+
4. Invoke the `scip-verify` skill.
|
|
35
|
+
5. If `docs/scip-query/health-dossier.md` exists (or a custom `--dossier-dir` was used), refresh it by rerunning `scip-query setup --json` with the same `--dossier-dir` if one was used.
|
|
36
|
+
6. Pick the next highest-priority confirmed item and repeat.
|
|
37
|
+
|
|
38
|
+
Only use `scip-query cleanup-apply --all` with explicit user approval — never apply all batches unattended by default.
|
|
39
|
+
|
|
40
|
+
## Stop when
|
|
41
|
+
|
|
42
|
+
- Only intentional, false-positive, blocked, or unconfirmed items remain.
|
|
43
|
+
- The next improvement would require a product/API/ownership decision.
|
|
44
|
+
- A missing toolchain prevents trustworthy verification.
|
|
45
|
+
- Further work would amount to broad redesign, not bounded cleanup.
|
|
46
|
+
|
|
47
|
+
## Between passes
|
|
48
|
+
|
|
49
|
+
After a cleanup pass, run `scip-query health --write-baseline` to snapshot finding identities. At the start of the next pass, compare against it with `scip-query health --baseline`.
|
|
50
|
+
|
|
51
|
+
## Closeout report
|
|
52
|
+
|
|
53
|
+
Starting and final health scores, batches applied, important files changed, verification commands run, remaining accepted or blocked items, and the highest-value follow-up.
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# Directory moves
|
|
2
|
+
|
|
3
|
+
Use to move files to fix locality or to close a dependency rule once the
|
|
4
|
+
directory scenario in `scip-audit` has produced a target structure or move
|
|
5
|
+
ledger. If there is no reviewed target structure yet, run that scenario first
|
|
6
|
+
— this reference starts from its output and never invents a target structure
|
|
7
|
+
on its own.
|
|
8
|
+
|
|
9
|
+
## Find and confirm the move
|
|
10
|
+
|
|
11
|
+
Run `scip-query locality-candidates --json --full` for directory-locality and ancestry candidates from consumer ownership (symbols, current homes, consumer locality, suggested homes). Cross-check current placement with `scip-query system <scope>` (files, exported symbols with line ranges, internal deps, reverse deps).
|
|
12
|
+
|
|
13
|
+
Concepts that decide whether a move is safe:
|
|
14
|
+
|
|
15
|
+
- **Ownership boundary** — a folder, package, module, or convention grouping code around one stable responsibility.
|
|
16
|
+
- **Forbidden edge** — an actual cross-boundary dependency rejected by an explicit project rule. Directory distance or an unusual import alone does not make an edge forbidden.
|
|
17
|
+
- **Reciprocal dependency** — traffic in both directions between two boundaries. It's a review signal that the boundaries exert mutual pressure, not proof that either import is wrong.
|
|
18
|
+
- **Migration slice** — the smallest set of file moves and import updates that can be verified independently.
|
|
19
|
+
|
|
20
|
+
Rules: separate review from migration — don't move files unless asked. Preserve broad boundaries when evidence shows they're intentional. Don't reward a generic "shared" boundary/directory unless the shared concept has a name, an owner, and cross-boundary consumers. Prefer small verified moves over large speculative reorganizations. Configure descriptive boundaries before closing dependency rules.
|
|
21
|
+
|
|
22
|
+
Before editing a slice, state: the files to move, the imports/exports/tests/docs to update, the expected verification, and the rollback risk.
|
|
23
|
+
|
|
24
|
+
## If boundaries themselves are changing
|
|
25
|
+
|
|
26
|
+
Add mature boundary path patterns to `.scipquery.json` under `architecture.boundaries` **without** `allowedDependencies` rows first, e.g.:
|
|
27
|
+
|
|
28
|
+
```json
|
|
29
|
+
{ "architecture": { "boundaries": [
|
|
30
|
+
{ "name": "domain", "paths": ["src/domain/**"] },
|
|
31
|
+
{ "name": "runtime", "paths": ["src/runtime/**"] }
|
|
32
|
+
] } }
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Then run `scip-query config-validate --json`, then `scip-query architecture --json`.
|
|
36
|
+
|
|
37
|
+
An `allowedDependencies` row is closed: an outgoing target omitted from a present row is forbidden, but a missing row makes no dependency claim at all. Example: `{ "architecture": { "boundaries": [...], "allowedDependencies": { "domain": [], "runtime": ["domain"] }, "requireAcyclic": true } }`. For each closed row, record the evidence for its intended direction. Never copy the current dependency graph into the allow-list merely to obtain zero findings; leave emerging or disputed rules undeclared rather than closing the row prematurely.
|
|
38
|
+
|
|
39
|
+
When repairing a boundary cycle, inspect the least-broad edge inside it first, then decide whether the fix is a move, a dependency inversion, a named shared contract, a boundary merge, or a policy correction.
|
|
40
|
+
|
|
41
|
+
## Ratcheting enforcement on a large repo
|
|
42
|
+
|
|
43
|
+
Before enabling architecture regression enforcement on an existing codebase, review the direct findings with `scip-query drift --architecture` and record reviewed existing debt with `scip-query health --write-baseline`. The baseline records stable architecture identities by boundary pair, not by whichever example file happens to sort first. Commit `.scipquery-baseline.json` together with `.scipquery.json`.
|
|
44
|
+
|
|
45
|
+
The default `diff-gate` architecture check compares only architecture identities and does not run every health detector; `diff-gate --baseline` is the opt-in full health ratchet and does not duplicate architecture findings. A missing baseline causes the architecture gate to report that enforcement is not enabled — it does **not** silently treat the current dependency graph as accepted.
|
|
46
|
+
|
|
47
|
+
## After moving the slice
|
|
48
|
+
|
|
49
|
+
Run `scip-query incomplete-migration`, `scip-query recent-duplicates`, and `scip-query co-change <moved-file-or-config>`, plus the project's tests or typecheck for the affected workspace.
|
|
50
|
+
|
|
51
|
+
If `.scipquery.json` locality changed, also run `scip-query config-validate`, `scip-query locality-candidates --json --full`, `scip-query architecture --json`, `scip-query drift --architecture`, and `scip-query diff-gate`.
|
|
52
|
+
|
|
53
|
+
Then invoke `scip-verify`. The implementation is complete only when imports, tests, locality signals, and verification are all checked.
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# Doc reconciliation
|
|
2
|
+
|
|
3
|
+
Use for stale standards, broken file references, docs that cite moved code, agent guidance, or normative contradictions between documentation and implementation. Only reconcile living docs — documentation agents or maintainers use to make present-day changes: AGENTS.md, CLAUDE.md, standards, command docs, workflow docs. Do not reconcile archival records (dated plans, ADRs, reports); list them in `.scipquery.json` under `docs.snapshotPaths` so `doc-drift` excludes them with a labeled exclusion instead of resurfacing them every sweep.
|
|
4
|
+
|
|
5
|
+
The core distinction driving every edit:
|
|
6
|
+
|
|
7
|
+
- **Descriptive claims** say what the code currently does or where it lives. Update them when code moves.
|
|
8
|
+
- **Normative claims** say what code must or should do. If code violates one, fix the code or escalate the contradiction — never weaken the standard silently to match drifted code.
|
|
9
|
+
|
|
10
|
+
## Step 1 — Build the worklist
|
|
11
|
+
|
|
12
|
+
Run `scip-query doc-drift --json --full` for the ranked worklist (document paths, coupled code subjects, history evidence), plus `scip-query doc-drift <doc-or-tree>` for anything scoped. Prioritize broken references first, then highest staleness, then the docs agents read most. Done only when each target doc is selected for a current-use reason.
|
|
13
|
+
|
|
14
|
+
## Step 2 — Reconcile one doc
|
|
15
|
+
|
|
16
|
+
For each doc: `scip-query doc-drift <doc>`, `scip-query outline <subject-file>` for its current shape, `scip-query system <module>` for the surrounding module, `scip-query trace <symbol>` for every symbol the doc mentions, `scip-query code <symbol>` to re-derive any snippet from current source (never from memory or the stale text). Use git history only to understand why a subject changed, never as a substitute for current code evidence.
|
|
17
|
+
|
|
18
|
+
- Fix broken references by finding the current code or deleting the obsolete claim.
|
|
19
|
+
- Rewrite stale descriptive claims from the evidence just gathered.
|
|
20
|
+
- Record normative contradictions instead of changing standards to bless drifted code.
|
|
21
|
+
|
|
22
|
+
Done only when every edited claim is supported by evidence gathered in this session.
|
|
23
|
+
|
|
24
|
+
## Step 3 — Verify
|
|
25
|
+
|
|
26
|
+
Rerun `scip-query doc-drift <doc>`. If the documentation change is part of a codebase diff, invoke `scip-verify`. Don't claim reconciliation is done until `doc-drift` has been rerun. Done only when staleness drops to zero or the remaining contradiction is explicitly reported.
|
|
27
|
+
|
|
28
|
+
## Step 4 — Report
|
|
29
|
+
|
|
30
|
+
Staleness before and after, broken references fixed, claims updated, normative contradictions surfaced, and docs recommended for deletion.
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# React/Vue extraction
|
|
2
|
+
|
|
3
|
+
Use to extract a React hook/component or a Vue composable/component once the
|
|
4
|
+
frontend scenario in `scip-audit` has produced confirmed candidate pairs. If
|
|
5
|
+
nothing is confirmed yet, run that scenario first, then cross-check, then act.
|
|
6
|
+
|
|
7
|
+
- A **component duplicate candidate** is a pair or group of rendered structures repeating the same user-facing arrangement, controls, states, props/bindings, or data-presentation shape enough that a shared component may reduce drift.
|
|
8
|
+
- A **hook candidate** (React) / **composable candidate** (Vue) is a pair or group of behaviors repeating the same state lifecycle, effects, requests, validation, persistence, or derived-data policy enough that a shared hook/composable may preserve behavior better.
|
|
9
|
+
- **Large component/view pressure** means one component, SFC, or linked view file contains several kinds of knowledge that change for different reasons — a large file or style block is pressure, not proof, by itself.
|
|
10
|
+
|
|
11
|
+
## Scan (only if not already done)
|
|
12
|
+
|
|
13
|
+
React: `scip-query react-component-duplicates`, `react-hook-candidates`, `react-large-component-pressure`, `recent-duplicates`, `health` — all `--scope <scope> --full --json`, uncapped.
|
|
14
|
+
|
|
15
|
+
Vue: same shape, using `vue-component-duplicates`, `vue-composable-candidates`, `vue-large-view-pressure`. Before scanning, when component references, imported composables, script blocks, or linked external scripts matter, run `scip-query augment-vue --project <path-to-tsconfig>` to add compiler-resolved Vue SFC references via Volar — Vue needs this step; React doesn't.
|
|
16
|
+
|
|
17
|
+
Record scope, counts, and uncapped/full status.
|
|
18
|
+
|
|
19
|
+
## Cross-check before acting
|
|
20
|
+
|
|
21
|
+
Use `scip-query outline <file>`, `deps <file>`, `rdeps <file>`, `similar-files --scope <scope>`, and either `scip-query similar <closest-existing-component-or-hook>` (React) or `scip-query recent-duplicates --scope <scope> --full --json` (Vue) to validate each candidate. Classify every top candidate as reuse, extract, split, skip, or blocked:
|
|
22
|
+
|
|
23
|
+
- Component-duplicate-only → look for a shared presentational component or existing reuse.
|
|
24
|
+
- Hook/composable-candidate-only → look for shared state lifecycle, effects, requests, validation, persistence, or derived-state policy.
|
|
25
|
+
- Both overlap → look for a feature-level concept that needs both a component boundary and a hook/composable boundary.
|
|
26
|
+
- Large-component/view-only → split by reason to change, not by line count.
|
|
27
|
+
|
|
28
|
+
## Act
|
|
29
|
+
|
|
30
|
+
Prefer reuse over extraction. Extract a component for repeated UI/template structure, props, slots/children, states, or design-system composition. Extract a hook for repeated state, effects, requests, subscriptions, memoized derivations, callbacks, or persistence; extract a composable for the Vue equivalent — repeated state, lifecycle, requests, validation, persistence, derived data, or event policy. Keep essential domain-specific variation at the call site.
|
|
31
|
+
|
|
32
|
+
Don't:
|
|
33
|
+
- Create boolean-soup APIs or wrapper components/composables with no policy as a side effect.
|
|
34
|
+
- Treat shared design-system primitives, icons, labels, route names, test IDs, or CSS utilities alone as sufficient evidence for a duplicate/hook/composable claim.
|
|
35
|
+
- Extract a shared hook or composable from templates that merely look similar but carry different domain lifecycles — that similarity may justify a shared presentational component, never a shared hook/composable.
|
|
36
|
+
|
|
37
|
+
## Verify and report
|
|
38
|
+
|
|
39
|
+
Invoke `scip-verify` and run its React or Vue postcheck rows, plus the applicable extraction, duplicate, parameter, wrapper, passthrough, and stale-abstraction checks. Work is complete only when the acted-on candidate pairs disappear, weaken materially, or are explicitly accepted as essential variation. Report: executive read, command evidence, candidate groups, recommended action taken, post-change proof, and remaining accepted variation.
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# Implementing a maintainability mechanism
|
|
2
|
+
|
|
3
|
+
Use to implement a confirmed maintainability opportunity: a register or atlas
|
|
4
|
+
entry that names a hidden policy, an unnamed lifecycle, or scattered concepts,
|
|
5
|
+
and proposes a disposition. Maintainability is the degree to which real code
|
|
6
|
+
units let a maintainer understand, verify, and change behavior without
|
|
7
|
+
rediscovering hidden knowledge. If there is no confirmed register entry yet,
|
|
8
|
+
run the maintainability scenario in `scip-audit` first — this reference starts
|
|
9
|
+
from its output.
|
|
10
|
+
|
|
11
|
+
## Vocabulary you need to act correctly
|
|
12
|
+
|
|
13
|
+
- **Concept boundary** — the line around code units that exist for one reason to change.
|
|
14
|
+
- **Hidden policy** — a rule for choosing among several plausible behaviors that lives in local branches, comments, conventions, or caller folklore instead of a named mechanism.
|
|
15
|
+
- **Lifecycle** — a repeatable sequence of states or steps that makes a result valid.
|
|
16
|
+
- **Essential variation** — difference that must remain because the real units differ: language grammars, user-visible APIs, runtime environments, compatibility boundaries. **Accidental variation** — difference in code shape that doesn't correspond to any of those. Preserve the former; remove the latter.
|
|
17
|
+
- **System compression** — replacing several mechanisms that perform the same role, policy, lifecycle, or surface job with fewer named mechanisms, preserving behavior.
|
|
18
|
+
- **Unifying definition** — the single essential trait that makes several code sites one concept. A merge, extract, or generate action is only justified when you can state this trait and it covers every cited site; if it doesn't, the variation is essential and those sites must not be consolidated.
|
|
19
|
+
|
|
20
|
+
Ground every action in files, symbols, references, call graphs, dependencies, surfaces, and blast radius — never opinion. Name concrete referents before naming a smell. Don't chase health scores; detector counts are clues, not objectives. Only add an abstraction when it removes hidden policy, names a lifecycle, enforces a rule, or reduces concept count — never for its own sake. Prefer deletion, inlining, merging, generation, or enforcement of an existing mechanism before introducing a broad new framework.
|
|
21
|
+
|
|
22
|
+
## Priority when several confirmed entries compete
|
|
23
|
+
|
|
24
|
+
Rank by severity tier, most severe first: (1) hidden correctness or evidence policy spread across modules, (2) a repeated lifecycle/pipeline with no owner, (3) public surface exposing accidental internals, (4) a large module with unrelated reasons to change, (5) tests that encode incident history without contract vocabulary, (6) adapter families with repeated capability/fallback shapes, (7) suppression comments documenting architecture decisions instead of exceptions, (8) thin wrappers/passthroughs that don't buy clarity. Reject and don't act on smells that are aesthetic, unverifiable, or false compression.
|
|
25
|
+
|
|
26
|
+
## Confirming a candidate before you touch code
|
|
27
|
+
|
|
28
|
+
- `scip-query extract-candidates` finds heuristic extraction candidates from isolated callee clusters. When the register calls for extracting a shared helper, run this to confirm the callee cluster, then read every cited site to check the unifying definition actually holds.
|
|
29
|
+
- `scip-query passthrough-candidates` finds heuristic passthrough candidates that forward to one callee. When the disposition is inline or delete, run this to confirm the passthrough is real before removing it.
|
|
30
|
+
- `scip-query wrapper-candidates` and `scip-query stale-abstractions` find, respectively, single-consumer wrappers and 0–1-consumer abstractions — both have near-zero precision on codebases with intentional layering or ambient types. Treat every hit as exploration, never a finding; run them only after the main sweep is exhausted; never act on a hit without reading the cited code first, and confirm real consumer counts with `refs`/`surface` before deciding a disposition.
|
|
31
|
+
- `scip-query redundant-reexports` finds barrel re-exports that nobody imports through. When the disposition is delete, confirm no import path actually uses the barrel, then remove the re-export and update any doc or index that referenced it.
|
|
32
|
+
|
|
33
|
+
## Dispositions
|
|
34
|
+
|
|
35
|
+
merge, delete, inline, extract, generate, enforce, supersede, defer, skip. Every merge/extract/generate action must carry its unifying definition and its strongest dissenter — the cited site most likely to differ essentially — plus evidence that the dissenter doesn't actually differ essentially. If a dissenter survives review (it really does differ essentially), the entry's disposition becomes skip with reason "essential variation," but the dissenter stays recorded either way.
|
|
36
|
+
|
|
37
|
+
## Implement
|
|
38
|
+
|
|
39
|
+
Implement the smallest named mechanism that matches the real concept. Keep essential variation near the adapter or domain code that knows it, not buried inside the new mechanism.
|
|
40
|
+
|
|
41
|
+
## Verify and report
|
|
42
|
+
|
|
43
|
+
Run focused tests, then the routed postchecks from `scip-verify`. The final report states the smell addressed, the mechanism introduced or removed, what was deliberately not compressed, and the verification results.
|