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 2 of 6
Undo the bad work, not just the symptom
builds on: Commit before every task: checkpoints, Undoing with git: discard, reset, revert, Recognising when the agent goes in circles
The bad idea now lives in two places: the files, and the agent's conversation. More fixes build on both. Thanks to the checkpoint, going back only costs the minutes already spent.
Two questions pick the undo. Is the bad work **committed** yet? Is **good work mixed in with it or sitting on top of it**? Undo exactly the bad part. Then restart using what the failure taught you.
Terms on this card
- checkpoint
- A commit (or tool snapshot) made right before a task, so you can return to that exact known-good state.
- agent
- An AI tool that doesn't just chat. It reads your project's files, edits them and runs commands to carry out a task you give it.
- build
- To generate a project's runnable output, for example the files in `dist/`, from its source code. Building again overwrites the old output.
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