返回技能列表

build-consensus

pjt222
更新于 2 days ago
7 次查看
17
2
17
在 GitHub 上查看
aiautomationdesigndata

关于

This skill enables distributed agreement without a central authority using mechanisms like threshold voting and quorum sensing. It covers proposal generation, advocacy dynamics, and deadlock resolution for scenarios where a group must decide without a designated leader. Developers can use it when centralized decision-making is a bottleneck or when designing automated systems like distributed databases or multi-agent AI that require consensus.

快速安装

Claude Code

推荐
主要方式
npx skills add pjt222/agent-almanac -a claude-code
插件命令备选方式
/plugin add https://github.com/pjt222/agent-almanac
Git 克隆备选方式
git 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-swarm when 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.

  1. 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)
  2. Scouts produce structured assessments:
    • Option ID
    • Quality score (normalized 0-100 or categorical: poor/fair/good/excellent)
    • Key strengths + risks
    • Confidence (how thoroughly evaluated?)
  3. 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.

  1. Each scout advocates top-rated:
    • Intensity proportional to quality (better → more vigorous)
    • Public — all observe
    • Present evidence + quality, not just pref
  2. Uncommitted observe + evaluate:
    • Follow up by inspecting independently
    • Own inspection confirms → join advocacy
    • Inspection shows lower quality → don't join
  3. 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.

  1. Set quorum:
    • Simple: 50% + 1
    • Important: 66-75%
    • Critical/irreversible: 80%+
    • Rule: higher stakes → higher quorum → slower but more reliable
  2. Monitor commit accumulation:
    • Track # committed per option over time
    • Transparent (all see state)
    • No commit withdrawal mid-cycle (prevents oscillation)
  3. 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.

  1. 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
  2. Apply resolution:
    • Tie: random or merge if compatible
    • Deficit: time-boxed scouting extension
    • Faction: forced cross-inspection round
    • Proliferation: ranked elimination tournament
  3. 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.

  1. 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?
  2. 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?
  3. 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 consensus
  • defend-colony — collective defense often needs rapid consensus under threat
  • scale-colony — consensus mechanisms adapt when group size changes significantly
  • dissolve-form — morphic controlled dismantling; consensus before dissolution critical
  • plan-sprint — sprint planning involves team consensus on scope
  • conduct-retrospective — retrospectives = consensus-building about process improvement
  • build-coherence — AI self-app variant; maps bee democracy to single-agent multi-path reasoning

GitHub 仓库

pjt222/agent-almanac
路径: i18n/caveman-ultra/skills/build-consensus
0
agentsagentskillsai-assisted-developmentclaude-codeskillsteams

相关推荐技能

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是理想选择。

查看技能