@kage-core/kage-graph-mcp 1.1.35 → 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 +56 -133
- package/package.json +1 -1
- package/viewer/app.js +1158 -262
- package/viewer/data.html +303 -0
- package/viewer/graph.html +303 -0
- package/viewer/index.html +177 -165
- package/viewer/intel.html +303 -0
- package/viewer/memory.html +303 -0
- package/viewer/owners.html +303 -0
- package/viewer/review.html +303 -0
- package/viewer/styles.css +1026 -295
package/README.md
CHANGED
|
@@ -1,92 +1,66 @@
|
|
|
1
|
-
# Kage
|
|
1
|
+
# Kage — repo memory for AI coding agents
|
|
2
2
|
|
|
3
|
-
Local-first repo memory, code graph, and recall tools for
|
|
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
|
-
|
|
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
|
-
|
|
12
|
-
npm install -g @kage-core/kage-graph-mcp
|
|
13
|
-
```
|
|
14
|
+
## Install
|
|
14
15
|
|
|
15
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
-
|
|
43
|
-
|
|
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
|
|
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
|
|
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
|
-
|
|
99
|
-
|
|
100
|
-
The package exposes:
|
|
72
|
+
For the full CLI and MCP reference, see the [docs](https://kage-core.github.io/Kage/guide.html).
|
|
101
73
|
|
|
102
|
-
|
|
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,54 +79,23 @@ kage setup claude-code --project . --write
|
|
|
110
79
|
kage setup generic-mcp --project .
|
|
111
80
|
```
|
|
112
81
|
|
|
113
|
-
|
|
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
|
-
|
|
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 |
|
|
94
|
+
|
|
95
|
+
Repo-local packets are git-visible and reviewable. Generated indexes and
|
|
96
|
+
graphs are rebuildable.
|
|
159
97
|
|
|
160
|
-
|
|
98
|
+
## Viewer
|
|
161
99
|
|
|
162
100
|
```bash
|
|
163
101
|
kage viewer --project .
|
|
@@ -165,37 +103,22 @@ kage viewer --project .
|
|
|
165
103
|
|
|
166
104
|
The local viewer loads graph artifacts plus `.agent_memory/reports/*.json`.
|
|
167
105
|
It opens with a dashboard for repo readiness, memory coverage, graph health,
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
Hosted demo:
|
|
178
|
-
|
|
179
|
-
```text
|
|
180
|
-
https://kage-core.github.io/Kage/viewer/
|
|
181
|
-
```
|
|
106
|
+
risks, review, and workspace links, then jumps to focused Graph, Memory,
|
|
107
|
+
Risks, and Review pages. Use it when you need to:
|
|
108
|
+
|
|
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.
|
|
113
|
+
|
|
114
|
+
Hosted demo: https://kage-core.github.io/Kage/viewer/
|
|
182
115
|
|
|
183
116
|
## Development
|
|
184
117
|
|
|
185
118
|
```bash
|
|
186
119
|
npm install
|
|
187
120
|
npm test
|
|
188
|
-
```
|
|
189
|
-
|
|
190
|
-
Build:
|
|
191
|
-
|
|
192
|
-
```bash
|
|
193
121
|
npm run build
|
|
194
|
-
```
|
|
195
|
-
|
|
196
|
-
Package smoke check:
|
|
197
|
-
|
|
198
|
-
```bash
|
|
199
122
|
npm pack --dry-run
|
|
200
123
|
```
|
|
201
124
|
|