Patterns for Agentic Programming2026.10.21

Introduction

With the rapid advancement of agentic programming in recent years, the scope and speed of software development have improved dramatically. Features that once took days to develop can now be built in tens of minutes, and a single developer can now manage codebases on a scale that was previously impossible to handle alone.

Paradoxically, however, the code that agents generate by default has a structure that is inefficient for agentic programming. I believe this stems from the characteristics of current coding agents: they generate code close to the average of the codebases they were trained on, focus on the short-term goal at hand, and operate with limited context. The problem is that, because of these characteristics, code mutates with each successive change into an unstable state in which the scope of impact of any modification becomes difficult to understand.

It is practically impossible to prevent this problem through human review. Agents generate code far faster than humans can review it. The right direction, therefore, is not to focus on verifying generated code, but to create an environment in which incorrect code is hard to generate in the first place, and to guide agents to operate correctly within it.

This book seeks the solution not in new techniques, but in long-established software design principles. Originally established to make incorrect code structurally difficult to write, these principles are of great value in agent-based development as well. More importantly, their value does not diminish as agent performance improves. By following these principles, the capability of ever better agents is not wasted on interpreting a codebase tangled like a ball of yarn, but can be spent on changes that create real value.

The good news is that, provided you know these principles exist, following them has actually become easier in agentic programming. Their importance has long been widely recognized, yet the work they require meant they were often compromised under the pressure of development schedules. Now that agents write the code, the cost of strictly following these principles has effectively vanished. This book organizes these principles into a form that can be applied directly when working with agents, and the word "patterns" in the title refers to this. For ease of understanding, the examples are small applications written in Python, but the principles themselves are not limited to any particular language or type of application.

In the not-too-distant future, all code will be written by agents. I hope that software creators from diverse backgrounds will each be able to build valuable and robust software, and that this book can serve as a foundation for that.

Dartwork

AI Software Development, Numerical Analysis, Engineering R&D

© 2026 Dartwork Co., Ltd. All rights reserved. Seoul