# Sleep Consolidation: A Repeated Correction Earns a Diagnosed, Tested Repair: v7.5 → v7.6

From v7.5 (21 Oct) to v7.6 (21 Oct): 14,740 words to 16,107 words, 3,574 words in new or rewritten paragraphs and 2,207 taken out, 119 paragraphs changed.

## Change note of v7.6

**A map of the four stages and a plain statement of what is new**

Figure 1 moves into the introduction, and a new figure shows where this learning stage sits among the four memory stages. A "what is new here" list names the three parts the paper claims no other design combines: a count per rule across sessions, a diagnosis on every incident, and a check that must pass a shadow run first. The ledger is now described as the record of what happened, while the memory store decides what the rules are. The abstract gets a new last line: no repeat is wasted, because each one removes a different cause.

## Changed paragraphs

Marks: [-removed-] {+added+}.

### Abstract

Tell a good new colleague something once and it sticks. If it slips, they [-ask-] {+work out+} why: the note was in the wrong drawer, an [-old-] {+older+} instruction said the opposite, or [-the-] {+it was never clear. A+} lesson [-has to become-] {+that survives all that becomes+} a habit, which in people is partly sleep's work.

### Abstract

We propose that a correction the owner has to repeat earns a diagnosed, tested repair instead of another note. The assistant counts each broken rule {+across sessions+} and, [-before strengthening one,-] {+each time one breaks,+} asks [-why it failed:-] {+why:+} it never reached the model, another line contradicted it, or it was too vague. {+Each answer has its own repair.+} Only a rule that was in front of the model, clear and unopposed, and still broken moves [-up, from-] a [-saved note-] {+step closer+} to a [-line read on every turn to a tested-] check that runs before the [-action.-] {+action, and a check acts only after it has been tried in the background on real traffic.+}

### Abstract

The owner's [-corrections-] {+words+} are never lost, the assistant never claims to have learned more than it has, and only the owner can relax a rule or [-change-] {+make one part of+} what every [-turn-] {+session+} reads. This is a design, with the tests that would decide it.

### Abstract

[-If it holds, you teach your assistant a thing once, and a slip is repaired, not written down again.-]

### Abstract

{+If it holds, no repeat is wasted: each one removes a different cause, and soon you stop having to repeat yourself.+}

### 1. Introduction

{+![One rule's life: the reply-language rule of §1. Taught on day 0, it works for the rest of that chat as a temporary line added to every model call (dashed); approved on day 1, it is read on every turn. The second slip is traced to an older line written for the weekly report, which the model applied to a reply; that line moves to the report's own job. The third slip, with the rule in view, clear and unopposed, earns a check: it first runs in the background without acting, is then switched on, and the always-read line is removed once a replay shows the check can carry the rule alone. Days are illustrative.](images/fig1-journey-v76.png){width=86%}+}

### 1.1 What the brain suggests

The brain learns at two speeds. In the complementary learning systems account (McClelland et al., 1995), the hippocampus records an episode at once and the neocortex folds many episodes into durable knowledge, slowly and offline. Sleep also seems to improve what was practised: in a classic result, a finger sequence rehearsed in the evening is played faster the next morning (Walker et al., 2002), though how much of that gain is due to sleep is debated (Pan & Rickard, 2015). That is the whole biological claim [-here. The-] {+here; the+} cerebellum {+in the title+} is [-only-] an analogy for [-one more step,-] a movement you once had to think through becoming one you no longer think [-about; we claim nothing about where the brain does it.-] {+about.+}

### 1.1 What the brain suggests

Learning to ride a bicycle passes through three forms of one lesson: an instruction you recall ("look ahead, not at the wheel"), a reminder you hold in mind while riding, and balance, which acts before you could think. An agent can hold a lesson in the same three forms: a note it finds when it searches, text it keeps in front of it, and a check that runs at the moment of action whether the model remembers or [-not. The analogy is an aid to reasoning, not a model of the brain.-] {+not.+}

### 1.2 Why the obvious fixes fail

**Text competes for attention.** On IFScale, {+a benchmark that keeps adding instructions until models fail,+} accuracy falls as instructions are added, and earlier ones are followed more than later ones (Jaroslawicz et al., 2025). A file that grows by one lesson a day gets worse at all of them.

### 1.3 What this paper proposes

[-The claim: **a repeated correction earns a diagnosed, tested repair instead of another note.** Figure 1 follows it on the opening's rule, and Table 1 (§2) sets it beside what assistants do today. The ledger that counts each broken rule is §4, the diagnosis §5, the two speeds §6, the budgets and approvals §7, and the transition specification that checks one correction's whole journey across the four stages is Appendix B.-]

### 1.3 What this paper proposes

[-![One rule's life: the reply-language rule of §1. Taught on day 0, it is held for approval and works for the rest of the session as a provisional line in the tail (dashed); approved on day 1, it loads on every turn. The second slip is traced to an older line written for the weekly report, which the model applied to a reply; that line is scoped to its job. The third, with the rule known to be in view, clear and unopposed, earns a check, drafted, run in shadow and enforced, and the always-loaded line is freed. Days are illustrative.](images/fig1-journey-v75.png){width=86%}-]

### 1.3 What this paper proposes

{+The claim: **a repeated correction earns a diagnosed, tested repair instead of another note.** A house rule can live in four places: a note in a drawer, a line on the recipe card, a sign on the fridge, or a lock on the cabinet. An agent's rule can too, and we call the places rungs, 0 to 3 (§5.1). When a rule slips, the agent first asks why (§5.4); only a rule that was in front of the model, clear and unopposed, moves toward the lock. Figure 1 follows the opening's rule through the design, and Table 1 (§2) sets the design beside what assistants do today.+}

### 2. Related work

This is one of four designs for an agent's memory. The keeping paper (J1) decides what survives the context window and keeps the full session record as ground truth. The writing paper (J14) decides what enters the long-term memory store and in what shape. The finding paper (J2) gets the right thing back when it is needed. This paper, the learning stage (J5), turns experience into behaviour. [-The-] {+Figure 2 shows what passes between the four, and Table 2, at the end of this section, explains the+} words this paper borrows from the other [-three are explained in Table 2, at the end of this section.-] {+three.+}

### 2. Related work

{+![Where the learning stage sits. The owner's words reach it from the keeping stage, labelled; its proposals go through the writing stage's gate and come back as receipts; the finding stage indexes the rules moved off the always-loaded file and says when a new item can be found (findable); and the morning report is the one channel to the owner for all four stages.](images/fig0-stages-v76.png){width=100%}+}

### 2. Related work

**Lessons kept as text.** Reflexion (Shinn et al., 2023) has an agent write a reflection after a failed attempt and read it on the next try. ACE (Zhang et al., 2025) keeps a playbook of itemised lessons that a curator edits in small [-steps,-] {+steps; after a failed attempt its reflector names the root cause and tags+} each [-with-] {+lesson that helped or misled, and every lesson keeps+} counters of [-how often it was marked helpful or harmful.-] {+those tags.+} ExpeL (Zhao et al., 2024) keeps insights [-drawn from past tasks-] with an importance count that agreement raises and disagreement lowers, and removes an insight whose count reaches zero. [-Both-] {+So both+} keep a lesson's track [-record.-] {+record, and ACE asks why an attempt failed.+} Neither asks why a lesson [-failed,-] {+that applied was not followed: whether it reached the model, whether another line contradicted it, whether it was too vague. That question is the centre of this design (§5.4),+} and [-every lesson stays text; in our design-] {+its answer can move+} a lesson [-that keeps failing may leave-] {+out of+} text [-(§5).-] {+altogether.+}

### 2. Related work

**Learning while idle.** Sleep-time compute (Lin et al., 2025) lets an agent think about its context before a question arrives. Letta runs the idea as "dreaming": background subagents review recent conversations and consolidate lessons without asking the user, and a memory doctor audits where memory is [-placed, what is duplicated and how many tokens it adds to the system prompt-] {+placed+} (Letta, [-2026a). Both run in git worktrees, so the main agent is not blocked (Letta,-] {+2026a,+} 2026b). Anthropic's Dreams, a research [-preview for its managed agents, consolidate-] {+preview, rebuild+} a memory store {+from the old one+} and past transcripts into a new [-output-] store that a person reviews and adopts, leaving the [-input store-] {+old one+} untouched (Anthropic, 2026d). [-It-] {+That+} is the nearest relative of our copy-then-adopt night (§4.3, §7.4); what we add is the count of how often each lesson failed and the diagnosis of [-why (§4, §5).-] {+why.+}

### 2. Related work

**Products that write lessons down.** Claude Code loads its instruction files and its own auto-memory notes, including "corrections you give Claude", at the start of every [-session. Rules-] {+session; rules+} can be scoped to file paths, and a prompt audit [-reports-] {+proposes fixes for+} outdated or conflicting [-instructions with proposed edits,-] {+instructions,+} changing nothing until the user asks (Anthropic, 2026a). Its troubleshooting list for an instruction Claude does not follow is most of our diagnosis, done by hand (Table [-7 sets the two side by side).-] {+8).+} The Claude memory tool [-gives a model a client-side directory that persists across conversations-] (Anthropic, [-2025),-] {+2025)+} and LangMem's prompt optimiser [-returns an updated system-] {+(LangChain, 2025) keep lessons as files or+} prompt [-from conversations with feedback (LangChain, 2025).-] {+edits.+} Between them they supply our rungs 0 to [-2, scoped loading and an owner-approved audit. Their documentation describes no count of-] {+2; none counts+} a written lesson's [-failures, and the diagnosis is left to the user.-] {+failures.+}

### 2. Related work

**Checks made from corrections.** Claude Code's PreToolUse hooks run before a tool call and can deny it, ask the user, or replace its arguments (Anthropic, 2026b). The hookify plugin is the closest shipping relative of our top rung (Anthropic, [-2026c). Run with no arguments,-] {+2026c):+} it reads the [-last 20 to 30 messages-] {+recent conversation+} for behaviour the user [-corrected or-] had to [-repeat, and counts the occurrences. It then-] {+correct,+} asks which [-behaviours-] should become rules and whether each should warn or block, and the rules act [-on the next shell command, file edit, stop or prompt. It keeps no count across sessions, does not ask why an earlier rule failed, and does not test a rule before it blocks.-] {+at once.+} Guardrail frameworks [-such as NeMo Guardrails (Rebedea-] {+(NeMo Guardrails, Rebedea+} et al., [-2023) and-] {+2023;+} the OpenAI Agents [-SDK's guardrails (OpenAI,-] {+SDK, OpenAI,+} 2026) [-are the shipping machinery for checks on a model's input, output and tool calls; they-] say how to run a check, not when a lesson has earned one. HASP (Liu et al., 2026) turns [-advisory textual-] skills {+written as advice+} into program functions that fire on failure-prone [-states, and-] {+states.+} Self-Harness (Zhang et al., 2026) {+comes closest to the whole loop: it+} mines an agent's {+execution+} traces for recurring failures and [-edits its-] {+accepts a+} harness {+edit only+} after regression [-tests.-] {+tests, with no engineer involved.+} We take from them the executable check and the test before acceptance.

### 2. Related work

**Optimising texts against a score.** OPRO, DSPy and GEPA improve prompts by proposing rewrites and keeping those that score better (Yang et al., 2023; Khattab et al., 2023; Agrawal et al., 2025). [-PROCTOR-] {+Wahi (2026), studying PROCTOR, a teacher-and-student loop that improves prompts,+} argues that such loops need deterministic acceptance checks, frozen holdouts, and roles that draft changes they cannot [-apply (Wahi, 2026);-] {+apply;+} we adopt all three (§7.4, §9.2).

### 2. Related work

[-Our contribution sits between these lines of work: **a diagnosis-and-recurrence ledger across enforcement levels.** It keeps a count per rule that persists across sessions and across the rule's forms, runs the diagnosis on every incident without anyone asking, and lets a check act only after it passes a shadow run. We did not find a design that does this; the parts exist, and Table 1 sets them side by side.-]

### 2. Related work

{+**What is new here.** The parts exist; we did not find a design that puts these three together:+}

### 2. Related work

{+1. a count per rule that persists across sessions and across the rule's forms, made of incidents, not mentions (§4.2); 2. on every incident, a diagnosis of why a rule that applied was not followed, with a different repair for each cause (§5.4); 3. a check that acts only after a shadow run on live traffic, with stated error bounds (§5.3), and the owner's approval for anything that loosens a rule or reaches every turn (§7.4).+}

### 2. Related work

{+Self-Harness is the nearest automated precedent; here the failures are the owner's own corrections, counted per rule, and the question is why an existing instruction failed. Table 1 sets the approaches side by side, and its last column holds the difference in one phrase per row.+}

### 2. Related work

| Approach | What it does well | What a repeated correction becomes | [-|----------------|--------------------------------|--------------------------------------|-] {+Who notices a failed lesson | |-----------------|------------------------------|------------------------------|-------------------|+} | Retrieval [-over past chats,-] or [-a-] vector memory [-of extracted facts (Mem0 style)-] {+(Mem0; Chhikara et al., 2025)+} | Nothing to curate; finds things nobody flagged; merges and updates facts | A note that binds only if a search happens to retrieve [-it; nothing notices that-] it [-failed-] {+| Nobody+} | | A running summary | No setup; keeps a long session coherent | A sentence competing [-with everything else-] for summary space, which a later summary can drop {+| Nobody+} | | A bigger context window | No retrieval miss while the correction is still in the window | The same advisory text among more of [-it; compliance falls as instructions pile up-] {+it+} (Jaroslawicz et al., 2025); gone in the next session {+| Nobody+} | | Lesson playbooks (ACE, ExpeL) | Lessons distilled from many tasks; [-counts of-] helpful and harmful [-uses-] {+counts+} weed out weak ones | A lesson [-whose score falls;-] {+the reflector may tag harmful;+} it stays text, and nothing asks [-why-] {+whether+} it [-failed-] {+reached the model | A tally of helpful and harmful over many tasks+} | | ChatGPT or Claude built-in memory | Effortless capture; the owner [-can see-] {+sees+} and [-delete-] {+deletes+} what was saved; Claude Code adds [-path-scoped-] {+scoped+} rules and [-a prompt-] {+an+} audit [-that proposes fixes-] | A saved line loaded every [-session, with no count of how often it failed; the diagnosis is left to the user;-] {+session;+} never a check {+| The user, by hand (Table 8)+} | | Letta memory with dreaming | Background [-consolidation in git worktrees;-] {+consolidation;+} a [-memory-] doctor audits [-placement,-] {+placement and+} duplication [-and token use-] | An edit to memory files, made without asking the owner; no [-failure count; no-] check {+| Nobody | | Anthropic's Dreams | Rebuilds a store from the old one and up to 100 transcripts; a person reviews it | A merged, de-duplicated entry; never a check | Nobody+} | | hookify | [-A correction becomes a-] {+Reads the last 20 to 30 messages for repeated corrections; the user picks+} warn or block [-rule in minutes, and the user picks which-] | A pattern-matching hook, [-counted only within the recent conversation,-] in force at once with no shadow [-run, and with-] {+run | The user, within the recent conversation | | Self-Harness | Finds failure patterns in execution traces; accepts a harness edit only after regression tests | A tested harness edit tied to a pattern;+} no [-account-] {+owner in the loop, no count per rule | An offline search+} of [-why the earlier text failed-] {+traces+} | | This design | Repairs the [-cause;-] {+cause of each slip;+} a check must pass a shadow run; only the owner loosens | [-A ledger row that climbs one rung per diagnosed incident;-] {+Each slip's cause repaired; a check only for a rule in view and still broken;+} costs the owner approvals; not built yet {+| The ledger, at every incident+} |

### 2. Related work

: What a repeated correction becomes under each approach. The [-middle-] {+second+} column is what each does better than a plain note.

### 3.1 The owner's correction is the label

Signals 1, 2 and 4 come from that classifier (Appendix A.1). Three stages share it, each with its own threshold, because a missed instruction and a false correction cost different things. {+It runs inside the append, before the reply, so it has a time limit (we propose 300 ms).+} This stage reads the stored label and never re-runs the classifier, even on replay. A span [-whose labelling failed-] {+it could not label in time+} is stored [-untagged and waits for-] {+untagged: it gets no line in this session's tail,+} the night [-pass; untagged-] {+pass tags it, and a late correction found that way opens its event then and is named in the morning report. Untagged+} never means "no correction". {+A span wrongly labelled "none" opens no event; the owner's words stay in the record, the night's session card (§6.2) is a second reader that can catch the miss, and the classifier's recall is what test 9 measures.+} A reversal (signal 3) is found by comparing the agent's change with the owner's next edit of the same file or draft, and an outcome (signal 5) is read from the job's receipt. A temporary session teaches nothing (J1 §4.7, sessions that are never kept).

### 3.2 Sort by cause before writing a rule

A rule written for an outage teaches the agent to fear something that will not recur. A factual correction written as a rule leaves the wrong fact standing and adds a line that contradicts it. One correction can need two repairs: "The supplier call is on Thursday now, and check the calendar before you tell me a meeting time" is a wrong fact and a rule gap. Each required repair gets a [-**child-] {+child+} operation [-ID**-] {+ID+} under the correction ID (c-2210/0.a, c-2210/0.b), and that ID is the request ID the receiving stage [-sees (transition T3).-] {+sees.+} The parent closes only when every child has a final answer (§6.1), so one repair's receipt cannot stand in for the other. Praise for something the agent did unasked is handled like a rule gap: it becomes a rule proposal.

### 4.1 One row per rule

[-**The ledger proposes; the writing stage accepts.** The ledger is a file outside the writing stage's store: the ground truth for incidents and diagnoses, and a non-authoritative store of learning proposals. Rule text becomes **accepted** only when the writing stage's gate returns an accepted receipt (J14 §5.4, receipts); a visible hold is acknowledged, not accepted. The row keeps the receipt or the hold beside its revision. It is not the finding paper's read ledger, which tracks what the context window already holds. The owner can open the ledger as a list at any time: every rule with its rung, its incidents and the receipts behind them.-]

### 4.1 One row per rule

{+**The ledger keeps the history; the memory store decides the rules.** The ledger is this stage's own file, kept outside the long-term store. It is the authority on what happened: each slip, and why. It is not the authority on what the rules say. A rule's wording counts as accepted only when the writing stage's gate, the single door into the long-term store (J14 §5.4), takes it and returns a receipt, so a new rule is checked against everything already stored before it can act. If the gate parks it for the owner instead, the rule is held: he can see it, but it is not accepted yet. The ledger row keeps that receipt, or that hold, next to the rule's revision. The owner can open the ledger as a list at any time: every rule, where it lives now, how often it was broken, and the receipt behind each change.+}

### 4.2 Incidents, not mentions

A climb is only as good as its count, so the ledger counts [-**incidents**.-] {+incidents.+} Two identities are kept apart. A **correction ID** is the address of the owner's message plus the index of the owner span (J1 §4.2; c-1873/0, c-1873/1), so one message can carry several corrections, each with its own event and a child ID per repair. An **incident ID** is the address of the agent action that broke the rule. Inserting an incident is idempotent on the pair of rule ID and incident ID, so a slip seen by both paths counts once. A harmless restatement ("as I said, Finnish please", after a reply in Finnish) points at no broken action and is recorded as a mention: it never moves the rule. An incident counts toward a repair only if the action came after the revision that should have prevented it.

### 4.2 Incidents, not mentions

**Matching is the hard part.** A recurrence counted as a new rule hides the climb; two rules merged into one make a rule too broad to follow. Matching goes by meaning, through a small model that answers in typed choices like the writing stage's judge (J14 [-§6.3, the judge),-] {+§6.3),+} with its own labelled sample and an "unsure" band the auditor reviews that [-night, because a false "same" can promote a rule and a false "new" hides one.-] {+night.+} *Same* adds an incident or a mention, and *adds detail* sharpens the statement or exception. *The owner changed the rule* writes a new revision, with the old one kept, struck and dated. *Conflicts* becomes a question in the morning report (§7.5), and *new* opens a row.

### 4.3 Concurrent writes, isolated nights, and erasure

Every write to a row is a compare-and-swap on its revision (J14 [-§7.2, publish a snapshot, or nothing);-] {+§7.2);+} the loser re-reads and retries, which is safe because insertion is idempotent. The auditor works on its own copy of the ledger and {+of+} the files it proposes to [-change, and records the-] {+change; if an+} erasure [-epoch it read; if the epoch has moved by publication time,-] {+happened meanwhile,+} it re-reads instead of publishing.

### 4.3 Concurrent writes, isolated nights, and erasure

Rows are never removed for age, only when the owner asks. The writing stage runs every deletion (J14 [-§7.7, erase and quarantine) and defines the links that record-] {+§7.7). This stage records+} where each [-item-] {+of its own artifacts+} came from (J14 [-§8.1, three fields and the links). This stage writes those links for its own artifacts (rule revision to incidents and evidence, fixture to record entries)-] {+§8.1)+} and offers one deletion [-interface. Given a record address or a subject, it-] {+interface, which+} follows [-the-] {+those+} links, never a [-search, and reports on each place:-] {+search:+}

### 4.3 Concurrent writes, isolated nights, and erasure

- evidence is stored as addresses, so it goes blank when the record's entry is erased (J1 §4.4); - fixtures copied from the record are deleted; - a rule whose wording holds the erased words is rewritten or [-retired (a loosening he asked for);-] {+retired;+} a rule left with no evidence goes back to [-him;-] {+the owner;+} - receipts, [-pending-] report [-items, the labelled history of §8-] {+items+} and past revisions [-of all of these-] get a status too.

### 4.3 Concurrent writes, isolated nights, and erasure

[-A place it cannot reach is named, never reported done. Each erasure raises the erasure epoch; until this stage has applied it, its tail waits and shows nothing older (T18; T24 for quarantine).-]

### 4.3 Concurrent writes, isolated nights, and erasure

[-A check whose positive fixtures are erased cannot be re-tested, so it enters a visible degraded state, *enforced, degraded: tests incomplete*, and runs its declared degraded action (§5.3), which the owner approved with the check, until he decides. It neither keeps acting on evidence that no longer exists nor switches itself off.-]

### 4.3 Concurrent writes, isolated nights, and erasure

{+A place it cannot reach is named, never reported done, and until this stage has applied an erasure its tail shows nothing older. A check whose positive fixtures are erased cannot be re-tested, so it reports *enforced, degraded: tests incomplete* and runs its approved degraded action (§5.3) until the owner decides.+} The night pass reads the record only through the reader that honours tombstones, and asks the gate's suppression check (J14 §7.7) before a candidate becomes evidence, so an erased correction cannot [-return the next night.-] {+come back.+} Content flagged as an attack is quarantined: kept, marked untrusted, never evidence.

### 5.1 The four rungs

A house rule can live in four places: a note in a drawer, read only if someone opens it; a line on the recipe card, read whenever that dish is cooked; a sign on the fridge, seen by everyone every time, though the more signs there are, the less each one is read; or a lock on the cabinet, which works whether anyone remembers the rule and gets in the way when it locks the wrong thing. The four rungs are those four [-places,-] {+places (Figure 3),+} and this paper is about when a rule earns the next one.

### 5.1 The four rungs

{+![The binding ladder. Each rung binds harder and costs more. A rule moves up only when the diagnosis of §5.4 finds it was in front of the model, clear and unopposed, and still broken; any other slip is repaired where it happened. A rule moves down only with the owner's approval.](images/fig2-ladder-v76.png){width=100%}+}

### 5.1 The four rungs

[-![The binding ladder. Each rung binds harder and costs more. A rule moves up only when the diagnosis of §5.4 finds it was known to be in view, clear and uncontradicted, and still broken; it moves down only with the owner's approval.](images/fig2-ladder-v75.png){width=100%}-]

### 5.1 The four rungs

{+The state words are exact so that the invariants of Appendix B can check them; the owner never has to read them. What he hears is a sentence a person would say, and each sentence claims no more than its state (Table 6).+}

### 5.1 The four rungs

{+| State, as the ledger records it | Today's assistant says | This design's agent says | |--------------------|----------------------|----------------------------------------| | captured, acceptance pending | "Got it, I'll remember that." | "Noted. I'll follow it for the rest of this chat; it isn't saved yet." | | held for approval (a rule for every turn) | "Saved to memory." | "I'd keep this as: reply in the language of your message; drafts for others follow theirs. Keep it?" | | accepted, not yet retrievable | (nothing) | "Saved. Searches will find it after the next index update." | | not in force this session (tail full) | (nothing) | "Noted, but I can't apply it in this chat: too many rules are waiting. It's in tomorrow's report." | | enforced, degraded | (nothing) | "My language check couldn't run on that reply, so I sent it as it was and flagged it for you." |+}

### 5.1 The four rungs

{+: What the agent tells the owner, today and in this design.+}

### 5.2 Where a rule enters, and why it climbs one rung at a time

[-Each-] {+We assume each+} rung up lowers $p_k$ and raises $u_k$: on rung 2 the cost is attention, on rung 3 building the check and the false alarms that block legitimate work. Most rules are taught once and never slip again, so a higher rung only adds cost. We do not know $p_k$ in advance, but an incident on a rung that was in force, [-known to be-] {+with the rule+} in view and [-unobstructed-] {+unobstructed,+} is direct evidence that $p_k$ is high there. Climbing one rung per such incident pays the higher price only for rules that have shown they need it.

### 5.2 Where a rule enters, and why it climbs one rung at a time

{+For a check, lowering $p_k$ is the point of the rung. Between rungs 0 and 2 it is an assumption. A rule that was already in view gains no reach by moving up; what changes is its position and framing, from one search result among others to a standing instruction near the top of the file read on every turn. Whether that binds harder is not measured. The offline replay of test 2 (§12) measures it rung by rung; if it does not, a rule in view that is still broken should go straight to a check.+}

### 5.2 Where a rule enters, and why it climbs one rung at a time

Money does not limit rung [-2. In the series' notation (J2 §7.1,-] {+2:+} a [-read costs a turn) a cached token costs $r$ times the base input price, $r$ from 0.025 to 0.1. A-] 40-token line read on an assumed 300 model calls a day (each tool step is a call) [-is 360,000 cached tokens a month; at the large-model price $\pi_\ell$ of \$4 per million input tokens that is-] {+costs+} 4 to 14 [-cents.-] {+cents a month at cached prices (J2 §7).+} Attention is the scarce resource (§1.2), so the budget of §7.1 is counted in lines and tokens.

### 5.3 What a check looks like

{+Builders know this path from code review. The third time a reviewer writes "no console.log in production code", someone adds a lint rule. It runs as a warning for a while, so the team can see how often it fires and whether it fires on code that is fine, before it may fail the build. A rule people keep disabling gets demoted. A check here goes the same way: the shadow run is the warning phase, "enforced" is the failing build, an owner's override is a disable comment with its reason, and only the owner can turn a failing rule back into a warning.+}

### 5.3 What a check looks like

[-A check is built from the ledger's evidence: the recorded slips are its positive tests, and recent similar actions that went well are its negative tests. Passing them proves little about new traffic. Before it may act, it runs in **shadow**, writing receipts on live actions without acting, for a week or 59 eligible opportunities, whichever is longer (proposed). The 59 is derived: with no false alarm in $n$ opportunities, the one-sided 95% upper bound on the false-alarm rate is $1-0.05^{1/n}$, which is 5.8% at $n=50$ and 4.95% at $n=59$, the fewest that bound it under 5%. One false alarm raises the need to 93 opportunities and two to 124; a check with more goes back for revision. A rule whose trigger fires twice a week takes about seven months to reach 59, and meanwhile its always-loaded line stays pinned (§7.1) and keeps protecting the owner. The owner approves on two numbers, each with its denominator and exact binomial bound: false alarms among eligible opportunities, and detections among genuine violations. A check that never fires has no false alarms, so the second matters as much. Genuine violations are rare by design, so detection is measured on **planted violations** from a generator the proposer cannot read (§9.2) and reported as synthetic: if none of 20 is missed, the lower bound on detection is $0.05^{1/20}$, 86%. Natural catches are counted apart. A check against irreversible harm skips the shadow and asks the owner instead of blocking until it has a record.-]

### 5.3 What a check looks like

{+A check is built from the ledger: the recorded slips are its positive tests, and recent similar actions that went well are its negative tests. Passing them says little about tomorrow's traffic. So a new check first runs in **shadow**: it sees every live action its rule applies to and writes down what it would have done, but does nothing. The shadow run answers two questions, and the owner approves on both, each shown with what it was counted out of.+}

### 5.3 What a check looks like

{+- *Does it stop good work?* Count its false alarms. With none, it runs for a week or 59 actions, whichever is longer (proposed). After 59 clean actions we can say, with 95% confidence, that it misfires on fewer than 5 in 100; after 50 the bound is still 5.8% (the exact one-sided binomial bound, $1-0.05^{1/n}$). One false alarm means waiting for 93 actions, two for 124; with more, the check goes back to be rewritten. - *Does it catch real slips?* A check that never fires never misfires, so this matters as much. Real slips are rare once a rule is in force, so we plant fake ones, made by a generator the check's author cannot read (§9.2), and report the result as synthetic: if it catches all 20, it catches at least 86 in 100. Real catches are counted separately.+}

### 5.3 What a check looks like

{+A rule that applies only twice a week needs about seven months to reach 59. Meanwhile its always-loaded line stays where it is (§7.1) and keeps protecting the owner. A check against harm that cannot be undone skips the shadow; until it has a record, it asks the owner instead of blocking.+}

### 5.3 What a check looks like

**Every check declares how it fails.** With its tests, a check carries a timeout and a [-**degraded action**,-] {+degraded action,+} approved with it: ask (the default), block (the default for irreversible harm), or a named fallback such as a deterministic rule. A model check that times out, returns a choice outside its type or cannot be reached takes that action and writes a receipt marked degraded; so does a check whose tests can no longer run (§4.3). The rule then reports *enforced, degraded* and the morning report carries an alarm. The declaration matters because the default can be to pass. A Claude Code hook that times out lets the tool call through unless it is set to block on failure (Anthropic, 2026b).

### 5.4 When a rule recurs, ask why before climbing

[-An incident does not climb on its own. The auditor first asks why the current home failed to bind, testing the causes in a fixed order, and the first cause it finds decides the repair (Table 6). An "unsure" at any step never climbs; it goes to the morning report.-]

### 5.4 When a rule recurs, ask why before climbing

{+A new hire keeps sending the weekly report in the wrong format. A good manager does not write a sterner memo. First they check whether the memo reached the new hire, whether an older memo says the opposite, whether it was clear, and whether it sat on page 40 of the handbook. Only if a clear, unopposed memo was in front of them and they still got it wrong does the manager change the form itself, so the wrong format cannot be sent.+}

### 5.4 When a rule recurs, ask why before climbing

{+The auditor does the same with an incident (Table 7). It tests all six causes and repairs every one it finds, cheapest first, so one slip does not cost the owner a second correction for a cause it already showed. Only when steps 1 to 5 all come back clean does the rule climb. An "unsure" at any step never climbs; it goes to the morning report.+}

### 5.4 When a rule recurs, ask why before climbing

| [-Cause, tested in order-] {+Cause+} | How the auditor tests it | Repair | |----------------|------------------------------------|----------------------| | 1. Exposure unknown | Code: the receipt says {+the model's input was+} "sent, [-unconfirmed", or-] {+unconfirmed" (defined below), so+} a [-provider's API-] {+provider may have+} compacted the [-window midway and it was recorded as unprotected (J1 §6.4, §7.4)-] {+rule away+} | [-Repair-] {+Confirm+} or instrument delivery; never climb | | 2. Not loaded where the slip happened | Code: the rule's home was not [-in-] {+among+} the [-known input of-] {+files sent on+} that call | Move it to a home that loads there | | 3. Another [-line-] {+text+} contradicted it | The contradiction check of [-§7.3-] {+§7.3, run+} against {+everything that call carried (the owner's files,+} the [-always-loaded snapshot in force at-] {+harness's own instructions, tool descriptions, retrieved notes and+} the [-slip,-] {+session so far),+} with the slip [-itself-] as the case: does another [-line,-] {+text,+} read as the model read it, call for what the agent did? {+The source is named+} | [-Narrow or remove that-] {+By source: narrow an owner+} line, with {+his approval (§7.4); override or switch off harness text; if+} the [-owner's approval (§7.4)-] {+owner asked for the other behaviour earlier in the session, no incident+} | | 4. Too vague to act on | A fresh model sees only the rule and the situation and says what the rule requires; a wrong answer or "unsure" means vague | Rewrite it with its trigger and an example | | 5. Buried in a long file | Code: the rule sat [-past-] {+in+} the [-budget line,-] {+lower half of the always-loaded file,+} or the file [-was-] {+ran+} over budget {+under an owner's exception (§7.1)+} | [-Shorten-] {+Move it up by harm, or shorten+} the [-file; order it by harm (§7.1)-] {+file+} | | 6. In view, clear, unopposed, and still ignored | Steps 1 to 5 all came back clean | Climb one rung |

### 5.4 When a rule recurs, ask why before climbing

Step 1 reads [-the controller's knowledge level at the slip, which-] {+what+} the keeping stage [-writes-] {+recorded about the model's input+} on [-every receipt.-] {+that call.+} It is **known input** when the runtime built the [-model's input,-] {+input itself,+} and **sent, unconfirmed** when a provider's tool or API controls the window and may have compacted the rule away (J1 [-§6.6, the adapter contract).-] {+§6.6).+} A slip in the second case is never evidence for climbing: the repair is to confirm delivery. In a harness that does not build the input itself, a hook that logs which instruction files loaded, such as Claude Code's InstructionsLoaded, is a ready source for steps 1 and 2 (Anthropic, 2026a). Test 3 of §12 measures this procedure against the owner's own blind labels.

### 5.4 When a rule recurs, ask why before climbing

None of these questions is new. Claude Code's documentation asks most of them of its users (Table [-7).-] {+8).+} What this design adds is running them on every incident, {+without anyone asking,+} keeping the count, and testing the check before it acts.

### 5.4 When a rule recurs, ask why before climbing

| Cause | What Claude Code's documentation tells a user to check by hand | [-What this design adds | |--------------|-------------------------------------------|---------------------------|-] {+|--------------|-----------------------------------------------------------------|+} | Exposure unknown | "Run /context and check the list under Memory files … If one is missing there, Claude can't see it"; the InstructionsLoaded hook logs what loaded | [-Recorded on every incident; an unconfirmed slip never counts toward a climb |-] | Not loaded where the slip happened | "Check that the relevant CLAUDE.md is in a location that gets loaded for your session" | [-The rule moves to a home that loads there |-] | Another [-line-] {+text+} contradicted it | "Look for conflicting instructions across CLAUDE.md files … Claude may pick one [-arbitrarily" | A contradiction check-] {+arbitrarily"; "Check whether your instruction competes with guidance Claude Code adds+} on [-every promotion; the other line is narrowed with approval-] {+its own"+} | | Too vague to act on | "Make instructions more specific" [-| Rewritten with its trigger and an example-] | | Buried in a long file | Files over 200 lines "consume more context and may reduce adherence" [-| A budget in lines and tokens, and the file ordered by harm-] | | In view, clear, and still ignored | "If the instruction is something that must run at a specific point … write it as a hook instead" [-| A check, tested in shadow before it acts | | When it runs | When the user notices and debugs | On every incident, by the auditor, with the count kept in the ledger-] |

### 5.4 When a rule recurs, ask why before climbing

A rule comes down (Figure [-2)-] {+3)+} only as a proposal the owner approves (§7.4): {+an always-loaded line whose check now carries it (§7.2),+} a check whose receipts show false alarms or overrides, or a rule unused for months that never recurred. Nothing comes down for being old or long.

### 5.4 When a rule recurs, ask why before climbing

[-![Two speeds, on the correction of §1. The owner's sentence is stored as c-1873/0 before the agent replies; after the answer, a reflection turn takes it from the queue once and proposes rule R-42, held for approval and active for the session as a provisional line. At night the auditor works on its own copy; the morning report carries its proposals.](images/fig3-speeds-v75.png){width=100%}-]

### 6. Two speeds

Figure [-3-] {+4+} shows both speeds on the opening's correction.

### 6. Two speeds

{+![Two speeds, on the correction of §1. The owner's sentence is stored as c-1873/0 before the agent replies; after the answer, a reflection turn takes it from the queue once, matches it to the ledger and proposes rule R-42, held for approval and in force for the rest of the chat. At night the auditor works on its own copy; the morning report carries its proposals.](images/fig3-speeds-v76.png){width=92%}+}

### 6.1 The fast path

**A correction is stored before it is answered.** Once the owner's turn is durably appended to the session record, before the model call that answers it, the correction is *captured* (J1 §4.6, when a turn is captured). In the same step, each owner span labelled as a correction writes its own event, keyed by its correction ID, to a durable [-queue. It also-] {+queue, and+} enters the session's tail word for [-word. The **tail** is a short block the harness adds after the owner's newest message on every model call, outside the cached prefix, so it can change from call to call without making the provider read everything again; it has its own budget (§7.4).-] {+word (below).+} A crash after that point loses nothing. On restart the fast path re-reads the record from its last queued address, and every consumer ignores an ID it has already seen, so each span is replayed once and two spans never merge. The reply says only what is [-true: "captured, acceptance pending",-] {+true (Table 6),+} never "I'll remember that".

### 6.1 The fast path

{+**The owner's words stay in view until the stored copy can take over.** Saving a correction takes time: the writing stage must accept the new item, and the finding stage must index it before a search can return it. Until then, a search can still return the old version. So his sentence rides along with every model call in the session, in the **tail**, a short block the harness adds after his newest message. The tail sits after the part of the input the provider caches, so it can change from call to call without making the provider re-read everything, and it has its own budget (§7.4). While his sentence is there, it beats the stored fact it corrects.+}

### 6.1 The fast path

**A correction is tracked on two clocks** (Figure [-4).-] {+5).+}

### 6.1 The fast path

*Is its work finished?* Each repair a correction needs is a child operation (§3.2). The correction closes when every child has a final [-answer, durably-] {+answer ("terminal" in the appendices),+} recorded by the stage it went to: the write was accepted (a receipt), it is held where the owner can see it (acknowledged, not accepted), it was refused, or a task or routing record was read back. A refusal's reason goes to the morning report (§7.5). "Pending" is not a final answer: while the judge is down (J14 §5.3, when something fails) the request survives a crash but stays open, and so does the correction.

### 6.1 The fast path

{+*May the owner's sentence leave the tail?* It leaves once every repair it asked for can be found (the finding stage confirms it, J2 §8.2) or is held for the owner. Three cases differ:+}

### 6.1 The fast path

[-*May the owner's sentence leave the tail?* Only when,-] {+- a rule meant+} for every [-child, the finding stage's overlay has confirmed the item can be found (J2 §8.2, becoming retrievable) or the child is held (T10). Until then the sentence stays, and it outranks the stored fact it corrects, even one the finding stage still serves. There are three exceptions. A universal rule-] {+turn,+} held for [-approval-] {+his approval,+} keeps its line until he approves {+it+} or the session [-ends. A-] {+ends; - a+} line that contradicts a rule {+already+} in force is withdrawn [-(§7.3). And-] {+(§7.3); - if the writing stage refuses+} a [-refusal decides by its reason: if-] {+repair, the reason decides. If+} only saving was refused [-(a prohibited class,-] {+(the item is of a kind that may not be stored,+} say), the instruction still holds this session and the line stays, marked "not [-saved"; if-] {+saved". If+} the instruction itself is invalid (it clashes with a rule in force, or he [-withdrew it),-] {+took it back),+} the line [-leaves. Either way the outcome is recorded with the refusal and he is told at once.-] {+leaves.+}

### 6.1 The fast path

{+Either way the outcome is recorded with the refusal, and he is told at once.+}

### 6.2 The slow path: the nightly auditor

The auditor runs in a fixed order, because each step needs the one before. It [-**gathers**-] {+gathers+} the ledger, the day's session records (temporary ones [-skipped, read from the owner's own words for corrections the fast path missed,-] {+skipped;+} untagged [-entries and-] {+owner spans, which it tags;+} open events), the receipts of every check and the outcomes of scheduled jobs. It [-**counts**:-] {+counts:+} confirms unsure matches, merges duplicate rows, inserts [-incidents idempotently.-] {+incidents.+} It [-**decides**:-] {+decides:+} diagnoses each new incident (§5.4), picks the [-repair,-] {+repairs,+} drafts checks with their tests, proposes [-demotions where receipts show false alarms.-] {+demotions.+} It [-**prunes-] {+prunes+} and [-reports**:-] {+reports:+} proposes [-removing from rung 2 only what-] {+freeing rung-2 lines+} a [-higher rung-] {+check+} now carries (§7.2), and assembles the morning report (§7.5). [-And it **catalogues**:-] {+Last,+} it writes one card per session that finished that day, skipping automated runs. {+A card lists what the session decided and the corrections it held, so a correction whose event never opened shows up as a card line with no ledger entry, and the auditor asks the owner about it.+} The finding stage uses the cards to send a question to the session that did the work (J2 [-§6.9, ask the session that did the work). A-] {+§6.9), and a+} card whose claims were later superseded is [-marked, so a woken session can be told what changed-] {+marked+} (J1 §8.3). The writing stage's nightly pass (J14 [-§4.2, what the nightly pass picks out)-] {+§4.2)+} and the finding stage's index builds (J2 [-§8, built ahead, kept current)-] {+§8)+} run first, so their holds reach the owner the same morning.

### 7.1 A budget measured in attention, and what happens when it is full

Pins can fill the budget, since some rules resist checking. Then the file is [-**saturated**,-] {+saturated,+} and the design does not resolve it alone. Admission stops, and the new rule stays a provisional line in the tail, shown as held, budget full. The owner chooses: load one pinned rule only where it applies (rung 1), grant a budget exception of so many lines with its cost recorded, approve a check for one pinned rule, which frees its line, or move a rule down himself. A pinned rule never leaves the file silently, because it is a rule the owner had to repeat.

### 7.2 Prune by binding

{+A rule leaves rung 2 in one of two cases. The first is that a check carries it, and that is a trade-off, not a formality. With the line in place the model rarely slips, so the check has little to do. Without it the model is no longer told the rule: every slip becomes the check's work, and every miss of the check becomes a slip the owner sees. So the line is freed only on a measured trade-off. The development replay (§9.2) re-runs recent eligible situations without the line to estimate how often the model would slip, and the line goes when that rate times the check's miss bound (§5.3) stays below the slip rate with the line in place. The owner may also free it to make room in the budget; the report then says he is accepting more rewrites in exchange for a shorter file. After the line goes, the check's firing rate is watched, and a rise past the replay's estimate proposes putting the line back. The second case is that the rule earned no place: no trigger for about two months, and no incident, ever.+}

### 7.2 Prune by binding

[-A rule leaves rung 2 in one of two cases: a higher rung carries it (its check exists and the receipts show it firing on the right cases), or it earned no place (no trigger for about two months, and no incident, ever).-] When a rule moves down, the finding stage indexes it as an owned asset (J2 §4.2, the asset index), with use keys cut from its trigger and from the slips in its evidence (J2 §5, four keys). While its area is active, a pointer to it stays in the index file (J2 §4.3, the index file). The use keys find it again, since nobody names a rule he believes the agent already follows.

### 7.3 One voice

A provisional line that a rule in force contradicts is withdrawn from the tail. This stage does not wait for a notice. The re-check is part of the model-call operation itself, so every path that produces a call runs it: a reply, a tool continuation, the reflection turn, a scheduled job. The operation reads the newest published always-loaded snapshot and compares each tail line with it. A contradicting line is withdrawn, with a one-line notice to the owner, before the call goes [-out (T6). No-] {+out. So no model+} call runs with a {+tail+} line that contradicts a rule {+already+} published [-before its check (invariant I5, Appendix B);-] {+when the call was checked;+} a rule published [-after the check-] {+a moment later+} is caught by the next [-call's.-] {+call (Appendix B checks this).+}

### 7.4 Approval, and who may loosen

Approval follows risk: what is cheap and undone in one step happens at once; what every turn reads, or what can block his work, waits for the owner (Table [-8).-] {+9).+} The loop may tighten on its own within these gates. Only the owner loosens.

### 7.4 Approval, and who may loosen

An owner who states a universal rule outright should not have to approve it again the next morning. So the agent runs the contradiction check at once and [-shows,-] {+offers,+} in the same reply, the wording it would [-keep: "I'll-] keep [-this as: reply in the language of your message; drafts for someone else follow theirs. Keep it?"-] {+(Table 6, second row).+} His yes [-is-] {+approves that wording, exception included;+} the [-approval; what it adds to his words is the agent's wording, with its exception, checked against every line in force. The-] line loads on every turn from the next session. If he does not answer, the item waits in the morning report.

### 7.4 Approval, and who may loosen

**The tail has a budget** (we propose eight lines and 400 tokens). Owner sentences whose events are open, provisional universal rules and rules waiting on a saturated file compete for it, ranked by the harm of a slip (§7.1), the newer winning a tie. A line that does not fit displaces the lowest-ranked one, or stays out if it ranks lowest. Nothing displaced is lost, since its event stays queued and its proposal in the ledger; it is only out of force this session, so the agent [-names it ("noted; not in force this session: too many pending rules")-] {+tells the owner (Table 6)+} and the report lists it. A slip on it is diagnosed "not loaded", and the repair is the budget, which goes to the owner.

### 7.4 Approval, and who may loosen

A proposal passes two filters before the owner sees it. The first is deterministic and no model can override it (Wahi, 2026): tests and shadow run pass, the budget holds, the contradiction check finds nothing. The second is a doubt pass: a reviewer from another model family, in a fresh context, sees only the proposal, its evidence and the always-loaded file, and argues against it. The model that writes to rungs 2 and 3 is the strongest available, judged by how often its changes are [-reverted.-] {+reverted; before there is any revert history, by a public instruction-following benchmark, and every such change waits for the owner in any case.+}

### 7.4 Approval, and who may loosen

| From → to | Trigger | Decided by | Takes effect | [-|---|---|---|---|-] {+|----------|------------------|---------|-------------|+} | none → rung 0 or 1 | A rule-gap correction | Proposed here; accepted by J14's gate | On its receipt; undone in one step | | none → provisional | The owner's own universal instruction | Fast path | At once, in the tail only; expires unless approved | | provisional → rung 2 (active) | Approval | Owner | Next session | | rung k → k+1 | [-Incident diagnosed "known to be-] {+Diagnosis step 6:+} in view, clear, {+unopposed,+} still [-ignored"-] {+ignored (§5.4)+} | Owner, for rungs 2 and 3 | Next session; a check after its shadow run | | none → check (enforced) | Irreversible harm, at the first correction | Owner | After approval; asks until then | | rung 3 → 2, or block → ask | False alarms or overrides in receipts | Proposal; owner | After approval; he may override any action meanwhile | | rung 2 → 1 or 0 | A {+replay shows the+} check [-carries it,-] {+can carry it alone (§7.2),+} or {+two months with+} no trigger [-for two months-] and no incident ever | Proposal; owner | Next session | | any → held | Budget full, conflict, judge down | Automatic | Until the owner answers |

### 7.5 The morning report: one channel to the owner

Every memory stage sometimes needs the owner, and one channel serves them [-all. This stage asks for approvals. The-] {+all: this stage's approvals, the+} finding [-stage shows-] {+stage's changes to+} the [-diff of each-] index file [-it publishes-] (J2 [-§4.3,-] {+§4.3), and+} the [-index file). The-] writing [-stage brings clashes and conflicts (J14 §6.2), closures below its bar (J14 §7.5), its pending backlog (J14 §5.3),-] {+stage's clashes, uncertain closures, backlog,+} incomplete erasures [-(J14 §7.7)-] and merge [-or split-] proposals (J14 [-§9.2).-] {+§6.2, §7.5, §7.7).+}

### 7.5 The morning report: one channel to the owner

Each item is one line: what is waiting, its evidence, and the answers it accepts. The answer goes back to the stage that raised it, which applies it through its own path; the report changes no file. Items are ordered by what waiting costs: alarms first (a missing receipt, [-§9.1;-] a degraded check, [-§5.3;-] a burst of [-closures, J14 §7.6, closure alarms),-] {+closures),+} then second incidents, displaced tail lines, holds, incomplete erasures, conflicts and the remaining proposals. The report is capped at about ten items, paid for in the owner's minutes; what does not fit waits with its age shown, and an unanswered item never becomes a yes by expiring. A night with no report is an alarm.

### 7.5 The morning report: one channel to the owner

Two lines stand in every report, grouped so they take no item's place. The first lists what the agent learned on its own since the last report, each with an undo: "Learned from your message of 3 October: in supplier drafts, copy you. Undo?" A sentence misread as a correction would otherwise change behaviour with nobody noticing. The second names the rules he has repeated that no repair has yet [-addressed.-] {+addressed. Today's assistant shows nothing, or "Memory updated" when it saves a note. A report in this design might read as follows (an illustration; the numbers in item 4 are invented):+}

### 7.5 The morning report: one channel to the owner

{+> **Morning report, 11 October.** About three minutes. > > 1. Alarm: the reply-language check timed out twice yesterday and sent both replies with a flag. [see them] > 2. Broken again with the rule in view: "keep answers short" (R-51), on 10 October. Draft a check? [yes / not now] > 3. Clash: your new rule "copy me on supplier drafts" contradicts R-15, "nobody in copy". [keep the new one / keep R-15 / both, with an exception] > 4. Remove R-42's always-loaded line? Replayed without it, the model would answer in the wrong language about 1 reply in 20, and the check would let through at most 1 in 300. [yes / no] > > Learned on my own since the last report: retry a failed night job once before telling you (your message of 10 October). [undo] > > Repeated, no repair yet: "explain it more simply", three times this month.+}

### 7.5 The morning report: one channel to the owner

{+It costs him a few minutes, and he gets the reason behind every change.+}

### 8. Procedures, and the texts machines run on

Most lessons about how to do a task belong in the file that describes it, on rung 1: a correction that points at a step edits that step. A recurring kind of task the agent solves well is kept as a skill file, as Voyager keeps working procedures (Wang et al., 2023), found like any owned asset and retired when its outcomes decay. A strategy that fails three times in a day (proposed) switches to a [-hand-written-] fallback {+the owner approved when the strategy was adopted (by default, asking him)+} instead of receiving another patch. The instructions of scheduled jobs and small classifiers learn from outcomes in the same way: scored against the owner's labels with environmental failures removed (§3.2), and a rewrite is promoted only if it wins on the untouched evaluation stream and loses nothing on the regression suite (§9.2).

### 9.2 Three streams, kept apart

{+Each learner here, from the classifier's operating points to a text's wording, keeps three sets of cases apart: a development replay it may tune on, a regression suite it must always pass, and an untouched evaluation stream, the most recent weeks, that decides acceptance. These are the training set, the unit tests and the held-out test set of machine learning, with one twist: the test set is retired after it has decided three changes (proposed), because every decision leaks a little of it to the proposer; it joins the regression suite, and the latest untouched weeks replace it.+}

### 9.2 Three streams, kept apart

[-Each learner here, from the classifier's operating points to-] {+What+} a [-text's wording, keeps three sets of cases apart: a **development replay** it-] {+builder+} may [-tune on, a **regression suite** it must always pass,-] {+not expect is who may touch each set,+} and [-an **untouched evaluation stream**, the most recent weeks, that decides acceptance. Capabilities-] {+capabilities+} enforce [-the split, following PROCTOR (Wahi, 2026).-] {+it, as Wahi (2026) recommends.+} The proposer reads the replay and the regression suite and writes only to a staging [-area. The stream's answers sit in a store its process-] {+area; it+} holds no credential [-for,-] {+for the stream's answers,+} and it can neither run the acceptance step nor apply its own [-change;-] {+change, which+} the gate and the owner do. The evaluator reads the stream and the staged change and edits neither. [-A-] {+The+} stream [-wears out, since every accept or reject tells the proposer something about it: after it has decided three changes (proposed) it joins the regression suite, and the latest untouched weeks replace it. It-] includes cases built to reveal leakage, such as a slip whose answer the proposer saw in development. For a check, the recorded slips are too few to hold out, so its acceptance numbers come from the shadow run and planted violations (§5.3). The writing and finding papers apply the same three-way split to their own learners.

### 9.3 Retiring a loop that stops paying

A loop past its point of diminishing returns should switch off, so each keeps an account in the owner's minutes. **Gain** is the drop in violations per eligible opportunity on the rules it changed, against rules it has not treated, times the eligible opportunities, times the minutes a re-teach costs him. [-During-] {+Violations are counted by+} the [-trial-] {+detector+} of [-§12 (test 2)-] {+test 2 (§12),+} the {+same way for treated and+} untreated [-rules are the randomised arms. After it nothing is randomised, and a-] {+rules. A+} rule is treated right after a burst of slips, so a plain before-and-after comparison overstates the gain (regression to the [-mean). The running system keeps a small standing holdout instead:-] {+mean); outside the trial,+} one low-harm rule in ten, picked at random, stays untreated for a month [-(proposed), and any before-and-after figure is reported with its bias stated.-] {+as a holdout (proposed).+} **Cost** is the minutes he spends on its report items, the minutes lost to false blocks and overrides, and its token spend at a rate he sets. When the gain stays below the cost for three weeks in a row (proposed), the loop goes dormant and says so in the [-report; it wakes when-] {+report. Only its proposals sleep: the fast path's capture and the ledger's count never do, so+} a new kind of correction [-appears,-] {+(one matching no row the loop has treated) is still seen and wakes it, as does a rise in+} his correction rate [-rises,-] or [-he asks.-] {+his asking.+}

### 9.3 Retiring a loop that stops paying

![A learning loop's account, with illustrative numbers in one unit. Its weekly gain falls as the rules it can fix get fixed, while its cost stays flat. After three weeks below cost it goes dormant and measures nothing; a new kind of correction wakes [-it.](images/fig5-retire-v75.png){width=82%}-] {+it.](images/fig5-retire-v75.png){width=70%}+}

### 10. One correction, start to finish

[-Back to the Monday of §1, with the word the agent may use at each step (Table 5). The owner's turn is appended to the session record before the model call that answers it: *captured*. The same append queues the correction as c-1873/0 and puts his sentence in the tail. After the answer, the reflection turn sorts it as a rule gap and proposes R-42: reply in the language of the owner's message, except in drafts for someone else. A rule about every reply is an always-loaded line, so the agent offers that wording in its reply and the writing stage holds it. He is busy and does not answer. The hold closes the event without being acceptance, and the provisional line keeps R-42 *active* for the session: "held for your approval; applied for the rest of this session". Next morning he approves: the gate's receipt makes it *accepted*, the overlay's acknowledgement *retrievable*, and it loads on every turn from the next session.-]

### 10. One correction, start to finish

{+Back to the Monday of §1, with the word of Table 5 at each step; Table 10 sets it beside today's assistant.+}

### 10. One correction, start to finish

{+On day 0 the owner's turn is stored before the reply (*captured*), and his sentence enters the tail. After the answer, the reflection turn proposes R-42: reply in the language of the owner's message, except in drafts for someone else. The agent offers that wording; he is busy and does not answer, so the writing stage holds it and the tail keeps R-42 in force for the session. He approves it the next morning (*accepted*, then *retrievable*).+}

### 10. One correction, start to finish

{+On day 10 the slip has exposure *known input*, and the diagnosis finds one cause, at step 3. An older line, L-7, "write the weekly supplier report in English", had passed the contradiction check when R-42 was promoted, since as written it is about a report; the slip shows the model applying it to a reply. With his approval L-7 moves into the report job's own file. Steps 4 and 5 find nothing, so R-42 does not climb.+}

### 10. One correction, start to finish

[-The second slip, on-] {+On+} day [-10, is an incident with exposure *known input*. The diagnosis stops at step 3. An older line, L-7, "write the weekly supplier report in English", had passed the contradiction check when R-42 was promoted, since as written it is about a report, not replies; the slip shows the model applying it-] {+40 steps 1+} to [-a reply. With his approval L-7 moves into the report job's own file, and R-42 does not climb. At the third slip, on day 40, R-42 was known to be in view, clear and unopposed,-] {+5 all come back clean,+} and the auditor drafts a [-check. A-] {+check: a+} small model compares the {+reply's+} language [-of the reply-] with that of [-the owner's-] {+his+} last message and rewrites on a mismatch, with a two-second timeout and "send and flag" as its degraded [-action, since a wrong-language reply can be undone. Its positive tests are the three slips; its negatives, the last two hundred replies and the drafts meant to differ.-] {+action.+} In a week of shadow it sees 60 replies [-to the owner and raises-] {+with+} no false alarm (at most 4.9% at 95% [-confidence),-] {+confidence)+} and [-it-] catches all 20 planted wrong-language replies (at least 86%, synthetic). [-After the doubt pass he-] {+He+} approves it: *enforced*. [-Once it has fired and rewritten twice,-] {+On day 66 a replay without+} the [-auditor proposes-] {+always-loaded line shows the check can carry the rule alone (§7.2), he approves+} freeing the [-rung-2 line; he approves,-] {+line,+} and a pointer stays in the index file (Figure 1).

### 10. One correction, start to finish

| | Today's assistant (§1) | This design, the same Monday | |------------|------------------------------|------------------------------------| | Day 0: "reply in the language I write in" | Apologises and saves a note in the memory store | Stores the sentence before replying and proposes R-42, which works for the rest of the session as a provisional line. Approved next morning, it loads on every reply | | Second slip | The note was never loaded; the rule is copied into the always-loaded file | Day 10. The diagnosis finds an older line for the weekly report ("write it in English") applied to a reply; that line moves to its job, with approval. R-42 stays where it is | | Third slip | The file has grown, an older line says the opposite, and the rule is written down a third time | Day 40. R-42 was in front of the model, clear and unopposed, and still broken. A check is drafted, passes a week in shadow and is approved | | Afterwards | Nothing would stop a fourth slip, and nobody knows why the third one happened | The check rewrites wrong-language [-replies, and-] {+replies;+} the always-loaded line [-is freed.-] {+goes once a replay shows the check can carry it.+} If he ever repeats himself, the receipts show whether the check missed, never ran or ran degraded | | What the owner did | Gave the same instruction three times | Corrected three times as well, and gave four approvals; each correction removed a different cause |

### 10. One correction, start to finish

To be fair to today's assistants: in this example the design does not spare the owner the second and third corrections. What changes is that [-each-] {+no repeat is wasted. Each+} one removes a different cause, [-and-] {+so+} the [-third ends the problem.-] {+repeats stop instead of piling up.+} Appendix B runs the same machinery through every failure the four stages can meet at once.

### 11. Conclusions

An agent whose model cannot change learns through the texts and checks around it. This design treats the owner's corrections as labels and repairs the cause of each slip; only a rule [-known to have been-] {+that was+} in view, clear and unopposed, and still broken earns a stronger [-form.-] {+form, and a check acts only after a shadow run.+} The aim is the cyclist's [-balance:-] {+arc:+} a [-lesson taught once that-] {+wobble, a correction,+} then [-runs on its own.-] {+balance. No repeat should be wasted, and the repeats should stop.+} Nothing here has been built; only a model of the handoffs has been checked (Appendix B), and §12 names the tests that would decide the rest.

### 11. Conclusions

The limits are these. The design is only as good as its correction detector (§12, test 9). [-Checks can be wrong or down: a-] {+A+} check that blocks useful work trades one correction for another, and a degraded check protects only as well as its [-fallback, so-] {+fallback;+} shadow runs, receipts and demotion bound the damage without removing it. {+Freeing an always-loaded line trusts the check's miss bound, which comes from planted, synthetic slips.+} Approvals cost the owner time, and if proposals outgrow his mornings the gate becomes the bottleneck it was built to protect; the main trial counts those minutes. The cost model of §5.2 is unmeasured, {+and that a rule already in view binds harder higher up the text rungs is an assumption,+} so one rung per diagnosed incident is a reasoned default, not a fitted policy. Some rules resist checking ("explain it more simply") and may stay on rung 2. Where the controller cannot confirm what the model received, slips land in "exposure unknown" and the climb waits. A [-rule built from a-] sentence the owner did not mean as a correction can still [-mislead-] {+become a rule that misleads+} within its [-task, and every model change replays the checks' tests before it serves.-] {+task.+} The checker of Appendix B shows only that the scenarios it enumerates pass in a model of the [-design, under crash, duplicate and reorder;-] {+design; other+} sequences [-outside them-] can still fail, and code [-built from the design-] is a further step. And the design serves one owner: the mechanisms should carry over to others, the particular rules will not.

### 12. Next steps

TinkerClaw, the agent harness this series designs for, will build and test this design; a later version of this paper will report the results. Every test tunes on the development replay and decides on the untouched stream (§9.2). Three tests decide the claim: test 2 (does the ledger beat today's alternatives), test 3 (why rules really fail) and test 8 (do checks work). [-The others test-] {+Tests 1, 7 and 13 are short, and the rest check+} that the machinery [-works.-] {+works (Table 11).+}

### 12. Next steps

[-1. **Pilot.** Six rules the owner has given more than once; three get a check, three stay as always-loaded text, for four weeks. It shows only that opportunities, violations, owner minutes and false blocks can be counted. 2. **The ledger against today's alternatives, in parallel arms.** A rule is assigned on the day it is corrected a second time, randomised in blocks by harm class to one of four arms: always-loaded text only; scoped rules with a periodic owner-approved prompt audit, as Claude Code offers; checks the owner creates from the conversation when he chooses, as hookify offers; or this design. Outcomes count from assignment (intention to treat), so the wait for approval, construction and shadow is charged to the arm that needs it: violations per eligible opportunity, waiting-time violations included, and owner minutes on approvals, waiting and false blocks. Violations after the mechanism first acts are the secondary analysis. All arms run in the same weeks. Rules share one always-loaded file, so a repair in one arm can help another's rules: every shared-file edit is logged, and the other arms' violations in the two weeks either side give an exploratory estimate of the spillover, not a causal one. The design predicts fewer violations than the text and scoped-rule arms, at no more owner minutes than the hook arm. Scale limits what one owner can show. He may produce a handful of rules corrected a second time in a month, one to three per arm, so a single-owner trial is a feasibility study: it shows whether the outcomes can be counted and which way they point. A trial able to detect a halving of violations needs several owners. 3. **Why rules fail.** For every incident, record the diagnosis of §5.4 and the exposure; the owner labels a sample blind. If "known to be in view, clear and still ignored" is rare, most of the gain comes from moving and narrowing lines. 4. **The transition specification** of Appendix B, on every build and later on the code. This stage's transitions are T2, T3, T4, T6, T8, T10, T11, T18 and T24. The same harness runs what the journey does not walk: compaction right after a correction, a model change, a temporary session, a rule planted in a web page, a missing receipt. 5. **Counting.** One correction seen by both paths; a harmless restatement; a genuine later violation. Pass: one incident, for the violation only. 6. **Budgets under load.** A queue backlog, three universal corrections in one session and a saturated always-loaded file, at once. Pass: no pinned rule leaves; every displaced line is named to the owner in the turn and in the report; nothing is lost from the queue or the ledger. Then fill the tail with ten protected lines of 60 tokens each. Pass: none is displaced, the actions they govern stop, and one owner question names the options of §7.4. 7. **Pruning by binding against pruning by age,** over sixty days: violations per eligible opportunity of the rules each policy moved down. 8. **Checks.** In shadow: false alarms among eligible opportunities and detections among planted violations, each with its denominator and 95% bound, the planted ones labelled synthetic. Then fires, true catches and owner overrides live. Then cut a model check's provider immediately before an irreversible action. Pass: the declared action runs, the receipt says degraded, the rule reports "enforced, degraded", and the report raises an alarm. 9. **Correction detection.** Precision and recall of the shared classifier at each stage's operating point, on a hand-labelled sample, with and without the wrapper removed. 10. **Erasure.** Erase a correction and run the night. Pass: every place of §4.3 reports a status, and paraphrase probes find the erased words in no rule, fixture, receipt or rewritten text. Then erase the only positive fixture of an active check. Pass: it shows "tests incomplete" at once and runs its approved degraded action until the owner decides. 11. **Procedures and writers.** The held-out win rate of promoted texts, and the revert rate of rung-2 edits per model. 12. **The catalogue.** Cards exist for every finished session of the night, and a decision planted in one session is found through its card the next morning. A refused child of each kind leaves the tail in the state §6.1 gives it, and the owner is told. 13. **Weekly headline:** the owner's correction rate, and the rules he has repeated that no diagnosed repair has yet addressed.-]

### 12. Next steps

{+**Test 1, pilot.** Six rules the owner has given more than once; three get a check, three stay as always-loaded text, for four weeks. It shows only that the outcomes of test 2 can be counted.+}

### 12. Next steps

{+**Test 2, the ledger against today's alternatives, in parallel arms.** A rule is assigned on the day it is corrected a second time, randomised in blocks by harm class to one of four arms: always-loaded text only; scoped rules with a periodic owner-approved prompt audit, as Claude Code offers; checks the owner creates from the conversation when he chooses, as hookify offers; or this design. Outcomes count from assignment (intention to treat), so the wait for approval, construction and shadow is charged to the arm that needs it. All arms run in the same weeks.+}

### 12. Next steps

{+Every outcome is counted the same way in every arm. The primary one is the owner's repeats per rule, read from his own words: it is what the design promises. The second is violations per eligible opportunity, which needs a detector that sees every arm alike, since the owner's corrections miss the slips he lets pass, a check sees its own catches, and he knows which rules have checks. So each week, for each rule, a random sample of its eligible actions is judged by a model from another family that does not know the arm; the owner judges a share of the same actions, also blind, and the agreement between the two is reported. A one-off override ("this one in English, please") is not a violation. The third outcome is owner minutes on approvals, waiting and false blocks. Rules share one always-loaded file, so a repair in one arm can help another's rules; shared-file edits are logged, and the spillover is estimated, not controlled. The design predicts fewer repeats and violations than the text and scoped-rule arms, at no more owner minutes than the hook arm.+}

### 12. Next steps

{+Scale decides what one owner can show. In the example, R-42 broke twice in about 40 days at about 60 replies a week, roughly 0.6% of replies; take 0.6 to 1%. Detecting a halving of the violation rate at the 5% level with 80% power (a Wald test on the rate ratio) needs about 49 violations in the comparison arm, so 5,000 to 8,000 eligible actions per arm. That is about 20 to 30 rule-months for rules that apply to every reply, and 570 to 940 for rules that apply twice a week, before allowing for rules that differ from each other. One owner produces one to three such rules per arm a month, so for violations a single-owner trial is a feasibility study, and a powered one needs several owners. Two parts work at one owner's scale: the repeats outcome, and an offline replay of the rungs, which re-runs each rule's recent eligible situations with the rule as a memory note, a task line, an always-loaded line and a check, on the same model, and counts compliance: hundreds of cases per rule at no cost in owner time, measuring the assumption of §5.2 that each rung up binds harder.+}

### 12. Next steps

{+| Test | What it exercises | Passes when | |-----------|----------------------------------------|----------------------------------------| | 4. Transitions | This stage's handoffs in Appendix B, on every build and later on the code; also compaction right after a correction, a model change, a temporary session, a rule planted in a web page, a missing receipt | Every invariant holds after every step | | 5. Counting | One correction seen by both paths; a harmless restatement; a genuine later violation | One incident, for the violation only | | 6. Budgets under load | A queue backlog, three universal corrections in one session and a saturated always-loaded file at once; then ten protected tail lines of 60 tokens | No pinned rule leaves, every displaced line is named in the turn and the report, nothing is lost; no protected line is displaced, the actions they govern stop, and one question names the options of §7.4 | | 9. Correction detection | The shared classifier at each stage's operating point, on a hand-labelled sample, with and without the wrapper removed | Precision and recall reported per stage, with the misses the session cards catch | | 10. Erasure | Erase a correction and run the night; then erase the only positive fixture of an active check | Every place of §4.3 reports a status, and paraphrase probes find the erased words nowhere; the check shows "tests incomplete" at once and runs its approved degraded action | | 11. Procedures and writers | Promoted texts on the untouched stream; reverts of rung-2 edits per model | A promoted text wins on held-out cases; revert rates are reported per model | | 12. Catalogue and refusals | Cards for every finished session; a decision planted in one session; a refused child of each kind | The decision is found through its card next morning; each refused child leaves the tail as §6.1 says, and the owner is told |+}

### 12. Next steps

{+: The tests that check the machinery.+}

### 12. Next steps

{+**Test 3, why rules fail.** For every incident, record the diagnosis of §5.4, how many causes it found, and the exposure; the owner labels a sample blind. If "in view, clear and still ignored" is rare, most of the gain comes from moving and narrowing lines.+}

### 12. Next steps

{+**Test 7, pruning by binding against pruning by age,** over sixty days at the same budget: violations per eligible opportunity across all rules, kept and moved, under each policy, with the file's size. Pass: pruning by binding has no more violations at no larger a file. Each freed line (§7.2) is also checked on its own: the slip rate the replay predicted against the check's firing rate afterwards; pass when the observed rate stays within the replay's 95% interval.+}

### 12. Next steps

{+**Test 8, checks.** In shadow: false alarms among eligible opportunities and detections among planted violations, each with its denominator and 95% bound, the planted ones labelled synthetic. Then fires, true catches and owner overrides live. Then cut a model check's provider immediately before an irreversible action. Pass: the declared action runs, the receipt says degraded, the rule reports "enforced, degraded", and the report raises an alarm.+}

### 12. Next steps

{+**Test 13, the weekly headline:** the owner's correction rate, and repeats with no repair yet.+}

### References

{+Chhikara, P., Khant, D., Aryan, S., Singh, T., & Yadav, D. (2025). Mem0: Building Production-Ready AI Agents with Scalable Long-Term Memory. arXiv:2504.19413. <https://arxiv.org/abs/2504.19413>+}

### A.3 The fast path in pseudocode

reflect(event): # after the answer; at-least-once if ledger.processed(event.id): return for repair in required_repairs(event): # §3.2: one child each child = event.id + "." + repair.letter # J14's request ID ack = route(repair) # rule gap: match (§4.2), J14 gate; # fact: J14 supersede; else a record if ack.terminal: # accepted, hold, refused, or read back ledger.mark_terminal(child, ack) # pending is not terminal: child, event and tail line stay open if all(c.terminal for c in event.children): [-ledger.mark_processed(event.id)-] {+ledger.mark_processed(event.id) ```+}

### A.3 The fast path in pseudocode

{+Two more operations close the loop: the finding stage's acknowledgement, which lets a sentence leave the tail, and the model call, which is where every tail line is re-checked.+}

### A.3 The fast path in pseudocode

{+```text+} on_ack(ack): # J2 overlay receipt, per child (T10) child = ledger.child(ack.request_id) # the request ID is the child ID event = ledger.event(child.parent) child.retrievable = ack.retrievable if all(c.retrievable or c.held for c in event.children): tail.remove(event.cid) # a held universal rule keeps its line

### Appendix B. The transition specification

One correction crosses four stages, and every handoff can fail. In plain terms: the owner sends one message with two corrections, a contact's new mobile number and a new rule about supplier drafts. While they travel through the four stages, much of what can go wrong does. The writing stage's judge is down, the owner edits a clashing rule by hand, an index build runs on old data, he erases the number, and a sub-agent asks for it by name. This appendix prints the series' specification of that journey: 24 handoffs (T1 to T20 on the journey, T21 to T24 only in the named cases), what each must store, what ends it and the only thing the agent may say, then the faults injected, the invariants and the result. The other three papers cite transition IDs. A checker replays the journey against a model of the design, a few dictionaries and one handler per message; it models the design, not an implementation, and says nothing about code built from [-it.-] {+it. The model, the checker and its regression cases are available from the author.+}

### Appendix B. The transition specification

**Faults.** At every handoff the checker injects, one at a time, a **crash before the acknowledgement** (the receiver acts, its acknowledgement is lost, the sender resends), a **duplicate** delivery, and a **reorder** (the message goes behind everything else in flight). [-Beside-] {+It runs ten cases:+} the [-journey and-] {+journey,+} its cold-start [-branch it runs-] {+branch, and+} eight [-cases:-] {+more:+} C1 commit before notification (a crash right after publication; a lost delivery); C2 old copies of T2, T8 and T9 arriving after the erasure; C3 a pending receipt, then the judge's recovery; C4 two repairs from one correction; C5 a correction committed while an index builds; C6 permission revoked during a query; C7 erasure while content is loaded in the window; C8 quarantine after the content is loaded.

### Appendix B. The transition specification

**Result.** All 516 fault runs passed, 172 each of crash, duplicate and reorder; with the 11 structural checks [-(the specification and-] {+(one on the specification, one on each of the+} ten cases) the checker reports 527 PASS and 0 FAIL. Of the 172 reorders, 104 were no-ops, with nothing in flight to overtake, so they tested nothing; the other 68 test reordering. In the reference journey, the reorders injected at this stage's own T2, T6 and T10 all had nothing to overtake, so T6 rests on regression case d, not on reordering. The checker also removes one mechanism at a time, 18 seeded defects in all, and requires the run to fail: it caught 18 of 18. Without the re-check inside the model call (T6), R-43's line stays in force and I5 fails. Four further sequences are kept as regression cases, each passing on the model and failing when its mechanism is removed: an erase and a quarantine that land while a query runs (return-time epoch check), a retry while the judge is down (a new attempt, never the cached pending receipt), and a correction whose reply reaches the model with no separate turn-boundary event (the re-check inside the call).

### Appendix B. The transition specification

_J-series paper J5 | Version [-7.5-] {+7.6+} | 2026-10-21_
