| name | explore-codebase |
|---|---|
| description | Explore unfamiliar repositories in Codex by building a quick structural map, identifying execution entry points, and drilling into only the highest-value files. |
| compatibility | Codex CLI with terminal access, git, tokenlean CLI (npm i -g tokenlean) |
Understand architecture quickly with targeted reads.
Map -> Entry points -> Key modules -> Dependencies -> Summary
tl structureIdentify core directories, file counts, and token estimates. Note likely runtime paths (bin/, src/, test/, config files).
tl parallel "tl entry" "tl hotspots"For each important file:
File size → Decision
├─ <150 lines → Just read it
├─ 150-400 lines → tl symbols first, tl snippet for specifics
└─ 400+ lines → tl symbols only, then tl snippet as needed
# Per file, gather context in one call:
tl parallel "symbols=tl symbols <file>" "exports=tl exports <file>"
# Or for entire directories:
tl symbols src/ # All files in a directory (compact one-liner per file)tl parallel \
"deps=tl deps <file>" \
"impact=tl impact <file>" \
"flow=tl flow <function> <file>"Produce:
- What the project does
- Top directories and responsibilities
- Main execution flow
- High-risk or high-churn areas
- Use
tl parallelto gather context on multiple files simultaneously. tl context <dir>shows token cost of a directory — skip reading dirs over 50k tokens directly.- Use commit history (
git log -- <file>) to identify active areas.