mcp-adr-analysis-server 2.1.9 → 2.1.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +55 -8
- package/dist/.tsbuildinfo +1 -1
- package/dist/src/index.d.ts +78 -2
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +1793 -577
- package/dist/src/index.js.map +1 -1
- package/dist/src/prompts/index.d.ts.map +1 -1
- package/dist/src/prompts/index.js +23 -6
- package/dist/src/prompts/index.js.map +1 -1
- package/dist/src/prompts/validated-pattern-prompts.d.ts +33 -0
- package/dist/src/prompts/validated-pattern-prompts.d.ts.map +1 -0
- package/dist/src/prompts/validated-pattern-prompts.js +337 -0
- package/dist/src/prompts/validated-pattern-prompts.js.map +1 -0
- package/dist/src/resources/adr-by-id-resource.d.ts +116 -0
- package/dist/src/resources/adr-by-id-resource.d.ts.map +1 -0
- package/dist/src/resources/adr-by-id-resource.js +213 -0
- package/dist/src/resources/adr-by-id-resource.js.map +1 -0
- package/dist/src/resources/code-quality-resource.d.ts +105 -0
- package/dist/src/resources/code-quality-resource.d.ts.map +1 -0
- package/dist/src/resources/code-quality-resource.js +282 -0
- package/dist/src/resources/code-quality-resource.js.map +1 -0
- package/dist/src/resources/deployment-history-resource.d.ts +214 -0
- package/dist/src/resources/deployment-history-resource.d.ts.map +1 -0
- package/dist/src/resources/deployment-history-resource.js +308 -0
- package/dist/src/resources/deployment-history-resource.js.map +1 -0
- package/dist/src/resources/deployment-status-resource.d.ts +256 -0
- package/dist/src/resources/deployment-status-resource.d.ts.map +1 -0
- package/dist/src/resources/deployment-status-resource.js +665 -0
- package/dist/src/resources/deployment-status-resource.js.map +1 -0
- package/dist/src/resources/environment-analysis-resource.d.ts +237 -0
- package/dist/src/resources/environment-analysis-resource.d.ts.map +1 -0
- package/dist/src/resources/environment-analysis-resource.js +646 -0
- package/dist/src/resources/environment-analysis-resource.js.map +1 -0
- package/dist/src/resources/index.d.ts +6 -2
- package/dist/src/resources/index.d.ts.map +1 -1
- package/dist/src/resources/index.js +247 -492
- package/dist/src/resources/index.js.map +1 -1
- package/dist/src/resources/memory-snapshots-resource.d.ts +180 -0
- package/dist/src/resources/memory-snapshots-resource.d.ts.map +1 -0
- package/dist/src/resources/memory-snapshots-resource.js +847 -0
- package/dist/src/resources/memory-snapshots-resource.js.map +1 -0
- package/dist/src/resources/pattern-base-code-by-platform-resource.d.ts +35 -0
- package/dist/src/resources/pattern-base-code-by-platform-resource.d.ts.map +1 -0
- package/dist/src/resources/pattern-base-code-by-platform-resource.js +72 -0
- package/dist/src/resources/pattern-base-code-by-platform-resource.js.map +1 -0
- package/dist/src/resources/pattern-by-name-resource.d.ts +53 -0
- package/dist/src/resources/pattern-by-name-resource.d.ts.map +1 -0
- package/dist/src/resources/pattern-by-name-resource.js +200 -0
- package/dist/src/resources/pattern-by-name-resource.js.map +1 -0
- package/dist/src/resources/pattern-sources-by-platform-resource.d.ts +26 -0
- package/dist/src/resources/pattern-sources-by-platform-resource.d.ts.map +1 -0
- package/dist/src/resources/pattern-sources-by-platform-resource.js +59 -0
- package/dist/src/resources/pattern-sources-by-platform-resource.js.map +1 -0
- package/dist/src/resources/project-metrics-resource.d.ts +180 -0
- package/dist/src/resources/project-metrics-resource.d.ts.map +1 -0
- package/dist/src/resources/project-metrics-resource.js +487 -0
- package/dist/src/resources/project-metrics-resource.js.map +1 -0
- package/dist/src/resources/project-status-resource.d.ts +75 -0
- package/dist/src/resources/project-status-resource.d.ts.map +1 -0
- package/dist/src/resources/project-status-resource.js +189 -0
- package/dist/src/resources/project-status-resource.js.map +1 -0
- package/dist/src/resources/research-by-topic-resource.d.ts +21 -0
- package/dist/src/resources/research-by-topic-resource.d.ts.map +1 -0
- package/dist/src/resources/research-by-topic-resource.js +125 -0
- package/dist/src/resources/research-by-topic-resource.js.map +1 -0
- package/dist/src/resources/research-index-resource.d.ts +100 -0
- package/dist/src/resources/research-index-resource.d.ts.map +1 -0
- package/dist/src/resources/research-index-resource.js +200 -0
- package/dist/src/resources/research-index-resource.js.map +1 -0
- package/dist/src/resources/resource-cache.d.ts +144 -0
- package/dist/src/resources/resource-cache.d.ts.map +1 -0
- package/dist/src/resources/resource-cache.js +316 -0
- package/dist/src/resources/resource-cache.js.map +1 -0
- package/dist/src/resources/resource-router.d.ts +45 -0
- package/dist/src/resources/resource-router.d.ts.map +1 -0
- package/dist/src/resources/resource-router.js +96 -0
- package/dist/src/resources/resource-router.js.map +1 -0
- package/dist/src/resources/rule-by-id-resource.d.ts +38 -0
- package/dist/src/resources/rule-by-id-resource.d.ts.map +1 -0
- package/dist/src/resources/rule-by-id-resource.js +104 -0
- package/dist/src/resources/rule-by-id-resource.js.map +1 -0
- package/dist/src/resources/rule-catalog-resource.d.ts +126 -0
- package/dist/src/resources/rule-catalog-resource.d.ts.map +1 -0
- package/dist/src/resources/rule-catalog-resource.js +224 -0
- package/dist/src/resources/rule-catalog-resource.js.map +1 -0
- package/dist/src/resources/rule-generation-resource.d.ts +80 -0
- package/dist/src/resources/rule-generation-resource.d.ts.map +1 -0
- package/dist/src/resources/rule-generation-resource.js +282 -0
- package/dist/src/resources/rule-generation-resource.js.map +1 -0
- package/dist/src/resources/technology-by-name-resource.d.ts +43 -0
- package/dist/src/resources/technology-by-name-resource.d.ts.map +1 -0
- package/dist/src/resources/technology-by-name-resource.js +176 -0
- package/dist/src/resources/technology-by-name-resource.js.map +1 -0
- package/dist/src/resources/todo-by-id-resource.d.ts +46 -0
- package/dist/src/resources/todo-by-id-resource.d.ts.map +1 -0
- package/dist/src/resources/todo-by-id-resource.js +192 -0
- package/dist/src/resources/todo-by-id-resource.js.map +1 -0
- package/dist/src/resources/todo-list-resource.d.ts +96 -0
- package/dist/src/resources/todo-list-resource.d.ts.map +1 -0
- package/dist/src/resources/todo-list-resource.js +209 -0
- package/dist/src/resources/todo-list-resource.js.map +1 -0
- package/dist/src/resources/validated-pattern-by-platform-resource.d.ts +14 -0
- package/dist/src/resources/validated-pattern-by-platform-resource.d.ts.map +1 -0
- package/dist/src/resources/validated-pattern-by-platform-resource.js +45 -0
- package/dist/src/resources/validated-pattern-by-platform-resource.js.map +1 -0
- package/dist/src/resources/validated-patterns-catalog-resource.d.ts +36 -0
- package/dist/src/resources/validated-patterns-catalog-resource.d.ts.map +1 -0
- package/dist/src/resources/validated-patterns-catalog-resource.js +57 -0
- package/dist/src/resources/validated-patterns-catalog-resource.js.map +1 -0
- package/dist/src/templates/domain-knowledge-templates.d.ts.map +1 -1
- package/dist/src/templates/domain-knowledge-templates.js +49 -49
- package/dist/src/templates/domain-knowledge-templates.js.map +1 -1
- package/dist/src/tools/adr-bootstrap-validation-tool.d.ts.map +1 -1
- package/dist/src/tools/adr-bootstrap-validation-tool.js +214 -4
- package/dist/src/tools/adr-bootstrap-validation-tool.js.map +1 -1
- package/dist/src/tools/adr-suggestion-tool.d.ts +2 -2
- package/dist/src/tools/adr-suggestion-tool.d.ts.map +1 -1
- package/dist/src/tools/adr-suggestion-tool.js +129 -12
- package/dist/src/tools/adr-suggestion-tool.js.map +1 -1
- package/dist/src/tools/adr-validation-tool.d.ts +98 -0
- package/dist/src/tools/adr-validation-tool.d.ts.map +1 -0
- package/dist/src/tools/adr-validation-tool.js +372 -0
- package/dist/src/tools/adr-validation-tool.js.map +1 -0
- package/dist/src/tools/bootstrap-validation-loop-tool.d.ts +262 -0
- package/dist/src/tools/bootstrap-validation-loop-tool.d.ts.map +1 -0
- package/dist/src/tools/bootstrap-validation-loop-tool.js +1934 -0
- package/dist/src/tools/bootstrap-validation-loop-tool.js.map +1 -0
- package/dist/src/tools/conversation-memory-tool.d.ts +48 -0
- package/dist/src/tools/conversation-memory-tool.d.ts.map +1 -0
- package/dist/src/tools/conversation-memory-tool.js +254 -0
- package/dist/src/tools/conversation-memory-tool.js.map +1 -0
- package/dist/src/tools/deployment-analysis-tool.d.ts.map +1 -1
- package/dist/src/tools/deployment-analysis-tool.js +82 -6
- package/dist/src/tools/deployment-analysis-tool.js.map +1 -1
- package/dist/src/tools/deployment-guidance-tool.d.ts.map +1 -1
- package/dist/src/tools/deployment-guidance-tool.js +126 -25
- package/dist/src/tools/deployment-guidance-tool.js.map +1 -1
- package/dist/src/tools/deployment-readiness-tool.d.ts.map +1 -1
- package/dist/src/tools/deployment-readiness-tool.js +166 -5
- package/dist/src/tools/deployment-readiness-tool.js.map +1 -1
- package/dist/src/tools/environment-analysis-tool.d.ts.map +1 -1
- package/dist/src/tools/environment-analysis-tool.js +36 -1
- package/dist/src/tools/environment-analysis-tool.js.map +1 -1
- package/dist/src/tools/expand-analysis-tool.d.ts +23 -0
- package/dist/src/tools/expand-analysis-tool.d.ts.map +1 -0
- package/dist/src/tools/expand-analysis-tool.js +107 -0
- package/dist/src/tools/expand-analysis-tool.js.map +1 -0
- package/dist/src/tools/get-server-context-tool.d.ts +67 -0
- package/dist/src/tools/get-server-context-tool.d.ts.map +1 -0
- package/dist/src/tools/get-server-context-tool.js +75 -0
- package/dist/src/tools/get-server-context-tool.js.map +1 -0
- package/dist/src/tools/interactive-adr-planning-tool.d.ts.map +1 -1
- package/dist/src/tools/interactive-adr-planning-tool.js +82 -9
- package/dist/src/tools/interactive-adr-planning-tool.js.map +1 -1
- package/dist/src/tools/llm-cloud-management-tool.d.ts +62 -0
- package/dist/src/tools/llm-cloud-management-tool.d.ts.map +1 -0
- package/dist/src/tools/llm-cloud-management-tool.js +202 -0
- package/dist/src/tools/llm-cloud-management-tool.js.map +1 -0
- package/dist/src/tools/llm-database-management-tool.d.ts +62 -0
- package/dist/src/tools/llm-database-management-tool.d.ts.map +1 -0
- package/dist/src/tools/llm-database-management-tool.js +203 -0
- package/dist/src/tools/llm-database-management-tool.js.map +1 -0
- package/dist/src/tools/llm-web-search-tool.d.ts +59 -0
- package/dist/src/tools/llm-web-search-tool.d.ts.map +1 -0
- package/dist/src/tools/llm-web-search-tool.js +165 -0
- package/dist/src/tools/llm-web-search-tool.js.map +1 -0
- package/dist/src/tools/mcp-planning-tool.d.ts.map +1 -1
- package/dist/src/tools/mcp-planning-tool.js +10 -3
- package/dist/src/tools/mcp-planning-tool.js.map +1 -1
- package/dist/src/tools/memory-loading-tool.d.ts.map +1 -1
- package/dist/src/tools/memory-loading-tool.js +4 -2
- package/dist/src/tools/memory-loading-tool.js.map +1 -1
- package/dist/src/tools/perform-research-tool.d.ts +61 -0
- package/dist/src/tools/perform-research-tool.d.ts.map +1 -0
- package/dist/src/tools/perform-research-tool.js +324 -0
- package/dist/src/tools/perform-research-tool.js.map +1 -0
- package/dist/src/tools/research-question-tool.d.ts.map +1 -1
- package/dist/src/tools/research-question-tool.js +11 -9
- package/dist/src/tools/research-question-tool.js.map +1 -1
- package/dist/src/tools/review-existing-adrs-tool.d.ts.map +1 -1
- package/dist/src/tools/review-existing-adrs-tool.js +42 -3
- package/dist/src/tools/review-existing-adrs-tool.js.map +1 -1
- package/dist/src/tools/tool-chain-orchestrator.d.ts +15 -94
- package/dist/src/tools/tool-chain-orchestrator.d.ts.map +1 -1
- package/dist/src/tools/tool-chain-orchestrator.js +2 -2
- package/dist/src/tools/tool-chain-orchestrator.js.map +1 -1
- package/dist/src/tools/troubleshoot-guided-workflow-tool.d.ts +25 -120
- package/dist/src/tools/troubleshoot-guided-workflow-tool.d.ts.map +1 -1
- package/dist/src/tools/troubleshoot-guided-workflow-tool.js +91 -2
- package/dist/src/tools/troubleshoot-guided-workflow-tool.js.map +1 -1
- package/dist/src/types/ape-framework.d.ts +50 -283
- package/dist/src/types/ape-framework.d.ts.map +1 -1
- package/dist/src/types/conversation-context.d.ts.map +1 -1
- package/dist/src/types/conversation-context.js +12 -12
- package/dist/src/types/conversation-context.js.map +1 -1
- package/dist/src/types/conversation-memory.d.ts +184 -0
- package/dist/src/types/conversation-memory.d.ts.map +1 -0
- package/dist/src/types/conversation-memory.js +8 -0
- package/dist/src/types/conversation-memory.js.map +1 -0
- package/dist/src/types/index.d.ts +112 -339
- package/dist/src/types/index.d.ts.map +1 -1
- package/dist/src/types/knowledge-generation.d.ts +96 -401
- package/dist/src/types/knowledge-generation.d.ts.map +1 -1
- package/dist/src/types/knowledge-graph-schemas.d.ts +77 -715
- package/dist/src/types/knowledge-graph-schemas.d.ts.map +1 -1
- package/dist/src/types/knowledge-graph-schemas.js +8 -8
- package/dist/src/types/knowledge-graph-schemas.js.map +1 -1
- package/dist/src/types/memory-entities.d.ts +1230 -6164
- package/dist/src/types/memory-entities.d.ts.map +1 -1
- package/dist/src/types/memory-entities.js +8 -8
- package/dist/src/types/memory-entities.js.map +1 -1
- package/dist/src/types/reflexion-framework.d.ts +35 -264
- package/dist/src/types/reflexion-framework.d.ts.map +1 -1
- package/dist/src/types/reflexion-framework.js +1 -1
- package/dist/src/types/reflexion-framework.js.map +1 -1
- package/dist/src/types/state-reinforcement.d.ts +87 -0
- package/dist/src/types/state-reinforcement.d.ts.map +1 -0
- package/dist/src/types/state-reinforcement.js +5 -0
- package/dist/src/types/state-reinforcement.js.map +1 -0
- package/dist/src/types/tiered-response.d.ts +61 -0
- package/dist/src/types/tiered-response.d.ts.map +1 -0
- package/dist/src/types/tiered-response.js +8 -0
- package/dist/src/types/tiered-response.js.map +1 -0
- package/dist/src/types/tool-context.d.ts +50 -0
- package/dist/src/types/tool-context.d.ts.map +1 -0
- package/dist/src/types/tool-context.js +20 -0
- package/dist/src/types/tool-context.js.map +1 -0
- package/dist/src/utils/adr-action-analyzer.d.ts +23 -0
- package/dist/src/utils/adr-action-analyzer.d.ts.map +1 -0
- package/dist/src/utils/adr-action-analyzer.js +323 -0
- package/dist/src/utils/adr-action-analyzer.js.map +1 -0
- package/dist/src/utils/adr-context-detector.d.ts +33 -0
- package/dist/src/utils/adr-context-detector.d.ts.map +1 -0
- package/dist/src/utils/adr-context-detector.js +279 -0
- package/dist/src/utils/adr-context-detector.js.map +1 -0
- package/dist/src/utils/adr-discovery.d.ts +28 -2
- package/dist/src/utils/adr-discovery.d.ts.map +1 -1
- package/dist/src/utils/adr-discovery.js +91 -7
- package/dist/src/utils/adr-discovery.js.map +1 -1
- package/dist/src/utils/adr-knowledge-initializer.d.ts +54 -0
- package/dist/src/utils/adr-knowledge-initializer.d.ts.map +1 -0
- package/dist/src/utils/adr-knowledge-initializer.js +240 -0
- package/dist/src/utils/adr-knowledge-initializer.js.map +1 -0
- package/dist/src/utils/adr-timeline-extractor.d.ts +21 -0
- package/dist/src/utils/adr-timeline-extractor.d.ts.map +1 -0
- package/dist/src/utils/adr-timeline-extractor.js +294 -0
- package/dist/src/utils/adr-timeline-extractor.js.map +1 -0
- package/dist/src/utils/adr-timeline-types.d.ts +234 -0
- package/dist/src/utils/adr-timeline-types.d.ts.map +1 -0
- package/dist/src/utils/adr-timeline-types.js +7 -0
- package/dist/src/utils/adr-timeline-types.js.map +1 -0
- package/dist/src/utils/ai-executor.d.ts +36 -0
- package/dist/src/utils/ai-executor.d.ts.map +1 -1
- package/dist/src/utils/ai-executor.js +39 -3
- package/dist/src/utils/ai-executor.js.map +1 -1
- package/dist/src/utils/apply-cot-enhancement.d.ts.map +1 -1
- package/dist/src/utils/apply-cot-enhancement.js +15 -15
- package/dist/src/utils/apply-cot-enhancement.js.map +1 -1
- package/dist/src/utils/automatic-prompt-engineering.d.ts.map +1 -1
- package/dist/src/utils/automatic-prompt-engineering.js +68 -58
- package/dist/src/utils/automatic-prompt-engineering.js.map +1 -1
- package/dist/src/utils/conditional-request.d.ts +105 -0
- package/dist/src/utils/conditional-request.d.ts.map +1 -0
- package/dist/src/utils/conditional-request.js +186 -0
- package/dist/src/utils/conditional-request.js.map +1 -0
- package/dist/src/utils/config.d.ts +72 -18
- package/dist/src/utils/config.d.ts.map +1 -1
- package/dist/src/utils/config.js +75 -0
- package/dist/src/utils/config.js.map +1 -1
- package/dist/src/utils/context-document-manager.d.ts +112 -0
- package/dist/src/utils/context-document-manager.d.ts.map +1 -0
- package/dist/src/utils/context-document-manager.js +351 -0
- package/dist/src/utils/context-document-manager.js.map +1 -0
- package/dist/src/utils/conversation-memory-manager.d.ts +86 -0
- package/dist/src/utils/conversation-memory-manager.d.ts.map +1 -0
- package/dist/src/utils/conversation-memory-manager.js +443 -0
- package/dist/src/utils/conversation-memory-manager.js.map +1 -0
- package/dist/src/utils/dag-executor.d.ts +106 -0
- package/dist/src/utils/dag-executor.d.ts.map +1 -0
- package/dist/src/utils/dag-executor.js +420 -0
- package/dist/src/utils/dag-executor.js.map +1 -0
- package/dist/src/utils/deployment-analysis.d.ts.map +1 -1
- package/dist/src/utils/deployment-analysis.js +17 -9
- package/dist/src/utils/deployment-analysis.js.map +1 -1
- package/dist/src/utils/deployment-type-registry.d.ts +52 -0
- package/dist/src/utils/deployment-type-registry.d.ts.map +1 -0
- package/dist/src/utils/deployment-type-registry.js +543 -0
- package/dist/src/utils/deployment-type-registry.js.map +1 -0
- package/dist/src/utils/dynamic-deployment-intelligence.d.ts +117 -0
- package/dist/src/utils/dynamic-deployment-intelligence.d.ts.map +1 -0
- package/dist/src/utils/dynamic-deployment-intelligence.js +445 -0
- package/dist/src/utils/dynamic-deployment-intelligence.js.map +1 -0
- package/dist/src/utils/environment-analysis.d.ts.map +1 -1
- package/dist/src/utils/environment-analysis.js +63 -44
- package/dist/src/utils/environment-analysis.js.map +1 -1
- package/dist/src/utils/environment-capability-registry.d.ts +101 -0
- package/dist/src/utils/environment-capability-registry.d.ts.map +1 -0
- package/dist/src/utils/environment-capability-registry.js +489 -0
- package/dist/src/utils/environment-capability-registry.js.map +1 -0
- package/dist/src/utils/index.d.ts +3 -3
- package/dist/src/utils/index.d.ts.map +1 -1
- package/dist/src/utils/index.js +3 -3
- package/dist/src/utils/index.js.map +1 -1
- package/dist/src/utils/knowledge-generation.d.ts.map +1 -1
- package/dist/src/utils/knowledge-generation.js +61 -35
- package/dist/src/utils/knowledge-generation.js.map +1 -1
- package/dist/src/utils/knowledge-graph-manager.d.ts +19 -0
- package/dist/src/utils/knowledge-graph-manager.d.ts.map +1 -1
- package/dist/src/utils/knowledge-graph-manager.js +165 -1
- package/dist/src/utils/knowledge-graph-manager.js.map +1 -1
- package/dist/src/utils/llm-artifact-detector.d.ts.map +1 -1
- package/dist/src/utils/llm-artifact-detector.js +28 -24
- package/dist/src/utils/llm-artifact-detector.js.map +1 -1
- package/dist/src/utils/mermaid-diagrams.d.ts +101 -0
- package/dist/src/utils/mermaid-diagrams.d.ts.map +1 -0
- package/dist/src/utils/mermaid-diagrams.js +445 -0
- package/dist/src/utils/mermaid-diagrams.js.map +1 -0
- package/dist/src/utils/monitoring.d.ts +249 -0
- package/dist/src/utils/monitoring.d.ts.map +1 -0
- package/dist/src/utils/monitoring.js +513 -0
- package/dist/src/utils/monitoring.js.map +1 -0
- package/dist/src/utils/pattern-contribution-helper.d.ts +60 -0
- package/dist/src/utils/pattern-contribution-helper.d.ts.map +1 -0
- package/dist/src/utils/pattern-contribution-helper.js +308 -0
- package/dist/src/utils/pattern-contribution-helper.js.map +1 -0
- package/dist/src/utils/pattern-loader.d.ts +183 -0
- package/dist/src/utils/pattern-loader.d.ts.map +1 -0
- package/dist/src/utils/pattern-loader.js +200 -0
- package/dist/src/utils/pattern-loader.js.map +1 -0
- package/dist/src/utils/pattern-research-utility.d.ts +107 -0
- package/dist/src/utils/pattern-research-utility.d.ts.map +1 -0
- package/dist/src/utils/pattern-research-utility.js +360 -0
- package/dist/src/utils/pattern-research-utility.js.map +1 -0
- package/dist/src/utils/pattern-to-dag-converter.d.ts +62 -0
- package/dist/src/utils/pattern-to-dag-converter.d.ts.map +1 -0
- package/dist/src/utils/pattern-to-dag-converter.js +265 -0
- package/dist/src/utils/pattern-to-dag-converter.js.map +1 -0
- package/dist/src/utils/platform-detector.d.ts +86 -0
- package/dist/src/utils/platform-detector.d.ts.map +1 -0
- package/dist/src/utils/platform-detector.js +509 -0
- package/dist/src/utils/platform-detector.js.map +1 -0
- package/dist/src/utils/prompt-composition.d.ts.map +1 -1
- package/dist/src/utils/prompt-composition.js +1 -4
- package/dist/src/utils/prompt-composition.js.map +1 -1
- package/dist/src/utils/reflexion.d.ts.map +1 -1
- package/dist/src/utils/reflexion.js +51 -42
- package/dist/src/utils/reflexion.js.map +1 -1
- package/dist/src/utils/research-integration.d.ts.map +1 -1
- package/dist/src/utils/research-integration.js +8 -2
- package/dist/src/utils/research-integration.js.map +1 -1
- package/dist/src/utils/research-orchestrator.d.ts +209 -0
- package/dist/src/utils/research-orchestrator.d.ts.map +1 -0
- package/dist/src/utils/research-orchestrator.js +863 -0
- package/dist/src/utils/research-orchestrator.js.map +1 -0
- package/dist/src/utils/research-questions.d.ts.map +1 -1
- package/dist/src/utils/research-questions.js +4 -1
- package/dist/src/utils/research-questions.js.map +1 -1
- package/dist/src/utils/resource-extractor.d.ts +57 -0
- package/dist/src/utils/resource-extractor.d.ts.map +1 -0
- package/dist/src/utils/resource-extractor.js +323 -0
- package/dist/src/utils/resource-extractor.js.map +1 -0
- package/dist/src/utils/resource-versioning.d.ts +124 -0
- package/dist/src/utils/resource-versioning.d.ts.map +1 -0
- package/dist/src/utils/resource-versioning.js +272 -0
- package/dist/src/utils/resource-versioning.js.map +1 -0
- package/dist/src/utils/root-manager.d.ts +118 -0
- package/dist/src/utils/root-manager.d.ts.map +1 -0
- package/dist/src/utils/root-manager.js +154 -0
- package/dist/src/utils/root-manager.js.map +1 -0
- package/dist/src/utils/rule-generation.d.ts.map +1 -1
- package/dist/src/utils/rule-generation.js +4 -1
- package/dist/src/utils/rule-generation.js.map +1 -1
- package/dist/src/utils/server-context-generator.d.ts +47 -0
- package/dist/src/utils/server-context-generator.d.ts.map +1 -0
- package/dist/src/utils/server-context-generator.js +666 -0
- package/dist/src/utils/server-context-generator.js.map +1 -0
- package/dist/src/utils/state-reinforcement-manager.d.ts +60 -0
- package/dist/src/utils/state-reinforcement-manager.d.ts.map +1 -0
- package/dist/src/utils/state-reinforcement-manager.js +200 -0
- package/dist/src/utils/state-reinforcement-manager.js.map +1 -0
- package/dist/src/utils/system-card-manager.d.ts +194 -0
- package/dist/src/utils/system-card-manager.d.ts.map +1 -0
- package/dist/src/utils/system-card-manager.js +336 -0
- package/dist/src/utils/system-card-manager.js.map +1 -0
- package/dist/src/utils/tiered-response-manager.d.ts +40 -0
- package/dist/src/utils/tiered-response-manager.d.ts.map +1 -0
- package/dist/src/utils/tiered-response-manager.js +243 -0
- package/dist/src/utils/tiered-response-manager.js.map +1 -0
- package/dist/src/utils/tree-sitter-analyzer.d.ts.map +1 -1
- package/dist/src/utils/tree-sitter-analyzer.js +83 -11
- package/dist/src/utils/tree-sitter-analyzer.js.map +1 -1
- package/dist/src/utils/validated-pattern-definitions.d.ts +219 -0
- package/dist/src/utils/validated-pattern-definitions.d.ts.map +1 -0
- package/dist/src/utils/validated-pattern-definitions.js +1511 -0
- package/dist/src/utils/validated-pattern-definitions.js.map +1 -0
- package/package.json +21 -12
- package/dist/src/prompts/todo-prompts.d.ts +0 -49
- package/dist/src/prompts/todo-prompts.d.ts.map +0 -1
- package/dist/src/prompts/todo-prompts.js +0 -824
- package/dist/src/prompts/todo-prompts.js.map +0 -1
- package/dist/src/types/todo-json-schemas.d.ts +0 -17
- package/dist/src/types/todo-json-schemas.d.ts.map +0 -1
- package/dist/src/types/todo-json-schemas.js +0 -9
- package/dist/src/types/todo-json-schemas.js.map +0 -1
- package/dist/src/utils/todo-file-watcher.d.ts +0 -14
- package/dist/src/utils/todo-file-watcher.d.ts.map +0 -1
- package/dist/src/utils/todo-file-watcher.js +0 -25
- package/dist/src/utils/todo-file-watcher.js.map +0 -1
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Validated Patterns Catalog Resource
|
|
3
|
+
* URI Pattern: adr://validated_patterns
|
|
4
|
+
*
|
|
5
|
+
* Provides complete catalog of validated deployment patterns
|
|
6
|
+
* for different platforms with metadata and summaries
|
|
7
|
+
*/
|
|
8
|
+
import { resourceCache, generateETag } from './resource-cache.js';
|
|
9
|
+
import { listAllPatterns, } from '../utils/validated-pattern-definitions.js';
|
|
10
|
+
/**
|
|
11
|
+
* Generate validated patterns catalog resource
|
|
12
|
+
*/
|
|
13
|
+
export async function generateValidatedPatternsCatalogResource() {
|
|
14
|
+
const cacheKey = 'validated-patterns-catalog';
|
|
15
|
+
// Check cache
|
|
16
|
+
const cached = await resourceCache.get(cacheKey);
|
|
17
|
+
if (cached) {
|
|
18
|
+
return cached;
|
|
19
|
+
}
|
|
20
|
+
// Get all validated patterns
|
|
21
|
+
const allPatterns = listAllPatterns();
|
|
22
|
+
const patternSummaries = allPatterns.map((pattern) => ({
|
|
23
|
+
id: pattern.id,
|
|
24
|
+
name: pattern.name,
|
|
25
|
+
version: pattern.version,
|
|
26
|
+
platformType: pattern.platformType,
|
|
27
|
+
description: pattern.description,
|
|
28
|
+
lastUpdated: pattern.metadata.lastUpdated,
|
|
29
|
+
source: pattern.metadata.source,
|
|
30
|
+
tags: pattern.metadata.tags,
|
|
31
|
+
hasBaseCodeRepository: !!pattern.baseCodeRepository,
|
|
32
|
+
hasAuthoritativeSources: pattern.authoritativeSources.length > 0,
|
|
33
|
+
authoritativeSourceCount: pattern.authoritativeSources.length,
|
|
34
|
+
deploymentPhaseCount: pattern.deploymentPhases.length,
|
|
35
|
+
validationCheckCount: pattern.validationChecks.length,
|
|
36
|
+
}));
|
|
37
|
+
const catalog = {
|
|
38
|
+
patterns: patternSummaries,
|
|
39
|
+
metadata: {
|
|
40
|
+
totalPatterns: allPatterns.length,
|
|
41
|
+
platforms: allPatterns.map((p) => p.platformType),
|
|
42
|
+
lastGenerated: new Date().toISOString(),
|
|
43
|
+
},
|
|
44
|
+
};
|
|
45
|
+
const result = {
|
|
46
|
+
data: catalog,
|
|
47
|
+
contentType: 'application/json',
|
|
48
|
+
lastModified: new Date().toISOString(),
|
|
49
|
+
cacheKey,
|
|
50
|
+
ttl: 3600, // 1 hour cache (patterns don't change frequently)
|
|
51
|
+
etag: generateETag(catalog),
|
|
52
|
+
};
|
|
53
|
+
// Cache result
|
|
54
|
+
resourceCache.set(cacheKey, result, result.ttl);
|
|
55
|
+
return result;
|
|
56
|
+
}
|
|
57
|
+
//# sourceMappingURL=validated-patterns-catalog-resource.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validated-patterns-catalog-resource.js","sourceRoot":"","sources":["../../../src/resources/validated-patterns-catalog-resource.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAElE,OAAO,EACL,eAAe,GAGhB,MAAM,2CAA2C,CAAC;AAyBnD;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,wCAAwC;IAC5D,MAAM,QAAQ,GAAG,4BAA4B,CAAC;IAE9C,cAAc;IACd,MAAM,MAAM,GAAG,MAAM,aAAa,CAAC,GAAG,CAA2B,QAAQ,CAAC,CAAC;IAC3E,IAAI,MAAM,EAAE,CAAC;QACX,OAAO,MAAM,CAAC;IAChB,CAAC;IAED,6BAA6B;IAC7B,MAAM,WAAW,GAAG,eAAe,EAAE,CAAC;IAEtC,MAAM,gBAAgB,GAAG,WAAW,CAAC,GAAG,CAAC,CAAC,OAAyB,EAAE,EAAE,CAAC,CAAC;QACvE,EAAE,EAAE,OAAO,CAAC,EAAE;QACd,IAAI,EAAE,OAAO,CAAC,IAAI;QAClB,OAAO,EAAE,OAAO,CAAC,OAAO;QACxB,YAAY,EAAE,OAAO,CAAC,YAAY;QAClC,WAAW,EAAE,OAAO,CAAC,WAAW;QAChC,WAAW,EAAE,OAAO,CAAC,QAAQ,CAAC,WAAW;QACzC,MAAM,EAAE,OAAO,CAAC,QAAQ,CAAC,MAAM;QAC/B,IAAI,EAAE,OAAO,CAAC,QAAQ,CAAC,IAAI;QAC3B,qBAAqB,EAAE,CAAC,CAAC,OAAO,CAAC,kBAAkB;QACnD,uBAAuB,EAAE,OAAO,CAAC,oBAAoB,CAAC,MAAM,GAAG,CAAC;QAChE,wBAAwB,EAAE,OAAO,CAAC,oBAAoB,CAAC,MAAM;QAC7D,oBAAoB,EAAE,OAAO,CAAC,gBAAgB,CAAC,MAAM;QACrD,oBAAoB,EAAE,OAAO,CAAC,gBAAgB,CAAC,MAAM;KACtD,CAAC,CAAC,CAAC;IAEJ,MAAM,OAAO,GAA6B;QACxC,QAAQ,EAAE,gBAAgB;QAC1B,QAAQ,EAAE;YACR,aAAa,EAAE,WAAW,CAAC,MAAM;YACjC,SAAS,EAAE,WAAW,CAAC,GAAG,CAAC,CAAC,CAAmB,EAAE,EAAE,CAAC,CAAC,CAAC,YAAY,CAAC;YACnE,aAAa,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;SACxC;KACF,CAAC;IAEF,MAAM,MAAM,GAA6B;QACvC,IAAI,EAAE,OAAO;QACb,WAAW,EAAE,kBAAkB;QAC/B,YAAY,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;QACtC,QAAQ;QACR,GAAG,EAAE,IAAI,EAAE,kDAAkD;QAC7D,IAAI,EAAE,YAAY,CAAC,OAAO,CAAC;KAC5B,CAAC;IAEF,eAAe;IACf,aAAa,CAAC,GAAG,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,CAAC,GAAG,CAAC,CAAC;IAEhD,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"domain-knowledge-templates.d.ts","sourceRoot":"","sources":["../../../src/templates/domain-knowledge-templates.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"domain-knowledge-templates.d.ts","sourceRoot":"","sources":["../../../src/templates/domain-knowledge-templates.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACL,cAAc,EACd,mBAAmB,EACnB,iBAAiB,EAClB,MAAM,kCAAkC,CAAC;AAM1C,eAAO,MAAM,uBAAuB,EAAE,cAqErC,CAAC;AAMF,eAAO,MAAM,qBAAqB,EAAE,cAoEnC,CAAC;AAMF,eAAO,MAAM,sBAAsB,EAAE,cAsDpC,CAAC;AAMF,eAAO,MAAM,iBAAiB,EAAE,cAuD/B,CAAC;AAMF,eAAO,MAAM,2BAA2B,EAAE,cAuDzC,CAAC;AAMF,eAAO,MAAM,sBAAsB,EAAE,GAAG,CAAC,mBAAmB,EAAE,cAAc,CAM1E,CAAC;AAEH;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,mBAAmB,GAAG,cAAc,GAAG,SAAS,CAEzF;AAED;;GAEG;AACH,wBAAgB,qBAAqB,IAAI,cAAc,EAAE,CAExD;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,mBAAmB,EAAE,GAAG,cAAc,EAAE,CAInF;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,mBAAmB,GAAG,iBAAiB,EAAE,CAGpF;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,mBAAmB,GAAG,OAAO,CAEtE;AAED;;GAEG;AACH,wBAAgB,yBAAyB,CAAC,MAAM,EAAE,mBAAmB,2EAGpE"}
|
|
@@ -18,10 +18,10 @@ export const webApplicationsTemplate = {
|
|
|
18
18
|
'SEO optimization with meta tags and structured data',
|
|
19
19
|
'Progressive Web App (PWA) capabilities for offline functionality',
|
|
20
20
|
'Responsive design principles for multi-device support',
|
|
21
|
-
'Security best practices including CSP and XSS prevention'
|
|
21
|
+
'Security best practices including CSP and XSS prevention',
|
|
22
22
|
],
|
|
23
23
|
priority: 9,
|
|
24
|
-
applicability: ['React', 'Vue', 'Angular', 'Svelte', 'web-framework']
|
|
24
|
+
applicability: ['React', 'Vue', 'Angular', 'Svelte', 'web-framework'],
|
|
25
25
|
},
|
|
26
26
|
{
|
|
27
27
|
category: 'design-patterns',
|
|
@@ -33,10 +33,10 @@ export const webApplicationsTemplate = {
|
|
|
33
33
|
'Custom hooks pattern for reusable stateful logic',
|
|
34
34
|
'Observer pattern for reactive state management',
|
|
35
35
|
'Factory pattern for component creation',
|
|
36
|
-
'Singleton pattern for global state management'
|
|
36
|
+
'Singleton pattern for global state management',
|
|
37
37
|
],
|
|
38
38
|
priority: 8,
|
|
39
|
-
applicability: ['component-based', 'state-management']
|
|
39
|
+
applicability: ['component-based', 'state-management'],
|
|
40
40
|
},
|
|
41
41
|
{
|
|
42
42
|
category: 'anti-patterns',
|
|
@@ -47,10 +47,10 @@ export const webApplicationsTemplate = {
|
|
|
47
47
|
'Inline styles without CSS-in-JS or CSS modules',
|
|
48
48
|
'Uncontrolled state mutations in Redux',
|
|
49
49
|
'Memory leaks from unremoved event listeners',
|
|
50
|
-
'Blocking the main thread with heavy computations'
|
|
50
|
+
'Blocking the main thread with heavy computations',
|
|
51
51
|
],
|
|
52
52
|
priority: 7,
|
|
53
|
-
applicability: ['React', 'Vue', 'Angular']
|
|
53
|
+
applicability: ['React', 'Vue', 'Angular'],
|
|
54
54
|
},
|
|
55
55
|
{
|
|
56
56
|
category: 'performance-considerations',
|
|
@@ -61,19 +61,19 @@ export const webApplicationsTemplate = {
|
|
|
61
61
|
'Service worker implementation for caching',
|
|
62
62
|
'Database query optimization for API endpoints',
|
|
63
63
|
'CDN usage for static asset delivery',
|
|
64
|
-
'Compression (gzip/brotli) for reduced payload sizes'
|
|
64
|
+
'Compression (gzip/brotli) for reduced payload sizes',
|
|
65
65
|
],
|
|
66
66
|
priority: 8,
|
|
67
|
-
applicability: ['performance', 'optimization']
|
|
68
|
-
}
|
|
67
|
+
applicability: ['performance', 'optimization'],
|
|
68
|
+
},
|
|
69
69
|
],
|
|
70
70
|
metadata: {
|
|
71
71
|
version: '1.0.0',
|
|
72
72
|
author: 'MCP ADR Analysis Server',
|
|
73
73
|
lastUpdated: '2024-01-01',
|
|
74
74
|
description: 'Comprehensive web application architectural knowledge',
|
|
75
|
-
tags: ['web', 'frontend', 'spa', 'pwa']
|
|
76
|
-
}
|
|
75
|
+
tags: ['web', 'frontend', 'spa', 'pwa'],
|
|
76
|
+
},
|
|
77
77
|
};
|
|
78
78
|
// ============================================================================
|
|
79
79
|
// Microservices Domain Template
|
|
@@ -91,10 +91,10 @@ export const microservicesTemplate = {
|
|
|
91
91
|
'Distributed tracing for observability',
|
|
92
92
|
'Service mesh for inter-service communication',
|
|
93
93
|
'Database per service pattern',
|
|
94
|
-
'Saga pattern for distributed transactions'
|
|
94
|
+
'Saga pattern for distributed transactions',
|
|
95
95
|
],
|
|
96
96
|
priority: 10,
|
|
97
|
-
applicability: ['distributed-systems', 'microservices']
|
|
97
|
+
applicability: ['distributed-systems', 'microservices'],
|
|
98
98
|
},
|
|
99
99
|
{
|
|
100
100
|
category: 'design-patterns',
|
|
@@ -105,10 +105,10 @@ export const microservicesTemplate = {
|
|
|
105
105
|
'Strangler Fig pattern for legacy migration',
|
|
106
106
|
'Event sourcing for audit trails',
|
|
107
107
|
'CQRS for read/write separation',
|
|
108
|
-
'Sidecar pattern for cross-cutting concerns'
|
|
108
|
+
'Sidecar pattern for cross-cutting concerns',
|
|
109
109
|
],
|
|
110
110
|
priority: 9,
|
|
111
|
-
applicability: ['microservices', 'distributed-patterns']
|
|
111
|
+
applicability: ['microservices', 'distributed-patterns'],
|
|
112
112
|
},
|
|
113
113
|
{
|
|
114
114
|
category: 'anti-patterns',
|
|
@@ -119,10 +119,10 @@ export const microservicesTemplate = {
|
|
|
119
119
|
'Synchronous communication for all interactions',
|
|
120
120
|
'Lack of proper service boundaries',
|
|
121
121
|
'Missing distributed tracing and monitoring',
|
|
122
|
-
'Inadequate error handling and retries'
|
|
122
|
+
'Inadequate error handling and retries',
|
|
123
123
|
],
|
|
124
124
|
priority: 8,
|
|
125
|
-
applicability: ['microservices', 'distributed-systems']
|
|
125
|
+
applicability: ['microservices', 'distributed-systems'],
|
|
126
126
|
},
|
|
127
127
|
{
|
|
128
128
|
category: 'security-guidelines',
|
|
@@ -133,19 +133,19 @@ export const microservicesTemplate = {
|
|
|
133
133
|
'Input validation at service boundaries',
|
|
134
134
|
'Secrets management with dedicated tools',
|
|
135
135
|
'Network segmentation and firewalls',
|
|
136
|
-
'Regular security audits and penetration testing'
|
|
136
|
+
'Regular security audits and penetration testing',
|
|
137
137
|
],
|
|
138
138
|
priority: 9,
|
|
139
|
-
applicability: ['security', 'microservices']
|
|
140
|
-
}
|
|
139
|
+
applicability: ['security', 'microservices'],
|
|
140
|
+
},
|
|
141
141
|
],
|
|
142
142
|
metadata: {
|
|
143
143
|
version: '1.0.0',
|
|
144
144
|
author: 'MCP ADR Analysis Server',
|
|
145
145
|
lastUpdated: '2024-01-01',
|
|
146
146
|
description: 'Microservices architecture patterns and practices',
|
|
147
|
-
tags: ['microservices', 'distributed-systems', 'scalability']
|
|
148
|
-
}
|
|
147
|
+
tags: ['microservices', 'distributed-systems', 'scalability'],
|
|
148
|
+
},
|
|
149
149
|
};
|
|
150
150
|
// ============================================================================
|
|
151
151
|
// Database Design Domain Template
|
|
@@ -163,10 +163,10 @@ export const databaseDesignTemplate = {
|
|
|
163
163
|
'Database sharding for horizontal scaling',
|
|
164
164
|
'Read replicas for improved read performance',
|
|
165
165
|
'Regular backup and disaster recovery planning',
|
|
166
|
-
'Data encryption at rest and in transit'
|
|
166
|
+
'Data encryption at rest and in transit',
|
|
167
167
|
],
|
|
168
168
|
priority: 9,
|
|
169
|
-
applicability: ['relational-database', 'sql']
|
|
169
|
+
applicability: ['relational-database', 'sql'],
|
|
170
170
|
},
|
|
171
171
|
{
|
|
172
172
|
category: 'design-patterns',
|
|
@@ -177,10 +177,10 @@ export const databaseDesignTemplate = {
|
|
|
177
177
|
'Data Mapper pattern for domain isolation',
|
|
178
178
|
'Command Query Responsibility Segregation (CQRS)',
|
|
179
179
|
'Event sourcing for audit and replay capabilities',
|
|
180
|
-
'Polyglot persistence for different data needs'
|
|
180
|
+
'Polyglot persistence for different data needs',
|
|
181
181
|
],
|
|
182
182
|
priority: 8,
|
|
183
|
-
applicability: ['data-access', 'orm']
|
|
183
|
+
applicability: ['data-access', 'orm'],
|
|
184
184
|
},
|
|
185
185
|
{
|
|
186
186
|
category: 'performance-considerations',
|
|
@@ -191,19 +191,19 @@ export const databaseDesignTemplate = {
|
|
|
191
191
|
'Caching layers (Redis, Memcached)',
|
|
192
192
|
'Database connection optimization',
|
|
193
193
|
'Batch processing for bulk operations',
|
|
194
|
-
'Monitoring and alerting for performance metrics'
|
|
194
|
+
'Monitoring and alerting for performance metrics',
|
|
195
195
|
],
|
|
196
196
|
priority: 9,
|
|
197
|
-
applicability: ['performance', 'optimization']
|
|
198
|
-
}
|
|
197
|
+
applicability: ['performance', 'optimization'],
|
|
198
|
+
},
|
|
199
199
|
],
|
|
200
200
|
metadata: {
|
|
201
201
|
version: '1.0.0',
|
|
202
202
|
author: 'MCP ADR Analysis Server',
|
|
203
203
|
lastUpdated: '2024-01-01',
|
|
204
204
|
description: 'Database design patterns and optimization strategies',
|
|
205
|
-
tags: ['database', 'sql', 'nosql', 'performance']
|
|
206
|
-
}
|
|
205
|
+
tags: ['database', 'sql', 'nosql', 'performance'],
|
|
206
|
+
},
|
|
207
207
|
};
|
|
208
208
|
// ============================================================================
|
|
209
209
|
// API Design Domain Template
|
|
@@ -221,10 +221,10 @@ export const apiDesignTemplate = {
|
|
|
221
221
|
'Comprehensive API documentation with OpenAPI',
|
|
222
222
|
'Input validation and sanitization',
|
|
223
223
|
'Rate limiting and throttling mechanisms',
|
|
224
|
-
'CORS configuration for cross-origin requests'
|
|
224
|
+
'CORS configuration for cross-origin requests',
|
|
225
225
|
],
|
|
226
226
|
priority: 10,
|
|
227
|
-
applicability: ['rest-api', 'web-api']
|
|
227
|
+
applicability: ['rest-api', 'web-api'],
|
|
228
228
|
},
|
|
229
229
|
{
|
|
230
230
|
category: 'design-patterns',
|
|
@@ -236,10 +236,10 @@ export const apiDesignTemplate = {
|
|
|
236
236
|
'Bulk operations for efficiency',
|
|
237
237
|
'Webhook patterns for event notifications',
|
|
238
238
|
'GraphQL for flexible data fetching',
|
|
239
|
-
'API Gateway pattern for centralized management'
|
|
239
|
+
'API Gateway pattern for centralized management',
|
|
240
240
|
],
|
|
241
241
|
priority: 9,
|
|
242
|
-
applicability: ['api-design', 'rest', 'graphql']
|
|
242
|
+
applicability: ['api-design', 'rest', 'graphql'],
|
|
243
243
|
},
|
|
244
244
|
{
|
|
245
245
|
category: 'security-guidelines',
|
|
@@ -250,19 +250,19 @@ export const apiDesignTemplate = {
|
|
|
250
250
|
'HTTPS enforcement for all endpoints',
|
|
251
251
|
'CORS policy configuration',
|
|
252
252
|
'Rate limiting to prevent abuse',
|
|
253
|
-
'API security testing and vulnerability scanning'
|
|
253
|
+
'API security testing and vulnerability scanning',
|
|
254
254
|
],
|
|
255
255
|
priority: 9,
|
|
256
|
-
applicability: ['api-security', 'authentication']
|
|
257
|
-
}
|
|
256
|
+
applicability: ['api-security', 'authentication'],
|
|
257
|
+
},
|
|
258
258
|
],
|
|
259
259
|
metadata: {
|
|
260
260
|
version: '1.0.0',
|
|
261
261
|
author: 'MCP ADR Analysis Server',
|
|
262
262
|
lastUpdated: '2024-01-01',
|
|
263
263
|
description: 'API design patterns and security best practices',
|
|
264
|
-
tags: ['api', 'rest', 'graphql', 'security']
|
|
265
|
-
}
|
|
264
|
+
tags: ['api', 'rest', 'graphql', 'security'],
|
|
265
|
+
},
|
|
266
266
|
};
|
|
267
267
|
// ============================================================================
|
|
268
268
|
// Cloud Infrastructure Domain Template
|
|
@@ -280,10 +280,10 @@ export const cloudInfrastructureTemplate = {
|
|
|
280
280
|
'Security groups and network access controls',
|
|
281
281
|
'Regular backup and disaster recovery testing',
|
|
282
282
|
'Monitoring and alerting for all resources',
|
|
283
|
-
'Tagging strategy for resource management'
|
|
283
|
+
'Tagging strategy for resource management',
|
|
284
284
|
],
|
|
285
285
|
priority: 9,
|
|
286
|
-
applicability: ['aws', 'azure', 'gcp', 'cloud']
|
|
286
|
+
applicability: ['aws', 'azure', 'gcp', 'cloud'],
|
|
287
287
|
},
|
|
288
288
|
{
|
|
289
289
|
category: 'design-patterns',
|
|
@@ -295,10 +295,10 @@ export const cloudInfrastructureTemplate = {
|
|
|
295
295
|
'Load balancing for traffic distribution',
|
|
296
296
|
'Content Delivery Network (CDN) usage',
|
|
297
297
|
'Serverless architecture with Functions as a Service',
|
|
298
|
-
'Container orchestration with Kubernetes'
|
|
298
|
+
'Container orchestration with Kubernetes',
|
|
299
299
|
],
|
|
300
300
|
priority: 8,
|
|
301
|
-
applicability: ['deployment', 'scalability']
|
|
301
|
+
applicability: ['deployment', 'scalability'],
|
|
302
302
|
},
|
|
303
303
|
{
|
|
304
304
|
category: 'security-guidelines',
|
|
@@ -309,19 +309,19 @@ export const cloudInfrastructureTemplate = {
|
|
|
309
309
|
'Security scanning and compliance monitoring',
|
|
310
310
|
'Secrets management with dedicated services',
|
|
311
311
|
'Regular security audits and penetration testing',
|
|
312
|
-
'Incident response and security playbooks'
|
|
312
|
+
'Incident response and security playbooks',
|
|
313
313
|
],
|
|
314
314
|
priority: 10,
|
|
315
|
-
applicability: ['cloud-security', 'compliance']
|
|
316
|
-
}
|
|
315
|
+
applicability: ['cloud-security', 'compliance'],
|
|
316
|
+
},
|
|
317
317
|
],
|
|
318
318
|
metadata: {
|
|
319
319
|
version: '1.0.0',
|
|
320
320
|
author: 'MCP ADR Analysis Server',
|
|
321
321
|
lastUpdated: '2024-01-01',
|
|
322
322
|
description: 'Cloud infrastructure patterns and security practices',
|
|
323
|
-
tags: ['cloud', 'infrastructure', 'aws', 'azure', 'gcp']
|
|
324
|
-
}
|
|
323
|
+
tags: ['cloud', 'infrastructure', 'aws', 'azure', 'gcp'],
|
|
324
|
+
},
|
|
325
325
|
};
|
|
326
326
|
// ============================================================================
|
|
327
327
|
// Template Registry and Utilities
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"domain-knowledge-templates.js","sourceRoot":"","sources":["../../../src/templates/domain-knowledge-templates.ts"],"names":[],"mappings":"AAAA;;;GAGG;
|
|
1
|
+
{"version":3,"file":"domain-knowledge-templates.js","sourceRoot":"","sources":["../../../src/templates/domain-knowledge-templates.ts"],"names":[],"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MAA2B;IACnE,MAAM,QAAQ,GAAG,iBAAiB,CAAC,MAAM,CAAC,CAAC;IAC3C,OAAO,QAAQ,EAAE,QAAQ,CAAC;AAC5B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"adr-bootstrap-validation-tool.d.ts","sourceRoot":"","sources":["../../../src/tools/adr-bootstrap-validation-tool.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;
|
|
1
|
+
{"version":3,"file":"adr-bootstrap-validation-tool.d.ts","sourceRoot":"","sources":["../../../src/tools/adr-bootstrap-validation-tool.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AAOvE;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,WAAW,GAAG,UAAU,GAAG,MAAM,CAAC;IAC9C,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,iBAAiB,CAAC,EAAE,MAAM,EAAE,CAAC;CAC9B;AAED;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,eAAe,EAAE,MAAM,CAAC;IACxB,QAAQ,EAAE,UAAU,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,CAAC;CACrD;AAED;;;;GAIG;AACH,wBAAsB,2BAA2B,CAAC,IAAI,EAAE;IACtD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,WAAW,GAAG,UAAU,GAAG,MAAM,CAAC;IAC/C,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,iBAAiB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC7B,wBAAwB,CAAC,EAAE,OAAO,CAAC;IACnC,mBAAmB,CAAC,EAAE,mBAAmB,CAAC;CAC3C,GAAG,OAAO,CAAC,GAAG,CAAC,CAsYf;AA26BD,eAAe,2BAA2B,CAAC"}
|
|
@@ -6,6 +6,9 @@
|
|
|
6
6
|
import { McpAdrError } from '../types/index.js';
|
|
7
7
|
import { TreeSitterAnalyzer } from '../utils/tree-sitter-analyzer.js';
|
|
8
8
|
import { findRelatedCode } from '../utils/file-system.js';
|
|
9
|
+
import { detectPlatforms } from '../utils/platform-detector.js';
|
|
10
|
+
import { getPattern } from '../utils/validated-pattern-definitions.js';
|
|
11
|
+
import { generatePatternResearchReport } from '../utils/pattern-research-utility.js';
|
|
9
12
|
/**
|
|
10
13
|
* Generate bootstrap and validation scripts for ADR-compliant deployment
|
|
11
14
|
* This tool tells the LLM HOW to create deployment scripts that validate
|
|
@@ -16,9 +19,66 @@ export async function generateAdrBootstrapScripts(args) {
|
|
|
16
19
|
// conversationContext is available but not used currently
|
|
17
20
|
} = args;
|
|
18
21
|
try {
|
|
22
|
+
// STEP 0: Detect platform using Validated Patterns framework
|
|
23
|
+
console.log('🔍 Detecting platform type using Validated Patterns...');
|
|
24
|
+
const platformDetection = await detectPlatforms(projectPath);
|
|
25
|
+
console.log(`📋 Platform detection complete (confidence: ${(platformDetection.confidence * 100).toFixed(0)}%)`, {
|
|
26
|
+
primaryPlatform: platformDetection.primaryPlatform,
|
|
27
|
+
detectedPlatforms: platformDetection.detectedPlatforms.map(p => p.type),
|
|
28
|
+
});
|
|
29
|
+
// STEP 0.1: Get validated pattern and generate research report
|
|
30
|
+
let validatedPattern = null;
|
|
31
|
+
let patternResearchReport = null;
|
|
32
|
+
let baseRepoGuidance = '';
|
|
33
|
+
if (platformDetection.primaryPlatform) {
|
|
34
|
+
validatedPattern = getPattern(platformDetection.primaryPlatform);
|
|
35
|
+
if (validatedPattern) {
|
|
36
|
+
console.log(`✅ Loaded validated pattern: ${validatedPattern.name}`);
|
|
37
|
+
// Generate research report with base code repository guidance
|
|
38
|
+
patternResearchReport = generatePatternResearchReport(platformDetection.primaryPlatform);
|
|
39
|
+
// Create specific guidance about the base code repository
|
|
40
|
+
baseRepoGuidance = `
|
|
41
|
+
|
|
42
|
+
## 🎯 VALIDATED PATTERN INTEGRATION (CRITICAL)
|
|
43
|
+
|
|
44
|
+
**Platform Detected**: ${platformDetection.primaryPlatform.toUpperCase()}
|
|
45
|
+
**Base Code Repository**: ${validatedPattern.baseCodeRepository.url}
|
|
46
|
+
|
|
47
|
+
### Integration Instructions:
|
|
48
|
+
${validatedPattern.baseCodeRepository.integrationInstructions}
|
|
49
|
+
|
|
50
|
+
### Required Files:
|
|
51
|
+
${validatedPattern.baseCodeRepository.requiredFiles.map((f, i) => `${i + 1}. \`${f}\``).join('\n')}
|
|
52
|
+
|
|
53
|
+
${validatedPattern.baseCodeRepository.scriptEntrypoint
|
|
54
|
+
? `### Bootstrap Entry Point:
|
|
55
|
+
Your bootstrap.sh should call: \`${validatedPattern.baseCodeRepository.scriptEntrypoint}\`
|
|
56
|
+
`
|
|
57
|
+
: ''}
|
|
58
|
+
|
|
59
|
+
**⚠️ IMPORTANT**: Before generating scripts, use WebFetch to query:
|
|
60
|
+
1. **Base Repository**: ${validatedPattern.baseCodeRepository.url}
|
|
61
|
+
2. **Documentation**: ${validatedPattern.authoritativeSources.find(s => s.type === 'documentation')?.url || 'N/A'}
|
|
62
|
+
|
|
63
|
+
Then merge the base repository into your project and customize for your needs.
|
|
64
|
+
|
|
65
|
+
---
|
|
66
|
+
`;
|
|
67
|
+
console.log('📚 Generated research report with base code repository guidance');
|
|
68
|
+
console.log(`⚠️ CRITICAL: LLM should merge ${validatedPattern.baseCodeRepository.url} before generating scripts`);
|
|
69
|
+
// Log the research report for debugging (can be removed if not needed)
|
|
70
|
+
console.log('[DEBUG] Pattern Research Report Generated:', patternResearchReport ? 'YES' : 'NO');
|
|
71
|
+
}
|
|
72
|
+
else {
|
|
73
|
+
console.warn(`No validated pattern found for ${platformDetection.primaryPlatform}, generating generic scripts`);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
19
76
|
// Discover ADRs in the target project
|
|
20
77
|
const { discoverAdrsInDirectory } = await import('../utils/adr-discovery.js');
|
|
21
|
-
const discoveryResult = await discoverAdrsInDirectory(adrDirectory,
|
|
78
|
+
const discoveryResult = await discoverAdrsInDirectory(adrDirectory, projectPath, {
|
|
79
|
+
includeContent: true,
|
|
80
|
+
includeTimeline: false,
|
|
81
|
+
});
|
|
22
82
|
// Smart Code Linking - Find related implementation files
|
|
23
83
|
let relatedCodeAnalysis = '';
|
|
24
84
|
let relatedFiles = [];
|
|
@@ -140,7 +200,8 @@ ${codeAnalysisResults.violations.map((violation) => `- **${violation.adrTitle}**
|
|
|
140
200
|
}
|
|
141
201
|
}
|
|
142
202
|
// Generate bootstrap.sh script
|
|
143
|
-
const bootstrapScript = generateBootstrapScript(complianceChecks, projectPath, includeTests, includeDeployment, customValidations
|
|
203
|
+
const bootstrapScript = generateBootstrapScript(complianceChecks, projectPath, includeTests, includeDeployment, customValidations, validatedPattern // Pass validated pattern for pattern-aware script generation
|
|
204
|
+
);
|
|
144
205
|
// Generate validate_bootstrap.sh script
|
|
145
206
|
const validationScript = generateValidationScript(complianceChecks, projectPath, discoveryResult.adrs);
|
|
146
207
|
const response = {
|
|
@@ -151,6 +212,8 @@ ${codeAnalysisResults.violations.map((violation) => `- **${violation.adrTitle}**
|
|
|
151
212
|
These scripts ensure that code deployed to production follows the architectural decisions documented in ADRs.
|
|
152
213
|
The bootstrap script deploys the code while the validation script verifies ADR compliance.
|
|
153
214
|
|
|
215
|
+
${baseRepoGuidance}
|
|
216
|
+
|
|
154
217
|
## Discovered ADRs (${discoveryResult.totalAdrs} total)
|
|
155
218
|
${discoveryResult.adrs.map(adr => `- ${adr.title} (${adr.status})`).join('\n')}
|
|
156
219
|
|
|
@@ -479,18 +542,165 @@ function determineSeverity(text) {
|
|
|
479
542
|
}
|
|
480
543
|
/**
|
|
481
544
|
* Generate bootstrap.sh script content
|
|
545
|
+
* If validatedPattern is provided, generates a script that calls the pattern's scripts
|
|
546
|
+
* Otherwise, generates standalone deployment script
|
|
482
547
|
*/
|
|
483
|
-
function generateBootstrapScript(checks, projectPath, includeTests, includeDeployment, customValidations) {
|
|
548
|
+
function generateBootstrapScript(checks, projectPath, includeTests, includeDeployment, customValidations, validatedPattern = null) {
|
|
549
|
+
// If we have a validated pattern, generate a script that calls its scripts
|
|
550
|
+
const hasValidatedPattern = validatedPattern && validatedPattern.baseCodeRepository.scriptEntrypoint;
|
|
551
|
+
if (hasValidatedPattern) {
|
|
552
|
+
const baseRepo = validatedPattern.baseCodeRepository;
|
|
553
|
+
return `#!/bin/bash
|
|
554
|
+
# ADR Bootstrap Deployment Script with Validated Pattern Integration
|
|
555
|
+
# Generated by MCP ADR Analysis Server
|
|
556
|
+
# Purpose: Deploy code using validated ${validatedPattern.name} pattern
|
|
557
|
+
|
|
558
|
+
set -e # Exit on error
|
|
559
|
+
|
|
560
|
+
echo "🚀 ADR Bootstrap Deployment Starting..."
|
|
561
|
+
echo "📍 Project: ${projectPath}"
|
|
562
|
+
echo "🎯 Pattern: ${validatedPattern.name}"
|
|
563
|
+
echo "📦 Base Repository: ${baseRepo.url}"
|
|
564
|
+
echo "📋 ADR Compliance Checks: ${checks.length}"
|
|
565
|
+
echo ""
|
|
566
|
+
|
|
567
|
+
# Color codes for output
|
|
568
|
+
RED='\\033[0;31m'
|
|
569
|
+
GREEN='\\033[0;32m'
|
|
570
|
+
YELLOW='\\033[1;33m'
|
|
571
|
+
BLUE='\\033[0;34m'
|
|
572
|
+
NC='\\033[0m' # No Color
|
|
573
|
+
|
|
574
|
+
# Track deployment status
|
|
575
|
+
DEPLOYMENT_SUCCESS=true
|
|
576
|
+
FAILED_CHECKS=()
|
|
577
|
+
|
|
578
|
+
echo -e "\${BLUE}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\${NC}"
|
|
579
|
+
echo -e "\${BLUE}Phase 0: Validated Pattern Integration Check\${NC}"
|
|
580
|
+
echo -e "\${BLUE}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\${NC}"
|
|
581
|
+
echo ""
|
|
582
|
+
|
|
583
|
+
# Check if base repository code is present
|
|
584
|
+
${baseRepo.requiredFiles
|
|
585
|
+
.map((file, i) => `
|
|
586
|
+
echo -n " [${i + 1}/${baseRepo.requiredFiles.length}] Checking for ${file}... "
|
|
587
|
+
if [ -e "${file}" ]; then
|
|
588
|
+
echo -e "\${GREEN}✓\${NC}"
|
|
589
|
+
else
|
|
590
|
+
echo -e "\${RED}✗ MISSING\${NC}"
|
|
591
|
+
echo ""
|
|
592
|
+
echo -e "\${RED}ERROR: Required file '${file}' from validated pattern not found!\${NC}"
|
|
593
|
+
echo ""
|
|
594
|
+
echo "To fix this:"
|
|
595
|
+
echo " 1. Clone/merge base repository: ${baseRepo.url}"
|
|
596
|
+
echo " 2. Follow integration instructions:"
|
|
597
|
+
echo " ${baseRepo.integrationInstructions.split('.').slice(0, 2).join('.')}"
|
|
598
|
+
echo ""
|
|
599
|
+
exit 1
|
|
600
|
+
fi`)
|
|
601
|
+
.join('')}
|
|
602
|
+
|
|
603
|
+
echo ""
|
|
604
|
+
echo -e "\${GREEN}✅ All validated pattern files present\${NC}"
|
|
605
|
+
echo ""
|
|
606
|
+
|
|
607
|
+
# Function to check ADR compliance
|
|
608
|
+
check_adr_compliance() {
|
|
609
|
+
local adr_id="$1"
|
|
610
|
+
local requirement="$2"
|
|
611
|
+
local command="$3"
|
|
612
|
+
local expected="$4"
|
|
613
|
+
local severity="$5"
|
|
614
|
+
|
|
615
|
+
echo -n " Checking $adr_id: $requirement... "
|
|
616
|
+
|
|
617
|
+
if eval "$command" > /dev/null 2>&1; then
|
|
618
|
+
echo -e "\${GREEN}✓\${NC}"
|
|
619
|
+
return 0
|
|
620
|
+
else
|
|
621
|
+
echo -e "\${RED}✗\${NC}"
|
|
622
|
+
FAILED_CHECKS+=("$adr_id: $requirement [$severity]")
|
|
623
|
+
if [ "$severity" = "critical" ]; then
|
|
624
|
+
DEPLOYMENT_SUCCESS=false
|
|
625
|
+
fi
|
|
626
|
+
return 1
|
|
627
|
+
fi
|
|
628
|
+
}
|
|
629
|
+
|
|
630
|
+
echo -e "\${BLUE}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\${NC}"
|
|
631
|
+
echo -e "\${BLUE}Phase 1: Pre-deployment ADR Validation\${NC}"
|
|
632
|
+
echo -e "\${BLUE}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\${NC}"
|
|
633
|
+
echo ""
|
|
634
|
+
|
|
635
|
+
${checks
|
|
636
|
+
.filter(c => c.severity === 'critical')
|
|
637
|
+
.map(check => `
|
|
638
|
+
check_adr_compliance \\
|
|
639
|
+
"${check.adrId}" \\
|
|
640
|
+
"${check.requirement.substring(0, 50)}..." \\
|
|
641
|
+
"${check.validationCommand}" \\
|
|
642
|
+
"${check.expectedOutcome}" \\
|
|
643
|
+
"${check.severity}"`)
|
|
644
|
+
.join('\n')}
|
|
645
|
+
|
|
646
|
+
if [ "$DEPLOYMENT_SUCCESS" = false ]; then
|
|
647
|
+
echo ""
|
|
648
|
+
echo -e "\${RED}❌ Critical ADR violations found. Deployment aborted.\${NC}"
|
|
649
|
+
exit 1
|
|
650
|
+
fi
|
|
651
|
+
|
|
652
|
+
echo ""
|
|
653
|
+
echo -e "\${GREEN}✅ All critical checks passed\${NC}"
|
|
654
|
+
echo ""
|
|
655
|
+
|
|
656
|
+
echo -e "\${BLUE}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\${NC}"
|
|
657
|
+
echo -e "\${BLUE}Phase 2: Execute Validated Pattern Deployment\${NC}"
|
|
658
|
+
echo -e "\${BLUE}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\${NC}"
|
|
659
|
+
echo ""
|
|
660
|
+
|
|
661
|
+
echo "🎯 Calling validated pattern script: ${baseRepo.scriptEntrypoint}"
|
|
662
|
+
echo ""
|
|
663
|
+
|
|
664
|
+
# Call the validated pattern's deployment script
|
|
665
|
+
if [ -x "${baseRepo.scriptEntrypoint}" ]; then
|
|
666
|
+
${baseRepo.scriptEntrypoint}
|
|
667
|
+
PATTERN_EXIT_CODE=$?
|
|
668
|
+
elif [ -f "${baseRepo.scriptEntrypoint}" ]; then
|
|
669
|
+
bash ${baseRepo.scriptEntrypoint}
|
|
670
|
+
PATTERN_EXIT_CODE=$?
|
|
671
|
+
else
|
|
672
|
+
echo -e "\${RED}ERROR: Pattern script '${baseRepo.scriptEntrypoint}' not found or not executable\${NC}"
|
|
673
|
+
exit 1
|
|
674
|
+
fi
|
|
675
|
+
|
|
676
|
+
if [ $PATTERN_EXIT_CODE -ne 0 ]; then
|
|
677
|
+
echo ""
|
|
678
|
+
echo -e "\${RED}❌ Validated pattern deployment failed with exit code: $PATTERN_EXIT_CODE\${NC}"
|
|
679
|
+
exit $PATTERN_EXIT_CODE
|
|
680
|
+
fi
|
|
681
|
+
|
|
682
|
+
echo ""
|
|
683
|
+
echo -e "\${GREEN}✅ Validated pattern deployment successful\${NC}"
|
|
684
|
+
`;
|
|
685
|
+
}
|
|
686
|
+
// Original standalone script generation (fallback when no validated pattern)
|
|
484
687
|
return `#!/bin/bash
|
|
485
|
-
# ADR Bootstrap Deployment Script
|
|
688
|
+
# ADR Bootstrap Deployment Script (Standalone Mode)
|
|
486
689
|
# Generated by MCP ADR Analysis Server
|
|
487
690
|
# Purpose: Deploy code that follows ADR architectural decisions
|
|
691
|
+
#
|
|
692
|
+
# ⚠️ WARNING: This is a standalone deployment script.
|
|
693
|
+
# Consider integrating a validated pattern for production deployments:
|
|
694
|
+
# - OpenShift: https://github.com/validatedpatterns/common
|
|
695
|
+
# - Kubernetes: https://github.com/kubernetes/examples
|
|
696
|
+
# - Docker: https://github.com/docker/awesome-compose
|
|
488
697
|
|
|
489
698
|
set -e # Exit on error
|
|
490
699
|
|
|
491
700
|
echo "🚀 ADR Bootstrap Deployment Starting..."
|
|
492
701
|
echo "📍 Project: ${projectPath}"
|
|
493
702
|
echo "📋 ADR Compliance Checks: ${checks.length}"
|
|
703
|
+
echo "⚠️ Running in STANDALONE mode (no validated pattern detected)"
|
|
494
704
|
echo ""
|
|
495
705
|
|
|
496
706
|
# Color codes for output
|