The plan-first workflow
Course contents (20 lessons)
- Meet Claude Code
- What Claude Code is and how it differs from a chat window
- Installing Claude Code and signing in
- Your first session: explore, ask, change
- Asking well and staying in control
- Asking for changes: context, goal, constraints and acceptance criteria
- Reading and approving edits
- Permission modes: how much freedom to give
- Project memory and slash commands
- CLAUDE.md: teaching the tool about your project
- Slash commands and custom commands
- Everyday coding workflows
- The plan-first workflow
- Understanding unfamiliar code
- Debugging with Claude Code
- Refactoring safely
- Writing tests with Claude Code
- Git, small changes, cost and security
- Git workflows: branches, commits and pull request descriptions
- Keeping changes small and reviewable
- Context and cost awareness
- Security habits: secrets, commands and untrusted input
- Extending the tool, teamwork and a final project
- Hooks and MCP servers explained
- Team practices for AI-assisted coding
- Final project: building a small app step by step
Why plan first
When the tool starts editing right away, it commits to the first idea that fits. If that idea is wrong, you find out after twelve files have changed. A plan is cheap to read and cheap to change. A wrong implementation is expensive to review and expensive to undo. So for anything bigger than a small fix, I ask for a plan first.
The four-step loop
- Explore. Let the tool read the relevant code and report back. No edits.
- Plan. Ask for a written plan. Read it, challenge it, correct it.
- Implement. Ask it to carry out the plan, in steps if the work is large.
- Verify. Run tests, read the diff, try the behaviour yourself.
Step 1: explore
I want to add email notifications when an invoice becomes overdue. Before we plan, find: where invoice status changes, how emails are sent today, and whether any background job system exists. Summarise with file paths. Do not edit anything.
Notice that this does not ask for the design. It asks for facts about the current code. Good plans come from good facts.
Step 2: plan
Based on that, propose a plan to send an overdue email once per invoice. Include:
1. The approach and why you prefer it over the main alternative.
2. The files you will change or add.
3. How we avoid sending the email twice.
4. The tests you will write.
5. Risks or open questions.
Keep it under 30 lines. Do not edit any files yet.
Why it works
The numbered list forces the plan to cover the parts that people forget: duplicates, tests, risks. "The main alternative" makes the tool show a choice, so that you can pick. The line limit stops it from writing an essay. When I read the plan, I look for wrong assumptions about my system, and I usually find one.
Now respond to the plan like a reviewer:
Changes to the plan: use the existing background job runner, not a new timer. Store a sent flag on the invoice rather than a new table. Skip draft invoices. Update the plan and then wait.
Step 3: implement in steps
Implement step 1 of the plan only: the sent flag and the migration. Stop after that and show me the diff. Do not start step 2.
Working in small steps means each diff is short, each review is quick, and a wrong turn costs one step, not the whole feature. You can commit after each step.
Step 4: verify
Run the tests for the invoices module and the full suite. Then list what is not covered by tests that I should check by hand.
The second sentence is a trick I like. It asks the tool to name its own weak spots. Sometimes it points at real gaps.
Save the plan
For work that lasts more than one session, ask the tool to write the plan into a file in the repository, for example a short markdown file in a docs or notes folder. A plan in a file survives /clear, can be edited by you and can be reviewed by teammates. Start the next session with "Read the plan file and continue with step 3."
When you can skip planning
- Typos, renames and one-line fixes.
- A change you could describe in one sentence with no choices.
- Throwaway experiments in a scratch branch.
If you could write the diff yourself in two minutes, just ask for it.
When the plan goes wrong
If during implementation the tool finds that the plan does not fit, tell it to stop and report rather than improvise: "If any step does not work as planned, stop and tell me before changing the approach." Silent changes of direction are how a three-file task becomes a fifteen-file one.
The common mistake
The common mistake is accepting the plan without reading it because it looks organised. A neat plan can still rest on a false assumption, for example that your project has a job runner when it does not. Read the plan as if a colleague had written it, and ask about anything you do not understand.
Try it yourself
Pick a feature that touches at least three files. Run the four-step loop. Time yourself: how long did the exploring and planning take, and how long did review take? Then ask yourself whether the plan changed in a way that avoided a mistake. If yes, you have just seen why this is worth doing.
This course is free to read. Create a free account to enrol, save your progress and pick up where you left off.
Sign up free I already have an account