How I Write Software with LLMs: A Practical Multi-Agent Workflow
A three-role system for AI-assisted software development: an architect who designs, a developer who implements, and independent reviewers who critique.
This post describes a practical, production-minded way to write software with large language models by splitting responsibilities across three distinct roles:
- Architect – designs the solution, asks clarifying questions, and explores tradeoffs before any code is written.
- Developer – implements the approved design with minimal ambiguity.
- Reviewers – independently critique the implementation and compare it against the intended architecture.
The key idea is that LLMs amplify existing engineering processes rather than replace engineering judgment. You still need a deep understanding of your stack, real QA loops, and explicit approval gates.
A case study on adding email support to an existing system illustrates how gaps often surface only during QA. The lesson: treat QA as non-negotiable, and use refactoring to address root causes instead of layering on isolated patches.
The recommended blueprint:
- Use one strong planning model as the architect.
- Use one cost-efficient model as the developer.
- Use two independent models as reviewers.
- Add explicit approval gates between architecture, implementation, and deployment.
- Run mandatory QA cycles that involve humans and real environments.
- Define clear escalation procedures when reviewers disagree or when QA uncovers systemic issues.
The biggest failure mode is proceeding without a deep understanding of your stack. That leads to poor architectural decisions that compound over time and are expensive to unwind. LLMs can help you move faster, but only if you keep humans firmly in charge of architecture, tradeoffs, and quality.
LLMs Don’t Replace Engineering Judgment
The largest failure mode in AI-assisted development is treating LLMs as a substitute for deep stack understanding. Use them to accelerate design, implementation, and review—but keep humans accountable for architecture, tradeoffs, and quality gates.
## Recommended Multi-Agent Setup
1. **Architect (Planning Model)**
- High-quality, reasoning-optimized model
- Responsibilities:
- Ask clarifying questions
- Propose and compare designs
- Document chosen architecture and tradeoffs
2. **Developer (Implementation Model)**
- Cost-efficient, code-focused model
- Responsibilities:
- Implement according to the architecture spec
- Avoid inventing new requirements
3. **Reviewers (Two Independent Models)**
- Responsibilities:
- Compare code to the architecture spec
- Flag mismatches, risks, and unclear behavior
4. **Process Guards**
- Explicit approval gates between:
- Architecture → Implementation
- Implementation → Review
- Review → QA / Release
- Mandatory QA loops in real or staging environments
- Escalation path when reviewers or QA uncover systemic issues