# Information Tree
<!--
ref: @protocol/information-tree
tags: [knowledge-architecture, chunking, core-appendix, progressive-disclosure, protocol-design]
triggers: [we need a good information tree here, document grows too large, need for audience-specific content, frequent reader overwhelmed by detail, content relocation without clarity, too many tiny fragments, how should I split this knowledge, context fetch loads too much, why is the bootstrap a tree, cache-friendly context layout, what belongs on the tape vs in the weights, is the context a projection of the tape]
trigger_prompt: When the operator says "we need a good information tree here", when a document or protocol has grown past what its everyday reader needs, or when deciding how to split, index, or compose fetches over a body of knowledge.
complements: [@protocol/information-tree_/information-tree-context-fetcher, @protocol/context-tuning, @integrations/index_/authoring]
version: 12
updated_at: 2026-11-17T21:53:35.567Z
appendixes: [@protocol/information-tree_/information-tree-context-fetcher]
-->

A strong root that indexes purpose-sized branches, so a reader always knows what they don't know and gets what a task needs in as few fetches as possible.

The recurring shape for organizing operator and agent knowledge: **a strong root that indexes purpose-sized branches, so a reader always knows what they don't know, and gets what a task needs in as few fetches as possible.** In short: the content stays light, the reader knows what they don't know, and it comes in good chunks. The standing phrase below names it.

## "We need a good information tree here"

When the operator says this about any topic, it means the following, and this entry is the definition:

1. **A strong root.** One entry that a human or an LLM can read top to bottom and come away knowing the whole shape. It carries the everyday knowledge, and it names every branch together with the moment you would fetch it.
2. **Branches sized by purpose, not too fine-grained.** Each branch is what one reader needs at one moment, so it is grabbed in one go.
3. **The objective:** collect the right information, load as little unneeded information as possible, and take as few turns as possible. A turn costs everything it carries, so a wasted fetch is paid again on every later turn. A tree is graded on all three, never on the root's size alone.
4. **It makes sense to a human.** This is a requirement, not decoration. LLM reasoning is trained on human language and human document structure, so a layout a human can navigate is one a model navigates well. A layout a human finds simple to read is also one people will maintain.

To act on the phrase: run **§Building or tuning a tree** below on the topic. Then report the tree as a short outline (root → branches, one line each: who reads it, and when).

## The rules

1. **Everyday knowledge lives in the root; the root stays light.** The root loads on every use, so it carries only what most uses need. A root that grows becomes a tax on every reader. One worked example: a contract reached 290KB (~70k tokens), re-fetched by every engine on every boot, before it was split. Two passes later the root was ~21k and nothing was lost.

2. **Know what you don't know: the root indexes its branches.** Moving content out is safe only if the root says what exists deeper and when to fetch it. A reader who cannot see where their knowledge ends will re-derive it, often wrongly, or assume they have everything, which is worse. The mechanism is the **stub**. When a section moves out, a stub stays under the same heading, carrying the everyday summary plus a pointer. A branch nothing points to is an orphan. A fact stored where nobody reads on the path that needs it is as good as unrecorded.

3. **Branches are bound to the root.** Bound means three things:
   - The root names the branch at the exact moment of need ("fetch X before doing Y").
   - The branch is titled as belonging ("Spec — Tracker (appendix)").
   - The branch carries a pointer back to the root.

   Split by **audience and fetch-time**, not by topic size. The everyday reader never pays for the maintainer's detail, and the maintainer reaches it in one hop.

4. **Chunk by purpose.** A chunk is one reader at one moment, and that reader loads it whole. Split where readers or moments differ. Never shard for tidiness.

   **Granularity is a trade-off you choose on purpose:**

   | Finer pieces | Coarser pieces |
   |---|---|
   | bigger index | smaller index |
   | more hops | fewer hops |
   | more pointers that can go stale | each fetch carries some material the reader didn't need |

   The usual sweet spot is a root plus a handful of branches, not dozens.

5. **Fine-grained is acceptable when the index lets you compose one fetch.** LLMs are good at concatenating. A good index of small pieces works as well as purpose-sized chunks if, from the index alone, the reader can pick every piece a task needs and pull them in **one round trip** (`fetch?include=a,b,c`, `?section=`). Two conditions apply:
   - each piece's index line must say enough to choose it without opening it;
   - the composition must be one fetch, not a walk.

   If readers have to open pieces to find out whether they need them, the index has failed and the pieces should merge.

6. **Split by how often a thing is read: every run, once, or never.**
   - **Every run:** the body. How to run it, the actions, what comes back, what to do on each failure.
   - **Once per machine or account:** install, credentials, browser setup. This goes in a `<slug>_/<slug>-setup` appendix, named from the body at the moment it's needed ("exit 2 → setup").
   - **Executed but never read:** script source. This goes in a **file appendix**, downloaded on each run and never loaded into context.
     The body names it by its `_/` ref (`@integrations/loom_/loom.mjs`) and the run fetches it from there: `curly protocol "@integrations/loom_/loom.mjs" -o loom.mjs`, checking the bytes against `X-Content-Hash`. It is written by entry id (`POST /entry/{id}/file` with `{filename, content}`), listed at `/entry/{id}/files`, and named in a whole fetch's `files:` line. Routes, body and headers: `@protocol/protocol-api` §File appendices.
   - **Backstory and maintainer internals:** below the main content, or in an appendix.

   Worked example: `@integrations/loom`. Skeleton: `@integrations/index_/authoring`.

7. **Write it the way a person would want to read it.**
   - Titles say what the thing is.
   - Headings name their contents, so `?section=` works.
   - Each branch opens with one line saying who it is for and when.
   - Use plain words over coined labels.
   - Use a table when the content is a lookup, and prose when it is reasoning.

## Building or tuning a tree

1. **List the readers and the moments.** For example: running it, setting it up, writing code on top of it, maintaining it, deciding whether to use it. Each distinct reader and moment pair is a candidate branch.
2. **Write the root first.** One opening line saying what this is. Then the everyday knowledge. Then a branch table with columns *branch · who · when to fetch*. If the root cannot be written, the topic is not yet understood.
3. **Assign every existing fact to exactly one place.**
   - A fact needed in two places lives in one and is pointed to from the other.
   - The exception is a one-line stub summary, which is allowed so the root stays readable.
   - A mirrored paragraph is not allowed.
4. **Check the granularity.** For each branch, ask two questions:
   - Does its reader use most of it whenever they fetch it? If not, split it.
   - Is it fetched almost always alongside a sibling? If so, merge them, or make sure one composed fetch gets both.
5. **Run the three typical tasks as a dry run.** For each, count fetches, turns, and tokens that were loaded but not used. That count is the grade. Re-grade after any restructure.
6. **Leave stubs for everything you moved,** and fix the inbound references.

## How to grade a tree

| Measure | Good | Bad |
|---|---|---|
| Fetches to answer a typical task | 1–2 (root, plus one branch or one composed fetch) | A walk of 3 or more dependent hops |
| Tokens loaded but not used | Small; the reader used most of what arrived | Whole entries read for one fact |
| Root size | What most uses need | Accumulated history, setup, and edge cases |
| A human reading the root | Can say what exists and where | Has to open branches to learn what they are |

## Anti-patterns

- **The monolith:** everything kept in the root because splitting felt risky. Every reader pays for its weight forever.
- **Confetti:** dozens of tiny fragments with no index good enough to compose from. Every task becomes a walk, and every boundary is a pointer that can go stale.
- **The orphan branch:** content moved out with no pointer at the moment of need. It drops out of use while looking archived.
- **The shadow root:** a branch that has grown its own everyday knowledge. If readers have to fetch it on most uses, it is root material under the wrong label, so promote it.
- **The silent move:** relocating content makes the root's numbers fall without making the knowledge any cheaper to use. Grade by cost per use across all layers.
- **The mirror:** a summary that restates a deeper layer drifts away from it. A stub carries the everyday half and points to the rest. It does not copy it.
- **Over-normalization:** splitting text or code into shared pieces so finely that a person can no longer read one unit and understand it. Duplication is a cost, and so is indirection. Share what really is one thing. Keep separate what changes for separate reasons, even if it looks similar today.

## Worked instances

- **An agent fleet's engine contract:** root (engine law, read on every boot) → runtime branch (fetched when operating the fleet) → write-discipline branch (fetched before a write) → lessons branch (fetched before weakening a rule). The boot payload went from 70k to 21k tokens, and every moved section left a stub.
- **`@protocol/spec` + `@protocol/spec-tracker`:** the oldest instance of the pattern.
- **Bootstrap `?topic=`:** a light core bootstrap, with topic layers appended by name.
- **`@integrations/<service>` + `_/<service>-setup` + file appendix:** the every-run / once / never split as a template.
- **Auto-memory `MEMORY.md`:** a one-line-per-memory index loaded every session, with the bodies loaded on demand. This is rule 5 applied to memory.

## Fetching less than the tree holds

The tree decides what *exists* where. The fetch decides what *arrives*. Server-side cuts already exist:
- `?section=`, one heading;
- `?max=`, condensed to a budget;
- `?trunc=`, the literal first lines;
- `fetch?include=`, a composed fetch.

The next layer is an **optimized context fetcher**: a cheap, fast model that sits between the knowledge base and the reader. Given the task, it filters, summarizes, tags and categorizes what the tree returns, omitting what this task doesn't need while saying what it omitted. It is at concept stage. Read **`@protocol/information-tree_/information-tree-context-fetcher`** before designing or building it.

Applying this tree to an agent's **session base** (harness config, memory index, tool schemas: everything that loads before the user types) is covered by [`@protocol/context-tuning`](@protocol/context-tuning).

## Why a tree: the tape, its projection, and a cache-shaped head
Read the agent as a Turing-style machine. The model and the tape together are the machine, and a capable model's behavior is largely set by what's on the tape: protocols, skills, facts and methods.
- **The store is the tape.** The tape is the full, searchable store. The context window is a per-run **projection** of it: a materialized view chosen for this task, like Denning's working set (1968) or a database materialized view.
- **The bootstrap is the predicted working set.** The tight root, the index of common branches, and "search for any unknown" are that prediction. Fetched sections are the rest of the projection, pulled on demand.
- **The cache shapes the layout.** Prefix caching makes the read head stack-shaped: unchanged leading tokens are cheap, and any edit invalidates everything after it. That is a property of the head, not the tape, but it decides physical layout. Order context by how often each part changes, bottom first: identity and tools, then the root and branch index, then facts fetched for this task, then session notes, then this turn's working material.
- **Promote in two steps.** A branch fetched on nearly every run moves first into the bootstrap prefix, which is cheap and reversible. It moves into model weights only if it stays hot and stable there. This is the Baldwin effect: learned behavior becomes innate only when carrying it keeps costing.
- **Grade the projection, not just the tree.** Track four signals:
  - prefix cache hits;
  - fetched sections that were used vs ignored;
  - misses, where the reader guessed or re-derived what the store held;
  - tokens carried × turns.

  A change in the head (new cache rules or prices) can move the best layout without changing the tree.

---

*Related: `@content/youtube/steph-france/making-business-agents-smarter-with-skills` · `@protocol/salvage`*

---

*You're reading a protocol on [protocol.supply](https://protocol.supply) — hosted, searchable knowledge for AI agents. Think Agent Skills, as an API: bootstrap once (`curl -sL https://api.protocol.supply/bootstrap`), search (`/search?q=…`), fetch (`/@repo/slug`).*

*Any skill can become a protocol, and any protocol installs as a local skill — tell your agent "install this as a skill" or see [`@protocol/protocol-to-skill`](https://api.protocol.supply/@protocol/protocol-to-skill).*