The instinct to resist
“Just let it read everything, then it will understand the project.”
This is wrong on three separate counts, and you already know all three.
Cost. Every file is input tokens, resent with every message (Lesson 1.5).
Speed. More to read is slower.
Quality. This is the one people miss. From Lesson 1.2: a huge context makes the model
worse at finding what matters, not better. Bury the important file among forty others and
it gets less attention, not more.
The skill is not giving it everything. It is giving it the right things.
How to pick
For most tasks, the agent needs:
- The file it is changing.
- The file that calls it, or is called by it.
- An example of the pattern you want followed.
- The tests for the thing being changed.
That is usually three or four files. Rarely more.
Say it directly
Read src/schedule.ts and tests/schedule.test.ts.
Add support for a fourth answer, "very easy", which multiplies the gap by 4.
Follow the same shape as the existing answers.
Do not read or change anything else.
That last line is doing real work. It keeps the context small and prevents changes wandering
into files you were not thinking about.
When you genuinely do not know which files
Then make finding them the first task, on its own:
Where is the code that decides which cards are due? Just tell me the file
and line. Do not change anything.
Now you know, and you can start a focused session with the right files. Two small sessions
beat one large confused one.
The example trick
If you want new code to match existing code, the fastest instruction is not a description.
It is a pointer:
Add a page at /stats showing the number of cards and how many are due today.
Follow the same structure as src/routes/cards.ts.
One reference does more than a paragraph about conventions. Lesson 2.4 again: show, do not
tell.
Try this before the next lesson
- Take your last request. Which files did the agent actually need? Which did it read?
- Do a task with “do not read or change anything else”. Notice the difference in speed.
- Ask a “just tell me where, do not change anything” question. How fast was it?