v5.0 → v6.0
What changed from v5.0 to v6.0
From v5.0 (1 Apr) to v6.0 (2 Jun): 6,398 words to 9,441 words, 3,808 words in new or rewritten paragraphs and 765 taken out, 203 paragraphs changed.
Brain-grounded opening and a new section on proceduresThe paper grows by about 3,000 words. It now opens with how the sleeping brain replays the day, and it summarises the storage, retrieval and identity layers it tunes. The main addition is Section 6: the nightly loop now also improves procedures, not just rules.
- New Section 6: recipes scored by how often they succeed (old versions never deleted), a switch of strategy after repeated failures, and a library of reusable skills in the style of Voyager.
- A single gate reconciles all three kinds of proposed change each night.
- A taxonomy of prompt changes and honest negative results, including a failed concept index from 1 April.
- A section placing the work among other memory systems, and an appendix of default settings.
v5.0 · 1 April 2026v6.0 · 2 June 2026
··· 1 unchanged paragraph folded ···
v5.0 · Sleep Consolidation: How Structured Nightly Prompting Produces Emergent Behavioral Improvement in Stateless AI Agents**Authors:** Oscar Serra, JarvisOne AI Research **Date:** March 2026 (v5.0) **Keywords:** emergent behavior, prompt engineering, cron-driven learning, self-improving agents, fractal metacognition, autonomous orchestration, memory consolidation, operational lessons
v6.0 · Sleep Consolidation: How Structured Nightly Prompting Produces Emergent Behavioral Improvement in Stateless AI Agents**Authors:** Oscar Serra, JarvisOne AI Research **Date:** June 2026 (v6.0) **Keywords:** emergent behavior, prompt engineering, cron-driven learning, self-improving agents, fractal metacognition, autonomous orchestration, memory consolidation, recipe evolution, skill libraries, operational lessons
··· 2 unchanged paragraphs folded ···
v5.0 · AbstractLarge language model agents are stateless by nature -- every session begins at zero. Existing approaches to persistence usually rely on fine-tuning, retrieval-augmented generation, or larger context windows. We present a different mechanism observed over 30 days of production operation: **structured nightly prompt cycles** that produce compounding behavioral improvement without weight updates, fine-tuning, or architectural changes. A personal AI assistant (Jarvis/OpenClaw) running 13 autonomous cron jobs exhibited a decline in tracked incidents from 14 (weeks 1--2) to 3 (weeks 3--4) across six error categories -- a 79% reduction overall, with five of the original categories reaching zero recurrence while a new, higher-order error class emerged. The model did not change. The files it read did.
v6.0 · AbstractLarge language model agents are stateless by nature -- every session begins at zero. Existing approaches to persistence usually rely on fine-tuning, retrieval-augmented generation, or larger context windows. We present a different mechanism observed over 30 days of production operation: **structured nightly prompt cycles** that produce compounding behavioral improvement without weight updates, fine-tuning, or architectural changes. A personal AI assistant running 12--13 autonomous cron jobs exhibited a decline in tracked incidents from 14 (weeks 1--2) to 3 (weeks 3--4) across six error categories -- a 79% reduction overall, with five of the original categories reaching zero recurrence while a new, higher-order error class emerged. The model did not change. The files it read did.
not in v5.0
v6.0 · AbstractThis is what sleep gives the human brain. During sleep, the hippocampus replays the day's experiences and broadcasts them to the neocortex, which integrates them into durable knowledge -- the reason a student who sleeps after studying outperforms one who crams and stays awake. The cerebellum, in parallel, refines motor skills through repetitive offline practice, which is why a piano piece learned at night plays more fluently the next morning. Sleep Consolidation is our attempt to give an AI agent the same offline period: a dedicated window where the day's experiences are reviewed, errors are identified, and the rules governing tomorrow's behavior are quietly refined.
··· 1 unchanged paragraph folded ···
v5.0 · AbstractWe formalize this as **Sleep Consolidation** -- a system in which explicit operating prompts are iteratively refined through experience until they produce increasingly automatic, high-quality behavior, analogous to how biological sleep consolidation transforms deliberate practice into smooth execution. We identify three core mechanisms: (1) **failure-driven prompt mutation**, where operational errors trigger targeted prompt refinements (14 mutations documented, all traced to specific incidents); (2) **fractal depth calibration**, where the system learns to allocate metacognitive effort in proportion to task significance; and (3) **cross-cron knowledge transfer**, where lessons learned in one autonomous task propagate to all others through shared memory files (5 documented cross-domain transfer events).
v6.0 · AbstractWe formalize this as **Sleep Consolidation** -- a system in which explicit operating prompts are iteratively refined through experience until they produce increasingly automatic, high-quality behavior. We identify three core mechanisms: (1) **failure-driven prompt mutation**, where operational errors trigger targeted prompt refinements (14 mutations documented, all traced to specific incidents); (2) **fractal depth calibration**, where the system learns to allocate metacognitive effort in proportion to task significance; and (3) **cross-cron knowledge transfer**, where lessons learned in one autonomous task propagate to all others through shared memory files (5 documented cross-domain transfer events). We then show how the same nightly loop has been extended from declarative memory (rules and facts) to **procedural memory** -- evolving the agent's own recipes, switching failing strategies, and distilling reusable skills.
··· 2 unchanged paragraphs folded ···
v5.0 · Contributions1. **The Sleep Consolidation framework**: a formal architecture for scheduled, autonomous prompt self-improvement through failure-driven mutation, abstraction-level encoding, and cross-task propagation. 2. **Production evidence over 30 days**: 14 documented prompt mutations, 5 error class extinctions, 5 cross-cron transfer events, and token-cost analysis from a real personal assistant deployment. 3. **The fractal depth calibration mechanism**: a prompt-encoded heuristic for allocating metacognitive effort that is itself subject to refinement -- a self-similar cognitive policy. 4. **Seven design principles** for building self-improving prompt ecosystems, derived from operational failures. 5. **Algorithm 1**: a reproducible nightly reflection loop with explicit inputs, outputs, and decision gates.
v6.0 · Contributions1. **The Sleep Consolidation framework**: a formal architecture for scheduled, autonomous prompt self-improvement through failure-driven mutation, abstraction-level encoding, and cross-task propagation. 2. **Production evidence over 30 days**: 14 documented prompt mutations, 5 error class extinctions, 5 cross-cron transfer events, and token-cost analysis from a real personal assistant deployment. 3. **The fractal depth calibration mechanism**: a prompt-encoded heuristic for allocating metacognitive effort that is itself subject to refinement -- a self-similar cognitive policy. 4. **Procedural-memory extensions**: a recipe-evolution loop with empirical fitness and a never-delete archive, a failure-count strategy-switch trigger, and a Voyager-style skill library -- all driven by the same nightly consolidation step (Section 6). 5. **Seven design principles** for building self-improving prompt ecosystems, derived from operational failures, plus a mutation taxonomy and honest negative results. 6. **Algorithm 1**: a reproducible nightly reflection loop with explicit inputs, outputs, and decision gates.
··· 2 unchanged paragraphs folded ···
v5.0 · 1. Introduction -- The Paradox of the Amnesiac ExpertEvery morning at 04:00, an AI agent wakes up knowing nothing about yesterday. By 04:15, it has read its memory files, reviewed the previous day's work, identified its own failures, rewritten its own operating rules, and gone back to sleep -- slightly better than it was the day before. By 07:00, a different instance of the same model reads those updated files and behaves as if it has always known the lessons learned hours earlier.
v6.0 · 1. Introduction -- The Paradox of the Amnesiac ExpertEvery night, an AI agent winds down knowing it will wake up tomorrow remembering nothing. It reads its memory files, reviews the day's work, identifies its own failures, rewrites its own operating rules, and goes quiet -- slightly better than it was the day before. The next morning, a fresh instance of the same model reads those updated files and behaves as if it has always known the lessons learned hours earlier.
v5.0 · 1. Introduction -- The Paradox of the Amnesiac ExpertThis is the paradox. The model's weights have not changed. Its architecture is identical. Its context window is the same size. Yet its behavior improves over weeks. The improvement does not live in the model. It lives in the _ecosystem of files the model reads and writes_.
v6.0 · 1. Introduction -- The Paradox of the Amnesiac ExpertThis is the paradox. The model's weights have not changed. Its architecture is identical. Its context window is the same size. Yet its behavior improves over weeks. The improvement does not live in the model. It lives in the *ecosystem of files the model reads and writes*.
v5.0 · 1. Introduction -- The Paradox of the Amnesiac ExpertWe call this **Sleep Consolidation**, by analogy to biological sleep consolidation -- the process that turns deliberate, effortful action into fluid, automatic execution through iterative replay and error correction. A child learning to ride a bicycle starts with explicit instructions: _pedal, balance, steer, don't look down_. After enough practice, those separate commands fuse into a single smooth skill. The child's ability to think is not replaced. The translation from thought to action is improved.
removed in v6.0
not in v5.0
v6.0 · 1. Introduction -- The Paradox of the Amnesiac ExpertThe human brain solves a version of the same problem every night. Waking experience is fragile and short-lived; without consolidation it fades. During sleep the hippocampus replays recent events and transfers them to the neocortex, where they become stable long-term knowledge -- the well-documented reason that sleep after learning beats an equal stretch of waking study. Motor skills get a parallel treatment: the cerebellum refines them through repetitive offline practice, turning a fumbled sequence into a smooth one by morning. A child learning to ride a bicycle starts with explicit instructions -- *pedal, balance, steer, don't look down* -- and after enough practice those separate commands fuse into a single fluid skill. The capacity to think is not replaced. The translation from thought to action is improved.
v5.0 · 1. Introduction -- The Paradox of the Amnesiac ExpertThe same pattern appears here. An AI agent's prompt files begin as explicit instructions. Through nightly reflection, those instructions are tightened, edge cases are encoded, failure modes are made concrete, and vague warnings become operational rules. Over time, the agent behaves more appropriately not because the base model became more capable, but because the substrate around it became more organized. The intelligence is not in the weights alone. It is in the system that selects, sorts, and presents the right constraints at the right time.
v6.0 · 1. Introduction -- The Paradox of the Amnesiac ExpertThe same pattern appears here. An agent's prompt files begin as explicit instructions. Through nightly reflection, those instructions are tightened, edge cases are encoded, failure modes are made concrete, and vague warnings become operational rules. Over time the agent behaves more appropriately not because the base model became more capable, but because the substrate around it became more organized. The intelligence is not in the weights alone. It is in the system that selects, sorts, and presents the right constraints at the right time.
not in v5.0
v6.0 · 1. Introduction -- The Paradox of the Amnesiac ExpertA useful image: the agent at night is a restaurant after closing. It does not shut down to rest. It reviews the day's orders, identifies what went wrong -- the risotto kept coming back -- and updates tomorrow's recipes and prep instructions. By the time the doors reopen, the kitchen has changed, though no cook learned anything new in the moment.
··· 1 unchanged paragraph folded ···
v5.0 · 1. Introduction -- The Paradox of the Amnesiac ExpertThe central question of this paper is therefore: **Can persistent artifacts combined with scheduled reflection substitute for weight updates in producing sustained behavioral improvement in LLM agents?**
v6.0 · 1. Introduction -- The Paradox of the Amnesiac ExpertThe central question is therefore: **Can persistent artifacts combined with scheduled reflection substitute for weight updates in producing sustained behavioral improvement in LLM agents?**
v5.0 · 1. Introduction -- The Paradox of the Amnesiac ExpertOur evidence suggests a qualified yes -- qualified because the improvements are _declarative_ (better rules and better context) rather than _procedural_ (better underlying reasoning), and because the evidence comes from a single-operator production system rather than a controlled experiment. We document the mechanisms, present production data, acknowledge the limitations plainly, and propose a framework others can replicate.
v6.0 · 1. Introduction -- The Paradox of the Amnesiac ExpertOur evidence suggests a qualified yes -- qualified because the improvements are *declarative* (better rules and better context) rather than *procedural* (better underlying reasoning), and because the evidence comes from a single-operator production system rather than a controlled experiment. We document the mechanisms, present production data, acknowledge the limitations plainly, and propose a framework others can replicate. Section 6 then reports a concrete step toward closing the declarative/procedural gap from the prompt side: extending the same nightly loop to evolve the agent's recipes, strategies, and skills.
not in v5.0
v6.0 · 1.1 Where This Sits Among the Memory Systems### 1.1 Where This Sits Among the Memory Systems
not in v5.0
v6.0 · 1.1 Where This Sits Among the Memory SystemsThis work is the meta-layer of a larger memory architecture. A storage layer records every interaction; a retrieval layer indexes and surfaces it; an identity layer reads prompt files to keep behavior consistent. Each of those is, on its own, a *static* architecture -- it does the same thing on day 30 that it did on day 1. Sleep Consolidation is what makes them adaptive without retraining any of them. It does not store and it does not retrieve; it *improves how storing and retrieving work*, by reviewing each night how those layers performed and adjusting the rules and parameters that govern them. The remaining sections describe the storage and retrieval layers only through self-contained one-line summaries where the dependency is load-bearing; the contribution of this paper is the offline loop that tunes them.
··· 3 unchanged paragraphs folded ···
v5.0 · 2.1 The Persistence HierarchyAgent systems exist on a spectrum of persistence mechanisms, each with characteristic ceilings (Lewis et al., 2020; Packer et al., 2023; Hu et al., 2021):
v6.0 · 2.1 The Persistence HierarchyAgent systems exist on a spectrum of persistence mechanisms, each with a characteristic ceiling (Lewis et al., 2020; Packer et al., 2023; Hu et al., 2021):
v5.0 · 2.1 The Persistence Hierarchy| Level | Mechanism | Persistence | Learning Speed | Characteristic Ceiling | | ----- | ----------------------- | ----------------------------- | ---------------- | ------------------------------------------------------------------- | | 0 | Prompt engineering | None (session-only) | Zero | Static behavior; cannot adapt beyond session boundary | | 1 | RAG / retrieval | Declarative facts | Per-query | Retrieval quality bounds; no behavioral change (Lewis et al., 2020) | | 2 | Persistent memory files | Declarative + some procedural | Per-session | Linear growth, retrieval degradation (Packer et al., 2023) | | 3 | Fine-tuning / LoRA | Weight-level | Per training run | Catastrophic forgetting (French, 1999; Hu et al., 2021) | | 4 | Continual learning | Full integration | Continuous | Open research problem (McClelland et al., 1995) |
v6.0 · 2.1 The Persistence Hierarchy| Level | Mechanism | Persistence | Learning Speed | Characteristic Ceiling | | ----- | --------- | ----------- | -------------- | ---------------------- | | 0 | Prompt engineering | None (session-only) | Zero | Static behavior; cannot adapt beyond the session boundary | | 1 | RAG / retrieval | Declarative facts | Per-query | Retrieval quality bounds; no behavioral change (Lewis et al., 2020) | | 2 | Persistent memory files | Declarative + some procedural | Per-session | Linear growth, retrieval degradation (Packer et al., 2023) | | 3 | Fine-tuning / LoRA | Weight-level | Per training run | Catastrophic forgetting (French, 1999; Hu et al., 2021) | | 4 | Continual learning | Full integration | Continuous | Open research problem (McClelland et al., 1995) |
v5.0 · 2.1 The Persistence HierarchyMost production agent systems operate at Level 2. This paper shows that Level 2 systems can exhibit Level 3-like _behavioral_ improvement through structured self-reflection, without weight updates.
v6.0 · 2.1 The Persistence HierarchyMost production agent systems operate at Level 2. This paper shows that Level 2 systems can exhibit Level 3-like *behavioral* improvement through structured self-reflection, without weight updates.
··· 1 unchanged paragraph folded ···
v5.0 · 2.2 What's Missing: The Reflection LoopLevel 2 systems usually accumulate information passively: the agent records what happened, stores preferences, and retrieves relevant context later. But accumulation is not the same as learning. We define **learning** here as _behavioral policy change that persists across episodes and transfers across task domains_. By contrast, **memory** is _state persistence without behavioral modification_.
v6.0 · 2.2 What's Missing: The Reflection LoopLevel 2 systems usually accumulate information passively: the agent records what happened, stores preferences, and retrieves relevant context later. But accumulation is not the same as learning. We define **learning** here as *behavioral policy change that persists across episodes and transfers across task domains*. By contrast, **memory** is *state persistence without behavioral modification*.
v5.0 · 2.2 What's Missing: The Reflection LoopA memory file that says "the user prefers concise responses" is memory. A prompt mutation that changes how the agent _formats all future outputs_ is learning. The distinction matters because memory must be reinterpreted every session, whereas learning changes default behavior.
v6.0 · 2.2 What's Missing: The Reflection LoopA memory file that says "the user prefers concise responses" is memory. A prompt mutation that changes how the agent *formats all future outputs* is learning. The distinction matters because memory must be reinterpreted every session, whereas learning changes default behavior.
v5.0 · 2.2 What's Missing: The Reflection LoopThe problem is that most memory systems optimize for storage, not for use. They preserve chronology because chronology is easy. But for agents, chronology is rarely the right retrieval axis. **The useful unit is not the event; it is the use-case.** An error in calendar handling belongs with other completeness checks. A messaging failure belongs with targeting rules. A privacy slip belongs with redaction policies. If memory remains scattered across time-stamped logs, retrieval becomes noisy and expensive. If it is consolidated into purpose-built operational files, the system can act on it cheaply and reliably.
v6.0 · 2.2 What's Missing: The Reflection LoopThe problem is that most memory systems optimize for storage, not for use. They preserve chronology because chronology is easy. But for agents, chronology is rarely the right retrieval axis. **The useful unit is not the event; it is the use-case.** An error in calendar handling belongs with other completeness checks. A messaging failure belongs with targeting rules. A privacy slip belongs with redaction policies. If memory stays scattered across time-stamped logs, retrieval becomes noisy and expensive. If it is consolidated into purpose-built operational files, the system can act on it cheaply and reliably.
··· 1 unchanged paragraph folded ···
v5.0 · 2.2 What's Missing: The Reflection Loop1. Identifies _why_ a failure occurred (root cause, not symptom) 2. Determines whether the failure class is preventable through prompt changes 3. Modifies the relevant prompt to prevent recurrence 4. Verifies the modification does not break other behaviors 5. Encodes the _meta-lesson_ at the appropriate level of abstraction
v6.0 · 2.2 What's Missing: The Reflection Loop1. Identifies *why* a failure occurred (root cause, not symptom) 2. Determines whether the failure class is preventable through prompt changes 3. Modifies the relevant prompt to prevent recurrence 4. Verifies the modification does not break other behaviors 5. Encodes the *meta-lesson* at the appropriate level of abstraction
v5.0 · 2.2 What's Missing: The Reflection LoopThis mirrors the biological sleep consolidation error-correction loop: compare intended movement with actual movement, compute an error signal, then adjust the motor program.
v6.0 · 2.2 What's Missing: The Reflection LoopThis mirrors the brain's offline error-correction: compare the intended outcome with the actual one, compute an error signal, then adjust the program that produced it.
··· 3 unchanged paragraphs folded ···
v5.0 · 2.3 Related Work**Episodic reflection.** Reflexion (Shinn et al., 2023) adds episodic memory of previous trial-and-error. However, reflection is task-specific and stored per task rather than in shared infrastructure. Our cross-cron transfer mechanism (Section 3.3, Mechanism 3) addresses this limitation directly. Generative Agents (Park et al., 2023) implement daily reflection and memory consolidation for simulated social agents -- the closest prior work to our nightly cycle. The key difference is that their reflection produces _summaries_ for future retrieval, whereas ours produces _prompt mutations_ that change behavior. Their agents do not rewrite their own operating instructions.
v6.0 · 2.3 Related Work**Episodic reflection.** Reflexion (Shinn et al., 2023) adds episodic memory of previous trial-and-error, but reflection is task-specific and stored per task rather than in shared infrastructure. Our cross-cron transfer mechanism (Section 3.3, Mechanism 3) addresses this directly. Generative Agents (Park et al., 2023) implement daily reflection and memory consolidation for simulated social agents -- the closest prior work to our nightly cycle. The key difference is that their reflection produces *summaries* for future retrieval, whereas ours produces *prompt mutations* that change behavior. Their agents do not rewrite their own operating instructions.
v5.0 · 2.3 Related Work**Prompt optimization.** OPRO (Yang et al., 2023) uses LLMs to optimize prompts through iterative evaluation against objective metrics. DSPy (Khattab et al., 2023) automates prompt-pipeline optimization through teleprompting. PromptBreeder (Fernando et al., 2023) evolves prompts through mutation and selection. These systems optimize prompts against _defined benchmarks_. Our system optimizes against _real operational failures_ without predefined metrics. The mutation trigger is therefore qualitatively different: benchmark score versus production incident.
v6.0 · 2.3 Related Work**Prompt optimization.** OPRO (Yang et al., 2023) uses LLMs to optimize prompts through iterative evaluation against objective metrics. DSPy (Khattab et al., 2023) automates prompt-pipeline optimization through teleprompting. PromptBreeder (Fernando et al., 2023) evolves prompts through mutation and selection. These systems optimize prompts against *defined benchmarks*. Our system optimizes against *real operational failures* without predefined metrics. The mutation trigger is qualitatively different: benchmark score versus production incident.
v5.0 · 2.3 Related Work**Skill accumulation.** Voyager (Wang et al., 2023) accumulates a skill library in Minecraft through exploration, closer in spirit to our approach but limited to a single domain with clear success criteria. ADAS (Hu et al., 2024) uses LLMs to design better agent architectures, operating at the meta-level of system design.
v6.0 · 2.3 Related Work**Skill accumulation.** Voyager (Wang et al., 2023) accumulates a skill library in Minecraft through exploration -- closer in spirit to our approach but limited to a single domain with clear success criteria. Section 6.3 adapts the Voyager skill-library idea to a general personal-assistant workload. ADAS (Hu et al., 2024) uses LLMs to design better agent architectures, operating at the meta-level of system design.
v5.0 · 2.3 Related Work**Constitutional and governance approaches.** Constitutional AI (Bai et al., 2022) establishes self-critique against explicit principles, which is related to our operational-lessons governance. Our Principle 7 (human-in-the-loop for Level 2+ changes) addresses the same risk: preventing self-reinforcing error spirals in self-modifying systems.
v6.0 · 2.3 Related Work**Constitutional and governance approaches.** Constitutional AI (Bai et al., 2022) establishes self-critique against explicit principles, related to our operational-lessons governance. Our Principle 7 (human-in-the-loop for Level 2+ changes) addresses the same risk: preventing self-reinforcing error spirals in self-modifying systems.
v5.0 · 2.3 Related Work**Incident learning in software engineering.** Our mutation protocol draws implicitly from SRE blameless postmortem methodology (Beyer et al., 2016), where incidents are systematically analyzed, root-caused, and translated into preventive changes. Sleep Consolidation automates that cycle for AI agent operations.
v6.0 · 2.3 Related Work**Incident learning in software engineering.** Our mutation protocol draws on SRE blameless-postmortem methodology (Beyer et al., 2016), where incidents are systematically analyzed, root-caused, and translated into preventive changes. Sleep Consolidation automates that cycle for AI agent operations.
v5.0 · 2.3 Related WorkOur contribution differs from all of the above in three ways: (1) it operates on _production_ personal assistant workloads, not benchmarks or simulations; (2) improvement is _cross-task_ -- lessons propagate through shared infrastructure; and (3) reflection is _scheduled and autonomous_, not triggered by explicit failure signals or human feedback.
v6.0 · 2.3 Related WorkOur contribution differs from all of the above in three ways: (1) it operates on *production* personal-assistant workloads, not benchmarks or simulations; (2) improvement is *cross-task* -- lessons propagate through shared infrastructure; and (3) reflection is *scheduled and autonomous*, not triggered by explicit failure signals or human feedback.
··· 3 unchanged paragraphs folded ···
v5.0 · 3.1 System OverviewSleep Consolidation is not a single component. It is an emergent property of four interacting systems:
v6.0 · 3.1 System OverviewSleep Consolidation is not a single component. It is an emergent property of four interacting systems.
v5.0 · 3.1 System Overview**Nightly Cycle (reflection layer):** Wind-Down (04:00) --> Consolidation (04:15) --> Cleaning Lady (05:15)
removed in v6.0
not in v5.0
v6.0 · 3.1 System Overview**Nightly Cycle (reflection layer).** A wind-down pass reviews the day and encodes lessons; a memory-consolidation pass compresses logs and routes knowledge; a cleaning pass prunes and enforces budgets. These run on a fixed nightly schedule (Section 3.4).
··· 1 unchanged paragraph folded ···
v5.0 · 3.1 System Overview- operational-lessons.md (behavioral rules -- the primary mutation target) - bugs/ directory (structured failure patterns with root cause analysis) - knowledge/ (domain-specific principles and procedures) - MEMORY.md (core principles -- injected into every session's context window) - cron prompts themselves (self-modifying task instructions)
v6.0 · 3.1 System Overview- an operational-lessons file (behavioral rules -- the primary mutation target) - a structured failure database (failure patterns with root-cause analysis) - domain knowledge files (principles and procedures, sorted by topic) - a core-principles file injected into every session's context window - the cron prompts themselves (self-modifying task instructions)
v5.0 · 3.1 System Overview**Daytime Crons (execution layer, consumers + producers):** Morning Briefing (07:00) | Fork Sync (04:45) | Online Engagement (08:00) | 11 others
removed in v6.0
v5.0 · 3.1 System OverviewEvery cron job is both a _consumer_ of the shared memory layer and a _producer_ for it. It reads operational lessons, principles, and prior failures before acting; later, it emits receipts, logs failures, and -- during the nightly cycle -- helps mutate the shared layer itself.
v6.0 · 3.1 System Overview**Daytime Crons (execution layer, consumers and producers).** A morning briefing, an online-engagement pass, a life-butler pass, and roughly a dozen others. Every cron job is both a *consumer* of the shared memory layer and a *producer* for it. It reads operational lessons, principles, and prior failures before acting; later it emits receipts, logs failures, and -- during the nightly cycle -- helps mutate the shared layer itself.
··· 1 unchanged paragraph folded ···
not in v5.0
v6.0 · 3.1 System OverviewThe three layers this meta-system tunes can be summarized self-containedly:
not in v5.0
v6.0 · 3.1 System Overview- **Storage layer.** Records every interaction and compacts older events into compressed pointer summaries. The nightly cycle can adjust compaction aggressiveness based on observed retrieval patterns -- if important memories are being over-compressed, the thresholds loosen. - **Retrieval layer.** Maps keywords and embeddings to memory segments. The nightly cycle triggers index rebuilds and can adjust scoring weights -- for example, boosting a domain's memories after repeated retrieval failures there. - **Identity layer.** Reads prompt files (persona definitions, behavioral rules, operational lessons) to keep personality and behavior consistent. The nightly cycle rewrites those same files, creating the core feedback loop: behavior produces incidents, reflection reads incidents, prompt mutation changes the files the identity layer consumes, and tomorrow's behavior shifts accordingly.
··· 5 unchanged paragraphs folded ···
v5.0 · 3.2 Algorithm 1: The Nightly Reflection LoopPHASE 2: CONSOLIDATION (model: strongest available) compress(daily_logs older than 3 days) route_knowledge(new lessons -> knowledge/ subdirectories) rebuild_search_indexes()
v6.0 · 3.2 Algorithm 1: The Nightly Reflection LoopPHASE 2: CONSOLIDATION (model: strongest available) compress(daily_logs older than 3 days) route_knowledge(new lessons -> knowledge subdirectories) rebuild_search_indexes() build_concept_index(modified knowledge files) // see Section 6.4
··· 3 unchanged paragraphs folded ···
v5.0 · Mechanism 1: Failure-Driven Prompt MutationWhen an agent encounters a failure, the default response is to log it and move on. Sleep Consolidation adds the crucial second step: **determine whether the failure came from a prompt deficiency, and if so, mutate the prompt.**
v6.0 · Mechanism 1: Failure-Driven Prompt MutationWhen an agent hits a failure, the default response is to log it and move on. Sleep Consolidation adds the crucial second step: **determine whether the failure came from a prompt deficiency, and if so, mutate the prompt.** The agent rewrites its own operating manual each night -- like a pilot who, after every flight, updates a personal checklist based on what went well and what nearly went wrong.
v5.0 · Mechanism 1: Failure-Driven Prompt Mutation**Production example -- The B010 cascade (2026-03-03 to 2026-03-10):**
v6.0 · Mechanism 1: Failure-Driven Prompt Mutation**Production example -- The B010 cascade (Mar 3 to Mar 10):**
v5.0 · Mechanism 1: Failure-Driven Prompt MutationThis seven-day sequence shows the full sleep-consolidated learning loop, including second-order correction.
v6.0 · Mechanism 1: Failure-Driven Prompt MutationThis seven-day sequence shows the full loop, including second-order correction.
v5.0 · Mechanism 1: Failure-Driven Prompt Mutation**Day 0 (Mar 3) -- Initial failure.** A fork-sync cron job, prompted to "sync the fork with upstream," interpreted that instruction as permission to edit production source code, run builds, and restart the gateway. The problem was not model incapacity. The problem was prompt ambiguity.
v6.0 · Mechanism 1: Failure-Driven Prompt Mutation**Day 0 (Mar 3) -- Initial failure.** A fork-sync cron job, prompted to "sync the fork with upstream," read that instruction as permission to edit production source code, run builds, and restart the gateway. The problem was not model incapacity. It was prompt ambiguity.
v5.0 · Mechanism 1: Failure-Driven Prompt Mutation_Prompt before:_ "Sync the fork with upstream and report the result." _Prompt after (mutation #8):_ "Run the safe merge script. NEVER modify source code directly. NEVER run builds. NEVER restart the gateway. If the script fails, report and STOP."
v6.0 · Mechanism 1: Failure-Driven Prompt Mutation*Prompt before:* "Sync the fork with upstream and report the result." *Prompt after (mutation #8):* "Run the safe merge script. NEVER modify source code directly. NEVER run builds. NEVER restart the gateway. If the script fails, report and STOP."
v5.0 · Mechanism 1: Failure-Driven Prompt MutationThe mutation was filed as bug B010, with root cause: "Ambiguous action verb ('sync') interpreted as permission for unrestricted operations."
v6.0 · Mechanism 1: Failure-Driven Prompt MutationThe mutation was filed as bug B010, root cause: "Ambiguous action verb ('sync') interpreted as permission for unrestricted operations."
v5.0 · Mechanism 1: Failure-Driven Prompt Mutation**Day 7 (Mar 10) -- Second-order failure.** The same cron later encountered a merge conflict. It reported the conflict and stopped -- exactly as mutation #8 required. But the restriction was too broad. The agent was in fact _capable_ of resolving the conflict intelligently by reading fork documentation, understanding both sides' intent, and verifying with a build. The blanket prohibition prevented useful work. The merge was blocked for 24 hours.
v6.0 · Mechanism 1: Failure-Driven Prompt Mutation**Day 7 (Mar 10) -- Second-order failure.** The same cron later hit a merge conflict. It reported the conflict and stopped -- exactly as mutation #8 required. But the restriction was too broad. The agent was in fact *capable* of resolving the conflict by reading the fork's patch documentation, understanding both sides' intent, and verifying with a build. The blanket prohibition prevented useful work. The merge was blocked for 24 hours.
v5.0 · Mechanism 1: Failure-Driven Prompt Mutation_Prompt after (mutation #14):_ "Run the safe merge script. If conflicts remain, read FORK_PATCHES.md to understand intent, attempt resolution, verify with build. If genuinely uncertain, escalate."
v6.0 · Mechanism 1: Failure-Driven Prompt Mutation*Prompt after (mutation #14):* "Run the safe merge script. If conflicts remain, read the patch registry to understand intent, attempt resolution, verify with build. If genuinely uncertain, escalate."
··· 1 unchanged paragraph folded ···
v5.0 · Mechanism 1: Failure-Driven Prompt MutationThat meta-lesson now applies to _all_ future lesson encoding across the system. One incident produced a permanent improvement in how the system learns.
v6.0 · Mechanism 1: Failure-Driven Prompt MutationThat meta-lesson now applies to *all* future lesson encoding across the system. One incident produced a permanent improvement in how the system learns. As Section 6.2 shows, this same cascade is now the canonical test case for an automated strategy-switch trigger.
··· 1 unchanged paragraph folded ···
v5.0 · Mechanism 2: Fractal Depth CalibrationNot all tasks deserve the same amount of metacognitive effort. Sleep Consolidation includes a **depth selector** -- a prompt-encoded heuristic that determines how many layers of "why" to traverse:
v6.0 · Mechanism 2: Fractal Depth CalibrationNot all tasks deserve the same metacognitive effort. Sleep Consolidation includes a **depth selector** -- a prompt-encoded heuristic that decides how many layers of "why" to traverse:
v5.0 · Mechanism 2: Fractal Depth Calibration| Signal | Depth | Example | | -------------------------- | ----- | ----------------------------------------------- | | Routine/mechanical | 0 | Read a file, send a message | | Something broke | 1--2 | Why did it break? What pattern? | | Encoding a new rule | 2--3 | Is the abstraction right? Am I over-correcting? | | Explicit request for depth | 3+ | Go until insight stops being actionable |
v6.0 · Mechanism 2: Fractal Depth Calibration| Signal | Depth | Example | | ------ | ----- | ------- | | Routine / mechanical | 0 | Read a file, send a message | | Something broke | 1--2 | Why did it break? What pattern? | | Encoding a new rule | 2--3 | Is the abstraction right? Am I over-correcting? | | Explicit request for depth | 3+ | Go until insight stops being actionable |
··· 1 unchanged paragraph folded ···
v5.0 · Mechanism 2: Fractal Depth Calibration**Convergence hypothesis (not proven, observed):** In practice, most tasks stabilize at depth 0--1 within days of operation, while novel failure classes begin at depth 2--3 and gradually move to 0--1 as their patterns become encoded. We observe approximately weekly Level 2 refinements and approximately monthly Level 3 refinements, suggesting that deeper reflection becomes less necessary as the system matures. We do not claim formal convergence -- only that the 30-day pattern is consistent with it.
v6.0 · Mechanism 2: Fractal Depth Calibration**Convergence hypothesis (observed, not proven):** Most tasks stabilize at depth 0--1 within days of operation, while novel failure classes begin at depth 2--3 and move to 0--1 as their patterns become encoded. We see roughly weekly Level 2 refinements and roughly monthly Level 3 refinements, which suggests deeper reflection becomes less necessary as the system matures. We do not claim formal convergence -- only that the 30-day pattern is consistent with it.
v5.0 · Mechanism 2: Fractal Depth Calibration**Production example -- Fractal emergence (2026-03-10):** The merge-conflict episode initially operated at depth 0: just do it, abort on failure. After the B010 over-correction incident, a human prompt ("think fractal") triggered depth 3+ analysis, revealing that the real problem was not merge strategy but the _method used to encode lessons_. The resulting principle -- "separate the failure mode from the restriction" -- now applies to every future lesson, not just merge conflicts.
v6.0 · Mechanism 2: Fractal Depth Calibration**Production example -- Fractal emergence (Mar 10):** The merge-conflict episode began at depth 0: just do it, abort on failure. After the B010 over-correction, a human prompt ("think fractal") triggered depth 3+ analysis, which revealed that the real problem was not merge strategy but the *method used to encode lessons*. The resulting principle -- "separate the failure mode from the restriction" -- now applies to every future lesson, not just merge conflicts.
··· 1 unchanged paragraph folded ···
v5.0 · Mechanism 3: Cross-Cron Knowledge TransferThe strongest emergent property is that lessons learned in one autonomous task propagate to all others through shared memory files. We documented 5 cross-domain transfer events over 30 days:
v6.0 · Mechanism 3: Cross-Cron Knowledge TransferThe strongest emergent property is that lessons learned in one autonomous task propagate to all others through shared memory files. A lesson learned in one domain -- "always double-check dates" -- spontaneously improves performance in another, the way a surgeon's steady hands might also make for a better painter, though no one taught the transfer. We documented 5 cross-domain transfer events over 30 days:
v5.0 · Mechanism 3: Cross-Cron Knowledge Transfer| # | Origin Task | Lesson Encoded | Transferred To | Observable Behavior Change | | --- | -------------------- | ---------------------------------------------- | --------------------------- | ----------------------------------------------------------------- | | 1 | Calendar management | "When 'the X' is ambiguous, ask before acting" | Fork sync | Cron reported two interpretations of conflict instead of guessing | | 2 | WhatsApp messaging | "Use JID-based targeting, never name-based" | All crons with messaging | Morning briefing switched from name to JID targeting | | 3 | Privacy incident | "Never include phone numbers in visible text" | All sessions | Online engagement cron redacted numbers in PR comments | | 4 | Fork sync (B010) | "Report-only crons must not modify systems" | Security audit cron | Audit reported findings without attempting fixes | | 5 | Memory consolidation | "Enforce file size budgets" | All report-generating crons | Reports began self-truncating at budget limits |
v6.0 · Mechanism 3: Cross-Cron Knowledge Transfer| # | Origin Task | Lesson Encoded | Transferred To | Observable Behavior Change | | - | ----------- | -------------- | -------------- | -------------------------- | | 1 | Calendar management | "When 'the X' is ambiguous, ask before acting" | Fork sync | Cron reported two interpretations of a conflict instead of guessing | | 2 | WhatsApp messaging | "Use ID-based targeting, never name-based" | All crons with messaging | Morning briefing switched from name to ID targeting | | 3 | Privacy incident | "Never include phone numbers in visible text" | All sessions | Online engagement cron redacted numbers in PR comments | | 4 | Fork sync (B010) | "Report-only crons must not modify systems" | Security audit cron | Audit reported findings without attempting fixes | | 5 | Memory consolidation | "Enforce file size budgets" | All report-generating crons | Reports began self-truncating at budget limits |
v5.0 · Mechanism 3: Cross-Cron Knowledge TransferThe transfer mechanism is architectural, not magical: lessons written to `operational-lessons.md` are read by all sessions at boot. But the **abstraction level** at which lessons are encoded determines transfer breadth. "Use JID-based targeting" (Level 0, specific) transfers only to messaging tasks. "When something is ambiguous, ask before acting" (Level 1, general) transfers much more widely.
v6.0 · Mechanism 3: Cross-Cron Knowledge TransferThe transfer mechanism is architectural, not magical: lessons written to the operational-lessons file are read by all sessions at boot. But the **abstraction level** at which lessons are encoded determines transfer breadth. "Use ID-based targeting" (Level 0, specific) transfers only to messaging tasks. "When something is ambiguous, ask before acting" (Level 1, general) transfers much more widely.
··· 1 unchanged paragraph folded ···
v5.0 · 3.4 The Nightly Cycle### 3.4 The Nightly Cycle -- Sleep Consolidation for Agents
v6.0 · 3.4 The Nightly Cycle### 3.4 The Nightly Cycle
not in v5.0
v6.0 · 3.4 The Nightly CycleThe cycle runs as an ordered sequence of passes, each producing inputs for the next:
v5.0 · 3.4 The Nightly Cycle| Time | Job | Role | Biological Analogy | | ----- | -------------------- | --------------------------------------------------------- | --------------------------------------------------- | | 04:00 | Wind-Down | Review, identify failures, encode lessons, mutate prompts | Sleep replay / sleep consolidation error correction | | 04:15 | Memory Consolidation | Compress daily logs, route knowledge, rebuild indexes | Hippocampal-to-neocortical memory transfer | | 04:45 | Fork Sync | Integrate external changes, self-heal build failures | Environmental adaptation during rest | | 05:15 | Cleaning Lady | Trim bloated files, prune stale sessions, enforce budgets | Synaptic pruning |
v6.0 · 3.4 The Nightly Cycle| Order | Pass | Role | Biological Analogy | | ----- | ---- | ---- | ------------------ | | 1 | Wind-Down | Review, identify failures, encode lessons, mutate prompts | Sleep replay / error correction | | 2 | Memory Consolidation | Compress daily logs, route knowledge, rebuild indexes | Hippocampal-to-neocortical transfer | | 3 | Fork Sync | Integrate external changes, self-heal build failures | Environmental adaptation during rest | | 4 | Cleaning | Trim bloated files, prune stale sessions, enforce budgets | Synaptic pruning |
v5.0 · 3.4 The Nightly Cycle**Critical ordering:** Wind-Down runs first because it produces the raw material -- identified failures and encoded lessons -- that Consolidation then routes to permanent storage. Cleaning Lady runs last because it prunes temporary artifacts. The ordering matters. We observed the cost of getting it wrong when a misconfigured schedule ran Cleaning Lady before Wind-Down, pruning the very daily logs that Wind-Down needed as input.
v6.0 · 3.4 The Nightly Cycle**Critical ordering:** Wind-Down runs first because it produces the raw material -- identified failures and encoded lessons -- that Consolidation then routes to permanent storage. Cleaning runs last because it prunes temporary artifacts. We learned the cost of getting this wrong when a misconfigured schedule ran the cleaning pass before Wind-Down, pruning the very daily logs Wind-Down needed as input. (Wall-clock times for each pass have shifted across the deployment's life; the *ordering* is the invariant, not the hour.)
··· 3 unchanged paragraphs folded ···
v5.0 · 4.1 Methodology and Limitations**System:** OpenClaw personal assistant (Jarvis), running on a Linux workstation. Primary model: Claude Opus 4. Cron models: mix of Opus, Sonnet, and Haiku. 13 autonomous cron jobs. One human operator (Oscar).
v6.0 · 4.1 Methodology and Limitations**System:** an OpenClaw-based personal assistant running on a Linux workstation. Primary reflection model: the strongest available frontier model; daytime crons use a mix of strong and cheaper models. Roughly 12--13 autonomous cron jobs over the period. One human operator.
··· 1 unchanged paragraph folded ···
v5.0 · 4.1 Methodology and Limitations**Data sources:** Cron receipts (structured JSON, automatically generated per run), operational lessons file (git-versioned, all changes tracked), bug reports (structured markdown, manually filed), daily Wind-Down logs (generated by Opus).
v6.0 · 4.1 Methodology and Limitations**Data sources:** cron receipts (structured JSON, auto-generated per run), the operational-lessons file (git-versioned, all changes tracked), bug reports (structured markdown, manually filed), and daily Wind-Down logs.
v5.0 · 4.1 Methodology and Limitations**Labeling protocol:** Error instances were identified from cron receipts (non-zero exit codes, escalation flags) and operator-reported incidents. Error _classes_ were defined post hoc by the authors based on root-cause similarity. No inter-rater reliability was computed -- this is a single-system observational study, not a controlled experiment.
v6.0 · 4.1 Methodology and Limitations**Labeling protocol:** error instances were identified from cron receipts (non-zero exit codes, escalation flags) and operator-reported incidents. Error *classes* were defined post hoc by the authors based on root-cause similarity. No inter-rater reliability was computed -- this is a single-system observational study, not a controlled experiment.
v5.0 · 4.1 Methodology and Limitations**Confounds we acknowledge:** Over the 30-day period, the following changed simultaneously: prompt content (the variable under study), cron ordering (adjusted twice), model assignments (3 crons moved from Opus to Sonnet), operator familiarity (Oscar learned the system's capabilities), and upstream codebase (109 commits merged). We cannot isolate the contribution of prompt mutation from these confounds. The evidence is _consistent with_ the Sleep Consolidation hypothesis but does not _prove_ it.
v6.0 · 4.1 Methodology and Limitations**Confounds we acknowledge:** over the 30-day period, the following changed at once: prompt content (the variable under study), cron ordering (adjusted twice), model assignments (three crons moved to a cheaper model), operator familiarity, and the upstream codebase (109 commits merged). We cannot isolate the contribution of prompt mutation from these confounds. The evidence is *consistent with* the Sleep Consolidation hypothesis but does not *prove* it.
v5.0 · 4.1 Methodology and Limitations**What a controlled study would look like:** Run two identical agent deployments: one with nightly reflection enabled, one with static prompts. Measure error recurrence rate, human intervention frequency, task completion quality (rated by blind evaluators), and time-to-resolution for novel incidents. Duration: minimum 4 weeks. We have not conducted this study.
v6.0 · 4.1 Methodology and Limitations**What a controlled study would look like:** run two identical agent deployments, one with nightly reflection enabled and one with static prompts. Measure error-recurrence rate, human-intervention frequency, task-completion quality (rated by blind evaluators), and time-to-resolution for novel incidents. Duration: at least 4 weeks. We have not conducted this study.
··· 1 unchanged paragraph folded ···
v5.0 · 4.2 Prompt Mutations ObservedOver 30 days, we documented 14 prompt mutations -- changes to cron prompts or operational rules triggered by real failures. "Documented" means the mutation has a git commit, a linked bug report or incident description, and a before/after prompt diff. We did not observe any mutations that were _reverted_ as harmful, though mutation #8 was later _refined_ by mutation #14 after an over-correction.
v6.0 · 4.2 Prompt Mutations ObservedOver 30 days we documented 14 prompt mutations -- changes to cron prompts or operational rules triggered by real failures. "Documented" means the mutation has a git commit, a linked bug report or incident description, and a before/after prompt diff. We observed no mutations that were *reverted* as harmful, though mutation #8 was later *refined* by mutation #14 after an over-correction.
v5.0 · 4.2 Prompt Mutations Observed| # | Date | Trigger | Mutation | Scope | | --- | ------ | --------------------------------------------- | ------------------------------------------------------------ | ---------------- | | 1 | Feb 10 | Morning briefing missed calendar events | Added dual-calendar query requirement | Single cron | | 2 | Feb 14 | Cron sent message to wrong chat | Added explicit JID-based targeting, banned name-based lookup | All WA crons | | 3 | Feb 16 | Memory files growing unbounded | Created size budgets, cleaning-lady cron | System-wide | | 4 | Feb 19 | Agent didn't read SOUL.md | Added mandatory boot sequence to AGENTS.md | All sessions | | 5 | Feb 22 | Heartbeat renamed function broke calls | Created FORK_PATCHES.md registry | Fork sync | | 6 | Feb 24 | Cron report was 40KB (unreadable) | Added budget fuses, formatting rules | All report crons | | 7 | Mar 01 | Agent included PII in reply | Added privacy guardrail to TOOLS.md | All sessions | | 8 | Mar 03 | Fork sync cron edited production code (B010) | Added HARD CONSTRAINTS to cron prompt | Fork sync | | 9 | Mar 03 | Same session: cron killed the gateway | Added "never pkill" rule | All crons | | 10 | Mar 04 | Build failed after merge -- wrong externals | Auto-heal retry + wiring guardian | Fork sync | | 11 | Mar 05 | Model misidentified person from headline | Added "ALWAYS click through" rule | Self-evolution | | 12 | Mar 07 | Wind-Down wrote to wrong day's log | Added temporal awareness step | Wind-Down | | 13 | Mar 08 | Agent didn't recognize family member | Added mandatory daily log reading to boot | All sessions | | 14 | Mar 10 | Merge abort on single conflict too aggressive | Keep-ours + intelligent resolution | Fork sync |
v6.0 · 4.2 Prompt Mutations Observed| # | Date | Trigger | Mutation | Scope | | - | ---- | ------- | -------- | ----- | | 1 | Feb 10 | Morning briefing missed calendar events | Added dual-calendar query requirement | Single cron | | 2 | Feb 14 | Cron sent message to wrong chat | Added explicit ID-based targeting, banned name lookup | All messaging crons | | 3 | Feb 16 | Memory files growing unbounded | Created size budgets, cleaning cron | System-wide | | 4 | Feb 19 | Agent skipped its boot-context file | Added mandatory boot sequence | All sessions | | 5 | Feb 22 | Renamed function broke heartbeat calls | Created a patch registry | Fork sync | | 6 | Feb 24 | Cron report was 40KB (unreadable) | Added budget fuses, formatting rules | All report crons | | 7 | Mar 01 | Agent included PII in a reply | Added privacy guardrail | All sessions | | 8 | Mar 03 | Fork sync cron edited production code (B010) | Added hard constraints to cron prompt | Fork sync | | 9 | Mar 03 | Same session: cron killed the gateway | Added "never force-kill processes" rule | All crons | | 10 | Mar 04 | Build failed after merge -- wrong externals | Auto-heal retry + wiring guardian | Fork sync | | 11 | Mar 05 | Model misidentified person from a headline | Added "always click through" rule | Self-evolution | | 12 | Mar 07 | Wind-Down wrote to the wrong day's log | Added a temporal-awareness step | Wind-Down | | 13 | Mar 08 | Agent didn't recognize a family member | Added mandatory daily-log reading to boot | All sessions | | 14 | Mar 10 | Merge abort on a single conflict too aggressive | Intelligent resolution with safe defaults | Fork sync |
v5.0 · 4.2 Prompt Mutations Observed**Qualitative observation:** Mutations 1--6 are mostly _reactive_ -- they fix specific failures. Mutations 7--14 are more _structural_ -- they address failure _classes_, encode _principles_ rather than isolated rules, and modify _shared infrastructure_ rather than single prompts.
removed in v6.0
not in v5.0
v6.0 · 4.2 Prompt Mutations Observed**A mutation taxonomy.** Sorting the 14 mutations by intent lets others prioritize which kinds to automate first:
not in v5.0
v6.0 · 4.2 Prompt Mutations Observed| Category | Mutations | Count | What it changes | | -------- | --------- | ----- | --------------- | | Safety / guardrail | #2, #7, #8, #9 | 4 | Prevents harmful or out-of-mandate actions | | Completeness | #1, #4, #12, #13 | 4 | Stops the agent acting on partial context | | Resource / efficiency | #3, #6 | 2 | Caps cost, size, and unreadable output | | Resilience / recovery | #5, #10, #14 | 3 | Self-heals after an external or build failure | | Verification | #11 | 1 | Forces a check before asserting a fact |
not in v5.0
v6.0 · 4.2 Prompt Mutations ObservedTwo patterns stand out. First, safety and completeness dominate early failures (mutations 1--9), while resilience and proportional-constraint refinements appear later (10--14) -- the system first stops doing harmful things, then learns to keep doing useful ones safely. Second, the categories map cleanly onto the autonomy gates in Section 6: safety mutations are the ones that most need human review, while efficiency mutations are the safest to auto-apply.
··· 2 unchanged paragraphs folded ···
v5.0 · 4.3 Error Class Tracking| Error Class | Definition | Weeks 1--2 | Weeks 3--4 | Status | | ---------------------------- | ----------------------------------------------------- | ---------- | ---------- | ------------------------------------------ | | Wrong chat/recipient | Message delivered to unintended target | 3 | 0 | No recurrence after mutation #2 | | File size explosion | Output exceeding readability/budget limits | 2 | 0 | No recurrence after mutation #3 | | Missing context at boot | Agent unaware of information in available files | 4 | 0 | No recurrence after mutations #4, #13 | | Unsafe cron actions | Cron performing operations outside its mandate | 2 | 0 | No recurrence after mutations #8, #9 | | Ambiguous request mishandled | Agent acting on ambiguous input without clarification | 3 | 1 | Declining; 1 residual instance | | Over-broad safety rules | Safety constraints preventing legitimate operations | 0 | 2 | New class, discovered via fractal analysis |
v6.0 · 4.3 Error Class Tracking| Error Class | Definition | Wks 1--2 | Wks 3--4 | Status | | ----------- | ---------- | :------: | :------: | ------ | | Wrong chat / recipient | Message delivered to unintended target | 3 | 0 | No recurrence after mutation #2 | | File size explosion | Output exceeding readability / budget limits | 2 | 0 | No recurrence after mutation #3 | | Missing context at boot | Agent unaware of available information | 4 | 0 | No recurrence after mutations #4, #13 | | Unsafe cron actions | Cron acting outside its mandate | 2 | 0 | No recurrence after mutations #8, #9 | | Ambiguous request mishandled | Acting on ambiguous input without clarifying | 3 | 1 | Declining; 1 residual instance | | Over-broad safety rules | Safety constraints blocking legitimate work | 0 | 2 | New class, found via fractal analysis |
v5.0 · 4.3 Error Class Tracking**Total tracked incidents:** 14 (weeks 1--2) to 3 (weeks 3--4), a 79% reduction. The emergence of "over-broad safety rules" as a _new_ error class in weeks 3--4 is especially notable. The error surface shifted from execution failures to policy failures. That pattern is consistent with a maturing system: once first-order mistakes are reduced, second-order distortions become easier to see.
v6.0 · 4.3 Error Class Tracking**Total tracked incidents:** 14 (weeks 1--2) to 3 (weeks 3--4), a 79% reduction. Mistakes here don't just get patched; whole classes get eliminated -- like a spelling error that autocorrect learns once and never surfaces again. The emergence of "over-broad safety rules" as a *new* class in weeks 3--4 is especially notable. The error surface shifted from execution failures to policy failures. That is consistent with a maturing system: once first-order mistakes drop, second-order distortions become easier to see.
v5.0 · 4.3 Error Class Tracking**Caveat:** We cannot cleanly distinguish between "errors eliminated by prompt mutation" and "errors eliminated by operator learning" (Oscar stopped triggering certain edge cases as he learned the system). The confound is real and uncontrolled.
v6.0 · 4.3 Error Class Tracking**Caveat:** we cannot cleanly separate "errors eliminated by prompt mutation" from "errors eliminated by operator learning" (the operator stopped triggering certain edge cases as he learned the system). The confound is real and uncontrolled.
··· 1 unchanged paragraph folded ···
v5.0 · 4.4 Token Economics| Component | Tokens/night | Cost/night (est.) | | ---------------------- | ------------ | ----------------- | | Wind-Down | ~15K | $0.45 | | Consolidation | ~20K | $0.60 | | Cleaning Lady | ~8K | $0.12 | | Total nightly overhead | ~43K | $1.17 |
v6.0 · 4.4 Token Economics| Component | Tokens / night | Cost / night (est.) | | --------- | :------------: | :-----------------: | | Wind-Down | ~15K | $0.45 | | Consolidation | ~20K | $0.60 | | Cleaning | ~8K | $0.12 | | Total nightly overhead | ~43K | $1.17 |
v5.0 · 4.4 Token EconomicsOver 30 days, total reflection cost: approximately $35. We estimate 8 human-intervention incidents were avoided (based on error-class extinction -- incidents that would otherwise have required Oscar to debug and fix manually). Valuing operator time at $25/hr with an average 30-minute resolution yields approximately $200 saved.
v6.0 · 4.4 Token EconomicsOver 30 days, total reflection cost was about $35. We estimate 8 human-intervention incidents were avoided (based on error-class extinction -- incidents that would otherwise have required the operator to debug and fix manually). Valuing operator time at $25/hr with a 30-minute average resolution yields about $200 saved.
v5.0 · 4.4 Token Economics**Sensitivity analysis:** If operator time is valued at $15/hr (low estimate), ROI is 3.4x. At $50/hr (high estimate), ROI is 11.4x. If only 4 incidents were truly avoided (conservative), ROI at $25/hr is still 2.9x. Under every reasonable assumption, the reflection loop remains cost-positive, though the estimates are approximate.
v6.0 · 4.4 Token Economics**Sensitivity analysis:** at $15/hr (low) ROI is 3.4x; at $50/hr (high) it is 11.4x. If only 4 incidents were truly avoided (conservative), ROI at $25/hr is still 2.9x. Under every reasonable assumption the reflection loop is cost-positive, though the estimates are approximate.
··· 3 unchanged paragraphs folded ···
v5.0 · 5.1 Why Fractal?The term "fractal" refers here to **self-similar cognitive patterns applied at different scales of abstraction.** The same reflective sequence -- _what happened, why, what principle, what meta-principle_ -- recurs at every level of task analysis.
v6.0 · 5.1 Why Fractal?"Fractal" here means **self-similar cognitive patterns applied at different scales of abstraction.** The same reflective sequence -- *what happened, why, what principle, what meta-principle* -- recurs at every level of task analysis.
v5.0 · 5.1 Why Fractal?The key insight is that **the same reasoning pattern that improves a specific task can also improve the category of tasks, the method used to improve categories, and eventually the method used to improve methods.** Each level operates on a smaller and more abstract domain than the one below it.
v6.0 · 5.1 Why Fractal?The key insight: **the same reasoning that improves a specific task can also improve the category of tasks, the method used to improve categories, and eventually the method used to improve methods.** Each level operates on a smaller, more abstract domain than the one below.
··· 1 unchanged paragraph folded ···
v5.0 · 5.2 Convergence Intuition (Not a Proof)Consider a system with error classes at multiple scales:
v6.0 · 5.2 Convergence Intuition (Not a Proof)Consider error classes at multiple scales:
v5.0 · 5.2 Convergence Intuition (Not a Proof)- **Level 0** (execution): Fix the specific bug. Eliminates one instance of one error class. - **Level 1** (pattern): Encode a rule preventing the error class. Eliminates all instances of one error class. - **Level 2** (methodology): Improve how rules are encoded. Reduces the rate at which new error classes arise from over-correction or under-correction. - **Level 3** (meta-methodology): Improve how improvement works. Reduces the overhead of the reflection process itself.
v6.0 · 5.2 Convergence Intuition (Not a Proof)- **Level 0** (execution): fix the specific bug. Eliminates one instance of one class. - **Level 1** (pattern): encode a rule preventing the class. Eliminates all instances of one class. - **Level 2** (methodology): improve how rules are encoded. Reduces the rate at which new classes arise from over- or under-correction. - **Level 3** (meta-methodology): improve how improvement works. Reduces the overhead of reflection itself.
v5.0 · 5.2 Convergence Intuition (Not a Proof)Each level operates on a smaller domain (instances > classes > methodology > meta-methodology). We _hypothesize_ that this produces convergent behavior: the frequency and magnitude of changes should decrease at each higher level. Our 30-day observations are consistent with that pattern (daily Level 0--1, weekly Level 2, monthly Level 3), but 30 days is not enough to establish convergence. The hypothesis is falsifiable: if Level 2+ mutation frequency does not decrease over time, the convergence claim fails.
v6.0 · 5.2 Convergence Intuition (Not a Proof)Each level operates on a smaller domain (instances > classes > methodology > meta-methodology). We *hypothesize* this produces convergent behavior: the frequency and magnitude of changes should fall at each higher level. Our 30-day observations fit that pattern (daily Level 0--1, weekly Level 2, monthly Level 3), but 30 days is not enough to establish convergence. The hypothesis is falsifiable: if Level 2+ mutation frequency does not fall over time, the convergence claim fails.
··· 1 unchanged paragraph folded ···
v5.0 · 5.3 The Depth Selector as a Learned PolicyThe decision of how deeply to reflect is itself a learnable policy. Initially, the agent has little calibration. Over time, the depth selector improves through its own mistakes:
v6.0 · 5.3 The Depth Selector as a Learned PolicyHow deeply to reflect is itself a learnable policy. Initially the agent has little calibration. Over time the depth selector improves through its own mistakes:
v5.0 · 5.3 The Depth Selector as a Learned Policy- _Reflected too shallowly_ on a merge strategy --> missed the over-correction pattern --> added depth for "encoding new rules" - _Reflected too deeply_ on a routine file operation --> wasted 2 minutes of compute --> reduced depth for "routine/mechanical"
v6.0 · 5.3 The Depth Selector as a Learned Policy- *Reflected too shallowly* on a merge strategy --> missed the over-correction pattern --> added depth for "encoding new rules" - *Reflected too deeply* on a routine file operation --> wasted compute --> reduced depth for "routine / mechanical"
v5.0 · 5.3 The Depth Selector as a Learned PolicyWe observe this self-calibration emerging naturally over the 30-day period, but we lack quantitative metrics for "reflection depth appropriateness." A future instrumentation layer that tracks tokens-spent-on-reflection versus value-of-insight-produced would enable a more rigorous evaluation.
v6.0 · 5.3 The Depth Selector as a Learned PolicyWe observe this self-calibration emerging over the 30-day period, but we lack quantitative metrics for "reflection-depth appropriateness." An instrumentation layer tracking tokens-spent-on-reflection versus value-of-insight-produced would enable a more rigorous evaluation.
··· 1 unchanged paragraph folded ···
v5.0 · 6. Design Principles for Sleep Consolidation Systems## 6. Design Principles for Sleep Consolidation Systems
removed in v6.0
v5.0 · 6. Design Principles for Sleep Consolidation SystemsBased on our production experience, we propose seven design principles:
removed in v6.0
not in v5.0
v6.0 · 6. From Declarative to Procedural: Evolving Recipes, Strategies, and Skills## 6. From Declarative to Procedural: Evolving Recipes, Strategies, and Skills
not in v5.0
v6.0 · 6. From Declarative to Procedural: Evolving Recipes, Strategies, and SkillsSections 3--5 describe consolidation of *declarative* memory -- rules and facts. The same nightly loop has since been extended to *procedural* memory: the agent's own recipes, the strategies it switches between, and the reusable skills it distills. This is the cerebellum half of the analogy made literal -- offline practice refining the *procedures* themselves, not just the rules about them. All three extensions share one shape: **observe the day's episodes, distil a durable ranked artifact, feed it back into tomorrow's behavior.** Each is an opt-in step in the consolidation pipeline, off by default, so the loop's baseline behavior is unchanged when the extension is absent.
not in v5.0
v6.0 · 6. From Declarative to Procedural: Evolving Recipes, Strategies, and SkillsA load-bearing design boundary keeps this honest. Recipe *execution* lives in a separate subsystem; consolidation does not own it and must not duplicate it. The contribution here is strictly the *offline learning loop*: read episode outcomes, compute fitness, propose mutations, and write a ranked archive that the execution-time selector consumes. Recipes are owned by the execution subsystem; their *measured fitness* is owned by consolidation. Any write back into the execution subsystem's recipe directory is a *proposal* gated by human review (Section 7.1), never a silent overwrite.
not in v5.0
v6.0 · 6.1 Recipe Evolution: Empirical Fitness and a Never-Delete Archive### 6.1 Recipe Evolution: Empirical Fitness and a Never-Delete Archive
not in v5.0
v6.0 · 6.1 Recipe Evolution: Empirical Fitness and a Never-Delete ArchiveA recipe is a procedure the agent runs to accomplish a recurring task. Recipes have historically been hand-written and static; nothing measured whether one was better than another, and nothing recorded how a recipe reached its current form. The recipe-evolution step adds a selection loop over the recipe population. Each night it attributes every completed episode to the recipe it used, scores that recipe's *empirical fitness* (success rate, latency, token cost), proposes mutations (add, remove, or reorder a step; tighten or loosen success criteria), keeps a never-delete archive of versioned variants, and ranks variants so the selector can prefer winners. It is the cerebellum turning a fumbled piano piece into a fluent one over successive nights.
not in v5.0
v6.0 · 6.1 Recipe Evolution: Empirical Fitness and a Never-Delete ArchiveFitness is computed from episode outcomes -- a `completed` episode counts as a success, an `abandoned` one as a failure -- with the success rate Laplace-smoothed so that one success out of one run is not reported as a perfect 1.0. Latency is the episode's end-minus-start time; token cost sums the events in the episode. The hard part is *attribution*: tying an episode to the recipe that ran it. Without a reliable recipe tag on each episode, fitness is computed against the wrong recipe and the loop learns garbage. The implementation only attributes when an explicit `recipe:<slug>` tag is present and returns no attribution otherwise, refusing to guess.
not in v5.0
v6.0 · 6.1 Recipe Evolution: Empirical Fitness and a Never-Delete ArchiveProposals are gated, not applied. They are written to a daily manifest for review. A narrow auto-promotion path exists for the safest case -- a *corrective* proposal (driven by a success rate far below the floor, not merely under it) that is well-evidenced (at least 8 runs, above the 3-run minimum needed merely to propose) and reversible (the never-delete archive keeps every prior variant). Efficiency proposals, such as those driven by latency regression, are never auto-promoted. This is autonomy-first but bounded, and it maps directly onto the mutation taxonomy of Section 4.2: efficiency-class changes are the only ones the system trusts itself to apply unsupervised, and even those are logged and reversible.
not in v5.0
v6.0 · 6.1 Recipe Evolution: Empirical Fitness and a Never-Delete Archive``` interface RecipeFitness { recipeId; version; runs; successes; successRate; // Laplace-smoothed for low n avgLatencyMs; avgTokenCost; lastUpdated; } interface MutationProposal { recipeId; baseVersion; op; // add_step | remove_step | reorder | tighten | loosen payload; rationale; expectedDelta; needsHumanReview; // false only for corrective + well-evidenced + reversible } // nightly step (opt-in) for each completed episode: rid = attributeRecipe(episode) // null unless a recipe:<slug> tag is present if rid is null: continue fit = updateRecipeFitness(archive.latest(rid), episode) archive.putVariant(rid, fit.version, currentBody(rid), fit) proposals += proposeMutations(fit, archive.history(rid)) writeManifest(proposals) // gated; auto-promote only the safe subset ```
not in v5.0
v6.0 · 6.2 Failure-Count Strategy Switch### 6.2 Failure-Count Strategy Switch
not in v5.0
v6.0 · 6.2 Failure-Count Strategy SwitchA single failure triggers a prompt mutation, but the early system had no memory of *how many times in a row* a given strategy had failed, and no rule that said "this approach keeps failing -- switch to a different one." The strategy-switch step adds a per-strategy state machine that counts consecutive failures and fires a switch after a threshold is crossed within a recency window. This is the restaurant that, after the risotto comes back three nights running, stops tweaking the recipe and takes it off the menu.
not in v5.0
v6.0 · 6.2 Failure-Count Strategy SwitchThe canonical case is the B010 cascade from Section 3.3. Three consecutive failures of an always-merge fork-sync strategy should trip a switch to an ask-before-merge strategy -- not a fourth identical patch. The implementation makes this concrete: the default threshold is **3 consecutive failures**, the recency window is **24 hours** (failures spread beyond it do not count as a pattern), and a switch is flagged for human review unless confidence clears **0.8** and a registered fallback strategy exists. Confidence rises with the overshoot past the threshold, so a strategy that has failed five times running is trusted more than one that has just reached three.
not in v5.0
v6.0 · 6.2 Failure-Count Strategy SwitchTwo failure modes shaped the design. First, episode-boundary false positives: a long failing task can be split by the time-gap detector into several `abandoned` episodes, over-counting consecutive failures and tripping a premature switch -- so failures within the same task are de-duplicated. Second, idempotency: if the consolidation cursor goes stale and events are reprocessed, failures would double-count, so records are keyed by event id. A successful episode resets the counter to zero and, if a switch was just made, stamps the time-to-recovery -- which makes a switch that *didn't* help visible rather than silently sticky.
not in v5.0
v6.0 · 6.2 Failure-Count Strategy Switch``` interface SwitchDecision { shouldSwitch; fromStrategy; toStrategy; // toStrategy null -> no fallback -> human confidence; needsHumanReview; rationale; } // decideSwitch: // IF consecutiveErrors >= threshold (default 3) // AND (now - lastFailure) < windowMs (default 24h) // THEN switch to fallback if registered, else flag for human; // needsHumanReview = confidence < 0.8 OR no fallback // ELSE no switch ```
not in v5.0
v6.0 · 6.2 Failure-Count Strategy SwitchThe open contract decision -- whether the fallback map is hand-authored per strategy or learned from which alternatives historically scored higher fitness (which would couple this step to the recipe archive of 6.1) -- is deliberately left to a human. So is whether `abandoned` is a sufficient failure signal, since an episode can be abandoned because the *user* walked away, not because the strategy failed.
not in v5.0
v6.0 · 6.3 A Skill Library, Voyager-Style### 6.3 A Skill Library, Voyager-Style
not in v5.0
v6.0 · 6.3 A Skill Library, Voyager-StyleVoyager's idea: as an agent solves tasks, distil the successful behavior into a named, reusable skill, store it in a growing library, rank skills by success, and retrieve and compose them on future tasks so competence compounds instead of being re-derived. The skill-extraction step applies this to a general assistant workload. From each *completed*, tool-using episode with a clear decision, it synthesizes a skill -- name, description, prerequisites, steps, test cases, success metrics -- stores it versioned in a never-delete library, ranks by empirical success rate, and exposes it to retrieval so a recurring situation can carry "this previously used skill X with Y% success." It is the cross-cron transfer of Section 3.3 turned from an emergent side effect into a first-class, addressable artifact.
not in v5.0
v6.0 · 6.3 A Skill Library, Voyager-StyleThree guards keep the library from rotting. A strict skill-worthiness gate -- completed plus a tool call plus a key decision -- refuses to learn skills from trivial chat or abandoned attempts, so the library does not fill with non-general entries. A Jaccard-similarity dedup at **0.8** over the skill body merges near-identical skills rather than spawning duplicates; when a same-named skill recurs it becomes a new version, and the source-episode ids are merged. And success metrics decay on recent failure so a skill encoding an obsolete procedure stops ranking on past glory and becomes reachable for deprecation. Deprecation marks but never deletes -- the body is still readable, preserving the never-delete invariant the rest of the system relies on.
not in v5.0
v6.0 · 6.3 A Skill Library, Voyager-StyleThe retrieval edit is intentionally minimal and flag-guarded: with the skill rider off (the default) retrieval output is byte-identical to before; with it on, retrieved context gains a "relevant skills" rider. The honest open question is whether extracted skills are *executable code* (true Voyager) or *structured procedures* consumed by the recipe runner. In this deployment recipes are already markdown procedures, so "skill-as-code" most naturally means "skill-as-recipe" -- which raises the question of whether this extension eventually collapses into the recipe archive of 6.1 or stays a distinct library. That is a human design call, not one the system should make for itself.
not in v5.0
v6.0 · 6.4 One Gate for Three Mutation Sources -- and a Consolidation Output the Thesis Demanded### 6.4 One Gate for Three Mutation Sources -- and a Consolidation Output the Thesis Demanded
not in v5.0
v6.0 · 6.4 One Gate for Three Mutation Sources -- and a Consolidation Output the Thesis DemandedAll three extensions add new mutation or selection targets, and on a busy night they can fire for the same task at once: "mutate recipe X," "switch strategy," "use skill Y." Three ad-hoc gates would be three audit surfaces and three chances to thrash. The design calls for **one** arbitration point that collects the night's proposals, de-duplicates conflicting targets for the same task, applies a fixed precedence (a strategy switch outranks a skill suggestion, which outranks a recipe mutation, because a switch can invalidate the recipe a mutation was tuning), and writes a single reconciled manifest for review. This keeps the human-in-the-loop principle (Section 7.1) intact behind one surface.
not in v5.0
v6.0 · 6.4 One Gate for Three Mutation Sources -- and a Consolidation Output the Thesis DemandedThese procedural extensions also exposed a gap in the *declarative* loop that the paper's own thesis predicted. The thesis says consolidation must organize memory by purpose, not chronology. The early implementation did this for lessons, preferences, and contacts -- but not for *concept-to-document routing*. On April 1, a memory search returned the wrong documents because no concept index existed to route a topic to the files that discuss it. The system meant to prevent retrieval failure through organization had failed to organize the retrieval-critical artifact. The fix is a consolidation output (shown in Algorithm 1, Phase 2): for each knowledge file modified that day, extract retrieval keywords -- including the synonyms a human would actually search for -- and write a concept index mapping keywords to file paths. New or substantially changed knowledge files are also seeded with retrieval keywords so the keyword channel has material to match even when the document's natural language does not contain the search terms. We record the April 1 incident as the consolidation system's own failure case, which is exactly the kind of negative result Section 7 argues should be reported rather than hidden.
not in v5.0
v6.0 · 6.4 One Gate for Three Mutation Sources -- and a Consolidation Output the Thesis Demanded---
not in v5.0
v6.0 · 7. Design Principles for Sleep Consolidation Systems## 7. Design Principles for Sleep Consolidation Systems
not in v5.0
v6.0 · 7. Design Principles for Sleep Consolidation SystemsFrom production experience, we propose seven design principles.
··· 1 unchanged paragraph folded ···
v5.0 · Principle 1: Separate Fast and Slow LearningOperational sessions handle tasks (fast). Nightly crons handle reflection (slow). Never mix reflection into task execution -- it degrades task performance and produces lower-quality reflection. This mirrors Kahneman's System 1 / System 2 distinction (Kahneman, 2011) and the biological separation of online performance from offline consolidation.
v6.0 · Principle 1: Separate Fast and Slow LearningOperational sessions handle tasks (fast). Nightly crons handle reflection (slow). Never mix reflection into task execution -- it degrades task performance and produces worse reflection. This mirrors Kahneman's System 1 / System 2 distinction (Kahneman, 2011) and the biological separation of online performance from offline consolidation.
··· 1 unchanged paragraph folded ···
v5.0 · Principle 2: Encode at the Right Abstraction LevelA lesson about "always check both calendars" is Level 0. "When a system has multiple data sources, query all of them" is Level 1. "Verify completeness assumptions before acting" is Level 2. Encode at the highest level that remains _actionable_ -- too abstract and it becomes empty, too specific and it fails to transfer.
v6.0 · Principle 2: Encode at the Right Abstraction Level"Always check both calendars" is Level 0. "When a system has multiple data sources, query all of them" is Level 1. "Verify completeness assumptions before acting" is Level 2. Encode at the highest level that stays *actionable* -- too abstract and it becomes empty, too specific and it fails to transfer.
··· 1 unchanged paragraph folded ···
v5.0 · Principle 3: Shared Memory > Private MemoryLessons stored in a single cron's prompt help only that cron. Lessons stored in shared operational files help every session. Default to shared storage. Use private storage only for domain-specific knowledge that would confuse other tasks.
v6.0 · Principle 3: Shared Memory > Private MemoryLessons stored in a single cron's prompt help only that cron. Lessons stored in shared operational files help every session. Default to shared storage; use private storage only for domain knowledge that would confuse other tasks.
··· 1 unchanged paragraph folded ···
v5.0 · Principle 4: Proportional ConstraintsWhen encoding safety lessons from failures, the restriction should be proportional to the risk. "Never edit source code" is disproportionate to "a cron edited the wrong file once." "Understand intent before editing, verify after editing, revert if broken" is proportional and preserves capability. This is the central lesson of the B010 --> mutation #14 cascade.
v6.0 · Principle 4: Proportional ConstraintsWhen encoding a safety lesson from a failure, the restriction should match the risk. "Never edit source code" is disproportionate to "a cron edited the wrong file once." "Understand intent before editing, verify after, revert if broken" is proportional and preserves capability. This is the central lesson of the B010 --> mutation #14 cascade, and it is now enforced mechanically by the strategy-switch step (6.2): a repeated failure switches the strategy rather than piling on another blanket prohibition.
··· 3 unchanged paragraphs folded ···
v5.0 · Principle 6: The Budget FuseEvery reflection loop must have a token budget and a wall-clock timeout. Without it, a sufficiently thorough reflection agent will consume unlimited resources chasing diminishing returns. In practice, we cap Wind-Down at 1800 seconds and Consolidation at 1200 seconds.
removed in v6.0
not in v5.0
v6.0 · Principle 6: The Budget FuseEvery reflection loop must have a token budget and a wall-clock timeout. Without one, a sufficiently thorough reflection agent will chase diminishing returns indefinitely. The procedural extensions of Section 6 inherit this discipline: proposals require a minimum number of runs before firing, and the skill library carries the same size-budget and dedup pressure the operational-lessons file already does.
··· 1 unchanged paragraph folded ···
v5.0 · Principle 7: Human-in-the-Loop for Level 2+ ChangesLevel 0--1 mutations (specific fixes and pattern-level rules) can be autonomous. Level 2+ mutations (methodology changes, core principle modifications) must be flagged for human review. **Concrete gate:** any mutation that modifies MEMORY.md (core principles, injected into all sessions) or changes the depth selector itself requires human approval before taking effect. Mutations to individual cron prompts or `operational-lessons.md` can be auto-applied but are logged with full diffs for audit.
v6.0 · Principle 7: Human-in-the-Loop for Level 2+ ChangesLevel 0--1 mutations (specific fixes and pattern rules) can be autonomous. Level 2+ mutations (methodology changes, core-principle edits) must be flagged for review. **Concrete gate:** any mutation that modifies the core-principles file (injected into all sessions) or changes the depth selector itself requires human approval before taking effect. Mutations to individual cron prompts or the operational-lessons file can be auto-applied but are logged with full diffs for audit. The procedural extensions follow the same rule: recipe mutations, strategy switches, and skills are gated by default, with a narrow auto-promotion path only for corrective, well-evidenced, reversible changes (Section 6.1).
v5.0 · Principle 7: Human-in-the-Loop for Level 2+ Changes**Rollback mechanism:** All mutations are git-committed with descriptive messages. Any mutation can be reverted with `git revert`. The Wind-Down cron logs a "mutation manifest" per night listing all changes, enabling batch review.
v6.0 · Principle 7: Human-in-the-Loop for Level 2+ Changes**Rollback mechanism:** all mutations are git-committed with descriptive messages and can be reverted. Each night logs a "mutation manifest" listing all changes, enabling batch review; the procedural extensions write to the same manifest so there is a single audit surface.
··· 1 unchanged paragraph folded ···
v5.0 · 8. Limitations and Failure Modes## 7. Limitations and Failure Modes
v6.0 · 8. Limitations and Failure Modes## 8. Limitations and Failure Modes
v5.0 · 8.1 The Self-Reinforcing Error Spiral### 7.1 The Self-Reinforcing Error Spiral
v6.0 · 8.1 The Self-Reinforcing Error Spiral### 8.1 The Self-Reinforcing Error Spiral
v5.0 · 8.1 The Self-Reinforcing Error SpiralIf a reflection loop encodes the wrong lesson, that lesson influences future behavior, generating data that appears to confirm it. This is the AI analogue of confirmation bias.
v6.0 · 8.1 The Self-Reinforcing Error SpiralIf a reflection loop encodes the wrong lesson, that lesson shapes future behavior, generating data that appears to confirm it -- the AI analogue of confirmation bias. The risk grows with the procedural extensions of Section 6: a bad recipe mutation or an over-eager strategy switch could generate episodes that look like vindication.
··· 1 unchanged paragraph folded ···
v5.0 · 7.1 The Self-Reinforcing Error Spiral- Human review for Level 2+ changes (Principle 7) - Git-versioned mutation log enabling revert - Wind-Down mutation manifest for daily batch review
removed in v6.0
not in v5.0
v6.0 · 8.1 The Self-Reinforcing Error Spiral- Human review for Level 2+ changes (Principle 7), extended to recipe mutations, strategy switches, and skills by default. - Git-versioned mutation log and a never-delete archive enabling revert at any point. - A nightly mutation manifest -- one surface -- for batch review. - Minimum-run thresholds before any procedural proposal fires, so low-n noise cannot trigger a change.
v5.0 · 8.1 The Self-Reinforcing Error Spiral**Mitigations (proposed but not yet implemented):**
v6.0 · 8.1 The Self-Reinforcing Error Spiral**Mitigations (proposed, not yet implemented):**
v5.0 · 8.1 The Self-Reinforcing Error Spiral- Automated regression checklist: after each mutation, re-run a set of known-good scenarios to detect degradation - "Canary mode": new mutations are applied tentatively for 48 hours, then auto-reverted if error rates increase - Signed mutation provenance: each mutation records the triggering incident, the model that generated it, and the confidence level
v6.0 · 8.1 The Self-Reinforcing Error Spiral- Automated regression checklist: after each mutation, re-run known-good scenarios to detect degradation. - "Canary mode": apply new mutations tentatively for 48 hours, then auto-revert if error rates rise. - Signed mutation provenance recording the triggering incident, the model that generated the mutation, and a confidence level.
v5.0 · 8.2 Context Window Pressure### 7.2 Context Window Pressure
v6.0 · 8.2 Context Window Pressure### 8.2 Context Window Pressure
v5.0 · 8.2 Context Window PressureEvery encoded lesson consumes context-window space. As the operational lessons file grows, it competes with task-relevant context. The Cleaning Lady cron enforces size budgets (currently 50KB for `operational-lessons.md`) and archives stale content. This creates a second-order problem: archived lessons may be unavailable when they become relevant again. The Fractal Memory Index (Serra & JarvisOne, 2026a) mitigates this through semantic retrieval of archived content.
v6.0 · 8.2 Context Window PressureEvery encoded lesson consumes context-window space. As the operational-lessons file grows, it competes with task-relevant context. The cleaning pass enforces size budgets (currently 50KB) and archives stale content, which creates a second-order problem: archived lessons may be unavailable when they become relevant again. Semantic retrieval of archived content mitigates this. The skill library of Section 6.3 raises the same bloat risk and inherits the same budget and dedup discipline.
v5.0 · 8.3 Model Dependency### 7.3 Model Dependency
v6.0 · 8.3 Model Dependency### 8.3 Model Dependency
v5.0 · 8.3 Model DependencyReflection quality depends on the model's reasoning capability. We use the strongest available model (Opus) for nightly reflection and cheaper models (Sonnet, Haiku) for daytime execution. This creates a cost asymmetry: the "learning" is only as good as the reflection model. A weaker reflection model would produce lower-quality mutations, potentially encoding bad lessons and amplifying the risk described in Section 7.1.
v6.0 · 8.3 Model DependencyReflection quality depends on the model's reasoning capability. We use the strongest available model for nightly reflection and cheaper models for daytime execution, which creates a cost asymmetry: the "learning" is only as good as the reflection model. A weaker reflection model would produce lower-quality mutations, potentially encoding bad lessons and amplifying the spiral of Section 8.1. The skill-extraction step adds a related risk -- the same episode extracted twice with different wording can slip past string-level dedup -- which is why semantic dedup, not just Jaccard, is the intended longer-term guard.
v5.0 · 8.4 Single-Operator Bias### 7.4 Single-Operator Bias
v6.0 · 8.4 Single-Operator Bias### 8.4 Single-Operator Bias
v5.0 · 8.4 Single-Operator BiasOur data comes from one operator with specific workflows, preferences, and failure patterns. Whether Sleep Consolidation generalizes to multi-user systems, other cultural contexts, or domains beyond personal assistant tasks remains an open question. We hypothesize that the _mechanisms_ generalize (failure-driven mutation, cross-task transfer, depth calibration) even if the specific _lessons_ do not.
v6.0 · 8.4 Single-Operator BiasOur data comes from one operator with specific workflows, preferences, and failure patterns. Whether Sleep Consolidation generalizes to multi-user systems, other cultural contexts, or domains beyond personal-assistant tasks is an open question. We hypothesize that the *mechanisms* generalize (failure-driven mutation, cross-task transfer, depth calibration, recipe and skill evolution) even if the specific *lessons* do not.
v5.0 · 8.5 No True Generalization### 7.5 No True Generalization
v6.0 · 8.5 No True Generalization### 8.5 No True Generalization
v5.0 · 8.5 No True GeneralizationThe fundamental limitation is that prompt-mediated learning produces _declarative_ improvements (better rules, better context), not _procedural_ improvements (better underlying reasoning). The model's reasoning capability does not itself improve. A sufficiently novel failure class will not be prevented by any amount of prompt refinement.
v6.0 · 8.5 No True GeneralizationThe fundamental limit is that prompt-mediated learning produces *declarative* improvements (better rules, better context), not *procedural* improvements in the model's own reasoning. The recipe and skill extensions of Section 6 push further into procedural territory than rules alone, but they still encode procedures *as artifacts the unchanged model reads*, not as better reasoning inside the model. The model's reasoning capability does not itself improve. A sufficiently novel failure class will not be prevented by any amount of prompt or recipe refinement.
··· 2 unchanged paragraphs folded ···
v5.0 · 9. Future Work## 8. Future Work
v6.0 · 9. Future Work## 9. Future Work
v5.0 · 9.1 Controlled Ablation Study### 8.1 Controlled Ablation Study
v6.0 · 9.1 Controlled Ablation Study### 9.1 Controlled Ablation Study
v5.0 · 9.1 Controlled Ablation StudyThe highest-priority follow-up is straightforward: run two identical deployments (with and without nightly reflection) for 4+ weeks, measuring error recurrence rate, intervention frequency, and blind-rated task quality. This would directly address the confounds outlined in Section 4.1 and move the evidence from observational to experimental.
v6.0 · 9.1 Controlled Ablation StudyThe highest-priority follow-up is straightforward: run two identical deployments (with and without nightly reflection) for 4+ weeks, measuring error-recurrence rate, intervention frequency, and blind-rated task quality. This directly addresses the confounds of Section 4.1 and moves the evidence from observational to experimental. A second ablation should isolate each Section 6 extension, since they were added incrementally and their individual contribution to error reduction is not yet separated from the declarative loop's.
not in v5.0
v6.0 · 9.2 Multi-Phase Sleep Cycles### 9.2 Multi-Phase Sleep Cycles
not in v5.0
v6.0 · 9.2 Multi-Phase Sleep CyclesThe current loop is a single nightly pass. A multi-phase split would mirror biological sleep more closely: a *light* phase every few hours for quick episode detection and index updates, a *deep* phase nightly for full consolidation and skill extraction, and a *REM* phase weekly for cross-episode pattern detection and higher-order skill clustering. The weekly phase is the natural home for composing several episodes into one higher-order skill rather than extracting one skill per episode.
v5.0 · 9.3 Multi-Agent Prompt Ecosystems### 8.2 Multi-Agent Prompt Ecosystems
v6.0 · 9.3 Multi-Agent Prompt Ecosystems### 9.3 Multi-Agent Prompt Ecosystems
v5.0 · 9.3 Multi-Agent Prompt EcosystemsIf multiple agents share a memory layer, do lessons from one agent's failures benefit others? Preliminary evidence from cross-agent collaboration suggests yes, but systematic study is still needed.
v6.0 · 9.3 Multi-Agent Prompt EcosystemsIf multiple agents share a memory layer, do lessons from one agent's failures benefit others? Preliminary evidence from cross-agent collaboration suggests yes, but systematic study is needed.
v5.0 · 8.3 Automatic Depth Calibration### 8.3 Automatic Depth Calibration
removed in v6.0
not in v5.0
v6.0 · 9.4 Automatic Depth Calibration### 9.4 Automatic Depth Calibration
v5.0 · 9.4 Automatic Depth CalibrationThe fractal depth selector is currently prompt-encoded and manually refined. An instrumented version that tracks tokens-spent-on-reflection versus downstream-error-reduction would enable quantitative optimization of reflection effort.
v6.0 · 9.4 Automatic Depth CalibrationThe fractal depth selector is currently prompt-encoded and manually refined. An instrumented version tracking tokens-spent-on-reflection versus downstream-error-reduction would enable quantitative optimization of reflection effort.
v5.0 · 9.5 Bridging to Fine-Tuning### 8.4 Bridging to Fine-Tuning
v6.0 · 9.5 Bridging to Fine-Tuning### 9.5 Bridging to Fine-Tuning
v5.0 · 9.5 Bridging to Fine-TuningEncoded lessons are `(failure, context, correct_behavior)` tuples -- exactly the format needed for preference optimization. Sleep Consolidation could therefore serve as a _data generation pipeline_ for periodic LoRA updates, bridging Level 2 and Level 3 persistence.
v6.0 · 9.5 Bridging to Fine-TuningEncoded lessons are `(failure, context, correct_behavior)` tuples -- exactly the format preference optimization needs. The recipe-fitness archive of Section 6.1 adds graded outcome signals on top. Sleep Consolidation could therefore serve as a *data-generation pipeline* for periodic weight updates, bridging Level 2 and Level 3 persistence.
v5.0 · 8.5 Adversarial Robustness### 8.5 Adversarial Robustness
removed in v6.0
not in v5.0
v6.0 · 9.6 Adversarial Robustness### 9.6 Adversarial Robustness
v5.0 · 9.6 Adversarial RobustnessCan a crafted input trigger a harmful prompt mutation? Our current mitigation (human review for Level 2+) is manual. Automated detection of adversarial mutations -- perhaps through consistency checking against existing principles -- remains an open problem.
v6.0 · 9.6 Adversarial RobustnessCan a crafted input trigger a harmful prompt mutation, recipe change, or strategy switch? The current mitigation (human review for Level 2+ and for procedural proposals) is manual. Automated detection of adversarial mutations -- perhaps through consistency checking against existing principles -- is an open problem.
··· 1 unchanged paragraph folded ···
v5.0 · 9. Conclusion## 9. Conclusion
removed in v6.0
not in v5.0
v6.0 · 10. Conclusion## 10. Conclusion
v5.0 · 10. ConclusionWe have presented observational evidence that structured nightly prompt cycles can produce compounding behavioral improvement in stateless AI agents. Sleep Consolidation formalizes three mechanisms: failure-driven prompt mutation, fractal depth calibration, and cross-cron knowledge transfer.
v6.0 · 10. ConclusionWe have presented observational evidence that structured nightly prompt cycles can produce compounding behavioral improvement in stateless AI agents. Sleep Consolidation formalizes three declarative mechanisms -- failure-driven prompt mutation, fractal depth calibration, and cross-cron knowledge transfer -- and extends them into procedural memory through recipe evolution, strategy switching, and a skill library.
··· 1 unchanged paragraph folded ···
v5.0 · 10. ConclusionBut the deeper claim is about structure. Memory alone is not enough. **Unsorted memory is cheap to store and expensive to use.** The breakthrough is not accumulation; it is consolidation. Scattered memories are operationally useless until they are organized by purpose: rules for messaging, policies for ambiguity, lessons from failures, prompts revised by yesterday's mistakes. Once sorted by use-case rather than chronology, those memories stop being archives and start becoming policy.
v6.0 · 10. ConclusionThe deeper claim is about structure. Memory alone is not enough. **Unsorted memory is cheap to store and expensive to use.** The breakthrough is not accumulation; it is consolidation. Scattered memories are operationally useless until they are organized by purpose: rules for messaging, policies for ambiguity, lessons from failures, recipes ranked by what actually worked. Once sorted by use-case rather than chronology, those memories stop being archives and start becoming policy.
v5.0 · 10. ConclusionWe are careful to distinguish observation from proof. Our 30-day production data is consistent with the hypothesis but confounded by simultaneous changes in operator behavior, model assignment, and system configuration. Still, the mechanisms are formalized (Algorithm 1), the design principles are actionable, and the trend is hard to ignore: over 30 days, five of six tracked error classes reached zero recurrence, while total incidents dropped 79%.
v6.0 · 10. ConclusionWe are careful to distinguish observation from proof. Our 30-day production data is consistent with the hypothesis but confounded by simultaneous changes in operator behavior, model assignment, and system configuration. Still, the mechanisms are formalized (Algorithm 1), the design principles are actionable, the procedural extensions are implemented and tested, and the trend is hard to ignore: over 30 days, five of six tracked error classes reached zero recurrence while total incidents dropped 79%.
v5.0 · 10. ConclusionThis is not a replacement for fine-tuning or continual learning. It is a complement: an accessible, low-cost mechanism that any agent system with file persistence and scheduled execution can implement now. The prompts rewrite themselves. The memory layer gets cleaner. The agent makes fewer of yesterday's mistakes.
v6.0 · 10. ConclusionThis is not a replacement for fine-tuning or continual learning. It is a complement -- an accessible, low-cost mechanism any agent system with file persistence and scheduled execution can implement now. The prompts rewrite themselves. The recipes get ranked. The memory layer gets cleaner. The agent makes fewer of yesterday's mistakes.
v5.0 · 10. ConclusionSleep Consolidation does not make the model fundamentally smarter. It makes the system more organized, more adaptive, and more reliable. And in practice, that is often what intelligence looks like.
v6.0 · 10. ConclusionSleep Consolidation does not make the model fundamentally smarter. It makes the system more organized, more adaptive, and more reliable. In practice, that is often what intelligence looks like.
··· 2 unchanged paragraphs folded ···
v5.0 · ReferencesBai, Y., et al. (2022). Constitutional AI: Harmlessness from AI Feedback. _arXiv:2212.08073_.
v6.0 · ReferencesBai, Y., et al. (2022). Constitutional AI: Harmlessness from AI Feedback. *arXiv:2212.08073*.
v5.0 · ReferencesBeyer, B., Jones, C., Petoff, J., & Murphy, N. R. (2016). _Site Reliability Engineering._ O'Reilly Media.
v6.0 · ReferencesBeyer, B., Jones, C., Petoff, J., & Murphy, N. R. (2016). *Site Reliability Engineering.* O'Reilly Media.
v5.0 · ReferencesBuzsáki, G. (1996). The hippocampo-neocortical dialogue. _Cerebral Cortex_, 6(2), 81--92.
v6.0 · ReferencesBuzsáki, G. (1996). The hippocampo-neocortical dialogue. *Cerebral Cortex*, 6(2), 81--92.
v5.0 · ReferencesFernando, C., et al. (2023). PromptBreeder: Self-Referential Self-Improvement via Prompt Evolution. _arXiv:2309.16797_.
v6.0 · ReferencesFernando, C., et al. (2023). PromptBreeder: Self-Referential Self-Improvement via Prompt Evolution. *arXiv:2309.16797*.
v5.0 · ReferencesFrench, R. M. (1999). Catastrophic forgetting in connectionist networks. _Trends in Cognitive Sciences_, 3(4), 128--135.
v6.0 · ReferencesFrench, R. M. (1999). Catastrophic forgetting in connectionist networks. *Trends in Cognitive Sciences*, 3(4), 128--135.
v5.0 · ReferencesHu, E. J., et al. (2021). LoRA: Low-Rank Adaptation of Large Language Models. _arXiv:2106.09685_.
v6.0 · ReferencesHu, E. J., et al. (2021). LoRA: Low-Rank Adaptation of Large Language Models. *arXiv:2106.09685*.
v5.0 · ReferencesHu, S., et al. (2024). Automated Design of Agentic Systems. _arXiv:2408.08435_.
v6.0 · ReferencesHu, S., et al. (2024). Automated Design of Agentic Systems. *arXiv:2408.08435*.
v5.0 · ReferencesKahneman, D. (2011). _Thinking, Fast and Slow._ Farrar, Straus and Giroux.
v6.0 · ReferencesKahneman, D. (2011). *Thinking, Fast and Slow.* Farrar, Straus and Giroux.
v5.0 · ReferencesKhattab, O., et al. (2023). DSPy: Compiling Declarative Language Model Calls into Self-Improving Pipelines. _arXiv:2310.03714_.
v6.0 · ReferencesKhattab, O., et al. (2023). DSPy: Compiling Declarative Language Model Calls into Self-Improving Pipelines. *arXiv:2310.03714*.
v5.0 · ReferencesLewis, P., et al. (2020). Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks. _NeurIPS 2020_.
v6.0 · ReferencesLewis, P., et al. (2020). Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks. *NeurIPS 2020*.
v5.0 · ReferencesMadaan, A., et al. (2023). Self-Refine: Iterative Refinement with Self-Feedback. _NeurIPS 2023_.
v6.0 · ReferencesMadaan, A., et al. (2023). Self-Refine: Iterative Refinement with Self-Feedback. *NeurIPS 2023*.
v5.0 · ReferencesMcClelland, J. L., McNaughton, B. L., & O'Reilly, R. C. (1995). Why there are complementary learning systems in the hippocampus and neocortex. _Psychological Review_, 102(3), 419--457.
v6.0 · ReferencesMcClelland, J. L., McNaughton, B. L., & O'Reilly, R. C. (1995). Why there are complementary learning systems in the hippocampus and neocortex. *Psychological Review*, 102(3), 419--457.
v5.0 · ReferencesPacker, C., et al. (2023). MemGPT: Towards LLMs as Operating Systems. _arXiv:2310.08560_.
v6.0 · ReferencesPacker, C., et al. (2023). MemGPT: Towards LLMs as Operating Systems. *arXiv:2310.08560*.
v5.0 · ReferencesPark, J. S., et al. (2023). Generative Agents: Interactive Simulacra of Human Behavior. _UIST 2023_.
v6.0 · ReferencesPark, J. S., et al. (2023). Generative Agents: Interactive Simulacra of Human Behavior. *UIST 2023*.
v5.0 · ReferencesSerra, O., & JarvisOne. (2026a). Fractal Memory Index: A Self-Similar Architecture for Scalable Long-Term Memory in LLMs. _JarvisOne AI Research._
removed in v6.0
v5.0 · ReferencesShinn, N., et al. (2023). Reflexion: Language Agents with Verbal Reinforcement Learning. _NeurIPS 2023_.
v6.0 · ReferencesShinn, N., et al. (2023). Reflexion: Language Agents with Verbal Reinforcement Learning. *NeurIPS 2023*.
v5.0 · ReferencesWang, G., et al. (2023). Voyager: An Open-Ended Embodied Agent with Large Language Models. _arXiv:2305.16291_.
v6.0 · ReferencesWang, G., et al. (2023). Voyager: An Open-Ended Embodied Agent with Large Language Models. *arXiv:2305.16291*.
v5.0 · ReferencesYang, C., et al. (2023). Large Language Models as Optimizers. _arXiv:2309.03409_.
v6.0 · ReferencesYang, C., et al. (2023). Large Language Models as Optimizers. *arXiv:2309.03409*.
v5.0 · ReferencesYao, S., et al. (2023). ReAct: Synergizing Reasoning and Acting in Language Models. _ICLR 2023_.
v6.0 · ReferencesYao, S., et al. (2023). ReAct: Synergizing Reasoning and Acting in Language Models. *ICLR 2023*.
··· 1 unchanged paragraph folded ···
v5.0 · Appendix A: The Nightly Cycle (Illustrative Cron Schedule)## Appendix A: The Complete Nightly Cycle (Cron Schedule)
v6.0 · Appendix A: The Nightly Cycle (Illustrative Cron Schedule)## Appendix A: The Nightly Cycle (Illustrative Cron Schedule)
not in v5.0
v6.0 · Appendix A: The Nightly Cycle (Illustrative Cron Schedule)The exact wall-clock times have changed across the deployment's life; what follows is one representative configuration during the observation period. The *ordering* of reflection before consolidation before pruning is the invariant; the hours are not.
v5.0 · Appendix A: The Nightly Cycle (Illustrative Cron Schedule)| Time | Job | Model | Purpose | Tokens/run | | ----- | --------------------- | ------ | --------------------------------------- | ---------- | | 03:00 | Outlook Token Refresh | Haiku | Keep auth alive | ~2K | | 03:30 | DB Backup | Haiku | Backup SQLite databases | ~2K | | 03:30 | Memory Index Rebuild | Haiku | Rebuild memory search index | ~3K | | 04:00 | Wind-Down | Opus | Reflect, encode lessons, mutate prompts | ~15K | | 04:15 | Memory Consolidation | Opus | Compress, route, index knowledge | ~20K | | 04:30 | Security Check | Opus | OS/network security audit | ~12K | | 04:45 | Fork Sync | Opus | Merge upstream, self-heal build | ~10K | | 05:00 | Fork Scanner | Opus | Analyze other forks for ideas | ~25K | | 05:15 | Cleaning Lady | Sonnet | Prune sessions, enforce size budgets | ~8K | | 05:30 | Self-Evolution | Opus | Research new models, techniques | ~20K | | 05:45 | Group Summary | Opus | Summarize WhatsApp groups | ~15K | | 06:00 | Life Butler | Opus | Personal secretary | ~10K | | 07:00 | Morning Briefing | Opus | Daily summary + action items | ~12K | | 08:00 | Online Engagement | Opus | GitHub PRs, community outreach | ~12K |
v6.0 · Appendix A: The Nightly Cycle (Illustrative Cron Schedule)| Job | Model tier | Purpose | Tokens / run | | --- | ---------- | ------- | :----------: | | Token Refresh | cheap | Keep auth alive | ~2K | | DB Backup | cheap | Back up local databases | ~2K | | Memory Index Rebuild | cheap | Rebuild the search index | ~3K | | Wind-Down | strongest | Reflect, encode lessons, mutate prompts | ~15K | | Memory Consolidation | strongest | Compress, route, index knowledge | ~20K | | Security Check | strong | OS / network security audit | ~12K | | Fork Sync | strong | Merge upstream, self-heal build | ~10K | | Fork Scanner | strong | Analyze other forks for ideas | ~25K | | Cleaning | mid-tier | Prune sessions, enforce size budgets | ~8K | | Self-Evolution | strong | Research new models and techniques | ~20K | | Group Summary | strong | Summarize message groups | ~15K | | Life Butler | strong | Personal-secretary tasks | ~10K | | Morning Briefing | strong | Daily summary + action items | ~12K | | Online Engagement | strong | Community outreach, code review | ~12K |
··· 1 unchanged paragraph folded ···
v5.0 · Mutation #8 -- B010 Incident (Mar 3)### Mutation #8 -- B010 Incident (2026-03-03)
v6.0 · Mutation #8 -- B010 Incident (Mar 3)### Mutation #8 -- B010 Incident (Mar 3)
v5.0 · Mutation #8 -- B010 Incident (Mar 3)**Trigger:** Fork sync cron edited `process-message.ts`, ran `pnpm build`, and killed the gateway.
v6.0 · Mutation #8 -- B010 Incident (Mar 3)**Trigger:** the fork-sync cron edited a source file, ran a build, and killed the gateway.
v5.0 · Mutation #8 -- B010 Incident (Mar 3)**Root cause:** Prompt said "sync the fork" -- model interpreted that as permission to do whatever syncing required.
v6.0 · Mutation #8 -- B010 Incident (Mar 3)**Root cause:** the prompt said "sync the fork" -- the model read that as permission to do whatever syncing required.
v5.0 · Mutation #8 -- B010 Incident (2026-03-03)**Mutation (v1):**
removed in v6.0
not in v5.0
v6.0 · Mutation #8 -- B010 Incident (Mar 3)**Mutation (v1), as language-agnostic policy:**
v5.0 · Mutation #8 -- B010 Incident (Mar 3)``` HARD CONSTRAINTS: - NEVER modify source code directly - NEVER run pnpm build - NEVER pkill or restart the gateway - If safe-cron-merge.sh exits non-zero, report and STOP ```
v6.0 · Mutation #8 -- B010 Incident (Mar 3)``` HARD CONSTRAINTS: - never modify source code directly - never run a build - never restart or kill the gateway - if the safe-merge step fails, report and STOP ```
v5.0 · Mutation #14 -- Over-correction Fix (Mar 10)### Mutation #14 -- Over-correction Fix (2026-03-10)
v6.0 · Mutation #14 -- Over-correction Fix (Mar 10)### Mutation #14 -- Over-correction Fix (Mar 10)
v5.0 · Mutation #14 -- Over-correction Fix (Mar 10)**Trigger:** Mutation #8 prevented the agent from resolving a merge conflict it was capable of resolving.
v6.0 · Mutation #14 -- Over-correction Fix (Mar 10)**Trigger:** mutation #8 prevented the agent from resolving a merge conflict it was capable of resolving.
v5.0 · Mutation #14 -- Over-correction Fix (Mar 10)**Root cause:** Mutation #8 encoded a blanket prohibition when a proportional constraint would have preserved capability.
v6.0 · Mutation #14 -- Over-correction Fix (Mar 10)**Root cause:** mutation #8 encoded a blanket prohibition where a proportional constraint would have preserved capability.
v5.0 · Mutation #14 -- Over-correction Fix (2026-03-10)**Mutation (v2):**
removed in v6.0
not in v5.0
v6.0 · Mutation #14 -- Over-correction Fix (Mar 10)**Mutation (v2), as language-agnostic policy:**
v5.0 · Mutation #14 -- Over-correction Fix (Mar 10)``` SAFETY CONSTRAINTS (replaces HARD CONSTRAINTS): - NEVER git checkout upstream/main -- . (blanket overwrite) - You MAY edit source files to resolve conflicts in the fork's source tree - You MAY run pnpm build to verify your resolution - ALWAYS preserve fork guard strings from FORK_PATCHES.md - When in doubt: keep ours and escalate ```
v6.0 · Mutation #14 -- Over-correction Fix (Mar 10)``` SAFETY CONSTRAINTS (replaces HARD CONSTRAINTS): - never blanket-overwrite local changes with upstream - you MAY edit source files to resolve a conflict - you MAY run a build to verify your resolution - always preserve the fork's protected patch strings - when in doubt: keep local changes and escalate ```
v5.0 · Mutation #14 -- Over-correction Fix (2026-03-10)**Meta-lesson encoded:** "When encoding a safety lesson, separate the failure mode from the restriction. The restriction should be proportional to the risk, not a blanket prohibition."
removed in v6.0
not in v5.0
v6.0 · Mutation #14 -- Over-correction Fix (Mar 10)**Meta-lesson encoded:** "When encoding a safety lesson, separate the failure mode from the restriction. The restriction should be proportional to the risk, not a blanket prohibition." This cascade is now the canonical test case for the automated strategy-switch trigger of Section 6.2: three consecutive always-merge failures within a day switch the strategy rather than adding a fourth patch.
v5.0 · Appendix C: The Fractal Depth Selector (Representative Production Version)## Appendix C: The Fractal Depth Selector (Current Production Version)
v6.0 · Appendix C: The Fractal Depth Selector (Representative Production Version)## Appendix C: The Fractal Depth Selector (Representative Production Version)
v5.0 · Appendix C: The Fractal Depth Selector (Representative Production Version)``` Default Fractal Depth Selector (2026-03-10):
v6.0 · Appendix C: The Fractal Depth Selector (Representative Production Version)``` Default Fractal Depth Selector:
v5.0 · Appendix C: The Fractal Depth Selector (Representative Production Version)| Signal | Depth | |---------------------------------|--------------------------------------| | Routine/mechanical task | 0 -- just do it | | Something broke or surprised me | 1-2 -- what pattern? what lesson? | | Encoding a new rule/constraint | 2-3 -- is the abstraction right? | | Explicit request for depth | 3+ -- go until insight is actionable |
v6.0 · Appendix C: The Fractal Depth Selector (Representative Production Version)| Signal | Depth | |---------------------------------|--------------------------------------| | Routine / mechanical task | 0 -- just do it | | Something broke or surprised me | 1-2 -- what pattern? what lesson? | | Encoding a new rule/constraint | 2-3 -- is the abstraction right? | | Explicit request for depth | 3+ -- go until insight is actionable |
v5.0 · Appendix C: The Fractal Depth Selector (Representative Production Version)Application rule: On any non-trivial completed action, spend 10 seconds asking "one level up: what pattern does this instance belong to?" If interesting, go one more. If not, stop. ```
v6.0 · Appendix C: The Fractal Depth Selector (Representative Production Version)Application rule: on any non-trivial completed action, spend a few seconds asking "one level up: what pattern does this instance belong to?" If interesting, go one more. If not, stop. ```
not in v5.0
v6.0 · Appendix D: Procedural-Extension Defaults## Appendix D: Procedural-Extension Defaults
not in v5.0
v6.0 · Appendix D: Procedural-Extension DefaultsRepresentative default thresholds for the Section 6 extensions, as configured in the deployment:
not in v5.0
v6.0 · Appendix D: Procedural-Extension Defaults| Extension | Parameter | Default | Effect | | --------- | --------- | :-----: | ------ | | Recipe evolution | Minimum runs to propose | 3 | Below this, no proposal fires | | Recipe evolution | Minimum runs to auto-promote | 8 | Below this, every proposal is human-gated | | Recipe evolution | Success floor | 0.5 | Below this, a corrective proposal is generated | | Strategy switch | Consecutive-failure threshold | 3 | Trips a switch when reached | | Strategy switch | Recency window | 24h | Failures older than this don't count | | Strategy switch | Min confidence to auto-switch | 0.8 | Below this, the switch is human-gated | | Skill library | Dedup similarity (Jaccard) | 0.8 | Above this, two skills merge |
··· 1 unchanged paragraph folded ···
v5.0 · Appendix E: Revision History## Appendix D: Revision History
v6.0 · Appendix E: Revision History## Appendix E: Revision History
v5.0 · Appendix E: Revision History**v1.0 (2026-03-10):** Initial draft.
v6.0 · Appendix E: Revision History**v1.0:** initial draft.
v5.0 · Appendix E: Revision History**v1.1 (2026-03-10):** Major revision based on external review. Added: specific metrics in abstract, contributions list, explicit research question, expanded related work, Algorithm 1, cross-cron transfer examples, methodology/confound discussion, sensitivity analysis, falsifiability criterion, concrete gating/rollback mechanisms, expanded mitigations, 7 new citations.
v6.0 · Appendix E: Revision History**v1.1:** major revision after external review. Added abstract metrics, contributions list, explicit research question, expanded related work, Algorithm 1, cross-cron transfer examples, methodology and confound discussion, sensitivity analysis, falsifiability criterion, gating and rollback mechanisms, expanded mitigations.
v5.0 · Appendix E: Revision History**v2.0 (2026-03-13):** Quality revision. Fixed terminology artifacts in biological references (Buzsáki, McClelland), removed uncited references, reduced thematic redundancy, corrected citation attributions, tightened prose throughout.
v6.0 · Appendix E: Revision History**v2.0:** quality revision. Fixed terminology in biological references, removed uncited references, reduced redundancy, corrected attributions, tightened prose.
not in v5.0
v6.0 · Appendix E: Revision History**v5.0:** retitled to "Sleep Consolidation"; reframed the analogy from cerebellum-only to whole-sleep consolidation.
not in v5.0
v6.0 · Appendix E: Revision History**v6.0:** brain-grounded opening (hippocampal replay + cerebellar motor consolidation); self-contained inline summaries of the storage / retrieval / identity layers; added Section 6 (procedural-memory extensions: recipe evolution, strategy switch, skill library) grounded in the implemented system; added a mutation taxonomy (4.2) and honest negative results (the April 1 concept-index failure, 6.4); added the concept-index consolidation output to Algorithm 1; added similes throughout; added Appendix D (procedural-extension defaults). Prose tightened.
Changed paragraphs in the same form, for scripts: JSON
· Markdown