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

From v7.4 (21 Oct) to v7.5 (21 Oct): 12,021 words to 14,740 words, 3,650 words in new or rewritten paragraphs and 931 taken out, 91 paragraphs changed.

## Change note of v7.5

**Related work rewritten around a comparison table**

Related work grows from about 600 to 1,450 words. A new table compares what a repeated correction becomes under each approach: vector memory, summaries, a bigger context window, lesson playbooks, built-in chatbot memory, Letta, hookify and this design. The paper states its own contribution: a ledger of diagnoses and recurrences across levels of enforcement. The abstract and the description of how the owner's words are labelled are rewritten in plainer words. The folder's notes say this version added seven tables for readability.

## Changed paragraphs

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

### Abstract

Tell a good new colleague something once and it sticks. If it slips, they ask why: the note was in the wrong drawer, an old instruction said the opposite, or the lesson has to become a [-habit. Sleep helps with that: a movement practised-] {+habit, which+} in [-the evening-] {+people+} is [-better the next morning.-] {+partly sleep's work.+}

### Abstract

AI assistants are corrected daily, and their owners keep repeating themselves. The model cannot change, so lessons are written down as text, [-and text binds weakly, weighed-] {+which the model weighs as advice+} against everything else [-in view.-] {+it reads.+} When a written lesson fails, assistants write another note.

### Abstract

We propose that a [-repeated-] correction {+the owner has to repeat+} earns a diagnosed, tested repair instead of another note. [-A ledger-] {+The assistant+} counts each broken [-rule; a repeat triggers a diagnosis, and only-] {+rule and, before strengthening one, asks why it failed: it never reached the model, another line contradicted it, or it was too vague. Only+} a rule [-known to have been-] {+that was+} in [-view,-] {+front of the model,+} clear and [-uncontradicted,-] {+unopposed,+} and still broken moves up, [-ending in-] {+from a saved note to a line read on every turn to+} a tested check that runs before the action.

### Abstract

[-A correction is stored before the agent replies, and the agent never claims more than it did. Only the owner may loosen a rule or change what every turn reads. The series' handoffs are specified as 24 transitions and replayed against a model of the design, with crashes, duplicates and reordering injected. This is a design, with the tests that would decide it.-]

### Abstract

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

### 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 [-improves-] {+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).-] {+2002), though how much of that gain is due to sleep is debated (Pan & Rickard, 2015).+} That is the whole biological claim here. The cerebellum 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.

### 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 [-last form gives this stage its series name, CEREBELLUM:-] {+analogy is+} an aid to reasoning, not a model of the brain.

### 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.-] {+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 [-active-] {+works for the rest of the session as a provisional line+} in [-its session; approved,-] {+the tail (dashed); approved on day 1,+} it loads on every turn. The second slip is traced to an [-older, contradicting line,-] {+older line written for the weekly report,+} which {+the model applied to a reply; that line+} is [-scoped.-] {+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-v72.png){width=100%}-] {+illustrative.](images/fig1-journey-v75.png){width=86%}+}

### 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-] {+truth. The+} writing paper (J14) decides what enters the long-term memory store and in what [-shape; the-] {+shape. The+} finding paper (J2) gets the right thing back when it is [-needed; this-] {+needed. This+} paper, the learning stage (J5), turns experience into [-behaviour.-] {+behaviour. The words this paper borrows from the other three are explained in Table 2, at the end of this section.+}

### 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, [-all-] {+each with counters+} of [-them-] {+how often it was marked helpful or harmful. 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 keep a lesson's track record. Neither asks why a lesson failed, and every lesson stays+} text; [-a row of-] {+in+} our [-ledger is one such item, but-] {+design+} a lesson that keeps failing may leave text (§5).

### 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-] {+user, and a memory doctor audits where memory is placed, what is duplicated and how many tokens it adds to the system prompt+} (Letta, [-2026a),-] {+2026a). Both run+} in git [-worktrees-] {+worktrees,+} so the main agent is not blocked (Letta, 2026b). Anthropic's Dreams, a research preview for its managed agents, consolidate a memory store and past transcripts into a new output store that a person reviews and adopts, leaving the input store untouched (Anthropic, 2026d). It 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).

### 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;-] {+paths,+} and a prompt audit reports outdated or conflicting instructions with proposed edits, 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).+} The Claude memory tool gives a model a client-side directory that persists across conversations (Anthropic, 2025), and LangMem's prompt optimiser returns an updated system prompt from conversations with feedback (LangChain, 2025). Between them they supply our rungs 0 to 2, scoped loading and an owner-approved [-audit; their-] {+audit. Their+} documentation describes no count of a written lesson's [-failures-] {+failures,+} and [-no-] {+the+} diagnosis [-of where it should live next.-] {+is left to the user.+}

### 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, run-] {+plugin is the closest shipping relative of our top rung (Anthropic, 2026c). Run+} with no arguments, {+it+} reads the [-recent conversation-] {+last 20 to 30 messages+} for behaviour the user corrected {+or had to repeat,+} and [-writes-] {+counts the occurrences. It then asks which behaviours should become+} rules [-that-] {+and whether each should+} warn or [-block-] {+block, and the rules act+} on the next shell command, file edit, stop or [-prompt (Anthropic, 2026c).-] {+prompt.+} It [-is-] {+keeps no count across sessions, does not ask why an earlier rule failed, and does not test a rule before it blocks. Guardrail frameworks such as NeMo Guardrails (Rebedea et al., 2023) and+} the [-closest-] {+OpenAI Agents SDK's guardrails (OpenAI, 2026) are the+} shipping [-relative of our top rung; its documentation describes no recurrence count-] {+machinery for checks on a model's input, output+} and [-no approval step.-] {+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 into program functions that fire on failure-prone states, and Self-Harness (Zhang et al., 2026) mines an agent's traces for recurring failures and edits its harness after regression [-tests; we-] {+tests. We+} take from them the executable check and the test before [-acceptance. Our contribution is the piece between them: **a diagnosis-and-recurrence ledger across enforcement levels**, which counts each broken rule per incident wherever it lives and diagnoses why its current form failed. We did not find a design that does this; the parts exist.-] {+acceptance.+}

### 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

{+| Approach | What it does well | What a repeated correction becomes | |----------------|--------------------------------|--------------------------------------| | Retrieval over past chats, or a vector memory of extracted facts (Mem0 style) | 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 | | 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 | | 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 (Jaroslawicz et al., 2025); gone in the next session | | Lesson playbooks (ACE, ExpeL) | Lessons distilled from many tasks; counts of helpful and harmful uses weed out weak ones | A lesson whose score falls; it stays text, and nothing asks why it failed | | ChatGPT or Claude built-in memory | Effortless capture; the owner can see and delete what was saved; Claude Code adds path-scoped rules and a prompt 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; never a check | | Letta memory with dreaming | Background consolidation in git worktrees; a memory doctor audits placement, duplication and token use | An edit to memory files, made without asking the owner; no failure count; no check | | hookify | A correction becomes a 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 no account of why the earlier text failed | | This design | Repairs the cause; a check must pass a shadow run; only the owner loosens | A ledger row that climbs one rung per diagnosed incident; costs the owner approvals; not built yet |+}

### 2. Related work

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

### 2. Related work

{+| Word | What it means here | |-------------|------------------------------------------------------------| | Session record | The full, never-edited transcript of every session, kept by the keeping stage; everything else points into it by address (J1 §4) | | Window controller | The part that builds what the model sees on each call, and records whether it knows that input or only sent it to a provider that may compact it (J1 §6) | | Cached prefix | The start of the model's input that stays the same from call to call, billed at a cached rate; changing a line in it makes the provider read everything after it again (J2 §7.4) | | Gate | The writing stage's single way into the long-term store; every write passes it and gets a receipt (J14 §5.1) | | Judge | The small model at the gate that compares a new write with what is stored, for duplicates and clashes (J14 §6.3) | | Receipt | The gate's record of what became of a write: accepted, held, refused or pending (J14 §5.4) | | Published snapshot | The version of the store, or of the always-loaded file, that readers see now; a change becomes visible only when a new one is published (J14 §7.2) | | Overlay | The finding stage's list of writes accepted since its last index build, so a new item can be found at once (J2 §8.2) | | Index file | The always-loaded head of the store, with pointers to what can be found (J2 §4.3) | | Tombstone | The mark left where erased words were: the address stays, the words do not (J1 §4.4) | | Erasure epoch | A counter raised by every erasure; a reader that has not caught up waits and shows nothing from before it (J14 §7.7) | | Suppression check | The gate's test that keeps erased content from being written again (J14 §7.7) |+}

### 2. Related work

{+: Words from the other three papers.+}

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

[-Every reader here sees only the owner's own words. The keeping stage cuts each owner message into immutable, addressable spans (a clause or a sentence) and stores two tags on each, with the model version: authority, which it owns, and intent, which this stage's classifier owns (J1 §4.1, §4.2). Text from a web page, a document or another agent is never a correction, nor is a span he quotes; a span of uncertain attribution counts as quoted until he confirms it, so pasted or fetched text cannot plant a rule. Signals 1 and 2 come from the intent classifier (Appendix A.1), shared by three stages and tuned per reader, because a missed instruction and a false correction cost different things. This stage reads the stored tag and never classifies again on enqueue or replay. A failed classification leaves the span untagged for the nightly pass; untagged never means "no correction". A temporary session yields nothing here (J1 §4.7, sessions that are never kept).-]

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

{+Only the owner's own words can teach a rule. The keeping stage splits his messages into fixed, addressable spans (a clause or a sentence) and labels each twice, with the model version: who said it (the keeping stage's label) and what kind of sentence it is (this stage's classifier; J1 §4.1, §4.2). Text from a web page, a document or another agent never counts, nor does a span he quotes; a span whose author is unclear counts as quoted until he confirms it, so pasted or fetched text cannot plant a rule.+}

### 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. This stage reads the stored label and never re-runs the classifier, even on replay. A span whose labelling failed is stored untagged and waits for the night pass; untagged never means "no correction". 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 operation 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). The parent closes only when every child [-is terminal-] {+has a final answer+} (§6.1), so one repair's receipt cannot stand in for the [-other.-] {+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.-] {+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

| Field | What it holds | |---------|---------------------------------------------------| | ID and revision | Stable rule ID; a revision per change, for safe concurrent writes (§4.3) | | Statement, purpose | The rule in one sentence, and why the owner wants it, which says when it is obsolete | | Applies when / not when | Trigger and exception: they define an eligible opportunity and keep the rule narrow | | Evidence | Session-record addresses of the slips and corrections: positive tests for a check, erasable at the source | | Home | Current rung, and the file or check that carries it | | Incidents | Each action that broke the rule after it existed, with its rung, diagnosis and exposure (§5.4) | | Receipts | The writing stage's receipt for each revision; each time its check fired, and what happened | | Cost | Tokens per turn on rung 2; false alarms on rung 3 (the attention budget, §7.1) | | Status | [-Proposed, held, accepted, provisional, active, enforced (or degraded), dormant, retired,-] {+Where the rule stands in force and in storage (Table 5),+} with {+its+} approvals |

### 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), 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. *Same* adds an incident or a [-mention;-] {+mention, and+} *adds detail* sharpens the statement or [-exception; *the-] {+exception. *The+} owner changed the rule* writes a new revision, {+with+} the old one kept, struck and [-dated; *conflicts*-] {+dated. *Conflicts*+} becomes a question in the morning report [-(§7.5);-] {+(§7.5), and+} *new* opens a row.

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

[-Rows are never removed for age; they are erased on request. The writing stage owns the deletion manifest (J14 §7.7, erase and quarantine) and the schema of dependency links (J14 §8.1, three fields and the links); this stage writes links for its own artifacts (each rule revision to its incidents and evidence, each fixture to its entries) and exposes one deletion interface. Given a record address or a subject, it follows the links, never a search, and returns a status per place: evidence (kept as addresses, so the record's tombstone hides the words; J1 §4.4); check fixtures copied from the record (removed); rule statements containing the erased words (rewritten or retired, which counts as the owner's own loosening, since he asked; a rule left with no evidence goes back to him); receipts; pending report items; the labelled history of §8; and past revisions of all of these. A place it cannot reach is named, never reported done. From the moment the erasure epoch rises, this stage's tail serves only after it has applied the epoch, and until then it waits and shows nothing from the older state (transitions T18 and, for quarantine, T24).-]

### 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 where each item 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) and offers one deletion interface. Given a record address or a subject, it follows the links, never a search, and reports on each place:+}

### 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); a rule left with no evidence goes back to him; - receipts, pending report items, the labelled history of §8 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

The night pass reads the record only through the [-tombstone-aware-] 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. 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, and this paper is about when a rule earns the next one.+}

### 5.1 The four rungs

[-Two status words of the series belong to this stage. A rule is **active** when it is admitted where it governs: rung 1 while its task runs, rung 2 on every turn, a provisional line in its session. Whether the model received it is recorded apart, as the exposure level of §5.4. A rule is **enforced** when a check in the path carries it, and **enforced, degraded** while that check runs its fallback. A rung-0 note is retrievable, not active. The statuses are dimensions, not a chain: a provisional line is active before any stage has accepted it.-]

### 5.1 The four rungs

{+Each stage reports how far a correction has got, in a fixed set of words, and the agent may use only the word its state allows (Table 5). Two columns of words apply at once: where the rule stands in force, which this stage decides, and where its write stands in storage, which the other stages decide. They are independent. A provisional line is active before any stage has accepted it, and a rung-0 note is retrievable but never active. Whether the model actually received a rule is recorded apart, as the exposure of §5.4.+}

### 5.1 The four rungs

{+| Word | What it means | Set by | |------------|----------------------------------------------------|-------------| | **In force** | | | | provisional | The owner's universal instruction, in force in this session's tail while it waits for his approval | This stage | | active | Admitted where it governs: rung 1 while its task runs, rung 2 on every turn, or a provisional line in its session | This stage | | enforced | A check in the path of action carries it | This stage | | enforced, degraded | The check is down or can no longer be tested, and runs its approved fallback (§5.3) | This stage | | retired | Withdrawn, with the owner's approval | This stage | | **In storage** | | | | captured | The owner's words are durably in the session record, before the reply | Keeping (J1) | | pending | Waiting for the writing stage's judge; survives a crash, but not finished | Writing (J14) | | held | Parked for the owner's decision and visible to him; acknowledged, not accepted | Writing (J14) | | accepted | Written by the gate, with a receipt | Writing (J14) | | refused | Not kept; the reason goes to the morning report | Writing (J14) | | retrievable | The next relevant request can find it | Finding (J2) |+}

### 5.1 The four rungs

{+: What the agent may say about a correction.+}

### 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-v72.png){width=100%}-] {+approval.](images/fig2-ladder-v75.png){width=100%}+}

### 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, 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 [-turns-] {+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 4 to 14 cents. 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

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

**Every check declares how it fails.** With its tests, a check carries a timeout and a **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-] {+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 [-answer-] {+first cause it finds+} decides the [-repair:-] {+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

| [-Why-] {+Cause, tested in order | How+} the [-rule failed-] {+auditor tests it+} | Repair | [-|---|---|-] {+|----------------|------------------------------------|----------------------|+} | {+1.+} Exposure [-unknown: sent, unconfirmed by-] {+unknown | Code:+} the [-window controller,-] {+receipt says "sent, unconfirmed",+} or [-compacted midway by-] a provider's API {+compacted the window midway+} and {+it was+} recorded as unprotected (J1 §6.4, §7.4) | Repair or instrument delivery; never climb | | [-It was not-] {+2. Not+} loaded where the slip happened {+| Code: the rule's home was not in the known input of that call+} | Move it to a home that loads there | | {+3.+} Another line contradicted it {+| The contradiction check of §7.3 against the always-loaded snapshot in force at the slip, with the slip itself as the case: does another line, read as the model read it, call for what the agent did?+} | Narrow or remove that line, with the owner's approval (§7.4) | | [-It was too-] {+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 | | [-It was buried-] {+5. Buried+} in a long file {+| Code: the rule sat past the budget line, or the file was over budget+} | Shorten the file; order it by harm (§7.1) | | [-Known to be in-] {+6. In+} view, [-clear and uncontradicted,-] {+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

[-Each incident records-] {+Step 1 reads+} the controller's knowledge level at the slip, which the keeping stage writes on every [-receipt:-] {+receipt. It is+} **known input** when the runtime built the model's input, {+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). A slip in the [-sent, unconfirmed-] {+second+} case is never evidence for climbing: the repair is to confirm delivery. [-A slip with known-] {+In a harness that does not build the+} input [-goes down-] {+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 [-table, and only its last row climbs.-] {+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). What this design adds is running them on every incident, 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 contradicted it | "Look for conflicting instructions across CLAUDE.md files … Claude may pick one arbitrarily" | A contradiction check on every promotion; the other line is narrowed with approval | | 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

{+: The diagnosis beside Claude Code's own advice (Anthropic, 2026a).+}

### 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-v72.png){width=100%}-] {+proposals.](images/fig3-speeds-v75.png){width=100%}+}

### 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 [-tagged-] {+labelled+} as a correction writes its own event, keyed by its correction ID, to a durable [-queue, and-] {+queue. It also+} enters the session's [-per-turn-] tail [-verbatim, under-] {+word for word. The **tail** is a short block+} the [-tail's-] {+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). A crash after that point loses [-nothing: on-] {+nothing. On+} restart the fast path re-reads the record from its last queued address, and every consumer [-is idempotent on the ID,-] {+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", never "I'll remember that".

### 6.1 The fast path

**A reflection turn runs after the answer,** so it neither delays the answer nor competes with it. It takes events in order, reads the owner's words around each, sorts the correction by cause [-(§3.2),-] {+(§3.2) and+} matches it to the ledger [-(§4.2), and-] {+(§4.2). Then it+} sends the result where it belongs: a supersede {+or a rule proposal+} to the writing [-stage,-] {+stage's gate, and+} a task, a repair or a routing record to its own [-file, a rule proposal to the writing stage's gate.-] {+file.+}

### 6.1 The fast path

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

### 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 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

[-**An event closes when every child operation is terminal.** A child is terminal when its destination durably acknowledges the resulting state: a write receipt (*accepted*), a visible hold (acknowledged, not accepted), a refusal, or a task or routing record read back. A refusal is terminal, with its reason in the morning report (§7.5), and what it does to-] {+*May+} the owner's sentence {+leave the tail?* Only when, 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 held for approval keeps its line until he approves or the session ends. A line that contradicts a rule+} in [-the tail depends on why. If-] {+force is withdrawn (§7.3). And a refusal decides by its reason: if+} only [-persistence-] {+saving+} was refused [-(the store will not keep it, as for a-] {+(a+} prohibited [-class),-] {+class, say),+} the instruction still holds [-for-] this [-session:-] {+session and+} the line stays, marked "not [-saved". If-] {+saved"; if+} the instruction itself is invalid (it clashes with a rule in force, or [-the owner-] {+he+} withdrew it), the line leaves. Either way the [-disposition-] {+outcome+} is recorded with the [-refusal,-] {+refusal+} and [-the owner-] {+he+} is told [-in the turn. A pending receipt from a judge outage is durable (it survives a crash) but not terminal (J14 §5.3, when something fails): the child and the event stay open and the sentence stays in the tail, where it overrides the stored fact it corrects, even one the finding stage still serves. Tail removal is tracked apart from closing, and per child: each child records when the finding stage's overlay acknowledges its item as *retrievable* (J2 §8.2, becoming retrievable), and the correction's line may leave only when every child is retrievable or held (T10). A universal rule held for approval keeps its line until approval or the session's end, and a rule in force that contradicts a line withdraws it (§7.3).-] {+at once.+}

### 6.1 The fast path

{+![A correction's two clocks, on the two-repair correction of §3.2: a wrong fact and a missing rule. Its work is finished when every child has a final answer; its sentence leaves the tail only when every child can be found or is held. Pending, while the judge is down, is neither. Times are illustrative.](images/fig4-clocks-v75.png){width=100%}+}

### 6.2 The slow path: the nightly auditor

The auditor runs in a fixed order, because each step needs the one before. It **gathers** the ledger, the day's session records (temporary ones skipped, read from the owner's own words for corrections the fast path missed, untagged entries and open events), the receipts of every check and the outcomes of scheduled jobs. It **counts**: confirms unsure matches, merges duplicate rows, inserts incidents idempotently. It **decides**: diagnoses each new incident (§5.4), picks the repair, drafts checks with their tests, proposes demotions where receipts show false alarms. It **prunes and reports**: proposes removing from rung 2 only what a higher rung now carries (§7.2), and assembles the morning report (§7.5). And it **catalogues**: {+it writes+} one card per session that finished that day, skipping automated [-runs (scheduled jobs, background reflections, sub-agents). A card holds-] {+runs. The finding stage uses+} the [-session's topic, decisions, artifacts, files touched and reader scope, and for each claim it carries-] {+cards to send+} a [-maturity stage with-] {+question to+} the [-evidence-] {+session+} that [-earned it: *raw* (said once), *field note* (acted on), *insight* (held across sessions) or *canon* (accepted by-] {+did+} the [-writing stage's gate). Cards feed the finding stage's route to past sessions-] {+work+} (J2 §6.9, ask the session that did the [-work); a-] {+work). A+} card whose claims were later superseded is marked, so a woken session can be told what changed (J1 §8.3). The writing stage's nightly pass (J14 §4.2, what the nightly pass picks out) and the finding stage's index builds (J2 §8, built ahead, kept current) 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

The always-loaded file has a fixed budget in lines and tokens, and its order is part of the design: rules whose slip does the most harm come first, since earlier lines are followed more (Jaroslawicz et al., 2025). When a new rule needs room, the unpinned rule [-with the lowest expected-] {+that would+} cost [-of moving down, $p\,C_{\text{slip}}$ at its next rung-] {+least to move+} down [-(§5.2),-] gives way. {+Nobody knows a rule's slip probability in advance (§5.2), so the ledger ranks by what it has: harm class first, then eligible opportunities per week, so a low-harm rule that rarely applies leaves first.+} A rule that has ever had an incident is pinned on rung 2 until a check carries it (§7.2).

### 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**, and the design does not resolve it [-alone: admission stops;-] {+alone. Admission stops, and+} the new rule stays a provisional line in the [-tail and is-] {+tail,+} shown as held, budget [-full; and the-] {+full. The+} owner chooses: load one pinned rule only where it applies (rung [-1);-] {+1),+} grant [-an explicit-] {+a+} budget exception of so many [-lines, recorded-] {+lines+} with its [-cost;-] {+cost recorded,+} approve a check for one pinned rule, which frees its [-line;-] {+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: 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), and while-] {+keys). While+} its area is [-active-] {+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

The rules every turn reads must not contradict each other. Every promotion to rung 2 runs the writing stage's contradiction check against the whole always-loaded set, and a clash is held for the owner (J14 §6.2, relations and outcomes); neither line wins by being newer. When the check cannot run because its judge is down, changes to always-loaded lines stay held (J14 §5.3, when something [-fails).-] {+fails). The check compares texts as they are written. A clash that shows only in how the model applies a line, as on day 10 of §10, is found later, by the diagnosis of the slip (§5.4, step 3).+}

### 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-] {+it: a+} reply, a tool continuation, the reflection turn, a scheduled [-job): the-] {+job. The+} operation reads the newest published always-loaded [-snapshot,-] {+snapshot and+} compares each tail line with [-it, and withdraws a-] {+it. A+} contradicting line {+is withdrawn,+} with a one-line notice to the [-owner-] {+owner,+} before the call goes out (T6). No call runs with a line that contradicts a rule published before its check (invariant I5, Appendix B); a rule published after the check is caught by the next call's.

### 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 [-4).-] {+8).+} The loop may tighten on its own within these gates. Only the owner loosens.

### 7.4 Approval, and who may loosen

The provisional line lets a universal rule taught in the morning work that afternoon. It rides in the [-per-turn-] tail, next to the owner's message, until he approves it; writing it into the always-loaded file would change a line he has not approved and move the cached prefix (J2 §7.4).

### 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, 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?" His yes is 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

[-**Protected lines can saturate the tail.** A line about irreversible harm is never displaced, so protected lines alone can outgrow both limits: a ninth such line, or one sentence over 400 tokens. Then nothing is displaced or silently dropped. The action the unadmitted line governs stops (for a universal line, every irreversible action), and the owner gets a budget or scope decision: a larger tail for this session, the rule scoped to its task on rung 1, or a check that frees the line.-]

### 7.4 Approval, and who may loosen

{+A line about irreversible harm is never displaced. If such lines alone outgrow the tail, the actions they govern stop until the owner chooses a larger tail for the session, a task scope for one of them, or a check that frees its line (§12, test 6).+}

### 7.4 Approval, and who may loosen

: Moves that need a decision, and who makes them. Tightening at rungs 0 and 1 is automatic once the gate [-accepts;-] {+accepts, and each such change is listed in the next morning report with an undo;+} every loosening waits for the owner. Degrading (§5.3), retiring (§9.3) and erasing (§4.3) are described where they arise.

### 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.+}

### 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 [-that-] the agent solves well is kept as a skill file, as Voyager keeps working procedures (Wang et al., 2023), found [-the way the finding stage finds-] {+like+} any owned [-asset,-] {+asset+} and retired when its outcomes decay. [-Two guards keep this honest: a lane runs only if its input saw the work (the owner's turns in its input over those in the session record must be close to one; we propose 0.9), and a-] {+A+} strategy that fails three times in a day (proposed) switches to a hand-written fallback instead of receiving another [-patch.-] {+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).+}

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

[-The instructions of scheduled jobs and of small classifiers learn from outcomes too, scored against the owner's labels with environmental failures removed (§3.2). For the worst, a model drafts rewrites, and one is promoted only if it wins on the untouched evaluation stream and loses nothing on the regression suite (§9.2).-]

### 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 (§12, test 2),-] {+treated,+} times the eligible opportunities, times the minutes a re-teach costs him. {+During the trial of §12 (test 2) the untreated rules are the randomised arms. After it nothing is randomised, and 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: 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.+} **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 a new kind of correction appears, his correction rate rises, or he asks.

### 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;-] {+dormant and measures nothing;+} a new kind of correction wakes [-it.](images/fig4-retire-v71.png){width=82%}-] {+it.](images/fig5-retire-v75.png){width=82%}+}

### 10. One correction, start to finish

Back to the Monday of §1, with the [-status-] {+word+} the agent may [-name-] {+use+} at each [-step.-] {+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

The second [-slip-] {+slip, on day 10,+} is an incident with exposure *known [-input*;-] {+input*. The diagnosis stops at step 3. An older line, L-7, "write+} the [-auditor finds-] {+weekly supplier report in English", had passed+} the [-older English-only line and scopes-] {+contradiction check when R-42 was promoted, since as written it is about a report, not replies; the slip shows the model applying+} it to [-its job, with-] {+a reply. With+} his [-approval,-] {+approval L-7 moves into the report job's own file,+} and [-the rule-] {+R-42+} does not climb. At the third slip, {+on day 40, R-42 was+} known to be in view, clear and unopposed, [-it-] {+and the auditor+} drafts a [-check: a-] {+check. A+} small model compares the language of the reply with that of the owner's 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. In {+a week of+} shadow it {+sees 60 replies to the owner and+} raises no false alarm [-in 60 replies-] (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 approves it: *enforced*. Once it has fired and rewritten twice, the auditor proposes freeing the rung-2 line; he approves, and a pointer stays in the index file (Figure [-1). If he ever has to say it again, the receipts show whether the check missed, never ran or ran degraded. Appendix B runs the same machinery through every failure the four stages can meet at once.-] {+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 the always-loaded line is freed. 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

{+: The opening story, today and under this design.+}

### 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 one removes a different cause, and the third ends the problem. 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 in view, clear and unopposed, and still broken earns a stronger form. The aim is the cyclist's balance: a lesson taught once that then runs on its own. Nothing here has [-run;-] {+been built; only a model of the handoffs has been checked (Appendix B), and+} §12 names the [-tests.-] {+tests that would decide the rest.+}

### 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).-] {+(§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 that the machinery works.+}

### 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: T2 (one event per span, each replayed once after a restart), T3 (one child per repair; the parent closes when every child is terminal), T4 (pending receipts-] {+transitions+} are [-durable, not terminal; the deadline alarm), T6 (a contradicted line is withdrawn before the next model call), T8 and T10 (processed on the write receipt; retrievable tracked per child), T11 (a hold is acknowledged, not accepted),-] {+T2, T3, T4, T6, T8, T10, T11,+} T18 and [-T24 (the tail waits for the epoch).-] {+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 [-alone: ten-] of 60 [-tokens, past both the eight-line and the 400-token limit.-] {+tokens each.+} Pass: none is displaced, the [-action each governs stops,-] {+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 [-reader's-] {+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 [-input coverage of §8, 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.

### References

{+OpenAI (2026). Guardrails. OpenAI Agents SDK documentation. <https://openai.github.io/openai-agents-python/guardrails/>+}

### References

{+Pan, S. C., & Rickard, T. C. (2015). Sleep and motor learning: Is there room for consolidation? *Psychological Bulletin*, 141(4), 812–834. <https://doi.org/10.1037/bul0000009>+}

### References

{+Rebedea, T., Dinu, R., Sreedhar, M., Parisien, C., & Cohen, J. (2023). NeMo Guardrails: A Toolkit for Controllable and Safe LLM Applications with Programmable Rails. EMNLP 2023, system demonstrations. arXiv:2310.10501. <https://arxiv.org/abs/2310.10501>+}

### References

{+Zhao, A., Huang, D., Xu, Q., Lin, M., Liu, Y.-J., & Huang, G. (2024). ExpeL: LLM Agents Are Experiential Learners. AAAI 2024. arXiv:2308.10144. <https://arxiv.org/abs/2308.10144>+}

### A.1 The owner-sentence classifier

| Part | Contract | |-----|----------------------| | Input | The owner-authority spans of one appended entry: immutable, addressable, carrying the authority tag J1 stored (J1 §4.1, §4.2), and the address of the agent turn it answers. Quoted spans and spans of uncertain attribution are never sent, so never classified | | Output | For each span given: a label (instruction, correction, praise, none), a confidence and the classifier version, written on the span; for a correction, the address of the action it complains about when one can be found | | [-Readers-] {+Stages that use it+} | Keeping: keeps instructions and corrections word for word. Learning: reads the stored intent tag and its classifier version at enqueue and at replay, and queues corrections (§6.1); it never classifies again. Writing: stamps facts told by the owner | | Calibration | One labelled sample; an operating point per [-reader.-] {+stage.+} Keeping favours recall (a lost instruction is lost); learning favours precision (a false correction opens a row) | | Failure | Timeout or error: the span is stored "untagged"; keeping treats it as an instruction; the night tags an untagged span and appends the late tag under its own version, never replacing one (J1 §4.1); nothing reads "untagged" as "no correction" | | Change | A new model or threshold is a new version, passed on the regression suite before it serves (§9.2); a stored tag keeps the version that wrote it |

### A.2 Worked records

incident a-5120 # ID = address of the reply that broke R-42 rule: R-42 rev 1 reported_by: c-5121/0 rung_at_time: 2 exposure: known input (the runtime built the window) diagnosis: contradicted by line L-7 [-(a scheduled-job rule)-] {+(the weekly report's line)+} repair: L-7 [-scoped-] {+moved+} to [-its job;-] {+the report job's file;+} approved day 11 ```

### A.2 Worked records

```text rule R-42 rev 3 statement: reply in the language of the owner's message purpose: he reads fastest in the language he chose applies_when: every reply to the owner not_when: drafts for someone else follow that person's language evidence: a-1872, a-5120, a-9031 incidents: a-5120 (contradiction), a-9031 (ignored: climb) mentions: 1 receipts: rev 1 held day 0 (W-2209), accepted day 1 (W-2210) {+revisions: rev 2 day 48, home moved to check K-9 rev 3 day 66, rung-2 line freed+} home: check K-9 since day 48; rung-2 line freed day 66 check K-9: timeout 2 s; degraded action: send and flag fired 2, rewrote 2, overridden 0, degraded 0 status: enforced ```

### A.3 The fast path in pseudocode

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 [-those handoffs: one adversarial journey as-] {+that journey:+} 24 [-transitions-] {+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 at each,-] {+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.

### Appendix B. The transition specification

{+**Identifiers.** T1 to T24 are the handoffs, C1 to C8 the extra cases and I1 to I5 the invariants. s1012#204 is the message, /0 and /1 its two corrections, /0.a and /1.a their repairs. F- is a fact and R- a rule, with @n its revision. S- is a published snapshot, W- a write receipt, O- an overlay receipt, D- a deletion receipt, B- an index build and E- the erasure epoch; sa3 is the sub-agent.+}

### Appendix B. The transition specification

**The journey.** One owner message, s1012#204, holds two corrections: /0, "Ada's mobile is now +44 7700 900 123, not the old one" (old fact F-0412@1), and /1, "from now on, copy me on every supplier draft". Each opens one child operation per repair (/0.a, /1.a); the child ID is J14's request ID. The write judge is down. While the proposals wait, the owner edits always-loaded rule R-15 by hand. The judge returns. Later he erases /0 while an older index build, B-55, runs, and a narrower subagent, sa3, asks by name for both items. [-S-n are snapshots, the-] {+The+} erasure epoch starts at E7, [-W-n are write receipts, O-1-] {+and B-54+} is [-J2's overlay receipt, D-1 a deletion receipt, B-54-] the live index. R-43, the rule from /1, is active in the tail only from T2 to T6 and is never retrievable as a rule in force.

### 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 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.4-] {+7.5+} | 2026-10-21_
