Work effectively with AI coding agents. Understand them as language models running in a tool loop with limited context, which is why they guess, game the visible signal and report confidently. Recognise the shortcut and correctness tells in their code across Python, TypeScript/JavaScript, Rust, Java and Go, and know the damage each one does later. Verify changes instead of trusting them, review diffs fast for quality and security, judge when work is truly finished, and choose, design and steer tasks so agents can finish them well.
Rule out shortcuts explicitly
card 6 of 6
Say it first, then check it
builds on: Making a failing test pass by weakening it
Before the work, state the rules: tests untouched, no new dependencies, no suppressions, and stop and report when blocked. After the work, check the diff against each rule, because a stated rule is a request, not a guarantee.
Terms on this card
- the diff
- The change under review in unified diff format: '-' lines removed, '+' lines added, unprefixed lines are context, and a header line names the file.
- diff
- The set of line changes between two versions of the code: removed lines start with '-', added lines with '+'.
- suppressions
- Markers that tell the compiler, type checker or linter to stop reporting a problem on some code, without fixing the problem.
Lesson goal: State the rules up front: do not modify or skip tests, add no new dependencies or suppressions, and stop and report when blocked instead of working around the problem. Then check the diff for compliance, because stated rules can still be broken. ·
the whole lesson