agentic-qe 1.5.1 → 1.6.1

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