scip-query 0.19.5 → 0.19.8
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 +85 -1
- package/README.md +259 -53
- package/dist/augment-vue-worker.js +1 -1
- package/dist/chunk-2465DLHK.js +3 -0
- package/dist/{chunk-7GXM52MI.js → chunk-24GTWJ3N.js} +2 -2
- package/dist/{chunk-NH5ALKPW.js → chunk-2SNGN6U4.js} +2 -2
- package/dist/{chunk-3SVWW4PN.js → chunk-2U3OLUNJ.js} +2 -2
- package/dist/{chunk-XLTP42QA.js → chunk-33KUO7CG.js} +2 -2
- package/dist/{chunk-54HA4ZXH.js → chunk-33XTHFKR.js} +2 -2
- package/dist/{chunk-ZGZUZ7XE.js → chunk-3EDFLQ6A.js} +2 -2
- package/dist/chunk-3ZSJ3PWF.js +16 -0
- package/dist/{chunk-F6O7AAC3.js → chunk-43KC6EQZ.js} +2 -2
- package/dist/{chunk-I5RJM53C.js → chunk-464PLI5O.js} +2 -2
- package/dist/chunk-46XGSFNI.js +2 -0
- package/dist/{chunk-M7AIS73L.js → chunk-47BU5Z4T.js} +2 -2
- package/dist/chunk-4BV4QAZJ.js +5 -0
- package/dist/chunk-4YTUWQ6M.js +18 -0
- package/dist/{chunk-RV2FQIX3.js → chunk-5ML2BNRH.js} +2 -2
- package/dist/{chunk-6NSFJYRC.js → chunk-5YLUDDAF.js} +2 -2
- package/dist/chunk-67QRR5YC.js +6 -0
- package/dist/{chunk-GPBBJ5Y4.js → chunk-6GXYN7YA.js} +3 -3
- package/dist/{chunk-4333ETTV.js → chunk-6M7RONVB.js} +2 -2
- package/dist/chunk-6YTSKJJ3.js +2 -0
- package/dist/{chunk-QDV6RDCP.js → chunk-7FT5Y65S.js} +2 -2
- package/dist/{chunk-XTX6QHOF.js → chunk-7KYNAMMH.js} +2 -2
- package/dist/{chunk-DZ74OMG6.js → chunk-7LSVMFX7.js} +2 -2
- package/dist/{chunk-VTKGCT3V.js → chunk-7QHY3H7P.js} +2 -2
- package/dist/{chunk-MITTUCEH.js → chunk-7RAG65VK.js} +2 -2
- package/dist/{chunk-25LPM4DG.js → chunk-7SWJEWJF.js} +2 -2
- package/dist/{chunk-52ZYCAEO.js → chunk-7VCOXZH3.js} +2 -2
- package/dist/chunk-A2TNXAXO.js +8 -0
- package/dist/{chunk-IUFDSKGG.js → chunk-A3QXWFBK.js} +2 -2
- package/dist/{chunk-4T3LTWUS.js → chunk-AA4UWRNL.js} +2 -2
- package/dist/{chunk-4SALD7RU.js → chunk-ACAM6O5R.js} +2 -2
- package/dist/chunk-APMMR5Y2.js +2 -0
- package/dist/chunk-AQOFWNQJ.js +1 -0
- package/dist/chunk-AZFUMCQB.js +2 -0
- package/dist/{chunk-M7MTH5NR.js → chunk-BDOIKGDI.js} +2 -2
- package/dist/{chunk-BTEE5NZQ.js → chunk-BNXICU42.js} +2 -2
- package/dist/chunk-C5Q44Q5D.js +3 -0
- package/dist/{chunk-EOOJGLDU.js → chunk-CTF2GDEX.js} +2 -2
- package/dist/chunk-DHEQMPLW.js +2 -0
- package/dist/{chunk-IZKFSVBV.js → chunk-DQBCO2UY.js} +2 -2
- package/dist/{chunk-7B3UPBVA.js → chunk-DQGSM7RZ.js} +2 -2
- package/dist/chunk-E2LAW7SL.js +30 -0
- package/dist/chunk-E3HYEQO7.js +2 -0
- package/dist/chunk-E4NFOAD4.js +6 -0
- package/dist/chunk-E5HNT4X2.js +3 -0
- package/dist/{chunk-J77UIT3I.js → chunk-ELLMY7XJ.js} +2 -2
- package/dist/chunk-FD3HFKXR.js +5 -0
- package/dist/{chunk-SOAT6NLA.js → chunk-FIJCV235.js} +2 -2
- package/dist/{chunk-H7UKLTWJ.js → chunk-FJ5UDTQF.js} +2 -2
- package/dist/{chunk-HEXVUYFQ.js → chunk-GHKEJTCE.js} +2 -2
- package/dist/{chunk-LBMJEAEW.js → chunk-GLZTVKAB.js} +3 -3
- package/dist/{chunk-FWUUZTIO.js → chunk-GNC4JVAN.js} +2 -2
- package/dist/chunk-HIB452NU.js +949 -0
- package/dist/{chunk-NRCXJDHL.js → chunk-HZYDQPNY.js} +2 -2
- package/dist/chunk-IF6FP6B2.js +66 -0
- package/dist/{chunk-4RSI5EMG.js → chunk-JAY7YWS3.js} +2 -2
- package/dist/{chunk-STOL2BTL.js → chunk-JHF3E4YM.js} +2 -2
- package/dist/chunk-JORHF5AL.js +108 -0
- package/dist/{chunk-A2EZV2UM.js → chunk-K2WO7XY7.js} +2 -2
- package/dist/chunk-KFZNKUNT.js +2 -0
- package/dist/{chunk-YVVCVR2L.js → chunk-KJ2IIBZN.js} +2 -2
- package/dist/{chunk-QGXBRIM5.js → chunk-KKME5ZAI.js} +2 -2
- package/dist/chunk-KSGTULOS.js +9 -0
- package/dist/{chunk-UOAV44HR.js → chunk-KXDJAG4N.js} +3 -3
- package/dist/{chunk-UKZBVX4U.js → chunk-L4S2A7BV.js} +2 -2
- package/dist/chunk-LP3ARJKF.js +8 -0
- package/dist/chunk-LSOR3LQG.js +3 -0
- package/dist/{chunk-Q4IIEGXJ.js → chunk-MLFZP76A.js} +2 -2
- package/dist/{chunk-WQTAC523.js → chunk-MNSTUIDD.js} +2 -2
- package/dist/{chunk-VXQNNXJE.js → chunk-MSBDMFER.js} +2 -2
- package/dist/{chunk-X6D5IC6I.js → chunk-MZZBAITE.js} +5 -5
- package/dist/{chunk-I5AWSI2G.js → chunk-NE3TZUCI.js} +2 -2
- package/dist/{chunk-6E7UTQY7.js → chunk-NTUMF2X3.js} +2 -2
- package/dist/{chunk-S44IULR6.js → chunk-O23I56NA.js} +2 -2
- package/dist/{chunk-CFMXJPHH.js → chunk-O3O4XXO6.js} +2 -2
- package/dist/{chunk-IG7N5ZIK.js → chunk-OUBAF226.js} +2 -2
- package/dist/chunk-P3UO3EH3.js +2 -0
- package/dist/{chunk-YNRNA5LK.js → chunk-QGGLL3UH.js} +2 -2
- package/dist/chunk-QIQ63BHW.js +16 -0
- package/dist/{chunk-VGRICIQI.js → chunk-QJIVBYEK.js} +2 -2
- package/dist/chunk-QOXBSI6G.js +20 -0
- package/dist/chunk-QXK6UUSM.js +2 -0
- package/dist/{chunk-XYADIZHU.js → chunk-RA3AYNWP.js} +2 -2
- package/dist/chunk-RJMDJR3A.js +2 -0
- package/dist/{chunk-NSS46APD.js → chunk-RLH5VUMG.js} +2 -2
- package/dist/{chunk-GBQ5NYPR.js → chunk-S4S2WOIX.js} +6 -6
- package/dist/{chunk-YIJ7ZAA4.js → chunk-SERUIGV5.js} +2 -2
- package/dist/{chunk-FECYOO5O.js → chunk-SMQWE25B.js} +2 -2
- package/dist/{chunk-R4FQGQ4X.js → chunk-TAVELHYR.js} +2 -2
- package/dist/{chunk-U6WNH5GC.js → chunk-TWMJ3Y3G.js} +2 -2
- package/dist/chunk-VAXNI5NE.js +146 -0
- package/dist/chunk-VVY2G5ET.js +2 -0
- package/dist/{chunk-WER3B7MI.js → chunk-W3DBTGL4.js} +2 -2
- package/dist/{chunk-CNKAGUPL.js → chunk-WANA4KAQ.js} +2 -2
- package/dist/chunk-WJL2L6MV.js +60 -0
- package/dist/chunk-WUW7YUAH.js +11 -0
- package/dist/{chunk-QVWS2VWZ.js → chunk-WWKWUPSU.js} +2 -2
- package/dist/{chunk-ABMYA4TN.js → chunk-WY45BHKQ.js} +2 -2
- package/dist/chunk-X4FR5BZF.js +9 -0
- package/dist/chunk-X6RKPDY7.js +2 -0
- package/dist/{chunk-ZXJYMGD3.js → chunk-YLFORA5G.js} +2 -2
- package/dist/{chunk-KP6XRY5Z.js → chunk-YTVWB7YJ.js} +2 -2
- package/dist/{chunk-4XTA5OMB.js → chunk-ZCEJ63SP.js} +2 -2
- package/dist/{chunk-HKEHS2AS.js → chunk-ZJ5CBXK3.js} +2 -2
- package/dist/chunk-ZL2OGDCD.js +2 -0
- package/dist/cli.js +8 -3
- package/dist/command-descriptors-ZW5J4ZEM.js +631 -0
- package/dist/{config-types-D20KuvvZ.d.ts → config-types-B6MEoRNy.d.ts} +8 -0
- package/dist/{db-G_II8yXU.d.ts → db-DYLKr9Wn.d.ts} +18 -1
- package/dist/direct-navigation-42YHQPOI.js +3 -0
- package/dist/{health-oblXYgkF.d.ts → health-DgxIDXJC.d.ts} +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/dist/postinstall.js +1 -1
- package/dist/queries/affected.d.ts +2 -2
- package/dist/queries/affected.js +1 -1
- package/dist/queries/architecture.d.ts +2 -2
- package/dist/queries/architecture.js +1 -1
- package/dist/queries/bottlenecks.d.ts +2 -2
- package/dist/queries/bottlenecks.js +1 -1
- package/dist/queries/by-kind.d.ts +2 -2
- package/dist/queries/by-kind.js +1 -1
- package/dist/queries/call-graph.d.ts +2 -2
- package/dist/queries/call-graph.js +1 -1
- package/dist/queries/change-surface.d.ts +2 -2
- package/dist/queries/change-surface.js +1 -1
- package/dist/queries/cleanup-plan.d.ts +2 -2
- package/dist/queries/cleanup-plan.js +1 -1
- package/dist/queries/co-change.d.ts +2 -2
- package/dist/queries/co-change.js +1 -1
- package/dist/queries/code.d.ts +2 -2
- package/dist/queries/code.js +1 -1
- package/dist/queries/complexity-hotspots.d.ts +2 -2
- package/dist/queries/complexity-hotspots.js +1 -1
- package/dist/queries/complexity.d.ts +2 -2
- package/dist/queries/complexity.js +1 -1
- package/dist/queries/convergence.d.ts +2 -2
- package/dist/queries/convergence.js +1 -1
- package/dist/queries/coupling.d.ts +2 -2
- package/dist/queries/coupling.js +1 -1
- package/dist/queries/cycles.d.ts +2 -2
- package/dist/queries/cycles.js +1 -1
- package/dist/queries/dataflow.d.ts +2 -2
- package/dist/queries/dataflow.js +1 -1
- package/dist/queries/dead.d.ts +2 -2
- package/dist/queries/dead.js +1 -1
- package/dist/queries/decorative-checkers.d.ts +3 -3
- package/dist/queries/decorative-checkers.js +1 -1
- package/dist/queries/deep-chains.d.ts +2 -2
- package/dist/queries/deep-chains.js +1 -1
- package/dist/queries/deps.d.ts +2 -2
- package/dist/queries/deps.js +1 -1
- package/dist/queries/diff-gate.d.ts +30 -2
- package/dist/queries/diff-gate.js +1 -1
- package/dist/queries/diff-impact.d.ts +2 -2
- package/dist/queries/diff-impact.js +1 -1
- package/dist/queries/doc-drift.d.ts +2 -2
- package/dist/queries/doc-drift.js +1 -1
- package/dist/queries/drift.d.ts +2 -2
- package/dist/queries/drift.js +1 -1
- package/dist/queries/duplicate-bodies.d.ts +2 -2
- package/dist/queries/duplicate-bodies.js +1 -1
- package/dist/queries/extract-candidates.d.ts +2 -2
- package/dist/queries/extract-candidates.js +1 -1
- package/dist/queries/fan.d.ts +2 -2
- package/dist/queries/fan.js +1 -1
- package/dist/queries/files.d.ts +2 -2
- package/dist/queries/health.d.ts +3 -3
- package/dist/queries/health.js +1 -1
- package/dist/queries/hierarchy.d.ts +2 -2
- package/dist/queries/hierarchy.js +1 -1
- package/dist/queries/hotspots.d.ts +2 -2
- package/dist/queries/hotspots.js +1 -1
- package/dist/queries/imports.d.ts +2 -2
- package/dist/queries/imports.js +1 -1
- package/dist/queries/incomplete-migration.d.ts +2 -2
- package/dist/queries/incomplete-migration.js +1 -1
- package/dist/queries/index.d.ts +17 -3
- package/dist/queries/index.js +1 -1
- package/dist/queries/isolated.d.ts +2 -2
- package/dist/queries/isolated.js +1 -1
- package/dist/queries/locality-candidates.d.ts +2 -2
- package/dist/queries/locality-candidates.js +1 -1
- package/dist/queries/members.d.ts +2 -2
- package/dist/queries/members.js +1 -1
- package/dist/queries/methods.d.ts +2 -2
- package/dist/queries/methods.js +1 -1
- package/dist/queries/not-implemented.d.ts +3 -3
- package/dist/queries/not-implemented.js +1 -1
- package/dist/queries/outline.d.ts +2 -2
- package/dist/queries/outline.js +1 -1
- package/dist/queries/passthrough-candidates.d.ts +2 -2
- package/dist/queries/passthrough-candidates.js +1 -1
- package/dist/queries/plan-context.d.ts +2 -2
- package/dist/queries/plan-context.js +1 -1
- package/dist/queries/react-component-duplicates.d.ts +2 -2
- package/dist/queries/react-component-duplicates.js +1 -1
- package/dist/queries/react-hook-candidates.d.ts +2 -2
- package/dist/queries/react-hook-candidates.js +1 -1
- package/dist/queries/react-large-component-pressure.d.ts +2 -2
- package/dist/queries/react-large-component-pressure.js +1 -1
- package/dist/queries/recent-duplicates.d.ts +2 -2
- package/dist/queries/recent-duplicates.js +1 -1
- package/dist/queries/redundant-reexports.d.ts +2 -2
- package/dist/queries/redundant-reexports.js +1 -1
- package/dist/queries/refs.d.ts +2 -2
- package/dist/queries/refs.js +1 -1
- package/dist/queries/self-audit.d.ts +2 -2
- package/dist/queries/self-audit.js +1 -1
- package/dist/queries/similar-chains.d.ts +2 -2
- package/dist/queries/similar-chains.js +1 -1
- package/dist/queries/similar-files.d.ts +2 -2
- package/dist/queries/similar-files.js +1 -1
- package/dist/queries/similar-signatures.d.ts +2 -2
- package/dist/queries/similar-signatures.js +1 -1
- package/dist/queries/similar.d.ts +2 -2
- package/dist/queries/similar.js +1 -1
- package/dist/queries/slice.d.ts +2 -2
- package/dist/queries/slice.js +1 -1
- package/dist/queries/stale-abstractions.d.ts +2 -2
- package/dist/queries/stale-abstractions.js +1 -1
- package/dist/queries/stats.d.ts +2 -2
- package/dist/queries/stats.js +1 -1
- package/dist/queries/surface.d.ts +2 -2
- package/dist/queries/surface.js +1 -1
- package/dist/queries/symbols.d.ts +2 -2
- package/dist/queries/symbols.js +1 -1
- package/dist/queries/system.d.ts +2 -2
- package/dist/queries/system.js +1 -1
- package/dist/queries/test-quality.d.ts +2 -2
- package/dist/queries/test-quality.js +1 -1
- package/dist/queries/trace.d.ts +2 -2
- package/dist/queries/trace.js +1 -1
- package/dist/queries/twin-ab.d.ts +3 -3
- package/dist/queries/twin-ab.js +1 -1
- package/dist/queries/twin-drift.d.ts +2 -2
- package/dist/queries/twin-drift.js +1 -1
- package/dist/queries/unused-imports.d.ts +2 -2
- package/dist/queries/unused-imports.js +1 -1
- package/dist/queries/unused-params.d.ts +2 -2
- package/dist/queries/unused-params.js +1 -1
- package/dist/queries/vue-component-duplicates.d.ts +2 -2
- package/dist/queries/vue-component-duplicates.js +1 -1
- package/dist/queries/vue-composable-candidates.d.ts +2 -2
- package/dist/queries/vue-composable-candidates.js +1 -1
- package/dist/queries/vue-large-view-pressure.d.ts +2 -2
- package/dist/queries/vue-large-view-pressure.js +1 -1
- package/dist/queries/wrapper-candidates.d.ts +2 -2
- package/dist/queries/wrapper-candidates.js +1 -1
- package/dist/reindex-worker.js +26 -26
- package/dist/reindex.d.ts +14 -4
- package/dist/reindex.js +34 -38
- package/dist/runtime.d.ts +167 -18
- package/dist/runtime.js +3 -2
- package/dist/rust-semantic-session-server.js +1 -1
- package/dist/rust-semantic-session-worker.js +1 -1
- package/dist/rust-semantic-worker.js +1 -1
- package/dist/{scip-cli-kRpaexVJ.d.ts → scip-cli-Cc6c00-a.d.ts} +6 -2
- package/dist/watch-server.js +5 -5
- package/docs/AGENT_GUIDE.md +20 -4
- package/docs/AI_FAILURE_MODES.md +17 -17
- package/docs/API_EVOLUTION.md +71 -0
- package/docs/CLI_JSON_OUTPUT.md +168 -0
- package/docs/COMMAND_REFERENCE.md +10 -6
- package/docs/COMMITTED_RECORD_COMPATIBILITY.md +117 -0
- package/docs/CONFIGURATION_WRITE_SAFETY.md +130 -0
- package/docs/DETECTOR_GUIDE.md +46 -46
- package/docs/DURABILITY.md +103 -0
- package/docs/INDEX_GENERATIONS.md +121 -0
- package/docs/LOCK_PROTOCOL.md +133 -0
- package/docs/MAILBOX_LIFECYCLE.md +197 -0
- package/docs/REINDEX_METADATA_COMPATIBILITY.md +84 -0
- package/docs/RUST_DURABLE_SESSION_PROTOCOL.md +126 -0
- package/docs/SECURITY_MODEL.md +129 -0
- package/docs/TELEMETRY_RETENTION.md +77 -0
- package/docs/TIME_SEMANTICS.md +77 -0
- package/docs/WATCH_REFRESH_REQUESTS.md +110 -0
- package/docs/WINDOWS_SIDECAR_RELEASE.md +298 -0
- package/docs/analyzer-validation-ledger.md +24 -23
- package/docs/schemas/cli-json-envelope.schema.json +53 -0
- package/docs/schemas/cli-output-page.schema.json +104 -0
- package/docs/schemas/npm-release-state.schema.json +146 -0
- package/docs/schemas/outcome-event-record.schema.json +39 -0
- package/docs/schemas/project-config.schema.json +247 -0
- package/docs/schemas/suppression-record.schema.json +31 -0
- package/docs/schemas/windows-sidecar-provenance.schema.json +137 -0
- package/package.json +21 -10
- package/scripts/build-scip-windows.mjs +180 -61
- package/scripts/scip-windows-provenance.mjs +364 -0
- package/scripts/verify-scip-windows.mjs +29 -0
- package/skills/_shared/SKILL.md +90 -229
- package/skills/_shared/agents/openai.yaml +1 -1
- package/skills/_shared/references/agent-contract-catalog.md +105 -0
- package/skills/_shared/references/command-catalog.md +118 -0
- package/skills/_shared/references/detector-precision-and-diffgate.md +59 -0
- package/skills/_shared/references/evidence-and-dead-code.md +25 -0
- package/skills/scip-audit/SKILL.md +77 -0
- package/skills/scip-audit/agents/openai.yaml +4 -0
- package/skills/scip-audit/references/claims.md +98 -0
- package/skills/scip-audit/references/cleanup.md +101 -0
- package/skills/scip-audit/references/directory.md +222 -0
- package/skills/scip-audit/references/frontend.md +130 -0
- package/skills/scip-audit/references/integrity.md +154 -0
- package/skills/scip-audit/references/maintainability.md +162 -0
- package/skills/scip-audit/references/twin-drift.md +104 -0
- package/skills/scip-diagnose/SKILL.md +52 -0
- package/skills/scip-diagnose/agents/openai.yaml +4 -0
- package/skills/scip-diagnose/references/debug.md +117 -0
- package/skills/{scip-probe-reachability/SKILL.md → scip-diagnose/references/probe-reachability.md} +11 -27
- package/skills/scip-diagnose/references/root-cause.md +145 -0
- package/skills/scip-diagnose/references/triage.md +119 -0
- package/skills/scip-explore/SKILL.md +54 -85
- package/skills/scip-explore/agents/openai.yaml +2 -2
- package/skills/scip-explore/references/diagrams.md +40 -0
- package/skills/scip-explore/references/language-playbook.md +49 -0
- package/skills/scip-improve/SKILL.md +56 -0
- package/skills/scip-improve/agents/openai.yaml +4 -0
- package/skills/scip-improve/references/cleanup-batches.md +53 -0
- package/skills/scip-improve/references/directory-moves.md +53 -0
- package/skills/scip-improve/references/doc-reconcile.md +30 -0
- package/skills/scip-improve/references/frontend-extraction.md +39 -0
- package/skills/scip-improve/references/maintainability-mechanism.md +43 -0
- package/skills/scip-improve/references/twin-drift.md +35 -0
- package/skills/scip-plan/SKILL.md +68 -0
- package/skills/scip-plan/agents/openai.yaml +4 -0
- package/skills/scip-plan/references/api-impact.md +19 -0
- package/skills/scip-plan/references/conductor.md +41 -0
- package/skills/scip-plan/references/high-assurance.md +43 -0
- package/skills/scip-plan/references/hyper-optimization.md +50 -0
- package/skills/scip-plan/references/tla-model.md +88 -0
- package/skills/scip-query/SKILL.md +53 -98
- package/skills/scip-query/agents/openai.yaml +2 -2
- package/skills/scip-setup/SKILL.md +69 -181
- package/skills/scip-setup/agents/openai.yaml +3 -3
- package/skills/scip-setup/references/bootstrap-workflow.md +120 -0
- package/skills/scip-setup/references/language-verification.md +61 -0
- package/skills/scip-setup/references/lifecycle-commands.md +119 -0
- package/skills/scip-setup/references/per-repo-triage.md +24 -0
- package/skills/scip-verify/SKILL.md +126 -84
- package/skills/scip-verify/agents/openai.yaml +2 -2
- package/skills/scip-verify/references/calibrate-detectors.md +170 -0
- package/dist/chunk-2CTX5CMX.js +0 -4
- package/dist/chunk-2Y373BDD.js +0 -2
- package/dist/chunk-2YU7I3QO.js +0 -2
- package/dist/chunk-3MJ5YA4Y.js +0 -16
- package/dist/chunk-64RFXJT5.js +0 -16
- package/dist/chunk-7UY7SD7D.js +0 -927
- package/dist/chunk-B5NLK2B3.js +0 -6
- package/dist/chunk-C2QSK7E7.js +0 -2
- package/dist/chunk-C7NIYIQ4.js +0 -67
- package/dist/chunk-D4U5Q3FT.js +0 -7
- package/dist/chunk-DGAGY7RJ.js +0 -60
- package/dist/chunk-DLWR3NUU.js +0 -5
- package/dist/chunk-K2ERX4UT.js +0 -3
- package/dist/chunk-KHE7J5ZN.js +0 -3
- package/dist/chunk-L7SPDE73.js +0 -84
- package/dist/chunk-LHMNRHGV.js +0 -3
- package/dist/chunk-LM72NQ7T.js +0 -3
- package/dist/chunk-MSWVMDAH.js +0 -122
- package/dist/chunk-NH7WNNQC.js +0 -20
- package/dist/chunk-NPKYOIFM.js +0 -18
- package/dist/chunk-NZL2DBT7.js +0 -2
- package/dist/chunk-OMPZHGHO.js +0 -2
- package/dist/chunk-P2PC2WGR.js +0 -2
- package/dist/chunk-Q3AFUTGB.js +0 -8
- package/dist/chunk-QRGV2F7L.js +0 -2
- package/dist/chunk-TW4OG5FC.js +0 -4
- package/dist/chunk-U7DSEKOM.js +0 -30
- package/dist/chunk-V27BEQJN.js +0 -7
- package/dist/chunk-XAGAZSFE.js +0 -6
- package/dist/chunk-XBN5VO53.js +0 -2
- package/dist/chunk-YGAGTIDK.js +0 -11
- package/dist/command-descriptors-N2TL4XM2.js +0 -613
- package/dist/direct-navigation-DUCZCTOE.js +0 -3
- package/skills/scip-api-impact/SKILL.md +0 -140
- package/skills/scip-api-impact/agents/openai.yaml +0 -4
- package/skills/scip-calibrate/SKILL.md +0 -131
- package/skills/scip-calibrate/agents/openai.yaml +0 -4
- package/skills/scip-claim-audit/SKILL.md +0 -107
- package/skills/scip-claim-audit/agents/openai.yaml +0 -4
- package/skills/scip-cleanup-audit/SKILL.md +0 -130
- package/skills/scip-cleanup-audit/agents/openai.yaml +0 -4
- package/skills/scip-cleanup-improve/SKILL.md +0 -85
- package/skills/scip-cleanup-improve/agents/openai.yaml +0 -4
- package/skills/scip-concrete-plan/HIGH_ASSURANCE.md +0 -317
- package/skills/scip-concrete-plan/SKILL.md +0 -105
- package/skills/scip-concrete-plan/agents/openai.yaml +0 -4
- package/skills/scip-conductor/SKILL.md +0 -133
- package/skills/scip-conductor/agents/openai.yaml +0 -4
- package/skills/scip-debug/SKILL.md +0 -130
- package/skills/scip-debug/agents/openai.yaml +0 -4
- package/skills/scip-diagram/SKILL.md +0 -110
- package/skills/scip-diagram/agents/openai.yaml +0 -4
- package/skills/scip-directory-architecture/SKILL.md +0 -266
- package/skills/scip-directory-architecture/agents/openai.yaml +0 -4
- package/skills/scip-doc-reconcile/SKILL.md +0 -89
- package/skills/scip-doc-reconcile/agents/openai.yaml +0 -4
- package/skills/scip-hyper-optimization/SKILL.md +0 -156
- package/skills/scip-hyper-optimization/agents/openai.yaml +0 -4
- package/skills/scip-integrity-audit/SKILL.md +0 -152
- package/skills/scip-integrity-audit/agents/openai.yaml +0 -4
- package/skills/scip-language-playbook/SKILL.md +0 -106
- package/skills/scip-language-playbook/agents/openai.yaml +0 -4
- package/skills/scip-maintainability/SKILL.md +0 -158
- package/skills/scip-maintainability/agents/openai.yaml +0 -4
- package/skills/scip-probe-reachability/agents/openai.yaml +0 -4
- package/skills/scip-react-maintainability/SKILL.md +0 -101
- package/skills/scip-react-maintainability/agents/openai.yaml +0 -4
- package/skills/scip-root-cause/SKILL.md +0 -151
- package/skills/scip-root-cause/agents/openai.yaml +0 -4
- package/skills/scip-tla-model-system/SKILL.md +0 -148
- package/skills/scip-tla-model-system/agents/openai.yaml +0 -4
- package/skills/scip-triage-issue/SKILL.md +0 -133
- package/skills/scip-triage-issue/agents/openai.yaml +0 -4
- package/skills/scip-twin-drift/SKILL.md +0 -109
- package/skills/scip-twin-drift/agents/openai.yaml +0 -4
- package/skills/scip-vue-maintainability/SKILL.md +0 -107
- package/skills/scip-vue-maintainability/agents/openai.yaml +0 -4
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
# Configuration and setup write safety
|
|
2
|
+
|
|
3
|
+
scip-query updates files that people and other agents may edit at the same
|
|
4
|
+
time: `.scipquery.json`, provider hook JSON, `.git/info/exclude`,
|
|
5
|
+
`AGENTS.md`, `CLAUDE.md`, structured suppression records, and an owned
|
|
6
|
+
pre-commit hook. A conflict-aware writer is a file updater that transforms one
|
|
7
|
+
identified revision and refuses to claim success if an independent revision
|
|
8
|
+
wins before commit. Its defining behavior is preservation: it either applies
|
|
9
|
+
its narrow change to the newest valid input or leaves the newest input
|
|
10
|
+
untouched and reports why.
|
|
11
|
+
|
|
12
|
+
## Revision and commit protocol
|
|
13
|
+
|
|
14
|
+
Every participating writer:
|
|
15
|
+
|
|
16
|
+
1. acquires a short, token-owned process lock beside the target;
|
|
17
|
+
2. reads a stable snapshot and records its SHA-256 hash plus file identity;
|
|
18
|
+
3. computes only the domain change it owns;
|
|
19
|
+
4. rereads the target immediately before commit;
|
|
20
|
+
5. retries the merge when the revision changed and retry is safe, or reports a
|
|
21
|
+
conflict when it is not;
|
|
22
|
+
6. stages and flushes complete bytes, atomically publishes them, and flushes
|
|
23
|
+
the parent directory where the platform exposes that operation.
|
|
24
|
+
|
|
25
|
+
The lock serializes scip-query processes. Editors do not need to participate:
|
|
26
|
+
their byte or identity change is detected by the optimistic revision check.
|
|
27
|
+
The lock record is token-owned and carries process identity, so a live owner
|
|
28
|
+
cannot be displaced and a dead owner can be reclaimed by the shared process
|
|
29
|
+
lock protocol.
|
|
30
|
+
|
|
31
|
+
First creation uses a flushed staging inode plus an exclusive public hard
|
|
32
|
+
link. This is stronger than `exists` followed by replacement: only one creator
|
|
33
|
+
can publish, and a reader sees no public file until every byte is present.
|
|
34
|
+
|
|
35
|
+
## JSON merge rules
|
|
36
|
+
|
|
37
|
+
Project setup rereads the latest valid object and changes only the requested
|
|
38
|
+
field. Unknown current and future fields survive. A three-way check compares
|
|
39
|
+
the caller's observed value, the latest value, and the requested value:
|
|
40
|
+
|
|
41
|
+
- an unrelated latest edit is preserved and the owned field is updated;
|
|
42
|
+
- the requested value already present is idempotent;
|
|
43
|
+
- a different latest value for the same field is an explicit stale-field
|
|
44
|
+
conflict.
|
|
45
|
+
|
|
46
|
+
Hook setup rereads the latest valid provider object on every bounded retry,
|
|
47
|
+
removes only scip-query-owned hook entries, and merges the current owned hook
|
|
48
|
+
groups. Unknown top-level fields and non-scip hook entries survive installation
|
|
49
|
+
and removal.
|
|
50
|
+
|
|
51
|
+
Malformed latest JSON is never repaired by replacement because doing so could
|
|
52
|
+
erase information the writer cannot classify. The command reports the parse
|
|
53
|
+
failure and leaves the exact bytes in place.
|
|
54
|
+
|
|
55
|
+
### Project-config format boundary
|
|
56
|
+
|
|
57
|
+
The project configuration is a durable policy record whose `schemaVersion`
|
|
58
|
+
determines the meaning of its other fields. Current writers publish version 2
|
|
59
|
+
and include a `$schema` URI reference to
|
|
60
|
+
`docs/schemas/project-config.schema.json` in the installed package.
|
|
61
|
+
Unversioned files and explicit `schemaVersion: 1` files have the same readable
|
|
62
|
+
legacy meaning. They are migrated in memory and written as version 2 only when
|
|
63
|
+
`init` creates a file or a setup action enters an authorized mutation path.
|
|
64
|
+
|
|
65
|
+
The schema migration is part of the no-op decision. If the requested field is
|
|
66
|
+
already correct but the durable record is legacy or lacks its editor-schema
|
|
67
|
+
hint, the writer still publishes a current record and reports `changed: true`.
|
|
68
|
+
Unknown root and nested fields survive because migration begins from the
|
|
69
|
+
latest complete object and removes only the owned legacy discriminator.
|
|
70
|
+
|
|
71
|
+
A non-integer discriminator, non-object top level, invalid `$schema` hint, or
|
|
72
|
+
unsupported older/future version fails before options are exposed to runtime
|
|
73
|
+
consumers. The loader names the supported legacy/current versions. A setup
|
|
74
|
+
writer applies the same decoder to its latest stable snapshot and leaves
|
|
75
|
+
rejected bytes byte-for-byte unchanged, so upgrading the CLI—not a blind
|
|
76
|
+
rewrite—is the recovery path for a future version.
|
|
77
|
+
|
|
78
|
+
## Suppression policy rules
|
|
79
|
+
|
|
80
|
+
A suppression identity is the stable finding ID, or the deterministic hash of
|
|
81
|
+
a check-and-file target when no finding ID exists. It is a policy conflict
|
|
82
|
+
domain: decisions for different identities occupy different files, while two
|
|
83
|
+
decisions for the same identity must be reconciled.
|
|
84
|
+
|
|
85
|
+
The first decision uses exclusive durable creation. An identical replay
|
|
86
|
+
returns the existing revision without rewriting metadata. A different reason,
|
|
87
|
+
expiry, check, or file requires `--replace <revision>`, where the revision is
|
|
88
|
+
the full SHA-256 hash reported when the existing decision was rejected or
|
|
89
|
+
created. Replacement succeeds only if those exact reviewed bytes still occupy
|
|
90
|
+
the path. A stale token, a malformed record, an unsupported future schema, or
|
|
91
|
+
an edit at the commit boundary leaves the latest bytes untouched.
|
|
92
|
+
|
|
93
|
+
New records use suppression schema version 1 and include the
|
|
94
|
+
`scip-query-suppression` discriminator, their stable identity, and the
|
|
95
|
+
`scip-query` writer version. Unversioned legacy records and v1 records written
|
|
96
|
+
before the discriminator was added remain readable. They remain byte-for-byte
|
|
97
|
+
unchanged on an idempotent replay and are upgraded only by an explicit
|
|
98
|
+
compare-and-replace policy change. Incompatible files are counted and reported
|
|
99
|
+
by `diff-gate`; they never authorize a suppression. See
|
|
100
|
+
[`COMMITTED_RECORD_COMPATIBILITY.md`](COMMITTED_RECORD_COMPATIBILITY.md).
|
|
101
|
+
|
|
102
|
+
## Managed text rules
|
|
103
|
+
|
|
104
|
+
Agent guidance changes only the text between the exact
|
|
105
|
+
`scip-query:agent-setup` markers. Text before and after the block is preserved.
|
|
106
|
+
Missing markers permit first installation, but incomplete, duplicated, or
|
|
107
|
+
reordered markers are a conflict because the intended ownership boundary is
|
|
108
|
+
ambiguous.
|
|
109
|
+
|
|
110
|
+
Managed Markdown and owned pre-commit operations use a strict final revision
|
|
111
|
+
check rather than silently recomputing across an intervening edit. The command
|
|
112
|
+
reports the expected and latest revision hashes and does not write.
|
|
113
|
+
`.git/info/exclude` can safely retry because its exact owned marker block is
|
|
114
|
+
recomputed from the newest text.
|
|
115
|
+
|
|
116
|
+
## Recovery
|
|
117
|
+
|
|
118
|
+
When a command reports a conflict:
|
|
119
|
+
|
|
120
|
+
1. open the named file and preserve the latest independent edit;
|
|
121
|
+
2. repair malformed JSON or marker structure deliberately, if reported;
|
|
122
|
+
3. for a suppression policy change, review the latest decision and rerun
|
|
123
|
+
`suppress` with the reported `--replace <revision>`;
|
|
124
|
+
4. for setup/configuration, rerun the command so it reads the new revision.
|
|
125
|
+
|
|
126
|
+
Do not delete a live `.scip-query-write.lock`. If its owner crashed, the next
|
|
127
|
+
writer reclaims it only after the shared lock protocol proves the recorded
|
|
128
|
+
process identity is no longer live. A crash before publication leaves the
|
|
129
|
+
previous target intact; a failed first publication leaves no partial public
|
|
130
|
+
file.
|
package/docs/DETECTOR_GUIDE.md
CHANGED
|
@@ -13,20 +13,20 @@ maps these to the agent behaviors that create the problems.)
|
|
|
13
13
|
Same disease — structure built for a future that never came — detected at
|
|
14
14
|
four different altitudes:
|
|
15
15
|
|
|
16
|
-
| Command
|
|
17
|
-
|
|
18
|
-
| `unused-params`
|
|
19
|
-
| `passthrough-candidates` | **function (fan-out view)** | Functions with exactly **one callee** and a small body — they just forward arguments to the real implementation.
|
|
20
|
-
| `wrapper-candidates`
|
|
21
|
-
| `stale-abstractions`
|
|
16
|
+
| Command | Altitude | What it measures | The fix |
|
|
17
|
+
| ------------------------ | --------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- |
|
|
18
|
+
| `unused-params` | **parameter** | Trailing parameters no body ever uses. TS/JS only, trailing-run only — removals that are type-safe by construction. `_`-prefixed and externally-published signatures are exempt. | Delete the parameters and their call-site arguments. |
|
|
19
|
+
| `passthrough-candidates` | **function (fan-out view)** | Functions with exactly **one callee** and a small body — they just forward arguments to the real implementation. | Inline it: call the target directly. |
|
|
20
|
+
| `wrapper-candidates` | **function (fan-in view)** | Symbols with exactly **one caller** — indirection that provides no reuse. Strongest when the sole caller is itself widely used. | Fold the body into the caller. |
|
|
21
|
+
| `stale-abstractions` | **type** | Classes, interfaces, and type aliases with 0–1 _real_ cross-file consumers (barrel re-exports don't count as consumers). Single-implementation interfaces, misplaced types. | De-abstract: replace the interface with the concrete thing, or move the type to its one consumer. |
|
|
22
22
|
|
|
23
23
|
How to keep them straight:
|
|
24
24
|
|
|
25
25
|
- `passthrough` looks **down** (what does this function call? one thing) —
|
|
26
26
|
`wrapper` looks **up** (who calls this function? one caller). A function can
|
|
27
27
|
be both: a one-line forwarder with a single caller is the purest bloat.
|
|
28
|
-
- `unused-params` is
|
|
29
|
-
|
|
28
|
+
- `unused-params` is _inside_ a signature; the other three are _about whole
|
|
29
|
+
symbols_.
|
|
30
30
|
- `stale-abstractions` is the only one about **types**, not behavior. Note its
|
|
31
31
|
confidence ranking: a single-consumer `class` is usually deliberate
|
|
32
32
|
encapsulation (low), a single-consumer `interface` is worth questioning
|
|
@@ -35,17 +35,17 @@ How to keep them straight:
|
|
|
35
35
|
## Cluster 2 — "This already exists" (the similarity family)
|
|
36
36
|
|
|
37
37
|
All of these find duplication, but at different granularities and with
|
|
38
|
-
different evidence — and two of them add
|
|
39
|
-
|
|
40
|
-
| Command
|
|
41
|
-
|
|
42
|
-
| `similar <symbol>`
|
|
43
|
-
| `similar-signatures`
|
|
44
|
-
| `similar-files`
|
|
45
|
-
| `similar-chains`
|
|
46
|
-
| `recent-duplicates`
|
|
47
|
-
| `incomplete-migration` | function + **git diff**
|
|
48
|
-
| `convergence <a> <b>`
|
|
38
|
+
different evidence — and two of them add _direction_:
|
|
39
|
+
|
|
40
|
+
| Command | Granularity | Evidence | Question it answers |
|
|
41
|
+
| ---------------------- | ------------------------------------ | ---------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- |
|
|
42
|
+
| `similar <symbol>` | function | callee-fingerprint cosine (TF-IDF), source-token fallback | "What else does roughly what this function does?" |
|
|
43
|
+
| `similar-signatures` | function | normalized parameter + return types | "What has the same _shape_, regardless of body?" |
|
|
44
|
+
| `similar-files` | file | Jaccard on import/dependency profiles | "Which files are copy-paste variants of each other?" |
|
|
45
|
+
| `similar-chains` | pipeline | edit distance on infrastructure-filtered dependency chains | "Which end-to-end flows are parallel re-implementations?" |
|
|
46
|
+
| `recent-duplicates` | callable/frontend unit + **git age** | callable, React, and Vue similarity + file-add history | "Which side is the established original, which is the fresh echo?" (ECHO = new copies old; TWIN = both new) |
|
|
47
|
+
| `incomplete-migration` | function + **git diff** | callee _containment_ vs new-in-diff helpers | "I just extracted a helper — which call sites still have the logic inline and were never migrated?" |
|
|
48
|
+
| `convergence <a> <b>` | a known pair | shared/unique callees | "I already know these two overlap — give me the merge prescription." |
|
|
49
49
|
|
|
50
50
|
How to keep them straight:
|
|
51
51
|
|
|
@@ -56,13 +56,13 @@ How to keep them straight:
|
|
|
56
56
|
which copy to delete. Run it after agent sessions. It covers generic callables,
|
|
57
57
|
React component structure, React hook behavior, Vue template structure, and
|
|
58
58
|
Vue composable-like behavior.
|
|
59
|
-
- `incomplete-migration` is the **inverse of an echo**: the
|
|
60
|
-
canonical one (the helper you just extracted), and the
|
|
59
|
+
- `incomplete-migration` is the **inverse of an echo**: the _new_ code is the
|
|
60
|
+
canonical one (the helper you just extracted), and the _established_ code is
|
|
61
61
|
what should disappear. It also scores by containment, not symmetric
|
|
62
|
-
similarity, because an un-migrated site holds the helper's logic
|
|
62
|
+
similarity, because an un-migrated site holds the helper's logic _plus_ its
|
|
63
63
|
own — cosine under-scores exactly those.
|
|
64
64
|
- `extract-candidates` is the **before** picture: seams inside one big
|
|
65
|
-
function that
|
|
65
|
+
function that _should_ become a helper. `incomplete-migration` is the
|
|
66
66
|
**after** picture: you made the helper but didn't finish moving everyone
|
|
67
67
|
onto it.
|
|
68
68
|
|
|
@@ -71,11 +71,11 @@ How to keep them straight:
|
|
|
71
71
|
Three detectors share the word "drift" or the concept; they watch different
|
|
72
72
|
gaps:
|
|
73
73
|
|
|
74
|
-
| Command
|
|
75
|
-
|
|
76
|
-
| `drift`
|
|
77
|
-
| `doc-drift` | **docs** and the code they describe
|
|
78
|
-
| `co-change` | two **files** with an invisible contract
|
|
74
|
+
| Command | Watches the gap between | Evidence |
|
|
75
|
+
| ----------- | ------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- |
|
|
76
|
+
| `drift` | a file and its **siblings/declared architecture** | reference graph: unused imports, project-owned forbidden boundary edges, "no sibling imports this" deviations |
|
|
77
|
+
| `doc-drift` | **docs** and the code they describe | doc file-citations + doc↔code co-change history; flags broken references and staleness scores |
|
|
78
|
+
| `co-change` | two **files** with an invisible contract | git history: pairs that change together with no dependency edge |
|
|
79
79
|
|
|
80
80
|
How to keep them straight: `drift` is structural and intra-code, `doc-drift`
|
|
81
81
|
is prose-vs-code, `co-change` is code-vs-code where the connection exists only
|
|
@@ -103,11 +103,11 @@ Baseline identities use `detector:file:shortName`. File or symbol renames can le
|
|
|
103
103
|
|
|
104
104
|
## Cluster 4 — "Nothing uses this" (the deadness family)
|
|
105
105
|
|
|
106
|
-
| Command
|
|
107
|
-
|
|
108
|
-
| `dead`
|
|
109
|
-
| `isolated`
|
|
110
|
-
| `cleanup-plan` | the cascade | "If I delete the dead stuff, what
|
|
106
|
+
| Command | Scope | Question |
|
|
107
|
+
| -------------- | ----------- | --------------------------------------------------------------------------------------------------------------------- |
|
|
108
|
+
| `dead` | symbols | "What has zero consumers?" (evidence-ranked, entrypoint-aware) |
|
|
109
|
+
| `isolated` | callables | "What is fully disconnected — no callers _and_ no callees?" |
|
|
110
|
+
| `cleanup-plan` | the cascade | "If I delete the dead stuff, what _becomes_ dead next — and will my compiler vouch for the whole batch?" (`--verify`) |
|
|
111
111
|
|
|
112
112
|
`dead` finds candidates; `isolated` finds the most extreme subset;
|
|
113
113
|
`cleanup-plan --verify` turns candidates into a compiler-proven deletion plan.
|
|
@@ -118,21 +118,21 @@ Don't hand-delete from `dead` output when `cleanup-plan` can prove it.
|
|
|
118
118
|
## After-the-change check matrix
|
|
119
119
|
|
|
120
120
|
The reflex to build (and the one the `scip-query` router skill teaches
|
|
121
|
-
agents): match the check to what the change
|
|
121
|
+
agents): match the check to what the change _did_. `diff-gate` runs the
|
|
122
122
|
broad sweep on every diff; these are the targeted follow-ups.
|
|
123
123
|
|
|
124
|
-
| You just...
|
|
125
|
-
|
|
126
|
-
| Extracted a helper / created an abstraction
|
|
127
|
-
| Wrote a brand-new helper or module
|
|
128
|
-
| Added parameters, options, or config flags
|
|
129
|
-
| Added a forwarding/wrapper layer
|
|
130
|
-
| Added an interface, base class, or type alias
|
|
131
|
-
| Changed a schema, contract, config, or generated file | `scip-query co-change <file>` — who historically moves with it?
|
|
132
|
-
| Changed code that docs describe
|
|
133
|
-
| Deleted code
|
|
134
|
-
| Anything at all, before saying "done"
|
|
124
|
+
| You just... | Run |
|
|
125
|
+
| ----------------------------------------------------- | ------------------------------------------------------------------------------------------------------- |
|
|
126
|
+
| Extracted a helper / created an abstraction | `scip-query incomplete-migration` — did every site migrate? |
|
|
127
|
+
| Wrote a brand-new helper or module | `scip-query similar <it>` and `scip-query recent-duplicates` — did it already exist? |
|
|
128
|
+
| Added parameters, options, or config flags | `scip-query unused-params` — does anything use them yet? |
|
|
129
|
+
| Added a forwarding/wrapper layer | `scip-query wrapper-candidates` and `scip-query passthrough-candidates` — does it earn its indirection? |
|
|
130
|
+
| Added an interface, base class, or type alias | `scip-query stale-abstractions` — does it have more than one real consumer? |
|
|
131
|
+
| Changed a schema, contract, config, or generated file | `scip-query co-change <file>` — who historically moves with it? |
|
|
132
|
+
| Changed code that docs describe | `scip-query doc-drift` — which docs now lie? |
|
|
133
|
+
| Deleted code | `scip-query cleanup-plan --verify` — what else just became dead, and does the compiler agree? |
|
|
134
|
+
| Anything at all, before saying "done" | `scip-query reindex && scip-query diff-gate` |
|
|
135
135
|
|
|
136
136
|
And before any non-trivial change: plan with `scip-query plan-context
|
|
137
|
-
<target>` (or the `scip-
|
|
137
|
+
<target>` (or the `scip-plan` skill, which requires a scip-query citation
|
|
138
138
|
for every claim in the plan).
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
# Filesystem Publication and Durability
|
|
2
|
+
|
|
3
|
+
This document classifies scip-query's file-backed state by the guarantee a
|
|
4
|
+
writer must provide. The classification is part of the storage contract: a
|
|
5
|
+
caller must choose a writer whose failure semantics match the record's role.
|
|
6
|
+
|
|
7
|
+
## Guarantees
|
|
8
|
+
|
|
9
|
+
A **visibility-atomic replacement** is a filesystem publication operation that
|
|
10
|
+
writes complete bytes to a private staging file and renames that file over the
|
|
11
|
+
target. The rename is the decisive characteristic: concurrent readers can
|
|
12
|
+
observe the old complete file or the new complete file, but never the
|
|
13
|
+
writer's partial staging bytes. It does not promise that the new bytes or
|
|
14
|
+
directory entry survive power loss.
|
|
15
|
+
|
|
16
|
+
A **crash-durable replacement** is a visibility-atomic replacement that also
|
|
17
|
+
flushes the complete staging file before rename and flushes the containing
|
|
18
|
+
directory after rename. Those ordered flushes are what make acknowledged file
|
|
19
|
+
contents and the name that reaches them recoverable after an operating-system
|
|
20
|
+
or machine crash, subject to the host filesystem and device honoring their
|
|
21
|
+
flush contract.
|
|
22
|
+
|
|
23
|
+
An **authoritative record** is file-backed state whose loss can change which
|
|
24
|
+
generation, owner, policy, or accepted decision the program treats as current.
|
|
25
|
+
Its causal role in choosing later behavior makes silent rollback unsafe, so it
|
|
26
|
+
uses crash-durable replacement.
|
|
27
|
+
|
|
28
|
+
A **rebuildable record** is file-backed state whose loss can cost time,
|
|
29
|
+
diagnostics, or a retry but cannot make unverified facts authoritative. Because
|
|
30
|
+
another computation or bounded request can reconstruct it, complete
|
|
31
|
+
old-or-new visibility is sufficient.
|
|
32
|
+
|
|
33
|
+
A **directory flush** is a request to persist a directory entry—the mapping
|
|
34
|
+
from a filename to its file—after the file itself has been flushed. Flushing
|
|
35
|
+
only file contents is insufficient because a crash can otherwise lose the
|
|
36
|
+
rename that made those contents current.
|
|
37
|
+
|
|
38
|
+
## APIs
|
|
39
|
+
|
|
40
|
+
| API | Staging identity | File flush | Rename | Parent-directory flush |
|
|
41
|
+
| --- | --- | --- | --- | --- |
|
|
42
|
+
| `writeJsonAtomic` / `replaceFileAtomic(..., { durability: "visibility" })` | Exclusive random token | No | Yes | No |
|
|
43
|
+
| `writeJsonDurable` / `replaceFileAtomic(..., { durability: "durable" })` | Exclusive random token | Yes | Yes | Yes where supported |
|
|
44
|
+
|
|
45
|
+
`writeJsonAtomic` retains its original `void` return contract for compatibility.
|
|
46
|
+
`writeJsonDurable` and `replaceFileAtomic` return the achieved directory-sync
|
|
47
|
+
status. Verified binary installation owns an equivalent platform-local
|
|
48
|
+
flush/rename sequence because the enforced architecture forbids dependencies
|
|
49
|
+
between the sibling `platform` and `storage` boundaries.
|
|
50
|
+
|
|
51
|
+
On Windows, Node can reject attempts to open or flush a directory handle.
|
|
52
|
+
Known Windows "directory handles unsupported" errors produce
|
|
53
|
+
`directorySync: "unsupported"` after the staged file itself has been flushed
|
|
54
|
+
and renamed. That result means complete visibility plus flushed file contents,
|
|
55
|
+
not the full POSIX directory-entry durability guarantee. Other directory-sync
|
|
56
|
+
errors remain failures.
|
|
57
|
+
|
|
58
|
+
## Failure Outcomes
|
|
59
|
+
|
|
60
|
+
| Failure point | Target visible after return/throw | Owned staging file |
|
|
61
|
+
| --- | --- | --- |
|
|
62
|
+
| Exclusive create | Previous target | No owned file was created |
|
|
63
|
+
| Write or short/invalid progress | Previous target | Closed and removed |
|
|
64
|
+
| File flush | Previous target | Closed and removed |
|
|
65
|
+
| Rename | Previous target | Removed by the writer |
|
|
66
|
+
| POSIX directory flush | New complete target; durability unconfirmed and the call throws | Already renamed; no staging path |
|
|
67
|
+
| Unsupported Windows directory flush | New complete target; result reports the limitation | Already renamed; no staging path |
|
|
68
|
+
|
|
69
|
+
The post-rename failure row is deliberately explicit. Once rename succeeds,
|
|
70
|
+
rolling back would be another publication with its own crash window. The
|
|
71
|
+
writer therefore leaves the verified new value visible and reports that it
|
|
72
|
+
could not confirm the stronger durability guarantee.
|
|
73
|
+
|
|
74
|
+
## Call-Site Classification
|
|
75
|
+
|
|
76
|
+
| Record | Contract | Reason |
|
|
77
|
+
| --- | --- | --- |
|
|
78
|
+
| Reindex `meta.json` | Durable | Names the accepted index status, fingerprint, and generation metadata |
|
|
79
|
+
| SQLite generation manifest and `state.json` | Durable | Flushes one complete immutable artifact set, then atomically selects it for new readers |
|
|
80
|
+
| Shared-generation manifest | Durable file within staging | Authenticates immutable artifacts; the later generation-directory publication remains a separate generation-store operation |
|
|
81
|
+
| Worktree lease and local cache pointer | Durable | Protect generations from collection and bind a worktree to repository cache identity; generation changes, liveness touches, and cleanup serialize through the repository-cache lock |
|
|
82
|
+
| Watch service state | Durable | Publishes the process instance and index generation accepted as current |
|
|
83
|
+
| Rust semantic session `server.json` | Durable | Publishes the live server process and mailbox identity |
|
|
84
|
+
| Project `.scipquery.json` | Durable | Controls indexing, watch, architecture, and detector policy; versioned reads reject unsupported meaning before use, and authorized writes migrate legacy bytes without dropping unknown fields |
|
|
85
|
+
| Codex/Claude hook JSON | Durable | Controls whether and when agent hooks execute |
|
|
86
|
+
| Structured suppression file | Durable | Records an accepted finding and its reason |
|
|
87
|
+
| Health baseline | Durable | Acts as a committed regression policy |
|
|
88
|
+
| Verified binary cache promotion | Durable | Makes checksum-accepted executable or tool bytes current |
|
|
89
|
+
| TypeScript/Rust request and response mailboxes | Visibility-atomic | A timeout or retry reconstructs the ephemeral message |
|
|
90
|
+
| Watch activity | Visibility-atomic | A newer timestamp supersedes an older idle-lifetime observation; it carries no durable intent |
|
|
91
|
+
| Watch refresh request, claim, and completion records | Durable immutable admission and acknowledgement | Accepted intent survives activity replacement and owner crashes; exclusive claims may be recovered only by the next lock owner |
|
|
92
|
+
| TypeScript fragment/overlay manifests | Visibility-atomic | Content-addressed cache artifacts are validated and rebuildable |
|
|
93
|
+
| Repository GC state | Visibility-atomic | Sweep history can be reconstructed conservatively |
|
|
94
|
+
| Affected-set shadow latest record | Visibility-atomic | Calibration telemetry does not control publication |
|
|
95
|
+
|
|
96
|
+
Process locks use exclusive descriptor creation rather than replacement. Their
|
|
97
|
+
durable token ownership, malformed-creation grace, guarded recovery, and
|
|
98
|
+
legacy compatibility are defined in
|
|
99
|
+
[Process Lock Ownership and Recovery](LOCK_PROTOCOL.md). Generation directories,
|
|
100
|
+
stable compatibility mirrors, and their crash ordering are defined in
|
|
101
|
+
[Local Index Generations](INDEX_GENERATIONS.md). Durable watch demand,
|
|
102
|
+
idempotency, claim recovery, and acknowledgement ordering are defined in
|
|
103
|
+
[Watch Refresh Requests](WATCH_REFRESH_REQUESTS.md).
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
# Local Index Generations
|
|
2
|
+
|
|
3
|
+
`scip-query` treats `index.db`, `index.scip`, and `meta.json` as one local
|
|
4
|
+
index generation. A local index generation is an accepted set of compiler
|
|
5
|
+
artifacts whose database rows, SCIP occurrences, and metadata describe the
|
|
6
|
+
same indexing result. Keeping those files associated is what lets a query
|
|
7
|
+
attach one truthful identity to every row and downstream semantic request.
|
|
8
|
+
|
|
9
|
+
A generation handle is the storage-owned reference retained by one
|
|
10
|
+
`ScipDatabase`. It differs from a group of cache paths by resolving the
|
|
11
|
+
published pointer once, opening the database beneath that immutable
|
|
12
|
+
generation directory, and retaining the corresponding metadata bytes and SCIP
|
|
13
|
+
path for the connection's entire lifetime.
|
|
14
|
+
|
|
15
|
+
## Layout
|
|
16
|
+
|
|
17
|
+
The worktree cache keeps this internal layout:
|
|
18
|
+
|
|
19
|
+
```text
|
|
20
|
+
<cache>/
|
|
21
|
+
index.db compatibility mirror
|
|
22
|
+
index.scip compatibility mirror
|
|
23
|
+
meta.json compatibility mirror
|
|
24
|
+
.scipquery-generations/
|
|
25
|
+
state.json atomic current-generation pointer
|
|
26
|
+
<generation-sha256>/
|
|
27
|
+
manifest.json
|
|
28
|
+
index.db
|
|
29
|
+
index.scip
|
|
30
|
+
meta.json
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
The files inside a named generation directory are immutable. The SHA-256
|
|
34
|
+
identity incorporates the database bytes, SCIP bytes when present, and the
|
|
35
|
+
generation-bearing metadata fields. `manifest.json` records the exact size and
|
|
36
|
+
digest of each stored artifact. `state.json` names the accepted directory and
|
|
37
|
+
is the only publication decision read by internal database consumers.
|
|
38
|
+
|
|
39
|
+
The top-level files remain for the SCIP CLI, indexers, older scip-query
|
|
40
|
+
versions, and external inspection. They are derived mirrors, not the internal
|
|
41
|
+
read authority. A current scip-query process never combines rows from a
|
|
42
|
+
generation directory with metadata or SCIP bytes freshly reread through those
|
|
43
|
+
replaceable paths.
|
|
44
|
+
|
|
45
|
+
## Publication and crash behavior
|
|
46
|
+
|
|
47
|
+
Publication proceeds in this order:
|
|
48
|
+
|
|
49
|
+
1. Retain the previously published stable artifacts as an immutable
|
|
50
|
+
generation when upgrading a legacy cache.
|
|
51
|
+
2. Copy-on-write clone or copy every accepted candidate artifact into a
|
|
52
|
+
private staging directory.
|
|
53
|
+
3. Flush the artifact files and manifest, rename the complete staging
|
|
54
|
+
directory into its content-derived identity, and flush the generation
|
|
55
|
+
directory entry.
|
|
56
|
+
4. Durably replace `state.json` so new internal readers select the complete
|
|
57
|
+
new directory.
|
|
58
|
+
5. Replace the three compatibility mirrors and durably record their file
|
|
59
|
+
identities for drift diagnostics.
|
|
60
|
+
|
|
61
|
+
A crash before step 4 leaves the prior pointer authoritative. A crash after
|
|
62
|
+
step 4 leaves the new immutable generation authoritative even if one or more
|
|
63
|
+
compatibility mirrors are old. `scip-query status` and freshness inspection
|
|
64
|
+
report that mirror drift and a later refresh repairs it; database-backed
|
|
65
|
+
queries remain generation-consistent throughout.
|
|
66
|
+
|
|
67
|
+
Metadata-only refreshes create a new immutable generation and switch the same
|
|
68
|
+
pointer. Old database handles retain their old metadata bytes. Result cursors
|
|
69
|
+
and TypeScript semantic mailbox requests carry the handle identity, so a
|
|
70
|
+
continuation or numeric symbol identifier from an older generation is rejected
|
|
71
|
+
when a service has moved to a newer one.
|
|
72
|
+
|
|
73
|
+
Mailbox protocol version 3 additionally binds that generation identity into a
|
|
74
|
+
content-derived logical-operation key. The deterministic request ID lets a
|
|
75
|
+
retry join an already pending, inflight, or retained completed operation,
|
|
76
|
+
while the service still recomputes the key and rejects a path, payload, or
|
|
77
|
+
generation mismatch. See
|
|
78
|
+
[`MAILBOX_LIFECYCLE.md`](MAILBOX_LIFECYCLE.md) for ownership, expiry, limits,
|
|
79
|
+
and legacy overlap.
|
|
80
|
+
|
|
81
|
+
## Legacy overlap and retention
|
|
82
|
+
|
|
83
|
+
A cache without `state.json` remains readable through a bounded legacy
|
|
84
|
+
open-and-file-identity recheck. A state record written by the earlier local
|
|
85
|
+
generation implementation, which did not name an immutable artifact set, also
|
|
86
|
+
uses this compatibility path. New publications upgrade either layout without
|
|
87
|
+
deleting the stable files.
|
|
88
|
+
|
|
89
|
+
Published local generation directories are retained conservatively. Automatic
|
|
90
|
+
collection is intentionally disabled until a cross-process reader lease can
|
|
91
|
+
prove that no surviving handle can later need the retained SCIP companion.
|
|
92
|
+
This can temporarily consume more cache space, but it preserves the stronger
|
|
93
|
+
rule that storage reclamation may never change or remove evidence owned by a
|
|
94
|
+
live query.
|
|
95
|
+
|
|
96
|
+
The repository-wide shared generation store is a separate cache layer. It
|
|
97
|
+
warms a worktree by copying a complete generation into the worktree's private
|
|
98
|
+
cache; the local publisher then creates the local immutable directory and
|
|
99
|
+
pointer described here. Later worktree writes cannot mutate either the shared
|
|
100
|
+
source or a retained local reader.
|
|
101
|
+
|
|
102
|
+
## Shared worktree lease invariant
|
|
103
|
+
|
|
104
|
+
A worktree lease is a repository-cache reachability record whose generation
|
|
105
|
+
IDs keep an immutable shared generation from collection while that worktree
|
|
106
|
+
uses it. Its essential ownership fields bind the repository, worktree,
|
|
107
|
+
project path, and local cache path through a checksum; `lastSeenAt` is only a
|
|
108
|
+
liveness observation.
|
|
109
|
+
|
|
110
|
+
Generation attachment, lease liveness touches, and repository cleanup
|
|
111
|
+
serialize through one repository-cache lock. A touch may inspect the local
|
|
112
|
+
pointer before waiting only to identify that lock. Once it owns the lock, it
|
|
113
|
+
rereads the pointer and lease, validates the ownership checksum, current Git
|
|
114
|
+
tree, local metadata fingerprint, generation IDs, and source artifacts, then
|
|
115
|
+
merges only a newer `lastSeenAt`. It never writes a lease assembled from the
|
|
116
|
+
pre-lock observation.
|
|
117
|
+
|
|
118
|
+
Consequently, a touch waiting behind a new generation attaches to or rejects
|
|
119
|
+
the new lease; it cannot restore the old generation. A deleted lease stays
|
|
120
|
+
deleted, a recreated lease with different ownership stays intact, and a touch
|
|
121
|
+
whose clock is behind another completed touch cannot move liveness backward.
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
# Process Lock Ownership and Recovery
|
|
2
|
+
|
|
3
|
+
scip-query uses one process-lock protocol for watch ownership, reindex
|
|
4
|
+
publication, repository-cache garbage collection, shared-generation builds,
|
|
5
|
+
verified-binary fetches, and the durable Rust semantic server.
|
|
6
|
+
|
|
7
|
+
A **process lock** is a filesystem ownership record created exclusively at one
|
|
8
|
+
resource path. Exclusive creation makes competing processes observe one
|
|
9
|
+
winner; the recorded random token and operating-system process-start identity
|
|
10
|
+
distinguish that winner from later processes and later lock records that reuse
|
|
11
|
+
the same PID or pathname.
|
|
12
|
+
|
|
13
|
+
A **process instance** is one execution occupying an operating-system PID
|
|
14
|
+
slot. The PID locates the slot, while the process-start identity distinguishes
|
|
15
|
+
successive executions that occupy it. A PID by itself is therefore accepted
|
|
16
|
+
for conservative legacy inspection but never treated as proof that a live
|
|
17
|
+
process is the original owner.
|
|
18
|
+
|
|
19
|
+
A **reclaim guard** is a second exclusive, token-owned process lock at
|
|
20
|
+
`<lock>.reclaim`. It serializes recovery attempts so that only one process may
|
|
21
|
+
remove an unchanged abandoned record. The guard does not make an ambiguous
|
|
22
|
+
live owner safe to remove.
|
|
23
|
+
|
|
24
|
+
## Current Record
|
|
25
|
+
|
|
26
|
+
New writers emit protocol version 1:
|
|
27
|
+
|
|
28
|
+
```json
|
|
29
|
+
{
|
|
30
|
+
"protocol": "scip-query-process-lock",
|
|
31
|
+
"version": 1,
|
|
32
|
+
"kind": "reindex",
|
|
33
|
+
"pid": 41001,
|
|
34
|
+
"token": "random-owner-token",
|
|
35
|
+
"processIdentity": {
|
|
36
|
+
"version": 1,
|
|
37
|
+
"pid": 41001,
|
|
38
|
+
"platform": "linux",
|
|
39
|
+
"startToken": "9147752"
|
|
40
|
+
},
|
|
41
|
+
"startedAt": "2026-07-25T19:00:00.000Z",
|
|
42
|
+
"detail": {
|
|
43
|
+
"projectRoot": "/repo"
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
`kind` identifies the resource protocol using the lock. `detail` carries only
|
|
49
|
+
that protocol's diagnostic metadata; it is not ownership evidence. Ownership
|
|
50
|
+
is the combination of PID, random token, and process identity when the host can
|
|
51
|
+
obtain one.
|
|
52
|
+
|
|
53
|
+
The creator writes the complete record to a token-unique private candidate,
|
|
54
|
+
flushes and closes that candidate, then publishes the complete inode under the
|
|
55
|
+
public lock name with an exclusive hard link. The link either creates the
|
|
56
|
+
public name or reports that another owner already has it; it never replaces an
|
|
57
|
+
owner. A crash before the link can leave a private candidate, but it cannot
|
|
58
|
+
expose an empty or truncated public lock. Successful publication removes the
|
|
59
|
+
private name and flushes the containing directory where supported.
|
|
60
|
+
|
|
61
|
+
## Observation and Recovery
|
|
62
|
+
|
|
63
|
+
| Observed state | Recovery decision |
|
|
64
|
+
| ------------------------------------------------------------------ | ----------------------------------------------------------------------- |
|
|
65
|
+
| Current record; process instance is live and matches | Contended; never remove |
|
|
66
|
+
| Current record; PID is dead | Reclaim after guarded unchanged recheck |
|
|
67
|
+
| Current record; PID is live but its process-start identity differs | Reclaim the old record without signaling the new PID occupant |
|
|
68
|
+
| Current record; PID is live but identity cannot be read | Contended; fail closed |
|
|
69
|
+
| Supported legacy record; PID is live | Contended because the process instance cannot be verified |
|
|
70
|
+
| Supported legacy record; PID is dead | Reclaim after guarded unchanged recheck |
|
|
71
|
+
| Empty, truncated, or malformed public record | Contended; fail closed because civil-clock age cannot identify an owner |
|
|
72
|
+
| Record changes before the guarded recheck | Do not remove; report contention |
|
|
73
|
+
| Empty or malformed reclaim guard | Do not remove |
|
|
74
|
+
| Valid reclaim guard whose process instance is dead | Recover the guard, then retry once |
|
|
75
|
+
|
|
76
|
+
The unchanged recheck compares the original bytes, device, inode, size, and
|
|
77
|
+
modification time. Recovery is limited to one retry: persistent ambiguity
|
|
78
|
+
remains contention instead of becoming an unbounded delete loop.
|
|
79
|
+
|
|
80
|
+
Malformed public records from a legacy writer, external damage, or manual
|
|
81
|
+
editing require operator review. A civil timestamp is not causal ownership
|
|
82
|
+
evidence: moving the system clock forward cannot prove which process created
|
|
83
|
+
the bytes or whether that process still owns the resource.
|
|
84
|
+
|
|
85
|
+
## Release
|
|
86
|
+
|
|
87
|
+
Release rereads the current record and removes it only when PID and token still
|
|
88
|
+
match the owner's retained record. When the owner recorded a process identity,
|
|
89
|
+
that identity must match as well. A missing path, malformed record, legacy
|
|
90
|
+
record, token mismatch, or successor record makes release a no-op. Successful
|
|
91
|
+
removal flushes the containing directory where supported so an acknowledged
|
|
92
|
+
release does not resurrect the prior directory entry after a crash.
|
|
93
|
+
|
|
94
|
+
This protocol does not expire live ownership and therefore does not require a
|
|
95
|
+
monotonically increasing fencing token. A **fencing token** is an ordered
|
|
96
|
+
ownership value checked by the protected resource before it accepts a write;
|
|
97
|
+
it is necessary when an old live owner can outlast a lease and attempt
|
|
98
|
+
publication after a newer owner. scip-query instead refuses to steal a
|
|
99
|
+
verifiably live lock.
|
|
100
|
+
|
|
101
|
+
## Legacy Compatibility
|
|
102
|
+
|
|
103
|
+
Readers retain narrow decoders for the prior formats:
|
|
104
|
+
|
|
105
|
+
- watch and reindex JSON ownership records;
|
|
106
|
+
- generic repository-cache and shared-build `{ "pid": ... }` records;
|
|
107
|
+
- the durable Rust semantic server's numeric PID record.
|
|
108
|
+
|
|
109
|
+
New writers always emit the current common format. A live legacy owner remains
|
|
110
|
+
contended because its process instance cannot be proven. A dead legacy owner
|
|
111
|
+
can be reclaimed. Unsupported or malformed JSON is never guessed into a
|
|
112
|
+
legacy owner.
|
|
113
|
+
|
|
114
|
+
## Diagnostics and Manual Recovery
|
|
115
|
+
|
|
116
|
+
Successful reindex recovery reports that it recovered an abandoned lock. A
|
|
117
|
+
manual refresh that encounters an already-stale
|
|
118
|
+
watcher-owned reindex record retains the existing “preempting watcher refresh”
|
|
119
|
+
diagnostic while stating that the prior owner was already stale.
|
|
120
|
+
|
|
121
|
+
For other lock users, normal recovery is silent and contention reports the
|
|
122
|
+
resource-specific lock path. If a lock remains contended:
|
|
123
|
+
|
|
124
|
+
1. inspect the JSON without editing it;
|
|
125
|
+
2. verify whether its PID and process-start identity name the current process;
|
|
126
|
+
3. for a malformed record, establish ownership outside scip-query and move the
|
|
127
|
+
record aside rather than asking wall-clock age to authorize deletion;
|
|
128
|
+
4. retry the operation so the guarded recovery path can run for attributable
|
|
129
|
+
dead owners.
|
|
130
|
+
|
|
131
|
+
Do not manually delete a valid lock whose process instance is live. If host
|
|
132
|
+
permissions prevent process-identity verification, stop the owning process or
|
|
133
|
+
move the record aside only after establishing ownership outside scip-query.
|