gitnexus 1.6.6-rc.98 → 1.6.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +122 -68
- package/dist/_shared/graph/types.d.ts +17 -1
- package/dist/_shared/graph/types.d.ts.map +1 -1
- package/dist/_shared/index.d.ts +3 -5
- package/dist/_shared/index.d.ts.map +1 -1
- package/dist/_shared/index.js +2 -4
- package/dist/_shared/index.js.map +1 -1
- package/dist/_shared/scope-resolution/module-scope-index.d.ts +1 -2
- package/dist/_shared/scope-resolution/module-scope-index.d.ts.map +1 -1
- package/dist/_shared/scope-resolution/module-scope-index.js +1 -2
- package/dist/_shared/scope-resolution/module-scope-index.js.map +1 -1
- package/dist/_shared/scope-resolution/parsed-file.d.ts +24 -0
- package/dist/_shared/scope-resolution/parsed-file.d.ts.map +1 -1
- package/dist/_shared/scope-resolution/reference-site.d.ts +13 -1
- package/dist/_shared/scope-resolution/reference-site.d.ts.map +1 -1
- package/dist/_shared/scope-resolution/registries/context.d.ts +1 -0
- package/dist/_shared/scope-resolution/registries/context.d.ts.map +1 -1
- package/dist/_shared/scope-resolution/registries/context.js +6 -0
- package/dist/_shared/scope-resolution/registries/context.js.map +1 -1
- package/dist/_shared/scope-resolution/registries/evidence.d.ts +2 -3
- package/dist/_shared/scope-resolution/registries/evidence.d.ts.map +1 -1
- package/dist/_shared/scope-resolution/registries/evidence.js +2 -3
- package/dist/_shared/scope-resolution/registries/evidence.js.map +1 -1
- package/dist/_shared/scope-resolution/registries/macro-registry.d.ts +29 -0
- package/dist/_shared/scope-resolution/registries/macro-registry.d.ts.map +1 -0
- package/dist/_shared/scope-resolution/registries/macro-registry.js +32 -0
- package/dist/_shared/scope-resolution/registries/macro-registry.js.map +1 -0
- package/dist/_shared/scope-resolution/symbol-definition.d.ts +9 -0
- package/dist/_shared/scope-resolution/symbol-definition.d.ts.map +1 -1
- package/dist/_shared/scope-resolution/types.d.ts +1 -1
- package/dist/_shared/scope-resolution/types.d.ts.map +1 -1
- package/dist/cli/ai-context.d.ts +35 -1
- package/dist/cli/ai-context.js +111 -12
- package/dist/cli/analyze-config.d.ts +92 -0
- package/dist/cli/analyze-config.js +364 -0
- package/dist/cli/analyze.d.ts +17 -1
- package/dist/cli/analyze.js +224 -71
- package/dist/cli/cli-message.d.ts +1 -1
- package/dist/cli/doctor.d.ts +18 -0
- package/dist/cli/doctor.js +32 -0
- package/dist/cli/i18n/en.d.ts +2 -2
- package/dist/cli/i18n/en.js +2 -2
- package/dist/cli/i18n/resources.d.ts +2 -2
- package/dist/cli/i18n/zh-CN.js +2 -2
- package/dist/cli/index.js +4 -2
- package/dist/cli/resolve-invocation.d.ts +21 -0
- package/dist/cli/resolve-invocation.js +68 -0
- package/dist/cli/setup.d.ts +33 -0
- package/dist/cli/setup.js +96 -35
- package/dist/cli/skill-gen.js +2 -2
- package/dist/cli/wiki.js +20 -4
- package/dist/core/embeddings/embedder.d.ts +1 -1
- package/dist/core/embeddings/embedder.js +14 -1
- package/dist/core/embeddings/runtime-support.d.ts +41 -0
- package/dist/core/embeddings/runtime-support.js +65 -0
- package/dist/core/group/extractors/grpc-patterns/proto.js +2 -1
- package/dist/core/group/extractors/http-patterns/java.js +15 -1
- package/dist/core/ingestion/call-processor.d.ts +57 -227
- package/dist/core/ingestion/call-processor.js +172 -2595
- package/dist/core/ingestion/call-routing.d.ts +6 -5
- package/dist/core/ingestion/call-routing.js +6 -6
- package/dist/core/ingestion/call-types.d.ts +0 -75
- package/dist/core/ingestion/class-extractors/configs/c-cpp.js +26 -1
- package/dist/core/ingestion/class-extractors/configs/ruby.js +3 -0
- package/dist/core/ingestion/class-extractors/generic.js +9 -11
- package/dist/core/ingestion/class-types.d.ts +23 -0
- package/dist/core/ingestion/cobol/cobol-preprocessor.d.ts +11 -0
- package/dist/core/ingestion/cobol/cobol-preprocessor.js +227 -73
- package/dist/core/ingestion/cobol-processor.d.ts +1 -0
- package/dist/core/ingestion/cobol-processor.js +51 -2
- package/dist/core/ingestion/emit-references.js +8 -2
- package/dist/core/ingestion/export-detection.d.ts +2 -1
- package/dist/core/ingestion/export-detection.js +2 -6
- package/dist/core/ingestion/field-extractors/configs/dart.d.ts +0 -6
- package/dist/core/ingestion/field-extractors/configs/dart.js +62 -44
- package/dist/core/ingestion/field-extractors/configs/go.d.ts +0 -9
- package/dist/core/ingestion/field-extractors/configs/go.js +40 -1
- package/dist/core/ingestion/field-extractors/configs/jvm.js +43 -4
- package/dist/core/ingestion/field-extractors/configs/php.js +1 -2
- package/dist/core/ingestion/field-extractors/configs/swift.d.ts +12 -1
- package/dist/core/ingestion/field-extractors/configs/swift.js +31 -6
- package/dist/core/ingestion/field-extractors/generic.d.ts +6 -0
- package/dist/core/ingestion/field-extractors/generic.js +5 -4
- package/dist/core/ingestion/field-extractors/typescript.js +0 -29
- package/dist/core/ingestion/filesystem-walker.d.ts +0 -9
- package/dist/core/ingestion/filesystem-walker.js +0 -11
- package/dist/core/ingestion/finalize-orchestrator.js +14 -2
- package/dist/core/ingestion/import-resolvers/configs/swift.d.ts +21 -0
- package/dist/core/ingestion/import-resolvers/configs/swift.js +72 -11
- package/dist/core/ingestion/import-resolvers/python.d.ts +1 -1
- package/dist/core/ingestion/import-resolvers/standard.d.ts +2 -2
- package/dist/core/ingestion/import-resolvers/standard.js +6 -5
- package/dist/core/ingestion/import-resolvers/utils.d.ts +2 -5
- package/dist/core/ingestion/import-resolvers/utils.js +1 -9
- package/dist/core/ingestion/language-provider.d.ts +39 -119
- package/dist/core/ingestion/language-provider.js +0 -2
- package/dist/core/ingestion/languages/c/capture-side-channel.d.ts +62 -0
- package/dist/core/ingestion/languages/c/capture-side-channel.js +65 -0
- package/dist/core/ingestion/languages/c/captures.js +41 -23
- package/dist/core/ingestion/languages/c/import-decomposer.d.ts +9 -0
- package/dist/core/ingestion/languages/c/import-decomposer.js +15 -0
- package/dist/core/ingestion/languages/c/import-target.js +52 -9
- package/dist/core/ingestion/languages/c/index.d.ts +2 -1
- package/dist/core/ingestion/languages/c/index.js +2 -1
- package/dist/core/ingestion/languages/c/query.js +15 -0
- package/dist/core/ingestion/languages/c/scope-resolver.js +47 -4
- package/dist/core/ingestion/languages/c/static-linkage.d.ts +8 -0
- package/dist/core/ingestion/languages/c/static-linkage.js +46 -1
- package/dist/core/ingestion/languages/c-cpp.js +16 -7
- package/dist/core/ingestion/languages/cobol/captures.js +25 -2
- package/dist/core/ingestion/languages/cpp/adl.d.ts +88 -4
- package/dist/core/ingestion/languages/cpp/adl.js +380 -160
- package/dist/core/ingestion/languages/cpp/arity-metadata.js +2 -8
- package/dist/core/ingestion/languages/cpp/capture-side-channel.d.ts +65 -0
- package/dist/core/ingestion/languages/cpp/capture-side-channel.js +78 -0
- package/dist/core/ingestion/languages/cpp/captures.js +162 -54
- package/dist/core/ingestion/languages/cpp/file-local-linkage.d.ts +18 -52
- package/dist/core/ingestion/languages/cpp/file-local-linkage.js +49 -1
- package/dist/core/ingestion/languages/cpp/import-decomposer.d.ts +7 -0
- package/dist/core/ingestion/languages/cpp/import-decomposer.js +12 -0
- package/dist/core/ingestion/languages/cpp/index.d.ts +1 -0
- package/dist/core/ingestion/languages/cpp/index.js +1 -0
- package/dist/core/ingestion/languages/cpp/inline-namespaces.d.ts +8 -0
- package/dist/core/ingestion/languages/cpp/inline-namespaces.js +21 -0
- package/dist/core/ingestion/languages/cpp/query.js +21 -0
- package/dist/core/ingestion/languages/cpp/range-bindings.js +20 -5
- package/dist/core/ingestion/languages/cpp/scope-resolver.js +52 -5
- package/dist/core/ingestion/languages/cpp/two-phase-lookup.d.ts +20 -0
- package/dist/core/ingestion/languages/cpp/two-phase-lookup.js +83 -3
- package/dist/core/ingestion/languages/csharp/captures.js +205 -41
- package/dist/core/ingestion/languages/csharp/index.d.ts +3 -4
- package/dist/core/ingestion/languages/csharp/index.js +3 -4
- package/dist/core/ingestion/languages/csharp/interpret.js +17 -3
- package/dist/core/ingestion/languages/csharp/namespace-siblings.d.ts +17 -7
- package/dist/core/ingestion/languages/csharp/namespace-siblings.js +129 -124
- package/dist/core/ingestion/languages/csharp/qualified-type-names.d.ts +14 -0
- package/dist/core/ingestion/languages/csharp/qualified-type-names.js +59 -0
- package/dist/core/ingestion/languages/csharp/query.js +13 -0
- package/dist/core/ingestion/languages/csharp/receiver-binding.js +10 -6
- package/dist/core/ingestion/languages/csharp/scope-resolver.js +8 -1
- package/dist/core/ingestion/languages/csharp.js +0 -5
- package/dist/core/ingestion/languages/dart/arity-metadata.d.ts +25 -0
- package/dist/core/ingestion/languages/dart/arity-metadata.js +35 -0
- package/dist/core/ingestion/languages/dart/arity.d.ts +19 -0
- package/dist/core/ingestion/languages/dart/arity.js +31 -0
- package/dist/core/ingestion/languages/dart/built-ins.d.ts +11 -0
- package/dist/core/ingestion/languages/dart/built-ins.js +34 -0
- package/dist/core/ingestion/languages/dart/cache-stats.d.ts +13 -0
- package/dist/core/ingestion/languages/dart/cache-stats.js +24 -0
- package/dist/core/ingestion/languages/dart/captures.d.ts +29 -0
- package/dist/core/ingestion/languages/dart/captures.js +445 -0
- package/dist/core/ingestion/languages/dart/expand-wildcards.d.ts +13 -0
- package/dist/core/ingestion/languages/dart/expand-wildcards.js +31 -0
- package/dist/core/ingestion/languages/dart/import-target.d.ts +15 -0
- package/dist/core/ingestion/languages/dart/import-target.js +65 -0
- package/dist/core/ingestion/languages/dart/index.d.ts +28 -0
- package/dist/core/ingestion/languages/dart/index.js +28 -0
- package/dist/core/ingestion/languages/dart/interpret.d.ts +24 -0
- package/dist/core/ingestion/languages/dart/interpret.js +95 -0
- package/dist/core/ingestion/languages/dart/merge-bindings.d.ts +10 -0
- package/dist/core/ingestion/languages/dart/merge-bindings.js +39 -0
- package/dist/core/ingestion/languages/dart/query.d.ts +26 -0
- package/dist/core/ingestion/languages/dart/query.js +142 -0
- package/dist/core/ingestion/languages/dart/receiver-binding.d.ts +24 -0
- package/dist/core/ingestion/languages/dart/receiver-binding.js +87 -0
- package/dist/core/ingestion/languages/dart/scope-resolver.d.ts +29 -0
- package/dist/core/ingestion/languages/dart/scope-resolver.js +194 -0
- package/dist/core/ingestion/languages/dart/signature-bindings.d.ts +23 -0
- package/dist/core/ingestion/languages/dart/signature-bindings.js +51 -0
- package/dist/core/ingestion/languages/dart/simple-hooks.d.ts +20 -0
- package/dist/core/ingestion/languages/dart/simple-hooks.js +47 -0
- package/dist/core/ingestion/languages/dart.d.ts +0 -1
- package/dist/core/ingestion/languages/dart.js +15 -29
- package/dist/core/ingestion/languages/go/arity-metadata.d.ts +1 -0
- package/dist/core/ingestion/languages/go/arity-metadata.js +31 -1
- package/dist/core/ingestion/languages/go/captures.js +247 -26
- package/dist/core/ingestion/languages/go/interface-impls.js +476 -50
- package/dist/core/ingestion/languages/go/interpret.js +21 -11
- package/dist/core/ingestion/languages/go/method-owners.js +20 -8
- package/dist/core/ingestion/languages/go/query.js +15 -7
- package/dist/core/ingestion/languages/go/range-binding.js +24 -9
- package/dist/core/ingestion/languages/go/receiver-binding.js +1 -1
- package/dist/core/ingestion/languages/go/scope-resolver.js +2 -2
- package/dist/core/ingestion/languages/go/simple-hooks.js +10 -5
- package/dist/core/ingestion/languages/go/type-binding.d.ts +1 -0
- package/dist/core/ingestion/languages/go/type-binding.js +40 -2
- package/dist/core/ingestion/languages/go.d.ts +0 -1
- package/dist/core/ingestion/languages/go.js +0 -5
- package/dist/core/ingestion/languages/index.d.ts +0 -5
- package/dist/core/ingestion/languages/index.js +0 -3
- package/dist/core/ingestion/languages/java/captures.js +252 -23
- package/dist/core/ingestion/languages/java/interpret.js +12 -6
- package/dist/core/ingestion/languages/java/package-siblings.js +18 -5
- package/dist/core/ingestion/languages/java/query.js +16 -1
- package/dist/core/ingestion/languages/java/scope-resolver.d.ts +2 -8
- package/dist/core/ingestion/languages/java/scope-resolver.js +2 -8
- package/dist/core/ingestion/languages/java.js +0 -5
- package/dist/core/ingestion/languages/javascript/captures.js +185 -11
- package/dist/core/ingestion/languages/javascript/query.js +107 -1
- package/dist/core/ingestion/languages/kotlin/capture-side-channel.d.ts +57 -0
- package/dist/core/ingestion/languages/kotlin/capture-side-channel.js +60 -0
- package/dist/core/ingestion/languages/kotlin/captures.js +213 -22
- package/dist/core/ingestion/languages/kotlin/companion-scopes.d.ts +7 -0
- package/dist/core/ingestion/languages/kotlin/companion-scopes.js +10 -0
- package/dist/core/ingestion/languages/kotlin/index.d.ts +1 -0
- package/dist/core/ingestion/languages/kotlin/index.js +1 -0
- package/dist/core/ingestion/languages/kotlin/query.js +30 -0
- package/dist/core/ingestion/languages/kotlin/scope-resolver.d.ts +5 -7
- package/dist/core/ingestion/languages/kotlin/scope-resolver.js +22 -7
- package/dist/core/ingestion/languages/kotlin.js +8 -5
- package/dist/core/ingestion/languages/php/captures.js +135 -19
- package/dist/core/ingestion/languages/php/import-decomposer.js +21 -63
- package/dist/core/ingestion/languages/php/index.d.ts +3 -4
- package/dist/core/ingestion/languages/php/index.js +3 -4
- package/dist/core/ingestion/languages/php/query.js +5 -0
- package/dist/core/ingestion/languages/php/receiver-binding.js +8 -4
- package/dist/core/ingestion/languages/php.js +0 -4
- package/dist/core/ingestion/languages/python/captures.js +128 -13
- package/dist/core/ingestion/languages/python/depends-references.js +1 -1
- package/dist/core/ingestion/languages/python/import-target.d.ts +4 -5
- package/dist/core/ingestion/languages/python/import-target.js +108 -16
- package/dist/core/ingestion/languages/python/index-stats.d.ts +18 -0
- package/dist/core/ingestion/languages/python/index-stats.js +25 -0
- package/dist/core/ingestion/languages/python/index.d.ts +3 -4
- package/dist/core/ingestion/languages/python/index.js +3 -4
- package/dist/core/ingestion/languages/python/query.js +17 -0
- package/dist/core/ingestion/languages/python/scope-resolver.js +7 -6
- package/dist/core/ingestion/languages/python.d.ts +0 -2
- package/dist/core/ingestion/languages/python.js +0 -7
- package/dist/core/ingestion/languages/ruby/captures.js +174 -31
- package/dist/core/ingestion/languages/ruby/import-target.js +2 -1
- package/dist/core/ingestion/languages/ruby/interpret.js +2 -1
- package/dist/core/ingestion/languages/ruby/query.js +10 -0
- package/dist/core/ingestion/languages/ruby/scope-resolver.js +61 -11
- package/dist/core/ingestion/languages/ruby.js +4 -53
- package/dist/core/ingestion/languages/rust/captures.js +95 -13
- package/dist/core/ingestion/languages/rust/query.js +64 -1
- package/dist/core/ingestion/languages/rust/range-binding.js +40 -12
- package/dist/core/ingestion/languages/rust/receiver-binding.js +9 -0
- package/dist/core/ingestion/languages/rust/scope-resolver.js +75 -1
- package/dist/core/ingestion/languages/rust.d.ts +0 -2
- package/dist/core/ingestion/languages/rust.js +0 -6
- package/dist/core/ingestion/languages/swift/arity-metadata.d.ts +24 -0
- package/dist/core/ingestion/languages/swift/arity-metadata.js +41 -0
- package/dist/core/ingestion/languages/swift/arity.d.ts +29 -0
- package/dist/core/ingestion/languages/swift/arity.js +42 -0
- package/dist/core/ingestion/languages/swift/base-type.d.ts +20 -0
- package/dist/core/ingestion/languages/swift/base-type.js +27 -0
- package/dist/core/ingestion/languages/swift/cache-stats.d.ts +15 -0
- package/dist/core/ingestion/languages/swift/cache-stats.js +26 -0
- package/dist/core/ingestion/languages/swift/captures.d.ts +35 -0
- package/dist/core/ingestion/languages/swift/captures.js +495 -0
- package/dist/core/ingestion/languages/swift/implicit-imports.d.ts +34 -0
- package/dist/core/ingestion/languages/swift/implicit-imports.js +57 -0
- package/dist/core/ingestion/languages/swift/import-decomposer.d.ts +24 -0
- package/dist/core/ingestion/languages/swift/import-decomposer.js +84 -0
- package/dist/core/ingestion/languages/swift/import-target.d.ts +33 -0
- package/dist/core/ingestion/languages/swift/import-target.js +81 -0
- package/dist/core/ingestion/languages/swift/index.d.ts +37 -0
- package/dist/core/ingestion/languages/swift/index.js +37 -0
- package/dist/core/ingestion/languages/swift/interpret.d.ts +15 -0
- package/dist/core/ingestion/languages/swift/interpret.js +89 -0
- package/dist/core/ingestion/languages/swift/merge-bindings.d.ts +20 -0
- package/dist/core/ingestion/languages/swift/merge-bindings.js +48 -0
- package/dist/core/ingestion/languages/swift/query.d.ts +46 -0
- package/dist/core/ingestion/languages/swift/query.js +194 -0
- package/dist/core/ingestion/languages/swift/receiver-binding.d.ts +40 -0
- package/dist/core/ingestion/languages/swift/receiver-binding.js +161 -0
- package/dist/core/ingestion/languages/swift/scope-resolver.d.ts +50 -0
- package/dist/core/ingestion/languages/swift/scope-resolver.js +189 -0
- package/dist/core/ingestion/languages/swift/sibling-type-bindings.d.ts +34 -0
- package/dist/core/ingestion/languages/swift/sibling-type-bindings.js +65 -0
- package/dist/core/ingestion/languages/swift/signature-bindings.d.ts +25 -0
- package/dist/core/ingestion/languages/swift/signature-bindings.js +66 -0
- package/dist/core/ingestion/languages/swift/simple-hooks.d.ts +37 -0
- package/dist/core/ingestion/languages/swift/simple-hooks.js +60 -0
- package/dist/core/ingestion/languages/swift/target-grouping.d.ts +51 -0
- package/dist/core/ingestion/languages/swift/target-grouping.js +93 -0
- package/dist/core/ingestion/languages/swift/target-siblings.d.ts +30 -0
- package/dist/core/ingestion/languages/swift/target-siblings.js +71 -0
- package/dist/core/ingestion/languages/swift.d.ts +0 -5
- package/dist/core/ingestion/languages/swift.js +11 -87
- package/dist/core/ingestion/languages/typescript/array-callback.d.ts +3 -29
- package/dist/core/ingestion/languages/typescript/array-callback.js +4 -43
- package/dist/core/ingestion/languages/typescript/captures.js +147 -17
- package/dist/core/ingestion/languages/typescript/index.d.ts +3 -4
- package/dist/core/ingestion/languages/typescript/index.js +3 -4
- package/dist/core/ingestion/languages/typescript/query.d.ts +2 -3
- package/dist/core/ingestion/languages/typescript/query.js +125 -4
- package/dist/core/ingestion/languages/typescript/receiver-binding.js +0 -1
- package/dist/core/ingestion/languages/typescript.d.ts +2 -3
- package/dist/core/ingestion/languages/typescript.js +46 -23
- package/dist/core/ingestion/languages/vue/captures.d.ts +46 -0
- package/dist/core/ingestion/languages/vue/captures.js +67 -0
- package/dist/core/ingestion/languages/vue/import-target.d.ts +27 -0
- package/dist/core/ingestion/languages/vue/import-target.js +58 -0
- package/dist/core/ingestion/languages/vue/index.d.ts +49 -0
- package/dist/core/ingestion/languages/vue/index.js +49 -0
- package/dist/core/ingestion/languages/vue/scope-resolver.d.ts +55 -0
- package/dist/core/ingestion/languages/vue/scope-resolver.js +292 -0
- package/dist/core/ingestion/languages/vue.js +12 -4
- package/dist/core/ingestion/local-symbol-pruner.d.ts +11 -0
- package/dist/core/ingestion/local-symbol-pruner.js +63 -0
- package/dist/core/ingestion/method-extractors/configs/dart.js +14 -1
- package/dist/core/ingestion/method-extractors/configs/jvm.js +37 -20
- package/dist/core/ingestion/method-extractors/configs/php.js +0 -1
- package/dist/core/ingestion/method-extractors/configs/swift.js +11 -4
- package/dist/core/ingestion/method-types.d.ts +2 -2
- package/dist/core/ingestion/model/index.d.ts +0 -3
- package/dist/core/ingestion/model/index.js +0 -8
- package/dist/core/ingestion/model/resolve.d.ts +7 -43
- package/dist/core/ingestion/model/resolve.js +7 -226
- package/dist/core/ingestion/model/scope-resolution-indexes.d.ts +46 -1
- package/dist/core/ingestion/model/semantic-model.d.ts +4 -6
- package/dist/core/ingestion/model/semantic-model.js +1 -1
- package/dist/core/ingestion/model/symbol-table.d.ts +3 -4
- package/dist/core/ingestion/model/symbol-table.js +3 -4
- package/dist/core/ingestion/parsing-processor.d.ts +30 -24
- package/dist/core/ingestion/parsing-processor.js +76 -640
- package/dist/core/ingestion/pipeline-phases/communities.d.ts +1 -1
- package/dist/core/ingestion/pipeline-phases/communities.js +5 -2
- package/dist/core/ingestion/pipeline-phases/cross-file.d.ts +9 -8
- package/dist/core/ingestion/pipeline-phases/cross-file.js +16 -12
- package/dist/core/ingestion/pipeline-phases/index.d.ts +1 -0
- package/dist/core/ingestion/pipeline-phases/index.js +1 -0
- package/dist/core/ingestion/pipeline-phases/mro.d.ts +1 -1
- package/dist/core/ingestion/pipeline-phases/mro.js +2 -2
- package/dist/core/ingestion/pipeline-phases/parse-impl.d.ts +44 -22
- package/dist/core/ingestion/pipeline-phases/parse-impl.js +426 -565
- package/dist/core/ingestion/pipeline-phases/parse.d.ts +13 -33
- package/dist/core/ingestion/pipeline-phases/parse.js +2 -2
- package/dist/core/ingestion/pipeline-phases/processes.d.ts +1 -1
- package/dist/core/ingestion/pipeline-phases/processes.js +5 -3
- package/dist/core/ingestion/pipeline-phases/prune-local-symbols.d.ts +14 -0
- package/dist/core/ingestion/pipeline-phases/prune-local-symbols.js +26 -0
- package/dist/core/ingestion/pipeline.d.ts +27 -19
- package/dist/core/ingestion/pipeline.js +4 -2
- package/dist/core/ingestion/resolve-references.js +15 -3
- package/dist/core/ingestion/route-extractors/laravel.d.ts +10 -0
- package/dist/core/ingestion/route-extractors/laravel.js +88 -9
- package/dist/core/ingestion/scope-extractor-bridge.d.ts +2 -1
- package/dist/core/ingestion/scope-extractor-bridge.js +2 -2
- package/dist/core/ingestion/scope-extractor.js +13 -0
- package/dist/core/ingestion/scope-resolution/contract/scope-resolver.d.ts +181 -15
- package/dist/core/ingestion/scope-resolution/contract/scope-resolver.js +21 -10
- package/dist/core/ingestion/scope-resolution/graph-bridge/edges.js +10 -2
- package/dist/core/ingestion/scope-resolution/graph-bridge/ids.d.ts +7 -1
- package/dist/core/ingestion/scope-resolution/graph-bridge/ids.js +58 -6
- package/dist/core/ingestion/scope-resolution/graph-bridge/node-lookup.js +24 -5
- package/dist/core/ingestion/scope-resolution/passes/free-call-fallback.d.ts +68 -1
- package/dist/core/ingestion/scope-resolution/passes/free-call-fallback.js +189 -29
- package/dist/core/ingestion/scope-resolution/passes/imported-return-types.js +21 -1
- package/dist/core/ingestion/scope-resolution/passes/receiver-bound-calls.js +1 -1
- package/dist/core/ingestion/scope-resolution/pipeline/phase.d.ts +8 -11
- package/dist/core/ingestion/scope-resolution/pipeline/phase.js +171 -50
- package/dist/core/ingestion/scope-resolution/pipeline/registry.d.ts +3 -4
- package/dist/core/ingestion/scope-resolution/pipeline/registry.js +9 -4
- package/dist/core/ingestion/scope-resolution/pipeline/run.d.ts +28 -5
- package/dist/core/ingestion/scope-resolution/pipeline/run.js +191 -24
- package/dist/core/ingestion/scope-resolution/pipeline/validate-bindings-immutability.js +31 -0
- package/dist/core/ingestion/scope-resolution/scope/walkers.d.ts +72 -0
- package/dist/core/ingestion/scope-resolution/scope/walkers.js +440 -39
- package/dist/core/ingestion/scope-resolution/workspace-index.d.ts +18 -2
- package/dist/core/ingestion/scope-resolution/workspace-index.js +94 -7
- package/dist/core/ingestion/tree-sitter-queries.d.ts +14 -14
- package/dist/core/ingestion/tree-sitter-queries.js +380 -158
- package/dist/core/ingestion/ts-js-hoc-utils.d.ts +12 -0
- package/dist/core/ingestion/ts-js-hoc-utils.js +105 -0
- package/dist/core/ingestion/type-env.d.ts +2 -1
- package/dist/core/ingestion/type-env.js +6 -8
- package/dist/core/ingestion/type-extractors/c-cpp.js +8 -10
- package/dist/core/ingestion/type-extractors/csharp.js +18 -34
- package/dist/core/ingestion/type-extractors/go.js +2 -10
- package/dist/core/ingestion/type-extractors/jvm.js +6 -5
- package/dist/core/ingestion/type-extractors/php.js +1 -1
- package/dist/core/ingestion/type-extractors/python.js +1 -1
- package/dist/core/ingestion/type-extractors/ruby.js +2 -2
- package/dist/core/ingestion/type-extractors/rust.js +0 -16
- package/dist/core/ingestion/type-extractors/shared.d.ts +2 -2
- package/dist/core/ingestion/type-extractors/shared.js +25 -11
- package/dist/core/ingestion/type-extractors/swift.js +5 -5
- package/dist/core/ingestion/type-extractors/types.d.ts +1 -1
- package/dist/core/ingestion/type-extractors/typescript.js +1 -1
- package/dist/core/ingestion/utils/ast-helpers.d.ts +119 -1
- package/dist/core/ingestion/utils/ast-helpers.js +260 -13
- package/dist/core/ingestion/utils/callable-labels.d.ts +13 -0
- package/dist/core/ingestion/utils/callable-labels.js +14 -0
- package/dist/core/ingestion/utils/deferred-resolution-profile.d.ts +10 -0
- package/dist/core/ingestion/utils/deferred-resolution-profile.js +30 -0
- package/dist/core/ingestion/utils/heap-probe.d.ts +20 -0
- package/dist/core/ingestion/utils/heap-probe.js +39 -0
- package/dist/core/ingestion/utils/heritage-marker.d.ts +33 -0
- package/dist/core/ingestion/utils/heritage-marker.js +41 -0
- package/dist/core/ingestion/utils/qualified-name.d.ts +37 -0
- package/dist/core/ingestion/utils/qualified-name.js +67 -0
- package/dist/core/ingestion/variable-extractors/configs/c-cpp.js +49 -0
- package/dist/core/ingestion/variable-extractors/configs/dart.js +76 -62
- package/dist/core/ingestion/variable-extractors/configs/go.js +74 -7
- package/dist/core/ingestion/variable-extractors/configs/jvm.js +35 -8
- package/dist/core/ingestion/variable-extractors/generic.js +40 -12
- package/dist/core/ingestion/variable-types.d.ts +9 -0
- package/dist/core/ingestion/vue-sfc-extractor.d.ts +97 -7
- package/dist/core/ingestion/vue-sfc-extractor.js +433 -11
- package/dist/core/ingestion/workers/parse-worker.d.ts +0 -11
- package/dist/core/ingestion/workers/parse-worker.js +358 -187
- package/dist/core/ingestion/workers/worker-pool.d.ts +78 -9
- package/dist/core/ingestion/workers/worker-pool.js +346 -49
- package/dist/core/lbug/csv-generator.js +20 -2
- package/dist/core/lbug/lbug-adapter.js +29 -10
- package/dist/core/lbug/native-check.js +17 -5
- package/dist/core/lbug/pool-adapter.d.ts +0 -19
- package/dist/core/lbug/pool-adapter.js +40 -77
- package/dist/core/lbug/query-result-utils.d.ts +19 -0
- package/dist/core/lbug/query-result-utils.js +28 -0
- package/dist/core/run-analyze.d.ts +9 -2
- package/dist/core/run-analyze.js +24 -3
- package/dist/core/tree-sitter/parser-loader.d.ts +13 -0
- package/dist/core/tree-sitter/parser-loader.js +4 -0
- package/dist/core/tree-sitter/safe-parse.d.ts +70 -3
- package/dist/core/tree-sitter/safe-parse.js +214 -11
- package/dist/core/wiki/generator.js +13 -5
- package/dist/core/wiki/graph-queries.d.ts +3 -0
- package/dist/core/wiki/graph-queries.js +9 -1
- package/dist/core/wiki/llm-client.d.ts +1 -1
- package/dist/core/wiki/llm-client.js +7 -2
- package/dist/core/wiki/local-cli-client.d.ts +2 -1
- package/dist/core/wiki/local-cli-client.js +62 -4
- package/dist/mcp/compatible-stdio-transport.d.ts +3 -0
- package/dist/mcp/compatible-stdio-transport.js +22 -0
- package/dist/mcp/core/embedder.d.ts +1 -1
- package/dist/mcp/core/embedder.js +13 -1
- package/dist/mcp/local/local-backend.d.ts +37 -5
- package/dist/mcp/local/local-backend.js +227 -129
- package/dist/mcp/resources.js +3 -3
- package/dist/mcp/server.js +9 -1
- package/dist/storage/git.d.ts +11 -0
- package/dist/storage/git.js +30 -0
- package/dist/storage/parse-cache.d.ts +23 -1
- package/dist/storage/parse-cache.js +138 -32
- package/dist/storage/parsedfile-store.d.ts +142 -0
- package/dist/storage/parsedfile-store.js +367 -0
- package/dist/storage/repo-manager.d.ts +2 -1
- package/dist/storage/scope-index-store.d.ts +114 -0
- package/dist/storage/scope-index-store.js +236 -0
- package/dist/types/pipeline.d.ts +6 -3
- package/hooks/antigravity/gitnexus-antigravity-hook.cjs +2 -1
- package/hooks/claude/gitnexus-hook.cjs +2 -1
- package/hooks/claude/resolve-analyze-cmd.cjs +323 -0
- package/package.json +4 -5
- package/scripts/bench-scope-resolution.ts +1 -3
- package/scripts/cross-platform-tests.ts +4 -1
- package/skills/gitnexus-cli.md +8 -6
- package/skills/gitnexus-debugging.md +15 -15
- package/skills/gitnexus-exploring.md +11 -11
- package/skills/gitnexus-guide.md +1 -1
- package/skills/gitnexus-impact-analysis.md +10 -10
- package/skills/gitnexus-pr-review.md +19 -19
- package/skills/gitnexus-refactoring.md +25 -25
- package/web/assets/{agent-BRX-afm3.js → agent-EkX7webX.js} +156 -131
- package/web/assets/{architectureDiagram-UL44E2DR-B1oYB8-c.js → architectureDiagram-UL44E2DR-BoczH8cv.js} +1 -1
- package/web/assets/{chunk-LCXTWHL2-SPC6pgWI.js → chunk-LCXTWHL2-By5HB3b-.js} +1 -1
- package/web/assets/{chunk-RG4AUYOV-DZXr4Yv3.js → chunk-RG4AUYOV-BQE_DkpL.js} +1 -1
- package/web/assets/{classDiagram-KGZ6W3CR-BqpOj8L9.js → classDiagram-KGZ6W3CR-Dj_02GUH.js} +1 -1
- package/web/assets/{classDiagram-v2-72OJOZXJ-FmElywK2.js → classDiagram-v2-72OJOZXJ-D-NArMpf.js} +1 -1
- package/web/assets/{diagram-3NCE3AQN-BWtJXMDq.js → diagram-3NCE3AQN-VXtXDO95.js} +1 -1
- package/web/assets/{diagram-GF46GFSD-Hh-fChxU.js → diagram-GF46GFSD-B1qab2Ah.js} +1 -1
- package/web/assets/{diagram-QXG6HAR7-DYeQHxGU.js → diagram-QXG6HAR7-BSCHGzzT.js} +1 -1
- package/web/assets/{diagram-WEQXMOUZ-DYGU4T0y.js → diagram-WEQXMOUZ-DHtknmNT.js} +1 -1
- package/web/assets/{erDiagram-L5TCEMPS-bN3wlP2A.js → erDiagram-L5TCEMPS-Db-IYTmm.js} +1 -1
- package/web/assets/{flowDiagram-H6V6AXG4-YACVtF3-.js → flowDiagram-H6V6AXG4-BHDoyVoW.js} +1 -1
- package/web/assets/{index-BhnAdWTt.js → index-BR0IhgbR.js} +10 -10
- package/web/assets/{infoDiagram-3YFTVSEB-BWBzD28-.js → infoDiagram-3YFTVSEB-6h8wbWEe.js} +1 -1
- package/web/assets/{ishikawaDiagram-BNXS4ZKH-B8qYT-j9.js → ishikawaDiagram-BNXS4ZKH-Dx2OkPk1.js} +1 -1
- package/web/assets/{kanban-definition-75IXJCU3-BeoPr5Tl.js → kanban-definition-75IXJCU3-CIIEZfqV.js} +1 -1
- package/web/assets/{mindmap-definition-2TDM6QVE-CdLLN_so.js → mindmap-definition-2TDM6QVE-DUAqydRq.js} +1 -1
- package/web/assets/{pieDiagram-CU6KROY3-DEd2a_k_.js → pieDiagram-CU6KROY3-BntYuYZa.js} +1 -1
- package/web/assets/{requirementDiagram-JXO7QTGE-QNeTo5C_.js → requirementDiagram-JXO7QTGE-QCD6I29n.js} +1 -1
- package/web/assets/{sequenceDiagram-VS2MUI6T-BHC7q7yJ.js → sequenceDiagram-VS2MUI6T-DScFwLz2.js} +1 -1
- package/web/assets/{stateDiagram-7D4R322I-KONnc2Px.js → stateDiagram-7D4R322I-AkRAm6Hl.js} +1 -1
- package/web/assets/{stateDiagram-v2-36443NZ5-C2QfuMlu.js → stateDiagram-v2-36443NZ5-BCK1vigR.js} +1 -1
- package/web/assets/{timeline-definition-O6YCAMPW-D4t4NJx1.js → timeline-definition-O6YCAMPW-BvpIVXjX.js} +1 -1
- package/web/assets/{vennDiagram-MWXL3ELB-6bctC9Yg.js → vennDiagram-MWXL3ELB-BYGWk6dK.js} +1 -1
- package/web/assets/{wardleyDiagram-CUQ6CDDI-BPZYNTvC.js → wardleyDiagram-CUQ6CDDI-Dk1z7H2T.js} +1 -1
- package/web/assets/{xychartDiagram-N2JHSOCM-lBI9O6DW.js → xychartDiagram-N2JHSOCM-2N6NCSWN.js} +1 -1
- package/web/index.html +1 -1
- package/dist/_shared/scope-resolution/shadow/aggregate.d.ts +0 -63
- package/dist/_shared/scope-resolution/shadow/aggregate.d.ts.map +0 -1
- package/dist/_shared/scope-resolution/shadow/aggregate.js +0 -122
- package/dist/_shared/scope-resolution/shadow/aggregate.js.map +0 -1
- package/dist/_shared/scope-resolution/shadow/diff.d.ts +0 -59
- package/dist/_shared/scope-resolution/shadow/diff.d.ts.map +0 -1
- package/dist/_shared/scope-resolution/shadow/diff.js +0 -79
- package/dist/_shared/scope-resolution/shadow/diff.js.map +0 -1
- package/dist/core/ingestion/ast-cache.d.ts +0 -26
- package/dist/core/ingestion/ast-cache.js +0 -48
- package/dist/core/ingestion/heritage-extractors/configs/go.d.ts +0 -13
- package/dist/core/ingestion/heritage-extractors/configs/go.js +0 -20
- package/dist/core/ingestion/heritage-extractors/configs/ruby.d.ts +0 -18
- package/dist/core/ingestion/heritage-extractors/configs/ruby.js +0 -65
- package/dist/core/ingestion/heritage-extractors/generic.d.ts +0 -23
- package/dist/core/ingestion/heritage-extractors/generic.js +0 -47
- package/dist/core/ingestion/heritage-processor.d.ts +0 -54
- package/dist/core/ingestion/heritage-processor.js +0 -367
- package/dist/core/ingestion/heritage-types.d.ts +0 -73
- package/dist/core/ingestion/heritage-types.js +0 -2
- package/dist/core/ingestion/import-processor.d.ts +0 -23
- package/dist/core/ingestion/import-processor.js +0 -377
- package/dist/core/ingestion/model/heritage-map.d.ts +0 -105
- package/dist/core/ingestion/model/heritage-map.js +0 -294
- package/dist/core/ingestion/model/resolution-context.d.ts +0 -93
- package/dist/core/ingestion/model/resolution-context.js +0 -337
- package/dist/core/ingestion/named-bindings/csharp.d.ts +0 -3
- package/dist/core/ingestion/named-bindings/csharp.js +0 -37
- package/dist/core/ingestion/named-bindings/java.d.ts +0 -3
- package/dist/core/ingestion/named-bindings/java.js +0 -29
- package/dist/core/ingestion/named-bindings/kotlin.d.ts +0 -3
- package/dist/core/ingestion/named-bindings/kotlin.js +0 -36
- package/dist/core/ingestion/named-bindings/php.d.ts +0 -3
- package/dist/core/ingestion/named-bindings/php.js +0 -61
- package/dist/core/ingestion/named-bindings/python.d.ts +0 -3
- package/dist/core/ingestion/named-bindings/python.js +0 -49
- package/dist/core/ingestion/named-bindings/rust.d.ts +0 -3
- package/dist/core/ingestion/named-bindings/rust.js +0 -66
- package/dist/core/ingestion/named-bindings/types.d.ts +0 -16
- package/dist/core/ingestion/named-bindings/types.js +0 -6
- package/dist/core/ingestion/named-bindings/typescript.d.ts +0 -3
- package/dist/core/ingestion/named-bindings/typescript.js +0 -58
- package/dist/core/ingestion/pipeline-phases/cross-file-impl.d.ts +0 -17
- package/dist/core/ingestion/pipeline-phases/cross-file-impl.js +0 -209
- package/dist/core/ingestion/pipeline-phases/orm-extraction.d.ts +0 -22
- package/dist/core/ingestion/pipeline-phases/orm-extraction.js +0 -92
- package/dist/core/ingestion/pipeline-phases/wildcard-synthesis.d.ts +0 -70
- package/dist/core/ingestion/pipeline-phases/wildcard-synthesis.js +0 -312
- package/dist/core/ingestion/registry-primary-flag.d.ts +0 -89
- package/dist/core/ingestion/registry-primary-flag.js +0 -122
- package/dist/core/ingestion/shadow-harness.d.ts +0 -113
- package/dist/core/ingestion/shadow-harness.js +0 -148
- package/dist/core/ingestion/utils/ruby-self-call.d.ts +0 -52
- package/dist/core/ingestion/utils/ruby-self-call.js +0 -59
- package/scripts/ci-list-migrated-languages.ts +0 -24
- package/scripts/run-parity.ts +0 -128
|
@@ -30,9 +30,10 @@ const PLATFORM_LOGIC = [
|
|
|
30
30
|
'test/unit/setup-jsonc.test.ts',
|
|
31
31
|
'test/unit/setup-codex.test.ts',
|
|
32
32
|
'test/unit/setup-antigravity.test.ts',
|
|
33
|
+
'test/unit/resolve-invocation.test.ts',
|
|
33
34
|
'test/unit/platform-capabilities.test.ts',
|
|
34
35
|
'test/unit/worker-pool-windows-quarantine.test.ts',
|
|
35
|
-
'test/unit/lbug-pool-
|
|
36
|
+
'test/unit/lbug-pool-fts-load.test.ts',
|
|
36
37
|
'test/unit/repo-manager.test.ts',
|
|
37
38
|
'test/unit/repo-manager-finalize-invariant.test.ts',
|
|
38
39
|
'test/unit/hooks.test.ts',
|
|
@@ -84,6 +85,7 @@ const SPAWN_CLI = [
|
|
|
84
85
|
'test/integration/setup-antigravity.test.ts',
|
|
85
86
|
'test/integration/antigravity-hook-e2e.test.ts',
|
|
86
87
|
'test/unit/local-cli-subprocess.test.ts',
|
|
88
|
+
'test/unit/runner-exec-tail.test.ts',
|
|
87
89
|
];
|
|
88
90
|
|
|
89
91
|
// Worker threads tests — exercise real worker_threads which have
|
|
@@ -101,6 +103,7 @@ const NATIVE_ADDON_SMOKE = [
|
|
|
101
103
|
'test/integration/pipeline.test.ts',
|
|
102
104
|
'test/integration/pipeline-graph-golden.test.ts',
|
|
103
105
|
'test/unit/parser-loader.test.ts',
|
|
106
|
+
'test/unit/parser-loader-abi.test.ts',
|
|
104
107
|
];
|
|
105
108
|
|
|
106
109
|
// Filesystem behavior tests — exercise operations that vary across
|
package/skills/gitnexus-cli.md
CHANGED
|
@@ -5,14 +5,16 @@ description: "Use when the user needs to run GitNexus CLI commands like analyze/
|
|
|
5
5
|
|
|
6
6
|
# GitNexus CLI Commands
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
Commands below use `node .gitnexus/run.cjs <command>` — the project-local runner `gitnexus analyze` drops next to the index. It auto-selects an available runner at call time (global `gitnexus`, else `pnpm dlx`, else `npx`), so no package-manager assumption and no global install is required.
|
|
9
|
+
|
|
10
|
+
> **Not analyzed yet, or `node .gitnexus/run.cjs` reports `Cannot find module`** (the gitignored runner is absent — e.g. a fresh clone or `git clean`)? (Re)generate it with `npx gitnexus analyze` from the project root. On **npm 11.x**, if `npx` crashes during install (`node.target is null`), install once with `npm i -g gitnexus` (then `gitnexus analyze`) or use `pnpm --allow-build=@ladybugdb/core --allow-build=gitnexus --allow-build=tree-sitter dlx gitnexus@latest analyze`. See [#1939](https://github.com/abhigyanpatwari/GitNexus/issues/1939).
|
|
9
11
|
|
|
10
12
|
## Commands
|
|
11
13
|
|
|
12
14
|
### analyze — Build or refresh the index
|
|
13
15
|
|
|
14
16
|
```bash
|
|
15
|
-
|
|
17
|
+
node .gitnexus/run.cjs analyze
|
|
16
18
|
```
|
|
17
19
|
|
|
18
20
|
Run from the project root. This parses all source files, builds the knowledge graph, writes it to `.gitnexus/`, and generates CLAUDE.md / AGENTS.md context files.
|
|
@@ -28,7 +30,7 @@ Run from the project root. This parses all source files, builds the knowledge gr
|
|
|
28
30
|
### status — Check index freshness
|
|
29
31
|
|
|
30
32
|
```bash
|
|
31
|
-
|
|
33
|
+
node .gitnexus/run.cjs status
|
|
32
34
|
```
|
|
33
35
|
|
|
34
36
|
Shows whether the current repo has a GitNexus index, when it was last updated, and symbol/relationship counts. Use this to check if re-indexing is needed.
|
|
@@ -36,7 +38,7 @@ Shows whether the current repo has a GitNexus index, when it was last updated, a
|
|
|
36
38
|
### clean — Delete the index
|
|
37
39
|
|
|
38
40
|
```bash
|
|
39
|
-
|
|
41
|
+
node .gitnexus/run.cjs clean
|
|
40
42
|
```
|
|
41
43
|
|
|
42
44
|
Deletes the `.gitnexus/` directory and unregisters the repo from the global registry. Use before re-indexing if the index is corrupt or after removing GitNexus from a project.
|
|
@@ -49,7 +51,7 @@ Deletes the `.gitnexus/` directory and unregisters the repo from the global regi
|
|
|
49
51
|
### wiki — Generate documentation from the graph
|
|
50
52
|
|
|
51
53
|
```bash
|
|
52
|
-
|
|
54
|
+
node .gitnexus/run.cjs wiki
|
|
53
55
|
```
|
|
54
56
|
|
|
55
57
|
Generates repository documentation from the knowledge graph using an LLM. Requires an API key (saved to `~/.gitnexus/config.json` on first use).
|
|
@@ -66,7 +68,7 @@ Generates repository documentation from the knowledge graph using an LLM. Requir
|
|
|
66
68
|
### list — Show all indexed repos
|
|
67
69
|
|
|
68
70
|
```bash
|
|
69
|
-
|
|
71
|
+
node .gitnexus/run.cjs list
|
|
70
72
|
```
|
|
71
73
|
|
|
72
74
|
Lists all repositories registered in `~/.gitnexus/registry.json`. The MCP `list_repos` tool provides the same information.
|
|
@@ -16,23 +16,23 @@ description: "Use when the user is debugging a bug, tracing an error, or asking
|
|
|
16
16
|
## Workflow
|
|
17
17
|
|
|
18
18
|
```
|
|
19
|
-
1.
|
|
20
|
-
2.
|
|
19
|
+
1. query({query: "<error or symptom>"}) → Find related execution flows
|
|
20
|
+
2. context({name: "<suspect>"}) → See callers/callees/processes
|
|
21
21
|
3. READ gitnexus://repo/{name}/process/{name} → Trace execution flow
|
|
22
|
-
4.
|
|
22
|
+
4. cypher({query: "MATCH path..."}) → Custom traces if needed
|
|
23
23
|
```
|
|
24
24
|
|
|
25
|
-
> If "Index is stale" → run `
|
|
25
|
+
> If "Index is stale" → run `node .gitnexus/run.cjs analyze` in terminal.
|
|
26
26
|
|
|
27
27
|
## Checklist
|
|
28
28
|
|
|
29
29
|
```
|
|
30
30
|
- [ ] Understand the symptom (error message, unexpected behavior)
|
|
31
|
-
- [ ]
|
|
31
|
+
- [ ] query for error text or related code
|
|
32
32
|
- [ ] Identify the suspect function from returned processes
|
|
33
|
-
- [ ]
|
|
33
|
+
- [ ] context to see callers and callees
|
|
34
34
|
- [ ] Trace execution flow via process resource if applicable
|
|
35
|
-
- [ ]
|
|
35
|
+
- [ ] cypher for custom call chain traces if needed
|
|
36
36
|
- [ ] Read source files to confirm root cause
|
|
37
37
|
```
|
|
38
38
|
|
|
@@ -40,7 +40,7 @@ description: "Use when the user is debugging a bug, tracing an error, or asking
|
|
|
40
40
|
|
|
41
41
|
| Symptom | GitNexus Approach |
|
|
42
42
|
| -------------------- | ---------------------------------------------------------- |
|
|
43
|
-
| Error message | `
|
|
43
|
+
| Error message | `query` for error text → `context` on throw sites |
|
|
44
44
|
| Wrong return value | `context` on the function → trace callees for data flow |
|
|
45
45
|
| Intermittent failure | `context` → look for external calls, async deps |
|
|
46
46
|
| Performance issue | `context` → find symbols with many callers (hot paths) |
|
|
@@ -48,24 +48,24 @@ description: "Use when the user is debugging a bug, tracing an error, or asking
|
|
|
48
48
|
|
|
49
49
|
## Tools
|
|
50
50
|
|
|
51
|
-
**
|
|
51
|
+
**query** — find code related to error:
|
|
52
52
|
|
|
53
53
|
```
|
|
54
|
-
|
|
54
|
+
query({query: "payment validation error"})
|
|
55
55
|
→ Processes: CheckoutFlow, ErrorHandling
|
|
56
56
|
→ Symbols: validatePayment, handlePaymentError, PaymentException
|
|
57
57
|
```
|
|
58
58
|
|
|
59
|
-
**
|
|
59
|
+
**context** — full context for a suspect:
|
|
60
60
|
|
|
61
61
|
```
|
|
62
|
-
|
|
62
|
+
context({name: "validatePayment"})
|
|
63
63
|
→ Incoming calls: processCheckout, webhookHandler
|
|
64
64
|
→ Outgoing calls: verifyCard, fetchRates (external API!)
|
|
65
65
|
→ Processes: CheckoutFlow (step 3/7)
|
|
66
66
|
```
|
|
67
67
|
|
|
68
|
-
**
|
|
68
|
+
**cypher** — custom call chain traces:
|
|
69
69
|
|
|
70
70
|
```cypher
|
|
71
71
|
MATCH path = (a)-[:CodeRelation {type: 'CALLS'}*1..2]->(b:Function {name: "validatePayment"})
|
|
@@ -75,11 +75,11 @@ RETURN [n IN nodes(path) | n.name] AS chain
|
|
|
75
75
|
## Example: "Payment endpoint returns 500 intermittently"
|
|
76
76
|
|
|
77
77
|
```
|
|
78
|
-
1.
|
|
78
|
+
1. query({query: "payment error handling"})
|
|
79
79
|
→ Processes: CheckoutFlow, ErrorHandling
|
|
80
80
|
→ Symbols: validatePayment, handlePaymentError
|
|
81
81
|
|
|
82
|
-
2.
|
|
82
|
+
2. context({name: "validatePayment"})
|
|
83
83
|
→ Outgoing calls: verifyCard, fetchRates (external API!)
|
|
84
84
|
|
|
85
85
|
3. READ gitnexus://repo/my-app/process/CheckoutFlow
|
|
@@ -18,20 +18,20 @@ description: "Use when the user asks how code works, wants to understand archite
|
|
|
18
18
|
```
|
|
19
19
|
1. READ gitnexus://repos → Discover indexed repos
|
|
20
20
|
2. READ gitnexus://repo/{name}/context → Codebase overview, check staleness
|
|
21
|
-
3.
|
|
22
|
-
4.
|
|
21
|
+
3. query({query: "<what you want to understand>"}) → Find related execution flows
|
|
22
|
+
4. context({name: "<symbol>"}) → Deep dive on specific symbol
|
|
23
23
|
5. READ gitnexus://repo/{name}/process/{name} → Trace full execution flow
|
|
24
24
|
```
|
|
25
25
|
|
|
26
|
-
> If step 2 says "Index is stale" → run `
|
|
26
|
+
> If step 2 says "Index is stale" → run `node .gitnexus/run.cjs analyze` in terminal.
|
|
27
27
|
|
|
28
28
|
## Checklist
|
|
29
29
|
|
|
30
30
|
```
|
|
31
31
|
- [ ] READ gitnexus://repo/{name}/context
|
|
32
|
-
- [ ]
|
|
32
|
+
- [ ] query for the concept you want to understand
|
|
33
33
|
- [ ] Review returned processes (execution flows)
|
|
34
|
-
- [ ]
|
|
34
|
+
- [ ] context on key symbols for callers/callees
|
|
35
35
|
- [ ] READ process resource for full execution traces
|
|
36
36
|
- [ ] Read source files for implementation details
|
|
37
37
|
```
|
|
@@ -47,18 +47,18 @@ description: "Use when the user asks how code works, wants to understand archite
|
|
|
47
47
|
|
|
48
48
|
## Tools
|
|
49
49
|
|
|
50
|
-
**
|
|
50
|
+
**query** — find execution flows related to a concept:
|
|
51
51
|
|
|
52
52
|
```
|
|
53
|
-
|
|
53
|
+
query({query: "payment processing"})
|
|
54
54
|
→ Processes: CheckoutFlow, RefundFlow, WebhookHandler
|
|
55
55
|
→ Symbols grouped by flow with file locations
|
|
56
56
|
```
|
|
57
57
|
|
|
58
|
-
**
|
|
58
|
+
**context** — 360-degree view of a symbol:
|
|
59
59
|
|
|
60
60
|
```
|
|
61
|
-
|
|
61
|
+
context({name: "validateUser"})
|
|
62
62
|
→ Incoming calls: loginHandler, apiMiddleware
|
|
63
63
|
→ Outgoing calls: checkToken, getUserById
|
|
64
64
|
→ Processes: LoginFlow (step 2/5), TokenRefresh (step 1/3)
|
|
@@ -68,10 +68,10 @@ gitnexus_context({name: "validateUser"})
|
|
|
68
68
|
|
|
69
69
|
```
|
|
70
70
|
1. READ gitnexus://repo/my-app/context → 918 symbols, 45 processes
|
|
71
|
-
2.
|
|
71
|
+
2. query({query: "payment processing"})
|
|
72
72
|
→ CheckoutFlow: processPayment → validateCard → chargeStripe
|
|
73
73
|
→ RefundFlow: initiateRefund → calculateRefund → processRefund
|
|
74
|
-
3.
|
|
74
|
+
3. context({name: "processPayment"})
|
|
75
75
|
→ Incoming: checkoutHandler, webhookHandler
|
|
76
76
|
→ Outgoing: validateCard, chargeStripe, saveTransaction
|
|
77
77
|
4. Read src/payments/processor.ts for implementation details
|
package/skills/gitnexus-guide.md
CHANGED
|
@@ -15,7 +15,7 @@ For any task involving code understanding, debugging, impact analysis, or refact
|
|
|
15
15
|
2. **Match your task to a skill below** and **read that skill file**
|
|
16
16
|
3. **Follow the skill's workflow and checklist**
|
|
17
17
|
|
|
18
|
-
> If step 1 warns the index is stale, run `
|
|
18
|
+
> If step 1 warns the index is stale, run `node .gitnexus/run.cjs analyze` in the terminal first.
|
|
19
19
|
|
|
20
20
|
## Skills
|
|
21
21
|
|
|
@@ -17,22 +17,22 @@ description: "Use when the user wants to know what will break if they change som
|
|
|
17
17
|
## Workflow
|
|
18
18
|
|
|
19
19
|
```
|
|
20
|
-
1.
|
|
20
|
+
1. impact({target: "X", direction: "upstream"}) → What depends on this
|
|
21
21
|
2. READ gitnexus://repo/{name}/processes → Check affected execution flows
|
|
22
|
-
3.
|
|
22
|
+
3. detect_changes() → Map current git changes to affected flows
|
|
23
23
|
4. Assess risk and report to user
|
|
24
24
|
```
|
|
25
25
|
|
|
26
|
-
> If "Index is stale" → run `
|
|
26
|
+
> If "Index is stale" → run `node .gitnexus/run.cjs analyze` in terminal.
|
|
27
27
|
|
|
28
28
|
## Checklist
|
|
29
29
|
|
|
30
30
|
```
|
|
31
|
-
- [ ]
|
|
31
|
+
- [ ] impact({target, direction: "upstream"}) to find dependents
|
|
32
32
|
- [ ] Review d=1 items first (these WILL BREAK)
|
|
33
33
|
- [ ] Check high-confidence (>0.8) dependencies
|
|
34
34
|
- [ ] READ processes to check affected execution flows
|
|
35
|
-
- [ ]
|
|
35
|
+
- [ ] detect_changes() for pre-commit check
|
|
36
36
|
- [ ] Assess risk level and report to user
|
|
37
37
|
```
|
|
38
38
|
|
|
@@ -55,10 +55,10 @@ description: "Use when the user wants to know what will break if they change som
|
|
|
55
55
|
|
|
56
56
|
## Tools
|
|
57
57
|
|
|
58
|
-
**
|
|
58
|
+
**impact** — the primary tool for symbol blast radius:
|
|
59
59
|
|
|
60
60
|
```
|
|
61
|
-
|
|
61
|
+
impact({
|
|
62
62
|
target: "validateUser",
|
|
63
63
|
direction: "upstream",
|
|
64
64
|
minConfidence: 0.8,
|
|
@@ -73,10 +73,10 @@ gitnexus_impact({
|
|
|
73
73
|
- authRouter (src/routes/auth.ts:22) [CALLS, 95%]
|
|
74
74
|
```
|
|
75
75
|
|
|
76
|
-
**
|
|
76
|
+
**detect_changes** — git-diff based impact analysis:
|
|
77
77
|
|
|
78
78
|
```
|
|
79
|
-
|
|
79
|
+
detect_changes({scope: "staged"})
|
|
80
80
|
|
|
81
81
|
→ Changed: 5 symbols in 3 files
|
|
82
82
|
→ Affected: LoginFlow, TokenRefresh, APIMiddlewarePipeline
|
|
@@ -86,7 +86,7 @@ gitnexus_detect_changes({scope: "staged"})
|
|
|
86
86
|
## Example: "What breaks if I change validateUser?"
|
|
87
87
|
|
|
88
88
|
```
|
|
89
|
-
1.
|
|
89
|
+
1. impact({target: "validateUser", direction: "upstream"})
|
|
90
90
|
→ d=1: loginHandler, apiMiddleware (WILL BREAK)
|
|
91
91
|
→ d=2: authRouter, sessionManager (LIKELY AFFECTED)
|
|
92
92
|
|
|
@@ -18,24 +18,24 @@ description: "Use when the user wants to review a pull request, understand what
|
|
|
18
18
|
|
|
19
19
|
```
|
|
20
20
|
1. gh pr diff <number> → Get the raw diff
|
|
21
|
-
2.
|
|
21
|
+
2. detect_changes({scope: "compare", base_ref: "main"}) → Map diff to affected flows
|
|
22
22
|
3. For each changed symbol:
|
|
23
|
-
|
|
24
|
-
4.
|
|
23
|
+
impact({target: "<symbol>", direction: "upstream"}) → Blast radius per change
|
|
24
|
+
4. context({name: "<key symbol>"}) → Understand callers/callees
|
|
25
25
|
5. READ gitnexus://repo/{name}/processes → Check affected execution flows
|
|
26
26
|
6. Summarize findings with risk assessment
|
|
27
27
|
```
|
|
28
28
|
|
|
29
|
-
> If "Index is stale" → run `
|
|
29
|
+
> If "Index is stale" → run `node .gitnexus/run.cjs analyze` in terminal before reviewing.
|
|
30
30
|
|
|
31
31
|
## Checklist
|
|
32
32
|
|
|
33
33
|
```
|
|
34
34
|
- [ ] Fetch PR diff (gh pr diff or git diff base...head)
|
|
35
|
-
- [ ]
|
|
36
|
-
- [ ]
|
|
35
|
+
- [ ] detect_changes to map changes to affected execution flows
|
|
36
|
+
- [ ] impact on each non-trivial changed symbol
|
|
37
37
|
- [ ] Review d=1 items (WILL BREAK) — are callers updated?
|
|
38
|
-
- [ ]
|
|
38
|
+
- [ ] context on key changed symbols to understand full picture
|
|
39
39
|
- [ ] Check if affected processes have test coverage
|
|
40
40
|
- [ ] Assess overall risk level
|
|
41
41
|
- [ ] Write review summary with findings
|
|
@@ -63,20 +63,20 @@ description: "Use when the user wants to review a pull request, understand what
|
|
|
63
63
|
|
|
64
64
|
## Tools
|
|
65
65
|
|
|
66
|
-
**
|
|
66
|
+
**detect_changes** — map PR diff to affected execution flows:
|
|
67
67
|
|
|
68
68
|
```
|
|
69
|
-
|
|
69
|
+
detect_changes({scope: "compare", base_ref: "main"})
|
|
70
70
|
|
|
71
71
|
→ Changed: 8 symbols in 4 files
|
|
72
72
|
→ Affected processes: CheckoutFlow, RefundFlow, WebhookHandler
|
|
73
73
|
→ Risk: MEDIUM
|
|
74
74
|
```
|
|
75
75
|
|
|
76
|
-
**
|
|
76
|
+
**impact** — blast radius per changed symbol:
|
|
77
77
|
|
|
78
78
|
```
|
|
79
|
-
|
|
79
|
+
impact({target: "validatePayment", direction: "upstream"})
|
|
80
80
|
|
|
81
81
|
→ d=1 (WILL BREAK):
|
|
82
82
|
- processCheckout (src/checkout.ts:42) [CALLS, 100%]
|
|
@@ -86,20 +86,20 @@ gitnexus_impact({target: "validatePayment", direction: "upstream"})
|
|
|
86
86
|
- checkoutRouter (src/routes/checkout.ts:22) [CALLS, 95%]
|
|
87
87
|
```
|
|
88
88
|
|
|
89
|
-
**
|
|
89
|
+
**impact with tests** — check test coverage:
|
|
90
90
|
|
|
91
91
|
```
|
|
92
|
-
|
|
92
|
+
impact({target: "validatePayment", direction: "upstream", includeTests: true})
|
|
93
93
|
|
|
94
94
|
→ Tests that cover this symbol:
|
|
95
95
|
- validatePayment.test.ts [direct]
|
|
96
96
|
- checkout.integration.test.ts [via processCheckout]
|
|
97
97
|
```
|
|
98
98
|
|
|
99
|
-
**
|
|
99
|
+
**context** — understand a changed symbol's role:
|
|
100
100
|
|
|
101
101
|
```
|
|
102
|
-
|
|
102
|
+
context({name: "validatePayment"})
|
|
103
103
|
|
|
104
104
|
→ Incoming calls: processCheckout, webhookHandler
|
|
105
105
|
→ Outgoing calls: verifyCard, fetchRates
|
|
@@ -112,20 +112,20 @@ gitnexus_context({name: "validatePayment"})
|
|
|
112
112
|
1. gh pr diff 42 > /tmp/pr42.diff
|
|
113
113
|
→ 4 files changed: payments.ts, checkout.ts, types.ts, utils.ts
|
|
114
114
|
|
|
115
|
-
2.
|
|
115
|
+
2. detect_changes({scope: "compare", base_ref: "main"})
|
|
116
116
|
→ Changed symbols: validatePayment, PaymentInput, formatAmount
|
|
117
117
|
→ Affected processes: CheckoutFlow, RefundFlow
|
|
118
118
|
→ Risk: MEDIUM
|
|
119
119
|
|
|
120
|
-
3.
|
|
120
|
+
3. impact({target: "validatePayment", direction: "upstream"})
|
|
121
121
|
→ d=1: processCheckout, webhookHandler (WILL BREAK)
|
|
122
122
|
→ webhookHandler is NOT in the PR diff — potential breakage!
|
|
123
123
|
|
|
124
|
-
4.
|
|
124
|
+
4. impact({target: "PaymentInput", direction: "upstream"})
|
|
125
125
|
→ d=1: validatePayment (in PR), createPayment (NOT in PR)
|
|
126
126
|
→ createPayment uses the old PaymentInput shape — breaking change!
|
|
127
127
|
|
|
128
|
-
5.
|
|
128
|
+
5. context({name: "formatAmount"})
|
|
129
129
|
→ Called by 12 functions — but change is backwards-compatible (added optional param)
|
|
130
130
|
|
|
131
131
|
6. Review summary:
|
|
@@ -16,78 +16,78 @@ description: "Use when the user wants to rename, extract, split, move, or restru
|
|
|
16
16
|
## Workflow
|
|
17
17
|
|
|
18
18
|
```
|
|
19
|
-
1.
|
|
20
|
-
2.
|
|
21
|
-
3.
|
|
19
|
+
1. impact({target: "X", direction: "upstream"}) → Map all dependents
|
|
20
|
+
2. query({query: "X"}) → Find execution flows involving X
|
|
21
|
+
3. context({name: "X"}) → See all incoming/outgoing refs
|
|
22
22
|
4. Plan update order: interfaces → implementations → callers → tests
|
|
23
23
|
```
|
|
24
24
|
|
|
25
|
-
> If "Index is stale" → run `
|
|
25
|
+
> If "Index is stale" → run `node .gitnexus/run.cjs analyze` in terminal.
|
|
26
26
|
|
|
27
27
|
## Checklists
|
|
28
28
|
|
|
29
29
|
### Rename Symbol
|
|
30
30
|
|
|
31
31
|
```
|
|
32
|
-
- [ ]
|
|
32
|
+
- [ ] rename({symbol_name: "oldName", new_name: "newName", dry_run: true}) — preview all edits
|
|
33
33
|
- [ ] Review graph edits (high confidence) and ast_search edits (review carefully)
|
|
34
|
-
- [ ] If satisfied:
|
|
35
|
-
- [ ]
|
|
34
|
+
- [ ] If satisfied: rename({..., dry_run: false}) — apply edits
|
|
35
|
+
- [ ] detect_changes() — verify only expected files changed
|
|
36
36
|
- [ ] Run tests for affected processes
|
|
37
37
|
```
|
|
38
38
|
|
|
39
39
|
### Extract Module
|
|
40
40
|
|
|
41
41
|
```
|
|
42
|
-
- [ ]
|
|
43
|
-
- [ ]
|
|
42
|
+
- [ ] context({name: target}) — see all incoming/outgoing refs
|
|
43
|
+
- [ ] impact({target, direction: "upstream"}) — find all external callers
|
|
44
44
|
- [ ] Define new module interface
|
|
45
45
|
- [ ] Extract code, update imports
|
|
46
|
-
- [ ]
|
|
46
|
+
- [ ] detect_changes() — verify affected scope
|
|
47
47
|
- [ ] Run tests for affected processes
|
|
48
48
|
```
|
|
49
49
|
|
|
50
50
|
### Split Function/Service
|
|
51
51
|
|
|
52
52
|
```
|
|
53
|
-
- [ ]
|
|
53
|
+
- [ ] context({name: target}) — understand all callees
|
|
54
54
|
- [ ] Group callees by responsibility
|
|
55
|
-
- [ ]
|
|
55
|
+
- [ ] impact({target, direction: "upstream"}) — map callers to update
|
|
56
56
|
- [ ] Create new functions/services
|
|
57
57
|
- [ ] Update callers
|
|
58
|
-
- [ ]
|
|
58
|
+
- [ ] detect_changes() — verify affected scope
|
|
59
59
|
- [ ] Run tests for affected processes
|
|
60
60
|
```
|
|
61
61
|
|
|
62
62
|
## Tools
|
|
63
63
|
|
|
64
|
-
**
|
|
64
|
+
**rename** — automated multi-file rename:
|
|
65
65
|
|
|
66
66
|
```
|
|
67
|
-
|
|
67
|
+
rename({symbol_name: "validateUser", new_name: "authenticateUser", dry_run: true})
|
|
68
68
|
→ 12 edits across 8 files
|
|
69
69
|
→ 10 graph edits (high confidence), 2 ast_search edits (review)
|
|
70
70
|
→ Changes: [{file_path, edits: [{line, old_text, new_text, confidence}]}]
|
|
71
71
|
```
|
|
72
72
|
|
|
73
|
-
**
|
|
73
|
+
**impact** — map all dependents first:
|
|
74
74
|
|
|
75
75
|
```
|
|
76
|
-
|
|
76
|
+
impact({target: "validateUser", direction: "upstream"})
|
|
77
77
|
→ d=1: loginHandler, apiMiddleware, testUtils
|
|
78
78
|
→ Affected Processes: LoginFlow, TokenRefresh
|
|
79
79
|
```
|
|
80
80
|
|
|
81
|
-
**
|
|
81
|
+
**detect_changes** — verify your changes after refactoring:
|
|
82
82
|
|
|
83
83
|
```
|
|
84
|
-
|
|
84
|
+
detect_changes({scope: "all"})
|
|
85
85
|
→ Changed: 8 files, 12 symbols
|
|
86
86
|
→ Affected processes: LoginFlow, TokenRefresh
|
|
87
87
|
→ Risk: MEDIUM
|
|
88
88
|
```
|
|
89
89
|
|
|
90
|
-
**
|
|
90
|
+
**cypher** — custom reference queries:
|
|
91
91
|
|
|
92
92
|
```cypher
|
|
93
93
|
MATCH (caller)-[:CodeRelation {type: 'CALLS'}]->(f:Function {name: "validateUser"})
|
|
@@ -98,24 +98,24 @@ RETURN caller.name, caller.filePath ORDER BY caller.filePath
|
|
|
98
98
|
|
|
99
99
|
| Risk Factor | Mitigation |
|
|
100
100
|
| ------------------- | ----------------------------------------- |
|
|
101
|
-
| Many callers (>5) | Use
|
|
101
|
+
| Many callers (>5) | Use rename for automated updates |
|
|
102
102
|
| Cross-area refs | Use detect_changes after to verify scope |
|
|
103
|
-
| String/dynamic refs |
|
|
103
|
+
| String/dynamic refs | query to find them |
|
|
104
104
|
| External/public API | Version and deprecate properly |
|
|
105
105
|
|
|
106
106
|
## Example: Rename `validateUser` to `authenticateUser`
|
|
107
107
|
|
|
108
108
|
```
|
|
109
|
-
1.
|
|
109
|
+
1. rename({symbol_name: "validateUser", new_name: "authenticateUser", dry_run: true})
|
|
110
110
|
→ 12 edits: 10 graph (safe), 2 ast_search (review)
|
|
111
111
|
→ Files: validator.ts, login.ts, middleware.ts, config.json...
|
|
112
112
|
|
|
113
113
|
2. Review ast_search edits (config.json: dynamic reference!)
|
|
114
114
|
|
|
115
|
-
3.
|
|
115
|
+
3. rename({symbol_name: "validateUser", new_name: "authenticateUser", dry_run: false})
|
|
116
116
|
→ Applied 12 edits across 8 files
|
|
117
117
|
|
|
118
|
-
4.
|
|
118
|
+
4. detect_changes({scope: "all"})
|
|
119
119
|
→ Affected: LoginFlow, TokenRefresh
|
|
120
120
|
→ Risk: MEDIUM — run tests for these flows
|
|
121
121
|
```
|