Get Started
In this section
Back to reference

10. Context Library

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:

SubtypePurposePattern
context_researchSynthesized domain knowledge from external sourcesDense, citational, comprehensive
context_guidePrescriptive component or tool guidesStep-by-step, actionable, reference-oriented
context_coreFoundational 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:

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