depgraph-core 1.5.2 → 1.9.0
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/.vscode/depgraph-output.json +8237 -2396
- package/README.md +44 -2
- package/depgraph-mcp.js +24422 -0
- package/depgraph.js +2 -2
- package/package.json +10 -3
- package/docs/README.md +0 -57
- package/docs/architecture.md +0 -89
- package/docs/data-types.md +0 -218
- package/docs/language-registry.md +0 -206
- package/docs/parser-conventions.md +0 -194
- package/docs/stage-collector.md +0 -109
- package/docs/stage-graph.md +0 -157
- package/docs/stage-impact.md +0 -154
- package/docs/stage-metrics.md +0 -113
- package/docs/stage-output.md +0 -144
- package/docs/stage-parser.md +0 -144
package/README.md
CHANGED
|
@@ -305,6 +305,45 @@ When running `--impact` or `--git-impact`, the tool performs:
|
|
|
305
305
|
|
|
306
306
|
---
|
|
307
307
|
|
|
308
|
+
## Claude Code Integration (MCP)
|
|
309
|
+
|
|
310
|
+
DepGraph ships an **MCP server** (`depgraph-mcp`) that lets Claude analyze your codebase and simulate impact directly inside a conversation — no copy-pasting output required.
|
|
311
|
+
|
|
312
|
+
### Quick setup
|
|
313
|
+
|
|
314
|
+
**If the package is published to npm** (zero-install, always up to date):
|
|
315
|
+
```bash
|
|
316
|
+
claude mcp add depgraph -- npx -p depgraph-core depgraph-mcp
|
|
317
|
+
```
|
|
318
|
+
|
|
319
|
+
**If running from a local build** (clone the repo first):
|
|
320
|
+
```bash
|
|
321
|
+
npm install && npm run release:all
|
|
322
|
+
npm run mcp:register
|
|
323
|
+
```
|
|
324
|
+
|
|
325
|
+
**Then use it** — open Claude Code in any project and ask naturally:
|
|
326
|
+
```
|
|
327
|
+
Summarize the dependency graph of /Users/me/my-app
|
|
328
|
+
What is the risk of changing getUserById in /Users/me/my-app?
|
|
329
|
+
Show the impact of the last commit in /Users/me/my-app
|
|
330
|
+
```
|
|
331
|
+
|
|
332
|
+
### Available MCP tools
|
|
333
|
+
|
|
334
|
+
| Tool | What it does |
|
|
335
|
+
| :--- | :--- |
|
|
336
|
+
| `get_graph_summary` | Quick overview — counts, critical nodes, entry/leaf points |
|
|
337
|
+
| `analyze_project` | Full dependency graph — all nodes, edges, and file metadata |
|
|
338
|
+
| `simulate_impact` | Risk score + affected nodes for a named function or class |
|
|
339
|
+
| `git_impact` | Detect git-changed entities and simulate their downstream impact |
|
|
340
|
+
|
|
341
|
+
For the full reference (parameters, examples, removal) see [docs/claude-code-integration.md](docs/claude-code-integration.md).
|
|
342
|
+
|
|
343
|
+
> **Backward compatible** — the existing `depgraph` CLI is untouched. All current scripts and CI pipelines continue to work without changes.
|
|
344
|
+
|
|
345
|
+
---
|
|
346
|
+
|
|
308
347
|
## Development & Contribution
|
|
309
348
|
|
|
310
349
|
### Setup
|
|
@@ -319,8 +358,11 @@ npm install
|
|
|
319
358
|
| Command | Description |
|
|
320
359
|
| :--- | :--- |
|
|
321
360
|
| `npm run build` | Compile TypeScript → `dist/` |
|
|
322
|
-
| `npm run bundle` | Bundle
|
|
323
|
-
| `npm run
|
|
361
|
+
| `npm run bundle` | Bundle CLI → `depgraph.js` via esbuild |
|
|
362
|
+
| `npm run bundle:mcp` | Bundle MCP server → `depgraph-mcp.js` via esbuild |
|
|
363
|
+
| `npm run release` | Build + bundle CLI |
|
|
364
|
+
| `npm run release:mcp` | Build + bundle MCP server |
|
|
365
|
+
| `npm run release:all` | Build + bundle both CLI and MCP server |
|
|
324
366
|
| `npm run test` | Run tests in watch mode (vitest) |
|
|
325
367
|
| `npm run test:run` | Run tests once (for CI) |
|
|
326
368
|
|