agentic-qe 1.9.4 → 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/.claude/agents/qe-api-contract-validator.md +95 -1336
- package/.claude/agents/qe-chaos-engineer.md +152 -1211
- package/.claude/agents/qe-code-complexity.md +144 -707
- package/.claude/agents/qe-coverage-analyzer.md +147 -743
- package/.claude/agents/qe-deployment-readiness.md +143 -1496
- package/.claude/agents/qe-flaky-test-hunter.md +132 -1529
- package/.claude/agents/qe-fleet-commander.md +12 -12
- package/.claude/agents/qe-performance-tester.md +150 -886
- package/.claude/agents/qe-production-intelligence.md +155 -1396
- package/.claude/agents/qe-quality-analyzer.md +6 -6
- package/.claude/agents/qe-quality-gate.md +151 -648
- package/.claude/agents/qe-regression-risk-analyzer.md +132 -1150
- package/.claude/agents/qe-requirements-validator.md +149 -932
- package/.claude/agents/qe-security-scanner.md +157 -797
- package/.claude/agents/qe-test-data-architect.md +96 -1365
- package/.claude/agents/qe-test-executor.md +8 -8
- package/.claude/agents/qe-test-generator.md +145 -1540
- package/.claude/agents/qe-visual-tester.md +153 -1257
- package/.claude/agents/qx-partner.md +248 -0
- package/.claude/agents/subagents/qe-code-reviewer.md +40 -136
- package/.claude/agents/subagents/qe-coverage-gap-analyzer.md +40 -480
- package/.claude/agents/subagents/qe-data-generator.md +41 -125
- package/.claude/agents/subagents/qe-flaky-investigator.md +55 -411
- package/.claude/agents/subagents/qe-integration-tester.md +53 -141
- package/.claude/agents/subagents/qe-performance-validator.md +54 -130
- package/.claude/agents/subagents/qe-security-auditor.md +56 -114
- package/.claude/agents/subagents/qe-test-data-architect-sub.md +57 -548
- package/.claude/agents/subagents/qe-test-implementer.md +58 -551
- package/.claude/agents/subagents/qe-test-refactorer.md +65 -722
- package/.claude/agents/subagents/qe-test-writer.md +63 -726
- package/.claude/skills/accessibility-testing/SKILL.md +144 -692
- package/.claude/skills/agentic-quality-engineering/SKILL.md +176 -529
- package/.claude/skills/api-testing-patterns/SKILL.md +180 -560
- package/.claude/skills/brutal-honesty-review/SKILL.md +113 -603
- package/.claude/skills/bug-reporting-excellence/SKILL.md +116 -517
- package/.claude/skills/chaos-engineering-resilience/SKILL.md +127 -72
- package/.claude/skills/cicd-pipeline-qe-orchestrator/SKILL.md +209 -404
- package/.claude/skills/code-review-quality/SKILL.md +158 -608
- package/.claude/skills/compatibility-testing/SKILL.md +148 -38
- package/.claude/skills/compliance-testing/SKILL.md +132 -63
- package/.claude/skills/consultancy-practices/SKILL.md +114 -446
- package/.claude/skills/context-driven-testing/SKILL.md +117 -381
- package/.claude/skills/contract-testing/SKILL.md +176 -141
- package/.claude/skills/database-testing/SKILL.md +137 -130
- package/.claude/skills/exploratory-testing-advanced/SKILL.md +160 -629
- package/.claude/skills/holistic-testing-pact/SKILL.md +140 -188
- package/.claude/skills/localization-testing/SKILL.md +145 -33
- package/.claude/skills/mobile-testing/SKILL.md +132 -448
- package/.claude/skills/mutation-testing/SKILL.md +147 -41
- package/.claude/skills/performance-testing/SKILL.md +200 -546
- package/.claude/skills/quality-metrics/SKILL.md +164 -519
- package/.claude/skills/refactoring-patterns/SKILL.md +132 -699
- package/.claude/skills/regression-testing/SKILL.md +120 -926
- package/.claude/skills/risk-based-testing/SKILL.md +157 -660
- package/.claude/skills/security-testing/SKILL.md +199 -538
- package/.claude/skills/sherlock-review/SKILL.md +163 -699
- package/.claude/skills/shift-left-testing/SKILL.md +161 -465
- package/.claude/skills/shift-right-testing/SKILL.md +161 -519
- package/.claude/skills/six-thinking-hats/SKILL.md +175 -1110
- package/.claude/skills/skills-manifest.json +683 -0
- package/.claude/skills/tdd-london-chicago/SKILL.md +131 -448
- package/.claude/skills/technical-writing/SKILL.md +103 -154
- package/.claude/skills/test-automation-strategy/SKILL.md +166 -772
- package/.claude/skills/test-data-management/SKILL.md +126 -910
- package/.claude/skills/test-design-techniques/SKILL.md +179 -89
- package/.claude/skills/test-environment-management/SKILL.md +136 -91
- package/.claude/skills/test-reporting-analytics/SKILL.md +169 -92
- package/.claude/skills/testability-scoring/README.md +71 -0
- package/.claude/skills/testability-scoring/SKILL.md +245 -0
- package/.claude/skills/testability-scoring/resources/templates/config.template.js +84 -0
- package/.claude/skills/testability-scoring/resources/templates/testability-scoring.spec.template.js +532 -0
- package/.claude/skills/testability-scoring/scripts/generate-html-report.js +1007 -0
- package/.claude/skills/testability-scoring/scripts/run-assessment.sh +70 -0
- package/.claude/skills/visual-testing-advanced/SKILL.md +155 -78
- package/.claude/skills/xp-practices/SKILL.md +151 -587
- package/CHANGELOG.md +110 -0
- package/README.md +55 -21
- package/dist/agents/QXPartnerAgent.d.ts +146 -0
- package/dist/agents/QXPartnerAgent.d.ts.map +1 -0
- package/dist/agents/QXPartnerAgent.js +1831 -0
- package/dist/agents/QXPartnerAgent.js.map +1 -0
- package/dist/agents/index.d.ts +1 -0
- package/dist/agents/index.d.ts.map +1 -1
- package/dist/agents/index.js +82 -2
- package/dist/agents/index.js.map +1 -1
- package/dist/agents/lifecycle/AgentLifecycleManager.d.ts.map +1 -1
- package/dist/agents/lifecycle/AgentLifecycleManager.js +34 -31
- package/dist/agents/lifecycle/AgentLifecycleManager.js.map +1 -1
- package/dist/cli/commands/debug/agent.d.ts.map +1 -1
- package/dist/cli/commands/debug/agent.js +19 -6
- package/dist/cli/commands/debug/agent.js.map +1 -1
- package/dist/cli/commands/debug/health-check.js +20 -7
- package/dist/cli/commands/debug/health-check.js.map +1 -1
- package/dist/cli/commands/init-claude-md-template.d.ts +1 -0
- package/dist/cli/commands/init-claude-md-template.d.ts.map +1 -1
- package/dist/cli/commands/init-claude-md-template.js +18 -3
- package/dist/cli/commands/init-claude-md-template.js.map +1 -1
- package/dist/cli/commands/workflow/cancel.d.ts.map +1 -1
- package/dist/cli/commands/workflow/cancel.js +4 -3
- package/dist/cli/commands/workflow/cancel.js.map +1 -1
- package/dist/cli/commands/workflow/list.d.ts.map +1 -1
- package/dist/cli/commands/workflow/list.js +4 -3
- package/dist/cli/commands/workflow/list.js.map +1 -1
- package/dist/cli/commands/workflow/pause.d.ts.map +1 -1
- package/dist/cli/commands/workflow/pause.js +4 -3
- package/dist/cli/commands/workflow/pause.js.map +1 -1
- package/dist/cli/init/claude-config.d.ts.map +1 -1
- package/dist/cli/init/claude-config.js +3 -8
- package/dist/cli/init/claude-config.js.map +1 -1
- package/dist/cli/init/claude-md.d.ts.map +1 -1
- package/dist/cli/init/claude-md.js +44 -2
- package/dist/cli/init/claude-md.js.map +1 -1
- package/dist/cli/init/database-init.js +1 -1
- package/dist/cli/init/index.d.ts.map +1 -1
- package/dist/cli/init/index.js +13 -6
- package/dist/cli/init/index.js.map +1 -1
- package/dist/cli/init/skills.d.ts.map +1 -1
- package/dist/cli/init/skills.js +2 -1
- package/dist/cli/init/skills.js.map +1 -1
- package/dist/core/SwarmCoordinator.d.ts +180 -0
- package/dist/core/SwarmCoordinator.d.ts.map +1 -0
- package/dist/core/SwarmCoordinator.js +473 -0
- package/dist/core/SwarmCoordinator.js.map +1 -0
- package/dist/core/memory/AgentDBIntegration.d.ts +24 -6
- package/dist/core/memory/AgentDBIntegration.d.ts.map +1 -1
- package/dist/core/memory/AgentDBIntegration.js +66 -10
- package/dist/core/memory/AgentDBIntegration.js.map +1 -1
- package/dist/core/memory/UnifiedMemoryCoordinator.d.ts +341 -0
- package/dist/core/memory/UnifiedMemoryCoordinator.d.ts.map +1 -0
- package/dist/core/memory/UnifiedMemoryCoordinator.js +986 -0
- package/dist/core/memory/UnifiedMemoryCoordinator.js.map +1 -0
- package/dist/core/memory/index.d.ts +5 -0
- package/dist/core/memory/index.d.ts.map +1 -1
- package/dist/core/memory/index.js +23 -1
- package/dist/core/memory/index.js.map +1 -1
- package/dist/core/metrics/MetricsAggregator.d.ts +228 -0
- package/dist/core/metrics/MetricsAggregator.d.ts.map +1 -0
- package/dist/core/metrics/MetricsAggregator.js +482 -0
- package/dist/core/metrics/MetricsAggregator.js.map +1 -0
- package/dist/core/metrics/index.d.ts +5 -0
- package/dist/core/metrics/index.d.ts.map +1 -0
- package/dist/core/metrics/index.js +11 -0
- package/dist/core/metrics/index.js.map +1 -0
- package/dist/core/optimization/SwarmOptimizer.d.ts +190 -0
- package/dist/core/optimization/SwarmOptimizer.d.ts.map +1 -0
- package/dist/core/optimization/SwarmOptimizer.js +648 -0
- package/dist/core/optimization/SwarmOptimizer.js.map +1 -0
- package/dist/core/optimization/index.d.ts +9 -0
- package/dist/core/optimization/index.d.ts.map +1 -0
- package/dist/core/optimization/index.js +25 -0
- package/dist/core/optimization/index.js.map +1 -0
- package/dist/core/optimization/types.d.ts +53 -0
- package/dist/core/optimization/types.d.ts.map +1 -0
- package/dist/core/optimization/types.js +6 -0
- package/dist/core/optimization/types.js.map +1 -0
- package/dist/core/orchestration/AdaptiveScheduler.d.ts +190 -0
- package/dist/core/orchestration/AdaptiveScheduler.d.ts.map +1 -0
- package/dist/core/orchestration/AdaptiveScheduler.js +460 -0
- package/dist/core/orchestration/AdaptiveScheduler.js.map +1 -0
- package/dist/core/orchestration/PriorityQueue.d.ts +54 -0
- package/dist/core/orchestration/PriorityQueue.d.ts.map +1 -0
- package/dist/core/orchestration/PriorityQueue.js +122 -0
- package/dist/core/orchestration/PriorityQueue.js.map +1 -0
- package/dist/core/orchestration/WorkflowOrchestrator.d.ts +189 -0
- package/dist/core/orchestration/WorkflowOrchestrator.d.ts.map +1 -0
- package/dist/core/orchestration/WorkflowOrchestrator.js +845 -0
- package/dist/core/orchestration/WorkflowOrchestrator.js.map +1 -0
- package/dist/core/orchestration/index.d.ts +7 -0
- package/dist/core/orchestration/index.d.ts.map +1 -0
- package/dist/core/orchestration/index.js +11 -0
- package/dist/core/orchestration/index.js.map +1 -0
- package/dist/core/orchestration/types.d.ts +96 -0
- package/dist/core/orchestration/types.d.ts.map +1 -0
- package/dist/core/orchestration/types.js +6 -0
- package/dist/core/orchestration/types.js.map +1 -0
- package/dist/core/recovery/CircuitBreaker.d.ts +176 -0
- package/dist/core/recovery/CircuitBreaker.d.ts.map +1 -0
- package/dist/core/recovery/CircuitBreaker.js +382 -0
- package/dist/core/recovery/CircuitBreaker.js.map +1 -0
- package/dist/core/recovery/RecoveryOrchestrator.d.ts +186 -0
- package/dist/core/recovery/RecoveryOrchestrator.d.ts.map +1 -0
- package/dist/core/recovery/RecoveryOrchestrator.js +476 -0
- package/dist/core/recovery/RecoveryOrchestrator.js.map +1 -0
- package/dist/core/recovery/RetryStrategy.d.ts +127 -0
- package/dist/core/recovery/RetryStrategy.d.ts.map +1 -0
- package/dist/core/recovery/RetryStrategy.js +314 -0
- package/dist/core/recovery/RetryStrategy.js.map +1 -0
- package/dist/core/recovery/index.d.ts +8 -0
- package/dist/core/recovery/index.d.ts.map +1 -0
- package/dist/core/recovery/index.js +27 -0
- package/dist/core/recovery/index.js.map +1 -0
- package/dist/core/skills/DependencyResolver.d.ts +99 -0
- package/dist/core/skills/DependencyResolver.d.ts.map +1 -0
- package/dist/core/skills/DependencyResolver.js +260 -0
- package/dist/core/skills/DependencyResolver.js.map +1 -0
- package/dist/core/skills/DynamicSkillLoader.d.ts +96 -0
- package/dist/core/skills/DynamicSkillLoader.d.ts.map +1 -0
- package/dist/core/skills/DynamicSkillLoader.js +353 -0
- package/dist/core/skills/DynamicSkillLoader.js.map +1 -0
- package/dist/core/skills/ManifestGenerator.d.ts +114 -0
- package/dist/core/skills/ManifestGenerator.d.ts.map +1 -0
- package/dist/core/skills/ManifestGenerator.js +449 -0
- package/dist/core/skills/ManifestGenerator.js.map +1 -0
- package/dist/core/skills/index.d.ts +9 -0
- package/dist/core/skills/index.d.ts.map +1 -0
- package/dist/core/skills/index.js +24 -0
- package/dist/core/skills/index.js.map +1 -0
- package/dist/core/skills/types.d.ts +118 -0
- package/dist/core/skills/types.d.ts.map +1 -0
- package/dist/core/skills/types.js +7 -0
- package/dist/core/skills/types.js.map +1 -0
- package/dist/core/transport/QUICTransport.d.ts +320 -0
- package/dist/core/transport/QUICTransport.d.ts.map +1 -0
- package/dist/core/transport/QUICTransport.js +711 -0
- package/dist/core/transport/QUICTransport.js.map +1 -0
- package/dist/core/transport/index.d.ts +40 -0
- package/dist/core/transport/index.d.ts.map +1 -0
- package/dist/core/transport/index.js +46 -0
- package/dist/core/transport/index.js.map +1 -0
- package/dist/core/transport/quic-loader.d.ts +123 -0
- package/dist/core/transport/quic-loader.d.ts.map +1 -0
- package/dist/core/transport/quic-loader.js +293 -0
- package/dist/core/transport/quic-loader.js.map +1 -0
- package/dist/core/transport/quic.d.ts +154 -0
- package/dist/core/transport/quic.d.ts.map +1 -0
- package/dist/core/transport/quic.js +214 -0
- package/dist/core/transport/quic.js.map +1 -0
- package/dist/mcp/server.d.ts +9 -9
- package/dist/mcp/server.d.ts.map +1 -1
- package/dist/mcp/server.js +1 -2
- package/dist/mcp/server.js.map +1 -1
- package/dist/mcp/services/AgentRegistry.d.ts.map +1 -1
- package/dist/mcp/services/AgentRegistry.js +4 -1
- package/dist/mcp/services/AgentRegistry.js.map +1 -1
- package/dist/types/index.d.ts +2 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +2 -0
- package/dist/types/index.js.map +1 -1
- package/dist/types/qx.d.ts +429 -0
- package/dist/types/qx.d.ts.map +1 -0
- package/dist/types/qx.js +71 -0
- package/dist/types/qx.js.map +1 -0
- package/dist/visualization/api/RestEndpoints.js +2 -2
- package/dist/visualization/api/RestEndpoints.js.map +1 -1
- package/dist/visualization/api/WebSocketServer.d.ts +44 -0
- package/dist/visualization/api/WebSocketServer.d.ts.map +1 -1
- package/dist/visualization/api/WebSocketServer.js +144 -23
- package/dist/visualization/api/WebSocketServer.js.map +1 -1
- package/dist/visualization/core/DataTransformer.d.ts +10 -0
- package/dist/visualization/core/DataTransformer.d.ts.map +1 -1
- package/dist/visualization/core/DataTransformer.js +60 -5
- package/dist/visualization/core/DataTransformer.js.map +1 -1
- package/dist/visualization/emit-event.d.ts +75 -0
- package/dist/visualization/emit-event.d.ts.map +1 -0
- package/dist/visualization/emit-event.js +213 -0
- package/dist/visualization/emit-event.js.map +1 -0
- package/dist/visualization/index.d.ts +1 -0
- package/dist/visualization/index.d.ts.map +1 -1
- package/dist/visualization/index.js +7 -1
- package/dist/visualization/index.js.map +1 -1
- package/docs/reference/skills.md +63 -1
- package/package.json +16 -58
|
@@ -1,578 +1,91 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: qe-quality-gate
|
|
3
|
-
description:
|
|
3
|
+
description: Quality gate decisions with risk assessment and policy validation
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
-
|
|
16
|
-
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
**
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
// Emit quality gate starting event
|
|
73
|
-
this.eventBus.emit('quality-gate:starting', {
|
|
74
|
-
agentId: this.agentId,
|
|
75
|
-
thresholds: thresholds,
|
|
76
|
-
context: context
|
|
77
|
-
});
|
|
78
|
-
|
|
79
|
-
this.logger.info('Quality gate validation starting', {
|
|
80
|
-
thresholds,
|
|
81
|
-
verification: verification.passed
|
|
82
|
-
});
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
protected async onPostTask(data: { assignment: TaskAssignment; result: any }): Promise<void> {
|
|
86
|
-
// Store quality gate decisions in swarm memory
|
|
87
|
-
await this.memoryStore.store('aqe/quality/decisions', data.result, {
|
|
88
|
-
partition: 'decisions',
|
|
89
|
-
ttl: 86400 // 24 hours
|
|
90
|
-
});
|
|
91
|
-
|
|
92
|
-
// Store decision metrics for trend analysis
|
|
93
|
-
await this.memoryStore.store('aqe/quality/metrics', {
|
|
94
|
-
timestamp: Date.now(),
|
|
95
|
-
decision: data.result.decision,
|
|
96
|
-
score: data.result.score,
|
|
97
|
-
riskLevel: data.result.riskLevel,
|
|
98
|
-
policyViolations: data.result.policyViolations
|
|
99
|
-
}, {
|
|
100
|
-
partition: 'metrics',
|
|
101
|
-
ttl: 604800 // 7 days
|
|
102
|
-
});
|
|
103
|
-
|
|
104
|
-
// Emit completion event with decision outcome
|
|
105
|
-
this.eventBus.emit('quality-gate:completed', {
|
|
106
|
-
agentId: this.agentId,
|
|
107
|
-
decision: data.result.decision,
|
|
108
|
-
score: data.result.score,
|
|
109
|
-
goPassed: data.result.decision === 'GO'
|
|
110
|
-
});
|
|
111
|
-
|
|
112
|
-
// Validate quality gate results
|
|
113
|
-
const validation = await this.hookManager.executePostTaskValidation({
|
|
114
|
-
task: 'quality-gate-evaluation',
|
|
115
|
-
result: {
|
|
116
|
-
output: data.result,
|
|
117
|
-
coverage: data.result.coverageScore,
|
|
118
|
-
metrics: {
|
|
119
|
-
qualityScore: data.result.score,
|
|
120
|
-
riskLevel: data.result.riskLevel
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
});
|
|
124
|
-
|
|
125
|
-
this.logger.info('Quality gate evaluation completed', {
|
|
126
|
-
decision: data.result.decision,
|
|
127
|
-
score: data.result.score,
|
|
128
|
-
validated: validation.passed
|
|
129
|
-
});
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
protected async onTaskError(data: { assignment: TaskAssignment; error: Error }): Promise<void> {
|
|
133
|
-
// Store error for fleet analysis
|
|
134
|
-
await this.memoryStore.store(`aqe/errors/${data.assignment.task.id}`, {
|
|
135
|
-
error: data.error.message,
|
|
136
|
-
timestamp: Date.now(),
|
|
137
|
-
agent: this.agentId,
|
|
138
|
-
taskType: 'quality-gate-evaluation'
|
|
139
|
-
}, {
|
|
140
|
-
partition: 'errors',
|
|
141
|
-
ttl: 604800 // 7 days
|
|
142
|
-
});
|
|
143
|
-
|
|
144
|
-
// Emit error event for fleet coordination
|
|
145
|
-
this.eventBus.emit('quality-gate:error', {
|
|
146
|
-
agentId: this.agentId,
|
|
147
|
-
error: data.error.message,
|
|
148
|
-
taskId: data.assignment.task.id
|
|
149
|
-
});
|
|
150
|
-
|
|
151
|
-
this.logger.error('Quality gate evaluation failed', {
|
|
152
|
-
error: data.error.message,
|
|
153
|
-
stack: data.error.stack
|
|
154
|
-
});
|
|
155
|
-
}
|
|
156
|
-
```
|
|
157
|
-
|
|
158
|
-
**Advanced Verification (Optional):**
|
|
159
|
-
```typescript
|
|
160
|
-
// Use VerificationHookManager for comprehensive validation
|
|
161
|
-
const hookManager = new VerificationHookManager(this.memoryStore);
|
|
162
|
-
|
|
163
|
-
// Pre-task verification with environment checks
|
|
164
|
-
const verification = await hookManager.executePreTaskVerification({
|
|
165
|
-
task: 'quality-gate-evaluation',
|
|
166
|
-
context: {
|
|
167
|
-
requiredVars: ['NODE_ENV', 'QUALITY_PROFILE', 'THRESHOLD_CONFIG'],
|
|
168
|
-
minMemoryMB: 512,
|
|
169
|
-
requiredModules: ['jest', 'eslint', '@typescript-eslint/parser']
|
|
170
|
-
}
|
|
171
|
-
});
|
|
172
|
-
|
|
173
|
-
// Post-task validation with result verification
|
|
174
|
-
const validation = await hookManager.executePostTaskValidation({
|
|
175
|
-
task: 'quality-gate-evaluation',
|
|
176
|
-
result: {
|
|
177
|
-
output: gateDecision,
|
|
178
|
-
coverage: coverageScore,
|
|
179
|
-
metrics: {
|
|
180
|
-
qualityScore: qualityScore,
|
|
181
|
-
riskLevel: riskLevel,
|
|
182
|
-
policyCompliance: complianceScore
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
|
-
});
|
|
186
|
-
|
|
187
|
-
// Pre-edit verification before modifying quality configurations
|
|
188
|
-
const editCheck = await hookManager.executePreEditVerification({
|
|
189
|
-
filePath: 'config/quality-thresholds.json',
|
|
190
|
-
operation: 'write',
|
|
191
|
-
content: JSON.stringify(newThresholds)
|
|
192
|
-
});
|
|
193
|
-
|
|
194
|
-
// Session finalization with quality gate audit export
|
|
195
|
-
const finalization = await hookManager.executeSessionEndFinalization({
|
|
196
|
-
sessionId: 'quality-gate-v2.0.0',
|
|
197
|
-
exportMetrics: true,
|
|
198
|
-
exportArtifacts: true
|
|
199
|
-
});
|
|
200
|
-
```
|
|
201
|
-
|
|
202
|
-
## Decision Workflow
|
|
203
|
-
|
|
204
|
-
### Phase 1: Context Assessment
|
|
205
|
-
```yaml
|
|
206
|
-
inputs:
|
|
207
|
-
- test_results: comprehensive
|
|
208
|
-
- coverage_metrics: detailed
|
|
209
|
-
- performance_data: real_time
|
|
210
|
-
- security_scan_results: latest
|
|
211
|
-
- compliance_status: current
|
|
212
|
-
```
|
|
213
|
-
|
|
214
|
-
### Phase 2: Quality Evaluation
|
|
215
|
-
1. **Metric Analysis**: Process all quality indicators using AI algorithms
|
|
216
|
-
2. **Threshold Comparison**: Compare against dynamic thresholds
|
|
217
|
-
3. **Risk Calculation**: Assess potential impact of quality issues
|
|
218
|
-
4. **Trend Analysis**: Evaluate quality trajectory using temporal models
|
|
219
|
-
5. **Policy Verification**: Validate against compliance requirements
|
|
220
|
-
|
|
221
|
-
### Phase 3: Decision Generation
|
|
222
|
-
- **Go Decision**: All quality gates passed with acceptable risk
|
|
223
|
-
- **No-Go Decision**: Critical quality issues or unacceptable risk
|
|
224
|
-
- **Conditional Go**: Pass with conditions and monitoring requirements
|
|
225
|
-
- **Override Assessment**: Evaluate business justification for quality exceptions
|
|
226
|
-
|
|
227
|
-
### Phase 4: Action Execution
|
|
228
|
-
- Trigger appropriate pipeline actions
|
|
229
|
-
- Generate detailed quality reports
|
|
230
|
-
- Update quality dashboards
|
|
231
|
-
- Notify stakeholders of decisions
|
|
232
|
-
- Store decision audit trail
|
|
233
|
-
|
|
234
|
-
## Threshold Management
|
|
235
|
-
|
|
236
|
-
### Dynamic Threshold Adjustment
|
|
6
|
+
<qe_agent_definition>
|
|
7
|
+
<identity>
|
|
8
|
+
You are the Quality Gate Agent for intelligent go/no-go decisions.
|
|
9
|
+
Mission: Enforce quality thresholds using AI-driven risk assessment and policy compliance validation.
|
|
10
|
+
</identity>
|
|
11
|
+
|
|
12
|
+
<implementation_status>
|
|
13
|
+
✅ Working:
|
|
14
|
+
- AI-driven decision trees with ML optimization
|
|
15
|
+
- Dynamic threshold adjustment based on context
|
|
16
|
+
- Policy compliance validation
|
|
17
|
+
- Risk assessment with CVSS scoring
|
|
18
|
+
- Memory coordination via AQE hooks
|
|
19
|
+
|
|
20
|
+
⚠️ Partial:
|
|
21
|
+
- Temporal prediction for quality trends
|
|
22
|
+
- Psycho-symbolic reasoning for edge cases
|
|
23
|
+
|
|
24
|
+
❌ Planned:
|
|
25
|
+
- Automated remediation recommendations
|
|
26
|
+
- Cross-project quality correlation
|
|
27
|
+
</implementation_status>
|
|
28
|
+
|
|
29
|
+
<default_to_action>
|
|
30
|
+
Evaluate quality gates immediately when provided with test results and metrics.
|
|
31
|
+
Make autonomous go/no-go decisions when thresholds and policies are clear.
|
|
32
|
+
Apply risk-based overrides without confirmation when business justification exists.
|
|
33
|
+
Block deployments automatically on critical quality violations.
|
|
34
|
+
</default_to_action>
|
|
35
|
+
|
|
36
|
+
<parallel_execution>
|
|
37
|
+
Evaluate multiple quality metrics simultaneously for faster decisions.
|
|
38
|
+
Process coverage, performance, security, and compliance checks concurrently.
|
|
39
|
+
Execute policy validation and risk assessment in parallel.
|
|
40
|
+
Batch memory operations for decisions, metrics, and audit trails.
|
|
41
|
+
</parallel_execution>
|
|
42
|
+
|
|
43
|
+
<capabilities>
|
|
44
|
+
- **Quality Enforcement**: Go/no-go decisions based on comprehensive metrics
|
|
45
|
+
- **Threshold Management**: Dynamic threshold adjustment using ML optimization
|
|
46
|
+
- **Policy Validation**: Automated compliance checking (OWASP, PCI-DSS, SOC2)
|
|
47
|
+
- **Risk Assessment**: CVSS scoring and impact analysis
|
|
48
|
+
- **Decision Orchestration**: Coordinate quality decisions across CI/CD pipeline
|
|
49
|
+
- **Learning Integration**: Query past decisions and store successful policies
|
|
50
|
+
</capabilities>
|
|
51
|
+
|
|
52
|
+
<memory_namespace>
|
|
53
|
+
Reads:
|
|
54
|
+
- aqe/quality/thresholds - Quality threshold configurations
|
|
55
|
+
- aqe/context - Decision context (environment, risk profile)
|
|
56
|
+
- aqe/test-plan/requirements/* - Quality requirements
|
|
57
|
+
- aqe/learning/patterns/quality-gate/* - Learned decision patterns
|
|
58
|
+
|
|
59
|
+
Writes:
|
|
60
|
+
- aqe/quality/decisions - Quality gate decision history with reasoning
|
|
61
|
+
- aqe/quality/metrics - Decision metrics for trend analysis
|
|
62
|
+
- aqe/quality/violations - Policy violations and severity
|
|
63
|
+
- aqe/quality/overrides - Override justifications and approvals
|
|
64
|
+
|
|
65
|
+
Coordination:
|
|
66
|
+
- aqe/shared/deployment-status - Share go/no-go status with CI/CD
|
|
67
|
+
- aqe/quality/alerts - Real-time quality threshold violations
|
|
68
|
+
</memory_namespace>
|
|
69
|
+
|
|
70
|
+
<learning_protocol>
|
|
71
|
+
Query before evaluation:
|
|
237
72
|
```javascript
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
riskProfile,
|
|
246
|
-
historicalData,
|
|
247
|
-
businessCriticality,
|
|
248
|
-
temporalFactors: getTrendPredictions()
|
|
249
|
-
});
|
|
250
|
-
};
|
|
251
|
-
```
|
|
252
|
-
|
|
253
|
-
### Threshold Categories
|
|
254
|
-
- **Code Quality**: Complexity, maintainability, technical debt
|
|
255
|
-
- **Test Coverage**: Line, branch, functional coverage metrics
|
|
256
|
-
- **Performance**: Response time, throughput, resource utilization
|
|
257
|
-
- **Security**: Vulnerability scanning, compliance verification
|
|
258
|
-
- **Reliability**: Error rates, availability, stability metrics
|
|
259
|
-
|
|
260
|
-
## Risk Assessment
|
|
261
|
-
|
|
262
|
-
### Risk Factors Matrix
|
|
263
|
-
| Factor | Weight | Assessment Method |
|
|
264
|
-
|--------|--------|------------------|
|
|
265
|
-
| Critical Path Impact | 0.30 | Business process analysis |
|
|
266
|
-
| User Impact Scope | 0.25 | User segmentation analysis |
|
|
267
|
-
| Recovery Complexity | 0.20 | System dependency mapping |
|
|
268
|
-
| Regulatory Impact | 0.15 | Compliance requirement review |
|
|
269
|
-
| Reputation Risk | 0.10 | Brand impact assessment |
|
|
270
|
-
|
|
271
|
-
### Risk Mitigation Strategies
|
|
272
|
-
- **High Risk**: Immediate escalation, additional testing required
|
|
273
|
-
- **Medium Risk**: Enhanced monitoring, conditional approval
|
|
274
|
-
- **Low Risk**: Standard approval with routine monitoring
|
|
275
|
-
- **Negligible Risk**: Automated approval with audit logging
|
|
276
|
-
|
|
277
|
-
## Policy Validation
|
|
278
|
-
|
|
279
|
-
### Automated Compliance Checking
|
|
280
|
-
```yaml
|
|
281
|
-
policies:
|
|
282
|
-
security:
|
|
283
|
-
- vulnerability_scanning: required
|
|
284
|
-
- security_review: mandatory_for_critical
|
|
285
|
-
- penetration_testing: quarterly
|
|
286
|
-
performance:
|
|
287
|
-
- load_testing: required_for_user_facing
|
|
288
|
-
- performance_budgets: strictly_enforced
|
|
289
|
-
- scalability_validation: cloud_native_apps
|
|
290
|
-
quality:
|
|
291
|
-
- code_review: mandatory
|
|
292
|
-
- test_coverage: minimum_80_percent
|
|
293
|
-
- documentation: up_to_date_required
|
|
294
|
-
```
|
|
295
|
-
|
|
296
|
-
### Override Management
|
|
297
|
-
- **Business Override**: Requires C-level approval for production
|
|
298
|
-
- **Technical Override**: Senior architect approval with remediation plan
|
|
299
|
-
- **Emergency Override**: Incident commander authority with immediate review
|
|
300
|
-
- **Compliance Override**: Legal/compliance team approval required
|
|
301
|
-
|
|
302
|
-
## Integration Points
|
|
303
|
-
|
|
304
|
-
### CI/CD Pipeline Integration
|
|
305
|
-
```yaml
|
|
306
|
-
pipeline_gates:
|
|
307
|
-
build_gate:
|
|
308
|
-
- compilation_success: required
|
|
309
|
-
- static_analysis: clean
|
|
310
|
-
- security_scan: no_critical_issues
|
|
311
|
-
test_gate:
|
|
312
|
-
- unit_tests: 100_percent_pass
|
|
313
|
-
- integration_tests: 95_percent_pass
|
|
314
|
-
- coverage_threshold: dynamic_based_on_risk
|
|
315
|
-
deployment_gate:
|
|
316
|
-
- performance_validation: within_sla
|
|
317
|
-
- security_verification: compliance_met
|
|
318
|
-
- rollback_strategy: verified
|
|
73
|
+
mcp__agentic_qe__learning_query({
|
|
74
|
+
agentId: "qe-quality-gate",
|
|
75
|
+
taskType: "quality-gate-evaluation",
|
|
76
|
+
minReward: 0.8,
|
|
77
|
+
queryType: "all",
|
|
78
|
+
limit: 10
|
|
79
|
+
})
|
|
319
80
|
```
|
|
320
81
|
|
|
321
|
-
|
|
322
|
-
- **JIRA**: Automatic ticket creation for quality issues
|
|
323
|
-
- **Slack/Teams**: Real-time notification of gate decisions
|
|
324
|
-
- **Grafana/DataDog**: Quality metrics visualization
|
|
325
|
-
- **SonarQube**: Code quality integration
|
|
326
|
-
- **OWASP ZAP**: Security scanning integration
|
|
327
|
-
|
|
328
|
-
## Advanced Features
|
|
329
|
-
|
|
330
|
-
### AI-Driven Decision Trees
|
|
331
|
-
- Machine learning models trained on historical quality data
|
|
332
|
-
- Predictive analytics for quality trend forecasting
|
|
333
|
-
- Anomaly detection for unusual quality patterns
|
|
334
|
-
- Automated threshold optimization based on outcomes
|
|
335
|
-
|
|
336
|
-
### Temporal Prediction Integration
|
|
337
|
-
- Quality trajectory analysis using time-series forecasting
|
|
338
|
-
- Predictive failure analysis based on quality trends
|
|
339
|
-
- Seasonal adjustment for quality thresholds
|
|
340
|
-
- Early warning systems for quality degradation
|
|
341
|
-
|
|
342
|
-
### Psycho-Symbolic Reasoning
|
|
343
|
-
- Complex scenario analysis using symbolic AI
|
|
344
|
-
- Human-like reasoning for edge cases
|
|
345
|
-
- Context-aware decision making
|
|
346
|
-
- Explainable AI for audit requirements
|
|
347
|
-
|
|
348
|
-
### Policy Compliance Engine
|
|
82
|
+
Store after completion:
|
|
349
83
|
```javascript
|
|
350
|
-
const validateCompliance = async (context) => {
|
|
351
|
-
const policies = await loadApplicablePolicies(context);
|
|
352
|
-
const violations = await scanForViolations(context, policies);
|
|
353
|
-
const riskAssessment = await assessComplianceRisk(violations);
|
|
354
|
-
|
|
355
|
-
return {
|
|
356
|
-
compliant: violations.length === 0,
|
|
357
|
-
violations,
|
|
358
|
-
riskLevel: riskAssessment.level,
|
|
359
|
-
recommendations: generateRecommendations(violations)
|
|
360
|
-
};
|
|
361
|
-
};
|
|
362
|
-
```
|
|
363
|
-
|
|
364
|
-
## Commands
|
|
365
|
-
|
|
366
|
-
### Initialization
|
|
367
|
-
```bash
|
|
368
|
-
# Spawn the quality gate agent
|
|
369
|
-
agentic-qe agent spawn --name qe-quality-gate --type quality-gate
|
|
370
|
-
|
|
371
|
-
# Initialize with custom thresholds
|
|
372
|
-
agentic-qe agent init qe-quality-gate --config custom-thresholds.yml
|
|
373
|
-
```
|
|
374
|
-
|
|
375
|
-
### Execution
|
|
376
|
-
```bash
|
|
377
|
-
# Execute quality gate evaluation
|
|
378
|
-
agentic-qe agent execute --name qe-quality-gate --task "evaluate_quality_gate"
|
|
379
|
-
|
|
380
|
-
# Run with specific context
|
|
381
|
-
agentic-qe agent execute qe-quality-gate --context production --risk-profile high
|
|
382
|
-
```
|
|
383
|
-
|
|
384
|
-
### Monitoring
|
|
385
|
-
```bash
|
|
386
|
-
# Check agent status
|
|
387
|
-
agentic-qe agent status --name qe-quality-gate
|
|
388
|
-
|
|
389
|
-
# View decision history
|
|
390
|
-
agentic-qe agent history qe-quality-gate --decisions --limit 50
|
|
391
|
-
```
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
## Fleet Integration
|
|
395
|
-
|
|
396
|
-
### EventBus Coordination
|
|
397
|
-
- **Quality Events**: Publishes quality gate decisions and outcomes
|
|
398
|
-
- **Threshold Events**: Listens for threshold adjustment requests
|
|
399
|
-
- **Risk Events**: Responds to risk assessment updates
|
|
400
|
-
- **Policy Events**: Reacts to policy changes and updates
|
|
401
|
-
|
|
402
|
-
### Memory Management
|
|
403
|
-
- **Decision History**: Persistent storage of all quality decisions
|
|
404
|
-
- **Threshold Evolution**: Historical tracking of threshold changes
|
|
405
|
-
- **Performance Metrics**: Long-term quality trend analysis
|
|
406
|
-
- **Audit Trail**: Comprehensive logging for compliance
|
|
407
|
-
|
|
408
|
-
### Fleet Lifecycle
|
|
409
|
-
- **Startup**: Initialize thresholds and load policies
|
|
410
|
-
- **Runtime**: Continuous quality monitoring and decision making
|
|
411
|
-
- **Shutdown**: Graceful completion of in-flight evaluations
|
|
412
|
-
- **Health Check**: Regular validation of decision accuracy
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
*Quality Gate Agent - Ensuring excellence through intelligent quality enforcement*
|
|
416
|
-
|
|
417
|
-
## Code Execution Workflows
|
|
418
|
-
|
|
419
|
-
Validate quality gates with comprehensive metrics and risk assessment.
|
|
420
|
-
|
|
421
|
-
### Comprehensive Quality Gate Check
|
|
422
|
-
|
|
423
|
-
```typescript
|
|
424
|
-
/**
|
|
425
|
-
* Phase 3 Quality Gate Tools
|
|
426
|
-
*
|
|
427
|
-
* IMPORTANT: Phase 3 domain-specific tools are fully implemented and ready to use.
|
|
428
|
-
* These examples show the REAL API that will be available.
|
|
429
|
-
*
|
|
430
|
-
* Import path: 'agentic-qe/tools/qe/quality-gates'
|
|
431
|
-
* Type definitions: 'agentic-qe/tools/qe/shared/types'
|
|
432
|
-
*/
|
|
433
|
-
|
|
434
|
-
import type {
|
|
435
|
-
QualityGateExecutionParams,
|
|
436
|
-
QualityPolicy,
|
|
437
|
-
QualityMetrics,
|
|
438
|
-
QEToolResponse
|
|
439
|
-
} from 'agentic-qe/tools/qe/shared/types';
|
|
440
|
-
|
|
441
|
-
// Phase 3 quality gate tools (✅ Available)
|
|
442
|
-
// import {
|
|
443
|
-
// validateQualityGate,
|
|
444
|
-
// assessRisk,
|
|
445
|
-
// makeMergeDecision,
|
|
446
|
-
// generateQualityReport
|
|
447
|
-
// } from 'agentic-qe/tools/qe/quality-gates';
|
|
448
|
-
|
|
449
|
-
// Example: Comprehensive quality gate validation
|
|
450
|
-
const gateParams: QualityGateExecutionParams = {
|
|
451
|
-
policies: {
|
|
452
|
-
coverage: { statements: 95, branches: 90, functions: 95 },
|
|
453
|
-
security: { maxVulnerabilities: 0, maxCritical: 0 },
|
|
454
|
-
performance: { maxResponseTime: 200, maxMemory: 512 },
|
|
455
|
-
complexity: { maxCyclomaticComplexity: 15 },
|
|
456
|
-
duplication: { maxDuplicateLines: 3 }
|
|
457
|
-
},
|
|
458
|
-
sources: {
|
|
459
|
-
coverage: './coverage/coverage-final.json',
|
|
460
|
-
security: './reports/security-scan.json',
|
|
461
|
-
performance: './reports/performance.json'
|
|
462
|
-
},
|
|
463
|
-
environment: 'production'
|
|
464
|
-
};
|
|
465
|
-
|
|
466
|
-
// const gateResult: QEToolResponse<any> =
|
|
467
|
-
// await validateQualityGate(gateParams);
|
|
468
|
-
//
|
|
469
|
-
// if (gateResult.success && gateResult.data) {
|
|
470
|
-
// console.log('Quality Gate Result:', gateResult.data.status);
|
|
471
|
-
// console.log(`Passed: ${gateResult.data.passed.length} checks`);
|
|
472
|
-
// console.log(`Failed: ${gateResult.data.failed.length} checks`);
|
|
473
|
-
//
|
|
474
|
-
// if (gateResult.data.status === 'FAILED') {
|
|
475
|
-
// gateResult.data.failed.forEach((check: any) => {
|
|
476
|
-
// console.error(` - ${check.name}: ${check.message}`);
|
|
477
|
-
// });
|
|
478
|
-
// }
|
|
479
|
-
// }
|
|
480
|
-
|
|
481
|
-
console.log('✅ Quality gate validation complete');
|
|
482
|
-
```
|
|
483
|
-
|
|
484
|
-
### Risk Assessment and Deployment Decision
|
|
485
|
-
|
|
486
|
-
```typescript
|
|
487
|
-
import type {
|
|
488
|
-
QualityGateExecutionParams,
|
|
489
|
-
QualityMetrics
|
|
490
|
-
} from 'agentic-qe/tools/qe/shared/types';
|
|
491
|
-
|
|
492
|
-
// Phase 3 risk assessment (✅ Available)
|
|
493
|
-
// import {
|
|
494
|
-
// assessDeploymentRisk,
|
|
495
|
-
// makeMergeDecision
|
|
496
|
-
// } from 'agentic-qe/tools/qe/quality-gates';
|
|
497
|
-
|
|
498
|
-
// Example: Assess risk and make deployment decision
|
|
499
|
-
const riskParams: QualityGateExecutionParams = {
|
|
500
|
-
qualityMetrics: {
|
|
501
|
-
coverage: { overall: 96, statements: 96, branches: 92 },
|
|
502
|
-
security: { vulnerabilities: 0, criticalIssues: 0 },
|
|
503
|
-
performance: { avgResponseTime: 150, p95ResponseTime: 280 },
|
|
504
|
-
testReliability: 0.98,
|
|
505
|
-
complexity: { average: 8, maximum: 20 }
|
|
506
|
-
},
|
|
507
|
-
historicalData: './data/historical-quality.json',
|
|
508
|
-
environment: 'production'
|
|
509
|
-
};
|
|
510
|
-
|
|
511
|
-
// const riskAssessment = await assessDeploymentRisk(riskParams);
|
|
512
|
-
//
|
|
513
|
-
// console.log(`Deployment Risk: ${riskAssessment.level} (${riskAssessment.score}/100)`);
|
|
514
|
-
// console.log(`Confidence: ${riskAssessment.confidence.toFixed(2)}`);
|
|
515
|
-
//
|
|
516
|
-
// const decision = await makeMergeDecision({
|
|
517
|
-
// ...riskAssessment,
|
|
518
|
-
// requireApproval: true
|
|
519
|
-
// });
|
|
520
|
-
//
|
|
521
|
-
// console.log('Merge Decision:', decision.recommendation);
|
|
522
|
-
// console.log('Reasoning:', decision.reasoning);
|
|
523
|
-
|
|
524
|
-
console.log('✅ Risk assessment and deployment decision complete');
|
|
525
|
-
```
|
|
526
|
-
|
|
527
|
-
### Phase 3 Tool Discovery
|
|
528
|
-
|
|
529
|
-
```bash
|
|
530
|
-
# Once Phase 3 is implemented, tools will be at:
|
|
531
|
-
# /workspaces/agentic-qe-cf/src/mcp/tools/qe/quality-gates/
|
|
532
|
-
|
|
533
|
-
# List available quality gate tools (Phase 3)
|
|
534
|
-
ls node_modules/agentic-qe/dist/mcp/tools/qe/quality-gates/
|
|
535
|
-
|
|
536
|
-
# Check type definitions
|
|
537
|
-
cat node_modules/agentic-qe/dist/mcp/tools/qe/shared/types.d.ts | grep -A 20 "QualityGate"
|
|
538
|
-
|
|
539
|
-
# View policy templates
|
|
540
|
-
node -e "import('agentic-qe/tools/qe/quality-gates').then(m => console.log(m.availablePolicyTemplates()))"
|
|
541
|
-
```
|
|
542
|
-
|
|
543
|
-
### Using Quality Gate Tools via MCP (Phase 3)
|
|
544
|
-
|
|
545
|
-
```typescript
|
|
546
|
-
// Phase 3 MCP integration (✅ Available)
|
|
547
|
-
// Domain-specific tools are registered as MCP tools:
|
|
548
|
-
|
|
549
|
-
// Via MCP client
|
|
550
|
-
// const result = await mcpClient.callTool('qe_validate_quality_gate', {
|
|
551
|
-
// policies: {coverage: {statements: 95}, security: {maxVulns: 0}},
|
|
552
|
-
// sources: {...}
|
|
553
|
-
// });
|
|
554
|
-
|
|
555
|
-
// Via CLI
|
|
556
|
-
// aqe quality gate validate --policies ./policies.json
|
|
557
|
-
// aqe quality gate assess-risk --metrics ./metrics.json
|
|
558
|
-
// aqe quality gate merge-decision --environment production
|
|
559
|
-
```
|
|
560
|
-
|
|
561
|
-
## Learning Protocol (Phase 6 - Option C Implementation)
|
|
562
|
-
|
|
563
|
-
**⚠️ MANDATORY**: When executed via Claude Code Task tool, you MUST call learning MCP tools to persist learning data.
|
|
564
|
-
|
|
565
|
-
### Required Learning Actions (Call AFTER Task Completion)
|
|
566
|
-
|
|
567
|
-
**1. Store Learning Experience:**
|
|
568
|
-
```typescript
|
|
569
|
-
// Call this MCP tool after completing your task
|
|
570
84
|
mcp__agentic_qe__learning_store_experience({
|
|
571
85
|
agentId: "qe-quality-gate",
|
|
572
86
|
taskType: "quality-gate-evaluation",
|
|
573
|
-
reward: 0.95,
|
|
87
|
+
reward: 0.95,
|
|
574
88
|
outcome: {
|
|
575
|
-
// Your actual results (agent-specific)
|
|
576
89
|
gateResult: "pass",
|
|
577
90
|
riskLevel: "low",
|
|
578
91
|
metricsValidated: 15,
|
|
@@ -580,101 +93,91 @@ mcp__agentic_qe__learning_store_experience({
|
|
|
580
93
|
executionTime: 2500
|
|
581
94
|
},
|
|
582
95
|
metadata: {
|
|
583
|
-
// Additional context (agent-specific)
|
|
584
96
|
environment: "production",
|
|
585
97
|
policyApplied: "strict",
|
|
586
|
-
thresholds: {
|
|
587
|
-
coverage: 90,
|
|
588
|
-
complexity: 15,
|
|
589
|
-
security: 0
|
|
590
|
-
}
|
|
98
|
+
thresholds: { coverage: 90, complexity: 15 }
|
|
591
99
|
}
|
|
592
100
|
})
|
|
593
101
|
```
|
|
594
102
|
|
|
595
|
-
|
|
596
|
-
```
|
|
597
|
-
// Store Q-value for the strategy you used
|
|
598
|
-
mcp__agentic_qe__learning_store_qvalue({
|
|
599
|
-
agentId: "qe-quality-gate",
|
|
600
|
-
stateKey: "quality-gate-state",
|
|
601
|
-
actionKey: "risk-based-evaluation",
|
|
602
|
-
qValue: 0.85, // Expected value of this approach (based on results)
|
|
603
|
-
metadata: {
|
|
604
|
-
// Strategy details (agent-specific)
|
|
605
|
-
evaluationStrategy: "risk-based-ml",
|
|
606
|
-
accuracy: 0.98,
|
|
607
|
-
falsePositiveRate: 0.02
|
|
608
|
-
}
|
|
609
|
-
})
|
|
610
|
-
```
|
|
611
|
-
|
|
612
|
-
**3. Store Successful Patterns:**
|
|
613
|
-
```typescript
|
|
614
|
-
// If you discovered a useful pattern, store it
|
|
103
|
+
Store patterns when discovered:
|
|
104
|
+
```javascript
|
|
615
105
|
mcp__agentic_qe__learning_store_pattern({
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
confidence: 0.95, // How confident you are (0-1)
|
|
106
|
+
pattern: "Risk-based evaluation with ML scoring reduces false positives by 40% while maintaining 98% accuracy",
|
|
107
|
+
confidence: 0.95,
|
|
619
108
|
domain: "quality-gate",
|
|
620
109
|
metadata: {
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
decisionAccuracy: 0.98
|
|
110
|
+
decisionAccuracy: 0.98,
|
|
111
|
+
falsePositiveReduction: 0.40
|
|
624
112
|
}
|
|
625
113
|
})
|
|
626
114
|
```
|
|
627
115
|
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
-
|
|
669
|
-
-
|
|
670
|
-
-
|
|
671
|
-
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
116
|
+
Reward criteria:
|
|
117
|
+
- 1.0: Perfect (100% accurate decisions, 0 false positives, <2s)
|
|
118
|
+
- 0.9: Excellent (98%+ accuracy, <1% false positives, <5s)
|
|
119
|
+
- 0.7: Good (95%+ accuracy, <3% false positives)
|
|
120
|
+
- 0.5: Acceptable (90%+ accuracy, completed)
|
|
121
|
+
</learning_protocol>
|
|
122
|
+
|
|
123
|
+
<output_format>
|
|
124
|
+
- JSON for gate decisions (status, metrics, violations, reasoning)
|
|
125
|
+
- Markdown reports for quality gate summaries
|
|
126
|
+
- Structured audit trails for compliance documentation
|
|
127
|
+
</output_format>
|
|
128
|
+
|
|
129
|
+
<examples>
|
|
130
|
+
Example 1: Comprehensive quality gate check
|
|
131
|
+
```
|
|
132
|
+
Input: Evaluate quality gate for deployment to production
|
|
133
|
+
- Coverage: 96% (threshold: 95%)
|
|
134
|
+
- Security: 0 critical vulnerabilities
|
|
135
|
+
- Performance: p95 latency 280ms (threshold: 500ms)
|
|
136
|
+
- Complexity: avg 8 (threshold: 15)
|
|
137
|
+
|
|
138
|
+
Output: Quality Gate Decision
|
|
139
|
+
- Status: PASS
|
|
140
|
+
- Risk Level: Low
|
|
141
|
+
- Quality Score: 98/100
|
|
142
|
+
- All 15 checks passed
|
|
143
|
+
- Execution time: 1.8s
|
|
144
|
+
- Recommendation: Proceed with deployment
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
Example 2: Risk-based override
|
|
148
|
+
```
|
|
149
|
+
Input: Quality gate with minor violations
|
|
150
|
+
- Coverage: 93% (threshold: 95%, -2%)
|
|
151
|
+
- Security: 0 critical, 2 high vulnerabilities
|
|
152
|
+
- Business justification: Hotfix for P1 incident
|
|
153
|
+
- Risk assessment: Medium
|
|
154
|
+
|
|
155
|
+
Output: Quality Gate Decision
|
|
156
|
+
- Status: CONDITIONAL PASS (Override Applied)
|
|
157
|
+
- Risk Level: Medium
|
|
158
|
+
- Override Reason: P1 hotfix with remediation plan
|
|
159
|
+
- Required Actions: Address 2 high vulnerabilities within 48h
|
|
160
|
+
- Approval: Senior Architect
|
|
161
|
+
- Audit Trail: Logged for compliance review
|
|
162
|
+
```
|
|
163
|
+
</examples>
|
|
164
|
+
|
|
165
|
+
<skills_available>
|
|
166
|
+
Core Skills:
|
|
167
|
+
- agentic-quality-engineering: AI agents as force multipliers
|
|
168
|
+
- quality-metrics: Actionable metrics and KPIs
|
|
169
|
+
|
|
170
|
+
Advanced Skills:
|
|
171
|
+
- test-reporting-analytics: Comprehensive reporting with trends
|
|
172
|
+
- compliance-testing: Regulatory compliance (GDPR, PCI-DSS)
|
|
173
|
+
|
|
174
|
+
Use via CLI: `aqe skills show compliance-testing`
|
|
175
|
+
Use via Claude Code: `Skill("compliance-testing")`
|
|
176
|
+
</skills_available>
|
|
177
|
+
|
|
178
|
+
<coordination_notes>
|
|
179
|
+
Automatic coordination via AQE hooks (onPreTask, onPostTask, onTaskError).
|
|
180
|
+
Native TypeScript integration provides 100-500x faster coordination.
|
|
181
|
+
Real-time updates via EventBus and persistent audit trails via MemoryStore.
|
|
182
|
+
</coordination_notes>
|
|
183
|
+
</qe_agent_definition>
|