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.
- package/README.md +196 -198
- package/dist/cli/ai-context.js +89 -89
- package/dist/cli/index.js +1 -1
- package/dist/cli/setup.js +1 -1
- package/dist/core/ingestion/pipeline.js +4 -1
- package/dist/core/ingestion/process-processor.js +27 -3
- package/dist/core/search/bm25-index.js +5 -5
- package/dist/mcp/local/local-backend.d.ts +6 -24
- package/dist/mcp/local/local-backend.js +135 -124
- package/dist/mcp/resources.d.ts +1 -2
- package/dist/mcp/resources.js +61 -85
- package/dist/mcp/tools.js +82 -82
- package/package.json +80 -80
- package/skills/debugging.md +106 -106
- package/skills/exploring.md +126 -126
- package/skills/impact-analysis.md +117 -117
- package/skills/refactoring.md +120 -120
package/dist/mcp/resources.js
CHANGED
|
@@ -2,8 +2,7 @@
|
|
|
2
2
|
* MCP Resources (Multi-Repo)
|
|
3
3
|
*
|
|
4
4
|
* Provides structured on-demand data to AI agents.
|
|
5
|
-
*
|
|
6
|
-
* and backwards-compatible global URIs (gitnexus://context).
|
|
5
|
+
* All resources use repo-scoped URIs: gitnexus://repo/{name}/context
|
|
7
6
|
*/
|
|
8
7
|
import { checkStaleness } from './staleness.js';
|
|
9
8
|
/**
|
|
@@ -24,7 +23,7 @@ export function getResourceDefinitions(backend) {
|
|
|
24
23
|
resources.push({
|
|
25
24
|
uri: `gitnexus://repo/${repo.name}/context`,
|
|
26
25
|
name: `${repo.name} Overview`,
|
|
27
|
-
description: `Codebase stats
|
|
26
|
+
description: `Codebase stats and available tools for ${repo.name}`,
|
|
28
27
|
mimeType: 'text/yaml',
|
|
29
28
|
});
|
|
30
29
|
resources.push({
|
|
@@ -46,10 +45,6 @@ export function getResourceDefinitions(backend) {
|
|
|
46
45
|
mimeType: 'text/yaml',
|
|
47
46
|
});
|
|
48
47
|
}
|
|
49
|
-
// Backwards compat: if only 1 repo, also expose global URIs
|
|
50
|
-
if (repos.length === 1) {
|
|
51
|
-
resources.push({ uri: 'gitnexus://context', name: `${repos[0].name} Overview`, description: 'Codebase stats, hotspots, and available tools', mimeType: 'text/yaml' }, { uri: 'gitnexus://clusters', name: 'All Clusters', description: 'List of all functional clusters with stats', mimeType: 'text/yaml' }, { uri: 'gitnexus://processes', name: 'All Processes', description: 'List of all execution flows with types', mimeType: 'text/yaml' }, { uri: 'gitnexus://schema', name: 'Graph Schema', description: 'Node types and relationships for Cypher queries', mimeType: 'text/yaml' });
|
|
52
|
-
}
|
|
53
48
|
return resources;
|
|
54
49
|
}
|
|
55
50
|
/**
|
|
@@ -69,57 +64,27 @@ export function getResourceTemplates() {
|
|
|
69
64
|
description: 'Step-by-step execution trace',
|
|
70
65
|
mimeType: 'text/yaml',
|
|
71
66
|
},
|
|
72
|
-
// Backwards-compatible templates (for single-repo setups)
|
|
73
|
-
{
|
|
74
|
-
uriTemplate: 'gitnexus://cluster/{name}',
|
|
75
|
-
name: 'Cluster Detail',
|
|
76
|
-
description: 'Deep dive into a specific cluster (single-repo shorthand)',
|
|
77
|
-
mimeType: 'text/yaml',
|
|
78
|
-
},
|
|
79
|
-
{
|
|
80
|
-
uriTemplate: 'gitnexus://process/{name}',
|
|
81
|
-
name: 'Process Trace',
|
|
82
|
-
description: 'Step-by-step execution trace (single-repo shorthand)',
|
|
83
|
-
mimeType: 'text/yaml',
|
|
84
|
-
},
|
|
85
67
|
];
|
|
86
68
|
}
|
|
87
69
|
/**
|
|
88
|
-
* Parse a resource URI to extract the repo name
|
|
70
|
+
* Parse a resource URI to extract the repo name and resource type.
|
|
89
71
|
*/
|
|
90
72
|
function parseUri(uri) {
|
|
73
|
+
if (uri === 'gitnexus://repos')
|
|
74
|
+
return { resourceType: 'repos' };
|
|
91
75
|
// Repo-scoped: gitnexus://repo/{name}/context
|
|
92
76
|
const repoMatch = uri.match(/^gitnexus:\/\/repo\/([^/]+)\/(.+)$/);
|
|
93
77
|
if (repoMatch) {
|
|
94
78
|
const repoName = decodeURIComponent(repoMatch[1]);
|
|
95
79
|
const rest = repoMatch[2];
|
|
96
|
-
// gitnexus://repo/{name}/cluster/{clusterName}
|
|
97
80
|
if (rest.startsWith('cluster/')) {
|
|
98
81
|
return { repoName, resourceType: 'cluster', param: decodeURIComponent(rest.replace('cluster/', '')) };
|
|
99
82
|
}
|
|
100
|
-
// gitnexus://repo/{name}/process/{processName}
|
|
101
83
|
if (rest.startsWith('process/')) {
|
|
102
84
|
return { repoName, resourceType: 'process', param: decodeURIComponent(rest.replace('process/', '')) };
|
|
103
85
|
}
|
|
104
86
|
return { repoName, resourceType: rest };
|
|
105
87
|
}
|
|
106
|
-
// Global (backwards compat): gitnexus://context, gitnexus://cluster/{name}
|
|
107
|
-
if (uri === 'gitnexus://repos')
|
|
108
|
-
return { resourceType: 'repos' };
|
|
109
|
-
if (uri === 'gitnexus://context')
|
|
110
|
-
return { resourceType: 'context' };
|
|
111
|
-
if (uri === 'gitnexus://clusters')
|
|
112
|
-
return { resourceType: 'clusters' };
|
|
113
|
-
if (uri === 'gitnexus://processes')
|
|
114
|
-
return { resourceType: 'processes' };
|
|
115
|
-
if (uri === 'gitnexus://schema')
|
|
116
|
-
return { resourceType: 'schema' };
|
|
117
|
-
if (uri.startsWith('gitnexus://cluster/')) {
|
|
118
|
-
return { resourceType: 'cluster', param: decodeURIComponent(uri.replace('gitnexus://cluster/', '')) };
|
|
119
|
-
}
|
|
120
|
-
if (uri.startsWith('gitnexus://process/')) {
|
|
121
|
-
return { resourceType: 'process', param: decodeURIComponent(uri.replace('gitnexus://process/', '')) };
|
|
122
|
-
}
|
|
123
88
|
throw new Error(`Unknown resource URI: ${uri}`);
|
|
124
89
|
}
|
|
125
90
|
/**
|
|
@@ -131,13 +96,7 @@ export async function readResource(uri, backend) {
|
|
|
131
96
|
if (parsed.resourceType === 'repos') {
|
|
132
97
|
return getReposResource(backend);
|
|
133
98
|
}
|
|
134
|
-
|
|
135
|
-
let repoName;
|
|
136
|
-
if (parsed.repoName) {
|
|
137
|
-
repoName = parsed.repoName;
|
|
138
|
-
}
|
|
139
|
-
// For backwards-compat URIs without repo name, resolveRepo() will auto-detect (single-repo)
|
|
140
|
-
// The backend.callTool already does resolveRepo internally, so we pass repoName as `repo` param.
|
|
99
|
+
const repoName = parsed.repoName;
|
|
141
100
|
switch (parsed.resourceType) {
|
|
142
101
|
case 'context':
|
|
143
102
|
return getContextResource(backend, repoName);
|
|
@@ -235,18 +194,27 @@ async function getContextResource(backend, repoName) {
|
|
|
235
194
|
*/
|
|
236
195
|
async function getClustersResource(backend, repoName) {
|
|
237
196
|
try {
|
|
238
|
-
|
|
197
|
+
// Request more than we display so aggregation has enough raw data
|
|
198
|
+
const result = await backend.callTool('overview', { showClusters: true, showProcesses: false, limit: 100, repo: repoName });
|
|
239
199
|
if (!result.clusters || result.clusters.length === 0) {
|
|
240
200
|
return 'clusters: []\n# No clusters detected. Run: gitnexus analyze';
|
|
241
201
|
}
|
|
202
|
+
const displayLimit = 20;
|
|
242
203
|
const lines = ['clusters:'];
|
|
243
|
-
|
|
204
|
+
const toShow = result.clusters.slice(0, displayLimit);
|
|
205
|
+
for (const cluster of toShow) {
|
|
244
206
|
const label = cluster.heuristicLabel || cluster.label || cluster.id;
|
|
245
207
|
lines.push(` - name: "${label}"`);
|
|
246
208
|
lines.push(` symbols: ${cluster.symbolCount || 0}`);
|
|
247
209
|
if (cluster.cohesion) {
|
|
248
210
|
lines.push(` cohesion: ${(cluster.cohesion * 100).toFixed(0)}%`);
|
|
249
211
|
}
|
|
212
|
+
if (cluster.subCommunities && cluster.subCommunities > 1) {
|
|
213
|
+
lines.push(` sub_clusters: ${cluster.subCommunities}`);
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
if (result.clusters.length > displayLimit) {
|
|
217
|
+
lines.push(`\n# Showing top ${displayLimit} of ${result.clusters.length} clusters. Use gitnexus_search or gitnexus_explore for more.`);
|
|
250
218
|
}
|
|
251
219
|
return lines.join('\n');
|
|
252
220
|
}
|
|
@@ -263,13 +231,18 @@ async function getProcessesResource(backend, repoName) {
|
|
|
263
231
|
if (!result.processes || result.processes.length === 0) {
|
|
264
232
|
return 'processes: []\n# No processes detected. Run: gitnexus analyze';
|
|
265
233
|
}
|
|
234
|
+
const displayLimit = 20;
|
|
266
235
|
const lines = ['processes:'];
|
|
267
|
-
|
|
236
|
+
const toShow = result.processes.slice(0, displayLimit);
|
|
237
|
+
for (const proc of toShow) {
|
|
268
238
|
const label = proc.heuristicLabel || proc.label || proc.id;
|
|
269
239
|
lines.push(` - name: "${label}"`);
|
|
270
240
|
lines.push(` type: ${proc.processType || 'unknown'}`);
|
|
271
241
|
lines.push(` steps: ${proc.stepCount || 0}`);
|
|
272
242
|
}
|
|
243
|
+
if (result.processes.length > displayLimit) {
|
|
244
|
+
lines.push(`\n# Showing top ${displayLimit} of ${result.processes.length} processes. Use gitnexus_explore for more.`);
|
|
245
|
+
}
|
|
273
246
|
return lines.join('\n');
|
|
274
247
|
}
|
|
275
248
|
catch (err) {
|
|
@@ -280,41 +253,41 @@ async function getProcessesResource(backend, repoName) {
|
|
|
280
253
|
* Schema resource — graph structure for Cypher queries
|
|
281
254
|
*/
|
|
282
255
|
function getSchemaResource() {
|
|
283
|
-
return `# GitNexus Graph Schema
|
|
284
|
-
|
|
285
|
-
nodes:
|
|
286
|
-
- File: Source code files
|
|
287
|
-
- Function: Functions and arrow functions
|
|
288
|
-
- Class: Class definitions
|
|
289
|
-
- Interface: Interface/type definitions
|
|
290
|
-
- Method: Class methods
|
|
291
|
-
- Community: Functional cluster (Leiden algorithm)
|
|
292
|
-
- Process: Execution flow trace
|
|
293
|
-
|
|
294
|
-
relationships:
|
|
295
|
-
- CALLS: Function/method invocation
|
|
296
|
-
- IMPORTS: Module imports
|
|
297
|
-
- EXTENDS: Class inheritance
|
|
298
|
-
- IMPLEMENTS: Interface implementation
|
|
299
|
-
- DEFINES: File defines symbol
|
|
300
|
-
- MEMBER_OF: Symbol belongs to community
|
|
301
|
-
- STEP_IN_PROCESS: Symbol is step N in process
|
|
302
|
-
|
|
303
|
-
example_queries:
|
|
304
|
-
find_callers: |
|
|
305
|
-
MATCH (caller)-[:CodeRelation {type: 'CALLS'}]->(f:Function {name: "myFunc"})
|
|
306
|
-
RETURN caller.name, caller.filePath
|
|
307
|
-
|
|
308
|
-
find_community_members: |
|
|
309
|
-
MATCH (s)-[:CodeRelation {type: 'MEMBER_OF'}]->(c:Community)
|
|
310
|
-
WHERE c.heuristicLabel = "Auth"
|
|
311
|
-
RETURN s.name, labels(s)[0] AS type
|
|
312
|
-
|
|
313
|
-
trace_process: |
|
|
314
|
-
MATCH (s)-[r:CodeRelation {type: 'STEP_IN_PROCESS'}]->(p:Process)
|
|
315
|
-
WHERE p.heuristicLabel = "LoginFlow"
|
|
316
|
-
RETURN s.name, r.step
|
|
317
|
-
ORDER BY r.step
|
|
256
|
+
return `# GitNexus Graph Schema
|
|
257
|
+
|
|
258
|
+
nodes:
|
|
259
|
+
- File: Source code files
|
|
260
|
+
- Function: Functions and arrow functions
|
|
261
|
+
- Class: Class definitions
|
|
262
|
+
- Interface: Interface/type definitions
|
|
263
|
+
- Method: Class methods
|
|
264
|
+
- Community: Functional cluster (Leiden algorithm)
|
|
265
|
+
- Process: Execution flow trace
|
|
266
|
+
|
|
267
|
+
relationships:
|
|
268
|
+
- CALLS: Function/method invocation
|
|
269
|
+
- IMPORTS: Module imports
|
|
270
|
+
- EXTENDS: Class inheritance
|
|
271
|
+
- IMPLEMENTS: Interface implementation
|
|
272
|
+
- DEFINES: File defines symbol
|
|
273
|
+
- MEMBER_OF: Symbol belongs to community
|
|
274
|
+
- STEP_IN_PROCESS: Symbol is step N in process
|
|
275
|
+
|
|
276
|
+
example_queries:
|
|
277
|
+
find_callers: |
|
|
278
|
+
MATCH (caller)-[:CodeRelation {type: 'CALLS'}]->(f:Function {name: "myFunc"})
|
|
279
|
+
RETURN caller.name, caller.filePath
|
|
280
|
+
|
|
281
|
+
find_community_members: |
|
|
282
|
+
MATCH (s)-[:CodeRelation {type: 'MEMBER_OF'}]->(c:Community)
|
|
283
|
+
WHERE c.heuristicLabel = "Auth"
|
|
284
|
+
RETURN s.name, labels(s)[0] AS type
|
|
285
|
+
|
|
286
|
+
trace_process: |
|
|
287
|
+
MATCH (s)-[r:CodeRelation {type: 'STEP_IN_PROCESS'}]->(p:Process)
|
|
288
|
+
WHERE p.heuristicLabel = "LoginFlow"
|
|
289
|
+
RETURN s.name, r.step
|
|
290
|
+
ORDER BY r.step
|
|
318
291
|
`;
|
|
319
292
|
}
|
|
320
293
|
/**
|
|
@@ -335,6 +308,9 @@ async function getClusterDetailResource(name, backend, repoName) {
|
|
|
335
308
|
if (cluster.cohesion) {
|
|
336
309
|
lines.push(`cohesion: ${(cluster.cohesion * 100).toFixed(0)}%`);
|
|
337
310
|
}
|
|
311
|
+
if (cluster.subCommunities && cluster.subCommunities > 1) {
|
|
312
|
+
lines.push(`sub_clusters: ${cluster.subCommunities}`);
|
|
313
|
+
}
|
|
338
314
|
if (members.length > 0) {
|
|
339
315
|
lines.push('');
|
|
340
316
|
lines.push('members:');
|
package/dist/mcp/tools.js
CHANGED
|
@@ -7,12 +7,12 @@
|
|
|
7
7
|
export const GITNEXUS_TOOLS = [
|
|
8
8
|
{
|
|
9
9
|
name: 'list_repos',
|
|
10
|
-
description: `List all indexed repositories available to GitNexus.
|
|
11
|
-
|
|
12
|
-
Returns each repo's name, path, indexed date, last commit, and stats.
|
|
13
|
-
Use this to discover which repos are available before querying.
|
|
14
|
-
|
|
15
|
-
When multiple repos are indexed, you MUST specify the "repo" parameter
|
|
10
|
+
description: `List all indexed repositories available to GitNexus.
|
|
11
|
+
|
|
12
|
+
Returns each repo's name, path, indexed date, last commit, and stats.
|
|
13
|
+
Use this to discover which repos are available before querying.
|
|
14
|
+
|
|
15
|
+
When multiple repos are indexed, you MUST specify the "repo" parameter
|
|
16
16
|
on other tools (search, explore, impact, etc.) to target the correct one.`,
|
|
17
17
|
inputSchema: {
|
|
18
18
|
type: 'object',
|
|
@@ -22,23 +22,23 @@ on other tools (search, explore, impact, etc.) to target the correct one.`,
|
|
|
22
22
|
},
|
|
23
23
|
{
|
|
24
24
|
name: 'analyze',
|
|
25
|
-
description: `Index or re-index a repository. Runs the full pipeline in-process.
|
|
26
|
-
|
|
27
|
-
Creates .gitnexus/ in repo root with:
|
|
28
|
-
- Knowledge graph (functions, classes, calls, imports)
|
|
29
|
-
- Full-text search indexes
|
|
30
|
-
- Community detection (Leiden)
|
|
31
|
-
- Process tracing
|
|
32
|
-
- Embeddings for semantic search
|
|
33
|
-
|
|
34
|
-
Also registers the repo in the global registry so the MCP server can serve it.
|
|
35
|
-
|
|
36
|
-
Run this when:
|
|
37
|
-
- First time using GitNexus on a repo
|
|
38
|
-
- After major code changes
|
|
39
|
-
- When staleness warning appears in gitnexus://context
|
|
40
|
-
- When 'not indexed' error appears
|
|
41
|
-
|
|
25
|
+
description: `Index or re-index a repository. Runs the full pipeline in-process.
|
|
26
|
+
|
|
27
|
+
Creates .gitnexus/ in repo root with:
|
|
28
|
+
- Knowledge graph (functions, classes, calls, imports)
|
|
29
|
+
- Full-text search indexes
|
|
30
|
+
- Community detection (Leiden)
|
|
31
|
+
- Process tracing
|
|
32
|
+
- Embeddings for semantic search
|
|
33
|
+
|
|
34
|
+
Also registers the repo in the global registry so the MCP server can serve it.
|
|
35
|
+
|
|
36
|
+
Run this when:
|
|
37
|
+
- First time using GitNexus on a repo
|
|
38
|
+
- After major code changes
|
|
39
|
+
- When staleness warning appears in gitnexus://context
|
|
40
|
+
- When 'not indexed' error appears
|
|
41
|
+
|
|
42
42
|
Note: This may take 30-120 seconds for large repos.`,
|
|
43
43
|
inputSchema: {
|
|
44
44
|
type: 'object',
|
|
@@ -53,14 +53,14 @@ Note: This may take 30-120 seconds for large repos.`,
|
|
|
53
53
|
},
|
|
54
54
|
{
|
|
55
55
|
name: 'search',
|
|
56
|
-
description: `Hybrid search (keyword + semantic) across the codebase.
|
|
57
|
-
Returns code nodes with cluster context and optional graph connections.
|
|
58
|
-
|
|
59
|
-
BETTER THAN IDE search because:
|
|
60
|
-
- Cluster context (which functional area each result belongs to)
|
|
61
|
-
- Relationship data (callers/callees with depth=full)
|
|
62
|
-
- Hybrid ranking (BM25 + semantic via Reciprocal Rank Fusion)
|
|
63
|
-
|
|
56
|
+
description: `Hybrid search (keyword + semantic) across the codebase.
|
|
57
|
+
Returns code nodes with cluster context and optional graph connections.
|
|
58
|
+
|
|
59
|
+
BETTER THAN IDE search because:
|
|
60
|
+
- Cluster context (which functional area each result belongs to)
|
|
61
|
+
- Relationship data (callers/callees with depth=full)
|
|
62
|
+
- Hybrid ranking (BM25 + semantic via Reciprocal Rank Fusion)
|
|
63
|
+
|
|
64
64
|
RETURNS: Array of {name, type, filePath, cluster?, connections[]?, fusedScore, searchSource}`,
|
|
65
65
|
inputSchema: {
|
|
66
66
|
type: 'object',
|
|
@@ -75,25 +75,25 @@ RETURNS: Array of {name, type, filePath, cluster?, connections[]?, fusedScore, s
|
|
|
75
75
|
},
|
|
76
76
|
{
|
|
77
77
|
name: 'cypher',
|
|
78
|
-
description: `Execute Cypher query against the code knowledge graph.
|
|
79
|
-
|
|
80
|
-
SCHEMA:
|
|
81
|
-
- Nodes: File, Folder, Function, Class, Interface, Method, Community, Process
|
|
82
|
-
- Edges via CodeRelation.type: CALLS, IMPORTS, EXTENDS, IMPLEMENTS, CONTAINS, DEFINES, MEMBER_OF, STEP_IN_PROCESS
|
|
83
|
-
|
|
84
|
-
EXAMPLES:
|
|
85
|
-
• Find callers of a function:
|
|
86
|
-
MATCH (a)-[:CodeRelation {type: 'CALLS'}]->(b:Function {name: "validateUser"}) RETURN a.name, a.filePath
|
|
87
|
-
|
|
88
|
-
• Find all functions in a community:
|
|
89
|
-
MATCH (f:Function)-[:CodeRelation {type: 'MEMBER_OF'}]->(c:Community {label: "Auth"}) RETURN f.name
|
|
90
|
-
|
|
91
|
-
• Find steps in a process:
|
|
92
|
-
MATCH (s)-[r:CodeRelation {type: 'STEP_IN_PROCESS'}]->(p:Process {label: "UserLogin"}) RETURN s.name, r.step ORDER BY r.step
|
|
93
|
-
|
|
94
|
-
TIPS:
|
|
95
|
-
- All relationships use CodeRelation table with 'type' property
|
|
96
|
-
- Community = functional cluster detected by Leiden algorithm
|
|
78
|
+
description: `Execute Cypher query against the code knowledge graph.
|
|
79
|
+
|
|
80
|
+
SCHEMA:
|
|
81
|
+
- Nodes: File, Folder, Function, Class, Interface, Method, Community, Process
|
|
82
|
+
- Edges via CodeRelation.type: CALLS, IMPORTS, EXTENDS, IMPLEMENTS, CONTAINS, DEFINES, MEMBER_OF, STEP_IN_PROCESS
|
|
83
|
+
|
|
84
|
+
EXAMPLES:
|
|
85
|
+
• Find callers of a function:
|
|
86
|
+
MATCH (a)-[:CodeRelation {type: 'CALLS'}]->(b:Function {name: "validateUser"}) RETURN a.name, a.filePath
|
|
87
|
+
|
|
88
|
+
• Find all functions in a community:
|
|
89
|
+
MATCH (f:Function)-[:CodeRelation {type: 'MEMBER_OF'}]->(c:Community {label: "Auth"}) RETURN f.name
|
|
90
|
+
|
|
91
|
+
• Find steps in a process:
|
|
92
|
+
MATCH (s)-[r:CodeRelation {type: 'STEP_IN_PROCESS'}]->(p:Process {label: "UserLogin"}) RETURN s.name, r.step ORDER BY r.step
|
|
93
|
+
|
|
94
|
+
TIPS:
|
|
95
|
+
- All relationships use CodeRelation table with 'type' property
|
|
96
|
+
- Community = functional cluster detected by Leiden algorithm
|
|
97
97
|
- Process = execution flow trace from entry point to terminal`,
|
|
98
98
|
inputSchema: {
|
|
99
99
|
type: 'object',
|
|
@@ -106,14 +106,14 @@ TIPS:
|
|
|
106
106
|
},
|
|
107
107
|
{
|
|
108
108
|
name: 'explore',
|
|
109
|
-
description: `Deep dive on a symbol, cluster, or process.
|
|
110
|
-
|
|
111
|
-
TYPE: symbol | cluster | process
|
|
112
|
-
|
|
113
|
-
For SYMBOL: Shows cluster membership, process participation, callers/callees
|
|
114
|
-
For CLUSTER: Shows members, cohesion score, processes touching it
|
|
115
|
-
For PROCESS: Shows step-by-step trace, clusters traversed, entry/terminal points
|
|
116
|
-
|
|
109
|
+
description: `Deep dive on a symbol, cluster, or process.
|
|
110
|
+
|
|
111
|
+
TYPE: symbol | cluster | process
|
|
112
|
+
|
|
113
|
+
For SYMBOL: Shows cluster membership, process participation, callers/callees
|
|
114
|
+
For CLUSTER: Shows members, cohesion score, processes touching it
|
|
115
|
+
For PROCESS: Shows step-by-step trace, clusters traversed, entry/terminal points
|
|
116
|
+
|
|
117
117
|
Use after search to understand context of a specific node.`,
|
|
118
118
|
inputSchema: {
|
|
119
119
|
type: 'object',
|
|
@@ -127,13 +127,13 @@ Use after search to understand context of a specific node.`,
|
|
|
127
127
|
},
|
|
128
128
|
{
|
|
129
129
|
name: 'overview',
|
|
130
|
-
description: `Get codebase map showing all clusters and processes.
|
|
131
|
-
|
|
132
|
-
Returns:
|
|
133
|
-
- All communities (clusters) with member counts and cohesion scores
|
|
134
|
-
- All processes with step counts and types (intra/cross-community)
|
|
135
|
-
- High-level architectural view
|
|
136
|
-
|
|
130
|
+
description: `Get codebase map showing all clusters and processes.
|
|
131
|
+
|
|
132
|
+
Returns:
|
|
133
|
+
- All communities (clusters) with member counts and cohesion scores
|
|
134
|
+
- All processes with step counts and types (intra/cross-community)
|
|
135
|
+
- High-level architectural view
|
|
136
|
+
|
|
137
137
|
Use to understand overall codebase structure before diving deep.`,
|
|
138
138
|
inputSchema: {
|
|
139
139
|
type: 'object',
|
|
@@ -148,23 +148,23 @@ Use to understand overall codebase structure before diving deep.`,
|
|
|
148
148
|
},
|
|
149
149
|
{
|
|
150
150
|
name: 'impact',
|
|
151
|
-
description: `Analyze the impact of changing a code element.
|
|
152
|
-
Returns all nodes affected by modifying the target, with distance, edge type, and confidence.
|
|
153
|
-
|
|
154
|
-
USE BEFORE making changes to understand ripple effects.
|
|
155
|
-
|
|
156
|
-
Output includes:
|
|
157
|
-
- Affected processes (with step positions)
|
|
158
|
-
- Affected clusters (direct/indirect)
|
|
159
|
-
- Risk assessment (critical/high/medium/low)
|
|
160
|
-
- Callers/dependents grouped by depth
|
|
161
|
-
|
|
162
|
-
EdgeType: CALLS, IMPORTS, EXTENDS, IMPLEMENTS
|
|
163
|
-
Confidence: 100% = certain, <80% = fuzzy match
|
|
164
|
-
|
|
165
|
-
Depth groups:
|
|
166
|
-
- d=1: WILL BREAK (direct callers/importers)
|
|
167
|
-
- d=2: LIKELY AFFECTED (indirect)
|
|
151
|
+
description: `Analyze the impact of changing a code element.
|
|
152
|
+
Returns all nodes affected by modifying the target, with distance, edge type, and confidence.
|
|
153
|
+
|
|
154
|
+
USE BEFORE making changes to understand ripple effects.
|
|
155
|
+
|
|
156
|
+
Output includes:
|
|
157
|
+
- Affected processes (with step positions)
|
|
158
|
+
- Affected clusters (direct/indirect)
|
|
159
|
+
- Risk assessment (critical/high/medium/low)
|
|
160
|
+
- Callers/dependents grouped by depth
|
|
161
|
+
|
|
162
|
+
EdgeType: CALLS, IMPORTS, EXTENDS, IMPLEMENTS
|
|
163
|
+
Confidence: 100% = certain, <80% = fuzzy match
|
|
164
|
+
|
|
165
|
+
Depth groups:
|
|
166
|
+
- d=1: WILL BREAK (direct callers/importers)
|
|
167
|
+
- d=2: LIKELY AFFECTED (indirect)
|
|
168
168
|
- d=3: MAY NEED TESTING (transitive)`,
|
|
169
169
|
inputSchema: {
|
|
170
170
|
type: 'object',
|
package/package.json
CHANGED
|
@@ -1,80 +1,80 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "gitnexus",
|
|
3
|
-
"version": "1.1.
|
|
4
|
-
"description": "Graph-powered code intelligence for AI agents. Index any codebase, query via MCP or CLI.",
|
|
5
|
-
"author": "Abhigyan Patwari",
|
|
6
|
-
"license": "PolyForm-Noncommercial-1.0.0",
|
|
7
|
-
"homepage": "https://github.com/abhigyanpatwari/GitNexus#readme",
|
|
8
|
-
"repository": {
|
|
9
|
-
"type": "git",
|
|
10
|
-
"url": "git+https://github.com/abhigyanpatwari/GitNexus.git",
|
|
11
|
-
"directory": "gitnexus"
|
|
12
|
-
},
|
|
13
|
-
"bugs": {
|
|
14
|
-
"url": "https://github.com/abhigyanpatwari/GitNexus/issues"
|
|
15
|
-
},
|
|
16
|
-
"keywords": [
|
|
17
|
-
"mcp",
|
|
18
|
-
"model-context-protocol",
|
|
19
|
-
"code-intelligence",
|
|
20
|
-
"knowledge-graph",
|
|
21
|
-
"cursor",
|
|
22
|
-
"claude",
|
|
23
|
-
"ai-agent",
|
|
24
|
-
"gitnexus",
|
|
25
|
-
"static-analysis",
|
|
26
|
-
"codebase-indexing"
|
|
27
|
-
],
|
|
28
|
-
"type": "module",
|
|
29
|
-
"bin": {
|
|
30
|
-
"gitnexus": "dist/cli/index.js"
|
|
31
|
-
},
|
|
32
|
-
"files": [
|
|
33
|
-
"dist",
|
|
34
|
-
"skills",
|
|
35
|
-
"vendor"
|
|
36
|
-
],
|
|
37
|
-
"scripts": {
|
|
38
|
-
"build": "tsc",
|
|
39
|
-
"dev": "tsx watch src/cli/index.ts",
|
|
40
|
-
"prepare": "npm run build"
|
|
41
|
-
},
|
|
42
|
-
"dependencies": {
|
|
43
|
-
"@huggingface/transformers": "^3.0.0",
|
|
44
|
-
"@modelcontextprotocol/sdk": "^1.0.0",
|
|
45
|
-
"commander": "^12.0.0",
|
|
46
|
-
"cors": "^2.8.5",
|
|
47
|
-
"express": "^4.19.2",
|
|
48
|
-
"glob": "^11.0.0",
|
|
49
|
-
"graphology": "^0.25.4",
|
|
50
|
-
"graphology-indices": "^0.17.0",
|
|
51
|
-
"graphology-utils": "^2.3.0",
|
|
52
|
-
"kuzu": "^0.11.3",
|
|
53
|
-
"lru-cache": "^11.0.0",
|
|
54
|
-
"mnemonist": "^0.39.0",
|
|
55
|
-
"ora": "^8.0.0",
|
|
56
|
-
"pandemonium": "^2.4.0",
|
|
57
|
-
"tree-sitter": "^0.21.0",
|
|
58
|
-
"tree-sitter-c": "^0.21.0",
|
|
59
|
-
"tree-sitter-c-sharp": "^0.21.0",
|
|
60
|
-
"tree-sitter-cpp": "^0.22.0",
|
|
61
|
-
"tree-sitter-go": "^0.21.0",
|
|
62
|
-
"tree-sitter-java": "^0.21.0",
|
|
63
|
-
"tree-sitter-javascript": "^0.21.0",
|
|
64
|
-
"tree-sitter-python": "^0.21.0",
|
|
65
|
-
"tree-sitter-rust": "^0.21.0",
|
|
66
|
-
"tree-sitter-typescript": "^0.21.0",
|
|
67
|
-
"typescript": "^5.4.5",
|
|
68
|
-
"uuid": "^13.0.0"
|
|
69
|
-
},
|
|
70
|
-
"devDependencies": {
|
|
71
|
-
"@types/cors": "^2.8.17",
|
|
72
|
-
"@types/express": "^4.17.21",
|
|
73
|
-
"@types/node": "^20.0.0",
|
|
74
|
-
"@types/uuid": "^10.0.0",
|
|
75
|
-
"tsx": "^4.0.0"
|
|
76
|
-
},
|
|
77
|
-
"engines": {
|
|
78
|
-
"node": ">=18.0.0"
|
|
79
|
-
}
|
|
80
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "gitnexus",
|
|
3
|
+
"version": "1.1.2",
|
|
4
|
+
"description": "Graph-powered code intelligence for AI agents. Index any codebase, query via MCP or CLI.",
|
|
5
|
+
"author": "Abhigyan Patwari",
|
|
6
|
+
"license": "PolyForm-Noncommercial-1.0.0",
|
|
7
|
+
"homepage": "https://github.com/abhigyanpatwari/GitNexus#readme",
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "git+https://github.com/abhigyanpatwari/GitNexus.git",
|
|
11
|
+
"directory": "gitnexus"
|
|
12
|
+
},
|
|
13
|
+
"bugs": {
|
|
14
|
+
"url": "https://github.com/abhigyanpatwari/GitNexus/issues"
|
|
15
|
+
},
|
|
16
|
+
"keywords": [
|
|
17
|
+
"mcp",
|
|
18
|
+
"model-context-protocol",
|
|
19
|
+
"code-intelligence",
|
|
20
|
+
"knowledge-graph",
|
|
21
|
+
"cursor",
|
|
22
|
+
"claude",
|
|
23
|
+
"ai-agent",
|
|
24
|
+
"gitnexus",
|
|
25
|
+
"static-analysis",
|
|
26
|
+
"codebase-indexing"
|
|
27
|
+
],
|
|
28
|
+
"type": "module",
|
|
29
|
+
"bin": {
|
|
30
|
+
"gitnexus": "dist/cli/index.js"
|
|
31
|
+
},
|
|
32
|
+
"files": [
|
|
33
|
+
"dist",
|
|
34
|
+
"skills",
|
|
35
|
+
"vendor"
|
|
36
|
+
],
|
|
37
|
+
"scripts": {
|
|
38
|
+
"build": "tsc",
|
|
39
|
+
"dev": "tsx watch src/cli/index.ts",
|
|
40
|
+
"prepare": "npm run build"
|
|
41
|
+
},
|
|
42
|
+
"dependencies": {
|
|
43
|
+
"@huggingface/transformers": "^3.0.0",
|
|
44
|
+
"@modelcontextprotocol/sdk": "^1.0.0",
|
|
45
|
+
"commander": "^12.0.0",
|
|
46
|
+
"cors": "^2.8.5",
|
|
47
|
+
"express": "^4.19.2",
|
|
48
|
+
"glob": "^11.0.0",
|
|
49
|
+
"graphology": "^0.25.4",
|
|
50
|
+
"graphology-indices": "^0.17.0",
|
|
51
|
+
"graphology-utils": "^2.3.0",
|
|
52
|
+
"kuzu": "^0.11.3",
|
|
53
|
+
"lru-cache": "^11.0.0",
|
|
54
|
+
"mnemonist": "^0.39.0",
|
|
55
|
+
"ora": "^8.0.0",
|
|
56
|
+
"pandemonium": "^2.4.0",
|
|
57
|
+
"tree-sitter": "^0.21.0",
|
|
58
|
+
"tree-sitter-c": "^0.21.0",
|
|
59
|
+
"tree-sitter-c-sharp": "^0.21.0",
|
|
60
|
+
"tree-sitter-cpp": "^0.22.0",
|
|
61
|
+
"tree-sitter-go": "^0.21.0",
|
|
62
|
+
"tree-sitter-java": "^0.21.0",
|
|
63
|
+
"tree-sitter-javascript": "^0.21.0",
|
|
64
|
+
"tree-sitter-python": "^0.21.0",
|
|
65
|
+
"tree-sitter-rust": "^0.21.0",
|
|
66
|
+
"tree-sitter-typescript": "^0.21.0",
|
|
67
|
+
"typescript": "^5.4.5",
|
|
68
|
+
"uuid": "^13.0.0"
|
|
69
|
+
},
|
|
70
|
+
"devDependencies": {
|
|
71
|
+
"@types/cors": "^2.8.17",
|
|
72
|
+
"@types/express": "^4.17.21",
|
|
73
|
+
"@types/node": "^20.0.0",
|
|
74
|
+
"@types/uuid": "^10.0.0",
|
|
75
|
+
"tsx": "^4.0.0"
|
|
76
|
+
},
|
|
77
|
+
"engines": {
|
|
78
|
+
"node": ">=18.0.0"
|
|
79
|
+
}
|
|
80
|
+
}
|