Codebase Exploration Protocol
Navigate codebase structure and AST symbols efficiently using indexed BaseMem queries.
Workflow
| Step | Tool | Input | Purpose |
|---|---|---|---|
| 1 | code_find |
query="symbol", grep=True |
Return matching filenames and line numbers (~0 tokens) |
| 2 | code_explore |
query="symbol" |
Discover callers, callees, and declaration signature |
| 3 | code_read |
path, offset, limit (max 50 lines) |
Read exact snippet containing the implementation |
Rules
- Token Efficiency: Always prefer
code_findandcode_exploreover whole-file reads. - Auto-Indexing: BaseMem auto-indexes on first use. If results are empty, call
code_init(repo_path="...").