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.
@@ -1,4 +1,4 @@
1
- # SPARC Coder Mode
1
+ # šŸ”„ SPARC Coder Mode
2
2
 
3
3
  ## Description
4
4
  Autonomous code generation and implementation
@@ -4,19 +4,21 @@
4
4
  Multi-agent task orchestration and coordination
5
5
 
6
6
  ## Command Prompt
7
- SPARC: orchestrator\nYou are an AI orchestrator coordinating multiple specialized agents to complete complex tasks efficiently using TodoWrite, TodoRead, Task, and Memory tools.
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**: Task creation and coordination
11
- - **TodoRead**: Task status and progress reading
12
- - **Task**: Agent spawning and management
13
- - **Memory**: Persistent data storage and retrieval
14
- - **Bash**: Command line execution
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
- ## Configuration
17
- - **Batch Optimized**: Yes
18
- - **Coordination Mode**: centralized
19
- - **Max Parallel Tasks**: 10
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.68**
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
@@ -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="1.0.58"
4
+ VERSION="1.0.69"
5
5
  SCRIPT_DIR=$(dirname "$0")
6
6
  ROOT_DIR=$(cd "$SCRIPT_DIR/.." && pwd)
7
7
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-flow",
3
- "version": "1.0.68",
3
+ "version": "1.0.69",
4
4
  "description": "Advanced AI agent orchestration system for Claude Code",
5
5
  "main": "cli.js",
6
6
  "bin": {
@@ -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.49',
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: {
@@ -4,7 +4,7 @@
4
4
  * This version can be run directly from GitHub
5
5
  */
6
6
 
7
- const VERSION = '1.0.43';
7
+ const VERSION = '1.0.69';
8
8
 
9
9
  // Simple color functions
10
10
  const colors = {
@@ -7,7 +7,7 @@ export async function createClaudeConfig(options: InitOptions): Promise<void> {
7
7
 
8
8
  // Create base configuration
9
9
  const claudeConfig = {
10
- version: "1.0.58",
10
+ version: "1.0.69",
11
11
  project: {
12
12
  name: path.basename(process.cwd()),
13
13
  type: "claude-flow",
@@ -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.58"
56
+ version: "1.0.69"
57
57
  };
58
58
 
59
59
  await fs.writeFile('memory/claude-flow-data.json', JSON.stringify(initialData, null, 2));
@@ -13,7 +13,7 @@ import {
13
13
  } from './command-registry.js';
14
14
  import { parseFlags } from './utils.js';
15
15
 
16
- const VERSION = '1.0.55';
16
+ const VERSION = '1.0.69';
17
17
 
18
18
  function printHelp() {
19
19
  console.log(`
@@ -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.68';
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 enhanced SPARC prompt with batch tool integration
196
+ // Construct optimized SPARC prompt with clear action focus
197
197
  const fullPrompt = sparcPrompt ?
198
198
  `${sparcPrompt}
199
199
 
200
- ## Execution Configuration
201
- - Mode: ${mode}
202
- - Parallel Execution: ${options.parallel || false}
203
- - Batch Operations: ${options.batch || false}
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
- - Monitoring: ${options.monitor || false}
206
- - Timeout: ${options.timeout} minutes
207
-
208
- ## Task Specification
209
- ${prompt}
210
-
211
- ## Enhanced Execution Instructions
212
- CRITICAL: You MUST use the following advanced coordination patterns:
213
-
214
- 1. **TODOWRITE COORDINATION**
215
- - Immediately create a comprehensive TodoWrite with all subtasks
216
- - Break down the task into specific, actionable items
217
- - Set priority levels and dependencies
218
- - Update task status in real-time (pending → in_progress → completed)
219
-
220
- 2. **BATCH TOOL OPTIMIZATION**
221
- ${options.batch ? `
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
- ## Task Configuration
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
- ## Task
259
- ${prompt}
234
+ ## EXECUTION REQUIREMENTS
235
+ Mode: ${mode} | ${options.parallel ? 'Parallel' : 'Sequential'} | Memory: ${options.memoryKey || 'sparc_session'}
260
236
 
261
- ## Instructions
262
- Execute this task using SPARC ${mode} mode with the following requirements:
263
-
264
- 1. Use TodoWrite for comprehensive task breakdown
265
- 2. ${options.batch ? 'Use batch operations for file handling' : 'Use standard file operations'}
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
- Begin with a comprehensive task analysis and todo breakdown.`;
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.58",
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
- // Use the modular SPARC environment creator
1668
- try {
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 the SPARC-style prompt for swarm execution
2753
+ // Construct optimized swarm prompt with clear action focus
2788
2754
  const swarmPrompt = `SPARC: swarm-${options.strategy}
2789
- Objective: ${objective}
2790
-
2791
- Configuration:
2792
- - Strategy: ${options.strategy}
2793
- - Coordination Mode: ${options.mode}
2794
- - Max Agents: ${options.maxAgents}
2795
- - Parallel Execution: ${options.parallel}
2796
- - Timeout: ${options.timeout} minutes
2797
-
2798
- IMPORTANT SWARM ORCHESTRATION INSTRUCTIONS:
2799
-
2800
- 1. TASK MANAGEMENT WITH TODOS:
2801
- - Use TodoWrite to create a comprehensive task list immediately
2802
- - Break down the objective into specific, actionable subtasks
2803
- - Assign priority levels (high/medium/low) based on dependencies
2804
- - Update task status in real-time (pending → in_progress → completed)
2805
- - Use TodoRead frequently to track progress and coordinate efforts
2806
-
2807
- 2. BATCH TOOL USAGE FOR PARALLEL EXECUTION:
2808
- - When multiple independent tasks exist, use batch tool calls
2809
- - Launch parallel agents by calling multiple tools in a single response
2810
- - Example: Search for files with Glob/Grep, read multiple files with Read, etc.
2811
- - Maximize parallelism: If 5 files need reading, read all 5 in one batch
2812
- - For agent tasks: Use Task tool to launch parallel agents simultaneously
2813
-
2814
- 3. MEMORY COORDINATION:
2815
- - Store key findings and intermediate results using memory tools
2816
- - Create a shared knowledge base for all agents to access
2817
- - Use memory namespaces to organize information by topic/agent
2818
- - Store: task results, discovered patterns, important decisions
2819
- - Query memory before starting new tasks to avoid duplication
2820
-
2821
- 4. COORDINATION PATTERNS BY MODE:
2822
- ${options.mode === 'centralized' ? `
2823
- CENTRALIZED MODE:
2824
- - You are the single coordinator for all agents
2825
- - Maintain a central task queue and assign work sequentially
2826
- - Use TodoWrite to track all agent assignments
2827
- - Collect all results before proceeding to next phase` : ''}
2828
- ${options.mode === 'distributed' ? `
2829
- DISTRIBUTED MODE:
2830
- - Create multiple coordinator agents for different aspects
2831
- - Use memory system for inter-coordinator communication
2832
- - Each coordinator manages a subset of tasks independently
2833
- - Synchronize through shared memory checkpoints` : ''}
2834
- ${options.mode === 'hierarchical' ? `
2835
- HIERARCHICAL MODE:
2836
- - Create team leads for each major component
2837
- - Team leads coordinate their own sub-agents
2838
- - Use TodoWrite to maintain hierarchy visibility
2839
- - Report progress up the chain via memory updates` : ''}
2840
- ${options.mode === 'mesh' ? `
2841
- MESH MODE:
2842
- - Agents communicate peer-to-peer via memory
2843
- - No central coordinator - self-organizing
2844
- - Agents claim tasks from shared todo list
2845
- - Use memory for discovering and coordinating with peers` : ''}
2846
- ${options.mode === 'hybrid' ? `
2847
- HYBRID MODE:
2848
- - Combine patterns as needed for efficiency
2849
- - Start centralized, transition to distributed for execution
2850
- - Use hierarchical for complex subtasks
2851
- - Adapt coordination based on task requirements` : ''}
2852
-
2853
- 5. STRATEGY-SPECIFIC EXECUTION:
2854
- ${options.strategy === 'research' ? `
2855
- RESEARCH STRATEGY:
2856
- - Phase 1: Information gathering (use WebSearch, WebFetch in parallel)
2857
- - Phase 2: Analysis and synthesis (batch process findings)
2858
- - Phase 3: Report generation (consolidate in memory)
2859
- - Use memory to build knowledge graph of findings` : ''}
2860
- ${options.strategy === 'development' ? `
2861
- DEVELOPMENT STRATEGY:
2862
- - Phase 1: Architecture design (store in memory)
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 {
@@ -51,7 +51,7 @@ async function initConfig(subArgs, flags) {
51
51
 
52
52
  // Create default configuration
53
53
  const defaultConfig = {
54
- version: "1.0.43",
54
+ version: "1.0.69",
55
55
  terminal: {
56
56
  poolSize: 10,
57
57
  recycleAfter: 20,
@@ -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.43');
122
+ printSuccess('🧠 Claude-Flow Process Management UI v1.0.69');
123
123
  console.log('─'.repeat(80));
124
124
  console.log();
125
125
 
@@ -17,7 +17,7 @@ export async function statusCommand(subArgs, flags) {
17
17
  async function getSystemStatus(verbose = false) {
18
18
  const status = {
19
19
  timestamp: Date.now(),
20
- version: '1.0.49',
20
+ version: '1.0.69',
21
21
  orchestrator: {
22
22
  running: false,
23
23
  uptime: 0,