hive-mind
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseHive-Mind Skill
Hive-Mind Skill
Purpose
用途
Byzantine fault-tolerant consensus and distributed swarm coordination.
拜占庭容错共识与分布式集群协调。
When to Trigger
触发时机
- Multi-agent distributed tasks
- Fault-tolerant operations needed
- Collective decision making
- Complex coordination patterns
- 多Agent分布式任务
- 需要容错操作
- 集体决策
- 复杂协调模式
Topologies
拓扑结构
| Topology | Description | Use Case |
|---|---|---|
| Queen controls workers | Default, anti-drift |
| Fully connected peers | Research, exploration |
| Hybrid | Recommended for complex |
| Dynamic based on load | Auto-scaling |
| 拓扑结构 | 描述 | 适用场景 |
|---|---|---|
| 女王节点控制工作节点 | 默认选项,防止偏移 |
| 全连接对等节点 | 研究、探索场景 |
| 混合模式 | 推荐用于复杂场景 |
| 根据负载动态调整 | 自动扩容 |
Consensus Strategies
共识策略
| Strategy | Tolerance | Use Case |
|---|---|---|
| f < n/3 faulty | Untrusted environment |
| f < n/2 faulty | Leader-based, consistent |
| Eventual | Large scale, availability |
| Conflict-free | Concurrent updates |
| Configurable | Tunable consistency |
| 策略 | 容错能力 | 适用场景 |
|---|---|---|
| 可容忍少于n/3的故障节点 | 不可信环境 |
| 可容忍少于n/2的故障节点 | 基于领导者模式,一致性优先 |
| 最终一致性 | 大规模场景,可用性优先 |
| 无冲突 | 并发更新场景 |
| 可配置 | 可调节一致性 |
Commands
命令
Initialize Hive-Mind
初始化Hive-Mind
bash
npx claude-flow hive-mind init --topology hierarchical-mesh --consensus raftbash
npx claude-flow hive-mind init --topology hierarchical-mesh --consensus raftSpawn Queen
生成女王节点
bash
npx claude-flow hive-mind spawn --role queen --name coordinatorbash
npx claude-flow hive-mind spawn --role queen --name coordinatorCheck Consensus Status
检查共识状态
bash
npx claude-flow hive-mind consensus --statusbash
npx claude-flow hive-mind consensus --statusView Sessions
查看会话
bash
npx claude-flow hive-mind sessions --activebash
npx claude-flow hive-mind sessions --activeBest Practices
最佳实践
- Use hierarchical for coding tasks (anti-drift)
- Use raft consensus for consistency
- Keep agent count under 8 for coordination
- Run frequent checkpoints
- 编码任务使用hierarchical模式(防止偏移)
- 一致性需求场景使用raft共识
- 协调的Agent数量控制在8个以内
- 频繁运行检查点