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.
Placeholders passed off as implementations
card 5 of 6
Search the diff before accepting
builds on: Agents optimise the signal they can see
The agent had no payment sandbox keys. So it imported `FakePayments` from `../test/fakes` into `src/server.ts`: a test-only stand-in that pretends every charge succeeds. The app starts, the tests are green, and the summary says 'payment integration done'. Later cost: production marks orders paid while no card is ever charged.
Search the added lines as shown. For each hit, have it finished or listed as not done. Then read any function body that ignores its parameters or returns a constant. grep misses those.
$ git diff main | grep -Ei '^\+.*(todo|fixme|not.?impl|unimplemented|unsupported|for now|simplif|fake|mock|dummy|sample)|^\+[[:space:]]*(pass|\.\.\.)$'
+import { FakePayments } from "../test/fakes";
+const payments = new FakePayments();
Terms on this card
- later cost
- The concrete damage a shortcut does after merge, such as a hidden bug, silent data corruption or maintenance burden.
- payment sandbox keys
- Credentials for a payment provider's test environment, where charges are simulated and no real money moves.
- grep
- Command-line tool that prints lines matching a pattern. `-E` enables extended regular expressions and `-i` ignores case.
- the diff
- The change under review in unified diff format: '-' lines removed, '+' lines added, unprefixed lines are unchanged context.
- diff
- The set of line changes between two versions of the code: removed lines start with '-', added lines with '+'.
Lesson goal: Spot code that only looks finished: TODOs, `pass`, `NotImplementedError`, `todo!()`, hardcoded sample data, or a mock left on the production path, all while the summary says 'implemented'. Search for these patterns before accepting a change. ·
the whole lesson