kirograph 0.19.0 → 0.20.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +10 -8
- package/dist/architecture/layers/dart.d.ts +10 -0
- package/dist/architecture/layers/dart.d.ts.map +1 -0
- package/dist/architecture/layers/elixir.d.ts +6 -0
- package/dist/architecture/layers/elixir.d.ts.map +1 -0
- package/dist/architecture/layers/index.d.ts.map +1 -1
- package/dist/architecture/layers/ocaml.d.ts +6 -0
- package/dist/architecture/layers/ocaml.d.ts.map +1 -0
- package/dist/architecture/layers/scala.d.ts +6 -0
- package/dist/architecture/layers/scala.d.ts.map +1 -0
- package/dist/architecture/layers/solidity.d.ts +6 -0
- package/dist/architecture/layers/solidity.d.ts.map +1 -0
- package/dist/architecture/layers/vue.d.ts +6 -0
- package/dist/architecture/layers/vue.d.ts.map +1 -0
- package/dist/architecture/manifest/elm.d.ts +3 -0
- package/dist/architecture/manifest/elm.d.ts.map +1 -0
- package/dist/architecture/manifest/index.d.ts.map +1 -1
- package/dist/architecture/manifest/ocaml.d.ts +3 -0
- package/dist/architecture/manifest/ocaml.d.ts.map +1 -0
- package/dist/architecture/manifest/scala.d.ts +3 -0
- package/dist/architecture/manifest/scala.d.ts.map +1 -0
- package/dist/bin/banner.d.ts.map +1 -1
- package/dist/bin/commands/affected.d.ts.map +1 -1
- package/dist/bin/commands/attack-surface.d.ts +3 -0
- package/dist/bin/commands/attack-surface.d.ts.map +1 -0
- package/dist/bin/commands/attack-surface.js +7 -0
- package/dist/bin/commands/attack-surface.js.map +2 -2
- package/dist/bin/commands/benchmark.d.ts +9 -0
- package/dist/bin/commands/benchmark.d.ts.map +1 -0
- package/dist/bin/commands/budget.d.ts +6 -0
- package/dist/bin/commands/budget.d.ts.map +1 -0
- package/dist/bin/commands/caveman.d.ts +7 -0
- package/dist/bin/commands/caveman.d.ts.map +1 -0
- package/dist/bin/commands/communities.d.ts +3 -0
- package/dist/bin/commands/communities.d.ts.map +1 -0
- package/dist/bin/commands/compression.d.ts +7 -0
- package/dist/bin/commands/compression.d.ts.map +1 -0
- package/dist/bin/commands/context.d.ts.map +1 -1
- package/dist/bin/commands/data.d.ts +3 -0
- package/dist/bin/commands/data.d.ts.map +1 -0
- package/dist/bin/commands/dead-code.d.ts +3 -0
- package/dist/bin/commands/dead-code.d.ts.map +1 -0
- package/dist/bin/commands/dep-confusion.d.ts +3 -0
- package/dist/bin/commands/dep-confusion.d.ts.map +1 -0
- package/dist/bin/commands/docs.d.ts +3 -0
- package/dist/bin/commands/docs.d.ts.map +1 -0
- package/dist/bin/commands/exec.d.ts +11 -0
- package/dist/bin/commands/exec.d.ts.map +1 -0
- package/dist/bin/commands/export.d.ts +3 -0
- package/dist/bin/commands/export.d.ts.map +1 -0
- package/dist/bin/commands/flows.d.ts +3 -0
- package/dist/bin/commands/flows.d.ts.map +1 -0
- package/dist/bin/commands/gain.d.ts +6 -0
- package/dist/bin/commands/gain.d.ts.map +1 -0
- package/dist/bin/commands/help.d.ts +7 -0
- package/dist/bin/commands/help.d.ts.map +1 -1
- package/dist/bin/commands/help.js +20 -3
- package/dist/bin/commands/help.js.map +2 -2
- package/dist/bin/commands/hotspots.d.ts +3 -0
- package/dist/bin/commands/hotspots.d.ts.map +1 -0
- package/dist/bin/commands/hotspots.js +94 -1
- package/dist/bin/commands/hotspots.js.map +3 -3
- package/dist/bin/commands/install.d.ts.map +1 -1
- package/dist/bin/commands/install.js +3 -3
- package/dist/bin/commands/install.js.map +2 -2
- package/dist/bin/commands/licenses.d.ts +3 -0
- package/dist/bin/commands/licenses.d.ts.map +1 -0
- package/dist/bin/commands/memory.d.ts +16 -0
- package/dist/bin/commands/memory.d.ts.map +1 -0
- package/dist/bin/commands/memory.js +151 -4
- package/dist/bin/commands/memory.js.map +2 -2
- package/dist/bin/commands/path.d.ts +3 -0
- package/dist/bin/commands/path.d.ts.map +1 -0
- package/dist/bin/commands/pattern.d.ts +3 -0
- package/dist/bin/commands/pattern.d.ts.map +1 -0
- package/dist/bin/commands/pattern.js +592 -0
- package/dist/bin/commands/pattern.js.map +7 -0
- package/dist/bin/commands/query.d.ts.map +1 -1
- package/dist/bin/commands/reachability.d.ts +3 -0
- package/dist/bin/commands/reachability.d.ts.map +1 -0
- package/dist/bin/commands/read.d.ts +6 -0
- package/dist/bin/commands/read.d.ts.map +1 -0
- package/dist/bin/commands/refactor.d.ts +3 -0
- package/dist/bin/commands/refactor.d.ts.map +1 -0
- package/dist/bin/commands/remediation.d.ts +3 -0
- package/dist/bin/commands/remediation.d.ts.map +1 -0
- package/dist/bin/commands/sbom.d.ts +3 -0
- package/dist/bin/commands/sbom.d.ts.map +1 -0
- package/dist/bin/commands/security-ci-report.d.ts +9 -0
- package/dist/bin/commands/security-ci-report.d.ts.map +1 -0
- package/dist/bin/commands/security-export.d.ts +2 -0
- package/dist/bin/commands/security-export.d.ts.map +1 -0
- package/dist/bin/commands/security-flows.d.ts +3 -0
- package/dist/bin/commands/security-flows.d.ts.map +1 -0
- package/dist/bin/commands/security-secrets.d.ts +3 -0
- package/dist/bin/commands/security-secrets.d.ts.map +1 -0
- package/dist/bin/commands/security.d.ts +3 -0
- package/dist/bin/commands/security.d.ts.map +1 -0
- package/dist/bin/commands/security.js +15 -0
- package/dist/bin/commands/security.js.map +2 -2
- package/dist/bin/commands/snapshot.d.ts +3 -0
- package/dist/bin/commands/snapshot.d.ts.map +1 -0
- package/dist/bin/commands/staleness.d.ts +3 -0
- package/dist/bin/commands/staleness.d.ts.map +1 -0
- package/dist/bin/commands/status.d.ts.map +1 -1
- package/dist/bin/commands/status.js +27 -0
- package/dist/bin/commands/status.js.map +2 -2
- package/dist/bin/commands/supply-chain.d.ts +3 -0
- package/dist/bin/commands/supply-chain.d.ts.map +1 -0
- package/dist/bin/commands/surprising.d.ts +3 -0
- package/dist/bin/commands/surprising.d.ts.map +1 -0
- package/dist/bin/commands/sync.d.ts.map +1 -1
- package/dist/bin/commands/uninit.d.ts.map +1 -1
- package/dist/bin/commands/utils.d.ts +5 -0
- package/dist/bin/commands/utils.d.ts.map +1 -1
- package/dist/bin/commands/vex.d.ts +3 -0
- package/dist/bin/commands/vex.d.ts.map +1 -0
- package/dist/bin/commands/vuln-suppress.d.ts +3 -0
- package/dist/bin/commands/vuln-suppress.d.ts.map +1 -0
- package/dist/bin/commands/vulns.d.ts +3 -0
- package/dist/bin/commands/vulns.d.ts.map +1 -0
- package/dist/bin/installer/archive.d.ts +47 -0
- package/dist/bin/installer/archive.d.ts.map +1 -0
- package/dist/bin/installer/auto-detect.d.ts +16 -0
- package/dist/bin/installer/auto-detect.d.ts.map +1 -0
- package/dist/bin/installer/caveman.d.ts +12 -0
- package/dist/bin/installer/caveman.d.ts.map +1 -0
- package/dist/bin/installer/cli-agent.d.ts +7 -2
- package/dist/bin/installer/cli-agent.d.ts.map +1 -1
- package/dist/bin/installer/cli-agent.js +6 -2
- package/dist/bin/installer/cli-agent.js.map +2 -2
- package/dist/bin/installer/common.d.ts +36 -0
- package/dist/bin/installer/common.d.ts.map +1 -0
- package/dist/bin/installer/common.js +2 -1
- package/dist/bin/installer/common.js.map +2 -2
- package/dist/bin/installer/config-prompt.d.ts +1 -1
- package/dist/bin/installer/config-prompt.d.ts.map +1 -1
- package/dist/bin/installer/config-prompt.js +74 -2
- package/dist/bin/installer/config-prompt.js.map +2 -2
- package/dist/bin/installer/dashboard.d.ts.map +1 -1
- package/dist/bin/installer/detect.d.ts +30 -0
- package/dist/bin/installer/detect.d.ts.map +1 -0
- package/dist/bin/installer/hooks.d.ts +4 -1
- package/dist/bin/installer/hooks.d.ts.map +1 -1
- package/dist/bin/installer/hooks.js +34 -0
- package/dist/bin/installer/hooks.js.map +2 -2
- package/dist/bin/installer/index.d.ts +5 -4
- package/dist/bin/installer/index.d.ts.map +1 -1
- package/dist/bin/installer/index.js +67 -8
- package/dist/bin/installer/index.js.map +2 -2
- package/dist/bin/installer/instructions.d.ts +14 -0
- package/dist/bin/installer/instructions.d.ts.map +1 -0
- package/dist/bin/installer/instructions.js +15 -1
- package/dist/bin/installer/instructions.js.map +2 -2
- package/dist/bin/installer/mcp.d.ts.map +1 -1
- package/dist/bin/installer/prompts.d.ts +17 -0
- package/dist/bin/installer/prompts.d.ts.map +1 -1
- package/dist/bin/installer/qdrant-dashboard.d.ts.map +1 -1
- package/dist/bin/installer/steering.d.ts +14 -2
- package/dist/bin/installer/steering.d.ts.map +1 -1
- package/dist/bin/installer/steering.js +81 -0
- package/dist/bin/installer/steering.js.map +2 -2
- package/dist/bin/installer/targets/aider.d.ts +6 -0
- package/dist/bin/installer/targets/aider.d.ts.map +1 -0
- 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.d.ts +6 -0
- package/dist/bin/installer/targets/amp.d.ts.map +1 -0
- 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.d.ts +13 -0
- package/dist/bin/installer/targets/antigravity.d.ts.map +1 -0
- package/dist/bin/installer/targets/antigravity.js +2 -2
- package/dist/bin/installer/targets/antigravity.js.map +2 -2
- package/dist/bin/installer/targets/augment.d.ts +6 -0
- package/dist/bin/installer/targets/augment.d.ts.map +1 -0
- 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.d.ts +6 -0
- package/dist/bin/installer/targets/claude.d.ts.map +1 -0
- package/dist/bin/installer/targets/claude.js +2 -2
- package/dist/bin/installer/targets/claude.js.map +2 -2
- package/dist/bin/installer/targets/cline.d.ts +13 -0
- package/dist/bin/installer/targets/cline.d.ts.map +1 -0
- package/dist/bin/installer/targets/cline.js +2 -2
- package/dist/bin/installer/targets/cline.js.map +2 -2
- package/dist/bin/installer/targets/codex.d.ts +6 -0
- package/dist/bin/installer/targets/codex.d.ts.map +1 -0
- package/dist/bin/installer/targets/codex.js +2 -2
- package/dist/bin/installer/targets/codex.js.map +2 -2
- package/dist/bin/installer/targets/continue.d.ts +12 -0
- package/dist/bin/installer/targets/continue.d.ts.map +1 -0
- 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.d.ts +12 -0
- package/dist/bin/installer/targets/copilot-cli.d.ts.map +1 -0
- package/dist/bin/installer/targets/copilot-cli.js +2 -2
- package/dist/bin/installer/targets/copilot-cli.js.map +2 -2
- package/dist/bin/installer/targets/copilot.d.ts +6 -0
- package/dist/bin/installer/targets/copilot.d.ts.map +1 -0
- package/dist/bin/installer/targets/copilot.js +2 -2
- package/dist/bin/installer/targets/copilot.js.map +2 -2
- package/dist/bin/installer/targets/cursor.d.ts +6 -0
- package/dist/bin/installer/targets/cursor.d.ts.map +1 -0
- package/dist/bin/installer/targets/cursor.js +2 -2
- package/dist/bin/installer/targets/cursor.js.map +2 -2
- package/dist/bin/installer/targets/devin.d.ts +13 -0
- package/dist/bin/installer/targets/devin.d.ts.map +1 -0
- 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.d.ts +16 -0
- package/dist/bin/installer/targets/gemini-cli.d.ts.map +1 -0
- 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.d.ts +59 -0
- package/dist/bin/installer/targets/generic.d.ts.map +1 -0
- package/dist/bin/installer/targets/generic.js +2 -2
- package/dist/bin/installer/targets/generic.js.map +2 -2
- package/dist/bin/installer/targets/goose.d.ts +6 -0
- package/dist/bin/installer/targets/goose.d.ts.map +1 -0
- 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.d.ts +11 -0
- package/dist/bin/installer/targets/index.d.ts.map +1 -0
- package/dist/bin/installer/targets/index.js.map +1 -1
- package/dist/bin/installer/targets/junie.d.ts +13 -0
- package/dist/bin/installer/targets/junie.d.ts.map +1 -0
- 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.d.ts +12 -0
- package/dist/bin/installer/targets/kilo.d.ts.map +1 -0
- 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.d.ts +5 -0
- package/dist/bin/installer/targets/kiro.d.ts.map +1 -0
- package/dist/bin/installer/targets/kiro.js +4 -4
- package/dist/bin/installer/targets/kiro.js.map +2 -2
- package/dist/bin/installer/targets/opencode.d.ts +13 -0
- package/dist/bin/installer/targets/opencode.d.ts.map +1 -0
- 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.d.ts +6 -0
- package/dist/bin/installer/targets/openhands.d.ts.map +1 -0
- 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.d.ts +12 -0
- package/dist/bin/installer/targets/qoder.d.ts.map +1 -0
- package/dist/bin/installer/targets/qoder.js +2 -2
- package/dist/bin/installer/targets/qoder.js.map +2 -2
- package/dist/bin/installer/targets/qwen.d.ts +12 -0
- package/dist/bin/installer/targets/qwen.d.ts.map +1 -0
- package/dist/bin/installer/targets/qwen.js +2 -2
- package/dist/bin/installer/targets/qwen.js.map +2 -2
- package/dist/bin/installer/targets/replit.d.ts +6 -0
- package/dist/bin/installer/targets/replit.d.ts.map +1 -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.d.ts +13 -0
- package/dist/bin/installer/targets/roo.d.ts.map +1 -0
- 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.d.ts +6 -0
- package/dist/bin/installer/targets/tabnine.d.ts.map +1 -0
- 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.d.ts +6 -0
- package/dist/bin/installer/targets/trae.d.ts.map +1 -0
- package/dist/bin/installer/targets/trae.js +3 -3
- package/dist/bin/installer/targets/trae.js.map +2 -2
- package/dist/bin/installer/targets/warp.d.ts +12 -0
- package/dist/bin/installer/targets/warp.d.ts.map +1 -0
- 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.d.ts +13 -0
- package/dist/bin/installer/targets/windsurf.d.ts.map +1 -0
- package/dist/bin/installer/targets/windsurf.js +2 -2
- package/dist/bin/installer/targets/windsurf.js.map +2 -2
- package/dist/bin/kirograph.js +3 -1
- package/dist/bin/kirograph.js.map +3 -3
- package/dist/bin/progress.d.ts +16 -1
- package/dist/bin/progress.d.ts.map +1 -1
- package/dist/compression/filters/aws.d.ts +9 -0
- package/dist/compression/filters/aws.d.ts.map +1 -0
- package/dist/compression/filters/docker.d.ts +6 -0
- package/dist/compression/filters/docker.d.ts.map +1 -0
- package/dist/compression/filters/files.d.ts +6 -0
- package/dist/compression/filters/files.d.ts.map +1 -0
- package/dist/compression/filters/generic.d.ts +7 -0
- package/dist/compression/filters/generic.d.ts.map +1 -0
- package/dist/compression/filters/git.d.ts +6 -0
- package/dist/compression/filters/git.d.ts.map +1 -0
- package/dist/compression/filters/github.d.ts +6 -0
- package/dist/compression/filters/github.d.ts.map +1 -0
- package/dist/compression/filters/lint.d.ts +6 -0
- package/dist/compression/filters/lint.d.ts.map +1 -0
- package/dist/compression/filters/misc.d.ts +6 -0
- package/dist/compression/filters/misc.d.ts.map +1 -0
- package/dist/compression/filters/package.d.ts +6 -0
- package/dist/compression/filters/package.d.ts.map +1 -0
- package/dist/compression/filters/test.d.ts +6 -0
- package/dist/compression/filters/test.d.ts.map +1 -0
- package/dist/compression/index.d.ts +29 -0
- package/dist/compression/index.d.ts.map +1 -0
- package/dist/compression/naive-cost.d.ts +26 -0
- package/dist/compression/naive-cost.d.ts.map +1 -0
- package/dist/compression/tracker.d.ts +155 -0
- package/dist/compression/tracker.d.ts.map +1 -0
- package/dist/compression/types.d.ts +49 -0
- package/dist/compression/types.d.ts.map +1 -0
- package/dist/config.d.ts +90 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +55 -1
- package/dist/config.js.map +2 -2
- package/dist/core/lock-manager.d.ts +2 -0
- package/dist/core/lock-manager.d.ts.map +1 -1
- package/dist/core/pipeline.d.ts +4 -1
- package/dist/core/pipeline.d.ts.map +1 -1
- package/dist/core/pipeline.js +42 -0
- package/dist/core/pipeline.js.map +2 -2
- package/dist/core/snapshot.d.ts +58 -0
- package/dist/core/snapshot.d.ts.map +1 -0
- package/dist/data/filters.d.ts +23 -0
- package/dist/data/filters.d.ts.map +1 -0
- package/dist/data/indexer.d.ts +25 -0
- package/dist/data/indexer.d.ts.map +1 -0
- package/dist/data/linker.d.ts +37 -0
- package/dist/data/linker.d.ts.map +1 -0
- package/dist/data/lint.d.ts +27 -0
- package/dist/data/lint.d.ts.map +1 -0
- package/dist/data/parsers/csv.d.ts +11 -0
- package/dist/data/parsers/csv.d.ts.map +1 -0
- package/dist/data/parsers/excel.d.ts +10 -0
- package/dist/data/parsers/excel.d.ts.map +1 -0
- package/dist/data/parsers/index.d.ts +28 -0
- package/dist/data/parsers/index.d.ts.map +1 -0
- package/dist/data/parsers/json-array.d.ts +9 -0
- package/dist/data/parsers/json-array.d.ts.map +1 -0
- package/dist/data/parsers/jsonl.d.ts +9 -0
- package/dist/data/parsers/jsonl.d.ts.map +1 -0
- package/dist/data/parsers/parquet.d.ts +10 -0
- package/dist/data/parsers/parquet.d.ts.map +1 -0
- package/dist/data/profiler.d.ts +29 -0
- package/dist/data/profiler.d.ts.map +1 -0
- package/dist/data/queries.d.ts +95 -0
- package/dist/data/queries.d.ts.map +1 -0
- package/dist/data/types.d.ts +103 -0
- package/dist/data/types.d.ts.map +1 -0
- package/dist/db/database.d.ts +57 -0
- package/dist/db/database.d.ts.map +1 -1
- package/dist/db/database.js +19 -0
- package/dist/db/database.js.map +2 -2
- package/dist/db/patterns-schema.sql +23 -0
- package/dist/docs/formats/asciidoc.d.ts +9 -0
- package/dist/docs/formats/asciidoc.d.ts.map +1 -0
- package/dist/docs/formats/html.d.ts +10 -0
- package/dist/docs/formats/html.d.ts.map +1 -0
- package/dist/docs/formats/index.d.ts +31 -0
- package/dist/docs/formats/index.d.ts.map +1 -0
- package/dist/docs/formats/markdown.d.ts +11 -0
- package/dist/docs/formats/markdown.d.ts.map +1 -0
- package/dist/docs/formats/openapi.d.ts +17 -0
- package/dist/docs/formats/openapi.d.ts.map +1 -0
- package/dist/docs/formats/org.d.ts +9 -0
- package/dist/docs/formats/org.d.ts.map +1 -0
- package/dist/docs/formats/plaintext.d.ts +11 -0
- package/dist/docs/formats/plaintext.d.ts.map +1 -0
- package/dist/docs/formats/rdoc.d.ts +10 -0
- package/dist/docs/formats/rdoc.d.ts.map +1 -0
- package/dist/docs/formats/rst.d.ts +11 -0
- package/dist/docs/formats/rst.d.ts.map +1 -0
- package/dist/docs/indexer.d.ts +49 -0
- package/dist/docs/indexer.d.ts.map +1 -0
- package/dist/docs/linker.d.ts +30 -0
- package/dist/docs/linker.d.ts.map +1 -0
- package/dist/docs/lint.d.ts +27 -0
- package/dist/docs/lint.d.ts.map +1 -0
- package/dist/docs/queries.d.ts +78 -0
- package/dist/docs/queries.d.ts.map +1 -0
- package/dist/docs/section-id.d.ts +48 -0
- package/dist/docs/section-id.d.ts.map +1 -0
- package/dist/docs/summarizer.d.ts +13 -0
- package/dist/docs/summarizer.d.ts.map +1 -0
- package/dist/docs/types.d.ts +71 -0
- package/dist/docs/types.d.ts.map +1 -0
- package/dist/docs/vectors.d.ts +54 -0
- package/dist/docs/vectors.d.ts.map +1 -0
- package/dist/extraction/extractor.d.ts +1 -1
- package/dist/extraction/extractor.d.ts.map +1 -1
- package/dist/extraction/extractor.js +26 -3
- package/dist/extraction/extractor.js.map +2 -2
- package/dist/extraction/grammars.d.ts +6 -0
- package/dist/extraction/grammars.d.ts.map +1 -1
- package/dist/extraction/grammars.js +1 -0
- package/dist/extraction/grammars.js.map +2 -2
- package/dist/extraction/languages.d.ts.map +1 -1
- package/dist/extraction/languages.js +5 -1
- package/dist/extraction/languages.js.map +2 -2
- package/dist/extraction/notebook.d.ts +14 -0
- package/dist/extraction/notebook.d.ts.map +1 -0
- package/dist/frameworks/amplify.d.ts +9 -0
- package/dist/frameworks/amplify.d.ts.map +1 -0
- package/dist/frameworks/angular.d.ts +9 -0
- package/dist/frameworks/angular.d.ts.map +1 -0
- package/dist/frameworks/ansible.d.ts +8 -0
- package/dist/frameworks/ansible.d.ts.map +1 -0
- package/dist/frameworks/cloudformation.d.ts +9 -0
- package/dist/frameworks/cloudformation.d.ts.map +1 -0
- package/dist/frameworks/docker.d.ts +9 -0
- package/dist/frameworks/docker.d.ts.map +1 -0
- package/dist/frameworks/elixir.d.ts +6 -0
- package/dist/frameworks/elixir.d.ts.map +1 -0
- package/dist/frameworks/flutter.d.ts +12 -0
- package/dist/frameworks/flutter.d.ts.map +1 -0
- package/dist/frameworks/iac.d.ts +10 -0
- package/dist/frameworks/iac.d.ts.map +1 -0
- package/dist/frameworks/index.d.ts +14 -0
- package/dist/frameworks/index.d.ts.map +1 -1
- package/dist/frameworks/kubernetes.d.ts +9 -0
- package/dist/frameworks/kubernetes.d.ts.map +1 -0
- package/dist/frameworks/pulumi.d.ts +9 -0
- package/dist/frameworks/pulumi.d.ts.map +1 -0
- package/dist/frameworks/scala.d.ts +6 -0
- package/dist/frameworks/scala.d.ts.map +1 -0
- package/dist/frameworks/solidity.d.ts +6 -0
- package/dist/frameworks/solidity.d.ts.map +1 -0
- package/dist/frameworks/terraform.d.ts +14 -0
- package/dist/frameworks/terraform.d.ts.map +1 -0
- package/dist/frameworks/vue.d.ts +7 -0
- package/dist/frameworks/vue.d.ts.map +1 -0
- package/dist/graph/communities.d.ts +43 -0
- package/dist/graph/communities.d.ts.map +1 -0
- package/dist/graph/flows.d.ts +55 -0
- package/dist/graph/flows.d.ts.map +1 -0
- package/dist/graph/refactor.d.ts +43 -0
- package/dist/graph/refactor.d.ts.map +1 -0
- package/dist/index.d.ts +36 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/mcp/cache.d.ts +69 -0
- package/dist/mcp/cache.d.ts.map +1 -0
- package/dist/mcp/read-modes.d.ts +31 -0
- package/dist/mcp/read-modes.d.ts.map +1 -0
- package/dist/mcp/server.d.ts +1 -0
- package/dist/mcp/server.d.ts.map +1 -1
- package/dist/mcp/server.js +15 -2
- package/dist/mcp/server.js.map +2 -2
- package/dist/mcp/tool-names.d.ts +2 -0
- package/dist/mcp/tool-names.d.ts.map +1 -0
- package/dist/mcp/tool-names.js +4 -1
- package/dist/mcp/tool-names.js.map +2 -2
- package/dist/mcp/tools.d.ts +12 -0
- package/dist/mcp/tools.d.ts.map +1 -1
- package/dist/mcp/tools.js +397 -0
- package/dist/mcp/tools.js.map +2 -2
- package/dist/memory/compress.d.ts +19 -0
- package/dist/memory/compress.d.ts.map +1 -0
- package/dist/memory/database.d.ts +92 -0
- package/dist/memory/database.d.ts.map +1 -0
- package/dist/memory/database.js +38 -0
- package/dist/memory/database.js.map +2 -2
- package/dist/memory/index.d.ts +71 -0
- package/dist/memory/index.d.ts.map +1 -0
- package/dist/memory/index.js +12 -2
- package/dist/memory/index.js.map +2 -2
- package/dist/memory/symbols.d.ts +21 -0
- package/dist/memory/symbols.d.ts.map +1 -0
- package/dist/memory/types.d.ts +78 -0
- package/dist/memory/types.d.ts.map +1 -0
- package/dist/memory/types.js.map +1 -1
- package/dist/memory/vectors.d.ts +43 -0
- package/dist/memory/vectors.d.ts.map +1 -0
- package/dist/patterns/graph.d.ts +16 -0
- package/dist/patterns/graph.d.ts.map +1 -0
- package/dist/patterns/graph.js +45 -0
- package/dist/patterns/graph.js.map +7 -0
- package/dist/patterns/index.d.ts +4 -0
- package/dist/patterns/index.d.ts.map +1 -0
- package/dist/patterns/index.js +39 -0
- package/dist/patterns/index.js.map +7 -0
- package/dist/patterns/indexer.d.ts +15 -0
- package/dist/patterns/indexer.d.ts.map +1 -0
- package/dist/patterns/indexer.js +97 -0
- package/dist/patterns/indexer.js.map +7 -0
- package/dist/patterns/library/code-eval-elixir.yaml +11 -0
- package/dist/patterns/library/command-injection-c.yaml +11 -0
- package/dist/patterns/library/command-injection-go.yaml +29 -0
- package/dist/patterns/library/command-injection-kotlin.yaml +10 -0
- package/dist/patterns/library/command-injection-php.yaml +11 -0
- package/dist/patterns/library/command-injection-ruby.yaml +11 -0
- package/dist/patterns/library/command-injection-rust.yaml +11 -0
- package/dist/patterns/library/dangerous-eval-bash.yaml +11 -0
- package/dist/patterns/library/dangerous-eval-js.yaml +14 -0
- package/dist/patterns/library/dangerous-eval-php.yaml +11 -0
- package/dist/patterns/library/dangerous-eval-ruby.yaml +11 -0
- package/dist/patterns/library/dangerous-exec-py.yaml +13 -0
- package/dist/patterns/library/dangerous-reflection-java.yaml +8 -0
- package/dist/patterns/library/dynamic-load-lua.yaml +10 -0
- package/dist/patterns/library/os-cmd-elixir.yaml +16 -0
- package/dist/patterns/library/os-execute-lua.yaml +10 -0
- package/dist/patterns/library/path-traversal-go.yaml +11 -0
- package/dist/patterns/library/path-traversal-py.yaml +12 -0
- package/dist/patterns/library/path-traversal-readfile-js.yaml +14 -0
- package/dist/patterns/library/process-launch-swift.yaml +11 -0
- package/dist/patterns/library/process-run-dart.yaml +15 -0
- package/dist/patterns/library/prototype-pollution-js.yaml +12 -0
- package/dist/patterns/library/source-injection-bash.yaml +11 -0
- package/dist/patterns/library/sql-injection-concat-js.yaml +12 -0
- package/dist/patterns/library/sql-injection-dart.yaml +9 -0
- package/dist/patterns/library/sql-injection-java.yaml +13 -0
- package/dist/patterns/library/sql-injection-kotlin.yaml +11 -0
- package/dist/patterns/library/sql-injection-php.yaml +9 -0
- package/dist/patterns/library/sql-injection-py.yaml +12 -0
- package/dist/patterns/library/sql-injection-swift.yaml +11 -0
- package/dist/patterns/library/sql-injection-template-js.yaml +13 -0
- package/dist/patterns/library/subshell-injection-ruby.yaml +8 -0
- package/dist/patterns/library/unsafe-block-rust.yaml +8 -0
- package/dist/patterns/library/unsafe-string-c.yaml +11 -0
- package/dist/patterns/library/weak-crypto-md5-js.yaml +13 -0
- package/dist/patterns/library/weak-crypto-py.yaml +13 -0
- package/dist/patterns/loader.d.ts +18 -0
- package/dist/patterns/loader.d.ts.map +1 -0
- package/dist/patterns/loader.js +277 -0
- package/dist/patterns/loader.js.map +7 -0
- package/dist/patterns/runner.d.ts +42 -0
- package/dist/patterns/runner.d.ts.map +1 -0
- package/dist/patterns/runner.js +295 -0
- package/dist/patterns/runner.js.map +7 -0
- package/dist/patterns/types.d.ts +27 -0
- package/dist/patterns/types.d.ts.map +1 -0
- package/dist/patterns/types.js +34 -0
- package/dist/patterns/types.js.map +7 -0
- package/dist/resolution/bridges/android-rn.d.ts +13 -0
- package/dist/resolution/bridges/android-rn.d.ts.map +1 -0
- package/dist/resolution/bridges/expo-modules.d.ts +10 -0
- package/dist/resolution/bridges/expo-modules.d.ts.map +1 -0
- package/dist/resolution/bridges/flutter-channel.d.ts +14 -0
- package/dist/resolution/bridges/flutter-channel.d.ts.map +1 -0
- package/dist/resolution/bridges/index.d.ts +40 -0
- package/dist/resolution/bridges/index.d.ts.map +1 -0
- package/dist/resolution/bridges/native-events.d.ts +10 -0
- package/dist/resolution/bridges/native-events.d.ts.map +1 -0
- package/dist/resolution/bridges/native-views.d.ts +13 -0
- package/dist/resolution/bridges/native-views.d.ts.map +1 -0
- package/dist/resolution/bridges/react-native.d.ts +9 -0
- package/dist/resolution/bridges/react-native.d.ts.map +1 -0
- package/dist/resolution/bridges/swift-objc.d.ts +14 -0
- package/dist/resolution/bridges/swift-objc.d.ts.map +1 -0
- package/dist/resolution/bridges/turbomodules.d.ts +10 -0
- package/dist/resolution/bridges/turbomodules.d.ts.map +1 -0
- package/dist/resolution/index.d.ts +28 -3
- package/dist/resolution/index.d.ts.map +1 -1
- package/dist/security/attack-surface.d.ts +46 -0
- package/dist/security/attack-surface.d.ts.map +1 -0
- package/dist/security/attack-surface.js +43 -1
- package/dist/security/attack-surface.js.map +2 -2
- package/dist/security/context-warnings.d.ts +40 -0
- package/dist/security/context-warnings.d.ts.map +1 -0
- package/dist/security/data-flows.d.ts +33 -0
- package/dist/security/data-flows.d.ts.map +1 -0
- package/dist/security/data-flows.js +65 -7
- package/dist/security/data-flows.js.map +2 -2
- package/dist/security/dep-confusion.d.ts +23 -0
- package/dist/security/dep-confusion.d.ts.map +1 -0
- package/dist/security/errors.d.ts +16 -0
- package/dist/security/errors.d.ts.map +1 -0
- package/dist/security/export/fix-suggestions.d.ts +21 -0
- package/dist/security/export/fix-suggestions.d.ts.map +1 -0
- package/dist/security/export/sbom.d.ts +33 -0
- package/dist/security/export/sbom.d.ts.map +1 -0
- package/dist/security/export/serialization.d.ts +62 -0
- package/dist/security/export/serialization.d.ts.map +1 -0
- package/dist/security/export/vex.d.ts +58 -0
- package/dist/security/export/vex.d.ts.map +1 -0
- package/dist/security/index.d.ts +21 -0
- package/dist/security/index.d.ts.map +1 -0
- package/dist/security/integrator.d.ts +63 -0
- package/dist/security/integrator.d.ts.map +1 -0
- package/dist/security/integrator.js +8 -8
- package/dist/security/integrator.js.map +2 -2
- package/dist/security/license.d.ts +33 -0
- package/dist/security/license.d.ts.map +1 -0
- package/dist/security/manifest/adapter.d.ts +92 -0
- package/dist/security/manifest/adapter.d.ts.map +1 -0
- package/dist/security/manifest/parser.d.ts +73 -0
- package/dist/security/manifest/parser.d.ts.map +1 -0
- package/dist/security/manifest/plugins/cargo.d.ts +11 -0
- package/dist/security/manifest/plugins/cargo.d.ts.map +1 -0
- package/dist/security/manifest/plugins/composer.d.ts +11 -0
- package/dist/security/manifest/plugins/composer.d.ts.map +1 -0
- package/dist/security/manifest/plugins/go.d.ts +12 -0
- package/dist/security/manifest/plugins/go.d.ts.map +1 -0
- package/dist/security/manifest/plugins/gradle.d.ts +12 -0
- package/dist/security/manifest/plugins/gradle.d.ts.map +1 -0
- package/dist/security/manifest/plugins/hex.d.ts +11 -0
- package/dist/security/manifest/plugins/hex.d.ts.map +1 -0
- package/dist/security/manifest/plugins/maven.d.ts +11 -0
- package/dist/security/manifest/plugins/maven.d.ts.map +1 -0
- package/dist/security/manifest/plugins/npm.d.ts +11 -0
- package/dist/security/manifest/plugins/npm.d.ts.map +1 -0
- package/dist/security/manifest/plugins/nuget.d.ts +12 -0
- package/dist/security/manifest/plugins/nuget.d.ts.map +1 -0
- package/dist/security/manifest/plugins/pip.d.ts +11 -0
- package/dist/security/manifest/plugins/pip.d.ts.map +1 -0
- package/dist/security/manifest/plugins/pubspec.d.ts +11 -0
- package/dist/security/manifest/plugins/pubspec.d.ts.map +1 -0
- package/dist/security/manifest/plugins/pyproject.d.ts +3 -0
- package/dist/security/manifest/plugins/pyproject.d.ts.map +1 -0
- package/dist/security/manifest/plugins/rubygems.d.ts +11 -0
- package/dist/security/manifest/plugins/rubygems.d.ts.map +1 -0
- package/dist/security/manifest/plugins/swift.d.ts +11 -0
- package/dist/security/manifest/plugins/swift.d.ts.map +1 -0
- package/dist/security/owasp.d.ts +16 -0
- package/dist/security/owasp.d.ts.map +1 -0
- package/dist/security/pipeline.d.ts +37 -0
- package/dist/security/pipeline.d.ts.map +1 -0
- package/dist/security/reachability.d.ts +67 -0
- package/dist/security/reachability.d.ts.map +1 -0
- package/dist/security/remediation.d.ts +51 -0
- package/dist/security/remediation.d.ts.map +1 -0
- package/dist/security/secrets.d.ts +38 -0
- package/dist/security/secrets.d.ts.map +1 -0
- package/dist/security/staleness.d.ts +43 -0
- package/dist/security/staleness.d.ts.map +1 -0
- package/dist/security/supply-chain.d.ts +34 -0
- package/dist/security/supply-chain.d.ts.map +1 -0
- package/dist/security/suppressions.d.ts +18 -0
- package/dist/security/suppressions.d.ts.map +1 -0
- package/dist/security/types.d.ts +144 -0
- package/dist/security/types.d.ts.map +1 -0
- package/dist/security/vuln/client.d.ts +90 -0
- package/dist/security/vuln/client.d.ts.map +1 -0
- package/dist/security/vuln/client.js.map +2 -2
- package/dist/security/vuln/epss-client.d.ts +26 -0
- package/dist/security/vuln/epss-client.d.ts.map +1 -0
- package/dist/security/vuln/index.d.ts +6 -0
- package/dist/security/vuln/index.d.ts.map +1 -0
- package/dist/security/vuln/osv-adapter.d.ts +58 -0
- package/dist/security/vuln/osv-adapter.d.ts.map +1 -0
- package/dist/security/vuln/types.d.ts +29 -0
- package/dist/security/vuln/types.d.ts.map +1 -0
- package/dist/sync/index.d.ts +4 -2
- package/dist/sync/index.d.ts.map +1 -1
- package/dist/types.d.ts +10 -4
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js.map +2 -2
- package/dist/vectors/index.d.ts +11 -3
- package/dist/vectors/index.d.ts.map +1 -1
- package/dist/vectors/qdrant-index.d.ts +10 -3
- package/dist/vectors/qdrant-index.d.ts.map +1 -1
- package/dist/vectors/turboquant-index.js +261 -0
- package/dist/vectors/turboquant-index.js.map +7 -0
- package/dist/vectors/typesense-index.d.ts.map +1 -1
- package/dist/watchmen/index.js +83 -0
- package/dist/watchmen/index.js.map +7 -0
- package/dist/watchmen/synthesize.js +475 -0
- package/dist/watchmen/synthesize.js.map +7 -0
- package/package.json +24 -2
- package/dist/security/context-warnings.test.js +0 -300
- package/dist/security/context-warnings.test.js.map +0 -7
- package/dist/security/export/fix-suggestions.test.js +0 -74
- package/dist/security/export/fix-suggestions.test.js.map +0 -7
- package/dist/security/export/sbom.test.js +0 -288
- package/dist/security/export/sbom.test.js.map +0 -7
- package/dist/security/export/serialization.test.js +0 -310
- package/dist/security/export/serialization.test.js.map +0 -7
- package/dist/security/export/vex.test.js +0 -278
- package/dist/security/export/vex.test.js.map +0 -7
- package/dist/security/integrator-transitives.test.js +0 -359
- package/dist/security/integrator-transitives.test.js.map +0 -7
- package/dist/security/integrator.test.js +0 -237
- package/dist/security/integrator.test.js.map +0 -7
- package/dist/security/manifest/adapter.test.js +0 -272
- package/dist/security/manifest/adapter.test.js.map +0 -7
- package/dist/security/manifest/parser.test.js +0 -110
- package/dist/security/manifest/parser.test.js.map +0 -7
- package/dist/security/manifest/plugins/cargo.test.js +0 -304
- package/dist/security/manifest/plugins/cargo.test.js.map +0 -7
- package/dist/security/manifest/plugins/go.test.js +0 -341
- package/dist/security/manifest/plugins/go.test.js.map +0 -7
- package/dist/security/manifest/plugins/maven.test.js +0 -389
- package/dist/security/manifest/plugins/maven.test.js.map +0 -7
- package/dist/security/manifest/plugins/npm.test.js +0 -298
- package/dist/security/manifest/plugins/npm.test.js.map +0 -7
- package/dist/security/manifest/plugins/pip.test.js +0 -208
- package/dist/security/manifest/plugins/pip.test.js.map +0 -7
- package/dist/security/reachability.test.js +0 -394
- package/dist/security/reachability.test.js.map +0 -7
- package/dist/security/vuln/client.test.js +0 -288
- package/dist/security/vuln/client.test.js.map +0 -7
- package/dist/security/vuln/osv-adapter.test.js +0 -391
- package/dist/security/vuln/osv-adapter.test.js.map +0 -7
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"steering.d.ts","sourceRoot":"","sources":["../../../src/bin/installer/steering.ts"],"names":[],"mappings":"AAAA;;GAEG;
|
|
1
|
+
{"version":3,"file":"steering.d.ts","sourceRoot":"","sources":["../../../src/bin/installer/steering.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,OAAO,EAAiB,WAAW,EAAE,MAAM,WAAW,CAAC;AA8UvD,MAAM,WAAW,eAAe;IAC9B,WAAW,CAAC,EAAE,WAAW,GAAG,KAAK,CAAC;IAClC,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,qBAAqB,CAAC,EAAE,KAAK,GAAG,QAAQ,GAAG,YAAY,GAAG,OAAO,CAAC;IAClE,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;AAiMD,wBAAgB,aAAa,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,eAAe,GAAG,WAAW,GAAG,KAAK,GAAG,IAAI,CAejG"}
|
|
@@ -77,6 +77,7 @@ KiroGraph builds a semantic knowledge graph of your codebase. Use its MCP tools
|
|
|
77
77
|
| Are dependencies outdated? | \`kirograph_staleness\` |
|
|
78
78
|
| Generate SBOM/VEX | \`kirograph_sbom\` / \`kirograph_vex\` |
|
|
79
79
|
| Add a private CVE | \`kirograph_vuln_add\` |
|
|
80
|
+
| Find structural code patterns? | \`kirograph_live_search\` |
|
|
80
81
|
|
|
81
82
|
---
|
|
82
83
|
|
|
@@ -384,6 +385,9 @@ function buildSteeringContent(opts) {
|
|
|
384
385
|
content = content.replace("| Generate SBOM/VEX | `kirograph_sbom` / `kirograph_vex` |\n", "");
|
|
385
386
|
content = content.replace("| Add a private CVE | `kirograph_vuln_add` |\n", "");
|
|
386
387
|
}
|
|
388
|
+
if (!opts?.enablePatterns) {
|
|
389
|
+
content = content.replace("| Find structural code patterns? | `kirograph_live_search` |\n", "");
|
|
390
|
+
}
|
|
387
391
|
const caveman = cavemanMode && cavemanMode !== "off" ? import_caveman.CAVEMAN_RULES[cavemanMode] : null;
|
|
388
392
|
if (caveman) {
|
|
389
393
|
content = content.trimEnd() + "\n\n" + caveman + "\n";
|
|
@@ -457,6 +461,24 @@ kirograph_data_aggregate(dataset: "data-orders", groupBy: ["region"], metrics: [
|
|
|
457
461
|
`;
|
|
458
462
|
content = content.trimEnd() + "\n\n" + dataSection.trim() + "\n";
|
|
459
463
|
}
|
|
464
|
+
if (opts?.enablePatterns) {
|
|
465
|
+
const patternsSection = `
|
|
466
|
+
## Pattern Matching
|
|
467
|
+
|
|
468
|
+
KiroGraph can search for structural code patterns using @ast-grep/napi.
|
|
469
|
+
|
|
470
|
+
**Available tools (only when enablePatterns: true and @ast-grep/napi installed):**
|
|
471
|
+
- \`kirograph_live_search\` \u2014 search for any AST pattern across the codebase at query time
|
|
472
|
+
|
|
473
|
+
**CLI commands:**
|
|
474
|
+
- \`kirograph pattern "<pattern>"\` \u2014 live structural search
|
|
475
|
+
- \`kirograph pattern --list\` \u2014 browse bundled SAST rules
|
|
476
|
+
- \`kirograph pattern --library <id>\` \u2014 run a specific library rule
|
|
477
|
+
|
|
478
|
+
**When to use:** When you need to find code patterns that can't be expressed as symbol names or semantic queries \u2014 "all eval() calls", "all SQL string concatenation", "all readFile with request parameters".
|
|
479
|
+
`;
|
|
480
|
+
content = content.trimEnd() + "\n\n" + patternsSection.trim() + "\n";
|
|
481
|
+
}
|
|
460
482
|
if (opts?.enableSecurity) {
|
|
461
483
|
const securitySection = `
|
|
462
484
|
## Security
|
|
@@ -827,9 +849,68 @@ kirograph_vex() // Vulnerability Exploitability eXchange
|
|
|
827
849
|
`);
|
|
828
850
|
console.log(` \u2713 Security workflow steering file written`);
|
|
829
851
|
}
|
|
852
|
+
if (opts?.enablePatterns) {
|
|
853
|
+
fs.writeFileSync(path.join(steeringDir, "kirograph-patterns.md"), `---
|
|
854
|
+
inclusion: manual
|
|
855
|
+
---
|
|
856
|
+
|
|
857
|
+
# KiroGraph: Pattern Search Workflow
|
|
858
|
+
|
|
859
|
+
Use this workflow to find structural code patterns using AST matching.
|
|
860
|
+
Activate with \`/kirograph-patterns\` in Kiro IDE or CLI.
|
|
861
|
+
|
|
862
|
+
## Steps
|
|
863
|
+
|
|
864
|
+
### 1. Browse available rules
|
|
865
|
+
\`\`\`
|
|
866
|
+
kirograph_live_search(pattern: "--list")
|
|
867
|
+
\`\`\`
|
|
868
|
+
Or use the CLI: \`kirograph pattern --list\`
|
|
869
|
+
|
|
870
|
+
### 2. Search for a specific structural pattern
|
|
871
|
+
\`\`\`
|
|
872
|
+
kirograph_live_search(pattern: "eval($X)", language: "typescript")
|
|
873
|
+
\`\`\`
|
|
874
|
+
|
|
875
|
+
### 3. Run a bundled library rule
|
|
876
|
+
\`\`\`
|
|
877
|
+
kirograph pattern --library sql-injection-concat-js
|
|
878
|
+
\`\`\`
|
|
879
|
+
|
|
880
|
+
### 4. Add a custom rule
|
|
881
|
+
Create a YAML file in your \`patternLibraryPath\` directory:
|
|
882
|
+
\`\`\`yaml
|
|
883
|
+
id: my-custom-rule
|
|
884
|
+
language: [javascript, typescript]
|
|
885
|
+
severity: high
|
|
886
|
+
owaspCategory: A03
|
|
887
|
+
description: Custom pattern description
|
|
888
|
+
fixHint: How to fix this issue.
|
|
889
|
+
rule:
|
|
890
|
+
pattern: dangerousFunction($ARG)
|
|
891
|
+
\`\`\`
|
|
892
|
+
|
|
893
|
+
## Pattern syntax examples
|
|
894
|
+
|
|
895
|
+
| Pattern | Matches |
|
|
896
|
+
|---------|---------|
|
|
897
|
+
| \`eval($X)\` | Any eval() call |
|
|
898
|
+
| \`$OBJ.query($A + $B)\` | String concat in any query method |
|
|
899
|
+
| \`fs.$F(req.$P, $$$)\` | Any fs method with request param |
|
|
900
|
+
| \`createHash('md5')\` | Hardcoded MD5 usage |
|
|
901
|
+
|
|
902
|
+
## Interpretation
|
|
903
|
+
|
|
904
|
+
- Findings mean the pattern was found in the AST \u2014 not a false positive from symbol name matching
|
|
905
|
+
- Check the surrounding context: \`kirograph_node(symbol: "...", includeCode: true)\`
|
|
906
|
+
- Use \`kirograph_callers\` to understand how the affected function is reached
|
|
907
|
+
`);
|
|
908
|
+
console.log(` \u2713 Patterns workflow steering file written`);
|
|
909
|
+
}
|
|
830
910
|
const written = ["review", "debug", "onboard", "refactor"];
|
|
831
911
|
if (opts?.enableArchitecture) written.push("architecture");
|
|
832
912
|
if (opts?.enableSecurity) written.push("security");
|
|
913
|
+
if (opts?.enablePatterns) written.push("patterns");
|
|
833
914
|
console.log(` \u2713 Workflow steering files written (${written.join(", ")})`);
|
|
834
915
|
}
|
|
835
916
|
// Annotate the CommonJS export names for ESM import in node:
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/bin/installer/steering.ts"],
|
|
4
|
-
"sourcesContent": ["/**\n * KiroGraph Installer: Kiro steering file\n */\n\nimport * as fs from 'fs';\nimport * as path from 'path';\nimport { CAVEMAN_RULES, CavemanMode } from './caveman';\n\nconst STEERING_CONTENT = `---\ninclusion: always\n---\n\n# KiroGraph\n\nKiroGraph builds a semantic knowledge graph of your codebase. Use its MCP tools instead of grep/glob/file reads whenever \\`.kirograph/\\` exists in the project.\n\n## Quick decision guide\n\n| Question | Tool |\n|----------|------|\n| Where do I start on this task? | \\`kirograph_context\\` |\n| What is this symbol / show me its code | \\`kirograph_node\\` with \\`includeCode: true\\` |\n| Find a symbol by name | \\`kirograph_search\\` |\n| Who calls function X? | \\`kirograph_callers\\` |\n| What does function X call? | \\`kirograph_callees\\` |\n| What breaks if I change X? | \\`kirograph_impact\\` |\n| How are X and Y connected? | \\`kirograph_path\\` |\n| What extends / implements this type? | \\`kirograph_type_hierarchy\\` |\n| Which code is never called? | \\`kirograph_dead_code\\` |\n| Are there import cycles? | \\`kirograph_circular_deps\\` |\n| What files are indexed? | \\`kirograph_files\\` |\n| Is the index healthy? | \\`kirograph_status\\` |\n| What are the most critical symbols? | \\`kirograph_hotspots\\` |\n| Any unexpected cross-module coupling? | \\`kirograph_surprising\\` |\n| What changed since the last snapshot? | \\`kirograph_diff\\` |\n| What packages/layers exist? | \\`kirograph_architecture\\` |\n| How coupled is package X? | \\`kirograph_coupling\\` |\n| What does package X depend on? | \\`kirograph_package\\` |\n| Run a command with token savings | \\`kirograph_exec\\` |\n| Check token savings stats | \\`kirograph_gain\\` |\n| What data files are indexed? | \\`kirograph_data_list\\` |\n| What columns does this dataset have? | \\`kirograph_data_describe\\` |\n| Query rows with filters | \\`kirograph_data_query\\` |\n| Aggregate data (sum, avg, count) | \\`kirograph_data_aggregate\\` |\n| Are there vulnerable dependencies? | \\`kirograph_security\\` |\n| Which CVEs affect my project? | \\`kirograph_vulns\\` |\n| Is this vulnerability reachable? | \\`kirograph_reachability\\` |\n| What licenses do my dependencies use? | \\`kirograph_licenses\\` |\n| Are dependencies outdated? | \\`kirograph_staleness\\` |\n| Generate SBOM/VEX | \\`kirograph_sbom\\` / \\`kirograph_vex\\` |\n| Add a private CVE | \\`kirograph_vuln_add\\` |\n\n---\n\n## Tool reference\n\n### \\`kirograph_context\\`: **start here for any code task**\n\nReturns entry points, related symbols, and code snippets for a natural-language task description. Usually enough to orient without any additional tool calls.\n\n\\`\\`\\`\nkirograph_context(task: \"fix the auth token expiry bug\")\nkirograph_context(task: \"add dark mode\", maxNodes: 30)\nkirograph_context(task: \"refactor payment service\", includeCode: false)\n\\`\\`\\`\n\n### \\`kirograph_search\\`: find symbols by name\n\nExact match \u2192 FTS \u2192 LIKE fallback \u2192 vector (last resort). Use instead of grep.\n\n\\`\\`\\`\nkirograph_search(query: \"signIn\")\nkirograph_search(query: \"UserService\", kind: \"class\")\nkirograph_search(query: \"auth\", limit: 20)\n\\`\\`\\`\n\nSupported kinds: \\`function\\`, \\`method\\`, \\`class\\`, \\`interface\\`, \\`type_alias\\`, \\`variable\\`, \\`route\\`, \\`component\\`\n\n### \\`kirograph_node\\`: inspect a symbol\n\nReturns kind, file, signature, docstring. Add \\`includeCode: true\\` to get the full source.\n\n\\`\\`\\`\nkirograph_node(symbol: \"validateToken\")\nkirograph_node(symbol: \"AuthService\", includeCode: true)\n\\`\\`\\`\n\n### \\`kirograph_callers\\`: who calls this?\n\nBFS over incoming \\`calls\\` edges (depth 1).\n\n\\`\\`\\`\nkirograph_callers(symbol: \"processPayment\", limit: 30)\n\\`\\`\\`\n\n### \\`kirograph_callees\\`: what does this call?\n\nBFS over outgoing \\`calls\\` edges (depth 1).\n\n\\`\\`\\`\nkirograph_callees(symbol: \"handleRequest\")\n\\`\\`\\`\n\n### \\`kirograph_impact\\`: blast radius before a change\n\nTraverses all incoming edges up to \\`depth\\` hops. Call this before editing a symbol.\n\n\\`\\`\\`\nkirograph_impact(symbol: \"UserRepository\", depth: 3)\n\\`\\`\\`\n\n### \\`kirograph_path\\`: how are two symbols connected?\n\nBFS shortest path across all edge types.\n\n\\`\\`\\`\nkirograph_path(from: \"LoginController\", to: \"DatabasePool\")\n\\`\\`\\`\n\n### \\`kirograph_type_hierarchy\\`: class/interface inheritance\n\n\\`\\`\\`\nkirograph_type_hierarchy(symbol: \"BaseRepository\", direction: \"down\") // derived types\nkirograph_type_hierarchy(symbol: \"PaymentService\", direction: \"up\") // base types\nkirograph_type_hierarchy(symbol: \"IUserStore\", direction: \"both\") // all\n\\`\\`\\`\n\n### \\`kirograph_dead_code\\`: unreferenced symbols\n\nReturns unexported symbols with zero incoming edges. Good first step when cleaning up.\n\n\\`\\`\\`\nkirograph_dead_code(limit: 50)\n\\`\\`\\`\n\n### \\`kirograph_circular_deps\\`: import cycles\n\nRuns Tarjan's SCC over import edges. No parameters needed.\n\n\\`\\`\\`\nkirograph_circular_deps()\n\\`\\`\\`\n\n### \\`kirograph_files\\`: indexed file structure\n\n\\`\\`\\`\nkirograph_files(format: \"tree\") // default\nkirograph_files(format: \"flat\") // one path per line\nkirograph_files(format: \"grouped\") // by directory\nkirograph_files(filterPath: \"src/auth\", maxDepth: 2)\nkirograph_files(pattern: \"**/*.test.ts\")\n\\`\\`\\`\n\n### \\`kirograph_status\\`: index health\n\nReturns file count, symbol count, edge count, embedding coverage, DB size. Call when something feels off.\n\n### \\`kirograph_hotspots\\`: most-connected symbols\n\nReturns the top-N symbols by total edge degree (in + out, excluding structural \\`contains\\` edges). Use to find core abstractions, identify high blast-radius symbols before a refactor, or understand what the codebase revolves around.\n\n\\`\\`\\`\nkirograph_hotspots(limit: 20)\n\\`\\`\\`\n\n### \\`kirograph_surprising\\`: unexpected cross-module coupling\n\nFinds direct edges between symbols in structurally distant files, scored by path distance \u00D7 edge-kind weight. Use before a refactor to discover hidden dependencies that will break. High score = more unexpected.\n\n\\`\\`\\`\nkirograph_surprising(limit: 20)\n\\`\\`\\`\n\n### \\`kirograph_diff\\`: what changed since a snapshot?\n\nCompares the current graph against a saved snapshot. Shows added/removed symbols and edges. A snapshot must exist: the user saves one with \\`kirograph snapshot save <label>\\` before making changes.\n\n\\`\\`\\`\nkirograph_diff() // vs latest snapshot\nkirograph_diff(snapshot: \"pre-refactor\") // vs named snapshot\n\\`\\`\\`\n\n---\n\n## Architecture tools *(require \\`enableArchitecture: true\\` in config)*\n\n### \\`kirograph_architecture\\`: **start here for architectural questions**\n\nReturns the full package graph, detected layers (api/service/data/ui/shared), and their dependency edges.\n\n\\`\\`\\`\nkirograph_architecture() // packages + layers\nkirograph_architecture(level: \"packages\")\nkirograph_architecture(level: \"layers\")\nkirograph_architecture(includeFiles: true) // add file\u2192package assignments\n\\`\\`\\`\n\n### \\`kirograph_coupling\\`: stability metrics per package\n\nReturns Ca (afferent: depended on by), Ce (efferent: depends on), and instability (Ce/(Ca+Ce)).\n- High Ca + low instability = load-bearing, safe to depend on, risky to change interface.\n- High Ce + high instability = depends on many things, safe to refactor internals.\n\n\\`\\`\\`\nkirograph_coupling() // all packages, sorted by instability\nkirograph_coupling(sortBy: \"afferent\") // most depended-on first\nkirograph_coupling(sortBy: \"efferent\") // most outgoing deps first\n\\`\\`\\`\n\n### \\`kirograph_package\\`: drill into one package\n\nReturns metadata, coupling metrics, outgoing deps, incoming dependents, and file list.\n\n\\`\\`\\`\nkirograph_package(package: \"auth\")\nkirograph_package(package: \"src/services\", includeFiles: false)\n\\`\\`\\`\n\n---\n\n## Workflows\n\n**Bug fix or feature:**\n1. \\`kirograph_context\\`: orient, find entry points.\n2. \\`kirograph_node\\` with \\`includeCode: true\\`: read the relevant symbol.\n3. \\`kirograph_callers\\` / \\`kirograph_callees\\`: trace the call flow.\n4. \\`kirograph_impact\\`: check blast radius before editing.\n\n**Refactor planning:**\n1. \\`kirograph_hotspots\\`: identify the most-connected symbols; changing these is risky.\n2. \\`kirograph_surprising\\`: surface hidden coupling that will break.\n3. \\`kirograph_impact\\` on specific targets: confirm blast radius.\n4. \\`kirograph_diff\\` after the refactor: verify the structural change matches intent.\n\n**Architectural review:**\n1. \\`kirograph_architecture\\`: get the package and layer map.\n2. \\`kirograph_coupling\\`: find the most stable (high Ca) and most volatile (high instability) packages.\n3. \\`kirograph_package\\`: drill into any package of interest.\n4. \\`kirograph_circular_deps\\`: check for import cycles.\n\n**Code cleanup:**\n1. \\`kirograph_dead_code\\`: find unreferenced unexported symbols.\n2. \\`kirograph_circular_deps\\`: find import cycles to untangle.\n3. \\`kirograph_surprising\\`: find unexpected coupling to decouple.\n\n---\n\n## Workflow steering files\n\nKiroGraph installs task-specific steering files in \\`.kiro/steering/\\`. They are not always active \u2014 load them on demand.\n\n**In Kiro IDE:** type \\`/kirograph-review\\`, \\`/kirograph-security\\`, etc. to activate a workflow for the current session.\n\n**In Kiro CLI / other agents:** when the user asks for a specific workflow or you recognize the intent, read the file directly:\n\n\\`\\`\\`\nRead file: .kiro/steering/kirograph-security.md\nRead file: .kiro/steering/kirograph-review.md\n\\`\\`\\`\n\n| User intent | File to load |\n|-------------|-------------|\n| security audit, check vulnerabilities, CVE review | \\`.kiro/steering/kirograph-security.md\\` *(requires enableSecurity)* |\n| code review, review this PR | \\`.kiro/steering/kirograph-review.md\\` |\n| debug, trace this bug, root cause | \\`.kiro/steering/kirograph-debug.md\\` |\n| architecture, understand structure, package map | \\`.kiro/steering/kirograph-architecture.md\\` *(requires enableArchitecture)* |\n| onboard, understand this codebase | \\`.kiro/steering/kirograph-onboard.md\\` |\n| refactor, rename, safe refactoring | \\`.kiro/steering/kirograph-refactor.md\\` |\n\nEach file contains numbered steps, exact tool calls, and an interpretation reference. Follow the steps in order.\n\n---\n\n## If \\`.kirograph/\\` does NOT exist\n\nAsk the user: \"This project doesn't have KiroGraph initialized. Run \\`kirograph init -i\\` to build a code knowledge graph for faster exploration?\"\n`;\n\n// \u2500\u2500 Compression section builder (level-aware) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\nconst LEVEL_DESCRIPTIONS: Record<string, string> = {\n normal: 'Balanced: removes noise, keeps structure.',\n aggressive: 'Compact: groups by category, limits output.',\n ultra: 'Maximum compression: counts and summaries only.',\n};\n\nconst LEVEL_EXAMPLES: Record<string, string> = {\n normal: `\\\\\\`\\\\\\`\\\\\\`\nkirograph_exec(command: \"git status\")\nkirograph_exec(command: \"npm test\")\nkirograph_exec(command: \"cargo build\")\nkirograph_exec(command: \"ls -la src/\")\n\\\\\\`\\\\\\`\\\\\\``,\n aggressive: `\\\\\\`\\\\\\`\\\\\\`\nkirograph_exec(command: \"git status\", level: \"aggressive\")\nkirograph_exec(command: \"npm test\", level: \"aggressive\")\nkirograph_exec(command: \"eslint .\", level: \"aggressive\")\nkirograph_exec(command: \"find . -name '*.ts'\", level: \"aggressive\")\n\\\\\\`\\\\\\`\\\\\\``,\n ultra: `\\\\\\`\\\\\\`\\\\\\`\nkirograph_exec(command: \"git status\", level: \"ultra\")\nkirograph_exec(command: \"npm test\", level: \"ultra\")\nkirograph_exec(command: \"docker ps\", level: \"ultra\")\nkirograph_exec(command: \"ls -la src/\", level: \"ultra\")\n\\\\\\`\\\\\\`\\\\\\``,\n};\n\nfunction buildCompressionSection(level: 'normal' | 'aggressive' | 'ultra'): string {\n return `\n---\n\n## Shell Compression (\\\\\\`kirograph_exec\\\\\\`)\n\nWhen running shell commands, prefer \\\\\\`kirograph_exec\\\\\\` over raw shell execution for:\n- **git** operations (status, log, diff, push, pull, commit, add, fetch, branch)\n- **GitHub CLI** (gh pr list/view, gh issue list, gh run list)\n- **test runners** (jest, vitest, pytest, cargo test, go test, rspec, minitest, playwright)\n- **linters/build** (eslint, tsc, ruff, clippy, cargo build, prettier, biome, golangci-lint, rubocop, next build)\n- **file listings** (ls, find, tree)\n- **search** (grep, rg/ripgrep: grouped by file)\n- **diff** (diff file1 file2: condensed context)\n- **docker/k8s** (docker ps, images, logs, compose ps, kubectl pods, logs, services)\n- **package managers** (npm/pnpm install/list, pip list/install, bundle install, prisma generate)\n- **AWS CLI** (sts, ec2, lambda, logs, cloudformation, dynamodb, iam, s3, ecs, sqs, sns)\n- **network** (curl, wget: strip progress bars and headers)\n\nThis saves 60-90% of tokens compared to raw output.\n\nCompression level: **${level}**: ${LEVEL_DESCRIPTIONS[level]}\n\n${LEVEL_EXAMPLES[level]}\n\n**Important:** Error details are always preserved. Failed commands show full diagnostic output regardless of level.\n\n**Do NOT re-run commands:** When \\\\\\`kirograph_exec\\\\\\` returns a result, treat it as the final answer. Never re-run the same command with raw shell execution to \"get more details.\" The compressed output preserves all essential information. If you genuinely need something missing from the output, explain what's missing before making a second call.\n\nUse \\\\\\`kirograph_gain\\\\\\` to check token savings statistics.`;\n}\n\nexport interface SteeringOptions {\n cavemanMode?: CavemanMode | 'off';\n enableCompression?: boolean;\n shellCompressionLevel?: 'off' | 'normal' | 'aggressive' | 'ultra';\n enableArchitecture?: boolean;\n enableMemory?: boolean;\n enableDocs?: boolean;\n enableData?: boolean;\n enableSecurity?: boolean;\n}\n\nfunction buildSteeringContent(opts?: SteeringOptions): string {\n const cavemanMode = opts?.cavemanMode;\n const enableCompression = opts?.enableCompression !== false && opts?.shellCompressionLevel !== 'off';\n const shellCompressionLevel = opts?.shellCompressionLevel ?? 'normal';\n\n let content = STEERING_CONTENT;\n\n // Insert compression section before the \"If .kirograph/ does NOT exist\" section\n if (enableCompression && shellCompressionLevel !== 'off') {\n const section = buildCompressionSection(shellCompressionLevel as 'normal' | 'aggressive' | 'ultra');\n content = content.replace(\n '---\\n\\n## If `.kirograph/` does NOT exist',\n section.trim() + '\\n\\n---\\n\\n## If `.kirograph/` does NOT exist',\n );\n }\n\n // Remove compression tools from decision guide if disabled\n if (!enableCompression) {\n content = content.replace('| Run a command with token savings | `kirograph_exec` |\\n', '');\n content = content.replace('| Check token savings stats | `kirograph_gain` |\\n', '');\n }\n\n // Remove security tools from decision guide if disabled\n if (!opts?.enableSecurity) {\n content = content.replace('| Are there vulnerable dependencies? | `kirograph_security` |\\n', '');\n content = content.replace('| Which CVEs affect my project? | `kirograph_vulns` |\\n', '');\n content = content.replace('| Is this vulnerability reachable? | `kirograph_reachability` |\\n', '');\n content = content.replace('| What licenses do my dependencies use? | `kirograph_licenses` |\\n', '');\n content = content.replace('| Are dependencies outdated? | `kirograph_staleness` |\\n', '');\n content = content.replace('| Generate SBOM/VEX | `kirograph_sbom` / `kirograph_vex` |\\n', '');\n content = content.replace('| Add a private CVE | `kirograph_vuln_add` |\\n', '');\n }\n\n const caveman = cavemanMode && cavemanMode !== 'off' ? CAVEMAN_RULES[cavemanMode] : null;\n if (caveman) {\n content = content.trimEnd() + '\\n\\n' + caveman + '\\n';\n }\n\n // Memory section\n if (opts?.enableMemory) {\n const memorySection = `\n## Memory\n\nKiroGraph has persistent memory. Use \\`kirograph_mem_search\\` to recall past decisions,\nerrors, and patterns before making changes. Use \\`kirograph_mem_store\\` to save important\nobservations (architecture decisions, bug root causes, patterns discovered).\n\nMemory is searchable via hybrid FTS + vector search. Observations are automatically\nlinked to code symbols in the graph and surface in \\`kirograph_context\\` and\n\\`kirograph_impact\\` results when relevant.\n\n**When to store:** After fixing a bug, making an architecture decision, discovering a pattern,\nencountering a non-obvious error, or learning something about the codebase that future sessions\nshould know. Keep observations concise \u2014 one fact per store call. A hook will also remind you\nat session end.\n`;\n content = content.trimEnd() + '\\n\\n' + memorySection.trim() + '\\n';\n }\n\n // Documentation section\n if (opts?.enableDocs) {\n const docsSection = `\n## Documentation\n\nKiroGraph indexes project documentation by heading structure. Use \\`kirograph_docs_search\\`\nto find relevant doc sections instead of reading entire files. Use \\`kirograph_docs_section\\`\nto retrieve the exact section you need by ID.\n\n**Available tools:**\n- \\`kirograph_docs_toc\\` \u2014 table of contents for a file or the whole project\n- \\`kirograph_docs_search\\` \u2014 search sections by query (independent from code search)\n- \\`kirograph_docs_section\\` \u2014 retrieve full content of a section by ID\n- \\`kirograph_docs_outline\\` \u2014 heading hierarchy for a single document\n- \\`kirograph_docs_refs\\` \u2014 find code symbols referenced by a doc section (or vice versa)\n\n**When to use:** Before reading a documentation file directly, check if \\`kirograph_docs_search\\`\nor \\`kirograph_docs_outline\\` can give you the specific section you need. This saves tokens\nand gives you structured navigation instead of raw file content.\n`;\n content = content.trimEnd() + '\\n\\n' + docsSection.trim() + '\\n';\n }\n\n // Data section\n if (opts?.enableData) {\n const dataSection = `\n## Data\n\nKiroGraph indexes tabular data files (CSV, TSV, JSONL, JSON, Excel, Parquet) for structured\nquerying. Use \\`kirograph_data_describe\\` to understand a dataset's schema without loading\nthe file. Use \\`kirograph_data_query\\` with filters to retrieve specific rows.\n\n**Available tools:**\n- \\`kirograph_data_list\\` \u2014 list all indexed datasets with row/column counts\n- \\`kirograph_data_describe\\` \u2014 full schema profile: column names, types, cardinality, null%, samples\n- \\`kirograph_data_query\\` \u2014 filtered row retrieval with structured operators (eq, gt, contains, in, between)\n- \\`kirograph_data_aggregate\\` \u2014 server-side GROUP BY: count, sum, avg, min, max, count_distinct\n- \\`kirograph_data_search\\` \u2014 search column names and sample values by keyword\n\n**When to use:** Instead of reading a CSV/data file directly (which floods context with raw rows),\nuse \\`kirograph_data_describe\\` to understand the schema, then \\`kirograph_data_query\\` with\nfilters to get only the rows you need. For summary statistics, use \\`kirograph_data_aggregate\\`\nto compute results server-side. This saves 95-99% of tokens compared to reading raw data files.\n\n\\`\\`\\`\nkirograph_data_list()\nkirograph_data_describe(dataset: \"tests-fixtures-users\")\nkirograph_data_query(dataset: \"tests-fixtures-users\", filters: [{column: \"role\", op: \"eq\", value: \"admin\"}])\nkirograph_data_aggregate(dataset: \"data-orders\", groupBy: [\"region\"], metrics: [{column: \"amount\", op: \"sum\"}])\n\\`\\`\\`\n`;\n content = content.trimEnd() + '\\n\\n' + dataSection.trim() + '\\n';\n }\n\n // Security section\n if (opts?.enableSecurity) {\n const securitySection = `\n## Security\n\nKiroGraph scans dependency manifests across 14 ecosystems for known vulnerabilities, performs\ncall-graph reachability analysis, tracks exploitation probability (EPSS), checks license\ncompliance, and monitors dependency staleness.\n\n**Available tools:**\n- \\`kirograph_security\\` \u2014 overview: dep count, CVE count, verdict breakdown, stale warnings\n- \\`kirograph_vulns\\` \u2014 list CVEs with severity, EPSS score, reachability verdict, fix suggestion\n- \\`kirograph_reachability\\` \u2014 deep-dive: call paths, entry points, affected layers for one CVE or package\n- \\`kirograph_licenses\\` \u2014 list dependency licenses; flag policy violations (deny/warn by SPDX pattern)\n- \\`kirograph_staleness\\` \u2014 identify outdated dependencies (staleness score 0.0\u20131.0)\n- \\`kirograph_sbom\\` \u2014 export CycloneDX 1.5 SBOM for compliance/auditing\n- \\`kirograph_vex\\` \u2014 export CycloneDX 1.5 VEX with reachability-derived analysis states\n- \\`kirograph_vuln_add\\` \u2014 manually register a private/internal CVE not in public databases\n\n**Proactive triggers \u2014 run \\`kirograph_security\\` when:**\n- You or the user add/update/remove a dependency\n- Before a production deploy or release branch cut\n- The user asks about security, compliance, or \"is it safe to upgrade X\"\n- \\`kirograph_context\\` surfaces a \u26A0 Security warning in its output\n\n**Interpreting verdicts:**\n- \\`affected\\` \u2014 a call path exists from an entry point to the vulnerable code. Act on this.\n- \\`not_affected\\` \u2014 no reachable path found, no unresolved imports. Strong signal: likely safe.\n- \\`under_investigation\\` \u2014 traversal hit unresolved symbols (dynamic dispatch, reflection). Treat with caution.\n\n**Interpreting EPSS scores** (shown by \\`kirograph_vulns\\`):\n- \\`>= 0.5\\` \u2014 actively exploited or very likely to be. Patch immediately regardless of CVSS.\n- \\`0.1 \u2013 0.5\\` \u2014 elevated risk. Prioritize over low-EPSS vulns with higher CVSS.\n- \\`< 0.1\\` \u2014 low exploitation probability. Use CVSS + reachability for triage.\n\n**Recommended workflow:**\n1. \\`kirograph_security\\` \u2014 get the big picture before diving in\n2. \\`kirograph_vulns --verdict affected\\` \u2014 focus only on confirmed reachable CVEs\n3. For each high-EPSS or high-CVSS result: \\`kirograph_reachability <cve>\\` to see exact call paths\n4. \\`kirograph_licenses --policy\\` \u2014 check for license violations before shipping\n5. \\`kirograph_staleness --threshold 0.5\\` \u2014 flag severely outdated dependencies\n6. Fix, then \\`kirograph_vulns --refresh\\` to re-query OSV and confirm resolution\n7. \\`kirograph_vex\\` / \\`kirograph_sbom\\` for compliance artifacts\n\n**Staleness score guide:** 0.0 = current; 0.3+ = worth reviewing; 0.7+ = significantly behind.\nA high staleness score alone is not a security issue, but old dependencies accumulate CVEs over time.\n`;\n content = content.trimEnd() + '\\n\\n' + securitySection.trim() + '\\n';\n }\n\n return content;\n}\n\nexport function writeSteering(kiroDir: string, opts?: SteeringOptions | CavemanMode | 'off'): void {\n const steeringDir = path.join(kiroDir, 'steering');\n fs.mkdirSync(steeringDir, { recursive: true });\n const steeringPath = path.join(steeringDir, 'kirograph.md');\n\n // Support both old signature (cavemanMode string) and new signature (options object)\n const resolvedOpts: SteeringOptions = typeof opts === 'string'\n ? { cavemanMode: opts }\n : opts ?? {};\n\n fs.writeFileSync(steeringPath, buildSteeringContent(resolvedOpts));\n console.log(` \u2713 Steering file written to ${steeringPath}`);\n\n // Write workflow-specific steering files\n writeWorkflowSteering(steeringDir, resolvedOpts);\n}\n\nfunction writeWorkflowSteering(steeringDir: string, opts?: SteeringOptions): void {\n const workflows: Record<string, string> = {\n 'kirograph-review.md': `---\ninclusion: manual\n---\n\n# KiroGraph: Code Review Workflow\n\nFollow these steps for a structured, risk-aware code review using the knowledge graph.\n\n## Steps\n\n1. **Understand the change scope**\n \\`\\`\\`\n kirograph_context(task: \"<describe what changed>\")\n \\`\\`\\`\n\n2. **Analyze blast radius**\n For each key symbol that was modified:\n \\`\\`\\`\n kirograph_impact(symbol: \"<changed symbol>\", depth: 2)\n \\`\\`\\`\n\n3. **Check test coverage**\n \\`\\`\\`\n kirograph_callers(symbol: \"<changed symbol>\")\n \\`\\`\\`\n Look for test files among the callers. Flag untested changes.\n\n4. **Look for surprising coupling**\n \\`\\`\\`\n kirograph_surprising(limit: 10)\n \\`\\`\\`\n\n5. **Produce findings** grouped by risk level (high/medium/low) with:\n - What changed and why it matters\n - Test coverage status\n - Suggested improvements\n - Overall merge recommendation\n`,\n\n 'kirograph-debug.md': `---\ninclusion: manual\n---\n\n# KiroGraph: Debug Workflow\n\nFollow these steps to systematically trace and debug issues using the knowledge graph.\n\n## Steps\n\n1. **Find related code**\n \\`\\`\\`\n kirograph_search(query: \"<error message or symptom keywords>\")\n \\`\\`\\`\n\n2. **Get full context**\n \\`\\`\\`\n kirograph_context(task: \"<describe the bug>\")\n \\`\\`\\`\n\n3. **Trace the call chain**\n \\`\\`\\`\n kirograph_callers(symbol: \"<suspected function>\")\n kirograph_callees(symbol: \"<suspected function>\")\n \\`\\`\\`\n\n4. **Check what changed recently**\n \\`\\`\\`\n kirograph_diff()\n \\`\\`\\`\n\n5. **Understand blast radius**\n \\`\\`\\`\n kirograph_impact(symbol: \"<root cause symbol>\", depth: 3)\n \\`\\`\\`\n\n## Tips\n- Check both callers and callees to understand the full context\n- Recent changes (via diff) are the most common source of new issues\n- Use \\`kirograph_path\\` to trace how two symbols are connected\n`,\n\n 'kirograph-architecture.md': `---\ninclusion: manual\n---\n\n# KiroGraph: Architecture Exploration Workflow\n\nFollow these steps to understand the high-level structure of the codebase.\n\n## Steps\n\n1. **Get project overview**\n \\`\\`\\`\n kirograph_status()\n \\`\\`\\`\n\n2. **View architecture**\n \\`\\`\\`\n kirograph_architecture()\n \\`\\`\\`\n\n3. **Check coupling health**\n \\`\\`\\`\n kirograph_coupling(sortBy: \"instability\")\n \\`\\`\\`\n\n4. **Find core abstractions**\n \\`\\`\\`\n kirograph_hotspots(limit: 20)\n \\`\\`\\`\n\n5. **Detect hidden dependencies**\n \\`\\`\\`\n kirograph_surprising(limit: 15)\n \\`\\`\\`\n\n6. **Check for cycles**\n \\`\\`\\`\n kirograph_circular_deps()\n \\`\\`\\`\n\n## Interpretation\n- High Ca (afferent) = load-bearing, risky to change interface\n- High Ce (efferent) = depends on many things, safe to refactor internals\n- Surprising edges = hidden coupling that may break during refactoring\n`,\n\n 'kirograph-onboard.md': `---\ninclusion: manual\n---\n\n# KiroGraph: Onboarding Workflow\n\nFollow these steps to quickly understand a new codebase.\n\n## Steps\n\n1. **Project overview**\n \\`\\`\\`\n kirograph_status()\n \\`\\`\\`\n\n2. **File structure**\n \\`\\`\\`\n kirograph_files(format: \"tree\", maxDepth: 2)\n \\`\\`\\`\n\n3. **Key entry points**\n \\`\\`\\`\n kirograph_hotspots(limit: 15)\n \\`\\`\\`\n\n4. **Architecture layers**\n \\`\\`\\`\n kirograph_architecture()\n \\`\\`\\`\n\n5. **Explore a specific area**\n \\`\\`\\`\n kirograph_context(task: \"<area you want to understand>\")\n \\`\\`\\`\n\n6. **Understand a key symbol**\n \\`\\`\\`\n kirograph_node(symbol: \"<symbol name>\", includeCode: true)\n \\`\\`\\`\n\n## Tips\n- Start broad (status, files, hotspots) then narrow down\n- Use \\`kirograph_type_hierarchy\\` to understand inheritance patterns\n- Use \\`kirograph_callees\\` on entry points to trace execution flow\n`,\n\n 'kirograph-refactor.md': `---\ninclusion: manual\n---\n\n# KiroGraph: Refactoring Workflow\n\nFollow these steps to plan and execute safe refactoring.\n\n## Steps\n\n1. **Understand what you're changing**\n \\`\\`\\`\n kirograph_node(symbol: \"<target symbol>\", includeCode: true)\n \\`\\`\\`\n\n2. **Check blast radius**\n \\`\\`\\`\n kirograph_impact(symbol: \"<target symbol>\", depth: 3)\n \\`\\`\\`\n\n3. **Find all callers (rename preview)**\n \\`\\`\\`\n kirograph_callers(symbol: \"<target symbol>\", limit: 50)\n \\`\\`\\`\n\n4. **Check for cycles that might complicate the refactor**\n \\`\\`\\`\n kirograph_circular_deps()\n \\`\\`\\`\n\n5. **Find dead code to clean up**\n \\`\\`\\`\n kirograph_dead_code(limit: 30)\n \\`\\`\\`\n\n6. **Verify after changes**\n Run \\`kirograph sync\\` then:\n \\`\\`\\`\n kirograph_diff()\n \\`\\`\\`\n\n## Safety Checks\n- Always check \\`kirograph_impact\\` before major refactors\n- Use \\`kirograph_callers\\` as a rename preview (all locations that reference the symbol)\n- After changes, use \\`kirograph_diff\\` to verify only intended symbols changed\n`,\n };\n\n // kirograph-architecture.md only when enableArchitecture is true\n if (opts?.enableArchitecture) {\n fs.writeFileSync(path.join(steeringDir, 'kirograph-architecture.md'), workflows['kirograph-architecture.md']!);\n }\n\n // Always write the non-conditional workflow files\n for (const [filename, content] of Object.entries(workflows)) {\n if (filename === 'kirograph-architecture.md') continue; // handled above\n fs.writeFileSync(path.join(steeringDir, filename), content);\n }\n\n // Security workflow \u2014 only when enableSecurity is true\n if (opts?.enableSecurity) {\n fs.writeFileSync(path.join(steeringDir, 'kirograph-security.md'), `---\ninclusion: manual\n---\n\n# KiroGraph: Security Audit Workflow\n\nFollow these steps for a structured security audit using the knowledge graph.\nActivate this workflow before a release, after adding dependencies, or when asked to review security posture.\n\n## Steps\n\n### 1. Overview\n\\`\\`\\`\nkirograph_security()\n\\`\\`\\`\nNote: total dependencies, vulnerability count, verdict breakdown, stale warning count.\n\n### 2. Triage reachable vulnerabilities\n\\`\\`\\`\nkirograph_vulns(verdict: \"affected\")\n\\`\\`\\`\nFocus only on confirmed reachable CVEs. Sort output by EPSS score (exploitation probability) first, then CVSS severity.\n\n**Act immediately on:** EPSS >= 0.5 (actively exploited). Patch regardless of CVSS.\n**Prioritize:** EPSS 0.1\u20130.5 over low-EPSS high-CVSS entries.\n**Low urgency:** EPSS < 0.1 \u2014 use CVSS + reachability for triage.\n\n### 3. Deep-dive reachability for critical CVEs\nFor each high-priority CVE from step 2:\n\\`\\`\\`\nkirograph_reachability(target: \"<CVE-ID or package name>\")\n\\`\\`\\`\nThis shows: exact call paths from entry points, affected architectural layers, distinct path count.\n\n- \\`affected\\` verdict with known entry points \u2192 fix this dependency\n- \\`not_affected\\` \u2192 no reachable path, document and move on\n- \\`under_investigation\\` \u2192 unresolved symbols, treat conservatively\n\n### 4. Check for under-investigation CVEs\n\\`\\`\\`\nkirograph_vulns(verdict: \"under_investigation\")\n\\`\\`\\`\nFor each: run \\`kirograph_reachability\\` to see what symbols are unresolved. If you can determine\nthe symbol is not called, you can downgrade to not_affected manually.\n\n### 5. License compliance\n\\`\\`\\`\nkirograph_licenses(policy: true)\n\\`\\`\\`\nReview any DENY violations \u2014 these must be resolved before shipping.\nWARN violations should be documented and approved by the team.\n\n### 6. Dependency staleness\n\\`\\`\\`\nkirograph_staleness(threshold: 0.5)\n\\`\\`\\`\nScore guide: 0.3+ = worth reviewing, 0.7+ = significantly behind.\nCross-reference with step 2 results: stale + vulnerable = highest priority.\n\n### 7. Refresh data if needed\nIf vulnerability data looks stale (flagged in step 1) or dependencies changed recently:\n\\`\\`\\`\nkirograph_vulns(refresh: true)\n\\`\\`\\`\n\n### 8. Export compliance artifacts\n\\`\\`\\`\nkirograph_sbom() // Software Bill of Materials\nkirograph_vex() // Vulnerability Exploitability eXchange\n\\`\\`\\`\n\n## Interpretation Reference\n\n| Signal | Meaning | Action |\n|--------|---------|--------|\n| \\`affected\\` + EPSS >= 0.5 | Actively exploited, reachable | Patch immediately |\n| \\`affected\\` + CVSS >= 9.0 | Critical, reachable | Patch this sprint |\n| \\`affected\\` + CVSS 7.0\u20138.9 | High, reachable | Plan fix within 2 weeks |\n| \\`not_affected\\` | No reachable path found | Document, no action needed |\n| \\`under_investigation\\` | Reachability unclear | Manual review required |\n| Stale >= 0.7 | Very outdated | Review for accumulated CVEs |\n| License DENY | Policy violation | Must resolve before release |\n`);\n console.log(` \u2713 Security workflow steering file written`);\n }\n\n const written = ['review', 'debug', 'onboard', 'refactor'];\n if (opts?.enableArchitecture) written.push('architecture');\n if (opts?.enableSecurity) written.push('security');\n console.log(` \u2713 Workflow steering files written (${written.join(', ')})`);\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAIA,SAAoB;AACpB,WAAsB;AACtB,qBAA2C;AAE3C,MAAM,mBAAmB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;
|
|
4
|
+
"sourcesContent": ["/**\n * KiroGraph Installer: Kiro steering file\n */\n\nimport * as fs from 'fs';\nimport * as path from 'path';\nimport { CAVEMAN_RULES, CavemanMode } from './caveman';\n\nconst STEERING_CONTENT = `---\ninclusion: always\n---\n\n# KiroGraph\n\nKiroGraph builds a semantic knowledge graph of your codebase. Use its MCP tools instead of grep/glob/file reads whenever \\`.kirograph/\\` exists in the project.\n\n## Quick decision guide\n\n| Question | Tool |\n|----------|------|\n| Where do I start on this task? | \\`kirograph_context\\` |\n| What is this symbol / show me its code | \\`kirograph_node\\` with \\`includeCode: true\\` |\n| Find a symbol by name | \\`kirograph_search\\` |\n| Who calls function X? | \\`kirograph_callers\\` |\n| What does function X call? | \\`kirograph_callees\\` |\n| What breaks if I change X? | \\`kirograph_impact\\` |\n| How are X and Y connected? | \\`kirograph_path\\` |\n| What extends / implements this type? | \\`kirograph_type_hierarchy\\` |\n| Which code is never called? | \\`kirograph_dead_code\\` |\n| Are there import cycles? | \\`kirograph_circular_deps\\` |\n| What files are indexed? | \\`kirograph_files\\` |\n| Is the index healthy? | \\`kirograph_status\\` |\n| What are the most critical symbols? | \\`kirograph_hotspots\\` |\n| Any unexpected cross-module coupling? | \\`kirograph_surprising\\` |\n| What changed since the last snapshot? | \\`kirograph_diff\\` |\n| What packages/layers exist? | \\`kirograph_architecture\\` |\n| How coupled is package X? | \\`kirograph_coupling\\` |\n| What does package X depend on? | \\`kirograph_package\\` |\n| Run a command with token savings | \\`kirograph_exec\\` |\n| Check token savings stats | \\`kirograph_gain\\` |\n| What data files are indexed? | \\`kirograph_data_list\\` |\n| What columns does this dataset have? | \\`kirograph_data_describe\\` |\n| Query rows with filters | \\`kirograph_data_query\\` |\n| Aggregate data (sum, avg, count) | \\`kirograph_data_aggregate\\` |\n| Are there vulnerable dependencies? | \\`kirograph_security\\` |\n| Which CVEs affect my project? | \\`kirograph_vulns\\` |\n| Is this vulnerability reachable? | \\`kirograph_reachability\\` |\n| What licenses do my dependencies use? | \\`kirograph_licenses\\` |\n| Are dependencies outdated? | \\`kirograph_staleness\\` |\n| Generate SBOM/VEX | \\`kirograph_sbom\\` / \\`kirograph_vex\\` |\n| Add a private CVE | \\`kirograph_vuln_add\\` |\n| Find structural code patterns? | \\`kirograph_live_search\\` |\n\n---\n\n## Tool reference\n\n### \\`kirograph_context\\`: **start here for any code task**\n\nReturns entry points, related symbols, and code snippets for a natural-language task description. Usually enough to orient without any additional tool calls.\n\n\\`\\`\\`\nkirograph_context(task: \"fix the auth token expiry bug\")\nkirograph_context(task: \"add dark mode\", maxNodes: 30)\nkirograph_context(task: \"refactor payment service\", includeCode: false)\n\\`\\`\\`\n\n### \\`kirograph_search\\`: find symbols by name\n\nExact match \u2192 FTS \u2192 LIKE fallback \u2192 vector (last resort). Use instead of grep.\n\n\\`\\`\\`\nkirograph_search(query: \"signIn\")\nkirograph_search(query: \"UserService\", kind: \"class\")\nkirograph_search(query: \"auth\", limit: 20)\n\\`\\`\\`\n\nSupported kinds: \\`function\\`, \\`method\\`, \\`class\\`, \\`interface\\`, \\`type_alias\\`, \\`variable\\`, \\`route\\`, \\`component\\`\n\n### \\`kirograph_node\\`: inspect a symbol\n\nReturns kind, file, signature, docstring. Add \\`includeCode: true\\` to get the full source.\n\n\\`\\`\\`\nkirograph_node(symbol: \"validateToken\")\nkirograph_node(symbol: \"AuthService\", includeCode: true)\n\\`\\`\\`\n\n### \\`kirograph_callers\\`: who calls this?\n\nBFS over incoming \\`calls\\` edges (depth 1).\n\n\\`\\`\\`\nkirograph_callers(symbol: \"processPayment\", limit: 30)\n\\`\\`\\`\n\n### \\`kirograph_callees\\`: what does this call?\n\nBFS over outgoing \\`calls\\` edges (depth 1).\n\n\\`\\`\\`\nkirograph_callees(symbol: \"handleRequest\")\n\\`\\`\\`\n\n### \\`kirograph_impact\\`: blast radius before a change\n\nTraverses all incoming edges up to \\`depth\\` hops. Call this before editing a symbol.\n\n\\`\\`\\`\nkirograph_impact(symbol: \"UserRepository\", depth: 3)\n\\`\\`\\`\n\n### \\`kirograph_path\\`: how are two symbols connected?\n\nBFS shortest path across all edge types.\n\n\\`\\`\\`\nkirograph_path(from: \"LoginController\", to: \"DatabasePool\")\n\\`\\`\\`\n\n### \\`kirograph_type_hierarchy\\`: class/interface inheritance\n\n\\`\\`\\`\nkirograph_type_hierarchy(symbol: \"BaseRepository\", direction: \"down\") // derived types\nkirograph_type_hierarchy(symbol: \"PaymentService\", direction: \"up\") // base types\nkirograph_type_hierarchy(symbol: \"IUserStore\", direction: \"both\") // all\n\\`\\`\\`\n\n### \\`kirograph_dead_code\\`: unreferenced symbols\n\nReturns unexported symbols with zero incoming edges. Good first step when cleaning up.\n\n\\`\\`\\`\nkirograph_dead_code(limit: 50)\n\\`\\`\\`\n\n### \\`kirograph_circular_deps\\`: import cycles\n\nRuns Tarjan's SCC over import edges. No parameters needed.\n\n\\`\\`\\`\nkirograph_circular_deps()\n\\`\\`\\`\n\n### \\`kirograph_files\\`: indexed file structure\n\n\\`\\`\\`\nkirograph_files(format: \"tree\") // default\nkirograph_files(format: \"flat\") // one path per line\nkirograph_files(format: \"grouped\") // by directory\nkirograph_files(filterPath: \"src/auth\", maxDepth: 2)\nkirograph_files(pattern: \"**/*.test.ts\")\n\\`\\`\\`\n\n### \\`kirograph_status\\`: index health\n\nReturns file count, symbol count, edge count, embedding coverage, DB size. Call when something feels off.\n\n### \\`kirograph_hotspots\\`: most-connected symbols\n\nReturns the top-N symbols by total edge degree (in + out, excluding structural \\`contains\\` edges). Use to find core abstractions, identify high blast-radius symbols before a refactor, or understand what the codebase revolves around.\n\n\\`\\`\\`\nkirograph_hotspots(limit: 20)\n\\`\\`\\`\n\n### \\`kirograph_surprising\\`: unexpected cross-module coupling\n\nFinds direct edges between symbols in structurally distant files, scored by path distance \u00D7 edge-kind weight. Use before a refactor to discover hidden dependencies that will break. High score = more unexpected.\n\n\\`\\`\\`\nkirograph_surprising(limit: 20)\n\\`\\`\\`\n\n### \\`kirograph_diff\\`: what changed since a snapshot?\n\nCompares the current graph against a saved snapshot. Shows added/removed symbols and edges. A snapshot must exist: the user saves one with \\`kirograph snapshot save <label>\\` before making changes.\n\n\\`\\`\\`\nkirograph_diff() // vs latest snapshot\nkirograph_diff(snapshot: \"pre-refactor\") // vs named snapshot\n\\`\\`\\`\n\n---\n\n## Architecture tools *(require \\`enableArchitecture: true\\` in config)*\n\n### \\`kirograph_architecture\\`: **start here for architectural questions**\n\nReturns the full package graph, detected layers (api/service/data/ui/shared), and their dependency edges.\n\n\\`\\`\\`\nkirograph_architecture() // packages + layers\nkirograph_architecture(level: \"packages\")\nkirograph_architecture(level: \"layers\")\nkirograph_architecture(includeFiles: true) // add file\u2192package assignments\n\\`\\`\\`\n\n### \\`kirograph_coupling\\`: stability metrics per package\n\nReturns Ca (afferent: depended on by), Ce (efferent: depends on), and instability (Ce/(Ca+Ce)).\n- High Ca + low instability = load-bearing, safe to depend on, risky to change interface.\n- High Ce + high instability = depends on many things, safe to refactor internals.\n\n\\`\\`\\`\nkirograph_coupling() // all packages, sorted by instability\nkirograph_coupling(sortBy: \"afferent\") // most depended-on first\nkirograph_coupling(sortBy: \"efferent\") // most outgoing deps first\n\\`\\`\\`\n\n### \\`kirograph_package\\`: drill into one package\n\nReturns metadata, coupling metrics, outgoing deps, incoming dependents, and file list.\n\n\\`\\`\\`\nkirograph_package(package: \"auth\")\nkirograph_package(package: \"src/services\", includeFiles: false)\n\\`\\`\\`\n\n---\n\n## Workflows\n\n**Bug fix or feature:**\n1. \\`kirograph_context\\`: orient, find entry points.\n2. \\`kirograph_node\\` with \\`includeCode: true\\`: read the relevant symbol.\n3. \\`kirograph_callers\\` / \\`kirograph_callees\\`: trace the call flow.\n4. \\`kirograph_impact\\`: check blast radius before editing.\n\n**Refactor planning:**\n1. \\`kirograph_hotspots\\`: identify the most-connected symbols; changing these is risky.\n2. \\`kirograph_surprising\\`: surface hidden coupling that will break.\n3. \\`kirograph_impact\\` on specific targets: confirm blast radius.\n4. \\`kirograph_diff\\` after the refactor: verify the structural change matches intent.\n\n**Architectural review:**\n1. \\`kirograph_architecture\\`: get the package and layer map.\n2. \\`kirograph_coupling\\`: find the most stable (high Ca) and most volatile (high instability) packages.\n3. \\`kirograph_package\\`: drill into any package of interest.\n4. \\`kirograph_circular_deps\\`: check for import cycles.\n\n**Code cleanup:**\n1. \\`kirograph_dead_code\\`: find unreferenced unexported symbols.\n2. \\`kirograph_circular_deps\\`: find import cycles to untangle.\n3. \\`kirograph_surprising\\`: find unexpected coupling to decouple.\n\n---\n\n## Workflow steering files\n\nKiroGraph installs task-specific steering files in \\`.kiro/steering/\\`. They are not always active \u2014 load them on demand.\n\n**In Kiro IDE:** type \\`/kirograph-review\\`, \\`/kirograph-security\\`, etc. to activate a workflow for the current session.\n\n**In Kiro CLI / other agents:** when the user asks for a specific workflow or you recognize the intent, read the file directly:\n\n\\`\\`\\`\nRead file: .kiro/steering/kirograph-security.md\nRead file: .kiro/steering/kirograph-review.md\n\\`\\`\\`\n\n| User intent | File to load |\n|-------------|-------------|\n| security audit, check vulnerabilities, CVE review | \\`.kiro/steering/kirograph-security.md\\` *(requires enableSecurity)* |\n| code review, review this PR | \\`.kiro/steering/kirograph-review.md\\` |\n| debug, trace this bug, root cause | \\`.kiro/steering/kirograph-debug.md\\` |\n| architecture, understand structure, package map | \\`.kiro/steering/kirograph-architecture.md\\` *(requires enableArchitecture)* |\n| onboard, understand this codebase | \\`.kiro/steering/kirograph-onboard.md\\` |\n| refactor, rename, safe refactoring | \\`.kiro/steering/kirograph-refactor.md\\` |\n\nEach file contains numbered steps, exact tool calls, and an interpretation reference. Follow the steps in order.\n\n---\n\n## If \\`.kirograph/\\` does NOT exist\n\nAsk the user: \"This project doesn't have KiroGraph initialized. Run \\`kirograph init -i\\` to build a code knowledge graph for faster exploration?\"\n`;\n\n// \u2500\u2500 Compression section builder (level-aware) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\nconst LEVEL_DESCRIPTIONS: Record<string, string> = {\n normal: 'Balanced: removes noise, keeps structure.',\n aggressive: 'Compact: groups by category, limits output.',\n ultra: 'Maximum compression: counts and summaries only.',\n};\n\nconst LEVEL_EXAMPLES: Record<string, string> = {\n normal: `\\\\\\`\\\\\\`\\\\\\`\nkirograph_exec(command: \"git status\")\nkirograph_exec(command: \"npm test\")\nkirograph_exec(command: \"cargo build\")\nkirograph_exec(command: \"ls -la src/\")\n\\\\\\`\\\\\\`\\\\\\``,\n aggressive: `\\\\\\`\\\\\\`\\\\\\`\nkirograph_exec(command: \"git status\", level: \"aggressive\")\nkirograph_exec(command: \"npm test\", level: \"aggressive\")\nkirograph_exec(command: \"eslint .\", level: \"aggressive\")\nkirograph_exec(command: \"find . -name '*.ts'\", level: \"aggressive\")\n\\\\\\`\\\\\\`\\\\\\``,\n ultra: `\\\\\\`\\\\\\`\\\\\\`\nkirograph_exec(command: \"git status\", level: \"ultra\")\nkirograph_exec(command: \"npm test\", level: \"ultra\")\nkirograph_exec(command: \"docker ps\", level: \"ultra\")\nkirograph_exec(command: \"ls -la src/\", level: \"ultra\")\n\\\\\\`\\\\\\`\\\\\\``,\n};\n\nfunction buildCompressionSection(level: 'normal' | 'aggressive' | 'ultra'): string {\n return `\n---\n\n## Shell Compression (\\\\\\`kirograph_exec\\\\\\`)\n\nWhen running shell commands, prefer \\\\\\`kirograph_exec\\\\\\` over raw shell execution for:\n- **git** operations (status, log, diff, push, pull, commit, add, fetch, branch)\n- **GitHub CLI** (gh pr list/view, gh issue list, gh run list)\n- **test runners** (jest, vitest, pytest, cargo test, go test, rspec, minitest, playwright)\n- **linters/build** (eslint, tsc, ruff, clippy, cargo build, prettier, biome, golangci-lint, rubocop, next build)\n- **file listings** (ls, find, tree)\n- **search** (grep, rg/ripgrep: grouped by file)\n- **diff** (diff file1 file2: condensed context)\n- **docker/k8s** (docker ps, images, logs, compose ps, kubectl pods, logs, services)\n- **package managers** (npm/pnpm install/list, pip list/install, bundle install, prisma generate)\n- **AWS CLI** (sts, ec2, lambda, logs, cloudformation, dynamodb, iam, s3, ecs, sqs, sns)\n- **network** (curl, wget: strip progress bars and headers)\n\nThis saves 60-90% of tokens compared to raw output.\n\nCompression level: **${level}**: ${LEVEL_DESCRIPTIONS[level]}\n\n${LEVEL_EXAMPLES[level]}\n\n**Important:** Error details are always preserved. Failed commands show full diagnostic output regardless of level.\n\n**Do NOT re-run commands:** When \\\\\\`kirograph_exec\\\\\\` returns a result, treat it as the final answer. Never re-run the same command with raw shell execution to \"get more details.\" The compressed output preserves all essential information. If you genuinely need something missing from the output, explain what's missing before making a second call.\n\nUse \\\\\\`kirograph_gain\\\\\\` to check token savings statistics.`;\n}\n\nexport interface SteeringOptions {\n cavemanMode?: CavemanMode | 'off';\n enableCompression?: boolean;\n shellCompressionLevel?: 'off' | 'normal' | 'aggressive' | 'ultra';\n enableArchitecture?: boolean;\n enableMemory?: boolean;\n enableDocs?: boolean;\n enableData?: boolean;\n enableSecurity?: boolean;\n enablePatterns?: boolean;\n}\n\nfunction buildSteeringContent(opts?: SteeringOptions): string {\n const cavemanMode = opts?.cavemanMode;\n const enableCompression = opts?.enableCompression !== false && opts?.shellCompressionLevel !== 'off';\n const shellCompressionLevel = opts?.shellCompressionLevel ?? 'normal';\n\n let content = STEERING_CONTENT;\n\n // Insert compression section before the \"If .kirograph/ does NOT exist\" section\n if (enableCompression && shellCompressionLevel !== 'off') {\n const section = buildCompressionSection(shellCompressionLevel as 'normal' | 'aggressive' | 'ultra');\n content = content.replace(\n '---\\n\\n## If `.kirograph/` does NOT exist',\n section.trim() + '\\n\\n---\\n\\n## If `.kirograph/` does NOT exist',\n );\n }\n\n // Remove compression tools from decision guide if disabled\n if (!enableCompression) {\n content = content.replace('| Run a command with token savings | `kirograph_exec` |\\n', '');\n content = content.replace('| Check token savings stats | `kirograph_gain` |\\n', '');\n }\n\n // Remove security tools from decision guide if disabled\n if (!opts?.enableSecurity) {\n content = content.replace('| Are there vulnerable dependencies? | `kirograph_security` |\\n', '');\n content = content.replace('| Which CVEs affect my project? | `kirograph_vulns` |\\n', '');\n content = content.replace('| Is this vulnerability reachable? | `kirograph_reachability` |\\n', '');\n content = content.replace('| What licenses do my dependencies use? | `kirograph_licenses` |\\n', '');\n content = content.replace('| Are dependencies outdated? | `kirograph_staleness` |\\n', '');\n content = content.replace('| Generate SBOM/VEX | `kirograph_sbom` / `kirograph_vex` |\\n', '');\n content = content.replace('| Add a private CVE | `kirograph_vuln_add` |\\n', '');\n }\n\n // Remove pattern tools from decision guide if disabled\n if (!opts?.enablePatterns) {\n content = content.replace('| Find structural code patterns? | `kirograph_live_search` |\\n', '');\n }\n\n const caveman = cavemanMode && cavemanMode !== 'off' ? CAVEMAN_RULES[cavemanMode] : null;\n if (caveman) {\n content = content.trimEnd() + '\\n\\n' + caveman + '\\n';\n }\n\n // Memory section\n if (opts?.enableMemory) {\n const memorySection = `\n## Memory\n\nKiroGraph has persistent memory. Use \\`kirograph_mem_search\\` to recall past decisions,\nerrors, and patterns before making changes. Use \\`kirograph_mem_store\\` to save important\nobservations (architecture decisions, bug root causes, patterns discovered).\n\nMemory is searchable via hybrid FTS + vector search. Observations are automatically\nlinked to code symbols in the graph and surface in \\`kirograph_context\\` and\n\\`kirograph_impact\\` results when relevant.\n\n**When to store:** After fixing a bug, making an architecture decision, discovering a pattern,\nencountering a non-obvious error, or learning something about the codebase that future sessions\nshould know. Keep observations concise \u2014 one fact per store call. A hook will also remind you\nat session end.\n`;\n content = content.trimEnd() + '\\n\\n' + memorySection.trim() + '\\n';\n }\n\n // Documentation section\n if (opts?.enableDocs) {\n const docsSection = `\n## Documentation\n\nKiroGraph indexes project documentation by heading structure. Use \\`kirograph_docs_search\\`\nto find relevant doc sections instead of reading entire files. Use \\`kirograph_docs_section\\`\nto retrieve the exact section you need by ID.\n\n**Available tools:**\n- \\`kirograph_docs_toc\\` \u2014 table of contents for a file or the whole project\n- \\`kirograph_docs_search\\` \u2014 search sections by query (independent from code search)\n- \\`kirograph_docs_section\\` \u2014 retrieve full content of a section by ID\n- \\`kirograph_docs_outline\\` \u2014 heading hierarchy for a single document\n- \\`kirograph_docs_refs\\` \u2014 find code symbols referenced by a doc section (or vice versa)\n\n**When to use:** Before reading a documentation file directly, check if \\`kirograph_docs_search\\`\nor \\`kirograph_docs_outline\\` can give you the specific section you need. This saves tokens\nand gives you structured navigation instead of raw file content.\n`;\n content = content.trimEnd() + '\\n\\n' + docsSection.trim() + '\\n';\n }\n\n // Data section\n if (opts?.enableData) {\n const dataSection = `\n## Data\n\nKiroGraph indexes tabular data files (CSV, TSV, JSONL, JSON, Excel, Parquet) for structured\nquerying. Use \\`kirograph_data_describe\\` to understand a dataset's schema without loading\nthe file. Use \\`kirograph_data_query\\` with filters to retrieve specific rows.\n\n**Available tools:**\n- \\`kirograph_data_list\\` \u2014 list all indexed datasets with row/column counts\n- \\`kirograph_data_describe\\` \u2014 full schema profile: column names, types, cardinality, null%, samples\n- \\`kirograph_data_query\\` \u2014 filtered row retrieval with structured operators (eq, gt, contains, in, between)\n- \\`kirograph_data_aggregate\\` \u2014 server-side GROUP BY: count, sum, avg, min, max, count_distinct\n- \\`kirograph_data_search\\` \u2014 search column names and sample values by keyword\n\n**When to use:** Instead of reading a CSV/data file directly (which floods context with raw rows),\nuse \\`kirograph_data_describe\\` to understand the schema, then \\`kirograph_data_query\\` with\nfilters to get only the rows you need. For summary statistics, use \\`kirograph_data_aggregate\\`\nto compute results server-side. This saves 95-99% of tokens compared to reading raw data files.\n\n\\`\\`\\`\nkirograph_data_list()\nkirograph_data_describe(dataset: \"tests-fixtures-users\")\nkirograph_data_query(dataset: \"tests-fixtures-users\", filters: [{column: \"role\", op: \"eq\", value: \"admin\"}])\nkirograph_data_aggregate(dataset: \"data-orders\", groupBy: [\"region\"], metrics: [{column: \"amount\", op: \"sum\"}])\n\\`\\`\\`\n`;\n content = content.trimEnd() + '\\n\\n' + dataSection.trim() + '\\n';\n }\n\n // Patterns section\n if (opts?.enablePatterns) {\n const patternsSection = `\n## Pattern Matching\n\nKiroGraph can search for structural code patterns using @ast-grep/napi.\n\n**Available tools (only when enablePatterns: true and @ast-grep/napi installed):**\n- \\`kirograph_live_search\\` \u2014 search for any AST pattern across the codebase at query time\n\n**CLI commands:**\n- \\`kirograph pattern \"<pattern>\"\\` \u2014 live structural search\n- \\`kirograph pattern --list\\` \u2014 browse bundled SAST rules\n- \\`kirograph pattern --library <id>\\` \u2014 run a specific library rule\n\n**When to use:** When you need to find code patterns that can't be expressed as symbol names or semantic queries \u2014 \"all eval() calls\", \"all SQL string concatenation\", \"all readFile with request parameters\".\n`;\n content = content.trimEnd() + '\\n\\n' + patternsSection.trim() + '\\n';\n }\n\n // Security section\n if (opts?.enableSecurity) {\n const securitySection = `\n## Security\n\nKiroGraph scans dependency manifests across 14 ecosystems for known vulnerabilities, performs\ncall-graph reachability analysis, tracks exploitation probability (EPSS), checks license\ncompliance, and monitors dependency staleness.\n\n**Available tools:**\n- \\`kirograph_security\\` \u2014 overview: dep count, CVE count, verdict breakdown, stale warnings\n- \\`kirograph_vulns\\` \u2014 list CVEs with severity, EPSS score, reachability verdict, fix suggestion\n- \\`kirograph_reachability\\` \u2014 deep-dive: call paths, entry points, affected layers for one CVE or package\n- \\`kirograph_licenses\\` \u2014 list dependency licenses; flag policy violations (deny/warn by SPDX pattern)\n- \\`kirograph_staleness\\` \u2014 identify outdated dependencies (staleness score 0.0\u20131.0)\n- \\`kirograph_sbom\\` \u2014 export CycloneDX 1.5 SBOM for compliance/auditing\n- \\`kirograph_vex\\` \u2014 export CycloneDX 1.5 VEX with reachability-derived analysis states\n- \\`kirograph_vuln_add\\` \u2014 manually register a private/internal CVE not in public databases\n\n**Proactive triggers \u2014 run \\`kirograph_security\\` when:**\n- You or the user add/update/remove a dependency\n- Before a production deploy or release branch cut\n- The user asks about security, compliance, or \"is it safe to upgrade X\"\n- \\`kirograph_context\\` surfaces a \u26A0 Security warning in its output\n\n**Interpreting verdicts:**\n- \\`affected\\` \u2014 a call path exists from an entry point to the vulnerable code. Act on this.\n- \\`not_affected\\` \u2014 no reachable path found, no unresolved imports. Strong signal: likely safe.\n- \\`under_investigation\\` \u2014 traversal hit unresolved symbols (dynamic dispatch, reflection). Treat with caution.\n\n**Interpreting EPSS scores** (shown by \\`kirograph_vulns\\`):\n- \\`>= 0.5\\` \u2014 actively exploited or very likely to be. Patch immediately regardless of CVSS.\n- \\`0.1 \u2013 0.5\\` \u2014 elevated risk. Prioritize over low-EPSS vulns with higher CVSS.\n- \\`< 0.1\\` \u2014 low exploitation probability. Use CVSS + reachability for triage.\n\n**Recommended workflow:**\n1. \\`kirograph_security\\` \u2014 get the big picture before diving in\n2. \\`kirograph_vulns --verdict affected\\` \u2014 focus only on confirmed reachable CVEs\n3. For each high-EPSS or high-CVSS result: \\`kirograph_reachability <cve>\\` to see exact call paths\n4. \\`kirograph_licenses --policy\\` \u2014 check for license violations before shipping\n5. \\`kirograph_staleness --threshold 0.5\\` \u2014 flag severely outdated dependencies\n6. Fix, then \\`kirograph_vulns --refresh\\` to re-query OSV and confirm resolution\n7. \\`kirograph_vex\\` / \\`kirograph_sbom\\` for compliance artifacts\n\n**Staleness score guide:** 0.0 = current; 0.3+ = worth reviewing; 0.7+ = significantly behind.\nA high staleness score alone is not a security issue, but old dependencies accumulate CVEs over time.\n`;\n content = content.trimEnd() + '\\n\\n' + securitySection.trim() + '\\n';\n }\n\n return content;\n}\n\nexport function writeSteering(kiroDir: string, opts?: SteeringOptions | CavemanMode | 'off'): void {\n const steeringDir = path.join(kiroDir, 'steering');\n fs.mkdirSync(steeringDir, { recursive: true });\n const steeringPath = path.join(steeringDir, 'kirograph.md');\n\n // Support both old signature (cavemanMode string) and new signature (options object)\n const resolvedOpts: SteeringOptions = typeof opts === 'string'\n ? { cavemanMode: opts }\n : opts ?? {};\n\n fs.writeFileSync(steeringPath, buildSteeringContent(resolvedOpts));\n console.log(` \u2713 Steering file written to ${steeringPath}`);\n\n // Write workflow-specific steering files\n writeWorkflowSteering(steeringDir, resolvedOpts);\n}\n\nfunction writeWorkflowSteering(steeringDir: string, opts?: SteeringOptions): void {\n const workflows: Record<string, string> = {\n 'kirograph-review.md': `---\ninclusion: manual\n---\n\n# KiroGraph: Code Review Workflow\n\nFollow these steps for a structured, risk-aware code review using the knowledge graph.\n\n## Steps\n\n1. **Understand the change scope**\n \\`\\`\\`\n kirograph_context(task: \"<describe what changed>\")\n \\`\\`\\`\n\n2. **Analyze blast radius**\n For each key symbol that was modified:\n \\`\\`\\`\n kirograph_impact(symbol: \"<changed symbol>\", depth: 2)\n \\`\\`\\`\n\n3. **Check test coverage**\n \\`\\`\\`\n kirograph_callers(symbol: \"<changed symbol>\")\n \\`\\`\\`\n Look for test files among the callers. Flag untested changes.\n\n4. **Look for surprising coupling**\n \\`\\`\\`\n kirograph_surprising(limit: 10)\n \\`\\`\\`\n\n5. **Produce findings** grouped by risk level (high/medium/low) with:\n - What changed and why it matters\n - Test coverage status\n - Suggested improvements\n - Overall merge recommendation\n`,\n\n 'kirograph-debug.md': `---\ninclusion: manual\n---\n\n# KiroGraph: Debug Workflow\n\nFollow these steps to systematically trace and debug issues using the knowledge graph.\n\n## Steps\n\n1. **Find related code**\n \\`\\`\\`\n kirograph_search(query: \"<error message or symptom keywords>\")\n \\`\\`\\`\n\n2. **Get full context**\n \\`\\`\\`\n kirograph_context(task: \"<describe the bug>\")\n \\`\\`\\`\n\n3. **Trace the call chain**\n \\`\\`\\`\n kirograph_callers(symbol: \"<suspected function>\")\n kirograph_callees(symbol: \"<suspected function>\")\n \\`\\`\\`\n\n4. **Check what changed recently**\n \\`\\`\\`\n kirograph_diff()\n \\`\\`\\`\n\n5. **Understand blast radius**\n \\`\\`\\`\n kirograph_impact(symbol: \"<root cause symbol>\", depth: 3)\n \\`\\`\\`\n\n## Tips\n- Check both callers and callees to understand the full context\n- Recent changes (via diff) are the most common source of new issues\n- Use \\`kirograph_path\\` to trace how two symbols are connected\n`,\n\n 'kirograph-architecture.md': `---\ninclusion: manual\n---\n\n# KiroGraph: Architecture Exploration Workflow\n\nFollow these steps to understand the high-level structure of the codebase.\n\n## Steps\n\n1. **Get project overview**\n \\`\\`\\`\n kirograph_status()\n \\`\\`\\`\n\n2. **View architecture**\n \\`\\`\\`\n kirograph_architecture()\n \\`\\`\\`\n\n3. **Check coupling health**\n \\`\\`\\`\n kirograph_coupling(sortBy: \"instability\")\n \\`\\`\\`\n\n4. **Find core abstractions**\n \\`\\`\\`\n kirograph_hotspots(limit: 20)\n \\`\\`\\`\n\n5. **Detect hidden dependencies**\n \\`\\`\\`\n kirograph_surprising(limit: 15)\n \\`\\`\\`\n\n6. **Check for cycles**\n \\`\\`\\`\n kirograph_circular_deps()\n \\`\\`\\`\n\n## Interpretation\n- High Ca (afferent) = load-bearing, risky to change interface\n- High Ce (efferent) = depends on many things, safe to refactor internals\n- Surprising edges = hidden coupling that may break during refactoring\n`,\n\n 'kirograph-onboard.md': `---\ninclusion: manual\n---\n\n# KiroGraph: Onboarding Workflow\n\nFollow these steps to quickly understand a new codebase.\n\n## Steps\n\n1. **Project overview**\n \\`\\`\\`\n kirograph_status()\n \\`\\`\\`\n\n2. **File structure**\n \\`\\`\\`\n kirograph_files(format: \"tree\", maxDepth: 2)\n \\`\\`\\`\n\n3. **Key entry points**\n \\`\\`\\`\n kirograph_hotspots(limit: 15)\n \\`\\`\\`\n\n4. **Architecture layers**\n \\`\\`\\`\n kirograph_architecture()\n \\`\\`\\`\n\n5. **Explore a specific area**\n \\`\\`\\`\n kirograph_context(task: \"<area you want to understand>\")\n \\`\\`\\`\n\n6. **Understand a key symbol**\n \\`\\`\\`\n kirograph_node(symbol: \"<symbol name>\", includeCode: true)\n \\`\\`\\`\n\n## Tips\n- Start broad (status, files, hotspots) then narrow down\n- Use \\`kirograph_type_hierarchy\\` to understand inheritance patterns\n- Use \\`kirograph_callees\\` on entry points to trace execution flow\n`,\n\n 'kirograph-refactor.md': `---\ninclusion: manual\n---\n\n# KiroGraph: Refactoring Workflow\n\nFollow these steps to plan and execute safe refactoring.\n\n## Steps\n\n1. **Understand what you're changing**\n \\`\\`\\`\n kirograph_node(symbol: \"<target symbol>\", includeCode: true)\n \\`\\`\\`\n\n2. **Check blast radius**\n \\`\\`\\`\n kirograph_impact(symbol: \"<target symbol>\", depth: 3)\n \\`\\`\\`\n\n3. **Find all callers (rename preview)**\n \\`\\`\\`\n kirograph_callers(symbol: \"<target symbol>\", limit: 50)\n \\`\\`\\`\n\n4. **Check for cycles that might complicate the refactor**\n \\`\\`\\`\n kirograph_circular_deps()\n \\`\\`\\`\n\n5. **Find dead code to clean up**\n \\`\\`\\`\n kirograph_dead_code(limit: 30)\n \\`\\`\\`\n\n6. **Verify after changes**\n Run \\`kirograph sync\\` then:\n \\`\\`\\`\n kirograph_diff()\n \\`\\`\\`\n\n## Safety Checks\n- Always check \\`kirograph_impact\\` before major refactors\n- Use \\`kirograph_callers\\` as a rename preview (all locations that reference the symbol)\n- After changes, use \\`kirograph_diff\\` to verify only intended symbols changed\n`,\n };\n\n // kirograph-architecture.md only when enableArchitecture is true\n if (opts?.enableArchitecture) {\n fs.writeFileSync(path.join(steeringDir, 'kirograph-architecture.md'), workflows['kirograph-architecture.md']!);\n }\n\n // Always write the non-conditional workflow files\n for (const [filename, content] of Object.entries(workflows)) {\n if (filename === 'kirograph-architecture.md') continue; // handled above\n fs.writeFileSync(path.join(steeringDir, filename), content);\n }\n\n // Security workflow \u2014 only when enableSecurity is true\n if (opts?.enableSecurity) {\n fs.writeFileSync(path.join(steeringDir, 'kirograph-security.md'), `---\ninclusion: manual\n---\n\n# KiroGraph: Security Audit Workflow\n\nFollow these steps for a structured security audit using the knowledge graph.\nActivate this workflow before a release, after adding dependencies, or when asked to review security posture.\n\n## Steps\n\n### 1. Overview\n\\`\\`\\`\nkirograph_security()\n\\`\\`\\`\nNote: total dependencies, vulnerability count, verdict breakdown, stale warning count.\n\n### 2. Triage reachable vulnerabilities\n\\`\\`\\`\nkirograph_vulns(verdict: \"affected\")\n\\`\\`\\`\nFocus only on confirmed reachable CVEs. Sort output by EPSS score (exploitation probability) first, then CVSS severity.\n\n**Act immediately on:** EPSS >= 0.5 (actively exploited). Patch regardless of CVSS.\n**Prioritize:** EPSS 0.1\u20130.5 over low-EPSS high-CVSS entries.\n**Low urgency:** EPSS < 0.1 \u2014 use CVSS + reachability for triage.\n\n### 3. Deep-dive reachability for critical CVEs\nFor each high-priority CVE from step 2:\n\\`\\`\\`\nkirograph_reachability(target: \"<CVE-ID or package name>\")\n\\`\\`\\`\nThis shows: exact call paths from entry points, affected architectural layers, distinct path count.\n\n- \\`affected\\` verdict with known entry points \u2192 fix this dependency\n- \\`not_affected\\` \u2192 no reachable path, document and move on\n- \\`under_investigation\\` \u2192 unresolved symbols, treat conservatively\n\n### 4. Check for under-investigation CVEs\n\\`\\`\\`\nkirograph_vulns(verdict: \"under_investigation\")\n\\`\\`\\`\nFor each: run \\`kirograph_reachability\\` to see what symbols are unresolved. If you can determine\nthe symbol is not called, you can downgrade to not_affected manually.\n\n### 5. License compliance\n\\`\\`\\`\nkirograph_licenses(policy: true)\n\\`\\`\\`\nReview any DENY violations \u2014 these must be resolved before shipping.\nWARN violations should be documented and approved by the team.\n\n### 6. Dependency staleness\n\\`\\`\\`\nkirograph_staleness(threshold: 0.5)\n\\`\\`\\`\nScore guide: 0.3+ = worth reviewing, 0.7+ = significantly behind.\nCross-reference with step 2 results: stale + vulnerable = highest priority.\n\n### 7. Refresh data if needed\nIf vulnerability data looks stale (flagged in step 1) or dependencies changed recently:\n\\`\\`\\`\nkirograph_vulns(refresh: true)\n\\`\\`\\`\n\n### 8. Export compliance artifacts\n\\`\\`\\`\nkirograph_sbom() // Software Bill of Materials\nkirograph_vex() // Vulnerability Exploitability eXchange\n\\`\\`\\`\n\n## Interpretation Reference\n\n| Signal | Meaning | Action |\n|--------|---------|--------|\n| \\`affected\\` + EPSS >= 0.5 | Actively exploited, reachable | Patch immediately |\n| \\`affected\\` + CVSS >= 9.0 | Critical, reachable | Patch this sprint |\n| \\`affected\\` + CVSS 7.0\u20138.9 | High, reachable | Plan fix within 2 weeks |\n| \\`not_affected\\` | No reachable path found | Document, no action needed |\n| \\`under_investigation\\` | Reachability unclear | Manual review required |\n| Stale >= 0.7 | Very outdated | Review for accumulated CVEs |\n| License DENY | Policy violation | Must resolve before release |\n`);\n console.log(` \u2713 Security workflow steering file written`);\n }\n\n // Patterns workflow \u2014 only when enablePatterns is true\n if (opts?.enablePatterns) {\n fs.writeFileSync(path.join(steeringDir, 'kirograph-patterns.md'), `---\ninclusion: manual\n---\n\n# KiroGraph: Pattern Search Workflow\n\nUse this workflow to find structural code patterns using AST matching.\nActivate with \\`/kirograph-patterns\\` in Kiro IDE or CLI.\n\n## Steps\n\n### 1. Browse available rules\n\\`\\`\\`\nkirograph_live_search(pattern: \"--list\")\n\\`\\`\\`\nOr use the CLI: \\`kirograph pattern --list\\`\n\n### 2. Search for a specific structural pattern\n\\`\\`\\`\nkirograph_live_search(pattern: \"eval($X)\", language: \"typescript\")\n\\`\\`\\`\n\n### 3. Run a bundled library rule\n\\`\\`\\`\nkirograph pattern --library sql-injection-concat-js\n\\`\\`\\`\n\n### 4. Add a custom rule\nCreate a YAML file in your \\`patternLibraryPath\\` directory:\n\\`\\`\\`yaml\nid: my-custom-rule\nlanguage: [javascript, typescript]\nseverity: high\nowaspCategory: A03\ndescription: Custom pattern description\nfixHint: How to fix this issue.\nrule:\n pattern: dangerousFunction($ARG)\n\\`\\`\\`\n\n## Pattern syntax examples\n\n| Pattern | Matches |\n|---------|---------|\n| \\`eval($X)\\` | Any eval() call |\n| \\`$OBJ.query($A + $B)\\` | String concat in any query method |\n| \\`fs.$F(req.$P, $$$)\\` | Any fs method with request param |\n| \\`createHash('md5')\\` | Hardcoded MD5 usage |\n\n## Interpretation\n\n- Findings mean the pattern was found in the AST \u2014 not a false positive from symbol name matching\n- Check the surrounding context: \\`kirograph_node(symbol: \"...\", includeCode: true)\\`\n- Use \\`kirograph_callers\\` to understand how the affected function is reached\n`);\n console.log(` \u2713 Patterns workflow steering file written`);\n }\n\n const written = ['review', 'debug', 'onboard', 'refactor'];\n if (opts?.enableArchitecture) written.push('architecture');\n if (opts?.enableSecurity) written.push('security');\n if (opts?.enablePatterns) written.push('patterns');\n console.log(` \u2713 Workflow steering files written (${written.join(', ')})`);\n}\n"],
|
|
5
|
+
"mappings": "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",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { CavemanMode } from '../caveman';
|
|
2
|
+
export declare function installAiderEarly(_projectRoot: string): void;
|
|
3
|
+
export declare function installAiderLate(projectRoot: string, cavemanMode?: CavemanMode | 'off', shellCompressionLevel?: string, enableMemory?: boolean, enableDocs?: boolean, enableData?: boolean, enableSecurity?: boolean, enableArchitecture?: boolean, enablePatterns?: boolean): void;
|
|
4
|
+
export declare function uninitAider(projectRoot: string): void;
|
|
5
|
+
export declare function printAiderNextSteps(projectRoot: string): void;
|
|
6
|
+
//# sourceMappingURL=aider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"aider.d.ts","sourceRoot":"","sources":["../../../../src/bin/installer/targets/aider.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAYzC,wBAAgB,iBAAiB,CAAC,YAAY,EAAE,MAAM,GAAG,IAAI,CAG5D;AAED,wBAAgB,gBAAgB,CAAC,WAAW,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,WAAW,GAAG,KAAK,EAAE,qBAAqB,CAAC,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,OAAO,EAAE,UAAU,CAAC,EAAE,OAAO,EAAE,UAAU,CAAC,EAAE,OAAO,EAAE,cAAc,CAAC,EAAE,OAAO,EAAE,kBAAkB,CAAC,EAAE,OAAO,EAAE,cAAc,CAAC,EAAE,OAAO,GAAG,IAAI,CAWnR;AAED,wBAAgB,WAAW,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI,CAKrD;AAED,wBAAgB,mBAAmB,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI,CAI7D"}
|
|
@@ -42,13 +42,13 @@ var import_common2 = require("../common");
|
|
|
42
42
|
const AIDER_BLOCK_ID = "aider";
|
|
43
43
|
function installAiderEarly(_projectRoot) {
|
|
44
44
|
}
|
|
45
|
-
function installAiderLate(projectRoot, cavemanMode, shellCompressionLevel, enableMemory, enableDocs, enableData, enableSecurity, enableArchitecture) {
|
|
45
|
+
function installAiderLate(projectRoot, cavemanMode, shellCompressionLevel, enableMemory, enableDocs, enableData, enableSecurity, enableArchitecture, enablePatterns) {
|
|
46
46
|
const instructionsPath = path.join(projectRoot, ".kirograph", "aider.md");
|
|
47
47
|
(0, import_common.ensureDir)(path.dirname(instructionsPath));
|
|
48
|
-
fs.writeFileSync(instructionsPath, (0, import_instructions.buildAgentInstructions)((0, import_common2.buildInstructionOpts)(cavemanMode, shellCompressionLevel, enableMemory, void 0, enableDocs, enableData, enableSecurity, enableArchitecture)));
|
|
48
|
+
fs.writeFileSync(instructionsPath, (0, import_instructions.buildAgentInstructions)((0, import_common2.buildInstructionOpts)(cavemanMode, shellCompressionLevel, enableMemory, void 0, enableDocs, enableData, enableSecurity, enableArchitecture, enablePatterns)));
|
|
49
49
|
console.log(` \u2713 Aider instructions written to ${instructionsPath}`);
|
|
50
50
|
const conventionsPath = path.join(projectRoot, "CONVENTIONS.md");
|
|
51
|
-
const changed = (0, import_common.upsertGeneratedBlock)(conventionsPath, AIDER_BLOCK_ID, "## KiroGraph", (0, import_instructions.buildAgentInstructions)((0, import_common2.buildInstructionOpts)(cavemanMode, shellCompressionLevel, enableMemory, void 0, enableDocs, enableData, enableSecurity, enableArchitecture)));
|
|
51
|
+
const changed = (0, import_common.upsertGeneratedBlock)(conventionsPath, AIDER_BLOCK_ID, "## KiroGraph", (0, import_instructions.buildAgentInstructions)((0, import_common2.buildInstructionOpts)(cavemanMode, shellCompressionLevel, enableMemory, void 0, enableDocs, enableData, enableSecurity, enableArchitecture, enablePatterns)));
|
|
52
52
|
console.log(changed ? ` \u2713 CONVENTIONS.md updated with KiroGraph instructions` : ` \u2713 CONVENTIONS.md already up to date`);
|
|
53
53
|
}
|
|
54
54
|
function uninitAider(projectRoot) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/bin/installer/targets/aider.ts"],
|
|
4
|
-
"sourcesContent": ["import * as fs from 'fs';\nimport * as path from 'path';\nimport { CavemanMode } from '../caveman';\nimport {\n ensureDir,\n printMcpCommand,\n upsertGeneratedBlock,\n removeGeneratedBlock,\n} from '../common';\nimport { buildAgentInstructions } from '../instructions';\nimport { buildInstructionOpts } from '../common';\n\nconst AIDER_BLOCK_ID = 'aider';\n\nexport function installAiderEarly(_projectRoot: string): void {\n // Aider MCP is configured via CLI flags (--mcp) or .aider.conf.yml.\n // We print the setup command in next steps instead of writing outside the project.\n}\n\nexport function installAiderLate(projectRoot: string, cavemanMode?: CavemanMode | 'off', shellCompressionLevel?: string, enableMemory?: boolean, enableDocs?: boolean, enableData?: boolean, enableSecurity?: boolean, enableArchitecture?: boolean): void {\n const instructionsPath = path.join(projectRoot, '.kirograph', 'aider.md');\n ensureDir(path.dirname(instructionsPath));\n fs.writeFileSync(instructionsPath, buildAgentInstructions(buildInstructionOpts(cavemanMode, shellCompressionLevel, enableMemory, undefined, enableDocs, enableData, enableSecurity, enableArchitecture)));\n console.log(` \u2713 Aider instructions written to ${instructionsPath}`);\n\n const conventionsPath = path.join(projectRoot, 'CONVENTIONS.md');\n const changed = upsertGeneratedBlock(conventionsPath, AIDER_BLOCK_ID, '## KiroGraph', buildAgentInstructions(buildInstructionOpts(cavemanMode, shellCompressionLevel, enableMemory, undefined, enableDocs, enableData, enableSecurity, enableArchitecture)));\n console.log(changed\n ? ` \u2713 CONVENTIONS.md updated with KiroGraph instructions`\n : ` \u2713 CONVENTIONS.md already up to date`);\n}\n\nexport function uninitAider(projectRoot: string): void {\n const conventionsPath = path.join(projectRoot, 'CONVENTIONS.md');\n if (removeGeneratedBlock(conventionsPath, AIDER_BLOCK_ID)) {\n console.log(` \u2713 Removed KiroGraph block from CONVENTIONS.md`);\n }\n}\n\nexport function printAiderNextSteps(projectRoot: string): void {\n const escapedPath = projectRoot.replace(/\\\\/g, '\\\\\\\\').replace(/\"/g, '\\\\\"');\n console.log('\\n Done! KiroGraph instructions are in CONVENTIONS.md.');\n printMcpCommand(`aider --mcp \"kirograph serve --mcp --path ${escapedPath}\"`);\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,SAAoB;AACpB,WAAsB;AAEtB,oBAKO;AACP,0BAAuC;AACvC,IAAAA,iBAAqC;AAErC,MAAM,iBAAiB;AAEhB,SAAS,kBAAkB,cAA4B;AAG9D;AAEO,SAAS,iBAAiB,aAAqB,aAAmC,uBAAgC,cAAwB,YAAsB,YAAsB,gBAA0B,
|
|
4
|
+
"sourcesContent": ["import * as fs from 'fs';\nimport * as path from 'path';\nimport { CavemanMode } from '../caveman';\nimport {\n ensureDir,\n printMcpCommand,\n upsertGeneratedBlock,\n removeGeneratedBlock,\n} from '../common';\nimport { buildAgentInstructions } from '../instructions';\nimport { buildInstructionOpts } from '../common';\n\nconst AIDER_BLOCK_ID = 'aider';\n\nexport function installAiderEarly(_projectRoot: string): void {\n // Aider MCP is configured via CLI flags (--mcp) or .aider.conf.yml.\n // We print the setup command in next steps instead of writing outside the project.\n}\n\nexport function installAiderLate(projectRoot: string, cavemanMode?: CavemanMode | 'off', shellCompressionLevel?: string, enableMemory?: boolean, enableDocs?: boolean, enableData?: boolean, enableSecurity?: boolean, enableArchitecture?: boolean, enablePatterns?: boolean): void {\n const instructionsPath = path.join(projectRoot, '.kirograph', 'aider.md');\n ensureDir(path.dirname(instructionsPath));\n fs.writeFileSync(instructionsPath, buildAgentInstructions(buildInstructionOpts(cavemanMode, shellCompressionLevel, enableMemory, undefined, enableDocs, enableData, enableSecurity, enableArchitecture, enablePatterns)));\n console.log(` \u2713 Aider instructions written to ${instructionsPath}`);\n\n const conventionsPath = path.join(projectRoot, 'CONVENTIONS.md');\n const changed = upsertGeneratedBlock(conventionsPath, AIDER_BLOCK_ID, '## KiroGraph', buildAgentInstructions(buildInstructionOpts(cavemanMode, shellCompressionLevel, enableMemory, undefined, enableDocs, enableData, enableSecurity, enableArchitecture, enablePatterns)));\n console.log(changed\n ? ` \u2713 CONVENTIONS.md updated with KiroGraph instructions`\n : ` \u2713 CONVENTIONS.md already up to date`);\n}\n\nexport function uninitAider(projectRoot: string): void {\n const conventionsPath = path.join(projectRoot, 'CONVENTIONS.md');\n if (removeGeneratedBlock(conventionsPath, AIDER_BLOCK_ID)) {\n console.log(` \u2713 Removed KiroGraph block from CONVENTIONS.md`);\n }\n}\n\nexport function printAiderNextSteps(projectRoot: string): void {\n const escapedPath = projectRoot.replace(/\\\\/g, '\\\\\\\\').replace(/\"/g, '\\\\\"');\n console.log('\\n Done! KiroGraph instructions are in CONVENTIONS.md.');\n printMcpCommand(`aider --mcp \"kirograph serve --mcp --path ${escapedPath}\"`);\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,SAAoB;AACpB,WAAsB;AAEtB,oBAKO;AACP,0BAAuC;AACvC,IAAAA,iBAAqC;AAErC,MAAM,iBAAiB;AAEhB,SAAS,kBAAkB,cAA4B;AAG9D;AAEO,SAAS,iBAAiB,aAAqB,aAAmC,uBAAgC,cAAwB,YAAsB,YAAsB,gBAA0B,oBAA8B,gBAAgC;AACnR,QAAM,mBAAmB,KAAK,KAAK,aAAa,cAAc,UAAU;AACxE,+BAAU,KAAK,QAAQ,gBAAgB,CAAC;AACxC,KAAG,cAAc,sBAAkB,gDAAuB,qCAAqB,aAAa,uBAAuB,cAAc,QAAW,YAAY,YAAY,gBAAgB,oBAAoB,cAAc,CAAC,CAAC;AACxN,UAAQ,IAAI,0CAAqC,gBAAgB,EAAE;AAEnE,QAAM,kBAAkB,KAAK,KAAK,aAAa,gBAAgB;AAC/D,QAAM,cAAU,oCAAqB,iBAAiB,gBAAgB,oBAAgB,gDAAuB,qCAAqB,aAAa,uBAAuB,cAAc,QAAW,YAAY,YAAY,gBAAgB,oBAAoB,cAAc,CAAC,CAAC;AAC3Q,UAAQ,IAAI,UACR,gEACA,4CAAuC;AAC7C;AAEO,SAAS,YAAY,aAA2B;AACrD,QAAM,kBAAkB,KAAK,KAAK,aAAa,gBAAgB;AAC/D,UAAI,oCAAqB,iBAAiB,cAAc,GAAG;AACzD,YAAQ,IAAI,sDAAiD;AAAA,EAC/D;AACF;AAEO,SAAS,oBAAoB,aAA2B;AAC7D,QAAM,cAAc,YAAY,QAAQ,OAAO,MAAM,EAAE,QAAQ,MAAM,KAAK;AAC1E,UAAQ,IAAI,yDAAyD;AACrE,qCAAgB,6CAA6C,WAAW,GAAG;AAC7E;",
|
|
6
6
|
"names": ["import_common"]
|
|
7
7
|
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { CavemanMode } from '../caveman';
|
|
2
|
+
export declare function installAmpEarly(projectRoot: string): void;
|
|
3
|
+
export declare function installAmpLate(projectRoot: string, cavemanMode?: CavemanMode | 'off', shellCompressionLevel?: string, enableMemory?: boolean, enableDocs?: boolean, enableData?: boolean, enableSecurity?: boolean, enableArchitecture?: boolean, enablePatterns?: boolean): void;
|
|
4
|
+
export declare function uninitAmp(projectRoot: string): void;
|
|
5
|
+
export declare function printAmpNextSteps(): void;
|
|
6
|
+
//# sourceMappingURL=amp.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"amp.d.ts","sourceRoot":"","sources":["../../../../src/bin/installer/targets/amp.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAYzC,wBAAgB,eAAe,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI,CAWzD;AAED,wBAAgB,cAAc,CAAC,WAAW,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,WAAW,GAAG,KAAK,EAAE,qBAAqB,CAAC,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,OAAO,EAAE,UAAU,CAAC,EAAE,OAAO,EAAE,UAAU,CAAC,EAAE,OAAO,EAAE,cAAc,CAAC,EAAE,OAAO,EAAE,kBAAkB,CAAC,EAAE,OAAO,EAAE,cAAc,CAAC,EAAE,OAAO,GAAG,IAAI,CAUjR;AAED,wBAAgB,SAAS,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI,CAgBnD;AAED,wBAAgB,iBAAiB,IAAI,IAAI,CAGxC"}
|
|
@@ -51,14 +51,14 @@ function installAmpEarly(projectRoot) {
|
|
|
51
51
|
(0, import_common.writeJson)(configPath, config);
|
|
52
52
|
console.log(` \u2713 Sourcegraph Amp MCP server registered in ${configPath}`);
|
|
53
53
|
}
|
|
54
|
-
function installAmpLate(projectRoot, cavemanMode, shellCompressionLevel, enableMemory, enableDocs, enableData, enableSecurity, enableArchitecture) {
|
|
54
|
+
function installAmpLate(projectRoot, cavemanMode, shellCompressionLevel, enableMemory, enableDocs, enableData, enableSecurity, enableArchitecture, enablePatterns) {
|
|
55
55
|
const instructionsPath = path.join(projectRoot, ".kirograph", "amp.md");
|
|
56
56
|
(0, import_common.ensureDir)(path.dirname(instructionsPath));
|
|
57
|
-
fs.writeFileSync(instructionsPath, (0, import_instructions.buildAgentInstructions)((0, import_common2.buildInstructionOpts)(cavemanMode, shellCompressionLevel, enableMemory, void 0, enableDocs, enableData, enableSecurity, enableArchitecture)));
|
|
57
|
+
fs.writeFileSync(instructionsPath, (0, import_instructions.buildAgentInstructions)((0, import_common2.buildInstructionOpts)(cavemanMode, shellCompressionLevel, enableMemory, void 0, enableDocs, enableData, enableSecurity, enableArchitecture, enablePatterns)));
|
|
58
58
|
console.log(` \u2713 Amp instructions written to ${instructionsPath}`);
|
|
59
59
|
const ampInstructionsPath = path.join(projectRoot, ".amp", "instructions.md");
|
|
60
60
|
(0, import_common.ensureDir)(path.dirname(ampInstructionsPath));
|
|
61
|
-
fs.writeFileSync(ampInstructionsPath, (0, import_instructions.buildAgentInstructions)((0, import_common2.buildInstructionOpts)(cavemanMode, shellCompressionLevel, enableMemory, void 0, enableDocs, enableData, enableSecurity, enableArchitecture)));
|
|
61
|
+
fs.writeFileSync(ampInstructionsPath, (0, import_instructions.buildAgentInstructions)((0, import_common2.buildInstructionOpts)(cavemanMode, shellCompressionLevel, enableMemory, void 0, enableDocs, enableData, enableSecurity, enableArchitecture, enablePatterns)));
|
|
62
62
|
console.log(` \u2713 Amp instructions written to ${ampInstructionsPath}`);
|
|
63
63
|
}
|
|
64
64
|
function uninitAmp(projectRoot) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/bin/installer/targets/amp.ts"],
|
|
4
|
-
"sourcesContent": ["import * as fs from 'fs';\nimport * as path from 'path';\nimport { CavemanMode } from '../caveman';\nimport {\n ensureDir,\n KIROGRAPH_COMMAND,\n KIROGRAPH_MCP_ARGS,\n KIROGRAPH_SERVER_NAME,\n readJson,\n writeJson,\n} from '../common';\nimport { buildAgentInstructions } from '../instructions';\nimport { buildInstructionOpts } from '../common';\n\nexport function installAmpEarly(projectRoot: string): void {\n const configPath = path.join(projectRoot, '.amp', 'config.json');\n ensureDir(path.dirname(configPath));\n const config = readJson(configPath);\n config.mcpServers = config.mcpServers ?? {};\n config.mcpServers[KIROGRAPH_SERVER_NAME] = {\n command: KIROGRAPH_COMMAND,\n args: KIROGRAPH_MCP_ARGS,\n };\n writeJson(configPath, config);\n console.log(` \u2713 Sourcegraph Amp MCP server registered in ${configPath}`);\n}\n\nexport function installAmpLate(projectRoot: string, cavemanMode?: CavemanMode | 'off', shellCompressionLevel?: string, enableMemory?: boolean, enableDocs?: boolean, enableData?: boolean, enableSecurity?: boolean, enableArchitecture?: boolean): void {\n const instructionsPath = path.join(projectRoot, '.kirograph', 'amp.md');\n ensureDir(path.dirname(instructionsPath));\n fs.writeFileSync(instructionsPath, buildAgentInstructions(buildInstructionOpts(cavemanMode, shellCompressionLevel, enableMemory, undefined, enableDocs, enableData, enableSecurity, enableArchitecture)));\n console.log(` \u2713 Amp instructions written to ${instructionsPath}`);\n\n const ampInstructionsPath = path.join(projectRoot, '.amp', 'instructions.md');\n ensureDir(path.dirname(ampInstructionsPath));\n fs.writeFileSync(ampInstructionsPath, buildAgentInstructions(buildInstructionOpts(cavemanMode, shellCompressionLevel, enableMemory, undefined, enableDocs, enableData, enableSecurity, enableArchitecture)));\n console.log(` \u2713 Amp instructions written to ${ampInstructionsPath}`);\n}\n\nexport function uninitAmp(projectRoot: string): void {\n const configPath = path.join(projectRoot, '.amp', 'config.json');\n if (fs.existsSync(configPath)) {\n const config = readJson(configPath);\n if (config.mcpServers?.[KIROGRAPH_SERVER_NAME]) {\n delete config.mcpServers[KIROGRAPH_SERVER_NAME];\n writeJson(configPath, config);\n console.log(` \u2713 Removed kirograph from .amp/config.json`);\n }\n }\n\n const ampInstructionsPath = path.join(projectRoot, '.amp', 'instructions.md');\n if (fs.existsSync(ampInstructionsPath)) {\n fs.unlinkSync(ampInstructionsPath);\n console.log(` \u2713 Removed .amp/instructions.md`);\n }\n}\n\nexport function printAmpNextSteps(): void {\n console.log('\\n Done! Restart Sourcegraph Amp for the MCP server to load.');\n console.log(' KiroGraph instructions are in .amp/instructions.md\\n');\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,SAAoB;AACpB,WAAsB;AAEtB,oBAOO;AACP,0BAAuC;AACvC,IAAAA,iBAAqC;AAE9B,SAAS,gBAAgB,aAA2B;AACzD,QAAM,aAAa,KAAK,KAAK,aAAa,QAAQ,aAAa;AAC/D,+BAAU,KAAK,QAAQ,UAAU,CAAC;AAClC,QAAM,aAAS,wBAAS,UAAU;AAClC,SAAO,aAAa,OAAO,cAAc,CAAC;AAC1C,SAAO,WAAW,mCAAqB,IAAI;AAAA,IACzC,SAAS;AAAA,IACT,MAAM;AAAA,EACR;AACA,+BAAU,YAAY,MAAM;AAC5B,UAAQ,IAAI,qDAAgD,UAAU,EAAE;AAC1E;AAEO,SAAS,eAAe,aAAqB,aAAmC,uBAAgC,cAAwB,YAAsB,YAAsB,gBAA0B,
|
|
4
|
+
"sourcesContent": ["import * as fs from 'fs';\nimport * as path from 'path';\nimport { CavemanMode } from '../caveman';\nimport {\n ensureDir,\n KIROGRAPH_COMMAND,\n KIROGRAPH_MCP_ARGS,\n KIROGRAPH_SERVER_NAME,\n readJson,\n writeJson,\n} from '../common';\nimport { buildAgentInstructions } from '../instructions';\nimport { buildInstructionOpts } from '../common';\n\nexport function installAmpEarly(projectRoot: string): void {\n const configPath = path.join(projectRoot, '.amp', 'config.json');\n ensureDir(path.dirname(configPath));\n const config = readJson(configPath);\n config.mcpServers = config.mcpServers ?? {};\n config.mcpServers[KIROGRAPH_SERVER_NAME] = {\n command: KIROGRAPH_COMMAND,\n args: KIROGRAPH_MCP_ARGS,\n };\n writeJson(configPath, config);\n console.log(` \u2713 Sourcegraph Amp MCP server registered in ${configPath}`);\n}\n\nexport function installAmpLate(projectRoot: string, cavemanMode?: CavemanMode | 'off', shellCompressionLevel?: string, enableMemory?: boolean, enableDocs?: boolean, enableData?: boolean, enableSecurity?: boolean, enableArchitecture?: boolean, enablePatterns?: boolean): void {\n const instructionsPath = path.join(projectRoot, '.kirograph', 'amp.md');\n ensureDir(path.dirname(instructionsPath));\n fs.writeFileSync(instructionsPath, buildAgentInstructions(buildInstructionOpts(cavemanMode, shellCompressionLevel, enableMemory, undefined, enableDocs, enableData, enableSecurity, enableArchitecture, enablePatterns)));\n console.log(` \u2713 Amp instructions written to ${instructionsPath}`);\n\n const ampInstructionsPath = path.join(projectRoot, '.amp', 'instructions.md');\n ensureDir(path.dirname(ampInstructionsPath));\n fs.writeFileSync(ampInstructionsPath, buildAgentInstructions(buildInstructionOpts(cavemanMode, shellCompressionLevel, enableMemory, undefined, enableDocs, enableData, enableSecurity, enableArchitecture, enablePatterns)));\n console.log(` \u2713 Amp instructions written to ${ampInstructionsPath}`);\n}\n\nexport function uninitAmp(projectRoot: string): void {\n const configPath = path.join(projectRoot, '.amp', 'config.json');\n if (fs.existsSync(configPath)) {\n const config = readJson(configPath);\n if (config.mcpServers?.[KIROGRAPH_SERVER_NAME]) {\n delete config.mcpServers[KIROGRAPH_SERVER_NAME];\n writeJson(configPath, config);\n console.log(` \u2713 Removed kirograph from .amp/config.json`);\n }\n }\n\n const ampInstructionsPath = path.join(projectRoot, '.amp', 'instructions.md');\n if (fs.existsSync(ampInstructionsPath)) {\n fs.unlinkSync(ampInstructionsPath);\n console.log(` \u2713 Removed .amp/instructions.md`);\n }\n}\n\nexport function printAmpNextSteps(): void {\n console.log('\\n Done! Restart Sourcegraph Amp for the MCP server to load.');\n console.log(' KiroGraph instructions are in .amp/instructions.md\\n');\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,SAAoB;AACpB,WAAsB;AAEtB,oBAOO;AACP,0BAAuC;AACvC,IAAAA,iBAAqC;AAE9B,SAAS,gBAAgB,aAA2B;AACzD,QAAM,aAAa,KAAK,KAAK,aAAa,QAAQ,aAAa;AAC/D,+BAAU,KAAK,QAAQ,UAAU,CAAC;AAClC,QAAM,aAAS,wBAAS,UAAU;AAClC,SAAO,aAAa,OAAO,cAAc,CAAC;AAC1C,SAAO,WAAW,mCAAqB,IAAI;AAAA,IACzC,SAAS;AAAA,IACT,MAAM;AAAA,EACR;AACA,+BAAU,YAAY,MAAM;AAC5B,UAAQ,IAAI,qDAAgD,UAAU,EAAE;AAC1E;AAEO,SAAS,eAAe,aAAqB,aAAmC,uBAAgC,cAAwB,YAAsB,YAAsB,gBAA0B,oBAA8B,gBAAgC;AACjR,QAAM,mBAAmB,KAAK,KAAK,aAAa,cAAc,QAAQ;AACtE,+BAAU,KAAK,QAAQ,gBAAgB,CAAC;AACxC,KAAG,cAAc,sBAAkB,gDAAuB,qCAAqB,aAAa,uBAAuB,cAAc,QAAW,YAAY,YAAY,gBAAgB,oBAAoB,cAAc,CAAC,CAAC;AACxN,UAAQ,IAAI,wCAAmC,gBAAgB,EAAE;AAEjE,QAAM,sBAAsB,KAAK,KAAK,aAAa,QAAQ,iBAAiB;AAC5E,+BAAU,KAAK,QAAQ,mBAAmB,CAAC;AAC3C,KAAG,cAAc,yBAAqB,gDAAuB,qCAAqB,aAAa,uBAAuB,cAAc,QAAW,YAAY,YAAY,gBAAgB,oBAAoB,cAAc,CAAC,CAAC;AAC3N,UAAQ,IAAI,wCAAmC,mBAAmB,EAAE;AACtE;AAEO,SAAS,UAAU,aAA2B;AACnD,QAAM,aAAa,KAAK,KAAK,aAAa,QAAQ,aAAa;AAC/D,MAAI,GAAG,WAAW,UAAU,GAAG;AAC7B,UAAM,aAAS,wBAAS,UAAU;AAClC,QAAI,OAAO,aAAa,mCAAqB,GAAG;AAC9C,aAAO,OAAO,WAAW,mCAAqB;AAC9C,mCAAU,YAAY,MAAM;AAC5B,cAAQ,IAAI,kDAA6C;AAAA,IAC3D;AAAA,EACF;AAEA,QAAM,sBAAsB,KAAK,KAAK,aAAa,QAAQ,iBAAiB;AAC5E,MAAI,GAAG,WAAW,mBAAmB,GAAG;AACtC,OAAG,WAAW,mBAAmB;AACjC,YAAQ,IAAI,uCAAkC;AAAA,EAChD;AACF;AAEO,SAAS,oBAA0B;AACxC,UAAQ,IAAI,+DAA+D;AAC3E,UAAQ,IAAI,wDAAwD;AACtE;",
|
|
6
6
|
"names": ["import_common"]
|
|
7
7
|
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Antigravity IDE target.
|
|
3
|
+
*
|
|
4
|
+
* MCP: user-scoped at ~/.gemini/antigravity/mcp_config.json (print instructions)
|
|
5
|
+
* Hooks: .agents/hooks.json (workspace-level)
|
|
6
|
+
* Instructions: GEMINI.md (upsert block)
|
|
7
|
+
*/
|
|
8
|
+
import { CavemanMode } from '../caveman';
|
|
9
|
+
export declare function installAntigravityEarly(_projectRoot: string): void;
|
|
10
|
+
export declare function installAntigravityLate(projectRoot: string, cavemanMode?: CavemanMode | 'off', shellCompressionLevel?: string, enableMemory?: boolean, enableDocs?: boolean, enableData?: boolean, enableSecurity?: boolean, enableArchitecture?: boolean, enablePatterns?: boolean): void;
|
|
11
|
+
export declare function uninitAntigravity(projectRoot: string): void;
|
|
12
|
+
export declare function printAntigravityNextSteps(_projectRoot: string): void;
|
|
13
|
+
//# sourceMappingURL=antigravity.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"antigravity.d.ts","sourceRoot":"","sources":["../../../../src/bin/installer/targets/antigravity.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAkCzC,wBAAgB,uBAAuB,CAAC,YAAY,EAAE,MAAM,GAAG,IAAI,CAiBlE;AAED,wBAAgB,sBAAsB,CAAC,WAAW,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,WAAW,GAAG,KAAK,EAAE,qBAAqB,CAAC,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,OAAO,EAAE,UAAU,CAAC,EAAE,OAAO,EAAE,UAAU,CAAC,EAAE,OAAO,EAAE,cAAc,CAAC,EAAE,OAAO,EAAE,kBAAkB,CAAC,EAAE,OAAO,EAAE,cAAc,CAAC,EAAE,OAAO,GAAG,IAAI,CA2BzR;AAED,wBAAgB,iBAAiB,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI,CA6B3D;AAED,wBAAgB,yBAAyB,CAAC,YAAY,EAAE,MAAM,GAAG,IAAI,CAOpE"}
|
|
@@ -73,8 +73,8 @@ function installAntigravityEarly(_projectRoot) {
|
|
|
73
73
|
(0, import_common.writeJson)(mcpPath, existing);
|
|
74
74
|
console.log(` \u2713 Antigravity MCP server registered in ${mcpPath}`);
|
|
75
75
|
}
|
|
76
|
-
function installAntigravityLate(projectRoot, cavemanMode, shellCompressionLevel, enableMemory, enableDocs, enableData, enableSecurity, enableArchitecture) {
|
|
77
|
-
const opts = (0, import_common.buildInstructionOpts)(cavemanMode, shellCompressionLevel, enableMemory, true, enableDocs, enableData, enableSecurity, enableArchitecture);
|
|
76
|
+
function installAntigravityLate(projectRoot, cavemanMode, shellCompressionLevel, enableMemory, enableDocs, enableData, enableSecurity, enableArchitecture, enablePatterns) {
|
|
77
|
+
const opts = (0, import_common.buildInstructionOpts)(cavemanMode, shellCompressionLevel, enableMemory, true, enableDocs, enableData, enableSecurity, enableArchitecture, enablePatterns);
|
|
78
78
|
const instructionsPath = path.join(projectRoot, ".kirograph", "antigravity.md");
|
|
79
79
|
(0, import_common.ensureDir)(path.dirname(instructionsPath));
|
|
80
80
|
fs.writeFileSync(instructionsPath, (0, import_instructions.buildAgentInstructions)(opts));
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/bin/installer/targets/antigravity.ts"],
|
|
4
|
-
"sourcesContent": ["/**\n * Antigravity IDE target.\n *\n * MCP: user-scoped at ~/.gemini/antigravity/mcp_config.json (print instructions)\n * Hooks: .agents/hooks.json (workspace-level)\n * Instructions: GEMINI.md (upsert block)\n */\n\nimport * as fs from 'fs';\nimport * as path from 'path';\nimport { CavemanMode } from '../caveman';\nimport {\n ensureDir,\n buildInstructionOpts,\n readJson,\n writeJson,\n upsertGeneratedBlock,\n removeGeneratedBlock,\n KIROGRAPH_COMMAND,\n KIROGRAPH_MCP_ARGS,\n KIROGRAPH_SERVER_NAME,\n} from '../common';\nimport { buildAgentInstructions } from '../instructions';\n\nconst ANTIGRAVITY_BLOCK_ID = 'antigravity';\n\nfunction buildAntigravityHooks(): object {\n return {\n 'kirograph-sync': {\n Stop: [\n {\n hooks: [\n {\n type: 'command',\n command: 'kirograph sync --quiet 2>/dev/null || true',\n timeout: 30,\n },\n ],\n },\n ],\n },\n };\n}\n\nexport function installAntigravityEarly(_projectRoot: string): void {\n // Write MCP config to user-scoped ~/.gemini/antigravity/mcp_config.json\n const home = process.env.HOME || process.env.USERPROFILE || '';\n const mcpPath = path.join(home, '.gemini', 'antigravity', 'mcp_config.json');\n ensureDir(path.dirname(mcpPath));\n const existing = readJson(mcpPath);\n existing.mcpServers = existing.mcpServers ?? {};\n if (existing.mcpServers[KIROGRAPH_SERVER_NAME]) {\n console.log(` \u2713 Antigravity MCP already configured in ${mcpPath}`);\n return;\n }\n existing.mcpServers[KIROGRAPH_SERVER_NAME] = {\n command: KIROGRAPH_COMMAND,\n args: KIROGRAPH_MCP_ARGS,\n };\n writeJson(mcpPath, existing);\n console.log(` \u2713 Antigravity MCP server registered in ${mcpPath}`);\n}\n\nexport function installAntigravityLate(projectRoot: string, cavemanMode?: CavemanMode | 'off', shellCompressionLevel?: string, enableMemory?: boolean, enableDocs?: boolean, enableData?: boolean, enableSecurity?: boolean, enableArchitecture?: boolean): void {\n const opts = buildInstructionOpts(cavemanMode, shellCompressionLevel, enableMemory, true, enableDocs, enableData, enableSecurity, enableArchitecture);\n\n const instructionsPath = path.join(projectRoot, '.kirograph', 'antigravity.md');\n ensureDir(path.dirname(instructionsPath));\n fs.writeFileSync(instructionsPath, buildAgentInstructions(opts));\n console.log(` \u2713 Antigravity instructions written to ${instructionsPath}`);\n\n const geminiPath = path.join(projectRoot, 'GEMINI.md');\n const changed = upsertGeneratedBlock(geminiPath, ANTIGRAVITY_BLOCK_ID, '## KiroGraph', buildAgentInstructions(opts));\n console.log(changed\n ? ` \u2713 GEMINI.md updated with KiroGraph instructions`\n : ` \u2713 GEMINI.md already up to date`);\n\n // Write hooks to .agents/hooks.json\n const hooksPath = path.join(projectRoot, '.agents', 'hooks.json');\n ensureDir(path.dirname(hooksPath));\n const existing = readJson(hooksPath);\n const kgHooks = buildAntigravityHooks() as any;\n // Merge without overwriting existing hooks\n for (const [name, config] of Object.entries(kgHooks)) {\n if (!existing[name]) {\n existing[name] = config;\n }\n }\n writeJson(hooksPath, existing);\n console.log(` \u2713 Antigravity hooks written to ${hooksPath}`);\n}\n\nexport function uninitAntigravity(projectRoot: string): void {\n // Remove user-scoped MCP config\n const home = process.env.HOME || process.env.USERPROFILE || '';\n const mcpPath = path.join(home, '.gemini', 'antigravity', 'mcp_config.json');\n if (fs.existsSync(mcpPath)) {\n const config = readJson(mcpPath);\n if (config.mcpServers?.[KIROGRAPH_SERVER_NAME]) {\n delete config.mcpServers[KIROGRAPH_SERVER_NAME];\n if (Object.keys(config.mcpServers).length === 0) delete config.mcpServers;\n writeJson(mcpPath, config);\n console.log(` \u2713 Removed kirograph from ${mcpPath}`);\n }\n }\n\n const geminiPath = path.join(projectRoot, 'GEMINI.md');\n if (removeGeneratedBlock(geminiPath, ANTIGRAVITY_BLOCK_ID)) {\n console.log(` \u2713 Removed KiroGraph block from GEMINI.md`);\n }\n\n // Remove hooks\n const hooksPath = path.join(projectRoot, '.agents', 'hooks.json');\n if (fs.existsSync(hooksPath)) {\n const config = readJson(hooksPath);\n if (config['kirograph-sync']) {\n delete config['kirograph-sync'];\n writeJson(hooksPath, config);\n console.log(` \u2713 Removed kirograph-sync from .agents/hooks.json`);\n }\n }\n}\n\nexport function printAntigravityNextSteps(_projectRoot: string): void {\n const home = process.env.HOME || process.env.USERPROFILE || '';\n const mcpPath = path.join(home, '.gemini', 'antigravity', 'mcp_config.json');\n console.log('\\n Done! Restart Antigravity for the MCP server to load.');\n console.log(` MCP registered in ${mcpPath}`);\n console.log(' KiroGraph instructions are in GEMINI.md');\n console.log(' Auto-sync hook installed in .agents/hooks.json\\n');\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAQA,SAAoB;AACpB,WAAsB;AAEtB,oBAUO;AACP,0BAAuC;AAEvC,MAAM,uBAAuB;AAE7B,SAAS,wBAAgC;AACvC,SAAO;AAAA,IACL,kBAAkB;AAAA,MAChB,MAAM;AAAA,QACJ;AAAA,UACE,OAAO;AAAA,YACL;AAAA,cACE,MAAM;AAAA,cACN,SAAS;AAAA,cACT,SAAS;AAAA,YACX;AAAA,UACF;AAAA,QACF;AAAA,MACF;AAAA,IACF;AAAA,EACF;AACF;AAEO,SAAS,wBAAwB,cAA4B;AAElE,QAAM,OAAO,QAAQ,IAAI,QAAQ,QAAQ,IAAI,eAAe;AAC5D,QAAM,UAAU,KAAK,KAAK,MAAM,WAAW,eAAe,iBAAiB;AAC3E,+BAAU,KAAK,QAAQ,OAAO,CAAC;AAC/B,QAAM,eAAW,wBAAS,OAAO;AACjC,WAAS,aAAa,SAAS,cAAc,CAAC;AAC9C,MAAI,SAAS,WAAW,mCAAqB,GAAG;AAC9C,YAAQ,IAAI,kDAA6C,OAAO,EAAE;AAClE;AAAA,EACF;AACA,WAAS,WAAW,mCAAqB,IAAI;AAAA,IAC3C,SAAS;AAAA,IACT,MAAM;AAAA,EACR;AACA,+BAAU,SAAS,QAAQ;AAC3B,UAAQ,IAAI,iDAA4C,OAAO,EAAE;AACnE;AAEO,SAAS,uBAAuB,aAAqB,aAAmC,uBAAgC,cAAwB,YAAsB,YAAsB,gBAA0B,
|
|
4
|
+
"sourcesContent": ["/**\n * Antigravity IDE target.\n *\n * MCP: user-scoped at ~/.gemini/antigravity/mcp_config.json (print instructions)\n * Hooks: .agents/hooks.json (workspace-level)\n * Instructions: GEMINI.md (upsert block)\n */\n\nimport * as fs from 'fs';\nimport * as path from 'path';\nimport { CavemanMode } from '../caveman';\nimport {\n ensureDir,\n buildInstructionOpts,\n readJson,\n writeJson,\n upsertGeneratedBlock,\n removeGeneratedBlock,\n KIROGRAPH_COMMAND,\n KIROGRAPH_MCP_ARGS,\n KIROGRAPH_SERVER_NAME,\n} from '../common';\nimport { buildAgentInstructions } from '../instructions';\n\nconst ANTIGRAVITY_BLOCK_ID = 'antigravity';\n\nfunction buildAntigravityHooks(): object {\n return {\n 'kirograph-sync': {\n Stop: [\n {\n hooks: [\n {\n type: 'command',\n command: 'kirograph sync --quiet 2>/dev/null || true',\n timeout: 30,\n },\n ],\n },\n ],\n },\n };\n}\n\nexport function installAntigravityEarly(_projectRoot: string): void {\n // Write MCP config to user-scoped ~/.gemini/antigravity/mcp_config.json\n const home = process.env.HOME || process.env.USERPROFILE || '';\n const mcpPath = path.join(home, '.gemini', 'antigravity', 'mcp_config.json');\n ensureDir(path.dirname(mcpPath));\n const existing = readJson(mcpPath);\n existing.mcpServers = existing.mcpServers ?? {};\n if (existing.mcpServers[KIROGRAPH_SERVER_NAME]) {\n console.log(` \u2713 Antigravity MCP already configured in ${mcpPath}`);\n return;\n }\n existing.mcpServers[KIROGRAPH_SERVER_NAME] = {\n command: KIROGRAPH_COMMAND,\n args: KIROGRAPH_MCP_ARGS,\n };\n writeJson(mcpPath, existing);\n console.log(` \u2713 Antigravity MCP server registered in ${mcpPath}`);\n}\n\nexport function installAntigravityLate(projectRoot: string, cavemanMode?: CavemanMode | 'off', shellCompressionLevel?: string, enableMemory?: boolean, enableDocs?: boolean, enableData?: boolean, enableSecurity?: boolean, enableArchitecture?: boolean, enablePatterns?: boolean): void {\n const opts = buildInstructionOpts(cavemanMode, shellCompressionLevel, enableMemory, true, enableDocs, enableData, enableSecurity, enableArchitecture, enablePatterns);\n\n const instructionsPath = path.join(projectRoot, '.kirograph', 'antigravity.md');\n ensureDir(path.dirname(instructionsPath));\n fs.writeFileSync(instructionsPath, buildAgentInstructions(opts));\n console.log(` \u2713 Antigravity instructions written to ${instructionsPath}`);\n\n const geminiPath = path.join(projectRoot, 'GEMINI.md');\n const changed = upsertGeneratedBlock(geminiPath, ANTIGRAVITY_BLOCK_ID, '## KiroGraph', buildAgentInstructions(opts));\n console.log(changed\n ? ` \u2713 GEMINI.md updated with KiroGraph instructions`\n : ` \u2713 GEMINI.md already up to date`);\n\n // Write hooks to .agents/hooks.json\n const hooksPath = path.join(projectRoot, '.agents', 'hooks.json');\n ensureDir(path.dirname(hooksPath));\n const existing = readJson(hooksPath);\n const kgHooks = buildAntigravityHooks() as any;\n // Merge without overwriting existing hooks\n for (const [name, config] of Object.entries(kgHooks)) {\n if (!existing[name]) {\n existing[name] = config;\n }\n }\n writeJson(hooksPath, existing);\n console.log(` \u2713 Antigravity hooks written to ${hooksPath}`);\n}\n\nexport function uninitAntigravity(projectRoot: string): void {\n // Remove user-scoped MCP config\n const home = process.env.HOME || process.env.USERPROFILE || '';\n const mcpPath = path.join(home, '.gemini', 'antigravity', 'mcp_config.json');\n if (fs.existsSync(mcpPath)) {\n const config = readJson(mcpPath);\n if (config.mcpServers?.[KIROGRAPH_SERVER_NAME]) {\n delete config.mcpServers[KIROGRAPH_SERVER_NAME];\n if (Object.keys(config.mcpServers).length === 0) delete config.mcpServers;\n writeJson(mcpPath, config);\n console.log(` \u2713 Removed kirograph from ${mcpPath}`);\n }\n }\n\n const geminiPath = path.join(projectRoot, 'GEMINI.md');\n if (removeGeneratedBlock(geminiPath, ANTIGRAVITY_BLOCK_ID)) {\n console.log(` \u2713 Removed KiroGraph block from GEMINI.md`);\n }\n\n // Remove hooks\n const hooksPath = path.join(projectRoot, '.agents', 'hooks.json');\n if (fs.existsSync(hooksPath)) {\n const config = readJson(hooksPath);\n if (config['kirograph-sync']) {\n delete config['kirograph-sync'];\n writeJson(hooksPath, config);\n console.log(` \u2713 Removed kirograph-sync from .agents/hooks.json`);\n }\n }\n}\n\nexport function printAntigravityNextSteps(_projectRoot: string): void {\n const home = process.env.HOME || process.env.USERPROFILE || '';\n const mcpPath = path.join(home, '.gemini', 'antigravity', 'mcp_config.json');\n console.log('\\n Done! Restart Antigravity for the MCP server to load.');\n console.log(` MCP registered in ${mcpPath}`);\n console.log(' KiroGraph instructions are in GEMINI.md');\n console.log(' Auto-sync hook installed in .agents/hooks.json\\n');\n}\n"],
|
|
5
|
+
"mappings": "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",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { CavemanMode } from '../caveman';
|
|
2
|
+
export declare function installAugmentEarly(projectRoot: string): void;
|
|
3
|
+
export declare function installAugmentLate(projectRoot: string, cavemanMode?: CavemanMode | 'off', shellCompressionLevel?: string, enableMemory?: boolean, enableDocs?: boolean, enableData?: boolean, enableSecurity?: boolean, enableArchitecture?: boolean, enablePatterns?: boolean): void;
|
|
4
|
+
export declare function uninitAugment(projectRoot: string): void;
|
|
5
|
+
export declare function printAugmentNextSteps(): void;
|
|
6
|
+
//# sourceMappingURL=augment.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"augment.d.ts","sourceRoot":"","sources":["../../../../src/bin/installer/targets/augment.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAezC,wBAAgB,mBAAmB,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI,CAO7D;AAED,wBAAgB,kBAAkB,CAAC,WAAW,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,WAAW,GAAG,KAAK,EAAE,qBAAqB,CAAC,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,OAAO,EAAE,UAAU,CAAC,EAAE,OAAO,EAAE,UAAU,CAAC,EAAE,OAAO,EAAE,cAAc,CAAC,EAAE,OAAO,EAAE,kBAAkB,CAAC,EAAE,OAAO,EAAE,cAAc,CAAC,EAAE,OAAO,GAAG,IAAI,CAWrR;AAED,wBAAgB,aAAa,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI,CAUvD;AAED,wBAAgB,qBAAqB,IAAI,IAAI,CAG5C"}
|
|
@@ -48,13 +48,13 @@ function installAugmentEarly(projectRoot) {
|
|
|
48
48
|
});
|
|
49
49
|
console.log(` \u2713 Augment Code MCP server registered in ${mcpPath}`);
|
|
50
50
|
}
|
|
51
|
-
function installAugmentLate(projectRoot, cavemanMode, shellCompressionLevel, enableMemory, enableDocs, enableData, enableSecurity, enableArchitecture) {
|
|
51
|
+
function installAugmentLate(projectRoot, cavemanMode, shellCompressionLevel, enableMemory, enableDocs, enableData, enableSecurity, enableArchitecture, enablePatterns) {
|
|
52
52
|
const instructionsPath = path.join(projectRoot, ".kirograph", "augment.md");
|
|
53
53
|
(0, import_common.ensureDir)(path.dirname(instructionsPath));
|
|
54
|
-
fs.writeFileSync(instructionsPath, (0, import_instructions.buildAgentInstructions)((0, import_common2.buildInstructionOpts)(cavemanMode, shellCompressionLevel, enableMemory, void 0, enableDocs, enableData, enableSecurity, enableArchitecture)));
|
|
54
|
+
fs.writeFileSync(instructionsPath, (0, import_instructions.buildAgentInstructions)((0, import_common2.buildInstructionOpts)(cavemanMode, shellCompressionLevel, enableMemory, void 0, enableDocs, enableData, enableSecurity, enableArchitecture, enablePatterns)));
|
|
55
55
|
console.log(` \u2713 Augment instructions written to ${instructionsPath}`);
|
|
56
56
|
const guidelinesPath = path.join(projectRoot, "augment-guidelines.md");
|
|
57
|
-
const changed = (0, import_common.upsertGeneratedBlock)(guidelinesPath, AUGMENT_BLOCK_ID, "## KiroGraph", (0, import_instructions.buildAgentInstructions)((0, import_common2.buildInstructionOpts)(cavemanMode, shellCompressionLevel, enableMemory, void 0, enableDocs, enableData, enableSecurity, enableArchitecture)));
|
|
57
|
+
const changed = (0, import_common.upsertGeneratedBlock)(guidelinesPath, AUGMENT_BLOCK_ID, "## KiroGraph", (0, import_instructions.buildAgentInstructions)((0, import_common2.buildInstructionOpts)(cavemanMode, shellCompressionLevel, enableMemory, void 0, enableDocs, enableData, enableSecurity, enableArchitecture, enablePatterns)));
|
|
58
58
|
console.log(changed ? ` \u2713 augment-guidelines.md updated with KiroGraph instructions` : ` \u2713 augment-guidelines.md already up to date`);
|
|
59
59
|
}
|
|
60
60
|
function uninitAugment(projectRoot) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/bin/installer/targets/augment.ts"],
|
|
4
|
-
"sourcesContent": ["import * as fs from 'fs';\nimport * as path from 'path';\nimport { CavemanMode } from '../caveman';\nimport {\n ensureDir,\n KIROGRAPH_COMMAND,\n KIROGRAPH_MCP_ARGS,\n removeMcpServersConfig,\n upsertGeneratedBlock,\n removeGeneratedBlock,\n writeMcpServersConfig,\n} from '../common';\nimport { buildAgentInstructions } from '../instructions';\nimport { buildInstructionOpts } from '../common';\n\nconst AUGMENT_BLOCK_ID = 'augment';\n\nexport function installAugmentEarly(projectRoot: string): void {\n const mcpPath = path.join(projectRoot, '.augment', 'mcp.json');\n writeMcpServersConfig(mcpPath, {\n command: KIROGRAPH_COMMAND,\n args: KIROGRAPH_MCP_ARGS,\n });\n console.log(` \u2713 Augment Code MCP server registered in ${mcpPath}`);\n}\n\nexport function installAugmentLate(projectRoot: string, cavemanMode?: CavemanMode | 'off', shellCompressionLevel?: string, enableMemory?: boolean, enableDocs?: boolean, enableData?: boolean, enableSecurity?: boolean, enableArchitecture?: boolean): void {\n const instructionsPath = path.join(projectRoot, '.kirograph', 'augment.md');\n ensureDir(path.dirname(instructionsPath));\n fs.writeFileSync(instructionsPath, buildAgentInstructions(buildInstructionOpts(cavemanMode, shellCompressionLevel, enableMemory, undefined, enableDocs, enableData, enableSecurity, enableArchitecture)));\n console.log(` \u2713 Augment instructions written to ${instructionsPath}`);\n\n const guidelinesPath = path.join(projectRoot, 'augment-guidelines.md');\n const changed = upsertGeneratedBlock(guidelinesPath, AUGMENT_BLOCK_ID, '## KiroGraph', buildAgentInstructions(buildInstructionOpts(cavemanMode, shellCompressionLevel, enableMemory, undefined, enableDocs, enableData, enableSecurity, enableArchitecture)));\n console.log(changed\n ? ` \u2713 augment-guidelines.md updated with KiroGraph instructions`\n : ` \u2713 augment-guidelines.md already up to date`);\n}\n\nexport function uninitAugment(projectRoot: string): void {\n const mcpPath = path.join(projectRoot, '.augment', 'mcp.json');\n if (removeMcpServersConfig(mcpPath)) {\n console.log(` \u2713 Removed kirograph from .augment/mcp.json`);\n }\n\n const guidelinesPath = path.join(projectRoot, 'augment-guidelines.md');\n if (removeGeneratedBlock(guidelinesPath, AUGMENT_BLOCK_ID)) {\n console.log(` \u2713 Removed KiroGraph block from augment-guidelines.md`);\n }\n}\n\nexport function printAugmentNextSteps(): void {\n console.log('\\n Done! Restart Augment Code for the MCP server to load.');\n console.log(' KiroGraph instructions are in augment-guidelines.md\\n');\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,SAAoB;AACpB,WAAsB;AAEtB,oBAQO;AACP,0BAAuC;AACvC,IAAAA,iBAAqC;AAErC,MAAM,mBAAmB;AAElB,SAAS,oBAAoB,aAA2B;AAC7D,QAAM,UAAU,KAAK,KAAK,aAAa,YAAY,UAAU;AAC7D,2CAAsB,SAAS;AAAA,IAC7B,SAAS;AAAA,IACT,MAAM;AAAA,EACR,CAAC;AACD,UAAQ,IAAI,kDAA6C,OAAO,EAAE;AACpE;AAEO,SAAS,mBAAmB,aAAqB,aAAmC,uBAAgC,cAAwB,YAAsB,YAAsB,gBAA0B,
|
|
4
|
+
"sourcesContent": ["import * as fs from 'fs';\nimport * as path from 'path';\nimport { CavemanMode } from '../caveman';\nimport {\n ensureDir,\n KIROGRAPH_COMMAND,\n KIROGRAPH_MCP_ARGS,\n removeMcpServersConfig,\n upsertGeneratedBlock,\n removeGeneratedBlock,\n writeMcpServersConfig,\n} from '../common';\nimport { buildAgentInstructions } from '../instructions';\nimport { buildInstructionOpts } from '../common';\n\nconst AUGMENT_BLOCK_ID = 'augment';\n\nexport function installAugmentEarly(projectRoot: string): void {\n const mcpPath = path.join(projectRoot, '.augment', 'mcp.json');\n writeMcpServersConfig(mcpPath, {\n command: KIROGRAPH_COMMAND,\n args: KIROGRAPH_MCP_ARGS,\n });\n console.log(` \u2713 Augment Code MCP server registered in ${mcpPath}`);\n}\n\nexport function installAugmentLate(projectRoot: string, cavemanMode?: CavemanMode | 'off', shellCompressionLevel?: string, enableMemory?: boolean, enableDocs?: boolean, enableData?: boolean, enableSecurity?: boolean, enableArchitecture?: boolean, enablePatterns?: boolean): void {\n const instructionsPath = path.join(projectRoot, '.kirograph', 'augment.md');\n ensureDir(path.dirname(instructionsPath));\n fs.writeFileSync(instructionsPath, buildAgentInstructions(buildInstructionOpts(cavemanMode, shellCompressionLevel, enableMemory, undefined, enableDocs, enableData, enableSecurity, enableArchitecture, enablePatterns)));\n console.log(` \u2713 Augment instructions written to ${instructionsPath}`);\n\n const guidelinesPath = path.join(projectRoot, 'augment-guidelines.md');\n const changed = upsertGeneratedBlock(guidelinesPath, AUGMENT_BLOCK_ID, '## KiroGraph', buildAgentInstructions(buildInstructionOpts(cavemanMode, shellCompressionLevel, enableMemory, undefined, enableDocs, enableData, enableSecurity, enableArchitecture, enablePatterns)));\n console.log(changed\n ? ` \u2713 augment-guidelines.md updated with KiroGraph instructions`\n : ` \u2713 augment-guidelines.md already up to date`);\n}\n\nexport function uninitAugment(projectRoot: string): void {\n const mcpPath = path.join(projectRoot, '.augment', 'mcp.json');\n if (removeMcpServersConfig(mcpPath)) {\n console.log(` \u2713 Removed kirograph from .augment/mcp.json`);\n }\n\n const guidelinesPath = path.join(projectRoot, 'augment-guidelines.md');\n if (removeGeneratedBlock(guidelinesPath, AUGMENT_BLOCK_ID)) {\n console.log(` \u2713 Removed KiroGraph block from augment-guidelines.md`);\n }\n}\n\nexport function printAugmentNextSteps(): void {\n console.log('\\n Done! Restart Augment Code for the MCP server to load.');\n console.log(' KiroGraph instructions are in augment-guidelines.md\\n');\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,SAAoB;AACpB,WAAsB;AAEtB,oBAQO;AACP,0BAAuC;AACvC,IAAAA,iBAAqC;AAErC,MAAM,mBAAmB;AAElB,SAAS,oBAAoB,aAA2B;AAC7D,QAAM,UAAU,KAAK,KAAK,aAAa,YAAY,UAAU;AAC7D,2CAAsB,SAAS;AAAA,IAC7B,SAAS;AAAA,IACT,MAAM;AAAA,EACR,CAAC;AACD,UAAQ,IAAI,kDAA6C,OAAO,EAAE;AACpE;AAEO,SAAS,mBAAmB,aAAqB,aAAmC,uBAAgC,cAAwB,YAAsB,YAAsB,gBAA0B,oBAA8B,gBAAgC;AACrR,QAAM,mBAAmB,KAAK,KAAK,aAAa,cAAc,YAAY;AAC1E,+BAAU,KAAK,QAAQ,gBAAgB,CAAC;AACxC,KAAG,cAAc,sBAAkB,gDAAuB,qCAAqB,aAAa,uBAAuB,cAAc,QAAW,YAAY,YAAY,gBAAgB,oBAAoB,cAAc,CAAC,CAAC;AACxN,UAAQ,IAAI,4CAAuC,gBAAgB,EAAE;AAErE,QAAM,iBAAiB,KAAK,KAAK,aAAa,uBAAuB;AACrE,QAAM,cAAU,oCAAqB,gBAAgB,kBAAkB,oBAAgB,gDAAuB,qCAAqB,aAAa,uBAAuB,cAAc,QAAW,YAAY,YAAY,gBAAgB,oBAAoB,cAAc,CAAC,CAAC;AAC5Q,UAAQ,IAAI,UACR,uEACA,mDAA8C;AACpD;AAEO,SAAS,cAAc,aAA2B;AACvD,QAAM,UAAU,KAAK,KAAK,aAAa,YAAY,UAAU;AAC7D,UAAI,sCAAuB,OAAO,GAAG;AACnC,YAAQ,IAAI,mDAA8C;AAAA,EAC5D;AAEA,QAAM,iBAAiB,KAAK,KAAK,aAAa,uBAAuB;AACrE,UAAI,oCAAqB,gBAAgB,gBAAgB,GAAG;AAC1D,YAAQ,IAAI,6DAAwD;AAAA,EACtE;AACF;AAEO,SAAS,wBAA8B;AAC5C,UAAQ,IAAI,4DAA4D;AACxE,UAAQ,IAAI,yDAAyD;AACvE;",
|
|
6
6
|
"names": ["import_common"]
|
|
7
7
|
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { CavemanMode } from '../caveman';
|
|
2
|
+
export declare function installClaudeEarly(projectRoot: string): void;
|
|
3
|
+
export declare function installClaudeLate(projectRoot: string, cavemanMode?: CavemanMode | 'off', shellCompressionLevel?: string, enableMemory?: boolean, enableDocs?: boolean, enableData?: boolean, enableSecurity?: boolean, enableArchitecture?: boolean, enablePatterns?: boolean): void;
|
|
4
|
+
export declare function uninitClaude(projectRoot: string): void;
|
|
5
|
+
export declare function printClaudeNextSteps(): void;
|
|
6
|
+
//# sourceMappingURL=claude.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"claude.d.ts","sourceRoot":"","sources":["../../../../src/bin/installer/targets/claude.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AA2BzC,wBAAgB,kBAAkB,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI,CAS5D;AAED,wBAAgB,iBAAiB,CAAC,WAAW,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,WAAW,GAAG,KAAK,EAAE,qBAAqB,CAAC,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,OAAO,EAAE,UAAU,CAAC,EAAE,OAAO,EAAE,UAAU,CAAC,EAAE,OAAO,EAAE,cAAc,CAAC,EAAE,OAAO,EAAE,kBAAkB,CAAC,EAAE,OAAO,EAAE,cAAc,CAAC,EAAE,OAAO,GAAG,IAAI,CA8BpR;AAED,wBAAgB,YAAY,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI,CA8BtD;AAED,wBAAgB,oBAAoB,IAAI,IAAI,CAG3C"}
|