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
package/CLAUDE.md CHANGED
@@ -1,81 +1,1052 @@
1
- # Claude Flow Novice - AI Agent Orchestration
1
+ # Claude Code Configuration - react-typescript Development Environment
2
+
3
+ ## 🚨 CRITICAL: CONCURRENT EXECUTION & FILE MANAGEMENT
4
+
5
+ **ABSOLUTE RULES**:
6
+ 1. ALL operations MUST be concurrent/parallel in a single message
7
+ 2. **NEVER save working files, text/mds and tests to the root folder**
8
+ 3. ALWAYS organize files in appropriate subdirectories
9
+ 4. **USE CLAUDE CODE'S TASK TOOL** for spawning agents concurrently, not just MCP
10
+
11
+ ### ⚡ GOLDEN RULE: "1 MESSAGE = ALL RELATED OPERATIONS"
12
+
13
+ **MANDATORY PATTERNS:**
14
+ - **TodoWrite**: ALWAYS batch ALL todos in ONE call (5-10+ todos minimum)
15
+ - **Task tool (Claude Code)**: ALWAYS spawn ALL agents in ONE message with full instructions
16
+ - **File operations**: ALWAYS batch ALL reads/writes/edits in ONE message
17
+ - **Bash commands**: ALWAYS batch ALL terminal operations in ONE message
18
+ - **Memory operations**: ALWAYS batch ALL memory store/retrieve in ONE message
19
+
20
+ ### 🎯 CRITICAL: Claude Code Task Tool for Agent Execution
21
+
22
+ **Claude Code's Task tool is the PRIMARY way to spawn agents:**
23
+ ```javascript
24
+ // ✅ CORRECT: Use Claude Code's Task tool for parallel agent execution
25
+ [Single Message]:
26
+ Task("Research agent", "Analyze requirements and patterns...", "researcher")
27
+ Task("Coder agent", "Implement core features...", "coder")
28
+ Task("Tester agent", "Create comprehensive tests...", "tester")
29
+ Task("Reviewer agent", "Review code quality...", "reviewer")
30
+ Task("Architect agent", "Design system architecture...", "system-architect")
31
+ ```
32
+
33
+ ## Project Overview
34
+
35
+ **Project Type**: react-typescript
36
+ **Primary Language**: javascript
37
+ **Primary Framework**: react
38
+ **Package Manager**: npm
39
+ **Build Tools**: none
40
+
41
+ **Detected Languages**: javascript, typescript, rust, python
42
+ **Detected Frameworks**: react, express, vue, django, flask, nextjs, angular, spring, fastapi
43
+ **Project Directories**: src
44
+
45
+ *Auto-generated on 2025-09-29*
46
+
47
+ ## 📁 File Organization Rules
48
+
49
+ **NEVER save to root folder. Use these directories:**
50
+ - `/src` - Source code files
51
+ - `/tests` - Test files
52
+ - `/docs` - Documentation and markdown files
53
+ - `/config` - Configuration files
54
+ - `/scripts` - Utility scripts
55
+ - `/examples` - Example code
56
+
57
+ ## 🚀 Available Agent Types
58
+
59
+ ### Core Development
60
+ `coder`, `reviewer`, `tester`, `planner`, `researcher`
61
+
62
+ ### Backend Development
63
+ `backend-dev`, `api-docs`, `system-architect`, `code-analyzer`
64
+
65
+ ### Frontend Development
66
+ `mobile-dev` (React Native), specialized frontend agents
67
+
68
+ ### Testing & Validation
69
+ `tdd-london-swarm`, `production-validator`
70
+
71
+ ### GitHub & Repository Management
72
+ `github-modes`, `pr-manager`, `code-review-swarm`, `issue-tracker`, `release-manager`
73
+
74
+ ### Performance & Optimization
75
+ `perf-analyzer`, `performance-benchmarker`, `task-orchestrator`
76
+
77
+ ## 🎯 Claude Code vs MCP Tools
78
+
79
+ ### Claude Code Handles ALL EXECUTION:
80
+ - **Task tool**: Spawn and run agents concurrently for actual work
81
+ - File operations (Read, Write, Edit, MultiEdit, Glob, Grep)
82
+ - Code generation and programming
83
+ - Bash commands and system operations
84
+ - Implementation work
85
+
86
+ ### MCP Tools ONLY COORDINATE:
87
+ - Swarm initialization (topology setup)
88
+ - Agent type definitions (coordination patterns)
89
+ - Task orchestration (high-level planning)
90
+ - Memory management
91
+ - Performance tracking
92
+
93
+ **KEY**: MCP coordinates the strategy, Claude Code's Task tool executes with real agents.
94
+
95
+ ## 📋 Agent Coordination Protocol
96
+
97
+ ### Every Agent Spawned via Task Tool MUST:
98
+
99
+ **1️⃣ BEFORE Work:**
100
+ ```bash
101
+ npx claude-flow@alpha hooks pre-task --description "[task]"
102
+ npx claude-flow@alpha hooks session-restore --session-id "swarm-[id]"
103
+ ```
104
+
105
+ **2️⃣ DURING Work:**
106
+ ```bash
107
+ npx claude-flow@alpha hooks post-edit --file "[file]" --memory-key "swarm/[agent]/[step]"
108
+ npx claude-flow@alpha hooks notify --message "[what was done]"
109
+ ```
110
+
111
+ **3️⃣ AFTER Work:**
112
+ ```bash
113
+ npx claude-flow@alpha hooks post-task --task-id "[task]"
114
+ npx claude-flow@alpha hooks session-end --export-metrics true
115
+ ```
116
+
117
+ ## Build & Development Commands
118
+
119
+ ```bash
120
+ # Package management
121
+ npm install
122
+ npm run build
123
+ npm run test
124
+ npm run lint
125
+
126
+ # Claude Flow commands
127
+ npx claude-flow@alpha init
128
+ npx claude-flow@alpha hooks setup
129
+ npx claude-flow@alpha memory store
130
+ ```
2
131
 
3
- ## Core Orchestration Patterns
132
+ ## Javascript Configuration
4
133
 
5
- ### Parallel Execution Protocol
6
- ALL related operations MUST execute concurrently in single messages:
7
- - **TodoWrite**: Batch 5-10+ todos in one call
8
- - **File Operations**: Batch reads/writes/edits together
9
- - **Agent Spawning**: Use Task tool for concurrent agent execution
10
- - **Memory Operations**: Batch store/retrieve operations
134
+ ### JavaScript Development Patterns
135
+
136
+ **Code Style & Standards:**
137
+ - Use ES6+ features (arrow functions, destructuring, modules)
138
+ - Prefer `const`/`let` over `var`
139
+ - Use async/await over Promise chains
140
+ - Implement proper error boundaries
141
+ - Follow ESLint/Prettier configurations
142
+
143
+ **Concurrent Agent Execution:**
144
+ ```javascript
145
+ // ✅ CORRECT: JavaScript development with concurrent agents
146
+ [Single Message]:
147
+ Task("Frontend Developer", "Build responsive UI with modern JavaScript", "coder")
148
+ Task("API Developer", "Create REST endpoints with Express/Fastify", "backend-dev")
149
+ Task("Test Engineer", "Write Jest/Vitest tests with >85% coverage", "tester")
150
+ Task("Build Engineer", "Configure Webpack/Vite build system", "system-architect")
151
+ Task("Quality Reviewer", "Review code quality and performance", "reviewer")
152
+
153
+ // Batch all file operations
154
+ Write("src/app.js")
155
+ Write("src/api/routes.js")
156
+ Write("tests/app.test.js")
157
+ Write("webpack.config.js")
158
+
159
+ // Batch todos for tracking
160
+ TodoWrite({ todos: [
161
+ {content: "Set up project structure", status: "in_progress", activeForm: "Setting up project structure"},
162
+ {content: "Implement core modules", status: "pending", activeForm: "Implementing core modules"},
163
+ {content: "Add error handling", status: "pending", activeForm: "Adding error handling"},
164
+ {content: "Write comprehensive tests", status: "pending", activeForm: "Writing comprehensive tests"},
165
+ {content: "Configure build pipeline", status: "pending", activeForm: "Configuring build pipeline"}
166
+ ]})
167
+ ```
168
+
169
+ **Module Organization:**
170
+ ```javascript
171
+ // Preferred module structure
172
+ src/
173
+ components/ # Reusable components
174
+ utils/ # Helper functions
175
+ services/ # API and business logic
176
+ config/ # Configuration files
177
+ hooks/ # Custom hooks (if React)
178
+ types/ # Type definitions (if TypeScript)
179
+ ```
180
+
181
+ **Testing Patterns:**
182
+ ```javascript
183
+ import { jest } from '@jest/globals';
184
+
185
+ describe('Module Tests', () => {
186
+ beforeEach(() => {
187
+ jest.clearAllMocks();
188
+ });
189
+
190
+ test('handles async operations correctly', async () => {
191
+ const mockFn = jest.fn().mockResolvedValue({ success: true });
192
+ const result = await asyncOperation(mockFn);
193
+
194
+ expect(result).toEqual({ success: true });
195
+ expect(mockFn).toHaveBeenCalledTimes(1);
196
+ });
197
+
198
+ test('handles errors gracefully', async () => {
199
+ const mockFn = jest.fn().mockRejectedValue(new Error('Test error'));
200
+
201
+ await expect(asyncOperation(mockFn)).rejects.toThrow('Test error');
202
+ });
203
+ });
204
+ ```
205
+
206
+ **Performance Best Practices:**
207
+ - Use code splitting for large applications
208
+ - Implement lazy loading for routes/components
209
+ - Minimize bundle size with tree shaking
210
+ - Use Web Workers for heavy computations
211
+ - Implement proper caching strategies
212
+
213
+ **Error Handling:**
214
+ ```javascript
215
+ // Global error handler
216
+ process.on('unhandledRejection', (reason, promise) => {
217
+ console.error('Unhandled Rejection at:', promise, 'reason:', reason);
218
+ // Application specific logging logic here
219
+ });
220
+
221
+ // Async error wrapper
222
+ const asyncHandler = (fn) => (req, res, next) => {
223
+ Promise.resolve(fn(req, res, next)).catch(next);
224
+ };
225
+ ```
226
+
227
+ **Environment Configuration:**
228
+ ```javascript
229
+ // config/index.js
230
+ const config = {
231
+ development: {
232
+ api: {
233
+ baseURL: 'http://localhost:3000',
234
+ timeout: 5000
235
+ }
236
+ },
237
+ production: {
238
+ api: {
239
+ baseURL: process.env.API_BASE_URL,
240
+ timeout: 10000
241
+ }
242
+ }
243
+ };
244
+
245
+ export default config[process.env.NODE_ENV || 'development'];
246
+ ```
11
247
 
12
- ### Agent Coordination Framework
248
+ ## Typescript Configuration
13
249
 
14
- #### Pre-Task Hooks (Setup & Validation)
15
- ```bash
16
- # Validate safety and prepare resources
17
- npx claude-flow-novice hooks pre-command --command "[command]" --validate-safety true --prepare-resources true
250
+ ### TypeScript Configuration & Patterns
251
+
252
+ **Type Safety & Standards:**
253
+ - Use strict TypeScript configuration
254
+ - Prefer interfaces over types for object shapes
255
+ - Use utility types (Partial, Pick, Omit, Record)
256
+ - Implement proper generic constraints
257
+ - Avoid `any` type - use `unknown` when necessary
258
+
259
+ **TypeScript Config (tsconfig.json):**
260
+ ```json
261
+ {
262
+ "compilerOptions": {
263
+ "target": "ES2020",
264
+ "module": "ESNext",
265
+ "lib": ["ES2020", "DOM", "DOM.Iterable"],
266
+ "strict": true,
267
+ "noImplicitReturns": true,
268
+ "noUnusedLocals": true,
269
+ "noUnusedParameters": true,
270
+ "exactOptionalPropertyTypes": true,
271
+ "skipLibCheck": true,
272
+ "esModuleInterop": true,
273
+ "allowSyntheticDefaultImports": true,
274
+ "forceConsistentCasingInFileNames": true,
275
+ "moduleResolution": "node",
276
+ "resolveJsonModule": true,
277
+ "isolatedModules": true,
278
+ "noEmit": true
279
+ },
280
+ "include": ["src/**/*"],
281
+ "exclude": ["node_modules", "dist", "build"]
282
+ }
283
+ ```
284
+
285
+ **Concurrent Agent Execution:**
286
+ ```typescript
287
+ // ✅ CORRECT: TypeScript development with strict typing
288
+ [Single Message]:
289
+ Task("TypeScript Developer", "Build type-safe modules with generics", "coder")
290
+ Task("Interface Designer", "Design comprehensive type definitions", "system-architect")
291
+ Task("Test Engineer", "Write typed tests with Jest and @types", "tester")
292
+ Task("Build Engineer", "Configure TypeScript compilation pipeline", "backend-dev")
293
+ Task("Type Reviewer", "Review type safety and consistency", "reviewer")
294
+
295
+ // Batch file operations with TypeScript focus
296
+ Write("src/types/api.ts")
297
+ Write("src/services/ApiService.ts")
298
+ Write("src/utils/validators.ts")
299
+ Write("tests/ApiService.test.ts")
300
+
301
+ // TypeScript-specific todos
302
+ TodoWrite({ todos: [
303
+ {content: "Define core type interfaces", status: "in_progress", activeForm: "Defining core type interfaces"},
304
+ {content: "Implement generic utility functions", status: "pending", activeForm: "Implementing generic utility functions"},
305
+ {content: "Add runtime type validation", status: "pending", activeForm: "Adding runtime type validation"},
306
+ {content: "Configure path mapping aliases", status: "pending", activeForm: "Configuring path mapping aliases"},
307
+ {content: "Setup strict linting rules", status: "pending", activeForm: "Setting up strict linting rules"}
308
+ ]})
309
+ ```
310
+
311
+ **Type Definitions Pattern:**
312
+ ```typescript
313
+ // types/api.ts
314
+ export interface ApiResponse<T = unknown> {
315
+ data: T;
316
+ message: string;
317
+ status: 'success' | 'error';
318
+ timestamp: string;
319
+ }
320
+
321
+ export interface PaginatedResponse<T> extends ApiResponse<T[]> {
322
+ pagination: {
323
+ page: number;
324
+ limit: number;
325
+ total: number;
326
+ hasNext: boolean;
327
+ };
328
+ }
329
+
330
+ // Generic service interface
331
+ export interface CRUDService<T, CreateT = Partial<T>, UpdateT = Partial<T>> {
332
+ getAll(): Promise<ApiResponse<T[]>>;
333
+ getById(id: string): Promise<ApiResponse<T>>;
334
+ create(data: CreateT): Promise<ApiResponse<T>>;
335
+ update(id: string, data: UpdateT): Promise<ApiResponse<T>>;
336
+ delete(id: string): Promise<ApiResponse<void>>;
337
+ }
338
+ ```
339
+
340
+ **Advanced TypeScript Patterns:**
341
+ ```typescript
342
+ // Utility types for better type inference
343
+ type NonNullable<T> = T extends null | undefined ? never : T;
344
+
345
+ // Conditional types for API responses
346
+ type ApiResult<T> = T extends string
347
+ ? ApiResponse<string>
348
+ : T extends number
349
+ ? ApiResponse<number>
350
+ : ApiResponse<T>;
351
+
352
+ // Template literal types for routes
353
+ type HttpMethod = 'GET' | 'POST' | 'PUT' | 'DELETE';
354
+ type ApiRoute<T extends string> = `/api/${T}`;
355
+
356
+ // Branded types for stronger type safety
357
+ type UserId = string & { readonly __brand: unique symbol };
358
+ type Email = string & { readonly __brand: unique symbol };
359
+
360
+ // Factory function with proper typing
361
+ function createUserId(value: string): UserId {
362
+ // Runtime validation here
363
+ return value as UserId;
364
+ }
365
+ ```
366
+
367
+ **Testing with TypeScript:**
368
+ ```typescript
369
+ import { describe, it, expect, jest, beforeEach } from '@jest/globals';
370
+
371
+ interface MockApiService {
372
+ fetchUser: jest.MockedFunction<(id: string) => Promise<User>>;
373
+ }
374
+
375
+ describe('UserService', () => {
376
+ let mockApi: MockApiService;
377
+ let userService: UserService;
378
+
379
+ beforeEach(() => {
380
+ mockApi = {
381
+ fetchUser: jest.fn()
382
+ };
383
+ userService = new UserService(mockApi);
384
+ });
385
+
386
+ it('should fetch user with proper typing', async () => {
387
+ const mockUser: User = {
388
+ id: 'user-123',
389
+ name: 'Test User',
390
+ email: 'test@example.com'
391
+ };
392
+
393
+ mockApi.fetchUser.mockResolvedValue(mockUser);
394
+
395
+ const result = await userService.getUser('user-123');
396
+
397
+ expect(result).toEqual(mockUser);
398
+ expect(mockApi.fetchUser).toHaveBeenCalledWith('user-123');
399
+ });
400
+ });
401
+ ```
402
+
403
+ **Error Handling with Types:**
404
+ ```typescript
405
+ // Result pattern for better error handling
406
+ type Result<T, E = Error> =
407
+ | { success: true; data: T }
408
+ | { success: false; error: E };
409
+
410
+ class ApiService {
411
+ async fetchData<T>(url: string): Promise<Result<T, ApiError>> {
412
+ try {
413
+ const response = await fetch(url);
414
+ if (!response.ok) {
415
+ return { success: false, error: new ApiError(response.statusText) };
416
+ }
417
+ const data = await response.json() as T;
418
+ return { success: true, data };
419
+ } catch (error) {
420
+ return { success: false, error: error as ApiError };
421
+ }
422
+ }
423
+ }
424
+
425
+ // Usage with proper type checking
426
+ const result = await apiService.fetchData<User>('/api/users/123');
427
+ if (result.success) {
428
+ console.log(result.data.name); // TypeScript knows this is User
429
+ } else {
430
+ console.error(result.error.message); // TypeScript knows this is ApiError
431
+ }
432
+ ```
433
+
434
+ **Module Organization:**
435
+ ```
436
+ src/
437
+ types/
438
+ api.ts # API response types
439
+ domain.ts # Business domain types
440
+ utils.ts # Utility types
441
+ services/
442
+ BaseService.ts # Generic base service
443
+ UserService.ts # Concrete implementations
444
+ utils/
445
+ validators.ts # Runtime type validation
446
+ typeGuards.ts # Type guard functions
447
+ hooks/ # Custom hooks (if React)
448
+ useApi.ts # Generic API hook
449
+ ```
450
+
451
+ ## React Framework Configuration
18
452
 
19
- # Auto-assign agents and load context
20
- npx claude-flow-novice hooks pre-edit --file "[file]" --auto-assign-agents true --load-context true
453
+ ### React Development Patterns
454
+
455
+ **Component Architecture:**
456
+ - Use functional components with hooks
457
+ - Implement proper component composition
458
+ - Follow single responsibility principle
459
+ - Use TypeScript for better type safety
460
+ - Implement proper error boundaries
461
+
462
+ **Concurrent Agent Execution:**
463
+ ```jsx
464
+ // ✅ CORRECT: React development with specialized agents
465
+ [Single Message]:
466
+ Task("React Developer", "Build reusable components with hooks and context", "coder")
467
+ Task("State Manager", "Implement Redux Toolkit/Zustand state management", "system-architect")
468
+ Task("UI Designer", "Create responsive layouts with CSS-in-JS/Tailwind", "coder")
469
+ Task("Test Engineer", "Write React Testing Library tests with coverage", "tester")
470
+ Task("Performance Engineer", "Optimize renders and bundle size", "perf-analyzer")
471
+
472
+ // Batch React file operations
473
+ Write("src/components/App.jsx")
474
+ Write("src/hooks/useApi.js")
475
+ Write("src/context/AppContext.jsx")
476
+ Write("src/styles/globals.css")
477
+ Write("tests/components/App.test.jsx")
478
+
479
+ // React-specific todos
480
+ TodoWrite({ todos: [
481
+ {content: "Setup component library structure", status: "in_progress", activeForm: "Setting up component library structure"},
482
+ {content: "Implement custom hooks for data fetching", status: "pending", activeForm: "Implementing custom hooks for data fetching"},
483
+ {content: "Add error boundaries and loading states", status: "pending", activeForm: "Adding error boundaries and loading states"},
484
+ {content: "Configure routing with React Router", status: "pending", activeForm: "Configuring routing with React Router"},
485
+ {content: "Optimize performance with memoization", status: "pending", activeForm: "Optimizing performance with memoization"}
486
+ ]})
487
+ ```
488
+
489
+ **Project Structure:**
490
+ ```
491
+ src/
492
+ components/
493
+ common/ # Reusable UI components
494
+ Button.jsx
495
+ Modal.jsx
496
+ Input.jsx
497
+ layout/ # Layout components
498
+ Header.jsx
499
+ Sidebar.jsx
500
+ Footer.jsx
501
+ pages/ # Page-level components
502
+ HomePage.jsx
503
+ UserProfile.jsx
504
+ hooks/ # Custom hooks
505
+ useApi.js
506
+ useLocalStorage.js
507
+ useAuth.js
508
+ context/ # React context providers
509
+ AuthContext.jsx
510
+ ThemeContext.jsx
511
+ services/ # API services
512
+ api.js
513
+ auth.js
514
+ utils/ # Helper functions
515
+ validators.js
516
+ formatters.js
517
+ styles/ # Global styles
518
+ globals.css
519
+ variables.css
520
+ ```
521
+
522
+ **Component Patterns:**
523
+ ```jsx
524
+ import React, { useState, useEffect, useCallback, useMemo } from 'react';
525
+ import PropTypes from 'prop-types';
526
+
527
+ // Functional component with hooks
528
+ const UserProfile = ({ userId, onUpdate }) => {
529
+ const [user, setUser] = useState(null);
530
+ const [loading, setLoading] = useState(true);
531
+ const [error, setError] = useState(null);
532
+
533
+ // Memoized expensive calculations
534
+ const userStats = useMemo(() => {
535
+ if (!user) return null;
536
+ return {
537
+ totalPosts: user.posts?.length || 0,
538
+ joinedDate: new Date(user.createdAt).toLocaleDateString()
539
+ };
540
+ }, [user]);
541
+
542
+ // Memoized callbacks to prevent unnecessary re-renders
543
+ const handleUpdateUser = useCallback(async (updates) => {
544
+ try {
545
+ const updatedUser = await updateUser(userId, updates);
546
+ setUser(updatedUser);
547
+ onUpdate?.(updatedUser);
548
+ } catch (err) {
549
+ setError(err.message);
550
+ }
551
+ }, [userId, onUpdate]);
552
+
553
+ useEffect(() => {
554
+ let cancelled = false;
555
+
556
+ const fetchUser = async () => {
557
+ try {
558
+ setLoading(true);
559
+ const userData = await getUserById(userId);
560
+ if (!cancelled) {
561
+ setUser(userData);
562
+ }
563
+ } catch (err) {
564
+ if (!cancelled) {
565
+ setError(err.message);
566
+ }
567
+ } finally {
568
+ if (!cancelled) {
569
+ setLoading(false);
570
+ }
571
+ }
572
+ };
573
+
574
+ fetchUser();
575
+
576
+ return () => {
577
+ cancelled = true;
578
+ };
579
+ }, [userId]);
580
+
581
+ if (loading) return <LoadingSpinner />;
582
+ if (error) return <ErrorMessage message={error} />;
583
+ if (!user) return <NotFound />;
584
+
585
+ return (
586
+ <div className="user-profile">
587
+ <ProfileHeader user={user} stats={userStats} />
588
+ <ProfileContent user={user} onUpdate={handleUpdateUser} />
589
+ </div>
590
+ );
591
+ };
592
+
593
+ UserProfile.propTypes = {
594
+ userId: PropTypes.string.isRequired,
595
+ onUpdate: PropTypes.func
596
+ };
597
+
598
+ export default React.memo(UserProfile);
599
+ ```
600
+
601
+ **Custom Hooks Pattern:**
602
+ ```jsx
603
+ import { useState, useEffect, useCallback } from 'react';
604
+
605
+ // Generic API hook
606
+ export const useApi = (url, options = {}) => {
607
+ const [data, setData] = useState(null);
608
+ const [loading, setLoading] = useState(true);
609
+ const [error, setError] = useState(null);
610
+
611
+ const fetchData = useCallback(async () => {
612
+ try {
613
+ setLoading(true);
614
+ setError(null);
615
+ const response = await fetch(url, options);
616
+
617
+ if (!response.ok) {
618
+ throw new Error(`HTTP error! status: ${response.status}`);
619
+ }
620
+
621
+ const result = await response.json();
622
+ setData(result);
623
+ } catch (err) {
624
+ setError(err.message);
625
+ } finally {
626
+ setLoading(false);
627
+ }
628
+ }, [url, options]);
629
+
630
+ useEffect(() => {
631
+ fetchData();
632
+ }, [fetchData]);
633
+
634
+ const refetch = useCallback(() => {
635
+ fetchData();
636
+ }, [fetchData]);
637
+
638
+ return { data, loading, error, refetch };
639
+ };
640
+
641
+ // Local storage hook
642
+ export const useLocalStorage = (key, initialValue) => {
643
+ const [storedValue, setStoredValue] = useState(() => {
644
+ try {
645
+ const item = window.localStorage.getItem(key);
646
+ return item ? JSON.parse(item) : initialValue;
647
+ } catch (error) {
648
+ console.error(`Error reading localStorage key "${key}":`, error);
649
+ return initialValue;
650
+ }
651
+ });
652
+
653
+ const setValue = useCallback((value) => {
654
+ try {
655
+ const valueToStore = value instanceof Function ? value(storedValue) : value;
656
+ setStoredValue(valueToStore);
657
+ window.localStorage.setItem(key, JSON.stringify(valueToStore));
658
+ } catch (error) {
659
+ console.error(`Error setting localStorage key "${key}":`, error);
660
+ }
661
+ }, [key, storedValue]);
662
+
663
+ return [storedValue, setValue];
664
+ };
665
+ ```
666
+
667
+ **Context Pattern:**
668
+ ```jsx
669
+ import React, { createContext, useContext, useReducer, useCallback } from 'react';
670
+
671
+ // State and actions
672
+ const initialState = {
673
+ user: null,
674
+ isAuthenticated: false,
675
+ loading: false,
676
+ error: null
677
+ };
678
+
679
+ const authReducer = (state, action) => {
680
+ switch (action.type) {
681
+ case 'LOGIN_START':
682
+ return { ...state, loading: true, error: null };
683
+ case 'LOGIN_SUCCESS':
684
+ return {
685
+ ...state,
686
+ user: action.payload,
687
+ isAuthenticated: true,
688
+ loading: false,
689
+ error: null
690
+ };
691
+ case 'LOGIN_FAILURE':
692
+ return {
693
+ ...state,
694
+ user: null,
695
+ isAuthenticated: false,
696
+ loading: false,
697
+ error: action.payload
698
+ };
699
+ case 'LOGOUT':
700
+ return initialState;
701
+ default:
702
+ return state;
703
+ }
704
+ };
705
+
706
+ // Context creation
707
+ const AuthContext = createContext();
708
+
709
+ // Provider component
710
+ export const AuthProvider = ({ children }) => {
711
+ const [state, dispatch] = useReducer(authReducer, initialState);
712
+
713
+ const login = useCallback(async (credentials) => {
714
+ dispatch({ type: 'LOGIN_START' });
715
+ try {
716
+ const user = await authService.login(credentials);
717
+ dispatch({ type: 'LOGIN_SUCCESS', payload: user });
718
+ return user;
719
+ } catch (error) {
720
+ dispatch({ type: 'LOGIN_FAILURE', payload: error.message });
721
+ throw error;
722
+ }
723
+ }, []);
724
+
725
+ const logout = useCallback(() => {
726
+ authService.logout();
727
+ dispatch({ type: 'LOGOUT' });
728
+ }, []);
729
+
730
+ const value = {
731
+ ...state,
732
+ login,
733
+ logout
734
+ };
735
+
736
+ return (
737
+ <AuthContext.Provider value={value}>
738
+ {children}
739
+ </AuthContext.Provider>
740
+ );
741
+ };
742
+
743
+ // Custom hook for using auth context
744
+ export const useAuth = () => {
745
+ const context = useContext(AuthContext);
746
+ if (!context) {
747
+ throw new Error('useAuth must be used within an AuthProvider');
748
+ }
749
+ return context;
750
+ };
751
+ ```
752
+
753
+ **Testing with React Testing Library:**
754
+ ```jsx
755
+ import React from 'react';
756
+ import { render, screen, fireEvent, waitFor } from '@testing-library/react';
757
+ import userEvent from '@testing-library/user-event';
758
+ import { jest } from '@jest/globals';
759
+ import UserProfile from '../UserProfile';
760
+ import * as api from '../../services/api';
761
+
762
+ // Mock the API module
763
+ jest.mock('../../services/api');
764
+
765
+ describe('UserProfile', () => {
766
+ const mockUser = {
767
+ id: '123',
768
+ name: 'John Doe',
769
+ email: 'john@example.com',
770
+ posts: [{ id: 1, title: 'Test Post' }]
771
+ };
772
+
773
+ beforeEach(() => {
774
+ jest.clearAllMocks();
775
+ });
776
+
777
+ test('renders user profile after loading', async () => {
778
+ api.getUserById.mockResolvedValue(mockUser);
779
+
780
+ render(<UserProfile userId="123" />);
781
+
782
+ // Check loading state
783
+ expect(screen.getByTestId('loading-spinner')).toBeInTheDocument();
784
+
785
+ // Wait for user data to load
786
+ await waitFor(() => {
787
+ expect(screen.getByText('John Doe')).toBeInTheDocument();
788
+ });
789
+
790
+ expect(screen.getByText('john@example.com')).toBeInTheDocument();
791
+ expect(screen.getByText('1 Posts')).toBeInTheDocument();
792
+ });
793
+
794
+ test('handles update user interaction', async () => {
795
+ const user = userEvent.setup();
796
+ const onUpdate = jest.fn();
797
+
798
+ api.getUserById.mockResolvedValue(mockUser);
799
+ api.updateUser.mockResolvedValue({ ...mockUser, name: 'Jane Doe' });
800
+
801
+ render(<UserProfile userId="123" onUpdate={onUpdate} />);
802
+
803
+ await waitFor(() => {
804
+ expect(screen.getByText('John Doe')).toBeInTheDocument();
805
+ });
806
+
807
+ const editButton = screen.getByRole('button', { name: /edit/i });
808
+ await user.click(editButton);
809
+
810
+ const nameInput = screen.getByDisplayValue('John Doe');
811
+ await user.clear(nameInput);
812
+ await user.type(nameInput, 'Jane Doe');
813
+
814
+ const saveButton = screen.getByRole('button', { name: /save/i });
815
+ await user.click(saveButton);
816
+
817
+ await waitFor(() => {
818
+ expect(onUpdate).toHaveBeenCalledWith({ ...mockUser, name: 'Jane Doe' });
819
+ });
820
+ });
821
+
822
+ test('displays error message on API failure', async () => {
823
+ api.getUserById.mockRejectedValue(new Error('Network error'));
824
+
825
+ render(<UserProfile userId="123" />);
826
+
827
+ await waitFor(() => {
828
+ expect(screen.getByText(/network error/i)).toBeInTheDocument();
829
+ });
830
+ });
831
+ });
832
+ ```
833
+
834
+ **Performance Optimization:**
835
+ ```jsx
836
+ import React, { memo, lazy, Suspense } from 'react';
837
+
838
+ // Lazy loading for code splitting
839
+ const LazyUserProfile = lazy(() => import('./UserProfile'));
840
+ const LazyUserSettings = lazy(() => import('./UserSettings'));
841
+
842
+ // Memoized component to prevent unnecessary re-renders
843
+ const UserCard = memo(({ user, onUpdate }) => {
844
+ return (
845
+ <div className="user-card">
846
+ <h3>{user.name}</h3>
847
+ <p>{user.email}</p>
848
+ <button onClick={() => onUpdate(user.id)}>
849
+ Update
850
+ </button>
851
+ </div>
852
+ );
853
+ });
854
+
855
+ // Main app with lazy loading
856
+ const App = () => {
857
+ return (
858
+ <div className="app">
859
+ <Suspense fallback={<div>Loading...</div>}>
860
+ <Routes>
861
+ <Route path="/profile" element={<LazyUserProfile />} />
862
+ <Route path="/settings" element={<LazyUserSettings />} />
863
+ </Routes>
864
+ </Suspense>
865
+ </div>
866
+ );
867
+ };
868
+ ```
869
+
870
+ **State Management with Zustand:**
871
+ ```jsx
872
+ import { create } from 'zustand';
873
+ import { devtools, persist } from 'zustand/middleware';
874
+
875
+ const useUserStore = create(
876
+ devtools(
877
+ persist(
878
+ (set, get) => ({
879
+ users: [],
880
+ currentUser: null,
881
+ loading: false,
882
+
883
+ fetchUsers: async () => {
884
+ set({ loading: true });
885
+ try {
886
+ const users = await api.getUsers();
887
+ set({ users, loading: false });
888
+ } catch (error) {
889
+ set({ loading: false });
890
+ throw error;
891
+ }
892
+ },
893
+
894
+ setCurrentUser: (user) => set({ currentUser: user }),
895
+
896
+ updateUser: async (userId, updates) => {
897
+ const updatedUser = await api.updateUser(userId, updates);
898
+ set((state) => ({
899
+ users: state.users.map((user) =>
900
+ user.id === userId ? updatedUser : user
901
+ ),
902
+ currentUser: state.currentUser?.id === userId ? updatedUser : state.currentUser
903
+ }));
904
+ return updatedUser;
905
+ }
906
+ }),
907
+ { name: 'user-store' }
908
+ )
909
+ )
910
+ );
911
+
912
+ // Usage in component
913
+ const UserList = () => {
914
+ const { users, loading, fetchUsers } = useUserStore();
915
+
916
+ useEffect(() => {
917
+ fetchUsers();
918
+ }, [fetchUsers]);
919
+
920
+ if (loading) return <LoadingSpinner />;
921
+
922
+ return (
923
+ <div>
924
+ {users.map((user) => (
925
+ <UserCard key={user.id} user={user} />
926
+ ))}
927
+ </div>
928
+ );
929
+ };
21
930
  ```
22
931
 
23
- #### Post-Task Hooks (Validation & Quality)
24
- ```bash
25
- # Track metrics and store results
26
- npx claude-flow-novice hooks post-command --command "[command]" --track-metrics true --store-results true
932
+ ## 🚀 Concurrent Execution Patterns
27
933
 
28
- # Comprehensive validation pipeline (runs automatically on file edits)
29
- node config/hooks/post-edit-pipeline.js "[file]"
934
+ ### JavaScript/TypeScript Patterns
30
935
 
31
- # Validates: formatting, linting, type checking, dependencies, security, tests
32
- # Progressive validation: skips tests if dependencies missing (beginner-friendly)
936
+ ```javascript
937
+ // CORRECT: Batch all operations in single message
938
+ [Single Message]:
939
+ Task("Frontend Developer", "Build React components with hooks", "coder")
940
+ Task("Backend Developer", "Create Express API endpoints", "backend-dev")
941
+ Task("Test Engineer", "Write Jest tests with >80% coverage", "tester")
942
+
943
+ // Batch file operations
944
+ Write("src/components/App.jsx")
945
+ Write("src/api/server.js")
946
+ Write("tests/App.test.js")
33
947
  ```
34
948
 
35
- **Post-Edit Pipeline Features:**
36
- - **Multi-Language**: JS/TS, Python, Rust, Go, Java, C++, PHP, Ruby, C#
37
- - **Formatting**: Prettier, Black, RustFmt, GoFmt (auto-formats code)
38
- - **Linting**: ESLint, Flake8, Clippy, GoLint (finds code issues)
39
- - **Type Checking**: TSC, MyPy, Cargo Check, Go Vet (catches type errors)
40
- - **Dependency Analysis**: Checks imports/requires, suggests missing deps
41
- - **Security Scanning**: NPM Audit, Bandit, Cargo Audit, GoSec
42
- - **Test Execution**: NPM Test, PyTest, Cargo Test, Go Test (if deps satisfied)
43
- - **Progressive Validation**: 4 tiers (syntax→interface→integration→full)
44
- - **Smart Agent Spawning**: Auto-suggests agents for missing dependencies/tests
45
-
46
- #### Session Management
47
- ```bash
48
- # Generate summaries and persist state
49
- npx claude-flow-novice hooks session-end --generate-summary true --persist-state true --export-metrics true
949
+ ### Python Patterns
950
+
951
+ ```python
952
+ # CORRECT: Parallel agent execution
953
+ [Single Message]:
954
+ Task("Django Developer", "Build models and views with DRF", "backend-dev")
955
+ Task("Frontend Developer", "Create React frontend with API integration", "coder")
956
+ Task("Test Engineer", "Write pytest tests with fixtures", "tester")
957
+
958
+ # Batch Python operations
959
+ Write("apps/models.py")
960
+ Write("apps/views.py")
961
+ Write("tests/test_models.py")
50
962
  ```
51
- **Claude Code's Task tool is the PRIMARY way to spawn agents:**
963
+
964
+ ### React Development Patterns
965
+
52
966
  ```javascript
53
- // CORRECT: Use Claude Code's Task tool for parallel agent execution
967
+ // React-specific concurrent patterns
54
968
  [Single Message]:
55
- Task("Research agent", "Analyze requirements and patterns...", "researcher")
56
- Task("Coder agent", "Implement core features...", "coder")
57
- Task("Tester agent", "Create comprehensive tests...", "tester")
58
- Task("Reviewer agent", "Review code quality...", "reviewer")
59
- Task("Architect agent", "Design system architecture...", "system-architect")
969
+ Task("Component Developer", "Build reusable components with TypeScript", "coder")
970
+ Task("State Manager", "Implement Redux/Context state management", "coder")
971
+ Task("Test Engineer", "Write React Testing Library tests", "tester")
972
+ Task("Style Developer", "Create responsive CSS/Styled Components", "coder")
60
973
  ```
61
974
 
62
- **MCP tools are ONLY for coordination setup:**
63
- ### MCP Integration
64
- - **Coordination**: `mcp__claude-flow-novice__swarm_init`, `agent_spawn`, `task_orchestrate`
65
- - **Monitoring**: `swarm_status`, `agent_metrics`, `task_results`
66
- - **Memory**: `memory_usage`, `memory_search`
975
+ ### API Development Patterns
976
+
977
+ ```bash
978
+ # API-focused concurrent execution
979
+ [Single Message]:
980
+ Task("API Developer", "Build RESTful endpoints with validation", "backend-dev")
981
+ Task("Database Designer", "Design schema and migrations", "code-analyzer")
982
+ Task("Security Engineer", "Implement authentication and authorization", "reviewer")
983
+ Task("API Tester", "Create integration and unit tests", "tester")
984
+ Task("Documentation Writer", "Generate OpenAPI/Swagger docs", "researcher")
985
+ ```
67
986
 
68
- ## File Organization
69
- - `/src` - Source code
70
- - `/tests` - Test files
71
- - `/docs` - Documentation
72
- - **Never save working files to root**
73
987
 
74
- # Add MCP server
75
- claude mcp add claude-flow-novice npx claude-flow-novice mcp start
76
988
 
989
+ ## 📋 Best Practices
990
+
991
+ ### General Development
992
+ - **Modular Design**: Keep files under 500 lines
993
+ - **Environment Safety**: Never hardcode secrets
994
+ - **Test-First**: Write tests before implementation
995
+ - **Clean Architecture**: Separate concerns
996
+ - **Documentation**: Keep updated
997
+
998
+ ### JavaScript/TypeScript
999
+ - **ES6+ Features**: Use modern JavaScript syntax
1000
+ - **Type Safety**: Prefer TypeScript for larger projects
1001
+ - **Async/Await**: Use async/await over Promise chains
1002
+ - **Error Handling**: Implement proper error boundaries
1003
+ - **Code Splitting**: Lazy load components and routes
1004
+
1005
+ ### Python
1006
+ - **PEP 8**: Follow Python style guidelines
1007
+ - **Type Hints**: Use type annotations for clarity
1008
+ - **Virtual Environments**: Always use venv or conda
1009
+ - **Docstrings**: Document all functions and classes
1010
+ - **Error Handling**: Use specific exception types
1011
+
1012
+
1013
+
1014
+ ## 🧪 Testing Patterns
1015
+
1016
+ ### React Testing
1017
+
1018
+ ```javascript
1019
+ import { render, screen, fireEvent } from '@testing-library/react';
1020
+ import userEvent from '@testing-library/user-event';
1021
+
1022
+ // Component testing pattern
1023
+ describe('Component', () => {
1024
+ test('renders and handles interaction', async () => {
1025
+ const user = userEvent.setup();
1026
+ render(<Component />);
1027
+
1028
+ const button = screen.getByRole('button');
1029
+ await user.click(button);
1030
+
1031
+ expect(screen.getByText(/result/i)).toBeInTheDocument();
1032
+ });
1033
+ });
1034
+ ```
1035
+
1036
+ ### Python Testing
1037
+
1038
+ ```python
1039
+ import pytest
1040
+ from unittest.mock import patch, MagicMock
1041
+
1042
+ class TestAPI:
1043
+ @pytest.fixture
1044
+ def client(self):
1045
+ return TestClient()
1046
+
1047
+ def test_endpoint(self, client):
1048
+ response = client.get("/api/endpoint")
1049
+ assert response.status_code == 200
1050
+ assert response.json()["status"] == "success"
1051
+ ```
77
1052
 
78
- ## Essential Commands
79
- - `npx claude-flow-novice status` - System health
80
- - `npx claude-flow-novice --help` - Available commands
81
- - `/swarm`, `/sparc`, `/hooks` - Slash commands (auto-discovered)