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
@@ -43,6 +43,7 @@ const inquirer_1 = __importDefault(require("inquirer"));
43
43
  const ora_1 = __importDefault(require("ora"));
44
44
  const fs = __importStar(require("fs-extra"));
45
45
  const path = __importStar(require("path"));
46
+ const init_claude_md_template_1 = require("./init-claude-md-template");
46
47
  // Import version from package.json to maintain consistency
47
48
  const packageJson = require('../../../package.json');
48
49
  const PACKAGE_VERSION = packageJson.version;
@@ -258,6 +259,7 @@ class InitCommand {
258
259
  '.agentic-qe/state/coordination', // Coordination state
259
260
  '.claude', // For Claude Code integration
260
261
  '.claude/agents', // Where agent definitions live
262
+ '.claude/agents/subagents', // Where subagent definitions live (8 TDD subagents)
261
263
  '.claude/skills', // Where QE skill definitions live (35 QE skills)
262
264
  '.claude/commands', // Where AQE slash commands live (8 commands)
263
265
  'tests/unit',
@@ -331,6 +333,35 @@ class InitCommand {
331
333
  }
332
334
  }
333
335
  }
336
+ // Copy subagents folder if it exists
337
+ const subagentsSourcePath = path.join(sourcePath, 'subagents');
338
+ const subagentsTargetPath = path.join(targetPath, 'subagents');
339
+ if (await fs.pathExists(subagentsSourcePath)) {
340
+ console.log(chalk_1.default.cyan(' 📦 Copying subagent definitions...'));
341
+ await fs.ensureDir(subagentsTargetPath);
342
+ const subagentFiles = await fs.readdir(subagentsSourcePath);
343
+ const subagentTemplates = subagentFiles.filter(f => f.endsWith('.md'));
344
+ let subagentsCopied = 0;
345
+ let subagentsUpdated = 0;
346
+ for (const subagentFile of subagentTemplates) {
347
+ const sourceFile = path.join(subagentsSourcePath, subagentFile);
348
+ const targetFile = path.join(subagentsTargetPath, subagentFile);
349
+ const targetExists = await fs.pathExists(targetFile);
350
+ if (!targetExists || force) {
351
+ await fs.copy(sourceFile, targetFile);
352
+ if (targetExists) {
353
+ subagentsUpdated++;
354
+ }
355
+ else {
356
+ subagentsCopied++;
357
+ }
358
+ }
359
+ }
360
+ if (force && subagentsUpdated > 0) {
361
+ console.log(chalk_1.default.green(` ✓ Updated ${subagentsUpdated} existing subagent definitions`));
362
+ }
363
+ console.log(chalk_1.default.green(` ✓ Copied ${subagentsCopied} new subagent definitions (${subagentTemplates.length} total subagents)`));
364
+ }
334
365
  if (force && updatedFiles > 0) {
335
366
  console.log(chalk_1.default.green(` ✓ Updated ${updatedFiles} existing agent definitions`));
336
367
  }
@@ -752,13 +783,13 @@ For full capabilities, install the complete agentic-qe package.
752
783
  return files.filter(f => f.endsWith('.md')).length;
753
784
  }
754
785
  /**
755
- * Copy all 35 QE Fleet skills (filters out Claude Flow skills)
786
+ * Copy all 37 QE Fleet skills (filters out Claude Flow skills)
756
787
  */
757
788
  static async copySkillTemplates() {
758
789
  console.log(chalk_1.default.cyan(' 🎯 Initializing QE Fleet skills...'));
759
- // Define all 34 QE Fleet skills (Phase 1: 17 original + Phase 2: 17 new = 34 total)
790
+ // Define all 37 QE Fleet skills (Phase 1: 18 + Phase 2: 16 + Phase 3: 3 = 37 total)
760
791
  const QE_FLEET_SKILLS = [
761
- // Phase 1: Original Quality Practices (17 skills)
792
+ // Phase 1: Original Quality Practices (18 skills)
762
793
  // Core Quality Practices (3)
763
794
  'agentic-quality-engineering',
764
795
  'context-driven-testing',
@@ -781,7 +812,7 @@ For full capabilities, install the complete agentic-qe package.
781
812
  'bug-reporting-excellence',
782
813
  'technical-writing',
783
814
  'consultancy-practices',
784
- // Phase 2: Expanded QE Skills Library (17 skills)
815
+ // Phase 2: Expanded QE Skills Library (16 skills)
785
816
  // Testing Methodologies (6)
786
817
  'regression-testing',
787
818
  'shift-left-testing',
@@ -799,9 +830,14 @@ For full capabilities, install the complete agentic-qe package.
799
830
  'localization-testing',
800
831
  'compliance-testing',
801
832
  'visual-testing-advanced',
802
- // Testing Infrastructure (2)
833
+ // Testing Infrastructure (1)
803
834
  'test-environment-management',
804
- 'test-reporting-analytics'
835
+ 'test-reporting-analytics',
836
+ // Phase 3: Advanced Quality Engineering Skills (3 skills)
837
+ // Strategic Testing Methodologies (3)
838
+ 'six-thinking-hats',
839
+ 'brutal-honesty-review',
840
+ 'cicd-pipeline-qe-orchestrator'
805
841
  ];
806
842
  // Find the agentic-qe package location
807
843
  const possiblePaths = [
@@ -864,12 +900,12 @@ For full capabilities, install the complete agentic-qe package.
864
900
  console.log(chalk_1.default.green(' ✓ All QE skills already present'));
865
901
  }
866
902
  console.log(chalk_1.default.cyan(` 📋 Total QE skills initialized: ${finalSkillCount}`));
867
- // Verify we have exactly 34 QE skills
868
- if (finalSkillCount === 34) {
869
- console.log(chalk_1.default.green(' ✅ All 34 QE Fleet skills successfully initialized'));
903
+ // Verify we have exactly 37 QE skills
904
+ if (finalSkillCount === 37) {
905
+ console.log(chalk_1.default.green(' ✅ All 37 QE Fleet skills successfully initialized'));
870
906
  }
871
- else if (finalSkillCount < 34) {
872
- console.warn(chalk_1.default.yellow(` ⚠️ Expected 34 QE skills, found ${finalSkillCount}`));
907
+ else if (finalSkillCount < 37) {
908
+ console.warn(chalk_1.default.yellow(` ⚠️ Expected 37 QE skills, found ${finalSkillCount}`));
873
909
  const missingSkills = QE_FLEET_SKILLS.filter(skill => {
874
910
  return !fs.existsSync(path.join(targetPath, skill));
875
911
  });
@@ -1283,456 +1319,469 @@ echo "[AQE] Post-execution coordination complete"
1283
1319
  appendPosition = position;
1284
1320
  }
1285
1321
  }
1322
+ // Generate condensed CLAUDE.md using template
1323
+ const claudeMdContent = (0, init_claude_md_template_1.generateCondensedClaudeMd)({
1324
+ agentCount,
1325
+ topology: config.topology,
1326
+ maxAgents: config.maxAgents,
1327
+ testingFocus: config.testingFocus,
1328
+ environments: config.environments,
1329
+ frameworks: config.frameworks,
1330
+ routing: config.routing,
1331
+ streaming: config.streaming,
1332
+ }, PACKAGE_VERSION);
1333
+ /* OLD TEMPLATE - Replaced with condensed version
1286
1334
  const claudeMdContent = `# Claude Code Configuration - Agentic QE Fleet
1287
-
1288
- ## 🤖 Agentic Quality Engineering Fleet
1289
-
1290
- This project uses the **Agentic QE Fleet** - a distributed swarm of ${agentCount} AI agents for comprehensive software testing and quality assurance.
1291
-
1292
- ### Available Agents
1293
-
1294
- #### Core Testing (5 agents)
1295
- - **qe-test-generator**: AI-powered test generation with sublinear optimization
1296
- - **qe-test-executor**: Multi-framework test execution with parallel processing
1297
- - **qe-coverage-analyzer**: Real-time gap detection with O(log n) algorithms
1298
- - **qe-quality-gate**: Intelligent quality gate with risk assessment
1299
- - **qe-quality-analyzer**: Comprehensive quality metrics analysis
1300
-
1301
- #### Performance & Security (2 agents)
1302
- - **qe-performance-tester**: Load testing with k6, JMeter, Gatling integration
1303
- - **qe-security-scanner**: Multi-layer security with SAST/DAST scanning
1304
-
1305
- #### Strategic Planning (3 agents)
1306
- - **qe-requirements-validator**: INVEST criteria validation and BDD generation
1307
- - **qe-production-intelligence**: Production data to test scenarios conversion
1308
- - **qe-fleet-commander**: Hierarchical fleet coordination (50+ agents)
1309
-
1310
- #### Deployment (1 agent)
1311
- - **qe-deployment-readiness**: Multi-factor risk assessment for deployments
1312
-
1313
- #### Advanced Testing (4 agents)
1314
- - **qe-regression-risk-analyzer**: Smart test selection with ML patterns
1315
- - **qe-test-data-architect**: High-speed realistic data generation (10k+ records/sec)
1316
- - **qe-api-contract-validator**: Breaking change detection across API versions
1317
- - **qe-flaky-test-hunter**: Statistical flakiness detection and auto-stabilization
1318
-
1319
- #### Specialized (2 agents)
1320
- - **qe-visual-tester**: Visual regression with AI-powered comparison
1321
- - **qe-chaos-engineer**: Resilience testing with controlled fault injection
1322
-
1323
- ## 🚀 Quick Start
1324
-
1325
- ### Using Agents via Claude Code Task Tool (Recommended)
1326
-
1327
- \\\`\\\`\\\`javascript
1328
- // Spawn agents directly in Claude Code
1329
- Task("Generate tests", "Create comprehensive test suite for UserService", "qe-test-generator")
1330
- Task("Analyze coverage", "Find gaps using O(log n) algorithms", "qe-coverage-analyzer")
1331
- Task("Quality check", "Run quality gate validation", "qe-quality-gate")
1332
- \\\`\\\`\\\`
1333
-
1334
- ### Using MCP Tools
1335
-
1336
- \\\`\\\`\\\`bash
1337
- # Check MCP connection
1338
- claude mcp list
1339
- # Should show: agentic-qe: npm run mcp:start - ✓ Connected
1340
-
1341
- # Use MCP tools in Claude Code
1342
- mcp__agentic_qe__test_generate({ type: "unit", framework: "${config.frameworks?.[0] || 'jest'}" })
1343
- mcp__agentic_qe__test_execute({ parallel: true, coverage: true })
1344
- mcp__agentic_qe__quality_analyze({ scope: "full" })
1345
- \\\`\\\`\\\`
1346
-
1347
- ### Using CLI
1348
-
1349
- \\\`\\\`\\\`bash
1350
- # Quick commands
1351
- aqe test <module-name> # Generate tests
1352
- aqe coverage # Analyze coverage
1353
- aqe quality # Run quality gate
1354
- aqe status # Check fleet status
1355
- \\\`\\\`\\\`
1356
-
1357
- ## 🔄 Agent Coordination
1358
-
1359
- All agents coordinate through **AQE hooks** (Agentic QE native hooks - zero external dependencies, 100-500x faster):
1360
-
1361
- ### Automatic Lifecycle Hooks
1362
-
1363
- Agents extend \\\`BaseAgent\\\` and override lifecycle methods:
1364
-
1365
- \\\`\\\`\\\`typescript
1366
- protected async onPreTask(data: { assignment: TaskAssignment }): Promise<void> {
1367
- // Load context before task execution
1368
- const context = await this.memoryStore.retrieve('aqe/context', {
1369
- partition: 'coordination'
1370
- });
1371
-
1372
- this.logger.info('Pre-task hook complete');
1373
- }
1374
-
1375
- protected async onPostTask(data: { assignment: TaskAssignment; result: any }): Promise<void> {
1376
- // Store results after task completion
1377
- await this.memoryStore.store('aqe/' + this.agentId.type + '/results', data.result, {
1378
- partition: 'agent_results',
1379
- ttl: 86400 // 24 hours
1380
- });
1381
-
1382
- // Emit completion event
1383
- this.eventBus.emit('task:completed', {
1384
- agentId: this.agentId,
1385
- result: data.result
1386
- });
1387
-
1388
- this.logger.info('Post-task hook complete');
1389
- }
1390
-
1391
- protected async onTaskError(data: { assignment: TaskAssignment; error: Error }): Promise<void> {
1392
- // Handle task errors
1393
- await this.memoryStore.store('aqe/errors/' + data.assignment.id, {
1394
- error: data.error.message,
1395
- stack: data.error.stack,
1396
- timestamp: Date.now()
1397
- }, {
1398
- partition: 'errors',
1399
- ttl: 604800 // 7 days
1400
- });
1401
-
1402
- this.logger.error('Task failed', { error: data.error });
1403
- }
1404
- \\\`\\\`\\\`
1405
-
1406
- ### Performance Comparison
1407
-
1408
- | Feature | AQE Hooks | External Hooks |
1409
- |---------|-----------|----------------|
1410
- | **Speed** | <1ms | 100-500ms |
1411
- | **Dependencies** | Zero | External package |
1412
- | **Type Safety** | Full TypeScript | Shell strings |
1413
- | **Integration** | Direct API | Shell commands |
1414
- | **Performance** | 100-500x faster | Baseline |
1415
-
1416
- ## 📋 Memory Namespace
1417
-
1418
- Agents share state through the **\\\`aqe/*\\\` memory namespace**:
1419
-
1420
- - \\\`aqe/test-plan/*\\\` - Test planning and requirements
1421
- - \\\`aqe/coverage/*\\\` - Coverage analysis and gaps
1422
- - \\\`aqe/quality/*\\\` - Quality metrics and gates
1423
- - \\\`aqe/performance/*\\\` - Performance test results
1424
- - \\\`aqe/security/*\\\` - Security scan findings
1425
- - \\\`aqe/swarm/coordination\\\` - Cross-agent coordination
1426
-
1427
- ## 🎯 Fleet Configuration
1428
-
1429
- **Topology**: ${config.topology}
1430
- **Max Agents**: ${config.maxAgents}
1431
- **Testing Focus**: ${config.testingFocus?.join(', ') || 'All areas'}
1432
- **Environments**: ${config.environments?.join(', ') || 'Not specified'}
1433
- **Frameworks**: ${config.frameworks?.join(', ') || 'jest'}
1434
-
1435
- ## 💰 Multi-Model Router (v${PACKAGE_VERSION})
1436
-
1437
- **Status**: ${config.routing?.enabled ? '✅ Enabled' : '⚠️ Disabled (opt-in)'}
1438
-
1439
- The Multi-Model Router provides **70-81% cost savings** by intelligently selecting AI models based on task complexity.
1440
-
1441
- ### Features
1442
-
1443
- - ✅ Intelligent model selection (GPT-3.5, GPT-4, Claude Sonnet 4.5, Claude Haiku)
1444
- - ✅ Real-time cost tracking and aggregation
1445
- - ✅ Automatic fallback chains for resilience
1446
- - ✅ Feature flags for safe rollout
1447
- - ✅ Zero breaking changes (disabled by default)
1448
-
1449
- ### Enabling Routing
1450
-
1451
- **Option 1: Via Configuration**
1452
- \\\`\\\`\\\`json
1453
- // .agentic-qe/config/routing.json
1454
- {
1455
- "multiModelRouter": {
1456
- "enabled": true
1457
- }
1458
- }
1459
- \\\`\\\`\\\`
1460
-
1461
- **Option 2: Via Environment Variable**
1462
- \\\`\\\`\\\`bash
1463
- export AQE_ROUTING_ENABLED=true
1464
- \\\`\\\`\\\`
1465
-
1466
- ### Model Selection Rules
1467
-
1468
- | Task Complexity | Model | Est. Cost | Use Case |
1469
- |----------------|-------|-----------|----------|
1470
- | **Simple** | GPT-3.5 | $0.0004 | Unit tests, basic validation |
1471
- | **Moderate** | GPT-3.5 | $0.0008 | Integration tests, mocks |
1472
- | **Complex** | GPT-4 | $0.0048 | Property-based, edge cases |
1473
- | **Critical** | Claude Sonnet 4.5 | $0.0065 | Security, architecture review |
1474
-
1475
- ### Cost Savings Example
1476
-
1477
- **Before Routing** (always GPT-4):
1478
- - 100 simple tasks: $0.48
1479
- - 50 complex tasks: $0.24
1480
- - **Total**: $0.72
1481
-
1482
- **After Routing**:
1483
- - 100 simple → GPT-3.5: $0.04
1484
- - 50 complex → GPT-4: $0.24
1485
- - **Total**: $0.28
1486
- - **Savings**: $0.44 (61%)
1487
-
1488
- ### Monitoring Costs
1489
-
1490
- \\\`\\\`\\\`bash
1491
- # View cost dashboard
1492
- aqe routing dashboard
1493
-
1494
- # Export cost report
1495
- aqe routing report --format json
1496
-
1497
- # Check savings
1498
- aqe routing stats
1499
- \\\`\\\`\\\`
1500
-
1501
- ## 📊 Streaming Progress (v${PACKAGE_VERSION})
1502
-
1503
- **Status**: ${config.streaming?.enabled ? '✅ Enabled' : '⚠️ Disabled'}
1504
-
1505
- Real-time progress updates for long-running operations using AsyncGenerator pattern.
1506
-
1507
- ### Features
1508
-
1509
- - ✅ Real-time progress percentage
1510
- - ✅ Current operation visibility
1511
- - ✅ for-await-of compatibility
1512
- - ✅ Backward compatible (non-streaming still works)
1513
-
1514
- ### Example Usage
1515
-
1516
- \\\`\\\`\\\`javascript
1517
- // Using streaming MCP tool
1518
- const handler = new TestExecuteStreamHandler();
1519
-
1520
- for await (const event of handler.execute(params)) {
1521
- if (event.type === 'progress') {
1522
- console.log(\\\`Progress: \\\${event.percent}% - \\\${event.message}\\\`);
1523
- } else if (event.type === 'result') {
1524
- console.log('Completed:', event.data);
1525
- }
1526
- }
1527
- \\\`\\\`\\\`
1528
-
1529
- ### Supported Operations
1530
-
1531
- - ✅ Test execution (test-by-test progress)
1532
- - ✅ Coverage analysis (incremental gap detection)
1533
- - ⚠️ Test generation (coming in v1.1.0)
1534
- - ⚠️ Security scanning (coming in v1.1.0)
1535
-
1536
- ## 🎯 Claude Code Skills Integration
1537
-
1538
- This fleet includes **34 specialized QE skills** that agents can use:
1539
-
1540
- ### Phase 1: Original Quality Engineering Skills (17 skills)
1541
-
1542
- #### Core Testing (3 skills)
1543
- - **agentic-quality-engineering**: Using AI agents as force multipliers in quality work - autonomous testing systems, PACT principles, scaling quality engineering with intelligent agents
1544
- - **context-driven-testing**: Apply context-driven testing principles where practices are chosen based on project context, not universal "best practices"
1545
- - **holistic-testing-pact**: Apply the Holistic Testing Model evolved with PACT (Proactive, Autonomous, Collaborative, Targeted) principles
1546
-
1547
- #### Testing Methodologies (4 skills)
1548
- - **tdd-london-chicago**: Apply both London and Chicago school TDD approaches - understanding different TDD philosophies and choosing the right testing style
1549
- - **xp-practices**: Apply XP practices including pair programming, ensemble programming, continuous integration, and sustainable pace
1550
- - **risk-based-testing**: Focus testing effort on highest-risk areas using risk assessment and prioritization
1551
- - **test-automation-strategy**: Design and implement comprehensive test automation strategies
1552
-
1553
- #### Testing Techniques (4 skills)
1554
- - **api-testing-patterns**: Comprehensive API testing patterns including contract testing, REST/GraphQL testing, and integration testing
1555
- - **exploratory-testing-advanced**: Advanced exploratory testing techniques with Session-Based Test Management (SBTM), RST heuristics, and test tours
1556
- - **performance-testing**: Test application performance, scalability, and resilience with load testing and stress testing
1557
- - **security-testing**: Test for security vulnerabilities using OWASP principles and security testing techniques
1558
-
1559
- #### Code Quality (3 skills)
1560
- - **code-review-quality**: Conduct context-driven code reviews focusing on quality, testability, and maintainability
1561
- - **refactoring-patterns**: Apply safe refactoring patterns to improve code structure without changing behavior
1562
- - **quality-metrics**: Measure quality effectively with actionable metrics and KPIs
1563
-
1564
- #### Communication (3 skills)
1565
- - **bug-reporting-excellence**: Write high-quality bug reports that get fixed quickly - includes templates, examples, and best practices
1566
- - **technical-writing**: Create clear, concise technical documentation
1567
- - **consultancy-practices**: Apply effective software quality consultancy practices
1568
-
1569
- ### Phase 2: Expanded QE Skills Library (17 skills)
1570
-
1571
- #### Testing Methodologies (6 skills)
1572
- - **regression-testing**: Strategic regression testing with test selection, impact analysis, and continuous regression management
1573
- - **shift-left-testing**: Move testing activities earlier in development lifecycle with TDD, BDD, and design for testability
1574
- - **shift-right-testing**: Testing in production with feature flags, canary deployments, synthetic monitoring, and chaos engineering
1575
- - **test-design-techniques**: Advanced test design using equivalence partitioning, boundary value analysis, and decision tables
1576
- - **mutation-testing**: Test quality validation through mutation testing and measuring test suite effectiveness
1577
- - **test-data-management**: Realistic test data generation, GDPR compliance, and data masking strategies
1578
-
1579
- #### Specialized Testing (9 skills)
1580
- - **accessibility-testing**: WCAG 2.2 compliance testing, screen reader validation, and inclusive design verification
1581
- - **mobile-testing**: Comprehensive mobile testing for iOS and Android including gestures, sensors, and device fragmentation
1582
- - **database-testing**: Database schema validation, data integrity testing, migration testing, and query performance
1583
- - **contract-testing**: Consumer-driven contract testing for microservices using Pact and API versioning
1584
- - **chaos-engineering-resilience**: Chaos engineering principles, controlled failure injection, and resilience testing
1585
- - **compatibility-testing**: Cross-browser, cross-platform, and cross-device compatibility testing
1586
- - **localization-testing**: Internationalization (i18n) and localization (l10n) testing for global products
1587
- - **compliance-testing**: Regulatory compliance testing for GDPR, CCPA, HIPAA, SOC2, and PCI-DSS
1588
- - **visual-testing-advanced**: Advanced visual regression testing with AI-powered screenshot comparison and UI validation
1589
-
1590
- #### Testing Infrastructure (2 skills)
1591
- - **test-environment-management**: Manage test environments, infrastructure as code, and environment provisioning
1592
- - **test-reporting-analytics**: Comprehensive test reporting with metrics, trends, and actionable insights
1593
-
1594
- ### Using Skills
1595
-
1596
- #### Via CLI
1597
- \\\`\\\`\\\`bash
1598
- # List all available skills
1599
- aqe skills list
1600
-
1601
- # Search for specific skills
1602
- aqe skills search "testing"
1603
-
1604
- # Show skill details
1605
- aqe skills show agentic-quality-engineering
1606
-
1607
- # Show skill statistics
1608
- aqe skills stats
1609
- \\\`\\\`\\\`
1610
-
1611
- #### Via Skill Tool in Claude Code
1612
- \\\`\\\`\\\`javascript
1613
- // Execute a skill
1614
- Skill("agentic-quality-engineering")
1615
- Skill("tdd-london-chicago")
1616
- Skill("api-testing-patterns")
1617
- \\\`\\\`\\\`
1618
-
1619
- #### Integration with Agents
1620
- All QE agents automatically have access to relevant skills based on their specialization:
1621
- - **Test generators** use: agentic-quality-engineering, api-testing-patterns, tdd-london-chicago
1622
- - **Coverage analyzers** use: agentic-quality-engineering, quality-metrics, risk-based-testing
1623
- - **Flaky test hunters** use: agentic-quality-engineering, exploratory-testing-advanced
1624
- - **Performance testers** use: agentic-quality-engineering, performance-testing, quality-metrics
1625
- - **Security scanners** use: agentic-quality-engineering, security-testing, risk-based-testing
1626
-
1627
- ## 🧠 Q-Learning Integration (Phase 2)
1628
-
1629
- All agents automatically learn from task execution through Q-learning:
1630
-
1631
- ### Observability
1632
- \\\`\\\`\\\`bash
1633
- # Check learning status
1634
- aqe learn status --agent test-gen
1635
-
1636
- # View learned patterns
1637
- aqe learn history --agent test-gen --limit 50
1638
-
1639
- # Export learning data
1640
- aqe learn export --agent test-gen --output learning.json
1641
- \\\`\\\`\\\`
1642
-
1643
- ### Pattern Management
1644
- \\\`\\\`\\\`bash
1645
- # List test patterns
1646
- aqe patterns list --framework jest
1647
-
1648
- # Search patterns
1649
- aqe patterns search "api validation"
1650
-
1651
- # Extract patterns from tests
1652
- aqe patterns extract ./tests --framework jest
1653
- \\\`\\\`\\\`
1654
-
1655
- ### Improvement Loop
1656
- \\\`\\\`\\\`bash
1657
- # Start continuous improvement
1658
- aqe improve start
1659
-
1660
- # Check improvement status
1661
- aqe improve status
1662
-
1663
- # Run single improvement cycle
1664
- aqe improve cycle
1665
- \\\`\\\`\\\`
1666
-
1667
- ## 📚 Documentation
1668
-
1669
- - **Agent Definitions**: \\\`.claude/agents/\\\` - ${agentCount} specialized QE agents
1670
- - **Skills**: \\\`.claude/skills/\\\` - 34 specialized QE skills for agents (Phase 1: 17 + Phase 2: 17)
1671
- - **Fleet Config**: \\\`.agentic-qe/config/fleet.json\\\`
1672
- - **Routing Config**: \\\`.agentic-qe/config/routing.json\\\` (Multi-Model Router settings)
1673
- - **AQE Hooks Config**: \\\`.agentic-qe/config/aqe-hooks.json\\\` (zero dependencies, 100-500x faster)
1674
-
1675
- ## 🔧 Advanced Usage
1676
-
1677
- ### Parallel Agent Execution
1678
-
1679
- \\\`\\\`\\\`javascript
1680
- // Execute multiple agents concurrently
1681
- Task("Test Generation", "Generate unit tests", "qe-test-generator")
1682
- Task("Coverage Analysis", "Analyze current coverage", "qe-coverage-analyzer")
1683
- Task("Security Scan", "Run security checks", "qe-security-scanner")
1684
- Task("Performance Test", "Load test critical paths", "qe-performance-tester")
1685
- \\\`\\\`\\\`
1686
-
1687
- ### Agent Coordination Example
1688
-
1689
- \\\`\\\`\\\`javascript
1690
- // Test generator stores results
1691
- Task("Generate tests", "Create tests and store in memory at aqe/test-plan/generated", "qe-test-generator")
1692
-
1693
- // Test executor reads from memory
1694
- Task("Execute tests", "Read test plan from aqe/test-plan/generated and execute", "qe-test-executor")
1695
-
1696
- // Coverage analyzer processes results
1697
- Task("Analyze coverage", "Check coverage from aqe/coverage/results", "qe-coverage-analyzer")
1698
- \\\`\\\`\\\`
1699
-
1700
- ## 💡 Best Practices
1701
-
1702
- 1. **Use Task Tool**: Claude Code's Task tool is the primary way to spawn agents
1703
- 2. **Batch Operations**: Always spawn multiple related agents in a single message
1704
- 3. **Memory Keys**: Use the \\\`aqe/*\\\` namespace for agent coordination
1705
- 4. **AQE Hooks**: Agents automatically use native AQE hooks for coordination (100-500x faster)
1706
- 5. **Parallel Execution**: Leverage concurrent agent execution for speed
1707
-
1708
- ## 🆘 Troubleshooting
1709
-
1710
- ### Check MCP Connection
1711
- \\\`\\\`\\\`bash
1712
- claude mcp list
1713
- \\\`\\\`\\\`
1714
-
1715
- ### View Agent Definitions
1716
- \\\`\\\`\\\`bash
1717
- ls -la .claude/agents/
1718
- \\\`\\\`\\\`
1719
-
1720
- ### Check Fleet Status
1721
- \\\`\\\`\\\`bash
1722
- aqe status --verbose
1723
- \\\`\\\`\\\`
1724
-
1725
- ### View Logs
1726
- \\\`\\\`\\\`bash
1727
- tail -f .agentic-qe/logs/fleet.log
1728
- \\\`\\\`\\\`
1729
-
1730
- ---
1731
-
1732
- **Generated by**: Agentic QE Fleet v${PACKAGE_VERSION}
1733
- **Initialization Date**: ${new Date().toISOString()}
1734
- **Fleet Topology**: ${config.topology}
1735
- `;
1335
+
1336
+ ## 🤖 Agentic Quality Engineering Fleet
1337
+
1338
+ This project uses the **Agentic QE Fleet** - a distributed swarm of ${agentCount} AI agents for comprehensive software testing and quality assurance.
1339
+
1340
+ ### Available Agents
1341
+
1342
+ #### Core Testing (5 agents)
1343
+ - **qe-test-generator**: AI-powered test generation with sublinear optimization
1344
+ - **qe-test-executor**: Multi-framework test execution with parallel processing
1345
+ - **qe-coverage-analyzer**: Real-time gap detection with O(log n) algorithms
1346
+ - **qe-quality-gate**: Intelligent quality gate with risk assessment
1347
+ - **qe-quality-analyzer**: Comprehensive quality metrics analysis
1348
+
1349
+ #### Performance & Security (2 agents)
1350
+ - **qe-performance-tester**: Load testing with k6, JMeter, Gatling integration
1351
+ - **qe-security-scanner**: Multi-layer security with SAST/DAST scanning
1352
+
1353
+ #### Strategic Planning (3 agents)
1354
+ - **qe-requirements-validator**: INVEST criteria validation and BDD generation
1355
+ - **qe-production-intelligence**: Production data to test scenarios conversion
1356
+ - **qe-fleet-commander**: Hierarchical fleet coordination (50+ agents)
1357
+
1358
+ #### Deployment (1 agent)
1359
+ - **qe-deployment-readiness**: Multi-factor risk assessment for deployments
1360
+
1361
+ #### Advanced Testing (4 agents)
1362
+ - **qe-regression-risk-analyzer**: Smart test selection with ML patterns
1363
+ - **qe-test-data-architect**: High-speed realistic data generation (10k+ records/sec)
1364
+ - **qe-api-contract-validator**: Breaking change detection across API versions
1365
+ - **qe-flaky-test-hunter**: Statistical flakiness detection and auto-stabilization
1366
+
1367
+ #### Specialized (2 agents)
1368
+ - **qe-visual-tester**: Visual regression with AI-powered comparison
1369
+ - **qe-chaos-engineer**: Resilience testing with controlled fault injection
1370
+
1371
+ ## 🚀 Quick Start
1372
+
1373
+ ### Using Agents via Claude Code Task Tool (Recommended)
1374
+
1375
+ \\\`\\\`\\\`javascript
1376
+ // Spawn agents directly in Claude Code
1377
+ Task("Generate tests", "Create comprehensive test suite for UserService", "qe-test-generator")
1378
+ Task("Analyze coverage", "Find gaps using O(log n) algorithms", "qe-coverage-analyzer")
1379
+ Task("Quality check", "Run quality gate validation", "qe-quality-gate")
1380
+ \\\`\\\`\\\`
1381
+
1382
+ ### Using MCP Tools
1383
+
1384
+ \\\`\\\`\\\`bash
1385
+ # Check MCP connection
1386
+ claude mcp list
1387
+ # Should show: agentic-qe: npm run mcp:start - ✓ Connected
1388
+
1389
+ # Use MCP tools in Claude Code
1390
+ mcp__agentic_qe__test_generate({ type: "unit", framework: "${config.frameworks?.[0] || 'jest'}" })
1391
+ mcp__agentic_qe__test_execute({ parallel: true, coverage: true })
1392
+ mcp__agentic_qe__quality_analyze({ scope: "full" })
1393
+ \\\`\\\`\\\`
1394
+
1395
+ ### Using CLI
1396
+
1397
+ \\\`\\\`\\\`bash
1398
+ # Quick commands
1399
+ aqe test <module-name> # Generate tests
1400
+ aqe coverage # Analyze coverage
1401
+ aqe quality # Run quality gate
1402
+ aqe status # Check fleet status
1403
+ \\\`\\\`\\\`
1404
+
1405
+ ## 🔄 Agent Coordination
1406
+
1407
+ All agents coordinate through **AQE hooks** (Agentic QE native hooks - zero external dependencies, 100-500x faster):
1408
+
1409
+ ### Automatic Lifecycle Hooks
1410
+
1411
+ Agents extend \\\`BaseAgent\\\` and override lifecycle methods:
1412
+
1413
+ \\\`\\\`\\\`typescript
1414
+ protected async onPreTask(data: { assignment: TaskAssignment }): Promise<void> {
1415
+ // Load context before task execution
1416
+ const context = await this.memoryStore.retrieve('aqe/context', {
1417
+ partition: 'coordination'
1418
+ });
1419
+
1420
+ this.logger.info('Pre-task hook complete');
1421
+ }
1422
+
1423
+ protected async onPostTask(data: { assignment: TaskAssignment; result: any }): Promise<void> {
1424
+ // Store results after task completion
1425
+ await this.memoryStore.store('aqe/' + this.agentId.type + '/results', data.result, {
1426
+ partition: 'agent_results',
1427
+ ttl: 86400 // 24 hours
1428
+ });
1429
+
1430
+ // Emit completion event
1431
+ this.eventBus.emit('task:completed', {
1432
+ agentId: this.agentId,
1433
+ result: data.result
1434
+ });
1435
+
1436
+ this.logger.info('Post-task hook complete');
1437
+ }
1438
+
1439
+ protected async onTaskError(data: { assignment: TaskAssignment; error: Error }): Promise<void> {
1440
+ // Handle task errors
1441
+ await this.memoryStore.store('aqe/errors/' + data.assignment.id, {
1442
+ error: data.error.message,
1443
+ stack: data.error.stack,
1444
+ timestamp: Date.now()
1445
+ }, {
1446
+ partition: 'errors',
1447
+ ttl: 604800 // 7 days
1448
+ });
1449
+
1450
+ this.logger.error('Task failed', { error: data.error });
1451
+ }
1452
+ \\\`\\\`\\\`
1453
+
1454
+ ### Performance Comparison
1455
+
1456
+ | Feature | AQE Hooks | External Hooks |
1457
+ |---------|-----------|----------------|
1458
+ | **Speed** | <1ms | 100-500ms |
1459
+ | **Dependencies** | Zero | External package |
1460
+ | **Type Safety** | Full TypeScript | Shell strings |
1461
+ | **Integration** | Direct API | Shell commands |
1462
+ | **Performance** | 100-500x faster | Baseline |
1463
+
1464
+ ## 📋 Memory Namespace
1465
+
1466
+ Agents share state through the **\\\`aqe/*\\\` memory namespace**:
1467
+
1468
+ - \\\`aqe/test-plan/*\\\` - Test planning and requirements
1469
+ - \\\`aqe/coverage/*\\\` - Coverage analysis and gaps
1470
+ - \\\`aqe/quality/*\\\` - Quality metrics and gates
1471
+ - \\\`aqe/performance/*\\\` - Performance test results
1472
+ - \\\`aqe/security/*\\\` - Security scan findings
1473
+ - \\\`aqe/swarm/coordination\\\` - Cross-agent coordination
1474
+
1475
+ ## 🎯 Fleet Configuration
1476
+
1477
+ **Topology**: ${config.topology}
1478
+ **Max Agents**: ${config.maxAgents}
1479
+ **Testing Focus**: ${config.testingFocus?.join(', ') || 'All areas'}
1480
+ **Environments**: ${config.environments?.join(', ') || 'Not specified'}
1481
+ **Frameworks**: ${config.frameworks?.join(', ') || 'jest'}
1482
+
1483
+ ## 💰 Multi-Model Router (v${PACKAGE_VERSION})
1484
+
1485
+ **Status**: ${config.routing?.enabled ? '✅ Enabled' : '⚠️ Disabled (opt-in)'}
1486
+
1487
+ The Multi-Model Router provides **70-81% cost savings** by intelligently selecting AI models based on task complexity.
1488
+
1489
+ ### Features
1490
+
1491
+ - ✅ Intelligent model selection (GPT-3.5, GPT-4, Claude Sonnet 4.5, Claude Haiku)
1492
+ - ✅ Real-time cost tracking and aggregation
1493
+ - ✅ Automatic fallback chains for resilience
1494
+ - ✅ Feature flags for safe rollout
1495
+ - ✅ Zero breaking changes (disabled by default)
1496
+
1497
+ ### Enabling Routing
1498
+
1499
+ **Option 1: Via Configuration**
1500
+ \\\`\\\`\\\`json
1501
+ // .agentic-qe/config/routing.json
1502
+ {
1503
+ "multiModelRouter": {
1504
+ "enabled": true
1505
+ }
1506
+ }
1507
+ \\\`\\\`\\\`
1508
+
1509
+ **Option 2: Via Environment Variable**
1510
+ \\\`\\\`\\\`bash
1511
+ export AQE_ROUTING_ENABLED=true
1512
+ \\\`\\\`\\\`
1513
+
1514
+ ### Model Selection Rules
1515
+
1516
+ | Task Complexity | Model | Est. Cost | Use Case |
1517
+ |----------------|-------|-----------|----------|
1518
+ | **Simple** | GPT-3.5 | $0.0004 | Unit tests, basic validation |
1519
+ | **Moderate** | GPT-3.5 | $0.0008 | Integration tests, mocks |
1520
+ | **Complex** | GPT-4 | $0.0048 | Property-based, edge cases |
1521
+ | **Critical** | Claude Sonnet 4.5 | $0.0065 | Security, architecture review |
1522
+
1523
+ ### Cost Savings Example
1524
+
1525
+ **Before Routing** (always GPT-4):
1526
+ - 100 simple tasks: $0.48
1527
+ - 50 complex tasks: $0.24
1528
+ - **Total**: $0.72
1529
+
1530
+ **After Routing**:
1531
+ - 100 simple → GPT-3.5: $0.04
1532
+ - 50 complex → GPT-4: $0.24
1533
+ - **Total**: $0.28
1534
+ - **Savings**: $0.44 (61%)
1535
+
1536
+ ### Monitoring Costs
1537
+
1538
+ \\\`\\\`\\\`bash
1539
+ # View cost dashboard
1540
+ aqe routing dashboard
1541
+
1542
+ # Export cost report
1543
+ aqe routing report --format json
1544
+
1545
+ # Check savings
1546
+ aqe routing stats
1547
+ \\\`\\\`\\\`
1548
+
1549
+ ## 📊 Streaming Progress (v${PACKAGE_VERSION})
1550
+
1551
+ **Status**: ${config.streaming?.enabled ? '✅ Enabled' : '⚠️ Disabled'}
1552
+
1553
+ Real-time progress updates for long-running operations using AsyncGenerator pattern.
1554
+
1555
+ ### Features
1556
+
1557
+ - ✅ Real-time progress percentage
1558
+ - ✅ Current operation visibility
1559
+ - ✅ for-await-of compatibility
1560
+ - ✅ Backward compatible (non-streaming still works)
1561
+
1562
+ ### Example Usage
1563
+
1564
+ \\\`\\\`\\\`javascript
1565
+ // Using streaming MCP tool
1566
+ const handler = new TestExecuteStreamHandler();
1567
+
1568
+ for await (const event of handler.execute(params)) {
1569
+ if (event.type === 'progress') {
1570
+ console.log(\\\`Progress: \\\${event.percent}% - \\\${event.message}\\\`);
1571
+ } else if (event.type === 'result') {
1572
+ console.log('Completed:', event.data);
1573
+ }
1574
+ }
1575
+ \\\`\\\`\\\`
1576
+
1577
+ ### Supported Operations
1578
+
1579
+ - ✅ Test execution (test-by-test progress)
1580
+ - ✅ Coverage analysis (incremental gap detection)
1581
+ - ⚠️ Test generation (coming in v1.1.0)
1582
+ - ⚠️ Security scanning (coming in v1.1.0)
1583
+
1584
+ ## 🎯 Claude Code Skills Integration
1585
+
1586
+ This fleet includes **37 specialized QE skills** that agents can use:
1587
+
1588
+ ### Phase 1: Original Quality Engineering Skills (18 skills)
1589
+
1590
+ #### Core Testing (3 skills)
1591
+ - **agentic-quality-engineering**: Using AI agents as force multipliers in quality work - autonomous testing systems, PACT principles, scaling quality engineering with intelligent agents
1592
+ - **context-driven-testing**: Apply context-driven testing principles where practices are chosen based on project context, not universal "best practices"
1593
+ - **holistic-testing-pact**: Apply the Holistic Testing Model evolved with PACT (Proactive, Autonomous, Collaborative, Targeted) principles
1594
+
1595
+ #### Testing Methodologies (4 skills)
1596
+ - **tdd-london-chicago**: Apply both London and Chicago school TDD approaches - understanding different TDD philosophies and choosing the right testing style
1597
+ - **xp-practices**: Apply XP practices including pair programming, ensemble programming, continuous integration, and sustainable pace
1598
+ - **risk-based-testing**: Focus testing effort on highest-risk areas using risk assessment and prioritization
1599
+ - **test-automation-strategy**: Design and implement comprehensive test automation strategies
1600
+
1601
+ #### Testing Techniques (4 skills)
1602
+ - **api-testing-patterns**: Comprehensive API testing patterns including contract testing, REST/GraphQL testing, and integration testing
1603
+ - **exploratory-testing-advanced**: Advanced exploratory testing techniques with Session-Based Test Management (SBTM), RST heuristics, and test tours
1604
+ - **performance-testing**: Test application performance, scalability, and resilience with load testing and stress testing
1605
+ - **security-testing**: Test for security vulnerabilities using OWASP principles and security testing techniques
1606
+
1607
+ #### Code Quality (3 skills)
1608
+ - **code-review-quality**: Conduct context-driven code reviews focusing on quality, testability, and maintainability
1609
+ - **refactoring-patterns**: Apply safe refactoring patterns to improve code structure without changing behavior
1610
+ - **quality-metrics**: Measure quality effectively with actionable metrics and KPIs
1611
+
1612
+ #### Communication (3 skills)
1613
+ - **bug-reporting-excellence**: Write high-quality bug reports that get fixed quickly - includes templates, examples, and best practices
1614
+ - **technical-writing**: Create clear, concise technical documentation
1615
+ - **consultancy-practices**: Apply effective software quality consultancy practices
1616
+
1617
+ ### Phase 2: Expanded QE Skills Library (17 skills)
1618
+
1619
+ #### Testing Methodologies (6 skills)
1620
+ - **regression-testing**: Strategic regression testing with test selection, impact analysis, and continuous regression management
1621
+ - **shift-left-testing**: Move testing activities earlier in development lifecycle with TDD, BDD, and design for testability
1622
+ - **shift-right-testing**: Testing in production with feature flags, canary deployments, synthetic monitoring, and chaos engineering
1623
+ - **test-design-techniques**: Advanced test design using equivalence partitioning, boundary value analysis, and decision tables
1624
+ - **mutation-testing**: Test quality validation through mutation testing and measuring test suite effectiveness
1625
+ - **test-data-management**: Realistic test data generation, GDPR compliance, and data masking strategies
1626
+
1627
+ #### Specialized Testing (9 skills)
1628
+ - **accessibility-testing**: WCAG 2.2 compliance testing, screen reader validation, and inclusive design verification
1629
+ - **mobile-testing**: Comprehensive mobile testing for iOS and Android including gestures, sensors, and device fragmentation
1630
+ - **database-testing**: Database schema validation, data integrity testing, migration testing, and query performance
1631
+ - **contract-testing**: Consumer-driven contract testing for microservices using Pact and API versioning
1632
+ - **chaos-engineering-resilience**: Chaos engineering principles, controlled failure injection, and resilience testing
1633
+ - **compatibility-testing**: Cross-browser, cross-platform, and cross-device compatibility testing
1634
+ - **localization-testing**: Internationalization (i18n) and localization (l10n) testing for global products
1635
+ - **compliance-testing**: Regulatory compliance testing for GDPR, CCPA, HIPAA, SOC2, and PCI-DSS
1636
+ - **visual-testing-advanced**: Advanced visual regression testing with AI-powered screenshot comparison and UI validation
1637
+
1638
+ #### Testing Infrastructure (2 skills)
1639
+ - **test-environment-management**: Manage test environments, infrastructure as code, and environment provisioning
1640
+ - **test-reporting-analytics**: Comprehensive test reporting with metrics, trends, and actionable insights
1641
+
1642
+ ### Using Skills
1643
+
1644
+ #### Via CLI
1645
+ \\\`\\\`\\\`bash
1646
+ # List all available skills
1647
+ aqe skills list
1648
+
1649
+ # Search for specific skills
1650
+ aqe skills search "testing"
1651
+
1652
+ # Show skill details
1653
+ aqe skills show agentic-quality-engineering
1654
+
1655
+ # Show skill statistics
1656
+ aqe skills stats
1657
+ \\\`\\\`\\\`
1658
+
1659
+ #### Via Skill Tool in Claude Code
1660
+ \\\`\\\`\\\`javascript
1661
+ // Execute a skill
1662
+ Skill("agentic-quality-engineering")
1663
+ Skill("tdd-london-chicago")
1664
+ Skill("api-testing-patterns")
1665
+ \\\`\\\`\\\`
1666
+
1667
+ #### Integration with Agents
1668
+ All QE agents automatically have access to relevant skills based on their specialization:
1669
+ - **Test generators** use: agentic-quality-engineering, api-testing-patterns, tdd-london-chicago
1670
+ - **Coverage analyzers** use: agentic-quality-engineering, quality-metrics, risk-based-testing
1671
+ - **Flaky test hunters** use: agentic-quality-engineering, exploratory-testing-advanced
1672
+ - **Performance testers** use: agentic-quality-engineering, performance-testing, quality-metrics
1673
+ - **Security scanners** use: agentic-quality-engineering, security-testing, risk-based-testing
1674
+
1675
+ ## 🧠 Q-Learning Integration (Phase 2)
1676
+
1677
+ All agents automatically learn from task execution through Q-learning:
1678
+
1679
+ ### Observability
1680
+ \\\`\\\`\\\`bash
1681
+ # Check learning status
1682
+ aqe learn status --agent test-gen
1683
+
1684
+ # View learned patterns
1685
+ aqe learn history --agent test-gen --limit 50
1686
+
1687
+ # Export learning data
1688
+ aqe learn export --agent test-gen --output learning.json
1689
+ \\\`\\\`\\\`
1690
+
1691
+ ### Pattern Management
1692
+ \\\`\\\`\\\`bash
1693
+ # List test patterns
1694
+ aqe patterns list --framework jest
1695
+
1696
+ # Search patterns
1697
+ aqe patterns search "api validation"
1698
+
1699
+ # Extract patterns from tests
1700
+ aqe patterns extract ./tests --framework jest
1701
+ \\\`\\\`\\\`
1702
+
1703
+ ### Improvement Loop
1704
+ \\\`\\\`\\\`bash
1705
+ # Start continuous improvement
1706
+ aqe improve start
1707
+
1708
+ # Check improvement status
1709
+ aqe improve status
1710
+
1711
+ # Run single improvement cycle
1712
+ aqe improve cycle
1713
+ \\\`\\\`\\\`
1714
+
1715
+ ## 📚 Documentation
1716
+
1717
+ - **Agent Definitions**: \\\`.claude/agents/\\\` - ${agentCount} specialized QE agents (18 main + 8 TDD subagents)
1718
+ - **Subagent Definitions**: \\\`.claude/agents/subagents/\\\` - 8 specialized TDD subagents for test generation workflow
1719
+ - **Skills**: \\\`.claude/skills/\\\` - 37 specialized QE skills for agents (Phase 1: 18 + Phase 2: 16 + Phase 3: 3)
1720
+ - **Fleet Config**: \\\`.agentic-qe/config/fleet.json\\\`
1721
+ - **Routing Config**: \\\`.agentic-qe/config/routing.json\\\` (Multi-Model Router settings)
1722
+ - **AQE Hooks Config**: \\\`.agentic-qe/config/aqe-hooks.json\\\` (zero dependencies, 100-500x faster)
1723
+
1724
+ ## 🔧 Advanced Usage
1725
+
1726
+ ### Parallel Agent Execution
1727
+
1728
+ \\\`\\\`\\\`javascript
1729
+ // Execute multiple agents concurrently
1730
+ Task("Test Generation", "Generate unit tests", "qe-test-generator")
1731
+ Task("Coverage Analysis", "Analyze current coverage", "qe-coverage-analyzer")
1732
+ Task("Security Scan", "Run security checks", "qe-security-scanner")
1733
+ Task("Performance Test", "Load test critical paths", "qe-performance-tester")
1734
+ \\\`\\\`\\\`
1735
+
1736
+ ### Agent Coordination Example
1737
+
1738
+ \\\`\\\`\\\`javascript
1739
+ // Test generator stores results
1740
+ Task("Generate tests", "Create tests and store in memory at aqe/test-plan/generated", "qe-test-generator")
1741
+
1742
+ // Test executor reads from memory
1743
+ Task("Execute tests", "Read test plan from aqe/test-plan/generated and execute", "qe-test-executor")
1744
+
1745
+ // Coverage analyzer processes results
1746
+ Task("Analyze coverage", "Check coverage from aqe/coverage/results", "qe-coverage-analyzer")
1747
+ \\\`\\\`\\\`
1748
+
1749
+ ## 💡 Best Practices
1750
+
1751
+ 1. **Use Task Tool**: Claude Code's Task tool is the primary way to spawn agents
1752
+ 2. **Batch Operations**: Always spawn multiple related agents in a single message
1753
+ 3. **Memory Keys**: Use the \\\`aqe/*\\\` namespace for agent coordination
1754
+ 4. **AQE Hooks**: Agents automatically use native AQE hooks for coordination (100-500x faster)
1755
+ 5. **Parallel Execution**: Leverage concurrent agent execution for speed
1756
+
1757
+ ## 🆘 Troubleshooting
1758
+
1759
+ ### Check MCP Connection
1760
+ \\\`\\\`\\\`bash
1761
+ claude mcp list
1762
+ \\\`\\\`\\\`
1763
+
1764
+ ### View Agent Definitions
1765
+ \\\`\\\`\\\`bash
1766
+ ls -la .claude/agents/
1767
+ \\\`\\\`\\\`
1768
+
1769
+ ### Check Fleet Status
1770
+ \\\`\\\`\\\`bash
1771
+ aqe status --verbose
1772
+ \\\`\\\`\\\`
1773
+
1774
+ ### View Logs
1775
+ \\\`\\\`\\\`bash
1776
+ tail -f .agentic-qe/logs/fleet.log
1777
+ \\\`\\\`\\\`
1778
+
1779
+ ---
1780
+
1781
+ **Generated by**: Agentic QE Fleet v${PACKAGE_VERSION}
1782
+ **Initialization Date**: ${new Date().toISOString()}
1783
+ **Fleet Topology**: ${config.topology}
1784
+ `; */ // End of old template comment
1736
1785
  // Write CLAUDE.md based on append strategy (v1.3.7 fix)
1737
1786
  let finalContent;
1738
1787
  if (exists && existingContent) {