AI coding assistants can write a feature in minutes. They can also produce a large diff that looks right and isn't. The difference is mostly in how you work with them.
1. Start with a plan, not code
Ask the assistant to read the relevant files and propose a plan before writing anything: which files change, what the data flow is, what could break. Correct the plan — it's much cheaper than correcting code.
2. Give it the context a new colleague would need
- The goal and the constraints ("no new dependencies", "keep the public API").
- Where similar code already lives, so it follows existing patterns.
- How to run the tests and the linter.
Many tools let you keep this in a project file (for example a README section or an instructions file the assistant reads automatically).
3. Work in small, reviewable steps
One change, one check, one commit. Small diffs are easy to read; a 900-line diff gets skimmed and approved by hope.
git switch -c feature/newsletter-form
# ask for step 1, review the diff
npm test && git commit -am "Add newsletter form component"
# ask for step 2 ...4. Make tests the referee
Ask the assistant to write or update tests first, see them fail, then implement until they pass. Tests turn "looks right" into "is right" — for you and for the assistant, which can run them and fix its own mistakes.
5. Review like it's a teammate's pull request
Check especially:
- Security: user input reaching SQL, HTML or shell commands; secrets in code.
- Edge cases: empty lists, missing fields, time zones.
- Invented APIs: functions or options that don't exist in the library version you use.
- Scope creep: unrelated files changed "while it was there".
6. Know when to take the keyboard back
If the assistant goes in circles on the same bug, stop. Reproduce it yourself, narrow it down, then hand back a precise description. Two minutes of your diagnosis often saves twenty of its guessing.
Takeaways
- Plan → small step → test → commit, repeated.
- Context and tests matter more than clever prompts.
- You own the code that ships: review it like you wrote it.