gitnexushub 0.2.10 → 0.2.12

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,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" → trigger re-indexing from the Hub dashboard.
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" → trigger re-indexing from the Hub dashboard.
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
+ ```
@@ -0,0 +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,99 +1,99 @@
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
-
16
- ## Workflow
17
-
18
- ```
19
- 1. gitnexus_impact({target: "X", direction: "upstream"}) → What depends on this
20
- 2. Review d=1 items (WILL BREAK) and affected processes
21
- 3. gitnexus_context({name: "<high-risk symbol>"}) → Understand callers/callees
22
- 4. READ gitnexus://repo/{name}/process/{name} → Trace affected execution flows
23
- 5. Assess risk and report to user
24
- ```
25
-
26
- ## Checklist
27
-
28
- ```
29
- - [ ] gitnexus_impact({target, direction: "upstream"}) to find dependents
30
- - [ ] Review d=1 items first (these WILL BREAK)
31
- - [ ] Check high-confidence (>0.8) dependencies
32
- - [ ] gitnexus_context on high-risk d=1 symbols
33
- - [ ] READ processes to check affected execution flows
34
- - [ ] Assess risk level and report to user
35
- ```
36
-
37
- ## Understanding Output
38
-
39
- | Depth | Risk Level | Meaning |
40
- | ----- | ---------------- | ------------------------ |
41
- | d=1 | **WILL BREAK** | Direct callers/importers |
42
- | d=2 | LIKELY AFFECTED | Indirect dependencies |
43
- | d=3 | MAY NEED TESTING | Transitive effects |
44
-
45
- ## Risk Assessment
46
-
47
- | Affected | Risk |
48
- | ------------------------------ | -------- |
49
- | <5 symbols, few processes | LOW |
50
- | 5-15 symbols, 2-5 processes | MEDIUM |
51
- | >15 symbols or many processes | HIGH |
52
- | Critical path (auth, payments) | CRITICAL |
53
-
54
- ## Tools
55
-
56
- **gitnexus_impact** — the primary tool for symbol blast radius:
57
-
58
- ```
59
- gitnexus_impact({
60
- target: "validateUser",
61
- direction: "upstream",
62
- minConfidence: 0.8,
63
- maxDepth: 3
64
- })
65
-
66
- → d=1 (WILL BREAK):
67
- - loginHandler (src/auth/login.ts:42) [CALLS, 100%]
68
- - apiMiddleware (src/api/middleware.ts:15) [CALLS, 100%]
69
-
70
- → d=2 (LIKELY AFFECTED):
71
- - authRouter (src/routes/auth.ts:22) [CALLS, 95%]
72
- ```
73
-
74
- **gitnexus_context** — understand high-risk dependents:
75
-
76
- ```
77
- gitnexus_context({name: "loginHandler"})
78
- → Incoming calls: authRouter, oauthCallback
79
- → Outgoing calls: validateUser, createSession
80
- → Processes: LoginFlow (step 2/5)
81
- ```
82
-
83
- ## Example: "What breaks if I change validateUser?"
84
-
85
- ```
86
- 1. gitnexus_impact({target: "validateUser", direction: "upstream"})
87
- → d=1: loginHandler, apiMiddleware (WILL BREAK)
88
- → d=2: authRouter, sessionManager (LIKELY AFFECTED)
89
- → Affected processes: LoginFlow, TokenRefresh
90
- → Risk: MEDIUM
91
-
92
- 2. gitnexus_context({name: "loginHandler"})
93
- → Understand how loginHandler uses validateUser
94
-
95
- 3. READ gitnexus://repo/my-app/process/LoginFlow
96
- → Full execution trace to see where validateUser fits
97
-
98
- 4. Risk: 2 direct callers, 2 processes = MEDIUM
99
- ```
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
+
16
+ ## Workflow
17
+
18
+ ```
19
+ 1. gitnexus_impact({target: "X", direction: "upstream"}) → What depends on this
20
+ 2. Review d=1 items (WILL BREAK) and affected processes
21
+ 3. gitnexus_context({name: "<high-risk symbol>"}) → Understand callers/callees
22
+ 4. READ gitnexus://repo/{name}/process/{name} → Trace affected execution flows
23
+ 5. Assess risk and report to user
24
+ ```
25
+
26
+ ## Checklist
27
+
28
+ ```
29
+ - [ ] gitnexus_impact({target, direction: "upstream"}) to find dependents
30
+ - [ ] Review d=1 items first (these WILL BREAK)
31
+ - [ ] Check high-confidence (>0.8) dependencies
32
+ - [ ] gitnexus_context on high-risk d=1 symbols
33
+ - [ ] READ processes to check affected execution flows
34
+ - [ ] Assess risk level and report to user
35
+ ```
36
+
37
+ ## Understanding Output
38
+
39
+ | Depth | Risk Level | Meaning |
40
+ | ----- | ---------------- | ------------------------ |
41
+ | d=1 | **WILL BREAK** | Direct callers/importers |
42
+ | d=2 | LIKELY AFFECTED | Indirect dependencies |
43
+ | d=3 | MAY NEED TESTING | Transitive effects |
44
+
45
+ ## Risk Assessment
46
+
47
+ | Affected | Risk |
48
+ | ------------------------------ | -------- |
49
+ | <5 symbols, few processes | LOW |
50
+ | 5-15 symbols, 2-5 processes | MEDIUM |
51
+ | >15 symbols or many processes | HIGH |
52
+ | Critical path (auth, payments) | CRITICAL |
53
+
54
+ ## Tools
55
+
56
+ **gitnexus_impact** — the primary tool for symbol blast radius:
57
+
58
+ ```
59
+ gitnexus_impact({
60
+ target: "validateUser",
61
+ direction: "upstream",
62
+ minConfidence: 0.8,
63
+ maxDepth: 3
64
+ })
65
+
66
+ → d=1 (WILL BREAK):
67
+ - loginHandler (src/auth/login.ts:42) [CALLS, 100%]
68
+ - apiMiddleware (src/api/middleware.ts:15) [CALLS, 100%]
69
+
70
+ → d=2 (LIKELY AFFECTED):
71
+ - authRouter (src/routes/auth.ts:22) [CALLS, 95%]
72
+ ```
73
+
74
+ **gitnexus_context** — understand high-risk dependents:
75
+
76
+ ```
77
+ gitnexus_context({name: "loginHandler"})
78
+ → Incoming calls: authRouter, oauthCallback
79
+ → Outgoing calls: validateUser, createSession
80
+ → Processes: LoginFlow (step 2/5)
81
+ ```
82
+
83
+ ## Example: "What breaks if I change validateUser?"
84
+
85
+ ```
86
+ 1. gitnexus_impact({target: "validateUser", direction: "upstream"})
87
+ → d=1: loginHandler, apiMiddleware (WILL BREAK)
88
+ → d=2: authRouter, sessionManager (LIKELY AFFECTED)
89
+ → Affected processes: LoginFlow, TokenRefresh
90
+ → Risk: MEDIUM
91
+
92
+ 2. gitnexus_context({name: "loginHandler"})
93
+ → Understand how loginHandler uses validateUser
94
+
95
+ 3. READ gitnexus://repo/my-app/process/LoginFlow
96
+ → Full execution trace to see where validateUser fits
97
+
98
+ 4. Risk: 2 direct callers, 2 processes = MEDIUM
99
+ ```