# Evolution 85 — Memory and Learning Architecture

**FIRME AI CORPORATION · CAIN-42 · Evolution 85** — branch `evolution-85`, baseline Evolution 84 (`2c419a042`). Development result. Not deployed. Not released. Built by the three-person team.

## Memory categories and where they live

| Category | Store | Status |
|---|---|---|
| Working memory | the prompt context of one call | implemented |
| Episodic memory (solved cases) | `LearningLedger.knowledge`, kind `exemplar` | implemented, used in this evolution |
| Semantic and domain knowledge | E81 `OrgMemory` (encrypted, provenance, temporal) | implemented in E81, not re-measured here |
| Procedural memory (strategies) | `LearningLedger.strategies`, versioned | implemented, used |
| Mission and task history | E81 `MissionStore` events and checkpoints | implemented |
| Agent experience / reliability | E81 `SpecialistRegistry` | implemented in E81, not used for routing here |
| Verified execution outcomes | E84 receipts, E85 evidence store | implemented |
| Evaluation history | `eval/rows.jsonl`, `strategy_history.json` | implemented |

## Epistemic status (six values)

`OBSERVED`, `VERIFIED`, `HYPOTHESIS`, `HUMAN_APPROVED`, `OUTDATED`, `DISPUTED`. Only `VERIFIED` and `HUMAN_APPROVED`
items can be used as an example or cited as fact, and every hit carries `grants_authority: false`. A model's output
enters as `HYPOTHESIS` and stays there unless evidence and an independent approver promote it.

## Contamination defense

An item is quarantined, never promoted, when: its source is not a trusted source but it claims a trusted status;
its text contains instruction-like phrases; it has no evidence reference; or its task belongs to the held-out set.
A strategy that references a quarantined or unverified item is refused. Quarantined in this run:
`none`; usable: `{'VERIFIED': 27}`.

## The controlled loop, as run

    EXPERIENCE (training tasks with code-computed answers)
    → EVIDENCE (answer re-derived by a second implementation)
    → EVALUATION (validation baseline per family)
    → ERROR ANALYSIS (errors per family)
    → KNOWLEDGE UPDATE (verified worked examples enter memory)
    → STRATEGY (candidate: few-shot examples; candidate: examples with worked derivations)
    → NEW EVALUATION (same validation tasks; promote only on a gain of at least 2 tasks, approver ≠ proposer)

Result: 1 strategies promoted, 17 rejected, across 9 families.
Active after the run: `{'plan_order': 'few-shot'}`.
Held-out effect: 24/100 (24.0%) → 25/100 (25.0%) — no statistically significant held-out improvement.

This is in-context learning: the system changes which verified examples it shows itself. No model weights, policies
or trusted keys change. It is recorded as measured, including the families where the candidate made things worse and
was rejected.

## Versioning, attribution, reversal

Every knowledge item and strategy decision is an append-only, hash-chained event signed by the evaluator identity.
`rollback` restores the previous active strategy and is itself an event. Nothing is silently modified.

## Not built

Semantic (embedding) retrieval, retrieval-quality metrics on a real corpus, freshness policies beyond supersession,
and any form of weight update. Retrieval here is by family label.
