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,87 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Types for state reinforcement and context injection
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Context reinforcement configuration
|
|
6
|
+
*/
|
|
7
|
+
export interface ContextReinforcementConfig {
|
|
8
|
+
/**
|
|
9
|
+
* Inject context every N turns
|
|
10
|
+
* @default 5
|
|
11
|
+
*/
|
|
12
|
+
turnInterval: number;
|
|
13
|
+
/**
|
|
14
|
+
* Inject context when response exceeds this token count
|
|
15
|
+
* @default 3000
|
|
16
|
+
*/
|
|
17
|
+
tokenThreshold: number;
|
|
18
|
+
/**
|
|
19
|
+
* Include recent knowledge graph intents
|
|
20
|
+
* @default true
|
|
21
|
+
*/
|
|
22
|
+
includeKnowledgeGraphContext: boolean;
|
|
23
|
+
/**
|
|
24
|
+
* Maximum number of recent intents to include
|
|
25
|
+
* @default 3
|
|
26
|
+
*/
|
|
27
|
+
maxRecentIntents: number;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Enriched response with context reinforcement
|
|
31
|
+
*/
|
|
32
|
+
export interface EnrichedResponse {
|
|
33
|
+
/**
|
|
34
|
+
* Original response content
|
|
35
|
+
*/
|
|
36
|
+
originalContent: string;
|
|
37
|
+
/**
|
|
38
|
+
* Enhanced content with context injection
|
|
39
|
+
*/
|
|
40
|
+
enrichedContent: string;
|
|
41
|
+
/**
|
|
42
|
+
* Whether context was injected
|
|
43
|
+
*/
|
|
44
|
+
contextInjected: boolean;
|
|
45
|
+
/**
|
|
46
|
+
* Reason for context injection (turn-based, token-threshold, or none)
|
|
47
|
+
*/
|
|
48
|
+
injectionReason?: 'turn-interval' | 'token-threshold' | 'none';
|
|
49
|
+
/**
|
|
50
|
+
* Token count of original response
|
|
51
|
+
*/
|
|
52
|
+
tokenCount: number;
|
|
53
|
+
/**
|
|
54
|
+
* Current turn number
|
|
55
|
+
*/
|
|
56
|
+
turnNumber: number;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Core context reminder structure
|
|
60
|
+
*/
|
|
61
|
+
export interface CoreContextReminder {
|
|
62
|
+
/**
|
|
63
|
+
* Primary objective reminder
|
|
64
|
+
*/
|
|
65
|
+
objective: string;
|
|
66
|
+
/**
|
|
67
|
+
* Key architectural principles
|
|
68
|
+
*/
|
|
69
|
+
principles: string[];
|
|
70
|
+
/**
|
|
71
|
+
* Recent knowledge graph intents
|
|
72
|
+
*/
|
|
73
|
+
recentIntents?: Array<{
|
|
74
|
+
intent: string;
|
|
75
|
+
timestamp: string;
|
|
76
|
+
outcome: string;
|
|
77
|
+
}>;
|
|
78
|
+
/**
|
|
79
|
+
* Active conversation state
|
|
80
|
+
*/
|
|
81
|
+
conversationState?: {
|
|
82
|
+
phase: string;
|
|
83
|
+
focus: string;
|
|
84
|
+
nextSteps: string[];
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
//# sourceMappingURL=state-reinforcement.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"state-reinforcement.d.ts","sourceRoot":"","sources":["../../../src/types/state-reinforcement.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;GAEG;AACH,MAAM,WAAW,0BAA0B;IACzC;;;OAGG;IACH,YAAY,EAAE,MAAM,CAAC;IAErB;;;OAGG;IACH,cAAc,EAAE,MAAM,CAAC;IAEvB;;;OAGG;IACH,4BAA4B,EAAE,OAAO,CAAC;IAEtC;;;OAGG;IACH,gBAAgB,EAAE,MAAM,CAAC;CAC1B;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B;;OAEG;IACH,eAAe,EAAE,MAAM,CAAC;IAExB;;OAEG;IACH,eAAe,EAAE,MAAM,CAAC;IAExB;;OAEG;IACH,eAAe,EAAE,OAAO,CAAC;IAEzB;;OAEG;IACH,eAAe,CAAC,EAAE,eAAe,GAAG,iBAAiB,GAAG,MAAM,CAAC;IAE/D;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;CACpB;AAED;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,UAAU,EAAE,MAAM,EAAE,CAAC;IAErB;;OAEG;IACH,aAAa,CAAC,EAAE,KAAK,CAAC;QACpB,MAAM,EAAE,MAAM,CAAC;QACf,SAAS,EAAE,MAAM,CAAC;QAClB,OAAO,EAAE,MAAM,CAAC;KACjB,CAAC,CAAC;IAEH;;OAEG;IACH,iBAAiB,CAAC,EAAE;QAClB,KAAK,EAAE,MAAM,CAAC;QACd,KAAK,EAAE,MAAM,CAAC;QACd,SAAS,EAAE,MAAM,EAAE,CAAC;KACrB,CAAC;CACH"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"state-reinforcement.js","sourceRoot":"","sources":["../../../src/types/state-reinforcement.ts"],"names":[],"mappings":"AAAA;;GAEG"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tiered Response System
|
|
3
|
+
*
|
|
4
|
+
* Implements conversational summarization to combat context decay.
|
|
5
|
+
* Returns compact summaries with references to full analysis stored in memory.
|
|
6
|
+
*/
|
|
7
|
+
export interface TieredResponseSection {
|
|
8
|
+
/** Brief summary of this section (100-200 tokens) */
|
|
9
|
+
summary: string;
|
|
10
|
+
/** Whether full details are available for expansion */
|
|
11
|
+
hasDetails: boolean;
|
|
12
|
+
/** Token count of full content (for transparency) */
|
|
13
|
+
fullTokenCount?: number;
|
|
14
|
+
}
|
|
15
|
+
export interface TieredResponse {
|
|
16
|
+
/** Executive summary (300-500 tokens) - always shown */
|
|
17
|
+
summary: string;
|
|
18
|
+
/** Unique ID to retrieve full analysis from memory */
|
|
19
|
+
expandableId: string;
|
|
20
|
+
/** Timestamp when analysis was created */
|
|
21
|
+
timestamp: string;
|
|
22
|
+
/** Tool that generated this response */
|
|
23
|
+
toolName: string;
|
|
24
|
+
/** Expandable sections with summaries */
|
|
25
|
+
sections: Record<string, TieredResponseSection>;
|
|
26
|
+
/** Estimated token savings vs full response */
|
|
27
|
+
tokenSavings?: {
|
|
28
|
+
summaryTokens: number;
|
|
29
|
+
fullTokens: number;
|
|
30
|
+
savingsPercent: number;
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
export interface ExpandableContent {
|
|
34
|
+
/** Full analysis content */
|
|
35
|
+
content: string;
|
|
36
|
+
/** Section breakdown for partial expansion */
|
|
37
|
+
sections: Record<string, string>;
|
|
38
|
+
/** Metadata */
|
|
39
|
+
metadata: {
|
|
40
|
+
toolName: string;
|
|
41
|
+
timestamp: string;
|
|
42
|
+
toolArgs: any;
|
|
43
|
+
tokenCount: number;
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Configuration for tiered response generation
|
|
48
|
+
*/
|
|
49
|
+
export interface TieredResponseConfig {
|
|
50
|
+
/** Maximum tokens for summary (default: 500) */
|
|
51
|
+
maxSummaryTokens?: number;
|
|
52
|
+
/** Maximum tokens per section summary (default: 150) */
|
|
53
|
+
maxSectionSummaryTokens?: number;
|
|
54
|
+
/** Whether to use AI for summarization (default: true) */
|
|
55
|
+
useAiSummarization?: boolean;
|
|
56
|
+
/** Temperature for AI summarization (default: 0.3) */
|
|
57
|
+
summarizationTemperature?: number;
|
|
58
|
+
/** Minimum token count to trigger tiering (default: 2000) */
|
|
59
|
+
tieringThreshold?: number;
|
|
60
|
+
}
|
|
61
|
+
//# sourceMappingURL=tiered-response.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tiered-response.d.ts","sourceRoot":"","sources":["../../../src/types/tiered-response.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,WAAW,qBAAqB;IACpC,qDAAqD;IACrD,OAAO,EAAE,MAAM,CAAC;IAChB,uDAAuD;IACvD,UAAU,EAAE,OAAO,CAAC;IACpB,qDAAqD;IACrD,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,WAAW,cAAc;IAC7B,wDAAwD;IACxD,OAAO,EAAE,MAAM,CAAC;IAEhB,sDAAsD;IACtD,YAAY,EAAE,MAAM,CAAC;IAErB,0CAA0C;IAC1C,SAAS,EAAE,MAAM,CAAC;IAElB,wCAAwC;IACxC,QAAQ,EAAE,MAAM,CAAC;IAEjB,yCAAyC;IACzC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,qBAAqB,CAAC,CAAC;IAEhD,+CAA+C;IAC/C,YAAY,CAAC,EAAE;QACb,aAAa,EAAE,MAAM,CAAC;QACtB,UAAU,EAAE,MAAM,CAAC;QACnB,cAAc,EAAE,MAAM,CAAC;KACxB,CAAC;CACH;AAED,MAAM,WAAW,iBAAiB;IAChC,4BAA4B;IAC5B,OAAO,EAAE,MAAM,CAAC;IAEhB,8CAA8C;IAC9C,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAEjC,eAAe;IACf,QAAQ,EAAE;QACR,QAAQ,EAAE,MAAM,CAAC;QACjB,SAAS,EAAE,MAAM,CAAC;QAClB,QAAQ,EAAE,GAAG,CAAC;QACd,UAAU,EAAE,MAAM,CAAC;KACpB,CAAC;CACH;AAED;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,gDAAgD;IAChD,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAE1B,wDAAwD;IACxD,uBAAuB,CAAC,EAAE,MAAM,CAAC;IAEjC,0DAA0D;IAC1D,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAE7B,sDAAsD;IACtD,wBAAwB,CAAC,EAAE,MAAM,CAAC;IAElC,6DAA6D;IAC7D,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tiered-response.js","sourceRoot":"","sources":["../../../src/types/tiered-response.ts"],"names":[],"mappings":"AAAA;;;;;GAKG"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tool Context for MCP Protocol
|
|
3
|
+
*
|
|
4
|
+
* Provides logging and progress notification capabilities to tools,
|
|
5
|
+
* following MCP best practices for real-time user feedback.
|
|
6
|
+
*
|
|
7
|
+
* @see https://modelcontextprotocol.io/docs/concepts/tools
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* Context passed to tool implementations for logging and progress reporting
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```typescript
|
|
14
|
+
* async function myTool(args: MyArgs, context: ToolContext) {
|
|
15
|
+
* context.info('Starting operation...');
|
|
16
|
+
* // ... do work ...
|
|
17
|
+
* context.report_progress(50, 100);
|
|
18
|
+
* // ... more work ...
|
|
19
|
+
* context.info('Operation complete');
|
|
20
|
+
* }
|
|
21
|
+
* ```
|
|
22
|
+
*/
|
|
23
|
+
export interface ToolContext {
|
|
24
|
+
/**
|
|
25
|
+
* Send an informational log message to the client
|
|
26
|
+
* @param message - Log message to display
|
|
27
|
+
*/
|
|
28
|
+
info(message: string): void;
|
|
29
|
+
/**
|
|
30
|
+
* Report progress on long-running operations
|
|
31
|
+
* @param progress - Current progress value
|
|
32
|
+
* @param total - Optional total value for percentage calculation
|
|
33
|
+
*/
|
|
34
|
+
report_progress(progress: number, total?: number): void;
|
|
35
|
+
/**
|
|
36
|
+
* Send a warning log message to the client
|
|
37
|
+
* @param message - Warning message to display
|
|
38
|
+
*/
|
|
39
|
+
warn?(message: string): void;
|
|
40
|
+
/**
|
|
41
|
+
* Send an error log message to the client
|
|
42
|
+
* @param message - Error message to display
|
|
43
|
+
*/
|
|
44
|
+
error?(message: string): void;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Create a no-op context for tools that don't support progress
|
|
48
|
+
*/
|
|
49
|
+
export declare function createNoOpContext(): ToolContext;
|
|
50
|
+
//# sourceMappingURL=tool-context.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tool-context.d.ts","sourceRoot":"","sources":["../../../src/types/tool-context.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH;;;;;;;;;;;;;GAaG;AACH,MAAM,WAAW,WAAW;IAC1B;;;OAGG;IACH,IAAI,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IAE5B;;;;OAIG;IACH,eAAe,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAExD;;;OAGG;IACH,IAAI,CAAC,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IAE7B;;;OAGG;IACH,KAAK,CAAC,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;CAC/B;AAED;;GAEG;AACH,wBAAgB,iBAAiB,IAAI,WAAW,CAO/C"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tool Context for MCP Protocol
|
|
3
|
+
*
|
|
4
|
+
* Provides logging and progress notification capabilities to tools,
|
|
5
|
+
* following MCP best practices for real-time user feedback.
|
|
6
|
+
*
|
|
7
|
+
* @see https://modelcontextprotocol.io/docs/concepts/tools
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* Create a no-op context for tools that don't support progress
|
|
11
|
+
*/
|
|
12
|
+
export function createNoOpContext() {
|
|
13
|
+
return {
|
|
14
|
+
info: () => { },
|
|
15
|
+
report_progress: () => { },
|
|
16
|
+
warn: () => { },
|
|
17
|
+
error: () => { },
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=tool-context.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tool-context.js","sourceRoot":"","sources":["../../../src/types/tool-context.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AA2CH;;GAEG;AACH,MAAM,UAAU,iBAAiB;IAC/B,OAAO;QACL,IAAI,EAAE,GAAG,EAAE,GAAE,CAAC;QACd,eAAe,EAAE,GAAG,EAAE,GAAE,CAAC;QACzB,IAAI,EAAE,GAAG,EAAE,GAAE,CAAC;QACd,KAAK,EAAE,GAAG,EAAE,GAAE,CAAC;KAChB,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ADR Action Analyzer
|
|
3
|
+
*
|
|
4
|
+
* Generates actionable work items from timeline analysis
|
|
5
|
+
* with priority scoring and effort estimation
|
|
6
|
+
*/
|
|
7
|
+
import type { AdrWorkQueue, ThresholdProfile } from './adr-timeline-types.js';
|
|
8
|
+
import type { DiscoveredAdr } from './adr-discovery.js';
|
|
9
|
+
/**
|
|
10
|
+
* Generate action items from ADRs based on timeline analysis
|
|
11
|
+
*/
|
|
12
|
+
export declare function generateActionItems(adrs: DiscoveredAdr[], baseThresholds: ThresholdProfile, options?: {
|
|
13
|
+
useAdrTypeModifiers?: boolean;
|
|
14
|
+
projectPath?: string;
|
|
15
|
+
}): Promise<AdrWorkQueue>;
|
|
16
|
+
/**
|
|
17
|
+
* Format action items into a readable report
|
|
18
|
+
*/
|
|
19
|
+
export declare function formatActionReport(workQueue: AdrWorkQueue, context?: {
|
|
20
|
+
projectPath: string;
|
|
21
|
+
thresholdProfile: string;
|
|
22
|
+
}): string;
|
|
23
|
+
//# sourceMappingURL=adr-action-analyzer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"adr-action-analyzer.d.ts","sourceRoot":"","sources":["../../../src/utils/adr-action-analyzer.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAEV,YAAY,EACZ,gBAAgB,EACjB,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAGxD;;GAEG;AACH,wBAAsB,mBAAmB,CACvC,IAAI,EAAE,aAAa,EAAE,EACrB,cAAc,EAAE,gBAAgB,EAChC,OAAO,GAAE;IACP,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,WAAW,CAAC,EAAE,MAAM,CAAC;CACjB,GACL,OAAO,CAAC,YAAY,CAAC,CAuBvB;AA8QD;;GAEG;AACH,wBAAgB,kBAAkB,CAChC,SAAS,EAAE,YAAY,EACvB,OAAO,CAAC,EAAE;IACR,WAAW,EAAE,MAAM,CAAC;IACpB,gBAAgB,EAAE,MAAM,CAAC;CAC1B,GACA,MAAM,CA0DR"}
|
|
@@ -0,0 +1,323 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ADR Action Analyzer
|
|
3
|
+
*
|
|
4
|
+
* Generates actionable work items from timeline analysis
|
|
5
|
+
* with priority scoring and effort estimation
|
|
6
|
+
*/
|
|
7
|
+
import { detectAdrType, adjustThresholdsForAdrType } from './adr-context-detector.js';
|
|
8
|
+
/**
|
|
9
|
+
* Generate action items from ADRs based on timeline analysis
|
|
10
|
+
*/
|
|
11
|
+
export async function generateActionItems(adrs, baseThresholds, options = {}) {
|
|
12
|
+
const { useAdrTypeModifiers = true } = options;
|
|
13
|
+
const actionItems = [];
|
|
14
|
+
for (const adr of adrs) {
|
|
15
|
+
if (!adr.timeline) {
|
|
16
|
+
continue; // Skip ADRs without timeline data
|
|
17
|
+
}
|
|
18
|
+
// Detect ADR type and adjust thresholds if enabled
|
|
19
|
+
const adrType = useAdrTypeModifiers ? detectAdrType(adr) : 'feature';
|
|
20
|
+
const thresholds = useAdrTypeModifiers
|
|
21
|
+
? adjustThresholdsForAdrType(baseThresholds, adrType)
|
|
22
|
+
: baseThresholds;
|
|
23
|
+
// Analyze this ADR for actions
|
|
24
|
+
const actions = analyzeAdrActions(adr, thresholds);
|
|
25
|
+
actionItems.push(...actions);
|
|
26
|
+
}
|
|
27
|
+
// Sort and categorize actions
|
|
28
|
+
return categorizeActions(actionItems);
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Analyze a single ADR for required actions
|
|
32
|
+
*/
|
|
33
|
+
function analyzeAdrActions(adr, thresholds) {
|
|
34
|
+
const actions = [];
|
|
35
|
+
const timeline = adr.timeline;
|
|
36
|
+
const status = adr.status.toLowerCase();
|
|
37
|
+
// RULE 1: Stale Proposed ADRs (CRITICAL)
|
|
38
|
+
if (status === 'proposed' && timeline.age_days > thresholds.staleProposedDays) {
|
|
39
|
+
const urgency = calculateUrgencyScore(timeline.age_days, thresholds.staleProposedDays, thresholds.staleProposedDays * 2);
|
|
40
|
+
actions.push({
|
|
41
|
+
adrFilename: adr.filename,
|
|
42
|
+
adrTitle: adr.title,
|
|
43
|
+
adrStatus: adr.status,
|
|
44
|
+
priority: urgency > 80 ? 'critical' : 'high',
|
|
45
|
+
urgencyScore: urgency,
|
|
46
|
+
actionType: 'review',
|
|
47
|
+
actionDescription: 'Review and make final decision',
|
|
48
|
+
rationale: `ADR has been in "Proposed" status for ${timeline.age_days} days ` +
|
|
49
|
+
`(>${thresholds.staleProposedDays} days threshold). ` +
|
|
50
|
+
`Prolonged proposed status creates uncertainty and blocks related work.`,
|
|
51
|
+
estimatedEffort: 'medium',
|
|
52
|
+
dueDate: addDays(new Date(), 14).toISOString(),
|
|
53
|
+
blockers: [
|
|
54
|
+
'May need stakeholder alignment',
|
|
55
|
+
'May require additional research',
|
|
56
|
+
'Team may need to evaluate alternatives',
|
|
57
|
+
],
|
|
58
|
+
timeline,
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
// RULE 2: Accepted but Not Implemented (HIGH)
|
|
62
|
+
// Note: Full implementation detection requires expensive analysis
|
|
63
|
+
// For now, we flag based on age alone
|
|
64
|
+
if (status === 'accepted' && timeline.age_days > thresholds.acceptedUnimplementedDays) {
|
|
65
|
+
const urgency = calculateUrgencyScore(timeline.age_days, thresholds.acceptedUnimplementedDays, thresholds.acceptedUnimplementedDays * 2);
|
|
66
|
+
actions.push({
|
|
67
|
+
adrFilename: adr.filename,
|
|
68
|
+
adrTitle: adr.title,
|
|
69
|
+
adrStatus: adr.status,
|
|
70
|
+
priority: urgency > 70 ? 'high' : 'medium',
|
|
71
|
+
urgencyScore: urgency,
|
|
72
|
+
actionType: 'implement',
|
|
73
|
+
actionDescription: 'Begin implementation of accepted decision',
|
|
74
|
+
rationale: `ADR was accepted ${timeline.age_days} days ago ` +
|
|
75
|
+
`(>${thresholds.acceptedUnimplementedDays} days threshold). ` +
|
|
76
|
+
`Accepted decisions should be implemented promptly to maintain architectural integrity.`,
|
|
77
|
+
estimatedEffort: estimateImplementationEffort(adr),
|
|
78
|
+
dueDate: addDays(new Date(), 30).toISOString(),
|
|
79
|
+
blockers: [
|
|
80
|
+
'May need team capacity allocation',
|
|
81
|
+
'May have dependencies on other work',
|
|
82
|
+
'May require infrastructure changes',
|
|
83
|
+
],
|
|
84
|
+
timeline,
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
// RULE 3: Outdated ADR Documentation (MEDIUM)
|
|
88
|
+
if ((status === 'accepted' || status === 'implemented') &&
|
|
89
|
+
timeline.days_since_update > thresholds.outdatedAdrDays) {
|
|
90
|
+
const urgency = calculateUrgencyScore(timeline.days_since_update, thresholds.outdatedAdrDays, thresholds.outdatedAdrDays * 2);
|
|
91
|
+
actions.push({
|
|
92
|
+
adrFilename: adr.filename,
|
|
93
|
+
adrTitle: adr.title,
|
|
94
|
+
adrStatus: adr.status,
|
|
95
|
+
priority: 'medium',
|
|
96
|
+
urgencyScore: urgency,
|
|
97
|
+
actionType: 'update',
|
|
98
|
+
actionDescription: 'Update ADR to reflect current state',
|
|
99
|
+
rationale: `ADR hasn't been updated in ${timeline.days_since_update} days ` +
|
|
100
|
+
`(>${thresholds.outdatedAdrDays} days threshold). ` +
|
|
101
|
+
`Documentation may have drifted from actual implementation.`,
|
|
102
|
+
estimatedEffort: 'low',
|
|
103
|
+
dueDate: addDays(new Date(), 60).toISOString(),
|
|
104
|
+
blockers: [
|
|
105
|
+
'May need to document implementation details',
|
|
106
|
+
'May need to update consequences section',
|
|
107
|
+
],
|
|
108
|
+
timeline,
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
// RULE 4: Deprecated without Superseding ADR (MEDIUM)
|
|
112
|
+
if (status === 'deprecated' && timeline.age_days > thresholds.outdatedAdrDays) {
|
|
113
|
+
const urgency = calculateUrgencyScore(timeline.age_days, thresholds.outdatedAdrDays, thresholds.outdatedAdrDays * 2);
|
|
114
|
+
actions.push({
|
|
115
|
+
adrFilename: adr.filename,
|
|
116
|
+
adrTitle: adr.title,
|
|
117
|
+
adrStatus: adr.status,
|
|
118
|
+
priority: 'medium',
|
|
119
|
+
urgencyScore: urgency,
|
|
120
|
+
actionType: 'close',
|
|
121
|
+
actionDescription: 'Document superseding decision or archive',
|
|
122
|
+
rationale: `ADR deprecated ${timeline.age_days} days ago ` +
|
|
123
|
+
`(>${thresholds.outdatedAdrDays} days threshold). ` +
|
|
124
|
+
`Should either document the new decision or archive if no longer relevant.`,
|
|
125
|
+
estimatedEffort: 'low',
|
|
126
|
+
dueDate: addDays(new Date(), 30).toISOString(),
|
|
127
|
+
blockers: [
|
|
128
|
+
'May need to create superseding ADR',
|
|
129
|
+
'May need to verify deprecated decision is fully replaced',
|
|
130
|
+
],
|
|
131
|
+
timeline,
|
|
132
|
+
});
|
|
133
|
+
}
|
|
134
|
+
// RULE 5: Long-Dormant ADRs (LOW)
|
|
135
|
+
if (timeline.days_since_update > thresholds.dormantAdrDays) {
|
|
136
|
+
const urgency = calculateUrgencyScore(timeline.days_since_update, thresholds.dormantAdrDays, thresholds.dormantAdrDays * 1.5);
|
|
137
|
+
actions.push({
|
|
138
|
+
adrFilename: adr.filename,
|
|
139
|
+
adrTitle: adr.title,
|
|
140
|
+
adrStatus: adr.status,
|
|
141
|
+
priority: 'low',
|
|
142
|
+
urgencyScore: urgency,
|
|
143
|
+
actionType: 'review',
|
|
144
|
+
actionDescription: 'Verify ADR is still relevant',
|
|
145
|
+
rationale: `ADR hasn't been updated in ${Math.floor(timeline.days_since_update / 365)} years ` +
|
|
146
|
+
`(>${Math.floor(thresholds.dormantAdrDays / 365)} years threshold). ` +
|
|
147
|
+
`May be obsolete or need archival.`,
|
|
148
|
+
estimatedEffort: 'low',
|
|
149
|
+
dueDate: addDays(new Date(), 90).toISOString(),
|
|
150
|
+
blockers: [],
|
|
151
|
+
timeline,
|
|
152
|
+
});
|
|
153
|
+
}
|
|
154
|
+
// RULE 6: Rapid Status Changes (MEDIUM - may indicate instability)
|
|
155
|
+
if (timeline.age_days < 30 && timeline.days_since_update < thresholds.rapidChangeDays) {
|
|
156
|
+
actions.push({
|
|
157
|
+
adrFilename: adr.filename,
|
|
158
|
+
adrTitle: adr.title,
|
|
159
|
+
adrStatus: adr.status,
|
|
160
|
+
priority: 'medium',
|
|
161
|
+
urgencyScore: 70,
|
|
162
|
+
actionType: 'review',
|
|
163
|
+
actionDescription: 'Review recent decision changes for stability',
|
|
164
|
+
rationale: `ADR is new (${timeline.age_days} days) and was recently modified ` +
|
|
165
|
+
`(${timeline.days_since_update} days ago). ` +
|
|
166
|
+
`Rapid changes may indicate unstable requirements or unclear context.`,
|
|
167
|
+
estimatedEffort: 'low',
|
|
168
|
+
dueDate: addDays(new Date(), 7).toISOString(),
|
|
169
|
+
blockers: [
|
|
170
|
+
'May need to stabilize requirements',
|
|
171
|
+
'May need additional stakeholder input',
|
|
172
|
+
],
|
|
173
|
+
timeline,
|
|
174
|
+
});
|
|
175
|
+
}
|
|
176
|
+
return actions;
|
|
177
|
+
}
|
|
178
|
+
/**
|
|
179
|
+
* Calculate urgency score (0-100) based on age thresholds
|
|
180
|
+
*/
|
|
181
|
+
function calculateUrgencyScore(actualDays, warningThreshold, criticalThreshold) {
|
|
182
|
+
if (actualDays < warningThreshold)
|
|
183
|
+
return 0;
|
|
184
|
+
if (actualDays >= criticalThreshold)
|
|
185
|
+
return 100;
|
|
186
|
+
// Linear interpolation between warning and critical
|
|
187
|
+
const range = criticalThreshold - warningThreshold;
|
|
188
|
+
const over = actualDays - warningThreshold;
|
|
189
|
+
return Math.min(100, Math.floor((over / range) * 100));
|
|
190
|
+
}
|
|
191
|
+
/**
|
|
192
|
+
* Estimate implementation effort based on ADR content
|
|
193
|
+
*/
|
|
194
|
+
function estimateImplementationEffort(adr) {
|
|
195
|
+
const content = (adr.content || '').toLowerCase();
|
|
196
|
+
// Simple heuristics
|
|
197
|
+
const hasInfrastructure = /infrastructure|deployment|database|migration/i.test(content);
|
|
198
|
+
const hasMultipleServices = /service|microservice|api/gi.test(content) && (content.match(/service/gi) || []).length > 3;
|
|
199
|
+
const hasBreakingChanges = /breaking|migration|backward/i.test(content);
|
|
200
|
+
if (hasInfrastructure || hasBreakingChanges)
|
|
201
|
+
return 'high';
|
|
202
|
+
if (hasMultipleServices)
|
|
203
|
+
return 'medium';
|
|
204
|
+
return 'low';
|
|
205
|
+
}
|
|
206
|
+
/**
|
|
207
|
+
* Add days to a date
|
|
208
|
+
*/
|
|
209
|
+
function addDays(date, days) {
|
|
210
|
+
const result = new Date(date);
|
|
211
|
+
result.setDate(result.getDate() + days);
|
|
212
|
+
return result;
|
|
213
|
+
}
|
|
214
|
+
/**
|
|
215
|
+
* Categorize actions into priority buckets
|
|
216
|
+
*/
|
|
217
|
+
function categorizeActions(actions) {
|
|
218
|
+
// Sort by urgency score (highest first)
|
|
219
|
+
actions.sort((a, b) => b.urgencyScore - a.urgencyScore);
|
|
220
|
+
const critical = actions.filter((a) => a.priority === 'critical');
|
|
221
|
+
const high = actions.filter((a) => a.priority === 'high');
|
|
222
|
+
const medium = actions.filter((a) => a.priority === 'medium');
|
|
223
|
+
const low = actions.filter((a) => a.priority === 'low');
|
|
224
|
+
// Estimate total hours based on effort
|
|
225
|
+
const effortHours = {
|
|
226
|
+
low: 1,
|
|
227
|
+
medium: 3,
|
|
228
|
+
high: 6,
|
|
229
|
+
};
|
|
230
|
+
const estimatedHours = actions.reduce((total, action) => {
|
|
231
|
+
return total + effortHours[action.estimatedEffort];
|
|
232
|
+
}, 0);
|
|
233
|
+
return {
|
|
234
|
+
critical,
|
|
235
|
+
high,
|
|
236
|
+
medium,
|
|
237
|
+
low,
|
|
238
|
+
summary: {
|
|
239
|
+
totalActions: actions.length,
|
|
240
|
+
criticalCount: critical.length,
|
|
241
|
+
estimatedHours,
|
|
242
|
+
},
|
|
243
|
+
};
|
|
244
|
+
}
|
|
245
|
+
/**
|
|
246
|
+
* Format action items into a readable report
|
|
247
|
+
*/
|
|
248
|
+
export function formatActionReport(workQueue, context) {
|
|
249
|
+
const { critical, high, medium, low, summary } = workQueue;
|
|
250
|
+
let report = '# ADR Timeline Analysis - Action Queue\n\n';
|
|
251
|
+
if (context) {
|
|
252
|
+
report += `**Project:** ${context.projectPath}\n`;
|
|
253
|
+
report += `**Threshold Profile:** ${context.thresholdProfile}\n`;
|
|
254
|
+
}
|
|
255
|
+
report += `**Analysis Date:** ${new Date().toISOString().split('T')[0]}\n\n`;
|
|
256
|
+
report += '## Summary\n\n';
|
|
257
|
+
report += `- **Total Actions Required:** ${summary.totalActions}\n`;
|
|
258
|
+
report += `- **Critical Priority:** ${summary.criticalCount}\n`;
|
|
259
|
+
report += `- **Estimated Total Effort:** ${summary.estimatedHours} hours\n\n`;
|
|
260
|
+
report += '---\n\n';
|
|
261
|
+
// Critical actions
|
|
262
|
+
if (critical.length > 0) {
|
|
263
|
+
report += `## đ¨ CRITICAL PRIORITY (${critical.length} actions)\n\n`;
|
|
264
|
+
critical.forEach((action, idx) => {
|
|
265
|
+
report += formatActionItem(action, idx + 1);
|
|
266
|
+
});
|
|
267
|
+
}
|
|
268
|
+
// High priority actions
|
|
269
|
+
if (high.length > 0) {
|
|
270
|
+
report += `## â ī¸ HIGH PRIORITY (${high.length} actions)\n\n`;
|
|
271
|
+
high.forEach((action, idx) => {
|
|
272
|
+
report += formatActionItem(action, idx + 1);
|
|
273
|
+
});
|
|
274
|
+
}
|
|
275
|
+
// Medium priority actions
|
|
276
|
+
if (medium.length > 0) {
|
|
277
|
+
report += `## đ MEDIUM PRIORITY (${medium.length} actions)\n\n`;
|
|
278
|
+
medium.forEach((action, idx) => {
|
|
279
|
+
report += formatActionItem(action, idx + 1);
|
|
280
|
+
});
|
|
281
|
+
}
|
|
282
|
+
// Low priority actions
|
|
283
|
+
if (low.length > 0) {
|
|
284
|
+
report += `## âšī¸ LOW PRIORITY (${low.length} actions)\n\n`;
|
|
285
|
+
low.forEach((action, idx) => {
|
|
286
|
+
report += formatActionItem(action, idx + 1);
|
|
287
|
+
});
|
|
288
|
+
}
|
|
289
|
+
// No actions
|
|
290
|
+
if (summary.totalActions === 0) {
|
|
291
|
+
report += '## â
No Actions Required\n\n';
|
|
292
|
+
report += 'All ADRs are up to date and within acceptable thresholds.\n\n';
|
|
293
|
+
}
|
|
294
|
+
return report;
|
|
295
|
+
}
|
|
296
|
+
/**
|
|
297
|
+
* Format a single action item
|
|
298
|
+
*/
|
|
299
|
+
function formatActionItem(action, index) {
|
|
300
|
+
let item = `### ${index}. ${action.adrTitle}\n\n`;
|
|
301
|
+
item += `**File:** \`${action.adrFilename}\` \n`;
|
|
302
|
+
item += `**Status:** ${action.adrStatus} \n`;
|
|
303
|
+
item += `**Age:** ${action.timeline.age_days} days \n`;
|
|
304
|
+
item += `**Last Updated:** ${action.timeline.days_since_update} days ago \n\n`;
|
|
305
|
+
item += `**Action Required:** ${action.actionDescription} \n`;
|
|
306
|
+
item += `**Urgency Score:** ${action.urgencyScore}/100 \n`;
|
|
307
|
+
item += `**Estimated Effort:** ${action.estimatedEffort.toUpperCase()} \n`;
|
|
308
|
+
if (action.dueDate) {
|
|
309
|
+
item += `**Suggested Due Date:** ${action.dueDate.split('T')[0]} \n`;
|
|
310
|
+
}
|
|
311
|
+
item += '\n';
|
|
312
|
+
item += `**Why This Matters:** \n${action.rationale}\n\n`;
|
|
313
|
+
if (action.blockers.length > 0) {
|
|
314
|
+
item += `**Potential Blockers:**\n`;
|
|
315
|
+
action.blockers.forEach((blocker) => {
|
|
316
|
+
item += `- ${blocker}\n`;
|
|
317
|
+
});
|
|
318
|
+
item += '\n';
|
|
319
|
+
}
|
|
320
|
+
item += '---\n\n';
|
|
321
|
+
return item;
|
|
322
|
+
}
|
|
323
|
+
//# sourceMappingURL=adr-action-analyzer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"adr-action-analyzer.js","sourceRoot":"","sources":["../../../src/utils/adr-action-analyzer.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAQH,OAAO,EAAE,aAAa,EAAE,0BAA0B,EAAE,MAAM,2BAA2B,CAAC;AAEtF;;GAEG;AACH,MAAM,CAA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AC,WAAW,EAAE,MAAM,CAAC;IAC5E,IAAI,MAAM,CAAC,OAAO,EAAE,CAAC;QACnB,IAAI,IAAI,2BAA2B,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;IACxE,CAAC;IACD,IAAI,IAAI,IAAI,CAAC;IAEb,IAAI,IAAI,4BAA4B,MAAM,CAAC,SAAS,MAAM,CAAC;IAE3D,IAAI,MAAM,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAC/B,IAAI,IAAI,2BAA2B,CAAC;QACpC,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;YAClC,IAAI,IAAI,KAAK,OAAO,IAAI,CAAC;QAC3B,CAAC,CAAC,CAAC;QACH,IAAI,IAAI,IAAI,CAAC;IACf,CAAC;IAED,IAAI,IAAI,SAAS,CAAC;IAElB,OAAO,IAAI,CAAC;AACd,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ADR Context Detector
|
|
3
|
+
*
|
|
4
|
+
* Automatically detects project context (phase, activity level, velocity)
|
|
5
|
+
* to select appropriate thresholds for timeline analysis
|
|
6
|
+
*/
|
|
7
|
+
import type { ProjectContext, ThresholdProfile, AdrType } from './adr-timeline-types.js';
|
|
8
|
+
import type { DiscoveredAdr } from './adr-discovery.js';
|
|
9
|
+
/**
|
|
10
|
+
* Predefined threshold profiles for different project contexts
|
|
11
|
+
*/
|
|
12
|
+
export declare const THRESHOLD_PROFILES: Record<string, ThresholdProfile>;
|
|
13
|
+
/**
|
|
14
|
+
* ADR type modifiers (multiply thresholds by these values)
|
|
15
|
+
*/
|
|
16
|
+
export declare const ADR_TYPE_MODIFIERS: Record<AdrType, number>;
|
|
17
|
+
/**
|
|
18
|
+
* Detect project context from git history and ADR patterns
|
|
19
|
+
*/
|
|
20
|
+
export declare function detectProjectContext(projectPath: string, adrs: DiscoveredAdr[]): Promise<ProjectContext>;
|
|
21
|
+
/**
|
|
22
|
+
* Select appropriate threshold profile
|
|
23
|
+
*/
|
|
24
|
+
export declare function selectThresholdProfile(context: ProjectContext, override?: string): ThresholdProfile;
|
|
25
|
+
/**
|
|
26
|
+
* Detect ADR type from content
|
|
27
|
+
*/
|
|
28
|
+
export declare function detectAdrType(adr: DiscoveredAdr): AdrType;
|
|
29
|
+
/**
|
|
30
|
+
* Apply ADR-type specific adjustments to thresholds
|
|
31
|
+
*/
|
|
32
|
+
export declare function adjustThresholdsForAdrType(baseThresholds: ThresholdProfile, adrType: AdrType): ThresholdProfile;
|
|
33
|
+
//# sourceMappingURL=adr-context-detector.d.ts.map
|