# Release Notes — r0513 ## The Engine That Won't Stop Learning **Package:** `a11oy 0.1.0+r0513` **Author:** Stephen P. Lutar Jr. **ORCID:** 0009-0001-0110-4173 **Org:** SZL Holdings **Doctrine:** v2 **Date:** 2026-05-14 **License:** Apache-2.0 --- ## Architecture Overview r0513 completes the Brain v1 build by adding the inner-agent society to the Ouroboros Infinity loop. The full pipeline is: ``` Goal │ ▼ A11oyAgent.think() ├─ Quipu Plan (DAG of steps) ├─ Execute steps → RAGReceipt per step ├─ Evalgate: 9-axis conjunctive AND gate ├─ BiettiMemory: goal → trace summary ├─ Observatory: drift detection └─ CodexSession → CodexClosure (Merkle root) │ ▼ LoopController.meditate_n_cycles() ├─ CycleHead: current_head seeds each cycle ├─ Thesis corpus rotation: F1–F15 SZL formulas ├─ tick() → CycleTail(tail_hash, receipt, eval_result) └─ tail_hash → next current_head (Ouroboros fold) │ ▼ Society.tick_all() ─── 7 inner agents in fixed order ───► ├─ Perceiver (FEP — surprise minimization) ├─ Predictor (world-model prefix forecasting) ├─ Proposer (ReAct/Reflexion template proposals) ├─ Critic (Constitutional AI axis calibration) ├─ Rememberer (Park memory stream) ├─ Dreamer (DreamerV3 offline planning) └─ Arbiter (Minsky Society of Mind weighted selection) │ ▼ Society.learn_all(gate_outcome) ─── per-agent state update ───► ``` Every crossing of the evalgate gate calls `learn()` on all 7 agents. The loop invariant is `"but never stop"`. --- ## 7 Inner-Agent Roles and Scientific Basis | Agent | Leader Citation | tick() function | learn() update | |------------|------------------------------------------|-------------------------------|----------------------------------------| | Perceiver | Friston, *Free Energy Principle* (2010) | Surprise = edit distance to last_head | Running mean surprise (EMA) | | Predictor | Karpathy / Sutskever | Prefix match forecast | Residual MAE accumulation | | Proposer | Yao & Shinn, *ReAct/Reflexion* (2023) | Template-keyed proposals | Pass/fail count per template key | | Critic | Bai et al., *Constitutional AI* (2022) | Per-axis score prediction | Per-axis calibration error (running MAE)| | Rememberer | Park et al., *Generative Agents* (2023) | SHA-256 key memory lookup | Recency + frequency weight update | | Dreamer | Hafner et al., *DreamerV3* (2023) | Dream score vs reality delta | Dream–reality residual MAE | | Arbiter | Minsky, *Society of Mind* (1986) | Weighted selection of winner | +1 on winner, -1 on losers | All agents implement: - `tick(loop_state: LoopState) -> AgentReport` - `learn(report: AgentReport, gate_outcome: GateOutcome) -> None` All `learn()` updates are: - **Deterministic:** seeded from `sha256_text(loop_state.current_head + salt)` - **Idempotent w.r.t. replay:** same input → same state delta - **JSON-serializable:** `get_state()` / `load_state()` round-trip --- ## New Module: inner_agents.py `src/a11oy/inner_agents.py` — 916 lines, Apache-2.0, r0513. Exports: - `InnerAgent` (ABC with `tick` + `learn` + state I/O) - `Perceiver`, `Predictor`, `Proposer`, `Critic`, `Rememberer`, `Dreamer`, `Arbiter` - `Society` (`tick_all`, `learn_all`, `snapshot`, `snapshot_hash`, `to_json`, `from_json`) - `AgentReport`, `GateOutcome`, `SocietyReport` --- ## Full Test Suite ```bash $ pytest --tb=short -q 2>&1 | tail -2 243 passed in 3.22s ``` **243 tests — all passing.** Zero skips, zero failures. ### r0513 additions: test_inner_agents.py — 33 tests Key coverage: - All 7 agents tick without error - All 7 agents learn without error - tick() output is an `AgentReport` with correct role - learn() mutates agent state deterministically - Society.tick_all() runs all 7 agents in fixed order - Society.learn_all() propagates gate_outcome to all agents - Society.snapshot() returns JSON-serializable dict - Society.snapshot_hash() is deterministic - Society.to_json() / from_json() round-trip - 5× replay: Society.tick_all()+learn_all() is byte-identical with frozen time --- ## Code Quality ```bash $ ruff check src/ tests/ All checks passed! $ mypy --strict src/ Success: no issues found in 20 source files ``` - **ruff:** clean (E, F, W, I, UP, B, C4, SIM; E501 ignored) - **mypy --strict:** clean across all 20 source files --- ## Determinism Certification ### v0 baseline (preserved) ``` $ for i in 1..5: SZL_FROZEN_TIME=2026-05-14T10:00:00Z python examples/hello_brain.py | sha256sum a8603d5de9f3c97d94d13b5e394424c2e18f1be352f98b097f43eee5947d90a0 a8603d5de9f3c97d94d13b5e394424c2e18f1be352f98b097f43eee5947d90a0 a8603d5de9f3c97d94d13b5e394424c2e18f1be352f98b097f43eee5947d90a0 a8603d5de9f3c97d94d13b5e394424c2e18f1be352f98b097f43eee5947d90a0 a8603d5de9f3c97d94d13b5e394424c2e18f1be352f98b097f43eee5947d90a0 ``` v0 hash `a8603d5de9f3c97d94d13b5e394424c2e18f1be352f98b097f43eee5947d90a0` — **unchanged.** ### v1 + r0513 (agi_brain.py) ``` $ for i in 1..5: SZL_FROZEN_TIME=2026-05-14T10:00:00Z python examples/agi_brain.py | sha256sum bbf72d4ab5b3eddb18d889b67426636107d816101948e989fa168074bc126e8c bbf72d4ab5b3eddb18d889b67426636107d816101948e989fa168074bc126e8c bbf72d4ab5b3eddb18d889b67426636107d816101948e989fa168074bc126e8c bbf72d4ab5b3eddb18d889b67426636107d816101948e989fa168074bc126e8c bbf72d4ab5b3eddb18d889b67426636107d816101948e989fa168074bc126e8c ``` v1 hash `bbf72d4ab5b3eddb18d889b67426636107d816101948e989fa168074bc126e8c` — **5× identical.** --- ## Cryptographic Receipt **v1_codex_root** (SHA-256 Merkle chain over all 20 `src/a11oy/*.py`): `eab2a8c4b0059de48ca8e613c84da994a45bf3f1f61e78949ecc059c42ac8c0c` **r0513_continuum_hash** (`sha256(v1_codex_root + "r0513")`): `46812870ce59251d8ea8e5494702aef05a3fedd061e182ee87a40dca238b867f` --- ## What r0513 Is NOT - **Not ML training.** No weights updated. MockCortex only. - **Not AGI.** See `AGI_HORIZON.md` for the honest 9-gap analysis. - **Not production-ready.** No real LLM connected. No real tool use. What it IS: a verifiable, auditable, doctrine-enforced cognitive scaffold that runs forever and learns from every crossing. --- ## Deferred to v2 - **Precision-weighted prediction-error gate (Neuroscience pod):** Noted in `Critic` docstring. Requires gradient infrastructure. Risk too high for v1. - **Goedel-Prover-V2:** 12 sorry holes in `EvalGate.lean` (BLOCKER C1). Closes in next pod. --- ## File Manifest (new in r0513) | File | Lines | Description | |-----------------------------------|------:|---------------------------------------| | `src/a11oy/inner_agents.py` | 916 | 7 inner agents + Society | | `tests/test_inner_agents.py` | 500 | 33 tests for inner_agents | | `examples/agi_brain.py` | 82 | End-to-end demo: agent + loop + society| | `BRAIN_V1_REPORT.md` | 255 | Full verified build report | | `AGI_HORIZON.md` | 166 | Honest AGI gap analysis | | `BRAIN_V0_5_REPORT.md` | 148 | Infinity loop addition report | | `RELEASE_NOTES_r0513.md` | (this)| Release notes | --- *r0513 — The Engine That Won't Stop Learning.*