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,382 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared constants for openlore
|
|
3
|
+
*
|
|
4
|
+
* Centralises magic numbers so they're easy to find, reason about, and change.
|
|
5
|
+
*/
|
|
6
|
+
// ============================================================================
|
|
7
|
+
// DIRECTORY / PATH NAMES
|
|
8
|
+
// ============================================================================
|
|
9
|
+
/** Hidden directory where openlore stores its state */
|
|
10
|
+
export const OPENLORE_DIR = '.openlore';
|
|
11
|
+
/** Analysis artifacts sub-directory */
|
|
12
|
+
export const OPENLORE_ANALYSIS_SUBDIR = 'analysis';
|
|
13
|
+
/** LLM log sub-directory */
|
|
14
|
+
export const OPENLORE_LOGS_SUBDIR = 'logs';
|
|
15
|
+
/** Verification reports sub-directory */
|
|
16
|
+
export const OPENLORE_VERIFICATION_SUBDIR = 'verification';
|
|
17
|
+
/** Generation outputs sub-directory */
|
|
18
|
+
export const OPENLORE_OUTPUTS_SUBDIR = 'outputs';
|
|
19
|
+
/** Spec backups sub-directory */
|
|
20
|
+
export const OPENLORE_BACKUPS_SUBDIR = 'backups';
|
|
21
|
+
/** Generation intermediate files sub-directory */
|
|
22
|
+
export const OPENLORE_GENERATION_SUBDIR = 'generation';
|
|
23
|
+
/** Run metadata sub-directory */
|
|
24
|
+
export const OPENLORE_RUNS_SUBDIR = 'runs';
|
|
25
|
+
/** Config file name inside OPENLORE_DIR */
|
|
26
|
+
export const OPENLORE_CONFIG_FILENAME = 'config.json';
|
|
27
|
+
/** Relative path to the openlore config file */
|
|
28
|
+
export const OPENLORE_CONFIG_REL_PATH = `${OPENLORE_DIR}/${OPENLORE_CONFIG_FILENAME}`;
|
|
29
|
+
/** Relative path to the analysis output directory */
|
|
30
|
+
export const OPENLORE_ANALYSIS_REL_PATH = `${OPENLORE_DIR}/${OPENLORE_ANALYSIS_SUBDIR}`;
|
|
31
|
+
/** Default openspec root directory name */
|
|
32
|
+
export const OPENSPEC_DIR = 'openspec';
|
|
33
|
+
/** Default relative path used when creating a new openspec directory */
|
|
34
|
+
export const DEFAULT_OPENSPEC_PATH = './openspec';
|
|
35
|
+
/** Default openspec specs sub-directory */
|
|
36
|
+
export const OPENSPEC_SPECS_SUBDIR = 'specs';
|
|
37
|
+
/** Default openspec decisions sub-directory */
|
|
38
|
+
export const OPENSPEC_DECISIONS_SUBDIR = 'decisions';
|
|
39
|
+
/** Config file name inside the openspec directory */
|
|
40
|
+
export const OPENSPEC_CONFIG_FILENAME = 'config.yaml';
|
|
41
|
+
// ============================================================================
|
|
42
|
+
// ANALYSIS ARTIFACT FILENAMES
|
|
43
|
+
// ============================================================================
|
|
44
|
+
/** Filename for the repository structure artifact */
|
|
45
|
+
export const ARTIFACT_REPO_STRUCTURE = 'repo-structure.json';
|
|
46
|
+
/** Filename for the dependency graph artifact */
|
|
47
|
+
export const ARTIFACT_DEPENDENCY_GRAPH = 'dependency-graph.json';
|
|
48
|
+
/** Filename for the LLM context artifact */
|
|
49
|
+
export const ARTIFACT_LLM_CONTEXT = 'llm-context.json';
|
|
50
|
+
/** Filename for the requirement mapping artifact */
|
|
51
|
+
export const ARTIFACT_MAPPING = 'mapping.json';
|
|
52
|
+
/** Filename for the refactor priorities artifact */
|
|
53
|
+
export const ARTIFACT_REFACTOR_PRIORITIES = 'refactor-priorities.json';
|
|
54
|
+
/** Filename for the content-hash fingerprint used for cache invalidation */
|
|
55
|
+
export const ARTIFACT_FINGERPRINT = 'fingerprint.json';
|
|
56
|
+
/** Filename for the SQLite call-graph edge store */
|
|
57
|
+
export const ARTIFACT_CALL_GRAPH_DB = 'call-graph.db';
|
|
58
|
+
/** Filename for the repository map artifact (saved by RepositoryMapper) */
|
|
59
|
+
export const ARTIFACT_REPOSITORY_MAP = 'repository-map.json';
|
|
60
|
+
/** Filename for the generation report saved to outputs/ */
|
|
61
|
+
export const ARTIFACT_GENERATION_REPORT = 'generation-report.json';
|
|
62
|
+
/** Filename for the shutdown state file */
|
|
63
|
+
export const ARTIFACT_SHUTDOWN_STATE = 'shutdown-state.json';
|
|
64
|
+
export const ARTIFACT_RAG_MANIFEST = 'rag-manifest.json';
|
|
65
|
+
/** Filename for the spec coverage snapshot artifact */
|
|
66
|
+
export const ARTIFACT_SPEC_SNAPSHOT = 'spec-snapshot.json';
|
|
67
|
+
/** Filename for the parity audit report artifact */
|
|
68
|
+
export const ARTIFACT_AUDIT_REPORT = 'audit-report.json';
|
|
69
|
+
/** Filename for the database schema inventory artifact */
|
|
70
|
+
export const ARTIFACT_SCHEMA_INVENTORY = 'schema-inventory.json';
|
|
71
|
+
/** Filename for the API route inventory artifact */
|
|
72
|
+
export const ARTIFACT_ROUTE_INVENTORY = 'route-inventory.json';
|
|
73
|
+
/** Filename for the middleware inventory artifact */
|
|
74
|
+
export const ARTIFACT_MIDDLEWARE_INVENTORY = 'middleware-inventory.json';
|
|
75
|
+
/** Filename for the UI component inventory artifact */
|
|
76
|
+
export const ARTIFACT_UI_INVENTORY = 'ui-inventory.json';
|
|
77
|
+
/** Filename for the environment variable inventory artifact */
|
|
78
|
+
export const ARTIFACT_ENV_INVENTORY = 'env-inventory.json';
|
|
79
|
+
/** Filename for the external package inventory artifact */
|
|
80
|
+
export const ARTIFACT_EXTERNAL_PACKAGES = 'external-packages.json';
|
|
81
|
+
// ============================================================================
|
|
82
|
+
// LLM / PROVIDER LIMITS
|
|
83
|
+
// ============================================================================
|
|
84
|
+
/** Default maximum context window for Claude models (tokens) */
|
|
85
|
+
export const CLAUDE_MAX_CONTEXT_TOKENS = 200_000;
|
|
86
|
+
/** Default maximum context window for Mistral Vibe (tokens) */
|
|
87
|
+
export const MISTRAL_VIBE_MAX_CONTEXT_TOKENS = 128_000;
|
|
88
|
+
/** Default maximum output tokens for Claude models */
|
|
89
|
+
export const CLAUDE_MAX_OUTPUT_TOKENS = 16_000;
|
|
90
|
+
/** Default maximum output tokens for Mistral Vibe */
|
|
91
|
+
export const MISTRAL_VIBE_MAX_OUTPUT_TOKENS = 4_096;
|
|
92
|
+
/** Maximum buffer size for LLM CLI output (bytes) — 50 MB */
|
|
93
|
+
export const LLM_CLI_MAX_BUFFER_BYTES = 50 * 1024 * 1024;
|
|
94
|
+
/** Timeout for LLM CLI calls (ms) — 5 minutes */
|
|
95
|
+
export const LLM_CLI_TIMEOUT_MS = 300_000;
|
|
96
|
+
// ============================================================================
|
|
97
|
+
// ANALYSIS
|
|
98
|
+
// ============================================================================
|
|
99
|
+
/** Default maximum number of files to include in analysis (effectively uncapped) */
|
|
100
|
+
export const DEFAULT_MAX_FILES = 100_000;
|
|
101
|
+
/** Default maximum number of changed files to check in drift detection */
|
|
102
|
+
export const DEFAULT_DRIFT_MAX_FILES = 100;
|
|
103
|
+
/** How old (ms) an analysis can be before being considered stale (1 hour) */
|
|
104
|
+
export const ANALYSIS_STALE_THRESHOLD_MS = 60 * 60 * 1000;
|
|
105
|
+
/** How old (ms) an analysis can be before being re-used in 'run' (1 hour) */
|
|
106
|
+
export const ANALYSIS_REUSE_THRESHOLD_MS = 60 * 60 * 1000;
|
|
107
|
+
/** Grace period after consolidation during which the gate skips the no_decisions_recorded check (1 hour) */
|
|
108
|
+
export const CONSOLIDATION_GRACE_PERIOD_MS = 60 * 60 * 1000;
|
|
109
|
+
/** Canonical gate block reason codes — shared by gate handler, docs, tests, and AGENTS.md */
|
|
110
|
+
export const GATE_REASONS = {
|
|
111
|
+
VERIFIED: 'verified',
|
|
112
|
+
APPROVED_NOT_SYNCED: 'approved_not_synced',
|
|
113
|
+
DRAFTS_PENDING_CONSOLIDATION: 'drafts_pending_consolidation',
|
|
114
|
+
NO_DECISIONS_RECORDED: 'no_decisions_recorded',
|
|
115
|
+
};
|
|
116
|
+
// ============================================================================
|
|
117
|
+
// VIEWER / SERVER
|
|
118
|
+
// ============================================================================
|
|
119
|
+
/** Default port for the Vite viewer server */
|
|
120
|
+
export const DEFAULT_VIEWER_PORT = 5173;
|
|
121
|
+
/** Default host for the Vite viewer server */
|
|
122
|
+
export const DEFAULT_VIEWER_HOST = '127.0.0.1';
|
|
123
|
+
/** Maximum allowed chat request body size (bytes) — 512 KB */
|
|
124
|
+
export const MAX_CHAT_BODY_BYTES = 512 * 1024;
|
|
125
|
+
/** Maximum search query length (characters) */
|
|
126
|
+
export const MAX_QUERY_LENGTH = 1_000;
|
|
127
|
+
// ============================================================================
|
|
128
|
+
// GENERATION
|
|
129
|
+
// ============================================================================
|
|
130
|
+
/** Estimated system prompt overhead per LLM call (tokens) */
|
|
131
|
+
export const LLM_SYSTEM_PROMPT_OVERHEAD_TOKENS = 500;
|
|
132
|
+
/** Estimated output / input token ratio for spec generation tasks */
|
|
133
|
+
export const GENERATION_OUTPUT_RATIO = 0.4;
|
|
134
|
+
// ============================================================================
|
|
135
|
+
// DEFAULT MODELS (per provider)
|
|
136
|
+
// ============================================================================
|
|
137
|
+
export const DEFAULT_ANTHROPIC_MODEL = 'claude-sonnet-4-20250514';
|
|
138
|
+
export const DEFAULT_OPENAI_MODEL = 'gpt-4o';
|
|
139
|
+
export const DEFAULT_OPENAI_COMPAT_MODEL = 'mistral-large-latest';
|
|
140
|
+
export const DEFAULT_GEMINI_MODEL = 'gemini-2.0-flash';
|
|
141
|
+
export const DEFAULT_COPILOT_MODEL = 'gpt-4o';
|
|
142
|
+
/** Lighter model used for interactive chat (lower cost, faster) */
|
|
143
|
+
export const DEFAULT_CHAT_OPENAI_MODEL = 'gpt-4o-mini';
|
|
144
|
+
// ============================================================================
|
|
145
|
+
// DOCTOR / ENVIRONMENT CHECKS
|
|
146
|
+
// ============================================================================
|
|
147
|
+
/** Minimum Node.js major version required */
|
|
148
|
+
export const MIN_NODE_MAJOR_VERSION = 20;
|
|
149
|
+
/** Analysis age (hours) beyond which doctor warns it may be stale */
|
|
150
|
+
export const ANALYSIS_AGE_WARNING_HOURS = 24;
|
|
151
|
+
/** Minimum available disk space (MB) before doctor reports failure */
|
|
152
|
+
export const MIN_DISK_SPACE_FAIL_MB = 200;
|
|
153
|
+
/** Minimum available disk space (MB) before doctor reports a warning */
|
|
154
|
+
export const MIN_DISK_SPACE_WARN_MB = 500;
|
|
155
|
+
// ============================================================================
|
|
156
|
+
// LLM SERVICE DEFAULTS
|
|
157
|
+
// ============================================================================
|
|
158
|
+
/** Default maximum number of retries for LLM API calls */
|
|
159
|
+
export const DEFAULT_LLM_MAX_RETRIES = 3;
|
|
160
|
+
/** Default initial retry delay (ms) */
|
|
161
|
+
export const DEFAULT_LLM_INITIAL_DELAY_MS = 1_000;
|
|
162
|
+
/** Default maximum retry delay (ms) */
|
|
163
|
+
export const DEFAULT_LLM_MAX_DELAY_MS = 30_000;
|
|
164
|
+
/** Default timeout for LLM API calls (ms) — 2 minutes */
|
|
165
|
+
export const DEFAULT_LLM_TIMEOUT_MS = 120_000;
|
|
166
|
+
/** Default cost warning threshold (USD) */
|
|
167
|
+
export const DEFAULT_LLM_COST_WARNING_THRESHOLD = 10.0;
|
|
168
|
+
/** Fraction of max context tokens at which a warning is emitted */
|
|
169
|
+
export const CONTEXT_LIMIT_WARNING_RATIO = 0.9;
|
|
170
|
+
// ============================================================================
|
|
171
|
+
// DIFF / GIT
|
|
172
|
+
// ============================================================================
|
|
173
|
+
/** Maximum characters of diff content passed to LLM context */
|
|
174
|
+
export const DIFF_MAX_CHARS = 4_000;
|
|
175
|
+
// ============================================================================
|
|
176
|
+
// GENERATION PIPELINE — per-stage LLM output token budgets
|
|
177
|
+
// ============================================================================
|
|
178
|
+
/** Stage 1 (project survey) max output tokens */
|
|
179
|
+
export const STAGE1_MAX_TOKENS = 3_000;
|
|
180
|
+
/** Stage 2 (entity extraction) max output tokens per file chunk */
|
|
181
|
+
export const STAGE2_MAX_TOKENS = 4_000;
|
|
182
|
+
/** Stage 3 (service analysis) max output tokens per file chunk */
|
|
183
|
+
export const STAGE3_MAX_TOKENS = 4_000;
|
|
184
|
+
/** Stage 4 (API extraction) max output tokens per file chunk */
|
|
185
|
+
export const STAGE4_MAX_TOKENS = 4_000;
|
|
186
|
+
/** Stage 5 (architecture synthesis) max output tokens */
|
|
187
|
+
export const STAGE5_MAX_TOKENS = 3_000;
|
|
188
|
+
/** Stage 6 (ADR enrichment) max output tokens */
|
|
189
|
+
export const STAGE6_MAX_TOKENS = 5_000;
|
|
190
|
+
/** Max file content characters passed per chunk to stages 2–4 */
|
|
191
|
+
export const STAGE_CHUNK_MAX_CHARS = 8_000;
|
|
192
|
+
/** Max characters of skeleton excerpt appended to graph prompt */
|
|
193
|
+
export const SKELETON_EXCERPT_MAX_CHARS = 4_000;
|
|
194
|
+
/** Max characters for a standalone skeleton used as fallback for large files without god functions */
|
|
195
|
+
export const SKELETON_STANDALONE_MAX_CHARS = 10_000;
|
|
196
|
+
/** Verification engine: max tokens for file-purpose prediction */
|
|
197
|
+
export const VERIFICATION_PREDICTION_MAX_TOKENS = 1_000;
|
|
198
|
+
/** Drift detector: max tokens for LLM change classification */
|
|
199
|
+
export const DRIFT_CLASSIFICATION_MAX_TOKENS = 200;
|
|
200
|
+
// ============================================================================
|
|
201
|
+
// CHAT AGENT
|
|
202
|
+
// ============================================================================
|
|
203
|
+
/** Max output tokens for chat agent turns (Anthropic) */
|
|
204
|
+
export const CHAT_AGENT_MAX_TOKENS = 4_096;
|
|
205
|
+
/** Characters of API error body included in error messages */
|
|
206
|
+
export const API_ERROR_PREVIEW_LENGTH = 300;
|
|
207
|
+
// ============================================================================
|
|
208
|
+
// ANALYSIS / COST ESTIMATION
|
|
209
|
+
// ============================================================================
|
|
210
|
+
/** Fallback estimated tokens for the project survey phase when not yet computed */
|
|
211
|
+
export const DEFAULT_SURVEY_ESTIMATED_TOKENS = 2_000;
|
|
212
|
+
// ============================================================================
|
|
213
|
+
// REPOSITORY MAPPER — slice limits for summary output
|
|
214
|
+
// ============================================================================
|
|
215
|
+
/** Max high-value files retained after scoring */
|
|
216
|
+
export const HIGH_VALUE_FILES_LIMIT = 50;
|
|
217
|
+
/** Max high-value files shown in text summary */
|
|
218
|
+
export const HIGH_VALUE_FILES_PREVIEW_LIMIT = 20;
|
|
219
|
+
/** Max entry points shown in text summary */
|
|
220
|
+
export const ENTRY_POINTS_PREVIEW_LIMIT = 10;
|
|
221
|
+
/** Max languages shown in text summary */
|
|
222
|
+
export const LANGUAGES_PREVIEW_LIMIT = 10;
|
|
223
|
+
/** Max directories shown in text summary */
|
|
224
|
+
export const DIRECTORIES_PREVIEW_LIMIT = 15;
|
|
225
|
+
// ============================================================================
|
|
226
|
+
// GRAPH ANALYSIS — risk scoring
|
|
227
|
+
// ============================================================================
|
|
228
|
+
/** Risk score weight for fan-in (callers) */
|
|
229
|
+
export const RISK_SCORE_FAN_IN_WEIGHT = 4;
|
|
230
|
+
/** Risk score weight for fan-out (callees) */
|
|
231
|
+
export const RISK_SCORE_FAN_OUT_WEIGHT = 2;
|
|
232
|
+
/** Risk score bonus when the node is a hub */
|
|
233
|
+
export const RISK_SCORE_HUB_BONUS = 20;
|
|
234
|
+
/** Risk score weight for blast radius */
|
|
235
|
+
export const RISK_SCORE_BLAST_RADIUS_WEIGHT = 1.5;
|
|
236
|
+
/** Risk score at or below which a function is considered low-risk */
|
|
237
|
+
export const RISK_SCORE_LOW_THRESHOLD = 20;
|
|
238
|
+
/** Risk score at or below which a function is considered medium-risk */
|
|
239
|
+
export const RISK_SCORE_MEDIUM_THRESHOLD = 45;
|
|
240
|
+
/** Fan-out at or above which a function is treated as a god-function */
|
|
241
|
+
export const GOD_FUNCTION_FAN_OUT_THRESHOLD = 8;
|
|
242
|
+
/** Fan-out threshold for SRP (single-responsibility) refactoring recommendation */
|
|
243
|
+
export const REFACTOR_SRP_FAN_OUT_THRESHOLD = 5;
|
|
244
|
+
/** Maximum fan-in for a node to be a low-risk refactor candidate */
|
|
245
|
+
export const LOW_RISK_MAX_FAN_IN = 2;
|
|
246
|
+
/** Maximum fan-out for a node to be a low-risk refactor candidate */
|
|
247
|
+
export const LOW_RISK_MAX_FAN_OUT = 3;
|
|
248
|
+
/** Default minimum fan-in to be classified as a critical hub */
|
|
249
|
+
export const CRITICAL_HUBS_DEFAULT_MIN_FAN_IN = 3;
|
|
250
|
+
/** Default subgraph traversal depth */
|
|
251
|
+
export const SUBGRAPH_DEFAULT_MAX_DEPTH = 3;
|
|
252
|
+
/** Maximum allowed subgraph traversal depth */
|
|
253
|
+
export const SUBGRAPH_MAX_DEPTH_LIMIT = 20;
|
|
254
|
+
/** Default max depth for trace_execution_path BFS */
|
|
255
|
+
export const TRACE_PATH_DEFAULT_MAX_DEPTH = 6;
|
|
256
|
+
/** Maximum number of paths returned by trace_execution_path */
|
|
257
|
+
export const TRACE_PATH_MAX_PATHS = 10;
|
|
258
|
+
/** Criticality score weight for fan-in */
|
|
259
|
+
export const CRITICALITY_FAN_IN_WEIGHT = 3;
|
|
260
|
+
/** Criticality score weight for fan-out */
|
|
261
|
+
export const CRITICALITY_FAN_OUT_WEIGHT = 1.5;
|
|
262
|
+
/** Criticality score bonus when a node has layer violations */
|
|
263
|
+
export const CRITICALITY_VIOLATION_BONUS = 10;
|
|
264
|
+
/** Fan-in at or above which a hub is treated as heavily depended-upon */
|
|
265
|
+
export const HUB_HIGH_FAN_IN_THRESHOLD = 8;
|
|
266
|
+
/** Fan-out at or above which a hub is treated as an orchestration-heavy god-function */
|
|
267
|
+
export const HUB_HIGH_FAN_OUT_THRESHOLD = 5;
|
|
268
|
+
/** Stability score at or above which a hub can be refactored now */
|
|
269
|
+
export const STABILITY_SCORE_CAN_REFACTOR = 60;
|
|
270
|
+
/** Stability score at or above which a hub can be refactored after stabilising deps */
|
|
271
|
+
export const STABILITY_SCORE_STABILISE_FIRST = 30;
|
|
272
|
+
/** Default number of refactor candidates to return */
|
|
273
|
+
export const LOW_RISK_REFACTOR_CANDIDATES_DEFAULT_LIMIT = 5;
|
|
274
|
+
/** Default number of leaf functions to return */
|
|
275
|
+
export const LEAF_FUNCTIONS_DEFAULT_LIMIT = 20;
|
|
276
|
+
// ============================================================================
|
|
277
|
+
// MAPPING GENERATOR — similarity scoring
|
|
278
|
+
// ============================================================================
|
|
279
|
+
/** Similarity score returned for containment matches (one name includes the other) */
|
|
280
|
+
export const SIMILARITY_CONTAINMENT_SCORE = 0.8;
|
|
281
|
+
/** Weight applied to Jaccard token-overlap similarity */
|
|
282
|
+
export const SIMILARITY_TOKEN_OVERLAP_WEIGHT = 0.7;
|
|
283
|
+
/** Minimum heuristic similarity score to include a function as a candidate match */
|
|
284
|
+
export const HEURISTIC_MATCH_MIN_SCORE = 0.7;
|
|
285
|
+
/** Maximum number of heuristic fallback matches returned per operation */
|
|
286
|
+
export const MAX_HEURISTIC_MATCHES_PER_OP = 2;
|
|
287
|
+
// ============================================================================
|
|
288
|
+
// STAGE 5 — architecture synthesis prompt limits
|
|
289
|
+
// ============================================================================
|
|
290
|
+
/** Max hub functions included in Stage 5 architecture prompt */
|
|
291
|
+
export const STAGE5_HUB_FUNCTIONS_LIMIT = 8;
|
|
292
|
+
/** Max entry points included in Stage 5 architecture prompt */
|
|
293
|
+
export const STAGE5_ENTRY_POINTS_LIMIT = 8;
|
|
294
|
+
/** Max layer violations included in Stage 5 architecture prompt */
|
|
295
|
+
export const STAGE5_VIOLATIONS_LIMIT = 5;
|
|
296
|
+
/** Max refactor priority entries (god functions, cycles, SRP violations) shown to Stage 5 */
|
|
297
|
+
export const STAGE5_REFACTOR_PRIORITIES_LIMIT = 8;
|
|
298
|
+
/** Max dependency cycles shown to Stage 5 */
|
|
299
|
+
export const STAGE5_CYCLES_LIMIT = 3;
|
|
300
|
+
// ============================================================================
|
|
301
|
+
// ARTIFACT GENERATOR
|
|
302
|
+
// ============================================================================
|
|
303
|
+
/** Approximate tokens per character used for LLM context token estimation (~4 chars/token) */
|
|
304
|
+
export const TOKENS_PER_CHAR_DEFAULT = 0.25;
|
|
305
|
+
/** Max characters of file content included per file in Phase 2 (deep analysis) */
|
|
306
|
+
export const PHASE2_FILE_CONTENT_MAX_CHARS = 10_000;
|
|
307
|
+
/** Max characters of file content included per file in Phase 3 (validation) */
|
|
308
|
+
export const PHASE3_FILE_CONTENT_MAX_CHARS = 5_000;
|
|
309
|
+
/** Max files shown in dependency diagram (Mermaid) */
|
|
310
|
+
export const DEPENDENCY_DIAGRAM_MAX_FILES = 30;
|
|
311
|
+
// ============================================================================
|
|
312
|
+
// MCP HANDLERS
|
|
313
|
+
// ============================================================================
|
|
314
|
+
/** Max number of top refactor issues returned by analyze_codebase */
|
|
315
|
+
export const TOP_REFACTOR_ISSUES_LIMIT = 10;
|
|
316
|
+
/** Composite score semantic weight for suggest_insertion_points */
|
|
317
|
+
export const INSERTION_SEMANTIC_WEIGHT = 0.6;
|
|
318
|
+
/** Composite score structural weight for suggest_insertion_points */
|
|
319
|
+
export const INSERTION_STRUCTURAL_WEIGHT = 0.4;
|
|
320
|
+
/** Structural bonus scores per insertion role */
|
|
321
|
+
export const INSERTION_ROLE_BONUS_ENTRY_POINT = 1.0;
|
|
322
|
+
export const INSERTION_ROLE_BONUS_ORCHESTRATOR = 0.8;
|
|
323
|
+
export const INSERTION_ROLE_BONUS_HUB = 0.6;
|
|
324
|
+
export const INSERTION_ROLE_BONUS_INTERNAL = 0.4;
|
|
325
|
+
export const INSERTION_ROLE_BONUS_UTILITY = 0.3;
|
|
326
|
+
/** Fan-out threshold at or above which a node is classified as an orchestrator */
|
|
327
|
+
export const INSERTION_ORCHESTRATOR_FAN_OUT_THRESHOLD = 5;
|
|
328
|
+
// ============================================================================
|
|
329
|
+
// ANALYSIS ARTIFACT — LLM context file selection
|
|
330
|
+
// ============================================================================
|
|
331
|
+
/** Maximum files included in LLM deep analysis phase */
|
|
332
|
+
export const MAX_DEEP_ANALYSIS_FILES = 20;
|
|
333
|
+
/** Fraction of high-value files selected for LLM deep analysis */
|
|
334
|
+
export const DEEP_ANALYSIS_FILE_RATIO = 0.3;
|
|
335
|
+
/** Maximum files included in LLM validation phase */
|
|
336
|
+
export const MAX_VALIDATION_FILES = 5;
|
|
337
|
+
// ============================================================================
|
|
338
|
+
// GENERATE COMMAND
|
|
339
|
+
// ============================================================================
|
|
340
|
+
/** Estimated cost (USD) above which the generate command prompts for confirmation */
|
|
341
|
+
export const COST_CONFIRMATION_THRESHOLD = 0.5;
|
|
342
|
+
// ============================================================================
|
|
343
|
+
// REFACTOR ANALYZER — priority scoring
|
|
344
|
+
// ============================================================================
|
|
345
|
+
/** Base score added for each fan-in/fan-out excess block */
|
|
346
|
+
export const REFACTOR_EXCESS_BASE_SCORE = 2;
|
|
347
|
+
/** Maximum proportional score boost for excess fan-in */
|
|
348
|
+
export const MAX_FAN_IN_SCORE_BOOST = 3;
|
|
349
|
+
/** Maximum proportional score boost for excess fan-out */
|
|
350
|
+
export const MAX_FAN_OUT_SCORE_BOOST = 3;
|
|
351
|
+
/** Base score added for SRP violations */
|
|
352
|
+
export const SRP_BASE_SCORE = 1.5;
|
|
353
|
+
/** Per-requirement penalty above SRP_MAX_REQUIREMENTS */
|
|
354
|
+
export const SRP_PER_REQUIREMENT_PENALTY = 0.5;
|
|
355
|
+
/** Score added for clone group membership */
|
|
356
|
+
export const CLONE_GROUP_MEMBERSHIP_SCORE = 1.5;
|
|
357
|
+
/** Maximum call-graph depth considered "shallow" (bonus for refactoring) */
|
|
358
|
+
export const SHALLOW_FUNCTION_DEPTH_MAX = 2;
|
|
359
|
+
/** Score bonus for shallow functions with issues */
|
|
360
|
+
export const SHALLOW_FUNCTION_SCORE_BONUS = 0.5;
|
|
361
|
+
/** McCabe cyclomatic complexity threshold above which a function is flagged (≥10 = complex) */
|
|
362
|
+
export const HIGH_COMPLEXITY_THRESHOLD = 10;
|
|
363
|
+
/** Base priority score boost for high-complexity functions (scales with excess above threshold) */
|
|
364
|
+
export const HIGH_COMPLEXITY_SCORE_BOOST = 1.5;
|
|
365
|
+
/** Cap on the distance-weighted transitive caller score in detect_changes risk model */
|
|
366
|
+
export const TRANSITIVE_SCORE_MAX = 10;
|
|
367
|
+
// ============================================================================
|
|
368
|
+
// DECISIONS
|
|
369
|
+
// ============================================================================
|
|
370
|
+
/** Sub-directory inside OPENLORE_DIR where pending decisions are stored */
|
|
371
|
+
export const OPENLORE_DECISIONS_SUBDIR = 'decisions';
|
|
372
|
+
/** Filename for the pending decisions store */
|
|
373
|
+
export const DECISIONS_PENDING_FILE = 'pending.json';
|
|
374
|
+
/** Maximum number of changed files passed to the consolidation LLM */
|
|
375
|
+
export const DECISIONS_EXTRACTION_MAX_FILES = 50;
|
|
376
|
+
/** Maximum diff characters fed to the consolidation LLM per file */
|
|
377
|
+
export const DECISIONS_DIFF_MAX_CHARS = 12_000;
|
|
378
|
+
/** Max output tokens for consolidation LLM call */
|
|
379
|
+
export const DECISIONS_CONSOLIDATION_MAX_TOKENS = 2_000;
|
|
380
|
+
/** Max output tokens for verification LLM call */
|
|
381
|
+
export const DECISIONS_VERIFICATION_MAX_TOKENS = 1_500;
|
|
382
|
+
//# sourceMappingURL=constants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,+EAA+E;AAC/E,yBAAyB;AACzB,+EAA+E;AAE/E,uDAAuD;AACvD,MAAM,CAAC,MAAM,YAAY,GAAG,WAAW,CAAC;AAExC,uCAAuC;AACvC,MAAM,CAAC,MAAM,wBAAwB,GAAG,UAAU,CAAC;AAEnD,4BAA4B;AAC5B,MAAM,CAAC,MAAM,oBAAoB,GAAG,MAAM,CAAC;AAE3C,yCAAyC;AACzC,MAAM,CAAC,MAAM,4BAA4B,GAAG,cAAc,CAAC;AAE3D,uCAAuC;AACvC,MAAM,CAAC,MAAM,uBAAuB,GAAG,SAAS,CAAC;AAEjD,iCAAiC;AACjC,MAAM,CAAC,MAAM,uBAAuB,GAAG,SAAS,CAAC;AAEjD,kDAAkD;AAClD,MAAM,CAAC,MAAM,0BAA0B,GAAG,YAAY,CAAC;AAEvD,iCAAiC;AACjC,MAAM,CAAC,MAAM,oBAAoB,GAAG,MAAM,CAAC;AAE3C,2CAA2C;AAC3C,MAAM,CAAC,MAAM,wBAAwB,GAAG,aAAa,CAAC;AAEtD,gDAAgD;AAChD,MAAM,CAAC,MAAM,wBAAwB,GAAG,GAAG,YAAY,IAAI,wBAAwB,EAAE,CAAC;AAEtF,qDAAqD;AACrD,MAAM,CAAC,MAAM,0BAA0B,GAAG,GAAG,YAAY,IAAI,wBAAwB,EAAE,CAAC;AAExF,2CAA2C;AAC3C,MAAM,CAAC,MAAM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AAC;AAE/C,6CAA6C;AAC7C,MAAM,CAAC,MAAM,4BAA4B,GAAG,GAAG,CAAC;AAEhD,4EAA4E;AAC5E,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,CAAC;AAE5C,oDAAoD;AACpD,MAAM,CAAC,MAAM,4BAA4B,GAAG,GAAG,CAAC;AAEhD,+FAA+F;AAC/F,MAAM,CAAC,MAAM,yBAAyB,GAAG,EAAE,CAAC;AAE5C,mGAAmG;AACnG,MAAM,CAAC,MAAM,2BAA2B,GAAG,GAAG,CAAC;AAE/C,wFAAwF;AACxF,MAAM,CAAC,MAAM,oBAAoB,GAAG,EAAE,CAAC;AAEvC,+EAA+E;AAC/E,YAAY;AACZ,+EAA+E;AAE/E,2EAA2E;AAC3E,MAAM,CAAC,MAAM,yBAAyB,GAAG,WAAW,CAAC;AAErD,+CAA+C;AAC/C,MAAM,CAAC,MAAM,sBAAsB,GAAG,cAAc,CAAC;AAErD,sEAAsE;AACtE,MAAM,CAAC,MAAM,8BAA8B,GAAG,EAAE,CAAC;AAEjD,oEAAoE;AACpE,MAAM,CAAC,MAAM,wBAAwB,GAAG,MAAM,CAAC;AAE/C,mDAAmD;AACnD,MAAM,CAAC,MAAM,kCAAkC,GAAG,KAAK,CAAC;AAExD,kDAAkD;AAClD,MAAM,CAAC,MAAM,iCAAiC,GAAG,KAAK,CAAC"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AI Config File Generator
|
|
3
|
+
*
|
|
4
|
+
* Generates tool-specific AI context files during `openlore analyze`:
|
|
5
|
+
* - .cursorrules (Cursor IDE)
|
|
6
|
+
* - .clinerules/openlore.md (Cline / Roo Code / Kilocode)
|
|
7
|
+
* - CLAUDE.md (Claude Code)
|
|
8
|
+
* - .github/copilot-instructions.md (GitHub Copilot)
|
|
9
|
+
* - .windsurf/rules.md (Windsurf)
|
|
10
|
+
*
|
|
11
|
+
* Files are NEVER overwritten — if a file already exists it is skipped silently.
|
|
12
|
+
* Returns the list of paths that were actually created.
|
|
13
|
+
*/
|
|
14
|
+
/** Supported AI assistant targets */
|
|
15
|
+
export type AiTool = 'claude' | 'cursor' | 'cline' | 'copilot' | 'windsurf' | 'vibe' | 'agents';
|
|
16
|
+
export interface AiConfigOptions {
|
|
17
|
+
/** Absolute path to the project root */
|
|
18
|
+
rootDir: string;
|
|
19
|
+
/** Relative path to the analysis output directory (e.g. ".openlore/analysis") */
|
|
20
|
+
analysisDir: string;
|
|
21
|
+
/** Project name shown in the generated header */
|
|
22
|
+
projectName: string;
|
|
23
|
+
/**
|
|
24
|
+
* Which tools to generate configs for.
|
|
25
|
+
* Defaults to all tools if omitted.
|
|
26
|
+
*/
|
|
27
|
+
tools?: AiTool[];
|
|
28
|
+
}
|
|
29
|
+
interface ToolTarget {
|
|
30
|
+
tool: AiTool;
|
|
31
|
+
/** Display label shown in the interactive prompt */
|
|
32
|
+
label: string;
|
|
33
|
+
/** Relative path from project root */
|
|
34
|
+
rel: string;
|
|
35
|
+
/** Use @-import syntax (Claude Code) vs HTML comment */
|
|
36
|
+
forClaude: boolean;
|
|
37
|
+
}
|
|
38
|
+
export declare const AI_TOOL_TARGETS: ToolTarget[];
|
|
39
|
+
/**
|
|
40
|
+
* Generate AI tool config files in the project root.
|
|
41
|
+
* Skips any file that already exists.
|
|
42
|
+
*
|
|
43
|
+
* @param options.tools - Which assistants to generate for. Defaults to all.
|
|
44
|
+
* @returns Relative paths (from rootDir) of files that were actually created.
|
|
45
|
+
*/
|
|
46
|
+
export interface AiConfigResult {
|
|
47
|
+
/** Relative path from rootDir */
|
|
48
|
+
rel: string;
|
|
49
|
+
/** true = created now, false = already existed */
|
|
50
|
+
created: boolean;
|
|
51
|
+
}
|
|
52
|
+
export declare function generateAiConfigs(options: AiConfigOptions): Promise<AiConfigResult[]>;
|
|
53
|
+
export {};
|
|
54
|
+
//# sourceMappingURL=ai-config-generator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ai-config-generator.d.ts","sourceRoot":"","sources":["../../../src/core/analyzer/ai-config-generator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAUH,qCAAqC;AACrC,MAAM,MAAM,MAAM,GAAG,QAAQ,GAAG,QAAQ,GAAG,OAAO,GAAG,SAAS,GAAG,UAAU,GAAG,MAAM,GAAG,QAAQ,CAAC;AAEhG,MAAM,WAAW,eAAe;IAC9B,wCAAwC;IACxC,OAAO,EAAE,MAAM,CAAC;IAChB,iFAAiF;IACjF,WAAW,EAAE,MAAM,CAAC;IACpB,iDAAiD;IACjD,WAAW,EAAE,MAAM,CAAC;IACpB;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;CAClB;AAMD,UAAU,UAAU;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,oDAAoD;IACpD,KAAK,EAAE,MAAM,CAAC;IACd,sCAAsC;IACtC,GAAG,EAAE,MAAM,CAAC;IACZ,wDAAwD;IACxD,SAAS,EAAE,OAAO,CAAC;CACpB;AAED,eAAO,MAAM,eAAe,EAAE,UAAU,EAQvC,CAAC;AAuEF;;;;;;GAMG;AACH,MAAM,WAAW,cAAc;IAC7B,iCAAiC;IACjC,GAAG,EAAE,MAAM,CAAC;IACZ,kDAAkD;IAClD,OAAO,EAAE,OAAO,CAAC;CAClB;AAED,wBAAsB,iBAAiB,CAAC,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,cAAc,EAAE,CAAC,CAe3F"}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AI Config File Generator
|
|
3
|
+
*
|
|
4
|
+
* Generates tool-specific AI context files during `openlore analyze`:
|
|
5
|
+
* - .cursorrules (Cursor IDE)
|
|
6
|
+
* - .clinerules/openlore.md (Cline / Roo Code / Kilocode)
|
|
7
|
+
* - CLAUDE.md (Claude Code)
|
|
8
|
+
* - .github/copilot-instructions.md (GitHub Copilot)
|
|
9
|
+
* - .windsurf/rules.md (Windsurf)
|
|
10
|
+
*
|
|
11
|
+
* Files are NEVER overwritten — if a file already exists it is skipped silently.
|
|
12
|
+
* Returns the list of paths that were actually created.
|
|
13
|
+
*/
|
|
14
|
+
import { writeFile, mkdir } from 'node:fs/promises';
|
|
15
|
+
import { join, dirname } from 'node:path';
|
|
16
|
+
import { fileExists } from '../../utils/command-helpers.js';
|
|
17
|
+
export const AI_TOOL_TARGETS = [
|
|
18
|
+
{ tool: 'claude', label: 'Claude Code (CLAUDE.md)', rel: 'CLAUDE.md', forClaude: true },
|
|
19
|
+
{ tool: 'cursor', label: 'Cursor (.cursorrules)', rel: '.cursorrules', forClaude: false },
|
|
20
|
+
{ tool: 'cline', label: 'Cline / Roo (.clinerules/openlore.md)', rel: '.clinerules/openlore.md', forClaude: false },
|
|
21
|
+
{ tool: 'copilot', label: 'GitHub Copilot (.github/copilot-instructions.md)', rel: '.github/copilot-instructions.md', forClaude: false },
|
|
22
|
+
{ tool: 'windsurf', label: 'Windsurf (.windsurf/rules.md)', rel: '.windsurf/rules.md', forClaude: false },
|
|
23
|
+
{ tool: 'vibe', label: 'Mistral Vibe (.vibe/skills/openlore.md)', rel: '.vibe/skills/openlore.md', forClaude: false },
|
|
24
|
+
{ tool: 'agents', label: 'OpenAI Codex (AGENTS.md)', rel: 'AGENTS.md', forClaude: false },
|
|
25
|
+
];
|
|
26
|
+
// ============================================================================
|
|
27
|
+
// TEMPLATE
|
|
28
|
+
// ============================================================================
|
|
29
|
+
const MCP_TOOLS_TABLE = `
|
|
30
|
+
## openlore MCP workflow
|
|
31
|
+
|
|
32
|
+
**Follow this sequence for every task:**
|
|
33
|
+
|
|
34
|
+
1. **\`orient "<task description>"\`** — always start here. Returns relevant functions, files, spec domains, call paths, and insertion points in one call.
|
|
35
|
+
2. **If the task involves data models, APIs, or config** — call the relevant inventory tool:
|
|
36
|
+
\`get_schema_inventory\` · \`get_route_inventory\` · \`get_env_vars\` · \`get_ui_components\` · \`get_middleware_inventory\`
|
|
37
|
+
3. **If debugging a call flow** ("how does X reach Y?") — \`trace_execution_path\`
|
|
38
|
+
4. **Before modifying a function** — \`get_subgraph\` to understand blast radius
|
|
39
|
+
5. **Before opening a PR** — \`check_spec_drift\`
|
|
40
|
+
|
|
41
|
+
**On-demand** (when orient's results aren't enough):
|
|
42
|
+
\`search_code\` · \`suggest_insertion_points\` · \`get_spec <domain>\` · \`search_specs\` · \`analyze_impact\` · \`get_function_body\` · \`get_function_skeleton\`
|
|
43
|
+
|
|
44
|
+
## Architectural decisions
|
|
45
|
+
|
|
46
|
+
When making a significant design choice, call \`record_decision\` **before** writing the code.
|
|
47
|
+
|
|
48
|
+
Significant choices: data structure, library/dependency, API contract, auth strategy, module boundary, database schema, caching approach, error handling pattern.
|
|
49
|
+
|
|
50
|
+
\`\`\`
|
|
51
|
+
record_decision({
|
|
52
|
+
title: "Use JWTs for stateless auth", // short imperative
|
|
53
|
+
rationale: "Avoids session store in infra", // why this choice
|
|
54
|
+
consequences: "Tokens can't be revoked early", // trade-offs
|
|
55
|
+
affectedFiles: ["src/auth/middleware.ts"], // optional
|
|
56
|
+
supersedes: "a1b2c3d4" // 8-char ID of prior decision being reversed
|
|
57
|
+
})
|
|
58
|
+
\`\`\`
|
|
59
|
+
|
|
60
|
+
Decisions are consolidated in the background immediately after \`record_decision\` is called — the pre-commit gate reads the already-consolidated store and adds no LLM latency.
|
|
61
|
+
|
|
62
|
+
**Performance note**: if you skip \`record_decision\`, the gate detects unrecorded source changes at commit time and triggers a slow LLM extraction on the *next* commit (~10-30s). Calling \`record_decision\` proactively keeps every commit instant. Do not record trivial choices (variable names, formatting).
|
|
63
|
+
`.trim();
|
|
64
|
+
function buildContent(analysisDir, projectName, forClaude) {
|
|
65
|
+
const digestRef = forClaude
|
|
66
|
+
? `@${analysisDir}/CODEBASE.md`
|
|
67
|
+
: `<!-- Import or paste ${analysisDir}/CODEBASE.md here for full project context -->`;
|
|
68
|
+
return [
|
|
69
|
+
`# ${projectName} — AI context (generated by openlore)`,
|
|
70
|
+
'',
|
|
71
|
+
digestRef,
|
|
72
|
+
'',
|
|
73
|
+
MCP_TOOLS_TABLE,
|
|
74
|
+
].join('\n');
|
|
75
|
+
}
|
|
76
|
+
// ============================================================================
|
|
77
|
+
// HELPERS
|
|
78
|
+
// ============================================================================
|
|
79
|
+
async function writeIfAbsent(filePath, content) {
|
|
80
|
+
if (await fileExists(filePath))
|
|
81
|
+
return false;
|
|
82
|
+
await mkdir(dirname(filePath), { recursive: true });
|
|
83
|
+
await writeFile(filePath, content, 'utf-8');
|
|
84
|
+
return true;
|
|
85
|
+
}
|
|
86
|
+
export async function generateAiConfigs(options) {
|
|
87
|
+
const { rootDir, analysisDir, projectName, tools } = options;
|
|
88
|
+
const targets = tools
|
|
89
|
+
? AI_TOOL_TARGETS.filter(t => tools.includes(t.tool))
|
|
90
|
+
: AI_TOOL_TARGETS;
|
|
91
|
+
return Promise.all(targets.map(async ({ rel, forClaude }) => {
|
|
92
|
+
const absPath = join(rootDir, rel);
|
|
93
|
+
const content = buildContent(analysisDir, projectName, forClaude);
|
|
94
|
+
const created = await writeIfAbsent(absPath, content);
|
|
95
|
+
return { rel, created };
|
|
96
|
+
}));
|
|
97
|
+
}
|
|
98
|
+
//# sourceMappingURL=ai-config-generator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ai-config-generator.js","sourceRoot":"","sources":["../../../src/core/analyzer/ai-config-generator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAqC5D,MAAM,CAAC,MAAM,eAAe,GAAiB;IAC3C,EAAE,IAAI,EAAE,QAAQ,EAAI,KAAK,EAAE,4BAA4B,EAAyB,GAAG,EAAE,WAAW,EAA+B,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,aAAa,CAAC,QAAgB,EAAE,OAAe;IAC5D,IAAI,MAAM,UAAU,CAAC,QAAQ,CAAC;QAAE,OAAO,KAAK,CAAC;IAC7C,MAAM,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IACpD,MAAM,SAAS,CAAC,QAAQ,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;IAC5C,OAAO,IAAI,CAAC;AACd,CAAC;AAoBD,MAAM,CAAC,KAAK,UAAU,iBAAiB,CAAC,OAAwB;IAC9D,MAAM,EAAE,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,KAAK,EAAE,GAAG,OAAO,CAAC;IAE7D,MAAM,OAAO,GAAG,KAAK;QACnB,CAAC,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;QACrD,CAAC,CAAC,eAAe,CAAC;IAEpB,OAAO,OAAO,CAAC,GAAG,CAChB,OAAO,CAAC,GAAG,CAAC,KAAK,EAAE,EAAE,GAAG,EAAE,SAAS,EAAE,EAAE,EAAE;QACvC,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC;QACnC,MAAM,OAAO,GAAG,YAAY,CAAC,WAAW,EAAE,WAAW,EAAE,SAAS,CAAC,CAAC;QAClE,MAAM,OAAO,GAAG,MAAM,aAAa,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;QACtD,OAAO,EAAE,GAAG,EAAE,OAAO,EAAE,CAAC;IAC1B,CAAC,CAAC,CACH,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Architecture Writer
|
|
3
|
+
*
|
|
4
|
+
* Shared logic for building a high-level architecture overview from cached
|
|
5
|
+
* static analysis artifacts (dependency-graph.json + llm-context.json).
|
|
6
|
+
*
|
|
7
|
+
* Used by:
|
|
8
|
+
* - MCP tool `get_architecture_overview` (mcp.ts)
|
|
9
|
+
* - `openlore analyze` — writes ARCHITECTURE.md to the project root
|
|
10
|
+
*/
|
|
11
|
+
import type { DependencyGraphResult } from './dependency-graph.js';
|
|
12
|
+
import type { LLMContext } from './artifact-generator.js';
|
|
13
|
+
export interface ClusterSummary {
|
|
14
|
+
id: string;
|
|
15
|
+
name: string;
|
|
16
|
+
fileCount: number;
|
|
17
|
+
role: string;
|
|
18
|
+
entryPointCount: number;
|
|
19
|
+
hubCount: number;
|
|
20
|
+
dependsOn: string[];
|
|
21
|
+
keyFiles: string[];
|
|
22
|
+
}
|
|
23
|
+
export interface ArchitectureOverview {
|
|
24
|
+
generatedAt: string;
|
|
25
|
+
summary: {
|
|
26
|
+
totalFiles: number;
|
|
27
|
+
totalClusters: number;
|
|
28
|
+
totalEdges: number;
|
|
29
|
+
cycles: number;
|
|
30
|
+
layerViolations: number;
|
|
31
|
+
};
|
|
32
|
+
clusters: ClusterSummary[];
|
|
33
|
+
globalEntryPoints: Array<{
|
|
34
|
+
name: string;
|
|
35
|
+
file: string;
|
|
36
|
+
language: string;
|
|
37
|
+
}>;
|
|
38
|
+
criticalHubs: Array<{
|
|
39
|
+
name: string;
|
|
40
|
+
file: string;
|
|
41
|
+
fanIn: number;
|
|
42
|
+
fanOut: number;
|
|
43
|
+
}>;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Infer a module cluster's architectural role from aggregate metrics.
|
|
47
|
+
*/
|
|
48
|
+
export declare function inferClusterRole(entryCount: number, hubCount: number, fileCount: number): string;
|
|
49
|
+
/**
|
|
50
|
+
* Build an ArchitectureOverview from pre-loaded dependency graph and LLM context.
|
|
51
|
+
* Both can be null if one artifact is missing; at least one must be non-null.
|
|
52
|
+
*
|
|
53
|
+
* @param depGraph Parsed dependency-graph.json (or null)
|
|
54
|
+
* @param ctx Parsed llm-context.json (or null)
|
|
55
|
+
* @param absDir Absolute project root path — used to normalize cluster file paths
|
|
56
|
+
*/
|
|
57
|
+
export declare function buildArchitectureOverview(depGraph: DependencyGraphResult | null, ctx: LLMContext | null, absDir: string): ArchitectureOverview;
|
|
58
|
+
/**
|
|
59
|
+
* Render an ArchitectureOverview as a Markdown document (ARCHITECTURE.md).
|
|
60
|
+
*/
|
|
61
|
+
export declare function renderArchitectureMarkdown(overview: ArchitectureOverview): string;
|
|
62
|
+
/**
|
|
63
|
+
* Write ARCHITECTURE.md to the project root.
|
|
64
|
+
* Returns the path written.
|
|
65
|
+
*/
|
|
66
|
+
export declare function writeArchitectureMd(rootPath: string, overview: ArchitectureOverview): Promise<string>;
|
|
67
|
+
//# sourceMappingURL=architecture-writer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"architecture-writer.d.ts","sourceRoot":"","sources":["../../../src/core/analyzer/architecture-writer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAIH,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AACnE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAM1D,MAAM,WAAW,cAAc;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,eAAe,EAAE,MAAM,CAAC;IACxB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB;AAED,MAAM,WAAW,oBAAoB;IACnC,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE;QACP,UAAU,EAAE,MAAM,CAAC;QACnB,aAAa,EAAE,MAAM,CAAC;QACtB,UAAU,EAAE,MAAM,CAAC;QACnB,MAAM,EAAE,MAAM,CAAC;QACf,eAAe,EAAE,MAAM,CAAC;KACzB,CAAC;IACF,QAAQ,EAAE,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