generate_repo_map
Build a compact AST symbol map of classes, methods, and functions across a repo to cut LLM context tokens. Use it for a quick high-level codebase index.
Instructions
Generates an ultra-compressed AST symbol token map (classes, methods, functions) tailored for LLM chat prompts and extreme context window savings.
Behavior:
Read-only: Extracts AST signatures without writing or modifying files.
Idempotent: Deterministic symbol catalog for the same codebase state.
100% Offline: Local AST extraction; zero external API calls.
Usage Guidelines:
When to use: Provide the LLM with an immediate high-level index of all classes and functions across the repository in minimal tokens (~5-15 tokens per file).
Sibling Routing: For full function signatures with parameter types and docstrings, use 'get_project_context_tree'. For 1st-degree context around a specific focus file, use 'get_smart_skeleton_context'.
Returns: Compact Markdown symbol map indexed by file path.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| max_tokens | No | Maximum token budget for the repo map (default: 4000). | |
| project_root | No | Root directory of the repository to map (default: current directory). | . |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |