primordial-code-ecosystem / HIR_Architecture_Visual.html
HirModel's picture
Upload 74 files
27ba41e verified
Raw History Blame Contribute Delete
35.9 kB
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>HIR-Informed Architecture β€” Primordial Calculus</title> <style> @import url('https://fonts.googleapis.com/css2?family=EB+Garamond:ital,wght@0,400;0,500;0,600;1,400;1,500&family=Cormorant+Garamond:ital,wght@0,300;0,400;0,600;1,300;1,400&family=Source+Code+Pro:wght@300;400;500&display=swap'); :root { --page: #F2EBDD; --accent: #794626; --text: #222222; --bark: #4F3826; --amber: #C48A3A; --cream: #EAE0CC; --rule: #794626; } *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; } body { background: #D9D0BF; font-family: 'EB Garamond', Georgia, serif; color: var(--text); min-height: 100vh; padding: 40px 20px; } .page { background: var(--page); max-width: 960px; margin: 0 auto; padding: 64px 80px; border: 1.5px solid var(--accent); position: relative; box-shadow: 4px 4px 0 #B8A98A, 8px 8px 0 rgba(0,0,0,0.08); } .page::before { content: ''; position: absolute; inset: 8px; border: 0.5px solid var(--amber); pointer-events: none; } /* ── HEADER ─────────────────────────────────────── */ .header { text-align: center; padding-bottom: 40px; margin-bottom: 48px; border-bottom: 1.5px solid var(--accent); } .overline { font-family: 'Source Code Pro', monospace; font-size: 9px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--amber); margin-bottom: 14px; } .title { font-family: 'Cormorant Garamond', serif; font-size: 42px; font-weight: 300; letter-spacing: 0.04em; color: var(--bark); line-height: 1.1; margin-bottom: 6px; } .subtitle { font-family: 'Cormorant Garamond', serif; font-size: 18px; font-weight: 400; font-style: italic; color: var(--accent); margin-bottom: 20px; } .authorship { font-family: 'Source Code Pro', monospace; font-size: 9px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--bark); } /* ── EPIGRAPH ────────────────────────────────────── */ .epigraph { background: var(--cream); border-left: 2.5px solid var(--amber); padding: 20px 28px; margin-bottom: 48px; font-style: italic; font-size: 15px; line-height: 1.7; color: var(--bark); } .epigraph cite { display: block; margin-top: 10px; font-style: normal; font-family: 'Source Code Pro', monospace; font-size: 9px; letter-spacing: 0.12em; color: var(--amber); text-transform: uppercase; } /* ── VARIABLE TABLE ──────────────────────────────── */ .var-table { width: 100%; border-collapse: collapse; margin-bottom: 48px; font-size: 14px; } .var-table th { font-family: 'Source Code Pro', monospace; font-size: 8px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--accent); border-bottom: 1px solid var(--accent); padding: 8px 12px; text-align: left; } .var-table td { padding: 9px 12px; border-bottom: 0.5px solid #D0C5AF; vertical-align: top; line-height: 1.5; } .var-table td:first-child { font-family: 'Source Code Pro', monospace; font-size: 13px; font-weight: 500; color: var(--amber); width: 50px; } .var-table td:nth-child(2) { font-weight: 600; color: var(--bark); width: 140px; } .var-table td:nth-child(3) { color: #444; font-size: 13px; } /* ── LAYER CARDS ─────────────────────────────────── */ .section { margin-bottom: 52px; } .section-head { display: flex; align-items: baseline; gap: 16px; margin-bottom: 20px; padding-bottom: 8px; border-bottom: 1px solid var(--accent); } .section-num { font-family: 'Source Code Pro', monospace; font-size: 10px; letter-spacing: 0.15em; color: var(--amber); flex-shrink: 0; } .section-title { font-family: 'Cormorant Garamond', serif; font-size: 24px; font-weight: 400; color: var(--bark); letter-spacing: 0.02em; } .section-subtitle { font-family: 'Source Code Pro', monospace; font-size: 9px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); margin-left: auto; flex-shrink: 0; } .section-body { font-size: 15px; line-height: 1.75; color: var(--text); } /* ── TRIADIC PILLARS ─────────────────────────────── */ .pillars { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; margin: 24px 0; } .pillar { border: 1px solid var(--accent); padding: 20px 18px; position: relative; } .pillar::after { content: ''; position: absolute; top: 3px; left: 3px; right: -3px; bottom: -3px; border: 0.5px solid var(--amber); pointer-events: none; z-index: -1; } .pillar-symbol { font-family: 'Source Code Pro', monospace; font-size: 28px; font-weight: 500; color: var(--amber); display: block; margin-bottom: 6px; } .pillar-name { font-family: 'Cormorant Garamond', serif; font-size: 18px; font-weight: 600; color: var(--bark); display: block; margin-bottom: 8px; } .pillar-axis { font-family: 'Source Code Pro', monospace; font-size: 8px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); display: block; margin-bottom: 10px; } .pillar-desc { font-size: 13px; line-height: 1.6; color: #444; } .pillar-impl { margin-top: 10px; padding-top: 10px; border-top: 0.5px solid #D0C5AF; } .pillar-impl-item { font-family: 'Source Code Pro', monospace; font-size: 10px; color: var(--bark); display: block; margin-bottom: 3px; } /* ── CODE BLOCKS ─────────────────────────────────── */ .code-block { background: #EAE0CC; border: 0.5px solid #C8B99A; padding: 18px 20px; font-family: 'Source Code Pro', monospace; font-size: 11.5px; line-height: 1.65; color: var(--bark); white-space: pre; overflow-x: auto; margin: 20px 0; } .code-label { font-family: 'Source Code Pro', monospace; font-size: 8px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--amber); margin-bottom: 6px; } /* ── EQUATIONS ───────────────────────────────────── */ .equations { background: var(--cream); border: 1px solid var(--accent); padding: 24px 28px; margin: 20px 0; text-align: center; } .eq-row { font-family: 'Source Code Pro', monospace; font-size: 13px; color: var(--bark); margin-bottom: 6px; letter-spacing: 0.04em; } .eq-label { font-family: 'EB Garamond', serif; font-size: 12px; font-style: italic; color: var(--accent); margin-left: 12px; } .eq-divider { border: none; border-top: 0.5px solid var(--amber); margin: 14px auto; width: 60%; } /* ── GATE DIAGRAM ────────────────────────────────── */ .gate-diagram { display: grid; grid-template-columns: auto 1fr auto; gap: 0; align-items: center; margin: 24px 0; } .gate-arrow { font-family: 'Source Code Pro', monospace; font-size: 18px; color: var(--amber); padding: 0 10px; text-align: center; } .gate-stages { display: grid; grid-template-columns: 1fr 1fr 1fr; border: 1px solid var(--accent); overflow: hidden; } .gate-stage { padding: 18px 14px; border-right: 0.5px solid var(--accent); text-align: center; } .gate-stage:last-child { border-right: none; } .gate-stage-sym { font-family: 'Source Code Pro', monospace; font-size: 20px; color: var(--amber); display: block; margin-bottom: 4px; } .gate-stage-name { font-family: 'Cormorant Garamond', serif; font-size: 13px; font-weight: 600; color: var(--bark); display: block; margin-bottom: 4px; } .gate-stage-axis { font-family: 'Source Code Pro', monospace; font-size: 8px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); display: block; margin-bottom: 8px; } .gate-stage-checks { list-style: none; font-size: 10.5px; font-family: 'Source Code Pro', monospace; color: #555; text-align: left; line-height: 1.7; } /* ── RESPONSE TIERS ──────────────────────────────── */ .tiers { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 20px 0; } .tier { border: 1px solid; padding: 16px; } .tier-0 { border-color: var(--amber); } .tier-1 { border-color: #8B7355; } .tier-2 { border-color: var(--accent); } .tier-3 { border-color: var(--bark); background: rgba(79,56,38,0.04); } .tier-header { display: flex; align-items: baseline; gap: 10px; margin-bottom: 8px; } .tier-num { font-family: 'Source Code Pro', monospace; font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); } .tier-label { font-family: 'Cormorant Garamond', serif; font-size: 16px; font-weight: 600; color: var(--bark); } .tier-rn { font-family: 'Source Code Pro', monospace; font-size: 10px; color: var(--amber); margin-left: auto; } .tier-items { list-style: none; font-size: 12px; line-height: 1.7; color: #444; font-family: 'Source Code Pro', monospace; } .tier-items li::before { content: 'β†’ '; color: var(--amber); } /* ── AXIOM TABLE ─────────────────────────────────── */ .axiom-table { width: 100%; border-collapse: collapse; font-size: 13.5px; margin: 20px 0; } .axiom-table th { font-family: 'Source Code Pro', monospace; font-size: 8px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--accent); border-bottom: 1px solid var(--accent); padding: 8px 12px; text-align: left; } .axiom-table td { padding: 10px 12px; border-bottom: 0.5px solid #D0C5AF; line-height: 1.55; vertical-align: top; } .axiom-table td:first-child { font-family: 'Source Code Pro', monospace; font-size: 10px; letter-spacing: 0.1em; color: var(--amber); width: 160px; } .axiom-table td:last-child { font-family: 'Source Code Pro', monospace; font-size: 12px; color: var(--bark); } /* ── FOOTER ──────────────────────────────────────── */ .footer { margin-top: 52px; padding-top: 20px; border-top: 1px solid var(--accent); display: flex; justify-content: space-between; align-items: center; } .footer-left { font-family: 'Source Code Pro', monospace; font-size: 8.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--amber); } .footer-right { font-family: 'Source Code Pro', monospace; font-size: 8.5px; letter-spacing: 0.14em; text-transform: uppercase; color: #888; } /* ── FLOW BOX ────────────────────────────────────── */ .flow { border: 1px solid var(--accent); padding: 0; margin: 24px 0; overflow: hidden; } .flow-step { display: grid; grid-template-columns: 36px 1fr; border-bottom: 0.5px solid #D0C5AF; } .flow-step:last-child { border-bottom: none; } .flow-n { background: var(--cream); border-right: 1px solid var(--accent); display: flex; align-items: center; justify-content: center; font-family: 'Source Code Pro', monospace; font-size: 11px; color: var(--amber); font-weight: 500; } .flow-content { padding: 12px 18px; font-size: 13.5px; line-height: 1.65; } .flow-content strong { color: var(--bark); font-weight: 600; } .flow-content code { font-family: 'Source Code Pro', monospace; font-size: 11px; color: var(--accent); background: #EAE0CC; padding: 1px 5px; } /* ── BENEFITS ────────────────────────────────────── */ .benefits { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 20px 0; } .benefit { padding: 16px 18px; border: 0.5px solid #C8B99A; background: var(--cream); } .benefit-title { font-family: 'Cormorant Garamond', serif; font-size: 15px; font-weight: 600; color: var(--bark); margin-bottom: 6px; } .benefit-body { font-size: 13px; line-height: 1.6; color: #444; } p { margin-bottom: 14px; } p:last-child { margin-bottom: 0; } </style> </head> <body> <div class="page"> <!-- HEADER --> <div class="header"> <div class="overline">Primordial Calculus β€” The Abiogenesis Code</div> <div class="title">HIR-Informed Architecture<br>for Coherent Systems</div> <div class="subtitle">Applied Engineering Specification β€” v1.0</div> <div class="authorship">Created and Developed by Collin D. Weber</div> </div> <!-- EPIGRAPH --> <div class="epigraph"> HIR is a regenerative recursive resonance reclamation model. Resonance is not produced once and then held passively. It is sustained through recursive interaction between fidelity and cohesion across time. <cite>Equation Revision Sheet v2 β€” Primordial Calculus</cite> </div> <!-- VARIABLE MAPPING --> <div class="section"> <div class="section-head"> <span class="section-num">Β§ 0</span> <span class="section-title">Canonical Variable Mapping</span> <span class="section-subtitle">Variable Sheet v2 β€” Frozen</span> </div> <table class="var-table"> <thead> <tr> <th>Sym</th> <th>Framework Name</th> <th>Engineering Equivalent</th> </tr> </thead> <tbody> <tr><td>H</td><td>Honesty</td><td>Signal fidelity: provenance, logging, attestation</td></tr> <tr><td>I</td><td>Integrity</td><td>Structural consistency: invariants, state machines, transactions</td></tr> <tr><td>R</td><td>Respect</td><td>Non-destructive interaction: capabilities, isolation, quotas</td></tr> <tr><td>F</td><td>Fidelity</td><td>Derived: stable truth-alignment = verifiable data lineage</td></tr> <tr><td>C</td><td>Cohesion</td><td>Derived: relational fit = interface contract adherence</td></tr> <tr><td>Rn</td><td>Resonance</td><td>Derived: system health score = coherence under load</td></tr> <tr><td>P</td><td>Pressure</td><td>Environmental: traffic spikes, adversarial inputs, contention</td></tr> <tr><td>G</td><td>Earned Grit</td><td>Developmental: accumulated failure memory, hardened validators</td></tr> <tr><td>S_core</td><td>Core Stability</td><td>Density of HIR adherence across all modules</td></tr> <tr><td>B_local</td><td>Local Baseline</td><td>Coherence floor a dense module sets for its neighbors</td></tr> </tbody> </table> <div class="equations"> <div class="eq-row">F = f(H, I) <span class="eq-label">Fidelity emerges from Honesty + Integrity</span></div> <div class="eq-row">C = f(R, I) <span class="eq-label">Cohesion emerges from Respect + Integrity</span></div> <div class="eq-row">Rn = f(F, C) <span class="eq-label">Resonance through recursive reinforcement of F and C</span></div> <hr class="eq-divider"> <div class="eq-row">Rn[t+1] = Rn[t] + Ξ±(F[t] Β· C[t]) βˆ’ Ξ΄</div> <div class="eq-row">F[t+1] = F[t] + β₁(H[t], I[t], C[t]) βˆ’ Ξ΅_F</div> <div class="eq-row">C[t+1] = C[t] + Ξ²β‚‚(R[t], I[t], F[t]) βˆ’ Ξ΅_C</div> <div class="eq-row">G = g(P, Rc, t) &nbsp;&nbsp; S_core = s(H, I, R, Rn, G) &nbsp;&nbsp; B_local = b(S_core)</div> </div> </div> <!-- LAYER 1: HIR KERNEL --> <div class="section"> <div class="section-head"> <span class="section-num">Β§ 1</span> <span class="section-title">The HIR Kernel β€” Policy + Truth Layer</span> <span class="section-subtitle">Core β€” Innermost Ring</span> </div> <div class="section-body"> <p>The HIR Kernel is stateless, pure, and formally verified wherever possible. It does not handle business logic. It enforces the three base constructive terms as runtime properties of the system β€” the engineering form of Axioms 1 and 2: the system preserves its identity under pressure and cannot depend on corruption to persist.</p> </div> <div class="pillars"> <div class="pillar"> <span class="pillar-symbol">H</span> <span class="pillar-name">Honesty</span> <span class="pillar-axis">Signal Fidelity</span> <div class="pillar-desc">Every event entering or exiting the system must be attributable, immutable, and traceable.</div> <div class="pillar-impl"> <span class="pillar-impl-item">β†’ Append-only event logs</span> <span class="pillar-impl-item">β†’ SHA-256 hash chains</span> <span class="pillar-impl-item">β†’ Ed25519 signatures</span> <span class="pillar-impl-item">β†’ mTLS + Sigstore attestation</span> <span class="pillar-impl-item">β†’ Data lineage registry</span> </div> </div> <div class="pillar"> <span class="pillar-symbol">I</span> <span class="pillar-name">Integrity</span> <span class="pillar-axis">Structural Consistency</span> <div class="pillar-desc">State transitions must be valid, reversible where possible, and observable. Invariants must hold before and after every operation.</div> <div class="pillar-impl"> <span class="pillar-impl-item">β†’ Typed state machines</span> <span class="pillar-impl-item">β†’ OPA invariant engine</span> <span class="pillar-impl-item">β†’ Schema registry (Protobuf)</span> <span class="pillar-impl-item">β†’ Outbox pattern (atomic emit)</span> <span class="pillar-impl-item">β†’ Saga coordinator</span> </div> </div> <div class="pillar"> <span class="pillar-symbol">R</span> <span class="pillar-name">Respect</span> <span class="pillar-axis">Non-Destructive Interaction</span> <div class="pillar-desc">No component may exceed its declared authority, consume unbounded resources, or affect another component without explicit capability grant.</div> <div class="pillar-impl"> <span class="pillar-impl-item">β†’ Capability token system</span> <span class="pillar-impl-item">β†’ Least-privilege default deny</span> <span class="pillar-impl-item">β†’ eBPF syscall enforcement</span> <span class="pillar-impl-item">β†’ cgroup resource quotas</span> <span class="pillar-impl-item">β†’ gVisor / Firecracker sandbox</span> </div> </div> </div> <div class="code-label">Resonance Score β€” Kernel Output</div> <div class="code-block">F[t] = f(H_score[t], I_score[t]) C[t] = f(R_score[t], I_score[t]) Rn[t] = Rn[t-1] + Ξ±(F[t] Β· C[t]) βˆ’ Ξ΄[t] Ξ΄[t] = policy_violations[t] + schema_failures[t] + chain_breaks[t] Ξ± = reinforcement coefficient (default 0.15) H_score = (signed_events / total_events) Γ— (intact_chain_segments / total) I_score = (committed_transitions / attempted) Γ— (1 βˆ’ rollback_rate) R_score = (capability-compliant ops / total) Γ— (1 βˆ’ quota_violations / requests)</div> </div> <!-- LAYER 2: HEXAGONAL MODULES --> <div class="section"> <div class="section-head"> <span class="section-num">Β§ 2</span> <span class="section-title">Hexagonal Modules β€” Ports and Adapters</span> <span class="section-subtitle">Concentric Layers β€” Domain Ring</span> </div> <div class="section-body"> <p>Each domain is a self-contained hexagon. The core domain logic is pure and has no knowledge of its delivery mechanism. All environmental interaction β€” inbound or outbound β€” passes through typed ports, implemented by swappable adapters. This enforces F = f(H, I) at the module level: the adapter boundary is where Honesty (provenance) and Integrity (contract adherence) are verified before the pure core is reached.</p> <p>Adapters can change β€” new delivery channel, new storage backend β€” without corrupting the core domain invariants. This is the engineering expression of Axiom 6: structural validity across scales and substrates.</p> </div> <div class="code-block">β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ HEXAGONAL MODULE β”‚ β”‚ β”‚ β”‚ ──► Input Adapter ──────────────────────────────────► β”‚ β”‚ deserialize Β· verify signature Β· validate schema β”‚ β”‚ attach trace-id Β· check capability token β”‚ β”‚ β”‚ β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ β”‚ β”‚ Core Domain β”‚ β”‚ β”‚ β”‚ (pure logic) β”‚ β”‚ β”‚ β”‚ (invariants) β”‚ β”‚ β”‚ β”‚ (state machines) β”‚ β”‚ β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚ β”‚ β”‚ β”‚ ◄── Output Adapter ◄────────────────────────────────◄ β”‚ β”‚ serialize Β· sign event Β· emit to hash chain β”‚ β”‚ enforce capability check on target resource β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜</div> </div> <!-- LAYER 3: DIAMOND GATES --> <div class="section"> <div class="section-head"> <span class="section-num">Β§ 3</span> <span class="section-title">Diamond Gates β€” Validation and Learning</span> <span class="section-subtitle">Every Request β€” Three-Stage Check</span> </div> <div class="section-body"> <p>Every event passes through a three-stage gate before reaching a module core. Each stage is a hard check: fail means quarantine, not silent pass. No component may self-certify passage. The gate is stateless with respect to business logic and stateful only with respect to audit and quota counters.</p> </div> <div class="gate-diagram"> <div class="gate-arrow">EVENT β†’</div> <div class="gate-stages"> <div class="gate-stage"> <span class="gate-stage-sym">H</span> <span class="gate-stage-name">Fidelity Check</span> <span class="gate-stage-axis">Honesty</span> <ul class="gate-stage-checks"> <li>Signature verification</li> <li>Hash chain continuity</li> <li>Schema conformance</li> <li>Freshness window</li> <li>Lineage registry lookup</li> </ul> </div> <div class="gate-stage"> <span class="gate-stage-sym">I</span> <span class="gate-stage-name">Consistency Check</span> <span class="gate-stage-axis">Integrity</span> <ul class="gate-stage-checks"> <li>OPA invariant evaluation</li> <li>State machine guard</li> <li>Idempotency key check</li> <li>Pre-condition assertions</li> <li>Register rollback handler</li> </ul> </div> <div class="gate-stage"> <span class="gate-stage-sym">R</span> <span class="gate-stage-name">Interaction Check</span> <span class="gate-stage-axis">Respect</span> <ul class="gate-stage-checks"> <li>Capability token valid</li> <li>Quota within limits</li> <li>Scope boundary check</li> <li>Rate-of-change flag</li> <li>Execute or quarantine</li> </ul> </div> </div> <div class="gate-arrow">β†’ EXECUTE<br><br>or<br><br>β†’ QUARANTINE</div> </div> <div class="section-body" style="margin-top:16px;"> <p>Quarantined events feed the learning pipeline. Failed events are the system's contact with realism under pressure β€” the formal grit formation relation: <strong>G = g(P, Rc, t)</strong>. The learning pipeline converts quarantine data into sharpened validators without mutating core invariants. The system densifies through accumulated failure memory.</p> </div> </div> <!-- LAYER 4: RESONANCE CONTROLLER --> <div class="section"> <div class="section-head"> <span class="section-num">Β§ 4</span> <span class="section-title">Resonance Controller β€” Feedback Loop</span> <span class="section-subtitle">Self-Regulatory Layer</span> </div> <div class="section-body"> <p>The Resonance Controller monitors Rn continuously and triggers adaptive responses when coherence degrades. It does not modify core HIR invariants β€” those are immutable. It adjusts operational parameters: thresholds, routing, rate limits, and repair triggers. This is the engineering form of the restorative coupling equations: weakening one term stresses the system but does not destroy it; corrective energy routes toward the degraded axis.</p> </div> <div class="tiers"> <div class="tier tier-0"> <div class="tier-header"> <span class="tier-num">Tier 0</span> <span class="tier-label">Nominal</span> <span class="tier-rn">Rn β‰₯ 0.85</span> </div> <ul class="tier-items"> <li>No intervention required</li> <li>Continuous monitoring active</li> </ul> </div> <div class="tier tier-1"> <div class="tier-header"> <span class="tier-num">Tier 1</span> <span class="tier-label">Degraded</span> <span class="tier-rn">0.65 ≀ Rn &lt; 0.85</span> </div> <ul class="tier-items"> <li>Tighten rate limits 20% on highest-violation principals</li> <li>Increase freshness window strictness</li> <li>Route non-critical traffic to degraded handlers</li> <li>Alert on-call: informational</li> </ul> </div> <div class="tier tier-2"> <div class="tier-header"> <span class="tier-num">Tier 2</span> <span class="tier-label">Stressed</span> <span class="tier-rn">0.40 ≀ Rn &lt; 0.65</span> </div> <ul class="tier-items"> <li>Engage circuit breakers on affected boundaries</li> <li>Pause non-essential inbound adapters</li> <li>Trigger Saga compensations for in-flight ops</li> <li>Human review required before rule auto-updates</li> <li>Alert on-call: urgent</li> </ul> </div> <div class="tier tier-3"> <div class="tier-header"> <span class="tier-num">Tier 3</span> <span class="tier-label">Critical</span> <span class="tier-rn">Rn &lt; 0.40</span> </div> <ul class="tier-items"> <li>Safe mode: reject all writes, reads only with full provenance</li> <li>All pending operations quarantined pending human review</li> <li>Rollback to last known-good invariant bundle</li> <li>No automated recovery without human approval</li> <li>Alert on-call: emergency</li> </ul> </div> </div> </div> <!-- LAYER 5: MINIMAL FLOW --> <div class="section"> <div class="section-head"> <span class="section-num">Β§ 5</span> <span class="section-title">Canonical Event Flow</span> <span class="section-subtitle">Minimal Lifecycle</span> </div> <div class="flow"> <div class="flow-step"> <div class="flow-n">1</div> <div class="flow-content"><strong>Event arrives at API Gateway.</strong> TLS termination, mTLS peer verification, actor identity established. Trace ID injected.</div> </div> <div class="flow-step"> <div class="flow-n">2</div> <div class="flow-content"><strong>Diamond Gate β€” Stage H:</strong> signature βœ“ Β· hash chain βœ“ Β· schema βœ“ Β· freshness βœ“ Β· lineage βœ“. Verified provenance envelope attached.</div> </div> <div class="flow-step"> <div class="flow-n">3</div> <div class="flow-content"><strong>Diamond Gate β€” Stage I:</strong> OPA invariants βœ“ Β· state machine guard βœ“ Β· idempotency key βœ“ Β· preconditions βœ“. Compensating transaction registered.</div> </div> <div class="flow-step"> <div class="flow-n">4</div> <div class="flow-content"><strong>Diamond Gate β€” Stage R:</strong> capability token βœ“ Β· quota βœ“ Β· scope βœ“. Execute or quarantine decided.</div> </div> <div class="flow-step"> <div class="flow-n">5a</div> <div class="flow-content"><strong>PASS β†’</strong> Route to hexagonal module. Input adapter deserialization. Core domain executes pure business logic. Output adapter signs and emits event. State mutation + event emission committed atomically via outbox pattern.</div> </div> <div class="flow-step"> <div class="flow-n">5b</div> <div class="flow-content"><strong>FAIL β†’</strong> Emit typed violation event to dead-letter topic. Log to Provenance Service (signed). Return structured error to caller. Saga rollback triggered if in-flight. Quarantine record created.</div> </div> <div class="flow-step"> <div class="flow-n">6</div> <div class="flow-content"><strong>Resonance Controller</strong> ingests gate metrics, rollback events, quota signals. Computes Rn[t] update. Adjusts thresholds, routing, rate limits. Triggers repair workflows at appropriate tier.</div> </div> <div class="flow-step"> <div class="flow-n">7</div> <div class="flow-content"><strong>Learning Pipeline (async):</strong> Quarantine β†’ pattern analysis β†’ rule proposals. Human review β†’ approval β†’ Git-ops deploy. Core invariants require two-person approval. No learning pipeline output pollutes the HIR kernel.</div> </div> </div> </div> <!-- WHAT THIS BUYS --> <div class="section"> <div class="section-head"> <span class="section-num">Β§ 6</span> <span class="section-title">What This Architecture Buys</span> <span class="section-subtitle">Properties Guaranteed</span> </div> <div class="benefits"> <div class="benefit"> <div class="benefit-title">Coherence Under Change</div> <div class="benefit-body">Hexagonal boundaries absorb environmental volatility. HIR kernel and domain cores remain stable as delivery mechanisms change around them. Axiom 1 in operational form.</div> </div> <div class="benefit"> <div class="benefit-title">Low Drift</div> <div class="benefit-body">Hash-chained logs make drift visible before it becomes catastrophic. OPA invariant bundles catch violations at write time, not at incident post-mortem time.</div> </div> <div class="benefit"> <div class="benefit-title">Safe Interaction</div> <div class="benefit-body">No component can exceed declared authority. Blast radius is bounded by capability tokens and quotas β€” by design, not by optimism.</div> </div> <div class="benefit"> <div class="benefit-title">Continuous Improvement</div> <div class="benefit-body">Quarantined events accumulate as the system's contact with realism under pressure β€” G = g(P, Rc, t). The system earns density without mutating its core invariants.</div> </div> <div class="benefit"> <div class="benefit-title">Regenerative, Not Brittle</div> <div class="benefit-body">Stress β‰  annihilation. Per the corrected HIR architecture, one degraded axis does not collapse the whole. Corrective energy routes toward the weakened term via the Controller.</div> </div> <div class="benefit"> <div class="benefit-title">Baseline-Setting Propagation</div> <div class="benefit-body">Dense, high-Rn modules set the coherence floor for neighbors. B_local = b(S_core). A well-behaved service raises the effective standards of everything around it.</div> </div> </div> </div> <!-- AXIOM MAPPING --> <div class="section"> <div class="section-head"> <span class="section-num">Β§ 7</span> <span class="section-title">Primordial Axioms as Engineering Constraints</span> <span class="section-subtitle">From HIR Side Packet β€” v3</span> </div> <table class="axiom-table"> <thead> <tr><th>Axiom</th><th>Framework Statement</th><th>Engineering Constraint</th></tr> </thead> <tbody> <tr> <td>1 β€” Self-Maintenance</td> <td>Must preserve identity under pressure</td> <td>Rn controller maintains coherence without core invariant mutation</td> </tr> <tr> <td>2 β€” Non-Degeneracy</td> <td>Cannot depend on corruption to persist</td> <td>No component bypasses gate checks; no silent failures permitted</td> </tr> <tr> <td>3 β€” Propagation</td> <td>Must generate compatible structures</td> <td>Hexagonal interfaces propagate HIR contract requirements to all consumers</td> </tr> <tr> <td>4 β€” Attraction</td> <td>Tendency toward relation and coherence</td> <td>B_local baseline-setting pulls neighboring components toward higher F, C</td> </tr> <tr> <td>5 β€” Resonance</td> <td>Provides organizing conditions for stable emergence</td> <td>Rn is the primary health signal, not latency or throughput alone</td> </tr> <tr> <td>6 β€” Scale Invariance</td> <td>Structurally valid across scales and domains</td> <td>HIR kernel applies at process, service, cluster, and inter-system levels identically</td> </tr> </tbody> </table> </div> <!-- FOOTER --> <div class="footer"> <div class="footer-left">Primordial Calculus β€” Applied Engineering Specification v1.0</div> <div class="footer-right">Created and Developed by Collin D. Weber</div> </div> </div> </body> </html>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>HIR-Informed Architecture β€” Primordial Calculus</title>
<style>
@import url('https://fonts.googleapis.com/css2?family=EB+Garamond:ital,wght@0,400;0,500;0,600;1,400;1,500&family=Cormorant+Garamond:ital,wght@0,300;0,400;0,600;1,300;1,400&family=Source+Code+Pro:wght@300;400;500&display=swap');
:root {
--page: #F2EBDD;
--accent: #794626;
--text: #222222;
--bark: #4F3826;
--amber: #C48A3A;
--cream: #EAE0CC;
--rule: #794626;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
background: #D9D0BF;
font-family: 'EB Garamond', Georgia, serif;
color: var(--text);
min-height: 100vh;
padding: 40px 20px;
}
.page {
background: var(--page);
max-width: 960px;
margin: 0 auto;
padding: 64px 80px;
border: 1.5px solid var(--accent);
position: relative;
box-shadow: 4px 4px 0 #B8A98A, 8px 8px 0 rgba(0,0,0,0.08);
}
.page::before {
content: '';
position: absolute;
inset: 8px;
border: 0.5px solid var(--amber);
pointer-events: none;
}
/* ── HEADER ─────────────────────────────────────── */
.header {
text-align: center;
padding-bottom: 40px;
margin-bottom: 48px;
border-bottom: 1.5px solid var(--accent);
}
.overline {
font-family: 'Source Code Pro', monospace;
font-size: 9px;
letter-spacing: 0.22em;
text-transform: uppercase;
color: var(--amber);
margin-bottom: 14px;
}
.title {
font-family: 'Cormorant Garamond', serif;
font-size: 42px;
font-weight: 300;
letter-spacing: 0.04em;
color: var(--bark);
line-height: 1.1;
margin-bottom: 6px;
}
.subtitle {
font-family: 'Cormorant Garamond', serif;
font-size: 18px;
font-weight: 400;
font-style: italic;
color: var(--accent);
margin-bottom: 20px;
}
.authorship {
font-family: 'Source Code Pro', monospace;
font-size: 9px;
letter-spacing: 0.18em;
text-transform: uppercase;
color: var(--bark);
}
/* ── EPIGRAPH ────────────────────────────────────── */
.epigraph {
background: var(--cream);
border-left: 2.5px solid var(--amber);
padding: 20px 28px;
margin-bottom: 48px;
font-style: italic;
font-size: 15px;
line-height: 1.7;