gitnexus 1.4.0 → 1.4.1
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 +194 -214
- package/dist/cli/ai-context.d.ts +1 -2
- package/dist/cli/ai-context.js +90 -117
- package/dist/cli/analyze.d.ts +0 -2
- package/dist/cli/analyze.js +2 -20
- package/dist/cli/index.js +25 -17
- package/dist/cli/setup.js +19 -17
- package/dist/core/augmentation/engine.js +20 -20
- package/dist/core/embeddings/embedding-pipeline.js +26 -26
- package/dist/core/graph/types.d.ts +2 -5
- package/dist/core/ingestion/ast-cache.js +2 -3
- package/dist/core/ingestion/call-processor.d.ts +5 -5
- package/dist/core/ingestion/call-processor.js +258 -173
- package/dist/core/ingestion/cluster-enricher.js +16 -16
- package/dist/core/ingestion/entry-point-scoring.d.ts +1 -2
- package/dist/core/ingestion/entry-point-scoring.js +22 -81
- package/dist/core/ingestion/framework-detection.d.ts +1 -5
- package/dist/core/ingestion/framework-detection.js +8 -39
- package/dist/core/ingestion/heritage-processor.d.ts +4 -13
- package/dist/core/ingestion/heritage-processor.js +28 -92
- package/dist/core/ingestion/import-processor.d.ts +19 -17
- package/dist/core/ingestion/import-processor.js +695 -170
- package/dist/core/ingestion/parsing-processor.d.ts +10 -1
- package/dist/core/ingestion/parsing-processor.js +177 -41
- package/dist/core/ingestion/pipeline.js +26 -49
- package/dist/core/ingestion/process-processor.js +1 -2
- package/dist/core/ingestion/symbol-table.d.ts +1 -12
- package/dist/core/ingestion/symbol-table.js +12 -19
- package/dist/core/ingestion/tree-sitter-queries.d.ts +11 -11
- package/dist/core/ingestion/tree-sitter-queries.js +485 -590
- package/dist/core/ingestion/utils.d.ts +0 -67
- package/dist/core/ingestion/utils.js +9 -692
- package/dist/core/ingestion/workers/parse-worker.d.ts +3 -20
- package/dist/core/ingestion/workers/parse-worker.js +345 -84
- package/dist/core/ingestion/workers/worker-pool.js +0 -8
- package/dist/core/kuzu/csv-generator.js +3 -19
- package/dist/core/kuzu/kuzu-adapter.js +19 -14
- package/dist/core/kuzu/schema.d.ts +3 -3
- package/dist/core/kuzu/schema.js +288 -303
- package/dist/core/search/bm25-index.js +6 -7
- package/dist/core/search/hybrid-search.js +3 -3
- package/dist/core/wiki/diagrams.d.ts +27 -0
- package/dist/core/wiki/diagrams.js +163 -0
- package/dist/core/wiki/generator.d.ts +50 -2
- package/dist/core/wiki/generator.js +548 -49
- package/dist/core/wiki/graph-queries.d.ts +42 -0
- package/dist/core/wiki/graph-queries.js +276 -97
- package/dist/core/wiki/html-viewer.js +192 -192
- package/dist/core/wiki/llm-client.js +73 -11
- package/dist/core/wiki/prompts.d.ts +52 -8
- package/dist/core/wiki/prompts.js +200 -86
- package/dist/mcp/core/kuzu-adapter.d.ts +3 -1
- package/dist/mcp/core/kuzu-adapter.js +44 -13
- package/dist/mcp/local/local-backend.js +128 -128
- package/dist/mcp/resources.js +42 -42
- package/dist/mcp/server.js +19 -18
- package/dist/mcp/tools.js +104 -103
- package/hooks/claude/gitnexus-hook.cjs +155 -238
- package/hooks/claude/pre-tool-use.sh +79 -79
- package/hooks/claude/session-start.sh +42 -42
- package/package.json +96 -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/cli/lazy-action.d.ts +0 -6
- package/dist/cli/lazy-action.js +0 -18
- package/dist/cli/skill-gen.d.ts +0 -26
- package/dist/cli/skill-gen.js +0 -549
- package/dist/core/ingestion/constants.d.ts +0 -16
- package/dist/core/ingestion/constants.js +0 -16
- package/dist/core/ingestion/export-detection.d.ts +0 -18
- package/dist/core/ingestion/export-detection.js +0 -230
- package/dist/core/ingestion/language-config.d.ts +0 -46
- package/dist/core/ingestion/language-config.js +0 -167
- package/dist/core/ingestion/mro-processor.d.ts +0 -45
- package/dist/core/ingestion/mro-processor.js +0 -369
- package/dist/core/ingestion/named-binding-extraction.d.ts +0 -61
- package/dist/core/ingestion/named-binding-extraction.js +0 -363
- package/dist/core/ingestion/resolvers/csharp.d.ts +0 -22
- package/dist/core/ingestion/resolvers/csharp.js +0 -109
- package/dist/core/ingestion/resolvers/go.d.ts +0 -19
- package/dist/core/ingestion/resolvers/go.js +0 -42
- package/dist/core/ingestion/resolvers/index.d.ts +0 -16
- package/dist/core/ingestion/resolvers/index.js +0 -11
- package/dist/core/ingestion/resolvers/jvm.d.ts +0 -23
- package/dist/core/ingestion/resolvers/jvm.js +0 -87
- package/dist/core/ingestion/resolvers/php.d.ts +0 -15
- package/dist/core/ingestion/resolvers/php.js +0 -35
- package/dist/core/ingestion/resolvers/rust.d.ts +0 -15
- package/dist/core/ingestion/resolvers/rust.js +0 -73
- package/dist/core/ingestion/resolvers/standard.d.ts +0 -28
- package/dist/core/ingestion/resolvers/standard.js +0 -145
- package/dist/core/ingestion/resolvers/utils.d.ts +0 -33
- package/dist/core/ingestion/resolvers/utils.js +0 -120
- package/dist/core/ingestion/symbol-resolver.d.ts +0 -32
- package/dist/core/ingestion/symbol-resolver.js +0 -83
- package/dist/core/ingestion/type-env.d.ts +0 -27
- package/dist/core/ingestion/type-env.js +0 -86
- package/dist/core/ingestion/type-extractors/c-cpp.d.ts +0 -2
- package/dist/core/ingestion/type-extractors/c-cpp.js +0 -60
- package/dist/core/ingestion/type-extractors/csharp.d.ts +0 -2
- package/dist/core/ingestion/type-extractors/csharp.js +0 -89
- package/dist/core/ingestion/type-extractors/go.d.ts +0 -2
- package/dist/core/ingestion/type-extractors/go.js +0 -105
- package/dist/core/ingestion/type-extractors/index.d.ts +0 -21
- package/dist/core/ingestion/type-extractors/index.js +0 -29
- package/dist/core/ingestion/type-extractors/jvm.d.ts +0 -3
- package/dist/core/ingestion/type-extractors/jvm.js +0 -121
- package/dist/core/ingestion/type-extractors/php.d.ts +0 -2
- package/dist/core/ingestion/type-extractors/php.js +0 -31
- package/dist/core/ingestion/type-extractors/python.d.ts +0 -2
- package/dist/core/ingestion/type-extractors/python.js +0 -41
- package/dist/core/ingestion/type-extractors/rust.d.ts +0 -2
- package/dist/core/ingestion/type-extractors/rust.js +0 -39
- package/dist/core/ingestion/type-extractors/shared.d.ts +0 -17
- package/dist/core/ingestion/type-extractors/shared.js +0 -97
- package/dist/core/ingestion/type-extractors/swift.d.ts +0 -2
- package/dist/core/ingestion/type-extractors/swift.js +0 -43
- package/dist/core/ingestion/type-extractors/types.d.ts +0 -14
- package/dist/core/ingestion/type-extractors/types.js +0 -1
- package/dist/core/ingestion/type-extractors/typescript.d.ts +0 -2
- package/dist/core/ingestion/type-extractors/typescript.js +0 -46
- package/dist/mcp/compatible-stdio-transport.d.ts +0 -25
- package/dist/mcp/compatible-stdio-transport.js +0 -200
package/dist/mcp/tools.js
CHANGED
|
@@ -7,15 +7,19 @@
|
|
|
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,
|
|
13
|
-
|
|
14
|
-
WHEN TO USE: First step when multiple repos are indexed, or to discover available repos.
|
|
15
|
-
AFTER THIS: READ gitnexus://repo/{name}/context for the repo you want to work with.
|
|
16
|
-
|
|
17
|
-
When multiple repos are indexed, you MUST specify the "repo" parameter
|
|
18
|
-
on other tools (query, context, impact, etc.) to target the correct one
|
|
10
|
+
description: `List all indexed repositories available to GitNexus.
|
|
11
|
+
|
|
12
|
+
Returns each repo's name, branch, indexed date, last commit, and stats.
|
|
13
|
+
|
|
14
|
+
WHEN TO USE: First step when multiple repos are indexed, or to discover available repos.
|
|
15
|
+
AFTER THIS: READ gitnexus://repo/{name}/context for the repo you want to work with.
|
|
16
|
+
|
|
17
|
+
When multiple repos are indexed, you MUST specify the "repo" parameter
|
|
18
|
+
on other tools (query, context, impact, etc.) to target the correct one.
|
|
19
|
+
|
|
20
|
+
BRANCH HANDLING: The same repo can be indexed on different branches. Non-default
|
|
21
|
+
branches appear as "owner/repo@branch" in the list. Use that exact name as the
|
|
22
|
+
"repo" parameter in other tools to target the correct branch's graph.`,
|
|
19
23
|
inputSchema: {
|
|
20
24
|
type: 'object',
|
|
21
25
|
properties: {},
|
|
@@ -24,17 +28,17 @@ on other tools (query, context, impact, etc.) to target the correct one.`,
|
|
|
24
28
|
},
|
|
25
29
|
{
|
|
26
30
|
name: 'query',
|
|
27
|
-
description: `Query the code knowledge graph for execution flows related to a concept.
|
|
28
|
-
Returns processes (call chains) ranked by relevance, each with its symbols and file locations.
|
|
29
|
-
|
|
30
|
-
WHEN TO USE: Understanding how code works together. Use this when you need execution flows and relationships, not just file matches. Complements grep/IDE search.
|
|
31
|
-
AFTER THIS: Use context() on a specific symbol for 360-degree view (callers, callees, categorized refs).
|
|
32
|
-
|
|
33
|
-
Returns results grouped by process (execution flow):
|
|
34
|
-
- processes: ranked execution flows with relevance priority
|
|
35
|
-
- process_symbols: all symbols in those flows with file locations and module (functional area)
|
|
36
|
-
- definitions: standalone types/interfaces not in any process
|
|
37
|
-
|
|
31
|
+
description: `Query the code knowledge graph for execution flows related to a concept.
|
|
32
|
+
Returns processes (call chains) ranked by relevance, each with its symbols and file locations.
|
|
33
|
+
|
|
34
|
+
WHEN TO USE: Understanding how code works together. Use this when you need execution flows and relationships, not just file matches. Complements grep/IDE search.
|
|
35
|
+
AFTER THIS: Use context() on a specific symbol for 360-degree view (callers, callees, categorized refs).
|
|
36
|
+
|
|
37
|
+
Returns results grouped by process (execution flow):
|
|
38
|
+
- processes: ranked execution flows with relevance priority
|
|
39
|
+
- process_symbols: all symbols in those flows with file locations and module (functional area)
|
|
40
|
+
- definitions: standalone types/interfaces not in any process
|
|
41
|
+
|
|
38
42
|
Hybrid ranking: BM25 keyword + semantic vector search, ranked by Reciprocal Rank Fusion.`,
|
|
39
43
|
inputSchema: {
|
|
40
44
|
type: 'object',
|
|
@@ -45,68 +49,59 @@ Hybrid ranking: BM25 keyword + semantic vector search, ranked by Reciprocal Rank
|
|
|
45
49
|
limit: { type: 'number', description: 'Max processes to return (default: 5)', default: 5 },
|
|
46
50
|
max_symbols: { type: 'number', description: 'Max symbols per process (default: 10)', default: 10 },
|
|
47
51
|
include_content: { type: 'boolean', description: 'Include full symbol source code (default: false)', default: false },
|
|
48
|
-
repo: { type: 'string', description: 'Repository name
|
|
52
|
+
repo: { type: 'string', description: 'Repository name (e.g. "owner/repo"). For repos indexed on a specific branch, append @branch (e.g. "owner/repo@develop"). Omit if only one repo is indexed. Use list_repos to see available repos.' },
|
|
49
53
|
},
|
|
50
54
|
required: ['query'],
|
|
51
55
|
},
|
|
52
56
|
},
|
|
53
57
|
{
|
|
54
58
|
name: 'cypher',
|
|
55
|
-
description: `Execute Cypher query against the code knowledge graph.
|
|
56
|
-
|
|
57
|
-
WHEN TO USE: Complex structural queries that search/explore can't answer. READ gitnexus://repo/{name}/schema first for the full schema.
|
|
58
|
-
AFTER THIS: Use context() on result symbols for deeper context.
|
|
59
|
-
|
|
60
|
-
SCHEMA:
|
|
61
|
-
- Nodes: File, Folder, Function, Class, Interface, Method, CodeElement, Community, Process
|
|
62
|
-
- Multi-language nodes (use backticks): \`Struct\`, \`Enum\`, \`Trait\`, \`Impl\`, etc.
|
|
63
|
-
- All edges via single CodeRelation table with 'type' property
|
|
64
|
-
- Edge types: CONTAINS, DEFINES, CALLS, IMPORTS, EXTENDS, IMPLEMENTS,
|
|
65
|
-
- Edge properties: type (STRING), confidence (DOUBLE), reason (STRING), step (INT32)
|
|
66
|
-
|
|
67
|
-
EXAMPLES:
|
|
68
|
-
• Find callers of a function:
|
|
69
|
-
MATCH (a)-[:CodeRelation {type: 'CALLS'}]->(b:Function {name: "validateUser"}) RETURN a.name, a.filePath
|
|
70
|
-
|
|
71
|
-
• Find community members:
|
|
72
|
-
MATCH (f)-[:CodeRelation {type: 'MEMBER_OF'}]->(c:Community) WHERE c.heuristicLabel = "Auth" RETURN f.name
|
|
73
|
-
|
|
74
|
-
• Trace a process:
|
|
75
|
-
MATCH (s)-[r:CodeRelation {type: 'STEP_IN_PROCESS'}]->(p:Process) WHERE p.heuristicLabel = "UserLogin" RETURN s.name, r.step ORDER BY r.step
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
• Detect diamond inheritance:
|
|
84
|
-
MATCH (d:Class)-[:CodeRelation {type: 'EXTENDS'}]->(b1), (d)-[:CodeRelation {type: 'EXTENDS'}]->(b2), (b1)-[:CodeRelation {type: 'EXTENDS'}]->(a), (b2)-[:CodeRelation {type: 'EXTENDS'}]->(a) WHERE b1 <> b2 RETURN d.name, b1.name, b2.name, a.name
|
|
85
|
-
|
|
86
|
-
OUTPUT: Returns { markdown, row_count } — results formatted as a Markdown table for easy reading.
|
|
87
|
-
|
|
88
|
-
TIPS:
|
|
89
|
-
- All relationships use single CodeRelation table — filter with {type: 'CALLS'} etc.
|
|
90
|
-
- Community = auto-detected functional area (Leiden algorithm)
|
|
91
|
-
- Process = execution flow trace from entry point to terminal
|
|
59
|
+
description: `Execute Cypher query against the code knowledge graph.
|
|
60
|
+
|
|
61
|
+
WHEN TO USE: Complex structural queries that search/explore can't answer. READ gitnexus://repo/{name}/schema first for the full schema.
|
|
62
|
+
AFTER THIS: Use context() on result symbols for deeper context.
|
|
63
|
+
|
|
64
|
+
SCHEMA:
|
|
65
|
+
- Nodes: File, Folder, Function, Class, Interface, Method, CodeElement, Community, Process
|
|
66
|
+
- Multi-language nodes (use backticks): \`Struct\`, \`Enum\`, \`Trait\`, \`Impl\`, etc.
|
|
67
|
+
- All edges via single CodeRelation table with 'type' property
|
|
68
|
+
- Edge types: CONTAINS, DEFINES, CALLS, IMPORTS, EXTENDS, IMPLEMENTS, MEMBER_OF, STEP_IN_PROCESS
|
|
69
|
+
- Edge properties: type (STRING), confidence (DOUBLE), reason (STRING), step (INT32)
|
|
70
|
+
|
|
71
|
+
EXAMPLES:
|
|
72
|
+
• Find callers of a function:
|
|
73
|
+
MATCH (a)-[:CodeRelation {type: 'CALLS'}]->(b:Function {name: "validateUser"}) RETURN a.name, a.filePath
|
|
74
|
+
|
|
75
|
+
• Find community members:
|
|
76
|
+
MATCH (f)-[:CodeRelation {type: 'MEMBER_OF'}]->(c:Community) WHERE c.heuristicLabel = "Auth" RETURN f.name
|
|
77
|
+
|
|
78
|
+
• Trace a process:
|
|
79
|
+
MATCH (s)-[r:CodeRelation {type: 'STEP_IN_PROCESS'}]->(p:Process) WHERE p.heuristicLabel = "UserLogin" RETURN s.name, r.step ORDER BY r.step
|
|
80
|
+
|
|
81
|
+
OUTPUT: Returns { markdown, row_count } — results formatted as a Markdown table for easy reading.
|
|
82
|
+
|
|
83
|
+
TIPS:
|
|
84
|
+
- All relationships use single CodeRelation table — filter with {type: 'CALLS'} etc.
|
|
85
|
+
- Community = auto-detected functional area (Leiden algorithm)
|
|
86
|
+
- Process = execution flow trace from entry point to terminal
|
|
92
87
|
- Use heuristicLabel (not label) for human-readable community/process names`,
|
|
93
88
|
inputSchema: {
|
|
94
89
|
type: 'object',
|
|
95
90
|
properties: {
|
|
96
91
|
query: { type: 'string', description: 'Cypher query to execute' },
|
|
97
|
-
repo: { type: 'string', description: 'Repository name
|
|
92
|
+
repo: { type: 'string', description: 'Repository name (e.g. "owner/repo"). For repos indexed on a specific branch, append @branch (e.g. "owner/repo@develop"). Omit if only one repo is indexed. Use list_repos to see available repos.' },
|
|
98
93
|
},
|
|
99
94
|
required: ['query'],
|
|
100
95
|
},
|
|
101
96
|
},
|
|
102
97
|
{
|
|
103
98
|
name: 'context',
|
|
104
|
-
description: `360-degree view of a single code symbol.
|
|
105
|
-
Shows categorized incoming/outgoing references (calls, imports, extends, implements), process participation, and file location.
|
|
106
|
-
|
|
107
|
-
WHEN TO USE: After query() to understand a specific symbol in depth. When you need to know all callers, callees, and what execution flows a symbol participates in.
|
|
108
|
-
AFTER THIS: Use impact() if planning changes, or READ gitnexus://repo/{name}/process/{processName} for full execution trace.
|
|
109
|
-
|
|
99
|
+
description: `360-degree view of a single code symbol.
|
|
100
|
+
Shows categorized incoming/outgoing references (calls, imports, extends, implements), process participation, and file location.
|
|
101
|
+
|
|
102
|
+
WHEN TO USE: After query() to understand a specific symbol in depth. When you need to know all callers, callees, and what execution flows a symbol participates in.
|
|
103
|
+
AFTER THIS: Use impact() if planning changes, or READ gitnexus://repo/{name}/process/{processName} for full execution trace.
|
|
104
|
+
|
|
110
105
|
Handles disambiguation: if multiple symbols share the same name, returns candidates for you to pick from. Use uid param for zero-ambiguity lookup from prior results.`,
|
|
111
106
|
inputSchema: {
|
|
112
107
|
type: 'object',
|
|
@@ -115,40 +110,46 @@ Handles disambiguation: if multiple symbols share the same name, returns candida
|
|
|
115
110
|
uid: { type: 'string', description: 'Direct symbol UID from prior tool results (zero-ambiguity lookup)' },
|
|
116
111
|
file_path: { type: 'string', description: 'File path to disambiguate common names' },
|
|
117
112
|
include_content: { type: 'boolean', description: 'Include full symbol source code (default: false)', default: false },
|
|
118
|
-
repo: { type: 'string', description: 'Repository name
|
|
113
|
+
repo: { type: 'string', description: 'Repository name (e.g. "owner/repo"). For repos indexed on a specific branch, append @branch (e.g. "owner/repo@develop"). Omit if only one repo is indexed. Use list_repos to see available repos.' },
|
|
119
114
|
},
|
|
120
115
|
required: [],
|
|
121
116
|
},
|
|
122
117
|
},
|
|
123
118
|
{
|
|
124
119
|
name: 'detect_changes',
|
|
125
|
-
description: `Analyze
|
|
126
|
-
Maps
|
|
127
|
-
|
|
128
|
-
WHEN TO USE: Before committing — to understand what your changes affect. Pre-commit review, PR preparation.
|
|
129
|
-
AFTER THIS: Review affected processes. Use context() on high-risk symbols. READ gitnexus://repo/{name}/process/{name} for full traces.
|
|
130
|
-
|
|
120
|
+
description: `Analyze code changes and find affected execution flows.
|
|
121
|
+
Maps changed files to indexed symbols, then traces which processes are impacted.
|
|
122
|
+
|
|
123
|
+
WHEN TO USE: Before committing — to understand what your changes affect. Pre-commit review, PR preparation.
|
|
124
|
+
AFTER THIS: Review affected processes. Use context() on high-risk symbols. READ gitnexus://repo/{name}/process/{name} for full traces.
|
|
125
|
+
|
|
126
|
+
FOR HUB USERS: The Hub server has no local git checkout. You MUST provide the changed_files
|
|
127
|
+
parameter by running git diff locally first and passing the file list. Example:
|
|
128
|
+
1. Run \`git diff --name-only\` (or \`git diff HEAD --name-only\` for all changes)
|
|
129
|
+
2. Pass the resulting file paths as the changed_files array
|
|
130
|
+
|
|
131
131
|
Returns: changed symbols, affected processes, and a risk summary.`,
|
|
132
132
|
inputSchema: {
|
|
133
133
|
type: 'object',
|
|
134
134
|
properties: {
|
|
135
135
|
scope: { type: 'string', description: 'What to analyze: "unstaged" (default), "staged", "all", or "compare"', enum: ['unstaged', 'staged', 'all', 'compare'], default: 'unstaged' },
|
|
136
136
|
base_ref: { type: 'string', description: 'Branch/commit for "compare" scope (e.g., "main")' },
|
|
137
|
-
|
|
137
|
+
changed_files: { type: 'array', items: { type: 'string' }, description: 'Pre-computed list of changed file paths (from local git diff). Required for Hub MCP — the server has no git checkout. The local MCP server ignores this and runs git diff itself.' },
|
|
138
|
+
repo: { type: 'string', description: 'Repository name (e.g. "owner/repo"). For repos indexed on a specific branch, append @branch (e.g. "owner/repo@develop"). Omit if only one repo is indexed. Use list_repos to see available repos.' },
|
|
138
139
|
},
|
|
139
140
|
required: [],
|
|
140
141
|
},
|
|
141
142
|
},
|
|
142
143
|
{
|
|
143
144
|
name: 'rename',
|
|
144
|
-
description: `Multi-file coordinated rename using the knowledge graph + text search.
|
|
145
|
-
Finds all references via graph (high confidence) and regex text search (lower confidence). Preview by default.
|
|
146
|
-
|
|
147
|
-
WHEN TO USE: Renaming a function, class, method, or variable across the codebase. Safer than find-and-replace.
|
|
148
|
-
AFTER THIS: Run detect_changes() to verify no unexpected side effects.
|
|
149
|
-
|
|
150
|
-
Each edit is tagged with confidence:
|
|
151
|
-
- "graph": found via knowledge graph relationships (high confidence, safe to accept)
|
|
145
|
+
description: `Multi-file coordinated rename using the knowledge graph + text search.
|
|
146
|
+
Finds all references via graph (high confidence) and regex text search (lower confidence). Preview by default.
|
|
147
|
+
|
|
148
|
+
WHEN TO USE: Renaming a function, class, method, or variable across the codebase. Safer than find-and-replace.
|
|
149
|
+
AFTER THIS: Run detect_changes() to verify no unexpected side effects.
|
|
150
|
+
|
|
151
|
+
Each edit is tagged with confidence:
|
|
152
|
+
- "graph": found via knowledge graph relationships (high confidence, safe to accept)
|
|
152
153
|
- "text_search": found via regex text search (lower confidence, review carefully)`,
|
|
153
154
|
inputSchema: {
|
|
154
155
|
type: 'object',
|
|
@@ -158,32 +159,32 @@ Each edit is tagged with confidence:
|
|
|
158
159
|
new_name: { type: 'string', description: 'The new name for the symbol' },
|
|
159
160
|
file_path: { type: 'string', description: 'File path to disambiguate common names' },
|
|
160
161
|
dry_run: { type: 'boolean', description: 'Preview edits without modifying files (default: true)', default: true },
|
|
161
|
-
repo: { type: 'string', description: 'Repository name
|
|
162
|
+
repo: { type: 'string', description: 'Repository name (e.g. "owner/repo"). For repos indexed on a specific branch, append @branch (e.g. "owner/repo@develop"). Omit if only one repo is indexed. Use list_repos to see available repos.' },
|
|
162
163
|
},
|
|
163
164
|
required: ['new_name'],
|
|
164
165
|
},
|
|
165
166
|
},
|
|
166
167
|
{
|
|
167
168
|
name: 'impact',
|
|
168
|
-
description: `Analyze the blast radius of changing a code symbol.
|
|
169
|
-
Returns affected symbols grouped by depth, plus risk assessment, affected execution flows, and affected modules.
|
|
170
|
-
|
|
171
|
-
WHEN TO USE: Before making code changes — especially refactoring, renaming, or modifying shared code. Shows what would break.
|
|
172
|
-
AFTER THIS: Review d=1 items (WILL BREAK). Use context() on high-risk symbols.
|
|
173
|
-
|
|
174
|
-
Output includes:
|
|
175
|
-
- risk: LOW / MEDIUM / HIGH / CRITICAL
|
|
176
|
-
- summary: direct callers, processes affected, modules affected
|
|
177
|
-
- affected_processes: which execution flows break and at which step
|
|
178
|
-
- affected_modules: which functional areas are hit (direct vs indirect)
|
|
179
|
-
- byDepth: all affected symbols grouped by traversal depth
|
|
180
|
-
|
|
181
|
-
Depth groups:
|
|
182
|
-
- d=1: WILL BREAK (direct callers/importers)
|
|
183
|
-
- d=2: LIKELY AFFECTED (indirect)
|
|
184
|
-
- d=3: MAY NEED TESTING (transitive)
|
|
185
|
-
|
|
186
|
-
EdgeType: CALLS, IMPORTS, EXTENDS, IMPLEMENTS
|
|
169
|
+
description: `Analyze the blast radius of changing a code symbol.
|
|
170
|
+
Returns affected symbols grouped by depth, plus risk assessment, affected execution flows, and affected modules.
|
|
171
|
+
|
|
172
|
+
WHEN TO USE: Before making code changes — especially refactoring, renaming, or modifying shared code. Shows what would break.
|
|
173
|
+
AFTER THIS: Review d=1 items (WILL BREAK). Use context() on high-risk symbols.
|
|
174
|
+
|
|
175
|
+
Output includes:
|
|
176
|
+
- risk: LOW / MEDIUM / HIGH / CRITICAL
|
|
177
|
+
- summary: direct callers, processes affected, modules affected
|
|
178
|
+
- affected_processes: which execution flows break and at which step
|
|
179
|
+
- affected_modules: which functional areas are hit (direct vs indirect)
|
|
180
|
+
- byDepth: all affected symbols grouped by traversal depth
|
|
181
|
+
|
|
182
|
+
Depth groups:
|
|
183
|
+
- d=1: WILL BREAK (direct callers/importers)
|
|
184
|
+
- d=2: LIKELY AFFECTED (indirect)
|
|
185
|
+
- d=3: MAY NEED TESTING (transitive)
|
|
186
|
+
|
|
187
|
+
EdgeType: CALLS, IMPORTS, EXTENDS, IMPLEMENTS
|
|
187
188
|
Confidence: 1.0 = certain, <0.8 = fuzzy match`,
|
|
188
189
|
inputSchema: {
|
|
189
190
|
type: 'object',
|
|
@@ -191,10 +192,10 @@ Confidence: 1.0 = certain, <0.8 = fuzzy match`,
|
|
|
191
192
|
target: { type: 'string', description: 'Name of function, class, or file to analyze' },
|
|
192
193
|
direction: { type: 'string', description: 'upstream (what depends on this) or downstream (what this depends on)' },
|
|
193
194
|
maxDepth: { type: 'number', description: 'Max relationship depth (default: 3)', default: 3 },
|
|
194
|
-
relationTypes: { type: 'array', items: { type: 'string' }, description: 'Filter: CALLS, IMPORTS, EXTENDS, IMPLEMENTS
|
|
195
|
+
relationTypes: { type: 'array', items: { type: 'string' }, description: 'Filter: CALLS, IMPORTS, EXTENDS, IMPLEMENTS (default: usage-based)' },
|
|
195
196
|
includeTests: { type: 'boolean', description: 'Include test files (default: false)' },
|
|
196
197
|
minConfidence: { type: 'number', description: 'Minimum confidence 0-1 (default: 0.7)' },
|
|
197
|
-
repo: { type: 'string', description: 'Repository name
|
|
198
|
+
repo: { type: 'string', description: 'Repository name (e.g. "owner/repo"). For repos indexed on a specific branch, append @branch (e.g. "owner/repo@develop"). Omit if only one repo is indexed. Use list_repos to see available repos.' },
|
|
198
199
|
},
|
|
199
200
|
required: ['target', 'direction'],
|
|
200
201
|
},
|