Context is a selection problem
A repository can contain thousands of files, but most coding tasks begin with a small, relevant set: the open file, an error, a related symbol, a Git diff, or a specific directory. Sending everything creates noise and can exceed the model’s useful context budget.
Start with the smallest context that can answer the question, then let the agent search or read additional files when the evidence requires it.
Use Git to explain what changed
A Git diff is one of the highest-value context sources available. It shows the actual change, the nearby implementation, and the review question. Ask an agent to summarize a diff, identify a likely regression, or suggest tests before asking it to produce more code.
This works especially well in Truss because Git status and diff views live beside the agent workflow rather than as an afterthought.
Plan before you edit
A read-only plan forces the agent to inspect the codebase and explain its intended steps. It gives you a chance to correct an assumption before a file changes, which is faster than undoing an agent that solved the wrong problem.
Use Plan for cross-file features, unfamiliar repositories, migrations, and bugs where the first challenge is understanding the system rather than typing code.
Keep the request testable
Good prompts identify the outcome, constraints, and validation method. Instead of ‘fix the auth flow,’ name the failing route, expected behavior, relevant error, and test command. The agent gets better guidance, and you get a clearer definition of done.
After a change, inspect the diff and run the project’s tests. Context improves the first draft; verification is what makes the change reliable.
Next steps
Put it to work in your own workspace.
Pick the surface that fits your day, then connect a model you control.
FAQ
Questions developers ask before switching.
Should I paste an entire repository into an AI coding assistant?
Usually no. Start with focused context and let the agent inspect relevant files through read-only workspace tools.
Why use Plan mode before Agent mode?
It lets you validate the agent’s understanding and proposed approach before granting editing or command execution capabilities.