LLMs Can Write Production Quality Code
19 hours ago
- #AI Coding Best Practices
- #LLMs in Software Development
- #Spec-Driven Development
- Author uses LLMs for 99% of code at Airbnb, emphasizing treating LLMs as power tools, not magic wands, to solve common problems like constant refactors, lack of context, poor instruction following, doom loops, and complexity limits.
- To avoid constant refactors, adopt Spec-Driven Development (SDD): have detailed conversations with LLMs, propose approaches first, iterate on plans, and only generate code after approval and mini-specs, ensuring high-quality production code.
- Address lack of context by ramping up LLMs like new hires: provide codebase context via monorepos, RPC schemas, and documentation, and set system prompts for coding standards to guide LLM behavior.
- Improve instruction following by choosing advanced models like GPT-5.3 high or Claude Opus 4.5, managing context with features like /compact to summarize chat history, and avoiding session limits.
- Prevent doom loops in debugging by instructing LLMs to investigate bugs without coding first, review findings, and plan fixes before implementation, accelerating investigation while maintaining control.
- Handle complexity limits through decomposition: break large projects into atomic tasks via SDD, isolating components to bypass LLM reasoning limits and enabling incremental, testable code generation.
- Overall, LLMs act as cognitive power tools that reduce mental fatigue, allowing engineers to focus on higher-leverage concerns, leading to better quality systems with proper planning and context.