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
package/dist/chunk-UUBMFL3F.js
DELETED
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import d from"ignore";import{readFileSync as c,existsSync as s}from"fs";import{dirname as l,isAbsolute as g,join as a,relative as u,resolve as v}from"path";function F(r){let e=d(),n=!1,t=b(r);for(let i of t)try{let o=c(i,"utf-8");e.add(o),n=!0}catch{}return n||e.add(h),{isIgnored:i=>f(e,r,i),filter:i=>i.filter(o=>!f(e,r,o))}}function b(r){let e=[],n=a(r,".gitignore");s(n)&&e.push(n);let t=l(r),i=0;for(;t!==l(t)&&i<5;){let o=a(t,".gitignore");if(s(o)&&e.push(o),s(a(t,".git")))break;t=l(t),i++}return e}var h=`
|
|
2
|
-
# Dependencies
|
|
3
|
-
node_modules/
|
|
4
|
-
vendor/
|
|
5
|
-
.bundle/
|
|
6
|
-
|
|
7
|
-
# Build output
|
|
8
|
-
dist/
|
|
9
|
-
build/
|
|
10
|
-
out/
|
|
11
|
-
target/
|
|
12
|
-
bin/
|
|
13
|
-
obj/
|
|
14
|
-
|
|
15
|
-
# Python
|
|
16
|
-
__pycache__/
|
|
17
|
-
*.pyc
|
|
18
|
-
*.pyo
|
|
19
|
-
.venv/
|
|
20
|
-
venv/
|
|
21
|
-
.env/
|
|
22
|
-
env/
|
|
23
|
-
*.egg-info/
|
|
24
|
-
|
|
25
|
-
# Rust
|
|
26
|
-
target/
|
|
27
|
-
|
|
28
|
-
# Java / Kotlin / Scala
|
|
29
|
-
*.class
|
|
30
|
-
.gradle/
|
|
31
|
-
.mvn/
|
|
32
|
-
|
|
33
|
-
# C# / .NET
|
|
34
|
-
bin/
|
|
35
|
-
obj/
|
|
36
|
-
packages/
|
|
37
|
-
|
|
38
|
-
# Go
|
|
39
|
-
vendor/
|
|
40
|
-
|
|
41
|
-
# Dart
|
|
42
|
-
.dart_tool/
|
|
43
|
-
build/
|
|
44
|
-
|
|
45
|
-
# PHP
|
|
46
|
-
vendor/
|
|
47
|
-
|
|
48
|
-
# IDE / OS
|
|
49
|
-
.idea/
|
|
50
|
-
.vscode/
|
|
51
|
-
*.swp
|
|
52
|
-
*.swo
|
|
53
|
-
.DS_Store
|
|
54
|
-
Thumbs.db
|
|
55
|
-
|
|
56
|
-
# Type definitions (often noise in queries)
|
|
57
|
-
*.d.ts
|
|
58
|
-
`;function f(r,e,n){let t=m(e,n);if(!t)return!1;try{return r.ignores(t)}catch{return!1}}function m(r,e){if(!e||e===".")return null;if(!g(e)&&!e.startsWith(".."))return e.replaceAll("\\","/");let n=g(e)?e:v(r,e),t=u(r,n).replaceAll("\\","/");return!t||t==="."||t.startsWith("..")?null:t}export{F as a};
|
|
59
|
-
//# sourceMappingURL=chunk-UUBMFL3F.js.map
|
package/dist/chunk-V5FGK3DZ.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{m as l}from"./chunk-SA3DPTHT.js";function S(e,n={}){let{minComponentLines:o=300,minFileLines:t=800,minJsxTokens:r=80,minBehaviorTokens:a=40,limit:c=20,scope:m,scanLimit:p,filePattern:i}=n;return l(e).reactProfiles({scope:m,scanLimit:p}).filter(s=>s.kind==="component").filter(s=>!i||s.file.includes(i)||s.name.includes(i)).map(s=>g(s,{minComponentLines:o,minFileLines:t,minJsxTokens:r,minBehaviorTokens:a})).filter(s=>s!==null).sort((s,u)=>u.componentLines-s.componentLines||u.fileLines-s.fileLines||s.file.localeCompare(u.file)).slice(0,c)}function g(e,n){let o=[];e.loc>=n.minComponentLines&&o.push(`${e.loc} component line(s)`);let t=Math.max(80,Math.floor(n.minComponentLines/2));if(e.fileLines>=n.minFileLines&&e.loc>=t&&o.push(`${e.fileLines} file line(s)`),e.jsxTokens.size>=n.minJsxTokens&&o.push(`${e.jsxTokens.size} JSX structure token(s)`),e.behaviorTokens.size>=n.minBehaviorTokens&&o.push(`${e.behaviorTokens.size} behavior token(s)`),o.length===0)return null;let r=x(e),a=f(e,n,r),c=C(e),m=b(r,a,c);return{file:e.file,component:e.name,componentLines:e.loc,fileLines:e.fileLines,jsxTokens:e.jsxTokens.size,behaviorTokens:e.behaviorTokens.size,dominantPressure:r,pressureKinds:a,contextKind:c,recommendationKind:m,recommendation:h(m,c),reasons:o,loc:e.loc}}function x(e){let n=[{axis:"component",value:e.loc},{axis:"file",value:e.fileLines},{axis:"jsx-structure",value:e.jsxTokens.size*3},{axis:"hook-behavior",value:e.behaviorTokens.size*4}];return n.sort((o,t)=>t.value-o.value),n[0]?.axis??"component"}function f(e,n,o){let t=[];e.loc>=n.minComponentLines&&t.push("component");let r=Math.max(80,Math.floor(n.minComponentLines/2));return e.fileLines>=n.minFileLines&&e.loc>=r&&t.push("file"),e.jsxTokens.size>=n.minJsxTokens&&t.push("jsx-structure"),e.behaviorTokens.size>=n.minBehaviorTokens&&t.push("hook-behavior"),[...new Set(t.length>0?t:[o])]}function C(e){let n=e.file.split(/[\\/]+/).filter(Boolean),o=n.slice(0,-1).map(i=>i.toLowerCase()),t=(n.at(-1)??e.name).replace(/\.[^.]+$/,""),r=`${t} ${e.name}`.split(/[^A-Za-z0-9]+/).filter(Boolean).map(i=>i.toLowerCase()),a=o.findIndex(i=>v.has(i)),c=a>=0&&o.slice(a+1).some(i=>R.has(i)),m=d(t)||d(e.name);return/(?:Page|Route|Screen|View)$/.test(t)||/(?:Page|Route|Screen|View)$/.test(e.name)||r.some(i=>k.has(i))||a>=0&&!c&&!m?"route-page":"component"}function d(e){let n=e.split(/[^A-Za-z0-9]+/).filter(Boolean).map(o=>o.toLowerCase());return n.at(-1)&&L.has(n.at(-1))?!0:[...L].some(o=>e.endsWith(T(o)))}function b(e,n,o){return e==="hook-behavior"?"behavior-extraction":o==="route-page"?"route-page-decomposition":n.includes("hook-behavior")?"behavior-extraction":n.includes("jsx-structure")?"jsx-decomposition":n.includes("file")?"file-decomposition":e==="jsx-structure"?"jsx-decomposition":e==="file"&&!n.includes("component")?"file-decomposition":"component-decomposition"}function h(e,n){switch(e){case"behavior-extraction":return"Extract independent state, effects, requests, or handlers into hooks, controllers, or feature modules.";case"route-page-decomposition":return"Split route/page orchestration from reusable panels and feature controllers.";case"jsx-decomposition":return n==="route-page"?"Split page JSX into named layout sections before extracting behavior.":"Split repeated JSX sections into named presentational components.";case"file-decomposition":return"Review file-level decomposition; split colocated panels or helpers before changing behavior.";case"component-decomposition":return"Review component boundaries around props, state ownership, and independently changing UI sections."}}var R=new Set(["component","components","panel","panels","partial","partials"]),L=new Set(["banner","button","card","dialog","drawer","filter","form","grid","header","item","list","menu","modal","nav","panel","picker","rail","row","section","selector","shell","sidebar","table","toolbar"]),v=new Set(["landing","page","pages","route","routes","screen","screens","view","views"]),k=new Set(["landing","page","route","screen","view"]);function T(e){return e.charAt(0).toUpperCase()+e.slice(1)}export{S as a};
|
|
2
|
-
//# sourceMappingURL=chunk-V5FGK3DZ.js.map
|
package/dist/chunk-WTY5FERW.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{c as i}from"./chunk-B75HZHUP.js";import{a as m}from"./chunk-L446VQYQ.js";import{a}from"./chunk-RSSXKJ6J.js";import{a as r}from"./chunk-NBNEVLRC.js";import{d as o}from"./chunk-NABVR6B7.js";function S(s,n,c={}){let e=r(s,n);if(!e)return null;let t=c.semantic!==!1,y=m(s,e,{limit:50,semantic:t}),b=i(a(s,e,{limit:50,additive:!0,callableOnly:!0,semantic:t}));return{symbol:e.symbol,shortName:o(e.symbol),callers:y.map(l=>({symbol:l.symbol,shortName:o(l.symbol),file:l.file})),callees:b.map(l=>({symbol:l.symbol,shortName:o(l.symbol),file:l.file}))}}export{S as a};
|
|
2
|
-
//# sourceMappingURL=chunk-WTY5FERW.js.map
|
package/dist/chunk-WUOB4DHH.js
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import{a as b}from"./chunk-F6IXELII.js";import{a as E,e as _}from"./chunk-NABVR6B7.js";import{a as P}from"./chunk-64MNV6AB.js";import{d as p}from"./chunk-7S5E7KWT.js";import{existsSync as d,readFileSync as D,readdirSync as y}from"fs";import{join as l}from"path";var R={files:new Set,pathPrefixes:[]},x=/^(?:dist|build|lib|out|output|esm|cjs|umd)\//,I=/\.(?:d\.ts|d\.mts|d\.cts|ts|tsx|mts|cts|js|jsx|mjs|cjs)$/,j=[".ts",".tsx",".mts",".cts",".js",".jsx",".mjs",".cjs"],F=new Set([".git",".next",".turbo","build","coverage","dist","node_modules","out"]),C=4,M=p("package-surface",{clearGroups:["whole-project"]});function X(t){return M.get(t,()=>W(t.config.projectRoot))}function T(t,e){let r=X(t);return r.files.has(e)?!0:r.pathPrefixes.some(s=>e.startsWith(s))}function W(t){let e=new Set,r=[];for(let{manifest:s,packageRoot:i}of U(t))for(let n of B(s))G(t,i,n,e,r);return e.size===0&&r.length===0?R:{files:e,pathPrefixes:r}}function U(t){let e=[],r=k(t,"");return r&&e.push({manifest:r,packageRoot:""}),w(t,"",e,0),e}function w(t,e,r,s){if(s>=C)return;let i=l(t,e);if(d(i))for(let n of y(i,{withFileTypes:!0})){if(!n.isDirectory()||F.has(n.name))continue;let a=e?`${e}/${n.name}`:n.name,o=k(t,a);o&&r.push({manifest:o,packageRoot:a}),w(t,a,r,s+1)}}function k(t,e){try{let r=D(l(t,e,"package.json"),"utf-8"),s=JSON.parse(r);return s&&typeof s=="object"?s:null}catch{return null}}function B(t){let e=[];for(let s of["main","module","types","browser"])typeof t[s]=="string"&&e.push(t[s]);let r=t.bin;if(typeof r=="string")e.push(r);else if(r&&typeof r=="object")for(let s of Object.values(r))typeof s=="string"&&e.push(s);return $(t.exports,e),e}function $(t,e){if(typeof t=="string"){e.push(t);return}if(!(!t||typeof t!="object"))for(let r of Object.values(t))$(r,e)}function G(t,e,r,s,i){let n=r.replace(/\\/g,"/").replace(/^\.\//,"");if(n===""||n.startsWith(".."))return;let a=n.indexOf("*");if(a>=0){let c=n.slice(0,a);for(let u of m(c))u!==""&&i.push(f(e,u));return}let o=n.replace(I,"");for(let c of m(o)){c===o&&c===n&&s.add(f(e,n));for(let u of j)L(t,s,e,c+u)}s.add(f(e,n))}function m(t){let e=[t];return x.test(t)&&(e.push(t.replace(x,"src/")),e.push(t.replace(x,""))),e}function L(t,e,r,s){let i=f(r,s);if(e.add(i),!s.startsWith("src/")||d(l(t,i)))return;let n=j.find(S=>s.endsWith(S));if(!n)return;let a=s.slice(0,-n.length);V(t,e,r,a,n);let o=a.lastIndexOf("/");if(o<=4)return;let c=a.slice(0,o),u=a.slice(o+1);for(let S of v(t,r,c,`${u}${n}`))e.add(S)}function V(t,e,r,s,i){let n=f(r,`${s}/index${i}`);d(l(t,n))&&e.add(n)}function v(t,e,r,s){let i=l(t,e,r);if(!d(i))return[];let n=[];for(let a of y(i,{withFileTypes:!0})){let o=`${r}/${a.name}`;a.isDirectory()?n.push(...v(t,e,o,s)):a.isFile()&&a.name===s&&n.push(f(e,o))}return n}function f(t,e){return t?`${t}/${e}`:e}function h(t){let e=g(t);return ct(e)?"test":ut(e)?"worker":ft(e)?"entry":gt(e)?"barrel":"source"}function H(t){return h(t)==="barrel"}function N(t){return K.get(t,()=>{let r=P(t,{includeIgnored:!1}).filter(a=>{let o=h(a);return o==="entry"||o==="worker"});if(r.length===0)return new Set;let s=b(t),i=new Set,n=new Set;for(;r.length>0;){let a=r.shift();if(!i.has(a)){i.add(a),h(a)==="barrel"&&n.add(a);for(let o of s.get(a)??[])i.has(o)||r.push(o)}}return n})}var K=p("live-barrels",{clearGroups:["whole-project"]});function J(t,e){return N(t).has(g(e))}function yt(t){let e=N(t);return P(t,{includeIgnored:!1}).filter(r=>H(r)&&!e.has(r)&&!Q(t,r))}function Q(t,e){let r=g(e),s=E(t).forFile(r,{facts:!0}).facts?.callables;return s&&s.length>0?!0:(t.get(`SELECT COUNT(*) AS n
|
|
2
|
-
FROM defn_enclosing_ranges der
|
|
3
|
-
JOIN documents d ON d.id = der.document_id
|
|
4
|
-
WHERE d.relative_path = ?
|
|
5
|
-
AND der.end_line - der.start_line >= 2`,r)?.n??0)>0}function jt(t,e){let r=h(e);return r==="entry"||r==="worker"||J(t,e)}function Tt(t,e,r){let s=g(r);if(T(t,s)||et(e,s))return!0;let i=t.config.entryRoots;return i?!!(i.files?.some(n=>g(n)===s)||i.pathPrefixes?.some(n=>s.startsWith(g(n)))||i.qualifiedVars?.some(n=>lt(e,n))||i.symbolPatterns?.some(n=>{try{return new RegExp(n).test(e)}catch{return!1}})):!1}var A=new Set(["GET","POST","PUT","PATCH","DELETE","HEAD","OPTIONS"]),Y=new Set(["default","generateMetadata","generateStaticParams"]),Z=new Set(["default","getStaticProps","getServerSideProps","getStaticPaths","config"]),q=new Set(["default","loader","action","clientLoader","clientAction","headers","links","meta","shouldRevalidate","ErrorBoundary","HydrateFallback"]),z=new Set(["load","actions","entries",...A]),tt=new Set(["default"]);function et(t,e){let r=_(t);return r===""?!1:rt(e)?A.has(r):st(e)?Y.has(r):nt(e)?Z.has(r):it(e)?q.has(r):at(e)?z.has(r):ot(e)?tt.has(r):!1}function rt(t){return/(?:^|\/)app(?:\/[^/]+)*\/route\.(?:ts|tsx|js|jsx|mjs|cjs)$/.test(t)}function st(t){return/(?:^|\/)app(?:\/[^/]+)*\/(?:page|layout|template|loading|error|not-found|global-error|head|default)\.(?:ts|tsx|js|jsx|mjs|cjs)$/.test(t)}function nt(t){return/(?:^|\/)pages\/.+\.(?:ts|tsx|js|jsx|mjs|cjs)$/.test(t)}function it(t){return/(?:^|\/)app\/routes\/.+\.(?:ts|tsx|js|jsx|mjs|cjs)$/.test(t)}function at(t){return/(?:^|\/)src\/routes\/(?:.*\/)?\+(?:page|page\.server|layout|layout\.server|server)\.(?:ts|js)$/.test(t)}function ot(t){return/(?:^|\/)src\/(?:pages|views|routes)\/.+\.(?:ts|tsx|js|jsx|vue)$/.test(t)}function ct(t){return!!(/\.(?:test|spec)\.[a-z0-9]+$/i.test(t)||/(?:^|\/)(?:_)?test_[^/]+$/i.test(t)||/(?:^|\/)spec_[^/]+$/i.test(t)||/(?:^|\/)[^/]+_test\.[a-z0-9]+$/i.test(t)||/(?:^|\/)[^/]+_tests\.rs$/i.test(t)||/(?:^|\/)tests\.rs$/i.test(t)||/(?:^|\/)[^/]+_spec\.[a-z0-9]+$/i.test(t)||/(?:^|\/)__tests__\//i.test(t)||/(?:^|\/)test\//i.test(t)||/(?:^|\/)tests\//i.test(t)||/(?:^|\/)__fixtures__\//i.test(t)||/(?:^|\/)__mocks__\//i.test(t)||/(?:^|\/)test-support\//i.test(t)||/(?:^|\/)test-utils\//i.test(t)||/(?:^|\/)testing\//i.test(t))}function ut(t){return/(?:^|\/)[^/]*worker\.(?:ts|tsx|js|mjs|cjs|rs|py|go)$/.test(t)}function ft(t){let e=t.split("/"),r=e[e.length-1]??t;return r==="cli.ts"||r==="cli.js"||r==="postinstall.ts"||r==="postinstall.js"||r==="main.ts"||r==="main.js"||r==="main.rs"||r==="main.go"||r==="main.py"||r==="build.rs"||r==="lib.rs"||/\bsrc\/bin\/[^/]+\.rs$/.test(t)||/(?:^|\/)examples\/[^/]+\.rs$/.test(t)||/(?:^|\/)tests\/[^/]+\.rs$/.test(t)||/(?:^|\/)benches\/[^/]+\.rs$/.test(t)?!0:r==="index.ts"||r==="index.js"?/(?:^|\/)(?:apps|services)\/[^/]+\/src\/index\.(?:ts|js)$/.test(t)?!0:e.length<=2:!1}function gt(t){return t==="index.ts"||t==="index.js"||t.endsWith("/index.ts")||t.endsWith("/index.js")||t.endsWith("/mod.rs")||t.endsWith("/__init__.py")}function g(t){return t.replace(/\\/g,"/")}function lt(t,e){let r=e.lastIndexOf("/");if(r<0)return!1;let s=e.slice(0,r),i=e.slice(r+1);return t.includes(O(s)+"/")&&t.includes(O(i)+".")}function O(t){return/^[A-Za-z0-9_$+-]+$/.test(t)?t:"`"+t.replace(/`/g,"``")+"`"}export{T as a,h as b,H as c,J as d,yt as e,jt as f,Tt as g};
|
|
6
|
-
//# sourceMappingURL=chunk-WUOB4DHH.js.map
|
package/dist/chunk-YFQIKYOP.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{c as s,d as l}from"./chunk-HWVYTJOV.js";import{a as d,b as g}from"./chunk-MNCQPMCH.js";import{a as f,b as c,c as u}from"./chunk-ELC77ZDE.js";import{m as p}from"./chunk-SA3DPTHT.js";function S(o,t={}){let{minSimilarity:r=.62,minTokens:e=8,limit:a=20,scope:k,scanLimit:h,filePattern:P,focusFiles:B}=t,m=p(o).reactProfiles({scope:k,minJsxTokens:e,scanLimit:h}).filter(n=>n.kind==="component").map(n=>({file:n.file,component:n.name,tokens:n.jsxTokens,profile:n})),C=d(m,n=>n.tokens);return g({profiles:m,limit:a,filePattern:P,focusFiles:B,candidateIndex:C,profile:{name:"react-component-duplicates"},compare:(n,i)=>R(n,i,r),sort:(n,i)=>i.similarity-n.similarity||n.fileA.localeCompare(i.fileA)||n.componentA.localeCompare(i.componentA)||n.fileB.localeCompare(i.fileB)||n.componentB.localeCompare(i.componentB)})}function R(o,t,r){let e=f(o.tokens,t.tokens);if(e.size<6||!T(e))return null;let a=u(o.tokens,t.tokens);return a<r?null:{fileA:o.file,componentA:o.component,fileB:t.file,componentB:t.component,similarity:a,sharedTokens:l(e),sharedComponents:s(e,"component:"),sharedNativeTags:s(e,"native:"),sharedProps:s(e,"prop:"),sharedEvents:s(e,"event:"),sharedBindings:s(e,"binding:"),uniqueToA:l(c(o.tokens,t.tokens)).slice(0,25),uniqueToB:l(c(t.tokens,o.tokens)).slice(0,25),locA:o.profile.loc,locB:t.profile.loc}}function T(o){let t=0,r=0;for(let e of o)e.startsWith("component:")&&(t+=1),(e.startsWith("prop:")||e.startsWith("event:")||e.startsWith("native:")||e.startsWith("jsx:"))&&(r+=1);return t>=1||r>=4}export{S as a};
|
|
2
|
-
//# sourceMappingURL=chunk-YFQIKYOP.js.map
|
package/dist/chunk-Z2LDWIJV.js
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import{a as ne,b as q,e as V,f as _,g as E,h as ie,i as te}from"./chunk-ELC77ZDE.js";import{b as $}from"./chunk-B75HZHUP.js";import{a as A}from"./chunk-RM2WQ75T.js";import{a as ee}from"./chunk-RSSXKJ6J.js";import{a as K}from"./chunk-NBNEVLRC.js";import{a as v,b}from"./chunk-ULHLDOD6.js";import{d as R,e as H,h as N}from"./chunk-NABVR6B7.js";import{a as G,b as U}from"./chunk-SA3DPTHT.js";import{b as J,j as Y}from"./chunk-SGTKURU6.js";import{a as Q}from"./chunk-64MNV6AB.js";import{d as T}from"./chunk-7S5E7KWT.js";function yn(e,n,t={}){let{minSimilarity:i=.4,limit:r=20}=t,s=ze(e,n,{semantic:t.semantic!==!1});if(!s)return[];if(!N(s.symbol))return[];if(s.callees.size===0)return re(e,n,{minSimilarity:i,limit:r,scanLimit:t.scanLimit,candidateMode:t.sourceCandidateMode??"full"});let a=xe(e,s,i,{scanLimit:t.scanLimit,semantic:t.semantic!==!1});return a.length>0?a.slice(0,r):re(e,n,{minSimilarity:i,limit:r,scanLimit:t.scanLimit,candidateMode:t.sourceCandidateMode??"full"})}function xe(e,n,t,i){let r=j(e).calleeIndex({minCallees:3,scanLimit:i.scanLimit,semantic:i.semantic}),s=Ae(n,r),a=ke(n,r),l=_(a),u=E(n.callees,a),m=[];for(let g of s){if(g.callees.size<3)continue;let f=E(g.callees,a),o=le(n,g,a,{minSimilarity:t,requireSignificantShared:1,requireSharedCount:0,medianIdf:l,magnitudeA:u,magnitudeB:f});o&&m.push(o)}return m.sort((g,f)=>f.similarity-g.similarity),m}function ke(e,n){let t=new Map(n.docFreq);for(let i of e.callees)t.set(i,(t.get(i)??0)+1);return V(t,n.corpus.length+1)}function le(e,n,t,i){let r=Ie(e,n,t,i);if(!Me(r,i))return null;let{similarity:s,significantShared:a,trivialShared:l}=r,u=a.length>0?a:l,m=fe(u,"callees");return{symbolA:e.symbol,shortNameA:R(e.symbol),fileA:e.file,symbolB:n.symbol,shortNameB:R(n.symbol),fileB:n.file,similarity:s,similarityBasis:"callees",sharedCallees:u.map(R),uniqueToA:[...q(e.callees,n.callees)].map(R),uniqueToB:[...q(n.callees,e.callees)].map(R),...m}}function we(e,n,t,i){let r=i.magnitudeA??E(e.callees,t),s=i.magnitudeB??E(n.callees,t),a=0,l=0,u=0,m=i.medianIdf??_(t);for(let o of e.callees){if(!n.callees.has(o))continue;let d=t.get(o)??0;a+=d*d,u+=1,d>=m&&(l+=1)}if(u===0)return!1;let g=r*s;return(g>0?a/g:0)<i.minSimilarity?!1:l>=i.requireSignificantShared||u>=i.requireSharedCount}function Ie(e,n,t,i){return i.magnitudeA===void 0||i.magnitudeB===void 0?ie(e.callees,n.callees,t,{medianIdf:i.medianIdf}):te(e.callees,n.callees,t,{medianIdf:i.medianIdf,magnitudeA:i.magnitudeA,magnitudeB:i.magnitudeB})}function Me(e,n){if(e.similarity<n.minSimilarity)return!1;let t=e.significantShared.length+e.trivialShared.length;return e.significantShared.length>=n.requireSignificantShared||t>=n.requireSharedCount}function hn(e,n={}){let{minSimilarity:t=.5,limit:i=20,scope:r,minCallees:s=4,crossFileOnly:a=!1,scanLimit:l}=n,u=n.semantic!==!1,m=v(),g=0,f=0,o=0,d=0,c=0,p=0,S=0;return b("similar.all",()=>{let y=j(e).calleeIndex({minCallees:s,scope:r,scanLimit:l,semantic:u}),k=y.corpus;g=k.length;let w=n.focusFiles,x=[],P=0;return b("similar.all.pair-scan",()=>{for(let C=0;C<k.length;C+=1){let F=k[C],L=w?.has(F.file)??!1,I=y.weightedMagnitudes[C],M=new Set;for(let B of F.callees){let z=y.candidateIndexesByCallee.get(B);if(z)for(let D of z)D<=C||w&&!L&&!w.has(k[D].file)||M.add(D)}m&&(o+=M.size,M.size>0&&(f+=1));for(let B of M){let z=k[B];if(a&&F.file===z.file){m&&(c+=1);continue}if(ce(F,z)){m&&(p+=1);continue}m&&(d+=1);let D=le(F,z,y.idfWeights,{minSimilarity:t,requireSignificantShared:2,requireSharedCount:4,medianIdf:y.medianIdf,magnitudeA:I,magnitudeB:y.weightedMagnitudes[B]});D&&(Re(x,D,i,P),m&&(S+=1),P+=1)}}},()=>({corpusSize:g,candidateSets:f,candidatePairs:o,comparedPairs:d,crossFileSkips:c,signatureSkips:p,insertedResults:S,topResults:x.length})),b("similar.all.sort-project",()=>(x.sort((C,F)=>F.result.similarity-C.result.similarity||C.order-F.order),x.map(C=>C.result)),()=>({topResults:x.length}))},()=>({minSimilarity:t,limit:i,scope:r,minCallees:s,crossFileOnly:a,scanLimit:l,semantic:u,corpusSize:g,candidateSets:f,candidatePairs:o,comparedPairs:d,crossFileSkips:c,signatureSkips:p,insertedResults:S}))}function Fn(e,n={}){let{minSimilarity:t=.5,scope:i,minCallees:r=4,crossFileOnly:s=!1,scanLimit:a}=n,l=n.semantic!==!1,u=v(),m=0,g=0,f=0,o=0,d=0,c=0,p=0;return b("similar.all-count",()=>{let h=j(e).calleeIndex({minCallees:r,scope:i,scanLimit:a,semantic:l}),y=h.corpus;m=y.length;let k=n.focusFiles;return b("similar.all-count.pair-scan",()=>{for(let w=0;w<y.length;w+=1){let x=y[w],P=k?.has(x.file)??!1,C=h.weightedMagnitudes[w],F=new Set;for(let L of x.callees){let I=h.candidateIndexesByCallee.get(L);if(I)for(let M of I)M<=w||k&&!P&&!k.has(y[M].file)||F.add(M)}u&&(f+=F.size,F.size>0&&(g+=1));for(let L of F){let I=y[L];if(s&&x.file===I.file){u&&(d+=1);continue}if(ce(x,I)){u&&(c+=1);continue}u&&(o+=1),we(x,I,h.idfWeights,{minSimilarity:t,requireSignificantShared:2,requireSharedCount:4,medianIdf:h.medianIdf,magnitudeA:C,magnitudeB:h.weightedMagnitudes[L]})&&(p+=1)}}},()=>({corpusSize:m,candidateSets:g,candidatePairs:f,comparedPairs:o,crossFileSkips:d,signatureSkips:c,insertedResults:p})),p},()=>({minSimilarity:t,scope:i,minCallees:r,crossFileOnly:s,scanLimit:a,semantic:l,corpusSize:m,candidateSets:g,candidatePairs:f,comparedPairs:o,crossFileSkips:d,signatureSkips:c,insertedResults:p}))}function ce(e,n){if(e.paramCount<0||n.paramCount<0)return!1;let t=Math.abs(e.paramCount-n.paramCount),i=Math.max(2,Math.ceil(Math.max(e.paramCount,n.paramCount)*.5));return t>i}var ue=Y({kind:"source-fingerprints",serialize:nn,deserialize:en});function Re(e,n,t,i){if(t<=0)return;if(e.length<t){e.push({result:n,order:i});return}let r=0;for(let a=1;a<e.length;a+=1){let l=e[a],u=e[r];(l.result.similarity<u.result.similarity||l.result.similarity===u.result.similarity&&l.order>u.order)&&(r=a)}let s=e[r];n.similarity<=s.result.similarity||(e[r]={result:n,order:i})}var Le=["ScipDatabase#all","ScipDatabase#get","ScipDatabase#prepare","ScipDatabase#pathExclusionsFor","ScipDatabase#isIgnored","ScipDatabase#symbolNoiseFor","PerDbValue#get","PerDbValue#has",":storage:db:ScipDatabase:all",":storage:db:ScipDatabase:get",":storage:db:ScipDatabase:prepare",":storage:db:ScipDatabase:pathExclusionsFor",":storage:db:ScipDatabase:isIgnored",":storage:db:ScipDatabase:symbolNoiseFor",":storage:per-db-cache:PerDbValue:get",":storage:per-db-cache:PerDbValue:has"];function ze(e,n,t){let i=K(e,n);if(!i||!N(i.symbol))return null;let r=new A(e),s=ee(e,i,{semantic:t.semantic});return{symbol:i.symbol,file:i.relativePath,callees:de(s.map(a=>a.symbol)),paramCount:r.callableSignature(i)?.paramCount??-1}}var De=T("callee-fingerprint-corpus",{clearGroups:["whole-project","definition-catalog"]}),ve=T("callee-fingerprint-index",{clearGroups:["whole-project","definition-catalog"]});function me(e,n){let{minCallees:t,scope:i,excludeSymbol:r,scanLimit:s}=n,a=n.semantic!==!1,l=De.get(e,()=>new Map),u=`${t}|${i??""}|${s??""}|${a}`,m=!0,g=0,f=0;return b("similar.callee-fingerprints.resolve",()=>{let o=l.get(u);if(m=o!==void 0,o||(o=qe(e,{minCallees:t,scope:i,scanLimit:s,semantic:a}),l.set(u,o)),g=o.length,r===void 0)return o;let d=o.filter(c=>c.symbol!==r);return f=o.length-d.length,d},()=>({minCallees:t,scope:i,scanLimit:s,semantic:a,cacheHit:m,corpusSize:g,excludeSymbol:r!==void 0,excludedSymbols:f}))}function Ee(e,n){let{minCallees:t,scope:i,scanLimit:r}=n,s=n.semantic!==!1,a=ve.get(e,()=>new Map),l=`${t}|${i??""}|${r??""}|${s}`,u=!0,m=0,g=0,f=0;return b("similar.callee-index.resolve",()=>{let o=a.get(l);return u=o!==void 0,o||(o=Te(me(e,{minCallees:t,scope:i,scanLimit:r,semantic:s})),a.set(l,o)),m=o.corpus.length,g=o.docFreq.size,f=o.candidateIndexesByCallee.size,o},()=>({minCallees:t,scope:i,scanLimit:r,semantic:s,cacheHit:u,corpusSize:m,indexedCallees:g,candidateBuckets:f}))}function j(e){return{calleeCorpus:n=>me(e,n),calleeIndex:n=>Ee(e,n),sourceCorpus:(n={})=>ye(e,n),sourceIndex:(n={})=>oe(e,n),sourceCandidates:(n,t)=>(t.candidateMode??"full")==="target-pruned"?Ke(e,n,{minSimilarity:t.minSimilarity,scanLimit:t.scanLimit}):He(n,oe(e,{scanLimit:t.scanLimit}))}}function Te(e){let n=v(),t=0,i=b("similar.callee-index.doc-frequency",()=>{let o=new Map;for(let d of e)for(let c of d.callees)o.set(c,(o.get(c)??0)+1);return t=o.size,o},()=>({corpusSize:e.length,uniqueCallees:t})),r=Math.max(8,Math.ceil(Math.sqrt(e.length))),s=b("similar.callee-index.idf-weights",()=>V(i,e.length),()=>({corpusSize:e.length,uniqueCallees:i.size})),a=b("similar.callee-index.weighted-magnitudes",()=>e.map(o=>E(o.callees,s)),()=>({corpusSize:e.length})),l=0,u=0,m=0,g=b("similar.callee-index.candidate-buckets",()=>{let o=new Map;for(let d=0;d<e.length;d+=1){let c=e[d];for(let p of c.callees){if((i.get(p)??0)>r){n&&(u+=1);continue}let S=o.get(p);S||(S=[],o.set(p,S)),S.push(d),n&&(l+=1)}}return n&&(m=o.size),o},()=>({corpusSize:e.length,buckets:m,candidateRefs:l,ubiquitousSkips:u,ubiquityThreshold:r})),f=b("similar.callee-index.median-idf",()=>_(s),()=>({uniqueCallees:s.size}));return{corpus:e,candidateIndexesByCallee:g,docFreq:i,idfWeights:s,weightedMagnitudes:a,medianIdf:f,ubiquityThreshold:r}}function Ae(e,n){let t=new Map;for(let i of e.callees)for(let r of n.candidateIndexesByCallee.get(i)??[]){let s=n.corpus[r];s.symbol!==e.symbol&&t.set(s.symbol,s)}return t.size>0?[...t.values()]:n.corpus.filter(i=>i.symbol!==e.symbol)}function qe(e,n){let{minCallees:t,scope:i,scanLimit:r,semantic:s}=n,a=v(),l=new A(e),u=0,m=b("similar.callee-fingerprints.candidates",()=>{let c=$(l.productionCallableDefinitions({scope:i,minLoc:5,sortByLocDesc:typeof r=="number"&&r>0}),r);return u=c.length,c},()=>({scope:i,scanLimit:r,candidateCount:u})),g=0,f=b("similar.callee-fingerprints.callee-map",()=>{let c=l.calleeMap(m,{semantic:s});if(a)for(let p of c.values())g+=p.length;return c},()=>({candidateCount:u,semantic:s,calleeEdges:g})),o=0,d=0;return b("similar.callee-fingerprints.shape",()=>{let c=m.map(p=>({symbol:p.symbol,file:p.relativePath,callees:de((f.get(p.symbolId)??[]).map(S=>S.symbol)),paramCount:l.callableSignature(p)?.paramCount??-1})).filter(p=>p.callees.size>=t);return o=c.length,a&&(d=c.reduce((p,S)=>p+S.callees.size,0)),c},()=>({candidateCount:u,fingerprintCount:o,retainedCalleeCount:d,minCallees:t}))}function de(e){return new Set([...e].filter(n=>!Oe(n)))}function Oe(e){return Le.some(n=>e.includes(n))}function re(e,n,t){let i=$e(e,n);if(!i||i.tokens.size<3)return[];let r=t.minSimilarity>=.5?t.minSimilarity:.3,s=[],a=t.candidateMode??"full",l=0,u=0,m=0,g=0;return b("similar.source-shape",()=>{let o=j(e).sourceCandidates(i,{minSimilarity:r,scanLimit:t.scanLimit,candidateMode:a});l=o.length;for(let d of o){if(d.symbol===i.symbol||d.tokens.size<3)continue;u+=1;let c=ne(i.tokens,d.tokens);if(c.size<2){m+=1;continue}let p=new Set([...i.tokens,...d.tokens]),S=p.size>0?c.size/p.size:0;if(S<r){g+=1;continue}s.push({symbolA:i.symbol,shortNameA:R(i.symbol),fileA:i.file,symbolB:d.symbol,shortNameB:R(d.symbol),fileB:d.file,similarity:S,similarityBasis:"source-tokens",sharedCallees:[...c].sort(),uniqueToA:[...q(i.tokens,d.tokens)].sort(),uniqueToB:[...q(d.tokens,i.tokens)].sort(),...fe([...c],"source-tokens")})}return s.sort((d,c)=>c.similarity-d.similarity||d.shortNameB.localeCompare(c.shortNameB)),s.slice(0,t.limit)},()=>({symbol:i.symbol,file:i.file,targetTokens:i.tokens.size,candidateMode:a,candidates:l,comparedPairs:u,sharedSkips:m,similaritySkips:g,results:s.length}))}function fe(e,n){let t=e.flatMap(W),i=e.flatMap(S=>se(S,n)),r=Z(t,ge),s=Z(t,pe),a=Z(i,X),l=[...new Set(i.filter(ae))],u=e.filter(S=>{let h=se(S,n);return h.some(y=>X.has(y))&&h.some(ae)}).length,m=[];r.length>0&&m.push(`access/query scaffolding: ${r.slice(0,5).join(", ")}`),s.length>0&&m.push(`framework/generic scaffolding: ${s.slice(0,5).join(", ")}`),a.length>0&&m.push(`domain behavior verbs: ${a.slice(0,5).join(", ")}`),a.length>0&&l.length>0&&m.push(`domain-specific terms: ${l.slice(0,5).join(", ")}`);let g=n==="source-tokens"&&t.length>0&&t.every(S=>Se.has(S));g&&m.push("shared source tokens are generic scaffolding");let f=a.length>0&&l.length>0,o=r.length+s.length>0,d=n==="callees"&&f&&e.length>=4&&l.length>=4&&u>=2,c=d?"domain-behavior":f?o?"mixed":"domain-behavior":r.length>0?"access-query-scaffolding":s.length>0||g?"framework-scaffolding":"structural-overlap";c==="structural-overlap"&&e.length>0&&m.push(`shared ${n} overlap has no recognized domain or scaffolding category`);let p=c==="domain-behavior"&&(e.length>=3||d)?"direct":"signal";return{evidenceClass:c,actionTier:p,evidenceClassReasons:m,recommendation:Pe(c,p)}}function Pe(e,n){return n==="direct"?"Shared domain behavior looks concrete; review for an extract/reuse opportunity.":e==="mixed"?"Shared evidence mixes domain behavior with scaffolding; review semantics before extracting anything.":e==="access-query-scaffolding"?"Shared evidence is mostly access/query scaffolding; compare product semantics before reusing code.":e==="structural-overlap"?"Shared structure has no domain or scaffolding classification; inspect names and behavior before reusing code.":"Shared evidence is mostly framework or generic scaffolding; treat as a contextual signal."}function Z(e,n){return[...new Set(e.filter(t=>n.has(t)))]}function W(e){return e.replace(/([a-z0-9])([A-Z])/g,"$1 $2").toLowerCase().split(/[^a-z0-9]+/).filter(n=>n.length>1)}function se(e,n){if(n==="source-tokens")return W(e);let t=H(e);return W(t.length>0?t:Be(e))}function Be(e){return e.replace(/[()`]/g," ").replace(/\.[a-z][a-z0-9]+(?=\s|$)/gi," ").split(/[:/\\\s]+/).map(i=>i.trim()).filter(i=>/[A-Za-z]/.test(i)).at(-1)?.replace(/\.$/,"")??e}function ae(e){return e.length>3&&!X.has(e)&&!ge.has(e)&&!pe.has(e)&&!Se.has(e)&&!Ne.has(e)}var X=new Set(["archive","assign","book","cancel","create","delete","ensure","export","import","notify","persist","publish","restore","schedule","send","set","submit","sync","update","upload","validate","write"]),ge=new Set(["access","auth","authorize","cache","context","db","find","get","guard","list","permission","permissions","prisma","query","request","response","role","route","session","sql","where"]),pe=new Set(["bytes","computed","crypto","describe","effect","expect","fetch","filter","hex","hook","json","map","mounted","on","promise","random","react","reduce","ref","render","state","test","token","trim","uuid","vue","watch"]),Se=new Set(["bytes","crypto","data","false","get","hex","id","key","map","name","num","random","result","secret","set","string","to","token","true","type","value"]),Ne=new Set(["best","backend","conflict","database","effect","effects","error","errors","frontend","found","helpers","javascript","module","modules","scip","shared","source","typescript","utils","with","workflow","workflows"]);function $e(e,n){let t=K(e,n);if(!t||!N(t.symbol))return null;let i=_e(e,t);return i?{symbol:t.symbol,file:t.relativePath,tokens:i}:null}function _e(e,n){let t=H(n.symbol),i=Je(e,n.relativePath,n.startLine,n.endLine,t),r=Ce(i,t);return r.size>0?r:null}var je=T("source-fingerprint-corpus",{clearGroups:["whole-project","definition-catalog"]}),Ge=T("source-fingerprint-index",{clearGroups:["whole-project","definition-catalog"]});function be(e){return`${e.scanLimit??""}`}function ye(e,n={}){let t=je.get(e,()=>new Map),i=be(n),r=t.get(i);return r||(r=Xe(e,n),t.set(i,r)),r}function oe(e,n={}){let t=Ge.get(e,()=>new Map),i=be(n),r=t.get(i);return r||(r=Ue(ye(e,n)),t.set(i,r)),r}function Ue(e){let n=new Map;for(let r of e)for(let s of r.tokens)n.set(s,(n.get(s)??0)+1);let t=Math.max(8,Math.ceil(Math.sqrt(e.length))),i=new Map;for(let r of e)for(let s of r.tokens){if((n.get(s)??0)>t)continue;let a=i.get(s);a||(a=[],i.set(s,a)),a.push(r)}return{corpus:e,candidateByToken:i,docFreq:n,ubiquityThreshold:t}}function He(e,n){let t=new Map;for(let i of e.tokens)for(let r of n.candidateByToken.get(i)??[])r.symbol!==e.symbol&&t.set(r.symbol,r);return t.size>0?[...t.values()]:n.corpus.filter(i=>i.symbol!==e.symbol)}function Ke(e,n,t){let i=v(),r=new A(e),s=Ve(n.tokens.size,t.minSimilarity),a=0,l=0,u=0,m=b("similar.source-shape.target-files",()=>{let c=[...n.tokens],p=[];for(let S of Q(e,{includeIgnored:!1})){a+=1;let h=G(e,S);h&&(l+=1,Ze(h,c,s)&&p.push(S))}return u=p.length,p},()=>({symbol:n.symbol,targetTokens:n.tokens.size,requiredSharedTokens:s,scannedFiles:a,readableFiles:l,candidateFiles:u})),g=0,f=b("similar.source-shape.target-definitions",()=>{let c=$(r.productionCallableDefinitions({files:m,sortByLocDesc:typeof t.scanLimit=="number"&&t.scanLimit>0}),t.scanLimit);return g=c.length,c},()=>({symbol:n.symbol,candidateFiles:u,scanLimit:t.scanLimit,definitionCount:g})),o=0;return b("similar.source-shape.target-fingerprints",()=>{let c=he(e,f);return i&&(o=c.length),c},()=>({symbol:n.symbol,definitionCount:g,fingerprintCount:o})).filter(c=>c.symbol!==n.symbol)}function Ve(e,n){return Math.max(2,Math.ceil(e*n))}function Ze(e,n,t){if(n.length<t)return!1;let i=e.toLowerCase(),r=0;for(let s of n)if(We(i,s)&&(r+=1,r>=t))return!0;return!1}function We(e,n){return n==="num"?/\b\d+\b/.test(e):e.includes(n)}function Xe(e,n={}){let t=new A(e),{scanLimit:i}=n,r=$(t.productionCallableDefinitions({sortByLocDesc:typeof i=="number"&&i>0}),i);return he(e,r)}function he(e,n){let t=new Map;for(let r of n){let s=t.get(r.relativePath)??[];s.push(r),t.set(r.relativePath,s)}let i=new Map;for(let[r,s]of t){let a=G(e,r);if(!a)continue;let l=J(e,r,a),u=Ye(e,r,l),m=!1,g=null;for(let f of s){let o=Qe(f),d=u.get(o),c=d?new Set(d.tokens):null;c||(g??=U(e,r),c=Ce(Fe(g,f.startLine,f.endLine,f.leaf),f.leaf),u.set(o,{key:o,symbol:f.symbol,startLine:f.startLine,endLine:f.endLine,leaf:f.leaf,tokens:[...c].sort()}),m=!0),c.size>0&&i.set(f.symbol,{symbol:f.symbol,file:f.relativePath,tokens:c})}m&&tn(e,r,l,u)}return n.map(r=>i.get(r.symbol)).filter(r=>!!r)}function Je(e,n,t,i,r){let s=U(e,n);return s.length===0?"":Fe(s,t,i,r)}function Fe(e,n,t,i){if(t>=n&&t-n<=12)return e.slice(n,t+1).join(`
|
|
2
|
-
`);let r=[new RegExp(`\\bdef\\s+${O(i)}\\b`),new RegExp(`\\bfun\\s+${O(i)}\\b`),new RegExp(`\\bfn\\s+${O(i)}\\b`),new RegExp(`\\bfunction\\s+${O(i)}\\b`),new RegExp(`\\b${O(i)}\\s*\\(`)],s=e.findIndex(a=>r.some(l=>l.test(a)));if(s>=0){let a=s;for(let l=s+1;l<e.length&&l<=s+8;l++){let u=e[l]??"";if(l>s&&sn(u)||(a=l,u.trim()===""&&l>s+1))break}return e.slice(s,a+1).join(`
|
|
3
|
-
`)}return e.slice(n,Math.min(e.length,n+8)).join(`
|
|
4
|
-
`)}function Qe(e){return`${e.symbol}\0${e.startLine}\0${e.endLine}\0${e.leaf}`}function Ye(e,n,t){return ue.read(e,n,t)??new Map}function en(e){try{let n=JSON.parse(e);if(!Array.isArray(n.entries))return null;let t=new Map;for(let i of n.entries){if(!i||typeof i.key!="string"||typeof i.symbol!="string"||typeof i.startLine!="number"||typeof i.endLine!="number"||typeof i.leaf!="string"||!Array.isArray(i.tokens)||!i.tokens.every(r=>typeof r=="string"))return null;t.set(i.key,i)}return t}catch{return null}}function nn(e){let n={entries:[...e.values()].sort((t,i)=>t.key.localeCompare(i.key))};return JSON.stringify(n)}function tn(e,n,t,i){ue.write(e,n,t,new Map(i))}function Ce(e,n){if(!e)return new Set;let t=new Set(["public","private","protected","final","static","class","def","fun","fn","function","return","string","bool","boolean","void","unit","self","this","new","const","let","var","end","pub"]),i=rn(n),s=e.replace(/["'`]/g," ").replace(/\b\d+\b/g," NUM ").replace(/([a-z0-9])([A-Z])/g,"$1 $2").replace(/[^A-Za-z0-9_]+/g," ").replace(/_/g," ").toLowerCase().split(/\s+/).map(a=>a.trim()).filter(a=>a.length>1).filter(a=>!t.has(a)).filter(a=>!i.has(a));return new Set(s)}function rn(e){return new Set(e.replace(/([a-z0-9])([A-Z])/g,"$1 $2").split(/[^A-Za-z0-9_]+|_/).map(n=>n.toLowerCase()).filter(n=>n.length>1))}function sn(e){return/^\s*(?:def|fun|fn|function|class|trait|module|object|enum|interface|public|private|protected)\b/.test(e)}function O(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}export{yn as a,ke as b,hn as c,Fn as d,Re as e,me as f,Ee as g,j as h,Te as i,Ae as j,de as k,fe as l};
|
|
5
|
-
//# sourceMappingURL=chunk-Z2LDWIJV.js.map
|
package/dist/chunk-ZNWWVYQL.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import{a as y}from"./chunk-3XSNW5XB.js";import{a as P}from"./chunk-UVPY3RUZ.js";import{a as x}from"./chunk-B75HZHUP.js";import{a as v}from"./chunk-RM2WQ75T.js";import{a as p,g as h}from"./chunk-WUOB4DHH.js";import{a as b}from"./chunk-BGBBVSH4.js";import{d as l,e as g,h as u}from"./chunk-NABVR6B7.js";import{e as f,f as m}from"./chunk-THB6AM3V.js";import{b as d}from"./chunk-SA3DPTHT.js";import{basename as L,extname as S}from"path";function G(i,e){let{scope:n,maxLoc:t=15,limit:o=30,scanLimit:s}=e??{},a=new v(i);return P({candidates:()=>A(i,a,n,t),orderCandidates:x,scanLimit:s,profile:{name:"passthrough-candidates"},prepare:r=>a.calleeMap(r,{semantic:e?.semantic!==!1}),evaluate:(r,c)=>D(i,r,c.get(r.symbolId)??[]),orderResults:(r,c)=>r.loc-c.loc||r.file.localeCompare(c.file),limit:o})}function D(i,e,n){let t=j(n);if(t.size!==1||!f(i,e.relativePath,e.startLine,e.endLine))return null;let[,o]=[...t.entries()][0],s=I(i,e,o),a=E(i,e),r=s.length>0||a.length>0?"signal":"direct";return{symbol:e.symbol,shortName:l(e.symbol),file:e.relativePath,startLine:e.startLine,endLine:e.endLine,loc:b(e),forwardsTo:o.symbol,forwardsToShort:l(o.symbol),forwardsToFile:o.file,actionTier:r,boundaryEvidence:s,publicFacadeEvidence:a,recommendation:T(r,s,a)}}function I(i,e,n){return y(i,e.relativePath,e.startLine,"passthrough","explicit ignore-passthrough comment",[{label:"passthrough name",value:l(e.symbol)},{label:"callee name",value:l(n.symbol)},{label:"passthrough module",value:L(e.relativePath,S(e.relativePath))},{label:"callee module",value:L(n.file,S(n.file))}])}function T(i,e,n){if(i==="signal"){if(n.length>0)return`Review the public API before inlining; public-facade evidence: ${n.slice(0,2).join("; ")}.`;let t=e.filter(F);return t.length>0?`Review the public API before inlining; public-surface evidence: ${t.slice(0,2).join("; ")}.`:`Review the boundary before inlining; boundary evidence: ${e.slice(0,2).join("; ")}.`}return"Inline or remove this passthrough unless an external API or runtime registration depends on the forwarding name."}function E(i,e){return w(i,e)?p(i,e.relativePath)?["exported passthrough is declared on the package public surface"]:h(i,e.symbol,e.relativePath)?["exported passthrough matches configured or framework public entry surface"]:[]:[]}function w(i,e){let n=d(i,e.relativePath);if(n.length===0)return!1;let t=n.slice(Math.max(0,e.startLine-2),e.startLine+1).join(`
|
|
2
|
-
`);return N.test(t)?!0:C(n,g(e.symbol))}function C(i,e){if(!e)return!1;let n=new RegExp(`^\\s*export\\s*\\{[^}\\n]*\\b${R(e)}\\b`);return i.some(t=>n.test(t))}function F(i){return i.includes("public surface")}function R(i){return i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function j(i){let e=i.some(t=>u(t.symbol))?i.filter(t=>u(t.symbol)):i,n=new Map;for(let t of e)n.has(t.symbol)||n.set(t.symbol,t);return n}function A(i,e,n,t){return e.productionCallableDefinitions({scope:n,minLoc:3,maxLoc:t,requireFunctionLikeSymbol:!0,excludeRustTraitImplMembers:!0}).filter(o=>!m(i,o))}var N=/^\s*export\s+(?:default\s+)?(?:(?:async\s+)?function\b|(?:const|let|var)\b)/m;export{G as a};
|
|
3
|
-
//# sourceMappingURL=chunk-ZNWWVYQL.js.map
|
|
@@ -1,372 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: concrete-plan
|
|
3
|
-
description: Build concrete, checklist-driven implementation plans using scip-query for every code reference. Plans are stress-tested against 11 engineering principles before shipping.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Concrete Implementation Planning
|
|
7
|
-
|
|
8
|
-
You are writing a production implementation plan as a markdown checklist. Every step must be concrete — exact file paths, line numbers, what the code does today, what it should do after the change. No hand-waving. No "consider doing X." Every claim about existing code must be verified against the actual codebase using `scip-query`.
|
|
9
|
-
|
|
10
|
-
---
|
|
11
|
-
|
|
12
|
-
## Hard Rules
|
|
13
|
-
|
|
14
|
-
1. **Every code reference must come from scip-query.** Run `scip-query status --capabilities` or `scip-query status --json` before starting. If freshness is `fresh`, keep going; if it is `stale`, `missing`, or `unknown`, run `scip-query reindex` before using graph facts. No reference from memory, grep, or file reads.
|
|
15
|
-
|
|
16
|
-
2. **Every step must cite its source.** Each step in the plan includes a `Source` field naming the scip-query command that produced the file path, line number, and behavioral claim. A step without a Source is unverified and must not appear in the plan.
|
|
17
|
-
|
|
18
|
-
3. **Every step must be actionable.** Never write "update this file." Write "In `foo.service.ts:142-158`, the `catch` block swallows `AbortError` — re-throw it instead of logging." Exact lines, current behavior, target behavior.
|
|
19
|
-
|
|
20
|
-
4. **The plan goes in `docs/plans/YYYY-MM-DD-<short-name>.md`.** Use today's date. The file is a living document — update it as stress-testing reveals new steps.
|
|
21
|
-
|
|
22
|
-
---
|
|
23
|
-
|
|
24
|
-
## Gather Context Fast
|
|
25
|
-
|
|
26
|
-
Start every plan with the bundled context command — it replaces a half-dozen
|
|
27
|
-
separate queries and adds evidence no single query has:
|
|
28
|
-
|
|
29
|
-
```bash
|
|
30
|
-
scip-query plan-context <symbol-or-file>
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
Use its sections directly in the plan:
|
|
34
|
-
|
|
35
|
-
- **DEFINITIONS / REFERENCES / CALL GRAPH / DOWNSTREAM IMPACT** — the Source
|
|
36
|
-
citations for your steps.
|
|
37
|
-
- **HISTORY** — files that usually change together with the target. If the
|
|
38
|
-
plan edits the target, the plan MUST either cover its co-change partners or
|
|
39
|
-
state why they're untouched this time. This is how plans stop causing drift.
|
|
40
|
-
- **CHANGE RISK** — high-risk consumers get their own verification steps.
|
|
41
|
-
|
|
42
|
-
Two pre-plan checks that prevent planning mistakes:
|
|
43
|
-
|
|
44
|
-
```bash
|
|
45
|
-
scip-query doc-drift <standard.md> # is the standard this plan follows stale?
|
|
46
|
-
scip-query recent-duplicates # does the helper you're about to plan already exist?
|
|
47
|
-
```
|
|
48
|
-
|
|
49
|
-
If `doc-drift` shows the standard's referenced code moved on without it,
|
|
50
|
-
updating that standard becomes step 0 of the plan. If the plan creates a new
|
|
51
|
-
helper, cite the `similar` / `recent-duplicates` evidence that nothing
|
|
52
|
-
established already does the job.
|
|
53
|
-
|
|
54
|
-
## Symbol Lookup Tips
|
|
55
|
-
|
|
56
|
-
`scip-query` accepts partial symbol names — you don't need the full SCIP symbol path. These all work:
|
|
57
|
-
|
|
58
|
-
```bash
|
|
59
|
-
scip-query code processVegaMention # just the function name
|
|
60
|
-
scip-query call-graph ChatService # just the class name
|
|
61
|
-
scip-query trace getActiveInferenceConfig # any unique substring
|
|
62
|
-
```
|
|
63
|
-
|
|
64
|
-
**Avoid parentheses** — `()` causes shell parse errors in zsh/bash:
|
|
65
|
-
```bash
|
|
66
|
-
# BAD — shell tries to execute a subshell
|
|
67
|
-
scip-query code processVegaMention()
|
|
68
|
-
|
|
69
|
-
# GOOD — no parens needed, scip-query strips them internally
|
|
70
|
-
scip-query code processVegaMention
|
|
71
|
-
|
|
72
|
-
# ALSO GOOD — single quotes protect special characters
|
|
73
|
-
scip-query code 'processVegaMention'
|
|
74
|
-
```
|
|
75
|
-
|
|
76
|
-
**Read source by file + line range** when the symbol name is ambiguous:
|
|
77
|
-
```bash
|
|
78
|
-
scip-query code 'src/modules/chat/chat.service.ts:100-200'
|
|
79
|
-
```
|
|
80
|
-
|
|
81
|
-
**If "Symbol not found":**
|
|
82
|
-
1. Try a shorter/simpler name — `login` instead of `AuthService:login`
|
|
83
|
-
2. Try `scip-query outline <file>` to see what symbols exist in the file
|
|
84
|
-
3. Try `scip-query trace <name>` which uses a different lookup path
|
|
85
|
-
4. Use the `file:line-line` syntax for `code` if you know the location
|
|
86
|
-
|
|
87
|
-
---
|
|
88
|
-
|
|
89
|
-
## Forbidden Tools and Patterns
|
|
90
|
-
|
|
91
|
-
This skill deliberately excludes `Grep` and `Read` from its allowed tools. This is intentional.
|
|
92
|
-
|
|
93
|
-
**DO NOT work around this by:**
|
|
94
|
-
- Running `grep`, `rg`, or `cat` through Bash. If you catch yourself typing `grep` or `rg`, stop — you are doing it wrong.
|
|
95
|
-
- Using `Read` via a subagent to browse files for discovery. Subagents must also use scip-query.
|
|
96
|
-
- Spawning Explore agents that fall back to grep and file reads. If a subagent's output does not cite scip-query commands, reject its findings and re-run.
|
|
97
|
-
|
|
98
|
-
**Instead, use scip-query (full reference at `/Users/aydansalois/Documents/GitHub/scip-query/docs/COMMAND_REFERENCE.md`):**
|
|
99
|
-
|
|
100
|
-
| You want to... | Use this |
|
|
101
|
-
|---|---|
|
|
102
|
-
| **Read source code** | `scip-query code <symbol>` (reads file, bounded to definition range) |
|
|
103
|
-
| **Read source with context** | `scip-query code <symbol> -C 5` (5 extra lines above/below) |
|
|
104
|
-
| Find a symbol / list file contents | `scip-query outline <file>` (all symbols with line ranges + signatures) |
|
|
105
|
-
| Find files by name | `scip-query files <pattern>` |
|
|
106
|
-
| See callers + callees | `scip-query call-graph <symbol>` |
|
|
107
|
-
| Full module map | `scip-query system <module>` |
|
|
108
|
-
| True public API | `scip-query surface <module>` |
|
|
109
|
-
| Every file referencing a symbol | `scip-query refs <symbol>` |
|
|
110
|
-
| Definition + all references | `scip-query trace <symbol>` |
|
|
111
|
-
| Forward dependencies | `scip-query deps <file>` |
|
|
112
|
-
| Reverse dependencies | `scip-query rdeps <file>` |
|
|
113
|
-
| **Full transitive blast radius** | `scip-query affected <symbol>` |
|
|
114
|
-
| **Pre-change risk briefing** | `scip-query change-surface <file>` |
|
|
115
|
-
| **Git diff impact analysis** | `scip-query diff-impact --json` |
|
|
116
|
-
| **Complexity analysis** | `scip-query complexity <symbol>` (branches, cyclomatic, fan-in/out) |
|
|
117
|
-
| **Dataflow: what feeds in/out** | `scip-query dataflow <symbol>` (producers, consumers, usage sites) |
|
|
118
|
-
| **Backward slice (what affects this)** | `scip-query slice <symbol>` |
|
|
119
|
-
| **Forward slice (what this affects)** | `scip-query slice <symbol> --forward` |
|
|
120
|
-
| Find similar functions | `scip-query similar <symbol>` |
|
|
121
|
-
| Find same-shape functions | `scip-query similar-signatures` |
|
|
122
|
-
| Refactoring prescription | `scip-query convergence <a> <b>` |
|
|
123
|
-
| Find redundant re-exports | `scip-query redundant-reexports` |
|
|
124
|
-
| Find dead code | `scip-query dead --min-loc 10 --skip-barrels` |
|
|
125
|
-
| Codebase health report | `scip-query health` |
|
|
126
|
-
| Coupling pressure points | `scip-query bottlenecks` |
|
|
127
|
-
| Complexity hotspots | `scip-query complexity-hotspots` |
|
|
128
|
-
| Circular dependencies | `scip-query cycles` |
|
|
129
|
-
| Pattern drift | `scip-query drift` |
|
|
130
|
-
| Unnecessary wrappers | `scip-query wrapper-candidates` |
|
|
131
|
-
| Stale abstractions | `scip-query stale-abstractions` |
|
|
132
|
-
| Check if a file exists | `Glob` with the exact path pattern |
|
|
133
|
-
|
|
134
|
-
If none of these can answer your question, say so explicitly in the plan rather than silently falling back to grep.
|
|
135
|
-
|
|
136
|
-
### Full Documentation
|
|
137
|
-
|
|
138
|
-
- **Every command with options and examples:** `/Users/aydansalois/Documents/GitHub/scip-query/docs/COMMAND_REFERENCE.md`
|
|
139
|
-
- **Goal-oriented agent workflows:** `/Users/aydansalois/Documents/GitHub/scip-query/docs/AGENT_GUIDE.md`
|
|
140
|
-
|
|
141
|
-
---
|
|
142
|
-
|
|
143
|
-
## The 11 Principles
|
|
144
|
-
|
|
145
|
-
After designing the core implementation, stress-test it against every principle below. Each principle is a lens — apply it to every step in the plan and ask whether the design holds up. If it doesn't, add steps until it does. Use scip-query to verify your answers, not assumptions.
|
|
146
|
-
|
|
147
|
-
### 1. Understand before you touch
|
|
148
|
-
|
|
149
|
-
Why does this code exist? What production failure shaped it? What does it handle that isn't obvious? You don't earn the right to change something until you can explain why it was written that way.
|
|
150
|
-
|
|
151
|
-
**Key question**: Can you explain the purpose of every piece of code you're modifying or removing?
|
|
152
|
-
**Tools**: `scip-query call-graph <symbol>` for callers/callees. `scip-query code <symbol>` to read the implementation.
|
|
153
|
-
|
|
154
|
-
### 2. Map the blast radius
|
|
155
|
-
|
|
156
|
-
Every symbol you change has consumers. Find all of them — direct callers, transitive dependents, tests that mock it, types that reference it, re-exports. The question isn't "what am I changing" — it's "what else moves when I move this."
|
|
157
|
-
|
|
158
|
-
**Key question**: For every changed symbol, do you know every consumer?
|
|
159
|
-
**Tools**: `scip-query affected <symbol>` for full transitive closure. `scip-query rdeps` on every modified file. `scip-query surface` on every modified module. `scip-query change-surface <file>` for a per-file risk briefing.
|
|
160
|
-
|
|
161
|
-
### 3. Every intermediate state must be valid
|
|
162
|
-
|
|
163
|
-
You can't teleport from old to new. Every commit, every deploy between here and there must leave the system working. No "it'll work once we finish all the steps." If the migration has 5 phases, each of the 5 intermediate states must build, pass tests, and be deployable.
|
|
164
|
-
|
|
165
|
-
**Key question**: If you deployed only Phase 1, would the system still work?
|
|
166
|
-
**Tools**: `scip-query deps` to verify no phase depends on code that hasn't been written yet.
|
|
167
|
-
|
|
168
|
-
### 4. Reversibility determines rigor
|
|
169
|
-
|
|
170
|
-
One-way doors (dropping tables, changing public APIs, deleting data) get maximum scrutiny. Two-way doors (internal refactors, new internal functions) get proportional scrutiny. Know which kind of door you're walking through at every step, and say so in the plan.
|
|
171
|
-
|
|
172
|
-
**Key question**: For each step, can you undo it? What's the rollback plan if it goes wrong?
|
|
173
|
-
|
|
174
|
-
### 5. Design for failure, not success
|
|
175
|
-
|
|
176
|
-
The happy path works — that's the easy part. What happens when the database is slow? The network drops? The API returns garbage? The process crashes mid-write? A user hits the button twice? Every new path needs a concrete failure mode answer.
|
|
177
|
-
|
|
178
|
-
**Key question**: For every new async path, what's the worst that happens and does the system recover?
|
|
179
|
-
**Tools**: `scip-query dataflow <symbol>` to trace data flow through error paths. `scip-query code <symbol>` to read existing catch blocks.
|
|
180
|
-
|
|
181
|
-
### 6. Assume concurrency
|
|
182
|
-
|
|
183
|
-
Can this run twice at the same time? Can events arrive out of order? Can state be half-written when something else reads it? Can a cleanup path fire after a retry already recovered? Can a "done" signal arrive before its prerequisite state is written?
|
|
184
|
-
|
|
185
|
-
**Key question**: What shared mutable state does this touch, and what happens when two things touch it at once?
|
|
186
|
-
**Tools**: `scip-query dataflow <symbol>` to find what flows through shared state. `scip-query slice <symbol>` to trace what affects a variable.
|
|
187
|
-
|
|
188
|
-
### 7. Defend the boundaries
|
|
189
|
-
|
|
190
|
-
Every entry point — API endpoint, WebSocket message, webhook, CLI command — is a trust boundary. Who can trigger this? On whose resources? With what input? Can user A act on user B's resources? Is the payload validated? Validate at the boundary, trust internally.
|
|
191
|
-
|
|
192
|
-
**Key question**: For every entry point, who is allowed to call it, and what happens when someone who isn't allowed tries?
|
|
193
|
-
**Tools**: `scip-query code <handler>` to read the handler. `scip-query refs <authFunction>` to see where auth middleware is applied.
|
|
194
|
-
|
|
195
|
-
### 8. Protect data integrity
|
|
196
|
-
|
|
197
|
-
When you remove something, what references it? Foreign keys, orphaned rows, in-flight operations, unique constraints. When you change a schema, what happens to existing data? Data outlives code — you can revert a deploy but you can't un-corrupt a database.
|
|
198
|
-
|
|
199
|
-
**Key question**: What happens to existing data during and after this change?
|
|
200
|
-
**Tools**: `scip-query refs` on table/column names. `scip-query files` to find schema references.
|
|
201
|
-
|
|
202
|
-
### 9. Make it observable
|
|
203
|
-
|
|
204
|
-
When this breaks at 3am, can the on-call engineer diagnose it from logs alone without reading the source code? Every error path needs structured context. Every state transition should be traceable. If you can't tell what happened, you can't fix it.
|
|
205
|
-
|
|
206
|
-
**Key question**: For every new error path, is there a log line with enough context to diagnose the problem?
|
|
207
|
-
**Tools**: `scip-query code <symbol>` to check existing logging patterns.
|
|
208
|
-
|
|
209
|
-
### 10. Consider the human
|
|
210
|
-
|
|
211
|
-
What does the user experience during and after this change? Features that disappear without explanation, loading states that lie, error messages that confuse, flows that silently change behavior — these are bugs, not polish items.
|
|
212
|
-
|
|
213
|
-
**Key question**: If a real user walked through this flow, would anything surprise, confuse, or frustrate them?
|
|
214
|
-
|
|
215
|
-
### 11. Reuse over re-implement; match what already exists
|
|
216
|
-
|
|
217
|
-
Two implementations of the same logic is worse than either alone — they drift, diverge, and slowly contradict each other until nobody knows which is canonical. Before designing any new code path, find the existing implementations of the same problem class and reuse them. The codebase already has utilities, error-handling patterns, naming conventions, and abstractions for this — use them. If you genuinely need a new pattern, justify why in the plan with a citation to what existed and why it didn't fit. Your implementation should be indistinguishable from the surrounding code — same patterns, same utilities, same conventions, same libraries.
|
|
218
|
-
|
|
219
|
-
This principle backstops the Gate C **Reuse Audit** — by stress-test time, every new symbol in the plan should already be tied to a reuse target or a written justification. Use this lens to catch ones that slipped through.
|
|
220
|
-
|
|
221
|
-
**Key question**: For every new function, type, or module in the plan, does an existing one already do this — or 80% of this? If you'd be writing logic that's *similar-but-not-identical* to existing code, you are creating future drift.
|
|
222
|
-
**Tools**: `scip-query similar-chains` (parallel end-to-end flows). `scip-query similar-files` (structurally similar modules). `scip-query similar <symbol>` (overlapping callee sets). `scip-query similar-signatures` (same-shape functions). `scip-query convergence <a> <b>` (merge prescription for near-duplicates). `scip-query surface <module>` (what's already exposed). `scip-query deps <file>` (what libraries are already adopted). `scip-query code <symbol>` (read the canonical example).
|
|
223
|
-
|
|
224
|
-
---
|
|
225
|
-
|
|
226
|
-
## Workflow
|
|
227
|
-
|
|
228
|
-
### 1. Discover — three gates before you design
|
|
229
|
-
|
|
230
|
-
You may not write a single design step until you have produced written answers to all three gates below. Each gate becomes a section in the final plan. A plan that skips any gate is rejected — it means you don't understand the problem, the system, or what already exists.
|
|
231
|
-
|
|
232
|
-
#### Gate A — Restate the goal
|
|
233
|
-
|
|
234
|
-
What is the user actually trying to accomplish? Not the literal request — the underlying job. State it in your own words, then state what "done" looks like for the user (not for the code). If the goal is ambiguous, stop and ask the user before designing. A correct plan for the wrong goal is worse than no plan.
|
|
235
|
-
|
|
236
|
-
#### Gate B — Explain the current end-to-end flow
|
|
237
|
-
|
|
238
|
-
Walk the affected slice of the system from entry point to side effect, citing scip-query at every hop. Use:
|
|
239
|
-
|
|
240
|
-
- `scip-query system <module>` — full module map of the area
|
|
241
|
-
- `scip-query call-graph <symbol>` — callers and callees of every entry point you'll touch
|
|
242
|
-
- `scip-query trace <symbol>` — definition + signature + every reference
|
|
243
|
-
- `scip-query dataflow <symbol>` — what feeds in, where it ends up
|
|
244
|
-
- `scip-query change-surface <file>` — pre-change risk briefing on each file you'll modify
|
|
245
|
-
- `scip-query affected <symbol>` — full transitive blast radius
|
|
246
|
-
|
|
247
|
-
If you can't explain how the code works today, you have not earned the right to change it. Surface the non-obvious invariants — what does this code handle that you'd never guess from its shape? What production failures shaped it? What edge cases does the current implementation already cover?
|
|
248
|
-
|
|
249
|
-
#### Gate C — Reuse audit (search before you write)
|
|
250
|
-
|
|
251
|
-
For every new function, type, helper, or module you are about to propose, verify the logic doesn't already exist somewhere in the codebase. **Reuse > extend > write-new.** Two implementations of the same logic is worse than either alone — they drift, diverge, and slowly contradict each other.
|
|
252
|
-
|
|
253
|
-
Run, in roughly broad-to-narrow order:
|
|
254
|
-
|
|
255
|
-
- `scip-query similar-chains` — does an equivalent end-to-end flow already exist? (the most powerful reuse-finder — catches architectural duplication that function-level checks miss)
|
|
256
|
-
- `scip-query similar-files <closest-existing-file>` — does a structurally similar module already exist?
|
|
257
|
-
- `scip-query similar <closest-existing-symbol>` — does a function already do most of this? (TF-IDF weighted cosine on callee fingerprints)
|
|
258
|
-
- `scip-query similar-signatures` — does a function with this parameter+return shape already exist?
|
|
259
|
-
- `scip-query surface <module>` — what utilities does the area you're touching already expose?
|
|
260
|
-
|
|
261
|
-
Once a candidate surfaces, confirm fit with:
|
|
262
|
-
|
|
263
|
-
- `scip-query code <candidate>` — read it
|
|
264
|
-
- `scip-query convergence <yours> <candidate>` — merge prescription if it's a near-duplicate
|
|
265
|
-
|
|
266
|
-
The plan must include a **Reuse Audit** subsection. For every new symbol you're proposing, list either (a) the existing function/utility you'll reuse or extend (with scip-query citation), or (b) the specific reason existing code doesn't fit and a new symbol is justified. "I didn't find anything" is not an acceptable answer — name the queries you ran.
|
|
267
|
-
|
|
268
|
-
### 2. Design
|
|
269
|
-
|
|
270
|
-
Write the implementation as a numbered checklist grouped into phases (5-8 files max per phase). Each step uses this format:
|
|
271
|
-
|
|
272
|
-
```markdown
|
|
273
|
-
### N.M — Short imperative title
|
|
274
|
-
|
|
275
|
-
- [ ] **File**: `path/to/file.ts:LINE-LINE`
|
|
276
|
-
- **Source**: `scip-query trace <symbol>` (the command that found this)
|
|
277
|
-
- **What**: What the code does today (verified via scip-query code).
|
|
278
|
-
- **Change**: Exactly what to change. Include code snippets for non-obvious changes.
|
|
279
|
-
- **Why**: Why this step is necessary.
|
|
280
|
-
```
|
|
281
|
-
|
|
282
|
-
Include an execution order showing dependencies between phases. Mark which phases can be deployed independently.
|
|
283
|
-
|
|
284
|
-
### 3. Stress-test
|
|
285
|
-
|
|
286
|
-
Apply the 11 Principles against every step in the design. For each principle, ask the key question and use the listed scip-query commands to verify the answer. If a principle reveals a gap, add steps to the plan until the gap is closed. Document what you checked and what you found.
|
|
287
|
-
|
|
288
|
-
### 4. Verify
|
|
289
|
-
|
|
290
|
-
After stress-testing is complete:
|
|
291
|
-
|
|
292
|
-
1. **Freshness**: Run `scip-query status --capabilities`; reindex only if freshness is not `fresh`.
|
|
293
|
-
2. **Verify references**: Spawn parallel subagents (one per phase) using the **Subagent Briefing Template**. Each agent confirms that every file path exists, every line number is within +-5 lines, and every described behavior matches reality. Reject output that doesn't cite scip-query commands.
|
|
294
|
-
3. **Fix drift**: Update any stale references.
|
|
295
|
-
4. **Check execution order**: No phase depends on a later phase. No step within a phase depends on a later step.
|
|
296
|
-
5. **Check validation coverage**: Every behavior-changing step should have a corresponding validation step. Flag gaps in tests, manual checks, or runtime verification.
|
|
297
|
-
6. **Run diff-impact**: `scip-query diff-impact --json` to verify the blast radius matches what the plan predicted.
|
|
298
|
-
|
|
299
|
-
---
|
|
300
|
-
|
|
301
|
-
## Subagent Briefing Template
|
|
302
|
-
|
|
303
|
-
When spawning any subagent for this planning process, **include the following block verbatim** — subagents do not inherit your instructions.
|
|
304
|
-
|
|
305
|
-
```
|
|
306
|
-
## Code Intelligence Tool — Required
|
|
307
|
-
|
|
308
|
-
You have the `scip-query` CLI for compiler-resolved code intelligence. Use it for ALL code references — do not use grep, rg, Read, or cat.
|
|
309
|
-
|
|
310
|
-
### scip-query commands
|
|
311
|
-
|
|
312
|
-
Navigation:
|
|
313
|
-
- `scip-query code <symbol>` — read source code (bounded to definition range)
|
|
314
|
-
- `scip-query code <symbol> -C 5` — read source with 5 extra context lines
|
|
315
|
-
- `scip-query outline <file>` — all symbols in a file with line ranges + signatures
|
|
316
|
-
- `scip-query files <pattern>` — find files by name
|
|
317
|
-
- `scip-query refs <symbol>` — every file referencing a symbol
|
|
318
|
-
- `scip-query trace <symbol>` — definition + signature + all references
|
|
319
|
-
- `scip-query call-graph <symbol>` — incoming callers + outgoing callees
|
|
320
|
-
- `scip-query system <module>` — full module map: files, symbols, deps in/out
|
|
321
|
-
- `scip-query surface <module>` — symbols consumers actually use
|
|
322
|
-
|
|
323
|
-
Dependencies & Impact:
|
|
324
|
-
- `scip-query deps <file>` — files this file depends on
|
|
325
|
-
- `scip-query rdeps <file>` — files that depend on this file
|
|
326
|
-
- `scip-query affected <symbol>` — transitive closure of breakage
|
|
327
|
-
- `scip-query change-surface <file>` — pre-change risk briefing
|
|
328
|
-
- `scip-query diff-impact --json` — git diff impact analysis
|
|
329
|
-
|
|
330
|
-
Analysis:
|
|
331
|
-
- `scip-query complexity <symbol>` — branches, cyclomatic estimate, fan-in/out
|
|
332
|
-
- `scip-query dataflow <symbol>` — definition sites, usage sites, producers, consumers
|
|
333
|
-
- `scip-query slice <symbol>` — backward slice (what affects this)
|
|
334
|
-
- `scip-query slice <symbol> --forward` — forward slice (what this affects)
|
|
335
|
-
- `scip-query similar <symbol>` — find functions with similar callee patterns
|
|
336
|
-
- `scip-query convergence <a> <b>` — refactoring prescription for similar pair
|
|
337
|
-
|
|
338
|
-
Quality:
|
|
339
|
-
- `scip-query health` — composite codebase health report
|
|
340
|
-
- `scip-query dead --min-loc 10` — find dead code
|
|
341
|
-
- `scip-query bottlenecks` — coupling pressure points
|
|
342
|
-
- `scip-query complexity-hotspots` — riskiest symbols
|
|
343
|
-
- `scip-query cycles` — circular dependencies
|
|
344
|
-
|
|
345
|
-
Full command reference: /Users/aydansalois/Documents/GitHub/scip-query/docs/COMMAND_REFERENCE.md
|
|
346
|
-
Agent workflows guide: /Users/aydansalois/Documents/GitHub/scip-query/docs/AGENT_GUIDE.md
|
|
347
|
-
|
|
348
|
-
### Rules
|
|
349
|
-
- Use scip-query for ALL discovery. Do NOT use grep, rg, or Read.
|
|
350
|
-
- To read source code, use `scip-query code <symbol>`.
|
|
351
|
-
- Every file path, line number, and behavioral claim must cite the specific scip-query command that produced it.
|
|
352
|
-
- If you cannot verify a claim with scip-query, say so explicitly — do not guess.
|
|
353
|
-
- Your output will be rejected if it contains findings without scip-query citations.
|
|
354
|
-
```
|
|
355
|
-
|
|
356
|
-
**Reject any subagent output that cites grep, rg, cat, or Read as evidence instead of scip-query.**
|
|
357
|
-
|
|
358
|
-
---
|
|
359
|
-
|
|
360
|
-
## Output Format
|
|
361
|
-
|
|
362
|
-
The plan is a single markdown file with:
|
|
363
|
-
|
|
364
|
-
1. Title and date
|
|
365
|
-
2. **Goal** (Gate A — what the user is actually trying to accomplish, what "done" looks like for them)
|
|
366
|
-
3. **Current state** (Gate B — end-to-end flow today with scip-query citations, plus the non-obvious invariants the current code already handles)
|
|
367
|
-
4. **Reuse audit** (Gate C — for each new symbol proposed, the reuse target or the justification for writing new, with the queries that were run)
|
|
368
|
-
5. Design phases (numbered checklists with Source fields)
|
|
369
|
-
6. Stress-test findings (inline with the relevant phase or as addenda)
|
|
370
|
-
7. Execution order (dependency graph between phases)
|
|
371
|
-
8. Ship order (recommended deployment sequence, one-way doors flagged)
|
|
372
|
-
9. Summary (files modified/created/deleted, net code delta)
|