agentic-qe 2.7.1 → 2.7.2
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/CHANGELOG.md +105 -0
- package/README.md +2 -2
- package/dist/agents/CodeIntelligenceAgent.d.ts.map +1 -1
- package/dist/agents/CodeIntelligenceAgent.js +7 -5
- package/dist/agents/CodeIntelligenceAgent.js.map +1 -1
- package/dist/cli/commands/knowledge-graph.d.ts.map +1 -1
- package/dist/cli/commands/knowledge-graph.js +4 -2
- package/dist/cli/commands/knowledge-graph.js.map +1 -1
- package/dist/cli/commands/migrate/index.d.ts +14 -0
- package/dist/cli/commands/migrate/index.d.ts.map +1 -0
- package/dist/cli/commands/migrate/index.js +283 -0
- package/dist/cli/commands/migrate/index.js.map +1 -0
- package/dist/cli/formatters/KGOutputFormatter.d.ts.map +1 -1
- package/dist/cli/formatters/KGOutputFormatter.js +15 -6
- package/dist/cli/formatters/KGOutputFormatter.js.map +1 -1
- package/dist/cli/index.js +3 -0
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/init/database-init.d.ts.map +1 -1
- package/dist/cli/init/database-init.js +105 -0
- package/dist/cli/init/database-init.js.map +1 -1
- package/dist/code-intelligence/orchestrator/CodeIntelligenceOrchestrator.d.ts +9 -3
- package/dist/code-intelligence/orchestrator/CodeIntelligenceOrchestrator.d.ts.map +1 -1
- package/dist/code-intelligence/orchestrator/CodeIntelligenceOrchestrator.js +41 -3
- package/dist/code-intelligence/orchestrator/CodeIntelligenceOrchestrator.js.map +1 -1
- package/dist/code-intelligence/service/CodeIntelligenceService.js +1 -1
- package/dist/code-intelligence/service/CodeIntelligenceService.js.map +1 -1
- package/dist/core/memory/HNSWVectorMemory.js +1 -1
- package/dist/learning/QLearning.d.ts +9 -1
- package/dist/learning/QLearning.d.ts.map +1 -1
- package/dist/learning/QLearning.js +50 -1
- package/dist/learning/QLearning.js.map +1 -1
- package/dist/learning/metrics/LearningMetrics.d.ts +37 -0
- package/dist/learning/metrics/LearningMetrics.d.ts.map +1 -1
- package/dist/learning/metrics/LearningMetrics.js +73 -0
- package/dist/learning/metrics/LearningMetrics.js.map +1 -1
- package/dist/mcp/handlers/fleet-init.d.ts +10 -0
- package/dist/mcp/handlers/fleet-init.d.ts.map +1 -1
- package/dist/mcp/handlers/fleet-init.js +61 -0
- package/dist/mcp/handlers/fleet-init.js.map +1 -1
- package/dist/mcp/handlers/learning/learning-store-pattern.d.ts +13 -0
- package/dist/mcp/handlers/learning/learning-store-pattern.d.ts.map +1 -1
- package/dist/mcp/handlers/learning/learning-store-pattern.js +38 -0
- package/dist/mcp/handlers/learning/learning-store-pattern.js.map +1 -1
- package/dist/mcp/handlers/phase3/Phase3DomainTools.d.ts +89 -0
- package/dist/mcp/handlers/phase3/Phase3DomainTools.d.ts.map +1 -1
- package/dist/mcp/handlers/phase3/Phase3DomainTools.js +110 -1
- package/dist/mcp/handlers/phase3/Phase3DomainTools.js.map +1 -1
- package/dist/mcp/handlers/task-orchestrate.d.ts +27 -1
- package/dist/mcp/handlers/task-orchestrate.d.ts.map +1 -1
- package/dist/mcp/handlers/task-orchestrate.js +188 -8
- package/dist/mcp/handlers/task-orchestrate.js.map +1 -1
- package/dist/mcp/server-instructions.d.ts +1 -1
- package/dist/mcp/server-instructions.js +1 -1
- package/dist/mcp/server.d.ts +6 -0
- package/dist/mcp/server.d.ts.map +1 -1
- package/dist/mcp/server.js +92 -2
- package/dist/mcp/server.js.map +1 -1
- package/dist/mcp/services/AgentRegistry.d.ts +13 -0
- package/dist/mcp/services/AgentRegistry.d.ts.map +1 -1
- package/dist/mcp/services/AgentRegistry.js +66 -0
- package/dist/mcp/services/AgentRegistry.js.map +1 -1
- package/dist/mcp/tools/qe/quality-gates/evaluate-quality-gate.d.ts +55 -0
- package/dist/mcp/tools/qe/quality-gates/evaluate-quality-gate.d.ts.map +1 -1
- package/dist/mcp/tools/qe/quality-gates/evaluate-quality-gate.js +233 -0
- package/dist/mcp/tools/qe/quality-gates/evaluate-quality-gate.js.map +1 -1
- package/dist/mcp/tools/qe/quality-gates/index.d.ts +5 -2
- package/dist/mcp/tools/qe/quality-gates/index.d.ts.map +1 -1
- package/dist/mcp/tools/qe/quality-gates/index.js +10 -1
- package/dist/mcp/tools/qe/quality-gates/index.js.map +1 -1
- package/dist/mcp/tools.d.ts +1 -0
- package/dist/mcp/tools.d.ts.map +1 -1
- package/dist/mcp/tools.js +156 -1
- package/dist/mcp/tools.js.map +1 -1
- package/dist/persistence/migrations/all-migrations.d.ts +18 -0
- package/dist/persistence/migrations/all-migrations.d.ts.map +1 -0
- package/dist/persistence/migrations/all-migrations.js +624 -0
- package/dist/persistence/migrations/all-migrations.js.map +1 -0
- package/dist/persistence/migrations/index.d.ts +110 -0
- package/dist/persistence/migrations/index.d.ts.map +1 -0
- package/dist/persistence/migrations/index.js +303 -0
- package/dist/persistence/migrations/index.js.map +1 -0
- package/dist/planning/GOAPPlanner.d.ts +128 -0
- package/dist/planning/GOAPPlanner.d.ts.map +1 -0
- package/dist/planning/GOAPPlanner.js +630 -0
- package/dist/planning/GOAPPlanner.js.map +1 -0
- package/dist/planning/WorldStateBuilder.d.ts +150 -0
- package/dist/planning/WorldStateBuilder.d.ts.map +1 -0
- package/dist/planning/WorldStateBuilder.js +267 -0
- package/dist/planning/WorldStateBuilder.js.map +1 -0
- package/dist/planning/actions/fleet-actions.d.ts +78 -0
- package/dist/planning/actions/fleet-actions.d.ts.map +1 -0
- package/dist/planning/actions/fleet-actions.js +329 -0
- package/dist/planning/actions/fleet-actions.js.map +1 -0
- package/dist/planning/actions/index.d.ts +61 -0
- package/dist/planning/actions/index.d.ts.map +1 -0
- package/dist/planning/actions/index.js +159 -0
- package/dist/planning/actions/index.js.map +1 -0
- package/dist/planning/actions/orchestration-actions.d.ts +61 -0
- package/dist/planning/actions/orchestration-actions.d.ts.map +1 -0
- package/dist/planning/actions/orchestration-actions.js +395 -0
- package/dist/planning/actions/orchestration-actions.js.map +1 -0
- package/dist/planning/actions/quality-gate-actions.d.ts +160 -0
- package/dist/planning/actions/quality-gate-actions.d.ts.map +1 -0
- package/dist/planning/actions/quality-gate-actions.js +639 -0
- package/dist/planning/actions/quality-gate-actions.js.map +1 -0
- package/dist/planning/actions/test-strategy-actions.d.ts +70 -0
- package/dist/planning/actions/test-strategy-actions.d.ts.map +1 -0
- package/dist/planning/actions/test-strategy-actions.js +278 -0
- package/dist/planning/actions/test-strategy-actions.js.map +1 -0
- package/dist/planning/execution/PlanExecutor.d.ts +124 -0
- package/dist/planning/execution/PlanExecutor.d.ts.map +1 -0
- package/dist/planning/execution/PlanExecutor.js +405 -0
- package/dist/planning/execution/PlanExecutor.js.map +1 -0
- package/dist/planning/execution/index.d.ts +12 -0
- package/dist/planning/execution/index.d.ts.map +1 -0
- package/dist/planning/execution/index.js +18 -0
- package/dist/planning/execution/index.js.map +1 -0
- package/dist/planning/goals/TaskWorkflowGoals.d.ts +67 -0
- package/dist/planning/goals/TaskWorkflowGoals.d.ts.map +1 -0
- package/dist/planning/goals/TaskWorkflowGoals.js +208 -0
- package/dist/planning/goals/TaskWorkflowGoals.js.map +1 -0
- package/dist/planning/goals/index.d.ts +10 -0
- package/dist/planning/goals/index.d.ts.map +1 -0
- package/dist/planning/goals/index.js +19 -0
- package/dist/planning/goals/index.js.map +1 -0
- package/dist/planning/index.d.ts +34 -0
- package/dist/planning/index.d.ts.map +1 -0
- package/dist/planning/index.js +176 -0
- package/dist/planning/index.js.map +1 -0
- package/dist/planning/integration/GOAPQualityGateIntegration.d.ts +229 -0
- package/dist/planning/integration/GOAPQualityGateIntegration.d.ts.map +1 -0
- package/dist/planning/integration/GOAPQualityGateIntegration.js +582 -0
- package/dist/planning/integration/GOAPQualityGateIntegration.js.map +1 -0
- package/dist/planning/integration/GOAPTaskOrchestration.d.ts +165 -0
- package/dist/planning/integration/GOAPTaskOrchestration.d.ts.map +1 -0
- package/dist/planning/integration/GOAPTaskOrchestration.js +490 -0
- package/dist/planning/integration/GOAPTaskOrchestration.js.map +1 -0
- package/dist/planning/integration/index.d.ts +14 -0
- package/dist/planning/integration/index.d.ts.map +1 -0
- package/dist/planning/integration/index.js +23 -0
- package/dist/planning/integration/index.js.map +1 -0
- package/dist/planning/types.d.ts +264 -0
- package/dist/planning/types.d.ts.map +1 -0
- package/dist/planning/types.js +63 -0
- package/dist/planning/types.js.map +1 -0
- package/dist/utils/Database.d.ts.map +1 -1
- package/dist/utils/Database.js +81 -2
- package/dist/utils/Database.js.map +1 -1
- package/package.json +6 -3
|
@@ -0,0 +1,582 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* GOAP Quality Gate Integration
|
|
4
|
+
*
|
|
5
|
+
* Bridges GOAP planning with quality gate evaluation:
|
|
6
|
+
* - Converts quality metrics to WorldState
|
|
7
|
+
* - Generates remediation plans on gate failure
|
|
8
|
+
* - Tracks plan execution and success rates
|
|
9
|
+
* - Provides alternative paths when primary actions fail
|
|
10
|
+
*
|
|
11
|
+
* @module planning/integration/GOAPQualityGateIntegration
|
|
12
|
+
* @version 1.0.0
|
|
13
|
+
*/
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.GOAPQualityGateIntegration = exports.QUALITY_GATE_GOALS = void 0;
|
|
16
|
+
exports.createQualityGateIntegration = createQualityGateIntegration;
|
|
17
|
+
const GOAPPlanner_1 = require("../GOAPPlanner");
|
|
18
|
+
const WorldStateBuilder_1 = require("../WorldStateBuilder");
|
|
19
|
+
const quality_gate_actions_1 = require("../actions/quality-gate-actions");
|
|
20
|
+
const test_strategy_actions_1 = require("../actions/test-strategy-actions");
|
|
21
|
+
const fleet_actions_1 = require("../actions/fleet-actions");
|
|
22
|
+
const Logger_1 = require("../../utils/Logger");
|
|
23
|
+
/**
|
|
24
|
+
* Goal definitions for quality gate scenarios
|
|
25
|
+
*/
|
|
26
|
+
exports.QUALITY_GATE_GOALS = {
|
|
27
|
+
/**
|
|
28
|
+
* Pass all quality gates with standard thresholds
|
|
29
|
+
*/
|
|
30
|
+
PASS_QUALITY_GATE: {
|
|
31
|
+
id: 'goal-pass-quality-gate',
|
|
32
|
+
name: 'Pass Quality Gate',
|
|
33
|
+
conditions: {
|
|
34
|
+
'quality.testsPassing': { gte: 95 },
|
|
35
|
+
'coverage.line': { gte: 80 },
|
|
36
|
+
'quality.securityScore': { gte: 70 },
|
|
37
|
+
'quality.performanceScore': { gte: 70 },
|
|
38
|
+
'quality.gateStatus': { eq: 'passed' }
|
|
39
|
+
},
|
|
40
|
+
priority: 5
|
|
41
|
+
},
|
|
42
|
+
/**
|
|
43
|
+
* Achieve minimum viable quality for hotfix
|
|
44
|
+
*/
|
|
45
|
+
HOTFIX_QUALITY: {
|
|
46
|
+
id: 'goal-hotfix-quality',
|
|
47
|
+
name: 'Hotfix Quality',
|
|
48
|
+
conditions: {
|
|
49
|
+
'quality.testsPassing': { gte: 90 },
|
|
50
|
+
'quality.securityScore': { gte: 80 },
|
|
51
|
+
'quality.smokeTestsPassing': { eq: true }
|
|
52
|
+
},
|
|
53
|
+
priority: 4
|
|
54
|
+
},
|
|
55
|
+
/**
|
|
56
|
+
* Fix test failures to reach passing threshold
|
|
57
|
+
*/
|
|
58
|
+
TEST_SUCCESS: {
|
|
59
|
+
id: 'goal-test-success',
|
|
60
|
+
name: 'Test Success',
|
|
61
|
+
conditions: {
|
|
62
|
+
'quality.testsPassing': { gte: 95 }
|
|
63
|
+
},
|
|
64
|
+
priority: 3
|
|
65
|
+
},
|
|
66
|
+
/**
|
|
67
|
+
* Improve coverage to target threshold
|
|
68
|
+
*/
|
|
69
|
+
COVERAGE_TARGET: {
|
|
70
|
+
id: 'goal-coverage-target',
|
|
71
|
+
name: 'Coverage Target',
|
|
72
|
+
conditions: {
|
|
73
|
+
'coverage.line': { gte: 80 },
|
|
74
|
+
'coverage.branch': { gte: 70 }
|
|
75
|
+
},
|
|
76
|
+
priority: 3
|
|
77
|
+
},
|
|
78
|
+
/**
|
|
79
|
+
* Resolve security vulnerabilities
|
|
80
|
+
*/
|
|
81
|
+
SECURITY_CLEAR: {
|
|
82
|
+
id: 'goal-security-clear',
|
|
83
|
+
name: 'Security Clear',
|
|
84
|
+
conditions: {
|
|
85
|
+
'quality.securityScore': { gte: 90 }
|
|
86
|
+
},
|
|
87
|
+
priority: 5
|
|
88
|
+
},
|
|
89
|
+
/**
|
|
90
|
+
* Performance meets SLA
|
|
91
|
+
*/
|
|
92
|
+
PERFORMANCE_SLA: {
|
|
93
|
+
id: 'goal-performance-sla',
|
|
94
|
+
name: 'Performance SLA',
|
|
95
|
+
conditions: {
|
|
96
|
+
'quality.performanceScore': { gte: 85 }
|
|
97
|
+
},
|
|
98
|
+
priority: 4
|
|
99
|
+
}
|
|
100
|
+
};
|
|
101
|
+
/**
|
|
102
|
+
* GOAP Quality Gate Integration
|
|
103
|
+
*/
|
|
104
|
+
class GOAPQualityGateIntegration {
|
|
105
|
+
constructor(db) {
|
|
106
|
+
this.initialized = false;
|
|
107
|
+
this.db = db;
|
|
108
|
+
this.planner = new GOAPPlanner_1.GOAPPlanner(db);
|
|
109
|
+
this.logger = Logger_1.Logger.getInstance();
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* Initialize planner with quality gate actions
|
|
113
|
+
*/
|
|
114
|
+
async initialize() {
|
|
115
|
+
if (this.initialized)
|
|
116
|
+
return;
|
|
117
|
+
// Register all relevant actions
|
|
118
|
+
this.planner.addActions(quality_gate_actions_1.qualityGateActions);
|
|
119
|
+
this.planner.addActions(test_strategy_actions_1.testStrategyActions);
|
|
120
|
+
this.planner.addActions(fleet_actions_1.fleetActions.filter(a => ['fleet-spawn-test-gen', 'fleet-spawn-coverage', 'fleet-spawn-security'].includes(a.id)));
|
|
121
|
+
this.initialized = true;
|
|
122
|
+
this.logger.info('[GOAPQualityGate] Initialized with actions', {
|
|
123
|
+
totalActions: this.planner.getActionLibrary().length
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* Close database connection and cleanup resources
|
|
128
|
+
* Call this in tests to prevent memory leaks
|
|
129
|
+
*/
|
|
130
|
+
close() {
|
|
131
|
+
try {
|
|
132
|
+
this.db.close();
|
|
133
|
+
}
|
|
134
|
+
catch {
|
|
135
|
+
// Ignore close errors (may already be closed)
|
|
136
|
+
}
|
|
137
|
+
this.initialized = false;
|
|
138
|
+
}
|
|
139
|
+
/**
|
|
140
|
+
* Convert quality gate metrics to GOAP WorldState
|
|
141
|
+
*/
|
|
142
|
+
buildWorldState(metrics, context) {
|
|
143
|
+
const qualityInput = {
|
|
144
|
+
coverage: {
|
|
145
|
+
line: metrics.coverage?.linePercentage ?? metrics.coverage?.overallPercentage ?? 0,
|
|
146
|
+
branch: metrics.coverage?.branchPercentage ?? 0,
|
|
147
|
+
function: metrics.coverage?.functionPercentage ?? 0
|
|
148
|
+
},
|
|
149
|
+
testsPassing: metrics.testResults?.passed,
|
|
150
|
+
testsTotal: metrics.testResults?.total,
|
|
151
|
+
securityVulnerabilities: {
|
|
152
|
+
critical: metrics.security?.summary?.critical ?? 0,
|
|
153
|
+
high: metrics.security?.summary?.high ?? 0,
|
|
154
|
+
medium: metrics.security?.summary?.medium ?? 0,
|
|
155
|
+
low: metrics.security?.summary?.low ?? 0
|
|
156
|
+
},
|
|
157
|
+
performanceMetrics: {
|
|
158
|
+
p95Latency: metrics.performance?.p95Latency,
|
|
159
|
+
throughput: metrics.performance?.throughput,
|
|
160
|
+
errorRate: metrics.performance?.errorRate
|
|
161
|
+
},
|
|
162
|
+
technicalDebt: {
|
|
163
|
+
days: metrics.codeQuality?.technicalDebtDays ?? 0
|
|
164
|
+
}
|
|
165
|
+
};
|
|
166
|
+
const contextInput = {
|
|
167
|
+
environment: context.environment,
|
|
168
|
+
riskLevel: this.mapCriticality(context.criticality),
|
|
169
|
+
changedFiles: context.changedFiles,
|
|
170
|
+
previousFailures: context.previousFailures ?? 0,
|
|
171
|
+
projectId: context.projectId
|
|
172
|
+
};
|
|
173
|
+
const builder = new WorldStateBuilder_1.WorldStateBuilder()
|
|
174
|
+
.withQualityMetrics(qualityInput)
|
|
175
|
+
.withContext(contextInput)
|
|
176
|
+
.withResources({
|
|
177
|
+
timeRemaining: context.timeRemaining ?? 3600,
|
|
178
|
+
parallelSlots: 4
|
|
179
|
+
});
|
|
180
|
+
// Add available agents if specified
|
|
181
|
+
if (context.availableAgents && context.availableAgents.length > 0) {
|
|
182
|
+
builder.withFleetStatus({
|
|
183
|
+
activeAgents: context.availableAgents.length,
|
|
184
|
+
availableAgents: context.availableAgents
|
|
185
|
+
});
|
|
186
|
+
}
|
|
187
|
+
else {
|
|
188
|
+
// Default available agents
|
|
189
|
+
builder.withFleetStatus({
|
|
190
|
+
activeAgents: 5,
|
|
191
|
+
availableAgents: [
|
|
192
|
+
'qe-test-executor',
|
|
193
|
+
'qe-test-generator',
|
|
194
|
+
'qe-coverage-analyzer',
|
|
195
|
+
'qe-security-scanner',
|
|
196
|
+
'qe-performance-tester'
|
|
197
|
+
]
|
|
198
|
+
});
|
|
199
|
+
}
|
|
200
|
+
return builder.build();
|
|
201
|
+
}
|
|
202
|
+
/**
|
|
203
|
+
* Generate remediation plan for quality gate failure
|
|
204
|
+
*/
|
|
205
|
+
async generateRemediationPlan(metrics, context, targetGoal) {
|
|
206
|
+
await this.initialize();
|
|
207
|
+
const worldState = this.buildWorldState(metrics, context);
|
|
208
|
+
const goal = exports.QUALITY_GATE_GOALS[targetGoal ?? 'PASS_QUALITY_GATE'];
|
|
209
|
+
this.logger.info('[GOAPQualityGate] Generating remediation plan', {
|
|
210
|
+
goal: goal.name,
|
|
211
|
+
currentCoverage: worldState.coverage.line,
|
|
212
|
+
targetConditions: Object.keys(goal.conditions)
|
|
213
|
+
});
|
|
214
|
+
// Define constraints based on context and goal type
|
|
215
|
+
const constraints = {
|
|
216
|
+
maxIterations: 3000,
|
|
217
|
+
timeoutMs: 8000,
|
|
218
|
+
maxPlanLength: 10
|
|
219
|
+
};
|
|
220
|
+
// Add goal-specific category preferences for faster search
|
|
221
|
+
if (targetGoal === 'SECURITY_CLEAR') {
|
|
222
|
+
// Focus on security actions for security goals
|
|
223
|
+
constraints.allowedCategories = ['security', 'process'];
|
|
224
|
+
}
|
|
225
|
+
else if (targetGoal === 'COVERAGE_TARGET') {
|
|
226
|
+
// Focus on test actions for coverage goals
|
|
227
|
+
constraints.allowedCategories = ['test', 'analysis', 'process'];
|
|
228
|
+
}
|
|
229
|
+
else if (targetGoal === 'PERFORMANCE_SLA') {
|
|
230
|
+
// Focus on performance actions
|
|
231
|
+
constraints.allowedCategories = ['performance', 'analysis', 'process'];
|
|
232
|
+
}
|
|
233
|
+
// PASS_QUALITY_GATE needs all categories
|
|
234
|
+
// Restrict actions for production
|
|
235
|
+
if (context.environment === 'production') {
|
|
236
|
+
constraints.allowedCategories = ['test', 'security', 'analysis', 'process'];
|
|
237
|
+
// Exclude risky actions in production
|
|
238
|
+
constraints.excludedActions = ['qg-fix-critical-vulns'];
|
|
239
|
+
}
|
|
240
|
+
try {
|
|
241
|
+
const plan = await this.planner.findPlan(worldState, goal.conditions, constraints);
|
|
242
|
+
if (!plan) {
|
|
243
|
+
this.logger.warn('[GOAPQualityGate] No remediation plan found');
|
|
244
|
+
return null;
|
|
245
|
+
}
|
|
246
|
+
// Find alternative paths
|
|
247
|
+
const alternatives = await this.findAlternativePaths(worldState, goal.conditions, plan, constraints);
|
|
248
|
+
// Calculate success probability
|
|
249
|
+
const successProbability = this.calculateSuccessProbability(plan);
|
|
250
|
+
// Persist plan
|
|
251
|
+
await this.persistPlan(plan, context, goal.id);
|
|
252
|
+
return this.formatRemediationPlan(plan, alternatives, successProbability);
|
|
253
|
+
}
|
|
254
|
+
catch (error) {
|
|
255
|
+
this.logger.error('[GOAPQualityGate] Failed to generate remediation plan', { error });
|
|
256
|
+
return null;
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
/**
|
|
260
|
+
* Find alternative remediation paths
|
|
261
|
+
*
|
|
262
|
+
* STRATEGY: With flag-based actions, we have two types:
|
|
263
|
+
* 1. MEASUREMENT actions (set flags like testsMeasured=true) - MUST run, cannot be excluded
|
|
264
|
+
* 2. IMPROVEMENT actions (increase metrics) - CAN be swapped for alternatives
|
|
265
|
+
*
|
|
266
|
+
* We find diverse alternatives by:
|
|
267
|
+
* - Keeping measurement actions fixed (they're prerequisites)
|
|
268
|
+
* - Swapping improvement actions for alternatives with similar effects
|
|
269
|
+
*/
|
|
270
|
+
async findAlternativePaths(worldState, goalConditions, primaryPlan, constraints) {
|
|
271
|
+
const alternatives = [];
|
|
272
|
+
const seenPlanKeys = new Set();
|
|
273
|
+
// Identify measurement vs improvement actions in primary plan
|
|
274
|
+
const measurementActionIds = new Set();
|
|
275
|
+
const improvementActions = [];
|
|
276
|
+
for (const action of primaryPlan.actions) {
|
|
277
|
+
// Check if this is a measurement action (effects set boolean flags)
|
|
278
|
+
const isMeasurement = Object.entries(action.effects).some(([key, effect]) => {
|
|
279
|
+
const effectObj = effect;
|
|
280
|
+
// Measurement actions set boolean flags like testsMeasured, securityMeasured
|
|
281
|
+
return effectObj?.set === true && (key.includes('Measured') ||
|
|
282
|
+
key.includes('measured') ||
|
|
283
|
+
key.includes('Tested') ||
|
|
284
|
+
key.includes('Evaluated') ||
|
|
285
|
+
key.includes('Analyzed'));
|
|
286
|
+
});
|
|
287
|
+
if (isMeasurement) {
|
|
288
|
+
measurementActionIds.add(action.id);
|
|
289
|
+
}
|
|
290
|
+
else {
|
|
291
|
+
improvementActions.push(action);
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
// Helper to generate plan key for deduplication
|
|
295
|
+
const getPlanKey = (actions) => actions.map(a => a.id).sort().join(',');
|
|
296
|
+
// Add primary plan to seen
|
|
297
|
+
seenPlanKeys.add(getPlanKey(primaryPlan.actions));
|
|
298
|
+
// Helper to add unique alternative
|
|
299
|
+
const addAlternative = (altPlan, description) => {
|
|
300
|
+
const planKey = getPlanKey(altPlan.actions);
|
|
301
|
+
if (seenPlanKeys.has(planKey))
|
|
302
|
+
return false;
|
|
303
|
+
// Check for actual action diversity (not just order)
|
|
304
|
+
const primaryIds = new Set(primaryPlan.actions.map(a => a.id));
|
|
305
|
+
const altIds = altPlan.actions.map(a => a.id);
|
|
306
|
+
const differentActions = altIds.filter(id => !primaryIds.has(id));
|
|
307
|
+
if (differentActions.length === 0 && altIds.length === primaryPlan.actions.length) {
|
|
308
|
+
return false; // No real difference
|
|
309
|
+
}
|
|
310
|
+
seenPlanKeys.add(planKey);
|
|
311
|
+
alternatives.push({
|
|
312
|
+
planId: altPlan.id,
|
|
313
|
+
actions: altIds,
|
|
314
|
+
totalCost: altPlan.totalCost,
|
|
315
|
+
estimatedDuration: altPlan.estimatedDuration,
|
|
316
|
+
differenceFromPrimary: description
|
|
317
|
+
});
|
|
318
|
+
return true;
|
|
319
|
+
};
|
|
320
|
+
// Strategy 1: For each improvement action, exclude it to force an alternative
|
|
321
|
+
// Keep measurement actions (they're prerequisites that MUST run)
|
|
322
|
+
for (const improvementAction of improvementActions) {
|
|
323
|
+
if (alternatives.length >= 3)
|
|
324
|
+
break;
|
|
325
|
+
const altConstraints = {
|
|
326
|
+
...constraints,
|
|
327
|
+
excludedActions: [
|
|
328
|
+
...(constraints.excludedActions ?? []),
|
|
329
|
+
improvementAction.id
|
|
330
|
+
],
|
|
331
|
+
maxIterations: 1200
|
|
332
|
+
};
|
|
333
|
+
try {
|
|
334
|
+
const altPlan = await this.planner.findPlan(worldState, goalConditions, altConstraints);
|
|
335
|
+
if (altPlan && altPlan.actions.length > 0) {
|
|
336
|
+
// Find what replaced the excluded action
|
|
337
|
+
const newActions = altPlan.actions
|
|
338
|
+
.filter(a => !measurementActionIds.has(a.id))
|
|
339
|
+
.filter(a => !primaryPlan.actions.some(pa => pa.id === a.id));
|
|
340
|
+
const newActionNames = newActions.map(a => a.name).join(', ') || 'different approach';
|
|
341
|
+
addAlternative(altPlan, `Uses ${newActionNames} instead of ${improvementAction.name}`);
|
|
342
|
+
}
|
|
343
|
+
}
|
|
344
|
+
catch {
|
|
345
|
+
// Ignore failed searches
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
// Strategy 2: Find alternatives by category
|
|
349
|
+
// Group improvement actions by what they improve (category + effect target)
|
|
350
|
+
if (alternatives.length < 3) {
|
|
351
|
+
const effectGroups = new Map();
|
|
352
|
+
for (const action of this.planner.getActionLibrary()) {
|
|
353
|
+
// Skip measurement actions and actions already used
|
|
354
|
+
if (measurementActionIds.has(action.id))
|
|
355
|
+
continue;
|
|
356
|
+
if (improvementActions.some(ia => ia.id === action.id))
|
|
357
|
+
continue;
|
|
358
|
+
// Group by primary effect target
|
|
359
|
+
for (const [key, effect] of Object.entries(action.effects)) {
|
|
360
|
+
const effectObj = effect;
|
|
361
|
+
if (effectObj?.increase !== undefined) {
|
|
362
|
+
const effectKey = key; // e.g., 'coverage.line', 'quality.testsPassing'
|
|
363
|
+
if (!effectGroups.has(effectKey)) {
|
|
364
|
+
effectGroups.set(effectKey, []);
|
|
365
|
+
}
|
|
366
|
+
effectGroups.get(effectKey).push(action);
|
|
367
|
+
}
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
// For each improvement action in primary plan, find alternatives that improve same metric
|
|
371
|
+
for (const improvementAction of improvementActions) {
|
|
372
|
+
if (alternatives.length >= 3)
|
|
373
|
+
break;
|
|
374
|
+
// Find what this action improves
|
|
375
|
+
for (const [key, effect] of Object.entries(improvementAction.effects)) {
|
|
376
|
+
const effectObj = effect;
|
|
377
|
+
if (effectObj?.increase !== undefined) {
|
|
378
|
+
const alternativeActions = effectGroups.get(key) ?? [];
|
|
379
|
+
for (const altAction of alternativeActions) {
|
|
380
|
+
if (alternatives.length >= 3)
|
|
381
|
+
break;
|
|
382
|
+
// Exclude primary plan's improvement actions, keep this alternative
|
|
383
|
+
const excludeIds = improvementActions
|
|
384
|
+
.filter(ia => ia.id !== altAction.id)
|
|
385
|
+
.map(ia => ia.id);
|
|
386
|
+
const altConstraints = {
|
|
387
|
+
...constraints,
|
|
388
|
+
excludedActions: [...(constraints.excludedActions ?? []), ...excludeIds],
|
|
389
|
+
maxIterations: 1000
|
|
390
|
+
};
|
|
391
|
+
try {
|
|
392
|
+
const altPlan = await this.planner.findPlan(worldState, goalConditions, altConstraints);
|
|
393
|
+
if (altPlan && altPlan.actions.length > 0) {
|
|
394
|
+
addAlternative(altPlan, `Uses ${altAction.name} to improve ${key}`);
|
|
395
|
+
}
|
|
396
|
+
}
|
|
397
|
+
catch {
|
|
398
|
+
// Ignore
|
|
399
|
+
}
|
|
400
|
+
}
|
|
401
|
+
}
|
|
402
|
+
}
|
|
403
|
+
}
|
|
404
|
+
}
|
|
405
|
+
// Strategy 3: Exclude all improvement actions from primary + alternatives to find new approaches
|
|
406
|
+
if (alternatives.length < 3 && alternatives.length > 0) {
|
|
407
|
+
const allUsedImprovements = new Set();
|
|
408
|
+
improvementActions.forEach(a => allUsedImprovements.add(a.id));
|
|
409
|
+
alternatives.forEach(alt => alt.actions.forEach(id => {
|
|
410
|
+
if (!measurementActionIds.has(id))
|
|
411
|
+
allUsedImprovements.add(id);
|
|
412
|
+
}));
|
|
413
|
+
const altConstraints = {
|
|
414
|
+
...constraints,
|
|
415
|
+
excludedActions: [...(constraints.excludedActions ?? []), ...allUsedImprovements],
|
|
416
|
+
maxIterations: 1500
|
|
417
|
+
};
|
|
418
|
+
try {
|
|
419
|
+
const altPlan = await this.planner.findPlan(worldState, goalConditions, altConstraints);
|
|
420
|
+
if (altPlan && altPlan.actions.length > 0) {
|
|
421
|
+
addAlternative(altPlan, 'Completely different improvement approach');
|
|
422
|
+
}
|
|
423
|
+
}
|
|
424
|
+
catch {
|
|
425
|
+
// Ignore
|
|
426
|
+
}
|
|
427
|
+
}
|
|
428
|
+
return alternatives;
|
|
429
|
+
}
|
|
430
|
+
/**
|
|
431
|
+
* Calculate success probability for a plan
|
|
432
|
+
*/
|
|
433
|
+
calculateSuccessProbability(plan) {
|
|
434
|
+
if (plan.actions.length === 0)
|
|
435
|
+
return 0;
|
|
436
|
+
// Multiply individual action success rates
|
|
437
|
+
let probability = 1.0;
|
|
438
|
+
for (const action of plan.actions) {
|
|
439
|
+
probability *= action.successRate ?? 0.9;
|
|
440
|
+
}
|
|
441
|
+
return Math.round(probability * 100) / 100;
|
|
442
|
+
}
|
|
443
|
+
/**
|
|
444
|
+
* Persist plan to database
|
|
445
|
+
*/
|
|
446
|
+
async persistPlan(plan, context, goalId) {
|
|
447
|
+
try {
|
|
448
|
+
const actionSequence = JSON.stringify(plan.actions.map(a => a.id));
|
|
449
|
+
this.db.prepare(`
|
|
450
|
+
INSERT INTO goap_plans (
|
|
451
|
+
id, goal_id, sequence, total_cost, created_at,
|
|
452
|
+
initial_state, goal_state, action_sequence, estimated_duration, status
|
|
453
|
+
) VALUES (?, ?, ?, ?, strftime('%s', 'now'), ?, ?, ?, ?, 'pending')
|
|
454
|
+
`).run(plan.id, goalId, actionSequence, // sequence (required NOT NULL)
|
|
455
|
+
Math.round(plan.totalCost), // total_cost as INTEGER
|
|
456
|
+
JSON.stringify({ projectId: context.projectId, buildId: context.buildId }), JSON.stringify(plan.goalConditions), actionSequence, // action_sequence (same as sequence)
|
|
457
|
+
Math.round(plan.estimatedDuration));
|
|
458
|
+
this.logger.debug('[GOAPQualityGate] Plan persisted', { planId: plan.id });
|
|
459
|
+
}
|
|
460
|
+
catch (error) {
|
|
461
|
+
this.logger.warn('[GOAPQualityGate] Failed to persist plan', { error });
|
|
462
|
+
}
|
|
463
|
+
}
|
|
464
|
+
/**
|
|
465
|
+
* Format plan for external consumption
|
|
466
|
+
*/
|
|
467
|
+
formatRemediationPlan(plan, alternatives, successProbability) {
|
|
468
|
+
return {
|
|
469
|
+
planId: plan.id,
|
|
470
|
+
actions: plan.actions.map(a => ({
|
|
471
|
+
id: a.id,
|
|
472
|
+
name: a.name,
|
|
473
|
+
description: a.description,
|
|
474
|
+
agentType: a.agentType,
|
|
475
|
+
category: a.category,
|
|
476
|
+
estimatedDuration: a.durationEstimate ?? 60000,
|
|
477
|
+
successRate: a.successRate ?? 0.9,
|
|
478
|
+
effects: Object.keys(a.effects)
|
|
479
|
+
})),
|
|
480
|
+
totalCost: plan.totalCost,
|
|
481
|
+
estimatedDuration: plan.estimatedDuration,
|
|
482
|
+
successProbability,
|
|
483
|
+
alternativePaths: alternatives,
|
|
484
|
+
createdAt: new Date().toISOString()
|
|
485
|
+
};
|
|
486
|
+
}
|
|
487
|
+
/**
|
|
488
|
+
* Map criticality to risk level
|
|
489
|
+
*/
|
|
490
|
+
mapCriticality(criticality) {
|
|
491
|
+
switch (criticality) {
|
|
492
|
+
case 'critical': return 'critical';
|
|
493
|
+
case 'high': return 'high';
|
|
494
|
+
case 'medium': return 'medium';
|
|
495
|
+
default: return 'low';
|
|
496
|
+
}
|
|
497
|
+
}
|
|
498
|
+
/**
|
|
499
|
+
* Update action success rate based on execution outcome
|
|
500
|
+
*/
|
|
501
|
+
async recordActionOutcome(actionId, success) {
|
|
502
|
+
try {
|
|
503
|
+
// Get current stats
|
|
504
|
+
const row = this.db.prepare(`
|
|
505
|
+
SELECT success_rate, execution_count FROM goap_actions WHERE id = ?
|
|
506
|
+
`).get(actionId);
|
|
507
|
+
if (!row)
|
|
508
|
+
return;
|
|
509
|
+
const currentRate = row.success_rate ?? 1.0;
|
|
510
|
+
const count = row.execution_count ?? 0;
|
|
511
|
+
const newRate = (currentRate * count + (success ? 1 : 0)) / (count + 1);
|
|
512
|
+
this.db.prepare(`
|
|
513
|
+
UPDATE goap_actions
|
|
514
|
+
SET success_rate = ?,
|
|
515
|
+
execution_count = execution_count + 1,
|
|
516
|
+
updated_at = CURRENT_TIMESTAMP
|
|
517
|
+
WHERE id = ?
|
|
518
|
+
`).run(newRate, actionId);
|
|
519
|
+
this.logger.debug('[GOAPQualityGate] Action outcome recorded', {
|
|
520
|
+
actionId,
|
|
521
|
+
success,
|
|
522
|
+
newRate
|
|
523
|
+
});
|
|
524
|
+
}
|
|
525
|
+
catch (error) {
|
|
526
|
+
this.logger.warn('[GOAPQualityGate] Failed to record action outcome', { error });
|
|
527
|
+
}
|
|
528
|
+
}
|
|
529
|
+
/**
|
|
530
|
+
* Mark plan as completed
|
|
531
|
+
*/
|
|
532
|
+
async completePlan(planId, success, reason) {
|
|
533
|
+
try {
|
|
534
|
+
this.db.prepare(`
|
|
535
|
+
UPDATE goap_plans
|
|
536
|
+
SET status = ?,
|
|
537
|
+
success = ?,
|
|
538
|
+
failure_reason = ?,
|
|
539
|
+
completed_at = CURRENT_TIMESTAMP
|
|
540
|
+
WHERE id = ?
|
|
541
|
+
`).run(success ? 'completed' : 'failed', success ? 1 : 0, reason ?? null, planId);
|
|
542
|
+
}
|
|
543
|
+
catch (error) {
|
|
544
|
+
this.logger.warn('[GOAPQualityGate] Failed to complete plan', { error });
|
|
545
|
+
}
|
|
546
|
+
}
|
|
547
|
+
/**
|
|
548
|
+
* Get successful plan templates for similar goals
|
|
549
|
+
*/
|
|
550
|
+
async getSimilarSuccessfulPlans(goalId, limit = 5) {
|
|
551
|
+
try {
|
|
552
|
+
const rows = this.db.prepare(`
|
|
553
|
+
SELECT id, action_sequence, total_cost, estimated_duration, goal_state
|
|
554
|
+
FROM goap_plans
|
|
555
|
+
WHERE goal_id = ? AND success = 1
|
|
556
|
+
ORDER BY total_cost ASC
|
|
557
|
+
LIMIT ?
|
|
558
|
+
`).all(goalId, limit);
|
|
559
|
+
return rows.map(row => ({
|
|
560
|
+
id: row.id,
|
|
561
|
+
actions: [], // Would need to hydrate from action library
|
|
562
|
+
totalCost: row.total_cost,
|
|
563
|
+
estimatedDuration: row.estimated_duration,
|
|
564
|
+
goalConditions: JSON.parse(row.goal_state)
|
|
565
|
+
}));
|
|
566
|
+
}
|
|
567
|
+
catch (error) {
|
|
568
|
+
this.logger.warn('[GOAPQualityGate] Failed to get similar plans', { error });
|
|
569
|
+
return [];
|
|
570
|
+
}
|
|
571
|
+
}
|
|
572
|
+
}
|
|
573
|
+
exports.GOAPQualityGateIntegration = GOAPQualityGateIntegration;
|
|
574
|
+
/**
|
|
575
|
+
* Factory function to create integration instance
|
|
576
|
+
*/
|
|
577
|
+
function createQualityGateIntegration(dbPath) {
|
|
578
|
+
const Database = require('better-sqlite3');
|
|
579
|
+
const db = new Database(dbPath);
|
|
580
|
+
return new GOAPQualityGateIntegration(db);
|
|
581
|
+
}
|
|
582
|
+
//# sourceMappingURL=GOAPQualityGateIntegration.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GOAPQualityGateIntegration.js","sourceRoot":"","sources":["../../../src/planning/integration/GOAPQualityGateIntegration.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;GAWG;;;AA2vBH,oEAIC;AA5vBD,gDAA6C;AAC7C,4DAA4F;AAC5F,0EAAqE;AACrE,4EAAuE;AACvE,4DAAwD;AAQxD,+CAA4C;AA2F5C;;GAEG;AACU,QAAA,kBAAkB,GAAG;IAChC;;OAEG;IACH,iBAAiB,EAAE;QACjB,EAAE,EAAE,wBAAwB;QAC5B,IAAI,EAAE,mBAAmB;QACzB,UAAU,EAAE;YACV,sBAAsB,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE;YACnC,eAAe,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE;YAC5B,uBAAuB,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE;YACpC,0BAA0B,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE;YACvC,oBAAoB,EAAE,EAAE,EAAE,EAAE,QAAQ,EAAE;SACpB;QACpB,QAAQ,EAAE,CAAC;KACZ;IAED;;OAEG;IACH,cAAc,EAAE;QACd,EAAE,EAAE,qBAAqB;QACzB,IAAI,EAAE,gBAAgB;QACtB,UAAU,EAAE;YACV,sBAAsB,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE;YACnC,uBAAuB,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE;YACpC,2BAA2B,EAAE,EAAE,EAAE,EAAE,IAAI,EAAE;SACvB;QACpB,QAAQ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