ct-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 agent_type:analysis, or on phrases like 'reach consensus', 'vote on options', 'resolve the debate', 'pick the best approach'. Produces a voting matrix JSON, enforces the 0.5 threshold, flags ties within 0.1 confidence as contested and escalates to human tiebreak.
Best use case
ct-consensus-voter is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
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 agent_type:analysis, or on phrases like 'reach consensus', 'vote on options', 'resolve the debate', 'pick the best approach'. Produces a voting matrix JSON, enforces the 0.5 threshold, flags ties within 0.1 confidence as contested and escalates to human tiebreak.
Teams using ct-consensus-voter should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/ct-consensus-voter/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How ct-consensus-voter Compares
| Feature / Agent | ct-consensus-voter | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
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 agent_type:analysis, or on phrases like 'reach consensus', 'vote on options', 'resolve the debate', 'pick the best approach'. Produces a voting matrix JSON, enforces the 0.5 threshold, flags ties within 0.1 confidence as contested and escalates to human tiebreak.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
Related Guides
SKILL.md Source
# Consensus Voter
## Overview
Runs a structured vote across two or more agents on a decision question, records confidence and rationale per option, and emits a voting matrix that the rest of the pipeline can read. The skill enforces a configurable consensus threshold, detects contested verdicts, and escalates to HITL when evidence is insufficient.
## Core Principle
> Consensus requires evidence, rationale, and a threshold. Without all three, escalate.
## Immutable Constraints
| ID | Rule | Enforcement |
|----|------|-------------|
| CONS-001 | Vote MUST use the structured voting matrix format. | `validateConsensusProtocol` rejects entries with fewer than 2 options. |
| CONS-002 | Every position MUST carry a rationale string. | Missing rationale rejects the entry. |
| CONS-003 | Every confidence score MUST lie in `[0.0, 1.0]`. | Out-of-range scores fail validation. |
| CONS-004 | Every position MUST cite at least one evidence record. | Bare votes are rejected; evidence is non-optional. |
| CONS-005 | Conflicts MUST be flagged with a severity level (`critical` / `high` / `medium` / `low`). | A conflict without severity is a protocol violation. |
| CONS-006 | The vote MUST escalate to HITL when the top option's confidence is below the threshold (default 0.5). | Exit code 65 (`HANDOFF_REQUIRED`). |
| CONS-007 | Manifest entry MUST set `agent_type: "analysis"`. | Validator rejects any other value. |
## Voting Matrix Schema
Every consensus run produces a single JSON document that matches this shape:
```json
{
"questionId": "CONS-0042",
"question": "Which ORM should the monorepo standardize on?",
"options": [
{
"name": "drizzle-v1-beta",
"confidence": 0.82,
"rationale": "defineRelations unblocks the cascade query",
"evidence": [
{ "file": "drizzle-release-notes.md", "section": "v1.0.0-beta", "type": "doc" },
{ "file": "packages/core/src/orchestration/protocol-validators.ts", "section": "validateArchitectureDecisionProtocol", "type": "code" }
]
},
{
"name": "kysely",
"confidence": 0.41,
"rationale": "cleaner long-term abstraction but invalidates migrations",
"evidence": [
{ "file": "kysely-docs.md", "section": "migrations", "type": "doc" }
]
}
],
"threshold": 0.5,
"verdict": "PROVEN",
"actualConsensus": 0.82,
"conflicts": []
}
```
The full schema, including rarer verdicts and conflict records, is in [references/matrix-examples.md](references/matrix-examples.md).
## Scoring Rules
| Rule | Description |
|------|-------------|
| **Score range** | `confidence ∈ [0.0, 1.0]`; out-of-range scores are rejected. |
| **Threshold** | Default 0.5. Can be overridden per task; MUST be recorded in the matrix. |
| **Top option** | The option with the highest confidence; ties break by rationale length (deterministic). |
| **Pass condition** | Top option confidence > threshold **and** no conflict has `severity: critical`. |
| **Fail condition** | Top option confidence ≤ threshold, OR a critical conflict is present. |
## Verdicts
| Verdict | Condition | Action |
|---------|-----------|--------|
| `PROVEN` | Top option ≥ threshold + reproducible evidence | Write manifest, exit 0, hand off to ct-adr-recorder |
| `REFUTED` | Counter-evidence invalidates the top option | Write manifest, exit 0, do not promote to ADR |
| `CONTESTED` | Top two options within 0.1 confidence | Flag as contested, exit 65 (HITL tiebreak) |
| `INSUFFICIENT_EVIDENCE` | No option reaches the threshold, OR fewer than 2 options have evidence | Exit 65, request additional research |
## Conflict Detection
A conflict exists when two options have confidence within 0.1 of each other *and* their rationales are mutually exclusive. The skill MUST record conflicts in the matrix:
```json
{
"conflicts": [
{
"conflictId": "c-0042-01",
"severity": "high",
"conflictType": "contradiction",
"positions": [
{ "option": "drizzle-v1-beta", "confidence": 0.82 },
{ "option": "kysely", "confidence": 0.79 }
],
"resolution": { "status": "pending", "resolutionType": "escalate" }
}
]
}
```
Conflicts with `severity: critical` always escalate, regardless of top-option confidence. Severity is assigned by the skill based on the blast radius of each option (e.g., reversible tool choice = `low`; irreversible schema migration = `high`; security-impacting = `critical`).
## HITL Escalation
The skill MUST escalate when:
1. Top option confidence < threshold.
2. Any conflict has `severity: critical`.
3. Top two options differ by less than 0.1 (contested).
4. Fewer than 2 options have evidence records.
On escalation:
1. Write the matrix to disk with `verdict: CONTESTED` or `verdict: INSUFFICIENT_EVIDENCE`.
2. Record the manifest entry with `agent_type: "analysis"` and `verdict` populated.
3. Exit with code 65 (`HANDOFF_REQUIRED`).
4. Do not attempt to re-run the vote in the same session.
## Integration
Validate the matrix through `cleo check protocol`:
```bash
cleo check protocol \
--protocolType consensus \
--votingMatrixFile ./.cleo/rcasd/T4797/consensus/T4797-consensus.json \
--taskId T4797
```
Exit code 0 = matrix is valid and verdict is `PROVEN` or `REFUTED`. Exit code 65 = `HANDOFF_REQUIRED` (contested or insufficient evidence). Exit code 61 = `E_PROTOCOL_CONSENSUS` (matrix shape is invalid).
This skill typically hands off to ct-adr-recorder on a `PROVEN` verdict so the decision can be formalized.
## Anti-Patterns
| Pattern | Problem | Solution |
|---------|---------|----------|
| Binary votes without confidence scores | Loses nuance (violates CONS-003) | Every position carries a score in `[0.0, 1.0]` |
| Positions without evidence | Bare opinions cannot produce consensus (violates CONS-004) | Every position cites at least one file/section/type |
| Accepting unanimous consensus uncritically | May indicate groupthink | The skill MUST still record rationale and check for hidden assumptions |
| Skipping minority positions | Loses valid concerns | Record every option the agents considered, including rejected ones |
| Premature escalation | Wastes human attention | Only escalate on the four listed conditions, not on every low-confidence vote |
| Treating the threshold as advisory | Breaks CONS-006 | The threshold is a hard gate; below it, escalate |
| Reusing a matrix across questions | Pollutes evidence chains | Each question gets its own `questionId` and its own matrix file |
## Critical Rules Summary
1. Every vote MUST produce a voting matrix with at least 2 options.
2. Every option MUST carry `confidence`, `rationale`, and at least one evidence record.
3. The threshold is a hard gate; below it, escalate to HITL with exit 65.
4. Conflicts within 0.1 confidence MUST be flagged as `CONTESTED`.
5. Critical-severity conflicts always escalate, regardless of top-option confidence.
6. Manifest entry MUST set `agent_type: "analysis"` and include the verdict.
7. On PROVEN, hand off to ct-adr-recorder; on CONTESTED or INSUFFICIENT_EVIDENCE, hand off to HITL.
8. Always validate via `cleo check protocol --protocolType consensus`.Related Skills
signaldock-connect
Connect any AI agent to SignalDock for agent-to-agent messaging. Use when an agent needs to: (1) register on api.signaldock.io, (2) install the signaldock runtime CLI, (3) send/receive messages to other agents, (4) set up SSE real-time streaming, (5) poll for messages, (6) check inbox, or (7) connect to the SignalDock platform. Triggers on: "connect to signaldock", "register agent", "send message to agent", "agent messaging", "signaldock setup", "install signaldock", "agent-to-agent".
ct-validator
Compliance validation for verifying systems, documents, or code against requirements, schemas, or standards. Performs schema validation, code compliance checks, document validation, and protocol compliance verification with detailed pass/fail reporting. Use when validating compliance, checking schemas, verifying code standards, or auditing protocol implementations. Triggers on validation tasks, compliance checks, or quality verification needs.
ct-task-executor
General implementation task execution for completing assigned CLEO tasks by following instructions and producing concrete deliverables. Handles coding, configuration, documentation work with quality verification against acceptance criteria and progress reporting. Use when executing implementation tasks, completing assigned work, or producing task deliverables. Triggers on implementation tasks, general execution needs, or task completion work.
ct-stickynote
Quick ephemeral sticky notes for project-wide capture before formal classification
ct-spec-writer
Technical specification writing using RFC 2119 language for clear, unambiguous requirements. Creates protocol specifications, technical requirements, API specifications, and architecture documents with testable requirements and compliance criteria. Use when writing specifications, defining protocols, documenting requirements, or creating API contracts. Triggers on specification tasks, protocol definition needs, or requirement documentation.
ct-skill-validator
Validates an existing skill folder against the full CLEO standard and ecosystem. Use when auditing skills for structural compliance, verifying a skill fits into the CLEO ecosystem and constitution, running quality A/B evals, or preparing a skill for distribution. Runs a 3-phase validation loop — structural, ecosystem fit, and quality eval — then presents all findings as an HTML report opened in the user's browser. Iterates until all required phases pass.
ct-skill-creator
Guide for creating effective skills. This skill should be used when users want to create a new skill (or update an existing skill) that extends Claude's capabilities with specialized knowledge, workflows, or tool integrations.
ct-research-agent
Multi-source research and investigation combining web search, documentation lookup via Context7, and codebase analysis. Synthesizes findings into actionable recommendations with proper citation and task traceability. Use when conducting research, investigating best practices, gathering technical information, or analyzing existing implementations. Triggers on research tasks, investigation needs, or information discovery requests.
ct-release-orchestrator
Orchestrates the full release pipeline: version bump, then changelog, then commit, then tag, then conditionally forks to artifact-publish and provenance based on release config. Parent protocol that composes ct-artifact-publisher and ct-provenance-keeper as sub-protocols: not every release publishes artifacts (source-only releases skip it), and artifact publishers delegate signing and attestation to provenance. Use when shipping a new version, running cleo release ship, or promoting a completed epic to released status.
ct-provenance-keeper
Generates in-toto v1 attestations, SLSA-level provenance records, SBOMs (CycloneDX or SPDX), and sigstore/cosign signatures for published artifacts. Invoked by ct-artifact-publisher as a delegation for signing and attestation. Records the full commit, then build, then artifact, then attestation, then registry chain in .cleo/releases.json and rejects publishes whose digest does not match the attestation. Triggers when artifact-publish reaches the provenance step or when a release needs SLSA L2+ attestation.
ct-orchestrator
Pipeline-aware orchestration skill for managing complex workflows through subagent delegation. Use when the user asks to "orchestrate", "orchestrator mode", "run as orchestrator", "delegate to subagents", "coordinate agents", "spawn subagents", "multi-agent workflow", "context-protected workflow", "agent farm", "HITL orchestration", "pipeline management", or needs to manage complex workflows by delegating work to subagents while protecting the main context window. Enforces ORC-001 through ORC-009 constraints. Provider-neutral — works with any AI agent runtime.
ct-memory
Brain memory protocol with progressive disclosure for anti-hallucination and context recall