openlore 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +268 -0
- package/dist/api/analyze.d.ts +17 -0
- package/dist/api/analyze.d.ts.map +1 -0
- package/dist/api/analyze.js +143 -0
- package/dist/api/analyze.js.map +1 -0
- package/dist/api/audit.d.ts +10 -0
- package/dist/api/audit.d.ts.map +1 -0
- package/dist/api/audit.js +117 -0
- package/dist/api/audit.js.map +1 -0
- package/dist/api/decisions.d.ts +55 -0
- package/dist/api/decisions.d.ts.map +1 -0
- package/dist/api/decisions.js +157 -0
- package/dist/api/decisions.js.map +1 -0
- package/dist/api/drift.d.ts +21 -0
- package/dist/api/drift.d.ts.map +1 -0
- package/dist/api/drift.js +152 -0
- package/dist/api/drift.js.map +1 -0
- package/dist/api/generate.d.ts +18 -0
- package/dist/api/generate.d.ts.map +1 -0
- package/dist/api/generate.js +259 -0
- package/dist/api/generate.js.map +1 -0
- package/dist/api/index.d.ts +41 -0
- package/dist/api/index.d.ts.map +1 -0
- package/dist/api/index.js +34 -0
- package/dist/api/index.js.map +1 -0
- package/dist/api/init.d.ts +18 -0
- package/dist/api/init.d.ts.map +1 -0
- package/dist/api/init.js +83 -0
- package/dist/api/init.js.map +1 -0
- package/dist/api/run.d.ts +19 -0
- package/dist/api/run.d.ts.map +1 -0
- package/dist/api/run.js +312 -0
- package/dist/api/run.js.map +1 -0
- package/dist/api/specs.d.ts +49 -0
- package/dist/api/specs.d.ts.map +1 -0
- package/dist/api/specs.js +137 -0
- package/dist/api/specs.js.map +1 -0
- package/dist/api/types.d.ts +201 -0
- package/dist/api/types.d.ts.map +1 -0
- package/dist/api/types.js +9 -0
- package/dist/api/types.js.map +1 -0
- package/dist/api/verify.d.ts +20 -0
- package/dist/api/verify.d.ts.map +1 -0
- package/dist/api/verify.js +117 -0
- package/dist/api/verify.js.map +1 -0
- package/dist/cli/commands/analyze.d.ts +30 -0
- package/dist/cli/commands/analyze.d.ts.map +1 -0
- package/dist/cli/commands/analyze.js +683 -0
- package/dist/cli/commands/analyze.js.map +1 -0
- package/dist/cli/commands/audit.d.ts +9 -0
- package/dist/cli/commands/audit.d.ts.map +1 -0
- package/dist/cli/commands/audit.js +98 -0
- package/dist/cli/commands/audit.js.map +1 -0
- package/dist/cli/commands/decisions.d.ts +16 -0
- package/dist/cli/commands/decisions.d.ts.map +1 -0
- package/dist/cli/commands/decisions.js +864 -0
- package/dist/cli/commands/decisions.js.map +1 -0
- package/dist/cli/commands/digest.d.ts +9 -0
- package/dist/cli/commands/digest.d.ts.map +1 -0
- package/dist/cli/commands/digest.js +61 -0
- package/dist/cli/commands/digest.js.map +1 -0
- package/dist/cli/commands/doctor.d.ts +9 -0
- package/dist/cli/commands/doctor.d.ts.map +1 -0
- package/dist/cli/commands/doctor.js +398 -0
- package/dist/cli/commands/doctor.js.map +1 -0
- package/dist/cli/commands/drift.d.ts +9 -0
- package/dist/cli/commands/drift.d.ts.map +1 -0
- package/dist/cli/commands/drift.js +550 -0
- package/dist/cli/commands/drift.js.map +1 -0
- package/dist/cli/commands/generate.d.ts +9 -0
- package/dist/cli/commands/generate.d.ts.map +1 -0
- package/dist/cli/commands/generate.js +565 -0
- package/dist/cli/commands/generate.js.map +1 -0
- package/dist/cli/commands/init.d.ts +9 -0
- package/dist/cli/commands/init.d.ts.map +1 -0
- package/dist/cli/commands/init.js +173 -0
- package/dist/cli/commands/init.js.map +1 -0
- package/dist/cli/commands/mcp.d.ts +2235 -0
- package/dist/cli/commands/mcp.d.ts.map +1 -0
- package/dist/cli/commands/mcp.js +1384 -0
- package/dist/cli/commands/mcp.js.map +1 -0
- package/dist/cli/commands/refresh-stories.d.ts +10 -0
- package/dist/cli/commands/refresh-stories.d.ts.map +1 -0
- package/dist/cli/commands/refresh-stories.js +314 -0
- package/dist/cli/commands/refresh-stories.js.map +1 -0
- package/dist/cli/commands/run.d.ts +9 -0
- package/dist/cli/commands/run.d.ts.map +1 -0
- package/dist/cli/commands/run.js +459 -0
- package/dist/cli/commands/run.js.map +1 -0
- package/dist/cli/commands/setup.d.ts +19 -0
- package/dist/cli/commands/setup.d.ts.map +1 -0
- package/dist/cli/commands/setup.js +355 -0
- package/dist/cli/commands/setup.js.map +1 -0
- package/dist/cli/commands/test.d.ts +22 -0
- package/dist/cli/commands/test.d.ts.map +1 -0
- package/dist/cli/commands/test.js +180 -0
- package/dist/cli/commands/test.js.map +1 -0
- package/dist/cli/commands/verify.d.ts +9 -0
- package/dist/cli/commands/verify.d.ts.map +1 -0
- package/dist/cli/commands/verify.js +383 -0
- package/dist/cli/commands/verify.js.map +1 -0
- package/dist/cli/commands/view.d.ts +13 -0
- package/dist/cli/commands/view.d.ts.map +1 -0
- package/dist/cli/commands/view.js +547 -0
- package/dist/cli/commands/view.js.map +1 -0
- package/dist/cli/index.d.ts +9 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +118 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/cli/tui-approval.d.ts +11 -0
- package/dist/cli/tui-approval.d.ts.map +1 -0
- package/dist/cli/tui-approval.js +129 -0
- package/dist/cli/tui-approval.js.map +1 -0
- package/dist/constants.d.ts +314 -0
- package/dist/constants.d.ts.map +1 -0
- package/dist/constants.js +382 -0
- package/dist/constants.js.map +1 -0
- package/dist/core/analyzer/ai-config-generator.d.ts +54 -0
- package/dist/core/analyzer/ai-config-generator.d.ts.map +1 -0
- package/dist/core/analyzer/ai-config-generator.js +98 -0
- package/dist/core/analyzer/ai-config-generator.js.map +1 -0
- package/dist/core/analyzer/architecture-writer.d.ts +67 -0
- package/dist/core/analyzer/architecture-writer.d.ts.map +1 -0
- package/dist/core/analyzer/architecture-writer.js +209 -0
- package/dist/core/analyzer/architecture-writer.js.map +1 -0
- package/dist/core/analyzer/artifact-generator.d.ts +261 -0
- package/dist/core/analyzer/artifact-generator.d.ts.map +1 -0
- package/dist/core/analyzer/artifact-generator.js +909 -0
- package/dist/core/analyzer/artifact-generator.js.map +1 -0
- package/dist/core/analyzer/ast-chunker.d.ts +24 -0
- package/dist/core/analyzer/ast-chunker.d.ts.map +1 -0
- package/dist/core/analyzer/ast-chunker.js +198 -0
- package/dist/core/analyzer/ast-chunker.js.map +1 -0
- package/dist/core/analyzer/call-graph.d.ts +162 -0
- package/dist/core/analyzer/call-graph.d.ts.map +1 -0
- package/dist/core/analyzer/call-graph.js +2040 -0
- package/dist/core/analyzer/call-graph.js.map +1 -0
- package/dist/core/analyzer/code-shaper.d.ts +33 -0
- package/dist/core/analyzer/code-shaper.d.ts.map +1 -0
- package/dist/core/analyzer/code-shaper.js +154 -0
- package/dist/core/analyzer/code-shaper.js.map +1 -0
- package/dist/core/analyzer/codebase-digest.d.ts +40 -0
- package/dist/core/analyzer/codebase-digest.d.ts.map +1 -0
- package/dist/core/analyzer/codebase-digest.js +195 -0
- package/dist/core/analyzer/codebase-digest.js.map +1 -0
- package/dist/core/analyzer/cpp-header-resolver.d.ts +30 -0
- package/dist/core/analyzer/cpp-header-resolver.d.ts.map +1 -0
- package/dist/core/analyzer/cpp-header-resolver.js +71 -0
- package/dist/core/analyzer/cpp-header-resolver.js.map +1 -0
- package/dist/core/analyzer/dependency-graph.d.ts +230 -0
- package/dist/core/analyzer/dependency-graph.d.ts.map +1 -0
- package/dist/core/analyzer/dependency-graph.js +752 -0
- package/dist/core/analyzer/dependency-graph.js.map +1 -0
- package/dist/core/analyzer/duplicate-detector.d.ts +52 -0
- package/dist/core/analyzer/duplicate-detector.d.ts.map +1 -0
- package/dist/core/analyzer/duplicate-detector.js +289 -0
- package/dist/core/analyzer/duplicate-detector.js.map +1 -0
- package/dist/core/analyzer/embedding-service.d.ts +56 -0
- package/dist/core/analyzer/embedding-service.d.ts.map +1 -0
- package/dist/core/analyzer/embedding-service.js +118 -0
- package/dist/core/analyzer/embedding-service.js.map +1 -0
- package/dist/core/analyzer/env-extractor.d.ts +33 -0
- package/dist/core/analyzer/env-extractor.d.ts.map +1 -0
- package/dist/core/analyzer/env-extractor.js +196 -0
- package/dist/core/analyzer/env-extractor.js.map +1 -0
- package/dist/core/analyzer/external-packages.d.ts +20 -0
- package/dist/core/analyzer/external-packages.d.ts.map +1 -0
- package/dist/core/analyzer/external-packages.js +175 -0
- package/dist/core/analyzer/external-packages.js.map +1 -0
- package/dist/core/analyzer/file-walker.d.ts +78 -0
- package/dist/core/analyzer/file-walker.d.ts.map +1 -0
- package/dist/core/analyzer/file-walker.js +532 -0
- package/dist/core/analyzer/file-walker.js.map +1 -0
- package/dist/core/analyzer/function-registry-trie.d.ts +21 -0
- package/dist/core/analyzer/function-registry-trie.d.ts.map +1 -0
- package/dist/core/analyzer/function-registry-trie.js +39 -0
- package/dist/core/analyzer/function-registry-trie.js.map +1 -0
- package/dist/core/analyzer/http-route-parser.d.ts +152 -0
- package/dist/core/analyzer/http-route-parser.d.ts.map +1 -0
- package/dist/core/analyzer/http-route-parser.js +971 -0
- package/dist/core/analyzer/http-route-parser.js.map +1 -0
- package/dist/core/analyzer/import-parser.d.ts +100 -0
- package/dist/core/analyzer/import-parser.d.ts.map +1 -0
- package/dist/core/analyzer/import-parser.js +952 -0
- package/dist/core/analyzer/import-parser.js.map +1 -0
- package/dist/core/analyzer/import-resolver-bridge.d.ts +25 -0
- package/dist/core/analyzer/import-resolver-bridge.d.ts.map +1 -0
- package/dist/core/analyzer/import-resolver-bridge.js +99 -0
- package/dist/core/analyzer/import-resolver-bridge.js.map +1 -0
- package/dist/core/analyzer/index.d.ts +10 -0
- package/dist/core/analyzer/index.d.ts.map +1 -0
- package/dist/core/analyzer/index.js +10 -0
- package/dist/core/analyzer/index.js.map +1 -0
- package/dist/core/analyzer/middleware-extractor.d.ts +29 -0
- package/dist/core/analyzer/middleware-extractor.d.ts.map +1 -0
- package/dist/core/analyzer/middleware-extractor.js +195 -0
- package/dist/core/analyzer/middleware-extractor.js.map +1 -0
- package/dist/core/analyzer/refactor-analyzer.d.ts +83 -0
- package/dist/core/analyzer/refactor-analyzer.d.ts.map +1 -0
- package/dist/core/analyzer/refactor-analyzer.js +351 -0
- package/dist/core/analyzer/refactor-analyzer.js.map +1 -0
- package/dist/core/analyzer/repository-mapper.d.ts +150 -0
- package/dist/core/analyzer/repository-mapper.d.ts.map +1 -0
- package/dist/core/analyzer/repository-mapper.js +740 -0
- package/dist/core/analyzer/repository-mapper.js.map +1 -0
- package/dist/core/analyzer/schema-extractor.d.ts +41 -0
- package/dist/core/analyzer/schema-extractor.d.ts.map +1 -0
- package/dist/core/analyzer/schema-extractor.js +229 -0
- package/dist/core/analyzer/schema-extractor.js.map +1 -0
- package/dist/core/analyzer/signature-extractor.d.ts +31 -0
- package/dist/core/analyzer/signature-extractor.d.ts.map +1 -0
- package/dist/core/analyzer/signature-extractor.js +675 -0
- package/dist/core/analyzer/signature-extractor.js.map +1 -0
- package/dist/core/analyzer/significance-scorer.d.ts +79 -0
- package/dist/core/analyzer/significance-scorer.d.ts.map +1 -0
- package/dist/core/analyzer/significance-scorer.js +407 -0
- package/dist/core/analyzer/significance-scorer.js.map +1 -0
- package/dist/core/analyzer/spec-snapshot-generator.d.ts +17 -0
- package/dist/core/analyzer/spec-snapshot-generator.d.ts.map +1 -0
- package/dist/core/analyzer/spec-snapshot-generator.js +201 -0
- package/dist/core/analyzer/spec-snapshot-generator.js.map +1 -0
- package/dist/core/analyzer/spec-vector-index.d.ts +68 -0
- package/dist/core/analyzer/spec-vector-index.d.ts.map +1 -0
- package/dist/core/analyzer/spec-vector-index.js +340 -0
- package/dist/core/analyzer/spec-vector-index.js.map +1 -0
- package/dist/core/analyzer/subgraph-extractor.d.ts +51 -0
- package/dist/core/analyzer/subgraph-extractor.d.ts.map +1 -0
- package/dist/core/analyzer/subgraph-extractor.js +147 -0
- package/dist/core/analyzer/subgraph-extractor.js.map +1 -0
- package/dist/core/analyzer/type-inference-engine.d.ts +23 -0
- package/dist/core/analyzer/type-inference-engine.d.ts.map +1 -0
- package/dist/core/analyzer/type-inference-engine.js +130 -0
- package/dist/core/analyzer/type-inference-engine.js.map +1 -0
- package/dist/core/analyzer/ui-component-extractor.d.ts +43 -0
- package/dist/core/analyzer/ui-component-extractor.d.ts.map +1 -0
- package/dist/core/analyzer/ui-component-extractor.js +245 -0
- package/dist/core/analyzer/ui-component-extractor.js.map +1 -0
- package/dist/core/analyzer/unified-search.d.ts +116 -0
- package/dist/core/analyzer/unified-search.d.ts.map +1 -0
- package/dist/core/analyzer/unified-search.js +231 -0
- package/dist/core/analyzer/unified-search.js.map +1 -0
- package/dist/core/analyzer/vector-index.d.ts +92 -0
- package/dist/core/analyzer/vector-index.d.ts.map +1 -0
- package/dist/core/analyzer/vector-index.js +451 -0
- package/dist/core/analyzer/vector-index.js.map +1 -0
- package/dist/core/decisions/consolidator.d.ts +14 -0
- package/dist/core/decisions/consolidator.d.ts.map +1 -0
- package/dist/core/decisions/consolidator.js +169 -0
- package/dist/core/decisions/consolidator.js.map +1 -0
- package/dist/core/decisions/extractor.d.ts +26 -0
- package/dist/core/decisions/extractor.d.ts.map +1 -0
- package/dist/core/decisions/extractor.js +156 -0
- package/dist/core/decisions/extractor.js.map +1 -0
- package/dist/core/decisions/index.d.ts +19 -0
- package/dist/core/decisions/index.d.ts.map +1 -0
- package/dist/core/decisions/index.js +16 -0
- package/dist/core/decisions/index.js.map +1 -0
- package/dist/core/decisions/store.d.ts +36 -0
- package/dist/core/decisions/store.d.ts.map +1 -0
- package/dist/core/decisions/store.js +109 -0
- package/dist/core/decisions/store.js.map +1 -0
- package/dist/core/decisions/syncer.d.ts +27 -0
- package/dist/core/decisions/syncer.d.ts.map +1 -0
- package/dist/core/decisions/syncer.js +214 -0
- package/dist/core/decisions/syncer.js.map +1 -0
- package/dist/core/decisions/verifier.d.ts +20 -0
- package/dist/core/decisions/verifier.d.ts.map +1 -0
- package/dist/core/decisions/verifier.js +115 -0
- package/dist/core/decisions/verifier.js.map +1 -0
- package/dist/core/digest/digest-generator.d.ts +29 -0
- package/dist/core/digest/digest-generator.d.ts.map +1 -0
- package/dist/core/digest/digest-generator.js +181 -0
- package/dist/core/digest/digest-generator.js.map +1 -0
- package/dist/core/drift/drift-detector.d.ts +102 -0
- package/dist/core/drift/drift-detector.d.ts.map +1 -0
- package/dist/core/drift/drift-detector.js +598 -0
- package/dist/core/drift/drift-detector.js.map +1 -0
- package/dist/core/drift/git-diff.d.ts +60 -0
- package/dist/core/drift/git-diff.d.ts.map +1 -0
- package/dist/core/drift/git-diff.js +383 -0
- package/dist/core/drift/git-diff.js.map +1 -0
- package/dist/core/drift/index.d.ts +12 -0
- package/dist/core/drift/index.d.ts.map +1 -0
- package/dist/core/drift/index.js +9 -0
- package/dist/core/drift/index.js.map +1 -0
- package/dist/core/drift/spec-mapper.d.ts +73 -0
- package/dist/core/drift/spec-mapper.d.ts.map +1 -0
- package/dist/core/drift/spec-mapper.js +353 -0
- package/dist/core/drift/spec-mapper.js.map +1 -0
- package/dist/core/drift/test-suggester.d.ts +18 -0
- package/dist/core/drift/test-suggester.d.ts.map +1 -0
- package/dist/core/drift/test-suggester.js +107 -0
- package/dist/core/drift/test-suggester.js.map +1 -0
- package/dist/core/generator/adr-generator.d.ts +32 -0
- package/dist/core/generator/adr-generator.d.ts.map +1 -0
- package/dist/core/generator/adr-generator.js +192 -0
- package/dist/core/generator/adr-generator.js.map +1 -0
- package/dist/core/generator/index.d.ts +9 -0
- package/dist/core/generator/index.d.ts.map +1 -0
- package/dist/core/generator/index.js +12 -0
- package/dist/core/generator/index.js.map +1 -0
- package/dist/core/generator/mapping-generator.d.ts +54 -0
- package/dist/core/generator/mapping-generator.d.ts.map +1 -0
- package/dist/core/generator/mapping-generator.js +240 -0
- package/dist/core/generator/mapping-generator.js.map +1 -0
- package/dist/core/generator/openspec-compat.d.ts +160 -0
- package/dist/core/generator/openspec-compat.d.ts.map +1 -0
- package/dist/core/generator/openspec-compat.js +524 -0
- package/dist/core/generator/openspec-compat.js.map +1 -0
- package/dist/core/generator/openspec-format-generator.d.ts +131 -0
- package/dist/core/generator/openspec-format-generator.d.ts.map +1 -0
- package/dist/core/generator/openspec-format-generator.js +963 -0
- package/dist/core/generator/openspec-format-generator.js.map +1 -0
- package/dist/core/generator/openspec-writer.d.ts +130 -0
- package/dist/core/generator/openspec-writer.d.ts.map +1 -0
- package/dist/core/generator/openspec-writer.js +404 -0
- package/dist/core/generator/openspec-writer.js.map +1 -0
- package/dist/core/generator/prompts.d.ts +35 -0
- package/dist/core/generator/prompts.d.ts.map +1 -0
- package/dist/core/generator/prompts.js +212 -0
- package/dist/core/generator/prompts.js.map +1 -0
- package/dist/core/generator/rag-manifest-generator.d.ts +37 -0
- package/dist/core/generator/rag-manifest-generator.d.ts.map +1 -0
- package/dist/core/generator/rag-manifest-generator.js +134 -0
- package/dist/core/generator/rag-manifest-generator.js.map +1 -0
- package/dist/core/generator/schemas.d.ts +365 -0
- package/dist/core/generator/schemas.d.ts.map +1 -0
- package/dist/core/generator/schemas.js +190 -0
- package/dist/core/generator/schemas.js.map +1 -0
- package/dist/core/generator/spec-pipeline.d.ts +123 -0
- package/dist/core/generator/spec-pipeline.d.ts.map +1 -0
- package/dist/core/generator/spec-pipeline.js +699 -0
- package/dist/core/generator/spec-pipeline.js.map +1 -0
- package/dist/core/generator/stages/stage1-survey.d.ts +19 -0
- package/dist/core/generator/stages/stage1-survey.d.ts.map +1 -0
- package/dist/core/generator/stages/stage1-survey.js +171 -0
- package/dist/core/generator/stages/stage1-survey.js.map +1 -0
- package/dist/core/generator/stages/stage2-entities.d.ts +11 -0
- package/dist/core/generator/stages/stage2-entities.d.ts.map +1 -0
- package/dist/core/generator/stages/stage2-entities.js +74 -0
- package/dist/core/generator/stages/stage2-entities.js.map +1 -0
- package/dist/core/generator/stages/stage3-services.d.ts +11 -0
- package/dist/core/generator/stages/stage3-services.d.ts.map +1 -0
- package/dist/core/generator/stages/stage3-services.js +85 -0
- package/dist/core/generator/stages/stage3-services.js.map +1 -0
- package/dist/core/generator/stages/stage4-api.d.ts +11 -0
- package/dist/core/generator/stages/stage4-api.d.ts.map +1 -0
- package/dist/core/generator/stages/stage4-api.js +72 -0
- package/dist/core/generator/stages/stage4-api.js.map +1 -0
- package/dist/core/generator/stages/stage5-architecture.d.ts +11 -0
- package/dist/core/generator/stages/stage5-architecture.d.ts.map +1 -0
- package/dist/core/generator/stages/stage5-architecture.js +75 -0
- package/dist/core/generator/stages/stage5-architecture.js.map +1 -0
- package/dist/core/generator/stages/stage6-adr.d.ts +8 -0
- package/dist/core/generator/stages/stage6-adr.d.ts.map +1 -0
- package/dist/core/generator/stages/stage6-adr.js +47 -0
- package/dist/core/generator/stages/stage6-adr.js.map +1 -0
- package/dist/core/services/chat-agent.d.ts +50 -0
- package/dist/core/services/chat-agent.d.ts.map +1 -0
- package/dist/core/services/chat-agent.js +369 -0
- package/dist/core/services/chat-agent.js.map +1 -0
- package/dist/core/services/chat-tools.d.ts +32 -0
- package/dist/core/services/chat-tools.d.ts.map +1 -0
- package/dist/core/services/chat-tools.js +494 -0
- package/dist/core/services/chat-tools.js.map +1 -0
- package/dist/core/services/config-manager.d.ts +61 -0
- package/dist/core/services/config-manager.d.ts.map +1 -0
- package/dist/core/services/config-manager.js +149 -0
- package/dist/core/services/config-manager.js.map +1 -0
- package/dist/core/services/edge-store.d.ts +57 -0
- package/dist/core/services/edge-store.d.ts.map +1 -0
- package/dist/core/services/edge-store.js +419 -0
- package/dist/core/services/edge-store.js.map +1 -0
- package/dist/core/services/gitignore-manager.d.ts +29 -0
- package/dist/core/services/gitignore-manager.d.ts.map +1 -0
- package/dist/core/services/gitignore-manager.js +95 -0
- package/dist/core/services/gitignore-manager.js.map +1 -0
- package/dist/core/services/index.d.ts +8 -0
- package/dist/core/services/index.d.ts.map +1 -0
- package/dist/core/services/index.js +8 -0
- package/dist/core/services/index.js.map +1 -0
- package/dist/core/services/llm-service.d.ts +379 -0
- package/dist/core/services/llm-service.d.ts.map +1 -0
- package/dist/core/services/llm-service.js +1553 -0
- package/dist/core/services/llm-service.js.map +1 -0
- package/dist/core/services/mcp-handlers/analysis.d.ts +127 -0
- package/dist/core/services/mcp-handlers/analysis.d.ts.map +1 -0
- package/dist/core/services/mcp-handlers/analysis.js +1185 -0
- package/dist/core/services/mcp-handlers/analysis.js.map +1 -0
- package/dist/core/services/mcp-handlers/change.d.ts +14 -0
- package/dist/core/services/mcp-handlers/change.d.ts.map +1 -0
- package/dist/core/services/mcp-handlers/change.js +416 -0
- package/dist/core/services/mcp-handlers/change.js.map +1 -0
- package/dist/core/services/mcp-handlers/decisions.d.ts +16 -0
- package/dist/core/services/mcp-handlers/decisions.d.ts.map +1 -0
- package/dist/core/services/mcp-handlers/decisions.js +239 -0
- package/dist/core/services/mcp-handlers/decisions.js.map +1 -0
- package/dist/core/services/mcp-handlers/graph.d.ts +94 -0
- package/dist/core/services/mcp-handlers/graph.d.ts.map +1 -0
- package/dist/core/services/mcp-handlers/graph.js +693 -0
- package/dist/core/services/mcp-handlers/graph.js.map +1 -0
- package/dist/core/services/mcp-handlers/orient.d.ts +17 -0
- package/dist/core/services/mcp-handlers/orient.d.ts.map +1 -0
- package/dist/core/services/mcp-handlers/orient.js +357 -0
- package/dist/core/services/mcp-handlers/orient.js.map +1 -0
- package/dist/core/services/mcp-handlers/semantic.d.ts +66 -0
- package/dist/core/services/mcp-handlers/semantic.d.ts.map +1 -0
- package/dist/core/services/mcp-handlers/semantic.js +432 -0
- package/dist/core/services/mcp-handlers/semantic.js.map +1 -0
- package/dist/core/services/mcp-handlers/utils.d.ts +85 -0
- package/dist/core/services/mcp-handlers/utils.d.ts.map +1 -0
- package/dist/core/services/mcp-handlers/utils.js +262 -0
- package/dist/core/services/mcp-handlers/utils.js.map +1 -0
- package/dist/core/services/mcp-watcher.d.ts +41 -0
- package/dist/core/services/mcp-watcher.d.ts.map +1 -0
- package/dist/core/services/mcp-watcher.js +254 -0
- package/dist/core/services/mcp-watcher.js.map +1 -0
- package/dist/core/services/project-detector.d.ts +32 -0
- package/dist/core/services/project-detector.d.ts.map +1 -0
- package/dist/core/services/project-detector.js +100 -0
- package/dist/core/services/project-detector.js.map +1 -0
- package/dist/core/test-generator/coverage-analyzer.d.ts +27 -0
- package/dist/core/test-generator/coverage-analyzer.d.ts.map +1 -0
- package/dist/core/test-generator/coverage-analyzer.js +285 -0
- package/dist/core/test-generator/coverage-analyzer.js.map +1 -0
- package/dist/core/test-generator/framework-detector.d.ts +17 -0
- package/dist/core/test-generator/framework-detector.d.ts.map +1 -0
- package/dist/core/test-generator/framework-detector.js +65 -0
- package/dist/core/test-generator/framework-detector.js.map +1 -0
- package/dist/core/test-generator/index.d.ts +14 -0
- package/dist/core/test-generator/index.d.ts.map +1 -0
- package/dist/core/test-generator/index.js +11 -0
- package/dist/core/test-generator/index.js.map +1 -0
- package/dist/core/test-generator/renderers/catch2.d.ts +8 -0
- package/dist/core/test-generator/renderers/catch2.d.ts.map +1 -0
- package/dist/core/test-generator/renderers/catch2.js +47 -0
- package/dist/core/test-generator/renderers/catch2.js.map +1 -0
- package/dist/core/test-generator/renderers/gtest.d.ts +8 -0
- package/dist/core/test-generator/renderers/gtest.d.ts.map +1 -0
- package/dist/core/test-generator/renderers/gtest.js +45 -0
- package/dist/core/test-generator/renderers/gtest.js.map +1 -0
- package/dist/core/test-generator/renderers/index.d.ts +20 -0
- package/dist/core/test-generator/renderers/index.d.ts.map +1 -0
- package/dist/core/test-generator/renderers/index.js +35 -0
- package/dist/core/test-generator/renderers/index.js.map +1 -0
- package/dist/core/test-generator/renderers/playwright.d.ts +8 -0
- package/dist/core/test-generator/renderers/playwright.d.ts.map +1 -0
- package/dist/core/test-generator/renderers/playwright.js +44 -0
- package/dist/core/test-generator/renderers/playwright.js.map +1 -0
- package/dist/core/test-generator/renderers/pytest.d.ts +8 -0
- package/dist/core/test-generator/renderers/pytest.d.ts.map +1 -0
- package/dist/core/test-generator/renderers/pytest.js +44 -0
- package/dist/core/test-generator/renderers/pytest.js.map +1 -0
- package/dist/core/test-generator/renderers/shared.d.ts +21 -0
- package/dist/core/test-generator/renderers/shared.d.ts.map +1 -0
- package/dist/core/test-generator/renderers/shared.js +56 -0
- package/dist/core/test-generator/renderers/shared.js.map +1 -0
- package/dist/core/test-generator/renderers/vitest.d.ts +8 -0
- package/dist/core/test-generator/renderers/vitest.d.ts.map +1 -0
- package/dist/core/test-generator/renderers/vitest.js +52 -0
- package/dist/core/test-generator/renderers/vitest.js.map +1 -0
- package/dist/core/test-generator/scenario-parser.d.ts +33 -0
- package/dist/core/test-generator/scenario-parser.d.ts.map +1 -0
- package/dist/core/test-generator/scenario-parser.js +244 -0
- package/dist/core/test-generator/scenario-parser.js.map +1 -0
- package/dist/core/test-generator/test-generator.d.ts +30 -0
- package/dist/core/test-generator/test-generator.d.ts.map +1 -0
- package/dist/core/test-generator/test-generator.js +174 -0
- package/dist/core/test-generator/test-generator.js.map +1 -0
- package/dist/core/test-generator/test-writer.d.ts +25 -0
- package/dist/core/test-generator/test-writer.d.ts.map +1 -0
- package/dist/core/test-generator/test-writer.js +128 -0
- package/dist/core/test-generator/test-writer.js.map +1 -0
- package/dist/core/test-generator/then-matchers.d.ts +35 -0
- package/dist/core/test-generator/then-matchers.d.ts.map +1 -0
- package/dist/core/test-generator/then-matchers.js +211 -0
- package/dist/core/test-generator/then-matchers.js.map +1 -0
- package/dist/core/verifier/index.d.ts +5 -0
- package/dist/core/verifier/index.d.ts.map +1 -0
- package/dist/core/verifier/index.js +5 -0
- package/dist/core/verifier/index.js.map +1 -0
- package/dist/core/verifier/verification-engine.d.ts +293 -0
- package/dist/core/verifier/verification-engine.d.ts.map +1 -0
- package/dist/core/verifier/verification-engine.js +919 -0
- package/dist/core/verifier/verification-engine.js.map +1 -0
- package/dist/types/index.d.ts +368 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +5 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/pipeline.d.ts +167 -0
- package/dist/types/pipeline.d.ts.map +1 -0
- package/dist/types/pipeline.js +5 -0
- package/dist/types/pipeline.js.map +1 -0
- package/dist/types/test-generator.d.ts +103 -0
- package/dist/types/test-generator.d.ts.map +1 -0
- package/dist/types/test-generator.js +17 -0
- package/dist/types/test-generator.js.map +1 -0
- package/dist/utils/command-helpers.d.ts +68 -0
- package/dist/utils/command-helpers.d.ts.map +1 -0
- package/dist/utils/command-helpers.js +150 -0
- package/dist/utils/command-helpers.js.map +1 -0
- package/dist/utils/errors.d.ts +51 -0
- package/dist/utils/errors.d.ts.map +1 -0
- package/dist/utils/errors.js +129 -0
- package/dist/utils/errors.js.map +1 -0
- package/dist/utils/logger.d.ts +149 -0
- package/dist/utils/logger.d.ts.map +1 -0
- package/dist/utils/logger.js +342 -0
- package/dist/utils/logger.js.map +1 -0
- package/dist/utils/misc.d.ts +10 -0
- package/dist/utils/misc.d.ts.map +1 -0
- package/dist/utils/misc.js +21 -0
- package/dist/utils/misc.js.map +1 -0
- package/dist/utils/progress.d.ts +142 -0
- package/dist/utils/progress.d.ts.map +1 -0
- package/dist/utils/progress.js +283 -0
- package/dist/utils/progress.js.map +1 -0
- package/dist/utils/prompts.d.ts +53 -0
- package/dist/utils/prompts.d.ts.map +1 -0
- package/dist/utils/prompts.js +199 -0
- package/dist/utils/prompts.js.map +1 -0
- package/dist/utils/shutdown.d.ts +89 -0
- package/dist/utils/shutdown.d.ts.map +1 -0
- package/dist/utils/shutdown.js +238 -0
- package/dist/utils/shutdown.js.map +1 -0
- package/examples/bmad/README.md +113 -0
- package/examples/bmad/agents/architect.md +226 -0
- package/examples/bmad/agents/dev-brownfield.md +69 -0
- package/examples/bmad/setup/architect.customize.yaml +14 -0
- package/examples/bmad/tasks/implement-story.md +254 -0
- package/examples/bmad/tasks/onboarding.md +169 -0
- package/examples/bmad/tasks/refactor.md +178 -0
- package/examples/bmad/tasks/sprint-planning.md +168 -0
- package/examples/bmad/templates/story.md +108 -0
- package/examples/cline-workflows/openlore-analyze-codebase.md +101 -0
- package/examples/cline-workflows/openlore-check-spec-drift.md +102 -0
- package/examples/cline-workflows/openlore-execute-refactor.md +212 -0
- package/examples/cline-workflows/openlore-implement-feature.md +266 -0
- package/examples/cline-workflows/openlore-plan-refactor.md +279 -0
- package/examples/cline-workflows/openlore-refactor-codebase.md +16 -0
- package/examples/cline-workflows/openlore-write-tests.md +177 -0
- package/examples/drift-demo/openspec/config.yaml +14 -0
- package/examples/drift-demo/openspec/specs/architecture/spec.md +30 -0
- package/examples/drift-demo/openspec/specs/auth/spec.md +71 -0
- package/examples/drift-demo/openspec/specs/database/spec.md +33 -0
- package/examples/drift-demo/openspec/specs/overview/spec.md +20 -0
- package/examples/drift-demo/openspec/specs/projects/spec.md +55 -0
- package/examples/drift-demo/openspec/specs/tasks/spec.md +78 -0
- package/examples/drift-demo/package.json +21 -0
- package/examples/drift-demo/src/auth/auth-middleware.ts +30 -0
- package/examples/drift-demo/src/auth/auth-routes.ts +29 -0
- package/examples/drift-demo/src/auth/auth-service.ts +45 -0
- package/examples/drift-demo/src/database/connection.ts +27 -0
- package/examples/drift-demo/src/index.ts +16 -0
- package/examples/drift-demo/src/projects/project-model.ts +15 -0
- package/examples/drift-demo/src/projects/project-service.ts +34 -0
- package/examples/drift-demo/src/tasks/task-model.ts +37 -0
- package/examples/drift-demo/src/tasks/task-routes.ts +53 -0
- package/examples/drift-demo/src/tasks/task-service.ts +60 -0
- package/examples/drift-demo/src/utils/validation.ts +11 -0
- package/examples/drift-demo/tests/auth.test.ts +4 -0
- package/examples/drift-demo/tests/tasks.test.ts +4 -0
- package/examples/drift-demo/tsconfig.json +10 -0
- package/examples/drift-test/run-drift-test.sh +1087 -0
- package/examples/gsd/README.md +119 -0
- package/examples/gsd/commands/gsd/openlore-drift.md +111 -0
- package/examples/gsd/commands/gsd/openlore-orient.md +191 -0
- package/examples/mistral-vibe/README.md +101 -0
- package/examples/mistral-vibe/antipatterns-template.md +18 -0
- package/examples/mistral-vibe/skills/openlore-analyze-codebase/SKILL.md +124 -0
- package/examples/mistral-vibe/skills/openlore-brainstorm/SKILL.md +379 -0
- package/examples/mistral-vibe/skills/openlore-debug/SKILL.md +330 -0
- package/examples/mistral-vibe/skills/openlore-execute-refactor/SKILL.md +291 -0
- package/examples/mistral-vibe/skills/openlore-generate/SKILL.md +245 -0
- package/examples/mistral-vibe/skills/openlore-implement-story/SKILL.md +326 -0
- package/examples/mistral-vibe/skills/openlore-plan-refactor/SKILL.md +365 -0
- package/examples/mistral-vibe/skills/openlore-review-changes/SKILL.md +128 -0
- package/examples/mistral-vibe/skills/openlore-write-tests/SKILL.md +261 -0
- package/examples/opencode/agent-guard.ts +170 -0
- package/examples/opencode/plugins/anti-laziness.ts +202 -0
- package/examples/opencode/plugins/lib/openlore-context-injector-helpers.ts +116 -0
- package/examples/opencode/plugins/lib/openlore-decision-extractor-helpers.ts +65 -0
- package/examples/opencode/plugins/openlore-context-injector.test.ts +211 -0
- package/examples/opencode/plugins/openlore-context-injector.ts +165 -0
- package/examples/opencode/plugins/openlore-decision-extractor.test.ts +131 -0
- package/examples/opencode/plugins/openlore-decision-extractor.ts +322 -0
- package/examples/opencode/plugins/openlore-enforcer.ts +227 -0
- package/examples/opencode/prompts/sisyphus-sdd.md +150 -0
- package/examples/opencode-skills/openlore-analyze-codebase/SKILL.md +101 -0
- package/examples/opencode-skills/openlore-brainstorm/SKILL.md +354 -0
- package/examples/opencode-skills/openlore-debug/SKILL.md +291 -0
- package/examples/opencode-skills/openlore-execute-refactor/SKILL.md +241 -0
- package/examples/opencode-skills/openlore-generate/SKILL.md +236 -0
- package/examples/opencode-skills/openlore-implement-story/SKILL.md +251 -0
- package/examples/opencode-skills/openlore-plan-refactor/SKILL.md +298 -0
- package/examples/opencode-skills/openlore-review-changes/SKILL.md +134 -0
- package/examples/opencode-skills/openlore-write-tests/SKILL.md +230 -0
- package/examples/openspec-analysis/README.md +59 -0
- package/examples/openspec-analysis/SUMMARY.md +72 -0
- package/examples/openspec-analysis/config.json +16 -0
- package/examples/openspec-analysis/dependencies.mermaid +35 -0
- package/examples/openspec-analysis/dependency-graph.json +12116 -0
- package/examples/openspec-analysis/llm-context.json +119 -0
- package/examples/openspec-analysis/repo-structure.json +871 -0
- package/examples/openspec-cli/README.md +67 -0
- package/examples/openspec-cli/openspec/config.yaml +26 -0
- package/examples/openspec-cli/openspec/specs/architecture/spec.md +178 -0
- package/examples/openspec-cli/openspec/specs/artifact-graph/spec.md +143 -0
- package/examples/openspec-cli/openspec/specs/cli/spec.md +138 -0
- package/examples/openspec-cli/openspec/specs/overview/spec.md +60 -0
- package/examples/openspec-cli/openspec/specs/parsing/spec.md +123 -0
- package/examples/openspec-cli/openspec/specs/validation/spec.md +108 -0
- package/examples/spec-kit/README.md +104 -0
- package/examples/spec-kit/commands/drift.md +87 -0
- package/examples/spec-kit/commands/orient.md +138 -0
- package/examples/spec-kit/extension.yml +54 -0
- package/package.json +125 -0
- package/src/viewer/InteractiveGraphViewer.jsx +1600 -0
- package/src/viewer/app/index.html +17 -0
- package/src/viewer/app/main.jsx +13 -0
- package/src/viewer/components/ArchitectureView.jsx +177 -0
- package/src/viewer/components/ChatPanel.jsx +450 -0
- package/src/viewer/components/ClassGraph.jsx +782 -0
- package/src/viewer/components/ClusterGraph.jsx +469 -0
- package/src/viewer/components/FilterBar.jsx +179 -0
- package/src/viewer/components/FlatGraph.jsx +282 -0
- package/src/viewer/components/MicroComponents.jsx +85 -0
- package/src/viewer/hooks/usePanZoom.js +79 -0
- package/src/viewer/utils/constants.js +64 -0
- package/src/viewer/utils/graph-helpers.js +303 -0
- package/src/viewer/utils/graph-helpers.test.ts +39 -0
- package/src/viewer/utils/themes.js +206 -0
- package/stubs/tree-sitter-cli-stub/package.json +6 -0
|
@@ -0,0 +1,1384 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* openlore MCP Server
|
|
3
|
+
*
|
|
4
|
+
* Exposes openlore's static analysis capabilities as Model Context Protocol
|
|
5
|
+
* tools, usable from Cline, Claude Code, or any MCP-compatible AI agent.
|
|
6
|
+
*
|
|
7
|
+
* Transport: stdio (standard for editor-embedded MCP servers)
|
|
8
|
+
*
|
|
9
|
+
* Configuration for Cline / Claude Code:
|
|
10
|
+
* {
|
|
11
|
+
* "mcpServers": {
|
|
12
|
+
* "openlore": {
|
|
13
|
+
* "command": "node",
|
|
14
|
+
* "args": ["/path/to/openlore/dist/cli/index.js", "mcp"]
|
|
15
|
+
* }
|
|
16
|
+
* }
|
|
17
|
+
* }
|
|
18
|
+
*/
|
|
19
|
+
import { Command } from 'commander';
|
|
20
|
+
import { Server } from '@modelcontextprotocol/sdk/server/index.js';
|
|
21
|
+
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
|
|
22
|
+
import { CallToolRequestSchema, ListToolsRequestSchema, } from '@modelcontextprotocol/sdk/types.js';
|
|
23
|
+
import { sanitizeMcpError, validateDirectory } from '../../core/services/mcp-handlers/utils.js';
|
|
24
|
+
import { DEFAULT_DRIFT_MAX_FILES } from '../../constants.js';
|
|
25
|
+
import { handleGetCallGraph, handleGetSubgraph, handleAnalyzeImpact, handleGetLowRiskRefactorCandidates, handleGetLeafFunctions, handleGetCriticalHubs, handleGetGodFunctions, handleGetFileDependencies, handleTraceExecutionPath, } from '../../core/services/mcp-handlers/graph.js';
|
|
26
|
+
import { handleSearchCode, handleSuggestInsertionPoints, handleSearchSpecs, handleListSpecDomains, handleGetSpec, handleUnifiedSearch, } from '../../core/services/mcp-handlers/semantic.js';
|
|
27
|
+
import { handleOrient } from '../../core/services/mcp-handlers/orient.js';
|
|
28
|
+
import { handleGenerateChangeProposal, handleAnnotateStory } from '../../core/services/mcp-handlers/change.js';
|
|
29
|
+
import { handleRecordDecision, handleListDecisions, handleApproveDecision, handleRejectDecision, handleSyncDecisions, } from '../../core/services/mcp-handlers/decisions.js';
|
|
30
|
+
import { handleAnalyzeCodebase, handleGetArchitectureOverview, handleGetRefactorReport, handleGetDuplicateReport, handleGetSignatures, handleGetMapping, handleCheckSpecDrift, handleGetFunctionSkeleton, handleGetFunctionBody, handleGetDecisions, handleGetRouteInventory, handleGetMiddlewareInventory, handleGetSchemaInventory, handleGetUIComponents, handleGetEnvVars, handleGetExternalPackages, handleAuditSpecCoverage, handleGenerateTests, handleGetTestCoverage, handleGetMinimalContext, handleGetCluster, handleDetectChanges, } from '../../core/services/mcp-handlers/analysis.js';
|
|
31
|
+
// Re-export utilities for tests
|
|
32
|
+
export { sanitizeMcpError, validateDirectory };
|
|
33
|
+
// Re-export handlers for use by chat-tools.ts and tests
|
|
34
|
+
export { handleGetCallGraph, handleGetSubgraph, handleAnalyzeImpact, handleGetLowRiskRefactorCandidates, handleGetLeafFunctions, handleGetCriticalHubs, handleGetGodFunctions, handleGetFileDependencies, handleTraceExecutionPath, handleSearchCode, handleSuggestInsertionPoints, handleSearchSpecs, handleAnalyzeCodebase, handleGetArchitectureOverview, handleGetRefactorReport, handleGetDuplicateReport, handleGetSignatures, handleGetMapping, handleCheckSpecDrift, handleGetFunctionSkeleton, handleGetRouteInventory, handleGetMiddlewareInventory, handleGetSchemaInventory, handleGetUIComponents, handleGetEnvVars, handleGetExternalPackages, handleAuditSpecCoverage, handleGenerateTests, handleGetTestCoverage, handleGetMinimalContext, handleGetCluster, handleDetectChanges, };
|
|
35
|
+
// ============================================================================
|
|
36
|
+
// TOOL DEFINITIONS
|
|
37
|
+
// ============================================================================
|
|
38
|
+
export const TOOL_DEFINITIONS = [
|
|
39
|
+
{
|
|
40
|
+
name: 'orient',
|
|
41
|
+
description: 'START HERE. Call this before any other tool when beginning a new task on an unfamiliar codebase. ' +
|
|
42
|
+
'Given a natural-language task description, returns in ONE call: relevant functions, source files, ' +
|
|
43
|
+
'spec domains that cover them, depth-1 call neighbours, top insertion point candidates, ' +
|
|
44
|
+
'and matching spec sections. Falls back to keyword search if the embedding server is down. ' +
|
|
45
|
+
'Requires "openlore analyze" to have been run at least once.',
|
|
46
|
+
inputSchema: {
|
|
47
|
+
type: 'object',
|
|
48
|
+
properties: {
|
|
49
|
+
directory: {
|
|
50
|
+
type: 'string',
|
|
51
|
+
description: 'Absolute path to the project directory',
|
|
52
|
+
},
|
|
53
|
+
task: {
|
|
54
|
+
type: 'string',
|
|
55
|
+
description: 'Natural language description of the task, e.g. "add rate limiting to the HTTP API"',
|
|
56
|
+
},
|
|
57
|
+
limit: {
|
|
58
|
+
type: 'number',
|
|
59
|
+
description: 'Number of relevant functions to return (default: 5)',
|
|
60
|
+
},
|
|
61
|
+
},
|
|
62
|
+
required: ['directory', 'task'],
|
|
63
|
+
},
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
name: 'analyze_codebase',
|
|
67
|
+
description: 'USE THIS WHEN: the project has never been analyzed, or the user says the code changed ' +
|
|
68
|
+
'significantly since the last run, or other tools return "no cache found". ' +
|
|
69
|
+
'Builds the call graph, dependency graph, and refactor priorities — all without an LLM. ' +
|
|
70
|
+
'Results are cached for 1 hour; skip this if the cache is recent.',
|
|
71
|
+
inputSchema: {
|
|
72
|
+
type: 'object',
|
|
73
|
+
properties: {
|
|
74
|
+
directory: {
|
|
75
|
+
type: 'string',
|
|
76
|
+
description: 'Absolute path to the project directory to analyze',
|
|
77
|
+
},
|
|
78
|
+
force: {
|
|
79
|
+
type: 'boolean',
|
|
80
|
+
description: 'Force re-analysis even if a recent cache exists (default: false)',
|
|
81
|
+
},
|
|
82
|
+
},
|
|
83
|
+
required: ['directory'],
|
|
84
|
+
},
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
name: 'get_architecture_overview',
|
|
88
|
+
description: 'USE THIS WHEN: onboarding to an unknown codebase, or before planning a large feature. ' +
|
|
89
|
+
'Returns domain clusters, cross-cluster dependencies, global entry points, and critical hubs — ' +
|
|
90
|
+
'faster than reading package.json + directory tree yourself. Run analyze_codebase first.',
|
|
91
|
+
inputSchema: {
|
|
92
|
+
type: 'object',
|
|
93
|
+
properties: {
|
|
94
|
+
directory: {
|
|
95
|
+
type: 'string',
|
|
96
|
+
description: 'Absolute path to the project directory (must have been analyzed first)',
|
|
97
|
+
},
|
|
98
|
+
},
|
|
99
|
+
required: ['directory'],
|
|
100
|
+
},
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
name: 'get_refactor_report',
|
|
104
|
+
description: 'Return a prioritized list of functions that need refactoring, based on ' +
|
|
105
|
+
'the cached static analysis. Issues detected: unreachable code, high fan-in ' +
|
|
106
|
+
'(hub overload), high fan-out (god function), SRP violations (multi-requirement), ' +
|
|
107
|
+
'and cyclic dependencies. Run analyze_codebase first.',
|
|
108
|
+
inputSchema: {
|
|
109
|
+
type: 'object',
|
|
110
|
+
properties: {
|
|
111
|
+
directory: {
|
|
112
|
+
type: 'string',
|
|
113
|
+
description: 'Absolute path to the project directory (must have been analyzed first)',
|
|
114
|
+
},
|
|
115
|
+
},
|
|
116
|
+
required: ['directory'],
|
|
117
|
+
},
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
name: 'get_call_graph',
|
|
121
|
+
description: 'Return the call graph for a project: hub functions (high fan-in), ' +
|
|
122
|
+
'entry points (no internal callers), and architectural layer violations. ' +
|
|
123
|
+
'Supports TypeScript, JavaScript, Python, Go, Rust, Ruby, Java, C++. ' +
|
|
124
|
+
'Run analyze_codebase first.',
|
|
125
|
+
inputSchema: {
|
|
126
|
+
type: 'object',
|
|
127
|
+
properties: {
|
|
128
|
+
directory: {
|
|
129
|
+
type: 'string',
|
|
130
|
+
description: 'Absolute path to the project directory',
|
|
131
|
+
},
|
|
132
|
+
},
|
|
133
|
+
required: ['directory'],
|
|
134
|
+
},
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
name: 'get_duplicate_report',
|
|
138
|
+
description: 'Detect duplicate code (clone groups) across the codebase using pure static analysis. ' +
|
|
139
|
+
'Detects Type 1 (exact clones — identical after whitespace/comment normalization), ' +
|
|
140
|
+
'Type 2 (structural clones — same structure with renamed variables), and ' +
|
|
141
|
+
'Type 3 (near-clones with Jaccard similarity ≥ 0.7 on token n-grams). ' +
|
|
142
|
+
'No LLM calls required. Run analyze_codebase first.',
|
|
143
|
+
inputSchema: {
|
|
144
|
+
type: 'object',
|
|
145
|
+
properties: {
|
|
146
|
+
directory: {
|
|
147
|
+
type: 'string',
|
|
148
|
+
description: 'Absolute path to the project directory (must have been analyzed first)',
|
|
149
|
+
},
|
|
150
|
+
},
|
|
151
|
+
required: ['directory'],
|
|
152
|
+
},
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
name: 'get_signatures',
|
|
156
|
+
description: 'Return compact function and class signatures for files in a project. ' +
|
|
157
|
+
'Useful for understanding a codebase\'s public API without reading full source. ' +
|
|
158
|
+
'Optionally filter by file path pattern. Run analyze_codebase first.',
|
|
159
|
+
inputSchema: {
|
|
160
|
+
type: 'object',
|
|
161
|
+
properties: {
|
|
162
|
+
directory: {
|
|
163
|
+
type: 'string',
|
|
164
|
+
description: 'Absolute path to the project directory',
|
|
165
|
+
},
|
|
166
|
+
filePattern: {
|
|
167
|
+
type: 'string',
|
|
168
|
+
description: 'Optional substring to filter file paths (e.g. "services", "api", ".py")',
|
|
169
|
+
},
|
|
170
|
+
},
|
|
171
|
+
required: ['directory'],
|
|
172
|
+
},
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
name: 'get_subgraph',
|
|
176
|
+
description: 'Extract a subgraph of the call graph centred on ONE specific function. ' +
|
|
177
|
+
'Call once per function — do not combine multiple function names in a single call. ' +
|
|
178
|
+
'Useful for impact analysis ("what does X call?"), dependency tracing ' +
|
|
179
|
+
'("who calls X?"), or understanding a change\'s blast radius. ' +
|
|
180
|
+
'Prefer maxDepth 1 or 2; depth ≥ 3 on large projects may timeout. ' +
|
|
181
|
+
'Run analyze_codebase first.',
|
|
182
|
+
inputSchema: {
|
|
183
|
+
type: 'object',
|
|
184
|
+
properties: {
|
|
185
|
+
directory: {
|
|
186
|
+
type: 'string',
|
|
187
|
+
description: 'Absolute path to the project directory',
|
|
188
|
+
},
|
|
189
|
+
functionName: {
|
|
190
|
+
type: 'string',
|
|
191
|
+
description: 'Name of a single function to centre the subgraph on (exact name preferred; partial substring also accepted)',
|
|
192
|
+
},
|
|
193
|
+
direction: {
|
|
194
|
+
type: 'string',
|
|
195
|
+
enum: ['downstream', 'upstream', 'both'],
|
|
196
|
+
description: 'downstream = what this function calls (default), ' +
|
|
197
|
+
'upstream = who calls this function, ' +
|
|
198
|
+
'both = full neighbourhood',
|
|
199
|
+
},
|
|
200
|
+
maxDepth: {
|
|
201
|
+
type: 'number',
|
|
202
|
+
description: 'Maximum traversal depth (default: 3, recommended: 1–2 to avoid timeout)',
|
|
203
|
+
},
|
|
204
|
+
format: {
|
|
205
|
+
type: 'string',
|
|
206
|
+
enum: ['json', 'mermaid'],
|
|
207
|
+
description: 'Output format: "json" (default) or "mermaid" flowchart diagram',
|
|
208
|
+
},
|
|
209
|
+
},
|
|
210
|
+
required: ['directory', 'functionName'],
|
|
211
|
+
},
|
|
212
|
+
},
|
|
213
|
+
{
|
|
214
|
+
name: 'trace_execution_path',
|
|
215
|
+
description: 'USE THIS WHEN debugging: "how does request X reach function Y?", ' +
|
|
216
|
+
'"which call chain produced this error?", "is there a path from A to B?". ' +
|
|
217
|
+
'Finds all execution paths between two functions in the call graph (BFS/DFS, ' +
|
|
218
|
+
'shortest first). Complementary to get_subgraph — use get_subgraph for ' +
|
|
219
|
+
'neighbourhood exploration, trace_execution_path for point-to-point tracing.',
|
|
220
|
+
inputSchema: {
|
|
221
|
+
type: 'object',
|
|
222
|
+
properties: {
|
|
223
|
+
directory: {
|
|
224
|
+
type: 'string',
|
|
225
|
+
description: 'Absolute path to the project directory',
|
|
226
|
+
},
|
|
227
|
+
entryFunction: {
|
|
228
|
+
type: 'string',
|
|
229
|
+
description: 'Starting function name (exact or partial match)',
|
|
230
|
+
},
|
|
231
|
+
targetFunction: {
|
|
232
|
+
type: 'string',
|
|
233
|
+
description: 'Target function name (exact or partial match)',
|
|
234
|
+
},
|
|
235
|
+
maxDepth: {
|
|
236
|
+
type: 'number',
|
|
237
|
+
description: 'Maximum path length in hops (default: 6)',
|
|
238
|
+
},
|
|
239
|
+
maxPaths: {
|
|
240
|
+
type: 'number',
|
|
241
|
+
description: 'Maximum number of paths to return (default: 10, max: 50)',
|
|
242
|
+
},
|
|
243
|
+
},
|
|
244
|
+
required: ['directory', 'entryFunction', 'targetFunction'],
|
|
245
|
+
},
|
|
246
|
+
},
|
|
247
|
+
{
|
|
248
|
+
name: 'get_mapping',
|
|
249
|
+
description: 'Return the requirement → function mapping produced by openlore generate. ' +
|
|
250
|
+
'Shows which functions implement which spec requirements, confidence level ' +
|
|
251
|
+
'(llm / heuristic), and orphan functions not covered by any requirement. ' +
|
|
252
|
+
'Requires openlore generate to have been run at least once.',
|
|
253
|
+
inputSchema: {
|
|
254
|
+
type: 'object',
|
|
255
|
+
properties: {
|
|
256
|
+
directory: {
|
|
257
|
+
type: 'string',
|
|
258
|
+
description: 'Absolute path to the project directory',
|
|
259
|
+
},
|
|
260
|
+
domain: {
|
|
261
|
+
type: 'string',
|
|
262
|
+
description: 'Filter by domain name (e.g. "auth", "crawler")',
|
|
263
|
+
},
|
|
264
|
+
orphansOnly: {
|
|
265
|
+
type: 'boolean',
|
|
266
|
+
description: 'Return only orphan functions (not covered by any requirement)',
|
|
267
|
+
},
|
|
268
|
+
},
|
|
269
|
+
required: ['directory'],
|
|
270
|
+
},
|
|
271
|
+
},
|
|
272
|
+
{
|
|
273
|
+
name: 'check_spec_drift',
|
|
274
|
+
description: 'USE THIS WHEN: you\'ve modified code and want to know if the specs are still aligned, ' +
|
|
275
|
+
'or when asked "is the code in sync with the spec?", "what changed since the last spec run?". ' +
|
|
276
|
+
'Compares git-changed files against spec coverage — impossible to replicate by reading files. ' +
|
|
277
|
+
'Requires openlore generate to have been run at least once. No LLM required.',
|
|
278
|
+
inputSchema: {
|
|
279
|
+
type: 'object',
|
|
280
|
+
properties: {
|
|
281
|
+
directory: {
|
|
282
|
+
type: 'string',
|
|
283
|
+
description: 'Absolute path to the project directory (must be a git repository)',
|
|
284
|
+
},
|
|
285
|
+
base: {
|
|
286
|
+
type: 'string',
|
|
287
|
+
description: 'Git ref to compare against (default: auto-detect main/master)',
|
|
288
|
+
},
|
|
289
|
+
files: {
|
|
290
|
+
type: 'array',
|
|
291
|
+
items: { type: 'string' },
|
|
292
|
+
description: 'Specific files to check (default: all changed files)',
|
|
293
|
+
},
|
|
294
|
+
domains: {
|
|
295
|
+
type: 'array',
|
|
296
|
+
items: { type: 'string' },
|
|
297
|
+
description: 'Only check these spec domains (default: all domains)',
|
|
298
|
+
},
|
|
299
|
+
failOn: {
|
|
300
|
+
type: 'string',
|
|
301
|
+
enum: ['error', 'warning', 'info'],
|
|
302
|
+
description: 'Minimum severity to report (default: "warning")',
|
|
303
|
+
},
|
|
304
|
+
maxFiles: {
|
|
305
|
+
type: 'number',
|
|
306
|
+
description: 'Maximum number of changed files to analyze (default: 100)',
|
|
307
|
+
},
|
|
308
|
+
},
|
|
309
|
+
required: ['directory'],
|
|
310
|
+
},
|
|
311
|
+
},
|
|
312
|
+
{
|
|
313
|
+
name: 'analyze_impact',
|
|
314
|
+
description: 'USE THIS WHEN: you\'re about to modify a function and want to know the full consequences — ' +
|
|
315
|
+
'"what breaks if I change X?", "what\'s the blast radius of modifying Y?". ' +
|
|
316
|
+
'Returns fan-in/out, full call chains, risk score (0–100), and refactoring strategy. ' +
|
|
317
|
+
'Call this before touching any non-trivial function. Run analyze_codebase first.',
|
|
318
|
+
inputSchema: {
|
|
319
|
+
type: 'object',
|
|
320
|
+
properties: {
|
|
321
|
+
directory: {
|
|
322
|
+
type: 'string',
|
|
323
|
+
description: 'Absolute path to the project directory',
|
|
324
|
+
},
|
|
325
|
+
symbol: {
|
|
326
|
+
type: 'string',
|
|
327
|
+
description: 'Function or method name to analyse (exact or partial match)',
|
|
328
|
+
},
|
|
329
|
+
depth: {
|
|
330
|
+
type: 'number',
|
|
331
|
+
description: 'Traversal depth for upstream/downstream chains (default: 2)',
|
|
332
|
+
},
|
|
333
|
+
},
|
|
334
|
+
required: ['directory', 'symbol'],
|
|
335
|
+
},
|
|
336
|
+
},
|
|
337
|
+
{
|
|
338
|
+
name: 'get_low_risk_refactor_candidates',
|
|
339
|
+
description: 'Return the safest functions to refactor first: low fan-in (few callers), ' +
|
|
340
|
+
'low fan-out (few dependencies), no cyclic involvement, not a hub. ' +
|
|
341
|
+
'Ideal starting point for incremental, low-risk refactoring sessions. ' +
|
|
342
|
+
'Run analyze_codebase first.',
|
|
343
|
+
inputSchema: {
|
|
344
|
+
type: 'object',
|
|
345
|
+
properties: {
|
|
346
|
+
directory: {
|
|
347
|
+
type: 'string',
|
|
348
|
+
description: 'Absolute path to the project directory',
|
|
349
|
+
},
|
|
350
|
+
limit: {
|
|
351
|
+
type: 'number',
|
|
352
|
+
description: 'Maximum number of candidates to return (default: 5)',
|
|
353
|
+
},
|
|
354
|
+
filePattern: {
|
|
355
|
+
type: 'string',
|
|
356
|
+
description: 'Optional substring to restrict candidates to matching file paths',
|
|
357
|
+
},
|
|
358
|
+
},
|
|
359
|
+
required: ['directory'],
|
|
360
|
+
},
|
|
361
|
+
},
|
|
362
|
+
{
|
|
363
|
+
name: 'get_leaf_functions',
|
|
364
|
+
description: 'Return functions that make no internal calls (leaves of the call graph). ' +
|
|
365
|
+
'These are the safest refactoring targets: self-contained, easy to unit-test, ' +
|
|
366
|
+
'zero downstream blast radius. Best entry point for bottom-up refactoring. ' +
|
|
367
|
+
'Run analyze_codebase first.',
|
|
368
|
+
inputSchema: {
|
|
369
|
+
type: 'object',
|
|
370
|
+
properties: {
|
|
371
|
+
directory: {
|
|
372
|
+
type: 'string',
|
|
373
|
+
description: 'Absolute path to the project directory',
|
|
374
|
+
},
|
|
375
|
+
limit: {
|
|
376
|
+
type: 'number',
|
|
377
|
+
description: 'Maximum number of results to return (default: 20)',
|
|
378
|
+
},
|
|
379
|
+
filePattern: {
|
|
380
|
+
type: 'string',
|
|
381
|
+
description: 'Optional substring to restrict results to matching file paths',
|
|
382
|
+
},
|
|
383
|
+
sortBy: {
|
|
384
|
+
type: 'string',
|
|
385
|
+
enum: ['fanIn', 'name', 'file'],
|
|
386
|
+
description: 'Sort order: "fanIn" (most-called leaves first, default), "name", or "file"',
|
|
387
|
+
},
|
|
388
|
+
},
|
|
389
|
+
required: ['directory'],
|
|
390
|
+
},
|
|
391
|
+
},
|
|
392
|
+
{
|
|
393
|
+
name: 'get_critical_hubs',
|
|
394
|
+
description: 'Return the highest-impact hub functions: high fan-in (many callers depend on them), ' +
|
|
395
|
+
'possibly high fan-out (god functions). These require the most careful, incremental ' +
|
|
396
|
+
'refactoring with broad test coverage. Includes a stability score and recommended ' +
|
|
397
|
+
'approach (extract, split, facade, delegate). Run analyze_codebase first.',
|
|
398
|
+
inputSchema: {
|
|
399
|
+
type: 'object',
|
|
400
|
+
properties: {
|
|
401
|
+
directory: {
|
|
402
|
+
type: 'string',
|
|
403
|
+
description: 'Absolute path to the project directory',
|
|
404
|
+
},
|
|
405
|
+
limit: {
|
|
406
|
+
type: 'number',
|
|
407
|
+
description: 'Maximum number of hubs to return (default: 10)',
|
|
408
|
+
},
|
|
409
|
+
minFanIn: {
|
|
410
|
+
type: 'number',
|
|
411
|
+
description: 'Minimum fan-in threshold to be considered a hub (default: 3)',
|
|
412
|
+
},
|
|
413
|
+
},
|
|
414
|
+
required: ['directory'],
|
|
415
|
+
},
|
|
416
|
+
},
|
|
417
|
+
{
|
|
418
|
+
name: 'get_function_skeleton',
|
|
419
|
+
description: 'Return a noise-stripped skeleton of a source file: logs, inline comments, and ' +
|
|
420
|
+
'non-JSDoc block comments are removed while signatures, control flow (if/for/try), ' +
|
|
421
|
+
'return/throw statements, and call expressions are preserved. ' +
|
|
422
|
+
'Use this before refactoring a god function to get a compact structural view ' +
|
|
423
|
+
'without reading thousands of lines of raw source.',
|
|
424
|
+
inputSchema: {
|
|
425
|
+
type: 'object',
|
|
426
|
+
properties: {
|
|
427
|
+
directory: {
|
|
428
|
+
type: 'string',
|
|
429
|
+
description: 'Absolute path to the project directory',
|
|
430
|
+
},
|
|
431
|
+
filePath: {
|
|
432
|
+
type: 'string',
|
|
433
|
+
description: 'Path to the file, relative to the project directory',
|
|
434
|
+
},
|
|
435
|
+
},
|
|
436
|
+
required: ['directory', 'filePath'],
|
|
437
|
+
},
|
|
438
|
+
},
|
|
439
|
+
{
|
|
440
|
+
name: 'get_god_functions',
|
|
441
|
+
description: 'Detect god functions (high fan-out, likely orchestrators) in the project or in a ' +
|
|
442
|
+
'specific file, and return their call-graph neighborhood. ' +
|
|
443
|
+
'Use this to identify which functions need to be refactored and understand what ' +
|
|
444
|
+
'logical blocks to extract. Run analyze_codebase first.',
|
|
445
|
+
inputSchema: {
|
|
446
|
+
type: 'object',
|
|
447
|
+
properties: {
|
|
448
|
+
directory: {
|
|
449
|
+
type: 'string',
|
|
450
|
+
description: 'Absolute path to the project directory',
|
|
451
|
+
},
|
|
452
|
+
filePath: {
|
|
453
|
+
type: 'string',
|
|
454
|
+
description: 'Optional: restrict search to this file (relative path)',
|
|
455
|
+
},
|
|
456
|
+
fanOutThreshold: {
|
|
457
|
+
type: 'number',
|
|
458
|
+
description: 'Minimum fan-out to be considered a god function (default: 8)',
|
|
459
|
+
},
|
|
460
|
+
},
|
|
461
|
+
required: ['directory'],
|
|
462
|
+
},
|
|
463
|
+
},
|
|
464
|
+
{
|
|
465
|
+
name: 'suggest_insertion_points',
|
|
466
|
+
description: 'USE THIS WHEN: you need to find where to implement a new feature — ' +
|
|
467
|
+
'"where should I add rate limiting?", "where\'s the best place to add email validation?". ' +
|
|
468
|
+
'Combines semantic search + call graph to return ranked candidates with strategy. ' +
|
|
469
|
+
'Call this before writing any code; then use get_subgraph on the top candidates. ' +
|
|
470
|
+
'Requires "openlore analyze --embed".',
|
|
471
|
+
inputSchema: {
|
|
472
|
+
type: 'object',
|
|
473
|
+
properties: {
|
|
474
|
+
directory: {
|
|
475
|
+
type: 'string',
|
|
476
|
+
description: 'Absolute path to the project directory',
|
|
477
|
+
},
|
|
478
|
+
description: {
|
|
479
|
+
type: 'string',
|
|
480
|
+
description: 'Natural language description of the feature to implement, ' +
|
|
481
|
+
'e.g. "add retry mechanism for HTTP requests" or "validate user email on registration"',
|
|
482
|
+
},
|
|
483
|
+
limit: {
|
|
484
|
+
type: 'number',
|
|
485
|
+
description: 'Maximum number of candidates to return (default: 5)',
|
|
486
|
+
},
|
|
487
|
+
language: {
|
|
488
|
+
type: 'string',
|
|
489
|
+
description: 'Filter by language: "TypeScript", "Python", "Go", "Rust", "Ruby", "Java"',
|
|
490
|
+
},
|
|
491
|
+
},
|
|
492
|
+
required: ['directory', 'description'],
|
|
493
|
+
},
|
|
494
|
+
},
|
|
495
|
+
{
|
|
496
|
+
name: 'search_code',
|
|
497
|
+
description: 'USE THIS WHEN: you don\'t know which file or function handles a concept — ' +
|
|
498
|
+
'"where is rate limiting implemented?", "which function validates tokens?", ' +
|
|
499
|
+
'"what handles authentication?". Beats grep when the function name is unknown. ' +
|
|
500
|
+
'Falls back to keyword search automatically if the embedding server is down. ' +
|
|
501
|
+
'Requires "openlore analyze --embed" to have been run at least once.',
|
|
502
|
+
inputSchema: {
|
|
503
|
+
type: 'object',
|
|
504
|
+
properties: {
|
|
505
|
+
directory: {
|
|
506
|
+
type: 'string',
|
|
507
|
+
description: 'Absolute path to the project directory',
|
|
508
|
+
},
|
|
509
|
+
query: {
|
|
510
|
+
type: 'string',
|
|
511
|
+
description: 'Natural language query, e.g. "authenticate user with JWT"',
|
|
512
|
+
},
|
|
513
|
+
limit: {
|
|
514
|
+
type: 'number',
|
|
515
|
+
description: 'Maximum number of results to return (default: 10)',
|
|
516
|
+
},
|
|
517
|
+
language: {
|
|
518
|
+
type: 'string',
|
|
519
|
+
description: 'Filter by language: "TypeScript", "Python", "Go", "Rust", "Ruby", "Java"',
|
|
520
|
+
},
|
|
521
|
+
minFanIn: {
|
|
522
|
+
type: 'number',
|
|
523
|
+
description: 'Only return functions with at least this many callers (hub filter)',
|
|
524
|
+
},
|
|
525
|
+
},
|
|
526
|
+
required: ['directory', 'query'],
|
|
527
|
+
},
|
|
528
|
+
},
|
|
529
|
+
{
|
|
530
|
+
name: 'list_spec_domains',
|
|
531
|
+
description: 'List all OpenSpec domains available in this project. ' +
|
|
532
|
+
'Use this first when you need to discover what domains exist before doing a targeted search_specs call.',
|
|
533
|
+
inputSchema: {
|
|
534
|
+
type: 'object',
|
|
535
|
+
properties: {
|
|
536
|
+
directory: { type: 'string', description: 'Absolute path to the project directory' },
|
|
537
|
+
},
|
|
538
|
+
required: ['directory'],
|
|
539
|
+
},
|
|
540
|
+
},
|
|
541
|
+
{
|
|
542
|
+
name: 'search_specs',
|
|
543
|
+
description: 'USE THIS WHEN: asked "which spec covers X?", "what does the spec say about Y?", ' +
|
|
544
|
+
'"which requirement describes Z?". Searches specs by meaning and returns linked source files. ' +
|
|
545
|
+
'Use spec-first: check what the spec says before reading or writing code. ' +
|
|
546
|
+
'Requires "openlore analyze --embed" or "openlore analyze --reindex-specs".',
|
|
547
|
+
inputSchema: {
|
|
548
|
+
type: 'object',
|
|
549
|
+
properties: {
|
|
550
|
+
directory: {
|
|
551
|
+
type: 'string',
|
|
552
|
+
description: 'Absolute path to the project directory',
|
|
553
|
+
},
|
|
554
|
+
query: {
|
|
555
|
+
type: 'string',
|
|
556
|
+
description: 'Natural language query, e.g. "email validation workflow"',
|
|
557
|
+
},
|
|
558
|
+
limit: {
|
|
559
|
+
type: 'number',
|
|
560
|
+
description: 'Maximum number of results to return (default: 10)',
|
|
561
|
+
},
|
|
562
|
+
domain: {
|
|
563
|
+
type: 'string',
|
|
564
|
+
description: 'Filter by domain name (e.g. "auth", "analyzer")',
|
|
565
|
+
},
|
|
566
|
+
section: {
|
|
567
|
+
type: 'string',
|
|
568
|
+
description: 'Filter by section type: "requirements", "purpose", "design", "architecture", "entities"',
|
|
569
|
+
},
|
|
570
|
+
},
|
|
571
|
+
required: ['directory', 'query'],
|
|
572
|
+
},
|
|
573
|
+
},
|
|
574
|
+
{
|
|
575
|
+
name: 'search_unified',
|
|
576
|
+
description: 'USE THIS WHEN: you want to find where something is implemented AND what the spec says about it ' +
|
|
577
|
+
'in a single call. Searches both code functions and spec requirements simultaneously, then ' +
|
|
578
|
+
'cross-boosts results that are linked through mapping.json — so a function that implements a ' +
|
|
579
|
+
'matching requirement ranks higher than one found by code search alone. ' +
|
|
580
|
+
'Returns results with type "code", "spec", or "both" and a mappingBoost score. ' +
|
|
581
|
+
'Requires "openlore analyze --embed" and a prior "openlore generate" run.',
|
|
582
|
+
inputSchema: {
|
|
583
|
+
type: 'object',
|
|
584
|
+
properties: {
|
|
585
|
+
directory: {
|
|
586
|
+
type: 'string',
|
|
587
|
+
description: 'Absolute path to the project directory',
|
|
588
|
+
},
|
|
589
|
+
query: {
|
|
590
|
+
type: 'string',
|
|
591
|
+
description: 'Natural language query, e.g. "validate user authentication"',
|
|
592
|
+
},
|
|
593
|
+
limit: {
|
|
594
|
+
type: 'number',
|
|
595
|
+
description: 'Maximum number of results to return (default: 10)',
|
|
596
|
+
},
|
|
597
|
+
language: {
|
|
598
|
+
type: 'string',
|
|
599
|
+
description: 'Filter code results by language (e.g. "TypeScript")',
|
|
600
|
+
},
|
|
601
|
+
domain: {
|
|
602
|
+
type: 'string',
|
|
603
|
+
description: 'Filter spec results by domain name',
|
|
604
|
+
},
|
|
605
|
+
section: {
|
|
606
|
+
type: 'string',
|
|
607
|
+
description: 'Filter spec results by section type: "requirements", "purpose", etc.',
|
|
608
|
+
},
|
|
609
|
+
},
|
|
610
|
+
required: ['directory', 'query'],
|
|
611
|
+
},
|
|
612
|
+
},
|
|
613
|
+
{
|
|
614
|
+
name: 'get_spec',
|
|
615
|
+
description: 'Return the full content of a spec domain\'s specification file (spec.md) and the ' +
|
|
616
|
+
'functions that implement it. Use this to read requirements directly when you know the ' +
|
|
617
|
+
'domain name. Complements search_specs (which searches by meaning) by giving exact ' +
|
|
618
|
+
'read access to a known domain.',
|
|
619
|
+
inputSchema: {
|
|
620
|
+
type: 'object',
|
|
621
|
+
properties: {
|
|
622
|
+
directory: { type: 'string', description: 'Absolute path to the project directory' },
|
|
623
|
+
domain: {
|
|
624
|
+
type: 'string',
|
|
625
|
+
description: 'Domain name as returned by list_spec_domains (e.g. "auth", "analyzer")',
|
|
626
|
+
},
|
|
627
|
+
},
|
|
628
|
+
required: ['directory', 'domain'],
|
|
629
|
+
},
|
|
630
|
+
},
|
|
631
|
+
{
|
|
632
|
+
name: 'get_function_body',
|
|
633
|
+
description: 'Return the exact source code of a named function in a file. ' +
|
|
634
|
+
'Use this after search_code or get_function_skeleton to read the full implementation. ' +
|
|
635
|
+
'Requires a prior "openlore analyze" run for precise byte-range extraction; ' +
|
|
636
|
+
'falls back to a brace-depth scan when the call graph is unavailable.',
|
|
637
|
+
inputSchema: {
|
|
638
|
+
type: 'object',
|
|
639
|
+
properties: {
|
|
640
|
+
directory: { type: 'string', description: 'Absolute path to the project directory' },
|
|
641
|
+
filePath: {
|
|
642
|
+
type: 'string',
|
|
643
|
+
description: 'File path relative to the project directory, e.g. "src/auth/jwt.ts"',
|
|
644
|
+
},
|
|
645
|
+
functionName: {
|
|
646
|
+
type: 'string',
|
|
647
|
+
description: 'Name of the function to extract, e.g. "verifyToken"',
|
|
648
|
+
},
|
|
649
|
+
},
|
|
650
|
+
required: ['directory', 'filePath', 'functionName'],
|
|
651
|
+
},
|
|
652
|
+
},
|
|
653
|
+
{
|
|
654
|
+
name: 'get_file_dependencies',
|
|
655
|
+
description: 'Return the file-level import dependencies for a given source file. ' +
|
|
656
|
+
'Answers "what does this file import?" and "what files import this file?". ' +
|
|
657
|
+
'Useful for planning refactors, understanding coupling, or scoping the blast radius ' +
|
|
658
|
+
'of a change. Reads the dependency-graph.json produced by "openlore analyze".',
|
|
659
|
+
inputSchema: {
|
|
660
|
+
type: 'object',
|
|
661
|
+
properties: {
|
|
662
|
+
directory: { type: 'string', description: 'Absolute path to the project directory' },
|
|
663
|
+
filePath: {
|
|
664
|
+
type: 'string',
|
|
665
|
+
description: 'File path relative to the project root, e.g. "src/core/analyzer/vector-index.ts"',
|
|
666
|
+
},
|
|
667
|
+
direction: {
|
|
668
|
+
type: 'string',
|
|
669
|
+
enum: ['imports', 'importedBy', 'both'],
|
|
670
|
+
description: '"imports" = what this file depends on, "importedBy" = what depends on this file, "both" = both directions (default)',
|
|
671
|
+
},
|
|
672
|
+
},
|
|
673
|
+
required: ['directory', 'filePath'],
|
|
674
|
+
},
|
|
675
|
+
},
|
|
676
|
+
{
|
|
677
|
+
name: 'generate_change_proposal',
|
|
678
|
+
description: 'USE THIS WHEN: you have a BMAD story, a feature description, or a spec delta request, ' +
|
|
679
|
+
'and want to create a structured OpenSpec change proposal before writing any code. ' +
|
|
680
|
+
'Combines orient + search_specs + analyze_impact to produce a pre-filled ' +
|
|
681
|
+
'openspec/changes/{slug}/proposal.md — no LLM required. ' +
|
|
682
|
+
'Output includes affected domains, touched requirements, risk scores, and insertion points. ' +
|
|
683
|
+
'Run analyze_codebase first; spec index optional (degrades gracefully).',
|
|
684
|
+
inputSchema: {
|
|
685
|
+
type: 'object',
|
|
686
|
+
properties: {
|
|
687
|
+
directory: {
|
|
688
|
+
type: 'string',
|
|
689
|
+
description: 'Absolute path to the project directory',
|
|
690
|
+
},
|
|
691
|
+
description: {
|
|
692
|
+
type: 'string',
|
|
693
|
+
description: 'Intent of the change — story title + primary AC, or a free-form feature description. ' +
|
|
694
|
+
'e.g. "add retry logic to payment processing — must retry up to 3 times on timeout"',
|
|
695
|
+
},
|
|
696
|
+
slug: {
|
|
697
|
+
type: 'string',
|
|
698
|
+
description: 'Change identifier used as the directory name, e.g. "add-payment-retry". ' +
|
|
699
|
+
'Will be lowercased and hyphenated automatically.',
|
|
700
|
+
},
|
|
701
|
+
storyContent: {
|
|
702
|
+
type: 'string',
|
|
703
|
+
description: 'Optional: full BMAD story content (markdown). If provided, it is embedded verbatim ' +
|
|
704
|
+
'in the proposal for traceability.',
|
|
705
|
+
},
|
|
706
|
+
},
|
|
707
|
+
required: ['directory', 'description', 'slug'],
|
|
708
|
+
},
|
|
709
|
+
},
|
|
710
|
+
{
|
|
711
|
+
name: 'annotate_story',
|
|
712
|
+
description: 'USE THIS WHEN: you have a BMAD story file and want to auto-populate its risk_context ' +
|
|
713
|
+
'section with structural analysis from the codebase. ' +
|
|
714
|
+
'Reads the story file, runs orient + analyze_impact, writes the risk_context block ' +
|
|
715
|
+
'directly into the file (replaces existing section or inserts it). ' +
|
|
716
|
+
'Run by the Architect Agent after writing stories — eliminates manual copy-paste of ' +
|
|
717
|
+
'generate_change_proposal output. Run analyze_codebase first.',
|
|
718
|
+
inputSchema: {
|
|
719
|
+
type: 'object',
|
|
720
|
+
properties: {
|
|
721
|
+
directory: {
|
|
722
|
+
type: 'string',
|
|
723
|
+
description: 'Absolute path to the project directory',
|
|
724
|
+
},
|
|
725
|
+
storyFilePath: {
|
|
726
|
+
type: 'string',
|
|
727
|
+
description: 'Path to the BMAD story markdown file — relative to the project directory ' +
|
|
728
|
+
'or absolute. e.g. ".bmad-method/stories/001-add-payment-retry.md"',
|
|
729
|
+
},
|
|
730
|
+
description: {
|
|
731
|
+
type: 'string',
|
|
732
|
+
description: 'Story intent for structural analysis — use story title + primary AC. ' +
|
|
733
|
+
'e.g. "add payment retry — must retry up to 3 times on timeout"',
|
|
734
|
+
},
|
|
735
|
+
},
|
|
736
|
+
required: ['directory', 'storyFilePath', 'description'],
|
|
737
|
+
},
|
|
738
|
+
},
|
|
739
|
+
{
|
|
740
|
+
name: 'get_decisions',
|
|
741
|
+
description: 'List or search Architecture Decision Records (ADRs) stored in openspec/decisions/. ' +
|
|
742
|
+
'Use this when you need to understand why an architectural decision was made, ' +
|
|
743
|
+
'or to check whether a pattern is already documented. ' +
|
|
744
|
+
'ADRs are generated by "openlore generate --adrs".',
|
|
745
|
+
inputSchema: {
|
|
746
|
+
type: 'object',
|
|
747
|
+
properties: {
|
|
748
|
+
directory: { type: 'string', description: 'Absolute path to the project directory' },
|
|
749
|
+
query: {
|
|
750
|
+
type: 'string',
|
|
751
|
+
description: 'Optional text filter — returns only ADRs whose title or content contains this string',
|
|
752
|
+
},
|
|
753
|
+
},
|
|
754
|
+
required: ['directory'],
|
|
755
|
+
},
|
|
756
|
+
},
|
|
757
|
+
{
|
|
758
|
+
name: 'get_route_inventory',
|
|
759
|
+
description: 'Return the full HTTP/API route inventory for the project: total count, breakdown by ' +
|
|
760
|
+
'HTTP method and framework, and the list of individual routes with method, path, ' +
|
|
761
|
+
'framework, source file, and handler name. ' +
|
|
762
|
+
'Reads the pre-computed route-inventory.json artifact when available (runs in < 1 ms), ' +
|
|
763
|
+
'otherwise scans source files live. ' +
|
|
764
|
+
'Supports Express, Hono, Fastify, NestJS, Next.js App Router, FastAPI, Flask, Django, and more. ' +
|
|
765
|
+
'Run analyze_codebase first for the fastest results.',
|
|
766
|
+
inputSchema: {
|
|
767
|
+
type: 'object',
|
|
768
|
+
properties: {
|
|
769
|
+
directory: { type: 'string', description: 'Absolute path to the project directory' },
|
|
770
|
+
},
|
|
771
|
+
required: ['directory'],
|
|
772
|
+
},
|
|
773
|
+
},
|
|
774
|
+
{
|
|
775
|
+
name: 'get_middleware_inventory',
|
|
776
|
+
description: 'Return the middleware inventory for the project: all detected middleware entries with ' +
|
|
777
|
+
'type (auth, cors, rate-limit, validation, logging, error-handler, custom), framework, ' +
|
|
778
|
+
'source file, line number, and name. ' +
|
|
779
|
+
'Reads the pre-computed middleware-inventory.json artifact when available, ' +
|
|
780
|
+
'otherwise scans source files live. ' +
|
|
781
|
+
'Supports Express, Hono, Fastify, NestJS, Next.js, and more. ' +
|
|
782
|
+
'Run analyze_codebase first for the fastest results.',
|
|
783
|
+
inputSchema: {
|
|
784
|
+
type: 'object',
|
|
785
|
+
properties: {
|
|
786
|
+
directory: { type: 'string', description: 'Absolute path to the project directory' },
|
|
787
|
+
},
|
|
788
|
+
required: ['directory'],
|
|
789
|
+
},
|
|
790
|
+
},
|
|
791
|
+
{
|
|
792
|
+
name: 'get_schema_inventory',
|
|
793
|
+
description: 'Return the database schema inventory for the project: all detected ORM model/table ' +
|
|
794
|
+
'definitions with their fields, types, and nullability. ' +
|
|
795
|
+
'Reads the pre-computed schema-inventory.json artifact when available, ' +
|
|
796
|
+
'otherwise scans source files live. ' +
|
|
797
|
+
'Supports Prisma, TypeORM, Drizzle ORM, and SQLAlchemy. ' +
|
|
798
|
+
'Run analyze_codebase first for the fastest results.',
|
|
799
|
+
inputSchema: {
|
|
800
|
+
type: 'object',
|
|
801
|
+
properties: {
|
|
802
|
+
directory: { type: 'string', description: 'Absolute path to the project directory' },
|
|
803
|
+
},
|
|
804
|
+
required: ['directory'],
|
|
805
|
+
},
|
|
806
|
+
},
|
|
807
|
+
{
|
|
808
|
+
name: 'get_ui_components',
|
|
809
|
+
description: 'Return the UI component inventory for the project: all detected components with ' +
|
|
810
|
+
'their framework, props, source file, and line number. ' +
|
|
811
|
+
'Reads the pre-computed ui-inventory.json artifact when available, ' +
|
|
812
|
+
'otherwise scans source files live. ' +
|
|
813
|
+
'Supports React, Vue, Svelte, and Angular. ' +
|
|
814
|
+
'Run analyze_codebase first for the fastest results.',
|
|
815
|
+
inputSchema: {
|
|
816
|
+
type: 'object',
|
|
817
|
+
properties: {
|
|
818
|
+
directory: { type: 'string', description: 'Absolute path to the project directory' },
|
|
819
|
+
},
|
|
820
|
+
required: ['directory'],
|
|
821
|
+
},
|
|
822
|
+
},
|
|
823
|
+
{
|
|
824
|
+
name: 'get_env_vars',
|
|
825
|
+
description: 'Return all environment variables referenced in the project: names, which files use them, ' +
|
|
826
|
+
'whether they have a known default (from .env.example), and whether they are required ' +
|
|
827
|
+
'(used without a fallback in source code). ' +
|
|
828
|
+
'Reads the pre-computed env-inventory.json artifact when available, ' +
|
|
829
|
+
'otherwise scans source files live. ' +
|
|
830
|
+
'Supports JS/TS (process.env), Python (os.environ/os.getenv), Go (os.Getenv), Ruby (ENV[]). ' +
|
|
831
|
+
'Run analyze_codebase first for the fastest results.',
|
|
832
|
+
inputSchema: {
|
|
833
|
+
type: 'object',
|
|
834
|
+
properties: {
|
|
835
|
+
directory: { type: 'string', description: 'Absolute path to the project directory' },
|
|
836
|
+
},
|
|
837
|
+
required: ['directory'],
|
|
838
|
+
},
|
|
839
|
+
},
|
|
840
|
+
{
|
|
841
|
+
name: 'get_external_packages',
|
|
842
|
+
description: 'Return all direct external dependencies declared in package manifests: ' +
|
|
843
|
+
'package.json (npm), pyproject.toml / requirements.txt (pypi), Cargo.toml (cargo), go.mod (go). ' +
|
|
844
|
+
'Each entry includes name, version, ecosystem, and isDev flag. ' +
|
|
845
|
+
'Reads the pre-computed external-packages.json artifact when available, ' +
|
|
846
|
+
'otherwise scans manifests live. Run analyze_codebase first for the fastest results.',
|
|
847
|
+
inputSchema: {
|
|
848
|
+
type: 'object',
|
|
849
|
+
properties: {
|
|
850
|
+
directory: { type: 'string', description: 'Absolute path to the project directory' },
|
|
851
|
+
},
|
|
852
|
+
required: ['directory'],
|
|
853
|
+
},
|
|
854
|
+
},
|
|
855
|
+
{
|
|
856
|
+
name: 'audit_spec_coverage',
|
|
857
|
+
description: 'Parity audit: report spec coverage gaps without any LLM call. ' +
|
|
858
|
+
'Returns uncovered functions (exist in call graph but have no spec), ' +
|
|
859
|
+
'hub gaps (high fan-in functions with no spec), ' +
|
|
860
|
+
'orphan requirements (spec requirements with no mapped implementation), ' +
|
|
861
|
+
'and stale domains (source files changed after spec was last written). ' +
|
|
862
|
+
'Use this before starting a new feature to understand what needs specs, ' +
|
|
863
|
+
'or to audit coverage health. Requires "openlore analyze" to have been run.',
|
|
864
|
+
inputSchema: {
|
|
865
|
+
type: 'object',
|
|
866
|
+
properties: {
|
|
867
|
+
directory: { type: 'string', description: 'Absolute path to the project directory' },
|
|
868
|
+
maxUncovered: {
|
|
869
|
+
type: 'number',
|
|
870
|
+
description: 'Maximum uncovered functions to return (default: 50)',
|
|
871
|
+
},
|
|
872
|
+
hubThreshold: {
|
|
873
|
+
type: 'number',
|
|
874
|
+
description: 'Minimum fanIn to flag a function as a hub gap (default: 5)',
|
|
875
|
+
},
|
|
876
|
+
},
|
|
877
|
+
required: ['directory'],
|
|
878
|
+
},
|
|
879
|
+
},
|
|
880
|
+
{
|
|
881
|
+
name: 'generate_tests',
|
|
882
|
+
description: 'Generate spec-driven test files from OpenSpec scenarios. ' +
|
|
883
|
+
'Supports vitest, playwright, pytest (Python), gtest and catch2 (C++). ' +
|
|
884
|
+
'A THEN clause pattern engine emits real assertions for common patterns ' +
|
|
885
|
+
'(HTTP status codes, property presence, error messages) without any LLM call. ' +
|
|
886
|
+
'Pass useLlm:true to enrich unmatched clauses using mapped function source. ' +
|
|
887
|
+
'Each generated test is tagged with a parseable openlore: metadata comment ' +
|
|
888
|
+
'that enables spec coverage tracking via get_test_coverage. ' +
|
|
889
|
+
'Defaults to dryRun:true — set dryRun:false to write files to disk.',
|
|
890
|
+
inputSchema: {
|
|
891
|
+
type: 'object',
|
|
892
|
+
properties: {
|
|
893
|
+
directory: {
|
|
894
|
+
type: 'string',
|
|
895
|
+
description: 'Absolute path to the project directory',
|
|
896
|
+
},
|
|
897
|
+
domains: {
|
|
898
|
+
type: 'array',
|
|
899
|
+
items: { type: 'string' },
|
|
900
|
+
description: 'Only generate tests for these spec domains (omit for all)',
|
|
901
|
+
},
|
|
902
|
+
framework: {
|
|
903
|
+
type: 'string',
|
|
904
|
+
enum: ['vitest', 'playwright', 'pytest', 'gtest', 'catch2', 'auto'],
|
|
905
|
+
description: 'Test framework (default: auto-detect from project files)',
|
|
906
|
+
},
|
|
907
|
+
useLlm: {
|
|
908
|
+
type: 'boolean',
|
|
909
|
+
description: 'Use LLM to fill in assertions the pattern engine cannot match',
|
|
910
|
+
},
|
|
911
|
+
dryRun: {
|
|
912
|
+
type: 'boolean',
|
|
913
|
+
description: 'Preview generated content without writing files (default: true)',
|
|
914
|
+
},
|
|
915
|
+
},
|
|
916
|
+
required: ['directory'],
|
|
917
|
+
},
|
|
918
|
+
},
|
|
919
|
+
{
|
|
920
|
+
name: 'get_test_coverage',
|
|
921
|
+
description: 'Report which OpenSpec scenarios have corresponding test coverage. ' +
|
|
922
|
+
'Scans test files for // openlore: {JSON} or # openlore: {JSON} metadata tags ' +
|
|
923
|
+
'(added automatically by generate_tests). ' +
|
|
924
|
+
'Returns coverage percentage by domain, a list of uncovered scenarios, ' +
|
|
925
|
+
'and flags domains where spec drift was detected. ' +
|
|
926
|
+
'Use minCoverage to enforce a CI coverage gate.',
|
|
927
|
+
inputSchema: {
|
|
928
|
+
type: 'object',
|
|
929
|
+
properties: {
|
|
930
|
+
directory: {
|
|
931
|
+
type: 'string',
|
|
932
|
+
description: 'Absolute path to the project directory',
|
|
933
|
+
},
|
|
934
|
+
domains: {
|
|
935
|
+
type: 'array',
|
|
936
|
+
items: { type: 'string' },
|
|
937
|
+
description: 'Only check these spec domains (omit for all)',
|
|
938
|
+
},
|
|
939
|
+
minCoverage: {
|
|
940
|
+
type: 'number',
|
|
941
|
+
description: 'Report belowThreshold:true if effective coverage is below this percentage',
|
|
942
|
+
},
|
|
943
|
+
},
|
|
944
|
+
required: ['directory'],
|
|
945
|
+
},
|
|
946
|
+
},
|
|
947
|
+
{
|
|
948
|
+
name: 'get_minimal_context',
|
|
949
|
+
description: 'Return the minimum context needed to safely modify a function: ' +
|
|
950
|
+
'its signature and body, direct callers (signatures only), direct callees (signatures only), ' +
|
|
951
|
+
'and which test files cover it. ' +
|
|
952
|
+
'Use this instead of orient when you already know exactly which function to modify. ' +
|
|
953
|
+
'Typically 200-600 tokens vs orient\'s 2000+. Run analyze_codebase first.',
|
|
954
|
+
inputSchema: {
|
|
955
|
+
type: 'object',
|
|
956
|
+
properties: {
|
|
957
|
+
directory: { type: 'string', description: 'Absolute path to the project directory' },
|
|
958
|
+
functionName: { type: 'string', description: 'Exact function or method name' },
|
|
959
|
+
filePath: {
|
|
960
|
+
type: 'string',
|
|
961
|
+
description: 'Optional relative file path to disambiguate when multiple functions share the name',
|
|
962
|
+
},
|
|
963
|
+
},
|
|
964
|
+
required: ['directory', 'functionName'],
|
|
965
|
+
},
|
|
966
|
+
},
|
|
967
|
+
{
|
|
968
|
+
name: 'get_cluster',
|
|
969
|
+
description: 'Return all functions in the same community as the given function. ' +
|
|
970
|
+
'Communities are computed via label propagation on the call graph at analyze time — ' +
|
|
971
|
+
'tightly coupled functions land in the same cluster regardless of directory. ' +
|
|
972
|
+
'Use this to understand the "blast radius neighbourhood" without traversing the graph manually. ' +
|
|
973
|
+
'Run analyze_codebase first.',
|
|
974
|
+
inputSchema: {
|
|
975
|
+
type: 'object',
|
|
976
|
+
properties: {
|
|
977
|
+
directory: { type: 'string', description: 'Absolute path to the project directory' },
|
|
978
|
+
functionName: { type: 'string', description: 'Function name to look up the community for' },
|
|
979
|
+
},
|
|
980
|
+
required: ['directory', 'functionName'],
|
|
981
|
+
},
|
|
982
|
+
},
|
|
983
|
+
{
|
|
984
|
+
name: 'detect_changes',
|
|
985
|
+
description: 'Detect recently changed functions and rank them by blast radius. ' +
|
|
986
|
+
'Runs git diff against a base ref (default HEAD), maps changed lines to function nodes, ' +
|
|
987
|
+
'then scores each changed function by fan-in + transitive callers. ' +
|
|
988
|
+
'Highest-scored functions are the riskiest to break. ' +
|
|
989
|
+
'Also reports test coverage for each changed function via tested_by edges. ' +
|
|
990
|
+
'Run analyze_codebase first.',
|
|
991
|
+
inputSchema: {
|
|
992
|
+
type: 'object',
|
|
993
|
+
properties: {
|
|
994
|
+
directory: { type: 'string', description: 'Absolute path to the project directory' },
|
|
995
|
+
base: {
|
|
996
|
+
type: 'string',
|
|
997
|
+
description: 'Git ref to diff against (default: HEAD). Use "HEAD~1" for last commit, "main" for branch diff.',
|
|
998
|
+
},
|
|
999
|
+
},
|
|
1000
|
+
required: ['directory'],
|
|
1001
|
+
},
|
|
1002
|
+
},
|
|
1003
|
+
{
|
|
1004
|
+
name: 'record_decision',
|
|
1005
|
+
description: 'Record an architectural decision made during the current development session. ' +
|
|
1006
|
+
'Call this whenever you make a significant design choice: choosing a data structure, ' +
|
|
1007
|
+
'picking a library, defining an API contract, selecting an auth strategy, etc. ' +
|
|
1008
|
+
'Decisions are stored as drafts and consolidated before the next commit. ' +
|
|
1009
|
+
'Use the supersedes field when a later decision replaces an earlier one.',
|
|
1010
|
+
inputSchema: {
|
|
1011
|
+
type: 'object',
|
|
1012
|
+
properties: {
|
|
1013
|
+
directory: { type: 'string', description: 'Absolute path to the project directory' },
|
|
1014
|
+
title: { type: 'string', description: 'Short imperative statement, e.g. "Use UUIDs for decision IDs"' },
|
|
1015
|
+
rationale: { type: 'string', description: 'Why this decision was made' },
|
|
1016
|
+
consequences: { type: 'string', description: 'What changes as a result (optional)' },
|
|
1017
|
+
affectedFiles: {
|
|
1018
|
+
type: 'array',
|
|
1019
|
+
items: { type: 'string' },
|
|
1020
|
+
description: 'Source files most relevant to this decision (optional)',
|
|
1021
|
+
},
|
|
1022
|
+
supersedes: {
|
|
1023
|
+
type: 'string',
|
|
1024
|
+
description: 'ID of a prior decision this one replaces (optional)',
|
|
1025
|
+
},
|
|
1026
|
+
scope: {
|
|
1027
|
+
type: 'string',
|
|
1028
|
+
enum: ['local', 'component', 'cross-domain', 'system'],
|
|
1029
|
+
description: 'Decision scope. local: single file; component: single module/service; cross-domain: multiple spec domains or service contracts; system: global constraint. Only cross-domain and system generate ADR files. Defaults to component; auto-promoted to cross-domain when multiple domains inferred.',
|
|
1030
|
+
},
|
|
1031
|
+
},
|
|
1032
|
+
required: ['directory', 'title', 'rationale'],
|
|
1033
|
+
},
|
|
1034
|
+
},
|
|
1035
|
+
{
|
|
1036
|
+
name: 'list_decisions',
|
|
1037
|
+
description: 'List architectural decisions recorded during the current session. ' +
|
|
1038
|
+
'Shows draft, consolidated, verified, approved, rejected, and synced decisions. ' +
|
|
1039
|
+
'Use approve_decision or reject_decision to act on verified decisions, ' +
|
|
1040
|
+
'then sync_decisions to write them to spec.md files.',
|
|
1041
|
+
inputSchema: {
|
|
1042
|
+
type: 'object',
|
|
1043
|
+
properties: {
|
|
1044
|
+
directory: { type: 'string', description: 'Absolute path to the project directory' },
|
|
1045
|
+
status: {
|
|
1046
|
+
type: 'string',
|
|
1047
|
+
enum: ['draft', 'consolidated', 'verified', 'phantom', 'approved', 'rejected', 'synced'],
|
|
1048
|
+
description: 'Filter by status (default: returns all)',
|
|
1049
|
+
},
|
|
1050
|
+
},
|
|
1051
|
+
required: ['directory'],
|
|
1052
|
+
},
|
|
1053
|
+
},
|
|
1054
|
+
{
|
|
1055
|
+
name: 'approve_decision',
|
|
1056
|
+
description: '⚠ REQUIRES EXPLICIT HUMAN AUTHORIZATION — do NOT call this tool autonomously. ' +
|
|
1057
|
+
'Before calling, you MUST present the decision to the user and receive an explicit ' +
|
|
1058
|
+
'"yes" or "approve" response. Never approve on behalf of the user. ' +
|
|
1059
|
+
'Approves a verified architectural decision for syncing into spec.md files. ' +
|
|
1060
|
+
'After approving, call sync_decisions to write the decision to the relevant spec.',
|
|
1061
|
+
inputSchema: {
|
|
1062
|
+
type: 'object',
|
|
1063
|
+
properties: {
|
|
1064
|
+
directory: { type: 'string', description: 'Absolute path to the project directory' },
|
|
1065
|
+
id: { type: 'string', description: '8-character decision ID from list_decisions' },
|
|
1066
|
+
note: { type: 'string', description: 'Optional review note' },
|
|
1067
|
+
},
|
|
1068
|
+
required: ['directory', 'id'],
|
|
1069
|
+
},
|
|
1070
|
+
},
|
|
1071
|
+
{
|
|
1072
|
+
name: 'reject_decision',
|
|
1073
|
+
description: 'Reject a pending decision. Rejected decisions are never synced to spec files.',
|
|
1074
|
+
inputSchema: {
|
|
1075
|
+
type: 'object',
|
|
1076
|
+
properties: {
|
|
1077
|
+
directory: { type: 'string', description: 'Absolute path to the project directory' },
|
|
1078
|
+
id: { type: 'string', description: '8-character decision ID from list_decisions' },
|
|
1079
|
+
note: { type: 'string', description: 'Optional reason for rejection' },
|
|
1080
|
+
},
|
|
1081
|
+
required: ['directory', 'id'],
|
|
1082
|
+
},
|
|
1083
|
+
},
|
|
1084
|
+
{
|
|
1085
|
+
name: 'sync_decisions',
|
|
1086
|
+
description: 'Write all approved decisions into their target spec.md files. ' +
|
|
1087
|
+
'Appends new Requirement blocks and Decision sections (append-only, never overwrites). ' +
|
|
1088
|
+
'Creates ADR files in openspec/decisions/ for architectural decisions. ' +
|
|
1089
|
+
'Pass dryRun=true to preview without writing. ' +
|
|
1090
|
+
'Pass id to sync a single decision by ID.',
|
|
1091
|
+
inputSchema: {
|
|
1092
|
+
type: 'object',
|
|
1093
|
+
properties: {
|
|
1094
|
+
directory: { type: 'string', description: 'Absolute path to the project directory' },
|
|
1095
|
+
dryRun: { type: 'boolean', description: 'Preview without writing files (default: false)' },
|
|
1096
|
+
id: { type: 'string', description: 'Sync only this specific decision ID (default: all approved)' },
|
|
1097
|
+
},
|
|
1098
|
+
required: ['directory'],
|
|
1099
|
+
},
|
|
1100
|
+
},
|
|
1101
|
+
];
|
|
1102
|
+
// ============================================================================
|
|
1103
|
+
// MCP SERVER
|
|
1104
|
+
// ============================================================================
|
|
1105
|
+
// Annotations improve Tool Search relevance in Claude Code (BM25/regex ranking).
|
|
1106
|
+
// RO = read-only queries, RW_I = writes but idempotent, RW = non-idempotent writes.
|
|
1107
|
+
const _RO = { readOnlyHint: true, destructiveHint: false, idempotentHint: true };
|
|
1108
|
+
const _RWI = { readOnlyHint: false, destructiveHint: false, idempotentHint: true };
|
|
1109
|
+
const _RW = { readOnlyHint: false, destructiveHint: false, idempotentHint: false };
|
|
1110
|
+
const TOOL_ANNOTATIONS = {
|
|
1111
|
+
orient: _RO, analyze_codebase: _RWI, get_architecture_overview: _RO,
|
|
1112
|
+
get_refactor_report: _RO, get_call_graph: _RO, get_duplicate_report: _RO,
|
|
1113
|
+
get_signatures: _RO, get_subgraph: _RO, trace_execution_path: _RO,
|
|
1114
|
+
get_mapping: _RO, check_spec_drift: _RO, analyze_impact: _RO,
|
|
1115
|
+
get_low_risk_refactor_candidates: _RO, get_leaf_functions: _RO,
|
|
1116
|
+
get_critical_hubs: _RO, get_function_skeleton: _RO, get_god_functions: _RO,
|
|
1117
|
+
suggest_insertion_points: _RO, search_code: _RO, list_spec_domains: _RO,
|
|
1118
|
+
search_specs: _RO, search_unified: _RO, get_spec: _RO, get_function_body: _RO,
|
|
1119
|
+
get_file_dependencies: _RO, generate_change_proposal: _RW, annotate_story: _RW,
|
|
1120
|
+
get_decisions: _RO, get_route_inventory: _RO, get_middleware_inventory: _RO,
|
|
1121
|
+
get_schema_inventory: _RO, get_ui_components: _RO, get_env_vars: _RO,
|
|
1122
|
+
get_external_packages: _RO, audit_spec_coverage: _RO, generate_tests: _RW,
|
|
1123
|
+
get_test_coverage: _RO, get_minimal_context: _RO, get_cluster: _RO,
|
|
1124
|
+
detect_changes: _RO, record_decision: _RW, list_decisions: _RO,
|
|
1125
|
+
approve_decision: _RWI, reject_decision: _RWI, sync_decisions: _RWI,
|
|
1126
|
+
};
|
|
1127
|
+
const MINIMAL_TOOLS = new Set([
|
|
1128
|
+
'orient', 'search_code', 'record_decision', 'detect_changes', 'check_spec_drift',
|
|
1129
|
+
]);
|
|
1130
|
+
async function startMcpServer(options = {}) {
|
|
1131
|
+
const activeTools = options.minimal
|
|
1132
|
+
? TOOL_DEFINITIONS.filter(t => MINIMAL_TOOLS.has(t.name))
|
|
1133
|
+
: TOOL_DEFINITIONS;
|
|
1134
|
+
const server = new Server({ name: 'openlore', version: '1.0.0' }, { capabilities: { tools: {} } });
|
|
1135
|
+
server.setRequestHandler(ListToolsRequestSchema, async () => ({
|
|
1136
|
+
tools: activeTools.map(t => ({ ...t, annotations: TOOL_ANNOTATIONS[t.name] })),
|
|
1137
|
+
}));
|
|
1138
|
+
// --watch-auto: start the watcher on the first tool call that carries a directory
|
|
1139
|
+
let autoWatcher;
|
|
1140
|
+
server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
1141
|
+
const { name, arguments: args = {} } = request.params;
|
|
1142
|
+
if (options.watchAuto && !autoWatcher) {
|
|
1143
|
+
const dir = args.directory;
|
|
1144
|
+
if (typeof dir === 'string') {
|
|
1145
|
+
const { resolve } = await import('node:path');
|
|
1146
|
+
const { McpWatcher } = await import('../../core/services/mcp-watcher.js');
|
|
1147
|
+
const debounceMs = parseInt(options.watchDebounce ?? '400', 10);
|
|
1148
|
+
autoWatcher = new McpWatcher({
|
|
1149
|
+
rootPath: resolve(dir),
|
|
1150
|
+
debounceMs: isNaN(debounceMs) ? 400 : debounceMs,
|
|
1151
|
+
});
|
|
1152
|
+
await autoWatcher.start();
|
|
1153
|
+
const cleanup = () => autoWatcher.stop().then(() => process.exit(0));
|
|
1154
|
+
process.on('SIGINT', cleanup);
|
|
1155
|
+
process.on('SIGTERM', cleanup);
|
|
1156
|
+
}
|
|
1157
|
+
}
|
|
1158
|
+
try {
|
|
1159
|
+
let result;
|
|
1160
|
+
if (name === 'orient') {
|
|
1161
|
+
const { directory, task, limit = 5 } = args;
|
|
1162
|
+
result = await handleOrient(directory, task, limit);
|
|
1163
|
+
}
|
|
1164
|
+
else if (name === 'analyze_codebase') {
|
|
1165
|
+
const { directory, force = false } = args;
|
|
1166
|
+
result = await handleAnalyzeCodebase(directory, force);
|
|
1167
|
+
}
|
|
1168
|
+
else if (name === 'get_architecture_overview') {
|
|
1169
|
+
const { directory } = args;
|
|
1170
|
+
result = await handleGetArchitectureOverview(directory);
|
|
1171
|
+
}
|
|
1172
|
+
else if (name === 'get_refactor_report') {
|
|
1173
|
+
const { directory } = args;
|
|
1174
|
+
result = await handleGetRefactorReport(directory);
|
|
1175
|
+
}
|
|
1176
|
+
else if (name === 'get_call_graph') {
|
|
1177
|
+
const { directory } = args;
|
|
1178
|
+
result = await handleGetCallGraph(directory);
|
|
1179
|
+
}
|
|
1180
|
+
else if (name === 'get_signatures') {
|
|
1181
|
+
const { directory, filePattern } = args;
|
|
1182
|
+
result = await handleGetSignatures(directory, filePattern);
|
|
1183
|
+
}
|
|
1184
|
+
else if (name === 'get_subgraph') {
|
|
1185
|
+
const { directory, functionName, direction = 'downstream', maxDepth = 3, format = 'json' } = args;
|
|
1186
|
+
result = await handleGetSubgraph(directory, functionName, direction, maxDepth, format);
|
|
1187
|
+
}
|
|
1188
|
+
else if (name === 'trace_execution_path') {
|
|
1189
|
+
const { directory, entryFunction, targetFunction, maxDepth = 6, maxPaths = 10 } = args;
|
|
1190
|
+
result = await handleTraceExecutionPath(directory, entryFunction, targetFunction, maxDepth, maxPaths);
|
|
1191
|
+
}
|
|
1192
|
+
else if (name === 'get_mapping') {
|
|
1193
|
+
const { directory, domain, orphansOnly } = args;
|
|
1194
|
+
result = await handleGetMapping(directory, domain, orphansOnly);
|
|
1195
|
+
}
|
|
1196
|
+
else if (name === 'analyze_impact') {
|
|
1197
|
+
const { directory, symbol, depth = 2 } = args;
|
|
1198
|
+
result = await handleAnalyzeImpact(directory, symbol, depth);
|
|
1199
|
+
}
|
|
1200
|
+
else if (name === 'get_low_risk_refactor_candidates') {
|
|
1201
|
+
const { directory, limit = 5, filePattern } = args;
|
|
1202
|
+
result = await handleGetLowRiskRefactorCandidates(directory, limit, filePattern);
|
|
1203
|
+
}
|
|
1204
|
+
else if (name === 'get_leaf_functions') {
|
|
1205
|
+
const { directory, limit = 20, filePattern, sortBy = 'fanIn' } = args;
|
|
1206
|
+
result = await handleGetLeafFunctions(directory, limit, filePattern, sortBy);
|
|
1207
|
+
}
|
|
1208
|
+
else if (name === 'get_critical_hubs') {
|
|
1209
|
+
const { directory, limit = 10, minFanIn = 3 } = args;
|
|
1210
|
+
result = await handleGetCriticalHubs(directory, limit, minFanIn);
|
|
1211
|
+
}
|
|
1212
|
+
else if (name === 'get_duplicate_report') {
|
|
1213
|
+
const { directory } = args;
|
|
1214
|
+
result = await handleGetDuplicateReport(directory);
|
|
1215
|
+
}
|
|
1216
|
+
else if (name === 'get_function_skeleton') {
|
|
1217
|
+
const { directory, filePath } = args;
|
|
1218
|
+
result = await handleGetFunctionSkeleton(directory, filePath);
|
|
1219
|
+
}
|
|
1220
|
+
else if (name === 'get_god_functions') {
|
|
1221
|
+
const { directory, filePath, fanOutThreshold = 8 } = args;
|
|
1222
|
+
result = await handleGetGodFunctions(directory, filePath, fanOutThreshold);
|
|
1223
|
+
}
|
|
1224
|
+
else if (name === 'check_spec_drift') {
|
|
1225
|
+
const { directory, base = 'auto', files = [], domains = [], failOn = 'warning', maxFiles = DEFAULT_DRIFT_MAX_FILES } = args;
|
|
1226
|
+
result = await handleCheckSpecDrift(directory, base, files, domains, failOn, maxFiles);
|
|
1227
|
+
}
|
|
1228
|
+
else if (name === 'search_code') {
|
|
1229
|
+
const { directory, query, limit = 10, language, minFanIn } = args;
|
|
1230
|
+
result = await handleSearchCode(directory, query, limit, language, minFanIn);
|
|
1231
|
+
}
|
|
1232
|
+
else if (name === 'suggest_insertion_points') {
|
|
1233
|
+
const { directory, description, limit = 5, language } = args;
|
|
1234
|
+
result = await handleSuggestInsertionPoints(directory, description, limit, language);
|
|
1235
|
+
}
|
|
1236
|
+
else if (name === 'search_specs') {
|
|
1237
|
+
const { directory, query, limit = 10, domain, section } = args;
|
|
1238
|
+
result = await handleSearchSpecs(directory, query, limit, domain, section);
|
|
1239
|
+
}
|
|
1240
|
+
else if (name === 'search_unified') {
|
|
1241
|
+
const { directory, query, limit = 10, language, domain, section } = args;
|
|
1242
|
+
result = await handleUnifiedSearch(directory, query, limit, language, domain, section);
|
|
1243
|
+
}
|
|
1244
|
+
else if (name === 'list_spec_domains') {
|
|
1245
|
+
const { directory } = args;
|
|
1246
|
+
result = await handleListSpecDomains(directory);
|
|
1247
|
+
}
|
|
1248
|
+
else if (name === 'get_spec') {
|
|
1249
|
+
const { directory, domain } = args;
|
|
1250
|
+
result = await handleGetSpec(directory, domain);
|
|
1251
|
+
}
|
|
1252
|
+
else if (name === 'get_function_body') {
|
|
1253
|
+
const { directory, filePath, functionName } = args;
|
|
1254
|
+
result = await handleGetFunctionBody(directory, filePath, functionName);
|
|
1255
|
+
}
|
|
1256
|
+
else if (name === 'get_file_dependencies') {
|
|
1257
|
+
const { directory, filePath, direction = 'both' } = args;
|
|
1258
|
+
result = await handleGetFileDependencies(directory, filePath, direction);
|
|
1259
|
+
}
|
|
1260
|
+
else if (name === 'generate_change_proposal') {
|
|
1261
|
+
const { directory, description, slug, storyContent } = args;
|
|
1262
|
+
result = await handleGenerateChangeProposal(directory, description, slug, storyContent);
|
|
1263
|
+
}
|
|
1264
|
+
else if (name === 'annotate_story') {
|
|
1265
|
+
const { directory, storyFilePath, description } = args;
|
|
1266
|
+
result = await handleAnnotateStory(directory, storyFilePath, description);
|
|
1267
|
+
}
|
|
1268
|
+
else if (name === 'get_decisions') {
|
|
1269
|
+
const { directory, query } = args;
|
|
1270
|
+
result = await handleGetDecisions(directory, query);
|
|
1271
|
+
}
|
|
1272
|
+
else if (name === 'get_route_inventory') {
|
|
1273
|
+
const { directory } = args;
|
|
1274
|
+
result = await handleGetRouteInventory(directory);
|
|
1275
|
+
}
|
|
1276
|
+
else if (name === 'get_middleware_inventory') {
|
|
1277
|
+
const { directory } = args;
|
|
1278
|
+
result = await handleGetMiddlewareInventory(directory);
|
|
1279
|
+
}
|
|
1280
|
+
else if (name === 'get_schema_inventory') {
|
|
1281
|
+
const { directory } = args;
|
|
1282
|
+
result = await handleGetSchemaInventory(directory);
|
|
1283
|
+
}
|
|
1284
|
+
else if (name === 'get_ui_components') {
|
|
1285
|
+
const { directory } = args;
|
|
1286
|
+
result = await handleGetUIComponents(directory);
|
|
1287
|
+
}
|
|
1288
|
+
else if (name === 'get_env_vars') {
|
|
1289
|
+
const { directory } = args;
|
|
1290
|
+
result = await handleGetEnvVars(directory);
|
|
1291
|
+
}
|
|
1292
|
+
else if (name === 'get_external_packages') {
|
|
1293
|
+
const { directory } = args;
|
|
1294
|
+
result = await handleGetExternalPackages(directory);
|
|
1295
|
+
}
|
|
1296
|
+
else if (name === 'audit_spec_coverage') {
|
|
1297
|
+
const { directory, maxUncovered = 50, hubThreshold = 5 } = args;
|
|
1298
|
+
result = await handleAuditSpecCoverage(directory, maxUncovered, hubThreshold);
|
|
1299
|
+
}
|
|
1300
|
+
else if (name === 'generate_tests') {
|
|
1301
|
+
const { directory, domains, framework, useLlm, dryRun } = args;
|
|
1302
|
+
result = await handleGenerateTests({ directory, domains, framework, useLlm, dryRun });
|
|
1303
|
+
}
|
|
1304
|
+
else if (name === 'get_test_coverage') {
|
|
1305
|
+
const { directory, domains, minCoverage } = args;
|
|
1306
|
+
result = await handleGetTestCoverage({ directory, domains, minCoverage });
|
|
1307
|
+
}
|
|
1308
|
+
else if (name === 'get_minimal_context') {
|
|
1309
|
+
const { directory, functionName, filePath } = args;
|
|
1310
|
+
result = await handleGetMinimalContext(directory, functionName, filePath);
|
|
1311
|
+
}
|
|
1312
|
+
else if (name === 'get_cluster') {
|
|
1313
|
+
const { directory, functionName } = args;
|
|
1314
|
+
result = await handleGetCluster(directory, functionName);
|
|
1315
|
+
}
|
|
1316
|
+
else if (name === 'detect_changes') {
|
|
1317
|
+
const { directory, base } = args;
|
|
1318
|
+
result = await handleDetectChanges(directory, base);
|
|
1319
|
+
}
|
|
1320
|
+
else if (name === 'record_decision') {
|
|
1321
|
+
const { directory, title, rationale, consequences, affectedFiles, supersedes, scope } = args;
|
|
1322
|
+
result = await handleRecordDecision(directory, title, rationale, consequences, affectedFiles, supersedes, scope);
|
|
1323
|
+
}
|
|
1324
|
+
else if (name === 'list_decisions') {
|
|
1325
|
+
const { directory, status } = args;
|
|
1326
|
+
result = await handleListDecisions(directory, status);
|
|
1327
|
+
}
|
|
1328
|
+
else if (name === 'approve_decision') {
|
|
1329
|
+
const { directory, id, note } = args;
|
|
1330
|
+
result = await handleApproveDecision(directory, id, note);
|
|
1331
|
+
}
|
|
1332
|
+
else if (name === 'reject_decision') {
|
|
1333
|
+
const { directory, id, note } = args;
|
|
1334
|
+
result = await handleRejectDecision(directory, id, note);
|
|
1335
|
+
}
|
|
1336
|
+
else if (name === 'sync_decisions') {
|
|
1337
|
+
const { directory, dryRun = false, id } = args;
|
|
1338
|
+
result = await handleSyncDecisions(directory, dryRun, id);
|
|
1339
|
+
}
|
|
1340
|
+
else {
|
|
1341
|
+
return {
|
|
1342
|
+
content: [{ type: 'text', text: `Unknown tool: ${name}` }],
|
|
1343
|
+
isError: true,
|
|
1344
|
+
};
|
|
1345
|
+
}
|
|
1346
|
+
const text = typeof result === 'string' ? result : JSON.stringify(result, null, 2);
|
|
1347
|
+
return {
|
|
1348
|
+
content: [{ type: 'text', text }],
|
|
1349
|
+
};
|
|
1350
|
+
}
|
|
1351
|
+
catch (err) {
|
|
1352
|
+
return {
|
|
1353
|
+
content: [{ type: 'text', text: `Tool error: ${sanitizeMcpError(err)}` }],
|
|
1354
|
+
isError: true,
|
|
1355
|
+
};
|
|
1356
|
+
}
|
|
1357
|
+
});
|
|
1358
|
+
const transport = new StdioServerTransport();
|
|
1359
|
+
await server.connect(transport);
|
|
1360
|
+
if (options.watch) {
|
|
1361
|
+
const { resolve } = await import('node:path');
|
|
1362
|
+
const { McpWatcher } = await import('../../core/services/mcp-watcher.js');
|
|
1363
|
+
const debounceMs = parseInt(options.watchDebounce ?? '400', 10);
|
|
1364
|
+
const watcher = new McpWatcher({
|
|
1365
|
+
rootPath: resolve(options.watch),
|
|
1366
|
+
debounceMs: isNaN(debounceMs) ? 400 : debounceMs,
|
|
1367
|
+
});
|
|
1368
|
+
await watcher.start();
|
|
1369
|
+
const cleanup = () => watcher.stop().then(() => process.exit(0));
|
|
1370
|
+
process.on('SIGINT', cleanup);
|
|
1371
|
+
process.on('SIGTERM', cleanup);
|
|
1372
|
+
}
|
|
1373
|
+
}
|
|
1374
|
+
// ============================================================================
|
|
1375
|
+
// COMMAND EXPORT
|
|
1376
|
+
// ============================================================================
|
|
1377
|
+
export const mcpCommand = new Command('mcp')
|
|
1378
|
+
.description('Start openlore as an MCP server (stdio transport, for Cline/Claude Code)')
|
|
1379
|
+
.option('--watch <directory>', 'Watch a project directory and incrementally re-index signatures on file changes')
|
|
1380
|
+
.option('--watch-auto', 'Auto-detect the project directory from the first tool call and start watching', true)
|
|
1381
|
+
.option('--watch-debounce <ms>', 'Debounce delay in ms before re-indexing after a file change (default: 400)', '400')
|
|
1382
|
+
.option('--minimal', 'Expose only core 5 tools (orient, search_code, record_decision, detect_changes, check_spec_drift). Pair with alwaysLoad: true in Claude Code for always-visible core tools.')
|
|
1383
|
+
.action((options) => startMcpServer(options));
|
|
1384
|
+
//# sourceMappingURL=mcp.js.map
|