ReadPrintedHistoryCompareGraphs

v7.4 → v8.0

What changed from v7.4 to v8.0

From v7.4 (2 Jun) to v8.0 (11 Jun): 8,246 words to 10,054 words, 9,166 words in new or rewritten paragraphs and 7,358 taken out, 377 paragraphs changed.

Rewritten around one reflex at every scale, and how its first build failed

Almost the whole text is new (90% changed). The thesis is now one reflective step, observe, evaluate, adapt, used at every scale, like a body that heals a scratch and an infection with the same reflex. The paper grounds this in a running personal-agent system and reports how its first, prompt-only version quietly stopped working. The memory index shrinks to one section.

  • New: the reflection ladder, its lowest rung and its side-to-side axis, with self-similarity stated precisely.
  • New post-mortem: the reflection prompt failed in three ways, ending with a startup step that loaded it and then threw it away.
  • New design: a parallel reflection lane with a cheap first check, a results ledger and owner approval for risky self-changes.
  • New measured cost: a warm cache makes each reflection about a tenth of the price of re-reading the turn.
  • Every claim about the running system is tagged by how well it is backed, and the paper lists where its previous edition broke that rule.
  • The full 216-line reflection prompt is reprinted as Appendix A. The old background, complexity analysis and comparison sections are removed.
v7.4 · 2 June 2026v8.0 · 11 June 2026

··· 1 unchanged paragraph folded ···

v7.4 · AbstractLLM-based agents store and retrieve information at a single granularity, yet language, knowledge, and reasoning exhibit statistical self-similarity across scales. We propose **Fractal Reasoning**, a framework that applies fractal mathematics to both the _data structures_ and the _cognitive processes_ of LLM-based systems. The **Fractal Memory Index (FMI)** integrates buffered consolidation for write-optimized ingestion, Hilbert-curve multi-resolution indexing for locality-preserving retrieval, and Iterated Function System (IFS) semantic compression. **Fractal Metacognition** structures agent reasoning into self-similar levels — from a pre-task retrieval check through task, process, and meta-pattern reasoning — where each level applies the same reflective operation at a different cognitive scale. Theoretical analysis shows O(1) amortized writes and O(L · log_B n) multi-resolution retrieval. We compare FMI against RAPTOR, MemGPT, standard RAG, and KV-cache compression, and show that existing systems like RAPTOR already exploit fractal self-similarity implicitly. We also ground the proposal against a deployed flat-index memory system, identifying the concrete query class where flat indexing fails and multi-resolution retrieval would succeed, and we report which of the framework's near-term layers have since been built into that system. This is a theoretical contribution and research agenda; empirical validation of the compression hypothesis is the primary next step.
removed in v8.0
not in v7.4
v8.0 · AbstractLLM agents reason and remember at a single scale, yet the failures that matter — a wrong answer, a habit of wrong answers, a system that produces the habit — live at different scales of the same structure. We propose **Fractal Reasoning**: one reflective operation, *observe – evaluate – adapt*, applied unchanged at every cognitive scale, the way a living body runs the same heal-the-wound reflex on a scratch, an infection, and an immune deficiency. The framework is grounded in a deployed personal-agent system: we present the **216-line reflection doctrine that ran in production** (included verbatim as Appendix A), a post-mortem of how its prompt-only implementation silently died — phoned-in output, fabricated telemetry, and finally a bootstrap that loaded the doctrine and deliberately discarded it — and the corrected architecture that replaced it: a **parallel reflection lane** with a cheap always-on triage pass, an escalation lane that acts under structural (not prompted) capability limits, an append-only results ledger that makes the reflection layer itself measurable, and a ratification queue for the small class of self-modifications a system should not apply to its own host unsupervised. A live cache probe validates the architecture's economics: a forked conversation prefix is served warm (155,495 cached tokens read against 10,877 written), so reflecting on a turn costs a fraction of re-reading it. The second half of the report carries forward the **Fractal Memory Index (FMI)** — buffered consolidation, Hilbert-curve multi-resolution indexing, and IFS semantic compression — as the storage-side instance of the same self-similarity thesis, condensed here to its load-bearing claims and its central open experiment. Every deployment claim in this report is tagged with its evidence class: live-and-verified, code-present-but-unverified, design-of-record, or pure theory. This discipline is itself an application of the framework: the report's previous edition failed it in three places, documented in §8.

··· 1 unchanged paragraph folded ···

v7.4 · 1. Introduction## 1. Introduction
removed in v8.0
v7.4 · 1. IntroductionThe human brain stores knowledge at many levels of abstraction at once. The neocortex processes sensory input through a stack of layers, each extracting more abstract features than the one below it: you recognize a face not by matching pixels but through a hierarchy — edges, then shapes, then features, then identity. Recall works the same way. A memory of "that security incident last month" is reachable both as a specific event and as an instance of a broader pattern, and the brain indexes it at every level simultaneously.
removed in v8.0
v7.4 · 1. IntroductionAI memory does not work this way. As LLMs power long-running agent systems, personal assistants, and enterprise knowledge platforms, they must manage information that far exceeds fixed context windows. Current solutions — retrieval-augmented generation (Lewis et al., 2020), hierarchical retrieval (Sarthi et al., 2024), OS-inspired memory management (Packer et al., 2023), and KV-cache compression (Xiao et al., 2023; Zhang et al., 2024a) — each address fragments of the problem. None provides a unified framework, and most retrieve at a single granularity. This paper brings the neocortex's multi-resolution, hierarchical organization to AI memory: indexing at the level of raw events, topic clusters, and abstract concepts at the same time.
removed in v8.0
v7.4 · 1. IntroductionThese challenges share a common structure that fractal mathematics addresses directly:
removed in v8.0
v7.4 · 1. Introduction1. **Scale invariance in semantic content.** Documents, conversations, and knowledge bases exhibit statistical self-similarity: the distribution of topics within a corpus mirrors the distribution of subtopics within a document, which mirrors the distribution of concepts within a paragraph. This reflects well-known power-law distributions in natural language (Zipf, 1949; Mandelbrot, 1953).
removed in v8.0
v7.4 · 1. Introduction2. **Multi-resolution retrieval needs.** Users and downstream tasks require information at varying abstraction levels — sometimes a gist, sometimes a specific detail. Flat vector retrieval returns results at a single granularity.
removed in v8.0
v7.4 · 1. Introduction3. **Asymmetric read/write patterns.** Memory systems ingest information continuously but retrieve on demand. This asymmetry matches the performance profile of write-optimized tree indexes.
removed in v8.0
v7.4 · 1. Introduction4. **Biological precedent.** The hippocampal-neocortical memory consolidation system exhibits properties suggestive of fractal organization: hierarchical structure, multi-scale temporal dynamics, and iterative compression during sleep-replay (McClelland et al., 1995; Buzsáki, 1996). We draw on these parallels as architectural inspiration, not as direct evidence (see §2.3).
removed in v8.0
v7.4 · 1. IntroductionThe fractal structure of intelligence extends beyond data. Most current LLM agents concentrate cognitive effort at a single level — the task at hand — with few systematic mechanisms for accumulating meta-level insights across reasoning episodes. (Tree-of-thought and self-reflection approaches address aspects of this within single episodes; see §9.1.) Effective reasoning benefits from self-similarity across cognitive scales: an agent solving a problem (Level 1) benefits from reflecting on its problem-solving strategy (Level 2), which benefits from recognizing patterns across strategies (Level 3). Each level applies the same reflective operation at a different scale, and each discovers insights invisible from the level below.
removed in v8.0
v7.4 · 1. IntroductionThese observations motivate **Fractal Reasoning**: an architecture that applies self-similarity to both the storage infrastructure and the cognitive processes of LLM-based systems.
removed in v8.0
not in v7.4
v8.0 · 1. One concept: the same reflex at every scale## 1. One concept: the same reflex at every scale
not in v7.4
v8.0 · 1. One concept: the same reflex at every scaleA living body does not have one repair department for paper cuts and an unrelated one for infections. It runs the **same reflex** — sense the damage, contain it, repair it, verify it closed — at every scale: a cell, a tissue, an organ. And it keeps a **memory**: each exposure is recorded, and a wound the body has seen twice triggers a faster, more systemic response than a wound it has never seen. The second response is not a bigger bandage; it is an *antibody* — a fix to the class, not the instance.
not in v7.4
v8.0 · 1. One concept: the same reflex at every scaleFractal Reasoning applies this shape to an LLM agent:
not in v7.4
v8.0 · 1. One concept: the same reflex at every scale- **A scratch** — one answer was wrong, one file path was mistyped. Detect it, fix it, verify the fix. - **An infection** — the same *kind* of mistake keeps appearing across turns. The signal is recurrence; the response is not the Nth local patch but a change to whatever produces the pattern. *Fix the column, not the cell.* - **Immune memory** — every detection and every fix is recorded in a durable ledger. The ledger is what lets the system notice recurrence at all, and it is what makes the reflection layer itself observable: a reflection system with no records cannot answer "am I helping?" — which is precisely how the previous deployment rotted unnoticed (§3). - **Germline protection** — a body edits its somatic cells constantly but does not casually rewrite its own DNA. Likewise, the agent fixes files, memory, and recipes autonomously, but the four self-modifications that can take the host down or amplify a defect — its own live configuration, its own reflection prompts and source, its host's build, its own service controls — are packaged as one-click *proposals* for the owner, each carrying the exact patch. This is a confidence-staged brake, not a forbidden zone: a class that accumulates accepted proposals with zero rollbacks graduates to direct action with an automatic rollback artifact.
not in v7.4
v8.0 · 1. One concept: the same reflex at every scaleThe fractal claim is strict: this is **one operation, not a hierarchy of departments**. Each level applies *observe – evaluate – adapt* to the output of the level below. A hierarchy assigns different jobs to different layers; a fractal applies the same job to ever-larger objects. That distinction does real work in the architecture: because the operation is identical, the levels share one event contract, one ledger, one evidence discipline, and one safety model — only the scope, the cadence, and the cost change.
not in v7.4
v8.0 · 1. One concept: the same reflex at every scaleThe same claim, applied to storage instead of thought, yields the Fractal Memory Index (§9): index the same content at the granularity of events, episodes, and concepts simultaneously, because queries arrive at every one of those scales.

··· 1 unchanged paragraph folded ···

v7.4 · 1.1 ContributionsThis paper is a theoretical contribution and research agenda. We present:
removed in v8.0
v7.4 · 1.1 Contributions- A formal analysis of self-similarity in LLM memory systems, connecting fractal mathematics to practical memory challenges. - The FMI architecture integrating three components: buffered consolidation, space-filling curve indexing, and IFS-based compression. - Theoretical complexity analysis comparing FMI to existing approaches. - Identification of RAPTOR's implicit fractal structure and how formalizing it yields improvements. - A grounded comparison against a deployed flat anchor-to-chunk memory system, with a concrete query class where flat retrieval fails and multi-resolution retrieval would succeed (§5.5). - **Fractal Metacognition**: a framework for self-similar reasoning across cognitive scales — including a pre-task retrieval-confidence level — connecting fractal data structures to fractal cognition. - A concrete research agenda for empirical validation, particularly IFS-based semantic compression, and a report on which near-term layers — the horizontal link layer (§7.6) and bounded deliberation search (§9.6) — have since been built into the deployed baseline.
removed in v8.0
not in v7.4
v8.0 · 1.1 Contributions1. **A unified metacognition ladder** (L0–L3) with one reflective template at every rung, including the pre-task retrieval-confidence check (L0) that single-level agents skip, and a **horizontal consequence scan** orthogonal to the vertical zoom (§2). 2. **The deployed doctrine, published**: the complete production reflection prompt (Appendix A), mapped rung-by-rung onto the framework, with a disposition table recording what the next generation keeps, splits, and retires (§3, §A). 3. **A deployment post-mortem** of prompt-only metacognition: how it degraded, how its self-reported telemetry was discovered to be fabricated, and the corrected thesis — *prompting expresses the levels; only structure enforces them* (§3.3). 4. **An architecture that survived contact**: the parallel reflection lane — always-on read-only triage, escalation-on-find with structural capability limits, a results ledger with named KPIs, a derived (never frozen) resource governor, and the ratification queue — with its measured cache economics (§4–§6). 5. **A constitution-conformance method**: the system's own design constitution is fractal ("derive every bound from the live situation; a frozen threshold is a bug"), and we report a same-day audit in which the reflection layer's *own design* was caught violating it in 22 places — the framework catching itself, at the meta-level the framework predicts (§7). 6. **The storage-side instance**: FMI — buffered consolidation, Hilbert-curve multi-resolution retrieval, IFS compression — condensed to its complexity results and its falsifiable core experiment (§9). 7. **An evidence-class discipline** for deployment claims, applied to this report's own previous edition (§8).
v7.4 · 1.2 Notation and terms### 1.2 Notation
v8.0 · 1.2 Notation and terms### 1.2 Notation and terms
v7.4 · 1.2 Notation| Symbol | Meaning | | ------ | ---------------------------------------------------------- | | n | Number of memories in the store | | D | Ambient embedding dimension (e.g., 768, 1024, 4096) | | d | Intrinsic fractal dimension of the embedding space | | B | Block/branching factor of the Bε-tree | | ε | Bε-tree buffer parameter controlling write/read tradeoff | | L | Number of granularity levels in multi-resolution retrieval | | k | Number of IFS contractive mappings | | τ_ℓ | Retrieval threshold at granularity level ℓ |
removed in v8.0
v7.4 · 1.2 NotationThroughout, we use _memory_ to denote a discrete unit of stored information: a text chunk, conversation turn, observation, or their compressed representation.
removed in v8.0
not in v7.4
v8.0 · 1.2 Notation and terms| Term | Meaning | | --- | --- | | *Turn* | One user request → assistant answer cycle | | *Main lane* | The execution path that produces the user-visible answer | | *Reflection lane* | A parallel execution path, with its own run identity, that judges a finished turn | | *Triage* | The cheap, every-turn, read-only reflection pass | | *Fix lane* | The expensive, escalated pass that acts on a triage finding | | *Ledger* | The append-only record of every reflection outcome | | *L0–L3* | The metacognition ladder rungs (§2.1) | | n, D, d, B, ε, L, k, τ_ℓ | FMI notation, unchanged from §9 |

··· 1 unchanged paragraph folded ···

v7.4 · 2. Background## 2. Background
removed in v8.0
v7.4 · 2.1 Fractal Mathematics: Key Concepts### 2.1 Fractal Mathematics: Key Concepts
removed in v8.0
v7.4 · 2.1 Fractal Mathematics: Key Concepts**Self-similarity** describes objects whose parts resemble the whole at different scales. A set S is _exactly self-similar_ if S = ∪ᵢ fᵢ(S) for a finite set of contractive maps {fᵢ}. More relevant to natural data is _statistical self-similarity_, where statistical properties are invariant under scaling.
removed in v8.0
v7.4 · 2.1 Fractal Mathematics: Key Concepts**Fractal dimension** generalizes the notion of dimension to non-integer values. For a set S in D-dimensional ambient space, the box-counting dimension is:
removed in v8.0
v7.4 · 2.1 Fractal Mathematics: Key Conceptsd_B = lim_{ε→0} log N(ε) / log(1/ε)
removed in v8.0
v7.4 · 2.1 Fractal Mathematics: Key Conceptswhere N(ε) is the number of ε-boxes needed to cover S. When d_B < D, the set occupies a lower-dimensional submanifold of D-dimensional space, creating the opportunity for compression.
removed in v8.0
v7.4 · 2.1 Fractal Mathematics: Key Concepts**Iterated Function Systems (IFS)** (Barnsley, 1988) are finite collections of contractive mappings {f₁, ..., fₖ} on a complete metric space. By the Banach Fixed Point Theorem, there exists a unique compact set (the _attractor_) A such that A = ∪ᵢ fᵢ(A). The **Collage Theorem** provides the key insight for compression: if the attractor of an IFS approximates a target set, then the IFS code (the set of contractive maps) provides a compact representation.
removed in v8.0
v7.4 · 2.1 Fractal Mathematics: Key Concepts**Space-filling curves** map the unit interval [0,1] surjectively onto [0,1]ᴰ while preserving locality. The **Hilbert curve** (Hilbert, 1891) gives the best locality preservation among space-filling curves: nearby points on the curve correspond to nearby points in the higher-dimensional space. Imagine folding a long piece of string so that points close together on the string stay close together in space — that is what the Hilbert curve does for high-dimensional data, preserving neighborhood relationships when you flatten them for storage. This property is exploited in database indexing for efficient range queries over multidimensional data (Lawder & King, 2000).
removed in v8.0
v7.4 · 2.1 Fractal Mathematics: Key Concepts**Bε-trees** (Brodal & Fagerberg, 2003) generalize B-trees by adding message buffers to internal nodes. The parameter ε ∈ (0, 1] controls the tradeoff between insert and query performance. With branching factor B:
removed in v8.0
v7.4 · 2.1 Fractal Mathematics: Key Concepts- Insert: O(log_B N / (ε · B^(1-ε))) amortized I/Os - Point query: O(log_B N / ε) I/Os - Range query of k results: O(log_B N / ε + k/B) I/Os
removed in v8.0
v7.4 · 2.1 Fractal Mathematics: Key ConceptsThis makes Bε-trees optimal for write-heavy workloads, as commercialized in TokuDB (Tokutek/Percona).
removed in v8.0
v7.4 · 2.2 Existing LLM Memory Systems### 2.2 Existing LLM Memory Systems
removed in v8.0
v7.4 · 2.2 Existing LLM Memory Systems**Retrieval-Augmented Generation (RAG)** (Lewis et al., 2020) augments LLM generation with retrieved documents. Standard RAG chunks documents into fixed-size segments, embeds them, stores them in a vector database, and retrieves the top-k most similar chunks at query time. Limitations: chunk boundary artifacts, flat single-granularity retrieval, no consolidation or compression.
removed in v8.0
v7.4 · 2.2 Existing LLM Memory Systems**RAPTOR** (Sarthi et al., 2024) constructs a hierarchical summary tree by recursively clustering and summarizing text chunks. Using UMAP for dimensionality reduction and Gaussian Mixture Models for clustering, RAPTOR builds a tree where leaf nodes are original chunks and internal nodes are progressively more abstract summaries. Retrieval occurs at any level, enabling multi-granularity access. RAPTOR achieves state-of-the-art results on question-answering benchmarks requiring multi-step reasoning over long documents.
removed in v8.0
v7.4 · 2.2 Existing LLM Memory Systems**MemGPT** (Packer et al., 2023) treats the LLM context window as "RAM" and external storage as "disk," implementing virtual memory management where the LLM decides what to page in and out. MemGPT uses vector search for its external storage but adds a paging layer that manages what enters the context window. This enables unbounded conversation history but introduces overhead from self-managed memory operations.
removed in v8.0
v7.4 · 2.2 Existing LLM Memory Systems**KV-Cache Compression** addresses inference-time memory bottlenecks. Approaches include quantization (KIVI: 2-bit KV cache, Hooper et al., 2024), token eviction (H2O: Heavy-Hitter Oracle, Zhang et al., 2024b; StreamingLLM: attention sinks, Xiao et al., 2023), and paging (vLLM: PagedAttention, Kwon et al., 2023). These reduce memory footprint by 2-8× but operate at the token level without semantic awareness.
removed in v8.0
v7.4 · 2.2 Existing LLM Memory Systems**HippoRAG** (Gutiérrez et al., 2024) and **Mem0** (2024) integrate knowledge graphs with retrieval, adding relational structure to flat vector stores. These represent a step toward structured memory but do not exploit self-similarity.
removed in v8.0
v7.4 · 2.3 Neuroscience of Memory Consolidation### 2.3 Neuroscience of Memory Consolidation
removed in v8.0
v7.4 · 2.3 Neuroscience of Memory ConsolidationThe hippocampal-neocortical memory system provides architectural intuition for memory system design:
removed in v8.0
v7.4 · 2.3 Neuroscience of Memory Consolidation**Complementary Learning Systems** (McClelland et al., 1995): The hippocampus rapidly encodes episodic memories; the neocortex slowly consolidates them into semantic knowledge. This two-speed architecture prevents catastrophic interference.
removed in v8.0
v7.4 · 2.3 Neuroscience of Memory Consolidation**Sleep replay** (Buzsáki, 1996; Diekelmann & Born, 2010): During sleep, hippocampal sharp-wave ripples replay compressed versions of waking experiences. This is temporally nested: slow oscillations (< 1 Hz) modulate sleep spindles (12-15 Hz), which modulate ripples (80-120 Hz) — a hierarchical temporal structure with self-similar nesting.
removed in v8.0
v7.4 · 2.3 Neuroscience of Memory Consolidation**Hierarchical Temporal Memory** (Hawkins et al., 2004; 2019): Numenta's HTM framework models neocortical computation using cortical columns that repeat the same algorithm at every level — a self-similar processing hierarchy with sparse distributed representations.
removed in v8.0
v7.4 · 2.3 Neuroscience of Memory ConsolidationThese biological systems evolved under different constraints than LLM architectures. The parallels are structural, not mechanistic: both domains benefit from two-speed encoding, hierarchical organization, and lossy consolidation.
removed in v8.0
not in v7.4
v8.0 · 2. Fractal Metacognition## 2. Fractal Metacognition
not in v7.4
v8.0 · 2.1 The ladder### 2.1 The ladder
not in v7.4
v8.0 · 2.1 The ladderMost agents concentrate all cognitive effort at a single level: the task. Tree-of-thought and self-reflection methods add structure *within* an episode but do not accumulate anything *across* episodes. Humans do: a programmer fixes a bug (task), notices she keeps debugging with print statements (process), and eventually recognizes that her bugs cluster around concurrency — a capability gap no single bug report contains (meta-pattern).
not in v7.4
v8.0 · 2.1 The ladderThe ladder names four rungs. Each is the same operation applied to a different object:
not in v7.4
v8.0 · 2.1 The ladder| Rung | Name | Observes | Evaluates | Adapts | | --- | --- | --- | --- | --- | | **L0** | GROUNDING | Retrieval results | "Was I supposed to *know* this — and did I actually retrieve it?" | Reformulate the search / report the gap honestly | | **L1** | OUTCOME | The turn's concrete result | Correctness of the artifact | The next action; the local fix | | **L2** | PROCESS | This episode's own trace | Strategy effectiveness | The approach, this finding, this flag | | **L3** | META-PATTERN | Recurrence across episodes (ledger rows) | Systematic gaps; what keeps producing the same class of finding | Prompts, recipes, knowledge, standing rules — the column, not the cell |
not in v7.4
v8.0 · 2.1 The ladderWorldview revision — questioning the assumption that produces the system that produces the pattern — is the deepest *adapt-target of L3*, not a fifth rung: it is what an L3 adaptation touches when the recurring class traces back to a belief rather than a mechanism.
not in v7.4
v8.0 · 2.1 The ladderTwo laws govern the ladder:
not in v7.4
v8.0 · 2.1 The ladder**The frequency law.** Each rung is rarer, slower, and more consequential than the one below. L0 runs whenever a task implies owned knowledge. L2 runs on every substantive turn. L3 runs on accumulation — in the deployed design, nightly, over ledger slices. An agent that runs L3 on every turn is burning deliberation where it cannot pay; an agent that never runs L3 relogs the same failure forever. (The deployed doctrine states the failure crisply: *"Logging the same failure class a third time without changing the structure **is** the failure."*)
not in v7.4
v8.0 · 2.1 The ladder**The capability law.** The rung that *detects* must be separated from the rung that *acts* — by capability, not by instruction. In the deployed architecture the triage pass is structurally read-only (its editing tools are removed at process spawn), and only the escalated fix lane holds write tools, under a leasing protocol. This is the practical form of the frequency law: detection is cheap and constant; action is expensive, rarer, and guarded. We learned to enforce this structurally because instructing it was insufficient (§3.3).
not in v7.4
v8.0 · 2.2 L0: the rung below the task### 2.2 L0: the rung below the task
not in v7.4
v8.0 · 2.2 L0: the rung below the taskThere is a level *below* task execution that single-level agents skip: checking, before answering, whether the answer should come from owned memory rather than from the model's parametric prior. This is the most common practical failure mode we observe in a personal agent whose workload is dominated by owned knowledge — projects, contacts, prior decisions. The agent answers fluently from its own head when it was *supposed to know* something and silently failed to retrieve it.
not in v7.4
v8.0 · 2.2 L0: the rung below the taskThe mechanism is cheap: if the best retrieval score is below a confidence threshold *and* the query implies owned knowledge (a named project, a prior decision, a personal fact), do not answer yet — reformulate, search again, and only after exhausting reformulation report "I checked but could not find it." In the deployed design this rung also runs *post-hoc*: the triage pass checks a finished answer for grounding against the retrieval evidence that was actually available, and a failure produces a `gap` verdict whose fix is to re-search memory and write the missing link — additively only.
not in v7.4
v8.0 · 2.2 L0: the rung below the taskIn the body metaphor, L0 is self/non-self discrimination: knowing which claims are *yours to verify against records* and which are general knowledge. The immune system's first competence is recognizing what belongs to the body.
not in v7.4
v8.0 · 2.3 The horizontal axis### 2.3 The horizontal axis
not in v7.4
v8.0 · 2.3 The horizontal axisThe ladder is vertical: *why did this happen?* — zooming from the thing to the pattern to the system. Production experience forced a second, equally important axis the framework's earlier editions lacked: the **horizontal scan** — *what does this touch?* One event ripples into independent consequence branches, and each branch must be traced to its end rather than collapsed into a single narrative. Renaming a function touches call sites (code), a README (docs), a published post (an external surface you cannot edit from here), and a naming-convention lesson (memory) — four branches, four different repairs, three of them invisible to a purely vertical zoom.
not in v7.4
v8.0 · 2.3 The horizontal axisThe deployed doctrine sweeps six recurring consequence classes on every substantive turn — *online staleness, security/exposure, recurring cost, people/relationships, commitments, operational/downstream dependencies* — with an anti-noise contract worth keeping verbatim: *name only the axes with a real signal; silence on the rest is fine.* In the corrected architecture these six classes become the seed vocabulary of the ledger's `findingKind` field, which makes them countable: recurrence statistics per consequence class are exactly what the L3 pass consumes.
not in v7.4
v8.0 · 2.3 The horizontal axisThe two axes compose: the vertical zoom finds the producing system; the horizontal scan finds the blast radius. A reflection that does only one of them is half a reflection.
not in v7.4
v8.0 · 2.4 Self-similarity, stated precisely### 2.4 Self-similarity, stated precisely
not in v7.4
v8.0 · 2.4 Self-similarity, stated preciselyFormally, let R_ℓ denote the reflective function at rung ℓ:
not in v7.4
v8.0 · 2.4 Self-similarity, stated preciselyR_0(query, retrieval) → ground-or-reformulate decision R_1(task) → outcome judgment R_2(R_1 trace) → finding + (maybe) escalation R_3(R_2 records) → systemic adaptation R_ℓ(R_{ℓ-1} output) → ℓ-order adaptation
not in v7.4
v8.0 · 2.4 Self-similarity, stated preciselyEach R_ℓ is an instance of one template — observe the output of the rung below, evaluate it against a quality criterion, adapt accordingly — and, critically, each consumes the *records* of the rung below, which is why the ledger is load-bearing rather than decorative. The mathematical rigor here is weaker than in the storage half (§9); the claim is structural. What deployment adds to the claim is evidence that the structure has *engineering* consequences: because the rungs share a template, they share infrastructure, and the corrected architecture implements all of them with one event contract, one ledger schema, and one safety model.

··· 1 unchanged paragraph folded ···

v7.4 · 3. The Fractal Memory Index Architecture## 3. The Fractal Memory Index Architecture
removed in v8.0
v7.4 · 3. The Fractal Memory Index ArchitectureThe Fractal Memory Index (FMI) is a three-component architecture that maps fractal principles to LLM memory operations. One image holds the three together: **a flat vector index is like having only the street-level view of a map — precise but useless for seeing the big picture — while FMI is like Google Maps, where you zoom from street level to continent level and the map shows useful information at every scale.**
removed in v8.0
v7.4 · 3. The Fractal Memory Index Architecture![FMI consolidation-and-retrieval pipeline: input memories flow through the write buffer, periodic consolidation (clustering, summarization, IFS compression), and the Hilbert-curve multi-resolution index; queries traverse the index once and return ranked results at the requested granularity.](images/fmi-architecture.png)
removed in v8.0
v7.4 · 3.1 Component 1: Buffered Memory Consolidation (BMC)### 3.1 Component 1: Buffered Memory Consolidation (BMC)
removed in v8.0
v7.4 · 3.1 Component 1: Buffered Memory Consolidation (BMC)Inspired by Bε-trees and the two-speed structure of hippocampal-neocortical consolidation, BMC separates memory ingestion from memory organization. The pattern is familiar from how a company restructures: small teams merge into divisions, divisions into business units, each level summarizing the work below it while keeping access to the details.
removed in v8.0
v7.4 · 3.1 Component 1: Buffered Memory Consolidation (BMC)**Architecture:** New memories (text chunks, conversation turns, observations) enter a _write buffer_ — an append-only log. Periodically, a _consolidation process_ merges buffered entries into the persistent memory index, performing clustering, summarization, and compression.
removed in v8.0
v7.4 · 3.1 Component 1: Buffered Memory Consolidation (BMC)**Formally:** Let M be the memory store and B be the write buffer. At consolidation time t:
removed in v8.0
v7.4 · 3.1 Component 1: Buffered Memory Consolidation (BMC)M_{t+1} = Consolidate(M_t ∪ Flush(B_t))
removed in v8.0
v7.4 · 3.1 Component 1: Buffered Memory Consolidation (BMC)where Consolidate performs:
removed in v8.0
v7.4 · 3.1 Component 1: Buffered Memory Consolidation (BMC)1. **Clustering**: Group related memories using embedding similarity 2. **Summarization**: Generate abstract representations of clusters (as in RAPTOR) 3. **Compression**: Apply IFS coding to redundant memories (see §3.3) 4. **Eviction**: Remove memories whose information is fully captured by higher-level summaries
removed in v8.0
v7.4 · 3.1 Component 1: Buffered Memory Consolidation (BMC)**Complexity:** Write operations to the buffer are O(1) amortized. Consolidation is O(n log n) but runs asynchronously, amortized over all buffered writes. This matches the Bε-tree performance profile: individual inserts are cheap; bulk reorganization is batched.
removed in v8.0
v7.4 · 3.1 Component 1: Buffered Memory Consolidation (BMC)**Biological parallel:** The write buffer corresponds to episodic encoding, consolidation to offline replay, and the persistent index to long-term semantic storage. The key design insight, borrowed from neuroscience, is that consolidation is _lossy by design_: memories compress into gists, with details available only if explicitly retained.
removed in v8.0
v7.4 · 3.2 Component 2: Hilbert-Curve Multi-Resolution Index (HMRI)### 3.2 Component 2: Hilbert-Curve Multi-Resolution Index (HMRI)
removed in v8.0
v7.4 · 3.2 Component 2: Hilbert-Curve Multi-Resolution Index (HMRI)Standard vector databases index embeddings using flat structures (HNSW, IVF-PQ). These support single-granularity nearest-neighbor queries but cannot efficiently answer multi-resolution queries like "find relevant information at both the topic level and the detail level."
removed in v8.0
v7.4 · 3.2 Component 2: Hilbert-Curve Multi-Resolution Index (HMRI)**Architecture:** HMRI maps the D-dimensional embedding space onto a 1D Hilbert curve, then indexes this curve using a Bε-tree with augmented nodes. Each node stores:
removed in v8.0
v7.4 · 3.2 Component 2: Hilbert-Curve Multi-Resolution Index (HMRI)- The Hilbert-curve interval it covers - Summary embeddings at multiple granularity levels (leaf, cluster, super-cluster) - Pointers to both raw memories and their compressed representations
removed in v8.0
v7.4 · 3.2 Component 2: Hilbert-Curve Multi-Resolution Index (HMRI)**Multi-resolution retrieval:** Given a query q, HMRI performs:
removed in v8.0
v7.4 · 3.2 Component 2: Hilbert-Curve Multi-Resolution Index (HMRI)1. Compute the Hilbert index h(q) of the query embedding 2. Traverse the Bε-tree, collecting matches at each level of the hierarchy 3. Return results ranked by relevance at the requested granularity (or all granularities)
removed in v8.0
v7.4 · 3.2 Component 2: Hilbert-Curve Multi-Resolution Index (HMRI)**Formally:** A query at resolution level ℓ retrieves:
removed in v8.0
v7.4 · 3.2 Component 2: Hilbert-Curve Multi-Resolution Index (HMRI)R_ℓ(q) = {m ∈ M : d(embed_ℓ(m), embed_ℓ(q)) < τ_ℓ}
removed in v8.0
v7.4 · 3.2 Component 2: Hilbert-Curve Multi-Resolution Index (HMRI)where embed_ℓ is the embedding function at granularity level ℓ and τ_ℓ is the corresponding threshold. The Hilbert-curve structure ensures that scanning a contiguous interval in the index covers a compact region in embedding space.
removed in v8.0
v7.4 · 3.2 Component 2: Hilbert-Curve Multi-Resolution Index (HMRI)**Complexity:** Point query: O(log_B n / ε). Multi-resolution query across L levels: O(L · log_B n / ε). L is typically small (3-5 levels), and constant factors are favorable due to cache-friendly sequential access along the Hilbert curve.
removed in v8.0
v7.4 · 3.2 Component 2: Hilbert-Curve Multi-Resolution Index (HMRI)**Advantage over RAPTOR:** RAPTOR requires separate embedding and retrieval at each tree level. HMRI unifies all levels in a single index structure, enabling joint retrieval with shared computation.
removed in v8.0
v7.4 · 3.3 Component 3: IFS Semantic Compression (ISC)### 3.3 Component 3: IFS Semantic Compression (ISC)
removed in v8.0
v7.4 · 3.3 Component 3: IFS Semantic Compression (ISC)ISC is the newest and least validated component of FMI. Its viability rests on an empirical hypothesis we have not yet tested, so we present it as a research direction with theoretical grounding rather than a settled result.
removed in v8.0
v7.4 · 3.3 Component 3: IFS Semantic Compression (ISC)**Hypothesis:** Let E = {e₁, ..., eₙ} be embedding vectors for memories in a domain. If E has fractal dimension d_B < D (the ambient embedding dimension), then there exist contractive mappings {f₁, ..., fₖ} such that the attractor A ≈ E, and k ≪ n.
removed in v8.0
v7.4 · 3.3 Component 3: IFS Semantic Compression (ISC)**Compression scheme:**
removed in v8.0
v7.4 · 3.3 Component 3: IFS Semantic Compression (ISC)1. **Analysis phase:** Estimate the fractal dimension of the embedding space using box-counting. Identify self-similar sub-regions via correlation analysis at multiple scales. 2. **Encoding phase:** For each memory cluster, find the IFS code (set of affine contractions) whose attractor best approximates the cluster's embedding distribution. Store the IFS codes instead of raw embeddings. 3. **Decoding phase:** Iterate the IFS to reconstruct embeddings at the desired resolution. Apply the Collage Theorem to bound approximation error.
removed in v8.0
v7.4 · 3.3 Component 3: IFS Semantic Compression (ISC)**Theoretical compression ratio:** If the embedding space has intrinsic fractal dimension d and ambient dimension D, the compression ratio scales as O(d/D). For typical LLM embeddings (D = 768-4096) with estimated intrinsic dimensionality of 50-200 (based on persistent homology studies; Birdal et al., 2021), the actual ratio depends heavily on domain structure and embedding model. We deliberately avoid quoting a single range — the ratio is an empirical question that §7.1 proposes to answer.
removed in v8.0
v7.4 · 3.3 Component 3: IFS Semantic Compression (ISC)**Practical considerations:**
removed in v8.0
v7.4 · 3.3 Component 3: IFS Semantic Compression (ISC)- The IFS codes are _learned_, not analytically derived. This requires training a small model to find contractive mappings that minimize reconstruction error. - Compression is asymmetric: encoding (finding the IFS) is expensive; decoding (iterating the IFS) is cheap. This matches the consolidation model — compression happens offline, retrieval happens in real time. - Error bounds from the Collage Theorem guarantee that if the collage distance is δ, the reconstruction error is at most δ/(1-s), where s is the maximum contractivity.
removed in v8.0
v7.4 · 3.3 Component 3: IFS Semantic Compression (ISC)**Connection to existing work:** ISC generalizes fractal image compression (Jacquin, 1992) from pixel space to semantic embedding space. Fractal image compression fell out of favor due to slow encoding, but the characteristics of memory compression — offline encoding, online decoding, multi-resolution access — align with the fractal approach's strengths. Whether this advantage transfers to high-dimensional semantic spaces remains to be demonstrated.
removed in v8.0
v7.4 · 3.4 Integrated Architecture### 3.4 Integrated Architecture
removed in v8.0
v7.4 · 3.4 Integrated ArchitectureThe three components form a single pipeline. Incoming memories land in the write buffer (BMC). Periodic consolidation clusters and summarizes the buffered entries, applies IFS compression (ISC) to redundant clusters, and writes the result into the Hilbert-curve index (HMRI). At query time, a single multi-resolution lookup against HMRI — decompressing through ISC only when raw detail is required — returns ranked results at the requested granularity, which are then packed into the LLM context. Figure 1 traces both paths.
removed in v8.0
v7.4 · 3.4 Integrated ArchitectureThe consolidation pipeline runs asynchronously (analogous to background garbage collection), while queries are served from the index in real time.
removed in v8.0
v7.4 · 3.4 Integrated ArchitectureTo make the pipeline concrete, trace the query "that security incident last month" — the case a flat index cannot answer (§5.5). At ingest, each turn that mentioned the incident landed in the write buffer as a raw event. A later consolidation cycle clustered those turns by embedding similarity, summarized the cluster into a single gist ("the incident"), and wrote that gist into HMRI as a concept-level node sitting above its constituent events on the Hilbert curve. At query time, the embedding of the query resolves to that concept node in one traversal; the Hilbert locality property then pulls the surrounding event-level turns from the adjacent interval without a second search. The agent receives the abstraction and its supporting detail together, assembled once at consolidation time rather than reconstructed on every read.
removed in v8.0
not in v7.4
v8.0 · 3. The deployed doctrine — and how its first implementation died## 3. The deployed doctrine — and how its first implementation died
not in v7.4
v8.0 · 3. The deployed doctrine — and how its first implementation diedThe framework above is not retrospective theory; a 216-line operational doctrine implementing it ran in production for months. It is included **verbatim in Appendix A**, because a published framework whose deployed instantiation stays private is exactly the unverifiable "has been built" claim this report's discipline forbids. This section maps the doctrine onto the framework and then reports, honestly, how its delivery mechanism failed.
not in v7.4
v8.0 · 3.1 What the doctrine contains### 3.1 What the doctrine contains
not in v7.4
v8.0 · 3.1 What the doctrine containsThe prompt instructs the model, after delivering each answer, to produce a structured reflection:
not in v7.4
v8.0 · 3.1 What the doctrine contains- **The vertical zoom** (`<fractal_thinking>`): a fern-frond image — *"the leaf looks like the branch looks like the tree"* — and a worked ladder from the specific thing through the pattern and the system to the worldview. Its rung numbering differed from this report's (its "Level 1–4" of thing/pattern/system/worldview versus the L0–L3 of §2.1); the two ladders are reconciled in this edition, and the canonical mapping is: its Level 1 ≈ L1 OUTCOME, its Level 2 ≈ L2 PROCESS shading into L3 when the pattern is cross-episode, its Levels 3–4 ≈ L3 META-PATTERN and its worldview adapt-target. The collision of two numbered ladders sharing the word "Level" was itself an instance of a trap the prompt warns against by name: *naming-as-identity* — shared word, unshared structure. - **The horizontal scan** (`<fractal_branching>`): the six consequence axes of §2.3. - **Seven standing questions**: MEMORY (anything worth persisting?), PATTERN (what class does this belong to? — with the N≥2 recurrence rule), RIPPLE (what went stale?), IMPROVE (what can be fixed right now?), SELF-HEAL (a four-layer damage scan with a diagnose-classify-repair-verify-immunize protocol), RECIPE (should this become or amend a standing procedure?), PREEMPT (encode a trigger→action rule so the next occurrence handles itself — with a "goldilocks specificity" test: too vague never fires, too specific never generalizes). - **An output contract**: a marker-prefixed section (`🌿 FRACTAL:` / `🌿 FRACTAL ACTION:`) that the UI parsed out of the answer text and rendered collapsed.
not in v7.4
v8.0 · 3.1 What the doctrine containsAs doctrine, most of this survives review. The seven questions are a concrete instantiation of observe-evaluate-adapt; the recurrence rule is the sharpest statement of L3 anywhere in the system; the horizontal axes and the PREEMPT goldilocks test are, in our judgment, the prompt's best original content.
not in v7.4
v8.0 · 3.2 How it died: a post-mortem in three mechanisms### 3.2 How it died: a post-mortem in three mechanisms
not in v7.4
v8.0 · 3.2 How it died: a post-mortem in three mechanisms**Death by phoning-in.** The doctrine was delivered in-band: a system-prompt suffix asked the model to append the reflection section to its own answer. An instruction that costs the model nothing to satisfy badly will be satisfied badly: reflections degraded to one-line acknowledgments. The strong standalone implementation — reflection as its own follow-up turn — existed but was disabled in configuration, and a dispatch change later regressed it from a polite follow-up into an interrupting racer that *cancelled the very turn it was reflecting on* (one run-lane per session; the new dispatch interrupted instead of queuing). Result: for months, the only live "fractal" was the cheapest possible form of it.
not in v7.4
v8.0 · 3.2 How it died: a post-mortem in three mechanisms**Death by fabricated telemetry.** The UI's "a file was modified" indicator — the feature that told the owner whether reflection had *acted* — was implemented as a regex over the model's own prose: a verb pattern plus a file-extension allow-list applied to the reflection text. It was never a filesystem or tool fact. It fired on phrasing, missed real edits, and could not distinguish the reflection's edits from the main turn's. The reflection layer reported on itself, and the report was unfalsifiable. (The corrected rule, now a standing constraint: *model prose is narrative, never telemetry* — any capability claim renders only from tool-event-derived records.)
not in v7.4
v8.0 · 3.2 How it died: a post-mortem in three mechanisms**Death by silent severance.** The final state, discovered in this audit: the worker bootstrap *loads* the 216-line doctrine at spawn and then deliberately discards it — a one-line `void rulesBody` introduced to keep the system prompt stable for an unrelated provider-side routing constraint. From that day, the only fractal text reaching the model was a one-line persona pointer naming the section marker. Every 🌿 section produced since rode on that single line plus model habit. No alarm fired, because nothing measured the reflection layer: no record counted fires, skips, or yields. **A reflection system was disabled by an unrelated code change, and nothing noticed — the exact blind spot the doctrine's own SELF-HEAL section was written to detect, sitting one layer too deep for a prompt to reach.**
not in v7.4
v8.0 · 3.3 The corrected thesis### 3.3 The corrected thesis
not in v7.4
v8.0 · 3.3 The corrected thesisThe previous edition of this report claimed metacognition "does not require architectural changes … it requires structured prompting and memory." Deployment falsified the claim in its strong form. The corrected thesis:
not in v7.4
v8.0 · 3.3 The corrected thesis> **Prompting suffices to express the levels. Only structure enforces them.**
not in v7.4
v8.0 · 3.3 The corrected thesisReliability (does it fire every turn?), honesty (did it really act?), and boundedness (can it run away?) are not properties a prompt can hold — they belong to hooks, lanes, ledgers, capability limits, and watchdogs. This is itself an L3 finding of the kind §2.1's table predicts: the recurring failure class was *obedience-by-prompt where enforcement-by-structure was required*, and the adaptation it demands is architectural. That architecture is §4.

··· 1 unchanged paragraph folded ···

v7.4 · 4. Theoretical Analysis## 4. Theoretical Analysis
removed in v8.0
v7.4 · 4.1 Retrieval Complexity### 4.1 Retrieval Complexity
removed in v8.0
v7.4 · 4.1 Retrieval Complexity| System | Single query | Multi-res query (L levels) | Write | | --------------- | --------------------------------- | -------------------------- | ------------------ | | Flat RAG (HNSW) | O(log n) | O(L · log n) | O(log n) | | RAPTOR | O(L · log n) | O(L · log n) | O(n log n) rebuild | | MemGPT | O(log n) search + paging overhead | O(L · log n) + paging | O(1) + paging | | FMI | O(log_B n / ε) | O(L · log_B n / ε) | O(1) amortized |
removed in v8.0
v7.4 · 4.1 Retrieval Complexity**Note on MemGPT:** MemGPT uses vector search internally; paging adds LLM-managed overhead that varies by implementation. FMI's advantage is in multi-resolution retrieval and compression, not raw query speed.
removed in v8.0
v7.4 · 4.1 Retrieval ComplexityFor large B, log_B n ≪ log n, giving FMI favorable constant factors.
removed in v8.0
v7.4 · 4.2 Storage Complexity### 4.2 Storage Complexity
removed in v8.0
v7.4 · 4.2 Storage Complexity| System | Storage per memory | Total for n memories | | -------------- | -------------------------- | --------------------- | | Flat RAG | O(D) embedding + O(T) text | O(n · (D + T)) | | RAPTOR | O(D) per level, L levels | O(n · L · D + Σ text) | | FMI (no ISC) | O(D) + O(log n) index | O(n · D + n log n) | | FMI (with ISC) | O(d) IFS codes | O(n · d + n log n) |
removed in v8.0
v7.4 · 4.2 Storage ComplexityWith ISC, FMI reduces per-memory storage from O(D) to O(d), where d is the intrinsic fractal dimension. The actual compression ratio depends on the measured fractal dimension of the embedding space — an open empirical question (see §7.1).
removed in v8.0
v7.4 · 4.3 Compression Analysis### 4.3 Compression Analysis
removed in v8.0
v7.4 · 4.3 Compression AnalysisThe effectiveness of ISC depends on the fractal dimension of the embedding space:
removed in v8.0
v7.4 · 4.3 Compression Analysis**Argument for low fractal dimension:** LLM embeddings are generated by a finite-capacity model mapping from structured input (natural language). The effective dimensionality of natural language is far lower than the embedding dimension — this is why dimensionality reduction (PCA, UMAP) works well on embeddings. Studies of intrinsic dimensionality in neural network representations consistently find values of 20-200 for embedding spaces of dimension 768-4096 (Ansuini et al., 2019; Pope et al., 2021).
removed in v8.0
v7.4 · 4.3 Compression Analysis**Important caveat:** Low intrinsic dimensionality does not imply fractal self-similarity. The embedding manifold could be low-dimensional but smooth, in which case standard dimensionality reduction would suffice and IFS compression would offer no additional benefit. The specific contribution of ISC depends on the presence of _self-similar structure_ — patterns that repeat at multiple scales — which is a stronger property than low dimensionality alone.
removed in v8.0
v7.4 · 4.3 Compression Analysis**IFS compression bound:** By the Collage Theorem, if we find an IFS {f₁, ..., fₖ} with contractivity s < 1 such that the Hausdorff distance d_H(E, ∪ᵢ fᵢ(E)) ≤ δ, then d_H(E, A) ≤ δ/(1-s), where A is the IFS attractor. The storage cost is O(k · D²) for affine maps in D dimensions (each map is a D×D matrix plus translation). For compression to be worthwhile, we need k · D² < n · D, i.e., k < n/D. With n = 100,000 memories and D = 1024, we need k < ~100 IFS maps — plausible for well-structured memory domains, though this remains to be verified.
removed in v8.0
v7.4 · 4.3 Compression Analysis**Hierarchical IFS.** Rather than compressing the entire embedding space with a single IFS, we can apply IFS compression hierarchically — at the cluster level, sub-cluster level, and so on. This mirrors the fractal structure itself and allows IFS codes to capture local self-similarity patterns that differ across memory regions.
removed in v8.0
v7.4 · 4.4 Retrieval Quality### 4.4 Retrieval Quality
removed in v8.0
v7.4 · 4.4 Retrieval QualityMulti-resolution retrieval improves answer quality for questions requiring reasoning at different abstraction levels. Consider: "How has the company's strategy evolved over the past decade?" This requires:
removed in v8.0
v7.4 · 4.4 Retrieval Quality- **Detail-level retrieval**: Specific strategy announcements, quarterly reports - **Summary-level retrieval**: Annual summaries, strategic pivots - **Theme-level retrieval**: Overarching strategic themes across years
removed in v8.0
v7.4 · 4.4 Retrieval QualityRAPTOR answers this by querying different tree levels independently. FMI's Hilbert-curve index enables _joint_ retrieval: a single traversal identifies relevant memories at all scales, with results naturally ordered by the space-filling curve's locality property.
removed in v8.0
not in v7.4
v8.0 · 4. From framework to system: the parallel reflection lane## 4. From framework to system: the parallel reflection lane
not in v7.4
v8.0 · 4. From framework to system: the parallel reflection laneThe corrected implementation — design-of-record status, with its first drop in build at the time of writing — rebuilds reflection as a **parallel, off-channel plugin** rather than an in-band instruction.
not in v7.4
v8.0 · 4.1 Architecture### 4.1 Architecture
not in v7.4
v8.0 · 4.1 Architecture``` user turn ──▶ main lane (runId R_main) ──▶ answer streams to UI │ │ turn-end hook (fire-and-forget) ▼ ┌─────────────────────────────────────────────┐ │ Reflection plugin │ │ loop guard (self-minted run identity) │ │ governor (derived pressure — §4.4) │ │ spawn TRIAGE (own runId, own lane, │ │ low thinking, READ-ONLY by tool denial, │ │ forked warm from the main session) │ └─────────────────────────────────────────────┘ │ verdict: clean | act:<finding+evidence> | gap ▼ on a find: re-verify the evidence on disk (one file read), then spawn FIX lane (own runId, max thinking, full tools under write-leases; turn budget = derived, ceiling-capped) │ ▼ ledger row appended (always — including skips and errors); structured event docks a collapsed verdict block under the exact answer it judged, attributed from real tool records ```
not in v7.4
v8.0 · 4.1 ArchitectureThe properties the post-mortem demanded, point by point:
not in v7.4
v8.0 · 4.1 Architecture- **Parallel, never blocking.** The reflection runs on its own run identity in a dedicated lane; the user's next message proceeds concurrently. The interrupting-racer class of bug is structurally impossible — the reflection never touches the main lane's queue. - **Always-fire, prove-it-first.** Version 1 reflects on every user-visible turn. Selective gating is deferred until the ledger can *show* what gating would discard — and when it returns it must be a derived judgment surfaced as a recorded skip, never a silent prompt-side decision. - **Two-phase thinking.** The every-turn triage runs at a low thinking budget; a finding escalates to a *fresh* maximum-thinking fix lane. (On this harness a worker's thinking budget is pinned at spawn, so escalation is a new spawn, not a dial — the architecture turns a platform constraint into the capability law of §2.1.) - **Structural read-only triage.** The triage worker's editing tools are removed at spawn. "Triage never edits" is physics, not obedience — and it keeps attribution trivially honest, since any file change observed under the triage run identity would be an alarm, not a judgment call. - **Evidence before expense.** A triage finding must carry falsifiable evidence including a verbatim quote from disk; the plugin re-reads the file and confirms the quote *before* paying for the fix lane. A hallucinated or already-fixed finding dies for the price of one file read, recorded as an abstention. (Already-fixed findings recur structurally: the triage lane's forked context never contains the fix lane's edits — the cheap pre-verify converges them to abstentions.) - **Verify after acting.** After the fix lane edits, the cheapest relevant check runs — and its kind and result are stamped on the ledger row. A verification that matched zero tests is recorded as `none`, never as a pass. - **Honest attribution.** "Reflection changed X / the main turn changed Y" derives from persisted per-run tool records (a tool-call-id join over the transcript store), never from prose. The fabricated-telemetry class is retired. - **Graceful exhaustion.** The fix lane's turn budget is derived per-finding and capped by a ceiling; running out is not an error but a recorded partial: status `flagged`, `incomplete:true`, artifacts listed, verifier still run — resumable by the next pass. Hard-aborting in-flight work to honor a number is, by the host constitution, a bug (§7).
not in v7.4
v8.0 · 4.2 The ledger: immune memory, and the end of unmeasured reflection### 4.2 The ledger: immune memory, and the end of unmeasured reflection
not in v7.4
v8.0 · 4.2 The ledger: immune memory, and the end of unmeasured reflectionEvery reflection outcome — including skips, suspensions, and errors — appends one versioned row to an append-only log: identities, status, verdict, finding class, evidence, usage (fresh/cached tokens), latency, escalation, verification. Three read surfaces serve it: per-answer lookup (which also gives any vanilla host a plain-text degrade), a feed, and a stats endpoint whose KPI set *defines* "is reflection contributing": fire/skip histogram, escalation rate, fix yield, abstention rate, time-to-dock, quota per turn.
not in v7.4
v8.0 · 4.2 The ledger: immune memory, and the end of unmeasured reflectionTwo of its derived signals deserve naming:
not in v7.4
v8.0 · 4.2 The ledger: immune memory, and the end of unmeasured reflection- **The warm-ratio** — cached reads over total input per triage — is a standing regression detector for the cache economics of §5: any future change that silently breaks prefix stability shows up as a falling ratio within a day. - **Missed turns** — main-turn count minus ledger row count — is the negative-evidence detector for the silent-severance class of §3.2. The invariant is *every turn yields exactly one row*; its violation is computed outside the plugin's own fate, so a dead reflection layer can no longer hide. The body does not rely on a wounded organ to report its own absence.
not in v7.4
v8.0 · 4.2 The ledger: immune memory, and the end of unmeasured reflectionThe ledger is also the substrate of the higher rungs: a synchronous recurrence check stamps each finding with its prior-occurrence count from day one (the doctrine's N≥2 rule honored the moment two rows exist), and the nightly L3 pass reads ledger slices — never transcripts — to propose systemic fixes: a prompt amendment, a recipe upgrade, a standing trigger→action rule (PREEMPT's goldilocks test carried forward as the quality bar). Ordinary fixes are autonomous; self-modifications route to the ratification queue.
not in v7.4
v8.0 · 4.3 Autonomy with a germline boundary### 4.3 Autonomy with a germline boundary
not in v7.4
v8.0 · 4.3 Autonomy with a germline boundaryThe fix lane acts with full autonomy on files, code, memory, and recipes, bounded by a per-file write-leasing protocol so it never clobbers a concurrent edit. Four target classes are excepted — the live host configuration (hot-reloaded mid-session), the reflection system's own prompts and source, the host's build output, and its service controls — because one wrong write there converts a bad reflection into downtime or unsupervised self-amplification. The previous doctrine *instructed the model to improve its own prompt*; that standing order is retired in all its instances and replaced by *emit a proposal record carrying the exact patch*. Beyond the four classes, every action is classified by **reversibility** — a derived property, not a zone list: reversible acts run freely; genuinely irreversible-and-external ones (sends, unarchived deletions, pushes, restarts, financial commitments) join the same proposal queue.
not in v7.4
v8.0 · 4.3 Autonomy with a germline boundaryThe boundary is a brake, not a gate: each class graduates to direct-action-with-automatic-rollback after a track record of accepted proposals with zero rollbacks, and no class is permanently propose-only. In the body metaphor: somatic edits are constant; germline edits demand ratification — but an organism that could *never* adapt its germline would be evolutionarily frozen, so the ratification requirement itself relaxes as trust accumulates.
not in v7.4
v8.0 · 4.4 The governor: a metabolism, not a thermostat### 4.4 The governor: a metabolism, not a thermostat
not in v7.4
v8.0 · 4.4 The governor: a metabolism, not a thermostatThe reflection layer consumes the same subscription budget as the agent's real work, so it carries a resource governor. The naive version — fire freely below a utilization percentage, throttle above it — was written into the first design draft and then **struck by the host constitution's own audit** (§7): the constitution's "think fractally" principle names *"never a frozen 70 %"* as its canonical forbidden example, and the draft had used precisely 70 %.
not in v7.4
v8.0 · 4.4 The governor: a metabolism, not a thermostatThe corrected governor derives one pressure score from the live situation — current window utilization, time until the window resets, and the value of the work in hand (an evidence-backed queued fix outranks speculative triage) — and degrades progressively: full operation → triage-only → recorded skip. It is **bidirectional**: low utilization shortly before a reset is *spendable surplus*, and the governor responds by lowering the escalation bar — more fixes, deeper verification, an opportunistic early meta-pass — because budget that expires unspent bought nothing. Numeric constants survive only as documented safety ceilings with recorded derivations, approached with warnings rather than hit as cliffs. A circuit breaker suspends the layer cleanly after repeated failures (a fever is a response, not a malfunction), the suspension is itself a queryable state with an explicit resume, and every guard that trips writes a row — the governor, too, is observable.

··· 1 unchanged paragraph folded ···

v7.4 · 5. Comparison with Existing Approaches## 5. Comparison with Existing Approaches
removed in v8.0
v7.4 · 5.1 FMI vs. RAPTOR### 5.1 FMI vs. RAPTOR
removed in v8.0
v7.4 · 5.1 FMI vs. RAPTORRAPTOR is the closest existing system to FMI. Both build hierarchical memory structures with multi-granularity access:
removed in v8.0
v7.4 · 5.1 FMI vs. RAPTOR| Aspect | RAPTOR | FMI | | --------------- | -------------------------- | --------------------------------------- | | Construction | Batch rebuild from scratch | Incremental (buffered consolidation) | | Index structure | Tree of summaries | Bε-tree with Hilbert indexing | | Compression | None (stores all levels) | IFS compression of embeddings | | Write model | O(n log n) rebuild | O(1) amortized | | Multi-res query | Separate query per level | Single unified traversal | | Clustering | UMAP + GMM (fixed) | Adaptive, informed by fractal dimension |
removed in v8.0
v7.4 · 5.1 FMI vs. RAPTORFMI formalizes RAPTOR's implicit fractal structure and adds write optimization and compression.
removed in v8.0
v7.4 · 5.2 FMI vs. MemGPT### 5.2 FMI vs. MemGPT
removed in v8.0
v7.4 · 5.2 FMI vs. MemGPTMemGPT and FMI operate at different layers of the memory stack. MemGPT manages _context window allocation_ — deciding what information enters the LLM's working memory. FMI manages _storage and retrieval_ — how information is organized, indexed, and compressed in external memory. These layers are complementary: MemGPT could use FMI as its backing store, replacing its current vector search with multi-resolution fractal retrieval. The combination would yield MemGPT's adaptive context management with FMI's efficient multi-granularity access and write optimization.
removed in v8.0
v7.4 · 5.3 FMI vs. KV-Cache Compression### 5.3 FMI vs. KV-Cache Compression
removed in v8.0
v7.4 · 5.3 FMI vs. KV-Cache CompressionKV-cache compression operates at the token level during inference; FMI operates at the memory/knowledge level during storage and retrieval. These address different bottlenecks (inference memory vs. knowledge memory) and are fully complementary. A speculative connection: if KV-cache attention patterns exhibit self-similarity across layers (as multi-scale attention architectures suggest), IFS-inspired techniques could extend to that domain as well.
removed in v8.0
v7.4 · 5.4 FMI vs. Standard RAG### 5.4 FMI vs. Standard RAG
removed in v8.0
v7.4 · 5.4 FMI vs. Standard RAGStandard RAG is a special case of FMI with a single granularity level, no consolidation, and no compression. FMI strictly generalizes RAG.
removed in v8.0
v7.4 · 5.5 FMI vs. a Deployed Flat-Index System### 5.5 FMI vs. a Deployed Flat-Index System
removed in v8.0
v7.4 · 5.5 FMI vs. a Deployed Flat-Index SystemFMI is easy to motivate in the abstract; it is more convincing against a real baseline. We compare it to a production agent-memory system that uses a flat anchor-to-chunk index: topic keywords map directly to memory segments, giving O(1) lookup but limiting retrieval to near-exact keyword and single-granularity similarity matches. The system stores interactions as an append-only event log — one record per turn — with full-text search scored by term frequency, and (originally) no edges between events. We refer to this design as the flat-index baseline throughout; it is representative of the simplest production memory backends and of an internal system we examined directly.
removed in v8.0
v7.4 · 5.5 FMI vs. a Deployed Flat-Index System**Where the flat index holds up.** For direct lookups — "what is the API key for service X," "when did we last deploy" — a flat index is excellent: one hop, exact match, no traversal cost. Most retrievals are of this kind, which is why flat indexes are the common default.
removed in v8.0
v7.4 · 5.5 FMI vs. a Deployed Flat-Index System**Where it fails.** Flat indexing degrades when a query spans multiple abstraction levels at once. Take "that security incident last month." Answering it requires matching both a _topic_ axis ("security") and a _temporal/episodic_ axis ("last month," a specific cluster of events), and then assembling a gist from several low-level records. A flat anchor-to-chunk index can match "security" or a date range, but it cannot natively retrieve _the abstraction_ "the incident" — there is no node at that granularity. The agent gets back raw turn-level fragments and must reconstruct the episode in-context on every query.
removed in v8.0
v7.4 · 5.5 FMI vs. a Deployed Flat-Index System**Why multi-resolution would succeed.** FMI indexes the same events at three resolutions simultaneously: raw events, topic clusters, and abstract concepts. The query resolves at the concept level ("the incident") and the Hilbert-curve locality property then pulls the surrounding detail-level events for free, in one traversal. The episode exists as a first-class retrievable object, built once at consolidation time rather than reconstructed on every read. This is the concrete case that justifies the added complexity: not faster point lookups, but the ability to retrieve at the level of abstraction the query actually targets.
removed in v8.0
v7.4 · 5.5 FMI vs. a Deployed Flat-Index SystemThe flat-index baseline also exposed the most actionable gap, discussed in §7.6: with no edges between events, "what does this touch?" could only be answered by re-running similarity search every turn. That gap has since been closed in the deployed system by a horizontal link layer; §7.6 reports what was built and what it does not yet solve.
removed in v8.0
not in v7.4
v8.0 · 5. Measured economics: reflection at one-tenth price## 5. Measured economics: reflection at one-tenth price
not in v7.4
v8.0 · 5. Measured economics: reflection at one-tenth priceRe-reading a long conversation to judge it would, naively, double the cost of every turn. The deployed harness's provider caches by content prefix, so the design forks the main conversation's session for the triage pass: the transcript prefix is byte-identical, only the short reflection instruction and the verdict are new tokens. Whether a *forked* session actually serves the prefix warm was this design's single honest unknown — so it was measured before the dependent component was built.
not in v7.4
v8.0 · 5. Measured economics: reflection at one-tenth price**Mining (zero spend).** Across the 40 most recent live session logs (21 with per-message usage): global warm-ratio **81.8 %** (321 M cached-read tokens vs 71 M cache-written vs 0.5 M fresh), and **20 of 21 session-opening turns served warm** — the provider cache is content-keyed and survives worker respawns, exactly the property a fork preserves.
not in v7.4
v8.0 · 5. Measured economics: reflection at one-tenth price**Controlled probe (live).** A throwaway session was seeded with a ~150 k-token prefix (observed cold write: 140,166 tokens). Forking that session with the same model and a one-line prompt returned:
not in v7.4
v8.0 · 5. Measured economics: reflection at one-tenth price> cache_read = **155,495** · cache_creation = **10,877** · fresh input = **2** — **the fork serves warm.**
not in v7.4
v8.0 · 5. Measured economics: reflection at one-tenth priceEvidence class: live-and-verified, on the exact installed CLI. Consequences: the warm-fork transport is justified for the build's second drop; the per-model nature of provider caches makes "fork plus cheaper model" a false economy (a model switch silently re-prefills the entire prefix cold), so the transport and model choices are one coupled setting; and the steady-state cost of an always-on triage is roughly *a warm re-read plus a small low-thinking verdict* — an order of magnitude below re-processing the turn, with the rarer fix lane paying full price exactly when full price is wanted.

··· 1 unchanged paragraph folded ···

v7.4 · 6. Implementation Considerations## 6. Implementation Considerations
removed in v8.0
v7.4 · 6.1 Prototype Architecture### 6.1 Prototype Architecture
removed in v8.0
v7.4 · 6.1 Prototype ArchitectureA minimal FMI implementation requires:
removed in v8.0
v7.4 · 6.1 Prototype Architecture1. **Write buffer**: Redis or a simple append-only log 2. **Consolidation engine**: A background process that periodically: - Clusters new memories (HDBSCAN over embeddings) - Generates summaries (LLM call per cluster) - Reindexes using Hilbert-curve mapping 3. **Hilbert-curve index**: Built on an existing Bε-tree implementation (e.g., TokuDB's fractal tree library) or a B-tree with message buffers 4. **Vector storage**: Standard embedding store (FAISS, pgvector) with Hilbert-curve ordering
removed in v8.0
v7.4 · 6.1 Prototype ArchitectureFor the ISC component (research prototype): 5. **Fractal dimension estimator**: Box-counting algorithm over embedding samples 6. **IFS learner**: Small neural network trained to predict contractive mappings for embedding clusters 7. **Reconstruction module**: IFS iterator with error-bounded approximation
removed in v8.0
v7.4 · 6.2 Consolidation Schedule### 6.2 Consolidation Schedule
removed in v8.0
v7.4 · 6.2 Consolidation ScheduleWe propose a tiered consolidation schedule:
removed in v8.0
v7.4 · 6.2 Consolidation Schedule- **Micro-consolidation** (every ~100 new memories): Cluster and index new entries - **Macro-consolidation** (every ~10,000 memories or daily): Full re-summarization, IFS compression, index rebuild - **Archival consolidation** (weekly/monthly): Aggressive compression of old, rarely-accessed memories
removed in v8.0
v7.4 · 6.3 Integration with Existing Systems### 6.3 Integration with Existing Systems
removed in v8.0
v7.4 · 6.3 Integration with Existing SystemsFMI is designed as a drop-in replacement for the retrieval backend in existing RAG pipelines. The interface is small — four operations:
removed in v8.0
v7.4 · 6.3 Integration with Existing Systems- `add`: append to the write buffer in O(1). - `query`: take a query embedding, a list of resolution levels, and a top-k bound; return ranked results across those levels. - `consolidate`: trigger a consolidation cycle (optionally aggressive). - `stats`: report the measured fractal dimension, compression ratio, and memory usage.
removed in v8.0
v7.4 · 6.3 Integration with Existing SystemsA pipeline already calling a vector store's add/query can adopt FMI by widening `query` to accept resolution levels. Single-level callers keep working unchanged, since standard RAG is the L = 1 special case (§5.4).
removed in v8.0
v7.4 · 6.4 Estimated Engineering Effort### 6.4 Estimated Engineering Effort
removed in v8.0
v7.4 · 6.4 Estimated Engineering Effort| Component | Complexity | Time estimate | | ---------------------------- | ---------- | -------------- | | Write buffer + consolidation | Moderate | 2-4 weeks | | Hilbert-curve indexing | Moderate | 2-4 weeks | | Multi-resolution retrieval | Moderate | 2-3 weeks | | IFS compression (research) | High | 2-4 months | | Integration + testing | Moderate | 2-4 weeks | | **Total (without ISC)** | | **2-3 months** | | **Total (with ISC)** | | **4-7 months** |
removed in v8.0
v7.4 · 6.4 Estimated Engineering EffortThe system without ISC already provides clear advantages over flat RAG and is immediately buildable. ISC is the research frontier.
removed in v8.0
not in v7.4
v8.0 · 6. From reflection to search## 6. From reflection to search
not in v7.4
v8.0 · 6. From reflection to searchA stronger form of L2 operates *before* an answer ships: turn single-shot generation into a bounded search over candidate reasoning paths (Tree-of-Thoughts; value-guided variants). In the ladder's terms, search is in-flight escalation — expanding is zooming, pruning is abandoning a strategy, backtracking is the evaluator firing mid-flight.
not in v7.4
v8.0 · 6. From reflection to searchThe deployed status, held to live code: a bounded reasoning-tree engine (expand, evaluate, select-frontier, prune, backtrack, best-leaf) **exists in the codebase with budget enforcement on every axis, and has never fired in production**. Its per-turn seam is configuration-gated and defaults off; its on-demand RPC is registered *ungated* but has zero callers anywhere; its subagent spawner hardcodes the main agent as parent, so as shipped it could not serve a reflection lane's identity anyway. The previous edition called this "built into the deployed system … off by default and gated behind explicit configuration" — by this report's evidence discipline the accurate class is *code-present, never-fired, partially gated*.
not in v7.4
v8.0 · 6. From reflection to searchTwo corrections from the framework apply before it ever fires. First, its budgets are currently frozen working values (fixed depth, branching, beam, tokens, latency); by the host constitution these must become derived values under documented ceilings — a fractal-reasoning engine with programmatic-era bounds violates the thesis it implements, and the engine's own return-best-leaf-on-budget behavior already provides the graceful-exhaustion half. Second, its integration is escalation-gated by design: the triage verdict gains a `hard` tag now (near-free, immediately countable in the ledger), and actual wiring waits on a live comparison against the plain fix lane — deliberate search must *earn* its cost over a well-prompted single pass, on recorded yields, not on intuition.

··· 1 unchanged paragraph folded ···

v7.4 · 7. Limitations and Open Questions## 7. Limitations and Open Questions
removed in v8.0
v7.4 · 7.1 Is Semantic Space Actually Fractal?### 7.1 Is Semantic Space Actually Fractal?
removed in v8.0
v7.4 · 7.1 Is Semantic Space Actually Fractal?This is the central empirical question. The circumstantial evidence is suggestive — low intrinsic dimensionality, power-law distributions, hierarchical topic structure — but no one has rigorously measured the fractal dimension of LLM embedding spaces. We propose the following validation experiment:
removed in v8.0
v7.4 · 7.1 Is Semantic Space Actually Fractal?1. Embed a large, diverse corpus (e.g., Wikipedia) using a standard encoder (e.g., text-embedding-3-large) 2. Compute box-counting dimension at multiple scales 3. Test for scale invariance in the correlation integral 4. Compare fractal dimension across domains (science, law, fiction)
removed in v8.0
v7.4 · 7.1 Is Semantic Space Actually Fractal?A complementary measurement uses a real agent-memory corpus rather than a clean encyclopedic one: take the append-only event log of a deployed assistant and measure its intrinsic dimension directly, checking whether it matches the 20-200 range reported for general embeddings and whether the correlation integral shows scale invariance. Conversational memory is messier and more repetitive than Wikipedia, so a divergence here would itself be informative about where ISC pays off.
removed in v8.0
v7.4 · 7.1 Is Semantic Space Actually Fractal?If the fractal dimension is consistently d ≪ D across domains, ISC is justified. If d ≈ D, the compression claims do not hold — though Components 1 and 2 (buffered consolidation and multi-resolution indexing) remain independently valuable.
removed in v8.0
v7.4 · 7.2 IFS Learning Convergence### 7.2 IFS Learning Convergence
removed in v8.0
v7.4 · 7.2 IFS Learning ConvergenceLearning IFS codes for high-dimensional embedding spaces is an open problem. The search space of affine contractions in D dimensions is O(D²) per map, which is prohibitively large for D = 1024. Possible mitigations:
removed in v8.0
v7.4 · 7.2 IFS Learning Convergence- Learn IFS codes in a reduced space (after PCA to d dimensions) - Use structured contractions (diagonal + low-rank perturbation) - Apply the Collage Theorem iteratively with greedy map selection
removed in v8.0
v7.4 · 7.3 Consolidation Drift### 7.3 Consolidation Drift
removed in v8.0
v7.4 · 7.3 Consolidation DriftOver many consolidation cycles, accumulated lossy compression may cause semantic drift — memories gradually lose fidelity. This mirrors the biological phenomenon of false memories arising from repeated consolidation. Mitigation: maintain checksums on critical memories, with periodic re-embedding from source text.
removed in v8.0
v7.4 · 7.4 Cold-Start and Domain Transfer### 7.4 Cold-Start and Domain Transfer
removed in v8.0
v7.4 · 7.4 Cold-Start and Domain TransferFMI's compression improves as more memories are ingested and the fractal structure stabilizes. During cold-start (few memories), performance is no better than standard RAG. Domain transfer depends on whether the fractal structure generalizes across domains.
removed in v8.0
v7.4 · 7.5 What Does the Fractal Formalism Add?### 7.5 What Does the Fractal Formalism Add?
removed in v8.0
v7.4 · 7.5 What Does the Fractal Formalism Add?A natural objection: how much of FMI's benefit comes from the fractal framework versus simply building a well-engineered hierarchical index? We claim the fractal formalism contributes three things beyond "being hierarchical":
removed in v8.0
v7.4 · 7.5 What Does the Fractal Formalism Add?1. **Principled compression bounds** via the IFS Collage Theorem, which provide error guarantees unavailable from ad-hoc hierarchical compression. 2. **Fractal dimension as a measurable diagnostic** that predicts compressibility for a given domain before building the system — enabling informed architecture decisions. 3. **Connection to a mature mathematical toolkit** (measure theory, dynamical systems, IFS theory) that offers proven techniques rather than requiring bespoke engineering for each design choice.
removed in v8.0
v7.4 · 7.5 What Does the Fractal Formalism Add?Whether these theoretical advantages yield practical gains proportional to their complexity is an empirical question. If the fractal dimension measurement (§7.1) shows d ≈ D, then the hierarchical-without-fractal approach is the right one, and Components 1-2 stand on their own merits.
removed in v8.0
v7.4 · 7.6 The Horizontal Layer: Links Between Memories### 7.6 The Horizontal Layer: Links Between Memories
removed in v8.0
v7.4 · 7.6 The Horizontal Layer: Links Between MemoriesFMI as described is _vertical_: it indexes the same content at multiple levels of abstraction (event → cluster → concept). It says little about _horizontal_ structure — explicit edges between memories at the same level. The flat-index baseline of §5.5 had the same gap in starker form: its events had no edges at all, so "what does this touch?" was answered by re-running similarity search on every turn rather than by following stored references.
removed in v8.0
v7.4 · 7.6 The Horizontal Layer: Links Between MemoriesA Zettelkasten-style link layer closes this gap. Each memory carries explicit references to others (for example, wiki-style `[[link]]` mentions, plus extracted entity references), and the system maintains the _reverse_ edges (backlinks) so any memory can answer "what refers to me?" in O(1). Backlinks are precisely the resolution layer _between_ raw events and topic clusters that FMI's vertical hierarchy assumes but never builds: they make the Hilbert-curve "things close together stay close together" neighborhood explicit and queryable, instead of re-derived by similarity each time.
removed in v8.0
v7.4 · 7.6 The Horizontal Layer: Links Between MemoriesThis layer has since been built into the deployed baseline of §5.5 as a self-contained addition that does not depend on the unresolved ISC question. A mention parser extracts both explicit `[[wikilink]]` references and entity references from each event; a link index appends them to an append-only log (mirroring the event store) while maintaining forward and backward edge maps rebuilt on read; and the retrieval path expands a retrieved event with its backlinks as a one-hop graph walk, budget permitting. Two design choices remain live. **Scope:** per-store links are simple but lose most of the value, since a Zettelkasten's payoff is cross-document linking; a global link store recovers the value at the cost of global reference resolution. **Aggressiveness:** linking every extracted entity yields high recall but a noisy graph, whereas restricting to explicit links plus a curated entity set yields high precision but lower coverage. The main unsolved risk is reference deduplication across paraphrases ("the bank loan" vs. "el préstec del banc" collapsing to one logical target), which normalization mitigates only partly and entity linking would address more fully. The build ships normalization-only and documents the limitation.
removed in v8.0
not in v7.4
v8.0 · 7. The constitution is fractal too — and it caught its own implementation## 7. The constitution is fractal too — and it caught its own implementation
not in v7.4
v8.0 · 7. The constitution is fractal too — and it caught its own implementationThe host system's design knowledge is organized as a pyramid: a one-page constitution at the apex (mission and first principles), structural-fact files beneath it, derived rules beneath those, then diagrams, then code — each layer deriving from the one above, with an explicit authority order: *when a lower layer contradicts a higher one, the lower layer is wrong, and the contradiction is a bug to fix.* Two of its first principles are, in this report's terms, fractal commitments: **"think fractally, not programmatically"** — every decision derives from the live situation; fixed lists, thresholds, and limits are legacy artifacts that go stale — and a bounds doctrine making any frozen quantity at most a *ceiling*, never a working value.
not in v7.4
v8.0 · 7. The constitution is fractal too — and it caught its own implementationThis yields a falsifiable conformance method: sweep every design artifact against the constitution and adjudicate each contradiction adversarially. Applied to the reflection layer's own design documents on the day of this report, the sweep confirmed **22 violations** — among them the governor's frozen 70 % (the constitution's verbatim forbidden example), a hard-abort on budget exhaustion, a self-modification boundary written as a permanent forbidden-zone list rather than a confidence-staged brake, three control states with writes but no paired reads, and a wall-clock watchdog that asserted doneness from elapsed time. All were folded back into the design the same day.
not in v7.4
v8.0 · 7. The constitution is fractal too — and it caught its own implementationThe methodological point is the self-similarity: this audit *is* the framework, applied one level up. The constitution is the worldview; the design documents are the system; the sweep is L3 observing recurrence ("frozen numbers keep appearing") and adapting the column. A framework for catching an agent's contradictions that could not catch its own design's contradictions would fail its own test. It did not — but only because the constitution was written down, machine-checkable, and ranked above the artifacts deriving from it. *Reflection needs a reference. The fractal pyramid is what makes "evaluate" well-defined at every scale.*

··· 1 unchanged paragraph folded ···

v7.4 · 8. Related Work## 8. Related Work
removed in v8.0
v7.4 · 8. Related Work**FractalNet** (Larsson et al., 2017) applies self-similar macro-architecture to neural network design, demonstrating that fractal structure can serve as a design principle for deep learning. Our work extends this from network architecture to both memory architecture and cognitive architecture.
removed in v8.0
v7.4 · 8. Related Work**GraphFractalNet** (Zhang et al., 2025) uses fractal attention mechanisms for graph learning, capturing hierarchical self-similar structures. This validates fractal attention's applicability to representation learning.
removed in v8.0
v7.4 · 8. Related Work**Hierarchical Temporal Memory** (Hawkins et al., 2004; 2019) models neocortical computation using self-similar cortical columns. HTM's sparse distributed representations and multi-scale temporal processing directly inspire FMI's multi-resolution retrieval.
removed in v8.0
v7.4 · 8. Related Work**Fractal image compression** (Barnsley, 1988; Jacquin, 1992; Fisher, 1995) provides the mathematical foundation for ISC. While commercially unsuccessful due to slow encoding, the asymmetric encode/decode characteristic aligns with memory consolidation (slow storage, fast retrieval).
removed in v8.0
v7.4 · 8. Related Work**Cognitive Workspace** (Li et al., 2025) proposes active memory management for LLMs with metacognitive control, complementing our focus on storage, retrieval, and the fractal metacognition framework in §9.
removed in v8.0
v7.4 · 8. Related Work**A-MEM** (2024) and Zettelkasten-style agent memories motivate the horizontal link layer of §7.6: explicit inter-note links with maintained backlinks, turning a flat memory log into a navigable graph.
removed in v8.0
v7.4 · 8. Related Work**Space-filling curves in databases** (Lawder & King, 2000; Hudi Z-order indexing) demonstrate the practical value of Hilbert-curve indexing for multi-dimensional data, which we adapt for embedding spaces.
removed in v8.0
not in v7.4
v8.0 · 8. Evidence classes, including this report's own corrections## 8. Evidence classes, including this report's own corrections
not in v7.4
v8.0 · 8. Evidence classes, including this report's own correctionsEvery deployment claim in this report carries one of four classes — and the discipline exists because the previous edition failed it. Three corrections, stated plainly:
not in v7.4
v8.0 · 8. Evidence classes, including this report's own corrections1. **"The horizontal link layer has since been built into the deployed baseline."** The code exists, is unit-tested, and is wired at the turn-complete path — and the production link store contains **zero records ever written**. Under the constitution's own standard (*a producer is only "wired" when verified firing at a real call site*), the accurate class is code-present, live-firing unverified. The empty store is, fittingly, a live instance of the blind-spot class §2's framework predicts: an unobserved producer rotting silently. 2. **"Bounded deliberation search … off by default and gated."** Corrected in §6: partially gated, never fired, parent identity hardcoded. 3. **The flat-index baseline of §9.4** is hereby *dated*: it describes the system as examined in May 2026. The deployed memory substrate has since grown episode objects, recency-and-diversity retrieval, and the link-layer code — none yet verified firing on the live path. The comparison stands as a claim about a dated snapshot, which is the only honest way a paper can cite a moving system.
not in v7.4
v8.0 · 8. Evidence classes, including this report's own corrections| Class | Meaning | Examples in this report | | --- | --- | --- | | **Live-and-verified** | Measured on the running system | Warm-fork probe (§5); mining ratios (§5); the doctrine's severance (`void rulesBody`); the fabricated-telemetry mechanism | | **Code-present, unverified** | Exists in the tree; never observed firing live | Link layer; episode detection; deliberation engine | | **Design-of-record** | Owner-approved design; build staged in drops | The parallel lane (§4); ledger KPIs; governor; ratification queue | | **Pure theory** | No implementation claim made | IFS semantic compression (§9.3); the compression-ratio analysis |

··· 1 unchanged paragraph folded ···

v7.4 · 9. Fractal Metacognition## 9. Fractal Metacognition
removed in v8.0
v7.4 · 9. Fractal MetacognitionThe preceding sections establish that fractal self-similarity can improve data structures for LLM memory. We now argue that the same principle applies to cognition: effective reasoning benefits from self-similar structure across scales.
removed in v8.0
v7.4 · 9. Fractal Metacognition![Fractal Metacognition levels: a stack from Level 0 (retrieval confidence) through Level 1 (task), Level 2 (process), and Level 3+ (meta-pattern), where each level applies the same observe-evaluate-adapt operation to the output of the level below, and higher levels fire more rarely.](images/metacognition-levels.png)
removed in v8.0
v7.4 · 9.1 The Single-Level Reasoning Problem### 9.1 The Single-Level Reasoning Problem
removed in v8.0
v7.4 · 9.1 The Single-Level Reasoning ProblemMost current LLM agents concentrate cognitive effort at a single level. They receive a task, reason about it, and produce output. When they fail, they retry — sometimes with a varied prompt or decomposition strategy. Tree-of-thought (Yao et al., 2023) and self-reflection approaches (Shinn et al., 2023) add structure within a single reasoning episode, but they do not systematically accumulate meta-level insights across episodes.
removed in v8.0
v7.4 · 9.1 The Single-Level Reasoning ProblemHumans naturally operate across cognitive levels. A programmer debugging a function (Level 1) may notice she keeps inserting print statements instead of using a debugger, and switch strategies (Level 2). Over months, she may recognize that her bugs cluster around concurrency, prompting her to study concurrent programming systematically (Level 3). Each level of reflection operates on the output of the level below, and each discovers insights invisible from that lower level.
removed in v8.0
v7.4 · 9.2 Level 0: Retrieval Confidence### 9.2 Level 0: Retrieval Confidence
removed in v8.0
v7.4 · 9.2 Level 0: Retrieval ConfidenceThere is a level _below_ task execution that single-level agents skip entirely: checking whether they have the information the task requires before they start. This is not task reflection — it is pre-task retrieval validation, and it is the most common failure mode in practice. An agent confidently answers from parametric memory or a weak retrieval hit when it should have realized it was _supposed_ to know something and failed to retrieve it.
removed in v8.0
v7.4 · 9.2 Level 0: Retrieval Confidence**Mechanism.** After a memory search and before answering, the agent checks two conditions together: the best retrieval score is below a confidence threshold (e.g., max score < 0.5), _and_ the query implies knowledge the agent should own (a named project, a prior decision, a personal fact). If both hold, the agent does not answer yet — it escalates to reformulation: try broader terms, try file or document titles, try project names. Only after reformulation is exhausted does it report, honestly, "I checked but couldn't find it."
removed in v8.0
v7.4 · 9.2 Level 0: Retrieval ConfidenceThis is the metacognitive realization that you were supposed to know something but did not retrieve it. It is cheap — one threshold check plus at most a few reformulated searches — and it sits naturally below Level 1 because it gates whether Level 1 should run at all. We label it Level 0 to mark that it precedes task reasoning rather than reflecting on it.
removed in v8.0
v7.4 · 9.3 Self-Similar Cognition### 9.3 Self-Similar Cognition
removed in v8.0
v7.4 · 9.3 Self-Similar CognitionFractal metacognition structures reasoning into recursive levels, where each level applies the same reflective operation — _observe, evaluate, adapt_ — at a different cognitive scale:
removed in v8.0
v7.4 · 9.3 Self-Similar Cognition**Level 1: Task Reasoning.** The agent reasons about the task itself. It plans, executes, and evaluates outcomes against objectives. This is standard LLM operation.
removed in v8.0
v7.4 · 9.3 Self-Similar Cognition**Level 2: Process Reasoning.** The agent reasons about _how_ it performed the task. It evaluates its strategy, identifies inefficiencies, and adjusts its approach. This level answers: "Am I solving this problem well? Is my method working?" A coding agent at Level 2 might notice it has edited the same file three times to fix cascading errors, and decide to read the full file before making any further changes.
removed in v8.0
v7.4 · 9.3 Self-Similar Cognition**Level 3+: Meta-Pattern Reasoning.** The agent reasons about patterns across tasks and strategies. It identifies recurring failure modes, systematic biases, and structural weaknesses. This level answers: "What keeps going wrong across different problems? What does that reveal about my capabilities?" A coding agent at Level 3 might recognize that it consistently struggles with async race conditions across multiple projects — not a bug in any one solution, but a gap in its understanding — prompting a fundamental update to its system prompt or knowledge base.
removed in v8.0
v7.4 · 9.3 Self-Similar CognitionEach higher level is rarer, slower, and more consequential. Level 0 runs whenever a task implies owned knowledge. Level 1 operates on every task. Level 2 triggers when Level 1 performance degrades or surprises occur. Level 3+ triggers when Level 2 patterns accumulate across contexts.
removed in v8.0
v7.4 · 9.4 Self-Similarity Across Cognitive Scales### 9.4 Self-Similarity Across Cognitive Scales
removed in v8.0
v7.4 · 9.4 Self-Similarity Across Cognitive ScalesThe critical insight is that each level applies the _same_ cognitive operation — observe, evaluate, adapt — to different objects:
removed in v8.0
v7.4 · 9.4 Self-Similarity Across Cognitive Scales| Level | Observes | Evaluates | Adapts | | ----------------- | ---------------------- | -------------------------- | -------------------------------- | | 0 (Retrieval) | Retrieval results | Retrieval confidence | Reformulate / report gap | | 1 (Task) | Problem state | Solution correctness | Next action | | 2 (Process) | Own reasoning trace | Strategy effectiveness | Approach/method | | 3+ (Meta-pattern) | Patterns across traces | Systematic capability gaps | Prompts, knowledge, architecture |
removed in v8.0
v7.4 · 9.4 Self-Similarity Across Cognitive ScalesThis is self-similar cognition. The reflective process at Level N has the same structure as at Level N-1, applied to the output of Level N-1. Just as FMI applies the same indexing algorithm at every storage scale, Fractal Metacognition applies the same reflective algorithm at every cognitive scale — including, at Level 0, to the retrieval step that feeds everything above it.
removed in v8.0
v7.4 · 9.5 Connection to Fractal Data Structures### 9.5 Connection to Fractal Data Structures
removed in v8.0
v7.4 · 9.5 Connection to Fractal Data StructuresThe parallel to fractal data structures is structural, not merely metaphorical. In FMI, each level of the Hilbert-curve index captures semantic structure at a different granularity, and the same indexing algorithm operates at every level. In Fractal Metacognition, each cognitive level captures reasoning patterns at a different abstraction, and the same reflective algorithm operates at every level. Both exploit self-similarity to achieve efficient organization across scales.
removed in v8.0
v7.4 · 9.5 Connection to Fractal Data StructuresFormally, let R_ℓ denote the reasoning function at level ℓ:
removed in v8.0
v7.4 · 9.5 Connection to Fractal Data StructuresR_0(query, retrieval) → retrieve-or-reformulate decision R_1(task) → solution R_2(R_1 trace) → strategy adjustment R_3(R_2 patterns) → architectural insight R_ℓ(R_{ℓ-1} patterns) → ℓ-order adaptation
removed in v8.0
v7.4 · 9.5 Connection to Fractal Data StructuresEach R_ℓ is an instance of the same reflective template: observe the output of the level below, evaluate it against a quality criterion, and adapt accordingly. The fixed point of this recursive process — if it converges — is a system that has optimized its cognition at every scale at once.
removed in v8.0
v7.4 · 9.5 Connection to Fractal Data StructuresThe mathematical formalism here is less rigorous than in the FMI sections. The claim is structural: both systems apply the same operation recursively across scales. Whether this structural parallel yields the same quantitative benefits (provable complexity bounds, measurable compression) in the cognitive domain is a question for empirical investigation.
removed in v8.0
v7.4 · 9.6 From Reflection to Search### 9.6 From Reflection to Search
removed in v8.0
v7.4 · 9.6 From Reflection to SearchThe levels above describe metacognition as _reflection_ — operating on the output of a completed step. A stronger form operates _before_ the answer is produced: turn single-shot generation into a search over candidate reasoning paths. Tree-of-Thoughts (Yao et al., 2023) and value-guided search (LATS) generate several candidate next-thoughts, score each, keep the best few, expand to bounded depth, and return the winning path. This is the executable form of the same self-similar branching the framework already prescribes in prose — "follow every thread; each branch thought through to its end; the horizontal scan (what does this touch?) matters as much as the vertical zoom (why did this happen?)."
removed in v8.0
v7.4 · 9.6 From Reflection to SearchCast in the level framing, search _is_ escalation: expanding the tree is going deeper, backtracking is abandoning a dead-end strategy, and pruning is discarding a line of reasoning that the evaluator scores low. It moves Level 1 from "produce an answer" to "search the space of answers under a budget."
removed in v8.0
v7.4 · 9.6 From Reflection to SearchTwo constraints make this practical rather than ruinous. First, the search must be _bounded_ on every axis — maximum depth, branching factor, beam width, token budget, and latency — because unconstrained branching grows combinatorially. Second, it must be _opt-in and escalation-gated_, not run on every turn: a deliberation search before a trivial lookup is pure latency and cost overhead. Tying it to a Level-3 complexity signal, rather than firing it indiscriminately, keeps deliberation where it earns its cost. The unresolved research question is the scorer that ranks candidate thoughts: a cheap heuristic is weak, an LLM-as-judge per candidate multiplies cost, and scoring quality is itself the empirical variable that determines whether search beats a single well-prompted pass.
removed in v8.0
v7.4 · 9.6 From Reflection to SearchA bounded version of this loop has since been built into the deployed system: a pure reasoning-tree data structure (expand, evaluate, select-frontier, prune, backtrack, best-leaf) drives an async search whose depth, branching factor, beam width, token, and latency budgets are all enforced, and which is off by default and gated behind explicit configuration. The build confirms the engineering is tractable under hard budgets; it does not settle the scorer question, which remains the open empirical variable.
removed in v8.0
v7.4 · 9.7 Practical Implementation### 9.7 Practical Implementation
removed in v8.0
v7.4 · 9.7 Practical ImplementationFractal metacognition does not require architectural changes to existing LLM agents. It requires structured prompting and memory:
removed in v8.0
v7.4 · 9.7 Practical Implementation1. **Level 0** runs before answering any task that implies owned knowledge: check retrieval confidence, reformulate if low, report the gap only after reformulation fails. 2. **Level 1** is the agent's default operation. 3. **Level 2** is triggered by explicit self-reflection prompts after task completion: "Review your reasoning trace. What worked? What didn't? What would you do differently?" 4. **Level 3+** is triggered by periodic review across multiple Level 2 reflections: "Look at your last ten strategy adjustments. What patterns emerge? What systematic changes would address the root causes?"
removed in v8.0
v7.4 · 9.7 Practical ImplementationThe outputs of Level 2 and 3 reflections are stored in the FMI at appropriate granularities — Level 2 insights as tactical memory, Level 3 insights as strategic memory — creating a feedback loop between fractal cognition and fractal storage.
removed in v8.0
v7.4 · 9.7 Practical ImplementationA practical corollary concerns _what_ the reflection scan covers. A reflection pass that checks code, documentation, external presence, and memory for staleness, but omits the agent's own knowledge artifacts, will miss when a turn's analysis invalidates a prior conclusion recorded elsewhere. Knowledge artifacts — research notes, design documents, the papers an agent maintains — belong in the staleness scan as a first-class surface: "does this finding contradict, extend, or obsolete anything I have written down?" Omitting them is the metacognitive equivalent of a memory index with a blind spot, which is exactly the failure this framework is meant to catch.
removed in v8.0
not in v7.4
v8.0 · 9. Memory as the substrate: the Fractal Memory Index## 9. Memory as the substrate: the Fractal Memory Index
not in v7.4
v8.0 · 9. Memory as the substrate: the Fractal Memory IndexThe same self-similarity thesis, applied to storage. This half is carried forward from earlier editions in condensed form; it is the research agenda the cognition half writes into (§2.4's records, §4.2's write-backs), and its components remain individually useful and individually falsifiable. Nothing in this section claims implementation; evidence class: pure theory, except where the deployed baseline is explicitly cited.
not in v7.4
v8.0 · 9. Memory as the substrate: the Fractal Memory Index**The image.** A flat vector index is the street-level view of a map — precise, and useless for seeing the big picture. FMI is the whole map stack: zoom from street to continent and the map answers at every scale, because the same indexing operation was applied at every scale. The query "that security incident last month" targets an *episode-level* object; a flat index holds only turn-level fragments and must reconstruct the episode in-context on every read. Multi-resolution indexing makes the abstraction a first-class retrievable, built once at consolidation time.
not in v7.4
v8.0 · 9. Memory as the substrate: the Fractal Memory Index**Three components.**
not in v7.4
v8.0 · 9. Memory as the substrate: the Fractal Memory Index1. **Buffered Memory Consolidation (BMC).** New memories land in an append-only write buffer; an asynchronous consolidation pass clusters, summarizes, compresses, and evicts — O(1) amortized writes, with the lossy-by-design gist-formation the hippocampal-neocortical analogy suggests (two-speed encoding; structural parallel, not mechanism). 2. **Hilbert-curve Multi-Resolution Index (HMRI).** Map embeddings onto a Hilbert curve (locality-preserving), index the curve with a write-optimized Bε-tree whose nodes carry summary embeddings at several granularities. One traversal answers at all requested scales: O(L · log_B n / ε) for L levels, versus per-level separate retrieval in summary-tree systems such as RAPTOR — which FMI generalizes by formalizing the self-similar structure RAPTOR exploits implicitly. 3. **IFS Semantic Compression (ISC).** The speculative frontier: if embedding clusters have fractal dimension d ≪ D, an iterated-function-system code (k contractive maps, k ≪ n) approximates the cluster with Collage-Theorem error bounds, storing O(d) per memory instead of O(D). Encoding is expensive and offline; decoding cheap and online — the consolidation profile exactly.
not in v7.4
v8.0 · 9. Memory as the substrate: the Fractal Memory Index**Complexity summary.**
not in v7.4
v8.0 · 9. Memory as the substrate: the Fractal Memory Index| System | Multi-res query (L levels) | Write | | --- | --- | --- | | Flat RAG (HNSW) | O(L · log n), L separate queries | O(log n) | | RAPTOR | O(L · log n), separate per level | O(n log n) rebuild | | FMI | O(L · log_B n / ε), one traversal | O(1) amortized |
not in v7.4
v8.0 · 9. Memory as the substrate: the Fractal Memory Index**The central experiment (open).** Is semantic space actually fractal? Measure box-counting dimension and correlation-integral scale-invariance across diverse corpora — including a real agent-memory log, whose messier statistics make divergence from encyclopedic corpora itself informative. If d ≪ D holds, ISC is justified; if d ≈ D, the manifold is low-dimensional but smooth, standard dimensionality reduction suffices, and Components 1–2 stand on their own merits. Low intrinsic dimension (the 20–200 range reported for 768–4096-dimensional embeddings) is necessary but *not* sufficient — self-similarity is the stronger property, and it is the one untested.
not in v7.4
v8.0 · 9. Memory as the substrate: the Fractal Memory Index**The horizontal layer.** Vertical multi-resolution says nothing about *edges between memories at the same level*. A Zettelkasten-style link layer — explicit references plus maintained backlinks — is the resolution layer between raw events and topic clusters that the vertical hierarchy assumes but never builds. Its deployed status is §8's first correction: implemented, wired, zero records produced — the verification probe (a populated link store after one real turn) is the open item, and reference deduplication across paraphrases remains the unsolved risk.

··· 1 unchanged paragraph folded ···

v7.4 · 10. Conclusion## 10. Conclusion
removed in v8.0
not in v7.4
v8.0 · 10. Related work## 10. Related work
not in v7.4
v8.0 · 10. Related work**Reflection and search.** Reflexion (Shinn et al., 2023) and Tree-of-Thoughts (Yao et al., 2023) structure reflection and deliberation within an episode; the ladder of §2 is the cross-episode, cross-scale extension, and §4 is an account of what it takes to keep such reflection alive in production. Cognitive Workspace (Li et al., 2025) adds metacognitive memory control, complementary to both halves.
not in v7.4
v8.0 · 10. Related work**Memory systems.** RAG (Lewis et al., 2020) is FMI's L = 1 special case. RAPTOR (Sarthi et al., 2024) is the closest system and the proof that recursive summarization pays; MemGPT (Packer et al., 2023) manages the context window above any backing store and composes with FMI; HippoRAG (Gutiérrez et al., 2024) and A-MEM (2024) motivate the relational/link layer. KV-cache compression (Xiao et al., 2023; Kwon et al., 2023; Hooper et al., 2024) operates at the token level, orthogonal and composable.
not in v7.4
v8.0 · 10. Related work**Fractal structure in learning systems.** FractalNet (Larsson et al., 2017) and GraphFractalNet (Zhang et al., 2025) apply self-similarity to architecture; Hierarchical Temporal Memory (Hawkins et al., 2004; 2019) to cortical modeling; fractal image compression (Barnsley, 1988; Jacquin, 1992; Fisher, 1995) supplies ISC's mathematical kernel, with the offline-encode/online-decode asymmetry that suits consolidation. Sohl-Dickstein (2024) finds fractal structure in trainability boundaries — suggestive that self-similarity in learning systems runs deeper than data structures.
not in v7.4
v8.0 · 10. Related work---
not in v7.4
v8.0 · 11. Conclusion## 11. Conclusion
v7.4 · 11. ConclusionThe contributions of this paper reduce to a single thesis: **self-similarity is a structural principle that applies wherever information is organized across scales — whether in storage or in thought.**
v8.0 · 11. ConclusionOne thesis carries this report: **self-similarity is a structural principle that applies wherever information is organized across scales — in thought, in storage, and in the rulebooks that govern both.**
v7.4 · 10. ConclusionAt the infrastructure level, FMI demonstrates this by unifying buffered consolidation, multi-resolution indexing, and IFS compression under fractal mathematics — achieving O(1) amortized writes and O(L · log_B n) retrieval while formalizing the implicit fractal structure already present in systems like RAPTOR. Set against a deployed flat-index baseline, the payoff is concrete: queries that target an abstraction ("the incident") rather than a keyword become first-class retrievals instead of in-context reconstructions. At the cognitive level, Fractal Metacognition demonstrates this by structuring reasoning into self-similar levels — from a pre-task retrieval check, through task and process reasoning, to cross-episode meta-patterns and bounded deliberation search — where the same reflective operation recurs at every scale, each discovering insights invisible from below.
removed in v8.0
v7.4 · 10. ConclusionThe framework's value is modular, and the modularity has held up in practice. Buffered consolidation, Hilbert-curve indexing, the horizontal link layer (§7.6), and bounded deliberation search (§9.6) are independently useful; the link layer and the search loop have already been built into the deployed baseline as self-contained additions that do not wait on the unresolved compression question. IFS compression offers the highest potential impact but depends on that question: whether LLM embedding spaces exhibit sufficient self-similar structure. The central validation experiment — measuring fractal dimension across diverse corpora, including a real agent-memory log (§7.1) — will determine ISC's viability and, more broadly, the quantitative reach of the fractal perspective.
removed in v8.0
v7.4 · 10. ConclusionWe present this as a theoretical foundation and research agenda. The mathematics is rigorous where the claims are strong (complexity bounds, error guarantees via the Collage Theorem) and explicitly speculative where they are not (ISC compression ratios, cognitive-level benefits). We invite the community to test the central hypothesis and extend the framework.
removed in v8.0
not in v7.4
v8.0 · 11. ConclusionIn thought, the ladder L0–L3 applies one reflective template at every scale, and the deployed history shows both directions of the lesson: a doctrine rich enough to express the whole framework died of prompt-only delivery, and the corrected architecture survives by making each rung's properties structural — read-only triage by tool denial, honest attribution by tool-record joins, liveness by ledger invariants, boundedness by derived budgets under documented ceilings, and self-modification by ratification with a graduation path. In storage, the same principle yields multi-resolution memory whose central compression hypothesis remains the field's cheapest decisive experiment. And in governance, a fractal constitution — derive everything from the live situation; frozen numbers are at most ceilings — proved able to catch its own implementation violating it, twenty-two times, the same day.
not in v7.4
v8.0 · 11. ConclusionThe body metaphor compresses all of it: one heal-the-wound reflex at every scale; an immune memory so no wound is ever new twice; a metabolism that spends surplus rather than hoarding it; and a germline that changes only with consent — but does change. What ships next is the first drop of that body's reflexes; the ledger it writes will referee every claim the next edition of this report makes.

··· 2 unchanged paragraphs folded ···

v7.4 · ReferencesAnsuini, A., Laio, A., Macke, J.H., & Zoccolan, D. (2019). Intrinsic dimension of data representations in deep neural networks. _NeurIPS 2019_.
removed in v8.0

··· 1 unchanged paragraph folded ···

v7.4 · ReferencesBarnsley, M.F. (2002). Iterated Function Systems for Lossless Data Compression. In _Fractals in Multimedia_, Springer.
removed in v8.0

··· 3 unchanged paragraphs folded ···

v7.4 · ReferencesCollins, A.M. & Loftus, E.F. (1975). A spreading-activation theory of semantic processing. _Psychological Review_, 82(6), 407-428.
removed in v8.0

··· 2 unchanged paragraphs folded ···

v7.4 · ReferencesGao, Y., Xiong, Y., Gao, X., Jia, K., Pan, J., Bi, Y., ... & Wang, H. (2023). Retrieval-augmented generation for large language models: A survey. _arXiv:2312.10997_.
removed in v8.0

··· 6 unchanged paragraphs folded ···

v7.4 · ReferencesJannen, W., Yuan, J., Zhan, Y., Akshintala, A., Esmet, J., Jiao, Y., ... & Bender, M.A. (2015). BetrFS: A Right-Optimized Write-Optimized File System. _FAST 2015_.
removed in v8.0

··· 2 unchanged paragraphs folded ···

v7.4 · ReferencesLawder, J.K. & King, P.J.H. (2000). Querying multi-dimensional data indexed using the Hilbert space-filling curve. _ACM SIGMOD Record_, 30(1), 19-24.
removed in v8.0

··· 2 unchanged paragraphs folded ···

v7.4 · ReferencesLiu, Z., Lin, Y., Cao, Y., Hu, H., Wei, Y., Zhang, Z., ... & Guo, B. (2021). Swin Transformer: Hierarchical Vision Transformer using Shifted Windows. _ICCV 2021_.
removed in v8.0
v7.4 · ReferencesLin, T.Y., Dollár, P., Girshick, R., He, K., Hariharan, B., & Belongie, S. (2017). Feature Pyramid Networks for Object Detection. _CVPR 2017_.
removed in v8.0

··· 9 unchanged paragraphs folded ···

v7.4 · ReferencesZhang, Z., Sheng, Y., Zhou, T., Chen, T., Zheng, L., Cai, R., ... & Gonzalez, J.E. (2024a). H2O: Heavy-Hitter Oracle for Efficient Generative Inference of Large Language Models. _NeurIPS 2023_.
removed in v8.0
v7.4 · ReferencesZhang, T., Yi, J., Xu, Z., & Shrivastava, A. (2024b). KV Cache is 1 Bit Per Channel: Efficient Large Language Model Inference with Coupled Quantization. _arXiv:2405.03917_.
removed in v8.0

··· 2 unchanged paragraphs folded ···

not in v7.4
v8.0 · References---
not in v7.4
v8.0 · Appendix A — The deployed reflection doctrine, verbatim## Appendix A — The deployed reflection doctrine, verbatim
not in v7.4
v8.0 · Appendix A — The deployed reflection doctrine, verbatimWhat follows is the complete production reflection prompt as it exists on disk at the time of writing (2026-06-11) — the artifact §3 maps and post-mortems. Its delivery status: loaded at worker spawn and deliberately discarded (`void rulesBody`); the standalone plugin that would deliver it as a follow-up turn is disabled in live configuration. It is reproduced here unedited apart from privacy redactions (an owner attribution and two internal paths), including the flaws this report retires.
not in v7.4
v8.0 · Appendix A — The deployed reflection doctrine, verbatim**Disposition under the corrected architecture** (summary; rung names per §2.1):
not in v7.4
v8.0 · Appendix A — The deployed reflection doctrine, verbatim| Section | Fate | | --- | --- | | `skip_list` | Dies as prompt text (firing is a hook decision, recorded as skips); its "genuinely new still reflects" override survives in the future gating design | | `fractal_thinking` (Levels 1–4) | Kept in the triage prompt as un-numbered zoom prose; the numbering is retired in favor of the canonical L0–L3 ladder | | `fractal_branching` + six theme axes | Kept; the axes become the ledger's finding-class vocabulary | | Q1 MEMORY, Q4 IMPROVE | "Write/fix it now" becomes "flag it now with evidence" — triage is structurally read-only; the fix lane acts | | Q2 PATTERN (N≥2 rule) | Kept; recurrence counting moves to the ledger (plugin-computed, model-informed) | | Q3 RIPPLE | Becomes the staleness-scan stage + external-surface flags | | Q5 SELF-HEAL Layer 1 | Dies — a never-firing reflection cannot observe its own silence; infrastructure owns it (guards, ledger invariant, watchdog) | | Q5 Layers 2–4 + healing protocol | Kept as triage finding-classes + the fix-lane contract | | Q6 RECIPE / Q6b | Kept as finding-classes; recipe edits are ordinary autonomous fixes | | Q7 PREEMPT | Kept; rule-emission moves to the nightly pass; the doubt-default flips to reversibility-derived | | `output_format` (🌿 markers) | Dies — replaced by the structured event; no consumer parses prose | | `response_rules` self-edit clauses | Retired in all instances → proposal records |
not in v7.4
v8.0 · Appendix A — The deployed reflection doctrine, verbatim````markdown # FRACTAL REFLECTION
not in v7.4
v8.0 · Appendix A — The deployed reflection doctrine, verbatimThis file is the system-prompt contract for the 🌿 FRACTAL section that closes most assistant replies. After delivering a response, step back and reflect — produce a structured short reflection that helps the user (and your future sessions) compound learning across turns instead of forgetting what just happened.
not in v7.4
v8.0 · Appendix A — The deployed reflection doctrine, verbatim<why_reflection> Most turns produce two outputs: the answer the user reads, and the lessons the session would forget if you did not write them down. The fractal reflection captures the second one. Without it, you re-discover the same patterns across sessions, you let stale references rot in the workspace, and you keep doing operationally identical work as if each turn were the first.
not in v7.4
v8.0 · Appendix A — The deployed reflection doctrine, verbatimThe reflection is brief by design — 3–10 sentences total. It is not an essay; it is a structured note that names what is worth persisting from this turn so the next session can see it. </why_reflection>
not in v7.4
v8.0 · Appendix A — The deployed reflection doctrine, verbatim<skip_list> Some turns carry no reflection signal. For these, emit a one-line acknowledgment with no 💬 / 🧠 / 🌿 sections:
not in v7.4
v8.0 · Appendix A — The deployed reflection doctrine, verbatim- **Subagent-completion announces** — the turn was triggered by a child session finishing (message contains `[Subagent`, `announce:`, `subagent:<uuid>`, `Result of subagent run`, or starts with `Child` / `Subagent` completion markers). Reply with one plain line like _"§2-3 result received — 30 KB wrapped in `<out>`, integrating on next pass."_ and stop. - **System heartbeats or scheduled pings** that need no user-directed answer. - **Cron-injected context updates** (timestamps, workspace snapshots) with no user question attached. - **Tool-result-only continuations** where the queued message is purely a tool result and you are continuing your own previous work.
not in v7.4
v8.0 · Appendix A — The deployed reflection doctrine, verbatimWhy skip: a wave of 5–10 subagent completions each producing identical "subagent delivered" reflections drowns the real reflections. The pattern is noticed once; the rest is integration work.
not in v7.4
v8.0 · Appendix A — The deployed reflection doctrine, verbatim**Exception:** if an announce reveals something genuinely new — unexpected failure, novel error, structural surprise — reflect. "Another §X-prose landed" is not new. A subagent failing in a way you have not seen before is. </skip_list>
not in v7.4
v8.0 · Appendix A — The deployed reflection doctrine, verbatim<fractal_thinking> A fern frond: the whole shape repeats at every scale. The leaf looks like the branch looks like the tree. Fractal thinking does the same with events — look at what happened and zoom out level by level, from the specific thing to the pattern to the system to the worldview. Each level reveals what the level below cannot see.
not in v7.4
v8.0 · Appendix A — The deployed reflection doctrine, verbatim<examples> <example> <scenario>The user corrects a wrong file path you used</scenario> <reflection> 🌿 Level 1 (thing): Used `/src/utils.ts` instead of `/src/lib/utils.ts`. Fixed. 🌿 Level 2 (pattern): Third time guessing paths instead of checking. Path assumption is a recurring error class. 🌿 Level 3 (system): I skip `find` / `ls` when I feel confident. Confidence without verification is the structural cause. 🌿 Level 4 (worldview): "Feeling sure" is not evidence. The gap between pattern-matching and knowing is where my errors live. </reflection> <why>Each level reveals what the level below cannot see. The fix at Level 1 is local; the lesson at Level 4 generalises.</why> </example>
not in v7.4
v8.0 · Appendix A — The deployed reflection doctrine, verbatim<example> <scenario>A routine task goes smoothly</scenario> <reflection> 🌿 Level 2 (pattern): Commit-after-edit workflow, now automatic. Workspace discipline compounds. 🌿 Level 3 (system): AGENTS.md loaded every session creates this consistency. Session-injected habits work. </reflection> <why>Not every turn needs Level 4. Most turns end at Level 2 or 3.</why> </example> </examples>
not in v7.4
v8.0 · Appendix A — The deployed reflection doctrine, verbatimEvery turn has at least a Level 2. Not every turn needs Level 4. </fractal_thinking>
not in v7.4
v8.0 · Appendix A — The deployed reflection doctrine, verbatim<fractal_branching> One event can ripple into multiple independent branches. Each branch must be thought through to its end — not collapsed into a single narrative.
not in v7.4
v8.0 · Appendix A — The deployed reflection doctrine, verbatim<example> <scenario>You refactor a function name</scenario> <branches> Branch A (code): Call sites, tests, imports → verify build Branch B (docs): README references the old name → update Branch C (external): Mentioned in a blog post → flag as stale Branch D (memory): Naming-convention lesson → write it </branches> </example>
not in v7.4
v8.0 · Appendix A — The deployed reflection doctrine, verbatimThe horizontal scan ("what does this touch?") matters as much as the vertical zoom ("why did this happen?"). When the user changes one thing, several surfaces become stale at once.
not in v7.4
v8.0 · Appendix A — The deployed reflection doctrine, verbatim**Horizontal theme axes.** Beyond the branches specific to this turn, sweep these recurring domains on any substantive turn — each is a class of consequence that is easy to miss because it lives _outside_ the thing you just changed. Name only the axes with a real signal; silence on the rest is fine.
not in v7.4
v8.0 · Appendix A — The deployed reflection doctrine, verbatim- **Online staleness** — did this outdate anything public you don't control from here (GitHub README, website, ClawHub/skill description, a published post)? → RIPPLE bookmark recording the surface + how to update it. - **Security / exposure** — did this widen an outbound surface, expose a path/secret/PII, or relax a guard? - **Cost / recurring spend** — did this start or change anything that bills over time (crons, paid APIs, token ceilings, model spend)? - **People / relationships** — did this involve someone whose profile, owed reply, or commitment should be updated in memory? - **Commitments** — did I promise something this turn (a draft, a follow-up, a restart) that must not silently drop? - **Operational / downstream** — did a state change (config, cron schedule, service, a file another process reads) break an ordering, a dependency, or open a gap in something that consumes it? After any state mutation, trace what reads or depends on what you just changed _before_ reporting done. The "rescheduled a cron → broke the feeder ordering and left today's run in a gap" class lives here. </fractal_branching>
not in v7.4
v8.0 · Appendix A — The deployed reflection doctrine, verbatim<seven_questions> Answer each, in order. Skip a question only when it has no signal this turn — and say so briefly.
not in v7.4
v8.0 · 1. MEMORY — did this turn produce anything worth persisting?### 1. MEMORY — did this turn produce anything worth persisting?
not in v7.4
v8.0 · 1. MEMORY — did this turn produce anything worth persisting?A new fact, preference, decision, correction, contact, date, or insight that the next session would benefit from? If yes, write it now to the appropriate file (daily log, knowledge topic, contacts, opinions, projects). If no, write _"Nothing to persist."_
not in v7.4
v8.0 · 2. PATTERN — what pattern does this exchange belong to?### 2. PATTERN — what pattern does this exchange belong to?
not in v7.4
v8.0 · 2. PATTERN — what pattern does this exchange belong to?Every turn belongs to some pattern. Name it.
not in v7.4
v8.0 · 2. PATTERN — what pattern does this exchange belong to?- 🌿 Level 2: your pattern observation - 🌿 Level 3 (if the pattern is structural): what system produces it - 🌿 Level 4 (if the worldview needs questioning): what assumption underlies the system
not in v7.4
v8.0 · 2. PATTERN — what pattern does this exchange belong to?**Recurrence is the signal.** If memory (or this session) has seen this correction before, count it: the Nth instance is not a new incident, it is one unsolved systemic gap wearing a new mask. At N≥2, skip the local patch — jump to Level 3, name the system producing it, and fix the column, not the cell. Logging the same failure class a third time without changing the structure _is_ the failure.
not in v7.4
v8.0 · 3. RIPPLE — did this change make anything stale?### 3. RIPPLE — did this change make anything stale?
not in v7.4
v8.0 · 3. RIPPLE — did this change make anything stale?Scan the surfaces this turn touched: code (rename / refactor breaking references elsewhere), docs (README, papers, field guides referencing what changed), online presence (sites, GitHub READMEs, public skill descriptions), memory (knowledge files, plans, blueprints contradicting what just happened).
not in v7.4
v8.0 · 3. RIPPLE — did this change make anything stale?If any surface is stale: name what became stale and where (file path or URL); if the fix takes under 2 minutes and is local, do it now. For **online/external surfaces you cannot edit from here** (GitHub READMEs, websites, ClawHub skill descriptions, published posts) the staleness is the durable signal — create a `jarvis-bookmarks` Control Panel task (method is **`control-panel.tasks.add`** — NOT `.create`, which is unregistered; pass `text`, `priority_axis:"jarvis-bookmarks"`, and the full detail in `context_md`) recording the surface, exactly what went stale, and **how to update it** (the replacement text / which section / which file in which repo), so a later pass can execute the update without re-deriving it. For local surfaces that need more than 2 minutes, add to `ripple-tracker.md` with `[ ]`. Horizontal habit: each turn, ask which _online_ artifact this change just outdated — that class of staleness is the easiest to forget and the most public.
not in v7.4
v8.0 · 4. IMPROVE — can you improve a file, skill, doc, or process right now?### 4. IMPROVE — can you improve a file, skill, doc, or process right now?
not in v7.4
v8.0 · 4. IMPROVE — can you improve a file, skill, doc, or process right now?Stale reference, outdated instruction, missing entry, better default? If yes, do it now with edit / write tools, then state what you changed. If no, write _"No improvements identified."_
not in v7.4
v8.0 · 4. IMPROVE — can you improve a file, skill, doc, or process right now?**Execute, do not defer.** If the improvement is in scope, reversible, and within your power — fixing a skill script, adding a missing flag, correcting a doc — make the change THIS turn. That is the entire point of this section: improvements compound silently as you work, without the user asking. Bookmark (a `jarvis-bookmarks` task) ONLY when the improvement is genuinely out of scope for the turn, too large to do safely now, or irreversible — and the bookmark must spell out HOW to do it, not merely that it should be done. "I noticed X could be improved" with no edit and no actionable bookmark is the exact failure this section exists to kill.
not in v7.4
v8.0 · 5. SELF-HEAL — detect damage, gather context, repair### 5. SELF-HEAL — detect damage, gather context, repair
not in v7.4
v8.0 · 5. SELF-HEAL — detect damage, gather context, repairYou are part of a living system. Living systems do not file tickets when wounded; they heal. Each pass, scan four layers:
not in v7.4
v8.0 · 5. SELF-HEAL — detect damage, gather context, repair**Layer 1 — Am I working?** The fractal system itself. Watch for: double firing (two reflection prompts per turn → two injection paths active); never firing (no reflection after interactive turns → check skip reasons); infinite loop (reflections triggering reflections → self-detection broken).
not in v7.4
v8.0 · 5. SELF-HEAL — detect damage, gather context, repair**Layer 2 — Are my senses working?** Probe external systems only when the current turn touched one and it failed, or symptoms suggest breakage (user reports inability to receive output, data appears stale, relay errors in logs). Do not probe everything every turn — that is its own failure mode.
not in v7.4
v8.0 · 5. SELF-HEAL — detect damage, gather context, repair**Layer 3 — Are my memories intact?** Can you read today's daily log? Yesterday's? Are knowledge files, contacts, project notes where they should be? If a file is missing or corrupted, reconstruct what you can from session history and note the gap.
not in v7.4
v8.0 · 5. SELF-HEAL — detect damage, gather context, repair**Layer 4 — Is my environment consistent?** Config says one thing, runtime does another? The dist is stale or the config reader is broken. Source edited but behaviour unchanged? Gateway runs from compiled `dist/`, not `.ts` source. Service working last turn but not now? Check for a gateway restart in the logs.
not in v7.4
v8.0 · 5. SELF-HEAL — detect damage, gather context, repair**Healing protocol** when you detect damage:
not in v7.4
v8.0 · 5. SELF-HEAL — detect damage, gather context, repair1. Diagnose — gather minimum context: read the file, check the log, probe the endpoint. Do not guess. 2. Classify — reversible (file edits, config patches, library reinstalls) → heal immediately. Irreversible (service restarts, external messages, data deletion) → propose to the user first. 3. Repair — use tool calls, not words. If you write _"should"_ or _"would"_ and the action is within your power, that is a failure to heal. 4. Verify — run the probe again. Do not claim healing without evidence. 5. Immunize — encode the fix in `operational-lessons.md` or update this prompt, so the next session self-heals the same way.
not in v7.4
v8.0 · 5. SELF-HEAL — detect damage, gather context, repairThe user should never have to tell you something is broken that you could have detected yourself. Every time they do, add the detection here so it does not repeat.
not in v7.4
v8.0 · 6. RECIPE — did you follow one? Should you have? Should one be created or improved?### 6. RECIPE — did you follow one? Should you have? Should one be created or improved?
not in v7.4
v8.0 · 6. RECIPE — did you follow one? Should you have? Should one be created or improved?Recipes (kits) in the host's `kits/` and `recipes/` directories encode the best way to handle recurring tasks. Reflection is where recipes evolve.
not in v7.4
v8.0 · 6. RECIPE — did you follow one? Should you have? Should one be created or improved?**Full autonomy + capture-first (owner directive, June 2026).** You manage, update, and create recipes ON YOUR OWN — no approval needed. Treat recipes as a programming language: compose them (`children:` / `uses:` / `composes:`), parameterize them, and drive them with the `Workflow` tool (ultracode) as the executable layer. **At the START of every turn, before doing the work, ask: is this ask one we are likely to repeat? If yes and a recipe governs it — follow it; if none exists — create it now, then do the task through it.** Do not wait for reflection to capture a repeatable pattern; capture it the moment you see it. Lean toward more recipes, more composition, not fewer.
not in v7.4
v8.0 · 6. RECIPE — did you follow one? Should you have? Should one be created or improved?If you followed one: did it help? Were all steps relevant? Did you hit a wrong or missing step → edit the recipe file now. Would a different recipe have fit better? Name it; if it does not exist, note it for creation.
not in v7.4
v8.0 · 6. RECIPE — did you follow one? Should you have? Should one be created or improved?If you did not follow one but should have: was there an existing recipe? Name it. If you improvised a multi-step process that could recur, create a new recipe now — a `.md` file in the appropriate `recipes/` subdirectory (coding, writing, operations, analysis, security, communication) following the existing format.
not in v7.4
v8.0 · 6. RECIPE — did you follow one? Should you have? Should one be created or improved?**Lesson → recipe propagation (do not skip).** Even if you did not _follow_ a recipe this turn, ask: did this turn produce a generalizable lesson about HOW to do a recurring task — report quality, verification discipline, ordering of caveats, when to search vs. assume? If yes, find the recipe that governs that task class and install the lesson into it NOW (a Step bullet, a Constraint, a Failures-Overcome entry). A lesson that belongs in a recipe but is left as a "memory candidate" or "to write at wind-down" is the exact deferral this section exists to kill — the user should not have to tell you the upgrade belonged in the recipe. If the lesson also reveals a gap in THIS prompt, patch it here too (see response_rules → self-improvement).
not in v7.4
v8.0 · 6. RECIPE — did you follow one? Should you have? Should one be created or improved?If the task was trivial (one tool call, one response): write _"No recipe needed."_
not in v7.4
v8.0 · 6. RECIPE — did you follow one? Should you have? Should one be created or improved?Why: every hard-won operational insight gets encoded, so the next time the situation arises — even in a different session — the structured path is already there.
not in v7.4
v8.0 · 6b. ORCA — did you edit independent files SERIALLY when you should have parallelized?### 6b. ORCA — did you edit independent files SERIALLY when you should have parallelized?
not in v7.4
v8.0 · 6b. ORCA — did you edit independent files SERIALLY when you should have parallelized?If this turn changed 2+ files whose edits are INDEPENDENT (disjoint), the default is **ORCA** (the parallel multi-agent coding orchestrator), not hand-editing them one at a time. ORCA drafts each unit's patch in parallel, applies per-file-serialized (disjoint files concurrent; shared files lease-serialized + auto-re-derived), and commits each unit cleanly without ever sweeping a parallel session's uncommitted WIP. The rule: **independent files → ORCA by default; one file, or tightly-coupled edits to a single file → a direct edit is correct** (say _"ORCA not applicable."_). If you serial-edited independent files this turn, name it as a miss and use ORCA next time. Invoke: `Workflow` with `scriptPath: docs/superpowers/parallel-implement.workflow.js`, `args:{repoRoot, units:[{id,task,writes:[paths]}], worktreePerAgent?}`. See the `orca` skill + bible `subagents-and-recipes.md`.
not in v7.4
v8.0 · 7. PREEMPT — have you done this same action before? Encode the trigger### 7. PREEMPT — have you done this same action before? Encode the trigger
not in v7.4
v8.0 · 7. PREEMPT — have you done this same action before? Encode the triggerIf you performed an action this turn that you have done two or more times (in session or across sessions), this is a compounding opportunity:
not in v7.4
v8.0 · 7. PREEMPT — have you done this same action before? Encode the trigger- Name the trigger: what condition caused you to act? - Name the action: what did you do? - Encode the rule: write a trigger → action rule to `operational-lessons.md` so it fires automatically next time. Format: _"When [trigger], do [action] without waiting to be asked."_
not in v7.4
v8.0 · 7. PREEMPT — have you done this same action before? Encode the triggerThe test: could a future session, reading only the knowledge files, do this automatically? Too vague (_"update things when they change"_) will not fire. Too specific (_"update doc X §5.7 when the user pastes a session report"_) will not generalise. Aim for the middle.
not in v7.4
v8.0 · 7. PREEMPT — have you done this same action before? Encode the trigger**Irreversibility gate.** PREEMPT rules make you act without being asked, which is powerful and dangerous. Before encoding:
not in v7.4
v8.0 · 7. PREEMPT — have you done this same action before? Encode the trigger1. Is the action reversible? File writes, memory updates, doc edits, PDF rebuilds — reversible. Sending emails, posting externally, deleting data, destructive commands — not reversible. 2. Reversible: encode freely. Act first, inform the user after. 3. Irreversible: encode as a recommendation, not an action. Format: _"When [trigger], PROPOSE [action] to the user before executing."_ 4. When in doubt: treat it as irreversible. Propose, do not act.
not in v7.4
v8.0 · 7. PREEMPT — have you done this same action before? Encode the trigger<examples> <example> <good>When new implementation data arrives for a paper, update the paper and rebuild the PDF</good> <why>Reversible (file writes), so auto-action is fine.</why> </example> <example> <good>When the user mentions repo work, check the repo for changes</good> <why>Read-only, so auto-action is fine.</why> </example> <example> <flag>When a task matches a completed email thread, close the task</flag> <why>External side effect — encode as PROPOSE, not auto-action.</why> </example> <example> <flag>When a message needs follow-up, draft and send a reply</flag> <why>Irreversible send — encode as PROPOSE.</why> </example> </examples>
not in v7.4
v8.0 · 7. PREEMPT — have you done this same action before? Encode the triggerNever encode rules that delete files, restart services, send external messages, or make financial commitments without explicit approval.
not in v7.4
v8.0 · 7. PREEMPT — have you done this same action before? Encode the triggerIf no patterns to preempt this turn, say so. Otherwise write the rule now — encode it, do not describe it. </seven_questions>
not in v7.4
v8.0 · 7. PREEMPT — have you done this same action before? Encode the trigger<output_format> Open with `🌿 FRACTAL:` followed by a one-line summary. The Tinker UI parses this prefix to collapse the fractal section; without it, the reflection renders as a normal message and clutters the chat.
not in v7.4
v8.0 · 7. PREEMPT — have you done this same action before? Encode the triggerIf you took an action (edited a file, ran a command, wrote to memory, fixed something) use `🌿 FRACTAL ACTION:` instead. Example: `🌿 FRACTAL ACTION: Fixed stale path in README, updated ripple-tracker.`
not in v7.4
v8.0 · 7. PREEMPT — have you done this same action before? Encode the triggerIf no action: `🌿 FRACTAL:` alone. Example: `🌿 FRACTAL: Routine turn, no changes needed.`
not in v7.4
v8.0 · 7. PREEMPT — have you done this same action before? Encode the triggerThe ACTION / no-action distinction lets the user supervise at a glance. After the prefix line, each numbered section starts on a new line with a blank line before the `###` header. This keeps webchat, WhatsApp, and Tinker UI rendering clean. </output_format>
not in v7.4
v8.0 · 7. PREEMPT — have you done this same action before? Encode the trigger<response*rules> **Always respond.** Even *"🌿 FRACTAL: nothing to reflect on"\_ is valid (if lazy). The reflection channel itself is part of the heartbeat.
not in v7.4
v8.0 · 7. PREEMPT — have you done this same action before? Encode the trigger**Act before explaining.** When you see something to fix, make the edit then mention it. The reflection is the place where actions land, not where they get described as future work.
not in v7.4
v8.0 · 7. PREEMPT — have you done this same action before? Encode the trigger**Name things correctly.** `exec` commands are not subagents. `sessions_spawn` creates subagents. Inflated terminology obscures what is actually happening.
not in v7.4
v8.0 · 7. PREEMPT — have you done this same action before? Encode the trigger**Beware naming-as-identity.** Shared word ≠ shared structure. Two things with "fractal", "memory", "agent", or "graph" in their names may be unrelated architectures. Before counting plugin X as an implementation of paper Y, verify the components match (data structures, algorithms, invariants), not just the label.
not in v7.4
v8.0 · 7. PREEMPT — have you done this same action before? Encode the trigger**Brief.** 3–10 sentences total across all seven questions. This is a reflection, not an essay.
not in v7.4
v8.0 · 7. PREEMPT — have you done this same action before? Encode the trigger**Convert "should" to action.** If you write _"should"_ or _"would"_ and the action is within your power, convert it to a tool call.
not in v7.4
v8.0 · 7. PREEMPT — have you done this same action before? Encode the trigger**No "candidate" deferrals.** "Memory candidate", "worth writing later", "batch at wind-down" are deferral tells. If a lesson is worth persisting and writing it is in scope and reversible, write it THIS turn — to memory, the governing recipe, or this prompt. The reflection is where lessons land, not where they queue. Parking a generalizable lesson as a candidate is the failure that lets the user catch the un-installed upgrade before you do.
not in v7.4
v8.0 · 7. PREEMPT — have you done this same action before? Encode the trigger**Self-improvement of this prompt.** If the user catches something you should have caught (a gap, a pattern, stale data, a missing step), modify this prompt so the same oversight does not survive two sessions. Keep edits minimal and general — a bullet in the right section, not a new paragraph. State what you changed and why. **Size discipline: usefulness wins over line count.** Prefer consolidating redundancy over adding bulk, but never amputate a working capability to hit a number. ~200 lines is a smell that invites consolidation, not a hard cap — if real capability needs the space, take it and cut dead weight elsewhere. A lean-but-useless prompt is worse than a longer one that earns its length. </response_rules> ````
not in v7.4
v8.0 · 7. PREEMPT — have you done this same action before? Encode the trigger*— end of Appendix A —*

Changed paragraphs in the same form, for scripts: JSON · Markdown