Build a small context pack instead of pasting the whole repository
Give the agent the files, constraints and examples that define this change, then let it retrieve more when needed.

A long prompt can look thorough while hiding the few facts that matter. If the agent receives old requirements, unrelated logs and several competing implementations, it may spend its effort reconciling noise.
For a bounded coding task, I would start with a small context pack. Its purpose is to make the change legible: what should happen, where the relevant behaviour lives and what must remain true.
Put five things in the pack
Include the desired user outcome, the likely entry points, one representative example, the constraints and the checks that define completion. Link to actual files rather than copying large sections that can go stale.
For a CSV export change, that might mean the export handler, the shared date formatter, a sample input row, the required column order and a test covering the output. Add a constraint such as “preserve the existing download endpoint”.
Separate durable repository conventions from task-specific instructions. The project’s normal build and test commands belong in a maintained repository guide. The exact export columns belong in the task brief.
Let the agent request context with a reason
Do not forbid exploration. Ask the agent to inspect the relevant files and explain when another dependency matters. A short context pack should be a useful starting point, not an artificial blindfold.
If the implementation crosses a shared component or data contract, the agent needs that context too. Conversely, a folder full of archived design notes should not automatically enter every request.
Anthropic’s context-engineering guidance treats context as a limited resource that needs active selection. That supports this practical habit: keep the working brief focused and retrieve supporting detail as the task develops. Read the guidance.
Measure the result, not prompt length
Try the same kind of small task with your usual brief and with a context pack. Compare clarification rounds, unrelated file changes, missed constraints and review effort. A shorter prompt that omits a critical dependency is worse than a longer useful one.
Before accepting the result, check whether the agent used the current code and requirements. Generated notes can become stale just like human documentation. Record the relevant revision when you save a reusable task example.
The aim is enough context for a good decision, with a clear route to more. This makes the brief easier for both the agent and the human reviewer to understand.







