Repo map
A repo map is a compressed outline of a codebase — its files, key symbols, and how they relate — given to a model so it understands the shape of a project without reading every file. It buys structural awareness at a fraction of the token cost.
The idea is that most of what a model needs to navigate a repository is structural: what exists, what it is called, roughly what it does. Full implementations only matter for the files actually being changed.
So a map lists modules and signatures, and the model asks for full contents where it needs them. It is the difference between reading a table of contents and reading the book.
What this means in practice
Tools build these automatically, but you can help. Clear directory structure and honest file names improve the map's usefulness directly, which is one of the few cases where a codebase-hygiene habit measurably improves AI output.
Prompts for the tools this applies to
Related terms
- Codebase indexing
Codebase indexing is the process an AI editor uses to build a searchable representation of your repository, usually by splitting files into chunks and storing vector embeddings so it can retrieve code by meaning rather than exact text match..
- Context retrieval
Context retrieval is how an AI coding tool decides which parts of your codebase to read for a given request.
- Context engineering
Context engineering is the practice of deciding what information an AI model sees for a given task — which files, which conventions, which prior results — and in what form.