Go from never having used a coding agent to working productively and safely with one. The learner should understand what an agent is and how it differs from a chat assistant. They should choose a tool, set up a protected first project, describe tasks the agent can do well, and follow and verify its work. They should recover from bad changes, manage context, and plan bigger changes. They should also use tests as the definition of done and run everyday workflows (bug fixes, features, writing tests, codebase exploration, scripts, small tools, refactors). Throughout, they should keep secrets and systems safe and keep their own understanding growing instead of outsourcing it.
Reviewing the diff the agent made
card 4 of 6
The invoice change, checked
builds on: git status and reading a diff, Reading the agent's summary skeptically
`git status` lists `billing.py` and `utils.py`, but the summary only mentioned `calc_total`. The diff on the next card shows two problems:
- In `utils.py`, a whole function, `format_date`, was deleted. Nothing in your request touched dates.
- In `billing.py`, `round(total)` rounds to a whole number, so 19.99 becomes 20.
You type:
▸ You: Restore `format_date` in utils.py. Only change `calc_total`, rounding to 2 decimals.
Then you read the new diff again.
Terms on this card
- diff
- A listing of exactly which lines were removed (-) and added (+) between two versions of files.
- git status
- Command that lists which files have changed since your last commit, which files are new (untracked) and which changes are staged.
- function
- A named, reusable block of code, like `calc_total` or `format_date`.
- round(total)
- Python call that rounds to a whole number. `round(total, 2)` keeps two decimal places.
- summary
- The message the agent writes at the end saying what it did. It is the agent's own claim, not a check.
Lesson goal: Read the full diff of a change with `git diff` or an editor view. Check that every changed file belongs to the task, that nothing unrelated was deleted, and that the logic matches what was asked. ·
the whole lesson