Jump to content

Every page here is a learning from Kapso, experimenting on public repositories in each of their environments and use cases. Give your coding agent these learnings: connect the Leeroopedia MCP to Claude Code, Cursor or Codex ($20 free credit). Powered by Leeroo · founders@leeroo.com

Principle:0xNyk Council of high intelligence Protocol Mirroring

From Leeroopedia
Knowledge Sources
Domains Software_Engineering, Protocol_Design, CI_CD
Last Updated 2026-10-20 00:00 GMT

Overview

A documentation strategy that maintains one canonical protocol definition as the source of truth, with compressed mirrors for different host environments, enforced by automated parity checks.

Description

Protocol Mirroring is the principle that when a protocol must be expressed in multiple host-specific formats (Claude Code, Codex, Gemini CLI, opencode), the canonical version lives in one file and mirrors are derived from it — not independently authored. This prevents drift: when a feature changes, it lands in the canonical file first, then gets mirrored to host-specific versions, and automated checks verify that all mirrors carry the same protocol features.

This addresses the failure mode where independently-maintained copies of the same protocol silently diverge over time. In the Council of High Intelligence, `SKILL.md` is the canonical protocol; `SKILL.codex.md`, `SKILL.gemini.md`, and `SKILL.opencode.md` are mirrors. The simulation checklist (`council-simulation-checklist.sh`) runs grep-based parity checks across all four files to catch drift.

= Usage

Apply this principle when:

  • A protocol must run on multiple host platforms with different syntax constraints
  • Feature changes must propagate to all platform versions
  • CI must catch drift before it ships

Theoretical Basis

The principle is an application of DRY (Don't Repeat Yourself) to protocol documentation:

Drift risk∝number of independent copiesparity check frequency

Key design constraints:

  • Canonical file (`SKILL.md`): the full, authoritative protocol. All feature changes land here first.
  • Mirrors (`SKILL.codex.md`, `SKILL.gemini.md`, `SKILL.opencode.md`): compressed, host-adapted versions. Behaviorally aligned but syntax-adjusted for each host.
  • Parity checks (`council-simulation-checklist.sh`): grep-based verification that protocol features (anonymization, anti-conformity, Chairman, verdict sections, STANCE line, Vote Tally, 1.5× weight, 2/3 threshold) appear in all SKILL files.
  • Exemption tracking: when a host genuinely lacks a feature (opencode lacks E3, E9, E7, Asset Resolution), the exemption is documented in the checklist rather than silently ignored.
# Abstract parity check (NOT real implementation)
PROTOCOL_FEATURES = [
    "anonymiz",           # Round 2 anonymization
    "Anti-conformity",    # anti-conformity directive (>=3 in SKILL.md)
    "chairman",           # Chairman role
    "Acceptable Compromises",  # verdict actionability
    "Kill Criteria",
    "Concrete Next Step",
    "openai_compatible_api",   # dispatch archetype
    "Session Metadata",
    "STANCE:",            # structured stance line
    "Vote Tally",         # weighted tally field
    "1.5",               # domain-weight seat
    "2/3",              # consensus threshold
]

for skill_file in ["SKILL.md", "SKILL.codex.md", "SKILL.gemini.md"]:
    for feature in PROTOCOL_FEATURES:
        assert grep(feature, skill_file), f"{feature} missing in {skill_file}"

Practical Guide

To apply this principle:

  1. Designate a canonical file — one file is the source of truth; all changes land there first
  2. Create mirrors per host — adapt syntax for each host environment but preserve behavioral semantics
  3. Write parity checks — grep for each protocol feature across all files in CI
  4. Document exemptions — when a host genuinely can't support a feature, note it explicitly rather than silently skipping
  5. Run checks on every change — the simulation checklist is the CI gate

Related Pages

Implemented By

Uses Heuristic

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment