build-consensus
について
このスキルは、閾値投票や定足数感知などのメカニズムを用いて、中央権限なしで分散合意を実現します。提案の生成、支持動態、指定されたリーダーなしで集団が決定を下さなければならないシナリオにおけるデッドロック解消を扱います。開発者は、集中型意思決定がボトルネックとなっている場合や、分散データベースや合意形成を必要とするマルチエージェント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
Collective agreement across distributed agents w/o central authority — scout advocacy, threshold quorum sensing, commit dynamics from honeybee swarm decisions.
Use When
- Group must decide between many options w/o designated leader
- Centralized decision = bottleneck or single point of failure
- Stakeholders diff info/perspectives must be integrated
- Past decisions suffered groupthink (premature conv) or analysis paralysis (no conv)
- Designing auto systems needing consensus (distributed DBs, multi-agent AI)
- Complements
coordinate-swarmwhen coordination needs explicit collective decisions
In
- Required: Decision (binary, select from N, param set)
- Required: Participating agents (team, services, voters)
- Optional: Known options w/ prelim quality assessments
- Optional: Urgency (time budget)
- Optional: Acceptable err rate (group occasionally pick 2nd-best?)
- Optional: Current failure mode (groupthink, deadlock, flip-flop)
Do
Step 1: Generate Proposals — Independent Scouting
Decision space explored before advocacy begins.
- Assign scouts to independently explore:
- Each scout evaluates w/o knowing others' findings
- Independent eval prevents early herding → popular-but-mediocre
- Scout count: min 3 per serious option (reliability)
- Scouts produce structured assessments:
- Option ID
- Quality score (normalized 0-100 or categorical: poor/fair/good/excellent)
- Key strengths + risks
- Confidence (how thoroughly evaluated?)
- Aggregate reports w/o filter — all above min quality enter advocacy
→ Independently evaluated proposals w/ scores + assessments. No option eliminated by single evaluator; perspective diversity preserved.
If err: Scouts converge on same option w/o independent eval → scouting not truly independent. Rerun w/ explicit info barriers. Too many survive → raise min threshold. Too few → lower or add scouts.
Step 2: Advocacy Dynamics (Waggle Dance)
Scouts advocate preferred options, intensity proportional to quality.
- Each scout advocates top-rated:
- Intensity proportional to quality (better → more vigorous)
- Public — all observe
- Present evidence + quality, not just pref
- Uncommitted observe + evaluate:
- Follow up by inspecting independently
- Own inspection confirms → join advocacy
- Inspection shows lower quality → don't join
- Cross-inspection dynamics:
- Weaker advocates naturally lose followers as agents verify
- Stronger gain through confirmed quality
- Self-correcting: exaggerated advocacy fails verification
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 │
└─────────────────────────────────────────────────────────┘
→ Advocacy for best option(s) grows as agents verify. Weaker fades. Group converges naturally w/o any agent dictating.
If err: No convergence (2 options neck-and-neck) → genuinely equivalent, proceed to quorum w/ either or tiebreaker. Converges too fast on mediocre → increase eval independence (more scouts, stricter barriers) + mandatory cross-inspection.
Step 3: Quorum Threshold + Commit
Commit threshold → collective action.
- Set quorum:
- Simple: 50% + 1
- Important: 66-75%
- Critical/irreversible: 80%+
- Rule: higher stakes → higher quorum → slower but more reliable
- Monitor commit accumulation:
- Track # committed per option over time
- Transparent (all see state)
- No commit withdrawal mid-cycle (prevents oscillation)
- Quorum reached:
- Winning option = collective decision
- Losers ack (no rogue agents)
- Implement immediately — delay erodes commit
→ Clear quorum moment, enough agents independently committed. Legitimate because emerged from independent eval, not authority.
If err: Quorum never reached in time → escalate Step 4. Reached but agents unhappy → advocacy too short, committed w/o adequate eval. Wrong consensus (discovered after) → independent scouting insufficient, increase scout diversity + eval thoroughness next cycle.
Step 4: Deadlock Resolution
Break gridlock when natural process stalls.
- Diagnose type:
- Genuine tie: Equally good → flip coin; delay cost exceeds picking "wrong" equal
- Info deficit: Can't eval well → invest more scouting before re-advocacy
- Faction: Entrenched subgroups refuse to cross-inspect → mandatory rotation, advocates inspect opposing
- Option proliferation: Too many fragment commit → eliminate bottom 50%, re-advocate
- Apply resolution:
- Tie: random or merge if compatible
- Deficit: time-boxed scouting extension
- Faction: forced cross-inspection round
- Proliferation: ranked elimination tournament
- After res, reset quorum clock, re-run Step 3
→ Deadlock resolved via intervention. Visible + accepted as fair process even if indiv preferred diff outcome.
If err: Deadlocks recur on same decision → framing wrong. Step back: decomposable into smaller independent decisions? Scope reduction? "Try both and see"? Sometimes best consensus = "time-boxed experiment".
Step 5: Consensus Quality
Eval whether process produced good decision, not just decision.
- Post-decision:
- Winning option independently verified by ≥N agents?
- Speed appropriate (not too fast/groupthink, not too slow/paralysis)?
- Process surfaced info missed by single decider?
- Agents committed to impl or merely compliant?
- Health metrics:
- Time to quorum: decreasing = learning; increasing = complexity/dysfunction
- Scout-to-commit ratio: scouting per commit. High = difficult or low trust
- Post-decision regret rate: how often group wishes diff?
- Feed learnings back:
- Adjust thresholds based on importance + past accuracy
- Adjust scout count based on complexity
- Adjust time budgets based on historical time-to-quorum
→ Feedback loop improves quality over time. Group learns to scout better, advocate honestly, commit confidently.
If err: Poor metrics (high regret, slow) → audit for structural fails: insufficient scout diversity, advocacy w/o verification, thresholds too low. Rebuild failing stage vs overhauling whole.
Check
- Proposals via independent scouting (no herding)
- Advocacy proportional to assessed quality
- Uncommitted verified advocated options
- Quorum appropriate for importance
- Quorum reached + implemented promptly
- Deadlock mechanism available (even if unused)
- Post-decision quality assessment done
Traps
- Skip independent scouting: Jump to advocacy → groupthink. Consensus quality = eval quality
- Equal advocacy, unequal options: Same advocacy regardless of quality → random selection. Must be proportional
- Commit withdrawal: Un-commit → oscillation. Once committed in cycle, stay until resolves
- Consensus = unanimity confusion: Consensus = sufficient agreement, not total. Waiting 100% = permanent deadlock
- Ignore losing side: Losers have info group needs. Concerns should inform impl even if don't block
→
coordinate-swarm— foundational coordination framework supporting signal-based consensusdefend-colony— collective defense often needs rapid consensus under threatscale-colony— consensus mechanisms adapt when group size changes significantlydissolve-form— morphic controlled dismantling; consensus before dissolution criticalplan-sprint— sprint planning involves team consensus on scopeconduct-retrospective— retrospectives = consensus-building about process improvementbuild-coherence— AI self-app variant; maps bee democracy to single-agent multi-path reasoning
GitHub リポジトリ
関連スキル
content-collections
メタこのスキルは、Content Collections(Markdown/MDXファイルを型安全なデータコレクションに変換するTypeScriptファーストのツール)の本番環境でテストされた設定を提供します。Zodバリデーションによる型安全性を実現し、ブログ、ドキュメントサイト、コンテンツ重視のVite + Reactアプリケーション構築時にご利用ください。Viteプラグインの設定、MDXコンパイルから、デプロイ最適化、スキーマバリデーションまで、すべてを網羅しています。
polymarket
メタこのスキルは、開発者がPolymarket予測市場プラットフォームを活用したアプリケーション構築を可能にします。API統合による取引や市場データの取得に加え、WebSocketを介したリアルタイムデータストリーミングにより、ライブ取引や市場活動を監視できます。取引戦略の実装や、ライブ市場更新を処理するツールの作成にご利用ください。
creating-opencode-plugins
メタこのスキルは、開発者がコマンド、ファイル、LSP操作など25種類以上のイベントタイプにフックするOpenCodeプラグインを作成することを支援します。JavaScript/TypeScriptモジュール向けに、プラグイン構造、イベントAPI仕様、および実装パターンを提供します。カスタムイベント駆動ロジックでOpenCode AIアシスタントのライフサイクルをインターセプト、監視、または拡張する必要がある場合にご利用ください。
sglang
メタSGLangは、高性能なLLMサービングフレームワークであり、RadixAttentionプレフィックスキャッシュを活用したJSON、正規表現、エージェントワークフロー向けの高速で構造化された生成を特長とします。特にプレフィックスが繰り返されるタスクにおいて、大幅に高速な推論を実現し、複雑な構造化出力やマルチターン対話に最適です。制約付きデコードが必要な場合や、広範なプレフィックス共有を伴うアプリケーションを構築する場合は、vLLMなどの代替案ではなくSGLangを選択してください。
