
Wot I read
Harper Reed's LLM Codegen Workflow
Overview
TL;DR: Brainstorm spec → plan a plan → execute using LLM codegen in discrete loops
Two Development Scenarios
Greenfield Development
Brand new projects starting from scratch
Legacy/Modern Code
Iterating on existing codebases
Greenfield Process
Step 1: Idea Honing
- Use conversational LLM (ChatGPT 4o/o3) for iterative brainstorming
- Ask for one question at a time to develop thorough specifications
- End with comprehensive developer-ready specification
- Save as
spec.md
Key Prompt: > "Ask me one question at a time so we can develop a thorough, step-by-step spec for this idea..."
Step 2: Planning
- Pass spec to reasoning model (o1, o3, r1)
- Create detailed step-by-step blueprint
- Break down into small, iterative chunks
- Generate series of prompts for code-generation LLM
- Save as
prompt_plan.md
andtodo.md
Two Planning Approaches:
- TDD Prompt: Test-driven development focused
- Non-TDD Prompt: Standard implementation approach
Time Investment: ~15 minutes total
Step 3: Execution
Claude Method:
- Pair programming with claude.ai
- Manual copy/paste workflow
- Use repomix for debugging when stuck
- Author handles initial boilerplate and tooling setup
Aider Method:
- Automated "cookie clicker" experience
- Hands-off testing and debugging
- Direct prompt execution
Workflow Steps:
- Set up repo boilerplate
- Execute prompts iteratively
- Test and verify functionality
- Debug if needed
- Repeat until completion
Non-Greenfield Process
Context Generation
- Use repomix tool to package codebase
- Generate
output.txt
with code context - Utilize mise task runner for automation
Available LLM Tasks:
- Clean bundles
- Copy buffer bundle
- Generate code reviews
- Generate GitHub issues
- Generate missing tests
- Generate README
Execution Methods:
Same Claude and Aider approaches as Greenfield, but task-focused rather than project-wide planning
Utility Prompts
Code Review
"You are a senior developer. Your job is to do a thorough code review..."
GitHub Issue Generation
"Review this code, and write out the top issues you see..."
Missing Tests
"Review this code, and write out a list of missing test cases..."
Key Challenges & Solutions
"Getting Over Your Skis"
- Problem: Easy to lose track and get ahead of yourself
- Solution: Aggressive tracking and planning documentation
- Recommendation: Take breaks when overwhelmed
Solo Development Limitation
- Current workflows are single-player experiences
- Team collaboration with LLMs remains problematic
- Merges and context sharing are complicated
Downtime Management
While waiting for LLM token processing:
- Start brainstorming next project
- Listen to music
- Play games
- Social interaction
Results & Benefits
Productivity Gains:
- Built numerous projects: scripts, apps, CLI tools
- Works across multiple programming languages
- Empty hack to-do list due to rapid execution
- Exploration of new programming languages and tools
Time Efficiency:
Planning phase takes only ~15 minutes, enabling rapid project initiation and completion