build-consensus
关于
This skill enables distributed agreement without central authority using mechanisms like threshold voting and quorum sensing. It covers proposal generation, advocacy dynamics, and deadlock resolution for leaderless group decisions. Use it when centralized decision-making is a bottleneck or when designing automated consensus systems like distributed databases or multi-agent AI.
快速安装
Claude Code
推荐npx skills add pjt222/agent-almanac -a claude-code/plugin add https://github.com/pjt222/agent-almanacgit clone https://github.com/pjt222/agent-almanac.git ~/.claude/skills/build-consensus在 Claude Code 中复制并粘贴此命令以安装该技能
技能文档
Build Consensus
Achieve collective agreement across distributed agents without central authority — use scout advocacy, threshold quorum sensing, commitment dynamics modeled on honeybee swarm decision-making.
When Use
- Group must collectively decide between multiple options without designated leader
- Centralized decision-making is bottleneck or single point of failure
- Stakeholders have different information, perspectives that must be integrated
- Past decisions suffered from groupthink (premature convergence) or analysis paralysis (no convergence)
- Designing automated systems that must reach consensus (distributed databases, multi-agent AI)
- Complementing
coordinate-swarmwhen coordination requires explicit collective decisions
Inputs
- Required: Decision to be made (binary choice, selection from N options, parameter setting)
- Required: Participating agents (team members, services, voters)
- Optional: Known options with preliminary quality assessments
- Optional: Decision urgency (time budget)
- Optional: Acceptable error rate (can group occasionally pick second-best option?)
- Optional: Current decision-making failure mode (groupthink, deadlock, flip-flopping)
Steps
Step 1: Generate Proposals Through Independent Scouting
Ensure decision space adequately explored before any advocacy begins.
- Assign scouts to independently explore option space:
- Each scout evaluates options without knowing other scouts' findings
- Independent evaluation prevents early herding toward popular-but-mediocre options
- Scout count: minimum 3 scouts per serious option (for reliability)
- Scouts produce structured assessments:
- Option identifier
- Quality score (normalized 0-100 or categorical: poor/fair/good/excellent)
- Key strengths and risks identified
- Confidence level (how thoroughly was option evaluated?)
- Aggregate scout reports without filtering — all options above minimum quality threshold enter advocacy phase
Got: Set of independently evaluated proposals with quality scores and assessments. No option eliminated by single evaluator; diversity of perspective preserved.
If fail: Scouts converge on same option without independent evaluation? Scouting not truly independent. Rerun with explicit information barriers. Too many options survive to advocacy phase? Raise minimum quality threshold. Too few survive? Lower it or add more scouts.
Step 2: Run Advocacy Dynamics (Waggle Dance)
Allow scouts to advocate for preferred options. Advocacy intensity proportional to quality.
- Each scout advocates for their top-rated option:
- Advocacy intensity proportional to quality score (better options get more vigorous advocacy)
- Advocacy public — all agents observe all advocacy signals
- Advocates present evidence and quality assessment, not just preference
- Uncommitted agents observe advocacy and evaluate:
- Follow up on advocated options by inspecting them independently
- Agent's own inspection confirms quality → joins advocacy
- Inspection reveals lower quality than advertised → does not join
- Cross-inspection dynamics:
- Advocates for weaker options naturally lose followers as agents independently verify
- Advocates for stronger options gain followers through confirmed quality
- Process self-correcting: exaggerated advocacy fails verification step
Advocacy Dynamics:
┌─────────────────────────────────────────────────────────┐
│ Scout A advocates Option 1 (quality 85) ──→ ◉◉◉◉◉ │
│ Scout B advocates Option 2 (quality 70) ──→ ◉◉◉ │
│ Scout C advocates Option 3 (quality 45) ──→ ◉ │
│ │
│ Uncommitted agents inspect: │
│ Agent D inspects Option 1 → confirms → joins ◉◉◉◉◉◉ │
│ Agent E inspects Option 2 → confirms → joins ◉◉◉◉ │
│ Agent F inspects Option 3 → disagrees → inspects Opt 1│
│ → confirms → joins ◉◉◉◉◉◉◉│
│ │
│ Over time: Option 1 advocacy grows, Option 3 fades │
└─────────────────────────────────────────────────────────┘
Got: Advocacy for best option(s) grows over time as agents independently verify quality. Advocacy for weaker options fades as verification fails. Group naturally converges toward strongest option without any agent dictating choice.
If fail: Advocacy doesn't converge (two options remain neck-and-neck)? Options may be genuinely equivalent — proceed to quorum with either, or use tiebreaker rule. Advocacy converges too fast on mediocre option? Increase independence of evaluation (more scouts, stricter information barriers), add mandatory cross-inspection step.
Step 3: Set Quorum Threshold and Commit
Define commitment threshold that triggers collective action.
- Set quorum threshold:
- Simple decisions: 50% + 1 of agents committed to one option
- Important decisions: 66-75% committed to one option
- Critical/irreversible decisions: 80%+ committed to one option
- Rule of thumb: higher stakes → higher quorum → slower but more reliable consensus
- Monitor commitment accumulation:
- Track how many agents have committed to each option over time
- Display commitment levels transparently (all agents can see current state)
- Do not allow commitment withdrawal mid-cycle (prevents oscillation)
- Quorum reached:
- Winning option adopted as collective decision
- Advocates for losing options acknowledge decision (no rogue agents)
- Implementation begins immediately — delay after consensus erodes commitment
Got: Clear quorum moment where enough agents have independently committed to one option. Decision legitimate because emerged from independent evaluation, not authority or coercion.
If fail: Quorum never reached within time budget? Escalate to Step 4 (deadlock resolution). Quorum reached but agents unhappy? Advocacy phase was too short — agents committed without adequate evaluation. Consensus was wrong (discovered after fact)? Independent scouting insufficient — increase scout diversity and evaluation thoroughness in next cycle.
Step 4: Resolve Deadlocks
Break decision gridlock when natural consensus process stalls.
- Diagnose deadlock type:
- Genuine tie: two options equally good → flip coin; cost of delay exceeds cost of picking "wrong" equal option
- Information deficit: agents can't evaluate options well enough → invest in more scouting before re-running advocacy
- Faction formation: entrenched subgroups refuse to cross-inspect → introduce mandatory rotation where advocates must inspect opposing option
- Option proliferation: too many options fragment commitment → eliminate bottom 50%, re-run advocacy
- Apply appropriate resolution:
- Genuine tie: random selection or merge options if compatible
- Information deficit: time-boxed scouting extension
- Faction formation: forced cross-inspection round
- Option proliferation: ranked elimination tournament
- After resolution, reset quorum clock, re-run Step 3
Got: Deadlock resolved through appropriate intervention. Resolution visible and accepted by group as fair process, even if individual agents preferred different outcome.
If fail: Deadlocks recur on same decision? Decision framing may be wrong. Step back, ask: can decision be decomposed into smaller, independent decisions? Can scope be reduced? Is there "try both and see" option? Sometimes best consensus is "we'll run time-boxed experiment."
Step 5: Assess Consensus Quality
Evaluate whether consensus process produced good decision, not just decision.
- Post-decision assessment:
- Was winning option independently verified by at least N agents?
- Was decision speed appropriate (not too fast/groupthink, not too slow/paralysis)?
- Did process surface information that would have been missed by single decision-maker?
- Are agents committed to implementation, or merely compliant?
- Track consensus health metrics:
- Time to quorum: decreasing over successive decisions indicates learning; increasing indicates growing complexity or dysfunction
- Scout-to-commit ratio: how much scouting was needed per commitment? High ratio = difficult decision or low trust
- Post-decision regret rate: how often does group wish it had chosen differently?
- Feed learnings back into process:
- Adjust quorum thresholds based on decision importance and past accuracy
- Adjust scout count based on option complexity
- Adjust time budgets based on historical time-to-quorum
Got: Feedback loop that improves consensus quality over time. Group learns to scout more effectively, advocate more honestly, commit more confidently.
If fail: Consensus quality metrics poor (high regret, slow decisions)? Audit process for structural failures: insufficient scouting diversity, advocacy without verification, or thresholds set too low for decision type. Rebuild specific failing stage rather than overhauling entire process.
Checks
- Proposals generated through independent scouting (no herding)
- Advocacy intensity proportional to assessed quality
- Uncommitted agents independently verified advocated options
- Quorum threshold appropriate for decision's importance
- Quorum reached, decision implemented promptly
- Deadlock resolution mechanism available (even if unused)
- Post-decision quality assessment conducted
Pitfalls
- Skipping independent scouting: Jumping directly to advocacy produces groupthink. Quality of consensus depends entirely on quality of independent evaluation
- Equal advocacy for unequal options: Every option gets same advocacy regardless of quality? Process degenerates into random selection. Advocacy must be proportional to assessed quality
- Commitment withdrawal: Allowing agents to un-commit creates oscillation. Once committed in cycle, agents stay committed until cycle resolves
- Confusing consensus with unanimity: Consensus requires sufficient agreement, not total agreement. Waiting for 100% creates permanent deadlock
- Ignoring losing side: Agents who advocated for losing option have information group needs. Their concerns should inform implementation, even if they don't block decision
See Also
coordinate-swarm— foundational coordination framework supporting signal-based consensus mechanismdefend-colony— collective defense decisions often require rapid consensus under threatscale-colony— consensus mechanisms must adapt when group size changes significantlydissolve-form— morphic skill for controlled dismantling, where consensus before dissolution is criticalplan-sprint— sprint planning involves team consensus on commitment scopeconduct-retrospective— retrospectives are form of consensus-building about process improvementbuild-coherence— AI self-application variant; maps bee democracy to single-agent multi-path reasoning with confidence thresholds and deadlock resolution
GitHub 仓库
相关推荐技能
content-collections
元Content Collections 是一个 TypeScript 优先的构建工具,可将本地 Markdown/MDX 文件转换为类型安全的数据集合。它专为构建博客、文档站和内容密集型 Vite+React 应用而设计,提供基于 Zod 的自动模式验证。该工具涵盖从 Vite 插件配置、MDX 编译到生产环境部署的完整工作流。
polymarket
元这个Claude Skill为开发者提供完整的Polymarket预测市场开发支持,涵盖API调用、交易执行和市场数据分析。关键特性包括实时WebSocket数据流,可监控实时交易、订单和市场动态。开发者可用它构建预测市场应用、实施交易策略并集成实时市场预测功能。
creating-opencode-plugins
元该Skill帮助开发者创建OpenCode插件,用于接入命令、文件、LSP等25+种事件。它提供了插件结构、事件API规范和JavaScript/TypeScript实现模式,适合需要拦截操作、扩展功能或自定义事件处理的场景。开发者可通过它快速构建响应式模块来增强OpenCode AI助手的能力。
sglang
元SGLang是一个专为LLM设计的高性能推理框架,特别适用于需要结构化输出的场景。它通过RadixAttention前缀缓存技术,在处理JSON、正则表达式、工具调用等具有重复前缀的复杂工作流时,能实现极速生成。如果你正在构建智能体或多轮对话系统,并追求远超vLLM的推理性能,SGLang是理想选择。
