feat(wix-headless): fully LLM-generated home page (CODEAI-696, experiment)#411
Draft
yanivefraim wants to merge 2 commits into
Draft
feat(wix-headless): fully LLM-generated home page (CODEAI-696, experiment)#411yanivefraim wants to merge 2 commits into
yanivefraim wants to merge 2 commits into
Conversation
…ment) Drops the index.astro template entirely — the whole main page is authored by an LLM per site (maximum non-templated variety). The deterministic shell (global.css, astro.config, Layout, Navigation, Footer) is unchanged. - compose.mjs: new REQUIRED `homePath` input — the complete LLM-generated src/pages/index.astro, written verbatim. No index template; compose errors (NO_HOME) if homePath is missing. Manifest records home = "llm-generated". - Removed references/astro/templates/index.astro. - BUILD-astro.md: documents the home-page generator dispatch + home contract (Layout import + wrapper; design-token utility classes; real copy, no placeholders; one data-decorative-slot="hero" + a section slot; one <!-- home:<pack> --> marker per loaded home-contributing pack). Branched from main (single-template baseline) so the diff is purely "home is now LLM-generated". Verified: compose writes the LLM home verbatim + the shell; errors when homePath is absent. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…AI-696)
The spacing scale is named with t-shirt sizes (2xs..4xl) — the same names
Tailwind's width utilities use — so max-w-3xl/md/etc. resolve to the SPACING
token (e.g. --spacing-3xl 6rem -> ~96px), NOT a container, even when a matching
--container-* is defined. Compiled CSS confirms: .max-w-3xl{max-width:var(--spacing-3xl)}.
This collapsed LLM-generated home text to one word per line in ~2/3 of full-home
runs; hand-authored templates/fragments dodge it by only ever using max-w-6xl /
max-w-prose.
- STYLING.md: corrected the (wrong) claim that max-w-3xl maps to --container-3xl;
documented that spacing wins and only max-w-6xl / container-reading / arbitrary
max-w-[..] are safe.
- BUILD-astro.md: added an explicit width rule to the LLM home contract — never
use max-w-md/lg/xl/2xl/3xl/4xl/xs/sm.
Guardrail only (no token rename); matches what the deterministic templates already do.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
yanivefraim
added a commit
that referenced
this pull request
Jun 17, 2026
…ration (CODEAI-696) The 3-run test of full-page generation hit the spacing/container name collision 3/3 (every home used max-w-3xl → 96px; one footer used max-w-md → 16px), collapsing mid-page sections and a footer. Same footgun as #411, now exposed on more surfaces since the LLM authors the header/footer/home. - BUILD-astro.md: added the width rule to the full-page contract (never max-w-md/lg/xl/2xl/3xl/4xl/xs/sm; only max-w-6xl / container-reading / arbitrary max-w-[..]). - STYLING.md: corrected the wrong claim that max-w-3xl maps to --container-3xl; documented that the spacing token wins. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
yanivefraim
added a commit
that referenced
this pull request
Jun 22, 2026
…ision (CODEAI-696) (#416) * fix(wix-headless): move spacing to Tailwind's numeric scale, killing the max-w-<size> collision (CODEAI-696) Root cause: compose.mjs emitted a named --spacing-* scale using t-shirt sizes (md, 3xl, …). In Tailwind v4 the width family (max-w-/w-/min-w-) is generated from the --spacing-* namespace, so `max-w-3xl` resolved to --spacing-3xl (~96px) instead of --container-3xl — collapsing any LLM/author-written reading column to one word per line. Hand-written templates dodged it; generated layout (#411/#412) tripped it. Fix — adopt Tailwind v4's built-in numeric spacing (the skill's values already match it 1:1, e.g. md=1rem=`4`, 4xl=6rem=`24`), removing the named scale so nothing collides with width keys: - compose.mjs: stop emitting named --spacing-*; drop it from REQUIRED, the DESIGN.md read, and the container≠spacing check. Tailwind's --spacing base (numeric gap-4/py-24/…) is used directly. Containers kept — now max-w-md/3xl/6xl resolve to --container-* correctly. - emit-design-tokens.mjs: stop projecting named --spacing-* into design-tokens.css / site.d.ts. - Migrated 112 spacing utility classes (gap-md→gap-4, py-4xl→py-24, …) and 122 var(--spacing-*) refs (→ literal rem) across 27 template + instruction-doc files. - Spec docs (DESIGN_MD, DESIGN_SYSTEM, STYLING): dropped the spacing token group (Designer no longer authors spacing) and corrected STYLING's (wrong) claim that max-w-3xl maps to --container-3xl. Verified: compose emits 0 --spacing-* and the 4 --container-* tokens; 0 leftover t-shirt spacing classes/var refs across templates+docs; both scripts parse. Live compiled-CSS/Playwright proof pending a network-capable build env. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * fix(wix-headless): drop stale var(--spacing-*) fallback guidance in gift-cards COMPONENTS (CODEAI-696) The gift-cards component doc still told authors to fall back to var(--spacing-*), which no longer exists after the numeric-spacing migration. Point at Tailwind's numeric spacing instead. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * fix(wix-headless): address #416 review — purge stale --spacing-* references (CODEAI-696) Review (adimara) flagged comments/docs that still referenced the removed named --spacing-* scale, plus a real breakage the main-merge re-introduced. Doc/comment fixes (stale references): - templates/global.css @theme comment: drop --spacing-* from the substituted list; reframe as "spacing is Tailwind numeric; never add --spacing-* (it powers the width utilities)". - gift-cards/components-gift-cards.css header: drop --spacing-{…} from reused tokens. - bookings/services/[slug].astro: the max-w warning's spacing-fallback rationale is obsolete post-fix — reframed (max-w-* now resolves to --container-*). - stores/ecom/COMPONENTS_CSS.md, shared/IMPLEMENTER.md: drop `spacing` from the DESIGN.md vocabulary list; swap the --spacing-md token example for --radius-md. - designer/INSTRUCTIONS.md: "spacing scale from @theme" → Tailwind numeric. Real functional fix: - bookings/components-bookings.css: the merged-in bookings rewrite (610d0ea) shipped 6 var(--spacing-sm/md/xl/xs) refs that resolve to nothing after the fix — migrated to literal rem (sm=.75 md=1 lg=1.5 xl=2 xs=.5). Forward guard (review point on namespace fragility): - STYLING.md: note that --spacing-* must never be reintroduced (it shadows max-w-*); custom spacing *values* should use a different namespace (e.g. --rhythm-*). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Experiment: drop the home template, generate the whole main page with the LLM
Branched off main (single-template baseline) so the diff is purely "home is now LLM-generated." Maximal end of the variety spectrum: no
index.astrotemplate.Change
compose.mjs— requiredhomePathinput: the complete LLM-authoredsrc/pages/index.astro, written verbatim. No template, no fallback — errors (NO_HOME) if absent. Manifest:home: "llm-generated".references/astro/templates/index.astro.BUILD-astro.md— home-generator dispatch + home contract (Layout wrapper; token utilities; real copy;data-decorative-slot="hero"+ section slot;<!-- home:<pack> -->markers per loaded pack).Benchmark — "Drift Yoga" CMS-only (no bookings), 3× baseline (main) vs 3× LLM-home, parallel, all 0 release retries
Tokens: llm-home −12% (lower!) — within the wide variance (baseline spanned 105k–168k; some baseline agents burned tokens debugging CMS/seeding). Time: +4% (within noise). Net: full LLM home generation is cost-neutral.
Quality: the baseline template home is hero + an about teaser with placeholder copy ("A short, brand-contextual paragraph…"). The LLM homes are full, real-content landing pages — eyebrow + hero + CTAs, a values grid, a class-schedule section, and a dark closing CTA. Big jump.
Live sites
Baseline: drift-yoga-be0bb11e · drift-yoga-08c195a3 · drift-yoga-3fcb8596
LLM-home: drift-yoga-a3dfe88e · drift-yoga-6756df23 · drift-yoga-0f2ddd9a (all
.wix-site-host.com)🤖 Generated with Claude Code