@wix/agent-skills 1.7.0 → 1.9.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.
Files changed (126) hide show
  1. package/README.md +3 -7
  2. package/package.json +1 -1
  3. package/skills/wix-app/SKILL.md +2 -0
  4. package/skills/wix-app/references/EDITOR_REACT_COMPONENT.md +2 -1
  5. package/skills/wix-app/references/STORES_VERSIONING.md +1 -0
  6. package/skills/wix-app/references/editor-react-component/ACCESSIBILITY.md +14 -0
  7. package/skills/wix-app/references/editor-react-component/REACT-GUIDELINES.md +11 -6
  8. package/skills/wix-app/references/editor-react-component/REACT-PATTERNS.md +3 -17
  9. package/skills/wix-app/references/editor-react-component/SSR.md +119 -0
  10. package/skills/wix-design-system/SKILL.md +5 -1
  11. package/skills/wix-headless/SKILL.md +55 -32
  12. package/skills/wix-headless/references/BUILD-astro.md +244 -0
  13. package/skills/wix-headless/references/BUILD-own-build.md +167 -0
  14. package/skills/wix-headless/references/BUILD.md +50 -252
  15. package/skills/wix-headless/references/DESIGN_SYSTEM.md +94 -34
  16. package/skills/wix-headless/references/DISCOVERY-connect.md +55 -0
  17. package/skills/wix-headless/references/DISCOVERY-create.md +238 -0
  18. package/skills/wix-headless/references/DISCOVERY.md +41 -422
  19. package/skills/wix-headless/references/PLAN-connect.md +19 -0
  20. package/skills/wix-headless/references/PLAN-create.md +17 -0
  21. package/skills/wix-headless/references/PLAN.md +37 -27
  22. package/skills/wix-headless/references/SEED.md +27 -18
  23. package/skills/wix-headless/references/SETUP.md +32 -213
  24. package/skills/wix-headless/references/astro/blog/BLOG_PAGES.md +5 -4
  25. package/skills/wix-headless/references/astro/bookings/COMPONENTS.md +45 -0
  26. package/skills/wix-headless/references/astro/bookings/SERVICES_PAGES.md +58 -0
  27. package/skills/wix-headless/references/astro/cms/CMS_FOUNDATIONS.md +5 -5
  28. package/skills/wix-headless/references/astro/cms/FAQ_KNOWLEDGE_BASE.md +10 -10
  29. package/skills/wix-headless/references/astro/cms/PORTFOLIO.md +12 -13
  30. package/skills/wix-headless/references/astro/cms/RESOURCE_LIBRARY.md +10 -12
  31. package/skills/wix-headless/references/astro/cms/TEAM_DIRECTORY.md +8 -8
  32. package/skills/wix-headless/references/astro/designer/INSTRUCTIONS.md +47 -27
  33. package/skills/wix-headless/references/astro/ecom/CART_PAGES.md +7 -8
  34. package/skills/wix-headless/references/astro/ecom/CART_WIRING.md +5 -5
  35. package/skills/wix-headless/references/astro/ecom/COMPONENTS_CSS.md +3 -3
  36. package/skills/wix-headless/references/astro/forms/CONTACT_FORM.md +5 -19
  37. package/skills/wix-headless/references/astro/gift-cards/COMPONENTS.md +2 -2
  38. package/skills/wix-headless/references/astro/gift-cards/PAGES.md +1 -1
  39. package/skills/wix-headless/references/astro/stores/BACK_IN_STOCK.md +6 -6
  40. package/skills/wix-headless/references/astro/stores/CATEGORY_PAGES.md +4 -4
  41. package/skills/wix-headless/references/astro/stores/COMPONENTS_CSS.md +3 -3
  42. package/skills/wix-headless/references/astro/stores/HOME_AND_NAV.md +3 -3
  43. package/skills/wix-headless/references/astro/stores/PRODUCT_PAGES.md +9 -9
  44. package/skills/wix-headless/references/astro/stores/SHARED_WIRING.md +5 -4
  45. package/skills/wix-headless/references/astro/templates/Footer.astro +1 -1
  46. package/skills/wix-headless/references/astro/templates/Layout.astro +1 -1
  47. package/skills/wix-headless/references/astro/templates/Navigation.astro +1 -1
  48. package/skills/wix-headless/references/astro/templates/astro.config.mjs +1 -1
  49. package/skills/wix-headless/references/astro/templates/bookings/AvailabilityCalendar.tsx +233 -0
  50. package/skills/wix-headless/references/astro/templates/bookings/BookingForm.tsx +136 -0
  51. package/skills/wix-headless/references/astro/templates/bookings/SeoTags.astro +25 -0
  52. package/skills/wix-headless/references/astro/templates/bookings/ServiceBookingFlow.tsx +54 -0
  53. package/skills/wix-headless/references/astro/templates/bookings/ServiceCard.astro +45 -0
  54. package/skills/wix-headless/references/astro/templates/bookings/booking-confirmation.astro +49 -0
  55. package/skills/wix-headless/references/astro/templates/bookings/bookingDriver.ts +245 -0
  56. package/skills/wix-headless/references/astro/templates/bookings/components-bookings.css +356 -0
  57. package/skills/wix-headless/references/astro/templates/bookings/services/[slug].astro +133 -0
  58. package/skills/wix-headless/references/astro/templates/bookings/services/index.astro +73 -0
  59. package/skills/wix-headless/references/astro/templates/global.css +2 -2
  60. package/skills/wix-headless/references/astro/templates/index.astro +1 -1
  61. package/skills/wix-headless/references/blog/BLOG_CONTENT.md +19 -9
  62. package/skills/wix-headless/references/blog/INSTRUCTIONS.md +3 -3
  63. package/skills/wix-headless/references/bookings/FLOW.md +185 -0
  64. package/skills/wix-headless/references/bookings/INSTRUCTIONS.md +90 -0
  65. package/skills/wix-headless/references/bookings/SERVICES_DATA.md +295 -0
  66. package/skills/wix-headless/references/cms/CMS_FOUNDATIONS.md +4 -2
  67. package/skills/wix-headless/references/cms/INSTRUCTIONS.md +27 -1
  68. package/skills/wix-headless/references/commands/known-apps.json +2 -1
  69. package/skills/wix-headless/references/custom/CONNECTION_PLAN.md +142 -0
  70. package/skills/wix-headless/references/custom/INSTRUCTIONS.md +71 -21
  71. package/skills/wix-headless/references/custom/blog/WIRING.md +52 -0
  72. package/skills/wix-headless/references/custom/bookings/WIRING.md +146 -0
  73. package/skills/wix-headless/references/custom/cms/WIRING.md +97 -0
  74. package/skills/wix-headless/references/custom/ecom/WIRING.md +67 -0
  75. package/skills/wix-headless/references/custom/forms/WIRING.md +101 -0
  76. package/skills/wix-headless/references/custom/stores/WIRING.md +80 -0
  77. package/skills/wix-headless/references/ecom/INSTRUCTIONS.md +5 -5
  78. package/skills/wix-headless/references/forms/INSTRUCTIONS.md +2 -2
  79. package/skills/wix-headless/references/gift-cards/INSTRUCTIONS.md +3 -3
  80. package/skills/wix-headless/references/images/INSTRUCTIONS.md +16 -15
  81. package/skills/wix-headless/references/seed-recipes.md +2 -2
  82. package/skills/wix-headless/references/shared/AGENTS_MD.md +47 -0
  83. package/skills/wix-headless/references/shared/AUTHENTICATION.md +3 -5
  84. package/skills/wix-headless/references/shared/DESIGN_MD.md +85 -0
  85. package/skills/wix-headless/references/shared/IMAGE_GENERATION.md +29 -28
  86. package/skills/wix-headless/references/shared/IMPLEMENTER.md +87 -27
  87. package/skills/wix-headless/references/shared/PRODUCTION_SHARP_EDGES.md +2 -2
  88. package/skills/wix-headless/references/shared/RETURN_CONTRACT.md +24 -313
  89. package/skills/wix-headless/references/shared/STYLING.md +8 -18
  90. package/skills/wix-headless/references/stores/INSTRUCTIONS.md +39 -9
  91. package/skills/wix-headless/references/stores/PRODUCT_CATALOG_DATA.md +17 -14
  92. package/skills/wix-headless/references/verticals/_schema.json +1 -1
  93. package/skills/wix-headless/references/verticals/_schema.md +3 -3
  94. package/skills/wix-headless/references/verticals/blog.md +1 -1
  95. package/skills/wix-headless/references/verticals/bookings.md +39 -0
  96. package/skills/wix-headless/references/verticals/cms.md +1 -1
  97. package/skills/wix-headless/references/verticals/ecom.md +2 -2
  98. package/skills/wix-headless/references/verticals/gift-cards.md +1 -1
  99. package/skills/wix-headless/references/verticals/stores.md +1 -1
  100. package/skills/wix-headless/scripts/check-manifest.mjs +143 -6
  101. package/skills/wix-headless/scripts/compose.mjs +540 -0
  102. package/skills/wix-headless/scripts/emit-design-tokens.mjs +128 -51
  103. package/skills/wix-headless/scripts/flatten.sh +61 -0
  104. package/skills/wix-headless/scripts/generate-images.mjs +242 -0
  105. package/skills/wix-headless/scripts/scaffold.sh +47 -16
  106. package/skills/wix-headless/scripts/write-decorative-json.mjs +62 -0
  107. package/skills/wix-manage/SKILL.md +13 -1
  108. package/skills/wix-manage/references/app-installation/install-wix-apps.md +3 -27
  109. package/skills/wix-manage/references/blog/how-to-create-blog-posts.md +1 -1
  110. package/skills/wix-manage/references/bookings/create-appointment-service.md +266 -0
  111. package/skills/wix-manage/references/bookings/create-booking-service-from-prompt.md +37 -0
  112. package/skills/wix-manage/references/bookings/create-class-service.md +245 -0
  113. package/skills/wix-manage/references/bookings/create-course-service.md +249 -0
  114. package/skills/wix-manage/references/cms/cms-data-items-crud.md +3 -2
  115. package/skills/wix-manage/references/cms/cms-references-and-relationships.md +1 -1
  116. package/skills/wix-manage/references/cms/cms-schema-management.md +2 -2
  117. package/skills/wix-manage/references/domains/domain-search-and-purchase.md +10 -7
  118. package/skills/wix-manage/references/forms/create-form.md +49 -1
  119. package/skills/wix-manage/references/stores/bulk-create-products-with-options.md +1 -1
  120. package/skills/wix-manage/references/stores/create-product-from-image.md +154 -2
  121. package/skills/wix-manage/references/stores/setup-online-store-catalog-v3.md +1 -1
  122. package/skills/wix-headless/references/astro/COMPOSE.md +0 -142
  123. package/skills/wix-headless/scripts/finalize-run-json.mjs +0 -141
  124. package/skills/wix-headless/scripts/init-site-json.mjs +0 -101
  125. package/skills/wix-headless/scripts/preview.sh +0 -45
  126. package/skills/wix-headless/scripts/release.sh +0 -73
@@ -6,7 +6,7 @@ Build a visual portfolio using `@wix/data` — project grid with category filter
6
6
 
7
7
  ## Collection Schema
8
8
 
9
- Create a collection in the Wix dashboard → CMS with these fields:
9
+ The schema the `seed` scope creates via REST (see `../../cms/CMS_FOUNDATIONS.md`) — fields:
10
10
 
11
11
  | Field | Type | Purpose |
12
12
  |-------|------|---------|
@@ -38,7 +38,7 @@ Create a collection in the Wix dashboard → CMS with these fields:
38
38
  ### 1. Portfolio Service Module (`src/lib/portfolio.ts`)
39
39
 
40
40
  ```typescript
41
- import * as items from "@wix/wix-data-items-sdk";
41
+ import { items } from "@wix/data";
42
42
  import { auth } from "@wix/essentials";
43
43
  import { media } from "@wix/sdk";
44
44
 
@@ -150,7 +150,7 @@ const { categories, activeCategory, basePath } = Astro.props;
150
150
  </nav>
151
151
  ```
152
152
 
153
- > **Styling note:** CategoryFilter styling is created by the design skill. See `COMPONENT_PATTERNS.md` → Category Filter.
153
+ > **Styling note:** CategoryFilter styling is created by the design skill. See `references/shared/STYLING.md` (Category Filter).
154
154
 
155
155
  > Server-rendered, no JavaScript. Category is read from `Astro.url.searchParams` in the page.
156
156
 
@@ -189,7 +189,7 @@ const { project } = Astro.props;
189
189
  </a>
190
190
  ```
191
191
 
192
- > **Styling note:** ProjectCard styling is created by the design skill. See `COMPONENT_PATTERNS.md` → Project Card.
192
+ > **Styling note:** ProjectCard styling is created by the design skill. See `references/shared/STYLING.md` (Project Card).
193
193
 
194
194
  ### 4. Project Grid Page (`src/pages/work/index.astro`)
195
195
 
@@ -376,7 +376,7 @@ export default function ImageGallery({ images, alt }: Props) {
376
376
  }
377
377
  ```
378
378
 
379
- > **Styling note:** Uses `.gallery-grid`, `.gallery-item`, `.lightbox-overlay`, `.lightbox-image`, `.lightbox-nav`, `.lightbox-close` from the designed component's `<style is:global>` block. See `COMPONENT_PATTERNS.md` → Image Gallery / Lightbox.
379
+ > **Styling note:** Uses `.gallery-grid`, `.gallery-item`, `.lightbox-overlay`, `.lightbox-image`, `.lightbox-nav`, `.lightbox-close` from the designed component's `<style is:global>` block. See `references/shared/STYLING.md` (Image Gallery / Lightbox).
380
380
 
381
381
  Key details:
382
382
  - Renders as a grid; clicking opens a lightbox overlay
@@ -426,7 +426,7 @@ Project showcase image for [TITLE]. [BRAND AESTHETIC]. Color palette: [BRAND COL
426
426
  Gallery image [N] for [TITLE]: [describe a specific aspect/angle of the project]. [BRAND AESTHETIC]. [BRAND COLORS]. No text, no watermarks
427
427
  ```
428
428
 
429
- **Patch fields:** `coverImage`, optionally `galleryImages` (as an array of wixstatic URLs)
429
+ **Patch field:** `galleryImages` (as an array of wixstatic URLs)
430
430
 
431
431
  Example patch:
432
432
 
@@ -445,10 +445,9 @@ body: {
445
445
 
446
446
  ## Testing
447
447
 
448
- 1. Create a "Projects" collection in the Wix dashboard → CMS with the schema above
449
- 2. Add 3+ projects with cover images, categories, and at least one with gallery images
450
- 3. Mark 1–2 as `featured: true`
451
- 4. Run `npx @wix/cli@latest dev`
452
- 5. `/work` — grid with category filter tabs
453
- 6. Click a category — filters projects
454
- 7. Click a project — detail page with gallery lightbox
448
+ Assumes the `seed` scope has already created the "Projects" collection and inserted items via REST (see `../../cms/CMS_FOUNDATIONS.md`) — 3+ projects with categories (and, after the image pass, cover/gallery images), 1–2 marked `featured: true`.
449
+
450
+ 1. Run `npx @wix/cli@latest dev`
451
+ 2. `/work` — grid with category filter tabs
452
+ 3. Click a category — filters projects
453
+ 4. Click a project — detail page with gallery lightbox
@@ -6,7 +6,7 @@ Build a downloadable resource library using `@wix/data` — file listings with c
6
6
 
7
7
  ## Collection Schema
8
8
 
9
- Create a collection in the Wix dashboard → CMS with these fields:
9
+ The schema the `seed` scope creates via REST (see `../../cms/CMS_FOUNDATIONS.md`) — fields:
10
10
 
11
11
  | Field | Type | Purpose |
12
12
  |-------|------|---------|
@@ -36,7 +36,7 @@ Create a collection in the Wix dashboard → CMS with these fields:
36
36
  ### 1. Resources Service Module (`src/lib/resources.ts`)
37
37
 
38
38
  ```typescript
39
- import * as items from "@wix/wix-data-items-sdk";
39
+ import { items } from "@wix/data";
40
40
  import { auth } from "@wix/essentials";
41
41
  import { media } from "@wix/sdk";
42
42
 
@@ -146,8 +146,7 @@ const fileType = type.toUpperCase();
146
146
  ```
147
147
 
148
148
  Key details:
149
- - Color-coded by file type — red for PDF, blue for DOC, green for XLS, yellow for ZIP
150
- - Falls back to neutral gray for unknown types
149
+ - The SVG uses `stroke="currentColor"` — any per-file-type coloring is purely CSS-driven (e.g. a `.file-type-pdf` class on the wrapper), not set here
151
150
  - File type label rendered inside the document icon SVG
152
151
 
153
152
  ### 3. Resource Card (`src/components/ResourceCard.astro`)
@@ -187,7 +186,7 @@ const { resource } = Astro.props;
187
186
  </a>
188
187
  ```
189
188
 
190
- > **Styling note:** ResourceCard styling is created by the design skill. See `COMPONENT_PATTERNS.md` → Resource Card.
189
+ > **Styling note:** ResourceCard styling is created by the design skill. See `references/shared/STYLING.md` (Resource Card).
191
190
 
192
191
  ### 4. Resource Listing Page (`src/pages/resources/index.astro`)
193
192
 
@@ -347,10 +346,9 @@ body: {
347
346
 
348
347
  ## Testing
349
348
 
350
- 1. Create a "Resources" collection in the Wix dashboard → CMS with the schema above
351
- 2. Add 4+ resources across 2+ categories with different file types (PDF, DOC, ZIP)
352
- 3. Include `fileUrl` links (can be any downloadable URL for testing)
353
- 4. Run `npx @wix/cli@latest dev`
354
- 5. `/resources` — shows all resources with category filters and file type badges
355
- 6. Click a category — filters resources
356
- 7. Click a resource — detail page with download button and related resources
349
+ Assumes the `seed` scope has already created the "Resources" collection and inserted items via REST (see `../../cms/CMS_FOUNDATIONS.md`) — 4+ resources across 2+ categories with different file types (PDF, DOC, ZIP) and `fileUrl` links (any downloadable URL for testing).
350
+
351
+ 1. Run `npx @wix/cli@latest dev`
352
+ 2. `/resources` — shows all resources with category filters and file type badges
353
+ 3. Click a category — filters resources
354
+ 4. Click a resource — detail page with download button and related resources
@@ -6,7 +6,7 @@ Build a team directory using `@wix/data` — staff cards grouped by department w
6
6
 
7
7
  ## Collection Schema
8
8
 
9
- Create a collection in the Wix dashboard → CMS with these fields:
9
+ The schema the `seed` scope creates via REST (see `../../cms/CMS_FOUNDATIONS.md`) — fields:
10
10
 
11
11
  | Field | Type | Purpose |
12
12
  |-------|------|---------|
@@ -35,7 +35,7 @@ Create a collection in the Wix dashboard → CMS with these fields:
35
35
  ### 1. Team Service Module (`src/lib/team.ts`)
36
36
 
37
37
  ```typescript
38
- import * as items from "@wix/wix-data-items-sdk";
38
+ import { items } from "@wix/data";
39
39
  import { auth } from "@wix/essentials";
40
40
  import { media } from "@wix/sdk";
41
41
 
@@ -156,7 +156,7 @@ const { member } = Astro.props;
156
156
  </a>
157
157
  ```
158
158
 
159
- > **Styling note:** TeamMemberCard styling is created by the design skill. See `COMPONENT_PATTERNS.md` → Team Member Card.
159
+ > **Styling note:** TeamMemberCard styling is created by the design skill. See `references/shared/STYLING.md` (Team Member Card).
160
160
 
161
161
  Key details:
162
162
  - Inline SVG icons — no icon library dependency
@@ -292,8 +292,8 @@ body: {
292
292
 
293
293
  ## Testing
294
294
 
295
- 1. Create a "Team" collection in the Wix dashboard → CMS with the schema above
296
- 2. Add 4+ members across 2+ departments, with photos and social links
297
- 3. Run `npx @wix/cli@latest dev`
298
- 4. `/team` — shows members grouped by department
299
- 5. Click a member — profile page with photo, bio, and social links
295
+ Assumes the `seed` scope has already created the "Team" collection and inserted items via REST (see `../../cms/CMS_FOUNDATIONS.md`) — 4+ members across 2+ departments, with social links (and headshots after the image pass).
296
+
297
+ 1. Run `npx @wix/cli@latest dev`
298
+ 2. `/team` — shows members grouped by department
299
+ 3. Click a member — profile page with photo, bio, and social links
@@ -1,42 +1,43 @@
1
1
  ---
2
2
  name: page-designer
3
- description: "The page-design specification for Wix Managed Headless Phase 4 routes: home, static (about/faq), store-pages, blog-pages, contact-page. This is the visual-design guidance the merged Phase 4 `pages` scopes (vertical packs, BUILD.md Step 7) apply when they write each route ONCE with both visual design and live SDK data. It defines layout, contract classes, decorative-slot conventions, responsive rules, and anti-patterns — not a separate placeholder-writing pass. The design-system phase (tokens + global.css + Layout/Nav/Footer shells) is NOT here — it is split across DESIGN_SYSTEM.md (Designer) and astro/COMPOSE.md (Composer)."
3
+ description: "The page-design specification for Wix Managed Headless page routes: home, static (about/faq), store-pages, services-pages, blog-pages, contact-page. This is the visual-design guidance the merged build agents' `pages` scopes (vertical packs, BUILD-astro.md § 'Step 4.5' — the build wave) apply when they write each route ONCE with both visual design and live SDK data. It defines layout, contract classes, decorative-slot conventions, responsive rules, and anti-patterns — not a separate placeholder-writing pass. The design-system phase (tokens + global.css + Layout/Nav/Footer shells) is NOT here — it is split across DESIGN_SYSTEM.md (Designer) and scripts/compose.mjs (Composer)."
4
4
  ---
5
5
 
6
6
  # Page Designer — Scope-Based Page Design
7
7
 
8
- > **Single-write merged model (BUILD.md Step 7 is authoritative).** Phase 4 routes are written **once**, by the per-vertical `pages` scopes, with both visual design **and** live SDK queries in the same pass — there is no separate "write a design placeholder, then rewrite it with data" dispatch (that double-write was eliminated). This doc is the **visual-design specification** the merged author applies: the layout, typography, color, spacing, contract classes, decorative slots, and component composition each route should have. Where a section below says "placeholder data," read it as *the data shape* the live query maps onto — and the safe fallback to render if a query returns empty. The merged scope binds real SDK data into this structure; it does not ship hardcoded arrays as the final output.
8
+ > **Single-write merged model (BUILD-astro.md § "Step 4.5" — the build wave — is authoritative).** Routes are written **once**, by the per-vertical merged build agents' `pages` scopes (after that agent writes its islands), with both visual design **and** live SDK queries in the same pass — there is no separate "write a design placeholder, then rewrite it with data" dispatch (that double-write was eliminated), and no separate Components→Pages wave (those are merged into one per-vertical agent). This doc is the **visual-design specification** the merged author applies: the layout, typography, color, spacing, contract classes, decorative slots, and component composition each route should have. Where a section below says "placeholder data," read it as *the data shape* the live query maps onto — and the safe fallback to render if a query returns empty. The merged scope binds real SDK data into this structure; it does not ship hardcoded arrays as the final output.
9
9
 
10
10
  Your prompt will contain a `Scope:` line naming exactly one of the page scopes below. **Read only the section for your scope. Do not read sections for other scopes — wastes context and blurs ownership.**
11
11
 
12
12
  You own **page-level visual output**: the layout, typography, color, spacing, and component composition of one route group. The same merged scope also binds the live SDK data into that structure (the per-vertical reference under `references/astro/<vertical>/` supplies the exact queries).
13
13
 
14
- > **The design-system phase is not in this doc.** Tokens (`data.designTokens`), `global.css`, `astro.config.mjs`, `Layout.astro`, `Navigation.astro`, and `Footer.astro` are produced earlier in the run by a two-role split:
15
- > - **Designer** (`<SKILL_ROOT>/references/DESIGN_SYSTEM.md`) — returns the framework-agnostic design spec (tokens + brand-voice strings) as JSON only.
16
- > - **Composer** (`<SKILL_ROOT>/references/astro/COMPOSE.md`) — applies that spec to the astro skeletons and writes the 6 design-system files.
14
+ > **The design-system phase is not in this doc.** Tokens (`DESIGN.md` / `data.design`), `global.css`, `astro.config.mjs`, `Layout.astro`, `Navigation.astro`, and `Footer.astro` are produced earlier in the run by a two-role split:
15
+ > - **Designer** (`<SKILL_ROOT>/references/DESIGN_SYSTEM.md`) — authors `DESIGN.md` (the framework-agnostic token spec) and returns the brand-voice strings.
16
+ > - **Composer** (`<SKILL_ROOT>/scripts/compose.mjs`, a deterministic script — self-documenting) — applies `DESIGN.md` to the astro skeletons and writes the 6 design-system files.
17
17
  >
18
18
  > By the time the Phase 4 routes are written, the `@theme` token contract, the `.astro` shells, and `.wix/design-tokens.css` already exist. You consume them; you do not write them.
19
19
 
20
20
  ## Self-Loading
21
21
 
22
22
  1. Read `../../shared/RETURN_CONTRACT.md` — structured return format.
23
- 2. Read `../../shared/STYLING.md` — three styling categories (tokens-as-utilities, global semantic classes, co-located styles). Pages compose `@theme` tokens at call sites as Tailwind utilities; the inlined `designTokens` contract in your prompt tells you which tokens this run published.
23
+ 2. Read `../../shared/STYLING.md` — three styling categories (tokens-as-utilities, global semantic classes, co-located styles). Pages compose `@theme` tokens at call sites as Tailwind utilities; the design-token vocabulary on disk at `.wix/design-tokens.css` tells you which tokens this run published.
24
24
 
25
25
  No REST calls required. Page-design scopes are frontend-only — no `curl`, no MCP tool-discovery.
26
26
 
27
- **Do NOT `Read .wix/site.json`.** Every input you need (brand, the published `designTokens` contract, pages to design, pack home-section snippets) is inlined in your prompt.
27
+ **Every input you need (brand, the published design-token vocabulary, pages to design, pack home-section snippets) is inlined in your prompt.** Don't depend on mutable shared state.
28
28
 
29
29
  ## Scope Routing
30
30
 
31
31
  | Scope | Phase | Output (files) |
32
32
  |-------|-------|----------------|
33
- | `home` | Phase 4 — Step 7 | `src/pages/index.astro` (composes pack home-sections + brand hero/CTA into the Composer-written shell) |
34
- | `static` | Phase 4 — Step 7 | `src/pages/about.astro`, `src/pages/faq.astro` |
35
- | `store-pages` | Phase 4 — Step 7 | `src/pages/products/index.astro`, `src/pages/products/[slug].astro`, `src/components/ProductCard.astro`, `src/pages/cart.astro`, `src/pages/thank-you.astro` |
36
- | `blog-pages` | Phase 4 — Step 7 | `src/pages/blog/index.astro`, `src/pages/blog/[slug].astro` |
37
- | `contact-page` | Phase 4 — Step 7 | `src/pages/contact.astro` |
33
+ | `home` | build wave | `src/pages/index.astro` (composes pack home-sections + brand hero/CTA into the Composer-written shell) |
34
+ | `static` | build wave | `src/pages/about.astro`, `src/pages/faq.astro` |
35
+ | `store-pages` | build wave | `src/pages/products/index.astro`, `src/pages/products/[slug].astro`, `src/components/ProductCard.astro`, `src/pages/cart.astro`, `src/pages/thank-you.astro` |
36
+ | `services-pages` | build wave | `src/pages/services/index.astro`, `src/pages/services/[slug].astro`, `src/pages/booking-confirmation.astro` |
37
+ | `blog-pages` | build wave | `src/pages/blog/index.astro`, `src/pages/blog/[slug].astro` |
38
+ | `contact-page` | build wave | `src/pages/contact.astro` |
38
39
 
39
- If your prompt's `Scope:` line names `design-system`, you have the wrong doc — that work lives in `DESIGN_SYSTEM.md` (Designer) and `astro/COMPOSE.md` (Composer). Stop and tell the parent.
40
+ If your prompt's `Scope:` line names `design-system`, you have the wrong doc — that work lives in `DESIGN_SYSTEM.md` (Designer) and `scripts/compose.mjs` (Composer). Stop and tell the parent.
40
41
 
41
42
  If your prompt is missing a `Scope:` line, stop and ask the parent — do not guess.
42
43
 
@@ -44,14 +45,14 @@ If your prompt is missing a `Scope:` line, stop and ask the parent — do not gu
44
45
 
45
46
  ---
46
47
 
47
- ## Page Designer Scopes (Phase 4 — Step 7, background)
48
+ ## Page Designer Scopes (build wave, background)
48
49
 
49
50
  All page scopes share common inputs and rules. Scope-specific details follow.
50
51
 
51
52
  ### Common inputs (from your prompt)
52
53
 
53
54
  - **Brand context** — name, vibe, aesthetic direction, colors, fonts, mood.
54
- - **Published token contract** — the `designTokens` JSON (same shape the Designer returned, written into `@theme` by the Composer). Compose these tokens as Tailwind utilities; if a token you need is absent, flag it in your return (`MISSING_TOKEN`) — do not invent a class.
55
+ - **Published token contract** — the design-token vocabulary (the DESIGN.md tokens, written into `@theme` by `compose.mjs`). Compose these tokens as Tailwind utilities; if a token you need is absent, flag it in your return (`MISSING_TOKEN`) — do not invent a class.
55
56
  - **Pages to design** — list of routes and their contract class associations.
56
57
  - **Pack home-section snippet** (home scope only) — section stubs from every loaded pack.
57
58
  - **Placeholder data instruction** — use plausible brand-contextual placeholder text, prices, images where live data is not yet available.
@@ -104,7 +105,7 @@ All page scopes share common inputs and rules. Scope-specific details follow.
104
105
  9. **Responsive.** All pages must work at mobile (320px), tablet (768px), and desktop (1024px+). Use Tailwind responsive prefixes (`md:`, `lg:`) and the spacing scale from `@theme`.
105
106
  10. **Use Tailwind utility classes in templates.** For layout, spacing, typography, and responsive design — use utility classes directly in the markup. Contract classes are still required for components referenced by Phase 3/4 agents. Mix both: `<div class="product-grid grid grid-cols-1 md:grid-cols-3 gap-lg">`. Always use brand `@theme` tokens (e.g., `bg-bark`, `text-cream`) — never default Tailwind colors.
106
107
  11. **No duplicate files.** If two scopes list the same file (rare), the scope whose prompt explicitly names it as "owned" takes precedence. If unclear, write it and note the overlap in your return.
107
- 12. **Do NOT write to `src/styles/components-<pack>.css` or `src/styles/global.css`** — `components-<pack>.css` is owned by Phase 3 Components agents; `global.css` is owned by the Composer. Writing to either causes double-write conflicts.
108
+ 12. **Do NOT write to `src/styles/components-<pack>.css` or `src/styles/global.css`** — `components-<pack>.css` is pre-copied from the skill template by the orchestrator (build-wave pre-batch); `global.css` is owned by the Composer. Writing to either causes double-write conflicts.
108
109
 
109
110
  ### Scope: `home`
110
111
 
@@ -175,19 +176,19 @@ All store-facing pages designed together for visual coherence.
175
176
  **Products listing (`/products`):**
176
177
  - Page heading
177
178
  - Product grid using `product-grid` class
178
- - 3-6 placeholder product cards using `ProductCard` component
179
+ - Bind the live `productsV3` query (per `references/astro/stores/PRODUCT_PAGES.md`) into a grid of `ProductCard` components; render a brand-contextual empty state if the query returns nothing
179
180
 
180
181
  **Product detail (`/products/[slug]`):**
181
- - Product image (large, placeholder)
182
+ - Product image (large) resolved from the live product record
182
183
  - Product info section with `product-detail` class
183
- - Purchase area with `product-purchase` class — placeholder price, placeholder variant selector, Add to Cart button with `add-to-cart-btn` class
184
+ - Purchase area with `product-purchase` class — price, variant selector, and Add to Cart button (`add-to-cart-btn` class) bound to the live product/variant data
184
185
  - Product description area
185
186
 
186
187
  **ProductCard component:**
187
- - Accepts a single `product` prop (object with name, price, slug, image fields)
188
+ - Accepts a single `product` prop — the full Wix product object from `productsV3`
188
189
  - Uses `product-card` class
189
190
  - Image, name, price, link to `/products/${product.slug}`
190
- - **Important:** Phase 2 `product-pages` rewrites this to accept the full Wix product object. Design with a simple prop interface: `{ product: { name: string; slug: string; price: number; image?: string } }`
191
+ - Design the prop interface around the full product object: `{ product }` (the canonical `productsV3` shape — see `references/astro/stores/PRODUCT_PAGES.md`)
191
192
 
192
193
  **Cart (`/cart`):**
193
194
  - Two-column grid layout: `.cart-grid` — items column left, order summary right. Stacks vertically on mobile
@@ -199,11 +200,11 @@ All store-facing pages designed together for visual coherence.
199
200
  - Unavailable item warning with `.cart-item-unavailable` class (red text)
200
201
  - Empty state with `.cart-empty` class (centered, muted text + "Browse Products" link)
201
202
  - **All cart CSS must be in `<style is:global>`** — `CartView` is a React island; scoped Astro styles do not reach its children
202
- - Placeholder cart items (2-3)
203
+ - The live `CartView` island renders the items/summary at runtime; design the surrounding structure and an empty-cart fallback
203
204
 
204
205
  **Thank you (`/thank-you`):**
205
206
  - Confirmation message with `order-summary` class
206
- - Placeholder order details
207
+ - Order details bound to the live order data (per the ecom cart/checkout reference)
207
208
 
208
209
  **Return:**
209
210
  ```json
@@ -225,6 +226,25 @@ All store-facing pages designed together for visual coherence.
225
226
  }
226
227
  ```
227
228
 
229
+ ### Scope: `services-pages`
230
+
231
+ All bookings-facing pages designed together for visual coherence. **Canonical templates exist** at `<SKILL_ROOT>/references/astro/templates/bookings/` — adapt them (copy, headings, styling); do not re-author the SDK/booking-flow wiring (`references/astro/bookings/SERVICES_PAGES.md` is the wiring spec).
232
+
233
+ **Files:** `src/pages/services/index.astro`, `src/pages/services/[slug].astro`, `src/pages/booking-confirmation.astro`
234
+
235
+ **Services listing (`/services`):**
236
+ - Page heading + optional brand tagline
237
+ - Service grid using the `service-grid` class, one `ServiceCard` per service (`service-card` class — image/placeholder, name, tagline, duration + price row)
238
+ - Bind the live `services.queryServices` query (per `references/astro/bookings/SERVICES_PAGES.md`); brand-contextual empty state if it returns nothing
239
+
240
+ **Service detail (`/services/[slug]`):**
241
+ - `container-reading` width (never a bare `max-w-<size>`); optional banner image **only when the service has media** (image-less is the common seed case — no fixed-ratio placeholder)
242
+ - Title, tagline, duration + price row, description
243
+ - "Book this service" section mounting the `ServiceBookingFlow` island (`client:only="react"`, threads `serviceType`) — the week calendar uses the `availability-*` classes (week strip + `availability-day`), slots use `time-slot` classes (`--available`/`--selected`), and the form uses the `booking-*` family
244
+
245
+ **Booking confirmation (`/booking-confirmation`):**
246
+ - `max-w-prose`, centered; "Thank you for booking" headline + the service name and time (read from the `service`/`startDate` query params) + a link back to `/services`. No re-fetch, no cancel UI (manage/cancel is out of scope).
247
+
228
248
  ### Scope: `blog-pages`
229
249
 
230
250
  Blog feed listing and post detail designed together.
@@ -265,7 +285,7 @@ Contact page with form placeholder.
265
285
  **Contact page:**
266
286
  - Page heading and descriptive text
267
287
  - Contact CTA section using `contact-cta` class (if on home, this mirrors the home CTA's visual language)
268
- - Form placeholder area — a styled `<div>` where Phase 2 mounts the `ContactForm.tsx` island. Use a placeholder form layout (name, email, message fields, submit button) so the page looks complete, but Phase 2 replaces this with the real React island.
288
+ - Form area — mount the `ContactForm.tsx` island (written by Phase 3 Components) styled to the brand, per `references/astro/forms/CONTACT_FORM.md`. Style a complete form layout (name, email, message fields, submit button) so the page reads as finished even before submissions wire up.
269
289
  - Optional: map embed placeholder, business hours, address (if brand context suggests it)
270
290
 
271
291
  **Return:**
@@ -307,7 +327,7 @@ The JSON block MUST be the **last** content in your message — the parent parse
307
327
  | Generic unstyled HTML | Brand-first design — every element reflects the aesthetic direction |
308
328
  | Fixed-width layouts | Responsive: mobile-first, breakpoints at 320/768/1024px |
309
329
  | `ls src/`, `Glob src/**` to discover files | Your prompt lists every file and class contract. Write directly. |
310
- | `Read .wix/site.json` to get brand or verticals | Every field is in your prompt |
330
+ | Read a shared file to get brand or verticals | Every field is in your prompt |
311
331
  | Hardcode an external `<img src="https://...">` for product/content images | Resolve entity images from the live record (`media.getScaledToFillImageUrl(...)`) in this same scope; **decorative** images use the `data-decorative-slot` mechanism |
312
332
  | Omit `data-decorative-slot` on hero/about/background placeholders | Every decorative image placeholder MUST carry a slot attribute — the orchestrator's injection pass depends on it (common rule #7) |
313
333
  | Add a hero CTA / footer link to a disabled-pack route | Disabled packs (gift-cards) are dormant — no entry points to their routes |
@@ -319,7 +339,7 @@ The JSON block MUST be the **last** content in your message — the parent parse
319
339
  | Agent | Relationship | Rule |
320
340
  |-------|-------------|------|
321
341
  | Composer (design-system) | Wrote `global.css`, `Layout.astro`, `Navigation.astro`, `Footer.astro`, the `@theme` tokens | You consume the token contract and wrap pages in its `Layout`; you never rewrite those files |
322
- | Phase 3 Components (stores/blog/forms) | Writes React islands referencing contract classes + `components-<pack>.css` | They own islands + scoped CSS; the route references contract classes in markup and mounts the islands, no overlap |
342
+ | Phase 3 Components (stores/bookings/blog/forms) | Writes React islands referencing contract classes + `components-<pack>.css` | They own islands + scoped CSS; the route references contract classes in markup and mounts the islands, no overlap |
323
343
  | Per-vertical reference (`references/astro/<vertical>/`) | Supplies the exact SDK queries + wiring the merged route binds | Apply this design spec **and** that vertical's queries together in one write — there is no second pass |
324
344
  | Image agent (Image Phase 1) | Returns decorative URLs in `data.slots` | Emit `data-decorative-slot="<key>"` placeholders; the orchestrator injects the `<img>` once Image Phase 1 returns |
325
345
  | Image agent (Image Phase 2) | PATCHes entity images onto products/posts via REST | No direct interaction — images flow through product/post records that Phase 4 queries |
@@ -328,4 +348,4 @@ The JSON block MUST be the **last** content in your message — the parent parse
328
348
 
329
349
  The merged Phase 4 `pages` scope owns each route file **end to end** — visual structure **and** data wiring, written in a single pass. There is no separate page-designer agent that writes a file for a later scope to rewrite; this doc is the visual-design spec the merged author applies alongside its vertical's SDK queries (`references/astro/<vertical>/`). Each route file therefore has exactly **one** writer (its `pages` scope), which removes the cross-phase double-write the older placeholder-then-rewrite model carried.
330
350
 
331
- The shared shells the route composes into — `Layout.astro`, `Navigation.astro`, `index.astro`, `global.css`, `components-<pack>.css` — are owned by the Composer / Phase 3 Components, not by the route scope (see "Coordination" above and BUILD.md Step 7's shared-shell-patcher serialization rule).
351
+ The shared shells the route composes into — `Layout.astro`, `global.css` (Composer), and the marker-patched `Navigation.astro` / `index.astro` / `components-<pack>.css` (pre-copied or patched by the serialized shell-patcher agents) — are NOT owned by a private-file route scope (see "Coordination" above and BUILD-astro.md § "Step 4.5", the serialized shell chain).
@@ -1,21 +1,20 @@
1
1
  # Phase 4 Cart Pages — Ecom
2
2
 
3
- Scope: `ecom-pages`. Launched in **Step 7**. Mounts `CartView` island on the cart page, wires the thank-you page, and mounts `CartBadge` in Navigation.
3
+ Scope: `cart-checkout` (the ecom `pages` scope) — the **pages** portion of the ecom **merged build agent** (the build wave), written *after* its `components`. Mounts `CartView` island on the cart page, wires the thank-you page, and mounts `CartBadge` in `Navigation.astro` (at the `<!-- nav:actions -->` marker). **Because it patches the shared `Navigation.astro` shell, the ecom build agent runs in the build wave's serialized shell chain** — never concurrent with the other Navigation/index patchers (stores `pages-home-and-nav`, gift-cards, blog), so concurrent marker edits can't collide (`BUILD-astro.md` § "Step 4.5").
4
4
 
5
5
  ## Scope
6
6
 
7
- Files this agent OWNS (rewrites from designer output):
7
+ Files this agent OWNS (each written once — designer visual spec + live wiring together):
8
8
 
9
9
  - `src/pages/cart.astro` — mount `CartView.tsx` (client-only, no server-side cart fetch)
10
10
  - `src/pages/thank-you.astro` — read `orderId` from URL, fire `Purchase` event
11
11
 
12
- Files this agent PATCHES (does NOT rewrite):
12
+ Files this agent PATCHES (does NOT rewrite) — only at its own marker:
13
13
 
14
- - `src/components/Navigation.astro` — mount `CartBadge` in the `nav-actions` area
14
+ - `src/components/Navigation.astro` — mount `CartBadge` in the `nav-actions` area (`<!-- nav:actions -->`). Stores `pages-home-and-nav` patches the same file at `<!-- nav:links -->`; the serialized shell chain keeps these from colliding.
15
15
 
16
16
  Files this agent MUST NOT touch:
17
- - `src/components/CartView.tsx` — owned by `ecom-shared` (already written)
18
- - `src/components/CartBadge.tsx` — owned by `ecom-shared`
17
+ - `src/components/CartView.tsx`, `src/components/CartBadge.tsx` — the ecom islands; written earlier in this same merged agent (the `components` scope)
19
18
  - Any product page, home page, or stores-specific component
20
19
  - `global.css`, any designed component
21
20
 
@@ -100,8 +99,8 @@ Cart page → "Proceed to Checkout"
100
99
  ```json
101
100
  {
102
101
  "status": "complete",
103
- "phase": "ecom-pages",
104
- "scope": "ecom-pages",
102
+ "phase": "cart-checkout",
103
+ "scope": "cart-checkout",
105
104
  "summary": "Mounted CartView (client-only fetch); wired Purchase event; mounted CartBadge in Navigation",
106
105
  "data": {
107
106
  "pagesWired": 2,
@@ -1,8 +1,8 @@
1
1
  # Phase 3 Components — Ecom (TSX)
2
2
 
3
- Scope: `components`. Launched in **Step 4.5** (after Phase 2 Design System completes, parallel to stores components and the `components-css` sibling). Writes code that depends on the **design tokens** but NOT on Phase 4 page markup.
3
+ This is the **components** portion of the ecom **merged build agent** (the build wave — `BUILD-astro.md` § "Step 4.5"). Your agent writes these islands **first**, then the ecom pages (`cart.astro`, `thank-you.astro`) that mount them. The code here depends on the **design tokens** (read from `.wix/design-tokens.css` on disk) but NOT on page markup.
4
4
 
5
- > **CSS lives in a sibling scope.** `src/styles/components-ecom.css` is owned by the `components-css` scope (see `./COMPONENTS_CSS.md`), which runs concurrently with this one in the same Step 4.5 batch. This scope does NOT write the CSS file. Reference contract class names from the design tokens here; the CSS sibling defines the rules.
5
+ > **CSS is pre-copied, not authored.** `src/styles/components-ecom.css` ships from the skill template, copied by the orchestrator in the build-wave pre-batch (see `./COMPONENTS_CSS.md`). This scope does NOT write the CSS file. Reference its contract class names from the design tokens here; the pre-copied stylesheet defines the rules.
6
6
 
7
7
  ## Scope
8
8
 
@@ -20,7 +20,7 @@ Files this agent MUST NOT touch:
20
20
 
21
21
  ## Coordination: design tokens
22
22
 
23
- Your parent prompt includes the design tokens inline. Use it directly — do not read `.wix/design-tokens.css` + `.wix/site.d.ts` from disk.
23
+ Read the design tokens from `.wix/design-tokens.css` (on disk, gate-verified present before the wave).
24
24
 
25
25
  For layout/spacing/typography, compose Tailwind utilities derived from `@theme` tokens at the call site (`<div class="grid grid-cols-1 md:grid-cols-[1fr_22rem] gap-2xl">`). For published global semantic classes (`cart-summary`, `cart-total`, `checkout-btn`, `cart-empty` — the compound + interactive-state patterns), use the ACTUAL class name verbatim. Row-internal class names (`cart-item-qty`, `qty-btn`, etc.) come from the template — keep them as-is and live in `components-ecom.css`. See `references/shared/STYLING.md` and `references/shared/IMPLEMENTER.md` § "Styling: tokens-first, classes as exception".
26
26
 
@@ -67,7 +67,7 @@ Class names used (template provides them — do not invent):
67
67
 
68
68
  Use template `templates/CartBadge.tsx`.
69
69
 
70
- Mounted once in `Navigation.astro` (by `ecom-pages` scope). Shows cart item count; listens for `cart-updated` custom event.
70
+ Mounted once in `Navigation.astro` (by the `cart-checkout` scope). Shows cart item count; listens for `cart-updated` custom event.
71
71
 
72
72
  **No `initialCount` prop.** Cart is per-visitor — server-rendering the count breaks SSR caching. On mount, CartBadge reads the sessionStorage snapshot that CartView maintains (same `CART_CACHE_KEY`) to seed the initial count without a visible zero-flash between page navigations, then fetches fresh from the SDK and reconciles. If no snapshot exists (first-ever page load), count starts at 0 like before.
73
73
 
@@ -77,7 +77,7 @@ Contract keys: `cartBadge`, `cartBadgeCount`
77
77
 
78
78
  ### 3. `src/utils/analytics.ts` — not owned by this scope
79
79
 
80
- > `analytics.ts` is a shared utility (see `references/shared/analytics.ts`). Import from it (`import { trackEvent } from "../utils/analytics"`) but do not write it.
80
+ > `analytics.ts` is a shared utility (canonical source `shared-utilities/analytics.ts`, seeded to `src/utils/analytics.ts`). Import from it (`import { trackEvent } from "../utils/analytics"`) but do not write it.
81
81
 
82
82
  ### 4. `src/styles/components-ecom.css` — not owned by this scope
83
83
 
@@ -1,6 +1,6 @@
1
1
  # Phase 3 Components-CSS — Ecom
2
2
 
3
- Sibling of the `components` scope. Launched in **Step 4.5** in the same concurrent batch — runs in parallel with the TSX work, stores components, gift-cards components, and Image Phase 2.
3
+ **This stylesheet is pre-copied from the skill template by the orchestrator** (build-wave pre-batch, BUILD-astro.md § "Step 4.5") — there is no `components-css` subagent to dispatch. This file documents the CSS for reference so the ecom `components` scope (in the merged build agent) knows the class-name surface it targets.
4
4
 
5
5
  ## What this scope owns
6
6
 
@@ -23,7 +23,7 @@ You only need:
23
23
  2. **`<SKILL_ROOT>/references/shared/STYLING.md`** — the styling-contract conventions (how to use `@apply`, the `@theme` token utilities, the no-default-Tailwind-colors rule, and the global-vs-scoped CSS ownership boundary).
24
24
  3. **`<SKILL_ROOT>/references/shared/RETURN_CONTRACT.md`** — the return JSON shape.
25
25
  4. **`src/styles/global.css`** in the project — read to audit for ecom-class leaks (see § "Global-CSS leak audit" below).
26
- 5. **Design tokens (inline in your prompt)** — the parent skill pastes the full `designTokens` JSON into your dispatch prompt. Use it directly; do NOT read `.wix/design-tokens.css` or `.wix/site.d.ts` from disk.
26
+ 5. **Design tokens (on disk)** — read the design tokens (the DESIGN.md vocabulary — `colors`/`typography`/`spacing`/`rounded`/`containers`) from `.wix/design-tokens.css` (gate-verified present before the wave). They are NOT inlined in your prompt.
27
27
 
28
28
  You do NOT need to read `INSTRUCTIONS.md`, `CART_WIRING.md`, the TSX templates, the `discounts.ts` util, or any other reference. Skipping those reads is the point of the split.
29
29
 
@@ -85,7 +85,7 @@ Write the adapted CSS to `src/styles/components-ecom.css`. The orchestrator's po
85
85
 
86
86
  ## Coordination: design tokens
87
87
 
88
- Your parent prompt includes the design tokens JSON inline. Use it directly — do **not** read `.wix/design-tokens.css` or `.wix/site.d.ts` from disk and do not poll for them.
88
+ Read the design tokens from `.wix/design-tokens.css` (on disk, gate-verified present before the wave) — they are NOT inlined in your prompt.
89
89
 
90
90
  ## Return format
91
91
 
@@ -33,10 +33,7 @@ Before writing any form code, ensure a contact form exists on the site via the f
33
33
  > Translate this prose-HTTP form into the full `curl` tool-call shape — pass `body` as JSON in `-d` (NOT a stringified JSON). See `../../shared/AUTHENTICATION.md` for the standard REST headers.
34
34
 
35
35
  Then retry listing forms.
36
- 3. **If forms list is empty** → create a form (two-step atomic operation):
37
- - **Step 3a:** POST to create the form (fields, layout, submit settings)
38
- - **Step 3b:** Immediately PATCH to add `postSubmissionTriggers` (the POST silently drops this field — see step 4)
39
- - Both steps must succeed. If 3a succeeds but 3b fails, log Status as `partial`.
36
+ 3. **If forms list is empty** → create a form. This is a two-step atomic operation (POST to create, then PATCH to add `postSubmissionTriggers`) — see step 4 for the full procedure and rationale.
40
37
 
41
38
  > **Namespace propagation:** If form creation fails with `UNSUPPORTED_FORM_NAMESPACE` immediately after installing the Forms app, the namespace hasn't propagated yet. Wait 10 seconds and retry up to 3 times. Do NOT silently fall back to static field definitions — forms without a `formId` cannot submit to Wix.
42
39
 
@@ -194,7 +191,7 @@ Before writing any form code, ensure a contact form exists on the site via the f
194
191
 
195
192
  ### 1. Modify the Existing Designed Page
196
193
 
197
- **Do NOT create a new page from scratch.** The design skill already created this page with branded styling, layout, and a `<style>` block. Modify it in place:
194
+ **Do NOT create a new page from scratch.** The merged `contact-page` scope writes this page once — branded styling, layout, and `<style>` block alongside the form wiring (per `references/astro/designer/INSTRUCTIONS.md` → `contact-page`). When wiring an existing designed page, modify it in place:
198
195
 
199
196
  1. **Add SDK imports** to the frontmatter:
200
197
  ```astro
@@ -262,7 +259,7 @@ The React island must match the designed component's class names and use CSS var
262
259
 
263
260
  **Approach B: Component owns its styles using CSS variables.** If the page doesn't have a `<style>` block for the form, the component includes a `<style>` JSX element using only CSS custom properties.
264
261
 
265
- > **Styling note:** The React island uses the styling contract class names (`.form-container`, `.form-field`, `.form-label`, `.form-input`, `.form-textarea`, `.form-button`, `.form-success`, `.form-error`, `.form-field-error`, `.form-input-error`) from the designed ContactForm component's `<style is:global>` block. See the design skill's `COMPONENT_PATTERNS.md` → Contact Form.
262
+ > **Styling note:** The React island uses the styling contract class names (`.form-container`, `.form-field`, `.form-label`, `.form-input`, `.form-textarea`, `.form-button`, `.form-success`, `.form-error`, `.form-field-error`, `.form-input-error`) from the designed ContactForm component's `<style is:global>` block. See `references/shared/STYLING.md` (Contact Form).
266
263
 
267
264
  ```tsx
268
265
  import { useState } from "react";
@@ -342,7 +339,7 @@ export default function ContactForm({ formId, fields }: ContactFormProps) {
342
339
  Uses styling contract classes: .form-container, .form-field, .form-label,
343
340
  .form-input, .form-select, .form-textarea, .form-button, .form-error,
344
341
  .form-field-error, .form-input-error.
345
- See design skill's COMPONENT_PATTERNS.md → Contact Form. */}
342
+ See references/shared/STYLING.md (Contact Form). */}
346
343
 
347
344
  {fields.map((field) => (
348
345
  <div key={field.target} className="form-field">
@@ -411,7 +408,7 @@ export default function ContactForm({ formId, fields }: ContactFormProps) {
411
408
  }
412
409
  ```
413
410
 
414
- > **Adapting class names:** The class names above (`form-container`, `form-field`, `form-label`, `form-input`, `form-button`, `form-success`, `form-error`, `form-field-error`, `form-input-error`) are defaults. If the designed component uses different class names, use those instead — the styling contract from the design skill takes precedence.
411
+ > **Adapting class names:** The class names above (`form-container`, `form-field`, `form-label`, `form-input`, `form-button`, `form-success`, `form-error`, `form-field-error`, `form-input-error`) are defaults. If the designed component uses different class names, use those instead — the styling contract from the page's own design takes precedence.
415
412
 
416
413
  ## Discovering Forms
417
414
 
@@ -458,17 +455,6 @@ field.inputOptions.stringOptions.phoneInputOptions?.label // label for phone
458
455
 
459
456
  Custom fields use UUID-based targets from the form schema.
460
457
 
461
- ## Log Results
462
-
463
- After form verification, write a sidecar file at `.wix/logs/forms-data.md` (form schema setup) or `.wix/logs/forms-implementer.md` (Phase 2 wiring) — see `../../shared/LIFECYCLE_LOG.md` for the sidecar contract. Do **not** append to `.wix/lifecycle.log.md` directly — the orchestrator concatenates all sidecars at the end. Use a `####` heading so the entry nests under `### features-orchestrator` in the assembled log:
464
-
465
- ```markdown
466
- ## forms
467
- - Status: complete
468
- - Content: "{form name}" form created (fields: {field list})
469
- - Images: not applicable
470
- ```
471
-
472
458
  ## Testing
473
459
 
474
460
  1. Run `npx @wix/cli@latest dev`
@@ -1,6 +1,6 @@
1
1
  # Phase 3 Components — Gift Cards
2
2
 
3
- Launched in **Step 4.5** alongside other verticals' `components` scopes (after Phase 2 Design System). Writes the runtime probe utility, the buy-flow React island, and scoped CSS. Finishes before the Phase 4 Pages scopes run in Step 7.
3
+ This is the **components** portion of the gift-cards **merged build agent** (the build wave). Your agent writes the runtime probe utility, the buy-flow React island, and scoped CSS **first**, then its pages (`/gift-cards` route + Navigation/index patches) — so the island is on disk before the page mounts it. Because the page side patches the shared shells, the whole gift-cards agent runs in the build wave's **serialized shell chain** (`BUILD-astro.md` § "Step 4.5").
4
4
 
5
5
  ## Scope
6
6
 
@@ -18,7 +18,7 @@ Files this agent MUST NOT touch:
18
18
 
19
19
  ## Coordination: design tokens
20
20
 
21
- Your parent prompt includes the design tokens inline. Reference token CSS variables (`var(--color-cream)`, `var(--spacing-lg)`, etc.) from `components-gift-cards.css`. Do NOT read `.wix/design-tokens.css` from disk.
21
+ Read the design tokens from `.wix/design-tokens.css` (on disk, gate-verified present before the wave). Reference token CSS variables (`var(--color-cream)`, `var(--spacing-lg)`, etc.) from `components-gift-cards.css`.
22
22
 
23
23
  ## Critical rules
24
24
 
@@ -1,6 +1,6 @@
1
1
  # Phase 4 Pages — Gift Cards
2
2
 
3
- Launched in **Step 7** alongside other verticals' `pages` scopes. Writes the `/gift-cards` route and patches `Navigation.astro` + `index.astro` at their declared markers. The Components scope's outputs (`src/utils/gift-cards.ts`, `src/components/GiftCardPurchase.tsx`, `src/styles/components-gift-cards.css`) must already exist before this scope runs.
3
+ The **pages** portion of the gift-cards **merged build agent** (the build wave) — written *after* its `components`. Writes the `/gift-cards` route and patches `Navigation.astro` + `index.astro` at their declared markers. Because it patches the shared shells, the gift-cards agent runs in the build wave's **serialized shell chain** (one shell-patcher at a time — `BUILD-astro.md` § "Step 4.5"). The components outputs (`src/utils/gift-cards.ts`, `src/components/GiftCardPurchase.tsx`, `src/styles/components-gift-cards.css`) were written earlier in this same agent, so they're already on disk.
4
4
 
5
5
  ## Scope
6
6