Codebase intelligence — generates structured navigation maps with file:line references so agents stop re-scanning the same files every session. Use when exploring code, answering "where is X?", or onboarding to a new codebase. Use when this capability is needed.
Maintain a structured map of the codebase with exact file:line references. One scan, permanent knowledge. Saves 80-95% of tokens on code exploration.
atris/MAP.md as the single navigation index.Before searching for anything in the codebase:
atris/MAP.mdrg, then add the result to MAP.mdThe map gets smarter every time you use it. Never let a discovery go unrecorded.
If atris/MAP.md doesn't exist, generate it:
atris/ folder in the project rootatris/MAP.mdIf atris/MAP.md already exists, use it. Regenerate only if the user requests it or the map is clearly stale (references missing files, line numbers way off).
Skip: node_modules, .git, dist, build, vendor, __pycache__, .venv, .env*, *.key, *.pem, credentials*, secrets*
Use ripgrep to extract structure:
# Key definitions
rg "^(export|function|class|const|def |async def |router\.|app\.|@app\.)" --line-number -g "!node_modules" -g "!.git" -g "!dist" -g "!.env*"
# Route definitions
rg "(get|post|put|delete|patch)\s*\(" --line-number -g "*.ts" -g "*.js" -g "*.py"
# Entry points
rg "listen|createServer|app\.start|if __name__" --line-number
# MAP.md — [Project Name] Navigation Guide
> Generated by Atris | Last updated: YYYY-MM-DD
## Quick Reference
rg "functionName" path/to/file.ext # Description (line N)
rg "className" path/to/file.ext # Description (line N)
Extract the top 15-25 most important symbols: entry points, exports, route handlers, main classes, config loaders.
Group code by what it does. Every reference includes exact file path and line numbers.
### Feature: User Authentication
**Purpose:** Login, registration, token management
- **Entry:** `src/auth/login.ts:45-89` (handleLogin)
- **Validation:** `src/auth/validate.ts:12-67` (validateToken)
- **Model:** `src/models/user.ts:8-34` (User schema)
- **Routes:** `src/routes/auth.ts:5-28` (POST /login, POST /register)
Group by cross-cutting patterns (error handling, logging, auth middleware, etc).
Flag high-impact files with why they matter and key functions with line numbers.
How execution flows — dev server startup, request lifecycle, build pipeline.
Update MAP.md surgically when the codebase changes:
Small updates, not full regeneration. The map evolves with the code.
Converted and distributed by TomeVault Context snippets also available to append to your CLAUDE.md, GEMINI.md, and copilot-instructions.md — download at TomeVault