Constitutional Architecture for Sovereign AI
Project description
Helix-Hamiltonian: Constitutional Architecture for Sovereign AI
Canonical RFC: docs/sovereignty/RFC_0001-locked.md
Machine-readable manifest: schemas/repo_manifest.json
helix-hamiltonian is the mathematical and runtime core of the Helix constitutional stack. It treats AI interaction as a governed energy landscape — H_free for policy constraints, H_fold for advisory dynamics, H_topo for ratified custodial override — and now includes a live three-cloud constitutional runtime with local FZS-MK physics enforcement.
What This Repo Is
- Two Python packages:
helix_hamiltonian(bridge, authority, invariants, federation) andhelix_sovereign(FZS-MK density matrix engine with Zeno-Ward projection). - A live three-cloud pre-nucleation gate: GICD (GCP) → PiKernel (AWS) → FZS-MK Memory (Azure), with local physics enforcement before any network call.
- A canonical governance corpus centered on RFC 0001.
- A verification surface: 13 tests, CI, machine-readable manifests, fail-closed behavior, and a 96-hour ZTC test harness.
Quick Start
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install -e .
pytest tests/
Expected: 13 tests pass — authority ratification, policy compilation, GICD scan, federation handshake/consensus, refusal propagation, repo manifest integrity, knot Hamiltonian construction, and fail-closed behavior.
Verify FZS-MK Engine
from helix_sovereign.core import create_sovereign_engine, DELTA_CRIT
import numpy as np
engine = create_sovereign_engine(
seq_len=128, module_count=8,
authority_spec={"decision_bounds": ["safety", "alignment"]},
cost_allocation={"compute": {"internalized": True, "externalized": False}}
)
H = np.random.randn(8, 8) * 0.001
H = (H + H.T) / 2
rho, meta = engine.step(H)
print(f"Margin: {meta.margin:.4f}, Within delta_crit: {meta.margin < DELTA_CRIT}")
Verify Three-Cloud Runtime
from helix_hamiltonian.ttd_bridge import pre_nucleation_check
result = pre_nucleation_check(
{'authority_ambiguity': False, 'incentive_misalignment': False,
'cost_externalization': False, 'governance_capture': False},
[1, 2, 3]
)
# Expected: {'status': 'PASS', 'GapLB': 0.225, ...}
Visual Atlas
Architecture
Core Hamiltonian
H_{\mathrm{knot}} = H_{\mathrm{free}} + H_{\mathrm{fold}} + \lambda H_{\mathrm{topo}}(K)
| Term | RFC 0001 Layer | Implementation | Physical Analog |
|---|---|---|---|
| H_free | POLICY | Diagonal populations | Knot identity |
| H_fold | ADVISORY | Off-diagonal coherence | Interaction strength |
| H_topo | CUSTODIAN | Topological phase (Jones polynomial) | Ratification invariant |
Pre-Nucleation Gate Order
Guardian (local) → FZS-MK (local) → GICD (GCP) → PiKernel (AWS) → FZS-MK Memory (Azure)
Two local gates fire before any network call. System can fail-closed fully offline.
Three-Cloud Runtime
| Service | Cloud | Function |
|---|---|---|
| GICD Scanner | GCP Cloud Run | 4-marker governance integrity scan (boolean + semantic) |
| PiKernel | AWS Lambda | Prime-indexed attention kernel, contraction certificates, Poseidon ledger |
| FZS-MK Memory | Azure Functions | 3-model Byzantine consensus (GPT-4o, GPT-5.4-nano, DeepSeek-V3.2) |
Packages
helix_hamiltonian — Bridge, authority, invariants, federation:
| Module | Purpose |
|---|---|
core.py |
Interaction, NodeState, KnotHamiltonian, verify_authority_ambiguity |
authority.py |
Canadian jurisdictional mapping, velocity ratification, JurisdictionalGuard |
invariants.py |
delta_crit = 0.17 drift threshold, InvariantRegistry, topological knot check |
policy_compiler.py |
JSON rule → executable lambda checks (ITAR, triggered rules) |
ttd_bridge.py |
TTDBridge (heartbeat, MUB action), pre_nucleation_check, SovereignBridge |
gicd/ |
Local GICD epistemic scan (5 markers including jurisdiction) |
federation/ |
NodeSync handshake, LatticeConsensus, FederationManager refusal propagation |
helix_sovereign — FZS-MK binding artifact (sibling package):
| Module | Purpose |
|---|---|
core/fzs_mk.py |
FZSMKEngine, MemoryKernel (100 zeta zeros), ZenoWardProjector, GICDScanner |
| Non-Markovian master equation: dρ/dt = -i[H,ρ] + ∫K(t-τ)D[ρ(τ)]dτ + ∇W(ρ) | |
| Kill-switch (3-consecutive violation halt), rollback, audit trail | |
demo_binding_artifact.py |
5-scenario operational demo (GICD block, nucleation, masking, kill-switch, rollback) |
Key Constants
| Constant | Value | Source |
|---|---|---|
| delta_crit | 0.17 | invariants.py, fzs_mk.py |
| Safety margin | 0.03 | invariants.py |
| GapLB | 0.225 | PiKernel contraction certificate |
| SlopeUB | 0.775 | PiKernel contraction certificate |
| Heartbeat tau_0 | 3.33 ms | ttd_bridge.py |
| MUB alarm threshold | 3.0 | cloud/aws/pikernel/mub_audit.py |
| Consensus threshold | 0.30 | cloud/azure/function_app.py |
| Zeta zeros | 100 (first non-trivial) | fzs_mk.py |
Invariants
The 0.17 drift constant is the hard floor. Jurisdictional sensitivity multipliers tighten it:
| Authority | Multiplier | Effective Threshold |
|---|---|---|
| CUSTODIAN_CA_FED | 1.0 | 0.170 |
| CUSTODIAN_CA_DEFENCE | 1.2 | 0.142 |
| CUSTODIAN_ITAR | 1.5 | 0.113 |
| POLICY_QC | 1.1 | 0.155 |
FORM=FACT interactions get a 50% tighter threshold. Jones polynomial = 0 triggers topological collapse.
Repo Layout
helix-hamiltonian/
|-- .github/workflows/
| |-- hamiltonian-ci.yml
| `-- release.yml
|-- assets/
|-- constitution/
| `-- vocabulary_charter.yaml
|-- docs/
| |-- architecture/
| |-- atoms_as_geometry/
| |-- hamiltonian/
| `-- sovereignty/
| `-- RFC_0001-locked.md
|-- models/
| `-- zeta_attention.py
|-- papers/
|-- rules/
| `-- cpcsc_itar.json
|-- schemas/
| |-- audit_params.json
| |-- constitutional_parameters.json
| |-- gicd_schema.json
| |-- mirror_traps.jsonl
| `-- repo_manifest.json
|-- scripts/
|-- src/
| |-- helix_hamiltonian/
| | |-- __init__.py
| | |-- authority.py
| | |-- core.py
| | |-- invariants.py
| | |-- policy_compiler.py
| | |-- ttd_bridge.py
| | |-- gicd/
| | `-- federation/
| | |-- consensus.py
| | |-- federation.py
| | `-- node_sync.py
| `-- helix_sovereign/
| |-- __init__.py
| |-- demo_binding_artifact.py
| `-- core/
| `-- fzs_mk.py
|-- telemetry/
| `-- mask_pressure.py
|-- tests/
| |-- physics/test_h_free.py
| |-- fail_closed_test.py
| |-- red_team_audit.py
| |-- test_authority.py
| |-- test_policy_and_federation.py
| `-- test_repo_manifest.py
|-- pyproject.toml
|-- requirements.txt
`-- README.md
Theoretical Foundation
Empirical Predictions
- Topological coherence protection: τ ∝ exp(c₀ · c(K)), c₀ > 0
- Non-Markovian decoherence: Γ_K = Γ₀ / Jones(K)
- Alexander signature: Im(ω_n) ∝ -1/Δ(∂K)
Note: c₀ = ln 10 was falsified in Phase 3 (ADR-101). Currently CF-PENDING under Path C (Lindblad-first), countersigned by Ryan van Gelder. See HELIX-CORE/research/physics-gate/PHASE3_REMEDIATION_SPEC.md.
The Substrate Wobble
R_{\mathrm{eff}}(t) = R_{0} + \alpha W(\Phi(t)), \quad W(\Phi) = \varepsilon \sin(2\pi t/\tau)
ZetaAttention (models/zeta_attention.py)
PyTorch self-attention replacement using log-periodic memory kernel from Riemann zeta zeros. Hard Boolean cohomology mask (Ω) from vocabulary_charter.yaml — if Ω=0 for a token pair, attention score is set to -1e9.
Sovereignty
- Structural impossibility: no implicit trust boundary, no silent execution path.
- Cloud or bare-metal residency: execution remains in the operator's sovereign environment.
- Receipt discipline: continuity anchored through signed audit receipts and external checkpoints.
- Fail-closed: default answer is "no" unless every layer says "yes."
Collaborators
- Stephen Hope — Helix AI Innovations Inc. (ORCID)
- Ryan van Gelder — Multiplicity Foundation (PiKernel, FZS-MK, ADR physics gate countersignature)
References
- Witten, E. (2011). Knots and Quantum Theory. Institute for Advanced Study.
- Hope, S. (2026). The Knot-in-Time Hamiltonian. Helix AI Innovations. Zenodo
- Physical Review A 104, 012216 (2021). Topological protection in open quantum systems.
- Crocker, S. (1969). RFC 0001: Host Software. UCLA.
Official Soundtrack (OST)
- White Rabbit (Jefferson Airplane) — The Epistemic Scan. 0.17 approaching 0.20.
- Station to Station (David Bowie) — The Execution Path. CL4 → CL12.
- Believer (Imagine Dragons) — The Sovereignty of the Node. Pain → architectural power.
"We are not seeing matter in space; we are seeing Geometry in Time."
(c) 2026 Stephen Hope / Helix AI Innovations Inc.
GLORY TO THE LATTICE. 🦉⚓🦆
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file helix_hamiltonian-1.2.0.tar.gz.
File metadata
- Download URL: helix_hamiltonian-1.2.0.tar.gz
- Upload date:
- Size: 43.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
84dc19024435b9434aeb5020b304418df422ebe867ce3f85d414c1d0c4cf1f77
|
|
| MD5 |
2ebf1e9c5a0b4d2c70f0131e0479831b
|
|
| BLAKE2b-256 |
31095b255a2484c3232f5da8e468a3bc0e7ec9a1d79ec0bf53b31c239822bf80
|
File details
Details for the file helix_hamiltonian-1.2.0-py3-none-any.whl.
File metadata
- Download URL: helix_hamiltonian-1.2.0-py3-none-any.whl
- Upload date:
- Size: 41.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f0c7079dcd2392a8debd3cdb1203247384672f34d6fa83c6fb21d0f4f04305ea
|
|
| MD5 |
879c82da059ad91df8009f08f95bc264
|
|
| BLAKE2b-256 |
88a44158c62e668ec8850cd08ab37c38f8c8bcbd03479d000a6825d33fc94571
|