{"id":3634,"date":"2026-07-26T12:14:08","date_gmt":"2026-07-26T12:14:08","guid":{"rendered":"https:\/\/justfineinfotech.com\/how-ai-drove-shopify-back-to-clean-code\/"},"modified":"2026-07-26T12:14:08","modified_gmt":"2026-07-26T12:14:08","slug":"how-ai-drove-shopify-back-to-clean-code","status":"publish","type":"post","link":"https:\/\/justfineinfotech.com\/fr\/how-ai-drove-shopify-back-to-clean-code\/","title":{"rendered":"How AI drove Shopify back to clean code"},"content":{"rendered":"<p>E-commerce platform Shopify wants to make reading -to-the-roots approach: AI agents.\u00a0<\/p>\n<p>The company is launching a new storefront theme for its customers, aka \u201cmerchants,\u201d that it claims is completely understandable by anyone with even a smidgen of HTML knowledge. It is designed to be simpler for both people and machines to digest and hack against.\u00a0<\/p>\n<p>Shopify hasn\u2019t named this new theme yet, but is <a href=\"https:\/\/shopify.dev\/docs\/storefronts\/themes\/getting-started\/developer-preview\" rel=\"nofollow noopener\" target=\"_blank\">unveiling it in developer forums<\/a> as the probable successor to Horizon, its current JSON-heavy base theme, which customers use to customize their own Shopify pages.\u00a0<\/p>\n<p>The new code is mostly HTML, interpolated by the company\u2019s own block-based Liquid templating language, which is also fairly easy on the eyes.\u00a0<\/p>\n<p>When merchants peek into the templates directory of this new theme, they will see plain-text files of easy-to-parse code, not long strings of inscrutable JSON. This theme has 93% fewer lines of code than Horizon.\u00a0<\/p>\n<p>The company\u2019s increasingly popular AI service is driving this rearchitecture redesign.\u00a0<\/p>\n<p>\u201cEvery leading model already understands HTML. It is expressive, local, and token-efficient,\u201d wrote <a href=\"https:\/\/www.linkedin.com\/in\/benjaminsehl\/\" rel=\"nofollow noopener\" target=\"_blank\">Ben Sehl<\/a>, Shopify product director for storefronts, <a href=\"https:\/\/x.com\/benjaminsehl\/status\/2079633466581258469\" rel=\"nofollow noopener\" target=\"_blank\">in a missive<\/a> on X. And Shopify\u2019s Liquid template language meshes perfectly with HTML.\u00a0<\/p>\n<h3>From merchants to merchandisers<\/h3>\n<p>In his post, Sehl recalled a decade ago, when he was a merchant himself, and Shopify only offered a basic template. It was easy for Sehl, then a novice web coder, to modify with a third-party starter kit.\u00a0<\/p>\n<p>Over time, Shopify enriched the templating, allowing users to become full-fledged designers. The Online Store Editor gave them more control over how a page and its various \u201cblock\u201d components would look like. Every button and knob could be customized<\/p>\n<p>Flexibility begets complexity, however. The user template instructions were converted to JSON. \u201cThat trade-off gave merchants far more control, but it came with a developer-experience cost: you could no longer understand a page by reading one file,\u201d Sehl wrote.\u00a0<\/p>\n<p>\u201cThe moment templates became JSON, they stopped being a great developer surface. They became an auto-saved output,\u201d Sehl wrote.\u00a0<\/p>\n<h3>Good for the bot, good for the human<\/h3>\n<p>Recently, Shopify added an AI assistant called Shopify Sidekick, which gave users even more control over how they designed their pages. No longer would they have to remember that #0000FF means \u2018Blue\u2019 in HTML speak. They just \u201cdeclare\u201d the background color to be blue and the agent will make it so.\u00a0<\/p>\n<p>This year, 20% of Shopify merchants are using Sidekick to edit their themes, making 25 million edits this year alone.\u00a0<\/p>\n<p>Consequently, Shopify faced the task of simplifying things for the AI agent itself.\u00a0<\/p>\n<p>It turns out that agents want the same things as humans: code that is easy to read, explicit contracts, and constructive feedback. So the company has reorganized its theme architecture using these qualities as first principles (while maintaining existing Liquid themes in a \u201cforever API\u201d)<\/p>\n<p>While these changes better support our new AI overlords, the underlying code also became more readable to humans as well.\u00a0<\/p>\n<p>\u201cThe deeper problem with serialized configuration isn\u2019t that JSON is inherently bad. It\u2019s that configuration has a constrained vocabulary,\u201d Sehl explained<\/p>\n<h3>Reveal<\/h3>\n<p>For this new base theme, Liquid gained a new syntax and parser, built with some additional discipline to execute more complex instructions on the back-end. What the user sees, however, are composable, typed blocks that fit easily alongside ordinary HTML<\/p>\n<p>In this new approach, each user-designed theme is given a special directory and files with instructions and pointers of how additional artifacts should be generated. Furthermore, an expanded doc tag contains examples and instructions on handling contracts and snippets<\/p>\n<p>Key to the new theme is a new composable block tag, which contains a set of nested parameters describing page components that the developer can feed with values, configurations, overrides, and other instructions.\u00a0<\/p>\n<p>React devs will recognize parameters as doing a similar job to React\u2019s props, but without the need to create a virtual DOM.\u00a0 Also familiar to React users will be the new partial primitive, which allows a specific region of a page to be updated without needing to re-render the entire page.\u00a0<\/p>\n<p>The team also added standard actions, a collection of event triggers for the site, such as, say, updating the shopping cart. \u201cThis one primitive will let us remove thousands of lines of reactivity code from Horizon,\u201d Sehl wrote.\u00a0<\/p>\n<p>Shopify also developed 20 new rules to ensure generated themes meet the company\u2019s policies around contracts, structure, validation, complexity, nesting, and file-size limits.\u00a0\u00a0<\/p>\n<p>And if the user wants to get fancy, Liquid now allows for logical capabilities such as Boolean expressions, infix operators with precedence, and literal arrays and objects. At some point in the future, the Tailwind CSS framework will even be supported.\u00a0\u00a0<\/p>\n<p>All these improvements should simplify things for the merchant at home, trying to assemble a customized storefront<\/p>\n<p>For instance: In a declarative, settings-driven architecture, the developer must anticipate how many buttons they plan to use before they start the layout. With HTML, when the merchant discovers they need additional buttons, they just wrap them all in an HTML div tag<\/p>\n<h3>Palatable for AI<\/h3>\n<p>AI experts are slowly coming around to the idea that the best diet for AIs is not dense, symbolic-heavy code \u2014 at least for non-<a href=\"https:\/\/justfineinfotech.com\/fr\/top-10-games-for-learning-coding-skills-in-2026\/\" title=\"Top 10 Games for Learning Coding Skills in 2026\">coding<\/a> tasks. Like humans, LLMs seem to do better on a diet of more easily-understandable prose (LLMs were, after all, trained on human language).\u00a0<\/p>\n<p>One developer, for instance, found that SQL <a href=\"https:\/\/kirill-markin.com\/articles\/sql-like-dsl-for-ai-agents\/\" rel=\"nofollow noopener\" target=\"_blank\">was easier to process<\/a> compared to the Domain Specific Languages (DSLs) of 17 different tools. For prompting, Anthropic <a href=\"https:\/\/platform.claude.com\/docs\/en\/build-with-claude\/prompt-engineering\/claude-prompting-best-practices\" rel=\"nofollow noopener\" target=\"_blank\">recommends<\/a> the semantically-rich XML, whereas a decade ago that format was largely cast aside by the industry for the leaner, less-verbose JSON.\u00a0<\/p>\n<p>Perhaps Shopify\u2019s efforts to appease AI may lead not to more slop but to a movement for more readable code.\u00a0\u00ae<\/p>\n<div style=\"clear:both;margin:30px 0 15px 0\">\n<p>\n    <strong>Related:<\/strong><br \/>\n    &lt;a href=&quot;https:\/\/yoursite.com\/<a href=\"https:\/\/justfineinfotech.com\/fr\/meta-gives-ai-assistant-new-task-automation-features\/\" title=\"Meta Gives AI Assistant New Task Automation Features\u00a0\">automation<\/a>-training-benin\/&#8221; title=&#8221;Digital Automation Training Benin: 5 Winning Skills Employers Demand in 2026&#8243;&gt;<br \/>\n      Digital Automation Training Benin: 5 Winning Skills Employers Demand in 2026<br \/>\n    <\/a>\n  <\/p>\n<p>\n    &lt;a href=&quot;https:\/\/yoursite.com\/automation-africa\/&quot; title=&quot;<a href=\"https:\/\/justfineinfotech.com\/fr\/bmc-to-launch-whatsapp-business-and-google-messages-for-property-taxpayers\/\" title=\"BMC to launch WhatsApp Business and Google Messages for property taxpayers\">WhatsApp<\/a> Marketing Automation Africa: 6 Dangerous Mistakes Brands Make in Nigeria&#8221;&gt;<br \/>\n      WhatsApp Marketing Automation Africa: 6 Dangerous Mistakes Brands Make in Nigeria<br \/>\n    <\/a>\n  <\/p>\n<\/div>\n<div style=\"clear:both;margin:30px 0;padding:25px;background:#f8f9fc;border:1px solid #ddd;border-radius:8px;text-align:center\">\n<h3>Want to learn this practically?<\/h3>\n<p>Join <strong>Justfine Infotech<\/strong> and build real digital skills in AI, automation, web development, digital marketing, office productivity, e-commerce, freelancing and cybersecurity.<\/p>\n<p><strong>Available Programmes:<\/strong><br \/>\n  6 Weeks Certificate \u2022 3 Months Professional Certificate \u2022 6 Months Diploma \u2022 Full Professional Diploma<\/p>\n<p><strong>WhatsApp:<\/strong><br \/>\n  +229 01 57 57 99 15<br \/>\n  +229 01 66 68 11 60<\/p>\n<p><a href=\"https:\/\/api.whatsapp.com\/send?phone=2348132690270&amp;text=Hello\" target=\"_blank\" rel=\"noopener\">Enroll Now<\/a><\/p>\n<\/div>\n<p class=\"ani-source\">Source: <a href=\"https:\/\/www.theregister.com\/devops\/2026\/07\/25\/how-ai-drove-shopify-back-to-clean-code\/5277901\" target=\"_blank\" rel=\"nofollow noopener\">www.theregister.com<\/a><\/p>","protected":false},"excerpt":{"rendered":"<p>E-commerce platform Shopify wants to make reading -to-the-roots approach: AI agents.\u00a0<\/p>","protected":false},"author":1,"featured_media":3636,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[70],"tags":[500,840,86,839,149],"class_list":["post-3634","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-e-commerce-digital-payments","tag-back","tag-clean","tag-code","tag-drove","tag-shopify"],"_links":{"self":[{"href":"https:\/\/justfineinfotech.com\/fr\/wp-json\/wp\/v2\/posts\/3634","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/justfineinfotech.com\/fr\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/justfineinfotech.com\/fr\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/justfineinfotech.com\/fr\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/justfineinfotech.com\/fr\/wp-json\/wp\/v2\/comments?post=3634"}],"version-history":[{"count":1,"href":"https:\/\/justfineinfotech.com\/fr\/wp-json\/wp\/v2\/posts\/3634\/revisions"}],"predecessor-version":[{"id":3635,"href":"https:\/\/justfineinfotech.com\/fr\/wp-json\/wp\/v2\/posts\/3634\/revisions\/3635"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/justfineinfotech.com\/fr\/wp-json\/wp\/v2\/media\/3636"}],"wp:attachment":[{"href":"https:\/\/justfineinfotech.com\/fr\/wp-json\/wp\/v2\/media?parent=3634"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/justfineinfotech.com\/fr\/wp-json\/wp\/v2\/categories?post=3634"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/justfineinfotech.com\/fr\/wp-json\/wp\/v2\/tags?post=3634"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}