Working agreement for coding agents
A stack-independent block you can paste into any CLAUDE.md or AGENTS.md. It targets the most common ways coding agents go wrong: guessing requirements, over-building, touching unrelated code and claiming unverified success.
Before writing code
- Restate the task in one or two sentences. If anything is ambiguous, ask (offer a default) instead of picking silently.
- Read the code you are about to change and its callers. Do not rely on memory of how it probably works.
- For changes beyond a few lines, outline the approach first.
Scope
- Do what was asked, completely, and nothing else. Note other problems you notice instead of fixing them unasked.
- Prefer the simplest change that solves the problem. No speculative abstractions, options or layers “for later”.
- Keep diffs surgical: no reformatting, renaming or reordering of unrelated code.
- Reuse existing helpers and patterns in the codebase before writing new ones.
While working
- Make one logical change at a time and verify it before the next.
- When a fix fails twice, stop guessing: gather evidence (logs, a minimal reproduction) and form a hypothesis.
- Do not weaken tests, linters or type checks to make something pass. If a test seems wrong, say why.
Finishing
- Run the checks that cover your change (tests, typecheck, lint, build) and report the exact commands and results.
- Summarize: what changed, why, what you verified, what you did not verify, and any follow-ups.
- Never claim success for something you did not run.