@kage-core/kage-graph-mcp 1.1.34 → 1.1.36

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 CHANGED
@@ -1,92 +1,66 @@
1
- # Kage Repo-Recall MCP
1
+ # Kage repo memory for AI coding agents
2
2
 
3
- Local-first repo memory, code graph, and recall tools for AI coding agents.
3
+ Local-first repo memory, code graph, and recall tools for MCP-capable coding
4
+ agents (Codex, Claude Code, Cursor, etc.).
4
5
 
5
6
  Kage helps agents stop rediscovering the same project context. It stores
6
7
  reviewable repo memory, builds generated recall/code indexes, and exposes the
7
8
  result through an MCP server plus a CLI.
8
9
 
9
- ## Install
10
+ - Website: https://kage-core.github.io/Kage/
11
+ - Docs: https://kage-core.github.io/Kage/guide.html
12
+ - Hosted viewer: https://kage-core.github.io/Kage/viewer/
10
13
 
11
- ```bash
12
- npm install -g @kage-core/kage-graph-mcp
13
- ```
14
+ ## Install
14
15
 
15
- Set up Codex:
16
+ Requires Node.js 18 or newer. The package installs two binaries: `kage` and
17
+ `kage-graph-mcp`.
16
18
 
17
19
  ```bash
20
+ npm install -g @kage-core/kage-graph-mcp
18
21
  cd your-repo
19
- kage setup codex --project . --write
20
22
  kage init --project .
23
+ kage setup codex --project . --write
24
+ # or: kage setup claude-code --project . --write
25
+ # restart the agent once
21
26
  kage setup verify-agent --agent codex --project .
27
+ kage recall "how do I run tests" --project .
22
28
  ```
23
29
 
24
- Set up Claude Code:
30
+ Other supported targets: Cursor, Windsurf, Gemini CLI, OpenCode, Cline, Goose,
31
+ Roo Code, Kilo Code, Claude Desktop, Aider, generic MCP (`kage setup list`).
25
32
 
26
- ```bash
27
- cd your-repo
28
- kage setup claude-code --project . --write
29
- kage init --project .
30
- kage setup verify-agent --agent claude-code --project .
31
- ```
33
+ ## What you get
32
34
 
33
- Restart your agent once after setup so MCP tools reload.
34
-
35
- ## What Kage Gives Agents
36
-
37
- - repo-local memory for decisions, runbooks, bug fixes, gotchas, conventions,
38
- and code explanations
39
- - a code graph for files, symbols, imports, confidence-scored calls, routes,
40
- tests, and packages, including generic call/test signals and mixed-language
41
- framework routes
42
- - conservative cleanup candidates for unreferenced files, unused exports, and
43
- internal-looking unused symbols
44
- - memory-code links so project knowledge points at the code it affects
45
- - decision intelligence for why-memory coverage, stale/weak packets, and
46
- important files that still lack linked repo knowledge
47
- - lightweight workspace recall across sibling repos, including package,
48
- route-contract, topic/event contract, and git co-change links when existing
49
- local evidence exposes them
50
- - local git intelligence for risk, reviewers, contributor profiles, co-change
51
- warnings, ownership silos, and module health
52
- - `AGENTS.md` bootstrap instructions so agents recall context automatically
53
- - a local viewer for memory, code graph, decision memory, risk, module health,
54
- workspace reports, metrics, evidence, and review state
55
- - review and validation commands for stale or risky memory
35
+ - Repo-local memory for decisions, runbooks, bug fixes, gotchas, conventions,
36
+ and code explanations.
37
+ - A code graph for files, symbols, imports, confidence-scored calls, routes
38
+ (FastAPI / Flask / Django / Rails / Laravel / Spring / Go / Rust / ASP.NET),
39
+ tests, and packages.
40
+ - Memory-code links so repo knowledge points at the code it affects.
41
+ - Local git intelligence: risk, reviewers, contributors, co-change warnings,
42
+ ownership silos, module health.
43
+ - Conservative cleanup review input (unreferenced files, unused exports,
44
+ internal-looking unused symbols). Never deletes code.
45
+ - A local viewer for memory, code graph, risks, review, and metrics.
56
46
 
57
47
  No hosted service, external database, or API key is required.
58
48
 
59
- ## Common Commands
49
+ ## Common commands
60
50
 
61
51
  ```bash
62
- kage setup list
63
- kage init --project .
64
52
  kage recall "how do I run tests" --project .
65
- kage recall "how do I run tests" --project . --json --explain
66
53
  kage code-graph "auth routes tests" --project .
67
- kage cleanup-candidates --project . --json
68
- kage dependency-path --project . --from src/app.ts --to src/auth.ts --json
69
- kage module-health --project . --json
70
- kage graph-insights --project . --json
71
- kage workspace --project .. --json
72
- kage workspace recall "auth header contract" --project .. --json
73
- kage contributors --project . --json
74
- kage decisions --project . --json
75
- kage reviewers --project . --changed-files src/auth.ts,src/session.ts --json
76
54
  kage risk --project . --targets src/auth.ts --json
77
55
  kage learn --project . --learning "Use npm test after parser changes."
78
56
  kage refresh --project .
79
57
  kage hook install --project .
80
58
  kage pr check --project .
81
- kage metrics --project . --json
82
- kage audit --project . --json
83
- kage inbox --project . --json
84
59
  kage viewer --project .
85
60
  ```
86
61
 
87
62
  MCP agents should start with `kage_context`. When the query or target list
88
- mentions file paths, it includes risk and dependency-path context alongside
89
- memory recall.
63
+ mentions file paths, it also includes risk and dependency-path context.
90
64
 
91
65
  For stale or wrong memory:
92
66
 
@@ -95,14 +69,9 @@ kage feedback --project . --packet <packet-id> --kind stale
95
69
  kage gc --project . --dry-run
96
70
  ```
97
71
 
98
- ## MCP Server
72
+ For the full CLI and MCP reference, see the [docs](https://kage-core.github.io/Kage/guide.html).
99
73
 
100
- The package exposes:
101
-
102
- - `kage-graph-mcp`: stdio MCP server
103
- - `kage`: CLI
104
-
105
- Typical MCP clients should use the setup command instead of hand-writing config:
74
+ ## MCP server
106
75
 
107
76
  ```bash
108
77
  kage setup codex --project . --write
@@ -110,88 +79,46 @@ kage setup claude-code --project . --write
110
79
  kage setup generic-mcp --project .
111
80
  ```
112
81
 
113
- Supported setup targets include Codex, Claude Code, Cursor, Windsurf, Gemini
114
- CLI, OpenCode, Cline, Goose, Roo Code, Kilo Code, Claude Desktop, Aider, and
115
- generic MCP clients.
116
-
117
- ## Storage Model
118
-
119
- Kage keeps learned memory separate from generated code facts.
120
-
121
- | Layer | Path | Purpose |
122
- |---|---|---|
123
- | Packets | `.agent_memory/packets/` | durable repo memory |
124
- | Indexes | `.agent_memory/indexes/` | rebuildable recall indexes |
125
- | Memory graph | `.agent_memory/graph/` | packet relationships and evidence |
126
- | Structural map | `.agent_memory/structural/` | files, symbols, imports |
127
- | Code graph | `.agent_memory/code_graph/` | source-derived code facts |
128
- | Metrics | `.agent_memory/metrics.json` | readiness, quality, coverage |
129
- | Reports | `.agent_memory/reports/` | risk, contributors, decisions, module health, graph insights, workspace, quality, benchmark |
130
-
131
- Repo-local packets are git-visible and reviewable. Generated indexes and graphs
132
- are rebuildable.
133
-
134
- ## Performance Notes
135
-
136
- Kage is optimized so repeat work scales with changed files, not the whole repo:
137
-
138
- - read-only recall reuses fresh graph artifacts
139
- - unchanged structural file facts are reused
140
- - generated graphs are compact and avoid duplicated structural JSON
141
- - optional git `post-commit` hooks keep repo memory and branch summaries current
142
- - generated/vendor/cache paths are ignored
143
- - huge files are represented safely instead of deeply expanded
144
- - recall builds lookup maps once per query instead of repeatedly scanning graph
145
- edges for every memory packet
146
- - local risk reports include hidden co-change warnings and ownership-silo
147
- signals from git history
148
- - contributor reports show commits, recent activity, touched files/modules,
149
- primary ownership, ownership silos, hotspot ownership, and commit category mix
150
- - decision reports show why-memory coverage, weak/stale decision packets, and
151
- high-signal source paths with no linked decision memory
152
- - graph insights include language parser coverage and edge mix so large-repo
153
- index gaps are visible instead of hidden
154
- - the generic non-TypeScript indexer extracts bounded call edges and test
155
- function coverage, while SCIP/LSP/LSIF/tree-sitter artifacts override it when
156
- available
82
+ ## Storage
157
83
 
158
- ## Viewer
84
+ Kage writes to `.agent_memory/`. Packets are durable repo memory; everything
85
+ else is rebuildable with `kage refresh`.
86
+
87
+ | Path | Purpose |
88
+ |---|---|
89
+ | `.agent_memory/packets/` | durable repo memory |
90
+ | `.agent_memory/graph/` | memory graph (rebuildable) |
91
+ | `.agent_memory/code_graph/` | source-derived code facts (rebuildable) |
92
+ | `.agent_memory/structural/` | files, symbols, imports |
93
+ | `.agent_memory/reports/` | risk, contributors, decisions, module health, workspace, quality, benchmark |
159
94
 
160
- Open a local viewer for the current repo:
95
+ Repo-local packets are git-visible and reviewable. Generated indexes and
96
+ graphs are rebuildable.
97
+
98
+ ## Viewer
161
99
 
162
100
  ```bash
163
101
  kage viewer --project .
164
102
  ```
165
103
 
166
- The local viewer loads graph artifacts plus `.agent_memory/reports/*.json` and
167
- shows a repo-intelligence cockpit for memory-code links, decision memory, risk,
168
- contributors, module health, graph insights, workspace coverage, workspace
169
- link maps, quality, and benchmark proof. Workspace Map rows expose package
170
- dependencies, route contracts, topic/event links, and cross-repo co-change
171
- pairs from local workspace reports.
104
+ The local viewer loads graph artifacts plus `.agent_memory/reports/*.json`.
105
+ It opens with a dashboard for repo readiness, memory coverage, graph health,
106
+ risks, review, and workspace links, then jumps to focused Graph, Memory,
107
+ Risks, and Review pages. Use it when you need to:
172
108
 
173
- Hosted demo:
109
+ - Inspect what agents recall and why.
110
+ - Check risk before editing shared files.
111
+ - Find repo lore by file, feature, bug, command, or decision.
112
+ - Clear the review queue before handoff.
174
113
 
175
- ```text
176
- https://kage-core.github.io/Kage/viewer/
177
- ```
114
+ Hosted demo: https://kage-core.github.io/Kage/viewer/
178
115
 
179
116
  ## Development
180
117
 
181
118
  ```bash
182
119
  npm install
183
120
  npm test
184
- ```
185
-
186
- Build:
187
-
188
- ```bash
189
121
  npm run build
190
- ```
191
-
192
- Package smoke check:
193
-
194
- ```bash
195
122
  npm pack --dry-run
196
123
  ```
197
124
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kage-core/kage-graph-mcp",
3
- "version": "1.1.34",
3
+ "version": "1.1.36",
4
4
  "description": "Local-first repo memory, code graph, and recall MCP server for coding agents",
5
5
  "main": "dist/index.js",
6
6
  "files": [