/update-codemaps Command
Analyze the codebase structure and generate token-lean architecture documentation.Process
- Scan Project Structure - Identify project type, source dirs, entry points
- Generate Codemaps - Create/update architecture docs
- Diff Detection - Compare with previous codemaps
- Add Metadata - Freshness headers
- Save Analysis Report - Codemap diff summary
Generated Codemaps
Created indocs/CODEMAPS/ (or .reports/codemaps/):
| File | Contents |
|---|---|
architecture.md | High-level system diagram, service boundaries, data flow |
backend.md | API routes, middleware chain, service → repository mapping |
frontend.md | Page tree, component hierarchy, state management flow |
data.md | Database tables, relationships, migration history |
dependencies.md | External services, third-party integrations |
Command Syntax
Codemap Format
Token-lean - optimized for AI context consumption:Metadata Header
Tips
- Focus on high-level structure, not implementation details
- Prefer file paths and function signatures over full code blocks
- Keep each codemap under 1000 tokens
- Use ASCII diagrams for data flow
- Run after major feature additions or refactoring
Related
- Commands:
/update-docs