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.
Workflow: adding a small feature
card 3 of 6
The feature workflow, start to finish
builds on: Doing a bigger change plan-first, step by step, Tests as the definition of done
1. **Checkpoint:** commit any outstanding work so `git status` is clean. That commit is your start commit.
2. **Specify:** state the goal, give input → output examples including edge cases, and say what must not change.
3. **Plan:** ask for a plan with no edits. Edit it and save it to a file.
4. **Tests first:** turn your examples into tests and watch them fail.
5. **Build in steps:** after each step, run the tests, review that step's diff and commit. More tests pass each time, and all pass at the end.
6. **Try it yourself.**
7. **Review the whole diff** since the start commit.
Terms on this card
- feature
- A new piece of behaviour a program gains, such as a search command, which the user can see and use.
- Edge cases
- Unusual or boundary inputs, such as empty input, no matches or odd capital letters, where a program most often behaves unexpectedly.
- checkpoint
- A git commit made before a task, so you can return to that exact state of your files.
- git status
- Command that shows which files changed since the last commit. 'Clean' means nothing is uncommitted.
- commit
- A saved snapshot of your project's files in git, which you can look at or return to later.
Lesson goal: Add a feature end to end. Specify behaviour with examples and edge cases, get a plan, implement in committed steps with tests, try it yourself, and review the final diff as a whole. ·
the whole lesson