Repository navigation
Description
Problem
A Shopify theme builds a page from .liquid files that call each other (render, section, content_for) and from JSON files that place sections on a page. graphify sees almost none of it today:
.liquidis not inCODE_EXTENSIONS, so no extractor reads it.templates/*.jsonandsections/*-group.jsonare skipped as data JSON (_is_config_json), and a template carrying$schemawould be walked as a config file.- So "which pages break if I change this snippet?" has no answer.
graphify affected snippets/card.liquidreturns nothing.
Related, other platform: #2695 (Nuvemshop .tpl). Precedents for the approach: the Blade and EJS extractors.
Proposed behavior
Two small extractors, deterministic, no LLM, no new dependency:
.liquidinside a theme root (an ancestor holdinglayout/theme.liquid; Jekyll and Eleventy also use.liquid, so elsewhere only the file node is emitted):render/include/section/sections/content_for 'block'and{% schema %}block types ->importsedge to the target file.'x' | asset_urland'a.b' | t->referencesedge to the asset or the locale key.
- Theme JSON (templates, section groups,
config/settings_schema.json), routed by path before the generic.jsondispatch:- Each placed section ->
importsedge tosections/<type>.liquid; nested blocks ->blocks/<type>.liquidwhen that file exists. t:keys in schemas -> the key inlocales/*.default.schema.json.
- Each placed section ->
Why imports for composition and references for assets and keys: composition is what affected should follow when a file changes; an asset or a translation key is data the file points at.
Broken references
A static name whose file or locale key does not exist becomes an AMBIGUOUS edge (score 0.2) to a node flagged unresolved: true. Agents and CI can list them. Dynamic names (render some_var) get nothing, rather than a guess.
Out of scope
CSS and JS content of {% stylesheet %} / {% javascript %}, the {% block %} / {% partial %} preview tags, app blocks, config/settings_data.json, section-local blocks.
Plan
Two stacked PRs, one concern each: (1) Liquid extractor with unresolved references; (2) theme JSON extractor and schema t: keys. Happy to adjust relation names or split further.
AI disclosure: written with Claude Code, reviewed and run by me.
Activity
github-actions commentedon Nov 27, 2026
Thanks for opening this issue, @dalexhd. A maintainer will take a look soon.
If you would like to discuss it in real time, come say hi on our Discord server. For longer-form questions and ideas there is also GitHub Discussions.
To help us triage, please make sure the report includes what you expected, what actually happened, and the steps (and a small sample) to reproduce it.
dalexhd commentedon Nov 27, 2026
Scope update after measuring three production themes, one of them Horizon 3.5.1:
//comment, so every| tedge was lost; in Horizon that is 0 → 300 edges. An asset that shares its stem with another one (x.cssandx.js) also lost its edge.inline_asset_content,asset_img_url,presets[].blocks,enabled_on/disabled_on,config/settings_data.json, andcontent_for 'blocks'with@theme(asINFERRED). One commit each.What stays out, because it cannot be resolved statically: app blocks, dynamic
rendernames and non-literal translation keys.dalexhd commentedon Nov 27, 2026
Update on scope: a fourth PR, #5557 (stacked on #5555), extends the theme graph to the constructs the first three leave out:
settings.x, custom elements (JS define to Liquid use), CSS classes (INFERRED), metafields, and.js.liquid/.css.liquidassets, andexplain/affectednow show every line of a repeated edge. It also adds a small grep-versus-graph gate script; on three real themes every category reaches 100 % coverage. It stays stacked until #5553 to #5555 are reviewed, so happy to rebase or split it however you prefer.