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.
Asking for a plan before any edits
card 5 of 6
Catching two mistakes in the plan
builds on: Describing a task: goal, context, constraints, check
Read the plan line by line. **Step 2** changes `load_rows()`, a shared function, and other reports use it too. The **assumption** is also wrong: you wanted only the filtered rows.
▸ You: Export only the filtered rows. Don't change `load_rows()`, other reports use it. Otherwise, go ahead.
Two misunderstandings are fixed, and no code has been written yet. Only after this does the agent start editing.
Terms on this card
- shared function
- A piece of code used by several parts of a project, so changing it can affect places you didn't intend to touch.
- function
- A named, reusable block of code that does one job, such as `load_rows()`. The parentheses mark it as something you call.
- assumption
- Something the agent decided on its own because your prompt didn't say it, such as 'all rows' versus 'only the filtered rows'.
- filtered rows
- The rows still shown on screen after the user narrows a table down, for example to one month or one region, as opposed to all rows in the data.
- 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.
Lesson goal: Ask the agent to explore and propose a plan without changing files, using a plan or read-only mode or a plain instruction. Explain why this reveals misunderstandings before they become code. ·
the whole lesson