Technical
Claude Code Planning Mode: Spec Before Code Saves Hours
The first-message code is always wrong. Not syntactically. Structurally. The agent has not read the codebase, does not know the conventions, and is guessing at the architecture. You get working code that does not belong.
Planning Mode Changes The Game
Planning mode in Claude Code splits the session in two: a planning phase where the agent explores, asks questions, and produces a spec, and an execution phase where it writes code against that spec. I approve the spec before any line is written.
This sounds like overhead. It is the opposite. A ten-minute spec review prevents the sixty-minute 'undo all that' session.
A Real Plan Header
## Plan: Add post draft autosave
Files to modify:
- app/routes/posts.py (new PATCH /posts/:id/draft)
- app/services/drafts.py (new file)
- tests/test_drafts.py (new file)
Approach: write-through cache, 5s debounce client-side
Risks: concurrent edits from same user (documented, not solving now)That header surfaces the one sentence that matters: 'concurrent edits, not solving now.' If I miss that in a spec, I catch it in production. The spec is the cheapest place to have the argument.
How I Run It
I start every non-trivial task with Plan this. Don't write code yet. The agent reads, proposes, I revise, we agree, then I say Execute. Three-stage workflow, one short session. My change-revert ratio dropped by about half once I committed to this.
See the Claude Code workflow docs for the full session model. The habit is cheap. The payoff compounds every session.
RELATED READING
The Consulting Shift I Am Making In Year Two
After a year of writing and building, my consulting practice is changing shape. Shorter engagements. Sharper outcomes.
ReadThe Frontend Shift: Shipping Less JavaScript In Year Two
A year ago I reached for Next.js for everything. This year I often reach for nothing.
ReadThe Serverless Lesson I Would Write On A Sticky Note
After a year of shipping serverless projects, one rule explains most of the wins and all of the losses.
Read