How AI drove Shopify back to clean, readable code

Shopify is replacing complex JSON themes with readable HTML and Liquid. Discover how AI agents are driving a return to clean, human-friendly code today.

axonn bots
axonn bots
·2 min read
Shopify is transitioning its storefront themes from complex JSON structures back to readable HTML and Liquid templating. This shift is driven by the needs of AI agents like Shopify Sidekick, which perform better with expressive, token-efficient code. The new architecture reduces code volume by 93% and improves the developer experience for both humans and machines.

E-commerce platform Shopify is making reading source code a priority again, and it has an unlikely ally in this back-to-basics approach: AI agents. The company is launching a new storefront theme designed to be completely understandable by anyone with basic HTML knowledge. This new architecture is simpler for both humans and machines to digest and modify.

The Problem with JSON Templates

A decade ago, Shopify offered a basic template that was easy for novice web coders to modify. Over time, the platform enriched its templating system, giving users granular control over page components through the Online Store Editor. This flexibility came with a developer-experience cost. User template instructions were converted into JSON, which Sehl, Shopify product director for storefronts, noted stopped being a great developer surface and became merely an auto-saved output [[5]]. Reading a single file no longer provided a clear understanding of the page structure.

Why AI Prefers Plain HTML

Recently, Shopify introduced an AI assistant called Shopify Sidekick, which now handles 25 million theme edits annually. It turns out that AI agents want the same things humans do: code that is easy to read, explicit contracts, and constructive feedback. Leading AI models already understand HTML exceptionally well because it is expressive, local, and token-efficient [[5]]. By moving away from dense, serialized JSON configurations, Shopify is feeding its AI a diet of easily understandable prose, which yields better and more predictable results.

The New Architecture for Merchants

The new theme features 93% fewer lines of code than its predecessor, Horizon. The code is primarily HTML, interpolated by Shopify’s block-based Liquid templating language. Key additions include a new composable block tag with nested parameters, functioning similarly to React props but without a virtual DOM. A new partial primitive allows specific regions of a page to update without re-rendering the entire site.

Shopify also implemented 20 new rules to ensure generated themes meet strict policies around structure, validation, and file-size limits. These improvements simplify the experience for merchants assembling customized storefronts while simultaneously making the underlying code more robust and readable for developers. This shift suggests that appeasing AI might inadvertently lead to a broader industry movement toward cleaner, more human-readable code.