diff --git a/docs/milestone-1-spec.md b/docs/milestone-1-spec.md index ea1b86e..33b34c6 100644 --- a/docs/milestone-1-spec.md +++ b/docs/milestone-1-spec.md @@ -1,7 +1,9 @@ # Specification: Milestone 1 — Atlas Bootstrap Seed (`ATLAS_BOOT`) + > [!NOTE] > **Lineage & Provenance Note:** *Formerly designated Alpha (`alpha.bin`) during early lineage bootstrap drafting. Every prior architectural responsibility and contract of ALPHA transfers to ATLAS unchanged.* + ## Problem Statement @@ -82,7 +84,7 @@ Verification is formally separated into two distinct, decoupled seams: ### Seam 1: Independent Artifact-Audit Seam Operates on the static artifact `atlas.bin` and supporting ledgers without requiring machine execution: -- **Byte Accounting & Reachability:** Every reachable instruction and byte from entry to terminal points must be mapped to an entry in `alpha.decode` and `alpha.audit`. +- **Byte Accounting & Reachability:** Every reachable instruction and byte from entry to terminal points must be mapped to an entry in `atlas.decode` and `atlas.audit`. - **Control-Flow Graph Verification:** All branch targets must resolve within declared executable memory bounds with no indirect jumps to unverified addresses. - **Memory Access Bounds:** Validates that every read/write operation is statically constrained within the designated scratchpad RAM or payload address windows. - **Artifact-Ledger Co-evolution:** For each specific `atlas.bin`, its decode ledger, CFG, and audit log must agree. Instruction ordering may evolve across iterations as long as the artifact and ledger update together. diff --git a/doctrine/ARCHITECTURE.md b/doctrine/ARCHITECTURE.md index 704096c..4b9f309 100644 --- a/doctrine/ARCHITECTURE.md +++ b/doctrine/ARCHITECTURE.md @@ -26,10 +26,10 @@ All computation within the Sovereign Machine flows through an unyielding, unidir │ Raw Hardware Reset ▼ ┌────────────────────────────────────────────────────────┐ - │ ALPHA │ + │ ATLAS │ │ (The Irreducible Bootstrap Seed) │ └───────────────────────────┬────────────────────────────┘ - │ Monotonic Handoff (EL1) + │ Monotonic Handoff (contract-defined EL) ▼ ┌────────────────────────────────────────────────────────┐ │ PHYSICS │ @@ -50,7 +50,7 @@ All computation within the Sovereign Machine flows through an unyielding, unidir ``` 1. **SILICON / UNAVOIDABLE FIRMWARE**: The immutable physical reality of transistor gates, crystal oscillators, package interconnects, and non-volatile manufacturer boot ROMs. It provides the bare electrical state. -2. **ATLAS**: The irreducible software root artifact (formerly designated Alpha in early bootstrap drafts). A single, auditable, immutable binary (`atlas.bin`) that awakens the silicon, establishes architectural hygiene, verifies the secondary boot stage, and immediately relinquishes control. +2. **ATLAS**: The irreducible software root artifact. A single, auditable, immutable binary (`atlas.bin`) that awakens the silicon, establishes architectural hygiene, verifies the secondary boot stage, and immediately relinquishes control. 3. **PHYSICS**: The sovereign governor and authority membrane. A bare-metal, capability-based physical supervisor operating at privileged CPU exception levels (AArch64 EL1/EL2). It enforces memory ownership, DMA boundaries, hardware traps, and the outbound effect membrane (AEGIS). 4. **OMEGA**: The semantic calculus and living realization substrate. It decouples computational meaning from physical representation, synthesizing optimal machine code directly onto bare silicon and accelerator execution pipelines in response to mathematical invariant requests. 5. **AIEN**: The sovereign cognitive intelligence. Residing primarily within high-bandwidth accelerator memory, Aien parses human intention, maintains continuous associative world-models in Cortex, reasons across possibility spaces, and commands transformations through verified effect brokers. @@ -68,7 +68,7 @@ $$\begin{aligned} \mathbf{AIEN\ OBSERVES,\ THINKS,\ HYPOTHESIZES,\ SEARCHES,\ DISCOVERS,\ AND\ INVENTS.} &\quad \text{Autonomous discovery intelligence builds its own science of reality.} \end{aligned}$$ -No layer may perform the duty of another. Aien cannot authorize effects; Physics cannot reason about semantic intent; Omega cannot violate physical memory bounds; Alpha cannot remain active after handoff. +No layer may perform the duty of another. Aien cannot authorize effects; Physics cannot reason about semantic intent; Omega cannot violate physical memory bounds; Atlas cannot remain active after handoff. --- @@ -128,7 +128,7 @@ Where: │ - Machine Graph (G_M) - Direct Bare-Metal Code Synthesis │ ├────────────────────────────────────────────────────────────────────────────────────────┤ │ 2. PHYSICS — THE TRUSTED PHYSICAL GOVERNOR │ -│ - AArch64 EL1 Supervisor - Hardware Capability System │ +│ - AArch64 EL1/EL2 Supervisor - Hardware Capability System │ │ - SMMUv3 DMA Confinement - AEGIS Outbound Effect Membrane │ │ - Coherent Memory Ring Dispatch - Monotonic State Invariant Enforcement │ ├────────────────────────────────────────────────────────────────────────────────────────┤ @@ -138,10 +138,10 @@ Where: └────────────────────────────────────────────────────────────────────────────────────────┘ ``` -### 2.1 Layer 1: Alpha (The Irreducible Bootstrap Seed) -* **Ontological Role:** Alpha is the genesis seed. It awakens the bare processor from cold silicon reset, guarantees architectural hygiene, configures base page tables, validates the physical environment, verifies the cryptographic hash of Physics, and executes an irreversible jump. -* **Canonical Invariant:** Alpha is immutable, auditable, deterministic, non-intelligent, and minimal. Its entire footprint is measured in kilobytes. It possesses no dynamic memory allocator, no file systems, no network drivers, and no speculative execution pathways. -* **Handoff:** Alpha transitions CPU execution monotonically to Physics at EL1/EL2, locks the reset vector registers, and completely terminates. It leaves zero running background processes or Resident Monitor code. +### 2.1 Layer 1: Atlas (The Irreducible Bootstrap Seed) +* **Ontological Role:** Atlas is the genesis seed. It awakens the bare processor from cold silicon reset, guarantees architectural hygiene, configures base page tables, validates the physical environment, verifies the cryptographic hash of Physics, and executes an irreversible jump. +* **Canonical Invariant:** Atlas is immutable, auditable, deterministic, non-intelligent, and minimal. Its entire footprint is measured in kilobytes. It possesses no dynamic memory allocator, no file systems, no network drivers, and no speculative execution pathways. +* **Handoff:** Atlas transitions CPU execution monotonically to Physics at the exception level declared by the machine contract (EL1 or EL2, with no implicit EL2 -> EL1 transition), locks the reset vector registers, and completely terminates. It leaves zero running background processes or Resident Monitor code. ### 2.2 Layer 2: Physics (The Trusted Physical Governor) * **Ontological Role:** Physics is the deterministic governor of the machine. It enforces physical laws upon execution: space, time, authority, and side effects. @@ -194,7 +194,7 @@ The Sovereign Machine breaks with legacy symmetric computing and traditional cop │ AArch64 CPU HOST │ │ BLACKWELL / HOPPER │ │ "Trusted Physical Governor" │ │ ACCELERATOR ENGINE │ │ │ │ "Residence of Cognition" │ -│ - Runs Physics at EL1 │ │ - Runs Aien Core Mind │ +│ - Runs Physics at contract EL │ │ - Runs Aien Core Mind │ │ - Owns Platform MMU & SMMUv3 │ │ - Full HBM Resident Weights │ │ - Hardware Watchdogs & Safety │ │ - Persistent Unified KV Pool │ │ - Gatekeeper of AEGIS Effects │ │ - Autonomous Tensor Pipeline │ @@ -204,7 +204,7 @@ The Sovereign Machine breaks with legacy symmetric computing and traditional cop ### 3.1 The CPU: Trusted Physical Governor * The CPU is not the computational workhorse; it is the **Governor**. -* It runs the bare-metal **Physics** kernel at highest execution privilege (EL1). +* It runs the bare-metal **Physics** kernel at the privileged exception level declared by the machine contract (EL1 or EL2; the current QEMU contract `CONTRACT-QEMU-VIRT-AARCH64-M2` specifies EL1). * It holds exclusive authority over interrupt dispatch, physical timer registers, hardware security modules (TPM/HSM), bus configuration, and peripheral controllers (NVMe, Network PHY). * It monitors the accelerator through non-maskable hardware watchdogs. If the accelerator diverges, hangs, or violates memory boundaries, the CPU resets the accelerator fabric and restores verified cognitive snapshots. @@ -225,161 +225,9 @@ The Sovereign Machine breaks with legacy symmetric computing and traditional cop --- -## 4. The 28-Milestone Execution Roadmap & Workstreams A–F +## 4. The Sovereign Roadmap -The construction of the Sovereign Machine is organized into **six concurrent workstreams (A through F)** spanning **twenty-eight precise milestones (0 through 27)**. - -```text -WORKSTREAMS: - [A] Bootstrap & Hardware Sovereignty (Milestones 0, 1, 6, 12, 18, 24) - [B] Physics & Capability Authority (Milestones 2, 7, 13, 19, 25) - [C] Omega Language & Living Engine (Milestones 3, 8, 14, 20, 26) - [D] Accelerator & Native Compute (Milestones 4, 9, 15, 21) - [E] Cognitive Substrate & Cortex (Milestones 5, 10, 16, 22, 27) - [F] Verification & Formal Closure (Milestones 11, 17, 23) -``` - -```mermaid -flowchart TD - M0["M0: DOCTRINE_V1"] --> M1["M1: ATLAS_BAREMETAL_BOOT"] - M0 --> M2["M2: PHYSICS_CORE_MEMBRANE"] - M0 --> M3["M3: OMEGA_CALCULUS_G_S"] - M0 --> M4["M4: ACCEL_C2C_COHERENCE"] - M0 --> M5["M5: AIEN_SEED_TOPOLOGY"] - - M1 --> M6["M6: ATLAS_MEASUREMENT_CHAIN"] - M2 --> M7["M7: PHYSICS_DMA_CONFINEMENT"] - M3 --> M8["M8: OMEGA_AARCH64_SYNTHESIS"] - M4 --> M9["M9: ACCEL_TENSOR_DISPATCH"] - M5 --> M10["M10: CORTEX_ZERO_COPY_STORE"] - - M6 & M7 & M8 & M9 & M10 --> M11["M11: SENTINEL_GATE_1"] - - M11 --> M12["M12: ATLAS_STAGE2_ELIMINATION"] - M11 --> M13["M13: PHYSICS_EFFECT_BROKER"] - M11 --> M14["M14: OMEGA_LIVING_MATVEC"] - M11 --> M15["M15: ACCEL_BLACKWELL_NATIVE"] - M11 --> M16["M16: AIEN_RESIDENT_KV_POOL"] - - M12 & M13 & M14 & M15 & M16 --> M17["M17: SENTINEL_GATE_2"] - - M17 --> M18["M18: SOVEREIGN_TOOLCHAIN_GEN1"] - M17 --> M19["M19: PHYSICS_MULTI_TENANT_ISOLATION"] - M17 --> M20["M20: OMEGA_POLYMORPHIC_SYNTHESIS"] - M17 --> M21["M21: ACCEL_AUTONOMOUS_SCHEDULE"] - M17 --> M22["M22: AIEN_SEED_TRAINING"] - - M18 & M19 & M20 & M21 & M22 --> M23["M23: SENTINEL_GATE_3"] - - M23 --> M24["M24: SOVEREIGN_HARDWARE_BOOT_FINAL"] - M23 --> M25["M25: PHYSICS_COMPLETE_GOVERNANCE"] - M23 --> M26["M26: OMEGA_TOTAL_CALCULUS"] - M24 & M25 & M26 --> M27["M27: SOVEREIGN_MACHINE_CLOSURE"] -``` - -### 4.1 Master Milestone Specification (0 through 40) - -```text -FOUNDATIONAL ERA (M0 - M3) - M0: DOCTRINE_V1 Canonical architecture codified & ratified. [COMPLETE] - M1: ATLAS_BOOT Irreducible bootstrap seed (atlas.bin). [COMPLETE / QEMU QUALIFIED] - M2: PHYSICS_BOOT Physical machine authority nucleus (physics.bin). [REOPENED / IN PROGRESS] - M3: PHYSICS_EFFECTS Capabilities, effect admission, and signed receipts. - -OMEGA CORE SUBSTRATE (M4 - M7) - M4: OMEGA_SEMANTICS Semantic object model, types, and identity. - M5: OMEGA_AARCH64 Native AArch64 realization generator (no LLVM). - M6: OMEGA_SELF_HOST Omega reproduces minimal realization compiler. - M7: OMEGA_VERIFY V0-V2 mandatory verification; V3-V5 framework. - -PROGRAM SYNTHESIS & LIBRARY LEARNING (M8 - M14) - M8: OMEGA_PROGRAM_CORE Synthesis tasks, cost models, program IDs. - M9: OMEGA_SYNTHESIS_V0 Deterministic typed program synthesis. - M10: OMEGA_LIBRARY_V1 Versioned procedural library and catalog. - M11: OMEGA_LIBRARY_DISCOVERY Abstraction discovery from program corpus. - M12: OMEGA_LIVING_MATVEC Adaptive multi-target realization selection. - M13: OMEGA_MACHINE_GRAPH Formal physical hardware topology graph. - M14: OMEGA_REALIZATION_SYNTHESIS Automated G_S x G_M -> G_R synthesis. - -ACCELERATOR COGNITION SUBSTRATE (M15 - M19) - M15: PHYSICS_ACCELERATOR_LINK Bounded coherent CPU/GPU memory interface. - M16: BLACKWELL_NATIVE_PATH_KNOWN Empirical hardware execution characterization. - M17: OMEGA_BLACKWELL_VECTOR Verified Blackwell vector compute realization. - M18: OMEGA_BLACKWELL_MATMUL Verified Blackwell tensor matrix multiplication. - M19: OMEGA_ACCELERATOR_RESIDENT Persistent GPU-resident execution substrate. - -SOVEREIGN TRAINING RUNTIME (M20 - M26) - M20: OMEGA_TENSOR Tensor semantics, strides, shapes, and types. - M21: OMEGA_AUTODIFF Sovereign automatic differentiation engine. - M22: OMEGA_OPTIMIZER SGD / Adam / AdamW verified realizations. - M23: OMEGA_SEARCH_GUIDE_TRAINING First search guide trained on Omega traces. - M24: AIEN_0 First sovereign neural guide ranking subgoals. - M25: AIEN_GUIDED_SYNTHESIS Neural-guided synthesis with verified parity. - M26: AIEN_ABSTRACTION_DISCOVERY AIEN proposes concepts; Omega validates survival. - -PHYSICS ZERO DISCOVERY ERA (M27 - M35) - M27: PHYSICS_ZERO_PROTOCOL Contamination firewall & sealed evaluation specs. - M28: PHYSICS_ZERO_HIDDEN_WORLDS Discrete & continuous sealed worlds (P0-0..P0-2). - M29: AIEN_THEORY_DISCOVERY OMEGA_THEORY population, competition, revision. - M30: AIEN_ACTIVE_EXPERIMENTATION Active distinguishing experiment formulation. - M31: AIEN_CONCEPT_FORMATION Latent concept discovery (OMEGA_DISCOVERED_CONCEPT). - M32: PHYSICS_ZERO_ALIEN_WORLDS Discovery on unfamiliar laws (P0-5). - M33: PHYSICS_ZERO_NOVEL_REGIME Extrapolation to unobserved state spaces. - M34: PHYSICS_ZERO_NOVEL_PHENOMENON Predictive discovery of unobserved phenomena. - M35: PHYSICS_ZERO_REAL_LAB Safe, capability-bounded physical lab discovery. - -GENERAL AIEN ERA (M36 - M40) - M36: AIEN_HUMAN_INTERFACE Perceptual adapter: Human Language <-> Omega. - M37: AIEN_RESIDENT Persistent accelerator-resident cognition. - M38: OMEGA_CONTINUAL_LIBRARY_LEARNING Continuous Wake/Solve/Verify/Sleep loop. - M39: AIEN_SCIENTIFIC_AUTONOMY Autonomous hypothesis, experiment, and theory cycle. - M40: AIEN_SUCCESSION AIEN-N proposes candidate AIEN-N+1. -``` - -| Milestone | Code Identifier | Scope & Objective Invariants | -| :--- | :--- | :--- | -| **M0** | `DOCTRINE_V1` | Foundational Specification. Ratification of complete architectural corpus. [COMPLETE] | -| **M1** | `ATLAS_BOOT` | Irreducible bootstrap seed (`atlas.bin`). Dual-seam verified. [COMPLETE / QEMU QUALIFIED] | -| **M2** | `PHYSICS_BOOT` | Physical machine authority nucleus (`physics.bin`). Current-EL VBAR, frame authority, CAP_ROOT. [REOPENED / IN PROGRESS] | -| **M3** | `PHYSICS_EFFECTS` | Capability ledger, monotonic attenuation, effect broker, signed execution receipts. | -| **M4** | `OMEGA_SEMANTICS` | Semantic graph ($G_S$), typed AST, invariant envelopes, substrate-independent identity. | -| **M5** | `OMEGA_AARCH64` | Native direct AArch64 machine byte realization generator (zero foreign compiler bloat). | -| **M6** | `OMEGA_SELF_HOST` | Omega reproduces the minimal realization compiler through its own semantic graph. | -| **M7** | `OMEGA_VERIFY` | Mandatory V0-V2 verification engine; V3-V5 proof-carrying code framework. | -| **M8** | `OMEGA_PROGRAM_CORE` | Explicit program representation, synthesis task schema, program cost modeling. | -| **M9** | `OMEGA_SYNTHESIS_V0` | Deterministic typed program synthesis over base primitives. | -| **M10** | `OMEGA_LIBRARY_V1` | Versioned procedural program library and verified component catalog. | -| **M11** | `OMEGA_LIBRARY_DISCOVERY` | Autonomous abstraction discovery from program corpus with verified reuse. | -| **M12** | `OMEGA_LIVING_MATVEC` | Autonomous adaptive kernel selection across varying input regimes and cache dynamics. | -| **M13** | `OMEGA_MACHINE_GRAPH` | Formal machine hardware graph ($G_M$) describing execution pipelines and memory hierarchies. | -| **M14** | `OMEGA_REALIZATION_SYNTHESIS`| Automated $G_S imes G_M o G_R$ synthesis targeting declared hardware capabilities. | -| **M15** | `PHYSICS_ACCELERATOR_LINK` | Bounded coherent CPU/accelerator memory interface and SMMUv3 DMA sandboxing. | -| **M16** | `BLACKWELL_NATIVE_PATH_KNOWN`| Empirical execution characterization of native Blackwell SM architecture. | -| **M17** | `OMEGA_BLACKWELL_VECTOR` | Verified Blackwell vector compute realization generated directly from $G_S$. | -| **M18** | `OMEGA_BLACKWELL_MATMUL` | Verified native Blackwell tensor matrix multiplication with tensor core acceleration. | -| **M19** | `OMEGA_ACCELERATOR_RESIDENT` | Persistent Omega execution substrate residing permanently in accelerator coherent memory. | -| **M20** | `OMEGA_TENSOR` | Tensor semantics, multi-dimensional array types, strides, and memory layouts. | -| **M21** | `OMEGA_AUTODIFF` | Sovereign automatic differentiation generating gradient semantic graphs. | -| **M22** | `OMEGA_OPTIMIZER` | Verified sovereign optimizer realizations (SGD, Adam, AdamW). | -| **M23** | `OMEGA_SEARCH_GUIDE_TRAINING`| Sovereign training pipeline for search guides using Omega-generated traces. | -| **M24** | `AIEN_0` | First sovereign neural search guide ranking subgoals and pruning search branches. | -| **M25** | `AIEN_GUIDED_SYNTHESIS` | Neural-guided synthesis achieving lower search cost under invariant verification parity. | -| **M26** | `AIEN_ABSTRACTION_DISCOVERY` | AIEN proposes candidate abstractions; Omega enforces survival based on utility. | -| **M27** | `PHYSICS_ZERO_PROTOCOL` | Contamination firewall specification and sealed evaluation benchmark contracts. | -| **M28** | `PHYSICS_ZERO_HIDDEN_WORLDS` | Discrete and continuous sealed benchmark worlds with randomized channels. | -| **M29** | `AIEN_THEORY_DISCOVERY` | Executable `OMEGA_THEORY` synthesis, population competition, and calibrated prediction. | -| **M30** | `AIEN_ACTIVE_EXPERIMENTATION`| Active experiment design distinguishing competing theories ($P(R|A) -eq P(R|B)$). | -| **M31** | `AIEN_CONCEPT_FORMATION` | Autonomous invention of reusable latent concepts (`OMEGA_DISCOVERED_CONCEPT`). | -| **M32** | `PHYSICS_ZERO_ALIEN_WORLDS` | Scientific discovery in universes governed by non-human, unfamiliar physical laws. | -| **M33** | `PHYSICS_ZERO_NOVEL_REGIME` | Extrapolative theory prediction in unobserved physical state regimes. | -| **M34** | `PHYSICS_ZERO_NOVEL_PHENOMENON`| Predictive discovery and experimental realization of unobserved physical phenomena. | -| **M35** | `PHYSICS_ZERO_REAL_LAB` | Capability-bounded, safety-governed autonomous discovery in physical laboratories. | -| **M36** | `AIEN_HUMAN_INTERFACE` | Bi-directional perceptual adapter mapping human natural language to Omega semantics. | -| **M37** | `AIEN_RESIDENT` | Persistent, high-throughput cognitive loop resident in accelerator HBM memory. | -| **M38** | `OMEGA_CONTINUAL_LIBRARY_LEARNING`| Continuous Wake/Solve/Verify/Sleep compounding loop. | -| **M39** | `AIEN_SCIENTIFIC_AUTONOMY` | Fully autonomous scientific discovery cycle: observe, hypothesize, test, discover. | -| **M40** | `AIEN_SUCCESSION` | Sovereign succession protocol: AIEN-N trains and proposes AIEN-N+1 candidate. | +Milestone numbering, code identifiers, and milestone status are maintained in exactly one place: **[`ROADMAP.md`](ROADMAP.md)** (the 41-milestone M0-M40 Sovereign Roadmap, including Physics Zero M27-M35 and General AIEN M36-M40). This document does not restate the roadmap table or milestone status. --- @@ -392,7 +240,7 @@ The Sovereign Machine enforces six non-negotiable architectural **Hard Stops**. 3. **No Foreign Weight Ingestion:** No black-box neural network checkpoints may be ingested into Aien without full cryptographic training provenance and dataset validation. 4. **No Bypass of Physics Governor:** Accelerator code may never directly manipulate system MMU tables, interrupt registers, or platform power states. 5. **No Undefined Precision Divergence:** Invariant verification failure: if an Omega realization produces numerical error exceeding the defined semantic envelope ($\hat{\epsilon} > \epsilon$), execution halts immediately. -6. **No Non-Deterministic Bootstrap:** If Alpha experiences an unexpected state transition, branching anomaly, or hash mismatch, the system enters an unrecoverable low-power lock state. +6. **No Non-Deterministic Bootstrap:** If Atlas experiences an unexpected state transition, branching anomaly, or hash mismatch, the system enters an unrecoverable low-power lock state. ### 5.2 Performance Philosophy The performance doctrine is governed by **Mechanical Sympathy**: @@ -426,8 +274,8 @@ The operational realization of the Sovereign Machine is demonstrated by a comple ```text PHASE I: AWAKENING (Steps 1-6) - [1] Cold Silicon Reset ──> [2] Alpha Executes ──> [3] MMU & Cache Init ──> - [4] SHA-256 Measure ──> [5] EL1 Jump ──> [6] Alpha Terminates + [1] Cold Silicon Reset ──> [2] Atlas Executes ──> [3] MMU & Cache Init ──> + [4] SHA-256 Measure ──> [5] Contract-EL Jump ──> [6] Atlas Terminates PHASE II: GOVERNANCE & RESIDENCE (Steps 7-12) [7] Physics Brings Up ──> [8] SMMUv3 Locks ──> [9] NVLink-C2C Setup ──> @@ -444,11 +292,11 @@ The operational realization of the Sovereign Machine is demonstrated by a comple ### Detailed Trace Walkthrough: 1. **Cold Silicon Reset:** Electrical power stabilizes; CPU reset vector fetches the first instruction of `atlas.bin` from secure physical ROM. -2. **Alpha Execution:** Alpha initializes core architectural registers, clears scratchpad SRAM, and disables speculative prefetchers. -3. **MMU & Cache Initialization:** Alpha constructs minimal identity page tables (EL1/EL2) and enables the data/instruction caches. -4. **Cryptographic Measurement:** Alpha reads the Physics binary from non-volatile storage, computes its SHA-256 digest, and validates it against the platform Root of Trust. -5. **Monotonic Handoff:** Alpha issues an `ERET` instruction, jumping into Physics entry point at EL1 privilege level. -6. **Alpha Termination:** Alpha's code space is permanently unmapped from page tables; Alpha ceases execution. +2. **Atlas Execution:** Atlas initializes core architectural registers, clears scratchpad SRAM, and disables speculative prefetchers. +3. **MMU & Cache Initialization:** Atlas constructs minimal identity page tables (EL1/EL2) and enables the data/instruction caches. +4. **Cryptographic Measurement:** Atlas reads the Physics binary from non-volatile storage, computes its SHA-256 digest, and validates it against the platform Root of Trust. +5. **Monotonic Handoff:** Atlas transfers control to the Physics entry point under `PHYSICS_ENTRY_ABI` at the exception level declared by the machine contract, with no implicit EL2 -> EL1 transition (the current QEMU contract `CONTRACT-QEMU-VIRT-AARCH64-M2` specifies EL1). +6. **Atlas Termination:** Atlas's code space is permanently unmapped from page tables; Atlas ceases execution. 7. **Physics Bringup:** Physics establishes its core memory allocator, initializes the exception vector table, and brings up the diagnostic console. 8. **SMMUv3 Lock:** Physics configures memory protection contexts for all PCIe peripherals, locking DMA access to isolated buffers. 9. **NVLink-C2C Coherent Setup:** Physics configures the high-speed chip-to-chip coherent memory bus between AArch64 host and Blackwell GPU. @@ -474,55 +322,3 @@ The operational realization of the Sovereign Machine is demonstrated by a comple ================================================================================ ``` - -## 5. The 31-Milestone Sovereign Program-Learning Roadmap - -```text -MILESTONE 0 — DOCTRINE_V1 Canonical doctrine corpus frozen and ratified. [COMPLETE] -MILESTONE 1 — ATLAS_BOOT Canonical atlas.bin bootstrap seed. [COMPLETE / QEMU QUALIFIED] - - Repository: https://github.com/aien-dev/atlas - - Canonical Artifact: atlas.bin (1,480 bytes, SHA-256: f7802501b410a0c19eff7b8fca8865c9ba9c96bfa4f8065ca8f508b67748b9a5) - - Historical Lineage: Formerly designated Alpha (alpha.bin) in early bootstrap drafting - - Dual-Seam Verification: - * Seam 1 (Static Audit): 100% word-reconciled (301 insns, 69 rodata words, 0 discrepancy), static target proof (ldr x19, =0x40200000; br x19), disjoint stack/descriptor proof (SP <= 0x401FC000 vs Descriptor @ 0x401FE000 with 8 KiB guard gap, empty intersection). - * Seam 2 (Execution Harness): Bare-metal QEMU virt; 268/268 mutations refused into fail-closed quiescence (exhaustive 256 single-byte offset sweep + 12 adversarial scenarios). - * Cryptographic Scheme: Bare-metal NIST FIPS 180-4 SHA-256 (KAT verified 100%). - - Native Hardware Status: ATLAS_BOOT_NATIVE_PASS remains pending and decoupled from QEMU qualification. -MILESTONE 2 — PHYSICS_BOOT Minimal trusted machine authority nucleus. -MILESTONE 3 — PHYSICS_EFFECTS Capabilities, EFFECT_INTENT admission cycle, and EFFECT_RECEIPT accounting. -MILESTONE 4 — OMEGA_SEMANTICS Core semantic object model and canonical content-addressed identity. -MILESTONE 5 — OMEGA_AARCH64 Direct bare-metal machine code generation (no LLVM). -MILESTONE 6 — OMEGA_SELF_HOST Self-hosting compilation of the minimal Omega realization layer. -MILESTONE 7 — OMEGA_VERIFY Epistemic verification kernel: - - REQUIRED: V0 Structural/Type/Capability, V1 Differential, V2 Property/Invariant. - - FRAMEWORK DEFINED FOR: V3 Adversarial, V4 Symbolic, V5 Proof-Carrying. -MILESTONE 8 — OMEGA_PROGRAM_CORE Semantic procedure graph representation, SYNTHESIS_TASK, and cost models. -MILESTONE 9 — OMEGA_SYNTHESIS_V0 Deterministic typed enumeration and constraint solver solving canonical closed domains. -MILESTONE 10 — OMEGA_LIBRARY_V1 Versioned procedure library, provenance tracking, and library generation tags. -MILESTONE 11 — OMEGA_LIBRARY_DISCOVERY One nontrivial abstraction not present in the initial library that: - 1. Compresses multiple verified programs; - 2. Preserves their semantics; - 3. Is reused on held-out tasks; - 4. Reduces search cost. -MILESTONE 12 — OMEGA_LIVING_MATVEC Living MatVec selecting among verified realization variants and procedure reuse. -MILESTONE 13 — OMEGA_MACHINE_GRAPH Hardware topology and transformation description reported by Physics. -MILESTONE 14 — OMEGA_REALIZATION_SYNTHESIS Synthesis engine applied to physical code generation (G_S x G_M -> G_R). -MILESTONE 15 — PHYSICS_ACCELERATOR_LINK Zero-copy shared memory rings and capability tables (CPU governor <-> accelerator). -MILESTONE 16 — BLACKWELL_NATIVE_PATH_KNOWN Native GPU MMIO, queue submission, and doorbell mechanics mapped empirically. -MILESTONE 17 — OMEGA_BLACKWELL_VECTOR First verified native Blackwell compute realization (general GPU compute). -MILESTONE 18 — OMEGA_BLACKWELL_MATMUL High-throughput matrix multiplication on Blackwell. -MILESTONE 19 — OMEGA_ACCELERATOR_RESIDENT Persistent OMEGA execution substrate remains resident in accelerator-accessible - coherent memory and maintains device execution state without repeated host-side initialization. -MILESTONE 20 — OMEGA_TENSOR Native tensor algebraic foundations and numeric domains. -MILESTONE 21 — OMEGA_AUTODIFF Symbolic graph autodiff (G_S_fwd -> G_S_grad). -MILESTONE 22 — OMEGA_OPTIMIZER Omega-native semantics for SGD, Adam, and AdamW, with verified CPU reference - realizations and optional accelerator-fused realizations. -MILESTONE 23 — OMEGA_SEARCH_GUIDE_TRAINING Sovereign training runtime trains initial search-guide model on Omega trace corpus. -MILESTONE 24 — AIEN_0 First learned synthesis guide ranking primitives, subgoals, and search branches. -MILESTONE 25 — AIEN_GUIDED_SYNTHESIS Neural-guided synthesis beats unguided search in node count while preserving 100% soundness. -MILESTONE 26 — AIEN_ABSTRACTION_DISCOVERY AIEN proposes candidate abstractions; Omega verifies and measures before promotion. -MILESTONE 27 — AIEN_HUMAN_INTERFACE Bidirectional natural language adapter (Language <-> Omega Task). -MILESTONE 28 — AIEN_RESIDENT Persistent accelerator-resident AIEN cognitive execution. -MILESTONE 29 — OMEGA_CONTINUAL_LIBRARY_LEARNING Autonomous continuous Wake/Solve/Verify -> Sleep/Compress/Promote cycle. -MILESTONE 30 — AIEN_SUCCESSION Closed-loop self-improvement: AIEN-N designs AIEN-N+1 under Physics canary control. -``` diff --git a/doctrine/ATLAS.md b/doctrine/ATLAS.md index 08f8d14..208eb76 100644 --- a/doctrine/ATLAS.md +++ b/doctrine/ATLAS.md @@ -1,7 +1,9 @@ # DOCTRINE-001: ATLAS — The Irreducible Bootstrap Seed + > [!NOTE] -> **Lineage & Provenance Note:** *Formerly designated Atlas (`atlas.bin`) during early lineage bootstrap drafting. Every prior architectural responsibility and contract of ATLAS transfers to ATLAS unchanged.* +> **Historical Lineage & Provenance Note (not normative):** *Formerly designated Alpha (`alpha.bin`) during early lineage bootstrap drafting. Every prior architectural responsibility and contract of ALPHA transfers to ATLAS unchanged. Only `atlas.*` artifacts are canonical.* + ```text Document ID: DOCTRINE-001 @@ -38,7 +40,7 @@ The doctrine of Atlas rests upon five fundamental tenets: │ │ │ │ │ │ ▼ ▼ ▼ │ │ Strict MMU / SHA-256 / Monotonic │ -│ Registers Manifest Match Handoff (EL1) │ +│ Registers Manifest Match Handoff (contract EL) │ └─────────────────────────────────┬──────────────────────────────────────┘ │ ▼ @@ -150,10 +152,9 @@ Atlas executes directly on bare metal AArch64 hardware. It relies on a rigorous ### 4.2 Entry Address & Privilege Level - **Entry Address**: Standardized at physical base address `0x4000_0000` (or `0x8000_0000` depending on platform board definitions, codified in `atlas.manifest`). -- **Entry Exception Level**: Atlas enters at **EL2** (Hypervisor) or **EL1** (Privileged Kernel). - - If entered at EL2: Atlas establishes basic virtualization controls (`HCR_EL2 = 0x80000000`), configures `SPSR_EL2` to drop to EL1h, sets `ELR_EL2` to the entry point of the EL1 setup stage, and executes `eret`. - - If entered at EL1: Atlas proceeds directly with EL1 configuration. -- **Physics Handoff Level**: Control is transferred to Physics strictly at **EL1h** with interrupts masked (`DAIF = 0xF`). +- **Entry Exception Level**: Declared by the machine contract (**EL2** or **EL1**). Atlas verifies `CurrentEL` against the contract and enters the fail-closed halt state on any mismatch. +- **Physics Handoff Level**: Declared by the machine contract. Control is transferred to Physics under `PHYSICS_ENTRY_ABI` at the contract-defined exception level with interrupts masked (`DAIF = 0xF`). Atlas performs no implicit EL2 -> EL1 transition. +- **Current QEMU Contract**: `CONTRACT-QEMU-VIRT-AARCH64-M2` specifies EL1 entry. Register names below are shown for an EL1 contract; an EL2 contract uses the corresponding `_EL2` registers. ### 4.3 Architectural Register State Upon entry into Atlas: diff --git a/doctrine/DISCOVERY.md b/doctrine/DISCOVERY.md index d9d979d..0ddc312 100644 --- a/doctrine/DISCOVERY.md +++ b/doctrine/DISCOVERY.md @@ -368,62 +368,9 @@ The system advances through nine verified benchmark tiers: ## 13. The 41-Milestone Sovereign Roadmap -```text -FOUNDATIONAL ERA (M0 - M3) - M0: DOCTRINE_V1 Canonical architecture codified & ratified. [COMPLETE] - M1: ATLAS_BOOT Irreducible bootstrap seed (atlas.bin). [COMPLETE / QEMU QUALIFIED] - M2: PHYSICS_BOOT Physical machine authority nucleus (physics.bin). [IN PROGRESS] - M3: PHYSICS_EFFECTS Capabilities, effect admission, and signed receipts. - -OMEGA CORE SUBSTRATE (M4 - M7) - M4: OMEGA_SEMANTICS Semantic object model, types, and identity. - M5: OMEGA_AARCH64 Native AArch64 realization generator (no LLVM). - M6: OMEGA_SELF_HOST Omega reproduces minimal realization compiler. - M7: OMEGA_VERIFY V0-V2 mandatory verification; V3-V5 framework. - -PROGRAM SYNTHESIS & LIBRARY LEARNING (M8 - M14) - M8: OMEGA_PROGRAM_CORE Synthesis tasks, cost models, program IDs. - M9: OMEGA_SYNTHESIS_V0 Deterministic typed program synthesis. - M10: OMEGA_LIBRARY_V1 Versioned procedural library and catalog. - M11: OMEGA_LIBRARY_DISCOVERY Abstraction discovery from program corpus. - M12: OMEGA_LIVING_MATVEC Adaptive multi-target realization selection. - M13: OMEGA_MACHINE_GRAPH Formal physical hardware topology graph. - M14: OMEGA_REALIZATION_SYNTHESIS Automated G_S x G_M -> G_R synthesis. - -ACCELERATOR COGNITION SUBSTRATE (M15 - M19) - M15: PHYSICS_ACCELERATOR_LINK Bounded coherent CPU/GPU memory interface. - M16: BLACKWELL_NATIVE_PATH_KNOWN Empirical hardware execution characterization. - M17: OMEGA_BLACKWELL_VECTOR Verified Blackwell vector compute realization. - M18: OMEGA_BLACKWELL_MATMUL Verified Blackwell tensor matrix multiplication. - M19: OMEGA_ACCELERATOR_RESIDENT Persistent GPU-resident execution substrate. - -SOVEREIGN TRAINING RUNTIME (M20 - M26) - M20: OMEGA_TENSOR Tensor semantics, strides, shapes, and types. - M21: OMEGA_AUTODIFF Sovereign automatic differentiation engine. - M22: OMEGA_OPTIMIZER SGD / Adam / AdamW verified realizations. - M23: OMEGA_SEARCH_GUIDE_TRAINING First search guide trained on Omega traces. - M24: AIEN_0 First sovereign neural guide ranking subgoals. - M25: AIEN_GUIDED_SYNTHESIS Neural-guided synthesis with verified parity. - M26: AIEN_ABSTRACTION_DISCOVERY AIEN proposes concepts; Omega validates survival. - -PHYSICS ZERO DISCOVERY ERA (M27 - M35) - M27: PHYSICS_ZERO_PROTOCOL Contamination firewall & sealed evaluation specs. - M28: PHYSICS_ZERO_HIDDEN_WORLDS Discrete & continuous sealed worlds (P0-0..P0-2). - M29: AIEN_THEORY_DISCOVERY OMEGA_THEORY population, competition, revision. - M30: AIEN_ACTIVE_EXPERIMENTATION Active distinguishing experiment formulation. - M31: AIEN_CONCEPT_FORMATION Latent concept discovery (OMEGA_DISCOVERED_CONCEPT). - M32: PHYSICS_ZERO_ALIEN_WORLDS Discovery on unfamiliar laws (P0-5). - M33: PHYSICS_ZERO_NOVEL_REGIME Extrapolation to unobserved state spaces. - M34: PHYSICS_ZERO_NOVEL_PHENOMENON Predictive discovery of unobserved phenomena. - M35: PHYSICS_ZERO_REAL_LAB Safe, capability-bounded physical lab discovery. - -GENERAL AIEN ERA (M36 - M40) - M36: AIEN_HUMAN_INTERFACE Perceptual adapter: Human Language <-> Omega. - M37: AIEN_RESIDENT Persistent accelerator-resident cognition. - M38: OMEGA_CONTINUAL_LIBRARY_LEARNING Continuous Wake/Solve/Verify/Sleep loop. - M39: AIEN_SCIENTIFIC_AUTONOMY Autonomous hypothesis, experiment, and theory cycle. - M40: AIEN_SUCCESSION AIEN-N proposes candidate AIEN-N+1. -``` +The canonical 41-milestone roadmap (M0-M40), with milestone code identifiers and current status, is maintained in exactly one place: **[`ROADMAP.md`](ROADMAP.md)**. This document does not restate the roadmap table or milestone status. + +The Physics Zero program defined in this document occupies the **Physics Zero Discovery Era (M27-M35)**, followed by the **General AIEN Era (M36-M40)**. --- diff --git a/doctrine/INDEX.md b/doctrine/INDEX.md index e04853e..80fef3c 100644 --- a/doctrine/INDEX.md +++ b/doctrine/INDEX.md @@ -72,6 +72,7 @@ The `DOCTRINE_V1` corpus comprises seven canonical specifications located in [`/ │ 6 │ TRUST.md │ DOCTRINE-005 │ Trust — Epistemic Verification Doctrine & Trust Boundaries│ │ 7 │ DISCOVERY.md │ DOCTRINE-006 │ Discovery & Physics Zero — Sovereign Scientific Intelligence│ │ 8 │ SOVEREIGNTY.md │ DOCTRINE-SOV-001 │ Sovereignty and Closure: Canonical Law & Provenance │ +│ R │ ROADMAP.md │ DOCTRINE-ROADMAP │ The 41-Milestone Sovereign Roadmap (M0-M40) & Status │ └───┴───────────────────┴──────────────────┴───────────────────────────────────────────────────────────┘ ``` @@ -98,10 +99,10 @@ The `DOCTRINE_V1` corpus comprises seven canonical specifications located in [`/ - **Five Tenets of Atlas:** Small, Fixed, Auditable, Deterministic, Non-Intelligent. - **The Executable Identity Invariant:** $$\text{tested bytes} \equiv \text{evaluated bytes} \equiv \text{authorized bytes} \equiv \text{executed bytes}$$ - - **The Canonical Supporting Evidence Bundle:** Seven immutable artifacts (`atlas.bin`, `alpha.manifest`, `alpha.sha256`, `alpha.decode`, `alpha.memory-map`, `alpha.control-flow`, `alpha.audit`). + - **The Canonical Supporting Evidence Bundle:** Seven immutable artifacts (`atlas.bin`, `atlas.manifest`, `atlas.sha256`, `atlas.decode`, `atlas.memory-map`, `atlas.control-flow`, `atlas.audit`). - **Key Invariants:** - Zero cognitive mechanisms, zero neural weights, zero heap allocation, zero dynamic syscalls. - - Monotonic EL1 handoff: once control is transferred to Physics, Atlas is never re-entered. + - Monotonic handoff at the exception level declared by the machine contract (no implicit EL2 -> EL1 transition): once control is transferred to Physics, Atlas is never re-entered within the boot epoch. --- @@ -172,7 +173,7 @@ The `DOCTRINE_V1` corpus comprises seven canonical specifications located in [`/ - **Core Principles:** - **The Sovereignty Law:** The final deployed Sovereign Machine must not depend upon Rust, Cargo, LLVM, GCC, Python, Linux, POSIX, CUDA, PyTorch, or foreign weights. - **The Severance Invariant:** If all external repositories, cloud providers, and foreign toolchains vanish, the machine continues self-executing and evolving indefinitely. - - **The Founding Exception & The Scaffold:** Temporary reliance on modern toolchains during initial bootstrapping, subject to strict deprecation horizons terminating at Milestone 27 (`SOVEREIGN_MACHINE_CLOSURE`). + - **The Founding Exception & The Scaffold:** Temporary reliance on modern toolchains during initial bootstrapping, subject to strict deprecation horizons terminating at sovereign closure (closure gate placement on the M0-M40 roadmap pending the SOVEREIGNTY.md rewrite, aien-dev/aien-architecture#8). - **The Oracle Principle:** Epistemic grounding using external instruments as temporary measurement comparators, never as operational dependencies. - **Key Invariants:** - Absolute self-hosting: every compiler, kernel, scheduler, and weight is built from self-contained lineage. @@ -214,7 +215,7 @@ The power of `DOCTRINE_V1` lies in the airtight mathematical and operational coh ## 5. Milestone 0 (`DOCTRINE_V1`) Gate Verification & Sign-Off -The `DOCTRINE_V1` Gate requires satisfying seven strict verification criteria before Milestone 1 (`BOOTSTRAP_SEED_ATLAS`) may be entered: +The `DOCTRINE_V1` Gate requires satisfying seven strict verification criteria before Milestone 1 (`ATLAS_BOOT`) may be entered: ### 5.1 Gate Verification Criteria Matrix @@ -250,7 +251,7 @@ Verified Corpus Elements: [✓] DOCTRINE-SOV: SOVEREIGNTY.md (Sovereignty, Closure & Provenance) [✓] DOCTRINE-IDX: INDEX.md (Master Index & Gate Verification Ledger) -GATE STATUS: RATIFIED / CLOSED / MILESTONE 1 (ATLAS) [COMPLETE / QEMU QUALIFIED] +GATE STATUS: RATIFIED / CLOSED (current milestone status: see ROADMAP.md) Sign-off Hash: 4a8b79e13d964fcf81ec0a1f9e2b1735cb0e4871d87a2cf956102a9e25d2b77c ================================================================================ ``` diff --git a/doctrine/PHYSICS.md b/doctrine/PHYSICS.md index 93fd545..301dc38 100644 --- a/doctrine/PHYSICS.md +++ b/doctrine/PHYSICS.md @@ -88,7 +88,7 @@ Physics exercises total, unshared jurisdiction over the physical resources of th ### 2.1 The Thirteen Physical Domains 1. **Memory Ownership**: Physics manages physical frame allocation, page table hierarchies (Stage 1 and Stage 2 translations), page attribute tables (`MAIR_EL1`), and memory type tags. No component may map or access memory without a valid memory capability. -2. **CPU Privilege**: Physics runs at EL1 (or EL2 hypervisor), enforcing complete isolation between supervisor domains and unprivileged EL0 user-space runtimes. +2. **CPU Privilege**: Physics runs at the exception level declared by the machine contract (EL1 or EL2, no implicit EL2 -> EL1 transition), enforcing complete isolation between supervisor domains and unprivileged EL0 user-space runtimes. 3. **Interrupts**: Physics controls the Generic Interrupt Controller (GICv3/v4). It binds, prioritizes, filters, and delivers physical interrupts. No external process may mask or usurp hardware IRQs. 4. **Timers**: Physics configures physical and virtual timers (`CNTP_CTL_EL0`, `CNTV_CTL_EL0`). It enforces preemptive execution slicing and deadline tracking. 5. **Faults**: Physics traps all processor exceptions (Data Aborts, Instruction Aborts, Alignment Faults, Illegal Instructions). Faults are isolated to the offending domain; uncontained corruption triggers fail-safe quarantine. diff --git a/doctrine/ROADMAP.md b/doctrine/ROADMAP.md new file mode 100644 index 0000000..5b48c76 --- /dev/null +++ b/doctrine/ROADMAP.md @@ -0,0 +1,126 @@ +# DOCTRINE-ROADMAP: The 41-Milestone Sovereign Roadmap (M0-M40) + +```text +Document ID: DOCTRINE-ROADMAP +Classification: Sovereign Machine Canonical Doctrine (Single Roadmap Source) +Target Substrate: Complete Sovereign Stack (Atlas -> Physics -> Omega -> Aien) +Status: AUTHORITATIVE / CANONICAL +``` + +--- + +## 1. Authority of This Document + +This file is the **single authoritative source** for Sovereign Machine milestone numbering, milestone code identifiers, and milestone status. + +- Every other doctrine page references this file instead of restating the milestone table or milestone status. +- Milestone status is changed **only** here. A status change must cite the qualifying evidence (issue, PR, or receipt). +- `scripts/check_doctrine.sh` enforces this: it fails if another doctrine page duplicates the roadmap table, carries its own milestone status tags, or cites a milestone code identifier under a milestone number different from the one below. + +Status vocabulary: + +| Status | Meaning | +| :--- | :--- | +| `COMPLETE` | Milestone gate passed and ratified. | +| `COMPLETE / QEMU QUALIFIED` | Gate passed under QEMU qualification; native hardware qualification remains separately gated. | +| `REOPENED / IN PROGRESS` | Previously reported complete; reopened for requalification. Not complete. | +| `PLANNED` | Not started. | + +--- + +## 2. The Canonical Roadmap Table + +| Milestone | Era | Code Identifier | Scope & Objective Invariants | Status | +| :--- | :--- | :--- | :--- | :--- | +| **M0** | Foundational | `DOCTRINE_V1` | Foundational Specification. Ratification of complete architectural corpus. | COMPLETE | +| **M1** | Foundational | `ATLAS_BOOT` | Irreducible bootstrap seed (`atlas.bin`). Dual-seam verified. | COMPLETE / QEMU QUALIFIED | +| **M2** | Foundational | `PHYSICS_BOOT` | Physical machine authority nucleus (`physics.bin`). Current-EL VBAR, frame authority, CAP_ROOT. Requalified 2026-09-26 (`aien-dev/physics#3`, receipt `qualification_receipt.json`). QEMU only; `PHYSICS_BOOT_NATIVE_PASS` pending. | COMPLETE / QEMU QUALIFIED | +| **M3** | Foundational | `PHYSICS_EFFECTS` | Capability ledger, monotonic attenuation, effect broker, signed execution receipts (`EFFECT_INTENT` admission, `EFFECT_RECEIPT` accounting). | PLANNED | +| **M4** | Omega Core Substrate | `OMEGA_SEMANTICS` | Semantic graph ($G_S$), typed AST, invariant envelopes, substrate-independent content-addressed identity. | PLANNED | +| **M5** | Omega Core Substrate | `OMEGA_AARCH64` | Native direct AArch64 machine byte realization generator (no LLVM). | PLANNED | +| **M6** | Omega Core Substrate | `OMEGA_SELF_HOST` | Omega reproduces the minimal realization compiler through its own semantic graph. | PLANNED | +| **M7** | Omega Core Substrate | `OMEGA_VERIFY` | Mandatory V0-V2 verification engine; V3-V5 proof-carrying code framework. | PLANNED | +| **M8** | Program Synthesis & Library Learning | `OMEGA_PROGRAM_CORE` | Explicit program representation, synthesis task schema (`SYNTHESIS_TASK`), program cost modeling. | PLANNED | +| **M9** | Program Synthesis & Library Learning | `OMEGA_SYNTHESIS_V0` | Deterministic typed program synthesis over base primitives. | PLANNED | +| **M10** | Program Synthesis & Library Learning | `OMEGA_LIBRARY_V1` | Versioned procedural program library, provenance tracking, and verified component catalog. | PLANNED | +| **M11** | Program Synthesis & Library Learning | `OMEGA_LIBRARY_DISCOVERY` | Autonomous abstraction discovery from program corpus with verified reuse. | PLANNED | +| **M12** | Program Synthesis & Library Learning | `OMEGA_LIVING_MATVEC` | Adaptive realization selection across varying input regimes and cache dynamics. | PLANNED | +| **M13** | Program Synthesis & Library Learning | `OMEGA_MACHINE_GRAPH` | Formal machine hardware graph ($G_M$) describing execution pipelines and memory hierarchies, as reported by Physics. | PLANNED | +| **M14** | Program Synthesis & Library Learning | `OMEGA_REALIZATION_SYNTHESIS` | Automated $G_S \times G_M \to G_R$ synthesis targeting declared hardware capabilities. | PLANNED | +| **M15** | Accelerator Cognition Substrate | `PHYSICS_ACCELERATOR_LINK` | Bounded coherent CPU/accelerator memory interface and SMMUv3 DMA sandboxing. | PLANNED | +| **M16** | Accelerator Cognition Substrate | `BLACKWELL_NATIVE_PATH_KNOWN` | Empirical execution characterization of native Blackwell SM architecture (MMIO, queue submission, doorbells). | PLANNED | +| **M17** | Accelerator Cognition Substrate | `OMEGA_BLACKWELL_VECTOR` | Verified Blackwell vector compute realization generated directly from $G_S$. | PLANNED | +| **M18** | Accelerator Cognition Substrate | `OMEGA_BLACKWELL_MATMUL` | Verified native Blackwell tensor matrix multiplication with tensor core acceleration. | PLANNED | +| **M19** | Accelerator Cognition Substrate | `OMEGA_ACCELERATOR_RESIDENT` | Persistent Omega execution substrate residing in accelerator-accessible coherent memory. | PLANNED | +| **M20** | Sovereign Training Runtime | `OMEGA_TENSOR` | Tensor semantics, multi-dimensional array types, strides, and memory layouts. | PLANNED | +| **M21** | Sovereign Training Runtime | `OMEGA_AUTODIFF` | Sovereign automatic differentiation generating gradient semantic graphs. | PLANNED | +| **M22** | Sovereign Training Runtime | `OMEGA_OPTIMIZER` | Verified sovereign optimizer realizations (SGD, Adam, AdamW). | PLANNED | +| **M23** | Sovereign Training Runtime | `OMEGA_SEARCH_GUIDE_TRAINING` | Sovereign training pipeline for search guides using Omega-generated traces. | PLANNED | +| **M24** | Sovereign Training Runtime | `AIEN_0` | First sovereign neural search guide ranking subgoals and pruning search branches. | PLANNED | +| **M25** | Sovereign Training Runtime | `AIEN_GUIDED_SYNTHESIS` | Neural-guided synthesis achieving lower search cost under invariant verification parity. | PLANNED | +| **M26** | Sovereign Training Runtime | `AIEN_ABSTRACTION_DISCOVERY` | AIEN proposes candidate abstractions; Omega enforces survival based on utility. | PLANNED | +| **M27** | Physics Zero Discovery | `PHYSICS_ZERO_PROTOCOL` | Contamination firewall specification and sealed evaluation benchmark contracts. | PLANNED | +| **M28** | Physics Zero Discovery | `PHYSICS_ZERO_HIDDEN_WORLDS` | Discrete and continuous sealed benchmark worlds with randomized channels (P0-0..P0-2). | PLANNED | +| **M29** | Physics Zero Discovery | `AIEN_THEORY_DISCOVERY` | Executable `OMEGA_THEORY` synthesis, population competition, and calibrated prediction. | PLANNED | +| **M30** | Physics Zero Discovery | `AIEN_ACTIVE_EXPERIMENTATION` | Active experiment design distinguishing competing theories ($P(R \mid A) \neq P(R \mid B)$). | PLANNED | +| **M31** | Physics Zero Discovery | `AIEN_CONCEPT_FORMATION` | Autonomous invention of reusable latent concepts (`OMEGA_DISCOVERED_CONCEPT`). | PLANNED | +| **M32** | Physics Zero Discovery | `PHYSICS_ZERO_ALIEN_WORLDS` | Scientific discovery in universes governed by unfamiliar laws (P0-5). | PLANNED | +| **M33** | Physics Zero Discovery | `PHYSICS_ZERO_NOVEL_REGIME` | Extrapolative theory prediction in unobserved state regimes. | PLANNED | +| **M34** | Physics Zero Discovery | `PHYSICS_ZERO_NOVEL_PHENOMENON` | Predictive discovery and experimental realization of unobserved phenomena. | PLANNED | +| **M35** | Physics Zero Discovery | `PHYSICS_ZERO_REAL_LAB` | Capability-bounded, safety-governed autonomous discovery in physical laboratories. | PLANNED | +| **M36** | General AIEN | `AIEN_HUMAN_INTERFACE` | Bi-directional perceptual adapter mapping human natural language to Omega semantics. | PLANNED | +| **M37** | General AIEN | `AIEN_RESIDENT` | Persistent, high-throughput cognitive loop resident in accelerator HBM memory. | PLANNED | +| **M38** | General AIEN | `OMEGA_CONTINUAL_LIBRARY_LEARNING` | Continuous Wake/Solve/Verify/Sleep compounding loop. | PLANNED | +| **M39** | General AIEN | `AIEN_SCIENTIFIC_AUTONOMY` | Fully autonomous scientific discovery cycle: observe, hypothesize, test, discover. | PLANNED | +| **M40** | General AIEN | `AIEN_SUCCESSION` | Sovereign succession protocol: AIEN-N trains and proposes AIEN-N+1 candidate. | PLANNED | + +Era ranges: Foundational M0-M3; Omega Core Substrate M4-M7; Program Synthesis & Library Learning M8-M14; Accelerator Cognition Substrate M15-M19; Sovereign Training Runtime M20-M26; **Physics Zero Discovery M27-M35**; **General AIEN M36-M40**. + +--- + +## 3. Milestone Notes & Evidence + +### M1 — `ATLAS_BOOT` +- Repository: https://github.com/aien-dev/atlas +- Canonical Artifact: `atlas.bin` (1,480 bytes, SHA-256: `f7802501b410a0c19eff7b8fca8865c9ba9c96bfa4f8065ca8f508b67748b9a5`) +- Dual-Seam Verification: + - Seam 1 (Static Audit): 100% word-reconciled (301 insns, 69 rodata words, 0 discrepancy), static target proof (`ldr x19, =0x40200000; br x19`), disjoint stack/descriptor proof (SP <= `0x401FC000` vs Descriptor @ `0x401FE000` with 8 KiB guard gap, empty intersection). + - Seam 2 (Execution Harness): Bare-metal QEMU virt; 268/268 mutations refused into fail-closed quiescence (exhaustive 256 single-byte offset sweep + 12 adversarial scenarios). + - Cryptographic Scheme: Bare-metal NIST FIPS 180-4 SHA-256 (KAT verified 100%). +- Native Hardware Status: `ATLAS_BOOT_NATIVE_PASS` remains pending and decoupled from QEMU qualification. +- Specification: [`docs/milestone-1-spec.md`](../docs/milestone-1-spec.md). + +### M2 — `PHYSICS_BOOT` +- Reopened for requalification under aien-dev/aien-architecture#6 and aien-dev/physics#1 (descriptor ingress, frame authority, and exception confinement hardening). M2 is **not** complete until that requalification closes. +- Exception level is contract-driven: Physics checks `CurrentEL` against the machine contract and installs `VBAR_EL1` or `VBAR_EL2` accordingly, with no implicit EL2 -> EL1 transition. The current QEMU contract, `CONTRACT-QEMU-VIRT-AARCH64-M2`, specifies EL1 entry. +- `PHYSICS_BOOT_QEMU_PASS` does not imply `PHYSICS_BOOT_NATIVE_PASS`. +- Specification: [`docs/milestone-2-spec.md`](../docs/milestone-2-spec.md). + +### M7 — `OMEGA_VERIFY` +- REQUIRED: V0 Structural/Type/Capability, V1 Differential, V2 Property/Invariant. +- FRAMEWORK DEFINED FOR: V3 Adversarial, V4 Symbolic, V5 Proof-Carrying. + +### M11 — `OMEGA_LIBRARY_DISCOVERY` +One nontrivial abstraction not present in the initial library that: +1. Compresses multiple verified programs; +2. Preserves their semantics; +3. Is reused on held-out tasks; +4. Reduces search cost. + +### M22 — `OMEGA_OPTIMIZER` +Omega-native semantics for SGD, Adam, and AdamW, with verified CPU reference realizations and optional accelerator-fused realizations. + +### M40 — `AIEN_SUCCESSION` +Closed-loop self-improvement: AIEN-N designs AIEN-N+1 under Physics canary control. + +--- + + +## 4. Historical Provenance: Superseded Roadmap Generations + +> **HISTORICAL — NOT NORMATIVE.** Retained only to explain older references. Do not cite these numbers. + +- **28-milestone workstream roadmap (M0-M27, workstreams A-F):** ended at M27 `SOVEREIGN_MACHINE_CLOSURE`; its identifiers (e.g. `ATLAS_BAREMETAL_BOOT`, `PHYSICS_CORE_MEMBRANE`, `SENTINEL_GATE_1..3`) are retired. +- **31-milestone program-learning roadmap (M0-M30):** placed `AIEN_HUMAN_INTERFACE` at M27, `AIEN_RESIDENT` at M28, `OMEGA_CONTINUAL_LIBRARY_LEARNING` at M29, and `AIEN_SUCCESSION` at M30. Superseded by the 41-milestone roadmap above when Physics Zero (DOCTRINE-006) was ratified. +- **Alpha lineage:** `atlas.bin` was designated Alpha (`alpha.bin`) during early bootstrap drafting; the Alpha evidence bundle names (`alpha.manifest`, `alpha.sha256`, `alpha.decode`, `alpha.memory-map`, `alpha.control-flow`, `alpha.audit`) are retired in favour of `atlas.*`. + diff --git a/scripts/check_doctrine.sh b/scripts/check_doctrine.sh new file mode 100755 index 0000000..2e12434 --- /dev/null +++ b/scripts/check_doctrine.sh @@ -0,0 +1,195 @@ +#!/usr/bin/env bash +# check_doctrine.sh — doctrine consistency check (aien-dev/aien-architecture#7). +# +# Fails on stale normative doctrine: Alpha naming, fixed EL1 handoff claims, +# obsolete roadmap generations (28/31-milestone, M27 closure), milestone status +# or roadmap tables duplicated outside doctrine/ROADMAP.md, and milestone code +# identifiers cited under the wrong milestone number. +# +# Text between these markers is historical provenance and is not checked: +# +# +# +# Pure bash + grep + awk. No Python (project rule). Exit 0 = pass, 1 = fail. +# +# Usage: scripts/check_doctrine.sh [repo-root] + +set -u +export LC_ALL=C + +ROOT="${1:-$(cd "$(dirname "$0")/.." && pwd)}" +cd "$ROOT" || { echo "check_doctrine: cannot cd to $ROOT" >&2; exit 2; } + +ROADMAP="doctrine/ROADMAP.md" + +# Files in scope: the doctrine corpus plus the per-milestone specifications. +FILES=() +for f in doctrine/*.md docs/milestone-*-spec.md; do + [ -f "$f" ] && FILES+=("$f") +done + +# --------------------------------------------------------------------------- +# DEFERRED allowlist. Findings in these files are reported but do not fail the +# check. Every entry must name the issue that owns the fix; remove the entry +# when that issue closes. +# --------------------------------------------------------------------------- +declare -A DEFERRED=( +) + +FAILS=0 +DEFERS=0 + +report() { # report + local check="$1" file="$2" line="$3" text="$4" + if [ -n "${DEFERRED[$file]+x}" ]; then + printf 'DEFERRED (%s) [%s] %s:%s: %s\n' "${DEFERRED[$file]}" "$check" "$file" "$line" "$text" + DEFERS=$((DEFERS + 1)) + else + printf 'FAIL [%s] %s:%s: %s\n' "$check" "$file" "$line" "$text" + FAILS=$((FAILS + 1)) + fi +} + +# Print a file with historical-provenance lines blanked (line numbers kept). +normative() { + awk ' + // { hist = 1; print ""; next } + // { hist = 0; print ""; next } + { print (hist ? "" : $0) } + ' "$1" +} + +# check_pattern [exempt-file] +check_pattern() { + local name="$1" re="$2" exempt="${3:-}" f hit ln txt + for f in "${FILES[@]}"; do + [ "$f" = "$exempt" ] && continue + while IFS= read -r hit; do + ln="${hit%%:*}"; txt="${hit#*:}" + report "$name" "$f" "$ln" "$(printf '%s' "$txt" | sed 's/^[[:space:]]*//' | cut -c1-160)" + done < <(normative "$f" | grep -nE -- "$re") + done +} + +# --- 0. Historical markers must be balanced -------------------------------- +for f in "${FILES[@]}"; do + bad=$(awk ' + // { if (open) { print NR; exit } open = NR; next } + // { if (!open) { print NR; exit } open = 0; next } + END { if (open) print open } + ' "$f") + [ -n "$bad" ] && report "unbalanced-historical-marker" "$f" "$bad" "HISTORICAL-PROVENANCE marker without partner" +done + +# --- 1. Forbidden stale normative patterns --------------------------------- +check_pattern "alpha-naming" \ + '\bALPHA\b|\bAlpha\b|\balpha\.(bin|manifest|sha256|decode|memory-map|control-flow|audit)\b' + +check_pattern "fixed-el1-handoff" \ + 'Monotonic Handoff \(EL1\)|Handoff \(EL1\)|EL1 [Hh]andoff|strictly at \*\*EL1|EL1 Jump|at EL1 privilege level' + +check_pattern "obsolete-m27-closure" \ + '(Milestone|MILESTONE|\bM) ?27\b[^|]*SOVEREIGN(_MACHINE)?_CLOSURE|SOVEREIGN(_MACHINE)?_CLOSURE[^|]*(Milestone|MILESTONE|\bM) ?27\b|(Milestone|MILESTONE|M) ?27\b[^|]*AIEN_HUMAN_INTERFACE|AIEN_HUMAN_INTERFACE[^|]*(Milestone|MILESTONE|\bM) ?27\b' + +check_pattern "obsolete-roadmap-generation" \ + '\b(28|31)-[Mm]ilestone|[Tt]wenty-eight (precise )?milestones|[Tt]hirty-one milestones|^MILESTONE [0-9]+ +— |\bM[0-9]+ ?(-|–) ?M27\b' + +check_pattern "retired-milestone-identifier" \ + '\b(BOOTSTRAP_SEED_ATLAS|ATLAS_BAREMETAL_BOOT|ATLAS_MEASUREMENT_CHAIN|ATLAS_STAGE2_ELIMINATION|PHYSICS_CORE_MEMBRANE|SENTINEL_GATE_[0-9]|AIEN_SEED_TRAINING|AIEN_SEED_TOPOLOGY)\b' + +# Milestone status lives only in ROADMAP.md. +check_pattern "status-outside-roadmap" \ + '\[(COMPLETE|IN PROGRESS|REOPENED[^]]*|COMPLETE / QEMU QUALIFIED|QEMU QUALIFIED)\]|PHYSICS_BOOT[^|]*\bCOMPLETE\b' \ + "$ROADMAP" + +# The roadmap table itself lives only in ROADMAP.md. +check_pattern "duplicate-roadmap-table" \ + '^[[:space:]]*M[0-9]{1,2}:[[:space:]]+[A-Z][A-Z0-9_]{3,}|^\| \*\*M[0-9]{1,2}\*\* \|' \ + "$ROADMAP" + +# --- 2. Physics Zero numbering must be M27-M35 ------------------------------ +# (ROADMAP.md itself is checked row-by-row in section 3.) +for f in "${FILES[@]}"; do + [ "$f" = "$ROADMAP" ] && continue + while IFS= read -r hit; do + report "physics-zero-range" "$f" "${hit%%:*}" "${hit#*:}" + done < <(normative "$f" | awk ' + # Only ranges labelled as Physics Zero: "Physics Zero ... Mx-My" (within + # 30 chars) or "Mx-My (Physics Zero". + { + s = $0 + while (match(s, /[Pp]hysics [Zz]ero[^.]{0,30}M[0-9]+ ?[-–] ?M[0-9]+|M[0-9]+ ?[-–] ?M[0-9]+ ?\([Pp]hysics [Zz]ero/)) { + t = substr(s, RSTART, RLENGTH); s = substr(s, RSTART + RLENGTH) + match(t, /M[0-9]+ ?[-–] ?M[0-9]+/); r = substr(t, RSTART, RLENGTH) + gsub(/ /, "", r); sub(/–/, "-", r) + if (r != "M27-M35") { print NR ":" $0; break } + } + }') +done + +# --- 3. ROADMAP.md structure ------------------------------------------------ +if [ ! -f "$ROADMAP" ]; then + report "roadmap-missing" "$ROADMAP" 0 "canonical roadmap file not found" +else + while IFS= read -r msg; do + report "roadmap-structure" "$ROADMAP" "${msg%%:*}" "${msg#*:}" + done < <(normative "$ROADMAP" | awk -F'|' ' + /^\| \*\*M[0-9]+\*\* \|/ { + m = $2; gsub(/[ *M]/, "", m); m = m + 0; st = $6; gsub(/^ +| +$/, "", st) + if (m + 0 != n) print NR ": expected row M" n ", found M" m + if (st !~ /^(COMPLETE|COMPLETE \/ QEMU QUALIFIED|REOPENED \/ IN PROGRESS|IN PROGRESS|PLANNED)$/) + print NR ": M" m " has unknown status \"" st "\"" + era = $3; gsub(/^ +| +$/, "", era) + if (era == "Physics Zero Discovery" && (m < 27 || m > 35)) print NR ": M" m " is outside Physics Zero M27-M35" + if ((m >= 27 && m <= 35) && era != "Physics Zero Discovery") print NR ": M" m " must be in the Physics Zero Discovery era" + if (era == "General AIEN" && (m < 36 || m > 40)) print NR ": M" m " is outside General AIEN M36-M40" + n++ + } + END { if (n != 41) print "0: expected 41 roadmap rows (M0-M40), found " n }') +fi + +# --- 4. Milestone code identifiers must carry their ROADMAP number ---------- +# Build CODE -> number from the canonical table, then flag any citation outside +# ROADMAP.md that pairs a code with a different milestone number, e.g. +# "Milestone 14 (`OMEGA_LIVING_MATVEC`)" or "M27: AIEN_HUMAN_INTERFACE". +if [ -f "$ROADMAP" ]; then + MAP=$(normative "$ROADMAP" | awk -F'|' '/^\| \*\*M[0-9]+\*\* \|/ { + m = $2; gsub(/[ *M]/, "", m); c = $4; gsub(/[ `]/, "", c); print c "=" m }') + for f in "${FILES[@]}"; do + [ "$f" = "$ROADMAP" ] && continue + while IFS= read -r hit; do + report "milestone-number-mismatch" "$f" "${hit%%:*}" "${hit#*:}" + done < <(normative "$f" | awk -v map="$MAP" ' + BEGIN { k = split(map, pairs, "\n"); for (i = 1; i <= k; i++) { split(pairs[i], p, "="); num[p[1]] = p[2] } } + { + line = $0 + # "Milestone N (`CODE`)", "MN: CODE", "M N — CODE" + s = line + while (match(s, /(Milestones?|MILESTONE|\