@wix/agent-skills 1.15.1 → 1.16.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 (332) hide show
  1. package/README.md +3 -7
  2. package/package.json +1 -1
  3. package/skills/wix-app/SKILL.md +4 -1
  4. package/skills/wix-app/references/APP_TOOLS.md +134 -0
  5. package/skills/wix-app/references/CUSTOM_ELEMENT_WIDGET.md +1 -1
  6. package/skills/wix-app/references/DASHBOARD_PAGE.md +0 -10
  7. package/skills/wix-app/references/DATA_COLLECTION.md +1 -1
  8. package/skills/wix-app/references/EDITOR_REACT_COMPONENT.md +42 -8
  9. package/skills/wix-app/references/SERVICE_PLUGIN.md +12 -10
  10. package/skills/wix-app/references/app-tools/TOOLS.md +75 -0
  11. package/skills/wix-app/references/dashboard-page/DASHBOARD_API.md +2 -2
  12. package/skills/wix-app/references/editor-react-component/A11Y-REVIEW-REFERENCE.md +172 -0
  13. package/skills/wix-app/references/editor-react-component/A11Y-REVIEW.md +143 -0
  14. package/skills/wix-app/references/editor-react-component/ANIMATED-COMPONENTS.md +23 -2
  15. package/skills/wix-app/references/editor-react-component/BRANDED-COMPONENTS.md +29 -0
  16. package/skills/wix-app/references/editor-react-component/COMPONENT-API.md +1 -1
  17. package/skills/wix-app/references/editor-react-component/COMPONENT-CONFIGURATION.md +60 -0
  18. package/skills/wix-app/references/editor-react-component/CSS-GUIDELINES.md +27 -2
  19. package/skills/wix-app/references/editor-react-component/DESIGN-STATES.md +5 -3
  20. package/skills/wix-app/references/editor-react-component/DIRECTIONALITY.md +24 -7
  21. package/skills/wix-app/references/editor-react-component/PARTS.md +15 -2
  22. package/skills/wix-app/references/editor-react-component/REACT-GUIDELINES.md +2 -3
  23. package/skills/wix-app/references/editor-react-component/SITE-CONTEXT-HOOKS.md +187 -0
  24. package/skills/wix-app/references/service-plugin/BOOKINGS-STAFF-SORTING.md +13 -9
  25. package/skills/wix-app/references/service-plugin/DISCOUNT-TRIGGERS.md +4 -0
  26. package/skills/wix-app/references/service-plugin/GIFT-CARDS.md +4 -0
  27. package/skills/wix-app/references/service-plugin/PAYMENT-SETTINGS.md +3 -1
  28. package/skills/wix-app/references/service-plugin/SHIPPING-RATES.md +4 -0
  29. package/skills/wix-app/references/service-plugin/TOOLS_PROVIDER.md +54 -0
  30. package/skills/wix-app/references/stores/QUERY.md +32 -0
  31. package/skills/wix-app/scripts/scan-a11y-code.cjs +777 -0
  32. package/skills/wix-app/scripts/scan-a11y-eslint.cjs +201 -0
  33. package/skills/wix-docs/SKILL.md +35 -3
  34. package/skills/wix-headless/SKILL.md +3 -1
  35. package/skills/wix-headless/references/CAPABILITIES.md +16 -3
  36. package/skills/wix-headless/references/CONTENT.md +36 -0
  37. package/skills/wix-headless/references/DESIGN.md +54 -0
  38. package/skills/wix-headless/references/DISCOVERY.md +24 -0
  39. package/skills/wix-headless/references/IMAGE_GENERATION.md +10 -0
  40. package/skills/wix-headless/references/SDK_HANDOFF.md +1 -1
  41. package/skills/wix-headless/references/SEED.md +1 -1
  42. package/skills/wix-headless/references/inline-recipes/how-to-code-a-store.md +3 -2
  43. package/skills/wix-headless/references/inline-recipes/how-to-code-forms.md +560 -102
  44. package/skills/wix-headless/references/inline-recipes/setup-forms.md +210 -143
  45. package/skills/wix-headless/references/inline-recipes/setup-online-store.md +32 -23
  46. package/skills/wix-headless/references/managed/CONNECT.md +1 -1
  47. package/skills/wix-headless/references/managed/CREATE.md +14 -0
  48. package/skills/wix-headless/references/managed/DEPLOYMENT.md +25 -0
  49. package/skills/wix-manage/SKILL.md +130 -7
  50. package/skills/wix-manage/references/accessibility/scan-site-accessibility.md +98 -0
  51. package/skills/wix-manage/references/analytics/analytics-dashboard-navigation.md +40 -0
  52. package/skills/wix-manage/references/app-installation/app-installation-dashboard-navigation.md +28 -0
  53. package/skills/wix-manage/references/blog/blog-dashboard-navigation.md +56 -0
  54. package/skills/wix-manage/references/blog/how-to-create-blog-posts.md +31 -6
  55. package/skills/wix-manage/references/bookings/booking-service-policy-setup.md +3 -1
  56. package/skills/wix-manage/references/bookings/bookings-dashboard-navigation.md +63 -0
  57. package/skills/wix-manage/references/bookings/diagnose-availability-issues.md +10 -1
  58. package/skills/wix-manage/references/cms/cms-dashboard-navigation.md +44 -0
  59. package/skills/wix-manage/references/cms/cms-data-items-crud.md +31 -3
  60. package/skills/wix-manage/references/cms/cms-publishing-flow.md +287 -0
  61. package/skills/wix-manage/references/cms/cms-schema-management.md +27 -1
  62. package/skills/wix-manage/references/contacts/contacts-dashboard-navigation.md +46 -0
  63. package/skills/wix-manage/references/contacts/create-a-contact.md +82 -0
  64. package/skills/wix-manage/references/contacts/update-a-contact.md +119 -0
  65. package/skills/wix-manage/references/dashboard-navigation/dashboard-navigation.md +82 -0
  66. package/skills/wix-manage/references/dashboard-navigation/routes.json +1733 -0
  67. package/skills/wix-manage/references/domains/domains-dashboard-navigation.md +32 -0
  68. package/skills/wix-manage/references/ecommerce/ecom-pricing.md +4 -4
  69. package/skills/wix-manage/references/ecommerce/ecom-shipping.md +1 -1
  70. package/skills/wix-manage/references/ecommerce/gift-cards/ecom-gift-cards-goal-sell-gift-cards.md +338 -0
  71. package/skills/wix-manage/references/ecommerce/pricing-promotions/ecom-pricing-create-discount-rule.md +42 -78
  72. package/skills/wix-manage/references/ecommerce/pricing-promotions/ecom-pricing-flow-bundle-and-save.md +1 -1
  73. package/skills/wix-manage/references/ecommerce/pricing-promotions/ecom-pricing-flow-stock-mover.md +1 -1
  74. package/skills/wix-manage/references/ecommerce/pricing-promotions/ecom-pricing-flow-upsell-boost.md +1 -1
  75. package/skills/wix-manage/references/ecommerce/recommend-ecommerce-strategy.md +90 -92
  76. package/skills/wix-manage/references/events/create-wix-event.md +176 -0
  77. package/skills/wix-manage/references/events/manage-wix-events.md +174 -0
  78. package/skills/wix-manage/references/forms/forms-dashboard-navigation.md +44 -0
  79. package/skills/wix-manage/references/get-paid/get-paid-dashboard-navigation.md +52 -0
  80. package/skills/wix-manage/references/google-ads/billing-and-payment.md +80 -0
  81. package/skills/wix-manage/references/google-ads/create-performance-max-campaign.md +212 -0
  82. package/skills/wix-manage/references/google-ads/get-campaign-suggestions.md +110 -0
  83. package/skills/wix-manage/references/google-ads/google-ads-dashboard-navigation.md +25 -0
  84. package/skills/wix-manage/references/google-ads/install-and-create-account.md +155 -0
  85. package/skills/wix-manage/references/google-ads/manage-campaign-lifecycle.md +63 -0
  86. package/skills/wix-manage/references/google-ads/query-campaign-analytics.md +155 -0
  87. package/skills/wix-manage/references/marketing/marketing-dashboard-navigation.md +52 -0
  88. package/skills/wix-manage/references/pricing-plans/create-and-update-pricing-plans.md +99 -1
  89. package/skills/wix-manage/references/pricing-plans/pricing-plans-dashboard-navigation.md +45 -0
  90. package/skills/wix-manage/references/restaurants/restaurants-dashboard-navigation.md +68 -0
  91. package/skills/wix-manage/references/restaurants/wix-restaurants-setup.md +94 -125
  92. package/skills/wix-manage/references/site-properties/change-payment-currency-site-properties.md +48 -9
  93. package/skills/wix-manage/references/site-properties/site-properties-dashboard-navigation.md +31 -0
  94. package/skills/wix-manage/references/sites/create-headless-site.md +52 -0
  95. package/skills/wix-manage/references/sites/create-site-from-template.md +2 -25
  96. package/skills/wix-manage/references/sites/site-import.md +217 -192
  97. package/skills/wix-manage/references/sites/sites-dashboard-navigation.md +29 -0
  98. package/skills/wix-manage/references/stores/add-store-pages-to-site.md +17 -1
  99. package/skills/wix-manage/references/stores/find-products-query-and-search-catalog-v3.md +26 -8
  100. package/skills/wix-manage/references/stores/stores-dashboard-navigation.md +65 -0
  101. package/skills/wix-manage/references/stores/update-product-with-options.md +39 -7
  102. package/skills/wix-replatform/.publish-manifest.json +8 -0
  103. package/skills/wix-replatform/SKILL.md +693 -0
  104. package/skills/wix-replatform/lib/artifact-freshness.js +215 -0
  105. package/skills/wix-replatform/lib/completion-report.js +200 -0
  106. package/skills/wix-replatform/lib/config-env.js +59 -0
  107. package/skills/wix-replatform/lib/execution-manifest.js +185 -0
  108. package/skills/wix-replatform/lib/execution-state.js +173 -0
  109. package/skills/wix-replatform/lib/import-recovery.js +313 -0
  110. package/skills/wix-replatform/lib/local-state.js +642 -0
  111. package/skills/wix-replatform/lib/orchestration-preflight.js +143 -0
  112. package/skills/wix-replatform/lib/orchestration-router.js +122 -0
  113. package/skills/wix-replatform/lib/orchestration-state.js +455 -0
  114. package/skills/wix-replatform/lib/progress-log.js +224 -0
  115. package/skills/wix-replatform/lib/progress-log.sh +140 -0
  116. package/skills/wix-replatform/lib/url-preservation-state.js +391 -0
  117. package/skills/wix-replatform/resources/rp-discovery/SKILL.md +184 -0
  118. package/skills/wix-replatform/resources/rp-execute-import/SKILL.md +529 -0
  119. package/skills/wix-replatform/resources/rp-execute-setup/SKILL.md +316 -0
  120. package/skills/wix-replatform/resources/rp-execute-setup/scripts/mint-token.sh +64 -0
  121. package/skills/wix-replatform/resources/rp-import-codegen/SKILL.md +1114 -0
  122. package/skills/wix-replatform/resources/rp-mapper/SKILL.md +430 -0
  123. package/skills/wix-replatform/resources/rp-mapper/lib/mapping-resolve.js +217 -0
  124. package/skills/wix-replatform/resources/rp-mapper/scripts/resolve-mapping.js +148 -0
  125. package/skills/wix-replatform/resources/rp-mapper/wix-business-solutions-taxonomy.md +378 -0
  126. package/skills/wix-replatform/resources/rp-setup-discovery/SKILL.md +183 -0
  127. package/skills/wix-replatform/resources/rp-source-csv/SKILL.md +478 -0
  128. package/skills/wix-replatform/resources/rp-source-csv/lib/canonical-record.js +136 -0
  129. package/skills/wix-replatform/resources/rp-source-csv/lib/csv-fileset.js +0 -0
  130. package/skills/wix-replatform/resources/rp-source-csv/lib/csv-fingerprint.js +310 -0
  131. package/skills/wix-replatform/resources/rp-source-csv/lib/csv-layout.js +1081 -0
  132. package/skills/wix-replatform/resources/rp-source-csv/lib/csv-parse.js +618 -0
  133. package/skills/wix-replatform/resources/rp-source-csv/scripts/csv-discovery.js +949 -0
  134. package/skills/wix-replatform/resources/rp-source-csv/source-schema.example.json +196 -0
  135. package/skills/wix-replatform/resources/rp-source-csv/vendors/bigcommerce.json +66 -0
  136. package/skills/wix-replatform/resources/rp-source-csv/vendors/magento.json +60 -0
  137. package/skills/wix-replatform/resources/rp-source-csv/vendors/shopify.json +95 -0
  138. package/skills/wix-replatform/resources/rp-source-csv/vendors/woocommerce.json +82 -0
  139. package/skills/wix-replatform/resources/rp-source-wordpress/SKILL.md +256 -0
  140. package/skills/wix-replatform/resources/rp-source-wordpress/lib/wp-http.js +249 -0
  141. package/skills/wix-replatform/resources/rp-source-wordpress/lib/wp-route-classifier.js +444 -0
  142. package/skills/wix-replatform/resources/rp-source-wordpress/scripts/wp-discovery.js +774 -0
  143. package/skills/wix-replatform/resources/rp-source-wordpress/source-schema.example.json +71 -0
  144. package/skills/wix-replatform/resources/rp-target-wix/SKILL.md +632 -0
  145. package/skills/wix-replatform/resources/rp-target-wix/SPEC-product-reviews-and-blog-authorship.md +330 -0
  146. package/skills/wix-replatform/resources/rp-target-wix/domains/README.md +21 -0
  147. package/skills/wix-replatform/resources/rp-target-wix/domains/blog/domain.json +19 -0
  148. package/skills/wix-replatform/resources/rp-target-wix/domains/blog/entities/category.json +37 -0
  149. package/skills/wix-replatform/resources/rp-target-wix/domains/blog/entities/comment.json +37 -0
  150. package/skills/wix-replatform/resources/rp-target-wix/domains/blog/entities/post.json +39 -0
  151. package/skills/wix-replatform/resources/rp-target-wix/domains/blog/entities/tag.json +35 -0
  152. package/skills/wix-replatform/resources/rp-target-wix/domains/cms/domain.json +14 -0
  153. package/skills/wix-replatform/resources/rp-target-wix/domains/cms/entities/collection.json +35 -0
  154. package/skills/wix-replatform/resources/rp-target-wix/domains/cms/entities/data-item.json +36 -0
  155. package/skills/wix-replatform/resources/rp-target-wix/domains/cms/entities/reference.json +35 -0
  156. package/skills/wix-replatform/resources/rp-target-wix/domains/crm/domain.json +14 -0
  157. package/skills/wix-replatform/resources/rp-target-wix/domains/crm/entities/contact.json +131 -0
  158. package/skills/wix-replatform/resources/rp-target-wix/domains/crm/entities/email-subscription.json +37 -0
  159. package/skills/wix-replatform/resources/rp-target-wix/domains/crm/entities/label.json +37 -0
  160. package/skills/wix-replatform/resources/rp-target-wix/domains/ecom/domain.json +21 -0
  161. package/skills/wix-replatform/resources/rp-target-wix/domains/ecom/entities/order-line-item.json +37 -0
  162. package/skills/wix-replatform/resources/rp-target-wix/domains/ecom/entities/order-refund.json +37 -0
  163. package/skills/wix-replatform/resources/rp-target-wix/domains/ecom/entities/order.json +97 -0
  164. package/skills/wix-replatform/resources/rp-target-wix/domains/index.json +528 -0
  165. package/skills/wix-replatform/resources/rp-target-wix/domains/media/domain.json +14 -0
  166. package/skills/wix-replatform/resources/rp-target-wix/domains/media/entities/media-file.json +38 -0
  167. package/skills/wix-replatform/resources/rp-target-wix/domains/media/entities/media-folder.json +37 -0
  168. package/skills/wix-replatform/resources/rp-target-wix/domains/members/domain.json +13 -0
  169. package/skills/wix-replatform/resources/rp-target-wix/domains/members/entities/badge.json +37 -0
  170. package/skills/wix-replatform/resources/rp-target-wix/domains/members/entities/member.json +53 -0
  171. package/skills/wix-replatform/resources/rp-target-wix/domains/schema.json +84 -0
  172. package/skills/wix-replatform/resources/rp-target-wix/domains/stores/domain.json +25 -0
  173. package/skills/wix-replatform/resources/rp-target-wix/domains/stores/entities/category.json +37 -0
  174. package/skills/wix-replatform/resources/rp-target-wix/domains/stores/entities/coupon.json +37 -0
  175. package/skills/wix-replatform/resources/rp-target-wix/domains/stores/entities/inventory-item.json +38 -0
  176. package/skills/wix-replatform/resources/rp-target-wix/domains/stores/entities/product-tag.json +37 -0
  177. package/skills/wix-replatform/resources/rp-target-wix/domains/stores/entities/product.json +90 -0
  178. package/skills/wix-replatform/resources/rp-target-wix/lib/audit-summary.js +64 -0
  179. package/skills/wix-replatform/resources/rp-target-wix/lib/contract-ledger.js +141 -0
  180. package/skills/wix-replatform/resources/rp-target-wix/lib/domain-knowledge.js +384 -0
  181. package/skills/wix-replatform/resources/rp-target-wix/lib/ndjson.js +260 -0
  182. package/skills/wix-replatform/resources/rp-target-wix/lib/stores-verification.js +238 -0
  183. package/skills/wix-replatform/resources/rp-target-wix/lib/wix-build.js +237 -0
  184. package/skills/wix-replatform/resources/rp-target-wix/lib/wix-target-spec.js +238 -0
  185. package/skills/wix-replatform/resources/rp-target-wix/lib/wix-writers.js +2219 -0
  186. package/skills/wix-replatform/resources/rp-target-wix/scripts/domain-knowledge-validate.js +31 -0
  187. package/skills/wix-replatform/resources/rp-target-wix/scripts/domain-knowledge.js +100 -0
  188. package/skills/wix-replatform/resources/rp-target-wix/scripts/verify-stores.js +107 -0
  189. package/skills/wix-replatform/resources/rp-telemetry/SKILL.md +344 -0
  190. package/skills/wix-replatform/resources/rp-telemetry/lib/bi-sink.js +250 -0
  191. package/skills/wix-replatform/resources/rp-telemetry/lib/telemetry-recorder.js +1927 -0
  192. package/skills/wix-replatform/resources/rp-telemetry/scripts/meter-from-audit.js +83 -0
  193. package/skills/wix-replatform/resources/rp-telemetry/scripts/rp-telemetry.js +141 -0
  194. package/skills/wix-replatform/scripts/artifact-freshness.js +76 -0
  195. package/skills/wix-replatform/scripts/execution-manifest-validate.js +43 -0
  196. package/skills/wix-replatform/scripts/execution-state-prepare.js +128 -0
  197. package/skills/wix-replatform/scripts/orchestration-preflight.js +48 -0
  198. package/skills/wix-replatform/scripts/orchestration-route.js +46 -0
  199. package/skills/wix-replatform/scripts/orchestration-state.js +245 -0
  200. package/skills/wix-vibe-headless/SKILL.md +49 -25
  201. package/skills/wix-vibe-headless/install/deploy.cjs +156 -0
  202. package/skills/wix-vibe-headless/install/pin-agents-md.cjs +34 -0
  203. package/skills/wix-vibe-headless/platforms/README.md +8 -4
  204. package/skills/wix-vibe-headless/platforms/base44.md +111 -101
  205. package/skills/wix-vibe-headless/platforms/generic.md +99 -64
  206. package/skills/wix-vibe-headless/references/blog/INSTRUCTIONS.md +226 -119
  207. package/skills/wix-vibe-headless/references/blog/app/components/PostCard.jsx +43 -0
  208. package/skills/wix-vibe-headless/references/blog/app/components/PostChips.jsx +25 -0
  209. package/skills/wix-vibe-headless/references/blog/app/components/PostGrid.jsx +15 -0
  210. package/skills/wix-vibe-headless/references/blog/app/context/TaxonomyContext.jsx +35 -0
  211. package/skills/wix-vibe-headless/references/blog/app/hooks/usePostDetail.js +38 -0
  212. package/skills/wix-vibe-headless/references/blog/app/pages/Blog.jsx +40 -0
  213. package/skills/wix-vibe-headless/references/blog/app/pages/CategoryPage.jsx +54 -0
  214. package/skills/wix-vibe-headless/references/blog/app/pages/PostDetail.jsx +65 -0
  215. package/skills/wix-vibe-headless/references/blog/app/pages/TagPage.jsx +50 -0
  216. package/skills/wix-vibe-headless/references/blog/seed/SEED.md +103 -0
  217. package/skills/wix-vibe-headless/references/blog/seed/seed-blog.js +270 -0
  218. package/skills/wix-vibe-headless/references/bookings/INSTRUCTIONS.md +256 -149
  219. package/skills/wix-vibe-headless/references/bookings/app/components/BookingForm.jsx +65 -0
  220. package/skills/wix-vibe-headless/references/bookings/app/components/ServiceCard.jsx +47 -0
  221. package/skills/wix-vibe-headless/references/bookings/app/components/ServiceGrid.jsx +13 -0
  222. package/skills/wix-vibe-headless/references/bookings/app/components/SlotPicker.jsx +126 -0
  223. package/skills/wix-vibe-headless/references/bookings/app/hooks/useServiceDetail.js +108 -0
  224. package/skills/wix-vibe-headless/references/bookings/app/hooks/useServices.js +58 -0
  225. package/skills/wix-vibe-headless/references/bookings/app/lib/serviceFacts.js +95 -0
  226. package/skills/wix-vibe-headless/references/bookings/app/pages/ServiceDetail.jsx +94 -0
  227. package/skills/wix-vibe-headless/references/bookings/app/pages/Services.jsx +89 -0
  228. package/skills/wix-vibe-headless/references/bookings/{wix-bookings-checkout.js → app/rest/wix-bookings-checkout.js} +1 -1
  229. package/skills/wix-vibe-headless/references/bookings/{wix-bookings-services.js → app/rest/wix-bookings-services.js} +87 -11
  230. package/skills/wix-vibe-headless/references/bookings/seed/SEED.md +117 -0
  231. package/skills/wix-vibe-headless/references/bookings/seed/seed-bookings.js +333 -0
  232. package/skills/wix-vibe-headless/references/cms/INSTRUCTIONS.md +168 -147
  233. package/skills/wix-vibe-headless/references/cms/app/collection.config.js +31 -0
  234. package/skills/wix-vibe-headless/references/cms/app/lib/wixImage.js +18 -0
  235. package/skills/wix-vibe-headless/references/cms/{wix-cms.js → app/rest/wix-cms.js} +47 -2
  236. package/skills/wix-vibe-headless/references/cms/seed/SEED.md +145 -0
  237. package/skills/wix-vibe-headless/references/events/INSTRUCTIONS.md +223 -131
  238. package/skills/wix-vibe-headless/references/events/app/components/CategoryFilter.jsx +23 -0
  239. package/skills/wix-vibe-headless/references/events/app/components/EventCard.jsx +43 -0
  240. package/skills/wix-vibe-headless/references/events/app/components/EventGrid.jsx +13 -0
  241. package/skills/wix-vibe-headless/references/events/app/components/EventRegistration.jsx +29 -0
  242. package/skills/wix-vibe-headless/references/events/app/components/RsvpForm.jsx +57 -0
  243. package/skills/wix-vibe-headless/references/events/app/components/TicketPicker.jsx +78 -0
  244. package/skills/wix-vibe-headless/references/events/app/hooks/useEventDetail.js +27 -0
  245. package/skills/wix-vibe-headless/references/events/app/hooks/useEventsList.js +54 -0
  246. package/skills/wix-vibe-headless/references/events/app/hooks/useRsvpForm.js +40 -0
  247. package/skills/wix-vibe-headless/references/events/app/hooks/useTicketing.js +81 -0
  248. package/skills/wix-vibe-headless/references/events/app/pages/EventDetail.jsx +48 -0
  249. package/skills/wix-vibe-headless/references/events/app/pages/Events.jsx +36 -0
  250. package/skills/wix-vibe-headless/references/events/{wix-events-browse.js → app/rest/wix-events-browse.js} +1 -1
  251. package/skills/wix-vibe-headless/references/events/seed/SEED.md +107 -0
  252. package/skills/wix-vibe-headless/references/events/seed/seed-events.js +251 -0
  253. package/skills/wix-vibe-headless/references/members/INSTRUCTIONS.md +272 -188
  254. package/skills/wix-vibe-headless/references/members/app/components/LoginForm.jsx +101 -0
  255. package/skills/wix-vibe-headless/references/members/app/components/MemberMenu.jsx +33 -0
  256. package/skills/wix-vibe-headless/references/members/app/components/RequireAuth.jsx +21 -0
  257. package/skills/wix-vibe-headless/references/members/app/components/SocialButtons.jsx +29 -0
  258. package/skills/wix-vibe-headless/references/members/app/context/MemberContext.jsx +54 -0
  259. package/skills/wix-vibe-headless/references/members/app/hooks/useLoginForm.js +77 -0
  260. package/skills/wix-vibe-headless/references/members/app/pages/Account.jsx +36 -0
  261. package/skills/wix-vibe-headless/references/members/app/pages/Callback.jsx +32 -0
  262. package/skills/wix-vibe-headless/references/members/app/pages/Login.jsx +35 -0
  263. package/skills/wix-vibe-headless/references/members/{wix-members-auth.js → app/rest/wix-members-auth.js} +6 -3
  264. package/skills/wix-vibe-headless/references/members/install/Register.jsx +22 -0
  265. package/skills/wix-vibe-headless/references/members/seed/SEED.md +22 -0
  266. package/skills/wix-vibe-headless/references/portfolio/INSTRUCTIONS.md +229 -104
  267. package/skills/wix-vibe-headless/references/portfolio/app/components/CollectionCard.jsx +31 -0
  268. package/skills/wix-vibe-headless/references/portfolio/app/components/CollectionGrid.jsx +15 -0
  269. package/skills/wix-vibe-headless/references/portfolio/app/components/ProjectCard.jsx +39 -0
  270. package/skills/wix-vibe-headless/references/portfolio/app/components/ProjectGrid.jsx +15 -0
  271. package/skills/wix-vibe-headless/references/portfolio/app/components/ProjectMedia.jsx +29 -0
  272. package/skills/wix-vibe-headless/references/portfolio/app/hooks/useCollectionProjects.js +35 -0
  273. package/skills/wix-vibe-headless/references/portfolio/app/hooks/usePortfolioGallery.js +27 -0
  274. package/skills/wix-vibe-headless/references/portfolio/app/hooks/useProjectDetail.js +25 -0
  275. package/skills/wix-vibe-headless/references/portfolio/app/pages/CollectionPage.jsx +39 -0
  276. package/skills/wix-vibe-headless/references/portfolio/app/pages/Portfolio.jsx +27 -0
  277. package/skills/wix-vibe-headless/references/portfolio/app/pages/ProjectDetail.jsx +60 -0
  278. package/skills/wix-vibe-headless/references/portfolio/seed/SEED.md +94 -0
  279. package/skills/wix-vibe-headless/references/portfolio/seed/seed-portfolio.js +236 -0
  280. package/skills/wix-vibe-headless/references/pricing-plans/INSTRUCTIONS.md +236 -117
  281. package/skills/wix-vibe-headless/references/pricing-plans/app/components/OrderCard.jsx +35 -0
  282. package/skills/wix-vibe-headless/references/pricing-plans/app/components/PlanCard.jsx +48 -0
  283. package/skills/wix-vibe-headless/references/pricing-plans/app/components/PlanGrid.jsx +16 -0
  284. package/skills/wix-vibe-headless/references/pricing-plans/app/components/PlanPrice.jsx +35 -0
  285. package/skills/wix-vibe-headless/references/pricing-plans/app/hooks/useMyPlans.js +25 -0
  286. package/skills/wix-vibe-headless/references/pricing-plans/app/hooks/usePlanDetail.js +28 -0
  287. package/skills/wix-vibe-headless/references/pricing-plans/app/hooks/usePlans.js +30 -0
  288. package/skills/wix-vibe-headless/references/pricing-plans/app/pages/MyPlans.jsx +30 -0
  289. package/skills/wix-vibe-headless/references/pricing-plans/app/pages/PlanDetail.jsx +53 -0
  290. package/skills/wix-vibe-headless/references/pricing-plans/app/pages/Plans.jsx +28 -0
  291. package/skills/wix-vibe-headless/references/pricing-plans/seed/SEED.md +86 -0
  292. package/skills/wix-vibe-headless/references/pricing-plans/seed/seed-pricing-plans.js +251 -0
  293. package/skills/wix-vibe-headless/references/restaurants/INSTRUCTIONS.md +244 -124
  294. package/skills/wix-vibe-headless/references/restaurants/app/components/ItemDialog.jsx +81 -0
  295. package/skills/wix-vibe-headless/references/restaurants/app/components/MenuItemCard.jsx +71 -0
  296. package/skills/wix-vibe-headless/references/restaurants/app/components/MenuList.jsx +43 -0
  297. package/skills/wix-vibe-headless/references/restaurants/app/components/OrderCartButton.jsx +21 -0
  298. package/skills/wix-vibe-headless/references/restaurants/app/components/OrderCartDrawer.jsx +60 -0
  299. package/skills/wix-vibe-headless/references/restaurants/app/context/OrderCartContext.jsx +63 -0
  300. package/skills/wix-vibe-headless/references/restaurants/app/hooks/useItemOrder.js +32 -0
  301. package/skills/wix-vibe-headless/references/restaurants/app/hooks/useReservation.js +73 -0
  302. package/skills/wix-vibe-headless/references/restaurants/app/pages/Menu.jsx +28 -0
  303. package/skills/wix-vibe-headless/references/restaurants/app/pages/Reservations.jsx +102 -0
  304. package/skills/wix-vibe-headless/references/restaurants/seed/SEED.md +180 -0
  305. package/skills/wix-vibe-headless/references/restaurants/seed/seed-restaurants.js +452 -0
  306. package/skills/wix-vibe-headless/references/shared/app/components/WixManageBanner.jsx +56 -0
  307. package/skills/wix-vibe-headless/references/shared/{wix-client.js → app/rest/wix-client.js} +6 -8
  308. package/skills/wix-vibe-headless/references/shared/app/rest/wix-config.js +8 -0
  309. package/skills/wix-vibe-headless/references/storefront/INSTRUCTIONS.md +259 -157
  310. package/skills/wix-vibe-headless/references/storefront/app/components/CartButton.jsx +20 -0
  311. package/skills/wix-vibe-headless/references/storefront/app/components/CartDrawer.jsx +150 -0
  312. package/skills/wix-vibe-headless/references/storefront/app/components/ProductCard.jsx +167 -0
  313. package/skills/wix-vibe-headless/references/storefront/app/components/ProductGallery.jsx +51 -0
  314. package/skills/wix-vibe-headless/references/storefront/app/components/ProductGrid.jsx +54 -0
  315. package/skills/wix-vibe-headless/references/storefront/app/components/VariantPicker.jsx +119 -0
  316. package/skills/wix-vibe-headless/references/storefront/app/context/CartContext.jsx +71 -0
  317. package/skills/wix-vibe-headless/references/storefront/app/hooks/useProductDetail.js +109 -0
  318. package/skills/wix-vibe-headless/references/storefront/app/hooks/useShop.js +98 -0
  319. package/skills/wix-vibe-headless/references/storefront/app/lib/storeImage.js +27 -0
  320. package/skills/wix-vibe-headless/references/storefront/app/pages/ProductDetail.jsx +139 -0
  321. package/skills/wix-vibe-headless/references/storefront/app/pages/Shop.jsx +75 -0
  322. package/skills/wix-vibe-headless/references/storefront/{wix-store-cart.js → app/rest/wix-store-cart.js} +1 -1
  323. package/skills/wix-vibe-headless/references/storefront/{wix-store-catalog.js → app/rest/wix-store-catalog.js} +20 -1
  324. package/skills/wix-vibe-headless/references/storefront/seed/SEED.md +111 -0
  325. package/skills/wix-vibe-headless/references/storefront/seed/seed-store.js +338 -0
  326. /package/skills/wix-vibe-headless/references/blog/{wix-blog.js → app/rest/wix-blog.js} +0 -0
  327. /package/skills/wix-vibe-headless/references/events/{wix-events-registration.js → app/rest/wix-events-registration.js} +0 -0
  328. /package/skills/wix-vibe-headless/references/portfolio/{wix-portfolio.js → app/rest/wix-portfolio.js} +0 -0
  329. /package/skills/wix-vibe-headless/references/pricing-plans/{wix-pricing-plans.js → app/rest/wix-pricing-plans.js} +0 -0
  330. /package/skills/wix-vibe-headless/references/restaurants/{wix-restaurants-menu.js → app/rest/wix-restaurants-menu.js} +0 -0
  331. /package/skills/wix-vibe-headless/references/restaurants/{wix-restaurants-ordering.js → app/rest/wix-restaurants-ordering.js} +0 -0
  332. /package/skills/wix-vibe-headless/references/restaurants/{wix-restaurants-reservations.js → app/rest/wix-restaurants-reservations.js} +0 -0
@@ -0,0 +1,245 @@
1
+ #!/usr/bin/env node
2
+ 'use strict';
3
+
4
+ const path = require('node:path');
5
+ const {
6
+ nowIso,
7
+ randomId,
8
+ orchestrationDir,
9
+ loadArtifacts,
10
+ initArtifacts,
11
+ validateArtifacts,
12
+ writeJsonAtomic,
13
+ appendEvent,
14
+ updateDecisionObject,
15
+ updateApprovalObject,
16
+ updateCheckpointObject,
17
+ transitionRun,
18
+ } = require('../lib/orchestration-state.js');
19
+ const { createProgressLogger, parseProgressArgs } = require('../lib/progress-log.js');
20
+
21
+ let progress;
22
+
23
+ function usage() {
24
+ console.log(`Usage:
25
+ node scripts/orchestration-state.js init --project-dir <dir> [--project-id <id>]
26
+ node scripts/orchestration-state.js validate --project-dir <dir>
27
+ node scripts/orchestration-state.js status --project-dir <dir>
28
+ node scripts/orchestration-state.js decide --project-dir <dir> --key <decisionKey> --value <jsonOrString> [--source user|deterministic_inference|prior_artifact] [--rationale <text>]
29
+ node scripts/orchestration-state.js approve --project-dir <dir> --type mapping|execution --status pending|approved|rejected|provisional [--notes <text>] [--decided-by user|system]
30
+ node scripts/orchestration-state.js checkpoint --project-dir <dir> --phase discovery|mapping|setup|codegen|execution --patch <json>
31
+ node scripts/orchestration-state.js transition --project-dir <dir> --state <state> --phase <activePhase> [--status <runStatus>] [--needs-user-input true|false] [--needs-llm true|false] [--resume-from <jsonReasonRef>]
32
+ `);
33
+ }
34
+
35
+ function parseArgs(argv) {
36
+ const args = { _: [] };
37
+ for (let i = 0; i < argv.length; i += 1) {
38
+ const token = argv[i];
39
+ if (!token.startsWith('--')) {
40
+ args._.push(token);
41
+ continue;
42
+ }
43
+ const key = token.slice(2).replace(/-([a-z])/g, (_, c) => c.toUpperCase());
44
+ args[key] = argv[i + 1];
45
+ i += 1;
46
+ }
47
+ return args;
48
+ }
49
+
50
+ function parseMaybeJson(value) {
51
+ if (value == null) {
52
+ return value;
53
+ }
54
+ try {
55
+ return JSON.parse(value);
56
+ } catch {
57
+ return value;
58
+ }
59
+ }
60
+
61
+ function parseBoolean(value, fallback) {
62
+ if (value == null) {
63
+ return fallback;
64
+ }
65
+ return String(value) === 'true';
66
+ }
67
+
68
+ async function saveArtifacts(projectDir, artifacts) {
69
+ const dir = orchestrationDir(projectDir);
70
+ await writeJsonAtomic(path.join(dir, 'run.json'), artifacts.run);
71
+ await writeJsonAtomic(path.join(dir, 'checkpoints.json'), artifacts.checkpoints);
72
+ await writeJsonAtomic(path.join(dir, 'decisions.json'), artifacts.decisions);
73
+ await writeJsonAtomic(path.join(dir, 'approvals.json'), artifacts.approvals);
74
+ if (artifacts.preflight) {
75
+ await writeJsonAtomic(path.join(dir, 'preflight.json'), artifacts.preflight);
76
+ }
77
+ }
78
+
79
+ async function main() {
80
+ const parsed = parseProgressArgs(process.argv.slice(2));
81
+ progress = createProgressLogger({
82
+ script: 'skills/replatform/scripts/orchestration-state.js',
83
+ ...parsed.progress,
84
+ });
85
+ progress.start('Orchestration state command started', { phase: 'orchestration' });
86
+
87
+ const args = parseArgs(parsed.args);
88
+ const command = args._[0];
89
+ if (!command || command === 'help') {
90
+ usage();
91
+ if (command) {
92
+ progress.complete('Orchestration state help shown', { phase: 'orchestration', step: 'help' });
93
+ } else {
94
+ progress.error('Missing orchestration state command', { phase: 'orchestration' });
95
+ }
96
+ process.exit(command ? 0 : 1);
97
+ }
98
+
99
+ if (!args.projectDir) {
100
+ throw new Error('--project-dir is required');
101
+ }
102
+ const projectDir = path.resolve(args.projectDir);
103
+
104
+ if (command === 'init') {
105
+ const artifacts = await initArtifacts(projectDir, { projectId: args.projectId || path.basename(projectDir) });
106
+ console.log(JSON.stringify({ ok: true, projectDir, state: artifacts.run.currentState }, null, 2));
107
+ progress.complete('Orchestration artifacts initialized', { phase: 'orchestration', step: 'init', artifact: projectDir });
108
+ return;
109
+ }
110
+
111
+ const artifacts = await loadArtifacts(projectDir);
112
+ if (!artifacts.run) {
113
+ throw new Error(`orchestration artifacts not initialized under ${projectDir}`);
114
+ }
115
+
116
+ if (command === 'validate') {
117
+ const result = validateArtifacts(artifacts);
118
+ console.log(JSON.stringify(result, null, 2));
119
+ if (result.ok) {
120
+ progress.complete('Orchestration artifacts validated', { phase: 'orchestration', step: 'validate', artifact: projectDir });
121
+ } else {
122
+ progress.error('Orchestration artifact validation failed', { phase: 'orchestration', step: 'validate', artifact: projectDir, count: result.errors.length, unit: 'errors' });
123
+ }
124
+ process.exit(result.ok ? 0 : 1);
125
+ }
126
+
127
+ if (command === 'status') {
128
+ const result = validateArtifacts(artifacts);
129
+ console.log(JSON.stringify({
130
+ ok: result.ok,
131
+ currentState: artifacts.run.currentState,
132
+ activePhase: artifacts.run.activePhase,
133
+ runStatus: artifacts.run.status,
134
+ approvals: artifacts.approvals,
135
+ checkpointStatus: {
136
+ discovery: artifacts.checkpoints.discovery.status,
137
+ mapping: artifacts.checkpoints.mapping.status,
138
+ setup: artifacts.checkpoints.setup.status,
139
+ codegen: artifacts.checkpoints.codegen.status,
140
+ execution: artifacts.checkpoints.execution.status,
141
+ },
142
+ errors: result.errors,
143
+ }, null, 2));
144
+ if (result.ok) {
145
+ progress.complete('Orchestration status read', { phase: 'orchestration', step: 'status', artifact: projectDir });
146
+ } else {
147
+ progress.error('Orchestration status is invalid', { phase: 'orchestration', step: 'status', artifact: projectDir, count: result.errors.length, unit: 'errors' });
148
+ }
149
+ process.exit(result.ok ? 0 : 1);
150
+ }
151
+
152
+ if (command === 'decide') {
153
+ if (!args.key || args.value == null) {
154
+ throw new Error('decide requires --key and --value');
155
+ }
156
+ updateDecisionObject(artifacts.decisions, args.key, parseMaybeJson(args.value), {
157
+ source: args.source || 'user',
158
+ rationale: args.rationale || null,
159
+ timestamp: nowIso(),
160
+ });
161
+ await saveArtifacts(projectDir, artifacts);
162
+ await appendEvent(projectDir, {
163
+ id: randomId('evt'),
164
+ timestamp: nowIso(),
165
+ phase: artifacts.run.activePhase,
166
+ state: artifacts.run.currentState,
167
+ type: 'decision.recorded',
168
+ payload: { key: args.key },
169
+ });
170
+ console.log(JSON.stringify({ ok: true, decision: args.key }, null, 2));
171
+ progress.complete('Orchestration decision recorded', { phase: 'orchestration', step: 'decide', entity: args.key, artifact: projectDir });
172
+ return;
173
+ }
174
+
175
+ if (command === 'approve') {
176
+ if (!args.type || !args.status) {
177
+ throw new Error('approve requires --type and --status');
178
+ }
179
+ updateApprovalObject(artifacts.approvals, args.type, args.status, {
180
+ notes: args.notes || null,
181
+ decidedBy: args.decidedBy || 'user',
182
+ timestamp: nowIso(),
183
+ });
184
+ await saveArtifacts(projectDir, artifacts);
185
+ await appendEvent(projectDir, {
186
+ id: randomId('evt'),
187
+ timestamp: nowIso(),
188
+ phase: artifacts.run.activePhase,
189
+ state: artifacts.run.currentState,
190
+ type: 'approval.updated',
191
+ payload: { approvalType: args.type, status: args.status },
192
+ });
193
+ console.log(JSON.stringify({ ok: true, approvalType: args.type, status: args.status }, null, 2));
194
+ progress.complete('Orchestration approval updated', { phase: 'orchestration', step: 'approve', entity: args.type, artifact: projectDir });
195
+ return;
196
+ }
197
+
198
+ if (command === 'checkpoint') {
199
+ if (!args.phase || !args.patch) {
200
+ throw new Error('checkpoint requires --phase and --patch');
201
+ }
202
+ updateCheckpointObject(artifacts.checkpoints, args.phase, parseMaybeJson(args.patch), nowIso());
203
+ await saveArtifacts(projectDir, artifacts);
204
+ console.log(JSON.stringify({ ok: true, phase: args.phase }, null, 2));
205
+ progress.complete('Orchestration checkpoint updated', { phase: 'orchestration', step: 'checkpoint', entity: args.phase, artifact: projectDir });
206
+ return;
207
+ }
208
+
209
+ if (command === 'transition') {
210
+ if (!args.state || !args.phase) {
211
+ throw new Error('transition requires --state and --phase');
212
+ }
213
+ artifacts.run = transitionRun(artifacts.run, {
214
+ state: args.state,
215
+ activePhase: args.phase,
216
+ status: args.status || artifacts.run.status,
217
+ needsUserInput: parseBoolean(args.needsUserInput, artifacts.run.needsUserInput),
218
+ needsLlm: parseBoolean(args.needsLlm, artifacts.run.needsLlm),
219
+ resumeFrom: args.resumeFrom ? parseMaybeJson(args.resumeFrom) : artifacts.run.resumeFrom,
220
+ timestamp: nowIso(),
221
+ });
222
+ await saveArtifacts(projectDir, artifacts);
223
+ await appendEvent(projectDir, {
224
+ id: randomId('evt'),
225
+ timestamp: nowIso(),
226
+ phase: artifacts.run.activePhase,
227
+ state: artifacts.run.currentState,
228
+ type: 'state.transitioned',
229
+ payload: { activePhase: artifacts.run.activePhase, runStatus: artifacts.run.status },
230
+ });
231
+ console.log(JSON.stringify({ ok: true, state: artifacts.run.currentState, phase: artifacts.run.activePhase }, null, 2));
232
+ progress.complete('Orchestration state transitioned', { phase: 'orchestration', step: 'transition', entity: args.state, artifact: projectDir });
233
+ return;
234
+ }
235
+
236
+ throw new Error(`unknown command: ${command}`);
237
+ }
238
+
239
+ main().catch((error) => {
240
+ if (progress) {
241
+ progress.error(error && error.message ? error.message : 'Orchestration state command failed', { phase: 'orchestration' });
242
+ }
243
+ console.error(error && error.message ? error.message : error);
244
+ process.exit(1);
245
+ });
@@ -39,7 +39,7 @@ This skill is the deliberately **client-only, REST-only** path. It is independen
39
39
  - **Auth = one public client id.** `WIX_CLIENT_ID` is a **buyer/visitor-facing** credential —
40
40
  it only mints anonymous visitor tokens. It is **not a secret**; hardcoding and committing it
41
41
  is fine. The user provides it (their vibe/host platform surfaces a copyable prompt with the
42
- id filled in). Paste it into `wix-client.js` in place of the `<YOUR-CLIENT-ID>` placeholder.
42
+ id filled in). Paste it into `wix-config.js` in place of the `<YOUR-CLIENT-ID>` placeholder.
43
43
  - **Money/price fields are objects, never scalars.** Every price/amount a Wix API returns —
44
44
  Stores `price.actualPrice`, Bookings service `payment.fixed.price`, Events ticket
45
45
  `registration.tickets.lowestPrice`, and the rest — has the shape `{ value, currency,
@@ -93,14 +93,16 @@ This skill is the deliberately **client-only, REST-only** path. It is independen
93
93
 
94
94
  ## How this skill is structured
95
95
 
96
- `<SKILL_ROOT>` is this file's directory (strip `/SKILL.md`). Two files make up each vertical's
97
- runtime:
96
+ `<SKILL_ROOT>` is this file's directory (strip `/SKILL.md`). Each vertical ships a **complete UI
97
+ client as files** under `references/<vertical>/app/` — `components/`, `pages/`,
98
+ `hooks/`/`context/`, and its REST helpers in `app/rest/` — plus the **shared transport** in
99
+ `references/shared/app/` (`app/rest/wix-client.js` + `wix-config.js`, identical for every vertical).
100
+ Set `WIX_CLIENT_ID` (and `WIX_METASITE_ID`) in `wix-config.js`. Deploying `references/<vertical>/app/`
101
+ and `references/shared/app/` into the app's `src/` puts every file in place — the helpers all land in
102
+ `src/rest/`, so their relative imports resolve.
98
103
 
99
- 1. **The shared transport** — `references/shared/wix-client.js`. **Identical for every vertical.**
100
- Copy it once into the app's `src/rest/` and set `WIX_CLIENT_ID` in it.
101
- 2. **The vertical helper** — `references/<vertical>/<helper>.js`. Copy it into the **same**
102
- `src/rest/` folder (it does `import { wixApiRequest } from "./wix-client.js"`, so the two
103
- files must sit side by side).
104
+ **Where these files live in the app, and how they get there** (pre-installed at setup, or copied
105
+ in) **is your platform's call — follow your platform instructions for that.**
104
106
 
105
107
  Each vertical's `INSTRUCTIONS.md` is the full playbook for that solution: when to use it,
106
108
  prerequisites, the exported API, how to wire it, the hard rules, and a verification checklist.
@@ -111,28 +113,50 @@ prerequisites, the exported API, how to wire it, the hard rules, and a verificat
111
113
  Load the vertical(s) the user's app needs; a project may combine several (e.g. a restaurant
112
114
  with a blog, or a store with pricing plans).
113
115
 
114
- | The user wants… | Vertical | Read | Helper(s) to copy (+ `shared/wix-client.js`) |
115
- |---|---|---|---|
116
- | Online store: products, categories, cart, checkout | **storefront** | `references/storefront/INSTRUCTIONS.md` | `wix-store-catalog.js` + `wix-store-cart.js` |
117
- | Appointments: services, time slots, booking, checkout | **bookings** | `references/bookings/INSTRUCTIONS.md` | `wix-bookings-services.js` + `wix-bookings-checkout.js` |
118
- | Blog/news: post feed, post pages, categories, tags | **blog** | `references/blog/INSTRUCTIONS.md` | `references/blog/wix-blog.js` |
119
- | Events: browse, event page, RSVP, ticketing | **events** | `references/events/INSTRUCTIONS.md` | `wix-events-browse.js` (always) + `wix-events-registration.js` (RSVP/tickets) |
120
- | Portfolio/showcase: collections, projects, media galleries | **portfolio** | `references/portfolio/INSTRUCTIONS.md` | `references/portfolio/wix-portfolio.js` |
121
- | Restaurant: menu, online ordering, table reservations | **restaurants** | `references/restaurants/INSTRUCTIONS.md` | `wix-restaurants-menu.js` (always) + `wix-restaurants-ordering.js` + `wix-restaurants-reservations.js` as needed |
122
- | CMS content: list/detail, filter/search, forms, data CRUD | **cms** | `references/cms/INSTRUCTIONS.md` | `references/cms/wix-cms.js` |
123
- | Plans & pricing: memberships/subscriptions, subscribe, my plans | **pricing-plans** | `references/pricing-plans/INSTRUCTIONS.md` | `references/pricing-plans/wix-pricing-plans.js` |
124
- | Member accounts: custom login/sign-up (email+password, Google/Facebook, SSO), account area, gated content | **members** | `references/members/INSTRUCTIONS.md` | `references/members/wix-members-auth.js` |
116
+ Each vertical's UI + helpers ship in `references/<vertical>/app/`; copy that dir plus
117
+ `references/shared/app/` into the app's `src/` (base44 does this at install via `deploy.cjs`).
118
+
119
+ | The user wants… | Vertical | Read |
120
+ |---|---|---|
121
+ | Online store: products, categories, cart, checkout | **storefront** | `references/storefront/INSTRUCTIONS.md` |
122
+ | Appointments: services, time slots, booking, checkout | **bookings** | `references/bookings/INSTRUCTIONS.md` |
123
+ | Blog/news: post feed, post pages, categories, tags | **blog** | `references/blog/INSTRUCTIONS.md` |
124
+ | Events: browse, event page, RSVP, ticketing | **events** | `references/events/INSTRUCTIONS.md` |
125
+ | Portfolio/showcase: collections, projects, media galleries | **portfolio** | `references/portfolio/INSTRUCTIONS.md` |
126
+ | Restaurant: menu, online ordering, table reservations | **restaurants** | `references/restaurants/INSTRUCTIONS.md` |
127
+ | CMS content: list/detail, filter/search, forms, data CRUD | **cms** | `references/cms/INSTRUCTIONS.md` |
128
+ | Plans & pricing: memberships/subscriptions, subscribe, my plans | **pricing-plans** | `references/pricing-plans/INSTRUCTIONS.md` |
129
+ | Member accounts: custom login/sign-up (email+password, Google/Facebook, SSO), account area, gated content | **members** | `references/members/INSTRUCTIONS.md` |
130
+
131
+ ### When the request doesn't name a Wix Business Solution — ask, or check the site
132
+
133
+ Don't infer which Wix Business Solution to build (stores, bookings, blog, events, portfolio,
134
+ restaurants, CMS, pricing plans, members, etc..) from a vague brief. **Ask the user** one short
135
+ question — what do they offer (products? appointments? posts? events?) — or **check what the
136
+ site actually has**: call a cheap read from each likely solution's helper (`queryProducts`,
137
+ `queryServices`, `queryPosts`, `queryEvents`, …) — authenticated with a visitor token minted
138
+ from the `WIX_CLIENT_ID`, or with an admin token if you have one — and build for the solutions
139
+ that return real content. A `428` "app not installed" (blog: `401`) means
140
+ that solution isn't on the site; sample-looking content ("Sample product 3") proves the app is
141
+ installed, not what the business is about. Never default to store/bookings on silence.
125
142
 
126
143
  ## The run
127
144
 
128
145
  1. **Get `WIX_CLIENT_ID`.** It comes from the user (the handoff prompt from their Wix/vibe
129
146
  platform carries it). If it's missing, ask for it before wiring — nothing works without it.
130
- 2. **Pick the vertical(s)** from the routing table and open each one's `INSTRUCTIONS.md`.
131
- 3. **Copy the two files per vertical** — `shared/wix-client.js` (once) + the vertical helper —
132
- into the app's `src/rest/` (adjust only the import path if the app uses a different folder),
133
- and set `WIX_CLIENT_ID`.
134
- 4. **Wire the UI** to the exported helpers following the vertical's INSTRUCTIONS. Build the UI
135
- however the project wants — these scaffolds ship the REST layer only, no components.
147
+ 2. **Pick the vertical(s)** from the routing table — and when the request doesn't name any,
148
+ **ask or check the site** (see above) instead of guessing. Open each picked vertical's
149
+ `INSTRUCTIONS.md`.
150
+ 3. **Ensure the vertical's files are in place** — copy `references/<vertical>/app/` and
151
+ `references/shared/app/` into the app's `src/`, and set `WIX_CLIENT_ID` in `wix-config.js`. (Where
152
+ and how they get there is your platform's call — see its instructions. On base44 the install step
153
+ writes and verifies `wix-config.js` for you, so there's nothing to set by hand.)
154
+ 4. **Wire the shipped client** following the vertical's INSTRUCTIONS: the components are themed by
155
+ base44's design tokens (`src/index.css` — shadcn palette, already set by the design phase), so
156
+ there's no re-skin step; just wire routes + header/footer through the Layout. The UI ships as
157
+ files — you compose the home page and wire it, you don't rebuild the client. Style what you add
158
+ from the same tokens: every background paired with its own foreground (`bg-primary` with
159
+ `text-primary-foreground`), `border-input` on form controls, `border-border` on cards and dividers.
136
160
  5. **Verify** against the vertical's checklist before declaring done: token persists across
137
161
  reload, live data renders (or a real empty state), and purchases go through the Wix redirect.
138
162
 
@@ -0,0 +1,156 @@
1
+ // Post-install deploy — run by base44.md STEP 1 with the vertical(s) the app needs:
2
+ // node deploy.cjs <vertical> [<vertical> …] --client-id <id> --metasite-id <id>
3
+ // (storefront | bookings | blog | cms | portfolio | pricing-plans | events | members)
4
+ // Pass the two ids from the prompt and this writes src/rest/wix-config.js for you — see WRITE below.
5
+ // Retyping those ids into the file by hand is how a storefront ships with a dead client id.
6
+ // ONE mechanism: recursively copy `app/` -> /app/src. The shared transport (app/rest/wix-client.js,
7
+ // wix-config.js) is copied always; then each named vertical's app/ (its UI + app/rest/ helpers).
8
+ // Deploy every vertical the app actually uses, in one call or across several — an app that needs both
9
+ // members and cms names both, and its CMS helpers then come from the skill instead of being
10
+ // hand-written. Order matters only where two verticals ship a file at the SAME path (both have
11
+ // components/…, pages/…): the first one listed wins, since the copy never overwrites. Verticals whose
12
+ // file sets don't overlap (cms ships utils only, no UI) combine freely.
13
+ // paths are the Base44 sandbox's /app. Re-running is non-destructive: it fills in only missing files,
14
+ // never overwriting the agent's edits (see COPY), so a later call can add a vertical safely.
15
+ // No vertical arg -> deploys just the shared transport; re-run with the vertical(s) once known.
16
+ // NOTE: .cjs on purpose — the app is an ESM package ("type":"module"); a .js here would load as ESM
17
+ // and require()/module.exports would throw.
18
+ const { existsSync, cpSync, readFileSync, writeFileSync } = require('fs');
19
+
20
+ const REF = '/app/.agents/skills/wix-vibe-headless/references';
21
+ const WIX_CONFIG = '/app/src/rest/wix-config.js';
22
+ const VERTICALS = ['storefront', 'bookings', 'blog', 'cms', 'portfolio', 'pricing-plans', 'events', 'members', 'restaurants'];
23
+
24
+ // force:false + errorOnExist:false — fill in only files that AREN'T there yet; never overwrite.
25
+ // A re-run (e.g. the "files missing? re-run" fallback) then restores what's missing without
26
+ // clobbering the agent's edits (wired App.jsx, home/header components) from the first deploy.
27
+ const COPY = { recursive: true, force: false, errorOnExist: false };
28
+
29
+ // --- members vertical only: replace leftover Base44 auth pages -------------------------------
30
+ //
31
+ // Base44 seeds src/pages/Login.jsx + src/pages/Register.jsx into every custom-auth-enrolled app
32
+ // at APP CREATION, before any Wix skill ever runs (backend/app/user_apps/auth_templates/_loader.py
33
+ // in the platform repo). The members vertical's own Login.jsx lands at that SAME path via the COPY
34
+ // above, but COPY's force:false skips it because Base44's file is already there — so the Base44-auth
35
+ // page silently survives instead of the Wix-auth one, and the app ends up with two half-wired auth
36
+ // systems. There is no Wix Register.jsx at all (LoginForm's own "Sign up" tab covers registration),
37
+ // so Base44's Register.jsx was never even in contention — it just sits there, wrong, either way.
38
+ //
39
+ // Fix both, but ONLY when the file currently on disk is still recognizably Base44's boilerplate
40
+ // (imports base44Client / calls base44.auth.*). Never touch a file that's already the Wix version
41
+ // or an agent's own customization — same "don't clobber" contract as COPY above, just evaluated on
42
+ // content instead of mere existence.
43
+ function isBase44AuthBoilerplate(path) {
44
+ if (!existsSync(path)) return false;
45
+ const src = readFileSync(path, 'utf8');
46
+ return src.includes('@/api/base44Client') || src.includes('base44.auth.');
47
+ }
48
+
49
+ // Each entry: the src/ file to repair, and the reference file that replaces it.
50
+ // Login.jsx comes from the vertical's shipped pages; Register.jsx from references/members/install/
51
+ // (a repair stub kept OUT of app/ — this vertical ships no /register route, so a fresh app with no
52
+ // Base44 leftover must not receive it).
53
+ const MEMBERS_AUTH_REPAIRS = [
54
+ { dest: '/app/src/pages/Login.jsx', src: `${REF}/members/app/pages/Login.jsx` },
55
+ { dest: '/app/src/pages/Register.jsx', src: `${REF}/members/install/Register.jsx` },
56
+ ];
57
+
58
+ function replaceMembersAuthLeftovers() {
59
+ const result = {};
60
+ for (const { dest, src } of MEMBERS_AUTH_REPAIRS) {
61
+ const name = dest.split('/').pop().replace('.jsx', '').toLowerCase();
62
+ if (existsSync(src) && isBase44AuthBoilerplate(dest)) {
63
+ cpSync(src, dest, { force: true });
64
+ result[name] = 'replaced_base44_leftover';
65
+ } else {
66
+ result[name] = 'left_as_is';
67
+ }
68
+ }
69
+ return result;
70
+ }
71
+
72
+ // --- WRITE the credentials ----------------------------------------------------------------------
73
+ //
74
+ // The two ids arrive as flags so this script writes them once, character-for-character, instead of a
75
+ // later hand-edit of the placeholder file.
76
+ //
77
+ // An id already in the file wins; the flags only fill what is unset. A host that writes this file
78
+ // at app creation (Base44) has each id as an exact value rather than a copy read out of a prompt.
79
+ // Per id, so a host that resolved one but not the other still gets the gap filled.
80
+ //
81
+ // This briefly worked the other way round for WIX_METASITE_ID, while Base44 could write a different
82
+ // site than the business: it shared one field between the launch and a metasite it provisions per
83
+ // app, and the launch's id lost. Fixed on that side, and the ids it stores now verify against the
84
+ // site each launch came from, so the file is trusted again.
85
+ function readWixConfig() {
86
+ if (!existsSync(WIX_CONFIG)) return {};
87
+ const src = readFileSync(WIX_CONFIG, 'utf8');
88
+ const pick = (name) => {
89
+ const v = (src.match(new RegExp(`${name}\\s*=\\s*["']([^"']*)["']`)) || [])[1] || '';
90
+ return v.startsWith('<') ? '' : v; // the shipped file's `<YOUR-…>` placeholders count as unset
91
+ };
92
+ return { clientId: pick('WIX_CLIENT_ID'), metaSiteId: pick('WIX_METASITE_ID') };
93
+ }
94
+
95
+ function writeWixConfig(clientId, metaSiteId) {
96
+ const body = [
97
+ '// Wix credentials — written by the skill\'s deploy step from the ids in your prompt.',
98
+ '// Safe to commit: WIX_CLIENT_ID is a public, buyer-facing id (it only mints anonymous visitor',
99
+ '// tokens); WIX_METASITE_ID just identifies the site.',
100
+ `export const WIX_CLIENT_ID = "${clientId}";`,
101
+ `export const WIX_METASITE_ID = "${metaSiteId}";`,
102
+ '',
103
+ ].join('\n');
104
+ writeFileSync(WIX_CONFIG, body);
105
+ }
106
+
107
+ // --- main ---------------------------------------------------------------------------------------
108
+
109
+ // Accept one or many: `deploy.cjs members cms`. Duplicates collapse; order is preserved so the
110
+ // first vertical listed wins any same-path file (the copy never overwrites).
111
+ const argv = process.argv.slice(2);
112
+ const flag = (name) => {
113
+ const i = argv.indexOf(`--${name}`);
114
+ return i !== -1 && argv[i + 1] && !argv[i + 1].startsWith('--') ? argv[i + 1] : null;
115
+ };
116
+ const clientId = flag('client-id');
117
+ const metaSiteId = flag('metasite-id');
118
+ // Verticals are the positional args — drop the flags and their values.
119
+ const flagArgs = new Set(['--client-id', '--metasite-id', clientId, metaSiteId].filter(Boolean));
120
+ const requested = [...new Set(argv.filter((a) => !flagArgs.has(a)))];
121
+ const deployed = { verticals: [] };
122
+
123
+ // Shared transport — always (app/rest/wix-client.js, wix-config.js -> src/rest/).
124
+ if (existsSync(`${REF}/shared/app`)) cpSync(`${REF}/shared/app`, '/app/src', COPY);
125
+
126
+ // Each named vertical — its app/ (UI + app/rest/ helpers) -> src/.
127
+ const unknown = requested.filter((v) => !VERTICALS.includes(v));
128
+ for (const vertical of requested.filter((v) => VERTICALS.includes(v))) {
129
+ if (!existsSync(`${REF}/${vertical}/app`)) continue;
130
+ cpSync(`${REF}/${vertical}/app`, '/app/src', COPY);
131
+ deployed.verticals.push(vertical);
132
+ if (vertical === 'members') deployed.authPagesFixed = replaceMembersAuthLeftovers();
133
+ }
134
+
135
+ if (unknown.length) {
136
+ deployed.error = `unknown vertical(s) ${unknown.map((v) => `"${v}"`).join(', ')} — expected: ${VERTICALS.join(', ')}`;
137
+ }
138
+ if (!requested.length) {
139
+ deployed.note = 'no vertical given — deployed the shared transport only; re-run: node deploy.cjs <vertical> [<vertical> …]';
140
+ }
141
+
142
+ const onDisk = readWixConfig();
143
+ const finalClientId = onDisk.clientId || clientId;
144
+ const finalMetaSiteId = onDisk.metaSiteId || metaSiteId;
145
+
146
+ if (!finalClientId || !finalMetaSiteId) {
147
+ deployed.wixConfig = 'missing_ids — src/rest/wix-config.js is not configured; re-run with '
148
+ + '--client-id and --metasite-id rather than editing the file by hand';
149
+ } else if (finalClientId === onDisk.clientId && finalMetaSiteId === onDisk.metaSiteId) {
150
+ deployed.wixConfig = 'already_set';
151
+ } else {
152
+ writeWixConfig(finalClientId, finalMetaSiteId);
153
+ deployed.wixConfig = 'written';
154
+ }
155
+
156
+ console.log(JSON.stringify(deployed));
@@ -0,0 +1,34 @@
1
+ // Pin the skill location + project facts into /app/AGENTS.md so later turns (after the platform
2
+ // build doc leaves context) still know the rules. Idempotent — safe to re-run; writes at most once.
3
+ // Run once by base44.md STEP 1, separately from per-vertical deploys (deploy.cjs), so "copy a
4
+ // vertical's files" and "record the project's ground rules" stay independent concerns.
5
+ // .cjs on purpose — the app is an ESM package ("type":"module"); a .js here would load as ESM and
6
+ // require()/module.exports would throw.
7
+ const { existsSync, readFileSync, appendFileSync } = require('fs');
8
+
9
+ const NOTE = `
10
+
11
+ ## This app — a Wix-managed headless frontend (built with the Wix skills)
12
+
13
+ This project is the **frontend for a Wix-managed business** — a REST client that talks directly to a live Wix site over \`WIX_CLIENT_ID\`. The **Wix site is the source of truth** for all content and commerce; build and seed it only through the Wix connector and the skills below. **Do NOT use the Base44 commerce kit (or any Base44 solution kit).**
14
+
15
+ The Wix skills live under \`.agents/skills/\` — on ANY turn, read them from that exact path (ignore stray copies like \`agent/skills/\`).
16
+
17
+ - \`wix-vibe-headless\` — **how the CLIENT is built AND how the site is seeded**: your vertical's UI client + REST scaffolds are already deployed into \`src/\`; one vertical per capability under \`references/<vertical>/\`, each with a \`seed/\` module that creates content over the connector:
18
+ - **storefront** — sell physical or digital products online.
19
+ - **bookings** — let customers book appointments or services with your business.
20
+ - **blog** — publish articles for visitors to read.
21
+ - **cms** — model and serve your own custom, structured content — for anything the other verticals don't cover.
22
+ - **portfolio** — showcase creative work in collections and project pages.
23
+ - **pricing-plans** — sell memberships or subscriptions to your service.
24
+ - **events** — publish events and handle RSVPs or ticket sales.
25
+ - **members** — let visitors create an account and sign in — this is **auth**.
26
+ - **restaurants** — publish a menu, take online orders, and manage table reservations.
27
+ - \`wix-docs\` — **fallback** for **frontend code**, **backend code**, or **runtime / API management operations** alike: search + read the Wix API reference docs.
28
+ `;
29
+
30
+ const amd = '/app/AGENTS.md';
31
+ const cur = existsSync(amd) ? readFileSync(amd, 'utf8') : '';
32
+ const pinned = !cur.includes('Wix-managed headless frontend');
33
+ if (pinned) appendFileSync(amd, NOTE);
34
+ console.log(JSON.stringify({ agentsMdPinned: pinned }));
@@ -4,10 +4,14 @@ One file per AI-builder platform (Base44, Lovable, Bolt, v0, Manus, …). Each f
4
4
  **handoff prompt** the Wix Headless funnel hands to that platform after it creates the site +
5
5
  OAuth app: build the client, then seed/manage the business.
6
6
 
7
- `generic.md` is the **platform-agnostic** version — same flow (install skills → build client →
8
- seed/manage → wrap up) with no assumptions about a specific platform's tooling. Use it as the
9
- default/fallback for platforms without their own tuned file; `base44.md` is the Base44-specific
10
- one (its exec tool, secret store, pre-configured connector, etc.).
7
+ `generic.md` is the **platform-agnostic** version and the default/fallback for any platform without
8
+ its own tuned file. It is also a **lens over the skill**: the skill's `SKILL.md` + per-vertical
9
+ `INSTRUCTIONS.md` are written for Base44's stack (Vite + react-router + `.jsx`, files pre-copied into
10
+ `src/`), so `generic.md` tells a non-Base44 agent what the skill's three real assets are (the `rest/`
11
+ client layer, the field-shape/route-pattern data contract, the `seed/` functions), which Base44-isms
12
+ to ignore/translate, and the hard rule to **generate into the existing stack — never convert the
13
+ framework**. `base44.md` is the Base44-specific one (its exec tool, secret store, pre-configured
14
+ connector, `deploy.cjs` copy path, etc.).
11
15
 
12
16
  These are hosted (served at `https://www.wix.com/skills/vibe-headless/platforms/<platform>.md`)
13
17
  so the funnel loader can pass a short pointer to the prompt instead of inlining the whole