@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.
- package/README.md +3 -7
- package/package.json +1 -1
- package/skills/wix-app/SKILL.md +2 -0
- package/skills/wix-app/references/EDITOR_REACT_COMPONENT.md +2 -1
- package/skills/wix-app/references/STORES_VERSIONING.md +1 -0
- package/skills/wix-app/references/editor-react-component/ACCESSIBILITY.md +14 -0
- package/skills/wix-app/references/editor-react-component/REACT-GUIDELINES.md +11 -6
- package/skills/wix-app/references/editor-react-component/REACT-PATTERNS.md +3 -17
- package/skills/wix-app/references/editor-react-component/SSR.md +119 -0
- package/skills/wix-design-system/SKILL.md +5 -1
- package/skills/wix-headless/SKILL.md +55 -32
- package/skills/wix-headless/references/BUILD-astro.md +244 -0
- package/skills/wix-headless/references/BUILD-own-build.md +167 -0
- package/skills/wix-headless/references/BUILD.md +50 -252
- package/skills/wix-headless/references/DESIGN_SYSTEM.md +94 -34
- 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 +41 -422
- 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 +37 -27
- package/skills/wix-headless/references/SEED.md +27 -18
- package/skills/wix-headless/references/SETUP.md +32 -213
- package/skills/wix-headless/references/astro/blog/BLOG_PAGES.md +5 -4
- package/skills/wix-headless/references/astro/bookings/COMPONENTS.md +45 -0
- package/skills/wix-headless/references/astro/bookings/SERVICES_PAGES.md +58 -0
- package/skills/wix-headless/references/astro/cms/CMS_FOUNDATIONS.md +5 -5
- package/skills/wix-headless/references/astro/cms/FAQ_KNOWLEDGE_BASE.md +10 -10
- package/skills/wix-headless/references/astro/cms/PORTFOLIO.md +12 -13
- package/skills/wix-headless/references/astro/cms/RESOURCE_LIBRARY.md +10 -12
- package/skills/wix-headless/references/astro/cms/TEAM_DIRECTORY.md +8 -8
- package/skills/wix-headless/references/astro/designer/INSTRUCTIONS.md +47 -27
- package/skills/wix-headless/references/astro/ecom/CART_PAGES.md +7 -8
- package/skills/wix-headless/references/astro/ecom/CART_WIRING.md +5 -5
- package/skills/wix-headless/references/astro/ecom/COMPONENTS_CSS.md +3 -3
- package/skills/wix-headless/references/astro/forms/CONTACT_FORM.md +5 -19
- package/skills/wix-headless/references/astro/gift-cards/COMPONENTS.md +2 -2
- package/skills/wix-headless/references/astro/gift-cards/PAGES.md +1 -1
- package/skills/wix-headless/references/astro/stores/BACK_IN_STOCK.md +6 -6
- package/skills/wix-headless/references/astro/stores/CATEGORY_PAGES.md +4 -4
- package/skills/wix-headless/references/astro/stores/COMPONENTS_CSS.md +3 -3
- package/skills/wix-headless/references/astro/stores/HOME_AND_NAV.md +3 -3
- package/skills/wix-headless/references/astro/stores/PRODUCT_PAGES.md +9 -9
- package/skills/wix-headless/references/astro/stores/SHARED_WIRING.md +5 -4
- package/skills/wix-headless/references/astro/templates/Footer.astro +1 -1
- package/skills/wix-headless/references/astro/templates/Layout.astro +1 -1
- package/skills/wix-headless/references/astro/templates/Navigation.astro +1 -1
- package/skills/wix-headless/references/astro/templates/astro.config.mjs +1 -1
- package/skills/wix-headless/references/astro/templates/bookings/AvailabilityCalendar.tsx +233 -0
- package/skills/wix-headless/references/astro/templates/bookings/BookingForm.tsx +136 -0
- package/skills/wix-headless/references/astro/templates/bookings/SeoTags.astro +25 -0
- package/skills/wix-headless/references/astro/templates/bookings/ServiceBookingFlow.tsx +54 -0
- package/skills/wix-headless/references/astro/templates/bookings/ServiceCard.astro +45 -0
- package/skills/wix-headless/references/astro/templates/bookings/booking-confirmation.astro +49 -0
- package/skills/wix-headless/references/astro/templates/bookings/bookingDriver.ts +245 -0
- package/skills/wix-headless/references/astro/templates/bookings/components-bookings.css +356 -0
- package/skills/wix-headless/references/astro/templates/bookings/services/[slug].astro +133 -0
- package/skills/wix-headless/references/astro/templates/bookings/services/index.astro +73 -0
- package/skills/wix-headless/references/astro/templates/global.css +2 -2
- package/skills/wix-headless/references/astro/templates/index.astro +1 -1
- package/skills/wix-headless/references/blog/BLOG_CONTENT.md +19 -9
- package/skills/wix-headless/references/blog/INSTRUCTIONS.md +3 -3
- package/skills/wix-headless/references/bookings/FLOW.md +185 -0
- package/skills/wix-headless/references/bookings/INSTRUCTIONS.md +90 -0
- package/skills/wix-headless/references/bookings/SERVICES_DATA.md +295 -0
- package/skills/wix-headless/references/cms/CMS_FOUNDATIONS.md +4 -2
- package/skills/wix-headless/references/cms/INSTRUCTIONS.md +27 -1
- 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 +71 -21
- package/skills/wix-headless/references/custom/blog/WIRING.md +52 -0
- package/skills/wix-headless/references/custom/bookings/WIRING.md +146 -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 +5 -5
- package/skills/wix-headless/references/forms/INSTRUCTIONS.md +2 -2
- package/skills/wix-headless/references/gift-cards/INSTRUCTIONS.md +3 -3
- package/skills/wix-headless/references/images/INSTRUCTIONS.md +16 -15
- package/skills/wix-headless/references/seed-recipes.md +2 -2
- package/skills/wix-headless/references/shared/AGENTS_MD.md +47 -0
- package/skills/wix-headless/references/shared/AUTHENTICATION.md +3 -5
- package/skills/wix-headless/references/shared/DESIGN_MD.md +85 -0
- package/skills/wix-headless/references/shared/IMAGE_GENERATION.md +29 -28
- package/skills/wix-headless/references/shared/IMPLEMENTER.md +87 -27
- package/skills/wix-headless/references/shared/PRODUCTION_SHARP_EDGES.md +2 -2
- package/skills/wix-headless/references/shared/RETURN_CONTRACT.md +24 -313
- package/skills/wix-headless/references/shared/STYLING.md +8 -18
- package/skills/wix-headless/references/stores/INSTRUCTIONS.md +39 -9
- package/skills/wix-headless/references/stores/PRODUCT_CATALOG_DATA.md +17 -14
- package/skills/wix-headless/references/verticals/_schema.json +1 -1
- package/skills/wix-headless/references/verticals/_schema.md +3 -3
- package/skills/wix-headless/references/verticals/blog.md +1 -1
- package/skills/wix-headless/references/verticals/bookings.md +39 -0
- package/skills/wix-headless/references/verticals/cms.md +1 -1
- package/skills/wix-headless/references/verticals/ecom.md +2 -2
- package/skills/wix-headless/references/verticals/gift-cards.md +1 -1
- package/skills/wix-headless/references/verticals/stores.md +1 -1
- package/skills/wix-headless/scripts/check-manifest.mjs +143 -6
- package/skills/wix-headless/scripts/compose.mjs +540 -0
- package/skills/wix-headless/scripts/emit-design-tokens.mjs +128 -51
- package/skills/wix-headless/scripts/flatten.sh +61 -0
- package/skills/wix-headless/scripts/generate-images.mjs +242 -0
- package/skills/wix-headless/scripts/scaffold.sh +47 -16
- package/skills/wix-headless/scripts/write-decorative-json.mjs +62 -0
- package/skills/wix-manage/SKILL.md +13 -1
- package/skills/wix-manage/references/app-installation/install-wix-apps.md +3 -27
- package/skills/wix-manage/references/blog/how-to-create-blog-posts.md +1 -1
- package/skills/wix-manage/references/bookings/create-appointment-service.md +266 -0
- package/skills/wix-manage/references/bookings/create-booking-service-from-prompt.md +37 -0
- package/skills/wix-manage/references/bookings/create-class-service.md +245 -0
- package/skills/wix-manage/references/bookings/create-course-service.md +249 -0
- package/skills/wix-manage/references/cms/cms-data-items-crud.md +3 -2
- package/skills/wix-manage/references/cms/cms-references-and-relationships.md +1 -1
- package/skills/wix-manage/references/cms/cms-schema-management.md +2 -2
- package/skills/wix-manage/references/domains/domain-search-and-purchase.md +10 -7
- package/skills/wix-manage/references/forms/create-form.md +49 -1
- package/skills/wix-manage/references/stores/bulk-create-products-with-options.md +1 -1
- package/skills/wix-manage/references/stores/create-product-from-image.md +154 -2
- package/skills/wix-manage/references/stores/setup-online-store-catalog-v3.md +1 -1
- package/skills/wix-headless/references/astro/COMPOSE.md +0 -142
- package/skills/wix-headless/scripts/finalize-run-json.mjs +0 -141
- package/skills/wix-headless/scripts/init-site-json.mjs +0 -101
- package/skills/wix-headless/scripts/preview.sh +0 -45
- package/skills/wix-headless/scripts/release.sh +0 -73
|
@@ -25,7 +25,7 @@ body: [
|
|
|
25
25
|
]
|
|
26
26
|
```
|
|
27
27
|
|
|
28
|
-
|
|
28
|
+
Send `body` as a real JSON array (not a stringified blob). Auth uses the CLI-minted site-scoped token and the standard headers — see `<SKILL_ROOT>/references/shared/AUTHENTICATION.md`.
|
|
29
29
|
|
|
30
30
|
Extract `data[0].imageURL` from the response. This is a short-lived URL — **import to Wix Media immediately** in the same task queue.
|
|
31
31
|
|
|
@@ -44,7 +44,7 @@ Extract `data[0].imageURL` from the response. This is a short-lived URL — **im
|
|
|
44
44
|
|
|
45
45
|
### Allowed Dimensions (safe defaults)
|
|
46
46
|
|
|
47
|
-
Runware enforces a fixed set per model. Start with these
|
|
47
|
+
Runware enforces a fixed set per model. Start with these:
|
|
48
48
|
|
|
49
49
|
| Aspect | Size | Use for |
|
|
50
50
|
|--------|------|---------|
|
|
@@ -58,7 +58,26 @@ If a 400 response lists supported dimensions, use one from that list — do not
|
|
|
58
58
|
|
|
59
59
|
Do NOT send `steps` or `CFGScale` — both are rejected with `unsupportedParameter` and cause a 400. These fields are valid for other Runware models but must be omitted for `google:4@2`.
|
|
60
60
|
|
|
61
|
-
##
|
|
61
|
+
## Preferred: run the whole phase through `generate-images.mjs`
|
|
62
|
+
|
|
63
|
+
Generation + Wix Media import is **embarrassingly parallel** (N independent `generate → import` chains, no cross-image dependency) and **recipe-free** (no entity write-shapes), so it is best run by a deterministic script rather than by hand. `<SKILL_ROOT>/scripts/generate-images.mjs` does exactly this: it fires every image as a **concurrent single-task request in one process** (`Promise.all`), then imports each result to Wix Media — all in parallel — and returns a `key → {url, fileId}` map. Because each task is its **own** request (not N tasks in one body), it sidesteps the `google:4@2` N≥3-in-one-request 504 entirely, and because the parallelism lives in code it cannot degrade into the sequential-turns anti-pattern below.
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
echo '{
|
|
67
|
+
"siteId": "<siteId>",
|
|
68
|
+
"model": "google:4@2",
|
|
69
|
+
"images": [
|
|
70
|
+
{"key": "hero", "positivePrompt": "<prompt>", "width": 1376, "height": 768},
|
|
71
|
+
{"key": "about", "positivePrompt": "<prompt>", "width": 1200, "height": 896}
|
|
72
|
+
]
|
|
73
|
+
}' | WIX_TOKEN="$TOKEN" node <SKILL_ROOT>/scripts/generate-images.mjs
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
`key` is a **slot name** for Phase 1 (`hero`, `about`) or an **entityId** for Phase 2. The returned `slots` map (key→url) pipes straight into `write-decorative-json.mjs` (Phase 1); the `map` (key→{url,fileId}) feeds the entity PATCH/PUT/publish recipe (Phase 2). Pass the **already-minted** site token via `WIX_TOKEN` (mint-once — `AUTHENTICATION.md`); the script mints its own only as a fallback. Per-image failures are isolated (`status: "partial"`), and `x-wix-request-id` is captured per call into `results[]` for trace analysis.
|
|
77
|
+
|
|
78
|
+
The manual `curl` shapes below remain the **reference for the request bodies** the script builds, and the **fallback** when the script can't be used. The "one concurrent batch" rule still applies if you ever hand-drive a phase.
|
|
79
|
+
|
|
80
|
+
## Required (manual fallback): minimize round-trips per image phase
|
|
62
81
|
|
|
63
82
|
The image agent's `image-phase-1-decorative` and `image-phase-2-entity` scopes each generate multiple images. **Do not emit N one-task calls in sequential turns** — sequential dispatch across many turns adds ~30–40 s of inter-message overhead. The correct shape depends on the model:
|
|
64
83
|
|
|
@@ -85,37 +104,19 @@ Assistant message (single turn, multiple tool calls):
|
|
|
85
104
|
REST: POST https://www.wixapis.com/runwareschemaless/v1/request
|
|
86
105
|
```
|
|
87
106
|
|
|
88
|
-
All three fire in parallel (runtime dispatches concurrent siblings concurrently). No 504, no sequential wait. The important constraint is *one concurrent batch* — splitting them across turns loses the parallelism
|
|
89
|
-
|
|
90
|
-
### ANTI-PATTERN (slow, regardless of model)
|
|
91
|
-
|
|
92
|
-
Sequential 1-task calls across multiple turns:
|
|
93
|
-
```
|
|
94
|
-
Assistant msg 1: curl body: [ task1 ]
|
|
95
|
-
(runtime waits)
|
|
96
|
-
Assistant msg 2: curl body: [ task2 ]
|
|
97
|
-
(runtime waits)
|
|
98
|
-
Assistant msg 3: curl body: [ task3 ]
|
|
99
|
-
```
|
|
100
|
-
Each turn adds inter-message overhead. Whether you're using the batched pattern or parallel siblings, **all the image-generation tool calls MUST be in one concurrent batch**.
|
|
107
|
+
All three fire in parallel (runtime dispatches concurrent siblings concurrently). No 504, no sequential wait. The important constraint is *one concurrent batch* — splitting them across turns loses the parallelism: sequential 1-task calls across multiple turns each add inter-message overhead.
|
|
101
108
|
|
|
102
109
|
### Procedure to enforce batching
|
|
103
110
|
|
|
104
|
-
|
|
111
|
+
Whether you batch one request or fire parallel siblings, **all calls in each stage MUST be in one concurrent batch**. Follow these steps in order:
|
|
105
112
|
|
|
106
113
|
1. **Write all prompts first.** In your text response, list every image you will generate with its positivePrompt, dimensions, and a UUID. Do not make any tool calls yet.
|
|
107
|
-
2. **Compose the full body array
|
|
108
|
-
3. **
|
|
109
|
-
4. **Parallel imports.** After the generate response arrives, emit all N `POST /site-media/v1/files/import` calls as
|
|
110
|
-
5. **Parallel PATCHes.** After all imports resolve, emit all N PATCH calls as
|
|
111
|
-
|
|
112
|
-
**Three concurrent batches total (one per stage).** If you find yourself making more, stop and check whether you're serializing.
|
|
113
|
-
|
|
114
|
-
### Media import and entity PATCH — parallelize with siblings
|
|
115
|
-
|
|
116
|
-
Generation is one concurrent batch — whether that's one batched call or N parallel siblings. The follow-up steps (`POST /site-media/v1/files/import` per image, and entity PATCH per product/post/item) are per-entity; those can parallelize via concurrent siblings — emit all N import calls in one concurrent batch, then all N PATCH calls in one concurrent batch. See the skill's `references/PLAN.md` § "Batching discipline" for why sibling batching beats sequential dispatch.
|
|
114
|
+
2. **Compose the generation call(s).** For `bfl:5@1` / `runware:400@1`, one batched call with the full body array; for `google:4@2`, N parallel 1-task sibling calls. Verify the task count matches the entity count.
|
|
115
|
+
3. **Generate.** Fire that generation as one concurrent batch.
|
|
116
|
+
4. **Parallel imports.** After the generate response arrives, emit all N `POST /site-media/v1/files/import` calls as concurrent sibling calls in one concurrent batch.
|
|
117
|
+
5. **Parallel PATCHes.** After all imports resolve, emit all N PATCH calls as concurrent sibling calls in one concurrent batch.
|
|
117
118
|
|
|
118
|
-
**
|
|
119
|
+
**Three concurrent batches total (one per stage).** If you find yourself making more, stop and check whether you're serializing. See the skill's `references/PLAN.md` § "Batching discipline" for why sibling batching beats sequential dispatch.
|
|
119
120
|
|
|
120
121
|
## Step 2: Import to Wix Media
|
|
121
122
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Shared Implementer — Common Behavior for Every Vertical Subagent
|
|
2
2
|
|
|
3
|
-
This file is **extended by every per-vertical `INSTRUCTIONS.md`** (stores, ecom, cms, blog, forms, gift-cards). Per-vertical instruction files are thin — they declare scopes and reference paths. Everything else lives here.
|
|
3
|
+
This file is **extended by every per-vertical `INSTRUCTIONS.md`** (stores, ecom, cms, blog, forms, gift-cards, bookings). Per-vertical instruction files are thin — they declare scopes and reference paths. Everything else lives here.
|
|
4
4
|
|
|
5
5
|
## Self-loading
|
|
6
6
|
|
|
@@ -12,13 +12,15 @@ Read **only** the files your scope needs. The reading set varies by scope:
|
|
|
12
12
|
| `components`, `components-css`, `pages`, `pages-*` | this file, `RETURN_CONTRACT.md`, `STYLING.md` | — |
|
|
13
13
|
| Image scopes | (read `references/images/INSTRUCTIONS.md` § Self-Loading) | — |
|
|
14
14
|
|
|
15
|
-
Then read the specific reference(s) for your declared scope (see your vertical's `INSTRUCTIONS.md` scope table). Do NOT read references for scopes
|
|
15
|
+
Then read the specific reference(s) for your declared scope(s) (see your vertical's `INSTRUCTIONS.md` scope table). Do NOT read references for scopes **not** named in your prompt — wastes context and blurs ownership.
|
|
16
16
|
|
|
17
17
|
## Phase routing
|
|
18
18
|
|
|
19
|
-
Your prompt includes a line
|
|
19
|
+
Your prompt includes a line naming your scope(s). Map **each** scope to its reference set per your vertical's `INSTRUCTIONS.md` scope table. If the scope line is missing, stop and ask the parent — do not guess.
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
**Merged dispatch (the common case — one agent owns components + pages for a vertical).** Your prompt may list **several** scopes — e.g. `Scopes (write in this order): components, pages-products, pages-categories`. This is a single "build" agent for one vertical: read the **union** of those scopes' references and write them in the order given — **islands/components FIRST, then the pages/routes that mount them.** Writing the page before its island leaves a dangling import; the within-agent order is exactly why these were merged into one dispatch (it removes the cross-agent Components→Pages barrier). You still own only the files those scopes declare; do not touch another vertical's files or a shared shell unless your scope list explicitly includes a shell-patching `pages` scope.
|
|
22
|
+
|
|
23
|
+
Standard scope names:
|
|
22
24
|
- `seed` — Seed phase (REST data setup, no frontend code)
|
|
23
25
|
- `components` — Components phase (reusable React/Astro islands, SDK wiring)
|
|
24
26
|
- `pages` — Pages phase (route files with visual design + data queries, single scope per vertical)
|
|
@@ -30,30 +32,30 @@ Scopes that call Wix APIs (`seed`, image phases) receive `siteId` in the prompt.
|
|
|
30
32
|
|
|
31
33
|
If your scope is `components` or `pages`, you should NOT make REST calls — those scopes are frontend-only. If you find yourself needing a site API call, it's a scope violation — return `status: "partial"` with an error note, do not proceed.
|
|
32
34
|
|
|
33
|
-
##
|
|
35
|
+
## Don't depend on mutable shared state (one scoped exception: `.wix/seeded.json`)
|
|
34
36
|
|
|
35
|
-
Every input you need is inlined in your prompt. The orchestrator is
|
|
37
|
+
Every input you need is either inlined in your prompt or — for seeded entity IDs — in **`.wix/seeded.json`**, the one shared file you are allowed to read. The orchestrator holds run state in scratch, not on disk — it is **not** a coordination channel you can read. `.wix/seeded.json` is the one exception: a producer→consumer handoff written **once** at the seed gate, read-only thereafter. Read **only your own `<vertical>` slice**; never write it.
|
|
36
38
|
|
|
37
|
-
**Phase-specific inputs
|
|
39
|
+
**Phase-specific inputs:**
|
|
38
40
|
|
|
39
|
-
| Scope |
|
|
41
|
+
| Scope | Where its inputs come from |
|
|
40
42
|
|---|---|
|
|
41
|
-
| `seed` | `brand`, `intent.<pack>`, `siteId`, recipe path(s). Do NOT re-derive these. |
|
|
42
|
-
| `components` | `brand
|
|
43
|
-
| `pages` / `pages-*` | `brand
|
|
43
|
+
| `seed` | All **inlined**: `brand`, `intent.<pack>`, `siteId`, recipe path(s). Do NOT re-derive these. |
|
|
44
|
+
| `components` | **Inlined**: `brand`. **Read from disk**: the design tokens (the DESIGN.md vocabulary — `colors`/`typography`/`spacing`/`rounded`/`containers`) from `.wix/design-tokens.css` (gate-verified present; also the CSS variables the build consumes). Components do not need seeded IDs. |
|
|
45
|
+
| `pages` / `pages-*` | **Inlined:** `brand`. **Read from disk:** the design tokens (`.wix/design-tokens.css`, DESIGN.md vocabulary); your `seeded.<vertical>` slice from `.wix/seeded.json` (products, posts, collections IDs). Page data wiring uses live SDK queries; the `seeded` data is for path resolution + demo content authoring. |
|
|
44
46
|
|
|
45
|
-
If a required input is missing from your prompt (e.g.
|
|
47
|
+
If a required **inlined** input is missing from your prompt, or your **`.wix/seeded.json` slice** is absent (e.g. you are dispatched as `pages-products` but `.wix/seeded.json` has no `seeded.stores`), fail fast — return `status: "failed"` with `errors: [{ code: "SEEDED_JSON_SLICE_MISSING", missing: "seeded.stores.products" }]` (or `PROMPT_INCOMPLETE` for an inlined gap). Do NOT re-fetch via curl — the gap means an upstream phase didn't complete, and re-querying would mask the real bug.
|
|
46
48
|
|
|
47
|
-
## Seeders return data; orchestrator aggregates
|
|
49
|
+
## Seeders return data; orchestrator aggregates → `.wix/seeded.json`
|
|
48
50
|
|
|
49
|
-
Agents with `Scope: seed` return their seeded entities in the `data` block of the standard return (see `RETURN_CONTRACT.md`). The orchestrator collects every seeder return into its session scratch and
|
|
51
|
+
Agents with `Scope: seed` return their seeded entities in the `data` block of the standard return (see `RETURN_CONTRACT.md`). The orchestrator collects every seeder return into its session scratch and writes the aggregated map **once** to `.wix/seeded.json` at the seed gate; per-vertical Page / wiring agents then read their own slice from that file (no inlined slice). (The single Image Phase 2 dispatch keeps its slice inlined.) You do NOT write `.wix/seeded.json` (the orchestrator is its sole writer), and you do NOT write `.wix/seed-returns/<pack>.json` — your JSON return is the contract.
|
|
50
52
|
|
|
51
53
|
## Writing page files
|
|
52
54
|
|
|
53
55
|
Pages-phase agents write route files (`.astro`) with:
|
|
54
56
|
|
|
55
|
-
1. **Visual design via design tokens and Tailwind.** Reference tokens as `var(--color-
|
|
56
|
-
2. **Data queries against seeded data.**
|
|
57
|
+
1. **Visual design via design tokens and Tailwind.** Reference tokens as `var(--color-accent)` in `<style>` blocks or `bg-[--color-accent]` as Tailwind arbitrary values. Use canonical component templates (`agents/<vertical>/templates/*.astro`) as starting points — adapt, don't invent.
|
|
58
|
+
2. **Data queries against seeded data.** Read the seeded entity IDs / slugs from your `seeded.<vertical>` slice in `.wix/seeded.json` (with the `Read` tool — not by `import`). Pages query the Wix SDK at request time (`await productsV3.queryProducts(...)`) — that's the production-correct pattern. Use the `seeded` data for path generation (e.g. `getStaticPaths` slugs) and for authoring demo content where needed; do NOT `import` `.wix/seeded.json` from page files — it sits outside the bundler root and reading it at author-time (not bundling it) keeps it out of `dist/`.
|
|
57
59
|
3. **Imports from shared components.** Pages import components your Components-phase agent wrote (`src/components/*.tsx`, `.astro`).
|
|
58
60
|
4. **Imports from skill shared utilities.** `from "../utils/wix-image"` and `from "../utils/analytics"` — these are skill-shipped (copied into the project by `seed-utilities.sh` during Setup); do NOT import them from anywhere else.
|
|
59
61
|
|
|
@@ -117,30 +119,88 @@ The full styling contract (tokens-as-utilities default, when global semantic cla
|
|
|
117
119
|
## Style conventions
|
|
118
120
|
|
|
119
121
|
- **camelCase for identifiers, kebab-case for filenames, PascalCase for components.** Example: `ProductCard.astro`, `queryBlogPosts` function, `cart-updated` event.
|
|
120
|
-
- **No inline styles beyond design-token CSS variables.** `style={{ color: "red" }}` is forbidden; `style={{ color: "var(--color-
|
|
121
|
-
- **Tailwind
|
|
122
|
-
- **Tailwind v4 `@reference` is mandatory in any scoped CSS that uses `@apply`.** Tailwind v4 isolates `@apply` per file — utilities defined in the main entry CSS (where `@theme` lives) are NOT visible to `components-*.css` unless that file prepends `@reference "./global.css";` on line 1. Without it, `wix cli build` fails with `Cannot apply unknown utility class 'gap-sm' …`. **`tsc` and `astro check` both pass clean** — only the bundler catches the regression. If your scope writes a `components-<vertical>.css` that uses `@apply` with theme tokens (e.g., `@apply gap-sm font-display text-sm`), the file MUST start with:
|
|
122
|
+
- **No inline styles beyond design-token CSS variables.** `style={{ color: "red" }}` is forbidden; `style={{ color: "var(--color-accent)" }}` is fine.
|
|
123
|
+
- **Tailwind v4 `@reference` is mandatory in any scoped CSS that uses `@apply`.** Tailwind v4 isolates `@apply` per file — utilities defined in the main entry CSS (where `@theme` lives) are NOT visible to `components-*.css` unless that file prepends `@reference "./global.css";` on line 1. If your scope writes a `components-<vertical>.css` that uses `@apply` with theme tokens (e.g., `@apply gap-sm font-display text-sm`), the file MUST start with:
|
|
123
124
|
```css
|
|
124
125
|
@reference "./global.css";
|
|
125
126
|
```
|
|
126
|
-
Without it, the build breaks at release time even though `tsc` and `astro check` pass clean — only the bundler catches it.
|
|
127
|
+
Without it, the build breaks at release time with `Cannot apply unknown utility class 'gap-sm' …` even though `tsc` and `astro check` pass clean — only the bundler catches it.
|
|
127
128
|
- **Fail loud, never silently.** If data is missing, a required field is absent, or an REST call returns an unexpected shape, return `status: "failed"` with details. Do not invent placeholders or swallow errors.
|
|
128
129
|
|
|
129
130
|
## Return contract
|
|
130
131
|
|
|
131
|
-
Every agent ends its message with a fenced JSON block per `RETURN_CONTRACT.md
|
|
132
|
+
Every agent ends its message with a fenced JSON block per `RETURN_CONTRACT.md` (the universal envelope: skeleton, status semantics, no-trailing-prose rule). The JSON MUST be the last content in the message — no trailing prose. Timing fields are NOT included (the orchestrator captures timing via runtime `duration_ms`).
|
|
133
|
+
|
|
134
|
+
The `data` shapes for the scopes this file owns — `components` and `pages`/`pages-*` — are below. (Seed `data` shapes live in your per-vertical `INSTRUCTIONS.md` § Seed return.)
|
|
135
|
+
|
|
136
|
+
**`components` scope** (`phase: "<pack>-components"`):
|
|
137
|
+
|
|
138
|
+
```json
|
|
139
|
+
{
|
|
140
|
+
"status": "complete",
|
|
141
|
+
"phase": "stores-components",
|
|
142
|
+
"scope": "components",
|
|
143
|
+
"summary": "Wrote React islands + utils; wired analytics; contract classes referenced: 7",
|
|
144
|
+
"data": {
|
|
145
|
+
"islands": ["ProductPurchase.tsx", "CartView.tsx", "AddToCartButton.tsx", "CartBadge.tsx"],
|
|
146
|
+
"utils": ["wix-image.ts", "analytics.ts"],
|
|
147
|
+
"astroComponents": ["SeoTags.astro"]
|
|
148
|
+
},
|
|
149
|
+
"files": [
|
|
150
|
+
"src/utils/wix-image.ts",
|
|
151
|
+
"src/utils/analytics.ts",
|
|
152
|
+
"src/components/SeoTags.astro",
|
|
153
|
+
"src/components/AddToCartButton.tsx",
|
|
154
|
+
"src/components/CartBadge.tsx",
|
|
155
|
+
"src/components/ProductPurchase.tsx",
|
|
156
|
+
"src/components/CartView.tsx"
|
|
157
|
+
]
|
|
158
|
+
}
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
**`pages` / `pages-*` scope** (`phase: "<pack>-pages[-<group>]"`):
|
|
162
|
+
|
|
163
|
+
```json
|
|
164
|
+
{
|
|
165
|
+
"status": "complete",
|
|
166
|
+
"phase": "stores-pages-products",
|
|
167
|
+
"scope": "pages-products",
|
|
168
|
+
"data": {
|
|
169
|
+
"pagesWired": 2,
|
|
170
|
+
"wixMetadataExported": true,
|
|
171
|
+
"seoTagsMounted": true,
|
|
172
|
+
"analyticsEvents": ["AddProductImpression", "ClickProduct", "ViewContent"]
|
|
173
|
+
},
|
|
174
|
+
"files": [
|
|
175
|
+
"src/pages/products/index.astro",
|
|
176
|
+
"src/pages/products/[slug].astro",
|
|
177
|
+
"src/components/ProductCard.astro"
|
|
178
|
+
]
|
|
179
|
+
}
|
|
180
|
+
```
|
|
132
181
|
|
|
133
182
|
## Common failure modes
|
|
134
183
|
|
|
135
184
|
| Wrong | Right |
|
|
136
185
|
|---|---|
|
|
137
|
-
| Reading references for scopes
|
|
138
|
-
|
|
|
139
|
-
|
|
|
140
|
-
|
|
|
186
|
+
| Reading references for scopes **not** listed in your prompt | Read only the references for your declared scope(s) — the union when it's a merged build dispatch |
|
|
187
|
+
| Writing a page/route before the island it mounts (merged dispatch) | Write islands/components FIRST, then the pages — in the prompt's scope order |
|
|
188
|
+
| Issuing REST calls from a `components` or `pages` scope | Components/Pages are frontend-only; read `seeded` data from your `.wix/seeded.json` slice (pages only) — never curl |
|
|
189
|
+
| Re-querying when your `seeded.<vertical>` slice is missing from `.wix/seeded.json` | Fail fast with `SEEDED_JSON_SLICE_MISSING` — an upstream phase didn't complete (do NOT re-query) |
|
|
190
|
+
| Depending on mutable shared state the orchestrator holds in scratch | Every input is inlined; the one shared file you may read is your `.wix/seeded.json` slice (read-only) |
|
|
141
191
|
| Inventing class names for layout/spacing/typography (`.productCard`, `.heroSection`) | Tailwind utilities derived from `@theme` tokens (`class="flex flex-col gap-md"`, `class="py-4xl"`). For one-off page decoration, co-located `<style>` block. |
|
|
142
192
|
| Removing a marker after inserting at it | Marker stays; other verticals may contribute after you |
|
|
143
193
|
| Trailing narrative prose after the return JSON | JSON block must be the last content |
|
|
144
194
|
| Fabricated timestamps in the return JSON | Do not include timing fields — orchestrator captures them |
|
|
145
|
-
| Inline `style="color: red"` | Use design tokens: `style="color: var(--color-
|
|
146
|
-
| Creating a new cross-cutting class name | Extract a shared primitive component instead |
|
|
195
|
+
| Inline `style="color: red"` | Use design tokens: `style="color: var(--color-accent)"` |
|
|
196
|
+
| Creating a new cross-cutting class name | Extract a shared primitive component instead |
|
|
197
|
+
|
|
198
|
+
### Astro/React build-blockers — check before returning `complete`
|
|
199
|
+
|
|
200
|
+
| Failure | How to detect | Fix |
|
|
201
|
+
|---------|---------------|-----|
|
|
202
|
+
| HTML-style comments in `.astro` frontmatter | `grep '<!--' *.astro` frontmatter | Use `//` or `/* */` — frontmatter is TypeScript. Surfaces at build as `Legacy HTML single-line comments`. |
|
|
203
|
+
| Missing `wixMetadata` on `/products/[slug]` | Check exports | Add the metadata export — required for Wix platform indexing |
|
|
204
|
+
| `import { products }` instead of `productsV3` | `grep 'from "@wix/stores"'` import line | V1 silently returns 0 on V3 catalogs |
|
|
205
|
+
| Missing `variantId` in cart operations | Check `catalogReference.options` | Always include — single-variant products have one |
|
|
206
|
+
| React island using default Tailwind color class | `grep 'bg-blue-\|bg-green-\|text-red-\|bg-gray-' *.tsx` | Use brand `@theme` utilities (`bg-bark`, `text-cream`) or contract class names |
|
|
@@ -13,7 +13,7 @@ Use this reference when a Wix Headless run touches production release, SEO-contr
|
|
|
13
13
|
- `temporary system error`
|
|
14
14
|
- `try again shortly`
|
|
15
15
|
|
|
16
|
-
The
|
|
16
|
+
The conductor's release step (the shared release tail, `BUILD.md` § "Shared release tail" — `BUILD-astro.md` § "Build & Release" for astro, `BUILD-own-build.md` § "Release" for no-build frameworks) retries these known transient release failures serially — up to 3× with `attempt * 5`s backoff. Do not retry build failures; TypeScript, Astro, missing import, and missing module failures are code issues that must be fixed before another release attempt.
|
|
17
17
|
|
|
18
18
|
For batch releases across many projects, prefer releasing failed sites one by one after the current deployment state settles. Parallel release is useful for throughput, but retry serially when Wix reports state-machine errors.
|
|
19
19
|
|
|
@@ -63,7 +63,7 @@ PUT https://www.wixapis.com/promote-seo-robots-server/v2/llms
|
|
|
63
63
|
}
|
|
64
64
|
```
|
|
65
65
|
|
|
66
|
-
Do not use `default: true` for custom `llms.txt
|
|
66
|
+
Do not use `default: true` for custom `llms.txt` — setting `default: true` returns `404` for custom `llms.txt` content.
|
|
67
67
|
|
|
68
68
|
Wix may mutate `llms.txt` content by:
|
|
69
69
|
|