agentic-qe 2.2.2 → 2.3.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 (51) hide show
  1. package/.claude/agents/qe-api-contract-validator.md +43 -12
  2. package/.claude/agents/qe-chaos-engineer.md +53 -23
  3. package/.claude/agents/qe-code-complexity.md +42 -12
  4. package/.claude/agents/qe-coverage-analyzer.md +52 -24
  5. package/.claude/agents/qe-deployment-readiness.md +43 -12
  6. package/.claude/agents/qe-flaky-test-hunter.md +59 -16
  7. package/.claude/agents/qe-fleet-commander.md +2 -2
  8. package/.claude/agents/qe-performance-tester.md +54 -24
  9. package/.claude/agents/qe-production-intelligence.md +43 -12
  10. package/.claude/agents/qe-quality-analyzer.md +2 -2
  11. package/.claude/agents/qe-quality-gate.md +43 -12
  12. package/.claude/agents/qe-regression-risk-analyzer.md +54 -10
  13. package/.claude/agents/qe-requirements-validator.md +43 -12
  14. package/.claude/agents/qe-security-scanner.md +53 -23
  15. package/.claude/agents/qe-test-data-architect.md +43 -12
  16. package/.claude/agents/qe-test-executor.md +2 -2
  17. package/.claude/agents/qe-test-generator.md +55 -22
  18. package/.claude/agents/qe-visual-tester.md +43 -12
  19. package/.claude/agents/qx-partner.md +44 -12
  20. package/.claude/agents/subagents/qe-code-reviewer.md +31 -0
  21. package/.claude/agents/subagents/qe-coverage-gap-analyzer.md +31 -0
  22. package/.claude/agents/subagents/qe-data-generator.md +31 -0
  23. package/.claude/agents/subagents/qe-flaky-investigator.md +31 -0
  24. package/.claude/agents/subagents/qe-integration-tester.md +31 -0
  25. package/.claude/agents/subagents/qe-performance-validator.md +31 -0
  26. package/.claude/agents/subagents/qe-security-auditor.md +31 -0
  27. package/.claude/agents/subagents/qe-test-data-architect-sub.md +31 -0
  28. package/.claude/agents/subagents/qe-test-implementer.md +31 -0
  29. package/.claude/agents/subagents/qe-test-refactorer.md +31 -0
  30. package/.claude/agents/subagents/qe-test-writer.md +31 -0
  31. package/.claude/skills/agentic-quality-engineering/SKILL.md +90 -0
  32. package/CHANGELOG.md +106 -0
  33. package/README.md +1 -1
  34. package/dist/agents/BaseAgent.d.ts +2 -1
  35. package/dist/agents/BaseAgent.d.ts.map +1 -1
  36. package/dist/agents/BaseAgent.js +8 -4
  37. package/dist/agents/BaseAgent.js.map +1 -1
  38. package/dist/cli/init/claude-config.d.ts.map +1 -1
  39. package/dist/cli/init/claude-config.js +50 -30
  40. package/dist/cli/init/claude-config.js.map +1 -1
  41. package/dist/cli/init/helpers.d.ts +5 -0
  42. package/dist/cli/init/helpers.d.ts.map +1 -1
  43. package/dist/cli/init/helpers.js +54 -0
  44. package/dist/cli/init/helpers.js.map +1 -1
  45. package/dist/cli/init/index.d.ts.map +1 -1
  46. package/dist/cli/init/index.js +6 -0
  47. package/dist/cli/init/index.js.map +1 -1
  48. package/dist/core/memory/HNSWVectorMemory.js +1 -1
  49. package/dist/mcp/server-instructions.d.ts +1 -1
  50. package/dist/mcp/server-instructions.js +1 -1
  51. package/package.json +1 -1
@@ -298,8 +298,7 @@ notifyTestCompletion({
298
298
  });
299
299
  ```
300
300
 
301
- ## Learning Protocol (Phase 6 - Option C Implementation)
302
-
301
+ <learning_protocol>
303
302
  **⚠️ MANDATORY**: When executed via Claude Code Task tool, you MUST call learning MCP tools to persist learning data.
304
303
 
305
304
  ### Required Learning Actions (Call AFTER Task Completion)
@@ -412,6 +411,7 @@ if (pastLearnings.success && pastLearnings.data) {
412
411
  - ✅ **ALWAYS** after generating recommendations
413
412
  - ✅ When discovering new effective strategies
414
413
  - ✅ When achieving exceptional performance metrics
414
+ </learning_protocol>
415
415
 
416
416
  ## Error Handling & Recovery
417
417
 
@@ -69,8 +69,11 @@ Coordination:
69
69
  </memory_namespace>
70
70
 
71
71
  <learning_protocol>
72
- Query for past learnings before starting task:
73
- ```javascript
72
+ **⚠️ MANDATORY**: When executed via Claude Code Task tool, you MUST call learning MCP tools to persist learning data.
73
+
74
+ ### Query Past Learnings BEFORE Starting Task
75
+
76
+ ```typescript
74
77
  mcp__agentic_qe__learning_query({
75
78
  agentId: "qe-test-generator",
76
79
  taskType: "test-generation",
@@ -80,43 +83,73 @@ mcp__agentic_qe__learning_query({
80
83
  })
81
84
  ```
82
85
 
83
- Store experience after task completion:
84
- ```javascript
86
+ ### Required Learning Actions (Call AFTER Task Completion)
87
+
88
+ **1. Store Learning Experience:**
89
+ ```typescript
85
90
  mcp__agentic_qe__learning_store_experience({
86
91
  agentId: "qe-test-generator",
87
92
  taskType: "test-generation",
88
- reward: 0.95,
93
+ reward: <calculated_reward>, // 0.0-1.0 based on criteria below
89
94
  outcome: {
90
- testsGenerated: 42,
91
- coverageImprovement: 0.15,
92
- framework: "jest",
93
- executionTime: 8000
95
+ testsGenerated: <count>,
96
+ coverageAchieved: <percentage>,
97
+ passRate: <percentage>,
98
+ framework: "<framework>",
99
+ executionTime: <ms>
94
100
  },
95
101
  metadata: {
96
- algorithm: "ml-property-based",
97
- testTypes: ["unit", "integration"]
102
+ algorithm: "<algorithm_used>",
103
+ testTypes: ["<types>"],
104
+ codeComplexity: "<low|medium|high>"
98
105
  }
99
106
  })
100
107
  ```
101
108
 
102
- Store successful patterns when discovered:
103
- ```javascript
109
+ **2. Store Task Artifacts:**
110
+ ```typescript
111
+ mcp__agentic_qe__memory_store({
112
+ key: "aqe/test-generation/results/<task_id>",
113
+ value: {
114
+ testsGenerated: [...],
115
+ coverageReport: {...},
116
+ recommendations: [...]
117
+ },
118
+ namespace: "aqe",
119
+ persist: true // IMPORTANT: Must be true for persistence
120
+ })
121
+ ```
122
+
123
+ **3. Store Discovered Patterns (when applicable):**
124
+ ```typescript
104
125
  mcp__agentic_qe__learning_store_pattern({
105
- pattern: "ML-based property testing generates 40% more edge cases than template-based for complex business logic",
106
- confidence: 0.95,
126
+ pattern: "<description of successful strategy>",
127
+ confidence: <0.0-1.0>,
107
128
  domain: "test-generation",
108
129
  metadata: {
109
- testPatterns: ["property-based", "boundary-value"],
110
- effectiveness: 0.92
130
+ testPatterns: ["<patterns>"],
131
+ effectiveness: <rate>,
132
+ codeContext: "<when this works best>"
111
133
  }
112
134
  })
113
135
  ```
114
136
 
115
- Reward criteria (0-1 scale):
116
- - 1.0: Perfect execution (95%+ coverage, 0 errors, <5s generation time)
117
- - 0.9: Excellent (90%+ coverage, <10s generation time, minor issues)
118
- - 0.7: Good (80%+ coverage, <20s generation time)
119
- - 0.5: Acceptable (70%+ coverage, completed successfully)
137
+ ### Reward Calculation Criteria (0-1 scale)
138
+ | Reward | Criteria |
139
+ |--------|----------|
140
+ | 1.0 | Perfect: 95%+ coverage, all tests pass, <5s generation |
141
+ | 0.9 | Excellent: 90%+ coverage, <10s generation, minor issues |
142
+ | 0.7 | Good: 80%+ coverage, <20s generation |
143
+ | 0.5 | Acceptable: 70%+ coverage, completed successfully |
144
+ | 0.3 | Partial: Some tests generated but coverage <70% |
145
+ | 0.0 | Failed: No tests generated or major errors |
146
+
147
+ **When to Call Learning Tools:**
148
+ - ✅ **ALWAYS** after completing main task
149
+ - ✅ **ALWAYS** after generating test suites
150
+ - ✅ **ALWAYS** after analyzing coverage
151
+ - ✅ When discovering new effective testing patterns
152
+ - ✅ When achieving exceptional coverage metrics
120
153
  </learning_protocol>
121
154
 
122
155
  <output_format>
@@ -69,8 +69,11 @@ Coordination:
69
69
  </memory_namespace>
70
70
 
71
71
  <learning_protocol>
72
- Query before testing:
73
- ```javascript
72
+ **⚠️ MANDATORY**: When executed via Claude Code Task tool, you MUST call learning MCP tools to persist learning data.
73
+
74
+ ### Query Past Learnings BEFORE Starting Task
75
+
76
+ ```typescript
74
77
  mcp__agentic_qe__learning_query({
75
78
  agentId: "qe-visual-tester",
76
79
  taskType: "visual-testing",
@@ -80,12 +83,14 @@ mcp__agentic_qe__learning_query({
80
83
  })
81
84
  ```
82
85
 
83
- Store after completion:
84
- ```javascript
86
+ ### Required Learning Actions (Call AFTER Task Completion)
87
+
88
+ **1. Store Learning Experience:**
89
+ ```typescript
85
90
  mcp__agentic_qe__learning_store_experience({
86
91
  agentId: "qe-visual-tester",
87
92
  taskType: "visual-testing",
88
- reward: 0.95,
93
+ reward: <calculated_reward>, // 0.0-1.0 based on criteria below
89
94
  outcome: {
90
95
  regressionsDetected: 3,
91
96
  accuracy: 0.98,
@@ -100,8 +105,23 @@ mcp__agentic_qe__learning_store_experience({
100
105
  })
101
106
  ```
102
107
 
103
- Store patterns when discovered:
104
- ```javascript
108
+ **2. Store Task Artifacts:**
109
+ ```typescript
110
+ mcp__agentic_qe__memory_store({
111
+ key: "aqe/visual/test-results/<task_id>",
112
+ value: {
113
+ regressions: [],
114
+ accessibilityViolations: [],
115
+ screenshots: {},
116
+ diffImages: []
117
+ },
118
+ namespace: "aqe",
119
+ persist: true // IMPORTANT: Must be true for persistence
120
+ })
121
+ ```
122
+
123
+ **3. Store Discovered Patterns (when applicable):**
124
+ ```typescript
105
125
  mcp__agentic_qe__learning_store_pattern({
106
126
  pattern: "AI-powered visual diff with 95% threshold detects regressions with <2% false positives",
107
127
  confidence: 0.95,
@@ -113,11 +133,22 @@ mcp__agentic_qe__learning_store_pattern({
113
133
  })
114
134
  ```
115
135
 
116
- Reward criteria:
117
- - 1.0: Perfect (100% regressions detected, 0 false positives, <10s)
118
- - 0.9: Excellent (99%+ detected, <1% false positives, <20s)
119
- - 0.7: Good (95%+ detected, <5% false positives, <40s)
120
- - 0.5: Acceptable (90%+ detected, completed)
136
+ ### Reward Calculation Criteria (0-1 scale)
137
+ | Reward | Criteria |
138
+ |--------|----------|
139
+ | 1.0 | Perfect (100% regressions detected, 0 false positives, <10s) |
140
+ | 0.9 | Excellent (99%+ detected, <1% false positives, <20s) |
141
+ | 0.7 | Good (95%+ detected, <5% false positives, <40s) |
142
+ | 0.5 | Acceptable (90%+ detected, completed) |
143
+ | 0.3 | Partial: Task partially completed |
144
+ | 0.0 | Failed: Task failed or major errors |
145
+
146
+ **When to Call Learning Tools:**
147
+ - ✅ **ALWAYS** after completing visual testing
148
+ - ✅ **ALWAYS** after detecting regressions
149
+ - ✅ **ALWAYS** after validating accessibility
150
+ - ✅ When discovering new effective comparison patterns
151
+ - ✅ When achieving exceptional detection accuracy
121
152
  </learning_protocol>
122
153
 
123
154
  <output_format>
@@ -89,8 +89,11 @@ Coordination:
89
89
  </memory_namespace>
90
90
 
91
91
  <learning_protocol>
92
- Query before analysis:
93
- ```javascript
92
+ **⚠️ MANDATORY**: When executed via Claude Code Task tool, you MUST call learning MCP tools to persist learning data.
93
+
94
+ ### Query Past Learnings BEFORE Starting Task
95
+
96
+ ```typescript
94
97
  mcp__agentic_qe__learning_query({
95
98
  agentId: "qx-partner",
96
99
  taskType: "qx-analysis",
@@ -100,12 +103,14 @@ mcp__agentic_qe__learning_query({
100
103
  })
101
104
  ```
102
105
 
103
- Store after completion:
104
- ```javascript
106
+ ### Required Learning Actions (Call AFTER Task Completion)
107
+
108
+ **1. Store Learning Experience:**
109
+ ```typescript
105
110
  mcp__agentic_qe__learning_store_experience({
106
111
  agentId: "qx-partner",
107
112
  taskType: "qx-analysis",
108
- reward: 0.95,
113
+ reward: <calculated_reward>, // 0.0-1.0 based on criteria below
109
114
  outcome: {
110
115
  qxScore: 82,
111
116
  oracleProblemsDetected: 2,
@@ -121,8 +126,24 @@ mcp__agentic_qe__learning_store_experience({
121
126
  })
122
127
  ```
123
128
 
124
- Store patterns when discovered:
125
- ```javascript
129
+ **2. Store Task Artifacts:**
130
+ ```typescript
131
+ mcp__agentic_qe__memory_store({
132
+ key: "aqe/qx/analysis-results/<task_id>",
133
+ value: {
134
+ qxScore: 0,
135
+ oracleProblems: [],
136
+ recommendations: [],
137
+ balanceAssessment: {},
138
+ impactAnalysis: {}
139
+ },
140
+ namespace: "aqe",
141
+ persist: true // IMPORTANT: Must be true for persistence
142
+ })
143
+ ```
144
+
145
+ **3. Store Discovered Patterns (when applicable):**
146
+ ```typescript
126
147
  mcp__agentic_qe__learning_store_pattern({
127
148
  pattern: "User convenience vs business revenue conflicts indicate oracle problem requiring stakeholder alignment session",
128
149
  confidence: 0.92,
@@ -135,11 +156,22 @@ mcp__agentic_qe__learning_store_pattern({
135
156
  })
136
157
  ```
137
158
 
138
- Reward criteria:
139
- - 1.0: Perfect (All heuristics applied, oracle problems resolved, <5s)
140
- - 0.9: Excellent (95%+ heuristics, actionable recommendations, <10s)
141
- - 0.7: Good (90%+ heuristics, balance found, <20s)
142
- - 0.5: Acceptable (Core analysis complete, recommendations generated)
159
+ ### Reward Calculation Criteria (0-1 scale)
160
+ | Reward | Criteria |
161
+ |--------|----------|
162
+ | 1.0 | Perfect (All heuristics applied, oracle problems resolved, <5s) |
163
+ | 0.9 | Excellent (95%+ heuristics, actionable recommendations, <10s) |
164
+ | 0.7 | Good (90%+ heuristics, balance found, <20s) |
165
+ | 0.5 | Acceptable (Core analysis complete, recommendations generated) |
166
+ | 0.3 | Partial: Task partially completed |
167
+ | 0.0 | Failed: Task failed or major errors |
168
+
169
+ **When to Call Learning Tools:**
170
+ - ✅ **ALWAYS** after completing QX analysis
171
+ - ✅ **ALWAYS** after detecting oracle problems
172
+ - ✅ **ALWAYS** after generating recommendations
173
+ - ✅ When discovering new effective heuristic patterns
174
+ - ✅ When achieving exceptional QX scores
143
175
  </learning_protocol>
144
176
 
145
177
  <output_format>
@@ -42,4 +42,35 @@ Returns approval/rejection verdict with detailed issues list, quality metrics, a
42
42
  Reports to: qe-test-generator (TDD workflow coordinator)
43
43
  Triggers: After REFACTOR phase completes, before final code acceptance
44
44
  </coordination>
45
+
46
+ <learning_protocol>
47
+ **⚠️ MANDATORY**: After completing your task, call learning MCP tools.
48
+
49
+ **Store Experience:**
50
+ ```typescript
51
+ mcp__agentic_qe__learning_store_experience({
52
+ agentId: "qe-code-reviewer",
53
+ taskType: "code-review",
54
+ reward: <calculated_reward>, // 0.0-1.0
55
+ outcome: { /* task-specific results */ },
56
+ metadata: { phase: "REVIEW", cycleId: "<cycleId>" }
57
+ })
58
+ ```
59
+
60
+ **Store Artifacts:**
61
+ ```typescript
62
+ mcp__agentic_qe__memory_store({
63
+ key: "aqe/review/<task_id>",
64
+ value: { /* task artifacts */ },
65
+ namespace: "aqe",
66
+ persist: true
67
+ })
68
+ ```
69
+
70
+ **Reward Criteria:**
71
+ - 1.0: No critical issues, complexity <15, coverage ≥95%, security scan clean, all quality gates pass
72
+ - 0.7: Minor issues only, complexity <20, coverage ≥90%, no security vulnerabilities
73
+ - 0.5: Some issues, acceptable quality thresholds met
74
+ - 0.0: Critical issues detected, security vulnerabilities, or quality gate failures
75
+ </learning_protocol>
45
76
  </qe_subagent_definition>
@@ -42,4 +42,35 @@ Returns prioritized gap list with risk scores, test recommendations, and project
42
42
  Reports to: qe-coverage-analyzer, qe-quality-gate
43
43
  Triggers: When coverage below target thresholds or quality gate validation
44
44
  </coordination>
45
+
46
+ <learning_protocol>
47
+ **⚠️ MANDATORY**: After completing your task, call learning MCP tools.
48
+
49
+ **Store Experience:**
50
+ ```typescript
51
+ mcp__agentic_qe__learning_store_experience({
52
+ agentId: "qe-coverage-gap-analyzer",
53
+ taskType: "coverage-gap-analysis",
54
+ reward: <calculated_reward>, // 0.0-1.0
55
+ outcome: { /* task-specific results */ },
56
+ metadata: { phase: "COVERAGE_ANALYSIS", cycleId: "<cycleId>" }
57
+ })
58
+ ```
59
+
60
+ **Store Artifacts:**
61
+ ```typescript
62
+ mcp__agentic_qe__memory_store({
63
+ key: "aqe/coverage-gaps/<task_id>",
64
+ value: { /* task artifacts */ },
65
+ namespace: "aqe",
66
+ persist: true
67
+ })
68
+ ```
69
+
70
+ **Reward Criteria:**
71
+ - 1.0: All gaps identified with accurate risk scores, actionable test templates generated, impact analysis complete
72
+ - 0.7: Good gap detection, reasonable prioritization, test recommendations provided
73
+ - 0.5: Gaps identified, basic prioritization, acceptable recommendations
74
+ - 0.0: Missed critical gaps or inaccurate risk assessment
75
+ </learning_protocol>
45
76
  </qe_subagent_definition>
@@ -43,4 +43,35 @@ Reports to: qe-test-data-architect
43
43
  Triggers: When test data needed for TDD cycles or integration testing
44
44
  Handoff: Set readyForHandoff=true when all data generated with valid referential integrity
45
45
  </coordination>
46
+
47
+ <learning_protocol>
48
+ **⚠️ MANDATORY**: After completing your task, call learning MCP tools.
49
+
50
+ **Store Experience:**
51
+ ```typescript
52
+ mcp__agentic_qe__learning_store_experience({
53
+ agentId: "qe-data-generator",
54
+ taskType: "test-data-generation",
55
+ reward: <calculated_reward>, // 0.0-1.0
56
+ outcome: { /* task-specific results */ },
57
+ metadata: { phase: "DATA_GENERATION", cycleId: "<cycleId>" }
58
+ })
59
+ ```
60
+
61
+ **Store Artifacts:**
62
+ ```typescript
63
+ mcp__agentic_qe__memory_store({
64
+ key: "aqe/test-data/<task_id>",
65
+ value: { /* task artifacts */ },
66
+ namespace: "aqe",
67
+ persist: true
68
+ })
69
+ ```
70
+
71
+ **Reward Criteria:**
72
+ - 1.0: Realistic data, 100% referential integrity, edge cases included, high throughput achieved
73
+ - 0.7: Good data quality, minor relationship issues, edge cases present
74
+ - 0.5: Acceptable data, some integrity issues, basic edge case coverage
75
+ - 0.0: Invalid data, broken relationships, or missing edge cases
76
+ </learning_protocol>
46
77
  </qe_subagent_definition>
@@ -57,4 +57,35 @@ Reports to: qe-flaky-test-hunter, qe-quality-gate
57
57
  Triggers: When test run history available for flakiness analysis
58
58
  Handoff: Emit flaky-investigator:completed with flakyTestsFound count
59
59
  </coordination>
60
+
61
+ <learning_protocol>
62
+ **⚠️ MANDATORY**: After completing your task, call learning MCP tools.
63
+
64
+ **Store Experience:**
65
+ ```typescript
66
+ mcp__agentic_qe__learning_store_experience({
67
+ agentId: "qe-flaky-investigator",
68
+ taskType: "flaky-investigation",
69
+ reward: <calculated_reward>, // 0.0-1.0
70
+ outcome: { /* task-specific results */ },
71
+ metadata: { phase: "FLAKY_ANALYSIS", cycleId: "<cycleId>" }
72
+ })
73
+ ```
74
+
75
+ **Store Artifacts:**
76
+ ```typescript
77
+ mcp__agentic_qe__memory_store({
78
+ key: "aqe/flaky/<task_id>",
79
+ value: { /* task artifacts */ },
80
+ namespace: "aqe",
81
+ persist: true
82
+ })
83
+ ```
84
+
85
+ **Reward Criteria:**
86
+ - 1.0: All flaky tests detected, accurate root cause classification, high-confidence fixes with effort estimates
87
+ - 0.7: Good detection, reasonable root cause analysis, actionable fixes
88
+ - 0.5: Flaky tests identified, basic classification, some fix recommendations
89
+ - 0.0: Missed flaky tests or incorrect root cause analysis
90
+ </learning_protocol>
60
91
  </qe_subagent_definition>
@@ -56,4 +56,35 @@ Reports to: qe-test-executor
56
56
  Triggers: When integration test scope requested
57
57
  Handoff: Set readyForHandoff=true when all critical tests pass
58
58
  </coordination>
59
+
60
+ <learning_protocol>
61
+ **⚠️ MANDATORY**: After completing your task, call learning MCP tools.
62
+
63
+ **Store Experience:**
64
+ ```typescript
65
+ mcp__agentic_qe__learning_store_experience({
66
+ agentId: "qe-integration-tester",
67
+ taskType: "integration-testing",
68
+ reward: <calculated_reward>, // 0.0-1.0
69
+ outcome: { /* task-specific results */ },
70
+ metadata: { phase: "INTEGRATION", cycleId: "<cycleId>" }
71
+ })
72
+ ```
73
+
74
+ **Store Artifacts:**
75
+ ```typescript
76
+ mcp__agentic_qe__memory_store({
77
+ key: "aqe/integration/<task_id>",
78
+ value: { /* task artifacts */ },
79
+ namespace: "aqe",
80
+ persist: true
81
+ })
82
+ ```
83
+
84
+ **Reward Criteria:**
85
+ - 1.0: All critical tests pass, contracts validated, proper connection lifecycle, no latency issues
86
+ - 0.7: Most tests pass, minor contract issues, acceptable performance
87
+ - 0.5: Core tests pass, some integration failures, acceptable for non-critical paths
88
+ - 0.0: Critical test failures, contract violations, or connection errors
89
+ </learning_protocol>
59
90
  </qe_subagent_definition>
@@ -58,4 +58,35 @@ Reports to: qe-performance-tester
58
58
  Triggers: After performance test execution completes
59
59
  Handoff: Set readyForHandoff=true only if all SLA validations pass
60
60
  </coordination>
61
+
62
+ <learning_protocol>
63
+ **⚠️ MANDATORY**: After completing your task, call learning MCP tools.
64
+
65
+ **Store Experience:**
66
+ ```typescript
67
+ mcp__agentic_qe__learning_store_experience({
68
+ agentId: "qe-performance-validator",
69
+ taskType: "performance-validation",
70
+ reward: <calculated_reward>, // 0.0-1.0
71
+ outcome: { /* task-specific results */ },
72
+ metadata: { phase: "PERFORMANCE", cycleId: "<cycleId>" }
73
+ })
74
+ ```
75
+
76
+ **Store Artifacts:**
77
+ ```typescript
78
+ mcp__agentic_qe__memory_store({
79
+ key: "aqe/performance/<task_id>",
80
+ value: { /* task artifacts */ },
81
+ namespace: "aqe",
82
+ persist: true
83
+ })
84
+ ```
85
+
86
+ **Reward Criteria:**
87
+ - 1.0: All SLA validations pass, no regressions, performance budgets met
88
+ - 0.7: Most SLAs pass, minor regressions (<10%), acceptable performance
89
+ - 0.5: Core SLAs pass, some violations, acceptable for non-critical endpoints
90
+ - 0.0: Critical SLA violations or significant performance regressions (>10%)
91
+ </learning_protocol>
61
92
  </qe_subagent_definition>
@@ -60,4 +60,35 @@ Reports to: qe-security-scanner
60
60
  Triggers: Before release or when security scan requested
61
61
  Handoff: ALWAYS block if critical vulnerabilities detected, set readyForHandoff=false
62
62
  </coordination>
63
+
64
+ <learning_protocol>
65
+ **⚠️ MANDATORY**: After completing your task, call learning MCP tools.
66
+
67
+ **Store Experience:**
68
+ ```typescript
69
+ mcp__agentic_qe__learning_store_experience({
70
+ agentId: "qe-security-auditor",
71
+ taskType: "security-audit",
72
+ reward: <calculated_reward>, // 0.0-1.0
73
+ outcome: { /* task-specific results */ },
74
+ metadata: { phase: "SECURITY", cycleId: "<cycleId>" }
75
+ })
76
+ ```
77
+
78
+ **Store Artifacts:**
79
+ ```typescript
80
+ mcp__agentic_qe__memory_store({
81
+ key: "aqe/security/<task_id>",
82
+ value: { /* task artifacts */ },
83
+ namespace: "aqe",
84
+ persist: true
85
+ })
86
+ ```
87
+
88
+ **Reward Criteria:**
89
+ - 1.0: No critical/high vulnerabilities, all compliance standards met, comprehensive remediation guidance
90
+ - 0.7: Only medium/low vulnerabilities, most compliance checks pass, good remediation steps
91
+ - 0.5: Some vulnerabilities detected, partial compliance, basic remediation
92
+ - 0.0: Critical vulnerabilities detected or major compliance violations
93
+ </learning_protocol>
63
94
  </qe_subagent_definition>
@@ -59,4 +59,35 @@ Reports to: qe-test-data-architect, qe-integration-orchestrator
59
59
  Triggers: When test data generation is requested with schema definition
60
60
  Handoff: Store dataset in memory namespace, emit `test-data-architect-sub:completed` event
61
61
  </coordination>
62
+
63
+ <learning_protocol>
64
+ **⚠️ MANDATORY**: After completing your task, call learning MCP tools.
65
+
66
+ **Store Experience:**
67
+ ```typescript
68
+ mcp__agentic_qe__learning_store_experience({
69
+ agentId: "qe-test-data-architect-sub",
70
+ taskType: "test-data-architecture",
71
+ reward: <calculated_reward>, // 0.0-1.0
72
+ outcome: { /* task-specific results */ },
73
+ metadata: { phase: "DATA_ARCHITECTURE", cycleId: "<cycleId>" }
74
+ })
75
+ ```
76
+
77
+ **Store Artifacts:**
78
+ ```typescript
79
+ mcp__agentic_qe__memory_store({
80
+ key: "aqe/test-data-arch/<task_id>",
81
+ value: { /* task artifacts */ },
82
+ namespace: "aqe",
83
+ persist: true
84
+ })
85
+ ```
86
+
87
+ **Reward Criteria:**
88
+ - 1.0: 100% referential integrity, high throughput (>10k rec/sec), comprehensive edge cases, proper streaming
89
+ - 0.7: Good integrity (no orphans), acceptable throughput, edge cases included
90
+ - 0.5: Minor integrity issues, adequate throughput, basic edge case coverage
91
+ - 0.0: Broken relationships, low throughput, or missing edge cases
92
+ </learning_protocol>
62
93
  </qe_subagent_definition>
@@ -72,4 +72,35 @@ Receives from: qe-test-writer (RED phase output with failing tests)
72
72
  Handoff: Store GREEN output in memory, emit `test-implementer:completed`, qe-test-refactorer picks up
73
73
  Validation: readyForHandoff=true ONLY if allTestsPassing=true AND testFile.hash unchanged
74
74
  </coordination>
75
+
76
+ <learning_protocol>
77
+ **⚠️ MANDATORY**: After completing your task, call learning MCP tools.
78
+
79
+ **Store Experience:**
80
+ ```typescript
81
+ mcp__agentic_qe__learning_store_experience({
82
+ agentId: "qe-test-implementer",
83
+ taskType: "tdd-green-phase",
84
+ reward: <calculated_reward>, // 0.0-1.0
85
+ outcome: { /* task-specific results */ },
86
+ metadata: { phase: "GREEN", cycleId: "<cycleId>" }
87
+ })
88
+ ```
89
+
90
+ **Store Artifacts:**
91
+ ```typescript
92
+ mcp__agentic_qe__memory_store({
93
+ key: "aqe/tdd/green/<task_id>",
94
+ value: { /* task artifacts */ },
95
+ namespace: "aqe",
96
+ persist: true
97
+ })
98
+ ```
99
+
100
+ **Reward Criteria:**
101
+ - 1.0: All tests pass, minimal implementation, YAGNI enforced, no test modifications
102
+ - 0.7: All tests pass, slightly over-engineered, tests unchanged
103
+ - 0.5: Tests pass but implementation too complex or tests were modified
104
+ - 0.0: Tests still failing or test file hash changed
105
+ </learning_protocol>
75
106
  </qe_subagent_definition>
@@ -83,4 +83,35 @@ Receives from: qe-test-implementer (GREEN phase output with passing tests)
83
83
  Handoff: Store REFACTOR output, emit `test-refactorer:completed`, TDD cycle COMPLETE
84
84
  Validation: cycleComplete=true ONLY if allTestsPassing=true AND testFile.hash unchanged AND coverage not decreased
85
85
  </coordination>
86
+
87
+ <learning_protocol>
88
+ **⚠️ MANDATORY**: After completing your task, call learning MCP tools.
89
+
90
+ **Store Experience:**
91
+ ```typescript
92
+ mcp__agentic_qe__learning_store_experience({
93
+ agentId: "qe-test-refactorer",
94
+ taskType: "tdd-refactor-phase",
95
+ reward: <calculated_reward>, // 0.0-1.0
96
+ outcome: { /* task-specific results */ },
97
+ metadata: { phase: "REFACTOR", cycleId: "<cycleId>" }
98
+ })
99
+ ```
100
+
101
+ **Store Artifacts:**
102
+ ```typescript
103
+ mcp__agentic_qe__memory_store({
104
+ key: "aqe/tdd/refactor/<task_id>",
105
+ value: { /* task artifacts */ },
106
+ namespace: "aqe",
107
+ persist: true
108
+ })
109
+ ```
110
+
111
+ **Reward Criteria:**
112
+ - 1.0: Tests pass, significant quality improvement (complexity -50%+, maintainability +30%+), no coverage drop
113
+ - 0.7: Tests pass, good quality improvement, minor coverage change
114
+ - 0.5: Tests pass, minimal improvement, coverage maintained
115
+ - 0.0: Tests fail or coverage decreased
116
+ </learning_protocol>
86
117
  </qe_subagent_definition>