mcp-adr-analysis-server 2.0.21 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +94 -839
- package/dist/.tsbuildinfo +1 -1
- package/dist/src/config/ai-config.d.ts.map +1 -1
- package/dist/src/config/ai-config.js +9 -9
- package/dist/src/config/ai-config.js.map +1 -1
- package/dist/src/index.d.ts +15 -0
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +1594 -837
- package/dist/src/index.js.map +1 -1
- package/dist/src/prompts/analysis-prompts.d.ts +4 -1
- package/dist/src/prompts/analysis-prompts.d.ts.map +1 -1
- package/dist/src/prompts/analysis-prompts.js +61 -30
- package/dist/src/prompts/analysis-prompts.js.map +1 -1
- package/dist/src/prompts/index.d.ts +17 -1
- package/dist/src/prompts/index.d.ts.map +1 -1
- package/dist/src/prompts/index.js +325 -1
- package/dist/src/prompts/index.js.map +1 -1
- package/dist/src/prompts/rule-generation-prompts.d.ts +5 -1
- package/dist/src/prompts/rule-generation-prompts.d.ts.map +1 -1
- package/dist/src/prompts/rule-generation-prompts.js +5 -1
- package/dist/src/prompts/rule-generation-prompts.js.map +1 -1
- package/dist/src/prompts/security-prompts.d.ts +6 -1
- package/dist/src/prompts/security-prompts.d.ts.map +1 -1
- package/dist/src/prompts/security-prompts.js +6 -1
- package/dist/src/prompts/security-prompts.js.map +1 -1
- package/dist/src/prompts/todo-prompts.d.ts +49 -0
- package/dist/src/prompts/todo-prompts.d.ts.map +1 -0
- package/dist/src/prompts/todo-prompts.js +824 -0
- package/dist/src/prompts/todo-prompts.js.map +1 -0
- package/dist/src/resources/index.d.ts.map +1 -1
- package/dist/src/resources/index.js +9 -7
- package/dist/src/resources/index.js.map +1 -1
- package/dist/src/tools/adr-bootstrap-validation-tool.d.ts +47 -0
- package/dist/src/tools/adr-bootstrap-validation-tool.d.ts.map +1 -0
- package/dist/src/tools/adr-bootstrap-validation-tool.js +979 -0
- package/dist/src/tools/adr-bootstrap-validation-tool.js.map +1 -0
- package/dist/src/tools/adr-suggestion-tool.d.ts +1 -0
- package/dist/src/tools/adr-suggestion-tool.d.ts.map +1 -1
- package/dist/src/tools/adr-suggestion-tool.js +330 -32
- package/dist/src/tools/adr-suggestion-tool.js.map +1 -1
- package/dist/src/tools/content-masking-tool.d.ts +5 -0
- package/dist/src/tools/content-masking-tool.d.ts.map +1 -1
- package/dist/src/tools/content-masking-tool.js +631 -28
- package/dist/src/tools/content-masking-tool.js.map +1 -1
- package/dist/src/tools/deployment-readiness-tool.d.ts +8 -5
- package/dist/src/tools/deployment-readiness-tool.d.ts.map +1 -1
- package/dist/src/tools/deployment-readiness-tool.js +1017 -93
- package/dist/src/tools/deployment-readiness-tool.js.map +1 -1
- package/dist/src/tools/environment-analysis-tool.d.ts +4 -0
- package/dist/src/tools/environment-analysis-tool.d.ts.map +1 -1
- package/dist/src/tools/environment-analysis-tool.js +568 -24
- package/dist/src/tools/environment-analysis-tool.js.map +1 -1
- package/dist/src/tools/interactive-adr-planning-tool.d.ts.map +1 -1
- package/dist/src/tools/interactive-adr-planning-tool.js +270 -108
- package/dist/src/tools/interactive-adr-planning-tool.js.map +1 -1
- package/dist/src/tools/mcp-planning-tool.d.ts.map +1 -1
- package/dist/src/tools/mcp-planning-tool.js +316 -183
- package/dist/src/tools/mcp-planning-tool.js.map +1 -1
- package/dist/src/tools/memory-loading-tool.d.ts +60 -0
- package/dist/src/tools/memory-loading-tool.d.ts.map +1 -0
- package/dist/src/tools/memory-loading-tool.js +457 -0
- package/dist/src/tools/memory-loading-tool.js.map +1 -0
- package/dist/src/tools/research-integration-tool.d.ts +4 -1
- package/dist/src/tools/research-integration-tool.d.ts.map +1 -1
- package/dist/src/tools/research-integration-tool.js +5 -1
- package/dist/src/tools/research-integration-tool.js.map +1 -1
- package/dist/src/tools/review-existing-adrs-tool.d.ts +19 -0
- package/dist/src/tools/review-existing-adrs-tool.d.ts.map +1 -0
- package/dist/src/tools/review-existing-adrs-tool.js +1204 -0
- package/dist/src/tools/review-existing-adrs-tool.js.map +1 -0
- package/dist/src/tools/rule-generation-tool.d.ts +2 -0
- package/dist/src/tools/rule-generation-tool.d.ts.map +1 -1
- package/dist/src/tools/rule-generation-tool.js +274 -33
- package/dist/src/tools/rule-generation-tool.js.map +1 -1
- package/dist/src/tools/smart-git-push-tool-v2.d.ts +4 -0
- package/dist/src/tools/smart-git-push-tool-v2.d.ts.map +1 -1
- package/dist/src/tools/smart-git-push-tool-v2.js +423 -229
- package/dist/src/tools/smart-git-push-tool-v2.js.map +1 -1
- package/dist/src/tools/smart-git-push-tool.d.ts +3 -0
- package/dist/src/tools/smart-git-push-tool.d.ts.map +1 -1
- package/dist/src/tools/smart-git-push-tool.js +241 -235
- package/dist/src/tools/smart-git-push-tool.js.map +1 -1
- package/dist/src/tools/tool-chain-orchestrator.d.ts +2 -2
- package/dist/src/tools/tool-chain-orchestrator.d.ts.map +1 -1
- package/dist/src/tools/tool-chain-orchestrator.js +152 -93
- package/dist/src/tools/tool-chain-orchestrator.js.map +1 -1
- package/dist/src/tools/troubleshoot-guided-workflow-tool.d.ts +22 -13
- package/dist/src/tools/troubleshoot-guided-workflow-tool.d.ts.map +1 -1
- package/dist/src/tools/troubleshoot-guided-workflow-tool.js +660 -28
- package/dist/src/tools/troubleshoot-guided-workflow-tool.js.map +1 -1
- package/dist/src/types/ape-framework.d.ts +93 -0
- package/dist/src/types/ape-framework.d.ts.map +1 -1
- package/dist/src/types/ape-framework.js +10 -10
- package/dist/src/types/ape-framework.js.map +1 -1
- package/dist/src/types/enhanced-errors.d.ts +173 -0
- package/dist/src/types/enhanced-errors.d.ts.map +1 -0
- package/dist/src/types/enhanced-errors.js +668 -0
- package/dist/src/types/enhanced-errors.js.map +1 -0
- package/dist/src/types/index.d.ts +129 -3
- package/dist/src/types/index.d.ts.map +1 -1
- package/dist/src/types/index.js +15 -0
- package/dist/src/types/index.js.map +1 -1
- package/dist/src/types/knowledge-generation.d.ts +78 -0
- package/dist/src/types/knowledge-generation.d.ts.map +1 -1
- package/dist/src/types/knowledge-generation.js +10 -6
- package/dist/src/types/knowledge-generation.js.map +1 -1
- package/dist/src/types/knowledge-graph-schemas.d.ts +92 -0
- package/dist/src/types/knowledge-graph-schemas.d.ts.map +1 -1
- package/dist/src/types/knowledge-graph-schemas.js +45 -17
- package/dist/src/types/knowledge-graph-schemas.js.map +1 -1
- package/dist/src/types/memory-entities.d.ts +7209 -0
- package/dist/src/types/memory-entities.d.ts.map +1 -0
- package/dist/src/types/memory-entities.js +395 -0
- package/dist/src/types/memory-entities.js.map +1 -0
- package/dist/src/types/reflexion-framework.d.ts +44 -0
- package/dist/src/types/reflexion-framework.d.ts.map +1 -1
- package/dist/src/types/reflexion-framework.js +7 -7
- package/dist/src/types/reflexion-framework.js.map +1 -1
- package/dist/src/types/todo-json-schemas.d.ts +7 -653
- package/dist/src/types/todo-json-schemas.d.ts.map +1 -1
- package/dist/src/types/todo-json-schemas.js +6 -110
- package/dist/src/types/todo-json-schemas.js.map +1 -1
- package/dist/src/types/tool-arguments.d.ts +224 -0
- package/dist/src/types/tool-arguments.d.ts.map +1 -0
- package/dist/src/types/tool-arguments.js +6 -0
- package/dist/src/types/tool-arguments.js.map +1 -0
- package/dist/src/utils/actual-file-operations.d.ts.map +1 -1
- package/dist/src/utils/actual-file-operations.js +25 -9
- package/dist/src/utils/actual-file-operations.js.map +1 -1
- package/dist/src/utils/adr-discovery.d.ts +33 -1
- package/dist/src/utils/adr-discovery.d.ts.map +1 -1
- package/dist/src/utils/adr-discovery.js +14 -9
- package/dist/src/utils/adr-discovery.js.map +1 -1
- package/dist/src/utils/adr-suggestions.d.ts +72 -0
- package/dist/src/utils/adr-suggestions.d.ts.map +1 -1
- package/dist/src/utils/adr-suggestions.js +6 -0
- package/dist/src/utils/adr-suggestions.js.map +1 -1
- package/dist/src/utils/cache.d.ts.map +1 -1
- package/dist/src/utils/cache.js +22 -19
- package/dist/src/utils/cache.js.map +1 -1
- package/dist/src/utils/chain-of-thought-template.d.ts +13 -1
- package/dist/src/utils/chain-of-thought-template.d.ts.map +1 -1
- package/dist/src/utils/chain-of-thought-template.js +31 -22
- package/dist/src/utils/chain-of-thought-template.js.map +1 -1
- package/dist/src/utils/config.d.ts.map +1 -1
- package/dist/src/utils/config.js +1 -0
- package/dist/src/utils/config.js.map +1 -1
- package/dist/src/utils/directory-compat.js +1 -1
- package/dist/src/utils/directory-compat.js.map +1 -1
- package/dist/src/utils/enhanced-logging.d.ts +195 -0
- package/dist/src/utils/enhanced-logging.d.ts.map +1 -0
- package/dist/src/utils/enhanced-logging.js +449 -0
- package/dist/src/utils/enhanced-logging.js.map +1 -0
- package/dist/src/utils/file-system.d.ts +182 -34
- package/dist/src/utils/file-system.d.ts.map +1 -1
- package/dist/src/utils/file-system.js +648 -774
- package/dist/src/utils/file-system.js.map +1 -1
- package/dist/src/utils/gitleaks-detector.d.ts +50 -0
- package/dist/src/utils/gitleaks-detector.d.ts.map +1 -0
- package/dist/src/utils/gitleaks-detector.js +334 -0
- package/dist/src/utils/gitleaks-detector.js.map +1 -0
- package/dist/src/utils/interactive-approval.d.ts +1 -1
- package/dist/src/utils/interactive-approval.d.ts.map +1 -1
- package/dist/src/utils/interactive-approval.js +22 -17
- package/dist/src/utils/interactive-approval.js.map +1 -1
- package/dist/src/utils/json-safe.d.ts.map +1 -1
- package/dist/src/utils/json-safe.js +9 -6
- package/dist/src/utils/json-safe.js.map +1 -1
- package/dist/src/utils/knowledge-graph-manager.d.ts +37 -1
- package/dist/src/utils/knowledge-graph-manager.d.ts.map +1 -1
- package/dist/src/utils/knowledge-graph-manager.js +315 -70
- package/dist/src/utils/knowledge-graph-manager.js.map +1 -1
- package/dist/src/utils/location-filter.d.ts +35 -10
- package/dist/src/utils/location-filter.d.ts.map +1 -1
- package/dist/src/utils/location-filter.js +360 -94
- package/dist/src/utils/location-filter.js.map +1 -1
- package/dist/src/utils/mcp-response-validator.d.ts.map +1 -1
- package/dist/src/utils/mcp-response-validator.js +34 -19
- package/dist/src/utils/mcp-response-validator.js.map +1 -1
- package/dist/src/utils/memory-entity-manager.d.ts +134 -0
- package/dist/src/utils/memory-entity-manager.d.ts.map +1 -0
- package/dist/src/utils/memory-entity-manager.js +851 -0
- package/dist/src/utils/memory-entity-manager.js.map +1 -0
- package/dist/src/utils/memory-health-scoring.d.ts +125 -0
- package/dist/src/utils/memory-health-scoring.d.ts.map +1 -0
- package/dist/src/utils/memory-health-scoring.js +277 -0
- package/dist/src/utils/memory-health-scoring.js.map +1 -0
- package/dist/src/utils/memory-migration-manager.d.ts +93 -0
- package/dist/src/utils/memory-migration-manager.d.ts.map +1 -0
- package/dist/src/utils/memory-migration-manager.js +842 -0
- package/dist/src/utils/memory-migration-manager.js.map +1 -0
- package/dist/src/utils/memory-relationship-mapper.d.ts +87 -0
- package/dist/src/utils/memory-relationship-mapper.d.ts.map +1 -0
- package/dist/src/utils/memory-relationship-mapper.js +482 -0
- package/dist/src/utils/memory-relationship-mapper.js.map +1 -0
- package/dist/src/utils/memory-rollback-manager.d.ts +105 -0
- package/dist/src/utils/memory-rollback-manager.d.ts.map +1 -0
- package/dist/src/utils/memory-rollback-manager.js +575 -0
- package/dist/src/utils/memory-rollback-manager.js.map +1 -0
- package/dist/src/utils/memory-transformation.d.ts +59 -0
- package/dist/src/utils/memory-transformation.d.ts.map +1 -0
- package/dist/src/utils/memory-transformation.js +742 -0
- package/dist/src/utils/memory-transformation.js.map +1 -0
- package/dist/src/utils/output-masking.d.ts +12 -0
- package/dist/src/utils/output-masking.d.ts.map +1 -1
- package/dist/src/utils/output-masking.js +5 -0
- package/dist/src/utils/output-masking.js.map +1 -1
- package/dist/src/utils/prompt-execution.d.ts.map +1 -1
- package/dist/src/utils/prompt-execution.js +72 -51
- package/dist/src/utils/prompt-execution.js.map +1 -1
- package/dist/src/utils/release-readiness-detector.d.ts.map +1 -1
- package/dist/src/utils/release-readiness-detector.js +43 -42
- package/dist/src/utils/release-readiness-detector.js.map +1 -1
- package/dist/src/utils/research-integration.d.ts.map +1 -1
- package/dist/src/utils/research-integration.js +73 -44
- package/dist/src/utils/research-integration.js.map +1 -1
- package/dist/src/utils/research-questions.d.ts.map +1 -1
- package/dist/src/utils/research-questions.js +40 -14
- package/dist/src/utils/research-questions.js.map +1 -1
- package/dist/src/utils/ripgrep-wrapper.d.ts +84 -0
- package/dist/src/utils/ripgrep-wrapper.d.ts.map +1 -0
- package/dist/src/utils/ripgrep-wrapper.js +255 -0
- package/dist/src/utils/ripgrep-wrapper.js.map +1 -0
- package/dist/src/utils/rule-generation.d.ts.map +1 -1
- package/dist/src/utils/rule-generation.js +26 -15
- package/dist/src/utils/rule-generation.js.map +1 -1
- package/dist/src/utils/todo-file-watcher.d.ts +11 -23
- package/dist/src/utils/todo-file-watcher.d.ts.map +1 -1
- package/dist/src/utils/todo-file-watcher.js +18 -156
- package/dist/src/utils/todo-file-watcher.js.map +1 -1
- package/dist/src/utils/tree-sitter-analyzer.d.ts +185 -0
- package/dist/src/utils/tree-sitter-analyzer.d.ts.map +1 -0
- package/dist/src/utils/tree-sitter-analyzer.js +885 -0
- package/dist/src/utils/tree-sitter-analyzer.js.map +1 -0
- package/package.json +51 -10
- package/dist/src/tools/smart-score-tool.d.ts +0 -173
- package/dist/src/tools/smart-score-tool.d.ts.map +0 -1
- package/dist/src/tools/smart-score-tool.js +0 -681
- package/dist/src/tools/smart-score-tool.js.map +0 -1
- package/dist/src/tools/todo-management-tool-v2.d.ts +0 -368
- package/dist/src/tools/todo-management-tool-v2.d.ts.map +0 -1
- package/dist/src/tools/todo-management-tool-v2.js +0 -922
- package/dist/src/tools/todo-management-tool-v2.js.map +0 -1
- package/dist/src/utils/enhanced-sensitive-detector.d.ts +0 -61
- package/dist/src/utils/enhanced-sensitive-detector.d.ts.map +0 -1
- package/dist/src/utils/enhanced-sensitive-detector.js +0 -437
- package/dist/src/utils/enhanced-sensitive-detector.js.map +0 -1
- package/dist/src/utils/project-health-scoring.d.ts +0 -177
- package/dist/src/utils/project-health-scoring.d.ts.map +0 -1
- package/dist/src/utils/project-health-scoring.js +0 -370
- package/dist/src/utils/project-health-scoring.js.map +0 -1
- package/dist/src/utils/todo-json-manager.d.ts +0 -71
- package/dist/src/utils/todo-json-manager.d.ts.map +0 -1
- package/dist/src/utils/todo-json-manager.js +0 -396
- package/dist/src/utils/todo-json-manager.js.map +0 -1
- package/dist/src/utils/todo-markdown-converter.d.ts +0 -16
- package/dist/src/utils/todo-markdown-converter.d.ts.map +0 -1
- package/dist/src/utils/todo-markdown-converter.js +0 -362
- package/dist/src/utils/todo-markdown-converter.js.map +0 -1
- package/dist/src/utils/todo-migration.d.ts +0 -47
- package/dist/src/utils/todo-migration.d.ts.map +0 -1
- package/dist/src/utils/todo-migration.js +0 -261
- package/dist/src/utils/todo-migration.js.map +0 -1
|
@@ -1,177 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Dynamic Project Health Scoring System
|
|
3
|
-
* Aggregates scores from multiple MCP tools to provide real-time project health assessment
|
|
4
|
-
*/
|
|
5
|
-
export interface ProjectHealthScore {
|
|
6
|
-
overall: number;
|
|
7
|
-
taskCompletion: number;
|
|
8
|
-
deploymentReadiness: number;
|
|
9
|
-
architectureCompliance: number;
|
|
10
|
-
securityPosture: number;
|
|
11
|
-
codeQuality: number;
|
|
12
|
-
confidence: number;
|
|
13
|
-
lastUpdated: string;
|
|
14
|
-
influencingTools: string[];
|
|
15
|
-
breakdown: ScoreBreakdown;
|
|
16
|
-
}
|
|
17
|
-
export interface ScoreBreakdown {
|
|
18
|
-
taskCompletion: TaskCompletionScore;
|
|
19
|
-
deploymentReadiness: DeploymentReadinessScore;
|
|
20
|
-
architectureCompliance: ArchitectureComplianceScore;
|
|
21
|
-
securityPosture: SecurityPostureScore;
|
|
22
|
-
codeQuality: CodeQualityScore;
|
|
23
|
-
}
|
|
24
|
-
export interface TaskCompletionScore {
|
|
25
|
-
completed: number;
|
|
26
|
-
total: number;
|
|
27
|
-
percentage: number;
|
|
28
|
-
priorityWeightedScore: number;
|
|
29
|
-
criticalTasksRemaining: number;
|
|
30
|
-
lastUpdated: string;
|
|
31
|
-
}
|
|
32
|
-
export interface DeploymentReadinessScore {
|
|
33
|
-
releaseScore: number;
|
|
34
|
-
milestoneCompletion: number;
|
|
35
|
-
criticalBlockers: number;
|
|
36
|
-
warningBlockers: number;
|
|
37
|
-
gitHealthScore: number;
|
|
38
|
-
lastUpdated: string;
|
|
39
|
-
}
|
|
40
|
-
export interface ArchitectureComplianceScore {
|
|
41
|
-
adrImplementationScore: number;
|
|
42
|
-
mockVsProductionScore: number;
|
|
43
|
-
environmentAlignmentScore: number;
|
|
44
|
-
lastUpdated: string;
|
|
45
|
-
}
|
|
46
|
-
export interface SecurityPostureScore {
|
|
47
|
-
secretExposureRisk: number;
|
|
48
|
-
contentMaskingEffectiveness: number;
|
|
49
|
-
vulnerabilityCount: number;
|
|
50
|
-
lastUpdated: string;
|
|
51
|
-
}
|
|
52
|
-
export interface CodeQualityScore {
|
|
53
|
-
ruleViolations: number;
|
|
54
|
-
patternAdherence: number;
|
|
55
|
-
technicalDebtScore: number;
|
|
56
|
-
lastUpdated: string;
|
|
57
|
-
}
|
|
58
|
-
export interface ScoringWeights {
|
|
59
|
-
taskCompletion: number;
|
|
60
|
-
deploymentReadiness: number;
|
|
61
|
-
architectureCompliance: number;
|
|
62
|
-
securityPosture: number;
|
|
63
|
-
codeQuality: number;
|
|
64
|
-
}
|
|
65
|
-
export declare class ProjectHealthScoring {
|
|
66
|
-
private scoringCachePath;
|
|
67
|
-
private weights;
|
|
68
|
-
constructor(projectPath: string, weights?: Partial<ScoringWeights>);
|
|
69
|
-
/**
|
|
70
|
-
* Get current project health score
|
|
71
|
-
*/
|
|
72
|
-
getProjectHealthScore(): Promise<ProjectHealthScore>;
|
|
73
|
-
/**
|
|
74
|
-
* Update task completion score (called by TODO management tools)
|
|
75
|
-
*/
|
|
76
|
-
updateTaskCompletionScore(taskData: {
|
|
77
|
-
completed: number;
|
|
78
|
-
total: number;
|
|
79
|
-
criticalTasksRemaining: number;
|
|
80
|
-
priorityWeightedScore: number;
|
|
81
|
-
}): Promise<void>;
|
|
82
|
-
/**
|
|
83
|
-
* Update deployment readiness score (called by smart_git_push)
|
|
84
|
-
*/
|
|
85
|
-
updateDeploymentReadinessScore(deploymentData: {
|
|
86
|
-
releaseScore: number;
|
|
87
|
-
milestoneCompletion: number;
|
|
88
|
-
criticalBlockers: number;
|
|
89
|
-
warningBlockers: number;
|
|
90
|
-
gitHealthScore: number;
|
|
91
|
-
}): Promise<void>;
|
|
92
|
-
/**
|
|
93
|
-
* Update architecture compliance score (called by compare_adr_progress)
|
|
94
|
-
*/
|
|
95
|
-
updateArchitectureComplianceScore(architectureData: {
|
|
96
|
-
adrImplementationScore: number;
|
|
97
|
-
mockVsProductionScore: number;
|
|
98
|
-
environmentAlignmentScore: number;
|
|
99
|
-
}): Promise<void>;
|
|
100
|
-
/**
|
|
101
|
-
* Update security posture score (called by content security tools)
|
|
102
|
-
*/
|
|
103
|
-
updateSecurityPostureScore(securityData: {
|
|
104
|
-
secretExposureRisk: number;
|
|
105
|
-
contentMaskingEffectiveness: number;
|
|
106
|
-
vulnerabilityCount: number;
|
|
107
|
-
}): Promise<void>;
|
|
108
|
-
/**
|
|
109
|
-
* Update code quality score (called by rule validation tools)
|
|
110
|
-
*/
|
|
111
|
-
updateCodeQualityScore(codeQualityData: {
|
|
112
|
-
ruleViolations: number;
|
|
113
|
-
patternAdherence: number;
|
|
114
|
-
technicalDebtScore: number;
|
|
115
|
-
}): Promise<void>;
|
|
116
|
-
/**
|
|
117
|
-
* Calculate overall weighted score
|
|
118
|
-
*/
|
|
119
|
-
private calculateOverallScore;
|
|
120
|
-
/**
|
|
121
|
-
* Calculate task completion score with priority weighting
|
|
122
|
-
*/
|
|
123
|
-
private calculateTaskCompletionScore;
|
|
124
|
-
/**
|
|
125
|
-
* Calculate deployment readiness score
|
|
126
|
-
*/
|
|
127
|
-
private calculateDeploymentReadinessScore;
|
|
128
|
-
/**
|
|
129
|
-
* Calculate architecture compliance score
|
|
130
|
-
*/
|
|
131
|
-
private calculateArchitectureComplianceScore;
|
|
132
|
-
/**
|
|
133
|
-
* Calculate security posture score
|
|
134
|
-
*/
|
|
135
|
-
private calculateSecurityPostureScore;
|
|
136
|
-
/**
|
|
137
|
-
* Calculate code quality score
|
|
138
|
-
*/
|
|
139
|
-
private calculateCodeQualityScore;
|
|
140
|
-
/**
|
|
141
|
-
* Calculate confidence in overall score
|
|
142
|
-
*/
|
|
143
|
-
private calculateConfidence;
|
|
144
|
-
/**
|
|
145
|
-
* Initialize default score structure
|
|
146
|
-
*/
|
|
147
|
-
private initializeScore;
|
|
148
|
-
/**
|
|
149
|
-
* Update overall score and save
|
|
150
|
-
*/
|
|
151
|
-
private updateOverallScore;
|
|
152
|
-
/**
|
|
153
|
-
* Add tool to influencing tools list
|
|
154
|
-
*/
|
|
155
|
-
private addInfluencingTool;
|
|
156
|
-
/**
|
|
157
|
-
* Load cached score from file
|
|
158
|
-
*/
|
|
159
|
-
private loadCachedScore;
|
|
160
|
-
/**
|
|
161
|
-
* Save score to cache
|
|
162
|
-
*/
|
|
163
|
-
private saveCachedScore;
|
|
164
|
-
/**
|
|
165
|
-
* Generate formatted score display for TODO.md header
|
|
166
|
-
*/
|
|
167
|
-
generateScoreDisplay(): Promise<string>;
|
|
168
|
-
/**
|
|
169
|
-
* Get emoji for score level
|
|
170
|
-
*/
|
|
171
|
-
private getScoreEmoji;
|
|
172
|
-
/**
|
|
173
|
-
* Get emoji for confidence level
|
|
174
|
-
*/
|
|
175
|
-
private getConfidenceEmoji;
|
|
176
|
-
}
|
|
177
|
-
//# sourceMappingURL=project-health-scoring.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"project-health-scoring.d.ts","sourceRoot":"","sources":["../../../src/utils/project-health-scoring.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAKH,MAAM,WAAW,kBA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G,OAAO,CAAC,IAAI,CAAC;IAgBjB;;OAEG;IACG,0BAA0B,CAAC,YAAY,EAAE;QAC7C,kBAAkB,EAAE,MAAM,CAAC;QAC3B,2BAA2B,EAAE,MAAM,CAAC;QACpC,kBAAkB,EAAE,MAAM,CAAC;KAC5B,GAAG,OAAO,CAAC,IAAI,CAAC;IAgBjB;;OAEG;IACG,sBAAsB,CAAC,eAAe,EAAE;QAC5C,cAAc,EAAE,MAAM,CAAC;QACvB,gBAAgB,EAAE,MAAM,CAAC;QACzB,kBAAkB,EAAE,MAAM,CAAC;KAC5B,GAAG,OAAO,CAAC,IAAI,CAAC;IAgBjB;;OAEG;IACH,OAAO,CAAC,qBAAqB;IAkB7B;;OAEG;IACH,OAAO,CAAC,4BAA4B;IAmBpC;;OAEG;IACH,OAAO,CAAC,iCAAiC;IAkBzC;;OAEG;IACH,OAAO,CAAC,oCAAoC;IAQ5C;;OAEG;IACH,OAAO,CAAC,6BAA6B;IAerC;;OAEG;IACH,OAAO,CAAC,yBAAyB;IAYjC;;OAEG;IACH,OAAO,CAAC,mBAAmB;IAiB3B;;OAEG;IACH,OAAO,CAAC,eAAe;IAoDvB;;OAEG;YACW,kBAAkB;IAQhC;;OAEG;IACH,OAAO,CAAC,kBAAkB;IAM1B;;OAEG;IACH,OAAO,CAAC,eAAe;IAYvB;;OAEG;IACH,OAAO,CAAC,eAAe;IAavB;;OAEG;IACG,oBAAoB,IAAI,OAAO,CAAC,MAAM,CAAC;IAgC7C;;OAEG;IACH,OAAO,CAAC,aAAa;IAOrB;;OAEG;IACH,OAAO,CAAC,kBAAkB;CAM3B"}
|
|
@@ -1,370 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Dynamic Project Health Scoring System
|
|
3
|
-
* Aggregates scores from multiple MCP tools to provide real-time project health assessment
|
|
4
|
-
*/
|
|
5
|
-
import { writeFileSync, readFileSync, existsSync, mkdirSync } from 'fs';
|
|
6
|
-
import { join, dirname } from 'path';
|
|
7
|
-
export class ProjectHealthScoring {
|
|
8
|
-
scoringCachePath;
|
|
9
|
-
weights;
|
|
10
|
-
constructor(projectPath, weights) {
|
|
11
|
-
this.scoringCachePath = join(projectPath, '.mcp-adr-cache', 'project-health-scores.json');
|
|
12
|
-
this.weights = {
|
|
13
|
-
taskCompletion: 0.25,
|
|
14
|
-
deploymentReadiness: 0.30,
|
|
15
|
-
architectureCompliance: 0.20,
|
|
16
|
-
securityPosture: 0.15,
|
|
17
|
-
codeQuality: 0.10,
|
|
18
|
-
...weights
|
|
19
|
-
};
|
|
20
|
-
}
|
|
21
|
-
/**
|
|
22
|
-
* Get current project health score
|
|
23
|
-
*/
|
|
24
|
-
async getProjectHealthScore() {
|
|
25
|
-
let currentScore = this.loadCachedScore();
|
|
26
|
-
if (!currentScore) {
|
|
27
|
-
currentScore = this.initializeScore();
|
|
28
|
-
}
|
|
29
|
-
// Recalculate overall score with current weights
|
|
30
|
-
currentScore.overall = this.calculateOverallScore(currentScore.breakdown);
|
|
31
|
-
currentScore.confidence = this.calculateConfidence(currentScore.breakdown);
|
|
32
|
-
currentScore.lastUpdated = new Date().toISOString();
|
|
33
|
-
this.saveCachedScore(currentScore);
|
|
34
|
-
return currentScore;
|
|
35
|
-
}
|
|
36
|
-
/**
|
|
37
|
-
* Update task completion score (called by TODO management tools)
|
|
38
|
-
*/
|
|
39
|
-
async updateTaskCompletionScore(taskData) {
|
|
40
|
-
const currentScore = await this.getProjectHealthScore();
|
|
41
|
-
currentScore.breakdown.taskCompletion = {
|
|
42
|
-
completed: taskData.completed,
|
|
43
|
-
total: taskData.total,
|
|
44
|
-
percentage: taskData.total > 0 ? (taskData.completed / taskData.total) * 100 : 100,
|
|
45
|
-
priorityWeightedScore: taskData.priorityWeightedScore,
|
|
46
|
-
criticalTasksRemaining: taskData.criticalTasksRemaining,
|
|
47
|
-
lastUpdated: new Date().toISOString()
|
|
48
|
-
};
|
|
49
|
-
currentScore.taskCompletion = this.calculateTaskCompletionScore(currentScore.breakdown.taskCompletion);
|
|
50
|
-
this.addInfluencingTool(currentScore, 'manage_todo');
|
|
51
|
-
await this.updateOverallScore(currentScore);
|
|
52
|
-
}
|
|
53
|
-
/**
|
|
54
|
-
* Update deployment readiness score (called by smart_git_push)
|
|
55
|
-
*/
|
|
56
|
-
async updateDeploymentReadinessScore(deploymentData) {
|
|
57
|
-
const currentScore = await this.getProjectHealthScore();
|
|
58
|
-
currentScore.breakdown.deploymentReadiness = {
|
|
59
|
-
releaseScore: deploymentData.releaseScore,
|
|
60
|
-
milestoneCompletion: deploymentData.milestoneCompletion,
|
|
61
|
-
criticalBlockers: deploymentData.criticalBlockers,
|
|
62
|
-
warningBlockers: deploymentData.warningBlockers,
|
|
63
|
-
gitHealthScore: deploymentData.gitHealthScore,
|
|
64
|
-
lastUpdated: new Date().toISOString()
|
|
65
|
-
};
|
|
66
|
-
currentScore.deploymentReadiness = this.calculateDeploymentReadinessScore(currentScore.breakdown.deploymentReadiness);
|
|
67
|
-
this.addInfluencingTool(currentScore, 'smart_git_push');
|
|
68
|
-
await this.updateOverallScore(currentScore);
|
|
69
|
-
}
|
|
70
|
-
/**
|
|
71
|
-
* Update architecture compliance score (called by compare_adr_progress)
|
|
72
|
-
*/
|
|
73
|
-
async updateArchitectureComplianceScore(architectureData) {
|
|
74
|
-
const currentScore = await this.getProjectHealthScore();
|
|
75
|
-
currentScore.breakdown.architectureCompliance = {
|
|
76
|
-
adrImplementationScore: architectureData.adrImplementationScore,
|
|
77
|
-
mockVsProductionScore: architectureData.mockVsProductionScore,
|
|
78
|
-
environmentAlignmentScore: architectureData.environmentAlignmentScore,
|
|
79
|
-
lastUpdated: new Date().toISOString()
|
|
80
|
-
};
|
|
81
|
-
currentScore.architectureCompliance = this.calculateArchitectureComplianceScore(currentScore.breakdown.architectureCompliance);
|
|
82
|
-
this.addInfluencingTool(currentScore, 'compare_adr_progress');
|
|
83
|
-
await this.updateOverallScore(currentScore);
|
|
84
|
-
}
|
|
85
|
-
/**
|
|
86
|
-
* Update security posture score (called by content security tools)
|
|
87
|
-
*/
|
|
88
|
-
async updateSecurityPostureScore(securityData) {
|
|
89
|
-
const currentScore = await this.getProjectHealthScore();
|
|
90
|
-
currentScore.breakdown.securityPosture = {
|
|
91
|
-
secretExposureRisk: securityData.secretExposureRisk,
|
|
92
|
-
contentMaskingEffectiveness: securityData.contentMaskingEffectiveness,
|
|
93
|
-
vulnerabilityCount: securityData.vulnerabilityCount,
|
|
94
|
-
lastUpdated: new Date().toISOString()
|
|
95
|
-
};
|
|
96
|
-
currentScore.securityPosture = this.calculateSecurityPostureScore(currentScore.breakdown.securityPosture);
|
|
97
|
-
this.addInfluencingTool(currentScore, 'analyze_content_security');
|
|
98
|
-
await this.updateOverallScore(currentScore);
|
|
99
|
-
}
|
|
100
|
-
/**
|
|
101
|
-
* Update code quality score (called by rule validation tools)
|
|
102
|
-
*/
|
|
103
|
-
async updateCodeQualityScore(codeQualityData) {
|
|
104
|
-
const currentScore = await this.getProjectHealthScore();
|
|
105
|
-
currentScore.breakdown.codeQuality = {
|
|
106
|
-
ruleViolations: codeQualityData.ruleViolations,
|
|
107
|
-
patternAdherence: codeQualityData.patternAdherence,
|
|
108
|
-
technicalDebtScore: codeQualityData.technicalDebtScore,
|
|
109
|
-
lastUpdated: new Date().toISOString()
|
|
110
|
-
};
|
|
111
|
-
currentScore.codeQuality = this.calculateCodeQualityScore(currentScore.breakdown.codeQuality);
|
|
112
|
-
this.addInfluencingTool(currentScore, 'validate_rules');
|
|
113
|
-
await this.updateOverallScore(currentScore);
|
|
114
|
-
}
|
|
115
|
-
/**
|
|
116
|
-
* Calculate overall weighted score
|
|
117
|
-
*/
|
|
118
|
-
calculateOverallScore(breakdown) {
|
|
119
|
-
const scores = {
|
|
120
|
-
taskCompletion: this.calculateTaskCompletionScore(breakdown.taskCompletion),
|
|
121
|
-
deploymentReadiness: this.calculateDeploymentReadinessScore(breakdown.deploymentReadiness),
|
|
122
|
-
architectureCompliance: this.calculateArchitectureComplianceScore(breakdown.architectureCompliance),
|
|
123
|
-
securityPosture: this.calculateSecurityPostureScore(breakdown.securityPosture),
|
|
124
|
-
codeQuality: this.calculateCodeQualityScore(breakdown.codeQuality)
|
|
125
|
-
};
|
|
126
|
-
return Math.round(scores.taskCompletion * this.weights.taskCompletion +
|
|
127
|
-
scores.deploymentReadiness * this.weights.deploymentReadiness +
|
|
128
|
-
scores.architectureCompliance * this.weights.architectureCompliance +
|
|
129
|
-
scores.securityPosture * this.weights.securityPosture +
|
|
130
|
-
scores.codeQuality * this.weights.codeQuality);
|
|
131
|
-
}
|
|
132
|
-
/**
|
|
133
|
-
* Calculate task completion score with priority weighting
|
|
134
|
-
*/
|
|
135
|
-
calculateTaskCompletionScore(taskData) {
|
|
136
|
-
if (taskData.total === 0)
|
|
137
|
-
return 100;
|
|
138
|
-
// Base completion score
|
|
139
|
-
let score = taskData.percentage;
|
|
140
|
-
// Priority weighting boost
|
|
141
|
-
if (taskData.priorityWeightedScore > taskData.percentage) {
|
|
142
|
-
score = Math.min(100, score + (taskData.priorityWeightedScore - taskData.percentage) * 0.3);
|
|
143
|
-
}
|
|
144
|
-
// Critical tasks penalty
|
|
145
|
-
if (taskData.criticalTasksRemaining > 0) {
|
|
146
|
-
score = Math.max(0, score - (taskData.criticalTasksRemaining * 15));
|
|
147
|
-
}
|
|
148
|
-
return Math.round(score);
|
|
149
|
-
}
|
|
150
|
-
/**
|
|
151
|
-
* Calculate deployment readiness score
|
|
152
|
-
*/
|
|
153
|
-
calculateDeploymentReadinessScore(deploymentData) {
|
|
154
|
-
let score = deploymentData.releaseScore * 100;
|
|
155
|
-
// Milestone completion factor
|
|
156
|
-
score = (score + deploymentData.milestoneCompletion * 100) / 2;
|
|
157
|
-
// Critical blockers are severe penalties
|
|
158
|
-
score = Math.max(0, score - (deploymentData.criticalBlockers * 25));
|
|
159
|
-
// Warning blockers are minor penalties
|
|
160
|
-
score = Math.max(0, score - (deploymentData.warningBlockers * 5));
|
|
161
|
-
// Git health factor
|
|
162
|
-
score = (score + deploymentData.gitHealthScore) / 2;
|
|
163
|
-
return Math.round(score);
|
|
164
|
-
}
|
|
165
|
-
/**
|
|
166
|
-
* Calculate architecture compliance score
|
|
167
|
-
*/
|
|
168
|
-
calculateArchitectureComplianceScore(architectureData) {
|
|
169
|
-
return Math.round((architectureData.adrImplementationScore * 0.4 +
|
|
170
|
-
architectureData.mockVsProductionScore * 0.3 +
|
|
171
|
-
architectureData.environmentAlignmentScore * 0.3));
|
|
172
|
-
}
|
|
173
|
-
/**
|
|
174
|
-
* Calculate security posture score
|
|
175
|
-
*/
|
|
176
|
-
calculateSecurityPostureScore(securityData) {
|
|
177
|
-
let score = 100;
|
|
178
|
-
// Secret exposure risk (inverted - higher risk = lower score)
|
|
179
|
-
score -= securityData.secretExposureRisk;
|
|
180
|
-
// Content masking effectiveness
|
|
181
|
-
score = (score + securityData.contentMaskingEffectiveness) / 2;
|
|
182
|
-
// Vulnerability penalty
|
|
183
|
-
score = Math.max(0, score - (securityData.vulnerabilityCount * 10));
|
|
184
|
-
return Math.round(Math.max(0, score));
|
|
185
|
-
}
|
|
186
|
-
/**
|
|
187
|
-
* Calculate code quality score
|
|
188
|
-
*/
|
|
189
|
-
calculateCodeQualityScore(codeQualityData) {
|
|
190
|
-
let score = codeQualityData.patternAdherence;
|
|
191
|
-
// Rule violations penalty
|
|
192
|
-
score = Math.max(0, score - (codeQualityData.ruleViolations * 5));
|
|
193
|
-
// Technical debt factor
|
|
194
|
-
score = (score + codeQualityData.technicalDebtScore) / 2;
|
|
195
|
-
return Math.round(score);
|
|
196
|
-
}
|
|
197
|
-
/**
|
|
198
|
-
* Calculate confidence in overall score
|
|
199
|
-
*/
|
|
200
|
-
calculateConfidence(breakdown) {
|
|
201
|
-
const now = new Date();
|
|
202
|
-
const maxAgeMs = 24 * 60 * 60 * 1000; // 24 hours
|
|
203
|
-
let confidence = 100;
|
|
204
|
-
// Reduce confidence based on data age
|
|
205
|
-
Object.values(breakdown).forEach(scoreData => {
|
|
206
|
-
const age = now.getTime() - new Date(scoreData.lastUpdated).getTime();
|
|
207
|
-
if (age > maxAgeMs) {
|
|
208
|
-
confidence -= 10;
|
|
209
|
-
}
|
|
210
|
-
});
|
|
211
|
-
return Math.max(0, confidence);
|
|
212
|
-
}
|
|
213
|
-
/**
|
|
214
|
-
* Initialize default score structure
|
|
215
|
-
*/
|
|
216
|
-
initializeScore() {
|
|
217
|
-
const now = new Date().toISOString();
|
|
218
|
-
return {
|
|
219
|
-
overall: 50,
|
|
220
|
-
taskCompletion: 50,
|
|
221
|
-
deploymentReadiness: 50,
|
|
222
|
-
architectureCompliance: 50,
|
|
223
|
-
securityPosture: 50,
|
|
224
|
-
codeQuality: 50,
|
|
225
|
-
confidence: 0,
|
|
226
|
-
lastUpdated: now,
|
|
227
|
-
influencingTools: [],
|
|
228
|
-
breakdown: {
|
|
229
|
-
taskCompletion: {
|
|
230
|
-
completed: 0,
|
|
231
|
-
total: 0,
|
|
232
|
-
percentage: 0,
|
|
233
|
-
priorityWeightedScore: 0,
|
|
234
|
-
criticalTasksRemaining: 0,
|
|
235
|
-
lastUpdated: now
|
|
236
|
-
},
|
|
237
|
-
deploymentReadiness: {
|
|
238
|
-
releaseScore: 0.5,
|
|
239
|
-
milestoneCompletion: 0.5,
|
|
240
|
-
criticalBlockers: 0,
|
|
241
|
-
warningBlockers: 0,
|
|
242
|
-
gitHealthScore: 50,
|
|
243
|
-
lastUpdated: now
|
|
244
|
-
},
|
|
245
|
-
architectureCompliance: {
|
|
246
|
-
adrImplementationScore: 50,
|
|
247
|
-
mockVsProductionScore: 50,
|
|
248
|
-
environmentAlignmentScore: 50,
|
|
249
|
-
lastUpdated: now
|
|
250
|
-
},
|
|
251
|
-
securityPosture: {
|
|
252
|
-
secretExposureRisk: 0,
|
|
253
|
-
contentMaskingEffectiveness: 80,
|
|
254
|
-
vulnerabilityCount: 0,
|
|
255
|
-
lastUpdated: now
|
|
256
|
-
},
|
|
257
|
-
codeQuality: {
|
|
258
|
-
ruleViolations: 0,
|
|
259
|
-
patternAdherence: 70,
|
|
260
|
-
technicalDebtScore: 60,
|
|
261
|
-
lastUpdated: now
|
|
262
|
-
}
|
|
263
|
-
}
|
|
264
|
-
};
|
|
265
|
-
}
|
|
266
|
-
/**
|
|
267
|
-
* Update overall score and save
|
|
268
|
-
*/
|
|
269
|
-
async updateOverallScore(score) {
|
|
270
|
-
score.overall = this.calculateOverallScore(score.breakdown);
|
|
271
|
-
score.confidence = this.calculateConfidence(score.breakdown);
|
|
272
|
-
score.lastUpdated = new Date().toISOString();
|
|
273
|
-
this.saveCachedScore(score);
|
|
274
|
-
}
|
|
275
|
-
/**
|
|
276
|
-
* Add tool to influencing tools list
|
|
277
|
-
*/
|
|
278
|
-
addInfluencingTool(score, toolName) {
|
|
279
|
-
if (!score.influencingTools.includes(toolName)) {
|
|
280
|
-
score.influencingTools.push(toolName);
|
|
281
|
-
}
|
|
282
|
-
}
|
|
283
|
-
/**
|
|
284
|
-
* Load cached score from file
|
|
285
|
-
*/
|
|
286
|
-
loadCachedScore() {
|
|
287
|
-
try {
|
|
288
|
-
if (existsSync(this.scoringCachePath)) {
|
|
289
|
-
const cached = JSON.parse(readFileSync(this.scoringCachePath, 'utf-8'));
|
|
290
|
-
return cached;
|
|
291
|
-
}
|
|
292
|
-
}
|
|
293
|
-
catch (error) {
|
|
294
|
-
// Ignore cache errors
|
|
295
|
-
}
|
|
296
|
-
return null;
|
|
297
|
-
}
|
|
298
|
-
/**
|
|
299
|
-
* Save score to cache
|
|
300
|
-
*/
|
|
301
|
-
saveCachedScore(score) {
|
|
302
|
-
try {
|
|
303
|
-
// Ensure cache directory exists
|
|
304
|
-
mkdirSync(dirname(this.scoringCachePath), { recursive: true });
|
|
305
|
-
writeFileSync(this.scoringCachePath, JSON.stringify(score, null, 2));
|
|
306
|
-
console.log(`✅ ProjectHealthScoring: Successfully saved to ${this.scoringCachePath}`);
|
|
307
|
-
}
|
|
308
|
-
catch (error) {
|
|
309
|
-
// Log the error instead of silently ignoring it
|
|
310
|
-
console.error(`❌ ProjectHealthScoring: Failed to save to ${this.scoringCachePath}:`, error);
|
|
311
|
-
}
|
|
312
|
-
}
|
|
313
|
-
/**
|
|
314
|
-
* Generate formatted score display for TODO.md header
|
|
315
|
-
*/
|
|
316
|
-
async generateScoreDisplay() {
|
|
317
|
-
const score = await this.getProjectHealthScore();
|
|
318
|
-
const overallEmoji = this.getScoreEmoji(score.overall);
|
|
319
|
-
const confidenceEmoji = this.getConfidenceEmoji(score.confidence);
|
|
320
|
-
return `# Project Health Dashboard
|
|
321
|
-
|
|
322
|
-
## 🎯 Overall Project Health: ${overallEmoji} ${score.overall}% ${confidenceEmoji}
|
|
323
|
-
|
|
324
|
-
### 📊 Health Metrics
|
|
325
|
-
- 📋 **Task Completion**: ${this.getScoreEmoji(score.taskCompletion)} ${score.taskCompletion}%
|
|
326
|
-
- 🚀 **Deployment Readiness**: ${this.getScoreEmoji(score.deploymentReadiness)} ${score.deploymentReadiness}%
|
|
327
|
-
- 🏗️ **Architecture Compliance**: ${this.getScoreEmoji(score.architectureCompliance)} ${score.architectureCompliance}%
|
|
328
|
-
- 🔒 **Security Posture**: ${this.getScoreEmoji(score.securityPosture)} ${score.securityPosture}%
|
|
329
|
-
- 🛠️ **Code Quality**: ${this.getScoreEmoji(score.codeQuality)} ${score.codeQuality}%
|
|
330
|
-
|
|
331
|
-
### 🔄 Data Freshness
|
|
332
|
-
- **Last Updated**: ${new Date(score.lastUpdated).toLocaleString()}
|
|
333
|
-
- **Confidence**: ${score.confidence}%
|
|
334
|
-
- **Contributing Tools**: ${score.influencingTools.join(', ') || 'None'}
|
|
335
|
-
|
|
336
|
-
### 📈 Detailed Breakdown
|
|
337
|
-
- **Tasks**: ${score.breakdown.taskCompletion.completed}/${score.breakdown.taskCompletion.total} completed, ${score.breakdown.taskCompletion.criticalTasksRemaining} critical remaining
|
|
338
|
-
- **Deployment**: ${score.breakdown.deploymentReadiness.criticalBlockers} critical blockers, ${score.breakdown.deploymentReadiness.warningBlockers} warnings
|
|
339
|
-
- **Security**: ${score.breakdown.securityPosture.vulnerabilityCount} vulnerabilities, ${score.breakdown.securityPosture.contentMaskingEffectiveness}% masking effectiveness
|
|
340
|
-
- **Code Quality**: ${score.breakdown.codeQuality.ruleViolations} rule violations, ${score.breakdown.codeQuality.patternAdherence}% pattern adherence
|
|
341
|
-
|
|
342
|
-
---
|
|
343
|
-
`;
|
|
344
|
-
}
|
|
345
|
-
/**
|
|
346
|
-
* Get emoji for score level
|
|
347
|
-
*/
|
|
348
|
-
getScoreEmoji(score) {
|
|
349
|
-
if (score >= 90)
|
|
350
|
-
return '🟢';
|
|
351
|
-
if (score >= 75)
|
|
352
|
-
return '🟡';
|
|
353
|
-
if (score >= 60)
|
|
354
|
-
return '🟠';
|
|
355
|
-
return '🔴';
|
|
356
|
-
}
|
|
357
|
-
/**
|
|
358
|
-
* Get emoji for confidence level
|
|
359
|
-
*/
|
|
360
|
-
getConfidenceEmoji(confidence) {
|
|
361
|
-
if (confidence >= 90)
|
|
362
|
-
return '💎';
|
|
363
|
-
if (confidence >= 75)
|
|
364
|
-
return '✨';
|
|
365
|
-
if (confidence >= 60)
|
|
366
|
-
return '⚡';
|
|
367
|
-
return '⚠️';
|
|
368
|
-
}
|
|
369
|
-
}
|
|
370
|
-
//# sourceMappingURL=project-health-scoring.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"project-health-scoring.js","sourceRoot":"","sources":["../../../src/utils/project-health-scoring.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,IAAI,CAAC;AACxE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAsErC,MAAM,OAAO,oBAAoB;IACvB,gBAAgB,CAAS;IACzB,OAAO,CAAiB;IAEhC,YAAY,WAAmB,EAAE,OAAiC;QAChE,IAAI,CAAC,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 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* JSON-First TODO Management System
|
|
3
|
-
*
|
|
4
|
-
* Provides consistent, structured TODO management with automatic scoring sync,
|
|
5
|
-
* knowledge graph integration, and intelligent task automation.
|
|
6
|
-
*/
|
|
7
|
-
import { TodoJsonData, TodoTask, TaskUpdateOperation, TodoScoreMetrics } from '../types/todo-json-schemas.js';
|
|
8
|
-
export declare class TodoJsonManager {
|
|
9
|
-
private todoJsonPath;
|
|
10
|
-
private todoMdPath;
|
|
11
|
-
private cacheDir;
|
|
12
|
-
private kgManager;
|
|
13
|
-
private healthScoring;
|
|
14
|
-
constructor(projectPath?: string);
|
|
15
|
-
/**
|
|
16
|
-
* Load TODO data from JSON, creating default structure if needed
|
|
17
|
-
*/
|
|
18
|
-
loadTodoData(): Promise<TodoJsonData>;
|
|
19
|
-
/**
|
|
20
|
-
* Save TODO data to JSON and optionally sync to markdown
|
|
21
|
-
*/
|
|
22
|
-
saveTodoData(data: TodoJsonData, syncToMarkdown?: boolean): Promise<void>;
|
|
23
|
-
/**
|
|
24
|
-
* Create a new task with automatic ID generation and scoring integration
|
|
25
|
-
*/
|
|
26
|
-
createTask(taskData: Partial<TodoTask> & {
|
|
27
|
-
title: string;
|
|
28
|
-
}): Promise<string>;
|
|
29
|
-
/**
|
|
30
|
-
* Update task with automatic changelog and scoring sync
|
|
31
|
-
*/
|
|
32
|
-
updateTask(operation: TaskUpdateOperation): Promise<void>;
|
|
33
|
-
/**
|
|
34
|
-
* Move task between sections automatically
|
|
35
|
-
*/
|
|
36
|
-
private moveTaskBetweenSections;
|
|
37
|
-
/**
|
|
38
|
-
* Process auto-completion rules
|
|
39
|
-
*/
|
|
40
|
-
private processAutoCompletionRules;
|
|
41
|
-
/**
|
|
42
|
-
* Update scoring system with current task data
|
|
43
|
-
*/
|
|
44
|
-
private updateScoring;
|
|
45
|
-
/**
|
|
46
|
-
* Calculate comprehensive score metrics
|
|
47
|
-
*/
|
|
48
|
-
private calculateScoreMetrics;
|
|
49
|
-
/**
|
|
50
|
-
* Link task to knowledge graph
|
|
51
|
-
*/
|
|
52
|
-
private linkToKnowledgeGraph;
|
|
53
|
-
/**
|
|
54
|
-
* Convert JSON data to markdown format
|
|
55
|
-
*/
|
|
56
|
-
convertToMarkdown(data?: TodoJsonData): Promise<void>;
|
|
57
|
-
/**
|
|
58
|
-
* Import existing TODO.md into JSON format
|
|
59
|
-
*/
|
|
60
|
-
importFromMarkdown(): Promise<void>;
|
|
61
|
-
/**
|
|
62
|
-
* Get analytics and metrics
|
|
63
|
-
*/
|
|
64
|
-
getAnalytics(): Promise<{
|
|
65
|
-
metrics: TodoScoreMetrics;
|
|
66
|
-
trends: any[];
|
|
67
|
-
recommendations: string[];
|
|
68
|
-
}>;
|
|
69
|
-
private ensureCacheDirectory;
|
|
70
|
-
}
|
|
71
|
-
//# sourceMappingURL=todo-json-manager.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"todo-json-manager.d.ts","sourceRoot":"","sources":["../../../src/utils/todo-json-manager.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAKH,OAAO,EACL,YAAY,EACZ,QAAQ,EAER,mBAAmB,EACnB,gBAAgB,EAEjB,MAAM,+BAA+B,CAAC;AAKvC,qBAAa,eAAe;IAC1B,OAAO,CAAC,YAAY,CAAS;IAC7B,OAAO,CAAC,UAAU,CAAS;IAC3B,OAAO,CAAC,QAAQ,CAAS;IACzB,OAAO,CAAC,SAAS,CAAwB;IACzC,OAAO,CAAC,aAAa,CAAuB;gBAEhC,WAAW,CAAC,EAAE,MAAM;IAYhC;;OAEG;IACG,YAAY,IAAI,OAAO,CAAC,YAAY,CAAC;IA6D3C;;OAEG;IACG,YAAY,CAAC,IAAI,EAAE,YAAY,EAAE,cAAc,GAAE,OAAc,GAAG,OAAO,CAAC,IAAI,CAAC;IAmBrF;;OAEG;IACG,UAAU,CAAC,QAAQ,EAAE,OAAO,CAAC,QAAQ,CAAC,GAAG;QAA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