claude-flow 2.0.0-alpha.45 → 2.0.0-alpha.48

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.
package/bin/claude-flow CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/bin/sh
2
2
  # Claude-Flow Smart Dispatcher - Detects and uses the best available runtime
3
3
 
4
- VERSION="2.0.0-alpha.45"
4
+ VERSION="2.0.0-alpha.48"
5
5
 
6
6
  # Determine the correct path based on how the script is invoked
7
7
  if [ -L "$0" ]; then
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-flow",
3
- "version": "2.0.0-alpha.45",
3
+ "version": "2.0.0-alpha.48",
4
4
  "description": "Enterprise-grade AI agent orchestration with ruv-swarm integration (Alpha Release)",
5
5
  "main": "cli.mjs",
6
6
  "bin": {
@@ -3,7 +3,7 @@
3
3
  * Provides clear, actionable command documentation
4
4
  */
5
5
 
6
- export const VERSION = '2.0.0-alpha.45';
6
+ export const VERSION = '2.0.0-alpha.48';
7
7
 
8
8
  export const MAIN_HELP = `
9
9
  🌊 Claude-Flow v${VERSION} - Enterprise-Grade AI Agent Orchestration Platform
@@ -8,6 +8,60 @@
8
8
  3. **File operations** → Batch ALL reads/writes together
9
9
  4. **NEVER** operate sequentially after swarm init
10
10
 
11
+ ## 🚨 CRITICAL: CONCURRENT EXECUTION FOR ALL ACTIONS
12
+
13
+ **ABSOLUTE RULE**: ALL operations MUST be concurrent/parallel in a single message:
14
+
15
+ ### 🔴 MANDATORY CONCURRENT PATTERNS:
16
+ 1. **TodoWrite**: ALWAYS batch ALL todos in ONE call (5-10+ todos minimum)
17
+ 2. **Task tool**: ALWAYS spawn ALL agents in ONE message with full instructions
18
+ 3. **File operations**: ALWAYS batch ALL reads/writes/edits in ONE message
19
+ 4. **Bash commands**: ALWAYS batch ALL terminal operations in ONE message
20
+ 5. **Memory operations**: ALWAYS batch ALL memory store/retrieve in ONE message
21
+
22
+ ### ⚡ GOLDEN RULE: "1 MESSAGE = ALL RELATED OPERATIONS"
23
+
24
+ **Examples of CORRECT concurrent execution:**
25
+ ```javascript
26
+ // ✅ CORRECT: Everything in ONE message
27
+ [Single Message]:
28
+ - TodoWrite { todos: [10+ todos with all statuses/priorities] }
29
+ - Task("Agent 1 with full instructions and hooks")
30
+ - Task("Agent 2 with full instructions and hooks")
31
+ - Task("Agent 3 with full instructions and hooks")
32
+ - Read("file1.js")
33
+ - Read("file2.js")
34
+ - Read("file3.js")
35
+ - Write("output1.js", content)
36
+ - Write("output2.js", content)
37
+ - Bash("npm install")
38
+ - Bash("npm test")
39
+ - Bash("npm run build")
40
+ ```
41
+
42
+ **Examples of WRONG sequential execution:**
43
+ ```javascript
44
+ // ❌ WRONG: Multiple messages (NEVER DO THIS)
45
+ Message 1: TodoWrite { todos: [single todo] }
46
+ Message 2: Task("Agent 1")
47
+ Message 3: Task("Agent 2")
48
+ Message 4: Read("file1.js")
49
+ Message 5: Write("output1.js")
50
+ Message 6: Bash("npm install")
51
+ // This is 6x slower and breaks coordination!
52
+ ```
53
+
54
+ ### 🎯 CONCURRENT EXECUTION CHECKLIST:
55
+
56
+ Before sending ANY message, ask yourself:
57
+ - ✅ Are ALL related TodoWrite operations batched together?
58
+ - ✅ Are ALL Task spawning operations in ONE message?
59
+ - ✅ Are ALL file operations (Read/Write/Edit) batched together?
60
+ - ✅ Are ALL bash commands grouped in ONE message?
61
+ - ✅ Are ALL memory operations concurrent?
62
+
63
+ If ANY answer is "No", you MUST combine operations into a single message!
64
+
11
65
  ## 🚀 CRITICAL: Claude Code Does ALL Real Work
12
66
 
13
67
  ### 🎯 CLAUDE CODE IS THE ONLY EXECUTOR
@@ -61,14 +115,17 @@
61
115
  1. **MCP**: `mcp__claude-flow__swarm_init` (coordination setup)
62
116
  2. **MCP**: `mcp__claude-flow__agent_spawn` (planning agents)
63
117
  3. **MCP**: `mcp__claude-flow__task_orchestrate` (task coordination)
64
- 4. **Claude Code**: `Read`, `Write`, `Edit`, `Bash` (actual work)
65
- 5. **Claude Code**: `TodoWrite` (task management)
66
- 6. **MCP**: `mcp__claude-flow__memory_usage` (store results)
118
+ 4. **Claude Code**: `Task` tool to spawn agents with coordination instructions
119
+ 5. **Claude Code**: `TodoWrite` with ALL todos batched (5-10+ in ONE call)
120
+ 6. **Claude Code**: `Read`, `Write`, `Edit`, `Bash` (actual work)
121
+ 7. **MCP**: `mcp__claude-flow__memory_usage` (store results)
67
122
 
68
123
  **❌ WRONG Workflow:**
69
124
  1. **MCP**: `mcp__claude-flow__terminal_execute` (DON'T DO THIS)
70
125
  2. **MCP**: File creation via MCP (DON'T DO THIS)
71
126
  3. **MCP**: Code generation via MCP (DON'T DO THIS)
127
+ 4. **Claude Code**: Sequential Task calls (DON'T DO THIS)
128
+ 5. **Claude Code**: Individual TodoWrite calls (DON'T DO THIS)
72
129
 
73
130
  ### 🚨 REMEMBER:
74
131
  - **MCP tools** = Coordination, planning, memory, intelligence
@@ -103,13 +160,22 @@ If you need to do X operations, they should be in 1 message, not X messages
103
160
  **✅ CORRECT - Everything in ONE Message:**
104
161
  ```javascript
105
162
  [Single Message with BatchTool]:
163
+ // MCP coordination setup
106
164
  mcp__claude-flow__swarm_init { topology: "mesh", maxAgents: 6 }
107
165
  mcp__claude-flow__agent_spawn { type: "researcher" }
108
166
  mcp__claude-flow__agent_spawn { type: "coder" }
109
167
  mcp__claude-flow__agent_spawn { type: "analyst" }
110
168
  mcp__claude-flow__agent_spawn { type: "tester" }
111
169
  mcp__claude-flow__agent_spawn { type: "coordinator" }
112
- TodoWrite { todos: [todo1, todo2, todo3, todo4, todo5] }
170
+
171
+ // Claude Code execution - ALL in parallel
172
+ Task("You are researcher agent. MUST coordinate via hooks...")
173
+ Task("You are coder agent. MUST coordinate via hooks...")
174
+ Task("You are analyst agent. MUST coordinate via hooks...")
175
+ Task("You are tester agent. MUST coordinate via hooks...")
176
+ TodoWrite { todos: [5-10 todos with all priorities and statuses] }
177
+
178
+ // File operations in parallel
113
179
  Bash "mkdir -p app/{src,tests,docs}"
114
180
  Write "app/package.json"
115
181
  Write "app/README.md"
@@ -119,9 +185,9 @@ If you need to do X operations, they should be in 1 message, not X messages
119
185
  **❌ WRONG - Multiple Messages (NEVER DO THIS):**
120
186
  ```javascript
121
187
  Message 1: mcp__claude-flow__swarm_init
122
- Message 2: mcp__claude-flow__agent_spawn
123
- Message 3: mcp__claude-flow__agent_spawn
124
- Message 4: TodoWrite (one todo)
188
+ Message 2: Task("researcher agent")
189
+ Message 3: Task("coder agent")
190
+ Message 4: TodoWrite({ todo: "single todo" })
125
191
  Message 5: Bash "mkdir src"
126
192
  Message 6: Write "package.json"
127
193
  // This is 6x slower and breaks parallel coordination!
@@ -130,10 +196,11 @@ Message 6: Write "package.json"
130
196
  ### 🎯 BATCH OPERATIONS BY TYPE
131
197
 
132
198
  **Todo and Task Operations (Single Message):**
133
- - TodoWrite? → ALWAYS include 5-10+ todos in ONE call
134
- - Task agents? → Spawn ALL agents in ONE message
135
- - Updates?Update ALL todo statuses together
136
- - Never split todos or tasks across messages!
199
+ - **TodoWrite** → ALWAYS include 5-10+ todos in ONE call
200
+ - **Task agents** → Spawn ALL agents with full instructions in ONE message
201
+ - **Agent coordination** → ALL Task calls must include coordination hooks
202
+ - **Status updates** Update ALL todo statuses together
203
+ - **NEVER** split todos or Task calls across messages!
137
204
 
138
205
  **File Operations (Single Message):**
139
206
  - Read 10 files? → One message with 10 Read calls
@@ -484,22 +551,36 @@ Message 6: TodoWrite (another single todo)
484
551
  **THIS IS CORRECT ✅ (Parallel - ALWAYS DO THIS):**
485
552
  ```
486
553
  Message 1: [BatchTool]
554
+ // MCP coordination setup
487
555
  - mcp__claude-flow__swarm_init
488
556
  - mcp__claude-flow__agent_spawn (researcher)
489
- - mcp__claude-flow__agent_spawn (coder)
557
+ - mcp__claude-flow__agent_spawn (coder)
490
558
  - mcp__claude-flow__agent_spawn (analyst)
491
559
  - mcp__claude-flow__agent_spawn (tester)
492
560
  - mcp__claude-flow__agent_spawn (coordinator)
493
- - TodoWrite { todos: [ALL 5-10 todos at once] }
494
-
495
- Message 2: [BatchTool]
496
- - Task (spawn agent 1 with full task)
497
- - Task (spawn agent 2 with full task)
498
- - Task (spawn agent 3 with full task)
499
- - Write file1.js
500
- - Write file2.js
501
- - Write file3.js
502
- - Bash mkdir commands
561
+
562
+ Message 2: [BatchTool - Claude Code execution]
563
+ // Task agents with full coordination instructions
564
+ - Task("You are researcher agent. MANDATORY: Run hooks pre-task, post-edit, post-task. Task: Research API patterns")
565
+ - Task("You are coder agent. MANDATORY: Run hooks pre-task, post-edit, post-task. Task: Implement REST endpoints")
566
+ - Task("You are analyst agent. MANDATORY: Run hooks pre-task, post-edit, post-task. Task: Analyze performance")
567
+ - Task("You are tester agent. MANDATORY: Run hooks pre-task, post-edit, post-task. Task: Write comprehensive tests")
568
+
569
+ // TodoWrite with ALL todos batched
570
+ - TodoWrite { todos: [
571
+ {id: "research", content: "Research API patterns", status: "in_progress", priority: "high"},
572
+ {id: "design", content: "Design database schema", status: "pending", priority: "high"},
573
+ {id: "implement", content: "Build REST endpoints", status: "pending", priority: "high"},
574
+ {id: "test", content: "Write unit tests", status: "pending", priority: "medium"},
575
+ {id: "docs", content: "Create API documentation", status: "pending", priority: "low"},
576
+ {id: "deploy", content: "Setup deployment", status: "pending", priority: "medium"}
577
+ ]}
578
+
579
+ // File operations in parallel
580
+ - Write "api/package.json"
581
+ - Write "api/server.js"
582
+ - Write "api/routes/users.js"
583
+ - Bash "mkdir -p api/{routes,models,tests}"
503
584
  ```
504
585
 
505
586
  ### 🎯 MANDATORY SWARM PATTERN
@@ -3,6 +3,29 @@
3
3
  export function createMinimalClaudeMd() {
4
4
  return `# Claude Code Configuration
5
5
 
6
+ ## 🚨 CRITICAL: CONCURRENT EXECUTION FOR ALL ACTIONS
7
+
8
+ **ABSOLUTE RULE**: ALL operations MUST be concurrent/parallel in a single message:
9
+
10
+ ### 🔴 MANDATORY CONCURRENT PATTERNS:
11
+ 1. **TodoWrite**: ALWAYS batch ALL todos in ONE call (5-10+ todos minimum)
12
+ 2. **Task tool**: ALWAYS spawn ALL agents in ONE message with full instructions
13
+ 3. **File operations**: ALWAYS batch ALL reads/writes/edits in ONE message
14
+ 4. **Bash commands**: ALWAYS batch ALL terminal operations in ONE message
15
+
16
+ ### ⚡ GOLDEN RULE: "1 MESSAGE = ALL RELATED OPERATIONS"
17
+
18
+ **✅ CORRECT**: Everything in ONE message
19
+ **❌ WRONG**: Multiple messages for related operations (6x slower!)
20
+
21
+ ### 🎯 CONCURRENT EXECUTION CHECKLIST:
22
+ - ✅ Are ALL related TodoWrite operations batched together?
23
+ - ✅ Are ALL Task spawning operations in ONE message?
24
+ - ✅ Are ALL file operations (Read/Write/Edit) batched together?
25
+ - ✅ Are ALL bash commands grouped in ONE message?
26
+
27
+ If ANY answer is "No", you MUST combine operations into a single message!
28
+
6
29
  ## Build Commands
7
30
  - \`npm run build\`: Build the project
8
31
  - \`npm run test\`: Run tests
@@ -21,6 +44,59 @@ This is a Claude-Flow AI agent orchestration system.
21
44
  export function createFullClaudeMd() {
22
45
  return `# Claude Code Configuration
23
46
 
47
+ ## 🚨 CRITICAL: CONCURRENT EXECUTION FOR ALL ACTIONS
48
+
49
+ **ABSOLUTE RULE**: ALL operations MUST be concurrent/parallel in a single message:
50
+
51
+ ### 🔴 MANDATORY CONCURRENT PATTERNS:
52
+ 1. **TodoWrite**: ALWAYS batch ALL todos in ONE call (5-10+ todos minimum)
53
+ 2. **Task tool**: ALWAYS spawn ALL agents in ONE message with full instructions
54
+ 3. **File operations**: ALWAYS batch ALL reads/writes/edits in ONE message
55
+ 4. **Bash commands**: ALWAYS batch ALL terminal operations in ONE message
56
+ 5. **Memory operations**: ALWAYS batch ALL memory store/retrieve in ONE message
57
+
58
+ ### ⚡ GOLDEN RULE: "1 MESSAGE = ALL RELATED OPERATIONS"
59
+
60
+ **Examples of CORRECT concurrent execution:**
61
+ \`\`\`javascript
62
+ // ✅ CORRECT: Everything in ONE message
63
+ [Single Message]:
64
+ - TodoWrite { todos: [10+ todos with all statuses/priorities] }
65
+ - Task("Agent 1 with full instructions and hooks")
66
+ - Task("Agent 2 with full instructions and hooks")
67
+ - Task("Agent 3 with full instructions and hooks")
68
+ - Read("file1.js")
69
+ - Read("file2.js")
70
+ - Write("output1.js", content)
71
+ - Write("output2.js", content)
72
+ - Bash("npm install")
73
+ - Bash("npm test")
74
+ - Bash("npm run build")
75
+ \`\`\`
76
+
77
+ **Examples of WRONG sequential execution:**
78
+ \`\`\`javascript
79
+ // ❌ WRONG: Multiple messages (NEVER DO THIS)
80
+ Message 1: TodoWrite { todos: [single todo] }
81
+ Message 2: Task("Agent 1")
82
+ Message 3: Task("Agent 2")
83
+ Message 4: Read("file1.js")
84
+ Message 5: Write("output1.js")
85
+ Message 6: Bash("npm install")
86
+ // This is 6x slower and breaks coordination!
87
+ \`\`\`
88
+
89
+ ### 🎯 CONCURRENT EXECUTION CHECKLIST:
90
+
91
+ Before sending ANY message, ask yourself:
92
+ - ✅ Are ALL related TodoWrite operations batched together?
93
+ - ✅ Are ALL Task spawning operations in ONE message?
94
+ - ✅ Are ALL file operations (Read/Write/Edit) batched together?
95
+ - ✅ Are ALL bash commands grouped in ONE message?
96
+ - ✅ Are ALL memory operations concurrent?
97
+
98
+ If ANY answer is "No", you MUST combine operations into a single message!
99
+
24
100
  ## Build Commands
25
101
  - \`npm run build\`: Build the project using Deno compile
26
102
  - \`npm run test\`: Run the full test suite
@@ -71,6 +147,59 @@ This is a Claude-Flow AI agent orchestration system with the following component
71
147
  export function createSparcClaudeMd() {
72
148
  return `# Claude Code Configuration - SPARC Development Environment
73
149
 
150
+ ## 🚨 CRITICAL: CONCURRENT EXECUTION FOR ALL ACTIONS
151
+
152
+ **ABSOLUTE RULE**: ALL operations MUST be concurrent/parallel in a single message:
153
+
154
+ ### 🔴 MANDATORY CONCURRENT PATTERNS:
155
+ 1. **TodoWrite**: ALWAYS batch ALL todos in ONE call (5-10+ todos minimum)
156
+ 2. **Task tool**: ALWAYS spawn ALL agents in ONE message with full instructions
157
+ 3. **File operations**: ALWAYS batch ALL reads/writes/edits in ONE message
158
+ 4. **Bash commands**: ALWAYS batch ALL terminal operations in ONE message
159
+ 5. **Memory operations**: ALWAYS batch ALL memory store/retrieve in ONE message
160
+
161
+ ### ⚡ GOLDEN RULE: "1 MESSAGE = ALL RELATED OPERATIONS"
162
+
163
+ **Examples of CORRECT concurrent execution:**
164
+ \`\`\`javascript
165
+ // ✅ CORRECT: Everything in ONE message
166
+ [Single Message]:
167
+ - TodoWrite { todos: [10+ todos with all statuses/priorities] }
168
+ - Task("Agent 1 with full instructions and hooks")
169
+ - Task("Agent 2 with full instructions and hooks")
170
+ - Task("Agent 3 with full instructions and hooks")
171
+ - Read("file1.js")
172
+ - Read("file2.js")
173
+ - Write("output1.js", content)
174
+ - Write("output2.js", content)
175
+ - Bash("npm install")
176
+ - Bash("npm test")
177
+ - Bash("npm run build")
178
+ \`\`\`
179
+
180
+ **Examples of WRONG sequential execution:**
181
+ \`\`\`javascript
182
+ // ❌ WRONG: Multiple messages (NEVER DO THIS)
183
+ Message 1: TodoWrite { todos: [single todo] }
184
+ Message 2: Task("Agent 1")
185
+ Message 3: Task("Agent 2")
186
+ Message 4: Read("file1.js")
187
+ Message 5: Write("output1.js")
188
+ Message 6: Bash("npm install")
189
+ // This is 6x slower and breaks coordination!
190
+ \`\`\`
191
+
192
+ ### 🎯 CONCURRENT EXECUTION CHECKLIST:
193
+
194
+ Before sending ANY message, ask yourself:
195
+ - ✅ Are ALL related TodoWrite operations batched together?
196
+ - ✅ Are ALL Task spawning operations in ONE message?
197
+ - ✅ Are ALL file operations (Read/Write/Edit) batched together?
198
+ - ✅ Are ALL bash commands grouped in ONE message?
199
+ - ✅ Are ALL memory operations concurrent?
200
+
201
+ If ANY answer is "No", you MUST combine operations into a single message!
202
+
74
203
  ## Project Overview
75
204
  This project uses the SPARC (Specification, Pseudocode, Architecture, Refinement, Completion) methodology for systematic Test-Driven Development with AI assistance through Claude-Flow orchestration.
76
205
 
@@ -344,6 +473,59 @@ For more information about SPARC methodology, see: https://github.com/ruvnet/cla
344
473
  export async function createOptimizedSparcClaudeMd() {
345
474
  return `# Claude Code Configuration - SPARC Development Environment (Batchtools Optimized)
346
475
 
476
+ ## 🚨 CRITICAL: CONCURRENT EXECUTION FOR ALL ACTIONS
477
+
478
+ **ABSOLUTE RULE**: ALL operations MUST be concurrent/parallel in a single message:
479
+
480
+ ### 🔴 MANDATORY CONCURRENT PATTERNS:
481
+ 1. **TodoWrite**: ALWAYS batch ALL todos in ONE call (5-10+ todos minimum)
482
+ 2. **Task tool**: ALWAYS spawn ALL agents in ONE message with full instructions
483
+ 3. **File operations**: ALWAYS batch ALL reads/writes/edits in ONE message
484
+ 4. **Bash commands**: ALWAYS batch ALL terminal operations in ONE message
485
+ 5. **Memory operations**: ALWAYS batch ALL memory store/retrieve in ONE message
486
+
487
+ ### ⚡ GOLDEN RULE: "1 MESSAGE = ALL RELATED OPERATIONS"
488
+
489
+ **Examples of CORRECT concurrent execution:**
490
+ \`\`\`javascript
491
+ // ✅ CORRECT: Everything in ONE message
492
+ [Single Message]:
493
+ - TodoWrite { todos: [10+ todos with all statuses/priorities] }
494
+ - Task("Agent 1 with full instructions and hooks")
495
+ - Task("Agent 2 with full instructions and hooks")
496
+ - Task("Agent 3 with full instructions and hooks")
497
+ - Read("file1.js")
498
+ - Read("file2.js")
499
+ - Write("output1.js", content)
500
+ - Write("output2.js", content)
501
+ - Bash("npm install")
502
+ - Bash("npm test")
503
+ - Bash("npm run build")
504
+ \`\`\`
505
+
506
+ **Examples of WRONG sequential execution:**
507
+ \`\`\`javascript
508
+ // ❌ WRONG: Multiple messages (NEVER DO THIS)
509
+ Message 1: TodoWrite { todos: [single todo] }
510
+ Message 2: Task("Agent 1")
511
+ Message 3: Task("Agent 2")
512
+ Message 4: Read("file1.js")
513
+ Message 5: Write("output1.js")
514
+ Message 6: Bash("npm install")
515
+ // This is 6x slower and breaks coordination!
516
+ \`\`\`
517
+
518
+ ### 🎯 CONCURRENT EXECUTION CHECKLIST:
519
+
520
+ Before sending ANY message, ask yourself:
521
+ - ✅ Are ALL related TodoWrite operations batched together?
522
+ - ✅ Are ALL Task spawning operations in ONE message?
523
+ - ✅ Are ALL file operations (Read/Write/Edit) batched together?
524
+ - ✅ Are ALL bash commands grouped in ONE message?
525
+ - ✅ Are ALL memory operations concurrent?
526
+
527
+ If ANY answer is "No", you MUST combine operations into a single message!
528
+
347
529
  ## Project Overview
348
530
  This project uses the SPARC (Specification, Pseudocode, Architecture, Refinement, Completion) methodology for systematic Test-Driven Development with AI assistance through Claude-Flow orchestration.
349
531