claude-flow-novice 1.3.6 → 1.5.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 (347) hide show
  1. package/.claude/agents/analysis/code-analyzer.md +3 -20
  2. package/.claude/agents/analysis/code-review/analyze-code-quality.md +1 -1
  3. package/.claude/agents/analyst.md +208 -550
  4. package/.claude/agents/architect.md +136 -469
  5. package/.claude/agents/architecture/system-architect.md +20 -1
  6. package/.claude/agents/architecture/system-design/arch-system-design.md +1 -1
  7. package/.claude/agents/base-template-generator.md +24 -1
  8. package/.claude/agents/coder.md +87 -303
  9. package/.claude/agents/consensus/byzantine-coordinator.md +4 -21
  10. package/.claude/agents/consensus/consensus-builder.md +3 -20
  11. package/.claude/agents/consensus/crdt-synchronizer.md +4 -21
  12. package/.claude/agents/consensus/gossip-coordinator.md +4 -21
  13. package/.claude/agents/consensus/performance-benchmarker.md +4 -21
  14. package/.claude/agents/consensus/quorum-manager.md +4 -21
  15. package/.claude/agents/consensus/raft-manager.md +4 -21
  16. package/.claude/agents/consensus/security-manager.md +4 -21
  17. package/.claude/agents/coordinator.md +22 -11
  18. package/.claude/agents/data/ml/data-ml-model.md +2 -2
  19. package/.claude/agents/development/backend/dev-backend-api.md +2 -2
  20. package/.claude/agents/devops/ci-cd/ops-cicd-github.md +2 -2
  21. package/.claude/agents/devops/devops-engineer.md +134 -402
  22. package/.claude/agents/documentation/api-docs/docs-api-openapi.md +2 -2
  23. package/.claude/agents/github/code-review-swarm.md +1 -1
  24. package/.claude/agents/github/github-specialist.md +856 -0
  25. package/.claude/agents/github/pr-manager.md +1 -1
  26. package/.claude/agents/github/release-manager.md +1 -1
  27. package/.claude/agents/neural/neural-pattern-agent.md +762 -0
  28. package/.claude/agents/optimization/benchmark-suite.md +1 -1
  29. package/.claude/agents/optimization/perf-analyzer.md +1 -1
  30. package/.claude/agents/optimization/performance-monitor.md +1 -1
  31. package/.claude/agents/planner.md +135 -0
  32. package/.claude/agents/researcher.md +22 -9
  33. package/.claude/agents/reviewer.md +291 -0
  34. package/.claude/agents/security/security-specialist.md +1 -1
  35. package/.claude/agents/sparc/architecture.md +1 -1
  36. package/.claude/agents/sparc/pseudocode.md +1 -1
  37. package/.claude/agents/sparc/refinement.md +1 -1
  38. package/.claude/agents/sparc/specification.md +1 -1
  39. package/.claude/agents/specialized/mobile/spec-mobile-react-native.md +2 -2
  40. package/.claude/agents/tester.md +21 -11
  41. package/.claude/agents/testing/unit/tdd-london-swarm.md +1 -1
  42. package/.claude/agents/testing/validation/production-validator.md +1 -1
  43. package/.claude/commands/claude-soul.js +1 -1
  44. package/.claude/commands/fullstack.md +134 -0
  45. package/.claude/commands/index.js +4 -0
  46. package/.claude/hooks.json +12 -15
  47. package/{.claude → .claude-flow-novice/.claude}/agents/MIGRATION_SUMMARY.md +1 -1
  48. package/.claude-flow-novice/.claude/agents/analysis/code-analyzer.md +192 -0
  49. package/.claude-flow-novice/.claude/agents/analysis/code-review/analyze-code-quality.md +180 -0
  50. package/.claude-flow-novice/.claude/agents/analyst.md +300 -0
  51. package/.claude-flow-novice/.claude/agents/architect.md +557 -0
  52. package/.claude-flow-novice/.claude/agents/architecture/system-architect.md +630 -0
  53. package/.claude-flow-novice/.claude/agents/architecture/system-design/arch-system-design.md +156 -0
  54. package/.claude-flow-novice/.claude/agents/base-template-generator.md +65 -0
  55. package/.claude-flow-novice/.claude/agents/coder.md +180 -0
  56. package/.claude-flow-novice/.claude/agents/consensus/byzantine-coordinator.md +46 -0
  57. package/.claude-flow-novice/.claude/agents/consensus/consensus-builder.md +225 -0
  58. package/.claude-flow-novice/.claude/agents/consensus/crdt-synchronizer.md +980 -0
  59. package/.claude-flow-novice/.claude/agents/consensus/gossip-coordinator.md +46 -0
  60. package/.claude-flow-novice/.claude/agents/consensus/performance-benchmarker.md +834 -0
  61. package/.claude-flow-novice/.claude/agents/consensus/quorum-manager.md +806 -0
  62. package/.claude-flow-novice/.claude/agents/consensus/raft-manager.md +46 -0
  63. package/.claude-flow-novice/.claude/agents/consensus/security-manager.md +605 -0
  64. package/.claude-flow-novice/.claude/agents/coordinator.md +842 -0
  65. package/.claude-flow-novice/.claude/agents/data/ml/data-ml-model.md +193 -0
  66. package/.claude-flow-novice/.claude/agents/development/backend/dev-backend-api.md +142 -0
  67. package/.claude-flow-novice/.claude/agents/devops/ci-cd/ops-cicd-github.md +164 -0
  68. package/.claude-flow-novice/.claude/agents/devops/devops-engineer.md +638 -0
  69. package/.claude-flow-novice/.claude/agents/documentation/api-docs/docs-api-openapi.md +174 -0
  70. package/.claude-flow-novice/.claude/agents/github/code-review-swarm.md +538 -0
  71. package/.claude-flow-novice/.claude/agents/github/github-modes.md +173 -0
  72. package/.claude-flow-novice/.claude/agents/github/github-specialist.md +856 -0
  73. package/.claude-flow-novice/.claude/agents/github/issue-tracker.md +319 -0
  74. package/.claude-flow-novice/.claude/agents/github/multi-repo-swarm.md +553 -0
  75. package/.claude-flow-novice/.claude/agents/github/pr-manager.md +191 -0
  76. package/.claude-flow-novice/.claude/agents/github/project-board-sync.md +509 -0
  77. package/.claude-flow-novice/.claude/agents/github/release-manager.md +367 -0
  78. package/.claude-flow-novice/.claude/agents/github/release-swarm.md +583 -0
  79. package/.claude-flow-novice/.claude/agents/github/repo-architect.md +398 -0
  80. package/.claude-flow-novice/.claude/agents/github/swarm-issue.md +573 -0
  81. package/.claude-flow-novice/.claude/agents/github/swarm-pr.md +428 -0
  82. package/.claude-flow-novice/.claude/agents/github/sync-coordinator.md +452 -0
  83. package/.claude-flow-novice/.claude/agents/github/workflow-automation.md +635 -0
  84. package/.claude-flow-novice/.claude/agents/goal/goal-planner.md +73 -0
  85. package/.claude-flow-novice/.claude/agents/neural/neural-pattern-agent.md +762 -0
  86. package/.claude-flow-novice/.claude/agents/neural/safla-neural.md +74 -0
  87. package/.claude-flow-novice/.claude/agents/optimization/benchmark-suite.md +665 -0
  88. package/.claude-flow-novice/.claude/agents/optimization/load-balancer.md +431 -0
  89. package/.claude-flow-novice/.claude/agents/optimization/perf-analyzer.md +725 -0
  90. package/.claude-flow-novice/.claude/agents/optimization/performance-monitor.md +672 -0
  91. package/.claude-flow-novice/.claude/agents/optimization/resource-allocator.md +674 -0
  92. package/.claude-flow-novice/.claude/agents/optimization/topology-optimizer.md +808 -0
  93. package/.claude-flow-novice/.claude/agents/planner.md +135 -0
  94. package/.claude-flow-novice/.claude/agents/researcher.md +185 -0
  95. package/.claude-flow-novice/.claude/agents/reviewer.md +291 -0
  96. package/.claude-flow-novice/.claude/agents/security/security-specialist.md +978 -0
  97. package/.claude-flow-novice/.claude/agents/sparc/architecture.md +472 -0
  98. package/.claude-flow-novice/.claude/agents/sparc/pseudocode.md +318 -0
  99. package/.claude-flow-novice/.claude/agents/sparc/refinement.md +525 -0
  100. package/.claude-flow-novice/.claude/agents/sparc/specification.md +276 -0
  101. package/.claude-flow-novice/.claude/agents/specialized/mobile/spec-mobile-react-native.md +226 -0
  102. package/.claude-flow-novice/.claude/agents/sublinear/consciousness-evolution-agent.md +499 -0
  103. package/.claude-flow-novice/.claude/agents/sublinear/matrix-solver-agent.md +113 -0
  104. package/.claude-flow-novice/.claude/agents/sublinear/nanosecond-scheduler-agent.md +644 -0
  105. package/.claude-flow-novice/.claude/agents/sublinear/pagerank-agent.md +699 -0
  106. package/.claude-flow-novice/.claude/agents/sublinear/phi-calculator-agent.md +749 -0
  107. package/.claude-flow-novice/.claude/agents/sublinear/psycho-symbolic-agent.md +543 -0
  108. package/.claude-flow-novice/.claude/agents/sublinear/sublinear.md +816 -0
  109. package/.claude-flow-novice/.claude/agents/sublinear/temporal-advantage-agent.md +360 -0
  110. package/.claude-flow-novice/.claude/agents/swarm/adaptive-coordinator-enhanced.md +746 -0
  111. package/.claude-flow-novice/.claude/agents/swarm/adaptive-coordinator.md +396 -0
  112. package/.claude-flow-novice/.claude/agents/swarm/hierarchical-coordinator.md +300 -0
  113. package/.claude-flow-novice/.claude/agents/swarm/mesh-coordinator.md +435 -0
  114. package/.claude-flow-novice/.claude/agents/templates/automation-smart-agent.md +205 -0
  115. package/.claude-flow-novice/.claude/agents/templates/coordinator-swarm-init.md +90 -0
  116. package/.claude-flow-novice/.claude/agents/templates/github-pr-manager.md +177 -0
  117. package/.claude-flow-novice/.claude/agents/templates/implementer-sparc-coder.md +259 -0
  118. package/.claude-flow-novice/.claude/agents/templates/memory-coordinator.md +187 -0
  119. package/.claude-flow-novice/.claude/agents/templates/migration-plan.md +746 -0
  120. package/.claude-flow-novice/.claude/agents/templates/orchestrator-task.md +139 -0
  121. package/.claude-flow-novice/.claude/agents/templates/performance-analyzer.md +199 -0
  122. package/.claude-flow-novice/.claude/agents/templates/sparc-coordinator.md +183 -0
  123. package/.claude-flow-novice/.claude/agents/tester.md +663 -0
  124. package/.claude-flow-novice/.claude/agents/testing/e2e/playwright-agent.md +249 -0
  125. package/.claude-flow-novice/.claude/agents/testing/unit/tdd-london-swarm.md +244 -0
  126. package/.claude-flow-novice/.claude/agents/testing/validation/production-validator.md +395 -0
  127. package/.claude-flow-novice/dist/index.js +12 -24
  128. package/.claude-flow-novice/dist/index.js.map +1 -0
  129. package/.claude-flow-novice/dist/src/agents/agent-manager.js +123 -69
  130. package/.claude-flow-novice/dist/src/agents/agent-manager.js.map +1 -1
  131. package/.claude-flow-novice/dist/src/agents/github/utils/hook-integration.js +7 -7
  132. package/.claude-flow-novice/dist/src/agents/github/utils/hook-integration.js.map +1 -1
  133. package/.claude-flow-novice/dist/src/agents/stage3-integration-validator.js +485 -0
  134. package/.claude-flow-novice/dist/src/agents/stage3-integration-validator.js.map +1 -0
  135. package/.claude-flow-novice/dist/src/agents/unified-ultra-fast-agent-manager.js +630 -0
  136. package/.claude-flow-novice/dist/src/agents/unified-ultra-fast-agent-manager.js.map +1 -0
  137. package/.claude-flow-novice/dist/src/cli/commands/agent.js +1 -1
  138. package/.claude-flow-novice/dist/src/cli/commands/agent.js.map +1 -1
  139. package/.claude-flow-novice/dist/src/cli/commands/config-integration.js +6 -6
  140. package/.claude-flow-novice/dist/src/cli/commands/enterprise.js +18 -18
  141. package/.claude-flow-novice/dist/src/cli/commands/enterprise.js.map +1 -1
  142. package/.claude-flow-novice/dist/src/cli/commands/goal-init.js +4 -4
  143. package/.claude-flow-novice/dist/src/cli/commands/help-new.js +23 -23
  144. package/.claude-flow-novice/dist/src/cli/commands/help-new.js.map +1 -1
  145. package/.claude-flow-novice/dist/src/cli/commands/help.js +74 -74
  146. package/.claude-flow-novice/dist/src/cli/commands/help.js.map +1 -1
  147. package/.claude-flow-novice/dist/src/cli/commands/hive-mind/pause.js +2 -2
  148. package/.claude-flow-novice/dist/src/cli/commands/hive-mind/pause.js.map +1 -1
  149. package/.claude-flow-novice/dist/src/cli/commands/hive.js +4 -4
  150. package/.claude-flow-novice/dist/src/cli/commands/index.js +103 -132
  151. package/.claude-flow-novice/dist/src/cli/commands/index.js.map +1 -1
  152. package/.claude-flow-novice/dist/src/cli/commands/mcp.js +1 -1
  153. package/.claude-flow-novice/dist/src/cli/commands/migrate.js +4 -4
  154. package/.claude-flow-novice/dist/src/cli/commands/migrate.js.map +1 -1
  155. package/.claude-flow-novice/dist/src/cli/commands/monitor.js +1 -1
  156. package/.claude-flow-novice/dist/src/cli/commands/neural-init.js +4 -4
  157. package/.claude-flow-novice/dist/src/cli/commands/ruv-swarm.js +8 -8
  158. package/.claude-flow-novice/dist/src/cli/commands/sparc.js +12 -12
  159. package/.claude-flow-novice/dist/src/cli/commands/sparc.js.map +1 -1
  160. package/.claude-flow-novice/dist/src/cli/commands/start/start-command.js +3 -3
  161. package/.claude-flow-novice/dist/src/cli/commands/status.js +1 -1
  162. package/.claude-flow-novice/dist/src/cli/commands/swarm.js +7 -7
  163. package/.claude-flow-novice/dist/src/cli/commands/swarm.js.map +1 -1
  164. package/.claude-flow-novice/dist/src/cli/commands/verification.js +18 -18
  165. package/.claude-flow-novice/dist/src/cli/completion.js +54 -54
  166. package/.claude-flow-novice/dist/src/cli/completion.js.map +1 -1
  167. package/.claude-flow-novice/dist/src/cli/consolidated/ConsolidatedCLI.js +11 -11
  168. package/.claude-flow-novice/dist/src/cli/consolidated/ConsolidatedCLI.js.map +1 -1
  169. package/.claude-flow-novice/dist/src/cli/consolidated/core/CommandHandlers.js +31 -31
  170. package/.claude-flow-novice/dist/src/cli/consolidated/core/TierManager.js +39 -39
  171. package/.claude-flow-novice/dist/src/cli/consolidated/core/TierManager.js.map +1 -1
  172. package/.claude-flow-novice/dist/src/cli/consolidated/help/InteractiveHelp.js +25 -25
  173. package/.claude-flow-novice/dist/src/cli/consolidated/help/InteractiveHelp.js.map +1 -1
  174. package/.claude-flow-novice/dist/src/cli/consolidated/routing/CommandRouter.js +8 -8
  175. package/.claude-flow-novice/dist/src/cli/consolidated/routing/CommandRouter.js.map +1 -1
  176. package/.claude-flow-novice/dist/src/cli/consolidated/utils/IntelligentDefaults.js +6 -6
  177. package/.claude-flow-novice/dist/src/cli/consolidated/utils/IntelligentDefaults.js.map +1 -1
  178. package/.claude-flow-novice/dist/src/cli/consolidated/utils/PerformanceOptimizer.js +7 -7
  179. package/.claude-flow-novice/dist/src/cli/consolidated/utils/PerformanceOptimizer.js.map +1 -1
  180. package/.claude-flow-novice/dist/src/cli/index-remote.js +10 -10
  181. package/.claude-flow-novice/dist/src/cli/index.js +1 -1
  182. package/.claude-flow-novice/dist/src/cli/init/directory-structure.js +8 -8
  183. package/.claude-flow-novice/dist/src/cli/init/index.js +3 -3
  184. package/.claude-flow-novice/dist/src/cli/init/sparc-environment.js +67 -67
  185. package/.claude-flow-novice/dist/src/cli/init/swarm-commands.js +18 -18
  186. package/.claude-flow-novice/dist/src/cli/node-repl.js +2 -2
  187. package/.claude-flow-novice/dist/src/cli/repl.js +1 -1
  188. package/.claude-flow-novice/dist/src/cli/simple-cli.js +68 -68
  189. package/.claude-flow-novice/dist/src/cli/simple-cli.js.map +1 -1
  190. package/.claude-flow-novice/dist/src/cli/simple-commands/session-start-soul.js +271 -0
  191. package/.claude-flow-novice/dist/src/cli/simple-orchestrator.js +7 -7
  192. package/.claude-flow-novice/dist/src/cli/simple-orchestrator.js.map +1 -1
  193. package/.claude-flow-novice/dist/src/cli/ui/fallback-handler.js +7 -7
  194. package/.claude-flow-novice/dist/src/communication/enhanced-event-bus.js +816 -0
  195. package/.claude-flow-novice/dist/src/communication/enhanced-event-bus.js.map +1 -0
  196. package/.claude-flow-novice/dist/src/communication/failure-recovery-system.js +812 -0
  197. package/.claude-flow-novice/dist/src/communication/failure-recovery-system.js.map +1 -0
  198. package/.claude-flow-novice/dist/src/communication/optimized-serialization.js +369 -0
  199. package/.claude-flow-novice/dist/src/communication/optimized-serialization.js.map +1 -0
  200. package/.claude-flow-novice/dist/src/communication/performance-optimizations.js +526 -0
  201. package/.claude-flow-novice/dist/src/communication/performance-optimizations.js.map +1 -0
  202. package/.claude-flow-novice/dist/src/communication/performance-validator.js +532 -0
  203. package/.claude-flow-novice/dist/src/communication/performance-validator.js.map +1 -0
  204. package/.claude-flow-novice/dist/src/communication/priority-message-queue.js +525 -0
  205. package/.claude-flow-novice/dist/src/communication/priority-message-queue.js.map +1 -0
  206. package/.claude-flow-novice/dist/src/communication/shared-buffer-bus.js +218 -0
  207. package/.claude-flow-novice/dist/src/communication/shared-buffer-bus.js.map +1 -0
  208. package/.claude-flow-novice/dist/src/communication/ultra-fast-communication-bus.js +521 -0
  209. package/.claude-flow-novice/dist/src/communication/ultra-fast-communication-bus.js.map +1 -0
  210. package/.claude-flow-novice/dist/src/communication/ultra-fast-serialization.js +563 -0
  211. package/.claude-flow-novice/dist/src/communication/ultra-fast-serialization.js.map +1 -0
  212. package/.claude-flow-novice/dist/src/communication/websocket-cluster.js +344 -0
  213. package/.claude-flow-novice/dist/src/communication/websocket-cluster.js.map +1 -0
  214. package/.claude-flow-novice/dist/src/communication/zero-copy-structures.js +369 -0
  215. package/.claude-flow-novice/dist/src/communication/zero-copy-structures.js.map +1 -0
  216. package/.claude-flow-novice/dist/src/config/config-manager.js +1 -1
  217. package/.claude-flow-novice/dist/src/config/config-manager.js.map +1 -1
  218. package/.claude-flow-novice/dist/src/config/core/intelligent-configuration-manager.js +1 -1
  219. package/.claude-flow-novice/dist/src/config/integration/hooks-integration.js +6 -6
  220. package/.claude-flow-novice/dist/src/config/integration/hooks-integration.js.map +1 -1
  221. package/.claude-flow-novice/dist/src/config/migration/config-migration.js +1 -1
  222. package/.claude-flow-novice/dist/src/config/ruv-swarm-integration.js +1 -1
  223. package/.claude-flow-novice/dist/src/config/utils/zero-config-setup.js +1 -1
  224. package/.claude-flow-novice/dist/src/config/utils/zero-config-setup.js.map +1 -1
  225. package/.claude-flow-novice/dist/src/config/web-portal-config.js +0 -9
  226. package/.claude-flow-novice/dist/src/config/web-portal-config.js.map +1 -1
  227. package/.claude-flow-novice/dist/src/config/zero-config-setup.js +18 -18
  228. package/.claude-flow-novice/dist/src/config/zero-config-setup.js.map +1 -1
  229. package/.claude-flow-novice/dist/src/core/logger.js +33 -10
  230. package/.claude-flow-novice/dist/src/core/logger.js.map +1 -1
  231. package/.claude-flow-novice/dist/src/migration/index.js +1 -1
  232. package/.claude-flow-novice/dist/src/migration/index.js.map +1 -1
  233. package/.claude-flow-novice/dist/src/migration/migration-runner.js +4 -4
  234. package/.claude-flow-novice/dist/src/migration/migration-runner.js.map +1 -1
  235. package/.claude-flow-novice/dist/src/monitoring/agent-health-monitor.js +430 -0
  236. package/.claude-flow-novice/dist/src/monitoring/agent-health-monitor.js.map +1 -0
  237. package/.claude-flow-novice/dist/src/slash-commands/claude-soul.js +248 -365
  238. package/.claude-flow-novice/dist/src/slash-commands/register-all-commands.js +1 -1
  239. package/.claude-flow-novice/dist/src/swarm/claude-code-interface.js +1 -1
  240. package/.claude-flow-novice/dist/src/swarm/claude-flow-executor.js +1 -1
  241. package/.claude-flow-novice/dist/src/swarm/consensus-coordinator.js +471 -0
  242. package/.claude-flow-novice/dist/src/swarm/consensus-coordinator.js.map +1 -0
  243. package/.claude-flow-novice/dist/src/swarm/hive-mind-integration.js +1 -1
  244. package/.claude-flow-novice/dist/src/swarm/large-scale-coordinator.js +543 -0
  245. package/.claude-flow-novice/dist/src/swarm/large-scale-coordinator.js.map +1 -0
  246. package/.claude-flow-novice/dist/src/swarm/optimizations/connection-pool.js +1 -1
  247. package/.claude-flow-novice/dist/src/swarm/optimizations/optimized-executor.js +1 -1
  248. package/.claude-flow-novice/dist/src/swarm/types.js.map +1 -1
  249. package/.claude-flow-novice/dist/src/swarm-fullstack/integrations/communication-bridge.js +709 -0
  250. package/.claude-flow-novice/dist/src/swarm-fullstack/integrations/communication-bridge.js.map +1 -0
  251. package/.claude-flow-novice/dist/src/swarm-fullstack/testing/api-contract-validator.js +612 -0
  252. package/.claude-flow-novice/dist/src/swarm-fullstack/testing/api-contract-validator.js.map +1 -0
  253. package/.claude-flow-novice/dist/src/swarm-fullstack/testing/backend-test-orchestrator.js +679 -0
  254. package/.claude-flow-novice/dist/src/swarm-fullstack/testing/backend-test-orchestrator.js.map +1 -0
  255. package/.claude-flow-novice/dist/src/swarm-fullstack/testing/frontend-test-orchestrator.js +654 -0
  256. package/.claude-flow-novice/dist/src/swarm-fullstack/testing/frontend-test-orchestrator.js.map +1 -0
  257. package/.claude-flow-novice/dist/src/swarm-fullstack/testing/visual-regression.js +402 -0
  258. package/.claude-flow-novice/dist/src/swarm-fullstack/testing/visual-regression.js.map +1 -0
  259. package/.claude-flow-novice/dist/src/swarm-fullstack/workflows/convergence-detector.js +459 -0
  260. package/.claude-flow-novice/dist/src/swarm-fullstack/workflows/convergence-detector.js.map +1 -0
  261. package/.claude-flow-novice/dist/src/swarm-fullstack/workflows/fix-coordinator.js +513 -0
  262. package/.claude-flow-novice/dist/src/swarm-fullstack/workflows/fix-coordinator.js.map +1 -0
  263. package/.claude-flow-novice/dist/src/swarm-fullstack/workflows/index.js +19 -0
  264. package/.claude-flow-novice/dist/src/swarm-fullstack/workflows/index.js.map +1 -0
  265. package/.claude-flow-novice/dist/src/swarm-fullstack/workflows/iterative-build-test.js +568 -0
  266. package/.claude-flow-novice/dist/src/swarm-fullstack/workflows/iterative-build-test.js.map +1 -0
  267. package/.claude-flow-novice/dist/src/swarm-fullstack/workflows/regression-test-manager.js +418 -0
  268. package/.claude-flow-novice/dist/src/swarm-fullstack/workflows/regression-test-manager.js.map +1 -0
  269. package/.claude-flow-novice/dist/src/swarm-fullstack/workflows/test-result-analyzer.js +530 -0
  270. package/.claude-flow-novice/dist/src/swarm-fullstack/workflows/test-result-analyzer.js.map +1 -0
  271. package/.claude-flow-novice/dist/src/swarm-fullstack/workflows/workflow-metrics.js +250 -0
  272. package/.claude-flow-novice/dist/src/swarm-fullstack/workflows/workflow-metrics.js.map +1 -0
  273. package/.claude-flow-novice/dist/src/task/index.js +7 -7
  274. package/.claude-flow-novice/dist/src/validation/fullstack-integration-validator.js +420 -0
  275. package/.claude-flow-novice/dist/src/validation/fullstack-integration-validator.js.map +1 -0
  276. package/.claude-flow-novice/dist/src/validation/production-validator.js +1435 -0
  277. package/.claude-flow-novice/dist/src/validation/production-validator.js.map +1 -0
  278. package/.claude-flow-novice/dist/src/verification/cli-integration.js +3 -3
  279. package/.claude-flow-novice/dist/src/verification/hooks.js +1 -1
  280. package/CHANGELOG.md +26 -0
  281. package/CLAUDE.md +1967 -68
  282. package/README.md +0 -1
  283. package/config/build/babel.config.cjs +19 -11
  284. package/config/typescript/tsconfig.json +1 -1
  285. package/examples/claude-api-error-handling.ts +2 -2
  286. package/examples/frontend-testing-demo.ts +470 -0
  287. package/examples/litellm/config/config.yaml +1 -1
  288. package/package.json +13 -7
  289. package/scripts/build/unified-builder.sh +6 -6
  290. package/scripts/build/validate-agents.js +238 -0
  291. package/scripts/run-production-validation.ts +590 -0
  292. package/scripts/test/test-coordination-features.ts +2 -2
  293. package/scripts/validate-stage3-performance.ts +377 -0
  294. package/src/cli/simple-commands/hooks.js +1 -0
  295. package/src/cli/simple-commands/init/agent-copier.js +0 -2
  296. package/src/cli/simple-commands/init/index.js +5 -97
  297. package/src/cli/simple-commands/init/templates/CLAUDE.md +163 -1158
  298. package/src/cli/simple-commands/init/templates/claude-md.js +38 -157
  299. package/src/swarm-fullstack/integrations/communication-bridge.ts +931 -0
  300. package/src/swarm-fullstack/testing/api-contract-validator.ts +909 -0
  301. package/src/swarm-fullstack/testing/backend-test-orchestrator.ts +791 -0
  302. package/src/swarm-fullstack/testing/frontend-test-orchestrator.ts +853 -0
  303. package/src/swarm-fullstack/testing/visual-regression.ts +507 -0
  304. package/src/swarm-fullstack/workflows/convergence-detector.ts +736 -0
  305. package/src/swarm-fullstack/workflows/fix-coordinator.ts +677 -0
  306. package/src/swarm-fullstack/workflows/index.ts +75 -0
  307. package/src/swarm-fullstack/workflows/iterative-build-test.ts +829 -0
  308. package/src/swarm-fullstack/workflows/regression-test-manager.ts +590 -0
  309. package/src/swarm-fullstack/workflows/test-result-analyzer.ts +739 -0
  310. package/src/swarm-fullstack/workflows/workflow-metrics.ts +399 -0
  311. package/wiki/command-reference/README.md +1 -2
  312. package/wiki/command-reference/mcp-tools/README.md +1 -1
  313. package/wiki/getting-started/claude-code-mcp/README.md +1 -2
  314. package/wiki/getting-started/installation/README.md +2 -10
  315. package/.claude/commands/flow-nexus/app-store.md +0 -124
  316. package/.claude/commands/flow-nexus/challenges.md +0 -120
  317. package/.claude/commands/flow-nexus/login-registration.md +0 -65
  318. package/.claude/commands/flow-nexus/neural-network.md +0 -134
  319. package/.claude/commands/flow-nexus/payments.md +0 -116
  320. package/.claude/commands/flow-nexus/sandbox.md +0 -83
  321. package/.claude/commands/flow-nexus/swarm.md +0 -87
  322. package/.claude/commands/flow-nexus/user-tools.md +0 -152
  323. package/.claude/commands/flow-nexus/workflow.md +0 -115
  324. package/.claude-flow-novice/dist/cli/index.js +0 -45
  325. package/.claude-flow-novice/dist/core/index.js +0 -22
  326. package/.claude-flow-novice/dist/mcp/mcp-server-novice.js +0 -595
  327. package/.claude-flow-novice/dist/mcp/mcp-server-sdk.js +0 -649
  328. package/.claude-flow-novice/dist/mcp/mcp-server-with-slash-commands.js +0 -776
  329. package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/claude-md.js +0 -1101
  330. package/src/cli/simple-commands/init/templates/CLAUDE.md.optimized +0 -265
  331. /package/{.claude → .claude-flow-novice/.claude}/agents/README.md +0 -0
  332. /package/{.claude → .claude-flow-novice/.claude}/agents/backend-dev.json +0 -0
  333. /package/{.claude → .claude-flow-novice/.claude}/agents/code-analyzer.json +0 -0
  334. /package/{.claude → .claude-flow-novice/.claude}/agents/coder.json +0 -0
  335. /package/{.claude → .claude-flow-novice/.claude}/agents/consensus/README.md +0 -0
  336. /package/{.claude → .claude-flow-novice/.claude}/agents/core/coder.md +0 -0
  337. /package/{.claude → .claude-flow-novice/.claude}/agents/core/planner.md +0 -0
  338. /package/{.claude → .claude-flow-novice/.claude}/agents/core/researcher.md +0 -0
  339. /package/{.claude → .claude-flow-novice/.claude}/agents/core/reviewer.md +0 -0
  340. /package/{.claude → .claude-flow-novice/.claude}/agents/core/tester.md +0 -0
  341. /package/{.claude → .claude-flow-novice/.claude}/agents/optimization/README.md +0 -0
  342. /package/{.claude → .claude-flow-novice/.claude}/agents/planner.json +0 -0
  343. /package/{.claude → .claude-flow-novice/.claude}/agents/researcher.json +0 -0
  344. /package/{.claude → .claude-flow-novice/.claude}/agents/reviewer.json +0 -0
  345. /package/{.claude → .claude-flow-novice/.claude}/agents/swarm/README.md +0 -0
  346. /package/{.claude → .claude-flow-novice/.claude}/agents/system-architect.json +0 -0
  347. /package/{.claude → .claude-flow-novice/.claude}/agents/tester.json +0 -0
@@ -0,0 +1,530 @@
1
+ /**
2
+ * Test Result Analyzer - Intelligent Failure Categorization and Analysis
3
+ *
4
+ * Analyzes test results to categorize failures, identify patterns, and provide
5
+ * actionable insights for fixing issues.
6
+ *
7
+ * Key Features:
8
+ * - Failure pattern recognition
9
+ * - Root cause analysis
10
+ * - Impact assessment
11
+ * - Priority classification
12
+ * - Suggested fix strategies
13
+ */ import { EventEmitter } from 'events';
14
+ export class TestResultAnalyzer extends EventEmitter {
15
+ logger;
16
+ knownPatterns = new Map();
17
+ failureHistory = new Map();
18
+ constructor(logger){
19
+ super(), this.logger = logger;
20
+ this.initializeKnownPatterns();
21
+ }
22
+ /**
23
+ * Analyze test failures and provide comprehensive analysis
24
+ */ async analyzeFailures(testResults) {
25
+ this.logger.info('Analyzing test failures', {
26
+ totalFailures: testResults.failed,
27
+ totalTests: testResults.totalTests
28
+ });
29
+ try {
30
+ // Generate failure summary
31
+ const summary = this.generateFailureSummary(testResults);
32
+ // Categorize failures
33
+ const categories = this.categorizeFailures(testResults.failures);
34
+ // Detect patterns
35
+ const patterns = await this.detectPatterns(testResults.failures);
36
+ // Identify root causes
37
+ const rootCauses = await this.identifyRootCauses(testResults.failures, patterns);
38
+ // Generate recommendations
39
+ const recommendations = this.generateRecommendations(testResults.failures, patterns, rootCauses);
40
+ // Assess impact
41
+ const impactAssessment = this.assessImpact(testResults.failures);
42
+ const analysis = {
43
+ testResults,
44
+ summary,
45
+ categories,
46
+ patterns,
47
+ rootCauses,
48
+ recommendations,
49
+ impactAssessment
50
+ };
51
+ this.emit('analysis:completed', {
52
+ analysis
53
+ });
54
+ return analysis;
55
+ } catch (error) {
56
+ this.logger.error('Failed to analyze test failures', {
57
+ error
58
+ });
59
+ throw error;
60
+ }
61
+ }
62
+ /**
63
+ * Generate failure summary statistics
64
+ */ generateFailureSummary(testResults) {
65
+ const failures = testResults.failures;
66
+ const summary = {
67
+ totalFailures: failures.length,
68
+ criticalFailures: failures.filter((f)=>f.severity === 'critical').length,
69
+ highFailures: failures.filter((f)=>f.severity === 'high').length,
70
+ mediumFailures: failures.filter((f)=>f.severity === 'medium').length,
71
+ lowFailures: failures.filter((f)=>f.severity === 'low').length,
72
+ byLayer: new Map(),
73
+ byCategory: new Map(),
74
+ bySeverity: new Map()
75
+ };
76
+ // Group by layer
77
+ for (const failure of failures){
78
+ const layerCount = summary.byLayer.get(failure.layer) || 0;
79
+ summary.byLayer.set(failure.layer, layerCount + 1);
80
+ const categoryCount = summary.byCategory.get(failure.category) || 0;
81
+ summary.byCategory.set(failure.category, categoryCount + 1);
82
+ const severityCount = summary.bySeverity.get(failure.severity) || 0;
83
+ summary.bySeverity.set(failure.severity, severityCount + 1);
84
+ }
85
+ return summary;
86
+ }
87
+ /**
88
+ * Categorize failures by characteristics
89
+ */ categorizeFailures(failures) {
90
+ const categories = new Map();
91
+ for (const failure of failures){
92
+ const category = this.determineCategory(failure);
93
+ if (!categories.has(category)) {
94
+ categories.set(category, []);
95
+ }
96
+ categories.get(category).push(failure);
97
+ }
98
+ return categories;
99
+ }
100
+ /**
101
+ * Determine failure category from error patterns
102
+ */ determineCategory(failure) {
103
+ const error = failure.error.toLowerCase();
104
+ const stack = failure.stackTrace.toLowerCase();
105
+ // API/Network failures
106
+ if (error.includes('fetch') || error.includes('network') || error.includes('xhr') || error.includes('api')) {
107
+ return 'network-api';
108
+ }
109
+ // Database/Data failures
110
+ if (error.includes('database') || error.includes('query') || error.includes('connection') || error.includes('transaction')) {
111
+ return 'database';
112
+ }
113
+ // Rendering/UI failures
114
+ if (error.includes('render') || error.includes('component') || error.includes('dom') || error.includes('element not found')) {
115
+ return 'rendering';
116
+ }
117
+ // State management failures
118
+ if (error.includes('state') || error.includes('store') || error.includes('reducer') || error.includes('dispatch')) {
119
+ return 'state-management';
120
+ }
121
+ // Authentication/Authorization failures
122
+ if (error.includes('auth') || error.includes('permission') || error.includes('unauthorized') || error.includes('forbidden')) {
123
+ return 'authentication';
124
+ }
125
+ // Validation failures
126
+ if (error.includes('validation') || error.includes('invalid') || error.includes('required field')) {
127
+ return 'validation';
128
+ }
129
+ // Timing/Race condition failures
130
+ if (error.includes('timeout') || error.includes('race') || error.includes('async') || error.includes('promise')) {
131
+ return 'timing-async';
132
+ }
133
+ // Memory/Resource failures
134
+ if (error.includes('memory') || error.includes('heap') || error.includes('resource') || error.includes('leak')) {
135
+ return 'resource';
136
+ }
137
+ // Configuration failures
138
+ if (error.includes('config') || error.includes('environment') || error.includes('variable')) {
139
+ return 'configuration';
140
+ }
141
+ // Dependency failures
142
+ if (error.includes('module') || error.includes('import') || error.includes('require') || error.includes('dependency')) {
143
+ return 'dependency';
144
+ }
145
+ return 'unknown';
146
+ }
147
+ /**
148
+ * Detect patterns in failures
149
+ */ async detectPatterns(failures) {
150
+ const patterns = [];
151
+ const errorGroups = new Map();
152
+ // Group by similar errors
153
+ for (const failure of failures){
154
+ const errorKey = this.extractErrorKey(failure.error);
155
+ if (!errorGroups.has(errorKey)) {
156
+ errorGroups.set(errorKey, []);
157
+ }
158
+ errorGroups.get(errorKey).push(failure);
159
+ }
160
+ // Create patterns for groups with multiple occurrences
161
+ for (const [errorKey, groupFailures] of errorGroups){
162
+ if (groupFailures.length > 1) {
163
+ const pattern = {
164
+ id: `pattern_${Date.now()}_${Math.random().toString(36).substr(2, 9)}`,
165
+ pattern: errorKey,
166
+ description: this.generatePatternDescription(groupFailures),
167
+ occurrences: groupFailures.length,
168
+ affectedTests: groupFailures.map((f)=>f.testName),
169
+ confidence: Math.min(groupFailures.length / 10, 1),
170
+ suggestedFix: this.suggestFixForPattern(errorKey, groupFailures),
171
+ relatedPatterns: []
172
+ };
173
+ patterns.push(pattern);
174
+ }
175
+ }
176
+ // Check against known patterns
177
+ for (const pattern of this.knownPatterns.values()){
178
+ const matchingFailures = failures.filter((f)=>this.matchesPattern(f, pattern.pattern));
179
+ if (matchingFailures.length > 0) {
180
+ patterns.push({
181
+ ...pattern,
182
+ occurrences: matchingFailures.length,
183
+ affectedTests: matchingFailures.map((f)=>f.testName)
184
+ });
185
+ }
186
+ }
187
+ return patterns;
188
+ }
189
+ /**
190
+ * Extract error key for grouping
191
+ */ extractErrorKey(error) {
192
+ // Remove specific values and keep structure
193
+ return error.replace(/\d+/g, 'N') // Replace numbers
194
+ .replace(/'[^']*'/g, 'STRING') // Replace strings
195
+ .replace(/"[^"]*"/g, 'STRING').replace(/\b[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}\b/gi, 'UUID') // Replace UUIDs
196
+ .replace(/\s+/g, ' ') // Normalize whitespace
197
+ .trim().toLowerCase();
198
+ }
199
+ /**
200
+ * Generate pattern description
201
+ */ generatePatternDescription(failures) {
202
+ const layers = [
203
+ ...new Set(failures.map((f)=>f.layer))
204
+ ];
205
+ const categories = [
206
+ ...new Set(failures.map((f)=>f.category))
207
+ ];
208
+ return `Pattern affecting ${failures.length} tests in ${layers.join(', ')} layer(s), ${categories.join(', ')} test(s)`;
209
+ }
210
+ /**
211
+ * Suggest fix for pattern
212
+ */ suggestFixForPattern(errorKey, failures) {
213
+ const category = this.determineCategory(failures[0]);
214
+ const suggestions = {
215
+ 'network-api': 'Review API endpoint configurations and network connectivity',
216
+ database: 'Check database connection strings and query syntax',
217
+ rendering: 'Verify component props and DOM structure',
218
+ 'state-management': 'Validate state updates and action dispatchers',
219
+ authentication: 'Review authentication tokens and permission checks',
220
+ validation: 'Update validation schemas and error handling',
221
+ 'timing-async': 'Add proper async/await handling and increase timeouts',
222
+ resource: 'Review resource allocation and cleanup logic',
223
+ configuration: 'Verify environment configuration and variables',
224
+ dependency: 'Update dependencies and check import paths'
225
+ };
226
+ return suggestions[category] || 'Investigate root cause and apply targeted fix';
227
+ }
228
+ /**
229
+ * Check if failure matches pattern
230
+ */ matchesPattern(failure, pattern) {
231
+ const errorKey = this.extractErrorKey(failure.error);
232
+ return errorKey.includes(pattern.toLowerCase()) || pattern.toLowerCase().includes(errorKey);
233
+ }
234
+ /**
235
+ * Identify root causes
236
+ */ async identifyRootCauses(failures, patterns) {
237
+ const rootCauses = [];
238
+ const causesMap = new Map();
239
+ // Analyze patterns for root causes
240
+ for (const pattern of patterns){
241
+ const category = this.determineCategory(failures[0]);
242
+ const causeId = `cause_${category}`;
243
+ if (!causesMap.has(causeId)) {
244
+ const rootCause = {
245
+ id: causeId,
246
+ category,
247
+ description: this.generateRootCauseDescription(category, pattern),
248
+ evidence: [
249
+ pattern.description
250
+ ],
251
+ confidence: pattern.confidence,
252
+ affectedComponents: this.extractAffectedComponents(failures),
253
+ potentialSolutions: this.generatePotentialSolutions(category),
254
+ priority: this.calculateRootCausePriority(failures)
255
+ };
256
+ causesMap.set(causeId, rootCause);
257
+ } else {
258
+ const existing = causesMap.get(causeId);
259
+ existing.evidence.push(pattern.description);
260
+ existing.confidence = Math.min(existing.confidence + 0.1, 1);
261
+ }
262
+ }
263
+ return Array.from(causesMap.values());
264
+ }
265
+ /**
266
+ * Generate root cause description
267
+ */ generateRootCauseDescription(category, pattern) {
268
+ const descriptions = {
269
+ 'network-api': 'API communication or network connectivity issues',
270
+ database: 'Database query or connection problems',
271
+ rendering: 'Component rendering or DOM manipulation issues',
272
+ 'state-management': 'State synchronization or update problems',
273
+ authentication: 'Authentication or authorization failures',
274
+ validation: 'Data validation or schema mismatch issues',
275
+ 'timing-async': 'Asynchronous operation or timing problems',
276
+ resource: 'Resource management or memory issues',
277
+ configuration: 'Configuration or environment setup problems',
278
+ dependency: 'Module dependency or import issues'
279
+ };
280
+ return descriptions[category] || `${category} related issues`;
281
+ }
282
+ /**
283
+ * Extract affected components
284
+ */ extractAffectedComponents(failures) {
285
+ const components = new Set();
286
+ for (const failure of failures){
287
+ if (failure.affectedComponents && Array.isArray(failure.affectedComponents)) {
288
+ failure.affectedComponents.forEach((comp)=>components.add(comp));
289
+ }
290
+ }
291
+ return Array.from(components);
292
+ }
293
+ /**
294
+ * Generate potential solutions
295
+ */ generatePotentialSolutions(category) {
296
+ const solutions = {
297
+ 'network-api': [
298
+ 'Verify API endpoint URLs',
299
+ 'Check CORS configuration',
300
+ 'Add proper error handling for network failures',
301
+ 'Implement retry logic with exponential backoff'
302
+ ],
303
+ database: [
304
+ 'Verify database connection strings',
305
+ 'Check query syntax and parameters',
306
+ 'Add proper transaction handling',
307
+ 'Implement connection pooling'
308
+ ],
309
+ rendering: [
310
+ 'Verify component props are correctly passed',
311
+ 'Check for null/undefined values before rendering',
312
+ 'Add proper error boundaries',
313
+ 'Use conditional rendering for optional elements'
314
+ ],
315
+ 'state-management': [
316
+ 'Verify action dispatchers are correctly wired',
317
+ 'Check reducer logic for state updates',
318
+ 'Add proper state initialization',
319
+ 'Use immutable update patterns'
320
+ ],
321
+ authentication: [
322
+ 'Verify token generation and validation',
323
+ 'Check permission configurations',
324
+ 'Add proper session management',
325
+ 'Implement token refresh logic'
326
+ ],
327
+ validation: [
328
+ 'Update validation schemas',
329
+ 'Add comprehensive error messages',
330
+ 'Implement client-side validation',
331
+ 'Use consistent validation rules'
332
+ ],
333
+ 'timing-async': [
334
+ 'Add proper async/await handling',
335
+ 'Increase timeout values',
336
+ 'Implement proper promise chaining',
337
+ 'Use Promise.all for parallel operations'
338
+ ],
339
+ resource: [
340
+ 'Implement proper cleanup in useEffect/componentWillUnmount',
341
+ 'Check for memory leaks',
342
+ 'Add resource pooling',
343
+ 'Implement proper caching strategies'
344
+ ],
345
+ configuration: [
346
+ 'Verify environment variables',
347
+ 'Check configuration file syntax',
348
+ 'Add proper default values',
349
+ 'Use configuration validation'
350
+ ],
351
+ dependency: [
352
+ 'Update outdated dependencies',
353
+ 'Check import paths',
354
+ 'Verify package.json configurations',
355
+ 'Use consistent module resolution'
356
+ ]
357
+ };
358
+ return solutions[category] || [
359
+ 'Investigate and apply appropriate fix'
360
+ ];
361
+ }
362
+ /**
363
+ * Calculate root cause priority
364
+ */ calculateRootCausePriority(failures) {
365
+ let priority = 50;
366
+ // Severity impact
367
+ const criticalCount = failures.filter((f)=>f.severity === 'critical').length;
368
+ const highCount = failures.filter((f)=>f.severity === 'high').length;
369
+ priority += criticalCount * 10;
370
+ priority += highCount * 5;
371
+ // Quantity impact
372
+ priority += Math.min(failures.length * 2, 30);
373
+ return Math.min(priority, 100);
374
+ }
375
+ /**
376
+ * Generate recommendations
377
+ */ generateRecommendations(failures, patterns, rootCauses) {
378
+ const recommendations = [];
379
+ // Recommendations from root causes
380
+ for (const cause of rootCauses){
381
+ const recommendation = {
382
+ type: cause.priority > 70 ? 'fix' : cause.priority > 50 ? 'refactor' : 'investigate',
383
+ priority: this.mapPriorityToLevel(cause.priority),
384
+ description: cause.potentialSolutions[0],
385
+ reasoning: `Root cause: ${cause.description}. Affects ${cause.affectedComponents.length} component(s).`,
386
+ estimatedEffort: this.estimateEffort(cause.priority, cause.affectedComponents.length),
387
+ expectedImpact: this.estimateImpact(failures, cause)
388
+ };
389
+ recommendations.push(recommendation);
390
+ }
391
+ // Pattern-based recommendations
392
+ for (const pattern of patterns.slice(0, 3)){
393
+ // Top 3 patterns
394
+ if (pattern.occurrences > 2) {
395
+ recommendations.push({
396
+ type: 'fix',
397
+ priority: 'high',
398
+ description: pattern.suggestedFix,
399
+ reasoning: `Pattern detected in ${pattern.occurrences} tests`,
400
+ estimatedEffort: 30,
401
+ expectedImpact: pattern.occurrences / failures.length * 100
402
+ });
403
+ }
404
+ }
405
+ // General recommendations
406
+ if (failures.filter((f)=>f.category === 'e2e').length > failures.length * 0.5) {
407
+ recommendations.push({
408
+ type: 'investigate',
409
+ priority: 'medium',
410
+ description: 'High number of E2E test failures - review integration points',
411
+ reasoning: 'E2E failures often indicate integration or environment issues',
412
+ estimatedEffort: 45,
413
+ expectedImpact: 40
414
+ });
415
+ }
416
+ return recommendations.sort((a, b)=>{
417
+ const priorityOrder = {
418
+ critical: 4,
419
+ high: 3,
420
+ medium: 2,
421
+ low: 1
422
+ };
423
+ return priorityOrder[b.priority] - priorityOrder[a.priority];
424
+ });
425
+ }
426
+ /**
427
+ * Map priority number to level
428
+ */ mapPriorityToLevel(priority) {
429
+ if (priority >= 80) return 'critical';
430
+ if (priority >= 60) return 'high';
431
+ if (priority >= 40) return 'medium';
432
+ return 'low';
433
+ }
434
+ /**
435
+ * Estimate effort
436
+ */ estimateEffort(priority, componentCount) {
437
+ const basEffort = 20; // minutes
438
+ const priorityMultiplier = priority / 50;
439
+ const complexityMultiplier = 1 + componentCount * 0.2;
440
+ return Math.round(basEffort * priorityMultiplier * complexityMultiplier);
441
+ }
442
+ /**
443
+ * Estimate impact
444
+ */ estimateImpact(failures, cause) {
445
+ const relatedFailures = failures.filter((f)=>cause.affectedComponents.some((c)=>f.affectedComponents.includes(c)));
446
+ return relatedFailures.length / failures.length * 100;
447
+ }
448
+ /**
449
+ * Assess impact
450
+ */ assessImpact(failures) {
451
+ const criticalFailures = failures.filter((f)=>f.severity === 'critical').length;
452
+ const highFailures = failures.filter((f)=>f.severity === 'high').length;
453
+ // Determine users affected
454
+ let usersAffected = 'none';
455
+ if (failures.length > 10) usersAffected = 'all';
456
+ else if (failures.length > 5) usersAffected = 'many';
457
+ else if (failures.length > 2) usersAffected = 'few';
458
+ // Features affected
459
+ const featuresAffected = [
460
+ ...new Set(failures.flatMap((f)=>f.affectedComponents))
461
+ ];
462
+ // Business impact
463
+ let businessImpact = 'low';
464
+ if (criticalFailures > 0) businessImpact = 'critical';
465
+ else if (highFailures > 3) businessImpact = 'high';
466
+ else if (failures.length > 5) businessImpact = 'medium';
467
+ // Urgency
468
+ const urgency = Math.min(50 + criticalFailures * 20 + highFailures * 10 + failures.length * 2, 100);
469
+ // Risk level
470
+ let riskLevel = 'low';
471
+ if (criticalFailures > 0) riskLevel = 'critical';
472
+ else if (highFailures > 2) riskLevel = 'high';
473
+ else if (failures.length > 5) riskLevel = 'medium';
474
+ return {
475
+ usersAffected,
476
+ featuresAffected,
477
+ businessImpact,
478
+ urgency,
479
+ riskLevel
480
+ };
481
+ }
482
+ /**
483
+ * Initialize known patterns
484
+ */ initializeKnownPatterns() {
485
+ const commonPatterns = [
486
+ {
487
+ id: 'api-timeout',
488
+ pattern: 'timeout',
489
+ description: 'API request timeout pattern',
490
+ occurrences: 0,
491
+ affectedTests: [],
492
+ confidence: 0.9,
493
+ suggestedFix: 'Increase timeout values or optimize API response time',
494
+ relatedPatterns: [
495
+ 'network-api'
496
+ ]
497
+ },
498
+ {
499
+ id: 'null-reference',
500
+ pattern: 'cannot read property',
501
+ description: 'Null reference error pattern',
502
+ occurrences: 0,
503
+ affectedTests: [],
504
+ confidence: 0.95,
505
+ suggestedFix: 'Add null checks and proper initialization',
506
+ relatedPatterns: [
507
+ 'rendering',
508
+ 'state-management'
509
+ ]
510
+ },
511
+ {
512
+ id: 'async-race',
513
+ pattern: 'promise',
514
+ description: 'Asynchronous operation race condition',
515
+ occurrences: 0,
516
+ affectedTests: [],
517
+ confidence: 0.8,
518
+ suggestedFix: 'Add proper async/await handling and synchronization',
519
+ relatedPatterns: [
520
+ 'timing-async'
521
+ ]
522
+ }
523
+ ];
524
+ for (const pattern of commonPatterns){
525
+ this.knownPatterns.set(pattern.id, pattern);
526
+ }
527
+ }
528
+ }
529
+
530
+ //# sourceMappingURL=test-result-analyzer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../src/swarm-fullstack/workflows/test-result-analyzer.ts"],"names":["EventEmitter","TestResultAnalyzer","knownPatterns","Map","failureHistory","logger","initializeKnownPatterns","analyzeFailures","testResults","info","totalFailures","failed","totalTests","summary","generateFailureSummary","categories","categorizeFailures","failures","patterns","detectPatterns","rootCauses","identifyRootCauses","recommendations","generateRecommendations","impactAssessment","assessImpact","analysis","emit","error","length","criticalFailures","filter","f","severity","highFailures","mediumFailures","lowFailures","byLayer","byCategory","bySeverity","failure","layerCount","get","layer","set","categoryCount","category","severityCount","determineCategory","has","push","toLowerCase","stack","stackTrace","includes","errorGroups","errorKey","extractErrorKey","groupFailures","pattern","id","Date","now","Math","random","toString","substr","description","generatePatternDescription","occurrences","affectedTests","map","testName","confidence","min","suggestedFix","suggestFixForPattern","relatedPatterns","values","matchingFailures","matchesPattern","replace","trim","layers","Set","join","suggestions","database","rendering","authentication","validation","resource","configuration","dependency","causesMap","causeId","rootCause","generateRootCauseDescription","evidence","affectedComponents","extractAffectedComponents","potentialSolutions","generatePotentialSolutions","priority","calculateRootCausePriority","existing","Array","from","descriptions","components","isArray","forEach","comp","add","solutions","criticalCount","highCount","cause","recommendation","type","mapPriorityToLevel","reasoning","estimatedEffort","estimateEffort","expectedImpact","estimateImpact","slice","sort","a","b","priorityOrder","critical","high","medium","low","componentCount","basEffort","priorityMultiplier","complexityMultiplier","round","relatedFailures","some","c","usersAffected","featuresAffected","flatMap","businessImpact","urgency","riskLevel","commonPatterns"],"mappings":"AAAA;;;;;;;;;;;;CAYC,GAED,SAASA,YAAY,QAAQ,SAAS;AAgEtC,OAAO,MAAMC,2BAA2BD;;IAC9BE,gBAAgB,IAAIC,MAA8B;IAClDC,iBAAiB,IAAID,MAA6B;IAE1D,YAAY,AAAQE,MAAe,CAAE;QACnC,KAAK,SADaA,SAAAA;QAElB,IAAI,CAACC,uBAAuB;IAC9B;IAEA;;GAEC,GACD,MAAMC,gBAAgBC,WAAgC,EAA4B;QAChF,IAAI,CAACH,MAAM,CAACI,IAAI,CAAC,2BAA2B;YAC1CC,eAAeF,YAAYG,MAAM;YACjCC,YAAYJ,YAAYI,UAAU;QACpC;QAEA,IAAI;YACF,2BAA2B;YAC3B,MAAMC,UAAU,IAAI,CAACC,sBAAsB,CAACN;YAE5C,sBAAsB;YACtB,MAAMO,aAAa,IAAI,CAACC,kBAAkB,CAACR,YAAYS,QAAQ;YAE/D,kBAAkB;YAClB,MAAMC,WAAW,MAAM,IAAI,CAACC,cAAc,CAACX,YAAYS,QAAQ;YAE/D,uBAAuB;YACvB,MAAMG,aAAa,MAAM,IAAI,CAACC,kBAAkB,CAACb,YAAYS,QAAQ,EAAEC;YAEvE,2BAA2B;YAC3B,MAAMI,kBAAkB,IAAI,CAACC,uBAAuB,CAClDf,YAAYS,QAAQ,EACpBC,UACAE;YAGF,gBAAgB;YAChB,MAAMI,mBAAmB,IAAI,CAACC,YAAY,CAACjB,YAAYS,QAAQ;YAE/D,MAAMS,WAA4B;gBAChClB;gBACAK;gBACAE;gBACAG;gBACAE;gBACAE;gBACAE;YACF;YAEA,IAAI,CAACG,IAAI,CAAC,sBAAsB;gBAAED;YAAS;YAE3C,OAAOA;QACT,EAAE,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