claude-flow-novice 1.3.5 → 1.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (356) 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 +300 -0
  4. package/.claude/agents/architect.md +557 -0
  5. package/.claude/agents/architecture/system-architect.md +630 -0
  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 +180 -0
  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 +842 -0
  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 +638 -0
  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 +725 -0
  30. package/.claude/agents/optimization/performance-monitor.md +1 -1
  31. package/.claude/agents/planner.md +135 -0
  32. package/.claude/agents/researcher.md +185 -0
  33. package/.claude/agents/reviewer.md +291 -0
  34. package/.claude/agents/security/security-specialist.md +978 -0
  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/swarm/adaptive-coordinator-enhanced.md +746 -0
  41. package/.claude/agents/tester.md +663 -0
  42. package/.claude/agents/testing/unit/tdd-london-swarm.md +1 -1
  43. package/.claude/agents/testing/validation/production-validator.md +1 -1
  44. package/.claude/commands/claude-soul.js +1 -1
  45. package/.claude/hooks.json +12 -15
  46. package/{.claude → .claude-flow-novice/.claude}/agents/MIGRATION_SUMMARY.md +1 -1
  47. package/.claude-flow-novice/.claude/agents/analysis/code-analyzer.md +192 -0
  48. package/.claude-flow-novice/.claude/agents/analysis/code-review/analyze-code-quality.md +180 -0
  49. package/.claude-flow-novice/.claude/agents/analyst.md +300 -0
  50. package/.claude-flow-novice/.claude/agents/architect.md +557 -0
  51. package/.claude-flow-novice/.claude/agents/architecture/system-architect.md +630 -0
  52. package/.claude-flow-novice/.claude/agents/architecture/system-design/arch-system-design.md +156 -0
  53. package/.claude-flow-novice/.claude/agents/backend-dev.json +42 -0
  54. package/.claude-flow-novice/.claude/agents/base-template-generator.md +65 -0
  55. package/.claude-flow-novice/.claude/agents/code-analyzer.json +39 -0
  56. package/.claude-flow-novice/.claude/agents/coder.json +42 -0
  57. package/.claude-flow-novice/.claude/agents/coder.md +180 -0
  58. package/.claude-flow-novice/.claude/agents/consensus/byzantine-coordinator.md +46 -0
  59. package/.claude-flow-novice/.claude/agents/consensus/consensus-builder.md +225 -0
  60. package/.claude-flow-novice/.claude/agents/consensus/crdt-synchronizer.md +980 -0
  61. package/.claude-flow-novice/.claude/agents/consensus/gossip-coordinator.md +46 -0
  62. package/.claude-flow-novice/.claude/agents/consensus/performance-benchmarker.md +834 -0
  63. package/.claude-flow-novice/.claude/agents/consensus/quorum-manager.md +806 -0
  64. package/.claude-flow-novice/.claude/agents/consensus/raft-manager.md +46 -0
  65. package/.claude-flow-novice/.claude/agents/consensus/security-manager.md +605 -0
  66. package/.claude-flow-novice/.claude/agents/coordinator.md +842 -0
  67. package/.claude-flow-novice/.claude/agents/data/ml/data-ml-model.md +193 -0
  68. package/.claude-flow-novice/.claude/agents/development/backend/dev-backend-api.md +142 -0
  69. package/.claude-flow-novice/.claude/agents/devops/ci-cd/ops-cicd-github.md +164 -0
  70. package/.claude-flow-novice/.claude/agents/devops/devops-engineer.md +638 -0
  71. package/.claude-flow-novice/.claude/agents/documentation/api-docs/docs-api-openapi.md +174 -0
  72. package/.claude-flow-novice/.claude/agents/github/code-review-swarm.md +538 -0
  73. package/.claude-flow-novice/.claude/agents/github/github-modes.md +173 -0
  74. package/.claude-flow-novice/.claude/agents/github/github-specialist.md +856 -0
  75. package/.claude-flow-novice/.claude/agents/github/issue-tracker.md +319 -0
  76. package/.claude-flow-novice/.claude/agents/github/multi-repo-swarm.md +553 -0
  77. package/.claude-flow-novice/.claude/agents/github/pr-manager.md +191 -0
  78. package/.claude-flow-novice/.claude/agents/github/project-board-sync.md +509 -0
  79. package/.claude-flow-novice/.claude/agents/github/release-manager.md +367 -0
  80. package/.claude-flow-novice/.claude/agents/github/release-swarm.md +583 -0
  81. package/.claude-flow-novice/.claude/agents/github/repo-architect.md +398 -0
  82. package/.claude-flow-novice/.claude/agents/github/swarm-issue.md +573 -0
  83. package/.claude-flow-novice/.claude/agents/github/swarm-pr.md +428 -0
  84. package/.claude-flow-novice/.claude/agents/github/sync-coordinator.md +452 -0
  85. package/.claude-flow-novice/.claude/agents/github/workflow-automation.md +635 -0
  86. package/.claude-flow-novice/.claude/agents/goal/goal-planner.md +73 -0
  87. package/.claude-flow-novice/.claude/agents/neural/neural-pattern-agent.md +762 -0
  88. package/.claude-flow-novice/.claude/agents/neural/safla-neural.md +74 -0
  89. package/.claude-flow-novice/.claude/agents/optimization/benchmark-suite.md +665 -0
  90. package/.claude-flow-novice/.claude/agents/optimization/load-balancer.md +431 -0
  91. package/.claude-flow-novice/.claude/agents/optimization/perf-analyzer.md +725 -0
  92. package/.claude-flow-novice/.claude/agents/optimization/performance-monitor.md +672 -0
  93. package/.claude-flow-novice/.claude/agents/optimization/resource-allocator.md +674 -0
  94. package/.claude-flow-novice/.claude/agents/optimization/topology-optimizer.md +808 -0
  95. package/.claude-flow-novice/.claude/agents/planner.json +41 -0
  96. package/.claude-flow-novice/.claude/agents/planner.md +135 -0
  97. package/.claude-flow-novice/.claude/agents/researcher.json +41 -0
  98. package/.claude-flow-novice/.claude/agents/researcher.md +185 -0
  99. package/.claude-flow-novice/.claude/agents/reviewer.json +39 -0
  100. package/.claude-flow-novice/.claude/agents/reviewer.md +291 -0
  101. package/.claude-flow-novice/.claude/agents/security/security-specialist.md +978 -0
  102. package/.claude-flow-novice/.claude/agents/sparc/architecture.md +472 -0
  103. package/.claude-flow-novice/.claude/agents/sparc/pseudocode.md +318 -0
  104. package/.claude-flow-novice/.claude/agents/sparc/refinement.md +525 -0
  105. package/.claude-flow-novice/.claude/agents/sparc/specification.md +276 -0
  106. package/.claude-flow-novice/.claude/agents/specialized/mobile/spec-mobile-react-native.md +226 -0
  107. package/.claude-flow-novice/.claude/agents/sublinear/consciousness-evolution-agent.md +499 -0
  108. package/.claude-flow-novice/.claude/agents/sublinear/matrix-solver-agent.md +113 -0
  109. package/.claude-flow-novice/.claude/agents/sublinear/nanosecond-scheduler-agent.md +644 -0
  110. package/.claude-flow-novice/.claude/agents/sublinear/pagerank-agent.md +699 -0
  111. package/.claude-flow-novice/.claude/agents/sublinear/phi-calculator-agent.md +749 -0
  112. package/.claude-flow-novice/.claude/agents/sublinear/psycho-symbolic-agent.md +543 -0
  113. package/.claude-flow-novice/.claude/agents/sublinear/sublinear.md +816 -0
  114. package/.claude-flow-novice/.claude/agents/sublinear/temporal-advantage-agent.md +360 -0
  115. package/.claude-flow-novice/.claude/agents/swarm/adaptive-coordinator-enhanced.md +746 -0
  116. package/.claude-flow-novice/.claude/agents/swarm/adaptive-coordinator.md +396 -0
  117. package/.claude-flow-novice/.claude/agents/swarm/hierarchical-coordinator.md +300 -0
  118. package/.claude-flow-novice/.claude/agents/swarm/mesh-coordinator.md +435 -0
  119. package/.claude-flow-novice/.claude/agents/system-architect.json +40 -0
  120. package/.claude-flow-novice/.claude/agents/templates/automation-smart-agent.md +205 -0
  121. package/.claude-flow-novice/.claude/agents/templates/coordinator-swarm-init.md +90 -0
  122. package/.claude-flow-novice/.claude/agents/templates/github-pr-manager.md +177 -0
  123. package/.claude-flow-novice/.claude/agents/templates/implementer-sparc-coder.md +259 -0
  124. package/.claude-flow-novice/.claude/agents/templates/memory-coordinator.md +187 -0
  125. package/.claude-flow-novice/.claude/agents/templates/migration-plan.md +746 -0
  126. package/.claude-flow-novice/.claude/agents/templates/orchestrator-task.md +139 -0
  127. package/.claude-flow-novice/.claude/agents/templates/performance-analyzer.md +199 -0
  128. package/.claude-flow-novice/.claude/agents/templates/sparc-coordinator.md +183 -0
  129. package/.claude-flow-novice/.claude/agents/tester.json +40 -0
  130. package/.claude-flow-novice/.claude/agents/tester.md +663 -0
  131. package/.claude-flow-novice/.claude/agents/testing/e2e/playwright-agent.md +249 -0
  132. package/.claude-flow-novice/.claude/agents/testing/unit/tdd-london-swarm.md +244 -0
  133. package/.claude-flow-novice/.claude/agents/testing/validation/production-validator.md +395 -0
  134. package/.claude-flow-novice/dist/index.js +12 -24
  135. package/.claude-flow-novice/dist/index.js.map +1 -0
  136. package/.claude-flow-novice/dist/src/agents/agent-manager.js +123 -69
  137. package/.claude-flow-novice/dist/src/agents/agent-manager.js.map +1 -1
  138. package/.claude-flow-novice/dist/src/agents/github/utils/hook-integration.js +7 -7
  139. package/.claude-flow-novice/dist/src/agents/github/utils/hook-integration.js.map +1 -1
  140. package/.claude-flow-novice/dist/src/agents/stage3-integration-validator.js +485 -0
  141. package/.claude-flow-novice/dist/src/agents/stage3-integration-validator.js.map +1 -0
  142. package/.claude-flow-novice/dist/src/agents/unified-ultra-fast-agent-manager.js +630 -0
  143. package/.claude-flow-novice/dist/src/agents/unified-ultra-fast-agent-manager.js.map +1 -0
  144. package/.claude-flow-novice/dist/src/cli/commands/agent.js +1 -1
  145. package/.claude-flow-novice/dist/src/cli/commands/agent.js.map +1 -1
  146. package/.claude-flow-novice/dist/src/cli/commands/config-integration.js +6 -6
  147. package/.claude-flow-novice/dist/src/cli/commands/enterprise.js +18 -18
  148. package/.claude-flow-novice/dist/src/cli/commands/enterprise.js.map +1 -1
  149. package/.claude-flow-novice/dist/src/cli/commands/goal-init.js +4 -4
  150. package/.claude-flow-novice/dist/src/cli/commands/help-new.js +23 -23
  151. package/.claude-flow-novice/dist/src/cli/commands/help-new.js.map +1 -1
  152. package/.claude-flow-novice/dist/src/cli/commands/help.js +74 -74
  153. package/.claude-flow-novice/dist/src/cli/commands/help.js.map +1 -1
  154. package/.claude-flow-novice/dist/src/cli/commands/hive-mind/pause.js +2 -2
  155. package/.claude-flow-novice/dist/src/cli/commands/hive-mind/pause.js.map +1 -1
  156. package/.claude-flow-novice/dist/src/cli/commands/hive.js +4 -4
  157. package/.claude-flow-novice/dist/src/cli/commands/index.js +103 -132
  158. package/.claude-flow-novice/dist/src/cli/commands/index.js.map +1 -1
  159. package/.claude-flow-novice/dist/src/cli/commands/mcp.js +1 -1
  160. package/.claude-flow-novice/dist/src/cli/commands/migrate.js +4 -4
  161. package/.claude-flow-novice/dist/src/cli/commands/migrate.js.map +1 -1
  162. package/.claude-flow-novice/dist/src/cli/commands/monitor.js +1 -1
  163. package/.claude-flow-novice/dist/src/cli/commands/neural-init.js +4 -4
  164. package/.claude-flow-novice/dist/src/cli/commands/ruv-swarm.js +8 -8
  165. package/.claude-flow-novice/dist/src/cli/commands/sparc.js +12 -12
  166. package/.claude-flow-novice/dist/src/cli/commands/sparc.js.map +1 -1
  167. package/.claude-flow-novice/dist/src/cli/commands/start/start-command.js +3 -3
  168. package/.claude-flow-novice/dist/src/cli/commands/status.js +1 -1
  169. package/.claude-flow-novice/dist/src/cli/commands/swarm.js +7 -7
  170. package/.claude-flow-novice/dist/src/cli/commands/swarm.js.map +1 -1
  171. package/.claude-flow-novice/dist/src/cli/commands/verification.js +18 -18
  172. package/.claude-flow-novice/dist/src/cli/completion.js +54 -54
  173. package/.claude-flow-novice/dist/src/cli/completion.js.map +1 -1
  174. package/.claude-flow-novice/dist/src/cli/consolidated/ConsolidatedCLI.js +11 -11
  175. package/.claude-flow-novice/dist/src/cli/consolidated/ConsolidatedCLI.js.map +1 -1
  176. package/.claude-flow-novice/dist/src/cli/consolidated/core/CommandHandlers.js +31 -31
  177. package/.claude-flow-novice/dist/src/cli/consolidated/core/TierManager.js +39 -39
  178. package/.claude-flow-novice/dist/src/cli/consolidated/core/TierManager.js.map +1 -1
  179. package/.claude-flow-novice/dist/src/cli/consolidated/help/InteractiveHelp.js +25 -25
  180. package/.claude-flow-novice/dist/src/cli/consolidated/help/InteractiveHelp.js.map +1 -1
  181. package/.claude-flow-novice/dist/src/cli/consolidated/routing/CommandRouter.js +8 -8
  182. package/.claude-flow-novice/dist/src/cli/consolidated/routing/CommandRouter.js.map +1 -1
  183. package/.claude-flow-novice/dist/src/cli/consolidated/utils/IntelligentDefaults.js +6 -6
  184. package/.claude-flow-novice/dist/src/cli/consolidated/utils/IntelligentDefaults.js.map +1 -1
  185. package/.claude-flow-novice/dist/src/cli/consolidated/utils/PerformanceOptimizer.js +7 -7
  186. package/.claude-flow-novice/dist/src/cli/consolidated/utils/PerformanceOptimizer.js.map +1 -1
  187. package/.claude-flow-novice/dist/src/cli/index-remote.js +10 -10
  188. package/.claude-flow-novice/dist/src/cli/index.js +1 -1
  189. package/.claude-flow-novice/dist/src/cli/init/directory-structure.js +8 -8
  190. package/.claude-flow-novice/dist/src/cli/init/index.js +3 -3
  191. package/.claude-flow-novice/dist/src/cli/init/sparc-environment.js +67 -67
  192. package/.claude-flow-novice/dist/src/cli/init/swarm-commands.js +18 -18
  193. package/.claude-flow-novice/dist/src/cli/node-repl.js +2 -2
  194. package/.claude-flow-novice/dist/src/cli/repl.js +1 -1
  195. package/.claude-flow-novice/dist/src/cli/simple-cli.js +68 -68
  196. package/.claude-flow-novice/dist/src/cli/simple-cli.js.map +1 -1
  197. package/.claude-flow-novice/dist/src/cli/simple-commands/session-start-soul.js +271 -0
  198. package/.claude-flow-novice/dist/src/cli/simple-orchestrator.js +7 -7
  199. package/.claude-flow-novice/dist/src/cli/simple-orchestrator.js.map +1 -1
  200. package/.claude-flow-novice/dist/src/cli/ui/fallback-handler.js +7 -7
  201. package/.claude-flow-novice/dist/src/communication/enhanced-event-bus.js +816 -0
  202. package/.claude-flow-novice/dist/src/communication/enhanced-event-bus.js.map +1 -0
  203. package/.claude-flow-novice/dist/src/communication/failure-recovery-system.js +812 -0
  204. package/.claude-flow-novice/dist/src/communication/failure-recovery-system.js.map +1 -0
  205. package/.claude-flow-novice/dist/src/communication/optimized-serialization.js +369 -0
  206. package/.claude-flow-novice/dist/src/communication/optimized-serialization.js.map +1 -0
  207. package/.claude-flow-novice/dist/src/communication/performance-optimizations.js +526 -0
  208. package/.claude-flow-novice/dist/src/communication/performance-optimizations.js.map +1 -0
  209. package/.claude-flow-novice/dist/src/communication/performance-validator.js +532 -0
  210. package/.claude-flow-novice/dist/src/communication/performance-validator.js.map +1 -0
  211. package/.claude-flow-novice/dist/src/communication/priority-message-queue.js +525 -0
  212. package/.claude-flow-novice/dist/src/communication/priority-message-queue.js.map +1 -0
  213. package/.claude-flow-novice/dist/src/communication/shared-buffer-bus.js +218 -0
  214. package/.claude-flow-novice/dist/src/communication/shared-buffer-bus.js.map +1 -0
  215. package/.claude-flow-novice/dist/src/communication/ultra-fast-communication-bus.js +521 -0
  216. package/.claude-flow-novice/dist/src/communication/ultra-fast-communication-bus.js.map +1 -0
  217. package/.claude-flow-novice/dist/src/communication/ultra-fast-serialization.js +563 -0
  218. package/.claude-flow-novice/dist/src/communication/ultra-fast-serialization.js.map +1 -0
  219. package/.claude-flow-novice/dist/src/communication/websocket-cluster.js +344 -0
  220. package/.claude-flow-novice/dist/src/communication/websocket-cluster.js.map +1 -0
  221. package/.claude-flow-novice/dist/src/communication/zero-copy-structures.js +369 -0
  222. package/.claude-flow-novice/dist/src/communication/zero-copy-structures.js.map +1 -0
  223. package/.claude-flow-novice/dist/src/config/config-manager.js +1 -1
  224. package/.claude-flow-novice/dist/src/config/config-manager.js.map +1 -1
  225. package/.claude-flow-novice/dist/src/config/core/intelligent-configuration-manager.js +1 -1
  226. package/.claude-flow-novice/dist/src/config/integration/hooks-integration.js +6 -6
  227. package/.claude-flow-novice/dist/src/config/integration/hooks-integration.js.map +1 -1
  228. package/.claude-flow-novice/dist/src/config/migration/config-migration.js +1 -1
  229. package/.claude-flow-novice/dist/src/config/ruv-swarm-integration.js +1 -1
  230. package/.claude-flow-novice/dist/src/config/utils/zero-config-setup.js +1 -1
  231. package/.claude-flow-novice/dist/src/config/utils/zero-config-setup.js.map +1 -1
  232. package/.claude-flow-novice/dist/src/config/web-portal-config.js +0 -9
  233. package/.claude-flow-novice/dist/src/config/web-portal-config.js.map +1 -1
  234. package/.claude-flow-novice/dist/src/config/zero-config-setup.js +18 -18
  235. package/.claude-flow-novice/dist/src/config/zero-config-setup.js.map +1 -1
  236. package/.claude-flow-novice/dist/src/core/logger.js +33 -10
  237. package/.claude-flow-novice/dist/src/core/logger.js.map +1 -1
  238. package/.claude-flow-novice/dist/src/migration/index.js +1 -1
  239. package/.claude-flow-novice/dist/src/migration/index.js.map +1 -1
  240. package/.claude-flow-novice/dist/src/migration/migration-runner.js +4 -4
  241. package/.claude-flow-novice/dist/src/migration/migration-runner.js.map +1 -1
  242. package/.claude-flow-novice/dist/src/monitoring/agent-health-monitor.js +430 -0
  243. package/.claude-flow-novice/dist/src/monitoring/agent-health-monitor.js.map +1 -0
  244. package/.claude-flow-novice/dist/src/slash-commands/claude-soul.js +248 -365
  245. package/.claude-flow-novice/dist/src/slash-commands/register-all-commands.js +1 -1
  246. package/.claude-flow-novice/dist/src/swarm/claude-code-interface.js +1 -1
  247. package/.claude-flow-novice/dist/src/swarm/claude-flow-executor.js +1 -1
  248. package/.claude-flow-novice/dist/src/swarm/consensus-coordinator.js +471 -0
  249. package/.claude-flow-novice/dist/src/swarm/consensus-coordinator.js.map +1 -0
  250. package/.claude-flow-novice/dist/src/swarm/hive-mind-integration.js +1 -1
  251. package/.claude-flow-novice/dist/src/swarm/large-scale-coordinator.js +543 -0
  252. package/.claude-flow-novice/dist/src/swarm/large-scale-coordinator.js.map +1 -0
  253. package/.claude-flow-novice/dist/src/swarm/optimizations/connection-pool.js +1 -1
  254. package/.claude-flow-novice/dist/src/swarm/optimizations/optimized-executor.js +1 -1
  255. package/.claude-flow-novice/dist/src/swarm/types.js.map +1 -1
  256. package/.claude-flow-novice/dist/src/swarm-fullstack/integrations/communication-bridge.js +709 -0
  257. package/.claude-flow-novice/dist/src/swarm-fullstack/integrations/communication-bridge.js.map +1 -0
  258. package/.claude-flow-novice/dist/src/swarm-fullstack/testing/api-contract-validator.js +612 -0
  259. package/.claude-flow-novice/dist/src/swarm-fullstack/testing/api-contract-validator.js.map +1 -0
  260. package/.claude-flow-novice/dist/src/swarm-fullstack/testing/backend-test-orchestrator.js +679 -0
  261. package/.claude-flow-novice/dist/src/swarm-fullstack/testing/backend-test-orchestrator.js.map +1 -0
  262. package/.claude-flow-novice/dist/src/swarm-fullstack/testing/frontend-test-orchestrator.js +654 -0
  263. package/.claude-flow-novice/dist/src/swarm-fullstack/testing/frontend-test-orchestrator.js.map +1 -0
  264. package/.claude-flow-novice/dist/src/swarm-fullstack/testing/visual-regression.js +402 -0
  265. package/.claude-flow-novice/dist/src/swarm-fullstack/testing/visual-regression.js.map +1 -0
  266. package/.claude-flow-novice/dist/src/swarm-fullstack/workflows/convergence-detector.js +459 -0
  267. package/.claude-flow-novice/dist/src/swarm-fullstack/workflows/convergence-detector.js.map +1 -0
  268. package/.claude-flow-novice/dist/src/swarm-fullstack/workflows/fix-coordinator.js +513 -0
  269. package/.claude-flow-novice/dist/src/swarm-fullstack/workflows/fix-coordinator.js.map +1 -0
  270. package/.claude-flow-novice/dist/src/swarm-fullstack/workflows/index.js +19 -0
  271. package/.claude-flow-novice/dist/src/swarm-fullstack/workflows/index.js.map +1 -0
  272. package/.claude-flow-novice/dist/src/swarm-fullstack/workflows/iterative-build-test.js +568 -0
  273. package/.claude-flow-novice/dist/src/swarm-fullstack/workflows/iterative-build-test.js.map +1 -0
  274. package/.claude-flow-novice/dist/src/swarm-fullstack/workflows/regression-test-manager.js +418 -0
  275. package/.claude-flow-novice/dist/src/swarm-fullstack/workflows/regression-test-manager.js.map +1 -0
  276. package/.claude-flow-novice/dist/src/swarm-fullstack/workflows/test-result-analyzer.js +530 -0
  277. package/.claude-flow-novice/dist/src/swarm-fullstack/workflows/test-result-analyzer.js.map +1 -0
  278. package/.claude-flow-novice/dist/src/swarm-fullstack/workflows/workflow-metrics.js +250 -0
  279. package/.claude-flow-novice/dist/src/swarm-fullstack/workflows/workflow-metrics.js.map +1 -0
  280. package/.claude-flow-novice/dist/src/task/index.js +7 -7
  281. package/.claude-flow-novice/dist/src/validation/fullstack-integration-validator.js +420 -0
  282. package/.claude-flow-novice/dist/src/validation/fullstack-integration-validator.js.map +1 -0
  283. package/.claude-flow-novice/dist/src/validation/production-validator.js +1435 -0
  284. package/.claude-flow-novice/dist/src/validation/production-validator.js.map +1 -0
  285. package/.claude-flow-novice/dist/src/verification/cli-integration.js +3 -3
  286. package/.claude-flow-novice/dist/src/verification/hooks.js +1 -1
  287. package/CHANGELOG.md +13 -0
  288. package/CLAUDE.md +1032 -61
  289. package/README.md +0 -1
  290. package/config/build/babel.config.cjs +19 -11
  291. package/config/typescript/tsconfig.json +1 -1
  292. package/examples/02-workflows/claude-workflow.json +5 -5
  293. package/examples/claude-api-error-handling.ts +2 -2
  294. package/examples/frontend-testing-demo.ts +470 -0
  295. package/examples/litellm/config/config.yaml +1 -1
  296. package/package.json +13 -7
  297. package/scripts/build/unified-builder.sh +6 -6
  298. package/scripts/build/validate-agents.js +238 -0
  299. package/scripts/post-install-claude-md.js +28 -0
  300. package/scripts/run-production-validation.ts +590 -0
  301. package/scripts/test/test-coordination-features.ts +2 -2
  302. package/scripts/validate-stage3-performance.ts +377 -0
  303. package/src/cli/simple-commands/hooks.js +1 -0
  304. package/src/cli/simple-commands/init/agent-copier.js +0 -2
  305. package/src/cli/simple-commands/init/index.js +18 -110
  306. package/src/cli/simple-commands/init/templates/CLAUDE.md +162 -1158
  307. package/src/cli/simple-commands/init/templates/claude-md.js +38 -157
  308. package/src/swarm-fullstack/integrations/communication-bridge.ts +931 -0
  309. package/src/swarm-fullstack/testing/api-contract-validator.ts +909 -0
  310. package/src/swarm-fullstack/testing/backend-test-orchestrator.ts +791 -0
  311. package/src/swarm-fullstack/testing/frontend-test-orchestrator.ts +853 -0
  312. package/src/swarm-fullstack/testing/visual-regression.ts +507 -0
  313. package/src/swarm-fullstack/workflows/convergence-detector.ts +736 -0
  314. package/src/swarm-fullstack/workflows/fix-coordinator.ts +677 -0
  315. package/src/swarm-fullstack/workflows/index.ts +75 -0
  316. package/src/swarm-fullstack/workflows/iterative-build-test.ts +829 -0
  317. package/src/swarm-fullstack/workflows/regression-test-manager.ts +590 -0
  318. package/src/swarm-fullstack/workflows/test-result-analyzer.ts +739 -0
  319. package/src/swarm-fullstack/workflows/workflow-metrics.ts +399 -0
  320. package/wiki/command-reference/README.md +1 -2
  321. package/wiki/command-reference/mcp-tools/README.md +1 -1
  322. package/wiki/getting-started/claude-code-mcp/README.md +1 -2
  323. package/wiki/getting-started/installation/README.md +2 -10
  324. package/.claude/agents/backend-dev.json +0 -9
  325. package/.claude/agents/code-analyzer.json +0 -9
  326. package/.claude/agents/coder.json +0 -9
  327. package/.claude/agents/planner.json +0 -9
  328. package/.claude/agents/researcher.json +0 -9
  329. package/.claude/agents/reviewer.json +0 -9
  330. package/.claude/agents/system-architect.json +0 -9
  331. package/.claude/agents/tester.json +0 -9
  332. package/.claude/commands/flow-nexus/app-store.md +0 -124
  333. package/.claude/commands/flow-nexus/challenges.md +0 -120
  334. package/.claude/commands/flow-nexus/login-registration.md +0 -65
  335. package/.claude/commands/flow-nexus/neural-network.md +0 -134
  336. package/.claude/commands/flow-nexus/payments.md +0 -116
  337. package/.claude/commands/flow-nexus/sandbox.md +0 -83
  338. package/.claude/commands/flow-nexus/swarm.md +0 -87
  339. package/.claude/commands/flow-nexus/user-tools.md +0 -152
  340. package/.claude/commands/flow-nexus/workflow.md +0 -115
  341. package/.claude-flow-novice/dist/cli/index.js +0 -45
  342. package/.claude-flow-novice/dist/core/index.js +0 -22
  343. package/.claude-flow-novice/dist/mcp/mcp-server-novice.js +0 -595
  344. package/.claude-flow-novice/dist/mcp/mcp-server-sdk.js +0 -649
  345. package/.claude-flow-novice/dist/mcp/mcp-server-with-slash-commands.js +0 -776
  346. package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/claude-md.js +0 -1101
  347. package/src/cli/simple-commands/init/templates/CLAUDE.md.optimized +0 -265
  348. /package/{.claude → .claude-flow-novice/.claude}/agents/README.md +0 -0
  349. /package/{.claude → .claude-flow-novice/.claude}/agents/consensus/README.md +0 -0
  350. /package/{.claude → .claude-flow-novice/.claude}/agents/core/coder.md +0 -0
  351. /package/{.claude → .claude-flow-novice/.claude}/agents/core/planner.md +0 -0
  352. /package/{.claude → .claude-flow-novice/.claude}/agents/core/researcher.md +0 -0
  353. /package/{.claude → .claude-flow-novice/.claude}/agents/core/reviewer.md +0 -0
  354. /package/{.claude → .claude-flow-novice/.claude}/agents/core/tester.md +0 -0
  355. /package/{.claude → .claude-flow-novice/.claude}/agents/optimization/README.md +0 -0
  356. /package/{.claude → .claude-flow-novice/.claude}/agents/swarm/README.md +0 -0
@@ -0,0 +1,459 @@
1
+ /**
2
+ * Convergence Detector - Determines When Iteration is Complete
3
+ *
4
+ * Monitors test pass rates, quality metrics, and progress indicators to
5
+ * determine when an iteration has converged and is ready to move forward.
6
+ *
7
+ * Key Features:
8
+ * - Multi-dimensional convergence analysis
9
+ * - Quality gate validation
10
+ * - Trend analysis
11
+ * - Early convergence detection
12
+ * - Divergence warnings
13
+ */ import { EventEmitter } from 'events';
14
+ export class ConvergenceDetector extends EventEmitter {
15
+ logger;
16
+ config;
17
+ iterationHistory = [];
18
+ constructor(logger, config){
19
+ super(), this.logger = logger;
20
+ this.config = {
21
+ threshold: 0.95,
22
+ minCoverage: 80,
23
+ requireStability: true,
24
+ stabilityWindow: 2,
25
+ enableTrendAnalysis: true,
26
+ qualityGates: [
27
+ {
28
+ name: 'Test Pass Rate',
29
+ metric: 'testPassRate',
30
+ threshold: 95,
31
+ operator: '>=',
32
+ blocking: true
33
+ },
34
+ {
35
+ name: 'Code Coverage',
36
+ metric: 'coverage.lines',
37
+ threshold: 80,
38
+ operator: '>=',
39
+ blocking: true
40
+ },
41
+ {
42
+ name: 'Critical Failures',
43
+ metric: 'criticalFailures',
44
+ threshold: 0,
45
+ operator: '===',
46
+ blocking: true
47
+ }
48
+ ],
49
+ ...config
50
+ };
51
+ }
52
+ /**
53
+ * Check if iteration has converged
54
+ */ async checkConvergence(check) {
55
+ this.logger.info('Checking convergence', {
56
+ iteration: check.iterationNumber,
57
+ passRate: check.testResults.passed / check.testResults.totalTests
58
+ });
59
+ // Add to history
60
+ this.iterationHistory.push(check.testResults);
61
+ // Calculate individual metrics
62
+ const metrics = this.calculateMetrics(check);
63
+ // Evaluate quality gates
64
+ const qualityGateResults = this.evaluateQualityGates(check.testResults, metrics);
65
+ // Analyze trends
66
+ const trends = this.config.enableTrendAnalysis ? this.analyzeTrends(check) : this.getDefaultTrends();
67
+ // Determine if converged
68
+ const converged = this.determineConvergence(metrics, qualityGateResults, trends);
69
+ // Calculate confidence
70
+ const confidence = this.calculateConfidence(metrics, qualityGateResults, trends);
71
+ // Generate recommendations
72
+ const recommendations = this.generateRecommendations(metrics, qualityGateResults, trends, converged);
73
+ // Identify blockers
74
+ const blockers = this.identifyBlockers(qualityGateResults, metrics);
75
+ const result = {
76
+ converged,
77
+ score: metrics.overallScore,
78
+ confidence,
79
+ metrics,
80
+ qualityGateResults,
81
+ recommendations,
82
+ blockers,
83
+ trends
84
+ };
85
+ // Emit event if converged
86
+ if (converged) {
87
+ this.emit('convergence:achieved', {
88
+ iteration: check.iterationNumber,
89
+ score: metrics.overallScore,
90
+ confidence
91
+ });
92
+ }
93
+ // Emit warning if diverging
94
+ if (trends.improving === false && check.iterationNumber > 2) {
95
+ this.emit('convergence:diverging', {
96
+ iteration: check.iterationNumber,
97
+ riskFactors: trends.riskFactors
98
+ });
99
+ }
100
+ return result;
101
+ }
102
+ /**
103
+ * Calculate convergence metrics
104
+ */ calculateMetrics(check) {
105
+ const { testResults } = check;
106
+ // Test pass rate (0-1)
107
+ const testPassRate = testResults.totalTests > 0 ? testResults.passed / testResults.totalTests : 0;
108
+ // Coverage score (0-1)
109
+ const coverageScore = this.calculateCoverageScore(testResults.coverage);
110
+ // Quality score based on failures and warnings (0-1)
111
+ const qualityScore = this.calculateQualityScore(testResults);
112
+ // Stability score based on recent iterations (0-1)
113
+ const stabilityScore = this.calculateStabilityScore(check);
114
+ // Velocity score based on improvement rate (0-1)
115
+ const velocityScore = this.calculateVelocityScore();
116
+ // Overall score (weighted average)
117
+ const overallScore = testPassRate * 0.4 + coverageScore * 0.25 + qualityScore * 0.2 + stabilityScore * 0.1 + velocityScore * 0.05;
118
+ return {
119
+ testPassRate,
120
+ coverageScore,
121
+ qualityScore,
122
+ stabilityScore,
123
+ velocityScore,
124
+ overallScore
125
+ };
126
+ }
127
+ /**
128
+ * Calculate coverage score from coverage metrics
129
+ */ calculateCoverageScore(coverage) {
130
+ const { lines, functions, branches, statements } = coverage;
131
+ // Weighted average of coverage metrics
132
+ const score = (lines * 0.3 + functions * 0.25 + branches * 0.25 + statements * 0.2) / 100;
133
+ return Math.min(Math.max(score, 0), 1);
134
+ }
135
+ /**
136
+ * Calculate quality score based on failures and warnings
137
+ */ calculateQualityScore(testResults) {
138
+ let score = 1.0;
139
+ // Penalize for failures
140
+ const criticalFailures = testResults.failures.filter((f)=>f.severity === 'critical').length;
141
+ const highFailures = testResults.failures.filter((f)=>f.severity === 'high').length;
142
+ const mediumFailures = testResults.failures.filter((f)=>f.severity === 'medium').length;
143
+ score -= criticalFailures * 0.2;
144
+ score -= highFailures * 0.1;
145
+ score -= mediumFailures * 0.05;
146
+ // Penalize for warnings
147
+ const highWarnings = testResults.warnings.filter((w)=>w.severity === 'high').length;
148
+ const mediumWarnings = testResults.warnings.filter((w)=>w.severity === 'medium').length;
149
+ score -= highWarnings * 0.02;
150
+ score -= mediumWarnings * 0.01;
151
+ return Math.max(score, 0);
152
+ }
153
+ /**
154
+ * Calculate stability score based on recent iterations
155
+ */ calculateStabilityScore(check) {
156
+ if (this.iterationHistory.length < 2) return 0.5;
157
+ const recent = this.iterationHistory.slice(-this.config.stabilityWindow);
158
+ // Calculate variance in pass rate
159
+ const passRates = recent.map((r)=>r.passed / r.totalTests);
160
+ const variance = this.calculateVariance(passRates);
161
+ // Lower variance = higher stability
162
+ const stabilityScore = 1 - Math.min(variance * 10, 1);
163
+ return stabilityScore;
164
+ }
165
+ /**
166
+ * Calculate velocity score (rate of improvement)
167
+ */ calculateVelocityScore() {
168
+ if (this.iterationHistory.length < 2) return 0.5;
169
+ const recent = this.iterationHistory.slice(-3);
170
+ const passRates = recent.map((r)=>r.passed / r.totalTests);
171
+ // Check if improving
172
+ let improving = true;
173
+ for(let i = 1; i < passRates.length; i++){
174
+ if (passRates[i] <= passRates[i - 1]) {
175
+ improving = false;
176
+ break;
177
+ }
178
+ }
179
+ if (!improving) return 0.3;
180
+ // Calculate improvement rate
181
+ const totalImprovement = passRates[passRates.length - 1] - passRates[0];
182
+ const velocityScore = Math.min(totalImprovement * 2, 1);
183
+ return velocityScore;
184
+ }
185
+ /**
186
+ * Evaluate quality gates
187
+ */ evaluateQualityGates(testResults, metrics) {
188
+ return this.config.qualityGates.map((gate)=>{
189
+ const actualValue = this.getMetricValue(gate.metric, testResults, metrics);
190
+ const passed = this.evaluateCondition(actualValue, gate.operator, gate.threshold);
191
+ return {
192
+ gate,
193
+ passed,
194
+ actualValue,
195
+ threshold: gate.threshold,
196
+ blocking: gate.blocking
197
+ };
198
+ });
199
+ }
200
+ /**
201
+ * Get metric value from test results or metrics
202
+ */ getMetricValue(metric, testResults, metrics) {
203
+ // Handle nested properties
204
+ if (metric.includes('.')) {
205
+ const parts = metric.split('.');
206
+ let value = testResults;
207
+ for (const part of parts){
208
+ value = value[part];
209
+ if (value === undefined) break;
210
+ }
211
+ return typeof value === 'number' ? value : 0;
212
+ }
213
+ // Handle special metrics
214
+ if (metric === 'testPassRate') {
215
+ return metrics.testPassRate * 100;
216
+ }
217
+ if (metric === 'criticalFailures') {
218
+ return testResults.failures.filter((f)=>f.severity === 'critical').length;
219
+ }
220
+ return 0;
221
+ }
222
+ /**
223
+ * Evaluate condition
224
+ */ evaluateCondition(actualValue, operator, threshold) {
225
+ switch(operator){
226
+ case '>':
227
+ return actualValue > threshold;
228
+ case '<':
229
+ return actualValue < threshold;
230
+ case '>=':
231
+ return actualValue >= threshold;
232
+ case '<=':
233
+ return actualValue <= threshold;
234
+ case '===':
235
+ return actualValue === threshold;
236
+ default:
237
+ return false;
238
+ }
239
+ }
240
+ /**
241
+ * Analyze trends
242
+ */ analyzeTrends(check) {
243
+ if (this.iterationHistory.length < 2) {
244
+ return this.getDefaultTrends();
245
+ }
246
+ const recent = this.iterationHistory.slice(-3);
247
+ const passRates = recent.map((r)=>r.passed / r.totalTests);
248
+ // Check if improving
249
+ const improving = this.isImproving(passRates);
250
+ // Calculate velocity (rate of change)
251
+ const velocity = this.calculateTrendVelocity(passRates);
252
+ // Project iterations to convergence
253
+ const iterationsToConvergence = this.projectIterationsToConvergence(passRates, velocity, this.config.threshold);
254
+ // Identify risk factors
255
+ const riskFactors = this.identifyRiskFactors(passRates, velocity, check);
256
+ return {
257
+ improving,
258
+ velocity,
259
+ projection: {
260
+ iterationsToConvergence,
261
+ estimatedCompletion: new Date(Date.now() + iterationsToConvergence * 1800000).toISOString()
262
+ },
263
+ riskFactors
264
+ };
265
+ }
266
+ /**
267
+ * Determine if trend is improving
268
+ */ isImproving(values) {
269
+ if (values.length < 2) return true;
270
+ let improvementCount = 0;
271
+ for(let i = 1; i < values.length; i++){
272
+ if (values[i] > values[i - 1]) improvementCount++;
273
+ }
274
+ return improvementCount > values.length / 2;
275
+ }
276
+ /**
277
+ * Calculate trend velocity
278
+ */ calculateTrendVelocity(values) {
279
+ if (values.length < 2) return 0;
280
+ const changes = [];
281
+ for(let i = 1; i < values.length; i++){
282
+ changes.push(values[i] - values[i - 1]);
283
+ }
284
+ return changes.reduce((sum, change)=>sum + change, 0) / changes.length;
285
+ }
286
+ /**
287
+ * Project iterations to convergence
288
+ */ projectIterationsToConvergence(passRates, velocity, threshold) {
289
+ if (passRates.length === 0) return 10;
290
+ const currentRate = passRates[passRates.length - 1];
291
+ const gap = threshold - currentRate;
292
+ if (velocity <= 0) return 999; // Not converging
293
+ if (gap <= 0) return 0; // Already converged
294
+ return Math.ceil(gap / velocity);
295
+ }
296
+ /**
297
+ * Identify risk factors
298
+ */ identifyRiskFactors(passRates, velocity, check) {
299
+ const risks = [];
300
+ // Negative velocity
301
+ if (velocity < 0) {
302
+ risks.push('Test pass rate is decreasing');
303
+ }
304
+ // Stagnant progress
305
+ if (Math.abs(velocity) < 0.01 && passRates[passRates.length - 1] < this.config.threshold) {
306
+ risks.push('Progress has stagnated');
307
+ }
308
+ // Critical failures
309
+ const criticalFailures = check.testResults.failures.filter((f)=>f.severity === 'critical').length;
310
+ if (criticalFailures > 0) {
311
+ risks.push(`${criticalFailures} critical test failures present`);
312
+ }
313
+ // Low coverage
314
+ const avgCoverage = (check.testResults.coverage.lines + check.testResults.coverage.functions + check.testResults.coverage.branches) / 3;
315
+ if (avgCoverage < this.config.minCoverage) {
316
+ risks.push(`Code coverage (${avgCoverage.toFixed(1)}%) below threshold`);
317
+ }
318
+ // High iteration count
319
+ if (check.iterationNumber > 7) {
320
+ risks.push('High iteration count may indicate design issues');
321
+ }
322
+ return risks;
323
+ }
324
+ /**
325
+ * Determine convergence
326
+ */ determineConvergence(metrics, qualityGateResults, trends) {
327
+ // Check if all blocking quality gates pass
328
+ const blockingGatesPassed = qualityGateResults.filter((r)=>r.gate.blocking).every((r)=>r.passed);
329
+ if (!blockingGatesPassed) return false;
330
+ // Check overall score
331
+ if (metrics.overallScore < this.config.threshold) return false;
332
+ // Check stability if required
333
+ if (this.config.requireStability && metrics.stabilityScore < 0.7) return false;
334
+ // Check if improving
335
+ if (this.config.enableTrendAnalysis && !trends.improving) return false;
336
+ return true;
337
+ }
338
+ /**
339
+ * Calculate confidence level
340
+ */ calculateConfidence(metrics, qualityGateResults, trends) {
341
+ let confidence = 0.5;
342
+ // High pass rate increases confidence
343
+ confidence += metrics.testPassRate * 0.2;
344
+ // High coverage increases confidence
345
+ confidence += metrics.coverageScore * 0.15;
346
+ // High quality increases confidence
347
+ confidence += metrics.qualityScore * 0.1;
348
+ // Stability increases confidence
349
+ confidence += metrics.stabilityScore * 0.1;
350
+ // All quality gates passing increases confidence
351
+ const allGatesPassed = qualityGateResults.every((r)=>r.passed);
352
+ if (allGatesPassed) confidence += 0.15;
353
+ // Positive trends increase confidence
354
+ if (trends.improving && trends.velocity > 0) confidence += 0.1;
355
+ return Math.min(confidence, 1);
356
+ }
357
+ /**
358
+ * Generate recommendations
359
+ */ generateRecommendations(metrics, qualityGateResults, trends, converged) {
360
+ const recommendations = [];
361
+ if (converged) {
362
+ recommendations.push('Iteration has converged - ready to proceed');
363
+ recommendations.push('Consider final validation before deployment');
364
+ return recommendations;
365
+ }
366
+ // Test pass rate recommendations
367
+ if (metrics.testPassRate < 0.9) {
368
+ recommendations.push(`Focus on fixing remaining test failures (${((1 - metrics.testPassRate) * 100).toFixed(1)}% failing)`);
369
+ }
370
+ // Coverage recommendations
371
+ if (metrics.coverageScore < 0.8) {
372
+ recommendations.push(`Increase test coverage (current: ${(metrics.coverageScore * 100).toFixed(1)}%)`);
373
+ }
374
+ // Quality recommendations
375
+ if (metrics.qualityScore < 0.8) {
376
+ recommendations.push('Address high-severity test failures and warnings');
377
+ }
378
+ // Stability recommendations
379
+ if (metrics.stabilityScore < 0.7) {
380
+ recommendations.push('Focus on stabilizing existing fixes before adding new changes');
381
+ }
382
+ // Trend recommendations
383
+ if (!trends.improving) {
384
+ recommendations.push('Re-evaluate fix strategies - current approach may not be effective');
385
+ }
386
+ // Failed quality gates
387
+ const failedGates = qualityGateResults.filter((r)=>!r.passed);
388
+ for (const result of failedGates){
389
+ recommendations.push(`Address quality gate: ${result.gate.name} (${result.actualValue} ${result.gate.operator} ${result.threshold})`);
390
+ }
391
+ return recommendations;
392
+ }
393
+ /**
394
+ * Identify blockers
395
+ */ identifyBlockers(qualityGateResults, metrics) {
396
+ const blockers = [];
397
+ // Failed blocking quality gates
398
+ const failedBlockingGates = qualityGateResults.filter((r)=>r.gate.blocking && !r.passed);
399
+ for (const result of failedBlockingGates){
400
+ blockers.push(`Blocking quality gate failed: ${result.gate.name} (${result.actualValue} ${result.gate.operator} ${result.threshold})`);
401
+ }
402
+ return blockers;
403
+ }
404
+ /**
405
+ * Calculate variance
406
+ */ calculateVariance(values) {
407
+ if (values.length === 0) return 0;
408
+ const mean = values.reduce((sum, v)=>sum + v, 0) / values.length;
409
+ const squaredDiffs = values.map((v)=>Math.pow(v - mean, 2));
410
+ const variance = squaredDiffs.reduce((sum, v)=>sum + v, 0) / values.length;
411
+ return variance;
412
+ }
413
+ /**
414
+ * Get default trends
415
+ */ getDefaultTrends() {
416
+ return {
417
+ improving: true,
418
+ velocity: 0,
419
+ projection: {
420
+ iterationsToConvergence: 5,
421
+ estimatedCompletion: new Date(Date.now() + 5 * 1800000).toISOString()
422
+ },
423
+ riskFactors: []
424
+ };
425
+ }
426
+ /**
427
+ * Reset detector for new workflow
428
+ */ reset() {
429
+ this.iterationHistory = [];
430
+ }
431
+ /**
432
+ * Get current status
433
+ */ getStatus() {
434
+ const iterations = this.iterationHistory.length;
435
+ if (iterations === 0) {
436
+ return {
437
+ iterations: 0,
438
+ currentPassRate: 0,
439
+ trend: 'unknown'
440
+ };
441
+ }
442
+ const latest = this.iterationHistory[iterations - 1];
443
+ const currentPassRate = latest.passed / latest.totalTests;
444
+ let trend = 'stable';
445
+ if (iterations > 1) {
446
+ const previous = this.iterationHistory[iterations - 2];
447
+ const previousPassRate = previous.passed / previous.totalTests;
448
+ if (currentPassRate > previousPassRate + 0.05) trend = 'improving';
449
+ else if (currentPassRate < previousPassRate - 0.05) trend = 'declining';
450
+ }
451
+ return {
452
+ iterations,
453
+ currentPassRate,
454
+ trend
455
+ };
456
+ }
457
+ }
458
+
459
+ //# sourceMappingURL=convergence-detector.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../src/swarm-fullstack/workflows/convergence-detector.ts"],"names":["EventEmitter","ConvergenceDetector","config","iterationHistory","logger","threshold","minCoverage","requireStability","stabilityWindow","enableTrendAnalysis","qualityGates","name","metric","operator","blocking","checkConvergence","check","info","iteration","iterationNumber","passRate","testResults","passed","totalTests","push","metrics","calculateMetrics","qualityGateResults","evaluateQualityGates","trends","analyzeTrends","getDefaultTrends","converged","determineConvergence","confidence","calculateConfidence","recommendations","generateRecommendations","blockers","identifyBlockers","result","score","overallScore","emit","improving","riskFactors","testPassRate","coverageScore","calculateCoverageScore","coverage","qualityScore","calculateQualityScore","stabilityScore","calculateStabilityScore","velocityScore","calculateVelocityScore","lines","functions","branches","statements","Math","min","max","criticalFailures","failures","filter","f","severity","length","highFailures","mediumFailures","highWarnings","warnings","w","mediumWarnings","recent","slice","passRates","map","r","variance","calculateVariance","i","totalImprovement","gate","actualValue","getMetricValue","evaluateCondition","includes","parts","split","value","part","undefined","isImproving","velocity","calculateTrendVelocity","iterationsToConvergence","projectIterationsToConvergence","identifyRiskFactors","projection","estimatedCompletion","Date","now","toISOString","values","improvementCount","changes","reduce","sum","change","currentRate","gap","ceil","risks","abs","avgCoverage","toFixed","blockingGatesPassed","every","allGatesPassed","failedGates","failedBlockingGates","mean","v","squaredDiffs","pow","reset","getStatus","iterations","currentPassRate","trend","latest","previous","previousPassRate"],"mappings":"AAAA;;;;;;;;;;;;CAYC,GAED,SAASA,YAAY,QAAQ,SAAS;AAmEtC,OAAO,MAAMC,4BAA4BD;;IAC/BE,OAA0B;IAC1BC,mBAA0C,EAAE,CAAC;IAErD,YAAY,AAAQC,MAAe,EAAEF,MAAmC,CAAE;QACxE,KAAK,SADaE,SAAAA;QAGlB,IAAI,CAACF,MAAM,GAAG;YACZG,WAAW;YACXC,aAAa;YACbC,kBAAkB;YAClBC,iBAAiB;YACjBC,qBAAqB;YACrBC,cAAc;gBACZ;oBACEC,MAAM;oBACNC,QAAQ;oBACRP,WAAW;oBACXQ,UAAU;oBACVC,UAAU;gBACZ;gBACA;oBACEH,MAAM;oBACNC,QAAQ;oBACRP,WAAW;oBACXQ,UAAU;oBACVC,UAAU;gBACZ;gBACA;oBACEH,MAAM;oBACNC,QAAQ;oBACRP,WAAW;oBACXQ,UAAU;oBACVC,UAAU;gBACZ;aACD;YACD,GAAGZ,MAAM;QACX;IACF;IAEA;;GAEC,GACD,MAAMa,iBAAiBC,KAAuB,EAA8B;QAC1E,IAAI,CAACZ,MAAM,CAACa,IAAI,CAAC,wBAAwB;YACvCC,WAAWF,MAAMG,eAAe;YAChCC,UAAUJ,MAAMK,WAAW,CAACC,MAAM,GAAGN,MAAMK,WAAW,CAACE,UAAU;QACnE;QAEA,iBAAiB;QACjB,IAAI,CAACpB,gBAAgB,CAACqB,IAAI,CAACR,MAAMK,WAAW;QAE5C,+BAA+B;QAC/B,MAAMI,UAAU,IAAI,CAACC,gBAAgB,CAACV;QAEtC,yBAAyB;QACzB,MAAMW,qBAAqB,IAAI,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