aienux
Aienux, the AienOS kernel: boot, scheduling, IPC and capability boundaries. Pre-alpha; host, emulator and physical evidence are labelled separately.
Brought by drakestapleton
| 1 | # AIENOS Architectural Milestones Matrix & Execution Plan |
| 2 | |
| 3 | > **REFERENCE MILESTONE SPECIFICATION, NOT THE CURRENT EXECUTION ORDER.** Current AIENOS sequencing and status are in [../ROADMAP.md](../ROADMAP.md). Whole-system sequencing is owned by `aien-spark/aien-architecture/CURRENT_EXECUTION_PLAN.md`. See [PLAN_AUTHORITY.md](PLAN_AUTHORITY.md). |
| 4 | |
| 5 | **Status:** Reference Architectural Specification; execution order superseded by `../ROADMAP.md` |
| 6 | **Version:** 1.0.0 |
| 7 | **Governing Documents:** |
| 8 | - [AIENOS Governing Architecture](ARCHITECTURE.md) |
| 9 | - [AIENOS Final Architectural Blueprint (37 Sections)](BLUEPRINT.md) |
| 10 | - [AIENOS Technical Specification & Contracts (Phases 3–5)](PHASE_3_TO_5_SPECIFICATION.md) |
| 11 | - [AIENOS Systems Integration Sequence & Epistemic Calibration](SYSTEMS_INTEGRATION_SEQUENCE.md) |
| 12 | - [AIENOS Continuous-Existence Amendment](CONTINUOUS_EXISTENCE_AMENDMENT.md) (Operator-approved governing amendment: lifecycle semantics binding on all phases and the 10-gate sequence; gate order unchanged) |
| 13 | - [Architectural Decision Records (ADRs) Index](adr/README.md): |
| 14 | - [ADR 0001: Native Boot Milestone & Linux Island](adr/0001-native-boot-milestone-and-linux-island.md) |
| 15 | - [ADR 0002: Incumbent OS as Migration Environment](adr/0002-incumbent-os-as-migration-environment.md) |
| 16 | - [ADR 0003: Bootstrap Firmware Handoff & Minimal Object Store](adr/0003-bootstrap-firmware-handoff-and-minimal-object-store.md) |
| 17 | - [ADR 0004: Reversibility Definition & Network Effect Boundary](adr/0004-reversibility-definition-and-network-effect-boundary.md) |
| 18 | - [ADR 0005: Unified Memory C1 CoW & Reservation Accounting](adr/0005-unified-memory-c1-cow-and-reservation-accounting.md) |
| 19 | - [ADR 0006: Deterministic Recovery Core & Offline Operator Authority](adr/0006-deterministic-recovery-core-and-offline-operator-authority.md) |
| 20 | - [ADR 0007: Continuous Existence & Provisioning-Once](adr/0007-continuous-existence-provisioning-once.md) |
| 21 | |
| 22 | > **Foundational Mandate to the Engineering Agent:** |
| 23 | > *“You own the route; this document owns the destination.”* |
| 24 | |
| 25 | --- |
| 26 | |
| 27 | ## 0. Current Critical Path (revised 2026-09-25) |
| 28 | |
| 29 | The phases in section 1 remain the destination. This is the gate order being |
| 30 | executed now, adopted from the reviewed roadmap. The first vision is proven |
| 31 | only at M8. Status words: **done** = verified on this repository's evidence; |
| 32 | **built** = code merged and host-verified, never run on hardware; **pending** |
| 33 | = not started or blocked. Every **done** names its level: host-tested, in |
| 34 | QEMU, or on hardware (Machine 1). A QEMU result is never a hardware result. |
| 35 | |
| 36 | | Gate | Scope | Status | Evidence / blocker | |
| 37 | |---|---|---|---| |
| 38 | | **M0** Close Config A (**partial**) | Clean reference snapshot | done | PR #12: schema 3.0.0 bundle, all repositories clean | |
| 39 | | | Benchmark evidence | done | CPU baseline: Llama-3.2-1B Q4_K_M on 20 Arm cores, 256-token samples, mean decode 54.2 tokens/s | |
| 40 | | | Native-boot rollback | done in QEMU; hardware blocked | PR #126: `M0_NATIVE_ROLLBACK_QEMU: PASS` (real AAVMF `BootNext`/NVRAM, six rollback branches, gated by `scripts/verify_all.sh` step 6d); `M0_NATIVE_ROLLBACK_MACHINE1: BLOCKED` (reason = `HARDWARE_QUALIFICATION_BLOCKED_BY_TRUST_CHAIN`, [procedure](NATIVE_BOOT_ONE_TIME.md)). The M2 boot returned to Linux ([M2 evidence](../evidence/m2_first_boot_2026-09-24.md)) but ran with Secure Boot off, so it does not close this row ([audit](M0_NATIVE_BOOT_ROLLBACK_AUDIT.md)) | |
| 41 | | | Bootable recovery media | done on hardware (read-only inspection); no repair exercised | AIENOSRECOV boots with Secure Boot on and returns unattended (#53, [Gate 1 evidence](../evidence/gate1_machine1_selftest_2026-09-24.md)); PR #117: attended USB boot `RECOVERY_BOOT_GATE: PASS` on Machine 1, root and ESP mounted read-only, tools present, returned to Ubuntu; no filesystem repair or firmware mutation performed ([procedure](RECOVERY_MEDIA_MACHINE1.md), [evidence](../evidence/recovery_boot_machine1.md)) | |
| 42 | | **M1** UEFI/QEMU substrate | Automated emulator boot proof | done | PR #42 (SPCR/boot harness) and PR #44 (CI automation). Reaches EL2, discovers MADT/SPCR, reports kernel alive. (Note: distinct from TRUST-1 Gate 4 security test suite) | |
| 43 | | **M2A** Spark firmware handoff | Memory map into early allocator | done on hardware | PR #10; 184 descriptors, 36 conventional regions, 0 rejected ([M2 evidence](../evidence/m2_first_boot_2026-09-24.md)) | |
| 44 | | | GB10 PCI identity, BAR0, PMC_BOOT registers | built, not found on hardware | PR #11; pre-exit discovery reported `gb10: unavailable` although Linux sees it at `000f:01:00.0`. PR #125: read-only Linux characterization on Machine 1 ([evidence](../evidence/gb10_linux_readonly_2026-09-25.md)); no native AIENOS GB10 observation exists; the updated discovery path is built, not booted on hardware | |
| 45 | | | CPU topology from the ACPI MADT (efficiency classes) and boot-core MIDR | done on hardware | 10 cores in class 0, 10 in class 1; boot core class 0, MIDR part `0xd87` (Cortex-A725) ([M2 evidence](../evidence/m2_first_boot_2026-09-24.md)) | |
| 46 | | | Broader ACPI device discovery | pending | | |
| 47 | | **M2B** Human bring-up console | GOP framebuffer text after firmware exit | built, unconfirmed | PR #13; the report does not record post-exit drawing, so the operator photograph is the evidence | |
| 48 | | | UART at `0x16A00000` (bounded, Spark only) | built, not attempted | PR #13; skipped on the first boot because GB10 discovery failed | |
| 49 | | | USB keyboard (xHCI + HID) | pending | | |
| 50 | | **M2C** Hardware test automation | Exclusive Machine 1 key and ledger records in `aien-proof` | done on hardware | aien-sovereign-core PR #126; first boot staged and collected under `machine-1` (ledger events 83 to 85) | |
| 51 | | | Power/reset control, HDMI capture, USB input emulation | design proposed, wiring pending | [HARDWARE_TEST_RIG.md](HARDWARE_TEST_RIG.md) and [ADR 0011](adr/0011-machine-1-hardware-test-rig.md); Raspberry Pi controller, parts chosen, operator approval and wiring pending | |
| 52 | | **M3** Kernel isolation | MMU, exceptions, interrupts, timer, scheduler, IPC/capabilities, SMMUv3 DMA confinement, ABI v1 | done in QEMU; not run on Machine 1 | PRs #103–#115; [M3 canonical receipt](../evidence/m3_canonical_receipt.md) (`Overall: PASS`); ABI v1 frozen in [ADR 0013](adr/0013-aienos-abi-v1.md). Scheduler consumes M2A CPU topology | |
| 53 | | **SEED-0B** Native capability admission (Phase 2) | Signed Binary Artifact v0, admission, W^X EL0 execution, Admission Receipt v0, hostile matrix | done in QEMU (TEST-ONLY keys) | PRs #118–#122, #124, #127, #128, #138; `SEED_0B_QEMU: PASS` ([evidence](../evidence/seed0b_qemu_2026-09-25.md)) | |
| 54 | | | P2-9 Machine 1 qualification | prepared, not run | Blocked on the TRUST-1 owner-signed boot chain (#40) ([procedure](SEED0B_MACHINE1_QUALIFICATION.md)) | |
| 55 | | **M4** Storage and recovery | Native NVMe read | done in QEMU | PR #129; `QEMU_NVME: PASS` in SMMU-confined and fail-closed modes ([evidence](../evidence/p3_nvme_read_qemu_2026-09-25.md)) | |
| 56 | | | Native NVMe write and flush | done in QEMU | PR #132; `QEMU_NVME_RW: PASS` in both modes, persisted across a restart ([evidence](../evidence/p3_nvme_write_flush_qemu_2026-09-25.md)) | |
| 57 | | | Store root-write power-fail atomicity | done in QEMU at 4096-byte LBA; Machine 1 SSD does not meet it | PR #133; `QEMU_NVME_ATOMICITY_4K: PASS`; read-only Identify of the Machine 1 SSD gives `NATIVE_GB10_STORE_ROOT_ATOMICITY: FAIL` (512-byte LBA, one-block guarantee) ([evidence](../evidence/p3_nvme_atomicity_2026-09-25.md)) | |
| 58 | | | System Store v1 format and engine | done, host-tested | PR #130 format frozen in [ADR 0015](adr/0015-system-store-v1-format.md) with canonical vectors; PR #131 mount and transaction engine; PR #135 malformed-peer amendment (`STORE_MALFORMED_PEER_RECOVERY: PASS`, read-only `DegradedRecovery`) | |
| 59 | | | Store v1 over NVMe, crash and reboot | done in QEMU | PR #134; `STORE_V1_QEMU: PASS` at 4096-byte LBA ([evidence](../evidence/store_nvme_qemu_2026-09-25.md)); PR #136; `STORE_512B_CRASH_RECOVERY_QEMU: PASS` at 512-byte LBA ([evidence](../evidence/store_512b_qemu_2026-09-25.md)). `P3_STORE_QEMU` and `P3_STORE_NATIVE` are not claimed. PR #137 gates the NVMe read, write/flush, 4K atomicity and both Store-over-NVMe QEMU runs in `scripts/verify_all.sh` step 6e | |
| 60 | | | Continuity objects over Store v1 (Generation, agent identity and state, Cortex checkpoint/WAL, artifact references) | done in QEMU | PR #142 (continuity objects over Store v1, commit-before-observation, cold restart proof, `CONTINUITY_QEMU: PASS`, [evidence](../evidence/continuity_qemu_2026-09-25.md)); PR #143 (fail-closed checkpoint restore validation, preserves branch identity) | |
| 61 | | | Recovery Core ([ADR 0006](adr/0006-deterministic-recovery-core-and-offline-operator-authority.md)) | done in QEMU (TEST-ONLY keys) | PR #144; constant-time HMAC offline operator auth, deterministic inspection, authorized peer repair, authorized provisioning, identity-loss refusal (`RECOVERY_CORE_QEMU: PASS`, [evidence](../evidence/recovery_core_qemu_2026-09-25.md)) | |
| 62 | | | Storage on Machine 1 | pending | Waits for TRUST-1 and a decision on the 512-byte-LBA SSD | |
| 63 | | **M5** Encryption and identity | | pending | | |
| 64 | | **M6** Minimal wired networking | DHCP/static IP, ARP/NDP, IP, UDP/TCP, secure control transport | pending | Before the self-maintaining agent; Wi-Fi and Bluetooth later | |
| 65 | | **M7** AIEN runtime and native CPU inference | | pending | Compare against the M0 CPU baseline | |
| 66 | | **M8** Cortex and persistent agent | | pending | Host crates exist (`cortex`, `agent-state`) | |
| 67 | |
| 68 | **Overall gate status (2026-09-25):** |
| 69 | |
| 70 | ```text |
| 71 | M0 PARTIAL snapshot PASS, benchmark PASS, rollback PASS in QEMU (M0_NATIVE_ROLLBACK_QEMU: PASS, PR #126) and BLOCKED on Machine 1 (HARDWARE_QUALIFICATION_BLOCKED_BY_TRUST_CHAIN), recovery media RECOVERY_BOOT_GATE: PASS on Machine 1 (PR #117); Config A recovery_procedure stays documented_only until restore (Gate 1 items 12-14) is exercised |
| 72 | M1 (QEMU substrate) PASS automated QEMU boot in CI (PR #42, #44) |
| 73 | M2 PASS first native Spark boot |
| 74 | Machine 1 core PASS core operational baseline recorded (PR #41) |
| 75 | M3 PASS (QEMU) kernel isolation, PRs #103-#115, evidence/m3_canonical_receipt.md; not run on Machine 1 |
| 76 | SEED-0B (Phase 2) PASS (QEMU) SEED_0B_QEMU: PASS, TEST-ONLY keys (evidence/seed0b_qemu_2026-09-25.md); P2-9 Machine 1 prepared, not run, blocked on TRUST-1 |
| 77 | M4 PASS (QEMU) QEMU: QEMU_NVME, QEMU_NVME_RW, QEMU_NVME_ATOMICITY_4K, STORE_V1_QEMU, STORE_512B_CRASH_RECOVERY_QEMU, CONTINUITY_QEMU, RECOVERY_CORE_QEMU all PASS (PRs #129, #132-#134, #136, #142-#144; gated by verify_all step 6e); Machine 1 storage pending (waits on TRUST-1) |
| 78 | GB10 lane LINUX ONLY read-only characterization on Machine 1 (PR #125); no native AIENOS GB10 observation |
| 79 | TRUST-1 Gate 0 DECLARED baseline recorded (PR #46); independent key access pending attended proof |
| 80 | TRUST-1 Gate 1 PARTIAL stick boots on Machine 1 with Secure Boot on, inspects SB/PCRs/disks, returns (items 1-5, 7, 8, 15, 16 PASS; 6 partial); repair tooling added ([procedure](RECOVERY_MEDIA_MACHINE1.md)); items 9-14 + artifact round trip pending |
| 81 | TRUST-1 Gate 4 TOOLING PASS swTPM + soak + fault injection (PR #48); 100-boot campaign pending |
| 82 | TRUST-1 path: Gate 0 key proof (decrypt on MacBook) + Gate 1 items 9-14 -> Gate 2 TPM campaign -> Gate 3 owner keys (runs in parallel with the plan below) |
| 83 | NEXT: M5 key hierarchy and encrypted-store format design (plan item 2) |
| 84 | ``` |
| 85 | |
| 86 | **Adopted forward plan, in order:** |
| 87 | |
| 88 | 1. **M4 continuity & recovery:** COMPLETE in QEMU (PRs #142-#144). Same identity, memory, and lineage survive cold restarts and commit checkpoints; deterministic Recovery Core handles degraded stores, offline operator repair/provisioning, and halts on identity loss without minting. |
| 89 | 2. **M5 encryption and identity:** the key hierarchy and encrypted-store format |
| 90 | are decided with the operator before implementation. |
| 91 | 3. **Minimal M7 CPU inference:** one model, correct and acceptable; |
| 92 | optimization waits until after M8. |
| 93 | 5. **M8 persistent agent in QEMU.** M6 networking runs in parallel. |
| 94 | 6. **TRUST-1 Gates 0–9** run in parallel (operator-attended hardware steps). |
| 95 | 7. **One consolidated Machine 1 qualification wave** after TRUST-1 Gate 7: |
| 96 | native-boot rollback, SEED-0B (P2-9), isolation, Store on the real NVMe, |
| 97 | NIC, inference and the M8 demo. |
| 98 | |
| 99 | Public roadmap and contributor entry points: [ROADMAP.md](../ROADMAP.md). |
| 100 | |
| 101 | **Secure Boot (operator decisions 2026-09-24, escalation trigger 1):** it was |
| 102 | disabled for the first native boot, which passed. Disabling it changed TPM |
| 103 | PCR 7, so the TPM-sealed private-storage key and vault credential on Machine 1 |
| 104 | no longer unsealed and dependent services failed. **Secure Boot is back on**, |
| 105 | and the secrets must not be re-sealed to ignore it. Next real-hardware boots |
| 106 | wait for the owner-controlled boot chain: operator signing key, signed AIENOS |
| 107 | loader and kernel, defined TPM PCR policy, independent recovery key, tested |
| 108 | recovery, then secrets re-sealed to that policy. Development continues in QEMU |
| 109 | (M1). |
| 110 | |
| 111 | **Accelerator lane:** device characterization (PCI identity, BAR layout, |
| 112 | firmware interfaces, register discovery) is allowed now. Command submission, |
| 113 | GSP interaction, GPU memory management and GPU inference stay a separate, |
| 114 | non-blocking program (see [GB10_NATIVE_STATUS.md](GB10_NATIVE_STATUS.md)). |
| 115 | |
| 116 | **Operator decisions on the M2 bring-up path (2026-09-24):** |
| 117 | - The post-handoff `AienosBootReportV1` firmware report is a temporary |
| 118 | bootstrap exception to escalation trigger 11 under the conditions in |
| 119 | [ADR 0008](adr/0008-temporary-bring-up-firmware-report-exception.md). It is |
| 120 | removed once a native evidence path exists. |
| 121 | - `scripts/stage_one_time_boot.sh --apply` sets `BootNext` and adds a boot |
| 122 | entry outside BootOrder. It runs only when the operator invokes it, under |
| 123 | `aien-proof hold --resource machine-1`. |
| 124 | |
| 125 | **M2 gate (first native boot):** Machine 1 leaves firmware, enters native |
| 126 | AIENOS code with no Linux underneath, produces independently recoverable |
| 127 | evidence that it did so, and returns to the existing system without damaging |
| 128 | it. `scripts/collect_boot_report.sh` prints `M2_GATE: PASS` only when all of |
| 129 | those checks hold. |
| 130 | |
| 131 | **Result 2026-09-24: `M2_GATE: PASS`** on the first attended boot ([evidence](../evidence/m2_first_boot_2026-09-24.md)). Open items: GB10 discovery before firmware exit, the pre-exit report file, recording post-exit screen drawing (covered by rig HDMI capture once wired, see [HARDWARE_TEST_RIG.md](HARDWARE_TEST_RIG.md)), UART output, and bootable recovery media. |
| 132 | |
| 133 | --- |
| 134 | |
| 135 | ## 1. Master Phased Execution Framework |
| 136 | |
| 137 | The AIENOS master execution sequence progresses across eight distinct phases. The order expresses architectural dependency, not administrative bureaucracy. Each phase establishes sovereign deliverables, enforceable invariants, objective acceptance tests, and explicit escalation triggers. |
| 138 | |
| 139 | ```text |
| 140 | PHASE 1: Freeze Reality (Config A Ubuntu Reference Baseline) |
| 141 | ↓ |
| 142 | PHASE 2: Native AIENOS Boot (Minimal Bare-Metal Substrate) |
| 143 | ↓ |
| 144 | PHASE 3: The Agent Wakes Up (Persistent Agent & Early Memory) |
| 145 | ↓ |
| 146 | PHASE 4: Native System Intelligence (Capability Graph & AEGIS) |
| 147 | ↓ |
| 148 | PHASE 5: Native Hardware Acceleration (Sovereignty & A/B/C Competition) |
| 149 | ↓ |
| 150 | PHASE 6: Migration System (Machine Capsule & Reversible Install) |
| 151 | ↓ |
| 152 | PHASE 7: Multi-Hardware AIENOS (BSP Expansion Beyond DGX Spark) |
| 153 | ↓ |
| 154 | PHASE 8: Personal Fabric (Distributed Nodes & State Mobility) |
| 155 | ↓ |
| 156 | MATURE AIENOS: Sovereign Agent-Native Personal Computing |
| 157 | ``` |
| 158 | |
| 159 | --- |
| 160 | |
| 161 | ## 2. Core Architectural Invariants Governing All Phases |
| 162 | |
| 163 | Every implementation artifact must preserve these eleven foundational invariants: |
| 164 | |
| 165 | 1. **Model is Never the Kernel (Blueprint §6, ARCHITECTURE.md §1, ADR 0006):** Kernel schedules CPU, manages memory, services interrupts, mounts storage, authenticates the operator with offline credentials, and executes deterministic recovery with zero AI models loaded. |
| 166 | 2. **Separation of Authority and Proposal (Blueprint §5, ARCHITECTURE.md §1, ADR 0004):** The agent cannot authorize itself. Irreversible actions and external effects strictly flow: `Model Proposal -> EffectIntent -> AEGIS Policy -> Effect Broker -> Driver`. |
| 167 | 3. **Identity vs. Execution Separation & C1 Branch Isolation (Blueprint §2, §28, ADR 0005):** Losing physical inference state (GPU crash, bus reset, KV cache eviction, process restart) costs computation, never logical identity. Physical KV blocks are managed via explicit block tables and reservations; child branch memory corruption can never leak into parent state; logical token lineage survives indefinitely. |
| 168 | 4. **Sovereign Trusted Base (Blueprint §4, ARCHITECTURE.md §3, ADR 0006):** Boot, kernel, memory management, scheduler, storage core, cryptography, recovery core, and AEGIS build from inspectable open-source code with zero mandatory proprietary or cloud dependencies. |
| 169 | 5. **Compatibility as Island, Not Foundation (Blueprint §8, ADR 0001):** Compatibility layers (e.g. minimal Linux GPU island / Config B) are temporary acceleration mechanisms. Native Config C must never depend on Config B artifacts, CUDA userspace, or Linux kernel modules; removing Config B leaves native AIENOS fully buildable, bootable, and recoverable. |
| 170 | 6. **Reversible Autonomy & Explicit Effect Boundary (Blueprint §12, ARCHITECTURE.md §5, ADR 0004):** Agent is fully autonomous inside reversible Worlds where state changes remain under AIENOS transactional control. All outbound network traffic, telemetry, and uncheckpointed device state changes cross into AEGIS as external effects requiring explicit capability authorization, even when read-only. |
| 171 | 7. **Capability-Centric Computing (Blueprint §13, ARCHITECTURE.md §2):** Functionality is organized into composable capabilities (`filesystem.read`, `mail.send`, `code.build`). Applications do not own underlying capabilities or personal data; personal data is native OS state. |
| 172 | 8. **Replaceable Model Intelligence (Blueprint §14):** The Model ABI decouples weights, tokenizers, backends, and sampling from agent identity. Changing models does not redefine agent identity. |
| 173 | 9. **Constrained "Fastest Wins" (Blueprint §31, ADR 0001):** Among implementations satisfying correctness, security, sovereignty, and interface contracts, the fastest measured implementation wins. Speed never overrides sovereignty. |
| 174 | 10. **Controlled Self-Improvement (Blueprint §32, ARCHITECTURE.md §5):** Recursive self-improvement occurs strictly out-of-band in isolated Worlds via candidate evaluation, signing, and canary deployment; the agent never mutates the running kernel in-place. |
| 175 | 11. **Continuous Existence / Provisioning-Once (Continuous-Existence Amendment, ADR 0007):** AIEN is provisioned once; boot, reboot, sleep, model reload, kernel restart, hardware failure, and migration are execution-state transitions—not agent creation events. Cold boot initializes hardware and must never silently mint a replacement `LogicalAgentId`. Losing physical execution state costs recovery or computation, not identity. |
| 176 | |
| 177 | --- |
| 178 | |
| 179 | ## 3. Autonomous Engineering Protocol & Escalation Triggers |
| 180 | |
| 181 | Engineering agents operate autonomously within milestone boundaries (Blueprint §4, §29, §30): |
| 182 | - **Autonomous Authority:** Agents freely select data structures, crate layouts, memory allocators, scheduling algorithms, low-level assembly routines, build scripts, and optimization passes. |
| 183 | - **Goal Immutability:** If an implementation approach fails, the agent iterates or replaces the implementation (Blueprint §30); the destination milestone and architectural invariants remain fixed. |
| 184 | - **The 15 Mandatory Escalation Triggers (Requiring Immediate Operator Signoff):** |
| 185 | 1. Alteration of the root of trust, Secure Boot policy, or cryptographic boot verification chain. |
| 186 | 2. Broadening of agent, service, or operator authority, autonomous expansion of capability grants, elevation of synthetic process privileges, removal of AEGIS policy gates, or bypass of the Effect Broker without explicit operator cryptographic authorization. |
| 187 | 3. Modification of persistent identity semantics or the Agent State ABI hierarchy. |
| 188 | 4. Weakening of security boundaries, memory isolation, or J-Space World containment. |
| 189 | 5. Introduction of irreversible data formats into Cortex or persistent storage. |
| 190 | 6. Permitting compatibility infrastructure (e.g. Linux or proprietary CUDA) to become a mandatory prerequisite for native AIENOS build, boot, or recovery (ADR 0001). |
| 191 | 7. Introducing closed-source proprietary binaries, external cloud licensing, or opaque compiler toolchains into the trusted base. |
| 192 | 8. Removing or disabling recovery media, fallback boot targets, or system rollback guarantees. |
| 193 | 9. Alteration of externally visible protocol commitments or API contracts. |
| 194 | 10. Structural modifications to the 7-layer architecture stack. |
| 195 | 11. Retaining firmware/UEFI runtime storage services beyond boot handoff, or introducing general-purpose POSIX filesystem dependencies (e.g. ext4, btrfs) instead of the native minimal persistent object store (ADR 0003). |
| 196 | 12. Bypassing AEGIS capability evaluation for outbound network traffic, external telemetry, or uncheckpointed device effects under the pretext of 'reversible' execution within a World (ADR 0004). |
| 197 | 13. Unstructured or untracked physical KV memory allocation, admitting multi-branch inference steps without transactional KV block reservations, or violating C1 CoW block refcounting rules (ADR 0005). |
| 198 | 14. Introducing AI model inference, cloud identity, or network dependencies into the Recovery Core, health milestone verification, A/B slot rollback, or WAL corruption repair (ADR 0006). |
| 199 | 15. Silently creating a replacement `LogicalAgentId` on boot, wake, recovery, or migration when durable identity state is missing or unverifiable; treating cold boot, sleep, model reload, kernel restart, or hardware failure as agent-creation events (Continuous-Existence Amendment, ADR 0007). |
| 200 | |
| 201 | --- |
| 202 | |
| 203 | ## 4. Detailed Phase Specifications |
| 204 | |
| 205 | ### Phase 1: Freeze Reality (Config A Reference Baseline) |
| 206 | - **Blueprint Sections Mapped:** §15 (Phase 1 Freeze reality), §21 (Machine Capsule), §27 (Evidence Architecture). |
| 207 | - **Secondary Sections:** §1 (Vision), §4 (Engineering Boundaries), §36 (Execution Sequence). |
| 208 | - **Governing ADRs:** [ADR 0001](adr/0001-native-boot-milestone-and-linux-island.md) (defines Config A as the frozen Ubuntu reference baseline), [ADR 0002](adr/0002-incumbent-os-as-migration-environment.md) (host inspection generates Machine Capsule without host runtime dependencies). |
| 209 | - **Mission:** Freeze the operational DGX Spark / Linux reference baseline (`Config A`) before writing native code, establishing an auditable, reproducible ground truth for all performance and sovereignty claims. |
| 210 | - **Deliverables & Artifacts:** |
| 211 | - `scripts/freeze_reality.sh`: Non-destructive host inspection script capturing hardware identity, firmware, kernel parameters, runtime libraries, and workspace commit digests. |
| 212 | - `evidence/config_a_reference_bundle.json`: Verifiable reference bundle containing the complete 15-component Section 21 Machine Capsule. |
| 213 | - `schemas/machine_capsule.schema.json`: Formal JSON schema enforcing Section 21 specification. |
| 214 | - `scripts/verify_evidence.sh`: Automated schema and cryptographic SHA-256 validation script. |
| 215 | - **Architectural Invariants:** |
| 216 | - Non-destructive execution: zero writes outside `evidence/`; no modifications to host disks, boot entries, NVRAM, or EFI partitions. |
| 217 | - 100% empirical truth: no hardware descriptors may be mocked, synthesized, or assumed. |
| 218 | - Self-contained verifiability: verifiable with standard open-source tools (`jq`, `sha256sum`). |
| 219 | - **Acceptance Criteria:** |
| 220 | - `bash scripts/freeze_reality.sh` exits with return code `0`. |
| 221 | - `evidence/config_a_reference_bundle.json` exists, is valid JSON, and contains non-empty sections for all 15 Machine Capsule components. |
| 222 | - `bash scripts/verify_evidence.sh evidence/config_a_reference_bundle.json` exits with return code `0`, confirming schema validity and SHA-256 self-consistency. |
| 223 | - **Escalation Triggers:** |
| 224 | - Hardware inspection requiring destructive host actions or privileged modifications. |
| 225 | - Any unreadable, inaccessible, or non-verifiable hardware descriptor required by the Blueprint Section 21 Machine Capsule specification (no descriptors may be mocked, synthesized, or assumed). |
| 226 | - Any write operation or modification to host storage, partition tables, EFI boot entries, or host NVRAM during evidence capture. |
| 227 | |
| 228 | --- |
| 229 | |
| 230 | ### Phase 2: Native AIENOS Boot (Minimal Bare-Metal Substrate) |
| 231 | - **Blueprint Sections Mapped:** §6 (The AIENOS Kernel), §16 (Phase 2 Native AIENOS boot). |
| 232 | - **Secondary Sections:** §4 (Sovereignty Boundaries), §5 (Boot & Trust Substrate), §7 (Hardware Ownership), §27 (Evidence Architecture). |
| 233 | - **Governing ADRs:** [ADR 0001](adr/0001-native-boot-milestone-and-linux-island.md) (mandates native AIENOS boot on bare-metal ARM64 as primary milestone; minimal Linux wrappers prohibited as native substrate), [ADR 0003](adr/0003-bootstrap-firmware-handoff-and-minimal-object-store.md) (firmware loads boot bundle; storage services are bootstrap only), [ADR 0006](adr/0006-deterministic-recovery-core-and-offline-operator-authority.md) (deterministic non-model Recovery Core and raw panic crash records). |
| 234 | - **Mission:** Power on the DGX Spark and boot the sovereign `no_std` AIENOS kernel targeting 64-bit ARM (`aarch64`) directly on bare metal without Linux hosting the system. |
| 235 | - **Deliverables & Artifacts:** |
| 236 | - `crates/aienos-kernel/Cargo.toml`: Standalone `no_std`, `no_main` bare-metal kernel crate targeting `aarch64-unknown-none`. |
| 237 | - `crates/aienos-kernel/linker.ld`: Sovereign ARM64 linker script enforcing clean segment separation (`.text`, `.rodata`, `.data`, `.bss`, `.stack`) and deterministic entry point `_start`. |
| 238 | - `crates/aienos-kernel/src/main.rs`: Bare-metal CPU initialization, early stack setup, and boot flow. |
| 239 | - `crates/aienos-kernel/src/drivers/uart.rs`: MMIO serial console driver targeting the physical Tegra/16550 UART at MMIO base `0x16A00000` (stride 4, 32-bit width, 921600 baud). |
| 240 | - `crates/aienos-kernel/src/panic.rs`: Sovereign panic handler emitting deterministic telemetry to UART and executing an infinite `wfi` halt loop. |
| 241 | - `scripts/verify_all.sh`: End-to-end verification script compiling the kernel and verifying evidence. |
| 242 | - `evidence/build_and_test_evidence.log`: Verifiable compilation and test execution log. |
| 243 | - **Architectural Invariants:** |
| 244 | - Model is Never the Kernel (Blueprint §6): Boot, memory initialization, interrupt setup, and panic handling proceed with zero AI models loaded. |
| 245 | - Sovereign Toolchain (Blueprint §4): Zero dependencies on Linux standard library (`std`), glibc, musl, or Linux syscalls. |
| 246 | - Deterministic Panic: Panic handler must disable interrupts (`daifset`) and halt CPU without external runtime shims. |
| 247 | - **Acceptance Criteria:** |
| 248 | - `cargo check --target aarch64-unknown-none` within `crates/aienos-kernel` exits with status `0` and zero warnings. |
| 249 | - `cargo build --target aarch64-unknown-none --release` produces valid bare-metal ELF binary. |
| 250 | - Linker layout inspection verifies that `_start` is at the expected entry address and segments do not overlap. |
| 251 | - Serial driver writes ASCII telemetry to MMIO register base `0x16A00000`. |
| 252 | - **Escalation Triggers:** |
| 253 | - Any compilation requirement introducing dependencies on Linux libc, POSIX headers, or host kernel modules. |
| 254 | - Firmware incompatibility requiring proprietary binary shims to achieve early CPU control. |
| 255 | - Any modification, deletion, or tampering with host disk partitions, the physical EFI system partition (`/boot/efi`), host bootloaders, or firmware NVRAM bootloader variables (`efibootmgr`, `/sys/firmware/efi/efivars`, `BootOrder`, `BootNext`) outside the repository workspace without prior operator cryptographic authorization. |
| 256 | - Retaining UEFI/firmware runtime storage services as an AIENOS runtime dependency beyond the initial immutable boot bundle handoff (violating ADR 0003). |
| 257 | - Introducing AI model or external network dependencies into early kernel panic handling or recovery console routines (violating ADR 0006). |
| 258 | |
| 259 | --- |
| 260 | |
| 261 | ### Phase 3: The Agent Wakes Up (Persistent Agent & Early Memory) |
| 262 | - **Blueprint Sections Mapped:** §2 (Central Architectural Principle), §11 (Cortex), §14 (Model ABI), §17 (Phase 3 The agent wakes up). |
| 263 | - **Secondary Sections:** §5 (Boot Trust), §9 (Agent State ABI), §33 (UX Feel). |
| 264 | - **Governing ADRs:** [ADR 0003](adr/0003-bootstrap-firmware-handoff-and-minimal-object-store.md) (minimal persistent object store for model extents and Cortex WAL), [ADR 0007](adr/0007-continuous-existence-provisioning-once.md) (continuous existence; provisioning is not boot). |
| 265 | - **Technical Specification:** [Phase 3 Technical Specification](PHASE_3_TO_5_SPECIFICATION.md#2-phase-3-the-persistent-agent-wakes-up) (Agent State ABI & Cortex Epistemic Store). |
| 266 | - **Mission:** Initialize the AIEN Neural Runtime on the native kernel, load a local CPU inference model, wake the persistent resident AIEN agent, and verify that Cortex persists epistemic memory across reboots. |
| 267 | - **Deliverables & Artifacts:** |
| 268 | - `crates/aienos-agent-state/`: Foundational Persistent Agent State ABI managing sovereign `LogicalAgentId` and execution incarnation decoupling (`ExecutionIncarnation`). |
| 269 | - `crates/aienos-runtime/`: Native neural runtime executive operating directly on kernel substrate. |
| 270 | - `crates/aienos-model-abi/`: Model ABI implementation abstracting weights, tokenizers, and execution backends from agent identity. |
| 271 | - `crates/aienos-cortex/`: Early durable Cortex storage engine supporting write-ahead epistemic logging on NVMe storage. |
| 272 | - Local CPU inference backend executing quantized language model (e.g. Llama-3.2-1B / Qwen). |
| 273 | - Native console dialogue interface enabling direct operator-agent interaction. |
| 274 | - `evidence/phase3_reboot_persistence_receipt.json`: Verifiable proof of state retention across soft reboot. |
| 275 | - **Architectural Invariants:** |
| 276 | - Identity vs Execution Separation (Blueprint §2): Restarting the model, clearing KV cache, or rebooting the machine must not create a new agent identity. |
| 277 | - Provisioning-Once (Continuous-Existence Amendment, ADR 0007): Only initial provisioning may mint a durable `LogicalAgentId`; every later start resumes that identity or stops in Recovery Core. |
| 278 | - Self-Diagnostic Focus (Blueprint §17): The first agent's primary duty is observing, diagnosing, and repairing AIENOS itself; general conversational features are secondary. |
| 279 | - Model Replaceability (Blueprint §14): Changing model weights or backend leaves agent identity and Cortex history intact. |
| 280 | - **Acceptance Criteria:** |
| 281 | - Machine boots natively -> Runtime starts -> Local model weights load into RAM -> Agent prompts operator on console within 10 seconds. |
| 282 | - Operator issues diagnostic command via console; agent queries kernel tables and returns factual response. |
| 283 | - System executes reboot; agent wakes, loads previous session context from Cortex, and acknowledges continuity. |
| 284 | - Full power cycle: same durable `LogicalAgentId`, committed Cortex/branch/task state restored, uncommitted tails handled by WAL rules, no silent replacement identity (Gate 6 continuous-existence proof). |
| 285 | - Model unload/reload (or model swap) under the same `LogicalAgentId` preserves conversation and durable state continuity (Gate 7). |
| 286 | - **Escalation Triggers:** |
| 287 | - Failure of agent identity continuity across system reboot. |
| 288 | - Any boot, wake, recovery, or migration path that silently creates a replacement `LogicalAgentId` instead of restoring or refusing (ADR 0007). |
| 289 | - Model weights or runtime demanding network connection or cloud licensing servers to execute. |
| 290 | - Memory corruption during CPU weight ingestion that forces fallback to Linux userspace. |
| 291 | |
| 292 | --- |
| 293 | |
| 294 | ### Phase 4: Native System Intelligence (Capability Graph & System Control) |
| 295 | - **Blueprint Sections Mapped:** §3 (Final System Architecture), §5 (Boot & Trust / AEGIS), §9 (Agent State ABI), §10 (Copy-on-Write Prefix Sharing), §12 (Worlds / J-Space), §13 (Capability Graph), §18 (Phase 4 Native system intelligence), §28 (C1 Invariant Foundation), §32 (Self-Improvement). |
| 296 | - **Secondary Sections:** §11 (Cortex Deep Tiering), §35 (Strategic Endpoint). |
| 297 | - **Mission:** Transform the resident agent into the primary system interface and coordinator via dynamic Capability Graph composition. Enforce AEGIS policy control and J-Space reversible execution Worlds. Formalize the Agent State ABI and C1 Copy-on-Write prefix sharing. |
| 298 | - **Deliverables & Artifacts:** |
| 299 | - `crates/aienos-aegis/`: AEGIS capability authorization engine enforcing deterministic security policies. |
| 300 | - `crates/aienos-broker/`: Effect Broker translating validated `EffectIntent` into concrete device/storage/network actions. |
| 301 | - `crates/aienos-capabilities/`: Capability Graph registry managing dynamic capability composition. |
| 302 | - `crates/aienos-jspace/`: Reversible World sandbox subsystem with snapshotting, checkpointing, and instant rollback. |
| 303 | - `crates/aienos-state/`: Agent State ABI managing `LogicalAgentId`, `LogicalBranchId`, and physical `SequenceId`. |
| 304 | - `crates/aienos-c1/`: C1 verification suite proving branch isolation, memory conservation, and parent survival. |
| 305 | - **Architectural Invariants:** |
| 306 | - Agent Cannot Authorize Itself (Blueprint §5): Every irreversible system action flows `EffectIntent -> AEGIS -> Effect Broker`. |
| 307 | - Reversible Autonomy (Blueprint §12): Total freedom inside reversible Worlds; strict cryptographic approval at irreversible boundaries. |
| 308 | - Mathematical Branch Isolation (Blueprint §28): Reasoning branches share physical prefix pages; child branch memory corruption can never leak into parent state. |
| 309 | - **Acceptance Criteria:** |
| 310 | - Agent processes natural language operator intent ("find memory leak") by generating an isolated World, running diagnostics, and proposing a safe resolution diff. |
| 311 | - AEGIS policy interceptor denies an unauthorized `EffectIntent` (e.g. disk write to reserved partition) with an auditable cryptographic receipt. |
| 312 | - C1 benchmark runs 100 concurrent reasoning branches sharing a 100K token prefix; memory consumption scales sub-linearly with zero state cross-contamination. |
| 313 | - Failed build experiment inside a World rolls back cleanly with zero modified bytes on the root filesystem. |
| 314 | - **Escalation Triggers:** |
| 315 | - Any architectural bypass where an agent executes an external effect without passing through AEGIS. |
| 316 | - Silent broadening of operator permissions or capability grant escalation. |
| 317 | - State leak across reasoning branches violating the C1 invariant. |
| 318 | |
| 319 | --- |
| 320 | |
| 321 | ### Phase 5: Native Hardware Acceleration (GPU/NVLink Ownership & A/B/C Competition) |
| 322 | - **Blueprint Sections Mapped:** §7 (Hardware Sovereignty), §8 (Compatibility Islands), §19 (Phase 5 Native hardware acceleration), §31 ("Fastest Wins" Properly Defined). |
| 323 | - **Secondary Sections:** §10 (CoW Prefix Sharing), §27 (Evidence Architecture). |
| 324 | - **Governing ADR:** [ADR 0001](adr/0001-native-boot-milestone-and-linux-island.md) (defines 3-way configuration competition Config A vs B vs C; Config B must never become prerequisite for Config C; defines 9-11 benchmark metrics and scoped 'fastest wins'). |
| 325 | - **Mission:** Progressively transition hot hardware paths (accelerator, NVLink-C2C, NVMe storage, network) to native AIENOS ownership. Execute the standardized A/B/C benchmark competition across Config A (Ubuntu baseline), Config B (Minimal Linux compatibility island), and Config C (Native AIENOS bare-metal substrate) measuring the original performance metrics plus continuous-existence lifecycle metrics (wake-to-continuation and reconstruction latencies). |
| 326 | - **Deliverables & Artifacts:** |
| 327 | - `crates/aienos-accel/`: Native GPU/NPU memory management and execution driver for NVIDIA Blackwell GB10 over NVLink-C2C. |
| 328 | - `crates/aienos-nvme/`: Direct high-performance NVMe driver bypassing general-purpose VFS layers. |
| 329 | - `crates/aienos-net/`: Native network driver (Realtek RTL8127 2.5GbE). |
| 330 | - `scripts/benchmark_abc.sh`: Non-interactive benchmark suite executing identical prompt/model envelopes across Configs A, B, and C. |
| 331 | - `evidence/benchmark_abc_receipt.json`: Standardized evaluation receipt documenting comparative performance and lifecycle metrics. |
| 332 | - **Architectural Invariants:** |
| 333 | - Sovereignty Precedes Speed (Blueprint §31, ADR 0001): "Fastest wins" applies ONLY among implementations satisfying correctness, security, and sovereignty contracts. |
| 334 | - Compatibility Island Isolation (Blueprint §8, ADR 0001): Config B is a temporary control experiment and Era II island; removing it must leave Config C fully operational. |
| 335 | - Zero Closed Blobs in Trusted Base: Native accelerator interfaces must not introduce proprietary, uninspected userspace binaries into the core kernel address space. |
| 336 | - Accelerator State Is Class B (Continuous-Existence Amendment, ADR 0007): GPU/accelerator residency is reconstructible physical state; identity never depends on preserving it. |
| 337 | - **Acceptance Criteria:** |
| 338 | - Standardized benchmark executes across Config A, Config B, and Config C measuring: |
| 339 | 1. Cold boot to agent ready (ms) |
| 340 | 2. Agent ready to model ready (ms) |
| 341 | 3. TTFT (Time to First Token, ms) |
| 342 | 4. Steady-state throughput (tokens/s) |
| 343 | 5. Idle physical memory footprint (MB) |
| 344 | 6. Available workload memory (MB) |
| 345 | 7. Scheduler jitter (µs) |
| 346 | 8. Power consumption (W) |
| 347 | 9. Branch creation latency (µs) |
| 348 | 10. Branch physical memory cost (KB) |
| 349 | 11. State restore time (ms) |
| 350 | 12. Wake-to-continuation latency (ms; Continuous-Existence Amendment lifecycle metric) |
| 351 | 13. Cold recovery → AIEN logical state restored (ms) |
| 352 | 14. Model reconstruction latency (ms) |
| 353 | 15. Branch reconstruction latency (ms) |
| 354 | 16. Cortex recovery latency (ms) |
| 355 | - Config C demonstrates measurable latency, jitter, or memory density improvements over Config A while maintaining 100% test pass rates. |
| 356 | - **Escalation Triggers:** |
| 357 | - Proposal to declare Config B (Linux island) as the permanent architecture. |
| 358 | - Introduction of proprietary closed runtime blobs that cannot be isolated into an optional island. |
| 359 | - Benchmark regression where native paths fail correctness or safety requirements in pursuit of throughput. |
| 360 | |
| 361 | --- |
| 362 | |
| 363 | ### Phase 6: Migration System (Machine Capsule, Dual-Boot & Reversible Install) |
| 364 | - **Blueprint Sections Mapped:** §20 (Phase 6 Migration system), §21 (Machine Capsule), §22 (Reversible installation), §23 (Progressive escape from incumbent OS), §34 (The adoption proposition), ADR 0002. |
| 365 | - **Secondary Sections:** §4 (Sovereignty Boundaries), §5 (Boot Trust). |
| 366 | - **Governing ADR:** [ADR 0002](adr/0002-incumbent-os-as-migration-environment.md) (governs progressive escape from incumbent OS; AIENOS may learn from host but must not require host to survive). |
| 367 | - **Mission:** Deploy host-side bootstrap tools on incumbent operating systems (Windows, macOS, Linux). Scaffolding inventories the machine, generates a Section 21 Machine Capsule, installs AIENOS with reversible dual-boot, and guides the operator through the 7-stage progressive escape lifecycle. |
| 368 | - **Deliverables & Artifacts:** |
| 369 | - `tools/aienos-installer/`: Host-side inspection and partition setup CLI. |
| 370 | - Machine Capsule compiler validating host hardware against AIENOS BSP requirements. |
| 371 | - Reversible EFI dual-boot installer configuring side-by-side boot entries without overwriting host bootloaders. |
| 372 | - Automated watchdog recovery harness reverting to the incumbent OS if native boot fails. |
| 373 | - Adoption lifecycle tracker managing progression across Stages 1 through 7. |
| 374 | - **Architectural Invariants:** |
| 375 | - Host as Scaffolding (Blueprint §20, ADR 0002): AIENOS may learn from the host, but must never require the host to survive once installed. |
| 376 | - Reversible Installation (Blueprint §22): The incumbent OS bootloader, partition table, and user data remain intact and bootable at all times. |
| 377 | - Non-Coercive Migration (Blueprint §23): AIENOS never forces host removal; the operator retains full sovereignty over migration stages. |
| 378 | - **Acceptance Criteria:** |
| 379 | - Installer runs non-destructively on host OS; outputs valid Section 21 Machine Capsule. |
| 380 | - Dual-boot partition carved and formatted; EFI boot entry registered with watchdog counter. |
| 381 | - Test boot into AIENOS verifies kernel, storage, input, and model loading. |
| 382 | - Simulated kernel panic during boot triggers watchdog reset into incumbent OS bootloader. |
| 383 | - **Escalation Triggers:** |
| 384 | - Incompatible host disk layout (e.g. unsupported software RAID or locked bootloader) that cannot be safely partitioned. |
| 385 | - Host inspection identifying proprietary peripherals lacking open documentation or safe compatibility fallback. |
| 386 | - Accidental modification or corruption of host OS partitions. |
| 387 | |
| 388 | --- |
| 389 | |
| 390 | ### Phase 7: Multi-Hardware AIENOS (BSP Expansion Beyond DGX Spark) |
| 391 | - **Blueprint Sections Mapped:** §7 (Hardware Sovereignty), §21 (Machine Capsule), §24 (Phase 7 Multi-hardware AIENOS). |
| 392 | - **Secondary Sections:** §2 (Identity Separation), §14 (Model ABI). |
| 393 | - **Mission:** Decouple AIENOS from DGX Spark hardware assumptions. Generalize kernel and runtime abstractions into a formal Hardware Abstraction Layer (HAL) and Board Support Packages (BSPs) for desktop x86_64, generic ARM64, AMD accelerators, and Apple silicon. |
| 394 | - **Deliverables & Artifacts:** |
| 395 | - `crates/aienos-hal/`: Hardware Abstraction Layer defining standard CPU, MMU, interrupt, timer, and DMA interfaces. |
| 396 | - `crates/bsp-dgx-spark/`: Reference BSP for NVIDIA Grace Blackwell P4242 board. |
| 397 | - `crates/bsp-x86_64/`: Standard PC / ACPI Board Support Package. |
| 398 | - `crates/bsp-arm64-generic/`: Generic ARM64 Board Support Package. |
| 399 | - Cross-architecture automated emulation test harness (QEMU x86_64 and QEMU aarch64). |
| 400 | - Platform portability receipts (`evidence/platform_matrix_receipt.json`). |
| 401 | - **Architectural Invariants:** |
| 402 | - Hardware Independence (Blueprint §24): Spark is a reference machine, not AIEN's identity. Core kernel logic, AEGIS, Cortex, and Agent State ABI are strictly platform-agnostic. |
| 403 | - Uniform Contract Enforcement: All supported platforms must guarantee identical behavioral semantics for capability execution, branch isolation, and memory persistence. |
| 404 | - **Acceptance Criteria:** |
| 405 | - `cargo test --workspace` passes across both `aarch64` and `x86_64` targets. |
| 406 | - Automated QEMU test boots AIENOS on both `x86_64` and `aarch64`, initializing serial consoles, memory maps, and panic handlers. |
| 407 | - Agent state exported from DGX Spark loads and resumes execution on an x86_64 target under identical invariant proofs. |
| 408 | - **Escalation Triggers:** |
| 409 | - Platform-specific workarounds that leak architecture-dependent behavior into higher-level runtime or agent crates. |
| 410 | - Introduction of proprietary binary firmware blobs into the core HAL without open-source fallbacks. |
| 411 | |
| 412 | --- |
| 413 | |
| 414 | ### Phase 8: Personal Fabric (Distributed Nodes & State Mobility) |
| 415 | - **Blueprint Sections Mapped:** §1 (The Final Vision), §25 (Phase 8 Personal Fabric), §26 (State Mobility), §33 (What the Finished System Feels Like), §35 (The Strategic Endpoint), §37 (Final Definition of Success). |
| 416 | - **Secondary Sections:** §2 (Central Principle), §9 (Agent State ABI), §27 (Evidence Architecture). |
| 417 | - **Mission:** Expand AIEN into a personal distributed fabric where a single logical AIEN identity spans multiple physical machines (DGX Spark compute + laptop display/keyboard + mobile sensors). Implement state mobility (`migrate(agent_state)`) allowing execution branches to move across physical nodes with dynamic KV reconstruction. Fully satisfy all 15 Blueprint Section 37 final success criteria. |
| 418 | - **Deliverables & Artifacts:** |
| 419 | - `crates/aienos-fabric/`: Sovereign peer-to-peer fabric protocol for inter-node capability discovery, state synchronization, and RPC. |
| 420 | - State Mobility Engine: Native implementation of `migrate(agent_state)` with on-demand physical KV reconstruction. |
| 421 | - Heterogeneous compute scheduler placing model inference on accelerator nodes and UI projection on client devices. |
| 422 | - Autonomous local fallback daemon ensuring disconnected nodes remain functional. |
| 423 | - Blueprint Section 37 Master Verification Suite (`tests/section_37_audit.rs`). |
| 424 | - `evidence/phase8_final_success_receipt.json`: Signed verification receipt certifying full realization of the AIENOS vision. |
| 425 | - **Architectural Invariants:** |
| 426 | - Identity Above Machines (Blueprint §25): The agent's identity exists above physical machines; computers are replaceable compute and I/O resources. |
| 427 | - State Mobility Invariant (Blueprint §26): Logical state migrates; physical state is reconstructed or lazily synchronized; migration preserves continuous identity. |
| 428 | - Partition Sovereignty: Node disconnection must never freeze local core operating capabilities; nodes fall back to autonomous local mode. |
| 429 | - **Acceptance Criteria:** |
| 430 | - Two independent physical nodes establish encrypted P2P fabric connection and merge capability graphs. |
| 431 | - Active reasoning branch is suspended on Node A, transmitted across the fabric, and resumed on Node B with identical context within 2000 ms. |
| 432 | - Section 37 Master Audit passes 100% of all 15 final criteria. |
| 433 | - **Escalation Triggers:** |
| 434 | - Network protocol introducing centralized cloud coordination or external third-party identity providers. |
| 435 | - Split-brain network partition resulting in permanent divergent agent identities without automatic reconciliation. |
| 436 | |
| 437 | --- |
| 438 | |
| 439 | ## 5. Master 37-Section Blueprint Traceability Matrix |
| 440 | |
| 441 | | # | Section Title | Primary Phase | Key Deliverables | Enforced Invariants | Verification Gate | |
| 442 | |---|---|---|---|---|---| |
| 443 | | **1** | The final vision | Phase 8 | `docs/MILESTONES.md`, Boot flow | Identity survives hardware/model changes | Direct power-on boot into AIEN | |
| 444 | | **2** | Central architectural principle | Phase 3 | `crates/aienos-state/`, Cortex | State loss costs compute, not identity | Identity persists across soft reboot | |
| 445 | | **3** | Final system architecture | Phase 4 | 7-layer stack in `crates/` | Strict layer boundary separation | End-to-end intent execution crossing layers | |
| 446 | | **4** | Fixed vs decision space | Phase 2 | Cargo workspace, sovereign crates | Zero cloud or proprietary dependencies | Builds with open toolchains | |
| 447 | | **5** | Boot and trust architecture | Phase 2 | Secure Boot hooks, AEGIS engine | Agent cannot authorize itself | Unauthorized intent rejected | |
| 448 | | **6** | The AIENOS kernel | Phase 2 | `aienos-kernel`, `linker.ld` | Model is never the kernel | Boots without model loaded | |
| 449 | | **7** | Hardware sovereignty | Phase 5 | `crates/aienos-accel/`, NVMe | Direct hot-path hardware ownership | Native MMIO/DMA without host OS | |
| 450 | | **8** | Compatibility islands | Phase 5 | Config B (`minimal-linux-island`) | Island is not the foundation | Boots with Config B deleted | |
| 451 | | **9** | Agent State ABI | Phase 4 | `crates/aienos-state/` | Logical state decoupled from physical KV | Branch fork/suspend/resume unit tests | |
| 452 | | **10** | Copy-on-write agent computation | Phase 4 | `crates/aienos-c1/`, CoW allocator | Read-only prefix KV page sharing | Sub-linear memory scaling across branches | |
| 453 | | **11** | Cortex | Phase 3 | `crates/aienos-cortex/`, NVMe log | Epistemic distinctions preserved | Cortex persistence survives reboot | |
| 454 | | **12** | Worlds / J-Space | Phase 4 | `crates/aienos-jspace/`, Worlds | Reversible inside; approval at boundary | Rollback discards diff with zero leak | |
| 455 | | **13** | Capability Graph | Phase 4 | `crates/aienos-capabilities/` | Capabilities replace applications | Intent executes via capability composition | |
| 456 | | **14** | Model ABI | Phase 3 | `crates/aienos-model-abi/` | Models are replaceable components | Model swap leaves identity intact | |
| 457 | | **15** | Phase 1 — Freeze reality | Phase 1 | `freeze_reality.sh`, bundle JSON | Non-destructive read-only capture | Script exits 0; schema validates | |
| 458 | | **16** | Phase 2 — Native AIENOS boot | Phase 2 | `aienos-kernel`, UART driver | Boots bare metal without Linux host | Cargo build exits 0; emits banner | |
| 459 | | **17** | Phase 3 — The agent wakes up | Phase 3 | Runtime, CPU model, console loop | Agent wakes natively; Cortex persists | Console dialogue; persists post-reboot | |
| 460 | | **18** | Phase 4 — Native intelligence | Phase 4 | AEGIS, Broker, Capabilities, Worlds | Natural language operating control | Intent diagnostics pass in sandbox | |
| 461 | | **19** | Phase 5 — Hardware acceleration | Phase 5 | Native GB10 driver, benchmark suite | Constrained "fastest wins"; accelerator state is Class B | Performance + lifecycle benchmark report emitted | |
| 462 | | **20** | Phase 6 — Migration system | Phase 6 | `tools/aienos-installer/` | Host OS is scaffolding | Dual-boot installed from host OS | |
| 463 | | **21** | Machine Capsule | Phase 1 | Machine Capsule schema & parser | 15-component hardware descriptor | Schema validation passes on bundle | |
| 464 | | **22** | Reversible installation | Phase 6 | Dual-boot partitioner, watchdog | Host OS remains bootable | Watchdog resets to host on panic | |
| 465 | | **23** | Progressive escape from host | Phase 6 | 7-stage migration state machine | Voluntary adoption progression | Progression across Stages 1–7 verified | |
| 466 | | **24** | Phase 7 — Multi-hardware | Phase 7 | `aienos-hal`, x86_64/ARM64 BSPs | Hardware is replaceable substrate | Tests pass on both x86_64 and aarch64 | |
| 467 | | **25** | Phase 8 — Personal Fabric | Phase 8 | `crates/aienos-fabric/`, P2P sync | Single identity across machines | P2P capability mesh links nodes | |
| 468 | | **26** | Eventually: state mobility | Phase 8 | `migrate(agent_state)` engine | State moves; physical KV recomputed | Reasoning branch migrates Node A to B | |
| 469 | | **27** | Evidence architecture | Phase 1 | Verification scripts, SHA receipts | Evidence earns claims | Cryptographically signed receipts | |
| 470 | | **28** | C1's role | Phase 4 | `crates/aienos-c1/` formal suite | Proof of branch isolation & CoW | Formal C1 stress tests pass | |
| 471 | | **29** | Autonomous engineering model | Phase 1–8 | Dispatch logs, `progress.md` | Autonomous between milestone gates | Iterations pass without micromanagement | |
| 472 | | **30** | Failure changes route not goal | Phase 1–8 | Engineering logs, alternative algos | Destination milestone is immutable | Alternate algorithm passes gate | |
| 473 | | **31** | "Fastest wins" properly defined | Phase 5 | Benchmark selection filter | Correctness & sovereignty first | Faster candidate rejected if unsovereign | |
| 474 | | **32** | Self-improvement | Phase 4 | World canary evaluation pipeline | Out-of-band evaluation; no live patch | Canary test rejects flawed patch | |
| 475 | | **33** | Finished system feel | Phase 8 | Dynamic UI projection engine | Power on → AIEN wakes | Cold boot wakes interactive agent | |
| 476 | | **34** | The adoption proposition | Phase 6 | Host discovery onboarding flow | Non-coercive adoption | Native boot target prepared safely | |
| 477 | | **35** | The strategic endpoint | Phase 8 | Complete architectural runtime | Operator → Agent → Capabilities → AIENOS | Total agent-native computing realized | |
| 478 | | **36** | Master execution sequence | Phase 1–8 | Milestone dependency DAG | Phased dependency ordering | Exit criteria verified before unlock | |
| 479 | | **37** | Final definition of success | Phase 8 | Master Audit Suite | All 15 criteria verified true | 15/15 binary conditions passing | |
| 480 | |
| 481 | --- |
| 482 | |
| 483 | ## 6. Master Success Criteria (Blueprint Section 37) Verification Matrix |
| 484 | |
| 485 | | # | Blueprint Section 37 Success Condition | Verifying Phase | Implementing Artifact / Crate | Objective Verification Test Method | |
| 486 | |---|---|---|---|---| |
| 487 | | **1** | The machine can boot without Windows, macOS or Linux acting as its host. | Phase 2 | `crates/aienos-kernel` (`_start`) | Power-on boot test into native bare-metal ELF on DGX Spark; kernel emits UART banner. | |
| 488 | | **2** | AIENOS can recover without an AI model. | Phase 2 | `crates/aienos-kernel` (`recovery.rs`) | Boot into recovery mode with zero model files on storage; mount storage and execute diagnostic shell. | |
| 489 | | **3** | The AIEN agent survives reboot as the same logical entity. | Phase 3 | `crates/aienos-runtime`, `cortex` | Soft reboot during active conversation; agent wakes and verifies prior interaction history. | |
| 490 | | **4** | Cortex survives and preserves evidence/provenance semantics. | Phase 3 | `crates/aienos-cortex` | Write epistemic graph with observations and facts; power cycle; query Cortex and verify hashes. | |
| 491 | | **5** | The model can be replaced without replacing AIEN. | Phase 3 | `crates/aienos-model-abi` | Swap underlying model weights from Model A to Model B; verify agent identity and history remain intact. | |
| 492 | | **6** | Agent inference state can be branched, suspended, reclaimed and reconstructed without changing logical identity. | Phase 4 | `crates/aienos-state`, `crates/aienos-c1` | Create 5 reasoning branches; suspend 3; evict physical KV; resume; verify identity and recomputed context. | |
| 493 | | **7** | The agent operates the machine through explicit capabilities. | Phase 4 | `crates/aienos-capabilities` | Natural language intent translated into `CapabilityCall` (`fs.read`, `system.inspect`) without app silos. | |
| 494 | | **8** | Irreversible effects cross enforceable authorization boundaries. | Phase 4 | `crates/aienos-aegis`, `broker` | Attempt disk partition format; verify AEGIS blocks execution pending operator cryptographic grant. | |
| 495 | | **9** | The operator can recover from AIEN failure. | Phase 3 | Kernel fallback console & recovery media | Kill runtime process; kernel falls back to deterministic low-level recovery console. | |
| 496 | | **10** | No outside company is required for ordinary continued operation. | Phase 2 | Sovereign build chain & local model | Disconnect physical network cable; execute complete boot, inference, storage, and agent loop. | |
| 497 | | **11** | Important native hardware paths are directly controlled by AIENOS. | Phase 5 | `crates/aienos-accel`, `nvme`, `net` | Direct MMIO register access to GB10 accelerator and NVMe block devices without host drivers. | |
| 498 | | **12** | Compatibility layers are optional rather than foundational. | Phase 5 | Benchmark Config B isolation | Delete Config B Linux compatibility image; confirm native AIENOS boots, executes, and recovers. | |
| 499 | | **13** | The system can prove its important performance and correctness claims. | Phase 1 | `scripts/verify_evidence.sh` | Every benchmark and test emits cryptographically signed JSON evidence receipts into `evidence/`. | |
| 500 | | **14** | The user can move to another supported machine without their AIEN being permanently tied to old hardware. | Phase 7 | `crates/aienos-fabric`, `aienos-hal` | Export agent state from DGX Spark; import and resume on x86_64 host under identical identity. | |
| 501 | | **15** | Ordinary experience: Power on the machine. AIEN wakes up. | Phase 8 | Complete integrated AIENOS | Cold power button press leads directly to interactive AIEN agent greeting without intermediate desktop. | |