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: building a small tool from scratch
card 4 of 6
A first prompt that pins the tool down
builds on: Doing a bigger change plan-first, step by step, Unknown and invented packages, Project instruction files: purpose and contents
The input and output are exact, so you can check the result by running one command. The stack is limited and the scope is the skeleton only.
▸ You: Empty git repo. Build a command-line
tool `expsum` that sums a bank CSV by
category.
Input `sample.csv`:
date,amount,category
2024-03-01,12.50,food
2024-03-02,40.00,travel
2024-03-05,7.50,food
`python expsum.py sample.csv` prints:
food 20.00
travel 40.00
Use Python's standard library only. Plan
first: just a runnable skeleton and one
test. No other features yet.
Terms on this card
- stack
- The set of languages, frameworks and packages a project is built with.
- skeleton
- The smallest version of a program that already runs end to end on one example. Everything else gets added later.
- command
- A line of text that tells the computer to run a program, typed in a terminal, for example `python src/cart.py`.
- output
- The text a command or program prints when it runs, including results and error messages.
- prompt
- The message you type to the agent to give it a task or instruction.
Lesson goal: Start a new tool in an empty git folder. Describe what it does with example inputs and outputs, ask for the simplest stack with few, checked dependencies, and get a runnable skeleton first. Add an instruction file with run and test commands, then grow the tool in planned, committed steps. ·
the whole lesson