diff --git a/.claude/checkpoints/1754223787.json b/.claude/checkpoints/1754223787.json new file mode 100644 index 0000000000..739c4ff44b --- /dev/null +++ b/.claude/checkpoints/1754223787.json @@ -0,0 +1 @@ +{"branch": "checkpoint/pre-edit-20250803-122307", "file": "/workspaces/claude-code-flow/src/cli/simple-commands/swarm.js", "timestamp": "2025-08-03T12:23:07Z", "type": "pre-edit", "original_branch": "alpha-84b"} diff --git a/.claude/checkpoints/1754223789.json b/.claude/checkpoints/1754223789.json new file mode 100644 index 0000000000..e3f7728e1f --- /dev/null +++ b/.claude/checkpoints/1754223789.json @@ -0,0 +1 @@ +{"tag": "checkpoint-20250803-122309", "file": "/workspaces/claude-code-flow/src/cli/simple-commands/swarm.js", "timestamp": "2025-08-03T12:23:09Z", "type": "post-edit", "branch": "alpha-84b", "diff_summary": " .claude-flow/metrics/performance.json | 2 +- .claude-flow/metrics/system-metrics.json | 120 +++++++++ .claude-flow/metrics/task-metrics.json | 8 +- .claude/checkpoints/1754223564.json | 1 + .claude/checkpoints/1754223566.json | 1 + claude-flow-wiki | 0 src/cli/simple-commands/swarm.js | 437 +++++++++++++++++++++++++++++-- 7 files changed, 545 insertions(+), 24 deletions(-) "} diff --git a/src/cli/simple-commands/swarm.js b/src/cli/simple-commands/swarm.js index 1f71322eb8..c649f6bded 100644 --- a/src/cli/simple-commands/swarm.js +++ b/src/cli/simple-commands/swarm.js @@ -777,13 +777,11 @@ The swarm should be self-documenting - use memory_store to save all important in claudeAvailable = false; } - if (claudeAvailable) { - // Claude is available, spawn it directly - console.log('šŸ Launching Claude Flow Swarm System...'); - console.log(`šŸ“‹ Objective: ${objective}`); - console.log(`šŸŽÆ Strategy: ${strategy}`); - console.log(`šŸ—ļø Mode: ${mode}`); - console.log(`šŸ¤– Max Agents: ${maxAgents}\n`); + console.log('šŸ Launching Claude Flow Swarm System...'); + console.log(`šŸ“‹ Objective: ${objective}`); + console.log(`šŸŽÆ Strategy: ${strategy}`); + console.log(`šŸ—ļø Mode: ${mode}`); + console.log(`šŸ¤– Max Agents: ${maxAgents}\n`); console.log('šŸš€ Launching Claude Code with Swarm Coordination'); console.log('─'.repeat(60)); @@ -843,6 +841,21 @@ The swarm should be self-documenting - use memory_store to save all important in process.exit(code || 0); }); + return; + } else { + // Claude CLI not available, provide instructions + console.log('āš ļø Claude CLI not found. Please install Claude Code:'); + console.log(' https://claude.ai/download'); + console.log('\nšŸ“‹ Once installed, copy this prompt into Claude Code:\n'); + console.log('═'.repeat(80)); + console.log(swarmPrompt); + console.log('═'.repeat(80)); + + // Save prompt to file for easy access + const promptFile = path.join(process.cwd(), '.claude-flow', `swarm-prompt-${Date.now()}.txt`); + await mkdirAsync(path.dirname(promptFile)); + await writeTextFile(promptFile, swarmPrompt); + console.log(`\nšŸ’¾ Prompt saved to: ${promptFile}`); return; }