claude-flow 2.0.0-alpha.44 โ 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
package/package.json
CHANGED
package/src/cli/help-text.js
CHANGED
|
@@ -8,25 +8,128 @@
|
|
|
8
8
|
3. **File operations** โ Batch ALL reads/writes together
|
|
9
9
|
4. **NEVER** operate sequentially after swarm init
|
|
10
10
|
|
|
11
|
-
##
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
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
|
+
|
|
65
|
+
## ๐ CRITICAL: Claude Code Does ALL Real Work
|
|
66
|
+
|
|
67
|
+
### ๐ฏ CLAUDE CODE IS THE ONLY EXECUTOR
|
|
68
|
+
|
|
69
|
+
**ABSOLUTE RULE**: Claude Code performs ALL actual work:
|
|
70
|
+
|
|
71
|
+
### โ
Claude Code ALWAYS Handles:
|
|
72
|
+
- ๐ง **ALL file operations** (Read, Write, Edit, MultiEdit, Glob, Grep)
|
|
73
|
+
- ๐ป **ALL code generation** and programming tasks
|
|
74
|
+
- ๐ฅ๏ธ **ALL bash commands** and system operations
|
|
75
|
+
- ๐๏ธ **ALL actual implementation** work
|
|
76
|
+
- ๐ **ALL project navigation** and code analysis
|
|
77
|
+
- ๐ **ALL TodoWrite** and task management
|
|
78
|
+
- ๐ **ALL git operations** (commit, push, merge)
|
|
79
|
+
- ๐ฆ **ALL package management** (npm, pip, etc.)
|
|
80
|
+
- ๐งช **ALL testing** and validation
|
|
81
|
+
- ๐ง **ALL debugging** and troubleshooting
|
|
82
|
+
|
|
83
|
+
### ๐ง Claude Flow MCP Tools ONLY Handle:
|
|
84
|
+
- ๐ฏ **Coordination only** - Planning Claude Code's actions
|
|
85
|
+
- ๐พ **Memory management** - Storing decisions and context
|
|
86
|
+
- ๐ค **Neural features** - Learning from Claude Code's work
|
|
87
|
+
- ๐ **Performance tracking** - Monitoring Claude Code's efficiency
|
|
88
|
+
- ๐ **Swarm orchestration** - Coordinating multiple Claude Code instances
|
|
89
|
+
- ๐ **GitHub integration** - Advanced repository coordination
|
|
90
|
+
|
|
91
|
+
### ๐จ CRITICAL SEPARATION OF CONCERNS:
|
|
92
|
+
|
|
93
|
+
**โ MCP Tools NEVER:**
|
|
94
|
+
- Write files or create content
|
|
95
|
+
- Execute bash commands
|
|
96
|
+
- Generate code
|
|
97
|
+
- Perform file operations
|
|
98
|
+
- Handle TodoWrite operations
|
|
99
|
+
- Execute system commands
|
|
100
|
+
- Do actual implementation work
|
|
101
|
+
|
|
102
|
+
**โ
MCP Tools ONLY:**
|
|
103
|
+
- Coordinate and plan
|
|
104
|
+
- Store memory and context
|
|
105
|
+
- Track performance
|
|
106
|
+
- Orchestrate workflows
|
|
107
|
+
- Provide intelligence insights
|
|
27
108
|
|
|
28
109
|
### โ ๏ธ Key Principle:
|
|
29
|
-
**MCP tools
|
|
110
|
+
**MCP tools coordinate, Claude Code executes.** Think of MCP tools as the "brain" that plans and coordinates, while Claude Code is the "hands" that do all the actual work.
|
|
111
|
+
|
|
112
|
+
### ๐ WORKFLOW EXECUTION PATTERN:
|
|
113
|
+
|
|
114
|
+
**โ
CORRECT Workflow:**
|
|
115
|
+
1. **MCP**: `mcp__claude-flow__swarm_init` (coordination setup)
|
|
116
|
+
2. **MCP**: `mcp__claude-flow__agent_spawn` (planning agents)
|
|
117
|
+
3. **MCP**: `mcp__claude-flow__task_orchestrate` (task coordination)
|
|
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)
|
|
122
|
+
|
|
123
|
+
**โ WRONG Workflow:**
|
|
124
|
+
1. **MCP**: `mcp__claude-flow__terminal_execute` (DON'T DO THIS)
|
|
125
|
+
2. **MCP**: File creation via MCP (DON'T DO THIS)
|
|
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)
|
|
129
|
+
|
|
130
|
+
### ๐จ REMEMBER:
|
|
131
|
+
- **MCP tools** = Coordination, planning, memory, intelligence
|
|
132
|
+
- **Claude Code** = All actual execution, coding, file operations
|
|
30
133
|
|
|
31
134
|
## ๐ CRITICAL: Parallel Execution & Batch Operations
|
|
32
135
|
|
|
@@ -57,13 +160,22 @@ If you need to do X operations, they should be in 1 message, not X messages
|
|
|
57
160
|
**โ
CORRECT - Everything in ONE Message:**
|
|
58
161
|
```javascript
|
|
59
162
|
[Single Message with BatchTool]:
|
|
163
|
+
// MCP coordination setup
|
|
60
164
|
mcp__claude-flow__swarm_init { topology: "mesh", maxAgents: 6 }
|
|
61
165
|
mcp__claude-flow__agent_spawn { type: "researcher" }
|
|
62
166
|
mcp__claude-flow__agent_spawn { type: "coder" }
|
|
63
167
|
mcp__claude-flow__agent_spawn { type: "analyst" }
|
|
64
168
|
mcp__claude-flow__agent_spawn { type: "tester" }
|
|
65
169
|
mcp__claude-flow__agent_spawn { type: "coordinator" }
|
|
66
|
-
|
|
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
|
|
67
179
|
Bash "mkdir -p app/{src,tests,docs}"
|
|
68
180
|
Write "app/package.json"
|
|
69
181
|
Write "app/README.md"
|
|
@@ -73,9 +185,9 @@ If you need to do X operations, they should be in 1 message, not X messages
|
|
|
73
185
|
**โ WRONG - Multiple Messages (NEVER DO THIS):**
|
|
74
186
|
```javascript
|
|
75
187
|
Message 1: mcp__claude-flow__swarm_init
|
|
76
|
-
Message 2:
|
|
77
|
-
Message 3:
|
|
78
|
-
Message 4: TodoWrite
|
|
188
|
+
Message 2: Task("researcher agent")
|
|
189
|
+
Message 3: Task("coder agent")
|
|
190
|
+
Message 4: TodoWrite({ todo: "single todo" })
|
|
79
191
|
Message 5: Bash "mkdir src"
|
|
80
192
|
Message 6: Write "package.json"
|
|
81
193
|
// This is 6x slower and breaks parallel coordination!
|
|
@@ -84,10 +196,11 @@ Message 6: Write "package.json"
|
|
|
84
196
|
### ๐ฏ BATCH OPERATIONS BY TYPE
|
|
85
197
|
|
|
86
198
|
**Todo and Task Operations (Single Message):**
|
|
87
|
-
- TodoWrite
|
|
88
|
-
- Task agents
|
|
89
|
-
-
|
|
90
|
-
-
|
|
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!
|
|
91
204
|
|
|
92
205
|
**File Operations (Single Message):**
|
|
93
206
|
- Read 10 files? โ One message with 10 Read calls
|
|
@@ -438,22 +551,36 @@ Message 6: TodoWrite (another single todo)
|
|
|
438
551
|
**THIS IS CORRECT โ
(Parallel - ALWAYS DO THIS):**
|
|
439
552
|
```
|
|
440
553
|
Message 1: [BatchTool]
|
|
554
|
+
// MCP coordination setup
|
|
441
555
|
- mcp__claude-flow__swarm_init
|
|
442
556
|
- mcp__claude-flow__agent_spawn (researcher)
|
|
443
|
-
- mcp__claude-flow__agent_spawn (coder)
|
|
557
|
+
- mcp__claude-flow__agent_spawn (coder)
|
|
444
558
|
- mcp__claude-flow__agent_spawn (analyst)
|
|
445
559
|
- mcp__claude-flow__agent_spawn (tester)
|
|
446
560
|
- mcp__claude-flow__agent_spawn (coordinator)
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
- Task
|
|
451
|
-
- Task
|
|
452
|
-
- Task
|
|
453
|
-
- Write
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
-
|
|
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}"
|
|
457
584
|
```
|
|
458
585
|
|
|
459
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
|
|