The author discusses the "AI 90/10 problem," where AI-generated code is 90% complete but impossible to review and maintain. This is because AI agents optimize for generation speed, not maintenance clarity. Rich Hickey's principles from his talk "Simple Made Easy" inspired the author to constrain their architecture to make AI-generated code easy to review and maintain. Hickey's principles emphasize the importance of simplicity, separating state from value, using data as data, preferring functions over methods, and composition over inheritance. By applying these principles, the author's team designed systems that left only one obvious way to implement a feature, making AI-generated code maintainable. The team's architectural constraints included immutable data, explicit error context, pure functions, and composition over inheritance. These constraints not only made code review faster but also taught the AI agent to generate better code. The author concludes that the AI 90/10 problem is not a limitation of AI agents but a failure of architectural design, and that constraining AI behavior through design makes AI a partner in building maintainable software.
dev.to
dev.to
Create attached notes ...
