Building a Targeted Map

Drive AI agents through a million lines of code you did not write. Recon, surgical navigation, codemods, characterization tests, and a toolkit of four reusable skills you keep.
I have Anthropic's .codemap and it will probably work. But I want my assets in docs, because that is where Claude does its work, and I added a line to CLAUDE.md telling it so: everything in docs is yours, including the decision log. That log matters. Claude needs to know what we already did without me remembering it for them.
Now, who builds my map?
Not Haiku. I tried this before on another project. Haiku crawled the codebase and produced something genuinely comprehensive, then I had Fable grade it. Fable said this is exactly what Haiku is for, low-thinking work, and then said the risk is that Haiku invents things. It had. Fable caught it. Fable also said the workflow itself was sound: cheap model does the lifting, expensive model verifies. I reran with Fable and got a better map.
So this time I use Sonnet 5 and keep the verify step.
The prompt: this is a very large codebase, build me a map, but not of the whole thing. I only want to know where the Copilot functionality lives, because I am removing it. If you think it touches Copilot, include it. Otherwise leave it out. Keep it brief. Put it in docs, you pick where, keep the directory clean. And you are going to be checked by your big brother Opus, so do a good job.
That last line is not a throwaway. Give Claude a challenge and it steps up. Throw a small barb in and the work gets better. That has been consistent for me.
It immediately reaches for the existing .codemap. No. Ignore it. Do this yourself.
Out comes docs/copilot-map.md: the chat extension, the agent host, the chat UI, the agents window, MCP, agents. Exactly the shape I wanted.
Then I clear, switch to Opus 5, and hand it over. Sonnet built this and I told it not to use the codemap directory. Grade it. Can I use it confidently?
B. Accurate but incomplete.
- Every path exists.
- File counts within margin.
- No hallucinations. That is the one that matters.
- Missing: the extension host API layer, inline completions, the agent plugin.
Which tracks. Thinking models like Opus and Fable go a few steps past what you asked. Sonnet does what you asked.
So: patch the map with the missing sections. The goal is that this map is how you target what gets removed. Then the important instruction: do not use the Explore tool. Ever. As you update this map, write that into CLAUDE.md, and ask me to update the map instead.
That is the key to the whole thing. Explore goes off and greps and seds its way around your project. It works. On a repo this size it burns tokens at a rate that will end your session.
Last cleanup. I delete the .codemap directory. I can regenerate it later, it is overkill for what I need, and two maps will just confuse Claude down the road. If my Copilot map goes stale I will update it.
I also trimmed desert mode down to something honest: this is a massive project, token spend is top of mind, be extremely terse, use emojis, only go long if I ask.
Your turn. Grab VS Code, or any repo big enough to hurt, and build your own map. Try to make it more comprehensive than mine.
The map is an index. Think of a B-tree on a database: divide and conquer to get the record you want, instead of a full scan of every file. Order log N, not order N. I know. I am being a nerd about it. It is still the right mental model.
Drive AI agents through a million lines of code you did not write. Recon, surgical navigation, codemods, characterization tests, and a toolkit of four reusable skills you keep.