# E86 Architecture Audit

## Repository state

- E86 worktree `/root/cain-e86-worktree`, branch `evolution-86`, clean at creation.
- E85 `/root/cain-e85-worktree` preserved at `06da643ff`.
- E84 `/root/cain-e84-worktree` at `2c419a042`.
- E82 `/root/cain-e82-worktree` is a parallel lineage (intelligence/durability) and is not merged.
- Production sites are served from `/root/cain-studio-platform`; E86 does not modify or restart them.

## Component inventory

| Capability | Existing component | E86 action |
|---|---|---|
| Identity / Ed25519 | `cain/cain2027/e80/core.py`, `cain/identity_federation` | reuse |
| Single-use grants / Gate | `cain/cain2027/e80/core.py` | reuse |
| Receipts / action commit | `cain/receipt`, `cain/action_commit` | reuse |
| MCP boundary | `cain/mcp_proxy.py` | do not modify; integrate at interface |
| Durable mission store | `cain/cain2027/e81/durable.py` | reuse for execution state |
| Model runtime | `cain/cain2027/e85/reasoning.py`, E79 local runtime | wrap in E86 provider plane |
| Cross-domain eval | `cain/cain2027/e85/evalrun.py`, `evalsuite.py` | reuse tasks; new E86 arms |
| Learning ledger | `cain/cain2027/e85/learning.py` | reuse; add typed memory bridge |
| Kill switch | `cain/cain2027/e85/killswitch.py` | reuse; test semantics |
| Workforce | `cain/cain2027/e85/swarm.py` | reuse process model; add dispatcher |
| Verticals | `cain/cain2027/e85/verticals.py` | reuse three prototypes |
| ClawX store | `cain/cain2027/e85/clawx85.py` | reuse; read/write evidence |
| External devkit | `cain/cain2027/e85/devkit.py` | extend into interop flow |
| Evidence | E85 `scripts/evolution85/verify_e85_offline.py` | new E86 verifier |

## Trust boundaries

1. **Model boundary** — a model returns text. It cannot authorize, write memory as trusted, or
   change policy.
2. **Provider boundary** — remote inference leaves the host; it is BLOCKED unless a credential is
   injected and a spend ceiling is approved.
3. **Memory boundary** — retrieved content is data, never authority; every hit is
   `grants_authority:false`.
4. **Learning boundary** — a model may propose knowledge; independent validation and an approver
   other than the proposer are required before promotion.
5. **Workforce boundary** — an agent identity is not a process; a process is not a verified task;
   a task is not an external effect.
6. **Evidence boundary** — a local verifier is not a third party; a self-generated key is not an
   independent witness.
7. **Production boundary** — the hosted proxy, DNS, Stripe, customer data and cluster are out of
   scope for E86.

## Capability gaps E86 must address

- No durable mission contract with evidence-gated completion.
- No typed memory categories with promotion/rollback across domains.
- No external-agent integration flow with a verifiable receipt.
- No E86-wide provider-neutral runtime abstraction with capability profiles and budgets.
- No artifact-derived E86 acceptance matrix.
- Kill switch at 500 workers is PARTIAL (in-flight effects).
- No remote model evaluation (credential/spend).
- No independent witness/audit.

## Security assessment (inherited)

- Same-project tests only; no third-party review.
- Local models are small; no general-intelligence claim.
- The E85 500-worker stop is not immediate for in-flight effects.
- The E85 recovery/evidence host is in the same administrative domain.
- No TEE/hardware attestation.
- The E85 worktree contains untracked frontier files that are not part of its bundle.
