I wanted to provide a pertinent update on my previous post on the subject, “Accelerating Software Development with AI: My Workflow Unveiled“.
Aider has just released a new feature that separates code reasoning and code editing by using two specialized AI models—the Architect and the Editor. This approach has produced good results in their code editing benchmarks, and it's a significant enhancement for developers leveraging AI in their workflows.
In my previous post, I talked about how combining the right tools and doing some crucial pre-work can significantly enhance productivity and code quality. Aider's new Architect/Editor setup aligns perfectly with this approach.
Here's why this is so relevant:
Focused Expertise: By splitting the roles, each AI model can focus on what it does best. The Architect model excels at reasoning and can provide detailed solutions to coding problems. The Editor model then takes this solution and turns it into specific code editing instructions, ensuring the code is properly formatted and ready to implement.
Improved Efficiency: This separation reduces the cognitive load on each model, leading to more accurate and efficient code generation. It's similar to how I use specialized tools like OpenAI's o1-preview for architecture, now builtin to Aider, and v0.dev for UI design to optimize each phase of development.
Aligns with the Power of Pre-Work: I emphasized the importance of investing time upfront in architectural definitions and requirements. Aider's approach leverages this by allowing the Architect model to focus on higher-level reasoning enriched by thorough pre-work, while the Editor model handles the implementation details.
Addresses Challenges in AI Coding: One area I found lacking was AI's ability to consistently produce well-formatted code, especially in complex scenarios. By having an Architect model dedicated to reasoning and an Editor model focused on code formatting, there's a better chance of tackling these complexities effectively.
This is how I start Aider to use OpenAI/o1-preview as the architect model and a local installation of Meta/Llama3.2:3b as my editor:
aider --model openrouter/openai/o1-preview --architect --editor-model ollama/llama3.2:3b --editor-edit-format whole --weak-model ollama/llama3.2:3b
In this case I go through OpenRouter for o1-preview API access, as it is not directly available from OpenAI just yet.
This is a great development for AI code generation, and Aider just keeps getting better. If you've been using Aider or are considering integrating AI into your workflow, this new feature is definitely worth checking out. It could be the missing piece that takes your productivity to the next level.