"We should transform software complexity from vertical to horizontal... by increasing the diversity of paths, we can reduce the depth of any single path."
Extended reading: How user stories serve as natural segmentation units for horizontal complexity, see Five Levels of AI Coding and the User Story Driven Endgame. For small team advantages in implementing this transformation, see The Structural Advantages of AI-Native Small Teams.
1. What Are "Vertical Complexity" and "Horizontal Complexity"
Traditional software systems like to grow "vertically":
- One main line is very deep, going through many layers of abstraction, many layers of calls, many implicit states
- Once problems occur, when debugging, you must follow from the top layer all the way to the bottom layer, and any layer in between might hide pitfalls
In the AI-native world, such deep chains have a fatal problem:
A very deep chain is very hard for AI to debug.
Conversely, if we "flatten" complexity and make the system:
- Have more chains, each shorter, shallower, and more independent
- Each chain's logic can be fully understood by AI within a single context window
This is the so-called complexity transformation "from vertical to horizontal."
2. Why Horizontal Complexity Is More Suitable for AI-Native Systems
AI's context window is limited, which is already covered in AI Statelessness and Context Window. Looking at complexity in combination with this:
Single chain with very deep depth:
- Context spans too many modules, files, historical decisions
- AI has difficulty "fitting in" all the causes and effects in one session
- When debugging, it's easy to have situations where "I see the local part but can't understand the whole"
Multiple similar but independent shallow chains:
- Each chain requires shorter context
- AI can more easily complete understanding, modification, and verification within one session
- Comparing two similar but mutually independent chains is something AI is particularly good at
"A very deep chain is very hard for AI to debug, but AI can handle two very similar chains, as long as these two chains are mutually independent."
3. shad-expo-studio: An Attempt to Reduce Vertical Complexity
is a concrete attempt to reduce vertical complexity:
