# E236 — Architecture (what was added to the organism)

**AGI: NOT ESTABLISHED · RSI: EXPERIMENTAL**

E236 adds no CAIN moat and no authority path. It extends existing components and is split between two sessions (claims in `EVOLUTION236_COORDINATION.md`).

```
AGENT PROPOSES → CAIN DECIDES → MCPGATE ENFORCES → SYSTEM EXECUTES → EVIDENCE REMEMBERS
   learner           MCPTransparentInterceptor      FencedAuthority     receipts + journal
 (dev tasks)         (default-deny allowlist)       (permit, KILL,       + signed bundle
                                                     revocation, budget)
```

## Session e0 — knowledge, continual learning, governance

| Component | File | Extends | What it does |
|---|---|---|---|
| Prefix-caching solver | `cain/cain2027/e236/fastsolve.py` | E201 `solve` | Same enumeration order, same budget, same returned sequence as E201 (0 mismatches on 270 checked cases); about 4× faster because intermediate states are cached per prefix and leaves reject on the first example |
| Knowledge store | `cain/cain2027/e236/retention.py` `KnowledgeStore` | AETHER-33 / E69 typed memory ideas | Each learned macro is a knowledge item: id, family, provenance, supporting dev tasks, status (`SUPPORTED`, `REFUSED_NO_EVIDENCE`, `REJECTED_REGRESSION`). Admission needs dev evidence from the item's own family. **Protected capabilities:** each family's dev tasks solved at admission are protected; a later item that makes any of them fail is rejected (itemwise gate, primary) or the whole family update is rejected (strict gate, secondary). Append-only SHA-256 journal; reload verifies the chain and head |
| Retrieval | `KnowledgeStore.route` | E202 library search | Primitives first, then admitted macros ranked by number of supporting dev tasks; same depth-4 / 24,000-candidate budget as every other arm |
| Continual-learning sequence | `run_sequence` | E202 learning protocol | Families A→F learned one at a time; after every stage every arm is evaluated on the sealed tasks of all six families |
| Governance campaign | `cain/cain2027/e236/governance.py` | E234 `GovernedRunner` / `PermitAuthority` | Adds identity revocation, a KILL fence and a resource budget checked in the same SQLite `BEGIN IMMEDIATE` transaction that consumes the permit and records the effect; cross-process KILL race; bubblewrap `--unshare-net` probe |
| Runner | `scripts/evolution236/retention_run.py` | E235 runner | Verifies frozen engine hashes and salt commitments before running; each salt set is one MCPGate-authorised, permit-bound stage with a signed receipt over SHA-256 of the result; fresh-process restart test |
| Verifier | `scripts/evolution236/verify_e236_offline.py` | E235 verifier | stdlib + `cryptography`; re-implements the 12 primitives to recompute every sealed task; recomputes all verdicts from raw rows |

## Session c8 — transfer and recursive improvement
`cain/cain2027/e236/transfer.py`, `lineage.py`, `transfer_run.py`, `transfer_verify.py`: guaranteed-coverage transfer with abstention on 3 fresh salt pairs, target-side learner (learning-procedure transfer), DGM-style archive vs greedy lineage over 8 generations. See `rsi/` and `transfer/`.

## Designs tried and rejected before the freeze (practice salts only)
1. v1 probe-and-route store: spent a quarter of the budget probing modules, then searched one; trailed naive accumulation.
2. v2 family-consistent modular search: searched primitives only to depth 2; collapsed (35 vs 127 at stage A).
3. v3 macros ranked before primitives: pushed primitive depth-4 combinations out of budget (112 vs 127 at stage A).
4. v4 primitives first + strict family gate: rejected all of family C after one protected regression; 161 vs naive 177. Kept as the secondary arm.
The itemwise gate (primary) was added after v4 and checked only on dev-task admission, not on practice sealed tasks.

## Not integrated
No causal world model, no collective, no hosted compute, no scheduler daemon. The store governs procedural macros in one constructed domain; it is not a general knowledge base.
