@wix/agent-skills 1.7.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 +3 -7
- package/package.json +1 -1
- package/skills/wix-app/SKILL.md +2 -0
- package/skills/wix-app/references/STORES_VERSIONING.md +1 -0
- package/skills/wix-design-system/SKILL.md +4 -0
- package/skills/wix-headless/SKILL.md +55 -32
- 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 +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 +337 -0
- package/skills/wix-headless/references/astro/bookings/SERVICES_PAGES.md +428 -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 +50 -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 +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/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/INSTRUCTIONS.md +106 -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 +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 +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 +41 -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 +1 -1
- package/skills/wix-manage/references/blog/how-to-create-blog-posts.md +1 -1
- package/skills/wix-manage/references/cms/cms-data-items-crud.md +1 -1
- package/skills/wix-manage/references/cms/cms-references-and-relationships.md +1 -1
- package/skills/wix-manage/references/cms/cms-schema-management.md +1 -1
- 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/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
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
Coordination between agents uses **in-memory structured returns**, not sidecar files (`.wix/logs/*.md`, `.wix/seed-returns/*.json`, `.wix/image-urls.md`). Every agent returns a JSON block at the end of its completion message; the skill parses these returns directly from session context.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
The orchestrator consumes each return directly from context; nothing is aggregated to disk. The one end-of-run file is the project-root `AGENTS.md` (see `references/shared/AGENTS_MD.md`) — content about the site, not telemetry.
|
|
6
|
+
|
|
7
|
+
This document is the **universal envelope** every agent shares: the rules, the JSON skeleton, status semantics, and the generic failure shape. **The phase-specific `data` shape you must emit does NOT live here — it lives in your own role doc** (the one your scope already reads). See the index at the bottom.
|
|
6
8
|
|
|
7
9
|
## The JSON return is your sole output channel
|
|
8
10
|
|
|
@@ -28,10 +30,10 @@ Every subagent's final message ends with a fenced JSON block (language tag: `jso
|
|
|
28
30
|
```json
|
|
29
31
|
{
|
|
30
32
|
"status": "complete" | "partial" | "failed",
|
|
31
|
-
"phase": "<phase identifier —
|
|
33
|
+
"phase": "<phase identifier — see your role doc's Returns section for the exact value>",
|
|
32
34
|
"scope": "<scope string from the agent's prompt>",
|
|
33
35
|
"summary": "<one-line description of what was done>",
|
|
34
|
-
"data": { ... phase-specific structured data ... },
|
|
36
|
+
"data": { ... phase-specific structured data — shape defined in your role doc ... },
|
|
35
37
|
"files": ["list", "of", "files", "written", "or", "modified"],
|
|
36
38
|
"errors": [],
|
|
37
39
|
"notes": "<optional — anything the parent skill should know>"
|
|
@@ -43,28 +45,11 @@ The JSON block MUST be the **last** content in the message. The parent skill par
|
|
|
43
45
|
|
|
44
46
|
### Timing is NOT the agent's responsibility
|
|
45
47
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
**Authoritative timing source is the runtime `duration_ms`** captured by the parent skill from task-notifications when the subagent completes. The orchestrator MUST prefer `duration_ms` over any agent-reported timing. If an older agent still emits `started`/`ended`, the orchestrator ignores them.
|
|
49
|
-
|
|
50
|
-
For Bash calls made by the skill itself (scaffold, env-pull, npm-install, app-install), wrap in `date -u` captures:
|
|
51
|
-
|
|
52
|
-
```bash
|
|
53
|
-
STARTED_AT=$(date -u +%Y-%m-%dT%H:%M:%SZ)
|
|
54
|
-
# ... run the command ...
|
|
55
|
-
ENDED_AT=$(date -u +%Y-%m-%dT%H:%M:%SZ)
|
|
56
|
-
# compute seconds and append to run.json
|
|
57
|
-
```
|
|
58
|
-
|
|
59
|
-
No LLM-generated timestamps anywhere in the observability pipeline.
|
|
48
|
+
Agents don't self-report timing or status — the return is just `data`. Emit no `started`/`ended` timestamps; any wall-clock measurement is the harness's job, taken from the session trace.
|
|
60
49
|
|
|
61
|
-
###
|
|
50
|
+
### No trailing prose after the fenced JSON
|
|
62
51
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
> *"All three files are correctly written. Let me verify the key requirements… Everything looks good."*
|
|
66
|
-
|
|
67
|
-
…with no fenced JSON block at the end. The parent skill then has to reconstruct `data.products` etc. from narrative text — fragile, and when Phase 4 relies on pre-seeded data from Phase 1 Seed returns (see `SKILL.md` Step 7), a missing JSON block means Phase 4 agents don't get their pre-seeded data inline and fall back to re-querying the REST API, costing 5–15s each.
|
|
52
|
+
The fenced JSON block must be the **last** content in the message. A trailing sentence — or no block at all — means the parent skill has to reconstruct `data.products` etc. from narrative text. That's fragile, and when a later phase relies on pre-seeded data from earlier returns, a missing block means downstream agents don't get their data inline and fall back to re-querying the REST API, costing 5–15s each.
|
|
68
53
|
|
|
69
54
|
**Correct pattern — end with the fenced block, no trailing prose:**
|
|
70
55
|
|
|
@@ -96,14 +81,6 @@ All files written. Contract classes referenced: productCard, productGrid, option
|
|
|
96
81
|
All three files are correctly written. Let me verify the key requirements are met before returning.
|
|
97
82
|
~~~
|
|
98
83
|
|
|
99
|
-
~~~markdown
|
|
100
|
-
❌ WRONG — no JSON block at all
|
|
101
|
-
|
|
102
|
-
All three files are correctly written. The ProductPurchase island uses contract classes
|
|
103
|
-
throughout, AddToCartButton wires to @wix/ecom, and CartView handles the two-step
|
|
104
|
-
checkout redirect. Build should pass.
|
|
105
|
-
~~~
|
|
106
|
-
|
|
107
84
|
The parent skill looks for the **last** fenced JSON block in the message. A trailing sentence means it's no longer the last content; scanning falls back to heuristics. Just stop writing after the closing ` ``` `.
|
|
108
85
|
|
|
109
86
|
## Status semantics
|
|
@@ -114,205 +91,6 @@ The parent skill looks for the **last** fenced JSON block in the message. A trai
|
|
|
114
91
|
| `partial` | Some work done, some failed — `errors` explains | Decide per-case: retry, work around, or fail the run |
|
|
115
92
|
| `failed` | Nothing usable produced — `errors` explains | Retry with corrective prompt or fail the run |
|
|
116
93
|
|
|
117
|
-
## Phase-specific `data` shapes
|
|
118
|
-
|
|
119
|
-
The skill uses `data` to carry information forward to later phases. Each phase has a known shape.
|
|
120
|
-
|
|
121
|
-
### Phase 1: stores seed
|
|
122
|
-
|
|
123
|
-
```json
|
|
124
|
-
{
|
|
125
|
-
"status": "complete",
|
|
126
|
-
"phase": "stores-seed",
|
|
127
|
-
"scope": "seed",
|
|
128
|
-
"summary": "Deleted 12 default products; created 3 on-brand products with variants",
|
|
129
|
-
"data": {
|
|
130
|
-
"products": [
|
|
131
|
-
{
|
|
132
|
-
"id": "2d1bce83-...",
|
|
133
|
-
"name": "Tero Dining Table",
|
|
134
|
-
"slug": "tero-dining-table",
|
|
135
|
-
"variantId": "ffc1caa2-...",
|
|
136
|
-
"price": 2890,
|
|
137
|
-
"inventory": 12,
|
|
138
|
-
"sku": "TAB-TERO-OAK"
|
|
139
|
-
}
|
|
140
|
-
],
|
|
141
|
-
"deletedCount": 12,
|
|
142
|
-
"createdCount": 3
|
|
143
|
-
},
|
|
144
|
-
"files": [],
|
|
145
|
-
"errors": []
|
|
146
|
-
}
|
|
147
|
-
```
|
|
148
|
-
|
|
149
|
-
Phase 4 agents consume `data.products[*].slug` and `data.products[*].variantId` to wire live SDK queries.
|
|
150
|
-
|
|
151
|
-
### Phase 1: CMS seed
|
|
152
|
-
|
|
153
|
-
```json
|
|
154
|
-
{
|
|
155
|
-
"status": "complete",
|
|
156
|
-
"phase": "cms-seed",
|
|
157
|
-
"scope": "seed",
|
|
158
|
-
"data": {
|
|
159
|
-
"collections": [
|
|
160
|
-
{
|
|
161
|
-
"name": "about-content",
|
|
162
|
-
"itemIds": ["665f3363-..."],
|
|
163
|
-
"fields": ["heading", "body", "image"]
|
|
164
|
-
},
|
|
165
|
-
{
|
|
166
|
-
"name": "faq",
|
|
167
|
-
"itemIds": ["abc", "def", "ghi", "jkl", "mno", "pqr"],
|
|
168
|
-
"fields": ["question", "answer", "sortOrder"]
|
|
169
|
-
}
|
|
170
|
-
]
|
|
171
|
-
}
|
|
172
|
-
}
|
|
173
|
-
```
|
|
174
|
-
|
|
175
|
-
Phase 4 CMS page agents reference these collection names; the image agent attaches entity images to CMS items by ID.
|
|
176
|
-
|
|
177
|
-
### Phase 2: shared wiring
|
|
178
|
-
|
|
179
|
-
```json
|
|
180
|
-
{
|
|
181
|
-
"status": "complete",
|
|
182
|
-
"phase": "stores-components",
|
|
183
|
-
"scope": "components",
|
|
184
|
-
"summary": "Wrote React islands + utils; wired analytics; contract classes referenced: 7",
|
|
185
|
-
"data": {
|
|
186
|
-
"islands": ["ProductPurchase.tsx", "CartView.tsx", "AddToCartButton.tsx", "CartBadge.tsx"],
|
|
187
|
-
"utils": ["wix-image.ts", "analytics.ts"],
|
|
188
|
-
"astroComponents": ["SeoTags.astro"]
|
|
189
|
-
},
|
|
190
|
-
"files": [
|
|
191
|
-
"src/utils/wix-image.ts",
|
|
192
|
-
"src/utils/analytics.ts",
|
|
193
|
-
"src/components/SeoTags.astro",
|
|
194
|
-
"src/components/AddToCartButton.tsx",
|
|
195
|
-
"src/components/CartBadge.tsx",
|
|
196
|
-
"src/components/ProductPurchase.tsx",
|
|
197
|
-
"src/components/CartView.tsx"
|
|
198
|
-
]
|
|
199
|
-
}
|
|
200
|
-
```
|
|
201
|
-
|
|
202
|
-
### Phase 2: page rewrites
|
|
203
|
-
|
|
204
|
-
```json
|
|
205
|
-
{
|
|
206
|
-
"status": "complete",
|
|
207
|
-
"phase": "stores-pages-products",
|
|
208
|
-
"scope": "pages-products",
|
|
209
|
-
"data": {
|
|
210
|
-
"pagesWired": 2,
|
|
211
|
-
"wixMetadataExported": true,
|
|
212
|
-
"seoTagsMounted": true,
|
|
213
|
-
"analyticsEvents": ["AddProductImpression", "ClickProduct", "ViewContent"]
|
|
214
|
-
},
|
|
215
|
-
"files": [
|
|
216
|
-
"src/pages/products/index.astro",
|
|
217
|
-
"src/pages/products/[slug].astro",
|
|
218
|
-
"src/components/ProductCard.astro"
|
|
219
|
-
]
|
|
220
|
-
}
|
|
221
|
-
```
|
|
222
|
-
|
|
223
|
-
### Designer foundation
|
|
224
|
-
|
|
225
|
-
```json
|
|
226
|
-
{
|
|
227
|
-
"status": "complete",
|
|
228
|
-
"phase": "design-system",
|
|
229
|
-
"data": {
|
|
230
|
-
"contractKeys": 19,
|
|
231
|
-
"cssLines": 247,
|
|
232
|
-
"fonts": ["Cormorant Garamond", "DM Sans"],
|
|
233
|
-
"palette": {"cream": "#FFF8F0", "charcoal": "#1A1A1A", "roseGold": "#B76E79"}
|
|
234
|
-
},
|
|
235
|
-
"files": [
|
|
236
|
-
"src/styles/global.css",
|
|
237
|
-
"src/layouts/Layout.astro",
|
|
238
|
-
"src/components/Navigation.astro",
|
|
239
|
-
"src/components/Footer.astro",
|
|
240
|
-
".wix/design-tokens.css"
|
|
241
|
-
]
|
|
242
|
-
}
|
|
243
|
-
```
|
|
244
|
-
|
|
245
|
-
### Designer page groups
|
|
246
|
-
|
|
247
|
-
```json
|
|
248
|
-
{
|
|
249
|
-
"status": "complete",
|
|
250
|
-
"phase": "designer-store-pages",
|
|
251
|
-
"data": {
|
|
252
|
-
"pagesDesigned": ["/products", "/products/[slug]", "/cart", "/thank-you"],
|
|
253
|
-
"placeholderDataUsed": true,
|
|
254
|
-
"contractClassesHonored": 11
|
|
255
|
-
},
|
|
256
|
-
"files": [
|
|
257
|
-
"src/pages/products/index.astro",
|
|
258
|
-
"src/pages/products/[slug].astro",
|
|
259
|
-
"src/pages/cart.astro",
|
|
260
|
-
"src/pages/thank-you.astro",
|
|
261
|
-
"src/components/ProductCard.astro",
|
|
262
|
-
"src/components/ProductPurchase.astro",
|
|
263
|
-
"src/components/CartView.astro"
|
|
264
|
-
]
|
|
265
|
-
}
|
|
266
|
-
```
|
|
267
|
-
|
|
268
|
-
### Images (split into two image phases, dispatched separately)
|
|
269
|
-
|
|
270
|
-
The image agent runs in two scopes dispatched by the parent in different steps. Each emits its own return block.
|
|
271
|
-
|
|
272
|
-
**`image-phase-1-decorative` — dispatched in `SEED.md` Step 2 Wave 3 batch (no dependencies):**
|
|
273
|
-
|
|
274
|
-
```json
|
|
275
|
-
{
|
|
276
|
-
"status": "complete",
|
|
277
|
-
"phase": "image-phase-1-decorative",
|
|
278
|
-
"scope": "image-phase-1-decorative",
|
|
279
|
-
"summary": "Generated 3 decorative images; uploaded to Wix Media; returned slot→URL map",
|
|
280
|
-
"data": {
|
|
281
|
-
"decorativeCount": 3,
|
|
282
|
-
"purposes": ["hero", "about", "background"],
|
|
283
|
-
"slots": {
|
|
284
|
-
"hero": "https://static.wixstatic.com/media/...",
|
|
285
|
-
"about": "https://static.wixstatic.com/media/...",
|
|
286
|
-
"background": "https://static.wixstatic.com/media/..."
|
|
287
|
-
},
|
|
288
|
-
"model": "google:4@2",
|
|
289
|
-
"totalCredits": 0.297
|
|
290
|
-
},
|
|
291
|
-
"files": [],
|
|
292
|
-
"errors": []
|
|
293
|
-
}
|
|
294
|
-
```
|
|
295
|
-
|
|
296
|
-
**`image-phase-2-entity` — dispatched in Step 7 (Phase 1 Seed return data inline in prompt):**
|
|
297
|
-
|
|
298
|
-
```json
|
|
299
|
-
{
|
|
300
|
-
"status": "complete",
|
|
301
|
-
"phase": "image-phase-2-entity",
|
|
302
|
-
"scope": "image-phase-2-entity",
|
|
303
|
-
"summary": "Generated + attached images for 6 products and 1 CMS item",
|
|
304
|
-
"data": {
|
|
305
|
-
"entityCount": { "products": 6, "cmsAboutContent": 1, "blogPosts": 0 },
|
|
306
|
-
"model": "google:4@2",
|
|
307
|
-
"totalCredits": 0.693
|
|
308
|
-
},
|
|
309
|
-
"files": [],
|
|
310
|
-
"errors": []
|
|
311
|
-
}
|
|
312
|
-
```
|
|
313
|
-
|
|
314
|
-
(Image agent writes to Wix Media via REST, not to project files — Image Phase 2 `files` is empty.)
|
|
315
|
-
|
|
316
94
|
## Failure returns
|
|
317
95
|
|
|
318
96
|
On `failed` or `partial`, `errors` is populated and `data` may still contain partial results:
|
|
@@ -335,98 +113,31 @@ On `failed` or `partial`, `errors` is populated and `data` may still contain par
|
|
|
335
113
|
|
|
336
114
|
Severity levels: `warning` (keep running), `error` (parent should retry), `fatal` (parent must stop).
|
|
337
115
|
|
|
338
|
-
##
|
|
339
|
-
|
|
340
|
-
The skill aggregates every agent return into one file.
|
|
341
|
-
|
|
342
|
-
**Timing is required** — the `run` object MUST include `started`, `ended`, and `totalSeconds`, and every entry in `phases` MUST include `seconds`. All timing values are captured by the parent skill (from runtime `duration_ms` for subagents, from `date -u` wraps for its own Bash calls) — agents do not self-report. If timing is missing for any phase, record `seconds: null` + `errors: [{code: "MISSING_TIMING"}]` and investigate what broke capture. See `skills/wix-headless/SKILL.md` § "Timing — required in run.json" for the capture protocol.
|
|
343
|
-
|
|
344
|
-
Example:
|
|
345
|
-
|
|
346
|
-
```json
|
|
347
|
-
{
|
|
348
|
-
"version": "1.0",
|
|
349
|
-
"run": {
|
|
350
|
-
"started": "2026-01-15T09:16:14Z",
|
|
351
|
-
"ended": "2026-01-15T09:28:03Z",
|
|
352
|
-
"totalSeconds": 709,
|
|
353
|
-
"brand": "Acme Coffee",
|
|
354
|
-
"prompt": "I want to sell tables online",
|
|
355
|
-
"verticals": ["stores", "cms"],
|
|
356
|
-
"packs": ["stores", "cms"]
|
|
357
|
-
},
|
|
358
|
-
"outcome": {
|
|
359
|
-
"build": "success",
|
|
360
|
-
"previewUrl": "https://goj5lj-tabula-...-alexp775.wix-host.com",
|
|
361
|
-
"dashboardUrl": "https://manage.wix.com/dashboard/<siteId>"
|
|
362
|
-
},
|
|
363
|
-
"phases": [
|
|
364
|
-
{ "phase": "scaffold", "status": "complete", "seconds": 45 },
|
|
365
|
-
{ "phase": "app-install-stores", "status": "complete", "seconds": 6 },
|
|
366
|
-
{ "phase": "env-pull", "status": "complete", "seconds": 4 },
|
|
367
|
-
{ "phase": "npm-install", "status": "complete", "seconds": 42, "packageCount": 725 },
|
|
368
|
-
{ "phase": "stores-seed", "status": "complete", "seconds": 112, "data": { ... } },
|
|
369
|
-
{ "phase": "cms-seed", "status": "complete", "seconds": 98, "data": { ... } },
|
|
370
|
-
{ "phase": "stores-components", "status": "complete", "seconds": 134, "data": { ... } },
|
|
371
|
-
{ "phase": "design-system", "status": "complete", "seconds": 165, "data": { ... } },
|
|
372
|
-
{ "phase": "designer-home", "status": "complete", "seconds": 287, "data": { ... } },
|
|
373
|
-
{ "phase": "designer-static", "status": "complete", "seconds": 265, "data": { ... } },
|
|
374
|
-
{ "phase": "designer-store-pages", "status": "complete", "seconds": 298, "data": { ... } },
|
|
375
|
-
{ "phase": "stores-pages-products", "status": "complete", "seconds": 89, "data": { ... } },
|
|
376
|
-
{ "phase": "stores-pages-cart-checkout", "status": "complete", "seconds": 67, "data": { ... } },
|
|
377
|
-
{ "phase": "stores-pages-home-and-nav", "status": "complete", "seconds": 54, "data": { ... } },
|
|
378
|
-
{ "phase": "pages", "status": "complete", "seconds": 78, "data": { ... } },
|
|
379
|
-
{ "phase": "image-phase-1-decorative", "status": "complete", "seconds": 112, "data": { "decorativeCount": 3, ... } },
|
|
380
|
-
{ "phase": "image-phase-2-entity", "status": "complete", "seconds": 287, "data": { "entityCount": { "products": 6, "cmsAboutContent": 1 }, ... } },
|
|
381
|
-
{ "phase": "build", "status": "complete", "seconds": 9 },
|
|
382
|
-
{ "phase": "preview", "status": "complete", "seconds": 21 }
|
|
383
|
-
],
|
|
384
|
-
"notes": []
|
|
385
|
-
}
|
|
386
|
-
```
|
|
387
|
-
|
|
388
|
-
Observations post-run (including this doc's example):
|
|
389
|
-
- Total serial wall time ≈ max parallel paths, not sum of seconds
|
|
390
|
-
- `data` blocks preserve what each agent returned — recoverable without re-reading agent transcripts
|
|
391
|
-
- `files` lists omitted from aggregate; query individual phase `data` if needed
|
|
392
|
-
|
|
393
|
-
## Common failure modes
|
|
394
|
-
|
|
395
|
-
Agents should check their output for these before returning `complete`:
|
|
396
|
-
|
|
397
|
-
### Astro/React
|
|
398
|
-
|
|
399
|
-
| Failure | How to detect | Fix |
|
|
400
|
-
|---------|---------------|-----|
|
|
401
|
-
| HTML-style comments in `.astro` frontmatter | `grep '<!--' *.astro frontmatter` | Use `//` or `/* */` — frontmatter is TypeScript |
|
|
402
|
-
| Missing `wixMetadata` on `/products/[slug]` | Check exports | Add the metadata export — required for Wix platform indexing |
|
|
403
|
-
| `import { products }` instead of `productsV3` | `grep 'from "@wix/stores"' -- import line` | V1 silently returns 0 on V3 catalogs |
|
|
404
|
-
| Missing `variantId` in cart operations | Check `catalogReference.options` | Always include — single-variant products have one |
|
|
405
|
-
| 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 |
|
|
406
|
-
|
|
407
|
-
### REST API
|
|
116
|
+
## Where your phase-specific `data` shape lives
|
|
408
117
|
|
|
409
|
-
|
|
410
|
-
|---------|---------------|-----|
|
|
411
|
-
| `UNSUPPORTED_FORM_NAMESPACE` after app install | Error on first REST call post-install | Wait 10s, retry up to 3x (namespace propagation) |
|
|
412
|
-
| `curl` with stringified `body` | Endpoint rejects the call shape | Pass `body` as a real JSON object via `-d` (not a stringified blob). See `AUTHENTICATION.md` for the standard REST headers. |
|
|
413
|
-
| 401/403 on Wix REST call | Expired or wrong token | Re-mint per `AUTHENTICATION.md` recovery ladder; one retry then surface body |
|
|
118
|
+
The envelope above is universal. The exact `data` shape — plus the known `error.code` values and required `files` — lives in **your role doc**, the one your scope already reads. Do not look for them here; read your own doc. This keeps each shape single-sourced (no drift) and means you never load shapes for phases you don't emit.
|
|
414
119
|
|
|
415
|
-
|
|
120
|
+
| Your agent / scope | `phase` value(s) | Shape lives in |
|
|
121
|
+
|---|---|---|
|
|
122
|
+
| Seed — stores | `stores-seed` | `references/stores/INSTRUCTIONS.md` § Seed return |
|
|
123
|
+
| Seed — CMS | `cms-seed` | `references/cms/INSTRUCTIONS.md` § Seed return |
|
|
124
|
+
| Seed — other verticals | `<pack>-seed` | per-vertical `INSTRUCTIONS.md` (same generic shape as stores) |
|
|
125
|
+
| Components | `<pack>-components` | `references/shared/IMPLEMENTER.md` § Return contract |
|
|
126
|
+
| Pages | `<pack>-pages[-<group>]` | `references/shared/IMPLEMENTER.md` § Return contract |
|
|
127
|
+
| Design System Designer | `design-system` | `references/DESIGN_SYSTEM.md` § What you write and return |
|
|
128
|
+
| Design System Composer (`scripts/compose.mjs`, not a subagent — manifest printed to stdout) | `compose` | `scripts/compose.mjs` header (the manifest shape) |
|
|
129
|
+
| Page Designer | `designer-<scope>` | `references/astro/designer/INSTRUCTIONS.md` (per-scope) |
|
|
130
|
+
| Images | `image-phase-1-decorative`, `image-phase-2-entity` | `references/images/INSTRUCTIONS.md` § Return Contract |
|
|
416
131
|
|
|
417
|
-
|
|
418
|
-
|---------|---------------|-----|
|
|
419
|
-
| `Legacy HTML single-line comments` | `npx @wix/cli@latest build` stderr | See Astro/React row 1 above — Phase 2 agent emitted HTML comments |
|
|
420
|
-
| `Missing environment variable WIX_CLIENT_ID` | Build stderr | Run `npx @wix/cli@latest env pull --json` then retry |
|
|
421
|
-
| `Cannot find module '@wix/…'` | Build stderr | npm install didn't include that package; check pack's `packages` list |
|
|
132
|
+
The **orchestrator** is the one audience that needs every shape — it parses each return directly; there is no aggregated file. This table is its index.
|
|
422
133
|
|
|
423
134
|
## Notes for agent authors
|
|
424
135
|
|
|
425
|
-
When writing a new agent,
|
|
136
|
+
When writing a new agent, put a **Returns** section in its role doc (`INSTRUCTIONS.md` or equivalent) listing:
|
|
426
137
|
|
|
427
138
|
1. The `phase` identifier this agent emits
|
|
428
139
|
2. The exact `data` shape for successful returns
|
|
429
140
|
3. Known `error.code` values
|
|
430
141
|
4. Required `files` entries
|
|
431
142
|
|
|
432
|
-
|
|
143
|
+
Then add a row to the index table above so the orchestrator can find it. Do **not** copy the shape back into this file — one source per shape. Produce the JSON return block deterministically; don't let creative prose overrun the fenced block. Parent skill parsing assumes the JSON is well-formed and complete and is the **last** content in the message.
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
# Styling — Three Categories, One Default
|
|
2
2
|
|
|
3
|
-
Every visual decision in a generated site falls into one of three categories. Each has a single owner and a single home. This file is the canonical reference; `DESIGN_SYSTEM.md` (Designer), `
|
|
3
|
+
Every visual decision in a generated site falls into one of three categories. Each has a single owner and a single home. This file is the canonical reference; `DESIGN_SYSTEM.md` (Designer), `scripts/compose.mjs` (Composer — deterministic script, self-documenting), `astro/designer/INSTRUCTIONS.md` (Phase 4 page designers), and `IMPLEMENTER.md` link here.
|
|
4
4
|
|
|
5
|
-
> **Design-system ownership (the design-vs-application split).** The **Designer** (`DESIGN_SYSTEM.md`) owns the token *values* and their *completeness* — a coherent, complete brand visual
|
|
5
|
+
> **Design-system ownership (the design-vs-application split).** The **Designer** (`DESIGN_SYSTEM.md`) owns the token *values* and their *completeness* — a coherent, complete brand visual authored as a **DESIGN.md** (`data.design`; format spec in `shared/DESIGN_MD.md`). The **Composer** (`scripts/compose.mjs`; self-documenting) owns the *application* — it writes the `@theme` block in `global.css` from those values (mapping each semantic role to a `--var` name) and guarantees the required-token contract below resolves. Component and page authors still compose those tokens as Tailwind utilities at their call sites. So: Designer picks "paper = `#FAF6EF`"; Composer writes `--color-paper: #FAF6EF` into `@theme`; a page writes `class="bg-paper"`.
|
|
6
6
|
|
|
7
7
|
## The three categories
|
|
8
8
|
|
|
9
9
|
| Category | Lives in | Owned by | Use for |
|
|
10
10
|
|---|---|---|---|
|
|
11
|
-
| **Tokens (composed as utilities)** | `@theme` block in `src/styles/global.css
|
|
11
|
+
| **Tokens (composed as utilities)** | the canonical `DESIGN.md` + its projections: the `@theme` block in `src/styles/global.css` (written by `scripts/compose.mjs`), plus `.wix/design-tokens.css` and `.wix/site.d.ts` (written by `scripts/emit-design-tokens.mjs`) — all from Designer's `DESIGN.md` | Designer picks values (Phase 2); `compose.mjs` writes `@theme` | All color, spacing, typography scale, radii, aspect ratios, shadows, transitions. Pages compose tokens at call sites as Tailwind utilities — `class="py-4xl bg-sand aspect-[16/5]"`. |
|
|
12
12
|
| **Global semantic classes** | `src/styles/global.css` (outside `@theme`) and `src/styles/components-<pack>.css` | Designer + Phase 3 component agents | Compound multi-element patterns, interactive states (`:hover`, `:focus`, `:disabled`), and JS/React DOM query targets. |
|
|
13
13
|
| **Co-located styles** | `<style>` block at the bottom of the same `.astro` file (or component CSS module for islands) | Page or component author | One-off page decoration: hero stamps, custom dividers, ornamental overlays that won't be reused elsewhere. |
|
|
14
14
|
|
|
@@ -16,7 +16,7 @@ Every visual decision in a generated site falls into one of three categories. Ea
|
|
|
16
16
|
|
|
17
17
|
**Tokens-as-utilities is the default.** When you're about to write a class for layout, spacing, typography, alignment, simple background/text color, or aspect ratio, write Tailwind utilities derived from `@theme` instead. The site's design tokens give you `py-4xl`, `gap-sm`, `bg-paper-warm`, `text-ink`, `font-display`, `aspect-[16/5]` etc. Compose them in markup; do not invent semantic classes for these concerns.
|
|
18
18
|
|
|
19
|
-
The token namespace is the contract. The
|
|
19
|
+
The token namespace is the contract. The design tokens (the DESIGN.md token vocabulary — `colors`/`typography`/`spacing`/`rounded`/`containers`) live on disk at `.wix/design-tokens.css` (gate-verified present before the build wave) — **read that file at the start of any pages or components scope** to know which tokens this run published. The orchestrator does **not** inline them in your prompt. (`.wix/site.d.ts` is also on disk for the build.) If a token you need isn't in `.wix/design-tokens.css`, that's a designer-side gap — flag it in your return JSON, don't paper over it with a custom class.
|
|
20
20
|
|
|
21
21
|
## Decision tree
|
|
22
22
|
|
|
@@ -53,7 +53,7 @@ If a designer's `global.css` contains rules like `.featured-section { padding-bl
|
|
|
53
53
|
|
|
54
54
|
## Required tokens — the component-CSS template contract
|
|
55
55
|
|
|
56
|
-
The per-pack `components-<pack>.css` templates at `<SKILL_ROOT>/references/astro/templates/<pack>/components-<pack>.css` reference a fixed set of CSS custom properties via `var(--token)` (never `@apply`). Those templates are copied verbatim into the project by the orchestrator at BUILD.md § Step 4.5, so **the Composer's `@theme` block MUST declare every token below** for the build to pass (the Composer maps the Designer's framework-agnostic spec onto these `--var` names, deriving any required role the Designer omitted). If a token is missing, the rule that references it collapses silently and the corresponding component renders unstyled (or worse, half-styled).
|
|
56
|
+
The per-pack `components-<pack>.css` templates at `<SKILL_ROOT>/references/astro/templates/<pack>/components-<pack>.css` reference a fixed set of CSS custom properties via `var(--token)` (never `@apply`). Those templates are copied verbatim into the project by the orchestrator at BUILD-astro.md § Step 4.5, so **the Composer's `@theme` block MUST declare every token below** for the build to pass (the Composer maps the Designer's framework-agnostic spec onto these `--var` names, deriving any required role the Designer omitted). If a token is missing, the rule that references it collapses silently and the corresponding component renders unstyled (or worse, half-styled).
|
|
57
57
|
|
|
58
58
|
| Token | Required? | Fallback in templates | Used by |
|
|
59
59
|
|---|---|---|---|
|
|
@@ -104,25 +104,15 @@ The fix is structural: move component-specific CSS out of `global.css` entirely.
|
|
|
104
104
|
|
|
105
105
|
The Phase 3 components agents already write to `components-<pack>.css` (the file is imported by the designer's `Layout.astro` from the start). This change just makes it the *only* place those classes live — no parallel partial rule in `global.css`.
|
|
106
106
|
|
|
107
|
-
### Why this is structural
|
|
108
|
-
|
|
109
|
-
Tokens + truly cross-cutting patterns (buttons, decorative slots, site shell) are stable across verticals and brands — fine for the designer to own. Component-specific layout and spacing evolves with the component. Putting it next to the component means:
|
|
110
|
-
|
|
111
|
-
- One author per class. No drift.
|
|
112
|
-
- Verticals can ship new component variants without round-tripping the designer.
|
|
113
|
-
- `overflow: hidden` + `border-radius` traps are caught by the same person who set the radius — no second author who has to *know* the radius value.
|
|
114
|
-
|
|
115
107
|
### Pre-return checklist for the Composer
|
|
116
108
|
|
|
117
|
-
|
|
109
|
+
`compose.mjs` writes `global.css` by substituting the `@theme` palette into a pinned skeleton, so this leak is **structurally prevented** — the skeleton declares no `.product-card`/`.cart-summary`-family rules and the script never adds any. The grep below is a maintainer guard for when the skeleton itself is edited; confirm it declares none of these:
|
|
118
110
|
|
|
119
111
|
```
|
|
120
|
-
grep -r --include="*.astro" --include="*.tsx" -lE "class(\\Name)?=.*(\\.|\\b)(product-card|product-grid|product-card-media|product-card-ribbon|product-card-index|offer-callout|cart-summary|cart-total|cart-empty|checkout-btn)\\b" $SKILL_ROOT/templates/*/
|
|
112
|
+
grep -r --include="*.astro" --include="*.tsx" -lE "class(\\Name)?=.*(\\.|\\b)(product-card|product-grid|product-card-media|product-card-ribbon|product-card-index|offer-callout|cart-summary|cart-total|cart-empty|checkout-btn)\\b" $SKILL_ROOT/references/astro/templates/*/
|
|
121
113
|
```
|
|
122
114
|
|
|
123
|
-
For
|
|
124
|
-
|
|
125
|
-
The check is mechanical and bounded — it scans templates, not the live project.
|
|
115
|
+
For any listed class the Composer's `global.css` declares: if a template references it, move the rule to the appropriate `components-<pack>.css` template (or a scoped `<style>` block). Do NOT ship a partial rule in `global.css` that the template "completes".
|
|
126
116
|
|
|
127
117
|
## Co-located styles — the locality default for one-offs
|
|
128
118
|
|
|
@@ -5,7 +5,7 @@ description: "Implements Wix Stores vertical — product catalog, categories, ad
|
|
|
5
5
|
|
|
6
6
|
# Stores Implementer
|
|
7
7
|
|
|
8
|
-
Extends `references/shared/IMPLEMENTER.md`. Read that file first for phase routing, REST auth + doc lookups, prompt-inlined inputs (
|
|
8
|
+
Extends `references/shared/IMPLEMENTER.md`. Read that file first for phase routing, REST auth + doc lookups, prompt-inlined inputs (read only your `.wix/seeded.json` slice), return contract, style conventions, and common failure modes.
|
|
9
9
|
|
|
10
10
|
## Scope routing
|
|
11
11
|
|
|
@@ -13,20 +13,50 @@ Extends `references/shared/IMPLEMENTER.md`. Read that file first for phase routi
|
|
|
13
13
|
|-------|-------|-----------|
|
|
14
14
|
| `seed` | Seed (REST catalog setup — products only; categories are merchant-driven, not seeded) | `./PRODUCT_CATALOG_DATA.md` |
|
|
15
15
|
| `components` | Components (React islands + SeoTags + back-in-stock util — TSX/Astro only, **no CSS**) | `../astro/stores/SHARED_WIRING.md` |
|
|
16
|
-
| ~~`components-css`~~ | **Do not dispatch.** `src/styles/components-stores.css` is copied from `<SKILL_ROOT>/references/astro/templates/stores/components-stores.css` by the orchestrator's pre-Step-4.5 batch (see BUILD.md § Step 4.5). The template uses direct `var(--token)` CSS, so it works against any designer-published vocabulary without per-run rewrites. `COMPONENTS_CSS.md` documents that CSS for reference — there is no `components-css` subagent to dispatch. | — |
|
|
16
|
+
| ~~`components-css`~~ | **Do not dispatch.** `src/styles/components-stores.css` is copied from `<SKILL_ROOT>/references/astro/templates/stores/components-stores.css` by the orchestrator's pre-Step-4.5 batch (see BUILD-astro.md § Step 4.5). The template uses direct `var(--token)` CSS, so it works against any designer-published vocabulary without per-run rewrites. `COMPONENTS_CSS.md` documents that CSS for reference — there is no `components-css` subagent to dispatch. | — |
|
|
17
17
|
| `pages-categories` | Pages (`/category/[slug]` listing + shared CategoryRail + `utils/categories.ts`) | `../astro/stores/CATEGORY_PAGES.md` |
|
|
18
18
|
| `pages-products` | Pages (products listing + detail + ProductCard; mounts the rail written by `pages-categories`) | `../astro/stores/PRODUCT_PAGES.md` |
|
|
19
19
|
| `pages-home-and-nav` | Pages (home-page contribution + Shop submenu in Navigation) | `../astro/stores/HOME_AND_NAV.md` |
|
|
20
20
|
|
|
21
|
-
> **Why `components` is
|
|
21
|
+
> **Why `components` is TSX/Astro-only.** The scoped CSS (`src/styles/components-stores.css`) has no runtime coupling to the TSX components — it's referenced only by class name at build time — so it ships pre-copied from the template by the orchestrator (see § "CSS ownership" below) rather than being written by an agent. The `components` agent gets a smaller reading set and a smaller write list. See `../astro/stores/COMPONENTS_CSS.md` § "What this scope owns".
|
|
22
22
|
|
|
23
23
|
## Files this vertical creates / contributes
|
|
24
24
|
|
|
25
|
-
See
|
|
25
|
+
See the § "Templates" list below for the canonical files each scope reads and adapts.
|
|
26
|
+
|
|
27
|
+
## Seed return
|
|
28
|
+
|
|
29
|
+
The `seed` scope emits this `data` shape in its return JSON (envelope rules in `../shared/RETURN_CONTRACT.md`). Phase 4 page agents consume `data.products[*].slug` and `data.products[*].variantId` to wire live SDK queries.
|
|
30
|
+
|
|
31
|
+
```json
|
|
32
|
+
{
|
|
33
|
+
"status": "complete",
|
|
34
|
+
"phase": "stores-seed",
|
|
35
|
+
"scope": "seed",
|
|
36
|
+
"summary": "Deleted 12 default products; created 3 on-brand products with variants",
|
|
37
|
+
"data": {
|
|
38
|
+
"products": [
|
|
39
|
+
{
|
|
40
|
+
"id": "2d1bce83-...",
|
|
41
|
+
"name": "Tero Dining Table",
|
|
42
|
+
"slug": "tero-dining-table",
|
|
43
|
+
"variantId": "ffc1caa2-...",
|
|
44
|
+
"price": 2890,
|
|
45
|
+
"inventory": 12,
|
|
46
|
+
"sku": "TAB-TERO-OAK"
|
|
47
|
+
}
|
|
48
|
+
],
|
|
49
|
+
"deletedCount": 12,
|
|
50
|
+
"createdCount": 3
|
|
51
|
+
},
|
|
52
|
+
"files": [],
|
|
53
|
+
"errors": []
|
|
54
|
+
}
|
|
55
|
+
```
|
|
26
56
|
|
|
27
57
|
## Pre-return file-existence assertion (all page scopes)
|
|
28
58
|
|
|
29
|
-
Before returning `status: "complete"` from any `pages-*` scope, verify every file
|
|
59
|
+
Before returning `status: "complete"` from any `pages-*` scope, verify every file your scope produces (per the § "Templates" list below) exists on disk. Silently dropping a file (e.g. `[slug].astro` from `pages-products`) reports `complete` to the orchestrator, but every product link 404s at runtime.
|
|
30
60
|
|
|
31
61
|
If a declared file is missing, return `status: "partial"` with `errors: [{ code: "PHASE4_FILE_MISSING", path: "<expected path>" }]` rather than claiming success. The orchestrator's Step 8.0.5 manifest check will also catch this, but an agent-side assertion gives a faster and more precise failure.
|
|
32
62
|
|
|
@@ -40,7 +70,7 @@ Components (`components` scope — TSX/Astro only):
|
|
|
40
70
|
- `<SKILL_ROOT>/references/astro/templates/stores/BackInStockForm.tsx`
|
|
41
71
|
- `<SKILL_ROOT>/references/astro/templates/stores/SeoTags.astro`
|
|
42
72
|
|
|
43
|
-
Components CSS (
|
|
73
|
+
Components CSS (pre-copied by the orchestrator — no agent writes it):
|
|
44
74
|
- `<SKILL_ROOT>/references/astro/templates/stores/components-stores.css`
|
|
45
75
|
|
|
46
76
|
Pages (`pages-products` scope):
|
|
@@ -63,7 +93,7 @@ If you find one of these missing at runtime, that's an orchestrator-side bug —
|
|
|
63
93
|
|
|
64
94
|
## CSS ownership — stores pack
|
|
65
95
|
|
|
66
|
-
Stores-specific component CSS lives in `src/styles/components-stores.css` (
|
|
96
|
+
Stores-specific component CSS lives in `src/styles/components-stores.css` (pre-copied from the template by the orchestrator before Step 4.5 — see the `components` scope-routing note above and `../astro/stores/COMPONENTS_CSS.md`), NOT in the designer's `global.css`. The classes the pack owns:
|
|
67
97
|
|
|
68
98
|
- `.product-card`, `.product-card-media`, `.product-card-ribbon`, `.product-card-index` — the product card itself, including the `overflow: hidden` + `border-radius` clipping context. Whoever writes the `border-radius` here also writes any inner padding required to keep child content inside the rounded edges. Without inner padding, a price `<p>` sits flush against the rounded bottom corner and descenders get clipped. Add `padding-bottom: var(--spacing-md)` on the card plus horizontal padding on each text block when you set the radius. See `references/shared/STYLING.md` § "Component-specific CSS is owned by the component, not the designer".
|
|
69
99
|
- `.product-grid` — the layout that lists product cards. Both `/products` (pages-products scope) and `/category/[slug]` (pages-categories scope) consume it from one place. Include `display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: var(--spacing-xl);` plus the View-Transitions opacity fade for in-flight navigations.
|
|
@@ -73,10 +103,10 @@ The designer's `global.css` declares only tokens, the `.btn` family, decorative
|
|
|
73
103
|
|
|
74
104
|
## Back-in-stock subscribe — components + pages wiring split
|
|
75
105
|
|
|
76
|
-
Back-in-stock is a dashboard-toggleable feature: it ships in every stores build but only lights up when the merchant clicks "Start Collecting Requests" in the Back in Stock dashboard. The implementation is split across the
|
|
106
|
+
Back-in-stock is a dashboard-toggleable feature: it ships in every stores build but only lights up when the merchant clicks "Start Collecting Requests" in the Back in Stock dashboard. The implementation is split across the `components` and `pages-products` scopes the same way every other stores feature is, with its CSS riding along in the pre-copied stylesheet:
|
|
77
107
|
|
|
78
108
|
- **`components` scope** writes the SSR probe (`src/utils/back-in-stock.ts`) and the React form island (`src/components/BackInStockForm.tsx`). See `../astro/stores/BACK_IN_STOCK.md` for the full rules — especially the two app ids (use `1380b703-…` for back-in-stock, NOT the Stores install id `215238eb-…`) and the bare-fields rule (no `itemUrl`, no `image` on the SDK call).
|
|
79
|
-
-
|
|
109
|
+
- **Back-in-stock form CSS** ships in the pre-copied `src/styles/components-stores.css` template — no agent writes it. See `../astro/stores/BACK_IN_STOCK.md` § 3 for the rules it carries.
|
|
80
110
|
- **`pages-products` scope** imports `getBackInStockEnabled` in `[slug].astro`, awaits the probe, and passes `backInStockEnabled` + `priceAmount` to `<ProductPurchase>`. ProductPurchase renders the form in its three OOS branches when the prop is true.
|
|
81
111
|
|
|
82
112
|
If the merchant hasn't enabled "Start Collecting Requests", the probe returns `false`, the prop stays `false`, and the form never mounts — no rebuild needed when the merchant flips the toggle in the dashboard.
|