gitnexus 1.6.9 → 1.6.10-aptos.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/README.md +211 -53
- package/dist/_shared/graph/types.d.ts +67 -3
- package/dist/_shared/graph/types.d.ts.map +1 -1
- package/dist/_shared/index.d.ts +1 -0
- package/dist/_shared/index.d.ts.map +1 -1
- package/dist/_shared/index.js.map +1 -1
- package/dist/_shared/integrations/resilient-fetch.d.ts +3 -1
- package/dist/_shared/integrations/resilient-fetch.d.ts.map +1 -1
- package/dist/_shared/integrations/resilient-fetch.js +4 -3
- package/dist/_shared/integrations/resilient-fetch.js.map +1 -1
- package/dist/_shared/language-detection.d.ts.map +1 -1
- package/dist/_shared/language-detection.js +2 -0
- package/dist/_shared/language-detection.js.map +1 -1
- package/dist/_shared/languages.d.ts +2 -0
- package/dist/_shared/languages.d.ts.map +1 -1
- package/dist/_shared/languages.js +2 -0
- package/dist/_shared/languages.js.map +1 -1
- package/dist/_shared/lbug/schema-constants.d.ts +2 -2
- package/dist/_shared/lbug/schema-constants.d.ts.map +1 -1
- package/dist/_shared/lbug/schema-constants.js +8 -0
- package/dist/_shared/lbug/schema-constants.js.map +1 -1
- package/dist/_shared/pipeline.d.ts +1 -1
- package/dist/_shared/pipeline.d.ts.map +1 -1
- package/dist/_shared/scope-resolution/callable-flow-site.d.ts +110 -0
- package/dist/_shared/scope-resolution/callable-flow-site.d.ts.map +1 -0
- package/dist/_shared/scope-resolution/callable-flow-site.js +11 -0
- package/dist/_shared/scope-resolution/callable-flow-site.js.map +1 -0
- package/dist/_shared/scope-resolution/finalize-algorithm.d.ts +1 -1
- package/dist/_shared/scope-resolution/finalize-algorithm.d.ts.map +1 -1
- package/dist/_shared/scope-resolution/finalize-algorithm.js +1 -1
- package/dist/_shared/scope-resolution/finalize-algorithm.js.map +1 -1
- package/dist/_shared/scope-resolution/language-classification.d.ts.map +1 -1
- package/dist/_shared/scope-resolution/language-classification.js +1 -0
- package/dist/_shared/scope-resolution/language-classification.js.map +1 -1
- package/dist/_shared/scope-resolution/parsed-file.d.ts +7 -0
- package/dist/_shared/scope-resolution/parsed-file.d.ts.map +1 -1
- package/dist/_shared/scope-resolution/reference-site.d.ts +9 -1
- package/dist/_shared/scope-resolution/reference-site.d.ts.map +1 -1
- package/dist/_shared/scope-resolution/types.d.ts +20 -3
- package/dist/_shared/scope-resolution/types.d.ts.map +1 -1
- package/dist/cli/ai-context.d.ts +1 -1
- package/dist/cli/ai-context.js +25 -44
- package/dist/cli/analyze.d.ts +5 -2
- package/dist/cli/analyze.js +197 -11
- package/dist/cli/clean.js +17 -3
- package/dist/cli/cli-message.d.ts +1 -1
- package/dist/cli/doctor.d.ts +18 -0
- package/dist/cli/doctor.js +96 -5
- package/dist/cli/editor-targets.d.ts +17 -2
- package/dist/cli/editor-targets.js +44 -0
- package/dist/cli/embeddings.d.ts +12 -0
- package/dist/cli/embeddings.js +49 -0
- package/dist/cli/eval-server.d.ts +23 -1
- package/dist/cli/eval-server.js +126 -8
- package/dist/cli/help-i18n.js +6 -0
- package/dist/cli/i18n/en.d.ts +18 -8
- package/dist/cli/i18n/en.js +18 -8
- package/dist/cli/i18n/resources.d.ts +28 -8
- package/dist/cli/i18n/zh-CN.d.ts +10 -0
- package/dist/cli/i18n/zh-CN.js +18 -8
- package/dist/cli/index.js +21 -7
- package/dist/cli/lazy-action.d.ts +7 -0
- package/dist/cli/lazy-action.js +27 -0
- package/dist/cli/mcp.js +6 -3
- package/dist/cli/move-availability.d.ts +5 -0
- package/dist/cli/move-availability.js +11 -0
- package/dist/cli/setup.d.ts +8 -0
- package/dist/cli/setup.js +230 -32
- package/dist/cli/skill-gen.js +38 -18
- package/dist/cli/standard-skills.d.ts +76 -0
- package/dist/cli/standard-skills.js +45 -0
- package/dist/cli/status.d.ts +4 -1
- package/dist/cli/status.js +57 -4
- package/dist/cli/tool.js +11 -0
- package/dist/cli/uninstall.js +77 -18
- package/dist/cli/wiki.d.ts +1 -0
- package/dist/cli/wiki.js +7 -1
- package/dist/config/ignore-service.d.ts +2 -0
- package/dist/config/ignore-service.js +27 -0
- package/dist/core/analysis-features.d.ts +21 -0
- package/dist/core/analysis-features.js +59 -0
- package/dist/core/analyzer-identity.d.ts +74 -0
- package/dist/core/analyzer-identity.js +1820 -0
- package/dist/core/augmentation/engine.js +13 -8
- package/dist/core/embeddings/embedder.d.ts +3 -2
- package/dist/core/embeddings/embedder.js +24 -7
- package/dist/core/embeddings/embedding-identity.d.ts +11 -0
- package/dist/core/embeddings/embedding-identity.js +24 -0
- package/dist/core/embeddings/embedding-pipeline.d.ts +36 -1
- package/dist/core/embeddings/embedding-pipeline.js +100 -9
- package/dist/core/embeddings/http-client.d.ts +33 -3
- package/dist/core/embeddings/http-client.js +237 -25
- package/dist/core/embeddings/node-module-compat.d.ts +25 -0
- package/dist/core/embeddings/node-module-compat.js +25 -0
- package/dist/core/embeddings/onnxruntime-common-resolver.js +8 -5
- package/dist/core/embeddings/onnxruntime-node-resolver.js +33 -7
- package/dist/core/embeddings/runtime-install.d.ts +119 -0
- package/dist/core/embeddings/runtime-install.js +372 -0
- package/dist/core/embeddings/runtime-support.d.ts +48 -17
- package/dist/core/embeddings/runtime-support.js +96 -0
- package/dist/core/git-staleness.js +1 -1
- package/dist/core/group/bridge-db.js +2 -0
- package/dist/core/group/extractors/http-patterns/python.js +246 -108
- package/dist/core/group/extractors/manifest-extractor.js +4 -0
- package/dist/core/incremental/escalation-gate.d.ts +38 -0
- package/dist/core/incremental/escalation-gate.js +48 -0
- package/dist/core/incremental/shadow-candidates.d.ts +3 -3
- package/dist/core/incremental/shadow-candidates.js +3 -3
- package/dist/core/incremental/subgraph-extract.d.ts +2 -2
- package/dist/core/incremental/subgraph-extract.js +2 -2
- package/dist/core/index-freshness.d.ts +5 -0
- package/dist/core/index-freshness.js +13 -0
- package/dist/core/ingestion/class-extractors/configs/jvm.js +29 -0
- package/dist/core/ingestion/cobol/cobol-preprocessor.js +1 -1
- package/dist/core/ingestion/cobol/jcl-processor.js +9 -8
- package/dist/core/ingestion/cobol-processor.js +27 -26
- package/dist/core/ingestion/community-processor.d.ts +51 -1
- package/dist/core/ingestion/community-processor.js +323 -64
- package/dist/core/ingestion/emit-references.js +7 -2
- package/dist/core/ingestion/filesystem-walker.js +4 -0
- package/dist/core/ingestion/frameworks/spring/analysis-features.d.ts +3 -0
- package/dist/core/ingestion/frameworks/spring/analysis-features.js +7 -0
- package/dist/core/ingestion/frameworks/spring/bean-candidates.d.ts +30 -0
- package/dist/core/ingestion/frameworks/spring/bean-candidates.js +182 -0
- package/dist/core/ingestion/frameworks/spring/bean-catalog.d.ts +12 -0
- package/dist/core/ingestion/frameworks/spring/bean-catalog.js +26 -0
- package/dist/core/ingestion/frameworks/spring/config-bindings.d.ts +24 -0
- package/dist/core/ingestion/frameworks/spring/config-bindings.js +115 -0
- package/dist/core/ingestion/languages/c/captures.js +56 -0
- package/dist/core/ingestion/languages/c/query.js +17 -0
- package/dist/core/ingestion/languages/c/scope-resolver.js +6 -0
- package/dist/core/ingestion/languages/cobol/captures.js +93 -0
- package/dist/core/ingestion/languages/cobol/scope-resolver.js +7 -0
- package/dist/core/ingestion/languages/cpp/captures.js +365 -75
- package/dist/core/ingestion/languages/cpp/scope-resolver.js +14 -0
- package/dist/core/ingestion/languages/csharp/captures.js +25 -0
- package/dist/core/ingestion/languages/dart/captures.js +90 -2
- package/dist/core/ingestion/languages/dart/extension-type-preprocess.d.ts +7 -0
- package/dist/core/ingestion/languages/dart/extension-type-preprocess.js +30 -0
- package/dist/core/ingestion/languages/dart.js +2 -0
- package/dist/core/ingestion/languages/go/captures.js +34 -0
- package/dist/core/ingestion/languages/index.d.ts +1 -0
- package/dist/core/ingestion/languages/index.js +2 -0
- package/dist/core/ingestion/languages/java/analysis-features.d.ts +3 -0
- package/dist/core/ingestion/languages/java/analysis-features.js +13 -0
- package/dist/core/ingestion/languages/java/capture-side-channel.d.ts +22 -0
- package/dist/core/ingestion/languages/java/capture-side-channel.js +58 -0
- package/dist/core/ingestion/languages/java/captures.d.ts +4 -3
- package/dist/core/ingestion/languages/java/captures.js +193 -17
- package/dist/core/ingestion/languages/java/package-facts.d.ts +5 -0
- package/dist/core/ingestion/languages/java/package-facts.js +9 -0
- package/dist/core/ingestion/languages/java/package-siblings.d.ts +3 -16
- package/dist/core/ingestion/languages/java/package-siblings.js +8 -147
- package/dist/core/ingestion/languages/java/query.js +23 -0
- package/dist/core/ingestion/languages/java/scope-resolver.js +23 -0
- package/dist/core/ingestion/languages/java/spring-bean-metadata.d.ts +2 -0
- package/dist/core/ingestion/languages/java/spring-bean-metadata.js +8 -0
- package/dist/core/ingestion/languages/java/spring-config-bindings.d.ts +23 -0
- package/dist/core/ingestion/languages/java/spring-config-bindings.js +215 -0
- package/dist/core/ingestion/languages/java.js +3 -0
- package/dist/core/ingestion/languages/javascript/captures.js +16 -0
- package/dist/core/ingestion/languages/javascript/query.js +21 -0
- package/dist/core/ingestion/languages/jvm/package-facts.d.ts +35 -0
- package/dist/core/ingestion/languages/jvm/package-facts.js +40 -0
- package/dist/core/ingestion/languages/jvm/package-siblings.d.ts +14 -0
- package/dist/core/ingestion/languages/jvm/package-siblings.js +129 -0
- package/dist/core/ingestion/languages/kotlin/capture-side-channel.d.ts +17 -3
- package/dist/core/ingestion/languages/kotlin/capture-side-channel.js +42 -8
- package/dist/core/ingestion/languages/kotlin/captures.js +59 -0
- package/dist/core/ingestion/languages/kotlin/package-facts.d.ts +5 -0
- package/dist/core/ingestion/languages/kotlin/package-facts.js +9 -0
- package/dist/core/ingestion/languages/kotlin/package-siblings.d.ts +4 -0
- package/dist/core/ingestion/languages/kotlin/package-siblings.js +8 -0
- package/dist/core/ingestion/languages/kotlin/query.js +19 -0
- package/dist/core/ingestion/languages/kotlin/scope-resolver.js +9 -1
- package/dist/core/ingestion/languages/kotlin/spring-bean-metadata.d.ts +2 -0
- package/dist/core/ingestion/languages/kotlin/spring-bean-metadata.js +8 -0
- package/dist/core/ingestion/languages/kotlin.js +5 -6
- package/dist/core/ingestion/languages/move.d.ts +1 -0
- package/dist/core/ingestion/languages/move.js +27 -0
- package/dist/core/ingestion/languages/php/captures.js +40 -0
- package/dist/core/ingestion/languages/php/import-decomposer.js +12 -0
- package/dist/core/ingestion/languages/php/import-target.d.ts +2 -1
- package/dist/core/ingestion/languages/php/import-target.js +110 -2
- package/dist/core/ingestion/languages/php/interpret.js +10 -0
- package/dist/core/ingestion/languages/php/scope-resolver.js +1 -1
- package/dist/core/ingestion/languages/python/captures.d.ts +3 -4
- package/dist/core/ingestion/languages/python/captures.js +24 -5
- package/dist/core/ingestion/languages/python/interpret.js +4 -0
- package/dist/core/ingestion/languages/python/receiver-binding.d.ts +15 -2
- package/dist/core/ingestion/languages/python/receiver-binding.js +96 -2
- package/dist/core/ingestion/languages/python/simple-hooks.d.ts +5 -5
- package/dist/core/ingestion/languages/python/simple-hooks.js +15 -5
- package/dist/core/ingestion/languages/ruby/captures.js +42 -0
- package/dist/core/ingestion/languages/rust/captures.js +13 -0
- package/dist/core/ingestion/languages/rust/interpret.js +18 -0
- package/dist/core/ingestion/languages/rust/query.js +9 -0
- package/dist/core/ingestion/languages/rust/range-binding.js +6 -2
- package/dist/core/ingestion/languages/swift/captures.js +12 -0
- package/dist/core/ingestion/languages/typescript/captures.js +21 -0
- package/dist/core/ingestion/languages/typescript/nuxt-auto-imports.js +2 -1
- package/dist/core/ingestion/languages/typescript/query.js +37 -0
- package/dist/core/ingestion/markdown-processor.js +3 -2
- package/dist/core/ingestion/model/registration-table.js +1 -0
- package/dist/core/ingestion/parsing-processor.d.ts +3 -1
- package/dist/core/ingestion/parsing-processor.js +36 -1
- package/dist/core/ingestion/pipeline-phases/index.d.ts +2 -0
- package/dist/core/ingestion/pipeline-phases/index.js +2 -0
- package/dist/core/ingestion/pipeline-phases/parse-impl.js +56 -2
- package/dist/core/ingestion/pipeline-phases/parse.d.ts +0 -2
- package/dist/core/ingestion/pipeline-phases/parse.js +12 -3
- package/dist/core/ingestion/pipeline-phases/processes.d.ts +8 -0
- package/dist/core/ingestion/pipeline-phases/processes.js +11 -1
- package/dist/core/ingestion/pipeline-phases/spring-config.d.ts +37 -0
- package/dist/core/ingestion/pipeline-phases/spring-config.js +433 -0
- package/dist/core/ingestion/pipeline-phases/standalone-ingest.d.ts +10 -0
- package/dist/core/ingestion/pipeline-phases/standalone-ingest.js +6 -0
- package/dist/core/ingestion/pipeline.d.ts +4 -2
- package/dist/core/ingestion/pipeline.js +5 -2
- package/dist/core/ingestion/resolve-references.js +12 -0
- package/dist/core/ingestion/route-extractors/constant-resolver.d.ts +83 -0
- package/dist/core/ingestion/route-extractors/constant-resolver.js +131 -0
- package/dist/core/ingestion/route-extractors/python-const-resolver.d.ts +75 -0
- package/dist/core/ingestion/route-extractors/python-const-resolver.js +299 -0
- package/dist/core/ingestion/scope-extractor.js +306 -43
- package/dist/core/ingestion/scope-resolution/contract/scope-resolver.d.ts +71 -2
- package/dist/core/ingestion/scope-resolution/graph-bridge/callee-id-sink.d.ts +7 -7
- package/dist/core/ingestion/scope-resolution/graph-bridge/callee-id-sink.js +8 -7
- package/dist/core/ingestion/scope-resolution/graph-bridge/edges.d.ts +3 -1
- package/dist/core/ingestion/scope-resolution/graph-bridge/edges.js +6 -0
- package/dist/core/ingestion/scope-resolution/graph-bridge/ids.js +1 -0
- package/dist/core/ingestion/scope-resolution/graph-bridge/node-lookup.js +4 -1
- package/dist/core/ingestion/scope-resolution/graph-bridge/references-to-edges.js +7 -2
- package/dist/core/ingestion/scope-resolution/passes/callable-value-flow.d.ts +47 -0
- package/dist/core/ingestion/scope-resolution/passes/callable-value-flow.js +1138 -0
- package/dist/core/ingestion/scope-resolution/passes/free-call-fallback.d.ts +16 -4
- package/dist/core/ingestion/scope-resolution/passes/free-call-fallback.js +97 -1
- package/dist/core/ingestion/scope-resolution/passes/property-dispatch.d.ts +60 -0
- package/dist/core/ingestion/scope-resolution/passes/property-dispatch.js +111 -0
- package/dist/core/ingestion/scope-resolution/passes/receiver-bound-calls.d.ts +4 -3
- package/dist/core/ingestion/scope-resolution/pipeline/phase.d.ts +5 -0
- package/dist/core/ingestion/scope-resolution/pipeline/phase.js +25 -38
- package/dist/core/ingestion/scope-resolution/pipeline/run.d.ts +6 -0
- package/dist/core/ingestion/scope-resolution/pipeline/run.js +147 -35
- package/dist/core/ingestion/scope-resolution/resolution-outcome.d.ts +1 -1
- package/dist/core/ingestion/scope-resolution/scope/walkers.js +73 -44
- package/dist/core/ingestion/taint/typescript-model.js +34 -2
- package/dist/core/ingestion/tree-sitter-queries.d.ts +2 -2
- package/dist/core/ingestion/tree-sitter-queries.js +23 -2
- package/dist/core/ingestion/type-extractors/jvm.js +17 -2
- package/dist/core/ingestion/utils/ast-helpers.d.ts +1 -0
- package/dist/core/ingestion/utils/ast-helpers.js +153 -2
- package/dist/core/ingestion/utils/callable-flow-captures.d.ts +94 -0
- package/dist/core/ingestion/utils/callable-flow-captures.js +878 -0
- package/dist/core/ingestion/utils/line-base.d.ts +20 -0
- package/dist/core/ingestion/utils/line-base.js +20 -0
- package/dist/core/ingestion/utils/symbol-labels.d.ts +21 -0
- package/dist/core/ingestion/utils/symbol-labels.js +45 -0
- package/dist/core/ingestion/workers/parse-worker.d.ts +34 -0
- package/dist/core/ingestion/workers/parse-worker.js +40 -5
- package/dist/core/ingestion/workers/result-merge.js +4 -0
- package/dist/core/ingestion/workers/worker-pool.d.ts +28 -0
- package/dist/core/ingestion/workers/worker-pool.js +128 -28
- package/dist/core/lbug/csv-generator.d.ts +15 -0
- package/dist/core/lbug/csv-generator.js +124 -27
- package/dist/core/lbug/cypher-escape.d.ts +20 -0
- package/dist/core/lbug/cypher-escape.js +20 -0
- package/dist/core/lbug/extension-load-error.d.ts +67 -0
- package/dist/core/lbug/extension-load-error.js +326 -0
- package/dist/core/lbug/extension-loader.d.ts +17 -2
- package/dist/core/lbug/extension-loader.js +38 -13
- package/dist/core/lbug/lbug-adapter.d.ts +203 -2
- package/dist/core/lbug/lbug-adapter.js +527 -86
- package/dist/core/lbug/lbug-config.d.ts +56 -2
- package/dist/core/lbug/lbug-config.js +267 -7
- package/dist/core/lbug/move-columns.d.ts +7 -0
- package/dist/core/lbug/move-columns.js +86 -0
- package/dist/core/lbug/native-check.d.ts +40 -0
- package/dist/core/lbug/native-check.js +90 -0
- package/dist/core/lbug/node-table-layout.d.ts +29 -0
- package/dist/core/lbug/node-table-layout.js +119 -0
- package/dist/core/lbug/pool-adapter.d.ts +23 -1
- package/dist/core/lbug/pool-adapter.js +115 -8
- package/dist/core/lbug/schema.d.ts +4 -3
- package/dist/core/lbug/schema.js +16 -16
- package/dist/core/lbug/sidecar-recovery.d.ts +172 -0
- package/dist/core/lbug/sidecar-recovery.js +418 -16
- package/dist/core/lbug/wal-checkpoint-driver.js +3 -0
- package/dist/core/move/artifact-download.d.ts +19 -0
- package/dist/core/move/artifact-download.js +179 -0
- package/dist/core/move/compiler-facts.d.ts +120 -0
- package/dist/core/move/compiler-facts.js +9 -0
- package/dist/core/move/consistency.d.ts +28 -0
- package/dist/core/move/consistency.js +98 -0
- package/dist/core/move/constants.d.ts +98 -0
- package/dist/core/move/constants.js +136 -0
- package/dist/core/move/discovery.d.ts +10 -0
- package/dist/core/move/discovery.js +22 -0
- package/dist/core/move/entry-points.d.ts +14 -0
- package/dist/core/move/entry-points.js +40 -0
- package/dist/core/move/facts-mapper.d.ts +75 -0
- package/dist/core/move/facts-mapper.js +534 -0
- package/dist/core/move/install-lock.d.ts +14 -0
- package/dist/core/move/install-lock.js +102 -0
- package/dist/core/move/install.d.ts +39 -0
- package/dist/core/move/install.js +391 -0
- package/dist/core/move/mcp-client.d.ts +115 -0
- package/dist/core/move/mcp-client.js +436 -0
- package/dist/core/move/move-ingest.d.ts +49 -0
- package/dist/core/move/move-ingest.js +320 -0
- package/dist/core/move/provision.d.ts +19 -0
- package/dist/core/move/provision.js +91 -0
- package/dist/core/move/release.d.ts +6 -0
- package/dist/core/move/release.js +10 -0
- package/dist/core/move/symbol-id.d.ts +35 -0
- package/dist/core/move/symbol-id.js +65 -0
- package/dist/core/move/type-parser.d.ts +11 -0
- package/dist/core/move/type-parser.js +38 -0
- package/dist/core/platform/capabilities.d.ts +0 -1
- package/dist/core/platform/capabilities.js +39 -8
- package/dist/core/run-analyze.d.ts +3 -3
- package/dist/core/run-analyze.js +1001 -184
- package/dist/core/search/fts-indexes.d.ts +31 -0
- package/dist/core/search/fts-indexes.js +73 -0
- package/dist/core/search/fts-schema.js +2 -0
- package/dist/core/tree-sitter/safe-parse.d.ts +8 -3
- package/dist/core/tree-sitter/safe-parse.js +21 -7
- package/dist/core/wiki/graph-queries.js +6 -5
- package/dist/core/wiki/llm-client.d.ts +8 -2
- package/dist/core/wiki/llm-client.js +41 -5
- package/dist/mcp/core/embedder.js +16 -2
- package/dist/mcp/http-transport.d.ts +5 -0
- package/dist/mcp/http-transport.js +19 -5
- package/dist/mcp/local/bean-metadata.d.ts +2 -0
- package/dist/mcp/local/bean-metadata.js +25 -0
- package/dist/mcp/local/line-display.d.ts +22 -0
- package/dist/mcp/local/line-display.js +3 -0
- package/dist/mcp/local/local-backend.d.ts +19 -1
- package/dist/mcp/local/local-backend.js +402 -155
- package/dist/mcp/local/pdg-impact.d.ts +5 -3
- package/dist/mcp/local/pdg-impact.js +5 -2
- package/dist/mcp/output-budget.d.ts +5 -0
- package/dist/mcp/output-budget.js +52 -0
- package/dist/mcp/read-only-policy.d.ts +12 -0
- package/dist/mcp/read-only-policy.js +102 -0
- package/dist/mcp/repository-policy.d.ts +34 -0
- package/dist/mcp/repository-policy.js +328 -0
- package/dist/mcp/resources.js +32 -5
- package/dist/mcp/server.d.ts +5 -2
- package/dist/mcp/server.js +29 -9
- package/dist/mcp/tools.d.ts +0 -8
- package/dist/mcp/tools.js +102 -5
- package/dist/server/analyze-job.d.ts +3 -0
- package/dist/server/analyze-job.js +17 -0
- package/dist/server/analyze-launch.d.ts +6 -0
- package/dist/server/analyze-launch.js +82 -6
- package/dist/server/analyze-worker-core.d.ts +2 -1
- package/dist/server/analyze-worker-core.js +5 -2
- package/dist/server/analyze-worker.js +29 -6
- package/dist/server/api.d.ts +30 -0
- package/dist/server/api.js +120 -34
- package/dist/server/mcp-http.d.ts +1 -1
- package/dist/server/mcp-http.js +4 -2
- package/dist/server/upload-ingest.js +2 -1
- package/dist/server/validation.js +2 -1
- package/dist/storage/git.d.ts +31 -0
- package/dist/storage/git.js +111 -1
- package/dist/storage/parse-cache.js +7 -1
- package/dist/storage/parsedfile-store.d.ts +8 -0
- package/dist/storage/parsedfile-store.js +165 -1
- package/dist/storage/repo-manager.d.ts +194 -2
- package/dist/storage/repo-manager.js +56 -1
- package/hooks/antigravity/gitnexus-antigravity-hook.cjs +50 -3
- package/hooks/claude/gitnexus-hook.cjs +59 -9
- package/hooks/claude/pre-tool-use.sh +0 -0
- package/hooks/claude/session-start.sh +0 -0
- package/package.json +21 -15
- package/scripts/cross-platform-tests.ts +56 -0
- package/scripts/ensure-fts.ts +43 -0
- package/scripts/install-duckdb-extension.mjs +85 -24
- package/scripts/run-cross-platform.ts +61 -6
- package/scripts/shard-arg.ts +30 -0
- package/scripts/sync-plugin-manifests.mjs +192 -0
- package/skills/gitnexus-lfg/README.md +55 -0
- package/skills/gitnexus-lfg/SKILL.md +86 -0
- package/skills/gitnexus-plan/README.md +142 -0
- package/skills/gitnexus-plan/SKILL.md +348 -0
- package/skills/gitnexus-plan/references/context-ledger.md +137 -0
- package/skills/gitnexus-plan/references/context-pack.md +126 -0
- package/skills/gitnexus-plan/references/evidence-provenance.md +272 -0
- package/skills/gitnexus-plan/references/pdg-slice.md +109 -0
- package/skills/gitnexus-plan/references/plan-template.md +201 -0
- package/skills/gitnexus-plan/scripts/evidence-provenance.mjs +2084 -0
- package/skills/gitnexus-review/SKILL.md +273 -0
- package/skills/gitnexus-review/ci-personas/ci-adversarial-lens.md +42 -0
- package/skills/gitnexus-review/ci-personas/ci-blast-radius-lens.md +39 -0
- package/skills/gitnexus-review/ci-personas/ci-correctness-lens.md +37 -0
- package/skills/gitnexus-review/ci-personas/ci-coverage-lens.md +40 -0
- package/skills/gitnexus-review/ci-personas/ci-critic-lens.md +42 -0
- package/skills/gitnexus-review/ci-personas/ci-security-lens.md +39 -0
- package/skills/gitnexus-work/README.md +71 -0
- package/skills/gitnexus-work/SKILL.md +269 -0
- package/skills/gitnexus-work/references/evidence-provenance.md +272 -0
- package/skills/gitnexus-work/scripts/evidence-provenance.mjs +2084 -0
- package/web/assets/ProcessFlowModal-B_bfBySy.js +22 -0
- package/web/assets/__vite-browser-external-bMKyYQkO.js +1 -0
- package/web/assets/agent-Bqxn-abU.js +626 -0
- package/web/assets/architecture-7EHR7CIX-6QZW5X65-BVWFvYz2.js +1 -0
- package/web/assets/architectureDiagram-UL44E2DR-CmG3uPWf.js +36 -0
- package/web/assets/{blockDiagram-7IZFK4PR-BkWhpzWB.js → blockDiagram-7IZFK4PR-DBefcjof.js} +7 -7
- package/web/assets/{c4Diagram-Y2BXMSZH-DtBvpzWD.js → c4Diagram-Y2BXMSZH-EjWnjEJl.js} +6 -6
- package/web/assets/chunk-2T2R6R2M-Bb6Sy3_j.js +4 -0
- package/web/assets/chunk-2UTLFMKG-CXlhF3Pt.js +1 -0
- package/web/assets/chunk-3SSMPTDK-rPsRM1x0.js +321 -0
- package/web/assets/chunk-4R4BOZG6-Be_F0JoX.js +159 -0
- package/web/assets/{chunk-6764PJDD-DpIS7hxD.js → chunk-6764PJDD-C7xxk063.js} +1 -1
- package/web/assets/chunk-67TQ5CYL-CA7OhIEf.js +124 -0
- package/web/assets/chunk-7FYTHRHK-CsmYIswB.js +32 -0
- package/web/assets/chunk-7J6CGLKN-BlKwgXKs.js +10 -0
- package/web/assets/chunk-7W6UQGC5-pyKGssV3.js +1 -0
- package/web/assets/chunk-C62D2QBJ-3gdL8EKc.js +1 -0
- package/web/assets/chunk-CEXFNPSA-CjwtMDkc.js +1 -0
- package/web/assets/{chunk-INKRHTLW-Nu4ri9P-.js → chunk-INKRHTLW-Ckl3_KkO.js} +13 -13
- package/web/assets/chunk-J5EP6P6S-L19oz55R.js +1 -0
- package/web/assets/{chunk-KGFNY3KK-JGMJvKCK.js → chunk-KGFNY3KK-BZeP-55u.js} +17 -17
- package/web/assets/chunk-KGYTTC2M-zm6n242I.js +1 -0
- package/web/assets/{chunk-KRXBNO2N-BW5o0KUN.js → chunk-KRXBNO2N-C-UNuKKf.js} +1 -1
- package/web/assets/{chunk-LCXTWHL2-CfLLCywY.js → chunk-LCXTWHL2-C162wE5z.js} +5 -5
- package/web/assets/chunk-LII3EMHJ-BL6lKJ_P.js +1 -0
- package/web/assets/chunk-LRIF4GLE-n59lhprL.js +1 -0
- package/web/assets/chunk-QA3QBVWF-DVXPOIxe.js +2 -0
- package/web/assets/chunk-RERM46MO-B5dAdWpP.js +1 -0
- package/web/assets/chunk-RG4AUYOV-ZNgyLFq6.js +206 -0
- package/web/assets/chunk-RKZBBQEN-MyIQbGgD.js +1 -0
- package/web/assets/chunk-RLI5ZMPA-CkXZ0y0U.js +1 -0
- package/web/assets/chunk-T2UQINTJ-BEyXhZWe.js +1 -0
- package/web/assets/chunk-UP6H54XL-BG-n7qDp.js +1 -0
- package/web/assets/chunk-UXSXWOXI-CW1_r5cS.js +1 -0
- package/web/assets/chunk-UY5QBCOK-ByqTVLvh.js +1 -0
- package/web/assets/chunk-VU6ZFW4Y-BLeasdkU.js +2 -0
- package/web/assets/{chunk-W44A43WB-JqMLIpR0.js → chunk-W44A43WB-BN8EQc_u.js} +1 -1
- package/web/assets/chunk-ZXARS5L4-C3v-4Fsw.js +1 -0
- package/web/assets/classDiagram-KGZ6W3CR-olpO3fMe.js +1 -0
- package/web/assets/classDiagram-v2-72OJOZXJ-olpO3fMe.js +1 -0
- package/web/assets/cose-bilkent-UX7MHV2Q-BmnZ7Mvj.js +1 -0
- package/web/assets/dagre-ND4H6XIP-CY4iIF7v.js +4 -0
- package/web/assets/diagram-3NCE3AQN-CO6QpzEE.js +43 -0
- package/web/assets/diagram-GF46GFSD-B2atbzmU.js +24 -0
- package/web/assets/diagram-HNR7UZ2L-DVRltWbL.js +3 -0
- package/web/assets/diagram-QXG6HAR7-DR6AHD2h.js +24 -0
- package/web/assets/diagram-WEQXMOUZ-DkpoMwTL.js +10 -0
- package/web/assets/erDiagram-L5TCEMPS-n8g_90bc.js +85 -0
- package/web/assets/eventmodeling-FCH6USID-MREXMVOE-CgFBM7e-.js +1 -0
- package/web/assets/flowDiagram-H6V6AXG4-SGMDiCkB.js +162 -0
- package/web/assets/ganttDiagram-JCBTUEKG-Cb3UBqRS.js +292 -0
- package/web/assets/gitGraph-WXDBUCRP-R675I2BI-DCJv7SII.js +1 -0
- package/web/assets/gitGraphDiagram-S2ZK5IYY-Bs9CR7tq.js +106 -0
- package/web/assets/index-CX_fADmQ.css +2 -0
- package/web/assets/index-D1Z3dGGz.js +575 -0
- package/web/assets/info-J43DQDTF-KCYPFFUO-BfNy-9Nd.js +1 -0
- package/web/assets/infoDiagram-3YFTVSEB-T368on4D.js +2 -0
- package/web/assets/{ishikawaDiagram-BNXS4ZKH-DfYpxnE5.js → ishikawaDiagram-BNXS4ZKH-XpjJRU9h.js} +6 -6
- package/web/assets/journeyDiagram-M6C3CM3L-C6wjooas.js +139 -0
- package/web/assets/kanban-definition-75IXJCU3-5_UVY79g.js +89 -0
- package/web/assets/{katex-K3KEBU37-CTc5BslQ.js → katex-K3KEBU37-qRQBy-EZ.js} +2 -2
- package/web/assets/{mindmap-definition-2TDM6QVE-DypvbOMQ.js → mindmap-definition-2TDM6QVE-8xDLzk2e.js} +29 -29
- package/web/assets/node-Ct_zna8U.js +8 -0
- package/web/assets/packet-YPE3B663-LP52Z2RK-D4qkeG9k.js +1 -0
- package/web/assets/pie-LRSECV5Y-TCRJHUBD-B_yMKyQa.js +1 -0
- package/web/assets/pieDiagram-CU6KROY3-Bv4LpAbr.js +30 -0
- package/web/assets/preload-helper-Czpn1I53.js +1 -0
- package/web/assets/{quadrantDiagram-VICAPDV7-yXSZ2lLz.js → quadrantDiagram-VICAPDV7-DR54jOeR.js} +6 -6
- package/web/assets/radar-GUYGQ44K-RDLRG3WG-DeD6yN_0.js +1 -0
- package/web/assets/requirementDiagram-JXO7QTGE-PEkg7sKC.js +84 -0
- package/web/assets/rolldown-runtime-QTnfLwEv.js +1 -0
- package/web/assets/sankeyDiagram-URQDO5SZ-DDWEtjcs.js +40 -0
- package/web/assets/sdk-CzHHH8tD.js +37 -0
- package/web/assets/sequenceDiagram-VS2MUI6T-Bv-uwANx.js +162 -0
- package/web/assets/src-JV30wyV8.js +1 -0
- package/web/assets/stateDiagram-7D4R322I-DVNjmkEq.js +1 -0
- package/web/assets/stateDiagram-v2-36443NZ5-CyN4Fh7_.js +1 -0
- package/web/assets/timeline-definition-O6YCAMPW-Qmsuo7qS.js +120 -0
- package/web/assets/treeView-BLDUP644-QA4HXRO3-CDuSYnd4.js +1 -0
- package/web/assets/treemap-LRROVOQU-LLAWBHMP-imazucyJ.js +1 -0
- package/web/assets/vennDiagram-MWXL3ELB-BD1iK1SX.js +34 -0
- package/web/assets/wardley-L42UT6IY-5TKZOOLJ-DqrT9tB8.js +1 -0
- package/web/assets/wardleyDiagram-CUQ6CDDI-D6TzLVob.js +78 -0
- package/web/assets/{xychartDiagram-N2JHSOCM-BOLm0eNm.js → xychartDiagram-N2JHSOCM-CoZ_Tits.js} +6 -6
- package/web/index.html +18 -10
- package/skills/gitnexus-pr-review.md +0 -163
- package/web/assets/agent-Dli_x7bU.js +0 -660
- package/web/assets/architecture-7EHR7CIX-6QZW5X65-DxJw65fT.js +0 -1
- package/web/assets/architectureDiagram-UL44E2DR-dEkqUZN9.js +0 -36
- package/web/assets/chunk-3SSMPTDK-B4_etUhr.js +0 -321
- package/web/assets/chunk-67TQ5CYL-4sNPJU1q.js +0 -124
- package/web/assets/chunk-7W6UQGC5-KyEG0HQg.js +0 -1
- package/web/assets/chunk-KGYTTC2M-CWC_c3H9.js +0 -161
- package/web/assets/chunk-LII3EMHJ-D-jm-dLa.js +0 -1
- package/web/assets/chunk-QA3QBVWF-BgRW3SXd.js +0 -2
- package/web/assets/chunk-RG4AUYOV-CqWzWsV3.js +0 -206
- package/web/assets/chunk-T2UQINTJ-DSBqkzH7.js +0 -1
- package/web/assets/chunk-UY5QBCOK-DyF0vyGd.js +0 -1
- package/web/assets/chunk-ZXARS5L4-CxN8oiwI.js +0 -1
- package/web/assets/classDiagram-KGZ6W3CR-CMne4tG9.js +0 -1
- package/web/assets/classDiagram-v2-72OJOZXJ-CMne4tG9.js +0 -1
- package/web/assets/cose-bilkent-UX7MHV2Q-D71wNYRJ.js +0 -1
- package/web/assets/dagre-ND4H6XIP-Co5rRx9X.js +0 -4
- package/web/assets/diagram-3NCE3AQN-DBp4O00j.js +0 -43
- package/web/assets/diagram-GF46GFSD-6N_8yS0i.js +0 -24
- package/web/assets/diagram-HNR7UZ2L-DFCfd5LI.js +0 -3
- package/web/assets/diagram-QXG6HAR7-Di093rFg.js +0 -24
- package/web/assets/diagram-WEQXMOUZ-DZWi4SUN.js +0 -10
- package/web/assets/erDiagram-L5TCEMPS-8X1y6R4Y.js +0 -85
- package/web/assets/eventmodeling-FCH6USID-MREXMVOE-BQm9QzEa.js +0 -1
- package/web/assets/flowDiagram-H6V6AXG4-CMpY8Ufn.js +0 -162
- package/web/assets/ganttDiagram-JCBTUEKG-D3iL2Aet.js +0 -292
- package/web/assets/gitGraph-WXDBUCRP-R675I2BI-Cr_Bm2Nb.js +0 -1
- package/web/assets/gitGraphDiagram-S2ZK5IYY-CPIDgxGm.js +0 -106
- package/web/assets/index-KctnI3Vq.js +0 -635
- package/web/assets/index-_lgn7hs5.css +0 -2
- package/web/assets/info-J43DQDTF-KCYPFFUO-Cs4p2oyk.js +0 -1
- package/web/assets/infoDiagram-3YFTVSEB-BaLMZkUg.js +0 -2
- package/web/assets/journeyDiagram-M6C3CM3L-CvArszLo.js +0 -139
- package/web/assets/kanban-definition-75IXJCU3-CpfVLLf9.js +0 -89
- package/web/assets/packet-YPE3B663-LP52Z2RK-CKCrztD2.js +0 -1
- package/web/assets/pie-LRSECV5Y-TCRJHUBD-BB7pHqoD.js +0 -1
- package/web/assets/pieDiagram-CU6KROY3-s27EFWgP.js +0 -30
- package/web/assets/radar-GUYGQ44K-RDLRG3WG-DhoTOcuK.js +0 -1
- package/web/assets/requirementDiagram-JXO7QTGE-CWhqInuf.js +0 -84
- package/web/assets/sankeyDiagram-URQDO5SZ-1qEjlFIB.js +0 -40
- package/web/assets/sequenceDiagram-VS2MUI6T-RyTlZ5cR.js +0 -162
- package/web/assets/stateDiagram-7D4R322I-DTjVfX4A.js +0 -1
- package/web/assets/stateDiagram-v2-36443NZ5-xY9_k9_Q.js +0 -1
- package/web/assets/timeline-definition-O6YCAMPW-DrrqLYAf.js +0 -120
- package/web/assets/treeView-BLDUP644-QA4HXRO3-ODehyGKL.js +0 -1
- package/web/assets/treemap-LRROVOQU-LLAWBHMP-BfpgC-7o.js +0 -1
- package/web/assets/vennDiagram-MWXL3ELB-B0RkWAim.js +0 -34
- package/web/assets/wardley-L42UT6IY-5TKZOOLJ-CNeL6VHE.js +0 -1
- package/web/assets/wardleyDiagram-CUQ6CDDI-boUxiQ5F.js +0 -78
|
@@ -0,0 +1,348 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: gitnexus-plan
|
|
3
|
+
description: 'Use when you need a deep, implementation-ready engineering plan for a code change — built from GitNexus graph intelligence, statement-level PDG analysis, and targeted source verification, compact enough that an implementation agent can start without re-investigating. Also strengthens existing plans via Deepen mode. Examples: "/gitnexus-plan Add retry support to the ingestion pipeline", "/gitnexus-plan deepen docs/plans/<plan>.md", "plan this change using the knowledge graph".'
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# gitnexus-plan — implementation-ready engineering plans
|
|
7
|
+
|
|
8
|
+
Produce an implementation-ready plan for an engineering task. GitNexus is the
|
|
9
|
+
navigation layer (where to look), statement-level PDG is the constraint layer
|
|
10
|
+
(what gates and feeds the behavior), and your native targeted source reads are
|
|
11
|
+
the verification layer (what is actually true right now). The output is a plan
|
|
12
|
+
document plus a compact, machine-readable **implementation context pack**
|
|
13
|
+
that a follow-up implementation agent (`gitnexus-work`, or any executor) can
|
|
14
|
+
consume without repeating the investigation.
|
|
15
|
+
|
|
16
|
+
```
|
|
17
|
+
/gitnexus-plan <task description>
|
|
18
|
+
/gitnexus-plan impact_depth:3 depth:deep <task description> # knob overrides, see Configuration
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
**This skill plans. It never implements.** Do not modify production code,
|
|
22
|
+
tests, or configuration while running it. The only repository file it writes
|
|
23
|
+
is the plan document (a working ledger kept outside the repo is fine). The
|
|
24
|
+
only other permitted state change is an index refresh via
|
|
25
|
+
`analyze --index-only`, which writes only the `.gitnexus` index store. It
|
|
26
|
+
must not build analyzer `dist/` output and must not mutate source, tests,
|
|
27
|
+
configuration, or evaluation data. Stale analyzer provenance is disclosed as
|
|
28
|
+
a source-weighted limitation, never repaired by a planning run.
|
|
29
|
+
|
|
30
|
+
## Hard rules
|
|
31
|
+
|
|
32
|
+
- **Ledger first.** Before every GitNexus call and every repo file read, check
|
|
33
|
+
the context ledger. Never repeat a query or reread an unchanged range that
|
|
34
|
+
already answered the same question (allowed repeats are defined in
|
|
35
|
+
`references/context-ledger.md`; this skill's own reference files are exempt
|
|
36
|
+
from ledger bookkeeping).
|
|
37
|
+
- **Every graph query answers a named planning question.** Record the question
|
|
38
|
+
and the conclusion in the ledger. No exploratory dredging.
|
|
39
|
+
- **Source beats graph.** The graph navigates; current source is authoritative.
|
|
40
|
+
Verify before asserting (see Phase 4). Comments are the weakest evidence —
|
|
41
|
+
never stronger than executable code.
|
|
42
|
+
- **No fabrication.** Never invent symbols, filenames, test names, tool
|
|
43
|
+
results, or PDG edges. Unknowns go to _Assumptions and Open Questions_.
|
|
44
|
+
- **No scope creep.** Adjacent refactors the task didn't ask for go to plan
|
|
45
|
+
§12 as explicitly-deferred follow-ups, not into Proposed Changes.
|
|
46
|
+
- **Pin working-tree evidence, not only HEAD.** Every plan form carries the
|
|
47
|
+
versioned global dirty digest and sorted cited-path manifest defined in
|
|
48
|
+
`references/context-ledger.md`. Generate it only with the portable helper
|
|
49
|
+
and byte contract in `scripts/evidence-provenance.mjs` and
|
|
50
|
+
`references/evidence-provenance.md`; never reimplement the digest.
|
|
51
|
+
- **Write the plan only through the helper.** The generated-plan path is a
|
|
52
|
+
normalized repo-relative
|
|
53
|
+
`docs/plans/YYYY-MM-DD-gitnexus-plan-<3-5-word-slug>.md` path. Compose the
|
|
54
|
+
complete UTF-8 document in memory or in a scratchpad outside the target
|
|
55
|
+
repo, then pass it on stdin to the helper's `write-plan` command. Never
|
|
56
|
+
write the destination directly or fall back to an external output path when
|
|
57
|
+
the safe writer fails.
|
|
58
|
+
- **Read an existing plan only through the helper.** Deepen must invoke
|
|
59
|
+
`scripts/evidence-provenance.mjs read-plan`, parse the exact decoded
|
|
60
|
+
`plan_bytes_base64` from its descriptor-anchored receipt, and retain that
|
|
61
|
+
receipt's canonical `generated_plan_path` and `plan_digest` as one binding.
|
|
62
|
+
Never parse a direct lexical-path read or apply one plan's digest to another
|
|
63
|
+
path.
|
|
64
|
+
- **Stop when you have enough.** Sufficient evidence ends exploration; plans
|
|
65
|
+
do not improve monotonically with tokens spent.
|
|
66
|
+
|
|
67
|
+
## Phase 0 — Parse and classify
|
|
68
|
+
|
|
69
|
+
Read `references/context-ledger.md` and open the ledger with the task:
|
|
70
|
+
original request, interpreted goal, acceptance criteria. Classify the task:
|
|
71
|
+
|
|
72
|
+
| Category | Posture (depth · plan form · tool-call budget · freshness) |
|
|
73
|
+
| ------------------------------ | -------------------------------------------------------------------------------- |
|
|
74
|
+
| Bug fix (local) | Narrow, 1–2 primary symbols, `impact_depth` 1 · compact · ~15 · accept |
|
|
75
|
+
| Feature | Default knobs · compact · ~30 · accept |
|
|
76
|
+
| Refactor / shared API change | Impact mandatory, `impact_depth` 3 · full · ~45 · strict |
|
|
77
|
+
| Performance | Default + performance PDG mode (`references/pdg-slice.md`) · full · ~45 · strict |
|
|
78
|
+
| Security | Default + security PDG mode + `explain` taint findings · full · ~45 · strict |
|
|
79
|
+
| Dependency upgrade / migration | Impact + compatibility focus; PDG rarely needed · compact · ~20 · accept |
|
|
80
|
+
| Concurrency / transactional | Control-flow + state-mutation PDG focus · full · ~45 · strict |
|
|
81
|
+
| Test improvement / docs | Narrowest: usually no impact or PDG pass · compact · ~10 · accept |
|
|
82
|
+
| Architecture change / spike | Widest: clusters + processes first · full · no cap · strict |
|
|
83
|
+
|
|
84
|
+
The category posture overrides the Configuration baseline; explicit `key:value`
|
|
85
|
+
invocation knobs override both. A task matching several rows combines them:
|
|
86
|
+
take the widest depth, union the focus areas.
|
|
87
|
+
|
|
88
|
+
**Seeded evidence.** When a completed investigation already supplies
|
|
89
|
+
verified findings — a finished review, a triage document with `path:line`
|
|
90
|
+
anchors and named failing scenarios — open the ledger FROM it: cite the
|
|
91
|
+
source document as the opening ledger entries and plan directly against
|
|
92
|
+
them instead of re-running the graph ladder over ground it already covers.
|
|
93
|
+
Re-deriving what the evidence proves is budget spent against the
|
|
94
|
+
turn-economy rule. Phase 4 still source-verifies whatever Proposed Changes
|
|
95
|
+
will cite, at the pinned commit — seeding replaces exploration, never
|
|
96
|
+
verification.
|
|
97
|
+
|
|
98
|
+
**Depth is the user's decision, asked once, up front.** In an interactive
|
|
99
|
+
session, when the invocation carries no explicit depth signal (no `depth:`,
|
|
100
|
+
`form:`, or `freshness:` knob, and not Deepen mode), ask one blocking
|
|
101
|
+
question before Phase 1 — how deep should this plan go?
|
|
102
|
+
|
|
103
|
+
1. **Quick** — `depth:narrow form:compact freshness:accept`. Fastest useful
|
|
104
|
+
plan: 1–2 primary symbols, minimal graph work, core sections only.
|
|
105
|
+
2. **Standard** — the category posture above, unchanged. Recommend this
|
|
106
|
+
unless the classification argues otherwise.
|
|
107
|
+
3. **Deep** — `depth:deep form:full freshness:strict`. All 13 sections,
|
|
108
|
+
`impact_depth` 3, clusters/processes read, PDG slices for the central
|
|
109
|
+
functions.
|
|
110
|
+
|
|
111
|
+
The answer sets the knobs exactly as if they had been typed in the
|
|
112
|
+
invocation; explicit knobs win and skip the question. Headless runs never
|
|
113
|
+
ask — the category posture applies unchanged. Asking up front replaces
|
|
114
|
+
offering to deepen a finished plan afterwards: Deepen mode (below) remains
|
|
115
|
+
the mechanism for strengthening an existing plan document — a later session,
|
|
116
|
+
review findings, an executor route-back — not a default follow-up question.
|
|
117
|
+
|
|
118
|
+
**Turn economy is a deliverable.** The plan is judged on decision quality per
|
|
119
|
+
token, not thoroughness theater (measured: a 63-turn plan for a two-line
|
|
120
|
+
change — the GitNexus repo's `eval/workflow_bench/`). Stay within the category's tool-call
|
|
121
|
+
budget; when the budget runs out with questions still open, record them in
|
|
122
|
+
§12 instead of digging further — the executor re-verifies cheaply anyway.
|
|
123
|
+
|
|
124
|
+
## Phase 1 — Anchor and freshness
|
|
125
|
+
|
|
126
|
+
1. Resolve the target repo: `list_repos` if in doubt, else the indexed repo
|
|
127
|
+
covering the working directory. Pass `repo` explicitly on every call when
|
|
128
|
+
more than one repo is indexed.
|
|
129
|
+
2. Record the repo's current HEAD commit in the ledger — every line-number
|
|
130
|
+
citation in the plan is pinned to it.
|
|
131
|
+
3. **Resolve and record the analyzer runner** (used by every `analyze`
|
|
132
|
+
command in this skill): `node .gitnexus/run.cjs analyze …` when the
|
|
133
|
+
project has a runner (a previous analyze dropped it next to the index),
|
|
134
|
+
else `gitnexus analyze …` (installed CLI — `npm install -g gitnexus`),
|
|
135
|
+
else `npx gitnexus analyze …`. Record its path/version and any available
|
|
136
|
+
source/build identity; do not manufacture provenance from timestamps.
|
|
137
|
+
4. Read `gitnexus://repo/{name}/context` — codebase overview + staleness check.
|
|
138
|
+
**Freshness gate.** Plans built on a stale graph make stale blast-radius
|
|
139
|
+
claims — but a re-index is the largest fixed cost a planning session
|
|
140
|
+
carries, so the gate is category-priced:
|
|
141
|
+
- Compact-plan categories default to `freshness: accept`: plan on the
|
|
142
|
+
current graph with source verification weighted higher — their plans
|
|
143
|
+
cite little graph evidence. Escalate to a refresh mid-plan only when a
|
|
144
|
+
graph claim becomes load-bearing (e.g. Proposed Changes rest on a d=1
|
|
145
|
+
dependent list), and only then.
|
|
146
|
+
- Full-plan categories default to `freshness: strict`, and under it:
|
|
147
|
+
- **Analyzer provenance check — before any refresh.** Compare the resolved
|
|
148
|
+
runner identity with the index metadata and, in an analyzer-source
|
|
149
|
+
checkout, with current analyzer source. If identity is stale or unknown,
|
|
150
|
+
do not build output and do not make that graph load-bearing. Record a
|
|
151
|
+
**stale analyzer provenance — source-weighted limitation** in
|
|
152
|
+
`index_refresh`, the plan header, and §12; rely on targeted source reads
|
|
153
|
+
or hand execution to `gitnexus-work`, which owns the build-current gate.
|
|
154
|
+
- Stale index → run `analyze --index-only` via the resolved runner
|
|
155
|
+
(append `--pdg` when the task category will reach Phase 3) and re-read
|
|
156
|
+
the context resource **only when runner provenance is known-current**.
|
|
157
|
+
Refresh budget, stated once here: at most one `--index-only` refresh in
|
|
158
|
+
Phase 1 **plus** at most one later `--pdg` upgrade in Phase 3 (only when
|
|
159
|
+
Phase 1's refresh lacked `--pdg`) per planning session — a Deepen run is
|
|
160
|
+
its own session. Record each command, runner identity, and outcome in the
|
|
161
|
+
ledger's `index_refresh`.
|
|
162
|
+
- Refresh failed or impractical (no write access to the index, prohibitive
|
|
163
|
+
repo size), or `freshness: accept` was passed → proceed on the stale
|
|
164
|
+
graph, weight source verification higher, and state the staleness and
|
|
165
|
+
the skipped refresh in the plan header and Assumptions.
|
|
166
|
+
- Resources unreadable but tools working → proceed on tools alone, treat
|
|
167
|
+
freshness as unknown (weight source higher), and note it in the plan.
|
|
168
|
+
- GitNexus unavailable entirely → switch to **Fallback mode** (below).
|
|
169
|
+
5. For architecture-scale tasks only, also read
|
|
170
|
+
`gitnexus://repo/{name}/clusters` and `.../processes`.
|
|
171
|
+
|
|
172
|
+
## Phase 2 — Graph navigation ladder
|
|
173
|
+
|
|
174
|
+
Use the narrowest operation that answers the current ledger question, in this
|
|
175
|
+
order. Budgets: at most `max_primary_symbols` (5) primary symbols and
|
|
176
|
+
`max_related_symbols` (20) related symbols active in the ledger.
|
|
177
|
+
|
|
178
|
+
1. `query {search_query, task_context}` — locate concepts, execution flows,
|
|
179
|
+
modules, and related tests for the task.
|
|
180
|
+
2. `context {name}` — 360° view of each candidate primary symbol: callers,
|
|
181
|
+
callees, categorized refs, processes. Promote to primary or discard. An
|
|
182
|
+
`ambiguous` result (ranked candidates) is answered by one retry narrowed
|
|
183
|
+
with `kind` / `file_path` / uid — that retry is an allowed repeat.
|
|
184
|
+
3. `impact {target, direction}` — upstream/downstream blast radius for shared
|
|
185
|
+
or high-connectivity symbols (`maxDepth` = `impact_depth`; `summaryOnly:
|
|
186
|
+
true` first for hub symbols, then drill in — an allowed repeat). Record the
|
|
187
|
+
d=1 items — the **direct (depth-1) dependents** — the plan must account
|
|
188
|
+
for every one of them.
|
|
189
|
+
4. `trace {from, to}` — when the task hinges on _how A reaches B_, one call
|
|
190
|
+
instead of chained context hops.
|
|
191
|
+
5. Statement-level PDG — Phase 3, for the functions the change centers on.
|
|
192
|
+
6. `cypher` — last resort, only for a precise graph question the tools above
|
|
193
|
+
cannot express. Read `gitnexus://repo/{name}/schema` first; anchor and
|
|
194
|
+
LIMIT every query.
|
|
195
|
+
7. `detect_changes {scope}` — only when planning against existing uncommitted
|
|
196
|
+
or branch work.
|
|
197
|
+
|
|
198
|
+
Do not run every tool by default. A local test fix may finish the ladder at
|
|
199
|
+
step 2.
|
|
200
|
+
|
|
201
|
+
## Phase 3 — Statement-level PDG slice
|
|
202
|
+
|
|
203
|
+
For the 1–3 functions most central to the change, build a bounded **PDG
|
|
204
|
+
context slice**. Read `references/pdg-slice.md` and follow it — it owns the
|
|
205
|
+
tool calls, inclusion criteria, depth bounds, slice schema, the security and
|
|
206
|
+
performance modes, and the no-PDG-layer fallback.
|
|
207
|
+
|
|
208
|
+
## Phase 4 — Targeted source verification
|
|
209
|
+
|
|
210
|
+
GitNexus said where to look; now confirm what is there. Using ordinary file
|
|
211
|
+
reads (exact line ranges, not whole files unless genuinely required):
|
|
212
|
+
|
|
213
|
+
- Read every source range the plan will cite: signatures, branch conditions,
|
|
214
|
+
state mutations, error paths, nearby comments that change behavior. Compact
|
|
215
|
+
plans cite less — verify what they cite, don't expand the citation set to
|
|
216
|
+
have more to verify.
|
|
217
|
+
- Read the tests GitNexus associated with the primary symbols; never claim a
|
|
218
|
+
test exists without having located it.
|
|
219
|
+
- Verify the build/test commands the plan will name actually exist
|
|
220
|
+
(package.json scripts / CI workflows), and prefer the script form that
|
|
221
|
+
carries its prerequisites (pre-hooks) over invoking underlying binaries
|
|
222
|
+
directly.
|
|
223
|
+
- Check repo conventions that constrain the change (AGENTS.md, GUARDRAILS.md,
|
|
224
|
+
lint/build config) — only the parts the change touches.
|
|
225
|
+
- Mark each ledger symbol `source_verified: true` as you go. **A symbol that
|
|
226
|
+
is named in Proposed Changes must be source-verified.**
|
|
227
|
+
- On graph/source disagreement: trust source, record the discrepancy in the
|
|
228
|
+
ledger and the plan, recommend re-indexing. Never present stale graph data
|
|
229
|
+
as fact.
|
|
230
|
+
- Immediately before composition, recompute the versioned
|
|
231
|
+
`evidence_provenance` snapshot by invoking
|
|
232
|
+
`scripts/evidence-provenance.mjs` exactly as specified in
|
|
233
|
+
`references/evidence-provenance.md`: the
|
|
234
|
+
canonical global dirty digest over all dirty paths and the sorted manifest
|
|
235
|
+
of every cited path, including object kind and
|
|
236
|
+
HEAD/index/worktree/untracked layer digests. Re-read any citation that
|
|
237
|
+
changed during planning. Exclude only the generated plan path.
|
|
238
|
+
|
|
239
|
+
Evidence hierarchy, strongest first: current source and config → current tests
|
|
240
|
+
and executable behavior → compiler/build/lint output → GitNexus graph and PDG
|
|
241
|
+
→ documentation and comments.
|
|
242
|
+
|
|
243
|
+
## Phase 5 — Compose the plan
|
|
244
|
+
|
|
245
|
+
1. Read `references/plan-template.md` and fill the category's form — compact
|
|
246
|
+
(core sections, ≤80 lines excluding the pack) or full (all 13 sections) —
|
|
247
|
+
from the ledger, tagging claims with the template's four classes —
|
|
248
|
+
`[verified]`, `[graph]`, `[inferred]`, `[assumed]` — and routing open
|
|
249
|
+
questions to §12.
|
|
250
|
+
2. Build the implementation context pack per `references/context-pack.md`
|
|
251
|
+
(this is section 11 of the plan), including mandatory
|
|
252
|
+
`evidence_provenance` in compact and full forms.
|
|
253
|
+
3. Set `generated_plan_path` to
|
|
254
|
+
`docs/plans/YYYY-MM-DD-gitnexus-plan-<slug>.md` under the root of the repo
|
|
255
|
+
being planned (the Phase 1 target repo, not necessarily the cwd); use a
|
|
256
|
+
3–5-word kebab-case slug and repo-relative paths inside the document.
|
|
257
|
+
Compose the complete document without creating that destination, then
|
|
258
|
+
pipe its exact UTF-8 bytes to `scripts/evidence-provenance.mjs write-plan`
|
|
259
|
+
as specified in `references/evidence-provenance.md`. The helper safely
|
|
260
|
+
creates missing parent directories. Initial planning must not pass
|
|
261
|
+
`--replace`. A safe-write failure blocks plan publication: report it and
|
|
262
|
+
do not write directly, choose an external destination, or weaken the
|
|
263
|
+
repo-relative provenance contract. The snapshot and writer commands apply
|
|
264
|
+
the same strict generated-plan filename/date validator; do not substitute a
|
|
265
|
+
source, `.git`, or arbitrary `docs/plans/` path in either invocation.
|
|
266
|
+
4. Present in chat: objective, proposed-changes summary, implementation
|
|
267
|
+
sequence, top risks, open questions, and the plan file path. Do not paste
|
|
268
|
+
the whole document into chat.
|
|
269
|
+
|
|
270
|
+
## Deepen mode
|
|
271
|
+
|
|
272
|
+
`/gitnexus-plan deepen <plan-path>` strengthens an existing plan in place
|
|
273
|
+
instead of creating a new one:
|
|
274
|
+
|
|
275
|
+
1. Resolve the target repository and normalized repo-relative plan candidate,
|
|
276
|
+
then load it with `scripts/evidence-provenance.mjs read-plan --repo <root>
|
|
277
|
+
--generated-plan <candidate>` exactly as specified in
|
|
278
|
+
`references/evidence-provenance.md`. Reject a missing, external, escaping,
|
|
279
|
+
symlinked, or differently scoped path. Decode and parse only the receipt's
|
|
280
|
+
exact `plan_bytes_base64`; retain its canonical `generated_plan_path` and
|
|
281
|
+
`plan_digest` unchanged for the entire Deepen session.
|
|
282
|
+
2. Re-run Phase 1 in full — analyzer provenance check and freshness gate (a
|
|
283
|
+
Deepen run is its own session, with its own refresh budget).
|
|
284
|
+
3. **Re-anchor before re-pinning.** Recompute the plan's global dirty digest
|
|
285
|
+
and cited-path manifest as well as comparing its old HEAD pin with current
|
|
286
|
+
HEAD. Changed, renamed, deleted, mixed, or newly absent cited paths get
|
|
287
|
+
their ranges re-read — or the claim downgraded — _before_ the pin and
|
|
288
|
+
provenance snapshot move. Moving only the commit pin silently launders
|
|
289
|
+
dirty or stale claims as verified.
|
|
290
|
+
4. Escalate to `depth: deep` (impact_depth 3, clusters/processes read)
|
|
291
|
+
unless the invocation overrides knobs explicitly.
|
|
292
|
+
5. Seed the ledger from the plan's §11 pack, then re-verify: every
|
|
293
|
+
`[graph]`/`[inferred]` claim gets a targeted pass toward `[verified]`;
|
|
294
|
+
every `[assumed]` claim is resolved or kept with its reason; direct
|
|
295
|
+
(d=1) dependent accounting is re-checked against the refreshed graph;
|
|
296
|
+
PDG slices are built or expanded for the central functions when the
|
|
297
|
+
layer is present.
|
|
298
|
+
6. **Reconcile execution state.** If `gitnexus-work` already landed commits
|
|
299
|
+
for this plan (a mid-execution route-back), mark the §7 steps present at
|
|
300
|
+
HEAD as completed and re-sequence the remainder — the rewritten plan must
|
|
301
|
+
be executable from the top without redoing landed steps.
|
|
302
|
+
7. Strengthen whatever the deeper pass showed thin — test scenarios, risks,
|
|
303
|
+
Definition of Done — and carry claim-tag upgrades through the prose.
|
|
304
|
+
8. Rewrite the **same canonical file** through
|
|
305
|
+
`scripts/evidence-provenance.mjs write-plan --replace
|
|
306
|
+
--expected-plan-path <retained-read-plan-path>
|
|
307
|
+
--expected-plan-digest <retained-read-plan-digest>`: same 13 sections,
|
|
308
|
+
context pack kept in sync, evidence header updated. `--replace` is reserved
|
|
309
|
+
for Deepen mode, and both expected values must come from the same read-plan
|
|
310
|
+
receipt; any digest/path mismatch blocks publication. Retain the successful receipt's
|
|
311
|
+
`prior_plan_backup_git_path`; it names the verified Git-admin backup of the
|
|
312
|
+
displaced plan. Summarize the delta in chat: claims upgraded, claims that
|
|
313
|
+
failed re-verification, sections changed, and that backup path.
|
|
314
|
+
|
|
315
|
+
## Configuration
|
|
316
|
+
|
|
317
|
+
Baseline defaults — the Phase 0 category posture overrides them, and inline
|
|
318
|
+
`key:value` tokens before the task text override both (the repo has no
|
|
319
|
+
skill-config file mechanism; invocation args are the mechanism):
|
|
320
|
+
|
|
321
|
+
| Knob | Default | Meaning |
|
|
322
|
+
| --------------------- | ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
323
|
+
| `depth` | by category | `narrow` = `impact_depth` 1, PDG only if one function is clearly central; `default` = this table; `deep` = `impact_depth` 3 + clusters/processes read |
|
|
324
|
+
| `form` | by category | `compact` (core sections + mini-pack, ≤80 lines excl. pack — see `references/plan-template.md`) or `full` (all 13 sections) |
|
|
325
|
+
| `impact_depth` | 2 | `maxDepth` for `impact` |
|
|
326
|
+
| `pdg_data_depth` | 2 | Data-dependence hops in the PDG slice |
|
|
327
|
+
| `pdg_control_depth` | 2 | Control-dependence hops in the PDG slice |
|
|
328
|
+
| `max_primary_symbols` | 5 | Ledger budget (active symbols; discards don't count) |
|
|
329
|
+
| `max_related_symbols` | 20 | Ledger budget (active symbols; discards don't count) |
|
|
330
|
+
| `max_snippet_lines` | 30 | Longest source excerpt quoted in the plan |
|
|
331
|
+
| `freshness` | by category | `strict` (full-plan categories) = refresh a stale index (and a missing PDG layer) with `analyze --index-only [--pdg]` before relying on the graph; `accept` (compact categories) = plan on the current graph, source-weighted and labelled, refreshing only if a graph claim becomes load-bearing |
|
|
332
|
+
|
|
333
|
+
## Fallback mode (GitNexus or PDG unavailable)
|
|
334
|
+
|
|
335
|
+
1. Say so, first thing, in chat and in the plan.
|
|
336
|
+
2. Use targeted repo exploration (grep/glob/reads) to approximate callers,
|
|
337
|
+
dependencies, execution flow, state changes, and related tests.
|
|
338
|
+
3. Label every such finding **source-derived** in the plan — never present it
|
|
339
|
+
as graph-derived, and never fabricate statement-level edges.
|
|
340
|
+
4. Recommend `analyze --index-only` (add `--pdg` for the PDG layers) via
|
|
341
|
+
the resolved runner — `node .gitnexus/run.cjs`, installed `gitnexus`, or
|
|
342
|
+
`npx gitnexus` — when it would materially raise confidence.
|
|
343
|
+
|
|
344
|
+
## Skill feedback
|
|
345
|
+
|
|
346
|
+
If this run exposed friction in the instructions, include concise feedback in
|
|
347
|
+
the final response. Feedback is chat-only: do not append evaluation learnings,
|
|
348
|
+
edit benchmark data, or modify this skill during a live planning task.
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
# Context ledger
|
|
2
|
+
|
|
3
|
+
The ledger is gitnexus-plan's working memory. It exists to make repeated
|
|
4
|
+
investigation impossible-by-discipline: **before every GitNexus call and
|
|
5
|
+
every repo file read, check it.** Keep it as structured notes in your working
|
|
6
|
+
context (or a scratchpad file _outside the repo_ for very long sessions); it
|
|
7
|
+
is never published verbatim — the plan and context pack are distilled from
|
|
8
|
+
it. This skill's own reference files are exempt from ledger bookkeeping.
|
|
9
|
+
|
|
10
|
+
## Schema
|
|
11
|
+
|
|
12
|
+
```yaml
|
|
13
|
+
context_ledger:
|
|
14
|
+
task:
|
|
15
|
+
original_request: ''
|
|
16
|
+
interpreted_goal: ''
|
|
17
|
+
category: '' # Phase 0 classification
|
|
18
|
+
acceptance_criteria: []
|
|
19
|
+
|
|
20
|
+
verified_at_commit:
|
|
21
|
+
'' # target repo HEAD, recorded once in Phase 1;
|
|
22
|
+
# every line citation in the plan pins to it
|
|
23
|
+
|
|
24
|
+
evidence_provenance: {} # required immutable working snapshot; populate
|
|
25
|
+
# exactly from context-pack.md's normative schema
|
|
26
|
+
|
|
27
|
+
index_refresh:
|
|
28
|
+
'' # analyze --index-only runs: command + outcome
|
|
29
|
+
# (or "skipped: <reason>"). Budget is
|
|
30
|
+
# owned by SKILL.md Phase 1: one refresh plus
|
|
31
|
+
# at most one Phase 3 --pdg upgrade per session
|
|
32
|
+
|
|
33
|
+
established_facts: [] # each with its evidence source
|
|
34
|
+
|
|
35
|
+
symbols: # budgets count active (primary/related) only;
|
|
36
|
+
# discards are free — but on budget overflow,
|
|
37
|
+
# discard something before promoting
|
|
38
|
+
- name: ''
|
|
39
|
+
kind: ''
|
|
40
|
+
file: ''
|
|
41
|
+
relevance: 'primary | related | discarded'
|
|
42
|
+
source_verified: false # flipped in Phase 4; required before naming in Proposed Changes
|
|
43
|
+
|
|
44
|
+
files_read:
|
|
45
|
+
- file: ''
|
|
46
|
+
ranges: [] # e.g. ["120-188"]
|
|
47
|
+
purpose: ''
|
|
48
|
+
|
|
49
|
+
gitnexus_queries:
|
|
50
|
+
- query: '' # tool + args
|
|
51
|
+
purpose: '' # the planning question it answers
|
|
52
|
+
conclusion: '' # one line; details stay in working memory
|
|
53
|
+
key_output: '' # one-line raw quote when the plan leans on this result
|
|
54
|
+
|
|
55
|
+
pdg_slices:
|
|
56
|
+
- symbol: ''
|
|
57
|
+
purpose: ''
|
|
58
|
+
conclusion: ''
|
|
59
|
+
|
|
60
|
+
unresolved_questions: []
|
|
61
|
+
assumptions: [] # explicit, carried into plan §12
|
|
62
|
+
decisions: [] # with rationale, carried into plan §6/§7
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
## Evidence provenance
|
|
66
|
+
|
|
67
|
+
`context-pack.md` is the sole normative emitted field schema, and
|
|
68
|
+
`evidence-provenance.md` plus `../scripts/evidence-provenance.mjs` are the
|
|
69
|
+
normative byte contract and implementation. Keep the helper's exact schema-2
|
|
70
|
+
output in the ledger; do not redefine, abbreviate, or independently reproduce
|
|
71
|
+
its canonicalization here.
|
|
72
|
+
|
|
73
|
+
Build `evidence_provenance` immediately before composing the plan, after all
|
|
74
|
+
source verification, by invoking the helper exactly as described in
|
|
75
|
+
`evidence-provenance.md`. It is a versioned, canonical snapshot of both the
|
|
76
|
+
whole working tree and every path that supports a plan citation:
|
|
77
|
+
|
|
78
|
+
- `global_dirty_digest` is SHA-256 over the helper's versioned, NUL-framed
|
|
79
|
+
records for
|
|
80
|
+
**every dirty repo-relative path**, not only cited paths. Each record includes
|
|
81
|
+
path, state, object kind, every available layer digest, and both endpoints of
|
|
82
|
+
a rename. Overlapping porcelain facts for one path are merged; for example,
|
|
83
|
+
a staged deletion plus a recreated untracked file is `mixed` and retains
|
|
84
|
+
both its Git-backed and untracked layers. States are `staged`, `unstaged`,
|
|
85
|
+
`untracked`, `deleted`, `renamed`, or `mixed`. Exclude only this run's
|
|
86
|
+
normalized repo-relative generated plan path so writing the plan cannot
|
|
87
|
+
invalidate its own evidence; do not exclude the rest of `docs/plans/`.
|
|
88
|
+
- `cited_path_manifest` is sorted by normalized repo-relative path and
|
|
89
|
+
includes every path cited by a `[verified]` claim or named as evidence in
|
|
90
|
+
the context pack. Record clean paths too. A path entry has this shape:
|
|
91
|
+
|
|
92
|
+
```yaml
|
|
93
|
+
- path: 'src/example.ts'
|
|
94
|
+
object_kind: # each layer: regular | symlink | gitlink | directory | absent
|
|
95
|
+
head: 'regular'
|
|
96
|
+
index: 'regular'
|
|
97
|
+
worktree: 'regular'
|
|
98
|
+
untracked: 'absent'
|
|
99
|
+
state: 'clean | staged | unstaged | untracked | deleted | renamed | mixed | absent'
|
|
100
|
+
rename_from: null
|
|
101
|
+
rename_to: null
|
|
102
|
+
head_digest: 'sha256:<hex> | absent'
|
|
103
|
+
index_digest: 'sha256:<hex> | absent'
|
|
104
|
+
worktree_digest: 'sha256:<hex> | absent'
|
|
105
|
+
untracked_digest: 'sha256:<hex> | absent'
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
Use Git object contents for HEAD and index digests and filesystem bytes for
|
|
109
|
+
worktree/untracked digests; never confuse an absent layer with an empty file.
|
|
110
|
+
Hash symlink targets as link text and gitlinks as object IDs. If a cited path
|
|
111
|
+
cannot be classified or read, the plan must mark the evidence unavailable
|
|
112
|
+
instead of emitting a digest it did not prove.
|
|
113
|
+
|
|
114
|
+
## Reread rules
|
|
115
|
+
|
|
116
|
+
Do **not** repeat a query or reread a source range unless one of:
|
|
117
|
+
|
|
118
|
+
- the previous result was incomplete for the question at hand;
|
|
119
|
+
- the source is known to have changed (an edit happened);
|
|
120
|
+
- validation exposed a contradiction between graph and source.
|
|
121
|
+
|
|
122
|
+
**Allowed repeats** (deliberate escalations, not violations):
|
|
123
|
+
|
|
124
|
+
- `summaryOnly: true` → full drill-down on the same `impact` target;
|
|
125
|
+
- an `ambiguous` result retried once with `kind` / `file_path` / uid narrowing;
|
|
126
|
+
- the same tool re-run with a changed parameter that answers a _new_ planning
|
|
127
|
+
question (e.g. `pdg_query` `controls` then `flows` on one function).
|
|
128
|
+
|
|
129
|
+
When a repeat is justified, note in the ledger _why_ the earlier entry was
|
|
130
|
+
insufficient. A ledger full of near-duplicate queries is the failure signal —
|
|
131
|
+
stop and plan with what is established.
|
|
132
|
+
|
|
133
|
+
## Discarding
|
|
134
|
+
|
|
135
|
+
Symbols and queries that turned out irrelevant stay in the ledger marked
|
|
136
|
+
`discarded` with a one-line reason. That is what prevents re-walking dead
|
|
137
|
+
ends later in the session.
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
# Implementation context pack
|
|
2
|
+
|
|
3
|
+
Section 11 of the plan. The stable, machine-readable contract a follow-up
|
|
4
|
+
implementation agent (`gitnexus-work`, or any executor) consumes to start
|
|
5
|
+
work **without repeating the investigation**. Distilled from the ledger;
|
|
6
|
+
every entry traceable to verified evidence.
|
|
7
|
+
|
|
8
|
+
**Compact plans emit the mini-pack** — only: `task_summary`,
|
|
9
|
+
`evidence_provenance`, `files_to_modify`, `tests`,
|
|
10
|
+
`verification_commands`, `pdg_constraints` (only when a slice actually
|
|
11
|
+
ran), `assumptions`, `open_questions`, `avoid`. Full plans emit every
|
|
12
|
+
field. Field semantics are identical in both; `evidence_provenance` is
|
|
13
|
+
mandatory in both forms. `gitnexus-work` treats absent optional fields as
|
|
14
|
+
empty, not as errors.
|
|
15
|
+
|
|
16
|
+
## Schema
|
|
17
|
+
|
|
18
|
+
This is the sole normative emitted `evidence_provenance` field schema. The
|
|
19
|
+
portable byte contract and executable serializer live in
|
|
20
|
+
`evidence-provenance.md` and `../scripts/evidence-provenance.mjs`; sibling
|
|
21
|
+
documents must reference them rather than reimplementing canonical bytes.
|
|
22
|
+
|
|
23
|
+
```yaml
|
|
24
|
+
implementation_context:
|
|
25
|
+
task_summary: ''
|
|
26
|
+
acceptance_criteria: []
|
|
27
|
+
|
|
28
|
+
evidence_provenance:
|
|
29
|
+
schema_version: 2
|
|
30
|
+
head_commit: '' # full commit SHA that source citations pin to
|
|
31
|
+
# normalized repo-relative docs/plans/<date>-gitnexus-plan-<3-5-word-slug>.md;
|
|
32
|
+
# safely written; exact path excluded from global_dirty_digest
|
|
33
|
+
generated_plan_path: ''
|
|
34
|
+
global_dirty_digest:
|
|
35
|
+
algorithm: 'sha256'
|
|
36
|
+
canonicalization: 'gitnexus-evidence-provenance-v2 NUL-framed UTF-8 records'
|
|
37
|
+
value: '' # digest only; do not embed the whole dirty-path manifest
|
|
38
|
+
cited_path_manifest: # sorted by normalized repo-relative path
|
|
39
|
+
- path: ''
|
|
40
|
+
object_kind: # per layer: regular | symlink | gitlink | directory | absent
|
|
41
|
+
head: ''
|
|
42
|
+
index: ''
|
|
43
|
+
worktree: ''
|
|
44
|
+
untracked: ''
|
|
45
|
+
state: 'clean | staged | unstaged | untracked | deleted | renamed | mixed | absent'
|
|
46
|
+
rename_from: null
|
|
47
|
+
rename_to: null
|
|
48
|
+
head_digest: 'sha256:<hex> | absent'
|
|
49
|
+
index_digest: 'sha256:<hex> | absent'
|
|
50
|
+
worktree_digest: 'sha256:<hex> | absent'
|
|
51
|
+
untracked_digest: 'sha256:<hex> | absent'
|
|
52
|
+
|
|
53
|
+
primary_symbols:
|
|
54
|
+
- symbol: ''
|
|
55
|
+
file: ''
|
|
56
|
+
lines: ''
|
|
57
|
+
role: ''
|
|
58
|
+
|
|
59
|
+
related_symbols:
|
|
60
|
+
- symbol: ''
|
|
61
|
+
relationship: '' # CALLS / IMPORTS / EXTENDS / test-of / ...
|
|
62
|
+
relevance: ''
|
|
63
|
+
|
|
64
|
+
execution_path: [] # ordered prose steps, from §2/§5
|
|
65
|
+
|
|
66
|
+
pdg_constraints: # from the PDG slice; empty + note if no layer
|
|
67
|
+
- description: ''
|
|
68
|
+
affected_statements: [] # "<file>:<line>" refs
|
|
69
|
+
implementation_consequence: ''
|
|
70
|
+
|
|
71
|
+
architectural_patterns:
|
|
72
|
+
- pattern: ''
|
|
73
|
+
example_location: '' # repo-relative file (+ symbol)
|
|
74
|
+
usage_guidance: ''
|
|
75
|
+
|
|
76
|
+
files_to_modify:
|
|
77
|
+
- file: ''
|
|
78
|
+
symbols: []
|
|
79
|
+
intended_change: ''
|
|
80
|
+
|
|
81
|
+
tests:
|
|
82
|
+
- file: '' # existing file to update, or new path to create
|
|
83
|
+
scenarios: [] # input → action → expected outcome
|
|
84
|
+
|
|
85
|
+
verification_commands: [] # real commands verified to exist AND be runnable —
|
|
86
|
+
# prefer npm/CI scripts that carry their pre-hooks
|
|
87
|
+
|
|
88
|
+
risks: []
|
|
89
|
+
assumptions: [] # faithful condensation of plan §12 assumptions;
|
|
90
|
+
# each entry names WHAT to check and HOW —
|
|
91
|
+
# gitnexus-work re-verifies them before executing
|
|
92
|
+
open_questions: [] # faithful condensation of plan §12 open questions
|
|
93
|
+
|
|
94
|
+
avoid:
|
|
95
|
+
- 'Do not repeat full repository discovery'
|
|
96
|
+
- 'Do not replace established patterns without evidence'
|
|
97
|
+
# + task-specific prohibitions discovered during planning
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
## Must not contain
|
|
101
|
+
|
|
102
|
+
- full files;
|
|
103
|
+
- the repository-wide raw dirty-path manifest (store only its canonical
|
|
104
|
+
`global_dirty_digest`; detailed entries are bounded to cited paths);
|
|
105
|
+
- large raw GitNexus responses;
|
|
106
|
+
- unfiltered PDG dumps;
|
|
107
|
+
- duplicate code excerpts (cite `file:line`, don't re-quote);
|
|
108
|
+
- speculative implementation details presented as facts.
|
|
109
|
+
|
|
110
|
+
## Stability contract
|
|
111
|
+
|
|
112
|
+
Field names above are the interface consumed by `gitnexus-work` (fields it
|
|
113
|
+
does not act on directly travel as executor context). Add fields
|
|
114
|
+
freely; do not rename or repurpose existing ones. `assumptions` and `avoid`
|
|
115
|
+
are load-bearing: an executor treats `assumptions` as things to re-verify
|
|
116
|
+
cheaply before relying on them, and `avoid` as hard constraints.
|
|
117
|
+
`evidence_provenance` is also load-bearing: its version, global digest, and
|
|
118
|
+
sorted cited-path manifest let the executor distinguish commit drift from
|
|
119
|
+
staged, unstaged, untracked, deleted, renamed, mixed, or absent working-tree
|
|
120
|
+
evidence. Legacy packs that lack it or use schema 1 require a conservative
|
|
121
|
+
schema-2 re-anchor; they are not interpreted as a clean tree.
|
|
122
|
+
`generated_plan_path` is always normalized, relative to the target repo, and
|
|
123
|
+
scoped to the generated-plan filename shape under `docs/plans/`; schema 2 has
|
|
124
|
+
no external-output representation. An executor must load the plan with the
|
|
125
|
+
helper's descriptor-anchored `read-plan` command and require this field to
|
|
126
|
+
equal the receipt's canonical target-repo-relative path byte-for-byte.
|