claude-flow 2.5.0-alpha.141 → 2.7.0-alpha

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 (149) hide show
  1. package/.claude/agents/reasoning/README.md +171 -0
  2. package/.claude/agents/reasoning/agent.md +816 -0
  3. package/.claude/agents/reasoning/example-reasoning-agent-template.md +362 -0
  4. package/.claude/agents/reasoning/goal-planner.md +73 -0
  5. package/.claude/commands/coordination/README.md +9 -0
  6. package/.claude/commands/memory/README.md +9 -0
  7. package/.claude/settings.json +3 -3
  8. package/.claude/sparc-modes.json +108 -0
  9. package/README.md +1 -6
  10. package/bin/claude-flow +1 -1
  11. package/dist/src/cli/command-registry.js +70 -6
  12. package/dist/src/cli/command-registry.js.map +1 -1
  13. package/dist/src/cli/help-formatter.js +0 -3
  14. package/dist/src/cli/help-formatter.js.map +1 -1
  15. package/dist/src/cli/help-text.js +53 -5
  16. package/dist/src/cli/help-text.js.map +1 -1
  17. package/dist/src/cli/simple-cli.js +182 -172
  18. package/dist/src/cli/simple-cli.js.map +1 -1
  19. package/dist/src/cli/simple-commands/agent-booster.js +415 -0
  20. package/dist/src/cli/simple-commands/agent-booster.js.map +1 -0
  21. package/dist/src/cli/simple-commands/agent.js +856 -13
  22. package/dist/src/cli/simple-commands/agent.js.map +1 -1
  23. package/dist/src/cli/simple-commands/env-template.js +180 -0
  24. package/dist/src/cli/simple-commands/env-template.js.map +1 -0
  25. package/dist/src/cli/simple-commands/init/help.js +23 -0
  26. package/dist/src/cli/simple-commands/init/help.js.map +1 -1
  27. package/dist/src/cli/simple-commands/init/index.js +63 -0
  28. package/dist/src/cli/simple-commands/init/index.js.map +1 -1
  29. package/dist/src/cli/simple-commands/memory.js +307 -16
  30. package/dist/src/cli/simple-commands/memory.js.map +1 -1
  31. package/dist/src/cli/simple-commands/proxy.js +304 -0
  32. package/dist/src/cli/simple-commands/proxy.js.map +1 -0
  33. package/dist/src/cli/simple-commands/sparc.js +16 -19
  34. package/dist/src/cli/simple-commands/sparc.js.map +1 -1
  35. package/dist/src/cli/validation-helper.js.map +1 -1
  36. package/dist/src/core/version.js +1 -1
  37. package/dist/src/execution/agent-executor.js +181 -0
  38. package/dist/src/execution/agent-executor.js.map +1 -0
  39. package/dist/src/execution/index.js +12 -0
  40. package/dist/src/execution/index.js.map +1 -0
  41. package/dist/src/execution/provider-manager.js +110 -0
  42. package/dist/src/execution/provider-manager.js.map +1 -0
  43. package/dist/src/hooks/redaction-hook.js +89 -0
  44. package/dist/src/hooks/redaction-hook.js.map +1 -0
  45. package/dist/src/memory/swarm-memory.js +340 -421
  46. package/dist/src/memory/swarm-memory.js.map +1 -1
  47. package/dist/src/utils/key-redactor.js +108 -0
  48. package/dist/src/utils/key-redactor.js.map +1 -0
  49. package/dist/src/utils/metrics-reader.js +37 -39
  50. package/dist/src/utils/metrics-reader.js.map +1 -1
  51. package/docs/AGENT-BOOSTER-INTEGRATION.md +407 -0
  52. package/docs/AGENTIC-FLOW-INTEGRATION-GUIDE.md +753 -0
  53. package/docs/AGENTIC_FLOW_EXECUTION_FIX_REPORT.md +474 -0
  54. package/docs/AGENTIC_FLOW_INTEGRATION_STATUS.md +143 -0
  55. package/docs/AGENTIC_FLOW_MVP_COMPLETE.md +367 -0
  56. package/docs/AGENTIC_FLOW_SECURITY_TEST_REPORT.md +369 -0
  57. package/docs/COMMAND-VERIFICATION-REPORT.md +441 -0
  58. package/docs/COMMIT_SUMMARY.md +247 -0
  59. package/docs/DEEP_REVIEW_COMPREHENSIVE_REPORT.md +922 -0
  60. package/docs/DOCKER-VALIDATION-REPORT.md +281 -0
  61. package/docs/ENV-SETUP-GUIDE.md +270 -0
  62. package/docs/FINAL_PRE_PUBLISH_VALIDATION.md +823 -0
  63. package/docs/FINAL_VALIDATION_REPORT.md +165 -0
  64. package/docs/HOOKS-V2-MODIFICATION.md +146 -0
  65. package/docs/INDEX.md +568 -0
  66. package/docs/INTEGRATION_COMPLETE.md +414 -0
  67. package/docs/MEMORY_REDACTION_TEST_REPORT.md +300 -0
  68. package/docs/PERFORMANCE-SYSTEMS-STATUS.md +340 -0
  69. package/docs/PRE_RELEASE_FIXES_REPORT.md +435 -0
  70. package/docs/README.md +35 -0
  71. package/docs/REASONING-AGENTS.md +482 -0
  72. package/docs/REASONINGBANK-AGENT-CREATION-GUIDE.md +813 -0
  73. package/docs/REASONINGBANK-ANALYSIS-COMPLETE.md +479 -0
  74. package/docs/REASONINGBANK-BENCHMARK-RESULTS.md +166 -0
  75. package/docs/REASONINGBANK-BENCHMARK.md +396 -0
  76. package/docs/REASONINGBANK-CLI-INTEGRATION.md +455 -0
  77. package/docs/REASONINGBANK-CORE-INTEGRATION.md +658 -0
  78. package/docs/REASONINGBANK-COST-OPTIMIZATION.md +329 -0
  79. package/docs/REASONINGBANK-DEMO.md +419 -0
  80. package/docs/REASONINGBANK-INTEGRATION-COMPLETE.md +249 -0
  81. package/docs/REASONINGBANK-VALIDATION.md +532 -0
  82. package/docs/REASONINGBANK_ARCHITECTURE.md +475 -0
  83. package/docs/REASONINGBANK_INTEGRATION_COMPLETE.md +558 -0
  84. package/docs/REASONINGBANK_INTEGRATION_PLAN.md +1188 -0
  85. package/docs/REGRESSION-ANALYSIS-REPORT.md +500 -0
  86. package/docs/RELEASE_v2.6.0-alpha.2.md +658 -0
  87. package/docs/api/API_DOCUMENTATION.md +721 -0
  88. package/docs/architecture/ARCHITECTURE.md +1690 -0
  89. package/docs/ci-cd/README.md +368 -0
  90. package/docs/development/DEPLOYMENT.md +2348 -0
  91. package/docs/development/DEVELOPMENT_WORKFLOW.md +1333 -0
  92. package/docs/development/build-analysis-report.md +252 -0
  93. package/docs/development/pair-optimization.md +156 -0
  94. package/docs/development/token-tracking-status.md +103 -0
  95. package/docs/development/training-pipeline-demo.md +163 -0
  96. package/docs/development/training-pipeline-real-only.md +196 -0
  97. package/docs/epic-sdk-integration.md +1269 -0
  98. package/docs/experimental/RIEMANN_HYPOTHESIS_PROOF.md +124 -0
  99. package/docs/experimental/computational_verification.py +436 -0
  100. package/docs/experimental/novel_approaches.md +560 -0
  101. package/docs/experimental/riemann_hypothesis_analysis.md +263 -0
  102. package/docs/experimental/riemann_proof_attempt.md +124 -0
  103. package/docs/experimental/riemann_synthesis.md +277 -0
  104. package/docs/experimental/verification_results.json +12 -0
  105. package/docs/experimental/visualization_insights.md +720 -0
  106. package/docs/guides/USER_GUIDE.md +1138 -0
  107. package/docs/guides/token-tracking-guide.md +291 -0
  108. package/docs/reference/AGENTS.md +1011 -0
  109. package/docs/reference/MCP_TOOLS.md +2188 -0
  110. package/docs/reference/SPARC.md +717 -0
  111. package/docs/reference/SWARM.md +2000 -0
  112. package/docs/sdk/CLAUDE-CODE-SDK-DEEP-ANALYSIS.md +649 -0
  113. package/docs/sdk/CLAUDE-FLOW-SDK-INTEGRATION-ANALYSIS.md +242 -0
  114. package/docs/sdk/INTEGRATION-ROADMAP.md +420 -0
  115. package/docs/sdk/MCP-TOOLS-UPDATE.md +270 -0
  116. package/docs/sdk/SDK-ADVANCED-FEATURES-INTEGRATION.md +723 -0
  117. package/docs/sdk/SDK-ALL-FEATURES-INTEGRATION-MATRIX.md +612 -0
  118. package/docs/sdk/SDK-INTEGRATION-COMPLETE.md +358 -0
  119. package/docs/sdk/SDK-INTEGRATION-PHASES-V2.5.md +750 -0
  120. package/docs/sdk/SDK-LEVERAGE-REAL-FEATURES.md +676 -0
  121. package/docs/sdk/SDK-VALIDATION-RESULTS.md +400 -0
  122. package/docs/sdk/epic-sdk-integration.md +1269 -0
  123. package/docs/setup/remote-setup.md +93 -0
  124. package/docs/validation/final-validation-summary.md +220 -0
  125. package/docs/validation/verification-integration.md +190 -0
  126. package/docs/validation/verification-validation.md +349 -0
  127. package/docs/wiki/background-commands.md +1213 -0
  128. package/docs/wiki/session-persistence.md +342 -0
  129. package/docs/wiki/stream-chain-command.md +537 -0
  130. package/package.json +4 -2
  131. package/src/cli/command-registry.js +70 -5
  132. package/src/cli/help-text.js +26 -5
  133. package/src/cli/simple-cli.ts +18 -7
  134. package/src/cli/simple-commands/agent-booster.js +515 -0
  135. package/src/cli/simple-commands/agent.js +1001 -12
  136. package/src/cli/simple-commands/agent.ts +137 -0
  137. package/src/cli/simple-commands/config.ts +127 -0
  138. package/src/cli/simple-commands/env-template.js +190 -0
  139. package/src/cli/simple-commands/init/help.js +23 -0
  140. package/src/cli/simple-commands/init/index.js +84 -6
  141. package/src/cli/simple-commands/memory.js +363 -16
  142. package/src/cli/simple-commands/proxy.js +384 -0
  143. package/src/cli/simple-commands/sparc.js +16 -19
  144. package/src/execution/agent-executor.ts +306 -0
  145. package/src/execution/index.ts +19 -0
  146. package/src/execution/provider-manager.ts +187 -0
  147. package/src/hooks/redaction-hook.ts +115 -0
  148. package/src/utils/key-redactor.js +178 -0
  149. package/src/utils/key-redactor.ts +184 -0
@@ -0,0 +1,721 @@
1
+ # 🔗 Claude-Flow v2.0.0 API Documentation
2
+
3
+ ## Table of Contents
4
+
5
+ - [Overview](#overview)
6
+ - [Authentication](#authentication)
7
+ - [Command Syntax](#command-syntax)
8
+ - [MCP Tools Reference](#mcp-tools-reference)
9
+ - [Claude-Flow Tools (87)](#claude-flow-tools)
10
+ - [Ruv-Swarm Tools (25)](#ruv-swarm-tools)
11
+ - [Agent Types](#agent-types)
12
+ - [WebSocket Integration](#websocket-integration)
13
+ - [Command Examples](#command-examples)
14
+ - [Error Handling](#error-handling)
15
+ - [Best Practices](#best-practices)
16
+
17
+ ---
18
+
19
+ ## Overview
20
+
21
+ Claude-Flow v2.0.0 provides comprehensive AI agent orchestration with 112 MCP tools, 54+ specialized agent types, and advanced swarm intelligence capabilities. This documentation covers the complete API surface for programmatic access to all features.
22
+
23
+ ### Key Features
24
+
25
+ - **112 MCP Tools** - 87 Claude-Flow + 25 Ruv-Swarm integration tools
26
+ - **54+ Agent Types** - Specialized agents for every development need
27
+ - **Swarm Intelligence** - Multi-topology coordination (hierarchical, mesh, ring, star)
28
+ - **Neural Networks** - WASM-accelerated AI patterns and learning
29
+ - **Memory System** - Persistent, distributed memory with compression
30
+ - **Real-time Coordination** - WebSocket-based agent communication
31
+ - **GitHub Integration** - Native CI/CD and repository management
32
+ - **Auto-scaling** - Dynamic agent provisioning and resource management
33
+
34
+ ## Authentication
35
+
36
+ ### CLI Authentication
37
+
38
+ ```bash
39
+ # Initialize with GitHub authentication (recommended)
40
+ npx claude-flow@alpha github init
41
+
42
+ # Or use API key
43
+ export CLAUDE_FLOW_API_KEY="your-api-key"
44
+ npx claude-flow@alpha config set --api-key $CLAUDE_FLOW_API_KEY
45
+ ```
46
+
47
+ ### MCP Integration
48
+
49
+ ```javascript
50
+ // Add Claude-Flow as MCP server
51
+ claude mcp add claude-flow npx claude-flow@alpha mcp start
52
+
53
+ // Available MCP servers:
54
+ // - claude-flow: 87 native tools
55
+ // - ruv-swarm: 25 advanced coordination tools
56
+ ```
57
+
58
+ ### Token-based Access
59
+
60
+ ```bash
61
+ # Generate session token
62
+ npx claude-flow@alpha auth login
63
+
64
+ # Use token in API calls
65
+ curl -H "Authorization: Bearer $(npx claude-flow@alpha auth token)" \
66
+ https://api.claude-flow.ai/v2/agents
67
+ ```
68
+
69
+ ## Command Syntax
70
+
71
+ ### Correct Command Format
72
+
73
+ **IMPORTANT**: Always use `npx claude-flow@alpha` (not `npx claude-flow`)
74
+
75
+ ```bash
76
+ # ✅ CORRECT - Updated syntax
77
+ npx claude-flow@alpha [command] [options]
78
+
79
+ # ❌ OUTDATED - Do not use
80
+ npx claude-flow [command] [options]
81
+ ```
82
+
83
+ ### Core Commands
84
+
85
+ ```bash
86
+ # Swarm operations
87
+ npx claude-flow@alpha coordination swarm-init --topology hierarchical
88
+ npx claude-flow@alpha coordination agent-spawn --type coder
89
+ npx claude-flow@alpha coordination task-orchestrate --task "Build API"
90
+
91
+ # Memory operations
92
+ npx claude-flow@alpha memory usage --action store --key project/context
93
+ npx claude-flow@alpha memory search --pattern "authentication"
94
+
95
+ # Performance analysis
96
+ npx claude-flow@alpha performance report --timeframe 24h
97
+ npx claude-flow@alpha bottleneck analyze --component swarm
98
+
99
+ # GitHub integration
100
+ npx claude-flow@alpha github repo-analyze --repo owner/repo
101
+ npx claude-flow@alpha github pr-manage --action create
102
+ ```
103
+
104
+ ## MCP Tools Reference
105
+
106
+ ### Claude-Flow Tools (87 Total)
107
+
108
+ #### 🐝 Swarm Coordination (12 tools)
109
+ - `mcp__claude-flow__swarm_init` - Initialize swarm with topology
110
+ - `mcp__claude-flow__agent_spawn` - Create specialized agents
111
+ - `mcp__claude-flow__task_orchestrate` - Coordinate task execution
112
+ - `mcp__claude-flow__swarm_status` - Monitor swarm health
113
+ - `mcp__claude-flow__agent_list` - List active agents
114
+ - `mcp__claude-flow__agent_metrics` - Agent performance data
115
+ - `mcp__claude-flow__swarm_monitor` - Real-time monitoring
116
+ - `mcp__claude-flow__topology_optimize` - Optimize coordination
117
+ - `mcp__claude-flow__load_balance` - Balance agent workload
118
+ - `mcp__claude-flow__coordination_sync` - Synchronize agents
119
+ - `mcp__claude-flow__swarm_scale` - Scale agent count
120
+ - `mcp__claude-flow__swarm_destroy` - Terminate swarm
121
+
122
+ #### 🧠 Neural Network (15 tools)
123
+ - `mcp__claude-flow__neural_status` - Neural system status
124
+ - `mcp__claude-flow__neural_train` - Train AI patterns
125
+ - `mcp__claude-flow__neural_predict` - Make AI predictions
126
+ - `mcp__claude-flow__neural_patterns` - Cognitive patterns
127
+ - `mcp__claude-flow__model_load` - Load AI models
128
+ - `mcp__claude-flow__model_save` - Save trained models
129
+ - `mcp__claude-flow__wasm_optimize` - WASM performance
130
+ - `mcp__claude-flow__inference_run` - Run AI inference
131
+ - `mcp__claude-flow__pattern_recognize` - Pattern detection
132
+ - `mcp__claude-flow__cognitive_analyze` - Cognitive analysis
133
+ - `mcp__claude-flow__learning_adapt` - Adaptive learning
134
+ - `mcp__claude-flow__neural_compress` - Model compression
135
+ - `mcp__claude-flow__ensemble_create` - Ensemble models
136
+ - `mcp__claude-flow__transfer_learn` - Transfer learning
137
+ - `mcp__claude-flow__neural_explain` - AI explainability
138
+
139
+ #### 💾 Memory & Persistence (12 tools)
140
+ - `mcp__claude-flow__memory_usage` - Store/retrieve data
141
+ - `mcp__claude-flow__memory_search` - Search memory entries
142
+ - `mcp__claude-flow__memory_persist` - Persistent storage
143
+ - `mcp__claude-flow__memory_namespace` - Namespace management
144
+ - `mcp__claude-flow__memory_backup` - Backup memory data
145
+ - `mcp__claude-flow__memory_restore` - Restore from backup
146
+ - `mcp__claude-flow__memory_compress` - Compress data
147
+ - `mcp__claude-flow__memory_sync` - Synchronize memory
148
+ - `mcp__claude-flow__cache_manage` - Cache operations
149
+ - `mcp__claude-flow__state_snapshot` - State snapshots
150
+ - `mcp__claude-flow__context_restore` - Context restoration
151
+ - `mcp__claude-flow__memory_analytics` - Memory analytics
152
+
153
+ #### 📊 Analysis & Monitoring (13 tools)
154
+ - `mcp__claude-flow__performance_report` - Performance reports
155
+ - `mcp__claude-flow__bottleneck_analyze` - Bottleneck detection
156
+ - `mcp__claude-flow__task_status` - Task monitoring
157
+ - `mcp__claude-flow__task_results` - Task results
158
+ - `mcp__claude-flow__benchmark_run` - Run benchmarks
159
+ - `mcp__claude-flow__metrics_collect` - Collect metrics
160
+ - `mcp__claude-flow__trend_analysis` - Trend analysis
161
+ - `mcp__claude-flow__cost_analysis` - Cost tracking
162
+ - `mcp__claude-flow__quality_assess` - Quality assessment
163
+ - `mcp__claude-flow__error_analysis` - Error analysis
164
+ - `mcp__claude-flow__usage_stats` - Usage statistics
165
+ - `mcp__claude-flow__health_check` - System health
166
+ - `mcp__claude-flow__token_usage` - Token tracking
167
+
168
+ #### 🔄 Workflow & Automation (11 tools)
169
+ - `mcp__claude-flow__workflow_create` - Create workflows
170
+ - `mcp__claude-flow__workflow_execute` - Execute workflows
171
+ - `mcp__claude-flow__workflow_export` - Export workflows
172
+ - `mcp__claude-flow__automation_setup` - Setup automation
173
+ - `mcp__claude-flow__pipeline_create` - Create pipelines
174
+ - `mcp__claude-flow__scheduler_manage` - Manage schedules
175
+ - `mcp__claude-flow__trigger_setup` - Setup triggers
176
+ - `mcp__claude-flow__workflow_template` - Workflow templates
177
+ - `mcp__claude-flow__batch_process` - Batch processing
178
+ - `mcp__claude-flow__parallel_execute` - Parallel execution
179
+ - `mcp__claude-flow__sparc_mode` - SPARC workflows
180
+
181
+ #### 🐙 GitHub Integration (8 tools)
182
+ - `mcp__claude-flow__github_repo_analyze` - Repository analysis
183
+ - `mcp__claude-flow__github_pr_manage` - Pull request management
184
+ - `mcp__claude-flow__github_issue_track` - Issue tracking
185
+ - `mcp__claude-flow__github_release_coord` - Release coordination
186
+ - `mcp__claude-flow__github_workflow_auto` - Workflow automation
187
+ - `mcp__claude-flow__github_code_review` - Code review
188
+ - `mcp__claude-flow__github_sync_coord` - Sync coordination
189
+ - `mcp__claude-flow__github_metrics` - GitHub metrics
190
+
191
+ #### 🤖 DAA (Dynamic Agent Architecture) (8 tools)
192
+ - `mcp__claude-flow__daa_agent_create` - Create dynamic agents
193
+ - `mcp__claude-flow__daa_capability_match` - Match capabilities
194
+ - `mcp__claude-flow__daa_resource_alloc` - Resource allocation
195
+ - `mcp__claude-flow__daa_lifecycle_manage` - Lifecycle management
196
+ - `mcp__claude-flow__daa_communication` - Agent communication
197
+ - `mcp__claude-flow__daa_consensus` - Consensus algorithms
198
+ - `mcp__claude-flow__daa_fault_tolerance` - Fault tolerance
199
+ - `mcp__claude-flow__daa_optimization` - Agent optimization
200
+
201
+ #### 🛠️ System & Utilities (8 tools)
202
+ - `mcp__claude-flow__terminal_execute` - Terminal execution
203
+ - `mcp__claude-flow__config_manage` - Configuration management
204
+ - `mcp__claude-flow__features_detect` - Feature detection
205
+ - `mcp__claude-flow__security_scan` - Security scanning
206
+ - `mcp__claude-flow__backup_create` - Create backups
207
+ - `mcp__claude-flow__restore_system` - System restoration
208
+ - `mcp__claude-flow__log_analysis` - Log analysis
209
+ - `mcp__claude-flow__diagnostic_run` - Run diagnostics
210
+
211
+ ### Ruv-Swarm Tools (25 Total)
212
+
213
+ #### 🌊 Advanced Swarm Operations
214
+ - `mcp__ruv-swarm__swarm_init` - Advanced swarm initialization
215
+ - `mcp__ruv-swarm__swarm_status` - Detailed swarm status
216
+ - `mcp__ruv-swarm__swarm_monitor` - Real-time monitoring
217
+ - `mcp__ruv-swarm__agent_spawn` - Spawn ruv-swarm agents
218
+ - `mcp__ruv-swarm__agent_list` - List ruv-swarm agents
219
+ - `mcp__ruv-swarm__agent_metrics` - Agent performance metrics
220
+
221
+ #### 🎯 Task Coordination
222
+ - `mcp__ruv-swarm__task_orchestrate` - Advanced task orchestration
223
+ - `mcp__ruv-swarm__task_status` - Task status monitoring
224
+ - `mcp__ruv-swarm__task_results` - Retrieve task results
225
+
226
+ #### 🧠 Neural Intelligence
227
+ - `mcp__ruv-swarm__neural_status` - Neural system status
228
+ - `mcp__ruv-swarm__neural_train` - Train neural models
229
+ - `mcp__ruv-swarm__neural_patterns` - Cognitive patterns
230
+
231
+ #### 💾 Memory Management
232
+ - `mcp__ruv-swarm__memory_usage` - Memory operations
233
+
234
+ #### ⚡ Performance
235
+ - `mcp__ruv-swarm__benchmark_run` - Performance benchmarks
236
+ - `mcp__ruv-swarm__features_detect` - Feature detection
237
+
238
+ #### 🤖 Dynamic Agent Architecture (DAA)
239
+ - `mcp__ruv-swarm__daa_init` - Initialize DAA
240
+ - `mcp__ruv-swarm__daa_agent_create` - Create DAA agents
241
+ - `mcp__ruv-swarm__daa_agent_adapt` - Adapt agent behavior
242
+ - `mcp__ruv-swarm__daa_workflow_create` - Create DAA workflows
243
+ - `mcp__ruv-swarm__daa_workflow_execute` - Execute DAA workflows
244
+ - `mcp__ruv-swarm__daa_knowledge_share` - Share knowledge
245
+ - `mcp__ruv-swarm__daa_learning_status` - Learning status
246
+ - `mcp__ruv-swarm__daa_cognitive_pattern` - Cognitive patterns
247
+ - `mcp__ruv-swarm__daa_meta_learning` - Meta-learning
248
+ - `mcp__ruv-swarm__daa_performance_metrics` - Performance metrics
249
+
250
+ ## Agent Types
251
+
252
+ ### Core Development Agents
253
+ | Agent | Type | Capabilities |
254
+ |-------|------|-------------|
255
+ | **coder** | Implementation | Code generation, refactoring, debugging |
256
+ | **reviewer** | Quality Assurance | Code review, best practices, standards |
257
+ | **tester** | Testing | Unit tests, integration tests, TDD |
258
+ | **researcher** | Investigation | Research, analysis, documentation |
259
+ | **planner** | Planning | Project planning, task breakdown |
260
+
261
+ ### Specialized Agents
262
+ | Agent | Type | Capabilities |
263
+ |-------|------|-------------|
264
+ | **code-analyzer** | Analysis | Code quality, performance, security |
265
+ | **system-architect** | Architecture | System design, patterns, scalability |
266
+ | **backend-dev** | Development | API development, databases, services |
267
+ | **mobile-dev** | Development | React Native, mobile platforms |
268
+ | **ml-developer** | ML/AI | Machine learning, data science |
269
+ | **api-docs** | Documentation | API documentation, OpenAPI specs |
270
+ | **cicd-engineer** | DevOps | CI/CD pipelines, automation |
271
+ | **performance-benchmarker** | Performance | Load testing, optimization |
272
+ | **production-validator** | Validation | Production readiness, deployment |
273
+ | **task-orchestrator** | Coordination | Task management, workflow coordination |
274
+
275
+ ### Swarm Coordination Agents
276
+ | Agent | Type | Capabilities |
277
+ |-------|------|-------------|
278
+ | **hierarchical-coordinator** | Coordination | Queen-led hierarchical swarms |
279
+ | **mesh-coordinator** | Coordination | Peer-to-peer mesh networks |
280
+ | **adaptive-coordinator** | Coordination | Dynamic topology switching |
281
+ | **collective-intelligence-coordinator** | Coordination | Hive-mind intelligence |
282
+ | **swarm-memory-manager** | Memory | Distributed memory coordination |
283
+ | **consensus-builder** | Consensus | Distributed decision making |
284
+
285
+ ### GitHub Integration Agents
286
+ | Agent | Type | Capabilities |
287
+ |-------|------|-------------|
288
+ | **github-modes** | Integration | Comprehensive GitHub operations |
289
+ | **pr-manager** | Pull Requests | PR creation, review, management |
290
+ | **issue-tracker** | Issues | Issue management, tracking |
291
+ | **release-manager** | Releases | Release coordination, automation |
292
+ | **code-review-swarm** | Code Review | Multi-agent code review |
293
+ | **repo-architect** | Repository | Repository structure, organization |
294
+ | **workflow-automation** | Automation | GitHub Actions, CI/CD |
295
+ | **sync-coordinator** | Synchronization | Multi-repo coordination |
296
+
297
+ ### Performance & Consensus Agents
298
+ | Agent | Type | Capabilities |
299
+ |-------|------|-------------|
300
+ | **perf-analyzer** | Performance | Bottleneck identification, optimization |
301
+ | **byzantine-coordinator** | Consensus | Byzantine fault tolerance |
302
+ | **raft-manager** | Consensus | Raft consensus algorithm |
303
+ | **gossip-coordinator** | Communication | Gossip protocol coordination |
304
+ | **quorum-manager** | Consensus | Quorum-based decisions |
305
+ | **crdt-synchronizer** | Synchronization | CRDT-based data sync |
306
+ | **security-manager** | Security | Security validation, auditing |
307
+
308
+ ### SPARC Agents
309
+ | Agent | Type | Capabilities |
310
+ |-------|------|-------------|
311
+ | **sparc-coder** | SPARC Implementation | TDD-driven development |
312
+ | **sparc-coordinator** | SPARC Coordination | SPARC workflow management |
313
+
314
+ ## WebSocket Integration
315
+
316
+ ### Connection Setup
317
+
318
+ ```javascript
319
+ const ws = new WebSocket('wss://api.claude-flow.ai/v2/ws');
320
+
321
+ // Authentication
322
+ ws.on('open', () => {
323
+ ws.send(JSON.stringify({
324
+ type: 'auth',
325
+ token: 'your-session-token'
326
+ }));
327
+ });
328
+
329
+ // Subscribe to agent events
330
+ ws.send(JSON.stringify({
331
+ type: 'subscribe',
332
+ channels: ['agents', 'swarms', 'tasks', 'memory']
333
+ }));
334
+ ```
335
+
336
+ ### Event Types
337
+
338
+ #### Agent Events
339
+ ```javascript
340
+ // Agent spawned
341
+ {
342
+ "type": "agent.spawned",
343
+ "data": {
344
+ "agentId": "agent_123",
345
+ "type": "coder",
346
+ "name": "Backend Developer",
347
+ "status": "active"
348
+ }
349
+ }
350
+
351
+ // Agent status change
352
+ {
353
+ "type": "agent.status",
354
+ "data": {
355
+ "agentId": "agent_123",
356
+ "status": "busy",
357
+ "currentTask": "implement-auth",
358
+ "progress": 0.65
359
+ }
360
+ }
361
+ ```
362
+
363
+ #### Swarm Events
364
+ ```javascript
365
+ // Swarm coordination event
366
+ {
367
+ "type": "swarm.coordination",
368
+ "data": {
369
+ "swarmId": "swarm_456",
370
+ "topology": "hierarchical",
371
+ "agentCount": 8,
372
+ "efficiency": 0.94
373
+ }
374
+ }
375
+
376
+ // Task orchestration
377
+ {
378
+ "type": "swarm.task",
379
+ "data": {
380
+ "taskId": "task_789",
381
+ "assignedAgents": ["agent_123", "agent_456"],
382
+ "strategy": "parallel",
383
+ "progress": 0.45
384
+ }
385
+ }
386
+ ```
387
+
388
+ #### Memory Events
389
+ ```javascript
390
+ // Memory synchronization
391
+ {
392
+ "type": "memory.sync",
393
+ "data": {
394
+ "namespace": "project-alpha",
395
+ "entriesSync": 1247,
396
+ "compressionRatio": 0.65,
397
+ "latency": "12ms"
398
+ }
399
+ }
400
+ ```
401
+
402
+ ## Command Examples
403
+
404
+ ### Complete Development Workflow
405
+
406
+ ```bash
407
+ # 1. Initialize project with GitHub integration
408
+ npx claude-flow@alpha github init
409
+
410
+ # 2. Set up swarm for development
411
+ npx claude-flow@alpha coordination swarm-init \
412
+ --topology hierarchical \
413
+ --max-agents 8 \
414
+ --strategy adaptive
415
+
416
+ # 3. Spawn development team (concurrent)
417
+ npx claude-flow@alpha coordination agent-spawn --type system-architect --name "Lead Architect"
418
+ npx claude-flow@alpha coordination agent-spawn --type backend-dev --name "API Developer"
419
+ npx claude-flow@alpha coordination agent-spawn --type coder --name "Frontend Dev"
420
+ npx claude-flow@alpha coordination agent-spawn --type tester --name "QA Engineer"
421
+ npx claude-flow@alpha coordination agent-spawn --type code-analyzer --name "Code Reviewer"
422
+
423
+ # 4. Store project context in memory
424
+ npx claude-flow@alpha memory usage \
425
+ --action store \
426
+ --key "project/architecture" \
427
+ --value "Microservices with event sourcing and CQRS" \
428
+ --namespace "development" \
429
+ --ttl 86400
430
+
431
+ # 5. Orchestrate development task
432
+ npx claude-flow@alpha coordination task-orchestrate \
433
+ --task "Build complete REST API with authentication and testing" \
434
+ --strategy parallel \
435
+ --priority high
436
+
437
+ # 6. Monitor swarm performance
438
+ npx claude-flow@alpha coordination swarm-status
439
+ npx claude-flow@alpha performance report --timeframe 24h --format detailed
440
+
441
+ # 7. Analyze GitHub repository
442
+ npx claude-flow@alpha github repo-analyze \
443
+ --repo "myorg/my-project" \
444
+ --analysis-type code_quality
445
+
446
+ # 8. Create workflow for automation
447
+ npx claude-flow@alpha workflow create \
448
+ --name "full-stack-pipeline" \
449
+ --steps '[
450
+ {"type": "swarm_init", "topology": "hierarchical"},
451
+ {"type": "agent_spawn", "agents": ["architect", "coder", "tester"]},
452
+ {"type": "task_orchestrate", "strategy": "parallel"},
453
+ {"type": "github_integration", "automate": true}
454
+ ]'
455
+ ```
456
+
457
+ ### Neural Network Training
458
+
459
+ ```bash
460
+ # 1. Check neural system status
461
+ npx claude-flow@alpha neural status
462
+
463
+ # 2. Train coordination patterns
464
+ npx claude-flow@alpha neural train \
465
+ --pattern-type coordination \
466
+ --training-data "./data/coordination-patterns.json" \
467
+ --epochs 100
468
+
469
+ # 3. Make AI predictions
470
+ npx claude-flow@alpha neural predict \
471
+ --model-id coordination_model_v1.2 \
472
+ --input "complex microservices architecture with event sourcing"
473
+
474
+ # 4. Analyze cognitive patterns
475
+ npx claude-flow@alpha neural patterns \
476
+ --pattern convergent \
477
+ --analysis detailed
478
+ ```
479
+
480
+ ### Memory and State Management
481
+
482
+ ```bash
483
+ # 1. Store complex project data
484
+ npx claude-flow@alpha memory usage \
485
+ --action store \
486
+ --key "decisions/architecture" \
487
+ --value '{
488
+ "pattern": "microservices",
489
+ "database": "postgres",
490
+ "auth": "jwt",
491
+ "caching": "redis"
492
+ }' \
493
+ --namespace "project-alpha" \
494
+ --ttl 604800
495
+
496
+ # 2. Search for related information
497
+ npx claude-flow@alpha memory search \
498
+ --pattern "microservices|architecture" \
499
+ --namespace "project-alpha" \
500
+ --limit 10
501
+
502
+ # 3. Create memory backup
503
+ npx claude-flow@alpha memory backup \
504
+ --namespace "project-alpha" \
505
+ --format compressed
506
+
507
+ # 4. Analyze memory usage
508
+ npx claude-flow@alpha memory analytics \
509
+ --timeframe 7d \
510
+ --include-compression-stats
511
+ ```
512
+
513
+ ### Performance Monitoring
514
+
515
+ ```bash
516
+ # 1. Run comprehensive performance report
517
+ npx claude-flow@alpha performance report \
518
+ --timeframe 24h \
519
+ --format detailed \
520
+ --include-recommendations
521
+
522
+ # 2. Identify bottlenecks
523
+ npx claude-flow@alpha bottleneck analyze \
524
+ --component swarm_coordination \
525
+ --metrics "response_time,throughput,error_rate" \
526
+ --severity all
527
+
528
+ # 3. Optimize swarm topology
529
+ npx claude-flow@alpha topology optimize \
530
+ --swarm-id "swarm_123" \
531
+ --target-efficiency 0.95
532
+
533
+ # 4. Health check all systems
534
+ npx claude-flow@alpha health-check \
535
+ --components '["swarm", "neural", "memory", "mcp"]' \
536
+ --detailed true
537
+ ```
538
+
539
+ ## Error Handling
540
+
541
+ ### Common Error Codes
542
+
543
+ ```bash
544
+ # Agent spawn failure
545
+ {
546
+ "error": "AGENT_SPAWN_FAILED",
547
+ "message": "Maximum agent limit reached",
548
+ "details": {
549
+ "currentAgents": 8,
550
+ "maxAgents": 8,
551
+ "swarmId": "swarm_123"
552
+ }
553
+ }
554
+
555
+ # Memory operation failure
556
+ {
557
+ "error": "MEMORY_STORAGE_FULL",
558
+ "message": "Memory storage limit exceeded",
559
+ "details": {
560
+ "usedMemory": "512MB",
561
+ "maxMemory": "512MB",
562
+ "namespace": "project-alpha"
563
+ }
564
+ }
565
+
566
+ # Neural training failure
567
+ {
568
+ "error": "NEURAL_TRAINING_FAILED",
569
+ "message": "Insufficient training data",
570
+ "details": {
571
+ "requiredSamples": 100,
572
+ "providedSamples": 45,
573
+ "patternType": "coordination"
574
+ }
575
+ }
576
+ ```
577
+
578
+ ### Error Recovery
579
+
580
+ ```bash
581
+ # Retry with backoff
582
+ npx claude-flow@alpha coordination agent-spawn \
583
+ --type coder \
584
+ --retry-attempts 3 \
585
+ --retry-delay 1000
586
+
587
+ # Graceful degradation
588
+ npx claude-flow@alpha coordination swarm-init \
589
+ --topology hierarchical \
590
+ --fallback-topology mesh \
591
+ --max-agents 8 \
592
+ --min-agents 3
593
+
594
+ # Error notification
595
+ npx claude-flow@alpha hooks post-edit \
596
+ --file "error.log" \
597
+ --memory-key "errors/$(date +%s)" \
598
+ --notify-on-failure true
599
+ ```
600
+
601
+ ## Best Practices
602
+
603
+ ### 1. Efficient Agent Management
604
+
605
+ ```bash
606
+ # Always batch agent operations
607
+ # ✅ Good - Single message with multiple spawns
608
+ npx claude-flow@alpha coordination agent-spawn --type architect &
609
+ npx claude-flow@alpha coordination agent-spawn --type coder &
610
+ npx claude-flow@alpha coordination agent-spawn --type tester &
611
+ wait
612
+
613
+ # ❌ Bad - Sequential spawning
614
+ npx claude-flow@alpha coordination agent-spawn --type architect
615
+ npx claude-flow@alpha coordination agent-spawn --type coder
616
+ npx claude-flow@alpha coordination agent-spawn --type tester
617
+ ```
618
+
619
+ ### 2. Memory Management
620
+
621
+ ```bash
622
+ # Use namespaces effectively
623
+ npx claude-flow@alpha memory usage \
624
+ --action store \
625
+ --key "config/database" \
626
+ --namespace "project-$(date +%Y%m%d)" \
627
+ --ttl 86400
628
+
629
+ # Regular cleanup
630
+ npx claude-flow@alpha memory compress \
631
+ --namespace "temporary" \
632
+ --threshold 0.8
633
+ ```
634
+
635
+ ### 3. Performance Optimization
636
+
637
+ ```bash
638
+ # Monitor before scaling
639
+ npx claude-flow@alpha performance report --format summary
640
+ npx claude-flow@alpha coordination swarm-scale --target-size 12
641
+
642
+ # Use appropriate topologies
643
+ # Complex tasks -> hierarchical
644
+ # Collaborative work -> mesh
645
+ # Sequential processing -> ring
646
+ # Centralized control -> star
647
+ ```
648
+
649
+ ### 4. Integration Patterns
650
+
651
+ ```bash
652
+ # Hook integration for automation
653
+ npx claude-flow@alpha hooks pre-task \
654
+ --description "Auto-spawn agents based on task complexity"
655
+
656
+ npx claude-flow@alpha hooks post-edit \
657
+ --file "src/**/*.js" \
658
+ --memory-key "code-changes/$(date +%s)"
659
+
660
+ # Workflow templates for reusability
661
+ npx claude-flow@alpha workflow template \
662
+ --name "api-development" \
663
+ --export "./templates/api-dev-workflow.json"
664
+ ```
665
+
666
+ ### 5. Security and Access Control
667
+
668
+ ```bash
669
+ # Secure authentication
670
+ npx claude-flow@alpha github init --secure-mode
671
+ npx claude-flow@alpha config set --api-key-encryption enabled
672
+
673
+ # Resource limits
674
+ npx claude-flow@alpha coordination swarm-init \
675
+ --max-agents 10 \
676
+ --memory-limit "1GB" \
677
+ --cpu-limit "4 cores"
678
+
679
+ # Audit logging
680
+ npx claude-flow@alpha log-analysis \
681
+ --include-security-events \
682
+ --format audit
683
+ ```
684
+
685
+ ---
686
+
687
+ ## Support & Resources
688
+
689
+ ### Documentation Links
690
+ - [GitHub Repository](https://github.com/ruvnet/claude-flow)
691
+ - [Integration Guide](./INTEGRATION_GUIDE.md)
692
+ - [Agent System Documentation](./agent-system-documentation.md)
693
+ - [MCP Tools Reference](./mcp-tools-reference.md)
694
+
695
+ ### CLI Help
696
+ ```bash
697
+ # Get help for any command
698
+ npx claude-flow@alpha --help
699
+ npx claude-flow@alpha coordination --help
700
+ npx claude-flow@alpha github --help
701
+
702
+ # Version information
703
+ npx claude-flow@alpha --version
704
+ ```
705
+
706
+ ### Community
707
+ - **Discord**: [Join our community](https://discord.gg/claude-flow)
708
+ - **GitHub Issues**: [Report bugs](https://github.com/ruvnet/claude-flow/issues)
709
+ - **Discussions**: [Feature requests](https://github.com/ruvnet/claude-flow/discussions)
710
+
711
+ ---
712
+
713
+ <div align="center">
714
+
715
+ **Claude-Flow v2.0.0-alpha.59**
716
+
717
+ *Intelligent AI Agent Orchestration*
718
+
719
+ [🚀 Get Started](../README.md) | [🔧 Configure](./DEPLOYMENT.md) | [🤝 Contribute](../CONTRIBUTING.md)
720
+
721
+ </div>