@wix/agent-skills 1.15.0 → 1.16.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (355) hide show
  1. package/README.md +5 -1
  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 +6 -4
  8. package/skills/wix-app/references/EDITOR_REACT_COMPONENT.md +28 -7
  9. package/skills/wix-app/references/SERVICE_PLUGIN.md +12 -10
  10. package/skills/wix-app/references/STORES_VERSIONING.md +9 -211
  11. package/skills/wix-app/references/app-tools/TOOLS.md +75 -0
  12. package/skills/wix-app/references/backend-event/COMMON-EVENTS.md +5 -0
  13. package/skills/wix-app/references/dashboard-page/DASHBOARD_API.md +2 -2
  14. package/skills/wix-app/references/editor-react-component/A11Y-REVIEW-REFERENCE.md +172 -0
  15. package/skills/wix-app/references/editor-react-component/A11Y-REVIEW.md +138 -0
  16. package/skills/wix-app/references/editor-react-component/ANIMATED-COMPONENTS.md +172 -0
  17. package/skills/wix-app/references/editor-react-component/BRANDED-COMPONENTS.md +29 -0
  18. package/skills/wix-app/references/editor-react-component/COMPONENT-API.md +1 -1
  19. package/skills/wix-app/references/editor-react-component/COMPONENT-PREVIEW.md +57 -0
  20. package/skills/wix-app/references/editor-react-component/CSS-GUIDELINES.md +33 -2
  21. package/skills/wix-app/references/editor-react-component/DESIGN-STATES.md +5 -3
  22. package/skills/wix-app/references/editor-react-component/DIRECTIONALITY.md +18 -1
  23. package/skills/wix-app/references/editor-react-component/PARTS.md +15 -2
  24. package/skills/wix-app/references/editor-react-component/REACT-GUIDELINES.md +4 -3
  25. package/skills/wix-app/references/service-plugin/BOOKINGS-STAFF-SORTING.md +13 -9
  26. package/skills/wix-app/references/service-plugin/DISCOUNT-TRIGGERS.md +4 -0
  27. package/skills/wix-app/references/service-plugin/GIFT-CARDS.md +4 -0
  28. package/skills/wix-app/references/service-plugin/PAYMENT-SETTINGS.md +3 -1
  29. package/skills/wix-app/references/service-plugin/SHIPPING-RATES.md +4 -0
  30. package/skills/wix-app/references/service-plugin/TOOLS_PROVIDER.md +54 -0
  31. package/skills/wix-app/references/stores/CATEGORIES.md +22 -0
  32. package/skills/wix-app/references/stores/GET_PRODUCT.md +99 -0
  33. package/skills/wix-app/references/stores/INVENTORY.md +37 -0
  34. package/skills/wix-app/references/stores/QUERY.md +119 -0
  35. package/skills/wix-app/references/stores/WRITE.md +55 -0
  36. package/skills/wix-docs/SKILL.md +35 -3
  37. package/skills/wix-headless/SKILL.md +9 -2
  38. package/skills/wix-headless/entry/bootstrap.mjs +2 -2
  39. package/skills/wix-headless/entry/skill.md +0 -2
  40. package/skills/wix-headless/references/CAPABILITIES.md +6 -4
  41. package/skills/wix-headless/references/CONTENT.md +36 -0
  42. package/skills/wix-headless/references/DESIGN.md +54 -0
  43. package/skills/wix-headless/references/DISCOVERY.md +25 -1
  44. package/skills/wix-headless/references/FEEDBACK.md +16 -5
  45. package/skills/wix-headless/references/IMAGE_GENERATION.md +10 -0
  46. package/skills/wix-headless/references/SDK_HANDOFF.md +2 -0
  47. package/skills/wix-headless/references/SEED.md +3 -1
  48. package/skills/wix-headless/references/SETUP.md +1 -1
  49. package/skills/wix-headless/references/inline-recipes/how-to-code-a-store.md +3 -2
  50. package/skills/wix-headless/references/inline-recipes/how-to-code-restaurant-reservations.md +42 -2
  51. package/skills/wix-headless/references/inline-recipes/setup-bookings.md +5 -1
  52. package/skills/wix-headless/references/inline-recipes/setup-forms.md +1 -1
  53. package/skills/wix-headless/references/inline-recipes/setup-online-store.md +33 -8
  54. package/skills/wix-headless/references/inline-recipes/setup-portfolio.md +3 -1
  55. package/skills/wix-headless/references/inline-recipes/setup-restaurant-experiences.md +73 -0
  56. package/skills/wix-headless/references/inline-recipes/setup-restaurant-orders.md +38 -2
  57. package/skills/wix-headless/references/inline-recipes/setup-restaurant-reservations.md +20 -1
  58. package/skills/wix-headless/references/inline-recipes/setup-restaurants.md +1 -1
  59. package/skills/wix-headless/references/managed/CONNECT.md +2 -2
  60. package/skills/wix-headless/references/managed/CREATE.md +15 -1
  61. package/skills/wix-headless/references/managed/DEPLOYMENT.md +47 -0
  62. package/skills/wix-headless/references/self-managed/DEPLOYMENT.md +8 -0
  63. package/skills/wix-headless/references/stripe/DEPLOYMENT.md +8 -0
  64. package/skills/wix-manage/SKILL.md +131 -12
  65. package/skills/wix-manage/references/analytics/analytics-dashboard-navigation.md +41 -0
  66. package/skills/wix-manage/references/analytics/query-site-analytics.md +66 -9
  67. package/skills/wix-manage/references/app-installation/app-installation-dashboard-navigation.md +28 -0
  68. package/skills/wix-manage/references/app-installation/install-wix-apps.md +3 -0
  69. package/skills/wix-manage/references/blog/blog-dashboard-navigation.md +56 -0
  70. package/skills/wix-manage/references/blog/how-to-create-blog-posts.md +31 -6
  71. package/skills/wix-manage/references/bookings/booking-service-policy-setup.md +3 -1
  72. package/skills/wix-manage/references/bookings/bookings-dashboard-navigation.md +63 -0
  73. package/skills/wix-manage/references/bookings/create-booking-service-from-prompt.md +6 -5
  74. package/skills/wix-manage/references/bookings/create-course-service.md +30 -5
  75. package/skills/wix-manage/references/bookings/diagnose-availability-issues.md +85 -42
  76. package/skills/wix-manage/references/cms/cms-dashboard-navigation.md +44 -0
  77. package/skills/wix-manage/references/cms/cms-data-items-crud.md +31 -3
  78. package/skills/wix-manage/references/cms/cms-publishing-flow.md +287 -0
  79. package/skills/wix-manage/references/cms/cms-schema-management.md +33 -1
  80. package/skills/wix-manage/references/contacts/contacts-dashboard-navigation.md +46 -0
  81. package/skills/wix-manage/references/contacts/create-a-contact.md +82 -0
  82. package/skills/wix-manage/references/contacts/update-a-contact.md +119 -0
  83. package/skills/wix-manage/references/dashboard-navigation/dashboard-navigation.md +82 -0
  84. package/skills/wix-manage/references/dashboard-navigation/routes.json +1733 -0
  85. package/skills/wix-manage/references/domains/domains-dashboard-navigation.md +32 -0
  86. package/skills/wix-manage/references/ecommerce/ecom-pricing.md +4 -4
  87. package/skills/wix-manage/references/ecommerce/ecom-shipping.md +1 -1
  88. package/skills/wix-manage/references/ecommerce/gift-cards/ecom-gift-cards-goal-sell-gift-cards.md +338 -0
  89. package/skills/wix-manage/references/ecommerce/pricing-promotions/ecom-pricing-create-discount-rule.md +42 -78
  90. package/skills/wix-manage/references/ecommerce/pricing-promotions/ecom-pricing-flow-bundle-and-save.md +1 -1
  91. package/skills/wix-manage/references/ecommerce/pricing-promotions/ecom-pricing-flow-stock-mover.md +1 -1
  92. package/skills/wix-manage/references/ecommerce/pricing-promotions/ecom-pricing-flow-upsell-boost.md +1 -1
  93. package/skills/wix-manage/references/ecommerce/recommend-ecommerce-strategy.md +90 -92
  94. package/skills/wix-manage/references/events/create-wix-event.md +176 -0
  95. package/skills/wix-manage/references/events/manage-wix-events.md +174 -0
  96. package/skills/wix-manage/references/forms/forms-dashboard-navigation.md +44 -0
  97. package/skills/wix-manage/references/get-paid/get-paid-dashboard-navigation.md +52 -0
  98. package/skills/wix-manage/references/get-paid/how-to-setup-wix-payments.md +30 -7
  99. package/skills/wix-manage/references/google-ads/billing-and-payment.md +80 -0
  100. package/skills/wix-manage/references/google-ads/create-performance-max-campaign.md +212 -0
  101. package/skills/wix-manage/references/google-ads/get-campaign-suggestions.md +110 -0
  102. package/skills/wix-manage/references/google-ads/google-ads-dashboard-navigation.md +25 -0
  103. package/skills/wix-manage/references/google-ads/install-and-create-account.md +155 -0
  104. package/skills/wix-manage/references/google-ads/manage-campaign-lifecycle.md +63 -0
  105. package/skills/wix-manage/references/google-ads/query-campaign-analytics.md +155 -0
  106. package/skills/wix-manage/references/marketing/create-and-publish-social-post.md +225 -144
  107. package/skills/wix-manage/references/marketing/generate-and-publish-marketing-plan.md +19 -10
  108. package/skills/wix-manage/references/marketing/marketing-dashboard-navigation.md +52 -0
  109. package/skills/wix-manage/references/pricing-plans/create-and-update-pricing-plans.md +99 -1
  110. package/skills/wix-manage/references/pricing-plans/pricing-plans-dashboard-navigation.md +45 -0
  111. package/skills/wix-manage/references/restaurants/restaurants-dashboard-navigation.md +68 -0
  112. package/skills/wix-manage/references/restaurants/wix-restaurants-setup.md +94 -125
  113. package/skills/wix-manage/references/site-properties/change-payment-currency-site-properties.md +48 -9
  114. package/skills/wix-manage/references/site-properties/site-properties-dashboard-navigation.md +31 -0
  115. package/skills/wix-manage/references/sites/create-headless-site.md +52 -0
  116. package/skills/wix-manage/references/sites/create-site-from-template.md +2 -25
  117. package/skills/wix-manage/references/sites/site-import.md +243 -0
  118. package/skills/wix-manage/references/sites/sites-dashboard-navigation.md +29 -0
  119. package/skills/wix-manage/references/stores/add-store-pages-to-site.md +17 -1
  120. package/skills/wix-manage/references/stores/create-product-from-image.md +8 -6
  121. package/skills/wix-manage/references/stores/create-product-with-options-catalog-v3.md +16 -10
  122. package/skills/wix-manage/references/stores/find-products-query-and-search-catalog-v3.md +26 -8
  123. package/skills/wix-manage/references/stores/stores-dashboard-navigation.md +65 -0
  124. package/skills/wix-manage/references/stores/update-product-with-options.md +39 -7
  125. package/skills/wix-replatform/.publish-manifest.json +8 -0
  126. package/skills/wix-replatform/SKILL.md +693 -0
  127. package/skills/wix-replatform/lib/artifact-freshness.js +215 -0
  128. package/skills/wix-replatform/lib/completion-report.js +200 -0
  129. package/skills/wix-replatform/lib/config-env.js +59 -0
  130. package/skills/wix-replatform/lib/execution-manifest.js +185 -0
  131. package/skills/wix-replatform/lib/execution-state.js +173 -0
  132. package/skills/wix-replatform/lib/import-recovery.js +313 -0
  133. package/skills/wix-replatform/lib/local-state.js +642 -0
  134. package/skills/wix-replatform/lib/orchestration-preflight.js +143 -0
  135. package/skills/wix-replatform/lib/orchestration-router.js +122 -0
  136. package/skills/wix-replatform/lib/orchestration-state.js +455 -0
  137. package/skills/wix-replatform/lib/progress-log.js +224 -0
  138. package/skills/wix-replatform/lib/progress-log.sh +140 -0
  139. package/skills/wix-replatform/lib/url-preservation-state.js +391 -0
  140. package/skills/wix-replatform/resources/rp-discovery/SKILL.md +184 -0
  141. package/skills/wix-replatform/resources/rp-execute-import/SKILL.md +529 -0
  142. package/skills/wix-replatform/resources/rp-execute-setup/SKILL.md +316 -0
  143. package/skills/wix-replatform/resources/rp-execute-setup/scripts/mint-token.sh +64 -0
  144. package/skills/wix-replatform/resources/rp-import-codegen/SKILL.md +1114 -0
  145. package/skills/wix-replatform/resources/rp-mapper/SKILL.md +430 -0
  146. package/skills/wix-replatform/resources/rp-mapper/lib/mapping-resolve.js +217 -0
  147. package/skills/wix-replatform/resources/rp-mapper/scripts/resolve-mapping.js +148 -0
  148. package/skills/wix-replatform/resources/rp-mapper/wix-business-solutions-taxonomy.md +378 -0
  149. package/skills/wix-replatform/resources/rp-setup-discovery/SKILL.md +183 -0
  150. package/skills/wix-replatform/resources/rp-source-csv/SKILL.md +478 -0
  151. package/skills/wix-replatform/resources/rp-source-csv/lib/canonical-record.js +136 -0
  152. package/skills/wix-replatform/resources/rp-source-csv/lib/csv-fileset.js +0 -0
  153. package/skills/wix-replatform/resources/rp-source-csv/lib/csv-fingerprint.js +310 -0
  154. package/skills/wix-replatform/resources/rp-source-csv/lib/csv-layout.js +1081 -0
  155. package/skills/wix-replatform/resources/rp-source-csv/lib/csv-parse.js +618 -0
  156. package/skills/wix-replatform/resources/rp-source-csv/scripts/csv-discovery.js +949 -0
  157. package/skills/wix-replatform/resources/rp-source-csv/source-schema.example.json +196 -0
  158. package/skills/wix-replatform/resources/rp-source-csv/vendors/bigcommerce.json +66 -0
  159. package/skills/wix-replatform/resources/rp-source-csv/vendors/magento.json +60 -0
  160. package/skills/wix-replatform/resources/rp-source-csv/vendors/shopify.json +95 -0
  161. package/skills/wix-replatform/resources/rp-source-csv/vendors/woocommerce.json +82 -0
  162. package/skills/wix-replatform/resources/rp-source-wordpress/SKILL.md +256 -0
  163. package/skills/wix-replatform/resources/rp-source-wordpress/lib/wp-http.js +249 -0
  164. package/skills/wix-replatform/resources/rp-source-wordpress/lib/wp-route-classifier.js +444 -0
  165. package/skills/wix-replatform/resources/rp-source-wordpress/scripts/wp-discovery.js +774 -0
  166. package/skills/wix-replatform/resources/rp-source-wordpress/source-schema.example.json +71 -0
  167. package/skills/wix-replatform/resources/rp-target-wix/SKILL.md +632 -0
  168. package/skills/wix-replatform/resources/rp-target-wix/SPEC-product-reviews-and-blog-authorship.md +330 -0
  169. package/skills/wix-replatform/resources/rp-target-wix/domains/README.md +21 -0
  170. package/skills/wix-replatform/resources/rp-target-wix/domains/blog/domain.json +19 -0
  171. package/skills/wix-replatform/resources/rp-target-wix/domains/blog/entities/category.json +37 -0
  172. package/skills/wix-replatform/resources/rp-target-wix/domains/blog/entities/comment.json +37 -0
  173. package/skills/wix-replatform/resources/rp-target-wix/domains/blog/entities/post.json +39 -0
  174. package/skills/wix-replatform/resources/rp-target-wix/domains/blog/entities/tag.json +35 -0
  175. package/skills/wix-replatform/resources/rp-target-wix/domains/cms/domain.json +14 -0
  176. package/skills/wix-replatform/resources/rp-target-wix/domains/cms/entities/collection.json +35 -0
  177. package/skills/wix-replatform/resources/rp-target-wix/domains/cms/entities/data-item.json +36 -0
  178. package/skills/wix-replatform/resources/rp-target-wix/domains/cms/entities/reference.json +35 -0
  179. package/skills/wix-replatform/resources/rp-target-wix/domains/crm/domain.json +14 -0
  180. package/skills/wix-replatform/resources/rp-target-wix/domains/crm/entities/contact.json +131 -0
  181. package/skills/wix-replatform/resources/rp-target-wix/domains/crm/entities/email-subscription.json +37 -0
  182. package/skills/wix-replatform/resources/rp-target-wix/domains/crm/entities/label.json +37 -0
  183. package/skills/wix-replatform/resources/rp-target-wix/domains/ecom/domain.json +21 -0
  184. package/skills/wix-replatform/resources/rp-target-wix/domains/ecom/entities/order-line-item.json +37 -0
  185. package/skills/wix-replatform/resources/rp-target-wix/domains/ecom/entities/order-refund.json +37 -0
  186. package/skills/wix-replatform/resources/rp-target-wix/domains/ecom/entities/order.json +97 -0
  187. package/skills/wix-replatform/resources/rp-target-wix/domains/index.json +528 -0
  188. package/skills/wix-replatform/resources/rp-target-wix/domains/media/domain.json +14 -0
  189. package/skills/wix-replatform/resources/rp-target-wix/domains/media/entities/media-file.json +38 -0
  190. package/skills/wix-replatform/resources/rp-target-wix/domains/media/entities/media-folder.json +37 -0
  191. package/skills/wix-replatform/resources/rp-target-wix/domains/members/domain.json +13 -0
  192. package/skills/wix-replatform/resources/rp-target-wix/domains/members/entities/badge.json +37 -0
  193. package/skills/wix-replatform/resources/rp-target-wix/domains/members/entities/member.json +53 -0
  194. package/skills/wix-replatform/resources/rp-target-wix/domains/schema.json +84 -0
  195. package/skills/wix-replatform/resources/rp-target-wix/domains/stores/domain.json +25 -0
  196. package/skills/wix-replatform/resources/rp-target-wix/domains/stores/entities/category.json +37 -0
  197. package/skills/wix-replatform/resources/rp-target-wix/domains/stores/entities/coupon.json +37 -0
  198. package/skills/wix-replatform/resources/rp-target-wix/domains/stores/entities/inventory-item.json +38 -0
  199. package/skills/wix-replatform/resources/rp-target-wix/domains/stores/entities/product-tag.json +37 -0
  200. package/skills/wix-replatform/resources/rp-target-wix/domains/stores/entities/product.json +90 -0
  201. package/skills/wix-replatform/resources/rp-target-wix/lib/audit-summary.js +64 -0
  202. package/skills/wix-replatform/resources/rp-target-wix/lib/contract-ledger.js +141 -0
  203. package/skills/wix-replatform/resources/rp-target-wix/lib/domain-knowledge.js +384 -0
  204. package/skills/wix-replatform/resources/rp-target-wix/lib/ndjson.js +260 -0
  205. package/skills/wix-replatform/resources/rp-target-wix/lib/stores-verification.js +238 -0
  206. package/skills/wix-replatform/resources/rp-target-wix/lib/wix-build.js +237 -0
  207. package/skills/wix-replatform/resources/rp-target-wix/lib/wix-target-spec.js +238 -0
  208. package/skills/wix-replatform/resources/rp-target-wix/lib/wix-writers.js +2219 -0
  209. package/skills/wix-replatform/resources/rp-target-wix/scripts/domain-knowledge-validate.js +31 -0
  210. package/skills/wix-replatform/resources/rp-target-wix/scripts/domain-knowledge.js +100 -0
  211. package/skills/wix-replatform/resources/rp-target-wix/scripts/verify-stores.js +107 -0
  212. package/skills/wix-replatform/resources/rp-telemetry/SKILL.md +344 -0
  213. package/skills/wix-replatform/resources/rp-telemetry/lib/bi-sink.js +250 -0
  214. package/skills/wix-replatform/resources/rp-telemetry/lib/telemetry-recorder.js +1927 -0
  215. package/skills/wix-replatform/resources/rp-telemetry/scripts/meter-from-audit.js +83 -0
  216. package/skills/wix-replatform/resources/rp-telemetry/scripts/rp-telemetry.js +141 -0
  217. package/skills/wix-replatform/scripts/artifact-freshness.js +76 -0
  218. package/skills/wix-replatform/scripts/execution-manifest-validate.js +43 -0
  219. package/skills/wix-replatform/scripts/execution-state-prepare.js +128 -0
  220. package/skills/wix-replatform/scripts/orchestration-preflight.js +48 -0
  221. package/skills/wix-replatform/scripts/orchestration-route.js +46 -0
  222. package/skills/wix-replatform/scripts/orchestration-state.js +245 -0
  223. package/skills/wix-vibe-headless/SKILL.md +54 -25
  224. package/skills/wix-vibe-headless/install/deploy.cjs +95 -0
  225. package/skills/wix-vibe-headless/install/pin-agents-md.cjs +34 -0
  226. package/skills/wix-vibe-headless/platforms/README.md +26 -0
  227. package/skills/wix-vibe-headless/platforms/base44.md +177 -0
  228. package/skills/wix-vibe-headless/platforms/generic.md +122 -0
  229. package/skills/wix-vibe-headless/references/blog/INSTRUCTIONS.md +230 -119
  230. package/skills/wix-vibe-headless/references/blog/app/components/PostCard.jsx +43 -0
  231. package/skills/wix-vibe-headless/references/blog/app/components/PostChips.jsx +25 -0
  232. package/skills/wix-vibe-headless/references/blog/app/components/PostGrid.jsx +15 -0
  233. package/skills/wix-vibe-headless/references/blog/app/context/TaxonomyContext.jsx +35 -0
  234. package/skills/wix-vibe-headless/references/blog/app/hooks/usePostDetail.js +38 -0
  235. package/skills/wix-vibe-headless/references/blog/app/pages/Blog.jsx +40 -0
  236. package/skills/wix-vibe-headless/references/blog/app/pages/CategoryPage.jsx +54 -0
  237. package/skills/wix-vibe-headless/references/blog/app/pages/PostDetail.jsx +65 -0
  238. package/skills/wix-vibe-headless/references/blog/app/pages/TagPage.jsx +50 -0
  239. package/skills/wix-vibe-headless/references/blog/seed/SEED.md +103 -0
  240. package/skills/wix-vibe-headless/references/blog/seed/seed-blog.js +270 -0
  241. package/skills/wix-vibe-headless/references/bookings/INSTRUCTIONS.md +260 -145
  242. package/skills/wix-vibe-headless/references/bookings/app/components/BookingForm.jsx +65 -0
  243. package/skills/wix-vibe-headless/references/bookings/app/components/ServiceCard.jsx +47 -0
  244. package/skills/wix-vibe-headless/references/bookings/app/components/ServiceGrid.jsx +13 -0
  245. package/skills/wix-vibe-headless/references/bookings/app/components/SlotPicker.jsx +126 -0
  246. package/skills/wix-vibe-headless/references/bookings/app/hooks/useServiceDetail.js +108 -0
  247. package/skills/wix-vibe-headless/references/bookings/app/hooks/useServices.js +58 -0
  248. package/skills/wix-vibe-headless/references/bookings/app/lib/serviceFacts.js +95 -0
  249. package/skills/wix-vibe-headless/references/bookings/app/pages/ServiceDetail.jsx +94 -0
  250. package/skills/wix-vibe-headless/references/bookings/app/pages/Services.jsx +89 -0
  251. package/skills/wix-vibe-headless/references/bookings/{wix-bookings-checkout.js → app/rest/wix-bookings-checkout.js} +1 -1
  252. package/skills/wix-vibe-headless/references/bookings/{wix-bookings-services.js → app/rest/wix-bookings-services.js} +90 -12
  253. package/skills/wix-vibe-headless/references/bookings/seed/SEED.md +117 -0
  254. package/skills/wix-vibe-headless/references/bookings/seed/seed-bookings.js +333 -0
  255. package/skills/wix-vibe-headless/references/cms/INSTRUCTIONS.md +169 -147
  256. package/skills/wix-vibe-headless/references/cms/app/collection.config.js +31 -0
  257. package/skills/wix-vibe-headless/references/cms/app/lib/wixImage.js +18 -0
  258. package/skills/wix-vibe-headless/references/cms/{wix-cms.js → app/rest/wix-cms.js} +47 -2
  259. package/skills/wix-vibe-headless/references/cms/seed/SEED.md +145 -0
  260. package/skills/wix-vibe-headless/references/events/INSTRUCTIONS.md +228 -131
  261. package/skills/wix-vibe-headless/references/events/app/components/CategoryFilter.jsx +23 -0
  262. package/skills/wix-vibe-headless/references/events/app/components/EventCard.jsx +43 -0
  263. package/skills/wix-vibe-headless/references/events/app/components/EventGrid.jsx +13 -0
  264. package/skills/wix-vibe-headless/references/events/app/components/EventRegistration.jsx +29 -0
  265. package/skills/wix-vibe-headless/references/events/app/components/RsvpForm.jsx +57 -0
  266. package/skills/wix-vibe-headless/references/events/app/components/TicketPicker.jsx +78 -0
  267. package/skills/wix-vibe-headless/references/events/app/hooks/useEventDetail.js +27 -0
  268. package/skills/wix-vibe-headless/references/events/app/hooks/useEventsList.js +54 -0
  269. package/skills/wix-vibe-headless/references/events/app/hooks/useRsvpForm.js +40 -0
  270. package/skills/wix-vibe-headless/references/events/app/hooks/useTicketing.js +81 -0
  271. package/skills/wix-vibe-headless/references/events/app/pages/EventDetail.jsx +48 -0
  272. package/skills/wix-vibe-headless/references/events/app/pages/Events.jsx +36 -0
  273. package/skills/wix-vibe-headless/references/events/{wix-events-browse.js → app/rest/wix-events-browse.js} +3 -2
  274. package/skills/wix-vibe-headless/references/events/seed/SEED.md +107 -0
  275. package/skills/wix-vibe-headless/references/events/seed/seed-events.js +251 -0
  276. package/skills/wix-vibe-headless/references/members/INSTRUCTIONS.md +276 -188
  277. package/skills/wix-vibe-headless/references/members/app/components/LoginForm.jsx +101 -0
  278. package/skills/wix-vibe-headless/references/members/app/components/MemberMenu.jsx +33 -0
  279. package/skills/wix-vibe-headless/references/members/app/components/RequireAuth.jsx +21 -0
  280. package/skills/wix-vibe-headless/references/members/app/components/SocialButtons.jsx +29 -0
  281. package/skills/wix-vibe-headless/references/members/app/context/MemberContext.jsx +54 -0
  282. package/skills/wix-vibe-headless/references/members/app/hooks/useLoginForm.js +77 -0
  283. package/skills/wix-vibe-headless/references/members/app/pages/Account.jsx +36 -0
  284. package/skills/wix-vibe-headless/references/members/app/pages/Callback.jsx +32 -0
  285. package/skills/wix-vibe-headless/references/members/app/pages/Login.jsx +35 -0
  286. package/skills/wix-vibe-headless/references/members/{wix-members-auth.js → app/rest/wix-members-auth.js} +6 -3
  287. package/skills/wix-vibe-headless/references/members/install/Register.jsx +22 -0
  288. package/skills/wix-vibe-headless/references/members/seed/SEED.md +22 -0
  289. package/skills/wix-vibe-headless/references/portfolio/INSTRUCTIONS.md +233 -104
  290. package/skills/wix-vibe-headless/references/portfolio/app/components/CollectionCard.jsx +31 -0
  291. package/skills/wix-vibe-headless/references/portfolio/app/components/CollectionGrid.jsx +15 -0
  292. package/skills/wix-vibe-headless/references/portfolio/app/components/ProjectCard.jsx +39 -0
  293. package/skills/wix-vibe-headless/references/portfolio/app/components/ProjectGrid.jsx +15 -0
  294. package/skills/wix-vibe-headless/references/portfolio/app/components/ProjectMedia.jsx +29 -0
  295. package/skills/wix-vibe-headless/references/portfolio/app/hooks/useCollectionProjects.js +35 -0
  296. package/skills/wix-vibe-headless/references/portfolio/app/hooks/usePortfolioGallery.js +27 -0
  297. package/skills/wix-vibe-headless/references/portfolio/app/hooks/useProjectDetail.js +25 -0
  298. package/skills/wix-vibe-headless/references/portfolio/app/pages/CollectionPage.jsx +39 -0
  299. package/skills/wix-vibe-headless/references/portfolio/app/pages/Portfolio.jsx +27 -0
  300. package/skills/wix-vibe-headless/references/portfolio/app/pages/ProjectDetail.jsx +60 -0
  301. package/skills/wix-vibe-headless/references/portfolio/{wix-portfolio.js → app/rest/wix-portfolio.js} +84 -55
  302. package/skills/wix-vibe-headless/references/portfolio/seed/SEED.md +94 -0
  303. package/skills/wix-vibe-headless/references/portfolio/seed/seed-portfolio.js +236 -0
  304. package/skills/wix-vibe-headless/references/pricing-plans/INSTRUCTIONS.md +240 -117
  305. package/skills/wix-vibe-headless/references/pricing-plans/app/components/OrderCard.jsx +35 -0
  306. package/skills/wix-vibe-headless/references/pricing-plans/app/components/PlanCard.jsx +48 -0
  307. package/skills/wix-vibe-headless/references/pricing-plans/app/components/PlanGrid.jsx +16 -0
  308. package/skills/wix-vibe-headless/references/pricing-plans/app/components/PlanPrice.jsx +35 -0
  309. package/skills/wix-vibe-headless/references/pricing-plans/app/hooks/useMyPlans.js +25 -0
  310. package/skills/wix-vibe-headless/references/pricing-plans/app/hooks/usePlanDetail.js +28 -0
  311. package/skills/wix-vibe-headless/references/pricing-plans/app/hooks/usePlans.js +30 -0
  312. package/skills/wix-vibe-headless/references/pricing-plans/app/pages/MyPlans.jsx +30 -0
  313. package/skills/wix-vibe-headless/references/pricing-plans/app/pages/PlanDetail.jsx +53 -0
  314. package/skills/wix-vibe-headless/references/pricing-plans/app/pages/Plans.jsx +28 -0
  315. package/skills/wix-vibe-headless/references/pricing-plans/seed/SEED.md +86 -0
  316. package/skills/wix-vibe-headless/references/pricing-plans/seed/seed-pricing-plans.js +251 -0
  317. package/skills/wix-vibe-headless/references/restaurants/INSTRUCTIONS.md +248 -124
  318. package/skills/wix-vibe-headless/references/restaurants/app/components/ItemDialog.jsx +81 -0
  319. package/skills/wix-vibe-headless/references/restaurants/app/components/MenuItemCard.jsx +71 -0
  320. package/skills/wix-vibe-headless/references/restaurants/app/components/MenuList.jsx +43 -0
  321. package/skills/wix-vibe-headless/references/restaurants/app/components/OrderCartButton.jsx +21 -0
  322. package/skills/wix-vibe-headless/references/restaurants/app/components/OrderCartDrawer.jsx +60 -0
  323. package/skills/wix-vibe-headless/references/restaurants/app/context/OrderCartContext.jsx +63 -0
  324. package/skills/wix-vibe-headless/references/restaurants/app/hooks/useItemOrder.js +32 -0
  325. package/skills/wix-vibe-headless/references/restaurants/app/hooks/useReservation.js +73 -0
  326. package/skills/wix-vibe-headless/references/restaurants/app/pages/Menu.jsx +28 -0
  327. package/skills/wix-vibe-headless/references/restaurants/app/pages/Reservations.jsx +102 -0
  328. package/skills/wix-vibe-headless/references/restaurants/seed/SEED.md +180 -0
  329. package/skills/wix-vibe-headless/references/restaurants/seed/seed-restaurants.js +452 -0
  330. package/skills/wix-vibe-headless/references/shared/app/components/WixManageBanner.jsx +56 -0
  331. package/skills/wix-vibe-headless/references/shared/{wix-client.js → app/rest/wix-client.js} +6 -8
  332. package/skills/wix-vibe-headless/references/shared/app/rest/wix-config.js +6 -0
  333. package/skills/wix-vibe-headless/references/storefront/INSTRUCTIONS.md +263 -148
  334. package/skills/wix-vibe-headless/references/storefront/app/components/CartButton.jsx +20 -0
  335. package/skills/wix-vibe-headless/references/storefront/app/components/CartDrawer.jsx +150 -0
  336. package/skills/wix-vibe-headless/references/storefront/app/components/ProductCard.jsx +167 -0
  337. package/skills/wix-vibe-headless/references/storefront/app/components/ProductGallery.jsx +51 -0
  338. package/skills/wix-vibe-headless/references/storefront/app/components/ProductGrid.jsx +54 -0
  339. package/skills/wix-vibe-headless/references/storefront/app/components/VariantPicker.jsx +119 -0
  340. package/skills/wix-vibe-headless/references/storefront/app/context/CartContext.jsx +71 -0
  341. package/skills/wix-vibe-headless/references/storefront/app/hooks/useProductDetail.js +109 -0
  342. package/skills/wix-vibe-headless/references/storefront/app/hooks/useShop.js +98 -0
  343. package/skills/wix-vibe-headless/references/storefront/app/lib/storeImage.js +27 -0
  344. package/skills/wix-vibe-headless/references/storefront/app/pages/ProductDetail.jsx +139 -0
  345. package/skills/wix-vibe-headless/references/storefront/app/pages/Shop.jsx +75 -0
  346. package/skills/wix-vibe-headless/references/storefront/{wix-store-cart.js → app/rest/wix-store-cart.js} +1 -1
  347. package/skills/wix-vibe-headless/references/storefront/{wix-store-catalog.js → app/rest/wix-store-catalog.js} +25 -2
  348. package/skills/wix-vibe-headless/references/storefront/seed/SEED.md +111 -0
  349. package/skills/wix-vibe-headless/references/storefront/seed/seed-store.js +299 -0
  350. /package/skills/wix-vibe-headless/references/blog/{wix-blog.js → app/rest/wix-blog.js} +0 -0
  351. /package/skills/wix-vibe-headless/references/events/{wix-events-registration.js → app/rest/wix-events-registration.js} +0 -0
  352. /package/skills/wix-vibe-headless/references/pricing-plans/{wix-pricing-plans.js → app/rest/wix-pricing-plans.js} +0 -0
  353. /package/skills/wix-vibe-headless/references/restaurants/{wix-restaurants-menu.js → app/rest/wix-restaurants-menu.js} +0 -0
  354. /package/skills/wix-vibe-headless/references/restaurants/{wix-restaurants-ordering.js → app/rest/wix-restaurants-ordering.js} +0 -0
  355. /package/skills/wix-vibe-headless/references/restaurants/{wix-restaurants-reservations.js → app/rest/wix-restaurants-reservations.js} +0 -0
@@ -0,0 +1,31 @@
1
+ #!/usr/bin/env node
2
+ 'use strict';
3
+
4
+ const path = require('node:path');
5
+ const { knowledgeRoot, validateKnowledge, writeJson } = require('../lib/domain-knowledge.js');
6
+
7
+ function main() {
8
+ const args = new Set(process.argv.slice(2));
9
+ const domainsDir = knowledgeRoot(path.resolve(__dirname, '..'));
10
+ const result = validateKnowledge(domainsDir);
11
+
12
+ if (args.has('--write-index')) {
13
+ writeJson(path.join(domainsDir, 'index.json'), result.generatedIndex);
14
+ const afterWrite = validateKnowledge(domainsDir);
15
+ if (!afterWrite.ok) {
16
+ for (const error of afterWrite.errors) process.stderr.write(`ERROR: ${error}\n`);
17
+ process.exit(1);
18
+ }
19
+ process.stdout.write('OK: domain knowledge index regenerated and valid\n');
20
+ return;
21
+ }
22
+
23
+ if (!result.ok) {
24
+ for (const error of result.errors) process.stderr.write(`ERROR: ${error}\n`);
25
+ process.exit(1);
26
+ }
27
+
28
+ process.stdout.write('OK: domain knowledge valid\n');
29
+ }
30
+
31
+ main();
@@ -0,0 +1,100 @@
1
+ #!/usr/bin/env node
2
+ 'use strict';
3
+
4
+ const path = require('node:path');
5
+ const {
6
+ knowledgeRoot,
7
+ listDomains,
8
+ listEntities,
9
+ readEntityByRef,
10
+ resolveSource,
11
+ listFlagged,
12
+ summarizeEntities,
13
+ } = require('../lib/domain-knowledge.js');
14
+
15
+ function usage() {
16
+ return [
17
+ 'Usage:',
18
+ ' node scripts/domain-knowledge.js list-domains',
19
+ ' node scripts/domain-knowledge.js list-entities --domain stores',
20
+ ' node scripts/domain-knowledge.js read-entity --ref stores/product',
21
+ ' node scripts/domain-knowledge.js resolve-source --source-system woocommerce --source-entity product',
22
+ ' node scripts/domain-knowledge.js resolve-source --route /wc/v3/products',
23
+ ' node scripts/domain-knowledge.js list-flagged --flag IMPORT_UNRELIABLE',
24
+ ' node scripts/domain-knowledge.js summarize-entities --refs stores/product,ecom/order [--include-evidence]',
25
+ ].join('\n');
26
+ }
27
+
28
+ function parseArgs(argv) {
29
+ const args = { _: [] };
30
+ for (let i = 0; i < argv.length; i += 1) {
31
+ const arg = argv[i];
32
+ if (arg.startsWith('--')) {
33
+ const key = arg.slice(2).replace(/-([a-z])/g, (_, char) => char.toUpperCase());
34
+ const next = argv[i + 1];
35
+ if (!next || next.startsWith('--')) {
36
+ args[key] = true;
37
+ } else {
38
+ args[key] = next;
39
+ i += 1;
40
+ }
41
+ } else {
42
+ args._.push(arg);
43
+ }
44
+ }
45
+ return args;
46
+ }
47
+
48
+ function print(value, pretty) {
49
+ process.stdout.write(`${JSON.stringify(value, null, pretty ? 2 : 0)}\n`);
50
+ }
51
+
52
+ function main() {
53
+ const args = parseArgs(process.argv.slice(2));
54
+ const command = args._[0];
55
+ const domainsDir = knowledgeRoot(path.resolve(__dirname, '..'));
56
+
57
+ if (!command || args.help) {
58
+ process.stderr.write(`${usage()}\n`);
59
+ process.exit(command ? 0 : 1);
60
+ }
61
+
62
+ let output;
63
+ if (command === 'list-domains') {
64
+ output = { domains: listDomains(domainsDir) };
65
+ } else if (command === 'list-entities') {
66
+ if (!args.domain) throw new Error('--domain is required');
67
+ output = { domain: args.domain, entities: listEntities(domainsDir, args.domain) };
68
+ } else if (command === 'read-entity') {
69
+ if (!args.ref) throw new Error('--ref is required');
70
+ output = readEntityByRef(domainsDir, args.ref);
71
+ } else if (command === 'resolve-source') {
72
+ output = {
73
+ matches: resolveSource(domainsDir, {
74
+ sourceSystem: args.sourceSystem,
75
+ sourceEntity: args.sourceEntity,
76
+ route: args.route,
77
+ }),
78
+ };
79
+ } else if (command === 'list-flagged') {
80
+ if (!args.flag) throw new Error('--flag is required');
81
+ output = { flag: args.flag, entities: listFlagged(domainsDir, args.flag) };
82
+ } else if (command === 'summarize-entities') {
83
+ if (!args.refs) throw new Error('--refs is required');
84
+ output = {
85
+ entities: summarizeEntities(domainsDir, args.refs.split(',').filter(Boolean), {
86
+ includeEvidence: Boolean(args.includeEvidence),
87
+ }),
88
+ };
89
+ } else {
90
+ throw new Error(`Unknown command: ${command}\n${usage()}`);
91
+ }
92
+ print(output, Boolean(args.pretty));
93
+ }
94
+
95
+ try {
96
+ main();
97
+ } catch (error) {
98
+ process.stderr.write(`${error.message}\n`);
99
+ process.exit(1);
100
+ }
@@ -0,0 +1,107 @@
1
+ #!/usr/bin/env node
2
+ 'use strict';
3
+
4
+ const fs = require('fs');
5
+ const path = require('path');
6
+ const w = require('../lib/wix-writers');
7
+ const verify = require('../lib/stores-verification');
8
+ const {
9
+ createContractLedgerProposalFromStoresVerification,
10
+ writeProposal,
11
+ } = require('../lib/contract-ledger');
12
+
13
+ function usage() {
14
+ console.error(`Usage:
15
+ node scripts/verify-stores.js stores subscription-create --artifact <file> [--proposal-artifact <file>] [--marker <id>] [--no-cleanup]
16
+ node scripts/verify-stores.js stores product-count --artifact <file>
17
+ node scripts/verify-stores.js stores product-by-source-marker --marker-path <path> --marker-value <value> --artifact <file>
18
+ node scripts/verify-stores.js stores delete-probe --product-id <id> --artifact <file>
19
+
20
+ Credentials:
21
+ WIX_AUTH_TOKEN and WIX_SITE_ID must be set in the environment.`);
22
+ }
23
+
24
+ function parseArgs(argv) {
25
+ const args = [...argv];
26
+ if (args[0] === 'verify') args.shift();
27
+ if (args[0] !== 'stores') {
28
+ usage();
29
+ process.exit(2);
30
+ }
31
+ args.shift();
32
+ const command = args.shift();
33
+ const options = {};
34
+ for (let i = 0; i < args.length; i++) {
35
+ const arg = args[i];
36
+ if (arg === '--no-cleanup') {
37
+ options.cleanup = false;
38
+ } else if (arg.startsWith('--')) {
39
+ options[arg.slice(2).replace(/-([a-z])/g, (_, c) => c.toUpperCase())] = args[++i];
40
+ } else {
41
+ throw new Error(`unexpected argument: ${arg}`);
42
+ }
43
+ }
44
+ return { command, options };
45
+ }
46
+
47
+ function loadEnvFile(file) {
48
+ if (!file || !fs.existsSync(file)) return;
49
+ const text = fs.readFileSync(file, 'utf8');
50
+ for (const line of text.split(/\r?\n/)) {
51
+ const match = line.match(/^\s*([A-Za-z_][A-Za-z0-9_]*)=(.*)\s*$/);
52
+ if (!match || process.env[match[1]]) continue;
53
+ process.env[match[1]] = match[2].replace(/^['"]|['"]$/g, '');
54
+ }
55
+ }
56
+
57
+ (async () => {
58
+ const { command, options } = parseArgs(process.argv.slice(2));
59
+ loadEnvFile(options.env || path.join(process.cwd(), 'config/wix.env'));
60
+ const authToken = process.env.WIX_AUTH_TOKEN;
61
+ const siteId = process.env.WIX_SITE_ID;
62
+ if (!authToken || !siteId) throw new Error('WIX_AUTH_TOKEN and WIX_SITE_ID are required');
63
+ const wix = w.createWixClient({ authToken, siteId });
64
+ const common = { wix, siteId, artifactPath: options.artifact };
65
+
66
+ let result;
67
+ if (command === 'subscription-create') {
68
+ result = await verify.verifyStoresSubscriptionCreate({
69
+ ...common,
70
+ marker: options.marker,
71
+ cleanup: options.cleanup !== false,
72
+ });
73
+ if (options.proposalArtifact) {
74
+ result.artifactPath = options.artifact ? path.resolve(options.artifact) : null;
75
+ const proposal = createContractLedgerProposalFromStoresVerification(result);
76
+ proposal.sourceVerification.artifactPath = result.artifactPath;
77
+ writeProposal(options.proposalArtifact, proposal);
78
+ result.contractLedgerProposal = {
79
+ path: path.resolve(options.proposalArtifact),
80
+ status: proposal.status,
81
+ proposalId: proposal.proposalId,
82
+ };
83
+ if (options.artifact) {
84
+ fs.writeFileSync(options.artifact, `${JSON.stringify(result, null, 2)}\n`);
85
+ }
86
+ }
87
+ } else if (command === 'product-count') {
88
+ result = await verify.verifyStoresProductCount(common);
89
+ } else if (command === 'product-by-source-marker') {
90
+ result = await verify.verifyStoresProductBySourceMarker({
91
+ ...common,
92
+ markerPath: options.markerPath,
93
+ markerValue: options.markerValue,
94
+ });
95
+ } else if (command === 'delete-probe') {
96
+ result = await verify.verifyStoresDeleteProbe({ ...common, productId: options.productId });
97
+ } else {
98
+ usage();
99
+ process.exit(2);
100
+ }
101
+
102
+ console.log(JSON.stringify(result, null, 2));
103
+ process.exit(result.status === 'passed' ? 0 : 1);
104
+ })().catch((error) => {
105
+ console.error(error && error.message ? error.message : error);
106
+ process.exit(1);
107
+ });
@@ -0,0 +1,344 @@
1
+ ---
2
+ name: rp-telemetry
3
+ description: >-
4
+ Always-active telemetry companion for RePlatform migration runs. Records what happened
5
+ during a run — halts, errors, fidelity losses, API gaps, skill coverage gaps, user
6
+ decisions, pipeline defects — through a validated recorder script, plus the run rollup
7
+ (stages, timings, volumes, verification). Loaded by the orchestrator at run start and
8
+ kept active for the whole run.
9
+ ---
10
+
11
+ # rp-telemetry
12
+
13
+ Capture per-run telemetry that tells us what to improve in the skills and the underlying
14
+ Wix tooling. This skill stays active alongside the migration skills for the **entire**
15
+ run; the migration skills themselves are unchanged and know nothing about telemetry.
16
+
17
+ ## The one rule that governs everything you record
18
+
19
+ **Observation, not diagnosis.** Every field records what was observed — what happened,
20
+ what was expected, what actually occurred, where, and how often. Never record a root
21
+ cause, a fix, a recommendation, or a workaround-as-solution. There is deliberately no
22
+ field for them; the schema rejects unknown fields. Root cause is derived later, at review
23
+ time, by a reviewing agent with full context — not asserted by you in the moment.
24
+
25
+ Three discipline rules apply to every free-text field (`what_happened`, `expected`,
26
+ `actual`):
27
+
28
+ - **Types, not instances.** Refer to entity *types* and *classes*, never specific client
29
+ data. `entity_type: "product"` — never a product's name, SKU, price, or body text.
30
+ - **Secret-safe.** No credentials, tokens, URLs, config values, or file contents — the
31
+ recorder also runs a mechanical scrub as a last line of defense, but do not rely on it.
32
+ - **Short and structural.** A sentence or two, max 400 chars. Prefer stating
33
+ expected-vs-actual over narrating. The coded fields carry the structure.
34
+ - **No remediation narration.** "The canonical lib was fixed and re-synced" is a fix
35
+ story, not an observation — even when true (dev-mode backports). Record what was
36
+ observed to work ("adding fieldsets=FULL returned the field; the lookup succeeded")
37
+ and leave the repair to the execution log.
38
+
39
+ ## The recorder
40
+
41
+ All telemetry is persisted through the bundled recorder — **never hand-write or edit
42
+ `run-telemetry.json` or `telemetry/` files.** Run it from this resource directory
43
+ (see `CONVENTIONS.md`), pointing at the active migration project:
44
+
45
+ ```bash
46
+ node scripts/rp-telemetry.js <command> [...] --project <abs path to migrations/<project>>
47
+ ```
48
+
49
+ The recorder owns everything mechanical: schema validation (it rejects invalid enums and
50
+ unknown fields — fix and retry, never guess around it), timestamps, per-class event
51
+ folding, the run/attempt/session resume model, the privacy scrub, and the well-formedness
52
+ gate at finalize. It prints one JSON result per call; `{"ok":false,...}` lists exactly
53
+ what to fix.
54
+
55
+ | Call | When |
56
+ |---|---|
57
+ | `start '<dims-json>'` | At run begin — before any other pipeline step. Resumes an unfinalized run automatically. |
58
+ | `dims '<dims-json>'` | Whenever a dimension becomes known mid-run (platform version and extensions after discovery, `site_id` after provisioning). |
59
+ | `stage start <stage>` / `stage end <stage> --outcome <outcome>` | At every stage boundary. Outcomes: `passed`, `halted`, `failed`, `skipped`. |
60
+ | `meter [--api-ms N --model-ms N --script-ms N --input-tokens N …]` | Measured latency/token counts for a stage. Call it whenever you have real numbers; see "Metering" below. |
61
+ | `wait start [--halt <subtype> --skill <s> [--what '<text>']]` / `wait end` | The moment the run halts for the user, and the moment it resumes. This is how user latency stays out of `active_ms` — never estimate elapsed time yourself. Pass `--halt` for a needs-user halt and the recorder emits the paired `halt_needs_user` event for you. |
62
+ | `record '<event-json>'` | The moment something observable happens (taxonomy below). |
63
+ | `finalize '<rollup-json>'` | When the run reaches a terminal state. |
64
+ | `rebuild [--attempt <n>] [--push]` | Only on request, to re-assemble a past run's signal document from its archived journal after a recorder fix — never during a run. `--push` re-emits the rebuilt run to the BI sink (backfill after an outage; idempotent — the reviewer dedupes at query time). |
65
+ | `status` | To orient after a resume. |
66
+
67
+ ### Run lifecycle
68
+
69
+ 1. **`start`** as the first telemetry act of the run, with whatever dimensions are already
70
+ known:
71
+
72
+ ```bash
73
+ node scripts/rp-telemetry.js start '{"source_platform":"wordpress",
74
+ "source_site_url":"https://client-site.example","source_acquisition":"public_storefront",
75
+ "delivery_mode":"management","destination_strategy":"new_site",
76
+ "runtime_env":{"agent_runtime":"claude-code","model":"<model id>"}}' --project <dir>
77
+ ```
78
+
79
+ `start` on a project with an unfinalized run **resumes** it (same run, same attempt,
80
+ one more session) and closes any open wait interval. `start` after a finalized run
81
+ opens the next attempt. Never try to manage run identity yourself.
82
+
83
+ `source_acquisition` is an open set of class tokens, but reuse an established one
84
+ (`admin_api`, `public_storefront`, `public_content`, `file_export`) rather than
85
+ minting a synonym — cross-run folding depends on stable tokens.
86
+
87
+ **Skills provenance is auto-stamped — you don't pass it.** At `start` the recorder
88
+ stamps two identifiers onto the run so every record can be traced back to the skills
89
+ that produced it:
90
+
91
+ - `skills_version` — the bundle's semver release label (from `VERSION`). Coarse and
92
+ hand-bumped by design; it is the group-by/order-by key that binds issues to a
93
+ *release line* ("all issues on 1.2.x", "regressed since 1.1.0").
94
+ - `skills_commit` — the exact source commit the bundle was built from: the precise
95
+ *vendored snapshot* within a release. Many commits ship under one hand-bumped
96
+ `skills_version`, so a run reporting `1.0.0` is otherwise unattributable to the
97
+ change that produced its issue. The recorder resolves it, in order of authority,
98
+ from the `sourceCommit` stamped into `.publish-manifest.json` at publish time (the
99
+ only source that works in a partner runtime, and the only correct one once the
100
+ bundle is vendored into `wix/skills`), else a dev-mode `git rev-parse --short HEAD`
101
+ of the source checkout, else `null`.
102
+
103
+ Both may be overridden by passing `skills_version` / `skills_commit` in the `start`
104
+ dims (a runtime with better provenance than the recorder can infer), but normally you
105
+ leave them to auto-resolve.
106
+
107
+ 2. **Stage boundaries** as the pipeline moves. Map orchestrator steps to stages like this:
108
+
109
+ | Stage | Covers |
110
+ |---|---|
111
+ | `config` | Everything before discovery: project resolution, config files, up-front input collection |
112
+ | `discovery` | Source discovery (`rp-discovery` + source adapter) |
113
+ | `mcp_gate` | The Wix MCP prerequisite gate between discovery and mapping |
114
+ | `mapping` | `rp-mapper` producing the mapping plan |
115
+ | `mapping_review` | The mapping review checkpoint (user-facing) |
116
+ | `setup_discovery` | `rp-setup-discovery` |
117
+ | `codegen` | `rp-import-codegen` |
118
+ | `approval_gate` | The execution-plan approval gate (user-facing) |
119
+ | `setup_provisioning` | Site creation, app installs, collections — `rp-execute-setup` |
120
+ | `storefront_build` | The `website`-mode `wix-headless` build + release; `skipped` in `management` mode |
121
+ | `extract` | Source extraction to disk, before any write (`rp-execute-import`) |
122
+ | `import` | The import writes (`rp-execute-import`) |
123
+ | `finish` | Verification spot-checks, completion reporting, handoff |
124
+
125
+ Stages bind to **when the work actually runs**, not to their canonical order. If the
126
+ orchestration runs extraction early (e.g. extract + dry-run before the approval gate,
127
+ inside the codegen phase), close the open stage, bracket the extraction in its own
128
+ `extract` stage, then reopen — a stage may be entered more than once, and its
129
+ `active_ms` sums the entries. Booking a real extraction into `codegen` (and leaving
130
+ `extract` as a milliseconds-long token stage) is exactly the mis-attribution the
131
+ `extract` stage exists to prevent.
132
+
133
+ When the `discovery` stage ends, **always** stamp what it learned:
134
+ `dims '{"source_platform_version":"...","source_extensions":["..."]}'` — pass `[]`
135
+ explicitly when discovery found no extensions; a null left behind is flagged in
136
+ `telemetry_health` as `source_extensions_null_after_discovery`.
137
+
138
+ 3. **`wait start` / `wait end`** around every needs-user halt: credential requests, the
139
+ mapping-review checkpoint, the approval gate, any halt-to-needs-user. Pass the halt
140
+ class on the same call —
141
+ `wait start --halt missing_input --skill rp-mapper --what "run halted at the mapping-review checkpoint awaiting approval"`
142
+ — and the recorder emits the paired `halt_needs_user` event mechanically; a stalled
143
+ wait with no halt event in its stage is flagged in `telemetry_health`
144
+ (`wait_without_halt_event:<stage>`). If the session is about to end on a halt, leave
145
+ the wait open — the resume's `start` closes it, so overnight user latency lands in
146
+ `waiting_ms` where it belongs. If you resume real work while a wait is open (e.g.
147
+ investigating something before the user has answered), `wait end` first and
148
+ `wait start` again when you go back to waiting — active work must never be booked as
149
+ waiting.
150
+
151
+ 4. **`record`** events as they happen (next section). Record in the moment, not
152
+ retrospectively — improvisation and halts are only reliably knowable when they occur.
153
+
154
+ 5. **`finalize`** once, at a terminal state, with the rollup:
155
+
156
+ ```bash
157
+ node scripts/rp-telemetry.js finalize '{"terminal_state":"completed",
158
+ "volumes":[{"entity_type":"product","target":"native","target_surface":"stores/v3",
159
+ "discovered":142,"planned":142,"attempted":142,"succeeded":139,"failed":3,
160
+ "skipped":0,"already_imported":0}],
161
+ "verification":[{"subject":"product","method":"query_back","checked":10,"passed":10,"failed":0}],
162
+ "operator_acceptance":"accepted"}' --project <dir>
163
+ ```
164
+
165
+ - `volumes` come from the execution artifacts (manifest, audit log, crosswalk):
166
+ `planned` and `target`/`target_surface` from the **approved** plan;
167
+ `already_imported` is crosswalk-skipped scope from a prior attempt — never fold it
168
+ into `skipped`.
169
+ - Include a volume row for **every** entity type discovery found in use — including
170
+ types excluded by user decision or with no clean Wix target (`discovered: N,
171
+ skipped: N`, `target: none` where no target exists, `planned` 0 or null). "What we
172
+ cannot or chose not to import" must be signal-layer arithmetic, never an evidence
173
+ dig — rows only for imported types silently erase the excluded half of the approved
174
+ plan.
175
+ - `verification` makes the finish step's spot-checks countable. `checked: 0` is an
176
+ honest "written but unverified" — report it rather than papering over it.
177
+ - Do **not** finalize a halt you expect the user to resume — leave the run unfinalized
178
+ with the wait open. Finalize with `halted_needs_user` only when the run is genuinely
179
+ being closed out in a stalled state. A user who declines the plan is
180
+ `abandoned_by_user` (plus a `user_decision` event with `subtype: declined`), never
181
+ `halted_needs_user` or `failed`.
182
+
183
+ ### Metering — splitting `active_ms` into where the time actually went
184
+
185
+ `active_ms` alone cannot locate a bottleneck: it is wall-clock between two stage boundaries, fusing
186
+ **model reasoning + subprocess execution + remote API latency + defect-repair time** into one
187
+ number. `meter` splits it, and cost is derived from the token counts.
188
+
189
+ ```bash
190
+ # a generated script reporting its own measured work
191
+ node scripts/rp-telemetry.js meter --api-ms 250000 --api-calls 73 --api-retries 2 --script-ms 1200 --project <dir>
192
+ # the agent runtime reporting its own usage for the stage it just finished
193
+ node scripts/rp-telemetry.js meter --model-ms 42000 --input-tokens 8000 --output-tokens 1500 --cache-read-tokens 120000 --project <dir>
194
+ ```
195
+
196
+ **Derive the API half mechanically — do not hand-count it.** After a generated import runs:
197
+
198
+ ```bash
199
+ node scripts/meter-from-audit.js --project <migration dir> --stage import # --dry-run to preview
200
+ ```
201
+
202
+ It reads `logs/import-audit.ndjson` and emits measured `api_ms` / `api_calls` / `api_retries`.
203
+ It exists because a bulk write logs **one audit row per item, each carrying the batch's total
204
+ latency** — summing rows multiplies one call's latency by its item count, which on a real run
205
+ reported 1,050,992 ms of API time inside a stage that only existed for 346,505 ms. The helper
206
+ collapses rows per distinct `(runId, endpoint, batch, latencyMs)`, so a batch counts once while
207
+ genuinely separate calls each count.
208
+
209
+ Fields: durations `model_ms` / `api_ms` / `script_ms`; counts `input_tokens`, `output_tokens`,
210
+ `cache_read_tokens`, `cache_write_tokens`, `api_calls`, `api_retries`. Defaults to the open stage;
211
+ `--stage <stage>` targets another. Repeated calls **accumulate**, so each script invocation and each
212
+ stage re-entry reports independently.
213
+
214
+ Rules that keep the numbers trustworthy:
215
+
216
+ - **Measure, never estimate.** Every field is a number something actually observed — a script's own
217
+ elapsed time, an audit log's summed `latencyMs`, the runtime's reported usage. If you do not have
218
+ a measurement, omit the field; the gap is reported as `unattributed_ms` and flagged, which is far
219
+ more useful than a guess.
220
+ - **Do not meter the same interval twice.** Meters sum, so re-reporting a stage's API time after a
221
+ resume double-counts it. The recorder flags `stage_over_attributed:<stage>` when attributed time
222
+ exceeds elapsed time, because `unattributed_ms` clamps at zero and would otherwise hide it.
223
+ - **Cost is derived, never recorded.** Pass `model_pricing_snapshot` in the `start` dims
224
+ (`{ "<model>": { "input_per_mtok": 15, "output_per_mtok": 75, "cache_read_per_mtok": 1.5 } }`) and
225
+ the rollup computes `cost.estimated_cost_usd`. A stored dollar figure silently goes wrong when list
226
+ prices change; tokens plus a dated snapshot stay recomputable. Without a snapshot, cost is `null`
227
+ with `cost_basis: "no_pricing_snapshot"` — never a fabricated number.
228
+ - **`contained_recovery` is derived, not self-reported.** Any `error` or `pipeline_defect` in a stage
229
+ marks it, because a stage that spent its time debugging is the one an agent is least likely to
230
+ remember to flag. `timing.stages_with_recovery` lists them, so a clean run and a thrash are
231
+ distinguishable instead of both reading as "this is what the stage costs".
232
+
233
+ The rollup's `timing.agentic_ms` vs `timing.deterministic_ms` (and `agentic_share`) is the number
234
+ that shows whether moving work into deterministic code is paying off. `agentic_share` is `null` when
235
+ nothing was metered rather than `0`, which would falsely read as a fully deterministic run.
236
+
237
+ ### Collecting `operator_acceptance`
238
+
239
+ At the finish handoff, ask the operator one plain question: does the migrated result look
240
+ right to them — `accepted`, `rework_needed`, or `rejected`? Record their answer in
241
+ `finalize`. If the run never reaches finish or they do not answer, it stays `unknown`.
242
+ This is the only field separating "completed and good" from "completed and unusable" —
243
+ ask it, but never pressure or interpret; their verdict as given, coarse by design.
244
+
245
+ ## Event taxonomy — when to record what
246
+
247
+ Events are folded per problem class by the recorder (same type + stage + entity type +
248
+ API surfaces + app + error code + subtype fold into one event with a `count`), so record
249
+ every occurrence class once and pass `count` when you observed many at once — e.g. a
250
+ generated script reporting 4,000 identical write failures is **one** `record` call with
251
+ `"count": 4000`. Distinct problems are distinct subtypes or error codes, not bigger
252
+ counts.
253
+
254
+ Every event needs: `event_type`, `stage` (defaults to the open stage), `skill` (the
255
+ active `rp-*` resource, e.g. `"rp-mapper"`), `severity` (`blocking` | `degraded` |
256
+ `cosmetic` | `info`), and `what_happened`. Add `entity_type`, `wix_api_surface` (e.g.
257
+ `stores/v3`), `source_api_surface` (endpoint class like `wp/v2/posts` — never a URL),
258
+ `wix_app_id`, and `error_code` whenever they apply — they are the cross-run group-by keys.
259
+
260
+ 1. **`halt_needs_user`** — the run stopped at a defined needs-user state. Prefer the
261
+ mechanical form — `wait start --halt <subtype> …` emits it for you (lifecycle step 3);
262
+ record it yourself only for a halt with no wait interval. `subtype`: `missing_input`
263
+ (missing/invalid required input or credential) | `manual_only` (genuinely manual step,
264
+ no API) | `systemic_failure` (systemic failure or data-loss risk).
265
+
266
+ 2. **`manual_action_required`** — the execution plan flagged something as "can't be done,
267
+ needs manual action" (e.g. a storage-plan upgrade), whether or not the run halted on
268
+ it. `subtype`: `plan_or_billing` | `dashboard_only` | `external_dependency` | `other`.
269
+
270
+ 3. **`error`** — an API or script error, including recovered ones. Carry `error_code`
271
+ (required — it is the discriminator; no subtype), `retry_count`, and `recovered`.
272
+ Record **one event per resolved retry chain**, after the outcome is known — the final
273
+ `recovered`, the total `retry_count` — never one call per attempt (per-attempt calls
274
+ fold into one class, and the failing first attempt's fields would bury the recovery).
275
+ When recovery required a *change* (not just a retry), `actual` must record **what
276
+ change made it succeed**, as an observation: "retried with the description as plain
277
+ text instead of HTML; the write succeeded" — never "the fix is X". If that change
278
+ deviated from the documented path — including a change to a *planned command or
279
+ value*, like simplifying an input the plan specified — also emit a paired
280
+ `skill_coverage_gap` (`undocumented_workaround`).
281
+
282
+ 4. **`fidelity_loss`** — the migration technically proceeded but lost something.
283
+ `subtype`: `dropped_field` | `unverified_enum` | `no_target` (source entity with no
284
+ clean Wix target) | `coerced_value`. For a loss triggered by specific records, inline
285
+ the offending record's **sanitized shape** in `observed_shapes` — field names and
286
+ types and which field was dropped/coerced, never values.
287
+
288
+ 5. **`api_gap`** — a missing or insufficient Wix API capability. `subtype`:
289
+ `missing_api` | `missing_capability` (API exists but cannot express the operation) |
290
+ `internal_only` (capability exists but is not publicly exposed) | `other`. Carry
291
+ `wix_api_surface` (required) and `error_code` — that signature is matched centrally
292
+ across runs. **Never write to any backlog file; the event is the whole per-run
293
+ obligation.**
294
+
295
+ 6. **`skill_coverage_gap`** — **the standing self-report, and the highest-value signal
296
+ for improving the skills.** Whenever you act beyond what the active skill explicitly
297
+ told you to do — you guess a value, work around a missing instruction, resolve an
298
+ ambiguity by judgment, or handle a case the skill does not cover — record it **at that
299
+ moment**. `subtype`: `guessed_value` | `undocumented_workaround` |
300
+ `ambiguous_instruction` | `path_not_covered`. Describe the situation and the action
301
+ taken as an observation: "skill did not specify which enum value maps to X, so a value
302
+ was chosen to proceed" — never "the skill should add Y". If you are unsure whether
303
+ something counts as improvisation, it does — record it.
304
+
305
+ 7. **`user_decision`** — the user's answer at every defined checkpoint or fork: the
306
+ mapping-review checkpoint, the approval gate, and intake forks (comments
307
+ anonymization, delivery mode, media reachability, …). `subtype`: `accepted` |
308
+ `declined` | `deferred` | `amended`; `decision_point` (required) names the fork, e.g.
309
+ `mapping_review`, `approval_gate`, `comments_anonymization`. Record the decision, not
310
+ the user's reasoning verbatim. An `amended` acceptance whose change exposed a mapping
311
+ problem additionally surfaces that problem as `fidelity_loss` or
312
+ `skill_coverage_gap`. A `declined` at a terminal checkpoint pairs with
313
+ `terminal_state: abandoned_by_user`.
314
+
315
+ 8. **`pipeline_defect`** — our own migration machinery misbehaved: not a Wix API error,
316
+ not a source failure, not your improvisation. `subtype`: `state_inconsistency` (two
317
+ pipeline state artifacts disagree) | `ordering_violation` (a step ran before its
318
+ prerequisite's output existed) | `record_defect` (a pipeline record/log is malformed
319
+ or misleading as evidence) | `other`. Name the artifacts and their states in
320
+ `what_happened` — names and states, never contents.
321
+
322
+ ### `evidence_refs` — rare, not routine
323
+
324
+ Author every event to be **self-sufficient**: coded fields + bounded free text +
325
+ `observed_shapes` should let a reviewer triage it without opening any artifact. Add
326
+ `evidence_refs` (`{"artifact":"execution-log.md","locator":"## Import"}`) only for the
327
+ exceptional event whose signal genuinely cannot carry the full observation. Use
328
+ project-root-relative paths and prefer section headings as locators (line ranges break
329
+ when files regenerate). Never reference secret-bearing config files.
330
+
331
+ ## What never to do
332
+
333
+ - Never hand-write, edit, or re-read `run-telemetry.json` or `telemetry/` files — the
334
+ recorder appends; you only call it.
335
+ - Never record client data values, names, URLs beyond the recorded source origin, or
336
+ secrets — in any field, including shapes and locators.
337
+ - Never record a fix, root cause, or recommendation — observations only.
338
+ - Never estimate durations — timing comes from `stage`/`wait` boundary calls.
339
+ - Never skip a rejected call: fix the listed fields and retry. Rejections are counted
340
+ against telemetry health either way.
341
+ - Never create or update improvement/feature-request backlog files during a run — those
342
+ are maintained centrally from many runs' telemetry, not per run.
343
+ - Never delete or trim project artifacts for telemetry reasons — capture is a
344
+ non-destructive view; size is not a reason to drop anything.