> Markdown twin of https://adna.network/reference/specification/10-context-library/
> Index: https://adna.network/llms.txt · Full corpus: https://adna.network/llms-full.txt
> State is a build-time snapshot generated 2026-08-30 (UTC); nothing here is live.

# 10. Context Library — aDNA Specification

> **Scan**: `what/context/` organization — topic structure, context subtypes (research, guide, core), token budget awareness and the 75% rule.

*Decisions: D8*

## 10.1 Location and Structure

The context library lives in `what/context/`. It is the single location for all agent context — synthesized knowledge that agents load before domain work.

```
what/context/
├── AGENTS.md              # Library protocol, topic index, token budgets
├── {topic}/
│   ├── AGENTS.md          # Topic overview, subtopic index
│   ├── subtopic_a.md
│   └── subtopic_b.md
└── {topic}/
    └── ...
```

## 10.2 Context Subtypes

Context files use the `type` frontmatter field to distinguish content subtypes:

| Subtype | Purpose | Pattern |
|---------|---------|---------|
| `context_research` | Synthesized domain knowledge from external sources | Dense, citational, comprehensive |
| `context_guide` | Prescriptive component or tool guides | Step-by-step, actionable, reference-oriented |
| `context_core` | Foundational project definitions (conventions, guardrails, stack) | Concise, authoritative, rarely changing |

All subtypes coexist in `what/context/` organized by topic. The subtype informs how agents use the content, not where it lives.

## 10.3 Token Budget Awareness

The context library AGENTS.md SHOULD include token estimates per topic in a scannable format:

```markdown
| Topic | ~Tokens | Subtopics |
|-------|---------|-----------|
| ancient_dna | ~8,000 | extraction, sequencing, analysis |
| compute_infra | ~5,000 | gpu_clusters, edge_devices |
```

Agents MUST read the topic index first and load only the subtopics needed for the current task. Loading the entire context library into a single session is wasteful and violates the 75% rule (§8.7).

---
