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.
Branches for risky or alternative attempts card 1 of 6

Trying a risky change without risking main

builds on: Branches as parallel lines of work, Commit before every task: checkpoints
Your weekly report script takes a minute to run. You want the agent to speed it up, and you see two ways to do it: cache results between runs, or read the input file once instead of many times. Either one could break things or spread across files. If the agent works on `main`, half-finished attempts end up in the history you rely on. How do you try both and keep only the winner?
Terms on this card
`main`
The usual name of a project's primary branch: the line of work you treat as the good, current version.
history
The chain of commits on a branch, from oldest to newest, showing how the project changed.
script
A small program, usually one file, that you run to do a task, like `report.py`.
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.
Learn this step by step on Bytewise
Lesson goal: Put a risky change or a second approach on its own branch so main stays clean. Compare the two attempts and merge or delete the branch. · the whole lesson