kirograph 0.17.0 → 0.19.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/LICENSE +1 -1
- package/README.md +103 -1822
- package/dist/architecture/layers/dart.js +112 -0
- package/dist/architecture/layers/dart.js.map +7 -0
- package/dist/architecture/layers/index.js +3 -1
- package/dist/architecture/layers/index.js.map +2 -2
- package/dist/bin/banner.js +74 -6
- package/dist/bin/banner.js.map +2 -2
- package/dist/bin/commands/attack-surface.js +157 -0
- package/dist/bin/commands/attack-surface.js.map +7 -0
- package/dist/bin/commands/benchmark.js +206 -0
- package/dist/bin/commands/benchmark.js.map +7 -0
- package/dist/bin/commands/budget.js +70 -0
- package/dist/bin/commands/budget.js.map +7 -0
- package/dist/bin/commands/communities.js +77 -0
- package/dist/bin/commands/communities.js.map +7 -0
- package/dist/bin/commands/dep-confusion.js +119 -0
- package/dist/bin/commands/dep-confusion.js.map +7 -0
- package/dist/bin/commands/export.js +304 -10
- package/dist/bin/commands/export.js.map +2 -2
- package/dist/bin/commands/flows.js +97 -0
- package/dist/bin/commands/flows.js.map +7 -0
- package/dist/bin/commands/help.js +382 -101
- package/dist/bin/commands/help.js.map +2 -2
- package/dist/bin/commands/install.js +90 -8
- package/dist/bin/commands/install.js.map +2 -2
- package/dist/bin/commands/licenses.js +201 -0
- package/dist/bin/commands/licenses.js.map +7 -0
- package/dist/bin/commands/reachability.js +160 -0
- package/dist/bin/commands/reachability.js.map +7 -0
- package/dist/bin/commands/read.js +100 -0
- package/dist/bin/commands/read.js.map +7 -0
- package/dist/bin/commands/refactor.js +116 -0
- package/dist/bin/commands/refactor.js.map +7 -0
- package/dist/bin/commands/remediation.js +133 -0
- package/dist/bin/commands/remediation.js.map +7 -0
- package/dist/bin/commands/sbom.js +76 -0
- package/dist/bin/commands/sbom.js.map +7 -0
- package/dist/bin/commands/security-ci-report.js +267 -0
- package/dist/bin/commands/security-ci-report.js.map +7 -0
- package/dist/bin/commands/security-export.js +1349 -0
- package/dist/bin/commands/security-export.js.map +7 -0
- package/dist/bin/commands/security-flows.js +126 -0
- package/dist/bin/commands/security-flows.js.map +7 -0
- package/dist/bin/commands/security-secrets.js +170 -0
- package/dist/bin/commands/security-secrets.js.map +7 -0
- package/dist/bin/commands/security.js +193 -0
- package/dist/bin/commands/security.js.map +7 -0
- package/dist/bin/commands/staleness.js +144 -0
- package/dist/bin/commands/staleness.js.map +7 -0
- package/dist/bin/commands/status.js +102 -2
- package/dist/bin/commands/status.js.map +2 -2
- package/dist/bin/commands/supply-chain.js +138 -0
- package/dist/bin/commands/supply-chain.js.map +7 -0
- package/dist/bin/commands/uninit.js +109 -60
- package/dist/bin/commands/uninit.js.map +2 -2
- package/dist/bin/commands/vex.js +76 -0
- package/dist/bin/commands/vex.js.map +7 -0
- package/dist/bin/commands/vuln-suppress.js +95 -0
- package/dist/bin/commands/vuln-suppress.js.map +7 -0
- package/dist/bin/commands/vulns.js +382 -0
- package/dist/bin/commands/vulns.js.map +7 -0
- package/dist/bin/installer/auto-detect.js +125 -0
- package/dist/bin/installer/auto-detect.js.map +7 -0
- package/dist/bin/installer/cli-agent.js +28 -5
- package/dist/bin/installer/cli-agent.js.map +2 -2
- package/dist/bin/installer/common.js +47 -0
- package/dist/bin/installer/common.js.map +2 -2
- package/dist/bin/installer/config-prompt.js +12 -1
- package/dist/bin/installer/config-prompt.js.map +2 -2
- package/dist/bin/installer/detect.js +309 -0
- package/dist/bin/installer/detect.js.map +7 -0
- package/dist/bin/installer/index.js +9 -1
- package/dist/bin/installer/index.js.map +2 -2
- package/dist/bin/installer/instructions.js +195 -3
- package/dist/bin/installer/instructions.js.map +2 -2
- package/dist/bin/installer/steering.js +407 -0
- package/dist/bin/installer/steering.js.map +2 -2
- package/dist/bin/installer/targets/aider.js +3 -3
- package/dist/bin/installer/targets/aider.js.map +2 -2
- package/dist/bin/installer/targets/amp.js +3 -3
- package/dist/bin/installer/targets/amp.js.map +2 -2
- package/dist/bin/installer/targets/antigravity.js +35 -6
- package/dist/bin/installer/targets/antigravity.js.map +2 -2
- package/dist/bin/installer/targets/augment.js +3 -3
- package/dist/bin/installer/targets/augment.js.map +2 -2
- package/dist/bin/installer/targets/claude.js +49 -5
- package/dist/bin/installer/targets/claude.js.map +2 -2
- package/dist/bin/installer/targets/cline.js +32 -6
- package/dist/bin/installer/targets/cline.js.map +2 -2
- package/dist/bin/installer/targets/codex.js +64 -12
- package/dist/bin/installer/targets/codex.js.map +2 -2
- package/dist/bin/installer/targets/continue.js +2 -2
- package/dist/bin/installer/targets/continue.js.map +2 -2
- package/dist/bin/installer/targets/copilot-cli.js +101 -0
- package/dist/bin/installer/targets/copilot-cli.js.map +7 -0
- package/dist/bin/installer/targets/copilot.js +31 -5
- package/dist/bin/installer/targets/copilot.js.map +2 -2
- package/dist/bin/installer/targets/cursor.js +4 -4
- package/dist/bin/installer/targets/cursor.js.map +2 -2
- package/dist/bin/installer/targets/devin.js +2 -2
- package/dist/bin/installer/targets/devin.js.map +2 -2
- package/dist/bin/installer/targets/gemini-cli.js +2 -2
- package/dist/bin/installer/targets/gemini-cli.js.map +2 -2
- package/dist/bin/installer/targets/generic.js +2 -14
- package/dist/bin/installer/targets/generic.js.map +2 -2
- package/dist/bin/installer/targets/goose.js +3 -3
- package/dist/bin/installer/targets/goose.js.map +2 -2
- package/dist/bin/installer/targets/index.js +250 -0
- package/dist/bin/installer/targets/index.js.map +2 -2
- package/dist/bin/installer/targets/junie.js +2 -2
- package/dist/bin/installer/targets/junie.js.map +2 -2
- package/dist/bin/installer/targets/kilo.js +2 -2
- package/dist/bin/installer/targets/kilo.js.map +2 -2
- package/dist/bin/installer/targets/kiro.js +3 -3
- package/dist/bin/installer/targets/kiro.js.map +2 -2
- package/dist/bin/installer/targets/opencode.js +2 -2
- package/dist/bin/installer/targets/opencode.js.map +2 -2
- package/dist/bin/installer/targets/openhands.js +3 -3
- package/dist/bin/installer/targets/openhands.js.map +2 -2
- package/dist/bin/installer/targets/qoder.js +91 -0
- package/dist/bin/installer/targets/qoder.js.map +7 -0
- package/dist/bin/installer/targets/qwen.js +96 -0
- package/dist/bin/installer/targets/qwen.js.map +7 -0
- package/dist/bin/installer/targets/replit.js +3 -3
- package/dist/bin/installer/targets/replit.js.map +2 -2
- package/dist/bin/installer/targets/roo.js +2 -2
- package/dist/bin/installer/targets/roo.js.map +2 -2
- package/dist/bin/installer/targets/tabnine.js +3 -3
- package/dist/bin/installer/targets/tabnine.js.map +2 -2
- package/dist/bin/installer/targets/trae.js +5 -5
- package/dist/bin/installer/targets/trae.js.map +2 -2
- package/dist/bin/installer/targets/warp.js +2 -2
- package/dist/bin/installer/targets/warp.js.map +2 -2
- package/dist/bin/installer/targets/windsurf.js +35 -6
- package/dist/bin/installer/targets/windsurf.js.map +2 -2
- package/dist/bin/kirograph.js +72 -6
- package/dist/bin/kirograph.js.map +3 -3
- package/dist/compression/tracker.js +80 -0
- package/dist/compression/tracker.js.map +2 -2
- package/dist/config.js +90 -3
- package/dist/config.js.map +2 -2
- package/dist/core/pipeline.js +36 -2
- package/dist/core/pipeline.js.map +2 -2
- package/dist/db/database.js +56 -5
- package/dist/db/database.js.map +2 -2
- package/dist/db/memory-schema.sql +5 -1
- package/dist/db/schema.sql +3 -1
- package/dist/db/security-schema.sql +72 -0
- package/dist/extraction/extractor.js +81 -0
- package/dist/extraction/extractor.js.map +2 -2
- package/dist/extraction/grammars.js +32 -8
- package/dist/extraction/grammars.js.map +2 -2
- package/dist/extraction/languages.js +43 -1
- package/dist/extraction/languages.js.map +2 -2
- package/dist/extraction/notebook.js +300 -0
- package/dist/extraction/notebook.js.map +7 -0
- package/dist/extraction/wasm/tree-sitter-astro.wasm +0 -0
- package/dist/extraction/wasm/tree-sitter-gdscript.wasm +0 -0
- package/dist/extraction/wasm/tree-sitter-julia.wasm +0 -0
- package/dist/extraction/wasm/tree-sitter-nix.wasm +0 -0
- package/dist/extraction/wasm/tree-sitter-perl.wasm +0 -0
- package/dist/extraction/wasm/tree-sitter-powershell.wasm +0 -0
- package/dist/extraction/wasm/tree-sitter-r.wasm +0 -0
- package/dist/extraction/wasm/tree-sitter-sql.wasm +0 -0
- package/dist/extraction/wasm/tree-sitter-verilog.wasm +0 -0
- package/dist/frameworks/flutter.js +130 -0
- package/dist/frameworks/flutter.js.map +7 -0
- package/dist/frameworks/index.js +7 -1
- package/dist/frameworks/index.js.map +3 -3
- package/dist/graph/communities.js +317 -0
- package/dist/graph/communities.js.map +7 -0
- package/dist/graph/flows.js +138 -0
- package/dist/graph/flows.js.map +7 -0
- package/dist/graph/refactor.js +155 -0
- package/dist/graph/refactor.js.map +7 -0
- package/dist/index.js +1 -1
- package/dist/index.js.map +2 -2
- package/dist/mcp/cache.js +172 -0
- package/dist/mcp/cache.js.map +7 -0
- package/dist/mcp/read-modes.js +295 -0
- package/dist/mcp/read-modes.js.map +7 -0
- package/dist/mcp/server.js +2 -1
- package/dist/mcp/server.js.map +2 -2
- package/dist/mcp/tool-names.js +21 -1
- package/dist/mcp/tool-names.js.map +2 -2
- package/dist/mcp/tools.js +1160 -1
- package/dist/mcp/tools.js.map +3 -3
- package/dist/memory/database.js +32 -2
- package/dist/memory/database.js.map +2 -2
- package/dist/memory/types.js.map +1 -1
- package/dist/resolution/bridges/android-rn.js +298 -0
- package/dist/resolution/bridges/android-rn.js.map +7 -0
- package/dist/resolution/bridges/expo-modules.js +155 -0
- package/dist/resolution/bridges/expo-modules.js.map +7 -0
- package/dist/resolution/bridges/flutter-channel.js +385 -0
- package/dist/resolution/bridges/flutter-channel.js.map +7 -0
- package/dist/resolution/bridges/index.js +80 -0
- package/dist/resolution/bridges/index.js.map +7 -0
- package/dist/resolution/bridges/native-events.js +188 -0
- package/dist/resolution/bridges/native-events.js.map +7 -0
- package/dist/resolution/bridges/native-views.js +244 -0
- package/dist/resolution/bridges/native-views.js.map +7 -0
- package/dist/resolution/bridges/react-native.js +161 -0
- package/dist/resolution/bridges/react-native.js.map +7 -0
- package/dist/resolution/bridges/swift-objc.js +227 -0
- package/dist/resolution/bridges/swift-objc.js.map +7 -0
- package/dist/resolution/bridges/turbomodules.js +216 -0
- package/dist/resolution/bridges/turbomodules.js.map +7 -0
- package/dist/resolution/index.js +61 -2
- package/dist/resolution/index.js.map +2 -2
- package/dist/security/attack-surface.js +164 -0
- package/dist/security/attack-surface.js.map +7 -0
- package/dist/security/context-warnings.js +123 -0
- package/dist/security/context-warnings.js.map +7 -0
- package/dist/security/context-warnings.test.js +300 -0
- package/dist/security/context-warnings.test.js.map +7 -0
- package/dist/security/data-flows.js +228 -0
- package/dist/security/data-flows.js.map +7 -0
- package/dist/security/dep-confusion.js +255 -0
- package/dist/security/dep-confusion.js.map +7 -0
- package/dist/security/errors.js +51 -0
- package/dist/security/errors.js.map +7 -0
- package/dist/security/export/fix-suggestions.js +58 -0
- package/dist/security/export/fix-suggestions.js.map +7 -0
- package/dist/security/export/fix-suggestions.test.js +74 -0
- package/dist/security/export/fix-suggestions.test.js.map +7 -0
- package/dist/security/export/sbom.js +230 -0
- package/dist/security/export/sbom.js.map +7 -0
- package/dist/security/export/sbom.test.js +288 -0
- package/dist/security/export/sbom.test.js.map +7 -0
- package/dist/security/export/serialization.js +142 -0
- package/dist/security/export/serialization.js.map +7 -0
- package/dist/security/export/serialization.test.js +310 -0
- package/dist/security/export/serialization.test.js.map +7 -0
- package/dist/security/export/vex.js +220 -0
- package/dist/security/export/vex.js.map +7 -0
- package/dist/security/export/vex.test.js +278 -0
- package/dist/security/export/vex.test.js.map +7 -0
- package/dist/security/index.js +67 -0
- package/dist/security/index.js.map +7 -0
- package/dist/security/integrator-transitives.test.js +359 -0
- package/dist/security/integrator-transitives.test.js.map +7 -0
- package/dist/security/integrator.js +491 -0
- package/dist/security/integrator.js.map +7 -0
- package/dist/security/integrator.test.js +237 -0
- package/dist/security/integrator.test.js.map +7 -0
- package/dist/security/license.js +70 -0
- package/dist/security/license.js.map +7 -0
- package/dist/security/manifest/adapter.js +243 -0
- package/dist/security/manifest/adapter.js.map +7 -0
- package/dist/security/manifest/adapter.test.js +272 -0
- package/dist/security/manifest/adapter.test.js.map +7 -0
- package/dist/security/manifest/parser.js +376 -0
- package/dist/security/manifest/parser.js.map +7 -0
- package/dist/security/manifest/parser.test.js +110 -0
- package/dist/security/manifest/parser.test.js.map +7 -0
- package/dist/security/manifest/plugins/cargo.js +233 -0
- package/dist/security/manifest/plugins/cargo.js.map +7 -0
- package/dist/security/manifest/plugins/cargo.test.js +304 -0
- package/dist/security/manifest/plugins/cargo.test.js.map +7 -0
- package/dist/security/manifest/plugins/composer.js +152 -0
- package/dist/security/manifest/plugins/composer.js.map +7 -0
- package/dist/security/manifest/plugins/go.js +146 -0
- package/dist/security/manifest/plugins/go.js.map +7 -0
- package/dist/security/manifest/plugins/go.test.js +341 -0
- package/dist/security/manifest/plugins/go.test.js.map +7 -0
- package/dist/security/manifest/plugins/gradle.js +159 -0
- package/dist/security/manifest/plugins/gradle.js.map +7 -0
- package/dist/security/manifest/plugins/hex.js +159 -0
- package/dist/security/manifest/plugins/hex.js.map +7 -0
- package/dist/security/manifest/plugins/maven.js +128 -0
- package/dist/security/manifest/plugins/maven.js.map +7 -0
- package/dist/security/manifest/plugins/maven.test.js +389 -0
- package/dist/security/manifest/plugins/maven.test.js.map +7 -0
- package/dist/security/manifest/plugins/npm.js +284 -0
- package/dist/security/manifest/plugins/npm.js.map +7 -0
- package/dist/security/manifest/plugins/npm.test.js +298 -0
- package/dist/security/manifest/plugins/npm.test.js.map +7 -0
- package/dist/security/manifest/plugins/nuget.js +186 -0
- package/dist/security/manifest/plugins/nuget.js.map +7 -0
- package/dist/security/manifest/plugins/pip.js +123 -0
- package/dist/security/manifest/plugins/pip.js.map +7 -0
- package/dist/security/manifest/plugins/pip.test.js +208 -0
- package/dist/security/manifest/plugins/pip.test.js.map +7 -0
- package/dist/security/manifest/plugins/pubspec.js +212 -0
- package/dist/security/manifest/plugins/pubspec.js.map +7 -0
- package/dist/security/manifest/plugins/pyproject.js +261 -0
- package/dist/security/manifest/plugins/pyproject.js.map +7 -0
- package/dist/security/manifest/plugins/rubygems.js +185 -0
- package/dist/security/manifest/plugins/rubygems.js.map +7 -0
- package/dist/security/manifest/plugins/swift.js +200 -0
- package/dist/security/manifest/plugins/swift.js.map +7 -0
- package/dist/security/owasp.js +104 -0
- package/dist/security/owasp.js.map +7 -0
- package/dist/security/pipeline.js +125 -0
- package/dist/security/pipeline.js.map +7 -0
- package/dist/security/reachability.js +276 -0
- package/dist/security/reachability.js.map +7 -0
- package/dist/security/reachability.test.js +394 -0
- package/dist/security/reachability.test.js.map +7 -0
- package/dist/security/remediation.js +126 -0
- package/dist/security/remediation.js.map +7 -0
- package/dist/security/secrets.js +176 -0
- package/dist/security/secrets.js.map +7 -0
- package/dist/security/staleness.js +231 -0
- package/dist/security/staleness.js.map +7 -0
- package/dist/security/supply-chain.js +301 -0
- package/dist/security/supply-chain.js.map +7 -0
- package/dist/security/suppressions.js +106 -0
- package/dist/security/suppressions.js.map +7 -0
- package/dist/security/types.js +17 -0
- package/dist/security/types.js.map +7 -0
- package/dist/security/vuln/client.js +355 -0
- package/dist/security/vuln/client.js.map +7 -0
- package/dist/security/vuln/client.test.js +288 -0
- package/dist/security/vuln/client.test.js.map +7 -0
- package/dist/security/vuln/epss-client.js +95 -0
- package/dist/security/vuln/epss-client.js.map +7 -0
- package/dist/security/vuln/index.js +29 -0
- package/dist/security/vuln/index.js.map +7 -0
- package/dist/security/vuln/osv-adapter.js +321 -0
- package/dist/security/vuln/osv-adapter.js.map +7 -0
- package/dist/security/vuln/osv-adapter.test.js +391 -0
- package/dist/security/vuln/osv-adapter.test.js.map +7 -0
- package/dist/security/vuln/types.js +17 -0
- package/dist/security/vuln/types.js.map +7 -0
- package/dist/types.js.map +2 -2
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -8,7 +8,7 @@ Semantic code knowledge graph for [Kiro](https://kiro.dev): fewer tool calls, in
|
|
|
8
8
|
|
|
9
9
|
Inspired by [CodeGraph](https://github.com/colbymchenry/codegraph) by [colbymchenry](https://github.com/colbymchenry) for Claude Code, rebuilt natively for Kiro's MCP and hooks system.
|
|
10
10
|
|
|
11
|
-
> **Full support is for Kiro only.** Experimental integrations for other MCP-capable tools (Claude Code,
|
|
11
|
+
> **Full support is for Kiro only.** Experimental integrations for 34 other MCP-capable tools (Cursor, Copilot, Claude Code, Windsurf, Cline, and more) are available with auto-detection. See [Integrations](docs/guide/integrations.md) for the full list.
|
|
12
12
|
|
|
13
13
|
## Why KiroGraph?
|
|
14
14
|
|
|
@@ -18,207 +18,82 @@ KiroGraph gives Kiro a semantic knowledge graph that's pre-indexed and always up
|
|
|
18
18
|
|
|
19
19
|
The result is fewer tool calls, less context used, and faster responses on complex tasks.
|
|
20
20
|
|
|
21
|
-
##
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
|
49
|
-
|
|
50
|
-
|
|
|
51
|
-
|
|
|
52
|
-
|
|
|
53
|
-
| `pglite` | `.kirograph/pglite/` | Hybrid (full-text + vector), exact | `@electric-sql/pglite` (WASM) |
|
|
54
|
-
| `lancedb` | `.kirograph/lancedb/` | ANN (approximate), sub-linear | `@lancedb/lancedb` (pure JS) |
|
|
55
|
-
| `qdrant` | `.kirograph/qdrant/` | ANN (HNSW), sub-linear | `qdrant-local` (embedded binary) |
|
|
56
|
-
| `typesense` | `.kirograph/typesense/` | ANN (HNSW), sub-linear | `typesense` (auto-downloaded binary) |
|
|
57
|
-
|
|
58
|
-
Each engine owns its embedding store exclusively; nothing is written to the SQLite `vectors` table when a non-cosine engine is active. If an engine's optional dependency is not installed, KiroGraph silently falls back to `cosine`.
|
|
59
|
-
|
|
60
|
-
Enable and configure via `kirograph install` (interactive arrow-key menu) or directly in `.kirograph/config.json`:
|
|
61
|
-
|
|
62
|
-
```json
|
|
63
|
-
{
|
|
64
|
-
"enableEmbeddings": true,
|
|
65
|
-
"semanticEngine": "pglite"
|
|
66
|
-
}
|
|
67
|
-
```
|
|
68
|
-
|
|
69
|
-
### Architecture analysis (opt-in)
|
|
70
|
-
|
|
71
|
-
When `enableArchitecture: true` is set, KiroGraph detects the high-level structure of your project (packages and architectural layers) and computes coupling metrics between them. Results are stored in `arch_*` tables inside `kirograph.db` and exposed via dedicated MCP tools and CLI commands.
|
|
72
|
-
|
|
73
|
-
Enable via `kirograph install` or directly in `.kirograph/config.json`:
|
|
74
|
-
|
|
75
|
-
```json
|
|
76
|
-
{
|
|
77
|
-
"enableArchitecture": true
|
|
78
|
-
}
|
|
79
|
-
```
|
|
80
|
-
|
|
81
|
-
See the [Architecture Analysis](#architecture-analysis-opt-in-1) section below for full details.
|
|
82
|
-
|
|
83
|
-
### Memory (opt-in)
|
|
84
|
-
|
|
85
|
-
When `enableMemory: true` is set, KiroGraph stores persistent observations across sessions — decisions, errors, patterns, and architecture notes. Inspired by [cavemem](https://github.com/JuliusBrussee/cavemem) by [Julius Brussee](https://www.linkedin.com/in/julius-brussee/). Observations are:
|
|
86
|
-
|
|
87
|
-
- **Compressed** with the caveman grammar (if caveman mode is enabled) — deterministic, no LLM tokens spent
|
|
88
|
-
- **Linked to code symbols** — identifiers in observation text are matched against the graph and stored as stable `qualified_name` references
|
|
89
|
-
- **Embedded** with the configured semantic engine — enabling natural-language search over past observations
|
|
90
|
-
- **Deduplicated** — SHA-256 content hash prevents storing the same observation twice
|
|
91
|
-
|
|
92
|
-
Memory surfaces automatically in `kirograph_context` and `kirograph_impact` results when relevant observations are linked to the symbols being queried. The agent can also search memory directly via `kirograph_mem_search` or store new observations via `kirograph_mem_store`.
|
|
93
|
-
|
|
94
|
-
Zero LLM tokens on write. ~150-350 tokens per search (vs ~2000-5000 tokens to re-discover context by reading files).
|
|
95
|
-
|
|
96
|
-
Enable via `kirograph install` or directly in `.kirograph/config.json`:
|
|
97
|
-
|
|
98
|
-
```json
|
|
99
|
-
{
|
|
100
|
-
"enableMemory": true
|
|
101
|
-
}
|
|
102
|
-
```
|
|
103
|
-
|
|
104
|
-
See the [Memory](#memory-requires-enablememory-true) section below for full details.
|
|
105
|
-
|
|
106
|
-
### Documentation indexing (opt-in)
|
|
107
|
-
|
|
108
|
-
When `enableDocs: true` is set, KiroGraph indexes project documentation by heading hierarchy and section structure. Instead of reading entire doc files, agents retrieve exactly the section they need via stable section IDs. Inspired by [jDocMunch-MCP](https://github.com/jgravelle/jdocmunch-mcp) by [J. Gravelle](https://www.linkedin.com/in/j-gravelle-2778223/).
|
|
109
|
-
|
|
110
|
-
- **9 format parsers**: Markdown, MDX, reStructuredText, AsciiDoc, RDoc, Org-mode, HTML, plain text, OpenAPI/Swagger
|
|
111
|
-
- **Code ↔ docs cross-references**: Backtick references, CamelCase identifiers, and snake_case patterns in docs are resolved against the code graph
|
|
112
|
-
- **Section-level FTS search**: Independent from code search (`kirograph_docs_search`)
|
|
113
|
-
- **Stable section IDs**: `{file_path}::{ancestor-chain/slug}#{level}` — stable across re-indexing
|
|
114
|
-
- **Token savings**: 92–97% reduction vs reading full doc files (tracked in `kirograph_gain`)
|
|
115
|
-
|
|
116
|
-
Enable via `kirograph install` or directly in `.kirograph/config.json`:
|
|
117
|
-
|
|
118
|
-
```json
|
|
119
|
-
{
|
|
120
|
-
"enableDocs": true
|
|
121
|
-
}
|
|
122
|
-
```
|
|
123
|
-
|
|
124
|
-
See the [Documentation](#documentation-requires-enabledocs-true) section below for full details.
|
|
125
|
-
|
|
126
|
-
### Data indexing (opt-in)
|
|
127
|
-
|
|
128
|
-
When `enableData: true` is set, KiroGraph indexes tabular data files (CSV, TSV, JSONL, JSON, Excel, Parquet) that live alongside your code — test fixtures, seed data, configuration tables, sample datasets. Inspired by [jDataMunch-MCP](https://github.com/jgravelle/jdatamunch-mcp) by [J. Gravelle](https://www.linkedin.com/in/j-gravelle-2778223/).
|
|
129
|
-
|
|
130
|
-
- **Streaming parser**: never loads full files into memory. Processes line-by-line (CSV/JSONL) or in chunks (Excel/Parquet)
|
|
131
|
-
- **Column profiling**: type inference, cardinality, null percentages, min/max, sample values
|
|
132
|
-
- **Server-side computation**: filters, aggregations, and joins run in SQLite. Only results enter the context window
|
|
133
|
-
- **Incremental**: content hash (SHA-256) skips unchanged files on re-index
|
|
134
|
-
- **Token savings**: 95–99% reduction vs reading raw data files (tracked in `kirograph_gain`)
|
|
135
|
-
- **Optional format deps**: CSV/TSV/JSONL/JSON are built-in (zero deps). Excel requires `xlsx`, Parquet requires `parquetjs-lite`
|
|
136
|
-
|
|
137
|
-
Enable via `kirograph install` or directly in `.kirograph/config.json`:
|
|
138
|
-
|
|
139
|
-
```json
|
|
140
|
-
{
|
|
141
|
-
"enableData": true
|
|
142
|
-
}
|
|
143
|
-
```
|
|
144
|
-
|
|
145
|
-
See the [Data](#data-requires-enabledata-true) section below for full details.
|
|
146
|
-
|
|
147
|
-
## Installation
|
|
148
|
-
|
|
149
|
-
### From npm (not yet available on npm registry)
|
|
150
|
-
|
|
151
|
-
```bash
|
|
152
|
-
npm install -g kirograph
|
|
153
|
-
```
|
|
154
|
-
|
|
155
|
-
### From source
|
|
156
|
-
|
|
157
|
-
```bash
|
|
158
|
-
git clone https://github.com/davide-desio-eleva/kirograph.git
|
|
159
|
-
cd kirograph
|
|
160
|
-
npm install
|
|
161
|
-
npm run build
|
|
162
|
-
sudo npm install -g .
|
|
163
|
-
```
|
|
164
|
-
|
|
165
|
-
After building, the `kirograph` and `kg` commands are available globally.
|
|
166
|
-
|
|
167
|
-
### Verify
|
|
168
|
-
|
|
169
|
-
```bash
|
|
170
|
-
kirograph --version
|
|
171
|
-
```
|
|
21
|
+
## Features
|
|
22
|
+
|
|
23
|
+
| Feature | Description |
|
|
24
|
+
|---------|-------------|
|
|
25
|
+
| <h4>Graph & Analysis (Kirograph-Core)</h4> | |
|
|
26
|
+
| 🕸️ **Semantic Graph** | tree-sitter AST parsing across 33+ languages — functions, classes, call edges, type hierarchies, all in SQLite |
|
|
27
|
+
| 🎯 **Context Building** | One tool call returns entry points, related symbols, and code snippets for any task description |
|
|
28
|
+
| 💥 **Impact Analysis** | Blast-radius traversal before making changes — know what breaks at any depth |
|
|
29
|
+
| 🧬 **Type Hierarchy** | Traverse inheritance chains — base types, derived types, implementations |
|
|
30
|
+
| 🔄 **Circular Dependency Detection** | Find import cycles using Tarjan's SCC algorithm |
|
|
31
|
+
| 💀 **Dead Code Detection** | Find unexported symbols with zero incoming references |
|
|
32
|
+
| 🔥 **Hotspots & Surprises** | Identify most-connected symbols and unexpected cross-module coupling |
|
|
33
|
+
| 🧪 **Affected Tests** | Find test files impacted by source changes — useful in CI and pre-commit hooks |
|
|
34
|
+
| 🌐 **Graph Export** | Interactive browser dashboard with search, clustering, path finding, and analytics |
|
|
35
|
+
| <h4>Semantic Search</h4> | |
|
|
36
|
+
| ⚡ **7 Semantic Engines** | Cosine, sqlite-vec, Orama, PGlite, LanceDB, Qdrant, Typesense — pick the best fit for your project |
|
|
37
|
+
| 🤖 **Custom Embedding Models** | Use any HuggingFace `feature-extraction` model — nomic, Gemma, MiniLM, BGE, or bring your own |
|
|
38
|
+
| <h4>Architecture (Kirograph-Arch opt-in module)</h4> | |
|
|
39
|
+
| 🏛️ **Architecture Analysis** | Package graph, layer detection, coupling metrics (Ca/Ce/instability) |
|
|
40
|
+
| 📸 **Snapshots & Diff** | Save graph state before refactors, diff after to verify structural changes |
|
|
41
|
+
| <h4>Security</h4> | |
|
|
42
|
+
| 🔒 **Security (KiroGraph-Sec opt-in module)** | Goes beyond "this dependency has a CVE" — uses the call graph to determine if vulnerable code is **actually reachable** from your entry points. Maps your **attack surface** (which HTTP routes reach vulnerable deps). Detects **hardcoded secrets** and shows how many entry points expose them. **SAST-lite** finds SQL injection, path traversal, and dangerous eval in your code. **Supply chain health** checks OpenSSF Scorecard scores and detects dependency confusion attacks. Covers 14 ecosystems, outputs CycloneDX SBOM/VEX and CI-ready SARIF reports. |
|
|
43
|
+
| <h4>Knowledge & Data</h4> | |
|
|
44
|
+
| 🧠 **Persistent Memor (KiroGraph-Mem opt-in module)** | Cross-session observations — decisions, errors, patterns — auto-linked to code symbols |
|
|
45
|
+
| 📖 **Documentation Indexing (KiroGraph-Doc opt-in module)** | Section-level retrieval from Markdown, MDX, RST, AsciiDoc, OpenAPI — 92-97% token savings |
|
|
46
|
+
| 📊 **Data Navigation (KiroGraph-Data opt-in module)** | Query CSV/JSON/Excel/Parquet with filters, aggregations, joins — all server-side in SQLite |
|
|
47
|
+
| <h4>Token Optimization</h4> | |
|
|
48
|
+
| 🗜️ **Shell Compression (Kirograph-RTK opt-in module)** | Token-optimized command output (git, tests, linters, docker, AWS) — 60-90% savings |
|
|
49
|
+
| 🪨 **Caveman Mode (Kirograph-Caveman opt-in module)** 🪨 | Agent prose compression (lite → ultra) — fewer tokens on explanations without touching code |
|
|
50
|
+
| 📈 **Token Analytics (Kirograph-Gain core module)** | Track cumulative savings from graph tools and shell compression over time |
|
|
51
|
+
| <h4>Integration (Kirograph-Integration core module)</h4> | |
|
|
52
|
+
| 🔌 **Multi-tool Support** | Native Kiro + 32 experimental targets (Cursor, Copilot, Claude Code, Codex, Windsurf, Cline, and more) |
|
|
172
53
|
|
|
173
|
-
## Uninstallation
|
|
174
54
|
|
|
175
|
-
|
|
55
|
+
## Quick Start
|
|
176
56
|
|
|
177
57
|
```bash
|
|
178
|
-
kirograph
|
|
179
|
-
kirograph uninit --force # Remove Kiro integration files + .kirograph/ data without confirmation
|
|
180
|
-
kirograph uninit --target all --force # Remove all integration files (Kiro + Claude + Codex) + .kirograph/ data
|
|
58
|
+
kirograph install # auto-detects your AI tools and configures them all
|
|
181
59
|
```
|
|
182
60
|
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
Without `--force`, KiroGraph asks separately whether to remove the selected tool integration files and whether to remove the shared `.kirograph/` data. With `--force`, both are removed unconditionally.
|
|
186
|
-
|
|
187
|
-
This can remove:
|
|
188
|
-
- `.kirograph/`: index database, snapshots, and export directory
|
|
189
|
-
- Kiro target: `.kiro/hooks/kirograph-*.json`, `.kiro/steering/kirograph.md`, `.kiro/agents/kirograph.json`
|
|
190
|
-
- Claude target (experimental): `kirograph` from `.mcp.json`, plus the KiroGraph import from `CLAUDE.md`
|
|
191
|
-
- Codex target (experimental): the generated KiroGraph block from `AGENTS.md`
|
|
192
|
-
|
|
193
|
-
### Remove the CLI globally
|
|
194
|
-
|
|
195
|
-
If installed from npm:
|
|
61
|
+
Or target a specific platform:
|
|
196
62
|
|
|
197
63
|
```bash
|
|
198
|
-
|
|
64
|
+
kirograph install --target kiro # Kiro only
|
|
65
|
+
kirograph install --target cursor # Cursor only
|
|
66
|
+
kirograph install --target claude # Claude Code only
|
|
67
|
+
kirograph install --all # all detected platforms (no prompt)
|
|
199
68
|
```
|
|
200
69
|
|
|
201
|
-
|
|
70
|
+
Or using the short alias:
|
|
202
71
|
|
|
203
72
|
```bash
|
|
204
|
-
|
|
205
|
-
npm uninstall -g .
|
|
73
|
+
kg install
|
|
206
74
|
```
|
|
207
75
|
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
```bash
|
|
211
|
-
# In your project:
|
|
212
|
-
kirograph install # wire up Kiro MCP + hooks + steering + CLI agent
|
|
213
|
-
```
|
|
76
|
+
All Kiro integration files are written to `.kiro/`. Restart Kiro IDE, or switch to the `kirograph` agent in Kiro CLI.
|
|
214
77
|
|
|
215
|
-
|
|
78
|
+
## Documentation
|
|
216
79
|
|
|
217
|
-
|
|
80
|
+
📖 **[Full documentation on GitHub Pages](https://davide-desio-eleva.github.io/kirograph/)**
|
|
218
81
|
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
82
|
+
| Page | Description |
|
|
83
|
+
|------|-------------|
|
|
84
|
+
| [Installation](docs/guide/installation.md) | Install from npm or source, uninstall, verify |
|
|
85
|
+
| [How It Works](docs/guide/how-it-works.md) | Indexing layers (structural, semantic, architecture, memory, docs, data) |
|
|
86
|
+
| [Integrations](docs/guide/integrations.md) | Kiro setup, 34 other tools, auto-detection |
|
|
87
|
+
| [Comparison](docs/guide/comparison.md) | Feature comparison vs CodeGraph, code-review-graph, and others |
|
|
88
|
+
| [MCP Tools](docs/guide/mcp-tools.md) | Full reference for all MCP tools |
|
|
89
|
+
| [CLI Reference](docs/guide/cli.md) | All CLI commands with examples |
|
|
90
|
+
| [Configuration](docs/guide/configuration.md) | Config fields, semantic engines, architecture analysis |
|
|
91
|
+
| [Security](docs/guide/security.md) | Full SCA+: 14 ecosystems, EPSS, reachability, attack surface, secrets, SAST-lite, supply chain, SBOM/VEX/SARIF |
|
|
92
|
+
| [Languages & Frameworks](docs/guide/languages.md) | Supported languages, frameworks, and detection |
|
|
93
|
+
| [Changelog](CHANGELOG.md) | Release history |
|
|
94
|
+
| [Contributing](CONTRIBUTING.md) | How to contribute |
|
|
95
|
+
| [Code of Conduct](CODE_OF_CONDUCT.md) | Community guidelines |
|
|
96
|
+
| [Security](SECURITY.md) | Security policy |
|
|
222
97
|
|
|
223
98
|
## How It Works
|
|
224
99
|
|
|
@@ -243,1660 +118,66 @@ kg install
|
|
|
243
118
|
└───────────────────────────────────────────┘
|
|
244
119
|
```
|
|
245
120
|
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
## Using with Kiro
|
|
249
|
-
|
|
250
|
-
`kirograph install` or `kirograph install --target kiro` sets up four things in your Kiro workspace (all coexist, so you can switch between IDE and CLI freely):
|
|
251
|
-
|
|
252
|
-
### MCP Server (`.kiro/settings/mcp.json`)
|
|
253
|
-
|
|
254
|
-
Registers the KiroGraph MCP server. Used by both the IDE and the CLI agent:
|
|
255
|
-
|
|
256
|
-
```json
|
|
257
|
-
{
|
|
258
|
-
"mcpServers": {
|
|
259
|
-
"kirograph": {
|
|
260
|
-
"command": "kirograph",
|
|
261
|
-
"args": ["serve", "--mcp"],
|
|
262
|
-
"autoApprove": [
|
|
263
|
-
"kirograph_search", "kirograph_context", "kirograph_callers",
|
|
264
|
-
"kirograph_callees", "kirograph_impact", "kirograph_node",
|
|
265
|
-
"kirograph_status", "kirograph_files", "kirograph_dead_code",
|
|
266
|
-
"kirograph_circular_deps", "kirograph_path", "kirograph_type_hierarchy",
|
|
267
|
-
"kirograph_architecture", "kirograph_coupling", "kirograph_package",
|
|
268
|
-
"kirograph_hotspots", "kirograph_surprising", "kirograph_diff",
|
|
269
|
-
"kirograph_exec", "kirograph_gain"
|
|
270
|
-
"kirograph_mem_search", "kirograph_mem_store",
|
|
271
|
-
"kirograph_mem_timeline", "kirograph_mem_status",
|
|
272
|
-
"kirograph_docs_toc", "kirograph_docs_search",
|
|
273
|
-
"kirograph_docs_section", "kirograph_docs_outline", "kirograph_docs_refs",
|
|
274
|
-
"kirograph_data_list", "kirograph_data_describe",
|
|
275
|
-
"kirograph_data_query", "kirograph_data_aggregate", "kirograph_data_search",
|
|
276
|
-
"kirograph_data_join", "kirograph_data_correlations", "kirograph_data_quality"
|
|
277
|
-
]
|
|
278
|
-
}
|
|
279
|
-
}
|
|
280
|
-
}
|
|
281
|
-
```
|
|
282
|
-
|
|
283
|
-
### IDE Hooks (`.kiro/hooks/`)
|
|
284
|
-
|
|
285
|
-
Up to three hooks are installed (`.kiro.hook` extension):
|
|
286
|
-
|
|
287
|
-
| Hook file | Event | Type | Behavior |
|
|
288
|
-
|-----------|-------|------|----------|
|
|
289
|
-
| `kirograph-sync-if-dirty.kiro.hook` | `agentStop` | `runCommand` | Runs `kirograph sync --quiet` when the agent stops, syncing any file changes from the session. The sync command skips unchanged files via content hashing, so it's fast even when nothing changed. |
|
|
290
|
-
| `kirograph-compress-hint.kiro.hook` | `preToolUse` (shell) | `askAgent` | Reminds the agent to use `kirograph_exec` for commands that benefit from token compression (git, gh, test, lint, build, docker, aws, grep). Only installed when shell compression is enabled. |
|
|
291
|
-
| `kirograph-mem-capture.kiro.hook` | `agentStop` | `askAgent` | Prompts the agent to store important observations (decisions, errors, patterns) in memory at the end of each session. Only installed when memory is enabled. |
|
|
292
|
-
|
|
293
|
-
The sync hook replaces the previous per-file approach (mark-dirty-on-save, mark-dirty-on-create, sync-on-delete). A single `agentStop` hook handles all file changes in one pass with zero overhead during active editing.
|
|
294
|
-
|
|
295
|
-
### CLI Agent Config (`.kiro/agents/kirograph.json`)
|
|
296
|
-
|
|
297
|
-
A custom agent for Kiro CLI that wires up the MCP server, references the steering file as a resource, and handles sync in the CLI's own hook format. The CLI has no file-watch events, so syncing is handled at session boundaries:
|
|
298
|
-
|
|
299
|
-
| Event | Action |
|
|
300
|
-
|-------|--------|
|
|
301
|
-
| `agentSpawn` | `kirograph sync-if-dirty --quiet` (catches edits made between sessions) |
|
|
302
|
-
| `userPromptSubmit` | `kirograph sync-if-dirty --quiet` (keeps graph fresh within a session) |
|
|
303
|
-
| `stop` | `kirograph sync-if-dirty --quiet` (deferred flush, mirrors IDE `agentStop`) |
|
|
304
|
-
|
|
305
|
-
> Note: The CLI agent format only supports `command` hooks (shell commands), not `askAgent` prompts. Memory capture and compression hints are handled via the steering file instructions instead — the agent reads them from `.kiro/steering/kirograph.md` which is referenced as a resource.
|
|
306
|
-
|
|
307
|
-
Use it with:
|
|
308
|
-
|
|
309
|
-
```bash
|
|
310
|
-
kiro-cli --agent kirograph
|
|
311
|
-
```
|
|
312
|
-
|
|
313
|
-
Or swap to it inside an active session:
|
|
314
|
-
|
|
315
|
-
```
|
|
316
|
-
/agent swap kirograph
|
|
317
|
-
```
|
|
318
|
-
|
|
319
|
-
> Note: restart `kiro-cli` after running `kirograph install` for the agent to be picked up.
|
|
320
|
-
|
|
321
|
-
### Steering File (`.kiro/steering/kirograph.md`)
|
|
322
|
-
|
|
323
|
-
Teaches the Kiro IDE to prefer graph tools over file scanning when `.kirograph/` exists. The CLI agent has the same instructions inlined directly in its `prompt` field.
|
|
324
|
-
|
|
325
|
-
## Other Tools (Experimental)
|
|
326
|
-
|
|
327
|
-
> **⚠️ Not fully tested, community-contributed.** The integrations below are outside the original scope of KiroGraph. They are provided as-is. Issues and PRs related to these targets are welcome, but there is no guarantee they will be supported or merged without active help from the contributor.
|
|
328
|
-
|
|
329
|
-
KiroGraph can also be installed for other MCP-capable coding agents. All targets share the same `.kirograph/` data; if the project is already initialized, installing another target only writes that tool's integration files and reuses the existing graph.
|
|
330
|
-
|
|
331
|
-
```bash
|
|
332
|
-
kirograph install --target claude # wire up Claude Code MCP + project memory
|
|
333
|
-
kirograph install --target codex # write Codex instructions and print MCP config
|
|
334
|
-
```
|
|
335
|
-
|
|
336
|
-
### Using with Claude Code
|
|
337
|
-
|
|
338
|
-
```bash
|
|
339
|
-
kirograph install --target claude
|
|
340
|
-
```
|
|
341
|
-
|
|
342
|
-
This writes:
|
|
343
|
-
|
|
344
|
-
- `.mcp.json`: project-scoped MCP server config for Claude Code
|
|
345
|
-
- `.kirograph/claude.md`: KiroGraph tool guidance
|
|
346
|
-
- `CLAUDE.md`: an import of `.kirograph/claude.md`
|
|
347
|
-
|
|
348
|
-
Claude Code prompts for project MCP approval the first time it sees `.mcp.json`.
|
|
349
|
-
|
|
350
|
-
### Using with Codex
|
|
351
|
-
|
|
352
|
-
```bash
|
|
353
|
-
kirograph install --target codex
|
|
354
|
-
```
|
|
355
|
-
|
|
356
|
-
This writes:
|
|
357
|
-
|
|
358
|
-
- `.kirograph/codex.md`: KiroGraph tool guidance
|
|
359
|
-
- `AGENTS.md`: a generated KiroGraph instruction block
|
|
360
|
-
|
|
361
|
-
Codex MCP configuration is user-scoped, so the installer prints the exact `codex mcp add ...` command and equivalent `~/.codex/config.toml` snippet instead of editing files outside the project.
|
|
362
|
-
|
|
363
|
-
## MCP Tools
|
|
364
|
-
|
|
365
|
-
All tools are auto-approved in Kiro once installed. Other MCP clients can use the same tools after configuring their respective targets.
|
|
366
|
-
|
|
367
|
-
### `kirograph_context`
|
|
368
|
-
|
|
369
|
-
Comprehensive context for a task or feature, often sufficient alone without additional tool calls.
|
|
370
|
-
|
|
371
|
-
| Parameter | Type | Default | Description |
|
|
372
|
-
|-----------|------|---------|-------------|
|
|
373
|
-
| `task` | string | required | Task, bug, or feature description |
|
|
374
|
-
| `maxNodes` | number | 20 | Max symbols to include |
|
|
375
|
-
| `includeCode` | boolean | true | Include code snippets |
|
|
376
|
-
| `projectPath` | string | cwd | Project root path |
|
|
377
|
-
|
|
378
|
-
**How it works:** Extracts symbol tokens from the task description (CamelCase, snake_case, SCREAMING_SNAKE, dot.notation) → runs exact name lookup + FTS + **vector search** against the active semantic engine → resolves imports to their definitions → expands through the graph to related symbols → returns entry points, related nodes, edges, and code snippets. This is the only tool that uses the vector engine on every call.
|
|
379
|
-
|
|
380
|
-
### `kirograph_search`
|
|
381
|
-
|
|
382
|
-
Quick symbol search by name. Returns locations only, no code.
|
|
383
|
-
|
|
384
|
-
| Parameter | Type | Default | Description |
|
|
385
|
-
|-----------|------|---------|-------------|
|
|
386
|
-
| `query` | string | required | Symbol name or partial name |
|
|
387
|
-
| `kind` | string | - | Filter: `function`, `method`, `class`, `interface`, `type_alias`, `variable`, `route`, `component` |
|
|
388
|
-
| `limit` | number | 10 | Max results (1–100) |
|
|
389
|
-
| `projectPath` | string | cwd | Project root path |
|
|
390
|
-
|
|
391
|
-
**How it works:** Exact name match → SQLite FTS → LIKE fallback → **vector search** only if all three return nothing. Pure graph database lookup in the common case; vector engine only as a last resort.
|
|
392
|
-
|
|
393
|
-
### `kirograph_callers`
|
|
394
|
-
|
|
395
|
-
Find all functions/methods that call a specific symbol.
|
|
396
|
-
|
|
397
|
-
| Parameter | Type | Default | Description |
|
|
398
|
-
|-----------|------|---------|-------------|
|
|
399
|
-
| `symbol` | string | required | Symbol name |
|
|
400
|
-
| `limit` | number | 20 | Max results (1–100) |
|
|
401
|
-
| `projectPath` | string | cwd | Project root path |
|
|
402
|
-
|
|
403
|
-
**How it works:** BFS traversal of incoming `call` edges in the graph database; no vector engine involved.
|
|
404
|
-
|
|
405
|
-
### `kirograph_callees`
|
|
406
|
-
|
|
407
|
-
Find all functions/methods that a specific symbol calls.
|
|
408
|
-
|
|
409
|
-
| Parameter | Type | Default | Description |
|
|
410
|
-
|-----------|------|---------|-------------|
|
|
411
|
-
| `symbol` | string | required | Symbol name |
|
|
412
|
-
| `limit` | number | 20 | Max results (1–100) |
|
|
413
|
-
| `projectPath` | string | cwd | Project root path |
|
|
414
|
-
|
|
415
|
-
**How it works:** BFS traversal of outgoing `call` edges in the graph database; no vector engine involved.
|
|
416
|
-
|
|
417
|
-
### `kirograph_impact`
|
|
418
|
-
|
|
419
|
-
Analyze what code would be affected by changing a symbol. Use before making changes.
|
|
420
|
-
|
|
421
|
-
| Parameter | Type | Default | Description |
|
|
422
|
-
|-----------|------|---------|-------------|
|
|
423
|
-
| `symbol` | string | required | Symbol name |
|
|
424
|
-
| `depth` | number | 2 | Traversal depth |
|
|
425
|
-
| `projectPath` | string | cwd | Project root path |
|
|
426
|
-
|
|
427
|
-
**How it works:** BFS traversal of all incoming edges (`call`, `import`, `reference`, etc.) up to the specified depth; no vector engine involved.
|
|
428
|
-
|
|
429
|
-
### `kirograph_node`
|
|
430
|
-
|
|
431
|
-
Get details about a specific symbol, optionally including source code.
|
|
432
|
-
|
|
433
|
-
| Parameter | Type | Default | Description |
|
|
434
|
-
|-----------|------|---------|-------------|
|
|
435
|
-
| `symbol` | string | required | Symbol name |
|
|
436
|
-
| `includeCode` | boolean | false | Include source code |
|
|
437
|
-
| `projectPath` | string | cwd | Project root path |
|
|
438
|
-
|
|
439
|
-
Returns: kind, name, qualified name, file location, signature, docstring, and optionally source code.
|
|
440
|
-
|
|
441
|
-
**How it works:** Single row lookup by symbol name in the graph database. If `includeCode` is true, reads the relevant lines directly from the source file on disk; no vector engine involved.
|
|
442
|
-
|
|
443
|
-
### `kirograph_type_hierarchy`
|
|
444
|
-
|
|
445
|
-
Traverse the type hierarchy of a class or interface.
|
|
446
|
-
|
|
447
|
-
| Parameter | Type | Default | Description |
|
|
448
|
-
|-----------|------|---------|-------------|
|
|
449
|
-
| `symbol` | string | required | Class or interface name |
|
|
450
|
-
| `direction` | string | `both` | `up` (base types), `down` (derived types), `both` |
|
|
451
|
-
| `projectPath` | string | cwd | Project root path |
|
|
452
|
-
|
|
453
|
-
**How it works:** Recursive traversal of `extends` and `implements` edges in the graph database; no vector engine involved.
|
|
454
|
-
|
|
455
|
-
### `kirograph_path`
|
|
456
|
-
|
|
457
|
-
Find the shortest path between two symbols in the dependency graph.
|
|
458
|
-
|
|
459
|
-
| Parameter | Type | Default | Description |
|
|
460
|
-
|-----------|------|---------|-------------|
|
|
461
|
-
| `from` | string | required | Source symbol name |
|
|
462
|
-
| `to` | string | required | Target symbol name |
|
|
463
|
-
| `projectPath` | string | cwd | Project root path |
|
|
464
|
-
|
|
465
|
-
**How it works:** BFS shortest-path search across all edge types in the graph database; no vector engine involved.
|
|
466
|
-
|
|
467
|
-
### `kirograph_dead_code`
|
|
468
|
-
|
|
469
|
-
Find symbols with no incoming references (potential dead code). Only unexported symbols are considered.
|
|
470
|
-
|
|
471
|
-
| Parameter | Type | Default | Description |
|
|
472
|
-
|-----------|------|---------|-------------|
|
|
473
|
-
| `limit` | number | 50 | Max results (1–100) |
|
|
474
|
-
| `projectPath` | string | cwd | Project root path |
|
|
475
|
-
|
|
476
|
-
**How it works:** Queries the graph database for nodes with zero incoming edges, filtered to non-exported symbols; no vector engine involved.
|
|
477
|
-
|
|
478
|
-
### `kirograph_circular_deps`
|
|
479
|
-
|
|
480
|
-
Find circular import dependencies in the codebase.
|
|
481
|
-
|
|
482
|
-
| Parameter | Type | Default | Description |
|
|
483
|
-
|-----------|------|---------|-------------|
|
|
484
|
-
| `projectPath` | string | cwd | Project root path |
|
|
485
|
-
|
|
486
|
-
**How it works:** Tarjan's strongly connected components algorithm over `import` edges in the graph database; no vector engine involved.
|
|
487
|
-
|
|
488
|
-
### `kirograph_files`
|
|
489
|
-
|
|
490
|
-
List the indexed file structure with filtering and format options.
|
|
491
|
-
|
|
492
|
-
| Parameter | Type | Default | Description |
|
|
493
|
-
|-----------|------|---------|-------------|
|
|
494
|
-
| `filterPath` | string | - | Filter by directory prefix (e.g., `src/`) |
|
|
495
|
-
| `pattern` | string | - | Filter by glob pattern (e.g., `**/*.ts`) |
|
|
496
|
-
| `maxDepth` | number | - | Limit tree depth |
|
|
497
|
-
| `format` | string | `tree` | `tree`, `flat`, or `grouped` |
|
|
498
|
-
| `includeMetadata` | boolean | true | Include language and symbol counts |
|
|
499
|
-
| `projectPath` | string | cwd | Project root path |
|
|
500
|
-
|
|
501
|
-
**How it works:** Reads file records from the graph database and builds a tree structure in memory. Filtering is applied before tree construction; no vector engine involved.
|
|
502
|
-
|
|
503
|
-
### `kirograph_status`
|
|
504
|
-
|
|
505
|
-
Check index health and statistics: files indexed, symbol count, edge count, breakdown by kind and language, frameworks detected, database size, and semantic search status.
|
|
506
|
-
|
|
507
|
-
| Parameter | Type | Default | Description |
|
|
508
|
-
|-----------|------|---------|-------------|
|
|
509
|
-
| `projectPath` | string | cwd | Project root path |
|
|
510
|
-
|
|
511
|
-
**How it works:** Reads aggregate counts from the graph database + calls `count()` on the active vector engine to report embedding coverage. No graph traversal, no vector search.
|
|
512
|
-
|
|
513
|
-
### `kirograph_architecture` *(requires `enableArchitecture: true`)*
|
|
514
|
-
|
|
515
|
-
Get the full architecture overview: detected packages, layers, and the dependency graph between them.
|
|
516
|
-
|
|
517
|
-
| Parameter | Type | Default | Description |
|
|
518
|
-
|-----------|------|---------|-------------|
|
|
519
|
-
| `projectPath` | string | cwd | Project root path |
|
|
520
|
-
|
|
521
|
-
Returns: packages (with source, language, version, external deps, file membership), layers (with file counts and detection patterns), package dependency edges, layer dependency edges, and per-file package/layer assignments.
|
|
522
|
-
|
|
523
|
-
**How it works:** Reads the `arch_*` tables populated during the last `kirograph index` run. Returns nothing useful if architecture analysis was not enabled at index time.
|
|
524
|
-
|
|
525
|
-
### `kirograph_coupling` *(requires `enableArchitecture: true`)*
|
|
526
|
-
|
|
527
|
-
Get coupling metrics for all packages or a specific one.
|
|
528
|
-
|
|
529
|
-
| Parameter | Type | Default | Description |
|
|
530
|
-
|-----------|------|---------|-------------|
|
|
531
|
-
| `packageId` | string | - | Package ID (e.g. `pkg:npm:src/auth`). Omit for all packages. |
|
|
532
|
-
| `projectPath` | string | cwd | Project root path |
|
|
533
|
-
|
|
534
|
-
Returns per-package: **Ca** (afferent: how many other packages depend on this one), **Ce** (efferent: how many packages this one depends on), and **instability** (`Ce / (Ca + Ce)`, 0 = maximally stable, 1 = maximally unstable). When `packageId` is given, also returns the full list of incoming and outgoing package dependencies.
|
|
535
|
-
|
|
536
|
-
### `kirograph_package` *(requires `enableArchitecture: true`)*
|
|
537
|
-
|
|
538
|
-
Inspect the files and dependencies of a specific package.
|
|
539
|
-
|
|
540
|
-
| Parameter | Type | Default | Description |
|
|
541
|
-
|-----------|------|---------|-------------|
|
|
542
|
-
| `packageId` | string | required | Package ID (e.g. `pkg:npm:src/auth`) |
|
|
543
|
-
| `projectPath` | string | cwd | Project root path |
|
|
544
|
-
|
|
545
|
-
Returns: package metadata, all files assigned to the package, packages it depends on (with import counts), and packages that depend on it.
|
|
546
|
-
|
|
547
|
-
### `kirograph_hotspots`
|
|
548
|
-
|
|
549
|
-
Find the most-connected symbols by total edge degree (incoming + outgoing). Excludes structural `contains` edges.
|
|
550
|
-
|
|
551
|
-
| Parameter | Type | Default | Description |
|
|
552
|
-
|-----------|------|---------|-------------|
|
|
553
|
-
| `limit` | number | 20 | Max results (1–100) |
|
|
554
|
-
| `projectPath` | string | cwd | Project root path |
|
|
555
|
-
|
|
556
|
-
Returns each symbol with total degree, in-degree, and out-degree. Useful for identifying core abstractions and high blast-radius code before making changes.
|
|
557
|
-
|
|
558
|
-
### `kirograph_surprising`
|
|
559
|
-
|
|
560
|
-
Find non-obvious cross-file connections: direct edges between symbols in structurally distant files.
|
|
561
|
-
|
|
562
|
-
| Parameter | Type | Default | Description |
|
|
563
|
-
|-----------|------|---------|-------------|
|
|
564
|
-
| `limit` | number | 20 | Max results (1–100) |
|
|
565
|
-
| `projectPath` | string | cwd | Project root path |
|
|
566
|
-
|
|
567
|
-
**How it works:** Queries all cross-file edges (excluding `contains` and `import`). Scores each by path distance between source and target files × edge-kind weight (`calls=1.0`, `references=0.8`, `type_of=0.7`, etc.). Returns the highest-scoring unique pairs. the ones that represent the most unexpected coupling in the codebase.
|
|
568
|
-
|
|
569
|
-
### `kirograph_diff`
|
|
570
|
-
|
|
571
|
-
Compare the current graph state against a saved snapshot. Shows added/removed symbols and edges.
|
|
572
|
-
|
|
573
|
-
| Parameter | Type | Default | Description |
|
|
574
|
-
|-----------|------|---------|-------------|
|
|
575
|
-
| `snapshot` | string | latest | Snapshot label. Omit to use the most recent saved snapshot. |
|
|
576
|
-
| `projectPath` | string | cwd | Project root path |
|
|
577
|
-
|
|
578
|
-
Use `kirograph snapshot save` (CLI) to save a snapshot before a refactor or PR. Run `kirograph_diff` after to see what changed structurally.
|
|
579
|
-
|
|
580
|
-
### `kirograph_exec`
|
|
581
|
-
|
|
582
|
-
Run a shell command and return token-optimized output. Automatically filters noise from git, test runners, linters, build tools, docker, and package managers.
|
|
583
|
-
|
|
584
|
-
| Parameter | Type | Default | Description |
|
|
585
|
-
|-----------|------|---------|-------------|
|
|
586
|
-
| `command` | string | required | Shell command to execute |
|
|
587
|
-
| `cwd` | string | project root | Working directory |
|
|
588
|
-
| `level` | string | `normal` | Compression level: `normal`, `aggressive`, `ultra` |
|
|
589
|
-
| `timeout` | number | 60 | Timeout in seconds |
|
|
590
|
-
| `projectPath` | string | cwd | Project root path |
|
|
591
|
-
|
|
592
|
-
**How it works:** Executes the command, detects the command family (git, test, lint, etc.), applies the appropriate filter strategy, and returns compressed output with a savings footer. Error output is always preserved. Does not require KiroGraph to be initialized, works standalone.
|
|
593
|
-
|
|
594
|
-
### `kirograph_gain`
|
|
595
|
-
|
|
596
|
-
Show token savings statistics from compressed command outputs.
|
|
597
|
-
|
|
598
|
-
| Parameter | Type | Default | Description |
|
|
599
|
-
|-----------|------|---------|-------------|
|
|
600
|
-
| `period` | string | `session` | Time period: `session`, `today`, `week`, `all` |
|
|
601
|
-
| `projectPath` | string | cwd | Project root path |
|
|
602
|
-
|
|
603
|
-
Returns total commands, original/compressed token counts, savings percentage, breakdown by command family, and recent command history.
|
|
604
|
-
|
|
605
|
-
### `kirograph_mem_search` *(requires `enableMemory: true`)*
|
|
606
|
-
|
|
607
|
-
Search project memory for past decisions, errors, patterns, and context.
|
|
608
|
-
|
|
609
|
-
| Parameter | Type | Default | Description |
|
|
610
|
-
|-----------|------|---------|-------------|
|
|
611
|
-
| `query` | string | required | Natural language search query |
|
|
612
|
-
| `kind` | string | - | Filter: `decision`, `error`, `pattern`, `architecture`, `summary`, `note` |
|
|
613
|
-
| `limit` | number | 10 | Max results |
|
|
614
|
-
| `sessionId` | string | - | Filter to specific session |
|
|
615
|
-
| `projectPath` | string | cwd | Project root path |
|
|
616
|
-
|
|
617
|
-
**How it works:** Hybrid search combining FTS5 keyword matching and vector cosine similarity (using the configured semantic engine). Results are ranked by a blended score (configurable via `memorySearchAlpha`). Falls back to FTS-only if embeddings are disabled or model mismatch is detected.
|
|
618
|
-
|
|
619
|
-
### `kirograph_mem_store` *(requires `enableMemory: true`)*
|
|
620
|
-
|
|
621
|
-
Store an observation in project memory. Content is automatically compressed (if caveman mode is on) and linked to relevant code symbols.
|
|
622
|
-
|
|
623
|
-
| Parameter | Type | Default | Description |
|
|
624
|
-
|-----------|------|---------|-------------|
|
|
625
|
-
| `content` | string | required | Observation text |
|
|
626
|
-
| `kind` | string | `note` | `decision`, `error`, `pattern`, `architecture`, `summary`, `note` |
|
|
627
|
-
| `projectPath` | string | cwd | Project root path |
|
|
628
|
-
|
|
629
|
-
**How it works:** Strips `<private>` blocks → applies caveman compression (if enabled) → computes SHA-256 hash for deduplication → stores in `mem_observations` → detects symbol identifiers and creates `mem_links` → embeds with the configured model. Zero LLM tokens consumed.
|
|
630
|
-
|
|
631
|
-
### `kirograph_mem_timeline` *(requires `enableMemory: true`)*
|
|
632
|
-
|
|
633
|
-
List recent sessions and their observations chronologically.
|
|
634
|
-
|
|
635
|
-
| Parameter | Type | Default | Description |
|
|
636
|
-
|-----------|------|---------|-------------|
|
|
637
|
-
| `limit` | number | 5 | Number of sessions to show |
|
|
638
|
-
| `sessionId` | string | - | Show observations for a specific session |
|
|
639
|
-
| `projectPath` | string | cwd | Project root path |
|
|
640
|
-
|
|
641
|
-
### `kirograph_mem_status` *(requires `enableMemory: true`)*
|
|
642
|
-
|
|
643
|
-
Memory subsystem health: session count, observations, embedding coverage, model mismatch detection.
|
|
644
|
-
|
|
645
|
-
| Parameter | Type | Default | Description |
|
|
646
|
-
|-----------|------|---------|-------------|
|
|
647
|
-
| `projectPath` | string | cwd | Project root path |
|
|
648
|
-
|
|
649
|
-
### `kirograph_docs_toc` *(requires `enableDocs: true`)*
|
|
650
|
-
|
|
651
|
-
Get table of contents for a documentation file or the whole project. Returns section IDs, titles, levels, and summaries.
|
|
652
|
-
|
|
653
|
-
| Parameter | Type | Default | Description |
|
|
654
|
-
|-----------|------|---------|-------------|
|
|
655
|
-
| `file` | string | - | Filter to a specific doc file (relative path). Omit for project-wide TOC. |
|
|
656
|
-
| `tree` | boolean | false | Return nested tree structure |
|
|
657
|
-
| `projectPath` | string | cwd | Project root path |
|
|
658
|
-
|
|
659
|
-
### `kirograph_docs_search` *(requires `enableDocs: true`)*
|
|
660
|
-
|
|
661
|
-
Search documentation sections by query. Returns matching sections ranked by relevance. Independent from `kirograph_search` (code-only).
|
|
662
|
-
|
|
663
|
-
| Parameter | Type | Default | Description |
|
|
664
|
-
|-----------|------|---------|-------------|
|
|
665
|
-
| `query` | string | required | Search query (natural language or keywords) |
|
|
666
|
-
| `file` | string | - | Narrow search to a specific doc file |
|
|
667
|
-
| `limit` | number | 10 | Max results |
|
|
668
|
-
| `projectPath` | string | cwd | Project root path |
|
|
669
|
-
|
|
670
|
-
### `kirograph_docs_section` *(requires `enableDocs: true`)*
|
|
671
|
-
|
|
672
|
-
Retrieve full content of a documentation section by its stable ID. Use `context=true` to also get ancestor headings and child summaries.
|
|
673
|
-
|
|
674
|
-
| Parameter | Type | Default | Description |
|
|
675
|
-
|-----------|------|---------|-------------|
|
|
676
|
-
| `id` | string | required | Section ID (from `kirograph_docs_toc` or `kirograph_docs_search` results) |
|
|
677
|
-
| `context` | boolean | false | Include ancestor heading chain and child summaries |
|
|
678
|
-
| `projectPath` | string | cwd | Project root path |
|
|
679
|
-
|
|
680
|
-
### `kirograph_docs_outline` *(requires `enableDocs: true`)*
|
|
681
|
-
|
|
682
|
-
Get the heading hierarchy for a single documentation file. Lighter than full TOC when you know which file is relevant.
|
|
683
|
-
|
|
684
|
-
| Parameter | Type | Default | Description |
|
|
685
|
-
|-----------|------|---------|-------------|
|
|
686
|
-
| `file` | string | required | Relative path to the doc file |
|
|
687
|
-
| `projectPath` | string | cwd | Project root path |
|
|
688
|
-
|
|
689
|
-
### `kirograph_docs_refs` *(requires `enableDocs: true`)*
|
|
690
|
-
|
|
691
|
-
Find code symbols referenced by a doc section, or doc sections that reference a code symbol. Bidirectional lookup.
|
|
692
|
-
|
|
693
|
-
| Parameter | Type | Default | Description |
|
|
694
|
-
|-----------|------|---------|-------------|
|
|
695
|
-
| `sectionId` | string | - | Doc section ID (find code symbols it references) |
|
|
696
|
-
| `nodeId` | string | - | Code symbol qualified name (find doc sections that reference it) |
|
|
697
|
-
| `projectPath` | string | cwd | Project root path |
|
|
698
|
-
|
|
699
|
-
### `kirograph_data_list` *(requires `enableData: true`)*
|
|
700
|
-
|
|
701
|
-
List all indexed datasets with row counts, column counts, and file sizes.
|
|
702
|
-
|
|
703
|
-
| Parameter | Type | Default | Description |
|
|
704
|
-
|-----------|------|---------|-------------|
|
|
705
|
-
| `projectPath` | string | cwd | Project root path |
|
|
706
|
-
|
|
707
|
-
### `kirograph_data_describe` *(requires `enableData: true`)*
|
|
708
|
-
|
|
709
|
-
Full schema profile for a dataset: column names, inferred types, cardinality, null percentages, min/max values, and sample values.
|
|
121
|
+
## What Gets Indexed?
|
|
710
122
|
|
|
711
|
-
|
|
712
|
-
|-----------|------|---------|-------------|
|
|
713
|
-
| `dataset` | string | required | Dataset ID (from `kirograph_data_list`) |
|
|
714
|
-
| `column` | string | - | Deep dive on a single column |
|
|
715
|
-
| `projectPath` | string | cwd | Project root path |
|
|
123
|
+
KiroGraph uses [tree-sitter](https://tree-sitter.github.io/tree-sitter/) to parse your source files into an AST and extract:
|
|
716
124
|
|
|
717
|
-
|
|
125
|
+
- **Nodes**: functions, methods, classes, interfaces, types, enums, variables, constants, routes, components, dependencies, vulnerabilities, and more (26 node kinds total)
|
|
126
|
+
- **Edges**: calls, imports, exports, extends, implements, contains, references, instantiates, overrides, decorates, type_of, returns
|
|
718
127
|
|
|
719
|
-
|
|
128
|
+
Everything is stored in a local SQLite database (`.kirograph/kirograph.db`). **Nothing leaves your machine.** No API keys. No external services.
|
|
720
129
|
|
|
721
|
-
|
|
722
|
-
|-----------|------|---------|-------------|
|
|
723
|
-
| `dataset` | string | required | Dataset ID |
|
|
724
|
-
| `filters` | Filter[] | - | Array of `{column, op, value}`. Ops: `eq`, `neq`, `gt`, `gte`, `lt`, `lte`, `contains`, `in`, `is_null`, `between` |
|
|
725
|
-
| `columns` | string[] | all | Column projection |
|
|
726
|
-
| `limit` | number | 500 | Max rows (hard cap: 500) |
|
|
727
|
-
| `offset` | number | 0 | Pagination offset |
|
|
728
|
-
| `projectPath` | string | cwd | Project root path |
|
|
130
|
+
## Requirements
|
|
729
131
|
|
|
730
|
-
|
|
132
|
+
- Node.js >= 18
|
|
133
|
+
- Kiro IDE (fully supported)
|
|
134
|
+
- Other MCP-capable tools (experimental — see [Integrations](docs/guide/integrations.md))
|
|
731
135
|
|
|
732
|
-
|
|
136
|
+
## Credits
|
|
733
137
|
|
|
734
|
-
|
|
735
|
-
|-----------|------|---------|-------------|
|
|
736
|
-
| `dataset` | string | required | Dataset ID |
|
|
737
|
-
| `groupBy` | string[] | required | Columns to group by |
|
|
738
|
-
| `metrics` | Metric[] | required | Array of `{column, op}`. Ops: `count`, `sum`, `avg`, `min`, `max`, `count_distinct` |
|
|
739
|
-
| `filters` | Filter[] | - | Pre-aggregation filters |
|
|
740
|
-
| `projectPath` | string | cwd | Project root path |
|
|
138
|
+
KiroGraph is inspired by [CodeGraph](https://github.com/colbymchenry/codegraph) by [Colby McHenry](https://www.linkedin.com/in/colby-mchenry/). The original concept of building a semantic code graph for AI coding agents comes from his work.
|
|
741
139
|
|
|
742
|
-
###
|
|
140
|
+
### Inspirations
|
|
743
141
|
|
|
744
|
-
|
|
142
|
+
- [cavemem](https://github.com/JuliusBrussee/cavemem) by [Julius Brussee](https://www.linkedin.com/in/julius-brussee/): the memory module's hook-based observation capture, deterministic compression, and SQLite storage pattern.
|
|
143
|
+
- [jDocMunch-MCP](https://github.com/jgravelle/jdocmunch-mcp) by [J. Gravelle](https://www.linkedin.com/in/j-gravelle-2778223/): the documentation module's section-first retrieval approach, stable section IDs, and byte-offset addressing.
|
|
144
|
+
- [jDataMunch-MCP](https://github.com/jgravelle/jdatamunch-mcp) by [J. Gravelle](https://www.linkedin.com/in/j-gravelle-2778223/): the data module's column profiling, streaming parsers, and server-side aggregation approach.
|
|
145
|
+
- [code-review-graph](https://github.com/tirth8205/code-review-graph) by [Tirth Kanani](https://github.com/tirth8205): community detection, execution flow tracing, refactoring tools, and multi-platform auto-detection patterns.
|
|
146
|
+
- [lean-ctx](https://github.com/yvgude/lean-ctx) by [Yves Gugger](https://github.com/yvgude): file read caching, multiple read modes, and context budget governance concepts.
|
|
745
147
|
|
|
746
|
-
|
|
747
|
-
|-----------|------|---------|-------------|
|
|
748
|
-
| `dataset` | string | required | Dataset ID |
|
|
749
|
-
| `query` | string | required | Search keyword |
|
|
750
|
-
| `projectPath` | string | cwd | Project root path |
|
|
148
|
+
### Contributors
|
|
751
149
|
|
|
752
|
-
|
|
150
|
+
- [Alessandro Franceschi](https://www.linkedin.com/in/alessandrofranceschi/) — Claude Code and Codex integration, Elixir/Phoenix language and framework support.
|
|
151
|
+
- [Mauro Argo](https://www.linkedin.com/in/argomauro/) — original idea for the architecture layer analysis feature.
|
|
753
152
|
|
|
754
|
-
|
|
153
|
+
## How It Compares
|
|
755
154
|
|
|
756
|
-
|
|
757
|
-
|-----------|------|---------|-------------|
|
|
758
|
-
| `left` | string | required | Left dataset ID |
|
|
759
|
-
| `right` | string | required | Right dataset ID |
|
|
760
|
-
| `leftColumn` | string | required | Join column from left dataset |
|
|
761
|
-
| `rightColumn` | string | required | Join column from right dataset |
|
|
762
|
-
| `type` | string | `inner` | Join type: `inner`, `left`, `right` |
|
|
763
|
-
| `columns` | string[] | all | Column projection (prefix with dataset ID) |
|
|
764
|
-
| `limit` | number | 100 | Max rows (hard cap: 500) |
|
|
765
|
-
| `projectPath` | string | cwd | Project root path |
|
|
155
|
+
KiroGraph combines capabilities from 7 separate tools into one integrated MCP server:
|
|
766
156
|
|
|
767
|
-
|
|
157
|
+
| Capability | Inspired by | What KiroGraph adds |
|
|
158
|
+
|-----------|-------------|---------------------|
|
|
159
|
+
| Code graph | [CodeGraph](https://github.com/colbymchenry/codegraph) | Architecture metrics, community detection, execution flows |
|
|
160
|
+
| Memory | [cavemem](https://github.com/JuliusBrussee/cavemem) | Symbol-linked observations, 7 semantic engines |
|
|
161
|
+
| Docs | [jDocMunch-MCP](https://github.com/jgravelle/jdocmunch-mcp) | Code ↔ docs cross-references |
|
|
162
|
+
| Data | [jDataMunch-MCP](https://github.com/jgravelle/jdatamunch-mcp) | Unified with code graph in one server |
|
|
163
|
+
| Shell compression | [rtk](https://github.com/rtk-ai/rtk) | Integrated as MCP tool, no separate binary |
|
|
164
|
+
| Prose compression | [caveman](https://github.com/JuliusBrussee/caveman) | Multi-level (lite/full/ultra) via steering |
|
|
165
|
+
| Context layer | [lean-ctx](https://github.com/yvgude/lean-ctx) | File caching, read modes, budget governance |
|
|
768
166
|
|
|
769
|
-
|
|
167
|
+
See the [full comparison](docs/guide/comparison.md) for a detailed feature matrix against CodeGraph, code-review-graph, jCodeMunch, and others.
|
|
770
168
|
|
|
771
|
-
|
|
772
|
-
|-----------|------|---------|-------------|
|
|
773
|
-
| `dataset` | string | required | Dataset ID |
|
|
774
|
-
| `threshold` | number | 0.3 | Min absolute correlation to include |
|
|
775
|
-
| `projectPath` | string | cwd | Project root path |
|
|
169
|
+
## Star History
|
|
776
170
|
|
|
777
|
-
|
|
171
|
+
<a href="https://www.star-history.com/?repos=davide-desio-eleva%2Fkirograph&type=date&legend=top-left"><picture><source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/chart?repos=davide-desio-eleva/kirograph&type=date&theme=dark&legend=top-left" /><source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/chart?repos=davide-desio-eleva/kirograph&type=date&legend=top-left" /><img alt="Star History Chart" src="https://api.star-history.com/chart?repos=davide-desio-eleva/kirograph&type=date&legend=top-left" /></picture></a>
|
|
778
172
|
|
|
779
|
-
|
|
173
|
+
## License
|
|
780
174
|
|
|
781
|
-
|
|
782
|
-
|-----------|------|---------|-------------|
|
|
783
|
-
| `dataset` | string | required | Dataset ID |
|
|
784
|
-
| `projectPath` | string | cwd | Project root path |
|
|
785
|
-
|
|
786
|
-
## CLI Reference
|
|
787
|
-
|
|
788
|
-
### Setup
|
|
789
|
-
|
|
790
|
-
```bash
|
|
791
|
-
kirograph install # Wire up MCP + hooks + steering in .kiro/
|
|
792
|
-
kirograph init [path] # Initialize .kirograph/ in a project
|
|
793
|
-
kirograph init --index # Initialize and index immediately
|
|
794
|
-
kirograph uninit [path] # Prompts to remove integration files and .kirograph/ data
|
|
795
|
-
kirograph uninit --force # Remove everything without confirmation
|
|
796
|
-
```
|
|
797
|
-
|
|
798
|
-
### Indexing
|
|
799
|
-
|
|
800
|
-
```bash
|
|
801
|
-
kirograph index [path] # Full re-index of the project
|
|
802
|
-
kirograph index --force # Force re-index all files (ignore hash cache)
|
|
803
|
-
kirograph sync [path] # Incremental sync of changed files
|
|
804
|
-
kirograph sync --files a.ts b.ts # Sync specific files only
|
|
805
|
-
kirograph sync-if-dirty [path] # Sync only if a dirty marker is present
|
|
806
|
-
kirograph mark-dirty [path] # Write a dirty marker for deferred sync
|
|
807
|
-
```
|
|
808
|
-
|
|
809
|
-
### Status & Maintenance
|
|
810
|
-
|
|
811
|
-
```bash
|
|
812
|
-
kirograph status [path] # Show index stats (files, symbols, edges, frameworks)
|
|
813
|
-
kirograph unlock [path] # Force-release a stale lock file
|
|
814
|
-
```
|
|
815
|
-
|
|
816
|
-
### Search & Exploration
|
|
817
|
-
|
|
818
|
-
```bash
|
|
819
|
-
kirograph query <term> # Search symbols by name
|
|
820
|
-
kirograph query <term> --kind class # Filter by kind
|
|
821
|
-
kirograph query <term> --limit 20 # Limit results (default: 10)
|
|
822
|
-
```
|
|
823
|
-
|
|
824
|
-
Supported kinds: `function`, `method`, `class`, `struct`, `interface`, `trait`, `protocol`, `enum`, `type_alias`, `property`, `field`, `variable`, `constant`, `enum_member`, `parameter`, `import`, `export`, `route`, `component`, `file`, `module`, `namespace`
|
|
825
|
-
|
|
826
|
-
### File Structure
|
|
827
|
-
|
|
828
|
-
```bash
|
|
829
|
-
kirograph files [path] # Show indexed file tree
|
|
830
|
-
kirograph files --format flat # Flat list of all files
|
|
831
|
-
kirograph files --format grouped # Files grouped by language
|
|
832
|
-
kirograph files --filter src/components # Filter by directory prefix
|
|
833
|
-
kirograph files --pattern "**/*.test.ts" # Filter by glob pattern
|
|
834
|
-
kirograph files --max-depth 2 # Limit tree depth
|
|
835
|
-
kirograph files --no-metadata # Hide language/symbol counts
|
|
836
|
-
kirograph files --json # Output as JSON
|
|
837
|
-
```
|
|
838
|
-
|
|
839
|
-
### Context Building
|
|
840
|
-
|
|
841
|
-
```bash
|
|
842
|
-
kirograph context "fix checkout bug"
|
|
843
|
-
kirograph context "add user authentication" --format json
|
|
844
|
-
kirograph context "refactor payment service" --max-nodes 30
|
|
845
|
-
kirograph context "validate token" --no-code
|
|
846
|
-
```
|
|
847
|
-
|
|
848
|
-
Extracts symbol tokens from the task description (CamelCase, snake_case, SCREAMING_SNAKE, dot.notation), finds relevant entry points, expands through the graph, and outputs structured markdown or JSON.
|
|
849
|
-
|
|
850
|
-
### Affected Tests
|
|
851
|
-
|
|
852
|
-
Find test files that depend on changed source files, useful in CI or pre-commit hooks.
|
|
853
|
-
|
|
854
|
-
```bash
|
|
855
|
-
kirograph affected src/utils.ts src/api.ts # Pass files as arguments
|
|
856
|
-
git diff --name-only | kirograph affected --stdin # Pipe from git diff
|
|
857
|
-
kirograph affected --stdin --json < changed.txt # JSON output
|
|
858
|
-
kirograph affected src/auth.ts --filter "e2e/**" # Custom test file glob
|
|
859
|
-
kirograph affected src/lib.ts --depth 3 --quiet # Paths only, shallow traversal
|
|
860
|
-
```
|
|
861
|
-
|
|
862
|
-
| Option | Description | Default |
|
|
863
|
-
|--------|-------------|---------|
|
|
864
|
-
| `--stdin` | Read file list from stdin, one per line | false |
|
|
865
|
-
| `-d, --depth <n>` | Max dependency traversal depth | 5 |
|
|
866
|
-
| `-f, --filter <glob>` | Custom glob to identify test files | auto-detect |
|
|
867
|
-
| `-j, --json` | Output as JSON | false |
|
|
868
|
-
| `-q, --quiet` | Output file paths only | false |
|
|
869
|
-
| `-p, --path <path>` | Project path | cwd |
|
|
870
|
-
|
|
871
|
-
Example CI integration:
|
|
872
|
-
|
|
873
|
-
```bash
|
|
874
|
-
#!/usr/bin/env bash
|
|
875
|
-
AFFECTED=$(git diff --name-only HEAD | kirograph affected --stdin --quiet)
|
|
876
|
-
if [ -n "$AFFECTED" ]; then
|
|
877
|
-
npx vitest run $AFFECTED
|
|
878
|
-
fi
|
|
879
|
-
```
|
|
880
|
-
|
|
881
|
-
### 🪨 Caveman Mode 🪨
|
|
882
|
-
|
|
883
|
-

|
|
884
|
-
|
|
885
|
-
Caveman mode compresses the agent's communication style, cutting token usage on responses without affecting tool calls or code output. Inspired by [caveman](https://github.com/JuliusBrussee/caveman) 🪨 by [JuliusBrussee](https://github.com/JuliusBrussee).
|
|
886
|
-
|
|
887
|
-
**Why it's useful:** KiroGraph's graph tools return compact, structured data. The bottleneck in long coding sessions isn't the tool calls; it is the verbose prose the agent wraps around them. Caveman mode strips that overhead so you get the signal without the filler. The rules are injected at session start via the steering file (IDE) and the inline agent prompt (kiro-cli), so they're always in context with no extra tool calls.
|
|
888
|
-
|
|
889
|
-
Four levels:
|
|
890
|
-
|
|
891
|
-
| Mode | Style |
|
|
892
|
-
|------|-------|
|
|
893
|
-
| `off` | Normal responses *(default)* |
|
|
894
|
-
| `lite` | Compact, no filler, full sentences |
|
|
895
|
-
| `full` | Fragments, no articles, short synonyms |
|
|
896
|
-
| `ultra` | Maximum compression, abbreviations, `→` for causality |
|
|
897
|
-
|
|
898
|
-
```bash
|
|
899
|
-
kirograph caveman lite # compact, still readable
|
|
900
|
-
kirograph caveman full # fragments, no articles
|
|
901
|
-
kirograph caveman ultra # maximum compression
|
|
902
|
-
kirograph caveman off # back to normal
|
|
903
|
-
kirograph caveman # show current mode
|
|
904
|
-
```
|
|
905
|
-
|
|
906
|
-
Set during `kirograph install` (interactive arrow-key menu) or any time after. Takes effect on the next agent session.
|
|
907
|
-
|
|
908
|
-
Caveman mode never touches code blocks, file paths, URLs, or technical terms, only prose.
|
|
909
|
-
|
|
910
|
-
**Auto-clarity exceptions:** the agent temporarily reverts to normal prose for security warnings, confirmations of irreversible actions (delete, overwrite, force-push), and multi-step sequences where fragment order could cause misunderstanding. Compressed style resumes immediately after.
|
|
911
|
-
|
|
912
|
-
### Shell Compression (`kirograph_exec`)
|
|
913
|
-
|
|
914
|
-

|
|
915
|
-
|
|
916
|
-
KiroGraph includes a built-in shell compression engine inspired by [rtk](https://github.com/rtk-ai/rtk). The `kirograph_exec` MCP tool runs shell commands and returns token-optimized output, saving 60-90% of tokens on verbose commands like git, test runners, linters, and build tools.
|
|
917
|
-
|
|
918
|
-
**Why it's useful:** LLM context is expensive. A raw `git status` might be 2,000 tokens; compressed it's 200. A passing test suite might be 25,000 tokens of noise; compressed it's a single "PASSED: 42/42 tests" line. The compression engine knows how to extract the signal from each command family.
|
|
919
|
-
|
|
920
|
-
Supported command families:
|
|
921
|
-
|
|
922
|
-
| Family | Commands | Typical savings |
|
|
923
|
-
|--------|----------|----------------|
|
|
924
|
-
| Git | status, log, diff, push, pull, commit, add, fetch, branch, stash | 75-96% |
|
|
925
|
-
| GitHub CLI | gh pr list/view, gh issue list, gh run list/view | 60-80% |
|
|
926
|
-
| Test runners | jest, vitest, pytest, cargo test, go test, rspec, minitest, playwright | 80-90% |
|
|
927
|
-
| Linters/build | eslint, tsc, ruff, clippy, cargo build, prettier, biome, golangci-lint, rubocop, next build | 70-85% |
|
|
928
|
-
| File listings | ls, find, tree | 60-80% |
|
|
929
|
-
| Search | grep, rg/ripgrep (grouped by file) | 60-80% |
|
|
930
|
-
| Diff | diff file1 file2 (condensed context) | 50-70% |
|
|
931
|
-
| Docker/k8s | docker ps, images, logs, compose ps, kubectl pods, logs, services | 70-80% |
|
|
932
|
-
| Package managers | npm/pnpm install/list, pip list/install/outdated, bundle install/list, prisma generate | 75-92% |
|
|
933
|
-
| AWS | sts, ec2, lambda, logs, cloudformation, dynamodb, iam, s3, ecs, sqs, sns | 60-88% |
|
|
934
|
-
| Network | curl (strip progress/headers), wget (strip progress bars) | 50-70% |
|
|
935
|
-
|
|
936
|
-
**Supported commands (full list):**
|
|
937
|
-
|
|
938
|
-
```
|
|
939
|
-
# Git
|
|
940
|
-
kirograph exec git status # Compact status
|
|
941
|
-
kirograph exec git log -n 10 # One-line commits
|
|
942
|
-
kirograph exec git diff # Condensed diff
|
|
943
|
-
kirograph exec git add . # → "ok"
|
|
944
|
-
kirograph exec git commit -m "msg" # → "ok abc1234"
|
|
945
|
-
kirograph exec git push # → "ok main → origin/main"
|
|
946
|
-
kirograph exec git pull # → "ok 3 files +10 -2"
|
|
947
|
-
|
|
948
|
-
# GitHub CLI
|
|
949
|
-
kirograph exec gh pr list # Compact PR listing
|
|
950
|
-
kirograph exec gh pr view 42 # PR details + checks
|
|
951
|
-
kirograph exec gh issue list # Compact issue listing
|
|
952
|
-
kirograph exec gh run list # Workflow run status
|
|
953
|
-
|
|
954
|
-
# Test Runners
|
|
955
|
-
kirograph exec jest # Failures only
|
|
956
|
-
kirograph exec vitest run # Failures only
|
|
957
|
-
kirograph exec playwright test # E2E results (failures only)
|
|
958
|
-
kirograph exec pytest # Python tests (-90%)
|
|
959
|
-
kirograph exec go test ./... # Go tests (-90%)
|
|
960
|
-
kirograph exec cargo test # Cargo tests (-90%)
|
|
961
|
-
kirograph exec rake test # Ruby minitest (-90%)
|
|
962
|
-
kirograph exec rspec # RSpec tests (-60%+)
|
|
963
|
-
|
|
964
|
-
# Build & Lint
|
|
965
|
-
kirograph exec eslint . # Grouped by rule/file
|
|
966
|
-
kirograph exec tsc --noEmit # TypeScript errors grouped by file
|
|
967
|
-
kirograph exec next build # Next.js build compact
|
|
968
|
-
kirograph exec prettier --check . # Files needing formatting
|
|
969
|
-
kirograph exec cargo build # Cargo build (-80%)
|
|
970
|
-
kirograph exec cargo clippy # Cargo clippy (-80%)
|
|
971
|
-
kirograph exec ruff check # Python linting (-80%)
|
|
972
|
-
kirograph exec golangci-lint run # Go linting (-85%)
|
|
973
|
-
kirograph exec rubocop # Ruby linting (-60%+)
|
|
974
|
-
kirograph exec biome check . # Biome linting
|
|
975
|
-
|
|
976
|
-
# Files & Search
|
|
977
|
-
kirograph exec ls -la src/ # Structured directory listing
|
|
978
|
-
kirograph exec find . -name "*.ts" # Grouped by directory
|
|
979
|
-
kirograph exec tree # Truncated with summary
|
|
980
|
-
kirograph exec grep -r "pattern" . # Grouped search results
|
|
981
|
-
kirograph exec rg "pattern" # Grouped search results
|
|
982
|
-
kirograph exec diff file1 file2 # Condensed diff
|
|
983
|
-
|
|
984
|
-
# Package Managers
|
|
985
|
-
kirograph exec npm install # → "ok +5 packages"
|
|
986
|
-
kirograph exec npm list # Compact dependency tree
|
|
987
|
-
kirograph exec pip list # Python packages
|
|
988
|
-
kirograph exec pip install -r req.txt # Strip progress bars
|
|
989
|
-
kirograph exec bundle install # Strip "Using" lines
|
|
990
|
-
kirograph exec prisma generate # Strip ASCII art
|
|
991
|
-
|
|
992
|
-
# AWS
|
|
993
|
-
kirograph exec aws sts get-caller-identity # One-line identity
|
|
994
|
-
kirograph exec aws ec2 describe-instances # Compact instance list
|
|
995
|
-
kirograph exec aws lambda list-functions # Name/runtime/memory
|
|
996
|
-
kirograph exec aws logs get-log-events ... # Timestamped messages only
|
|
997
|
-
kirograph exec aws cloudformation describe-stack-events ... # Failures first
|
|
998
|
-
kirograph exec aws dynamodb scan ... # Unwraps type annotations
|
|
999
|
-
kirograph exec aws iam list-roles # Strips policy documents
|
|
1000
|
-
kirograph exec aws s3 ls s3://bucket # Truncated listing
|
|
1001
|
-
|
|
1002
|
-
# Containers
|
|
1003
|
-
kirograph exec docker ps # Compact container list
|
|
1004
|
-
kirograph exec docker images # Compact image list
|
|
1005
|
-
kirograph exec docker logs container # Deduplicated logs
|
|
1006
|
-
kirograph exec docker compose ps # Compose services
|
|
1007
|
-
kirograph exec kubectl get pods # Compact pod list
|
|
1008
|
-
kirograph exec kubectl logs pod # Deduplicated logs
|
|
1009
|
-
kirograph exec kubectl get svc # Compact service list
|
|
1010
|
-
|
|
1011
|
-
# Network
|
|
1012
|
-
kirograph exec curl https://api.example.com/data # Strip progress/headers
|
|
1013
|
-
kirograph exec wget https://example.com/file.zip # Strip progress bars
|
|
1014
|
-
```
|
|
1015
|
-
|
|
1016
|
-
Three compression levels:
|
|
1017
|
-
|
|
1018
|
-
| Level | Style |
|
|
1019
|
-
|-------|-------|
|
|
1020
|
-
| `normal` | Balanced: removes noise, keeps structure *(default)* |
|
|
1021
|
-
| `aggressive` | More compact: groups by category, limits output |
|
|
1022
|
-
| `ultra` | Maximum compression: counts and summaries only |
|
|
1023
|
-
|
|
1024
|
-
```bash
|
|
1025
|
-
kirograph compression normal # balanced (default)
|
|
1026
|
-
kirograph compression aggressive # more compact
|
|
1027
|
-
kirograph compression ultra # maximum compression
|
|
1028
|
-
kirograph compression off # disable hook (tool still available)
|
|
1029
|
-
kirograph compression # show current level
|
|
1030
|
-
```
|
|
1031
|
-
|
|
1032
|
-
Set during `kirograph install` (interactive arrow-key menu) or any time after. When set to anything other than `off`, a `preToolUse` hook reminds the agent to use `kirograph_exec` for supported commands. The configured level is used as the default when the agent doesn't specify one explicitly.
|
|
1033
|
-
|
|
1034
|
-
**Error preservation:** Failed commands always show full diagnostic output regardless of compression level. The engine detects error patterns and preserves detail when it matters.
|
|
1035
|
-
|
|
1036
|
-
**Token analytics:**
|
|
1037
|
-
|
|
1038
|
-
```bash
|
|
1039
|
-
kirograph gain # summary stats
|
|
1040
|
-
kirograph gain --graph # ASCII graph (last 30 days)
|
|
1041
|
-
kirograph gain --history # recent command history
|
|
1042
|
-
kirograph gain --daily # day-by-day breakdown
|
|
1043
|
-
kirograph gain --json # JSON export
|
|
1044
|
-
```
|
|
1045
|
-
|
|
1046
|
-
The `kirograph_gain` MCP tool exposes the same stats to the agent.
|
|
1047
|
-
|
|
1048
|
-
### Savings Heuristics
|
|
1049
|
-
|
|
1050
|
-
`kirograph gain` tracks two types of savings: compression (measured exactly) and graph tools (estimated via heuristics). For graph tools, the system estimates what the agent *would have spent* doing the same work without KiroGraph, based on typical agent behavior:
|
|
1051
|
-
|
|
1052
|
-
| Tool | What the agent would do manually | Estimated naive cost |
|
|
1053
|
-
|------|----------------------------------|---------------------|
|
|
1054
|
-
| `kirograph_context` | Read 5-10 files to orient on a task | ~7,500-15,000 tokens |
|
|
1055
|
-
| `kirograph_search` | Run grep + read top matches | ~3,300 tokens |
|
|
1056
|
-
| `kirograph_callers` | Grep for symbol + read each calling file | ~8,300 tokens |
|
|
1057
|
-
| `kirograph_callees` | Read function body + grep for each call | ~3,900 tokens |
|
|
1058
|
-
| `kirograph_impact` | Recursive grep + read per depth level | ~6,900 × depth |
|
|
1059
|
-
| `kirograph_node` | Read the full file containing the symbol | ~1,500 tokens |
|
|
1060
|
-
| `kirograph_files` | Run `find` or `ls -R` | ~2,000 tokens |
|
|
1061
|
-
| `kirograph_path` | Trace connections manually (multiple grep + read) | ~7,700 tokens |
|
|
1062
|
-
| `kirograph_type_hierarchy` | Grep for extends/implements + read each file | ~5,400 tokens |
|
|
1063
|
-
| `kirograph_dead_code` | Not feasible manually (read every file) | 5× output, min 15,000 |
|
|
1064
|
-
| `kirograph_hotspots` | Not feasible manually (count edges for every symbol) | 5× output, min 15,000 |
|
|
1065
|
-
| `kirograph_architecture` | Not feasible manually | 4× output, min 7,500 |
|
|
1066
|
-
| `kirograph_mem_search` | Re-read 3-5 files to recall past decisions + grep | ~5,800 tokens |
|
|
1067
|
-
| `kirograph_mem_timeline` | Ask user or re-read session history | ~2,300 tokens |
|
|
1068
|
-
| `kirograph_data_list` | Run ls/find on data files + inspect each | ~3,500 tokens |
|
|
1069
|
-
| `kirograph_data_describe` | Read the full data file to understand schema | ~45,000 tokens |
|
|
1070
|
-
| `kirograph_data_query` | Read the full file and scan for matching rows | ~45,000 tokens |
|
|
1071
|
-
| `kirograph_data_aggregate` | Read the full file + reason about aggregation | ~52,500 tokens |
|
|
1072
|
-
| `kirograph_data_search` | Read file headers + grep for values | ~9,100 tokens |
|
|
1073
|
-
|
|
1074
|
-
Constants used: 1,500 tokens per average source file (~200 lines), 800 tokens per grep result set, 2,000 tokens per directory listing. These are conservative estimates; in practice agents often read more files, retry failed searches, and explore dead ends.
|
|
1075
|
-
|
|
1076
|
-
**Coexistence with Caveman Mode:** Compression and caveman mode are complementary, they compress different things. Caveman mode compresses the agent's *prose responses* (the text it writes around tool results); it never touches code or tool output. Shell compression compresses *shell command output* (the raw data coming back from shell commands); it never touches how the agent communicates. They stack: with both enabled, shell commands return 60-90% fewer tokens *and* the agent's explanations around those results are also shorter. Pick both independently during `kirograph install`. The "ultra + ultra" combo gives maximum token savings on both fronts.
|
|
1077
|
-
|
|
1078
|
-
### Architecture Analysis *(requires `enableArchitecture: true`)*
|
|
1079
|
-
|
|
1080
|
-
Visualize the detected package graph, architectural layers, and package dependencies.
|
|
1081
|
-
|
|
1082
|
-
```bash
|
|
1083
|
-
kirograph architecture [path] # Show packages + layers + all deps
|
|
1084
|
-
kirograph architecture --packages # Show packages section only
|
|
1085
|
-
kirograph architecture --layers # Show layers section only
|
|
1086
|
-
kirograph architecture --format json # JSON output
|
|
1087
|
-
```
|
|
1088
|
-
|
|
1089
|
-
**Output includes:**
|
|
1090
|
-
- Each detected package with its source (`manifest` or `directory`), language, version, and declared external deps
|
|
1091
|
-
- Package-to-package dependency edges with import counts
|
|
1092
|
-
- Detected layers (`api`, `service`, `data`, `ui`, `shared`) with file counts
|
|
1093
|
-
- Layer-to-layer dependency edges
|
|
1094
|
-
|
|
1095
|
-
### Package Inspection *(requires `enableArchitecture: true`)*
|
|
1096
|
-
|
|
1097
|
-
Drill into a single package: metadata, coupling metrics, dependencies, and files.
|
|
1098
|
-
|
|
1099
|
-
```bash
|
|
1100
|
-
kirograph package <name> # Inspect a package by name or path fragment
|
|
1101
|
-
kirograph package auth # Partial match accepted (e.g. matches "pkg:npm:src/auth")
|
|
1102
|
-
kirograph package src/auth --no-files # Omit file list
|
|
1103
|
-
kirograph package auth --format json # JSON output
|
|
1104
|
-
```
|
|
1105
|
-
|
|
1106
|
-
Shows package source (manifest or directory), language, version, manifest path, coupling metrics (Ca/Ce/instability), outgoing dependencies, incoming dependents, declared external deps, and the full list of files belonging to the package.
|
|
1107
|
-
|
|
1108
|
-
### Coupling Metrics *(requires `enableArchitecture: true`)*
|
|
1109
|
-
|
|
1110
|
-
Inspect coupling health across your package graph.
|
|
1111
|
-
|
|
1112
|
-
```bash
|
|
1113
|
-
kirograph coupling [path] # All packages, sorted by instability
|
|
1114
|
-
kirograph coupling --sort ca # Sort by afferent coupling (most depended-on first)
|
|
1115
|
-
kirograph coupling --sort ce # Sort by efferent coupling (most dependent first)
|
|
1116
|
-
kirograph coupling --sort name # Sort alphabetically
|
|
1117
|
-
kirograph coupling --package auth # Detail view for a single package
|
|
1118
|
-
kirograph coupling --format json # JSON output
|
|
1119
|
-
```
|
|
1120
|
-
|
|
1121
|
-
The table shows each package with:
|
|
1122
|
-
- **Ca**: afferent coupling: how many packages depend on this one (higher = more stable)
|
|
1123
|
-
- **Ce**: efferent coupling: how many packages this one depends on (higher = more unstable)
|
|
1124
|
-
- **Instability** (`Ce / (Ca + Ce)`), rendered as a color-coded bar: green (stable) → yellow (neutral) → red (unstable)
|
|
1125
|
-
|
|
1126
|
-
The `--package` detail view shows who depends on this package and what it depends on, with import counts for each relationship.
|
|
1127
|
-
|
|
1128
|
-
### Hotspots
|
|
1129
|
-
|
|
1130
|
-
Find the most-connected symbols in the codebase by total edge degree (incoming + outgoing, excluding structural `contains` edges). Useful for identifying core abstractions, load-bearing code, or high blast-radius change points.
|
|
1131
|
-
|
|
1132
|
-
```bash
|
|
1133
|
-
kirograph hotspots [path] # Top 20 most-connected symbols
|
|
1134
|
-
kirograph hotspots --limit 10 # Limit results
|
|
1135
|
-
kirograph hotspots --format json # JSON output
|
|
1136
|
-
```
|
|
1137
|
-
|
|
1138
|
-
Output shows each symbol with an inline bar chart, total degree, and in/out breakdown.
|
|
1139
|
-
|
|
1140
|
-
### Surprising Connections
|
|
1141
|
-
|
|
1142
|
-
Find non-obvious cross-file connections: direct edges (`calls`, `references`, etc.) between symbols in structurally distant parts of the codebase. High-score pairs indicate unexpected coupling worth investigating.
|
|
1143
|
-
|
|
1144
|
-
```bash
|
|
1145
|
-
kirograph surprising [path] # Top 20 surprising connections
|
|
1146
|
-
kirograph surprising --limit 10 # Limit results
|
|
1147
|
-
kirograph surprising --format json # JSON output
|
|
1148
|
-
```
|
|
1149
|
-
|
|
1150
|
-
Score = path distance between files × edge-kind weight (`calls=1.0`, `references=0.8`, `type_of=0.7`, etc.).
|
|
1151
|
-
|
|
1152
|
-
### Snapshots & Diff
|
|
1153
|
-
|
|
1154
|
-
Save lightweight graph snapshots and compare them to track structural changes over time, useful before/after refactors, or in CI to audit what a PR added or removed.
|
|
1155
|
-
|
|
1156
|
-
```bash
|
|
1157
|
-
kirograph snapshot save [label] # Save current graph state with optional label
|
|
1158
|
-
kirograph snapshot save pre-refactor # Named snapshot
|
|
1159
|
-
kirograph snapshot list # List all saved snapshots
|
|
1160
|
-
kirograph snapshot diff # Diff current graph vs latest snapshot
|
|
1161
|
-
kirograph snapshot diff pre-refactor # Diff current graph vs named snapshot
|
|
1162
|
-
kirograph snapshot diff --format full # Show full added/removed symbol lists
|
|
1163
|
-
kirograph snapshot diff --format json # JSON output
|
|
1164
|
-
```
|
|
1165
|
-
|
|
1166
|
-
Snapshots are stored in `.kirograph/snapshots/` as JSON and include all node IDs and edge tuples. The diff is computed as a set operation, O(n) regardless of codebase size.
|
|
1167
|
-
|
|
1168
|
-
The `kirograph_diff` MCP tool exposes the same capability to the agent: compare the current graph against the latest (or a named) snapshot without leaving the conversation.
|
|
1169
|
-
|
|
1170
|
-
### Dead Code
|
|
1171
|
-
|
|
1172
|
-
Find unexported symbols with zero incoming references, candidates for removal.
|
|
1173
|
-
|
|
1174
|
-
```bash
|
|
1175
|
-
kirograph dead-code [path] # List dead code grouped by file
|
|
1176
|
-
kirograph dead-code --limit 20 # Limit results
|
|
1177
|
-
kirograph dead-code --format json # JSON output
|
|
1178
|
-
```
|
|
1179
|
-
|
|
1180
|
-
Only unexported symbols are considered, since exported symbols may be used by consumers outside the indexed project.
|
|
1181
|
-
|
|
1182
|
-
### Path
|
|
1183
|
-
|
|
1184
|
-
Find the shortest connection between any two symbols, traversing all edge types in both directions.
|
|
1185
|
-
|
|
1186
|
-
```bash
|
|
1187
|
-
kirograph path <from> <to> # Find path between two symbols
|
|
1188
|
-
kirograph path LoginController Pool # Example: how are these connected?
|
|
1189
|
-
kirograph path --format json # JSON output
|
|
1190
|
-
```
|
|
1191
|
-
|
|
1192
|
-
The command resolves symbol names using the same fuzzy search as `kirograph query`, preferring real symbol kinds (class, function, method…) over import/file nodes. The result shows each hop with file and line.
|
|
1193
|
-
|
|
1194
|
-
### Memory *(requires `enableMemory: true`)*
|
|
1195
|
-
|
|
1196
|
-
Persistent cross-session observations — search, store, and manage project memory from the CLI.
|
|
1197
|
-
|
|
1198
|
-
```bash
|
|
1199
|
-
# Search (mirrors kirograph_mem_search)
|
|
1200
|
-
kirograph mem search "payment retry" # hybrid FTS + vector search
|
|
1201
|
-
kirograph mem search "auth bug" --kind error # filter by kind
|
|
1202
|
-
kirograph mem search "refactor" --limit 5 # limit results
|
|
1203
|
-
kirograph mem search "token" --format json # JSON output
|
|
1204
|
-
|
|
1205
|
-
# Store (mirrors kirograph_mem_store)
|
|
1206
|
-
kirograph mem store "decided to use idempotency keys for payments"
|
|
1207
|
-
kirograph mem store "auth bug: token refresh missing" --kind error
|
|
1208
|
-
kirograph mem store --kind decision < decision.txt # pipe from stdin
|
|
1209
|
-
|
|
1210
|
-
# Timeline (mirrors kirograph_mem_timeline)
|
|
1211
|
-
kirograph mem timeline # last 5 sessions
|
|
1212
|
-
kirograph mem timeline --limit 10 # more sessions
|
|
1213
|
-
kirograph mem timeline --session <id> # specific session
|
|
1214
|
-
kirograph mem timeline --format json
|
|
1215
|
-
|
|
1216
|
-
# Status (mirrors kirograph_mem_status)
|
|
1217
|
-
kirograph mem status # health dashboard
|
|
1218
|
-
|
|
1219
|
-
# Maintenance
|
|
1220
|
-
kirograph mem prune --older-than 90d # cleanup old observations
|
|
1221
|
-
kirograph mem export --format jsonl # machine-readable export (importable)
|
|
1222
|
-
kirograph mem export --format md # human-readable export
|
|
1223
|
-
kirograph mem import backup.jsonl # restore from backup (deduplicates)
|
|
1224
|
-
kirograph mem reembed # re-embed after model change
|
|
1225
|
-
kirograph mem reembed --batch 50 # control batch size
|
|
1226
|
-
kirograph mem lint # find stale links, model mismatch
|
|
1227
|
-
kirograph mem lint --fix # auto-repair issues
|
|
1228
|
-
```
|
|
1229
|
-
|
|
1230
|
-
**How observations are stored:** Text → strip `<private>` blocks → caveman compress (if enabled) → SHA-256 dedup check → store → detect symbol identifiers → link to graph → embed. Zero LLM tokens.
|
|
1231
|
-
|
|
1232
|
-
**How observations surface:** `kirograph_context` and `kirograph_impact` automatically include relevant memory observations (max 3, above relevance threshold 0.3) when memory is enabled. No extra tool call needed.
|
|
1233
|
-
|
|
1234
|
-
### Documentation *(requires `enableDocs: true`)*
|
|
1235
|
-
|
|
1236
|
-
Section-level documentation navigation — search, browse, and retrieve doc sections from the CLI.
|
|
1237
|
-
|
|
1238
|
-
```bash
|
|
1239
|
-
# Table of contents
|
|
1240
|
-
kirograph docs toc # whole project
|
|
1241
|
-
kirograph docs toc README.md # single file
|
|
1242
|
-
kirograph docs toc README.md --tree # nested tree structure
|
|
1243
|
-
kirograph docs toc --json # JSON output
|
|
1244
|
-
|
|
1245
|
-
# Search (mirrors kirograph_docs_search)
|
|
1246
|
-
kirograph docs search "authentication"
|
|
1247
|
-
kirograph docs search "config" --file docs/guide.md
|
|
1248
|
-
kirograph docs search "install" --limit 5
|
|
1249
|
-
|
|
1250
|
-
# Retrieve a section (mirrors kirograph_docs_section)
|
|
1251
|
-
kirograph docs section "README.md::installation#1"
|
|
1252
|
-
kirograph docs section "README.md::installation#1" --context
|
|
1253
|
-
|
|
1254
|
-
# Outline (mirrors kirograph_docs_outline)
|
|
1255
|
-
kirograph docs outline docs/api.md
|
|
1256
|
-
|
|
1257
|
-
# Cross-references (mirrors kirograph_docs_refs)
|
|
1258
|
-
kirograph docs refs "docs/auth.md::oauth/token-refresh#2"
|
|
1259
|
-
|
|
1260
|
-
# Maintenance
|
|
1261
|
-
kirograph docs reindex # force full re-index
|
|
1262
|
-
kirograph docs lint # health checks (broken refs, stale sections)
|
|
1263
|
-
kirograph docs reembed # re-embed with current model
|
|
1264
|
-
```
|
|
1265
|
-
|
|
1266
|
-
**How sections are identified:** Each section gets a stable ID in the format `{file_path}::{ancestor-chain/slug}#{level}`. IDs remain stable across re-indexing as long as the file path, heading text, heading level, and parent chain don't change.
|
|
1267
|
-
|
|
1268
|
-
**How code linking works:** When `docsLinkCode: true` (default), the indexer scans section content for backtick references (`` `functionName` ``), CamelCase identifiers, and snake_case patterns, then resolves them against the code graph. Matches are stored as `doc_code_refs` using `qualified_name` (stable across reindex).
|
|
1269
|
-
|
|
1270
|
-
### Data *(requires `enableData: true`)*
|
|
1271
|
-
|
|
1272
|
-
Tabular data navigation — list, describe, query, aggregate, search, join, correlate, and inspect data quality from the CLI.
|
|
1273
|
-
|
|
1274
|
-
```bash
|
|
1275
|
-
# List datasets
|
|
1276
|
-
kirograph data list # all indexed datasets
|
|
1277
|
-
kirograph data list --json # JSON output
|
|
1278
|
-
|
|
1279
|
-
# Describe schema
|
|
1280
|
-
kirograph data describe tests-fixtures-users # full schema + column profiles + validation rules + sample hints
|
|
1281
|
-
kirograph data describe tests-fixtures-users --column email # deep dive on one column
|
|
1282
|
-
kirograph data describe tests-fixtures-users --json
|
|
1283
|
-
|
|
1284
|
-
# Query rows
|
|
1285
|
-
kirograph data query orders --filter status:eq:shipped --limit 10
|
|
1286
|
-
kirograph data query users --filter age:gt:18 --columns name,email
|
|
1287
|
-
kirograph data query products --filter price:between:10:50 --json
|
|
1288
|
-
|
|
1289
|
-
# Aggregate
|
|
1290
|
-
kirograph data aggregate orders --group-by region --metric sum:amount
|
|
1291
|
-
kirograph data aggregate users --group-by role --metric count:id --metric avg:age
|
|
1292
|
-
kirograph data aggregate orders --group-by status --metric count_distinct:customer_id --json
|
|
1293
|
-
|
|
1294
|
-
# Search columns
|
|
1295
|
-
kirograph data search orders "price" # find columns matching "price"
|
|
1296
|
-
kirograph data search users "email" # find columns matching "email"
|
|
1297
|
-
|
|
1298
|
-
# Join two datasets
|
|
1299
|
-
kirograph data join users orders --left-col id --right-col user_id
|
|
1300
|
-
kirograph data join users orders --left-col id --right-col user_id --type left --limit 50
|
|
1301
|
-
|
|
1302
|
-
# Correlations
|
|
1303
|
-
kirograph data correlations sales-data # Pearson correlations between numeric columns
|
|
1304
|
-
kirograph data correlations sales-data --threshold 0.5 # only strong correlations
|
|
1305
|
-
|
|
1306
|
-
# Quality
|
|
1307
|
-
kirograph data quality orders # rank columns by risk (null rate, cardinality anomalies)
|
|
1308
|
-
|
|
1309
|
-
# History & drift
|
|
1310
|
-
kirograph data history orders # show schema change history
|
|
1311
|
-
kirograph data drift orders # compare last two indexes (added/removed/changed columns)
|
|
1312
|
-
|
|
1313
|
-
# Indexing
|
|
1314
|
-
kirograph data index # incremental index (skips unchanged files)
|
|
1315
|
-
kirograph data reindex # force re-index all data files
|
|
1316
|
-
|
|
1317
|
-
# Maintenance
|
|
1318
|
-
kirograph data lint # validate index integrity (row counts, stale files, missing deps)
|
|
1319
|
-
```
|
|
1320
|
-
|
|
1321
|
-
**How datasets are identified:** Each data file gets a stable ID derived from its relative path: `tests/fixtures/users.csv` → `tests-fixtures-users`. IDs remain stable across re-indexing.
|
|
1322
|
-
|
|
1323
|
-
**Filter format (CLI):** `column:op:value` — e.g. `age:gt:18`, `status:eq:active`, `price:between:10:50`. Multiple `--filter` flags are ANDed.
|
|
1324
|
-
|
|
1325
|
-
**Metric format (CLI):** `op:column` — e.g. `sum:amount`, `avg:price`, `count:id`, `count_distinct:customer_id`.
|
|
1326
|
-
|
|
1327
|
-
**How code linking works:** When `dataLinkCode: true` (default), the indexer scans source files for references to data file paths (`readFileSync('data/users.csv')`, `pd.read_csv(...)`, SQL `COPY FROM`, etc.) and stores matches in `data_code_refs`. This enables test fixture awareness in `kirograph affected` and dataset schema enrichment in `kirograph_context`.
|
|
1328
|
-
|
|
1329
|
-
### Graph Export
|
|
1330
|
-
|
|
1331
|
-
Export the full graph as an interactive dashboard. three files served from a local directory, no server required, works offline.
|
|
1332
|
-
|
|
1333
|
-
```bash
|
|
1334
|
-
kirograph export build [path] # Generate .kirograph/export/{index.html,app.css,app.js}
|
|
1335
|
-
kirograph export start [path] # Generate and open in browser
|
|
1336
|
-
kirograph export build -o /tmp/myexport # Custom output directory
|
|
1337
|
-
kirograph export build --include-contains # Include structural contains edges (adds noise, off by default)
|
|
1338
|
-
```
|
|
1339
|
-
|
|
1340
|
-
Output lands in `.kirograph/export/` by default. Open `index.html` in any browser.
|
|
1341
|
-
|
|
1342
|
-

|
|
1343
|
-
|
|
1344
|
-
#### Graph & navigation
|
|
1345
|
-
|
|
1346
|
-
- **Color-coded nodes** by kind (class, function, method, component…) with size proportional to degree
|
|
1347
|
-
- **Directed edges** with kind labels; dashed lines for imports and references
|
|
1348
|
-
- **Click a node** to zoom in and inspect it. kind, file, line, degree, signature, and a copy button for the file reference
|
|
1349
|
-
- **Click two nodes** to instantly find and highlight the shortest path between them, with detail cards for both endpoints
|
|
1350
|
-
- **History**: ‹ › navigation through previously inspected nodes
|
|
1351
|
-
- **Keyboard shortcuts**: `f` to fit the graph, `Esc` to exit focus or path mode
|
|
1352
|
-
|
|
1353
|
-
#### Controls
|
|
1354
|
-
|
|
1355
|
-
| Button | What it does |
|
|
1356
|
-
|--------|-------------|
|
|
1357
|
-
| **⊞ Fit** | Fit the entire graph to the viewport |
|
|
1358
|
-
| **⚡ Physics** | Toggle the force-directed layout |
|
|
1359
|
-
| **⛶ Fullscreen** | Collapse the side panel for maximum graph space |
|
|
1360
|
-
| **📷 PNG** | Save the current view as an image |
|
|
1361
|
-
| **◎ Focus** | Show only the selected node and its direct neighbors |
|
|
1362
|
-
| **⟶ Path** | Find the shortest path between two nodes |
|
|
1363
|
-
| **⬡ Cluster** | Group nodes by directory; click a cluster to expand it |
|
|
1364
|
-
| **🌡 Heat** | Color nodes by how recently their file was modified |
|
|
1365
|
-
| **📊 Charts** | Open the analytics panel |
|
|
1366
|
-
|
|
1367
|
-
#### Search
|
|
1368
|
-
|
|
1369
|
-
Type to search by name, qualified name, or file path. Matching nodes are highlighted and the viewport fits to them.
|
|
1370
|
-
|
|
1371
|
-
#### Legend & filters
|
|
1372
|
-
|
|
1373
|
-
- **Node kind filter**: Legend tab; click any kind to hide or show all nodes of that type
|
|
1374
|
-
- **Edge kind filter**: Legend tab; click any edge kind to hide or show edges of that type
|
|
1375
|
-
- **Degree slider**: Filters tab; hide nodes below N connections to surface the most-connected symbols
|
|
1376
|
-
|
|
1377
|
-
#### Minimap
|
|
1378
|
-
|
|
1379
|
-
An overview of the full graph is always visible in the bottom-left corner. Click anywhere on it to pan the main graph.
|
|
1380
|
-
|
|
1381
|
-
#### Right-click menu
|
|
1382
|
-
|
|
1383
|
-
Right-click any node to focus its neighbors, start a path from it, copy its ID or file path, or highlight all nodes of the same kind.
|
|
1384
|
-
|
|
1385
|
-
#### Analytics charts
|
|
1386
|
-
|
|
1387
|
-
The 📊 Charts button opens a panel with three charts:
|
|
1388
|
-
|
|
1389
|
-
| Chart | What it shows |
|
|
1390
|
-
|-------|--------------|
|
|
1391
|
-
| **Bar** | The 15 most-connected symbols |
|
|
1392
|
-
| **Donut** | How node kinds are distributed across the codebase |
|
|
1393
|
-
| **Line** | How many symbols have each connection count. reveals the overall connectivity shape of the graph |
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
### Dashboard
|
|
1397
|
-
|
|
1398
|
-
When `semanticEngine` is set to `qdrant` or `typesense`, use these commands to manage the background server and its dashboard UI.
|
|
1399
|
-
|
|
1400
|
-
```bash
|
|
1401
|
-
kirograph dashboard start [path] # Start server (if not running) and open dashboard
|
|
1402
|
-
kirograph dashboard stop [path] # Stop the running engine server
|
|
1403
|
-
```
|
|
1404
|
-
|
|
1405
|
-
**`dashboard start`**
|
|
1406
|
-
|
|
1407
|
-
Reads `semanticEngine` from `.kirograph/config.json` and dispatches accordingly:
|
|
1408
|
-
|
|
1409
|
-
- **qdrant**: Downloads the [Qdrant Web UI](https://github.com/qdrant/qdrant-web-ui) on first use (cached at `.kirograph/qdrant/dashboard/`), spawns the Qdrant server with `QDRANT__SERVICE__STATIC_CONTENT_DIR` set so the dashboard is served natively, and opens `http://127.0.0.1:<port>/dashboard` in your browser. If the server is already running with the dashboard, reconnects instead of restarting.
|
|
1410
|
-
- **typesense**: Downloads the [Typesense Dashboard](https://github.com/bfritscher/typesense-dashboard) static UI on first use (cached at `.kirograph/typesense/dashboard/`), starts the Typesense server if not already running, serves the dashboard locally via a Node HTTP server, and opens it in your browser. Press Ctrl+C to stop the dashboard server. the Typesense server keeps running as a background daemon.
|
|
1411
|
-
|
|
1412
|
-
Both servers run as persistent daemons. The state file (`.kirograph/qdrant-server.json` or `.kirograph/typesense-server.json`) tracks the PID and port for reconnection across `kg` commands.
|
|
1413
|
-
|
|
1414
|
-
**`dashboard stop`**
|
|
1415
|
-
|
|
1416
|
-
Reads `semanticEngine` from config and sends SIGTERM to the running background process, then removes the state file. Does nothing if no server is running.
|
|
1417
|
-
|
|
1418
|
-
### MCP Server
|
|
1419
|
-
|
|
1420
|
-
```bash
|
|
1421
|
-
kirograph serve --mcp # Start MCP server (used by Kiro)
|
|
1422
|
-
kirograph serve --mcp --path /my/project # Specify project path
|
|
1423
|
-
```
|
|
1424
|
-
|
|
1425
|
-
## Configuration
|
|
1426
|
-
|
|
1427
|
-
KiroGraph stores its config in `.kirograph/config.json`. You can edit it directly.
|
|
1428
|
-
|
|
1429
|
-
| Field | Type | Default | Description |
|
|
1430
|
-
|-------|------|---------|-------------|
|
|
1431
|
-
| **Indexing** | | | |
|
|
1432
|
-
| `languages` | string[] | `[]` | Limit indexing to specific languages (empty = all) |
|
|
1433
|
-
| `include` | string[] | `[]` | Glob patterns to include (empty = include everything not excluded) |
|
|
1434
|
-
| `exclude` | string[] | see below | Glob patterns to exclude |
|
|
1435
|
-
| `maxFileSize` | number | `1048576` | Skip files larger than this (bytes) |
|
|
1436
|
-
| `extractDocstrings` | boolean | `true` | Extract JSDoc, docstrings, and comments |
|
|
1437
|
-
| `trackCallSites` | boolean | `true` | Record line/column for call edges |
|
|
1438
|
-
| `frameworkHints` | string[] | auto | Override framework detection (e.g. `["react", "express"]`) |
|
|
1439
|
-
| `fuzzyResolutionThreshold` | number | `0.5` | Name matching threshold for cross-file resolution (0.0–1.0) |
|
|
1440
|
-
| `syncWarningThreshold` | number | `10` | Warn in `kirograph_status` when pending files exceed this count |
|
|
1441
|
-
| **Semantic Search** | | | |
|
|
1442
|
-
| `enableEmbeddings` | boolean | `false` | Generate semantic embeddings (opt-in) |
|
|
1443
|
-
| `embeddingModel` | string | `nomic-ai/nomic-embed-text-v1.5` | HuggingFace `feature-extraction` model ID |
|
|
1444
|
-
| `embeddingDim` | number | `768` | Output dimension of the chosen embedding model |
|
|
1445
|
-
| `semanticEngine` | string | `cosine` | Engine: `cosine`, `sqlite-vec`, `orama`, `pglite`, `lancedb`, `qdrant`, `typesense` |
|
|
1446
|
-
| `useVecIndex` | boolean | `false` | Deprecated alias for `semanticEngine: "sqlite-vec"` |
|
|
1447
|
-
| `typesenseDashboard` | boolean | `false` | Open Typesense dashboard after indexing |
|
|
1448
|
-
| `qdrantDashboard` | boolean | `false` | Open Qdrant dashboard after indexing |
|
|
1449
|
-
| **Architecture** | | | |
|
|
1450
|
-
| `enableArchitecture` | boolean | `false` | Enable architecture analysis (package graph + layer detection) |
|
|
1451
|
-
| `architectureLayers` | object | - | Custom layer definitions: `{ "layerName": ["glob/**"] }` |
|
|
1452
|
-
| **Memory** | | | |
|
|
1453
|
-
| `enableMemory` | boolean | `false` | Enable persistent cross-session memory |
|
|
1454
|
-
| `memorySearchAlpha` | number | `0.5` | Blend weight for hybrid search (0 = FTS only, 1 = vector only) |
|
|
1455
|
-
| `memoryKeepRaw` | boolean | `true` | Store original text alongside compressed version |
|
|
1456
|
-
| `memoryMaxObservations` | number | `10000` | Max observations before auto-pruning oldest |
|
|
1457
|
-
| `memorySessionTimeout` | number | `3600000` | Session timeout in ms (default 1 hour) |
|
|
1458
|
-
| `memoryContextLimit` | number | `3` | Max observations surfaced in `kirograph_context` |
|
|
1459
|
-
| `memoryContextThreshold` | number | `0.3` | Min relevance score to surface in context |
|
|
1460
|
-
| `memoryExcludePatterns` | string[] | `[]` | Glob patterns for files to exclude from symbol linking |
|
|
1461
|
-
| **Documentation** | | | |
|
|
1462
|
-
| `enableDocs` | boolean | `false` | Enable documentation indexing (section-level retrieval) |
|
|
1463
|
-
| `docsInclude` | string[] | `["**/*.md", ...]` | Glob patterns for doc files to include |
|
|
1464
|
-
| `docsExclude` | string[] | `["node_modules/**", ...]` | Glob patterns for doc files to exclude |
|
|
1465
|
-
| `docsLinkCode` | boolean | `true` | Auto-link doc sections to code symbols |
|
|
1466
|
-
| `docsContextLimit` | number | `0` | Max doc sections in `kirograph_context` (0 = disabled) |
|
|
1467
|
-
| `docsContextThreshold` | number | `0.5` | Min confidence for doc refs in context |
|
|
1468
|
-
| `docsMaxFileSize` | number | `1048576` | Max doc file size in bytes |
|
|
1469
|
-
| `docsSummarization` | string | `first-sentence` | Summary strategy: `embedding`, `first-sentence`, `off` |
|
|
1470
|
-
| **Data** | | | |
|
|
1471
|
-
| `enableData` | boolean | `false` | Enable tabular data indexing and querying |
|
|
1472
|
-
| `dataInclude` | string[] | `["**/*.csv", ...]` | Glob patterns for data files to include |
|
|
1473
|
-
| `dataExclude` | string[] | `["node_modules/**", ...]` | Glob patterns for data files to exclude |
|
|
1474
|
-
| `dataLinkCode` | boolean | `true` | Auto-link data files to code symbols via path detection |
|
|
1475
|
-
| `dataContextLimit` | number | `0` | Max datasets in `kirograph_context` (0 = disabled) |
|
|
1476
|
-
| `dataMaxFileSize` | number | `52428800` | Max data file size in bytes (50MB) |
|
|
1477
|
-
| `dataMaxRows` | number | `1000000` | Max rows to index per file |
|
|
1478
|
-
| `dataQueryLimit` | number | `500` | Max rows returned per query (hard cap) |
|
|
1479
|
-
| `dataMaxResponseTokens` | number | `8000` | Max token budget per data tool response |
|
|
1480
|
-
| **Agent Behavior** | | | |
|
|
1481
|
-
| `cavemanMode` | string | `off` | Communication style: `off`, `lite`, `full`, `ultra` |
|
|
1482
|
-
| `shellCompressionLevel` | string | `normal` | Shell compression: `off`, `normal`, `aggressive`, `ultra` |
|
|
1483
|
-
| `minLogLevel` | string | `warn` | Log level: `debug`, `info`, `warn`, `error` |
|
|
1484
|
-
|
|
1485
|
-
Default exclude patterns: `node_modules/**`, `dist/**`, `build/**`, `.git/**`, `*.min.js`, `.kirograph/**`
|
|
1486
|
-
|
|
1487
|
-
### Semantic Search (Optional)
|
|
1488
|
-
|
|
1489
|
-
By default, KiroGraph uses exact name lookup and full-text search. Enable semantic search for natural-language queries:
|
|
1490
|
-
|
|
1491
|
-
```json
|
|
1492
|
-
{
|
|
1493
|
-
"enableEmbeddings": true
|
|
1494
|
-
}
|
|
1495
|
-
```
|
|
1496
|
-
|
|
1497
|
-
This generates vector embeddings for all functions, methods, classes, interfaces, type aliases, components, and modules using a local embedding model (downloaded automatically to `~/.kirograph/models/` on first use). Embeddings are kept in sync automatically via the Kiro `agentStop` hook, which syncs the index (including embeddings) whenever files change during a session.
|
|
1498
|
-
|
|
1499
|
-
Run `kirograph install` to be guided through model and engine selection interactively with arrow-key menus, or set the fields manually in `.kirograph/config.json`.
|
|
1500
|
-
|
|
1501
|
-
#### Embedding models
|
|
1502
|
-
|
|
1503
|
-
`kirograph install` offers a curated selection of models compatible with `@huggingface/transformers`:
|
|
1504
|
-
|
|
1505
|
-
| Model | Dim | Size | Notes |
|
|
1506
|
-
|-------|-----|------|-------|
|
|
1507
|
-
| `nomic-ai/nomic-embed-text-v1.5` | 768 | ~130MB | **Default.** Best quality for code search. |
|
|
1508
|
-
| `onnx-community/embeddinggemma-300m-ONNX` | 768 | ~300MB | Google Gemma-based. Multilingual, 2048-token context window. |
|
|
1509
|
-
| `Xenova/all-MiniLM-L6-v2` | 384 | ~23MB | Lightweight, fast. Lower accuracy. |
|
|
1510
|
-
| `BAAI/bge-base-en-v1.5` | 768 | ~110MB | Strong general-purpose alternative to nomic. |
|
|
1511
|
-
| Custom | any | - | Any HuggingFace `feature-extraction` model. Provide ID + output dimension. |
|
|
1512
|
-
|
|
1513
|
-
The embedding dimension is stored in `embeddingDim` in `.kirograph/config.json` and used to initialise all vector engines correctly. Switching models requires a full re-index (`kirograph index --force`).
|
|
1514
|
-
|
|
1515
|
-
Configure manually:
|
|
1516
|
-
|
|
1517
|
-
```json
|
|
1518
|
-
{
|
|
1519
|
-
"enableEmbeddings": true,
|
|
1520
|
-
"embeddingModel": "onnx-community/embeddinggemma-300m-ONNX",
|
|
1521
|
-
"embeddingDim": 768
|
|
1522
|
-
}
|
|
1523
|
-
```
|
|
1524
|
-
|
|
1525
|
-
#### Storage architecture
|
|
1526
|
-
|
|
1527
|
-
Each engine owns its embedding store exclusively. there is no redundant write to the main graph database:
|
|
1528
|
-
|
|
1529
|
-
| Engine | Graph store | Vector store |
|
|
1530
|
-
|--------|-------------|--------------|
|
|
1531
|
-
| `cosine` | `kirograph.db` (SQLite) | `kirograph.db` (`vectors` table) |
|
|
1532
|
-
| `sqlite-vec` | `kirograph.db` (SQLite) | `.kirograph/vec.db` (sqlite-vec) |
|
|
1533
|
-
| `orama` | `kirograph.db` (SQLite) | `.kirograph/orama.json` (Orama) |
|
|
1534
|
-
| `pglite` | `kirograph.db` (SQLite) | `.kirograph/pglite/` (PGlite+pgvector) |
|
|
1535
|
-
| `lancedb` | `kirograph.db` (SQLite) | `.kirograph/lancedb/` (Apache Lance) |
|
|
1536
|
-
| `qdrant` | `kirograph.db` (SQLite) | `.kirograph/qdrant/` (Qdrant embedded) |
|
|
1537
|
-
| `typesense` | `kirograph.db` (SQLite) | `.kirograph/typesense/` (Typesense embedded) |
|
|
1538
|
-
|
|
1539
|
-
The graph store (`kirograph.db`) always holds nodes, edges, files, and all structural data regardless of which engine is active.
|
|
1540
|
-
|
|
1541
|
-
#### Engine comparison
|
|
1542
|
-
|
|
1543
|
-
| Engine | Search type | Extra deps | Native? | Best for |
|
|
1544
|
-
|--------|-------------|------------|---------|----------|
|
|
1545
|
-
| `cosine` *(default)* | Exact cosine, linear scan | none | - | Small / medium projects, zero setup |
|
|
1546
|
-
| `sqlite-vec` | ANN (approximate), sub-linear | `better-sqlite3`, `sqlite-vec` | yes | Large codebases, fast ANN search |
|
|
1547
|
-
| `orama` | Hybrid (full-text + vector) | `@orama/orama`, `@orama/plugin-data-persistence` | no (pure JS) | Best result quality, no native deps |
|
|
1548
|
-
| `pglite` | Hybrid (full-text + vector), exact | `@electric-sql/pglite` | no (pure WASM) | Exact results, no native deps, PostgreSQL semantics |
|
|
1549
|
-
| `lancedb` | ANN (approximate), sub-linear | `@lancedb/lancedb` | no (pure JS) | Fast ANN search, no native compilation required |
|
|
1550
|
-
| `qdrant` | ANN (HNSW), sub-linear | `qdrant-local` | yes (binary) | Full Qdrant feature set, HNSW index, embedded binary |
|
|
1551
|
-
| `typesense` | ANN (HNSW), sub-linear | `typesense` | yes (binary) | Fast ANN search, auto-downloaded binary, no manual install |
|
|
1552
|
-
|
|
1553
|
-
All non-cosine engines fall back silently to `cosine` if their optional dependencies are not installed.
|
|
1554
|
-
|
|
1555
|
-
#### cosine (default)
|
|
1556
|
-
|
|
1557
|
-
In-process cosine similarity over all stored embeddings. No extra dependencies. Embeddings are stored in the `vectors` table inside `kirograph.db`.
|
|
1558
|
-
|
|
1559
|
-
```json
|
|
1560
|
-
{
|
|
1561
|
-
"enableEmbeddings": true,
|
|
1562
|
-
"semanticEngine": "cosine"
|
|
1563
|
-
}
|
|
1564
|
-
```
|
|
1565
|
-
|
|
1566
|
-
#### sqlite-vec
|
|
1567
|
-
|
|
1568
|
-
Approximate nearest-neighbour (ANN) index stored in `.kirograph/vec.db`. Sub-linear search time. ideal for large codebases with thousands of indexed symbols. The SQLite `vectors` table is not written to; `vec.db` is the sole embedding store.
|
|
1569
|
-
|
|
1570
|
-
```json
|
|
1571
|
-
{
|
|
1572
|
-
"enableEmbeddings": true,
|
|
1573
|
-
"semanticEngine": "sqlite-vec"
|
|
1574
|
-
}
|
|
1575
|
-
```
|
|
1576
|
-
|
|
1577
|
-
```bash
|
|
1578
|
-
npm install better-sqlite3 sqlite-vec
|
|
1579
|
-
```
|
|
1580
|
-
|
|
1581
|
-
Requires two native dependencies (compiled C extensions). If not installed, falls back to `cosine`.
|
|
1582
|
-
|
|
1583
|
-
#### orama
|
|
1584
|
-
|
|
1585
|
-
Hybrid search powered by [Orama](https://github.com/oramasearch/orama). combines full-text relevance and vector similarity in a **single query**, producing higher-quality results than running the two searches separately. The index is persisted to `.kirograph/orama.json` and is the sole embedding store. Pure JS, no native compilation required.
|
|
1586
|
-
|
|
1587
|
-
```json
|
|
1588
|
-
{
|
|
1589
|
-
"enableEmbeddings": true,
|
|
1590
|
-
"semanticEngine": "orama"
|
|
1591
|
-
}
|
|
1592
|
-
```
|
|
1593
|
-
|
|
1594
|
-
```bash
|
|
1595
|
-
npm install @orama/orama @orama/plugin-data-persistence
|
|
1596
|
-
```
|
|
1597
|
-
|
|
1598
|
-
If not installed, falls back to `cosine`.
|
|
1599
|
-
|
|
1600
|
-
#### pglite
|
|
1601
|
-
|
|
1602
|
-
Hybrid search powered by [PGlite](https://github.com/electric-sql/pglite), a WASM-compiled PostgreSQL with the [pgvector](https://github.com/pgvector/pgvector) extension. Combines **exact** nearest-neighbour vector search with full-text ranking (`ts_rank`) in a single SQL query. The database is persisted to `.kirograph/pglite/` using PostgreSQL's WAL-based storage and is the sole embedding store. Pure WASM, no native compilation required.
|
|
1603
|
-
|
|
1604
|
-
```json
|
|
1605
|
-
{
|
|
1606
|
-
"enableEmbeddings": true,
|
|
1607
|
-
"semanticEngine": "pglite"
|
|
1608
|
-
}
|
|
1609
|
-
```
|
|
1610
|
-
|
|
1611
|
-
```bash
|
|
1612
|
-
npm install @electric-sql/pglite
|
|
1613
|
-
```
|
|
1614
|
-
|
|
1615
|
-
Key advantages:
|
|
1616
|
-
- **Exact** vector results (not approximate). deterministic and reproducible
|
|
1617
|
-
- Native SQL `ON CONFLICT` upsert, no remove+insert workaround
|
|
1618
|
-
- HNSW index (`vector_cosine_ops`) keeps search fast as the index grows
|
|
1619
|
-
- Single dependency, zero native binaries
|
|
1620
|
-
|
|
1621
|
-
If not installed, falls back to `cosine`.
|
|
1622
|
-
|
|
1623
|
-
#### LanceDB
|
|
1624
|
-
|
|
1625
|
-
ANN vector search powered by [LanceDB](https://github.com/lancedb/lancedb). stores embeddings in Apache Lance columnar format at `.kirograph/lancedb/`. Sub-linear search time using cosine distance. Pure JS, no native compilation required.
|
|
1626
|
-
|
|
1627
|
-
```json
|
|
1628
|
-
{
|
|
1629
|
-
"enableEmbeddings": true,
|
|
1630
|
-
"semanticEngine": "lancedb"
|
|
1631
|
-
}
|
|
1632
|
-
```
|
|
1633
|
-
|
|
1634
|
-
```bash
|
|
1635
|
-
npm install @lancedb/lancedb
|
|
1636
|
-
```
|
|
1637
|
-
|
|
1638
|
-
Key characteristics:
|
|
1639
|
-
- **Columnar storage** (Apache Lance format). efficient for batch reads and writes
|
|
1640
|
-
- **ANN cosine search**: fast, sub-linear query time
|
|
1641
|
-
- Pure JS, no native binaries or WASM required
|
|
1642
|
-
|
|
1643
|
-
If not installed, falls back to `cosine`.
|
|
1644
|
-
|
|
1645
|
-
#### qdrant
|
|
1646
|
-
|
|
1647
|
-
ANN vector search powered by [Qdrant](https://github.com/qdrant/qdrant) running in embedded mode. The engine spawns the Qdrant binary as a managed child process, persisting data to `.kirograph/qdrant/`. Uses [`@qdrant/qdrant-js`](https://github.com/qdrant/qdrant-js) as the REST client.
|
|
1648
|
-
|
|
1649
|
-
```json
|
|
1650
|
-
{
|
|
1651
|
-
"enableEmbeddings": true,
|
|
1652
|
-
"semanticEngine": "qdrant"
|
|
1653
|
-
}
|
|
1654
|
-
```
|
|
1655
|
-
|
|
1656
|
-
```bash
|
|
1657
|
-
npm install qdrant-local
|
|
1658
|
-
```
|
|
1659
|
-
|
|
1660
|
-
Key characteristics:
|
|
1661
|
-
- **HNSW index**: high-quality ANN search with Qdrant's native indexing
|
|
1662
|
-
- **Embedded binary**: no separate server setup; the process is spawned and managed automatically
|
|
1663
|
-
- **Persistent daemon**: the server stays running between `kg` commands; state tracked in `.kirograph/qdrant-server.json`
|
|
1664
|
-
- **Built-in dashboard**: run `kg dashboard start` to download the [Qdrant Web UI](https://github.com/qdrant/qdrant-web-ui) and open it (cached at `.kirograph/qdrant/dashboard/`, served via Qdrant's built-in static content feature)
|
|
1665
|
-
- **Async startup**: polls `/readyz` instead of blocking with a fixed sleep
|
|
1666
|
-
- **Cosine distance** metric
|
|
1667
|
-
- Data persists across restarts in `.kirograph/qdrant/`
|
|
1668
|
-
|
|
1669
|
-
Manage the server:
|
|
1670
|
-
|
|
1671
|
-
```bash
|
|
1672
|
-
kirograph dashboard start # start server + open dashboard
|
|
1673
|
-
kirograph dashboard stop # stop server
|
|
1674
|
-
```
|
|
1675
|
-
|
|
1676
|
-
If not installed, falls back to `cosine`.
|
|
1677
|
-
|
|
1678
|
-
#### typesense
|
|
1679
|
-
|
|
1680
|
-
ANN vector search powered by [Typesense](https://github.com/typesense/typesense) running in embedded mode. The engine automatically downloads the Typesense server binary (~37 MB, cached at `~/.kirograph/bin/`) on first use and spawns it as a managed child process. Uses the official [`typesense`](https://www.npmjs.com/package/typesense) Node.js client.
|
|
1681
|
-
|
|
1682
|
-
```json
|
|
1683
|
-
{
|
|
1684
|
-
"enableEmbeddings": true,
|
|
1685
|
-
"semanticEngine": "typesense"
|
|
1686
|
-
}
|
|
1687
|
-
```
|
|
1688
|
-
|
|
1689
|
-
```bash
|
|
1690
|
-
npm install typesense
|
|
1691
|
-
```
|
|
1692
|
-
|
|
1693
|
-
Key characteristics:
|
|
1694
|
-
- **HNSW index**: high-quality ANN search with Typesense's native indexing
|
|
1695
|
-
- **Auto-downloaded binary**: no manual server setup; the binary is fetched and cached at `~/.kirograph/bin/` on first run
|
|
1696
|
-
- **Persistent daemon**: the server stays running between `kg` commands; state tracked in `.kirograph/typesense-server.json`
|
|
1697
|
-
- **Local dashboard**: run `kg dashboard start` to open the built-in Typesense Dashboard UI (served locally, cached at `.kirograph/typesense/dashboard/`)
|
|
1698
|
-
- **Async startup**: polls `/health` instead of blocking with a fixed sleep
|
|
1699
|
-
- **Cosine distance** metric
|
|
1700
|
-
- Data persists across restarts in `.kirograph/typesense/`
|
|
1701
|
-
|
|
1702
|
-
Manage the server:
|
|
1703
|
-
|
|
1704
|
-
```bash
|
|
1705
|
-
kirograph dashboard start # start server + open dashboard
|
|
1706
|
-
kirograph dashboard stop # stop server
|
|
1707
|
-
```
|
|
1708
|
-
|
|
1709
|
-
If not installed (or binary download fails), falls back to `cosine`.
|
|
1710
|
-
|
|
1711
|
-
### Architecture Analysis (opt-in)
|
|
1712
|
-
|
|
1713
|
-
When `enableArchitecture: true` is set, KiroGraph analyses the high-level structure of your project during indexing and populates `arch_*` tables in `kirograph.db`. Zero behavioral change when disabled.
|
|
1714
|
-
|
|
1715
|
-
#### What it detects
|
|
1716
|
-
|
|
1717
|
-
**Packages**: logical groupings of files. Detected two ways:
|
|
1718
|
-
|
|
1719
|
-
1. **Manifest-based**: parsed from `package.json`, `go.mod`, `Cargo.toml`, `pyproject.toml`/`setup.py`/`setup.cfg`, `pom.xml`, `build.gradle`/`build.gradle.kts`, and `.csproj` files. Produces IDs like `pkg:npm:src/auth`.
|
|
1720
|
-
2. **Directory fallback**: for files not covered by any manifest, groups them by their nearest ancestor directory. Produces IDs like `pkg:dir:src/utils`.
|
|
1721
|
-
|
|
1722
|
-
**Layers**: architectural tiers detected from file paths using per-language glob patterns:
|
|
1723
|
-
|
|
1724
|
-
| Layer | Examples |
|
|
1725
|
-
|-------|---------|
|
|
1726
|
-
| `api` | `**/controllers/**`, `**/routes/**`, `**/handlers/**`, `**/api/**` |
|
|
1727
|
-
| `service` | `**/services/**`, `**/usecases/**`, `**/domain/**` |
|
|
1728
|
-
| `data` | `**/repositories/**`, `**/models/**`, `**/db/**`, `**/migrations/**` |
|
|
1729
|
-
| `ui` | `**/components/**`, `**/views/**`, `**/pages/**`, `**/screens/**` |
|
|
1730
|
-
| `shared` | `**/utils/**`, `**/helpers/**`, `**/lib/**`, `**/common/**` |
|
|
1731
|
-
|
|
1732
|
-
Layer detection is per-language (TypeScript/JS, Python, Go, Java, Ruby, Rust, C#) with framework-specific patterns where applicable (Django, Rails, Spring MVC, ASP.NET, etc.). Custom layer overrides are supported via `architectureLayers` in config.
|
|
1733
|
-
|
|
1734
|
-
**Package dependencies**: rolled up from existing `imports` edges in the graph. No re-parsing required.
|
|
1735
|
-
|
|
1736
|
-
**Coupling metrics**: computed per package:
|
|
1737
|
-
- **Ca** (afferent). how many other packages depend on this one
|
|
1738
|
-
- **Ce** (efferent). how many packages this one depends on
|
|
1739
|
-
- **Instability** (`Ce / (Ca + Ce)`): 0 = maximally stable (everyone depends on it, it depends on nothing), 1 = maximally unstable (depends on everything, nobody depends on it)
|
|
1740
|
-
|
|
1741
|
-
#### Custom layer definitions
|
|
1742
|
-
|
|
1743
|
-
Override or extend the auto-detected layer patterns in `.kirograph/config.json`:
|
|
1744
|
-
|
|
1745
|
-
```json
|
|
1746
|
-
{
|
|
1747
|
-
"enableArchitecture": true,
|
|
1748
|
-
"architectureLayers": {
|
|
1749
|
-
"api": ["src/routes/**", "src/controllers/**"],
|
|
1750
|
-
"service": ["src/domain/**", "src/application/**"],
|
|
1751
|
-
"data": ["src/infrastructure/**", "src/persistence/**"]
|
|
1752
|
-
}
|
|
1753
|
-
}
|
|
1754
|
-
```
|
|
1755
|
-
|
|
1756
|
-
When `architectureLayers` is set, those patterns take precedence over the auto-detected ones for the specified layer names.
|
|
1757
|
-
|
|
1758
|
-
#### Storage
|
|
1759
|
-
|
|
1760
|
-
All architecture data is stored in `kirograph.db` alongside the symbol graph:
|
|
1761
|
-
|
|
1762
|
-
| Table | Contents |
|
|
1763
|
-
|-------|---------|
|
|
1764
|
-
| `arch_packages` | Package definitions (id, name, path, source, language, version, deps) |
|
|
1765
|
-
| `arch_layers` | Layer definitions (id, name, patterns) |
|
|
1766
|
-
| `arch_file_packages` | File → package assignments |
|
|
1767
|
-
| `arch_file_layers` | File → layer assignments (with confidence score) |
|
|
1768
|
-
| `arch_package_deps` | Package → package dependency edges (with import count) |
|
|
1769
|
-
| `arch_layer_deps` | Layer → layer dependency edges |
|
|
1770
|
-
| `arch_coupling` | Per-package Ca, Ce, instability metrics |
|
|
1771
|
-
|
|
1772
|
-
#### IndexProgress phase
|
|
1773
|
-
|
|
1774
|
-
Architecture analysis runs as a dedicated phase during `kirograph index`. Progress is reported with `phase: 'architecture'`.
|
|
1775
|
-
|
|
1776
|
-
## Supported Languages
|
|
1777
|
-
|
|
1778
|
-
### General-purpose
|
|
1779
|
-
|
|
1780
|
-
| Language | Extensions |
|
|
1781
|
-
|----------|-----------|
|
|
1782
|
-
| TypeScript | `.ts` |
|
|
1783
|
-
| JavaScript | `.js` |
|
|
1784
|
-
| TSX | `.tsx` |
|
|
1785
|
-
| JSX | `.jsx` |
|
|
1786
|
-
| Python | `.py` |
|
|
1787
|
-
| Go | `.go` |
|
|
1788
|
-
| Rust | `.rs` |
|
|
1789
|
-
| Java | `.java` |
|
|
1790
|
-
| C | `.c`, `.h` |
|
|
1791
|
-
| C++ | `.cpp`, `.cc`, `.cxx`, `.hpp` |
|
|
1792
|
-
| C# | `.cs` |
|
|
1793
|
-
| PHP | `.php` |
|
|
1794
|
-
| Ruby | `.rb` |
|
|
1795
|
-
| Swift | `.swift` |
|
|
1796
|
-
| Kotlin | `.kt` |
|
|
1797
|
-
| Dart | `.dart` |
|
|
1798
|
-
| Scala | `.scala`, `.sc`, `.sbt` |
|
|
1799
|
-
| Lua | `.lua` |
|
|
1800
|
-
| Zig | `.zig`, `.zon` |
|
|
1801
|
-
| Bash | `.sh`, `.bash`, `.zsh` |
|
|
1802
|
-
| OCaml | `.ml`, `.mli` |
|
|
1803
|
-
| Elm | `.elm` |
|
|
1804
|
-
| Objective-C | `.m` |
|
|
1805
|
-
|
|
1806
|
-
### Frontend & UI
|
|
1807
|
-
|
|
1808
|
-
| Language | Extensions |
|
|
1809
|
-
|----------|-----------|
|
|
1810
|
-
| React / React Native | `.tsx`, `.jsx` (via TypeScript/JSX grammars) |
|
|
1811
|
-
| Next.js | `.tsx`, `.jsx` (via TypeScript/JSX grammars) |
|
|
1812
|
-
| Angular | `.ts`, `.html` (via TypeScript/HTML grammars) |
|
|
1813
|
-
| Svelte | `.svelte` |
|
|
1814
|
-
| Vue | `.vue` |
|
|
1815
|
-
| HTML | `.html`, `.htm` |
|
|
1816
|
-
| CSS | `.css` |
|
|
1817
|
-
| SCSS / Sass | `.scss`, `.sass` |
|
|
1818
|
-
|
|
1819
|
-
### Domain-specific
|
|
1820
|
-
|
|
1821
|
-
| Language | Domain | Extensions |
|
|
1822
|
-
|----------|--------|-----------|
|
|
1823
|
-
| Solidity | Blockchain / Web3 | `.sol` |
|
|
1824
|
-
| Elixir | Distributed systems / Real-time | `.ex`, `.exs` |
|
|
1825
|
-
|
|
1826
|
-
### Configuration & Infrastructure
|
|
1827
|
-
|
|
1828
|
-
| Language | Extensions |
|
|
1829
|
-
|----------|-----------|
|
|
1830
|
-
| YAML | `.yaml`, `.yml` |
|
|
1831
|
-
| HCL (Terraform) | `.tf`, `.tfvars` |
|
|
1832
|
-
|
|
1833
|
-
## Framework Detection
|
|
1834
|
-
|
|
1835
|
-
KiroGraph automatically detects frameworks and enriches the graph with framework-specific semantics (routes, components, lifecycle methods):
|
|
1836
|
-
|
|
1837
|
-
### Web Frameworks
|
|
1838
|
-
|
|
1839
|
-
**JavaScript / TypeScript:** React, Next.js, React Native, Angular, Svelte, SvelteKit, Express, Fastify, Koa
|
|
1840
|
-
|
|
1841
|
-
**Vue:** Vue, Nuxt
|
|
1842
|
-
|
|
1843
|
-
**Python:** Django, Flask, FastAPI
|
|
1844
|
-
|
|
1845
|
-
**Ruby:** Rails
|
|
1846
|
-
|
|
1847
|
-
**Java:** Spring, Spring Boot, Spring MVC
|
|
1848
|
-
|
|
1849
|
-
**Scala:** Play, Akka HTTP, http4s
|
|
1850
|
-
|
|
1851
|
-
**Go:** generic Go resolver
|
|
1852
|
-
|
|
1853
|
-
**Rust:** generic Rust resolver
|
|
1854
|
-
|
|
1855
|
-
**C#:** ASP.NET Core
|
|
1856
|
-
|
|
1857
|
-
**Swift:** SwiftUI, UIKit, Vapor
|
|
1858
|
-
|
|
1859
|
-
**PHP:** Laravel
|
|
1860
|
-
|
|
1861
|
-
**Elixir:** Phoenix
|
|
1862
|
-
|
|
1863
|
-
**Solidity:** Hardhat, Foundry, Truffle (OpenZeppelin patterns)
|
|
1864
|
-
|
|
1865
|
-
### Infrastructure as Code
|
|
1866
|
-
|
|
1867
|
-
AWS CDK, SST, Serverless Framework, AWS SAM, Terraform / OpenTofu, Pulumi, CloudFormation, AWS Amplify Gen 2
|
|
1868
|
-
|
|
1869
|
-
### Containers & Orchestration
|
|
1870
|
-
|
|
1871
|
-
Kubernetes, Helm, Docker Compose
|
|
1872
|
-
|
|
1873
|
-
### Configuration Management
|
|
1874
|
-
|
|
1875
|
-
Ansible
|
|
1876
|
-
|
|
1877
|
-
Detected frameworks are stored in config and used to improve symbol extraction and resolution.
|
|
1878
|
-
|
|
1879
|
-
## Credits
|
|
1880
|
-
|
|
1881
|
-
KiroGraph is inspired by [CodeGraph](https://github.com/colbymchenry/codegraph) by [Colby McHenry](https://www.linkedin.com/in/colby-mchenry/). the original concept of building a semantic code graph for AI coding agents comes from his work.
|
|
1882
|
-
|
|
1883
|
-
### Inspirations
|
|
1884
|
-
|
|
1885
|
-
- [cavemem](https://github.com/JuliusBrussee/cavemem) by [Julius Brussee](https://www.linkedin.com/in/julius-brussee/): the memory module's hook-based observation capture, deterministic compression, and SQLite storage pattern.
|
|
1886
|
-
- [jDocMunch-MCP](https://github.com/jgravelle/jdocmunch-mcp) by [J. Gravelle](https://www.linkedin.com/in/j-gravelle-2778223/): the documentation module's section-first retrieval approach, stable section IDs, and byte-offset addressing.
|
|
1887
|
-
- [jDataMunch-MCP](https://github.com/jgravelle/jdatamunch-mcp) by [J. Gravelle](https://www.linkedin.com/in/j-gravelle-2778223/): the data module's column profiling, streaming parsers, and server-side aggregation approach.
|
|
1888
|
-
|
|
1889
|
-
### Contributors
|
|
1890
|
-
|
|
1891
|
-
- [Alessandro Franceschi](https://www.linkedin.com/in/alessandrofranceschi/). Claude Code and Codex integration, Elixir/Phoenix language and framework support.
|
|
1892
|
-
- [Mauro Argo](https://www.linkedin.com/in/argomauro/). original idea for the architecture layer analysis feature.
|
|
1893
|
-
|
|
1894
|
-
## Requirements
|
|
1895
|
-
|
|
1896
|
-
- Node.js >= 18
|
|
1897
|
-
- Kiro IDE (fully supported)
|
|
1898
|
-
- Other MCP-capable tools (experimental. see [Other Tools](#other-tools-experimental))
|
|
1899
|
-
|
|
1900
|
-
## License
|
|
175
|
+
[MIT](LICENSE)
|
|
1901
176
|
|
|
1902
|
-
|
|
177
|
+
| Document | Description |
|
|
178
|
+
|----------|-------------|
|
|
179
|
+
| [License](LICENSE) | MIT License — permissions, conditions, copyright |
|
|
180
|
+
| [Disclaimer](DISCLAIMER.md) | Limitations of use, no professional advice, data handling |
|
|
181
|
+
| [Warranty Disclaimer](WARRANTY.md) | Software provided "as is", no warranties of any kind |
|
|
182
|
+
| [Limitation of Liability](LIABILITY.md) | Exclusion of liability for damages arising from use |
|
|
183
|
+
| [Terms of Use](TERMS.md) | Permitted and prohibited use, user obligations, privacy |
|