File size: 35,946 Bytes
27ba41e | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 | <!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) S_core = s(H, I, R, Rn, G) 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 < 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 < 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 < 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>
|