Write the spec before touching the code
You want Claude to code the right thing on the first pass instead of iterating 5 times. Spec-First Development to set the exact frame before launching Claude, RPI Pattern to enforce the Research → Plan phase before implementation, RPI Commands to install the /rpi/research + /rpi/plan + /rpi/implement trio in .claude/commands/ with one clone.
Why
The agent codes fast. And it codes garbage if you've decided nothing.
Classic scenario: you prompt "add a favorites system", the agent runs for 30 minutes, comes back with 12 files modified, a Supabase table, a custom hook, passing tests. Except the data model doesn't match what exists, the UX breaks onboarding, and you're deciding after the fact. You saved an hour, you'll lose six gluing it back together.
This kit installs the opposite discipline: nothing gets coded until the spec is written. You split Research → Plan → Implement, each phase forks a dedicated sub-agent with fresh context. The spec becomes the artifact you review, not the code. You decide on text, execute on code. That inversion cuts rollbacks by 3x.
Fast code you throw away costs more than slow spec you follow.
When
Framing phase before any non-trivial feature, for a dev/PM/tech-lead who's already eaten a vibe-code-rollback and won't do it again.
✅ You know it's your kit when
- You're starting a cross-cutting feature: touches schema, auth, multiple domains
- You rebase more than you ship: every PR rolls back 2-3 times
- You want to decide before the agent decides for you: data model, API contracts, UX flow
❌ Not for this kit
- 3-line bug fix: don't pull the artillery, go straight via Let AI write the code for you with Claude Code
- You need to understand an existing repo → head to Onboard Claude Code on an existing project with Graphify before speccing
- You're looking for a full team workflow → check BMAD Method for multi-role SDLC (BA, PM, UX, Dev)
Common confusion with Reach Claude Code power-user level: mastering = tooling the runtime. Spec-first = enforcing a step before the runtime.
How
Three phases, three fresh contexts, and a gate in the middle: you. The Constitution feeds each one, but it is the reviewed spec that separates deciding from executing.
The spec's gatekeeper: out of scope. A spec that does not say what you are not building is not finished. As long as that answer is missing, you are still brainstorming: go back there instead of launching Plan. And the scaffold (folder tree, dependencies, commands) is only the first task of the plan, never a prerequisite: no line of code before it. The full order is in Order of an AI project: no scaffold without a spec.
Mental loop: read before writing, write the spec before the code, review the spec before the implementation.
Tools included
- Spec Kit (GitHub)
- RPI Pattern (Research → Plan → Implement)
- RPI Commands (/research · /plan · /implement)