@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.
- package/README.md +5 -1
- package/package.json +1 -1
- package/skills/wix-app/SKILL.md +4 -1
- package/skills/wix-app/references/APP_TOOLS.md +134 -0
- package/skills/wix-app/references/CUSTOM_ELEMENT_WIDGET.md +1 -1
- package/skills/wix-app/references/DASHBOARD_PAGE.md +0 -10
- package/skills/wix-app/references/DATA_COLLECTION.md +6 -4
- package/skills/wix-app/references/EDITOR_REACT_COMPONENT.md +28 -7
- package/skills/wix-app/references/SERVICE_PLUGIN.md +12 -10
- package/skills/wix-app/references/STORES_VERSIONING.md +9 -211
- package/skills/wix-app/references/app-tools/TOOLS.md +75 -0
- package/skills/wix-app/references/backend-event/COMMON-EVENTS.md +5 -0
- package/skills/wix-app/references/dashboard-page/DASHBOARD_API.md +2 -2
- package/skills/wix-app/references/editor-react-component/A11Y-REVIEW-REFERENCE.md +172 -0
- package/skills/wix-app/references/editor-react-component/A11Y-REVIEW.md +138 -0
- package/skills/wix-app/references/editor-react-component/ANIMATED-COMPONENTS.md +172 -0
- package/skills/wix-app/references/editor-react-component/BRANDED-COMPONENTS.md +29 -0
- package/skills/wix-app/references/editor-react-component/COMPONENT-API.md +1 -1
- package/skills/wix-app/references/editor-react-component/COMPONENT-PREVIEW.md +57 -0
- package/skills/wix-app/references/editor-react-component/CSS-GUIDELINES.md +33 -2
- package/skills/wix-app/references/editor-react-component/DESIGN-STATES.md +5 -3
- package/skills/wix-app/references/editor-react-component/DIRECTIONALITY.md +18 -1
- package/skills/wix-app/references/editor-react-component/PARTS.md +15 -2
- package/skills/wix-app/references/editor-react-component/REACT-GUIDELINES.md +4 -3
- package/skills/wix-app/references/service-plugin/BOOKINGS-STAFF-SORTING.md +13 -9
- package/skills/wix-app/references/service-plugin/DISCOUNT-TRIGGERS.md +4 -0
- package/skills/wix-app/references/service-plugin/GIFT-CARDS.md +4 -0
- package/skills/wix-app/references/service-plugin/PAYMENT-SETTINGS.md +3 -1
- package/skills/wix-app/references/service-plugin/SHIPPING-RATES.md +4 -0
- package/skills/wix-app/references/service-plugin/TOOLS_PROVIDER.md +54 -0
- package/skills/wix-app/references/stores/CATEGORIES.md +22 -0
- package/skills/wix-app/references/stores/GET_PRODUCT.md +99 -0
- package/skills/wix-app/references/stores/INVENTORY.md +37 -0
- package/skills/wix-app/references/stores/QUERY.md +119 -0
- package/skills/wix-app/references/stores/WRITE.md +55 -0
- package/skills/wix-docs/SKILL.md +35 -3
- package/skills/wix-headless/SKILL.md +9 -2
- package/skills/wix-headless/entry/bootstrap.mjs +2 -2
- package/skills/wix-headless/entry/skill.md +0 -2
- package/skills/wix-headless/references/CAPABILITIES.md +6 -4
- package/skills/wix-headless/references/CONTENT.md +36 -0
- package/skills/wix-headless/references/DESIGN.md +54 -0
- package/skills/wix-headless/references/DISCOVERY.md +25 -1
- package/skills/wix-headless/references/FEEDBACK.md +16 -5
- package/skills/wix-headless/references/IMAGE_GENERATION.md +10 -0
- package/skills/wix-headless/references/SDK_HANDOFF.md +2 -0
- package/skills/wix-headless/references/SEED.md +3 -1
- package/skills/wix-headless/references/SETUP.md +1 -1
- package/skills/wix-headless/references/inline-recipes/how-to-code-a-store.md +3 -2
- package/skills/wix-headless/references/inline-recipes/how-to-code-restaurant-reservations.md +42 -2
- package/skills/wix-headless/references/inline-recipes/setup-bookings.md +5 -1
- package/skills/wix-headless/references/inline-recipes/setup-forms.md +1 -1
- package/skills/wix-headless/references/inline-recipes/setup-online-store.md +33 -8
- package/skills/wix-headless/references/inline-recipes/setup-portfolio.md +3 -1
- package/skills/wix-headless/references/inline-recipes/setup-restaurant-experiences.md +73 -0
- package/skills/wix-headless/references/inline-recipes/setup-restaurant-orders.md +38 -2
- package/skills/wix-headless/references/inline-recipes/setup-restaurant-reservations.md +20 -1
- package/skills/wix-headless/references/inline-recipes/setup-restaurants.md +1 -1
- package/skills/wix-headless/references/managed/CONNECT.md +2 -2
- package/skills/wix-headless/references/managed/CREATE.md +15 -1
- package/skills/wix-headless/references/managed/DEPLOYMENT.md +47 -0
- package/skills/wix-headless/references/self-managed/DEPLOYMENT.md +8 -0
- package/skills/wix-headless/references/stripe/DEPLOYMENT.md +8 -0
- package/skills/wix-manage/SKILL.md +131 -12
- package/skills/wix-manage/references/analytics/analytics-dashboard-navigation.md +41 -0
- package/skills/wix-manage/references/analytics/query-site-analytics.md +66 -9
- package/skills/wix-manage/references/app-installation/app-installation-dashboard-navigation.md +28 -0
- package/skills/wix-manage/references/app-installation/install-wix-apps.md +3 -0
- package/skills/wix-manage/references/blog/blog-dashboard-navigation.md +56 -0
- package/skills/wix-manage/references/blog/how-to-create-blog-posts.md +31 -6
- package/skills/wix-manage/references/bookings/booking-service-policy-setup.md +3 -1
- package/skills/wix-manage/references/bookings/bookings-dashboard-navigation.md +63 -0
- package/skills/wix-manage/references/bookings/create-booking-service-from-prompt.md +6 -5
- package/skills/wix-manage/references/bookings/create-course-service.md +30 -5
- package/skills/wix-manage/references/bookings/diagnose-availability-issues.md +85 -42
- package/skills/wix-manage/references/cms/cms-dashboard-navigation.md +44 -0
- package/skills/wix-manage/references/cms/cms-data-items-crud.md +31 -3
- package/skills/wix-manage/references/cms/cms-publishing-flow.md +287 -0
- package/skills/wix-manage/references/cms/cms-schema-management.md +33 -1
- package/skills/wix-manage/references/contacts/contacts-dashboard-navigation.md +46 -0
- package/skills/wix-manage/references/contacts/create-a-contact.md +82 -0
- package/skills/wix-manage/references/contacts/update-a-contact.md +119 -0
- package/skills/wix-manage/references/dashboard-navigation/dashboard-navigation.md +82 -0
- package/skills/wix-manage/references/dashboard-navigation/routes.json +1733 -0
- package/skills/wix-manage/references/domains/domains-dashboard-navigation.md +32 -0
- package/skills/wix-manage/references/ecommerce/ecom-pricing.md +4 -4
- package/skills/wix-manage/references/ecommerce/ecom-shipping.md +1 -1
- package/skills/wix-manage/references/ecommerce/gift-cards/ecom-gift-cards-goal-sell-gift-cards.md +338 -0
- package/skills/wix-manage/references/ecommerce/pricing-promotions/ecom-pricing-create-discount-rule.md +42 -78
- package/skills/wix-manage/references/ecommerce/pricing-promotions/ecom-pricing-flow-bundle-and-save.md +1 -1
- package/skills/wix-manage/references/ecommerce/pricing-promotions/ecom-pricing-flow-stock-mover.md +1 -1
- package/skills/wix-manage/references/ecommerce/pricing-promotions/ecom-pricing-flow-upsell-boost.md +1 -1
- package/skills/wix-manage/references/ecommerce/recommend-ecommerce-strategy.md +90 -92
- package/skills/wix-manage/references/events/create-wix-event.md +176 -0
- package/skills/wix-manage/references/events/manage-wix-events.md +174 -0
- package/skills/wix-manage/references/forms/forms-dashboard-navigation.md +44 -0
- package/skills/wix-manage/references/get-paid/get-paid-dashboard-navigation.md +52 -0
- package/skills/wix-manage/references/get-paid/how-to-setup-wix-payments.md +30 -7
- package/skills/wix-manage/references/google-ads/billing-and-payment.md +80 -0
- package/skills/wix-manage/references/google-ads/create-performance-max-campaign.md +212 -0
- package/skills/wix-manage/references/google-ads/get-campaign-suggestions.md +110 -0
- package/skills/wix-manage/references/google-ads/google-ads-dashboard-navigation.md +25 -0
- package/skills/wix-manage/references/google-ads/install-and-create-account.md +155 -0
- package/skills/wix-manage/references/google-ads/manage-campaign-lifecycle.md +63 -0
- package/skills/wix-manage/references/google-ads/query-campaign-analytics.md +155 -0
- package/skills/wix-manage/references/marketing/create-and-publish-social-post.md +225 -144
- package/skills/wix-manage/references/marketing/generate-and-publish-marketing-plan.md +19 -10
- package/skills/wix-manage/references/marketing/marketing-dashboard-navigation.md +52 -0
- package/skills/wix-manage/references/pricing-plans/create-and-update-pricing-plans.md +99 -1
- package/skills/wix-manage/references/pricing-plans/pricing-plans-dashboard-navigation.md +45 -0
- package/skills/wix-manage/references/restaurants/restaurants-dashboard-navigation.md +68 -0
- package/skills/wix-manage/references/restaurants/wix-restaurants-setup.md +94 -125
- package/skills/wix-manage/references/site-properties/change-payment-currency-site-properties.md +48 -9
- package/skills/wix-manage/references/site-properties/site-properties-dashboard-navigation.md +31 -0
- package/skills/wix-manage/references/sites/create-headless-site.md +52 -0
- package/skills/wix-manage/references/sites/create-site-from-template.md +2 -25
- package/skills/wix-manage/references/sites/site-import.md +243 -0
- package/skills/wix-manage/references/sites/sites-dashboard-navigation.md +29 -0
- package/skills/wix-manage/references/stores/add-store-pages-to-site.md +17 -1
- package/skills/wix-manage/references/stores/create-product-from-image.md +8 -6
- package/skills/wix-manage/references/stores/create-product-with-options-catalog-v3.md +16 -10
- package/skills/wix-manage/references/stores/find-products-query-and-search-catalog-v3.md +26 -8
- package/skills/wix-manage/references/stores/stores-dashboard-navigation.md +65 -0
- package/skills/wix-manage/references/stores/update-product-with-options.md +39 -7
- package/skills/wix-replatform/.publish-manifest.json +8 -0
- package/skills/wix-replatform/SKILL.md +693 -0
- package/skills/wix-replatform/lib/artifact-freshness.js +215 -0
- package/skills/wix-replatform/lib/completion-report.js +200 -0
- package/skills/wix-replatform/lib/config-env.js +59 -0
- package/skills/wix-replatform/lib/execution-manifest.js +185 -0
- package/skills/wix-replatform/lib/execution-state.js +173 -0
- package/skills/wix-replatform/lib/import-recovery.js +313 -0
- package/skills/wix-replatform/lib/local-state.js +642 -0
- package/skills/wix-replatform/lib/orchestration-preflight.js +143 -0
- package/skills/wix-replatform/lib/orchestration-router.js +122 -0
- package/skills/wix-replatform/lib/orchestration-state.js +455 -0
- package/skills/wix-replatform/lib/progress-log.js +224 -0
- package/skills/wix-replatform/lib/progress-log.sh +140 -0
- package/skills/wix-replatform/lib/url-preservation-state.js +391 -0
- package/skills/wix-replatform/resources/rp-discovery/SKILL.md +184 -0
- package/skills/wix-replatform/resources/rp-execute-import/SKILL.md +529 -0
- package/skills/wix-replatform/resources/rp-execute-setup/SKILL.md +316 -0
- package/skills/wix-replatform/resources/rp-execute-setup/scripts/mint-token.sh +64 -0
- package/skills/wix-replatform/resources/rp-import-codegen/SKILL.md +1114 -0
- package/skills/wix-replatform/resources/rp-mapper/SKILL.md +430 -0
- package/skills/wix-replatform/resources/rp-mapper/lib/mapping-resolve.js +217 -0
- package/skills/wix-replatform/resources/rp-mapper/scripts/resolve-mapping.js +148 -0
- package/skills/wix-replatform/resources/rp-mapper/wix-business-solutions-taxonomy.md +378 -0
- package/skills/wix-replatform/resources/rp-setup-discovery/SKILL.md +183 -0
- package/skills/wix-replatform/resources/rp-source-csv/SKILL.md +478 -0
- package/skills/wix-replatform/resources/rp-source-csv/lib/canonical-record.js +136 -0
- package/skills/wix-replatform/resources/rp-source-csv/lib/csv-fileset.js +0 -0
- package/skills/wix-replatform/resources/rp-source-csv/lib/csv-fingerprint.js +310 -0
- package/skills/wix-replatform/resources/rp-source-csv/lib/csv-layout.js +1081 -0
- package/skills/wix-replatform/resources/rp-source-csv/lib/csv-parse.js +618 -0
- package/skills/wix-replatform/resources/rp-source-csv/scripts/csv-discovery.js +949 -0
- package/skills/wix-replatform/resources/rp-source-csv/source-schema.example.json +196 -0
- package/skills/wix-replatform/resources/rp-source-csv/vendors/bigcommerce.json +66 -0
- package/skills/wix-replatform/resources/rp-source-csv/vendors/magento.json +60 -0
- package/skills/wix-replatform/resources/rp-source-csv/vendors/shopify.json +95 -0
- package/skills/wix-replatform/resources/rp-source-csv/vendors/woocommerce.json +82 -0
- package/skills/wix-replatform/resources/rp-source-wordpress/SKILL.md +256 -0
- package/skills/wix-replatform/resources/rp-source-wordpress/lib/wp-http.js +249 -0
- package/skills/wix-replatform/resources/rp-source-wordpress/lib/wp-route-classifier.js +444 -0
- package/skills/wix-replatform/resources/rp-source-wordpress/scripts/wp-discovery.js +774 -0
- package/skills/wix-replatform/resources/rp-source-wordpress/source-schema.example.json +71 -0
- package/skills/wix-replatform/resources/rp-target-wix/SKILL.md +632 -0
- package/skills/wix-replatform/resources/rp-target-wix/SPEC-product-reviews-and-blog-authorship.md +330 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/README.md +21 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/blog/domain.json +19 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/blog/entities/category.json +37 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/blog/entities/comment.json +37 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/blog/entities/post.json +39 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/blog/entities/tag.json +35 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/cms/domain.json +14 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/cms/entities/collection.json +35 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/cms/entities/data-item.json +36 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/cms/entities/reference.json +35 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/crm/domain.json +14 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/crm/entities/contact.json +131 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/crm/entities/email-subscription.json +37 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/crm/entities/label.json +37 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/ecom/domain.json +21 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/ecom/entities/order-line-item.json +37 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/ecom/entities/order-refund.json +37 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/ecom/entities/order.json +97 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/index.json +528 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/media/domain.json +14 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/media/entities/media-file.json +38 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/media/entities/media-folder.json +37 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/members/domain.json +13 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/members/entities/badge.json +37 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/members/entities/member.json +53 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/schema.json +84 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/stores/domain.json +25 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/stores/entities/category.json +37 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/stores/entities/coupon.json +37 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/stores/entities/inventory-item.json +38 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/stores/entities/product-tag.json +37 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/stores/entities/product.json +90 -0
- package/skills/wix-replatform/resources/rp-target-wix/lib/audit-summary.js +64 -0
- package/skills/wix-replatform/resources/rp-target-wix/lib/contract-ledger.js +141 -0
- package/skills/wix-replatform/resources/rp-target-wix/lib/domain-knowledge.js +384 -0
- package/skills/wix-replatform/resources/rp-target-wix/lib/ndjson.js +260 -0
- package/skills/wix-replatform/resources/rp-target-wix/lib/stores-verification.js +238 -0
- package/skills/wix-replatform/resources/rp-target-wix/lib/wix-build.js +237 -0
- package/skills/wix-replatform/resources/rp-target-wix/lib/wix-target-spec.js +238 -0
- package/skills/wix-replatform/resources/rp-target-wix/lib/wix-writers.js +2219 -0
- package/skills/wix-replatform/resources/rp-target-wix/scripts/domain-knowledge-validate.js +31 -0
- package/skills/wix-replatform/resources/rp-target-wix/scripts/domain-knowledge.js +100 -0
- package/skills/wix-replatform/resources/rp-target-wix/scripts/verify-stores.js +107 -0
- package/skills/wix-replatform/resources/rp-telemetry/SKILL.md +344 -0
- package/skills/wix-replatform/resources/rp-telemetry/lib/bi-sink.js +250 -0
- package/skills/wix-replatform/resources/rp-telemetry/lib/telemetry-recorder.js +1927 -0
- package/skills/wix-replatform/resources/rp-telemetry/scripts/meter-from-audit.js +83 -0
- package/skills/wix-replatform/resources/rp-telemetry/scripts/rp-telemetry.js +141 -0
- package/skills/wix-replatform/scripts/artifact-freshness.js +76 -0
- package/skills/wix-replatform/scripts/execution-manifest-validate.js +43 -0
- package/skills/wix-replatform/scripts/execution-state-prepare.js +128 -0
- package/skills/wix-replatform/scripts/orchestration-preflight.js +48 -0
- package/skills/wix-replatform/scripts/orchestration-route.js +46 -0
- package/skills/wix-replatform/scripts/orchestration-state.js +245 -0
- package/skills/wix-vibe-headless/SKILL.md +54 -25
- package/skills/wix-vibe-headless/install/deploy.cjs +95 -0
- package/skills/wix-vibe-headless/install/pin-agents-md.cjs +34 -0
- package/skills/wix-vibe-headless/platforms/README.md +26 -0
- package/skills/wix-vibe-headless/platforms/base44.md +177 -0
- package/skills/wix-vibe-headless/platforms/generic.md +122 -0
- package/skills/wix-vibe-headless/references/blog/INSTRUCTIONS.md +230 -119
- package/skills/wix-vibe-headless/references/blog/app/components/PostCard.jsx +43 -0
- package/skills/wix-vibe-headless/references/blog/app/components/PostChips.jsx +25 -0
- package/skills/wix-vibe-headless/references/blog/app/components/PostGrid.jsx +15 -0
- package/skills/wix-vibe-headless/references/blog/app/context/TaxonomyContext.jsx +35 -0
- package/skills/wix-vibe-headless/references/blog/app/hooks/usePostDetail.js +38 -0
- package/skills/wix-vibe-headless/references/blog/app/pages/Blog.jsx +40 -0
- package/skills/wix-vibe-headless/references/blog/app/pages/CategoryPage.jsx +54 -0
- package/skills/wix-vibe-headless/references/blog/app/pages/PostDetail.jsx +65 -0
- package/skills/wix-vibe-headless/references/blog/app/pages/TagPage.jsx +50 -0
- package/skills/wix-vibe-headless/references/blog/seed/SEED.md +103 -0
- package/skills/wix-vibe-headless/references/blog/seed/seed-blog.js +270 -0
- package/skills/wix-vibe-headless/references/bookings/INSTRUCTIONS.md +260 -145
- package/skills/wix-vibe-headless/references/bookings/app/components/BookingForm.jsx +65 -0
- package/skills/wix-vibe-headless/references/bookings/app/components/ServiceCard.jsx +47 -0
- package/skills/wix-vibe-headless/references/bookings/app/components/ServiceGrid.jsx +13 -0
- package/skills/wix-vibe-headless/references/bookings/app/components/SlotPicker.jsx +126 -0
- package/skills/wix-vibe-headless/references/bookings/app/hooks/useServiceDetail.js +108 -0
- package/skills/wix-vibe-headless/references/bookings/app/hooks/useServices.js +58 -0
- package/skills/wix-vibe-headless/references/bookings/app/lib/serviceFacts.js +95 -0
- package/skills/wix-vibe-headless/references/bookings/app/pages/ServiceDetail.jsx +94 -0
- package/skills/wix-vibe-headless/references/bookings/app/pages/Services.jsx +89 -0
- package/skills/wix-vibe-headless/references/bookings/{wix-bookings-checkout.js → app/rest/wix-bookings-checkout.js} +1 -1
- package/skills/wix-vibe-headless/references/bookings/{wix-bookings-services.js → app/rest/wix-bookings-services.js} +90 -12
- package/skills/wix-vibe-headless/references/bookings/seed/SEED.md +117 -0
- package/skills/wix-vibe-headless/references/bookings/seed/seed-bookings.js +333 -0
- package/skills/wix-vibe-headless/references/cms/INSTRUCTIONS.md +169 -147
- package/skills/wix-vibe-headless/references/cms/app/collection.config.js +31 -0
- package/skills/wix-vibe-headless/references/cms/app/lib/wixImage.js +18 -0
- package/skills/wix-vibe-headless/references/cms/{wix-cms.js → app/rest/wix-cms.js} +47 -2
- package/skills/wix-vibe-headless/references/cms/seed/SEED.md +145 -0
- package/skills/wix-vibe-headless/references/events/INSTRUCTIONS.md +228 -131
- package/skills/wix-vibe-headless/references/events/app/components/CategoryFilter.jsx +23 -0
- package/skills/wix-vibe-headless/references/events/app/components/EventCard.jsx +43 -0
- package/skills/wix-vibe-headless/references/events/app/components/EventGrid.jsx +13 -0
- package/skills/wix-vibe-headless/references/events/app/components/EventRegistration.jsx +29 -0
- package/skills/wix-vibe-headless/references/events/app/components/RsvpForm.jsx +57 -0
- package/skills/wix-vibe-headless/references/events/app/components/TicketPicker.jsx +78 -0
- package/skills/wix-vibe-headless/references/events/app/hooks/useEventDetail.js +27 -0
- package/skills/wix-vibe-headless/references/events/app/hooks/useEventsList.js +54 -0
- package/skills/wix-vibe-headless/references/events/app/hooks/useRsvpForm.js +40 -0
- package/skills/wix-vibe-headless/references/events/app/hooks/useTicketing.js +81 -0
- package/skills/wix-vibe-headless/references/events/app/pages/EventDetail.jsx +48 -0
- package/skills/wix-vibe-headless/references/events/app/pages/Events.jsx +36 -0
- package/skills/wix-vibe-headless/references/events/{wix-events-browse.js → app/rest/wix-events-browse.js} +3 -2
- package/skills/wix-vibe-headless/references/events/seed/SEED.md +107 -0
- package/skills/wix-vibe-headless/references/events/seed/seed-events.js +251 -0
- package/skills/wix-vibe-headless/references/members/INSTRUCTIONS.md +276 -188
- package/skills/wix-vibe-headless/references/members/app/components/LoginForm.jsx +101 -0
- package/skills/wix-vibe-headless/references/members/app/components/MemberMenu.jsx +33 -0
- package/skills/wix-vibe-headless/references/members/app/components/RequireAuth.jsx +21 -0
- package/skills/wix-vibe-headless/references/members/app/components/SocialButtons.jsx +29 -0
- package/skills/wix-vibe-headless/references/members/app/context/MemberContext.jsx +54 -0
- package/skills/wix-vibe-headless/references/members/app/hooks/useLoginForm.js +77 -0
- package/skills/wix-vibe-headless/references/members/app/pages/Account.jsx +36 -0
- package/skills/wix-vibe-headless/references/members/app/pages/Callback.jsx +32 -0
- package/skills/wix-vibe-headless/references/members/app/pages/Login.jsx +35 -0
- package/skills/wix-vibe-headless/references/members/{wix-members-auth.js → app/rest/wix-members-auth.js} +6 -3
- package/skills/wix-vibe-headless/references/members/install/Register.jsx +22 -0
- package/skills/wix-vibe-headless/references/members/seed/SEED.md +22 -0
- package/skills/wix-vibe-headless/references/portfolio/INSTRUCTIONS.md +233 -104
- package/skills/wix-vibe-headless/references/portfolio/app/components/CollectionCard.jsx +31 -0
- package/skills/wix-vibe-headless/references/portfolio/app/components/CollectionGrid.jsx +15 -0
- package/skills/wix-vibe-headless/references/portfolio/app/components/ProjectCard.jsx +39 -0
- package/skills/wix-vibe-headless/references/portfolio/app/components/ProjectGrid.jsx +15 -0
- package/skills/wix-vibe-headless/references/portfolio/app/components/ProjectMedia.jsx +29 -0
- package/skills/wix-vibe-headless/references/portfolio/app/hooks/useCollectionProjects.js +35 -0
- package/skills/wix-vibe-headless/references/portfolio/app/hooks/usePortfolioGallery.js +27 -0
- package/skills/wix-vibe-headless/references/portfolio/app/hooks/useProjectDetail.js +25 -0
- package/skills/wix-vibe-headless/references/portfolio/app/pages/CollectionPage.jsx +39 -0
- package/skills/wix-vibe-headless/references/portfolio/app/pages/Portfolio.jsx +27 -0
- package/skills/wix-vibe-headless/references/portfolio/app/pages/ProjectDetail.jsx +60 -0
- package/skills/wix-vibe-headless/references/portfolio/{wix-portfolio.js → app/rest/wix-portfolio.js} +84 -55
- package/skills/wix-vibe-headless/references/portfolio/seed/SEED.md +94 -0
- package/skills/wix-vibe-headless/references/portfolio/seed/seed-portfolio.js +236 -0
- package/skills/wix-vibe-headless/references/pricing-plans/INSTRUCTIONS.md +240 -117
- package/skills/wix-vibe-headless/references/pricing-plans/app/components/OrderCard.jsx +35 -0
- package/skills/wix-vibe-headless/references/pricing-plans/app/components/PlanCard.jsx +48 -0
- package/skills/wix-vibe-headless/references/pricing-plans/app/components/PlanGrid.jsx +16 -0
- package/skills/wix-vibe-headless/references/pricing-plans/app/components/PlanPrice.jsx +35 -0
- package/skills/wix-vibe-headless/references/pricing-plans/app/hooks/useMyPlans.js +25 -0
- package/skills/wix-vibe-headless/references/pricing-plans/app/hooks/usePlanDetail.js +28 -0
- package/skills/wix-vibe-headless/references/pricing-plans/app/hooks/usePlans.js +30 -0
- package/skills/wix-vibe-headless/references/pricing-plans/app/pages/MyPlans.jsx +30 -0
- package/skills/wix-vibe-headless/references/pricing-plans/app/pages/PlanDetail.jsx +53 -0
- package/skills/wix-vibe-headless/references/pricing-plans/app/pages/Plans.jsx +28 -0
- package/skills/wix-vibe-headless/references/pricing-plans/seed/SEED.md +86 -0
- package/skills/wix-vibe-headless/references/pricing-plans/seed/seed-pricing-plans.js +251 -0
- package/skills/wix-vibe-headless/references/restaurants/INSTRUCTIONS.md +248 -124
- package/skills/wix-vibe-headless/references/restaurants/app/components/ItemDialog.jsx +81 -0
- package/skills/wix-vibe-headless/references/restaurants/app/components/MenuItemCard.jsx +71 -0
- package/skills/wix-vibe-headless/references/restaurants/app/components/MenuList.jsx +43 -0
- package/skills/wix-vibe-headless/references/restaurants/app/components/OrderCartButton.jsx +21 -0
- package/skills/wix-vibe-headless/references/restaurants/app/components/OrderCartDrawer.jsx +60 -0
- package/skills/wix-vibe-headless/references/restaurants/app/context/OrderCartContext.jsx +63 -0
- package/skills/wix-vibe-headless/references/restaurants/app/hooks/useItemOrder.js +32 -0
- package/skills/wix-vibe-headless/references/restaurants/app/hooks/useReservation.js +73 -0
- package/skills/wix-vibe-headless/references/restaurants/app/pages/Menu.jsx +28 -0
- package/skills/wix-vibe-headless/references/restaurants/app/pages/Reservations.jsx +102 -0
- package/skills/wix-vibe-headless/references/restaurants/seed/SEED.md +180 -0
- package/skills/wix-vibe-headless/references/restaurants/seed/seed-restaurants.js +452 -0
- package/skills/wix-vibe-headless/references/shared/app/components/WixManageBanner.jsx +56 -0
- package/skills/wix-vibe-headless/references/shared/{wix-client.js → app/rest/wix-client.js} +6 -8
- package/skills/wix-vibe-headless/references/shared/app/rest/wix-config.js +6 -0
- package/skills/wix-vibe-headless/references/storefront/INSTRUCTIONS.md +263 -148
- package/skills/wix-vibe-headless/references/storefront/app/components/CartButton.jsx +20 -0
- package/skills/wix-vibe-headless/references/storefront/app/components/CartDrawer.jsx +150 -0
- package/skills/wix-vibe-headless/references/storefront/app/components/ProductCard.jsx +167 -0
- package/skills/wix-vibe-headless/references/storefront/app/components/ProductGallery.jsx +51 -0
- package/skills/wix-vibe-headless/references/storefront/app/components/ProductGrid.jsx +54 -0
- package/skills/wix-vibe-headless/references/storefront/app/components/VariantPicker.jsx +119 -0
- package/skills/wix-vibe-headless/references/storefront/app/context/CartContext.jsx +71 -0
- package/skills/wix-vibe-headless/references/storefront/app/hooks/useProductDetail.js +109 -0
- package/skills/wix-vibe-headless/references/storefront/app/hooks/useShop.js +98 -0
- package/skills/wix-vibe-headless/references/storefront/app/lib/storeImage.js +27 -0
- package/skills/wix-vibe-headless/references/storefront/app/pages/ProductDetail.jsx +139 -0
- package/skills/wix-vibe-headless/references/storefront/app/pages/Shop.jsx +75 -0
- package/skills/wix-vibe-headless/references/storefront/{wix-store-cart.js → app/rest/wix-store-cart.js} +1 -1
- package/skills/wix-vibe-headless/references/storefront/{wix-store-catalog.js → app/rest/wix-store-catalog.js} +25 -2
- package/skills/wix-vibe-headless/references/storefront/seed/SEED.md +111 -0
- package/skills/wix-vibe-headless/references/storefront/seed/seed-store.js +299 -0
- /package/skills/wix-vibe-headless/references/blog/{wix-blog.js → app/rest/wix-blog.js} +0 -0
- /package/skills/wix-vibe-headless/references/events/{wix-events-registration.js → app/rest/wix-events-registration.js} +0 -0
- /package/skills/wix-vibe-headless/references/pricing-plans/{wix-pricing-plans.js → app/rest/wix-pricing-plans.js} +0 -0
- /package/skills/wix-vibe-headless/references/restaurants/{wix-restaurants-menu.js → app/rest/wix-restaurants-menu.js} +0 -0
- /package/skills/wix-vibe-headless/references/restaurants/{wix-restaurants-ordering.js → app/rest/wix-restaurants-ordering.js} +0 -0
- /package/skills/wix-vibe-headless/references/restaurants/{wix-restaurants-reservations.js → app/rest/wix-restaurants-reservations.js} +0 -0
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: rp-setup-discovery
|
|
3
|
+
description: >-
|
|
4
|
+
Derives Wix environment prerequisites (apps, collections, schemas) from an approved
|
|
5
|
+
mapping plan. Use after mapping review and before import code generation.
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# rp-setup-discovery
|
|
9
|
+
|
|
10
|
+
Determine the Wix-side setup required before import can run safely.
|
|
11
|
+
|
|
12
|
+
## Purpose
|
|
13
|
+
|
|
14
|
+
This skill analyzes the approved mapping artifacts and derives environment prerequisites
|
|
15
|
+
such as installed apps, SMC collections, extended-fields schemas, references,
|
|
16
|
+
permissions, and any other target-system configuration dependencies.
|
|
17
|
+
|
|
18
|
+
## Required inputs
|
|
19
|
+
|
|
20
|
+
- `migrations/<project>/mapping/mapping-plan.json`
|
|
21
|
+
- `migrations/<project>/mapping/review/mapping-gaps.json`
|
|
22
|
+
- `migrations/<project>/mapping/review/mapping-summary.md`
|
|
23
|
+
- `migrations/<project>/orchestration/approvals.json`
|
|
24
|
+
- any Wix environment constraints or destination account details provided by the user
|
|
25
|
+
|
|
26
|
+
## Workflow
|
|
27
|
+
|
|
28
|
+
1. Confirm the mapping review checkpoint has been accepted, then read the mapping plan and
|
|
29
|
+
mapping summary and identify every non-native requirement.
|
|
30
|
+
2. For mapped entities with `targetRef`, load compact domain/entity summaries through
|
|
31
|
+
`rp-target-wix/scripts/domain-knowledge.js summarize-entities` and include
|
|
32
|
+
`wixAppsRequired`, `setupRequirements`, target classification, and write verification
|
|
33
|
+
level in setup analysis.
|
|
34
|
+
3. Determine which Wix apps must be installed or enabled.
|
|
35
|
+
4. Determine which SMC collections must exist.
|
|
36
|
+
5. Determine which extended-fields schemas, references, enums, or validation rules must exist.
|
|
37
|
+
6. Capture dependency ordering where setup steps depend on each other.
|
|
38
|
+
7. Write a setup artifact that downstream execution can verify.
|
|
39
|
+
|
|
40
|
+
## Artifact to create or update
|
|
41
|
+
|
|
42
|
+
- `migrations/<project>/setup/run.json`
|
|
43
|
+
- `migrations/<project>/setup/setup-plan.json`
|
|
44
|
+
- `migrations/<project>/setup/setup-requirements.json`
|
|
45
|
+
- `migrations/<project>/setup/setup-blockers.json`
|
|
46
|
+
- `migrations/<project>/setup/llm-handoff.json`
|
|
47
|
+
- `migrations/<project>/setup/review/setup-summary.md`
|
|
48
|
+
- `migrations/<project>/orchestration/checkpoints.json`
|
|
49
|
+
|
|
50
|
+
Treat `mapping/review/mapping-summary.md` as the user-facing statement of intent and
|
|
51
|
+
`mapping/mapping-plan.json` as
|
|
52
|
+
the detailed contract. If they materially disagree, halt and send the workflow back to
|
|
53
|
+
`rp-mapper` to correct them before deriving setup requirements.
|
|
54
|
+
|
|
55
|
+
## Minimum contents
|
|
56
|
+
|
|
57
|
+
- required Wix apps
|
|
58
|
+
- local crosswalk authority and optional CMS mirror requirements
|
|
59
|
+
- required collections and schemas
|
|
60
|
+
- required field definitions
|
|
61
|
+
- permissions or access prerequisites
|
|
62
|
+
- setup order
|
|
63
|
+
- manual steps vs. steps that can be automated
|
|
64
|
+
- verification criteria for each requirement
|
|
65
|
+
|
|
66
|
+
## Optional source reachability setup for media
|
|
67
|
+
|
|
68
|
+
If the mapping imports media by URL and the source profile shows `localhost`,
|
|
69
|
+
`127.0.0.1`, or another private-only source URL, add an optional setup note for media
|
|
70
|
+
reachability. This is **not** a blocker for non-media entities and should not be framed as
|
|
71
|
+
a required Wix-side app/setup item. As far as we know today, it only affects Wix Media
|
|
72
|
+
import because Wix's import-from-URL API fetches files from Wix servers.
|
|
73
|
+
|
|
74
|
+
Offer two options in `setup/review/setup-summary.md` and preserve the machine-readable
|
|
75
|
+
effect in `setup/setup-blockers.json` or `setup/setup-requirements.json`:
|
|
76
|
+
|
|
77
|
+
- Expose the local source through a public HTTPS tunnel before live media import.
|
|
78
|
+
- Skip/defer media import for the first live run and continue non-media entities.
|
|
79
|
+
|
|
80
|
+
For ngrok, include:
|
|
81
|
+
|
|
82
|
+
```bash
|
|
83
|
+
brew install ngrok
|
|
84
|
+
ngrok config add-authtoken "<YOUR_AUTHTOKEN>"
|
|
85
|
+
ngrok http 8090
|
|
86
|
+
export WP_BASE_URL=https://<id>.ngrok-free.app
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
Tell the user to use the HTTPS forwarding URL as `WP_BASE_URL` / `SOURCE_URL`, or ensure
|
|
90
|
+
generated code rewrites source media URLs from the local base URL to the tunnel base URL.
|
|
91
|
+
|
|
92
|
+
## Verifying Wix APIs
|
|
93
|
+
|
|
94
|
+
Confirm that the apps, collections, field types, and references you require actually
|
|
95
|
+
exist in Wix with the names/types you state — never invent them.
|
|
96
|
+
|
|
97
|
+
- Verify at the moment you write the requirement; do not defer it. Verify **enum
|
|
98
|
+
values**, not just names: confirm each `Field.type` against the Create Data Collection
|
|
99
|
+
schema. (Common trap: there is no `SLUG` type — a Wix slug is a `TEXT` field.)
|
|
100
|
+
- If a Wix tool surface such as Wix MCP is available, use it as a fast verification aid.
|
|
101
|
+
- If no Wix tool surface is available, rely on `rp-target-wix`'s verified contracts plus
|
|
102
|
+
published Wix REST/SDK documentation and conservative, known-good names, and mark the
|
|
103
|
+
requirement `unverified` so a human confirms it before `rp-execute-setup` runs.
|
|
104
|
+
|
|
105
|
+
## Standing requirement: mute site notifications (spec 0012)
|
|
106
|
+
|
|
107
|
+
Emit a **`mute-site-notifications`** requirement into `setup/setup-plan.json` and
|
|
108
|
+
`setup/setup-requirements.json` whenever mute is in effect:
|
|
109
|
+
|
|
110
|
+
- `WIX_SITE_STRATEGY=new` — **always**, as a standing rule keyed on the strategy value
|
|
111
|
+
alone. Not derived from mapping decisions, domain knowledge, or agent judgment, and not
|
|
112
|
+
conditional on `WIX_MUTE_NOTIFICATIONS` (for new sites the mute is unconditional).
|
|
113
|
+
- `WIX_SITE_STRATEGY=existing` — only when the owner explicitly opted in with
|
|
114
|
+
`WIX_MUTE_NOTIFICATIONS=on`. Under the existing-site default (`off`), emit no
|
|
115
|
+
requirement.
|
|
116
|
+
|
|
117
|
+
Requirement contents: severity **blocker**, automation mode `automatable`, ordered
|
|
118
|
+
**first among setup writes** (before app installs, collection creation, and any other
|
|
119
|
+
provisioning), executed via the `muteSiteNotifications` primitive in
|
|
120
|
+
`rp-target-wix/lib/wix-writers.js` (VERIFIED 2026-08-04) with a project-identifying
|
|
121
|
+
`reason` (`RePlatform migration — <project>`). Verification criterion:
|
|
122
|
+
`getSiteMuteState` returns `muted: true`. Auth note for the requirement: the call must
|
|
123
|
+
use the CLI-minted site token (`WIX_AUTH_TOKEN`) — an account API key gets 403.
|
|
124
|
+
|
|
125
|
+
**Config validation (fail fast):** `WIX_MUTE_NOTIFICATIONS=off` together with
|
|
126
|
+
`WIX_SITE_STRATEGY=new` is a validation error — halt with the config conflict recorded
|
|
127
|
+
rather than emitting artifacts. (`rp-import-codegen` re-validates the same rule.)
|
|
128
|
+
|
|
129
|
+
## Crosswalk authority and CMS mirror
|
|
130
|
+
|
|
131
|
+
Local files under `migrations/<project>/state/crosswalk/` are the durable
|
|
132
|
+
`sourceId -> targetId` authority for native Wix entities. Do not make CMS setup a minimum
|
|
133
|
+
requirement for native-entity idempotency.
|
|
134
|
+
|
|
135
|
+
Create/provision CMS **`ImportCrosswalk`** only when the approved mapping plan explicitly
|
|
136
|
+
requests a CMS mirror (`cmsMirror: "download" | "upload" | "download-and-upload"`). The
|
|
137
|
+
mirror is compact site-local reference data and a pre-execution seed source for
|
|
138
|
+
existing-site flows when valid local crosswalk state does not already exist. Add a CMS
|
|
139
|
+
quota warning whenever a mirror is requested.
|
|
140
|
+
|
|
141
|
+
If older artifacts call the optional mirror `MigrationRefs`, normalize it to
|
|
142
|
+
`ImportCrosswalk` and call out the rename in the artifact so downstream setup/codegen
|
|
143
|
+
share one contract.
|
|
144
|
+
|
|
145
|
+
## Classifying manual vs. automatable
|
|
146
|
+
|
|
147
|
+
Do not assert "manual" / "cannot self-provision" by assumption — check the API surface.
|
|
148
|
+
|
|
149
|
+
- Enabling a Wix app (Blog, Members, etc.) **is** automatable via the App Installation
|
|
150
|
+
API; classify it automatable and cite the method. (Common trap: do not mark Blog or
|
|
151
|
+
Members "cannot self-provision" — both are installable via the API.)
|
|
152
|
+
- When the migration carries a product catalog, emit a **`stores-catalog-v3` requirement**
|
|
153
|
+
alongside the Wix Stores app install: expected state `catalogVersion: V3_CATALOG`, verified
|
|
154
|
+
read-only via `GET https://www.wixapis.com/stores/v3/provision/version`, severity
|
|
155
|
+
**blocker**, automation mode `automatable` (it is provisioned by scaffolding the site from
|
|
156
|
+
the `commerce` template — see `replatform` → "Headless site creation"). A Stores install
|
|
157
|
+
alone does not imply V3; a `blank`-scaffolded site comes up `V1_CATALOG` and cannot be
|
|
158
|
+
converted, so this must be a first-class requirement rather than an assumption.
|
|
159
|
+
- Creating CMS collections is automatable; enabling Wix Data itself is automatable by
|
|
160
|
+
installing the **Wix Data app `appDefId e593b0bd-b783-45b8-97c2-873d42aacaf4`** via the
|
|
161
|
+
App Installation API, after which `POST /wix-data/v2/collections` creates NATIVE
|
|
162
|
+
collections with no `WDE0110` (verified live 2026-06-10; see `rp-execute-setup`).
|
|
163
|
+
- Only storage-plan upgrades, external-system credentials, and account billing are
|
|
164
|
+
genuinely manual. Mark something manual only after confirming no API covers it.
|
|
165
|
+
|
|
166
|
+
## Runtime policy
|
|
167
|
+
|
|
168
|
+
This phase is deterministic planning work. It does not create a second approval gate.
|
|
169
|
+
`setup/review/setup-summary.md` is supporting execution-planning context, not a separate
|
|
170
|
+
user approval checkpoint.
|
|
171
|
+
|
|
172
|
+
Verify names and enums rather than emitting `unverified` by default. Classify
|
|
173
|
+
automatability by checking the API surface (see above), not by assumption. If a direct
|
|
174
|
+
verification aid is unavailable, use the documented fallback and mark the requirement
|
|
175
|
+
`unverified` so downstream steps surface it before execution.
|
|
176
|
+
|
|
177
|
+
## Guardrails
|
|
178
|
+
|
|
179
|
+
- Separate required setup from optional optimizations.
|
|
180
|
+
- Avoid embedding import logic here; this file is about prerequisites.
|
|
181
|
+
- Be explicit about which requirements come from which mapping decision.
|
|
182
|
+
- Do not guess setup names or enum values when you cannot verify them. Mark them
|
|
183
|
+
`unverified` and surface the risk before execution.
|
|
@@ -0,0 +1,478 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: rp-source-csv
|
|
3
|
+
description: >-
|
|
4
|
+
CSV file source adapter: parse core, vendor fingerprinting (Shopify, WooCommerce, Magento,
|
|
5
|
+
BigCommerce), layout inference, file-set handling, and read contract for codegen. Use when
|
|
6
|
+
the migration starts from one or more CSV/export files instead of a live source URL.
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# rp-source-csv
|
|
10
|
+
|
|
11
|
+
CSV **source adapter**. Owns every CSV-specific detail the platform-agnostic skills must not
|
|
12
|
+
hardcode: how to parse a file, how to identify which vendor produced it, how its rows group
|
|
13
|
+
into entities, how a set of files resolves into entity streams, and what a generated reader
|
|
14
|
+
must get right.
|
|
15
|
+
|
|
16
|
+
## When this skill is used
|
|
17
|
+
|
|
18
|
+
This is not a stage in the migration flow — it is a reference consulted by two stages:
|
|
19
|
+
|
|
20
|
+
- **`rp-discovery`** consults the *Capture* section to sample the files and produce the
|
|
21
|
+
canonical `source-profile.md` + `source-schema.json`.
|
|
22
|
+
- **`rp-import-codegen`** consults the *Read contract* section to generate a reader that
|
|
23
|
+
extracts CSV data correctly (grouping, derived entities, empty-vs-absent) into durable
|
|
24
|
+
project-local files for the later import step.
|
|
25
|
+
|
|
26
|
+
`rp-execute-import` never consults this skill — by the time execution runs, the CSV-specific
|
|
27
|
+
knowledge is already baked into the generated reader.
|
|
28
|
+
|
|
29
|
+
## Platform identity
|
|
30
|
+
|
|
31
|
+
- Source platform: `csv` — a **file-provided** flow, not a URL probe.
|
|
32
|
+
- Set `"platform": "csv"` in the emitted `source-schema.json`, and record the detected
|
|
33
|
+
vendor per file in `sourceMeta.vendor` / `sourceMeta.sourceFiles[]`.
|
|
34
|
+
- Record `sourcePlatform=csv`, `sourceMode=files_only`, and **every** input file in
|
|
35
|
+
`fileInputPaths` in `orchestration/decisions.json`. Preflight requires no source env keys
|
|
36
|
+
for `csv`; the `files_only` branch enforces a non-empty `fileInputPaths` instead.
|
|
37
|
+
|
|
38
|
+
## Three layers
|
|
39
|
+
|
|
40
|
+
1. **A generic core** — `lib/csv-parse.js` (parse, dialect detection, type sniffing) and
|
|
41
|
+
`lib/csv-layout.js` (layout inference, derived entities). Knows nothing about commerce and
|
|
42
|
+
handles any CSV, including hand-rolled ones.
|
|
43
|
+
2. **Per-vendor overlays** — declarative JSON profiles under `vendors/` that specialize the
|
|
44
|
+
core with a vendor's fingerprint anchors, known layout, column→Wix pre-map, and quirks.
|
|
45
|
+
v1 ships **shopify, woocommerce, magento, bigcommerce**.
|
|
46
|
+
3. **A fingerprint detector** — `lib/csv-fingerprint.js` picks the overlay from the header
|
|
47
|
+
set, or honors a user-stated vendor, and falls back to `custom` below the threshold.
|
|
48
|
+
|
|
49
|
+
**The overlay is advisory, never authoritative.** The authoritative record of which columns a
|
|
50
|
+
file contains is always the header row read at discovery time. The overlay only (a)
|
|
51
|
+
*identifies* the vendor and (b) *pre-fills* mappings the LLM would otherwise propose.
|
|
52
|
+
|
|
53
|
+
## Capture (discovery-time)
|
|
54
|
+
|
|
55
|
+
Sampling the files to learn their shape — **not** a bulk load.
|
|
56
|
+
|
|
57
|
+
Before capture, verify `migrations/<project>/config/source.csv.env`. Create it if missing,
|
|
58
|
+
using empty values for the user to fill:
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
CSV_INPUT_ROOT= # optional; directory the input paths are recorded relative to
|
|
62
|
+
CSV_DELIMITER= # optional; blank = auto-detect , ; \t |
|
|
63
|
+
CSV_ENCODING= # optional; blank = auto-detect (UTF-8 / BOM)
|
|
64
|
+
CSV_VENDOR= # optional; user-stated vendor overrides fingerprint detection
|
|
65
|
+
CSV_MEDIA_URL_REWRITE_FROM=
|
|
66
|
+
CSV_MEDIA_URL_REWRITE_TO=
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
Unlike `source.wordpress.env`, **`source.csv.env` is not secret-bearing** — it holds
|
|
70
|
+
delimiter/encoding/vendor/rewrite hints only, no credentials. Regular file handling applies.
|
|
71
|
+
There is **no acquisition-mode fork and no credentials request** for a CSV run.
|
|
72
|
+
|
|
73
|
+
1. Run the deterministic capture script **from this skill's directory** (the folder
|
|
74
|
+
containing this `SKILL.md`; see `CONVENTIONS.md`):
|
|
75
|
+
|
|
76
|
+
```
|
|
77
|
+
node scripts/csv-discovery.js --file <path> [--file <path> ...] \
|
|
78
|
+
--out-dir <migrations-root>/<project>/data/csv-discovery
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
`--file` is repeatable; pass the **whole file set in one run** so roles and split files
|
|
82
|
+
are resolved together. For long runs, pass `--progress-log <path>` and poll it per
|
|
83
|
+
`CONVENTIONS.md#progress-log-polling`.
|
|
84
|
+
|
|
85
|
+
Useful options: `--vendor` (override detection), `--delimiter` / `--encoding` (override
|
|
86
|
+
detection), `--role <path>:<role>` (name a file's entity when the script cannot),
|
|
87
|
+
`--allow-header-superset` (union split files whose headers differ), `--scan-rows`.
|
|
88
|
+
|
|
89
|
+
2. Per run the script: reads each header → detects the dialect → fingerprints the vendor per
|
|
90
|
+
file → assigns a role per file and concatenates split files → resolves the layout (overlay
|
|
91
|
+
or generic classifier) → derives `column-values` entities → diffs the real header against
|
|
92
|
+
the matched profile → samples head and tail rows → infers per-column
|
|
93
|
+
type/cardinality/requiredness/examples → writes the raw dump. Because headers are read
|
|
94
|
+
fresh every run, discovered fields are never limited to what the profiles know.
|
|
95
|
+
|
|
96
|
+
3. It writes into `--out-dir`:
|
|
97
|
+
- `README.md` — the index: files, vendor detection with evidence, layout, entities,
|
|
98
|
+
profile drift, warnings.
|
|
99
|
+
- `fileset.json` — machine-readable `sourceFiles[]`, streams, vendor, dialect, layout,
|
|
100
|
+
drift, mapping hints, entities and relations. **This is what `rp-discovery` synthesizes
|
|
101
|
+
`source-schema.json` from.**
|
|
102
|
+
- `raw-capture.json` — per-column detail plus head/tail samples.
|
|
103
|
+
- `<role>--<entity>.md` — one per entity.
|
|
104
|
+
|
|
105
|
+
4. **Honor the halt.** When the capture reports `halt: true` (ambiguous layout, unknown file
|
|
106
|
+
role, conflicting split-file headers, mixed vendors for one role), stop and ask the user
|
|
107
|
+
the question named in the warning rather than synthesizing a schema from a guess.
|
|
108
|
+
|
|
109
|
+
5. **Record counts are scan-based.** The script streams each file in full for its row count
|
|
110
|
+
and retains the first `--scan-rows` rows (default 5000) for inference. When
|
|
111
|
+
`raw-capture.json` reports `scan.truncated`, say so in `source-profile.md` instead of
|
|
112
|
+
presenting a sampled count as exact.
|
|
113
|
+
|
|
114
|
+
The raw capture is evidence, not a hand-off artifact. `rp-discovery` synthesizes it into the
|
|
115
|
+
canonical artifacts and records traceability pointers (`rawDiscovery`, per-entity `rawFile`).
|
|
116
|
+
|
|
117
|
+
## Layer 1 — the generic core
|
|
118
|
+
|
|
119
|
+
`lib/csv-parse.js` is the CSV analogue of `rp-source-wordpress`'s `wp-http.js`: dependency-free
|
|
120
|
+
and reused by **both** the capture script and the generated reader so the sampler and the
|
|
121
|
+
importer parse identically. It handles what breaks a naive `split(',')`:
|
|
122
|
+
|
|
123
|
+
- **delimiter detection** (`,` `;` `\t` `|`), scored by field-count consistency **and** field
|
|
124
|
+
count, since a semicolon file whose text fields each contain a comma splits perfectly
|
|
125
|
+
consistently on `,` too. `CSV_DELIMITER` always wins.
|
|
126
|
+
- **RFC-4180 quoting**: embedded delimiters, embedded newlines, `""` escapes. A quote opens a
|
|
127
|
+
field only at field position 0; `a"b` is three literal characters.
|
|
128
|
+
- **encoding / BOM**: the mark is stripped before the header is read. A UTF-16 BOM fails fast
|
|
129
|
+
naming `CSV_ENCODING` rather than producing mojibake — full transcoding is out of scope.
|
|
130
|
+
- **line endings**: `\n`, `\r\n`, and lone `\r`, including a `\r\n` split across a chunk
|
|
131
|
+
boundary. A newline inside quotes is data and is preserved verbatim.
|
|
132
|
+
- **empty vs absent** (below).
|
|
133
|
+
- **streaming**: rows are yielded without loading the file.
|
|
134
|
+
|
|
135
|
+
### Empty vs absent is detected, not assumed
|
|
136
|
+
|
|
137
|
+
Whether an empty cell means "absent" is a property of the **writer's quoting policy**, not of
|
|
138
|
+
the datum: exporters that quote every field (Excel, Magento) can only ever produce a quoted
|
|
139
|
+
empty, and exporters that quote nothing unnecessary can only ever produce an unquoted one.
|
|
140
|
+
|
|
141
|
+
So the parser returns **strings only, never `null`**, with an optional parallel `quoted[]`
|
|
142
|
+
array, and `detectEmptyPolicy` decides once per file:
|
|
143
|
+
|
|
144
|
+
- `present-if-quoted` — the file contains **both** forms, so it genuinely distinguishes them.
|
|
145
|
+
- `always-empty` — it contains only one form, so the distinction carries no information.
|
|
146
|
+
|
|
147
|
+
The policy is recorded in `sourceMeta.dialect.emptyPolicy` and applied through
|
|
148
|
+
`coerceEmpty(value, isQuoted, policy)`. Generated readers must use it, so a required Wix field
|
|
149
|
+
is never fed an empty string the source did not actually have. This also keeps split files
|
|
150
|
+
(shape C) consistent when two parts were written by different tools.
|
|
151
|
+
|
|
152
|
+
## Layer 2 — vendor overlays
|
|
153
|
+
|
|
154
|
+
Each supported vendor is a declarative JSON profile under `vendors/`. Overlays are **data, not
|
|
155
|
+
code**, because they are numerous, additive, and pure lookup: adding or updating a vendor is a
|
|
156
|
+
data-file edit plus a header fixture, with no change to any skill logic.
|
|
157
|
+
|
|
158
|
+
```jsonc
|
|
159
|
+
{
|
|
160
|
+
"vendor": "shopify",
|
|
161
|
+
"profileVersion": "2026-07", // provenance; bump when the format changes
|
|
162
|
+
"sourceOfTruth": "https://help.shopify.com/.../csv",
|
|
163
|
+
"anchors": {
|
|
164
|
+
"required": ["Handle", "Title"], // a FEW STABLE columns — never the full schema
|
|
165
|
+
"strong": ["Body (HTML)", "Variant SKU", "Variant Price", "Option1 Name", "Vendor"],
|
|
166
|
+
"negative": ["Attribute 1 value(s)"] // presence disproves this vendor
|
|
167
|
+
},
|
|
168
|
+
"layout": {
|
|
169
|
+
"pattern": "grouped-by-key",
|
|
170
|
+
"groupKey": "Handle",
|
|
171
|
+
"continuation": "blank-key",
|
|
172
|
+
"parentEntity": "product",
|
|
173
|
+
"childEntity": "variant",
|
|
174
|
+
"columnGroups": [ // which columns belong to which entity
|
|
175
|
+
{ "entity": "variant", "prefixes": ["Variant ", "Option1 "], "columns": ["Cost per item"] },
|
|
176
|
+
{ "entity": "image", "prefixes": ["Image "] }
|
|
177
|
+
]
|
|
178
|
+
},
|
|
179
|
+
"derived": [ // entities synthesized from a column's values
|
|
180
|
+
{ "entity": "category", "fromColumn": "Product Category",
|
|
181
|
+
"hierarchySeparator": ">", "hierarchical": true, "linkPolicy": "leaf" }
|
|
182
|
+
],
|
|
183
|
+
"fileRoles": [{ "role": "product", "filenameHints": ["products_export", "products"] }],
|
|
184
|
+
"columnMap": [{ "wixTarget": "variant.sku", "aliases": ["Variant SKU", "SKU", "variant_sku"] }],
|
|
185
|
+
"quirks": ["Blank-Handle rows continue the previous product", "..."]
|
|
186
|
+
}
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
Column matching is **normalized + alias-based**: lowercase, NFKC, strip punctuation and
|
|
190
|
+
whitespace. `Body (HTML)` → `bodyhtml`, and `Option1 Name` ≡ `Option 1 Name`. This absorbs
|
|
191
|
+
casing changes and renames without a code change.
|
|
192
|
+
|
|
193
|
+
**`columnGroups` is the one thing the data cannot supply.** Shopify's `Image Src` and
|
|
194
|
+
`Variant SKU` both vary within a product group, so only a declaration can say that one is a
|
|
195
|
+
third collection and the other is the variant. Generic derivation still covers every column
|
|
196
|
+
the overlay does not name — including new columns a vendor adds later.
|
|
197
|
+
|
|
198
|
+
An overlay feeds two stages:
|
|
199
|
+
|
|
200
|
+
- **Discovery** — `layout` + `quirks` resolve grouping deterministically, avoiding the generic
|
|
201
|
+
ambiguity halt. Layout traps are stable and hard to infer, which is what makes them worth
|
|
202
|
+
encoding.
|
|
203
|
+
- **Mapping** — `columnMap` pre-fills `sourceMeta.mappingHints[]` so `rp-mapper` reviews and
|
|
204
|
+
corrects instead of authoring from scratch.
|
|
205
|
+
|
|
206
|
+
A `custom` file has no overlay: it runs core-only, and the mapper leans more on the LLM and the
|
|
207
|
+
user at the same review checkpoint. A fully stale overlay degrades to exactly that experience —
|
|
208
|
+
the floor, not a failure.
|
|
209
|
+
|
|
210
|
+
## Layer 3 — fingerprint detection
|
|
211
|
+
|
|
212
|
+
`lib/csv-fingerprint.js` identifies the vendor from the header row:
|
|
213
|
+
|
|
214
|
+
```
|
|
215
|
+
requiredRatio = |required ∩ header| / |required| (normalized EXACT match)
|
|
216
|
+
strongRatio = |strong ∩ header| / |strong|
|
|
217
|
+
score = requiredRatio === 1 ? 0.50 + 0.50·strongRatio
|
|
218
|
+
: 0.60 · requiredRatio · (0.50 + 0.50·strongRatio)
|
|
219
|
+
negative anchors present -> score *= 0.35
|
|
220
|
+
match iff score >= 0.70 AND matchedStrong >= 2 AND (winner − runnerUp) >= 0.15
|
|
221
|
+
```
|
|
222
|
+
|
|
223
|
+
- **Anchors never alias-match.** Aliases are permissive for *mapping*; permissiveness is poison
|
|
224
|
+
for *identification* — Shopify's `variant.sku` aliases include a bare `SKU`, which every
|
|
225
|
+
WooCommerce and Magento export also has.
|
|
226
|
+
- **Ratios, not counts.** Anchor ratios are bounded 0..1, so a wide CSV cannot inflate a match.
|
|
227
|
+
Do **not** reintroduce a header-count normalization: dividing by header count penalizes wide
|
|
228
|
+
files and inflates narrow ones, which is what lets a 6-column near-miss flip to a false match.
|
|
229
|
+
- Ties, sub-threshold scores, and files with fewer than two strong anchors → `custom`.
|
|
230
|
+
- A **near miss** (a drifted vendor export that lost a required anchor) is reported as
|
|
231
|
+
`nearMiss` so it becomes a user question, never silence.
|
|
232
|
+
- `CSV_VENDOR` / `--vendor` **overrides** detection, but detection still runs: a disagreement
|
|
233
|
+
is recorded as `conflict: { stated, detected }` and surfaced.
|
|
234
|
+
|
|
235
|
+
## Layout — how rows group
|
|
236
|
+
|
|
237
|
+
`lib/csv-layout.js` resolves the layout: `flat`, `grouped-by-key` (blank-key or repeat-key
|
|
238
|
+
continuation), or `sectioned`. It runs for **custom** files and as a **fallback** when a matched
|
|
239
|
+
overlay does not pin the layout — including when the overlay's declared `groupKey` is missing
|
|
240
|
+
from the header, which is recorded as `overlay-groupkey-missing` rather than crashing.
|
|
241
|
+
|
|
242
|
+
### A pinned layout is verified, not believed
|
|
243
|
+
|
|
244
|
+
An overlay's `continuation` is a **claim about the rows**, not a fact about the vendor, and it is
|
|
245
|
+
checked against the sample before it is used. Shopify is the reason: most exports blank the
|
|
246
|
+
`Handle` on continuation rows, but some repeat it on every row. Pinning `blank-key` against a
|
|
247
|
+
repeating file fails *silently* — no key is ever blank, so no row ever continues a group, and a
|
|
248
|
+
50-product file is captured as 82 single-row products with 32 blank titles.
|
|
249
|
+
|
|
250
|
+
The check fires only when the two modes would group **differently**: with one row per group both
|
|
251
|
+
readings produce the same boundaries, and reporting drift there would be noise.
|
|
252
|
+
|
|
253
|
+
| Pinned | Rejected when | Then |
|
|
254
|
+
| --- | --- | --- |
|
|
255
|
+
| `blank-key` | the key column is never blank | continuation corrected to `repeat-key` |
|
|
256
|
+
| `repeat-key` | the key column is blank on some row | continuation corrected to `blank-key` |
|
|
257
|
+
|
|
258
|
+
On rejection the generic classifier is consulted about the **disputed field only**. Which column
|
|
259
|
+
groups the rows is the part vendors do not change, and the overlay's `groupKey` has just been
|
|
260
|
+
confirmed present in the header — so a generic candidate naming that same column corroborates the
|
|
261
|
+
observed mode *even when the classifier as a whole halted*, because its halt is about **picking**
|
|
262
|
+
a key, not about this one. When corroborated, the continuation is corrected and the rest of the
|
|
263
|
+
overlay (entity names, `columnGroups`) is kept, with `source: overlay-continuation-corrected` and
|
|
264
|
+
the classifier's confidence instead of the pin's `1`. When no candidate groups on the declared key
|
|
265
|
+
either, nothing is trustworthy enough to pin and the whole inferred layout is used
|
|
266
|
+
(`inferred-after-overlay-mismatch`).
|
|
267
|
+
|
|
268
|
+
Both outcomes append to `layoutConflicts[]` and raise a warning — never a silent correction. Do
|
|
269
|
+
**not** "fix" this by re-pinning `repeat-key` in the overlay: exports vary, so that only moves the
|
|
270
|
+
same silent failure to the other half of them.
|
|
271
|
+
|
|
272
|
+
Deterministic-first: when signals are clear it sets the pattern; when they are ambiguous it
|
|
273
|
+
returns `pattern: 'unknown'` with `halt: true` and the ranked candidates, and discovery stops to
|
|
274
|
+
ask the user.
|
|
275
|
+
|
|
276
|
+
Signals worth knowing:
|
|
277
|
+
|
|
278
|
+
- **blank-key** requires the key column's non-blank values to be unique — a key never reappears
|
|
279
|
+
after an intervening key. Two candidate columns that produce the **same** group boundaries
|
|
280
|
+
(Shopify's `Handle` and `Title` both go blank on continuation rows) are *equivalent labels*,
|
|
281
|
+
not an ambiguity; different boundaries are a genuine ambiguity and halt.
|
|
282
|
+
- **repeat-key** additionally requires a supporting parent column — some other column constant
|
|
283
|
+
inside each run and different between runs. Without it, a flat product list merely *sorted* by
|
|
284
|
+
category is indistinguishable from a grouped one, and would be split into bogus parents and
|
|
285
|
+
children.
|
|
286
|
+
- **sectioned** requires a column-population skew: partitioned by the discriminator, some other
|
|
287
|
+
column's blank rate must differ by ≥ 0.7 between partitions. Without that test every
|
|
288
|
+
`Published` or `Tax class` column is a false discriminator.
|
|
289
|
+
- When a blank column's blankness is a pure function of the discriminator value, the blank-key
|
|
290
|
+
reading is already **explained by the sectioning** and does not compete with it — this is what
|
|
291
|
+
keeps a WooCommerce export from looking ambiguous.
|
|
292
|
+
|
|
293
|
+
### Parent vs child columns
|
|
294
|
+
|
|
295
|
+
A column belongs to the parent, to the child, or to a declared collection. The rule is
|
|
296
|
+
**within-group variance**, not blankness:
|
|
297
|
+
|
|
298
|
+
- A column that varies inside a group in ≥80% of multi-row groups is a **child** column.
|
|
299
|
+
- A column blank on every continuation row and populated on the head row is a **parent** column.
|
|
300
|
+
- Anything else is reported as `ambiguousColumns` rather than guessed.
|
|
301
|
+
|
|
302
|
+
The naive rule — "child columns are the ones populated on continuation rows" — is **wrong** for
|
|
303
|
+
the most important case: a Shopify product's first variant lives on its group head row, and a
|
|
304
|
+
single-variant product has no continuation rows at all.
|
|
305
|
+
|
|
306
|
+
Precedence: overlay `columnGroups` assigns the entity, generic derivation covers everything the
|
|
307
|
+
overlay does not name, and a disagreement is recorded in `layoutConflicts[]` with the overlay
|
|
308
|
+
kept. An overlay can never *lose* a column — that is what "advisory, never authoritative" means
|
|
309
|
+
in practice.
|
|
310
|
+
|
|
311
|
+
`layoutConflicts[]` carries both kinds of disagreement, because a reviewer asks the same question
|
|
312
|
+
of both — *where did this capture stop believing the overlay?* Column-level entries name a
|
|
313
|
+
`column`; layout-level entries (`overlay-continuation-mismatch`, `overlay-groupkey-missing`,
|
|
314
|
+
`overlay-discriminator-missing`) carry a `kind` and a `resolution`.
|
|
315
|
+
|
|
316
|
+
A child's `recordCount` is the number of rows that populate **at least one** child column, not the
|
|
317
|
+
group's row count: a continuation row carrying only an extra image is an image, not a variant.
|
|
318
|
+
|
|
319
|
+
## Entity origins — rows, row groups, and column values
|
|
320
|
+
|
|
321
|
+
An entity in a CSV migration comes from one of three origins, recorded per entity so the reader
|
|
322
|
+
knows how to materialize it:
|
|
323
|
+
|
|
324
|
+
- **`file-rows`** — one row = one entity (a flat `categories.csv`; also a sectioned file's
|
|
325
|
+
parent or child rows, with `filter: { column, includeValues | excludeValues }`).
|
|
326
|
+
- **`row-group`** — a group of rows = one entity (a Shopify product, its variants, its images),
|
|
327
|
+
with `groupKey`, `continuation`, and `columnGroup` where relevant.
|
|
328
|
+
- **`column-values`** — the **distinct values of a column** = an entity set. This is how
|
|
329
|
+
categories and tags arrive in every named vendor's export.
|
|
330
|
+
|
|
331
|
+
For `column-values`, capture records the source column, both separators, and the distinct-value
|
|
332
|
+
count; the reader emits a synthetic entity file (one record per distinct path, ancestors
|
|
333
|
+
included) plus the linking relation. Because the result is an ordinary entity from `rp-mapper`'s
|
|
334
|
+
point of view, the mapper maps it with no special handling and the existing dependency ordering
|
|
335
|
+
creates categories before products.
|
|
336
|
+
|
|
337
|
+
Non-obvious rules the implementation depends on:
|
|
338
|
+
|
|
339
|
+
- **Split the multi-value separator first, then the hierarchy separator.** WooCommerce's
|
|
340
|
+
`Clothing > Shirts, Sale` is two categories, one nested. The other order produces a category
|
|
341
|
+
literally named `Shirts, Sale`.
|
|
342
|
+
- A separator inside a value is escaped by quoting **inside the cell**
|
|
343
|
+
(`"Home, Garden > Tools", Sale`), so the inner split is RFC-4180 aware too.
|
|
344
|
+
- Records are emitted **depth-ascending**, so a parent is always created before its child.
|
|
345
|
+
- Only the **leaf** is linked to the product (`linkPolicy: "leaf"`); whether ancestors are also
|
|
346
|
+
attached is a mapping decision.
|
|
347
|
+
- Only **group-head rows** are read, so a Woo variation row does not double-count its product's
|
|
348
|
+
categories.
|
|
349
|
+
- Generic detection for custom files is deliberately narrow: `>` is auto-detected but `/` is
|
|
350
|
+
not (it matches every URL column), markup-bearing columns are skipped, a multi-value split
|
|
351
|
+
must collapse the distinct count, and a column is only auto-derived when its **name** says it
|
|
352
|
+
is a taxonomy. Everything else is proposed to the user.
|
|
353
|
+
|
|
354
|
+
Set **`hierarchical: true`** on a nested derived entity. A hierarchical source taxonomy mapped
|
|
355
|
+
to a flat Wix target triggers the mapper's mandatory faithfulness-ledger entry; without the flag
|
|
356
|
+
the flatten happens silently.
|
|
357
|
+
|
|
358
|
+
## File sets — roles and concatenation
|
|
359
|
+
|
|
360
|
+
`lib/csv-fileset.js` resolves a list of input paths into logical entity streams. Four shapes
|
|
361
|
+
occur in practice; **A, B and C are v1**, D is v1.1:
|
|
362
|
+
|
|
363
|
+
| Shape | Example | Handling |
|
|
364
|
+
|---|---|---|
|
|
365
|
+
| A. one file, grouped | Shopify `products_export.csv` | one stream, several entities |
|
|
366
|
+
| B. many files, independent entities | `products.csv` + `customers.csv` | one stream per role |
|
|
367
|
+
| C. many files, same entity split | `products-part1.csv` + `-part2.csv` | one stream, `partOf` recorded |
|
|
368
|
+
| D. many files, related entities | FK columns across files | **v1.1** — schema designed, detection deferred |
|
|
369
|
+
|
|
370
|
+
**Role assignment** walks a ladder, recording `roleSource` at each step: explicit `--role` →
|
|
371
|
+
vendor `fileRoles.filenameHints` → generic filename tokens (whole tokens only, last token wins,
|
|
372
|
+
so `product-images.csv` is media) → header anchors → `unknown` **with a halt**. A role is never
|
|
373
|
+
invented from the filename stem; an entity map full of `weird-export` entities is worse than one
|
|
374
|
+
honest question.
|
|
375
|
+
|
|
376
|
+
**Same-entity concatenation (shape C)** requires the same *normalized column-name set*:
|
|
377
|
+
|
|
378
|
+
- reordering, case, whitespace and BOM differences are tolerated — names are the identity, and
|
|
379
|
+
each part keeps its own `columnOrderMap`;
|
|
380
|
+
- a subset/superset header does **not** silently concatenate. It is legitimate (a re-export
|
|
381
|
+
after the vendor added a column) but it changes what a blank cell means for half the rows, so
|
|
382
|
+
it halts with the exact diff; `--allow-header-superset` unions the parts and records
|
|
383
|
+
`driftAcrossParts`;
|
|
384
|
+
- files sharing a role but only a small column overlap (Jaccard < 0.9) are a `role-collision`,
|
|
385
|
+
not two parts of one export;
|
|
386
|
+
- part order is a numeric-suffix-aware natural sort, so `part10` follows `part2`;
|
|
387
|
+
- `partOf` and `rowOffset` are recorded so any extract row traces back to its file.
|
|
388
|
+
|
|
389
|
+
**Mixed vendors** are allowed *across* roles (Shopify products plus a hand-rolled
|
|
390
|
+
`categories.csv` is a real bundle) but two files of the **same** role from different vendors
|
|
391
|
+
halt.
|
|
392
|
+
|
|
393
|
+
## Read contract (codegen-time)
|
|
394
|
+
|
|
395
|
+
What a generated CSV reader must get right. Codegen selects it when
|
|
396
|
+
`source-schema.json.platform === "csv"`.
|
|
397
|
+
|
|
398
|
+
The reader is an **extractor**, not an in-memory loader: it parses with the shared parse core,
|
|
399
|
+
applies the resolved layout to group rows into per-entity records, and writes **durable
|
|
400
|
+
per-entity NDJSON record streams (`<entity>.ndjson`, one record per line) plus a
|
|
401
|
+
`manifest.json`** into `data/source-extract/` that `rp-execute-import` reads.
|
|
402
|
+
|
|
403
|
+
Emit records **as they are grouped**, streaming through `ndjson.js`'s writer — do not
|
|
404
|
+
accumulate an entity's records in an array and serialise at the end. A 100k-row export must
|
|
405
|
+
never require the whole entity in memory, and an interrupted extract should leave a valid
|
|
406
|
+
readable prefix. See `rp-import-codegen` -> "Record streams are NDJSON".
|
|
407
|
+
|
|
408
|
+
- **Emit canonical records, or convert with `lib/canonical-record.js` — never hand-write the
|
|
409
|
+
rename.** `rp-target-wix/lib/wix-build.js` consumes the vendor-neutral vocabulary declared in
|
|
410
|
+
`wix-target-spec.js` (`description`, `brand`, `weight`), while a reader naturally names fields the
|
|
411
|
+
way its vendor thinks (`bodyHtml`, `vendor`, `weightKg`). `lib/canonical-record.js` holds that
|
|
412
|
+
rename as **per-vendor data** (`READER_FIELD_MAPS`) and self-validates at require time, so a typo
|
|
413
|
+
is a load error instead of a field that silently never reaches Wix. Vendor it alongside
|
|
414
|
+
`csv-parse.js` and call it; do not re-derive the mapping in a project-local transform. It is
|
|
415
|
+
regression-locked with the builder against 220 payloads from two live-verified imports
|
|
416
|
+
(`tests/mapping/wix-build-oracle-test.js`).
|
|
417
|
+
- **Reuse `lib/csv-parse.js` — do not regenerate it.** Vendor a copy into the project (e.g.
|
|
418
|
+
`src/lib/`) and import from it, exactly as the WordPress reader vendors `wp-http.js`. The
|
|
419
|
+
reader then carries only per-project orchestration: which entities to emit, the grouping loop,
|
|
420
|
+
type coercion, and transform glue. One tested parse core is what makes the sampler and the
|
|
421
|
+
reader agree.
|
|
422
|
+
- **Grouping is the reader's core job.** Replay the resolved layout: a blank key extends the
|
|
423
|
+
current group; a discriminator column routes parent vs child rows, resolving
|
|
424
|
+
`parentRefColumn` (Woo's `Parent` carries `id:123` or a SKU, and does **not** guarantee that a
|
|
425
|
+
variation follows its parent).
|
|
426
|
+
- **Iterate the file set** by role, treating `partOf` entries as continuations of the same
|
|
427
|
+
logical stream and honoring each part's own column order.
|
|
428
|
+
- **Materialize derived entities**: collect the distinct values of a `column-values` column (and
|
|
429
|
+
their ancestors when hierarchical) into their own entity file, depth-ascending, and emit the
|
|
430
|
+
linking relation. Do not invent Wix ids at extract time — the import stage resolves them
|
|
431
|
+
through the `ImportCrosswalk`.
|
|
432
|
+
- **Coerce per inferred type**, and apply `coerceEmpty` with the recorded `emptyPolicy` so
|
|
433
|
+
required Wix fields are not fed empty strings.
|
|
434
|
+
- CSV values are plain text and are written as-is — no entity-decoding step unless a specific
|
|
435
|
+
vendor is known to double-encode.
|
|
436
|
+
- No auth, no pagination, no rate limits: the entire WordPress transport section collapses to
|
|
437
|
+
"open the file once".
|
|
438
|
+
|
|
439
|
+
## Media
|
|
440
|
+
|
|
441
|
+
Image columns hold either public URLs (Wix-reachable) or local paths / private URLs (not
|
|
442
|
+
reachable — Wix Media import fetches from Wix servers, the same concern as a WordPress
|
|
443
|
+
`localhost` source). Capture flags these as `media-reachability` warnings. Record the note in
|
|
444
|
+
`source-profile.md` and offer the two choices:
|
|
445
|
+
|
|
446
|
+
- rewrite via `CSV_MEDIA_URL_REWRITE_FROM` / `CSV_MEDIA_URL_REWRITE_TO`, or expose the files at
|
|
447
|
+
a public HTTPS URL, or
|
|
448
|
+
- skip/defer media import and continue with non-media entities.
|
|
449
|
+
|
|
450
|
+
## Schema shape
|
|
451
|
+
|
|
452
|
+
`source-schema.example.json` (in this skill folder) is the template `rp-discovery` follows when
|
|
453
|
+
emitting `migrations/<project>/source-schema.json`. It is a shape to follow, not a strict schema
|
|
454
|
+
to validate against. Keep the platform-agnostic core stable; push CSV specifics
|
|
455
|
+
(`sourceFiles`, `vendor`, `dialect`, `drift`, `mappingHints`, `joins`) into `sourceMeta`, and
|
|
456
|
+
give every entity an `origin`.
|
|
457
|
+
|
|
458
|
+
## Contract tests
|
|
459
|
+
|
|
460
|
+
Contract tests live in the repo's `tests/` tree, not in this bundle — a fixture shipped to a
|
|
461
|
+
partner is dead weight. Run them from the repo root:
|
|
462
|
+
|
|
463
|
+
```
|
|
464
|
+
bash tests/run-all.sh source-csv
|
|
465
|
+
```
|
|
466
|
+
|
|
467
|
+
Or individually: `node tests/source-csv/csv-parse-contract-test.js` (also
|
|
468
|
+
`csv-fingerprint-`, `csv-layout-`, `csv-fileset-`). Fixtures are in `tests/fixtures/csv/`.
|
|
469
|
+
|
|
470
|
+
They cover the dialect/quoting/BOM/line-ending/empty-policy matrix and chunk-boundary feeding;
|
|
471
|
+
per-vendor header fixtures, the `custom` fallback, near misses and drifted headers; the layout
|
|
472
|
+
patterns plus their false-positive guards, the ambiguity halt and the verification of a pinned
|
|
473
|
+
continuation mode in both directions; derived-entity split order,
|
|
474
|
+
ancestors and the URL guard; and role assignment, split-file concatenation, header-superset
|
|
475
|
+
halts and part ordering.
|
|
476
|
+
|
|
477
|
+
When a vendor's format drifts, fix `vendors/<vendor>.json` and add a header fixture to
|
|
478
|
+
`tests/fixtures/csv/headers/` — no skill logic changes.
|