greenfieldintermediate15 minutes for planning, varies for execution

LLM-Powered Software Development Workflow

A comprehensive workflow for using LLMs to accelerate software development through structured brainstorming, planning, and code generation. Covers both greenfield projects and legacy code iteration with specific tools and techniques.

Tools & Prerequisites

Required Tools

ChatGPT 4o/o3(AI Assistant)
Claude(AI Assistant)

Optional Tools

Aider(AI Coding Assistant)
Cursor(IDE)
LLM CLI(Command Line Tool)
mise(Task Runner)
repomix(Code Context Tool)

Step-by-Step Guide

1

Idea Honing and Specification

Use a conversational LLM to develop a thorough specification through iterative questioning. Start with your initial idea and let the LLM guide you through clarifying questions.

Prompt Template

Ask me one question at a time so we can develop a thorough, step-by-step spec for this idea. Each question should build on my previous answers, and our end goal is to have a detailed specification I can hand off to a developer. Let's do this iteratively and dig into every relevant detail. Remember, only one question at a time.

Here's the idea:

<IDEA>

Pro Tip

Save the final spec as spec.md in your repository. You can also use this spec for generating white papers or business models.

2

Generate Implementation Plan

Pass the specification to a reasoning model to create a detailed implementation plan with small, iterative steps.

Prompt Template

Draft a detailed, step-by-step blueprint for building this project. Then, once you have a solid plan, break it down into small, iterative chunks that build on each other. Look at these chunks and then go another round to break it into small steps. Review the results and make sure that the steps are small enough to be implemented safely with strong testing, but big enough to move the project forward. Iterate until you feel that the steps are right sized for this project.

From here you should have the foundation to provide a series of prompts for a code-generation LLM that will implement each step in a test-driven manner. Prioritize best practices, incremental progress, and early testing, ensuring no big jumps in complexity at any stage. Make sure that each prompt builds on the previous prompts, and ends with wiring things together. There should be no hanging or orphaned code that isn't integrated into a previous step.

Make sure and separate each prompt section. Use markdown. Each prompt should be tagged as text using code tags. The goal is to output prompts, but context, etc is important as well.

<SPEC>

Pro Tip

Save the output as prompt_plan.md. For non-TDD approach, remove testing requirements from the prompt.

3

Create Todo Checklist

Generate a comprehensive todo list that can be checked off during implementation.

Prompt Template

Can you make a `todo.md` that I can use as a checklist? Be thorough.

Pro Tip

Save as todo.md in the repository. Your codegen tool should be able to check items off while processing.

4

Set Up Repository

Initialize your repository with appropriate boilerplate code and tooling. This gives you control over language, style, and tooling choices.

Code Example

# Examples:
uv init  # for Python
cargo init  # for Rust
npx create-react-app  # for React

Pro Tip

Setting up the foundation yourself prevents the LLM from making assumptions about your tech stack.

5

Execute with Claude (Manual Approach)

Paste each prompt from your plan into Claude, copy the generated code to your IDE, test, and iterate. Use repomix to pass the full codebase context when debugging.

Pro Tip

This approach gives you more control but requires more manual work. Good for when you want to understand each step.

6

Execute with Aider (Automated Approach)

Start Aider in your repository and paste prompts sequentially. Aider will implement, test, and debug automatically.

Code Example

aider  # start aider in your repo

Pro Tip

More hands-off approach. Aider will run tests and debug for you. Always work on a new branch when using Aider.

7

Legacy Code: Generate Context

For existing codebases, use repomix or similar tools to generate a context file containing your codebase.

Code Example

mise run LLM:clean_bundles  # generates output.txt

Pro Tip

Edit the generate command to ignore irrelevant parts of the codebase if the context is too large.

8

Legacy Code: Generate Improvement Tasks

Use LLM commands to analyze your codebase and generate specific improvement tasks like code reviews, missing tests, or GitHub issues.

Prompt Template

You are a senior developer. Your job is to review this code, and write out a list of missing test cases, and code tests that should exist. You should be specific, and be very good. Do Not Hallucinate. Think quietly to yourself, then act - write the issues. The issues will be given to a developer to executed on, so they should be in a format that is compatible with github issues

Code Example

mise run LLM:generate_missing_tests
mise run LLM:generate_code_review
mise run LLM:generate_github_issues

Pro Tip

Review the generated markdown files before implementing. Focus on one improvement at a time.

LLM-Powered Software Development Workflow

This workflow enables rapid software development using LLMs through a structured approach: brainstorm spec, plan a plan, then execute using LLM codegen in discrete loops.

Overview

The workflow handles two main scenarios:

  • Greenfield code: Starting new projects from scratch
  • Legacy modern code: Iterating on existing codebases

Greenfield Development Process

Phase 1: Idea Honing

Use a conversational LLM to develop a comprehensive specification through iterative questioning. This creates a developer-ready spec that serves as the foundation for the entire project.

Phase 2: Planning

Pass the spec to a reasoning model (o1*, o3*, r1) to create a detailed, step-by-step implementation plan broken into small, manageable chunks. This generates:

  • A prompt plan for execution
  • A todo.md checklist
  • Clear implementation steps that build on each other

Phase 3: Execution

Implement the plan using your preferred codegen tool (Claude, Aider, Cursor, etc.). Two main approaches:

Claude Approach: Pair program by pasting prompts iteratively, copying code to IDE, testing, and using repomix for debugging when stuck.

Aider Approach: More automated - paste prompts into Aider and let it handle implementation and testing.

Non-Greenfield: Incremental Iteration

For existing codebases:

  1. Generate context using tools like repomix
  2. Create specific improvement tasks (code review, missing tests, issues)
  3. Execute improvements incrementally

Key Benefits

  • Rapid prototyping and development
  • Structured approach prevents getting "over your skis"
  • Works across languages and project types
  • Maintains documentation throughout

Important Considerations

  • Keep track of progress to avoid getting ahead of yourself
  • Testing is crucial, especially with automated tools
  • Currently optimized for solo development
  • Expect significant downtime while LLMs process

Discussion (0)

Comments coming soon!

LLM-Powered Software Development Workflow - LLM Workflow | LLM Workflows