How I Apply Spec-Driven AI Coding
LLMs code better when they focus on a single task at hand instead of trying to solve multiple issues on your codebase at once. Carl Rannaberg recently introduced a plan-based AI coding workflow in his article, "My current AI coding workflow", where LLMs first use a planner phase to create a task plan for the new feature you are developing, and then an executor phase goes through the plan to generate code task by task. I used the method for a while and liked it a lot.
Now, there is a new kid on the block, Kiro.dev from AWS, that goes even further by allowing the planner mode to first create the requirements spec, then the design, and only after that, the tasks list. As I'm still on Kiro's waitlist, I applied the methodology as a unified workflow for all the coding assistants at my disposal: Cursor, Claude, and Gemini.
I've put the framework up on GitHub as https://github.com/andreskull/spec-driven-ai-coding
What is Spec-Driven AI Coding?¶
At its core, my framework adapts the Kiro methodology, splitting development into two distinct phases:
-
The Planning Phase (The Architect): Instead of just a simple to-do list, this is a comprehensive, three-step process. The AI assistant first helps create a
requirements.md
file to define what needs to be built. Once approved, it generates adesign.md
to outline how to build it, including components and data models. Only then does it produce atasks.md
file with a step-by-step implementation plan. -
The Execution Phase (The Engineer): The AI switches to a pure execution role, methodically working through the
tasks.md
file to implement the feature according to the approved plan.
Why I Built This Framework¶
My motivation for creating this was born out of a few practical needs:
-
I'm still on the Kiro waitlist. I was inspired by the power of their methodology and wanted to start using a similar structured approach in my own projects right away, rather than waiting for access.
-
It's more robust than simple task-planning. While plan-based workflows are a great first step, the real magic happens when the AI is forced to first document the requirements and the technical design. These specification files act as a persistent "memory," ensuring the AI has a deep understanding of the feature's goals and architecture before writing a single line of code.
-
I need a tool-agnostic workflow. I frequently switch between Cursor, Claude, and Gemini, depending on the task at hand. When one model gets stuck or hits a limitation, I need to be able to switch to another without disrupting my entire development process. This framework provides a consistent, spec-driven workflow that runs on top of any coding assistant, giving me the ultimate flexibility.
I'm currently using this exact methodology to build Finfluencers.trade. It provides the structure needed to manage the complexity of the project while allowing for rapid, AI-assisted development. It ensures that as the platform grows, the codebase remains coherent, well-documented, and easy to maintain.
I believe a structured approach like this is key to successfully building complex applications with AI. I’ve shared the workflow on GitHub. If this resonates with you, I'd encourage you to check out the project on GitHub.