@wix/agent-skills 1.6.0 → 1.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (154) hide show
  1. package/README.md +2 -2
  2. package/package.json +1 -1
  3. package/skills/wix-app/SKILL.md +49 -42
  4. package/skills/wix-app/references/BACKEND_EVENT.md +10 -65
  5. package/skills/wix-app/references/CUSTOM_ELEMENT_WIDGET.md +101 -406
  6. package/skills/wix-app/references/DASHBOARD_MENU_PLUGIN.md +14 -111
  7. package/skills/wix-app/references/DASHBOARD_MODAL.md +56 -205
  8. package/skills/wix-app/references/DASHBOARD_PAGE.md +19 -98
  9. package/skills/wix-app/references/DASHBOARD_PLUGIN.md +6 -108
  10. package/skills/wix-app/references/DATA_COLLECTION.md +113 -198
  11. package/skills/wix-app/references/EMBEDDED_SCRIPT.md +41 -268
  12. package/skills/wix-app/references/EXTENSION_REGISTRATION.md +27 -76
  13. package/skills/wix-app/references/SERVICE_PLUGIN.md +35 -188
  14. package/skills/wix-app/references/SITE_PLUGIN.md +8 -92
  15. package/skills/wix-app/references/backend-event/COMMON-EVENTS.md +0 -44
  16. package/skills/wix-app/references/custom-element-widget/SETTINGS_PANEL.md +19 -330
  17. package/skills/wix-app/references/dashboard-menu-plugin/bookings-slots.md +0 -12
  18. package/skills/wix-app/references/dashboard-menu-plugin/ecommerce-slots.md +7 -0
  19. package/skills/wix-app/references/dashboard-menu-plugin/restaurants-slots.md +0 -12
  20. package/skills/wix-app/references/dashboard-plugin/SLOTS.md +3 -15
  21. package/skills/wix-app/references/service-plugin/ADDITIONAL-FEES.md +2 -18
  22. package/skills/wix-app/references/service-plugin/BOOKINGS-STAFF-SORTING.md +2 -42
  23. package/skills/wix-app/references/service-plugin/DISCOUNT-TRIGGERS.md +1 -11
  24. package/skills/wix-app/references/service-plugin/GIFT-CARDS.md +1 -11
  25. package/skills/wix-app/references/service-plugin/PAYMENT-SETTINGS.md +2 -40
  26. package/skills/wix-app/references/service-plugin/SHIPPING-RATES.md +2 -19
  27. package/skills/wix-app/references/service-plugin/VALIDATIONS.md +2 -18
  28. package/skills/wix-app/references/site-plugin/SLOTS.md +17 -68
  29. package/skills/wix-headless/SKILL.md +111 -389
  30. package/skills/wix-headless/references/BUILD.md +307 -0
  31. package/skills/wix-headless/references/DESIGN_SYSTEM.md +115 -0
  32. package/skills/wix-headless/references/DISCOVERY.md +237 -112
  33. package/skills/wix-headless/references/PLAN.md +82 -0
  34. package/skills/wix-headless/references/SEED.md +205 -0
  35. package/skills/wix-headless/references/SETUP.md +140 -134
  36. package/skills/wix-headless/references/astro/COMPOSE.md +142 -0
  37. package/skills/wix-headless/references/{blog → astro/blog}/BLOG_PAGES.md +1 -1
  38. package/skills/wix-headless/references/{blog → astro/blog}/BLOG_SETUP.md +2 -2
  39. package/skills/wix-headless/references/astro/cms/CMS_FOUNDATIONS.md +214 -0
  40. package/skills/wix-headless/references/{cms → astro/cms}/FAQ_KNOWLEDGE_BASE.md +6 -4
  41. package/skills/wix-headless/references/{cms → astro/cms}/PORTFOLIO.md +5 -5
  42. package/skills/wix-headless/references/{cms → astro/cms}/RESOURCE_LIBRARY.md +5 -5
  43. package/skills/wix-headless/references/{cms → astro/cms}/TEAM_DIRECTORY.md +5 -5
  44. package/skills/wix-headless/references/astro/designer/INSTRUCTIONS.md +331 -0
  45. package/skills/wix-headless/references/{ecom → astro/ecom}/CART_PAGES.md +1 -1
  46. package/skills/wix-headless/references/{ecom → astro/ecom}/CART_WIRING.md +1 -1
  47. package/skills/wix-headless/references/{ecom → astro/ecom}/COMPONENTS_CSS.md +3 -3
  48. package/skills/wix-headless/references/{forms → astro/forms}/CONTACT_FORM.md +13 -13
  49. package/skills/wix-headless/references/{gift-cards → astro/gift-cards}/COMPONENTS.md +1 -1
  50. package/skills/wix-headless/references/{gift-cards → astro/gift-cards}/PAGES.md +1 -1
  51. package/skills/wix-headless/references/{stores → astro/stores}/BACK_IN_STOCK.md +1 -1
  52. package/skills/wix-headless/references/{stores → astro/stores}/CATEGORY_PAGES.md +12 -13
  53. package/skills/wix-headless/references/{stores → astro/stores}/COMPONENTS_CSS.md +4 -4
  54. package/skills/wix-headless/references/{stores → astro/stores}/HOME_AND_NAV.md +11 -9
  55. package/skills/wix-headless/references/{stores → astro/stores}/PRODUCT_PAGES.md +5 -3
  56. package/skills/wix-headless/references/{stores → astro/stores}/SHARED_WIRING.md +3 -3
  57. package/skills/wix-headless/references/astro/templates/Footer.astro +27 -0
  58. package/skills/wix-headless/references/astro/templates/Layout.astro +132 -0
  59. package/skills/wix-headless/references/astro/templates/Navigation.astro +38 -0
  60. package/skills/wix-headless/references/astro/templates/astro.config.mjs +41 -0
  61. package/skills/wix-headless/references/astro/templates/ecom/components-ecom.css +302 -0
  62. package/skills/wix-headless/references/astro/templates/global.css +286 -0
  63. package/skills/wix-headless/references/astro/templates/index.astro +56 -0
  64. package/skills/wix-headless/{templates → references/astro/templates}/stores/back-in-stock.ts +1 -1
  65. package/skills/wix-headless/{templates → references/astro/templates}/stores/components-stores.css +138 -33
  66. package/skills/wix-headless/references/blog/BLOG_CONTENT.md +10 -11
  67. package/skills/wix-headless/references/blog/INSTRUCTIONS.md +5 -5
  68. package/skills/wix-headless/references/cms/CMS_FOUNDATIONS.md +31 -230
  69. package/skills/wix-headless/references/cms/INSTRUCTIONS.md +13 -8
  70. package/skills/wix-headless/references/custom/INSTRUCTIONS.md +38 -0
  71. package/skills/wix-headless/references/ecom/INSTRUCTIONS.md +10 -10
  72. package/skills/wix-headless/references/forms/INSTRUCTIONS.md +5 -5
  73. package/skills/wix-headless/references/gift-cards/INSTRUCTIONS.md +11 -11
  74. package/skills/wix-headless/references/images/INSTRUCTIONS.md +47 -50
  75. package/skills/wix-headless/references/seed-recipes.md +49 -0
  76. package/skills/wix-headless/references/shared/AUTHENTICATION.md +110 -0
  77. package/skills/wix-headless/references/shared/BUILD_NOISE.md +2 -2
  78. package/skills/wix-headless/references/shared/DOCS_SEARCH.md +41 -0
  79. package/skills/wix-headless/references/shared/IMAGE_GENERATION.md +17 -17
  80. package/skills/wix-headless/references/shared/IMPLEMENTER.md +20 -29
  81. package/skills/wix-headless/references/shared/PRODUCTION_SHARP_EDGES.md +1 -1
  82. package/skills/wix-headless/references/shared/RETURN_CONTRACT.md +25 -16
  83. package/skills/wix-headless/references/shared/STYLING.md +47 -10
  84. package/skills/wix-headless/references/stores/INSTRUCTIONS.md +25 -25
  85. package/skills/wix-headless/references/stores/PRODUCT_CATALOG_DATA.md +17 -17
  86. package/skills/wix-headless/references/verticals/_schema.json +31 -117
  87. package/skills/wix-headless/references/verticals/_schema.md +60 -150
  88. package/skills/wix-headless/references/verticals/blog.md +5 -99
  89. package/skills/wix-headless/references/verticals/cms.md +9 -100
  90. package/skills/wix-headless/references/verticals/ecom.md +5 -76
  91. package/skills/wix-headless/references/verticals/forms.md +5 -85
  92. package/skills/wix-headless/references/verticals/gift-cards.md +6 -103
  93. package/skills/wix-headless/references/verticals/stores.md +10 -144
  94. package/skills/wix-headless/scripts/check-manifest.mjs +5 -5
  95. package/skills/wix-headless/scripts/emit-design-tokens.mjs +29 -23
  96. package/skills/wix-headless/scripts/init-site-json.mjs +59 -21
  97. package/skills/wix-headless/scripts/patch-decorative-slots.mjs +67 -43
  98. package/skills/wix-headless/scripts/plan-entity-image-waves.mjs +3 -3
  99. package/skills/wix-headless/scripts/preview.sh +3 -3
  100. package/skills/wix-headless/scripts/release.sh +4 -4
  101. package/skills/wix-headless/scripts/scaffold.sh +75 -20
  102. package/skills/wix-headless/scripts/seed-utilities.sh +50 -12
  103. package/skills/wix-manage/SKILL.md +4 -8
  104. package/skills/wix-manage/references/blog/how-to-create-blog-posts.md +2 -0
  105. package/skills/wix-manage/references/cms/cms-data-items-crud.md +4 -0
  106. package/skills/wix-manage/references/cms/cms-references-and-relationships.md +2 -0
  107. package/skills/wix-manage/references/cms/cms-schema-management.md +4 -0
  108. package/skills/wix-manage/references/ecommerce/api-shipping.md +443 -0
  109. package/skills/wix-manage/references/ecommerce/flow-add-free-shipping.md +5 -6
  110. package/skills/wix-manage/references/ecommerce/flow-fix-coverage-gaps.md +4 -5
  111. package/skills/wix-manage/references/ecommerce/flow-optimize-shipping-rates.md +4 -5
  112. package/skills/wix-manage/references/ecommerce/goal-increase-aov.md +1 -1
  113. package/skills/wix-manage/references/ecommerce/goal-reduce-cart-abandonment.md +1 -2
  114. package/skills/wix-manage/references/ecommerce/guardrail-shipping-health.md +2 -2
  115. package/skills/wix-manage/references/ecommerce/recipe-apply-shipping-recommendations.md +4 -5
  116. package/skills/wix-manage/references/ecommerce/recommend-ecommerce-strategy.md +7 -7
  117. package/skills/wix-manage/references/ecommerce/setup-discount-rules.md +209 -72
  118. package/skills/wix-manage/references/ecommerce/setup-store-pickup-location.md +9 -10
  119. package/skills/wix-manage/references/ecommerce/skill-graph.md +4 -4
  120. package/skills/wix-manage/references/forms/create-form.md +2 -0
  121. package/skills/wix-manage/references/stores/bulk-create-products-with-options.md +2 -0
  122. package/skills/wix-manage/references/stores/create-product-from-image.md +91 -38
  123. package/skills/wix-manage/references/stores/setup-online-store-catalog-v3.md +2 -0
  124. package/skills/wix-app/references/custom-element-widget/default-thumbnail.png +0 -0
  125. package/skills/wix-app/references/data-collection/extension-template.ts +0 -107
  126. package/skills/wix-headless/references/ORCHESTRATION.md +0 -269
  127. package/skills/wix-headless/references/commands/install-app.md +0 -42
  128. package/skills/wix-headless/references/commands/mcp-bootstrap.md +0 -28
  129. package/skills/wix-headless/references/designer/INSTRUCTIONS.md +0 -828
  130. package/skills/wix-headless/references/shared/MCP_PREFIX.md +0 -105
  131. package/skills/wix-headless/scripts/copy-utility-templates.mjs +0 -153
  132. package/skills/wix-headless/templates/ecom/components-ecom.css +0 -215
  133. package/skills/wix-manage/references/events/list-events.md +0 -203
  134. /package/skills/wix-headless/{templates → references/astro/templates}/ecom/CartBadge.tsx +0 -0
  135. /package/skills/wix-headless/{templates → references/astro/templates}/ecom/CartView.tsx +0 -0
  136. /package/skills/wix-headless/{templates → references/astro/templates}/ecom/cart.astro +0 -0
  137. /package/skills/wix-headless/{templates → references/astro/templates}/ecom/discounts.ts +0 -0
  138. /package/skills/wix-headless/{templates → references/astro/templates}/ecom/thank-you.astro +0 -0
  139. /package/skills/wix-headless/{templates → references/astro/templates}/gift-cards/GiftCardPurchase.tsx +0 -0
  140. /package/skills/wix-headless/{templates → references/astro/templates}/gift-cards/_home-teaser-snippet.astro +0 -0
  141. /package/skills/wix-headless/{templates → references/astro/templates}/gift-cards/_nav-snippet.astro +0 -0
  142. /package/skills/wix-headless/{templates → references/astro/templates}/gift-cards/components-gift-cards.css +0 -0
  143. /package/skills/wix-headless/{templates → references/astro/templates}/gift-cards/gift-cards.astro +0 -0
  144. /package/skills/wix-headless/{templates → references/astro/templates}/gift-cards/gift-cards.ts +0 -0
  145. /package/skills/wix-headless/{templates → references/astro/templates}/stores/AddToCartButton.tsx +0 -0
  146. /package/skills/wix-headless/{templates → references/astro/templates}/stores/BackInStockForm.tsx +0 -0
  147. /package/skills/wix-headless/{templates → references/astro/templates}/stores/CategoryRail.astro +0 -0
  148. /package/skills/wix-headless/{templates → references/astro/templates}/stores/ProductCard.astro +0 -0
  149. /package/skills/wix-headless/{templates → references/astro/templates}/stores/ProductPurchase.tsx +0 -0
  150. /package/skills/wix-headless/{templates → references/astro/templates}/stores/SeoTags.astro +0 -0
  151. /package/skills/wix-headless/{templates → references/astro/templates}/stores/categories.ts +0 -0
  152. /package/skills/wix-headless/{templates → references/astro/templates}/stores/category/[slug].astro +0 -0
  153. /package/skills/wix-headless/{templates → references/astro/templates}/stores/products/[slug].astro +0 -0
  154. /package/skills/wix-headless/{templates → references/astro/templates}/stores/products/index.astro +0 -0
@@ -1,225 +1,25 @@
1
- # CMS Foundations — Shared Patterns for `@wix/data`
1
+ # CMS Foundations — Seeding via `@wix/data` REST (business track)
2
2
 
3
- Core patterns used by all CMS use cases: service module template, `@wix/data` queries, image resolution, elevated access, MCP seeding, and rich-text (Ricos) rendering.
3
+ The **seeding** half of CMS foundations: create collections and insert + verify sample items via the Wix Data REST API. This is frontend-blind business-track work — a collection and its items are the same regardless of what renders them.
4
4
 
5
- > **Import note (read first).** Page code in this plugin uses `import * as items from "@wix/wix-data-items-sdk"` rather than the documented `import { items } from "@wix/data"`. The Wix-headless docs still show the `@wix/data` form, but `@wix/data` 1.0.448 dropped the `items` re-export — only sub-namespaces (`backups`, `collections`, `permissions`, …) remain, and the documented form fails the build with `'items' is not exported by '@wix/data'`. The actual `items` API (with `query`, `insert`, `update`, `remove`, `bulkInsert`, etc.) lives in `@wix/wix-data-items-sdk`, which `@wix/data` depends on transitively. Importing from there directly works on every current `@wix/data` version. The cms vertical pack adds `@wix/wix-data-items-sdk` to the install list so it's always present (`references/verticals/cms.md`). Use the wix-data-items-sdk import everywhere.
5
+ > **Rendering / page code lives in the astro frontend track.** The service-module template, `@wix/data` SDK query patterns, image resolution, Ricos rendering, and category filtering are **not** here — they are in `<SKILL_ROOT>/references/astro/cms/CMS_FOUNDATIONS.md` (the `pages` scope's doc). This file is consumed by the `seed` scope. The `cms/INSTRUCTIONS.md` router points each scope at the right half.
6
6
 
7
- ## Rendering Ricos rich-text fields
7
+ ## Collection ID Format (seeding-relevant)
8
8
 
9
- Wix CMS stores `RICH_TEXT` / `RICH_CONTENT` fields as **Ricos JSON** — a structured node tree (PARAGRAPH, HEADING, BULLETED_LIST, etc.), not HTML. The dashboard's rich-text editor reads and writes this format.
9
+ Native (user-created) CMS collections use **just the collection name** — no namespace prefix (e.g. `"about-content"`, `"faq"`, `"Projects"`). Only Wix App collections use a `<namespace>/<name>` format. Use the exact `id` you create here; verify with `GET /wix-data/v2/collections?fields=id` (standard REST headers from `../shared/AUTHENTICATION.md`). Never guess — the dashboard display name may differ from the ID.
10
10
 
11
- For SSR Astro pages (about, faq, portfolio, team, resource), import the seeded `renderRicos` util from `src/utils/ricos.ts`. The util is shipped by `seed-utilities.sh` (copied from `<SKILL_ROOT>/shared-utilities/ricos.ts` during Setup), so it's already on disk — do NOT inline a Ricos walker in your page.
11
+ ## Seeding via REST (Conditional)
12
12
 
13
- ```astro
14
- ---
15
- import * as items from "@wix/wix-data-items-sdk";
16
- import { auth } from "@wix/essentials";
17
- import { renderRicos } from "../utils/ricos";
18
-
19
- const elevatedQuery = auth.elevate(items.query);
20
- const { items: results } = await elevatedQuery("about-content")
21
- .limit(1)
22
- .find();
23
- const about = results[0];
24
- const bodyHtml = renderRicos(about?.body);
25
- ---
26
-
27
- <article class="prose">
28
- <h1>{about?.heading}</h1>
29
- <div set:html={bodyHtml} />
30
- </article>
31
- ```
32
-
33
- The util covers the common subset (PARAGRAPH, HEADING 1-6, BULLETED_LIST / ORDERED_LIST / LIST_ITEM, BLOCKQUOTE, DIVIDER + BOLD / ITALIC / UNDERLINE / LINK decorations). Anything outside that set renders defensively as a `<p>` with the raw text — never throws.
34
-
35
- > **Why not @wix/ricos?** The blog vertical uses `@wix/ricos`'s React `RicosViewer` as a client island because blog posts can carry the full Ricos feature set (galleries, polls, embedded media). For static CMS pages, that's ~80kb of React for paragraphs and lists — overkill. Use the seeded SSR walker instead.
36
-
37
- > **Do NOT `set:html={item.body}` directly.** That ships JSON-encoded text into the page (e.g. `[object Object]` or `{"nodes":...}`). Always go through `renderRicos`.
38
-
39
- > **Critical Rules — Read Before Starting**
40
- > 1. **Collection IDs have NO namespace** — user collections use just the name (e.g., `"Projects"`). Only Wix App collections use `<namespace>/<name>`. Verify via MCP: `GET /wix-data/v2/collections?fields=id`.
41
- > 2. **SDK query pattern** — `items.query("CollectionId").find()`. There is no `items.queryDataItems()` in the SDK.
42
- > 3. **`auth.elevate` on every query** — without it, restricted collections silently return no items.
43
- > 4. **CMS only for user collections** — use `@wix/blog` for blog posts, `@wix/stores` for products, `@wix/forms` for form submissions.
44
-
45
- ## Prerequisites
46
-
47
- - `@wix/data` package installed (collected by features orchestrator — do NOT install independently)
48
- - `@wix/essentials` package installed (for elevation)
49
- - A data collection created in the Wix dashboard → CMS section
50
- - No special Wix app installation needed — `@wix/data` works with any Wix Managed Headless project
51
-
52
- ## Collection ID Format
53
-
54
- Native (user-created) CMS collections use **just the collection name** — no namespace prefix.
55
-
56
- Example: if the collection is called `Projects`, the collection ID is simply `"Projects"`.
57
-
58
- Only Wix App collections (e.g., `Members/PublicData`, `Locations/Locations`) use a `<namespace>/<name>` format. User-created collections never use a namespace.
59
-
60
- > **How to verify**: Call `GET /wix-data/v2/collections?fields=id` via MCP and use the exact `id` value from the response. Never guess — the dashboard name may differ from the ID.
61
-
62
- ## Quick Reference — Inline Query (Simple Pages)
63
-
64
- For pages that just need to list items from a collection:
65
-
66
- ```astro
67
- ---
68
- import * as items from "@wix/wix-data-items-sdk";
69
- import { auth } from "@wix/essentials";
70
-
71
- // Always elevate queries for permission safety
72
- const elevatedQuery = auth.elevate(items.query);
73
- const { items: results } = await elevatedQuery("MyCollection")
74
- .ascending("sortField")
75
- .limit(50)
76
- .find();
77
-
78
- // Fields are directly on each item (NOT item.data.field)
79
- const myItems = results.map((item) => ({
80
- name: item.name, // correct
81
- // name: item.data.name // wrong — REST pattern, not SDK
82
- }));
83
- ---
84
- ```
85
-
86
- > **Common mistake:** `items.queryDataItems(...)` does NOT exist in the
87
- > `@wix/data` SDK. The REST API uses `/items/query` with a `dataCollectionId`
88
- > body field, but the SDK uses `items.query("collectionId")` — a chainable
89
- > QueryBuilder. Do not confuse REST and SDK patterns.
90
-
91
- ## Service Module Template
92
-
93
- Every CMS use case follows the same `src/lib/{usecase}.ts` pattern — a typed interface and query functions that pages import.
94
-
95
- ```typescript
96
- import * as items from "@wix/wix-data-items-sdk";
97
- import { auth } from "@wix/essentials";
98
- import { media } from "@wix/sdk";
99
-
100
- // -- Collection ID (use exact name from Wix dashboard — no namespace for native collections) --
101
- const COLLECTION_ID = "collection-name";
102
-
103
- // -- Typed interface matching collection fields --
104
- export interface CollectionItem {
105
- _id: string;
106
- title: string;
107
- slug: string;
108
- // ...add fields matching your collection schema
109
- coverImage?: string;
110
- }
111
-
112
- // -- Image resolution helper --
113
- function resolveImage(wixImageUrl: string | undefined, width = 800, height = 600): string | undefined {
114
- if (!wixImageUrl) return undefined;
115
- return media.getScaledToFillImageUrl(wixImageUrl, width, height, {});
116
- }
117
-
118
- // -- Query all items --
119
- // Wrap every Wix SDK await in try/catch. If the query throws at SSR, an empty
120
- // array keeps the page renderable instead of crashing it. (Unguarded SSR
121
- // awaits truncate Astro's response stream mid-body — nav renders, then blank.)
122
- export async function queryItems(): Promise<CollectionItem[]> {
123
- try {
124
- const elevatedQuery = auth.elevate(items.query);
125
- const { items: results } = await elevatedQuery(COLLECTION_ID)
126
- .ascending("orderIndex")
127
- .limit(50)
128
- .find();
129
-
130
- return results.map((item) => ({
131
- ...item,
132
- coverImage: resolveImage(item.coverImage),
133
- })) as CollectionItem[];
134
- } catch (err) {
135
- console.error(`[cms:${COLLECTION_ID}] query failed:`, err);
136
- return [];
137
- }
138
- }
139
-
140
- // -- Get single item by slug --
141
- export async function getItemBySlug(slug: string): Promise<CollectionItem | null> {
142
- try {
143
- const elevatedQuery = auth.elevate(items.query);
144
- const { items: results } = await elevatedQuery(COLLECTION_ID)
145
- .eq("slug", slug)
146
- .limit(1)
147
- .find();
148
-
149
- const item = results[0];
150
- if (!item) return null;
151
-
152
- return {
153
- ...item,
154
- coverImage: resolveImage(item.coverImage),
155
- } as CollectionItem;
156
- } catch (err) {
157
- console.error(`[cms:${COLLECTION_ID}] getItemBySlug failed:`, err);
158
- return null;
159
- }
160
- }
161
- ```
162
-
163
- Key details:
164
- - `auth.elevate(items.query)` wraps the query for restricted collections — always use this by default since collection permissions vary
165
- - `media.getScaledToFillImageUrl(url, w, h, {})` resolves `wix:image://` URLs to sized CDN URLs
166
- - Sort by `orderIndex` (ascending) for manually ordered content, or `_createdDate` (descending) for chronological
167
- - The interface must match the collection fields — check the dashboard, don't guess
168
-
169
- ## Multi-Image Resolution
170
-
171
- For collections with image arrays (e.g., gallery images):
172
-
173
- ```typescript
174
- function resolveImages(imageUrls: string[] | undefined, width = 800, height = 600): string[] {
175
- if (!imageUrls || imageUrls.length === 0) return [];
176
- return imageUrls
177
- .map((url) => media.getScaledToFillImageUrl(url, width, height, {}))
178
- .filter(Boolean);
179
- }
180
- ```
181
-
182
- ## Category Filtering Pattern
183
-
184
- Many use cases filter by category via URL search params (server-rendered, no client JS):
185
-
186
- ```astro
187
- ---
188
- const activeCategory = Astro.url.searchParams.get("category");
189
- const allItems = await queryItems();
190
- const filtered = activeCategory
191
- ? allItems.filter((item) => item.category === activeCategory)
192
- : allItems;
193
- const categories = [...new Set(allItems.map((item) => item.category).filter(Boolean))];
194
- ---
195
-
196
- <nav>
197
- <a href="?" class:list={[!activeCategory && "active"]}>All</a>
198
- {categories.map((cat) => (
199
- <a
200
- href={`?category=${encodeURIComponent(cat)}`}
201
- class:list={[activeCategory === cat && "active"]}
202
- >{cat}</a>
203
- ))}
204
- </nav>
205
- ```
206
-
207
- > **Styling note:** Category filter pill styling is created by the design skill. See `COMPONENT_PATTERNS.md` → Category Filter.
208
-
209
- ## MCP Seeding (Conditional)
210
-
211
- If Wix MCP tools are available, check if the collection has data and seed sample items if empty. This is **conditional** — only attempt if MCP is connected.
13
+ Check whether the collection already has data; seed sample items only if empty. Calls go through `curl` against `wixapis.com` with the site-scoped REST token (see `../shared/AUTHENTICATION.md`) — no SDK, no MCP.
212
14
 
213
15
  1. Query the collection — if items exist, skip seeding
214
- 2. If empty, create the collection and insert sample items via MCP (see templates below)
16
+ 2. If empty, create the collection and insert sample items via the REST calls below
215
17
  3. Design sample data that matches the business type from the functional plan
216
18
 
217
- > MCP seeding is optional. If MCP tools are not available, instruct the user to add content via the Wix dashboard → CMS section.
218
-
219
19
  ### Create collection (if it doesn't exist)
220
20
 
221
21
  ```
222
- <prefix>CallWixSiteAPI: POST https://www.wixapis.com/wix-data/v2/collections
22
+ REST: POST https://www.wixapis.com/wix-data/v2/collections
223
23
  body: {
224
24
  "collection": {
225
25
  "id": "about-content",
@@ -238,7 +38,7 @@ body: {
238
38
  **This is the critical step that must include actual field values.** Creating an item without populating the `data` object results in an empty record — the collection schema exists but the item has no content.
239
39
 
240
40
  ```
241
- <prefix>CallWixSiteAPI: POST https://www.wixapis.com/wix-data/v2/items
41
+ REST: POST https://www.wixapis.com/wix-data/v2/items
242
42
  body: {
243
43
  "dataCollectionId": "about-content",
244
44
  "dataItem": {
@@ -257,7 +57,7 @@ The response returns the created item's `_id` — collect these for the Phase 1
257
57
  For FAQ items, include both `question` and `answer` plus `sortOrder`:
258
58
 
259
59
  ```
260
- <prefix>CallWixSiteAPI: POST https://www.wixapis.com/wix-data/v2/items
60
+ REST: POST https://www.wixapis.com/wix-data/v2/items
261
61
  body: {
262
62
  "dataCollectionId": "faq",
263
63
  "dataItem": {
@@ -275,7 +75,7 @@ body: {
275
75
  After inserting all items, **query each collection once** and confirm every field you sent is present in the stored `data`. A POST without errors does NOT prove the content persisted — the API has accepted insert bodies with missing fields before, and the failure is invisible until a human opens the page.
276
76
 
277
77
  ```
278
- <prefix>CallWixSiteAPI: POST https://www.wixapis.com/wix-data/v2/items/query
78
+ REST: POST https://www.wixapis.com/wix-data/v2/items/query
279
79
  body: { "dataCollectionId": "<collection>" }
280
80
  ```
281
81
 
@@ -287,12 +87,13 @@ For every returned item, confirm its `data` object contains every text field you
287
87
 
288
88
  A CMS seeder can return `complete` for an about-content item, then Image Phase 2 silently wipes its `heading` + `body` via a destructive full-record PUT. The verify-after-insert step here plus the read-merge-PUT rule in the images agent makes that class of data loss unreachable.
289
89
 
290
- ### MCP Seeding with Images
90
+ ### Seeding with Images
291
91
 
292
92
  For use cases with image fields (`photo`, `coverImage`, `galleryImages`),
293
- follow `../../shared/IMAGE_GENERATION.md` (Steps 1–2) for Wix AI image
294
- generation and Wix Media import. Image generation is MCP-authenticated
295
- and always available — do not ask the user for credentials.
93
+ follow `../shared/IMAGE_GENERATION.md` (Steps 1–2) for Wix AI image
94
+ generation and Wix Media import. Image generation goes through the same
95
+ CLI-minted REST token as the rest of this skill — do not ask the user for
96
+ credentials.
296
97
 
297
98
  **Workflow:**
298
99
 
@@ -303,14 +104,14 @@ and always available — do not ask the user for credentials.
303
104
 
304
105
  ```
305
106
  # Step a: read the existing item
306
- <prefix>CallWixSiteAPI: POST https://www.wixapis.com/wix-data/v2/items/query
107
+ REST: POST https://www.wixapis.com/wix-data/v2/items/query
307
108
  body: {
308
109
  "dataCollectionId": "CollectionName",
309
110
  "query": { "filter": { "_id": { "$in": ["{itemId}"] } } }
310
111
  }
311
112
 
312
113
  # Step b: merge image into existing data and PUT the full record
313
- <prefix>CallWixSiteAPI: PUT https://www.wixapis.com/wix-data/v2/items/{itemId}
114
+ REST: PUT https://www.wixapis.com/wix-data/v2/items/{itemId}
314
115
  body: {
315
116
  "dataCollectionId": "CollectionName",
316
117
  "dataItem": {
@@ -322,18 +123,18 @@ body: {
322
123
 
323
124
  `...existingData` must include every non-system field from step a (system fields `_id`, `_owner`, `_createdDate`, `_updatedDate` don't need to be echoed). Skipping the merge wipes seeded text fields and ships an empty About page.
324
125
 
325
- **Prompt templates** — each use-case reference defines its own prompt template (see the "Seed with Images" section in TEAM_DIRECTORY.md, PORTFOLIO.md, RESOURCE_LIBRARY.md). Always incorporate brand context from the discovery/design phases.
126
+ **Prompt templates** — each use-case reference defines its own prompt template (see the "Seed with Images" section in `../astro/cms/TEAM_DIRECTORY.md`, `../astro/cms/PORTFOLIO.md`, `../astro/cms/RESOURCE_LIBRARY.md`). Always incorporate brand context from the discovery/design phases.
326
127
 
327
128
  **Constraints:**
328
129
  - Never block the main flow on image failures — text data is already seeded
329
130
  - Runware image URLs are short-lived — import to Wix Media immediately after generation
330
131
  - If image generation or import fails for a single item, skip that item and continue with others
331
- - If all generation fails (credits exhausted, MCP errors), write the sidecar with `Status: partial` and proceed — but always attempt first
332
- - FAQ_KNOWLEDGE_BASE has no image fields — skip image generation for FAQ use cases
132
+ - If all generation fails (credits exhausted, upstream Runware errors), write the sidecar with `Status: partial` and proceed — but always attempt first
133
+ - `../astro/cms/FAQ_KNOWLEDGE_BASE.md` has no image fields — skip image generation for FAQ use cases
333
134
 
334
135
  ## Return Results
335
136
 
336
- Emit a structured JSON block at the end of your completion message per `../../shared/RETURN_CONTRACT.md`. Do NOT write sidecar files.
137
+ Emit a structured JSON block at the end of your completion message per `../shared/RETURN_CONTRACT.md`. Do NOT write sidecar files.
337
138
 
338
139
  ```json
339
140
  {
@@ -359,15 +160,15 @@ Emit a structured JSON block at the end of your completion message per `../../sh
359
160
  ```
360
161
 
361
162
  - `storedFields` MUST match the real keys seen in the verify-after-insert query response's `data` object (see § "Verify inserts with a live query"). Downstream pages agents compare against this — if you return `fields: ["heading", "body"]` but only `heading` was actually stored, pages render empty bodies.
362
- - `sampleValues` is a single example item's field-to-short-string map. Lets downstream agents spot-check that content is real without another MCP round-trip. Truncate rich-text bodies to the first ~80 characters.
163
+ - `sampleValues` is a single example item's field-to-short-string map. Lets downstream agents spot-check that content is real without another REST round-trip. Truncate rich-text bodies to the first ~80 characters.
363
164
  - For collections without image fields (e.g., FAQ), set `imageField: null`.
364
165
  - The JSON block MUST be the last content in your message.
365
166
 
366
- ## Testing
167
+ ## Testing (seed-side)
168
+
169
+ 1. Create a data collection in the Wix dashboard → CMS (or via the REST `POST /collections` above).
170
+ 2. Add fields matching the use case schema (see the specific use case reference under `../astro/cms/`).
171
+ 3. Add at least 2–3 items with all fields populated, including `slug` and `published` (if applicable).
172
+ 4. Run the verify-after-insert query and confirm every field persisted.
367
173
 
368
- 1. Create a data collection in the Wix dashboard → CMS
369
- 2. Add fields matching the use case schema (see the specific use case reference)
370
- 3. Add at least 2–3 items with all fields populated, including `slug` and `published` (if applicable)
371
- 4. Run `npx @wix/cli dev`
372
- 5. Navigate to the listing page — should show items
373
- 6. Click an item — should navigate to the detail page
174
+ Page rendering / SDK query patterns for these collections are in `../astro/cms/CMS_FOUNDATIONS.md`.
@@ -5,14 +5,14 @@ description: "Implements structured content pages (About, FAQ, portfolios, team
5
5
 
6
6
  # CMS Implementer
7
7
 
8
- Extends `references/shared/IMPLEMENTER.md`. Read that file first for phase routing, MCP prefix, site.json read pattern, return contract, style conventions, and common failure modes.
8
+ Extends `references/shared/IMPLEMENTER.md`. Read that file first for phase routing, REST auth + doc lookups, prompt-inlined inputs (no site.json reads), return contract, style conventions, and common failure modes.
9
9
 
10
10
  ## Scope routing
11
11
 
12
12
  | Scope | Phase | Reference |
13
13
  |-------|-------|-----------|
14
- | `seed` | Seed (create collections + seed items via MCP) | `./CMS_FOUNDATIONS.md` (§ seeding) + use-case ref |
15
- | `pages` | Pages (About + FAQ pages read CMS via @wix/data inline) | `./CMS_FOUNDATIONS.md` (§ code patterns) + use-case ref |
14
+ | `seed` | Seed (create collections + seed items via REST) | `./CMS_FOUNDATIONS.md` (seeding, business half) + use-case ref under `../astro/cms/` (collection schema + seed-with-images) |
15
+ | `pages` | Pages (About + FAQ pages read CMS via @wix/data inline) | `../astro/cms/CMS_FOUNDATIONS.md` (code patterns) + use-case ref under `../astro/cms/` |
16
16
 
17
17
  No `components` scope — CMS pages SSR content inline via `@wix/data`; no React islands.
18
18
 
@@ -20,21 +20,26 @@ No `components` scope — CMS pages SSR content inline via `@wix/data`; no React
20
20
 
21
21
  Pick based on the business type (the orchestrator names one in your prompt):
22
22
 
23
- - `./FAQ_KNOWLEDGE_BASE.md` — Q&A accordions, category sections, search
24
- - `./PORTFOLIO.md` — project grid, category filter tabs, project detail
25
- - `./TEAM_DIRECTORY.md` — department-grouped directory, staff cards
26
- - `./RESOURCE_LIBRARY.md` — file listings, download buttons, file type badges
23
+ - `../astro/cms/FAQ_KNOWLEDGE_BASE.md` — Q&A accordions, category sections, search
24
+ - `../astro/cms/PORTFOLIO.md` — project grid, category filter tabs, project detail
25
+ - `../astro/cms/TEAM_DIRECTORY.md` — department-grouped directory, staff cards
26
+ - `../astro/cms/RESOURCE_LIBRARY.md` — file listings, download buttons, file type badges
27
27
 
28
28
  ## Files this vertical creates / contributes
29
29
 
30
30
  See `<SKILL_ROOT>/references/verticals/cms.md` frontmatter.
31
31
 
32
+ ## Page width (FAQ, About, long-form CMS)
33
+
34
+ Read `references/shared/STYLING.md` § "Prose / reading width". **Do not** wrap FAQ/About body copy in `max-w-3xl` unless `--container-3xl` exists in `src/styles/global.css` `@theme`. Prefer `container-reading`, `max-w-6xl` (when `--container-6xl` is defined), or `max-w-[48rem]`. A bare `max-w-3xl` with only a spacing scale ships a ~80px column.
35
+
32
36
  ## CMS-specific failure modes
33
37
 
34
38
  | Wrong | Right |
35
39
  |---|---|
36
40
  | `items.queryDataItems(...)` / `items.query({ dataCollectionId })` | `items.query("CollectionId").find()` — queryDataItems doesn't exist |
37
41
  | React islands for static content pages | SSR inline with `@wix/data`; no islands needed |
42
+ | `max-w-3xl` on FAQ/About wrappers without `--container-3xl` in `@theme` | `container-reading` or `max-w-[48rem]` / `max-w-6xl` per STYLING.md |
38
43
  | Return `status: "complete"` without re-querying the collection | Always run the verify-after-insert query (see CMS_FOUNDATIONS.md § "Verify inserts with a live query"); fail fast if any field is missing |
39
44
  | Report `fields: [...]` guessed from the insert body | Report `storedFields: [...]` matching the actual keys in the query response's `data` object — pages agents compare against these |
40
- | Assume text fields survive downstream image PATCHes | Seeder's job is to verify content is present; images agent must preserve via read-merge-PUT (images INSTRUCTIONS.md § "CMS Items") |
45
+ | Assume text fields survive downstream image PATCHes | Seeder's job is to verify content is present; images agent must preserve via read-merge-PUT (images INSTRUCTIONS.md § "CMS Items") |
@@ -0,0 +1,38 @@
1
+ ---
2
+ name: custom-frontend
3
+ description: "Routing target for the custom (non-astro) frontend track. Custom is any frontend the user brings that is not astro. The frontend-authoring track is NOT available yet — astro is the only supported frontend. This stub surfaces the not-available message and records the intended future shape; it does not attempt to author a site."
4
+ ---
5
+
6
+ # Custom (non-astro) frontend — not available yet
7
+
8
+ **Astro is the only supported frontend today.** This doc is the routing target for every non-astro `frontend` value. When the conductor routes here, it does **not** attempt frontend authoring — it surfaces the message below and stops the frontend track.
9
+
10
+ ## What to tell the user
11
+
12
+ > Custom (non-astro) frontends are not available yet — **astro is the supported frontend**. Re-run with the astro frontend, or check back later.
13
+
14
+ Do **not** scaffold, design, compose, or wire anything. Do **not** fall back to a half-built site. There is no per-pack custom authoring to dispatch — that work is deferred (see "Intended future shape" below).
15
+
16
+ ## Why this is a stub
17
+
18
+ The frontend track is the only track that branches on the `frontend` axis (`PLAN.md` § "Two tracks"). It routes to exactly one of:
19
+
20
+ | `frontend` | Frontend-track instructions | Status |
21
+ |---|---|---|
22
+ | `astro` | `<SKILL_ROOT>/references/astro/` (full playbook) | **Supported** |
23
+ | custom (anything else) | this file | **Not available yet** |
24
+
25
+ Astro is the one Wix-preferred frontend the skill builds end-to-end. Every other frontend is the user's own choice; standing up the authoring track for those is deferred until the custom track is prioritized.
26
+
27
+ ## Intended future shape (documented, not built)
28
+
29
+ When the custom track is prioritized, it will follow the premise below. **None of this runs today** — it is recorded here as the target so the eventual build has a spec.
30
+
31
+ 1. **Scaffold** — `npm create @wix/new@latest init` wraps the user's *existing* project (vs `headless` for astro), writes `wix.config.json`, and sets `site.outputDirectory` to the directory containing the entry file. (`wix release` is framework-tolerant via `wix.config.json.site.outputDirectory`.)
32
+ 2. **Business track (shared, frontend-blind)** — Setup (app installs from a project analysis, `env pull` if needed) and Seed run the **same** frontend-blind path as astro. Per the two-track model, a product/collection/post/form is the same regardless of what renders it, so this track does not change for custom.
33
+ 3. **Frontend authoring (the deferred new work)** — per-pack wiring guides under `references/custom/<pack>/…` that inject `@wix/sdk` calls into the user's existing files, **additive-only**, via a heuristic inject-point ladder: explicit `data-wix-*` attribute → semantic class → return a recommendation rather than guessing. This is what the custom track delivers when it is built.
34
+ 4. **Release** — `npx @wix/cli@latest release` directly, **no build** (the user's project is published as-is, or the user runs their own build first).
35
+
36
+ ### Historical reference
37
+
38
+ The retired "Integrate" (Path B) flow — `SETUP.md` § "Existing project flow" E1–E6, especially the **E4 SDK-wiring recipe** — is the closest prior art for step 3 above. It is kept as a **historical reference only**, not a Beta deliverable. Do not dispatch it; the conductor no longer routes non-astro frontends into it.
@@ -5,17 +5,17 @@ description: "Implements vertical-agnostic ecommerce — cart page, checkout red
5
5
 
6
6
  # Ecom Implementer
7
7
 
8
- Extends `references/shared/IMPLEMENTER.md`. Read that file first for phase routing, MCP prefix, site.json read pattern, return contract, style conventions, and common failure modes.
8
+ Extends `references/shared/IMPLEMENTER.md`. Read that file first for phase routing, REST auth + doc lookups, prompt-inlined inputs (no site.json reads), return contract, style conventions, and common failure modes.
9
9
 
10
10
  ## Scope routing
11
11
 
12
12
  | Scope | Phase | Reference |
13
13
  |-------|-------|-----------|
14
- | `components` | Components (CartView, CartBadge — TSX only, **no CSS**) — `src/utils/discounts.ts` is pre-copied by the orchestrator | `./CART_WIRING.md` |
15
- | `components-css` | Components (scoped CSS — `components-ecom.css` only; runs concurrently with `components`) | `./COMPONENTS_CSS.md` |
16
- | `pages` | Pages (cart.astro, thank-you.astro, Navigation CartBadge mount) | `./CART_PAGES.md` |
14
+ | `components` | Components (CartView, CartBadge — TSX only, **no CSS**) — `src/utils/discounts.ts` is pre-copied by the orchestrator | `../astro/ecom/CART_WIRING.md` |
15
+ | ~~`components-css`~~ | **Do not dispatch.** `src/styles/components-ecom.css` is copied from `<SKILL_ROOT>/references/astro/templates/ecom/components-ecom.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
+ | `pages` | Pages (cart.astro, thank-you.astro, Navigation CartBadge mount) | `../astro/ecom/CART_PAGES.md` |
17
17
 
18
- > **Why `components` is split.** A single agent writing the .tsx islands plus the scoped CSS was Phase 3's critical path on the most recent run (204 s for ecom alone). The CSS file has no runtime coupling to the TSX components — it's referenced only by class name at build time — so it splits cleanly into a sibling agent that runs in the same dispatch batch. Mirrors the stores split. See `./COMPONENTS_CSS.md` § "What this scope owns".
18
+ > **Why `components` is split.** A single agent writing the .tsx islands plus the scoped CSS was Phase 3's critical path on the most recent run (204 s for ecom alone). The CSS file has no runtime coupling to the TSX components — it's referenced only by class name at build time — so it splits cleanly into a sibling agent that runs in the same dispatch batch. Mirrors the stores split. See `../astro/ecom/COMPONENTS_CSS.md` § "What this scope owns".
19
19
 
20
20
  Note: `ecom` is never triggered independently — it's co-loaded by verticals that require it (`stores` today; `bookings`, `events` in the future). No `seed` scope — ecom has no data of its own; it works off line items from whichever catalog app is installed.
21
21
 
@@ -26,15 +26,15 @@ See `<SKILL_ROOT>/references/verticals/ecom.md` frontmatter.
26
26
  ## Templates
27
27
 
28
28
  Components (`components` scope — TSX only):
29
- - `<SKILL_ROOT>/templates/ecom/CartView.tsx`
30
- - `<SKILL_ROOT>/templates/ecom/CartBadge.tsx`
29
+ - `<SKILL_ROOT>/references/astro/templates/ecom/CartView.tsx`
30
+ - `<SKILL_ROOT>/references/astro/templates/ecom/CartBadge.tsx`
31
31
 
32
32
  Components CSS (`components-css` scope — scoped CSS only):
33
- - `<SKILL_ROOT>/templates/ecom/components-ecom.css`
33
+ - `<SKILL_ROOT>/references/astro/templates/ecom/components-ecom.css`
34
34
 
35
35
  ### Pre-copied by the orchestrator (do NOT write this yourself)
36
36
 
37
- - `src/utils/discounts.ts` — pre-copied from `<SKILL_ROOT>/templates/ecom/discounts.ts` BEFORE your `components` scope dispatches. Wix Ecom Discount Rules fetch + per-product match utility; consumers are stores `pages-products` / `pages-home-and-nav` (ProductCard ribbon + product-detail offer callout). Uses `auth.elevate()` from `@wix/essentials` — `discountRules.queryDiscountRules` requires `ECOM.DISCOUNT_RULES_READ`, a visitor client returns empty silently without elevation.
37
+ - `src/utils/discounts.ts` — pre-copied from `<SKILL_ROOT>/references/astro/templates/ecom/discounts.ts` BEFORE your `components` scope dispatches. Wix Ecom Discount Rules fetch + per-product match utility; consumers are stores `pages-products` / `pages-home-and-nav` (ProductCard ribbon + product-detail offer callout). Uses `auth.elevate()` from `@wix/essentials` — `discountRules.queryDiscountRules` requires `ECOM.DISCOUNT_RULES_READ`, a visitor client returns empty silently without elevation.
38
38
 
39
39
  Just import from this path; never rewrite the file. Regenerating it has shipped a no-op stub that satisfied the manifest but caused the discount ribbon to silently never render. The pre-copy makes that regression structurally impossible.
40
40
 
@@ -56,4 +56,4 @@ See `references/shared/STYLING.md` § "Component-specific CSS is owned by the co
56
56
 
57
57
  `cart-updated` CustomEvent on `window`:
58
58
  - **Dispatchers:** `AddToCartButton` (stores), `CartView` (ecom)
59
- - **Listener:** `CartBadge` (ecom)
59
+ - **Listener:** `CartBadge` (ecom)
@@ -5,15 +5,15 @@ description: "Implements contact, lead, and signup forms via @wix/forms. Scopes:
5
5
 
6
6
  # Forms Implementer
7
7
 
8
- Extends `references/shared/IMPLEMENTER.md`. Read that file first for phase routing, MCP prefix, site.json read pattern, return contract, style conventions, and common failure modes.
8
+ Extends `references/shared/IMPLEMENTER.md`. Read that file first for phase routing, REST auth + doc lookups, prompt-inlined inputs (no site.json reads), return contract, style conventions, and common failure modes.
9
9
 
10
10
  ## Scope routing
11
11
 
12
12
  | Scope | Phase | Reference |
13
13
  |-------|-------|-----------|
14
- | `seed` | Seed (Forms app install + form creation + postSubmissionTriggers PATCH) | `./CONTACT_FORM.md` (§ Form Setup) |
15
- | `components` | Components (ContactForm.tsx React island) | `./CONTACT_FORM.md` (§ React island) |
16
- | `pages` | Pages (contact.astro wire with formId from seeded data) | `./CONTACT_FORM.md` (§ Page wiring) |
14
+ | `seed` | Seed (Forms app install + form creation + postSubmissionTriggers PATCH) | `../astro/forms/CONTACT_FORM.md` (§ Form Setup) |
15
+ | `components` | Components (ContactForm.tsx React island) | `../astro/forms/CONTACT_FORM.md` (§ React island) |
16
+ | `pages` | Pages (contact.astro wire with formId from seeded data) | `../astro/forms/CONTACT_FORM.md` (§ Page wiring) |
17
17
 
18
18
  ## Files this vertical creates / contributes
19
19
 
@@ -40,4 +40,4 @@ The `seed` scope adapts field selection based on business purpose from the funct
40
40
  | Skip `auth.elevate` when listing forms | `listForms` requires elevated permissions |
41
41
  | Submit forms from server-side code | Form submission must be client-side (React island with `client:load`) |
42
42
  | Detect textarea by `componentType === "TEXT_AREA"` | Check `identifier === "TEXT_AREA"` or `target === "message"` |
43
- | Hardcode form field IDs or form ID | Use `forms.listForms("wix.form_app.form")` with `auth.elevate` for runtime discovery |
43
+ | Hardcode form field IDs or form ID | Use `forms.listForms("wix.form_app.form")` with `auth.elevate` for runtime discovery |
@@ -5,14 +5,14 @@ description: "Implements the passive Wix Gift Cards vertical — runtime probe u
5
5
 
6
6
  # Gift Cards Implementer
7
7
 
8
- Extends `references/shared/IMPLEMENTER.md`. Read that file first for phase routing, MCP prefix, site.json read pattern, return contract, style conventions, and common failure modes.
8
+ Extends `references/shared/IMPLEMENTER.md`. Read that file first for phase routing, REST auth + doc lookups, prompt-inlined inputs (no site.json reads), return contract, style conventions, and common failure modes.
9
9
 
10
10
  ## Scope routing
11
11
 
12
12
  | Scope | Phase | Reference |
13
13
  |-------|-------|-----------|
14
- | `components` | Components (probe util, React island, scoped CSS) | `./COMPONENTS.md` |
15
- | `pages` | Pages (gift-cards landing + Navigation/index patches) | `./PAGES.md` |
14
+ | `components` | Components (probe util, React island, scoped CSS) | `../astro/gift-cards/COMPONENTS.md` |
15
+ | `pages` | Pages (gift-cards landing + Navigation/index patches) | `../astro/gift-cards/PAGES.md` |
16
16
 
17
17
  This pack has **no `seed` scope** — the dashboard's eGift Card template is the source of truth and we never seed denominations from code.
18
18
 
@@ -26,17 +26,17 @@ Before returning `status: "complete"` from the `pages` scope, verify every file
26
26
 
27
27
  ## Templates
28
28
 
29
- Canonical templates live at `<SKILL_ROOT>/templates/gift-cards/`. Your `components` and `pages` scopes read these and adapt them — don't invent markup or logic.
29
+ Canonical templates live at `<SKILL_ROOT>/references/astro/templates/gift-cards/`. Your `components` and `pages` scopes read these and adapt them — don't invent markup or logic.
30
30
 
31
31
  Components (`components` scope):
32
- - `<SKILL_ROOT>/templates/gift-cards/gift-cards.ts`
33
- - `<SKILL_ROOT>/templates/gift-cards/GiftCardPurchase.tsx`
34
- - `<SKILL_ROOT>/templates/gift-cards/components-gift-cards.css`
32
+ - `<SKILL_ROOT>/references/astro/templates/gift-cards/gift-cards.ts`
33
+ - `<SKILL_ROOT>/references/astro/templates/gift-cards/GiftCardPurchase.tsx`
34
+ - `<SKILL_ROOT>/references/astro/templates/gift-cards/components-gift-cards.css`
35
35
 
36
36
  Pages (`pages` scope):
37
- - `<SKILL_ROOT>/templates/gift-cards/gift-cards.astro`
38
- - `<SKILL_ROOT>/templates/gift-cards/_nav-snippet.astro` — exact contribution to insert at `<!-- nav:links -->` in `Navigation.astro`
39
- - `<SKILL_ROOT>/templates/gift-cards/_home-teaser-snippet.astro` — exact contribution to insert at `<!-- home:gift-cards -->` in `index.astro`
37
+ - `<SKILL_ROOT>/references/astro/templates/gift-cards/gift-cards.astro`
38
+ - `<SKILL_ROOT>/references/astro/templates/gift-cards/_nav-snippet.astro` — exact contribution to insert at `<!-- nav:links -->` in `Navigation.astro`
39
+ - `<SKILL_ROOT>/references/astro/templates/gift-cards/_home-teaser-snippet.astro` — exact contribution to insert at `<!-- home:gift-cards -->` in `index.astro`
40
40
 
41
41
  ## Gift-cards-specific failure modes
42
42
 
@@ -48,4 +48,4 @@ Pages (`pages` scope):
48
48
  | Forget to import `getGiftCardProduct` when patching `Navigation.astro` or `index.astro` | When inserting at a marker, also add the corresponding import + frontmatter call to that file |
49
49
  | Drop or rename the marker comment after inserting | Preserve the marker line — future re-runs and other verticals depend on it |
50
50
  | Render the page when probe returns `null` | Redirect to `/` (`Astro.redirect("/", 302)`) so users following stale links never see a broken page |
51
- | Skip memoization of `getGiftCardProduct()` | Module-level cache promise — Navigation, home, and page render in the same request and must coalesce to one fetch |
51
+ | Skip memoization of `getGiftCardProduct()` | Module-level cache promise — Navigation, home, and page render in the same request and must coalesce to one fetch |