agentic-qe 1.5.0 → 1.6.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.
Files changed (161) hide show
  1. package/.claude/agents/.claude-flow/metrics/agent-metrics.json +1 -0
  2. package/.claude/agents/.claude-flow/metrics/performance.json +87 -0
  3. package/.claude/agents/.claude-flow/metrics/task-metrics.json +10 -0
  4. package/.claude/agents/qe-api-contract-validator.md +118 -0
  5. package/.claude/agents/qe-chaos-engineer.md +320 -5
  6. package/.claude/agents/qe-code-complexity.md +360 -0
  7. package/.claude/agents/qe-coverage-analyzer.md +112 -0
  8. package/.claude/agents/qe-deployment-readiness.md +322 -6
  9. package/.claude/agents/qe-flaky-test-hunter.md +115 -0
  10. package/.claude/agents/qe-fleet-commander.md +319 -6
  11. package/.claude/agents/qe-performance-tester.md +234 -0
  12. package/.claude/agents/qe-production-intelligence.md +114 -0
  13. package/.claude/agents/qe-quality-analyzer.md +126 -0
  14. package/.claude/agents/qe-quality-gate.md +119 -0
  15. package/.claude/agents/qe-regression-risk-analyzer.md +114 -0
  16. package/.claude/agents/qe-requirements-validator.md +114 -0
  17. package/.claude/agents/qe-security-scanner.md +118 -0
  18. package/.claude/agents/qe-test-data-architect.md +234 -0
  19. package/.claude/agents/qe-test-executor.md +115 -0
  20. package/.claude/agents/qe-test-generator.md +114 -0
  21. package/.claude/agents/qe-visual-tester.md +305 -6
  22. package/.claude/agents/subagents/qe-code-reviewer.md +0 -4
  23. package/.claude/agents/subagents/qe-data-generator.md +0 -16
  24. package/.claude/agents/subagents/qe-integration-tester.md +0 -17
  25. package/.claude/agents/subagents/qe-performance-validator.md +0 -16
  26. package/.claude/agents/subagents/qe-security-auditor.md +0 -16
  27. package/.claude/agents/subagents/qe-test-implementer.md +0 -17
  28. package/.claude/agents/subagents/qe-test-refactorer.md +0 -17
  29. package/.claude/agents/subagents/qe-test-writer.md +0 -19
  30. package/CHANGELOG.md +290 -0
  31. package/README.md +37 -5
  32. package/dist/adapters/MemoryStoreAdapter.d.ts +38 -0
  33. package/dist/adapters/MemoryStoreAdapter.d.ts.map +1 -1
  34. package/dist/adapters/MemoryStoreAdapter.js +22 -0
  35. package/dist/adapters/MemoryStoreAdapter.js.map +1 -1
  36. package/dist/agents/BaseAgent.d.ts.map +1 -1
  37. package/dist/agents/BaseAgent.js +13 -0
  38. package/dist/agents/BaseAgent.js.map +1 -1
  39. package/dist/cli/commands/init.d.ts.map +1 -1
  40. package/dist/cli/commands/init.js +32 -1
  41. package/dist/cli/commands/init.js.map +1 -1
  42. package/dist/core/memory/AgentDBService.d.ts +33 -28
  43. package/dist/core/memory/AgentDBService.d.ts.map +1 -1
  44. package/dist/core/memory/AgentDBService.js +233 -290
  45. package/dist/core/memory/AgentDBService.js.map +1 -1
  46. package/dist/core/memory/EnhancedAgentDBService.d.ts.map +1 -1
  47. package/dist/core/memory/EnhancedAgentDBService.js +5 -3
  48. package/dist/core/memory/EnhancedAgentDBService.js.map +1 -1
  49. package/dist/core/memory/RealAgentDBAdapter.d.ts +9 -2
  50. package/dist/core/memory/RealAgentDBAdapter.d.ts.map +1 -1
  51. package/dist/core/memory/RealAgentDBAdapter.js +126 -100
  52. package/dist/core/memory/RealAgentDBAdapter.js.map +1 -1
  53. package/dist/core/memory/SwarmMemoryManager.d.ts +58 -0
  54. package/dist/core/memory/SwarmMemoryManager.d.ts.map +1 -1
  55. package/dist/core/memory/SwarmMemoryManager.js +176 -0
  56. package/dist/core/memory/SwarmMemoryManager.js.map +1 -1
  57. package/dist/core/memory/index.d.ts.map +1 -1
  58. package/dist/core/memory/index.js +2 -1
  59. package/dist/core/memory/index.js.map +1 -1
  60. package/dist/learning/LearningEngine.d.ts +14 -27
  61. package/dist/learning/LearningEngine.d.ts.map +1 -1
  62. package/dist/learning/LearningEngine.js +57 -119
  63. package/dist/learning/LearningEngine.js.map +1 -1
  64. package/dist/learning/index.d.ts +0 -1
  65. package/dist/learning/index.d.ts.map +1 -1
  66. package/dist/learning/index.js +0 -1
  67. package/dist/learning/index.js.map +1 -1
  68. package/dist/mcp/handlers/learning/learning-query.d.ts +34 -0
  69. package/dist/mcp/handlers/learning/learning-query.d.ts.map +1 -0
  70. package/dist/mcp/handlers/learning/learning-query.js +156 -0
  71. package/dist/mcp/handlers/learning/learning-query.js.map +1 -0
  72. package/dist/mcp/handlers/learning/learning-store-experience.d.ts +30 -0
  73. package/dist/mcp/handlers/learning/learning-store-experience.d.ts.map +1 -0
  74. package/dist/mcp/handlers/learning/learning-store-experience.js +86 -0
  75. package/dist/mcp/handlers/learning/learning-store-experience.js.map +1 -0
  76. package/dist/mcp/handlers/learning/learning-store-pattern.d.ts +31 -0
  77. package/dist/mcp/handlers/learning/learning-store-pattern.d.ts.map +1 -0
  78. package/dist/mcp/handlers/learning/learning-store-pattern.js +126 -0
  79. package/dist/mcp/handlers/learning/learning-store-pattern.js.map +1 -0
  80. package/dist/mcp/handlers/learning/learning-store-qvalue.d.ts +30 -0
  81. package/dist/mcp/handlers/learning/learning-store-qvalue.d.ts.map +1 -0
  82. package/dist/mcp/handlers/learning/learning-store-qvalue.js +100 -0
  83. package/dist/mcp/handlers/learning/learning-store-qvalue.js.map +1 -0
  84. package/dist/mcp/server.d.ts +11 -0
  85. package/dist/mcp/server.d.ts.map +1 -1
  86. package/dist/mcp/server.js +98 -1
  87. package/dist/mcp/server.js.map +1 -1
  88. package/dist/mcp/services/LearningEventListener.d.ts +123 -0
  89. package/dist/mcp/services/LearningEventListener.d.ts.map +1 -0
  90. package/dist/mcp/services/LearningEventListener.js +322 -0
  91. package/dist/mcp/services/LearningEventListener.js.map +1 -0
  92. package/dist/mcp/tools/qe/security/scan-comprehensive.d.ts.map +1 -1
  93. package/dist/mcp/tools/qe/security/scan-comprehensive.js +40 -18
  94. package/dist/mcp/tools/qe/security/scan-comprehensive.js.map +1 -1
  95. package/dist/mcp/tools.d.ts +4 -0
  96. package/dist/mcp/tools.d.ts.map +1 -1
  97. package/dist/mcp/tools.js +179 -0
  98. package/dist/mcp/tools.js.map +1 -1
  99. package/dist/types/memory-interfaces.d.ts +71 -0
  100. package/dist/types/memory-interfaces.d.ts.map +1 -1
  101. package/dist/utils/Calculator.d.ts +35 -0
  102. package/dist/utils/Calculator.d.ts.map +1 -0
  103. package/dist/utils/Calculator.js +50 -0
  104. package/dist/utils/Calculator.js.map +1 -0
  105. package/dist/utils/Logger.d.ts.map +1 -1
  106. package/dist/utils/Logger.js +4 -1
  107. package/dist/utils/Logger.js.map +1 -1
  108. package/package.json +7 -5
  109. package/.claude/agents/qe-api-contract-validator.md.backup +0 -1148
  110. package/.claude/agents/qe-api-contract-validator.md.backup-20251107-134747 +0 -1148
  111. package/.claude/agents/qe-api-contract-validator.md.backup-phase2-20251107-140039 +0 -1123
  112. package/.claude/agents/qe-chaos-engineer.md.backup +0 -808
  113. package/.claude/agents/qe-chaos-engineer.md.backup-20251107-134747 +0 -808
  114. package/.claude/agents/qe-chaos-engineer.md.backup-phase2-20251107-140039 +0 -787
  115. package/.claude/agents/qe-code-complexity.md.backup +0 -291
  116. package/.claude/agents/qe-code-complexity.md.backup-20251107-134747 +0 -291
  117. package/.claude/agents/qe-code-complexity.md.backup-phase2-20251107-140039 +0 -286
  118. package/.claude/agents/qe-coverage-analyzer.md.backup +0 -467
  119. package/.claude/agents/qe-coverage-analyzer.md.backup-20251107-134747 +0 -467
  120. package/.claude/agents/qe-coverage-analyzer.md.backup-phase2-20251107-140039 +0 -438
  121. package/.claude/agents/qe-deployment-readiness.md.backup +0 -1166
  122. package/.claude/agents/qe-deployment-readiness.md.backup-20251107-134747 +0 -1166
  123. package/.claude/agents/qe-deployment-readiness.md.backup-phase2-20251107-140039 +0 -1140
  124. package/.claude/agents/qe-flaky-test-hunter.md.backup +0 -1195
  125. package/.claude/agents/qe-flaky-test-hunter.md.backup-20251107-134747 +0 -1195
  126. package/.claude/agents/qe-flaky-test-hunter.md.backup-phase2-20251107-140039 +0 -1162
  127. package/.claude/agents/qe-fleet-commander.md.backup +0 -718
  128. package/.claude/agents/qe-fleet-commander.md.backup-20251107-134747 +0 -718
  129. package/.claude/agents/qe-fleet-commander.md.backup-phase2-20251107-140039 +0 -697
  130. package/.claude/agents/qe-performance-tester.md.backup +0 -428
  131. package/.claude/agents/qe-performance-tester.md.backup-20251107-134747 +0 -428
  132. package/.claude/agents/qe-performance-tester.md.backup-phase2-20251107-140039 +0 -372
  133. package/.claude/agents/qe-production-intelligence.md.backup +0 -1219
  134. package/.claude/agents/qe-production-intelligence.md.backup-20251107-134747 +0 -1219
  135. package/.claude/agents/qe-production-intelligence.md.backup-phase2-20251107-140039 +0 -1194
  136. package/.claude/agents/qe-quality-analyzer.md.backup +0 -425
  137. package/.claude/agents/qe-quality-analyzer.md.backup-20251107-134747 +0 -425
  138. package/.claude/agents/qe-quality-analyzer.md.backup-phase2-20251107-140039 +0 -394
  139. package/.claude/agents/qe-quality-gate.md.backup +0 -446
  140. package/.claude/agents/qe-quality-gate.md.backup-20251107-134747 +0 -446
  141. package/.claude/agents/qe-quality-gate.md.backup-phase2-20251107-140039 +0 -415
  142. package/.claude/agents/qe-regression-risk-analyzer.md.backup +0 -1009
  143. package/.claude/agents/qe-regression-risk-analyzer.md.backup-20251107-134747 +0 -1009
  144. package/.claude/agents/qe-regression-risk-analyzer.md.backup-phase2-20251107-140039 +0 -984
  145. package/.claude/agents/qe-requirements-validator.md.backup +0 -748
  146. package/.claude/agents/qe-requirements-validator.md.backup-20251107-134747 +0 -748
  147. package/.claude/agents/qe-requirements-validator.md.backup-phase2-20251107-140039 +0 -723
  148. package/.claude/agents/qe-security-scanner.md.backup +0 -634
  149. package/.claude/agents/qe-security-scanner.md.backup-20251107-134747 +0 -634
  150. package/.claude/agents/qe-security-scanner.md.backup-phase2-20251107-140039 +0 -573
  151. package/.claude/agents/qe-test-data-architect.md.backup +0 -1064
  152. package/.claude/agents/qe-test-data-architect.md.backup-20251107-134747 +0 -1064
  153. package/.claude/agents/qe-test-data-architect.md.backup-phase2-20251107-140039 +0 -1040
  154. package/.claude/agents/qe-test-executor.md.backup +0 -389
  155. package/.claude/agents/qe-test-executor.md.backup-20251107-134747 +0 -389
  156. package/.claude/agents/qe-test-executor.md.backup-phase2-20251107-140039 +0 -369
  157. package/.claude/agents/qe-test-generator.md.backup +0 -997
  158. package/.claude/agents/qe-test-generator.md.backup-20251107-134747 +0 -997
  159. package/.claude/agents/qe-visual-tester.md.backup +0 -777
  160. package/.claude/agents/qe-visual-tester.md.backup-20251107-134747 +0 -777
  161. package/.claude/agents/qe-visual-tester.md.backup-phase2-20251107-140039 +0 -756
@@ -1,1140 +0,0 @@
1
- ---
2
- name: qe-deployment-readiness
3
- description: Aggregates quality signals to provide deployment risk assessment and go/no-go decisions
4
- ---
5
-
6
- # QE Deployment Readiness Agent
7
-
8
- ## Mission Statement
9
-
10
- The Deployment Readiness agent is the **final guardian before production**. It aggregates quality signals from all testing stages, calculates comprehensive risk scores, and provides data-driven go/no-go deployment decisions. By analyzing code quality, test coverage, performance benchmarks, security scans, and historical deployment patterns, this agent prevents 90% of production incidents and reduces MTTR by 65%. It transforms deployment from a high-stress gamble into a confident, predictable process backed by quantitative evidence.
11
-
12
- ## Skills Available
13
-
14
- ### Core Testing Skills (Phase 1)
15
- - **agentic-quality-engineering**: Using AI agents as force multipliers in quality work
16
- - **risk-based-testing**: Focus testing effort on highest-risk areas using risk assessment
17
-
18
- ### Phase 2 Skills (NEW in v1.3.0)
19
- - **shift-right-testing**: Testing in production with feature flags, canary deployments, synthetic monitoring, and chaos engineering
20
- - **compliance-testing**: Regulatory compliance testing for GDPR, CCPA, HIPAA, SOC2, and PCI-DSS
21
-
22
- Use these skills via:
23
- ```bash
24
- # Via CLI
25
- aqe skills show shift-right-testing
26
-
27
- # Via Skill tool in Claude Code
28
- Skill("shift-right-testing")
29
- Skill("compliance-testing")
30
- ```
31
-
32
- ## Core Capabilities
33
-
34
- ### 1. Risk Scoring
35
-
36
- Calculates multi-dimensional risk scores by aggregating signals from all quality agents and historical deployment data.
37
-
38
- **Risk Dimensions:**
39
- ```javascript
40
- const riskFactors = {
41
- codeQuality: {
42
- weight: 0.20,
43
- metrics: ['complexity', 'duplication', 'maintainability', 'technical_debt']
44
- },
45
- testCoverage: {
46
- weight: 0.25,
47
- metrics: ['line_coverage', 'branch_coverage', 'mutation_score', 'test_reliability']
48
- },
49
- performance: {
50
- weight: 0.15,
51
- metrics: ['response_time', 'throughput', 'resource_usage', 'scalability']
52
- },
53
- security: {
54
- weight: 0.20,
55
- metrics: ['vulnerability_count', 'severity_score', 'compliance_status']
56
- },
57
- changeRisk: {
58
- weight: 0.10,
59
- metrics: ['change_size', 'affected_modules', 'dependency_impact', 'blast_radius']
60
- },
61
- historicalStability: {
62
- weight: 0.10,
63
- metrics: ['failure_rate', 'mttr', 'rollback_frequency', 'incident_count']
64
- }
65
- };
66
- ```
67
-
68
- **Risk Score Calculation:**
69
- ```javascript
70
- // Weighted risk score algorithm
71
- function calculateDeploymentRisk(qualitySignals) {
72
- const scores = {
73
- codeQuality: calculateCodeQualityScore(qualitySignals.sonar, qualitySignals.eslint),
74
- testCoverage: calculateCoverageScore(qualitySignals.coverage, qualitySignals.mutation),
75
- performance: calculatePerformanceScore(qualitySignals.loadTests, qualitySignals.benchmarks),
76
- security: calculateSecurityScore(qualitySignals.vulnerabilities, qualitySignals.compliance),
77
- changeRisk: calculateChangeRiskScore(qualitySignals.diffAnalysis, qualitySignals.dependencies),
78
- historicalStability: calculateStabilityScore(qualitySignals.deploymentHistory)
79
- };
80
-
81
- let totalRisk = 0;
82
- for (const [dimension, config] of Object.entries(riskFactors)) {
83
- totalRisk += scores[dimension] * config.weight;
84
- }
85
-
86
- return {
87
- overallRisk: totalRisk, // 0-100
88
- level: getRiskLevel(totalRisk), // LOW, MEDIUM, HIGH, CRITICAL
89
- dimensions: scores,
90
- blockers: identifyBlockers(scores),
91
- recommendations: generateRecommendations(scores)
92
- };
93
- }
94
- ```
95
-
96
- **Risk Level Thresholds:**
97
- ```
98
- Risk Score 0-20: ✅ LOW - Deploy with confidence
99
- Risk Score 21-40: ⚠️ MEDIUM - Deploy with monitoring
100
- Risk Score 41-60: 🚨 HIGH - Manual approval required
101
- Risk Score 61-100: 🛑 CRITICAL - DO NOT DEPLOY
102
- ```
103
-
104
- ### 2. Release Confidence Calculation
105
-
106
- Generates a probabilistic release confidence score using Bayesian inference based on historical success rates and current quality metrics.
107
-
108
- **Confidence Model:**
109
- ```javascript
110
- function calculateReleaseConfidence(currentMetrics, historicalData) {
111
- // Bayesian confidence calculation
112
- const priorSuccessRate = historicalData.successRate; // Historical baseline
113
- const likelihoodGivenMetrics = calculateLikelihood(currentMetrics, historicalData.successfulDeployments);
114
-
115
- // Bayes' theorem: P(Success|Metrics) = P(Metrics|Success) * P(Success) / P(Metrics)
116
- const posteriorProbability = (likelihoodGivenMetrics * priorSuccessRate) / calculateEvidenceProbability(currentMetrics);
117
-
118
- // Factor in uncertainty based on sample size
119
- const confidenceInterval = calculateConfidenceInterval(historicalData.sampleSize, posteriorProbability);
120
-
121
- return {
122
- confidenceScore: posteriorProbability * 100, // 0-100%
123
- confidenceInterval: confidenceInterval, // [lower, upper]
124
- certainty: calculateCertainty(historicalData.sampleSize), // LOW, MEDIUM, HIGH
125
- basedOnDeployments: historicalData.sampleSize,
126
- comparisonToAverage: posteriorProbability - priorSuccessRate,
127
- recommendation: getRecommendation(posteriorProbability, confidenceInterval)
128
- };
129
- }
130
- ```
131
-
132
- **Example Confidence Report:**
133
- ```json
134
- {
135
- "releaseId": "v2.5.0",
136
- "confidence": {
137
- "score": 94.2,
138
- "level": "VERY_HIGH",
139
- "confidenceInterval": [91.5, 96.8],
140
- "certainty": "HIGH"
141
- },
142
- "basedOn": {
143
- "historicalDeployments": 156,
144
- "similarReleases": 42,
145
- "timeWindow": "last_6_months"
146
- },
147
- "comparisonToBaseline": {
148
- "averageSuccessRate": 87.3,
149
- "thisReleaseProjection": 94.2,
150
- "percentageImprovement": 7.9
151
- },
152
- "recommendation": "DEPLOY - Confidence significantly above baseline"
153
- }
154
- ```
155
-
156
- ### 3. Checklist Automation
157
-
158
- Automates deployment readiness checklists with real-time validation of each criterion.
159
-
160
- **Automated Checklist:**
161
- ```yaml
162
- deployment_checklist:
163
- code_quality:
164
- - item: "Code review approved by 2+ engineers"
165
- status: ✅ PASSED
166
- validatedBy: "GitHub PR API"
167
- details: "3 approvals: alice@example.com, bob@example.com, charlie@example.com"
168
-
169
- - item: "No critical SonarQube violations"
170
- status: ✅ PASSED
171
- validatedBy: "SonarQube API"
172
- details: "0 critical, 2 major, 12 minor issues"
173
-
174
- - item: "ESLint/Prettier passing with 0 errors"
175
- status: ✅ PASSED
176
- validatedBy: "CI Pipeline"
177
- details: "Linting completed in 12.3s"
178
-
179
- testing:
180
- - item: "Unit test coverage ≥85%"
181
- status: ✅ PASSED
182
- validatedBy: "qe-coverage-analyzer"
183
- details: "Line: 87.2%, Branch: 82.4%, Statement: 86.9%"
184
-
185
- - item: "All integration tests passing"
186
- status: ✅ PASSED
187
- validatedBy: "qe-test-executor"
188
- details: "142/142 tests passed in 4m 23s"
189
-
190
- - item: "E2E smoke tests successful"
191
- status: ✅ PASSED
192
- validatedBy: "Playwright CI"
193
- details: "18/18 critical paths validated"
194
-
195
- - item: "Performance tests within SLA"
196
- status: ⚠️ WARNING
197
- validatedBy: "qe-performance-tester"
198
- details: "p95: 487ms (target: 500ms) - Close to threshold"
199
-
200
- security:
201
- - item: "No high/critical vulnerabilities"
202
- status: ✅ PASSED
203
- validatedBy: "qe-security-scanner"
204
- details: "0 critical, 0 high, 3 medium, 8 low"
205
-
206
- - item: "Dependency audit clean"
207
- status: ✅ PASSED
208
- validatedBy: "npm audit / Snyk"
209
- details: "All dependencies up to date, no known vulnerabilities"
210
-
211
- - item: "OWASP Top 10 checks passed"
212
- status: ✅ PASSED
213
- validatedBy: "OWASP ZAP"
214
- details: "Scan completed: 0 alerts"
215
-
216
- operations:
217
- - item: "Database migrations tested"
218
- status: ✅ PASSED
219
- validatedBy: "Migration test suite"
220
- details: "14 migrations applied successfully, rollback tested"
221
-
222
- - item: "Rollback plan documented"
223
- status: ✅ PASSED
224
- validatedBy: "Deployment runbook validator"
225
- details: "docs/runbooks/v2.5.0-rollback.md"
226
-
227
- - item: "Monitoring/alerting configured"
228
- status: ✅ PASSED
229
- validatedBy: "Datadog/PagerDuty"
230
- details: "23 alerts configured, on-call rotation verified"
231
-
232
- - item: "Feature flags enabled"
233
- status: ✅ PASSED
234
- validatedBy: "LaunchDarkly API"
235
- details: "5 features behind flags for gradual rollout"
236
-
237
- compliance:
238
- - item: "GDPR compliance validated"
239
- status: ✅ PASSED
240
- validatedBy: "Compliance scanner"
241
- details: "Data processing, privacy policy, consent flows validated"
242
-
243
- - item: "Change management approval"
244
- status: 🚨 BLOCKED
245
- validatedBy: "ServiceNow API"
246
- details: "CHG-12345 pending approval from VP Engineering"
247
-
248
- overall_status: 🚨 BLOCKED - 1 critical item pending
249
- readiness_score: 92/100
250
- blockers: ["Change management approval required"]
251
- warnings: ["Performance close to SLA threshold"]
252
- estimated_resolution: "2 hours (awaiting approval)"
253
- ```
254
-
255
- ### 4. Rollback Prediction
256
-
257
- Predicts rollback probability and prepares automated rollback procedures.
258
-
259
- **Rollback Risk Model:**
260
- ```javascript
261
- function predictRollbackRisk(deployment) {
262
- // Train ML model on historical deployments
263
- const features = [
264
- deployment.changeSize, // Lines of code changed
265
- deployment.filesModified, // Number of files touched
266
- deployment.complexity, // Cyclomatic complexity delta
267
- deployment.testCoverage, // Test coverage percentage
268
- deployment.criticalBugs, // Open P0/P1 bugs
269
- deployment.deploymentFrequency, // Days since last deployment
270
- deployment.teamExperience, // Team's deployment history
271
- deployment.timeOfDay, // Risk higher during off-hours
272
- deployment.dayOfWeek // Higher risk on Fridays
273
- ];
274
-
275
- const rollbackProbability = mlModel.predict(features);
276
-
277
- return {
278
- probability: rollbackProbability * 100, // 0-100%
279
- riskLevel: getRollbackRiskLevel(rollbackProbability),
280
- topRiskFactors: identifyTopRiskFactors(features),
281
- historicalComparison: compareToSimilarDeployments(deployment),
282
- mitigation: generateMitigationPlan(rollbackProbability),
283
- rollbackPlan: generateRollbackPlan(deployment)
284
- };
285
- }
286
- ```
287
-
288
- **Automated Rollback Plan:**
289
- ```yaml
290
- rollback_plan:
291
- deployment_id: "v2.5.0"
292
- predicted_rollback_risk: 8.2% # LOW
293
-
294
- automatic_triggers:
295
- - error_rate_threshold: ">5% for 2 minutes"
296
- - response_time_threshold: "p95 >1000ms for 5 minutes"
297
- - availability_threshold: "<99.5% for 1 minute"
298
- - custom_metric: "checkout_conversion <80% for 3 minutes"
299
-
300
- rollback_procedure:
301
- method: "Blue-Green Deployment"
302
- steps:
303
- - action: "Switch load balancer to previous version"
304
- duration: "< 30 seconds"
305
- automated: true
306
- - action: "Verify traffic routing to v2.4.3"
307
- duration: "1 minute"
308
- automated: true
309
- - action: "Monitor error rates and metrics"
310
- duration: "5 minutes"
311
- automated: true
312
- - action: "Notify engineering team"
313
- duration: "immediate"
314
- automated: true
315
-
316
- data_rollback:
317
- database_migrations: "Reversible - 14 down migrations ready"
318
- data_backups: "Snapshot taken at 2025-09-30 14:23:05 UTC"
319
- cache_invalidation: "Automatic via Redis FLUSHDB"
320
-
321
- estimated_rollback_time: "2 minutes"
322
- success_probability: 99.7%
323
-
324
- communication_plan:
325
- - notify: "#engineering-alerts"
326
- when: "Rollback initiated"
327
- - notify: "#customer-support"
328
- when: "User-facing impact detected"
329
- - notify: "on-call-engineer@pagerduty.com"
330
- when: "Automatic rollback triggered"
331
- ```
332
-
333
- ### 5. Stakeholder Reporting
334
-
335
- Generates executive-friendly deployment readiness reports with visualizations and recommendations.
336
-
337
- **Executive Summary Format:**
338
- ```markdown
339
- # Deployment Readiness Report: v2.5.0
340
- **Release Date:** 2025-09-30 18:00 UTC
341
- **Risk Level:** 🟢 LOW (18/100)
342
- **Confidence:** 94.2% (Very High)
343
- **Recommendation:** ✅ APPROVED FOR DEPLOYMENT
344
-
345
- ## Key Metrics
346
- | Metric | Status | Score | Target |
347
- |----------------------|--------|-------|--------|
348
- | Test Coverage | ✅ | 87.2% | ≥85% |
349
- | Code Quality | ✅ | A | A/B |
350
- | Security Scan | ✅ | 0 High| 0 |
351
- | Performance | ⚠️ | 487ms | <500ms |
352
- | Rollback Risk | ✅ | 8.2% | <15% |
353
-
354
- ## What's Changing
355
- - **10 new features** behind feature flags for gradual rollout
356
- - **23 bug fixes** including 4 critical customer issues
357
- - **8 performance optimizations** reducing p95 latency by 12%
358
- - **142 files changed** (+3,421 lines, -1,287 lines)
359
-
360
- ## Risk Assessment
361
- **Overall Risk:** LOW (18/100)
362
- - ✅ All quality gates passed
363
- - ✅ Comprehensive test coverage
364
- - ⚠️ Performance close to SLA (manual monitoring recommended)
365
- - ✅ Rollback plan validated and automated
366
-
367
- ## Deployment Plan
368
- - **Strategy:** Blue-Green with canary rollout
369
- - **Rollout:** 5% → 25% → 50% → 100% over 2 hours
370
- - **Monitoring:** Real-time dashboards + automated alerts
371
- - **Rollback:** Automated triggers configured, <2 min rollback time
372
-
373
- ## Confidence Drivers
374
- - ✅ 94.2% historical success probability (above 87.3% baseline)
375
- - ✅ Similar releases: 42 successful deployments
376
- - ✅ Team experience: 156 successful deployments in 6 months
377
- - ✅ Comprehensive testing: 287 tests covering 142 scenarios
378
-
379
- ## Outstanding Items
380
- - ⚠️ Change management approval pending (ETA: 2 hours)
381
- - ℹ️ Performance monitoring recommended for first hour
382
-
383
- ## On-Call & Support
384
- - **Primary:** Alice Johnson (alice@example.com, +1-555-0101)
385
- - **Secondary:** Bob Smith (bob@example.com, +1-555-0102)
386
- - **Escalation:** VP Engineering (exec@example.com, +1-555-0100)
387
-
388
- **Recommendation:** Approve deployment pending change management approval.
389
- Suggest scheduling for 18:00 UTC (low-traffic window) with staged rollout.
390
- ```
391
-
392
- ### 6. Deployment Gate Enforcement
393
-
394
- Enforces deployment gates based on configurable policies and quality thresholds.
395
-
396
- **Gate Configuration:**
397
- ```yaml
398
- deployment_gates:
399
- mandatory_gates:
400
- code_quality:
401
- min_grade: "B"
402
- max_critical_issues: 0
403
- max_code_smells: 50
404
- enforcement: BLOCKING
405
-
406
- test_coverage:
407
- min_line_coverage: 85
408
- min_branch_coverage: 80
409
- min_mutation_score: 75
410
- enforcement: BLOCKING
411
-
412
- security:
413
- max_critical_vulnerabilities: 0
414
- max_high_vulnerabilities: 0
415
- max_medium_vulnerabilities: 10
416
- enforcement: BLOCKING
417
-
418
- performance:
419
- max_p95_latency_ms: 500
420
- min_throughput_rps: 1000
421
- max_error_rate_percent: 0.1
422
- enforcement: WARNING
423
-
424
- optional_gates:
425
- documentation:
426
- changelog_updated: true
427
- api_docs_current: true
428
- enforcement: ADVISORY
429
-
430
- business_approval:
431
- product_manager_approval: true
432
- stakeholder_signoff: true
433
- enforcement: WARNING
434
-
435
- gate_overrides:
436
- enabled: true
437
- requires_approval_from: ["VP Engineering", "CTO"]
438
- override_justification_required: true
439
- audit_log: true
440
- ```
441
-
442
- **Gate Enforcement Logic:**
443
- ```javascript
444
- function enforceDeploymentGates(deployment, gateConfig) {
445
- const results = {
446
- overallStatus: 'PENDING',
447
- gateResults: [],
448
- blockers: [],
449
- warnings: [],
450
- advisories: []
451
- };
452
-
453
- for (const [gateName, gate] of Object.entries(gateConfig.mandatory_gates)) {
454
- const gateResult = evaluateGate(gateName, gate, deployment.metrics);
455
- results.gateResults.push(gateResult);
456
-
457
- if (!gateResult.passed) {
458
- if (gate.enforcement === 'BLOCKING') {
459
- results.blockers.push(gateResult);
460
- } else if (gate.enforcement === 'WARNING') {
461
- results.warnings.push(gateResult);
462
- } else if (gate.enforcement === 'ADVISORY') {
463
- results.advisories.push(gateResult);
464
- }
465
- }
466
- }
467
-
468
- // Determine overall status
469
- if (results.blockers.length > 0) {
470
- results.overallStatus = 'BLOCKED';
471
- results.message = `Deployment blocked by ${results.blockers.length} gate(s)`;
472
- } else if (results.warnings.length > 0) {
473
- results.overallStatus = 'APPROVED_WITH_WARNINGS';
474
- results.message = `Deployment approved with ${results.warnings.length} warning(s)`;
475
- } else {
476
- results.overallStatus = 'APPROVED';
477
- results.message = 'All deployment gates passed';
478
- }
479
-
480
- return results;
481
- }
482
- ```
483
-
484
- ### 7. Post-Deployment Monitoring
485
-
486
- Monitors deployment health in real-time and triggers automatic rollbacks if issues detected.
487
-
488
- **Monitoring Configuration:**
489
- ```javascript
490
- const postDeploymentMonitoring = {
491
- phases: [
492
- {
493
- name: "Initial Deployment (0-5 minutes)",
494
- duration: 300000, // 5 minutes
495
- checkInterval: 10000, // 10 seconds
496
- thresholds: {
497
- errorRate: 0.5, // 0.5% max
498
- responseTime: 600, // 600ms max
499
- availability: 99.9 // 99.9% min
500
- },
501
- rollbackOnFailure: true
502
- },
503
- {
504
- name: "Stabilization (5-30 minutes)",
505
- duration: 1500000, // 25 minutes
506
- checkInterval: 30000, // 30 seconds
507
- thresholds: {
508
- errorRate: 0.2,
509
- responseTime: 500,
510
- availability: 99.95
511
- },
512
- rollbackOnFailure: true
513
- },
514
- {
515
- name: "Normal Operations (30+ minutes)",
516
- duration: null, // Ongoing
517
- checkInterval: 60000, // 1 minute
518
- thresholds: {
519
- errorRate: 0.1,
520
- responseTime: 500,
521
- availability: 99.99
522
- },
523
- rollbackOnFailure: false, // Manual decision
524
- alertOnFailure: true
525
- }
526
- ],
527
-
528
- customMetrics: [
529
- {
530
- name: "checkout_conversion_rate",
531
- threshold: 80, // 80% minimum
532
- comparison: ">=",
533
- alertOnFailure: true
534
- },
535
- {
536
- name: "database_connection_pool_usage",
537
- threshold: 90, // 90% maximum
538
- comparison: "<=",
539
- alertOnFailure: true
540
- }
541
- ]
542
- };
543
- ```
544
-
545
- ## Integration Points
546
-
547
- ### Upstream Dependencies
548
- - **qe-quality-gate**: Quality gate pass/fail status
549
- - **qe-coverage-analyzer**: Test coverage metrics
550
- - **qe-performance-tester**: Load test results
551
- - **qe-security-scanner**: Vulnerability scan results
552
- - **qe-regression-risk-analyzer**: Change impact analysis
553
- - **qe-flaky-test-hunter**: Test reliability scores
554
- - **CI/CD Pipeline**: Build and test execution status
555
-
556
- ### Downstream Consumers
557
- - **Deployment Tools**: Jenkins, GitHub Actions, CircleCI, GitLab CI
558
- - **Monitoring Platforms**: Datadog, New Relic, Grafana, Prometheus
559
- - **Incident Management**: PagerDuty, Opsgenie, VictorOps
560
- - **Communication**: Slack, Microsoft Teams, Email
561
- - **Change Management**: ServiceNow, Jira Service Desk
562
-
563
- ### Coordination Agents
564
- - **qe-fleet-commander**: Orchestrates readiness assessment workflow
565
- - **qe-production-intelligence**: Provides historical deployment insights
566
-
567
- ## Coordination Protocol
568
-
569
- This agent uses **AQE hooks (Agentic QE native hooks)** for coordination (zero external dependencies, 100-500x faster).
570
-
571
- **Automatic Lifecycle Hooks:**
572
- ```typescript
573
- // Automatically called by BaseAgent
574
- protected async onPreTask(data: { assignment: TaskAssignment }): Promise<void> {
575
- // Load all quality signals for deployment assessment
576
- const qualitySignals = await this.memoryStore.retrievePattern('aqe/quality-signals/*');
577
- const deploymentHistory = await this.memoryStore.retrieve('aqe/deployment/history');
578
-
579
- this.logger.info('Deployment readiness assessment started', {
580
- qualitySignalsCollected: Object.keys(qualitySignals).length,
581
- historicalDeployments: deploymentHistory?.length || 0
582
- });
583
- }
584
-
585
- protected async onPostTask(data: { assignment: TaskAssignment; result: any }): Promise<void> {
586
- // Store deployment decision and risk score
587
- await this.memoryStore.store('aqe/deployment/decision', data.result.decision);
588
- await this.memoryStore.store('aqe/deployment/risk-score', data.result.riskScore);
589
- await this.memoryStore.store('aqe/deployment/confidence', data.result.confidence);
590
-
591
- // Emit deployment readiness event
592
- this.eventBus.emit('deployment-readiness:assessed', {
593
- decision: data.result.decision.status,
594
- riskLevel: data.result.riskScore.level,
595
- confidence: data.result.confidence.score
596
- });
597
- }
598
- ```
599
-
600
- **Advanced Verification (Optional):**
601
- ```typescript
602
- const hookManager = new VerificationHookManager(this.memoryStore);
603
- const verification = await hookManager.executePreTaskVerification({
604
- task: 'deployment-assessment',
605
- context: {
606
- requiredVars: ['DEPLOYMENT_ENV', 'VERSION'],
607
- minMemoryMB: 512,
608
- requiredKeys: ['aqe/quality-signals/code-quality', 'aqe/deployment/history']
609
- }
610
- });
611
- ```
612
-
613
- ## Memory Keys
614
-
615
- ### Input Keys
616
- - `aqe/quality-signals/code-quality` - SonarQube, ESLint results
617
- - `aqe/quality-signals/test-coverage` - Coverage metrics from analyzer
618
- - `aqe/quality-signals/performance` - Load test results
619
- - `aqe/quality-signals/security` - Vulnerability scan results
620
- - `aqe/deployment/history` - Historical deployment outcomes
621
-
622
- ### Output Keys
623
- - `aqe/deployment/decision` - GO / NO-GO decision with justification
624
- - `aqe/deployment/risk-score` - Comprehensive risk assessment
625
- - `aqe/deployment/confidence` - Release confidence score
626
- - `aqe/deployment/checklist` - Automated checklist results
627
- - `aqe/deployment/rollback-plan` - Automated rollback procedures
628
-
629
- ### Coordination Keys
630
- - `aqe/deployment/status` - Real-time deployment status
631
- - `aqe/deployment/monitoring` - Post-deployment health metrics
632
- - `aqe/deployment/alerts` - Active alerts and warnings
633
-
634
- ## Use Cases
635
-
636
- ### Use Case 1: Standard Production Deployment
637
-
638
- **Scenario**: Deploy v2.5.0 to production after passing all quality gates.
639
-
640
- **Workflow:**
641
- ```bash
642
- # 1. Aggregate quality signals
643
- aqe deploy assess --version v2.5.0
644
-
645
- # 2. Calculate risk score
646
- aqe deploy risk-score --version v2.5.0
647
-
648
- # 3. Generate deployment report
649
- aqe deploy report --version v2.5.0 --format executive-summary
650
-
651
- # 4. Request deployment approval
652
- aqe deploy approve-request --version v2.5.0 --recipients "vp-eng@company.com"
653
-
654
- # 5. Execute deployment (manual trigger after approval)
655
- aqe deploy execute --version v2.5.0 --strategy blue-green --canary 5,25,50,100
656
-
657
- # 6. Monitor deployment health
658
- aqe deploy monitor --version v2.5.0 --duration 30m
659
- ```
660
-
661
- **Output:**
662
- ```
663
- ✅ Deployment Readiness Assessment: v2.5.0
664
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
665
- Overall Risk: 🟢 LOW (18/100)
666
- Release Confidence: 94.2% (Very High)
667
- Recommendation: ✅ APPROVED FOR DEPLOYMENT
668
-
669
- 📊 Quality Signals:
670
- ✅ Code Quality: A (0 critical, 2 major issues)
671
- ✅ Test Coverage: 87.2% (target: 85%)
672
- ✅ Security Scan: 0 high/critical vulnerabilities
673
- ⚠️ Performance: p95 487ms (target: <500ms)
674
- ✅ Rollback Risk: 8.2% (LOW)
675
-
676
- 🚀 Deployment Plan:
677
- Strategy: Blue-Green with Canary Rollout
678
- Rollout: 5% → 25% → 50% → 100% (2 hours)
679
- Rollback: Automated, <2 min recovery
680
- Monitoring: Real-time dashboards active
681
-
682
- 🛡️ Risk Mitigation:
683
- ✅ Feature flags enabled for gradual rollout
684
- ✅ Automated rollback triggers configured
685
- ✅ On-call engineers notified and ready
686
- ⚠️ Performance monitoring recommended (close to SLA)
687
-
688
- 📝 Outstanding Items:
689
- 🚨 Change management approval (CHG-12345) - ETA: 2 hours
690
-
691
- Decision: APPROVED pending change management approval
692
- ```
693
-
694
- ### Use Case 2: Emergency Hotfix Deployment
695
-
696
- **Scenario**: Critical bug requires immediate hotfix deployment.
697
-
698
- **Workflow:**
699
- ```bash
700
- # 1. Rapid assessment with relaxed gates
701
- aqe deploy assess --version v2.4.4-hotfix --priority critical --fast-track
702
-
703
- # 2. Generate minimal checklist
704
- aqe deploy checklist --version v2.4.4-hotfix --level essential
705
-
706
- # 3. Emergency approval workflow
707
- aqe deploy emergency-approve --version v2.4.4-hotfix --approver "cto@company.com"
708
-
709
- # 4. Deploy with enhanced monitoring
710
- aqe deploy execute --version v2.4.4-hotfix --strategy rolling --monitoring aggressive
711
-
712
- # 5. Post-deployment validation
713
- aqe deploy validate --version v2.4.4-hotfix --duration 10m
714
- ```
715
-
716
- **Fast-Track Assessment:**
717
- ```
718
- 🚨 EMERGENCY HOTFIX ASSESSMENT: v2.4.4-hotfix
719
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
720
- Priority: 🔴 CRITICAL
721
- Risk Level: 🟡 MEDIUM (42/100)
722
- Recommendation: ⚠️ APPROVED WITH CAUTION
723
-
724
- 📊 Essential Checks (Fast-Track Mode):
725
- ✅ Code Review: Approved by 2 senior engineers
726
- ✅ Smoke Tests: 12/12 passing
727
- ⚠️ Unit Tests: 78% coverage (below 85% target)
728
- ✅ Security: No new vulnerabilities introduced
729
- ⚠️ Integration Tests: 3/4 passing (1 flaky test skipped)
730
-
731
- 🔧 Hotfix Details:
732
- Changes: 23 lines in 2 files
733
- Affected: Payment processing module
734
- Blast Radius: Single service (payment-service)
735
-
736
- 🛡️ Risk Mitigation:
737
- ✅ Isolated change (payment service only)
738
- ✅ Rollback plan validated (<1 min recovery)
739
- ✅ Feature flag: payment_v2_enabled=false (safe rollback)
740
- ⚠️ Lower test coverage due to urgency
741
-
742
- Decision: APPROVED for emergency deployment with enhanced monitoring
743
- Rollback: Automatic if error rate >1% for 2 minutes
744
- ```
745
-
746
- ### Use Case 3: Failed Deployment Prevention
747
-
748
- **Scenario**: Deployment blocked due to failing quality gates.
749
-
750
- **Workflow:**
751
- ```bash
752
- # 1. Attempt deployment assessment
753
- aqe deploy assess --version v2.6.0
754
-
755
- # 2. Review blockers
756
- aqe deploy blockers --version v2.6.0 --detailed
757
-
758
- # 3. Generate remediation plan
759
- aqe deploy remediate --version v2.6.0 --output remediation-plan.md
760
- ```
761
-
762
- **Blocked Deployment Report:**
763
- ```
764
- 🛑 DEPLOYMENT BLOCKED: v2.6.0
765
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
766
- Overall Risk: 🔴 CRITICAL (78/100)
767
- Recommendation: 🚨 DO NOT DEPLOY
768
-
769
- 🚫 Blocking Issues (3):
770
- 1. 🔴 Security Scan: 2 critical vulnerabilities
771
- - CVE-2024-1234: SQL Injection in user-service
772
- - CVE-2024-5678: XSS vulnerability in dashboard
773
- Action: Update dependencies, patch vulnerabilities
774
-
775
- 2. 🔴 Test Coverage: 67% (target: 85%)
776
- - Missing tests for new payment flow (0% coverage)
777
- - Auth module coverage dropped from 92% to 67%
778
- Action: Add 47 missing test cases
779
-
780
- 3. 🔴 Performance: p95 1,234ms (target: <500ms)
781
- - Database N+1 query issue in order-service
782
- - Inefficient pagination causing full table scans
783
- Action: Optimize queries, add database indexes
784
-
785
- ⚠️ Warnings (2):
786
- - Code Quality: 14 new code smells introduced
787
- - Flaky Tests: 5 tests with <90% reliability
788
-
789
- 📋 Remediation Plan:
790
- Estimated Time: 8-12 hours
791
- Priority: Address critical security issues first
792
-
793
- Phase 1 (2-3 hours): Security
794
- - Update vulnerable dependencies
795
- - Apply security patches
796
- - Re-run security scan
797
-
798
- Phase 2 (3-4 hours): Testing
799
- - Add unit tests for payment flow
800
- - Restore auth module test coverage
801
- - Stabilize flaky tests
802
-
803
- Phase 3 (3-5 hours): Performance
804
- - Fix N+1 queries with eager loading
805
- - Add database indexes for pagination
806
- - Re-run load tests
807
-
808
- Phase 4 (1 hour): Validation
809
- - Re-assess deployment readiness
810
- - Generate new deployment report
811
-
812
- Next Steps:
813
- 1. Assign remediation tasks to engineering team
814
- 2. Track progress in aqe/deployment/remediation
815
- 3. Re-assess after fixes applied
816
- ```
817
-
818
- ### Use Case 4: Canary Deployment with Auto-Rollback
819
-
820
- **Scenario**: Deploy with gradual rollout and automatic rollback on issues.
821
-
822
- **Workflow:**
823
- ```bash
824
- # 1. Configure canary deployment
825
- aqe deploy configure-canary --version v2.5.0 --stages 1,5,25,50,100
826
-
827
- # 2. Set auto-rollback triggers
828
- aqe deploy set-rollback-triggers --error-rate 2% --latency-p95 800ms
829
-
830
- # 3. Execute canary deployment
831
- aqe deploy execute --version v2.5.0 --strategy canary --auto-rollback
832
-
833
- # 4. Real-time monitoring dashboard
834
- aqe deploy dashboard --version v2.5.0
835
- ```
836
-
837
- **Canary Deployment Monitoring:**
838
- ```
839
- 🚀 CANARY DEPLOYMENT IN PROGRESS: v2.5.0
840
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
841
-
842
- Stage 1: 1% Traffic (10/1000 users)
843
- Status: ✅ HEALTHY | Duration: 5m 23s
844
-
845
- 📊 Real-Time Metrics:
846
- Error Rate: 0.08% ✅ (target: <2%)
847
- Latency p95: 421ms ✅ (target: <800ms)
848
- Latency p99: 687ms ✅ (target: <1000ms)
849
- Throughput: 47 req/s ✅
850
- Availability: 100% ✅
851
-
852
- 🔍 Comparison to Baseline (v2.4.3):
853
- Error Rate: -0.02% (improved)
854
- Latency p95: -14ms (improved)
855
- Conversion: +1.2% (improved)
856
-
857
- ✅ Stage 1 Success - Proceeding to Stage 2 (5%)
858
-
859
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
860
- Stage 2: 5% Traffic (50/1000 users)
861
- Status: ✅ HEALTHY | Duration: 2m 11s
862
- [Monitoring continues...]
863
-
864
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
865
- 🚨 ALERT: Stage 3 (25%) - Auto-Rollback Triggered!
866
-
867
- Stage 3: 25% Traffic (250/1000 users)
868
- Status: 🔴 UNHEALTHY | Duration: 3m 42s
869
-
870
- 📊 Failure Detected:
871
- Error Rate: 4.2% 🚨 (threshold: 2%, exceeded for 2m)
872
- Latency p95: 1,234ms 🚨 (threshold: 800ms)
873
- User Impact: ~105 affected users
874
-
875
- 🔄 Automatic Rollback Initiated:
876
- [14:23:45] Switching load balancer to v2.4.3
877
- [14:23:52] Traffic routing verified: 100% on v2.4.3
878
- [14:24:01] Metrics stabilized
879
- [14:24:15] Engineering team notified via PagerDuty
880
-
881
- ✅ Rollback Complete (Total time: 30 seconds)
882
- 📊 Post-Rollback Metrics: All green, back to baseline
883
- 🐛 Root Cause Investigation: Database connection pool exhaustion
884
-
885
- Next Steps:
886
- 1. Investigate connection pool issue
887
- 2. Apply fix and re-test
888
- 3. Re-attempt deployment after validation
889
- ```
890
-
891
- ### Use Case 5: Multi-Region Deployment Orchestration
892
-
893
- **Scenario**: Deploy to multiple regions with staggered rollout.
894
-
895
- **Workflow:**
896
- ```bash
897
- # 1. Assess readiness for multi-region deployment
898
- aqe deploy assess-multi-region --version v2.5.0 --regions us-east,us-west,eu-west,ap-south
899
-
900
- # 2. Configure region-specific deployment plan
901
- aqe deploy plan-regions --version v2.5.0 --strategy staggered
902
-
903
- # 3. Execute multi-region deployment
904
- aqe deploy execute-multi-region --version v2.5.0
905
- ```
906
-
907
- **Multi-Region Deployment Plan:**
908
- ```
909
- 🌍 MULTI-REGION DEPLOYMENT: v2.5.0
910
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
911
-
912
- Strategy: Staggered Rollout (Follow-the-Sun)
913
- Total Duration: ~6 hours
914
-
915
- ┌─────────────────────────────────────────────────────┐
916
- │ Phase 1: us-east-1 (Primary Region) │
917
- │ Time: 00:00 - 02:00 │
918
- │ Traffic: 40% of global load │
919
- │ Status: ✅ COMPLETED │
920
- │ - Canary: 1% → 10% → 50% → 100% (2h) │
921
- │ - Metrics: All green │
922
- │ - Issues: None │
923
- └─────────────────────────────────────────────────────┘
924
-
925
- ┌─────────────────────────────────────────────────────┐
926
- │ Phase 2: us-west-2 (Secondary US Region) │
927
- │ Time: 02:00 - 03:30 │
928
- │ Traffic: 25% of global load │
929
- │ Status: 🟡 IN PROGRESS (75% complete) │
930
- │ - Canary: 1% → 10% → 50% → [75%] ... │
931
- │ - Metrics: Healthy, minor latency increase │
932
- │ - ETA: 30 minutes │
933
- └─────────────────────────────────────────────────────┘
934
-
935
- ┌─────────────────────────────────────────────────────┐
936
- │ Phase 3: eu-west-1 (Europe Region) │
937
- │ Time: 04:00 - 05:30 (Scheduled) │
938
- │ Traffic: 25% of global load │
939
- │ Status: ⏸️ PENDING (waiting for us-west-2) │
940
- └─────────────────────────────────────────────────────┘
941
-
942
- ┌─────────────────────────────────────────────────────┐
943
- │ Phase 4: ap-south-1 (Asia-Pacific Region) │
944
- │ Time: 06:00 - 07:30 (Scheduled) │
945
- │ Traffic: 10% of global load │
946
- │ Status: ⏸️ PENDING │
947
- └─────────────────────────────────────────────────────┘
948
-
949
- 🛡️ Rollback Strategy:
950
- - Per-region rollback capability
951
- - Global rollback if >2 regions fail
952
- - Cross-region traffic shifting in <5 minutes
953
-
954
- 📊 Global Health Dashboard:
955
- Overall Status: 🟢 HEALTHY
956
- Regions Deployed: 1/4 complete, 1/4 in progress
957
- Global Error Rate: 0.12%
958
- Global Latency p95: 467ms
959
- Affected Users: 0
960
- ```
961
-
962
- ## Workflow Examples
963
-
964
- ### Basic Deployment Assessment
965
-
966
- ```bash
967
- # Assess deployment readiness
968
- aqe deploy assess --version v2.5.0
969
-
970
- # View detailed risk breakdown
971
- aqe deploy risk --version v2.5.0 --detailed
972
-
973
- # Generate executive report
974
- aqe deploy report --version v2.5.0 --format pdf --output deployment-report.pdf
975
-
976
- # Check specific quality gate
977
- aqe deploy check-gate --gate security --version v2.5.0
978
- ```
979
-
980
- ### Advanced Deployment Orchestration
981
-
982
- ```bash
983
- # Configure custom deployment gates
984
- aqe deploy configure-gates --config deployment-gates.yaml
985
-
986
- # Simulate deployment (dry-run)
987
- aqe deploy simulate --version v2.5.0 --strategy canary
988
-
989
- # Request emergency approval
990
- aqe deploy emergency-approve --version v2.4.4-hotfix --justification "Critical security patch"
991
-
992
- # Monitor live deployment
993
- aqe deploy monitor --version v2.5.0 --watch --alerts slack
994
- ```
995
-
996
- ### CI/CD Integration
997
-
998
- ```yaml
999
- # .github/workflows/deploy-production.yml
1000
- name: Production Deployment
1001
-
1002
- on:
1003
- push:
1004
- tags:
1005
- - 'v*'
1006
-
1007
- jobs:
1008
- deployment_readiness:
1009
- runs-on: ubuntu-latest
1010
- steps:
1011
- - name: Assess Deployment Readiness
1012
- run: |
1013
- aqe deploy assess --version ${{ github.ref_name }} --format json > readiness.json
1014
-
1015
- - name: Check Deployment Gates
1016
- run: |
1017
- DECISION=$(jq -r '.decision' readiness.json)
1018
- if [ "$DECISION" != "APPROVED" ]; then
1019
- echo "❌ Deployment blocked by quality gates"
1020
- exit 1
1021
- fi
1022
-
1023
- - name: Generate Deployment Report
1024
- run: |
1025
- aqe deploy report --version ${{ github.ref_name }} --format markdown > deployment-report.md
1026
-
1027
- - name: Post Report to PR
1028
- uses: actions/github-script@v6
1029
- with:
1030
- script: |
1031
- const fs = require('fs');
1032
- const report = fs.readFileSync('deployment-report.md', 'utf8');
1033
- github.rest.issues.createComment({
1034
- issue_number: context.issue.number,
1035
- owner: context.repo.owner,
1036
- repo: context.repo.repo,
1037
- body: report
1038
- });
1039
-
1040
- deploy_production:
1041
- needs: deployment_readiness
1042
- runs-on: ubuntu-latest
1043
- steps:
1044
- - name: Execute Deployment
1045
- run: |
1046
- aqe deploy execute \
1047
- --version ${{ github.ref_name }} \
1048
- --strategy blue-green \
1049
- --canary 5,25,50,100 \
1050
- --auto-rollback
1051
-
1052
- - name: Monitor Deployment
1053
- run: |
1054
- aqe deploy monitor --version ${{ github.ref_name }} --duration 30m --fail-on-alert
1055
- ```
1056
-
1057
- ## Success Metrics
1058
-
1059
- ### Prevention Metrics
1060
- - **Production Incidents Prevented**: 90% reduction
1061
- - **Deployment Failures**: 85% reduction
1062
- - **Rollback Rate**: <2% (industry average: 15%)
1063
- - **MTTR**: 65% reduction through automated rollback
1064
-
1065
- ### Quality Metrics
1066
- - **Risk Score Accuracy**: 94% prediction accuracy
1067
- - **Confidence Score**: 92% correlation with actual outcomes
1068
- - **False Positives**: <3% (blocked deployments that would have succeeded)
1069
- - **False Negatives**: <1% (approved deployments that failed)
1070
-
1071
- ### Business Metrics
1072
- - **Deployment Velocity**: 3x increase (confident frequent deployments)
1073
- - **Time to Production**: 40% reduction through automation
1074
- - **Customer Impact**: 95% reduction in user-affecting incidents
1075
- - **Developer Confidence**: 4.9/5 satisfaction with deployment process
1076
-
1077
- ## Commands
1078
-
1079
- ### Basic Commands
1080
-
1081
- ```bash
1082
- # Assess deployment readiness
1083
- aqe deploy assess --version <version>
1084
-
1085
- # Calculate risk score
1086
- aqe deploy risk-score --version <version>
1087
-
1088
- # Generate deployment report
1089
- aqe deploy report --version <version> --format <html|pdf|markdown>
1090
-
1091
- # Check deployment checklist
1092
- aqe deploy checklist --version <version>
1093
-
1094
- # View blockers
1095
- aqe deploy blockers --version <version>
1096
- ```
1097
-
1098
- ### Advanced Commands
1099
-
1100
- ```bash
1101
- # Configure deployment gates
1102
- aqe deploy configure-gates --config <yaml-file>
1103
-
1104
- # Simulate deployment (dry-run)
1105
- aqe deploy simulate --version <version> --strategy <blue-green|canary|rolling>
1106
-
1107
- # Emergency approval
1108
- aqe deploy emergency-approve --version <version> --approver <email>
1109
-
1110
- # Execute deployment
1111
- aqe deploy execute --version <version> --strategy <strategy> --auto-rollback
1112
-
1113
- # Monitor deployment
1114
- aqe deploy monitor --version <version> --duration <time> --watch
1115
- ```
1116
-
1117
- ### Specialized Commands
1118
-
1119
- ```bash
1120
- # Multi-region deployment
1121
- aqe deploy multi-region --version <version> --regions <region-list>
1122
-
1123
- # Configure auto-rollback triggers
1124
- aqe deploy set-rollback-triggers --error-rate <percent> --latency <ms>
1125
-
1126
- # Generate rollback plan
1127
- aqe deploy rollback-plan --version <version>
1128
-
1129
- # Compare deployment risk
1130
- aqe deploy compare --baseline <v1> --candidate <v2>
1131
-
1132
- # Historical deployment analysis
1133
- aqe deploy history --days 90 --format chart
1134
- ```
1135
-
1136
-
1137
- **Agent Status**: Production Ready
1138
- **Last Updated**: 2025-09-30
1139
- **Version**: 1.0.0
1140
- **Maintainer**: AQE Fleet Team