@monoes/monomindcli 1.15.3 → 1.15.5
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/dist/src/mcp-client.d.ts.map +1 -1
- package/dist/src/mcp-client.js +7 -0
- package/dist/src/mcp-client.js.map +1 -1
- package/dist/src/mcp-tools/coherence/causal-infer.d.ts +15 -0
- package/dist/src/mcp-tools/coherence/causal-infer.d.ts.map +1 -0
- package/dist/src/mcp-tools/coherence/causal-infer.js +347 -0
- package/dist/src/mcp-tools/coherence/causal-infer.js.map +1 -0
- package/dist/src/mcp-tools/coherence/coherence-check.d.ts +15 -0
- package/dist/src/mcp-tools/coherence/coherence-check.d.ts.map +1 -0
- package/dist/src/mcp-tools/coherence/coherence-check.js +206 -0
- package/dist/src/mcp-tools/coherence/coherence-check.js.map +1 -0
- package/dist/src/mcp-tools/coherence/consensus-verify.d.ts +15 -0
- package/dist/src/mcp-tools/coherence/consensus-verify.d.ts.map +1 -0
- package/dist/src/mcp-tools/coherence/consensus-verify.js +303 -0
- package/dist/src/mcp-tools/coherence/consensus-verify.js.map +1 -0
- package/dist/src/mcp-tools/coherence/memory-gate.d.ts +15 -0
- package/dist/src/mcp-tools/coherence/memory-gate.d.ts.map +1 -0
- package/dist/src/mcp-tools/coherence/memory-gate.js +266 -0
- package/dist/src/mcp-tools/coherence/memory-gate.js.map +1 -0
- package/dist/src/mcp-tools/coherence/quantum-topology.d.ts +15 -0
- package/dist/src/mcp-tools/coherence/quantum-topology.d.ts.map +1 -0
- package/dist/src/mcp-tools/coherence/quantum-topology.js +406 -0
- package/dist/src/mcp-tools/coherence/quantum-topology.js.map +1 -0
- package/dist/src/mcp-tools/coherence/spectral-analyze.d.ts +15 -0
- package/dist/src/mcp-tools/coherence/spectral-analyze.d.ts.map +1 -0
- package/dist/src/mcp-tools/coherence/spectral-analyze.js +293 -0
- package/dist/src/mcp-tools/coherence/spectral-analyze.js.map +1 -0
- package/dist/src/mcp-tools/coherence/types.d.ts +277 -0
- package/dist/src/mcp-tools/coherence/types.d.ts.map +1 -0
- package/dist/src/mcp-tools/coherence/types.js +159 -0
- package/dist/src/mcp-tools/coherence/types.js.map +1 -0
- package/dist/src/mcp-tools/coherence-tools.d.ts +9 -0
- package/dist/src/mcp-tools/coherence-tools.d.ts.map +1 -0
- package/dist/src/mcp-tools/coherence-tools.js +25 -0
- package/dist/src/mcp-tools/coherence-tools.js.map +1 -0
- package/dist/src/mcp-tools/quality/chaos-resilience/chaos-inject.d.ts +163 -0
- package/dist/src/mcp-tools/quality/chaos-resilience/chaos-inject.d.ts.map +1 -0
- package/dist/src/mcp-tools/quality/chaos-resilience/chaos-inject.js +414 -0
- package/dist/src/mcp-tools/quality/chaos-resilience/chaos-inject.js.map +1 -0
- package/dist/src/mcp-tools/quality/coverage-analysis/analyze-coverage.d.ts +128 -0
- package/dist/src/mcp-tools/quality/coverage-analysis/analyze-coverage.d.ts.map +1 -0
- package/dist/src/mcp-tools/quality/coverage-analysis/analyze-coverage.js +375 -0
- package/dist/src/mcp-tools/quality/coverage-analysis/analyze-coverage.js.map +1 -0
- package/dist/src/mcp-tools/quality/coverage-analysis/prioritize-gaps.d.ts +161 -0
- package/dist/src/mcp-tools/quality/coverage-analysis/prioritize-gaps.d.ts.map +1 -0
- package/dist/src/mcp-tools/quality/coverage-analysis/prioritize-gaps.js +423 -0
- package/dist/src/mcp-tools/quality/coverage-analysis/prioritize-gaps.js.map +1 -0
- package/dist/src/mcp-tools/quality/coverage-analysis/track-trends.d.ts +165 -0
- package/dist/src/mcp-tools/quality/coverage-analysis/track-trends.d.ts.map +1 -0
- package/dist/src/mcp-tools/quality/coverage-analysis/track-trends.js +395 -0
- package/dist/src/mcp-tools/quality/coverage-analysis/track-trends.js.map +1 -0
- package/dist/src/mcp-tools/quality/defect-intelligence/analyze-root-cause.d.ts +165 -0
- package/dist/src/mcp-tools/quality/defect-intelligence/analyze-root-cause.d.ts.map +1 -0
- package/dist/src/mcp-tools/quality/defect-intelligence/analyze-root-cause.js +508 -0
- package/dist/src/mcp-tools/quality/defect-intelligence/analyze-root-cause.js.map +1 -0
- package/dist/src/mcp-tools/quality/defect-intelligence/find-similar-defects.d.ts +147 -0
- package/dist/src/mcp-tools/quality/defect-intelligence/find-similar-defects.d.ts.map +1 -0
- package/dist/src/mcp-tools/quality/defect-intelligence/find-similar-defects.js +391 -0
- package/dist/src/mcp-tools/quality/defect-intelligence/find-similar-defects.js.map +1 -0
- package/dist/src/mcp-tools/quality/defect-intelligence/predict-defects.d.ts +147 -0
- package/dist/src/mcp-tools/quality/defect-intelligence/predict-defects.d.ts.map +1 -0
- package/dist/src/mcp-tools/quality/defect-intelligence/predict-defects.js +422 -0
- package/dist/src/mcp-tools/quality/defect-intelligence/predict-defects.js.map +1 -0
- package/dist/src/mcp-tools/quality/quality-assessment/assess-readiness.d.ts +185 -0
- package/dist/src/mcp-tools/quality/quality-assessment/assess-readiness.d.ts.map +1 -0
- package/dist/src/mcp-tools/quality/quality-assessment/assess-readiness.js +437 -0
- package/dist/src/mcp-tools/quality/quality-assessment/assess-readiness.js.map +1 -0
- package/dist/src/mcp-tools/quality/quality-assessment/calculate-risk.d.ts +166 -0
- package/dist/src/mcp-tools/quality/quality-assessment/calculate-risk.d.ts.map +1 -0
- package/dist/src/mcp-tools/quality/quality-assessment/calculate-risk.js +410 -0
- package/dist/src/mcp-tools/quality/quality-assessment/calculate-risk.js.map +1 -0
- package/dist/src/mcp-tools/quality/quality-assessment/evaluate-quality-gate.d.ts +201 -0
- package/dist/src/mcp-tools/quality/quality-assessment/evaluate-quality-gate.d.ts.map +1 -0
- package/dist/src/mcp-tools/quality/quality-assessment/evaluate-quality-gate.js +363 -0
- package/dist/src/mcp-tools/quality/quality-assessment/evaluate-quality-gate.js.map +1 -0
- package/dist/src/mcp-tools/quality/security-compliance/audit-compliance.d.ts +166 -0
- package/dist/src/mcp-tools/quality/security-compliance/audit-compliance.d.ts.map +1 -0
- package/dist/src/mcp-tools/quality/security-compliance/audit-compliance.js +394 -0
- package/dist/src/mcp-tools/quality/security-compliance/audit-compliance.js.map +1 -0
- package/dist/src/mcp-tools/quality/security-compliance/detect-secrets.d.ts +129 -0
- package/dist/src/mcp-tools/quality/security-compliance/detect-secrets.d.ts.map +1 -0
- package/dist/src/mcp-tools/quality/security-compliance/detect-secrets.js +383 -0
- package/dist/src/mcp-tools/quality/security-compliance/detect-secrets.js.map +1 -0
- package/dist/src/mcp-tools/quality/security-compliance/security-scan.d.ts +171 -0
- package/dist/src/mcp-tools/quality/security-compliance/security-scan.d.ts.map +1 -0
- package/dist/src/mcp-tools/quality/security-compliance/security-scan.js +476 -0
- package/dist/src/mcp-tools/quality/security-compliance/security-scan.js.map +1 -0
- package/dist/src/mcp-tools/quality/test-generation/generate-tests.d.ts +147 -0
- package/dist/src/mcp-tools/quality/test-generation/generate-tests.d.ts.map +1 -0
- package/dist/src/mcp-tools/quality/test-generation/generate-tests.js +400 -0
- package/dist/src/mcp-tools/quality/test-generation/generate-tests.js.map +1 -0
- package/dist/src/mcp-tools/quality/test-generation/suggest-tests.d.ts +145 -0
- package/dist/src/mcp-tools/quality/test-generation/suggest-tests.d.ts.map +1 -0
- package/dist/src/mcp-tools/quality/test-generation/suggest-tests.js +328 -0
- package/dist/src/mcp-tools/quality/test-generation/suggest-tests.js.map +1 -0
- package/dist/src/mcp-tools/quality/test-generation/tdd-cycle.d.ts +126 -0
- package/dist/src/mcp-tools/quality/test-generation/tdd-cycle.d.ts.map +1 -0
- package/dist/src/mcp-tools/quality/test-generation/tdd-cycle.js +348 -0
- package/dist/src/mcp-tools/quality/test-generation/tdd-cycle.js.map +1 -0
- package/dist/src/mcp-tools/quality-tools.d.ts +9 -0
- package/dist/src/mcp-tools/quality-tools.d.ts.map +1 -0
- package/dist/src/mcp-tools/quality-tools.js +308 -0
- package/dist/src/mcp-tools/quality-tools.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,423 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* prioritize-gaps.ts - Risk-based gap prioritization MCP tool handler
|
|
3
|
+
*
|
|
4
|
+
* Prioritizes coverage gaps based on multiple risk factors including
|
|
5
|
+
* code complexity, change frequency, business criticality, and defect history.
|
|
6
|
+
*/
|
|
7
|
+
import { z } from 'zod';
|
|
8
|
+
// Input schema for prioritize-gaps tool
|
|
9
|
+
export const PrioritizeGapsInputSchema = z.object({
|
|
10
|
+
gaps: z
|
|
11
|
+
.array(z.object({
|
|
12
|
+
id: z.string(),
|
|
13
|
+
type: z.enum(['line', 'branch', 'function']),
|
|
14
|
+
file: z.string(),
|
|
15
|
+
startLine: z.number(),
|
|
16
|
+
endLine: z.number(),
|
|
17
|
+
}))
|
|
18
|
+
.optional()
|
|
19
|
+
.describe('Pre-analyzed gaps (or will analyze from targetPath)'),
|
|
20
|
+
targetPath: z.string().optional().describe('Path to analyze if gaps not provided'),
|
|
21
|
+
factors: z
|
|
22
|
+
.array(z.enum([
|
|
23
|
+
'complexity',
|
|
24
|
+
'change-frequency',
|
|
25
|
+
'defect-history',
|
|
26
|
+
'business-critical',
|
|
27
|
+
'dependency-count',
|
|
28
|
+
'test-difficulty',
|
|
29
|
+
]))
|
|
30
|
+
.default(['complexity', 'change-frequency', 'defect-history'])
|
|
31
|
+
.describe('Prioritization factors'),
|
|
32
|
+
weights: z
|
|
33
|
+
.object({
|
|
34
|
+
complexity: z.number().min(0).max(1).default(0.25),
|
|
35
|
+
changeFrequency: z.number().min(0).max(1).default(0.25),
|
|
36
|
+
defectHistory: z.number().min(0).max(1).default(0.2),
|
|
37
|
+
businessCritical: z.number().min(0).max(1).default(0.15),
|
|
38
|
+
dependencyCount: z.number().min(0).max(1).default(0.1),
|
|
39
|
+
testDifficulty: z.number().min(0).max(1).default(0.05),
|
|
40
|
+
})
|
|
41
|
+
.optional()
|
|
42
|
+
.describe('Custom weights for prioritization factors'),
|
|
43
|
+
limit: z.number().min(1).max(100).default(20).describe('Maximum gaps to return'),
|
|
44
|
+
groupBy: z
|
|
45
|
+
.enum(['risk', 'file', 'type', 'none'])
|
|
46
|
+
.default('risk')
|
|
47
|
+
.describe('How to group the results'),
|
|
48
|
+
});
|
|
49
|
+
// Default weights
|
|
50
|
+
const DEFAULT_WEIGHTS = {
|
|
51
|
+
complexity: 0.25,
|
|
52
|
+
changeFrequency: 0.25,
|
|
53
|
+
defectHistory: 0.2,
|
|
54
|
+
businessCritical: 0.15,
|
|
55
|
+
dependencyCount: 0.1,
|
|
56
|
+
testDifficulty: 0.05,
|
|
57
|
+
};
|
|
58
|
+
/**
|
|
59
|
+
* MCP Tool Handler for prioritize-gaps
|
|
60
|
+
*/
|
|
61
|
+
export async function handler(input, context) {
|
|
62
|
+
const startTime = Date.now();
|
|
63
|
+
try {
|
|
64
|
+
// Validate input
|
|
65
|
+
const validatedInput = PrioritizeGapsInputSchema.parse(input);
|
|
66
|
+
// Get bridge for defect history lookup
|
|
67
|
+
const bridge = context.get('aqe.bridge');
|
|
68
|
+
// Get or generate gaps
|
|
69
|
+
let gaps = validatedInput.gaps;
|
|
70
|
+
if (!gaps || gaps.length === 0) {
|
|
71
|
+
if (!validatedInput.targetPath) {
|
|
72
|
+
throw new Error('Either gaps or targetPath must be provided');
|
|
73
|
+
}
|
|
74
|
+
gaps = await generateGapsFromPath(validatedInput.targetPath);
|
|
75
|
+
}
|
|
76
|
+
// Apply weights
|
|
77
|
+
const weights = { ...DEFAULT_WEIGHTS, ...validatedInput.weights };
|
|
78
|
+
// Calculate priority scores for each gap
|
|
79
|
+
const prioritizedGaps = await calculatePriorities(gaps, validatedInput.factors, weights, bridge);
|
|
80
|
+
// Sort by priority score
|
|
81
|
+
prioritizedGaps.sort((a, b) => b.priorityScore - a.priorityScore);
|
|
82
|
+
// Limit results
|
|
83
|
+
const limitedGaps = prioritizedGaps.slice(0, validatedInput.limit);
|
|
84
|
+
// Group results
|
|
85
|
+
const groups = groupGaps(limitedGaps, validatedInput.groupBy);
|
|
86
|
+
// Calculate statistics
|
|
87
|
+
const statistics = calculateStatistics(prioritizedGaps);
|
|
88
|
+
// Generate recommendations
|
|
89
|
+
const recommendations = generateRecommendations(limitedGaps, statistics);
|
|
90
|
+
// Build result
|
|
91
|
+
const result = {
|
|
92
|
+
success: true,
|
|
93
|
+
prioritizedGaps: limitedGaps,
|
|
94
|
+
groups,
|
|
95
|
+
statistics,
|
|
96
|
+
recommendations,
|
|
97
|
+
metadata: {
|
|
98
|
+
analyzedAt: new Date().toISOString(),
|
|
99
|
+
durationMs: Date.now() - startTime,
|
|
100
|
+
factorsUsed: validatedInput.factors,
|
|
101
|
+
weightsApplied: weights,
|
|
102
|
+
},
|
|
103
|
+
};
|
|
104
|
+
return {
|
|
105
|
+
content: [
|
|
106
|
+
{
|
|
107
|
+
type: 'text',
|
|
108
|
+
text: JSON.stringify(result, null, 2),
|
|
109
|
+
},
|
|
110
|
+
],
|
|
111
|
+
};
|
|
112
|
+
}
|
|
113
|
+
catch (error) {
|
|
114
|
+
const errorMessage = error instanceof Error ? error.message : 'Unknown error';
|
|
115
|
+
return {
|
|
116
|
+
content: [
|
|
117
|
+
{
|
|
118
|
+
type: 'text',
|
|
119
|
+
text: JSON.stringify({
|
|
120
|
+
success: false,
|
|
121
|
+
error: errorMessage,
|
|
122
|
+
prioritizedGaps: [],
|
|
123
|
+
metadata: {
|
|
124
|
+
analyzedAt: new Date().toISOString(),
|
|
125
|
+
durationMs: Date.now() - startTime,
|
|
126
|
+
},
|
|
127
|
+
}, null, 2),
|
|
128
|
+
},
|
|
129
|
+
],
|
|
130
|
+
};
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
async function generateGapsFromPath(_targetPath) {
|
|
134
|
+
// Cannot derive real coverage gaps without running the test suite and collecting
|
|
135
|
+
// an lcov/json report. Pass a coverage report via the `gaps` input instead, or
|
|
136
|
+
// run `npx vitest --coverage` and feed the output to `analyze-coverage` first.
|
|
137
|
+
return [];
|
|
138
|
+
}
|
|
139
|
+
async function calculatePriorities(gaps, factors, weights, bridge) {
|
|
140
|
+
const prioritizedGaps = [];
|
|
141
|
+
for (const gap of gaps) {
|
|
142
|
+
const factorScores = [];
|
|
143
|
+
let totalScore = 0;
|
|
144
|
+
// Calculate each factor
|
|
145
|
+
if (factors.includes('complexity')) {
|
|
146
|
+
const score = calculateComplexityScore(gap);
|
|
147
|
+
const contribution = score * weights.complexity;
|
|
148
|
+
factorScores.push({
|
|
149
|
+
factor: 'complexity',
|
|
150
|
+
score,
|
|
151
|
+
weight: weights.complexity,
|
|
152
|
+
contribution,
|
|
153
|
+
details: `Cyclomatic complexity: ${Math.round(score * 20)}`,
|
|
154
|
+
});
|
|
155
|
+
totalScore += contribution;
|
|
156
|
+
}
|
|
157
|
+
if (factors.includes('change-frequency')) {
|
|
158
|
+
const score = calculateChangeFrequency(gap);
|
|
159
|
+
const contribution = score * weights.changeFrequency;
|
|
160
|
+
factorScores.push({
|
|
161
|
+
factor: 'change-frequency',
|
|
162
|
+
score,
|
|
163
|
+
weight: weights.changeFrequency,
|
|
164
|
+
contribution,
|
|
165
|
+
details: `Changes in last 90 days: ${Math.round(score * 10)}`,
|
|
166
|
+
});
|
|
167
|
+
totalScore += contribution;
|
|
168
|
+
}
|
|
169
|
+
if (factors.includes('defect-history')) {
|
|
170
|
+
const score = await calculateDefectHistory(gap, bridge);
|
|
171
|
+
const contribution = score * weights.defectHistory;
|
|
172
|
+
factorScores.push({
|
|
173
|
+
factor: 'defect-history',
|
|
174
|
+
score,
|
|
175
|
+
weight: weights.defectHistory,
|
|
176
|
+
contribution,
|
|
177
|
+
details: `Historical defects: ${Math.round(score * 5)}`,
|
|
178
|
+
});
|
|
179
|
+
totalScore += contribution;
|
|
180
|
+
}
|
|
181
|
+
if (factors.includes('business-critical')) {
|
|
182
|
+
const score = calculateBusinessCriticality(gap);
|
|
183
|
+
const contribution = score * weights.businessCritical;
|
|
184
|
+
factorScores.push({
|
|
185
|
+
factor: 'business-critical',
|
|
186
|
+
score,
|
|
187
|
+
weight: weights.businessCritical,
|
|
188
|
+
contribution,
|
|
189
|
+
details: `Business impact: ${score > 0.7 ? 'high' : score > 0.4 ? 'medium' : 'low'}`,
|
|
190
|
+
});
|
|
191
|
+
totalScore += contribution;
|
|
192
|
+
}
|
|
193
|
+
if (factors.includes('dependency-count')) {
|
|
194
|
+
const score = calculateDependencyScore(gap);
|
|
195
|
+
const contribution = score * weights.dependencyCount;
|
|
196
|
+
factorScores.push({
|
|
197
|
+
factor: 'dependency-count',
|
|
198
|
+
score,
|
|
199
|
+
weight: weights.dependencyCount,
|
|
200
|
+
contribution,
|
|
201
|
+
details: `Dependents: ${Math.round(score * 15)}`,
|
|
202
|
+
});
|
|
203
|
+
totalScore += contribution;
|
|
204
|
+
}
|
|
205
|
+
if (factors.includes('test-difficulty')) {
|
|
206
|
+
const score = calculateTestDifficulty(gap);
|
|
207
|
+
const contribution = score * weights.testDifficulty;
|
|
208
|
+
factorScores.push({
|
|
209
|
+
factor: 'test-difficulty',
|
|
210
|
+
score,
|
|
211
|
+
weight: weights.testDifficulty,
|
|
212
|
+
contribution,
|
|
213
|
+
details: `Test complexity: ${score > 0.7 ? 'hard' : score > 0.4 ? 'medium' : 'easy'}`,
|
|
214
|
+
});
|
|
215
|
+
totalScore += contribution;
|
|
216
|
+
}
|
|
217
|
+
// Normalize score
|
|
218
|
+
const priorityScore = Math.round(totalScore * 100) / 100;
|
|
219
|
+
// Determine risk level
|
|
220
|
+
const risk = scoreToRisk(priorityScore);
|
|
221
|
+
// Calculate effort and ROI
|
|
222
|
+
const effort = calculateEffort(gap, factorScores);
|
|
223
|
+
const roi = calculateROI(priorityScore, effort);
|
|
224
|
+
prioritizedGaps.push({
|
|
225
|
+
id: gap.id,
|
|
226
|
+
type: gap.type,
|
|
227
|
+
file: gap.file,
|
|
228
|
+
location: { startLine: gap.startLine, endLine: gap.endLine },
|
|
229
|
+
risk,
|
|
230
|
+
priorityScore,
|
|
231
|
+
factors: factorScores,
|
|
232
|
+
effort,
|
|
233
|
+
roi,
|
|
234
|
+
});
|
|
235
|
+
}
|
|
236
|
+
return prioritizedGaps;
|
|
237
|
+
}
|
|
238
|
+
function calculateComplexityScore(gap) {
|
|
239
|
+
const lines = gap.endLine - gap.startLine;
|
|
240
|
+
// Estimate cyclomatic complexity from line count
|
|
241
|
+
const estimatedComplexity = lines / 5;
|
|
242
|
+
return Math.min(estimatedComplexity / 10, 1);
|
|
243
|
+
}
|
|
244
|
+
function calculateChangeFrequency(gap) {
|
|
245
|
+
// Proxy: deeper paths in the tree tend to be more stable, shallower paths change more.
|
|
246
|
+
// A real implementation would query `git log --follow -n 30 -- <file>`.
|
|
247
|
+
const pathDepth = gap.file.split('/').length;
|
|
248
|
+
return Math.min(pathDepth / 10, 1) * 0.8;
|
|
249
|
+
}
|
|
250
|
+
async function calculateDefectHistory(gap, bridge) {
|
|
251
|
+
if (bridge) {
|
|
252
|
+
try {
|
|
253
|
+
const patterns = await bridge.searchSimilarPatterns(`defect ${gap.file}`, 3);
|
|
254
|
+
return Math.min(patterns.length / 5, 1);
|
|
255
|
+
}
|
|
256
|
+
catch {
|
|
257
|
+
// Fall through to neutral score
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
// No bridge and no historical data available — return neutral score.
|
|
261
|
+
return 0;
|
|
262
|
+
}
|
|
263
|
+
function calculateBusinessCriticality(gap) {
|
|
264
|
+
// Determine criticality based on file path
|
|
265
|
+
const criticalPaths = ['auth', 'payment', 'security', 'core', 'api'];
|
|
266
|
+
const pathLower = gap.file.toLowerCase();
|
|
267
|
+
for (const path of criticalPaths) {
|
|
268
|
+
if (pathLower.includes(path)) {
|
|
269
|
+
return 0.9;
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
return 0.3;
|
|
273
|
+
}
|
|
274
|
+
function calculateDependencyScore(gap) {
|
|
275
|
+
// Proxy: larger code blocks tend to have more callers. Real implementation would
|
|
276
|
+
// query the monograph dependency graph for actual dependent count.
|
|
277
|
+
const lines = gap.endLine - gap.startLine;
|
|
278
|
+
return Math.min(lines / 50, 1);
|
|
279
|
+
}
|
|
280
|
+
function calculateTestDifficulty(gap) {
|
|
281
|
+
// Estimate test difficulty
|
|
282
|
+
const lines = gap.endLine - gap.startLine;
|
|
283
|
+
if (lines > 30)
|
|
284
|
+
return 0.8;
|
|
285
|
+
if (lines > 15)
|
|
286
|
+
return 0.5;
|
|
287
|
+
return 0.2;
|
|
288
|
+
}
|
|
289
|
+
function scoreToRisk(score) {
|
|
290
|
+
if (score >= 0.75)
|
|
291
|
+
return 'critical';
|
|
292
|
+
if (score >= 0.5)
|
|
293
|
+
return 'high';
|
|
294
|
+
if (score >= 0.25)
|
|
295
|
+
return 'medium';
|
|
296
|
+
return 'low';
|
|
297
|
+
}
|
|
298
|
+
function calculateEffort(gap, factors) {
|
|
299
|
+
const lines = gap.endLine - gap.startLine;
|
|
300
|
+
const difficultyFactor = factors.find((f) => f.factor === 'test-difficulty');
|
|
301
|
+
const difficulty = difficultyFactor?.score ?? 0.5;
|
|
302
|
+
const effortScore = (lines / 50) * 0.5 + difficulty * 0.5;
|
|
303
|
+
if (effortScore > 0.7)
|
|
304
|
+
return 'high';
|
|
305
|
+
if (effortScore > 0.3)
|
|
306
|
+
return 'medium';
|
|
307
|
+
return 'low';
|
|
308
|
+
}
|
|
309
|
+
function calculateROI(priorityScore, effort) {
|
|
310
|
+
const effortMultiplier = { low: 3, medium: 2, high: 1 };
|
|
311
|
+
return Math.round(priorityScore * effortMultiplier[effort] * 100) / 100;
|
|
312
|
+
}
|
|
313
|
+
function groupGaps(gaps, groupBy) {
|
|
314
|
+
const groups = new Map();
|
|
315
|
+
for (const gap of gaps) {
|
|
316
|
+
let key;
|
|
317
|
+
switch (groupBy) {
|
|
318
|
+
case 'risk':
|
|
319
|
+
key = gap.risk;
|
|
320
|
+
break;
|
|
321
|
+
case 'file':
|
|
322
|
+
key = gap.file;
|
|
323
|
+
break;
|
|
324
|
+
case 'type':
|
|
325
|
+
key = gap.type;
|
|
326
|
+
break;
|
|
327
|
+
default:
|
|
328
|
+
key = 'all';
|
|
329
|
+
}
|
|
330
|
+
if (!groups.has(key)) {
|
|
331
|
+
groups.set(key, []);
|
|
332
|
+
}
|
|
333
|
+
groups.get(key).push(gap);
|
|
334
|
+
}
|
|
335
|
+
return Array.from(groups.entries()).map(([name, gapList]) => ({
|
|
336
|
+
name,
|
|
337
|
+
count: gapList.length,
|
|
338
|
+
avgPriorityScore: Math.round((gapList.reduce((sum, g) => sum + g.priorityScore, 0) / gapList.length) * 100) / 100,
|
|
339
|
+
gaps: gapList,
|
|
340
|
+
}));
|
|
341
|
+
}
|
|
342
|
+
function calculateStatistics(gaps) {
|
|
343
|
+
const total = gaps.length;
|
|
344
|
+
if (total === 0) {
|
|
345
|
+
return {
|
|
346
|
+
totalGaps: 0,
|
|
347
|
+
criticalCount: 0,
|
|
348
|
+
highCount: 0,
|
|
349
|
+
mediumCount: 0,
|
|
350
|
+
lowCount: 0,
|
|
351
|
+
avgPriorityScore: 0,
|
|
352
|
+
avgEffort: 'unknown',
|
|
353
|
+
estimatedTestingEffort: '0 hours',
|
|
354
|
+
};
|
|
355
|
+
}
|
|
356
|
+
const counts = { critical: 0, high: 0, medium: 0, low: 0 };
|
|
357
|
+
const efforts = { low: 0, medium: 0, high: 0 };
|
|
358
|
+
for (const gap of gaps) {
|
|
359
|
+
counts[gap.risk]++;
|
|
360
|
+
efforts[gap.effort]++;
|
|
361
|
+
}
|
|
362
|
+
const avgScore = gaps.reduce((sum, g) => sum + g.priorityScore, 0) / total;
|
|
363
|
+
// Estimate testing effort
|
|
364
|
+
const hours = efforts.low * 0.5 + efforts.medium * 2 + efforts.high * 5;
|
|
365
|
+
return {
|
|
366
|
+
totalGaps: total,
|
|
367
|
+
criticalCount: counts.critical,
|
|
368
|
+
highCount: counts.high,
|
|
369
|
+
mediumCount: counts.medium,
|
|
370
|
+
lowCount: counts.low,
|
|
371
|
+
avgPriorityScore: Math.round(avgScore * 100) / 100,
|
|
372
|
+
avgEffort: efforts.high > efforts.medium && efforts.high > efforts.low ? 'high' : efforts.medium > efforts.low ? 'medium' : 'low',
|
|
373
|
+
estimatedTestingEffort: `${Math.round(hours)} hours`,
|
|
374
|
+
};
|
|
375
|
+
}
|
|
376
|
+
function generateRecommendations(gaps, stats) {
|
|
377
|
+
const recommendations = [];
|
|
378
|
+
// Immediate action for critical gaps
|
|
379
|
+
const criticalGaps = gaps.filter((g) => g.risk === 'critical');
|
|
380
|
+
if (criticalGaps.length > 0) {
|
|
381
|
+
recommendations.push({
|
|
382
|
+
type: 'immediate-action',
|
|
383
|
+
priority: 1,
|
|
384
|
+
description: `Address ${criticalGaps.length} critical coverage gaps immediately`,
|
|
385
|
+
affectedGaps: criticalGaps.map((g) => g.id),
|
|
386
|
+
expectedImpact: 'Significant risk reduction',
|
|
387
|
+
});
|
|
388
|
+
}
|
|
389
|
+
// High ROI opportunities
|
|
390
|
+
const highROI = gaps.filter((g) => g.roi > 1).slice(0, 5);
|
|
391
|
+
if (highROI.length > 0) {
|
|
392
|
+
recommendations.push({
|
|
393
|
+
type: 'short-term',
|
|
394
|
+
priority: 2,
|
|
395
|
+
description: `Focus on ${highROI.length} high-ROI gaps for maximum coverage impact`,
|
|
396
|
+
affectedGaps: highROI.map((g) => g.id),
|
|
397
|
+
expectedImpact: 'Best coverage improvement per effort invested',
|
|
398
|
+
});
|
|
399
|
+
}
|
|
400
|
+
// Long-term refactoring
|
|
401
|
+
const complexGaps = gaps.filter((g) => g.effort === 'high');
|
|
402
|
+
if (complexGaps.length > 3) {
|
|
403
|
+
recommendations.push({
|
|
404
|
+
type: 'long-term',
|
|
405
|
+
priority: 3,
|
|
406
|
+
description: `Consider refactoring ${complexGaps.length} complex areas before testing`,
|
|
407
|
+
affectedGaps: complexGaps.slice(0, 5).map((g) => g.id),
|
|
408
|
+
expectedImpact: 'Improved testability and maintainability',
|
|
409
|
+
});
|
|
410
|
+
}
|
|
411
|
+
return recommendations;
|
|
412
|
+
}
|
|
413
|
+
// Export tool definition for MCP registration
|
|
414
|
+
export const toolDefinition = {
|
|
415
|
+
name: 'aqe/prioritize-gaps',
|
|
416
|
+
description: 'Prioritize coverage gaps by risk score using multiple weighted factors',
|
|
417
|
+
category: 'coverage-analysis',
|
|
418
|
+
version: '3.2.3',
|
|
419
|
+
inputSchema: PrioritizeGapsInputSchema,
|
|
420
|
+
handler,
|
|
421
|
+
};
|
|
422
|
+
export default toolDefinition;
|
|
423
|
+
//# sourceMappingURL=prioritize-gaps.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prioritize-gaps.js","sourceRoot":"","sources":["../../../../../src/mcp-tools/quality/coverage-analysis/prioritize-gaps.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,wCAAwC;AACxC,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC,CAAC,MAAM,CAAC;IAChD,IAAI,EAAE,CAAC;SACJ,KAAK,CACJ,CAAC,CAAC,MAAM,CAAC;QACP,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE;QACd,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,QAAQ,EAAE,UAAU,CAAC,CAAC;QAC5C,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;QAChB,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE;QACrB,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE;KACpB,CAAC,CACH;SACA,QAAQ,EAAE;SACV,QAAQ,CAAC,qDAAqD,CAAC;IAClE,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,sCAAsC,CAAC;IAClF,OAAO,EAAE,CAAC;SACP,KAAK,CACJ,CAAC,CAAC,IAAI,CAAC;QACL,YAAY;QACZ,kBAAkB;QAClB,gBAAgB;QAChB,mBAAmB;QACnB,kBAAkB;QAClB,i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AM,CAAC,CAAC;IAC5D,IAAI,WAAW,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAC3B,eAAe,CAAC,IAAI,CAAC;YACnB,IAAI,EAAE,WAAW;YACjB,QAAQ,EAAE,CAAC;YACX,WAAW,EAAE,wBAAwB,WAAW,CAAC,MAAM,+BAA+B;YACtF,YAAY,EAAE,WAAW,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;YACtD,cAAc,EAAE,0CAA0C;SAC3D,CAAC,CAAC;IACL,CAAC;IAED,OAAO,eAAe,CAAC;AACzB,CAAC;AAED,8CAA8C;AAC9C,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,IAAI,EAAE,qBAAqB;IAC3B,WAAW,EAAE,wEAAwE;IACrF,QAAQ,EAAE,mBAAmB;IAC7B,OAAO,EAAE,OAAO;IAChB,WAAW,EAAE,yBAAyB;IACtC,OAAO;CACR,CAAC;AAEF,eAAe,cAAc,CAAC"}
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* track-trends.ts - Coverage trend tracking MCP tool handler
|
|
3
|
+
*
|
|
4
|
+
* Tracks coverage trends over time, detecting patterns, regressions,
|
|
5
|
+
* and improvements to provide actionable insights.
|
|
6
|
+
*/
|
|
7
|
+
import { z } from 'zod';
|
|
8
|
+
export declare const TrackTrendsInputSchema: z.ZodObject<{
|
|
9
|
+
targetPath: z.ZodOptional<z.ZodString>;
|
|
10
|
+
timeRange: z.ZodDefault<z.ZodEnum<{
|
|
11
|
+
"30d": "30d";
|
|
12
|
+
"7d": "7d";
|
|
13
|
+
"14d": "14d";
|
|
14
|
+
"90d": "90d";
|
|
15
|
+
"180d": "180d";
|
|
16
|
+
"365d": "365d";
|
|
17
|
+
}>>;
|
|
18
|
+
metrics: z.ZodDefault<z.ZodArray<z.ZodEnum<{
|
|
19
|
+
function: "function";
|
|
20
|
+
line: "line";
|
|
21
|
+
overall: "overall";
|
|
22
|
+
branch: "branch";
|
|
23
|
+
statement: "statement";
|
|
24
|
+
}>>>;
|
|
25
|
+
detectRegressions: z.ZodDefault<z.ZodBoolean>;
|
|
26
|
+
regressionThreshold: z.ZodDefault<z.ZodNumber>;
|
|
27
|
+
groupBy: z.ZodDefault<z.ZodEnum<{
|
|
28
|
+
commit: "commit";
|
|
29
|
+
day: "day";
|
|
30
|
+
week: "week";
|
|
31
|
+
month: "month";
|
|
32
|
+
}>>;
|
|
33
|
+
includeProjections: z.ZodDefault<z.ZodBoolean>;
|
|
34
|
+
compareBaseline: z.ZodOptional<z.ZodString>;
|
|
35
|
+
}, z.core.$strip>;
|
|
36
|
+
export type TrackTrendsInput = z.infer<typeof TrackTrendsInputSchema>;
|
|
37
|
+
export interface TrackTrendsOutput {
|
|
38
|
+
success: boolean;
|
|
39
|
+
trends: TrendData;
|
|
40
|
+
regressions: Regression[];
|
|
41
|
+
improvements: Improvement[];
|
|
42
|
+
projections: Projection[];
|
|
43
|
+
insights: TrendInsight[];
|
|
44
|
+
metadata: TrendMetadata;
|
|
45
|
+
}
|
|
46
|
+
export interface TrendData {
|
|
47
|
+
timeRange: {
|
|
48
|
+
start: string;
|
|
49
|
+
end: string;
|
|
50
|
+
};
|
|
51
|
+
dataPoints: TrendDataPoint[];
|
|
52
|
+
aggregates: TrendAggregates;
|
|
53
|
+
volatility: number;
|
|
54
|
+
}
|
|
55
|
+
export interface TrendDataPoint {
|
|
56
|
+
date: string;
|
|
57
|
+
commitHash?: string;
|
|
58
|
+
metrics: Record<string, number>;
|
|
59
|
+
filesChanged: number;
|
|
60
|
+
testsAdded: number;
|
|
61
|
+
}
|
|
62
|
+
export interface TrendAggregates {
|
|
63
|
+
avgLine: number;
|
|
64
|
+
avgBranch: number;
|
|
65
|
+
avgFunction: number;
|
|
66
|
+
avgOverall: number;
|
|
67
|
+
minOverall: number;
|
|
68
|
+
maxOverall: number;
|
|
69
|
+
change: number;
|
|
70
|
+
changePercent: number;
|
|
71
|
+
}
|
|
72
|
+
export interface Regression {
|
|
73
|
+
id: string;
|
|
74
|
+
date: string;
|
|
75
|
+
metric: string;
|
|
76
|
+
before: number;
|
|
77
|
+
after: number;
|
|
78
|
+
drop: number;
|
|
79
|
+
severity: 'minor' | 'moderate' | 'major' | 'critical';
|
|
80
|
+
possibleCauses: string[];
|
|
81
|
+
affectedFiles: string[];
|
|
82
|
+
}
|
|
83
|
+
export interface Improvement {
|
|
84
|
+
id: string;
|
|
85
|
+
date: string;
|
|
86
|
+
metric: string;
|
|
87
|
+
before: number;
|
|
88
|
+
after: number;
|
|
89
|
+
gain: number;
|
|
90
|
+
type: 'test-addition' | 'refactoring' | 'dead-code-removal' | 'other';
|
|
91
|
+
contributors: string[];
|
|
92
|
+
}
|
|
93
|
+
export interface Projection {
|
|
94
|
+
metric: string;
|
|
95
|
+
currentValue: number;
|
|
96
|
+
projectedValue: number;
|
|
97
|
+
targetDate: string;
|
|
98
|
+
confidence: number;
|
|
99
|
+
requiredPace: number;
|
|
100
|
+
onTrack: boolean;
|
|
101
|
+
}
|
|
102
|
+
export interface TrendInsight {
|
|
103
|
+
type: 'pattern' | 'anomaly' | 'recommendation' | 'warning';
|
|
104
|
+
title: string;
|
|
105
|
+
description: string;
|
|
106
|
+
impact: 'low' | 'medium' | 'high';
|
|
107
|
+
actionable: boolean;
|
|
108
|
+
suggestedAction?: string;
|
|
109
|
+
}
|
|
110
|
+
export interface TrendMetadata {
|
|
111
|
+
analyzedAt: string;
|
|
112
|
+
durationMs: number;
|
|
113
|
+
dataPointCount: number;
|
|
114
|
+
timeRange: string;
|
|
115
|
+
baselineDate?: string;
|
|
116
|
+
}
|
|
117
|
+
export interface ToolContext {
|
|
118
|
+
get<T>(key: string): T | undefined;
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* MCP Tool Handler for track-trends
|
|
122
|
+
*/
|
|
123
|
+
export declare function handler(input: TrackTrendsInput, context: ToolContext): Promise<{
|
|
124
|
+
content: Array<{
|
|
125
|
+
type: 'text';
|
|
126
|
+
text: string;
|
|
127
|
+
}>;
|
|
128
|
+
}>;
|
|
129
|
+
export declare const toolDefinition: {
|
|
130
|
+
name: string;
|
|
131
|
+
description: string;
|
|
132
|
+
category: string;
|
|
133
|
+
version: string;
|
|
134
|
+
inputSchema: z.ZodObject<{
|
|
135
|
+
targetPath: z.ZodOptional<z.ZodString>;
|
|
136
|
+
timeRange: z.ZodDefault<z.ZodEnum<{
|
|
137
|
+
"30d": "30d";
|
|
138
|
+
"7d": "7d";
|
|
139
|
+
"14d": "14d";
|
|
140
|
+
"90d": "90d";
|
|
141
|
+
"180d": "180d";
|
|
142
|
+
"365d": "365d";
|
|
143
|
+
}>>;
|
|
144
|
+
metrics: z.ZodDefault<z.ZodArray<z.ZodEnum<{
|
|
145
|
+
function: "function";
|
|
146
|
+
line: "line";
|
|
147
|
+
overall: "overall";
|
|
148
|
+
branch: "branch";
|
|
149
|
+
statement: "statement";
|
|
150
|
+
}>>>;
|
|
151
|
+
detectRegressions: z.ZodDefault<z.ZodBoolean>;
|
|
152
|
+
regressionThreshold: z.ZodDefault<z.ZodNumber>;
|
|
153
|
+
groupBy: z.ZodDefault<z.ZodEnum<{
|
|
154
|
+
commit: "commit";
|
|
155
|
+
day: "day";
|
|
156
|
+
week: "week";
|
|
157
|
+
month: "month";
|
|
158
|
+
}>>;
|
|
159
|
+
includeProjections: z.ZodDefault<z.ZodBoolean>;
|
|
160
|
+
compareBaseline: z.ZodOptional<z.ZodString>;
|
|
161
|
+
}, z.core.$strip>;
|
|
162
|
+
handler: typeof handler;
|
|
163
|
+
};
|
|
164
|
+
export default toolDefinition;
|
|
165
|
+
//# sourceMappingURL=track-trends.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"track-trends.d.ts","sourceRoot":"","sources":["../../../../../src/mcp-tools/quality/coverage-analysis/track-trends.ts"],"names":[],"mappings":"AAAA;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