@wix/agent-skills 1.6.0 → 1.8.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 (195) hide show
  1. package/README.md +5 -9
  2. package/package.json +1 -1
  3. package/skills/wix-app/SKILL.md +51 -42
  4. package/skills/wix-app/references/BACKEND_EVENT.md +10 -65
  5. package/skills/wix-app/references/CUSTOM_ELEMENT_WIDGET.md +101 -406
  6. package/skills/wix-app/references/DASHBOARD_MENU_PLUGIN.md +14 -111
  7. package/skills/wix-app/references/DASHBOARD_MODAL.md +56 -205
  8. package/skills/wix-app/references/DASHBOARD_PAGE.md +19 -98
  9. package/skills/wix-app/references/DASHBOARD_PLUGIN.md +6 -108
  10. package/skills/wix-app/references/DATA_COLLECTION.md +113 -198
  11. package/skills/wix-app/references/EMBEDDED_SCRIPT.md +41 -268
  12. package/skills/wix-app/references/EXTENSION_REGISTRATION.md +27 -76
  13. package/skills/wix-app/references/SERVICE_PLUGIN.md +35 -188
  14. package/skills/wix-app/references/SITE_PLUGIN.md +8 -92
  15. package/skills/wix-app/references/STORES_VERSIONING.md +1 -0
  16. package/skills/wix-app/references/backend-event/COMMON-EVENTS.md +0 -44
  17. package/skills/wix-app/references/custom-element-widget/SETTINGS_PANEL.md +19 -330
  18. package/skills/wix-app/references/dashboard-menu-plugin/bookings-slots.md +0 -12
  19. package/skills/wix-app/references/dashboard-menu-plugin/ecommerce-slots.md +7 -0
  20. package/skills/wix-app/references/dashboard-menu-plugin/restaurants-slots.md +0 -12
  21. package/skills/wix-app/references/dashboard-plugin/SLOTS.md +3 -15
  22. package/skills/wix-app/references/service-plugin/ADDITIONAL-FEES.md +2 -18
  23. package/skills/wix-app/references/service-plugin/BOOKINGS-STAFF-SORTING.md +2 -42
  24. package/skills/wix-app/references/service-plugin/DISCOUNT-TRIGGERS.md +1 -11
  25. package/skills/wix-app/references/service-plugin/GIFT-CARDS.md +1 -11
  26. package/skills/wix-app/references/service-plugin/PAYMENT-SETTINGS.md +2 -40
  27. package/skills/wix-app/references/service-plugin/SHIPPING-RATES.md +2 -19
  28. package/skills/wix-app/references/service-plugin/VALIDATIONS.md +2 -18
  29. package/skills/wix-app/references/site-plugin/SLOTS.md +17 -68
  30. package/skills/wix-design-system/SKILL.md +4 -0
  31. package/skills/wix-headless/SKILL.md +131 -386
  32. package/skills/wix-headless/references/BUILD-astro.md +246 -0
  33. package/skills/wix-headless/references/BUILD-own-build.md +167 -0
  34. package/skills/wix-headless/references/BUILD.md +105 -0
  35. package/skills/wix-headless/references/DESIGN_SYSTEM.md +175 -0
  36. package/skills/wix-headless/references/DISCOVERY-connect.md +55 -0
  37. package/skills/wix-headless/references/DISCOVERY-create.md +238 -0
  38. package/skills/wix-headless/references/DISCOVERY.md +50 -306
  39. package/skills/wix-headless/references/PLAN-connect.md +19 -0
  40. package/skills/wix-headless/references/PLAN-create.md +17 -0
  41. package/skills/wix-headless/references/PLAN.md +92 -0
  42. package/skills/wix-headless/references/SEED.md +214 -0
  43. package/skills/wix-headless/references/SETUP.md +73 -248
  44. package/skills/wix-headless/references/{blog → astro/blog}/BLOG_PAGES.md +6 -5
  45. package/skills/wix-headless/references/{blog → astro/blog}/BLOG_SETUP.md +2 -2
  46. package/skills/wix-headless/references/astro/bookings/COMPONENTS.md +337 -0
  47. package/skills/wix-headless/references/astro/bookings/SERVICES_PAGES.md +428 -0
  48. package/skills/wix-headless/references/astro/cms/CMS_FOUNDATIONS.md +214 -0
  49. package/skills/wix-headless/references/{cms → astro/cms}/FAQ_KNOWLEDGE_BASE.md +14 -12
  50. package/skills/wix-headless/references/{cms → astro/cms}/PORTFOLIO.md +15 -16
  51. package/skills/wix-headless/references/{cms → astro/cms}/RESOURCE_LIBRARY.md +13 -15
  52. package/skills/wix-headless/references/{cms → astro/cms}/TEAM_DIRECTORY.md +11 -11
  53. package/skills/wix-headless/references/astro/designer/INSTRUCTIONS.md +354 -0
  54. package/skills/wix-headless/references/{ecom → astro/ecom}/CART_PAGES.md +8 -9
  55. package/skills/wix-headless/references/{ecom → astro/ecom}/CART_WIRING.md +6 -6
  56. package/skills/wix-headless/references/{ecom → astro/ecom}/COMPONENTS_CSS.md +6 -6
  57. package/skills/wix-headless/references/{forms → astro/forms}/CONTACT_FORM.md +18 -32
  58. package/skills/wix-headless/references/{gift-cards → astro/gift-cards}/COMPONENTS.md +3 -3
  59. package/skills/wix-headless/references/{gift-cards → astro/gift-cards}/PAGES.md +2 -2
  60. package/skills/wix-headless/references/{stores → astro/stores}/BACK_IN_STOCK.md +7 -7
  61. package/skills/wix-headless/references/{stores → astro/stores}/CATEGORY_PAGES.md +12 -13
  62. package/skills/wix-headless/references/{stores → astro/stores}/COMPONENTS_CSS.md +7 -7
  63. package/skills/wix-headless/references/{stores → astro/stores}/HOME_AND_NAV.md +11 -9
  64. package/skills/wix-headless/references/{stores → astro/stores}/PRODUCT_PAGES.md +11 -9
  65. package/skills/wix-headless/references/{stores → astro/stores}/SHARED_WIRING.md +8 -7
  66. package/skills/wix-headless/references/astro/templates/Footer.astro +27 -0
  67. package/skills/wix-headless/references/astro/templates/Layout.astro +132 -0
  68. package/skills/wix-headless/references/astro/templates/Navigation.astro +38 -0
  69. package/skills/wix-headless/references/astro/templates/astro.config.mjs +41 -0
  70. package/skills/wix-headless/references/astro/templates/bookings/AvailabilityCalendar.tsx +218 -0
  71. package/skills/wix-headless/references/astro/templates/bookings/BookingForm.tsx +194 -0
  72. package/skills/wix-headless/references/astro/templates/bookings/ManageBooking.tsx +84 -0
  73. package/skills/wix-headless/references/astro/templates/bookings/SeoTags.astro +25 -0
  74. package/skills/wix-headless/references/astro/templates/bookings/ServiceBookingFlow.tsx +50 -0
  75. package/skills/wix-headless/references/astro/templates/bookings/ServiceCard.astro +45 -0
  76. package/skills/wix-headless/references/astro/templates/bookings/api/confirm-booking.ts +34 -0
  77. package/skills/wix-headless/references/astro/templates/bookings/api/waitlist.ts +74 -0
  78. package/skills/wix-headless/references/astro/templates/bookings/booking-confirmation.astro +111 -0
  79. package/skills/wix-headless/references/astro/templates/bookings/components-bookings.css +413 -0
  80. package/skills/wix-headless/references/astro/templates/bookings/manage-booking.astro +76 -0
  81. package/skills/wix-headless/references/astro/templates/bookings/services/[slug].astro +81 -0
  82. package/skills/wix-headless/references/astro/templates/bookings/services/index.astro +65 -0
  83. package/skills/wix-headless/references/astro/templates/ecom/components-ecom.css +302 -0
  84. package/skills/wix-headless/references/astro/templates/global.css +286 -0
  85. package/skills/wix-headless/references/astro/templates/index.astro +56 -0
  86. package/skills/wix-headless/{templates → references/astro/templates}/stores/back-in-stock.ts +1 -1
  87. package/skills/wix-headless/{templates → references/astro/templates}/stores/components-stores.css +138 -33
  88. package/skills/wix-headless/references/blog/BLOG_CONTENT.md +28 -19
  89. package/skills/wix-headless/references/blog/INSTRUCTIONS.md +6 -6
  90. package/skills/wix-headless/references/bookings/INSTRUCTIONS.md +106 -0
  91. package/skills/wix-headless/references/bookings/SERVICES_DATA.md +295 -0
  92. package/skills/wix-headless/references/cms/CMS_FOUNDATIONS.md +35 -232
  93. package/skills/wix-headless/references/cms/INSTRUCTIONS.md +39 -8
  94. package/skills/wix-headless/references/commands/known-apps.json +2 -1
  95. package/skills/wix-headless/references/custom/CONNECTION_PLAN.md +142 -0
  96. package/skills/wix-headless/references/custom/INSTRUCTIONS.md +88 -0
  97. package/skills/wix-headless/references/custom/blog/WIRING.md +52 -0
  98. package/skills/wix-headless/references/custom/bookings/WIRING.md +88 -0
  99. package/skills/wix-headless/references/custom/cms/WIRING.md +97 -0
  100. package/skills/wix-headless/references/custom/ecom/WIRING.md +67 -0
  101. package/skills/wix-headless/references/custom/forms/WIRING.md +101 -0
  102. package/skills/wix-headless/references/custom/stores/WIRING.md +80 -0
  103. package/skills/wix-headless/references/ecom/INSTRUCTIONS.md +12 -12
  104. package/skills/wix-headless/references/forms/INSTRUCTIONS.md +6 -6
  105. package/skills/wix-headless/references/gift-cards/INSTRUCTIONS.md +13 -13
  106. package/skills/wix-headless/references/images/INSTRUCTIONS.md +58 -60
  107. package/skills/wix-headless/references/seed-recipes.md +49 -0
  108. package/skills/wix-headless/references/shared/AGENTS_MD.md +47 -0
  109. package/skills/wix-headless/references/shared/AUTHENTICATION.md +108 -0
  110. package/skills/wix-headless/references/shared/BUILD_NOISE.md +2 -2
  111. package/skills/wix-headless/references/shared/DESIGN_MD.md +85 -0
  112. package/skills/wix-headless/references/shared/DOCS_SEARCH.md +41 -0
  113. package/skills/wix-headless/references/shared/IMAGE_GENERATION.md +40 -39
  114. package/skills/wix-headless/references/shared/IMPLEMENTER.md +92 -41
  115. package/skills/wix-headless/references/shared/PRODUCTION_SHARP_EDGES.md +3 -3
  116. package/skills/wix-headless/references/shared/RETURN_CONTRACT.md +32 -312
  117. package/skills/wix-headless/references/shared/STYLING.md +48 -21
  118. package/skills/wix-headless/references/stores/INSTRUCTIONS.md +59 -29
  119. package/skills/wix-headless/references/stores/PRODUCT_CATALOG_DATA.md +31 -28
  120. package/skills/wix-headless/references/verticals/_schema.json +31 -117
  121. package/skills/wix-headless/references/verticals/_schema.md +60 -150
  122. package/skills/wix-headless/references/verticals/blog.md +5 -99
  123. package/skills/wix-headless/references/verticals/bookings.md +41 -0
  124. package/skills/wix-headless/references/verticals/cms.md +9 -100
  125. package/skills/wix-headless/references/verticals/ecom.md +6 -77
  126. package/skills/wix-headless/references/verticals/forms.md +5 -85
  127. package/skills/wix-headless/references/verticals/gift-cards.md +6 -103
  128. package/skills/wix-headless/references/verticals/stores.md +10 -144
  129. package/skills/wix-headless/scripts/check-manifest.mjs +148 -11
  130. package/skills/wix-headless/scripts/compose.mjs +540 -0
  131. package/skills/wix-headless/scripts/emit-design-tokens.mjs +136 -53
  132. package/skills/wix-headless/scripts/flatten.sh +61 -0
  133. package/skills/wix-headless/scripts/generate-images.mjs +242 -0
  134. package/skills/wix-headless/scripts/patch-decorative-slots.mjs +67 -43
  135. package/skills/wix-headless/scripts/plan-entity-image-waves.mjs +3 -3
  136. package/skills/wix-headless/scripts/scaffold.sh +113 -27
  137. package/skills/wix-headless/scripts/seed-utilities.sh +50 -12
  138. package/skills/wix-headless/scripts/write-decorative-json.mjs +62 -0
  139. package/skills/wix-manage/SKILL.md +4 -8
  140. package/skills/wix-manage/references/blog/how-to-create-blog-posts.md +2 -0
  141. package/skills/wix-manage/references/cms/cms-data-items-crud.md +4 -0
  142. package/skills/wix-manage/references/cms/cms-references-and-relationships.md +2 -0
  143. package/skills/wix-manage/references/cms/cms-schema-management.md +4 -0
  144. package/skills/wix-manage/references/domains/domain-search-and-purchase.md +10 -7
  145. package/skills/wix-manage/references/ecommerce/api-shipping.md +443 -0
  146. package/skills/wix-manage/references/ecommerce/flow-add-free-shipping.md +5 -6
  147. package/skills/wix-manage/references/ecommerce/flow-fix-coverage-gaps.md +4 -5
  148. package/skills/wix-manage/references/ecommerce/flow-optimize-shipping-rates.md +4 -5
  149. package/skills/wix-manage/references/ecommerce/goal-increase-aov.md +1 -1
  150. package/skills/wix-manage/references/ecommerce/goal-reduce-cart-abandonment.md +1 -2
  151. package/skills/wix-manage/references/ecommerce/guardrail-shipping-health.md +2 -2
  152. package/skills/wix-manage/references/ecommerce/recipe-apply-shipping-recommendations.md +4 -5
  153. package/skills/wix-manage/references/ecommerce/recommend-ecommerce-strategy.md +7 -7
  154. package/skills/wix-manage/references/ecommerce/setup-discount-rules.md +209 -72
  155. package/skills/wix-manage/references/ecommerce/setup-store-pickup-location.md +9 -10
  156. package/skills/wix-manage/references/ecommerce/skill-graph.md +4 -4
  157. package/skills/wix-manage/references/forms/create-form.md +50 -0
  158. package/skills/wix-manage/references/stores/bulk-create-products-with-options.md +2 -0
  159. package/skills/wix-manage/references/stores/create-product-from-image.md +91 -38
  160. package/skills/wix-manage/references/stores/setup-online-store-catalog-v3.md +2 -0
  161. package/skills/wix-app/references/custom-element-widget/default-thumbnail.png +0 -0
  162. package/skills/wix-app/references/data-collection/extension-template.ts +0 -107
  163. package/skills/wix-headless/references/ORCHESTRATION.md +0 -269
  164. package/skills/wix-headless/references/commands/install-app.md +0 -42
  165. package/skills/wix-headless/references/commands/mcp-bootstrap.md +0 -28
  166. package/skills/wix-headless/references/designer/INSTRUCTIONS.md +0 -828
  167. package/skills/wix-headless/references/shared/MCP_PREFIX.md +0 -105
  168. package/skills/wix-headless/scripts/copy-utility-templates.mjs +0 -153
  169. package/skills/wix-headless/scripts/finalize-run-json.mjs +0 -141
  170. package/skills/wix-headless/scripts/init-site-json.mjs +0 -63
  171. package/skills/wix-headless/scripts/preview.sh +0 -45
  172. package/skills/wix-headless/scripts/release.sh +0 -73
  173. package/skills/wix-headless/templates/ecom/components-ecom.css +0 -215
  174. package/skills/wix-manage/references/events/list-events.md +0 -203
  175. /package/skills/wix-headless/{templates → references/astro/templates}/ecom/CartBadge.tsx +0 -0
  176. /package/skills/wix-headless/{templates → references/astro/templates}/ecom/CartView.tsx +0 -0
  177. /package/skills/wix-headless/{templates → references/astro/templates}/ecom/cart.astro +0 -0
  178. /package/skills/wix-headless/{templates → references/astro/templates}/ecom/discounts.ts +0 -0
  179. /package/skills/wix-headless/{templates → references/astro/templates}/ecom/thank-you.astro +0 -0
  180. /package/skills/wix-headless/{templates → references/astro/templates}/gift-cards/GiftCardPurchase.tsx +0 -0
  181. /package/skills/wix-headless/{templates → references/astro/templates}/gift-cards/_home-teaser-snippet.astro +0 -0
  182. /package/skills/wix-headless/{templates → references/astro/templates}/gift-cards/_nav-snippet.astro +0 -0
  183. /package/skills/wix-headless/{templates → references/astro/templates}/gift-cards/components-gift-cards.css +0 -0
  184. /package/skills/wix-headless/{templates → references/astro/templates}/gift-cards/gift-cards.astro +0 -0
  185. /package/skills/wix-headless/{templates → references/astro/templates}/gift-cards/gift-cards.ts +0 -0
  186. /package/skills/wix-headless/{templates → references/astro/templates}/stores/AddToCartButton.tsx +0 -0
  187. /package/skills/wix-headless/{templates → references/astro/templates}/stores/BackInStockForm.tsx +0 -0
  188. /package/skills/wix-headless/{templates → references/astro/templates}/stores/CategoryRail.astro +0 -0
  189. /package/skills/wix-headless/{templates → references/astro/templates}/stores/ProductCard.astro +0 -0
  190. /package/skills/wix-headless/{templates → references/astro/templates}/stores/ProductPurchase.tsx +0 -0
  191. /package/skills/wix-headless/{templates → references/astro/templates}/stores/SeoTags.astro +0 -0
  192. /package/skills/wix-headless/{templates → references/astro/templates}/stores/categories.ts +0 -0
  193. /package/skills/wix-headless/{templates → references/astro/templates}/stores/category/[slug].astro +0 -0
  194. /package/skills/wix-headless/{templates → references/astro/templates}/stores/products/[slug].astro +0 -0
  195. /package/skills/wix-headless/{templates → references/astro/templates}/stores/products/index.astro +0 -0
@@ -120,14 +120,34 @@ A concise, appealing product name optimized for e-commerce discoverability. Maxi
120
120
 
121
121
  Example: `"Artisan Stoneware Ceramic Mug"` — not generic names like `"Mug"` or `"Product"`.
122
122
 
123
- ### 4b. Product Description
124
- A marketing description of 2-4 sentences. Highlight key features, materials, and use case. Adapt tone to the product type (artisanal for handmade, technical for electronics, warm for home goods). This will be formatted as rich text nodes in V3 STEP 6.
123
+ ### 4b. Sample Existing Product Tone (silent — no user interaction)
125
124
 
126
- ### 4c. Price with Market Range
125
+ Before writing the description, check whether the site already has products to match their tone:
126
+
127
+ **API Endpoint:** `POST https://www.wixapis.com/stores/v3/products/query`
128
+
129
+ ```json
130
+ {
131
+ "query": {
132
+ "paging": {
133
+ "limit": 2
134
+ }
135
+ }
136
+ }
137
+ ```
138
+
139
+ - If the response contains products with non-empty `description` fields, analyze their writing style (casual, professional, playful, luxury, technical, etc.) and note it as the **site tone**.
140
+ - If no products exist or descriptions are empty, use a neutral e-commerce tone.
141
+ - This query is best-effort — if it fails, proceed with neutral tone. Do NOT block the flow.
142
+
143
+ ### 4c. Product Description
144
+ A marketing description of 2-4 sentences. Highlight key features, materials, and use case. **Match the site tone detected in 4b** — if the existing products use casual language, write casually; if they use formal/luxury language, match that style. If no site tone was detected, adapt tone to the product type (artisanal for handmade, technical for electronics, warm for home goods). This will be formatted as rich text nodes in V3 STEP 7.
145
+
146
+ ### 4d. Price with Market Range
127
147
  - Suggest a retail price based on the product type and industry averages.
128
148
  - Also determine an approximate **market range** for annotation (e.g., "avg. market: $28-$42"). This range is shown to the user in V3 STEP 5 but is NOT sent to the API.
129
149
 
130
- ### 4d. Info Sections (only if relevant)
150
+ ### 4e. Info Sections (only if relevant)
131
151
  Based on the product type and what's visible in the image, generate category-specific info sections. **Only include sections that are relevant — omit entirely if not applicable.**
132
152
 
133
153
  | Product Category | Possible Info Sections |
@@ -142,26 +162,26 @@ Based on the product type and what's visible in the image, generate category-spe
142
162
 
143
163
  Each info section needs: a `uniqueName` (lowercase-hyphenated, e.g., `"care-instructions"`), a `title` (display name, e.g., `"Care Instructions"`), and a description (2-3 sentences).
144
164
 
145
- ### 4e. SEO Meta Description
165
+ ### 4f. SEO Meta Description
146
166
  A short meta description (120-160 characters) optimized for search. Include the product type, key materials, and primary use case.
147
167
 
148
168
  Example: `"Handcrafted stoneware ceramic mug with a matte glaze finish. Perfect for coffee and tea lovers. Microwave and dishwasher safe."`
149
169
 
150
- ### 4f. Suggested Options (from images)
170
+ ### 4g. Suggested Options (from images)
151
171
  Examine the images for visible product attributes that should become variant options.
152
172
 
153
- **CRITICAL: Do NOT invent attributes.** Only suggest options that are:
154
- - Visually confirmed in the image(s), OR
155
- - Explicitly stated by the user in their text note
173
+ **CRITICAL: Do NOT invent or infer attributes.** Only suggest options that meet **one** of these evidence thresholds:
174
+ - **Visually confirmed** in the image(s) — you can see distinct values (e.g., two different colors across two images, a size label printed on packaging)
175
+ - **Explicitly stated** by the user in their text note (e.g., "available in blue and green", "comes in S, M, L")
176
+
177
+ **Do NOT suggest standard industry options based on product category.** For example, do NOT suggest Size: S, M, L, XL, XXL for apparel just because it is a clothing item. If no size information is visible in the image and the user did not mention sizes, report no size options detected.
178
+
179
+ **Negative example:** Image shows a single t-shirt with no size labels visible and the user did not mention sizes → do NOT suggest a Size option. Report: "No variant options detected from the image."
156
180
 
157
181
  **Multi-image variant detection:**
158
- - If multiple images show the **same product in different colors** (e.g., one red shirt, one blue shirt), suggest a Color option with those colors as choices.
182
+ - If multiple images show the **same product in different colors** (e.g., one red shirt, one blue shirt), suggest a Color option with **only those visible colors** as choices.
159
183
  - If multiple images show the **same product from different angles**, treat them as additional product media — NOT as separate variants.
160
- - If only one image is provided and a color is visible, suggest that single color as a choice and ask the user if the product comes in other colors.
161
-
162
- Common options to detect:
163
- - **Color** — visible color(s) across images
164
- - **Size** — if apparel, footwear, or size-varying product
184
+ - If only one image is provided and a distinctive color is visible, suggest that single color as a choice and ask the user if the product comes in other colors.
165
185
 
166
186
  ---
167
187
 
@@ -169,26 +189,39 @@ Common options to detect:
169
189
 
170
190
  **You MUST present ALL generated fields to the user and ask for confirmation before proceeding.**
171
191
 
172
- Present a structured review card:
192
+ Present a structured review card using the markdown format below. This provides a visual product-card-style layout:
173
193
 
174
- > **Here's what I've generated from your image(s):**
175
- >
176
- > **Name:** [generated name]
177
- >
178
- > **Description:** [generated description text]
179
- >
180
- > **Price:** $[price] *(avg. market: $[low]-$[high])*
181
- >
182
- > **Info Sections:**
183
- > - **[Title 1]:** [summary]
184
- > - **[Title 2]:** [summary]
185
- >
186
- > **SEO Description:** [meta description]
187
- >
188
- > Would you like to:
189
- > - **Refine** — tell me what to change (e.g., "make the description shorter", "the price should be lower")
190
- > - **Regenerate** — I'll start the analysis over, optionally with additional context from you
191
- > - **Approve** — proceed to options and product creation
194
+ ```
195
+ ---
196
+
197
+ ### [Product Name]
198
+
199
+ **$[price]** · _avg. market: $[low]-$[high]_
200
+
201
+ > [Generated description text — the full 2-4 sentence description]
202
+
203
+ ---
204
+
205
+ | Detail | Value |
206
+ |--------|-------|
207
+ | Images | [count] uploaded |
208
+ | SEO | [first 60 chars of meta description]… |
209
+ | Tone | [Matched from existing site products / Neutral e-commerce] |
210
+
211
+ **Info Sections**
212
+ - **[Title 1]:** [one-line summary]
213
+ - **[Title 2]:** [one-line summary]
214
+
215
+ **Detected Options:** [option summary, e.g. "Color: Slate Blue, Terracotta" or "None detected"]
216
+
217
+ ---
218
+ ```
219
+
220
+ After the card, present the action options:
221
+
222
+ > 1. **Refine** — tell me what to change (e.g., "make the description shorter", "the price should be lower")
223
+ > 2. **Regenerate** — I'll start the analysis over, optionally with additional context from you
224
+ > 3. **Approve** — proceed to options and product creation
192
225
 
193
226
  If the user provided a text note that **contradicts** what's visible in the image (e.g., image shows blue but note says "available in red"), ask the user to clarify before proceeding.
194
227
 
@@ -198,7 +231,7 @@ If the user provided a text note that **contradicts** what's visible in the imag
198
231
 
199
232
  ## V3 STEP 5: Suggest Options and Ask User (INTERACTIVE)
200
233
 
201
- **Present the detected options from V3 STEP 3f and ask the user if they want to add product options.**
234
+ **Present the detected options from V3 STEP 4g and ask the user if they want to add product options.**
202
235
 
203
236
  If options were detected:
204
237
 
@@ -214,7 +247,7 @@ If options were detected:
214
247
 
215
248
  If no options were detected:
216
249
 
217
- > I didn't detect any variant attributes from the image(s). Would you like to add product options (such as Size or Color), or should I create a simple product without variants?
250
+ > I didn't detect any variant attributes from the image(s). Would you like to add product options, or should I create a simple product without variants?
218
251
 
219
252
  **Wait for user response.** Collect the final list of options and choices based on their answer.
220
253
 
@@ -583,7 +616,27 @@ Use this if the user confirmed or provided options in V3 STEP 6. You MUST define
583
616
  }
584
617
  ```
585
618
 
586
- **On success:** Report to the user the product name, price, options (if any), info sections added, and confirm the product was created with images attached.
619
+ **On success:** Present a completion card summarizing what was created:
620
+
621
+ ```
622
+ ---
623
+
624
+ ### Product Created
625
+
626
+ **[Product Name]** · **$[price]**
627
+
628
+ | | |
629
+ |---|---|
630
+ | Options | [option summary or "None"] |
631
+ | Info Sections | [list of section titles] |
632
+ | Images | [count] attached |
633
+
634
+ **View in dashboard:** `https://manage.wix.com/dashboard/[siteId]/store/products/[productId]`
635
+
636
+ ---
637
+ ```
638
+
639
+ Replace `[siteId]` with the site ID from the MCP context and `[productId]` with the `product.id` from the API response. This link lets the user immediately view and edit the product in the Wix dashboard.
587
640
 
588
641
  **On failure:** Show an error message and offer to retry. Do NOT leave a partially created product.
589
642
 
@@ -821,4 +874,4 @@ You called the wrong endpoint for the site's catalog version. Re-run STEP 1 to d
821
874
  - [Create Product (Catalog V1)](https://dev.wix.com/docs/api-reference/business-solutions/stores/skills/create-product-catalog-v1)
822
875
  - [Add Product Media (Catalog V1)](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v1/catalog/add-product-media)
823
876
  - [Upload Media to Wix](https://dev.wix.com/docs/api-reference/assets/media/skills/upload-media-to-wix)
824
- - [Install Wix Apps](https://dev.wix.com/docs/api-reference/business-management/app-installation/skills/install-wix-apps)
877
+ - [Install Wix Apps](https://dev.wix.com/docs/api-reference/business-management/app-installation/skills/install-wix-apps)
@@ -4,6 +4,8 @@ description: Initializes a Stores catalog with Catalog V3 Products API, bulk pro
4
4
  ---
5
5
  **RECIPE**: Business Recipe – Initial Setup for a Wix Online Store (Catalog V3)
6
6
 
7
+ > **Standard call shape (every curl below).** The `<AUTH>` placeholder is shorthand for `Authorization: Bearer <TOKEN>` only. Body-bearing requests also need `Content-Type: application/json`.
8
+
7
9
  A concise checklist for preparing any new Wix site that uses the Online Stores app with Catalog V3.
8
10
  **Notice** that this recipe is **NOT** meant for coding purposes and is **ONLY** meant for initial catalog setup.
9
11
 
@@ -1,107 +0,0 @@
1
- /**
2
- * Template for src/extensions/data/extensions.ts
3
- *
4
- * This file defines all CMS collections for your Wix CLI app.
5
- * All collections are defined in a single file using extensions.genericExtension().
6
- *
7
- * Replace the example collection with your actual collections.
8
- */
9
-
10
- import { extensions } from '@wix/astro/builders';
11
-
12
- export const dataExtension = extensions.genericExtension({
13
- // IMPORTANT: Replace with a freshly generated UUID v4 string
14
- // Format: xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx
15
- // Do NOT use randomUUID() - the UUID must be a static string
16
- compId: '{{GENERATE_UUID}}',
17
-
18
- // Always 'data-extension' for CMS collections
19
- compName: 'data-extension',
20
-
21
- // Always 'DATA_COMPONENT' for CMS collections
22
- compType: 'DATA_COMPONENT',
23
-
24
- compData: {
25
- dataComponent: {
26
- // Array of all collections
27
- collections: [
28
- {
29
- // Legacy field - will be removed in future
30
- schemaUrl: 'https://www.wix.com/',
31
-
32
- // Collection identifier (lower-kebab-case or lower_underscore)
33
- // This will be scoped with app namespace automatically
34
- idSuffix: 'example-collection',
35
-
36
- // Human-readable name shown in CMS
37
- displayName: 'Example Collection',
38
-
39
- // Field used for display (optional)
40
- displayField: 'title',
41
-
42
- // Array of field definitions
43
- fields: [
44
- {
45
- // Field identifier (lowerCamelCase, ASCII only)
46
- key: 'title',
47
-
48
- // Human-readable label
49
- displayName: 'Title',
50
-
51
- // Field type - see SKILL.md Field Types section for all types
52
- type: 'TEXT',
53
-
54
- // Optional: Help text
55
- description: 'The title of the item'
56
- },
57
- {
58
- key: 'amount',
59
- displayName: 'Amount',
60
- type: 'NUMBER'
61
- },
62
- {
63
- key: 'isActive',
64
- displayName: 'Is Active',
65
- type: 'BOOLEAN'
66
- }
67
- // Add more fields as needed
68
- ],
69
-
70
- // Permission configuration
71
- // See SKILL.md Permissions section for all access levels
72
- dataPermissions: {
73
- // Who can read items
74
- itemRead: 'ANYONE',
75
-
76
- // Who can create items
77
- itemInsert: 'PRIVILEGED',
78
-
79
- // Who can update items
80
- itemUpdate: 'PRIVILEGED',
81
-
82
- // Who can delete items
83
- itemRemove: 'PRIVILEGED'
84
- },
85
-
86
- // Optional: Initial seed data
87
- // Only include if blueprint mentions example data
88
- initialData: [
89
- {
90
- // Must match field keys exactly (lowerCamelCase)
91
- title: 'Example Item 1',
92
- amount: 10,
93
- isActive: true
94
- },
95
- {
96
- title: 'Example Item 2',
97
- amount: 20,
98
- isActive: false
99
- }
100
- // Add more initial items as needed
101
- ]
102
- }
103
- // Add more collections as needed
104
- ]
105
- }
106
- }
107
- });
@@ -1,269 +0,0 @@
1
- # Orchestration — Concurrency Model
2
-
3
- This file describes **what runs in parallel and what blocks**. It does not prescribe a specific tool API — map each step to whatever subagent / parallel-execution primitive your runtime offers.
4
-
5
- ## Concurrency vocabulary
6
-
7
- The terms below appear throughout this skill. They describe the *shape* of work; the runtime decides how to implement them:
8
-
9
- - **Subagent** — an isolated worker with its own context. The orchestrator sends it a prompt (an `Instruction file` path + inputs); the subagent reads the instruction file, performs the scope, and returns a structured result.
10
- - **Concurrent batch** — N subagents (or N tool calls) launched together so they execute in parallel rather than serially. Whether this is concurrent sibling calls, async tasks, threads, or a parallel-fan-out primitive doesn't matter — only that they overlap in execution.
11
- - **Background subagent** — a subagent the orchestrator does not block on; it runs while the orchestrator continues with downstream work and reports its result asynchronously.
12
- - **Foreground subagent** — a subagent the orchestrator blocks on before continuing.
13
- - **Wait (gate)** — the orchestrator pauses until specified background subagents finish.
14
- - **Result** — the structured JSON block each subagent returns at the end of its run, per `references/shared/RETURN_CONTRACT.md`.
15
-
16
- ## Phase axis
17
-
18
- | Phase | What | Dispatched at |
19
- |---|---|---|
20
- | **Phase 1 — Seed** | Per-vertical MCP data → `.wix/site.json.seeded.<vertical>` | Step 3 (concurrent with Phase 2 + Image Phase 1) |
21
- | **Phase 2 — Design System** | Designer writes tokens + Layout + Nav + Footer | Step 3 (foreground) |
22
- | **Phase 3 — Components** | Per-vertical React islands, with styling contract inlined into each prompt | Step 4.5 (after Phase 2 completes) |
23
- | **Phase 4 — Pages** | Per-vertical routes; each page agent writes its routes once with both visual design and live data queries | Step 7 (concurrent with Image Phase 2) |
24
- | **Image Phase 1 — Decorative** | Hero/about/page-header decoratives | Step 3 (concurrent with Phases 1 + 2) |
25
- | **Image Phase 2 — Entity** | Product / blog post / CMS item images | Step 4.5 (concurrent with Phase 3 Components) — depends only on Phase 1 Seed entity IDs + brand context |
26
-
27
- ## Why batching matters
28
-
29
- Historical runs lost 1–2 minutes per phase to serialized dispatch — N subagents emitted one-per-turn instead of in a single concurrent batch. Even when each subagent ran fast, the inter-dispatch gaps (12–39s in measured runs) accumulated to >25% overhead per phase.
30
-
31
- Two mitigations exist; use both:
32
-
33
- 1. **State the batch as a single concurrent step.** The skill's dispatch sections below say "launch N subagents concurrently" — that is one orchestration step, not N. Implement it as a single batch.
34
- 2. **Use background-on-dispatch for subagents that don't block downstream work.** Even if the runtime serializes the launch turns, background dispatch lets subagents overlap in execution. Measured compression on a sequential-launch / background-execute model: ~2× wall-time vs. serial.
35
-
36
- If your runtime forces serialization across the orchestrator's turns, make every subagent that can run in the background a background subagent. Only the Phase 2 Design System is foreground (because Step 4.5 needs `.wix/design-tokens.css` on disk before continuing).
37
-
38
- ---
39
-
40
- ## Step 3 Dispatch — Phase 1 (Seed) + Phase 2 (Design System) + Image Phase 1 (Decorative)
41
-
42
- Runs immediately after Step 2 (Setup) completes.
43
-
44
- ### Concurrent batch
45
-
46
- For each loaded vertical pack (stores, cms, blog, …):
47
- - Phase 1 Seeder — **background**
48
-
49
- Always:
50
- - Image Phase 1 Decorative subagent — **background**. Generates decoratives from brand context only; no Phase 1 Seed dependency. Internally it issues ONE batched generation call for all slots — no per-image sequential calls.
51
- - Phase 2 Design System subagent — **foreground** (orchestrator waits for this before Step 4 / Step 4.5 / Step 7). Writes `global.css`, `Layout.astro`, `Navigation.astro`, `Footer.astro`, `astro.config.mjs`, `index.astro` shell, and returns `designTokens` JSON. The orchestrator emits `.wix/design-tokens.css` + `.wix/site.d.ts` deterministically from the merged JSON via `<SKILL_ROOT>/scripts/emit-design-tokens.mjs` in Step 4 (the agent does not write either file).
52
-
53
- **Phase 3 Components is not dispatched here.** It runs in Step 4.5 with the design tokens inlined into each prompt — see § "Styling contract coordination" below.
54
-
55
- **Image Phase 2 (entity images) is not dispatched here.** It runs in Step 4.5 (alongside Phase 3 Components, gated on Phase 1 Seed having returned) with Phase 1 Seed entity IDs inlined — see § "Wait: Phase 2 → Step 4.5" below.
56
-
57
- ### Example (ecommerce run — stores + cms packs loaded)
58
-
59
- Four subagents launched concurrently, each pointed at a vertical instruction file:
60
-
61
- 1. Phase 1 stores seeder (bg) — instruction file: `<SKILL_ROOT>/references/stores/INSTRUCTIONS.md`, scope: `seed-seed`
62
- 2. Phase 1 CMS seeder (bg) — instruction file: `<SKILL_ROOT>/references/cms/INSTRUCTIONS.md`, scope: `seed-seed`
63
- 3. Image Phase 1 Decorative (bg) — instruction file: `<SKILL_ROOT>/references/images/INSTRUCTIONS.md`, scope: `image-phase-1-decorative`
64
- 4. Phase 2 Design System (fg) — instruction file: `<SKILL_ROOT>/references/designer/INSTRUCTIONS.md`, scope: `design-system`
65
-
66
- ### Subagent prompt template
67
-
68
- Every dispatch sends a self-contained prompt with these fields:
69
-
70
- ```
71
- Instruction file (absolute path): <SKILL_ROOT>/references/<vertical>/INSTRUCTIONS.md
72
- Read this file in full before doing anything else. It defines your role,
73
- scope routing, and return contract.
74
- Phase instruction: <exact phase/scope string from the pack>
75
- Scope: <scope string>
76
- Project directory (absolute path): <project path>
77
- siteId: <from wix.config.json>
78
- MCP tool prefix: <prefix>
79
- Use this prefix for every Wix MCP call. Example: <prefix>CallWixSiteAPI, <prefix>WixREADME.
80
- Brand context: name, vibe, aesthetic direction, colors, fonts, mood, page color strategy
81
- Design tokens: .wix/design-tokens.css (generated from site.json.designTokens)
82
- ```
83
-
84
- **`Instruction file` must point to one of these vertical instruction files:**
85
- - `<SKILL_ROOT>/references/stores/INSTRUCTIONS.md` — Phase 1 Seed + Phase 3 Components + Phase 4 Pages
86
- - `<SKILL_ROOT>/references/ecom/INSTRUCTIONS.md` — Phase 1 Seed + Phase 3 Components (cart/checkout — passive, required by stores)
87
- - `<SKILL_ROOT>/references/cms/INSTRUCTIONS.md` — Phase 1 Seed + Phase 4 CMS Pages
88
- - `<SKILL_ROOT>/references/blog/INSTRUCTIONS.md` — Phase 1 Seed + Phase 3 Components + Phase 4 Pages
89
- - `<SKILL_ROOT>/references/forms/INSTRUCTIONS.md` — Phase 1 Seed + Phase 3 Components + Phase 4 Pages
90
- - `<SKILL_ROOT>/references/gift-cards/INSTRUCTIONS.md` — Phase 1 Seed + Phase 3 Components + Phase 4 Pages (passive/dashboard-gated)
91
- - `<SKILL_ROOT>/references/images/INSTRUCTIONS.md` — `image-phase-1-decorative` + `image-phase-2-entity`
92
- - `<SKILL_ROOT>/references/designer/INSTRUCTIONS.md` — Phase 2 Design System + all Phase 4 Page designers
93
-
94
- For **image subagents**, the prompt additionally includes: page list (for decorative brief), entity types to cover (products, about-content, etc.).
95
-
96
- Phase 3 Components subagents (Step 4.5) additionally receive the full styling-contract JSON inlined in their prompt — they do not read `.wix/design-tokens.css` + `.wix/site.d.ts` from disk. See § "Styling contract coordination" below.
97
-
98
- ### Subagent return
99
-
100
- Every subagent returns a structured JSON block at the end of its run, per `references/shared/RETURN_CONTRACT.md`. The orchestrator parses each return as it arrives.
101
-
102
- ---
103
-
104
- ## Wait: Phase 2 → Step 4.5 (Phase 3 Components + Image Phase 2) → Step 7 (Phase 4 Pages)
105
-
106
- Phase 2 completes (~2–3 min) in the foreground — the orchestrator resumes automatically. Verify `.wix/design-tokens.css` + `.wix/site.d.ts` exist on disk before launching Step 4.5.
107
-
108
- ### Step 4.5 — Phase 3 Components + Image Phase 2 Entity (one concurrent batch, all background)
109
-
110
- Read `.wix/design-tokens.css` + `.wix/site.d.ts` once, then dispatch in a single concurrent batch:
111
-
112
- 1. **One Phase 3 Components subagent per loaded pack** that declares `components`. Each prompt carries:
113
- - All standard fields (see "Subagent prompt template" above)
114
- - The **full styling-contract JSON inlined** — not a file path
115
-
116
- 2. **One Image Phase 2 Entity subagent** (when any pack produced entities — stores products, CMS items, blog posts), provided the relevant Phase 1 Seeder has returned. Prompt carries Phase 1 Seed return data inline + brand context. The image agent reads `<SKILL_ROOT>/references/images/INSTRUCTIONS.md` § "Scope: image-phase-2-entity".
117
-
118
- Both groups are **background**. They start immediately and continue running through Step 7 dispatch — no polling.
119
-
120
- **Why Image Phase 2 lives here, not in Step 7.** Image Phase 2 only depends on Phase 1 Seed entity IDs/names/descriptions + brand context. It does not read or write anything Phase 3 Components or Phase 4 Pages produce — its PATCH/PUT targets are Wix-side entities (`stores/v3/products`, `wix-data/v2/items`, `blog/v3/posts`). Launching it here lets it overlap entirely with Phase 3 (and often Phase 4 too) instead of becoming a post-Phase-4 tail blocker.
121
-
122
- **Gate.** If a Phase 1 Seeder is still running when this batch is dispatched, hold Image Phase 2 back until that seeder returns. Phase 3 Components dispatch does not wait — Phase 3 agents don't need entity data. In practice Phase 1 Seeders (~99–121 s typical) finish well before Phase 2 DS (~500 s typical), so this gate rarely fires.
123
-
124
- ### Then Phase 4 (Pages)
125
-
126
- Phase 4 launches in Step 7. Phase 1 Seeders, Phase 3 Components, and Image Phase 2 are typically still running (or finished) at that point. Step 6 explicitly waits for Phase 1 + Phase 3 before Step 7 dispatches; Image Phase 2 is allowed to continue running through Phase 4 and is gated only at Step 8 / Build.
127
-
128
- ---
129
-
130
- ## Wait: Phase 3 + Phase 1 → Step 7 (Phase 4 Pages)
131
-
132
- Both must complete before Step 7 dispatches:
133
-
134
- 1. **Phase 1 Seeders** — return data includes product slugs, CMS item IDs, etc. that Phase 4 subagents need for wiring.
135
- 2. **Phase 3 Components** — writes the React islands that Phase 4 Pages mount.
136
-
137
- If one is still running when the other finishes, wait for its return. Do NOT launch Phase 4 prematurely — Phase 4 subagents would fail reading missing islands or missing product slugs.
138
-
139
- ### Data carry-forward
140
-
141
- Parse these from Phase 1 Seed returns into session scratch for Phase 4 subagent prompts:
142
- - **Stores Phase 1 return** → `products: [{id, name, slug, variantId, price, inventory, sku}]`
143
- - **CMS Phase 1 return** → `collections: [{name, items: [{id, …}]}]`
144
-
145
- Since 2026-04 the orchestrator also merges each Seeder's `data` block into `.wix/site.json.seeded.<vertical>` — Phase 4 prompts reference the `site.json` path rather than re-inlining the raw data, but the shape above is what Phase 4 subagents ultimately read.
146
-
147
- ---
148
-
149
- ## Step 7 Dispatch — Phase 4 (Pages)
150
-
151
- ### Concurrent batch
152
-
153
- For each loaded pack's `pages`:
154
- - One Phase 4 subagent per scope — **background**. Each writes its routes ONCE with both visual design and live data queries (the merged design+wire model — see SKILL.md Step 5 note). Earlier flows split this into a placeholder-writing dispatch followed by a page-rewrite dispatch; that double-write was eliminated.
155
-
156
- > **Image Phase 2 is NOT dispatched here.** It was launched earlier in Step 4.5, alongside Phase 3 Components. By the time Step 7 fires, Image Phase 2 has typically been running for ~5–8 minutes and is finished or close to finishing. The Step 8 hard gate still waits for it before invoking `release.sh`.
157
-
158
- ### Example (ecommerce run — stores pack contributes 4 Phase 4 scopes + cms pack 1)
159
-
160
- Five subagents launched concurrently:
161
-
162
- 1. **product-pages** — `products/index.astro`, `products/[slug].astro`, `ProductCard.astro`
163
- 2. **category-pages** — `category/[slug].astro`, `CategoryRail.astro`, `utils/categories.ts`
164
- 3. **cart-checkout** — `cart.astro`, `thank-you.astro`
165
- 4. **home-and-nav** — patch `index.astro` product grid + `Navigation.astro` (CartBadge mount + Shop submenu insert at `<!-- nav:links -->`)
166
- 5. **cms-pages** — wire About + FAQ to live `@wix/data` queries
167
-
168
- `product-pages` and `home-and-nav` import files written by `category-pages` (`CategoryRail.astro`, `utils/categories.ts`) — but the imports resolve at build time (Step 8), not at write time, so the three can dispatch concurrently.
169
-
170
- ### Phase 4 prompt additions
171
-
172
- ```
173
- Scope: <scope name from pack.pages[*].name>
174
- Files to own (absolute paths): <from pack.pages[*].files>
175
- Phase 1 Seed data: read from `.wix/site.json.seeded.<vertical>` (path reference — see SKILL.md Step 7)
176
- Design tokens: .wix/design-tokens.css (read from disk if needed)
177
- ```
178
-
179
- Each scope subagent writes its `.astro` files directly with live SDK queries, wires up analytics events, and mounts the React islands written by Phase 3 Components.
180
-
181
- Scope subagents MUST NOT:
182
- - Modify files outside their declared scope
183
- - Modify CSS (owned by Phase 2 Design System)
184
- - Modify React islands (owned by Phase 3 Components)
185
-
186
- ---
187
-
188
- ## Wait: Phase 4 → Build
189
-
190
- > **HARD GATE: Do NOT run `npx @wix/cli build` until `image-phase-2-entity` has completed or timed out (120s).** This gate is non-negotiable even if earlier phases had failures or were written inline. Skipping it after cascading failures has shipped previews with no product images and `run.json` recording `image-phase-2-entity` as `"in_progress"`.
191
-
192
- All Step 7 Phase 4 Pages subagents return. Image Phase 2 was dispatched in Step 4.5 (not Step 7), so it has been running through Phase 3 + Phase 4 in parallel — typically ~5–8 minutes by the time Phase 4 Pages finish, which is enough for Image Phase 2 to be done or in its tail. All return JSON is in session context.
193
-
194
- If Phase 4 finishes before `image-phase-2-entity`, wait for it before proceeding. Without this wait, the preview shows empty image placeholders on products (images not yet PATCHed). With Image Phase 2 dispatched earlier (in Step 4.5), this wait is usually a no-op.
195
-
196
- > **Timeout safety:** if `image-phase-2-entity` has not completed within 120s after all Phase 4 subagents finish, proceed to Build and note `{code: "IMAGE_PHASE_2_TIMEOUT"}` in `run.json`. The timeout is a safety valve — under the Step-4.5-dispatch model it should rarely fire.
197
-
198
- Also ensure the background `npm install` (started in Step 2 Setup) has completed. Wait on its handle rather than polling. On non-zero exit, follow the recovery ladder in `SETUP.md` § "npm install recovery".
199
-
200
- ---
201
-
202
- ## Subagent rate / credit limits
203
-
204
- Some runtimes apply per-session rate or credit limits to subagents. When a subagent return looks truncated, treat it as a rate-limit hit and recover.
205
-
206
- ### Detection
207
-
208
- A subagent has hit a rate / credit limit when its return contains any of:
209
- - Literal text `"You've hit your limit"`, `"quota exceeded"`, `"rate limit"`
210
- - Total return under ~100 tokens with no fenced JSON block
211
- - Return ending mid-sentence without a completion indicator
212
-
213
- ### Recovery procedure
214
-
215
- 1. **Check the subagent's declared output files on disk.** Each scope's reference lists the files it owns (e.g., the Phase 4 store-pages scope owns `products/index.astro`, `products/[slug].astro`, `cart.astro`, `thank-you.astro`, `ProductCard.astro`). Read each expected path.
216
- 2. **If all expected files exist on disk and look syntactically valid** (no empty files, no unterminated strings): synthesize a `status: "complete"` entry for `run.json` with `notes: "Sub-agent hit rate limit after writing all files; files on disk are valid."` Proceed with the next dispatch.
217
- 3. **If expected files are missing or empty:** retry the subagent once with an identical prompt. If the retry also hits the limit, mark the phase `status: "partial"` in `run.json` with `errors: [{code: "RATE_LIMIT", message: "Subagent rate-limited; <N> of <M> files produced"}]` and decide per-case — the orchestrator may fall back to inline emission of the missing files if they're trivial (single-file scope), or fail the run.
218
- 4. **Do not loop.** Retrying the same subagent more than once after a rate limit wastes budget — the limit is session-scoped and persists.
219
-
220
- Record the rate-limit event in `run.json` `notes[]` regardless of recovery outcome — it's important observability for tuning scope sizes.
221
-
222
- ## Build & Release
223
-
224
- 1. `npx @wix/cli build` — if it fails, inspect `.wix/debug.log` for the specific error, fix, retry. Common failure modes are listed in `references/shared/RETURN_CONTRACT.md` § "Common failure modes".
225
- 2. `npx @wix/cli release` — extract the published URL from the `Site published on <url>` line in stdout. This command also populates the **Frontend link** in headless settings natively, so transactional emails link to the deployed frontend without any extra API calls.
226
-
227
- ---
228
-
229
- ## Final Message — single concluding turn
230
-
231
- Contains (in order):
232
-
233
- 1. **Release URL** as the very first thing — bold heading or link. The user must see it immediately.
234
- 2. **Write `.wix/run.json`** in the same turn — a single observability record aggregating every subagent return. Format per `references/shared/RETURN_CONTRACT.md` § "Final run.json format".
235
-
236
- Why URL-first within one turn: the user perceives the URL instantly, but the turn does not close until the file write completes — so the observability record is guaranteed on disk before the turn ends. Earlier flows composed the final log BEFORE emitting the URL, adding ~70s to the user's wait.
237
-
238
- Do NOT re-read anything to compose `run.json`. Use the subagent return data already in session context.
239
-
240
- ---
241
-
242
- ## Styling contract coordination
243
-
244
- The **design tokens** (`.wix/design-tokens.css` + `.wix/site.d.ts`) are the coordination artifacts between subagents. Read by every downstream phase that touches styled markup.
245
-
246
- ### Producer: Phase 2 Design System (Step 3, foreground) → orchestrator (Step 4, deterministic)
247
-
248
- Phase 2 writes `global.css` and returns `designTokens` JSON. The orchestrator merges the JSON into `.wix/site.json.designTokens` and runs `node <SKILL_ROOT>/scripts/emit-design-tokens.mjs` (Step 4), which deterministically emits `.wix/design-tokens.css` + `.wix/site.d.ts` from the JSON. Both derived files are pure projections — no agent-side template, no LLM. See `<SKILL_ROOT>/scripts/emit-design-tokens.mjs` for the projection rules.
249
-
250
- ### Consumer: Phase 3 Components (Step 4.5 — launched AFTER Phase 2 completes; no polling)
251
-
252
- Phase 3 Components is **not** dispatched in Step 3 alongside Phase 2. The orchestrator waits for Phase 2 to finish (foreground) and then launches Phase 3 in the background in Step 4.5. The contract is passed inline in each Phase 3 prompt.
253
-
254
- Why serialized instead of polled: a polling mechanic would only save time if Phase 3 could finish early — but Step 7 (Phase 4) already depends on Phase 2, so Phase 2 is the critical-path gate regardless. Serializing Phase 3 behind Phase 2 adds zero to critical-path `max(Phase 2, Phase 3)` wall time and eliminates one failure mode (a missing-contract timeout).
255
-
256
- ### Consumers: Phase 4 Pages (Step 7)
257
-
258
- Contract already exists when Phase 4 launches. Subagents receive the contract contents inline in their prompt (no polling).
259
-
260
- ---
261
-
262
- ## Diagnostic: did the concurrent batch actually run in parallel?
263
-
264
- If a build feels slow, check whether dispatches that should have been concurrent actually overlapped in execution. Two failure modes:
265
-
266
- 1. **Serialized launch:** the orchestrator emitted subagent invocations one at a time across multiple turns instead of as a single batch. Symptom: 12–39s gaps between subagent starts in the run log.
267
- 2. **Serialized execution:** the runtime dispatched the batch but executed it sequentially (rare; most runtimes parallelize properly).
268
-
269
- The fix for (1) depends on the runtime — check whether your dispatch primitive supports a single concurrent batch and whether anything between the subagent invocations (status updates, narration, file writes) is splitting the batch into multiple turns. Even when (1) cannot be fixed, **background dispatch alone gives ~2× compression** by overlapping execution. Make every subagent that doesn't block downstream work a background subagent.
@@ -1,42 +0,0 @@
1
- # Install a Wix app onto a site
2
-
3
- Reference for the orchestrator. Invoked from `SKILL.md` Step 2 once per app entry across the loaded packs' `apps[*]`. Can't be a bash script — the install goes through the Wix MCP tool `CallWixSiteAPI`, not over the wire from the local shell.
4
-
5
- ## Inputs
6
-
7
- - `siteId` — from `wix.config.json`.
8
- - `appName` — e.g. `wix-stores`, `wix-forms`, `wix-blog`. Resolved to `appDefId` via `<SKILL_ROOT>/references/commands/known-apps.json`. Unknown name → fail fast (`"Unknown app: {appName}. Known: [list]. Add it to references/commands/known-apps.json before retrying."`); do not guess.
9
- - `mcpPrefix` — captured in Step 0 (the discovered Wix MCP prefix; see `<SKILL_ROOT>/references/shared/MCP_PREFIX.md`).
10
-
11
- ## Call
12
-
13
- Wrap in `date -u` captures so timing flows into `run.json.phases[]` as `{ phase: "app-install-{appName}", seconds: <duration> }`.
14
-
15
- ```
16
- {mcpPrefix}CallWixSiteAPI
17
- siteId: {siteId}
18
- url: https://www.wixapis.com/apps-installer-service/v1/app-instance/install
19
- method: POST
20
- body: (a JSON object — NOT a string)
21
- {
22
- "tenant": { "tenantType": "SITE", "id": "{siteId}" },
23
- "appInstance": { "appDefId": "{appDefId}", "enabled": true }
24
- }
25
- reason: Install {appName} on the new headless site
26
- sourceDocUrl: https://dev.wix.com/docs/api-reference/business-management/app-installation/skills/install-wix-apps
27
- ```
28
-
29
- The MCP tool requires explicit `url` / `method` / `body` / `reason` / `sourceDocUrl`. Do NOT pass `endpoint:`. Do NOT stringify `body` — pass it as a JSON object. (The Step 0 MCP bootstrap — see `<SKILL_ROOT>/references/commands/mcp-bootstrap.md` — preloads the `CallWixSiteAPI` schema so the orchestrator and subagents both see the right shape.)
30
-
31
- ## Strict-then-recover
32
-
33
- | Outcome | Action |
34
- |---|---|
35
- | 2xx | Done. |
36
- | 4xx / 5xx with parseable body | Enter recover loop (max 1 retry): `{mcpPrefix}SearchWixRESTDocumentation` for `install app instance`, then `{mcpPrefix}ReadFullDocsMethodSchema` on the top match, then retry with the discovered shape. |
37
- | Recovery succeeds | Append to `run.json.commandDrift[]`: `{ command: "install-app", primaryError: { status, body }, recoveredWith: { endpoint, bodyPatch }, suggestedFix: "Update references/commands/install-app.md body template" }`. |
38
- | Both paths fail | Surface the original response body and the doc link to the user. Do not loop further. |
39
-
40
- ## Why this is a reference doc, not a script
41
-
42
- The body shape and the strict-then-recover ladder are the parts that need to stay frozen across runs. Encoding them in a markdown reference the orchestrator reads (instead of a slash command the orchestrator dispatches) keeps the source of truth inside the skill and removes the round-trip through a slash-command shim.