gitnexus 1.4.1 → 1.4.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 +215 -194
- package/dist/cli/ai-context.d.ts +2 -1
- package/dist/cli/ai-context.js +117 -90
- package/dist/cli/analyze.d.ts +2 -0
- package/dist/cli/analyze.js +57 -30
- package/dist/cli/augment.js +1 -1
- package/dist/cli/eval-server.d.ts +1 -1
- package/dist/cli/eval-server.js +14 -6
- package/dist/cli/index.js +18 -25
- package/dist/cli/lazy-action.d.ts +6 -0
- package/dist/cli/lazy-action.js +18 -0
- package/dist/cli/mcp.js +1 -1
- package/dist/cli/setup.js +42 -32
- package/dist/cli/skill-gen.d.ts +26 -0
- package/dist/cli/skill-gen.js +549 -0
- package/dist/cli/status.js +13 -4
- package/dist/cli/tool.d.ts +3 -2
- package/dist/cli/tool.js +48 -13
- package/dist/cli/wiki.js +2 -2
- package/dist/config/ignore-service.d.ts +25 -0
- package/dist/config/ignore-service.js +76 -0
- package/dist/config/supported-languages.d.ts +1 -0
- package/dist/config/supported-languages.js +1 -1
- package/dist/core/augmentation/engine.js +99 -72
- package/dist/core/embeddings/embedder.d.ts +1 -1
- package/dist/core/embeddings/embedder.js +1 -1
- package/dist/core/embeddings/embedding-pipeline.d.ts +3 -3
- package/dist/core/embeddings/embedding-pipeline.js +74 -47
- package/dist/core/embeddings/types.d.ts +1 -1
- package/dist/core/graph/types.d.ts +5 -2
- package/dist/core/ingestion/ast-cache.js +3 -2
- package/dist/core/ingestion/call-processor.d.ts +5 -7
- package/dist/core/ingestion/call-processor.js +430 -283
- package/dist/core/ingestion/call-routing.d.ts +53 -0
- package/dist/core/ingestion/call-routing.js +108 -0
- package/dist/core/ingestion/cluster-enricher.js +16 -16
- package/dist/core/ingestion/constants.d.ts +16 -0
- package/dist/core/ingestion/constants.js +16 -0
- package/dist/core/ingestion/entry-point-scoring.d.ts +2 -1
- package/dist/core/ingestion/entry-point-scoring.js +94 -24
- package/dist/core/ingestion/export-detection.d.ts +18 -0
- package/dist/core/ingestion/export-detection.js +231 -0
- package/dist/core/ingestion/filesystem-walker.js +4 -3
- package/dist/core/ingestion/framework-detection.d.ts +5 -1
- package/dist/core/ingestion/framework-detection.js +48 -8
- package/dist/core/ingestion/heritage-processor.d.ts +13 -5
- package/dist/core/ingestion/heritage-processor.js +109 -55
- package/dist/core/ingestion/import-processor.d.ts +16 -20
- package/dist/core/ingestion/import-processor.js +202 -696
- package/dist/core/ingestion/language-config.d.ts +46 -0
- package/dist/core/ingestion/language-config.js +167 -0
- package/dist/core/ingestion/mro-processor.d.ts +45 -0
- package/dist/core/ingestion/mro-processor.js +369 -0
- package/dist/core/ingestion/named-binding-extraction.d.ts +61 -0
- package/dist/core/ingestion/named-binding-extraction.js +363 -0
- package/dist/core/ingestion/parsing-processor.d.ts +3 -11
- package/dist/core/ingestion/parsing-processor.js +85 -181
- package/dist/core/ingestion/pipeline.d.ts +5 -1
- package/dist/core/ingestion/pipeline.js +192 -116
- package/dist/core/ingestion/process-processor.js +2 -1
- package/dist/core/ingestion/resolution-context.d.ts +53 -0
- package/dist/core/ingestion/resolution-context.js +132 -0
- package/dist/core/ingestion/resolvers/csharp.d.ts +22 -0
- package/dist/core/ingestion/resolvers/csharp.js +109 -0
- package/dist/core/ingestion/resolvers/go.d.ts +19 -0
- package/dist/core/ingestion/resolvers/go.js +42 -0
- package/dist/core/ingestion/resolvers/index.d.ts +18 -0
- package/dist/core/ingestion/resolvers/index.js +13 -0
- package/dist/core/ingestion/resolvers/jvm.d.ts +23 -0
- package/dist/core/ingestion/resolvers/jvm.js +87 -0
- package/dist/core/ingestion/resolvers/php.d.ts +15 -0
- package/dist/core/ingestion/resolvers/php.js +35 -0
- package/dist/core/ingestion/resolvers/python.d.ts +19 -0
- package/dist/core/ingestion/resolvers/python.js +52 -0
- package/dist/core/ingestion/resolvers/ruby.d.ts +12 -0
- package/dist/core/ingestion/resolvers/ruby.js +15 -0
- package/dist/core/ingestion/resolvers/rust.d.ts +15 -0
- package/dist/core/ingestion/resolvers/rust.js +73 -0
- package/dist/core/ingestion/resolvers/standard.d.ts +28 -0
- package/dist/core/ingestion/resolvers/standard.js +123 -0
- package/dist/core/ingestion/resolvers/utils.d.ts +33 -0
- package/dist/core/ingestion/resolvers/utils.js +122 -0
- package/dist/core/ingestion/symbol-table.d.ts +21 -1
- package/dist/core/ingestion/symbol-table.js +40 -12
- package/dist/core/ingestion/tree-sitter-queries.d.ts +12 -11
- package/dist/core/ingestion/tree-sitter-queries.js +642 -485
- package/dist/core/ingestion/type-env.d.ts +49 -0
- package/dist/core/ingestion/type-env.js +611 -0
- package/dist/core/ingestion/type-extractors/c-cpp.d.ts +2 -0
- package/dist/core/ingestion/type-extractors/c-cpp.js +385 -0
- package/dist/core/ingestion/type-extractors/csharp.d.ts +2 -0
- package/dist/core/ingestion/type-extractors/csharp.js +383 -0
- package/dist/core/ingestion/type-extractors/go.d.ts +2 -0
- package/dist/core/ingestion/type-extractors/go.js +467 -0
- package/dist/core/ingestion/type-extractors/index.d.ts +22 -0
- package/dist/core/ingestion/type-extractors/index.js +31 -0
- package/dist/core/ingestion/type-extractors/jvm.d.ts +3 -0
- package/dist/core/ingestion/type-extractors/jvm.js +681 -0
- package/dist/core/ingestion/type-extractors/php.d.ts +2 -0
- package/dist/core/ingestion/type-extractors/php.js +549 -0
- package/dist/core/ingestion/type-extractors/python.d.ts +2 -0
- package/dist/core/ingestion/type-extractors/python.js +406 -0
- package/dist/core/ingestion/type-extractors/ruby.d.ts +2 -0
- package/dist/core/ingestion/type-extractors/ruby.js +389 -0
- package/dist/core/ingestion/type-extractors/rust.d.ts +2 -0
- package/dist/core/ingestion/type-extractors/rust.js +449 -0
- package/dist/core/ingestion/type-extractors/shared.d.ts +133 -0
- package/dist/core/ingestion/type-extractors/shared.js +703 -0
- package/dist/core/ingestion/type-extractors/swift.d.ts +2 -0
- package/dist/core/ingestion/type-extractors/swift.js +137 -0
- package/dist/core/ingestion/type-extractors/types.d.ts +127 -0
- package/dist/core/ingestion/type-extractors/types.js +1 -0
- package/dist/core/ingestion/type-extractors/typescript.d.ts +2 -0
- package/dist/core/ingestion/type-extractors/typescript.js +494 -0
- package/dist/core/ingestion/utils.d.ts +98 -0
- package/dist/core/ingestion/utils.js +1064 -9
- package/dist/core/ingestion/workers/parse-worker.d.ts +38 -4
- package/dist/core/ingestion/workers/parse-worker.js +251 -359
- package/dist/core/ingestion/workers/worker-pool.js +8 -0
- package/dist/core/{kuzu → lbug}/csv-generator.d.ts +1 -1
- package/dist/core/{kuzu → lbug}/csv-generator.js +20 -4
- package/dist/core/{kuzu/kuzu-adapter.d.ts → lbug/lbug-adapter.d.ts} +19 -19
- package/dist/core/{kuzu/kuzu-adapter.js → lbug/lbug-adapter.js} +82 -82
- package/dist/core/{kuzu → lbug}/schema.d.ts +4 -4
- package/dist/core/{kuzu → lbug}/schema.js +304 -289
- package/dist/core/search/bm25-index.d.ts +4 -4
- package/dist/core/search/bm25-index.js +17 -16
- package/dist/core/search/hybrid-search.d.ts +2 -2
- package/dist/core/search/hybrid-search.js +9 -9
- package/dist/core/tree-sitter/parser-loader.js +9 -2
- package/dist/core/wiki/generator.d.ts +4 -52
- package/dist/core/wiki/generator.js +53 -552
- package/dist/core/wiki/graph-queries.d.ts +4 -46
- package/dist/core/wiki/graph-queries.js +103 -282
- package/dist/core/wiki/html-viewer.js +192 -192
- package/dist/core/wiki/llm-client.js +11 -73
- package/dist/core/wiki/prompts.d.ts +8 -52
- package/dist/core/wiki/prompts.js +86 -200
- package/dist/mcp/compatible-stdio-transport.d.ts +25 -0
- package/dist/mcp/compatible-stdio-transport.js +200 -0
- package/dist/mcp/core/{kuzu-adapter.d.ts → lbug-adapter.d.ts} +7 -9
- package/dist/mcp/core/{kuzu-adapter.js → lbug-adapter.js} +77 -79
- package/dist/mcp/local/local-backend.d.ts +7 -6
- package/dist/mcp/local/local-backend.js +176 -147
- package/dist/mcp/resources.js +42 -42
- package/dist/mcp/server.js +18 -19
- package/dist/mcp/tools.js +103 -104
- package/dist/server/api.js +12 -12
- package/dist/server/mcp-http.d.ts +1 -1
- package/dist/server/mcp-http.js +1 -1
- package/dist/storage/repo-manager.d.ts +20 -2
- package/dist/storage/repo-manager.js +55 -1
- package/dist/types/pipeline.d.ts +1 -1
- package/hooks/claude/gitnexus-hook.cjs +238 -155
- package/hooks/claude/pre-tool-use.sh +79 -79
- package/hooks/claude/session-start.sh +42 -42
- package/package.json +99 -96
- package/scripts/patch-tree-sitter-swift.cjs +74 -74
- package/skills/gitnexus-cli.md +82 -82
- package/skills/gitnexus-debugging.md +89 -89
- package/skills/gitnexus-exploring.md +78 -78
- package/skills/gitnexus-guide.md +64 -64
- package/skills/gitnexus-impact-analysis.md +97 -97
- package/skills/gitnexus-pr-review.md +163 -163
- package/skills/gitnexus-refactoring.md +121 -121
- package/vendor/leiden/index.cjs +355 -355
- package/vendor/leiden/utils.cjs +392 -392
- package/dist/core/wiki/diagrams.d.ts +0 -27
- package/dist/core/wiki/diagrams.js +0 -163
|
@@ -1,89 +1,89 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: gitnexus-debugging
|
|
3
|
-
description: "Use when the user is debugging a bug, tracing an error, or asking why something fails. Examples: \"Why is X failing?\", \"Where does this error come from?\", \"Trace this bug\""
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Debugging with GitNexus
|
|
7
|
-
|
|
8
|
-
## When to Use
|
|
9
|
-
|
|
10
|
-
- "Why is this function failing?"
|
|
11
|
-
- "Trace where this error comes from"
|
|
12
|
-
- "Who calls this method?"
|
|
13
|
-
- "This endpoint returns 500"
|
|
14
|
-
- Investigating bugs, errors, or unexpected behavior
|
|
15
|
-
|
|
16
|
-
## Workflow
|
|
17
|
-
|
|
18
|
-
```
|
|
19
|
-
1. gitnexus_query({query: "<error or symptom>"}) → Find related execution flows
|
|
20
|
-
2. gitnexus_context({name: "<suspect>"}) → See callers/callees/processes
|
|
21
|
-
3. READ gitnexus://repo/{name}/process/{name} → Trace execution flow
|
|
22
|
-
4. gitnexus_cypher({query: "MATCH path..."}) → Custom traces if needed
|
|
23
|
-
```
|
|
24
|
-
|
|
25
|
-
> If "Index is stale" → run `npx gitnexus analyze` in terminal.
|
|
26
|
-
|
|
27
|
-
## Checklist
|
|
28
|
-
|
|
29
|
-
```
|
|
30
|
-
- [ ] Understand the symptom (error message, unexpected behavior)
|
|
31
|
-
- [ ] gitnexus_query for error text or related code
|
|
32
|
-
- [ ] Identify the suspect function from returned processes
|
|
33
|
-
- [ ] gitnexus_context to see callers and callees
|
|
34
|
-
- [ ] Trace execution flow via process resource if applicable
|
|
35
|
-
- [ ] gitnexus_cypher for custom call chain traces if needed
|
|
36
|
-
- [ ] Read source files to confirm root cause
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
## Debugging Patterns
|
|
40
|
-
|
|
41
|
-
| Symptom | GitNexus Approach |
|
|
42
|
-
| -------------------- | ---------------------------------------------------------- |
|
|
43
|
-
| Error message | `gitnexus_query` for error text → `context` on throw sites |
|
|
44
|
-
| Wrong return value | `context` on the function → trace callees for data flow |
|
|
45
|
-
| Intermittent failure | `context` → look for external calls, async deps |
|
|
46
|
-
| Performance issue | `context` → find symbols with many callers (hot paths) |
|
|
47
|
-
| Recent regression | `detect_changes` to see what your changes affect |
|
|
48
|
-
|
|
49
|
-
## Tools
|
|
50
|
-
|
|
51
|
-
**gitnexus_query** — find code related to error:
|
|
52
|
-
|
|
53
|
-
```
|
|
54
|
-
gitnexus_query({query: "payment validation error"})
|
|
55
|
-
→ Processes: CheckoutFlow, ErrorHandling
|
|
56
|
-
→ Symbols: validatePayment, handlePaymentError, PaymentException
|
|
57
|
-
```
|
|
58
|
-
|
|
59
|
-
**gitnexus_context** — full context for a suspect:
|
|
60
|
-
|
|
61
|
-
```
|
|
62
|
-
gitnexus_context({name: "validatePayment"})
|
|
63
|
-
→ Incoming calls: processCheckout, webhookHandler
|
|
64
|
-
→ Outgoing calls: verifyCard, fetchRates (external API!)
|
|
65
|
-
→ Processes: CheckoutFlow (step 3/7)
|
|
66
|
-
```
|
|
67
|
-
|
|
68
|
-
**gitnexus_cypher** — custom call chain traces:
|
|
69
|
-
|
|
70
|
-
```cypher
|
|
71
|
-
MATCH path = (a)-[:CodeRelation {type: 'CALLS'}*1..2]->(b:Function {name: "validatePayment"})
|
|
72
|
-
RETURN [n IN nodes(path) | n.name] AS chain
|
|
73
|
-
```
|
|
74
|
-
|
|
75
|
-
## Example: "Payment endpoint returns 500 intermittently"
|
|
76
|
-
|
|
77
|
-
```
|
|
78
|
-
1. gitnexus_query({query: "payment error handling"})
|
|
79
|
-
→ Processes: CheckoutFlow, ErrorHandling
|
|
80
|
-
→ Symbols: validatePayment, handlePaymentError
|
|
81
|
-
|
|
82
|
-
2. gitnexus_context({name: "validatePayment"})
|
|
83
|
-
→ Outgoing calls: verifyCard, fetchRates (external API!)
|
|
84
|
-
|
|
85
|
-
3. READ gitnexus://repo/my-app/process/CheckoutFlow
|
|
86
|
-
→ Step 3: validatePayment → calls fetchRates (external)
|
|
87
|
-
|
|
88
|
-
4. Root cause: fetchRates calls external API without proper timeout
|
|
89
|
-
```
|
|
1
|
+
---
|
|
2
|
+
name: gitnexus-debugging
|
|
3
|
+
description: "Use when the user is debugging a bug, tracing an error, or asking why something fails. Examples: \"Why is X failing?\", \"Where does this error come from?\", \"Trace this bug\""
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Debugging with GitNexus
|
|
7
|
+
|
|
8
|
+
## When to Use
|
|
9
|
+
|
|
10
|
+
- "Why is this function failing?"
|
|
11
|
+
- "Trace where this error comes from"
|
|
12
|
+
- "Who calls this method?"
|
|
13
|
+
- "This endpoint returns 500"
|
|
14
|
+
- Investigating bugs, errors, or unexpected behavior
|
|
15
|
+
|
|
16
|
+
## Workflow
|
|
17
|
+
|
|
18
|
+
```
|
|
19
|
+
1. gitnexus_query({query: "<error or symptom>"}) → Find related execution flows
|
|
20
|
+
2. gitnexus_context({name: "<suspect>"}) → See callers/callees/processes
|
|
21
|
+
3. READ gitnexus://repo/{name}/process/{name} → Trace execution flow
|
|
22
|
+
4. gitnexus_cypher({query: "MATCH path..."}) → Custom traces if needed
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
> If "Index is stale" → run `npx gitnexus analyze` in terminal.
|
|
26
|
+
|
|
27
|
+
## Checklist
|
|
28
|
+
|
|
29
|
+
```
|
|
30
|
+
- [ ] Understand the symptom (error message, unexpected behavior)
|
|
31
|
+
- [ ] gitnexus_query for error text or related code
|
|
32
|
+
- [ ] Identify the suspect function from returned processes
|
|
33
|
+
- [ ] gitnexus_context to see callers and callees
|
|
34
|
+
- [ ] Trace execution flow via process resource if applicable
|
|
35
|
+
- [ ] gitnexus_cypher for custom call chain traces if needed
|
|
36
|
+
- [ ] Read source files to confirm root cause
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## Debugging Patterns
|
|
40
|
+
|
|
41
|
+
| Symptom | GitNexus Approach |
|
|
42
|
+
| -------------------- | ---------------------------------------------------------- |
|
|
43
|
+
| Error message | `gitnexus_query` for error text → `context` on throw sites |
|
|
44
|
+
| Wrong return value | `context` on the function → trace callees for data flow |
|
|
45
|
+
| Intermittent failure | `context` → look for external calls, async deps |
|
|
46
|
+
| Performance issue | `context` → find symbols with many callers (hot paths) |
|
|
47
|
+
| Recent regression | `detect_changes` to see what your changes affect |
|
|
48
|
+
|
|
49
|
+
## Tools
|
|
50
|
+
|
|
51
|
+
**gitnexus_query** — find code related to error:
|
|
52
|
+
|
|
53
|
+
```
|
|
54
|
+
gitnexus_query({query: "payment validation error"})
|
|
55
|
+
→ Processes: CheckoutFlow, ErrorHandling
|
|
56
|
+
→ Symbols: validatePayment, handlePaymentError, PaymentException
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
**gitnexus_context** — full context for a suspect:
|
|
60
|
+
|
|
61
|
+
```
|
|
62
|
+
gitnexus_context({name: "validatePayment"})
|
|
63
|
+
→ Incoming calls: processCheckout, webhookHandler
|
|
64
|
+
→ Outgoing calls: verifyCard, fetchRates (external API!)
|
|
65
|
+
→ Processes: CheckoutFlow (step 3/7)
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
**gitnexus_cypher** — custom call chain traces:
|
|
69
|
+
|
|
70
|
+
```cypher
|
|
71
|
+
MATCH path = (a)-[:CodeRelation {type: 'CALLS'}*1..2]->(b:Function {name: "validatePayment"})
|
|
72
|
+
RETURN [n IN nodes(path) | n.name] AS chain
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
## Example: "Payment endpoint returns 500 intermittently"
|
|
76
|
+
|
|
77
|
+
```
|
|
78
|
+
1. gitnexus_query({query: "payment error handling"})
|
|
79
|
+
→ Processes: CheckoutFlow, ErrorHandling
|
|
80
|
+
→ Symbols: validatePayment, handlePaymentError
|
|
81
|
+
|
|
82
|
+
2. gitnexus_context({name: "validatePayment"})
|
|
83
|
+
→ Outgoing calls: verifyCard, fetchRates (external API!)
|
|
84
|
+
|
|
85
|
+
3. READ gitnexus://repo/my-app/process/CheckoutFlow
|
|
86
|
+
→ Step 3: validatePayment → calls fetchRates (external)
|
|
87
|
+
|
|
88
|
+
4. Root cause: fetchRates calls external API without proper timeout
|
|
89
|
+
```
|
|
@@ -1,78 +1,78 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: gitnexus-exploring
|
|
3
|
-
description: "Use when the user asks how code works, wants to understand architecture, trace execution flows, or explore unfamiliar parts of the codebase. Examples: \"How does X work?\", \"What calls this function?\", \"Show me the auth flow\""
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Exploring Codebases with GitNexus
|
|
7
|
-
|
|
8
|
-
## When to Use
|
|
9
|
-
|
|
10
|
-
- "How does authentication work?"
|
|
11
|
-
- "What's the project structure?"
|
|
12
|
-
- "Show me the main components"
|
|
13
|
-
- "Where is the database logic?"
|
|
14
|
-
- Understanding code you haven't seen before
|
|
15
|
-
|
|
16
|
-
## Workflow
|
|
17
|
-
|
|
18
|
-
```
|
|
19
|
-
1. READ gitnexus://repos → Discover indexed repos
|
|
20
|
-
2. READ gitnexus://repo/{name}/context → Codebase overview, check staleness
|
|
21
|
-
3. gitnexus_query({query: "<what you want to understand>"}) → Find related execution flows
|
|
22
|
-
4. gitnexus_context({name: "<symbol>"}) → Deep dive on specific symbol
|
|
23
|
-
5. READ gitnexus://repo/{name}/process/{name} → Trace full execution flow
|
|
24
|
-
```
|
|
25
|
-
|
|
26
|
-
> If step 2 says "Index is stale" → run `npx gitnexus analyze` in terminal.
|
|
27
|
-
|
|
28
|
-
## Checklist
|
|
29
|
-
|
|
30
|
-
```
|
|
31
|
-
- [ ] READ gitnexus://repo/{name}/context
|
|
32
|
-
- [ ] gitnexus_query for the concept you want to understand
|
|
33
|
-
- [ ] Review returned processes (execution flows)
|
|
34
|
-
- [ ] gitnexus_context on key symbols for callers/callees
|
|
35
|
-
- [ ] READ process resource for full execution traces
|
|
36
|
-
- [ ] Read source files for implementation details
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
## Resources
|
|
40
|
-
|
|
41
|
-
| Resource | What you get |
|
|
42
|
-
| --------------------------------------- | ------------------------------------------------------- |
|
|
43
|
-
| `gitnexus://repo/{name}/context` | Stats, staleness warning (~150 tokens) |
|
|
44
|
-
| `gitnexus://repo/{name}/clusters` | All functional areas with cohesion scores (~300 tokens) |
|
|
45
|
-
| `gitnexus://repo/{name}/cluster/{name}` | Area members with file paths (~500 tokens) |
|
|
46
|
-
| `gitnexus://repo/{name}/process/{name}` | Step-by-step execution trace (~200 tokens) |
|
|
47
|
-
|
|
48
|
-
## Tools
|
|
49
|
-
|
|
50
|
-
**gitnexus_query** — find execution flows related to a concept:
|
|
51
|
-
|
|
52
|
-
```
|
|
53
|
-
gitnexus_query({query: "payment processing"})
|
|
54
|
-
→ Processes: CheckoutFlow, RefundFlow, WebhookHandler
|
|
55
|
-
→ Symbols grouped by flow with file locations
|
|
56
|
-
```
|
|
57
|
-
|
|
58
|
-
**gitnexus_context** — 360-degree view of a symbol:
|
|
59
|
-
|
|
60
|
-
```
|
|
61
|
-
gitnexus_context({name: "validateUser"})
|
|
62
|
-
→ Incoming calls: loginHandler, apiMiddleware
|
|
63
|
-
→ Outgoing calls: checkToken, getUserById
|
|
64
|
-
→ Processes: LoginFlow (step 2/5), TokenRefresh (step 1/3)
|
|
65
|
-
```
|
|
66
|
-
|
|
67
|
-
## Example: "How does payment processing work?"
|
|
68
|
-
|
|
69
|
-
```
|
|
70
|
-
1. READ gitnexus://repo/my-app/context → 918 symbols, 45 processes
|
|
71
|
-
2. gitnexus_query({query: "payment processing"})
|
|
72
|
-
→ CheckoutFlow: processPayment → validateCard → chargeStripe
|
|
73
|
-
→ RefundFlow: initiateRefund → calculateRefund → processRefund
|
|
74
|
-
3. gitnexus_context({name: "processPayment"})
|
|
75
|
-
→ Incoming: checkoutHandler, webhookHandler
|
|
76
|
-
→ Outgoing: validateCard, chargeStripe, saveTransaction
|
|
77
|
-
4. Read src/payments/processor.ts for implementation details
|
|
78
|
-
```
|
|
1
|
+
---
|
|
2
|
+
name: gitnexus-exploring
|
|
3
|
+
description: "Use when the user asks how code works, wants to understand architecture, trace execution flows, or explore unfamiliar parts of the codebase. Examples: \"How does X work?\", \"What calls this function?\", \"Show me the auth flow\""
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Exploring Codebases with GitNexus
|
|
7
|
+
|
|
8
|
+
## When to Use
|
|
9
|
+
|
|
10
|
+
- "How does authentication work?"
|
|
11
|
+
- "What's the project structure?"
|
|
12
|
+
- "Show me the main components"
|
|
13
|
+
- "Where is the database logic?"
|
|
14
|
+
- Understanding code you haven't seen before
|
|
15
|
+
|
|
16
|
+
## Workflow
|
|
17
|
+
|
|
18
|
+
```
|
|
19
|
+
1. READ gitnexus://repos → Discover indexed repos
|
|
20
|
+
2. READ gitnexus://repo/{name}/context → Codebase overview, check staleness
|
|
21
|
+
3. gitnexus_query({query: "<what you want to understand>"}) → Find related execution flows
|
|
22
|
+
4. gitnexus_context({name: "<symbol>"}) → Deep dive on specific symbol
|
|
23
|
+
5. READ gitnexus://repo/{name}/process/{name} → Trace full execution flow
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
> If step 2 says "Index is stale" → run `npx gitnexus analyze` in terminal.
|
|
27
|
+
|
|
28
|
+
## Checklist
|
|
29
|
+
|
|
30
|
+
```
|
|
31
|
+
- [ ] READ gitnexus://repo/{name}/context
|
|
32
|
+
- [ ] gitnexus_query for the concept you want to understand
|
|
33
|
+
- [ ] Review returned processes (execution flows)
|
|
34
|
+
- [ ] gitnexus_context on key symbols for callers/callees
|
|
35
|
+
- [ ] READ process resource for full execution traces
|
|
36
|
+
- [ ] Read source files for implementation details
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## Resources
|
|
40
|
+
|
|
41
|
+
| Resource | What you get |
|
|
42
|
+
| --------------------------------------- | ------------------------------------------------------- |
|
|
43
|
+
| `gitnexus://repo/{name}/context` | Stats, staleness warning (~150 tokens) |
|
|
44
|
+
| `gitnexus://repo/{name}/clusters` | All functional areas with cohesion scores (~300 tokens) |
|
|
45
|
+
| `gitnexus://repo/{name}/cluster/{name}` | Area members with file paths (~500 tokens) |
|
|
46
|
+
| `gitnexus://repo/{name}/process/{name}` | Step-by-step execution trace (~200 tokens) |
|
|
47
|
+
|
|
48
|
+
## Tools
|
|
49
|
+
|
|
50
|
+
**gitnexus_query** — find execution flows related to a concept:
|
|
51
|
+
|
|
52
|
+
```
|
|
53
|
+
gitnexus_query({query: "payment processing"})
|
|
54
|
+
→ Processes: CheckoutFlow, RefundFlow, WebhookHandler
|
|
55
|
+
→ Symbols grouped by flow with file locations
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
**gitnexus_context** — 360-degree view of a symbol:
|
|
59
|
+
|
|
60
|
+
```
|
|
61
|
+
gitnexus_context({name: "validateUser"})
|
|
62
|
+
→ Incoming calls: loginHandler, apiMiddleware
|
|
63
|
+
→ Outgoing calls: checkToken, getUserById
|
|
64
|
+
→ Processes: LoginFlow (step 2/5), TokenRefresh (step 1/3)
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
## Example: "How does payment processing work?"
|
|
68
|
+
|
|
69
|
+
```
|
|
70
|
+
1. READ gitnexus://repo/my-app/context → 918 symbols, 45 processes
|
|
71
|
+
2. gitnexus_query({query: "payment processing"})
|
|
72
|
+
→ CheckoutFlow: processPayment → validateCard → chargeStripe
|
|
73
|
+
→ RefundFlow: initiateRefund → calculateRefund → processRefund
|
|
74
|
+
3. gitnexus_context({name: "processPayment"})
|
|
75
|
+
→ Incoming: checkoutHandler, webhookHandler
|
|
76
|
+
→ Outgoing: validateCard, chargeStripe, saveTransaction
|
|
77
|
+
4. Read src/payments/processor.ts for implementation details
|
|
78
|
+
```
|
package/skills/gitnexus-guide.md
CHANGED
|
@@ -1,64 +1,64 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: gitnexus-guide
|
|
3
|
-
description: "Use when the user asks about GitNexus itself — available tools, how to query the knowledge graph, MCP resources, graph schema, or workflow reference. Examples: \"What GitNexus tools are available?\", \"How do I use GitNexus?\""
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# GitNexus Guide
|
|
7
|
-
|
|
8
|
-
Quick reference for all GitNexus MCP tools, resources, and the knowledge graph schema.
|
|
9
|
-
|
|
10
|
-
## Always Start Here
|
|
11
|
-
|
|
12
|
-
For any task involving code understanding, debugging, impact analysis, or refactoring:
|
|
13
|
-
|
|
14
|
-
1. **Read `gitnexus://repo/{name}/context`** — codebase overview + check index freshness
|
|
15
|
-
2. **Match your task to a skill below** and **read that skill file**
|
|
16
|
-
3. **Follow the skill's workflow and checklist**
|
|
17
|
-
|
|
18
|
-
> If step 1 warns the index is stale, run `npx gitnexus analyze` in the terminal first.
|
|
19
|
-
|
|
20
|
-
## Skills
|
|
21
|
-
|
|
22
|
-
| Task | Skill to read |
|
|
23
|
-
| -------------------------------------------- | ------------------- |
|
|
24
|
-
| Understand architecture / "How does X work?" | `gitnexus-exploring` |
|
|
25
|
-
| Blast radius / "What breaks if I change X?" | `gitnexus-impact-analysis` |
|
|
26
|
-
| Trace bugs / "Why is X failing?" | `gitnexus-debugging` |
|
|
27
|
-
| Rename / extract / split / refactor | `gitnexus-refactoring` |
|
|
28
|
-
| Tools, resources, schema reference | `gitnexus-guide` (this file) |
|
|
29
|
-
| Index, status, clean, wiki CLI commands | `gitnexus-cli` |
|
|
30
|
-
|
|
31
|
-
## Tools Reference
|
|
32
|
-
|
|
33
|
-
| Tool | What it gives you |
|
|
34
|
-
| ---------------- | ------------------------------------------------------------------------ |
|
|
35
|
-
| `query` | Process-grouped code intelligence — execution flows related to a concept |
|
|
36
|
-
| `context` | 360-degree symbol view — categorized refs, processes it participates in |
|
|
37
|
-
| `impact` | Symbol blast radius — what breaks at depth 1/2/3 with confidence |
|
|
38
|
-
| `detect_changes` | Git-diff impact — what do your current changes affect |
|
|
39
|
-
| `rename` | Multi-file coordinated rename with confidence-tagged edits |
|
|
40
|
-
| `cypher` | Raw graph queries (read `gitnexus://repo/{name}/schema` first) |
|
|
41
|
-
| `list_repos` | Discover indexed repos |
|
|
42
|
-
|
|
43
|
-
## Resources Reference
|
|
44
|
-
|
|
45
|
-
Lightweight reads (~100-500 tokens) for navigation:
|
|
46
|
-
|
|
47
|
-
| Resource | Content |
|
|
48
|
-
| ---------------------------------------------- | ----------------------------------------- |
|
|
49
|
-
| `gitnexus://repo/{name}/context` | Stats, staleness check |
|
|
50
|
-
| `gitnexus://repo/{name}/clusters` | All functional areas with cohesion scores |
|
|
51
|
-
| `gitnexus://repo/{name}/cluster/{clusterName}` | Area members |
|
|
52
|
-
| `gitnexus://repo/{name}/processes` | All execution flows |
|
|
53
|
-
| `gitnexus://repo/{name}/process/{processName}` | Step-by-step trace |
|
|
54
|
-
| `gitnexus://repo/{name}/schema` | Graph schema for Cypher |
|
|
55
|
-
|
|
56
|
-
## Graph Schema
|
|
57
|
-
|
|
58
|
-
**Nodes:** File, Function, Class, Interface, Method, Community, Process
|
|
59
|
-
**Edges (via CodeRelation.type):** CALLS, IMPORTS, EXTENDS, IMPLEMENTS, DEFINES, MEMBER_OF, STEP_IN_PROCESS
|
|
60
|
-
|
|
61
|
-
```cypher
|
|
62
|
-
MATCH (caller)-[:CodeRelation {type: 'CALLS'}]->(f:Function {name: "myFunc"})
|
|
63
|
-
RETURN caller.name, caller.filePath
|
|
64
|
-
```
|
|
1
|
+
---
|
|
2
|
+
name: gitnexus-guide
|
|
3
|
+
description: "Use when the user asks about GitNexus itself — available tools, how to query the knowledge graph, MCP resources, graph schema, or workflow reference. Examples: \"What GitNexus tools are available?\", \"How do I use GitNexus?\""
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# GitNexus Guide
|
|
7
|
+
|
|
8
|
+
Quick reference for all GitNexus MCP tools, resources, and the knowledge graph schema.
|
|
9
|
+
|
|
10
|
+
## Always Start Here
|
|
11
|
+
|
|
12
|
+
For any task involving code understanding, debugging, impact analysis, or refactoring:
|
|
13
|
+
|
|
14
|
+
1. **Read `gitnexus://repo/{name}/context`** — codebase overview + check index freshness
|
|
15
|
+
2. **Match your task to a skill below** and **read that skill file**
|
|
16
|
+
3. **Follow the skill's workflow and checklist**
|
|
17
|
+
|
|
18
|
+
> If step 1 warns the index is stale, run `npx gitnexus analyze` in the terminal first.
|
|
19
|
+
|
|
20
|
+
## Skills
|
|
21
|
+
|
|
22
|
+
| Task | Skill to read |
|
|
23
|
+
| -------------------------------------------- | ------------------- |
|
|
24
|
+
| Understand architecture / "How does X work?" | `gitnexus-exploring` |
|
|
25
|
+
| Blast radius / "What breaks if I change X?" | `gitnexus-impact-analysis` |
|
|
26
|
+
| Trace bugs / "Why is X failing?" | `gitnexus-debugging` |
|
|
27
|
+
| Rename / extract / split / refactor | `gitnexus-refactoring` |
|
|
28
|
+
| Tools, resources, schema reference | `gitnexus-guide` (this file) |
|
|
29
|
+
| Index, status, clean, wiki CLI commands | `gitnexus-cli` |
|
|
30
|
+
|
|
31
|
+
## Tools Reference
|
|
32
|
+
|
|
33
|
+
| Tool | What it gives you |
|
|
34
|
+
| ---------------- | ------------------------------------------------------------------------ |
|
|
35
|
+
| `query` | Process-grouped code intelligence — execution flows related to a concept |
|
|
36
|
+
| `context` | 360-degree symbol view — categorized refs, processes it participates in |
|
|
37
|
+
| `impact` | Symbol blast radius — what breaks at depth 1/2/3 with confidence |
|
|
38
|
+
| `detect_changes` | Git-diff impact — what do your current changes affect |
|
|
39
|
+
| `rename` | Multi-file coordinated rename with confidence-tagged edits |
|
|
40
|
+
| `cypher` | Raw graph queries (read `gitnexus://repo/{name}/schema` first) |
|
|
41
|
+
| `list_repos` | Discover indexed repos |
|
|
42
|
+
|
|
43
|
+
## Resources Reference
|
|
44
|
+
|
|
45
|
+
Lightweight reads (~100-500 tokens) for navigation:
|
|
46
|
+
|
|
47
|
+
| Resource | Content |
|
|
48
|
+
| ---------------------------------------------- | ----------------------------------------- |
|
|
49
|
+
| `gitnexus://repo/{name}/context` | Stats, staleness check |
|
|
50
|
+
| `gitnexus://repo/{name}/clusters` | All functional areas with cohesion scores |
|
|
51
|
+
| `gitnexus://repo/{name}/cluster/{clusterName}` | Area members |
|
|
52
|
+
| `gitnexus://repo/{name}/processes` | All execution flows |
|
|
53
|
+
| `gitnexus://repo/{name}/process/{processName}` | Step-by-step trace |
|
|
54
|
+
| `gitnexus://repo/{name}/schema` | Graph schema for Cypher |
|
|
55
|
+
|
|
56
|
+
## Graph Schema
|
|
57
|
+
|
|
58
|
+
**Nodes:** File, Function, Class, Interface, Method, Community, Process
|
|
59
|
+
**Edges (via CodeRelation.type):** CALLS, IMPORTS, EXTENDS, IMPLEMENTS, DEFINES, MEMBER_OF, STEP_IN_PROCESS
|
|
60
|
+
|
|
61
|
+
```cypher
|
|
62
|
+
MATCH (caller)-[:CodeRelation {type: 'CALLS'}]->(f:Function {name: "myFunc"})
|
|
63
|
+
RETURN caller.name, caller.filePath
|
|
64
|
+
```
|
|
@@ -1,97 +1,97 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: gitnexus-impact-analysis
|
|
3
|
-
description: "Use when the user wants to know what will break if they change something, or needs safety analysis before editing code. Examples: \"Is it safe to change X?\", \"What depends on this?\", \"What will break?\""
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Impact Analysis with GitNexus
|
|
7
|
-
|
|
8
|
-
## When to Use
|
|
9
|
-
|
|
10
|
-
- "Is it safe to change this function?"
|
|
11
|
-
- "What will break if I modify X?"
|
|
12
|
-
- "Show me the blast radius"
|
|
13
|
-
- "Who uses this code?"
|
|
14
|
-
- Before making non-trivial code changes
|
|
15
|
-
- Before committing — to understand what your changes affect
|
|
16
|
-
|
|
17
|
-
## Workflow
|
|
18
|
-
|
|
19
|
-
```
|
|
20
|
-
1. gitnexus_impact({target: "X", direction: "upstream"}) → What depends on this
|
|
21
|
-
2. READ gitnexus://repo/{name}/processes → Check affected execution flows
|
|
22
|
-
3. gitnexus_detect_changes() → Map current git changes to affected flows
|
|
23
|
-
4. Assess risk and report to user
|
|
24
|
-
```
|
|
25
|
-
|
|
26
|
-
> If "Index is stale" → run `npx gitnexus analyze` in terminal.
|
|
27
|
-
|
|
28
|
-
## Checklist
|
|
29
|
-
|
|
30
|
-
```
|
|
31
|
-
- [ ] gitnexus_impact({target, direction: "upstream"}) to find dependents
|
|
32
|
-
- [ ] Review d=1 items first (these WILL BREAK)
|
|
33
|
-
- [ ] Check high-confidence (>0.8) dependencies
|
|
34
|
-
- [ ] READ processes to check affected execution flows
|
|
35
|
-
- [ ] gitnexus_detect_changes() for pre-commit check
|
|
36
|
-
- [ ] Assess risk level and report to user
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
## Understanding Output
|
|
40
|
-
|
|
41
|
-
| Depth | Risk Level | Meaning |
|
|
42
|
-
| ----- | ---------------- | ------------------------ |
|
|
43
|
-
| d=1 | **WILL BREAK** | Direct callers/importers |
|
|
44
|
-
| d=2 | LIKELY AFFECTED | Indirect dependencies |
|
|
45
|
-
| d=3 | MAY NEED TESTING | Transitive effects |
|
|
46
|
-
|
|
47
|
-
## Risk Assessment
|
|
48
|
-
|
|
49
|
-
| Affected | Risk |
|
|
50
|
-
| ------------------------------ | -------- |
|
|
51
|
-
| <5 symbols, few processes | LOW |
|
|
52
|
-
| 5-15 symbols, 2-5 processes | MEDIUM |
|
|
53
|
-
| >15 symbols or many processes | HIGH |
|
|
54
|
-
| Critical path (auth, payments) | CRITICAL |
|
|
55
|
-
|
|
56
|
-
## Tools
|
|
57
|
-
|
|
58
|
-
**gitnexus_impact** — the primary tool for symbol blast radius:
|
|
59
|
-
|
|
60
|
-
```
|
|
61
|
-
gitnexus_impact({
|
|
62
|
-
target: "validateUser",
|
|
63
|
-
direction: "upstream",
|
|
64
|
-
minConfidence: 0.8,
|
|
65
|
-
maxDepth: 3
|
|
66
|
-
})
|
|
67
|
-
|
|
68
|
-
→ d=1 (WILL BREAK):
|
|
69
|
-
- loginHandler (src/auth/login.ts:42) [CALLS, 100%]
|
|
70
|
-
- apiMiddleware (src/api/middleware.ts:15) [CALLS, 100%]
|
|
71
|
-
|
|
72
|
-
→ d=2 (LIKELY AFFECTED):
|
|
73
|
-
- authRouter (src/routes/auth.ts:22) [CALLS, 95%]
|
|
74
|
-
```
|
|
75
|
-
|
|
76
|
-
**gitnexus_detect_changes** — git-diff based impact analysis:
|
|
77
|
-
|
|
78
|
-
```
|
|
79
|
-
gitnexus_detect_changes({scope: "staged"})
|
|
80
|
-
|
|
81
|
-
→ Changed: 5 symbols in 3 files
|
|
82
|
-
→ Affected: LoginFlow, TokenRefresh, APIMiddlewarePipeline
|
|
83
|
-
→ Risk: MEDIUM
|
|
84
|
-
```
|
|
85
|
-
|
|
86
|
-
## Example: "What breaks if I change validateUser?"
|
|
87
|
-
|
|
88
|
-
```
|
|
89
|
-
1. gitnexus_impact({target: "validateUser", direction: "upstream"})
|
|
90
|
-
→ d=1: loginHandler, apiMiddleware (WILL BREAK)
|
|
91
|
-
→ d=2: authRouter, sessionManager (LIKELY AFFECTED)
|
|
92
|
-
|
|
93
|
-
2. READ gitnexus://repo/my-app/processes
|
|
94
|
-
→ LoginFlow and TokenRefresh touch validateUser
|
|
95
|
-
|
|
96
|
-
3. Risk: 2 direct callers, 2 processes = MEDIUM
|
|
97
|
-
```
|
|
1
|
+
---
|
|
2
|
+
name: gitnexus-impact-analysis
|
|
3
|
+
description: "Use when the user wants to know what will break if they change something, or needs safety analysis before editing code. Examples: \"Is it safe to change X?\", \"What depends on this?\", \"What will break?\""
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Impact Analysis with GitNexus
|
|
7
|
+
|
|
8
|
+
## When to Use
|
|
9
|
+
|
|
10
|
+
- "Is it safe to change this function?"
|
|
11
|
+
- "What will break if I modify X?"
|
|
12
|
+
- "Show me the blast radius"
|
|
13
|
+
- "Who uses this code?"
|
|
14
|
+
- Before making non-trivial code changes
|
|
15
|
+
- Before committing — to understand what your changes affect
|
|
16
|
+
|
|
17
|
+
## Workflow
|
|
18
|
+
|
|
19
|
+
```
|
|
20
|
+
1. gitnexus_impact({target: "X", direction: "upstream"}) → What depends on this
|
|
21
|
+
2. READ gitnexus://repo/{name}/processes → Check affected execution flows
|
|
22
|
+
3. gitnexus_detect_changes() → Map current git changes to affected flows
|
|
23
|
+
4. Assess risk and report to user
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
> If "Index is stale" → run `npx gitnexus analyze` in terminal.
|
|
27
|
+
|
|
28
|
+
## Checklist
|
|
29
|
+
|
|
30
|
+
```
|
|
31
|
+
- [ ] gitnexus_impact({target, direction: "upstream"}) to find dependents
|
|
32
|
+
- [ ] Review d=1 items first (these WILL BREAK)
|
|
33
|
+
- [ ] Check high-confidence (>0.8) dependencies
|
|
34
|
+
- [ ] READ processes to check affected execution flows
|
|
35
|
+
- [ ] gitnexus_detect_changes() for pre-commit check
|
|
36
|
+
- [ ] Assess risk level and report to user
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## Understanding Output
|
|
40
|
+
|
|
41
|
+
| Depth | Risk Level | Meaning |
|
|
42
|
+
| ----- | ---------------- | ------------------------ |
|
|
43
|
+
| d=1 | **WILL BREAK** | Direct callers/importers |
|
|
44
|
+
| d=2 | LIKELY AFFECTED | Indirect dependencies |
|
|
45
|
+
| d=3 | MAY NEED TESTING | Transitive effects |
|
|
46
|
+
|
|
47
|
+
## Risk Assessment
|
|
48
|
+
|
|
49
|
+
| Affected | Risk |
|
|
50
|
+
| ------------------------------ | -------- |
|
|
51
|
+
| <5 symbols, few processes | LOW |
|
|
52
|
+
| 5-15 symbols, 2-5 processes | MEDIUM |
|
|
53
|
+
| >15 symbols or many processes | HIGH |
|
|
54
|
+
| Critical path (auth, payments) | CRITICAL |
|
|
55
|
+
|
|
56
|
+
## Tools
|
|
57
|
+
|
|
58
|
+
**gitnexus_impact** — the primary tool for symbol blast radius:
|
|
59
|
+
|
|
60
|
+
```
|
|
61
|
+
gitnexus_impact({
|
|
62
|
+
target: "validateUser",
|
|
63
|
+
direction: "upstream",
|
|
64
|
+
minConfidence: 0.8,
|
|
65
|
+
maxDepth: 3
|
|
66
|
+
})
|
|
67
|
+
|
|
68
|
+
→ d=1 (WILL BREAK):
|
|
69
|
+
- loginHandler (src/auth/login.ts:42) [CALLS, 100%]
|
|
70
|
+
- apiMiddleware (src/api/middleware.ts:15) [CALLS, 100%]
|
|
71
|
+
|
|
72
|
+
→ d=2 (LIKELY AFFECTED):
|
|
73
|
+
- authRouter (src/routes/auth.ts:22) [CALLS, 95%]
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
**gitnexus_detect_changes** — git-diff based impact analysis:
|
|
77
|
+
|
|
78
|
+
```
|
|
79
|
+
gitnexus_detect_changes({scope: "staged"})
|
|
80
|
+
|
|
81
|
+
→ Changed: 5 symbols in 3 files
|
|
82
|
+
→ Affected: LoginFlow, TokenRefresh, APIMiddlewarePipeline
|
|
83
|
+
→ Risk: MEDIUM
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
## Example: "What breaks if I change validateUser?"
|
|
87
|
+
|
|
88
|
+
```
|
|
89
|
+
1. gitnexus_impact({target: "validateUser", direction: "upstream"})
|
|
90
|
+
→ d=1: loginHandler, apiMiddleware (WILL BREAK)
|
|
91
|
+
→ d=2: authRouter, sessionManager (LIKELY AFFECTED)
|
|
92
|
+
|
|
93
|
+
2. READ gitnexus://repo/my-app/processes
|
|
94
|
+
→ LoginFlow and TokenRefresh touch validateUser
|
|
95
|
+
|
|
96
|
+
3. Risk: 2 direct callers, 2 processes = MEDIUM
|
|
97
|
+
```
|