Lesson 10.05 · Phase 10 · Coding & Computer-Use Agents
Repository maps & context
A coding agent can't read the whole repo, and it can't search for what it doesn't know exists. A repository map fixes both: signatures, not bodies, of the files that matter most for this task, in a few hundred tokens. Build it by parsing the code, linking "uses" to "defines", ranking with PageRank biased toward the task's words, and stopping at a token budget.
Learning objectives
- Extract definitions (with signatures) and references from Python files with ast.
- Build a "uses → defines" graph and rank files with personalised PageRank.
- Render a map that fits a token budget, with the most relevant files first.
- Explain where word-overlap personalisation fails, and what real tools do instead.
"Fix the discount being applied after tax." The agent searches for discount, finds applydiscount in pricing.py, edits it, and the bug remains. The bug is in the order of calls in checkout.py, which never mentions the word "discount" in a way the agent searched for. Or the agent reads 40 files one by one to get oriented, using a third of its context before it writes a line.
Loading the full lesson…