The moat hierarchy organizes competitive advantages by their susceptibility to AI disruption. At the bottom sit code moats — competitive positions defended by the difficulty of writing software, which AI has structurally weakened. Above them sit data moats, defended by accumulated information that compounds over time and cannot be replicated by writing new code. Above data sit integration moats, defended by the institutional knowledge of how to connect specific systems for specific customer workflows. Above integration sit trust moats — security certifications, regulatory approvals, demonstrated performance — that can only be built through time. At the top sit judgment moats — the capacity to identify what should be built, for whom, and why — which AI approaches but does not yet match. The hierarchy is not just descriptive; it generates specific valuation implications about which advantages warrant high terminal-value assumptions and which warrant finite-life models.
The hierarchy maps onto Damodaran's 2024 "Beat Your Bot" framework distinguishing mechanical from intuitive work, rules-based from principle-based work, and biased from open-minded cognition. Code is mechanical and rules-based; AI excels at it. Judgment is intuitive and principle-based; AI struggles with it. The intermediate layers — data, integration, trust — combine elements of both, and their durability against AI depends on the proportion of each.
The hierarchy also intersects with the philosophical tradition Edo Segal develops in The Orange Pill through Aristotle's distinction between techne (productive craft) and phronesis (practical wisdom). Code is techne; the AI revolution has collapsed its cost. Judgment is phronesis; the AI revolution has revealed how much of value resides there. The moat hierarchy is the financial expression of the same insight: the layers of value that survive the techne collapse are the layers where phronesis lives.
Operationalizing the hierarchy requires honest decomposition. A company can claim ecosystem advantages without possessing them. The test is whether the moat survives a thought experiment: if a competent team with Claude Code attempted to replicate this company over a weekend, what specifically would they fail to replicate? If the answer is "the code" — they would fail to replicate the code — the moat is at the code layer and is breached. If the answer is "the data, the integrations, the certifications, the customer relationships, the institutional knowledge" — the moat is at higher layers and is intact.
The hierarchy also explains why the market mispriced the SaaSpocalypse. Markets process narrative changes faster than they process moat decompositions. The narrative "AI commoditizes code" is simple and propagates quickly. The decomposition "this company derives 30% of value from code and 70% from ecosystem layers AI cannot replicate" requires company-specific analysis that takes weeks per company. During the gap between narrative propagation and analytical refinement, the market reprices uniformly, and the dispersion between actual moat structures and implied moat structures is the opportunity.
The hierarchy emerged in Damodaran's 2024-2026 work on AI's impact on competitive advantage, building on his prior writing on moats and his "Beat Your Bot" essay. It draws on the broader literature on competitive strategy from Porter through Helmer, and on the empirical work of researchers studying which forms of organizational capability survive technology transitions.
Five layers, ranked by AI susceptibility. Code (breached), data (durable), integration (durable), trust (durable), judgment (most durable).
Time deposits the upper layers. Data, integrations, trust, and certified talent all accumulate through time-dependent processes that cannot be compressed.
Each layer requires distinct valuation treatment. Higher layers warrant lower discount rates, longer terminal lives, and stable margin assumptions.
The thought experiment test. If a competent team with AI tools attempted to replicate the company, what specifically would they fail to replicate? The answer locates the moat.