Tools & Workflow

Spec-to-Code: The AI-Powered Build Pipeline

Learn how to feed spec packages effectively into Bolt.new, Claude Code with SDD, Cursor, and v0.dev for maximum quality output.

The Modern Pipeline

The complete modern development pipeline: Story → Mockup → Spec Package → AI Build → Human Review → Ship

The AI Build stage has multiple tool options. Choosing the right tool for the task determines whether you get working code on the first pass or spend more time debugging than you would have spent coding manually.

Feeding Specs to Bolt.new

Bolt.new works best with comprehensive single prompts. Structure your prompt in five sections:

Section 1: Project description + tech stack

"Build a [type of app] using [framework], [styling], [database]. Use TypeScript throughout."

Section 2: Design system

"Colors: primary bg #0F172A, card bg #1E293B, accent #F59E0B, text #F1F5F9. Font: Inter. All spacing on 8px grid."

Section 3: User stories with acceptance criteria

Include 3-7 stories with full Given/When/Then criteria.

Section 4: Page/component descriptions with layout details

Describe each screen: "Dashboard page: top stats row (4 equal cards showing [metrics]), below that 60/40 split with recent activity list on left and quick actions on right."

Section 5: Constraints and patterns

"Use React Context for auth state. No Redux. Forms use controlled components. All API calls in page components, not leaf components."

Bolt produces the best results when you give it everything upfront. It is not good at iterating — start over if the first output is fundamentally wrong.

Claude Code with SDD

The most structured approach. For new projects or complex features:

  1. npx cc-sdd@latest to set up SDD
  2. /kiro:steering to capture project context
  3. /kiro:spec-init "[description]" to initialize the feature
  4. /kiro:spec-requirements [feature] → review → approve
  5. /kiro:spec-design [feature] → review → approve
  6. /kiro:spec-tasks [feature] → review task list
  7. /kiro:spec-impl [feature] [task-ids] → review output

Best for: complex features, production code, code that needs to be maintained.

Cursor

Cursor works best with focused, file-scoped prompts. Add your spec package to the Composer context:

  1. Open Composer (Ctrl+I / Cmd+I)
  2. Drag your .kiro/specs/[feature]/requirements.md into the context
  3. Write a specific prompt: "Implement the database migration for tasks table per the design in design.md"

Cursor excels at targeted edits that follow your existing code style. It is less effective for generating large amounts of new code from scratch.

v0.dev

Best for individual components. Describe one component at a time with visual details:

"Create a TaskCard component:

  • Title (font-bold, text-white)
  • Status badge (todo = gray, in_progress = amber, done = green)
  • Assignee avatar (24px circle, stacked if multiple)
  • Due date with calendar icon, red if overdue
  • 3-dot menu button top-right
  • Hover: subtle scale and shadow
  • Dark theme, Tailwind CSS, TypeScript"

Iterate through conversation: "Make the status badge a pill shape. Add a priority indicator (dot in top-left: red/amber/green)."

Quality Gates for AI Code

Before accepting AI output, check:

  • [ ] Does it satisfy all acceptance criteria?
  • [ ] Any hardcoded values that should be variables?
  • [ ] SQL injection, XSS, or authentication vulnerabilities?
  • [ ] Performance: any N+1 queries or unnecessary re-renders?
  • [ ] Does it follow the existing patterns in the codebase?
  • [ ] Are edge cases (empty state, loading state, error state) handled?

Key Takeaways

  • Bolt.new needs comprehensive single prompts structured in 5 sections
  • Claude Code with SDD is the most rigorous approach — best for production code
  • Cursor works best for targeted, file-scoped edits referencing existing code patterns
  • v0.dev excels at individual components with visual detail in the prompt
  • Always check AI output against acceptance criteria, security, performance, and existing patterns

Example

markdown
# Bolt.new Prompt Structure

TECH STACK:
React 18, TypeScript, Tailwind CSS, Vite
Supabase for auth and database
React Router v6 for routing

DESIGN SYSTEM:
Background: #0A0A0F
Cards: #16161E with border #2A2A3A
Accent: #F59E0B (amber)
Text: #F0F0F5 (primary) / #A0A0B0 (secondary)
Font: Inter, loaded from Google Fonts
Spacing: 8px grid throughout

USER STORIES:
As a user, I want to [story 1]...
  Given [...], when [...], then [...]

As a user, I want to [story 2]...
  Given [...], when [...], then [...]

PAGES:
Dashboard (/): [layout description with component details]
Profile (/profile): [layout description]

CONSTRAINTS:
- No Redux — use React Context for global state
- Forms use React Hook Form + Zod
- Supabase client as singleton in src/lib/supabase.ts
- All components TypeScript strict mode
- Follow existing component patterns in src/components/
Try it yourself — MARKDOWN