Yeda AI Tips · #187

Español

Index Your Docs, Don't Dump Them

Dozens of docs, one index, zero context bloat.

When you give a coding agent a library of methodology docs — testing conventions, release checklists, architecture rules, incident playbooks — the naive move is to load all of them into context on every task. That's the fastest way to blow your context budget and drown the one file that actually matters under fifty that don't. An index fixes this: the agent reads a tiny map, finds the right doc, and loads only that one.

Why dumping everything backfires

Every token of loaded context competes for the model's attention. Pack in eighty documents and three things happen at once:

The doc you needed was in there. It just couldn't be heard over the other seventy-nine.

The mechanism: a task-to-doc index

Build one lightweight index file that maps a task to the doc that covers it. It's a table of contents, not the content. The agent reads the index first, matches the task at hand, then loads the single file it points to.

# Methodology index
Read this first. Load only the doc your task needs.

| When you are...              | Load                          |
|------------------------------|-------------------------------|
| Writing or fixing tests      | testing/conventions.md        |
| Cutting a release            | release/checklist.md          |
| Adding a database migration  | data/migrations.md            |
| Handling a production incident| ops/incident-playbook.md     |
| Reviewing a pull request     | review/pr-standards.md        |

The index stays small enough to keep resident. Each linked doc stays a single hop away. This is the same principle as progressive disclosure in agent skills: expose a short entry point, defer the detail until it's asked for.

Conditional loading in practice

ApproachContext costSignalMaintenance
Dump all docs every taskHigh and fixedDilutedEasy but wasteful
Index + conditional loadLow, scales with needFocusedOne index to keep current
No docs, hope for the bestZeroNoneUndocumented drift

Conditional loading keeps the working context lean while every methodology stays reachable the moment a task calls for it. You pay for what you use, not for what you might.

Power moves

Resources

Shipping AI or cloud systems? Yeda AI audits and hardens production LLM and agent pipelines. Talk to us · Read the blog