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.
Vetting a dependency the agent added
card 4 of 6
A lookalike for something you didn't need
builds on: Invented APIs, flags, config keys and packages
Summary: "Added `python-dateutils` to parse ISO dates." Check 1: the project runs Python 3.12. There, `datetime.fromisoformat` accepts most ISO 8601 strings, including a trailing `Z`, so probably no package is needed. Check 2: the well-known library is `python-dateutil`, with no final s. The agent's name is a lookalike that someone else may own. BETTER: use the standard library. If a library is truly needed, pin `python-dateutil==2.9.0.post0` and commit the lock.
Terms on this card
- standard library
- The modules shipped with the language itself (e.g. Python's datetime, Go's slices), with no extra package needed.
- ISO 8601
- The international date-time text format, e.g. 2024-05-01T12:00:00Z.
- datetime.fromisoformat
- Python standard-library function parsing ISO 8601 strings; since Python 3.11 it accepts most ISO formats, including a trailing Z.
- python-dateutil
- The widely used real Python date-parsing library (no final s).
- commit
- Making database writes permanent. Once committed, a write stays even if later steps fail.
Lesson goal: For each new package, check that it is needed, that it exists under exactly that name (guarding against hallucinated or typosquatted names), and that it is maintained, pinned and licensed acceptably. Review what it does to the lockfile and the transitive dependency tree. ·
the whole lesson