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.
Your first small task, end to end
card 5 of 6
The whole loop in one session
builds on: A safe first project: folder, git, clean state, The shape of a session: task to review, git status and reading a diff
The agent works in one terminal. You run your own checks in another, from the project root. `--short` gives a compact `git status`, one line per changed file. Between `git status` and the commit, run `git diff` and read it. Here it prints the diff from the previous card: only `greet.py`, only what you asked for.
▸ You: In greet.py, add a --shout option
that prints the greeting in capitals.
Without it, output must not change.
⚙ Read: greet.py
⚙ Edit: greet.py
[Approve? yes / no / always] yes
◂ Agent: Added a --shout flag.
$ python greet.py
Hello, world
$ python greet.py --shout
HELLO, WORLD
$ git status --short
M greet.py
$ git commit -am "Add --shout option"
Terms on this card
- git diff
- Shows exactly which lines changed in tracked files since the last commit: `-` for removed lines, `+` for added ones. New, untracked files do not appear in it.
- commit
- A saved snapshot of your project in git that you can return to later.
- project root
- The top-level folder of your project, the one that contains `.git`.
- loop
- Code that repeats a step for each item in a list, e.g. adding up every row of a table.
- terminal
- A text window where you type commands and see their output, instead of clicking buttons.
Lesson goal: Run one tiny, checkable task, such as adding a command-line option to a script. Watch it read files, approve its edit, run the result yourself, inspect `git diff` and commit, which practises the whole loop once. ·
the whole lesson