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.
Recovering from a bad change
card 6 of 6
Remember
builds on: Commit before every task: checkpoints, Undoing with git: discard, reset, revert, Recognising when the agent goes in circles
Find where the bad work lives and undo exactly that. Use `git restore` for bad uncommitted files, `git reset --hard <checkpoint>` for a whole failed attempt, and `git revert` for one bad commit under good ones. Then restart with a sharper prompt that names what went wrong. Don't pile on another fix.
Terms on this card
- commit
- A saved snapshot of all your project's files in git, with a short message and an ID (hash) you can return to.
- checkpoint
- A commit (or tool snapshot) made right before a task, so you can return to that exact known-good state.
- uncommitted
- Changes to files that exist on disk but are not yet saved in any git commit.
- git restore
- Command that throws away uncommitted edits to the named files, putting them back as they were in the last commit.
- git reset --hard
- Command that moves your project back to a given commit, permanently discarding later commits and all uncommitted edits to tracked files.
Lesson goal: Given a broken state, choose the right recovery: discard uncommitted edits, return to the last checkpoint, or revert a specific commit. Then restart with a better prompt instead of piling fixes onto a bad attempt. ·
the whole lesson