gitnexus 1.1.0 → 1.1.2

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.
@@ -1,106 +1,106 @@
1
- ---
2
- name: gitnexus-debugging
3
- description: Trace bugs through call chains using knowledge graph
4
- ---
5
-
6
- # Debugging with GitNexus
7
-
8
- ## Quick Start
9
- ```
10
- 0. READ gitnexus://repos → Discover indexed repos
11
- 1. If "Index is stale" → gitnexus_analyze({repo: "my-app"})
12
- 2. gitnexus_search({query: "...", repo: "my-app"}) → Find code related to error
13
- 3. gitnexus_explore({name, type: "symbol", repo: "my-app"}) → Get callers and callees
14
- 4. READ gitnexus://repo/my-app/process/{name} → Trace execution flow
15
- ```
16
-
17
- ## When to Use
18
- - "Why is this function failing?"
19
- - "Trace where this error comes from"
20
- - "Who calls this method?"
21
- - "Debug the payment issue"
22
-
23
- ## Workflow Checklist
24
- ```
25
- Bug Investigation:
26
- - [ ] READ gitnexus://repos to find the right repo
27
- - [ ] Understand the symptom (error message, behavior)
28
- - [ ] gitnexus_search to find related code
29
- - [ ] Identify the suspect function
30
- - [ ] gitnexus_explore to see callers/callees
31
- - [ ] READ gitnexus://repo/{name}/process/{name} if suspect is in a process
32
- - [ ] READ gitnexus://repo/{name}/schema for Cypher query help
33
- - [ ] gitnexus_cypher for custom traces
34
- ```
35
-
36
- ## Resource Reference
37
-
38
- ### gitnexus://repo/{name}/schema
39
- Graph schema for writing Cypher queries:
40
- ```yaml
41
- nodes: [Function, Class, Method, File, Community, Process]
42
- relationships: [CALLS, IMPORTS, EXTENDS, IMPLEMENTS, MEMBER_OF, STEP_IN_PROCESS]
43
- example_queries:
44
- find_callers: |
45
- MATCH (caller)-[:CodeRelation {type: 'CALLS'}]->(f:Function {name: "X"})
46
- RETURN caller.name
47
- ```
48
-
49
- ### gitnexus://repo/{name}/process/{processName}
50
- Trace execution flow to find where bug might occur:
51
- ```yaml
52
- name: CheckoutFlow
53
- trace:
54
- 1: handleCheckout
55
- 2: validateCart
56
- 3: processPayment ← bug here?
57
- 4: sendConfirmation
58
- ```
59
-
60
- ## Tool Reference
61
-
62
- ### gitnexus_search
63
- Find code related to error or symptom:
64
- ```
65
- gitnexus_search({query: "payment validation error", depth: "full", repo: "my-app"})
66
- ```
67
-
68
- ### gitnexus_explore
69
- Get symbol context:
70
- ```
71
- gitnexus_explore({name: "validatePayment", type: "symbol", repo: "my-app"})
72
- → Callers: processCheckout, webhookHandler
73
- → Callees: verifyCard, fetchRates
74
- ```
75
-
76
- ### gitnexus_cypher
77
- Custom graph queries for tracing:
78
- ```cypher
79
- // Trace call chain (2 hops)
80
- MATCH path = (a)-[:CodeRelation {type: 'CALLS'}*1..2]->(b:Function {name: "validatePayment"})
81
- RETURN [n IN nodes(path) | n.name] AS chain
82
- ```
83
-
84
- ## Example: "Payment endpoint returns 500 intermittently"
85
-
86
- ```
87
- 1. gitnexus_search({query: "payment error handling", repo: "my-app"})
88
- → validatePayment, handlePaymentError, PaymentException
89
-
90
- 2. gitnexus_explore({name: "validatePayment", type: "symbol", repo: "my-app"})
91
- → Callees: verifyCard, fetchRates (external API!)
92
-
93
- 3. READ gitnexus://repo/my-app/process/CheckoutFlow
94
- → Step 3: validatePayment → calls external API
95
-
96
- 4. Root cause: fetchRates calls external API without proper timeout
97
- ```
98
-
99
- ## Debugging Patterns
100
-
101
- | Symptom | Approach |
102
- |---------|----------|
103
- | Error message | Search for error text, trace throw sites |
104
- | Wrong return value | Trace data flow through callees |
105
- | Intermittent failure | Look for external calls, timeouts |
106
- | Performance issue | Find hot paths via callers count |
1
+ ---
2
+ name: gitnexus-debugging
3
+ description: Trace bugs through call chains using knowledge graph
4
+ ---
5
+
6
+ # Debugging with GitNexus
7
+
8
+ ## Quick Start
9
+ ```
10
+ 0. READ gitnexus://repos → Discover indexed repos
11
+ 1. If "Index is stale" → gitnexus_analyze({repo: "my-app"})
12
+ 2. gitnexus_search({query: "...", repo: "my-app"}) → Find code related to error
13
+ 3. gitnexus_explore({name, type: "symbol", repo: "my-app"}) → Get callers and callees
14
+ 4. READ gitnexus://repo/my-app/process/{name} → Trace execution flow
15
+ ```
16
+
17
+ ## When to Use
18
+ - "Why is this function failing?"
19
+ - "Trace where this error comes from"
20
+ - "Who calls this method?"
21
+ - "Debug the payment issue"
22
+
23
+ ## Workflow Checklist
24
+ ```
25
+ Bug Investigation:
26
+ - [ ] READ gitnexus://repos to find the right repo
27
+ - [ ] Understand the symptom (error message, behavior)
28
+ - [ ] gitnexus_search to find related code
29
+ - [ ] Identify the suspect function
30
+ - [ ] gitnexus_explore to see callers/callees
31
+ - [ ] READ gitnexus://repo/{name}/process/{name} if suspect is in a process
32
+ - [ ] READ gitnexus://repo/{name}/schema for Cypher query help
33
+ - [ ] gitnexus_cypher for custom traces
34
+ ```
35
+
36
+ ## Resource Reference
37
+
38
+ ### gitnexus://repo/{name}/schema
39
+ Graph schema for writing Cypher queries:
40
+ ```yaml
41
+ nodes: [Function, Class, Method, File, Community, Process]
42
+ relationships: [CALLS, IMPORTS, EXTENDS, IMPLEMENTS, MEMBER_OF, STEP_IN_PROCESS]
43
+ example_queries:
44
+ find_callers: |
45
+ MATCH (caller)-[:CodeRelation {type: 'CALLS'}]->(f:Function {name: "X"})
46
+ RETURN caller.name
47
+ ```
48
+
49
+ ### gitnexus://repo/{name}/process/{processName}
50
+ Trace execution flow to find where bug might occur:
51
+ ```yaml
52
+ name: CheckoutFlow
53
+ trace:
54
+ 1: handleCheckout
55
+ 2: validateCart
56
+ 3: processPayment ← bug here?
57
+ 4: sendConfirmation
58
+ ```
59
+
60
+ ## Tool Reference
61
+
62
+ ### gitnexus_search
63
+ Find code related to error or symptom:
64
+ ```
65
+ gitnexus_search({query: "payment validation error", depth: "full", repo: "my-app"})
66
+ ```
67
+
68
+ ### gitnexus_explore
69
+ Get symbol context:
70
+ ```
71
+ gitnexus_explore({name: "validatePayment", type: "symbol", repo: "my-app"})
72
+ → Callers: processCheckout, webhookHandler
73
+ → Callees: verifyCard, fetchRates
74
+ ```
75
+
76
+ ### gitnexus_cypher
77
+ Custom graph queries for tracing:
78
+ ```cypher
79
+ // Trace call chain (2 hops)
80
+ MATCH path = (a)-[:CodeRelation {type: 'CALLS'}*1..2]->(b:Function {name: "validatePayment"})
81
+ RETURN [n IN nodes(path) | n.name] AS chain
82
+ ```
83
+
84
+ ## Example: "Payment endpoint returns 500 intermittently"
85
+
86
+ ```
87
+ 1. gitnexus_search({query: "payment error handling", repo: "my-app"})
88
+ → validatePayment, handlePaymentError, PaymentException
89
+
90
+ 2. gitnexus_explore({name: "validatePayment", type: "symbol", repo: "my-app"})
91
+ → Callees: verifyCard, fetchRates (external API!)
92
+
93
+ 3. READ gitnexus://repo/my-app/process/CheckoutFlow
94
+ → Step 3: validatePayment → calls external API
95
+
96
+ 4. Root cause: fetchRates calls external API without proper timeout
97
+ ```
98
+
99
+ ## Debugging Patterns
100
+
101
+ | Symptom | Approach |
102
+ |---------|----------|
103
+ | Error message | Search for error text, trace throw sites |
104
+ | Wrong return value | Trace data flow through callees |
105
+ | Intermittent failure | Look for external calls, timeouts |
106
+ | Performance issue | Find hot paths via callers count |
@@ -1,126 +1,126 @@
1
- ---
2
- name: gitnexus-exploring
3
- description: Navigate unfamiliar code using GitNexus knowledge graph
4
- ---
5
-
6
- # Exploring Codebases
7
-
8
- ## Quick Start
9
- ```
10
- 0. READ gitnexus://repos → Discover indexed repos (use repo param if multiple)
11
- 1. If "Index is stale" → gitnexus_analyze({repo: "my-app"})
12
- 2. READ gitnexus://repo/{name}/context → Get codebase overview (~150 tokens)
13
- 3. READ gitnexus://repo/{name}/clusters → See all functional clusters
14
- 4. READ gitnexus://repo/{name}/cluster/{name} → Deep dive on specific cluster
15
- ```
16
-
17
- ## When to Use
18
- - "How does authentication work?"
19
- - "What's the project structure?"
20
- - "Show me the main components"
21
- - "Where is the database logic?"
22
-
23
- ## Workflow Checklist
24
- ```
25
- Exploration Progress:
26
- - [ ] READ gitnexus://repos to discover available repos
27
- - [ ] READ gitnexus://repo/{name}/context for codebase overview
28
- - [ ] READ gitnexus://repo/{name}/clusters to list all clusters
29
- - [ ] Identify the relevant cluster by name
30
- - [ ] READ gitnexus://repo/{name}/cluster/{name} for cluster details
31
- - [ ] Use gitnexus_explore for specific symbols
32
- ```
33
-
34
- ## Resource Reference
35
-
36
- ### gitnexus://repos
37
- Discover all indexed repositories. **Read first.**
38
- ```yaml
39
- repos:
40
- - name: "my-app"
41
- path: "/home/user/my-app"
42
- files: 42
43
- symbols: 918
44
- ```
45
-
46
- ### gitnexus://repo/{name}/context
47
- Codebase overview for a specific repo.
48
- ```yaml
49
- project: my-app
50
- stats:
51
- files: 42
52
- symbols: 918
53
- clusters: 12
54
- processes: 45
55
- tools_available: [list_repos, search, explore, impact, overview, cypher]
56
- ```
57
-
58
- ### gitnexus://repo/{name}/clusters
59
- All functional clusters with cohesion scores.
60
- ```yaml
61
- clusters:
62
- - name: "Auth"
63
- symbols: 47
64
- cohesion: 92%
65
- - name: "Database"
66
- symbols: 32
67
- cohesion: 88%
68
- ```
69
-
70
- ### gitnexus://repo/{name}/cluster/{clusterName}
71
- Members of a specific cluster.
72
- ```yaml
73
- name: Auth
74
- symbols: 47
75
- cohesion: 92%
76
- members:
77
- - name: validateUser
78
- type: Function
79
- file: src/auth/validator.ts
80
- ```
81
-
82
- ### gitnexus://repo/{name}/process/{processName}
83
- Full execution trace.
84
- ```yaml
85
- name: LoginFlow
86
- type: cross_community
87
- steps:
88
- 1: handleLogin (src/auth/handler.ts)
89
- 2: validateUser (src/auth/validator.ts)
90
- 3: createSession (src/auth/session.ts)
91
- ```
92
-
93
- ## Tool Reference (When Resources Aren't Enough)
94
-
95
- ### gitnexus_explore
96
- For detailed symbol context with callers/callees:
97
- ```
98
- gitnexus_explore({name: "validateUser", type: "symbol", repo: "my-app"})
99
- → Callers: loginHandler, apiMiddleware
100
- → Callees: checkToken, getUserById
101
- ```
102
-
103
- ### gitnexus_search
104
- For finding code by query:
105
- ```
106
- gitnexus_search({query: "payment validation", depth: "full", repo: "my-app"})
107
- ```
108
-
109
- ## Example: "How does payment processing work?"
110
-
111
- ```
112
- 1. READ gitnexus://repos
113
- → Repos: my-app (918 symbols)
114
-
115
- 2. READ gitnexus://repo/my-app/context
116
- → 918 symbols, 12 clusters
117
-
118
- 3. READ gitnexus://repo/my-app/clusters
119
- → Clusters: Auth, Payment, Database, API...
120
-
121
- 4. READ gitnexus://repo/my-app/cluster/Payment
122
- → Members: processPayment, validateCard, PaymentService
123
-
124
- 5. READ gitnexus://repo/my-app/process/CheckoutFlow
125
- → handleCheckout → validateCart → processPayment → sendConfirmation
126
- ```
1
+ ---
2
+ name: gitnexus-exploring
3
+ description: Navigate unfamiliar code using GitNexus knowledge graph
4
+ ---
5
+
6
+ # Exploring Codebases
7
+
8
+ ## Quick Start
9
+ ```
10
+ 0. READ gitnexus://repos → Discover indexed repos (use repo param if multiple)
11
+ 1. If "Index is stale" → gitnexus_analyze({repo: "my-app"})
12
+ 2. READ gitnexus://repo/{name}/context → Get codebase overview (~150 tokens)
13
+ 3. READ gitnexus://repo/{name}/clusters → See all functional clusters
14
+ 4. READ gitnexus://repo/{name}/cluster/{name} → Deep dive on specific cluster
15
+ ```
16
+
17
+ ## When to Use
18
+ - "How does authentication work?"
19
+ - "What's the project structure?"
20
+ - "Show me the main components"
21
+ - "Where is the database logic?"
22
+
23
+ ## Workflow Checklist
24
+ ```
25
+ Exploration Progress:
26
+ - [ ] READ gitnexus://repos to discover available repos
27
+ - [ ] READ gitnexus://repo/{name}/context for codebase overview
28
+ - [ ] READ gitnexus://repo/{name}/clusters to list all clusters
29
+ - [ ] Identify the relevant cluster by name
30
+ - [ ] READ gitnexus://repo/{name}/cluster/{name} for cluster details
31
+ - [ ] Use gitnexus_explore for specific symbols
32
+ ```
33
+
34
+ ## Resource Reference
35
+
36
+ ### gitnexus://repos
37
+ Discover all indexed repositories. **Read first.**
38
+ ```yaml
39
+ repos:
40
+ - name: "my-app"
41
+ path: "/home/user/my-app"
42
+ files: 42
43
+ symbols: 918
44
+ ```
45
+
46
+ ### gitnexus://repo/{name}/context
47
+ Codebase overview for a specific repo.
48
+ ```yaml
49
+ project: my-app
50
+ stats:
51
+ files: 42
52
+ symbols: 918
53
+ clusters: 12
54
+ processes: 45
55
+ tools_available: [list_repos, search, explore, impact, overview, cypher]
56
+ ```
57
+
58
+ ### gitnexus://repo/{name}/clusters
59
+ All functional clusters with cohesion scores.
60
+ ```yaml
61
+ clusters:
62
+ - name: "Auth"
63
+ symbols: 47
64
+ cohesion: 92%
65
+ - name: "Database"
66
+ symbols: 32
67
+ cohesion: 88%
68
+ ```
69
+
70
+ ### gitnexus://repo/{name}/cluster/{clusterName}
71
+ Members of a specific cluster.
72
+ ```yaml
73
+ name: Auth
74
+ symbols: 47
75
+ cohesion: 92%
76
+ members:
77
+ - name: validateUser
78
+ type: Function
79
+ file: src/auth/validator.ts
80
+ ```
81
+
82
+ ### gitnexus://repo/{name}/process/{processName}
83
+ Full execution trace.
84
+ ```yaml
85
+ name: LoginFlow
86
+ type: cross_community
87
+ steps:
88
+ 1: handleLogin (src/auth/handler.ts)
89
+ 2: validateUser (src/auth/validator.ts)
90
+ 3: createSession (src/auth/session.ts)
91
+ ```
92
+
93
+ ## Tool Reference (When Resources Aren't Enough)
94
+
95
+ ### gitnexus_explore
96
+ For detailed symbol context with callers/callees:
97
+ ```
98
+ gitnexus_explore({name: "validateUser", type: "symbol", repo: "my-app"})
99
+ → Callers: loginHandler, apiMiddleware
100
+ → Callees: checkToken, getUserById
101
+ ```
102
+
103
+ ### gitnexus_search
104
+ For finding code by query:
105
+ ```
106
+ gitnexus_search({query: "payment validation", depth: "full", repo: "my-app"})
107
+ ```
108
+
109
+ ## Example: "How does payment processing work?"
110
+
111
+ ```
112
+ 1. READ gitnexus://repos
113
+ → Repos: my-app (918 symbols)
114
+
115
+ 2. READ gitnexus://repo/my-app/context
116
+ → 918 symbols, 12 clusters
117
+
118
+ 3. READ gitnexus://repo/my-app/clusters
119
+ → Clusters: Auth, Payment, Database, API...
120
+
121
+ 4. READ gitnexus://repo/my-app/cluster/Payment
122
+ → Members: processPayment, validateCard, PaymentService
123
+
124
+ 5. READ gitnexus://repo/my-app/process/CheckoutFlow
125
+ → handleCheckout → validateCart → processPayment → sendConfirmation
126
+ ```