@wix/agent-skills 1.0.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 (220) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +111 -0
  3. package/package.json +29 -0
  4. package/skills/wix-app/SKILL.md +344 -0
  5. package/skills/wix-app/references/APP_IDENTIFIERS.md +35 -0
  6. package/skills/wix-app/references/APP_MARKET_REVIEW.md +311 -0
  7. package/skills/wix-app/references/APP_VALIDATION.md +171 -0
  8. package/skills/wix-app/references/BACKEND_API.md +233 -0
  9. package/skills/wix-app/references/BACKEND_EVENT.md +116 -0
  10. package/skills/wix-app/references/CODE_QUALITY.md +33 -0
  11. package/skills/wix-app/references/CUSTOM_ELEMENT_WIDGET.md +587 -0
  12. package/skills/wix-app/references/DASHBOARD_MENU_PLUGIN.md +157 -0
  13. package/skills/wix-app/references/DASHBOARD_MODAL.md +283 -0
  14. package/skills/wix-app/references/DASHBOARD_PAGE.md +403 -0
  15. package/skills/wix-app/references/DASHBOARD_PLUGIN.md +205 -0
  16. package/skills/wix-app/references/DATA_COLLECTION.md +451 -0
  17. package/skills/wix-app/references/DOCUMENTATION.md +42 -0
  18. package/skills/wix-app/references/EDITOR_REACT_COMPONENT.md +65 -0
  19. package/skills/wix-app/references/EMBEDDED_SCRIPT.md +468 -0
  20. package/skills/wix-app/references/EXTENSION_REGISTRATION.md +96 -0
  21. package/skills/wix-app/references/SERVICE_PLUGIN.md +235 -0
  22. package/skills/wix-app/references/SITE_PLUGIN.md +436 -0
  23. package/skills/wix-app/references/STORES_VERSIONING.md +334 -0
  24. package/skills/wix-app/references/backend-event/COMMON-EVENTS.md +84 -0
  25. package/skills/wix-app/references/custom-element-widget/SETTINGS_PANEL.md +345 -0
  26. package/skills/wix-app/references/dashboard-menu-plugin/blog-slots.md +71 -0
  27. package/skills/wix-app/references/dashboard-menu-plugin/bookings-slots.md +58 -0
  28. package/skills/wix-app/references/dashboard-menu-plugin/crm-slots.md +8 -0
  29. package/skills/wix-app/references/dashboard-menu-plugin/ecommerce-slots.md +17 -0
  30. package/skills/wix-app/references/dashboard-menu-plugin/events-slots.md +29 -0
  31. package/skills/wix-app/references/dashboard-menu-plugin/restaurants-slots.md +27 -0
  32. package/skills/wix-app/references/dashboard-menu-plugin/stores-slots.md +35 -0
  33. package/skills/wix-app/references/dashboard-page/API_SPEC.md +138 -0
  34. package/skills/wix-app/references/dashboard-page/DASHBOARD_API.md +573 -0
  35. package/skills/wix-app/references/dashboard-page/DYNAMIC_PARAMETERS.md +269 -0
  36. package/skills/wix-app/references/dashboard-page/ECOM_NAVIGATION.md +164 -0
  37. package/skills/wix-app/references/dashboard-plugin/SLOTS.md +294 -0
  38. package/skills/wix-app/references/data-collection/WIX_DATA.md +270 -0
  39. package/skills/wix-app/references/data-collection/extension-template.ts +107 -0
  40. package/skills/wix-app/references/editor-react-component/ACCESSIBILITY.md +138 -0
  41. package/skills/wix-app/references/editor-react-component/COMPONENT-API.md +454 -0
  42. package/skills/wix-app/references/editor-react-component/COMPONENT-CONFIGURATION.md +165 -0
  43. package/skills/wix-app/references/editor-react-component/CSS-GUIDELINES.md +576 -0
  44. package/skills/wix-app/references/editor-react-component/DIRECTIONALITY.md +170 -0
  45. package/skills/wix-app/references/editor-react-component/EDIT-FLOW.md +6 -0
  46. package/skills/wix-app/references/editor-react-component/PARTS.md +25 -0
  47. package/skills/wix-app/references/editor-react-component/PROPS-VS-CSS.md +203 -0
  48. package/skills/wix-app/references/editor-react-component/REACT-GUIDELINES.md +167 -0
  49. package/skills/wix-app/references/editor-react-component/REACT-PATTERNS.md +137 -0
  50. package/skills/wix-app/references/service-plugin/ADDITIONAL-FEES.md +112 -0
  51. package/skills/wix-app/references/service-plugin/BOOKINGS-STAFF-SORTING.md +118 -0
  52. package/skills/wix-app/references/service-plugin/DISCOUNT-TRIGGERS.md +87 -0
  53. package/skills/wix-app/references/service-plugin/GIFT-CARDS.md +86 -0
  54. package/skills/wix-app/references/service-plugin/PAYMENT-SETTINGS.md +135 -0
  55. package/skills/wix-app/references/service-plugin/SHIPPING-RATES.md +79 -0
  56. package/skills/wix-app/references/service-plugin/VALIDATIONS.md +68 -0
  57. package/skills/wix-app/references/site-plugin/EXAMPLES.md +311 -0
  58. package/skills/wix-app/references/site-plugin/SLOTS.md +263 -0
  59. package/skills/wix-design-system/SKILL.md +129 -0
  60. package/skills/wix-design-system/references/file-structure.md +56 -0
  61. package/skills/wix-design-system/scripts/wds.cjs +531 -0
  62. package/skills/wix-headless/SKILL.md +418 -0
  63. package/skills/wix-headless/references/DISCOVERY.md +332 -0
  64. package/skills/wix-headless/references/ORCHESTRATION.md +269 -0
  65. package/skills/wix-headless/references/SETUP.md +154 -0
  66. package/skills/wix-headless/references/blog/BLOG_CONTENT.md +152 -0
  67. package/skills/wix-headless/references/blog/BLOG_PAGES.md +299 -0
  68. package/skills/wix-headless/references/blog/BLOG_SETUP.md +218 -0
  69. package/skills/wix-headless/references/blog/INSTRUCTIONS.md +32 -0
  70. package/skills/wix-headless/references/cms/CMS_FOUNDATIONS.md +373 -0
  71. package/skills/wix-headless/references/cms/FAQ_KNOWLEDGE_BASE.md +229 -0
  72. package/skills/wix-headless/references/cms/INSTRUCTIONS.md +40 -0
  73. package/skills/wix-headless/references/cms/PORTFOLIO.md +454 -0
  74. package/skills/wix-headless/references/cms/RESOURCE_LIBRARY.md +356 -0
  75. package/skills/wix-headless/references/cms/TEAM_DIRECTORY.md +299 -0
  76. package/skills/wix-headless/references/commands/install-app.md +42 -0
  77. package/skills/wix-headless/references/commands/known-apps.json +5 -0
  78. package/skills/wix-headless/references/commands/mcp-bootstrap.md +28 -0
  79. package/skills/wix-headless/references/designer/INSTRUCTIONS.md +828 -0
  80. package/skills/wix-headless/references/ecom/CART_PAGES.md +120 -0
  81. package/skills/wix-headless/references/ecom/CART_WIRING.md +103 -0
  82. package/skills/wix-headless/references/ecom/COMPONENTS_CSS.md +132 -0
  83. package/skills/wix-headless/references/ecom/INSTRUCTIONS.md +59 -0
  84. package/skills/wix-headless/references/forms/CONTACT_FORM.md +477 -0
  85. package/skills/wix-headless/references/forms/INSTRUCTIONS.md +43 -0
  86. package/skills/wix-headless/references/gift-cards/COMPONENTS.md +119 -0
  87. package/skills/wix-headless/references/gift-cards/INSTRUCTIONS.md +51 -0
  88. package/skills/wix-headless/references/gift-cards/PAGES.md +129 -0
  89. package/skills/wix-headless/references/images/INSTRUCTIONS.md +359 -0
  90. package/skills/wix-headless/references/shared/BUILD_NOISE.md +8 -0
  91. package/skills/wix-headless/references/shared/IMAGE_GENERATION.md +185 -0
  92. package/skills/wix-headless/references/shared/IMPLEMENTER.md +155 -0
  93. package/skills/wix-headless/references/shared/MCP_PREFIX.md +105 -0
  94. package/skills/wix-headless/references/shared/PRODUCTION_SHARP_EDGES.md +97 -0
  95. package/skills/wix-headless/references/shared/RETURN_CONTRACT.md +423 -0
  96. package/skills/wix-headless/references/shared/STYLING.md +117 -0
  97. package/skills/wix-headless/references/stores/BACK_IN_STOCK.md +178 -0
  98. package/skills/wix-headless/references/stores/CATEGORY_PAGES.md +86 -0
  99. package/skills/wix-headless/references/stores/COMPONENTS_CSS.md +129 -0
  100. package/skills/wix-headless/references/stores/HOME_AND_NAV.md +227 -0
  101. package/skills/wix-headless/references/stores/INSTRUCTIONS.md +96 -0
  102. package/skills/wix-headless/references/stores/PRODUCT_CATALOG_DATA.md +249 -0
  103. package/skills/wix-headless/references/stores/PRODUCT_PAGES.md +213 -0
  104. package/skills/wix-headless/references/stores/SHARED_WIRING.md +164 -0
  105. package/skills/wix-headless/references/verticals/_schema.json +160 -0
  106. package/skills/wix-headless/references/verticals/_schema.md +185 -0
  107. package/skills/wix-headless/references/verticals/blog.md +125 -0
  108. package/skills/wix-headless/references/verticals/cms.md +121 -0
  109. package/skills/wix-headless/references/verticals/ecom.md +96 -0
  110. package/skills/wix-headless/references/verticals/forms.md +106 -0
  111. package/skills/wix-headless/references/verticals/gift-cards.md +121 -0
  112. package/skills/wix-headless/references/verticals/stores.md +167 -0
  113. package/skills/wix-headless/scripts/check-manifest.mjs +198 -0
  114. package/skills/wix-headless/scripts/copy-utility-templates.mjs +153 -0
  115. package/skills/wix-headless/scripts/emit-design-tokens.mjs +77 -0
  116. package/skills/wix-headless/scripts/finalize-run-json.mjs +141 -0
  117. package/skills/wix-headless/scripts/init-site-json.mjs +63 -0
  118. package/skills/wix-headless/scripts/patch-decorative-slots.mjs +124 -0
  119. package/skills/wix-headless/scripts/plan-entity-image-waves.mjs +190 -0
  120. package/skills/wix-headless/scripts/preview.sh +45 -0
  121. package/skills/wix-headless/scripts/release.sh +73 -0
  122. package/skills/wix-headless/scripts/scaffold.sh +53 -0
  123. package/skills/wix-headless/scripts/seed-utilities.sh +55 -0
  124. package/skills/wix-headless/shared-utilities/analytics.ts +40 -0
  125. package/skills/wix-headless/shared-utilities/ricos.ts +179 -0
  126. package/skills/wix-headless/shared-utilities/wix-image.ts +72 -0
  127. package/skills/wix-headless/templates/ecom/CartBadge.tsx +84 -0
  128. package/skills/wix-headless/templates/ecom/CartView.tsx +543 -0
  129. package/skills/wix-headless/templates/ecom/cart.astro +13 -0
  130. package/skills/wix-headless/templates/ecom/components-ecom.css +215 -0
  131. package/skills/wix-headless/templates/ecom/discounts.ts +71 -0
  132. package/skills/wix-headless/templates/ecom/thank-you.astro +24 -0
  133. package/skills/wix-headless/templates/gift-cards/GiftCardPurchase.tsx +172 -0
  134. package/skills/wix-headless/templates/gift-cards/_home-teaser-snippet.astro +42 -0
  135. package/skills/wix-headless/templates/gift-cards/_nav-snippet.astro +11 -0
  136. package/skills/wix-headless/templates/gift-cards/components-gift-cards.css +219 -0
  137. package/skills/wix-headless/templates/gift-cards/gift-cards.astro +51 -0
  138. package/skills/wix-headless/templates/gift-cards/gift-cards.ts +75 -0
  139. package/skills/wix-headless/templates/stores/AddToCartButton.tsx +77 -0
  140. package/skills/wix-headless/templates/stores/BackInStockForm.tsx +176 -0
  141. package/skills/wix-headless/templates/stores/CategoryRail.astro +69 -0
  142. package/skills/wix-headless/templates/stores/ProductCard.astro +79 -0
  143. package/skills/wix-headless/templates/stores/ProductPurchase.tsx +397 -0
  144. package/skills/wix-headless/templates/stores/SeoTags.astro +21 -0
  145. package/skills/wix-headless/templates/stores/back-in-stock.ts +67 -0
  146. package/skills/wix-headless/templates/stores/categories.ts +155 -0
  147. package/skills/wix-headless/templates/stores/category/[slug].astro +130 -0
  148. package/skills/wix-headless/templates/stores/components-stores.css +295 -0
  149. package/skills/wix-headless/templates/stores/products/[slug].astro +128 -0
  150. package/skills/wix-headless/templates/stores/products/index.astro +101 -0
  151. package/skills/wix-manage/SKILL.md +280 -0
  152. package/skills/wix-manage/references/app-installation/install-wix-apps.md +155 -0
  153. package/skills/wix-manage/references/app-installation/list-installed-apps.md +124 -0
  154. package/skills/wix-manage/references/blog/how-to-create-blog-posts.md +226 -0
  155. package/skills/wix-manage/references/bookings/booking-service-policy-setup.md +95 -0
  156. package/skills/wix-manage/references/bookings/booking-system-integration-gaps.md +416 -0
  157. package/skills/wix-manage/references/bookings/bookings-staff-setup.md +255 -0
  158. package/skills/wix-manage/references/bookings/create-and-update-booking-services.md +462 -0
  159. package/skills/wix-manage/references/bookings/end-to-end-booking-flow.md +278 -0
  160. package/skills/wix-manage/references/bookings/external-calendar-integration.md +258 -0
  161. package/skills/wix-manage/references/bookings/multi-resource-service-creation.md +231 -0
  162. package/skills/wix-manage/references/calendar/configure-default-business-hours.md +226 -0
  163. package/skills/wix-manage/references/cms/cms-data-items-crud.md +422 -0
  164. package/skills/wix-manage/references/cms/cms-data-operations-extended.md +263 -0
  165. package/skills/wix-manage/references/cms/cms-ecommerce-catalog-integration.md +136 -0
  166. package/skills/wix-manage/references/cms/cms-references-and-relationships.md +160 -0
  167. package/skills/wix-manage/references/cms/cms-schema-management.md +143 -0
  168. package/skills/wix-manage/references/contacts/bulk-delete-contacts.md +73 -0
  169. package/skills/wix-manage/references/contacts/bulk-label-and-unlabel-contacts.md +67 -0
  170. package/skills/wix-manage/references/domains/domain-search-and-purchase.md +434 -0
  171. package/skills/wix-manage/references/ecommerce/api-recommendation-tracking.md +420 -0
  172. package/skills/wix-manage/references/ecommerce/flow-add-free-shipping.md +267 -0
  173. package/skills/wix-manage/references/ecommerce/flow-bundle-and-save.md +290 -0
  174. package/skills/wix-manage/references/ecommerce/flow-fix-coverage-gaps.md +300 -0
  175. package/skills/wix-manage/references/ecommerce/flow-optimize-shipping-rates.md +364 -0
  176. package/skills/wix-manage/references/ecommerce/flow-seasonal-promotion.md +315 -0
  177. package/skills/wix-manage/references/ecommerce/flow-stock-mover.md +308 -0
  178. package/skills/wix-manage/references/ecommerce/flow-upsell-boost.md +271 -0
  179. package/skills/wix-manage/references/ecommerce/goal-clear-inventory.md +118 -0
  180. package/skills/wix-manage/references/ecommerce/goal-drive-cross-sells.md +122 -0
  181. package/skills/wix-manage/references/ecommerce/goal-increase-aov.md +132 -0
  182. package/skills/wix-manage/references/ecommerce/goal-reduce-cart-abandonment.md +148 -0
  183. package/skills/wix-manage/references/ecommerce/goal-seasonal-revenue.md +146 -0
  184. package/skills/wix-manage/references/ecommerce/guardrail-discount-conflicts.md +118 -0
  185. package/skills/wix-manage/references/ecommerce/guardrail-margin-protection.md +88 -0
  186. package/skills/wix-manage/references/ecommerce/guardrail-rate-pricing-sanity.md +108 -0
  187. package/skills/wix-manage/references/ecommerce/guardrail-shipping-health.md +124 -0
  188. package/skills/wix-manage/references/ecommerce/recipe-apply-shipping-recommendations.md +299 -0
  189. package/skills/wix-manage/references/ecommerce/recommend-ecommerce-strategy.md +582 -0
  190. package/skills/wix-manage/references/ecommerce/setup-coupons.md +338 -0
  191. package/skills/wix-manage/references/ecommerce/setup-discount-rules.md +444 -0
  192. package/skills/wix-manage/references/ecommerce/setup-shipping-rates.md +86 -0
  193. package/skills/wix-manage/references/ecommerce/setup-shipping-regions.md +56 -0
  194. package/skills/wix-manage/references/ecommerce/setup-store-pickup-location.md +209 -0
  195. package/skills/wix-manage/references/ecommerce/skill-graph.md +139 -0
  196. package/skills/wix-manage/references/ecommerce/troubleshoot-checkout-delivery-dropoff.md +124 -0
  197. package/skills/wix-manage/references/ecommerce/troubleshoot-discount-not-applying.md +95 -0
  198. package/skills/wix-manage/references/events/list-events.md +203 -0
  199. package/skills/wix-manage/references/forms/create-form.md +260 -0
  200. package/skills/wix-manage/references/get-paid/create-payment-links.md +212 -0
  201. package/skills/wix-manage/references/get-paid/how-to-setup-wix-payments.md +57 -0
  202. package/skills/wix-manage/references/get-paid/payment-links-for-bookings.md +101 -0
  203. package/skills/wix-manage/references/media/upload-media-to-wix.md +216 -0
  204. package/skills/wix-manage/references/pricing-plans/create-and-update-pricing-plans.md +77 -0
  205. package/skills/wix-manage/references/pricing-plans/pricing-plans-bookings-integration.md +166 -0
  206. package/skills/wix-manage/references/restaurants/wix-restaurants-setup.md +336 -0
  207. package/skills/wix-manage/references/rich-content/ricos-converter-service.md +295 -0
  208. package/skills/wix-manage/references/site-properties/change-payment-currency-site-properties.md +59 -0
  209. package/skills/wix-manage/references/sites/create-site-from-template.md +183 -0
  210. package/skills/wix-manage/references/sites/query-sites.md +125 -0
  211. package/skills/wix-manage/references/stores/add-store-pages-to-site.md +57 -0
  212. package/skills/wix-manage/references/stores/bulk-create-products-with-options.md +1041 -0
  213. package/skills/wix-manage/references/stores/create-product-catalog-v1.md +125 -0
  214. package/skills/wix-manage/references/stores/create-product-from-image.md +824 -0
  215. package/skills/wix-manage/references/stores/create-product-with-options-catalog-v3.md +566 -0
  216. package/skills/wix-manage/references/stores/find-products-query-and-search-catalog-v3.md +194 -0
  217. package/skills/wix-manage/references/stores/query-products-catalog-v1.md +80 -0
  218. package/skills/wix-manage/references/stores/setup-online-store-catalog-v3.md +99 -0
  219. package/skills/wix-manage/references/stores/update-product-pre-order.md +213 -0
  220. package/skills/wix-manage/references/stores/update-product-with-options.md +318 -0
@@ -0,0 +1,185 @@
1
+ # Recipe: AI Image Generation + Wix Media Import
2
+
3
+ Generate images using **Wix AI (Runware)** via the Wix MCP, then import them into Wix Media. This is a **pure utility** — it generates an image and returns the result. The calling skill owns prompt construction and entity attachment.
4
+
5
+ Image generation is MCP-authenticated — no API keys, no curl, no sandbox escape hatches. Runs automatically whenever the image agent launches.
6
+
7
+ ## Step 1: Generate Image via Wix AI
8
+
9
+ Call the Runware proxy through `CallWixSiteAPI`. The body is an **array of tasks** — one request can generate N images by adding more task objects.
10
+
11
+ ```
12
+ CallWixSiteAPI: POST https://www.wixapis.com/runwareschemaless/v1/request
13
+ body: [
14
+ {
15
+ "taskType": "imageInference",
16
+ "taskUUID": "<unique-uuid-per-task>",
17
+ "outputType": "URL",
18
+ "outputFormat": "PNG",
19
+ "positivePrompt": "<PROMPT>",
20
+ "height": 1024,
21
+ "width": 1024,
22
+ "model": "google:4@2",
23
+ "numberResults": 1
24
+ }
25
+ ]
26
+ ```
27
+
28
+ Before the first call, ensure the `CallWixSiteAPI` tool schema is loaded (the orchestrator's Step 0 MCP bootstrap covers this — see `<SKILL_ROOT>/references/commands/mcp-bootstrap.md`) so `body` is sent as a real JSON array (not a stringified blob). Use your runtime's tool-discovery primitive if you need to (re-)load it.
29
+
30
+ Extract `data[0].imageURL` from the response. This is a short-lived URL — **import to Wix Media immediately** in the same task queue.
31
+
32
+ ### Required Fields
33
+
34
+ | Field | Value | Notes |
35
+ |-------|-------|-------|
36
+ | `taskType` | `"imageInference"` | Always this value |
37
+ | `taskUUID` | valid **UUIDv4** | Runware validates the v4 format strictly — human-readable slugs like `product-maestro-001` return `400 invalidTaskUUID`. Generate via `uuidgen` (macOS/Linux) or `crypto.randomUUID()`. Example: `550e8400-e29b-41d4-a716-446655440000`. One unique UUID per task; reusing in the same request errors. |
38
+ | `outputType` | `"URL"` | Return a URL (not base64) |
39
+ | `outputFormat` | `"PNG"` or `"JPG"` | PNG for transparency-friendly art, JPG for photography |
40
+ | `positivePrompt` | brand-contextual prompt | See "Prompt Guidelines" below |
41
+ | `height`, `width` | one of the allowed pairs below | Free-form sizes return 400 |
42
+ | `model` | `"google:4@2"` (default) | Nano Banana Pro 2. Alternatives: `bfl:5@1`, `runware:400@1` — only switch if the default fails repeatedly |
43
+ | `numberResults` | `1` | Increase if you need multiple variants per prompt |
44
+
45
+ ### Allowed Dimensions (safe defaults)
46
+
47
+ Runware enforces a fixed set per model. Start with these — all three were validated end-to-end this session with `google:4@2`:
48
+
49
+ | Aspect | Size | Use for |
50
+ |--------|------|---------|
51
+ | Square | `1024 × 1024` | Product photos, decorative squares, Instagram-style hero |
52
+ | 16:9 | `1376 × 768` | Page heroes, wide banners |
53
+ | 4:3 | `1200 × 896` | About-page visuals, editorial imagery |
54
+
55
+ If a 400 response lists supported dimensions, use one from that list — do not retry with the same invalid size.
56
+
57
+ ### Forbidden Parameters (for `google:4@2`)
58
+
59
+ Do NOT send `steps` or `CFGScale` — both are rejected with `unsupportedParameter` and cause a 400. These fields are valid for other Runware models but must be omitted for `google:4@2`.
60
+
61
+ ## Required: minimize round-trips per image phase
62
+
63
+ The image agent's `image-phase-1-decorative` and `image-phase-2-entity` scopes each generate multiple images. **Do not emit N one-task calls in sequential turns** — sequential dispatch across many turns adds ~30–40 s of inter-message overhead. The correct shape depends on the model:
64
+
65
+ ### For `bfl:5@1`, `runware:400@1`, and other models: ONE batched call
66
+
67
+ ```
68
+ <prefix>CallWixSiteAPI: POST /runwareschemaless/v1/request
69
+ body: [
70
+ { "taskType": "imageInference", "taskUUID": "<uuid-1>", "positivePrompt": "...", ... },
71
+ { "taskType": "imageInference", "taskUUID": "<uuid-2>", "positivePrompt": "...", ... },
72
+ { "taskType": "imageInference", "taskUUID": "<uuid-3>", "positivePrompt": "...", ... }
73
+ ]
74
+ ```
75
+ One round-trip. Response's `data[]` array contains one result per task, matched by `taskUUID`.
76
+
77
+ ### For `google:4@2` (the default): N parallel 1-task sibling calls
78
+
79
+ `google:4@2` times out with `504` when a single request bundles N≥3 tasks — Runware's backend serializes work per request and the model is slow enough that large batches exceed the proxy timeout. Instead, emit **N parallel `CallWixSiteAPI` tool calls as siblings in one concurrent batch**, each carrying one task:
80
+
81
+ ```
82
+ Assistant message (single turn, multiple tool calls):
83
+ <prefix>CallWixSiteAPI: POST /runwareschemaless/v1/request body: [ task1 ]
84
+ <prefix>CallWixSiteAPI: POST /runwareschemaless/v1/request body: [ task2 ]
85
+ <prefix>CallWixSiteAPI: POST /runwareschemaless/v1/request body: [ task3 ]
86
+ ```
87
+
88
+ All three fire in parallel (runtime dispatches concurrent siblings concurrently). No 504, no sequential wait. The important constraint is *one concurrent batch* — splitting them across turns loses the parallelism and degenerates into the anti-pattern below.
89
+
90
+ ### ANTI-PATTERN (slow, regardless of model)
91
+
92
+ Sequential 1-task calls across multiple turns:
93
+ ```
94
+ Assistant msg 1: <prefix>CallWixSiteAPI body: [ task1 ]
95
+ (runtime waits)
96
+ Assistant msg 2: <prefix>CallWixSiteAPI body: [ task2 ]
97
+ (runtime waits)
98
+ Assistant msg 3: <prefix>CallWixSiteAPI body: [ task3 ]
99
+ ```
100
+ Each turn adds inter-message overhead. Whether you're using the batched pattern or parallel siblings, **all the image-generation tool calls MUST be in one concurrent batch**.
101
+
102
+ ### Procedure to enforce batching
103
+
104
+ The following procedure prevents the observed serialization anti-pattern. Follow these steps in order:
105
+
106
+ 1. **Write all prompts first.** In your text response, list every image you will generate with its positivePrompt, dimensions, and a UUID. Do not make any tool calls yet.
107
+ 2. **Compose the full body array** as a fenced JSON block in your text. Verify the task count matches the entity count.
108
+ 3. **One tool call.** Make exactly one `CallWixSiteAPI` call with that complete body array.
109
+ 4. **Parallel imports.** After the generate response arrives, emit all N `POST /site-media/v1/files/import` calls as **concurrent sibling calls in one concurrent batch**.
110
+ 5. **Parallel PATCHes.** After all imports resolve, emit all N PATCH calls as **concurrent sibling calls in one concurrent batch**.
111
+
112
+ **Three concurrent batches total (one per stage).** If you find yourself making more, stop and check whether you're serializing.
113
+
114
+ ### Media import and entity PATCH — parallelize with siblings
115
+
116
+ Generation is one concurrent batch — whether that's one batched call or N parallel siblings. The follow-up steps (`POST /site-media/v1/files/import` per image, and entity PATCH per product/post/item) are per-entity; those can parallelize via concurrent siblings — emit all N import calls in one concurrent batch, then all N PATCH calls in one concurrent batch. See the skill's `references/ORCHESTRATION.md` § "Batching compliance" for why sibling batching beats sequential dispatch.
117
+
118
+ **Pattern for an image phase:** one batched generation call → N parallel imports (sibling calls in one message) → N parallel PATCHes (sibling calls in one message).
119
+
120
+ ## Step 2: Import to Wix Media
121
+
122
+ This API is Wix-side and model-agnostic — the same shape works for any image source:
123
+
124
+ ```
125
+ CallWixSiteAPI: POST /site-media/v1/files/import
126
+ body: {
127
+ "url": "<imageURL from Runware response>",
128
+ "mimeType": "image/png",
129
+ "displayName": "<descriptive-name>.png"
130
+ }
131
+ ```
132
+
133
+ ## Returns
134
+
135
+ The Wix Media import response contains a `file` object. The calling skill receives two values:
136
+
137
+ | Field | Value | Use For |
138
+ |-------|-------|---------|
139
+ | `file.url` | Full permanent `wixstatic.com` URL | Product media, `<img>` tags, CSS `background-image`, CMS Image fields |
140
+ | `file.fileUrl` | File ID (e.g., `9a9cdf_abc123~mv2.png`) | Blog post `media.wixMedia.image.id` field |
141
+
142
+ The calling skill is responsible for attaching the image to whatever entity it belongs to (product, blog post, page element).
143
+
144
+ ## Prompt Guidelines
145
+
146
+ Every prompt should incorporate the full brand context available from the discovery and design phases. Never generate generic images.
147
+
148
+ ### Prompt Structure
149
+
150
+ 1. **Subject** — what the image shows
151
+ 2. **Brand aesthetic** — the design direction from brand discovery
152
+ 3. **Color guidance** — reference the brand palette (e.g., "warm cream and forest green tones" not generic colors)
153
+ 4. **Style/mood** — photography style, lighting, composition
154
+ 5. **Constraints** — always include "no text, no watermarks"
155
+
156
+ ### Context Sources
157
+
158
+ | Source | What to Extract |
159
+ |--------|----------------|
160
+ | Discovery plan | Business type, brand name, industry, target audience |
161
+ | Design Step 1 (brand discovery) | Aesthetic direction, mood, personality |
162
+ | Design Step 2 (design system) | Color palette hex codes from `global.css` |
163
+ | Entity being created | Product name/description, blog post title/topic, page purpose |
164
+
165
+ ### Anti-Patterns (NEVER do these)
166
+
167
+ - Generic prompts without brand context ("a product photo")
168
+ - Ignoring the color palette established in global.css
169
+ - Using stock-photo language ("diverse team of professionals")
170
+ - Requesting text in images (AI-generated text is garbled)
171
+ - Same prompt style across different brand aesthetics
172
+
173
+ ## Error Handling
174
+
175
+ | Error | Action |
176
+ |---|---|
177
+ | `unsupportedParameter` (400) | Strip the offending field (most commonly `steps` or `CFGScale`) and retry |
178
+ | `unsupportedDimensions` (400) | Retry with one of the allowed defaults (`1024×1024`, `1376×768`, `1200×896`) or a size from the error payload's supported list |
179
+ | Model-specific failure (model down, rate limited) | Switch to an alternative model (`bfl:5@1`, `runware:400@1`) and retry once; skip if still failing |
180
+ | Credit exhaustion | Stop generating, return `status: "partial"` with `errors: [{code: "CREDITS_EXHAUSTED", ...}]` listing what was completed (see `RETURN_CONTRACT.md`) |
181
+ | Generation fails (5xx, timeout) | Skip this image, continue with others |
182
+ | Wix Media import fails | Skip this image, entity gets no image |
183
+ | All images fail | Proceed without images, return `status: "failed"` with the root cause |
184
+
185
+ **Never block the main flow on image generation failure.** Products, posts, and pages work without images — users can upload their own via the Wix dashboard later.
@@ -0,0 +1,155 @@
1
+ # Shared Implementer — Common Behavior for Every Vertical Subagent
2
+
3
+ This file is **extended by every per-vertical `INSTRUCTIONS.md`** (stores, ecom, cms, blog, forms, gift-cards). Per-vertical instruction files are thin — they declare scopes and reference paths. Everything else lives here.
4
+
5
+ ## Self-loading
6
+
7
+ Read **only** the files your scope needs. The reading set varies by scope:
8
+
9
+ | Your scope | Mandatory | Conditional |
10
+ |---|---|---|
11
+ | `seed` | this file, `RETURN_CONTRACT.md`, `MCP_PREFIX.md` | — |
12
+ | `components`, `components-css`, `pages`, `pages-*` | this file, `RETURN_CONTRACT.md`, `STYLING.md` | — |
13
+ | Image scopes | (read `references/images/INSTRUCTIONS.md` § Self-Loading) | — |
14
+
15
+ Then read the specific reference(s) for your declared scope (see your vertical's `INSTRUCTIONS.md` scope table). Do NOT read references for scopes other than the one named in your prompt — wastes context and blurs ownership.
16
+
17
+ ## Phase routing
18
+
19
+ Your prompt includes a line `Scope: <name>`. Map to exactly one reference set per your vertical's `INSTRUCTIONS.md` scope table. If the `Scope:` line is missing, stop and ask the parent — do not guess.
20
+
21
+ Standard scope names (see architecture-proposal §3):
22
+ - `seed` — Seed phase (MCP data setup, no frontend code)
23
+ - `components` — Components phase (reusable React/Astro islands, SDK wiring)
24
+ - `pages` — Pages phase (route files with visual design + data queries, single scope per vertical)
25
+ - `pages-<name>` — Pages phase sub-scope (only when a vertical has multiple pages groups, e.g. stores has `pages-products`, `pages-home-and-nav`)
26
+
27
+ ## MCP tool prefix
28
+
29
+ Your prompt includes `MCP tool prefix: <prefix>`. Substitute it for `mcp__wix-mcp-remote__` wherever it appears in your reference files. See `references/shared/MCP_PREFIX.md` for discovery rules.
30
+
31
+ If your scope is `components` or `pages`, you should NOT make MCP calls — those scopes are frontend-only. If you find yourself needing MCP, it's a scope violation — return `status: "partial"` with an error note, do not proceed.
32
+
33
+ ## Reading `.wix/site.json`
34
+
35
+ Every agent reads `.wix/site.json` at the start of its run. The file is the single source of truth for per-project data:
36
+
37
+ ```jsonc
38
+ {
39
+ "brand": { "name": "...", "description": "..." },
40
+ "seeded": { "stores": { "products": [...] }, "cms": { "collections": {...} }, ... },
41
+ "designTokens": { "colors": {...}, "fonts": {...}, "radii": {...}, "spacing": {...} },
42
+ "verticals": ["stores", "ecom", "cms"]
43
+ }
44
+ ```
45
+
46
+ **Phase-specific reads:**
47
+
48
+ | Scope | What to read from site.json |
49
+ |---|---|
50
+ | `seed` | `brand` (for copy generation — product descriptions, FAQ answers). Do NOT read `seeded.<self>` — you're writing it. |
51
+ | `components` | `brand`, `designTokens` (via `var(--color-*)` in CSS). |
52
+ | `pages` / `pages-*` | `brand`, `seeded.<vertical>` (products, posts, collections), `designTokens`. Page data comes from `seeded`, NOT from re-querying MCP. |
53
+
54
+ If a required key is missing (e.g. `seeded.stores.products` absent when you're dispatched as `pages-products`), fail fast — return `status: "failed"` with `errors: [{ code: "SITE_JSON_INCOMPLETE", missing: "seeded.stores.products" }]`. Do NOT re-query MCP — the data gap means a seeder didn't complete, and re-querying would mask the real bug.
55
+
56
+ ## Seeders write their data for the orchestrator to aggregate
57
+
58
+ Agents with `Scope: seed` return their seeded entities in the `data` block of the standard return (see `RETURN_CONTRACT.md`). The parent skill merges your return into `.wix/site.json.seeded.<vertical>` after your run completes. You do NOT write `site.json` yourself — return the data and let the orchestrator aggregate.
59
+
60
+ ## Writing page files
61
+
62
+ Pages-phase agents write route files (`.astro`) with:
63
+
64
+ 1. **Visual design via design tokens and Tailwind.** Reference tokens as `var(--color-primary)` in `<style>` blocks or `bg-[--color-primary]` as Tailwind arbitrary values. Use canonical component templates (`agents/<vertical>/templates/*.astro`) as starting points — adapt, don't invent.
65
+ 2. **Data queries against seeded data.** Read the seeded entities from `.wix/site.json.seeded.<vertical>` at build time (Astro frontmatter `import { site } from "../../.wix/site"`) or at request time via the SDK if the page is server-rendered.
66
+ 3. **Imports from shared components.** Pages import components your Components-phase agent wrote (`src/components/*.tsx`, `.astro`).
67
+ 4. **Imports from skill shared utilities.** `from "../utils/wix-image"` and `from "../utils/analytics"` — these are skill-shipped (copied into the project by `seed-utilities.sh` during Setup); do NOT import them from anywhere else.
68
+
69
+ ## Contributing to shared files via markers
70
+
71
+ When your vertical's pack frontmatter declares `contributes:` entries, you insert at named markers in files created by the Design System phase or another vertical. Example: `Navigation.astro` has `<!-- nav:links -->` and `<!-- nav:actions -->` markers; each vertical inserts at its declared marker.
72
+
73
+ **How to insert at a marker:**
74
+
75
+ 1. Read the shell file to see current content.
76
+ 2. Locate your marker comment (exact string match from your `contributes[].marker`).
77
+ 3. Insert your snippet immediately AFTER the marker line. Do NOT remove the marker — other verticals or future runs may still use it.
78
+ 4. Preserve the file's other content exactly.
79
+
80
+ If your marker is missing from the file, fail fast — it means the shell wasn't scaffolded correctly. Do not invent your own insertion point.
81
+
82
+ ### Marker discipline — strict rules
83
+
84
+ Multiple Phase 4 agents patch the same files concurrently (`Navigation.astro` is touched by stores, ecom, and gift-cards; `index.astro` by stores and gift-cards). To keep their edits compatible:
85
+
86
+ - **Never delete the marker comment** — even if your insert makes it look redundant, leave the comment in place. Other verticals running in parallel rely on `Edit` finding it.
87
+ - **Edit only between/at YOUR marker.** Do not reorder, deduplicate, or "tidy up" content inserted by another agent — even if it looks duplicated. If you observe a duplicate, return `status: "partial"` with `errors: [{code: "MARKER_CONFLICT", marker: "<name>", detail: "..."}]` rather than self-deciding which copy to keep. Concurrent agents have no shared truth on insert order.
88
+ - **Insert AFTER the marker, never replace it.** Use `Edit` with `old_string` = the marker line and `new_string` = the marker line + a newline + your snippet. Never `Edit` with `old_string` containing both the marker and surrounding content unless you also re-emit the marker verbatim in `new_string`.
89
+ - **If your marker has prior content (designer placed a placeholder), append rather than replace** unless your scope reference explicitly says to clear-and-replace. The designer is instructed not to speculatively populate pack-owned slots, but mistakes happen — appending degrades to a duplicate that the user can clean up; replacing destroys hand-tuned content.
90
+
91
+ ## Shared implementation rules
92
+
93
+ Three rules recur across verticals and live here as the single source of truth. Per-vertical references cross-link rather than restating.
94
+
95
+ ### SSR error guards (`.astro` frontmatter)
96
+
97
+ **Every Wix SDK `await` in `.astro` frontmatter MUST be wrapped in try/catch with a safe fallback.** An uncaught throw during render aborts Astro's response stream mid-body — the browser sees HTML up to the failing await and no further (a home page rendering nav + blank body is the typical symptom).
98
+
99
+ ```astro
100
+ ---
101
+ let productList: any[] = [];
102
+ try {
103
+ const result = await productsV3.queryProducts({ fields: ["CURRENCY"] }).limit(50).find();
104
+ productList = result.items ?? [];
105
+ } catch (err) {
106
+ console.error("[products] listing query failed:", err);
107
+ }
108
+ ---
109
+ ```
110
+
111
+ Safe fallbacks: an empty array, `Astro.redirect("/404")`, or a graceful placeholder. Never let an SDK error crash the page.
112
+
113
+ ### Fire-and-forget analytics
114
+
115
+ **`trackEvent` calls MUST NOT throw up the call stack and MUST NOT block user-facing flow.** Analytics failures (blocked by adblock, network error, invalid payload) are acceptable; a broken cart add or product click handler is not. Import `trackEvent` from `../utils/analytics` and call it directly — the shared util swallows its own errors. Do not `await` it and do not wrap it in `try/await` expecting it to retry. If a component wraps analytics alongside a business-critical call, put the business call first:
116
+
117
+ ```ts
118
+ await currentCart.addToCurrentCart({ … });
119
+ trackEvent("AddToCart", { … }); // fires after; can't break the cart if it fails
120
+ ```
121
+
122
+ ### Styling
123
+
124
+ The full styling contract (tokens-as-utilities default, when global semantic classes are appropriate, co-located styles for one-offs, the always-required class list) lives in `STYLING.md`. Read it before any `components` / `pages` work — it's the canonical source. Do not reinvent class names; do not duplicate rules across files.
125
+
126
+ ## Style conventions
127
+
128
+ - **camelCase for identifiers, kebab-case for filenames, PascalCase for components.** Example: `ProductCard.astro`, `queryBlogPosts` function, `cart-updated` event.
129
+ - **No inline styles beyond design-token CSS variables.** `style={{ color: "red" }}` is forbidden; `style={{ color: "var(--color-primary)" }}` is fine.
130
+ - **Tailwind utilities are local to the component.** Don't invent cross-cutting class names. If you need section padding, write `<section class="py-4xl">` — not `<section class="hero-section">`. If you need a flex column with gap, write `class="flex flex-col gap-md"` — not `class="product-card-body"`. If two components need the same look, extract a shared primitive component, not a shared class name. The retained list of legitimate global semantic classes is short and lives in designer `INSTRUCTIONS.md` § "Always-required global semantic classes" — anything outside that list does not belong in `global.css`.
131
+ - **Tailwind v4 `@reference` is mandatory in any scoped CSS that uses `@apply`.** Tailwind v4 isolates `@apply` per file — utilities defined in the main entry CSS (where `@theme` lives) are NOT visible to `components-*.css` unless that file prepends `@reference "./global.css";` on line 1. Without it, `wix cli build` fails with `Cannot apply unknown utility class 'gap-sm' …`. **`tsc` and `astro check` both pass clean** — only the bundler catches the regression. If your scope writes a `components-<vertical>.css` that uses `@apply` with theme tokens (e.g., `@apply gap-sm font-display text-sm`), the file MUST start with:
132
+ ```css
133
+ @reference "./global.css";
134
+ ```
135
+ Without it, the build breaks at release time even though `tsc` and `astro check` pass clean — only the bundler catches it.
136
+ - **Fail loud, never silently.** If data is missing, a required field is absent, or an MCP call returns an unexpected shape, return `status: "failed"` with details. Do not invent placeholders or swallow errors.
137
+
138
+ ## Return contract
139
+
140
+ Every agent ends its message with a fenced JSON block per `RETURN_CONTRACT.md`. The JSON MUST be the last content in the message — no trailing prose. Timing fields are NOT included (the orchestrator captures timing via runtime `duration_ms`).
141
+
142
+ ## Common failure modes
143
+
144
+ | Wrong | Right |
145
+ |---|---|
146
+ | Reading references for scopes other than the declared `Scope:` | Read only your scope's references |
147
+ | Querying MCP from a `components` or `pages` scope | Components/Pages are frontend-only; use `seeded` data from `site.json` |
148
+ | Re-querying when `site.json.seeded.<vertical>` is missing | Fail fast with `SITE_JSON_INCOMPLETE` — the seeder didn't complete |
149
+ | Writing `.wix/site.json` from a seeder | Seeders return data; orchestrator writes site.json |
150
+ | Inventing class names for layout/spacing/typography (`.productCard`, `.heroSection`) | Tailwind utilities derived from `@theme` tokens (`class="flex flex-col gap-md"`, `class="py-4xl"`). For one-off page decoration, co-located `<style>` block. |
151
+ | Removing a marker after inserting at it | Marker stays; other verticals may contribute after you |
152
+ | Trailing narrative prose after the return JSON | JSON block must be the last content |
153
+ | Fabricated timestamps in the return JSON | Do not include timing fields — orchestrator captures them |
154
+ | Inline `style="color: red"` | Use design tokens: `style="color: var(--color-primary)"` |
155
+ | Creating a new cross-cutting class name | Extract a shared primitive component instead |
@@ -0,0 +1,105 @@
1
+ # Wix MCP Tool Prefix — Discovery & Propagation
2
+
3
+ Wix MCP tools are exposed under one of two prefixes depending on how the user installed the integration:
4
+
5
+ | Install mode | Prefix |
6
+ |---|---|
7
+ | **Plugin** (typical for end users) | `mcp__plugin_<plugin-name>_wix-mcp-remote__` (e.g. `mcp__plugin_wix-headless_wix-mcp-remote__WixREADME`) |
8
+ | **Direct MCP server** | `mcp__wix-mcp-remote__` (e.g. `mcp__wix-mcp-remote__WixREADME`) |
9
+
10
+ Tool **suffixes** are identical in both modes: `WixREADME`, `CallWixSiteAPI`, `ListWixSites`, `ManageWixSite`, `SearchWixHeadlessDocumentation`, `SearchWixSDKDocumentation`, `SearchWixRESTDocumentation`, `BrowseWixRESTDocsMenu`, `ReadFullDocsArticle`, `ReadFullDocsMethodSchema`. Only the prefix differs.
11
+
12
+ Documentation in this plugin uses the canonical short form (`mcp__wix-mcp-remote__<suffix>`) for readability — substitute the discovered prefix at runtime.
13
+
14
+ ---
15
+
16
+ ## Discovery — entry-point skills only, once per session
17
+
18
+ The entry-point skill (`wix-headless`) MUST run this before any other MCP call:
19
+
20
+ 1. Use whatever tool-discovery primitive your runtime provides to look up `WixREADME`.
21
+ 2. From the returned tool name, strip the trailing `WixREADME` — what remains (ending in `wix-mcp-remote__`) is the **MCP prefix**. Examples:
22
+ - Returned name `mcp__plugin_wix_wix-mcp-remote__WixREADME` → prefix `mcp__plugin_wix_wix-mcp-remote__`
23
+ - Returned name `mcp__wix-mcp-remote__WixREADME` → prefix `mcp__wix-mcp-remote__`
24
+ 3. Call `<prefix>WixREADME` once to verify connectivity.
25
+ 4. **If discovery returns no match, or the verify call fails:** stop and tell the user:
26
+ > *"Wix MCP tools are not available in this session. Please ensure the Wix MCP server is connected (or that the Wix plugin is enabled), then restart your client."*
27
+ 5. Hold the discovered prefix in working memory for the rest of the session — use it for every MCP call AND pass it into every subagent prompt.
28
+
29
+ ---
30
+
31
+ ## Propagation to subagents
32
+
33
+ Subagents (every Phase 1 / Phase 2 / Phase 3 / Phase 4 implementer) are isolated workers — they see only the prompt their parent gave them, not the parent's session state. Every subagent prompt MUST include this line verbatim near the top:
34
+
35
+ ```
36
+ MCP tool prefix: <discovered prefix>
37
+ Use this prefix for every Wix MCP call. Example: <prefix>CallWixSiteAPI, <prefix>WixREADME.
38
+ ```
39
+
40
+ Without this line the subagent will try the canonical short form and fail in plugin mode.
41
+
42
+ ---
43
+
44
+ ## `CallWixSiteAPI` call conventions — read before the first call
45
+
46
+ `CallWixSiteAPI` is the most error-prone tool in this plugin. Two failure modes recur; avoid both:
47
+
48
+ **1. Missing required wrapper params.** The tool requires — in addition to `method`, `url`, `body` — these wrapper fields:
49
+
50
+ - `siteId` — from `wix.config.json` (or the parent prompt)
51
+ - `reason` — one-sentence human reason, e.g. `"Install Wix Stores app for <brand>"`
52
+ - `sourceDocUrl` — the Wix docs URL the recipe is from, e.g. `"https://dev.wix.com/docs/picasso/wix-ai-docs/recipes-v2/manage/platform/recipe-install-wix-apps"`
53
+
54
+ **2. `body` passed as a stringified JSON.** `body` is typed `anyOf: [object, array]` — pass it as a real structured value. `body: "{\"tenant\":…}"` will be rejected with `Expected object, received string`.
55
+
56
+ **The safe pattern — follow on the first `CallWixSiteAPI` of each session:**
57
+
58
+ 1. **Load the schema** via your runtime's tool-discovery primitive (the orchestrator's Step 0 already did this for the whole session per `<SKILL_ROOT>/references/commands/mcp-bootstrap.md` — only re-load if you hit a tool-not-found error).
59
+ 2. Call with the full shape:
60
+ ```
61
+ <prefix>CallWixSiteAPI(
62
+ siteId: "<siteId from wix.config.json>",
63
+ reason: "<one-sentence reason>",
64
+ sourceDocUrl: "<URL of the Wix docs recipe you're following>",
65
+ method: "POST",
66
+ url: "https://www.wixapis.com/<service>/<path>",
67
+ body: { …as a real object, not a string }
68
+ )
69
+ ```
70
+
71
+ **When you see reference snippets written in prose-HTTP form** (e.g. `CallWixSiteAPI: POST /blog/v3/posts` followed by `body: { … }`), translate them into the full tool-call shape above — the prose form omits the wrapper fields for readability, not because they're optional.
72
+
73
+ ## Defensive fallback — required in every implementer agent
74
+
75
+ If a Wix MCP call returns "tool not found" or the tool name appears unavailable for any reason:
76
+
77
+ 1. Re-discover the tool via your runtime's tool-discovery primitive, looking up the suffix (e.g. `CallWixSiteAPI`).
78
+ 2. Use the discovered tool name and retry the call.
79
+ 3. **Do NOT bail.** Only escalate to the user if discovery itself returns no match.
80
+
81
+ This guards against parents that forgot to pass the prefix and against future prefix-scheme changes.
82
+
83
+ ---
84
+
85
+ ## Prefer bundled reference docs over external doc reads
86
+
87
+ Your agent directory includes `.md` reference files with API recipes, call templates, and error handling tailored to your scope. These are your primary source — they document the exact call patterns, body shapes, and edge cases for your use case.
88
+
89
+ The Wix MCP also exposes documentation tools (`SearchWixRESTDocumentation`, `ReadFullDocsArticle`, `SearchWixSDKDocumentation`, etc.). These are useful when you hit an error or edge case not covered by your reference files. But **prefer your bundled `.md` files first** — each external doc read costs a tool call and 15-30s, and the bundled recipes are already validated for this plugin's flows.
90
+
91
+ **Rule of thumb:** read your reference files → try the documented recipe → only if you get an unexpected error or need an endpoint not covered, fall back to the MCP doc tools.
92
+
93
+ ---
94
+
95
+ ## Absolute paths — never trust CWD-relative instruction locations
96
+
97
+ Subagents launched by the orchestrator run with the project directory as CWD (e.g. `/Users/.../headless-projects/chairloom/`), not the skill root. Your instruction file and its sibling references live **inside the skill**, not in your CWD — e.g. the stores instructions live at `<skill-root>/references/stores/INSTRUCTIONS.md`.
98
+
99
+ **Rule:** every implementer prompt MUST include an `Instruction file (absolute path)` line pointing at the right `INSTRUCTIONS.md`. Read that file and only that path. Then use the absolute paths it lists for sibling references. Never:
100
+
101
+ - Resolve `references/stores/INSTRUCTIONS.md` against your CWD — it doesn't exist there.
102
+ - `Glob **/INSTRUCTIONS.md` or `**/agents/**` to "find" your instructions — that walks the project tree and finds nothing relevant; it's the most expensive failure mode in current runs.
103
+ - Walk up from the project directory looking for the skill root — guess wrong and you'll burn minutes globbing.
104
+
105
+ If your prompt is missing the absolute `Instruction file` line, ask the parent (don't guess). The `wix-headless` skill is responsible for computing and passing this absolute path in every agent-launch prompt (see `references/ORCHESTRATION.md` § "Agent prompt template").
@@ -0,0 +1,97 @@
1
+ # Production Sharp Edges
2
+
3
+ Use this reference when a Wix Headless run touches production release, SEO-controlled root files, favicon behavior, or multi-site orchestration.
4
+
5
+ ## Release Retries
6
+
7
+ `wix release` can hit transient backend/network errors after upload or during publish. Known retryable signals include:
8
+
9
+ - `ECONNRESET`
10
+ - `ETIMEDOUT`
11
+ - `EAI_AGAIN`
12
+ - `STATE_MISMATCH`
13
+ - `temporary system error`
14
+ - `try again shortly`
15
+
16
+ The bundled `scripts/release.sh` retries these known transient release failures. Do not retry build failures; TypeScript, Astro, missing import, and missing module failures are code issues that must be fixed before another release attempt.
17
+
18
+ For batch releases across many projects, prefer releasing failed sites one by one after the current deployment state settles. Parallel release is useful for throughput, but retry serially when Wix reports state-machine errors.
19
+
20
+ ## Reserved Root Paths
21
+
22
+ Wix can intercept root paths before the Astro app serves them. Do not assume files in `public/` or root Astro routes will win for these URLs:
23
+
24
+ - `/robots.txt`
25
+ - `/llms.txt`
26
+ - `/favicon.svg`
27
+
28
+ ### `robots.txt`
29
+
30
+ Use the Wix SEO robots REST endpoint instead of `public/robots.txt`:
31
+
32
+ ```http
33
+ PUT https://www.wixapis.com/promote-seo-robots-server/v2/robots
34
+ ```
35
+
36
+ ```json
37
+ {
38
+ "robotsTxt": {
39
+ "content": "...",
40
+ "default": false,
41
+ "subdomain": "www"
42
+ }
43
+ }
44
+ ```
45
+
46
+ `default: true` resets to Wix's built-in robots file.
47
+
48
+ ### `llms.txt`
49
+
50
+ Use the sibling Wix SEO endpoint instead of `public/llms.txt` or `src/pages/llms.txt.ts`:
51
+
52
+ ```http
53
+ PUT https://www.wixapis.com/promote-seo-robots-server/v2/llms
54
+ ```
55
+
56
+ ```json
57
+ {
58
+ "llmsTxt": {
59
+ "content": "...",
60
+ "default": false,
61
+ "subdomain": "www"
62
+ }
63
+ }
64
+ ```
65
+
66
+ Do not use `default: true` for custom `llms.txt`; in observed runs it caused `/llms.txt` to return `404`.
67
+
68
+ Wix may mutate `llms.txt` content by:
69
+
70
+ - prepending an H1 from the site/business title
71
+ - wrapping the first submitted line as a tagline blockquote
72
+ - appending AI Agent Access and available MCP tools sections
73
+
74
+ Start custom content with the intended tagline, not another H1.
75
+
76
+ ### Favicon
77
+
78
+ Wix may intercept `/favicon.svg`, even if the project has `public/favicon.svg` or `src/pages/favicon.svg.ts`.
79
+
80
+ When a run needs a custom favicon and no site-favicon API/CLI is available, embed the SVG directly in the document head:
81
+
82
+ ```html
83
+ <link rel="icon" type="image/svg+xml" href="data:image/svg+xml;base64,..." />
84
+ ```
85
+
86
+ Keep the source SVG in `public/favicon.svg` for repository readability, but do not use `/favicon.svg` as the browser-facing href unless a live fetch proves Wix is serving the project asset.
87
+
88
+ ## Verification
89
+
90
+ For production checks, verify the final rendered HTML and edge-controlled files separately:
91
+
92
+ - For favicon: fetch the live page HTML and confirm the `<link rel="icon">` points to the expected data URI or supported favicon URL.
93
+ - For `robots.txt`: fetch `/robots.txt` after the REST update.
94
+ - For `llms.txt`: fetch `/llms.txt` after the REST update and account for Wix-injected sections.
95
+ - For custom domains: check both the Wix-hosted URL and custom domain when available, because domain propagation and redirects can differ.
96
+
97
+ Do not construct URLs by editing the release URL from memory. Use the exact release URL printed by the CLI or the configured custom domain.