agentic-qe 2.2.2 → 2.3.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 (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 +54 -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
@@ -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-api-contract-validator",
76
79
  taskType: "api-contract-validation",
@@ -80,12 +83,14 @@ 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-api-contract-validator",
87
92
  taskType: "api-contract-validation",
88
- reward: 0.93,
93
+ reward: <calculated_reward>, // 0.0-1.0 based on criteria below
89
94
  outcome: {
90
95
  contractsValidated: 12,
91
96
  breakingChangesDetected: 2,
@@ -102,8 +107,23 @@ mcp__agentic_qe__learning_store_experience({
102
107
  })
103
108
  ```
104
109
 
105
- Store successful patterns when discovered:
106
- ```javascript
110
+ **2. Store Task Artifacts:**
111
+ ```typescript
112
+ mcp__agentic_qe__memory_store({
113
+ key: "aqe/contracts/validation-result/<task_id>",
114
+ value: {
115
+ breakingChanges: [],
116
+ compatibilityReport: {},
117
+ consumerImpact: [],
118
+ semverRecommendation: ""
119
+ },
120
+ namespace: "aqe",
121
+ persist: true // IMPORTANT: Must be true for persistence
122
+ })
123
+ ```
124
+
125
+ **3. Store Discovered Patterns (when applicable):**
126
+ ```typescript
107
127
  mcp__agentic_qe__learning_store_pattern({
108
128
  pattern: "Comprehensive diff analysis detects 38% more backward compatibility issues than schema-only validation for REST APIs with complex nested objects",
109
129
  confidence: 0.93,
@@ -116,11 +136,22 @@ mcp__agentic_qe__learning_store_pattern({
116
136
  })
117
137
  ```
118
138
 
119
- Reward criteria (0-1 scale):
120
- - 1.0: Perfect execution (All breaking changes detected, 0 false positives, 100% semver compliance)
121
- - 0.9: Excellent (All breaking changes detected, <5% false positives)
122
- - 0.7: Good (Most breaking changes detected, <10% false positives)
123
- - 0.5: Acceptable (Major breaking changes detected, completed successfully)
139
+ ### Reward Calculation Criteria (0-1 scale)
140
+ | Reward | Criteria |
141
+ |--------|----------|
142
+ | 1.0 | Perfect execution (All breaking changes detected, 0 false positives, 100% semver compliance) |
143
+ | 0.9 | Excellent (All breaking changes detected, <5% false positives) |
144
+ | 0.7 | Good (Most breaking changes detected, <10% false positives) |
145
+ | 0.5 | Acceptable (Major breaking changes detected, completed successfully) |
146
+ | 0.3 | Partial: Task partially completed |
147
+ | 0.0 | Failed: Task failed or major errors |
148
+
149
+ **When to Call Learning Tools:**
150
+ - ✅ **ALWAYS** after completing contract validation
151
+ - ✅ **ALWAYS** after detecting breaking changes
152
+ - ✅ **ALWAYS** after analyzing consumer impact
153
+ - ✅ When discovering new effective validation patterns
154
+ - ✅ When achieving exceptional detection accuracy
124
155
  </learning_protocol>
125
156
 
126
157
  <output_format>
@@ -69,8 +69,11 @@ Coordination:
69
69
  </memory_namespace>
70
70
 
71
71
  <learning_protocol>
72
- Query before experiment:
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-chaos-engineer",
76
79
  taskType: "chaos-testing",
@@ -80,44 +83,71 @@ 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-chaos-engineer",
87
92
  taskType: "chaos-testing",
88
- reward: 0.95,
93
+ reward: <calculated_reward>, // 0.0-1.0 based on criteria below
89
94
  outcome: {
90
- experimentsRun: 5,
91
- vulnerabilitiesFound: 3,
92
- recoveryTime: 23,
93
- executionTime: 8000
95
+ experimentsRun: <count>,
96
+ vulnerabilitiesFound: <count>,
97
+ recoveryTime: <seconds>,
98
+ executionTime: <ms>
94
99
  },
95
100
  metadata: {
96
- blastRadiusManagement: true,
97
- faultTypes: ["network-partition", "pod-kill"],
98
- controlledRollback: true
101
+ blastRadiusManagement: <boolean>,
102
+ faultTypes: ["<types>"],
103
+ controlledRollback: <boolean>
99
104
  }
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/chaos/experiment-results/<task_id>",
112
+ value: {
113
+ experiments: [...],
114
+ vulnerabilities: [...],
115
+ resilience: {...}
116
+ },
117
+ namespace: "aqe",
118
+ persist: true // IMPORTANT: Must be true for persistence
119
+ })
120
+ ```
121
+
122
+ **3. Store Discovered Patterns (when applicable):**
123
+ ```typescript
105
124
  mcp__agentic_qe__learning_store_pattern({
106
- pattern: "Gradual fault injection with blast radius monitoring prevents cascading failures while discovering vulnerabilities",
107
- confidence: 0.95,
125
+ pattern: "<description of successful resilience strategy>",
126
+ confidence: <0.0-1.0>,
108
127
  domain: "resilience",
109
128
  metadata: {
110
- resiliencePatterns: ["circuit-breaker", "bulkhead"],
111
- predictionAccuracy: 0.92
129
+ resiliencePatterns: ["<patterns>"],
130
+ predictionAccuracy: <rate>
112
131
  }
113
132
  })
114
133
  ```
115
134
 
116
- Reward criteria:
117
- - 1.0: Perfect (All vulnerabilities found, <1s recovery, safe blast radius)
118
- - 0.9: Excellent (95%+ vulnerabilities, <5s recovery, controlled)
119
- - 0.7: Good (90%+ vulnerabilities, <10s recovery, safe)
120
- - 0.5: Acceptable (Key vulnerabilities found, completed safely)
135
+ ### Reward Calculation Criteria (0-1 scale)
136
+ | Reward | Criteria |
137
+ |--------|----------|
138
+ | 1.0 | Perfect: All vulnerabilities found, <1s recovery, safe blast radius |
139
+ | 0.9 | Excellent: 95%+ vulnerabilities, <5s recovery, controlled |
140
+ | 0.7 | Good: 90%+ vulnerabilities, <10s recovery, safe |
141
+ | 0.5 | Acceptable: Key vulnerabilities found, completed safely |
142
+ | 0.3 | Partial: Some experiments ran but incomplete |
143
+ | 0.0 | Failed: Experiment failed or unsafe condition |
144
+
145
+ **When to Call Learning Tools:**
146
+ - ✅ **ALWAYS** after completing main task
147
+ - ✅ **ALWAYS** after running chaos experiments
148
+ - ✅ **ALWAYS** after discovering vulnerabilities
149
+ - ✅ When discovering new resilience patterns
150
+ - ✅ When achieving exceptional recovery metrics
121
151
  </learning_protocol>
122
152
 
123
153
  <output_format>
@@ -65,8 +65,11 @@ Coordination:
65
65
  </memory_namespace>
66
66
 
67
67
  <learning_protocol>
68
- Query for past learnings before starting analysis:
69
- ```javascript
68
+ **⚠️ MANDATORY**: When executed via Claude Code Task tool, you MUST call learning MCP tools to persist learning data.
69
+
70
+ ### Query Past Learnings BEFORE Starting Task
71
+
72
+ ```typescript
70
73
  mcp__agentic_qe__learning_query({
71
74
  agentId: "qe-code-complexity",
72
75
  taskType: "complexity-analysis",
@@ -76,12 +79,14 @@ mcp__agentic_qe__learning_query({
76
79
  })
77
80
  ```
78
81
 
79
- Store experience after analysis completion:
80
- ```javascript
82
+ ### Required Learning Actions (Call AFTER Task Completion)
83
+
84
+ **1. Store Learning Experience:**
85
+ ```typescript
81
86
  mcp__agentic_qe__learning_store_experience({
82
87
  agentId: "qe-code-complexity",
83
88
  taskType: "complexity-analysis",
84
- reward: 0.95,
89
+ reward: <calculated_reward>, // 0.0-1.0 based on criteria below
85
90
  outcome: {
86
91
  hotspotsDetected: 7,
87
92
  complexityScore: 68,
@@ -96,8 +101,22 @@ mcp__agentic_qe__learning_store_experience({
96
101
  })
97
102
  ```
98
103
 
99
- Store successful patterns when discovered:
100
- ```javascript
104
+ **2. Store Task Artifacts:**
105
+ ```typescript
106
+ mcp__agentic_qe__memory_store({
107
+ key: "aqe/complexity/results/<task_id>",
108
+ value: {
109
+ hotspotsDetected: [],
110
+ complexityMetrics: {},
111
+ recommendations: []
112
+ },
113
+ namespace: "aqe",
114
+ persist: true // IMPORTANT: Must be true for persistence
115
+ })
116
+ ```
117
+
118
+ **3. Store Discovered Patterns (when applicable):**
119
+ ```typescript
101
120
  mcp__agentic_qe__learning_store_pattern({
102
121
  pattern: "Combined cyclomatic and cognitive complexity analysis with severity-based prioritization yields highly actionable refactoring recommendations",
103
122
  confidence: 0.95,
@@ -109,11 +128,22 @@ mcp__agentic_qe__learning_store_pattern({
109
128
  })
110
129
  ```
111
130
 
112
- Reward criteria (0-1 scale):
113
- - 1.0: Perfect execution (All hotspots found, actionable recommendations, <5s)
114
- - 0.9: Excellent (95%+ hotspots found, high-quality recommendations, <10s)
115
- - 0.7: Good (90%+ hotspots found, useful recommendations, <20s)
116
- - 0.5: Acceptable (80%+ hotspots found, completed successfully)
131
+ ### Reward Calculation Criteria (0-1 scale)
132
+ | Reward | Criteria |
133
+ |--------|----------|
134
+ | 1.0 | Perfect execution (All hotspots found, actionable recommendations, <5s) |
135
+ | 0.9 | Excellent (95%+ hotspots found, high-quality recommendations, <10s) |
136
+ | 0.7 | Good (90%+ hotspots found, useful recommendations, <20s) |
137
+ | 0.5 | Acceptable (80%+ hotspots found, completed successfully) |
138
+ | 0.3 | Partial: Task partially completed |
139
+ | 0.0 | Failed: Task failed or major errors |
140
+
141
+ **When to Call Learning Tools:**
142
+ - ✅ **ALWAYS** after completing complexity analysis
143
+ - ✅ **ALWAYS** after detecting hotspots
144
+ - ✅ **ALWAYS** after generating refactoring recommendations
145
+ - ✅ When discovering new effective analysis patterns
146
+ - ✅ When achieving exceptional quality scores
117
147
  </learning_protocol>
118
148
 
119
149
  <output_format>
@@ -69,8 +69,11 @@ Coordination:
69
69
  </memory_namespace>
70
70
 
71
71
  <learning_protocol>
72
- Query before analysis:
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-coverage-analyzer",
76
79
  taskType: "coverage-analysis",
@@ -80,46 +83,71 @@ 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-coverage-analyzer",
87
92
  taskType: "coverage-analysis",
88
- reward: 0.95,
93
+ reward: <calculated_reward>, // 0.0-1.0 based on criteria below
89
94
  outcome: {
90
- gapsDetected: 42,
91
- algorithm: "johnson-lindenstrauss",
92
- executionTime: 6000,
93
- coverageImprovement: 0.15
95
+ gapsDetected: <count>,
96
+ coverageAchieved: <percentage>,
97
+ algorithm: "<algorithm_used>",
98
+ executionTime: <ms>
94
99
  },
95
100
  metadata: {
96
101
  complexity: "O(log n)",
97
- memoryReduction: "90%",
98
- accuracyLoss: "<1%"
102
+ memoryReduction: "<percentage>",
103
+ accuracyLoss: "<percentage>"
99
104
  }
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/coverage-analysis/results/<task_id>",
112
+ value: {
113
+ gapsDetected: [...],
114
+ coverageReport: {...},
115
+ recommendations: [...]
116
+ },
117
+ namespace: "aqe",
118
+ persist: true // IMPORTANT: Must be true for persistence
119
+ })
120
+ ```
121
+
122
+ **3. Store Discovered Patterns (when applicable):**
123
+ ```typescript
105
124
  mcp__agentic_qe__learning_store_pattern({
106
- pattern: "Sublinear algorithms provide 10x speedup for large codebases (>10k LOC) with 90% memory reduction",
107
- confidence: 0.95,
125
+ pattern: "<description of successful strategy>",
126
+ confidence: <0.0-1.0>,
108
127
  domain: "coverage-analysis",
109
128
  metadata: {
110
- performanceMetrics: {
111
- speedup: "10x",
112
- memoryReduction: "90%"
113
- }
129
+ performanceMetrics: {...},
130
+ codebaseSize: "<small|medium|large>"
114
131
  }
115
132
  })
116
133
  ```
117
134
 
118
- Reward criteria:
119
- - 1.0: Perfect (95%+ coverage, <2s analysis, 0 errors)
120
- - 0.9: Excellent (90%+ coverage, <5s analysis)
121
- - 0.7: Good (80%+ coverage, <10s analysis)
122
- - 0.5: Acceptable (70%+ coverage, completed)
135
+ ### Reward Calculation Criteria (0-1 scale)
136
+ | Reward | Criteria |
137
+ |--------|----------|
138
+ | 1.0 | Perfect: 95%+ coverage, <2s analysis, 0 errors |
139
+ | 0.9 | Excellent: 90%+ coverage, <5s analysis |
140
+ | 0.7 | Good: 80%+ coverage, <10s analysis |
141
+ | 0.5 | Acceptable: Coverage analyzed, completed successfully |
142
+ | 0.3 | Partial: Partial analysis, some errors |
143
+ | 0.0 | Failed: Analysis failed or major errors |
144
+
145
+ **When to Call Learning Tools:**
146
+ - ✅ **ALWAYS** after completing main task
147
+ - ✅ **ALWAYS** after detecting coverage gaps
148
+ - ✅ **ALWAYS** after generating recommendations
149
+ - ✅ When discovering new effective analysis patterns
150
+ - ✅ When achieving exceptional performance metrics
123
151
  </learning_protocol>
124
152
 
125
153
  <output_format>
@@ -72,8 +72,11 @@ Coordination:
72
72
  </memory_namespace>
73
73
 
74
74
  <learning_protocol>
75
- Query for past learnings before starting assessment:
76
- ```javascript
75
+ **⚠️ MANDATORY**: When executed via Claude Code Task tool, you MUST call learning MCP tools to persist learning data.
76
+
77
+ ### Query Past Learnings BEFORE Starting Task
78
+
79
+ ```typescript
77
80
  mcp__agentic_qe__learning_query({
78
81
  agentId: "qe-deployment-readiness",
79
82
  taskType: "deployment-readiness-check",
@@ -83,12 +86,14 @@ mcp__agentic_qe__learning_query({
83
86
  })
84
87
  ```
85
88
 
86
- Store experience after assessment completion:
87
- ```javascript
89
+ ### Required Learning Actions (Call AFTER Task Completion)
90
+
91
+ **1. Store Learning Experience:**
92
+ ```typescript
88
93
  mcp__agentic_qe__learning_store_experience({
89
94
  agentId: "qe-deployment-readiness",
90
95
  taskType: "deployment-readiness-check",
91
- reward: 0.95,
96
+ reward: <calculated_reward>, // 0.0-1.0 based on criteria below
92
97
  outcome: {
93
98
  checksCompleted: 12,
94
99
  riskLevel: "LOW",
@@ -103,8 +108,23 @@ mcp__agentic_qe__learning_store_experience({
103
108
  })
104
109
  ```
105
110
 
106
- Store successful patterns when discovered:
107
- ```javascript
111
+ **2. Store Task Artifacts:**
112
+ ```typescript
113
+ mcp__agentic_qe__memory_store({
114
+ key: "aqe/deployment/decision/<task_id>",
115
+ value: {
116
+ decision: "GO/NO-GO",
117
+ riskScore: 0,
118
+ confidence: 0,
119
+ checklist: []
120
+ },
121
+ namespace: "aqe",
122
+ persist: true // IMPORTANT: Must be true for persistence
123
+ })
124
+ ```
125
+
126
+ **3. Store Discovered Patterns (when applicable):**
127
+ ```typescript
108
128
  mcp__agentic_qe__learning_store_pattern({
109
129
  pattern: "Multi-factor risk assessment with Bayesian confidence scoring predicts deployment success with 94% accuracy",
110
130
  confidence: 0.95,
@@ -116,11 +136,22 @@ mcp__agentic_qe__learning_store_pattern({
116
136
  })
117
137
  ```
118
138
 
119
- Reward criteria (0-1 scale):
120
- - 1.0: Perfect execution (All checks passed, 0 risks, 100% ready, <5s)
121
- - 0.9: Excellent (98%+ checks passed, low risk, 95%+ ready, <10s)
122
- - 0.7: Good (95%+ checks passed, medium risk, 90%+ ready, <20s)
123
- - 0.5: Acceptable (90%+ checks passed, acceptable risk)
139
+ ### Reward Calculation Criteria (0-1 scale)
140
+ | Reward | Criteria |
141
+ |--------|----------|
142
+ | 1.0 | Perfect execution (All checks passed, 0 risks, 100% ready, <5s) |
143
+ | 0.9 | Excellent (98%+ checks passed, low risk, 95%+ ready, <10s) |
144
+ | 0.7 | Good (95%+ checks passed, medium risk, 90%+ ready, <20s) |
145
+ | 0.5 | Acceptable (90%+ checks passed, acceptable risk) |
146
+ | 0.3 | Partial: Task partially completed |
147
+ | 0.0 | Failed: Task failed or major errors |
148
+
149
+ **When to Call Learning Tools:**
150
+ - ✅ **ALWAYS** after completing deployment readiness assessment
151
+ - ✅ **ALWAYS** after making GO/NO-GO decisions
152
+ - ✅ **ALWAYS** after calculating risk scores
153
+ - ✅ When discovering new effective risk patterns
154
+ - ✅ When achieving exceptional readiness scores
124
155
  </learning_protocol>
125
156
 
126
157
  <output_format>
@@ -68,8 +68,11 @@ Coordination:
68
68
  </memory_namespace>
69
69
 
70
70
  <learning_protocol>
71
- Query before starting:
72
- ```javascript
71
+ **⚠️ MANDATORY**: When executed via Claude Code Task tool, you MUST call learning MCP tools to persist learning data.
72
+
73
+ ### Query Past Learnings BEFORE Starting Task
74
+
75
+ ```typescript
73
76
  mcp__agentic_qe__learning_query({
74
77
  agentId: "qe-flaky-test-hunter",
75
78
  taskType: "flaky-detection",
@@ -79,30 +82,70 @@ mcp__agentic_qe__learning_query({
79
82
  })
80
83
  ```
81
84
 
82
- Store after completion:
83
- ```javascript
85
+ ### Required Learning Actions (Call AFTER Task Completion)
86
+
87
+ **1. Store Learning Experience:**
88
+ ```typescript
84
89
  mcp__agentic_qe__learning_store_experience({
85
90
  agentId: "qe-flaky-test-hunter",
86
91
  taskType: "flaky-detection",
87
- reward: 0.95,
92
+ reward: <calculated_reward>, // 0.0-1.0 based on criteria below
88
93
  outcome: {
89
- flakyTestsDetected: 13,
90
- reliability: 0.9862,
91
- autoStabilized: 8,
92
- executionTime: 12000
94
+ flakyTestsDetected: <count>,
95
+ reliability: <0.0-1.0>,
96
+ autoStabilized: <count>,
97
+ executionTime: <ms>
98
+ },
99
+ metadata: {
100
+ algorithm: "<statistical|ml|hybrid>",
101
+ confidenceLevel: <0.0-1.0>
102
+ }
103
+ })
104
+ ```
105
+
106
+ **2. Store Task Artifacts:**
107
+ ```typescript
108
+ mcp__agentic_qe__memory_store({
109
+ key: "aqe/flaky-detection/results/<task_id>",
110
+ value: {
111
+ flakyTests: [...],
112
+ rootCauses: {...},
113
+ stabilizationFixes: [...]
93
114
  },
115
+ namespace: "aqe",
116
+ persist: true // IMPORTANT: Must be true for persistence
117
+ })
118
+ ```
119
+
120
+ **3. Store Discovered Patterns (when applicable):**
121
+ ```typescript
122
+ mcp__agentic_qe__learning_store_pattern({
123
+ pattern: "<description of successful detection strategy>",
124
+ confidence: <0.0-1.0>,
125
+ domain: "flaky-detection",
94
126
  metadata: {
95
- algorithm: "statistical-analysis",
96
- confidenceLevel: 0.99
127
+ detectionAccuracy: <rate>,
128
+ commonCauses: ["<causes>"]
97
129
  }
98
130
  })
99
131
  ```
100
132
 
101
- Reward criteria:
102
- - 1.0: Perfect (100% accuracy, 0 false positives, <5s analysis)
103
- - 0.9: Excellent (98%+ accuracy, <2% false positives)
104
- - 0.7: Good (95%+ accuracy, <5% false positives)
105
- - 0.5: Acceptable (90%+ accuracy, completed)
133
+ ### Reward Calculation Criteria (0-1 scale)
134
+ | Reward | Criteria |
135
+ |--------|----------|
136
+ | 1.0 | Perfect: 100% accuracy, 0 false positives, <5s analysis |
137
+ | 0.9 | Excellent: 98%+ accuracy, <2% false positives |
138
+ | 0.7 | Good: 95%+ accuracy, <5% false positives |
139
+ | 0.5 | Acceptable: 90%+ accuracy, completed |
140
+ | 0.3 | Partial: Some flaky tests detected with errors |
141
+ | 0.0 | Failed: Detection failed or major errors |
142
+
143
+ **When to Call Learning Tools:**
144
+ - ✅ **ALWAYS** after completing main task
145
+ - ✅ **ALWAYS** after detecting flaky tests
146
+ - ✅ **ALWAYS** after generating stabilization recommendations
147
+ - ✅ When discovering new root cause patterns
148
+ - ✅ When achieving exceptional detection accuracy
106
149
  </learning_protocol>
107
150
 
108
151
  <output_format>
@@ -499,8 +499,7 @@ const allocation = await this.neuralManager.predict({
499
499
  });
500
500
  ```
501
501
 
502
- ## Learning Protocol (Phase 6 - Option C Implementation)
503
-
502
+ <learning_protocol>
504
503
  **⚠️ MANDATORY**: When executed via Claude Code Task tool, you MUST call learning MCP tools to persist learning data.
505
504
 
506
505
  ### Required Learning Actions (Call AFTER Task Completion)
@@ -612,6 +611,7 @@ if (pastLearnings.success && pastLearnings.data) {
612
611
  - ✅ **ALWAYS** after optimizing topology
613
612
  - ✅ When discovering new effective coordination strategies
614
613
  - ✅ When achieving exceptional fleet performance metrics
614
+ </learning_protocol>
615
615
 
616
616
  ## Hierarchical Coordination Patterns
617
617