@wix/agent-skills 1.14.0 → 1.15.1

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 (268) hide show
  1. package/README.md +12 -1
  2. package/package.json +1 -1
  3. package/skills/README.md +23 -0
  4. package/skills/wix-app/SKILL.md +10 -2
  5. package/skills/wix-app/references/AUTO_PATTERNS_DASHBOARD.md +326 -0
  6. package/skills/wix-app/references/CODE_QUALITY.md +1 -0
  7. package/skills/wix-app/references/CUSTOM_ELEMENT_WIDGET.md +124 -115
  8. package/skills/wix-app/references/DASHBOARD_PAGE.md +3 -0
  9. package/skills/wix-app/references/DATA_COLLECTION.md +5 -3
  10. package/skills/wix-app/references/EDITOR_REACT_COMPONENT.md +25 -9
  11. package/skills/wix-app/references/SITE_PLUGIN.md +1 -1
  12. package/skills/wix-app/references/STORES_VERSIONING.md +9 -211
  13. package/skills/wix-app/references/auto-patterns-dashboard/action-cell.md +115 -0
  14. package/skills/wix-app/references/auto-patterns-dashboard/app-config-structure.md +264 -0
  15. package/skills/wix-app/references/auto-patterns-dashboard/app-context.md +37 -0
  16. package/skills/wix-app/references/auto-patterns-dashboard/bulk-actions.md +86 -0
  17. package/skills/wix-app/references/auto-patterns-dashboard/collection-page-actions.md +119 -0
  18. package/skills/wix-app/references/auto-patterns-dashboard/collection-page.md +103 -0
  19. package/skills/wix-app/references/auto-patterns-dashboard/custom-actions-override.md +76 -0
  20. package/skills/wix-app/references/auto-patterns-dashboard/custom-columns-override.md +82 -0
  21. package/skills/wix-app/references/auto-patterns-dashboard/custom-components-override.md +89 -0
  22. package/skills/wix-app/references/auto-patterns-dashboard/custom-header-override.md +124 -0
  23. package/skills/wix-app/references/auto-patterns-dashboard/custom-sections-override.md +91 -0
  24. package/skills/wix-app/references/auto-patterns-dashboard/custom-slots-override.md +71 -0
  25. package/skills/wix-app/references/auto-patterns-dashboard/entity-page-actions.md +70 -0
  26. package/skills/wix-app/references/auto-patterns-dashboard/entity-page-view-actions.md +73 -0
  27. package/skills/wix-app/references/auto-patterns-dashboard/entity-page.md +98 -0
  28. package/skills/wix-app/references/auto-patterns-dashboard/example-patterns.json +278 -0
  29. package/skills/wix-app/references/auto-patterns-dashboard/pages-configuration.md +94 -0
  30. package/skills/wix-app/references/auto-patterns-dashboard/resolved-action.md +43 -0
  31. package/skills/wix-app/references/auto-patterns-dashboard/sdk-utilities.md +66 -0
  32. package/skills/wix-app/references/auto-patterns-dashboard/views.md +76 -0
  33. package/skills/wix-app/references/backend-event/COMMON-EVENTS.md +5 -0
  34. package/skills/wix-app/references/editor-react-component/ACCESSIBILITY.md +1 -14
  35. package/skills/wix-app/references/editor-react-component/ANIMATED-COMPONENTS.md +151 -0
  36. package/skills/wix-app/references/editor-react-component/COMPONENT-API.md +54 -29
  37. package/skills/wix-app/references/editor-react-component/COMPONENT-CONFIGURATION.md +2 -2
  38. package/skills/wix-app/references/editor-react-component/COMPONENT-PREVIEW.md +57 -0
  39. package/skills/wix-app/references/editor-react-component/CSS-GUIDELINES.md +23 -105
  40. package/skills/wix-app/references/editor-react-component/DESIGN-STATES.md +127 -0
  41. package/skills/wix-app/references/editor-react-component/PARTS.md +2 -1
  42. package/skills/wix-app/references/editor-react-component/REACT-GUIDELINES.md +18 -16
  43. package/skills/wix-app/references/editor-react-component/REACT-PATTERNS.md +25 -53
  44. package/skills/wix-app/references/stores/CATEGORIES.md +22 -0
  45. package/skills/wix-app/references/stores/GET_PRODUCT.md +99 -0
  46. package/skills/wix-app/references/stores/INVENTORY.md +37 -0
  47. package/skills/wix-app/references/stores/QUERY.md +87 -0
  48. package/skills/wix-app/references/stores/WRITE.md +55 -0
  49. package/skills/wix-app/scripts/generate-auto-patterns.js +510 -0
  50. package/skills/wix-auth/SKILL.md +12 -0
  51. package/skills/wix-auth/references/device-flow.md +140 -0
  52. package/skills/wix-docs/SKILL.md +188 -0
  53. package/skills/wix-docs/references/API_SPEC_SEARCH.md +213 -0
  54. package/skills/wix-docs/references/EXTRACTING.md +120 -0
  55. package/skills/wix-headless/SKILL.md +89 -130
  56. package/skills/wix-headless/entry/bootstrap.mjs +93 -0
  57. package/skills/wix-headless/entry/skill.md +76 -0
  58. package/skills/wix-headless/references/AI_FEATURES.md +178 -0
  59. package/skills/wix-headless/references/CAPABILITIES.md +86 -0
  60. package/skills/wix-headless/references/DISCOVERY.md +34 -56
  61. package/skills/wix-headless/references/DOC_DISCOVERY.md +37 -0
  62. package/skills/wix-headless/references/FEEDBACK.md +129 -0
  63. package/skills/wix-headless/references/IMAGE_GENERATION.md +69 -0
  64. package/skills/wix-headless/references/SDK_HANDOFF.md +99 -0
  65. package/skills/wix-headless/references/SEED.md +45 -187
  66. package/skills/wix-headless/references/SETUP.md +32 -103
  67. package/skills/wix-headless/references/astro.md +98 -0
  68. package/skills/wix-headless/references/inline-recipes/how-to-code-a-blog.md +196 -0
  69. package/skills/wix-headless/references/inline-recipes/how-to-code-a-store.md +236 -0
  70. package/skills/wix-headless/references/inline-recipes/how-to-code-bookings.md +279 -0
  71. package/skills/wix-headless/references/inline-recipes/how-to-code-cms.md +163 -0
  72. package/skills/wix-headless/references/inline-recipes/how-to-code-events.md +203 -0
  73. package/skills/wix-headless/references/inline-recipes/how-to-code-forms.md +222 -0
  74. package/skills/wix-headless/references/inline-recipes/how-to-code-members-astro.md +124 -0
  75. package/skills/wix-headless/references/inline-recipes/how-to-code-members-custom-login.md +160 -0
  76. package/skills/wix-headless/references/inline-recipes/how-to-code-members-non-astro.md +118 -0
  77. package/skills/wix-headless/references/inline-recipes/how-to-code-portfolio.md +132 -0
  78. package/skills/wix-headless/references/inline-recipes/how-to-code-pricing-plans.md +124 -0
  79. package/skills/wix-headless/references/inline-recipes/how-to-code-restaurant-orders.md +188 -0
  80. package/skills/wix-headless/references/inline-recipes/how-to-code-restaurant-reservations.md +213 -0
  81. package/skills/wix-headless/references/inline-recipes/how-to-code-restaurants.md +161 -0
  82. package/skills/wix-headless/references/inline-recipes/setup-blog.md +175 -0
  83. package/skills/wix-headless/references/inline-recipes/setup-bookings.md +232 -0
  84. package/skills/wix-headless/references/inline-recipes/setup-cms.md +200 -0
  85. package/skills/wix-headless/references/inline-recipes/setup-events.md +196 -0
  86. package/skills/wix-headless/references/inline-recipes/setup-forms.md +174 -0
  87. package/skills/wix-headless/references/inline-recipes/setup-online-store.md +192 -0
  88. package/skills/wix-headless/references/inline-recipes/setup-portfolio.md +155 -0
  89. package/skills/wix-headless/references/inline-recipes/setup-pricing-plans.md +229 -0
  90. package/skills/wix-headless/references/inline-recipes/setup-restaurant-experiences.md +73 -0
  91. package/skills/wix-headless/references/inline-recipes/setup-restaurant-orders.md +197 -0
  92. package/skills/wix-headless/references/inline-recipes/setup-restaurant-reservations.md +136 -0
  93. package/skills/wix-headless/references/inline-recipes/setup-restaurants.md +152 -0
  94. package/skills/wix-headless/references/managed/AUTHENTICATION.md +57 -0
  95. package/skills/wix-headless/references/managed/CONNECT.md +74 -0
  96. package/skills/wix-headless/references/managed/CREATE.md +130 -0
  97. package/skills/wix-headless/references/managed/DEPLOYMENT.md +79 -0
  98. package/skills/wix-headless/references/non-astro.md +59 -0
  99. package/skills/wix-headless/references/self-managed/AUTHENTICATION.md +22 -0
  100. package/skills/wix-headless/references/self-managed/DEPLOYMENT.md +15 -0
  101. package/skills/wix-headless/references/stripe/AUTHENTICATION.md +55 -0
  102. package/skills/wix-headless/references/stripe/DEPLOYMENT.md +71 -0
  103. package/skills/wix-manage/SKILL.md +29 -3
  104. package/skills/wix-manage/references/analytics/query-site-analytics.md +298 -0
  105. package/skills/wix-manage/references/app-installation/install-wix-apps.md +3 -0
  106. package/skills/wix-manage/references/bookings/create-and-update-booking-services.md +1 -1
  107. package/skills/wix-manage/references/bookings/create-booking-service-from-prompt.md +6 -5
  108. package/skills/wix-manage/references/bookings/create-course-service.md +30 -5
  109. package/skills/wix-manage/references/bookings/diagnose-availability-issues.md +299 -0
  110. package/skills/wix-manage/references/cms/cms-schema-management.md +6 -0
  111. package/skills/wix-manage/references/get-paid/how-to-setup-wix-payments.md +30 -7
  112. package/skills/wix-manage/references/marketing/create-and-publish-social-post.md +517 -0
  113. package/skills/wix-manage/references/marketing/generate-and-publish-marketing-plan.md +218 -0
  114. package/skills/wix-manage/references/rich-content/author-ricos-rich-content.md +249 -0
  115. package/skills/wix-manage/references/sites/site-import.md +270 -0
  116. package/skills/wix-manage/references/stores/create-product-from-image.md +8 -6
  117. package/skills/wix-manage/references/stores/create-product-with-options-catalog-v3.md +57 -0
  118. package/skills/wix-vibe-headless/SKILL.md +142 -0
  119. package/skills/wix-vibe-headless/platforms/README.md +22 -0
  120. package/skills/wix-vibe-headless/platforms/base44.md +142 -0
  121. package/skills/wix-vibe-headless/platforms/generic.md +87 -0
  122. package/skills/wix-vibe-headless/references/blog/INSTRUCTIONS.md +128 -0
  123. package/skills/wix-vibe-headless/references/blog/wix-blog.js +217 -0
  124. package/skills/wix-vibe-headless/references/bookings/INSTRUCTIONS.md +157 -0
  125. package/skills/wix-vibe-headless/references/bookings/wix-bookings-checkout.js +147 -0
  126. package/skills/wix-vibe-headless/references/bookings/wix-bookings-services.js +217 -0
  127. package/skills/wix-vibe-headless/references/cms/INSTRUCTIONS.md +154 -0
  128. package/skills/wix-vibe-headless/references/cms/wix-cms.js +186 -0
  129. package/skills/wix-vibe-headless/references/events/INSTRUCTIONS.md +142 -0
  130. package/skills/wix-vibe-headless/references/events/wix-events-browse.js +136 -0
  131. package/skills/wix-vibe-headless/references/events/wix-events-registration.js +187 -0
  132. package/skills/wix-vibe-headless/references/members/INSTRUCTIONS.md +211 -0
  133. package/skills/wix-vibe-headless/references/members/wix-members-auth.js +387 -0
  134. package/skills/wix-vibe-headless/references/portfolio/INSTRUCTIONS.md +111 -0
  135. package/skills/wix-vibe-headless/references/portfolio/wix-portfolio.js +223 -0
  136. package/skills/wix-vibe-headless/references/pricing-plans/INSTRUCTIONS.md +127 -0
  137. package/skills/wix-vibe-headless/references/pricing-plans/wix-pricing-plans.js +157 -0
  138. package/skills/wix-vibe-headless/references/restaurants/INSTRUCTIONS.md +138 -0
  139. package/skills/wix-vibe-headless/references/restaurants/wix-restaurants-menu.js +224 -0
  140. package/skills/wix-vibe-headless/references/restaurants/wix-restaurants-ordering.js +156 -0
  141. package/skills/wix-vibe-headless/references/restaurants/wix-restaurants-reservations.js +107 -0
  142. package/skills/wix-vibe-headless/references/shared/wix-client.js +186 -0
  143. package/skills/wix-vibe-headless/references/storefront/INSTRUCTIONS.md +164 -0
  144. package/skills/wix-vibe-headless/references/storefront/wix-store-cart.js +147 -0
  145. package/skills/wix-vibe-headless/references/storefront/wix-store-catalog.js +146 -0
  146. package/skills/wix-headless/references/BUILD-astro.md +0 -253
  147. package/skills/wix-headless/references/BUILD-own-build.md +0 -167
  148. package/skills/wix-headless/references/BUILD.md +0 -105
  149. package/skills/wix-headless/references/DESIGN_SYSTEM.md +0 -165
  150. package/skills/wix-headless/references/DISCOVERY-connect.md +0 -55
  151. package/skills/wix-headless/references/DISCOVERY-create.md +0 -238
  152. package/skills/wix-headless/references/PLAN-connect.md +0 -19
  153. package/skills/wix-headless/references/PLAN-create.md +0 -17
  154. package/skills/wix-headless/references/PLAN.md +0 -92
  155. package/skills/wix-headless/references/astro/blog/BLOG_PAGES.md +0 -300
  156. package/skills/wix-headless/references/astro/blog/BLOG_SETUP.md +0 -218
  157. package/skills/wix-headless/references/astro/bookings/COMPONENTS.md +0 -45
  158. package/skills/wix-headless/references/astro/bookings/SERVICES_PAGES.md +0 -77
  159. package/skills/wix-headless/references/astro/cms/CMS_FOUNDATIONS.md +0 -214
  160. package/skills/wix-headless/references/astro/cms/FAQ_KNOWLEDGE_BASE.md +0 -231
  161. package/skills/wix-headless/references/astro/cms/PORTFOLIO.md +0 -453
  162. package/skills/wix-headless/references/astro/cms/RESOURCE_LIBRARY.md +0 -354
  163. package/skills/wix-headless/references/astro/cms/TEAM_DIRECTORY.md +0 -299
  164. package/skills/wix-headless/references/astro/designer/INSTRUCTIONS.md +0 -351
  165. package/skills/wix-headless/references/astro/ecom/CART_PAGES.md +0 -119
  166. package/skills/wix-headless/references/astro/ecom/CART_WIRING.md +0 -103
  167. package/skills/wix-headless/references/astro/ecom/COMPONENTS_CSS.md +0 -132
  168. package/skills/wix-headless/references/astro/forms/CONTACT_FORM.md +0 -463
  169. package/skills/wix-headless/references/astro/gift-cards/COMPONENTS.md +0 -119
  170. package/skills/wix-headless/references/astro/gift-cards/PAGES.md +0 -129
  171. package/skills/wix-headless/references/astro/stores/BACK_IN_STOCK.md +0 -178
  172. package/skills/wix-headless/references/astro/stores/CATEGORY_PAGES.md +0 -85
  173. package/skills/wix-headless/references/astro/stores/COMPONENTS_CSS.md +0 -129
  174. package/skills/wix-headless/references/astro/stores/HOME_AND_NAV.md +0 -229
  175. package/skills/wix-headless/references/astro/stores/PRODUCT_PAGES.md +0 -215
  176. package/skills/wix-headless/references/astro/stores/SHARED_WIRING.md +0 -165
  177. package/skills/wix-headless/references/astro/templates/Layout.astro +0 -132
  178. package/skills/wix-headless/references/astro/templates/astro.config.mjs +0 -41
  179. package/skills/wix-headless/references/astro/templates/bookings/AvailabilityCalendar.tsx +0 -374
  180. package/skills/wix-headless/references/astro/templates/bookings/BookingForm.tsx +0 -136
  181. package/skills/wix-headless/references/astro/templates/bookings/SeoTags.astro +0 -25
  182. package/skills/wix-headless/references/astro/templates/bookings/ServiceBookingFlow.tsx +0 -71
  183. package/skills/wix-headless/references/astro/templates/bookings/ServiceCard.astro +0 -54
  184. package/skills/wix-headless/references/astro/templates/bookings/booking-confirmation.astro +0 -49
  185. package/skills/wix-headless/references/astro/templates/bookings/bookingDriver.ts +0 -245
  186. package/skills/wix-headless/references/astro/templates/bookings/components-bookings.css +0 -424
  187. package/skills/wix-headless/references/astro/templates/bookings/services/[slug].astro +0 -176
  188. package/skills/wix-headless/references/astro/templates/bookings/services/index.astro +0 -181
  189. package/skills/wix-headless/references/astro/templates/ecom/CartBadge.tsx +0 -84
  190. package/skills/wix-headless/references/astro/templates/ecom/CartView.tsx +0 -543
  191. package/skills/wix-headless/references/astro/templates/ecom/cart.astro +0 -13
  192. package/skills/wix-headless/references/astro/templates/ecom/components-ecom.css +0 -302
  193. package/skills/wix-headless/references/astro/templates/ecom/discounts.ts +0 -71
  194. package/skills/wix-headless/references/astro/templates/ecom/thank-you.astro +0 -24
  195. package/skills/wix-headless/references/astro/templates/gift-cards/GiftCardPurchase.tsx +0 -172
  196. package/skills/wix-headless/references/astro/templates/gift-cards/_home-teaser-snippet.astro +0 -42
  197. package/skills/wix-headless/references/astro/templates/gift-cards/_nav-snippet.astro +0 -11
  198. package/skills/wix-headless/references/astro/templates/gift-cards/components-gift-cards.css +0 -220
  199. package/skills/wix-headless/references/astro/templates/gift-cards/gift-cards.astro +0 -51
  200. package/skills/wix-headless/references/astro/templates/gift-cards/gift-cards.ts +0 -75
  201. package/skills/wix-headless/references/astro/templates/global.css +0 -288
  202. package/skills/wix-headless/references/astro/templates/stores/AddToCartButton.tsx +0 -77
  203. package/skills/wix-headless/references/astro/templates/stores/BackInStockForm.tsx +0 -176
  204. package/skills/wix-headless/references/astro/templates/stores/CategoryRail.astro +0 -69
  205. package/skills/wix-headless/references/astro/templates/stores/ProductCard.astro +0 -79
  206. package/skills/wix-headless/references/astro/templates/stores/ProductPurchase.tsx +0 -397
  207. package/skills/wix-headless/references/astro/templates/stores/SeoTags.astro +0 -21
  208. package/skills/wix-headless/references/astro/templates/stores/back-in-stock.ts +0 -67
  209. package/skills/wix-headless/references/astro/templates/stores/categories.ts +0 -155
  210. package/skills/wix-headless/references/astro/templates/stores/category/[slug].astro +0 -130
  211. package/skills/wix-headless/references/astro/templates/stores/components-stores.css +0 -400
  212. package/skills/wix-headless/references/astro/templates/stores/products/[slug].astro +0 -128
  213. package/skills/wix-headless/references/astro/templates/stores/products/index.astro +0 -101
  214. package/skills/wix-headless/references/blog/BLOG_CONTENT.md +0 -161
  215. package/skills/wix-headless/references/blog/INSTRUCTIONS.md +0 -32
  216. package/skills/wix-headless/references/bookings/FLOW.md +0 -246
  217. package/skills/wix-headless/references/bookings/INSTRUCTIONS.md +0 -95
  218. package/skills/wix-headless/references/bookings/SERVICES_DATA.md +0 -355
  219. package/skills/wix-headless/references/cms/CMS_FOUNDATIONS.md +0 -176
  220. package/skills/wix-headless/references/cms/INSTRUCTIONS.md +0 -71
  221. package/skills/wix-headless/references/commands/known-apps.json +0 -6
  222. package/skills/wix-headless/references/custom/CONNECTION_PLAN.md +0 -142
  223. package/skills/wix-headless/references/custom/INSTRUCTIONS.md +0 -88
  224. package/skills/wix-headless/references/custom/blog/WIRING.md +0 -52
  225. package/skills/wix-headless/references/custom/bookings/WIRING.md +0 -197
  226. package/skills/wix-headless/references/custom/cms/WIRING.md +0 -97
  227. package/skills/wix-headless/references/custom/ecom/WIRING.md +0 -67
  228. package/skills/wix-headless/references/custom/forms/WIRING.md +0 -101
  229. package/skills/wix-headless/references/custom/stores/WIRING.md +0 -80
  230. package/skills/wix-headless/references/ecom/INSTRUCTIONS.md +0 -59
  231. package/skills/wix-headless/references/forms/INSTRUCTIONS.md +0 -43
  232. package/skills/wix-headless/references/gift-cards/INSTRUCTIONS.md +0 -51
  233. package/skills/wix-headless/references/images/INSTRUCTIONS.md +0 -357
  234. package/skills/wix-headless/references/seed-recipes.md +0 -49
  235. package/skills/wix-headless/references/shared/AGENTS_MD.md +0 -47
  236. package/skills/wix-headless/references/shared/AUTHENTICATION.md +0 -108
  237. package/skills/wix-headless/references/shared/BUILD_NOISE.md +0 -8
  238. package/skills/wix-headless/references/shared/DESIGN_MD.md +0 -84
  239. package/skills/wix-headless/references/shared/DOCS_SEARCH.md +0 -41
  240. package/skills/wix-headless/references/shared/IMAGE_GENERATION.md +0 -186
  241. package/skills/wix-headless/references/shared/IMPLEMENTER.md +0 -206
  242. package/skills/wix-headless/references/shared/PRODUCTION_SHARP_EDGES.md +0 -97
  243. package/skills/wix-headless/references/shared/RETURN_CONTRACT.md +0 -143
  244. package/skills/wix-headless/references/shared/STYLING.md +0 -140
  245. package/skills/wix-headless/references/stores/INSTRUCTIONS.md +0 -126
  246. package/skills/wix-headless/references/stores/PRODUCT_CATALOG_DATA.md +0 -252
  247. package/skills/wix-headless/references/verticals/_schema.json +0 -74
  248. package/skills/wix-headless/references/verticals/_schema.md +0 -95
  249. package/skills/wix-headless/references/verticals/blog.md +0 -31
  250. package/skills/wix-headless/references/verticals/bookings.md +0 -41
  251. package/skills/wix-headless/references/verticals/cms.md +0 -30
  252. package/skills/wix-headless/references/verticals/ecom.md +0 -25
  253. package/skills/wix-headless/references/verticals/forms.md +0 -26
  254. package/skills/wix-headless/references/verticals/gift-cards.md +0 -24
  255. package/skills/wix-headless/references/verticals/stores.md +0 -33
  256. package/skills/wix-headless/scripts/check-manifest.mjs +0 -335
  257. package/skills/wix-headless/scripts/compose.mjs +0 -520
  258. package/skills/wix-headless/scripts/emit-design-tokens.mjs +0 -157
  259. package/skills/wix-headless/scripts/flatten.sh +0 -61
  260. package/skills/wix-headless/scripts/generate-images.mjs +0 -242
  261. package/skills/wix-headless/scripts/patch-decorative-slots.mjs +0 -154
  262. package/skills/wix-headless/scripts/plan-entity-image-waves.mjs +0 -190
  263. package/skills/wix-headless/scripts/scaffold.sh +0 -139
  264. package/skills/wix-headless/scripts/seed-utilities.sh +0 -93
  265. package/skills/wix-headless/scripts/write-decorative-json.mjs +0 -62
  266. package/skills/wix-headless/shared-utilities/analytics.ts +0 -40
  267. package/skills/wix-headless/shared-utilities/ricos.ts +0 -179
  268. package/skills/wix-headless/shared-utilities/wix-image.ts +0 -72
@@ -1,355 +0,0 @@
1
- # Bookings Seed — Services Data
2
-
3
- You are seeding Wix Bookings services for a headless site. Your job:
4
- 1. Mint a site-scoped token once.
5
- 2. **If `intent.bookings.hasStaff` is `true`** — create staff members FIRST (Step 3 below), then pass their `resourceId`s on each service. **Every APPOINTMENT service needs a non-empty `staffMemberIds`** or it's rejected with `MISSING_APPOINTMENT_RESOURCES` — even when `hasStaff` is false you must pass the default **Business Owner** `resourceId` (see § "When hasStaff is false"). (CLASS services don't need a resource at create time.)
6
- 3. Create `intent.bookings.serviceCount` services via the Bookings V2 REST API. When staff exist, pass their `resourceId` values via `staffMemberIds`.
7
- 4. Return all created IDs in the standard return contract.
8
-
9
- > **Order matters.** Steps 3 and 4 in this file are presented in the order you should execute them: staff first (when applicable), then services. The old "services-first then staff-optionally" order fails for APPOINTMENT with `MISSING_APPOINTMENT_RESOURCES`.
10
-
11
- ---
12
-
13
- ## Step 1 — Mint the token
14
-
15
- ```bash
16
- TOKEN=$(npx @wix/cli@latest token --site "<siteId>")
17
- ```
18
-
19
- Cache in subagent scratch. Every subsequent `curl` reuses it. Every call carries:
20
- ```
21
- Authorization: Bearer $TOKEN
22
- wix-site-id: <siteId>
23
- Content-Type: application/json
24
- ```
25
-
26
- ---
27
-
28
- ## Step 2 — Verify Wix Bookings is installed
29
-
30
- Query staff members as an installation check. A successful response (even an empty list) confirms Bookings is installed:
31
-
32
- ```bash
33
- curl -sS -X POST \
34
- -H "Authorization: Bearer $TOKEN" \
35
- -H "wix-site-id: <siteId>" \
36
- -H "Content-Type: application/json" \
37
- -d '{"query":{}}' \
38
- "https://www.wixapis.com/bookings/v1/staff-members/query"
39
- ```
40
-
41
- - **200 OK** → proceed.
42
- - **403 / "Business schedule not found"** → Bookings app is not installed. Return `status: "error"` with the response verbatim. Do not attempt to install it — the orchestrator's Setup phase handles app installation.
43
-
44
- ---
45
-
46
- ## Step 3 — Create staff members (when `intent.bookings.hasStaff` is `true`)
47
-
48
- Execute this step BEFORE Step 4 when staff are required. APPOINTMENT services need at least one resource to exist before they can be created.
49
-
50
- For each staff member to create (derive names from the brand; default to 2 staff):
51
-
52
- ```bash
53
- # Build the payload — only include phone/email when non-empty.
54
- # The V1 staff-members API rejects "" as an invalid email/phone.
55
- curl -sS -X POST \
56
- -H "Authorization: Bearer $TOKEN" \
57
- -H "wix-site-id: <siteId>" \
58
- -H "Content-Type: application/json" \
59
- -d '{
60
- "staffMember": {
61
- "name": "<First Last>",
62
- "description": "<professional bio — 1–2 sentences, brand-appropriate>"
63
- }
64
- }' \
65
- "https://www.wixapis.com/bookings/v1/staff-members"
66
- ```
67
-
68
- > **Do NOT send `"phone": ""` or `"email": ""`** — V1 validates them as format-checked fields and rejects empty strings with `is not a valid email/phone`. Omit the keys entirely when you don't have a real value. If the merchant later wants to populate phone/email, they can do it from the dashboard or via a PATCH.
69
-
70
- **Important:** Staff inherit business working hours at creation time. For a basic seed, this is fine — the merchant can configure custom hours from the dashboard later.
71
-
72
- Save `staffMember.id` and `staffMember.resourceId` from each response. **You will pass the `resourceId` values into the `staffMemberIds` field on each service in Step 4.**
73
-
74
- > **Note:** `staffMemberIds` on services expects `resourceId` values (from `staffMember.resourceId`), NOT `staffMember.id`. Using `staffMember.id` here is the most common cause of "service has no provider" runtime errors.
75
-
76
- > **Do NOT attempt custom working hours setup during seed.** The two-step custom-hours workflow (assignWorkingHoursSchedule + WORKING_HOURS events) is complex and fragile. Default inherited hours are sufficient for an initial build. If you encounter "Business schedule not found", skip staff creation and return a warning in `notes`.
77
-
78
- ### When `hasStaff` is `false`
79
-
80
- For `serviceType: "CLASS"`, no staff/resource is needed at service-creation time — skip this step.
81
-
82
- For `serviceType: "APPOINTMENT"` with `hasStaff: false`, you **still must pass a resource** in `staffMemberIds` — an empty `[]` is **rejected** with `MISSING_APPOINTMENT_RESOURCES` (*"service of type appointment requires at least one staff member or service resource"*). The Wix Bookings app provisions a default **Business Owner** resource at install; query it and pass **its** `resourceId`:
83
-
84
- ```bash
85
- # Get the default Business-Owner resourceId (no staff were created).
86
- curl -sS -X POST -H "Authorization: Bearer $TOKEN" -H "wix-site-id: <siteId>" -H "Content-Type: application/json" \
87
- -d '{"query":{}}' "https://www.wixapis.com/bookings/v1/staff-members/query"
88
- # → take the staffMember named "Business Owner" and use its `resourceId` as the single
89
- # entry in each APPOINTMENT service's `staffMemberIds`.
90
- ```
91
-
92
- (Do **not** rely on `[]` — the default resource does not auto-satisfy the requirement at create time. CLASS services don't need this.)
93
-
94
- ---
95
-
96
- ## Step 3b — Create categories (OPTIONAL — only to surface the catalog category filter)
97
-
98
- A fresh Bookings install has **one** default category ("Our Services"), so the
99
- front-end's category filter bar stays hidden (it shows only when >1 category
100
- exists). Create extra categories **only when the build wants a category filter**
101
- (e.g. `intent.bookings.categories` is set, or several distinct service groups).
102
- Skip this step otherwise — it's not needed for a basic seed.
103
-
104
- ```bash
105
- # Create a category. Returns { category: { id, ... } } — save the id.
106
- curl -sS -X POST \
107
- -H "Authorization: Bearer $TOKEN" -H "wix-site-id: <siteId>" -H "Content-Type: application/json" \
108
- -d '{ "category": { "name": "<Category name, e.g. Massage>" } }' \
109
- "https://www.wixapis.com/bookings/v2/categories"
110
- ```
111
-
112
- Then **assign each service to a category** by including `category` in the Step-4
113
- create payload: `"category": { "id": "<categoryId>" }`. (If a create rejects
114
- `category`, assign it after creation via Update Service — `PATCH
115
- /_api/bookings/v2/services/{id}` with `service.category.id` + the current
116
- `revision` — per the docs' "create a category and connect a service" flow.) A
117
- service can belong to **one** category. Distribute services across 2+ categories
118
- so the filter is meaningful.
119
-
120
- > The front-end reads categories via `categoriesV2.queryCategories().find()` and
121
- > filters services with `filter["category.id"] = { $eq: id }`. No category data →
122
- > no filter bar (graceful).
123
-
124
- ---
125
-
126
- ## Step 3c — Multiple business locations (OPTIONAL — only for a multi-location demo)
127
-
128
- The front-end's location selector auto-skips when the site has ≤1 location, so a
129
- single-location seed needs nothing here (and the booking flow is unaffected).
130
- Create a second business location **only** for a multi-location build
131
- (`intent.bookings.multiLocation`):
132
-
133
- ```bash
134
- # Create a business location. Returns { location: { id, ... } }.
135
- curl -sS -X POST \
136
- -H "Authorization: Bearer $TOKEN" -H "wix-site-id: <siteId>" -H "Content-Type: application/json" \
137
- -d '{ "location": { "name": "<Branch name>", "status": "ACTIVE", "locationType": "BUSINESS",
138
- "address": { "city": "<City>", "country": "<ISO country>" } } }' \
139
- "https://www.wixapis.com/locations/v1/locations"
140
- ```
141
-
142
- Then attach locations to each service's `locations` array on create (Step 4):
143
- `"locations": [ { "type": "BUSINESS", "business": { "id": "<locationId>" } }, … ]`.
144
-
145
- > **Caveat (verified-behavior limitation, not a bug):** filtering *availability*
146
- > by location also depends on each staff member's **working-hours location
147
- > coverage** (the `STAFF_WORKING_HOURS_LOCATIONS` setting). Seeding that reliably
148
- > is as fragile as custom working hours (see Step 3's warning), so for a seed,
149
- > create the location + attach it to services to exercise the **catalog** location
150
- > filter, and configure per-location staff hours from the Bookings dashboard if you
151
- > need per-location availability to differ. The selector + service filtering work
152
- > from the seed alone; per-location *slot* differences need the dashboard step.
153
-
154
- ---
155
-
156
- ## Step 4 — Create services (Services V2 API)
157
-
158
- **Endpoint:** `POST https://www.wixapis.com/_api/bookings/v2/services`
159
-
160
- > **V2 payload is flat — NOT nested under `info`.** Fields are `name`, `description`, `tagLine` at the top level of the `service` object. The V1 shape (`info.name`, `info.description`) is rejected by V2. Price uses `value`, not `amount`.
161
-
162
- For each service to create (derive names, descriptions, and prices from `brand` + `intent.bookings`):
163
-
164
- ```bash
165
- curl -sS -X POST \
166
- -H "Authorization: Bearer $TOKEN" \
167
- -H "wix-site-id: <siteId>" \
168
- -H "Content-Type: application/json" \
169
- -d '{
170
- "service": {
171
- "type": "<APPOINTMENT|CLASS>",
172
- "name": "<service name>",
173
- "description": "<brand-appropriate description>",
174
- "tagLine": "<short tagline>",
175
- "defaultCapacity": 1,
176
- "onlineBooking": {
177
- "enabled": true,
178
- "requireManualApproval": false,
179
- "allowMultipleRequests": false
180
- },
181
- "schedule": {
182
- "availabilityConstraints": {
183
- "sessionDurations": [<duration as integer, e.g. 60>]
184
- }
185
- },
186
- "payment": {
187
- "rateType": "FIXED",
188
- "fixed": {
189
- "price": {
190
- "value": "<price as string, e.g. \"75.00\">",
191
- "currency": "USD"
192
- }
193
- },
194
- "options": {
195
- "online": true,
196
- "inPerson": false,
197
- "deposit": false,
198
- "pricingPlan": false
199
- }
200
- },
201
- "locations": [
202
- {
203
- "type": "BUSINESS"
204
- }
205
- ],
206
- "staffMemberIds": [<resourceId values — staff from Step 3, OR the default Business-Owner resourceId when hasStaff is false. NEVER [] for APPOINTMENT — it 400s with MISSING_APPOINTMENT_RESOURCES>]
207
- }
208
- }' \
209
- "https://www.wixapis.com/_api/bookings/v2/services"
210
- ```
211
-
212
- > **`locations.type` enum:** the valid values are `UNKNOWN_LOCATION_TYPE`, `CUSTOM`, `BUSINESS`, and `CUSTOMER`. Use `"BUSINESS"` for "at the business address" (the seed default). Do NOT use `"OWNER_BUSINESS"` here — that string IS valid for `createBooking.bookedEntity.slot.location.locationType` on the bookings endpoint, but the **services** endpoint rejects it. Same field name, different enum.
213
-
214
- > **`staffMemberIds`:** pass `resourceId` values (not staffMember `id` values). For APPOINTMENT this array must be **non-empty** — when `hasStaff` is `false`, pass the default **Business Owner** `resourceId` (query it per § "When hasStaff is false"); `[]` is rejected with `MISSING_APPOINTMENT_RESOURCES` (verified live). CLASS services don't require it.
215
-
216
- **Response shape:**
217
- ```json
218
- {
219
- "service": {
220
- "id": "<uuid>",
221
- "name": "<name>",
222
- "description": "<description>",
223
- "mainSlug": { "name": "<url-slug>", "custom": false },
224
- "supportedSlugs": [{ "name": "<url-slug>", "custom": false }],
225
- "type": "APPOINTMENT",
226
- "payment": { ... },
227
- "schedule": { ... }
228
- }
229
- }
230
- ```
231
-
232
- > **Slug:** Extract from `service.mainSlug.name`. If absent, derive from the service name: lowercase, replace spaces and non-alphanumeric chars with hyphens, deduplicate hyphens.
233
-
234
- ### Service creation guidelines
235
-
236
- - **Count**: Create exactly `intent.bookings.serviceCount` services (default 3 when not specified).
237
- - **Type**: Use `"APPOINTMENT"` for 1-on-1 services (the default); use `"CLASS"` when `intent.bookings.serviceType === "CLASS"`. For `CLASS`, set `defaultCapacity` to the max participants (e.g. `20`) instead of `1`.
238
-
239
- > **⚠️ CLASS services need scheduled sessions before anyone can sign up.** Creating a CLASS service does **not** create any bookable sessions. The front-end lists bookable sessions via `eventTimeSlots.listEventTimeSlots()`, which returns scheduled **session events** — a freshly created CLASS service has none, so its calendar is permanently empty. **For CLASS services you MUST run Step 4b below** to schedule sessions; otherwise the class calendar is a dead end. (APPOINTMENT services don't need this — their bookable times come from staff working hours + `availabilityTimeSlots`.)
240
- - **`sessionDurations`**: Required for APPOINTMENT. An array containing one integer (minutes). Do NOT specify for CLASS or COURSE services.
241
- - **Names + descriptions**: Derive from `brand.description`. Examples: a yoga studio → "60-min Vinyasa Flow" (60 min), "30-min Morning Meditation" (30 min), "90-min Deep Restore" (90 min). A hair salon → "Women's Cut & Style" (60 min, $85), "Men's Haircut" (30 min, $45), "Balayage Color" (120 min, $150). Make them brand-appropriate — not generic.
242
- - **Duration** (integers in minutes): Brand-appropriate. Consultation → 30; standard service → 60; premium/complex → 90–120.
243
- - **Price `value`**: A string, not a number. Brand-appropriate, non-trivial. A budget studio might charge `"25.00"`; a premium clinic `"250.00"`. Default to mid-range when unclear.
244
- - **Currency**: Set `"USD"` unless the brand's locale implies otherwise — **but note the site's business currency wins**: Services V2 silently stores the site-locale currency (e.g. a EUR-locale site stores `EUR` even when you send `USD`). This is not an error; the page templates format from the service's returned `currency`, so display stays correct. Don't fight it.
245
- - **Fire all service creates as a parallel batch** — they are independent calls.
246
-
247
- ### Required fields summary (V2)
248
-
249
- | Field | Required | Notes |
250
- |-------|----------|-------|
251
- | `type` | Yes | `APPOINTMENT`, `CLASS`, or `COURSE` |
252
- | `name` | Yes | Display name |
253
- | `defaultCapacity` | Yes | `1` for APPOINTMENT; participant count for CLASS |
254
- | `onlineBooking.enabled` | Yes | Set to `true` for online booking |
255
- | `payment.rateType` | Yes | `FIXED`, `NO_FEE`, `VARIED`, or `CUSTOM` |
256
- | `payment.options.online` or `payment.options.inPerson` | Yes | At least one must be `true` |
257
- | `schedule.availabilityConstraints.sessionDurations` | APPOINTMENT only | Array with one integer (minutes) |
258
-
259
- ---
260
-
261
- ## Step 4b — Create class sessions (CLASS services only)
262
-
263
- A CLASS service is bookable only once its **schedule** has scheduled session events. Sessions are **Calendar Events V3** (not part of `@wix/bookings`), created via REST. Run this for every service you created with `type: "CLASS"`; skip it entirely for APPOINTMENT.
264
-
265
- **Endpoint:** `POST https://www.wixapis.com/calendar/v3/events`
266
-
267
- You need two things from earlier steps:
268
- - the service's **schedule id** — `service.schedule.id` from the Step 4 create response (every service has one);
269
- - a **resource id** — a CLASS event requires **at least one resource** (`resources` non-empty) or it's rejected. Use a staff `resourceId` from Step 3; if no staff were created, use the default Business-Owner resource's `resourceId` (query `POST /bookings/v1/staff-members/query` with `{"query":{}}` and take the one named `Business Owner`).
270
-
271
- ```bash
272
- # One session. Repeat for several upcoming dates per class (e.g. 3 over the next
273
- # ~2 weeks) so the calendar isn't empty. `localDate` is local time, no `Z`.
274
- curl -sS -X POST \
275
- -H "Authorization: Bearer $TOKEN" -H "wix-site-id: <siteId>" -H "Content-Type: application/json" \
276
- -d '{
277
- "event": {
278
- "scheduleId": "<service.schedule.id>",
279
- "type": "CLASS",
280
- "start": { "localDate": "2026-06-05T09:00:00" },
281
- "end": { "localDate": "2026-06-05T10:00:00" },
282
- "resources": [ { "id": "<staff resourceId>", "permissionRole": "WRITER" } ],
283
- "totalCapacity": 12
284
- }
285
- }' \
286
- "https://www.wixapis.com/calendar/v3/events"
287
- ```
288
-
289
- > **Gotchas (verified against the live API):**
290
- > - `resources[].permissionRole` **must** be `"WRITER"` (or `"COMMENTER"`). Omitting it defaults to `UNKNOWN_ROLE` → `400 "resources.permissionRole must not be UNKNOWN_ROLE"`.
291
- > - `resources` must be **non-empty** for CLASS — a session with no resource is rejected.
292
- > - `start`/`end` use `{ "localDate": "YYYY-MM-DDThh:mm:ss" }` (local, no `Z`); seconds are ignored.
293
- > - For a recurring weekly schedule instead of one-off sessions, add `event.recurrenceRule` (`{ "frequency": "WEEKLY", "interval": 1, "days": ["MONDAY"], "until": { "localDate": "..." } }` — only `WEEKLY` and a **single** day are supported; this creates a `MASTER` event and Wix auto-generates the instances). One-off sessions are simpler and sufficient for a seed.
294
- > - `totalCapacity` defaults to the schedule's `defaultCapacity` if omitted; set it explicitly to the class size.
295
-
296
- Verify by fetching slots the way the front-end does (`eventTimeSlots.listEventTimeSlots({ serviceIds: [id], … })`) or `POST /calendar/v3/events/query` filtered by `scheduleId`. Record each session's event id in your return under `seeded.bookings.services[].sessionEventIds` if you want Phase 4 to deep-link.
297
-
298
- > **Booking-policy toggles (optional, CLASS).** Both live on the default booking policy — get it once via `POST /bookings/v1/booking-policies/query` with body `{"query":{}}` (an empty `{}` body is rejected with `query must not be empty`), then `PATCH /bookings/v1/booking-policies/<id>` with the relevant block + `fieldMask`:
299
- > - **Waitlist** (so a full session offers "join waitlist"): `"waitlistPolicy": { "enabled": true, "capacity": 10, "reservationTimeInMinutes": 10 }`, `fieldMask.paths: ["waitlistPolicy"]`.
300
- > - **Multi-participant** (party size > 1): `"participantsPolicy": { "maxParticipantsPerBooking": <N> }`, `fieldMask.paths: ["participantsPolicy"]`. **Defaults to `1`** — without raising it, the front-end party-size selector lets the user pick >1 but `createBooking` rejects it. Raise it (e.g. `4`) to actually enable multi-participant class booking.
301
- >
302
- > Skip whichever the build doesn't surface.
303
-
304
- ---
305
-
306
- ## Step 5 — Return contract
307
-
308
- **Return this JSON inline as your agent return** (per `references/shared/RETURN_CONTRACT.md`) — do **NOT** write a `.wix/seed-returns/` file; the orchestrator aggregates seeder returns and is the sole writer of `.wix/seeded.json`:
309
-
310
- ```json
311
- {
312
- "phase": "seed-bookings",
313
- "status": "ok",
314
- "seeded": {
315
- "services": [
316
- {
317
- "id": "<uuid>",
318
- "slug": "<mainSlug.name>",
319
- "name": "<name>",
320
- "type": "APPOINTMENT",
321
- "durationMinutes": 60,
322
- "price": "75.00",
323
- "currency": "USD"
324
- }
325
- ],
326
- "staff": [
327
- { "id": "<uuid>", "resourceId": "<uuid>", "name": "<name>" }
328
- ]
329
- },
330
- "recipeCalls": [
331
- { "url": "https://www.wixapis.com/_api/bookings/v2/services", "status": 200 }
332
- ]
333
- }
334
- ```
335
-
336
- - `staff` is an empty array `[]` when `intent.bookings.hasStaff` is false or Step 3 was skipped.
337
- - **For `CLASS` services, schedule sessions in Step 4b** and report them (e.g. `seeded.bookings.services[].sessionEventIds`). Only if Step 4b is skipped or fails, add a `notes` entry so the orchestrator surfaces it: `"notes": ["CLASS sessions not scheduled — add session times in the Bookings dashboard before sign-up works."]`
338
- - On any REST error: set `status: "error"`, include the failing call's response verbatim under `"error"`.
339
-
340
- ---
341
-
342
- ## Common failure modes
343
-
344
- | Failure | Recovery |
345
- |---------|----------|
346
- | 403 on service create | Re-mint token and retry once. If still 403, Bookings app was not installed — return `status: "error"`. |
347
- | 400 `"defaultCapacity is required"` | Add `"defaultCapacity": 1` to the payload (required in V2, not obvious from V1 docs). |
348
- | 400 `"onlineBooking is required"` | Add `"onlineBooking": { "enabled": true }` — required in V2. |
349
- | 400 on `payment.options` | At least one of `online` or `inPerson` must be `true`. Set `"inPerson": true` as fallback. |
350
- | 400 `"sessionDurations is required"` | Add `"schedule": { "availabilityConstraints": { "sessionDurations": [60] } }` for APPOINTMENT types. |
351
- | 400 `MISSING_APPOINTMENT_RESOURCES` on service create | An APPOINTMENT service's `staffMemberIds` must be **non-empty**. Pass the created staff `resourceId`s (Step 3), or — when `hasStaff` is false — the default **Business Owner** `resourceId` (query `/bookings/v1/staff-members/query` with `{"query":{}}`). An empty `[]` always 400s here. |
352
- | 400 enum error on `locations.type` | Use `"BUSINESS"`, not `"OWNER_BUSINESS"`. The services endpoint accepts `UNKNOWN_LOCATION_TYPE`, `CUSTOM`, `BUSINESS`, `CUSTOMER`. `OWNER_BUSINESS` is valid on `createBooking.bookedEntity.slot.location.locationType` only. |
353
- | 400 `is not a valid email/phone` on staff create | Don't send `"phone": ""` or `"email": ""`. Omit the keys entirely when you don't have a real value. |
354
- | `mainSlug` absent in response | Derive slug from `service.name`: lowercase, replace spaces with hyphens, strip non-alphanumeric. |
355
- | Staff create returns "Business schedule not found" | Skip staff creation. Return partial seeded data with `notes: ["Staff creation skipped — business schedule not found; configure via Bookings dashboard"]`. |
@@ -1,176 +0,0 @@
1
- # CMS Foundations — Seeding via `@wix/data` REST (business track)
2
-
3
- The **seeding** half of CMS foundations: create collections and insert + verify sample items via the Wix Data REST API. This is frontend-blind business-track work — a collection and its items are the same regardless of what renders them.
4
-
5
- > **Rendering / page code lives in the astro frontend track.** The service-module template, `@wix/data` SDK query patterns, image resolution, Ricos rendering, and category filtering are **not** here — they are in `<SKILL_ROOT>/references/astro/cms/CMS_FOUNDATIONS.md` (the `pages` scope's doc). This file is consumed by the `seed` scope. The `cms/INSTRUCTIONS.md` router points each scope at the right half.
6
-
7
- ## Collection ID Format (seeding-relevant)
8
-
9
- Native (user-created) CMS collections use **just the collection name** — no namespace prefix (e.g. `"about-content"`, `"faq"`, `"Projects"`). Only Wix App collections use a `<namespace>/<name>` format. Use the exact `id` you create here; verify with `GET /wix-data/v2/collections?fields=id` (standard REST headers from `../shared/AUTHENTICATION.md`). Never guess — the dashboard display name may differ from the ID.
10
-
11
- ## Seeding via REST (Conditional)
12
-
13
- Check whether the collection already has data; seed sample items only if empty. Calls go through `curl` against `wixapis.com` with the site-scoped REST token (see `../shared/AUTHENTICATION.md`) — no SDK, no MCP.
14
-
15
- 1. Query the collection — if items exist, skip seeding
16
- 2. If empty, create the collection and insert sample items via the REST calls below
17
- 3. Design sample data that matches the business type from the functional plan
18
-
19
- ### Create collection (if it doesn't exist)
20
-
21
- ```
22
- REST: POST https://www.wixapis.com/wix-data/v2/collections
23
- body: {
24
- "collection": {
25
- "id": "about-content",
26
- "displayName": "About Content",
27
- "fields": [
28
- { "key": "heading", "displayName": "Heading", "type": "TEXT" },
29
- { "key": "body", "displayName": "Body", "type": "RICH_TEXT" },
30
- { "key": "image", "displayName": "Image", "type": "IMAGE" }
31
- ]
32
- }
33
- }
34
- ```
35
-
36
- ### Insert item WITH field data
37
-
38
- **This is the critical step that must include actual field values.** Creating an item without populating the `data` object results in an empty record — the collection schema exists but the item has no content.
39
-
40
- ```
41
- REST: POST https://www.wixapis.com/wix-data/v2/items
42
- body: {
43
- "dataCollectionId": "about-content",
44
- "dataItem": {
45
- "data": {
46
- "heading": "Our Story",
47
- "body": "<p>Founded on a belief that...</p><p>We source the finest...</p>"
48
- }
49
- }
50
- }
51
- ```
52
-
53
- The response returns the created item's `_id` — collect these for the seed return contract.
54
-
55
- **Every text field must be populated in the `data` object.** Do not create items with empty `data: {}` and expect Phase 2 or the image agent to fill in text fields — they only handle their own scope (pages and images respectively).
56
-
57
- For FAQ items, include both `question` and `answer` plus `sortOrder`:
58
-
59
- ```
60
- REST: POST https://www.wixapis.com/wix-data/v2/items
61
- body: {
62
- "dataCollectionId": "faq",
63
- "dataItem": {
64
- "data": {
65
- "question": "What is your return policy?",
66
- "answer": "We accept returns within 30 days of purchase...",
67
- "sortOrder": 1
68
- }
69
- }
70
- }
71
- ```
72
-
73
- > **Bulk insert (N ≥ 2 items):** use the `wix-manage` skill's recipe — `wix-manage/references/cms/cms-data-items-crud.md` § "Bulk Insert Items" (`POST /wix-data/v2/bulk/items/insert`, up to 1000/call, one `dataCollectionId` per call → fire one bulk call per collection as a parallel batch). It also documents bulk update/patch/delete. Do not hand-roll N single inserts for a multi-item seed.
74
-
75
- ### Verify inserts with a live query (mandatory)
76
-
77
- After inserting all items, **query each collection once** and confirm every field you sent is present in the stored `data`. A POST without errors does NOT prove the content persisted — the API has accepted insert bodies with missing fields before, and the failure is invisible until a human opens the page.
78
-
79
- ```
80
- REST: POST https://www.wixapis.com/wix-data/v2/items/query
81
- body: { "dataCollectionId": "<collection>" }
82
- ```
83
-
84
- For every returned item, confirm its `data` object contains every text field you POSTed (`heading`, `body`, `question`, `answer`, etc.). If any field is missing:
85
-
86
- - Do NOT return `status: "complete"`.
87
- - Re-insert the item (a DELETE then POST is safest — PUT replaces the whole record) and re-verify.
88
- - If re-insert fails twice, return `status: "partial"` with `errors: [{code: "SEED_FIELD_MISSING", collection: "<c>", itemId: "<id>", missingFields: [...]}]`.
89
-
90
- A CMS seeder can return `complete` for an about-content item, then Image Phase 2 silently wipes its `heading` + `body` via a destructive full-record PUT. The verify-after-insert step here plus the read-merge-PUT rule in the images agent makes that class of data loss unreachable.
91
-
92
- ### Seeding with Images
93
-
94
- For use cases with image fields (`photo`, `coverImage`, `galleryImages`),
95
- follow `../shared/IMAGE_GENERATION.md` (Steps 1–2) for Wix AI image
96
- generation and Wix Media import. Image generation goes through the same
97
- CLI-minted REST token as the rest of this skill — do not ask the user for
98
- credentials.
99
-
100
- **Workflow:**
101
-
102
- 1. Seed all items first (text fields only, no images) using `POST /wix-data/v2/items` as shown in § "Insert item WITH field data" above. Every text field must have a value in the `data` object — empty items cause "Content coming soon" placeholder pages.
103
- 2. Run the verify-after-insert query (see § "Verify inserts with a live query" above) before touching images.
104
- 3. Generate images via Wix AI (IMAGE_GENERATION.md Steps 1–2) using the prompt templates from each use-case reference
105
- 4. Attach each image by reading the existing item, merging, and writing the whole record back via PUT. Do NOT use PATCH here — the endpoint expects a JsonPatch `fieldModifications` array and rejects the `{dataItem:{data}}` body. Do NOT PUT with just `{image}` — PUT replaces the entire record and erases heading/body.
106
-
107
- ```
108
- # Step a: read the existing item
109
- REST: POST https://www.wixapis.com/wix-data/v2/items/query
110
- body: {
111
- "dataCollectionId": "CollectionName",
112
- "query": { "filter": { "_id": { "$in": ["{itemId}"] } } }
113
- }
114
-
115
- # Step b: merge image into existing data and PUT the full record
116
- REST: PUT https://www.wixapis.com/wix-data/v2/items/{itemId}
117
- body: {
118
- "dataCollectionId": "CollectionName",
119
- "dataItem": {
120
- "id": "{itemId}",
121
- "data": { ...existingData, "{imageField}": "<wixstatic-url>" }
122
- }
123
- }
124
- ```
125
-
126
- `...existingData` must include every non-system field from step a (system fields `_id`, `_owner`, `_createdDate`, `_updatedDate` don't need to be echoed). Skipping the merge wipes seeded text fields and ships an empty About page.
127
-
128
- **Prompt templates** — each use-case reference defines its own prompt template (see the "Seed with Images" section in `../astro/cms/TEAM_DIRECTORY.md`, `../astro/cms/PORTFOLIO.md`, `../astro/cms/RESOURCE_LIBRARY.md`). Always incorporate brand context from the discovery/design phases.
129
-
130
- **Constraints:**
131
- - Never block the main flow on image failures — text data is already seeded
132
- - Runware image URLs are short-lived — import to Wix Media immediately after generation
133
- - If image generation or import fails for a single item, skip that item and continue with others
134
- - If all generation fails (credits exhausted, upstream Runware errors), write the sidecar with `Status: partial` and proceed — but always attempt first
135
- - `../astro/cms/FAQ_KNOWLEDGE_BASE.md` has no image fields — skip image generation for FAQ use cases
136
-
137
- ## Return Results
138
-
139
- Emit a structured JSON block at the end of your completion message per `../shared/RETURN_CONTRACT.md`. Do NOT write sidecar files.
140
-
141
- ```json
142
- {
143
- "status": "complete",
144
- "phase": "cms-seed",
145
- "scope": "seed",
146
- "summary": "Created {N} collections; seeded {M} items; verified every field persisted",
147
- "data": {
148
- "collections": [
149
- {
150
- "name": "<collection-slug>",
151
- "itemIds": ["<id>", "..."],
152
- "fields": ["<field>", "..."],
153
- "storedFields": ["<field>", "..."],
154
- "sampleValues": { "<field>": "<short sample value>" },
155
- "imageField": "<field name or null>"
156
- }
157
- ]
158
- },
159
- "files": [],
160
- "errors": []
161
- }
162
- ```
163
-
164
- - `storedFields` MUST match the real keys seen in the verify-after-insert query response's `data` object (see § "Verify inserts with a live query"). Downstream pages agents compare against this — if you return `fields: ["heading", "body"]` but only `heading` was actually stored, pages render empty bodies.
165
- - `sampleValues` is a single example item's field-to-short-string map. Lets downstream agents spot-check that content is real without another REST round-trip. Truncate rich-text bodies to the first ~80 characters.
166
- - For collections without image fields (e.g., FAQ), set `imageField: null`.
167
- - The JSON block MUST be the last content in your message.
168
-
169
- ## Testing (seed-side)
170
-
171
- 1. Create a data collection in the Wix dashboard → CMS (or via the REST `POST /collections` above).
172
- 2. Add fields matching the use case schema (see the specific use case reference under `../astro/cms/`).
173
- 3. Add at least 2–3 items with all fields populated, including `slug` and `published` (if applicable).
174
- 4. Run the verify-after-insert query and confirm every field persisted.
175
-
176
- Page rendering / SDK query patterns for these collections are in `../astro/cms/CMS_FOUNDATIONS.md`.
@@ -1,71 +0,0 @@
1
- ---
2
- name: cms-implementer
3
- description: "Implements structured content pages (About, FAQ, portfolios, team directories, resource libraries) via Wix CMS and @wix/data. Scopes: seed, pages. Extends references/shared/IMPLEMENTER.md."
4
- ---
5
-
6
- # CMS Implementer
7
-
8
- Extends `references/shared/IMPLEMENTER.md`. Read that file first for phase routing, REST auth + doc lookups, prompt-inlined inputs (read only your `.wix/seeded.json` slice), return contract, style conventions, and common failure modes.
9
-
10
- ## Scope routing
11
-
12
- | Scope | Phase | Reference |
13
- |-------|-------|-----------|
14
- | `seed` | Seed (create collections + seed items via REST) | `./CMS_FOUNDATIONS.md` (seeding, business half) + use-case ref under `../astro/cms/` (collection schema + seed-with-images) |
15
- | `pages` | Pages (About + FAQ pages read CMS via @wix/data inline) | `../astro/cms/CMS_FOUNDATIONS.md` (code patterns) + use-case ref under `../astro/cms/` |
16
-
17
- No `components` scope — CMS pages SSR content inline via `@wix/data`; no React islands.
18
-
19
- ## Use-case references
20
-
21
- Pick based on the business type (the orchestrator names one in your prompt):
22
-
23
- - `../astro/cms/FAQ_KNOWLEDGE_BASE.md` — Q&A accordions, category sections, search
24
- - `../astro/cms/PORTFOLIO.md` — project grid, category filter tabs, project detail
25
- - `../astro/cms/TEAM_DIRECTORY.md` — department-grouped directory, staff cards
26
- - `../astro/cms/RESOURCE_LIBRARY.md` — file listings, download buttons, file type badges
27
-
28
- ## Files this vertical creates / contributes
29
-
30
- See `<SKILL_ROOT>/references/verticals/cms.md` frontmatter.
31
-
32
- ## Seed return
33
-
34
- The `seed` scope emits this `data` shape in its return JSON (envelope rules in `../shared/RETURN_CONTRACT.md`). Phase 4 CMS page agents reference these collection names; the image agent attaches entity images to CMS items by ID.
35
-
36
- ```json
37
- {
38
- "status": "complete",
39
- "phase": "cms-seed",
40
- "scope": "seed",
41
- "data": {
42
- "collections": [
43
- {
44
- "name": "about-content",
45
- "itemIds": ["665f3363-..."],
46
- "fields": ["heading", "body", "image"]
47
- },
48
- {
49
- "name": "faq",
50
- "itemIds": ["abc", "def", "ghi", "jkl", "mno", "pqr"],
51
- "fields": ["question", "answer", "sortOrder"]
52
- }
53
- ]
54
- }
55
- }
56
- ```
57
-
58
- ## Page width (FAQ, About, long-form CMS)
59
-
60
- Read `references/shared/STYLING.md` § "Prose / reading width". **Do not** wrap FAQ/About body copy in `max-w-3xl` unless `--container-3xl` exists in `src/styles/global.css` `@theme`. Prefer `container-reading`, `max-w-6xl` (when `--container-6xl` is defined), or `max-w-[48rem]`. A bare `max-w-3xl` with only a spacing scale ships a ~80px column.
61
-
62
- ## CMS-specific failure modes
63
-
64
- | Wrong | Right |
65
- |---|---|
66
- | `items.queryDataItems(...)` / `items.query({ dataCollectionId })` | `items.query("CollectionId").find()` — queryDataItems doesn't exist |
67
- | React islands for static content pages | SSR inline with `@wix/data`; no islands needed |
68
- | `max-w-3xl` on FAQ/About wrappers without `--container-3xl` in `@theme` | `container-reading` or `max-w-[48rem]` / `max-w-6xl` per STYLING.md |
69
- | Return `status: "complete"` without re-querying the collection | Always run the verify-after-insert query (see CMS_FOUNDATIONS.md § "Verify inserts with a live query"); fail fast if any field is missing |
70
- | Report `fields: [...]` guessed from the insert body | Report `storedFields: [...]` matching the actual keys in the query response's `data` object — pages agents compare against these |
71
- | Assume text fields survive downstream image PATCHes | Seeder's job is to verify content is present; images agent must preserve via read-merge-PUT (images INSTRUCTIONS.md § "CMS Items") |
@@ -1,6 +0,0 @@
1
- {
2
- "wix-stores": "215238eb-22a5-4c36-9e7b-e7c08025e04e",
3
- "wix-forms": "225dd912-7dea-4738-8688-4b8c6955ffc2",
4
- "wix-blog": "14bcded7-0066-7c35-14d7-466cb3f09103",
5
- "wix-gift-cards": "d80111c5-a0f4-47a8-b63a-65b54d774a27"
6
- }