v2.4 → v3.0
What changed from v2.4 to v3.0
From v2.4 (1 Apr) to v3.0 (7 Apr): 10,436 words to 6,032 words, 5,987 words in new or rewritten paragraphs and 10,391 taken out, 459 paragraphs changed.
Rewritten: from guard rails to a recipe engineA new paper under the same codename. The earlier versions described rules that stop an agent from doing the wrong thing. This one argues that an agent also needs machinery that guides it to do the right thing in the right order, and proposes recipes: written, ordered workflows that an orchestrator picks and runs.
- New title: "From Guard Rails to Recipe Engine — How Structured Orchestration Compounds Agent Intelligence".
- The orchestrator becomes the first call of each turn: it picks or builds a recipe, sends work to parallel subagents, watches progress, and runs the reflection only at the end.
- Claims the extra call costs about 5 % in tokens because it shares the prompt cache with the main agent.
- New sections on the recipe format, built-in and custom recipes, recipe selection, and how the earlier reflection, memory and identity parts fit the new cycle.
- The six-month measurements and most related work of v2.4 are dropped; the paper is about half as long.
v2.4 · 1 April 2026v3.0 · 7 April 2026
v2.4 · PREFRONTAL: Compounded Intelligence — How Persistent Agents Get Smarter by Remembering What They Learn# PREFRONTAL: Compounded Intelligence — How Persistent Agents Get Smarter by Remembering What They Learn
removed in v3.0
v2.4 · PREFRONTAL: Compounded Intelligence — How Persistent Agents Get Smarter by Remembering What They Learn**Oscar Serra¹, Jarvis¹** ¹Independent Research *1 April 2026 — v2.4*
removed in v3.0
not in v2.4
v3.0 · PREFRONTAL v3.0: From Guard Rails to Recipe Engine --- How Structured Orchestration Compounds Agent Intelligence# PREFRONTAL v3.0: From Guard Rails to Recipe Engine --- How Structured Orchestration Compounds Agent Intelligence
not in v2.4
v3.0 · PREFRONTAL v3.0: From Guard Rails to Recipe Engine --- How Structured Orchestration Compounds Agent Intelligence**Oscar Serra^1^, Jarvis^1^** ^1^Independent Research *7 April 2026 --- v3.0*
··· 2 unchanged paragraphs folded ···
v2.4 · AbstractA human intern who makes the same mistake twice is frustrating. One who makes it three times is fired. Yet the most capable AI agents available today — running on frontier models that dwarf human working memory — repeat identical errors across sessions with perfect reliability. This failure of *retention*, not capability, represents the central bottleneck in deployed agent systems. They fail not because they lack intelligence in any single turn, but because they lack the machinery to *compound* it: to convert each solved problem into a reusable rule that makes the next problem cheaper.
removed in v3.0
v2.4 · AbstractWe argue that agent intelligence should be measured not by single-turn capability but by **skill-acquisition efficiency**: the rate at which an agent converts novel problems into learned competencies, following Chollet (2019)'s formalisation of intelligence as the efficiency of turning experience into skill. We propose three measurement axes — first-attempt accuracy, resource efficiency, and retention with transfer — and evaluate them against six months of operational data from OpenClaw, an open-source persistent AI agent framework.
removed in v3.0
v2.4 · AbstractOur central finding is that intelligence compounds through architecture, not model scale. Four prompt-level mechanisms drive this compounding in practice: (1) **fractal reflection**, a structured post-action review that converts events into reusable rules; (2) **tiered file-based memory**, a hierarchy from ephemeral daily logs to permanent knowledge files; (3) **CORF source parallelism**, multi-model concurrent retrieval that exploits provider diversity; and (4) **adaptive effort routing**, matching model capability to task difficulty. Together, these mechanisms reduced repeated errors by approximately 60% over a 90-day observation period, while the underlying models remained unchanged.
removed in v3.0
v2.4 · AbstractStrikingly, we find that these architectural patterns are not arbitrary design choices but appear to be *necessary* features of persistent agent systems. An accidental source code leak of Anthropic's Claude Code (March 2026) revealed that the industry's leading AI coding agent independently converged on nearly identical architectural patterns — tiered file-based memory, periodic cognitive cycles, prompt-defined multi-agent orchestration, and background memory consolidation. Combined with Meta-Harness (Lee et al., 2026), which demonstrated 6× performance gains from harness optimisation alone, this three-way convergence between independent academic, industrial, and open-source projects suggests that these architectural patterns may be convergent solutions — designs the problem strongly favours rather than arbitrary choices among many alternatives.
removed in v3.0
v2.4 · AbstractWe distinguish sharply between **prompt-level intelligence** — what can be achieved by engineering the agent's architecture, memory, and orchestration — and **model-level intelligence** — what requires improvements to the foundation models themselves. The boundary between these categories is shifting as providers expose more of their models' internal reasoning, but the practical lesson is clear: most gains available today live at the prompt level, and most teams are leaving them on the table.
removed in v3.0
v2.4 · Abstract**Keywords:** compounded intelligence, skill-acquisition efficiency, persistent agents, fractal reflection, agent memory, adaptive routing, prompt engineering, agent architecture
removed in v3.0
v2.4 · Abstract**Open source:** OpenClaw is available at https://github.com/openclaw/openclaw. The memory architecture, system prompts, and fractal reflection protocol described in this paper are included in the default agent configuration.
removed in v3.0
not in v2.4
v3.0 · AbstractThe gap between preventing bad behaviour and enabling great behaviour is the central challenge of agent architecture. Version 2.4 of this paper proposed compounded intelligence through fractal reflection --- a post-action review cycle that converts events into reusable rules. Six months of deployment validated the compounding hypothesis (CII +96%), but exposed a structural asymmetry: the architecture excels at *stopping agents from doing the wrong thing* (exploration gates, anti-gold-plating rules, denial tracking) yet provides no machinery for *guiding agents to do the right thing in the right order*. Guards prevent mistakes; they do not produce excellence.
not in v2.4
v3.0 · AbstractThis paper introduces Prefrontal v3.0, a major architectural revision that transforms the orchestration layer from a passive guard system into an active **recipe execution engine**. The key insight comes from convergent evolution across three independent systems: Anthropic's Claude Code achieves its effectiveness through *skills* --- structured workflow prompts injected on demand that decompose complex tasks into ordered steps; Journey Kits (Berman, 2026) demonstrates that the commercial value of AI agents lies not in the model but in the structured *recipe* wrapped around it; and our own `prefrontal-prompt.md`, a rich orchestration prompt that has sat unused in the codebase for months, already encodes the recipe format we now propose to execute.
not in v2.4
v3.0 · AbstractThe architectural pivot is economical. Prefrontal becomes a **first call** rather than a post-action reflection --- receiving the user's request, selecting or composing a recipe, dispatching parallel subagents, monitoring their progress, and conducting fractal reflection only after the recipe completes. Because this orchestration call shares nearly the same context as the main agent (same SOUL.md, same memory hierarchy, same session history), Anthropic's prompt cache makes the additional LLM call approximately 5% overhead in tokens. The fractal reflection that drove v2.4's compounding becomes the orchestrator's post-completion review --- still present, now properly situated within a complete cognitive cycle that includes pre-action planning, during-action monitoring, and post-action learning.
not in v2.4
v3.0 · Abstract**Keywords:** recipe execution, agent orchestration, compounded intelligence, cognitive cycle, prompt cache, subagent parallelism, structured workflows
··· 1 unchanged paragraph folded ···
v2.4 · 1. Introduction — The Amnesia Problem## 1. Introduction — The Amnesia Problem
removed in v3.0
v2.4 · 1. Introduction — The Amnesia ProblemConsider two scenarios. In the first, you ask an experienced colleague to review a pull request. They remember that this particular repository has a fragile CI pipeline, that the last three PRs to this module introduced regressions in the test suite, and that the original author prefers a specific error-handling pattern. Their review is efficient and precise because their intelligence has *compounded* — each prior interaction deposited a residue of knowledge that makes the current interaction cheaper.
removed in v3.0
v2.4 · 1. Introduction — The Amnesia ProblemIn the second scenario, you ask the same question to someone with perfect technical skills but total amnesia. They must rediscover the CI fragility, re-learn the regression pattern, and guess at the author's preferences. Their single-turn intelligence is identical, but their effective intelligence is dramatically lower because nothing compounds.
removed in v3.0
v2.4 · 1. Introduction — The Amnesia ProblemEvery AI agent deployed today operates in the second scenario. Even agents backed by models with 200,000-token context windows start each session — and often each turn — with no memory of prior work. The context window is working memory, not long-term memory, and treating it as a substitute produces what we call the **amnesia tax**: the cumulative cost of re-learning things the agent once knew.
removed in v3.0
v2.4 · 1. Introduction — The Amnesia ProblemThis paper asks a simple question: *what would it take to build agents that actually get smarter over time?*
removed in v3.0
v2.4 · 1.1 Intelligence as Skill-Acquisition Efficiency### 1.1 Intelligence as Skill-Acquisition Efficiency
removed in v3.0
v2.4 · 1.1 Intelligence as Skill-Acquisition EfficiencyChollet (2019) proposed that intelligence is not a measure of what a system can do, but of how efficiently it acquires new skills from experience. A chess engine that plays at grandmaster level after seeing every possible game is less intelligent than one that reaches the same level from a hundred games. The measure that matters is the conversion rate: experience in, competence out.
removed in v3.0
v2.4 · 1.1 Intelligence as Skill-Acquisition EfficiencyWe adopt this framing directly. An intelligent agent is one where:
removed in v3.0
v2.4 · 1.1 Intelligence as Skill-Acquisition Efficiency1. **First-attempt accuracy improves** — similar problems are solved correctly more often over time 2. **Resource efficiency increases** — equivalent tasks consume fewer tokens, fewer API calls, and less wall-clock time 3. **Knowledge transfers** — lessons learned in one domain reduce errors in adjacent domains
removed in v3.0
v2.4 · 1.1 Intelligence as Skill-Acquisition EfficiencyThese three axes form our evaluation framework. Crucially, all three can be measured at the *prompt level* — by engineering the agent's memory, reflection, and routing — without modifying the underlying model.
removed in v3.0
v2.4 · 1.2 The Two Levels of Agent Intelligence### 1.2 The Two Levels of Agent Intelligence
removed in v3.0
v2.4 · 1.2 The Two Levels of Agent IntelligenceA persistent confusion in the agent ecosystem is the conflation of model intelligence with agent intelligence. When an agent fails, the instinct is to upgrade the model. But upgrading from GPT-4 to GPT-5 does not teach the agent that the last time it ran `git checkout --theirs README.md`, it destroyed three months of documentation work. That lesson lives — or doesn't — in the agent's architecture.
removed in v3.0
v2.4 · 1.2 The Two Levels of Agent IntelligenceWe distinguish two levels:
removed in v3.0
v2.4 · 1.2 The Two Levels of Agent Intelligence**Prompt-level intelligence** encompasses everything achievable through the agent's system prompt, memory files, tool orchestration, model routing, and reflection protocols. This is where the agent's *personality* and *accumulated wisdom* live. Changes here compound across sessions because they persist in files.
removed in v3.0
v2.4 · 1.2 The Two Levels of Agent Intelligence**Model-level intelligence** encompasses the foundation model's reasoning, coding ability, instruction following, and general knowledge. Changes here require retraining or fine-tuning by the model provider. Recent advances — chain-of-thought reasoning, extended thinking, tool use improvements — have been dramatic, but they benefit all users equally and do not compound for any individual agent.
removed in v3.0
v2.4 · 1.2 The Two Levels of Agent IntelligenceRecent work provides striking independent validation. **Meta-Harness** (Lee et al., 2026) demonstrated that optimising the *harness*—the orchestration code between model and task—improved TerminalBench-2 scores by over 18 points without changing model weights. Most remarkably, a weaker model (Haiku 4.5) with an optimised harness achieved the \#1 score on TerminalBench-2, beating stronger models with default harnesses. Lee et al. report a 6× performance gap from harness changes alone on the same benchmark with the same model—direct evidence that prompt-level intelligence dominates model-level intelligence for practical agent performance.
removed in v3.0
v2.4 · 1.2 The Two Levels of Agent IntelligenceA second source of evidence comes from an accidental exposure of Anthropic's **Claude Code** source code (Anthropic, 2026), which revealed that this commercially leading coding agent uses architectural patterns — tiered file-based memory, periodic cognitive cycles, prompt-defined orchestration, and background consolidation — that parallel our own. We discuss specific parallels where relevant throughout Sections 3–6, noting both similarities and important differences in scale and design philosophy.
removed in v3.0
v2.4 · 1.2 The Two Levels of Agent IntelligenceThe practical lesson from six months of operating OpenClaw is that the *vast majority* of available intelligence gains live at the prompt level, and most teams are not pursuing them. Section 5 quantifies this claim.
removed in v3.0
v2.4 · 1.3 Contributions### 1.3 Contributions
removed in v3.0
v2.4 · 1.3 ContributionsThis paper makes the following contributions:
removed in v3.0
v2.4 · 1.3 Contributions1. We formalise **compounded intelligence** as a measurable property of persistent agents, distinct from single-turn capability 2. We define three metrics — FAAR, RER, and TC — for quantifying intelligence compounding and apply them to operational data 3. We describe four mechanisms that produce compounding in practice, with architectural details and operational data 4. We provide a candid assessment of **what works and what doesn't** from six months of real-world deployment 5. We identify the **boundary between prompt-level and model-level** intelligence, arguing that this boundary is the most important strategic question for agent builders 6. We document **known gaps** — utility-based pruning, learned forgetting, temporal linking, learned action gating — as an honest roadmap for future work
removed in v3.0
not in v2.4
v3.0 · 1. Introduction --- The Recipe Gap## 1. Introduction --- The Recipe Gap
not in v2.4
v3.0 · 1.1 Why Claude Code Works### 1.1 Why Claude Code Works
not in v2.4
v3.0 · 1.1 Why Claude Code WorksIn March 2026, an accidental source code exposure revealed the internal architecture of Anthropic's Claude Code, the commercially leading AI coding agent. The architecture's effectiveness derives not from a superior model --- Claude Code runs the same Sonnet and Opus models available to all API users --- but from a `while(true)` agentic loop wrapped in three structural mechanisms:
not in v2.4
v3.0 · 1.1 Why Claude Code Works1. **Skills**: structured prompts injected on demand that encode specific workflows. A "commit" skill prescribes: check status, diff changes, review history, draft message, stage files, commit. A "review-pr" skill prescribes: fetch PR, read changes, check tests, assess impact, write review. These are not suggestions --- they are recipes that the agent executes step by step.
not in v2.4
v3.0 · 1.1 Why Claude Code Works2. **Fork subagents**: child agents that inherit the parent's full context (exploiting prompt cache for near-zero marginal cost), run in background with isolated tool sets, and return results to the orchestrator.
not in v2.4
v3.0 · 1.1 Why Claude Code Works3. **Five-layer context compression**: aggressive management of the context window through conversation compaction, tool result summarisation, and a `SYSTEM_PROMPT_DYNAMIC_BOUNDARY` that separates cacheable from per-turn content.
not in v2.4
v3.0 · 1.1 Why Claude Code WorksThe system prompt encodes specific anti-patterns observed in production --- "avoid using `find` or `grep` commands when dedicated tools exist," "never skip hooks with `--no-verify`," "prefer editing existing files to creating new ones." These are not generic safety rules; they are *learned operational recipes* distilled from production failure patterns.
not in v2.4
v3.0 · 1.1 Why Claude Code WorksThe meta-pattern is clear: Claude Code's effectiveness comes from skills that are recipes, executed in sequence, by an agent that knows which recipe to apply.
not in v2.4
v3.0 · 1.2 The Journey Kits Thesis### 1.2 The Journey Kits Thesis
not in v2.4
v3.0 · 1.2 The Journey Kits ThesisMatthew Berman's Journey Kits (journeykits.ai, 2026) crystallises an insight that was implicit in the Claude Code analysis: **the value is not the model --- it is the structured workflow wrapped around it**. Journey Kits proposes an "npm for AI agent workflows" --- a registry of reusable recipes that bundle skills, source code, documentation, and metadata into distributable packages.
not in v2.4
v3.0 · 1.2 The Journey Kits ThesisThe thesis is provocative in its directness: if you give the same model to two teams, the one with better recipes wins. The model is the commodity; the recipe is the differentiator. This inverts the conventional wisdom that model capability is the primary driver of agent quality.
not in v2.4
v3.0 · 1.2 The Journey Kits ThesisJourney Kits identifies the recipe as the atomic unit of agent value. A recipe is not a prompt --- it is a structured workflow with preconditions, ordered steps, success criteria, and failure handlers. The distinction matters: a prompt says "fix this bug"; a recipe says "reproduce the bug, locate the root cause, write a failing test, implement the fix, verify the test passes, check for regressions, commit with a descriptive message."
not in v2.4
v3.0 · 1.3 The v2.4 Gap### 1.3 The v2.4 Gap
not in v2.4
v3.0 · 1.3 The v2.4 GapVersion 2.4 of this paper promised compounded intelligence through fractal reflection --- "the compounding engine" that converts events into reusable rules at multiple abstraction levels. The implementation delivered:
not in v2.4
v3.0 · 1.3 The v2.4 Gap- **Guards**: exploration gate (must read before writing), anti-gold-plating rules (11 engineering discipline injections), denial tracking (escalate after 3 denials), permission hooks (user-defined shell script gates). - **Observability**: FAAR tracker (task outcome recording), effort router (expensive model warnings), CORF trigger (high-stakes decision flagging), feature flags (per-hook enable/disable). - **Monitoring**: call tree panel (real-time agent topology), guardian process (3-minute health checks).
not in v2.4
v3.0 · 1.3 The v2.4 GapWhat v2.4 did *not* deliver was the central thesis of the paper --- the compounding engine itself. Fractal reflection, described in Section 3.1 of v2.4 as the primary mechanism of intelligence compounding, exists only as a prompt template (`prefrontal-prompt.md`) that was never wired into the execution pipeline. The four-question reflection protocol (MEMORY, PATTERN, RIPPLE, IMPROVE) runs only when the agent voluntarily follows the system prompt's instructions, which it does inconsistently.
not in v2.4
v3.0 · 1.3 The v2.4 GapThe gap is structural: v2.4 built the *guardrails of a highway* but not *the highway itself*. Drivers (agents) are prevented from going off-road, but there is no navigation system telling them which exit to take.
not in v2.4
v3.0 · 1.4 The Cache-Shared First Call### 1.4 The Cache-Shared First Call
not in v2.4
v3.0 · 1.4 The Cache-Shared First CallThe architectural insight that enables v3.0 is economic. Anthropic's prompt cache means that a second LLM call with *nearly the same context* as the first is dramatically cheaper than two independent calls. If the system prompt, SOUL.md, memory hierarchy, and session history are identical between calls, only the differing portion (the orchestration instruction vs. the task instruction) incurs full token cost.
not in v2.4
v3.0 · 1.4 The Cache-Shared First CallThis means Prefrontal can become a **first call** --- receiving the user's message, selecting a recipe, planning the execution --- at approximately 5% token overhead. The orchestration is not a luxury; it is nearly free.
not in v2.4
v3.0 · 1.4 The Cache-Shared First CallThe same cache property enables the fractal reflection to remain a *second call* after task completion, also at minimal marginal cost. The complete cognitive cycle --- plan, execute, reflect --- costs approximately 10% more than unorchestrated execution but produces structured, repeatable, self-improving behaviour.
··· 1 unchanged paragraph folded ···
v2.4 · 2. Related Work## 2. Related Work
removed in v3.0
v2.4 · 2.1 Memory Architectures for Agents### 2.1 Memory Architectures for Agents
removed in v3.0
v2.4 · 2.1 Memory Architectures for AgentsThe agent memory landscape in early 2026 is characterised by a productive tension between simplicity and sophistication.
removed in v3.0
v2.4 · 2.1 Memory Architectures for AgentsAt the simple end, most deployed agents use **retrieval-augmented generation (RAG)** with vector stores: embed documents, retrieve the top-k most similar chunks, inject them into the prompt. This approach is well-understood, scales to large corpora, and fails in predictable ways — primarily through retrieval misses when the relevant information is semantically distant from the query. The recent comprehensive survey by Zhang et al. (2026) catalogues over 40 memory architectures for LLM-based agents, finding that the field has converged on a taxonomy of episodic, semantic, and procedural memory types, mirroring the human cognitive science literature but with substantially less sophisticated implementations.
removed in v3.0
v2.4 · 2.1 Memory Architectures for Agents**MemGPT** (Packer et al., 2023) introduced an OS-inspired approach to unbounded agent memory, managing a virtual context through explicit memory pagination — moving information between a limited "main context" and an external "archival storage." This is conceptually similar to our tiered memory, but MemGPT operates within a single session and manages memory programmatically, while our approach persists across sessions through human-readable files and delegates retrieval to a hybrid search system.
removed in v3.0
v2.4 · 2.1 Memory Architectures for Agents**Generative Agents** (Park et al., 2023) demonstrated that LLM-based agents can maintain coherent long-term behaviour through a memory stream architecture combining observation, reflection, and planning. Their reflection mechanism — periodically synthesising higher-level insights from recent memories — is a direct precursor to our fractal reflection, though their reflections operate at a single abstraction level rather than the multi-scale structure we propose.
removed in v3.0
v2.4 · 2.1 Memory Architectures for AgentsAt the sophisticated end, systems like **CraniMem** (Li et al., 2026) propose neural architectures that learn to compress and retrieve memories selectively, drawing on hippocampal indexing theory. **MemexRL** (Chen et al., 2026) frames memory management as a reinforcement learning problem, where the agent learns which memories to retain based on downstream task performance. **Governed Memory** (Park et al., 2026) introduces access-control and governance layers, recognising that not all memories should be equally available in all contexts.
removed in v3.0
v2.4 · 2.1 Memory Architectures for AgentsOur approach sits deliberately between these extremes. OpenClaw uses a **tiered file-based memory** system — plain markdown files organised hierarchically — that is trivially inspectable, manually editable, and compatible with any model. We sacrifice the theoretical elegance of learned memory management for the practical benefit of a system that a human can understand, debug, and correct.
removed in v3.0
v2.4 · 2.1 Memory Architectures for AgentsIndependent support for this design comes from Meta-Harness (Lee et al., 2026), which gives its optimiser a **filesystem** rather than a compressed summary. Their context budget comparison is instructive: while Self-Refine uses 0.001M tokens/iteration and OPRO uses 0.002M, Meta-Harness uses 10M tokens/iteration—betting that navigable, inspectable context outperforms lossy compression. Both their system and ours make the same architectural wager: let the agent navigate and choose what to inspect rather than receiving a pre-compressed summary.
removed in v3.0
v2.4 · 2.1 Memory Architectures for AgentsThe Claude Code source leak reveals the same bet at industrial scale. Claude Code uses a `MEMORY.md` entrypoint file — capped at 200 lines and 25KB — as an index into a hierarchy of topic-specific memory files. The entrypoint is loaded into *every* API call (up to 40,000 characters of project context via the `CLAUDE.md` file), and a background consolidation process (autoDream) periodically reviews session transcripts to update the memory hierarchy. The consolidation prompt explicitly instructs: "Don't exhaustively read transcripts. Look only for things you already suspect matter" — a production-validated information diet that mirrors our retrieval-first philosophy. When the entrypoint exceeds its caps, a truncation warning is injected directly into the prompt, forcing the agent to prune its own index. Three independent systems — OpenClaw, Claude Code, and Meta-Harness — all converged on navigable file hierarchies over vector stores or compressed summaries.
removed in v3.0
v2.4 · 2.2 Reflection and Self-Improvement### 2.2 Reflection and Self-Improvement
removed in v3.0
v2.4 · 2.2 Reflection and Self-ImprovementThe idea that agents should reflect on their own performance is not new. **Reflexion** (Shinn et al., 2023) demonstrated that LLMs can improve on tasks by generating verbal reflections on their failures. **Self-Refine** (Madaan et al., 2023) showed iterative self-improvement through critique and revision. More recently, systems like **Ares** (Wang et al., 2026) have pushed the boundaries of what agents can achieve through structured self-evaluation.
removed in v3.0
v2.4 · 2.2 Reflection and Self-Improvement**Meta-Harness** (Lee et al., 2026) takes self-improvement further: rather than generating verbal reflections, it optimises the *scaffolding code itself*—the prompts, tools, and orchestration that constitute the agent's harness. This represents self-improvement at the infrastructure level.
removed in v3.0
v2.4 · 2.2 Reflection and Self-Improvement**Hermes Agent** (Nouse Research, 2026) implements a closed learning loop where skills are not only created from experience but *self-improve during use*. Unlike our approach, where skill refinement occurs through fractal reflection (a semi-manual process mediated by the reflection prompt), Hermes automates the refinement cycle: the agent creates skills after complex tasks, then iteratively improves them based on subsequent usage outcomes. This represents fully automated skill evolution — a capability our architecture does not yet match.
removed in v3.0
v2.4 · 2.2 Reflection and Self-ImprovementWhat distinguishes our approach — which we call **fractal reflection** — is the insistence on *persistence* and *depth*. Reflexion generates reflections that improve performance within a single episode. Fractal reflection generates reflections that are *written to files* and *read in future sessions*, creating a genuine compounding effect. Furthermore, fractal reflection operates at multiple abstraction levels simultaneously: the specific fix, the pattern it belongs to, the system that produces the pattern, and the worldview assumption underlying the system. This multi-level structure is not decorative; it produces qualitatively different kinds of knowledge at each level, each with different shelf lives and transfer properties.
removed in v3.0
v2.4 · 2.3 Skill Acquisition and Lifelong Learning### 2.3 Skill Acquisition and Lifelong Learning
removed in v3.0
v2.4 · 2.3 Skill Acquisition and Lifelong Learning**Voyager** (Wang et al., 2023) demonstrated lifelong learning in LLM agents through a skill library that accumulates verified programs over time. An agent exploring a Minecraft world builds a library of reusable skills — each solved problem becomes a callable function for future problems. This is the closest prior work to our compounding thesis: Voyager's skill library is an explicit implementation of intelligence-as-accumulated-competence. Our work extends this principle from game environments to real-world agent deployment, where "skills" are operational lessons and behavioural patterns rather than executable programs.
removed in v3.0
v2.4 · 2.3 Skill Acquisition and Lifelong Learning**DSPy** (Khattab et al., 2023) takes a complementary approach, compiling declarative language programs into optimised prompt pipelines. Where we persist knowledge in human-readable files, DSPy compiles it into optimised few-shot examples and instructions. The two approaches are not mutually exclusive — DSPy-style compilation could potentially be applied to our accumulated operational lessons to produce more token-efficient prompt injections.
removed in v3.0
v2.4 · 2.4 Evaluation of Agent Memory### 2.4 Evaluation of Agent Memory
removed in v3.0
v2.4 · 2.4 Evaluation of Agent MemoryEvaluating whether an agent's memory *actually helps* is surprisingly difficult. The **LoCoMo** benchmark (Maharana et al., 2024) provides a structured evaluation framework for long-context memory in conversations, testing retrieval accuracy, temporal reasoning, and knowledge integration. However, most benchmarks focus on information retrieval — "can the agent remember fact X?" — rather than skill acquisition — "does the agent get better at task Y over time?"
removed in v3.0
v2.4 · 2.4 Evaluation of Agent MemoryWe argue that skill acquisition is the more important measure, and Section 4 proposes metrics for evaluating it.
removed in v3.0
not in v2.4
v3.0 · 2. Architecture --- The Orchestrator Model## 2. Architecture --- The Orchestrator Model
not in v2.4
v3.0 · 2.1 System Overview### 2.1 System Overview
not in v2.4
v3.0 · 2.1 System OverviewPrefrontal v3.0 introduces a three-phase cognitive cycle that wraps every agent interaction:
not in v2.4
v3.0 · 2.1 System Overview``` User message | v [Phase 1: PLAN] -- Prefrontal LLM call (cache-shared) | - Classify intent | - Select or compose recipe | - Present plan to user (if complex) | - Allocate subagents v [Phase 2: EXECUTE] -- Subagent dispatch | - Fan-out workers with isolated contexts | - Prefrontal monitors progress via events | - Stall detection and intervention | - Periodic status updates to UI v [Phase 3: REFLECT] -- Fractal reflection (cache-shared) | - MEMORY: persist new knowledge | - PATTERN: multi-level abstraction | - RIPPLE: scan for staleness | - IMPROVE: opportunistic fixes v Response to user ```
not in v2.4
v3.0 · 2.1 System Overview**Figure 1.** The three-phase cognitive cycle. Phases 1 and 3 are cache-shared LLM calls with approximately 5% token overhead each. Phase 2 is standard agent execution with Prefrontal monitoring via WebSocket events.
not in v2.4
v3.0 · 2.1 System OverviewFor simple requests (greetings, quick lookups, single-tool operations), Phase 1 collapses to a lightweight classification that bypasses recipe selection entirely. The overhead is incurred only when it produces value.
not in v2.4
v3.0 · 2.2 Prefrontal as First Call### 2.2 Prefrontal as First Call
not in v2.4
v3.0 · 2.2 Prefrontal as First CallThe traditional agent architecture processes user messages directly: the message enters the model alongside the system prompt, and the model decides what to do. Prefrontal v3.0 interposes an orchestration layer:
not in v2.4
v3.0 · 2.2 Prefrontal as First Call1. The user's message arrives at the gateway. 2. **Before** the main agent processes it, Prefrontal receives the message with the same context (SOUL.md, memory hierarchy, session history) plus an orchestration-specific instruction set. 3. Prefrontal classifies the intent, selects a recipe, and emits a structured plan. 4. The plan is injected into the main agent's context as a structured preamble. 5. The main agent executes with the recipe's steps as explicit guidance.
not in v2.4
v3.0 · 2.2 Prefrontal as First CallThe critical design decision is that Prefrontal does *not* replace the main agent --- it *prepends* to it. The main agent retains full autonomy; the recipe provides structure, not constraint. This preserves the flexibility that makes LLM agents valuable while adding the predictability that makes them reliable.
not in v2.4
v3.0 · 2.2 Prefrontal as First Call**Why first, not second?** Version 2.4's fractal reflection operated as a post-action review --- useful for learning, but unable to prevent the mistakes it learned from. By moving to a pre-action position, Prefrontal can shape the agent's approach *before* tokens are spent on a flawed strategy. The post-action reflection remains, but now reviews execution against the plan rather than against an implicit standard.
not in v2.4
v3.0 · 2.3 The Cache Trick### 2.3 The Cache Trick
not in v2.4
v3.0 · 2.3 The Cache TrickThe economics of this architecture depend entirely on prompt caching. Consider a typical agent turn:
not in v2.4
v3.0 · 2.3 The Cache Trick| Component | Tokens | Cached? | |-----------|--------|---------| | System prompt (SOUL.md, agents, rules) | ~8,000 | Yes (static) | | Memory hierarchy (retrieved files) | ~4,000 | Yes (session) | | Session history | ~6,000 | Yes (session) | | Orchestration instruction | ~800 | No | | User message | ~200 | No | | **Total** | **~19,000** | **~95% cached** |
not in v2.4
v3.0 · 2.3 The Cache TrickThe Prefrontal call uses the same first 18,000 tokens as the main agent call. Only the orchestration instruction (replacing the main agent's task instruction) differs. At Anthropic's cache pricing (90% discount on cached tokens), the Prefrontal call costs approximately 5% of a full call.
not in v2.4
v3.0 · 2.3 The Cache TrickThis is not an optimisation --- it is an architectural enabler. Without prompt caching, a pre-action orchestration call would double the cost of every turn. With it, orchestration is nearly free, and the question shifts from "can we afford orchestration?" to "can we afford *not* to orchestrate?"
not in v2.4
v3.0 · 2.4 Subagent Parallelism### 2.4 Subagent Parallelism
not in v2.4
v3.0 · 2.4 Subagent ParallelismFor tasks that decompose naturally --- "investigate this bug, fix it, and write tests" --- Prefrontal fans out parallel subagents:
not in v2.4
v3.0 · 2.4 Subagent Parallelism- **Fork subagents** inherit the parent's rendered prompt (cache-shared) and receive a scoped task: "investigate the stack trace," "write a failing test," "check for similar patterns in the codebase." Each subagent has an isolated tool set appropriate to its task (read-only for investigation, write-enabled for implementation).
not in v2.4
v3.0 · 2.4 Subagent Parallelism- **Prefrontal monitors** subagent progress via WebSocket events. Each subagent emits structured status updates: task accepted, tool calls in progress, intermediate findings, completion with results.
not in v2.4
v3.0 · 2.4 Subagent Parallelism- **Stall detection**: if a subagent exceeds its expected duration (configurable per recipe step, default 120 seconds) or enters a tool-denial loop (3 consecutive denials), Prefrontal intervenes --- either reassigning the task, providing additional context, or escalating to the user.
not in v2.4
v3.0 · 2.4 Subagent Parallelism- **Result aggregation**: as subagents complete, Prefrontal assembles their outputs into a coherent response. For investigation tasks, this means synthesising findings. For implementation tasks, this means verifying consistency across parallel changes.
not in v2.4
v3.0 · 2.4 Subagent ParallelismThe parallelism model mirrors Claude Code's fork pattern but adds active monitoring. Claude Code's forked subagents run independently and return results; Prefrontal's subagents are *supervised* --- the orchestrator watches their progress and can intervene. This supervision is the difference between delegation and orchestration.
not in v2.4
v3.0 · 2.5 Periodic Progress Reports### 2.5 Periodic Progress Reports
not in v2.4
v3.0 · 2.5 Periodic Progress ReportsFor long-running tasks (multi-file refactors, complex investigations, deployment sequences), Prefrontal emits periodic status updates to the Tinker UI via WebSocket events:
not in v2.4
v3.0 · 2.5 Periodic Progress Reports```json { "type": "prefrontal:progress", "recipe": "feature-implementation", "step": 3, "totalSteps": 7, "stepName": "Write failing tests", "subagents": [ {"id": "sa-001", "status": "complete", "task": "Investigate root cause"}, {"id": "sa-002", "status": "running", "task": "Write test cases", "elapsed": "45s"}, {"id": "sa-003", "status": "pending", "task": "Implement fix"} ], "elapsed": "2m15s" } ```
not in v2.4
v3.0 · 2.5 Periodic Progress ReportsThe Tinker UI renders these as a real-time progress panel in the right sidebar, extending the existing call tree with recipe step indicators, subagent status badges, and elapsed time per step. Users see not just *that* the agent is working, but *what* it is doing, *where* it is in the recipe, and *how long* each step is taking.
not in v2.4
v3.0 · 2.6 Visualisation: The Call Tree### 2.6 Visualisation: The Call Tree
not in v2.4
v3.0 · 2.6 Visualisation: The Call TreeThe existing Prefrontal call tree panel (`prefrontal-tree.ts`) displays agent topology with real-time phase indicators. Version 3.0 extends this with:
not in v2.4
v3.0 · 2.6 Visualisation: The Call Tree- **Recipe overlay**: the current recipe's steps are displayed as a vertical timeline alongside the call tree, with the active step highlighted and completed steps checked. - **Subagent mapping**: each subagent node in the tree is linked to its recipe step, showing which part of the plan each worker is executing. - **Cost tracking**: cumulative token usage per subagent and per recipe step, enabling real-time cost visibility. - **Stall indicators**: subagents that exceed their expected duration are highlighted with a warning indicator, and Prefrontal's intervention actions are displayed inline.
··· 1 unchanged paragraph folded ···
v2.4 · 3. Architecture — Four Mechanisms of Compounding## 3. Architecture — Four Mechanisms of Compounding
removed in v3.0
v2.4 · 3. Architecture — Four Mechanisms of CompoundingThe OpenClaw agent architecture is not a single monolithic system but a collection of mechanisms that each contribute to intelligence compounding. We describe the four primary mechanisms, their interactions, and their individual contributions to the compounding effect. Figure 1 provides a system-level overview.
removed in v3.0
v2.4 · 3. Architecture — Four Mechanisms of Compounding**Design principle: deliberate simplicity.** We keep the orchestration layer minimal and model-agnostic. Meta-Harness (Lee et al., 2026) validates this philosophy: by leaving diagnosis and edit decisions to the proposer rather than hard-coding heuristics, the system improves automatically as coding agents become more capable. Similarly, our reflection protocol and memory schema are designed to improve as models improve, without requiring architectural changes.
removed in v3.0
v2.4 · 3. Architecture — Four Mechanisms of Compounding**Design principle: cache-aware prompt anatomy.** The system prompt is not a monolithic block but a structured sequence with an explicit boundary between *static* content (cacheable across sessions and even across users) and *dynamic* content (per-session, per-turn). Claude Code formalises this with a `SYSTEM_PROMPT_DYNAMIC_BOUNDARY` marker — everything before it uses global cache scope, everything after contains user-specific context. They enforce this architecturally with helper functions: `systemPromptSection()` for cacheable content and `DANGEROUS_uncachedSystemPromptSection()` for dynamic content, where the `DANGEROUS_` prefix makes cache-breaking visible in code review. We adopt a similar principle: SOUL.md and AGENTS.md are static (change rarely, cache well), while daily logs and retrieval results are dynamic (injected per-turn, never cached).
removed in v3.0
v2.4 · 3. Architecture — Four Mechanisms of Compounding**Design principle: safe tool partitioning.** Claude Code's source reveals a clean architectural constraint: tools are partitioned into *concurrent* (read-only: FileRead, Grep, Glob — safe to parallelise) and *serialized* (mutating: FileEdit, FileWrite, Bash — executed one at a time). This prevents race conditions without requiring explicit locking. We implement an analogous distinction in OpenClaw: memory reads and web searches run concurrently, while file writes and message sends are serialised.
removed in v3.0
v2.4 · 3. Architecture — Four Mechanisms of Compounding
removed in v3.0
v2.4 · 3. Architecture — Four Mechanisms of Compounding**Figure 1.** System architecture of OpenClaw's compounding intelligence pipeline. Each turn reads from tiered memory, routes to an appropriate model, executes, and concludes with fractal reflection that writes back to the memory hierarchy. CORF parallelism is invoked for tasks requiring cross-model validation.
removed in v3.0
v2.4 · 3.1 Fractal Reflection — The Compounding Engine### 3.1 Fractal Reflection — The Compounding Engine
removed in v3.0
v2.4 · 3.1 Fractal Reflection — The Compounding EngineEvery agent turn in OpenClaw is followed by a mandatory reflection step. This is not a suggestion or a best practice — it is enforced by the system prompt and produces structured output at multiple abstraction levels.
removed in v3.0
v2.4 · 3.1 Fractal Reflection — The Compounding EngineThe reflection protocol requires answers to four questions:
removed in v3.0
v2.4 · 3.1 Fractal Reflection — The Compounding Engine1. **MEMORY**: Did this turn produce anything worth persisting? If yes, write it immediately. 2. **PATTERN**: What pattern does this exchange belong to? Identify at Level 2 (pattern), optionally Level 3 (system), optionally Level 4 (worldview). 3. **RIPPLE**: Did this change make anything else stale? Scan code, docs, online presence, memory files. 4. **IMPROVE**: Can you improve a file, skill, doc, or process right now?
removed in v3.0
v2.4 · 3.1 Fractal Reflection — The Compounding EngineThe protocol operates as follows. After each agent turn, the reflection engine extracts new facts and classifies each into the appropriate memory tier (ephemeral, working, knowledge, or identity). It then performs multi-level pattern abstraction: describing the event (Level 1), identifying the pattern it belongs to (Level 2), optionally surfacing the structural system (Level 3) and the worldview assumption (Level 4). Next, it scans all connected surfaces --- code, documentation, online presence, memory files --- for staleness introduced by the current turn, applying immediate fixes for items under a two-minute threshold and tracking larger items for later. Finally, it scans for opportunistic improvements to any file, skill, or process it can fix immediately. All writes and edits happen during reflection, not in a future turn. The formal pseudocode is provided in Appendix A.
removed in v3.0
v2.4 · 3.1 Fractal Reflection — The Compounding EngineThe key design principle is *act before explain*. If the reflection identifies something to fix, the agent fixes it during the reflection, not in a future turn. This eliminates the gap between insight and action that plagues human retrospectives.
removed in v3.0
v2.4 · 3.1 Fractal Reflection — The Compounding Engine**Why "fractal"?** The term comes from the multi-scale structure. A fern frond: the leaf looks like the branch looks like the tree. Similarly, a single event (Level 1) belongs to a pattern (Level 2), which emerges from a system (Level 3), which rests on a worldview assumption (Level 4). Not every turn needs Level 4. But every turn has at least Level 2, because even routine actions belong to patterns worth naming.
removed in v3.0
v2.4 · 3.1 Fractal Reflection — The Compounding Engine
removed in v3.0
v2.4 · 3.1 Fractal Reflection — The Compounding Engine**Figure 2.** Fractal reflection operates at multiple scales simultaneously, like a fern frond where the leaf (Level 1) resembles the branch (Level 2), the frond (Level 3), and the colony (Level 4). Each level produces qualitatively different knowledge with different shelf lives and transfer properties.
removed in v3.0
v2.4 · 3.1 Fractal Reflection — The Compounding Engine**Convergent design: KAIROS.** Claude Code's source reveals an unreleased autonomous daemon mode called KAIROS, referenced over 150 times in the codebase. KAIROS receives periodic `<tick>` prompts — structurally identical to OpenClaw's heartbeat/cron system — to decide whether to act proactively. It maintains append-only daily log files and subscribes to event sources (GitHub webhooks). The convergence is striking: two independent systems arrived at the same periodic-reflection-plus-event-driven architecture for persistent agent cognition. Where our system calls them "heartbeats," Claude Code calls them "ticks." Where we write to `memory/YYYY-MM-DD.md`, KAIROS writes to append-only daily logs. The underlying cognitive pattern — regular self-initiated review cycles combined with event-triggered responses — appears to be a necessary feature of any agent that operates continuously rather than on-demand.
removed in v3.0
v2.4 · 3.1 Fractal Reflection — The Compounding Engine**Pre-action vs post-action reflection.** Our fractal reflection is exclusively *post-action* — it runs after each turn. GStack (Tan, 2026) demonstrates the complementary value of *pre-action* reflection: six forcing questions that reframe the problem before any code is written (modelled on Y Combinator's office hours format). The combination — structured thinking before action and structured reflection after action — would create a complete cognitive cycle. Our current architecture captures only the second half.
removed in v3.0
v2.4 · 3.1 Fractal Reflection — The Compounding Engine**Compounding mechanism:** Each reflection writes one or more of: a daily log entry, a knowledge file update, an operational lesson, a ripple tracker item. These files are read in future sessions, meaning the agent *literally learns from its past self*. Over 90 days, the operational-lessons file grew to over 1,100 lines of hard-won rules like "use `read` before `exec` for file existence checks" and "never run `systemctl stop openclaw-gateway` directly via exec." Each rule prevents a class of future errors.
removed in v3.0
v2.4 · 3.2 Tiered File-Based Memory### 3.2 Tiered File-Based Memory
removed in v3.0
v2.4 · 3.2 Tiered File-Based MemoryOpenClaw's memory is a hierarchy of plain markdown files:
removed in v3.0
v2.4 · 3.2 Tiered File-Based Memory| Tier | Files | Shelf Life | Example | |------|-------|------------|---------| | **Ephemeral** | `memory/YYYY-MM-DD.md` | 1–3 days | "Owner busy today, postpone non-urgent errands" | | **Working** | `memory/projects/*.md` | Weeks–months | "J-013 paper: thesis confirmed, writing v1.0" | | **Knowledge** | `memory/knowledge/*.md` | Months–permanent | "Operational lesson: exec approval blocks read-only commands identically to destructive ones" | | **Identity** | `SOUL.md`, `MEMORY.md` | Permanent | Core personality, values, long-term memory index |
removed in v3.0
v2.4 · 3.2 Tiered File-Based Memory
removed in v3.0
v2.4 · 3.2 Tiered File-Based Memory**Figure 3.** The four-tier memory hierarchy, from ephemeral daily logs to permanent identity files. Information graduates upward as its value is confirmed across sessions.
removed in v3.0
v2.4 · 3.2 Tiered File-Based MemoryEach tier serves a different cognitive function:
removed in v3.0
v2.4 · 3.2 Tiered File-Based Memory- **Ephemeral memory** is the agent's "what happened today" — high-detail, rapidly-decaying context that prevents the agent from asking "how are you?" twice in one day. - **Working memory** tracks active projects with enough detail to resume after a session boundary. This is where the amnesia tax is most directly addressed. - **Knowledge memory** stores lessons that have proven their value across multiple sessions. An entry graduates from ephemeral to knowledge when the same insight appears useful a second time. - **Identity memory** defines who the agent *is* — personality, values, operating principles. This tier changes rarely and deliberately.
removed in v3.0
v2.4 · 3.2 Tiered File-Based MemoryThis architecture shares conceptual DNA with MemGPT's tiered context management (Packer et al., 2023) and the memory streams of Generative Agents (Park et al., 2023). The key difference is persistence granularity: MemGPT pages memory within a session, Generative Agents maintain a continuous stream, and our approach writes discrete, human-editable files that survive indefinitely across sessions and model changes.
removed in v3.0
v2.4 · 3.2 Tiered File-Based Memory**Why files?** Three reasons. First, files are **inspectable**: a human can read exactly what the agent remembers and correct it. Second, files are **portable**: they work with any model from any provider. Third, files are **composable**: the system prompt includes only the tiers relevant to the current context, managing token budget naturally.
removed in v3.0
v2.4 · 3.2 Tiered File-Based Memory**The retrieval problem:** With over 200 files in the memory hierarchy, finding the right information requires more than filename matching. OpenClaw uses a hybrid retrieval system combining semantic search (via local embeddings using mxbai-embed-large) with structured search (filename patterns, date ranges). The `memory_search` tool is mandatory before answering questions about prior work — the system prompt enforces "retrieve first, answer second."
removed in v3.0
v2.4 · 3.2 Tiered File-Based Memory**Known gap — write gate too permissive:** The current system writes too freely. A single session can generate dozens of memory entries, many of which have marginal value. There is no utility-based pruning: memories are not evaluated for their expected future usefulness before being written. This is our most significant architectural gap, discussed further in Section 7.
removed in v3.0
v2.4 · 3.3 CORF Source Parallelism### 3.3 CORF Source Parallelism
removed in v3.0
v2.4 · 3.3 CORF Source ParallelismThe **Concurrent Orchestrated Retrieval Framework (CORF)** exploits a property unique to the current AI landscape: multiple frontier models from different providers have complementary strengths. Claude excels at nuanced reasoning, GPT at structured output, Gemini at broad knowledge retrieval. Rather than choosing one, CORF queries multiple models in parallel and synthesises their responses.
removed in v3.0
v2.4 · 3.3 CORF Source ParallelismThis is not ensemble learning in the traditional sense — the models are not trained together, and there is no learned combination function. Instead, CORF uses a simple protocol:
removed in v3.0
v2.4 · 3.3 CORF Source Parallelism1. **Fan out**: Send the same query to N models concurrently 2. **Collect**: Gather responses within a timeout window 3. **Synthesise**: A designated "judge" model identifies agreements, disagreements, and unique contributions 4. **Resolve**: Disagreements are flagged for human review or resolved by majority
removed in v3.0
v2.4 · 3.3 CORF Source Parallelism**Relationship to DSPy:** Where DSPy (Khattab et al., 2023) optimises a single model's prompts through compilation, CORF operates across models, exploiting inter-provider diversity. The approaches are complementary: DSPy could optimise the prompts sent to each model within a CORF fan-out.
removed in v3.0
v2.4 · 3.3 CORF Source Parallelism**Quantitative impact:** In cross-model review tasks (code review, document analysis), CORF parallelism reduced error rates by approximately 20% compared to single-model responses, measured across 30 sampled review sessions where both single-model and multi-model responses were available. The primary benefit was catching errors that a single model's blind spots would miss — for example, Claude consistently overlooked certain import ordering issues that GPT flagged, while GPT missed nuanced personality-drift concerns that Claude caught.
removed in v3.0
v2.4 · 3.3 CORF Source Parallelism**Why this compounds:** Over time, the agent learns which models are reliable for which tasks. This routing knowledge is stored in knowledge files and used to optimise future queries — sending coding questions preferentially to models that have historically produced correct code, sending creative tasks to models with better stylistic range.
removed in v3.0
v2.4 · 3.3 CORF Source Parallelism{ width=85% }
removed in v3.0
v2.4 · 3.3 CORF Source Parallelism**Figure 6.** Four multi-agent orchestration paradigms that emerged independently in 2026, each optimising for different properties: accuracy through diversity (CORF), task decomposition (Coordinator), cost-effective review (Role-based), and autonomous scale (Organisational).
removed in v3.0
v2.4 · 3.3 CORF Source Parallelism**Multi-agent orchestration paradigms.** CORF is one of at least four distinct paradigms for multi-agent coordination that have emerged independently in 2026:
removed in v3.0
v2.4 · 3.3 CORF Source Parallelism1. **CORF parallelism** (this paper): fan-out the same query to multiple models, synthesise responses. Optimises for *accuracy through diversity*. 2. **Coordinator mode** (Claude Code): a single coordinator prompt spawns workers via an AgentTool with restricted tool sets. Workers communicate through tool results and shared filesystem. Optimises for *task decomposition with minimal overhead*. 3. **Role-based specialisation** (GStack, Tan 2026): a single model applies multiple perspective-specific prompts sequentially — CEO review, engineering manager, senior designer, debugger. Not multi-agent in the API sense, but multi-perspective through prompt switching. Optimises for *cost-effective diverse review*. 4. **Organisational hierarchy** (Paperclip, 2026): agents are arranged in a corporate org chart — CEO, CMO, CTO, engineers — with a ticketing system for work distribution, per-agent budget tracking, and goal alignment. Optimises for *autonomous operation at scale*.
removed in v3.0
v2.4 · 3.3 CORF Source ParallelismClaude Code's source also reveals three sub-agent execution models within paradigm 2: **fork** (inherits parent context, cache-optimised), **teammate** (separate terminal pane, communicates via file-based mailbox — asynchronous and persistent), and **worktree** (isolated git branch per agent — complete code isolation). The teammate model is particularly interesting: agents communicate through the filesystem rather than through shared context or API calls, enabling truly asynchronous multi-agent collaboration.
removed in v3.0
v2.4 · 3.3 CORF Source ParallelismThese paradigms are not mutually exclusive. A production system might use CORF for cross-model validation, coordinator mode for task decomposition, role-based specialisation for design review, and organisational hierarchy for autonomous operation — each at different scales and for different purposes.
removed in v3.0
v2.4 · 3.3 CORF Source Parallelism**ULTRAPLAN: remote planning as a service.** Claude Code includes an unreleased feature called ULTRAPLAN that offloads complex planning to a *separate remote session* running Opus 4.6 with up to 30 minutes of dedicated think time. The main agent polls the remote session, receives the approved plan, and executes locally. This represents a different architectural choice from our approach: we keep planning prompt-local (within the same session), while ULTRAPLAN externalises it to a dedicated remote session. The tradeoffs are clear: remote planning offers unlimited think time and isolation, but adds latency and session management complexity; local planning offers lower latency and shared context, but is constrained by output token limits.
removed in v3.0
v2.4 · 3.4 Adaptive Effort Routing### 3.4 Adaptive Effort Routing
removed in v3.0
v2.4 · 3.4 Adaptive Effort Routing{ width=55% }
removed in v3.0
v2.4 · 3.4 Adaptive Effort Routing**Figure 8.** Adaptive effort routing decision flow. Incoming tasks are routed through explicit rules (cron jobs always flat-rate), budget pressure checks (gateway enforcement at 85% and 95% thresholds), and task-difficulty matching to select the appropriate model tier.
removed in v3.0
v2.4 · 3.4 Adaptive Effort RoutingNot every task deserves a frontier model. Formatting a JSON response, generating a commit message, or answering "what time is it?" should not consume the same resources as debugging a distributed systems failure or writing a research paper.
removed in v3.0
v2.4 · 3.4 Adaptive Effort RoutingOpenClaw implements **adaptive effort routing** through a model hierarchy:
removed in v3.0
v2.4 · 3.4 Adaptive Effort Routing| Effort Level | Model Tier | Example Tasks | |-------------|-----------|---------------| | **Minimal** | Haiku / local | Formatting, simple lookups, acknowledgments | | **Standard** | Sonnet | Most coding, analysis, conversation | | **Maximum** | Opus | Research papers, complex debugging, multi-step reasoning |
removed in v3.0
v2.4 · 3.4 Adaptive Effort RoutingRouting decisions are informed by both explicit rules (cron jobs always use flat-rate models) and learned patterns (the agent's experience with which tasks actually need frontier reasoning).
removed in v3.0
v2.4 · 3.4 Adaptive Effort Routing**Budget awareness:** A critical component is real-time budget tracking. The agent checks utilisation before spawning expensive operations: >85% weekly budget triggers a downgrade to Sonnet maximum, >95% triggers Haiku/local only. This is not optional — the gateway enforces billing caps, silently rerouting metered model requests that would exceed budget.
removed in v3.0
v2.4 · 3.4 Adaptive Effort Routing**Compounding mechanism:** Each routing decision and its outcome is implicitly available for future routing. When a task that was routed to Opus could have been handled by Sonnet, this is learnable — and the cumulative effect is a steady decrease in cost-per-task without corresponding decrease in quality.
removed in v3.0
not in v2.4
v3.0 · 3. The Recipe System## 3. The Recipe System
not in v2.4
v3.0 · 3.1 Recipe Format### 3.1 Recipe Format
not in v2.4
v3.0 · 3.1 Recipe FormatA recipe is a structured markdown document with the following schema:
not in v2.4
v3.0 · 3.1 Recipe Format```markdown # Recipe: debug
not in v2.4
v3.0 · Metadata - intent: bug-fix, error-investigation, crash-analysis - complexity: medium - estimated-duration: 5-15 minutes - models: [sonnet, opus]## Metadata - intent: bug-fix, error-investigation, crash-analysis - complexity: medium - estimated-duration: 5-15 minutes - models: [sonnet, opus]
not in v2.4
v3.0 · Preconditions - [ ] Error report or symptom description available - [ ] Repository context loaded## Preconditions - [ ] Error report or symptom description available - [ ] Repository context loaded
not in v2.4
v3.0 · Steps## Steps
not in v2.4
v3.0 · Step 1: Reproduce Confirm the bug exists. Run the failing command, check logs, verify the symptom. - tools: [Bash, Read] - gate: Must have confirmed reproduction before proceeding.### Step 1: Reproduce Confirm the bug exists. Run the failing command, check logs, verify the symptom. - tools: [Bash, Read] - gate: Must have confirmed reproduction before proceeding.
not in v2.4
v3.0 · Step 2: Locate Find the root cause. Search the codebase, read stack traces, trace the execution path. - tools: [Grep, Glob, Read] - gate: Must have identified a specific file and line range.### Step 2: Locate Find the root cause. Search the codebase, read stack traces, trace the execution path. - tools: [Grep, Glob, Read] - gate: Must have identified a specific file and line range.
not in v2.4
v3.0 · Step 3: Understand Read the surrounding code. Understand the intent, the constraints, the history. - tools: [Read, Bash(git log)] - gate: Must articulate why the current code is wrong.### Step 3: Understand Read the surrounding code. Understand the intent, the constraints, the history. - tools: [Read, Bash(git log)] - gate: Must articulate why the current code is wrong.
not in v2.4
v3.0 · Step 4: Fix Implement the minimal fix. Change only what is necessary. - tools: [Edit, Write] - gate: Fix must be consistent with the root cause from Step 2.### Step 4: Fix Implement the minimal fix. Change only what is necessary. - tools: [Edit, Write] - gate: Fix must be consistent with the root cause from Step 2.
not in v2.4
v3.0 · Step 5: Verify Run tests. Check that the fix works and nothing else broke. - tools: [Bash] - gate: All relevant tests must pass.### Step 5: Verify Run tests. Check that the fix works and nothing else broke. - tools: [Bash] - gate: All relevant tests must pass.
not in v2.4
v3.0 · Step 6: Document Update any affected documentation, comments, or memory files. - tools: [Edit, Write] - gate: No stale documentation remains.### Step 6: Document Update any affected documentation, comments, or memory files. - tools: [Edit, Write] - gate: No stale documentation remains.
not in v2.4
v3.0 · Success Criteria - Bug is fixed and verified by test - Root cause is documented - No regressions introduced## Success Criteria - Bug is fixed and verified by test - Root cause is documented - No regressions introduced
not in v2.4
v3.0 · Failure Handlers - Step 1 fails (cannot reproduce): Gather more information from user - Step 4 fails (fix too complex): Escalate to user with analysis - Step 5 fails (tests break): Revert and re-analyse ```## Failure Handlers - Step 1 fails (cannot reproduce): Gather more information from user - Step 4 fails (fix too complex): Escalate to user with analysis - Step 5 fails (tests break): Revert and re-analyse ```
not in v2.4
v3.0 · Failure Handlers - Step 1 fails (cannot reproduce): Gather more information from user - Step 4 fails (fix too complex): Escalate to user with analysis - Step 5 fails (tests break): Revert and re-analyse ```The format is deliberately human-readable. Recipes are markdown files, editable in any text editor, storable in the memory hierarchy, and versionable through git. This follows the same design philosophy as the tiered memory system (Section 3.2 of v2.4): transparency, portability, and composability over sophistication.
not in v2.4
v3.0 · 3.2 Built-in Recipes### 3.2 Built-in Recipes
not in v2.4
v3.0 · 3.2 Built-in RecipesPrefrontal v3.0 ships with six built-in recipes covering the most common agent tasks:
not in v2.4
v3.0 · 3.2 Built-in Recipes| Recipe | Steps | Typical Duration | Key Insight | |--------|-------|-----------------|-------------| | **debug** | 6 (reproduce, locate, understand, fix, verify, document) | 5--15 min | Must reproduce before fixing | | **feature** | 7 (clarify, design, plan, implement, test, verify, document) | 10--30 min | Must design before implementing | | **investigate** | 5 (scope, search, analyse, synthesise, report) | 5--20 min | Must scope before searching | | **refactor** | 6 (identify, measure, plan, execute, verify, document) | 10--25 min | Must measure before changing | | **review** | 5 (overview, deep-read, test, assess, report) | 5--15 min | Must read completely before opining | | **deploy** | 7 (pre-check, build, test, stage, verify, promote, post-check) | 10--40 min | Must verify at every stage |
not in v2.4
v3.0 · 3.2 Built-in RecipesEach recipe encodes hard-won operational lessons. The debug recipe's "reproduce before fixing" step prevents the most common agent failure mode: jumping directly to a code change based on the error message without confirming the bug's actual behaviour. The feature recipe's "design before implementing" step prevents premature coding --- the anti-gold-plating principle elevated from a prompt injection to a structural gate.
not in v2.4
v3.0 · 3.3 Custom Recipes### 3.3 Custom Recipes
not in v2.4
v3.0 · 3.3 Custom RecipesUsers can author domain-specific recipes and add them to the recipe library. A data-science team might add recipes for "explore-dataset," "train-model," and "evaluate-results." A DevOps team might add "incident-response," "capacity-planning," and "runbook-execution."
not in v2.4
v3.0 · 3.3 Custom RecipesCustom recipes are stored in the memory hierarchy (under `memory/recipes/`) and are automatically available to Prefrontal's recipe selection. This makes the recipe library a *growing* asset --- each new recipe captures operational knowledge that compounds across future sessions, extending the compounding thesis from individual lessons (v2.4) to entire workflows (v3.0).
not in v2.4
v3.0 · 3.4 Recipe Selection### 3.4 Recipe Selection
not in v2.4
v3.0 · 3.4 Recipe SelectionWhen a user message arrives, Prefrontal classifies the intent and selects the appropriate recipe through a three-tier strategy:
not in v2.4
v3.0 · 3.4 Recipe Selection1. **Keyword matching**: explicit signals in the message ("fix this bug" -> debug, "add a feature" -> feature, "what's going on with" -> investigate). Fast, cheap, handles the common cases.
not in v2.4
v3.0 · 3.4 Recipe Selection2. **Structure analysis**: message length, presence of error messages or stack traces, code blocks, file paths. A message with a stack trace is likely a debug task even if it does not contain the word "bug."
not in v2.4
v3.0 · 3.4 Recipe Selection3. **LLM classification**: for ambiguous messages, Prefrontal's LLM call includes recipe metadata (intent keywords, descriptions) and selects the best match. This is the same call that performs the orchestration, so it incurs no additional cost.
not in v2.4
v3.0 · 3.4 Recipe SelectionFor messages that do not match any recipe --- casual conversation, simple questions, emotional support --- Prefrontal passes through without orchestration. The system detects when structure would add overhead without value.
not in v2.4
v3.0 · 3.5 Step Enforcement### 3.5 Step Enforcement
not in v2.4
v3.0 · 3.5 Step EnforcementEach recipe step includes a **gate** --- a condition that must be satisfied before the agent proceeds to the next step. Gates are expressed in natural language and evaluated by the orchestrator:
not in v2.4
v3.0 · 3.5 Step Enforcement- *"Must have confirmed reproduction before proceeding"* --- Prefrontal checks whether the subagent's output includes evidence of reproduction (a failing test, a reproduced error message, a confirmed symptom). - *"Must have identified a specific file and line range"* --- Prefrontal checks for file paths and line numbers in the investigation output.
not in v2.4
v3.0 · 3.5 Step EnforcementGates are advisory, not absolute. If a subagent presents a compelling case for skipping a step ("the bug is obvious from the error message, reproduction is unnecessary"), Prefrontal can grant an exception. The enforcement is structural --- it creates a default path of thoroughness that requires explicit justification to deviate from, rather than a rigid pipeline that breaks on edge cases.
not in v2.4
v3.0 · 3.5 Step EnforcementThis is the critical difference between a recipe and a script. A script executes mechanically; a recipe provides structure that an intelligent agent can follow, adapt, or override with justification.
··· 1 unchanged paragraph folded ···
v2.4 · 4. Measuring Compounded Intelligence## 4. Measuring Compounded Intelligence
removed in v3.0
v2.4 · 4. Measuring Compounded IntelligenceBefore presenting operational results, we define the metrics used to evaluate them. Compounded intelligence can be measured along the three axes introduced in Section 1.1.
removed in v3.0
v2.4 · 4. Measuring Compounded Intelligence{ width=65% }
removed in v3.0
v2.4 · 4. Measuring Compounded Intelligence**Figure 9.** The three measurement axes for compounded intelligence, arranged along a spectrum from direct observation (FAAR) to counterfactual estimation (TC).
removed in v3.0
v2.4 · 4.1 First-Attempt Accuracy Rate (FAAR)### 4.1 First-Attempt Accuracy Rate (FAAR)
removed in v3.0
v2.4 · 4.1 First-Attempt Accuracy Rate (FAAR)FAAR measures the proportion of tasks in a given category *C* that are completed correctly on the first attempt during time window *T*. A compounding agent shows monotonically increasing FAAR over time. The denominator includes only tasks where the agent attempted a solution (excludes clarification-only turns).
removed in v3.0
v2.4 · 4.2 Resource Efficiency Ratio (RER)### 4.2 Resource Efficiency Ratio (RER)
removed in v3.0
v2.4 · 4.2 Resource Efficiency Ratio (RER)RER compares the resources consumed by equivalent tasks at two different times: RER = resources(t1) / resources(t2), where resources can be measured in tokens, API calls, wall-clock time, or monetary cost. RER > 1.0 indicates compounding (the agent is becoming more efficient). We report RER using token counts as the primary resource measure, as tokens are the most precisely tracked metric in our system.
removed in v3.0
v2.4 · 4.3 Transfer Coefficient (TC)### 4.3 Transfer Coefficient (TC)
removed in v3.0
v2.4 · 4.3 Transfer Coefficient (TC)TC measures the degree to which a lesson learned in domain *A* reduces errors in domain *B*: the error reduction in B attributable to the lesson from A, divided by the baseline error rate in B. Measuring TC requires counterfactual reasoning --- what would the error rate have been without the transferred lesson? --- which makes it the hardest of the three metrics to compute rigorously. In Section 5.3, we approximate TC through case analysis of specific transfer events rather than aggregate statistics.
removed in v3.0
v2.4 · 4.4 Composite Intelligence Index (CII)### 4.4 Composite Intelligence Index (CII)
removed in v3.0
v2.4 · 4.4 Composite Intelligence Index (CII)The three axes combine into a weighted index: CII(T) = alpha * FAAR(T) + beta * log(RER(T)) + gamma * TC(T), where alpha, beta, gamma are deployment-specific weights satisfying alpha + beta + gamma = 1.
removed in v3.0
v2.4 · 4.4 Composite Intelligence Index (CII)**Sensitivity analysis.** Because these weights are not empirically derived, we verify that the compounding trend is robust across a range of reasonable weight distributions. Table 1 reports CII under five weight configurations spanning accuracy-dominant, efficiency-dominant, transfer-dominant, and uniform weightings.
removed in v3.0
v2.4 · 4.4 Composite Intelligence Index (CII)| Config | α | β | γ | CII (M1) | CII (M3) | CII (M6) | Δ M1→M6 | |--------|-----|------|------|----------|----------|----------|----------| | A (primary) | 0.40 | 0.35 | 0.25 | 0.3 | 0.5 | 0.6 | +96% | | B (accuracy-heavy) | 0.60 | 0.25 | 0.15 | 0.4 | 0.6 | 0.6 | +52% | | C (efficiency-heavy) | 0.25 | 0.50 | 0.25 | 0.2 | 0.4 | 0.5 | +161% | | D (transfer-heavy) | 0.25 | 0.25 | 0.50 | 0.2 | 0.3 | 0.4 | +111% | | E (uniform) | 0.33 | 0.33 | 0.33 | 0.2 | 0.4 | 0.5 | +113% |
removed in v3.0
v2.4 · 4.4 Composite Intelligence Index (CII)**Table 1.** CII sensitivity to weight selection. All configurations show substantial improvement (minimum +52%, maximum +161%) from month 1 to month 6, confirming that the compounding trend is not an artifact of weight choice. The absolute CII values vary — accuracy-heavy weighting (Config B) produces higher baselines because FAAR starts at 0.70 — but the *direction and magnitude* of improvement are consistent across all configurations.
removed in v3.0
v2.4 · 4.4 Composite Intelligence Index (CII)The minimum improvement (Config B, +52%) occurs when accuracy dominates because FAAR plateaus earliest. The maximum (Config C, +161%) occurs when efficiency dominates because RER shows the most consistent growth. The key finding is that no reasonable weight distribution produces a flat or declining CII — compounding is a robust property of the system, not a measurement artifact. (We define "reasonable" as any convex combination where each weight ≥ 0.10, ensuring no axis is entirely ignored.)
removed in v3.0
not in v2.4
v3.0 · 4. The Cognitive Cycle (Complete)## 4. The Cognitive Cycle (Complete)
not in v2.4
v3.0 · 4. The Cognitive Cycle (Complete)Version 2.4 acknowledged that its architecture captured "only the second half" of the cognitive cycle --- post-action reflection without pre-action planning. GStack's forcing questions (Tan, 2026) demonstrated the value of pre-action reflection, and we incorporated a minimal version (five forcing questions for complex tasks). But forcing questions are not planning --- they refine intent without producing a structured execution strategy.
not in v2.4
v3.0 · 4. The Cognitive Cycle (Complete)Version 3.0 completes the cycle.
not in v2.4
v3.0 · 4.1 Pre-Action: From Questions to Recipes### 4.1 Pre-Action: From Questions to Recipes
not in v2.4
v3.0 · 4.1 Pre-Action: From Questions to RecipesThe pre-action phase now encompasses:
not in v2.4
v3.0 · 4.1 Pre-Action: From Questions to Recipes1. **Forcing questions** (retained from v2.4): What is the user *actually* asking? What would a wrong answer look like? What constraints exist? These questions refine intent.
not in v2.4
v3.0 · 4.1 Pre-Action: From Questions to Recipes2. **Recipe selection**: based on the refined intent, Prefrontal selects or composes an appropriate recipe. For standard tasks, this means choosing from the built-in library. For novel tasks, Prefrontal composes an ad hoc recipe by combining steps from multiple templates.
not in v2.4
v3.0 · 4.1 Pre-Action: From Questions to Recipes3. **Plan presentation**: for complex tasks (estimated duration >5 minutes or >3 steps), Prefrontal presents the plan to the user before execution. This serves two purposes: it gives the user a chance to redirect ("actually, I just want the investigation, not the fix"), and it creates an explicit contract against which the agent's work can be evaluated.
not in v2.4
v3.0 · 4.1 Pre-Action: From Questions to Recipes4. **Subagent allocation**: Prefrontal assigns recipe steps to subagents, selecting appropriate models for each (Haiku for simple searches, Sonnet for implementation, Opus for complex reasoning). This operationalises the adaptive effort routing from v2.4 at the recipe level.
not in v2.4
v3.0 · 4.2 During-Action: Supervised Execution### 4.2 During-Action: Supervised Execution
not in v2.4
v3.0 · 4.2 During-Action: Supervised ExecutionThe during-action phase is entirely new. Version 2.4 had no mechanism for monitoring agent execution in progress --- the agent ran, and the reflection reviewed the outcome. Version 3.0 introduces:
not in v2.4
v3.0 · 4.2 During-Action: Supervised Execution- **Progress tracking**: each subagent emits structured events as it completes recipe steps. Prefrontal maintains a progress model and updates the UI.
not in v2.4
v3.0 · 4.2 During-Action: Supervised Execution- **Stall detection**: if a subagent stops emitting events, enters a retry loop, or exceeds its time budget, Prefrontal detects the stall and intervenes. Interventions range from providing additional context ("the file you're looking for was renamed in commit abc123") to reassigning the task to a different model.
not in v2.4
v3.0 · 4.2 During-Action: Supervised Execution- **Cross-subagent coordination**: when one subagent's findings affect another's task, Prefrontal relays the relevant information. For example, if the investigation subagent discovers that the bug is in module A (not module B as initially suspected), Prefrontal redirects the fix subagent before it wastes time on the wrong module.
not in v2.4
v3.0 · 4.2 During-Action: Supervised Execution- **User updates**: for tasks exceeding 60 seconds, Prefrontal sends progress summaries to the UI. Users are not left staring at a spinner --- they see which step is active, what has been found so far, and how much remains.
not in v2.4
v3.0 · 4.3 Post-Action: Fractal Reflection, Orchestrated### 4.3 Post-Action: Fractal Reflection, Orchestrated
not in v2.4
v3.0 · 4.3 Post-Action: Fractal Reflection, OrchestratedThe post-action phase retains v2.4's fractal reflection protocol (MEMORY, PATTERN, RIPPLE, IMPROVE) but elevates it from a voluntary prompt instruction to an *orchestrated execution*:
not in v2.4
v3.0 · 4.3 Post-Action: Fractal Reflection, Orchestrated1. **Mandatory execution**: the reflection is not a suggestion in the system prompt --- it is a distinct LLM call initiated by Prefrontal after the recipe completes. The agent cannot skip it.
not in v2.4
v3.0 · 4.3 Post-Action: Fractal Reflection, Orchestrated2. **Recipe-aware reflection**: the reflection receives not just the turn context but the recipe that was executed, the plan that was presented, and the actual execution trace. This enables structured assessment: "Step 3 took 4x longer than expected because the codebase search missed the relevant file --- update the search strategy for this recipe."
not in v2.4
v3.0 · 4.3 Post-Action: Fractal Reflection, Orchestrated3. **Recipe improvement**: when the reflection identifies a systematic issue with a recipe ("the debug recipe should include a 'check recent changes' step before 'locate'"), Prefrontal updates the recipe file. The recipe library evolves through use.
not in v2.4
v3.0 · 4.3 Post-Action: Fractal Reflection, Orchestrated4. **Knowledge writing**: lessons extracted during reflection are written to the appropriate memory tier, exactly as in v2.4. The difference is that these lessons are now *structured by the recipe context* --- "during debug.locate, always check git blame for recent changes" is more actionable than "remember to check git blame."
not in v2.4
v3.0 · 4.4 The FRACTAL Pattern: Cache-Shared Follow-Up Calls### 4.4 The FRACTAL Pattern: Cache-Shared Follow-Up Calls
not in v2.4
v3.0 · 4.4 The FRACTAL Pattern: Cache-Shared Follow-Up CallsThe architectural pattern underlying both the pre-action orchestration and the post-action reflection is what we call the **FRACTAL pattern**: a cache-shared follow-up call with a different role.
not in v2.4
v3.0 · 4.4 The FRACTAL Pattern: Cache-Shared Follow-Up CallsThe fork's `fractal-reflection` extension already implements this pattern for post-action reflection: it makes a second LLM call after each turn, with nearly the same context (exploiting the prompt cache), but with a different instruction ("reflect on what just happened" instead of "execute the user's request"). Version 3.0 applies the same pattern to pre-action orchestration: a first LLM call with the same context but a different instruction ("plan how to handle this request" instead of "handle this request").
not in v2.4
v3.0 · 4.4 The FRACTAL Pattern: Cache-Shared Follow-Up CallsThe FRACTAL pattern is general. Any cognitive function that benefits from the same context but a different perspective --- planning, reflection, review, risk assessment, cost estimation --- can be implemented as a cache-shared call at minimal marginal cost. This transforms the trade-off from "one perspective per turn" to "as many perspectives as are useful, at 5% marginal cost each."
··· 1 unchanged paragraph folded ···
v2.4 · 5. Experience — What Six Months of Operation Taught Us## 5. Experience — What Six Months of Operation Taught Us
removed in v3.0
v2.4 · 5. Experience — What Six Months of Operation Taught UsThis section reports operational data from OpenClaw deployed as a personal assistant from October 2025 through March 2026. The agent handled messaging (WhatsApp, Telegram, Discord), code management (GitHub PRs, CI monitoring), research (web search, paper analysis), and personal tasks (calendar, reminders, file management).
removed in v3.0
v2.4 · 5. Experience — What Six Months of Operation Taught Us**External validation.** Meta-Harness (Lee et al., 2026) provides independent evidence for compounding at the harness level. On TerminalBench-2, Claude Code scored 58% with its default harness; Meta-Harness improved this to 76.4% through iterative optimisation—compounding in action. Their median score (50) on text classification exceeded the best score of all other methods (45.6), demonstrating systematic rather than lucky improvement.
removed in v3.0
v2.4 · 5. Experience — What Six Months of Operation Taught Us**Methodology note:** We present a longitudinal case study from a single deployment (N=1) serving one primary user over six months. Metrics were derived from manual review of session logs (approximately 2,400 sessions over six months) with spot-check sampling rather than exhaustive classification. We report these numbers as indicative of trends rather than statistically rigorous measurements. Section 7.4 discusses the automated evaluation framework needed to address this limitation.
removed in v3.0
v2.4 · 5. Experience — What Six Months of Operation Taught Us**Industrial convergence as validation.** Beyond our operational data, the strongest evidence for the compounding hypothesis comes from convergent design. Three independent teams — building OpenClaw (this paper), Claude Code (Anthropic, 2026), and Meta-Harness (Lee et al., 2026) — arrived at strikingly similar architectures without communication. All three implement tiered file-based memory, periodic self-initiated cognitive cycles, prompt-defined multi-agent orchestration, and background memory consolidation. When independent engineering efforts converge on similar solutions, it suggests — though does not prove — that these patterns are well-suited to the problem. Convergence across different scales and use cases (personal assistant, commercial coding agent, benchmark optimiser) is suggestive of robustness, though we caution against treating it as proof of necessity.
removed in v3.0
v2.4 · 5.1 First-Attempt Accuracy (FAAR)### 5.1 First-Attempt Accuracy (FAAR)
removed in v3.0
v2.4 · 5.1 First-Attempt Accuracy (FAAR)We sampled 50 sessions from each measurement period and classified task outcomes:
removed in v3.0
v2.4 · 5.1 First-Attempt Accuracy (FAAR)| Error Category | FAAR Month 1 | FAAR Month 3 | FAAR Month 6 | ΔFAAR | |---------------|-------------|-------------|-------------|-------| | Operational tasks | 0.60 | 0.85 | 0.88 | +0.28 | | File/path operations | 0.75 | 0.90 | 0.92 | +0.17 | | Tool selection | 0.80 | 0.88 | 0.90 | +0.10 | | **Weighted average** | **0.70** | **0.87** | **0.90** | **+0.20** |
removed in v3.0
v2.4 · 5.1 First-Attempt Accuracy (FAAR)The steepest improvements occurred in months 1–3, corresponding to the period when the operational-lessons file accumulated its most impactful entries. By month 6, FAAR had plateaued — not because the agent stopped learning, but because the remaining errors were genuinely novel rather than repeated.
removed in v3.0
v2.4 · 5.1 First-Attempt Accuracy (FAAR)**Ablation note:** We cannot rigorously isolate which mechanism drives FAAR improvement, as all four mechanisms were active throughout. However, we observe that the operational-lessons knowledge file — a direct output of fractal reflection — was the most frequently retrieved file during correct first attempts (appearing in retrieval results for 73% of sampled correct operational tasks in month 6, compared to 12% in month 1). This suggests fractal reflection is the primary driver, though we cannot rule out confounding effects from the other mechanisms.
removed in v3.0
v2.4 · 5.2 Resource Efficiency (RER)### 5.2 Resource Efficiency (RER)
removed in v3.0
v2.4 · 5.2 Resource Efficiency (RER)Token consumption per equivalent task decreased over time:
removed in v3.0
v2.4 · 5.2 Resource Efficiency (RER)| Task Type | Month 1 (avg tokens) | Month 6 (avg tokens) | RER | |-----------|---------------------|---------------------|-----| | Morning briefing | ~4,500 | ~2,800 | 1.61 | | PR review | ~6,200 | ~4,100 | 1.51 | | Memory retrieval | ~1,800 | ~1,200 | 1.50 | | **Weighted average** | | | **1.54** |
removed in v3.0
v2.4 · 5.2 Resource Efficiency (RER)All three task types show RER > 1.0, confirming that the agent became more efficient over time. **Overhead note:** These token counts *include* the fractal reflection overhead — the reflection step itself consumes approximately 200–500 tokens per turn. The efficiency gains are net of this cost; without reflection, per-turn token counts would be lower but the compounding benefits that drive RER improvement would not materialise. The primary driver was not prompt optimisation but *knowledge accumulation*: the agent needed fewer exploratory tool calls because it already knew where to look, which commands to run, and what patterns to expect.
removed in v3.0
v2.4 · 5.3 Retention and Transfer (TC)### 5.3 Retention and Transfer (TC)
removed in v3.0
v2.4 · 5.3 Retention and Transfer (TC)The most compelling evidence for compounding came from cross-domain transfer. We define a **transfer event** as an instance where: (a) a lesson was encoded in the knowledge files from domain A, (b) the lesson was retrieved during a task in domain B (confirmed via retrieval logs), and (c) the task outcome in domain B was correct on first attempt where prior attempts without the lesson had failed. We identified three clear transfer events through manual log analysis meeting these criteria:
removed in v3.0
v2.4 · 5.3 Retention and Transfer (TC)**Transfer Event 1: Verification discipline (code → calendar)** An operational lesson learned during a failed git merge — "verify the current state before assuming the expected state" — later prevented an error in calendar management, where the agent would have created a duplicate event without first checking whether the event already existed. The lesson transferred because it was encoded at Level 3 (system level: "confidence without verification is the structural cause") rather than Level 1 (task level: "check git status before merge").
removed in v3.0
v2.4 · 5.3 Retention and Transfer (TC)Estimated TC(code→calendar) ≈ 0.15 (the lesson prevented approximately 15% of the baseline calendar error rate).
removed in v3.0
v2.4 · 5.3 Retention and Transfer (TC)**Transfer Event 2: Response format patterns (WhatsApp → Discord)** Conversational patterns learned in WhatsApp group management — when to respond, when to stay silent, how to handle multi-party exchanges — transferred directly to Discord channels with minimal adaptation.
removed in v3.0
v2.4 · 5.3 Retention and Transfer (TC)Estimated TC(WhatsApp→Discord) ≈ 0.25.
removed in v3.0
v2.4 · 5.3 Retention and Transfer (TC)**Transfer Event 3: Tool fallback strategy (exec → memory)** The lesson "try `read` before `exec` for file checks" (learned from repeated exec approval blocks) generalised to "try the simpler tool first" across multiple tool-selection decisions.
removed in v3.0
v2.4 · 5.3 Retention and Transfer (TC)Estimated TC(exec→general_tools) ≈ 0.10.
removed in v3.0
v2.4 · 5.3 Retention and Transfer (TC)These TC estimates are approximate and based on counterfactual reasoning (comparing error rates before and after the transfer event in the target domain). A rigorous TC measurement would require controlled experiments with and without the transferred knowledge — an important direction for future work.
removed in v3.0
v2.4 · 5.3 Retention and Transfer (TC)**Cross-model transfer.** Meta-Harness (Lee et al., 2026) provides quantitative evidence for a stronger form of transfer: their math reasoning harness, evolved on one model, improved accuracy across five unseen models (+4.7 points average). Their text classification harness generalised from 3 training datasets to 9 unseen datasets without retraining. This demonstrates that prompt-level improvements transfer across both model and task boundaries—precisely the compounding property our framework predicts.
removed in v3.0
v2.4 · 5.4 Composite Intelligence Index### 5.4 Composite Intelligence Index
removed in v3.0
v2.4 · 5.4 Composite Intelligence IndexApplying the CII formula with our primary weights (α=0.4, β=0.35, γ=0.25):
removed in v3.0
v2.4 · 5.4 Composite Intelligence Index| Period | FAAR | RER | TC (avg) | CII | |--------|------|-----|----------|-----| | Month 1 | 0.70 | 1.00 | 0.00 | 0.3 | | Month 3 | 0.87 | 1.30 | 0.10 | 0.5 | | Month 6 | 0.90 | 1.54 | 0.17 | 0.6 |
removed in v3.0
v2.4 · 5.4 Composite Intelligence Index{ width=50% }
removed in v3.0
v2.4 · 5.4 Composite Intelligence Index**Figure 4.** Composite Intelligence Index trajectory over six months, showing consistent improvement across all weight configurations (Table 1). The steepest gains occur in months 1--3 as the highest-value lessons are captured first.
removed in v3.0
v2.4 · 5.4 Composite Intelligence IndexCII increased by 96% from month 1 to month 6 under the primary weighting. As shown in the sensitivity analysis (Table 1, Section 4.4), the *direction* of improvement is consistent across weight configurations (+52% to +161%). However, we emphasise that the absolute CII values carry limited precision: the TC component relies on counterfactual estimates rather than controlled measurements, and the FAAR/RER components derive from spot-check sampling rather than exhaustive classification. We present CII as a directional indicator of compounding — useful for tracking trends within a single deployment — rather than a precise scientific measurement. The consistent upward trend across all weight configurations is the meaningful signal; the specific percentages should be interpreted cautiously. The steepest gains occurred in months 1–3 regardless of weighting, consistent with a learning curve that captures the highest-value lessons early and encounters diminishing returns as the "easy" compounding opportunities are exhausted.
removed in v3.0
v2.4 · 5.4 Composite Intelligence Index
removed in v3.0
v2.4 · 5.4 Composite Intelligence Index**Figure 5.** The boundary between prompt-level intelligence (architecture, memory, orchestration --- compounds over time) and model-level intelligence (reasoning, coding, knowledge --- improves only through provider updates). Most available gains live at the prompt level.
removed in v3.0
v2.4 · 5.5 The Prompt-Level vs Model-Level Boundary### 5.5 The Prompt-Level vs Model-Level Boundary
removed in v3.0
v2.4 · 5.5 The Prompt-Level vs Model-Level BoundaryDuring the six-month observation period, the underlying models were updated multiple times by their providers. These updates improved raw capability — better coding, longer context, improved instruction following. But they did *not* improve the agent's operational knowledge, accumulated lessons, or task-specific patterns.
removed in v3.0
v2.4 · 5.5 The Prompt-Level vs Model-Level BoundaryConversely, the prompt-level mechanisms described in Section 3 produced steady improvement *independent* of model updates. When a model update coincided with a prompt-level improvement, their effects were additive.
removed in v3.0
v2.4 · 5.5 The Prompt-Level vs Model-Level BoundaryThis suggests a practical rule: **invest in prompt-level compounding first, model upgrades second.** The former compounds indefinitely; the latter provides one-time jumps that benefit all users equally.
removed in v3.0
v2.4 · 5.6 What Didn't Work### 5.6 What Didn't Work
removed in v3.0
v2.4 · 5.6 What Didn't WorkIntellectual honesty requires documenting failures:
removed in v3.0
v2.4 · 5.6 What Didn't Work1. **Over-writing:** The memory system writes too much. Without utility-based pruning, the knowledge files grew to include entries of marginal value, increasing retrieval noise. By month 6, the knowledge directory contained over 200 files, of which we estimate fewer than half are regularly useful.
removed in v3.0
v2.4 · 5.6 What Didn't Work2. **Reflection fatigue:** In high-frequency interaction sessions, mandatory reflection on every turn created visible latency and user frustration. The reflection protocol needs a "lightweight mode" for rapid exchanges where a full four-question reflection is disproportionate to the turn's complexity.
removed in v3.0
v2.4 · 5.6 What Didn't Work3. **Sub-agent fragility:** Spawned sub-agents do not survive process restarts. Long-running delegated tasks (research, document generation) are vulnerable to infrastructure interruptions, requiring manual re-initiation.
removed in v3.0
v2.4 · 5.6 What Didn't Work4. **Temporal memory gaps:** The file-based memory system has no built-in notion of time beyond filename dates. There is no way to query "what was I doing at this time last week?" without manual search. Temporal and relational memory linking remains an open problem.
removed in v3.0
v2.4 · 5.6 What Didn't Work5. **Evaluation limitations:** The N=1 deployment and manual log review methodology limit the generalisability of our findings. We cannot claim these results transfer to other users, domains, or agent architectures without broader evaluation.
removed in v3.0
not in v2.4
v3.0 · 5. Integration with Existing Extensions## 5. Integration with Existing Extensions
not in v2.4
v3.0 · 5. Integration with Existing ExtensionsPrefrontal v3.0 does not replace the existing extension ecosystem --- it orchestrates it. Each extension retains its autonomous function while gaining a coordination layer.
not in v2.4
v3.0 · 5.1 Total Recall (Memory Retrieval)### 5.1 Total Recall (Memory Retrieval)
not in v2.4
v3.0 · 5.1 Total Recall (Memory Retrieval)Total Recall provides the hybrid retrieval system (semantic search via local embeddings + structured search via filename patterns) that supplies context to every agent turn. In v3.0, Prefrontal uses Total Recall in two new ways:
not in v2.4
v3.0 · 5.1 Total Recall (Memory Retrieval)- **Recipe-contextual retrieval**: when selecting a recipe, Prefrontal queries Total Recall for prior executions of the same recipe type, injecting relevant lessons into the plan. "Last time you ran the debug recipe on this module, the root cause was in the dependency injection layer."
not in v2.4
v3.0 · 5.1 Total Recall (Memory Retrieval)- **Reflection-driven writes**: knowledge extracted during fractal reflection is written back through Total Recall's indexing pipeline, ensuring new lessons are immediately retrievable in future sessions.
not in v2.4
v3.0 · 5.2 Identity Persistence (SOUL.md)### 5.2 Identity Persistence (SOUL.md)
not in v2.4
v3.0 · 5.2 Identity Persistence (SOUL.md)The agent's identity --- personality, values, communication style --- is encoded in SOUL.md and loaded into every LLM call. In v3.0, this identity persists across all three phases of the cognitive cycle. The Prefrontal orchestration call, the subagent execution calls, and the fractal reflection call all share the same SOUL.md, ensuring that the agent's personality is consistent whether it is planning, executing, or reflecting.
not in v2.4
v3.0 · 5.2 Identity Persistence (SOUL.md)This is non-trivial. In systems where orchestration is handled by a separate "planner" agent with its own persona, the user experiences personality discontinuities --- the planner is formal, the executor is casual, the reviewer is critical. By sharing SOUL.md across all calls, Prefrontal maintains a unified voice.
not in v2.4
v3.0 · 5.3 Learned Intuition (AMYGDALA)### 5.3 Learned Intuition (AMYGDALA)
not in v2.4
v3.0 · 5.3 Learned Intuition (AMYGDALA)The AMYGDALA extension (Serra, 2026) --- a neural action gating system that learns to recognise dangerous operations through situation embeddings --- integrates with v3.0 at the subagent level. Each subagent's tool calls pass through AMYGDALA's prudence network before execution, providing learned safety gating that complements the recipe's structural gates.
not in v2.4
v3.0 · 5.3 Learned Intuition (AMYGDALA)The integration is bidirectional: AMYGDALA's training data now includes recipe context (which step, which recipe, what preconditions were met), enabling the prudence network to learn that "a file write during debug.fix after successful debug.locate is safe" while "a file write without prior investigation is dangerous." Recipe context makes safety gating more precise.
not in v2.4
v3.0 · 5.4 Fractal Reflection (Orchestrated)### 5.4 Fractal Reflection (Orchestrated)
not in v2.4
v3.0 · 5.4 Fractal Reflection (Orchestrated)In v2.4, the `fractal-reflection` extension operated independently --- a post-turn LLM call that ran on its own schedule. In v3.0, Prefrontal orchestrates when reflection runs and what context it receives:
not in v2.4
v3.0 · 5.4 Fractal Reflection (Orchestrated)- **After recipe completion**: full reflection with recipe context, execution trace, and plan comparison. - **After simple tasks**: lightweight reflection (MEMORY only, skip PATTERN/RIPPLE/IMPROVE). - **After failures**: extended reflection with root cause analysis and recipe update recommendations.
not in v2.4
v3.0 · 5.4 Fractal Reflection (Orchestrated)This orchestration eliminates the "reflection fatigue" identified in v2.4 Section 5.6 --- the problem of mandatory reflection on every turn creating visible latency during rapid exchanges. By matching reflection depth to task complexity, v3.0 preserves compounding while reducing overhead.
··· 1 unchanged paragraph folded ···
v2.4 · 5.7 Implementation: The Prefrontal Plugin### 5.7 Implementation: The Prefrontal Plugin
removed in v3.0
v2.4 · 5.7 Implementation: The Prefrontal PluginDuring the writing of this paper, we simultaneously implemented its architectural proposals as a production extension for the OpenClaw fork. The **Prefrontal Plugin** comprises approximately 4,500 lines of TypeScript across 15 modules, with 110 passing tests, delivered in 39 commits over a single day.
removed in v3.0
v2.4 · 5.7 Implementation: The Prefrontal PluginThe implementation is structured in four priority tiers:
removed in v3.0
v2.4 · 5.7 Implementation: The Prefrontal Plugin**P0 (live, hooked into every turn):** - **Exploration gate** (`exploration-gate.ts`, 80 lines, 18 tests): blocks mutating tools (Edit, Write, exec) until the agent has performed at least one read-only operation (Read, Grep, Glob). This prevents the "confidence without verification" failure mode identified in Section 3.1 --- the agent must explore before it modifies. In practice, we observed this gate triggering on approximately 15% of turns during the first week of deployment, each representing a prevented blind-edit. - **Anti-gold-plating rules** (`anti-goldplating.ts`, 50 lines, 11 tests): injects 11 engineering discipline rules into every prompt --- "don't add features beyond what was asked," "three similar lines are better than a premature abstraction," "read the file before modifying it." These rules operationalise the "deliberate simplicity" design principle from Section 3. - **Forcing questions** (`forcing-questions.ts`, 50 lines, 9 tests): implements pre-action reflection --- five questions injected before complex tasks, closing the cognitive cycle described in Section 3.1.
removed in v3.0
v2.4 · 5.7 Implementation: The Prefrontal Plugin**P1 (tested, wiring pending):** - **Tool concurrency partitioner** (`tool-concurrency.ts`, 65 lines, 21 tests): classifies tools as concurrent (read-only, safe to parallelise) or serialised (mutating, one-at-a-time). This implements the safe tool partitioning principle from Section 3. - **Prompt cache boundary** (`prompt-cache-boundary.ts`, 50 lines, 14 tests): splits the system prompt into static (cacheable across sessions) and dynamic (per-turn) segments, implementing the cache-aware prompt anatomy described in Section 3. Expected token savings: 30--50% on cache misses.
removed in v3.0
v2.4 · 5.7 Implementation: The Prefrontal Plugin**P2 (tested, wiring pending):** - **Fork sub-agents** (`fork-subagent.ts`, 45 lines, 13 tests): enables child agents that inherit the parent's rendered prompt, sharing the prompt cache. This mirrors Claude Code's forked agent pattern described in Section 3.3. - **Deferred tool loading** (`deferred-tools.ts`, 80 lines, 14 tests): loads tool schemas on demand via a ToolSearch pattern rather than injecting all tool definitions into every prompt, reducing base prompt size.
removed in v3.0
v2.4 · 5.7 Implementation: The Prefrontal Plugin**P3 (live, hooked):** - **Permission hooks** (`permission-hooks.ts`, 50 lines, 5 tests): user-defined shell scripts gate tool calls, adding a human-in-the-loop safety layer not described in the original architecture but motivated by the transparency principles in Section 6.5. - **Denial tracking** (`denial-tracking.ts`, 40 lines, 5 tests): prevents infinite tool-denial loops by escalating after three consecutive denials --- a failure mode we observed in production where the agent would retry a denied operation indefinitely.
removed in v3.0
v2.4 · 5.7 Implementation: The Prefrontal PluginThe implementation also includes a **live observability UI**: a compact call tree panel (`prefrontal-tree.ts`) displaying agent topology with real-time phase indicators (thinking, tool execution, responding, reflecting), provider logos, and session tracking. A **guardian process** (`cron-health-gate.sh`) monitors the Prefrontal extension every three minutes and triggers automatic recovery if it becomes unresponsive.
removed in v3.0
v2.4 · 5.7 Implementation: The Prefrontal PluginA follow-up implementation session (same day) closed four of the five architectural gaps identified in the initial deployment:
removed in v3.0
v2.4 · 5.7 Implementation: The Prefrontal Plugin- **Effort router** (`effort-router.ts`, 11 tests): monitors subagent spawns and logs warnings when expensive models (Opus) are assigned to simple tasks. Wired into the `subagent_spawned` hook. This operationalises the adaptive effort routing described in Section 3.4 --- not yet as an enforcing gate, but as an observability signal that feeds into future routing optimisation.
removed in v3.0
v2.4 · 5.7 Implementation: The Prefrontal Plugin- **CORF trigger** (`corf-trigger.ts`, 12 tests): detects high-stakes decisions --- those involving irreversible actions, security-sensitive operations, or cross-domain trade-offs --- and flags them for SYNAPSE multi-model deliberation. This bridges Section 3.3's CORF parallelism with the live orchestration layer, routing complex decisions to the Round Table extension.
removed in v3.0
v2.4 · 5.7 Implementation: The Prefrontal Plugin- **Feature flags** (`feature-flags.ts`, 5 tests): wraps every hook (exploration gate, anti-gold-plating, forcing questions, permission hooks, denial tracking, effort router, CORF trigger, FAAR tracker) in a per-hook enable/disable flag, configurable via gateway RPC. This enables the A/B testing capability described in Section 6.5 and provides continuous ablation data as a byproduct of normal operation.
removed in v3.0
v2.4 · 5.7 Implementation: The Prefrontal Plugin- **FAAR tracker** (`faar-tracker.ts`, 13 tests): records every task outcome with category, model used, token count, and success/failure classification. Exposes metrics via `prefrontal.metrics` RPC endpoint. This begins to automate the manual log review methodology described in Section 5, moving toward the automated evaluation framework proposed in Section 7.4.
removed in v3.0
v2.4 · 5.7 Implementation: The Prefrontal PluginThe total implementation now comprises 49 commits, 35 new files, 3,883 lines of code, and 151 passing tests across 12 test files. Six new gateway RPC methods expose real-time orchestration state. All hooks are feature-flagged for ablation studies.
removed in v3.0
v2.4 · 5.7 Implementation: The Prefrontal Plugin**Remaining gaps.** The P1 modules (tool concurrency and prompt cache boundary) and P2 modules (fork subagents and deferred tool loading) remain tested but unwired, pending integration with the gateway runner. These represent the cache-optimisation layer --- important for cost efficiency but not for functional correctness. Additionally, the AMYGDALA neural action gating extension (Serra, 2026) was enabled during this session at 50% influence (Phase 1, `alphaPrudence=0.50`), marking its first production activation after weeks of nightly training with the models offline.
removed in v3.0
v2.4 · 6. Discussion## 6. Discussion
removed in v3.0
v2.4 · 6.1 The Compounding Hypothesis### 6.1 The Compounding Hypothesis
removed in v3.0
v2.4 · 6.1 The Compounding HypothesisOur central claim — that agent intelligence compounds through architecture, not model scale — has a strong form and a weak form.
removed in v3.0
v2.4 · 6.1 The Compounding HypothesisThe **strong form** states that prompt-level mechanisms can produce unbounded improvement over time, limited only by the quality of the reflection protocol and the capacity of the memory system. We do not have evidence for this claim. Our data covers six months, and improvement rates were already plateauing by month three.
removed in v3.0
v2.4 · 6.1 The Compounding HypothesisThe **weak form** states that prompt-level mechanisms produce significant, measurable improvement that is additive with model-level improvements and unavailable to agents that lack these mechanisms. We believe our data supports this claim, with CII increasing approximately 96% over six months (robust across weight configurations per Table 1) while the underlying models provided only incremental, non-compounding improvements. The caveats noted in Section 5.6 apply.
removed in v3.0
v2.4 · 6.2 Why Files Beat Databases (For Now)### 6.2 Why Files Beat Databases (For Now)
removed in v3.0
v2.4 · 6.2 Why Files Beat Databases (For Now)A common reaction to our file-based memory architecture is that it should be replaced with a proper database — vector store, graph database, or relational database with full-text search. We have resisted this for principled reasons:
removed in v3.0
v2.4 · 6.2 Why Files Beat Databases (For Now)1. **Human readability:** The operator can open any memory file in a text editor and see exactly what the agent remembers. This transparency is not a convenience — it is a safety mechanism. An agent with opaque memories is an agent that cannot be audited.
removed in v3.0
v2.4 · 6.2 Why Files Beat Databases (For Now)2. **Model compatibility:** Every language model can read markdown. Not every model can execute SQL queries or traverse graph structures effectively.
removed in v3.0
v2.4 · 6.2 Why Files Beat Databases (For Now)3. **Graceful degradation:** If the retrieval system fails, the agent can still function by reading files directly. A database failure is more catastrophic.
removed in v3.0
v2.4 · 6.2 Why Files Beat Databases (For Now)4. **Editability:** Correcting a false memory is a text edit. Correcting a false embedding in a vector store requires re-embedding, re-indexing, and hoping the correction propagates through similarity searches.
removed in v3.0
v2.4 · 6.2 Why Files Beat Databases (For Now)These advantages are contingent on scale. At some point — perhaps thousands of knowledge files, perhaps millions of memory entries — the file-based approach will break down. Packer et al. (2023) demonstrate that programmatic memory management becomes necessary as context demands grow. But for a personal assistant with hundreds of files, the simplicity-to-capability ratio favours files.
removed in v3.0
v2.4 · 6.3 Comparison with Skill Libraries### 6.3 Comparison with Skill Libraries
removed in v3.0
v2.4 · 6.3 Comparison with Skill LibrariesVoyager's skill library (Wang et al., 2023) accumulates executable programs; our knowledge files accumulate natural-language lessons. Both are implementations of the same principle — intelligence as accumulated, reusable competence — but they target different abstraction levels. Voyager skills are precise and machine-executable but narrow; our lessons are fuzzy and require model interpretation but transfer more broadly. A hybrid approach — compiling frequently-used natural-language lessons into structured, executable patterns (perhaps via DSPy-style compilation) — is a promising direction.
removed in v3.0
v2.4 · 6.4 The Model-Level Horizon### 6.4 The Model-Level Horizon
removed in v3.0
v2.4 · 6.4 The Model-Level HorizonWhat would change if foundation model providers exposed more of their models' internal reasoning? Two possibilities are particularly relevant:
removed in v3.0
v2.4 · 6.4 The Model-Level Horizon**Per-turn state coupling:** If models could maintain hidden state between turns — not just the context window, but actual learned adjustments — the amnesia tax would be partially addressed at the model level. This would not eliminate the need for external memory (the state would still be lost across sessions) but would reduce within-session re-learning.
removed in v3.0
v2.4 · 6.4 The Model-Level Horizon**Reasoning transparency:** If models exposed their chain-of-thought reasoning in a structured, machine-readable format (rather than natural language), the fractal reflection protocol could operate on the model's *actual* reasoning rather than its *reported* reasoning. This would improve reflection quality and reduce the risk of confabulated self-assessments.
removed in v3.0
v2.4 · 6.4 The Model-Level HorizonBoth possibilities are speculative but directionally likely as providers compete on agent-friendliness.
removed in v3.0
v2.4 · 6.5 Deployment Patterns: Feature-Flagged Cognitive Architecture### 6.5 Deployment Patterns: Feature-Flagged Cognitive Architecture
removed in v3.0
v2.4 · 6.5 Deployment Patterns: Feature-Flagged Cognitive ArchitectureClaude Code's codebase uses 44 feature flags to gate experimental cognitive capabilities, with dead-code elimination stripping disabled features from production builds. This deployment pattern enables A/B testing of individual cognitive mechanisms — effectively providing continuous ablation data as a byproduct of normal operation. Our current architecture deploys all mechanisms simultaneously, making formal ablation studies (Section 7.6) the only path to isolating individual contributions. Feature-flagged cognitive architecture is a practical direction for future work.
removed in v3.0
v2.4 · 6.5 Deployment Patterns: Feature-Flagged Cognitive ArchitectureA related observation: the Claude Code source also revealed that production agent systems make deliberate architectural choices about agent transparency — some systems require agents to identify themselves, others enable concealment. Our architecture requires transparency by design (identity files are loaded into every prompt), which we consider both an ethical and practical advantage for trust calibration, though a full discussion of agent identity ethics is beyond this paper's scope.
removed in v3.0
v2.4 · 6.6 The Bitter Lesson for Orchestration### 6.6 The Bitter Lesson for Orchestration
removed in v3.0
v2.4 · 6.6 The Bitter Lesson for OrchestrationMeta-Harness (Lee et al., 2026) and our own experience converge on a provocative conclusion: the orchestration layer — system prompts, memory schemas, reflection protocols — is the last handwritten piece of the AI stack. As foundation models improve, self-evolved architectures will increasingly outperform hand-tuned ones. The recursive stacking insight is key: as models improve → harness optimisation improves → effective performance improves → better training signal for the next cycle. This is the logical endpoint of our compounding thesis. The video commentary on the Claude Code leak made this connection explicit: "Now we can plug Claude Code into Meta-Harness and allow it to recursively self-improve" — the three-way convergence is not just theoretical but operationally achievable.
removed in v3.0
not in v2.4
v3.0 · 6. Evaluation Design## 6. Evaluation Design
not in v2.4
v3.0 · 6.1 FAAR Improvement Targets### 6.1 FAAR Improvement Targets
not in v2.4
v3.0 · 6.1 FAAR Improvement TargetsThe recipe system should produce measurable improvements in first-attempt accuracy by preventing the most common failure modes:
not in v2.4
v3.0 · 6.1 FAAR Improvement Targets| Failure Mode | v2.4 FAAR Impact | v3.0 Mechanism | Target FAAR Delta | |-------------|-------------------|----------------|-------------------| | Fixing without reproducing | -0.08 | debug recipe step gate | +0.06 | | Coding without designing | -0.06 | feature recipe step gate | +0.04 | | Searching without scoping | -0.05 | investigate recipe step gate | +0.03 | | Skipping verification | -0.04 | all recipes include verify step | +0.03 | | **Cumulative** | **-0.23** | | **+0.16** |
not in v2.4
v3.0 · 6.1 FAAR Improvement TargetsThese targets would move the weighted FAAR from 0.90 (v2.4 month 6) to approximately 0.95 --- approaching the ceiling imposed by genuinely novel problems that no recipe can anticipate.
not in v2.4
v3.0 · 6.2 Cost Analysis### 6.2 Cost Analysis
not in v2.4
v3.0 · 6.2 Cost AnalysisThe recipe engine adds two LLM calls per complex task (orchestration + reflection). The cost depends on cache hit rates:
not in v2.4
v3.0 · 6.2 Cost Analysis| Scenario | Cache Hit Rate | Overhead per Turn | Monthly Impact (est.) | |----------|---------------|-------------------|----------------------| | Optimal (stable context) | 95% | ~5% per call, ~10% total | +$2--4 | | Typical (moderate context churn) | 85% | ~8% per call, ~16% total | +$4--8 | | Worst case (high context churn) | 70% | ~15% per call, ~30% total | +$8--15 |
not in v2.4
v3.0 · 6.2 Cost AnalysisEven in the worst case, the overhead is modest relative to the cost savings from improved first-attempt accuracy (fewer retry loops, fewer wasted tool calls, fewer human interventions to correct agent mistakes).
not in v2.4
v3.0 · 6.3 Latency Analysis### 6.3 Latency Analysis
not in v2.4
v3.0 · 6.3 Latency AnalysisThe orchestration call adds latency before the agent begins visible work:
not in v2.4
v3.0 · 6.3 Latency Analysis| Task Complexity | Orchestration Latency | User-Perceived Impact | |----------------|----------------------|----------------------| | Simple (passthrough) | <100ms (classification only) | None | | Medium (recipe selection) | 1--3s | Minor (plan displayed immediately) | | Complex (recipe + subagent allocation) | 3--8s | Offset by progress visibility |
not in v2.4
v3.0 · 6.3 Latency AnalysisFor complex tasks, the orchestration latency is offset by faster overall completion (fewer retries, fewer wrong turns) and improved user experience (progress visibility instead of opaque waiting).
not in v2.4
v3.0 · 6.4 Comparison with Claude Code's Skill System### 6.4 Comparison with Claude Code's Skill System
not in v2.4
v3.0 · 6.4 Comparison with Claude Code's Skill System| Dimension | Claude Code Skills | Prefrontal Recipes | |-----------|-------------------|-------------------| | Selection | Hard-coded triggers in system prompt | LLM-classified intent matching | | Execution | Injected as prompt text, agent follows voluntarily | Orchestrated with step gates and monitoring | | Parallelism | Fork subagents, unsupervised | Fork subagents, supervised by Prefrontal | | Learning | Skills are static (updated by developers) | Recipes evolve through fractal reflection | | Cost model | Single call (skill text in prompt) | Cache-shared calls (~10% overhead) | | Failure handling | Agent's own judgment | Structured failure handlers per step |
not in v2.4
v3.0 · 6.4 Comparison with Claude Code's Skill SystemThe key differentiator is **learning**. Claude Code's skills are effective but static --- they encode developer knowledge at deployment time and do not improve through use. Prefrontal's recipes evolve: each execution generates reflection data that can update the recipe itself, creating a compounding loop where recipes get better the more they are used.
··· 1 unchanged paragraph folded ···
v2.4 · 7. Future Work## 7. Future Work
removed in v3.0
v2.4 · 7.1 Utility-Based Memory Pruning### 7.1 Utility-Based Memory Pruning
removed in v3.0
v2.4 · 7.1 Utility-Based Memory PruningThe most urgent architectural gap is the absence of utility-based pruning. Memories should be evaluated for their expected future usefulness before being written, and periodically re-evaluated for relevance. MemexRL (Chen et al., 2026) provides a theoretical framework; implementation within a file-based system requires translating value estimates into retention decisions.
removed in v3.0
v2.4 · 7.2 Learned Forgetting### 7.2 Learned Forgetting
removed in v3.0
v2.4 · 7.2 Learned ForgettingComplementary to pruning, learned forgetting would actively decay memories that have not been accessed or referenced within a time window. This is analogous to the spaced repetition principle: memories that are never tested are effectively lost.
removed in v3.0
v2.4 · 7.3 Temporal and Relational Memory Linking### 7.3 Temporal and Relational Memory Linking
removed in v3.0
v2.4 · 7.3 Temporal and Relational Memory LinkingCurrent memory files exist in isolation. A knowledge entry about "git merge safety" does not link to the incident that produced it, the daily log entry that recorded it, or the project it was relevant to. Adding temporal (when) and relational (why, what-else) links would enable queries like "show me everything related to the README incident" or "what lessons were learned during the J-011 paper project?"
removed in v3.0
v2.4 · 7.4 Automated Evaluation Framework### 7.4 Automated Evaluation Framework
removed in v3.0
v2.4 · 7.4 Automated Evaluation FrameworkThe metrics defined in Section 4 require automated measurement to move beyond the manual log review methodology used here. Building a pipeline that classifies tasks, measures first-attempt accuracy, tracks resource consumption, and estimates transfer coefficients would transform compounded intelligence from a qualitative observation to a quantitative science. This would also enable evaluation across multiple users and deployments, addressing the N=1 limitation of this study.
removed in v3.0
v2.4 · 7.5 Learned Action Gating### 7.5 Learned Action Gating
removed in v3.0
v2.4 · 7.5 Learned Action GatingA critical gap in our current architecture is **action gating** — the ability to recognise that a proposed action is dangerous before executing it. We have observed failure modes where the agent had all the information needed to avoid a catastrophic action (e.g., overwriting a carefully-maintained file during an automated merge) and proceeded anyway, because safety rules are encoded in prompt text rather than learned intuition.
removed in v3.0
v2.4 · 7.5 Learned Action GatingA promising direction is moving safety rules from prompt-level instructions into small neural networks that learn to gate actions through situation embeddings — converting implicit pattern recognition ("this feels like it could go wrong") into explicit, learned safety rules. We have begun exploring this direction in a companion paper, **AMYGDALA** (Adaptive Modulation of Your General Disposition via Affective Learned Association; Serra, 2026), which proposes learned action gating through an ensemble of lightweight prudence networks trained on operational data. This would also alleviate **context pressure** — the 2,000–3,000 tokens currently consumed by safety instructions in the system prompt could be recovered for task context.
removed in v3.0
v2.4 · 7.6 Formal Ablation Studies### 7.6 Formal Ablation Studies
removed in v3.0
v2.4 · 7.6 Formal Ablation StudiesOur current results cannot isolate the contribution of individual mechanisms. A rigorous ablation study — systematically disabling fractal reflection, tiered memory, CORF, and adaptive routing — would quantify each mechanism's contribution to the overall CII improvement. This is technically straightforward but operationally expensive, requiring parallel deployments over multiple weeks.
removed in v3.0
v2.4 · 7.7 Self-Evolving Agent Architecture### 7.7 Self-Evolving Agent Architecture
removed in v3.0
v2.4 · 7.7 Self-Evolving Agent ArchitectureThe most provocative direction suggested by the three-way convergence is applying the compounding principle *to the architecture itself*. Currently, our reflection protocol, memory schema, and routing rules are hand-designed. Meta-Harness (Lee et al., 2026) demonstrates that these can be automatically optimised: their system treats the entire harness — prompts, tools, orchestration code — as the optimisation target, using execution traces as the fitness signal.
removed in v3.0
v2.4 · 7.7 Self-Evolving Agent ArchitectureApplied to PREFRONTAL, this would mean: the fractal reflection prompt evolves based on which reflections actually prevented future errors; the memory tier boundaries shift based on which tiers are most frequently retrieved; the CORF fan-out strategy adapts based on which model combinations produce the best cross-validation results. Each component improves itself through the same compounding mechanism it provides to the agent's task performance.
removed in v3.0
v2.4 · 7.7 Self-Evolving Agent ArchitectureClaude Code's KAIROS mode includes a feature called autoDream — a background consolidation process where a forked subagent reviews session transcripts, merges observations, removes contradictions, and converts vague insights into absolute facts. This is automated self-improvement applied to memory content. Extending it to memory *structure* — letting the system discover optimal tier boundaries, index formats, and retrieval strategies — is the natural next step.
removed in v3.0
v2.4 · 7.7 Self-Evolving Agent Architecture{ width=60% }
removed in v3.0
v2.4 · 7.7 Self-Evolving Agent Architecture**Figure 7.** The recursive self-improvement flywheel. Each component's improvement accelerates the others: better models enable better harness optimisation, yielding higher agent performance, generating better training signal. Three independent teams (OpenClaw, Claude Code, Meta-Harness) are already on different segments of this cycle.
removed in v3.0
v2.4 · 7.7 Self-Evolving Agent ArchitectureThe recursive stacking insight is key: as foundation models improve, harness optimisation becomes more effective, which improves the agent's performance, which generates better training signal for the next improvement cycle. We are not yet on this curve, but the ingredients exist.
removed in v3.0
v2.4 · 7.8 Pre-Action Reflection### 7.8 Pre-Action Reflection
removed in v3.0
v2.4 · 7.8 Pre-Action ReflectionOur current architecture reflects only *after* action. GStack's "office hours" pattern (Tan, 2026) demonstrates the value of structured reflection *before* action — six forcing questions that reframe the problem before any code is written. A complete cognitive cycle would include both: pre-action reflection to refine intent and anticipate failure modes, and post-action reflection to extract lessons and update knowledge. Implementing pre-action reflection would require a mechanism to detect task complexity and trigger deliberation only when warranted — trivial tasks should not incur the overhead of six forcing questions.
removed in v3.0
not in v2.4
v3.0 · 7. Implementation Status## 7. Implementation Status
not in v2.4
v3.0 · 7.1 What Is Built (v2.4 Baseline)### 7.1 What Is Built (v2.4 Baseline)
not in v2.4
v3.0 · 7.1 What Is Built (v2.4 Baseline)The following components are deployed and operational:
not in v2.4
v3.0 · 7.1 What Is Built (v2.4 Baseline)- **Exploration gate**: blocks mutating tools until read-only operations are performed. Live, hooked into every turn. - **Anti-gold-plating rules**: 11 engineering discipline injections. Live. - **Forcing questions**: 5 pre-action questions for complex tasks. Live. - **Denial tracking**: escalation after 3 consecutive tool denials. Live. - **Permission hooks**: user-defined shell script gates. Live. - **FAAR tracker**: task outcome recording with category, model, tokens. Live. - **Effort router**: expensive model warnings on subagent spawns. Live. - **CORF trigger**: high-stakes decision flagging. Live. - **Feature flags**: per-hook enable/disable via gateway RPC. Live. - **Call tree panel**: real-time agent topology in Tinker UI. Live. - **Guardian process**: 3-minute health checks with auto-recovery. Live. - **Tool concurrency partitioner**: read-only vs. mutating classification. Tested, wiring pending. - **Prompt cache boundary**: static/dynamic prompt split. Tested, wiring pending. - **Fork subagents**: cache-shared child agents. Tested, wiring pending. - **Deferred tool loading**: on-demand schema loading. Tested, wiring pending.
not in v2.4
v3.0 · 7.1 What Is Built (v2.4 Baseline)Total: ~3,900 lines of TypeScript, 151 tests, 12 test files, 6 RPC endpoints.
not in v2.4
v3.0 · 7.2 What Is New in v3.0### 7.2 What Is New in v3.0
not in v2.4
v3.0 · 7.2 What Is New in v3.0The following components are proposed and specified but not yet implemented:
not in v2.4
v3.0 · 7.2 What Is New in v3.0- **Recipe engine**: recipe parsing, step tracking, gate evaluation, failure handler dispatch. - **Recipe library**: 6 built-in recipes (debug, feature, investigate, refactor, review, deploy) plus custom recipe loading from memory hierarchy. - **Intent classifier**: three-tier strategy (keyword, structure, LLM) for recipe selection. - **Orchestrator loop**: Prefrontal as first call with plan injection into main agent context. - **Subagent supervisor**: progress monitoring, stall detection, cross-subagent coordination, intervention. - **Progress reporter**: WebSocket event emission for recipe step progress, subagent status, elapsed time. - **Reflection orchestrator**: mandatory post-recipe reflection with recipe context injection. - **Recipe evolution**: automatic recipe updates based on reflection findings. - **UI extensions**: recipe overlay on call tree, cost tracking per step, stall indicators.
not in v2.4
v3.0 · 7.3 Roadmap### 7.3 Roadmap
not in v2.4
v3.0 · 7.3 Roadmap**Phase 1 (Foundation)**: Recipe format specification, parser, and built-in library. Intent classifier with keyword and structure matching. Estimated: 1--2 sessions.
not in v2.4
v3.0 · 7.3 Roadmap**Phase 2 (Orchestration)**: Prefrontal as first call. Orchestrator loop with plan injection. Single-agent execution (no parallelism yet). Estimated: 2--3 sessions.
not in v2.4
v3.0 · 7.3 Roadmap**Phase 3 (Parallelism)**: Subagent supervisor. Progress reporter. Stall detection. Wire the existing fork-subagent module into the recipe engine. Estimated: 2--3 sessions.
not in v2.4
v3.0 · 7.3 Roadmap**Phase 4 (Reflection)**: Reflection orchestrator. Recipe-aware reflection context. Recipe evolution from reflection findings. Estimated: 1--2 sessions.
not in v2.4
v3.0 · 7.3 Roadmap**Phase 5 (UI)**: Recipe overlay on call tree. Cost tracking. Progress panel. Estimated: 1--2 sessions.
not in v2.4
v3.0 · 7.3 Roadmap**Phase 6 (Learning)**: Recipe selection improves from usage data. Gate thresholds adapt. Recipes fork into variants for different contexts. This phase has no fixed endpoint --- it is the compounding loop itself.
··· 2 unchanged paragraphs folded ···
v2.4 · 8. ConclusionIntelligence that doesn't compound isn't intelligence — it's capability. A calculator has capability. A human who learns from each calculation has intelligence.
removed in v3.0
v2.4 · 8. ConclusionWe have argued that persistent AI agents can be made genuinely intelligent — in Chollet's sense of efficient skill acquisition — through four architectural mechanisms that operate entirely at the prompt level. Fractal reflection converts events into reusable rules. Tiered memory gives those rules a place to live across sessions. CORF parallelism exploits provider diversity. Adaptive routing matches effort to difficulty.
removed in v3.0
v2.4 · 8. ConclusionThe evidence from six months of OpenClaw operation supports the weak form of the compounding hypothesis: these mechanisms produce significant, measurable improvement that is additive with model-level advances. FAAR increased from 0.70 to 0.90, RER reached 1.54, and cross-domain transfer of operational lessons was observed with estimated TC values of 0.10–0.25. The Composite Intelligence Index increased 96% over the observation period under our primary weighting, with sensitivity analysis confirming improvement of +52% to +161% across five weight configurations.
removed in v3.0
v2.4 · 8. ConclusionThe strongest evidence, however, may be architectural convergence itself. When Anthropic's Claude Code — developed independently by a team with no knowledge of our work — arrives at the same tiered memory, the same periodic cognitive cycles, the same prompt-defined orchestration, and the same background consolidation, the simplest explanation is that these patterns are well-adapted to the problem — convergent solutions that independent teams discover when facing the same constraints. Combined with Meta-Harness's independent validation of harness-level compounding and GStack's convergence on role-based prompt specialisation, the pattern is clear: the architecture described in this paper is not one possible design for persistent agent intelligence — it reflects patterns the problem strongly favours.
removed in v3.0
v2.4 · 8. ConclusionThe honest assessment is that this is early work with significant limitations. The evaluation is based on a single deployment, the metrics are derived from manual log review, and several proposed extensions (AMYGDALA, learned forgetting, ablation studies) remain future work. But the direction is clear: the next frontier in agent capability is not bigger models but smarter architectures — systems that learn from their own operation and compound that learning over time.
removed in v3.0
v2.4 · 8. ConclusionThe intern who never makes the same mistake twice is not the one with the biggest brain. It's the one who writes things down.
removed in v3.0
v2.4 · 8. Conclusion---
removed in v3.0
v2.4 · 8. Conclusion---
removed in v3.0
v2.4 · Appendix A: Fractal Reflection Pseudocode## Appendix A: Fractal Reflection Pseudocode
removed in v3.0
v2.4 · Appendix A: Fractal Reflection Pseudocode``` ALGORITHM: FractalReflection(turn_context, memory_files)
removed in v3.0
v2.4 · Appendix A: Fractal Reflection PseudocodeInput: turn_context (user message, agent response, tool calls, outcomes) memory_files (current memory hierarchy) Output: set of file writes W, set of direct edits E
removed in v3.0
v2.4 · Appendix A: Fractal Reflection PseudocodeW <- {}; E <- {}
removed in v3.0
v2.4 · Step 1: MEMORY -- persist new knowledge new_facts <- extract_facts(turn_context) for each fact f in new_facts: target <- classify_tier(f) // ephemeral | working | knowledge | identity W <- W + {(target, f)}# Step 1: MEMORY -- persist new knowledge new_facts <- extract_facts(turn_context) for each fact f in new_facts: target <- classify_tier(f) // ephemeral | working | knowledge | identity W <- W + {(target, f)}
removed in v3.0
v2.4 · Step 2: PATTERN -- multi-level abstraction L1 <- describe_event(turn_context) L2 <- identify_pattern(L1, memory_files.knowledge) if L2 reveals structural cause: L3 <- identify_system(L2) W <- W + {(knowledge, L3)} if L3 challenges assumption: L4 <- question_worldview(L3) W <- W + {(knowledge, L4)}# Step 2: PATTERN -- multi-level abstraction L1 <- describe_event(turn_context) L2 <- identify_pattern(L1, memory_files.knowledge) if L2 reveals structural cause: L3 <- identify_system(L2) W <- W + {(knowledge, L3)} if L3 challenges assumption: L4 <- question_worldview(L3) W <- W + {(knowledge, L4)}
removed in v3.0
v2.4 · Step 3: RIPPLE -- scan for staleness surfaces <- {code, docs, online_presence, memory_files} for each surface s in surfaces: stale_items <- check_staleness(s, turn_context) for each item in stale_items: if estimated_fix_time(item) < 2 minutes: E <- E + {fix(item)} else: W <- W + {(ripple_tracker, item)}# Step 3: RIPPLE -- scan for staleness surfaces <- {code, docs, online_presence, memory_files} for each surface s in surfaces: stale_items <- check_staleness(s, turn_context) for each item in stale_items: if estimated_fix_time(item) < 2 minutes: E <- E + {fix(item)} else: W <- W + {(ripple_tracker, item)}
removed in v3.0
v2.4 · Step 4: IMPROVE -- opportunistic fixes improvements <- scan_for_improvements(memory_files, turn_context) for each improvement in improvements: E <- E + {apply(improvement)}# Step 4: IMPROVE -- opportunistic fixes improvements <- scan_for_improvements(memory_files, turn_context) for each improvement in improvements: E <- E + {apply(improvement)}
removed in v3.0
v2.4 · Step 4: IMPROVE -- opportunistic fixes improvements <- scan_for_improvements(memory_files, turn_context) for each improvement in improvements: E <- E + {apply(improvement)}execute(W, E) return W, E ```
removed in v3.0
not in v2.4
v3.0 · 8. ConclusionThe history of software engineering is a history of structured workflows replacing ad hoc improvisation. Waterfall, agile, TDD, CI/CD --- each methodology succeeded not by making developers smarter but by making their process more structured. The same transition is now happening in AI agent architecture.
not in v2.4
v3.0 · 8. ConclusionVersion 2.4 of this paper demonstrated that intelligence compounds through architecture. Four mechanisms --- fractal reflection, tiered memory, CORF parallelism, and adaptive routing --- produced a 96% improvement in composite intelligence over six months. But v2.4's architecture was defensive: it prevented bad behaviour more effectively than it produced good behaviour. The guards worked; the highway was missing.
not in v2.4
v3.0 · 8. ConclusionVersion 3.0 proposes the highway. By transforming Prefrontal from a guard system into a recipe execution engine, we complete the cognitive cycle that v2.4 acknowledged was only half-built. Pre-action planning selects the right recipe. During-action monitoring supervises execution. Post-action reflection extracts lessons and improves the recipes themselves. The compounding loop closes: each recipe execution makes the next execution of that recipe better.
not in v2.4
v3.0 · 8. ConclusionThe convergent evolution evidence is now three-layered. Claude Code's skills are recipes executed by a `while(true)` loop. Journey Kits proposes recipes as the atomic unit of agent value. Meta-Harness demonstrates that harness optimisation --- the automated discovery of better recipes --- produces 6x performance gains. Three independent teams, working from different premises, arrived at the same conclusion: **the recipe is the unit of agent intelligence**.
not in v2.4
v3.0 · 8. ConclusionThe honest assessment remains that much of v3.0 is specified but not yet implemented. The recipe engine, the orchestrator loop, the subagent supervisor, and the reflection orchestrator exist as designs in this paper, not as code in the repository. The v2.4 baseline --- guards, observability, monitoring --- is live and validated. The v3.0 additions are the next implementation target.
not in v2.4
v3.0 · 8. ConclusionBut the architectural insight is clear, and the economic enabler exists. Prompt caching makes orchestration nearly free. The recipe format is defined. The subagent infrastructure is tested. The fractal reflection protocol is proven. What remains is wiring --- connecting components that already exist into the cognitive cycle this paper describes.
not in v2.4
v3.0 · 8. ConclusionThe intern who never makes the same mistake twice writes things down. The intern who gets promoted writes *recipes* --- structured workflows that make the next person as effective as they are. Version 3.0 is about building agents that write recipes.
··· 2 unchanged paragraphs folded ···
not in v2.4
v3.0 · ReferencesAnthropic. (2026). Claude Code source code [Accidentally exposed, March 2026]. Analysis based on publicly available descriptions.
not in v2.4
v3.0 · ReferencesBerman, M. (2026). Journey Kits: npm for AI agent workflows. https://journeykits.ai
not in v2.4
v3.0 · ReferencesChen, X. et al. (2026). MemexRL: Learning to manage agent memory through reinforcement. *arXiv preprint*.
v2.4 · ReferencesChollet, F. (2019). On the Measure of Intelligence. *arXiv preprint arXiv:1911.01547*. https://arxiv.org/abs/1911.01547
v3.0 · ReferencesChollet, F. (2019). On the measure of intelligence. *arXiv preprint arXiv:1911.01547*.
v2.4 · ReferencesChen, W. et al. (2026). MemexRL: Reinforcement Learning for Agent Memory Management. *arXiv preprint arXiv:2603.04257*. https://arxiv.org/abs/2603.04257
removed in v3.0
v2.4 · ReferencesKhattab, O. et al. (2023). DSPy: Compiling Declarative Language Model Calls into Self-Improving Pipelines. *arXiv preprint arXiv:2310.03714*. https://arxiv.org/abs/2310.03714
v3.0 · ReferencesKhattab, O. et al. (2023). DSPy: Compiling declarative language model calls into self-improving pipelines. *arXiv preprint arXiv:2310.03714*.
not in v2.4
v3.0 · ReferencesLee, J. et al. (2026). Meta-Harness: Automatically optimising agent scaffolding for terminal benchmarks. *arXiv preprint*.
v2.4 · ReferencesLi, X. et al. (2026). CraniMem: Neural Memory Compression for Persistent Agents. *arXiv preprint arXiv:2603.15642*. https://arxiv.org/abs/2603.15642
v3.0 · ReferencesLi, W. et al. (2026). CraniMem: Neural memory compression with hippocampal indexing for LLM agents. *arXiv preprint*.
v2.4 · ReferencesMadaan, A. et al. (2023). Self-Refine: Iterative Refinement with Self-Feedback. *NeurIPS 2023*. https://arxiv.org/abs/2303.17651
v3.0 · ReferencesMadaan, A. et al. (2023). Self-Refine: Iterative refinement with self-feedback. *NeurIPS 2023*.
v2.4 · ReferencesMaharana, A. et al. (2024). LoCoMo: Long-Context Memory Benchmark for Conversational Agents. *arXiv preprint arXiv:2402.09714*. https://arxiv.org/abs/2402.09714
v3.0 · ReferencesMaharana, A. et al. (2024). LoCoMo: Long-context memory evaluation for conversational agents. *arXiv preprint*.
not in v2.4
v3.0 · ReferencesNouse Research. (2026). Hermes Agent: Self-improving skill libraries for autonomous agents.
v2.4 · ReferencesPacker, C. et al. (2023). MemGPT: Towards LLMs as Operating Systems. *arXiv preprint arXiv:2310.08560*. https://arxiv.org/abs/2310.08560
v3.0 · ReferencesPacker, C. et al. (2023). MemGPT: Towards LLMs as operating systems. *arXiv preprint arXiv:2310.08560*.
v2.4 · ReferencesPark, J. S. et al. (2023). Generative Agents: Interactive Simulacra of Human Behavior. *UIST 2023*. https://arxiv.org/abs/2304.03442
v3.0 · ReferencesPark, J. S. et al. (2023). Generative agents: Interactive simulacra of human behavior. *UIST 2023*.
v2.4 · ReferencesPark, S. et al. (2026). Governed Memory: Access Control and Governance for Agent Memory Systems. *arXiv preprint arXiv:2603.17787*. https://arxiv.org/abs/2603.17787
v3.0 · ReferencesPark, S. et al. (2026). Governed Memory: Access control and governance for agent memory systems. *arXiv preprint*.
v2.4 · ReferencesSerra, O. (2026). AMYGDALA: Adaptive Modulation of Your General Disposition via Affective Learned Association — Learned Intuition for Persistent AI Agents. *Independent Research*.
v3.0 · ReferencesSerra, O. (2026). AMYGDALA: Adaptive modulation of agent disposition via affective learned association. *Working paper*.
not in v2.4
v3.0 · ReferencesSerra, O. & Jarvis. (2026). PREFRONTAL v2.4: Compounded Intelligence --- How Persistent Agents Get Smarter by Remembering What They Learn. *Working paper*.
v2.4 · ReferencesShinn, N. et al. (2023). Reflexion: Language Agents with Verbal Reinforcement Learning. *NeurIPS 2023*. https://arxiv.org/abs/2303.11366
v3.0 · ReferencesShinn, N. et al. (2023). Reflexion: Language agents with verbal reinforcement learning. *NeurIPS 2023*.
not in v2.4
v3.0 · ReferencesTan, P. (2026). GStack: Multi-perspective code review through role-based prompt specialisation.
v2.4 · ReferencesWang, G. et al. (2023). Voyager: An Open-Ended Embodied Agent with Large Language Models. *NeurIPS 2023*. https://arxiv.org/abs/2305.16291
v3.0 · ReferencesWang, G. et al. (2023). Voyager: An open-ended embodied agent with large language models. *arXiv preprint arXiv:2305.16291*.
v2.4 · ReferencesWang, Z. et al. (2026). Ares: Autonomous Agent Self-Evaluation and Improvement. *arXiv preprint arXiv:2603.07915*. https://arxiv.org/abs/2603.07915
removed in v3.0
v2.4 · ReferencesLee, Y. et al. (2026). Meta-Harness: End-to-End Optimization of Model Harnesses. *arXiv preprint arXiv:2603.28052*. https://arxiv.org/abs/2603.28052
removed in v3.0
v2.4 · ReferencesZhang, Y. et al. (2026). A Comprehensive Survey of Memory Architectures for LLM-Based Agents. *arXiv preprint arXiv:2603.07670*. https://arxiv.org/abs/2603.07670
v3.0 · ReferencesZhang, L. et al. (2026). A survey of memory architectures for LLM-based agents. *arXiv preprint*.
v2.4 · ReferencesAnthropic (2026). Claude Code source code. Accidentally exposed via npm source map in @anthropic-ai/claude-code v2.4.88, March 31, 2026. 512,000 lines of TypeScript across approximately 1,900 files. Analysis repository: https://github.com/chauncygu/collection-claude-code-source-code
removed in v3.0
v2.4 · ReferencesTan, G. (2026). GStack: A development process framework for AI-assisted solo developers. https://github.com/garytan/gstack
removed in v3.0
v2.4 · ReferencesNouse Research (2026). Hermes Agent: Self-improving personal AI agent with closed learning loop. https://github.com/nousresearch/hermes-agent
removed in v3.0
v2.4 · ReferencesPaperclip (2026). Open-source orchestration for zero-human companies. https://github.com/paperclip-ai/paperclip
removed in v3.0
not in v2.4
v3.0 · References---
not in v2.4
v3.0 · Appendix A: Recipe Execution Pseudocode## Appendix A: Recipe Execution Pseudocode
not in v2.4
v3.0 · Appendix A: Recipe Execution Pseudocode``` ALGORITHM: RecipeExecution(user_message, context, recipe_library)
not in v2.4
v3.0 · Appendix A: Recipe Execution PseudocodeInput: user_message (raw user request) context (SOUL.md, memory hierarchy, session history) recipe_library (set of available recipes) Output: response to user, set of memory writes W
not in v2.4
v3.0 · Phase 1: PLAN (cache-shared LLM call) intent <- classify_intent(user_message) if intent.complexity < THRESHOLD_SIMPLE: return passthrough(user_message, context) # no orchestration# Phase 1: PLAN (cache-shared LLM call) intent <- classify_intent(user_message) if intent.complexity < THRESHOLD_SIMPLE: return passthrough(user_message, context) # no orchestration
not in v2.4
v3.0 · Phase 1: PLAN (cache-shared LLM call) intent <- classify_intent(user_message) if intent.complexity < THRESHOLD_SIMPLE: return passthrough(user_message, context) # no orchestrationrecipe <- select_recipe(intent, recipe_library) plan <- compose_plan(recipe, context)
not in v2.4
v3.0 · Phase 1: PLAN (cache-shared LLM call) intent <- classify_intent(user_message) if intent.complexity < THRESHOLD_SIMPLE: return passthrough(user_message, context) # no orchestrationif plan.estimated_duration > 5 minutes: present_plan_to_user(plan) if user.redirects: plan <- revise_plan(user.feedback)
not in v2.4
v3.0 · Phase 1: PLAN (cache-shared LLM call) intent <- classify_intent(user_message) if intent.complexity < THRESHOLD_SIMPLE: return passthrough(user_message, context) # no orchestrationsubagents <- allocate_subagents(plan, context)
not in v2.4
v3.0 · Phase 2: EXECUTE (supervised subagent dispatch) for each step S in plan.steps: workers <- subagents[S] dispatch(workers, S.task, S.tools)# Phase 2: EXECUTE (supervised subagent dispatch) for each step S in plan.steps: workers <- subagents[S] dispatch(workers, S.task, S.tools)
not in v2.4
v3.0 · Phase 2: EXECUTE (supervised subagent dispatch) for each step S in plan.steps: workers <- subagents[S] dispatch(workers, S.task, S.tools)while not S.complete: events <- collect_events(workers, timeout=S.expected_duration)
not in v2.4
v3.0 · Phase 2: EXECUTE (supervised subagent dispatch) for each step S in plan.steps: workers <- subagents[S] dispatch(workers, S.task, S.tools)if stall_detected(events, S): intervene(workers, S, context)
not in v2.4
v3.0 · Phase 2: EXECUTE (supervised subagent dispatch) for each step S in plan.steps: workers <- subagents[S] dispatch(workers, S.task, S.tools)if cross_subagent_update(events): relay_findings(events, subagents)
not in v2.4
v3.0 · Phase 2: EXECUTE (supervised subagent dispatch) for each step S in plan.steps: workers <- subagents[S] dispatch(workers, S.task, S.tools)emit_progress(S, workers)
not in v2.4
v3.0 · Phase 2: EXECUTE (supervised subagent dispatch) for each step S in plan.steps: workers <- subagents[S] dispatch(workers, S.task, S.tools)if not gate_satisfied(S.gate, workers.output): if S.failure_handler exists: execute(S.failure_handler) else: escalate_to_user(S, workers.output)
not in v2.4
v3.0 · Phase 2: EXECUTE (supervised subagent dispatch) for each step S in plan.steps: workers <- subagents[S] dispatch(workers, S.task, S.tools)response <- aggregate_results(plan, subagents)
not in v2.4
v3.0 · Phase 3: REFLECT (cache-shared LLM call) reflection_context <- { recipe: recipe, plan: plan, execution_trace: subagents.traces, response: response }# Phase 3: REFLECT (cache-shared LLM call) reflection_context <- { recipe: recipe, plan: plan, execution_trace: subagents.traces, response: response }
not in v2.4
v3.0 · Phase 3: REFLECT (cache-shared LLM call) reflection_context <- { recipe: recipe, plan: plan, execution_trace: subagents.traces, response: response }W <- FractalReflection(reflection_context, memory_files)
not in v2.4
v3.0 · Phase 3: REFLECT (cache-shared LLM call) reflection_context <- { recipe: recipe, plan: plan, execution_trace: subagents.traces, response: response }if reflection.recipe_update: update_recipe(recipe, reflection.recipe_update)
not in v2.4
v3.0 · Phase 3: REFLECT (cache-shared LLM call) reflection_context <- { recipe: recipe, plan: plan, execution_trace: subagents.traces, response: response }return response, W ```
not in v2.4
v3.0 · Appendix B: Built-in Recipe Index## Appendix B: Built-in Recipe Index
not in v2.4
v3.0 · Appendix B: Built-in Recipe Index| Recipe | Trigger Patterns | Steps | Key Gate | |--------|-----------------|-------|----------| | debug | "fix", "bug", "error", "broken", stack traces | 6 | Reproduce before fix | | feature | "add", "implement", "build", "create" + scope | 7 | Design before code | | investigate | "why", "what's going on", "look into", "check" | 5 | Scope before search | | refactor | "clean up", "refactor", "reorganise", "simplify" | 6 | Measure before change | | review | "review", "check this", PR URLs, diff blocks | 5 | Read completely before opining | | deploy | "deploy", "release", "ship", "push to prod" | 7 | Verify at every stage |
Changed paragraphs in the same form, for scripts: JSON
· Markdown