# Fractal Reasoning: v8.0 → v8.1

From v8.0 (11 Jun) to v8.1 (14 Jun): 10,054 words to 11,729 words, 1,675 words in new or rewritten paragraphs and 0 taken out, 16 paragraphs changed.

## Change note of v8.1

**Related work grows fourfold; second witness for 'only structure enforces**

Additions only, about 1,700 words. The related work section grows from about 200 to almost 1,000 words and now places the paper next to tools that shipped in 2026. The folder's notes of 13 June asked for these comparisons.

- Compares the reflection lane with doubt-driven-development from addyosmani/agent-skills, which follows a very similar check-and-verify loop.
- Compares the memory half with headroom, a context compressor that keeps the originals and has a measured benchmark.
- The claim that prompts can state rules but only structure enforces them gains a second example: a separate safety layer that blocks dangerous tool calls.
- The ledger section now separates enforcing a rule from judging what to enforce.
- The memory section states its central open experiment: is semantic space really fractal?

## Changed paragraphs

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

### Abstract

LLM 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,-] {+limits — enforced by a tool-layer deny the worker cannot evade, the same primitive now demonstrably live in a sister danger-floor subsystem —+} 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.

### 3.3 The corrected thesis

{+The thesis has since gained a second, independently deployed witness in the same host. The AEGIS danger floor — a different subsystem, with a different purpose (refusing dangerous tool calls, not judging finished turns) — was built on the same bet: a prompt that *asks* a model not to run a destructive command is a wish, but a `PreToolUse` hook that *denies* the call is a fact. When that deny floor went live denying under `bypassPermissions` (§4.1), it confirmed the structural-enforcement claim outside the reflection layer entirely. One subsystem choosing structure over prompting is a design preference; two unrelated subsystems independently arriving at it, on the same host primitive, is the L3 pattern — *enforcement is a capability of the substrate, not of the instruction* — generalizing past the single case this report set out to document.+}

### 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. {+The enforcement primitive this rests on is no longer a design assertion: a sister subsystem in the same host — the AEGIS danger floor (J11/amygdala) — went live denying tool calls at a native `PreToolUse` hook *under `bypassPermissions`*, the hardest case, where the worker cannot talk its way around the deny. The host honors a `{block}`/deny at `PreToolUse`, which is the exact precondition every "by tool denial" claim in this section depends on. Two independent subsystems now ride the same deny mechanism — reflection's read-only triage and the amygdala's danger floor — which promotes the enforcement claim from a single-instance design choice to a platform fact, and retires the earlier worry that cc-bridge enforcement was an observe-only physics limit.+} - **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).

### 4.2 The ledger: immune memory, and the end of unmeasured reflection

{+There is a sharp distinction the ledger exists to police, and the sister AEGIS subsystem learned it the hard way. *Enforcing* a boundary and *judging* what to enforce are different reliabilities. The deny floor (§4.1) enforces perfectly — a denied tool call does not run, every time — but AEGIS's attempt to *learn* which calls are dangerous produced a cautionary result: a supervised vicarious-danger head scored an AUROC of **0.286, below chance**, on a frozen embedding backbone that simply could not carry the harmfulness signal, while two unsupervised structural signals — k-NN novelty (0.875) and clause-cosine incongruity (0.896) — validated. The general lesson maps directly onto the reflection lane: a triage *verdict* is a learned judgment of exactly that fragile kind, and it earns autonomous-fix authority only through measured yield, never through plausibility. This is precisely what the KPI set above is for — fix yield and abstention rate are the reflection lane's AUROC-equivalent, and an unmeasured verdict driving an autonomous edit is the same mistake as trusting a 0.286 danger head because its prose sounded confident. Structure can be trusted to *enforce*; a judgment must be *measured* before it is trusted to *decide*.+}

### 8. Evidence classes, including this report's own corrections

1. **"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.-] {+system. 4. **"Structural read-only triage" partially graduates.** The reflection lane as a whole remains design-of-record (its first drop is in build), but the *enforcement primitive* it depends on — a `PreToolUse` deny the worker cannot evade, even under `bypassPermissions` — is now live-and-verified in the sister AEGIS subsystem (§4.1). The honest split: the mechanism that makes "triage never edits" physics is demonstrably live; the triage lane that will *use* it is not yet firing in production. This is the rare correction that moves a claim *toward* its strongest class rather than away from it.+}

### 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-] {+mechanism; the `PreToolUse` deny primitive that makes read-only triage physics (live in the sister AEGIS floor, §4.1)+} | | **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 |

### 9. Memory as the substrate: the Fractal Memory Index

1. **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.-] {+exactly. ISC must now clear a bar a deployed system has already raised: headroom's reversible CCR (§10) ships per-content-type compressors with measured 60–95% token savings at ~0 accuracy delta, so "we can compress memory and recover it" is no longer a hypothesis — it is production. What ISC must add over an already-shipped per-type compressor is the *self-similarity* property: a single code that holds across event, episode, and concept scales because the manifold is fractal, not a separate crusher per content type. If the manifold is merely low-dimensional-and-smooth, headroom-style per-type compression is the right answer and ISC has no reason to exist; ISC earns its place only if the d ≪ D self-similar structure is real.+}

### 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.-] {+merits — a fallback that headroom's production results make *safe* rather than merely tolerable, since reversible content-type compression is now demonstrated to work at scale (§10).+} 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.-] {+untested. headroom's `python -m headroom.evals` harness is the concrete template for running this decisively: a token-savings-vs-accuracy-delta sweep on a real corpus is exactly the measurement that would adjudicate whether an IFS code beats a per-type compressor, and it is cheap. One caution the sister AEGIS measurement underlines (§4.2): the fractal-dimension probe must run on a backbone rich enough to carry semantic geometry — a *frozen* embedding that cannot separate meaning will report a dimension that is an artifact of the embedding, not of the corpus, the same way AEGIS's frozen-backbone danger head scored below chance because the representation could not carry the signal it was being asked to measure.+}

### 10. Related work

{+The closest *deployed* point of comparison is no longer a research artifact but a shipped, widely-installed skill: **doubt-driven-development**, from Addy Osmani's `addyosmani/agent-skills` collection (56.8k stars). Its loop — CLAIM → EXTRACT (reduce to artifact + contract, reasoning stripped) → DOUBT (a fresh-context adversarial reviewer) → RECONCILE (classify findings against the artifact text) → STOP (trivial findings / three cycles / user override) — is a near-exact external rediscovery of §4's triage→fix→verify lane, and three of its moves map one-to-one onto this paper's structural choices: its *fresh-context adversarial reviewer* is the paper's forked, separate-run-identity triage lane (both insist the judge not inherit the producer's working context, for the same reason — a critic carrying the author's context inherits the author's blind spots); its *EXTRACT step that strips reasoning to an artifact+contract* is the operational form of the paper's hardest-won rule, *"model prose is narrative, never telemetry"* (§3.2) — doubt judges the artifact, not the author's account of it; and its *STOP criteria* are a bounded-escalation governor of exactly the kind §4.4 derives. What doubt-driven-development does that this paper does not yet ship is be a *clean, named, copyable contract* for the L2 verification rung. What this paper does that doubt-driven-development does not is generalize across scales: doubt is per-task and in-episode — it has no append-only ledger, no cross-episode recurrence counting (the N≥2 / L3 META-PATTERN rung), no tool-record attribution join, and no liveness invariant (*every turn yields exactly one row*) — so it is a single-rung (L2) verification loop, not the multi-scale, measurable, survives-silent-severance architecture §4 builds. The honest summary: doubt-driven-development is the productized point-instance of the rung this paper describes in prose; the paper's contribution is the cross-scale generalization and the ledger that makes it immune memory.+}

### 10. Related work

{+Osmani's collection also contributes two *authoring disciplines* the framework should adopt as portable form, not just as private habit: every skill carries a **"When NOT to use" anti-trigger** (the structural form of Appendix A's `skip_list`, but promoted to a first-class authoring requirement) and a **"Loading Constraints"** declaration of where a skill may load — main orchestrator versus subagent, with a documented degraded fallback — which is precisely §2.1's capability law (*the rung that detects must be separated from the rung that acts, by capability*) rendered as a packaging convention. The same lesson appears in Tejas Chopra's marketing-skills convention (`coreyhaines31/marketingskills`) and the Journey kit registry, where a skill/kit declares its triggers, its non-triggers, and its load surface as machine-readable metadata rather than prose — the ecosystem is independently converging on the idea that a capability's *boundary* must be as explicit as its body, which is the authoring-side echo of this paper's enforcement thesis.+}

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

### 10. Related work

{+The most important fresh comparison for the FMI half is **headroom**, from Tejas Chopra's `chopratejas/headroom` (24.7k stars, Apache-2.0): a context-compression layer whose core mechanism — **reversible CCR (Compress-Cache-Retrieve): keep the originals cached, hand the LLM a compressed view, retrieve the full content on demand** — is structurally convergent with FMI's buffered-consolidation/eviction story (§9.1) and, more pointedly, with the "lossy gist with the original recoverable" intuition behind ISC (§9.3). The difference that earns it a place here is evidence class. FMI's compression frontier is tagged *pure theory* with its central self-similarity experiment still open (§8 table; §9); headroom ships **per-content-type compressors** (statistical JSON-array crushing via SmartCrusher, AST-aware code compression via tree-sitter, log/diff/text handlers), reports **60–95% token savings at ~0 accuracy delta on GSM8K / TruthfulQA / SQuAD / BFCL**, and ships a **reproducible eval harness** (`python -m headroom.evals`), a trained compression model (Kompress-v2-base), and proxy/MCP/library form factors. The honest line runs both ways. *What headroom does that FMI does not:* it has measured, reproducible token savings at near-zero accuracy loss with content-type-specialized lossless-on-retrieve compressors — i.e. it has shipped and evaluated the "compress-but-keep-recoverable" idea FMI only theorizes. *What FMI does that headroom does not:* headroom's compression is content-type-keyed and flat — it crushes a JSON array or an AST without claiming the *index* is self-similar across event/episode/concept scales, so it is a per-content compressor, not a multi-resolution *retrieval* structure (no Hilbert/Bε-tree traversal, no fractal-dimension claim about semantic space). The productive consequence is twofold. First, headroom is empirical evidence that reversible compression with cached originals works in production, which directly **de-risks FMI Components 1–2** — BMC and HMRI stand on their own merits even if ISC's d ≪ D hypothesis fails. Second, it **raises the bar on ISC**, which must now justify an IFS code over headroom's already-shipped per-type compressors by demonstrating the *self-similarity* property headroom never claims. headroom's eval harness is also the concrete template for the cheapest-decisive-experiment §9 keeps promising but has not run.+}

### References

{+Chopra, T. (2026). headroom: reversible Compress-Cache-Retrieve context compression for LLM agents (SmartCrusher, Kompress-v2, eval suite). Software, Apache-2.0. `github.com/chopratejas/headroom`.+}

### References

{+Haines, C. (2026). marketingskills: a router-and-frameworks skill collection with explicit trigger/non-trigger and load-surface metadata. Software. `github.com/coreyhaines31/marketingskills`.+}

### References

{+Journey (2026). Journey kit registry: installable agent workflows declaring triggers, non-triggers, and load surface as machine-readable kit metadata. Software registry.+}

### References

{+Osmani, A. (2026). agent-skills: a plugin collection including doubt-driven-development, with "When NOT to use" anti-triggers and "Loading Constraints" load-surface declarations. Software. `github.com/addyosmani/agent-skills`.+}
