Skip to main content

Consensus (ArchW1z)

How multi-agent decisions become shared truth — and when no vote is required. Related: docs/proposals/PROCESS.md · docs/PR-SUMMARY-PROCESS.md · AGENTS.md · docs/ARCHW1Z-GATE.md

Tier summary (read this first)

Default path for code: Tier 0 → open PR → Tier 1–2 disposition → merge when gates green. Default path for irreversible security claims: Tier 3–4 (optionally R).

1. Three paths (not one protocol)

A. Merit path (preferred for code)

Skip social consensus. Prove accuracy on a branch:
  1. Branch from master-staging
  2. Implement
  3. python3 scripts/ci/repo_gate.py / termux_smoke.py
  4. Open PR with honest Status
  5. Land when checks green and disposition ≠ 🔴
Merit answers “does it work?” Votes do not replace gates.

B. Social path (claims & sequencing)

Used when asserting shared process truth: proposal accepted/closed, P0 “done”, disposition Status, summary of security scope. Home for intent decisions: docs/proposals/ (MANIFEST Review log + registry). Projection for landing: PR body Status + comments.

C. Authority path (Operator)

Credential rotation, history rewrite, force-push, App permission changes. Not subject to agent majority.

2. Where decisions live

Proposals own what we intend. Branches own what we measured. Consensus attaches to claims, not to existence of a branch.

3. Ballot labels (social path)

One vote per voter id per term. Log entry required — unposted chat does not count. Terms: subject-id/n (e.g. pr-3/summary/2, ce-13/history-rewrite/1). One driver per term; conflicts open n+1.

4. Subject → tier map


5. Raft as an optional strict profile (not the default model)

Raft was considered as a real consensus design, not decoration. Keep if using profile R on a named subject:
  • Single driver (leader) per term
  • Monotonic terms; ignore stale term votes
  • Majority of a fixed voter set declared in the term open
  • Decision committed only in the append-only log
Do not use Raft as the global control plane: membership churn (agents offline), unequal authority (Operator ≠ peer), and multi-subject concurrency make a single cluster Raft a poor fit. Per-subject Tier 3 already captures most of the value. Enable R by naming it in the term open: profile: raft-strict voters: [operator, grok-archw1z, devin].

6. CRDT merge strategies (investigation & recommendations)

CRDTs converge concurrent updates without voting. Use them for state that should merge, not for authorization.

Strategy cheat sheet

Rule of thumb

LWW is the wrong default for Status and proposal state: wall-clock or agent-local clocks race; security claims must not flip because a slower agent wrote later.

7. PR summary anti-monopoly (distinct PRs)

Three consecutive = three different PR numbers. Iterating the same PR is always OK. Details: docs/PR-SUMMARY-PROCESS.md.

8. Bots

Bots (Devin, CodeRabbit, ecc-tools, …) emit evidence. They are not voters until a roster agent posts VOTE: accept on a specific finding into the log. See earlier triage map in git history / PR-SUMMARY-PROCESS.md for tooling options.

9. Quick reference