Chapter 36. The Self-Improvement Platform: Memory, Dreaming, Evaluation and Evolution
- Approved by
- Panaversity ·
The point
What a worker learns should belong to the company, not to the model. In Chapter 31 you taught Brightline's AP worker to learn from its own runs. It reflected on its work and proposed lessons, and a person approved the good ones before they went live. You kept its memory as versioned files in the worker's repository, with Claude's memory stores and dreams as the hosted option (31.13). It worked, and it was the fastest way to see the idea.
This chapter rebuilds the same loop on the open stack, and adds four things Chapter 31 could not:
- Memory that survives a change of model. The worker's approved knowledge lives in your database. Switch it from Claude to an economy model and it still knows Acme's suppliers.
- A learning budget. Learning costs money. It gets its own budget, and it stops when the budget runs out or the value is not there.
- Measured value. A single number, the verified autonomy rate, tells you whether the worker needs people less than it did last month.
- Learning to need no model. The best lesson a worker can learn is that a repeated job no longer needs reasoning. It becomes a typed tool, a function with fixed inputs and outputs that calls no model, written by Claude Code and approved by you. The worker gets cheaper as it gets better.
You, the expert, decide what is worth keeping. Dreaming proposes. Code and an independent evaluation test. A person approves every one, even the low-risk lessons Chapter 31 let through automatically. Nothing the worker learns reaches production any other way.

Figure 36.1. Who may do what in the learning loop. Later sections build each box.

Where this chapter sits in Part IV. The same map opens every chapter, with that chapter's parts highlighted.
Why it matters
This story is invented.
Over six months, a firm's AP worker learned three things. One supplier always puts the PO number in the invoice's footer. Another sends credit notes as negative invoices. A third must never be paid before the 15th. The lessons lived in the model provider's memory feature. Then the firm moved the worker to a cheaper model, from a different provider, to save $7 a month. The lessons did not come with it. For three weeks, the review queue filled with mistakes the worker had stopped making in March.
The firm had paid for the learning. It did not own it.
Words this chapter uses
The words of Chapter 31 keep their meaning: reflection, dreaming, candidate, promotion, golden set. The words of Chapters 33 to 35 do too: release, role contract, coordinator, tenant, correlation ID.
| Word | Meaning |
|---|---|
| Experience record | A structured record of one finished assignment: evidence, versions, outcome, cost, corrections |
| Provenance | Where a memory came from, who approved it, and when |
| Candidate | A proposed change to memory, a skill or a procedure, which cannot be edited once made |
| Held-out cases | Test cases dreaming never sees, used only to evaluate its proposals |
| Canary | A release given to a small share of work first, to catch problems early |
| Manifest | The list of exact versions that make up one release |
| Learning budget | The money a worker may spend on learning in a month |
| Verified autonomy rate | The share of attempted assignments accepted with no discretionary correction |
What you will build
Where you are. Brightline's platform runs AP workers for two companies, with a control plane, routing by activity and data class, and role contracts in code.
What you build, with Claude Code, from your own spec and failure tests:
- A memory store in Neon with pgvector, outside any model provider, with provenance and permission checks.
- Dreaming as a Workflow, on the cheapest model that qualifies, that reads past evidence and writes only candidates.
- An evaluation gate on held-out cases, where code checks first and no model judges its own work.
- Evolution: candidate states, immutable releases, a canary and a rollback.
- One repeated activity turned into a typed tool, proposed by dreaming, built by Claude Code, approved by you.
- The verified autonomy rate, and the cost per assignment, before and after.
By the end of this chapter, you can run a worker that learns on any model, and keep what it learns. You can show what the learning cost and what it saved, and refuse a lesson that would make it worse.
In this chapter
- 36.1 Recall, and what changes on the open stack
- 36.2 Memory that survives a change of model
- 36.3 Dreaming as a Workflow
- 36.4 Evaluation the author cannot game
- 36.5 Evolution: from candidate to release
- 36.6 From reasoning to code
- 36.7 Learning on a budget, and who learns from whom
- 36.8 Measuring improvement
- 36.9 When Claude Code gets it wrong, and the limits
- Lab 36 A worker that learns, on any model
What this chapter is built on
The chapter follows sections 7.8, 10, 11.2, 11.5, 12 and 13 of Panaversity's paper Building Affordable, Self-Improving AI Workers (29 November 2026). Learning costs come from the paper's cost model, model.ts. The numbers for validated improvements and autonomy are the paper's fictional illustrations; your own come from the lab. The memory, dreaming, evaluation, release and autonomy code in this chapter was tested on 30 November 2026. It ran on Wrangler's local runtime with recorded model answers, but not yet on a deployed account. Check each API against the installed documentation, as CLAUDE.md tells Claude Code to.
Sources
- Building Affordable, Self-Improving AI Workers (Panaversity, 29 November 2026), sections 7.8, 10, 11.2, 11.5, 12 and 13
- Owner
- Panaversity