@wix/agent-skills 1.7.0 → 1.9.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 (126) hide show
  1. package/README.md +3 -7
  2. package/package.json +1 -1
  3. package/skills/wix-app/SKILL.md +2 -0
  4. package/skills/wix-app/references/EDITOR_REACT_COMPONENT.md +2 -1
  5. package/skills/wix-app/references/STORES_VERSIONING.md +1 -0
  6. package/skills/wix-app/references/editor-react-component/ACCESSIBILITY.md +14 -0
  7. package/skills/wix-app/references/editor-react-component/REACT-GUIDELINES.md +11 -6
  8. package/skills/wix-app/references/editor-react-component/REACT-PATTERNS.md +3 -17
  9. package/skills/wix-app/references/editor-react-component/SSR.md +119 -0
  10. package/skills/wix-design-system/SKILL.md +5 -1
  11. package/skills/wix-headless/SKILL.md +55 -32
  12. package/skills/wix-headless/references/BUILD-astro.md +244 -0
  13. package/skills/wix-headless/references/BUILD-own-build.md +167 -0
  14. package/skills/wix-headless/references/BUILD.md +50 -252
  15. package/skills/wix-headless/references/DESIGN_SYSTEM.md +94 -34
  16. package/skills/wix-headless/references/DISCOVERY-connect.md +55 -0
  17. package/skills/wix-headless/references/DISCOVERY-create.md +238 -0
  18. package/skills/wix-headless/references/DISCOVERY.md +41 -422
  19. package/skills/wix-headless/references/PLAN-connect.md +19 -0
  20. package/skills/wix-headless/references/PLAN-create.md +17 -0
  21. package/skills/wix-headless/references/PLAN.md +37 -27
  22. package/skills/wix-headless/references/SEED.md +27 -18
  23. package/skills/wix-headless/references/SETUP.md +32 -213
  24. package/skills/wix-headless/references/astro/blog/BLOG_PAGES.md +5 -4
  25. package/skills/wix-headless/references/astro/bookings/COMPONENTS.md +45 -0
  26. package/skills/wix-headless/references/astro/bookings/SERVICES_PAGES.md +58 -0
  27. package/skills/wix-headless/references/astro/cms/CMS_FOUNDATIONS.md +5 -5
  28. package/skills/wix-headless/references/astro/cms/FAQ_KNOWLEDGE_BASE.md +10 -10
  29. package/skills/wix-headless/references/astro/cms/PORTFOLIO.md +12 -13
  30. package/skills/wix-headless/references/astro/cms/RESOURCE_LIBRARY.md +10 -12
  31. package/skills/wix-headless/references/astro/cms/TEAM_DIRECTORY.md +8 -8
  32. package/skills/wix-headless/references/astro/designer/INSTRUCTIONS.md +47 -27
  33. package/skills/wix-headless/references/astro/ecom/CART_PAGES.md +7 -8
  34. package/skills/wix-headless/references/astro/ecom/CART_WIRING.md +5 -5
  35. package/skills/wix-headless/references/astro/ecom/COMPONENTS_CSS.md +3 -3
  36. package/skills/wix-headless/references/astro/forms/CONTACT_FORM.md +5 -19
  37. package/skills/wix-headless/references/astro/gift-cards/COMPONENTS.md +2 -2
  38. package/skills/wix-headless/references/astro/gift-cards/PAGES.md +1 -1
  39. package/skills/wix-headless/references/astro/stores/BACK_IN_STOCK.md +6 -6
  40. package/skills/wix-headless/references/astro/stores/CATEGORY_PAGES.md +4 -4
  41. package/skills/wix-headless/references/astro/stores/COMPONENTS_CSS.md +3 -3
  42. package/skills/wix-headless/references/astro/stores/HOME_AND_NAV.md +3 -3
  43. package/skills/wix-headless/references/astro/stores/PRODUCT_PAGES.md +9 -9
  44. package/skills/wix-headless/references/astro/stores/SHARED_WIRING.md +5 -4
  45. package/skills/wix-headless/references/astro/templates/Footer.astro +1 -1
  46. package/skills/wix-headless/references/astro/templates/Layout.astro +1 -1
  47. package/skills/wix-headless/references/astro/templates/Navigation.astro +1 -1
  48. package/skills/wix-headless/references/astro/templates/astro.config.mjs +1 -1
  49. package/skills/wix-headless/references/astro/templates/bookings/AvailabilityCalendar.tsx +233 -0
  50. package/skills/wix-headless/references/astro/templates/bookings/BookingForm.tsx +136 -0
  51. package/skills/wix-headless/references/astro/templates/bookings/SeoTags.astro +25 -0
  52. package/skills/wix-headless/references/astro/templates/bookings/ServiceBookingFlow.tsx +54 -0
  53. package/skills/wix-headless/references/astro/templates/bookings/ServiceCard.astro +45 -0
  54. package/skills/wix-headless/references/astro/templates/bookings/booking-confirmation.astro +49 -0
  55. package/skills/wix-headless/references/astro/templates/bookings/bookingDriver.ts +245 -0
  56. package/skills/wix-headless/references/astro/templates/bookings/components-bookings.css +356 -0
  57. package/skills/wix-headless/references/astro/templates/bookings/services/[slug].astro +133 -0
  58. package/skills/wix-headless/references/astro/templates/bookings/services/index.astro +73 -0
  59. package/skills/wix-headless/references/astro/templates/global.css +2 -2
  60. package/skills/wix-headless/references/astro/templates/index.astro +1 -1
  61. package/skills/wix-headless/references/blog/BLOG_CONTENT.md +19 -9
  62. package/skills/wix-headless/references/blog/INSTRUCTIONS.md +3 -3
  63. package/skills/wix-headless/references/bookings/FLOW.md +185 -0
  64. package/skills/wix-headless/references/bookings/INSTRUCTIONS.md +90 -0
  65. package/skills/wix-headless/references/bookings/SERVICES_DATA.md +295 -0
  66. package/skills/wix-headless/references/cms/CMS_FOUNDATIONS.md +4 -2
  67. package/skills/wix-headless/references/cms/INSTRUCTIONS.md +27 -1
  68. package/skills/wix-headless/references/commands/known-apps.json +2 -1
  69. package/skills/wix-headless/references/custom/CONNECTION_PLAN.md +142 -0
  70. package/skills/wix-headless/references/custom/INSTRUCTIONS.md +71 -21
  71. package/skills/wix-headless/references/custom/blog/WIRING.md +52 -0
  72. package/skills/wix-headless/references/custom/bookings/WIRING.md +146 -0
  73. package/skills/wix-headless/references/custom/cms/WIRING.md +97 -0
  74. package/skills/wix-headless/references/custom/ecom/WIRING.md +67 -0
  75. package/skills/wix-headless/references/custom/forms/WIRING.md +101 -0
  76. package/skills/wix-headless/references/custom/stores/WIRING.md +80 -0
  77. package/skills/wix-headless/references/ecom/INSTRUCTIONS.md +5 -5
  78. package/skills/wix-headless/references/forms/INSTRUCTIONS.md +2 -2
  79. package/skills/wix-headless/references/gift-cards/INSTRUCTIONS.md +3 -3
  80. package/skills/wix-headless/references/images/INSTRUCTIONS.md +16 -15
  81. package/skills/wix-headless/references/seed-recipes.md +2 -2
  82. package/skills/wix-headless/references/shared/AGENTS_MD.md +47 -0
  83. package/skills/wix-headless/references/shared/AUTHENTICATION.md +3 -5
  84. package/skills/wix-headless/references/shared/DESIGN_MD.md +85 -0
  85. package/skills/wix-headless/references/shared/IMAGE_GENERATION.md +29 -28
  86. package/skills/wix-headless/references/shared/IMPLEMENTER.md +87 -27
  87. package/skills/wix-headless/references/shared/PRODUCTION_SHARP_EDGES.md +2 -2
  88. package/skills/wix-headless/references/shared/RETURN_CONTRACT.md +24 -313
  89. package/skills/wix-headless/references/shared/STYLING.md +8 -18
  90. package/skills/wix-headless/references/stores/INSTRUCTIONS.md +39 -9
  91. package/skills/wix-headless/references/stores/PRODUCT_CATALOG_DATA.md +17 -14
  92. package/skills/wix-headless/references/verticals/_schema.json +1 -1
  93. package/skills/wix-headless/references/verticals/_schema.md +3 -3
  94. package/skills/wix-headless/references/verticals/blog.md +1 -1
  95. package/skills/wix-headless/references/verticals/bookings.md +39 -0
  96. package/skills/wix-headless/references/verticals/cms.md +1 -1
  97. package/skills/wix-headless/references/verticals/ecom.md +2 -2
  98. package/skills/wix-headless/references/verticals/gift-cards.md +1 -1
  99. package/skills/wix-headless/references/verticals/stores.md +1 -1
  100. package/skills/wix-headless/scripts/check-manifest.mjs +143 -6
  101. package/skills/wix-headless/scripts/compose.mjs +540 -0
  102. package/skills/wix-headless/scripts/emit-design-tokens.mjs +128 -51
  103. package/skills/wix-headless/scripts/flatten.sh +61 -0
  104. package/skills/wix-headless/scripts/generate-images.mjs +242 -0
  105. package/skills/wix-headless/scripts/scaffold.sh +47 -16
  106. package/skills/wix-headless/scripts/write-decorative-json.mjs +62 -0
  107. package/skills/wix-manage/SKILL.md +13 -1
  108. package/skills/wix-manage/references/app-installation/install-wix-apps.md +3 -27
  109. package/skills/wix-manage/references/blog/how-to-create-blog-posts.md +1 -1
  110. package/skills/wix-manage/references/bookings/create-appointment-service.md +266 -0
  111. package/skills/wix-manage/references/bookings/create-booking-service-from-prompt.md +37 -0
  112. package/skills/wix-manage/references/bookings/create-class-service.md +245 -0
  113. package/skills/wix-manage/references/bookings/create-course-service.md +249 -0
  114. package/skills/wix-manage/references/cms/cms-data-items-crud.md +3 -2
  115. package/skills/wix-manage/references/cms/cms-references-and-relationships.md +1 -1
  116. package/skills/wix-manage/references/cms/cms-schema-management.md +2 -2
  117. package/skills/wix-manage/references/domains/domain-search-and-purchase.md +10 -7
  118. package/skills/wix-manage/references/forms/create-form.md +49 -1
  119. package/skills/wix-manage/references/stores/bulk-create-products-with-options.md +1 -1
  120. package/skills/wix-manage/references/stores/create-product-from-image.md +154 -2
  121. package/skills/wix-manage/references/stores/setup-online-store-catalog-v3.md +1 -1
  122. package/skills/wix-headless/references/astro/COMPOSE.md +0 -142
  123. package/skills/wix-headless/scripts/finalize-run-json.mjs +0 -141
  124. package/skills/wix-headless/scripts/init-site-json.mjs +0 -101
  125. package/skills/wix-headless/scripts/preview.sh +0 -45
  126. package/skills/wix-headless/scripts/release.sh +0 -73
@@ -1,11 +1,11 @@
1
- # Recipe: Product Catalog Data Setup (Phase 1)
1
+ # Recipe: Product Catalog Data Setup (seed scope)
2
2
 
3
- Replace the default sample products Wix Stores installs with on-brand products via the Stores REST API (`curl` against `wixapis.com/stores/v3/...` with the standard headers from `../shared/AUTHENTICATION.md`). This file covers the `seed-seed` scope — data seeding only. Frontend wiring lives in the astro scope references (`../astro/stores/SHARED_WIRING.md`, `../astro/stores/PRODUCT_PAGES.md`, `../astro/ecom/CART_PAGES.md`, `../astro/stores/HOME_AND_NAV.md`) and should not be read by `seed-seed`.
3
+ Replace the default sample products Wix Stores installs with on-brand products via the Stores REST API (`curl` against `wixapis.com/stores/v3/...` with the standard headers from `../shared/AUTHENTICATION.md`). This file covers the `seed` scope — data seeding only. Frontend wiring lives in the astro scope references (`../astro/stores/SHARED_WIRING.md`, `../astro/stores/PRODUCT_PAGES.md`, `../astro/ecom/CART_PAGES.md`, `../astro/stores/HOME_AND_NAV.md`) and should not be read by `seed`.
4
4
 
5
5
  > **Critical Rules — Read Before Starting**
6
6
  > 1. **V3 only** — all endpoints under `/stores/v3/...` for products.
7
7
  > 2. **No improvised endpoints** — if an REST call returns 404, stop and report. Do not guess alternative URLs. Do not loop on `docs-search REST (see DOCS_SEARCH.md)` more than twice on the same topic.
8
- > 3. **Do not seed categories.** Categories are merchant-driven — created in the Wix dashboard, not by this scope. The storefront's rail, Shop submenu, and `/category/[slug]` route are still wired (Phase 4) and light up automatically once the merchant adds at least one visible category with items (≤ 5 min after creation, the helper's TTL).
8
+ > 3. **Do not seed categories** — they are merchant-driven. See Step 6 for the full rule and how the storefront still wires up automatically.
9
9
 
10
10
  > **V3 Catalog:** New Wix sites use Catalog V3. All endpoints below live under `/stores/v3/...`. The V1 product endpoints should not be used — they silently return 0 results on V3 catalogs.
11
11
 
@@ -22,9 +22,12 @@ Replace the default sample products Wix Stores installs with on-brand products v
22
22
  >
23
23
  > **If CLI auth is not available, skip this entire section.** The 12 default products remain and can be customized later in the Wix dashboard.
24
24
 
25
- > **API error guard:** If any REST call in Phase 1 returns a 404 or an unexpected error, do **not** retry the same call with a guessed alternative URL or namespace. Report the failing endpoint, request body, and error verbatim to the user, then stop.
25
+ > **API error guard:** If any REST call in this seed scope returns a 404 or an unexpected error, do **not** retry the same call with a guessed alternative URL or namespace. Report the failing endpoint, request body, and error verbatim to the user, then stop.
26
+
27
+ > **Stores appDefId** for install and `catalogReference.appId`: `215238eb-22a5-4c36-9e7b-e7c08025e04e`. (A different defId — `1380b703-ce81-ff05-f115-39571d94dfcd` — is used for `wixMetadata.appDefId` in the pages scope. Do not swap them.)
28
+ >
29
+ > <!-- REVIEW (appDefId discrepancy): `1380b703-…` is labeled the `wixMetadata.appDefId` here, but `stores/INSTRUCTIONS.md` (back-in-stock split + failure-mode table) calls the same id the back-in-stock app id. One of these labels is wrong — flagged for human review; value left unchanged. -->
26
30
 
27
- > **Stores appDefId** for install and `catalogReference.appId`: `215238eb-22a5-4c36-9e7b-e7c08025e04e`. (A different defId — `1380b703-ce81-ff05-f115-39571d94dfcd` — is used for `wixMetadata.appDefId` in Phase 2. Do not swap them.)
28
31
 
29
32
  ### Step 0: Ensure Stores App Is Installed
30
33
 
@@ -211,7 +214,7 @@ Emit a structured JSON block at the end of your completion message per `../share
211
214
  {
212
215
  "status": "complete",
213
216
  "phase": "stores-seed",
214
- "scope": "seed-seed",
217
+ "scope": "seed",
215
218
  "summary": "Deleted {N} default products; created {N} on-brand products with variants",
216
219
  "data": {
217
220
  "products": [
@@ -220,14 +223,14 @@ Emit a structured JSON block at the end of your completion message per `../share
220
223
  "name": "<name>",
221
224
  "slug": "<slug>",
222
225
  "variantId": "<uuid>",
223
- "price": 0,
224
- "inventory": 0,
226
+ "price": 48.0,
227
+ "inventory": 50,
225
228
  "sku": "<sku>"
226
229
  }
227
230
  ],
228
231
  "categories": [],
229
- "deletedCount": 0,
230
- "createdCount": 0
232
+ "deletedCount": 12,
233
+ "createdCount": 3
231
234
  },
232
235
  "files": [],
233
236
  "errors": []
@@ -238,12 +241,12 @@ Emit a structured JSON block at the end of your completion message per `../share
238
241
 
239
242
  The JSON block MUST be the last content in your message. Parent skill consumes `data.products[*].slug` and `data.products[*].variantId` for the Phase 4 Pages scopes.
240
243
 
241
- ### Phase 1 Boundary — Do Not Touch Other Site Data
244
+ ### Seed Boundary — Do Not Touch Other Site Data
242
245
 
243
- Phase 1 is complete after Step 7. Do **not** attempt any of the following, even if they seem like reasonable polish:
246
+ The seed scope is complete after Step 7. Do **not** attempt any of the following, even if they seem like reasonable polish:
244
247
 
245
248
  - Cleaning up "orphan customizations", "All Products" containers, brand records, or any other catalog metadata you didn't create.
246
- - Creating, renaming, or deleting any category — categories are merchant-driven (see Step 6). The auto-managed "All Products" category (handle `online_stores_all_products`) stays in place; the frontend filters it out by handle.
249
+ - Creating, renaming, or deleting any category — see Step 6 (leave the auto-managed "All Products" category in place).
247
250
  - Verifying your work via additional `query` calls beyond the Step 5 verification already performed.
248
251
 
249
- Phase 2+ (frontend wiring) is covered in the astro scope references (`../astro/stores/SHARED_WIRING.md`, `../astro/stores/PRODUCT_PAGES.md`, `../astro/stores/CATEGORY_PAGES.md`, `../astro/ecom/CART_PAGES.md`, `../astro/stores/HOME_AND_NAV.md`) — do not read them during `seed-seed`.
252
+ Phase 2+ (frontend wiring) is covered in the astro scope references (`../astro/stores/SHARED_WIRING.md`, `../astro/stores/PRODUCT_PAGES.md`, `../astro/stores/CATEGORY_PAGES.md`, `../astro/ecom/CART_PAGES.md`, `../astro/stores/HOME_AND_NAV.md`) — do not read them during `seed`.
@@ -33,7 +33,7 @@
33
33
  "description": { "type": "string" }
34
34
  }
35
35
  },
36
- "description": "Feature blurbs for DISCOVERY.md Step 3 Section B."
36
+ "description": "Feature blurbs for DISCOVERY-create.md Step 3 Section B."
37
37
  },
38
38
  "apps": {
39
39
  "type": "array",
@@ -29,13 +29,13 @@ requires: [] # optional — verticals that must be co-l
29
29
  # If a pack with `requires:` is loaded, every name in the list MUST be in the same read batch.
30
30
 
31
31
  # --- Plan contribution ---
32
- features: # human-readable feature blurbs. Used in DISCOVERY.md Step 3 Section B.
32
+ features: # human-readable feature blurbs. Used in DISCOVERY-create.md Step 3 Section B.
33
33
  - name: "Product catalog"
34
34
  description: "Browse products with images, prices, and variants."
35
35
 
36
36
  # --- Plan Pages table ---
37
37
  apps: # zero or one entry per pack. apps[0].name fills the Source column
38
- - name: "Wix Stores" # of DISCOVERY.md Step 3 Section C.
38
+ - name: "Wix Stores" # of DISCOVERY-create.md Step 3 Section C.
39
39
  appDefId: "215238eb-22a5-4c36-9e7b-e7c08025e04e"
40
40
 
41
41
  routes: # routes the pack ships. Each entry → one row in the Pages table.
@@ -65,7 +65,7 @@ disabled: false # if true, the pack ships its code but its
65
65
  | `description` | string | yes | One-line label — what the pack provides |
66
66
  | `triggers` | string[] | yes (empty allowed for transitive-only packs) | Case-insensitive substrings. SKILL.md routing table is the actual source of truth for what gets loaded; this is human reference. |
67
67
  | `requires` | string[] | no | Verticals that must be co-loaded in the same read batch |
68
- | `features` | object[] | yes | `{name, description}` — used in DISCOVERY.md Step 3 Section B |
68
+ | `features` | object[] | yes | `{name, description}` — used in DISCOVERY-create.md Step 3 Section B |
69
69
  | `apps` | object[] | no | Zero or one entry. `apps[0].name` fills the Source column of the Pages table; absence implies built-in (cms uses `"CMS (builtin)"` literal). |
70
70
  | `routes` | object[] | no | `{route, name?}` — one row per entry in the Pages table |
71
71
  | `disabled` | bool | no | If true, the pack's surfaces are inactive by default. DISCOVERY plan skips disabled packs from Sections B + C. Today only `gift-cards`. Default false. |
@@ -26,6 +26,6 @@ disabled: false
26
26
 
27
27
  Loaded when the user's prompt mentions blogging, publishing, or editorial content.
28
28
 
29
- > **Discovery contract.** Phase 1 reads only the frontmatter above. Phase 2+ implementation (post seeding, RSS, page composition, ricos rendering) lives in an upstream skill plus this skill's own `templates/blog/` + `references/blog/INSTRUCTIONS.md`:
29
+ > **Discovery contract.** Phase 1 reads only the frontmatter above. Phase 2+ implementation (post seeding, RSS, page composition, ricos rendering) lives in an upstream skill plus this skill's own `references/astro/blog/` + `references/blog/INSTRUCTIONS.md`:
30
30
  >
31
31
  > - `@skills/wix-manage` ships the seeding recipe — `references/blog/how-to-create-blog-posts.md`.
@@ -0,0 +1,39 @@
1
+ ---
2
+ name: bookings
3
+ description: "Service-based booking — services catalog, availability calendar, and booking flow via Wix Bookings."
4
+ triggers: ["booking", "appointment", "schedule", "reserve", "class", "session", "consult", "therapy", "lesson", "coaching", "trainer", "tutor", "salon", "spa", "clinic"]
5
+ requires: []
6
+
7
+ features:
8
+ - name: "Services catalog"
9
+ description: "Browse bookable appointment services with descriptions, duration, and pricing."
10
+ - name: "Online booking"
11
+ description: "Pick an available time slot on a calendar, complete the service's booking form, and confirm."
12
+ - name: "Secure checkout"
13
+ description: "Free or pay-in-person bookings confirm instantly; paid services hand off to Wix's secure hosted checkout."
14
+
15
+ apps:
16
+ - name: "Wix Bookings"
17
+ appDefId: "13d21c63-b5ec-5912-8397-c3a5ddb27a97"
18
+
19
+ routes:
20
+ - route: "/services"
21
+ - route: "/services/[slug]"
22
+ name: "Service Detail"
23
+ - route: "/booking-confirmation"
24
+ name: "Booking Confirmation"
25
+ - route: "Hosted by Wix"
26
+ name: "Secure Checkout"
27
+
28
+ disabled: false
29
+ ---
30
+
31
+ # Bookings Pack
32
+
33
+ Loaded when the user's prompt implies offering appointments, classes, or sessions.
34
+
35
+ > **Discovery contract.** Phase 1 reads only the frontmatter above to compose the plan's Pages table. Phase 2+ implementation (seeding, page composition, theming) lives in this skill's own `references/astro/templates/bookings/` + `references/bookings/INSTRUCTIONS.md`.
36
+ >
37
+ > - Seed recipe: `<SKILL_ROOT>/references/bookings/SERVICES_DATA.md` (service creation via Wix Bookings REST API).
38
+ >
39
+ > No per-pack `seed`, `components`, `componentsCss`, or `pages` blocks live in this skill anymore.
@@ -23,7 +23,7 @@ disabled: false
23
23
 
24
24
  Always loaded. Provides Home + About + FAQ content pages editable from the Wix dashboard's Content Manager.
25
25
 
26
- > **Discovery contract.** Phase 1 reads only the frontmatter above. Phase 2+ implementation (collection schemas, item seeding, page composition) lives in an upstream skill plus this skill's own `templates/cms/` + `references/cms/INSTRUCTIONS.md`:
26
+ > **Discovery contract.** Phase 1 reads only the frontmatter above. Phase 2+ implementation (collection schemas, item seeding, page composition) lives in an upstream skill plus this skill's own `references/astro/cms/` + `references/cms/INSTRUCTIONS.md`:
27
27
  >
28
28
  > - `@skills/wix-manage` ships the recipes — `references/cms/cms-schema-management.md`, `cms-data-items-crud.md`, `cms-references-and-relationships.md`.
29
29
  >
@@ -12,7 +12,7 @@ apps: [] # no app to install — @wix/ecom works with any installed catalog ap
12
12
  routes:
13
13
  - route: "/cart"
14
14
  - route: "/thank-you"
15
- - route: "Hosted by Wix" # Wix-hosted endpoint — no .astro file. Listed so the discovery plan's Section C table includes a Checkout row (omitting it created user anxiety in the 2026 dolls-store run; the cart appeared to "go nowhere"). The route cell renders the literal string "Hosted by Wix".
15
+ - route: "Hosted by Wix" # Wix-hosted endpoint — no .astro file. Listed so the discovery plan's Section C table includes a Checkout row for the Wix-hosted endpoint. The route cell renders the literal string "Hosted by Wix".
16
16
  name: "Checkout"
17
17
 
18
18
  disabled: false
@@ -22,4 +22,4 @@ disabled: false
22
22
 
23
23
  Vertical-agnostic ecommerce cart, checkout, and order confirmation. Co-loaded by any pack that needs cart/checkout (today: `stores`, `gift-cards`; future: `bookings`, `events`) via the `requires:` field. Never user-triggered.
24
24
 
25
- > **Discovery contract.** Phase 1 reads only the frontmatter above. Phase 2+ implementation (cart wiring, checkout redirect, discount codes) lives in this skill's own `templates/ecom/` + `references/ecom/INSTRUCTIONS.md`.
25
+ > **Discovery contract.** Phase 1 reads only the frontmatter above. Phase 2+ implementation (cart wiring, checkout redirect, discount codes) lives in this skill's own `references/astro/ecom/` + `references/ecom/INSTRUCTIONS.md`.
@@ -21,4 +21,4 @@ disabled: true
21
21
 
22
22
  Passive vertical: code ships in every site that has a storefront, but every gift-card surface only renders if the **Wix Gift Card app** is enabled in the site's dashboard. Never user-triggered.
23
23
 
24
- > **Discovery contract.** Phase 1 reads only the frontmatter above. Because `disabled: true`, the discovery plan never promises any gift-card surface to the user. Phase 2+ implementation (runtime probe, buy flow, nav/home contributions) lives in this skill's own `templates/gift-cards/` + `references/gift-cards/INSTRUCTIONS.md`; the `astro-stores-demo` includes a working `gift-card.astro` reference.
24
+ > **Discovery contract.** Phase 1 reads only the frontmatter above. Because `disabled: true`, the discovery plan never promises any gift-card surface to the user. Phase 2+ implementation (runtime probe, buy flow, nav/home contributions) lives in this skill's own `references/astro/templates/gift-cards/` + `references/gift-cards/INSTRUCTIONS.md`; see `references/astro/templates/gift-cards/gift-cards.astro` for the working buy-page reference.
@@ -26,7 +26,7 @@ disabled: false
26
26
 
27
27
  Loaded when the user's prompt implies selling products.
28
28
 
29
- > **Discovery contract.** Phase 1 reads only the frontmatter above to compose the plan's Pages table. Phase 2+ implementation (seeding, page composition, theming) lives in an upstream skill plus this skill's own `templates/stores/` + `references/stores/INSTRUCTIONS.md`:
29
+ > **Discovery contract.** Phase 1 reads only the frontmatter above to compose the plan's Pages table. Phase 2+ implementation (seeding, page composition, theming) lives in an upstream skill plus this skill's own `references/astro/templates/stores/` + `references/stores/INSTRUCTIONS.md`:
30
30
  >
31
31
  > - `@skills/wix-manage` ships the seeding recipes — `references/stores/setup-online-store-catalog-v3.md`, `bulk-create-products-with-options.md`, `create-product-from-image.md`.
32
32
  >
@@ -11,9 +11,29 @@
11
11
  // curl -s https://dev.wix.com/skills/wix-headless/scripts/check-manifest.mjs \
12
12
  // | node --input-type=module - <project-dir> <phase> <packs-csv>
13
13
  //
14
- // <phase> ∈ { "components", "pages" }
14
+ // <phase> ∈ { "components", "pages", "integration" } (astro scaffold mode; integration = custom frontend)
15
15
  // <packs-csv> = comma-separated pack names (loaded verticals), e.g. "stores,ecom,cms"
16
16
  //
17
+ // Integration mode (frontend = "custom") — verify the CONNECTION, not pack files:
18
+ // node <SKILL_ROOT>/scripts/check-manifest.mjs <project-dir> integration <connection-plan.json> \
19
+ // [--build-output <dir>]
20
+ // where <connection-plan.json> is the connection-plan subagent's returned JSON
21
+ // ({ data: { bindingMap, augmentation, persistenceSwap } } or that object directly).
22
+ // Verifies the connection per the three connection kinds:
23
+ // - bindingMap (none/static) → each region's `file` now carries a Wix SDK script
24
+ // (createClient / @wix/sdk / OAuthStrategy)
25
+ // - augmentation (none/static) → each inject `file` has its component + SDK call
26
+ // (+ a <form> + createSubmission for form capabilities)
27
+ // - persistenceSwap (own/SPA) → each `sourceFile` carries a bundled @wix/sdk import
28
+ // AND a @wix/data CRUD call (items.query/insert/update/remove)
29
+ // …and the always-connect invariant: at least one connection of ANY kind exists.
30
+ // --build-output <dir>: for own-build SPAs, assert the build output dir exists and is
31
+ // non-empty. Run this form POST-BUILD (the dir doesn't exist until `npm run build`);
32
+ // run the plain form post-wiring/pre-build to verify the source connection. Catches the
33
+ // "published the un-built dev entry → 404" failure (SPA plan Break 4).
34
+ // Exit 1 if any claimed connection is missing, zero connections were made, or
35
+ // --build-output was given and the dir is missing/empty.
36
+ //
17
37
  // Note: `node <(curl ...)` does NOT work for .mjs files — Node sees /dev/fd/N
18
38
  // with no extension and rejects ESM syntax. Use the stdin form above.
19
39
  //
@@ -33,7 +53,7 @@
33
53
  // - Exit 0 on happy path or recoverable misses.
34
54
  // - Exit 1 if any file is unrecoverably missing.
35
55
 
36
- import { readFileSync, writeFileSync, existsSync, mkdirSync, copyFileSync } from "node:fs";
56
+ import { readFileSync, writeFileSync, existsSync, mkdirSync, copyFileSync, readdirSync } from "node:fs";
37
57
  import { join, dirname, basename, resolve } from "node:path";
38
58
  import { fileURLToPath } from "node:url";
39
59
 
@@ -86,18 +106,135 @@ async function copySkillFile(relPath, destPath) {
86
106
  return true;
87
107
  }
88
108
 
89
- const [, , projectDir, phase, packsCsv] = process.argv;
109
+ // Integration-mode check: verify the connection plan was wired into the site.
110
+ async function checkIntegration(projectDir, planPath, buildOutputDir) {
111
+ if (!existsSync(planPath)) {
112
+ console.error(`check-manifest: connection plan not found at ${planPath}`);
113
+ process.exit(2);
114
+ }
115
+ let plan;
116
+ try {
117
+ plan = JSON.parse(readFileSync(planPath, "utf8"));
118
+ } catch (e) {
119
+ console.error(`check-manifest: could not parse connection plan JSON: ${e.message}`);
120
+ process.exit(2);
121
+ }
122
+ const data = plan.data ?? plan;
123
+ const bindingMap = Array.isArray(data.bindingMap) ? data.bindingMap : [];
124
+ const augmentation = Array.isArray(data.augmentation) ? data.augmentation : [];
125
+ const persistenceSwap = Array.isArray(data.persistenceSwap) ? data.persistenceSwap : [];
126
+
127
+ // A Wix SDK reference is present if the file imports @wix/sdk / calls createClient / OAuthStrategy.
128
+ // Matches BOTH the CDN form (`from "https://esm.sh/@wix/sdk"`) and the bundled form (`from "@wix/sdk"`).
129
+ const SDK_MARKER = /@wix\/sdk|createClient\s*\(|OAuthStrategy\s*\(/;
130
+ // A @wix/data CRUD call is present (persistence swap wired the data layer to the collection).
131
+ const DATA_MARKER = /@wix\/data|items\s*\.\s*(query|insert|update|remove)\s*\(|\.items\s*\.\s*(query|insert|update|remove)\s*\(/;
132
+ const fileHasSdk = (file) => {
133
+ const p = join(projectDir, file);
134
+ if (!existsSync(p)) return { exists: false, sdk: false, data: false, text: "" };
135
+ const text = readFileSync(p, "utf8");
136
+ return { exists: true, sdk: SDK_MARKER.test(text), data: DATA_MARKER.test(text), text };
137
+ };
138
+
139
+ const wired = [];
140
+ const missing = [];
141
+ let anySdk = false;
142
+
143
+ // (a) Each claimed binding-map region's file must now carry a Wix SDK script.
144
+ for (const r of bindingMap) {
145
+ if (!r.file) continue;
146
+ const { exists, sdk } = fileHasSdk(r.file);
147
+ if (exists && sdk) { anySdk = true; wired.push({ kind: "binding", file: r.file, anchor: r.anchor ?? null, entity: r.entity ?? null }); }
148
+ else missing.push({ kind: "binding", file: r.file, anchor: r.anchor ?? null, code: exists ? "REGION_NOT_WIRED" : "FILE_MISSING",
149
+ remediation: exists ? `no Wix SDK <script> found in ${r.file} for region ${r.anchor} — the wiring subagent did not connect it.` : `${r.file} not found in project.` });
150
+ }
151
+
152
+ // (b) Each augmentation's inject file must carry the SDK call (and a <form> for form capabilities).
153
+ for (const a of augmentation) {
154
+ const file = a.injectAt?.file;
155
+ if (!file) { missing.push({ kind: "augmentation", file: null, code: "NO_INJECT_FILE", remediation: `augmentation "${a.capability}" has no injectAt.file.` }); continue; }
156
+ const { exists, sdk, text } = fileHasSdk(file);
157
+ const isForm = /form/i.test(a.app ?? "") || /rsvp|lead|contact|form/i.test(a.capability ?? "") || (a.component ?? "").includes("form");
158
+ const formOk = !isForm || (/<form/i.test(text) && /createSubmission\s*\(/.test(text));
159
+ if (exists && sdk && formOk) { anySdk = true; wired.push({ kind: "augmentation", file, capability: a.capability ?? null, component: a.component ?? null }); }
160
+ else missing.push({ kind: "augmentation", file, capability: a.capability ?? null,
161
+ code: !exists ? "FILE_MISSING" : !sdk ? "AUGMENT_NOT_WIRED" : "FORM_NOT_INJECTED",
162
+ remediation: !exists ? `${file} not found.` : !sdk ? `no Wix SDK <script> in ${file} for the "${a.capability}" augmentation.` : `expected an injected <form> + createSubmission() in ${file} for "${a.capability}".` });
163
+ }
164
+
165
+ // (c) Each persistence swap's source file must carry the bundled SDK import AND a @wix/data CRUD call.
166
+ // (own-build SPAs: the data layer was rewritten in source — not a <script> injection.)
167
+ for (const s of persistenceSwap) {
168
+ const file = s.sourceFile;
169
+ if (!file) { missing.push({ kind: "persistenceSwap", file: null, code: "NO_SOURCE_FILE", remediation: `persistenceSwap entry has no sourceFile (the data-layer file to rewrite / fresh data module to write).` }); continue; }
170
+ const { exists, sdk, data: hasData } = fileHasSdk(file);
171
+ if (exists && sdk && hasData) { anySdk = true; wired.push({ kind: "persistenceSwap", file, collection: s.inferredShape?.collection ?? null }); }
172
+ else missing.push({ kind: "persistenceSwap", file,
173
+ code: !exists ? "FILE_MISSING" : !sdk ? "SDK_NOT_IMPORTED" : "DATA_NOT_WIRED",
174
+ remediation: !exists ? `${file} not found — the data layer was not rewritten / the fresh data module was not written.`
175
+ : !sdk ? `no @wix/sdk import in ${file} — the persistence swap must import createClient/OAuthStrategy (bundled, not CDN).`
176
+ : `no @wix/data CRUD call (items.query/insert/update/remove) in ${file} — the data layer still uses its old storage, not the Wix collection.` });
177
+ }
178
+
179
+ // (d) Always-connect invariant: at least one connection of ANY kind must exist.
180
+ const alwaysConnect = anySdk;
181
+ if (!alwaysConnect) {
182
+ missing.push({ kind: "invariant", code: "NO_CONNECTION", remediation: "ALWAYS-CONNECT VIOLATION: no Wix SDK connection found anywhere in the site. Integration mode must wire, augment, or persistence-swap at least one capability — a hosting-only release is not acceptable." });
183
+ }
184
+
185
+ // (e) Build-output assertion (own-build SPAs, post-build): the deployable dir must exist + be non-empty,
186
+ // so release publishes the built app — not the un-built dev entry that 404s in production.
187
+ let buildOutput = null;
188
+ if (buildOutputDir) {
189
+ const outPath = join(projectDir, buildOutputDir);
190
+ const ok = existsSync(outPath) && readdirSync(outPath).length > 0;
191
+ buildOutput = { dir: buildOutputDir, exists: ok };
192
+ if (!ok) missing.push({ kind: "buildOutput", file: buildOutputDir, code: "BUILD_OUTPUT_MISSING",
193
+ remediation: `build output dir "${buildOutputDir}" is missing or empty — run the project's own build (npm run build) before release and point wix.config.json.site.outputDirectory at it. Never publish the un-built source entry.` });
194
+ }
195
+
196
+ const summary = {
197
+ phase: "integration",
198
+ counts: { wired: wired.length, missing: missing.length, bindingRegions: bindingMap.length, augmentations: augmentation.length, persistenceSwaps: persistenceSwap.length },
199
+ alwaysConnect,
200
+ ...(buildOutput ? { buildOutput } : {}),
201
+ wired,
202
+ missing,
203
+ };
204
+ console.log(JSON.stringify(summary, null, 2));
205
+ process.exit(missing.length > 0 ? 1 : 0);
206
+ }
207
+
208
+ // Parse args: positionals + optional --build-output <dir> (integration only).
209
+ const argv = process.argv.slice(2);
210
+ const positionals = [];
211
+ let buildOutputDir = null;
212
+ for (let i = 0; i < argv.length; i++) {
213
+ const a = argv[i];
214
+ if (a === "--build-output") buildOutputDir = argv[++i];
215
+ else if (a.startsWith("--build-output=")) buildOutputDir = a.slice("--build-output=".length);
216
+ else positionals.push(a);
217
+ }
218
+ const [projectDir, phase, thirdArg] = positionals;
90
219
 
91
- if (!projectDir || !phase || !packsCsv) {
92
- console.error("usage: check-manifest.mjs <project-dir> <phase> <packs-csv>");
220
+ if (!projectDir || !phase || !thirdArg) {
221
+ console.error("usage: check-manifest.mjs <project-dir> <phase> <packs-csv | connection-plan.json> [--build-output <dir>]");
93
222
  process.exit(2);
94
223
  }
95
224
 
225
+ // --- Integration mode: verify the connection was actually wired into the site ---
226
+ if (phase === "integration") {
227
+ await checkIntegration(projectDir, thirdArg, buildOutputDir);
228
+ // checkIntegration exits the process.
229
+ }
230
+
96
231
  if (phase !== "components" && phase !== "pages") {
97
- console.error(`check-manifest: invalid phase "${phase}" — must be "components" or "pages"`);
232
+ console.error(`check-manifest: invalid phase "${phase}" — must be "components", "pages", or "integration"`);
98
233
  process.exit(2);
99
234
  }
100
235
 
236
+ const packsCsv = thirdArg;
237
+
101
238
  const packs = packsCsv.split(",").map((p) => p.trim()).filter(Boolean);
102
239
 
103
240
  // Map a `creates:` file path to its template path (relative to skill root).