Large goals are rarely safe to give an AI model all at once, so the work has to be broken into pieces. This project builds a multi-pass code review pipeline from scratch to show why: a single-pass baseline that reviews fourteen files in one prompt and quietly stops reading, a per-file layer that gives the fourteenth file the same attention as the first, and an integration pass that catches what no per-file review can see.
A teacher has 14 exam papers to mark.
The first few papers get careful notes: corrections in the margin, comments on weak arguments, suggestions for improvement. By paper 10, the feedback is much thinner. By paper 14, the teacher may still assign a grade, but the comments are brief and some obvious mistakes slip through.
The teacher did not suddenly forget how to teach. The problem is the way the work was arranged. Too much material was handled in one long pass, so the quality became uneven.
The same thing happens in AI systems.
An agentic AI system is an AI system that does more than answer one prompt. It can pursue a goal through several steps, often using tools, meaning external abilities such as reading files, searching documents, running code, querying a database, or calling an API. A simple chatbot answers once. An agentic system can plan, act, observe the result, and continue.
That extra power creates a design problem: large goals are rarely safe to give to the model all at once. The work has to be broken into pieces. That is task decomposition, and there are three shapes it usually takes.
Choosing badly is expensive in a direction that is easy to miss. Good decomposition makes the agent more reliable. Bad decomposition makes it look clever at first and then fail in quiet, inconsistent ways.
Sign in to view this build.
Create a free account to access the full build walkthrough on kevinsomany.com.
No account yet? Sign up free and come back here.