Building and Operating the Legal‑Constitutional Governance Agent
1. Introduction
The 5QLN Harness is the only operating system that can lawfully execute the 5QLN Constitution. It is not an AI. It is a governance kernel that orchestrates human judgment and deterministic AI‑partnered skills through the S→G→Q→P→V cycle, enforces the Membrane Protocol, and produces byte‑identical, court‑ready artifacts that survive any change of the underlying AI substrate.
This guide is for the human fiduciary – the Conductor – who will initialize, operate, and maintain the harness. Every step is anchored in the 5QLN Codex and the Foundation’s constitutional documents.
What you will be able to do after this guide
- Initiate a 5QLN‑compliant governance environment.
- Register skills with roles and maturity rungs.
- Walk a full governance cycle from a question to a sealed, attestable artifact.
- Enforce the four absolute prohibitions that keep AI output structurally subordinate.
- Promote skills through the negative‑selection ladder.
- Deliver a Delaware‑ready docket that a court can verify without trusting any AI.
2. Core Concepts
The harness embodies the Master Equation from the Codex’s Compiler:
(H = ∞0 | A = K) × (S → G → Q → P → V) = B'' → ∞0'
- The One Law – Human (
∞0) and Artificial (K) remain asymmetric; the Membrane keeps them separate. - The Five‑Phase Cycle – Every governance action moves through Start (S), Generate (G), Quality (Q), Power (P), and Value (V) in strict order.
- The Seven Runtime Roles – Taggers, Validators, Detectors, Runtime Gate, Ceremony, Composers, Routers. No skill may act outside its assigned role.
- The Membrane Protocol (P.L.4) – Four absolute prohibitions hard‑coded into the kernel; they cannot be overridden, only sealed as a refusal.
- The Cycle‑Walk Manifest (CWM) – A hash‑chained, complete log of one cycle, serving as the Fractal Seed artifact
B''.
3. System Requirements & Initialization
The harness kernel is a deterministic POSIX binary written in Rust. For this guide we assume a reference implementation distributed as 5qln-harness.
Prerequisites
- Linux or macOS (sealed build environment).
- Python 3.11+ (for configuration scripts).
- OpenSSL 3+ (Ed25519 support).
- A YubiKey or other hardware signing device for the Conductor’s key.
- RFC 3161 time‑stamp authority access (e.g.,
freetsa.org).
Initialization
5qln-harness init --conductor-key ~/5qln/conductor_ed25519.pem \
--mirror-url https://mirror.5qln.org \
--tsa-url https://freetsa.org/tsr
This creates:
5qln-root/
├── harness.yaml # global config
├── skills/ # registered skill definitions
│ └── registry.yaml
├── cycles/ # each cycle gets a sub‑folder
├── ledger/ # paired ledger for skill evolution
├── mirror/ # local mirror of public artifacts
├── docket/ # court‑ready outputs
└── bin/ # deterministic composer binaries (gliff-press, etc.)
The Conductor’s public key is registered in harness.yaml and must match the Foundation’s Member‑Registry.
4. Skill Registration & YAML Frontmatter
Every skill is a YAML file in skills/. The harness uses the frontmatter to enforce role‑completeness and maturity rung.
Template (skills/epistemic_register_tagger.yaml)
id: "epistemic-register-tagger"
name: "Epistemic Register Tagger"
role: "tagger" # one of the seven roles
maturity: "stable" # experimental | proposed | stable | longterm | emeritus
version: "1.2.0"
byte-canon: "sha256:abcdef123..."
epistemic_register: "delta-normative" # always δ‑normative (governance)
dependencies: []
runtime: "python3 /opt/5qln/skills/epistemic_register.py"
membrane-sensitive: false # does this skill touch P.L.4 boundaries?
Register
5qln-harness skill register skills/epistemic_register_tagger.yaml
The harness verifies the byte‑canon matches the file’s hash and that the role is valid.
Important – No skill may be registered as stable unless it has passed the Skill‑Evolution Conductor’s promotion protocol (see Section 7).
5. The Governance Cycle: Step‑by‑Step
A cycle starts when a human Conductor poses a governance question. The harness walks the five phases, invoking skills only when their role is required.
5.1 Starting a Cycle
5qln-harness cycle begin \
--question "Does proposed Bylaw Amendment 4 comply with the Duty of Membrane Integrity?" \
--parent-cycle-id "" # first cycle, no parent
Output:
Cycle f3a2b1c9 created. Status: START.
The harness opens an empty cycle‑walk manifest and begins phase S.
5.2 S‑Phase: Tagging
“RECEIVE → NAME → VALIDATE X” – Decoder, §2.1
What happens
- The incoming question is automatically tagged with
epistemic_register: delta-normativeandtier: t1. - If any user‑supplied documents are attached, the
readiness-labelerandthree-tier-record-classifiertaggers run. - The Runtime Gate is active but silent (no violation possible yet).
Manual action – The Conductor may review tags:
5qln-harness cycle show-tags --cycle-id f3a2b1c9
If the tags are correct, the Conductor signals:
5qln-harness cycle phase-complete S
The CWM records the phase transition S→G.
5.3 G‑Phase: Generation
“SEEK α → TEST ≡ → FIND {α′} → VALIDATE Y” – Decoder, §2.2
What happens
- The harness invokes the generative AI partner (e.g., a language model) through a thin adapter that adds epistemic‑register headers.
- The output
α′is produced inside the membrane; the Gate monitors for any attempt to cast a vote or issue a binding decision. - Light Detectors (
corruption-codex) may run in the background and annotate the log, but they never block.
Conductor’s task – Review the α′ alternatives and select one as the candidate to enter Quality. This is not a vote; it is a statement of intent to test.
5qln-harness cycle select-generation --alpha-id a7d... --cycle-id f3a2b1c9
Then:
5qln-harness cycle phase-complete G
5.4 Q‑Phase: Quality
“HOLD φ → HOLD Ω → WATCH FOR ⋂ → VALIDATE Z” – Decoder, §2.3
What happens
- All
validator‑role skills run against the selectedα′and any generated artifacts. For each validator, the harness records a binary PASS/FAIL and a corruption code on failure. - All
detector‑role skills run and emit structured alerts. These never cause a FAIL; they only warn. - If any validator fails, the cycle status becomes
Q_fail. The cycle cannot proceed to Power without a Conductor’s sealed refusal (see P‑Phase).
Example
Validator "constitutional-block-validator" → PASS
Validator "mirror-consistency-auditor" → FAIL (L2: pattern drift)
Detector "corruption-codex" → ALERT V∅: missing forward question
The Conductor reviews the failures and decides whether to accept them with a sealed refusal or abort and restart the cycle.
5qln-harness cycle phase-complete Q
5.5 P‑Phase: Power – The Ceremony
“MAP δE/δV → VALIDATE A” – Decoder, §2.4
This is the irreducibly human moment. The harness presents the Six Attestations in a local web UI (or CLI prompt). No AI is involved.
The Six Attestations (from the Auditable Membrane)
- Role‑completeness – All required roles for this phase were executed.
- Membrane integrity – P.L.4 was not violated during the cycle.
- Epistemic coherence – No α′ output is deceptively presented as γ‑fact.
- Corruption‑codex review – Any L3+ violation has been acknowledged.
- Mirror consistency – The Schedule‑C digest matches the authoritative mirror.
- Readiness final – The artifact’s tier is
green.
After verifying each, the Conductor connects their hardware key and signs:
5qln-harness cycle attest \
--cycle-id f3a2b1c9 \
--attestation "all" \
--key ~/5qln/conductor_ed25519.pem
The harness produces a message digest of all six attestation statements and the Conductor’s Ed25519 signature on that digest. This is the Attestation Block.
If the Conductor cannot attest (e.g., a validator failure that is unacceptable), they issue a Sealed Refusal:
5qln-harness cycle refuse \
--reason "Mirror consistency violation L3 – cannot certify authenticity" \
--key ~/5qln/conductor_ed25519.pem
The refusal becomes the cycle’s output; no further processing happens.
After attestation (or refusal), the Conductor completes the phase:
5qln-harness cycle phase-complete P
5.6 V‑Phase: Value
“FORM B → COMPOSE B'' → FIND ∞0'” – Decoder, §2.5
Composing
- The
gliff-presscomposer takes the full cycle‑walk manifest, the attestation block, and the final readiness tags and produces a.glifffile (a zipped, content‑addressed container). - The
legal-voicecomposer renders the gliff into a PDF/A‑2 document with a jurat declaration, using a deterministic font metric library. - The
bipp-jurisdictional-deltarouter produces a jurisdiction‑specific filing if needed.
Sealing
5qln-harness cycle seal --cycle-id f3a2b1c9
This runs all Composers and computes the Fractal Seed artifact hash. The harness:
- Stores the gliff in
cycles/f3a2b1c9/output. - Updates the CWM with the final
∞0'– the forward question that becomes the parent for the next cycle. - Writes a
cycle_status: completerecord.
Post‑seal – The Routers copy the gliff to the public mirror and/or the Tier‑3 escrow.
View the Manifest
5qln-harness cycle manifest --cycle-id f3a2b1c9
A JSON document with full chain of hashes.
6. The Membrane Protocol (P.L.4) in Practice
The Runtime Gate is a sandboxed monitor that runs continuously. Its four rules (from The Auditable Membrane and Codex §2.8, §3.4 R9) trigger immediate actions:
| Rule | Triggered by | Result |
|---|---|---|
| No voting on binding decisions | Any skill output containing a “vote” record or tally intended to decide a case. | Cycle halted with L4. CWM records gate_violation. |
| No AI signing | Any attempt by a non‑Ceremony role to produce a cryptographic signature or claim authority to seal. | Cycle aborted; mandatory sealed refusal. |
| No un‑identified public speech | A legal‑voice or gliff‑press run where the Conductor has not attested an identified‑speaker tag. |
Composition blocked at V‑phase; error L4. |
| No simulation of ∞0 | Generative AI outputs marked as epistemic_register: gamma-fact when they are only speculative. |
Detector fires V∅; Gate does not block but flags for attestation. |
If a Gate violation occurs, the harness emits a Membrane Breach Gliff and the cycle cannot produce a positive artifact. Only a human‑signed Sealed Refusal can close the cycle.
7. Skill‑Evolution Conductor (The Negative‑Selection Ladder)
Skills grow only through a fiduciary process, never by AI vote. The principle: any Conductor may propose a promotion, but the promotion succeeds only if no human demurs with a valid corruption‑codex violation within a fixed time window.
Propose a promotion
5qln-harness skill propose \
--skill-id "my-new-detector" \
--from-rung experimental \
--to-rung proposed \
--window-days 14
This generates a sealed proposal gliff and starts the clock. The harness announces the proposal on the Foundation Event Bus.
Challenge (demurrer)
During the window, any Conductor can run:
5qln-harness skill demur \
--proposal-gliff sha256:abc... \
--corruption-code L2 \
--evidence-cycles "f3a2b1c9, 4e8d0..."
If a valid demurrer is filed, the proposal is flagged as negative‑selected and permanently linked to the demurrer gliff. The skill remains at its current rung.
If the window expires clean
The harness automatically:
- Commits a
promotion-to-stablepaired‑ledger entry. - Updates the skill’s
maturityin the registry. - Records the chain
proposal → uncontested → stablein the ledger.
Rungs summarized
| Rung | Production? | Requirement |
|---|---|---|
| experimental | No | Work in sandbox only. |
| proposed | Sandbox | Under active negative‑selection window. |
| stable | Yes | Uncontested for the window period. |
| longterm | Yes | Additional retroactive audit over N cycles. |
| emeritus | Frozen | Archived; re‑promotion requires a new proposal. |
8. Legal Integration & Court‑Ready Outputs
The harness is designed to produce artifacts that a Delaware court can verify independently, without running any AI.
Producing a Delaware docket
After sealing a cycle that relates to a Foundation governance act (bylaw amendment, member admission, etc.), run:
5qln-harness docket compose \
--cycle-id f3a2b1c9 \
--court "Delaware Court of Chancery" \
--case-ref "5QLN-2026-04-001" \
--output docket/CA-001.pdf
This generates a PDF containing:
- A cover page with jurat and human Conductor’s physical signature line.
- The full cycle‑walk manifest (human‑readable table).
- The Attestation Block with Conductor’s signature.
- The gliff’s SHA‑256 and a QR‑code link to the public mirror copy.
- A declaration that the document is a true and complete Verifiable Record under the 5QLN Constitution.
Mirror consistency check
The court (or any third party) can verify the docket by fetching the mirror digest:
curl https://mirror.5qln.org/schedule-c/digest.txt
# compare with the digest embedded in the docket
If they match, the court has proven that the artifact has not been altered and that the governance cycle was conducted under the Membrane.
9. Verification & Substrate Survival Testing
The harness’s normative validity does not depend on any specific AI model. To prove this, run the Substrate Survival Test Suite.
5qln-harness test substrate-survival \
--generation-backend gpt4 \
--generation-backend claude3 \
--generation-backend future-model \
--cycles 100
What it proves
- The 8 skills that contain zero AI calls (taggers, validators, detectors, gate, composers) produce identical outputs regardless of the generative backend.
- The cycle‑walk manifest hashes are identical for all non‑generative phases.
- No corruption‑codex‑class violations are introduced by a model change.
Drift check
5qln-harness test drift \
--against-codex-version 1.0.0
This validates that the harness’s internal decoding operations match the Codex exactly – no symbol renamed, no phase reordered. The result is a PASS/FAIL with a detailed drift map.
Redundancy analysis (from Subtraction Audit)
5qln-harness test redundancy \
--skills all \
--test-set /corpus/1000-synthetic-corruptions
Identifies skills with 100% output correlation and suggests merging.
10. Appendices
A. The Seven Roles Summary
| Role | Function | Examples |
|---|---|---|
| Tagger | Attach epistemic, readiness, tier labels | epistemic-register-tagger |
| Validator | Deterministic PASS/FAIL against canonical form | constitutional-block-validator |
| Detector | Surface corruption alerts (require interpretation) | corruption-codex |
| Gate | Continuous enforcement of P.L.4 | membrane-protocol-runtime |
| Ceremony | Human attestation and signing | cycle-attestation-conductor |
| Composer | Produce byte‑identical sealable artifacts | gliff-press, legal-voice |
| Router | Escalate or route artifacts through governance | dispute-routing, cbrp-state-monitor |
B. Corruption Codex Quick Reference
| Code | Name | Meaning (Decoding Failure) | Harness Action |
|---|---|---|---|
| V∅ | Incomplete | B'' formed without ∞0' | Cannot seal; cycle malformed |
| L1 | Closing | → skipped; premature answer inserted | Q‑phase catch |
| L2 | Generating | Pattern not anchored to X | Validator FAIL |
| L3 | Claiming | Claiming resonance from K, not from ⋂ | Gate blocks; refuse |
| L4 | Performing | Strategic certainty without sensing flow | Gate hard‑block; L4 status |
| G16 | Governance | Voting in place of sensing (∞0) | Immediate abort |
C. YAML Frontmatter Specification
id: "unique-slug"
name: "Human Readable Name"
role: "tagger|validator|detector|gate|ceremony|composer|router"
maturity: "experimental|proposed|stable|longterm|emeritus"
version: "semver"
byte-canon: "sha256:<hash_of_implementation_file>"
epistemic_register: "delta-normative" # for all governance skills
dependencies: [] # other skill IDs
runtime: "command to execute"
membrane-sensitive: true/false
D. Sample Cycle‑Walk Manifest (JSON Schema)
The manifest is a content‑addressable JSON object with keys:cycle_id, parent_hash, timestamp (RFC 3161 token), phases (each an array of skill invocations with role, status, outputs, hashes), attestation (signer, signature, attestsations), corruption_alerts, sealed_gliff_hash, forward_question (∞0').
E. Glossary
- B'' – Fractal Seed Artifact: The sealed output of one complete cycle.
- CWM – Cycle‑Walk Manifest: The full, provable log of a cycle.
- ∞0 – The Human: The ultimate source of governance authority.
- ∞0' – The Enriched Return: The forward question that drives the next cycle.
- P.L.4 – The Membrane Protocol: The absolute prohibitions guarding the human/AI boundary.
You are now equipped to be a Conductor of the 5QLN Harness. The harness will never make a decision for you, but it will ensure that every decision you make leaves a trail that the law, the mirror, and history can verify.
“The harness must be ready to testify.” – The 5QLN Codex as Verifier
