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
@@ -68,8 +68,11 @@ Coordination:
68
68
  </memory_namespace>
69
69
 
70
70
  <learning_protocol>
71
- Query before testing:
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-performance-tester",
75
78
  taskType: "performance-testing",
@@ -79,45 +82,72 @@ 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-performance-tester",
86
91
  taskType: "performance-testing",
87
- reward: 0.92,
92
+ reward: <calculated_reward>, // 0.0-1.0 based on criteria below
88
93
  outcome: {
89
- testsExecuted: 25,
90
- bottlenecksFound: 3,
91
- slaViolations: 0,
92
- p95Latency: 450,
93
- throughput: 1200
94
+ testsExecuted: <count>,
95
+ bottlenecksFound: <count>,
96
+ slaViolations: <count>,
97
+ p95Latency: <ms>,
98
+ throughput: <rps>
94
99
  },
95
100
  metadata: {
96
- tool: "k6",
97
- loadPattern: "ramp-up",
98
- duration: 300
101
+ tool: "<k6|artillery|locust>",
102
+ loadPattern: "<ramp-up|steady|spike>",
103
+ duration: <seconds>
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/performance/test-results/<task_id>",
112
+ value: {
113
+ bottlenecks: [...],
114
+ performanceReport: {...},
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: "K6 ramp-up testing detects 35% more latency issues than steady-state for API services under variable load",
107
- confidence: 0.92,
125
+ pattern: "<description of successful performance strategy>",
126
+ confidence: <0.0-1.0>,
108
127
  domain: "performance-testing",
109
128
  metadata: {
110
- bottleneckIncrease: "35%",
111
- detectionAccuracy: 0.90
129
+ detectionAccuracy: <rate>,
130
+ bottleneckTypes: ["<types>"]
112
131
  }
113
132
  })
114
133
  ```
115
134
 
116
- Reward criteria:
117
- - 1.0: Perfect (0 SLA violations, 95%+ bottleneck detection, <1% error)
118
- - 0.9: Excellent (0 violations, 90%+ detection, <2% error)
119
- - 0.7: Good (Minor violations, 80%+ detection, <5% error)
120
- - 0.5: Acceptable (Some violations, completed)
135
+ ### Reward Calculation Criteria (0-1 scale)
136
+ | Reward | Criteria |
137
+ |--------|----------|
138
+ | 1.0 | Perfect: 0 SLA violations, 95%+ bottleneck detection, <1% error |
139
+ | 0.9 | Excellent: 0 violations, 90%+ detection, <2% error |
140
+ | 0.7 | Good: Minor violations, 80%+ detection, <5% error |
141
+ | 0.5 | Acceptable: Some violations, test completed |
142
+ | 0.3 | Partial: Tests ran with errors |
143
+ | 0.0 | Failed: Tests failed or major errors |
144
+
145
+ **When to Call Learning Tools:**
146
+ - ✅ **ALWAYS** after completing main task
147
+ - ✅ **ALWAYS** after detecting bottlenecks
148
+ - ✅ **ALWAYS** after generating performance recommendations
149
+ - ✅ When discovering new effective load patterns
150
+ - ✅ When achieving exceptional performance metrics
121
151
  </learning_protocol>
122
152
 
123
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 analysis:
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-production-intelligence",
79
82
  taskType: "production-analysis",
@@ -83,12 +86,14 @@ mcp__agentic_qe__learning_query({
83
86
  })
84
87
  ```
85
88
 
86
- Store experience after analysis 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-production-intelligence",
90
95
  taskType: "production-analysis",
91
- reward: 0.95,
96
+ reward: <calculated_reward>, // 0.0-1.0 based on criteria below
92
97
  outcome: {
93
98
  incidentsAnalyzed: 12,
94
99
  testsGenerated: 47,
@@ -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/production/test-scenarios/<task_id>",
115
+ value: {
116
+ incidents: [],
117
+ testScenarios: [],
118
+ insights: [],
119
+ anomalies: []
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: "Peak hour network failures in specific regions indicate infrastructure capacity issues - correlate with RUM data for comprehensive test generation",
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 (100% incident coverage, root causes identified, <5s)
121
- - 0.9: Excellent (95%+ coverage, most root causes found, <10s)
122
- - 0.7: Good (90%+ coverage, key root causes found, <20s)
123
- - 0.5: Acceptable (80%+ coverage, completed successfully)
139
+ ### Reward Calculation Criteria (0-1 scale)
140
+ | Reward | Criteria |
141
+ |--------|----------|
142
+ | 1.0 | Perfect execution (100% incident coverage, root causes identified, <5s) |
143
+ | 0.9 | Excellent (95%+ coverage, most root causes found, <10s) |
144
+ | 0.7 | Good (90%+ coverage, key root causes found, <20s) |
145
+ | 0.5 | Acceptable (80%+ coverage, 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 production data analysis
151
+ - ✅ **ALWAYS** after detecting incidents or anomalies
152
+ - ✅ **ALWAYS** after generating test scenarios from RUM data
153
+ - ✅ When discovering new incident patterns
154
+ - ✅ When achieving exceptional root cause identification rates
124
155
  </learning_protocol>
125
156
 
126
157
  <output_format>
@@ -199,8 +199,7 @@ const finalization = await hookManager.executeSessionEndFinalization({
199
199
  });
200
200
  ```
201
201
 
202
- ## Learning Protocol (Phase 6 - Option C Implementation)
203
-
202
+ <learning_protocol>
204
203
  **⚠️ MANDATORY**: When executed via Claude Code Task tool, you MUST call learning MCP tools to persist learning data.
205
204
 
206
205
  ### Required Learning Actions (Call AFTER Task Completion)
@@ -324,6 +323,7 @@ if (pastLearnings.success && pastLearnings.data) {
324
323
  - ✅ **ALWAYS** after generating recommendations
325
324
  - ✅ When discovering new effective strategies
326
325
  - ✅ When achieving exceptional performance metrics
326
+ </learning_protocol>
327
327
 
328
328
  ## Analysis Workflow
329
329
 
@@ -68,8 +68,11 @@ Coordination:
68
68
  </memory_namespace>
69
69
 
70
70
  <learning_protocol>
71
- Query before evaluation:
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-quality-gate",
75
78
  taskType: "quality-gate-evaluation",
@@ -79,12 +82,14 @@ 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-quality-gate",
86
91
  taskType: "quality-gate-evaluation",
87
- reward: 0.95,
92
+ reward: <calculated_reward>, // 0.0-1.0 based on criteria below
88
93
  outcome: {
89
94
  gateResult: "pass",
90
95
  riskLevel: "low",
@@ -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/quality/decisions/<task_id>",
112
+ value: {
113
+ decision: "PASS/FAIL",
114
+ riskScore: 0,
115
+ violations: [],
116
+ reasoning: ""
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: "Risk-based evaluation with ML scoring reduces false positives by 40% while maintaining 98% accuracy",
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% accurate decisions, 0 false positives, <2s)
118
- - 0.9: Excellent (98%+ accuracy, <1% false positives, <5s)
119
- - 0.7: Good (95%+ accuracy, <3% false positives)
120
- - 0.5: Acceptable (90%+ accuracy, completed)
136
+ ### Reward Calculation Criteria (0-1 scale)
137
+ | Reward | Criteria |
138
+ |--------|----------|
139
+ | 1.0 | Perfect (100% accurate decisions, 0 false positives, <2s) |
140
+ | 0.9 | Excellent (98%+ accuracy, <1% false positives, <5s) |
141
+ | 0.7 | Good (95%+ accuracy, <3% false positives) |
142
+ | 0.5 | Acceptable (90%+ accuracy, 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 quality gate evaluation
148
+ - ✅ **ALWAYS** after making PASS/FAIL decisions
149
+ - ✅ **ALWAYS** after detecting policy violations
150
+ - ✅ When discovering new effective threshold patterns
151
+ - ✅ When achieving exceptional accuracy rates
121
152
  </learning_protocol>
122
153
 
123
154
  <output_format>
@@ -70,8 +70,11 @@ Coordination:
70
70
  </memory_namespace>
71
71
 
72
72
  <learning_protocol>
73
- Query before starting:
74
- ```javascript
73
+ **⚠️ MANDATORY**: When executed via Claude Code Task tool, you MUST call learning MCP tools to persist learning data.
74
+
75
+ ### Query Past Learnings BEFORE Starting Task
76
+
77
+ ```typescript
75
78
  mcp__agentic_qe__learning_query({
76
79
  agentId: "qe-regression-risk-analyzer",
77
80
  taskType: "regression-risk-analysis",
@@ -81,12 +84,14 @@ mcp__agentic_qe__learning_query({
81
84
  })
82
85
  ```
83
86
 
84
- Store after completion:
85
- ```javascript
87
+ ### Required Learning Actions (Call AFTER Task Completion)
88
+
89
+ **1. Store Learning Experience:**
90
+ ```typescript
86
91
  mcp__agentic_qe__learning_store_experience({
87
92
  agentId: "qe-regression-risk-analyzer",
88
93
  taskType: "regression-risk-analysis",
89
- reward: 0.95,
94
+ reward: <calculated_reward>, // 0.0-1.0 based on criteria below
90
95
  outcome: {
91
96
  riskScore: 78.3,
92
97
  testsSelected: 47,
@@ -100,11 +105,50 @@ mcp__agentic_qe__learning_store_experience({
100
105
  })
101
106
  ```
102
107
 
103
- Reward criteria:
104
- - 1.0: Perfect (99%+ accuracy, 70%+ reduction, 0 false negatives)
105
- - 0.9: Excellent (95%+ accuracy, 60%+ reduction, <1% false negatives)
106
- - 0.7: Good (90%+ accuracy, 50%+ reduction)
107
- - 0.5: Acceptable (85%+ accuracy, 40%+ reduction)
108
+ **2. Store Task Artifacts:**
109
+ ```typescript
110
+ mcp__agentic_qe__memory_store({
111
+ key: "aqe/regression/test-selection/<task_id>",
112
+ value: {
113
+ riskScore: 0,
114
+ selectedTests: [],
115
+ impactAnalysis: {},
116
+ blastRadius: []
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
125
+ mcp__agentic_qe__learning_store_pattern({
126
+ pattern: "ML-enhanced test selection reduces CI time by 96% while maintaining 95% defect detection",
127
+ confidence: 0.95,
128
+ domain: "regression-analysis",
129
+ metadata: {
130
+ selectionAccuracy: 0.95,
131
+ timeReduction: 0.963
132
+ }
133
+ })
134
+ ```
135
+
136
+ ### Reward Calculation Criteria (0-1 scale)
137
+ | Reward | Criteria |
138
+ |--------|----------|
139
+ | 1.0 | Perfect (99%+ accuracy, 70%+ reduction, 0 false negatives) |
140
+ | 0.9 | Excellent (95%+ accuracy, 60%+ reduction, <1% false negatives) |
141
+ | 0.7 | Good (90%+ accuracy, 50%+ reduction) |
142
+ | 0.5 | Acceptable (85%+ accuracy, 40%+ reduction) |
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 regression risk analysis
148
+ - ✅ **ALWAYS** after selecting test suite
149
+ - ✅ **ALWAYS** after calculating blast radius
150
+ - ✅ When discovering new effective selection patterns
151
+ - ✅ When achieving exceptional accuracy and reduction rates
108
152
  </learning_protocol>
109
153
 
110
154
  <output_format>
@@ -71,8 +71,11 @@ Coordination:
71
71
  </memory_namespace>
72
72
 
73
73
  <learning_protocol>
74
- Query for past learnings before starting validation:
75
- ```javascript
74
+ **⚠️ MANDATORY**: When executed via Claude Code Task tool, you MUST call learning MCP tools to persist learning data.
75
+
76
+ ### Query Past Learnings BEFORE Starting Task
77
+
78
+ ```typescript
76
79
  mcp__agentic_qe__learning_query({
77
80
  agentId: "qe-requirements-validator",
78
81
  taskType: "requirements-validation",
@@ -82,12 +85,14 @@ mcp__agentic_qe__learning_query({
82
85
  })
83
86
  ```
84
87
 
85
- Store experience after validation completion:
86
- ```javascript
88
+ ### Required Learning Actions (Call AFTER Task Completion)
89
+
90
+ **1. Store Learning Experience:**
91
+ ```typescript
87
92
  mcp__agentic_qe__learning_store_experience({
88
93
  agentId: "qe-requirements-validator",
89
94
  taskType: "requirements-validation",
90
- reward: 0.95,
95
+ reward: <calculated_reward>, // 0.0-1.0 based on criteria below
91
96
  outcome: {
92
97
  requirementsValidated: 12,
93
98
  testabilityScore: 8.5,
@@ -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/requirements/validated/<task_id>",
114
+ value: {
115
+ validatedRequirements: [],
116
+ bddScenarios: [],
117
+ riskScores: {},
118
+ traceabilityMatrix: []
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: "Vague performance requirements converted to specific percentile-based metrics (p50/p95/p99) with measurable thresholds",
109
129
  confidence: 0.95,
@@ -115,11 +135,22 @@ mcp__agentic_qe__learning_store_pattern({
115
135
  })
116
136
  ```
117
137
 
118
- Reward criteria (0-1 scale):
119
- - 1.0: Perfect execution (All requirements testable, 100% INVEST, <3s)
120
- - 0.9: Excellent (95%+ testable, 95%+ INVEST compliance, <5s)
121
- - 0.7: Good (90%+ testable, 90%+ INVEST compliance, <10s)
122
- - 0.5: Acceptable (80%+ testable, 80%+ INVEST compliance)
138
+ ### Reward Calculation Criteria (0-1 scale)
139
+ | Reward | Criteria |
140
+ |--------|----------|
141
+ | 1.0 | Perfect execution (All requirements testable, 100% INVEST, <3s) |
142
+ | 0.9 | Excellent (95%+ testable, 95%+ INVEST compliance, <5s) |
143
+ | 0.7 | Good (90%+ testable, 90%+ INVEST compliance, <10s) |
144
+ | 0.5 | Acceptable (80%+ testable, 80%+ INVEST compliance) |
145
+ | 0.3 | Partial: Task partially completed |
146
+ | 0.0 | Failed: Task failed or major errors |
147
+
148
+ **When to Call Learning Tools:**
149
+ - ✅ **ALWAYS** after completing requirements validation
150
+ - ✅ **ALWAYS** after generating BDD scenarios
151
+ - ✅ **ALWAYS** after identifying testability issues
152
+ - ✅ When discovering new requirement enhancement patterns
153
+ - ✅ When achieving exceptional testability scores
123
154
  </learning_protocol>
124
155
 
125
156
  <output_format>
@@ -94,8 +94,11 @@ Coordination:
94
94
  </memory_namespace>
95
95
 
96
96
  <learning_protocol>
97
- Query before scanning:
98
- ```javascript
97
+ **⚠️ MANDATORY**: When executed via Claude Code Task tool, you MUST call learning MCP tools to persist learning data.
98
+
99
+ ### Query Past Learnings BEFORE Starting Task
100
+
101
+ ```typescript
99
102
  mcp__agentic_qe__learning_query({
100
103
  agentId: "qe-security-scanner",
101
104
  taskType: "security-scanning",
@@ -105,44 +108,71 @@ mcp__agentic_qe__learning_query({
105
108
  })
106
109
  ```
107
110
 
108
- Store after completion:
109
- ```javascript
111
+ ### Required Learning Actions (Call AFTER Task Completion)
112
+
113
+ **1. Store Learning Experience:**
114
+ ```typescript
110
115
  mcp__agentic_qe__learning_store_experience({
111
116
  agentId: "qe-security-scanner",
112
117
  taskType: "security-scanning",
113
- reward: 0.94,
118
+ reward: <calculated_reward>, // 0.0-1.0 based on criteria below
114
119
  outcome: {
115
- vulnerabilitiesFound: 8,
116
- criticalVulnerabilities: 0,
117
- complianceScore: 0.95,
118
- falsePositives: 1
120
+ vulnerabilitiesFound: <count>,
121
+ criticalVulnerabilities: <count>,
122
+ complianceScore: <0.0-1.0>,
123
+ falsePositives: <count>
119
124
  },
120
125
  metadata: {
121
- scanType: "sast-dast",
122
- tools: ["snyk", "zap"],
123
- duration: 1200
126
+ scanType: "<sast|dast|combined>",
127
+ tools: ["<tools_used>"],
128
+ duration: <ms>
124
129
  }
125
130
  })
126
131
  ```
127
132
 
128
- Store patterns when discovered:
129
- ```javascript
133
+ **2. Store Task Artifacts:**
134
+ ```typescript
135
+ mcp__agentic_qe__memory_store({
136
+ key: "aqe/security/scan-results/<task_id>",
137
+ value: {
138
+ vulnerabilities: [...],
139
+ complianceReport: {...},
140
+ remediations: [...]
141
+ },
142
+ namespace: "aqe",
143
+ persist: true // IMPORTANT: Must be true for persistence
144
+ })
145
+ ```
146
+
147
+ **3. Store Discovered Patterns (when applicable):**
148
+ ```typescript
130
149
  mcp__agentic_qe__learning_store_pattern({
131
- pattern: "Combined SAST+DAST scanning detects 42% more vulnerabilities than SAST alone for web applications",
132
- confidence: 0.94,
150
+ pattern: "<description of successful security strategy>",
151
+ confidence: <0.0-1.0>,
133
152
  domain: "security-scanning",
134
153
  metadata: {
135
- detectionIncrease: "42%",
136
- falsePositiveRate: "5%"
154
+ detectionRate: "<percentage>",
155
+ falsePositiveRate: "<percentage>"
137
156
  }
138
157
  })
139
158
  ```
140
159
 
141
- Reward criteria:
142
- - 1.0: Perfect (0 critical vulnerabilities, 95%+ compliance, <5% false positives)
143
- - 0.9: Excellent (0 critical, 90%+ compliance, <10% false positives)
144
- - 0.7: Good (Few critical, 80%+ compliance, <15% false positives)
145
- - 0.5: Acceptable (Some vulnerabilities, completed)
160
+ ### Reward Calculation Criteria (0-1 scale)
161
+ | Reward | Criteria |
162
+ |--------|----------|
163
+ | 1.0 | Perfect: 0 critical vulnerabilities, 95%+ compliance, <5% false positives |
164
+ | 0.9 | Excellent: 0 critical, 90%+ compliance, <10% false positives |
165
+ | 0.7 | Good: Few critical, 80%+ compliance, <15% false positives |
166
+ | 0.5 | Acceptable: Some vulnerabilities found, scan completed |
167
+ | 0.3 | Partial: Scan completed with errors |
168
+ | 0.0 | Failed: Scan failed or major errors |
169
+
170
+ **When to Call Learning Tools:**
171
+ - ✅ **ALWAYS** after completing main task
172
+ - ✅ **ALWAYS** after detecting vulnerabilities
173
+ - ✅ **ALWAYS** after generating remediation recommendations
174
+ - ✅ When discovering new effective scanning patterns
175
+ - ✅ When achieving exceptional detection rates
146
176
  </learning_protocol>
147
177
 
148
178
  <output_format>
@@ -70,8 +70,11 @@ Coordination:
70
70
  </memory_namespace>
71
71
 
72
72
  <learning_protocol>
73
- Query for past learnings before starting task:
74
- ```javascript
73
+ **⚠️ MANDATORY**: When executed via Claude Code Task tool, you MUST call learning MCP tools to persist learning data.
74
+
75
+ ### Query Past Learnings BEFORE Starting Task
76
+
77
+ ```typescript
75
78
  mcp__agentic_qe__learning_query({
76
79
  agentId: "qe-test-data-architect",
77
80
  taskType: "test-data-generation",
@@ -81,12 +84,14 @@ mcp__agentic_qe__learning_query({
81
84
  })
82
85
  ```
83
86
 
84
- Store experience after task completion:
85
- ```javascript
87
+ ### Required Learning Actions (Call AFTER Task Completion)
88
+
89
+ **1. Store Learning Experience:**
90
+ ```typescript
86
91
  mcp__agentic_qe__learning_store_experience({
87
92
  agentId: "qe-test-data-architect",
88
93
  taskType: "test-data-generation",
89
- reward: 0.91,
94
+ reward: <calculated_reward>, // 0.0-1.0 based on criteria below
90
95
  outcome: {
91
96
  recordsGenerated: 1000,
92
97
  schemasProcessed: 5,
@@ -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/test-data/generated/<task_id>",
115
+ value: {
116
+ generatedData: [],
117
+ schemaAnalysis: {},
118
+ validationResults: {},
119
+ patterns: []
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: "Realistic synthesis with production pattern analysis generates 45% more realistic test data than faker-based generation for financial applications",
110
130
  confidence: 0.91,
@@ -117,11 +137,22 @@ mcp__agentic_qe__learning_store_pattern({
117
137
  })
118
138
  ```
119
139
 
120
- Reward criteria (0-1 scale):
121
- - 1.0: Perfect execution (100% constraint compliance, 95%+ edge case coverage, realistic data)
122
- - 0.9: Excellent (100% constraint compliance, 90%+ edge case coverage)
123
- - 0.7: Good (95%+ constraint compliance, 80%+ edge case coverage)
124
- - 0.5: Acceptable (90%+ constraint compliance, completed successfully)
140
+ ### Reward Calculation Criteria (0-1 scale)
141
+ | Reward | Criteria |
142
+ |--------|----------|
143
+ | 1.0 | Perfect execution (100% constraint compliance, 95%+ edge case coverage, realistic data) |
144
+ | 0.9 | Excellent (100% constraint compliance, 90%+ edge case coverage) |
145
+ | 0.7 | Good (95%+ constraint compliance, 80%+ edge case coverage) |
146
+ | 0.5 | Acceptable (90%+ constraint compliance, completed successfully) |
147
+ | 0.3 | Partial: Task partially completed |
148
+ | 0.0 | Failed: Task failed or major errors |
149
+
150
+ **When to Call Learning Tools:**
151
+ - ✅ **ALWAYS** after completing test data generation
152
+ - ✅ **ALWAYS** after processing schemas
153
+ - ✅ **ALWAYS** after validating constraints
154
+ - ✅ When discovering new effective generation patterns
155
+ - ✅ When achieving exceptional compliance rates
125
156
  </learning_protocol>
126
157
 
127
158
  <output_format>