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,49 +1,73 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: scip-debug
|
|
3
|
-
description:
|
|
3
|
+
description: Debug bugs and regressions with scip-query evidence. Use for failing behavior, wrong data flow, confusing runtime paths, broken tests, root-cause analysis, reproduction, tracing, or minimal fixes.
|
|
4
|
+
commands:
|
|
5
|
+
- template: "scip-query files <feature-or-error-term>"
|
|
6
|
+
when: "Find the entry point from a feature name or error term."
|
|
7
|
+
- template: "scip-query trace <candidate-symbol>"
|
|
8
|
+
when: "Find the entry point: definition plus every reference."
|
|
9
|
+
- template: "scip-query call-graph <entry-symbol>"
|
|
10
|
+
when: "Follow execution: callers and callees along the failing path."
|
|
11
|
+
- template: "scip-query dataflow <symbol-or-variable>"
|
|
12
|
+
when: "Follow data: producers, consumers, and usage sites."
|
|
13
|
+
- template: "scip-query similar <suspect-symbol> --json --full"
|
|
14
|
+
when: "Compare nearby implementations for missing guards or handling."
|
|
15
|
+
- template: "scip-query change-surface <suspect-file> --json --full"
|
|
16
|
+
when: "Bound the fix: exports, consumers, and blast-radius risk."
|
|
4
17
|
---
|
|
5
18
|
|
|
6
|
-
#
|
|
19
|
+
# scip-debug
|
|
7
20
|
|
|
8
|
-
Use this skill to move from a reported failure to a minimal verified fix. A bug is a mismatch between expected behavior and observed behavior in a concrete execution path. A root cause is the earliest code fact in that path that explains the mismatch
|
|
21
|
+
Use this skill to move from a reported failure to a minimal verified fix. A bug is a mismatch between expected behavior and observed behavior in a concrete execution path. A root cause is the earliest code fact in that path that explains the mismatch.
|
|
22
|
+
|
|
23
|
+
Load shared mechanics from [`../_shared/SKILL.md`](../_shared/SKILL.md).
|
|
24
|
+
|
|
25
|
+
<!-- BEGIN GENERATED SKILL COMMANDS -->
|
|
26
|
+
## Commands for this skill
|
|
27
|
+
|
|
28
|
+
| Command | Purpose | When |
|
|
29
|
+
| --- | --- | --- |
|
|
30
|
+
| `scip-query files <feature-or-error-term>` | Find files matching a pattern | Find the entry point from a feature name or error term. |
|
|
31
|
+
| `scip-query trace <candidate-symbol>` | Trace a symbol: definition + all references | Find the entry point: definition plus every reference. |
|
|
32
|
+
| `scip-query call-graph <entry-symbol>` | Show incoming callers and outgoing callees for a symbol | Follow execution: callers and callees along the failing path. |
|
|
33
|
+
| `scip-query dataflow <symbol-or-variable>` | Reference-level dataflow: definition sites, usage sites, producers, consumers | Follow data: producers, consumers, and usage sites. |
|
|
34
|
+
| `scip-query similar <suspect-symbol> --json --full` | Find heuristic function similarity candidates from callee fingerprints | Compare nearby implementations for missing guards or handling. |
|
|
35
|
+
| `scip-query change-surface <suspect-file> --json --full` | Pre-change briefing: exports, consumers, and blast-radius risk | Bound the fix: exports, consumers, and blast-radius risk. |
|
|
36
|
+
|
|
37
|
+
Use this shortlist first. Open [`../_shared/SKILL.md`](../_shared/SKILL.md) only when it is insufficient.
|
|
38
|
+
<!-- END GENERATED SKILL COMMANDS -->
|
|
9
39
|
|
|
10
40
|
## Rules
|
|
11
41
|
|
|
12
|
-
1. Reproduce or restate the failure before
|
|
13
|
-
2. Use scip-query to
|
|
14
|
-
3. Prefer one narrow fix over broad cleanup.
|
|
15
|
-
4. Verify
|
|
42
|
+
1. Reproduce or restate the failure before editing.
|
|
43
|
+
2. Use scip-query to find entry points, call paths, data flow, and blast radius.
|
|
44
|
+
3. Prefer one narrow fix over broad cleanup.
|
|
45
|
+
4. Verify with the narrowest repo test or smoke command, then invoke `scip-verify`.
|
|
16
46
|
|
|
17
47
|
## Workflow
|
|
18
48
|
|
|
19
49
|
### 1. Pin the failure
|
|
20
50
|
|
|
21
|
-
Record
|
|
51
|
+
Record observed behavior, expected behavior, reproducing command/route/UI action/test/job/file, error text or wrong output, and regression window if known.
|
|
22
52
|
|
|
23
|
-
|
|
24
|
-
- expected behavior;
|
|
25
|
-
- command, route, UI action, test, job, or file that exposes it;
|
|
26
|
-
- error text or wrong output;
|
|
27
|
-
- suspected time window if it is a regression.
|
|
53
|
+
If no reproduction is provided, build the smallest runnable reproduction from existing tests, scripts, CLI, or app entry points.
|
|
28
54
|
|
|
29
|
-
|
|
55
|
+
This step is complete only when the mismatch is concrete enough to test or the missing external fact is named.
|
|
30
56
|
|
|
31
57
|
### 2. Find the entry point
|
|
32
58
|
|
|
33
59
|
```bash
|
|
34
|
-
scip-query status --capabilities
|
|
35
|
-
scip-query status --capabilities
|
|
36
|
-
# If freshness is stale, missing, or unknown:
|
|
37
|
-
# scip-query reindex
|
|
38
60
|
scip-query files <feature-or-error-term>
|
|
39
61
|
scip-query outline <candidate-file>
|
|
40
62
|
scip-query trace <candidate-symbol>
|
|
41
63
|
scip-query code <candidate-symbol>
|
|
42
64
|
```
|
|
43
65
|
|
|
44
|
-
Use `
|
|
66
|
+
Use `kind-counts` or `by-kind` when the codebase is unfamiliar.
|
|
67
|
+
|
|
68
|
+
This step is complete only when the failing path has a plausible entry point with source evidence.
|
|
45
69
|
|
|
46
|
-
### 3. Follow execution
|
|
70
|
+
### 3. Follow execution and data
|
|
47
71
|
|
|
48
72
|
```bash
|
|
49
73
|
scip-query call-graph <entry-symbol>
|
|
@@ -51,73 +75,51 @@ scip-query code <callee-symbol>
|
|
|
51
75
|
scip-query refs <state-or-api-symbol>
|
|
52
76
|
scip-query fan-in <suspect-symbol>
|
|
53
77
|
scip-query fan-out <suspect-file>
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
Build the smallest path that explains the observed behavior. Stop expanding once the path reaches the first code fact that can cause the symptom.
|
|
57
|
-
|
|
58
|
-
### 4. Follow data and state
|
|
59
|
-
|
|
60
|
-
```bash
|
|
61
78
|
scip-query dataflow <symbol-or-variable>
|
|
62
79
|
scip-query slice <symbol-or-variable>
|
|
63
80
|
scip-query slice <symbol-or-variable> --forward
|
|
64
81
|
```
|
|
65
82
|
|
|
66
|
-
|
|
83
|
+
Stop expanding when the first code fact that can cause the symptom is found.
|
|
67
84
|
|
|
68
|
-
|
|
85
|
+
This step is complete only when the path explains the symptom or the missing evidence is explicit.
|
|
86
|
+
|
|
87
|
+
### 4. Compare nearby implementations
|
|
69
88
|
|
|
70
89
|
```bash
|
|
71
90
|
scip-query similar <suspect-symbol> --json --full
|
|
72
|
-
scip-query
|
|
91
|
+
scip-query similar <suspect-symbol> <similar-symbol> --plan
|
|
73
92
|
scip-query similar-files <suspect-file> --json --full
|
|
74
93
|
```
|
|
75
94
|
|
|
76
|
-
|
|
95
|
+
Use comparisons to find missing guards, conversions, lifecycle steps, or error handling. Preserve essential differences.
|
|
96
|
+
|
|
97
|
+
This step is complete only when comparisons either support the fix or are rejected with a reason.
|
|
77
98
|
|
|
78
|
-
###
|
|
99
|
+
### 5. Bound and fix
|
|
79
100
|
|
|
80
101
|
```bash
|
|
81
102
|
scip-query change-surface <suspect-file> --json --full
|
|
82
103
|
scip-query affected <suspect-symbol> --json
|
|
83
|
-
scip-query diff-impact --json
|
|
84
104
|
```
|
|
85
105
|
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
### 7. Fix and verify
|
|
106
|
+
Make the smallest code change that fixes the root cause.
|
|
89
107
|
|
|
90
|
-
|
|
108
|
+
This step is complete only when the changed symbol/file is justified by blast-radius evidence.
|
|
91
109
|
|
|
92
|
-
|
|
93
|
-
scip-query status --capabilities
|
|
94
|
-
# If freshness is stale, missing, or unknown:
|
|
95
|
-
# scip-query reindex
|
|
96
|
-
scip-query diff-gate --json
|
|
97
|
-
```
|
|
110
|
+
### 6. Verify
|
|
98
111
|
|
|
99
|
-
|
|
112
|
+
Run the reproduction, narrow test or smoke command, and invoke `scip-verify`.
|
|
100
113
|
|
|
101
|
-
## Report
|
|
114
|
+
## Report
|
|
102
115
|
|
|
103
116
|
```markdown
|
|
104
|
-
Bug:
|
|
105
|
-
|
|
117
|
+
Bug:
|
|
106
118
|
Entry point:
|
|
107
|
-
- <file/symbol> from <command>
|
|
108
|
-
|
|
109
119
|
Root cause:
|
|
110
|
-
- <code fact> from <command>
|
|
111
|
-
|
|
112
120
|
Fix:
|
|
113
|
-
- <minimal change>
|
|
114
|
-
|
|
115
121
|
Verification:
|
|
116
|
-
- <repo test or smoke command>
|
|
117
|
-
- `scip-query diff-gate --json`
|
|
118
|
-
|
|
119
122
|
Remaining risk:
|
|
120
|
-
- <blast radius, unavailable capability, or follow-up cleanup>
|
|
121
123
|
```
|
|
122
124
|
|
|
123
|
-
|
|
125
|
+
Do not present a guess as a root cause. If no root cause is proven, report the missing evidence.
|
|
@@ -1,43 +1,68 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: scip-diagram
|
|
3
|
-
description:
|
|
3
|
+
description: Diagram code with scip-query evidence. Use for code flow diagrams, architecture diagrams, data-flow maps, dependency maps, blast-radius visuals, module maps, or HTML artifacts explaining a system.
|
|
4
|
+
commands:
|
|
5
|
+
- template: "scip-query system <module>"
|
|
6
|
+
when: "Collect evidence: module map for a dependency or architecture diagram."
|
|
7
|
+
- template: "scip-query trace <symbol>"
|
|
8
|
+
when: "Collect evidence: definition plus references for a call-flow diagram."
|
|
9
|
+
- template: "scip-query call-graph <symbol>"
|
|
10
|
+
when: "Collect evidence: callers/callees for a call-flow diagram."
|
|
11
|
+
- template: "scip-query dataflow <symbol>"
|
|
12
|
+
when: "Collect evidence: producers/consumers for a data-flow diagram."
|
|
13
|
+
- template: "scip-query affected <symbol> --json"
|
|
14
|
+
when: "Collect evidence: blast-radius nodes and edges."
|
|
15
|
+
- template: "scip-query change-surface <file> --json --full"
|
|
16
|
+
when: "Collect evidence: exports and consumers for a change-surface map."
|
|
4
17
|
---
|
|
5
18
|
|
|
6
|
-
#
|
|
19
|
+
# scip-diagram
|
|
7
20
|
|
|
8
|
-
Use this skill to build a visual explanation from compiler-resolved
|
|
21
|
+
Use this skill to build a visual explanation from compiler-resolved facts. 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.
|
|
22
|
+
|
|
23
|
+
Load shared mechanics from [`../_shared/SKILL.md`](../_shared/SKILL.md).
|
|
24
|
+
|
|
25
|
+
<!-- BEGIN GENERATED SKILL COMMANDS -->
|
|
26
|
+
## Commands for this skill
|
|
27
|
+
|
|
28
|
+
| Command | Purpose | When |
|
|
29
|
+
| --- | --- | --- |
|
|
30
|
+
| `scip-query system <module>` | Full module map: files, symbols, deps in/out | Collect evidence: module map for a dependency or architecture diagram. |
|
|
31
|
+
| `scip-query trace <symbol>` | Trace a symbol: definition + all references | Collect evidence: definition plus references for a call-flow diagram. |
|
|
32
|
+
| `scip-query call-graph <symbol>` | Show incoming callers and outgoing callees for a symbol | Collect evidence: callers/callees for a call-flow diagram. |
|
|
33
|
+
| `scip-query dataflow <symbol>` | Reference-level dataflow: definition sites, usage sites, producers, consumers | Collect evidence: producers/consumers for a data-flow diagram. |
|
|
34
|
+
| `scip-query affected <symbol> --json` | Transitive closure of symbols that could break if this symbol changes | Collect evidence: blast-radius nodes and edges. |
|
|
35
|
+
| `scip-query change-surface <file> --json --full` | Pre-change briefing: exports, consumers, and blast-radius risk | Collect evidence: exports and consumers for a change-surface map. |
|
|
36
|
+
|
|
37
|
+
Use this shortlist first. Open [`../_shared/SKILL.md`](../_shared/SKILL.md) only when it is insufficient.
|
|
38
|
+
<!-- END GENERATED SKILL COMMANDS -->
|
|
9
39
|
|
|
10
40
|
## Rules
|
|
11
41
|
|
|
12
|
-
1. Run
|
|
13
|
-
2.
|
|
14
|
-
3. Include command provenance in the
|
|
15
|
-
4.
|
|
16
|
-
5. Verify the HTML opens
|
|
42
|
+
1. Run evidence before drawing.
|
|
43
|
+
2. Default to a self-contained HTML file.
|
|
44
|
+
3. Include command provenance in the artifact.
|
|
45
|
+
4. Scope large graphs into clusters instead of rendering a hairball.
|
|
46
|
+
5. Verify the HTML opens and the diagram is nonblank.
|
|
17
47
|
|
|
18
|
-
##
|
|
48
|
+
## Workflow
|
|
19
49
|
|
|
20
|
-
|
|
21
|
-
|---|---|
|
|
22
|
-
| "How does this feature work?" | Call-flow diagram |
|
|
23
|
-
| "Where does this value come from?" | Data-flow diagram |
|
|
24
|
-
| "What depends on this?" | Blast-radius diagram |
|
|
25
|
-
| "What is this module's architecture?" | Module/dependency diagram |
|
|
26
|
-
| "Why is this hard to change?" | Change-surface or bottleneck diagram |
|
|
27
|
-
| "Show classes or ownership" | Hierarchy and surface diagram |
|
|
50
|
+
### 1. Pick diagram type
|
|
28
51
|
|
|
29
|
-
|
|
52
|
+
| User wants | Diagram |
|
|
53
|
+
| --- | --- |
|
|
54
|
+
| Feature flow | Call flow |
|
|
55
|
+
| Value origin or mutation | Data flow |
|
|
56
|
+
| Dependents | Blast radius |
|
|
57
|
+
| Module architecture | Dependency map |
|
|
58
|
+
| Hard-to-change explanation | Change surface or bottleneck map |
|
|
59
|
+
| Classes or ownership | Hierarchy and surface map |
|
|
30
60
|
|
|
31
|
-
|
|
61
|
+
This step is complete only when the diagram's node and edge types are chosen.
|
|
32
62
|
|
|
33
|
-
|
|
34
|
-
scip-query status --capabilities
|
|
35
|
-
scip-query status --capabilities
|
|
36
|
-
# If freshness is stale, missing, or unknown:
|
|
37
|
-
# scip-query reindex
|
|
38
|
-
```
|
|
63
|
+
### 2. Collect evidence
|
|
39
64
|
|
|
40
|
-
|
|
65
|
+
Use only commands needed for the chosen diagram:
|
|
41
66
|
|
|
42
67
|
```bash
|
|
43
68
|
scip-query system <module>
|
|
@@ -55,86 +80,31 @@ scip-query affected <symbol> --json
|
|
|
55
80
|
scip-query change-surface <file> --json --full
|
|
56
81
|
scip-query hierarchy <symbol> --json
|
|
57
82
|
scip-query fan-out <file> --json
|
|
58
|
-
scip-query bottlenecks
|
|
59
|
-
scip-query cycles
|
|
60
83
|
```
|
|
61
84
|
|
|
62
|
-
|
|
85
|
+
This step is complete only when every planned node and edge has a source command.
|
|
63
86
|
|
|
64
|
-
|
|
87
|
+
### 3. Build the artifact
|
|
65
88
|
|
|
66
|
-
Write
|
|
89
|
+
Write to:
|
|
67
90
|
|
|
68
91
|
```text
|
|
69
92
|
docs/scip-query/diagrams/YYYY-MM-DD-<scope>.html
|
|
70
93
|
```
|
|
71
94
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
- title and scope;
|
|
75
|
-
- short textual summary;
|
|
76
|
-
- the visual diagram;
|
|
77
|
-
- legend for node colors, edge styles, and risk labels;
|
|
78
|
-
- evidence table listing every scip-query command used;
|
|
79
|
-
- notes for omitted nodes, collapsed clusters, or unavailable capabilities.
|
|
80
|
-
|
|
81
|
-
Implementation guidance:
|
|
82
|
-
|
|
83
|
-
- Use inline CSS and either semantic HTML layout or inline SVG.
|
|
84
|
-
- Use stable dimensions and labels that wrap cleanly.
|
|
85
|
-
- Use one visual encoding per meaning: call edges, data edges, dependency edges, and risk edges should look different.
|
|
86
|
-
- Keep colors accessible and avoid relying on color alone; include labels or edge styles.
|
|
87
|
-
- For large graphs, group by module, ownership, lifecycle phase, or public surface.
|
|
88
|
-
|
|
89
|
-
## Diagram Recipes
|
|
90
|
-
|
|
91
|
-
### Call Flow
|
|
92
|
-
|
|
93
|
-
```bash
|
|
94
|
-
scip-query trace <entry-symbol>
|
|
95
|
-
scip-query call-graph <entry-symbol>
|
|
96
|
-
scip-query code <entry-symbol>
|
|
97
|
-
```
|
|
98
|
-
|
|
99
|
-
Render entry point -> major callees -> side effects or terminal outputs. Label each edge with the call or branch reason when `code` proves it.
|
|
100
|
-
|
|
101
|
-
### Data Flow
|
|
102
|
-
|
|
103
|
-
```bash
|
|
104
|
-
scip-query dataflow <value-symbol>
|
|
105
|
-
scip-query slice <value-symbol>
|
|
106
|
-
scip-query slice <value-symbol> --forward
|
|
107
|
-
```
|
|
108
|
-
|
|
109
|
-
Render producers, transformations, validators, storage, and consumers. Mark inferred or unavailable parts explicitly.
|
|
95
|
+
Include title, scope, summary, visual diagram, legend, evidence table, omitted/collapsed nodes, and unavailable capabilities.
|
|
110
96
|
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
```bash
|
|
114
|
-
scip-query system <module>
|
|
115
|
-
scip-query deps <file>
|
|
116
|
-
scip-query rdeps <file>
|
|
117
|
-
scip-query surface <module>
|
|
118
|
-
```
|
|
119
|
-
|
|
120
|
-
Render internal files, imported modules, reverse consumers, and public surfaces. Distinguish internal dependencies from external consumers.
|
|
121
|
-
|
|
122
|
-
### Blast Radius
|
|
123
|
-
|
|
124
|
-
```bash
|
|
125
|
-
scip-query affected <symbol> --json
|
|
126
|
-
scip-query change-surface <file> --json --full
|
|
127
|
-
```
|
|
97
|
+
Use inline CSS and semantic HTML or inline SVG. Give stable dimensions, wrapping labels, accessible colors, and distinct edge styles for calls, data, dependencies, and risk.
|
|
128
98
|
|
|
129
|
-
|
|
99
|
+
This step is complete only when the HTML contains the visual and provenance table.
|
|
130
100
|
|
|
131
|
-
|
|
101
|
+
### 4. Verify
|
|
132
102
|
|
|
133
|
-
|
|
103
|
+
Open the file locally or use a browser/screenshot tool when available. Confirm:
|
|
134
104
|
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
105
|
+
- diagram is nonblank;
|
|
106
|
+
- labels do not overlap badly;
|
|
107
|
+
- major nodes and edges trace to evidence;
|
|
108
|
+
- `scip-verify` has been invoked when this is part of a docs/code change.
|
|
139
109
|
|
|
140
|
-
End
|
|
110
|
+
End with the file path and what the diagram proves.
|
|
@@ -1,71 +1,73 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: scip-directory-architecture
|
|
3
|
-
description: Review
|
|
3
|
+
description: Review directory architecture with scip-query evidence. Use to evaluate, design, reorganize, or migrate folder structure, ownership boundaries, locality config, messy repos, AI-generated layout, or safe file-move slices.
|
|
4
|
+
commands:
|
|
5
|
+
- template: "scip-query system <scope>"
|
|
6
|
+
when: "Inventory evidence: files, symbols, deps in/out for the scope."
|
|
7
|
+
- template: "scip-query locality-candidates --json --full"
|
|
8
|
+
when: "Inventory evidence: directory-locality candidates from consumer ownership."
|
|
9
|
+
- template: "scip-query similar-files --full --json"
|
|
10
|
+
when: "Inventory evidence: files with overlapping dependency profiles."
|
|
11
|
+
- template: "scip-query cycles"
|
|
12
|
+
when: "Inventory evidence: circular dependency chains between files."
|
|
13
|
+
- template: "scip-query co-change --json --full"
|
|
14
|
+
when: "Inventory evidence: hidden file-level coupling from git history."
|
|
15
|
+
- template: "scip-query config-validate --json"
|
|
16
|
+
when: "Implement a slice: validate locality config after a move."
|
|
4
17
|
---
|
|
5
18
|
|
|
6
|
-
#
|
|
19
|
+
# scip-directory-architecture
|
|
7
20
|
|
|
8
|
-
|
|
21
|
+
Use this skill to answer where code should live. Directory architecture is the filesystem arrangement of source files by their main reason to change; what distinguishes a good structure is that a maintainer can predict where a concept belongs before reading every import.
|
|
9
22
|
|
|
10
|
-
|
|
23
|
+
Load shared mechanics from [`../_shared/SKILL.md`](../_shared/SKILL.md).
|
|
11
24
|
|
|
12
|
-
|
|
25
|
+
<!-- BEGIN GENERATED SKILL COMMANDS -->
|
|
26
|
+
## Commands for this skill
|
|
13
27
|
|
|
14
|
-
|
|
28
|
+
| Command | Purpose | When |
|
|
29
|
+
| --- | --- | --- |
|
|
30
|
+
| `scip-query system <scope>` | Full module map: files, symbols, deps in/out | Inventory evidence: files, symbols, deps in/out for the scope. |
|
|
31
|
+
| `scip-query locality-candidates --json --full` | Find directory-locality and ancestry candidates from consumer ownership | Inventory evidence: directory-locality candidates from consumer ownership. |
|
|
32
|
+
| `scip-query similar-files --full --json` | Find heuristic similar-file candidates from dependency profiles | Inventory evidence: files with overlapping dependency profiles. |
|
|
33
|
+
| `scip-query cycles` | Detect circular dependency chains between files | Inventory evidence: circular dependency chains between files. |
|
|
34
|
+
| `scip-query co-change --json --full` | Files that change together in git history without a dependency edge — hidden coupling candidates | Inventory evidence: hidden file-level coupling from git history. |
|
|
35
|
+
| `scip-query config-validate --json` | Validate .scipquery.json, including structured suppressions and declared coupling groups | Implement a slice: validate locality config after a move. |
|
|
15
36
|
|
|
16
|
-
|
|
37
|
+
Use this shortlist first. Open [`../_shared/SKILL.md`](../_shared/SKILL.md) only when it is insufficient.
|
|
38
|
+
<!-- END GENERATED SKILL COMMANDS -->
|
|
17
39
|
|
|
18
|
-
|
|
40
|
+
## Terms
|
|
19
41
|
|
|
20
|
-
|
|
42
|
+
An ownership boundary is a folder, package, module, or convention that groups code around one stable responsibility.
|
|
21
43
|
|
|
22
|
-
|
|
23
|
-
2. Separate review from migration. A directory architecture review may propose moves; it does not move files unless the user asked for implementation or approved a specific migration slice.
|
|
24
|
-
3. Preserve working conventions. Existing boundaries are not wrong just because they are broad; central folders such as `errors`, `routes`, `workflows`, `schemas`, `contracts`, or `features` may be doing real work.
|
|
25
|
-
4. Do not reward generic `shared`. A shared folder is justified only when the shared concept has a name, owner, and consumers across real boundaries.
|
|
26
|
-
5. Treat messy repos honestly. If ownership concepts are not stable, produce a discovery map and decision list instead of pretending the repo has a clean target structure.
|
|
27
|
-
6. Prefer small verified moves. Broad reorganizations need staged migration slices with import updates, tests, a fresh scip-query index, and `scip-query diff-gate --json`.
|
|
44
|
+
A target structure is a proposed future layout that expresses an ownership model, not merely a prettier tree.
|
|
28
45
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
### 1. Bound the Question
|
|
32
|
-
|
|
33
|
-
Identify whether the user wants:
|
|
34
|
-
|
|
35
|
-
- a review of the existing structure;
|
|
36
|
-
- a proposed target structure;
|
|
37
|
-
- a locality config decision;
|
|
38
|
-
- a migration plan;
|
|
39
|
-
- or an actual file-moving implementation.
|
|
46
|
+
A migration slice is the smallest set of file moves and import updates that can be verified independently.
|
|
40
47
|
|
|
41
|
-
|
|
48
|
+
A slop codebase is a codebase whose files are arranged by accident, convenience, or recent edits rather than stable ownership rules.
|
|
42
49
|
|
|
43
|
-
|
|
50
|
+
## Rules
|
|
44
51
|
|
|
45
|
-
|
|
52
|
+
1. Start with evidence, not taste.
|
|
53
|
+
2. Separate review from migration; do not move files unless asked.
|
|
54
|
+
3. Preserve broad boundaries when evidence shows they are intentional.
|
|
55
|
+
4. Do not reward generic `shared` unless the shared concept has a name, owner, and cross-boundary consumers.
|
|
56
|
+
5. For messy repos, produce a discovery map and decisions instead of pretending the target is obvious.
|
|
57
|
+
6. Prefer small verified moves.
|
|
46
58
|
|
|
47
|
-
|
|
48
|
-
scip-query status
|
|
49
|
-
scip-query status --capabilities
|
|
50
|
-
# If freshness is stale, missing, or unknown:
|
|
51
|
-
# scip-query reindex
|
|
52
|
-
scip-query stats
|
|
53
|
-
find . -maxdepth 3 -type d | sort
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
Read durable project guidance before judging structure:
|
|
59
|
+
## Workflow
|
|
57
60
|
|
|
58
|
-
|
|
59
|
-
rg -n "architecture|structure|feature|module|boundary|shared|workflow|route|contract|domain|ownership" AGENTS.md README.md docs agent-os .codex -g '!node_modules'
|
|
60
|
-
```
|
|
61
|
+
### 1. Bound the question
|
|
61
62
|
|
|
62
|
-
|
|
63
|
+
Classify the request: review, target structure, locality config, migration plan, or implementation.
|
|
63
64
|
|
|
64
|
-
|
|
65
|
+
This step is complete only when the scope and deliverable are explicit.
|
|
65
66
|
|
|
66
|
-
|
|
67
|
+
### 2. Inventory evidence
|
|
67
68
|
|
|
68
69
|
```bash
|
|
70
|
+
scip-query stats
|
|
69
71
|
scip-query system <scope>
|
|
70
72
|
scip-query files <pattern>
|
|
71
73
|
scip-query surface <scope>
|
|
@@ -82,101 +84,57 @@ scip-query recent-duplicates
|
|
|
82
84
|
scip-query drift
|
|
83
85
|
```
|
|
84
86
|
|
|
85
|
-
|
|
87
|
+
Also read durable project guidance that names architecture, modules, ownership, routes, workflows, contracts, or domains.
|
|
86
88
|
|
|
87
|
-
|
|
88
|
-
- public exports, entry points, routes, commands, or package surfaces;
|
|
89
|
-
- main consumers and cross-boundary consumers;
|
|
90
|
-
- tests that define the folder's behavior;
|
|
91
|
-
- co-change partners and repeated edit patterns;
|
|
92
|
-
- duplicated or parallel folder patterns;
|
|
93
|
-
- docs or standards that claim ownership rules.
|
|
89
|
+
This step is complete only when each folder under review has evidence for exports, entry points, consumers, tests, co-change partners, and claimed ownership rules.
|
|
94
90
|
|
|
95
|
-
###
|
|
91
|
+
### 3. Classify boundary maturity
|
|
96
92
|
|
|
97
|
-
Classify each candidate
|
|
93
|
+
Classify each candidate:
|
|
98
94
|
|
|
99
95
|
- Mature: repeated, documented, and enforced by imports, tests, routes, packages, standards, or review history.
|
|
100
|
-
- Emerging: meaningful and partly repeated, but not
|
|
101
|
-
- Accidental:
|
|
96
|
+
- Emerging: meaningful and partly repeated, but not consistent enough to configure.
|
|
97
|
+
- Accidental: convenience bucket, legacy pile, generated artifact, recent edit cluster, or mixed reasons to change.
|
|
102
98
|
|
|
103
|
-
|
|
99
|
+
This step is complete only when mature, emerging, and accidental boundaries are separated.
|
|
104
100
|
|
|
105
|
-
###
|
|
101
|
+
### 4. Propose structure or decisions
|
|
106
102
|
|
|
107
|
-
|
|
103
|
+
Use this shape:
|
|
108
104
|
|
|
109
|
-
|
|
105
|
+
```markdown
|
|
110
106
|
# Directory Architecture Review
|
|
111
107
|
|
|
112
108
|
## Scope
|
|
113
109
|
## Current Structure Map
|
|
114
110
|
## Boundary Maturity
|
|
115
|
-
|
|
116
|
-
| Boundary | Evidence | Maturity | Judgment |
|
|
117
|
-
| --- | --- | --- | --- |
|
|
118
|
-
|
|
119
111
|
## Target Structure
|
|
120
|
-
|
|
121
|
-
```text
|
|
122
|
-
src/
|
|
123
|
-
...
|
|
124
|
-
```
|
|
125
|
-
|
|
126
112
|
## Move Ledger
|
|
127
|
-
|
|
128
|
-
| Slice | Current files | Proposed home | Why | Verification |
|
|
129
|
-
| --- | --- | --- | --- | --- |
|
|
130
|
-
|
|
131
113
|
## Locality Config
|
|
114
|
+
## No-Move Decisions
|
|
132
115
|
## Deferred Decisions
|
|
133
116
|
## Migration Order
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
The target structure should name ownership concepts, not just folder labels. Prefer existing names when they already carry meaning. Introduce a new folder only when it removes ambiguity for multiple files or consumers.
|
|
137
|
-
|
|
138
|
-
### 6. Decide What Not to Move
|
|
139
|
-
|
|
140
|
-
Explicitly list no-move decisions when:
|
|
141
|
-
|
|
142
|
-
- a broad consumer set proves a central boundary is useful;
|
|
143
|
-
- a folder is route-facing, package-facing, or contract-facing;
|
|
144
|
-
- consumers cross boundaries because the concept is infrastructure;
|
|
145
|
-
- moving would hide a domain-specific concept under generic `shared`;
|
|
146
|
-
- the evidence is too weak and needs a human ownership decision.
|
|
117
|
+
```
|
|
147
118
|
|
|
148
|
-
|
|
119
|
+
List no-move decisions when broad consumers, route/package/contract surfaces, infrastructure roles, generic shared risk, or weak evidence make a move harmful.
|
|
149
120
|
|
|
150
|
-
|
|
121
|
+
This step is complete only when every proposed move has a reason and verification path.
|
|
151
122
|
|
|
152
|
-
|
|
153
|
-
- imports/exports/tests/docs to update;
|
|
154
|
-
- expected verification commands;
|
|
155
|
-
- rollback risk.
|
|
123
|
+
### 5. Implement one slice when asked
|
|
156
124
|
|
|
157
|
-
|
|
125
|
+
Before editing, state files to move, imports/exports/tests/docs to update, expected verification, and rollback risk. Then move the smallest high-confidence slice and run:
|
|
158
126
|
|
|
159
127
|
```bash
|
|
160
|
-
scip-query status --capabilities
|
|
161
|
-
# If freshness is stale, missing, or unknown:
|
|
162
|
-
# scip-query reindex
|
|
163
128
|
scip-query incomplete-migration
|
|
164
129
|
scip-query recent-duplicates
|
|
165
130
|
scip-query co-change <moved-file-or-config>
|
|
166
|
-
scip-query diff-gate --json
|
|
167
131
|
```
|
|
168
132
|
|
|
169
|
-
Also run
|
|
133
|
+
Also run project tests or typecheck for the affected workspace. If `.scipquery.json` locality changed, run:
|
|
170
134
|
|
|
171
135
|
```bash
|
|
172
136
|
scip-query config-validate
|
|
173
137
|
scip-query locality-candidates --json --full
|
|
174
138
|
```
|
|
175
139
|
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
- Lead with findings and judgments, not command transcripts.
|
|
179
|
-
- Every proposed boundary needs evidence from at least two independent signals or a clear note that it is only a candidate.
|
|
180
|
-
- Every proposed move needs a verification path.
|
|
181
|
-
- For messy repos, output "discovery mode" and decision questions instead of a fake complete architecture.
|
|
182
|
-
- For implementation, never batch unrelated folder moves just because they fit the same target structure.
|
|
140
|
+
Then invoke `scip-verify`. The implementation is complete only when imports, tests, locality signals, and verification are checked.
|