Give the agent the constraints it needs to make a focused change.
1. Project instructions
Maintain concise repository guidance for architecture, commands and conventions. Separate general rules from task-specific requirements so neither becomes a contradictory wall of text.
2. Baseline evidence
Run the relevant existing checks before editing. Record pre-existing failures so a later report can distinguish regressions from unrelated problems.
3. Task boundaries
Describe the target behavior, files likely involved and acceptance criteria. Avoid asking for broad cleanup while performing a narrow migration.
Worked scenario
A baseline lint failure exists in an unrelated module. The final report should preserve that fact instead of claiming the migration caused it.
Apply it
Write a task brief with expected behavior and capture the initial build or test status.
Check your understanding
The agent has a concrete acceptance condition and a known baseline. Explain the decision and show evidence from your implementation or design. If you cannot demonstrate it yet, revisit the relevant section before continuing.