R90 hygiene + spec-drift — Step 2 contract

Step 2 of the 5-step chain. Defines per-item acceptance criteria (“reconciled”) for the six docs-only drift items audited in Step 1.

§1. Acceptance criteria

AC#1 — consensus.md L40 honest-majority

Pre: L40 prints quorum + f = n + 1 - (n mod 3 == 0 ? 1 : 0) (symbolically wrong for n mod 3 != 0).

Post: L40 reads (or equivalent semantic content):

Together, q + f = n for all n ≥ 1, i.e. the quorum and the maximum-faulty count partition the validator set — an honest- majority invariant any two quorums must intersect in.

Verification: grep consensus.md for the wrong formula (n mod 3 — zero hits — and confirm the new line is present.

AC#2 — consensus.md two-gate paragraph after L118

Pre: §The five finality levels does not explicitly call out the distinct gating for QUORUM → HARD vs. HARD → ABSOLUTE.

Post: Immediately after the existing finality table (so within §The five finality levels), a short paragraph explicitly states:

QUORUM → HARD and HARD → ABSOLUTE use distinct gates. The QUORUM → HARD transition fires on two consecutive rounds at QUORUM with the same (round_id, merkle_root, rule_version_hash) triple and no observed equivocation, as shipped in P3.2.1’s finality FSM. The HARD → ABSOLUTE transition fires on a dispute window expressed in epochs (Phase 0 default: 100 epochs, see s06-consensus.md; the spec’s “≥24h” phrasing maps onto whichever wall-clock duration 100 epochs covers under current scheduling). Both gates exist; one is round-counted, the other is epoch-counted.

Verification: confirm the paragraph is present; verify it links the two transitions correctly to the two distinct gates.

AC#3 — s06-consensus.md mirroring two-gate note

Pre: §Finality levels table collapses both transitions into a single “≥24h dispute window” cell, which reads as if it applies at QUORUM→HARD.

Post: A short note immediately above or below the table (whichever preserves the table’s narrative flow) makes the two-gate structure explicit:

Two-gate clarification. The dispute window phrased above as “≥24h” applies at the HARD → ABSOLUTE transition. The QUORUM → HARD transition is gated separately by two consecutive rounds reaching QUORUM on the same triple (round_id, merkle_root, rule_version_hash) without observed equivocation — see the Phase 3 implementation in src/domains/consensus/finality.ts and the long-form description at docs/3-world/physics/laws/consensus.md § The five finality levels.

Verification: confirm the note is present in s06; cross-references both consensus.md and the shipped FSM source path.

AC#4 — CLAUDE.md §9.2 row counts

Pre: §9.2 shows .agents/ = 243, docs/ = 331, .venv-tools/ = 0 without disk-state note.

Post:

  • .agents/ row shows 251 (current count at 3ba5b5ac).
  • docs/ row shows 630 (current count at 3ba5b5ac).
  • .venv-tools/ row shows 0 with a row-internal note that the directory exists on disk as a Python venv (Include/Lib/Scripts) but contains zero tracked .md files.
  • A new short footnote pins the counting methodology to the SHA: e.g. “Counts via git ls-files <path>/**/*.md at 3ba5b5ac (R90 reconcile point).”

Verification: read §9.2 post-edit; cross-check against git ls-files <path> | grep -c '\.md$' re-run in Step 5.

AC#5 — CLAUDE.md §5 test count dual-anchor

Pre: §5 ends “1001 tests pass at 09d462f8; a regression means investigate, not ignore.”

Post: §5 ends with dual-anchor wording:

“3102 tests pass at 3ba5b5ac across 69 suites (was 1001 at R75 Wave G 09d462f8); a regression means investigate, not ignore.”

Verification: read §5 post-edit; confirm both anchors present.

AC#6 — CLAUDE.md §9.1 two new rows

Pre: §9.1 has rows for tasks/router/skills/trail/proof/integrations but no src/domains/consensus/ row and no src/domains/reputation/ row.

Post: two new rows added in alphabetic position (slotting between existing rows to maintain readability):

  • src/domains/consensus/ | θ Consensus | Yes — θ shipped (R89 Phase B, P3.1.1–P3.9.1); 5 MCP tools register the consensus surface (consensus_propose, consensus_vote, consensus_finality, consensus_gossip, vrf_eval).
  • src/domains/reputation/ | λ Reputation | Yes — λ shipped (R89 Phase A, P2.1.1–P2.5.1); 4 MCP tools register the reputation surface (reputation_get, reputation_history, reputation_leaderboard, reputation_check_gates).

Verification: read §9.1 post-edit; confirm both rows present; confirm the rest of the table is unchanged (no unrelated rows added).

AC#7 — CLAUDE.md §9.3 root files

Pre: §9.3 lists 6 root files.

Post: §9.3 unchanged (the list is already accurate — verified in audit §3 Item 6).

Verification: read §9.3 post-edit; compare against ls *.md at repo root.

Pre: Footer ends with the R89 Phase B entry (2026-05-13).

Post: A new R90 entry is appended to the footer, summarizing the six items in one paragraph following the existing changelog format (“Updated R90 — 2026-05-13 (…) … No src/ code touched — meta hygiene only.”).

Verification: read footer post-edit; confirm new R90 line is the last entry.

AC#9 — Gates

Pre: working tree clean; baseline npm test would show 3102/3102 across 69 suites at 3ba5b5ac (asserted by prompt; verified in Step 5 by running the suite).

Post:

  • npm run build exits 0
  • npm run lint exits 0
  • npm test shows 3102 / 3102 across 69 suites unchanged

Any change to that test count indicates non-docs leakage and blocks the PR.

§2. Non-goals (explicit exclusions)

These must NOT change in any R90 edit:

  • ADR-002 / ADR-003 status (both remain PROPOSED).
  • Any source code under src/.
  • Any frontmatter for ι / μ / ξ / π concept docs.
  • .venv-tools/ directory deletion (the directory stays).
  • Any rewriting of consensus.md beyond L40 + the two-gate paragraph insert.
  • Any κ-specific §9.1 row (out of prompt scope; future hygiene).
  • The Obsidian vault mirror zone (Colibri/docs/).

§3. Definition of “reconciled” (umbrella)

A reconcile is complete when all 9 AC# items above hold AND all three gates (build/lint/test) are green AND the test count is 3102/3102 across 69 suites unchanged.

§4. Step 4 ordering (informational; encoded fully in Step 3 packet)

Recommended edit order (lowest blast-radius first):

  1. CLAUDE.md §9.3 — no edit needed (verify only).
  2. CLAUDE.md §5 — single-line edit.
  3. CLAUDE.md §9.1 — two-row insert.
  4. CLAUDE.md §9.2 — three row updates + 1 footnote.
  5. CLAUDE.md footer — append R90 changelog entry.
  6. consensus.md L40 — single-line rephrase.
  7. consensus.md §The five finality levels — paragraph insert after L118.
  8. s06-consensus.md §Finality levels — paragraph insert.

All edits are surgical; no file is rewritten.

§5. Contract conclusion

Nine acceptance criteria across 4 files; gate is “no test count drift”. Step 3 packet binds these to exact line-numbers and string targets.


Back to top

Colibri — documentation-first MCP runtime. Apache 2.0 + Commons Clause.

This site uses Just the Docs, a documentation theme for Jekyll.