How artificial intelligence brought Shopify back to clean code
Shopify's new theme architecture shows that artificial intelligence agents and developers want the same things: readable code, clear contracts and helpful feedback.
Published on27 July 20263Views0 Reviews0 Comments
For years, the evolution of e-commerce platforms appeared to follow a simple rule: the more customisation options they provided, the better the experience would be for users. Shopify is now demonstrating, however, that unlimited flexibility can carry a considerable cost, particularly when it turns relatively simple code into structures that are difficult to understand, maintain and modify.
The company is preparing a new generation of online store themes intended to replace Horizon, its current base theme. The main difference is not simply how stores will look, but how their underlying code is organised. Rather than relying on large JSON files, the new approach returns to a structure built primarily with HTML and complemented by Shopify's Liquid templating language.
This change represents more than a technical decision. It is also a response to the growing use of artificial intelligence agents in the creation and editing of online stores. Shopify's conclusion is particularly relevant to any organisation involved in digital development: code that is easy for a person to understand also tends to be easier for artificial intelligence to use.
A return to readable code
The new base theme has not yet received a definitive name, but it is already being introduced to the developer community as a simpler alternative to Horizon. According to Shopify, the new structure contains 93% fewer lines of code than the current theme, resulting in smaller, clearer and more manageable files.
When merchants and developers open the templates directory, they will find plain-text files containing easily identifiable HTML and Liquid instructions. Instead of navigating long sequences of serialised settings, they can understand the structure of a page by reading its code directly.
This reduces the gap between what appears in the visual editor and what exists in the source code. A page is no longer merely the automatic result of numerous options saved in a configuration file. It becomes a document that can be read, understood and adapted.
For businesses that rely on the continuous customisation of their online stores, this change could lead to more efficient maintenance and lower technical risk. A readable architecture makes life easier for in-house teams, technology partners and specialists in Shopify Plus development.
How customisation created complexity
In Shopify's early years, themes were relatively simple. Even someone with basic web development knowledge could open a template, identify its main elements and make minor changes. As the platform grew, it introduced more customisation options, configurable blocks and visual tools capable of controlling almost every component on a page.
This development allowed merchants without technical experience to play a more active role in building their stores. Colours, buttons, sections, images, typography and content layouts could all be managed through the platform's editor.
Every new possibility, however, required additional definitions and settings. Templates began to depend on JSON files describing the position, behaviour and properties of each block. Although this system offered extensive flexibility, it also made the code more difficult to read and forced developers to consult several files to understand a single page.
The complexity did not arise because JSON was an unsuitable technology, but because configuration files began to represent too many decisions, rules and dependencies.
The result was an efficient experience within the visual editor, but a less intuitive one for anyone who needed to develop, diagnose or optimise the theme. Code stopped being a clear working surface and became an automatically generated output.
The influence of Shopify Sidekick
The adoption of Shopify Sidekick accelerated the need to rethink this architecture. The artificial intelligence assistant allows merchants to describe the changes they want in natural language. Instead of searching for a colour code or manually modifying a setting, a user can ask the system to change the background of a section, add a button or rearrange particular content.
According to figures shared by the company, around 20% of Shopify merchants are already using Sidekick to edit themes, accounting for approximately 25 million changes in a single year. This use at scale forced Shopify to consider not only the human experience, but also how artificial intelligence models interpret and modify an online store.
AI agents benefit from the same qualities in code that developers value:
- Structures that are easy to read and interpret.
- Explicit contracts between components.
- Consistent validation rules.
- Useful error messages and constructive feedback.
- Fewer hidden dependencies between files.
This finding is influencing how digital platforms are built. Instead of creating an additional layer exclusively for artificial intelligence, Shopify has chosen to improve its underlying technology. By simplifying the code for agents, it has also made it more accessible to developers, merchants and maintenance teams.
HTML and Liquid as a common language
The choice of HTML is not accidental. Leading artificial intelligence models have already been trained on substantial amounts of web code and can easily recognise the relationships between elements, attributes and content. HTML is expressive, locally structured and relatively token-efficient when describing an interface.
Liquid complements this foundation by allowing developers to incorporate logic, data and dynamic components. In the new architecture, Shopify has introduced revised syntax, a new parser and more disciplined mechanisms for executing instructions on the server.
For the user, these changes appear as composable, typed blocks that can sit directly alongside ordinary HTML. Each component can receive values, settings, overrides and other instructions without requiring the developer to rebuild the entire page.
The new parameters perform a role similar to the properties used in libraries such as React, but without requiring a virtual DOM. Shopify has also introduced a partial update mechanism that allows a specific area of a page to change without reprocessing all of its content.
This approach could improve store performance, simplify maintenance and reduce the amount of JavaScript required. To turn those advantages into measurable results, the architecture should be supported by consistent technical SEO, accessibility and code quality practices.
Less reactive code and more standard actions
Another important development is the introduction of standard actions. These actions represent common events within an online store, such as updating the shopping basket, changing a product variant or responding to a user interaction.
By providing a consistent way to handle these events, Shopify expects to remove thousands of lines of reactive code currently present in Horizon. Rather than requiring every theme to implement its own logic, developers will be able to use common, documented and predictable mechanisms.
The company has also created around 20 new rules to ensure generated themes comply with its requirements for contracts, structure, validation, complexity, nesting and file size. This validation becomes particularly important when some of the code is created or modified by artificial intelligence.
An agent can produce a working solution quickly, but that solution still needs to respect technical limits and quality standards. Automated rules help prevent a seemingly simple change from introducing performance, security or maintenance problems.
A declarative architecture is not always simpler
Settings-driven architectures are useful when every possible requirement can be anticipated. Problems begin when a user needs something that was not included in the original set of options.
Consider a section configured to display two buttons. In an architecture based entirely on settings, the developer must decide in advance how many buttons will be supported, which fields they will contain and how they will be arranged. When the merchant discovers that a third button is required, the section schema may need to be changed.
With HTML, this requirement can be handled more naturally. The buttons can be grouped within an element and new components can be added without changing the entire configuration structure. This controlled freedom brings development closer to the way web pages were originally designed.
This does not mean abandoning components, visual systems or editors. It means finding an effective balance between customisation and clarity, ensuring the platform remains accessible without completely hiding its technical structure.
What businesses can learn from this change
Shopify's new direction demonstrates that preparing for artificial intelligence involves more than adopting new tools. It also requires businesses to review systems, processes and architectures that have accumulated complexity over time.
Organisations planning to integrate AI agents into their digital channels should begin by evaluating the quality of their technological foundations. Fragmented code, incomplete documentation, implicit contracts and inconsistent behaviour make both human work and automation more difficult.
An architectural audit can identify redundant components, overly complex files, unnecessary dependencies and opportunities for standardisation. This work can form part of a broader assessment of a company's systems and web infrastructure, bringing together performance, scalability, security and the ability to evolve.
The main benefits of an approach focused on readability include:
- Faster implementation of changes.
- Less dependence on technical knowledge held by a single person.
- Fewer errors introduced by automation or AI agents.
- Closer integration between design, content and development teams.
- A greater ability to test, validate and document each component.
The future of code could be more human
For many years, the technology industry sought to reduce the amount of text in its systems and make data formats increasingly compact. JSON gained ground in many contexts because it was less verbose than XML, while domain-specific languages attempted to represent complex processes using condensed syntax.
The expansion of artificial intelligence is now challenging that trend. Language models have been trained to interpret semantic relationships, descriptive instructions and structures resembling human communication. As a result, more explicit formats may produce better outcomes than excessively compressed languages.
Shopify's experience suggests that the best code for artificial intelligence does not need to be artificially adapted for machines. It can simply be good code: clear, predictable, well documented and organised around responsibilities that are easy to identify.
By returning to HTML and strengthening Liquid through components, contracts and validation, Shopify is not rejecting innovation. It is recognising that sustainable innovation depends on understandable foundations.
For merchants and brands, this change could make it easier to create more personalised digital experiences without turning every modification into a complex technical project. For developers, it offers the possibility of understanding a page by reading its code again. For artificial intelligence agents, it provides a safer and more efficient environment in which to execute instructions.
The central conclusion is simple: when an architecture is designed to be understood, everyone works better - people, teams and machines.
If you enjoyed this article, follow us on LinkedIn...
Add this news source to your preferences.
Rate this article
0 Comments