# Repository Map

> A short outline of a codebase. It lists the files and main names for AI tools.

**Field:** Software Development  
**Category:** Code Intelligence  
**Also known as:** Repo Map, Codebase Map, Codebase Summary

## Think of it like

It is like the map at a mall door. It shows every shop, but not what is on each shelf.

## Definition

A repository map is a short outline of a whole codebase. It lists the files and, in each, the names of the main classes and functions with their signatures. It leaves out the code inside them. That keeps it small enough to hand to an AI model. The model reads the map first, then asks for the few files it needs.

## Example

An AI coding tool sends a 1,000-line repository map for a 200,000-line project. The model spots the two files it needs and asks for them.

## Example code

```text
billing.py:
  class Invoice
    def total(self) -> float
  def send_invoice(invoice, email)
users.py:
  class User
    def check_password(self, text) -> bool
```

A small part of a map: file names, class names and function lines, no bodies.

## Why it matters

An AI model can only read so much at once. A map lets it see the whole shape without reading every line.

## Common mistake

Putting every function in the map. A huge map fills the space it was meant to save, so keep the most used names.

## Three principles

- **Outline only.** Names and signatures, no bodies.
- **Fits the window.** Small enough for a model to read.
- **Then zoom in.** Ask for the files you need.

## Related terms

- [Code Index](https://learn.benibix.com/term/development/code-index)
- [Symbol (Programming)](https://learn.benibix.com/term/development/code-symbol)
- [Semantic Code Search](https://learn.benibix.com/term/development/semantic-code-search)
- [Context Window](https://learn.benibix.com/term/ai/context-window)
- [AI Coding Assistant](https://learn.benibix.com/term/ai/ai-coding-assistant)

![A pipeline from left to right. Source files go into a parser, which builds a syntax tree for each file. From the trees, the symbols are pulled out: functions, classes and variables, each with its file and line. They are stored in a code index, lit up. Four users read from the index: go to definition, find all references, code search and an AI agent.](https://learn.benibix.com/diagrams/dev4-code-intel.svg)

---

Source: https://learn.benibix.com/term/development/repository-map
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-17
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
