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 3 of 6
Checklist before you keep a change
builds on: git status and reading a diff, Reading the agent's summary skeptically
1. `git status`: list every changed file. Each one must belong to the task. New files show as *untracked* and do **not** appear in `git diff`, so open them directly.
2. `git diff --stat`: lines changed per file. A big number on a small task is a warning.
3. `git diff` or your editor's diff view: is each `-` line meant to go? Does each `+` line do what you asked?
If `git status` shows changes as *staged*, plain `git diff` hides them. Add `HEAD` (your last commit) to compare against it: `git diff HEAD` and `git diff HEAD --stat`.
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.
- git diff
- Command that shows line-by-line changes in files git already tracks that you have not yet staged.
- git diff --stat
- Summary view of git diff: one line per file showing how many lines changed, with + and - marks for added and removed.
- git diff HEAD
- Shows all changes since your last commit, including ones already staged with `git add`.
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