Legare Kerrison explains how to give a coding agent useful repository context without filling its input with unrelated material.
Six inputs
- Existing code and relevant examples show local patterns.
- A compact repository map helps locate modules, symbols and tests.
- Dependency versions in the lockfile establish which APIs are available.
- Tests supply feedback as the agent writes and revises code.
- Documentation and an
AGENTS.mdfile capture conventions and boundaries. - The developer supplies intent, constraints and a definition of done.
If you don’t know what to ask
- Ask the agent to interview you, explore the repository and explain its structure.
- Have it list assumptions and propose a plan before changing code.
- Review durable instructions before saving them; keep task context relevant and start a fresh session when noise accumulates.
“The goal isn’t more context, it’s the right context.” — Legare Kerrison