@wix/agent-skills 1.6.0 → 1.8.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 -9
- package/package.json +1 -1
- package/skills/wix-app/SKILL.md +51 -42
- package/skills/wix-app/references/BACKEND_EVENT.md +10 -65
- package/skills/wix-app/references/CUSTOM_ELEMENT_WIDGET.md +101 -406
- package/skills/wix-app/references/DASHBOARD_MENU_PLUGIN.md +14 -111
- package/skills/wix-app/references/DASHBOARD_MODAL.md +56 -205
- package/skills/wix-app/references/DASHBOARD_PAGE.md +19 -98
- package/skills/wix-app/references/DASHBOARD_PLUGIN.md +6 -108
- package/skills/wix-app/references/DATA_COLLECTION.md +113 -198
- package/skills/wix-app/references/EMBEDDED_SCRIPT.md +41 -268
- package/skills/wix-app/references/EXTENSION_REGISTRATION.md +27 -76
- package/skills/wix-app/references/SERVICE_PLUGIN.md +35 -188
- package/skills/wix-app/references/SITE_PLUGIN.md +8 -92
- package/skills/wix-app/references/STORES_VERSIONING.md +1 -0
- package/skills/wix-app/references/backend-event/COMMON-EVENTS.md +0 -44
- package/skills/wix-app/references/custom-element-widget/SETTINGS_PANEL.md +19 -330
- package/skills/wix-app/references/dashboard-menu-plugin/bookings-slots.md +0 -12
- package/skills/wix-app/references/dashboard-menu-plugin/ecommerce-slots.md +7 -0
- package/skills/wix-app/references/dashboard-menu-plugin/restaurants-slots.md +0 -12
- package/skills/wix-app/references/dashboard-plugin/SLOTS.md +3 -15
- package/skills/wix-app/references/service-plugin/ADDITIONAL-FEES.md +2 -18
- package/skills/wix-app/references/service-plugin/BOOKINGS-STAFF-SORTING.md +2 -42
- package/skills/wix-app/references/service-plugin/DISCOUNT-TRIGGERS.md +1 -11
- package/skills/wix-app/references/service-plugin/GIFT-CARDS.md +1 -11
- package/skills/wix-app/references/service-plugin/PAYMENT-SETTINGS.md +2 -40
- package/skills/wix-app/references/service-plugin/SHIPPING-RATES.md +2 -19
- package/skills/wix-app/references/service-plugin/VALIDATIONS.md +2 -18
- package/skills/wix-app/references/site-plugin/SLOTS.md +17 -68
- package/skills/wix-design-system/SKILL.md +4 -0
- package/skills/wix-headless/SKILL.md +131 -386
- package/skills/wix-headless/references/BUILD-astro.md +246 -0
- package/skills/wix-headless/references/BUILD-own-build.md +167 -0
- package/skills/wix-headless/references/BUILD.md +105 -0
- package/skills/wix-headless/references/DESIGN_SYSTEM.md +175 -0
- package/skills/wix-headless/references/DISCOVERY-connect.md +55 -0
- package/skills/wix-headless/references/DISCOVERY-create.md +238 -0
- package/skills/wix-headless/references/DISCOVERY.md +50 -306
- package/skills/wix-headless/references/PLAN-connect.md +19 -0
- package/skills/wix-headless/references/PLAN-create.md +17 -0
- package/skills/wix-headless/references/PLAN.md +92 -0
- package/skills/wix-headless/references/SEED.md +214 -0
- package/skills/wix-headless/references/SETUP.md +73 -248
- package/skills/wix-headless/references/{blog → astro/blog}/BLOG_PAGES.md +6 -5
- package/skills/wix-headless/references/{blog → astro/blog}/BLOG_SETUP.md +2 -2
- package/skills/wix-headless/references/astro/bookings/COMPONENTS.md +337 -0
- package/skills/wix-headless/references/astro/bookings/SERVICES_PAGES.md +428 -0
- package/skills/wix-headless/references/astro/cms/CMS_FOUNDATIONS.md +214 -0
- package/skills/wix-headless/references/{cms → astro/cms}/FAQ_KNOWLEDGE_BASE.md +14 -12
- package/skills/wix-headless/references/{cms → astro/cms}/PORTFOLIO.md +15 -16
- package/skills/wix-headless/references/{cms → astro/cms}/RESOURCE_LIBRARY.md +13 -15
- package/skills/wix-headless/references/{cms → astro/cms}/TEAM_DIRECTORY.md +11 -11
- package/skills/wix-headless/references/astro/designer/INSTRUCTIONS.md +354 -0
- package/skills/wix-headless/references/{ecom → astro/ecom}/CART_PAGES.md +8 -9
- package/skills/wix-headless/references/{ecom → astro/ecom}/CART_WIRING.md +6 -6
- package/skills/wix-headless/references/{ecom → astro/ecom}/COMPONENTS_CSS.md +6 -6
- package/skills/wix-headless/references/{forms → astro/forms}/CONTACT_FORM.md +18 -32
- package/skills/wix-headless/references/{gift-cards → astro/gift-cards}/COMPONENTS.md +3 -3
- package/skills/wix-headless/references/{gift-cards → astro/gift-cards}/PAGES.md +2 -2
- package/skills/wix-headless/references/{stores → astro/stores}/BACK_IN_STOCK.md +7 -7
- package/skills/wix-headless/references/{stores → astro/stores}/CATEGORY_PAGES.md +12 -13
- package/skills/wix-headless/references/{stores → astro/stores}/COMPONENTS_CSS.md +7 -7
- package/skills/wix-headless/references/{stores → astro/stores}/HOME_AND_NAV.md +11 -9
- package/skills/wix-headless/references/{stores → astro/stores}/PRODUCT_PAGES.md +11 -9
- package/skills/wix-headless/references/{stores → astro/stores}/SHARED_WIRING.md +8 -7
- package/skills/wix-headless/references/astro/templates/Footer.astro +27 -0
- package/skills/wix-headless/references/astro/templates/Layout.astro +132 -0
- package/skills/wix-headless/references/astro/templates/Navigation.astro +38 -0
- package/skills/wix-headless/references/astro/templates/astro.config.mjs +41 -0
- package/skills/wix-headless/references/astro/templates/bookings/AvailabilityCalendar.tsx +218 -0
- package/skills/wix-headless/references/astro/templates/bookings/BookingForm.tsx +194 -0
- package/skills/wix-headless/references/astro/templates/bookings/ManageBooking.tsx +84 -0
- package/skills/wix-headless/references/astro/templates/bookings/SeoTags.astro +25 -0
- package/skills/wix-headless/references/astro/templates/bookings/ServiceBookingFlow.tsx +50 -0
- package/skills/wix-headless/references/astro/templates/bookings/ServiceCard.astro +45 -0
- package/skills/wix-headless/references/astro/templates/bookings/api/confirm-booking.ts +34 -0
- package/skills/wix-headless/references/astro/templates/bookings/api/waitlist.ts +74 -0
- package/skills/wix-headless/references/astro/templates/bookings/booking-confirmation.astro +111 -0
- package/skills/wix-headless/references/astro/templates/bookings/components-bookings.css +413 -0
- package/skills/wix-headless/references/astro/templates/bookings/manage-booking.astro +76 -0
- package/skills/wix-headless/references/astro/templates/bookings/services/[slug].astro +81 -0
- package/skills/wix-headless/references/astro/templates/bookings/services/index.astro +65 -0
- package/skills/wix-headless/references/astro/templates/ecom/components-ecom.css +302 -0
- package/skills/wix-headless/references/astro/templates/global.css +286 -0
- package/skills/wix-headless/references/astro/templates/index.astro +56 -0
- package/skills/wix-headless/{templates → references/astro/templates}/stores/back-in-stock.ts +1 -1
- package/skills/wix-headless/{templates → references/astro/templates}/stores/components-stores.css +138 -33
- package/skills/wix-headless/references/blog/BLOG_CONTENT.md +28 -19
- package/skills/wix-headless/references/blog/INSTRUCTIONS.md +6 -6
- package/skills/wix-headless/references/bookings/INSTRUCTIONS.md +106 -0
- package/skills/wix-headless/references/bookings/SERVICES_DATA.md +295 -0
- package/skills/wix-headless/references/cms/CMS_FOUNDATIONS.md +35 -232
- package/skills/wix-headless/references/cms/INSTRUCTIONS.md +39 -8
- package/skills/wix-headless/references/commands/known-apps.json +2 -1
- package/skills/wix-headless/references/custom/CONNECTION_PLAN.md +142 -0
- package/skills/wix-headless/references/custom/INSTRUCTIONS.md +88 -0
- package/skills/wix-headless/references/custom/blog/WIRING.md +52 -0
- package/skills/wix-headless/references/custom/bookings/WIRING.md +88 -0
- package/skills/wix-headless/references/custom/cms/WIRING.md +97 -0
- package/skills/wix-headless/references/custom/ecom/WIRING.md +67 -0
- package/skills/wix-headless/references/custom/forms/WIRING.md +101 -0
- package/skills/wix-headless/references/custom/stores/WIRING.md +80 -0
- package/skills/wix-headless/references/ecom/INSTRUCTIONS.md +12 -12
- package/skills/wix-headless/references/forms/INSTRUCTIONS.md +6 -6
- package/skills/wix-headless/references/gift-cards/INSTRUCTIONS.md +13 -13
- package/skills/wix-headless/references/images/INSTRUCTIONS.md +58 -60
- package/skills/wix-headless/references/seed-recipes.md +49 -0
- package/skills/wix-headless/references/shared/AGENTS_MD.md +47 -0
- package/skills/wix-headless/references/shared/AUTHENTICATION.md +108 -0
- package/skills/wix-headless/references/shared/BUILD_NOISE.md +2 -2
- package/skills/wix-headless/references/shared/DESIGN_MD.md +85 -0
- package/skills/wix-headless/references/shared/DOCS_SEARCH.md +41 -0
- package/skills/wix-headless/references/shared/IMAGE_GENERATION.md +40 -39
- package/skills/wix-headless/references/shared/IMPLEMENTER.md +92 -41
- package/skills/wix-headless/references/shared/PRODUCTION_SHARP_EDGES.md +3 -3
- package/skills/wix-headless/references/shared/RETURN_CONTRACT.md +32 -312
- package/skills/wix-headless/references/shared/STYLING.md +48 -21
- package/skills/wix-headless/references/stores/INSTRUCTIONS.md +59 -29
- package/skills/wix-headless/references/stores/PRODUCT_CATALOG_DATA.md +31 -28
- package/skills/wix-headless/references/verticals/_schema.json +31 -117
- package/skills/wix-headless/references/verticals/_schema.md +60 -150
- package/skills/wix-headless/references/verticals/blog.md +5 -99
- package/skills/wix-headless/references/verticals/bookings.md +41 -0
- package/skills/wix-headless/references/verticals/cms.md +9 -100
- package/skills/wix-headless/references/verticals/ecom.md +6 -77
- package/skills/wix-headless/references/verticals/forms.md +5 -85
- package/skills/wix-headless/references/verticals/gift-cards.md +6 -103
- package/skills/wix-headless/references/verticals/stores.md +10 -144
- package/skills/wix-headless/scripts/check-manifest.mjs +148 -11
- package/skills/wix-headless/scripts/compose.mjs +540 -0
- package/skills/wix-headless/scripts/emit-design-tokens.mjs +136 -53
- package/skills/wix-headless/scripts/flatten.sh +61 -0
- package/skills/wix-headless/scripts/generate-images.mjs +242 -0
- package/skills/wix-headless/scripts/patch-decorative-slots.mjs +67 -43
- package/skills/wix-headless/scripts/plan-entity-image-waves.mjs +3 -3
- package/skills/wix-headless/scripts/scaffold.sh +113 -27
- package/skills/wix-headless/scripts/seed-utilities.sh +50 -12
- package/skills/wix-headless/scripts/write-decorative-json.mjs +62 -0
- package/skills/wix-manage/SKILL.md +4 -8
- package/skills/wix-manage/references/blog/how-to-create-blog-posts.md +2 -0
- package/skills/wix-manage/references/cms/cms-data-items-crud.md +4 -0
- package/skills/wix-manage/references/cms/cms-references-and-relationships.md +2 -0
- package/skills/wix-manage/references/cms/cms-schema-management.md +4 -0
- package/skills/wix-manage/references/domains/domain-search-and-purchase.md +10 -7
- package/skills/wix-manage/references/ecommerce/api-shipping.md +443 -0
- package/skills/wix-manage/references/ecommerce/flow-add-free-shipping.md +5 -6
- package/skills/wix-manage/references/ecommerce/flow-fix-coverage-gaps.md +4 -5
- package/skills/wix-manage/references/ecommerce/flow-optimize-shipping-rates.md +4 -5
- package/skills/wix-manage/references/ecommerce/goal-increase-aov.md +1 -1
- package/skills/wix-manage/references/ecommerce/goal-reduce-cart-abandonment.md +1 -2
- package/skills/wix-manage/references/ecommerce/guardrail-shipping-health.md +2 -2
- package/skills/wix-manage/references/ecommerce/recipe-apply-shipping-recommendations.md +4 -5
- package/skills/wix-manage/references/ecommerce/recommend-ecommerce-strategy.md +7 -7
- package/skills/wix-manage/references/ecommerce/setup-discount-rules.md +209 -72
- package/skills/wix-manage/references/ecommerce/setup-store-pickup-location.md +9 -10
- package/skills/wix-manage/references/ecommerce/skill-graph.md +4 -4
- package/skills/wix-manage/references/forms/create-form.md +50 -0
- package/skills/wix-manage/references/stores/bulk-create-products-with-options.md +2 -0
- package/skills/wix-manage/references/stores/create-product-from-image.md +91 -38
- package/skills/wix-manage/references/stores/setup-online-store-catalog-v3.md +2 -0
- package/skills/wix-app/references/custom-element-widget/default-thumbnail.png +0 -0
- package/skills/wix-app/references/data-collection/extension-template.ts +0 -107
- package/skills/wix-headless/references/ORCHESTRATION.md +0 -269
- package/skills/wix-headless/references/commands/install-app.md +0 -42
- package/skills/wix-headless/references/commands/mcp-bootstrap.md +0 -28
- package/skills/wix-headless/references/designer/INSTRUCTIONS.md +0 -828
- package/skills/wix-headless/references/shared/MCP_PREFIX.md +0 -105
- package/skills/wix-headless/scripts/copy-utility-templates.mjs +0 -153
- package/skills/wix-headless/scripts/finalize-run-json.mjs +0 -141
- package/skills/wix-headless/scripts/init-site-json.mjs +0 -63
- package/skills/wix-headless/scripts/preview.sh +0 -45
- package/skills/wix-headless/scripts/release.sh +0 -73
- package/skills/wix-headless/templates/ecom/components-ecom.css +0 -215
- package/skills/wix-manage/references/events/list-events.md +0 -203
- /package/skills/wix-headless/{templates → references/astro/templates}/ecom/CartBadge.tsx +0 -0
- /package/skills/wix-headless/{templates → references/astro/templates}/ecom/CartView.tsx +0 -0
- /package/skills/wix-headless/{templates → references/astro/templates}/ecom/cart.astro +0 -0
- /package/skills/wix-headless/{templates → references/astro/templates}/ecom/discounts.ts +0 -0
- /package/skills/wix-headless/{templates → references/astro/templates}/ecom/thank-you.astro +0 -0
- /package/skills/wix-headless/{templates → references/astro/templates}/gift-cards/GiftCardPurchase.tsx +0 -0
- /package/skills/wix-headless/{templates → references/astro/templates}/gift-cards/_home-teaser-snippet.astro +0 -0
- /package/skills/wix-headless/{templates → references/astro/templates}/gift-cards/_nav-snippet.astro +0 -0
- /package/skills/wix-headless/{templates → references/astro/templates}/gift-cards/components-gift-cards.css +0 -0
- /package/skills/wix-headless/{templates → references/astro/templates}/gift-cards/gift-cards.astro +0 -0
- /package/skills/wix-headless/{templates → references/astro/templates}/gift-cards/gift-cards.ts +0 -0
- /package/skills/wix-headless/{templates → references/astro/templates}/stores/AddToCartButton.tsx +0 -0
- /package/skills/wix-headless/{templates → references/astro/templates}/stores/BackInStockForm.tsx +0 -0
- /package/skills/wix-headless/{templates → references/astro/templates}/stores/CategoryRail.astro +0 -0
- /package/skills/wix-headless/{templates → references/astro/templates}/stores/ProductCard.astro +0 -0
- /package/skills/wix-headless/{templates → references/astro/templates}/stores/ProductPurchase.tsx +0 -0
- /package/skills/wix-headless/{templates → references/astro/templates}/stores/SeoTags.astro +0 -0
- /package/skills/wix-headless/{templates → references/astro/templates}/stores/categories.ts +0 -0
- /package/skills/wix-headless/{templates → references/astro/templates}/stores/category/[slug].astro +0 -0
- /package/skills/wix-headless/{templates → references/astro/templates}/stores/products/[slug].astro +0 -0
- /package/skills/wix-headless/{templates → references/astro/templates}/stores/products/index.astro +0 -0
|
@@ -1,440 +1,185 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: wix-headless
|
|
3
|
-
description: "Build a complete Wix Managed Headless site from a single prompt, OR connect an existing project (HTML/JSX/Vite app, Claude Design output, etc.) to Wix Headless for hosting + Business Solutions. Entry point for both: (1) new-site requests — runs discovery, design, feature wiring, and preview; and (2) existing-project requests — runs `npm create @wix/new@latest init`, analyzes the project for needed Business Solutions, installs apps, **wires the Wix SDK into the existing source files so each installed app actually powers its corresponding feature**, and releases. Triggers: build me a site, create a website, make me a website, new website, online store, I want to sell X, start a business online, launch a site, ecommerce, portfolio, business website, sell online, online shop, connect this to Wix Headless, add Wix Headless to this project, host this on Wix, deploy this to Wix, implement the features of this project using Wix Headless. Use this skill instead of the WixSiteBuilder MCP tool for new-site requests."
|
|
3
|
+
description: "Build a complete Wix Managed Headless site from a single prompt, OR connect an existing project (HTML/JSX/Vite app, Claude Design output, etc.) to Wix Headless for hosting + Business Solutions. Entry point for both: (1) new-site requests — runs discovery, design, feature wiring, and preview; and (2) existing-project requests — runs `npm create @wix/new@latest init`, analyzes the project for needed Business Solutions, installs apps, **wires the Wix SDK into the existing source files so each installed app actually powers its corresponding feature**, and releases. Triggers: build me a site, create a website, make me a website, new website, online store, I want to sell X, start a business online, launch a site, ecommerce, portfolio, business website, sell online, online shop, take bookings, book appointments, appointment scheduling, let clients book online, site for my salon/spa/clinic/studio, sign up for classes or sessions, connect this to Wix Headless, add Wix Headless to this project, host this on Wix, deploy this to Wix, implement the features of this project using Wix Headless. Use this skill instead of the WixSiteBuilder MCP tool for new-site requests."
|
|
4
|
+
allowed-tools:
|
|
5
|
+
- Bash(cd *)
|
|
6
|
+
- Bash(npx @wix/cli@latest *)
|
|
7
|
+
- Bash(npx @wix/cli *)
|
|
8
|
+
- Bash(npm create @wix/new@latest *)
|
|
9
|
+
- Bash(npm install *)
|
|
10
|
+
- Bash(npm run *)
|
|
11
|
+
- Bash(node *)
|
|
12
|
+
- Bash(bash *)
|
|
13
|
+
- Bash(curl *)
|
|
14
|
+
- Bash(ls *)
|
|
15
|
+
- Bash(grep *)
|
|
16
|
+
- Bash(find *)
|
|
17
|
+
- Bash(cat *)
|
|
18
|
+
- Bash(head *)
|
|
19
|
+
- Bash(wc *)
|
|
20
|
+
- Bash(mkdir *)
|
|
21
|
+
- Bash(cp *)
|
|
22
|
+
- Read
|
|
23
|
+
- Write
|
|
24
|
+
- Edit
|
|
25
|
+
- Skill
|
|
26
|
+
- Agent
|
|
4
27
|
---
|
|
5
28
|
|
|
6
|
-
# Wix Headless
|
|
29
|
+
# Wix Headless
|
|
7
30
|
|
|
8
|
-
|
|
31
|
+
**Run flow is owned by the conductor, split at the approval gate: `references/PLAN.md`** (pre-approval — routes on **operation** (create/connect), the Discovery questions, the plan + approval gate, the latency-hiding background dispatches) **then `references/BUILD.md`** (post-approval — routes on **framework** (`frontendBuild`); Setup → Seed → the build wave (merged Components + Pages per vertical) → Build → Release). The domain/step files (`DISCOVERY.md`, `SETUP.md`, `SEED.md`, `DESIGN_SYSTEM.md`, the per-vertical references) describe only *what* each step does; they do not name the sequence. **Start a run by opening `PLAN.md`**; open `BUILD.md` when the user approves the plan. All site operations use `npx @wix/cli@latest token` + `curl` — no MCP.
|
|
9
32
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
Before running this skill, the user's environment must have a working, authenticated Wix CLI and a Wix MCP server registered with their agent client:
|
|
13
|
-
|
|
14
|
-
| Requirement | Why | How to verify | How to fix if missing |
|
|
15
|
-
|---|---|---|---|
|
|
16
|
-
| **`@wix/cli` available** | Wave 2 runs `npx @wix/cli env pull` to write `.env.local`; Wave 6 runs `npx @wix/cli build` + `release` to publish. `npx` will fetch the CLI on demand, but a locally installed CLI is faster and surfaces version issues earlier. | `which wix` or `npx @wix/cli --version`. | `npm i -g @wix/cli` (or rely on `npx` to fetch per-invocation). |
|
|
17
|
-
| **Wix CLI authenticated** | `env pull` and `release` both require a logged-in session; tokens live in `~/.wix/auth/`. On auth error the skill surfaces `"Run \`npx @wix/cli login\` and retry."` and stops. | `ls ~/.wix/auth/account.json` exists and is non-empty. | `npx @wix/cli login` — opens a browser to auth. |
|
|
18
|
-
| **Wix MCP exposing admin tools** | Admin tools (`CallWixSiteAPI`, `ListWixSites`, `ManageWixSite`, image upload, etc.) are called at Wave 0 and across every downstream subagent. Any authenticated Wix MCP that exposes them satisfies this prereq — a pre-installed remote connector (claude.ai, ChatGPT, etc.) and a locally-registered stdio `@wix/mcp --wixCliAuth` are equivalent for the skill's purposes. | Tool discovery from your agent client finds `WixREADME` and `CallWixSiteAPI` from any authenticated Wix MCP. If only `Search*Documentation` tools appear, no admin-capable Wix MCP is connected. | If no authenticated Wix MCP exposes admin tools, register a stdio MCP server running `npx -y @wix/mcp --wixCliAuth` in your agent client, then restart the session so the new tools load. `--wixCliAuth` reuses the `wix login` token from the row above, so this is one command and no extra auth UI. Do **not** prompt the user to OAuth into a remote connector when this command-driven path is available. |
|
|
19
|
-
|
|
20
|
-
If any prerequisite is missing, surface the specific gap to the user and stop **before** any subagent dispatches — failing mid-flow leaves a partially scaffolded project.
|
|
21
|
-
|
|
22
|
-
### Authentication
|
|
23
|
-
|
|
24
|
-
`wix login` (and `npx @wix/cli login`) are **safe to run from a non-interactive AI-agent
|
|
25
|
-
environment**. When the CLI detects an AI agent it skips the interactive UI and emits
|
|
26
|
-
JSON events on stdout, one per line:
|
|
27
|
-
|
|
28
|
-
- `{"event":"awaiting_user","verificationUri":"...","userCode":"...","expiresInSeconds":...}`
|
|
29
|
-
— surface the URL and code to the user; wait for them to complete login in their browser.
|
|
30
|
-
- `{"event":"success","email":"...","userId":"..."}` — login complete; resume the
|
|
31
|
-
step that failed.
|
|
32
|
-
- `{"event":"logged_in","email":"...","userId":"..."}` — there was already a valid
|
|
33
|
-
session, nothing to do.
|
|
34
|
-
|
|
35
|
-
### How to run it
|
|
36
|
-
|
|
37
|
-
Run `wix login` (or `npx @wix/cli login`) with `run_in_background: true` since it
|
|
38
|
-
blocks until the human finishes the browser step. Tail the output file to read the
|
|
39
|
-
`awaiting_user` event as soon as it appears; you'll be notified when the process
|
|
40
|
-
exits with the terminal event.
|
|
33
|
+
> **Explicit invocation only.** Do not auto-route on generic "build me a site" prompts; production `wix-headless` should win those unless the user names this skill.
|
|
41
34
|
|
|
42
35
|
## Path resolution — read this first
|
|
43
36
|
|
|
44
|
-
Your CWD at runtime is the **project directory
|
|
45
|
-
|
|
46
|
-
- **On-disk install** (`curl -O https://dev.wix.com/skills/wix-headless.tgz && tar xzf wix-headless.tgz`): this file is at `<SKILL_ROOT>/SKILL.md` on disk — strip the trailing `/SKILL.md` for the absolute path. Hold it in session scratch for the whole run. Run scripts as written: `bash <SKILL_ROOT>/scripts/X.sh` and `node "<SKILL_ROOT>/scripts/X.mjs" <args>`.
|
|
47
|
-
- **URL stream** (you see the agent-note preamble at the top of this file): `<SKILL_ROOT>` is `https://dev.wix.com/skills/wix-headless`. Execute scripts via process substitution:
|
|
48
|
-
- `bash <SKILL_ROOT>/scripts/X.sh <args>` → `bash <(curl -s <SKILL_ROOT>/scripts/X.sh) <args>`
|
|
49
|
-
- `node "<SKILL_ROOT>/scripts/X.mjs" <args>` → `curl -s <SKILL_ROOT>/scripts/X.mjs | node --input-type=module - <args>`
|
|
50
|
-
|
|
51
|
-
Process substitution (`node <(curl ...)`) does **not** work for `.mjs` — Node sees the script as `/dev/fd/N` with no extension and refuses ESM syntax. Pipe via stdin with `--input-type=module` instead.
|
|
37
|
+
Your CWD at runtime is the **project directory, which is also the site-root** — `scaffold.sh` flattens the scaffolded project into the current directory, so the run is a **single folder with a single `.wix/`** (no nested project, no parent/child split). `<site-root>` and `<project-dir>` are the **same path**: the run's CWD. The end-of-run `AGENTS.md` (project root) and the project's own files (`package.json`, `src/`, `wix.config.json`, `.wix/design-tokens.css`, …) all live there — **never `cd` into a subdir, never look in a parent for `.wix`**. Compute `<SKILL_ROOT>` from this file: `<SKILL_ROOT>/SKILL.md` — strip `/SKILL.md`; hold the absolute path in session scratch. (Hold `<site-root>` from `SETUP.md` Step 1; the connect/`init` path is likewise single-folder in CWD.)
|
|
52
38
|
|
|
53
39
|
| What | Absolute path |
|
|
54
40
|
|---|---|
|
|
55
|
-
|
|
|
56
|
-
|
|
|
57
|
-
|
|
|
58
|
-
|
|
|
59
|
-
|
|
|
60
|
-
|
|
|
61
|
-
|
|
|
62
|
-
|
|
|
63
|
-
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
`<SKILL_ROOT>/references/
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
The user already has a working frontend on disk (e.g. a Claude Design output, a hand-coded `index.html`, a Vite/React/Vue app) and wants to **connect it** to Wix Headless for hosting + Business Solutions. Triggers: *"connect this to Wix Headless"*, *"add Wix Headless to this project"*, *"host this on Wix"*, *"deploy this to Wix"*, or a prompt referencing "Wix Headless" against a non-empty working directory.
|
|
97
|
-
|
|
98
|
-
**Detection (apply immediately after Wave 0, before any vertical inference):**
|
|
99
|
-
|
|
100
|
-
| Working directory contents | Path |
|
|
101
|
-
|---|---|
|
|
102
|
-
| Empty, or freshly scaffolded by `scaffold.sh` | A (new site) |
|
|
103
|
-
| Has source files (`index.html`, `*.jsx`, `*.tsx`, etc.) **and no `wix.config.json`** | B (connect existing) |
|
|
104
|
-
| Has `wix.config.json` AND Astro structure (`src/`, `astro.config.mjs`) | resume a prior wix-headless run — see "When NOT to Use" below |
|
|
105
|
-
| Has `wix.config.json` AND non-Astro frontend | B, but skip the `init` step — proceed from "Step E2" |
|
|
106
|
-
|
|
107
|
-
**Do NOT run vertical-pack inference from the user's prompt in Path B.** Vertical packs (`stores`, `blog`, `forms`, …) are inferred from the user's described business in Path A. In Path B, the project ALREADY exists — packs are decided by **reading the project files** (see `SETUP.md` § "Step E2"), not by re-asking the user what they're building.
|
|
108
|
-
|
|
109
|
-
**Path B skips most of the wave flow.** Run only: Wave 0 (MCP bootstrap) → `SETUP.md` § "Existing project flow" (E1 init → E2 analyze → E3 install apps → **E4 SDK wiring (required)** → E5 release → E6 final message). Do **not** run Discovery (Wave 1), Setup Dispatch (Wave 2), Seed/Design (Wave 3), Components (Wave 4), Pages (Wave 5), or the Wave 6 manifest checks. The existing project supplies its own frontend, so there is nothing for the designer / seeders / pages subagents to do — but **E4 still runs**: installed apps without SDK wiring would leave the project's features static, which defeats the purpose of "implement the features … using Wix Headless".
|
|
110
|
-
|
|
111
|
-
## When NOT to Use This Skill
|
|
112
|
-
|
|
113
|
-
| Scenario | Use Instead |
|
|
114
|
-
|---|---|
|
|
115
|
-
| Scaffold-only with no further design/wiring | `bash <SKILL_ROOT>/scripts/scaffold.sh <slug> "<Brand>"` |
|
|
116
|
-
| Build + preview an existing wix-headless project | `bash <SKILL_ROOT>/scripts/preview.sh` (from project dir) |
|
|
117
|
-
| Release / ship / go-live an existing wix-headless project | `bash <SKILL_ROOT>/scripts/release.sh` (from project dir) |
|
|
118
|
-
| Install a Wix app onto an existing site | Follow `<SKILL_ROOT>/references/commands/install-app.md` |
|
|
119
|
-
| Connect a non-Wix project (HTML/JSX/Vite/etc.) to Wix Headless | **Path B above — this skill, existing-project flow** |
|
|
120
|
-
| Add a feature to / restyle a prior wix-headless run | Resume on disk; tell user, ask whether to start fresh |
|
|
121
|
-
|
|
122
|
-
If `wix.config.json` is present in the working directory alongside an Astro project structure, offer: *"I found an existing wix-headless project. Continue it or start fresh?"* via `AskUserQuestion`. "Continue" jumps to the appropriate phase based on what's on disk; "fresh" proceeds with full flow. If `wix.config.json` is present alongside a non-Astro frontend, that's Path B mid-flow — skip `init` and continue from `SETUP.md` § "Step E2".
|
|
123
|
-
|
|
124
|
-
---
|
|
125
|
-
|
|
126
|
-
## The Flow at a Glance
|
|
41
|
+
| Discovery flow (router on OPERATION → operation files) | `<SKILL_ROOT>/references/DISCOVERY.md` → `DISCOVERY-create.md` (create) / `DISCOVERY-connect.md` (connect) |
|
|
42
|
+
| Setup flow | `<SKILL_ROOT>/references/SETUP.md` |
|
|
43
|
+
| Seed flow | `<SKILL_ROOT>/references/SEED.md` |
|
|
44
|
+
| Pre-approval funnel (plan; router on OPERATION → operation files) | `<SKILL_ROOT>/references/PLAN.md` → `PLAN-create.md` (create) / `PLAN-connect.md` (connect) |
|
|
45
|
+
| Post-approval build (router on FRAMEWORK → framework files) | `<SKILL_ROOT>/references/BUILD.md` → `BUILD-astro.md` (`frontendBuild: wix`) / `BUILD-own-build.md` (`frontendBuild: none`/`own`) |
|
|
46
|
+
| Seed recipe map (human ref) | `<SKILL_ROOT>/references/seed-recipes.md` |
|
|
47
|
+
| Auth + REST headers | `<SKILL_ROOT>/references/shared/AUTHENTICATION.md` |
|
|
48
|
+
| Public doc endpoints | `<SKILL_ROOT>/references/shared/DOCS_SEARCH.md` |
|
|
49
|
+
| Return contract | `<SKILL_ROOT>/references/shared/RETURN_CONTRACT.md` |
|
|
50
|
+
| Implementer shared behavior | `<SKILL_ROOT>/references/shared/IMPLEMENTER.md` |
|
|
51
|
+
| Image generation | `<SKILL_ROOT>/references/shared/IMAGE_GENERATION.md` |
|
|
52
|
+
| Design-system Designer (authors the DESIGN.md) | `<SKILL_ROOT>/references/DESIGN_SYSTEM.md` |
|
|
53
|
+
| DESIGN.md format spec (vendored; Designer self-loads) | `<SKILL_ROOT>/references/shared/DESIGN_MD.md` |
|
|
54
|
+
| Design-system Composer — deterministic script (writes the 6 files) | `<SKILL_ROOT>/scripts/compose.mjs` (self-documenting — its header is the spec) |
|
|
55
|
+
| Composer astro skeletons | `<SKILL_ROOT>/references/astro/templates/` |
|
|
56
|
+
| Vertical packs (discovery) | `<SKILL_ROOT>/references/verticals/` |
|
|
57
|
+
| Per-vertical instructions | `<SKILL_ROOT>/references/{stores,ecom,cms,blog,forms,gift-cards,bookings,images}/INSTRUCTIONS.md` |
|
|
58
|
+
| Phase 4 page-designer scopes | `<SKILL_ROOT>/references/astro/designer/INSTRUCTIONS.md` |
|
|
59
|
+
| Templates | `<SKILL_ROOT>/references/astro/templates/` |
|
|
60
|
+
| Shared utilities (copied by seed-utilities) | `<SKILL_ROOT>/shared-utilities/` |
|
|
61
|
+
| Known app IDs | `<SKILL_ROOT>/references/commands/known-apps.json` |
|
|
62
|
+
| Scripts | `<SKILL_ROOT>/scripts/` |
|
|
63
|
+
|
|
64
|
+
**Do NOT Read subagent role/instruction docs in the orchestrator** — pass the absolute path; the subagent opens it. Reading a role doc to "prepare a dispatch" pulls 5–14 KB of subagent-only how-to into the orchestrator's context, which it then has to reason over on the dispatch turn — measurably inflating bridge turns; the orchestrator only needs to know **which inputs to inline** for each dispatch, and that list lives in `BUILD.md`'s dispatch steps, not in the role doc.
|
|
65
|
+
|
|
66
|
+
This covers **every** doc whose body is written *for a subagent to follow*, not just files literally named `INSTRUCTIONS.md`: `DESIGN_SYSTEM.md` (Designer), `astro/designer/INSTRUCTIONS.md` (page designers), the per-vertical `INSTRUCTIONS.md` routers, and the per-vertical guides under `references/astro/`. (There is no Composer doc — the Composer is the deterministic script `scripts/compose.mjs`, self-documenting in its header; the orchestrator never reads compose internals.)
|
|
67
|
+
|
|
68
|
+
The orchestrator's own reading set is the conductor/domain docs only:
|
|
69
|
+
|
|
70
|
+
- `PLAN.md` (+ the one operation funnel it routes to — `PLAN-create.md` *or* `PLAN-connect.md`)
|
|
71
|
+
- `BUILD.md` (+ the one framework build file — `BUILD-astro.md` *or* `BUILD-own-build.md`)
|
|
72
|
+
- `DISCOVERY.md` (+ the one operation discovery file — `DISCOVERY-create.md` *or* `DISCOVERY-connect.md`)
|
|
73
|
+
- `SETUP.md`
|
|
74
|
+
- `SEED.md`
|
|
75
|
+
- `references/verticals/*.md`
|
|
76
|
+
|
|
77
|
+
When and how each subagent is dispatched (Designer, seeders, image phases, vertical Components/Pages) — and the deterministic scripts in between (`emit-design-tokens.mjs`, `compose.mjs`) — is owned by the conductor (`references/PLAN.md` pre-approval, `references/BUILD.md` post-approval), not listed here.
|
|
78
|
+
|
|
79
|
+
## Authentication
|
|
80
|
+
|
|
81
|
+
Every Wix API call uses `@wix/cli` + `curl`:
|
|
127
82
|
|
|
128
83
|
```
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
[Phase 3 Components + Image Phase 2 dispatched; decorative slots patched once Image Phase 1 returns]
|
|
132
|
-
↓ (Phase 3 + Phase 1 Seeders done)
|
|
133
|
-
[Phase 4 Pages]
|
|
134
|
-
↓ (Phase 4 done + Image Phase 2 done)
|
|
135
|
-
[Manifest check] → [Build + Release] → [Final message + run.json]
|
|
84
|
+
Authorization: Bearer $(npx @wix/cli@latest token --site "$SITE_ID")
|
|
85
|
+
wix-site-id: $SITE_ID
|
|
136
86
|
```
|
|
137
87
|
|
|
138
|
-
|
|
139
|
-
|---|---|---|---|
|
|
140
|
-
| 0 | (bash) | — | MCP prefix discovery, schema bootstrap, capture `runStartedAt` |
|
|
141
|
-
| 1 | (Q&A) | user | brand/vibe/aesthetic; scaffold launches in background after Q1 |
|
|
142
|
-
| 2 | apps install + env-pull + npm-install (bg) + seed-utilities | — | `init-site-json.mjs` |
|
|
143
|
-
| 3 | seeders + design-system + image-phase-1 | design-system (fg) | merge `designTokens` into site.json; `emit-design-tokens.mjs`; grep Layout.astro CSS imports |
|
|
144
|
-
| 4 | components + components-css + image-phase-2 (all bg) | (none — all backgrounded) | `copy-utility-templates.mjs components`; on Image Phase 1 return: `patch-decorative-slots.mjs`; on Phase 3 return: `check-manifest.mjs components` |
|
|
145
|
-
| 5 | pages | components done + Phase 1 seeders done | `copy-utility-templates.mjs pages` |
|
|
146
|
-
| 6 | (bash) | pages done + image-phase-2 done | `check-manifest.mjs pages`; `release.sh`; `finalize-run-json.mjs` |
|
|
147
|
-
|
|
148
|
-
**Phase axis.** Core pipeline: `Phase 1 (Seed) → Phase 2 (Design System) → Phase 3 (Components) → Phase 4 (Pages)`. Image pipeline runs in parallel: Image Phase 1 (Decorative) alongside Phases 1–2; Image Phase 2 (Entity) alongside Phase 3 (depends only on Phase 1 Seed entity IDs + brand). Each Phase 4 agent writes its routes ONCE with both visual design and data queries — no placeholder-then-rewrite split.
|
|
149
|
-
|
|
150
|
-
**The orchestrator is the only writer of `.wix/site.json`** — it merges each Seeder's `data` block into `seeded.<vertical>` and the Designer's `data.designTokens` block into `designTokens` as subagent results arrive. Subagents never write `site.json` themselves.
|
|
151
|
-
|
|
152
|
-
### Batching compliance
|
|
153
|
-
|
|
154
|
-
Each parallel-dispatch step is **one concurrent batch** with **no narration between dispatches**. Interleaved status updates, file writes, or text like "Launching agents…" splits the batch into separate turns and adds 12–39s of inter-dispatch latency per gap. Make every subagent that doesn't block downstream work a **background subagent** (only Phase 2 Design System is foreground) — background dispatch alone gives ~2× compression by overlapping execution.
|
|
155
|
-
|
|
156
|
-
### Standard subagent prompt fields
|
|
157
|
-
|
|
158
|
-
Every dispatch prompt includes:
|
|
159
|
-
- `Instruction file (absolute path)` — `<SKILL_ROOT>/references/<scope>/INSTRUCTIONS.md`
|
|
160
|
-
- `Phase instruction` / `Scope` — exact scope string
|
|
161
|
-
- `MCP tool prefix` — from Wave 0, verbatim
|
|
162
|
-
- `Project directory (absolute path)` — project CWD
|
|
163
|
-
- `siteId` — from `wix.config.json`
|
|
164
|
-
- `Brand context` — name, vibe, aesthetic direction, colors, fonts
|
|
165
|
-
|
|
166
|
-
---
|
|
167
|
-
|
|
168
|
-
## Wave 0 — MCP bootstrap & run start
|
|
169
|
-
|
|
170
|
-
See `references/SETUP.md` § "MCP Prefix Discovery + Schema Bootstrap".
|
|
171
|
-
|
|
172
|
-
1. **Capture `runStartedAt`** via `date -u +%Y-%m-%dT%H:%M:%SZ` and hold in scratch (used at end-of-run for `run.totalSeconds`).
|
|
173
|
-
2. **Discover the MCP prefix** via your runtime's tool-discovery primitive: look up `WixREADME`, strip the trailing suffix from the returned name. Call `<prefix>WixREADME` to verify connectivity. On failure, stop and tell the user the Wix MCP server isn't connected.
|
|
174
|
-
3. **Pre-load Wix MCP tool schemas** — read `<SKILL_ROOT>/references/commands/mcp-bootstrap.md` and follow its single `ToolSearch` invocation. Capture `{ phase: "mcp-bootstrap", seconds: <duration> }` in `run.json.phases[]`.
|
|
175
|
-
4. Hold the prefix for the whole session. Pass it verbatim into every subagent prompt.
|
|
176
|
-
|
|
177
|
-
## Wave 1 — Discovery
|
|
178
|
-
|
|
179
|
-
See `references/DISCOVERY.md` for full mechanics.
|
|
180
|
-
|
|
181
|
-
- Infer vertical(s) from the user's opening message; if too vague, one conversational clarifier.
|
|
182
|
-
- **Q1** (`AskUserQuestion`): brand name. On answer, launch scaffold in background: `bash <SKILL_ROOT>/scripts/scaffold.sh <slug> "<Brand>"`. Slug-derivation + timing capture rules in `references/DISCOVERY.md` § "Scaffold dispatch".
|
|
183
|
-
- **Q2** (`AskUserQuestion`): vibe.
|
|
184
|
-
- Craft a 2–3 sentence aesthetic direction in scratch (do not print standalone).
|
|
185
|
-
- Present the plan as markdown (Design Direction → Features → Pages → CMS Collections → Apps & SDK). **Pages, CMS Collections, and Apps & SDK MUST be markdown tables.**
|
|
186
|
-
|
|
187
|
-
> **Before typing any table, open `references/DISCOVERY.md` § "Plan structure" and copy each section's header skeleton verbatim.** Do NOT type column headers from memory — root cause of every plan-format regression. DISCOVERY.md leads with the exact `| ... |` header to copy and a STOP cue listing wrong shapes.
|
|
188
|
-
|
|
189
|
-
- `AskUserQuestion` for approval.
|
|
88
|
+
`wix login` is safe from non-interactive agents (URL + user code written to stderr, exits non-zero once the browser flow concludes). Full recovery ladder: `<SKILL_ROOT>/references/shared/AUTHENTICATION.md`.
|
|
190
89
|
|
|
191
|
-
##
|
|
90
|
+
## Subagent model tier
|
|
192
91
|
|
|
193
|
-
|
|
92
|
+
Match each subagent's task to one of two tiers; dispatch with the model
|
|
93
|
+
your environment provides for that tier. Apply by lookup, not deliberation.
|
|
194
94
|
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
3. **`rm -f package-lock.json && npm install …`** as a **background shell** with the union of all loaded verticals' `packages` arrays plus the always-packages (`@wix/sdk tailwindcss @tailwindcss/vite`). Flags: `--no-fund --no-audit --legacy-peer-deps`. Bake `NPM_INSTALL_START=$(date -u +%s)` and `NPM_INSTALL_END=$(date -u +%s)` into the SAME background bash command so the values land in its output. Record `{ phase: "npm-install", seconds }` when the install finishes. **Do not add packages beyond this set** — see `SETUP.md` § anti-hallucination rule.
|
|
198
|
-
4. **`bash <SKILL_ROOT>/scripts/seed-utilities.sh`** — copies `<SKILL_ROOT>/shared-utilities/*.ts` (`wix-image.ts`, `analytics.ts`, `ricos.ts`) into `src/utils/` with `cp -n` and strips the Astro starter cruft. Record `{ phase: "seed-utilities", seconds }`.
|
|
199
|
-
5. **Memory writes** — `project` memory with brand/apps/pages/phase.
|
|
200
|
-
6. **User-facing roadmap × N** — emit a tracker entry per phase boundary. Target **6–8 entries**: "Install apps", "Seed data", "Design site", "Wire features", "Generate images", "Install dependencies", "Build and preview".
|
|
95
|
+
**Fast tier** — recipe-following work whose return is JSON of IDs/URLs.
|
|
96
|
+
No source-code authoring, no creative judgment.
|
|
201
97
|
|
|
202
|
-
|
|
98
|
+
- All Seeder subagents (stores, cms, blog, forms, future verticals)
|
|
99
|
+
- Image-generation subagents (while still dispatched as subagents)
|
|
203
100
|
|
|
204
|
-
|
|
205
|
-
8. **`node "<SKILL_ROOT>/scripts/init-site-json.mjs" "$(pwd)" "<brand>" "<one-line aesthetic from Q2>" "<verticals-csv>"`** — wraps in `PHASE_START`/`PHASE_END`; record `{ phase: "init-site-json", seconds }`. Writes the canonical initial `.wix/site.json`:
|
|
101
|
+
**Default tier** — everything else.
|
|
206
102
|
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
103
|
+
- Design System / Designer (brand-voice CSS, type, layout)
|
|
104
|
+
- Phase 3 Components (SDK composition, hooks, JSX)
|
|
105
|
+
- Phase 4 Pages (cross-file dependencies, brand-voice content)
|
|
106
|
+
- Any subagent that authors files the build will consume
|
|
210
107
|
|
|
211
|
-
|
|
108
|
+
If unsure, pick default. Do not weigh alternatives per dispatch — the
|
|
109
|
+
choice is determined by the task type, not by the subject matter of
|
|
110
|
+
the run.
|
|
212
111
|
|
|
213
|
-
## Wave 3 — Seed + Design System + Image Phase 1 (one concurrent batch)
|
|
214
112
|
|
|
215
|
-
|
|
216
|
-
- **Phase 1 Seeder subagent (background)**, per vertical's `seed` config. Returns its data via the standard return JSON; orchestrator merges into `.wix/site.json.seeded.<vertical>`.
|
|
113
|
+
## When this skill triggers
|
|
217
114
|
|
|
218
|
-
|
|
219
|
-
- **Image Phase 1 Decorative subagent (background)**. Generates decorative images from brand context only — no Phase 1 Seed dependency. Prompt adds `Scope: image-phase-1-decorative` + page list + **`decorativeSlots: string[]`** (REQUIRED). Compose `decorativeSlots` from the canonical vocabulary in `references/designer/INSTRUCTIONS.md` § common rule #7: always `["hero", "about"]`, plus `"productsHeader"` if stores loaded, plus `"cmsHeader"` if you want a CMS page-header decorative. Designer is restricted to the same vocabulary; the two MUST match exactly.
|
|
220
|
-
- **Phase 2 Design System subagent (foreground)**, scope `design-system`, instruction file `<SKILL_ROOT>/references/designer/INSTRUCTIONS.md`. Writes `global.css`, `Layout.astro`, `Navigation.astro`, `Footer.astro`, `astro.config.mjs`, `index.astro` shell, returns `designTokens` JSON.
|
|
115
|
+
Explicit invocation only. **Two entry paths — decide before doing anything else.**
|
|
221
116
|
|
|
222
|
-
|
|
223
|
-
- **`Navigation links: [...]`** — JSON array of `{href, label}` for top-level nav links the designer hardcodes. Compose by filtering loaded packs: include a route ONLY if its pack does not declare a `<!-- nav:links -->` entry in `contributes:`. With today's packs:
|
|
224
|
-
- cms → `/about`, `/faq` are designer-owned.
|
|
225
|
-
- stores → `/products` is NOT designer-owned (stores splices a Shop submenu at `<!-- nav:links -->` in Phase 4 `pages-home-and-nav`).
|
|
226
|
-
- gift-cards → `/gift-cards` is NOT designer-owned (gift-cards splices a probe-gated link, AND it's `disabled: true`).
|
|
227
|
-
- ecom → no nav-link routes; only `<!-- nav:actions -->` (CartBadge mount).
|
|
228
|
-
- For a stores+cms+ecom+gift-cards run the list is `[{href:"/about",label:"About"},{href:"/faq",label:"FAQ"}]`. Including `/products` or `/gift-cards` produces duplicate Products+Shop links.
|
|
229
|
-
- **`Disabled packs: [...]`** — names of loaded packs with `disabled: true`. The designer must not add hero CTAs, footer links, or any other surfaces pointing at their routes. Without this, the designer composes a "Send a gift card" CTA pointing at `/gift-cards` even when the user hasn't enabled gift-cards.
|
|
117
|
+
**Decide by intent first, directory second.** An empty directory does **not** by itself mean Path A — read what the prompt is asking for. (See `DISCOVERY.md` § "Wave 0" for the authoritative rule.)
|
|
230
118
|
|
|
231
|
-
###
|
|
119
|
+
### Path A — New site from a prompt (default)
|
|
232
120
|
|
|
233
|
-
|
|
121
|
+
The user asks to **create a new site from scratch** ("build me a store", "I want to sell tables online", "make a blog") with **no design to connect**, in an empty directory. Infer vertical(s) from the opening message and load the **full resolved pack set** (top-level + `requires:` transitives + always-on `cms`) in one read batch — routing examples: stores → stores+cms+ecom+gift-cards; blog → blog+cms; bookings → bookings+cms; etc. If the prompt is too vague, ask one conversational clarifier (NOT `AskUserQuestion`): *"What do you want your site to do — sell things, publish content, take bookings?"*
|
|
234
122
|
|
|
235
|
-
|
|
236
|
-
2. **`node "<SKILL_ROOT>/scripts/emit-design-tokens.mjs" "$(pwd)"`** — deterministically projects `.wix/site.json.designTokens` → `.wix/design-tokens.css` + `.wix/site.d.ts`. Wrap in `PHASE_START`/`PHASE_END`; record `{ phase: "emit-design-tokens", seconds }`.
|
|
237
|
-
3. **Layout.astro CSS-import verification (mandatory).** Grep the generated `src/layouts/Layout.astro`. For every loaded vertical whose pack declares a `components` entry (stores, ecom, blog, forms), there MUST be a matching `import '../styles/components-<pack>.css'` in the frontmatter. If any is missing, **inline-patch Layout.astro now** — Phase 3 agents write `components-<pack>.css` expecting the designer to have imported it; if forgotten, every React island that uses scoped contract classes renders unstyled.
|
|
123
|
+
> **Framework keyword → scaffold that framework, not astro.** A create prompt that **explicitly names a client-build framework** (*"create a bakery site using vite and wix"*, react/vue/svelte/SPA) stays Path A (`operation: create`) but resolves `frontendBuild: own` — the skill scaffolds *that* framework and connects it via the SPA spine (companion case). A **bare** "create a bakery site" with no framework named stays **astro** (the default). Only an explicit keyword flips it — never infer a framework the user didn't ask for. (`DISCOVERY.md` § "Wave 0".)
|
|
238
124
|
|
|
239
|
-
|
|
125
|
+
> **Do NOT call `WixSiteBuilder` MCP** for new-site requests — same intent, different flow; calling both produces a duplicated, conflicting build. This skill is the sole entry point.
|
|
240
126
|
|
|
241
|
-
|
|
127
|
+
### Path B — Connect an existing/brought design to Wix (`operation: connect`)
|
|
242
128
|
|
|
243
|
-
|
|
129
|
+
Triggers: *"connect this to Wix Headless"*, *"implement this design … connecting to wix"*, *"add Wix Headless to this project"*, *"host this on Wix"*, *"deploy this to Wix"*, *"implement the features … using Wix Headless"*, or a **design-file URL to fetch + implement** (Claude Design / v0 / Lovable / any tool). **These route to B even when the working directory is empty** — the design arrives by fetch, so emptiness at trigger time does not make it Path A.
|
|
244
130
|
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
Per loaded vertical with a `componentsCss` entry (today: stores, ecom):
|
|
253
|
-
- **Phase 3 Components-CSS subagent (background)**. Same concurrent batch as the `components` sibling — TSX→CSS link is build-time via class names. Reading set is much smaller (see `<SKILL_ROOT>/references/<vertical>/COMPONENTS_CSS.md`). Skip silently for packs without this entry.
|
|
254
|
-
|
|
255
|
-
If any pack produces entities (stores products, CMS items, blog posts) AND the relevant Phase 1 Seeder has returned:
|
|
256
|
-
- **Image Phase 2 Entity subagent (background)**. Generates + PATCHes entity images. Prompt adds `Scope: image-phase-2-entity` + `Phase 1 Seed return data` (products, collections, blogPosts — same inline format used for Phase 4 scopes) + brand context.
|
|
257
|
-
|
|
258
|
-
> **Gate.** If a Phase 1 Seeder is still running, hold Image Phase 2 until that seeder returns and merges. Phase 3 dispatch does not wait — Phase 3 agents don't need entity data.
|
|
259
|
-
>
|
|
260
|
-
> **Credit-exhaustion skip.** If Image Phase 1 returned `status: "failed"` AND any `errors[].code` matches `REQUEST_NOT_ELIGIBLE` / `INSUFFICIENT_CREDITS` / quota-exhaustion patterns (messages containing `not eligible for credits`, `quota exceeded`, `resets at`), DO NOT dispatch Image Phase 2 — both phases hit the same Wix AI credit pool. Record `{phase: "image-phase-2-entity", status: "skipped", seconds: 0, notes: "Phase 1 confirmed credit exhaustion via <code>"}` and surface in the final message ("No imagery shipped — you can upload images from the Wix dashboard"). Per-request transient errors (5xx, timeout) do NOT trigger this skip.
|
|
261
|
-
|
|
262
|
-
> **Do not enumerate files in the Phase 3 Components prompt.** The agent's INSTRUCTIONS.md and the vertical pack's `creates:` list (filtered by `phase: components`) own which files the agent writes. A hand-typed file list omits a file the pack declares, the agent skips it, downstream pages import it, build breaks.
|
|
263
|
-
|
|
264
|
-
### Bridge: post-Image-Phase-1 decorative slot patch
|
|
265
|
-
|
|
266
|
-
Phase 2 designer wrote `index.astro` with `data-decorative-slot="<key>"` placeholder `<div>`s. Once Image Phase 1 returns:
|
|
267
|
-
|
|
268
|
-
1. If Image Phase 1 returned `status: "failed"` or timed out, skip — placeholders look complete on their own. (You can also unconditionally invoke the script — it self-skips when `.wix/image-urls.md` is missing.)
|
|
269
|
-
2. **`node "<SKILL_ROOT>/scripts/patch-decorative-slots.mjs" "$(pwd)"`** — reads `.wix/image-urls.md`, walks `src/pages/**/*.astro`, injects `<img …class="decorative-slot-img" />` as the first child of each matching slot div. Idempotent + safe (won't clobber a div with non-`<img>` child content). JSON return: `{ status, imageUrls, filesScanned, patched, skipped, warnings }`.
|
|
270
|
-
3. If `warnings[]` is non-empty, append `{code: "DECORATIVE_SLOT_DIV_OCCUPIED", file, slot}` per warning to the Phase 2 Design System entry's `errors` in `run.json`. If `imageUrls[]` is non-empty but `patched[]` is empty AND `warnings[]` is empty, the designer emitted no `data-decorative-slot=` attributes at all — append `{code: "NO_DECORATIVE_SLOTS_FOUND"}`. Both non-fatal.
|
|
271
|
-
|
|
272
|
-
Wrap in `PHASE_START`/`PHASE_END`; record `{ phase: "decorative-slot-patch", seconds }`.
|
|
273
|
-
|
|
274
|
-
### Bridge: post-Phase-3 manifest check
|
|
275
|
-
|
|
276
|
-
When all Phase 3 sub-agents return: **`node "<SKILL_ROOT>/scripts/check-manifest.mjs" "$(pwd)" components "<packs-csv>"`**. Verifies every `creates:` entry tagged `phase: components` exists on disk and recovers missing files from canonical templates. JSON output: `present`, `recovered`, `missing` arrays. Exit 0 = happy or fully recoverable; exit 1 = unrecoverably missing.
|
|
277
|
-
|
|
278
|
-
For each `recovered` entry, append to `run.json.recoveries[]`. For each `missing` entry, surface the remediation hint to the user before Wave 5 dispatches — Phase 3 React islands that Phase 4 imports are critical-path; if any are unrecoverable, do NOT continue. Record `{ phase: "manifest-check-components", seconds }`.
|
|
279
|
-
|
|
280
|
-
## Wave 5 — Pages (one concurrent batch)
|
|
281
|
-
|
|
282
|
-
**Wait gate:** before dispatching, confirm:
|
|
283
|
-
- All Phase 1 Seeders done — data merged into `.wix/site.json.seeded.<vertical>`.
|
|
284
|
-
- All Phase 3 Components agents done — they've written `src/components/*` and `src/styles/components-<vertical>.css`.
|
|
285
|
-
- Phase 2 Design System done — `.wix/site.json.designTokens`, `.wix/design-tokens.css`, `.wix/site.d.ts` all exist.
|
|
286
|
-
|
|
287
|
-
If a Phase 1 Seeder returned without a parseable JSON block, re-request it (see `<SKILL_ROOT>/references/shared/RETURN_CONTRACT.md`) — do NOT dispatch with empty data and rely on subagents to re-query.
|
|
288
|
-
|
|
289
|
-
**Pre-dispatch bridge:** `node "<SKILL_ROOT>/scripts/copy-utility-templates.mjs" "$(pwd)" pages` — same script as Wave 4, invoked with `pages`. Today copies `templates/stores/categories.ts` → `src/utils/categories.ts` when stores loaded. Without it, `pages-products` and `pages-home-and-nav` start before `pages-categories` writes `categories.ts` and trigger spurious "missing import" recovery paths. Record `{ phase: "copy-utility-templates-pages", seconds }`.
|
|
290
|
-
|
|
291
|
-
### Subagent batch
|
|
292
|
-
|
|
293
|
-
Per loaded vertical's `pages`:
|
|
294
|
-
- Per-scope **Page subagent (background)**.
|
|
295
|
-
|
|
296
|
-
Example for stores + cms run:
|
|
297
|
-
- `product-pages` — `products/index.astro`, `products/[slug].astro`, `ProductCard.astro`
|
|
298
|
-
- `category-pages` — `category/[slug].astro`, `CategoryRail.astro`, `utils/categories.ts`
|
|
299
|
-
- `cart-checkout` — `cart.astro`, `thank-you.astro`
|
|
300
|
-
- `home-and-nav` — patch `index.astro` home product grid; patch `Navigation.astro` (CartBadge mount + Shop submenu insert)
|
|
301
|
-
- `cms-pages` — wire about + FAQ
|
|
302
|
-
|
|
303
|
-
Each prompt includes the standard fields PLUS:
|
|
304
|
-
- Scope string (names the files it owns)
|
|
305
|
-
- **`.wix/site.json` path reference (MANDATORY).** Agents read seeded data from `.wix/site.json.seeded.<vertical>`:
|
|
306
|
-
- stores scopes → `.wix/site.json.seeded.stores.products` (id, name, slug, variantId, price, sku, inventory). `.wix/site.json.seeded.stores.categories` is always `[]` — categories are merchant-driven, live-queried by the frontend.
|
|
307
|
-
- CMS scopes → `.wix/site.json.seeded.cms.collections`.
|
|
308
|
-
- blog scopes → `.wix/site.json.seeded.blog.posts`.
|
|
309
|
-
- Agents DO NOT re-query MCP — if `site.json` is missing a required key, return `status: "failed", errors: [{code: "SITE_JSON_INCOMPLETE", missing: "..."}]` rather than re-fetching. Re-querying would mask a seeder bug and adds 5–15 s per agent.
|
|
310
|
-
- Styling contract (full JSON inline — same pattern as Phase 3 Components).
|
|
311
|
-
- **ProductCard interface (for `product-pages` and `home-and-nav` only).** Both subagents touch `ProductCard.astro` — `product-pages` owns and rewrites it, `home-and-nav` reads it to wire the home grid. Tell both subagents the interface up front to eliminate the read-timing race:
|
|
312
|
-
> `ProductCard.astro accepts a single prop: { product } where product is the full Wix product object from productsV3. Usage: <ProductCard product={p} />`
|
|
313
|
-
|
|
314
|
-
Include verbatim in both prompts. Without this, `home-and-nav` reads the designer's placeholder ProductCard (which may have flat props) before `product-pages` rewrites it.
|
|
315
|
-
|
|
316
|
-
> **Image Phase 2 is NOT dispatched here.** It was launched in Wave 4; the Wave 6 hard gate waits for it before release.
|
|
317
|
-
|
|
318
|
-
## Wave 6 — Manifest check, build, release
|
|
319
|
-
|
|
320
|
-
> **HARD GATE: Do NOT invoke `release.sh` until `image-phase-2-entity` has completed or timed out (120s).** Skipping has shipped sites with no product images and `run.json` recording `image-phase-2-entity` as `"in_progress"`.
|
|
321
|
-
|
|
322
|
-
1. **Wait for ALL Phase 4 subagents AND `image-phase-2-entity`.** If Phase 4 finishes before Image Phase 2, wait up to 120s. With Image Phase 2 dispatched in Wave 4 this is usually a no-op.
|
|
323
|
-
|
|
324
|
-
**Observability fallback.** Subagent return signals are not always reliable — silent gaps happen. If 3 minutes pass past the expected completion window with no signal, do NOT keep waiting indefinitely. Trigger the post-Phase-4 manifest check directly — if files exist, the subagents finished; if not, treat the gap as a failure and surface to the user.
|
|
325
|
-
|
|
326
|
-
**Rate-limit recovery for `image-phase-2-entity`.** If the subagent returns `status: "failed"` with an error matching `/limit|quota|resets/i`, do NOT stall or retry the subagent. Run the inline recovery in the orchestrator: batched generate (one call) → concurrent imports (one batch) → concurrent product/CMS PATCHes (one batch). Procedure encoded in `references/shared/IMAGE_GENERATION.md`.
|
|
327
|
-
|
|
328
|
-
2. **Post-Phase-4 manifest check.** `node "<SKILL_ROOT>/scripts/check-manifest.mjs" "$(pwd)" pages "<packs-csv>"`. Same recovery rules as Phase 3 check. Surface any unrecoverable `missing[]` entries (exit code 1) before invoking release — those are page files Phase 4 didn't write that have no template fallback. Record `{ phase: "manifest-check-pages", seconds }`.
|
|
329
|
-
|
|
330
|
-
3. **Wait for npm install** — the background install from Wave 2. Wait on its handle; do not `sleep`-poll. On non-zero exit follow the recovery ladder in `references/SETUP.md` § "npm install recovery" (foreground retry with timeout, never delete the lockfile).
|
|
331
|
-
|
|
332
|
-
4. **`bash <SKILL_ROOT>/scripts/release.sh`** — runs `npx @wix/cli build` + `release`, extracts the URL from `Site published on <url>`, prints the URL on stdout. Capture build / release timings via `date -u` wrappers and record `{ phase: "build", seconds }` and `{ phase: "release", seconds }`. The script's stdout becomes `outcome.releaseUrl` in `run.json`. This populates the **Frontend link** in headless settings so transactional emails link to the deployed frontend. On build failure, surface the compiler error and stop — do NOT deploy a broken site. The script retries known transient release failures; see `<SKILL_ROOT>/references/shared/PRODUCTION_SHARP_EDGES.md` before adding custom release retry logic.
|
|
333
|
-
|
|
334
|
-
Use `bash <SKILL_ROOT>/scripts/preview.sh` (not this step) only when the user is iterating on an existing site and explicitly asks for a fast preview without touching production.
|
|
335
|
-
|
|
336
|
-
On non-fatal build warnings, see `<SKILL_ROOT>/references/shared/BUILD_NOISE.md` — read only if a warning surfaces.
|
|
337
|
-
|
|
338
|
-
If the user asks for SEO root files (`robots.txt`, `llms.txt`), favicons, custom-domain verification, or batch release behavior, read `<SKILL_ROOT>/references/shared/PRODUCTION_SHARP_EDGES.md` before implementing. Wix may own these root paths at the edge, so static files and Astro routes are not always effective.
|
|
339
|
-
|
|
340
|
-
> **No standalone verify phase.** The post-phase manifest check catches missing files with auto-recovery; type/module/template errors surface from `astro build` a few seconds later.
|
|
341
|
-
|
|
342
|
-
### Post-phase manifest check — recovery rules
|
|
343
|
-
|
|
344
|
-
`<SKILL_ROOT>/scripts/check-manifest.mjs` is invoked from both Wave 4 (after Phase 3, with `phase: components`) and Wave 6 (after Phase 4, with `phase: pages`). Cost on the happy path: < 1 s per phase boundary. Recovery cost: ~10 ms per file copied from a template.
|
|
345
|
-
|
|
346
|
-
For every loaded pack, for every `creates:` entry where `phase == <given>`:
|
|
347
|
-
1. If the file exists → record as `present`.
|
|
348
|
-
2. If missing AND a template exists at `<SKILL_ROOT>/templates/<pack>/<tail>` → copy it; record as `recovered` with `{source: "template-copy", template}`.
|
|
349
|
-
3. Otherwise → record as `missing` with a `PHASE_FILE_MISSING` code and a remediation hint.
|
|
350
|
-
|
|
351
|
-
The script outputs JSON; the orchestrator appends `recovered[]` to `run.json.recoveries[]`, `missing[]` to `run.json.errors[]`. On any unrecoverable miss (exit 1), critical-path files (Phase 3 React islands that Phase 4 imports) → stop; optional ancillary files → log and continue.
|
|
352
|
-
|
|
353
|
-
The orchestrator never invents stub content for missing files — template-copy is the only recovery path. Stubs hide bugs (e.g. a no-op `discounts.ts` ships green builds with silently-broken discount rendering).
|
|
354
|
-
|
|
355
|
-
**Backward compat.** `PHASE4_FILE_MISSING` (used historically) remains as an alias for `{code: "PHASE_FILE_MISSING", phase: "pages"}`.
|
|
356
|
-
|
|
357
|
-
## Final message + run.json
|
|
358
|
-
|
|
359
|
-
> **No visual or browser-based verification.** After the build succeeds, do NOT open the URL in Playwright, take screenshots, or run smoke tests on your own initiative. Visual verification is opt-in only when the user explicitly requests it.
|
|
131
|
+
| Signal | Path |
|
|
132
|
+
|---|---|
|
|
133
|
+
| Prompt asks to **connect / implement / host an existing or fetched design** (incl. a design-file URL), **even if the CWD is empty** | **B (`operation: connect`)** |
|
|
134
|
+
| A working frontend already on disk (`index.html`, `*.html`/`*.jsx`/`*.tsx`/`*.vue`, a design bundle) | **B (`operation: connect`)** |
|
|
135
|
+
| Empty CWD **and** a create-a-new-site prompt, nothing to connect | A (`operation: create`) |
|
|
136
|
+
| `wix.config.json` present (an existing wix-headless project) | resume/extend |
|
|
360
137
|
|
|
361
|
-
|
|
138
|
+
**The connect operation wires a brought-in design to Wix.** When the working directory holds a brought-in site, the run **connects it to a live Wix backend** — parse the site (`DISCOVERY-connect.md`), init + shared Setup/Seed, wire existing dynamic regions to `@wix/sdk` and augment static designs with the connected feature their purpose implies, then no-build release. The frontend-track playbook is `<SKILL_ROOT>/references/custom/INSTRUCTIONS.md`; routing is owned by `PLAN-connect.md`.
|
|
362
139
|
|
|
363
|
-
|
|
364
|
-
2. **Compose the draft `run.json` blob** in scratch. Aggregate every subagent return into `phases[]`, set `outcome.previewUrl`, fill `run.started` (from `runStartedAt`) / `run.ended` (capture now via `date -u`), compute `run.totalSeconds`, and compose `requiredPhases[]` — phases that MUST have a captured duration:
|
|
365
|
-
- Always: `mcp-bootstrap`, `init-site-json`, `scaffold`, `env-pull`, `seed-utilities`, `emit-design-tokens`, `manifest-check-components`, `manifest-check-pages`, `decorative-slot-patch`, `npm-install`, `build`, `release` (or `preview` if `preview.sh` was used).
|
|
366
|
-
- Per app installed in Wave 2: `app-install-<appName>`.
|
|
367
|
-
- When `copy-utility-templates` ran: `copy-utility-templates-components` and/or `copy-utility-templates-pages`.
|
|
368
|
-
- `image-phase-2-entity`'s duration arrives via its return; record from there if any pack produced entities.
|
|
369
|
-
3. **`echo "$RUN_JSON_DRAFT" | node "<SKILL_ROOT>/scripts/finalize-run-json.mjs" "$(pwd)"`** — applies the timing-completeness gate (any `requiredPhases` entry without a captured duration becomes `seconds: null` + `{code: "MISSING_TIMING"}` in `errors[]`), writes the canonical `.wix/run.json`, prints `{perfLine, missingTiming[]}` on stdout.
|
|
370
|
-
4. **Emit the perf one-liner** verbatim as the last line of the message body, from the script's `perfLine`:
|
|
140
|
+
### Two routing axes: operation (Discovery/Plan) + framework (Build)
|
|
371
141
|
|
|
372
|
-
|
|
142
|
+
The skill routes each phase on its own axis — they only *happen* to coincide while there are exactly two modes:
|
|
373
143
|
|
|
374
|
-
|
|
144
|
+
- **Operation** (Discovery + Plan route on this) — *create* (scaffold a new site from a prompt) vs *connect* (integrate a brought-in design).
|
|
145
|
+
- **Framework-build-class** (Build routes on this) — `frontendBuild`: `wix` (astro-native, `wix build`) vs `none` (static HTML, no build) vs `own` (own-build SPA, the project's own `npm run build`).
|
|
375
146
|
|
|
376
|
-
|
|
147
|
+
These plus `frontend`, `verticals[]`, `designSource`, and `brand` form the **Plan→Build contract** (`PLAN.md` § "The Plan→Build contract"), held in orchestrator scratch and threaded into dispatch prompts. The axes are **orthogonal** — `frontendBuild` is derived inside the operation, not implied by it:
|
|
377
148
|
|
|
378
|
-
|
|
149
|
+
| `operation` | `frontend` | `frontendBuild` | What runs |
|
|
150
|
+
|---|---|---|---|
|
|
151
|
+
| `create` (default) | `astro` | `wix` | the skill writes the site, then `wix build` + release (`references/astro/`) |
|
|
152
|
+
| `create` + explicit framework keyword (*"…using vite"*) | `custom` | `own` | scaffold the named framework (vite/vue/svelte) → minimal app → connect via the SPA spine → the project's own `npm run build` + release (companion case) |
|
|
153
|
+
| `connect` (brought static HTML) | `custom` | `none` | connect a brought-in HTML+CSS/JS site; init + Setup/Seed + connect/augment + **no-build** release (`references/custom/`) |
|
|
154
|
+
| `connect` (brought framework SPA) | `custom` | `own` | connect a brought-in Vite/React/Vue/Svelte SPA; bundled `@wix/sdk` + source-edit wiring (persistence swap) + the project's own build + release |
|
|
379
155
|
|
|
380
|
-
|
|
156
|
+
`DISCOVERY.md` § "Wave 0" resolves `operation` first, then derives `frontend`/`frontendBuild` (connect's build-class from disk — `DISCOVERY-connect.md` § 1.5; create's from an explicit framework keyword). `frontend`/`operation`/`frontendBuild` all live in **orchestrator scratch** and are **not** written to disk (on scratch loss, recover them from `package.json`: `@wix/astro` present ⇒ `frontend: astro`/`frontendBuild: wix`, else `frontend: custom` with `frontendBuild` re-derived from `scripts.build` + a bundler dep). **Operation routing is owned by `PLAN.md` § "Operation routing"; framework routing by `BUILD.md`.** Framework SPAs carry **no per-framework instruction files** — one agnostic playbook; only SSR frameworks (Next.js/Nuxt) are deferred.
|
|
381
157
|
|
|
382
|
-
|
|
383
|
-
PHASE_START=$(date -u +%s)
|
|
384
|
-
# … invoke …
|
|
385
|
-
PHASE_END=$(date -u +%s)
|
|
386
|
-
# record: { "phase": "<name>", "seconds": $((PHASE_END - PHASE_START)) }
|
|
387
|
-
```
|
|
158
|
+
### Two tracks (business vs frontend)
|
|
388
159
|
|
|
389
|
-
|
|
160
|
+
The skill runs two semi-independent tracks (business = frontend-blind site/app/seed work; frontend = scaffold/design/components/pages/build) that the orchestrator interleaves for wall-time. **The track model and interleaving are owned by `PLAN.md` § "Two tracks".**
|
|
390
161
|
|
|
391
|
-
|
|
162
|
+
### When NOT to use this skill
|
|
392
163
|
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
164
|
+
| Scenario | Use instead |
|
|
165
|
+
|---|---|
|
|
166
|
+
| Scaffold-only with no further design/wiring | `bash <SKILL_ROOT>/scripts/scaffold.sh <folder-name> "<Brand>"` |
|
|
167
|
+
| Release an existing wix-headless project | from the project dir: `npx @wix/cli@latest build` then `release` (astro); `release` only (custom — no build) |
|
|
168
|
+
| Install a Wix app onto an existing site | Follow `SETUP.md` Step 3 (delegates to the `wix-manage` skill) |
|
|
169
|
+
| Add a feature / restyle a prior wix-headless run | Resume on disk; ask whether to start fresh |
|
|
396
170
|
|
|
397
|
-
|
|
398
|
-
- **Dashboard URL** — `https://manage.wix.com/dashboard/<siteId>` where `<siteId>` comes from `wix.config.json`.
|
|
171
|
+
> Read individual `.md` files under `references/verticals/`; `Read` on the directory returns `EISDIR`.
|
|
399
172
|
|
|
400
|
-
|
|
173
|
+
## The run
|
|
401
174
|
|
|
402
|
-
|
|
175
|
+
The whole run — Discovery → Setup → design-system bridge → Seed → the build wave (merged Components + Pages per vertical) → Build → Release, with every dispatch, handle, wait, and transition — is owned by the conductor: **`references/PLAN.md`** (pre-approval) then **`references/BUILD.md`** (post-approval). Open `PLAN.md` to start a run. This file does not duplicate the sequence.
|
|
403
176
|
|
|
404
|
-
|
|
177
|
+
Wall-time targets: discovery ≤ 80 s (excl. user think-time); setup foreground ≤ 25 s; seed longest pole ≤ 120 s. Full-build target: ≤ 600 s prompt-to-live-URL when all phases run.
|
|
405
178
|
|
|
406
179
|
## Verticals
|
|
407
180
|
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
Current verticals:
|
|
411
|
-
- `stores.md` — product catalog (requires `ecom`, `gift-cards`)
|
|
412
|
-
- `ecom.md` — vertical-agnostic cart/checkout (co-loaded via `requires`)
|
|
413
|
-
- `gift-cards.md` — passive pack: ships in storefront sites; lights up only when the dashboard's Wix Gift Card app is enabled
|
|
414
|
-
- `cms.md` — About/FAQ + use-case recipes (always loaded)
|
|
415
|
-
- `blog.md` — blog posts with Ricos rich content, RSS/sitemap
|
|
416
|
-
- `forms.md` — contact, lead, signup forms with CRM integration
|
|
417
|
-
|
|
418
|
-
`requires:` resolution: when a pack is loaded via discovery, every name in its `requires:` is also loaded transitively. Current chain: `stores → [ecom, gift-cards]` and `gift-cards → [ecom]`.
|
|
419
|
-
|
|
420
|
-
Schema: `references/verticals/_schema.md` (human-readable) and `_schema.json` (machine-validated at session start). Adding a vertical: create `references/verticals/<name>.md`, `references/<name>/INSTRUCTIONS.md`, and any per-vertical references / templates. No changes to this skill file are needed.
|
|
421
|
-
|
|
422
|
-
## Agent Return Contract
|
|
423
|
-
|
|
424
|
-
Agents return structured data in their completion message, not via sidecar files. The skill parses return JSON and merges seeders' `data` blocks into `.wix/site.json.seeded.<vertical>`. At end of run, the skill writes `.wix/run.json` — a single observability record. See `references/shared/RETURN_CONTRACT.md` for schema and aggregation rules.
|
|
425
|
-
|
|
426
|
-
## References
|
|
181
|
+
Pack frontmatter in `references/verticals/` is **discovery-only**. Post-seed work uses `INSTRUCTIONS.md` + templates under each vertical directory.
|
|
427
182
|
|
|
428
|
-
|
|
429
|
-
- `references/DISCOVERY.md` — discovery flow, plan format, aesthetic direction crafting
|
|
430
|
-
- `references/SETUP.md` — MCP prefix, app install, env pull, npm install recovery
|
|
431
|
-
- `references/ORCHESTRATION.md` — phase-dispatch mechanics, wait conditions, data carry-forward
|
|
432
|
-
- `references/verticals/_schema.md` — vertical pack schema
|
|
183
|
+
Upstream: `@skills/wix-manage` (seed + app install recipes).
|
|
433
184
|
|
|
434
|
-
|
|
435
|
-
- `references/shared/RETURN_CONTRACT.md` — agent return JSON schema, run.json aggregation
|
|
436
|
-
- `references/shared/MCP_PREFIX.md` — prefix discovery + recovery
|
|
437
|
-
- `references/shared/IMAGE_GENERATION.md` — image agent contract
|
|
438
|
-
- `references/shared/STYLING.md` — three styling categories, ownership, decision rules
|
|
439
|
-
- `references/shared/IMPLEMENTER.md` — shared implementer behavior
|
|
440
|
-
- `references/shared/PRODUCTION_SHARP_EDGES.md` — release retries, reserved root paths, SEO files, favicons, verification
|
|
185
|
+
Current packs: `stores`, `ecom`, `gift-cards`, `cms`, `blog`, `forms`, `bookings`. Schema: `references/verticals/_schema.md` + `_schema.json`.
|