The CodeMySpec Method.
Generating code is the easy part. Shipping is the loop.
AI can write code. Shipping working software takes stories, architecture, BDD specs, verified implementations, and QA. Six phases, every artifact verified by the next, problems routed back to the right level. Here's the full loop.
By John Davenport · the engineer who built CodeMySpec with CodeMySpec
01 the loop
Six phases. Every artifact verified.
Stories define what done looks like. Each subsequent phase verifies its predecessor. When verification fails, the issue routes back to the level that owns it — story, design, or code. The forward path is solid. The feedback edges are dashed. That's the whole methodology in one diagram.
02 the problem
Code generation isn't software.
Most AI coding tools stop at code generation. You get output that looks right, passes a vibe check, and falls apart in production.
No Verification
Generated code compiles and maybe passes a few tests. But does it actually do what the user asked for? Nobody checks.
No Traceability
Requirements live in a chat thread. Architecture lives in the AI's head. When something breaks, there's no trail back to intent.
No Feedback Loop
When QA finds a bug, where does it go? Back into the same chat? A new prompt? There's no structured path from 'this is broken' to 'this is fixed.'
03 the solution
The full loop.
Code generation is one step in a six-step process. Every step produces artifacts that the next step verifies against. Nothing ships without passing through the full loop.
- Stories define what 'done' looks like — with testable acceptance criteria
- BDD specs turn acceptance criteria into executable Gherkin scenarios
- Component specs and tests verify the implementation per bounded context
- Application QA verifies features work end-to-end in the running app
- Problems at any gate route back to the right level — story, design, or code
04 the six phases
Each phase is a real artifact.
Stories
Define what 'done' looks like
The Stories MCP Server interviews you about requirements, generates stories with acceptance criteria, and tracks them through the development lifecycle. Stories link to bounded contexts and BDD specs automatically.
Architecture
Define bounded contexts and dependencies
The Architect MCP Server designs bounded contexts, validates dependencies, and catches circular references before implementation begins. Component spec stubs are generated for each context.
BDD Specs
Turn acceptance criteria into executable scenarios
AI generates one Gherkin scenario per acceptance criterion. These scenarios run against the actual application after implementation — they're the contract between stories and working software.
Implementation
Specs → tests → code → green, per bounded context
Session orchestrators handle the full spec → test → code → green loop. Component specs are generated from the context design, tests are written from specs, and implementation iterates until all tests pass.
BDD Verification
Run BDD specs against the app — does it actually work?
BDD specs execute against the live application. Failures generate structured issues with reproduction steps, categorized by root cause: spec problem, design problem, or implementation bug. The feedback loop routes issues back to the right phase.
Application QA
Browser automation, screenshots, and end-to-end verification
The QA agent tests each story against the running application using browser automation. It clicks through flows, takes screenshots, and files structured issues for failures. Features ship when QA passes.
05 the proof
Built with the loop. Shipped with the loop.
I built CodeMySpec using this method. Every feature went through the full loop.
- Stories with acceptance criteria drive every feature
- Architecture review catches design problems before implementation
- BDD specs verify features do what users asked for
- Unit tests verify implementations match their specs
- Application QA catches what automated tests miss
- The feedback loop routes problems to the right level
Every feature traces from story → BDD spec → implementation → QA. The loop is the methodology.
06 start the loop
Run the loop on your codebase.
Phoenix-native today, ~30 minutes to set up. Install the plugin, run the story interview, and you're in phase 01.
/plugin marketplace add Code-My-Spec/plugins/plugin install codemyspec@codemyspec
07 faq
Questions we get.
08 ready
Now run the loop on your codebase.
~30 minutes to set up. One Claude Code plugin install. BYO model, BYO keys.
Comparing approaches first? Read the neutral guide to spec-driven development covering the whole tool landscape.