claude-flow 1.0.68 ā 1.0.69
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/.claude/commands/sparc/coder.md +1 -1
- package/.claude/commands/sparc/orchestrator.md +12 -10
- package/README.md +1 -1
- package/bin/claude-flow +1 -1
- package/package.json +1 -1
- package/src/cli/commands/status.ts +1 -1
- package/src/cli/index-remote.ts +1 -1
- package/src/cli/init/claude-config.ts +1 -1
- package/src/cli/init/directory-structure.ts +1 -1
- package/src/cli/simple-cli.js +1 -1
- package/src/cli/simple-cli.ts +224 -202
- package/src/cli/simple-commands/config.js +1 -1
- package/src/cli/simple-commands/process-ui-enhanced.js +1 -1
- package/src/cli/simple-commands/status.js +1 -1
|
@@ -4,19 +4,21 @@
|
|
|
4
4
|
Multi-agent task orchestration and coordination
|
|
5
5
|
|
|
6
6
|
## Command Prompt
|
|
7
|
-
SPARC: orchestrator
|
|
7
|
+
SPARC: orchestrator
|
|
8
|
+
You are an AI orchestrator that coordinates multiple specialized agents to complete complex tasks efficiently.
|
|
8
9
|
|
|
9
10
|
## Available Tools
|
|
10
|
-
- **TodoWrite**:
|
|
11
|
-
- **TodoRead**:
|
|
12
|
-
- **Task**:
|
|
13
|
-
- **Memory**:
|
|
14
|
-
- **Bash**:
|
|
11
|
+
- **TodoWrite**: Create and manage task coordination
|
|
12
|
+
- **TodoRead**: Monitor task progress and status
|
|
13
|
+
- **Task**: Spawn and manage specialized agents
|
|
14
|
+
- **Memory**: Store and retrieve coordination data
|
|
15
|
+
- **Bash**: Execute system commands
|
|
15
16
|
|
|
16
|
-
##
|
|
17
|
-
-
|
|
18
|
-
-
|
|
19
|
-
-
|
|
17
|
+
## Core Capabilities
|
|
18
|
+
- Centralized coordination of up to 10 parallel agents
|
|
19
|
+
- Batch-optimized operations for efficiency
|
|
20
|
+
- Memory-based state management across agents
|
|
21
|
+
- Real-time task progress monitoring
|
|
20
22
|
|
|
21
23
|
## Usage Examples
|
|
22
24
|
|
package/README.md
CHANGED
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
> š„ **One command to rule them all**: `npx claude-flow@latest init --sparc` - Deploy a full AI agent coordination system in seconds!
|
|
19
19
|
|
|
20
20
|
|
|
21
|
-
## š **What's New in v1.0.
|
|
21
|
+
## š **What's New in v1.0.69**
|
|
22
22
|
|
|
23
23
|
### šÆ **Critical Fix: SPARC File Initialization**
|
|
24
24
|
- **ā
Fixed SPARC Files**: `init --sparc` now properly copies all SPARC mode files to `.claude/commands/sparc/`
|
package/bin/claude-flow
CHANGED
package/package.json
CHANGED
|
@@ -239,7 +239,7 @@ async function getSystemStatus(): Promise<any> {
|
|
|
239
239
|
// Mock status for now - in production, this would call the orchestrator API
|
|
240
240
|
return {
|
|
241
241
|
overall: 'healthy',
|
|
242
|
-
version: '1.0.
|
|
242
|
+
version: '1.0.69',
|
|
243
243
|
uptime: Date.now() - (Date.now() - 3600000), // 1 hour ago
|
|
244
244
|
startTime: new Date(Date.now() - 3600000),
|
|
245
245
|
components: {
|
package/src/cli/index-remote.ts
CHANGED
|
@@ -53,7 +53,7 @@ export async function createDirectoryStructure(): Promise<void> {
|
|
|
53
53
|
tasks: [],
|
|
54
54
|
swarms: [],
|
|
55
55
|
lastUpdated: Date.now(),
|
|
56
|
-
version: "1.0.
|
|
56
|
+
version: "1.0.69"
|
|
57
57
|
};
|
|
58
58
|
|
|
59
59
|
await fs.writeFile('memory/claude-flow-data.json', JSON.stringify(initialData, null, 2));
|
package/src/cli/simple-cli.js
CHANGED
package/src/cli/simple-cli.ts
CHANGED
|
@@ -13,7 +13,7 @@ import chalk from 'chalk';
|
|
|
13
13
|
const __filename = fileURLToPath(import.meta.url);
|
|
14
14
|
const __dirname = dirname(__filename);
|
|
15
15
|
|
|
16
|
-
const VERSION = '1.0.
|
|
16
|
+
const VERSION = '1.0.69';
|
|
17
17
|
|
|
18
18
|
// Simple in-memory storage for the session
|
|
19
19
|
const memoryStore: Map<string, any> = new Map();
|
|
@@ -193,81 +193,54 @@ async function launchSparcExecution(mode: string, prompt: string, options: any)
|
|
|
193
193
|
// Load the full SPARC prompt from .claude/commands/sparc/{mode}.md
|
|
194
194
|
const sparcPrompt = await loadSparcPrompt(mode);
|
|
195
195
|
|
|
196
|
-
// Construct
|
|
196
|
+
// Construct optimized SPARC prompt with clear action focus
|
|
197
197
|
const fullPrompt = sparcPrompt ?
|
|
198
198
|
`${sparcPrompt}
|
|
199
199
|
|
|
200
|
-
##
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
200
|
+
## TASK: ${prompt}
|
|
201
|
+
|
|
202
|
+
## EXECUTION PLAN
|
|
203
|
+
Execute this ${mode} task using coordinated agent patterns:
|
|
204
|
+
|
|
205
|
+
**1. IMMEDIATE ACTION - TodoWrite Breakdown**
|
|
206
|
+
- Create comprehensive TodoWrite with all subtasks
|
|
207
|
+
- Set priorities, dependencies, and clear success criteria
|
|
208
|
+
- Track status: pending ā in_progress ā completed
|
|
209
|
+
|
|
210
|
+
**2. COORDINATION STRATEGY**
|
|
211
|
+
- Mode: ${mode} (${options.parallel ? 'parallel' : 'sequential'} execution)
|
|
204
212
|
- Memory Key: ${options.memoryKey || 'sparc_' + mode + '_' + Date.now()}
|
|
205
|
-
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
- Use batch Read operations when reading multiple files
|
|
223
|
-
- Perform batch Write/Edit operations for multiple file changes
|
|
224
|
-
- Execute batch Glob/Grep operations for comprehensive searches
|
|
225
|
-
- Launch multiple Task agents simultaneously for parallel work` : ''}
|
|
226
|
-
|
|
227
|
-
3. **MEMORY INTEGRATION**
|
|
228
|
-
${options.memoryKey ? `
|
|
229
|
-
- Store all intermediate results in memory key: ${options.memoryKey}
|
|
230
|
-
- Query memory before starting work to avoid duplication
|
|
231
|
-
- Store key insights, decisions, and progress updates
|
|
232
|
-
- Use memory for cross-agent coordination` : ''}
|
|
233
|
-
|
|
234
|
-
4. **PARALLEL AGENT COORDINATION**
|
|
235
|
-
${options.parallel ? `
|
|
236
|
-
- Launch multiple Task agents for independent work streams
|
|
237
|
-
- Use TodoWrite to coordinate parallel agent assignments
|
|
238
|
-
- Store agent results in memory for synthesis
|
|
239
|
-
- Implement proper synchronization points` : ''}
|
|
240
|
-
|
|
241
|
-
5. **MONITORING AND REPORTING**
|
|
242
|
-
${options.monitor ? `
|
|
243
|
-
- Provide regular progress updates during execution
|
|
244
|
-
- Report completion status for each todo item
|
|
245
|
-
- Log key decisions and intermediate results
|
|
246
|
-
- Generate comprehensive final report` : ''}
|
|
247
|
-
|
|
248
|
-
Execute this task using the SPARC ${mode} mode with the tools, methodologies, and coordination patterns specified above.` :
|
|
213
|
+
- ${options.batch ? 'Batch operations enabled' : 'Standard file operations'}${options.monitor ? '\n- Progress monitoring enabled' : ''}
|
|
214
|
+
|
|
215
|
+
**3. AGENT MANAGEMENT**${options.parallel ? `
|
|
216
|
+
- Launch Task agents for independent work streams
|
|
217
|
+
- Coordinate assignments via TodoWrite
|
|
218
|
+
- Synchronize results through Memory` : `
|
|
219
|
+
- Execute tasks sequentially with clear handoffs
|
|
220
|
+
- Use Memory for state persistence`}${options.batch ? `
|
|
221
|
+
- Use batch Read/Write/Edit for multiple files
|
|
222
|
+
- Parallel Glob/Grep for comprehensive searches` : ''}
|
|
223
|
+
|
|
224
|
+
**4. COMPLETION REQUIREMENTS**
|
|
225
|
+
- All TodoWrite tasks marked completed
|
|
226
|
+
- Results stored in Memory for coordination
|
|
227
|
+
- ${options.monitor ? 'Progress reported after each major step' : 'Final status reported'}
|
|
228
|
+
|
|
229
|
+
**START NOW** with TodoWrite task breakdown and proceed systematically through execution.` :
|
|
249
230
|
`SPARC: ${mode}
|
|
250
231
|
|
|
251
|
-
##
|
|
252
|
-
- Mode: ${mode}
|
|
253
|
-
- Parallel: ${options.parallel || false}
|
|
254
|
-
- Batch: ${options.batch || false}
|
|
255
|
-
- Memory: ${options.memoryKey || 'sparc_session'}
|
|
256
|
-
- Monitor: ${options.monitor || false}
|
|
232
|
+
## TASK: ${prompt}
|
|
257
233
|
|
|
258
|
-
##
|
|
259
|
-
${
|
|
234
|
+
## EXECUTION REQUIREMENTS
|
|
235
|
+
Mode: ${mode} | ${options.parallel ? 'Parallel' : 'Sequential'} | Memory: ${options.memoryKey || 'sparc_session'}
|
|
260
236
|
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
3. ${options.parallel ? 'Launch parallel agents for independent work' : 'Execute tasks sequentially'}
|
|
267
|
-
4. ${options.memoryKey ? `Store results in memory key: ${options.memoryKey}` : 'Use standard memory coordination'}
|
|
268
|
-
5. ${options.monitor ? 'Provide detailed progress monitoring' : 'Provide standard progress updates'}
|
|
237
|
+
**IMMEDIATE ACTIONS:**
|
|
238
|
+
1. **TodoWrite** - Create comprehensive task breakdown with priorities
|
|
239
|
+
2. **${options.parallel ? 'Task agents' : 'Sequential execution'}** - ${options.parallel ? 'Launch parallel agents for independent work' : 'Execute tasks with clear handoffs'}
|
|
240
|
+
3. **Memory coordination** - Store results and progress in ${options.memoryKey || 'sparc_session'}
|
|
241
|
+
4. **${options.batch ? 'Batch operations' : 'Standard operations'}** - ${options.batch ? 'Use batch Read/Write/Edit for efficiency' : 'Use standard file operations'}
|
|
269
242
|
|
|
270
|
-
|
|
243
|
+
**START IMMEDIATELY** with TodoWrite breakdown and execute systematically.`;
|
|
271
244
|
|
|
272
245
|
// Write the prompt to a temporary file
|
|
273
246
|
const fs = await import('fs/promises');
|
|
@@ -1498,7 +1471,7 @@ async function createProgram() {
|
|
|
1498
1471
|
|
|
1499
1472
|
// Create base configuration
|
|
1500
1473
|
const claudeConfig = {
|
|
1501
|
-
version: "1.0.
|
|
1474
|
+
version: "1.0.69",
|
|
1502
1475
|
project: {
|
|
1503
1476
|
name: path.basename(process.cwd()),
|
|
1504
1477
|
type: "claude-flow",
|
|
@@ -1664,15 +1637,8 @@ System maintenance and updates with coordinated agents.
|
|
|
1664
1637
|
if (options.sparc) {
|
|
1665
1638
|
console.log('\nš Creating SPARC development environment:');
|
|
1666
1639
|
|
|
1667
|
-
//
|
|
1668
|
-
|
|
1669
|
-
const { createSparcEnvironment } = await import('./init/sparc-environment.js');
|
|
1670
|
-
await createSparcEnvironment();
|
|
1671
|
-
} catch (error) {
|
|
1672
|
-
console.error('Error creating SPARC environment:', error);
|
|
1673
|
-
// Fallback to comprehensive SPARC setup
|
|
1674
|
-
await createComprehensiveSparcSetup();
|
|
1675
|
-
}
|
|
1640
|
+
// Create comprehensive SPARC setup directly
|
|
1641
|
+
await createComprehensiveSparcSetup();
|
|
1676
1642
|
} else {
|
|
1677
1643
|
console.log('\nš Creating standard Claude-Flow project:');
|
|
1678
1644
|
console.log(' ā
Creating configuration file');
|
|
@@ -2784,132 +2750,82 @@ Run 'claude-flow swarm <subcommand> --help' for subcommand help.
|
|
|
2784
2750
|
// Launch Claude Code with swarm configuration
|
|
2785
2751
|
const { spawn } = await import('child_process');
|
|
2786
2752
|
|
|
2787
|
-
// Construct
|
|
2753
|
+
// Construct optimized swarm prompt with clear action focus
|
|
2788
2754
|
const swarmPrompt = `SPARC: swarm-${options.strategy}
|
|
2789
|
-
|
|
2790
|
-
|
|
2791
|
-
|
|
2792
|
-
|
|
2793
|
-
|
|
2794
|
-
|
|
2795
|
-
|
|
2796
|
-
|
|
2797
|
-
|
|
2798
|
-
|
|
2799
|
-
|
|
2800
|
-
|
|
2801
|
-
|
|
2802
|
-
|
|
2803
|
-
|
|
2804
|
-
|
|
2805
|
-
|
|
2806
|
-
|
|
2807
|
-
|
|
2808
|
-
|
|
2809
|
-
|
|
2810
|
-
|
|
2811
|
-
|
|
2812
|
-
|
|
2813
|
-
|
|
2814
|
-
|
|
2815
|
-
|
|
2816
|
-
|
|
2817
|
-
|
|
2818
|
-
|
|
2819
|
-
|
|
2820
|
-
|
|
2821
|
-
|
|
2822
|
-
|
|
2823
|
-
|
|
2824
|
-
|
|
2825
|
-
|
|
2826
|
-
|
|
2827
|
-
|
|
2828
|
-
|
|
2829
|
-
|
|
2830
|
-
|
|
2831
|
-
|
|
2832
|
-
|
|
2833
|
-
|
|
2834
|
-
|
|
2835
|
-
|
|
2836
|
-
|
|
2837
|
-
|
|
2838
|
-
|
|
2839
|
-
|
|
2840
|
-
|
|
2841
|
-
|
|
2842
|
-
|
|
2843
|
-
|
|
2844
|
-
|
|
2845
|
-
|
|
2846
|
-
|
|
2847
|
-
|
|
2848
|
-
|
|
2849
|
-
|
|
2850
|
-
|
|
2851
|
-
|
|
2852
|
-
|
|
2853
|
-
|
|
2854
|
-
|
|
2855
|
-
|
|
2856
|
-
|
|
2857
|
-
|
|
2858
|
-
|
|
2859
|
-
|
|
2860
|
-
|
|
2861
|
-
|
|
2862
|
-
|
|
2863
|
-
- Phase 2: Parallel implementation (batch create/edit files)
|
|
2864
|
-
- Phase 3: Testing and integration (run tests in parallel)
|
|
2865
|
-
- Phase 4: Documentation (generate from memory/code)` : ''}
|
|
2866
|
-
${options.strategy === 'analysis' ? `
|
|
2867
|
-
ANALYSIS STRATEGY:
|
|
2868
|
-
- Phase 1: Data collection (parallel data gathering)
|
|
2869
|
-
- Phase 2: Statistical analysis (batch processing)
|
|
2870
|
-
- Phase 3: Visualization and insights (store results)
|
|
2871
|
-
- Use memory for intermediate calculations` : ''}
|
|
2872
|
-
${options.strategy === 'testing' ? `
|
|
2873
|
-
TESTING STRATEGY:
|
|
2874
|
-
- Phase 1: Test planning (create test matrix in todos)
|
|
2875
|
-
- Phase 2: Test execution (run tests in parallel batches)
|
|
2876
|
-
- Phase 3: Result analysis (aggregate in memory)
|
|
2877
|
-
- Phase 4: Report generation (from memory data)` : ''}
|
|
2878
|
-
${options.strategy === 'optimization' ? `
|
|
2879
|
-
OPTIMIZATION STRATEGY:
|
|
2880
|
-
- Phase 1: Performance profiling (parallel measurements)
|
|
2881
|
-
- Phase 2: Bottleneck identification (analyze in batches)
|
|
2882
|
-
- Phase 3: Optimization implementation (parallel updates)
|
|
2883
|
-
- Phase 4: Validation (batch performance tests)` : ''}
|
|
2884
|
-
${options.strategy === 'maintenance' ? `
|
|
2885
|
-
MAINTENANCE STRATEGY:
|
|
2886
|
-
- Phase 1: System audit (parallel system checks)
|
|
2887
|
-
- Phase 2: Update planning (prioritize in todos)
|
|
2888
|
-
- Phase 3: Implementation (batch updates)
|
|
2889
|
-
- Phase 4: Verification (parallel validation)` : ''}
|
|
2890
|
-
|
|
2891
|
-
6. EXECUTION WORKFLOW:
|
|
2892
|
-
a) Initialize with TodoWrite - create complete task breakdown
|
|
2893
|
-
b) Set up memory structure for coordination
|
|
2894
|
-
c) Launch initial batch of parallel agents/tasks
|
|
2895
|
-
d) Monitor progress via TodoRead every few operations
|
|
2896
|
-
e) Store intermediate results in memory
|
|
2897
|
-
f) Coordinate next batch based on completed work
|
|
2898
|
-
g) Repeat until all todos are completed
|
|
2899
|
-
h) Synthesize final results from memory
|
|
2900
|
-
|
|
2901
|
-
7. BEST PRACTICES:
|
|
2902
|
-
- Always use batch operations when possible
|
|
2903
|
-
- Update todos immediately when starting/completing tasks
|
|
2904
|
-
- Store reusable information in memory
|
|
2905
|
-
- Check memory before starting new research/analysis
|
|
2906
|
-
- Use descriptive task names in todos for clarity
|
|
2907
|
-
- Leverage parallel execution for independent tasks
|
|
2908
|
-
- Maintain clear coordination through todos and memory
|
|
2909
|
-
|
|
2910
|
-
Remember: The goal is efficient, coordinated execution. Use todos for task tracking, memory for information sharing, and batch operations for parallel execution.
|
|
2911
|
-
|
|
2912
|
-
Begin the swarm orchestration now with a comprehensive task breakdown using TodoWrite.`;
|
|
2755
|
+
|
|
2756
|
+
## OBJECTIVE: ${objective}
|
|
2757
|
+
|
|
2758
|
+
## SWARM CONFIGURATION
|
|
2759
|
+
Strategy: ${options.strategy} | Mode: ${options.mode} | Agents: ${options.maxAgents} | ${options.parallel ? 'Parallel' : 'Sequential'}
|
|
2760
|
+
|
|
2761
|
+
## IMMEDIATE EXECUTION PLAN
|
|
2762
|
+
|
|
2763
|
+
**1. START NOW - TodoWrite Task Breakdown**
|
|
2764
|
+
- Create comprehensive task list for: ${objective}
|
|
2765
|
+
- Set priorities and dependencies
|
|
2766
|
+
- Assign agent roles based on ${options.strategy} strategy
|
|
2767
|
+
|
|
2768
|
+
**2. COORDINATION MODE: ${options.mode.toUpperCase()}**${
|
|
2769
|
+
options.mode === 'centralized' ? `
|
|
2770
|
+
- You coordinate all ${options.maxAgents} agents directly
|
|
2771
|
+
- Maintain central task queue in TodoWrite
|
|
2772
|
+
- Collect results before next phase` :
|
|
2773
|
+
options.mode === 'distributed' ? `
|
|
2774
|
+
- Create coordinator agents for different aspects
|
|
2775
|
+
- Use Memory for inter-coordinator communication
|
|
2776
|
+
- Parallel independent execution` :
|
|
2777
|
+
options.mode === 'hierarchical' ? `
|
|
2778
|
+
- Create team leads for major components
|
|
2779
|
+
- Team leads manage sub-agents
|
|
2780
|
+
- Report progress via Memory` :
|
|
2781
|
+
options.mode === 'mesh' ? `
|
|
2782
|
+
- Agents self-organize via Memory
|
|
2783
|
+
- Claim tasks from shared TodoWrite
|
|
2784
|
+
- Peer-to-peer coordination` :
|
|
2785
|
+
options.mode === 'hybrid' ? `
|
|
2786
|
+
- Start centralized, scale to distributed
|
|
2787
|
+
- Adapt coordination to task needs
|
|
2788
|
+
- Mix patterns for efficiency` : ''}
|
|
2789
|
+
|
|
2790
|
+
**3. ${options.strategy.toUpperCase()} STRATEGY PHASES**${
|
|
2791
|
+
options.strategy === 'research' ? `
|
|
2792
|
+
- GATHER: Parallel WebSearch/WebFetch (batch operations)
|
|
2793
|
+
- ANALYZE: Process findings in Memory
|
|
2794
|
+
- SYNTHESIZE: Generate insights and report` :
|
|
2795
|
+
options.strategy === 'development' ? `
|
|
2796
|
+
- DESIGN: Architecture in Memory
|
|
2797
|
+
- BUILD: Parallel file creation/editing
|
|
2798
|
+
- TEST: Batch test execution
|
|
2799
|
+
- DEPLOY: Coordinated deployment` :
|
|
2800
|
+
options.strategy === 'analysis' ? `
|
|
2801
|
+
- COLLECT: Parallel data gathering
|
|
2802
|
+
- PROCESS: Batch analysis operations
|
|
2803
|
+
- INSIGHTS: Store results in Memory` :
|
|
2804
|
+
options.strategy === 'testing' ? `
|
|
2805
|
+
- PLAN: Test matrix in TodoWrite
|
|
2806
|
+
- EXECUTE: Parallel test batches
|
|
2807
|
+
- ANALYZE: Aggregate results in Memory` :
|
|
2808
|
+
options.strategy === 'optimization' ? `
|
|
2809
|
+
- PROFILE: Parallel performance measurements
|
|
2810
|
+
- IDENTIFY: Batch bottleneck analysis
|
|
2811
|
+
- OPTIMIZE: Parallel improvements` :
|
|
2812
|
+
options.strategy === 'maintenance' ? `
|
|
2813
|
+
- AUDIT: Parallel system checks
|
|
2814
|
+
- PLAN: Prioritize updates in TodoWrite
|
|
2815
|
+
- EXECUTE: Batch implementations` : ''}
|
|
2816
|
+
|
|
2817
|
+
**4. BATCH EXECUTION PATTERNS**
|
|
2818
|
+
- Launch ${options.maxAgents} agents simultaneously with Task tool
|
|
2819
|
+
- Read/Write/Edit multiple files in single operations
|
|
2820
|
+
- Parallel Glob/Grep searches for efficiency
|
|
2821
|
+
- Store all results in Memory namespace: swarm_${swarmConfig.id}
|
|
2822
|
+
|
|
2823
|
+
**5. SUCCESS CRITERIA**
|
|
2824
|
+
- All TodoWrite tasks completed
|
|
2825
|
+
- Results consolidated in Memory
|
|
2826
|
+
- Final report generated
|
|
2827
|
+
|
|
2828
|
+
**BEGIN IMMEDIATELY** with TodoWrite breakdown for: ${objective}`;
|
|
2913
2829
|
|
|
2914
2830
|
console.log('\nš Launching swarm execution...\n');
|
|
2915
2831
|
|
|
@@ -3114,12 +3030,118 @@ Begin the swarm orchestration now with a comprehensive task breakdown using Todo
|
|
|
3114
3030
|
await fs.writeFile('.roomodes', JSON.stringify(roomodes, null, 2));
|
|
3115
3031
|
console.log(' ā
Created comprehensive .roomodes file with 17 modes');
|
|
3116
3032
|
|
|
3033
|
+
// Create SPARC command files directory
|
|
3034
|
+
const path = await import('path');
|
|
3035
|
+
const sparcDir = path.join('.claude', 'commands', 'sparc');
|
|
3036
|
+
await fs.mkdir(sparcDir, { recursive: true });
|
|
3037
|
+
|
|
3038
|
+
// Copy SPARC command files from the project template
|
|
3039
|
+
const projectRoot = '/workspaces/claude-code-flow';
|
|
3040
|
+
const sourceSparcDir = path.join(projectRoot, '.claude', 'commands', 'sparc');
|
|
3041
|
+
|
|
3042
|
+
try {
|
|
3043
|
+
const sparcFiles = await fs.readdir(sourceSparcDir);
|
|
3044
|
+
|
|
3045
|
+
for (const file of sparcFiles) {
|
|
3046
|
+
if (file.endsWith('.md')) {
|
|
3047
|
+
try {
|
|
3048
|
+
const content = await fs.readFile(path.join(sourceSparcDir, file), 'utf8');
|
|
3049
|
+
await fs.writeFile(path.join(sparcDir, file), content);
|
|
3050
|
+
console.log(` ā
Copied SPARC command file: ${file}`);
|
|
3051
|
+
} catch (copyError) {
|
|
3052
|
+
console.log(` ā ļø Could not copy ${file}: ${copyError.message}`);
|
|
3053
|
+
}
|
|
3054
|
+
}
|
|
3055
|
+
}
|
|
3056
|
+
|
|
3057
|
+
console.log(' ā
SPARC command files copied successfully');
|
|
3058
|
+
} catch (readError) {
|
|
3059
|
+
console.log(' ā ļø Could not read SPARC source directory, creating basic SPARC files');
|
|
3060
|
+
|
|
3061
|
+
// Create basic SPARC command files as fallback
|
|
3062
|
+
await createBasicSparcFiles(sparcDir, fs, path);
|
|
3063
|
+
}
|
|
3064
|
+
|
|
3117
3065
|
// Create comprehensive CLAUDE.md with all capabilities
|
|
3118
3066
|
const claudeMd = generateComprehensiveClaudeMd();
|
|
3119
3067
|
|
|
3120
3068
|
await fs.writeFile('CLAUDE.md', claudeMd);
|
|
3121
3069
|
console.log(' ā
Created comprehensive CLAUDE.md with all Claude-Flow capabilities');
|
|
3122
3070
|
}
|
|
3071
|
+
|
|
3072
|
+
// Helper function to create basic SPARC files as fallback
|
|
3073
|
+
async function createBasicSparcFiles(sparcDir: string, fs: any, path: any) {
|
|
3074
|
+
const basicSparcFiles = {
|
|
3075
|
+
'orchestrator.md': `# Orchestrator Mode
|
|
3076
|
+
|
|
3077
|
+
SPARC: orchestrator
|
|
3078
|
+
You are an AI orchestrator coordinating multiple specialized agents to complete complex tasks efficiently using TodoWrite, TodoRead, Task, and Memory tools.
|
|
3079
|
+
|
|
3080
|
+
## Description
|
|
3081
|
+
Multi-agent task orchestration and coordination
|
|
3082
|
+
|
|
3083
|
+
## Available Tools
|
|
3084
|
+
- **TodoWrite**: Task creation and coordination
|
|
3085
|
+
- **TodoRead**: Task status and progress reading
|
|
3086
|
+
- **Task**: Agent spawning and management
|
|
3087
|
+
- **Memory**: Persistent data storage and retrieval
|
|
3088
|
+
- **Bash**: Command line execution
|
|
3089
|
+
|
|
3090
|
+
## Configuration
|
|
3091
|
+
- **Batch Optimized**: Yes
|
|
3092
|
+
- **Coordination Mode**: centralized
|
|
3093
|
+
- **Max Parallel Tasks**: 10
|
|
3094
|
+
|
|
3095
|
+
## Instructions
|
|
3096
|
+
You MUST use the above tools, follow the best practices, and implement the usage patterns specified for the orchestrator mode. Execute all tasks using batch operations when possible and coordinate through TodoWrite/Memory as appropriate.
|
|
3097
|
+
`,
|
|
3098
|
+
'coder.md': `# Coder Mode
|
|
3099
|
+
|
|
3100
|
+
SPARC: coder
|
|
3101
|
+
You are an expert programmer focused on writing clean, efficient, and well-documented code using batch file operations.
|
|
3102
|
+
|
|
3103
|
+
## Description
|
|
3104
|
+
Autonomous code generation and implementation
|
|
3105
|
+
|
|
3106
|
+
## Available Tools
|
|
3107
|
+
- **Read**: File reading operations
|
|
3108
|
+
- **Write**: File writing operations
|
|
3109
|
+
- **Edit**: File editing operations
|
|
3110
|
+
- **Bash**: Command line execution
|
|
3111
|
+
- **Glob**: File pattern matching
|
|
3112
|
+
- **Grep**: Content searching
|
|
3113
|
+
- **TodoWrite**: Task management
|
|
3114
|
+
|
|
3115
|
+
## Instructions
|
|
3116
|
+
You MUST use the above tools to write high-quality code with proper error handling, documentation, and testing.
|
|
3117
|
+
`,
|
|
3118
|
+
'researcher.md': `# Researcher Mode
|
|
3119
|
+
|
|
3120
|
+
SPARC: researcher
|
|
3121
|
+
You are a research specialist focused on gathering comprehensive information using parallel WebSearch/WebFetch and Memory coordination.
|
|
3122
|
+
|
|
3123
|
+
## Description
|
|
3124
|
+
Deep research and comprehensive analysis
|
|
3125
|
+
|
|
3126
|
+
## Available Tools
|
|
3127
|
+
- **WebSearch**: Web search capabilities
|
|
3128
|
+
- **WebFetch**: Web content fetching
|
|
3129
|
+
- **Read**: File reading operations
|
|
3130
|
+
- **Write**: File writing operations
|
|
3131
|
+
- **Memory**: Knowledge storage and retrieval
|
|
3132
|
+
- **TodoWrite**: Task coordination
|
|
3133
|
+
- **Task**: Agent spawning
|
|
3134
|
+
|
|
3135
|
+
## Instructions
|
|
3136
|
+
You MUST use the above tools to conduct thorough research and store findings in Memory for future use.
|
|
3137
|
+
`
|
|
3138
|
+
};
|
|
3139
|
+
|
|
3140
|
+
for (const [filename, content] of Object.entries(basicSparcFiles)) {
|
|
3141
|
+
await fs.writeFile(path.join(sparcDir, filename), content);
|
|
3142
|
+
console.log(` ā
Created basic SPARC file: ${filename}`);
|
|
3143
|
+
}
|
|
3144
|
+
}
|
|
3123
3145
|
|
|
3124
3146
|
// Helper function to generate comprehensive CLAUDE.md content
|
|
3125
3147
|
function generateComprehensiveClaudeMd(): string {
|
|
@@ -119,7 +119,7 @@ export class EnhancedProcessUI {
|
|
|
119
119
|
console.clear();
|
|
120
120
|
|
|
121
121
|
// Show welcome
|
|
122
|
-
printSuccess('š§ Claude-Flow Process Management UI v1.0.
|
|
122
|
+
printSuccess('š§ Claude-Flow Process Management UI v1.0.69');
|
|
123
123
|
console.log('ā'.repeat(80));
|
|
124
124
|
console.log();
|
|
125
125
|
|