---
name: "codebase-map"
description: "Map a repository into entry points, dependency boundaries and a focused reading plan. Use when the user needs: Get a compact architecture map with file references and unresolved questions."
license: "MIT"
metadata: {"version": "2026-10-17.1", "category": "code-development", "publisher": "AIDiveForge"}
---

# Codebase Map

Get a compact architecture map with file references and unresolved questions.

## Requirements

Requires read access to the repository and a file/text search tool.

## Workflow

1. Read repository instructions and build manifests, then list source files while excluding dependencies, generated files and secrets.
2. Locate runtime entry points and trace their immediate imports, routes or command registrations.
3. Map modules by responsibility and show the direction of dependencies. Mark inferred or dynamic edges.
4. Choose the shortest reading path for the requested change; include file and symbol references rather than dumping source.
5. Validate every named file against the working tree and list concrete uncertainties.

## Worked example

Read `examples/input.txt` and `examples/expected.txt` before adapting the workflow.

## Acceptance checks

Every edge must exist in the supplied imports; do not claim a runtime call graph or identify hot files without evidence.

## Limits

Static imports do not prove runtime behavior. Plugins, reflection and generated routes may need runtime inspection.

Worked example included. Model-specific performance and vendor compatibility have not been benchmarked.
