Skip to content

armgit / ruflo

Public Imported from GitHub
0

🌊 The original agent harness. Deploy intelligent multi-player swarms, coordinate autonomous workflows, and build conversational AI systems. Features adaptive memory, self-learning intelligence, federation, vector RAG integration, and native Claude Code / Codex / Hermes and many more Integrated

5.3 KB
Raw Blame

/swarm

Main swarm orchestration command for Claude Flow V3.

🚨 CRITICAL: Background Execution Pattern

When spawning a swarm, Claude Code MUST:

  1. Spawn ALL agents in background using run_in_background: true
  2. Put ALL Task calls in ONE message for parallel execution
  3. Display status board with ASCII table and emojis
  4. STOP and WAIT - don't add more tool calls or poll status

βœ… CORRECT Spawn Pattern

// Spawn ALL agents IN BACKGROUND in ONE message
Task({ prompt: "Research...", subagent_type: "researcher", run_in_background: true })
Task({ prompt: "Design...", subagent_type: "architect", run_in_background: true })
Task({ prompt: "Implement...", subagent_type: "coder", run_in_background: true })
Task({ prompt: "Test...", subagent_type: "tester", run_in_background: true })
Task({ prompt: "Review...", subagent_type: "reviewer", run_in_background: true })

πŸ“Š Required Status Display (ASCII Table)

After spawning, Claude Code MUST display this status board:

╔══════════════════════════════════════════════════════════════╗
β•‘  🐝 SWARM LAUNCHED                                           β•‘
╠══════════════════════════════════════════════════════════════╣
β•‘  πŸ“‹ Task: [user's task description]                          β•‘
β•‘  πŸ”„ Topology: hierarchical  β”‚  πŸ‘₯ Agents: 5/15               β•‘
╠══════════════════════════════════════════════════════════════╣
β•‘  AGENT           β”‚  STATUS     β”‚  TASK                       β•‘
╠══════════════════════════════════════════════════════════════╣
β•‘  πŸ” Researcher   β”‚  🟒 ACTIVE  β”‚  Analyzing requirements     β•‘
β•‘  πŸ—οΈ Architect    β”‚  🟒 ACTIVE  β”‚  Designing approach         β•‘
β•‘  πŸ’» Coder        β”‚  🟒 ACTIVE  β”‚  Implementing solution      β•‘
β•‘  πŸ§ͺ Tester       β”‚  🟒 ACTIVE  β”‚  Writing tests              β•‘
β•‘  πŸ‘€ Reviewer     β”‚  🟒 ACTIVE  β”‚  Code review & security     β•‘
╠══════════════════════════════════════════════════════════════╣
β•‘  ⏳ Working in parallel... Results will arrive automatically β•‘
β•šβ•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•

❌ DO NOT

TaskOutput({ task_id: "..." })     // ❌ Don't poll
"Should I check on agents?"        // ❌ Don't ask
swarm status                       // ❌ Don't check repeatedly

πŸ“‹ Agent Types by Task

╔═══════════════════╦═════════════════════════════════════════════╗
β•‘  TASK TYPE        β•‘  AGENTS                                     β•‘
╠═══════════════════╬═════════════════════════════════════════════╣
β•‘  πŸ†• New Feature   β•‘  researcher, architect, coder, tester, rev  β•‘
β•‘  πŸ› Bug Fix       β•‘  researcher, coder, tester                  β•‘
β•‘  ♻️ Refactor      β•‘  architect, coder, reviewer                 β•‘
β•‘  πŸ”’ Security      β•‘  security-architect, auditor, reviewer      β•‘
β•‘  ⚑ Performance   β•‘  researcher, perf-engineer, coder           β•‘
β•‘  πŸ“š Documentation β•‘  researcher, api-docs                       β•‘
β•šβ•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•©β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•

Usage

npx @claude-flow/cli@latest swarm init --topology hierarchical
npx @claude-flow/cli@latest swarm status  # Only after completion

Options

╔════════════════════════╦═══════════════════════════════════════╗
β•‘  OPTION                β•‘  DESCRIPTION                          β•‘
╠════════════════════════╬═══════════════════════════════════════╣
β•‘  --strategy <type>     β•‘  research, development, analysis      β•‘
β•‘  --topology <type>     β•‘  hierarchical, mesh, ring, star       β•‘
β•‘  --max-agents <n>      β•‘  Maximum agents (default: 15)         β•‘
β•‘  --background          β•‘  Run in background (default: true)    β•‘
β•šβ•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•©β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•