@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,92 +0,0 @@
1
- # Plan — the pre-approval funnel
2
-
3
- This file owns the run **from the first Discovery question to the user's approval of the plan** — operation routing, the questions, the background dispatches that hide latency, and the plan/approval gate. Its job is to get the user to the commitment moment **fast**, so keep it lean.
4
-
5
- **This file is the funnel router, and it routes on OPERATION.** It holds the shared funnel rules (concurrency vocabulary, the two-track model, operation routing, the Plan→Build contract, user-facing output, batching). The operation-specific funnel — how input is processed and how the plan looks — lives in `PLAN-create.md` (create a new site) and `PLAN-connect.md` (connect a brought-in design). **Read `operation` (set by `DISCOVERY.md` § Wave 0), then open the matching one and read only that:** `create` → `PLAN-create.md`, `connect` → `PLAN-connect.md`. (Today `create` coincides with `frontend: astro` and `connect` with `frontend: custom` — but the funnel branches on the *operation*, not the frontend; that is the seam the framework-SPA and extend plans build on.)
6
-
7
- **On approval, open `BUILD.md`** — the post-approval conductor that owns execution (Setup → design-system bridge → Seed → Components → Pages → Build → Release). Everything past the approval gate lives there, so it is not read until the user has committed.
8
-
9
- **The contract with the other files.** The domain/step files answer *what each step does* (the questions Discovery asks, the recipes, the prompt templates). This file + the operation funnels + `BUILD.md` answer *when, in what order, in parallel with what, gated on what*. The step files do not name the sequence or chain to each other; the conductor names when to apply each one. Neither prescribes a tool API — map each step to whatever subagent / parallel-execution primitive your runtime offers.
10
-
11
- ## Concurrency vocabulary
12
-
13
- The terms below appear throughout this skill. They describe the *shape* of work; the runtime decides how to implement them:
14
-
15
- - **Subagent** — an isolated worker with its own context. The orchestrator sends it a prompt (an `Instruction file` path + inputs); the subagent reads the instruction file, performs the scope, and returns a structured result.
16
- - **Concurrent batch** — N subagents (or N tool calls) launched together so they execute in parallel rather than serially.
17
- - **Background subagent** — a subagent the orchestrator does not block on; it runs while the orchestrator continues with downstream work and reports its result asynchronously.
18
- - **Foreground subagent** — a subagent the orchestrator blocks on before continuing.
19
- - **Wait (gate)** — the orchestrator pauses until specified background work (subagents or background `Bash` jobs like the scaffold) finishes. **Waiting means awaiting the harness's background-task completion notification — never a `sleep`/poll loop against an output file.** A poll loop burns the whole wait as blocked orchestrator time and delays everything gated behind it (e.g. sleep-polling the scaffold lands the Composer late). The completion notification is the only signal you need; the same rule covers the `wix login` wait (`shared/AUTHENTICATION.md`) and the no-sidecar-poll rule for image phases (`images/INSTRUCTIONS.md`).
20
- - **Result** — the structured JSON block each subagent returns at the end of its run, per `references/shared/RETURN_CONTRACT.md`.
21
-
22
- ## Two tracks (business vs frontend)
23
-
24
- The run is two semi-independent tracks that the orchestrator interleaves for wall-time:
25
-
26
- - **Business track** (frontend-blind) — create/connect the site, **install Wix apps**, **seed backend data**. Inputs: `siteId`, `verticals`, `intent`, `brand`. It never reads `frontend`/template — a product (or collection, post, form) is the same regardless of what renders it. Its domain content lives in `SETUP.md` (app installs) + `SEED.md` (seeders).
27
- - **Frontend track** (frontend-aware) — scaffold/prep the local project, Designer + design tokens, `compose.mjs` (the Composer script), components, pages, SDK wiring, build. Every `frontend`/template branch lives here. Its domain content lives in `scaffold.sh` + `seed-utilities.sh` + `DESIGN_SYSTEM.md` + `scripts/compose.mjs` (self-documenting) + the per-vertical references (frontend guides under `references/astro/`).
28
-
29
- The only cross-track data flow is **one-way, business → frontend**: seeders produce entity IDs which the orchestrator inlines into the frontend track's Page-subagent prompts. There is no frontend → business dependency.
30
-
31
- ## Operation routing
32
-
33
- The Plan phase routes on **operation** — *create* (scaffold a new site from a prompt) vs *connect* (integrate a brought-in design). `operation` is captured by `DISCOVERY.md` § "Wave 0", held by the orchestrator in scratch, and selects the funnel:
34
-
35
- | `operation` | What it is | Funnel → Build |
36
- |---|---|---|
37
- | `create` | The user asks for a new site; the skill writes it | **`PLAN-create.md`** → on approval → `BUILD.md` routes Build on **framework**. The full astro playbook lives under `<SKILL_ROOT>/references/astro/`. |
38
- | `connect` | The user brings a finished design to wire to Wix | **`PLAN-connect.md`** → on approval → `BUILD.md` routes Build on **framework**. The frontend-track playbook is `<SKILL_ROOT>/references/custom/INSTRUCTIONS.md`. No scaffold, no Designer/Composer; init + shared Setup/Seed + connect/augment/persistence-swap; release is no-build (`none`) or the project's own build (`own` SPA). |
39
-
40
- > **Operation ≠ frontend.** The funnel branches on the *operation* (what the user is doing), not the frontend (what renders it). The two are orthogonal: *create* spans `frontendBuild` `wix` (astro default) and `own` (a named framework); *connect* spans `none` (static HTML), `own` (a brought SPA), and could span `wix` (a brought astro project) — none of which forks the operation router. Keeping operation and framework distinct is what lets these combinations be independently expressible without a new phase fork — see the framework-SPA plan and the extend plan.
41
-
42
- This is the **operation-selection routing layer**: `SETUP.md`'s steps assume the routing already happened; the conductor owns the branch. **Build does NOT route on operation** — it routes on framework (`BUILD.md`); operation feeds Build only through the contract below (specifically the bootstrap/wiring cells).
43
-
44
- ## The Plan→Build contract
45
-
46
- Plan resolves a small, explicit contract that Build consumes. It is carried **in the orchestrator's in-context session scratch** and threaded into each subagent's dispatch prompt — it is **not persisted to disk** (nothing in this contract lands on disk). The orchestrator already resolves these fields in Wave 0 and holds them for the whole run, so a disk round-trip buys nothing; on scratch loss, `frontend`/`frontendBuild` are recovered from `package.json` (`@wix/astro` ⇒ astro/wix, else custom + re-derive from `scripts.build`).
47
-
48
- **Core (every operation resolves these identically; Build's install/build/release spine reads only these):**
49
-
50
- | Field | Today's values | Meaning |
51
- |---|---|---|
52
- | `operation` | `create` \| `connect` | what the user is doing (*extend* added later by its own plan) |
53
- | `frontend` | `astro` \| `custom` | what renders the site (held in scratch; recovered from `package.json` on scratch loss) |
54
- | `frontendBuild` | `wix` \| `none` \| `own` | the build-class Build routes on: `wix` (astro, `wix build`), `none` (brought static HTML, no build), `own` (framework SPA — the project's own `npm run build`; brought-in *or* scaffolded from a named framework) |
55
- | `verticals[]` | e.g. `["stores","ecom","cms"]` | loaded packs (top-level + transitive) |
56
- | `designSource` | `generate-fresh` \| `derive-from-brought` | create generates; connect derives from the brought design's own tokens |
57
- | `brand` | `{ name, description }` | brand metadata |
58
-
59
- `frontendBuild` is **derived inside the operation, not implied by it** (the axes are orthogonal): connect resolves it from the brought-in project on disk (`none` static HTML vs `own` framework SPA — `DISCOVERY-connect.md` § 1.5); create resolves it from an explicit framework keyword (`wix` astro default vs `own` named framework — `DISCOVERY.md` § "Wave 0"). Resolve it in Wave 0 alongside `frontend` and hold it in scratch (on scratch loss, recover from `package.json`). Build branches its install/build/release **purely off `frontendBuild`** — never off `operation`.
60
-
61
- **Operation section (feeds ONLY the bootstrap + wiring cells, never the build/release spine):**
62
- - `connect` carries the **connection plan** (binding-map / augmentation spec) inferred in Discovery.
63
- - `create` carries nothing extra.
64
- - *(extend will carry existing-state + delta — added by the extend plan.)*
65
-
66
- That is the precise sense in which the contract stays uniform across operations: the build/release spine is contract-uniform (it reads only the core), and **only** the bootstrap/wiring cells read the operation-specific payload. A *fresh session over an existing project* (extend) reconstructs the equivalent core from durable disk artifacts (`@wix/astro` dep, `package.json`, on-disk pages) rather than from scratch — same contract, sourced differently by lifecycle.
67
-
68
- ## User-facing output (keep the machinery invisible)
69
-
70
- This rule governs the **whole run**, both modes. The user should see **milestones in plain language, never the orchestration machinery.** Between the Discovery approval and the final summary the run is largely silent — the orchestrator is dispatching, waiting, and gating, none of which is the user's concern.
71
-
72
- **Never put internal orchestration vocabulary in a user-facing message.** That includes: background-handle names (`*_handle`), dispatch markers ("→ dispatch:", "dispatching X", "launching Wave 3"), subagent START/END, "seed gate" / "all handles complete", wave/step numbers ("Wave 3", "Step 4.5"), in-flight **subagent/handle status tables** (especially any "Handle" column), and internal paths (`wix-manage-root`, the scaffold subdir). These describe *how the conductor works*, not *what the user is getting*.
73
-
74
- **The only user-facing messages in a run are:**
75
- 1. **Discovery** — the questions, the plan, and the approval gate (the mode discovery file's domain).
76
- 2. **One brief seed-progress sentence** (`SEED.md` Step 5) — plain prose naming what was seeded, no tables.
77
- 3. **The final summary** (`BUILD.md` § "Final Message").
78
-
79
- Everything else is silent. If a long phase (Components, Pages) would otherwise look stalled, at most **one short plain-language line** ("Building your product and category pages…") — never a status table, handle list, or wave number. The in-flight subagent tables that runs have emitted ("Phase 3 Components running: | Subagent | Handle |…", "🎉 Seed gate open! All handles complete") are the anti-pattern this rule removes.
80
-
81
- ## Batching discipline
82
-
83
- This rule governs **every** concurrent batch in the run, in both modes — the Wave-0 pack reads (mode funnel), and the post-approval dispatch batches owned by the conductor (`BUILD.md` and its mode files): the astro BUILD-entry scaffold + Designer dispatch, the Setup app-installs, the Wave-3 seed batch, the integration connection-plan + init batch. The step files describe *what* is in each batch; the rule that they go out as one batch lives here.
84
-
85
- Historical runs lost 1–2 minutes per phase to serialized dispatch — N operations emitted one-per-turn instead of in a single concurrent batch. Even when each ran fast, the inter-dispatch gaps accumulated to significant overhead per phase.
86
-
87
- Two mitigations; use both:
88
-
89
- 1. **Fire the whole batch as one assistant message** — N `Agent`/`Bash` tool_uses as siblings. **No narration between dispatches** ("Now installing apps:", "Dispatching seeders:"). Any text adjacent to a dispatch closes the batch and forces the rest into separate turns, adding seconds per dispatch. This holds even for a 2-item batch.
90
- 2. **Use background-on-dispatch for anything that doesn't block downstream work.** Even if the runtime serializes the launch turns, background dispatch lets the work overlap in execution, compressing wall-time substantially versus serial.
91
-
92
- If your runtime forces serialization across turns, make every subagent that can run in the background a background subagent — the Designer, seeders, and image phases all dispatch background so the foreground never blocks on them. (The Composer is no longer a subagent — it is the deterministic `compose.mjs` Bash step, sub-second and synchronous.)
@@ -1,300 +0,0 @@
1
- # Reference: Blog Pages
2
-
3
- Blog listing, post detail, RSS feed, layout, SEO head component, and date formatting.
4
-
5
- ## Files to Create
6
-
7
- | File | Purpose |
8
- |------|---------|
9
- | `src/pages/blog/index.astro` | Blog listing page |
10
- | `src/pages/blog/[...slug].astro` | Blog post detail page (with RicosViewer) |
11
- | `src/pages/rss.xml.js` | RSS feed |
12
- | `src/layouts/BlogPost.astro` | Blog post layout wrapper |
13
- | `src/components/BaseHead.astro` | SEO head component (OG/Twitter cards) |
14
- | `src/components/FormattedDate.astro` | Date formatting helper |
15
-
16
- ---
17
-
18
- ## 1. SEO Head Component (`src/components/BaseHead.astro`)
19
-
20
- ```astro
21
- ---
22
- import '../styles/global.css';
23
-
24
- interface Props {
25
- title: string;
26
- description: string;
27
- image?: string;
28
- }
29
-
30
- const canonicalURL = new URL(Astro.url.pathname, Astro.site);
31
-
32
- const { title, description, image = '/blog-placeholder-1.jpg' } = Astro.props;
33
- ---
34
-
35
- <!-- Global Metadata -->
36
- <meta charset="utf-8" />
37
- <meta name="viewport" content="width=device-width,initial-scale=1" />
38
- <link rel="icon" type="image/svg+xml" href="/favicon.svg" />
39
- <meta name="generator" content={Astro.generator} />
40
-
41
- <!-- Canonical URL -->
42
- <link rel="canonical" href={canonicalURL} />
43
-
44
- <!-- Primary Meta Tags -->
45
- <title>{title}</title>
46
- <meta name="title" content={title} />
47
- <meta name="description" content={description} />
48
-
49
- <!-- Open Graph / Facebook -->
50
- <meta property="og:type" content="website" />
51
- <meta property="og:url" content={Astro.url} />
52
- <meta property="og:title" content={title} />
53
- <meta property="og:description" content={description} />
54
- <meta property="og:image" content={new URL(image, Astro.url)} />
55
-
56
- <!-- Twitter -->
57
- <meta property="twitter:card" content="summary_large_image" />
58
- <meta property="twitter:url" content={Astro.url} />
59
- <meta property="twitter:title" content={title} />
60
- <meta property="twitter:description" content={description} />
61
- <meta property="twitter:image" content={new URL(image, Astro.url)} />
62
- ```
63
-
64
- > If the project already has a `<head>` component or `Layout.astro` with SEO tags, adapt the existing component instead of creating a new one. The key additions are the OG/Twitter meta tags with `image` support.
65
-
66
- ---
67
-
68
- ## 2. Formatted Date Component (`src/components/FormattedDate.astro`)
69
-
70
- ```astro
71
- ---
72
- interface Props {
73
- date: Date;
74
- }
75
-
76
- const { date } = Astro.props;
77
- ---
78
-
79
- <time datetime={date.toISOString()}>
80
- {
81
- date.toLocaleDateString('en-us', {
82
- year: 'numeric',
83
- month: 'short',
84
- day: 'numeric',
85
- })
86
- }
87
- </time>
88
- ```
89
-
90
- ---
91
-
92
- ## 3. Blog Post Layout (`src/layouts/BlogPost.astro`)
93
-
94
- ```astro
95
- ---
96
- import BaseHead from '../components/BaseHead.astro';
97
- import Header from '../components/Header.astro';
98
- import Footer from '../components/Footer.astro';
99
- import FormattedDate from '../components/FormattedDate.astro';
100
-
101
- interface Props {
102
- title: string;
103
- description?: string;
104
- pubDate: Date;
105
- updatedDate?: Date;
106
- heroImage?: string;
107
- tags?: Array<{ label: string; slug: string }>;
108
- }
109
-
110
- const { title, description, pubDate, updatedDate, heroImage, tags = [] } = Astro.props;
111
- ---
112
-
113
- <html lang="en">
114
- <head>
115
- <BaseHead title={title} description={description ?? ''} />
116
- <style is:global>
117
- /* All BlogPost layout styles are created by the merged pages scope.
118
- See references/shared/STYLING.md (Blog Post Content) for the complete
119
- styling contract: .hero-image, .prose, .title, .date, .tags,
120
- .ricos-content overrides, etc. */
121
- </style>
122
- </head>
123
-
124
- <body>
125
- <Header />
126
- <main>
127
- <article>
128
- <div class="hero-image">
129
- {heroImage && <img width={1020} height={510} src={heroImage} alt="" />}
130
- </div>
131
- <div class="prose">
132
- <div class="title">
133
- <div class="date">
134
- <FormattedDate date={pubDate} />
135
- {
136
- updatedDate && (
137
- <div class="last-updated-on">
138
- Last updated on <FormattedDate date={updatedDate} />
139
- </div>
140
- )
141
- }
142
- </div>
143
- <h1>{title}</h1>
144
- {tags.length > 0 && (
145
- <div class="tags">
146
- {tags.map((tag) => (
147
- <span class="tag">{tag.label}</span>
148
- ))}
149
- </div>
150
- )}
151
- <hr />
152
- </div>
153
- <slot />
154
- </div>
155
- </article>
156
- </main>
157
- <Footer />
158
- </body>
159
- </html>
160
- ```
161
-
162
- > Adapt `Header` and `Footer` imports to match the project's existing components. If the project uses a different layout pattern (e.g., `Layout.astro` wrapper), use that instead and incorporate the blog-specific elements (hero image, date, title, tags).
163
-
164
- ---
165
-
166
- ## 4. Blog Listing Page (`src/pages/blog/index.astro`)
167
-
168
- ```astro
169
- ---
170
- import { queryBlogPosts } from "../../lib/blog";
171
- import BaseHead from "../../components/BaseHead.astro";
172
- import Footer from "../../components/Footer.astro";
173
- import FormattedDate from "../../components/FormattedDate.astro";
174
- import Header from "../../components/Header.astro";
175
- import { SITE_DESCRIPTION, SITE_TITLE } from "../../consts";
176
-
177
- const posts = await queryBlogPosts();
178
- ---
179
-
180
- <!doctype html>
181
- <html lang="en">
182
- <head>
183
- <BaseHead title={SITE_TITLE} description={SITE_DESCRIPTION} />
184
- <style>
185
- /* The merged blog-pages scope writes this route once — applying the
186
- listing styles and binding queryBlogPosts() data in the same pass. */
187
- </style>
188
- </head>
189
- <body>
190
- <Header />
191
- <main>
192
- <section>
193
- {
194
- posts.length === 0 ? (
195
- <div>There are no posts available.</div>
196
- ) : (
197
- <ul>
198
- {posts.map((post) => (
199
- <li>
200
- <a href={`/blog/${post.slug}/`}>
201
- {post.coverImageUrl && (
202
- <img
203
- width={720}
204
- height={360}
205
- src={post.coverImageUrl}
206
- alt=""
207
- />
208
- )}
209
- <h4 class="title">{post.title}</h4>
210
- <p class="date">
211
- <FormattedDate date={post.pubDate} />
212
- </p>
213
- </a>
214
- </li>
215
- ))}
216
- </ul>
217
- )
218
- }
219
- </section>
220
- </main>
221
- <Footer />
222
- </body>
223
- </html>
224
- ```
225
-
226
- > Adapt the layout to match the project's existing design. The key pattern is: `queryBlogPosts()` from the blog service, linking to `/blog/${post.slug}/`.
227
-
228
- ---
229
-
230
- ## 5. Blog Post Detail Page (`src/pages/blog/[...slug].astro`)
231
-
232
- ```astro
233
- ---
234
- import RicosViewer from '../../components/RicosViewer';
235
- import { getPostBySlug } from "../../lib/blog";
236
- import BlogPost from '../../layouts/BlogPost.astro';
237
-
238
- export const wixMetadata = {
239
- appDefId: "14bcded7-0066-7c35-14d7-466cb3f09103",
240
- pageIdentifier: "wix.blog.sub_pages.post",
241
- identifiers: {
242
- slug: "BLOG.POST.SLUG",
243
- },
244
- };
245
-
246
- const { slug } = Astro.params;
247
- const post = await getPostBySlug(slug!);
248
-
249
- if (!post) {
250
- return Astro.redirect("/blog");
251
- }
252
- ---
253
-
254
- <BlogPost
255
- title={post.title}
256
- description={post.excerpt}
257
- pubDate={post.pubDate}
258
- heroImage={post.coverImageUrl}
259
- tags={post.tags}
260
- >
261
- <RicosViewer client:only="react" content={post.richContent} />
262
- </BlogPost>
263
- ```
264
-
265
- Critical details:
266
- - **`wixMetadata` export is required** — it tells the Wix platform this page is a blog post page. The `appDefId` is the Wix Blog app's ID (constant, do not change). `identifiers.slug` maps the URL param to the blog post slug.
267
- - **`client:only="react"` is required** — `@wix/ricos` is a React component; `client:only="react"` ensures it renders only on the client, avoiding SSR issues with React-dependent code.
268
- - **`[...slug]` (rest param)** — uses Astro's rest parameter syntax, not `[slug]`, to match the full slug path.
269
- - **`RicosViewer`** renders the rich content from the Wix Blog editor (images, videos, text formatting, embeds, etc.) using `quickStartViewerPlugins()` for full content-type support.
270
- - **Blog deliberately uses the React `RicosViewer`** (full feature set: galleries, polls, embedded media) — not a contradiction with CMS, which uses the lighter SSR `renderRicos` walker (`src/utils/ricos.ts`). Blog posts can carry the full Ricos feature set, so they need the React island; static CMS pages (about/faq/portfolio/team/resource) only need paragraphs + lists and avoid shipping ~80kb of React. See `references/astro/cms/CMS_FOUNDATIONS.md` § "Why not @wix/ricos?".
271
- - **No `getStaticPaths()`** — Wix headless projects use `output: "server"` (SSR on Cloudflare Workers), so pages use `Astro.params` directly instead of static path generation.
272
- - **404 handling** — `getPostBySlug` returns `null` for missing posts; redirect to `/blog` listing.
273
- - **Ricos color overrides** — The BlogPost layout's `<style is:global>` block includes `.ricos-content` overrides that force `var(--color-text)` on all Ricos elements. Without these, blog text is invisible on dark themes.
274
-
275
- ---
276
-
277
- ## 6. RSS Feed (`src/pages/rss.xml.js`)
278
-
279
- ```javascript
280
- import rss from '@astrojs/rss';
281
- import { queryBlogPosts } from '../lib/blog';
282
- import { SITE_TITLE, SITE_DESCRIPTION } from '../consts';
283
-
284
- export async function GET(context) {
285
- const posts = await queryBlogPosts();
286
- return rss({
287
- title: SITE_TITLE,
288
- description: SITE_DESCRIPTION,
289
- site: context.site,
290
- items: posts.map((post) => ({
291
- title: post.title,
292
- pubDate: post.pubDate,
293
- description: post.excerpt,
294
- link: `/blog/${post.slug}/`,
295
- })),
296
- });
297
- }
298
- ```
299
-
300
- > Requires the `site` property in `astro.config.mjs` (set in BLOG_SETUP.md step 1).
@@ -1,218 +0,0 @@
1
- # Reference: Blog Setup
2
-
3
- Prerequisites, dependencies, blog service module, and astro config changes for the Wix Blog app integration.
4
-
5
- ## Prerequisites
6
-
7
- - A Wix Managed Headless project (has `wix.config.json` and `astro.config.mjs`)
8
- - The **Wix Blog app** installed on the connected Wix site (installed via the apps-installer REST endpoint after scaffolding — see `../../blog/BLOG_CONTENT.md` Step 0)
9
- - At least one published blog post in the Wix dashboard
10
-
11
- ## Package Installation
12
-
13
- ```bash
14
- npm install @wix/blog @wix/ricos @astrojs/rss @astrojs/sitemap
15
- ```
16
-
17
- ## Files to Create / Modify
18
-
19
- | File | Action | Purpose |
20
- |------|--------|---------|
21
- | `astro.config.mjs` | Modify | Add `site` property and `sitemap()` integration |
22
- | `src/lib/blog.ts` | Create | Blog service — queries posts, resolves categories/tags/media |
23
- | `src/consts.ts` | Create | Site-wide constants (title, description) |
24
- | `src/components/RicosViewer.tsx` | Create | React wrapper for `@wix/ricos` RicosViewer |
25
-
26
- ---
27
-
28
- ## 1. Astro Config Changes (`astro.config.mjs`)
29
-
30
- Add the `site` property (required for RSS and sitemap) and the `sitemap()` integration:
31
-
32
- ```javascript
33
- // @ts-check
34
- import { defineConfig } from "astro/config";
35
- import sitemap from "@astrojs/sitemap";
36
- import wix from "@wix/astro";
37
- import wixPages from "@wix/astro-pages";
38
-
39
- // https://astro.build/config
40
- export default defineConfig({
41
- site: "https://example.com",
42
- integrations: [wix(), wixPages(), sitemap()]
43
- });
44
- ```
45
-
46
- > Replace `"https://example.com"` with the actual site URL. The `site` property is required for `@astrojs/rss` and `@astrojs/sitemap` to generate correct URLs.
47
-
48
- > `wix()` and `wixPages()` should already be in the config from project scaffolding. Only add `sitemap()` and the `site` property.
49
-
50
- ---
51
-
52
- ## 2. Site Constants (`src/consts.ts`)
53
-
54
- ```typescript
55
- // Place any global data in this file.
56
- // You can import this data from anywhere in your site by using the `import` keyword.
57
-
58
- export const SITE_TITLE = 'Astro Blog';
59
- export const SITE_DESCRIPTION = 'Welcome to my website!';
60
- ```
61
-
62
- > Update `SITE_TITLE` and `SITE_DESCRIPTION` to match the user's site.
63
-
64
- ---
65
-
66
- ## 3. RicosViewer React Wrapper (`src/components/RicosViewer.tsx`)
67
-
68
- A thin React wrapper around `@wix/ricos` for use in Astro pages with `client:only="react"`.
69
-
70
- ```tsx
71
- import { quickStartViewerPlugins, RicosViewer } from '@wix/ricos';
72
- import '@wix/ricos/css/all-plugins-viewer.css';
73
-
74
- const plugins = quickStartViewerPlugins();
75
-
76
- export default function RicosContentViewer({ content }: { content: any }) {
77
- if (!content) return null;
78
- return (
79
- <div className="ricos-content">
80
- <RicosViewer content={content} plugins={plugins} />
81
- </div>
82
- );
83
- }
84
- ```
85
-
86
- Key details:
87
- - `quickStartViewerPlugins()` is initialized at module level (once, not per render) — provides full content-type support (links, tables, galleries, embeds, etc.)
88
- - The CSS import is bundled by Vite into the client chunk
89
- - No key renaming needed — `@wix/ricos` accepts camelCase keys from the `@wix/blog` SDK directly
90
- - Used in Astro pages as `<RicosViewer client:only="react" content={post.richContent} />`
91
- - The `.ricos-content` wrapper div provides a CSS hook for theme color overrides — the Ricos library CSS hardcodes `color: rgb(0, 0, 0)` on paragraph and list elements, which is invisible on dark themes
92
-
93
- ---
94
-
95
- ## 4. Blog Service Module (`src/lib/blog.ts`)
96
-
97
- This service module handles all Wix Blog SDK calls, resolving categories, tags, and media references into ready-to-use data.
98
-
99
- ```typescript
100
- import { posts, categories, tags } from "@wix/blog";
101
- import { media } from "@wix/sdk";
102
-
103
- export interface BlogPost {
104
- slug: string;
105
- title: string;
106
- excerpt: string;
107
- coverImageUrl?: string;
108
- date: string;
109
- pubDate: Date;
110
- category?: string;
111
- richContent: any;
112
- tags: Array<{ label: string; slug: string }>;
113
- }
114
-
115
- export async function queryBlogPosts(limit?: number): Promise<BlogPost[]> {
116
- let query = posts
117
- .queryPosts({ fieldsets: ["RICH_CONTENT", "CONTENT_TEXT"] })
118
- .descending("firstPublishedDate");
119
-
120
- if (limit) query = query.limit(limit);
121
-
122
- const { items } = await query.find();
123
-
124
- return Promise.all(
125
- items.map(async (item) => {
126
- const resolvedCategories = await Promise.all(
127
- (item.categoryIds || []).map(async (id) => {
128
- const { category } = await categories.getCategory(id);
129
- return category!;
130
- })
131
- );
132
-
133
- const resolvedTags = await Promise.all(
134
- (item.tagIds || []).map(async (id) => {
135
- const tag = await tags.getTag(id);
136
- return { label: tag.label!, slug: tag.slug! };
137
- })
138
- );
139
-
140
- const imageUrl = item.media?.wixMedia?.image
141
- ? media.getImageUrl(item.media.wixMedia.image).url
142
- : undefined;
143
-
144
- const pubDate = new Date(item.firstPublishedDate ?? "");
145
-
146
- return {
147
- slug: item.slug!,
148
- title: item.title!,
149
- excerpt: item.excerpt ?? "",
150
- coverImageUrl: imageUrl,
151
- date: pubDate.toLocaleDateString("en-us", {
152
- year: "numeric",
153
- month: "long",
154
- day: "numeric",
155
- }),
156
- pubDate,
157
- category: resolvedCategories[0]?.label,
158
- richContent: item.richContent,
159
- tags: resolvedTags,
160
- };
161
- })
162
- );
163
- }
164
-
165
- export async function getPostBySlug(slug: string): Promise<BlogPost | null> {
166
- const { items } = await posts
167
- .queryPosts({ fieldsets: ["RICH_CONTENT", "CONTENT_TEXT"] })
168
- .eq("slug", slug)
169
- .find();
170
-
171
- const item = items[0];
172
- if (!item) return null;
173
-
174
- const resolvedCategories = await Promise.all(
175
- (item.categoryIds || []).map(async (id) => {
176
- const { category } = await categories.getCategory(id);
177
- return category!;
178
- })
179
- );
180
-
181
- const resolvedTags = await Promise.all(
182
- (item.tagIds || []).map(async (id) => {
183
- const tag = await tags.getTag(id);
184
- return { label: tag.label!, slug: tag.slug! };
185
- })
186
- );
187
-
188
- const imageUrl = item.media?.wixMedia?.image
189
- ? media.getImageUrl(item.media.wixMedia.image).url
190
- : undefined;
191
-
192
- const pubDate = new Date(item.firstPublishedDate ?? "");
193
-
194
- return {
195
- slug: item.slug!,
196
- title: item.title!,
197
- excerpt: item.excerpt ?? "",
198
- coverImageUrl: imageUrl,
199
- date: pubDate.toLocaleDateString("en-us", {
200
- year: "numeric",
201
- month: "long",
202
- day: "numeric",
203
- }),
204
- pubDate,
205
- category: resolvedCategories[0]?.label,
206
- richContent: item.richContent,
207
- tags: resolvedTags,
208
- };
209
- }
210
- ```
211
-
212
- Key details:
213
- - `categories.getCategory(id)` returns `{ category }` (envelope) — destructure it
214
- - `tags.getTag(id)` returns the `BlogTag` directly — do NOT destructure as `{ tag }`
215
- - `media.getImageUrl(ref).url` resolves Wix media references to real URLs
216
- - `getPostBySlug` returns `null` for missing posts — pages must handle this with a redirect
217
- - `queryBlogPosts()` sorts by `firstPublishedDate` descending (newest first)
218
- - `RICH_CONTENT` fieldset is required to get renderable content for `RicosViewer`
@@ -1,45 +0,0 @@
1
- # Bookings Components — the client islands (astro)
2
-
3
- The `components` scope of the bookings vertical. You write the React islands that
4
- power the booking UI. The **logic** is in `../../bookings/FLOW.md` (read it first);
5
- this doc is the astro wiring + the gotchas. `src/styles/components-bookings.css`
6
- and `src/components/bookingDriver.ts` are pre-copied — do **not** write them.
7
-
8
- Read `references/shared/IMPLEMENTER.md` + `references/shared/STYLING.md` first.
9
-
10
- > **Start from the templates — don't re-author the SDK wiring.** Each island has
11
- > an example at `<SKILL_ROOT>/references/astro/templates/bookings/`. Read and adapt
12
- > (brand copy, styling, class names already in `components-bookings.css`); keep the
13
- > SDK calls + payload shapes.
14
-
15
- ## Islands you write
16
-
17
- | File | From template | Role |
18
- |------|---------------|------|
19
- | `src/components/ServiceBookingFlow.tsx` | `…/ServiceBookingFlow.tsx` | `client:only` coordinator — holds the selected slot, swaps calendar → form, redirects on success. Mounted by `services/[slug].astro`. |
20
- | `src/components/AvailabilityCalendar.tsx` | `…/AvailabilityCalendar.tsx` | the **week calendar** — week strip + nav → the picked day's slots. APPOINTMENT → `availabilityTimeSlots`; CLASS → `eventTimeSlots`. Optional **staff picker** (shown when >1 staff; filters availability + records `slot.resource`) and **location picker** (shown when the service has >1 business location; **always scopes availability to one location** — defaulting to the carried/first — so a multi-location service doesn't return duplicate per-location slots). Both fed by props from the SSR page. |
21
- | `src/components/BookingForm.tsx` | `…/BookingForm.tsx` | the **schema-driven** form — renders the `@wix/forms` field list (passed in from the SSR page), keys values by `target`, calls `bookingDriver.book()`. |
22
-
23
- ## astro-specific rules
24
-
25
- 1. **Islands call `@wix` ambiently — no `createClient`/`OAuthStrategy`.** In an
26
- astro browser island the `@wix/astro` visitor client is ambient (the same way
27
- the ecom `CartView` island works): `import { availabilityTimeSlots } from "@wix/bookings"`
28
- and call it directly. Do **not** build an `OAuthStrategy` client or read
29
- `WIX_CLIENT_ID` — that pattern is for own/static builds (`../../custom/bookings/WIRING.md`).
30
- 2. **The booking sequence is imported, not re-authored.** Import `book`,
31
- `navigateToCheckout`, `BookResultType`, and the `SelectedSlot` type from the
32
- pre-copied `./bookingDriver`. The form island calls `book(...)` and branches:
33
- `CheckoutRequired` → `navigateToCheckout(cartId, postFlowUrl)`; `CheckoutSkipped`
34
- → redirect to `/booking-confirmation`.
35
- 3. **Mount everything `client:only="react"`.** Availability + booking are
36
- timezone/session-specific; never SSR them.
37
- 4. **The form fields come from SSR.** `services/[slug].astro` fetches the booking
38
- form schema and passes a `fields` array into `ServiceBookingFlow` → `BookingForm`
39
- (see `SERVICES_PAGES.md`). The island renders the fields generically — it does
40
- not fetch the schema itself.
41
- 5. **No CSS.** The classes (`.availability-*`, `.time-slot*`, `.booking-*`) are in
42
- the pre-copied `components-bookings.css`; reference them, don't write them.
43
-
44
- ## Return
45
- `{ status, phase, scope: "components", summary, data, files, errors }`. If a pre-copied dependency (`bookingDriver.ts`, `components-bookings.css`) is missing, return `status: "partial"` with the coded error.