@wix/agent-skills 1.8.0 → 1.10.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 (66) hide show
  1. package/package.json +1 -1
  2. package/skills/wix-app/references/EDITOR_REACT_COMPONENT.md +2 -1
  3. package/skills/wix-app/references/editor-react-component/ACCESSIBILITY.md +14 -0
  4. package/skills/wix-app/references/editor-react-component/REACT-GUIDELINES.md +11 -6
  5. package/skills/wix-app/references/editor-react-component/REACT-PATTERNS.md +3 -17
  6. package/skills/wix-app/references/editor-react-component/SSR.md +119 -0
  7. package/skills/wix-design-system/SKILL.md +1 -1
  8. package/skills/wix-headless/references/BUILD-astro.md +5 -7
  9. package/skills/wix-headless/references/DESIGN_SYSTEM.md +6 -16
  10. package/skills/wix-headless/references/SETUP.md +1 -1
  11. package/skills/wix-headless/references/astro/bookings/COMPONENTS.md +41 -333
  12. package/skills/wix-headless/references/astro/bookings/SERVICES_PAGES.md +77 -428
  13. package/skills/wix-headless/references/astro/cms/FAQ_KNOWLEDGE_BASE.md +2 -2
  14. package/skills/wix-headless/references/astro/designer/INSTRUCTIONS.md +7 -10
  15. package/skills/wix-headless/references/astro/ecom/CART_WIRING.md +2 -2
  16. package/skills/wix-headless/references/astro/ecom/COMPONENTS_CSS.md +3 -3
  17. package/skills/wix-headless/references/astro/gift-cards/COMPONENTS.md +2 -2
  18. package/skills/wix-headless/references/astro/stores/BACK_IN_STOCK.md +7 -7
  19. package/skills/wix-headless/references/astro/stores/COMPONENTS_CSS.md +4 -4
  20. package/skills/wix-headless/references/astro/stores/PRODUCT_PAGES.md +2 -2
  21. package/skills/wix-headless/references/astro/templates/Footer.astro +4 -4
  22. package/skills/wix-headless/references/astro/templates/Navigation.astro +4 -4
  23. package/skills/wix-headless/references/astro/templates/bookings/AvailabilityCalendar.tsx +298 -142
  24. package/skills/wix-headless/references/astro/templates/bookings/BookingForm.tsx +104 -162
  25. package/skills/wix-headless/references/astro/templates/bookings/ServiceBookingFlow.tsx +35 -14
  26. package/skills/wix-headless/references/astro/templates/bookings/ServiceCard.astro +11 -2
  27. package/skills/wix-headless/references/astro/templates/bookings/booking-confirmation.astro +23 -85
  28. package/skills/wix-headless/references/astro/templates/bookings/bookingDriver.ts +245 -0
  29. package/skills/wix-headless/references/astro/templates/bookings/components-bookings.css +209 -198
  30. package/skills/wix-headless/references/astro/templates/bookings/services/[slug].astro +114 -19
  31. package/skills/wix-headless/references/astro/templates/bookings/services/index.astro +131 -15
  32. package/skills/wix-headless/references/astro/templates/ecom/CartView.tsx +3 -3
  33. package/skills/wix-headless/references/astro/templates/ecom/cart.astro +3 -3
  34. package/skills/wix-headless/references/astro/templates/ecom/components-ecom.css +17 -17
  35. package/skills/wix-headless/references/astro/templates/ecom/thank-you.astro +3 -3
  36. package/skills/wix-headless/references/astro/templates/gift-cards/_home-teaser-snippet.astro +4 -4
  37. package/skills/wix-headless/references/astro/templates/gift-cards/components-gift-cards.css +19 -18
  38. package/skills/wix-headless/references/astro/templates/gift-cards/gift-cards.astro +3 -3
  39. package/skills/wix-headless/references/astro/templates/global.css +17 -15
  40. package/skills/wix-headless/references/astro/templates/index.astro +4 -4
  41. package/skills/wix-headless/references/astro/templates/stores/components-stores.css +31 -31
  42. package/skills/wix-headless/references/astro/templates/stores/products/[slug].astro +4 -4
  43. package/skills/wix-headless/references/bookings/FLOW.md +246 -0
  44. package/skills/wix-headless/references/bookings/INSTRUCTIONS.md +65 -76
  45. package/skills/wix-headless/references/bookings/SERVICES_DATA.md +60 -0
  46. package/skills/wix-headless/references/custom/bookings/WIRING.md +169 -60
  47. package/skills/wix-headless/references/shared/DESIGN_MD.md +2 -3
  48. package/skills/wix-headless/references/shared/IMPLEMENTER.md +4 -4
  49. package/skills/wix-headless/references/shared/STYLING.md +15 -18
  50. package/skills/wix-headless/references/stores/INSTRUCTIONS.md +2 -2
  51. package/skills/wix-headless/references/verticals/bookings.md +9 -9
  52. package/skills/wix-headless/scripts/compose.mjs +4 -19
  53. package/skills/wix-headless/scripts/emit-design-tokens.mjs +0 -3
  54. package/skills/wix-manage/SKILL.md +12 -0
  55. package/skills/wix-manage/references/app-installation/install-wix-apps.md +3 -27
  56. package/skills/wix-manage/references/bookings/create-appointment-service.md +254 -0
  57. package/skills/wix-manage/references/bookings/create-booking-service-from-prompt.md +37 -0
  58. package/skills/wix-manage/references/bookings/create-class-service.md +233 -0
  59. package/skills/wix-manage/references/bookings/create-course-service.md +237 -0
  60. package/skills/wix-manage/references/cms/cms-data-items-crud.md +2 -1
  61. package/skills/wix-manage/references/cms/cms-schema-management.md +1 -1
  62. package/skills/wix-manage/references/stores/create-product-from-image.md +154 -2
  63. package/skills/wix-headless/references/astro/templates/bookings/ManageBooking.tsx +0 -84
  64. package/skills/wix-headless/references/astro/templates/bookings/api/confirm-booking.ts +0 -34
  65. package/skills/wix-headless/references/astro/templates/bookings/api/waitlist.ts +0 -74
  66. package/skills/wix-headless/references/astro/templates/bookings/manage-booking.astro +0 -76
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/agent-skills",
3
- "version": "1.8.0",
3
+ "version": "1.10.0",
4
4
  "description": "Wix Skills for AI coding agents — versioned npm distribution of the wix/skills content.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -72,7 +72,8 @@ Topic-focused references (rules + patterns + common mistakes in one place):
72
72
  - [`editor-react-component/DIRECTIONALITY.md`](editor-react-component/DIRECTIONALITY.md) — RTL/LTR rules and patterns
73
73
  - [`editor-react-component/PROPS-VS-CSS.md`](editor-react-component/PROPS-VS-CSS.md) — What should be a React prop vs CSS
74
74
  - [`editor-react-component/COMPONENT-API.md`](editor-react-component/COMPONENT-API.md) — Props structure, elementProps, data types, file splitting, containers, array props
75
- - [`editor-react-component/REACT-PATTERNS.md`](editor-react-component/REACT-PATTERNS.md) — SSR-safe patterns, CSS rules, remaining common mistakes
75
+ - [`editor-react-component/SSR.md`](editor-react-component/SSR.md) — Server-side rendering rules (mandatory)
76
+ - [`editor-react-component/REACT-PATTERNS.md`](editor-react-component/REACT-PATTERNS.md) — CSS rules, remaining common mistakes
76
77
 
77
78
  ## CSS guidelines
78
79
 
@@ -13,6 +13,20 @@ Rules and patterns for ARIA accessibility support in Editor React components.
13
13
  - The `A11y` type includes: `ariaLabel`, `ariaDescribedBy`, `ariaLabelledBy`, `role`, `ariaHidden`, `ariaLive`, and all other ARIA attributes.
14
14
  - Users provide ARIA values through the `a11y` prop: `<Component a11y={{ ariaLabel: "..." }} />`
15
15
 
16
+ ### Stable IDs for Element Relationships
17
+
18
+ ARIA relationships (`aria-controls`, `aria-labelledby`, `aria-describedby`) and `htmlFor` need element ids. Generate them with `useStableId` from `@wix/react-component-utils` — passing the `id` prop as the override — never `Math.random()`, a manual counter, or a bare `React.useId()` (those break SSR/hydration). See [`SSR.md`](SSR.md) for the full rule.
19
+
20
+ ```tsx
21
+ import { useStableId } from '@wix/react-component-utils';
22
+
23
+ const rootId = useStableId(id);
24
+ const panelId = `${rootId}-panel`;
25
+
26
+ <button aria-controls={panelId}>{label}</button>
27
+ <div id={panelId} role="tabpanel">{content}</div>
28
+ ```
29
+
16
30
  ### ARIA Label Rules
17
31
 
18
32
  ARIA labels are user-facing content and must NEVER be hardcoded as string literals in JSX.
@@ -8,7 +8,8 @@ This guide defines rules and guidance on **how to implement** production-quality
8
8
  - [`DIRECTIONALITY.md`](DIRECTIONALITY.md) — RTL/LTR rules and patterns
9
9
  - [`PROPS-VS-CSS.md`](PROPS-VS-CSS.md) — What should be a React prop vs CSS
10
10
  - [`COMPONENT-API.md`](COMPONENT-API.md) — Props structure, elementProps, data types, file splitting, containers, array props
11
- - [`REACT-PATTERNS.md`](REACT-PATTERNS.md) — SSR-safe patterns, CSS rules, common mistakes
11
+ - [`SSR.md`](SSR.md) — Server-side rendering rules (mandatory)
12
+ - [`REACT-PATTERNS.md`](REACT-PATTERNS.md) — CSS rules, common mistakes
12
13
 
13
14
  ## React 18 features are not supported
14
15
 
@@ -42,6 +43,10 @@ Direction support is mandatory — see [`DIRECTIONALITY.md`](DIRECTIONALITY.md).
42
43
 
43
44
  See [`ACCESSIBILITY.md`](ACCESSIBILITY.md) for full rules and patterns.
44
45
 
46
+ ### SSR Safety
47
+
48
+ Components are server-rendered, then hydrated — they MUST render correctly, completely, and identically on the server. See [`SSR.md`](SSR.md) for full rules and patterns.
49
+
45
50
  ### TypeScript
46
51
 
47
52
  - All components must be fully typed
@@ -67,11 +72,11 @@ All components MUST follow these patterns:
67
72
 
68
73
  **1. SSR-Safe Implementation**
69
74
 
70
- - NO browser APIs at module scope (window, document, navigator, etc.)
71
- - Guard browser APIs with typeof checks or useEffect
72
- - All browser-dependent logic must run client-side only
75
+ - NO browser APIs at module scope or during render (window, document, navigator, etc.) — guard inside `useEffect`
76
+ - First render must be complete and deterministic; effects are client-only enhancement
77
+ - Internal ids via `useStableId`; NO `useLayoutEffect`
73
78
 
74
- See [`REACT-PATTERNS.md`](REACT-PATTERNS.md) §1.1 for code examples.
79
+ See [`SSR.md`](SSR.md) for full rules and code examples.
75
80
 
76
81
  **2. Clean Code**
77
82
 
@@ -162,6 +167,6 @@ See [`PROPS-VS-CSS.md`](PROPS-VS-CSS.md) and [`COMPONENT-API.md`](COMPONENT-API.
162
167
 
163
168
  **Phase 1: Analysis** — Parse information, map component structure (see Part 0)
164
169
 
165
- **Phase 2: Component File** — Apply all §1.1 mandatory features and §1.2 implementation standards
170
+ **Phase 2: Component File** — Apply all §1.1 mandatory features and §1.2 implementation standards; verify SSR safety against [`SSR.md`](SSR.md)
166
171
 
167
172
  **Phase 3: Styles** — Apply Part 2 SCSS rules
@@ -6,23 +6,7 @@ Code patterns and common mistakes for Editor React components.
6
6
 
7
7
  ## 1.1 SSR-Safe Implementation
8
8
 
9
- Avoid browser-only APIs at module scope or during render; use them inside `useEffect` with `typeof window !== 'undefined'`.
10
-
11
- **❌ Wrong:**
12
-
13
- ```typescript
14
- const userAgent = window.navigator.userAgent;
15
- ```
16
-
17
- **✅ Correct:**
18
-
19
- ```typescript
20
- useEffect(() => {
21
- if (typeof window !== "undefined") {
22
- const userAgent = window.navigator.userAgent;
23
- }
24
- }, []);
25
- ```
9
+ Components are server-rendered then hydrated. See [`SSR.md`](SSR.md) for the full rules and code examples (browser globals, complete first render, deterministic output, `useStableId`, no `useLayoutEffect`).
26
10
 
27
11
  ## 1.2 Element Visibility (Platform-Managed)
28
12
 
@@ -102,6 +86,8 @@ different — they go through a JS-toggled modifier class; see
102
86
 
103
87
  ## 3.2 Browser APIs at module scope
104
88
 
89
+ See [`SSR.md`](SSR.md) for the full SSR rules.
90
+
105
91
  **❌ Wrong:**
106
92
 
107
93
  ```typescript
@@ -0,0 +1,119 @@
1
+ # Server-Side Rendering (SSR)
2
+
3
+ Rules and patterns for SSR-safe Editor React components.
4
+
5
+ Editor React components are server-rendered and then hydrated on the client — every component MUST render correctly, completely, and identically on the server. SSR safety is mandatory for every component.
6
+
7
+ ---
8
+
9
+ ## Rules
10
+
11
+ ### No browser globals at module scope or during render
12
+
13
+ `window`, `document`, `navigator`, `localStorage`, `sessionStorage`, `matchMedia`, `IntersectionObserver`, `ResizeObserver`, and other DOM/BOM APIs do not exist on the server. Never touch them at module scope or in the render body. Access them only inside `useEffect`, optionally guarded with `typeof window !== 'undefined'`.
14
+
15
+ **❌ Wrong:**
16
+
17
+ ```typescript
18
+ const userAgent = window.navigator.userAgent;
19
+ ```
20
+
21
+ **✅ Correct:**
22
+
23
+ ```typescript
24
+ useEffect(() => {
25
+ if (typeof window !== "undefined") {
26
+ const userAgent = window.navigator.userAgent;
27
+ }
28
+ }, []);
29
+ ```
30
+
31
+ ### First render must be complete
32
+
33
+ Render all parts unconditionally — never gate structural elements behind effect-set state. Initialize `useState` to a valid, server-renderable default so the first (server) render already shows the final structure. Element visibility is platform-managed; see [`PROPS-VS-CSS.md`](PROPS-VS-CSS.md) and [`REACT-PATTERNS.md`](REACT-PATTERNS.md) §1.2.
34
+
35
+ **❌ Wrong — content only appears after an effect runs (missing on the server):**
36
+
37
+ ```tsx
38
+ const [items, setItems] = useState<Array<Item>>([]);
39
+ useEffect(() => {
40
+ setItems(buildItems(props));
41
+ }, [props]);
42
+ return <ul>{items.map(/* ... */)}</ul>; // empty on the server
43
+ ```
44
+
45
+ **✅ Correct — derive during render so it exists on the first pass:**
46
+
47
+ ```tsx
48
+ const items = buildItems(props);
49
+ return <ul>{items.map(/* ... */)}</ul>;
50
+ ```
51
+
52
+ ### Deterministic render
53
+
54
+ The same props MUST produce the same markup on the server and the client. No `Math.random()`, `Date.now()`, `new Date()`, or locale/timezone-dependent output during render — these differ across environments and break hydration.
55
+
56
+ **❌ Wrong:**
57
+
58
+ ```tsx
59
+ <span>{new Date().toLocaleString()}</span>
60
+ ```
61
+
62
+ **✅ Correct — derive from props, or compute in an effect:**
63
+
64
+ ```tsx
65
+ <span>{formatDate(props.timestamp)}</span>
66
+ ```
67
+
68
+ ### Stable IDs via `useStableId`
69
+
70
+ When a component needs an internal id (ARIA wiring such as `aria-controls` / `aria-labelledby`, or `htmlFor`), generate it with `useStableId` from `@wix/react-component-utils`. Never use `Math.random()`, a manual counter, or a bare `React.useId()` — those break hydration or are not available across runtimes. Pass the component's `id` prop as the override so a caller-supplied id wins, then derive child ids from the result.
71
+
72
+ **✅ Correct:**
73
+
74
+ ```tsx
75
+ import { useStableId } from '@wix/react-component-utils';
76
+
77
+ const rootId = useStableId(id);
78
+ const panelId = `${rootId}-panel`;
79
+
80
+ <button aria-controls={panelId}>{label}</button>
81
+ <div id={panelId} role="tabpanel">{content}</div>
82
+ ```
83
+
84
+ **❌ Wrong:**
85
+
86
+ ```tsx
87
+ const panelId = `tab-${Math.random()}`; // ❌ differs every render
88
+ const panelId = React.useId(); // ❌ use the useStableId util instead
89
+ ```
90
+
91
+ ### No `useLayoutEffect`
92
+
93
+ `useLayoutEffect` does nothing on the server and triggers a React warning. Use `useEffect` for client-only work.
94
+
95
+ **❌ Wrong:**
96
+
97
+ ```tsx
98
+ useLayoutEffect(() => { measure(); }, []);
99
+ ```
100
+
101
+ **✅ Correct:**
102
+
103
+ ```tsx
104
+ useEffect(() => { measure(); }, []);
105
+ ```
106
+
107
+ ### Effects are client-only enhancement
108
+
109
+ `useEffect` runs only after hydration, never on the server. Use effects to enhance — not to produce the initial UI. The server-rendered default state must already look correct before any effect runs.
110
+
111
+ ---
112
+
113
+ ## SSR Checklist
114
+
115
+ - [ ] No browser globals at module scope or in the render body — guarded inside `useEffect` only
116
+ - [ ] All parts render unconditionally on the first pass; state initialized to a server-safe default
117
+ - [ ] Render output is deterministic — no `Math.random()` / `Date.now()` / `new Date()` / locale-dependent output during render
118
+ - [ ] Internal ids come from `useStableId(id)`, never random values, counters, or bare `React.useId()`
119
+ - [ ] No `useLayoutEffect`
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: wix-design-system
3
- description: Wix Design System component reference. Use when building UI with @wix/design-system, choosing components, checking props and examples, or writing tests with component testkits. Triggers on "what component", "how do I make", "WDS", "show me props", "testkit", "driver", or component names like Button, Card, Modal, Box, Text.
3
+ description: Wix Design System component reference. Use when building UI with @wix/design-system, choosing components, checking props and examples, or writing tests with component testkits. Triggers on "what component", "how do I make", "WDS", "show me props", "testkit", "driver", or component names like Button, Card, Box, Text.
4
4
  ---
5
5
 
6
6
  # WDS Documentation Navigator
@@ -171,14 +171,12 @@ cp "<SKILL_ROOT>/references/astro/templates/stores/back-in-stock.ts" "src/utils/
171
171
  cp "<SKILL_ROOT>/references/astro/templates/stores/categories.ts" "src/utils/categories.ts"
172
172
  # ecom (loaded)
173
173
  cp "<SKILL_ROOT>/references/astro/templates/ecom/discounts.ts" "src/utils/discounts.ts"
174
- # bookings (loaded) — elevated SSR API endpoints + SeoTags
175
- mkdir -p src/pages/api
176
- cp "<SKILL_ROOT>/references/astro/templates/bookings/api/confirm-booking.ts" "src/pages/api/confirm-booking.ts"
177
- cp "<SKILL_ROOT>/references/astro/templates/bookings/api/waitlist.ts" "src/pages/api/waitlist.ts"
178
- cp "<SKILL_ROOT>/references/astro/templates/bookings/SeoTags.astro" "src/components/SeoTags.astro"
174
+ # bookings (loaded) — the booking SDK module + SeoTags
175
+ cp "<SKILL_ROOT>/references/astro/templates/bookings/bookingDriver.ts" "src/components/bookingDriver.ts"
176
+ cp "<SKILL_ROOT>/references/astro/templates/bookings/SeoTags.astro" "src/components/SeoTags.astro"
179
177
  ```
180
178
 
181
- `categories.ts` is imported by `pages-categories`/`pages-products`/`pages-home-and-nav`; `back-in-stock.ts` by stores components; `discounts.ts` by ecom components + stores product pages; the bookings API endpoints (elevated `confirmBooking` seat-hold + native v1 waitlist register) by `BookingForm.tsx`, and `SeoTags.astro` by `services/[slug].astro`. Static, brand-agnostic SDK wrappers — if not pre-copied, multiple scopes race to author them.
179
+ `categories.ts` is imported by `pages-categories`/`pages-products`/`pages-home-and-nav`; `back-in-stock.ts` by stores components; `discounts.ts` by ecom components + stores product pages; `bookingDriver.ts` (the ecom-Cart-V2 booking sequence — `book()`/`navigateToCheckout()`) by the bookings islands, and `SeoTags.astro` by `services/[slug].astro`. Static, brand-agnostic SDK wrappers — if not pre-copied, multiple scopes race to author them.
182
180
 
183
181
  ### Dispatch the wave — one concurrent batch (private agents) + a serialized shell chain alongside it
184
182
 
@@ -193,7 +191,7 @@ One merged "build" agent per loaded vertical (Instruction file = that vertical's
193
191
  **B · Serialized shell chain — agents that patch `Navigation.astro` / `index.astro`** (read-modify-write a shared file → concurrent dispatch trips the staleness guard `File has been modified since read`, **per-file, not per-marker**). **Launch one, wait for its return, launch the next** — each sees the previous one's insertion. Runs **alongside** batch A, not after it. The shell-patchers (today): **ecom, stores `pages-home-and-nav`, bookings, gift-cards** — exactly the packs with `nav:`/`home:` markers:
194
192
  - **ecom-build** — `components` (CartView, CartBadge) → `pages` (`cart.astro`, `thank-you.astro` private, **+ CartBadge mount in `Navigation.astro` at `<!-- nav:actions -->`**).
195
193
  - **stores-home-and-nav** — patch `index.astro` product grid at `<!-- home:stores -->` + `Navigation.astro` Shop submenu at `<!-- nav:links -->`. Writes no islands; pure shell-patcher.
196
- - **bookings-build** — `components` (ServiceCard, AvailabilityCalendar, BookingForm, ServiceBookingFlow, ManageBooking) → `pages` (`services/index.astro`, `services/[slug].astro`, `booking-confirmation.astro`, `manage-booking.astro` private, **+ Services link in `Navigation.astro` at `<!-- nav:links -->` / services teaser in `index.astro` at `<!-- home:bookings -->`**).
194
+ - **bookings-build** — `components` (AvailabilityCalendar, BookingForm, ServiceBookingFlow islands; `bookingDriver.ts` + `SeoTags.astro` are pre-copied) → `pages` (`services/index.astro`, `services/[slug].astro`, `ServiceCard.astro`, `booking-confirmation.astro` private, **+ Services link in `Navigation.astro` at `<!-- nav:links -->` / services teaser in `index.astro` at `<!-- home:bookings -->`**).
197
195
  - **gift-cards-build** — `components` (probe util, GiftCardPurchase island) → `pages` (gift-cards landing + `Navigation.astro` `<!-- nav:links -->` / `index.astro` `<!-- home:gift-cards -->`).
198
196
 
199
197
  Cross-vertical imports (`stores-home-and-nav` importing `CategoryRail`/`ProductCard`/`utils/categories.ts`) resolve at **build time**, not write time, so they impose no write-ordering between the chain and batch A. The only ordering: (i) shell-patchers serialize against each other (per-file), (ii) everything is on disk before Build.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: design-system-designer
3
- description: "The Designer role of the wix-headless design-system phase. Picks the brand's visual identity and authors it as DESIGN.md — the single, portable design-token format (palette, type, spacing, rounded, content widths) plus a small block of brand-voice strings. Writes DESIGN.md directly (its only file, at the dispatch's designMdPath) and returns just data.shell + the designMdPath, so the orchestrator never re-emits the tokens. emit-design-tokens.mjs reads DESIGN.md's frontmatter and projects .wix/design-tokens.css + .wix/site.d.ts; compose.mjs (astro) reads DESIGN.md to write the design-system files. Makes no rendering decision (no CSS, no Tailwind, no Astro)."
3
+ description: "The Designer role of the wix-headless design-system phase. Picks the brand's visual identity and authors it as DESIGN.md — the single, portable design-token format (palette, type, rounded, content widths) plus a small block of brand-voice strings. Writes DESIGN.md directly (its only file, at the dispatch's designMdPath) and returns just data.shell + the designMdPath, so the orchestrator never re-emits the tokens. emit-design-tokens.mjs reads DESIGN.md's frontmatter and projects .wix/design-tokens.css + .wix/site.d.ts; compose.mjs (astro) reads DESIGN.md to write the design-system files. Makes no rendering decision (no CSS, no Tailwind, no Astro)."
4
4
  ---
5
5
 
6
6
  # Designer — the design itself
@@ -11,7 +11,7 @@ You author **`DESIGN.md`** (its YAML frontmatter is the spec) — see "What you
11
11
 
12
12
  Your output is small and mostly thinking: a coherent, complete brand visual expressed as `DESIGN.md` frontmatter, plus a handful of brand-voice strings (returned as `data.shell`). Speed comes from staying in this lane — one small spec file + a small return, not site files.
13
13
 
14
- > **DESIGN.md is the single design artifact — there is no separate "design tokens" JSON contract.** What you author *is* the DESIGN.md frontmatter (DESIGN.md vocabulary: `colors` / `typography` / `spacing` / `rounded` / `containers` / `googleFontsHref`). **You write `DESIGN.md` directly**; `emit-design-tokens.mjs` then projects `.wix/design-tokens.css` + `.wix/site.d.ts` from its frontmatter; `compose.mjs` (astro) reads the same frontmatter to write the site files; non-astro frontends import the token CSS. Because the **frontmatter** is what every consumer reads, your completeness bar is the whole game — a thin spec yields a thin DESIGN.md.
14
+ > **DESIGN.md is the single design artifact — there is no separate "design tokens" JSON contract.** What you author *is* the DESIGN.md frontmatter (DESIGN.md vocabulary: `colors` / `typography` / `rounded` / `containers` / `googleFontsHref`). **You write `DESIGN.md` directly**; `emit-design-tokens.mjs` then projects `.wix/design-tokens.css` + `.wix/site.d.ts` from its frontmatter; `compose.mjs` (astro) reads the same frontmatter to write the site files; non-astro frontends import the token CSS. Because the **frontmatter** is what every consumer reads, your completeness bar is the whole game — a thin spec yields a thin DESIGN.md.
15
15
 
16
16
  ## Self-Loading
17
17
 
@@ -38,7 +38,7 @@ You do **not** receive (and do not need) loaded packs, navigation links, disable
38
38
  - Open the file with `---` on its own line and close the frontmatter with `---`.
39
39
  - **QUOTE every string value with double quotes — especially hex colors** (`paper: "#FFFBF0"`). An unquoted `#hex` after `: ` is read as a YAML comment and the token vanishes.
40
40
  - **2-space indent** for nested groups. `typography` entries may use an indented `fontFamily:` line or flow style `{ fontFamily: "..." }`.
41
- - Groups: `colors`, `typography`, `spacing`, `rounded`, `containers`; plus the top-level `googleFontsHref`. Fill every color role (completeness is your bar — see below).
41
+ - Groups: `colors`, `typography`, `rounded`, `containers`; plus the top-level `googleFontsHref`. Fill every color role (completeness is your bar — see below).
42
42
 
43
43
  **The `DESIGN.md` you write** (frontmatter is canonical; the body is documentation, never parsed):
44
44
 
@@ -59,16 +59,6 @@ colors:
59
59
  typography:
60
60
  display: { fontFamily: "..." }
61
61
  body: { fontFamily: "..." }
62
- spacing:
63
- 2xs: "..."
64
- xs: "..."
65
- sm: "..."
66
- md: "..."
67
- lg: "..."
68
- xl: "..."
69
- 2xl: "..."
70
- 3xl: "..."
71
- 4xl: "..."
72
62
  rounded:
73
63
  sm: "..."
74
64
  md: "..."
@@ -111,7 +101,7 @@ Concrete values with **semantic roles**, in the DESIGN.md vocabulary (`DESIGN_MD
111
101
  - **`colors`** — a complete palette covering semantic roles, not just brand accents. **All six core roles are required** (emit every one): `paper` (primary background), `paper-warm` (secondary surface), `ink` (primary text / dark fills), `mute` (muted text), `rule` (borders / dividers), `accent` (brand emphasis). Also emit the recommended `ink-soft`, `cream`, `error`. Every value a concrete hex string. These wix-native role names are valid DESIGN.md color tokens — use them directly. **Map the approved palette to roles — do not re-pick hues.** The **accent** hex from the Color palette input → `accent`; the dominant **background** → `paper`; the primary **text** → `ink`. The remaining roles (`paper-warm`, `ink-soft`, `mute`, `rule`, `cream`, `error`) are **tonal derivatives of that approved palette** — lighten/darken/desaturate **within the same hue family**, never a new hue and never a generic editorial default set. **`compose.mjs` derives a missing role only as a last-resort fail-safe** (e.g. `ink-soft` ≈ `ink` lightened) — that yields a less intentional palette, so completeness is on you.
112
102
  - **`typography`** — a map of levels to type tokens. **Use the exact `display` and `body` font families from the Typography input, verbatim** — no substitution, no "better" pairing, no swapping the approved serif for a different serif. The families are **given to you, not chosen by you**; you decide only `fontSize`/`fontWeight`/`lineHeight`/`letterSpacing` (optional — the wix pipeline consumes only `fontFamily`). Each level is `{ "fontFamily": "<the given family>" }` (e.g. `"Fraunces"`, `"Inter"`). Add `mono` only if the brand needs it.
113
103
  - **`googleFontsHref`** (top-level key in `data.design`) — the **ready** Google Fonts stylesheet href for the **given** `display` + `body` families, with the weight/optical axes each family actually supports. Emit the finished URL for those exact families: e.g. `"https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,400;0,9..144,600&family=Inter:wght@400;500;600&display=swap"`. If **both** families are system fonts (`system-ui`, `sans-serif`, etc.), emit `""` (the `<link>` is dropped). (If you omit it, `compose.mjs` builds a valid fallback with a standard 400–700 weight set, but the family-specific axes are lost — so emit it.)
114
- - **`spacing`** — a full rhythm scale, every step `2xs` through `4xl` (`2xs, xs, sm, md, lg, xl, 2xl, 3xl, 4xl`), each a concrete length (e.g. `"1rem"`). The brand's spacing rhythm, not container widths.
104
+ - **(no `spacing`)** — do not author a spacing scale. The build uses Tailwind v4's built-in numeric spacing (`gap-4`, `py-24`, …); a named `--spacing-<size>` scale was removed because its t-shirt names collided with the width utilities. Spacing is not your concern.
115
105
  - **`rounded`** — corner radii (DESIGN.md's name for radius tokens): `sm` and `md` required; `lg`, `xl` if the brand uses larger curves. Concrete lengths.
116
106
  - **`containers`** — content/reading widths (a DESIGN.md extension this skill uses), **conceptually separate from spacing**: `prose` (a readable text column, ~`42rem`), plus `md`, `3xl`, `6xl` as page max-widths. Widths, not spacing steps — never reuse a spacing value as a container value (a reading column is ~`42rem`, not `5rem`).
117
107
 
@@ -141,12 +131,12 @@ You pick *what the brand looks like* — "paper = `#FAF6EF`", "display face = Fr
141
131
  | Write `global.css`, token CSS, or any **site** file | Write **only** `DESIGN.md` (your design spec) — `emit-design-tokens.mjs` projects the token CSS from it, `compose.mjs` authors site files |
142
132
  | Echo the tokens inline in your return | They live in `DESIGN.md`; return only `data.shell` + the `designMdPath` you wrote (keeps the tokens out of the orchestrator's output) |
143
133
  | Unquoted hex in frontmatter (`paper: #FFFBF0`) | Quote every string value (`paper: "#FFFBF0"`) — an unquoted `#hex` parses as a comment and the token is lost |
144
- | Emit an `@theme` block, `--color-*` names, or Tailwind utilities | Return DESIGN.md frontmatter (`colors`/`typography`/`spacing`/`rounded`/`containers`); `compose.mjs` maps them |
134
+ | Emit an `@theme` block, `--color-*` names, or Tailwind utilities | Return DESIGN.md frontmatter (`colors`/`typography`/`rounded`/`containers`); `compose.mjs` maps them |
145
135
  | Return the old `designTokens` shape (`fonts`, `radii`) | Use the DESIGN.md vocabulary: `typography` (with `fontFamily`), `rounded` — there is no separate token JSON anymore |
146
136
  | Decide CSS structure, View-Transitions, `@apply`, markers, file layout | All application — `compose.mjs`'s domain |
147
137
  | Read `STYLING.md`, templates, or `.astro` files | Every input is inlined; read only `DESIGN_MD.md` + `RETURN_CONTRACT.md` |
148
138
  | Branch on framework (astro vs custom) or loaded packs | The DESIGN.md is framework- and pack-blind by construction |
149
- | Alias a container width to a spacing value | `containers.prose` ≈ `42rem`; `spacing.3xl` ≈ `5rem` — different axes |
139
+ | Author a `spacing` scale | Removed — the build uses Tailwind's numeric spacing (`gap-4`, `py-24`); only `colors`/`typography`/`rounded`/`containers`/`googleFontsHref` |
150
140
  | Ship a thin palette ("downstream will add what it needs") | Completeness is the contract — fill every semantic role |
151
141
  | Substitute or "upgrade" the display/body family (swap the approved Fraunces for Playfair) | Use the exact `display`/`body` families from the Typography input verbatim; you choose only weights/axes |
152
142
  | Introduce a hue not in the approved palette for `paper`/`ink`/`accent`, or "improve" the brand color | `accent` = approved accent hex, `paper` = approved background, `ink` = approved text; other roles are tonal variants of those |
@@ -96,7 +96,7 @@ npm install --no-fund --no-audit --legacy-peer-deps <package-set> \
96
96
  | | **blog** → `@wix/blog @wix/ricos @astrojs/rss @astrojs/sitemap` |
97
97
  | | **forms** → `@wix/forms` |
98
98
  | | **cms** → `@wix/data @wix/essentials` |
99
- | | **bookings** → `@wix/bookings @wix/essentials` |
99
+ | | **bookings** → `@wix/bookings @wix/essentials @wix/forms @wix/redirects @wix/auto_sdk_ecom_cart-v-2` |
100
100
  | | **gift-cards** → (none — disabled-by-default pack ships no Astro-time imports) |
101
101
 
102
102
  Example (resolved set = stores + ecom + gift-cards + cms):