Give a bounded task
Name the user outcome, relevant files, constraints, and acceptance checks. Ask for the smallest coherent change rather than an open-ended rebuild.
Request evidence
Have the tool run tests, formatters, and a focused demonstration. A plausible diff is not proof that the feature works.
Review risky boundaries
Inspect secrets, authentication, money, destructive file operations, database migrations, and external calls carefully. Add explicit confirmation or dry-run behavior where appropriate.
Keep changes reversible
Use small commits, preserve existing interfaces, and avoid mixing unrelated cleanup with the feature. Reversibility makes experimentation inexpensive.
Working example
# Example task brief for an AI coding agent
TASK = {
"outcome": "Reject duplicate customer emails during CSV import",
"scope": ["src/importer.py", "tests/test_importer.py"],
"constraints": [
"preserve the existing public function signature",
"do not discard invalid rows silently",
"return row numbers for every duplicate",
],
"verification": [
"existing tests pass",
"new duplicate-email tests pass",
"sample import produces the documented report",
],
}