# Knowledge Tree
<!--
ref: @knowledge/knowledge-tree
type: framework
tags: [core, knowledge, philosophy, capture, rag]
aliases: [tree, mipmap, merkle, summaries]
triggers: [need to verify claims, information is outdated, organizing research by topic, capturing daily logs]
trigger_prompt: When you need to manage and retrieve knowledge efficiently, ensuring that information is up-to-date and verifiable.
version: 1
updated_at: 2026-01-24T19:24:17.182Z
-->

A single abstraction for managing unbounded knowledge across temporal streams, research workspaces, and external sources.

## Core Concepts

### Mipmap Principle (Resolution Levels)
Like texture mipmaps in graphics, pre-compute summaries at multiple resolutions:
```
Level 4: Root       ~500 tokens   (whole tree overview)
Level 3: Branch     ~1,500 tokens (major sections)
Level 2: Section    ~3,000 tokens (subsections)
Level 1: Leaf-sum   ~6,000 tokens (individual item summaries)
Level 0: Raw        unlimited     (source of truth)
```
**Always start at root, drill down only as needed. Stays in smart zone.**

### Merkle Principle (Change Propagation)
Like Merkle trees in cryptography, track sources for change detection:
```yaml
---
generated: 2024-12-18T16:00:00Z
sources:
  - path: raw/2024-12-18.md
    modified: 2024-12-18T15:30:00Z
---
```
- Each summary tracks its children as sources
- `child.modified > summary.generated` → summary is STALE
- Staleness cascades UP the tree
- Regeneration flows DOWN (only stale branches)
- **Siblings are never affected by changes**

### Source Pointers (Verification Trail)
Every claim links to its origin:
```markdown
- Chose Next.js over Remix (raw/2024-12-18.md:47-52)
- [ ] Follow up with John | raw/2024-12-18.md:23 | due:2024-12-20
```

## Tree Topologies

### 1. Time (Temporal Stream)
Personal capture organized chronologically. Endless chat, brain dumps, daily logs.

```
workspace/knowledge/time/
├── raw/
│   ├── 2024-12-18.md
│   └── 2024-12-17.md
└── summaries/
    ├── master.md
    ├── tasks.md          # Extracted todos (special index)
    ├── daily/
    │   └── 2024-12-18.md
    ├── weekly/
    │   └── 2024-W51.md
    ├── monthly/
    │   └── 2024-12.md
    └── quarterly/
        └── 2024-Q4.md
```

### 2. Topic (Semantic Research)
Topic-based research organized by meaning. Files, fragments, notes clustered by theme.

```
workspace/knowledge/topic/{topic-name}/
├── raw/
│   ├── file-1.md
│   ├── file-2.md
│   └── fragments.md
└── summaries/
    ├── master.md
    └── subtopics/
        ├── theme-a.md
        └── theme-b.md
```

### 3. Source (External Ingestion)
External content sources with evolving state. Has sync config, queue, and dual indexing.

```
workspace/knowledge/source/{source-name}/
├── config.yaml           # Sync settings, URL, lookback
├── queue.md              # Pending/processing/completed
├── raw/
│   ├── ep-001-guest-name.md
│   └── ep-002-guest-name.md
└── summaries/
    ├── master.md         # Source overview
    ├── episodes/         # Per-episode summaries
    │   ├── ep-001.md
    │   └── ep-002.md
    └── themes/           # Cross-cutting themes within source
        ├── business.md
        └── ai-coding.md
```

**Key difference**: Sources have config and sync state. Themes emerge FROM the content.

## Operations

| Operation | Description |
|-----------|-------------|
| `capture` | Add raw content to appropriate tree leaf |
| `summarize` | Generate/regenerate branch from children |
| `query` | Navigate tree to answer questions |
| `verify` | Trace claim to source leaf |
| `sync` | Check staleness, regenerate stale branches |
| `ingest` | Process source queue (fetch → raw → summarize) |

## Summarization Triggers

| Trigger | Condition | Action |
|---------|-----------|--------|
| Size | Raw > 500 lines | Generate leaf summary |
| Time | No summary for 3+ days | Generate catch-up |
| Cascade | Child regenerated | Mark parent stale |
| Roll-up | Period complete | Generate period summary |
| Query | Query on stale tree | Sync before answering |
| Ingest | New item added | Summarize item, mark ancestors stale |

## Query Navigation

```
1. Load root (~500 tokens)
2. Identify relevant branches from question
3. Load branch summaries as needed (~3-6k each)
4. Only load raw if exact quote/verification needed
5. Answer with source pointers
```

Most queries: <10k tokens. Without tree: 100k+.

---

*Related: `@content/youtube/tiago-forte/the-official-notion-second-brain-setup` · `@content/youtube/a16z/why-nick-bostrom-thinks-superintelligence-could-end-aging` · `@content/youtube/steph-france/99-percent-founders-missing-ai-agents-2025` · `@content/youtube/nate-herk/karpathy-llm-wiki-obsidian-claude-code-setup` · `@content/youtube/liam-ottley/how-to-build-sell-ai-agents-in-2026-ultimate-beginners-guide`*

---

*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).*