@claude-flow/cli 3.0.0-alpha.2 → 3.0.0-alpha.20

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 (263) hide show
  1. package/README.md +172 -6
  2. package/bin/cli.js +0 -0
  3. package/dist/src/commands/agent.d.ts.map +1 -1
  4. package/dist/src/commands/agent.js +43 -27
  5. package/dist/src/commands/agent.js.map +1 -1
  6. package/dist/src/commands/analyze.d.ts +19 -0
  7. package/dist/src/commands/analyze.d.ts.map +1 -0
  8. package/dist/src/commands/analyze.js +1823 -0
  9. package/dist/src/commands/analyze.js.map +1 -0
  10. package/dist/src/commands/claims.d.ts +10 -0
  11. package/dist/src/commands/claims.d.ts.map +1 -0
  12. package/dist/src/commands/claims.js +288 -0
  13. package/dist/src/commands/claims.js.map +1 -0
  14. package/dist/src/commands/completions.d.ts +10 -0
  15. package/dist/src/commands/completions.d.ts.map +1 -0
  16. package/dist/src/commands/completions.js +539 -0
  17. package/dist/src/commands/completions.js.map +1 -0
  18. package/dist/src/commands/config.js +2 -2
  19. package/dist/src/commands/config.js.map +1 -1
  20. package/dist/src/commands/daemon.d.ts +8 -0
  21. package/dist/src/commands/daemon.d.ts.map +1 -0
  22. package/dist/src/commands/daemon.js +545 -0
  23. package/dist/src/commands/daemon.js.map +1 -0
  24. package/dist/src/commands/deployment.d.ts +10 -0
  25. package/dist/src/commands/deployment.d.ts.map +1 -0
  26. package/dist/src/commands/deployment.js +289 -0
  27. package/dist/src/commands/deployment.js.map +1 -0
  28. package/dist/src/commands/doctor.d.ts +10 -0
  29. package/dist/src/commands/doctor.d.ts.map +1 -0
  30. package/dist/src/commands/doctor.js +429 -0
  31. package/dist/src/commands/doctor.js.map +1 -0
  32. package/dist/src/commands/embeddings.d.ts +18 -0
  33. package/dist/src/commands/embeddings.d.ts.map +1 -0
  34. package/dist/src/commands/embeddings.js +616 -0
  35. package/dist/src/commands/embeddings.js.map +1 -0
  36. package/dist/src/commands/hive-mind.d.ts.map +1 -1
  37. package/dist/src/commands/hive-mind.js +252 -35
  38. package/dist/src/commands/hive-mind.js.map +1 -1
  39. package/dist/src/commands/hooks.d.ts.map +1 -1
  40. package/dist/src/commands/hooks.js +326 -2
  41. package/dist/src/commands/hooks.js.map +1 -1
  42. package/dist/src/commands/index.d.ts +13 -0
  43. package/dist/src/commands/index.d.ts.map +1 -1
  44. package/dist/src/commands/index.js +52 -1
  45. package/dist/src/commands/index.js.map +1 -1
  46. package/dist/src/commands/mcp.js +4 -4
  47. package/dist/src/commands/mcp.js.map +1 -1
  48. package/dist/src/commands/memory.d.ts.map +1 -1
  49. package/dist/src/commands/memory.js +236 -170
  50. package/dist/src/commands/memory.js.map +1 -1
  51. package/dist/src/commands/migrate.js +1 -1
  52. package/dist/src/commands/migrate.js.map +1 -1
  53. package/dist/src/commands/neural.d.ts +10 -0
  54. package/dist/src/commands/neural.d.ts.map +1 -0
  55. package/dist/src/commands/neural.js +224 -0
  56. package/dist/src/commands/neural.js.map +1 -0
  57. package/dist/src/commands/performance.d.ts +10 -0
  58. package/dist/src/commands/performance.d.ts.map +1 -0
  59. package/dist/src/commands/performance.js +262 -0
  60. package/dist/src/commands/performance.js.map +1 -0
  61. package/dist/src/commands/plugins.d.ts +10 -0
  62. package/dist/src/commands/plugins.d.ts.map +1 -0
  63. package/dist/src/commands/plugins.js +280 -0
  64. package/dist/src/commands/plugins.js.map +1 -0
  65. package/dist/src/commands/process.d.ts.map +1 -1
  66. package/dist/src/commands/process.js +95 -20
  67. package/dist/src/commands/process.js.map +1 -1
  68. package/dist/src/commands/providers.d.ts +10 -0
  69. package/dist/src/commands/providers.d.ts.map +1 -0
  70. package/dist/src/commands/providers.js +232 -0
  71. package/dist/src/commands/providers.js.map +1 -0
  72. package/dist/src/commands/route.d.ts +16 -0
  73. package/dist/src/commands/route.d.ts.map +1 -0
  74. package/dist/src/commands/route.js +603 -0
  75. package/dist/src/commands/route.js.map +1 -0
  76. package/dist/src/commands/security.d.ts +10 -0
  77. package/dist/src/commands/security.d.ts.map +1 -0
  78. package/dist/src/commands/security.js +261 -0
  79. package/dist/src/commands/security.js.map +1 -0
  80. package/dist/src/commands/start.js +2 -2
  81. package/dist/src/commands/start.js.map +1 -1
  82. package/dist/src/commands/status.d.ts.map +1 -1
  83. package/dist/src/commands/status.js +26 -2
  84. package/dist/src/commands/status.js.map +1 -1
  85. package/dist/src/commands/swarm.js +6 -6
  86. package/dist/src/commands/swarm.js.map +1 -1
  87. package/dist/src/index.d.ts +4 -2
  88. package/dist/src/index.d.ts.map +1 -1
  89. package/dist/src/index.js +63 -5
  90. package/dist/src/index.js.map +1 -1
  91. package/dist/src/init/claudemd-generator.d.ts.map +1 -1
  92. package/dist/src/init/claudemd-generator.js +218 -362
  93. package/dist/src/init/claudemd-generator.js.map +1 -1
  94. package/dist/src/init/executor.d.ts.map +1 -1
  95. package/dist/src/init/executor.js +5 -0
  96. package/dist/src/init/executor.js.map +1 -1
  97. package/dist/src/init/settings-generator.d.ts.map +1 -1
  98. package/dist/src/init/settings-generator.js +22 -12
  99. package/dist/src/init/settings-generator.js.map +1 -1
  100. package/dist/src/mcp-client.d.ts.map +1 -1
  101. package/dist/src/mcp-client.js +17 -1
  102. package/dist/src/mcp-client.js.map +1 -1
  103. package/dist/src/mcp-server.d.ts.map +1 -1
  104. package/dist/src/mcp-server.js +5 -0
  105. package/dist/src/mcp-server.js.map +1 -1
  106. package/dist/src/mcp-tools/agent-tools.d.ts +1 -1
  107. package/dist/src/mcp-tools/agent-tools.d.ts.map +1 -1
  108. package/dist/src/mcp-tools/agent-tools.js +350 -14
  109. package/dist/src/mcp-tools/agent-tools.js.map +1 -1
  110. package/dist/src/mcp-tools/analyze-tools.d.ts +38 -0
  111. package/dist/src/mcp-tools/analyze-tools.d.ts.map +1 -0
  112. package/dist/src/mcp-tools/analyze-tools.js +317 -0
  113. package/dist/src/mcp-tools/analyze-tools.js.map +1 -0
  114. package/dist/src/mcp-tools/config-tools.d.ts +1 -1
  115. package/dist/src/mcp-tools/config-tools.d.ts.map +1 -1
  116. package/dist/src/mcp-tools/config-tools.js +262 -15
  117. package/dist/src/mcp-tools/config-tools.js.map +1 -1
  118. package/dist/src/mcp-tools/hive-mind-tools.d.ts +8 -0
  119. package/dist/src/mcp-tools/hive-mind-tools.d.ts.map +1 -0
  120. package/dist/src/mcp-tools/hive-mind-tools.js +447 -0
  121. package/dist/src/mcp-tools/hive-mind-tools.js.map +1 -0
  122. package/dist/src/mcp-tools/hooks-tools.d.ts.map +1 -1
  123. package/dist/src/mcp-tools/hooks-tools.js +80 -15
  124. package/dist/src/mcp-tools/hooks-tools.js.map +1 -1
  125. package/dist/src/mcp-tools/index.d.ts +6 -0
  126. package/dist/src/mcp-tools/index.d.ts.map +1 -1
  127. package/dist/src/mcp-tools/index.js +6 -0
  128. package/dist/src/mcp-tools/index.js.map +1 -1
  129. package/dist/src/mcp-tools/memory-tools.d.ts +1 -1
  130. package/dist/src/mcp-tools/memory-tools.d.ts.map +1 -1
  131. package/dist/src/mcp-tools/memory-tools.js +157 -9
  132. package/dist/src/mcp-tools/memory-tools.js.map +1 -1
  133. package/dist/src/mcp-tools/session-tools.d.ts +8 -0
  134. package/dist/src/mcp-tools/session-tools.d.ts.map +1 -0
  135. package/dist/src/mcp-tools/session-tools.js +315 -0
  136. package/dist/src/mcp-tools/session-tools.js.map +1 -0
  137. package/dist/src/mcp-tools/swarm-tools.d.ts.map +1 -1
  138. package/dist/src/mcp-tools/swarm-tools.js +37 -2
  139. package/dist/src/mcp-tools/swarm-tools.js.map +1 -1
  140. package/dist/src/mcp-tools/task-tools.d.ts +8 -0
  141. package/dist/src/mcp-tools/task-tools.d.ts.map +1 -0
  142. package/dist/src/mcp-tools/task-tools.js +302 -0
  143. package/dist/src/mcp-tools/task-tools.js.map +1 -0
  144. package/dist/src/mcp-tools/workflow-tools.d.ts +8 -0
  145. package/dist/src/mcp-tools/workflow-tools.d.ts.map +1 -0
  146. package/dist/src/mcp-tools/workflow-tools.js +481 -0
  147. package/dist/src/mcp-tools/workflow-tools.js.map +1 -0
  148. package/dist/src/output.d.ts +16 -0
  149. package/dist/src/output.d.ts.map +1 -1
  150. package/dist/src/output.js +42 -0
  151. package/dist/src/output.js.map +1 -1
  152. package/dist/src/ruvector/ast-analyzer.d.ts +67 -0
  153. package/dist/src/ruvector/ast-analyzer.d.ts.map +1 -0
  154. package/dist/src/ruvector/ast-analyzer.js +277 -0
  155. package/dist/src/ruvector/ast-analyzer.js.map +1 -0
  156. package/dist/src/ruvector/coverage-router.d.ts +145 -0
  157. package/dist/src/ruvector/coverage-router.d.ts.map +1 -0
  158. package/dist/src/ruvector/coverage-router.js +451 -0
  159. package/dist/src/ruvector/coverage-router.js.map +1 -0
  160. package/dist/src/ruvector/coverage-tools.d.ts +33 -0
  161. package/dist/src/ruvector/coverage-tools.d.ts.map +1 -0
  162. package/dist/src/ruvector/coverage-tools.js +157 -0
  163. package/dist/src/ruvector/coverage-tools.js.map +1 -0
  164. package/dist/src/ruvector/diff-classifier.d.ts +154 -0
  165. package/dist/src/ruvector/diff-classifier.d.ts.map +1 -0
  166. package/dist/src/ruvector/diff-classifier.js +508 -0
  167. package/dist/src/ruvector/diff-classifier.js.map +1 -0
  168. package/dist/src/ruvector/graph-analyzer.d.ts +174 -0
  169. package/dist/src/ruvector/graph-analyzer.d.ts.map +1 -0
  170. package/dist/src/ruvector/graph-analyzer.js +878 -0
  171. package/dist/src/ruvector/graph-analyzer.js.map +1 -0
  172. package/dist/src/ruvector/index.d.ts +27 -0
  173. package/dist/src/ruvector/index.d.ts.map +1 -0
  174. package/dist/src/ruvector/index.js +47 -0
  175. package/dist/src/ruvector/index.js.map +1 -0
  176. package/dist/src/ruvector/q-learning-router.d.ts +211 -0
  177. package/dist/src/ruvector/q-learning-router.d.ts.map +1 -0
  178. package/dist/src/ruvector/q-learning-router.js +681 -0
  179. package/dist/src/ruvector/q-learning-router.js.map +1 -0
  180. package/dist/src/ruvector/vector-db.d.ts +69 -0
  181. package/dist/src/ruvector/vector-db.d.ts.map +1 -0
  182. package/dist/src/ruvector/vector-db.js +243 -0
  183. package/dist/src/ruvector/vector-db.js.map +1 -0
  184. package/dist/src/services/index.d.ts +7 -0
  185. package/dist/src/services/index.d.ts.map +1 -0
  186. package/dist/src/services/index.js +6 -0
  187. package/dist/src/services/index.js.map +1 -0
  188. package/dist/src/services/worker-daemon.d.ts +153 -0
  189. package/dist/src/services/worker-daemon.d.ts.map +1 -0
  190. package/dist/src/services/worker-daemon.js +567 -0
  191. package/dist/src/services/worker-daemon.js.map +1 -0
  192. package/dist/src/suggest.d.ts +53 -0
  193. package/dist/src/suggest.d.ts.map +1 -0
  194. package/dist/src/suggest.js +200 -0
  195. package/dist/src/suggest.js.map +1 -0
  196. package/dist/tsconfig.tsbuildinfo +1 -1
  197. package/package.json +28 -6
  198. package/.agentic-flow/intelligence.json +0 -16
  199. package/.claude-flow/metrics/agent-metrics.json +0 -1
  200. package/.claude-flow/metrics/performance.json +0 -87
  201. package/.claude-flow/metrics/task-metrics.json +0 -10
  202. package/__tests__/README.md +0 -140
  203. package/__tests__/TEST_SUMMARY.md +0 -144
  204. package/__tests__/cli.test.ts +0 -558
  205. package/__tests__/commands.test.ts +0 -726
  206. package/__tests__/config-adapter.test.ts +0 -362
  207. package/__tests__/config-loading.test.ts +0 -106
  208. package/__tests__/coverage/.tmp/coverage-0.json +0 -1
  209. package/__tests__/coverage/.tmp/coverage-1.json +0 -1
  210. package/__tests__/coverage/.tmp/coverage-2.json +0 -1
  211. package/__tests__/coverage/.tmp/coverage-3.json +0 -1
  212. package/__tests__/coverage/.tmp/coverage-4.json +0 -1
  213. package/__tests__/coverage/.tmp/coverage-5.json +0 -1
  214. package/__tests__/mcp-client.test.ts +0 -480
  215. package/__tests__/p1-commands.test.ts +0 -1064
  216. package/docs/CONFIG_LOADING.md +0 -236
  217. package/docs/IMPLEMENTATION_COMPLETE.md +0 -421
  218. package/docs/MCP_CLIENT_GUIDE.md +0 -620
  219. package/docs/REFACTORING_SUMMARY.md +0 -247
  220. package/src/commands/agent.ts +0 -941
  221. package/src/commands/config.ts +0 -452
  222. package/src/commands/hive-mind.ts +0 -762
  223. package/src/commands/hooks.ts +0 -2603
  224. package/src/commands/index.ts +0 -115
  225. package/src/commands/init.ts +0 -597
  226. package/src/commands/mcp.ts +0 -753
  227. package/src/commands/memory.ts +0 -1063
  228. package/src/commands/migrate.ts +0 -447
  229. package/src/commands/process.ts +0 -617
  230. package/src/commands/session.ts +0 -891
  231. package/src/commands/start.ts +0 -457
  232. package/src/commands/status.ts +0 -705
  233. package/src/commands/swarm.ts +0 -648
  234. package/src/commands/task.ts +0 -792
  235. package/src/commands/workflow.ts +0 -742
  236. package/src/config-adapter.ts +0 -210
  237. package/src/index.ts +0 -383
  238. package/src/infrastructure/in-memory-repositories.ts +0 -310
  239. package/src/init/claudemd-generator.ts +0 -631
  240. package/src/init/executor.ts +0 -756
  241. package/src/init/helpers-generator.ts +0 -628
  242. package/src/init/index.ts +0 -60
  243. package/src/init/mcp-generator.ts +0 -83
  244. package/src/init/settings-generator.ts +0 -274
  245. package/src/init/statusline-generator.ts +0 -211
  246. package/src/init/types.ts +0 -447
  247. package/src/mcp-client.ts +0 -227
  248. package/src/mcp-server.ts +0 -571
  249. package/src/mcp-tools/agent-tools.ts +0 -92
  250. package/src/mcp-tools/config-tools.ts +0 -88
  251. package/src/mcp-tools/hooks-tools.ts +0 -1819
  252. package/src/mcp-tools/index.ts +0 -12
  253. package/src/mcp-tools/memory-tools.ts +0 -89
  254. package/src/mcp-tools/swarm-tools.ts +0 -69
  255. package/src/mcp-tools/types.ts +0 -33
  256. package/src/output.ts +0 -593
  257. package/src/parser.ts +0 -417
  258. package/src/prompt.ts +0 -619
  259. package/src/types.ts +0 -287
  260. package/tmp.json +0 -0
  261. package/tsconfig.json +0 -16
  262. package/tsconfig.tsbuildinfo +0 -1
  263. package/vitest.config.ts +0 -13
@@ -9,7 +9,7 @@ export function generateClaudeMd(options) {
9
9
  const topology = options.runtime.topology;
10
10
  const maxAgents = options.runtime.maxAgents;
11
11
  const memoryBackend = options.runtime.memoryBackend;
12
- return `# Claude Code Configuration - SPARC Development Environment
12
+ return `# Claude Code Configuration - Claude Flow V3
13
13
 
14
14
  ## 🚨 AUTOMATIC SWARM ORCHESTRATION
15
15
 
@@ -70,15 +70,14 @@ mcp__claude-flow__memory_usage({
70
70
 
71
71
  ### 📋 Agent Routing by Task Type
72
72
 
73
- **Automatically select agents based on task:**
74
-
75
73
  | Task Type | Required Agents | Topology |
76
74
  |-----------|-----------------|----------|
77
75
  | Bug Fix | researcher, coder, tester | mesh |
78
76
  | New Feature | coordinator, architect, coder, tester, reviewer | hierarchical |
79
77
  | Refactoring | architect, coder, reviewer | mesh |
80
- | Performance | researcher, coder, perf-analyzer | hierarchical |
81
- | Security Audit | security-manager, reviewer, tester | hierarchical |
78
+ | Performance | researcher, performance-engineer, coder | hierarchical |
79
+ | Security Audit | security-architect, security-auditor, reviewer | hierarchical |
80
+ | Memory Optimization | memory-specialist, performance-engineer | mesh |
82
81
  | Documentation | researcher, api-docs | mesh |
83
82
 
84
83
  ### 🎯 Task Complexity Detection
@@ -99,36 +98,6 @@ mcp__claude-flow__memory_usage({
99
98
  - Configuration changes
100
99
  - Quick questions/exploration
101
100
 
102
- ### 🔧 Settings Configuration
103
-
104
- The following settings are auto-configured in \`.claude/settings.json\`:
105
-
106
- \`\`\`json
107
- {
108
- "hooks": {
109
- "PreToolUse": [{
110
- "matcher": "Task",
111
- "commands": ["npx claude-flow@v3alpha hooks pre-task --tool Task"]
112
- }],
113
- "PostToolUse": [{
114
- "matcher": "Task",
115
- "commands": ["npx claude-flow@v3alpha hooks post-task --tool Task"]
116
- }],
117
- "UserPromptSubmit": [{
118
- "matcher": ".*",
119
- "commands": ["npx claude-flow@v3alpha hooks route-task"]
120
- }]
121
- },
122
- "permissions": {
123
- "allow": [
124
- "Bash(npx claude-flow:*)",
125
- "mcp__claude-flow__*",
126
- "mcp__ruv-swarm__*"
127
- ]
128
- }
129
- }
130
- \`\`\`
131
-
132
101
  ## 🚨 CRITICAL: CONCURRENT EXECUTION & FILE MANAGEMENT
133
102
 
134
103
  **ABSOLUTE RULES**:
@@ -146,24 +115,6 @@ The following settings are auto-configured in \`.claude/settings.json\`:
146
115
  - **Bash commands**: ALWAYS batch ALL terminal operations in ONE message
147
116
  - **Memory operations**: ALWAYS batch ALL memory store/retrieve in ONE message
148
117
 
149
- ### 🎯 CRITICAL: Claude Code Task Tool for Agent Execution
150
-
151
- **Claude Code's Task tool is the PRIMARY way to spawn agents:**
152
- \`\`\`javascript
153
- // ✅ CORRECT: Use Claude Code's Task tool for parallel agent execution
154
- [Single Message]:
155
- Task("Research agent", "Analyze requirements and patterns...", "researcher")
156
- Task("Coder agent", "Implement core features...", "coder")
157
- Task("Tester agent", "Create comprehensive tests...", "tester")
158
- Task("Reviewer agent", "Review code quality...", "reviewer")
159
- Task("Architect agent", "Design system architecture...", "system-architect")
160
- \`\`\`
161
-
162
- **MCP tools are ONLY for coordination setup:**
163
- - \`mcp__claude-flow__swarm_init\` - Initialize coordination topology
164
- - \`mcp__claude-flow__agent_spawn\` - Define agent types for coordination
165
- - \`mcp__claude-flow__task_orchestrate\` - Orchestrate high-level workflows
166
-
167
118
  ### 📁 File Organization Rules
168
119
 
169
120
  **NEVER save to root folder. Use these directories:**
@@ -180,30 +131,81 @@ This project is configured with Claude Flow V3:
180
131
  - **Topology**: ${topology}
181
132
  - **Max Agents**: ${maxAgents}
182
133
  - **Memory Backend**: ${memoryBackend}
183
- - **HNSW Indexing**: ${options.runtime.enableHNSW ? 'Enabled' : 'Disabled'}
184
- - **Neural Learning**: ${options.runtime.enableNeural ? 'Enabled' : 'Disabled'}
134
+ - **HNSW Indexing**: ${options.runtime.enableHNSW ? 'Enabled (150x-12,500x faster)' : 'Disabled'}
135
+ - **Neural Learning**: ${options.runtime.enableNeural ? 'Enabled (SONA)' : 'Disabled'}
136
+
137
+ ## 🚀 V3 CLI Commands (26 Commands, 140+ Subcommands)
138
+
139
+ ### Core Commands
140
+
141
+ | Command | Subcommands | Description |
142
+ |---------|-------------|-------------|
143
+ | \`init\` | 4 | Project initialization with wizard, presets, skills, hooks |
144
+ | \`agent\` | 8 | Agent lifecycle (spawn, list, status, stop, metrics, pool, health, logs) |
145
+ | \`swarm\` | 6 | Multi-agent swarm coordination and orchestration |
146
+ | \`memory\` | 11 | AgentDB memory with vector search (150x-12,500x faster) |
147
+ | \`mcp\` | 9 | MCP server management and tool execution |
148
+ | \`task\` | 6 | Task creation, assignment, and lifecycle |
149
+ | \`session\` | 7 | Session state management and persistence |
150
+ | \`config\` | 7 | Configuration management and provider setup |
151
+ | \`status\` | 3 | System status monitoring with watch mode |
152
+ | \`workflow\` | 6 | Workflow execution and template management |
153
+ | \`hooks\` | 17 | Self-learning hooks + 12 background workers |
154
+ | \`hive-mind\` | 6 | Queen-led Byzantine fault-tolerant consensus |
155
+
156
+ ### Advanced Commands
157
+
158
+ | Command | Subcommands | Description |
159
+ |---------|-------------|-------------|
160
+ | \`daemon\` | 5 | Background worker daemon (start, stop, status, trigger, enable) |
161
+ | \`neural\` | 5 | Neural pattern training (train, status, patterns, predict, optimize) |
162
+ | \`security\` | 6 | Security scanning (scan, audit, cve, threats, validate, report) |
163
+ | \`performance\` | 5 | Performance profiling (benchmark, profile, metrics, optimize, report) |
164
+ | \`providers\` | 5 | AI providers (list, add, remove, test, configure) |
165
+ | \`plugins\` | 5 | Plugin management (list, install, uninstall, enable, disable) |
166
+ | \`deployment\` | 5 | Deployment management (deploy, rollback, status, environments, release) |
167
+ | \`embeddings\` | 4 | Vector embeddings (embed, batch, search, init) - 75x faster with agentic-flow |
168
+ | \`claims\` | 4 | Claims-based authorization (check, grant, revoke, list) |
169
+ | \`migrate\` | 5 | V2 to V3 migration with rollback support |
170
+ | \`doctor\` | 1 | System diagnostics with health checks |
171
+ | \`completions\` | 4 | Shell completions (bash, zsh, fish, powershell) |
172
+
173
+ ### Quick CLI Examples
185
174
 
186
- ## SPARC Workflow Phases
175
+ \`\`\`bash
176
+ # Initialize project
177
+ npx claude-flow@v3alpha init --wizard
178
+
179
+ # Start daemon with background workers
180
+ npx claude-flow@v3alpha daemon start
181
+
182
+ # Spawn an agent
183
+ npx claude-flow@v3alpha agent spawn -t coder --name my-coder
187
184
 
188
- 1. **Specification** - Requirements analysis (\`sparc run spec-pseudocode\`)
189
- 2. **Pseudocode** - Algorithm design (\`sparc run spec-pseudocode\`)
190
- 3. **Architecture** - System design (\`sparc run architect\`)
191
- 4. **Refinement** - TDD implementation (\`sparc tdd\`)
192
- 5. **Completion** - Integration (\`sparc run integration\`)
185
+ # Initialize swarm
186
+ npx claude-flow@v3alpha swarm init --v3-mode
193
187
 
194
- ## Code Style & Best Practices
188
+ # Search memory (HNSW-indexed)
189
+ npx claude-flow@v3alpha memory search -q "authentication patterns"
195
190
 
196
- - **Modular Design**: Files under 500 lines
197
- - **Environment Safety**: Never hardcode secrets
198
- - **Test-First**: Write tests before implementation
199
- - **Clean Architecture**: Separate concerns
200
- - **Documentation**: Keep updated
191
+ # System diagnostics
192
+ npx claude-flow@v3alpha doctor --fix
201
193
 
202
- ## 🚀 Available Agents
194
+ # Security scan
195
+ npx claude-flow@v3alpha security scan --depth full
196
+
197
+ # Performance benchmark
198
+ npx claude-flow@v3alpha performance benchmark --suite all
199
+ \`\`\`
200
+
201
+ ## 🚀 Available Agents (60+ Types)
203
202
 
204
203
  ### Core Development
205
204
  \`coder\`, \`reviewer\`, \`tester\`, \`planner\`, \`researcher\`
206
205
 
206
+ ### V3 Specialized Agents
207
+ \`security-architect\`, \`security-auditor\`, \`memory-specialist\`, \`performance-engineer\`
208
+
207
209
  ### Swarm Coordination
208
210
  \`hierarchical-coordinator\`, \`mesh-coordinator\`, \`adaptive-coordinator\`, \`collective-intelligence-coordinator\`, \`swarm-memory-manager\`
209
211
 
@@ -225,277 +227,67 @@ This project is configured with Claude Flow V3:
225
227
  ### Testing & Validation
226
228
  \`tdd-london-swarm\`, \`production-validator\`
227
229
 
228
- ## 🎯 Claude Code vs MCP Tools
229
-
230
- ### Claude Code Handles ALL EXECUTION:
231
- - **Task tool**: Spawn and run agents concurrently for actual work
232
- - File operations (Read, Write, Edit, MultiEdit, Glob, Grep)
233
- - Code generation and programming
234
- - Bash commands and system operations
235
- - Implementation work
236
- - Project navigation and analysis
237
- - TodoWrite and task management
238
- - Git operations
239
- - Package management
240
- - Testing and debugging
241
-
242
- ### MCP Tools ONLY COORDINATE:
243
- - Swarm initialization (topology setup)
244
- - Agent type definitions (coordination patterns)
245
- - Task orchestration (high-level planning)
246
- - Memory management
247
- - Neural features
248
- - Performance tracking
249
- - GitHub integration
250
-
251
- **KEY**: MCP coordinates the strategy, Claude Code's Task tool executes with real agents.
252
-
253
- ## 🚀 Quick Setup
254
-
255
- \`\`\`bash
256
- # Add MCP servers (Claude Flow required, others optional)
257
- claude mcp add claude-flow npx claude-flow@v3alpha mcp start
258
- claude mcp add ruv-swarm npx ruv-swarm mcp start # Optional: Enhanced coordination
259
- claude mcp add flow-nexus npx flow-nexus@latest mcp start # Optional: Cloud features
260
- \`\`\`
261
-
262
- ## MCP Tool Categories
263
-
264
- ### Coordination
265
- \`swarm_init\`, \`agent_spawn\`, \`task_orchestrate\`
266
-
267
- ### Monitoring
268
- \`swarm_status\`, \`agent_list\`, \`agent_metrics\`, \`task_status\`, \`task_results\`
269
-
270
- ### Memory & Neural
271
- \`memory_usage\`, \`neural_status\`, \`neural_train\`, \`neural_patterns\`
272
-
273
- ### GitHub Integration
274
- \`github_swarm\`, \`repo_analyze\`, \`pr_enhance\`, \`issue_triage\`, \`code_review\`
275
-
276
- ### System
277
- \`benchmark_run\`, \`features_detect\`, \`swarm_monitor\`
278
-
279
- ## 🚀 Agent Execution Flow with Claude Code
280
-
281
- ### The Correct Pattern:
282
-
283
- 1. **Optional**: Use MCP tools to set up coordination topology
284
- 2. **REQUIRED**: Use Claude Code's Task tool to spawn agents that do actual work
285
- 3. **REQUIRED**: Each agent runs hooks for coordination
286
- 4. **REQUIRED**: Batch all operations in single messages
287
-
288
- ### Example Full-Stack Development:
289
-
290
- \`\`\`javascript
291
- // Single message with all agent spawning via Claude Code's Task tool
292
- [Parallel Agent Execution]:
293
- Task("Backend Developer", "Build REST API with Express. Use hooks for coordination.", "backend-dev")
294
- Task("Frontend Developer", "Create React UI. Coordinate with backend via memory.", "coder")
295
- Task("Database Architect", "Design PostgreSQL schema. Store schema in memory.", "code-analyzer")
296
- Task("Test Engineer", "Write Jest tests. Check memory for API contracts.", "tester")
297
- Task("DevOps Engineer", "Setup Docker and CI/CD. Document in memory.", "cicd-engineer")
298
- Task("Security Auditor", "Review authentication. Report findings via hooks.", "reviewer")
299
-
300
- // All todos batched together
301
- TodoWrite { todos: [...8-10 todos...] }
302
-
303
- // All file operations together
304
- Write "backend/server.js"
305
- Write "frontend/App.jsx"
306
- Write "database/schema.sql"
307
- \`\`\`
308
-
309
- ## 📋 Agent Coordination Protocol
310
-
311
- ### Every Agent Spawned via Task Tool MUST:
312
-
313
- **1️⃣ BEFORE Work:**
314
- \`\`\`bash
315
- npx claude-flow@v3alpha hooks pre-task --description "[task]"
316
- npx claude-flow@v3alpha hooks session-restore --session-id "swarm-[id]"
317
- \`\`\`
318
-
319
- **2️⃣ DURING Work:**
320
- \`\`\`bash
321
- npx claude-flow@v3alpha hooks post-edit --file "[file]" --memory-key "swarm/[agent]/[step]"
322
- npx claude-flow@v3alpha hooks notify --message "[what was done]"
323
- \`\`\`
324
-
325
- **3️⃣ AFTER Work:**
326
- \`\`\`bash
327
- npx claude-flow@v3alpha hooks post-task --task-id "[task]"
328
- npx claude-flow@v3alpha hooks session-end --export-metrics true
329
- \`\`\`
330
-
331
- ## 🚀 Swarm Lifecycle Management
332
-
333
- ### Session Start (AUTOMATIC)
334
- When beginning ANY development task, Claude Code should:
335
-
336
- \`\`\`javascript
337
- // 1. Check for existing swarm session
338
- mcp__claude-flow__swarm_status({})
339
-
340
- // 2. If no active swarm, initialize one
341
- mcp__claude-flow__swarm_init({ topology: "${topology}", maxAgents: ${maxAgents} })
342
-
343
- // 3. Restore previous context if available
344
- mcp__claude-flow__memory_usage({ action: "retrieve", namespace: "swarm", key: "last-session" })
345
- \`\`\`
346
-
347
- ### Task Execution (AUTOMATIC)
348
- For each significant task:
349
-
350
- \`\`\`javascript
351
- // 1. Create task orchestration
352
- mcp__claude-flow__task_orchestrate({
353
- task: "[task description]",
354
- priority: "high",
355
- strategy: "adaptive"
356
- })
357
-
358
- // 2. Spawn appropriate agents via Task tool (PARALLEL)
359
- Task("Agent1", "...", "agent-type")
360
- Task("Agent2", "...", "agent-type")
361
- Task("Agent3", "...", "agent-type")
362
-
363
- // 3. Monitor progress via MCP
364
- mcp__claude-flow__swarm_status({ includeAgents: true, includeMetrics: true })
365
- \`\`\`
366
-
367
- ### Session End (AUTOMATIC)
368
- When task completes or user ends session:
369
-
370
- \`\`\`javascript
371
- // 1. Save session state
372
- mcp__claude-flow__memory_usage({
373
- action: "store",
374
- namespace: "swarm",
375
- key: "last-session",
376
- value: JSON.stringify({ completedAt: new Date().toISOString(), summary: "..." })
377
- })
378
-
379
- // 2. Export metrics if enabled
380
- mcp__claude-flow__agent_metrics({})
381
-
382
- // 3. Graceful shutdown (only if explicitly requested)
383
- // mcp__claude-flow__swarm_destroy({ swarmId: "..." })
384
- \`\`\`
385
-
386
- ## 🎯 Concurrent Execution Examples
387
-
388
- ### ✅ CORRECT WORKFLOW: MCP Coordinates, Claude Code Executes
389
-
390
- \`\`\`javascript
391
- // Step 1: MCP tools set up coordination (optional, for complex tasks)
392
- [Single Message - Coordination Setup]:
393
- mcp__claude-flow__swarm_init { topology: "${topology}", maxAgents: ${maxAgents} }
394
- mcp__claude-flow__agent_spawn { type: "researcher" }
395
- mcp__claude-flow__agent_spawn { type: "coder" }
396
- mcp__claude-flow__agent_spawn { type: "tester" }
397
-
398
- // Step 2: Claude Code Task tool spawns ACTUAL agents that do the work
399
- [Single Message - Parallel Agent Execution]:
400
- // Claude Code's Task tool spawns real agents concurrently
401
- Task("Research agent", "Analyze API requirements and best practices. Check memory for prior decisions.", "researcher")
402
- Task("Coder agent", "Implement REST endpoints with authentication. Coordinate via hooks.", "coder")
403
- Task("Database agent", "Design and implement database schema. Store decisions in memory.", "code-analyzer")
404
- Task("Tester agent", "Create comprehensive test suite with 90% coverage.", "tester")
405
- Task("Reviewer agent", "Review code quality and security. Document findings.", "reviewer")
406
-
407
- // Batch ALL todos in ONE call
408
- TodoWrite { todos: [
409
- {id: "1", content: "Research API patterns", status: "in_progress", priority: "high"},
410
- {id: "2", content: "Design database schema", status: "in_progress", priority: "high"},
411
- {id: "3", content: "Implement authentication", status: "pending", priority: "high"},
412
- {id: "4", content: "Build REST endpoints", status: "pending", priority: "high"},
413
- {id: "5", content: "Write unit tests", status: "pending", priority: "medium"},
414
- {id: "6", content: "Integration tests", status: "pending", priority: "medium"},
415
- {id: "7", content: "API documentation", status: "pending", priority: "low"},
416
- {id: "8", content: "Performance optimization", status: "pending", priority: "low"}
417
- ]}
418
-
419
- // Parallel file operations
420
- Bash "mkdir -p app/{src,tests,docs,config}"
421
- Write "app/package.json"
422
- Write "app/src/server.js"
423
- Write "app/tests/server.test.js"
424
- Write "app/docs/API.md"
425
- \`\`\`
426
-
427
- ### ❌ WRONG (Multiple Messages):
428
- \`\`\`javascript
429
- Message 1: mcp__claude-flow__swarm_init
430
- Message 2: Task("agent 1")
431
- Message 3: TodoWrite { todos: [single todo] }
432
- Message 4: Write "file.js"
433
- // This breaks parallel coordination!
434
- \`\`\`
435
-
436
- ## V3 Performance Targets
437
-
438
- - **2.49x-7.47x** Flash Attention speedup
439
- - **150x-12,500x** search improvements with HNSW
440
- - **50-75%** memory reduction with quantization
441
- - **Sub-100ms** MCP response times
442
-
443
- ## 🪝 V3 Hooks System (26 Hooks)
444
-
445
- Claude Flow V3 provides 26 hooks for comprehensive agent coordination and self-learning.
230
+ ## 🪝 V3 Hooks System (17 Hooks + 12 Workers)
446
231
 
447
232
  ### Hook Categories
448
233
 
449
234
  | Category | Hooks | Purpose |
450
235
  |----------|-------|---------|
451
236
  | **Core** | \`pre-edit\`, \`post-edit\`, \`pre-command\`, \`post-command\`, \`pre-task\`, \`post-task\` | Tool lifecycle |
452
- | **Routing** | \`route\`, \`metrics\`, \`list\` | Task analysis |
453
- | **Intelligence** | \`explain\`, \`pretrain\`, \`build-agents\`, \`transfer\`, \`init\` | Neural learning |
454
237
  | **Session** | \`session-start\`, \`session-end\`, \`session-restore\`, \`notify\` | Context management |
455
- | **Learning** | \`trajectory-start\`, \`trajectory-step\`, \`trajectory-end\` | Reinforcement learning |
456
- | **Patterns** | \`pattern-store\`, \`pattern-search\`, \`stats\`, \`learn\`, \`attention\` | Memory & search |
238
+ | **Intelligence** | \`route\`, \`explain\`, \`pretrain\`, \`build-agents\`, \`transfer\` | Neural learning |
239
+ | **Learning** | \`intelligence\` (trajectory-start/step/end, pattern-store/search, stats, attention) | Reinforcement |
240
+
241
+ ### 12 Background Workers
242
+
243
+ | Worker | Priority | Description |
244
+ |--------|----------|-------------|
245
+ | \`ultralearn\` | normal | Deep knowledge acquisition |
246
+ | \`optimize\` | high | Performance optimization |
247
+ | \`consolidate\` | low | Memory consolidation |
248
+ | \`predict\` | normal | Predictive preloading |
249
+ | \`audit\` | critical | Security analysis |
250
+ | \`map\` | normal | Codebase mapping |
251
+ | \`preload\` | low | Resource preloading |
252
+ | \`deepdive\` | normal | Deep code analysis |
253
+ | \`document\` | normal | Auto-documentation |
254
+ | \`refactor\` | normal | Refactoring suggestions |
255
+ | \`benchmark\` | normal | Performance benchmarking |
256
+ | \`testgaps\` | normal | Test coverage analysis |
457
257
 
458
258
  ### Essential Hook Commands
459
259
 
460
260
  \`\`\`bash
461
- # Core hooks for tool coordination
261
+ # Core hooks
462
262
  npx claude-flow@v3alpha hooks pre-task --description "[task]"
463
263
  npx claude-flow@v3alpha hooks post-task --task-id "[id]" --success true
464
264
  npx claude-flow@v3alpha hooks post-edit --file "[file]" --train-patterns
465
265
 
466
266
  # Session management
467
267
  npx claude-flow@v3alpha hooks session-start --session-id "[id]"
468
- npx claude-flow@v3alpha hooks session-end --export-metrics true --persist-patterns
268
+ npx claude-flow@v3alpha hooks session-end --export-metrics true
469
269
  npx claude-flow@v3alpha hooks session-restore --session-id "[id]"
470
270
 
471
271
  # Intelligence routing
472
- npx claude-flow@v3alpha hooks route --task "[task]" --include-explanation
473
- npx claude-flow@v3alpha hooks explain --topic "[topic]" --depth comprehensive
272
+ npx claude-flow@v3alpha hooks route --task "[task]"
273
+ npx claude-flow@v3alpha hooks explain --topic "[topic]"
474
274
 
475
275
  # Neural learning
476
276
  npx claude-flow@v3alpha hooks pretrain --model-type moe --epochs 10
477
- npx claude-flow@v3alpha hooks build-agents --agent-types coder,tester --config-format yaml
478
-
479
- # Trajectory learning (reinforcement)
480
- npx claude-flow@v3alpha hooks intelligence trajectory-start --session "[session]"
481
- npx claude-flow@v3alpha hooks intelligence trajectory-step --action "[action]" --reward "[reward]"
482
- npx claude-flow@v3alpha hooks intelligence trajectory-end --verdict success
277
+ npx claude-flow@v3alpha hooks build-agents --agent-types coder,tester
483
278
 
484
- # Pattern storage (HNSW-indexed)
485
- npx claude-flow@v3alpha hooks intelligence pattern-store --pattern "[pattern]" --embedding "[json]"
486
- npx claude-flow@v3alpha hooks intelligence pattern-search --query "[query]" --limit 10
487
-
488
- # Learning stats & attention
489
- npx claude-flow@v3alpha hooks intelligence stats
490
- npx claude-flow@v3alpha hooks intelligence attention --focus "[task]"
279
+ # Background workers
280
+ npx claude-flow@v3alpha hooks worker list
281
+ npx claude-flow@v3alpha hooks worker dispatch --trigger audit
282
+ npx claude-flow@v3alpha hooks worker status
491
283
  \`\`\`
492
284
 
493
- ### Intelligence System (RuVector)
285
+ ## 🧠 Intelligence System (RuVector)
494
286
 
495
- V3 includes the RuVector Intelligence System with:
496
- - **SONA**: Self-Optimizing Neural Architecture
287
+ V3 includes the RuVector Intelligence System:
288
+ - **SONA**: Self-Optimizing Neural Architecture (<0.05ms adaptation)
497
289
  - **MoE**: Mixture of Experts for specialized routing
498
- - **HNSW**: 150x faster pattern search
290
+ - **HNSW**: 150x-12,500x faster pattern search
499
291
  - **EWC++**: Elastic Weight Consolidation (prevents forgetting)
500
292
  - **Flash Attention**: 2.49x-7.47x speedup
501
293
 
@@ -505,67 +297,112 @@ The 4-step intelligence pipeline:
505
297
  3. **DISTILL** - Extract key learnings via LoRA
506
298
  4. **CONSOLIDATE** - Prevent catastrophic forgetting via EWC++
507
299
 
508
- ### Auto-Configured Hooks
509
-
510
- The init system configures these hooks in \`.claude/settings.json\`:
511
-
512
- \`\`\`json
513
- {
514
- "hooks": {
515
- "PreToolUse": [
516
- { "matcher": "Task", "commands": ["npx claude-flow@v3alpha hooks pre-task --tool Task"] }
517
- ],
518
- "PostToolUse": [
519
- { "matcher": "Task", "commands": ["npx claude-flow@v3alpha hooks post-task --tool Task --train-patterns"] }
520
- ],
521
- "UserPromptSubmit": [
522
- { "matcher": ".*", "commands": ["npx claude-flow@v3alpha hooks route-task --analyze-complexity"] }
523
- ],
524
- "SessionStart": [
525
- { "commands": ["npx claude-flow@v3alpha hooks session-start --load-context"] }
526
- ]
527
- }
528
- }
300
+ ## 📦 Embeddings Package (v3.0.0-alpha.12)
301
+
302
+ Features:
303
+ - **sql.js**: Cross-platform SQLite persistent cache (WASM, no native compilation)
304
+ - **Document chunking**: Configurable overlap and size
305
+ - **Normalization**: L2, L1, min-max, z-score
306
+ - **Hyperbolic embeddings**: Poincaré ball model for hierarchical data
307
+ - **75x faster**: With agentic-flow ONNX integration
308
+ - **Neural substrate**: Integration with RuVector
309
+
310
+ ## 🐝 Hive-Mind Consensus
311
+
312
+ ### Topologies
313
+ - \`hierarchical\` - Queen controls workers directly
314
+ - \`mesh\` - Fully connected peer network
315
+ - \`hierarchical-mesh\` - Hybrid (recommended)
316
+ - \`adaptive\` - Dynamic based on load
317
+
318
+ ### Consensus Strategies
319
+ - \`byzantine\` - BFT (tolerates f < n/3 faulty)
320
+ - \`raft\` - Leader-based (tolerates f < n/2)
321
+ - \`gossip\` - Epidemic for eventual consistency
322
+ - \`crdt\` - Conflict-free replicated data types
323
+ - \`quorum\` - Configurable quorum-based
324
+
325
+ ## V3 Performance Targets
326
+
327
+ | Metric | Target |
328
+ |--------|--------|
329
+ | Flash Attention | 2.49x-7.47x speedup |
330
+ | HNSW Search | 150x-12,500x faster |
331
+ | Memory Reduction | 50-75% with quantization |
332
+ | MCP Response | <100ms |
333
+ | CLI Startup | <500ms |
334
+ | SONA Adaptation | <0.05ms |
335
+
336
+ ## 🔧 Environment Variables
337
+
338
+ \`\`\`bash
339
+ # Configuration
340
+ CLAUDE_FLOW_CONFIG=./claude-flow.config.json
341
+ CLAUDE_FLOW_LOG_LEVEL=info
342
+
343
+ # Provider API Keys
344
+ ANTHROPIC_API_KEY=sk-ant-...
345
+ OPENAI_API_KEY=sk-...
346
+ GOOGLE_API_KEY=...
347
+
348
+ # MCP Server
349
+ CLAUDE_FLOW_MCP_PORT=3000
350
+ CLAUDE_FLOW_MCP_HOST=localhost
351
+ CLAUDE_FLOW_MCP_TRANSPORT=stdio
352
+
353
+ # Memory
354
+ CLAUDE_FLOW_MEMORY_BACKEND=hybrid
355
+ CLAUDE_FLOW_MEMORY_PATH=./data/memory
529
356
  \`\`\`
530
357
 
531
- ### Agent Coordination via Hooks
358
+ ## 🔍 Doctor Health Checks
532
359
 
533
- Every spawned agent should use hooks for coordination:
360
+ Run \`npx claude-flow@v3alpha doctor\` to check:
361
+ - Node.js version (20+)
362
+ - npm version (9+)
363
+ - Git installation
364
+ - Config file validity
365
+ - Daemon status
366
+ - Memory database
367
+ - API keys
368
+ - MCP servers
369
+ - Disk space
370
+ - TypeScript installation
534
371
 
535
- \`\`\`javascript
536
- // In agent prompt instructions
537
- Task("Coder", \`
538
- BEFORE starting: npx claude-flow@v3alpha hooks pre-task --description "Implement feature X"
372
+ ## 🚀 Quick Setup
373
+
374
+ \`\`\`bash
375
+ # Add MCP servers
376
+ claude mcp add claude-flow npx claude-flow@v3alpha mcp start
377
+ claude mcp add ruv-swarm npx ruv-swarm mcp start # Optional
378
+ claude mcp add flow-nexus npx flow-nexus@latest mcp start # Optional
539
379
 
540
- DURING work:
541
- - After each file edit: npx claude-flow@v3alpha hooks post-edit --file "[file]"
542
- - To notify others: npx claude-flow@v3alpha hooks notify --message "[update]"
380
+ # Start daemon
381
+ npx claude-flow@v3alpha daemon start
543
382
 
544
- AFTER completing: npx claude-flow@v3alpha hooks post-task --success true
545
- \`, "coder")
383
+ # Run doctor
384
+ npx claude-flow@v3alpha doctor --fix
546
385
  \`\`\`
547
386
 
548
- ## Advanced Features (V3)
387
+ ## 🎯 Claude Code vs MCP Tools
549
388
 
550
- - 🚀 Automatic Topology Selection
551
- - Parallel Execution (2.8-4.4x speed)
552
- - 🧠 Neural Training with ReasoningBank
553
- - 📊 Bottleneck Analysis
554
- - 🤖 Smart Auto-Spawning
555
- - 🛡️ Self-Healing Workflows
556
- - 💾 Cross-Session Memory with AgentDB
557
- - 🔗 GitHub Integration
558
- - 🔐 Security-Hardened Architecture
389
+ ### Claude Code Handles ALL EXECUTION:
390
+ - **Task tool**: Spawn and run agents concurrently
391
+ - File operations (Read, Write, Edit, MultiEdit, Glob, Grep)
392
+ - Code generation and programming
393
+ - Bash commands and system operations
394
+ - TodoWrite and task management
395
+ - Git operations
559
396
 
560
- ## Integration Tips
397
+ ### MCP Tools ONLY COORDINATE:
398
+ - Swarm initialization (topology setup)
399
+ - Agent type definitions
400
+ - Task orchestration
401
+ - Memory management
402
+ - Neural features
403
+ - Performance tracking
561
404
 
562
- 1. Start with basic swarm init
563
- 2. Scale agents gradually
564
- 3. Use memory for context
565
- 4. Monitor progress regularly
566
- 5. Train patterns from success
567
- 6. Enable hooks automation
568
- 7. Use GitHub tools first
405
+ **KEY**: MCP coordinates the strategy, Claude Code's Task tool executes with real agents.
569
406
 
570
407
  ## Support
571
408
 
@@ -582,19 +419,22 @@ NEVER create files unless they're absolutely necessary for achieving your goal.
582
419
  ALWAYS prefer editing an existing file to creating a new one.
583
420
  NEVER proactively create documentation files (*.md) or README files. Only create documentation files if explicitly requested by the User.
584
421
  Never save working files, text/mds and tests to the root folder.
422
+ After spawning a swarm, wait, don't continuously check status.
585
423
  `;
586
424
  }
587
425
  /**
588
426
  * Generate minimal CLAUDE.md content
589
427
  */
590
428
  export function generateMinimalClaudeMd(options) {
591
- return `# Claude Code Configuration
429
+ return `# Claude Code Configuration - Claude Flow V3
592
430
 
593
431
  ## Quick Reference
594
432
 
595
433
  - **Topology**: ${options.runtime.topology}
596
434
  - **Max Agents**: ${options.runtime.maxAgents}
597
435
  - **Memory**: ${options.runtime.memoryBackend}
436
+ - **HNSW**: ${options.runtime.enableHNSW ? 'Enabled' : 'Disabled'}
437
+ - **Neural**: ${options.runtime.enableNeural ? 'Enabled' : 'Disabled'}
598
438
 
599
439
  ## Key Rules
600
440
 
@@ -612,6 +452,22 @@ Task("Coder", "Implement features...", "coder")
612
452
  Task("Tester", "Write tests...", "tester")
613
453
  \`\`\`
614
454
 
455
+ ## 26 CLI Commands
456
+
457
+ \`\`\`bash
458
+ # Core
459
+ npx claude-flow@v3alpha init --wizard
460
+ npx claude-flow@v3alpha agent spawn -t coder
461
+ npx claude-flow@v3alpha swarm init --v3-mode
462
+ npx claude-flow@v3alpha memory search -q "query"
463
+
464
+ # Advanced
465
+ npx claude-flow@v3alpha daemon start
466
+ npx claude-flow@v3alpha doctor --fix
467
+ npx claude-flow@v3alpha security scan
468
+ npx claude-flow@v3alpha performance benchmark
469
+ \`\`\`
470
+
615
471
  ## MCP Setup
616
472
 
617
473
  \`\`\`bash