@zohofinance/commerce 1.0.0 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +59 -0
- package/package.json +2 -2
- package/ts-dist/mocks/init-theme/.claude/CLAUDE.md +6 -0
- package/ts-dist/mocks/init-theme/.claude/skills/.archive/zcommerce-section-from-design.20260528/SKILL.md +242 -0
- package/ts-dist/mocks/init-theme/.claude/skills/.archive/zcommerce-section-from-design.20260528/inputs/figma.md +81 -0
- package/ts-dist/mocks/init-theme/.claude/skills/.archive/zcommerce-section-from-design.20260528/inputs/screenshot.md +54 -0
- package/ts-dist/mocks/init-theme/.claude/skills/.archive/zcommerce-section-from-design.20260528/inputs/url.md +88 -0
- package/ts-dist/mocks/init-theme/.claude/skills/.archive/zcommerce-section-from-design.20260528/spec-table.md +102 -0
- package/ts-dist/mocks/init-theme/.claude/skills/.archive/zcommerce-section-from-design.20260528/verification/accessibility.md +110 -0
- package/ts-dist/mocks/init-theme/.claude/skills/.archive/zcommerce-section-from-design.20260528/verification/performance.md +127 -0
- package/ts-dist/mocks/init-theme/.claude/skills/.archive/zcommerce-section-from-design.20260528/verification/tokens.md +87 -0
- package/ts-dist/mocks/init-theme/.claude/skills/.archive/zcommerce-section-from-design.20260528/verification/visual-diff.md +123 -0
- package/ts-dist/mocks/init-theme/.claude/skills/.archive/zcommerce-theme-builder.20260528/SKILL.md +605 -0
- package/ts-dist/mocks/init-theme/.claude/skills/.archive/zcommerce-theme-builder.20260528/design-tokens.md +105 -0
- package/ts-dist/mocks/init-theme/.claude/skills/.archive/zcommerce-theme-builder.20260528/page-json-contract.md +58 -0
- package/ts-dist/mocks/init-theme/.claude/skills/.archive/zcommerce-theme-builder.20260528/qa-accessibility.md +35 -0
- package/ts-dist/mocks/init-theme/.claude/skills/.archive/zcommerce-theme-builder.20260528/reference-lookup.md +94 -0
- package/ts-dist/mocks/init-theme/.claude/skills/.archive/zcommerce-theme-builder.20260528/section-anatomy.md +109 -0
- package/ts-dist/mocks/init-theme/.claude/skills/theme-from-figma/SKILL.md +313 -0
- package/ts-dist/mocks/init-theme/.claude/skills/theme-from-figma/agent-hierarchy.md +142 -0
- package/ts-dist/mocks/init-theme/.claude/skills/theme-from-figma/ask-developer.md +113 -0
- package/ts-dist/mocks/init-theme/.claude/skills/theme-from-figma/bootstrap.md +260 -0
- package/ts-dist/mocks/init-theme/.claude/skills/theme-from-figma/build-metrics.md +89 -0
- package/ts-dist/mocks/init-theme/.claude/skills/theme-from-figma/code-quality.md +186 -0
- package/ts-dist/mocks/init-theme/.claude/skills/theme-from-figma/common-pages-agent.md +97 -0
- package/ts-dist/mocks/init-theme/.claude/skills/theme-from-figma/dev-server-and-urls.md +136 -0
- package/ts-dist/mocks/init-theme/.claude/skills/theme-from-figma/exemplars.md +79 -0
- package/ts-dist/mocks/init-theme/.claude/skills/theme-from-figma/figma-discovery.md +138 -0
- package/ts-dist/mocks/init-theme/.claude/skills/theme-from-figma/figma-extraction.md +132 -0
- package/ts-dist/mocks/init-theme/.claude/skills/theme-from-figma/image-sources.md +84 -0
- package/ts-dist/mocks/init-theme/.claude/skills/theme-from-figma/inputs/guidelines-frame.md +178 -0
- package/ts-dist/mocks/init-theme/.claude/skills/theme-from-figma/page-builder.md +322 -0
- package/ts-dist/mocks/init-theme/.claude/skills/theme-from-figma/page-orchestrator.md +199 -0
- package/ts-dist/mocks/init-theme/.claude/skills/theme-from-figma/parallel-fanout.md +152 -0
- package/ts-dist/mocks/init-theme/.claude/skills/theme-from-figma/scripts/a11y.mjs +129 -0
- package/ts-dist/mocks/init-theme/.claude/skills/theme-from-figma/scripts/lint-section.mjs +502 -0
- package/ts-dist/mocks/init-theme/.claude/skills/theme-from-figma/scripts/perf.mjs +134 -0
- package/ts-dist/mocks/init-theme/.claude/skills/theme-from-figma/scripts/pixel-diff.mjs +206 -0
- package/ts-dist/mocks/init-theme/.claude/skills/theme-from-figma/scripts/record-build-metrics.mjs +118 -0
- package/ts-dist/mocks/init-theme/.claude/skills/theme-from-figma/section-builder.md +131 -0
- package/ts-dist/mocks/init-theme/.claude/skills/theme-from-figma/subagent-escalation.md +75 -0
- package/ts-dist/mocks/init-theme/.claude/skills/theme-from-figma/transcription-rules.md +98 -0
- package/ts-dist/mocks/init-theme/.claude/skills/theme-from-figma/verification.md +227 -0
- package/ts-dist/mocks/init-theme/.claude/skills/theme-from-figma/visual-verify-loop.md +117 -0
- package/ts-dist/mocks/init-theme/.claude/skills/theme-from-figma/zcommerce-docs/_index.md +4 -0
- package/ts-dist/mocks/init-theme/.claude/skills/theme-from-figma/zcommerce-docs/assets.md +105 -0
- package/ts-dist/mocks/init-theme/.claude/skills/theme-from-figma/zcommerce-docs/best-practices.md +212 -0
- package/ts-dist/mocks/init-theme/.claude/skills/theme-from-figma/zcommerce-docs/custom-scripts.md +294 -0
- package/ts-dist/mocks/init-theme/.claude/skills/theme-from-figma/zcommerce-docs/i18n.md +155 -0
- package/ts-dist/mocks/init-theme/.claude/skills/theme-from-figma/zcommerce-docs/introduction.md +91 -0
- package/ts-dist/mocks/init-theme/.claude/skills/theme-from-figma/zcommerce-docs/layouts.md +158 -0
- package/ts-dist/mocks/init-theme/.claude/skills/theme-from-figma/zcommerce-docs/pages.md +156 -0
- package/ts-dist/mocks/init-theme/.claude/skills/theme-from-figma/zcommerce-docs/reference/_index.md +4 -0
- package/ts-dist/mocks/init-theme/.claude/skills/theme-from-figma/zcommerce-docs/reference/filters.md +419 -0
- package/ts-dist/mocks/init-theme/.claude/skills/theme-from-figma/zcommerce-docs/reference/global-objects.md +415 -0
- package/ts-dist/mocks/init-theme/.claude/skills/theme-from-figma/zcommerce-docs/reference/schema-types.md +926 -0
- package/ts-dist/mocks/init-theme/.claude/skills/theme-from-figma/zcommerce-docs/reference/tags.md +259 -0
- package/ts-dist/mocks/init-theme/.claude/skills/theme-from-figma/zcommerce-docs/sections.md +203 -0
- package/ts-dist/mocks/init-theme/.claude/skills/theme-from-figma/zcommerce-docs/setup-guide.md +424 -0
- package/ts-dist/mocks/init-theme/.claude/skills/theme-from-figma/zcommerce-docs/snippets.md +70 -0
- package/ts-dist/mocks/init-theme/.claude/skills/theme-from-figma/zcommerce-docs/theme-structure.md +252 -0
- package/ts-dist/mocks/init-theme/.cursor/PLAYBOOK.md +144 -0
- package/ts-dist/mocks/init-theme/.cursor/README.md +6 -0
- package/ts-dist/mocks/init-theme/.cursor/agents/figma-desktop-mobile-parallel.md +48 -0
- package/ts-dist/mocks/init-theme/.cursor/agents/visual-compare.md +221 -0
- package/ts-dist/mocks/init-theme/.cursor/commands/add-field.md +83 -0
- package/ts-dist/mocks/init-theme/.cursor/commands/add-theme-setting.md +200 -0
- package/ts-dist/mocks/init-theme/.cursor/commands/assemble-page.md +72 -0
- package/ts-dist/mocks/init-theme/.cursor/commands/audit-page.md +57 -0
- package/ts-dist/mocks/init-theme/.cursor/commands/build-page-sections.md +110 -0
- package/ts-dist/mocks/init-theme/.cursor/commands/build-section.md +418 -0
- package/ts-dist/mocks/init-theme/.cursor/commands/build-theme.md +307 -0
- package/ts-dist/mocks/init-theme/.cursor/commands/compare-section.md +358 -0
- package/ts-dist/mocks/init-theme/.cursor/commands/create-theme.md +77 -0
- package/ts-dist/mocks/init-theme/.cursor/commands/extract-tokens.md +43 -0
- package/ts-dist/mocks/init-theme/.cursor/commands/fix-section.md +92 -0
- package/ts-dist/mocks/init-theme/.cursor/commands/impact.md +50 -0
- package/ts-dist/mocks/init-theme/.cursor/commands/qa-a11y.md +66 -0
- package/ts-dist/mocks/init-theme/.cursor/commands/qa-i18n.md +110 -0
- package/ts-dist/mocks/init-theme/.cursor/commands/qa-layout.md +127 -0
- package/ts-dist/mocks/init-theme/.cursor/commands/qa-performance.md +72 -0
- package/ts-dist/mocks/init-theme/.cursor/commands/qa-section.md +84 -0
- package/ts-dist/mocks/init-theme/.cursor/commands/qa-sections.md +48 -0
- package/ts-dist/mocks/init-theme/.cursor/commands/qa-theme.md +85 -0
- package/ts-dist/mocks/init-theme/.cursor/commands/redesign-section.md +177 -0
- package/ts-dist/mocks/init-theme/.cursor/commands/refactor-section.md +185 -0
- package/ts-dist/mocks/init-theme/.cursor/commands/sync-theme-settings.md +132 -0
- package/ts-dist/mocks/init-theme/.cursor/commands/validate-page.md +60 -0
- package/ts-dist/mocks/init-theme/.cursor/commands/validate-section-group.md +88 -0
- package/ts-dist/mocks/init-theme/.cursor/commands/validate-theme-settings.md +119 -0
- package/ts-dist/mocks/init-theme/.cursor/examples/design-instructions-template.md +151 -0
- package/ts-dist/mocks/init-theme/.cursor/mcp.json +18 -0
- package/ts-dist/mocks/init-theme/.cursor/rules/README.md +160 -0
- package/ts-dist/mocks/init-theme/.cursor/rules/accessibility.mdc +24 -0
- package/ts-dist/mocks/init-theme/.cursor/rules/add-field.mdc +222 -0
- package/ts-dist/mocks/init-theme/.cursor/rules/add-theme-setting.mdc +39 -0
- package/ts-dist/mocks/init-theme/.cursor/rules/assemble-page.mdc +130 -0
- package/ts-dist/mocks/init-theme/.cursor/rules/audit-page.mdc +92 -0
- package/ts-dist/mocks/init-theme/.cursor/rules/build-section.mdc +178 -0
- package/ts-dist/mocks/init-theme/.cursor/rules/build-theme.mdc +47 -0
- package/ts-dist/mocks/init-theme/.cursor/rules/compare-section.mdc +94 -0
- package/ts-dist/mocks/init-theme/.cursor/rules/create-theme.mdc +78 -0
- package/ts-dist/mocks/init-theme/.cursor/rules/css.mdc +137 -0
- package/ts-dist/mocks/init-theme/.cursor/rules/design-spec-extraction.mdc +255 -0
- package/ts-dist/mocks/init-theme/.cursor/rules/extract-tokens.mdc +43 -0
- package/ts-dist/mocks/init-theme/.cursor/rules/figma-mcp-resolution.mdc +40 -0
- package/ts-dist/mocks/init-theme/.cursor/rules/fix-section.mdc +154 -0
- package/ts-dist/mocks/init-theme/.cursor/rules/general.mdc +30 -0
- package/ts-dist/mocks/init-theme/.cursor/rules/i18n.mdc +85 -0
- package/ts-dist/mocks/init-theme/.cursor/rules/javascript.mdc +85 -0
- package/ts-dist/mocks/init-theme/.cursor/rules/liquid-no-hardcoded-strings.mdc +42 -0
- package/ts-dist/mocks/init-theme/.cursor/rules/liquid.mdc +171 -0
- package/ts-dist/mocks/init-theme/.cursor/rules/mobile-desktop-setting-meta.mdc +34 -0
- package/ts-dist/mocks/init-theme/.cursor/rules/naming-convention.mdc +64 -0
- package/ts-dist/mocks/init-theme/.cursor/rules/pages.mdc +120 -0
- package/ts-dist/mocks/init-theme/.cursor/rules/performance.mdc +51 -0
- package/ts-dist/mocks/init-theme/.cursor/rules/qa-section.mdc +134 -0
- package/ts-dist/mocks/init-theme/.cursor/rules/redesign-section.mdc +147 -0
- package/ts-dist/mocks/init-theme/.cursor/rules/schema-sync.mdc +110 -0
- package/ts-dist/mocks/init-theme/.cursor/rules/schema.mdc +360 -0
- package/ts-dist/mocks/init-theme/.cursor/rules/share-urls.mdc +68 -0
- package/ts-dist/mocks/init-theme/.cursor/skills/browser-verify.md +128 -0
- package/ts-dist/mocks/init-theme/.cursor/skills/design-tokens.md +105 -0
- package/ts-dist/mocks/init-theme/.cursor/skills/page-json-contract.md +87 -0
- package/ts-dist/mocks/init-theme/.cursor/skills/qa-accessibility.md +35 -0
- package/ts-dist/mocks/init-theme/.cursor/skills/reference-lookup.md +88 -0
- package/ts-dist/mocks/init-theme/.cursor/skills/section-anatomy.md +173 -0
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
# Guidelines frame — canonical token source
|
|
2
|
+
|
|
3
|
+
ZCommerce theme Figma files follow a convention: every theme has a **guidelines frame** containing typography scale, color palette, button variants, and component micro-specs. This is the source of truth for design tokens — preferred over `get_variable_defs` because it survives URL-only access (no active Figma desktop selection needed) and captures component-level specs that flat variables can't.
|
|
4
|
+
|
|
5
|
+
## What the frame contains
|
|
6
|
+
|
|
7
|
+
A standard guidelines frame has six regions, all visible in one screenshot:
|
|
8
|
+
|
|
9
|
+
| Region | What it gives the skill |
|
|
10
|
+
|---|---|
|
|
11
|
+
| **Typography table** | Heading font family + weights, body font family, full size scale (H1–H6 + body) with line heights. |
|
|
12
|
+
| **Color palette grid** | Named tokens (PRIMARY, SECONDARY, NEUTRAL, ERROR, SUCCESS, WARNING, LINK, BACKGROUND 1, BACKGROUND 2, BORDER) with weight numbers and hex codes. |
|
|
13
|
+
| **Button variants** | Each variant (outlined, filled-large, filled-small, icon) shown in four states: Default / Hover / Pressed / Disabled. Annotated with font, padding, corner radius. |
|
|
14
|
+
| **Form / input components** | Text input, dropdown, checkbox, radio — each with default + focus + error states. |
|
|
15
|
+
| **Misc components** | Tooltip, badge, breadcrumb, pagination, currency selector, menu header, dropdown — each annotated with padding, font, gap. |
|
|
16
|
+
| **Spacing / radius scale** (sometimes) | Spacing multiples (4, 8, 12, 16, …) and radius scale (sm/md/lg/full) if not implied by component examples. |
|
|
17
|
+
|
|
18
|
+
If a frame is missing some regions, fall back to `get_variable_defs` for the gaps.
|
|
19
|
+
|
|
20
|
+
## How to extract — protocol
|
|
21
|
+
|
|
22
|
+
### Step 1: Get the URL from the developer
|
|
23
|
+
|
|
24
|
+
In Stage 0 of `bootstrap.md`, ask for the guidelines frame URL. Typical form:
|
|
25
|
+
```
|
|
26
|
+
https://www.figma.com/design/{fileKey}/{name}?node-id={nodeId}&m=dev
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
### Step 2: Render the frame
|
|
30
|
+
|
|
31
|
+
```
|
|
32
|
+
mcp__32a68a89-...__get_screenshot
|
|
33
|
+
fileKey: extracted from URL
|
|
34
|
+
nodeId: extracted from URL (replace - with :)
|
|
35
|
+
maxDimension: 2400 # high res — typography px values must be readable
|
|
36
|
+
enableBase64Response: true # inline image so the agent's vision can read it
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
Use `maxDimension: 2400` minimum. Lower than that and the px annotations under each typography sample become unreadable.
|
|
40
|
+
|
|
41
|
+
### Step 3: Read the rendered image with vision
|
|
42
|
+
|
|
43
|
+
The agent reads the PNG directly. Walk it region by region.
|
|
44
|
+
|
|
45
|
+
### Step 4: Extract tokens
|
|
46
|
+
|
|
47
|
+
For each region, populate the corresponding theme tokens.
|
|
48
|
+
|
|
49
|
+
#### Typography → `theme.json`
|
|
50
|
+
|
|
51
|
+
```
|
|
52
|
+
font_heading = "Oswald" (from "Heading" label in typography table)
|
|
53
|
+
font_body = "Lato" (from "Body" label)
|
|
54
|
+
font_h1_size = "112px" (read from H1 sample annotation)
|
|
55
|
+
font_h1_line = "120px"
|
|
56
|
+
font_h1_weight = "600"
|
|
57
|
+
font_h2_size = "56px" (… same for H2–H6)
|
|
58
|
+
font_body_size = "14px"
|
|
59
|
+
font_body_line = "12px"
|
|
60
|
+
font_body_weight = "400"
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
If H4 and H5 have identical specs (common — designers sometimes duplicate), record both as the same value — don't collapse.
|
|
64
|
+
|
|
65
|
+
#### Color palette → `theme.json`
|
|
66
|
+
|
|
67
|
+
Walk the swatch grid. Each cell has: NAME, weight number (100/200/…), hex. Map names to schema keys:
|
|
68
|
+
|
|
69
|
+
| Frame label | theme.json key | tailwind.config.js variable |
|
|
70
|
+
|---|---|---|
|
|
71
|
+
| PRIMARY | `color_primary` | `--color-primary` |
|
|
72
|
+
| SECONDARY | `color_accent` | `--color-accent` (semantic remap — "secondary" in the frame = "accent" in the schema) |
|
|
73
|
+
| NEUTRAL | `color_neutral` | `--color-neutral` |
|
|
74
|
+
| ERROR | `color_error` | `--color-error` |
|
|
75
|
+
| SUCCESS | `color_success` | `--color-success` |
|
|
76
|
+
| WARNING | `color_warning` | `--color-warning` |
|
|
77
|
+
| LINK | `color_link` | `--color-link` |
|
|
78
|
+
| BACKGROUND 1 | `color_background` | `--color-background` |
|
|
79
|
+
| BACKGROUND 2 | `color_surface` | `--color-surface` (secondary surface) |
|
|
80
|
+
| BORDER / BOARDER | `color_border` | `--color-border` |
|
|
81
|
+
|
|
82
|
+
Watch for the "BOARDER" typo — common in real Figma files; treat as `BORDER`.
|
|
83
|
+
|
|
84
|
+
For each color, derive **on-color** automatically (`color_on_primary`, `color_on_background`, etc.) using contrast math: pick `#FFFFFF` or `#000000` whichever yields better WCAG contrast. Verify result is ≥ 4.5:1; if not, log to `NEEDS_REVIEW`.
|
|
85
|
+
|
|
86
|
+
#### Button variants → `theme.json` + per-button CSS
|
|
87
|
+
|
|
88
|
+
Three to four button styles, each with four states. Translate to:
|
|
89
|
+
|
|
90
|
+
```
|
|
91
|
+
radius_button = "999px" (corner radius — visible on annotation, almost always pill or fixed px)
|
|
92
|
+
button_outlined_padding = "16px 100px"
|
|
93
|
+
button_outlined_font = "Lato 600"
|
|
94
|
+
button_outlined_default_border = "#FF24AA" (color sampled from the default state's border)
|
|
95
|
+
button_outlined_default_bg = "transparent"
|
|
96
|
+
button_outlined_hover_bg = "#FF24AA" (sampled from hover state)
|
|
97
|
+
button_outlined_pressed_bg = "#FFFFFF"
|
|
98
|
+
button_outlined_disabled_bg = "#FFE5D9" (light variant)
|
|
99
|
+
button_outlined_disabled_text = "#FFB394"
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
Same shape for filled and icon buttons. Persist to `theme.json` under `buttons.{variant}.{state}.{property}`.
|
|
103
|
+
|
|
104
|
+
These per-state colors feed the `<style>` blocks in `header.liquid`, `footer.liquid`, and any section's CTA buttons. They're more granular than the flat color palette and they're what make hover/focus states look correct on the first build.
|
|
105
|
+
|
|
106
|
+
#### Component micro-specs → snippet defaults
|
|
107
|
+
|
|
108
|
+
Tooltip, badge, breadcrumb, pagination, dropdown, currency selector — each carries:
|
|
109
|
+
- padding (vertical × horizontal)
|
|
110
|
+
- font (family + weight)
|
|
111
|
+
- gap (for pagination)
|
|
112
|
+
|
|
113
|
+
Record as `component_<name>_padding`, `component_<name>_font`, `component_<name>_gap`. These get baked into the corresponding snippet's default styles.
|
|
114
|
+
|
|
115
|
+
#### Spacing scale
|
|
116
|
+
|
|
117
|
+
If the frame has a separate spacing scale, read it. Otherwise infer from button paddings — Lato 16/12/8/4 is the typical scale increment. Persist to `theme.json` under `space_1` through `space_24` (4-multiples).
|
|
118
|
+
|
|
119
|
+
#### Radius scale
|
|
120
|
+
|
|
121
|
+
If a separate scale is shown, read it. Otherwise infer:
|
|
122
|
+
- Button corner radius → `radius_button`
|
|
123
|
+
- Card / surface radius from the swatch tiles themselves → `radius_card`
|
|
124
|
+
- Input radius from form components → `radius_input`
|
|
125
|
+
|
|
126
|
+
Common defaults if the frame doesn't specify:
|
|
127
|
+
- `radius_sm` = 4px, `radius_md` = 8px, `radius_lg` = 16px, `radius_full` = 9999px
|
|
128
|
+
|
|
129
|
+
### Step 5: Persist
|
|
130
|
+
|
|
131
|
+
Write the extracted tokens to:
|
|
132
|
+
|
|
133
|
+
1. `settings/theme.json` — the full token set.
|
|
134
|
+
2. `figma-variables.json` — W3C-shaped tokens (`$type`, `$value`) for use by sections at build time.
|
|
135
|
+
3. `.claude/scratchpad/<theme_name>/bootstrap/guidelines-extraction.md` — a human-readable extraction log so the developer can review what was read.
|
|
136
|
+
|
|
137
|
+
### Step 6: Hand off
|
|
138
|
+
|
|
139
|
+
Bootstrap continues to retokenize header.liquid + footer.liquid, lock them, and pass control to the parallel page agents.
|
|
140
|
+
|
|
141
|
+
## Failure modes
|
|
142
|
+
|
|
143
|
+
| Problem | Fallback |
|
|
144
|
+
|---|---|
|
|
145
|
+
| No guidelines frame in the file | Ask the developer to point at the page that has the most styled elements. The skill samples colors / fonts from there but the result is lower fidelity — log this as `NEEDS_REVIEW` so the developer knows tokens may need manual review. |
|
|
146
|
+
| Frame is partial (e.g. typography but no buttons) | Extract what's there. For missing regions, call `get_variable_defs` to fill gaps. Anything still missing → ask the developer once. |
|
|
147
|
+
| Hex codes unreadable in the screenshot | Re-render with `maxDimension: 3600`. If still unreadable, fall back to the live Figma variable values for that node via `get_variable_defs`. |
|
|
148
|
+
| Two button variants with the same padding spec (designer error) | Use both — they may be intentional duplicates. Don't auto-deduplicate without asking. |
|
|
149
|
+
| Typo in palette names (e.g. "BOARDER" for BORDER) | Map by closest schema name. Log the typo in extraction notes so the designer can fix it in the source file. |
|
|
150
|
+
|
|
151
|
+
## What this replaces
|
|
152
|
+
|
|
153
|
+
- The old `Preset:` block in the developer's input (primary / accent / fonts / radius) is gone. The guidelines frame supplies all of it.
|
|
154
|
+
- `get_variable_defs` becomes a fallback, not the primary path. Useful for files that pre-date the guidelines-frame convention.
|
|
155
|
+
- The "extract-tokens" command from the old skill is fully absorbed into Stage 0 — no separate step.
|
|
156
|
+
|
|
157
|
+
## Example
|
|
158
|
+
|
|
159
|
+
For the file at `<your-figma-file-url>` the guidelines frame yields:
|
|
160
|
+
|
|
161
|
+
```
|
|
162
|
+
font_heading = Oswald
|
|
163
|
+
font_body = Lato
|
|
164
|
+
H1: 112/120 · H2: 56/56 · H3: 40/44 · H4: 28/28 · H5: 28/28 · H6: 16/20 · Body: 14/12
|
|
165
|
+
color_primary = #FF24AA (verify hex via re-render at 3600px)
|
|
166
|
+
color_accent = (sampled from SECONDARY swatch)
|
|
167
|
+
color_neutral, error, success, warning, link, background_1, background_2, border = (sampled)
|
|
168
|
+
radius_button = 999px (pill)
|
|
169
|
+
button_outlined = padding 16×100, Lato 600
|
|
170
|
+
button_filled_lg = padding 12×40, Lato 600
|
|
171
|
+
button_filled_sm = padding 16×60, Lato 600
|
|
172
|
+
tooltip_padding = 8px, Lato 500
|
|
173
|
+
badge_padding = 12×8, Lato 500
|
|
174
|
+
breadcrumb_padding= 12×8, Lato 500
|
|
175
|
+
pagination_gap = 24px
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
All extracted in one screenshot read — zero developer input beyond the URL.
|
|
@@ -0,0 +1,322 @@
|
|
|
1
|
+
# DEPRECATED — use page-orchestrator.md (Level A)
|
|
2
|
+
|
|
3
|
+
This file described the old flat model where one agent built an entire page. **Do not use.**
|
|
4
|
+
|
|
5
|
+
Use instead:
|
|
6
|
+
- `agent-hierarchy.md` — Level 0 / A / B roles
|
|
7
|
+
- `page-orchestrator.md` — **Level A** (identify sections, spawn Level B, assemble page)
|
|
8
|
+
- `section-builder.md` — **Level B** (build one section from section Figma node only)
|
|
9
|
+
- `parallel-fanout.md` — spawn templates
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# Page builder (archived reference)
|
|
14
|
+
|
|
15
|
+
Each of the 5 parallel agents in Stage 1 executed this workflow. Kept for asset-extraction notes only.
|
|
16
|
+
|
|
17
|
+
**Read alongside this doc** (the official ZCommerce reference, bundled at `zcommerce-docs/`):
|
|
18
|
+
- `zcommerce-docs/sections.md` — section structure, schema rules, block patterns. Read before writing any `.liquid` section.
|
|
19
|
+
- `zcommerce-docs/snippets.md` — snippet variable scoping (the bug-prone area).
|
|
20
|
+
- `zcommerce-docs/reference/schema-types.md` — all valid `{% schema %}` field types and their default JSON shapes (text, url, image_picker, color, range, select, etc.). Read this when defining schema fields, not guessed from memory.
|
|
21
|
+
- `zcommerce-docs/reference/filters.md` — every supported Liquid filter. Lint enforces this list; reading the docs first avoids the trip.
|
|
22
|
+
- `zcommerce-docs/reference/global-objects.md` — `organization`, `pageinfo`, `cart`, `product`, `section`, etc. Read before accessing any top-level Liquid variable.
|
|
23
|
+
- `zcommerce-docs/reference/tags.md` — the 13 supported Liquid tags. **Do NOT use `{% paginate %}`, `{% form %}`, `{% javascript %}`, `{% stylesheet %}` — they don't exist in this engine.**
|
|
24
|
+
- `zcommerce-docs/i18n.md` — translation key conventions; the runtime/schema split that crashed a prior build.
|
|
25
|
+
- `zcommerce-docs/assets.md` — `asset_url` filter usage; fingerprint.json contract.
|
|
26
|
+
- `zcommerce-docs/best-practices.md` — performance, security, accessibility rules (defer scripts, escape user output, semantic HTML).
|
|
27
|
+
|
|
28
|
+
## Inputs you receive
|
|
29
|
+
|
|
30
|
+
From the orchestrator (see `parallel-fanout.md`):
|
|
31
|
+
- Your assigned page name and Figma URL.
|
|
32
|
+
- The theme folder path.
|
|
33
|
+
- Your scratchpad path.
|
|
34
|
+
- The list of locked files you must not modify.
|
|
35
|
+
|
|
36
|
+
## Asset extraction protocol — applies to ALL agents
|
|
37
|
+
|
|
38
|
+
Every image, logo, icon, font, or graphic used by any section MUST come from the input Figma — never from another theme's `assets/`. After bootstrap, the theme's `assets/` folder is empty (only `fingerprint.json`). Each agent populates it for the assets its sections need.
|
|
39
|
+
|
|
40
|
+
### Where assets come from
|
|
41
|
+
|
|
42
|
+
1. **Figma exportable assets.** Most Figma frames have image/icon layers marked as exportable. Use the Dev-Mode MCP:
|
|
43
|
+
- `mcp__32a68a89-...__get_design_context` on the parent frame returns asset download URLs as part of the response (alongside the structured tree).
|
|
44
|
+
- Each exportable asset has a node ID and an export format (svg, png@2x, etc.).
|
|
45
|
+
2. **Region crops via screenshot.** For logos, icons, or graphic regions that aren't explicit export targets, use `get_screenshot` with `maxDimension` high enough for the use case (4× for logos/icons, 2× for hero images).
|
|
46
|
+
3. **Fonts.** Read the font family + weights from the guidelines frame (already in `theme.json`). Two options:
|
|
47
|
+
- Reference Google Fonts via `layouts/theme.liquid` `<link>` tag — preferred for fonts available there (Inter, Lato, Oswald, Playfair, Roboto, etc.).
|
|
48
|
+
- Download `.woff2` files manually if the font is proprietary and the developer provides them.
|
|
49
|
+
|
|
50
|
+
### How to fetch and save
|
|
51
|
+
|
|
52
|
+
The skill's sandbox can't directly download from `figma.com` URLs (the proxy blocks them). Two working paths:
|
|
53
|
+
|
|
54
|
+
**Path A: base64 inline (works for screenshots).**
|
|
55
|
+
Call `get_screenshot` with `enableBase64Response: true`. The image comes back inline. Save the base64 to a file using bash + `base64 -d`. Use this for logo/icon crops.
|
|
56
|
+
|
|
57
|
+
**Path B: developer-staged assets folder (for arbitrary image exports).**
|
|
58
|
+
For images the developer pre-exported from Figma into `.claude/scratchpad/<theme>/figma-assets/`, the agent just `cp` them into `assets/` and renames per the naming convention below.
|
|
59
|
+
|
|
60
|
+
If neither path works (e.g. an asset is only in Figma and can't be screenshotted clean), **ask the developer to export it manually** and surface a `NEEDS_REVIEW` item — never use a placeholder asset from another source.
|
|
61
|
+
|
|
62
|
+
### Naming convention
|
|
63
|
+
|
|
64
|
+
Each section namespaces its assets with the section name:
|
|
65
|
+
|
|
66
|
+
```
|
|
67
|
+
assets/
|
|
68
|
+
hero-banner-bg-desktop.webp
|
|
69
|
+
hero-banner-bg-mobile.webp
|
|
70
|
+
hero-banner-logo-overlay.svg
|
|
71
|
+
product-card-placeholder.webp
|
|
72
|
+
footer-logo.svg
|
|
73
|
+
footer-icon-instagram.svg
|
|
74
|
+
footer-icon-twitter.svg
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
Prefix with the section name → no collisions when multiple sections need a similarly-named asset. Use kebab-case throughout.
|
|
78
|
+
|
|
79
|
+
### Wire into Liquid
|
|
80
|
+
|
|
81
|
+
Reference assets via `asset_url` filter, NOT hardcoded paths:
|
|
82
|
+
|
|
83
|
+
```liquid
|
|
84
|
+
<img src="{{ 'hero-banner-bg-desktop.webp' | asset_url }}" alt="{{ section.settings.alt }}">
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
For section settings that accept an image (via `image_picker`), the developer can override at customization time:
|
|
88
|
+
|
|
89
|
+
```liquid
|
|
90
|
+
{% liquid
|
|
91
|
+
assign hero_bg = section.settings.hero_image | default: 'hero-banner-bg-desktop.webp'
|
|
92
|
+
%}
|
|
93
|
+
<img src="{{ hero_bg | asset_url }}" alt="...">
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
### Update fingerprint.json
|
|
97
|
+
|
|
98
|
+
After adding new assets, regenerate `fingerprint.json` (the build pipeline does this on `npx @zohofinance/commerce theme build`, but for dev preview you may need a manual entry). Each agent appends its new asset names to the map.
|
|
99
|
+
|
|
100
|
+
### Forbidden patterns
|
|
101
|
+
|
|
102
|
+
- Copying assets from any other source — all assets must be extracted from the input Figma.
|
|
103
|
+
- `<img src="https://cdn.{external}.com/...">` — hot-linking external CDNs.
|
|
104
|
+
- Hardcoded image URLs that don't go through `asset_url` filter.
|
|
105
|
+
- Reusing icon SVGs from any external source — they will have the wrong stroke style.
|
|
106
|
+
|
|
107
|
+
The `verify-theme.mjs` `assets_diverge` check catches these violations.
|
|
108
|
+
|
|
109
|
+
## Special case: the index agent
|
|
110
|
+
|
|
111
|
+
The index agent runs **first**, alone, before the four other page agents fan out. It has two extra responsibilities:
|
|
112
|
+
|
|
113
|
+
### 1. Extract and build the header
|
|
114
|
+
|
|
115
|
+
From the index Figma frame, identify the top region — typically the first 80–120 px on desktop, the first ~60 px on mobile. This is the site header.
|
|
116
|
+
|
|
117
|
+
- Call `get_screenshot` with a region selector or crop the full screenshot to the header region.
|
|
118
|
+
- Build `sections/header.liquid` and `sections/header-group.json` from this design.
|
|
119
|
+
- Update `i18n/en.json` (runtime strings) AND `i18n/en.schema.json` (settings labels) with the new keys.
|
|
120
|
+
- Use the design system primitives from `theme.json` (colors, fonts, button styles, etc.) — never hardcode hex or px font sizes.
|
|
121
|
+
- Required elements that the schema MUST support (even if hidden by default): logo, primary nav, search trigger, account icon, cart icon with item count badge, mobile nav drawer toggle.
|
|
122
|
+
|
|
123
|
+
### 2. Extract and build the footer
|
|
124
|
+
|
|
125
|
+
From the index Figma frame, identify the bottom region — the last 200–400 px depending on the design. This is the site footer.
|
|
126
|
+
|
|
127
|
+
- Crop the screenshot to the footer region.
|
|
128
|
+
- Build `sections/footer.liquid` and `sections/footer-group.json`.
|
|
129
|
+
- Append i18n keys.
|
|
130
|
+
- Required elements: logo or brand name, primary footer nav (columns), social-media row, newsletter signup form, copyright line. Skip whichever the design doesn't show but keep the schema fields so the admin can enable them later.
|
|
131
|
+
|
|
132
|
+
### 3. Publish the ready-marker
|
|
133
|
+
|
|
134
|
+
After header.liquid and footer.liquid pass the lint AND the verification gates against their respective Figma crops, write a marker file:
|
|
135
|
+
|
|
136
|
+
```
|
|
137
|
+
touch .claude/scratchpad/<theme>/header-footer-ready
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
This unblocks the four other page agents. **Do not write this marker if either file failed gates** — the marker is the contract that the locked files are correct.
|
|
141
|
+
|
|
142
|
+
### 4. Build the rest of the index page
|
|
143
|
+
|
|
144
|
+
After the marker, continue with the index-page sections (hero, features, products, CTA, newsletter, etc.) using the standard workflow below.
|
|
145
|
+
|
|
146
|
+
## What the other four agents do at startup
|
|
147
|
+
|
|
148
|
+
Before doing anything, wait for the marker file:
|
|
149
|
+
|
|
150
|
+
```bash
|
|
151
|
+
while [ ! -f .claude/scratchpad/<theme>/header-footer-ready ]; do sleep 5; done
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
Once the marker exists, header.liquid and footer.liquid are locked — read them as you would any locked file, but never modify.
|
|
155
|
+
|
|
156
|
+
## Outputs you produce
|
|
157
|
+
|
|
158
|
+
- New `.liquid` files in `sections/`.
|
|
159
|
+
- Updated `pages/<page>.json` wiring those sections.
|
|
160
|
+
- New translation keys appended to `i18n/en.json` and `en.schema.json`.
|
|
161
|
+
- A `report.md` in your scratchpad subdirectory.
|
|
162
|
+
|
|
163
|
+
---
|
|
164
|
+
|
|
165
|
+
## Workflow (5 phases — keep moving, don't ask questions mid-build)
|
|
166
|
+
|
|
167
|
+
### Phase 1 — Intake (~30s)
|
|
168
|
+
|
|
169
|
+
Pull from Figma in **parallel** (single message, multiple tool calls):
|
|
170
|
+
1. `get_metadata` on the desktop frame.
|
|
171
|
+
2. `get_screenshot` on the desktop frame → save to scratchpad.
|
|
172
|
+
3. `get_metadata` on the mobile frame.
|
|
173
|
+
4. `get_screenshot` on the mobile frame → save to scratchpad.
|
|
174
|
+
5. `get_design_context` on both → save to scratchpad as `figma-context.json`.
|
|
175
|
+
|
|
176
|
+
If the URL points to a single combined frame, ask `get_design_context` to identify desktop and mobile sub-frames within it.
|
|
177
|
+
|
|
178
|
+
### Phase 2 — Section plan (~15s)
|
|
179
|
+
|
|
180
|
+
From the design context, identify the distinct sections on the page top-to-bottom. Typical breakdown:
|
|
181
|
+
|
|
182
|
+
- **Index:** hero, value props / feature row, featured products, image+text alternating blocks, testimonials, newsletter, CTA banner.
|
|
183
|
+
- **Listing:** category header, filter rail (desktop) / filter drawer (mobile), sort dropdown, product grid, pagination.
|
|
184
|
+
- **Product:** image gallery, product info (title/price/options/CTA), description tabs, related products, reviews.
|
|
185
|
+
- **Blog list:** page header, post grid, pagination.
|
|
186
|
+
- **Blog detail:** article body, author + meta, related posts, comment section.
|
|
187
|
+
|
|
188
|
+
Write this list to `scratchpad/.../sections.plan.md`:
|
|
189
|
+
```
|
|
190
|
+
SECTION 1: hero-banner (anchored exemplar: <theme>/sections/hero-banner.liquid, 82 lines)
|
|
191
|
+
SECTION 2: value-props (exemplar: <theme>/sections/value-props-row.liquid)
|
|
192
|
+
SECTION 3: featured-products-grid (exemplar: <theme>/sections/product-collection.liquid, 89 lines)
|
|
193
|
+
...
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
For each section, pick an **anchor exemplar** from `exemplars.md`. The exemplar is a **logic and code-structure reference only** — it sets the structural budget (DOM depth, class count, line count) and shows the right Liquid patterns / schema patterns / web-component wiring for this archetype.
|
|
197
|
+
|
|
198
|
+
**Critical: do NOT copy visual decisions from the exemplar.** Colors, fonts, spacing, radius, shadows, layout density — every design choice comes from your assigned Figma frame and the theme tokens in `theme.json` / `figma-variables.json`. Two sections of the same archetype (say two hero banners from two different themes) should share their Liquid skeleton and visual approach to nesting, but look completely different in every other respect. If you find yourself thinking "I'll use the same gap and radius as the exemplar," stop — those values come from your Figma, not from the exemplar.
|
|
199
|
+
|
|
200
|
+
### Phase 3 — Spec table (~1 min for the whole page)
|
|
201
|
+
|
|
202
|
+
For each section in the plan, fill out a row-per-property spec table. Format defined in the previous skill's `spec-table.md` — same rules:
|
|
203
|
+
- One CSS property per row.
|
|
204
|
+
- Numeric values resolved against `figma-variables.json`.
|
|
205
|
+
- Tailwind / CSS variable column filled in (must reference classes that actually exist in `tailwind.config.js`).
|
|
206
|
+
|
|
207
|
+
Persist to `scratchpad/.../spec-table.md`. This is the contract.
|
|
208
|
+
|
|
209
|
+
**Hard rule:** No row may be left unresolved (`?`) before phase 4 starts. If the design is genuinely ambiguous, mark it in the report as `NEEDS_REVIEW` and continue with your best resolution.
|
|
210
|
+
|
|
211
|
+
### Phase 4 — Build (parallel section writes, with write-time lint)
|
|
212
|
+
|
|
213
|
+
For each section in the plan, **in parallel where dependencies allow**, build the section file:
|
|
214
|
+
|
|
215
|
+
1. **Plan the DOM** before writing. Identify the elements, hierarchy, and class lists.
|
|
216
|
+
2. **Run the write-time lint** mentally (see `code-quality.md`):
|
|
217
|
+
- Tailwind classes per element ≤ 12.
|
|
218
|
+
- DOM depth ≤ 6.
|
|
219
|
+
- No empty wrapper divs.
|
|
220
|
+
- Every schema field will be wired into markup.
|
|
221
|
+
- Section file projected ≤ 250 lines.
|
|
222
|
+
- Heading hierarchy correct (section starts at `<h2>`, not `<h1>`).
|
|
223
|
+
3. **Compare to anchor exemplar.** If your planned section has materially more elements, deeper nesting, or more classes than the exemplar, simplify before writing.
|
|
224
|
+
4. **Write the file.** Follow the anatomy from the old `zcommerce-theme-builder` SKILL (script/style/liquid/conditional/wrapper/schema in that order — yes, the anatomy rule survives, the *anatomy* docs were correct).
|
|
225
|
+
5. **Run `scripts/lint-section.mjs <file>`** — automated check of the same budgets. If it fails, the file is rejected; fix and re-write before continuing.
|
|
226
|
+
|
|
227
|
+
You may build multiple sections concurrently using the file tools — the lint is per-file, the budgets are per-file, no cross-section coupling at this phase.
|
|
228
|
+
|
|
229
|
+
### Phase 5 — Verify (~1 min) — MANDATORY, BLOCKING
|
|
230
|
+
|
|
231
|
+
Once all sections are written:
|
|
232
|
+
|
|
233
|
+
1. **Update `pages/<page>.json`** to wire the sections in order with their default settings.
|
|
234
|
+
2. **Append translation keys** to `i18n/en.json` AND `i18n/en.schema.json`. Use append-only writes (read, splice, write) — never overwrite.
|
|
235
|
+
- **CRITICAL distinction:** runtime keys (used in markup via `'key' | t`) MUST live in `en.json`. Schema-label keys (used in `{% schema %}` via `"t:key"`) MUST live in `en.schema.json`. Putting runtime keys in en.schema.json causes the page to crash at render time — this exact bug shipped in a prior build and is now caught by `lint-section.mjs` → `i18n_keys_resolve`. **Re-run the lint** on every section after appending i18n to confirm 0 misplaced keys before continuing.
|
|
236
|
+
3. **Start the dev server** if it's not already running (the orchestrator may have started it). Capture the port.
|
|
237
|
+
4. **Run the four verification scripts via bash. These are MANDATORY — not optional.** A page agent that does not produce all four output JSON files is treated as a failure regardless of any other claim of success.
|
|
238
|
+
```bash
|
|
239
|
+
node .claude/skills/theme-from-figma/scripts/pixel-diff.mjs \
|
|
240
|
+
--rendered-url http://localhost:<port>/<page_route> \
|
|
241
|
+
--figma-image .claude/scratchpad/<theme>/pages/<page>/figma-desktop.png \
|
|
242
|
+
--viewport 1440x900 \
|
|
243
|
+
--out .claude/scratchpad/<theme>/pages/<page>/verify/pixel-diff-desktop.json
|
|
244
|
+
|
|
245
|
+
node .claude/skills/theme-from-figma/scripts/a11y.mjs \
|
|
246
|
+
--url http://localhost:<port>/<page_route> \
|
|
247
|
+
--out .claude/scratchpad/<theme>/pages/<page>/verify/axe.json
|
|
248
|
+
|
|
249
|
+
node .claude/skills/theme-from-figma/scripts/perf.mjs \
|
|
250
|
+
--url http://localhost:<port>/<page_route> \
|
|
251
|
+
--out .claude/scratchpad/<theme>/pages/<page>/verify/lighthouse.json
|
|
252
|
+
```
|
|
253
|
+
5. Repeat pixel-diff for mobile viewport (`--viewport 375x812`, `--figma-image figma-mobile.png`).
|
|
254
|
+
6. **Read all four JSON outputs** and classify pass/fail per the gates in `verification.md`.
|
|
255
|
+
|
|
256
|
+
**Mandatory output contract.** After verify, the following files MUST exist:
|
|
257
|
+
```
|
|
258
|
+
.claude/scratchpad/<theme>/pages/<page>/verify/
|
|
259
|
+
pixel-diff-desktop.json
|
|
260
|
+
pixel-diff-mobile.json
|
|
261
|
+
axe.json
|
|
262
|
+
lighthouse.json
|
|
263
|
+
```
|
|
264
|
+
If any are missing or empty, the agent records `gates_unrun: true` in its report and exits with `FAILED` — the stage-2 coordinator will not let the theme ship. There is no "passed without running" path.
|
|
265
|
+
|
|
266
|
+
**Threshold contract.** A page does not pass if:
|
|
267
|
+
- `pixel-diff` mean ΔE ≥ 5 (vs the previous 2.0 — relaxed slightly for real-world font rendering)
|
|
268
|
+
- `pixel-diff` max ΔE ≥ 15 in any region (vs 5 — tightened on max because that's where structural mismatches show up)
|
|
269
|
+
- `pixel-diff` mismatch ratio ≥ 0.20 (twenty percent — if more than 1/5 of pixels differ from the Figma, the section is structurally wrong, not just a minor visual tweak)
|
|
270
|
+
- `axe.json` has any critical or serious violation
|
|
271
|
+
- `lighthouse.json` performance score < 85 on mobile (relaxed from 90 due to real-world LCP variance on dev server) OR LCP > 4s OR CLS > 0.25
|
|
272
|
+
|
|
273
|
+
The threshold for `pixel-diff mismatch ratio` is the critical one for catching "your header is identical to a sibling theme" failures — that's the kind of mismatch that's huge (well over 20% of pixels differ) and unambiguous.
|
|
274
|
+
|
|
275
|
+
### Phase 6 — Iterate (max 3 passes)
|
|
276
|
+
|
|
277
|
+
If any gate fails, locate the failing element(s) from the script output, edit the section file(s), and re-run verification. Cap at **3 iterations**. After the 3rd failed iteration, write the remaining issues to your `report.md` under `NEEDS_REVIEW` and exit — Stage 2 consolidation will decide whether to surface them to the user.
|
|
278
|
+
|
|
279
|
+
Inside the iteration loop:
|
|
280
|
+
- Token mismatch / class wrong → edit and re-run pixel-diff only.
|
|
281
|
+
- A11y violation → edit and re-run a11y only.
|
|
282
|
+
- Perf regression → edit (usually image size, font preload, lazy-load attrs) and re-run perf only.
|
|
283
|
+
|
|
284
|
+
Don't re-run all three on every iteration — only the failing gate. This keeps iterations short.
|
|
285
|
+
|
|
286
|
+
### Phase 7 — Write report.md
|
|
287
|
+
|
|
288
|
+
Final action before exit:
|
|
289
|
+
|
|
290
|
+
```
|
|
291
|
+
PAGE: index
|
|
292
|
+
SECTIONS BUILT: 5
|
|
293
|
+
- hero-banner (98 lines, 5 depth, 11 max classes)
|
|
294
|
+
- feature-props-row (62 lines, 4 depth, 8 max classes)
|
|
295
|
+
- featured-products-grid (74 lines, 4 depth, 9 max classes)
|
|
296
|
+
- cta-banner (45 lines, 3 depth, 7 max classes)
|
|
297
|
+
- newsletter-signup (58 lines, 4 depth, 10 max classes)
|
|
298
|
+
|
|
299
|
+
GATES:
|
|
300
|
+
pixel-diff desktop: pass (avg ΔE 1.2, max ΔE 2.8)
|
|
301
|
+
pixel-diff mobile: pass (avg ΔE 1.4, max ΔE 3.1)
|
|
302
|
+
a11y: pass (0 critical, 0 serious, 1 moderate)
|
|
303
|
+
perf desktop: pass (perf 96, LCP 1.4s, CLS 0.01)
|
|
304
|
+
perf mobile: pass (perf 91, LCP 2.2s, CLS 0.03)
|
|
305
|
+
|
|
306
|
+
ITERATIONS: 1
|
|
307
|
+
|
|
308
|
+
NEEDS_REVIEW:
|
|
309
|
+
- hero-banner: figma uses font weight 850, nearest available is 800.
|
|
310
|
+
```
|
|
311
|
+
|
|
312
|
+
Stage 2 collects these reports.
|
|
313
|
+
|
|
314
|
+
---
|
|
315
|
+
|
|
316
|
+
## Things to NOT do
|
|
317
|
+
|
|
318
|
+
- Don't ask the user a question mid-build. Phase 1 may surface a missing input (mobile frame), but that should have been caught at preconditions in SKILL.md. If you get here without inputs, fail fast with a clear message; don't try to recover by asking the user — your concurrent siblings won't know to wait.
|
|
319
|
+
- Don't modify the locked files (header, footer, theme.json, tailwind.config.js).
|
|
320
|
+
- Don't touch other pages' sections or JSONs.
|
|
321
|
+
- Don't re-extract Figma tokens. Bootstrap did that. Trust `figma-variables.json`.
|
|
322
|
+
- Don't reformat sections you didn't write. Even if `header.liquid` looks like it could use cleanup, leave it alone — Stage 2 handles cross-page concerns.
|