{
 "paper": "prefrontal-orchestration",
 "a": "2.4",
 "b": "3.0",
 "summary": "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.",
 "note": {
  "title": "Rewritten: from guard rails to a recipe engine",
  "kind": "major-rewrite",
  "body": "## Summary\n\nA 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.\n\n- New title: \"From Guard Rails to Recipe Engine — How Structured Orchestration Compounds Agent Intelligence\".\n- 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.\n- Claims the extra call costs about 5 % in tokens because it shares the prompt cache with the main agent.\n- 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.\n- The six-month measurements and most related work of v2.4 are dropped; the paper is about half as long.",
  "source": "change note"
 },
 "paragraphs_changed": 459,
 "changes": [
  {
   "section": "PREFRONTAL: Compounded Intelligence — How Persistent Agents Get Smarter by Remembering What They Learn",
   "old": "# PREFRONTAL: Compounded Intelligence — How Persistent Agents Get Smarter by Remembering What They Learn",
   "new": null,
   "marked": "[-# PREFRONTAL: Compounded Intelligence — How Persistent Agents Get Smarter by Remembering What They Learn-]"
  },
  {
   "section": "PREFRONTAL: Compounded Intelligence — How Persistent Agents Get Smarter by Remembering What They Learn",
   "old": "**Oscar Serra¹, Jarvis¹** ¹Independent Research *1 April 2026 — v2.4*",
   "new": null,
   "marked": "[-**Oscar Serra¹, Jarvis¹** ¹Independent Research *1 April 2026 — v2.4*-]"
  },
  {
   "section": "PREFRONTAL v3.0: From Guard Rails to Recipe Engine --- How Structured Orchestration Compounds Agent Intelligence",
   "old": null,
   "new": "# PREFRONTAL v3.0: From Guard Rails to Recipe Engine --- How Structured Orchestration Compounds Agent Intelligence",
   "marked": "{+# PREFRONTAL v3.0: From Guard Rails to Recipe Engine --- How Structured Orchestration Compounds Agent Intelligence+}"
  },
  {
   "section": "PREFRONTAL v3.0: From Guard Rails to Recipe Engine --- How Structured Orchestration Compounds Agent Intelligence",
   "old": null,
   "new": "**Oscar Serra^1^, Jarvis^1^** ^1^Independent Research *7 April 2026 --- v3.0*",
   "marked": "{+**Oscar Serra^1^, Jarvis^1^** ^1^Independent Research *7 April 2026 --- v3.0*+}"
  },
  {
   "section": "Abstract",
   "old": "A 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.",
   "new": null,
   "marked": "[-A 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.-]"
  },
  {
   "section": "Abstract",
   "old": "We 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.",
   "new": null,
   "marked": "[-We 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.-]"
  },
  {
   "section": "Abstract",
   "old": "Our 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.",
   "new": null,
   "marked": "[-Our 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.-]"
  },
  {
   "section": "Abstract",
   "old": "Strikingly, 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.",
   "new": null,
   "marked": "[-Strikingly, 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.-]"
  },
  {
   "section": "Abstract",
   "old": "We 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.",
   "new": null,
   "marked": "[-We 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.-]"
  },
  {
   "section": "Abstract",
   "old": "**Keywords:** compounded intelligence, skill-acquisition efficiency, persistent agents, fractal reflection, agent memory, adaptive routing, prompt engineering, agent architecture",
   "new": null,
   "marked": "[-**Keywords:** compounded intelligence, skill-acquisition efficiency, persistent agents, fractal reflection, agent memory, adaptive routing, prompt engineering, agent architecture-]"
  },
  {
   "section": "Abstract",
   "old": "**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.",
   "new": null,
   "marked": "[-**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.-]"
  },
  {
   "section": "Abstract",
   "old": null,
   "new": "The 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.",
   "marked": "{+The 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.+}"
  },
  {
   "section": "Abstract",
   "old": null,
   "new": "This 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.",
   "marked": "{+This 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.+}"
  },
  {
   "section": "Abstract",
   "old": null,
   "new": "The 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.",
   "marked": "{+The 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.+}"
  },
  {
   "section": "Abstract",
   "old": null,
   "new": "**Keywords:** recipe execution, agent orchestration, compounded intelligence, cognitive cycle, prompt cache, subagent parallelism, structured workflows",
   "marked": "{+**Keywords:** recipe execution, agent orchestration, compounded intelligence, cognitive cycle, prompt cache, subagent parallelism, structured workflows+}"
  },
  {
   "section": "1. Introduction — The Amnesia Problem",
   "old": "## 1. Introduction — The Amnesia Problem",
   "new": null,
   "marked": "[-## 1. Introduction — The Amnesia Problem-]"
  },
  {
   "section": "1. Introduction — The Amnesia Problem",
   "old": "Consider 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.",
   "new": null,
   "marked": "[-Consider 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.-]"
  },
  {
   "section": "1. Introduction — The Amnesia Problem",
   "old": "In 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.",
   "new": null,
   "marked": "[-In 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.-]"
  },
  {
   "section": "1. Introduction — The Amnesia Problem",
   "old": "Every 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.",
   "new": null,
   "marked": "[-Every 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.-]"
  },
  {
   "section": "1. Introduction — The Amnesia Problem",
   "old": "This paper asks a simple question: *what would it take to build agents that actually get smarter over time?*",
   "new": null,
   "marked": "[-This paper asks a simple question: *what would it take to build agents that actually get smarter over time?*-]"
  },
  {
   "section": "1.1 Intelligence as Skill-Acquisition Efficiency",
   "old": "### 1.1 Intelligence as Skill-Acquisition Efficiency",
   "new": null,
   "marked": "[-### 1.1 Intelligence as Skill-Acquisition Efficiency-]"
  },
  {
   "section": "1.1 Intelligence as Skill-Acquisition Efficiency",
   "old": "Chollet (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.",
   "new": null,
   "marked": "[-Chollet (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.-]"
  },
  {
   "section": "1.1 Intelligence as Skill-Acquisition Efficiency",
   "old": "We adopt this framing directly. An intelligent agent is one where:",
   "new": null,
   "marked": "[-We adopt this framing directly. An intelligent agent is one where:-]"
  },
  {
   "section": "1.1 Intelligence as Skill-Acquisition Efficiency",
   "old": "1. **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",
   "new": null,
   "marked": "[-1. **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-]"
  },
  {
   "section": "1.1 Intelligence as Skill-Acquisition Efficiency",
   "old": "These 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.",
   "new": null,
   "marked": "[-These 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.-]"
  },
  {
   "section": "1.2 The Two Levels of Agent Intelligence",
   "old": "### 1.2 The Two Levels of Agent Intelligence",
   "new": null,
   "marked": "[-### 1.2 The Two Levels of Agent Intelligence-]"
  },
  {
   "section": "1.2 The Two Levels of Agent Intelligence",
   "old": "A 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.",
   "new": null,
   "marked": "[-A 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.-]"
  },
  {
   "section": "1.2 The Two Levels of Agent Intelligence",
   "old": "We distinguish two levels:",
   "new": null,
   "marked": "[-We distinguish two levels:-]"
  },
  {
   "section": "1.2 The Two Levels of Agent Intelligence",
   "old": "**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.",
   "new": null,
   "marked": "[-**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.-]"
  },
  {
   "section": "1.2 The Two Levels of Agent Intelligence",
   "old": "**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.",
   "new": null,
   "marked": "[-**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.-]"
  },
  {
   "section": "1.2 The Two Levels of Agent Intelligence",
   "old": "Recent 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.",
   "new": null,
   "marked": "[-Recent 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.-]"
  },
  {
   "section": "1.2 The Two Levels of Agent Intelligence",
   "old": "A 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.",
   "new": null,
   "marked": "[-A 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.-]"
  },
  {
   "section": "1.2 The Two Levels of Agent Intelligence",
   "old": "The 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.",
   "new": null,
   "marked": "[-The 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.-]"
  },
  {
   "section": "1.3 Contributions",
   "old": "### 1.3 Contributions",
   "new": null,
   "marked": "[-### 1.3 Contributions-]"
  },
  {
   "section": "1.3 Contributions",
   "old": "This paper makes the following contributions:",
   "new": null,
   "marked": "[-This paper makes the following contributions:-]"
  },
  {
   "section": "1.3 Contributions",
   "old": "1. 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",
   "new": null,
   "marked": "[-1. 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-]"
  },
  {
   "section": "1. Introduction --- The Recipe Gap",
   "old": null,
   "new": "## 1. Introduction --- The Recipe Gap",
   "marked": "{+## 1. Introduction --- The Recipe Gap+}"
  },
  {
   "section": "1.1 Why Claude Code Works",
   "old": null,
   "new": "### 1.1 Why Claude Code Works",
   "marked": "{+### 1.1 Why Claude Code Works+}"
  },
  {
   "section": "1.1 Why Claude Code Works",
   "old": null,
   "new": "In 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:",
   "marked": "{+In 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:+}"
  },
  {
   "section": "1.1 Why Claude Code Works",
   "old": null,
   "new": "1. **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.",
   "marked": "{+1. **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.+}"
  },
  {
   "section": "1.1 Why Claude Code Works",
   "old": null,
   "new": "2. **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.",
   "marked": "{+2. **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.+}"
  },
  {
   "section": "1.1 Why Claude Code Works",
   "old": null,
   "new": "3. **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.",
   "marked": "{+3. **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.+}"
  },
  {
   "section": "1.1 Why Claude Code Works",
   "old": null,
   "new": "The 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.",
   "marked": "{+The 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.+}"
  },
  {
   "section": "1.1 Why Claude Code Works",
   "old": null,
   "new": "The 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.",
   "marked": "{+The 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.+}"
  },
  {
   "section": "1.2 The Journey Kits Thesis",
   "old": null,
   "new": "### 1.2 The Journey Kits Thesis",
   "marked": "{+### 1.2 The Journey Kits Thesis+}"
  },
  {
   "section": "1.2 The Journey Kits Thesis",
   "old": null,
   "new": "Matthew 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.",
   "marked": "{+Matthew 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.+}"
  },
  {
   "section": "1.2 The Journey Kits Thesis",
   "old": null,
   "new": "The 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.",
   "marked": "{+The 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.+}"
  },
  {
   "section": "1.2 The Journey Kits Thesis",
   "old": null,
   "new": "Journey 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.\"",
   "marked": "{+Journey 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.\"+}"
  },
  {
   "section": "1.3 The v2.4 Gap",
   "old": null,
   "new": "### 1.3 The v2.4 Gap",
   "marked": "{+### 1.3 The v2.4 Gap+}"
  },
  {
   "section": "1.3 The v2.4 Gap",
   "old": null,
   "new": "Version 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:",
   "marked": "{+Version 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:+}"
  },
  {
   "section": "1.3 The v2.4 Gap",
   "old": null,
   "new": "- **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).",
   "marked": "{+- **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).+}"
  },
  {
   "section": "1.3 The v2.4 Gap",
   "old": null,
   "new": "What 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.",
   "marked": "{+What 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.+}"
  },
  {
   "section": "1.3 The v2.4 Gap",
   "old": null,
   "new": "The 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.",
   "marked": "{+The 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.+}"
  },
  {
   "section": "1.4 The Cache-Shared First Call",
   "old": null,
   "new": "### 1.4 The Cache-Shared First Call",
   "marked": "{+### 1.4 The Cache-Shared First Call+}"
  },
  {
   "section": "1.4 The Cache-Shared First Call",
   "old": null,
   "new": "The 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.",
   "marked": "{+The 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.+}"
  },
  {
   "section": "1.4 The Cache-Shared First Call",
   "old": null,
   "new": "This 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.",
   "marked": "{+This 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.+}"
  },
  {
   "section": "1.4 The Cache-Shared First Call",
   "old": null,
   "new": "The 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.",
   "marked": "{+The 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.+}"
  },
  {
   "section": "2. Related Work",
   "old": "## 2. Related Work",
   "new": null,
   "marked": "[-## 2. Related Work-]"
  },
  {
   "section": "2.1 Memory Architectures for Agents",
   "old": "### 2.1 Memory Architectures for Agents",
   "new": null,
   "marked": "[-### 2.1 Memory Architectures for Agents-]"
  },
  {
   "section": "2.1 Memory Architectures for Agents",
   "old": "The agent memory landscape in early 2026 is characterised by a productive tension between simplicity and sophistication.",
   "new": null,
   "marked": "[-The agent memory landscape in early 2026 is characterised by a productive tension between simplicity and sophistication.-]"
  },
  {
   "section": "2.1 Memory Architectures for Agents",
   "old": "At 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.",
   "new": null,
   "marked": "[-At 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.-]"
  },
  {
   "section": "2.1 Memory Architectures for Agents",
   "old": "**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.",
   "new": null,
   "marked": "[-**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.-]"
  },
  {
   "section": "2.1 Memory Architectures for Agents",
   "old": "**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.",
   "new": null,
   "marked": "[-**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.-]"
  },
  {
   "section": "2.1 Memory Architectures for Agents",
   "old": "At 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.",
   "new": null,
   "marked": "[-At 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.-]"
  },
  {
   "section": "2.1 Memory Architectures for Agents",
   "old": "Our 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.",
   "new": null,
   "marked": "[-Our 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.-]"
  },
  {
   "section": "2.1 Memory Architectures for Agents",
   "old": "Independent 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.",
   "new": null,
   "marked": "[-Independent 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.-]"
  },
  {
   "section": "2.1 Memory Architectures for Agents",
   "old": "The 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.",
   "new": null,
   "marked": "[-The 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.-]"
  },
  {
   "section": "2.2 Reflection and Self-Improvement",
   "old": "### 2.2 Reflection and Self-Improvement",
   "new": null,
   "marked": "[-### 2.2 Reflection and Self-Improvement-]"
  },
  {
   "section": "2.2 Reflection and Self-Improvement",
   "old": "The 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.",
   "new": null,
   "marked": "[-The 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.-]"
  },
  {
   "section": "2.2 Reflection and Self-Improvement",
   "old": "**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.",
   "new": null,
   "marked": "[-**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.-]"
  },
  {
   "section": "2.2 Reflection and Self-Improvement",
   "old": "**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.",
   "new": null,
   "marked": "[-**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.-]"
  },
  {
   "section": "2.2 Reflection and Self-Improvement",
   "old": "What 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.",
   "new": null,
   "marked": "[-What 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.-]"
  },
  {
   "section": "2.3 Skill Acquisition and Lifelong Learning",
   "old": "### 2.3 Skill Acquisition and Lifelong Learning",
   "new": null,
   "marked": "[-### 2.3 Skill Acquisition and Lifelong Learning-]"
  },
  {
   "section": "2.3 Skill Acquisition and Lifelong Learning",
   "old": "**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.",
   "new": null,
   "marked": "[-**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.-]"
  },
  {
   "section": "2.3 Skill Acquisition and Lifelong Learning",
   "old": "**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.",
   "new": null,
   "marked": "[-**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.-]"
  },
  {
   "section": "2.4 Evaluation of Agent Memory",
   "old": "### 2.4 Evaluation of Agent Memory",
   "new": null,
   "marked": "[-### 2.4 Evaluation of Agent Memory-]"
  },
  {
   "section": "2.4 Evaluation of Agent Memory",
   "old": "Evaluating 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?\"",
   "new": null,
   "marked": "[-Evaluating 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?\"-]"
  },
  {
   "section": "2.4 Evaluation of Agent Memory",
   "old": "We argue that skill acquisition is the more important measure, and Section 4 proposes metrics for evaluating it.",
   "new": null,
   "marked": "[-We argue that skill acquisition is the more important measure, and Section 4 proposes metrics for evaluating it.-]"
  },
  {
   "section": "2. Architecture --- The Orchestrator Model",
   "old": null,
   "new": "## 2. Architecture --- The Orchestrator Model",
   "marked": "{+## 2. Architecture --- The Orchestrator Model+}"
  },
  {
   "section": "2.1 System Overview",
   "old": null,
   "new": "### 2.1 System Overview",
   "marked": "{+### 2.1 System Overview+}"
  },
  {
   "section": "2.1 System Overview",
   "old": null,
   "new": "Prefrontal v3.0 introduces a three-phase cognitive cycle that wraps every agent interaction:",
   "marked": "{+Prefrontal v3.0 introduces a three-phase cognitive cycle that wraps every agent interaction:+}"
  },
  {
   "section": "2.1 System Overview",
   "old": null,
   "new": "``` 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 ```",
   "marked": "{+``` 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 ```+}"
  },
  {
   "section": "2.1 System Overview",
   "old": null,
   "new": "**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.",
   "marked": "{+**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.+}"
  },
  {
   "section": "2.1 System Overview",
   "old": null,
   "new": "For 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.",
   "marked": "{+For 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.+}"
  },
  {
   "section": "2.2 Prefrontal as First Call",
   "old": null,
   "new": "### 2.2 Prefrontal as First Call",
   "marked": "{+### 2.2 Prefrontal as First Call+}"
  },
  {
   "section": "2.2 Prefrontal as First Call",
   "old": null,
   "new": "The 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:",
   "marked": "{+The 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:+}"
  },
  {
   "section": "2.2 Prefrontal as First Call",
   "old": null,
   "new": "1. 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.",
   "marked": "{+1. 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.+}"
  },
  {
   "section": "2.2 Prefrontal as First Call",
   "old": null,
   "new": "The 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.",
   "marked": "{+The 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.+}"
  },
  {
   "section": "2.2 Prefrontal as First Call",
   "old": null,
   "new": "**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.",
   "marked": "{+**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.+}"
  },
  {
   "section": "2.3 The Cache Trick",
   "old": null,
   "new": "### 2.3 The Cache Trick",
   "marked": "{+### 2.3 The Cache Trick+}"
  },
  {
   "section": "2.3 The Cache Trick",
   "old": null,
   "new": "The economics of this architecture depend entirely on prompt caching. Consider a typical agent turn:",
   "marked": "{+The economics of this architecture depend entirely on prompt caching. Consider a typical agent turn:+}"
  },
  {
   "section": "2.3 The Cache Trick",
   "old": null,
   "new": "| 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** |",
   "marked": "{+| 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** |+}"
  },
  {
   "section": "2.3 The Cache Trick",
   "old": null,
   "new": "The 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.",
   "marked": "{+The 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.+}"
  },
  {
   "section": "2.3 The Cache Trick",
   "old": null,
   "new": "This 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?\"",
   "marked": "{+This 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?\"+}"
  },
  {
   "section": "2.4 Subagent Parallelism",
   "old": null,
   "new": "### 2.4 Subagent Parallelism",
   "marked": "{+### 2.4 Subagent Parallelism+}"
  },
  {
   "section": "2.4 Subagent Parallelism",
   "old": null,
   "new": "For tasks that decompose naturally --- \"investigate this bug, fix it, and write tests\" --- Prefrontal fans out parallel subagents:",
   "marked": "{+For tasks that decompose naturally --- \"investigate this bug, fix it, and write tests\" --- Prefrontal fans out parallel subagents:+}"
  },
  {
   "section": "2.4 Subagent Parallelism",
   "old": null,
   "new": "- **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).",
   "marked": "{+- **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).+}"
  },
  {
   "section": "2.4 Subagent Parallelism",
   "old": null,
   "new": "- **Prefrontal monitors** subagent progress via WebSocket events. Each subagent emits structured status updates: task accepted, tool calls in progress, intermediate findings, completion with results.",
   "marked": "{+- **Prefrontal monitors** subagent progress via WebSocket events. Each subagent emits structured status updates: task accepted, tool calls in progress, intermediate findings, completion with results.+}"
  },
  {
   "section": "2.4 Subagent Parallelism",
   "old": null,
   "new": "- **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.",
   "marked": "{+- **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.+}"
  },
  {
   "section": "2.4 Subagent Parallelism",
   "old": null,
   "new": "- **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.",
   "marked": "{+- **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.+}"
  },
  {
   "section": "2.4 Subagent Parallelism",
   "old": null,
   "new": "The 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.",
   "marked": "{+The 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.+}"
  },
  {
   "section": "2.5 Periodic Progress Reports",
   "old": null,
   "new": "### 2.5 Periodic Progress Reports",
   "marked": "{+### 2.5 Periodic Progress Reports+}"
  },
  {
   "section": "2.5 Periodic Progress Reports",
   "old": null,
   "new": "For long-running tasks (multi-file refactors, complex investigations, deployment sequences), Prefrontal emits periodic status updates to the Tinker UI via WebSocket events:",
   "marked": "{+For long-running tasks (multi-file refactors, complex investigations, deployment sequences), Prefrontal emits periodic status updates to the Tinker UI via WebSocket events:+}"
  },
  {
   "section": "2.5 Periodic Progress Reports",
   "old": null,
   "new": "```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\" } ```",
   "marked": "{+```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\" } ```+}"
  },
  {
   "section": "2.5 Periodic Progress Reports",
   "old": null,
   "new": "The 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.",
   "marked": "{+The 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.+}"
  },
  {
   "section": "2.6 Visualisation: The Call Tree",
   "old": null,
   "new": "### 2.6 Visualisation: The Call Tree",
   "marked": "{+### 2.6 Visualisation: The Call Tree+}"
  },
  {
   "section": "2.6 Visualisation: The Call Tree",
   "old": null,
   "new": "The existing Prefrontal call tree panel (`prefrontal-tree.ts`) displays agent topology with real-time phase indicators. Version 3.0 extends this with:",
   "marked": "{+The existing Prefrontal call tree panel (`prefrontal-tree.ts`) displays agent topology with real-time phase indicators. Version 3.0 extends this with:+}"
  },
  {
   "section": "2.6 Visualisation: The Call Tree",
   "old": null,
   "new": "- **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.",
   "marked": "{+- **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.+}"
  },
  {
   "section": "3. Architecture — Four Mechanisms of Compounding",
   "old": "## 3. Architecture — Four Mechanisms of Compounding",
   "new": null,
   "marked": "[-## 3. Architecture — Four Mechanisms of Compounding-]"
  },
  {
   "section": "3. Architecture — Four Mechanisms of Compounding",
   "old": "The 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.",
   "new": null,
   "marked": "[-The 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.-]"
  },
  {
   "section": "3. Architecture — Four Mechanisms of Compounding",
   "old": "**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.",
   "new": null,
   "marked": "[-**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.-]"
  },
  {
   "section": "3. Architecture — Four Mechanisms of Compounding",
   "old": "**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).",
   "new": null,
   "marked": "[-**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).-]"
  },
  {
   "section": "3. Architecture — Four Mechanisms of Compounding",
   "old": "**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.",
   "new": null,
   "marked": "[-**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.-]"
  },
  {
   "section": "3. Architecture — Four Mechanisms of Compounding",
   "old": "![System Architecture](fig-architecture.png)",
   "new": null,
   "marked": "[-![System Architecture](fig-architecture.png)-]"
  },
  {
   "section": "3. Architecture — Four Mechanisms of Compounding",
   "old": "**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.",
   "new": null,
   "marked": "[-**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.-]"
  },
  {
   "section": "3.1 Fractal Reflection — The Compounding Engine",
   "old": "### 3.1 Fractal Reflection — The Compounding Engine",
   "new": null,
   "marked": "[-### 3.1 Fractal Reflection — The Compounding Engine-]"
  },
  {
   "section": "3.1 Fractal Reflection — The Compounding Engine",
   "old": "Every 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.",
   "new": null,
   "marked": "[-Every 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.-]"
  },
  {
   "section": "3.1 Fractal Reflection — The Compounding Engine",
   "old": "The reflection protocol requires answers to four questions:",
   "new": null,
   "marked": "[-The reflection protocol requires answers to four questions:-]"
  },
  {
   "section": "3.1 Fractal Reflection — The Compounding Engine",
   "old": "1. **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?",
   "new": null,
   "marked": "[-1. **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?-]"
  },
  {
   "section": "3.1 Fractal Reflection — The Compounding Engine",
   "old": "The 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.",
   "new": null,
   "marked": "[-The 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.-]"
  },
  {
   "section": "3.1 Fractal Reflection — The Compounding Engine",
   "old": "The 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.",
   "new": null,
   "marked": "[-The 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.-]"
  },
  {
   "section": "3.1 Fractal Reflection — The Compounding Engine",
   "old": "**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.",
   "new": null,
   "marked": "[-**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.-]"
  },
  {
   "section": "3.1 Fractal Reflection — The Compounding Engine",
   "old": "![Fractal Reflection Levels](fig-fractal-fern.jpg)",
   "new": null,
   "marked": "[-![Fractal Reflection Levels](fig-fractal-fern.jpg)-]"
  },
  {
   "section": "3.1 Fractal Reflection — The Compounding Engine",
   "old": "**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.",
   "new": null,
   "marked": "[-**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.-]"
  },
  {
   "section": "3.1 Fractal Reflection — The Compounding Engine",
   "old": "**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.",
   "new": null,
   "marked": "[-**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.-]"
  },
  {
   "section": "3.1 Fractal Reflection — The Compounding Engine",
   "old": "**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.",
   "new": null,
   "marked": "[-**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.-]"
  },
  {
   "section": "3.1 Fractal Reflection — The Compounding Engine",
   "old": "**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.",
   "new": null,
   "marked": "[-**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.-]"
  },
  {
   "section": "3.2 Tiered File-Based Memory",
   "old": "### 3.2 Tiered File-Based Memory",
   "new": null,
   "marked": "[-### 3.2 Tiered File-Based Memory-]"
  },
  {
   "section": "3.2 Tiered File-Based Memory",
   "old": "OpenClaw's memory is a hierarchy of plain markdown files:",
   "new": null,
   "marked": "[-OpenClaw's memory is a hierarchy of plain markdown files:-]"
  },
  {
   "section": "3.2 Tiered File-Based Memory",
   "old": "| 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 |",
   "new": null,
   "marked": "[-| 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 |-]"
  },
  {
   "section": "3.2 Tiered File-Based Memory",
   "old": "![Memory Tiers](fig-memory-tiers.png)",
   "new": null,
   "marked": "[-![Memory Tiers](fig-memory-tiers.png)-]"
  },
  {
   "section": "3.2 Tiered File-Based Memory",
   "old": "**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.",
   "new": null,
   "marked": "[-**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.-]"
  },
  {
   "section": "3.2 Tiered File-Based Memory",
   "old": "Each tier serves a different cognitive function:",
   "new": null,
   "marked": "[-Each tier serves a different cognitive function:-]"
  },
  {
   "section": "3.2 Tiered File-Based Memory",
   "old": "- **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.",
   "new": null,
   "marked": "[-- **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.-]"
  },
  {
   "section": "3.2 Tiered File-Based Memory",
   "old": "This 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.",
   "new": null,
   "marked": "[-This 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.-]"
  },
  {
   "section": "3.2 Tiered File-Based Memory",
   "old": "**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.",
   "new": null,
   "marked": "[-**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.-]"
  },
  {
   "section": "3.2 Tiered File-Based Memory",
   "old": "**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.\"",
   "new": null,
   "marked": "[-**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.\"-]"
  },
  {
   "section": "3.2 Tiered File-Based Memory",
   "old": "**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.",
   "new": null,
   "marked": "[-**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.-]"
  },
  {
   "section": "3.3 CORF Source Parallelism",
   "old": "### 3.3 CORF Source Parallelism",
   "new": null,
   "marked": "[-### 3.3 CORF Source Parallelism-]"
  },
  {
   "section": "3.3 CORF Source Parallelism",
   "old": "The **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.",
   "new": null,
   "marked": "[-The **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.-]"
  },
  {
   "section": "3.3 CORF Source Parallelism",
   "old": "This 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:",
   "new": null,
   "marked": "[-This 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:-]"
  },
  {
   "section": "3.3 CORF Source Parallelism",
   "old": "1. **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",
   "new": null,
   "marked": "[-1. **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-]"
  },
  {
   "section": "3.3 CORF Source Parallelism",
   "old": "**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.",
   "new": null,
   "marked": "[-**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.-]"
  },
  {
   "section": "3.3 CORF Source Parallelism",
   "old": "**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.",
   "new": null,
   "marked": "[-**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.-]"
  },
  {
   "section": "3.3 CORF Source Parallelism",
   "old": "**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.",
   "new": null,
   "marked": "[-**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.-]"
  },
  {
   "section": "3.3 CORF Source Parallelism",
   "old": "![Multi-Agent Orchestration Paradigms](fig-paradigms.png){ width=85% }",
   "new": null,
   "marked": "[-![Multi-Agent Orchestration Paradigms](fig-paradigms.png){ width=85% }-]"
  },
  {
   "section": "3.3 CORF Source Parallelism",
   "old": "**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).",
   "new": null,
   "marked": "[-**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).-]"
  },
  {
   "section": "3.3 CORF Source Parallelism",
   "old": "**Multi-agent orchestration paradigms.** CORF is one of at least four distinct paradigms for multi-agent coordination that have emerged independently in 2026:",
   "new": null,
   "marked": "[-**Multi-agent orchestration paradigms.** CORF is one of at least four distinct paradigms for multi-agent coordination that have emerged independently in 2026:-]"
  },
  {
   "section": "3.3 CORF Source Parallelism",
   "old": "1. **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*.",
   "new": null,
   "marked": "[-1. **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*.-]"
  },
  {
   "section": "3.3 CORF Source Parallelism",
   "old": "Claude 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.",
   "new": null,
   "marked": "[-Claude 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.-]"
  },
  {
   "section": "3.3 CORF Source Parallelism",
   "old": "These 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.",
   "new": null,
   "marked": "[-These 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.-]"
  },
  {
   "section": "3.3 CORF Source Parallelism",
   "old": "**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.",
   "new": null,
   "marked": "[-**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.-]"
  },
  {
   "section": "3.4 Adaptive Effort Routing",
   "old": "### 3.4 Adaptive Effort Routing",
   "new": null,
   "marked": "[-### 3.4 Adaptive Effort Routing-]"
  },
  {
   "section": "3.4 Adaptive Effort Routing",
   "old": "![Adaptive Effort Routing](fig-routing.png){ width=55% }",
   "new": null,
   "marked": "[-![Adaptive Effort Routing](fig-routing.png){ width=55% }-]"
  },
  {
   "section": "3.4 Adaptive Effort Routing",
   "old": "**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.",
   "new": null,
   "marked": "[-**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.-]"
  },
  {
   "section": "3.4 Adaptive Effort Routing",
   "old": "Not 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.",
   "new": null,
   "marked": "[-Not 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.-]"
  },
  {
   "section": "3.4 Adaptive Effort Routing",
   "old": "OpenClaw implements **adaptive effort routing** through a model hierarchy:",
   "new": null,
   "marked": "[-OpenClaw implements **adaptive effort routing** through a model hierarchy:-]"
  },
  {
   "section": "3.4 Adaptive Effort Routing",
   "old": "| 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 |",
   "new": null,
   "marked": "[-| 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 |-]"
  },
  {
   "section": "3.4 Adaptive Effort Routing",
   "old": "Routing 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).",
   "new": null,
   "marked": "[-Routing 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).-]"
  },
  {
   "section": "3.4 Adaptive Effort Routing",
   "old": "**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.",
   "new": null,
   "marked": "[-**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.-]"
  },
  {
   "section": "3.4 Adaptive Effort Routing",
   "old": "**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.",
   "new": null,
   "marked": "[-**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.-]"
  },
  {
   "section": "3. The Recipe System",
   "old": null,
   "new": "## 3. The Recipe System",
   "marked": "{+## 3. The Recipe System+}"
  },
  {
   "section": "3.1 Recipe Format",
   "old": null,
   "new": "### 3.1 Recipe Format",
   "marked": "{+### 3.1 Recipe Format+}"
  },
  {
   "section": "3.1 Recipe Format",
   "old": null,
   "new": "A recipe is a structured markdown document with the following schema:",
   "marked": "{+A recipe is a structured markdown document with the following schema:+}"
  },
  {
   "section": "3.1 Recipe Format",
   "old": null,
   "new": "```markdown # Recipe: debug",
   "marked": "{+```markdown # Recipe: debug+}"
  },
  {
   "section": "Metadata - intent: bug-fix, error-investigation, crash-analysis - complexity: medium - estimated-duration: 5-15 minutes - models: [sonnet, opus]",
   "old": null,
   "new": "## Metadata - intent: bug-fix, error-investigation, crash-analysis - complexity: medium - estimated-duration: 5-15 minutes - models: [sonnet, opus]",
   "marked": "{+## Metadata - intent: bug-fix, error-investigation, crash-analysis - complexity: medium - estimated-duration: 5-15 minutes - models: [sonnet, opus]+}"
  },
  {
   "section": "Preconditions - [ ] Error report or symptom description available - [ ] Repository context loaded",
   "old": null,
   "new": "## Preconditions - [ ] Error report or symptom description available - [ ] Repository context loaded",
   "marked": "{+## Preconditions - [ ] Error report or symptom description available - [ ] Repository context loaded+}"
  },
  {
   "section": "Steps",
   "old": null,
   "new": "## Steps",
   "marked": "{+## Steps+}"
  },
  {
   "section": "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.",
   "old": null,
   "new": "### 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.",
   "marked": "{+### 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.+}"
  },
  {
   "section": "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.",
   "old": null,
   "new": "### 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.",
   "marked": "{+### 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.+}"
  },
  {
   "section": "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.",
   "old": null,
   "new": "### 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.",
   "marked": "{+### 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.+}"
  },
  {
   "section": "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.",
   "old": null,
   "new": "### 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.",
   "marked": "{+### 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.+}"
  },
  {
   "section": "Step 5: Verify Run tests. Check that the fix works and nothing else broke. - tools: [Bash] - gate: All relevant tests must pass.",
   "old": null,
   "new": "### Step 5: Verify Run tests. Check that the fix works and nothing else broke. - tools: [Bash] - gate: All relevant tests must pass.",
   "marked": "{+### Step 5: Verify Run tests. Check that the fix works and nothing else broke. - tools: [Bash] - gate: All relevant tests must pass.+}"
  },
  {
   "section": "Step 6: Document Update any affected documentation, comments, or memory files. - tools: [Edit, Write] - gate: No stale documentation remains.",
   "old": null,
   "new": "### Step 6: Document Update any affected documentation, comments, or memory files. - tools: [Edit, Write] - gate: No stale documentation remains.",
   "marked": "{+### Step 6: Document Update any affected documentation, comments, or memory files. - tools: [Edit, Write] - gate: No stale documentation remains.+}"
  },
  {
   "section": "Success Criteria - Bug is fixed and verified by test - Root cause is documented - No regressions introduced",
   "old": null,
   "new": "## Success Criteria - Bug is fixed and verified by test - Root cause is documented - No regressions introduced",
   "marked": "{+## Success Criteria - Bug is fixed and verified by test - Root cause is documented - No regressions introduced+}"
  },
  {
   "section": "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 ```",
   "old": null,
   "new": "## 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 ```",
   "marked": "{+## 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 ```+}"
  },
  {
   "section": "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 ```",
   "old": null,
   "new": "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.",
   "marked": "{+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.+}"
  },
  {
   "section": "3.2 Built-in Recipes",
   "old": null,
   "new": "### 3.2 Built-in Recipes",
   "marked": "{+### 3.2 Built-in Recipes+}"
  },
  {
   "section": "3.2 Built-in Recipes",
   "old": null,
   "new": "Prefrontal v3.0 ships with six built-in recipes covering the most common agent tasks:",
   "marked": "{+Prefrontal v3.0 ships with six built-in recipes covering the most common agent tasks:+}"
  },
  {
   "section": "3.2 Built-in Recipes",
   "old": null,
   "new": "| 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 |",
   "marked": "{+| 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 |+}"
  },
  {
   "section": "3.2 Built-in Recipes",
   "old": null,
   "new": "Each 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.",
   "marked": "{+Each 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.+}"
  },
  {
   "section": "3.3 Custom Recipes",
   "old": null,
   "new": "### 3.3 Custom Recipes",
   "marked": "{+### 3.3 Custom Recipes+}"
  },
  {
   "section": "3.3 Custom Recipes",
   "old": null,
   "new": "Users 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.\"",
   "marked": "{+Users 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.\"+}"
  },
  {
   "section": "3.3 Custom Recipes",
   "old": null,
   "new": "Custom 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).",
   "marked": "{+Custom 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).+}"
  },
  {
   "section": "3.4 Recipe Selection",
   "old": null,
   "new": "### 3.4 Recipe Selection",
   "marked": "{+### 3.4 Recipe Selection+}"
  },
  {
   "section": "3.4 Recipe Selection",
   "old": null,
   "new": "When a user message arrives, Prefrontal classifies the intent and selects the appropriate recipe through a three-tier strategy:",
   "marked": "{+When a user message arrives, Prefrontal classifies the intent and selects the appropriate recipe through a three-tier strategy:+}"
  },
  {
   "section": "3.4 Recipe Selection",
   "old": null,
   "new": "1. **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.",
   "marked": "{+1. **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.+}"
  },
  {
   "section": "3.4 Recipe Selection",
   "old": null,
   "new": "2. **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.\"",
   "marked": "{+2. **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.\"+}"
  },
  {
   "section": "3.4 Recipe Selection",
   "old": null,
   "new": "3. **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.",
   "marked": "{+3. **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.+}"
  },
  {
   "section": "3.4 Recipe Selection",
   "old": null,
   "new": "For 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.",
   "marked": "{+For 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.+}"
  },
  {
   "section": "3.5 Step Enforcement",
   "old": null,
   "new": "### 3.5 Step Enforcement",
   "marked": "{+### 3.5 Step Enforcement+}"
  },
  {
   "section": "3.5 Step Enforcement",
   "old": null,
   "new": "Each 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:",
   "marked": "{+Each 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:+}"
  },
  {
   "section": "3.5 Step Enforcement",
   "old": null,
   "new": "- *\"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.",
   "marked": "{+- *\"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.+}"
  },
  {
   "section": "3.5 Step Enforcement",
   "old": null,
   "new": "Gates 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.",
   "marked": "{+Gates 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.+}"
  },
  {
   "section": "3.5 Step Enforcement",
   "old": null,
   "new": "This 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.",
   "marked": "{+This 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.+}"
  },
  {
   "section": "4. Measuring Compounded Intelligence",
   "old": "## 4. Measuring Compounded Intelligence",
   "new": null,
   "marked": "[-## 4. Measuring Compounded Intelligence-]"
  },
  {
   "section": "4. Measuring Compounded Intelligence",
   "old": "Before 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.",
   "new": null,
   "marked": "[-Before 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.-]"
  },
  {
   "section": "4. Measuring Compounded Intelligence",
   "old": "![Metrics Framework](fig-metrics.png){ width=65% }",
   "new": null,
   "marked": "[-![Metrics Framework](fig-metrics.png){ width=65% }-]"
  },
  {
   "section": "4. Measuring Compounded Intelligence",
   "old": "**Figure 9.** The three measurement axes for compounded intelligence, arranged along a spectrum from direct observation (FAAR) to counterfactual estimation (TC).",
   "new": null,
   "marked": "[-**Figure 9.** The three measurement axes for compounded intelligence, arranged along a spectrum from direct observation (FAAR) to counterfactual estimation (TC).-]"
  },
  {
   "section": "4.1 First-Attempt Accuracy Rate (FAAR)",
   "old": "### 4.1 First-Attempt Accuracy Rate (FAAR)",
   "new": null,
   "marked": "[-### 4.1 First-Attempt Accuracy Rate (FAAR)-]"
  },
  {
   "section": "4.1 First-Attempt Accuracy Rate (FAAR)",
   "old": "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).",
   "new": null,
   "marked": "[-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).-]"
  },
  {
   "section": "4.2 Resource Efficiency Ratio (RER)",
   "old": "### 4.2 Resource Efficiency Ratio (RER)",
   "new": null,
   "marked": "[-### 4.2 Resource Efficiency Ratio (RER)-]"
  },
  {
   "section": "4.2 Resource Efficiency Ratio (RER)",
   "old": "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.",
   "new": null,
   "marked": "[-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.-]"
  },
  {
   "section": "4.3 Transfer Coefficient (TC)",
   "old": "### 4.3 Transfer Coefficient (TC)",
   "new": null,
   "marked": "[-### 4.3 Transfer Coefficient (TC)-]"
  },
  {
   "section": "4.3 Transfer Coefficient (TC)",
   "old": "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.",
   "new": null,
   "marked": "[-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.-]"
  },
  {
   "section": "4.4 Composite Intelligence Index (CII)",
   "old": "### 4.4 Composite Intelligence Index (CII)",
   "new": null,
   "marked": "[-### 4.4 Composite Intelligence Index (CII)-]"
  },
  {
   "section": "4.4 Composite Intelligence Index (CII)",
   "old": "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.",
   "new": null,
   "marked": "[-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.-]"
  },
  {
   "section": "4.4 Composite Intelligence Index (CII)",
   "old": "**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.",
   "new": null,
   "marked": "[-**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.-]"
  },
  {
   "section": "4.4 Composite Intelligence Index (CII)",
   "old": "| 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% |",
   "new": null,
   "marked": "[-| 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% |-]"
  },
  {
   "section": "4.4 Composite Intelligence Index (CII)",
   "old": "**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.",
   "new": null,
   "marked": "[-**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.-]"
  },
  {
   "section": "4.4 Composite Intelligence Index (CII)",
   "old": "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.)",
   "new": null,
   "marked": "[-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.)-]"
  },
  {
   "section": "4. The Cognitive Cycle (Complete)",
   "old": null,
   "new": "## 4. The Cognitive Cycle (Complete)",
   "marked": "{+## 4. The Cognitive Cycle (Complete)+}"
  },
  {
   "section": "4. The Cognitive Cycle (Complete)",
   "old": null,
   "new": "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.",
   "marked": "{+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.+}"
  },
  {
   "section": "4. The Cognitive Cycle (Complete)",
   "old": null,
   "new": "Version 3.0 completes the cycle.",
   "marked": "{+Version 3.0 completes the cycle.+}"
  },
  {
   "section": "4.1 Pre-Action: From Questions to Recipes",
   "old": null,
   "new": "### 4.1 Pre-Action: From Questions to Recipes",
   "marked": "{+### 4.1 Pre-Action: From Questions to Recipes+}"
  },
  {
   "section": "4.1 Pre-Action: From Questions to Recipes",
   "old": null,
   "new": "The pre-action phase now encompasses:",
   "marked": "{+The pre-action phase now encompasses:+}"
  },
  {
   "section": "4.1 Pre-Action: From Questions to Recipes",
   "old": null,
   "new": "1. **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.",
   "marked": "{+1. **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.+}"
  },
  {
   "section": "4.1 Pre-Action: From Questions to Recipes",
   "old": null,
   "new": "2. **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.",
   "marked": "{+2. **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.+}"
  },
  {
   "section": "4.1 Pre-Action: From Questions to Recipes",
   "old": null,
   "new": "3. **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.",
   "marked": "{+3. **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.+}"
  },
  {
   "section": "4.1 Pre-Action: From Questions to Recipes",
   "old": null,
   "new": "4. **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.",
   "marked": "{+4. **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.+}"
  },
  {
   "section": "4.2 During-Action: Supervised Execution",
   "old": null,
   "new": "### 4.2 During-Action: Supervised Execution",
   "marked": "{+### 4.2 During-Action: Supervised Execution+}"
  },
  {
   "section": "4.2 During-Action: Supervised Execution",
   "old": null,
   "new": "The 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:",
   "marked": "{+The 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:+}"
  },
  {
   "section": "4.2 During-Action: Supervised Execution",
   "old": null,
   "new": "- **Progress tracking**: each subagent emits structured events as it completes recipe steps. Prefrontal maintains a progress model and updates the UI.",
   "marked": "{+- **Progress tracking**: each subagent emits structured events as it completes recipe steps. Prefrontal maintains a progress model and updates the UI.+}"
  },
  {
   "section": "4.2 During-Action: Supervised Execution",
   "old": null,
   "new": "- **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.",
   "marked": "{+- **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.+}"
  },
  {
   "section": "4.2 During-Action: Supervised Execution",
   "old": null,
   "new": "- **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.",
   "marked": "{+- **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.+}"
  },
  {
   "section": "4.2 During-Action: Supervised Execution",
   "old": null,
   "new": "- **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.",
   "marked": "{+- **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.+}"
  },
  {
   "section": "4.3 Post-Action: Fractal Reflection, Orchestrated",
   "old": null,
   "new": "### 4.3 Post-Action: Fractal Reflection, Orchestrated",
   "marked": "{+### 4.3 Post-Action: Fractal Reflection, Orchestrated+}"
  },
  {
   "section": "4.3 Post-Action: Fractal Reflection, Orchestrated",
   "old": null,
   "new": "The 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*:",
   "marked": "{+The 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*:+}"
  },
  {
   "section": "4.3 Post-Action: Fractal Reflection, Orchestrated",
   "old": null,
   "new": "1. **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.",
   "marked": "{+1. **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.+}"
  },
  {
   "section": "4.3 Post-Action: Fractal Reflection, Orchestrated",
   "old": null,
   "new": "2. **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.\"",
   "marked": "{+2. **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.\"+}"
  },
  {
   "section": "4.3 Post-Action: Fractal Reflection, Orchestrated",
   "old": null,
   "new": "3. **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.",
   "marked": "{+3. **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.+}"
  },
  {
   "section": "4.3 Post-Action: Fractal Reflection, Orchestrated",
   "old": null,
   "new": "4. **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.\"",
   "marked": "{+4. **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.\"+}"
  },
  {
   "section": "4.4 The FRACTAL Pattern: Cache-Shared Follow-Up Calls",
   "old": null,
   "new": "### 4.4 The FRACTAL Pattern: Cache-Shared Follow-Up Calls",
   "marked": "{+### 4.4 The FRACTAL Pattern: Cache-Shared Follow-Up Calls+}"
  },
  {
   "section": "4.4 The FRACTAL Pattern: Cache-Shared Follow-Up Calls",
   "old": null,
   "new": "The 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.",
   "marked": "{+The 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.+}"
  },
  {
   "section": "4.4 The FRACTAL Pattern: Cache-Shared Follow-Up Calls",
   "old": null,
   "new": "The 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\").",
   "marked": "{+The 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\").+}"
  },
  {
   "section": "4.4 The FRACTAL Pattern: Cache-Shared Follow-Up Calls",
   "old": null,
   "new": "The 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.\"",
   "marked": "{+The 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.\"+}"
  },
  {
   "section": "5. Experience — What Six Months of Operation Taught Us",
   "old": "## 5. Experience — What Six Months of Operation Taught Us",
   "new": null,
   "marked": "[-## 5. Experience — What Six Months of Operation Taught Us-]"
  },
  {
   "section": "5. Experience — What Six Months of Operation Taught Us",
   "old": "This 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).",
   "new": null,
   "marked": "[-This 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).-]"
  },
  {
   "section": "5. Experience — What Six Months of Operation Taught Us",
   "old": "**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.",
   "new": null,
   "marked": "[-**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.-]"
  },
  {
   "section": "5. Experience — What Six Months of Operation Taught Us",
   "old": "**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.",
   "new": null,
   "marked": "[-**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.-]"
  },
  {
   "section": "5. Experience — What Six Months of Operation Taught Us",
   "old": "**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.",
   "new": null,
   "marked": "[-**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.-]"
  },
  {
   "section": "5.1 First-Attempt Accuracy (FAAR)",
   "old": "### 5.1 First-Attempt Accuracy (FAAR)",
   "new": null,
   "marked": "[-### 5.1 First-Attempt Accuracy (FAAR)-]"
  },
  {
   "section": "5.1 First-Attempt Accuracy (FAAR)",
   "old": "We sampled 50 sessions from each measurement period and classified task outcomes:",
   "new": null,
   "marked": "[-We sampled 50 sessions from each measurement period and classified task outcomes:-]"
  },
  {
   "section": "5.1 First-Attempt Accuracy (FAAR)",
   "old": "| 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** |",
   "new": null,
   "marked": "[-| 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** |-]"
  },
  {
   "section": "5.1 First-Attempt Accuracy (FAAR)",
   "old": "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.",
   "new": null,
   "marked": "[-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.-]"
  },
  {
   "section": "5.1 First-Attempt Accuracy (FAAR)",
   "old": "**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.",
   "new": null,
   "marked": "[-**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.-]"
  },
  {
   "section": "5.2 Resource Efficiency (RER)",
   "old": "### 5.2 Resource Efficiency (RER)",
   "new": null,
   "marked": "[-### 5.2 Resource Efficiency (RER)-]"
  },
  {
   "section": "5.2 Resource Efficiency (RER)",
   "old": "Token consumption per equivalent task decreased over time:",
   "new": null,
   "marked": "[-Token consumption per equivalent task decreased over time:-]"
  },
  {
   "section": "5.2 Resource Efficiency (RER)",
   "old": "| 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** |",
   "new": null,
   "marked": "[-| 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** |-]"
  },
  {
   "section": "5.2 Resource Efficiency (RER)",
   "old": "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.",
   "new": null,
   "marked": "[-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.-]"
  },
  {
   "section": "5.3 Retention and Transfer (TC)",
   "old": "### 5.3 Retention and Transfer (TC)",
   "new": null,
   "marked": "[-### 5.3 Retention and Transfer (TC)-]"
  },
  {
   "section": "5.3 Retention and Transfer (TC)",
   "old": "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:",
   "new": null,
   "marked": "[-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:-]"
  },
  {
   "section": "5.3 Retention and Transfer (TC)",
   "old": "**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\").",
   "new": null,
   "marked": "[-**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\").-]"
  },
  {
   "section": "5.3 Retention and Transfer (TC)",
   "old": "Estimated TC(code→calendar) ≈ 0.15 (the lesson prevented approximately 15% of the baseline calendar error rate).",
   "new": null,
   "marked": "[-Estimated TC(code→calendar) ≈ 0.15 (the lesson prevented approximately 15% of the baseline calendar error rate).-]"
  },
  {
   "section": "5.3 Retention and Transfer (TC)",
   "old": "**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.",
   "new": null,
   "marked": "[-**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.-]"
  },
  {
   "section": "5.3 Retention and Transfer (TC)",
   "old": "Estimated TC(WhatsApp→Discord) ≈ 0.25.",
   "new": null,
   "marked": "[-Estimated TC(WhatsApp→Discord) ≈ 0.25.-]"
  },
  {
   "section": "5.3 Retention and Transfer (TC)",
   "old": "**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.",
   "new": null,
   "marked": "[-**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.-]"
  },
  {
   "section": "5.3 Retention and Transfer (TC)",
   "old": "Estimated TC(exec→general_tools) ≈ 0.10.",
   "new": null,
   "marked": "[-Estimated TC(exec→general_tools) ≈ 0.10.-]"
  },
  {
   "section": "5.3 Retention and Transfer (TC)",
   "old": "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.",
   "new": null,
   "marked": "[-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.-]"
  },
  {
   "section": "5.3 Retention and Transfer (TC)",
   "old": "**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.",
   "new": null,
   "marked": "[-**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.-]"
  },
  {
   "section": "5.4 Composite Intelligence Index",
   "old": "### 5.4 Composite Intelligence Index",
   "new": null,
   "marked": "[-### 5.4 Composite Intelligence Index-]"
  },
  {
   "section": "5.4 Composite Intelligence Index",
   "old": "Applying the CII formula with our primary weights (α=0.4, β=0.35, γ=0.25):",
   "new": null,
   "marked": "[-Applying the CII formula with our primary weights (α=0.4, β=0.35, γ=0.25):-]"
  },
  {
   "section": "5.4 Composite Intelligence Index",
   "old": "| 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 |",
   "new": null,
   "marked": "[-| 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 |-]"
  },
  {
   "section": "5.4 Composite Intelligence Index",
   "old": "![CII Improvement](fig-cii.png){ width=50% }",
   "new": null,
   "marked": "[-![CII Improvement](fig-cii.png){ width=50% }-]"
  },
  {
   "section": "5.4 Composite Intelligence Index",
   "old": "**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.",
   "new": null,
   "marked": "[-**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.-]"
  },
  {
   "section": "5.4 Composite Intelligence Index",
   "old": "CII 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.",
   "new": null,
   "marked": "[-CII 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.-]"
  },
  {
   "section": "5.4 Composite Intelligence Index",
   "old": "![Prompt vs Model Boundary](fig-boundary.png)",
   "new": null,
   "marked": "[-![Prompt vs Model Boundary](fig-boundary.png)-]"
  },
  {
   "section": "5.4 Composite Intelligence Index",
   "old": "**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.",
   "new": null,
   "marked": "[-**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.-]"
  },
  {
   "section": "5.5 The Prompt-Level vs Model-Level Boundary",
   "old": "### 5.5 The Prompt-Level vs Model-Level Boundary",
   "new": null,
   "marked": "[-### 5.5 The Prompt-Level vs Model-Level Boundary-]"
  },
  {
   "section": "5.5 The Prompt-Level vs Model-Level Boundary",
   "old": "During 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.",
   "new": null,
   "marked": "[-During 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.-]"
  },
  {
   "section": "5.5 The Prompt-Level vs Model-Level Boundary",
   "old": "Conversely, 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.",
   "new": null,
   "marked": "[-Conversely, 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.-]"
  },
  {
   "section": "5.5 The Prompt-Level vs Model-Level Boundary",
   "old": "This 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.",
   "new": null,
   "marked": "[-This 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.-]"
  },
  {
   "section": "5.6 What Didn't Work",
   "old": "### 5.6 What Didn't Work",
   "new": null,
   "marked": "[-### 5.6 What Didn't Work-]"
  },
  {
   "section": "5.6 What Didn't Work",
   "old": "Intellectual honesty requires documenting failures:",
   "new": null,
   "marked": "[-Intellectual honesty requires documenting failures:-]"
  },
  {
   "section": "5.6 What Didn't Work",
   "old": "1. **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.",
   "new": null,
   "marked": "[-1. **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.-]"
  },
  {
   "section": "5.6 What Didn't Work",
   "old": "2. **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.",
   "new": null,
   "marked": "[-2. **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.-]"
  },
  {
   "section": "5.6 What Didn't Work",
   "old": "3. **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.",
   "new": null,
   "marked": "[-3. **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.-]"
  },
  {
   "section": "5.6 What Didn't Work",
   "old": "4. **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.",
   "new": null,
   "marked": "[-4. **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.-]"
  },
  {
   "section": "5.6 What Didn't Work",
   "old": "5. **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.",
   "new": null,
   "marked": "[-5. **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.-]"
  },
  {
   "section": "5. Integration with Existing Extensions",
   "old": null,
   "new": "## 5. Integration with Existing Extensions",
   "marked": "{+## 5. Integration with Existing Extensions+}"
  },
  {
   "section": "5. Integration with Existing Extensions",
   "old": null,
   "new": "Prefrontal v3.0 does not replace the existing extension ecosystem --- it orchestrates it. Each extension retains its autonomous function while gaining a coordination layer.",
   "marked": "{+Prefrontal v3.0 does not replace the existing extension ecosystem --- it orchestrates it. Each extension retains its autonomous function while gaining a coordination layer.+}"
  },
  {
   "section": "5.1 Total Recall (Memory Retrieval)",
   "old": null,
   "new": "### 5.1 Total Recall (Memory Retrieval)",
   "marked": "{+### 5.1 Total Recall (Memory Retrieval)+}"
  },
  {
   "section": "5.1 Total Recall (Memory Retrieval)",
   "old": null,
   "new": "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:",
   "marked": "{+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:+}"
  },
  {
   "section": "5.1 Total Recall (Memory Retrieval)",
   "old": null,
   "new": "- **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.\"",
   "marked": "{+- **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.\"+}"
  },
  {
   "section": "5.1 Total Recall (Memory Retrieval)",
   "old": null,
   "new": "- **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.",
   "marked": "{+- **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.+}"
  },
  {
   "section": "5.2 Identity Persistence (SOUL.md)",
   "old": null,
   "new": "### 5.2 Identity Persistence (SOUL.md)",
   "marked": "{+### 5.2 Identity Persistence (SOUL.md)+}"
  },
  {
   "section": "5.2 Identity Persistence (SOUL.md)",
   "old": null,
   "new": "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.",
   "marked": "{+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.+}"
  },
  {
   "section": "5.2 Identity Persistence (SOUL.md)",
   "old": null,
   "new": "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.",
   "marked": "{+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.+}"
  },
  {
   "section": "5.3 Learned Intuition (AMYGDALA)",
   "old": null,
   "new": "### 5.3 Learned Intuition (AMYGDALA)",
   "marked": "{+### 5.3 Learned Intuition (AMYGDALA)+}"
  },
  {
   "section": "5.3 Learned Intuition (AMYGDALA)",
   "old": null,
   "new": "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.",
   "marked": "{+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.+}"
  },
  {
   "section": "5.3 Learned Intuition (AMYGDALA)",
   "old": null,
   "new": "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.",
   "marked": "{+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.+}"
  },
  {
   "section": "5.4 Fractal Reflection (Orchestrated)",
   "old": null,
   "new": "### 5.4 Fractal Reflection (Orchestrated)",
   "marked": "{+### 5.4 Fractal Reflection (Orchestrated)+}"
  },
  {
   "section": "5.4 Fractal Reflection (Orchestrated)",
   "old": null,
   "new": "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:",
   "marked": "{+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:+}"
  },
  {
   "section": "5.4 Fractal Reflection (Orchestrated)",
   "old": null,
   "new": "- **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.",
   "marked": "{+- **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.+}"
  },
  {
   "section": "5.4 Fractal Reflection (Orchestrated)",
   "old": null,
   "new": "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.",
   "marked": "{+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.+}"
  },
  {
   "section": "5.7 Implementation: The Prefrontal Plugin",
   "old": "### 5.7 Implementation: The Prefrontal Plugin",
   "new": null,
   "marked": "[-### 5.7 Implementation: The Prefrontal Plugin-]"
  },
  {
   "section": "5.7 Implementation: The Prefrontal Plugin",
   "old": "During 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.",
   "new": null,
   "marked": "[-During 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.-]"
  },
  {
   "section": "5.7 Implementation: The Prefrontal Plugin",
   "old": "The implementation is structured in four priority tiers:",
   "new": null,
   "marked": "[-The implementation is structured in four priority tiers:-]"
  },
  {
   "section": "5.7 Implementation: The Prefrontal Plugin",
   "old": "**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.",
   "new": null,
   "marked": "[-**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.-]"
  },
  {
   "section": "5.7 Implementation: The Prefrontal Plugin",
   "old": "**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.",
   "new": null,
   "marked": "[-**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.-]"
  },
  {
   "section": "5.7 Implementation: The Prefrontal Plugin",
   "old": "**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.",
   "new": null,
   "marked": "[-**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.-]"
  },
  {
   "section": "5.7 Implementation: The Prefrontal Plugin",
   "old": "**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.",
   "new": null,
   "marked": "[-**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.-]"
  },
  {
   "section": "5.7 Implementation: The Prefrontal Plugin",
   "old": "The 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.",
   "new": null,
   "marked": "[-The 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.-]"
  },
  {
   "section": "5.7 Implementation: The Prefrontal Plugin",
   "old": "A follow-up implementation session (same day) closed four of the five architectural gaps identified in the initial deployment:",
   "new": null,
   "marked": "[-A follow-up implementation session (same day) closed four of the five architectural gaps identified in the initial deployment:-]"
  },
  {
   "section": "5.7 Implementation: The Prefrontal Plugin",
   "old": "- **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.",
   "new": null,
   "marked": "[-- **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.-]"
  },
  {
   "section": "5.7 Implementation: The Prefrontal Plugin",
   "old": "- **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.",
   "new": null,
   "marked": "[-- **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.-]"
  },
  {
   "section": "5.7 Implementation: The Prefrontal Plugin",
   "old": "- **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.",
   "new": null,
   "marked": "[-- **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.-]"
  },
  {
   "section": "5.7 Implementation: The Prefrontal Plugin",
   "old": "- **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.",
   "new": null,
   "marked": "[-- **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.-]"
  },
  {
   "section": "5.7 Implementation: The Prefrontal Plugin",
   "old": "The 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.",
   "new": null,
   "marked": "[-The 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.-]"
  },
  {
   "section": "5.7 Implementation: The Prefrontal Plugin",
   "old": "**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.",
   "new": null,
   "marked": "[-**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.-]"
  },
  {
   "section": "6. Discussion",
   "old": "## 6. Discussion",
   "new": null,
   "marked": "[-## 6. Discussion-]"
  },
  {
   "section": "6.1 The Compounding Hypothesis",
   "old": "### 6.1 The Compounding Hypothesis",
   "new": null,
   "marked": "[-### 6.1 The Compounding Hypothesis-]"
  },
  {
   "section": "6.1 The Compounding Hypothesis",
   "old": "Our central claim — that agent intelligence compounds through architecture, not model scale — has a strong form and a weak form.",
   "new": null,
   "marked": "[-Our central claim — that agent intelligence compounds through architecture, not model scale — has a strong form and a weak form.-]"
  },
  {
   "section": "6.1 The Compounding Hypothesis",
   "old": "The **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.",
   "new": null,
   "marked": "[-The **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.-]"
  },
  {
   "section": "6.1 The Compounding Hypothesis",
   "old": "The **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.",
   "new": null,
   "marked": "[-The **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.-]"
  },
  {
   "section": "6.2 Why Files Beat Databases (For Now)",
   "old": "### 6.2 Why Files Beat Databases (For Now)",
   "new": null,
   "marked": "[-### 6.2 Why Files Beat Databases (For Now)-]"
  },
  {
   "section": "6.2 Why Files Beat Databases (For Now)",
   "old": "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:",
   "new": null,
   "marked": "[-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:-]"
  },
  {
   "section": "6.2 Why Files Beat Databases (For Now)",
   "old": "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.",
   "new": null,
   "marked": "[-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.-]"
  },
  {
   "section": "6.2 Why Files Beat Databases (For Now)",
   "old": "2. **Model compatibility:** Every language model can read markdown. Not every model can execute SQL queries or traverse graph structures effectively.",
   "new": null,
   "marked": "[-2. **Model compatibility:** Every language model can read markdown. Not every model can execute SQL queries or traverse graph structures effectively.-]"
  },
  {
   "section": "6.2 Why Files Beat Databases (For Now)",
   "old": "3. **Graceful degradation:** If the retrieval system fails, the agent can still function by reading files directly. A database failure is more catastrophic.",
   "new": null,
   "marked": "[-3. **Graceful degradation:** If the retrieval system fails, the agent can still function by reading files directly. A database failure is more catastrophic.-]"
  },
  {
   "section": "6.2 Why Files Beat Databases (For Now)",
   "old": "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.",
   "new": null,
   "marked": "[-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.-]"
  },
  {
   "section": "6.2 Why Files Beat Databases (For Now)",
   "old": "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.",
   "new": null,
   "marked": "[-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.-]"
  },
  {
   "section": "6.3 Comparison with Skill Libraries",
   "old": "### 6.3 Comparison with Skill Libraries",
   "new": null,
   "marked": "[-### 6.3 Comparison with Skill Libraries-]"
  },
  {
   "section": "6.3 Comparison with Skill Libraries",
   "old": "Voyager'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.",
   "new": null,
   "marked": "[-Voyager'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.-]"
  },
  {
   "section": "6.4 The Model-Level Horizon",
   "old": "### 6.4 The Model-Level Horizon",
   "new": null,
   "marked": "[-### 6.4 The Model-Level Horizon-]"
  },
  {
   "section": "6.4 The Model-Level Horizon",
   "old": "What would change if foundation model providers exposed more of their models' internal reasoning? Two possibilities are particularly relevant:",
   "new": null,
   "marked": "[-What would change if foundation model providers exposed more of their models' internal reasoning? Two possibilities are particularly relevant:-]"
  },
  {
   "section": "6.4 The Model-Level Horizon",
   "old": "**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.",
   "new": null,
   "marked": "[-**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.-]"
  },
  {
   "section": "6.4 The Model-Level Horizon",
   "old": "**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.",
   "new": null,
   "marked": "[-**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.-]"
  },
  {
   "section": "6.4 The Model-Level Horizon",
   "old": "Both possibilities are speculative but directionally likely as providers compete on agent-friendliness.",
   "new": null,
   "marked": "[-Both possibilities are speculative but directionally likely as providers compete on agent-friendliness.-]"
  },
  {
   "section": "6.5 Deployment Patterns: Feature-Flagged Cognitive Architecture",
   "old": "### 6.5 Deployment Patterns: Feature-Flagged Cognitive Architecture",
   "new": null,
   "marked": "[-### 6.5 Deployment Patterns: Feature-Flagged Cognitive Architecture-]"
  },
  {
   "section": "6.5 Deployment Patterns: Feature-Flagged Cognitive Architecture",
   "old": "Claude 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.",
   "new": null,
   "marked": "[-Claude 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.-]"
  },
  {
   "section": "6.5 Deployment Patterns: Feature-Flagged Cognitive Architecture",
   "old": "A 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.",
   "new": null,
   "marked": "[-A 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.-]"
  },
  {
   "section": "6.6 The Bitter Lesson for Orchestration",
   "old": "### 6.6 The Bitter Lesson for Orchestration",
   "new": null,
   "marked": "[-### 6.6 The Bitter Lesson for Orchestration-]"
  },
  {
   "section": "6.6 The Bitter Lesson for Orchestration",
   "old": "Meta-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.",
   "new": null,
   "marked": "[-Meta-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.-]"
  },
  {
   "section": "6. Evaluation Design",
   "old": null,
   "new": "## 6. Evaluation Design",
   "marked": "{+## 6. Evaluation Design+}"
  },
  {
   "section": "6.1 FAAR Improvement Targets",
   "old": null,
   "new": "### 6.1 FAAR Improvement Targets",
   "marked": "{+### 6.1 FAAR Improvement Targets+}"
  },
  {
   "section": "6.1 FAAR Improvement Targets",
   "old": null,
   "new": "The recipe system should produce measurable improvements in first-attempt accuracy by preventing the most common failure modes:",
   "marked": "{+The recipe system should produce measurable improvements in first-attempt accuracy by preventing the most common failure modes:+}"
  },
  {
   "section": "6.1 FAAR Improvement Targets",
   "old": null,
   "new": "| 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** |",
   "marked": "{+| 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** |+}"
  },
  {
   "section": "6.1 FAAR Improvement Targets",
   "old": null,
   "new": "These 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.",
   "marked": "{+These 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.+}"
  },
  {
   "section": "6.2 Cost Analysis",
   "old": null,
   "new": "### 6.2 Cost Analysis",
   "marked": "{+### 6.2 Cost Analysis+}"
  },
  {
   "section": "6.2 Cost Analysis",
   "old": null,
   "new": "The recipe engine adds two LLM calls per complex task (orchestration + reflection). The cost depends on cache hit rates:",
   "marked": "{+The recipe engine adds two LLM calls per complex task (orchestration + reflection). The cost depends on cache hit rates:+}"
  },
  {
   "section": "6.2 Cost Analysis",
   "old": null,
   "new": "| 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 |",
   "marked": "{+| 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 |+}"
  },
  {
   "section": "6.2 Cost Analysis",
   "old": null,
   "new": "Even 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).",
   "marked": "{+Even 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).+}"
  },
  {
   "section": "6.3 Latency Analysis",
   "old": null,
   "new": "### 6.3 Latency Analysis",
   "marked": "{+### 6.3 Latency Analysis+}"
  },
  {
   "section": "6.3 Latency Analysis",
   "old": null,
   "new": "The orchestration call adds latency before the agent begins visible work:",
   "marked": "{+The orchestration call adds latency before the agent begins visible work:+}"
  },
  {
   "section": "6.3 Latency Analysis",
   "old": null,
   "new": "| 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 |",
   "marked": "{+| 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 |+}"
  },
  {
   "section": "6.3 Latency Analysis",
   "old": null,
   "new": "For 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).",
   "marked": "{+For 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).+}"
  },
  {
   "section": "6.4 Comparison with Claude Code's Skill System",
   "old": null,
   "new": "### 6.4 Comparison with Claude Code's Skill System",
   "marked": "{+### 6.4 Comparison with Claude Code's Skill System+}"
  },
  {
   "section": "6.4 Comparison with Claude Code's Skill System",
   "old": null,
   "new": "| 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 |",
   "marked": "{+| 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 |+}"
  },
  {
   "section": "6.4 Comparison with Claude Code's Skill System",
   "old": null,
   "new": "The 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.",
   "marked": "{+The 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.+}"
  },
  {
   "section": "7. Future Work",
   "old": "## 7. Future Work",
   "new": null,
   "marked": "[-## 7. Future Work-]"
  },
  {
   "section": "7.1 Utility-Based Memory Pruning",
   "old": "### 7.1 Utility-Based Memory Pruning",
   "new": null,
   "marked": "[-### 7.1 Utility-Based Memory Pruning-]"
  },
  {
   "section": "7.1 Utility-Based Memory Pruning",
   "old": "The 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.",
   "new": null,
   "marked": "[-The 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.-]"
  },
  {
   "section": "7.2 Learned Forgetting",
   "old": "### 7.2 Learned Forgetting",
   "new": null,
   "marked": "[-### 7.2 Learned Forgetting-]"
  },
  {
   "section": "7.2 Learned Forgetting",
   "old": "Complementary 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.",
   "new": null,
   "marked": "[-Complementary 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.-]"
  },
  {
   "section": "7.3 Temporal and Relational Memory Linking",
   "old": "### 7.3 Temporal and Relational Memory Linking",
   "new": null,
   "marked": "[-### 7.3 Temporal and Relational Memory Linking-]"
  },
  {
   "section": "7.3 Temporal and Relational Memory Linking",
   "old": "Current 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?\"",
   "new": null,
   "marked": "[-Current 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?\"-]"
  },
  {
   "section": "7.4 Automated Evaluation Framework",
   "old": "### 7.4 Automated Evaluation Framework",
   "new": null,
   "marked": "[-### 7.4 Automated Evaluation Framework-]"
  },
  {
   "section": "7.4 Automated Evaluation Framework",
   "old": "The 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.",
   "new": null,
   "marked": "[-The 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.-]"
  },
  {
   "section": "7.5 Learned Action Gating",
   "old": "### 7.5 Learned Action Gating",
   "new": null,
   "marked": "[-### 7.5 Learned Action Gating-]"
  },
  {
   "section": "7.5 Learned Action Gating",
   "old": "A 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.",
   "new": null,
   "marked": "[-A 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.-]"
  },
  {
   "section": "7.5 Learned Action Gating",
   "old": "A 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.",
   "new": null,
   "marked": "[-A 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.-]"
  },
  {
   "section": "7.6 Formal Ablation Studies",
   "old": "### 7.6 Formal Ablation Studies",
   "new": null,
   "marked": "[-### 7.6 Formal Ablation Studies-]"
  },
  {
   "section": "7.6 Formal Ablation Studies",
   "old": "Our 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.",
   "new": null,
   "marked": "[-Our 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.-]"
  },
  {
   "section": "7.7 Self-Evolving Agent Architecture",
   "old": "### 7.7 Self-Evolving Agent Architecture",
   "new": null,
   "marked": "[-### 7.7 Self-Evolving Agent Architecture-]"
  },
  {
   "section": "7.7 Self-Evolving Agent Architecture",
   "old": "The 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.",
   "new": null,
   "marked": "[-The 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.-]"
  },
  {
   "section": "7.7 Self-Evolving Agent Architecture",
   "old": "Applied 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.",
   "new": null,
   "marked": "[-Applied 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.-]"
  },
  {
   "section": "7.7 Self-Evolving Agent Architecture",
   "old": "Claude 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.",
   "new": null,
   "marked": "[-Claude 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.-]"
  },
  {
   "section": "7.7 Self-Evolving Agent Architecture",
   "old": "![Recursive Self-Improvement Flywheel](fig-flywheel.png){ width=60% }",
   "new": null,
   "marked": "[-![Recursive Self-Improvement Flywheel](fig-flywheel.png){ width=60% }-]"
  },
  {
   "section": "7.7 Self-Evolving Agent Architecture",
   "old": "**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.",
   "new": null,
   "marked": "[-**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.-]"
  },
  {
   "section": "7.7 Self-Evolving Agent Architecture",
   "old": "The 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.",
   "new": null,
   "marked": "[-The 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.-]"
  },
  {
   "section": "7.8 Pre-Action Reflection",
   "old": "### 7.8 Pre-Action Reflection",
   "new": null,
   "marked": "[-### 7.8 Pre-Action Reflection-]"
  },
  {
   "section": "7.8 Pre-Action Reflection",
   "old": "Our 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.",
   "new": null,
   "marked": "[-Our 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.-]"
  },
  {
   "section": "7. Implementation Status",
   "old": null,
   "new": "## 7. Implementation Status",
   "marked": "{+## 7. Implementation Status+}"
  },
  {
   "section": "7.1 What Is Built (v2.4 Baseline)",
   "old": null,
   "new": "### 7.1 What Is Built (v2.4 Baseline)",
   "marked": "{+### 7.1 What Is Built (v2.4 Baseline)+}"
  },
  {
   "section": "7.1 What Is Built (v2.4 Baseline)",
   "old": null,
   "new": "The following components are deployed and operational:",
   "marked": "{+The following components are deployed and operational:+}"
  },
  {
   "section": "7.1 What Is Built (v2.4 Baseline)",
   "old": null,
   "new": "- **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.",
   "marked": "{+- **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.+}"
  },
  {
   "section": "7.1 What Is Built (v2.4 Baseline)",
   "old": null,
   "new": "Total: ~3,900 lines of TypeScript, 151 tests, 12 test files, 6 RPC endpoints.",
   "marked": "{+Total: ~3,900 lines of TypeScript, 151 tests, 12 test files, 6 RPC endpoints.+}"
  },
  {
   "section": "7.2 What Is New in v3.0",
   "old": null,
   "new": "### 7.2 What Is New in v3.0",
   "marked": "{+### 7.2 What Is New in v3.0+}"
  },
  {
   "section": "7.2 What Is New in v3.0",
   "old": null,
   "new": "The following components are proposed and specified but not yet implemented:",
   "marked": "{+The following components are proposed and specified but not yet implemented:+}"
  },
  {
   "section": "7.2 What Is New in v3.0",
   "old": null,
   "new": "- **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.",
   "marked": "{+- **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.+}"
  },
  {
   "section": "7.3 Roadmap",
   "old": null,
   "new": "### 7.3 Roadmap",
   "marked": "{+### 7.3 Roadmap+}"
  },
  {
   "section": "7.3 Roadmap",
   "old": null,
   "new": "**Phase 1 (Foundation)**: Recipe format specification, parser, and built-in library. Intent classifier with keyword and structure matching. Estimated: 1--2 sessions.",
   "marked": "{+**Phase 1 (Foundation)**: Recipe format specification, parser, and built-in library. Intent classifier with keyword and structure matching. Estimated: 1--2 sessions.+}"
  },
  {
   "section": "7.3 Roadmap",
   "old": null,
   "new": "**Phase 2 (Orchestration)**: Prefrontal as first call. Orchestrator loop with plan injection. Single-agent execution (no parallelism yet). Estimated: 2--3 sessions.",
   "marked": "{+**Phase 2 (Orchestration)**: Prefrontal as first call. Orchestrator loop with plan injection. Single-agent execution (no parallelism yet). Estimated: 2--3 sessions.+}"
  },
  {
   "section": "7.3 Roadmap",
   "old": null,
   "new": "**Phase 3 (Parallelism)**: Subagent supervisor. Progress reporter. Stall detection. Wire the existing fork-subagent module into the recipe engine. Estimated: 2--3 sessions.",
   "marked": "{+**Phase 3 (Parallelism)**: Subagent supervisor. Progress reporter. Stall detection. Wire the existing fork-subagent module into the recipe engine. Estimated: 2--3 sessions.+}"
  },
  {
   "section": "7.3 Roadmap",
   "old": null,
   "new": "**Phase 4 (Reflection)**: Reflection orchestrator. Recipe-aware reflection context. Recipe evolution from reflection findings. Estimated: 1--2 sessions.",
   "marked": "{+**Phase 4 (Reflection)**: Reflection orchestrator. Recipe-aware reflection context. Recipe evolution from reflection findings. Estimated: 1--2 sessions.+}"
  },
  {
   "section": "7.3 Roadmap",
   "old": null,
   "new": "**Phase 5 (UI)**: Recipe overlay on call tree. Cost tracking. Progress panel. Estimated: 1--2 sessions.",
   "marked": "{+**Phase 5 (UI)**: Recipe overlay on call tree. Cost tracking. Progress panel. Estimated: 1--2 sessions.+}"
  },
  {
   "section": "7.3 Roadmap",
   "old": null,
   "new": "**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.",
   "marked": "{+**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.+}"
  },
  {
   "section": "8. Conclusion",
   "old": "Intelligence that doesn't compound isn't intelligence — it's capability. A calculator has capability. A human who learns from each calculation has intelligence.",
   "new": null,
   "marked": "[-Intelligence that doesn't compound isn't intelligence — it's capability. A calculator has capability. A human who learns from each calculation has intelligence.-]"
  },
  {
   "section": "8. Conclusion",
   "old": "We 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.",
   "new": null,
   "marked": "[-We 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.-]"
  },
  {
   "section": "8. Conclusion",
   "old": "The 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.",
   "new": null,
   "marked": "[-The 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.-]"
  },
  {
   "section": "8. Conclusion",
   "old": "The 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.",
   "new": null,
   "marked": "[-The 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.-]"
  },
  {
   "section": "8. Conclusion",
   "old": "The 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.",
   "new": null,
   "marked": "[-The 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.-]"
  },
  {
   "section": "8. Conclusion",
   "old": "The intern who never makes the same mistake twice is not the one with the biggest brain. It's the one who writes things down.",
   "new": null,
   "marked": "[-The intern who never makes the same mistake twice is not the one with the biggest brain. It's the one who writes things down.-]"
  },
  {
   "section": "8. Conclusion",
   "old": "---",
   "new": null,
   "marked": "[-----]"
  },
  {
   "section": "8. Conclusion",
   "old": "---",
   "new": null,
   "marked": "[-----]"
  },
  {
   "section": "Appendix A: Fractal Reflection Pseudocode",
   "old": "## Appendix A: Fractal Reflection Pseudocode",
   "new": null,
   "marked": "[-## Appendix A: Fractal Reflection Pseudocode-]"
  },
  {
   "section": "Appendix A: Fractal Reflection Pseudocode",
   "old": "``` ALGORITHM: FractalReflection(turn_context, memory_files)",
   "new": null,
   "marked": "[-``` ALGORITHM: FractalReflection(turn_context, memory_files)-]"
  },
  {
   "section": "Appendix A: Fractal Reflection Pseudocode",
   "old": "Input: 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",
   "new": null,
   "marked": "[-Input: 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-]"
  },
  {
   "section": "Appendix A: Fractal Reflection Pseudocode",
   "old": "W <- {}; E <- {}",
   "new": null,
   "marked": "[-W <- {}; E <- {}-]"
  },
  {
   "section": "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)}",
   "old": "# 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)}",
   "new": null,
   "marked": "[-# 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)}-]"
  },
  {
   "section": "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)}",
   "old": "# 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)}",
   "new": null,
   "marked": "[-# 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)}-]"
  },
  {
   "section": "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)}",
   "old": "# 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)}",
   "new": null,
   "marked": "[-# 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)}-]"
  },
  {
   "section": "Step 4: IMPROVE -- opportunistic fixes improvements <- scan_for_improvements(memory_files, turn_context) for each improvement in improvements: E <- E + {apply(improvement)}",
   "old": "# Step 4: IMPROVE -- opportunistic fixes improvements <- scan_for_improvements(memory_files, turn_context) for each improvement in improvements: E <- E + {apply(improvement)}",
   "new": null,
   "marked": "[-# Step 4: IMPROVE -- opportunistic fixes improvements <- scan_for_improvements(memory_files, turn_context) for each improvement in improvements: E <- E + {apply(improvement)}-]"
  },
  {
   "section": "Step 4: IMPROVE -- opportunistic fixes improvements <- scan_for_improvements(memory_files, turn_context) for each improvement in improvements: E <- E + {apply(improvement)}",
   "old": "execute(W, E) return W, E ```",
   "new": null,
   "marked": "[-execute(W, E) return W, E ```-]"
  },
  {
   "section": "8. Conclusion",
   "old": null,
   "new": "The 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.",
   "marked": "{+The 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.+}"
  },
  {
   "section": "8. Conclusion",
   "old": null,
   "new": "Version 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.",
   "marked": "{+Version 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.+}"
  },
  {
   "section": "8. Conclusion",
   "old": null,
   "new": "Version 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.",
   "marked": "{+Version 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.+}"
  },
  {
   "section": "8. Conclusion",
   "old": null,
   "new": "The 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**.",
   "marked": "{+The 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**.+}"
  },
  {
   "section": "8. Conclusion",
   "old": null,
   "new": "The 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.",
   "marked": "{+The 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.+}"
  },
  {
   "section": "8. Conclusion",
   "old": null,
   "new": "But 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.",
   "marked": "{+But 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.+}"
  },
  {
   "section": "8. Conclusion",
   "old": null,
   "new": "The 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.",
   "marked": "{+The 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.+}"
  },
  {
   "section": "References",
   "old": null,
   "new": "Anthropic. (2026). Claude Code source code [Accidentally exposed, March 2026]. Analysis based on publicly available descriptions.",
   "marked": "{+Anthropic. (2026). Claude Code source code [Accidentally exposed, March 2026]. Analysis based on publicly available descriptions.+}"
  },
  {
   "section": "References",
   "old": null,
   "new": "Berman, M. (2026). Journey Kits: npm for AI agent workflows. https://journeykits.ai",
   "marked": "{+Berman, M. (2026). Journey Kits: npm for AI agent workflows. https://journeykits.ai+}"
  },
  {
   "section": "References",
   "old": null,
   "new": "Chen, X. et al. (2026). MemexRL: Learning to manage agent memory through reinforcement. *arXiv preprint*.",
   "marked": "{+Chen, X. et al. (2026). MemexRL: Learning to manage agent memory through reinforcement. *arXiv preprint*.+}"
  },
  {
   "section": "References",
   "old": "Chollet, F. (2019). On the Measure of Intelligence. *arXiv preprint arXiv:1911.01547*. https://arxiv.org/abs/1911.01547",
   "new": "Chollet, F. (2019). On the measure of intelligence. *arXiv preprint arXiv:1911.01547*.",
   "marked": "Chollet, F. (2019). On the [-Measure-] {+measure+} of [-Intelligence.-] {+intelligence.+} *arXiv preprint [-arXiv:1911.01547*. https://arxiv.org/abs/1911.01547-] {+arXiv:1911.01547*.+}"
  },
  {
   "section": "References",
   "old": "Chen, W. et al. (2026). MemexRL: Reinforcement Learning for Agent Memory Management. *arXiv preprint arXiv:2603.04257*. https://arxiv.org/abs/2603.04257",
   "new": null,
   "marked": "[-Chen, W. et al. (2026). MemexRL: Reinforcement Learning for Agent Memory Management. *arXiv preprint arXiv:2603.04257*. https://arxiv.org/abs/2603.04257-]"
  },
  {
   "section": "References",
   "old": "Khattab, 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",
   "new": "Khattab, O. et al. (2023). DSPy: Compiling declarative language model calls into self-improving pipelines. *arXiv preprint arXiv:2310.03714*.",
   "marked": "Khattab, O. et al. (2023). DSPy: Compiling [-Declarative Language Model Calls-] {+declarative language model calls+} into [-Self-Improving Pipelines.-] {+self-improving pipelines.+} *arXiv preprint [-arXiv:2310.03714*. https://arxiv.org/abs/2310.03714-] {+arXiv:2310.03714*.+}"
  },
  {
   "section": "References",
   "old": null,
   "new": "Lee, J. et al. (2026). Meta-Harness: Automatically optimising agent scaffolding for terminal benchmarks. *arXiv preprint*.",
   "marked": "{+Lee, J. et al. (2026). Meta-Harness: Automatically optimising agent scaffolding for terminal benchmarks. *arXiv preprint*.+}"
  },
  {
   "section": "References",
   "old": "Li, X. et al. (2026). CraniMem: Neural Memory Compression for Persistent Agents. *arXiv preprint arXiv:2603.15642*. https://arxiv.org/abs/2603.15642",
   "new": "Li, W. et al. (2026). CraniMem: Neural memory compression with hippocampal indexing for LLM agents. *arXiv preprint*.",
   "marked": "Li, [-X.-] {+W.+} et al. (2026). CraniMem: Neural [-Memory Compression-] {+memory compression with hippocampal indexing+} for [-Persistent Agents.-] {+LLM agents.+} *arXiv [-preprint arXiv:2603.15642*. https://arxiv.org/abs/2603.15642-] {+preprint*.+}"
  },
  {
   "section": "References",
   "old": "Madaan, A. et al. (2023). Self-Refine: Iterative Refinement with Self-Feedback. *NeurIPS 2023*. https://arxiv.org/abs/2303.17651",
   "new": "Madaan, A. et al. (2023). Self-Refine: Iterative refinement with self-feedback. *NeurIPS 2023*.",
   "marked": "Madaan, A. et al. (2023). Self-Refine: Iterative [-Refinement-] {+refinement+} with [-Self-Feedback.-] {+self-feedback.+} *NeurIPS [-2023*. https://arxiv.org/abs/2303.17651-] {+2023*.+}"
  },
  {
   "section": "References",
   "old": "Maharana, A. et al. (2024). LoCoMo: Long-Context Memory Benchmark for Conversational Agents. *arXiv preprint arXiv:2402.09714*. https://arxiv.org/abs/2402.09714",
   "new": "Maharana, A. et al. (2024). LoCoMo: Long-context memory evaluation for conversational agents. *arXiv preprint*.",
   "marked": "Maharana, A. et al. (2024). LoCoMo: [-Long-Context Memory Benchmark-] {+Long-context memory evaluation+} for [-Conversational Agents.-] {+conversational agents.+} *arXiv [-preprint arXiv:2402.09714*. https://arxiv.org/abs/2402.09714-] {+preprint*.+}"
  },
  {
   "section": "References",
   "old": null,
   "new": "Nouse Research. (2026). Hermes Agent: Self-improving skill libraries for autonomous agents.",
   "marked": "{+Nouse Research. (2026). Hermes Agent: Self-improving skill libraries for autonomous agents.+}"
  },
  {
   "section": "References",
   "old": "Packer, C. et al. (2023). MemGPT: Towards LLMs as Operating Systems. *arXiv preprint arXiv:2310.08560*. https://arxiv.org/abs/2310.08560",
   "new": "Packer, C. et al. (2023). MemGPT: Towards LLMs as operating systems. *arXiv preprint arXiv:2310.08560*.",
   "marked": "Packer, C. et al. (2023). MemGPT: Towards LLMs as [-Operating Systems.-] {+operating systems.+} *arXiv preprint [-arXiv:2310.08560*. https://arxiv.org/abs/2310.08560-] {+arXiv:2310.08560*.+}"
  },
  {
   "section": "References",
   "old": "Park, J. S. et al. (2023). Generative Agents: Interactive Simulacra of Human Behavior. *UIST 2023*. https://arxiv.org/abs/2304.03442",
   "new": "Park, J. S. et al. (2023). Generative agents: Interactive simulacra of human behavior. *UIST 2023*.",
   "marked": "Park, J. S. et al. (2023). Generative [-Agents:-] {+agents:+} Interactive [-Simulacra-] {+simulacra+} of [-Human Behavior.-] {+human behavior.+} *UIST [-2023*. https://arxiv.org/abs/2304.03442-] {+2023*.+}"
  },
  {
   "section": "References",
   "old": "Park, 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",
   "new": "Park, S. et al. (2026). Governed Memory: Access control and governance for agent memory systems. *arXiv preprint*.",
   "marked": "Park, S. et al. (2026). Governed Memory: Access [-Control-] {+control+} and [-Governance-] {+governance+} for [-Agent Memory Systems.-] {+agent memory systems.+} *arXiv [-preprint arXiv:2603.17787*. https://arxiv.org/abs/2603.17787-] {+preprint*.+}"
  },
  {
   "section": "References",
   "old": "Serra, O. (2026). AMYGDALA: Adaptive Modulation of Your General Disposition via Affective Learned Association — Learned Intuition for Persistent AI Agents. *Independent Research*.",
   "new": "Serra, O. (2026). AMYGDALA: Adaptive modulation of agent disposition via affective learned association. *Working paper*.",
   "marked": "Serra, O. (2026). AMYGDALA: Adaptive [-Modulation-] {+modulation+} of [-Your General Disposition-] {+agent disposition+} via [-Affective Learned Association — Learned Intuition for Persistent AI Agents. *Independent Research*.-] {+affective learned association. *Working paper*.+}"
  },
  {
   "section": "References",
   "old": null,
   "new": "Serra, O. & Jarvis. (2026). PREFRONTAL v2.4: Compounded Intelligence --- How Persistent Agents Get Smarter by Remembering What They Learn. *Working paper*.",
   "marked": "{+Serra, O. & Jarvis. (2026). PREFRONTAL v2.4: Compounded Intelligence --- How Persistent Agents Get Smarter by Remembering What They Learn. *Working paper*.+}"
  },
  {
   "section": "References",
   "old": "Shinn, N. et al. (2023). Reflexion: Language Agents with Verbal Reinforcement Learning. *NeurIPS 2023*. https://arxiv.org/abs/2303.11366",
   "new": "Shinn, N. et al. (2023). Reflexion: Language agents with verbal reinforcement learning. *NeurIPS 2023*.",
   "marked": "Shinn, N. et al. (2023). Reflexion: Language [-Agents-] {+agents+} with [-Verbal Reinforcement Learning.-] {+verbal reinforcement learning.+} *NeurIPS [-2023*. https://arxiv.org/abs/2303.11366-] {+2023*.+}"
  },
  {
   "section": "References",
   "old": null,
   "new": "Tan, P. (2026). GStack: Multi-perspective code review through role-based prompt specialisation.",
   "marked": "{+Tan, P. (2026). GStack: Multi-perspective code review through role-based prompt specialisation.+}"
  },
  {
   "section": "References",
   "old": "Wang, G. et al. (2023). Voyager: An Open-Ended Embodied Agent with Large Language Models. *NeurIPS 2023*. https://arxiv.org/abs/2305.16291",
   "new": "Wang, G. et al. (2023). Voyager: An open-ended embodied agent with large language models. *arXiv preprint arXiv:2305.16291*.",
   "marked": "Wang, G. et al. (2023). Voyager: An [-Open-Ended Embodied Agent-] {+open-ended embodied agent+} with [-Large Language Models. *NeurIPS 2023*. https://arxiv.org/abs/2305.16291-] {+large language models. *arXiv preprint arXiv:2305.16291*.+}"
  },
  {
   "section": "References",
   "old": "Wang, Z. et al. (2026). Ares: Autonomous Agent Self-Evaluation and Improvement. *arXiv preprint arXiv:2603.07915*. https://arxiv.org/abs/2603.07915",
   "new": null,
   "marked": "[-Wang, Z. et al. (2026). Ares: Autonomous Agent Self-Evaluation and Improvement. *arXiv preprint arXiv:2603.07915*. https://arxiv.org/abs/2603.07915-]"
  },
  {
   "section": "References",
   "old": "Lee, Y. et al. (2026). Meta-Harness: End-to-End Optimization of Model Harnesses. *arXiv preprint arXiv:2603.28052*. https://arxiv.org/abs/2603.28052",
   "new": null,
   "marked": "[-Lee, Y. et al. (2026). Meta-Harness: End-to-End Optimization of Model Harnesses. *arXiv preprint arXiv:2603.28052*. https://arxiv.org/abs/2603.28052-]"
  },
  {
   "section": "References",
   "old": "Zhang, 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",
   "new": "Zhang, L. et al. (2026). A survey of memory architectures for LLM-based agents. *arXiv preprint*.",
   "marked": "Zhang, [-Y.-] {+L.+} et al. (2026). A [-Comprehensive Survey-] {+survey+} of [-Memory Architectures-] {+memory architectures+} for [-LLM-Based Agents.-] {+LLM-based agents.+} *arXiv [-preprint arXiv:2603.07670*. https://arxiv.org/abs/2603.07670-] {+preprint*.+}"
  },
  {
   "section": "References",
   "old": "Anthropic (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",
   "new": null,
   "marked": "[-Anthropic (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-]"
  },
  {
   "section": "References",
   "old": "Tan, G. (2026). GStack: A development process framework for AI-assisted solo developers. https://github.com/garytan/gstack",
   "new": null,
   "marked": "[-Tan, G. (2026). GStack: A development process framework for AI-assisted solo developers. https://github.com/garytan/gstack-]"
  },
  {
   "section": "References",
   "old": "Nouse Research (2026). Hermes Agent: Self-improving personal AI agent with closed learning loop. https://github.com/nousresearch/hermes-agent",
   "new": null,
   "marked": "[-Nouse Research (2026). Hermes Agent: Self-improving personal AI agent with closed learning loop. https://github.com/nousresearch/hermes-agent-]"
  },
  {
   "section": "References",
   "old": "Paperclip (2026). Open-source orchestration for zero-human companies. https://github.com/paperclip-ai/paperclip",
   "new": null,
   "marked": "[-Paperclip (2026). Open-source orchestration for zero-human companies. https://github.com/paperclip-ai/paperclip-]"
  },
  {
   "section": "References",
   "old": null,
   "new": "---",
   "marked": "{+---+}"
  },
  {
   "section": "Appendix A: Recipe Execution Pseudocode",
   "old": null,
   "new": "## Appendix A: Recipe Execution Pseudocode",
   "marked": "{+## Appendix A: Recipe Execution Pseudocode+}"
  },
  {
   "section": "Appendix A: Recipe Execution Pseudocode",
   "old": null,
   "new": "``` ALGORITHM: RecipeExecution(user_message, context, recipe_library)",
   "marked": "{+``` ALGORITHM: RecipeExecution(user_message, context, recipe_library)+}"
  },
  {
   "section": "Appendix A: Recipe Execution Pseudocode",
   "old": null,
   "new": "Input: 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",
   "marked": "{+Input: 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+}"
  },
  {
   "section": "Phase 1: PLAN (cache-shared LLM call) intent <- classify_intent(user_message) if intent.complexity < THRESHOLD_SIMPLE: return passthrough(user_message, context) # no orchestration",
   "old": null,
   "new": "# Phase 1: PLAN (cache-shared LLM call) intent <- classify_intent(user_message) if intent.complexity < THRESHOLD_SIMPLE: return passthrough(user_message, context) # no orchestration",
   "marked": "{+# Phase 1: PLAN (cache-shared LLM call) intent <- classify_intent(user_message) if intent.complexity < THRESHOLD_SIMPLE: return passthrough(user_message, context) # no orchestration+}"
  },
  {
   "section": "Phase 1: PLAN (cache-shared LLM call) intent <- classify_intent(user_message) if intent.complexity < THRESHOLD_SIMPLE: return passthrough(user_message, context) # no orchestration",
   "old": null,
   "new": "recipe <- select_recipe(intent, recipe_library) plan <- compose_plan(recipe, context)",
   "marked": "{+recipe <- select_recipe(intent, recipe_library) plan <- compose_plan(recipe, context)+}"
  },
  {
   "section": "Phase 1: PLAN (cache-shared LLM call) intent <- classify_intent(user_message) if intent.complexity < THRESHOLD_SIMPLE: return passthrough(user_message, context) # no orchestration",
   "old": null,
   "new": "if plan.estimated_duration > 5 minutes: present_plan_to_user(plan) if user.redirects: plan <- revise_plan(user.feedback)",
   "marked": "{+if plan.estimated_duration > 5 minutes: present_plan_to_user(plan) if user.redirects: plan <- revise_plan(user.feedback)+}"
  },
  {
   "section": "Phase 1: PLAN (cache-shared LLM call) intent <- classify_intent(user_message) if intent.complexity < THRESHOLD_SIMPLE: return passthrough(user_message, context) # no orchestration",
   "old": null,
   "new": "subagents <- allocate_subagents(plan, context)",
   "marked": "{+subagents <- allocate_subagents(plan, context)+}"
  },
  {
   "section": "Phase 2: EXECUTE (supervised subagent dispatch) for each step S in plan.steps: workers <- subagents[S] dispatch(workers, S.task, S.tools)",
   "old": null,
   "new": "# Phase 2: EXECUTE (supervised subagent dispatch) for each step S in plan.steps: workers <- subagents[S] dispatch(workers, S.task, S.tools)",
   "marked": "{+# Phase 2: EXECUTE (supervised subagent dispatch) for each step S in plan.steps: workers <- subagents[S] dispatch(workers, S.task, S.tools)+}"
  },
  {
   "section": "Phase 2: EXECUTE (supervised subagent dispatch) for each step S in plan.steps: workers <- subagents[S] dispatch(workers, S.task, S.tools)",
   "old": null,
   "new": "while not S.complete: events <- collect_events(workers, timeout=S.expected_duration)",
   "marked": "{+while not S.complete: events <- collect_events(workers, timeout=S.expected_duration)+}"
  },
  {
   "section": "Phase 2: EXECUTE (supervised subagent dispatch) for each step S in plan.steps: workers <- subagents[S] dispatch(workers, S.task, S.tools)",
   "old": null,
   "new": "if stall_detected(events, S): intervene(workers, S, context)",
   "marked": "{+if stall_detected(events, S): intervene(workers, S, context)+}"
  },
  {
   "section": "Phase 2: EXECUTE (supervised subagent dispatch) for each step S in plan.steps: workers <- subagents[S] dispatch(workers, S.task, S.tools)",
   "old": null,
   "new": "if cross_subagent_update(events): relay_findings(events, subagents)",
   "marked": "{+if cross_subagent_update(events): relay_findings(events, subagents)+}"
  },
  {
   "section": "Phase 2: EXECUTE (supervised subagent dispatch) for each step S in plan.steps: workers <- subagents[S] dispatch(workers, S.task, S.tools)",
   "old": null,
   "new": "emit_progress(S, workers)",
   "marked": "{+emit_progress(S, workers)+}"
  },
  {
   "section": "Phase 2: EXECUTE (supervised subagent dispatch) for each step S in plan.steps: workers <- subagents[S] dispatch(workers, S.task, S.tools)",
   "old": null,
   "new": "if not gate_satisfied(S.gate, workers.output): if S.failure_handler exists: execute(S.failure_handler) else: escalate_to_user(S, workers.output)",
   "marked": "{+if not gate_satisfied(S.gate, workers.output): if S.failure_handler exists: execute(S.failure_handler) else: escalate_to_user(S, workers.output)+}"
  },
  {
   "section": "Phase 2: EXECUTE (supervised subagent dispatch) for each step S in plan.steps: workers <- subagents[S] dispatch(workers, S.task, S.tools)",
   "old": null,
   "new": "response <- aggregate_results(plan, subagents)",
   "marked": "{+response <- aggregate_results(plan, subagents)+}"
  },
  {
   "section": "Phase 3: REFLECT (cache-shared LLM call) reflection_context <- { recipe: recipe, plan: plan, execution_trace: subagents.traces, response: response }",
   "old": null,
   "new": "# Phase 3: REFLECT (cache-shared LLM call) reflection_context <- { recipe: recipe, plan: plan, execution_trace: subagents.traces, response: response }",
   "marked": "{+# Phase 3: REFLECT (cache-shared LLM call) reflection_context <- { recipe: recipe, plan: plan, execution_trace: subagents.traces, response: response }+}"
  },
  {
   "section": "Phase 3: REFLECT (cache-shared LLM call) reflection_context <- { recipe: recipe, plan: plan, execution_trace: subagents.traces, response: response }",
   "old": null,
   "new": "W <- FractalReflection(reflection_context, memory_files)",
   "marked": "{+W <- FractalReflection(reflection_context, memory_files)+}"
  },
  {
   "section": "Phase 3: REFLECT (cache-shared LLM call) reflection_context <- { recipe: recipe, plan: plan, execution_trace: subagents.traces, response: response }",
   "old": null,
   "new": "if reflection.recipe_update: update_recipe(recipe, reflection.recipe_update)",
   "marked": "{+if reflection.recipe_update: update_recipe(recipe, reflection.recipe_update)+}"
  },
  {
   "section": "Phase 3: REFLECT (cache-shared LLM call) reflection_context <- { recipe: recipe, plan: plan, execution_trace: subagents.traces, response: response }",
   "old": null,
   "new": "return response, W ```",
   "marked": "{+return response, W ```+}"
  },
  {
   "section": "Appendix B: Built-in Recipe Index",
   "old": null,
   "new": "## Appendix B: Built-in Recipe Index",
   "marked": "{+## Appendix B: Built-in Recipe Index+}"
  },
  {
   "section": "Appendix B: Built-in Recipe Index",
   "old": null,
   "new": "| 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 |",
   "marked": "{+| 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 |+}"
  }
 ]
}
