mcp-adr-analysis-server 2.1.9 โ 2.1.20
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 +453 -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 +22 -13
- 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
|
@@ -3,18 +3,23 @@
|
|
|
3
3
|
* Implements prompt-driven deployment guidance generation following project patterns
|
|
4
4
|
*/
|
|
5
5
|
import { McpAdrError } from '../types/index.js';
|
|
6
|
+
import { ResearchOrchestrator } from '../utils/research-orchestrator.js';
|
|
6
7
|
/**
|
|
7
8
|
* Generate deployment guidance from ADRs using AI-driven analysis
|
|
8
9
|
*/
|
|
9
10
|
export async function generateDeploymentGuidance(args) {
|
|
10
|
-
const { adrDirectory = 'docs/adrs', environment = 'production', format = 'markdown', projectPath = process.cwd(), includeScripts = true, includeConfigs = true, includeValidation = true, technologyFilter, customRequirements, includeRollback = true, generateFiles = false } = args;
|
|
11
|
+
const { adrDirectory = 'docs/adrs', environment = 'production', format = 'markdown', projectPath = process.cwd(), includeScripts = true, includeConfigs = true, includeValidation = true, technologyFilter, customRequirements, includeRollback = true, generateFiles = false, } = args;
|
|
11
12
|
try {
|
|
12
13
|
// Use existing ADR discovery
|
|
13
14
|
const { discoverAdrsInDirectory } = await import('../utils/adr-discovery.js');
|
|
14
|
-
const discoveryResult = await discoverAdrsInDirectory(adrDirectory,
|
|
15
|
+
const discoveryResult = await discoverAdrsInDirectory(adrDirectory, projectPath, {
|
|
16
|
+
includeContent: true,
|
|
17
|
+
includeTimeline: false,
|
|
18
|
+
});
|
|
15
19
|
if (discoveryResult.adrs.length === 0) {
|
|
16
20
|
return {
|
|
17
|
-
content: [
|
|
21
|
+
content: [
|
|
22
|
+
{
|
|
18
23
|
type: 'text',
|
|
19
24
|
text: `# No ADRs Found for Deployment Guidance
|
|
20
25
|
|
|
@@ -46,10 +51,41 @@ Use Docker containers with docker-compose for orchestration.
|
|
|
46
51
|
- Requires container registry and orchestration setup
|
|
47
52
|
- Port 3000 for application, 5432 for PostgreSQL
|
|
48
53
|
\`\`\`
|
|
49
|
-
|
|
50
|
-
}
|
|
54
|
+
`,
|
|
55
|
+
},
|
|
56
|
+
],
|
|
51
57
|
};
|
|
52
58
|
}
|
|
59
|
+
// Research current deployment environment
|
|
60
|
+
let environmentContext = '';
|
|
61
|
+
try {
|
|
62
|
+
const orchestrator = new ResearchOrchestrator(projectPath, adrDirectory);
|
|
63
|
+
const research = await orchestrator.answerResearchQuestion(`Analyze deployment requirements for ${environment} environment:
|
|
64
|
+
1. What deployment infrastructure is currently available?
|
|
65
|
+
2. What deployment patterns are documented in ADRs?
|
|
66
|
+
3. Are there existing deployment scripts or configurations?
|
|
67
|
+
4. What are the deployment constraints or requirements?`);
|
|
68
|
+
const envSource = research.sources.find(s => s.type === 'environment');
|
|
69
|
+
const capabilities = envSource?.data?.capabilities || [];
|
|
70
|
+
environmentContext = `
|
|
71
|
+
|
|
72
|
+
## ๐ Current Environment Analysis
|
|
73
|
+
|
|
74
|
+
**Research Confidence**: ${(research.confidence * 100).toFixed(1)}%
|
|
75
|
+
|
|
76
|
+
### Available Infrastructure
|
|
77
|
+
${capabilities.length > 0 ? capabilities.map((c) => `- ${c}`).join('\n') : '- No infrastructure tools detected'}
|
|
78
|
+
|
|
79
|
+
### Deployment Context
|
|
80
|
+
${research.answer || 'No specific deployment context found'}
|
|
81
|
+
|
|
82
|
+
### Key Findings
|
|
83
|
+
${research.sources.map(s => `- ${s.type}: Consulted`).join('\n')}
|
|
84
|
+
`;
|
|
85
|
+
}
|
|
86
|
+
catch (error) {
|
|
87
|
+
environmentContext = `\n## โ ๏ธ Environment Analysis Failed\n${error instanceof Error ? error.message : String(error)}\n`;
|
|
88
|
+
}
|
|
53
89
|
// Create comprehensive deployment guidance prompt
|
|
54
90
|
const deploymentPrompt = `
|
|
55
91
|
# Deployment Guidance Generation
|
|
@@ -61,16 +97,19 @@ You are an expert DevOps engineer tasked with creating comprehensive deployment
|
|
|
61
97
|
- **Target Environment**: ${environment}
|
|
62
98
|
- **ADR Directory**: ${adrDirectory}
|
|
63
99
|
- **Total ADRs**: ${discoveryResult.adrs.length}
|
|
100
|
+
${environmentContext}
|
|
64
101
|
|
|
65
102
|
## ADR Content
|
|
66
|
-
${discoveryResult.adrs
|
|
103
|
+
${discoveryResult.adrs
|
|
104
|
+
.map(adr => `
|
|
67
105
|
### ${adr.title} (${adr.filename})
|
|
68
106
|
**Status**: ${adr.status}
|
|
69
107
|
**Content**:
|
|
70
108
|
\`\`\`markdown
|
|
71
109
|
${adr.content?.slice(0, 1000) || 'No content available'}${adr.content && adr.content.length > 1000 ? '...' : ''}
|
|
72
110
|
\`\`\`
|
|
73
|
-
`)
|
|
111
|
+
`)
|
|
112
|
+
.join('\n')}
|
|
74
113
|
|
|
75
114
|
## Deployment Analysis Instructions
|
|
76
115
|
|
|
@@ -94,16 +133,20 @@ Extract specific configuration details:
|
|
|
94
133
|
|
|
95
134
|
### 3. **Environment-Specific Considerations**
|
|
96
135
|
For **${environment}** environment:
|
|
97
|
-
${environment === 'production'
|
|
136
|
+
${environment === 'production'
|
|
137
|
+
? `
|
|
98
138
|
- **Security**: TLS certificates, secure connections, secrets management
|
|
99
139
|
- **Performance**: Load balancing, caching, optimization
|
|
100
140
|
- **Reliability**: Backup procedures, monitoring, alerting
|
|
101
141
|
- **Scalability**: Auto-scaling, resource allocation
|
|
102
|
-
`
|
|
142
|
+
`
|
|
143
|
+
: environment === 'staging'
|
|
144
|
+
? `
|
|
103
145
|
- **Testing**: Staging-specific configurations
|
|
104
146
|
- **Data**: Test data setup, database seeding
|
|
105
147
|
- **Integration**: External service connections
|
|
106
|
-
`
|
|
148
|
+
`
|
|
149
|
+
: `
|
|
107
150
|
- **Development**: Hot-reload, debugging, local services
|
|
108
151
|
- **Convenience**: Simplified setup, development tools
|
|
109
152
|
`}
|
|
@@ -117,30 +160,80 @@ Create step-by-step deployment instructions:
|
|
|
117
160
|
5. **Service Configuration**: Web server, load balancer, SSL
|
|
118
161
|
6. **Verification**: Health checks, smoke tests, monitoring
|
|
119
162
|
|
|
120
|
-
|
|
163
|
+
**IMPORTANT**: Include visual diagrams in your deployment guidance using mermaid syntax:
|
|
164
|
+
|
|
165
|
+
#### Required Diagrams:
|
|
166
|
+
|
|
167
|
+
1. **Deployment Sequence Diagram** - Show the flow from ADRs โ Scripts โ Environment
|
|
168
|
+
\`\`\`mermaid
|
|
169
|
+
sequenceDiagram
|
|
170
|
+
participant User as Developer
|
|
171
|
+
participant Tool as Deployment Tool
|
|
172
|
+
participant ADR as ADR Documents
|
|
173
|
+
participant Script as Deploy Scripts
|
|
174
|
+
participant Env as ${environment.charAt(0).toUpperCase() + environment.slice(1)} Environment
|
|
175
|
+
|
|
176
|
+
User->>Tool: Generate deployment guidance
|
|
177
|
+
Tool->>ADR: Read architectural decisions
|
|
178
|
+
ADR-->>Tool: Technology stack & configs
|
|
179
|
+
Tool->>Script: Generate deploy scripts
|
|
180
|
+
Script->>Env: Deploy components
|
|
181
|
+
Env-->>Script: Deployment status
|
|
182
|
+
Script-->>User: Success & validation steps
|
|
183
|
+
\`\`\`
|
|
184
|
+
|
|
185
|
+
2. **Deployment Workflow Diagram** - Show the phase-by-phase deployment process
|
|
186
|
+
\`\`\`mermaid
|
|
187
|
+
flowchart TD
|
|
188
|
+
Start([Start Deployment]) --> Detect[Detect Platform from ADRs]
|
|
189
|
+
Detect --> LoadADR[Read Technology Decisions]
|
|
190
|
+
LoadADR --> GenScripts[Generate Deploy Scripts]
|
|
191
|
+
GenScripts --> Phase1[Prerequisites Validation]
|
|
192
|
+
Phase1 --> Phase2[Infrastructure Setup]
|
|
193
|
+
Phase2 --> Phase3[Database Deployment]
|
|
194
|
+
Phase3 --> Phase4[Application Deployment]
|
|
195
|
+
Phase4 --> Validate{Validation<br/>Passed?}
|
|
196
|
+
Validate -->|No| Fix[Auto-fix Issues]
|
|
197
|
+
Fix --> Phase4
|
|
198
|
+
Validate -->|Yes| Success([โ
Deployment Success])
|
|
199
|
+
|
|
200
|
+
style Start fill:#e1f5ff
|
|
201
|
+
style Success fill:#d4edda
|
|
202
|
+
style Fix fill:#f8d7da
|
|
203
|
+
\`\`\`
|
|
204
|
+
|
|
205
|
+
Include these diagrams in the appropriate sections of your deployment guidance.
|
|
206
|
+
|
|
207
|
+
${includeScripts
|
|
208
|
+
? `
|
|
121
209
|
### 5. **Script Generation**
|
|
122
210
|
Generate deployment scripts:
|
|
123
211
|
- **Shell scripts** for automated deployment
|
|
124
212
|
- **Docker commands** for containerized deployment
|
|
125
213
|
- **Configuration files** (nginx.conf, docker-compose.yml, .env)
|
|
126
|
-
`
|
|
214
|
+
`
|
|
215
|
+
: ''}
|
|
127
216
|
|
|
128
|
-
${includeValidation
|
|
217
|
+
${includeValidation
|
|
218
|
+
? `
|
|
129
219
|
### 6. **Validation & Health Checks**
|
|
130
220
|
Create verification procedures:
|
|
131
221
|
- **Health check endpoints** and commands
|
|
132
222
|
- **Service connectivity tests**
|
|
133
223
|
- **Performance validation**
|
|
134
224
|
- **Security verification**
|
|
135
|
-
`
|
|
225
|
+
`
|
|
226
|
+
: ''}
|
|
136
227
|
|
|
137
|
-
${includeRollback
|
|
228
|
+
${includeRollback
|
|
229
|
+
? `
|
|
138
230
|
### 7. **Rollback Procedures**
|
|
139
231
|
Document rollback steps:
|
|
140
232
|
- **Rollback commands** in reverse order
|
|
141
233
|
- **Data migration rollback** if applicable
|
|
142
234
|
- **Service restoration** procedures
|
|
143
|
-
`
|
|
235
|
+
`
|
|
236
|
+
: ''}
|
|
144
237
|
|
|
145
238
|
## Output Format
|
|
146
239
|
|
|
@@ -219,22 +312,27 @@ KEY=value
|
|
|
219
312
|
- **Complete**: Cover entire deployment lifecycle
|
|
220
313
|
- **Evidence-based**: Base all recommendations on ADR content
|
|
221
314
|
|
|
222
|
-
${technologyFilter && technologyFilter.length > 0
|
|
315
|
+
${technologyFilter && technologyFilter.length > 0
|
|
316
|
+
? `
|
|
223
317
|
## Technology Filter
|
|
224
318
|
Focus only on these technologies: ${technologyFilter.join(', ')}
|
|
225
|
-
`
|
|
319
|
+
`
|
|
320
|
+
: ''}
|
|
226
321
|
|
|
227
|
-
${customRequirements && customRequirements.length > 0
|
|
322
|
+
${customRequirements && customRequirements.length > 0
|
|
323
|
+
? `
|
|
228
324
|
## Custom Requirements
|
|
229
325
|
Additionally address these requirements:
|
|
230
326
|
${customRequirements.map(req => `- ${req}`).join('\n')}
|
|
231
|
-
`
|
|
327
|
+
`
|
|
328
|
+
: ''}
|
|
232
329
|
|
|
233
330
|
Begin deployment guidance generation now.
|
|
234
331
|
`;
|
|
235
332
|
// Return the prompt for AI execution
|
|
236
333
|
return {
|
|
237
|
-
content: [
|
|
334
|
+
content: [
|
|
335
|
+
{
|
|
238
336
|
type: 'text',
|
|
239
337
|
text: `# Deployment Guidance Generation
|
|
240
338
|
|
|
@@ -271,15 +369,18 @@ The AI will generate:
|
|
|
271
369
|
|
|
272
370
|
All based on the architectural decisions documented in your ADRs.
|
|
273
371
|
|
|
274
|
-
${generateFiles
|
|
372
|
+
${generateFiles
|
|
373
|
+
? `
|
|
275
374
|
## File Generation Mode
|
|
276
375
|
**Note**: File generation is enabled. The AI guidance will include instructions for creating actual deployment files in your project.
|
|
277
|
-
`
|
|
376
|
+
`
|
|
377
|
+
: ''}
|
|
278
378
|
|
|
279
379
|
## ADR Sources
|
|
280
380
|
${discoveryResult.adrs.map(adr => `- **${adr.title}** (${adr.filename})`).join('\n')}
|
|
281
|
-
|
|
282
|
-
}
|
|
381
|
+
`,
|
|
382
|
+
},
|
|
383
|
+
],
|
|
283
384
|
};
|
|
284
385
|
}
|
|
285
386
|
catch (error) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deployment-guidance-tool.js","sourceRoot":"","sources":["../../../src/tools/deployment-guidance-tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"deployment-guidance-tool.js","sourceRoot":"","sources":["../../../src/tools/deployment-guidance-tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AAEzE;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,0BAA0B,CAAC,IAYhD;IACC,MAAM,EACJ,YAAY,GAAG,WAAW,EAC1B,WAAW,GAAG,YAAY,EAC1B,MAAM,GAAG,UAAU,EACnB,WAAW,GAAG,OAAO,CAAC,GAAG,EAAE,EAC3B,cAAc,GAAG,IAAI,EACrB,cAAc,GAAG,IAAI,EACrB,iBAAiB,GAAG,IAAI,EACxB,gBAAgB,EAChB,kBAAkB,EAClB,eAAe,GAA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AAE,CAAC,OAAO,GAAG,CAAC,KAAK,OAAO,GAAG,CAAC,QAAQ,GAAG,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC;CACnF;iBACQ;aACF;SACF,CAAC;IACJ,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,MAAM,IAAI,WAAW,CACnB,0CAA0C,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,EAClG,2BAA2B,CAC5B,CAAC;IACJ,CAAC;AACH,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deployment-readiness-tool.d.ts","sourceRoot":"","sources":["../../../src/tools/deployment-readiness-tool.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;
|
|
1
|
+
{"version":3,"file":"deployment-readiness-tool.d.ts","sourceRoot":"","sources":["../../../src/tools/deployment-readiness-tool.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AA80BH;;GAEG;AACH,wBAAsB,mBAAmB,CAAC,IAAI,EAAE,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,CA4JjE"}
|
|
@@ -31,6 +31,8 @@ import { MemoryEntityManager } from '../utils/memory-entity-manager.js';
|
|
|
31
31
|
import { EnhancedLogger } from '../utils/enhanced-logging.js';
|
|
32
32
|
import { TreeSitterAnalyzer } from '../utils/tree-sitter-analyzer.js';
|
|
33
33
|
import { findFiles, findRelatedCode } from '../utils/file-system.js';
|
|
34
|
+
import { ResearchOrchestrator } from '../utils/research-orchestrator.js';
|
|
35
|
+
import { MermaidDiagrams } from '../utils/mermaid-diagrams.js';
|
|
34
36
|
// Core schemas
|
|
35
37
|
const DeploymentReadinessSchema = z.object({
|
|
36
38
|
operation: z
|
|
@@ -106,6 +108,15 @@ const DeploymentReadinessSchema = z.object({
|
|
|
106
108
|
.array(z.string())
|
|
107
109
|
.default(['typescript', 'javascript', 'python', 'yaml', 'hcl'])
|
|
108
110
|
.describe('Languages to analyze with tree-sitter'),
|
|
111
|
+
// Research-Driven Integration
|
|
112
|
+
enableResearchIntegration: z
|
|
113
|
+
.boolean()
|
|
114
|
+
.default(true)
|
|
115
|
+
.describe('Use research-orchestrator to verify environment readiness'),
|
|
116
|
+
researchConfidenceThreshold: z
|
|
117
|
+
.number()
|
|
118
|
+
.default(0.7)
|
|
119
|
+
.describe('Minimum confidence for environment research (0-1)'),
|
|
109
120
|
});
|
|
110
121
|
/**
|
|
111
122
|
* Deployment Memory Manager for tracking deployment assessments and patterns
|
|
@@ -1047,10 +1058,74 @@ function analyzeFailurePatterns(failedDeployments) {
|
|
|
1047
1058
|
});
|
|
1048
1059
|
return Array.from(patterns.values());
|
|
1049
1060
|
}
|
|
1061
|
+
/**
|
|
1062
|
+
* Research environment readiness using research-orchestrator
|
|
1063
|
+
*/
|
|
1064
|
+
async function performEnvironmentResearch(args, projectPath) {
|
|
1065
|
+
if (!args.enableResearchIntegration) {
|
|
1066
|
+
return {
|
|
1067
|
+
answer: 'Environment research disabled',
|
|
1068
|
+
confidence: 1.0,
|
|
1069
|
+
sources: [],
|
|
1070
|
+
needsWebSearch: false,
|
|
1071
|
+
warnings: [],
|
|
1072
|
+
};
|
|
1073
|
+
}
|
|
1074
|
+
try {
|
|
1075
|
+
const orchestrator = new ResearchOrchestrator(projectPath, 'docs/adrs');
|
|
1076
|
+
const researchQuestion = `Verify deployment readiness for ${args.targetEnvironment} environment:
|
|
1077
|
+
1. Are required deployment tools available (Docker/Podman, Kubernetes/OpenShift)?
|
|
1078
|
+
2. What is the current infrastructure state and health?
|
|
1079
|
+
3. Are environment configurations present and valid?
|
|
1080
|
+
4. What deployment patterns are documented in ADRs?
|
|
1081
|
+
5. Are there any known deployment blockers or issues?`;
|
|
1082
|
+
const research = await orchestrator.answerResearchQuestion(researchQuestion);
|
|
1083
|
+
const warnings = [];
|
|
1084
|
+
// Check confidence level
|
|
1085
|
+
if (research.confidence < args.researchConfidenceThreshold) {
|
|
1086
|
+
warnings.push(`Research confidence (${(research.confidence * 100).toFixed(1)}%) below threshold (${(args.researchConfidenceThreshold * 100).toFixed(1)}%)`);
|
|
1087
|
+
}
|
|
1088
|
+
// Check if web search is needed
|
|
1089
|
+
if (research.needsWebSearch) {
|
|
1090
|
+
warnings.push('Local environment data insufficient - external research may be needed');
|
|
1091
|
+
}
|
|
1092
|
+
// Check for environment capability availability
|
|
1093
|
+
const hasKubernetes = research.sources.some(s => s.type === 'environment' && s.data?.capabilities?.includes('kubernetes'));
|
|
1094
|
+
const hasDocker = research.sources.some(s => s.type === 'environment' && s.data?.capabilities?.includes('docker'));
|
|
1095
|
+
const hasOpenShift = research.sources.some(s => s.type === 'environment' && s.data?.capabilities?.includes('openshift'));
|
|
1096
|
+
const hasPodman = research.sources.some(s => s.type === 'environment' && s.data?.capabilities?.includes('podman'));
|
|
1097
|
+
if (!hasKubernetes && !hasOpenShift && !hasDocker && !hasPodman) {
|
|
1098
|
+
warnings.push('No container orchestration tools detected - manual deployment verification required');
|
|
1099
|
+
}
|
|
1100
|
+
return {
|
|
1101
|
+
answer: research.answer || 'No environment research results available',
|
|
1102
|
+
confidence: research.confidence,
|
|
1103
|
+
sources: research.sources.map(s => ({
|
|
1104
|
+
type: s.type,
|
|
1105
|
+
found: true, // Sources in array are already found
|
|
1106
|
+
})),
|
|
1107
|
+
needsWebSearch: research.needsWebSearch,
|
|
1108
|
+
warnings,
|
|
1109
|
+
};
|
|
1110
|
+
}
|
|
1111
|
+
catch (error) {
|
|
1112
|
+
return {
|
|
1113
|
+
answer: `Environment research failed: ${error instanceof Error ? error.message : String(error)}`,
|
|
1114
|
+
confidence: 0,
|
|
1115
|
+
sources: [],
|
|
1116
|
+
needsWebSearch: true,
|
|
1117
|
+
warnings: [
|
|
1118
|
+
'Failed to perform environment research - proceeding without environment validation',
|
|
1119
|
+
],
|
|
1120
|
+
};
|
|
1121
|
+
}
|
|
1122
|
+
}
|
|
1050
1123
|
/**
|
|
1051
1124
|
* Perform full audit (all checks)
|
|
1052
1125
|
*/
|
|
1053
1126
|
async function performFullAudit(args, projectPath, historyPath) {
|
|
1127
|
+
// Step 0: Research environment readiness
|
|
1128
|
+
const environmentResearch = await performEnvironmentResearch(args, projectPath);
|
|
1054
1129
|
// Combine all validations
|
|
1055
1130
|
const testResult = await performTestValidation(args, projectPath);
|
|
1056
1131
|
const historyResult = await performDeploymentHistoryAnalysis(args, historyPath);
|
|
@@ -1062,7 +1137,10 @@ async function performFullAudit(args, projectPath, historyPath) {
|
|
|
1062
1137
|
// Discover ADRs in the project
|
|
1063
1138
|
const { discoverAdrsInDirectory } = await import('../utils/adr-discovery.js');
|
|
1064
1139
|
const adrDirectory = 'docs/adrs';
|
|
1065
|
-
const discoveryResult = await discoverAdrsInDirectory(adrDirectory,
|
|
1140
|
+
const discoveryResult = await discoverAdrsInDirectory(adrDirectory, projectPath, {
|
|
1141
|
+
includeContent: true,
|
|
1142
|
+
includeTimeline: false,
|
|
1143
|
+
});
|
|
1066
1144
|
if (discoveryResult.adrs.length > 0) {
|
|
1067
1145
|
// Combine all ADR content for Smart Code Linking analysis
|
|
1068
1146
|
const combinedAdrContent = discoveryResult.adrs
|
|
@@ -1156,17 +1234,43 @@ ${deploymentCriticalFiles.length > 0
|
|
|
1156
1234
|
`;
|
|
1157
1235
|
}
|
|
1158
1236
|
}
|
|
1237
|
+
// Create environment blockers based on research findings
|
|
1238
|
+
const environmentBlockers = [];
|
|
1239
|
+
if (environmentResearch.warnings.length > 0) {
|
|
1240
|
+
environmentResearch.warnings.forEach(warning => {
|
|
1241
|
+
if (warning.includes('threshold') || warning.includes('No container orchestration')) {
|
|
1242
|
+
environmentBlockers.push({
|
|
1243
|
+
category: 'environment',
|
|
1244
|
+
title: 'Environment Readiness Concern',
|
|
1245
|
+
description: warning,
|
|
1246
|
+
severity: warning.includes('No container orchestration') ? 'high' : 'medium',
|
|
1247
|
+
impact: 'May affect deployment execution',
|
|
1248
|
+
resolutionSteps: [
|
|
1249
|
+
'Verify environment tools are installed',
|
|
1250
|
+
'Check environment configurations',
|
|
1251
|
+
'Consult deployment documentation',
|
|
1252
|
+
],
|
|
1253
|
+
estimatedResolutionTime: '30 minutes - 1 hour',
|
|
1254
|
+
blocksDeployment: args.strictMode && warning.includes('No container orchestration'),
|
|
1255
|
+
});
|
|
1256
|
+
}
|
|
1257
|
+
});
|
|
1258
|
+
}
|
|
1159
1259
|
const allBlockers = [
|
|
1160
1260
|
...testResult.criticalBlockers,
|
|
1161
1261
|
...testResult.testFailureBlockers,
|
|
1162
1262
|
...historyResult.deploymentHistoryBlockers,
|
|
1263
|
+
...environmentBlockers,
|
|
1163
1264
|
];
|
|
1164
|
-
|
|
1165
|
-
const
|
|
1265
|
+
// Adjust overall score based on environment research confidence
|
|
1266
|
+
const baseScore = (testResult.overallScore + historyResult.overallScore) / 2;
|
|
1267
|
+
const environmentScore = environmentResearch.confidence * 100;
|
|
1268
|
+
const overallScore = baseScore * 0.7 + environmentScore * 0.3;
|
|
1269
|
+
const isReady = allBlockers.filter(b => b.blocksDeployment).length === 0;
|
|
1166
1270
|
const result = {
|
|
1167
1271
|
isDeploymentReady: isReady,
|
|
1168
1272
|
overallScore,
|
|
1169
|
-
confidence: Math.min(testResult.confidence, historyResult.confidence),
|
|
1273
|
+
confidence: Math.min(testResult.confidence, historyResult.confidence, environmentResearch.confidence * 100),
|
|
1170
1274
|
codeQualityAnalysis: testResult.codeQualityAnalysis,
|
|
1171
1275
|
testValidationResult: testResult.testValidationResult,
|
|
1172
1276
|
deploymentHistoryAnalysis: historyResult.deploymentHistoryAnalysis,
|
|
@@ -1174,12 +1278,13 @@ ${deploymentCriticalFiles.length > 0
|
|
|
1174
1278
|
criticalBlockers: allBlockers.filter(b => b.severity === 'critical'),
|
|
1175
1279
|
testFailureBlockers: testResult.testFailureBlockers,
|
|
1176
1280
|
deploymentHistoryBlockers: historyResult.deploymentHistoryBlockers,
|
|
1177
|
-
warnings: [...testResult.warnings, ...historyResult.warnings],
|
|
1281
|
+
warnings: [...testResult.warnings, ...historyResult.warnings, ...environmentResearch.warnings],
|
|
1178
1282
|
todoTasksCreated: [],
|
|
1179
1283
|
healthScoreUpdate: {},
|
|
1180
1284
|
gitPushStatus: isReady ? 'allowed' : 'blocked',
|
|
1181
1285
|
overrideStatus: {},
|
|
1182
1286
|
smartCodeAnalysis, // Include Smart Code Linking analysis
|
|
1287
|
+
environmentResearch, // Include environment research results
|
|
1183
1288
|
};
|
|
1184
1289
|
return result;
|
|
1185
1290
|
}
|
|
@@ -1367,6 +1472,29 @@ function generateSuccessResponse(result, args) {
|
|
|
1367
1472
|
- **ADRs Analyzed**: ${result.adrComplianceResult.compliantAdrs}/${result.adrComplianceResult.totalAdrs}
|
|
1368
1473
|
- **Missing Implementations**: ${result.adrComplianceResult.missingImplementations.length} items
|
|
1369
1474
|
|
|
1475
|
+
${result.environmentResearch
|
|
1476
|
+
? `
|
|
1477
|
+
## ๐ Environment Research Analysis
|
|
1478
|
+
|
|
1479
|
+
**Research Confidence**: ${(result.environmentResearch.confidence * 100).toFixed(1)}%
|
|
1480
|
+
|
|
1481
|
+
### Infrastructure State
|
|
1482
|
+
${result.environmentResearch.answer}
|
|
1483
|
+
|
|
1484
|
+
### Sources Consulted
|
|
1485
|
+
${result.environmentResearch.sources.map(s => `- ${s.type}: ${s.found ? 'โ
Available' : 'โ Not found'}`).join('\n')}
|
|
1486
|
+
|
|
1487
|
+
${result.environmentResearch.warnings.length > 0
|
|
1488
|
+
? `### Environment Warnings
|
|
1489
|
+
${result.environmentResearch.warnings.map(w => `- โ ๏ธ ${w}`).join('\n')}`
|
|
1490
|
+
: '### Environment Status\nโ
All environment checks passed'}
|
|
1491
|
+
|
|
1492
|
+
${result.environmentResearch.needsWebSearch
|
|
1493
|
+
? 'โ ๏ธ **Note**: Local environment data may be insufficient - consider external verification'
|
|
1494
|
+
: ''}
|
|
1495
|
+
`
|
|
1496
|
+
: ''}
|
|
1497
|
+
|
|
1370
1498
|
${result.smartCodeAnalysis || ''}
|
|
1371
1499
|
|
|
1372
1500
|
## ๐ Deployment Approved
|
|
@@ -1399,6 +1527,16 @@ function generateBlockedResponse(result, args) {
|
|
|
1399
1527
|
- **Fast File Discovery**: โ
Enhanced with fast-glob
|
|
1400
1528
|
- **Smart Code Linking**: ${args.requireAdrCompliance ? 'โ
ADR Analysis Enabled' : 'โ Disabled'}
|
|
1401
1529
|
|
|
1530
|
+
## Deployment Readiness Validation Flow
|
|
1531
|
+
|
|
1532
|
+
The following diagram shows the zero-tolerance validation process:
|
|
1533
|
+
|
|
1534
|
+
${MermaidDiagrams.generateDeploymentReadinessFlow(args.blockOnFailingTests)}
|
|
1535
|
+
|
|
1536
|
+
### Test Validation Pyramid
|
|
1537
|
+
|
|
1538
|
+
${MermaidDiagrams.generateTestValidationPyramid()}
|
|
1539
|
+
|
|
1402
1540
|
## ๐งช Test Validation Issues
|
|
1403
1541
|
${result.testFailureBlockers.length > 0
|
|
1404
1542
|
? `
|
|
@@ -1421,6 +1559,29 @@ ${result.deploymentHistoryAnalysis.failurePatterns.map(p => `- **${p.pattern}**:
|
|
|
1421
1559
|
`
|
|
1422
1560
|
: 'โ
Deployment history stable'}
|
|
1423
1561
|
|
|
1562
|
+
${result.environmentResearch
|
|
1563
|
+
? `
|
|
1564
|
+
## ๐ Environment Research Analysis
|
|
1565
|
+
|
|
1566
|
+
**Research Confidence**: ${(result.environmentResearch.confidence * 100).toFixed(1)}%
|
|
1567
|
+
|
|
1568
|
+
### Infrastructure State
|
|
1569
|
+
${result.environmentResearch.answer}
|
|
1570
|
+
|
|
1571
|
+
### Sources Consulted
|
|
1572
|
+
${result.environmentResearch.sources.map(s => `- ${s.type}: ${s.found ? 'โ
Available' : 'โ Not found'}`).join('\n')}
|
|
1573
|
+
|
|
1574
|
+
${result.environmentResearch.warnings.length > 0
|
|
1575
|
+
? `### Environment Warnings
|
|
1576
|
+
${result.environmentResearch.warnings.map(w => `- โ ๏ธ ${w}`).join('\n')}`
|
|
1577
|
+
: '### Environment Status\nโ
All environment checks passed'}
|
|
1578
|
+
|
|
1579
|
+
${result.environmentResearch.needsWebSearch
|
|
1580
|
+
? 'โ ๏ธ **Note**: Local environment data may be insufficient - consider external verification'
|
|
1581
|
+
: ''}
|
|
1582
|
+
`
|
|
1583
|
+
: ''}
|
|
1584
|
+
|
|
1424
1585
|
${result.smartCodeAnalysis || ''}
|
|
1425
1586
|
|
|
1426
1587
|
## ๐จ Critical Blockers (Must Fix Before Deployment)
|