Skip to content
Skills Library
AI & agents · Building & coding

swarm-consensus

/swarm-consensus

Implement voting mechanisms (majority, weighted) to resolve inter-agent conflicts. Use when: swarm consensus.

Repository
gabbe ↗
Licence
CC-BY-4.0
Last repository change
24.10.2026

Assessment and security

90/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content25 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
1
Scripts
0
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 24.10.2026, without references to retired models or APIs.

Licence

CC-BY-4.0, otwarta.

What it does and when to use it

Implement voting mechanisms (majority, weighted) to resolve inter-agent conflicts. Use when: swarm consensus.

Original author description

Implement voting mechanisms (majority, weighted) to resolve inter-agent conflicts. Use when: swarm consensus.

How it works

  1. Goal
  2. Steps
  3. 1. Voting Protocols
  4. 2. Process
  5. 3. Conflict Patterns
  6. 4. Automation
  7. Security & Guardrails
Original SKILL.md headings · 55 lines, 528 words
SKILL.md preview
---
name: swarm-consensus
description: "Implement voting mechanisms (majority, weighted) to resolve inter-agent conflicts. Use when: swarm consensus."
license: CC-BY-SA-4.0
metadata:
  source: "agents/skills/coordination/swarm-consensus.skill.md"
  tags: "coordination"
  core: "false"
  context_cost: "low"
---
# swarm-consensus Skill

## Goal
This skill allows a group of agents to agree on a decision when opinions differ (e.g., "Should we refactor or patch?").

> **Canonical owner of the voting algorithm.** Any skill that needs consensus voting
> (`coordination/persona-selector.skill`, `coordination/multi-agent-orch.skill`) defers to
> the protocols defined here rather than redefining its own tally rule.

## Steps
## 1. Voting Protocols

| Protocol | Description | Use Case |
|---|---|---|
| **Simple Majority** | >50% wins. | General decisions. |
| **Supermajority** | >66% wins. | Irreversible actions (Delete DB, Change Arch). |
| **Weighted Voting** | Expert's vote counts 2x. | Technical disputes (Trust `eng-backend` over `prod-pm`). |
| **Ranked Choice** | Rank A, B, C. | Choosing a library/framework. |
| **k-threshold ("first-to-ahead-by-k")** | Stop polling as soon as one option leads by `k` votes — don't always poll all N. On no-consensus, escalate to a human. | Cost-gated high-stakes/ambiguous calls (security/compliance/architecture); the canonical early-stopping rule the other coordination skills defer to. |

**k-threshold details** (the single source of truth for this rule):
- Prefer **diverse lenses** (e.g. correctness / security / cost) over identical voters so the panel catches more failure modes.
- **Red-flag-discard** structurally-confused outputs (malformed, off-schema, self-contradictory) *before* they get a vote, so noise cannot dilute the tally.
- Voting multiplies cost — fire it only when stakes + budget justify it; otherwise default to deterministic single-agent execution.

## 2. Process
1.  **Proposal**: Agent A proposes "Refactor Auth module".
2.  **Debate**: Agents B, C, D provide arguments (Pro/Con).
3.  **Vote**: Coordinator calls for votes.
4.  **Tally**: Coordinator counts and declares winner.
5.  **Commit**: All agents accept the result.

## 3. Conflict Patterns
- **The Stalemate**: 50/50 split.
  - *Resolution*: Architecture Decision Record (ADR) + Human Tie-breaker.
- **The Veto**: `ops-security` can veto any Engineering decision if it introduces a vulnerability.

## 4. Automation
- Use `agents/memory/episodic/VOTING_LOG.md` to record decisions.
- Never re-litigate a settled vote in the same session.

## Security & Guardrails

### 1. Skill Security (Swarm Consensus)
- **Vote Tampering Prevention**: The mechanism calculating votes must exist in a protected, deterministic execution environment where participating agents cannot directly alter the tally or manipulate the voting logic.
- **Sybil Attack Defense**: In dynamic swarms, ensure a rogue agent process cannot clone itself to artificially inflate vote counts and control the Simple/Supermajority outcome.

### 2. System Integration Security
- **Immutable Ledger**: All proposals, debates, and final voting tallies must be recorded in an append-only log (`VOTING_LOG.md`). Any attempt to alter historical decisions must trigger an immediate high-priority alert.
- **Veto Authority Enforcement**: The system must enforce absolute, override-proof veto powers for specific security roles (e.g., `ops-security`). If a security veto is cast, the proposal must fail immediately regardless of majority.

### 3. LLM & Agent Guardrails
- **Debate Hallucination Checks**: Arguments proposed during the Debate phase must be fact-checked or grounded against reality to ensure the swarm isn't convinced to vote for a catastrophic option based solely on LLM hallucinations.
- **Adversarial Collusion Detection**: Monitor inter-agent debates for signs of adversarial collusion, where agents might be manipulated by injected prompts to exclusively agree on bypassing security checks or rewriting core safety logic.

Versions

The database has no other skills named swarm-consensus.

Database snapshot: 13.11.2026 · package version c14cb70f4d8a (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100deploy-multi-agent-swarm
    Deploy Multi-Agent Swarm — configure decentralized agent topology, bidding protocol, consensus voting, parallel execution, conflict resolution, swarm state store. Use when: deploy, provision swarm.
  • 95ct-contribution
    Guided workflow for multi-agent consensus contributions. Use when user says "/contribution", "contribution protocol", "submit contribution", "consensus workflow", "multi-agent decision", "create contribution", "contribution start", "contribution submit", "detect conflicts",…
  • 90autonomous-swarm-patterns
    Implement self-organizing autonomous swarm architectures. Use when: implement swarm, deploy autonomous agents, setup swarm consensus.
  • 100self-consistency-sampling-majority-voting-prompts
    Use this skill when improve complex mathematical and logical reasoning accuracy using self-consistency sampling.
  • 100evaluate-multi-agent-swarm
    Evaluate Multi-Agent Swarm — measure consensus quality, bidding efficiency, vote agreement rate, parallel speedup, cost per swarm task. Use when: evaluate, benchmark swarm.
  • 100ct-consensus-voter
    Runs structured multi-agent voting for decision tasks with confidence scores, conflict detection, and HITL escalation when the threshold is not met. Use when two or more agents must vote on options: architecture choices, tool selection, policy decisions, when a task carries…

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.