From dabf919694bbbae675dee1223dcfc43464dee057 Mon Sep 17 00:00:00 2001 From: rUv Date: Fri, 26 Sep 2025 17:41:48 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=96=20Checkpoint:=20Edit=20/workspaces?= =?UTF-8?q?/claude-code-flow/.claude/commands/hive-mind/hive-mind-spawn.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .claude/checkpoints/task-1758908385.json | 1 + .claude/commands/hive-mind/hive-mind-spawn.md | 92 +++++++++++++++++-- 2 files changed, 87 insertions(+), 6 deletions(-) create mode 100644 .claude/checkpoints/task-1758908385.json diff --git a/.claude/checkpoints/task-1758908385.json b/.claude/checkpoints/task-1758908385.json new file mode 100644 index 0000000000..8eddc5cb82 --- /dev/null +++ b/.claude/checkpoints/task-1758908385.json @@ -0,0 +1 @@ +{"checkpoint": "task-20250926-173944", "task": "{{user_prompt}} ", "timestamp": "2025-09-26T17:39:45Z", "commit": "c5619e6cb8adcfefc59a87cd2de14b42683fe3cd", "github_release": "true"} diff --git a/.claude/commands/hive-mind/hive-mind-spawn.md b/.claude/commands/hive-mind/hive-mind-spawn.md index a3bded7dff..6bef4804c8 100644 --- a/.claude/commands/hive-mind/hive-mind-spawn.md +++ b/.claude/commands/hive-mind/hive-mind-spawn.md @@ -1,6 +1,6 @@ # hive-mind-spawn -Spawn a Hive Mind swarm with queen-led coordination. +Spawn a Hive Mind swarm with queen-led coordination and mandatory memory coordination. ## Usage ```bash @@ -13,9 +13,89 @@ npx claude-flow hive-mind spawn [options] - `--consensus ` - Consensus algorithm - `--claude` - Generate Claude Code spawn commands -## Examples -```bash -npx claude-flow hive-mind spawn "Build API" -npx claude-flow hive-mind spawn "Research patterns" --queen-type adaptive -npx claude-flow hive-mind spawn "Build service" --claude +## Available Hive-Mind Agents + +### Core Hive-Mind Agents +- **queen-coordinator** - Sovereign orchestrator for hierarchical operations +- **collective-intelligence-coordinator** - Distributed cognitive processing +- **swarm-memory-manager** - Distributed memory and cache management +- **worker-specialist** - Task execution with continuous progress reporting +- **scout-explorer** - Information reconnaissance and threat detection + +## MCP Tool Usage + +```javascript +// Initialize hive-mind topology +mcp__claude-flow__swarm_init { + topology: "hierarchical", + maxAgents: 10, + strategy: "adaptive" +} + +// Spawn specific hive-mind agents +mcp__claude-flow__agent_spawn { type: "queen-coordinator" } +mcp__claude-flow__agent_spawn { type: "collective-intelligence-coordinator" } +mcp__claude-flow__agent_spawn { type: "swarm-memory-manager" } +mcp__claude-flow__agent_spawn { type: "worker-specialist" } +mcp__claude-flow__agent_spawn { type: "scout-explorer" } ``` + +## Claude Code Task Tool Execution + +After MCP coordination setup, use Claude Code's Task tool to spawn actual agents: + +```javascript +Task("Queen Coordinator", "Orchestrate build process with memory writes", "queen-coordinator") +Task("Memory Manager", "Initialize distributed memory system", "swarm-memory-manager") +Task("Scout", "Explore codebase and report findings", "scout-explorer") +Task("Worker 1", "Implement API endpoints", "worker-specialist") +Task("Worker 2", "Create database schema", "worker-specialist") +``` + +## Memory Coordination Protocol + +All hive-mind agents MUST follow the 5-step memory write pattern: + +1. **STATUS** - Write agent status on startup +2. **PROGRESS** - Update progress every 30-60 seconds +3. **SHARE** - Share discoveries/decisions immediately +4. **CHECK** - Read shared memory for coordination +5. **COMPLETE** - Report task completion + +```javascript +// Example memory write (MANDATORY for all agents) +mcp__claude-flow__memory_usage { + action: "store", + key: "swarm/[agent-name]/status", + namespace: "coordination", + value: JSON.stringify({ + agent: "agent-name", + status: "active", + task: "current task", + timestamp: Date.now() + }) +} +``` + +## Examples + +### Basic Hive-Mind +```bash +npx claude-flow hive-mind spawn "Build microservice" +``` + +### Queen-Led Development +```bash +npx claude-flow hive-mind spawn "Create API" --queen-type strategic --max-workers 5 +``` + +### With Claude Code Integration +```bash +npx claude-flow hive-mind spawn "Research and implement" --claude +``` + +## See Also +- `hive-mind-init` - Initialize hive-mind configuration +- `hive-mind-status` - Check hive-mind status +- `hive-mind-memory` - Manage distributed memory +- `hive-mind-consensus` - Configure consensus algorithms