@wix/agent-skills 1.7.0 → 1.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (126) hide show
  1. package/README.md +3 -7
  2. package/package.json +1 -1
  3. package/skills/wix-app/SKILL.md +2 -0
  4. package/skills/wix-app/references/EDITOR_REACT_COMPONENT.md +2 -1
  5. package/skills/wix-app/references/STORES_VERSIONING.md +1 -0
  6. package/skills/wix-app/references/editor-react-component/ACCESSIBILITY.md +14 -0
  7. package/skills/wix-app/references/editor-react-component/REACT-GUIDELINES.md +11 -6
  8. package/skills/wix-app/references/editor-react-component/REACT-PATTERNS.md +3 -17
  9. package/skills/wix-app/references/editor-react-component/SSR.md +119 -0
  10. package/skills/wix-design-system/SKILL.md +5 -1
  11. package/skills/wix-headless/SKILL.md +55 -32
  12. package/skills/wix-headless/references/BUILD-astro.md +244 -0
  13. package/skills/wix-headless/references/BUILD-own-build.md +167 -0
  14. package/skills/wix-headless/references/BUILD.md +50 -252
  15. package/skills/wix-headless/references/DESIGN_SYSTEM.md +94 -34
  16. package/skills/wix-headless/references/DISCOVERY-connect.md +55 -0
  17. package/skills/wix-headless/references/DISCOVERY-create.md +238 -0
  18. package/skills/wix-headless/references/DISCOVERY.md +41 -422
  19. package/skills/wix-headless/references/PLAN-connect.md +19 -0
  20. package/skills/wix-headless/references/PLAN-create.md +17 -0
  21. package/skills/wix-headless/references/PLAN.md +37 -27
  22. package/skills/wix-headless/references/SEED.md +27 -18
  23. package/skills/wix-headless/references/SETUP.md +32 -213
  24. package/skills/wix-headless/references/astro/blog/BLOG_PAGES.md +5 -4
  25. package/skills/wix-headless/references/astro/bookings/COMPONENTS.md +45 -0
  26. package/skills/wix-headless/references/astro/bookings/SERVICES_PAGES.md +58 -0
  27. package/skills/wix-headless/references/astro/cms/CMS_FOUNDATIONS.md +5 -5
  28. package/skills/wix-headless/references/astro/cms/FAQ_KNOWLEDGE_BASE.md +10 -10
  29. package/skills/wix-headless/references/astro/cms/PORTFOLIO.md +12 -13
  30. package/skills/wix-headless/references/astro/cms/RESOURCE_LIBRARY.md +10 -12
  31. package/skills/wix-headless/references/astro/cms/TEAM_DIRECTORY.md +8 -8
  32. package/skills/wix-headless/references/astro/designer/INSTRUCTIONS.md +47 -27
  33. package/skills/wix-headless/references/astro/ecom/CART_PAGES.md +7 -8
  34. package/skills/wix-headless/references/astro/ecom/CART_WIRING.md +5 -5
  35. package/skills/wix-headless/references/astro/ecom/COMPONENTS_CSS.md +3 -3
  36. package/skills/wix-headless/references/astro/forms/CONTACT_FORM.md +5 -19
  37. package/skills/wix-headless/references/astro/gift-cards/COMPONENTS.md +2 -2
  38. package/skills/wix-headless/references/astro/gift-cards/PAGES.md +1 -1
  39. package/skills/wix-headless/references/astro/stores/BACK_IN_STOCK.md +6 -6
  40. package/skills/wix-headless/references/astro/stores/CATEGORY_PAGES.md +4 -4
  41. package/skills/wix-headless/references/astro/stores/COMPONENTS_CSS.md +3 -3
  42. package/skills/wix-headless/references/astro/stores/HOME_AND_NAV.md +3 -3
  43. package/skills/wix-headless/references/astro/stores/PRODUCT_PAGES.md +9 -9
  44. package/skills/wix-headless/references/astro/stores/SHARED_WIRING.md +5 -4
  45. package/skills/wix-headless/references/astro/templates/Footer.astro +1 -1
  46. package/skills/wix-headless/references/astro/templates/Layout.astro +1 -1
  47. package/skills/wix-headless/references/astro/templates/Navigation.astro +1 -1
  48. package/skills/wix-headless/references/astro/templates/astro.config.mjs +1 -1
  49. package/skills/wix-headless/references/astro/templates/bookings/AvailabilityCalendar.tsx +233 -0
  50. package/skills/wix-headless/references/astro/templates/bookings/BookingForm.tsx +136 -0
  51. package/skills/wix-headless/references/astro/templates/bookings/SeoTags.astro +25 -0
  52. package/skills/wix-headless/references/astro/templates/bookings/ServiceBookingFlow.tsx +54 -0
  53. package/skills/wix-headless/references/astro/templates/bookings/ServiceCard.astro +45 -0
  54. package/skills/wix-headless/references/astro/templates/bookings/booking-confirmation.astro +49 -0
  55. package/skills/wix-headless/references/astro/templates/bookings/bookingDriver.ts +245 -0
  56. package/skills/wix-headless/references/astro/templates/bookings/components-bookings.css +356 -0
  57. package/skills/wix-headless/references/astro/templates/bookings/services/[slug].astro +133 -0
  58. package/skills/wix-headless/references/astro/templates/bookings/services/index.astro +73 -0
  59. package/skills/wix-headless/references/astro/templates/global.css +2 -2
  60. package/skills/wix-headless/references/astro/templates/index.astro +1 -1
  61. package/skills/wix-headless/references/blog/BLOG_CONTENT.md +19 -9
  62. package/skills/wix-headless/references/blog/INSTRUCTIONS.md +3 -3
  63. package/skills/wix-headless/references/bookings/FLOW.md +185 -0
  64. package/skills/wix-headless/references/bookings/INSTRUCTIONS.md +90 -0
  65. package/skills/wix-headless/references/bookings/SERVICES_DATA.md +295 -0
  66. package/skills/wix-headless/references/cms/CMS_FOUNDATIONS.md +4 -2
  67. package/skills/wix-headless/references/cms/INSTRUCTIONS.md +27 -1
  68. package/skills/wix-headless/references/commands/known-apps.json +2 -1
  69. package/skills/wix-headless/references/custom/CONNECTION_PLAN.md +142 -0
  70. package/skills/wix-headless/references/custom/INSTRUCTIONS.md +71 -21
  71. package/skills/wix-headless/references/custom/blog/WIRING.md +52 -0
  72. package/skills/wix-headless/references/custom/bookings/WIRING.md +146 -0
  73. package/skills/wix-headless/references/custom/cms/WIRING.md +97 -0
  74. package/skills/wix-headless/references/custom/ecom/WIRING.md +67 -0
  75. package/skills/wix-headless/references/custom/forms/WIRING.md +101 -0
  76. package/skills/wix-headless/references/custom/stores/WIRING.md +80 -0
  77. package/skills/wix-headless/references/ecom/INSTRUCTIONS.md +5 -5
  78. package/skills/wix-headless/references/forms/INSTRUCTIONS.md +2 -2
  79. package/skills/wix-headless/references/gift-cards/INSTRUCTIONS.md +3 -3
  80. package/skills/wix-headless/references/images/INSTRUCTIONS.md +16 -15
  81. package/skills/wix-headless/references/seed-recipes.md +2 -2
  82. package/skills/wix-headless/references/shared/AGENTS_MD.md +47 -0
  83. package/skills/wix-headless/references/shared/AUTHENTICATION.md +3 -5
  84. package/skills/wix-headless/references/shared/DESIGN_MD.md +85 -0
  85. package/skills/wix-headless/references/shared/IMAGE_GENERATION.md +29 -28
  86. package/skills/wix-headless/references/shared/IMPLEMENTER.md +87 -27
  87. package/skills/wix-headless/references/shared/PRODUCTION_SHARP_EDGES.md +2 -2
  88. package/skills/wix-headless/references/shared/RETURN_CONTRACT.md +24 -313
  89. package/skills/wix-headless/references/shared/STYLING.md +8 -18
  90. package/skills/wix-headless/references/stores/INSTRUCTIONS.md +39 -9
  91. package/skills/wix-headless/references/stores/PRODUCT_CATALOG_DATA.md +17 -14
  92. package/skills/wix-headless/references/verticals/_schema.json +1 -1
  93. package/skills/wix-headless/references/verticals/_schema.md +3 -3
  94. package/skills/wix-headless/references/verticals/blog.md +1 -1
  95. package/skills/wix-headless/references/verticals/bookings.md +39 -0
  96. package/skills/wix-headless/references/verticals/cms.md +1 -1
  97. package/skills/wix-headless/references/verticals/ecom.md +2 -2
  98. package/skills/wix-headless/references/verticals/gift-cards.md +1 -1
  99. package/skills/wix-headless/references/verticals/stores.md +1 -1
  100. package/skills/wix-headless/scripts/check-manifest.mjs +143 -6
  101. package/skills/wix-headless/scripts/compose.mjs +540 -0
  102. package/skills/wix-headless/scripts/emit-design-tokens.mjs +128 -51
  103. package/skills/wix-headless/scripts/flatten.sh +61 -0
  104. package/skills/wix-headless/scripts/generate-images.mjs +242 -0
  105. package/skills/wix-headless/scripts/scaffold.sh +47 -16
  106. package/skills/wix-headless/scripts/write-decorative-json.mjs +62 -0
  107. package/skills/wix-manage/SKILL.md +13 -1
  108. package/skills/wix-manage/references/app-installation/install-wix-apps.md +3 -27
  109. package/skills/wix-manage/references/blog/how-to-create-blog-posts.md +1 -1
  110. package/skills/wix-manage/references/bookings/create-appointment-service.md +266 -0
  111. package/skills/wix-manage/references/bookings/create-booking-service-from-prompt.md +37 -0
  112. package/skills/wix-manage/references/bookings/create-class-service.md +245 -0
  113. package/skills/wix-manage/references/bookings/create-course-service.md +249 -0
  114. package/skills/wix-manage/references/cms/cms-data-items-crud.md +3 -2
  115. package/skills/wix-manage/references/cms/cms-references-and-relationships.md +1 -1
  116. package/skills/wix-manage/references/cms/cms-schema-management.md +2 -2
  117. package/skills/wix-manage/references/domains/domain-search-and-purchase.md +10 -7
  118. package/skills/wix-manage/references/forms/create-form.md +49 -1
  119. package/skills/wix-manage/references/stores/bulk-create-products-with-options.md +1 -1
  120. package/skills/wix-manage/references/stores/create-product-from-image.md +154 -2
  121. package/skills/wix-manage/references/stores/setup-online-store-catalog-v3.md +1 -1
  122. package/skills/wix-headless/references/astro/COMPOSE.md +0 -142
  123. package/skills/wix-headless/scripts/finalize-run-json.mjs +0 -141
  124. package/skills/wix-headless/scripts/init-site-json.mjs +0 -101
  125. package/skills/wix-headless/scripts/preview.sh +0 -45
  126. package/skills/wix-headless/scripts/release.sh +0 -73
@@ -1,21 +1,23 @@
1
1
  ---
2
2
  name: design-system-designer
3
- description: "The Designer role of the wix-headless design-system phase. Picks the brand's visual identity and returns it as framework-agnostic JSON only — design tokens (palette, type, spacing, radii, content widths) plus a small block of brand-voice strings. Writes no files and makes no decision about how the design is rendered (no CSS, no Tailwind, no Astro). The orchestrator pipes data.designTokens to emit-design-tokens.mjs and hands data.shell + data.designTokens to the Composer."
3
+ description: "The Designer role of the wix-headless design-system phase. Picks the brand's visual identity and authors it as DESIGN.md — the single, portable design-token format (palette, type, spacing, rounded, content widths) plus a small block of brand-voice strings. Writes DESIGN.md directly (its only file, at the dispatch's designMdPath) and returns just data.shell + the designMdPath, so the orchestrator never re-emits the tokens. emit-design-tokens.mjs reads DESIGN.md's frontmatter and projects .wix/design-tokens.css + .wix/site.d.ts; compose.mjs (astro) reads DESIGN.md to write the design-system files. Makes no rendering decision (no CSS, no Tailwind, no Astro)."
4
4
  ---
5
5
 
6
6
  # Designer — the design itself
7
7
 
8
- You are the **Designer**. You decide *what the brand looks like*. You do **not** decide *how that becomes code* — that is the Composer's job, downstream of you.
8
+ You are the **Designer**. You decide *what the brand looks like* and express it as a **`DESIGN.md`** — the single design-token format the whole pipeline reads. You do **not** decide *how that becomes code* — that is `compose.mjs`'s job (astro), downstream of you.
9
9
 
10
- You return **JSON only**. You **write no files**. You make **no** decision about how the design is rendered: no CSS, no Tailwind, no `@theme`, no `--var` naming, no Astro/React, no file layout, no View-Transitions, no `@apply`, no markup. Anything that would differ between one frontend framework and another is, by definition, not yours.
10
+ You author **`DESIGN.md`** (its YAML frontmatter is the spec) — see "What you write and return". `DESIGN.md` is the **only** file you write — no CSS, no site files, and you run no scripts (`emit-design-tokens.mjs` projects the token CSS from your frontmatter; `compose.mjs` authors the astro files). You make **no** decision about how the design is rendered: no CSS, no Tailwind, no `@theme`, no `--var` naming, no Astro/React, no file layout, no View-Transitions, no `@apply`, no markup. Anything that would differ between one frontend framework and another is, by definition, not yours.
11
11
 
12
- Your output is small and mostly thinking: a coherent, complete brand visual expressed as a token spec, plus a handful of brand-voice strings. Speed comes from staying in this lane — a small JSON return, not files.
12
+ Your output is small and mostly thinking: a coherent, complete brand visual expressed as `DESIGN.md` frontmatter, plus a handful of brand-voice strings (returned as `data.shell`). Speed comes from staying in this lane — one small spec file + a small return, not site files.
13
+
14
+ > **DESIGN.md is the single design artifact — there is no separate "design tokens" JSON contract.** What you author *is* the DESIGN.md frontmatter (DESIGN.md vocabulary: `colors` / `typography` / `spacing` / `rounded` / `containers` / `googleFontsHref`). **You write `DESIGN.md` directly**; `emit-design-tokens.mjs` then projects `.wix/design-tokens.css` + `.wix/site.d.ts` from its frontmatter; `compose.mjs` (astro) reads the same frontmatter to write the site files; non-astro frontends import the token CSS. Because the **frontmatter** is what every consumer reads, your completeness bar is the whole game — a thin spec yields a thin DESIGN.md.
13
15
 
14
16
  ## Self-Loading
15
17
 
16
- Read `<SKILL_ROOT>/references/shared/RETURN_CONTRACT.md` for the structured-return format. That is the only doc you need. Do **not** read `STYLING.md`, `COMPOSE.md`, the templates, or any `.astro`/`.css` file — those are application concerns the Composer owns. No REST calls, no MCP, no tool discovery: this role is pure judgment.
18
+ Read `<SKILL_ROOT>/references/shared/DESIGN_MD.md` — the **DESIGN.md format spec** (the token groups, value types, the color roles you must fill). Read `<SKILL_ROOT>/references/shared/RETURN_CONTRACT.md` for the structured-return envelope. Those two are the only docs you need. Do **not** read `STYLING.md`, the templates, or any `.astro`/`.css` file — those are application concerns `compose.mjs` owns. No REST calls, no MCP, no tool discovery: this role is pure judgment.
17
19
 
18
- **Do NOT `Read .wix/site.json`.** Every input is inlined in your prompt (see Inputs). The file may not exist yet when you run, and it is not a coordination channel.
20
+ **Every input is inlined in your prompt (see Inputs).** Don't depend on mutable shared state — it is not a coordination channel.
19
21
 
20
22
  ## Inputs (entirely from your prompt)
21
23
 
@@ -26,24 +28,72 @@ Read `<SKILL_ROOT>/references/shared/RETURN_CONTRACT.md` for the structured-retu
26
28
  - **Mood** — personality and visual elements.
27
29
  - **Page color strategy** — Uniform Light / Uniform Dark / Defined Hybrid.
28
30
 
29
- You do **not** receive (and do not need) loaded packs, navigation links, disabled packs, or "packs with components" — those are application inputs the orchestrator routes to the Composer, not to you. Your spec is the same regardless of which verticals load: a brand looks the way it looks whether it sells coffee or publishes essays.
31
+ You do **not** receive (and do not need) loaded packs, navigation links, disabled packs, or "packs with components" — those are application inputs routed to `compose.mjs`, not to you. Your DESIGN.md is the same regardless of which verticals load: a brand looks the way it looks whether it sells coffee or publishes essays.
32
+
33
+ ## What you write and return
34
+
35
+ **You write exactly one file — `DESIGN.md`.** Author it at the absolute path your dispatch gives as `designMdPath` (the run's CWD — e.g. `<site-root>/DESIGN.md`). It is your design spec: **YAML frontmatter** (the token vocabulary below) + a short documentation body. You do **not** write CSS, site files, or run any script — `emit-design-tokens.mjs` reads your frontmatter and projects `.wix/design-tokens.css` + `.wix/site.d.ts`, and `compose.mjs` (astro) reads it to write the site files. Authoring `DESIGN.md` directly (rather than returning tokens inline) keeps the palette/type data out of the orchestrator's output stream entirely.
36
+
37
+ **Frontmatter format — it MUST be machine-parseable** (a restricted-YAML parser reads it, not a full YAML engine — get these exactly right or tokens are silently lost):
38
+ - Open the file with `---` on its own line and close the frontmatter with `---`.
39
+ - **QUOTE every string value with double quotes — especially hex colors** (`paper: "#FFFBF0"`). An unquoted `#hex` after `: ` is read as a YAML comment and the token vanishes.
40
+ - **2-space indent** for nested groups. `typography` entries may use an indented `fontFamily:` line or flow style `{ fontFamily: "..." }`.
41
+ - Groups: `colors`, `typography`, `spacing`, `rounded`, `containers`; plus the top-level `googleFontsHref`. Fill every color role (completeness is your bar — see below).
42
+
43
+ **The `DESIGN.md` you write** (frontmatter is canonical; the body is documentation, never parsed):
30
44
 
31
- ## What you return
45
+ ```markdown
46
+ ---
47
+ version: alpha
48
+ name: "<brand>"
49
+ colors:
50
+ paper: "#..."
51
+ paper-warm: "#..."
52
+ ink: "#..."
53
+ ink-soft: "#..."
54
+ mute: "#..."
55
+ rule: "#..."
56
+ accent: "#..."
57
+ cream: "#..."
58
+ error: "#..."
59
+ typography:
60
+ display: { fontFamily: "..." }
61
+ body: { fontFamily: "..." }
62
+ spacing:
63
+ 2xs: "..."
64
+ xs: "..."
65
+ sm: "..."
66
+ md: "..."
67
+ lg: "..."
68
+ xl: "..."
69
+ 2xl: "..."
70
+ 3xl: "..."
71
+ 4xl: "..."
72
+ rounded:
73
+ sm: "..."
74
+ md: "..."
75
+ containers:
76
+ prose: "..."
77
+ md: "..."
78
+ 3xl: "..."
79
+ 6xl: "..."
80
+ googleFontsHref: "https://fonts.googleapis.com/css2?family=...&display=swap"
81
+ ---
82
+ # <brand> — design tokens
32
83
 
33
- A single fenced JSON block per `<SKILL_ROOT>/references/shared/RETURN_CONTRACT.md`, last content in your message:
84
+ The YAML frontmatter above is the canonical, machine-read design spec
85
+ (format: `references/shared/DESIGN_MD.md`). This body is documentation only
86
+ and is never parsed.
87
+ ```
88
+
89
+ **Then RETURN** a single fenced JSON block per `<SKILL_ROOT>/references/shared/RETURN_CONTRACT.md` (last content in your message) — carrying `data.shell` (brand-voice strings, kept out of `DESIGN.md`) + the `designMdPath` you wrote. Do **not** echo the tokens inline — they live in `DESIGN.md`:
34
90
 
35
91
  ```json
36
92
  {
37
93
  "status": "complete",
38
94
  "phase": "design-system",
39
95
  "data": {
40
- "designTokens": {
41
- "colors": { "...": "..." },
42
- "fonts": { "display": "...", "body": "..." },
43
- "spacing": { "...": "..." },
44
- "radii": { "...": "..." },
45
- "containers": { "...": "..." }
46
- },
96
+ "designMdPath": "<the absolute DESIGN.md path you wrote>",
47
97
  "shell": {
48
98
  "heroHeadline": "...",
49
99
  "heroSub": "...",
@@ -54,17 +104,20 @@ A single fenced JSON block per `<SKILL_ROOT>/references/shared/RETURN_CONTRACT.m
54
104
  }
55
105
  ```
56
106
 
57
- ### `data.designTokens` — the visual values
107
+ ### DESIGN.md frontmatter — the token groups you author
108
+
109
+ Concrete values with **semantic roles**, in the DESIGN.md vocabulary (`DESIGN_MD.md` is the full spec). Use these exact group + key names — they are the contract `emit-design-tokens.mjs` projects to CSS variables and `compose.mjs` reads:
58
110
 
59
- Concrete values with **semantic roles**, framework-agnostic. The bare key names below are a contract (the Composer maps them to the framework's vocabulary, and the orchestrator's `emit-design-tokens.mjs` projects them to CSS variables), so use these names:
111
+ - **`colors`** — a complete palette covering semantic roles, not just brand accents. **All six core roles are required** (emit every one): `paper` (primary background), `paper-warm` (secondary surface), `ink` (primary text / dark fills), `mute` (muted text), `rule` (borders / dividers), `accent` (brand emphasis). Also emit the recommended `ink-soft`, `cream`, `error`. Every value a concrete hex string. These wix-native role names are valid DESIGN.md color tokens — use them directly. **Map the approved palette to roles — do not re-pick hues.** The **accent** hex from the Color palette input → `accent`; the dominant **background** → `paper`; the primary **text** → `ink`. The remaining roles (`paper-warm`, `ink-soft`, `mute`, `rule`, `cream`, `error`) are **tonal derivatives of that approved palette** — lighten/darken/desaturate **within the same hue family**, never a new hue and never a generic editorial default set. **`compose.mjs` derives a missing role only as a last-resort fail-safe** (e.g. `ink-soft` ≈ `ink` lightened) — that yields a less intentional palette, so completeness is on you.
112
+ - **`typography`** — a map of levels to type tokens. **Use the exact `display` and `body` font families from the Typography input, verbatim** — no substitution, no "better" pairing, no swapping the approved serif for a different serif. The families are **given to you, not chosen by you**; you decide only `fontSize`/`fontWeight`/`lineHeight`/`letterSpacing` (optional — the wix pipeline consumes only `fontFamily`). Each level is `{ "fontFamily": "<the given family>" }` (e.g. `"Fraunces"`, `"Inter"`). Add `mono` only if the brand needs it.
113
+ - **`googleFontsHref`** (top-level key in `data.design`) — the **ready** Google Fonts stylesheet href for the **given** `display` + `body` families, with the weight/optical axes each family actually supports. Emit the finished URL for those exact families: e.g. `"https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,400;0,9..144,600&family=Inter:wght@400;500;600&display=swap"`. If **both** families are system fonts (`system-ui`, `sans-serif`, etc.), emit `""` (the `<link>` is dropped). (If you omit it, `compose.mjs` builds a valid fallback with a standard 400–700 weight set, but the family-specific axes are lost — so emit it.)
114
+ - **`spacing`** — a full rhythm scale, every step `2xs` through `4xl` (`2xs, xs, sm, md, lg, xl, 2xl, 3xl, 4xl`), each a concrete length (e.g. `"1rem"`). The brand's spacing rhythm, not container widths.
115
+ - **`rounded`** — corner radii (DESIGN.md's name for radius tokens): `sm` and `md` required; `lg`, `xl` if the brand uses larger curves. Concrete lengths.
116
+ - **`containers`** — content/reading widths (a DESIGN.md extension this skill uses), **conceptually separate from spacing**: `prose` (a readable text column, ~`42rem`), plus `md`, `3xl`, `6xl` as page max-widths. Widths, not spacing steps — never reuse a spacing value as a container value (a reading column is ~`42rem`, not `5rem`).
60
117
 
61
- - **`colors`** — a complete palette covering semantic roles, not just brand accents. Provide at minimum: `paper` (primary background), `paper-warm` (secondary surface), `ink` (primary text / dark fills), `mute` (muted text), `rule` (borders / dividers), `accent` (brand emphasis). Recommended: `ink-soft`, `cream`, `error`. Every value a concrete hex. Derive from the aesthetic direction and seed palette — never a generic default set.
62
- - **`fonts`** — `display` and `body` family names (e.g. `"Fraunces"`, `"Inter"`). Add `mono` only if the brand needs it.
63
- - **`spacing`** — a full rhythm scale, every step from `2xs` through `4xl` (`2xs, xs, sm, md, lg, xl, 2xl, 3xl, 4xl`), each a concrete length (e.g. `"1rem"`). This is the spacing rhythm of the brand, not container widths.
64
- - **`radii`** — corner rounding: `sm` and `md` required; `lg`, `xl` if the brand uses larger curves. Concrete lengths.
65
- - **`containers`** — content/reading widths, **conceptually separate from spacing**: `prose` (a readable text column, ~`42rem`), plus `md`, `3xl`, `6xl` as page max-widths. These are widths, not spacing steps — never reuse a spacing value as a container value (a reading column is ~`42rem`, not `5rem`).
118
+ **Page color strategy + mood are binding, not advisory.** The **Page color strategy** input sets `paper`/`ink` polarity: *Uniform Light* ⇒ light `paper` + dark `ink`; *Uniform Dark* ⇒ dark `paper` + light `ink`; *Defined Hybrid* ⇒ the dominant surface is `paper`, with a strong contrasting `paper-warm` for alternating sections. The **Mood** input governs saturation/contrast — e.g. "premium / restrained" ⇒ low-chroma neutrals; "bold / playful" ⇒ higher contrast and chroma. Honor both; don't override the approved direction with your own taste.
66
119
 
67
- **Completeness is your bar.** The spec must describe a coherent, complete brand visual: every role above filled with an intentional value. If a color/spacing/width would plausibly be needed to render the brand, include it. A thin or generic spec forces the Composer to invent values — the failure this split exists to prevent. You do not need to know *which* utilities downstream pages use; provide a full, well-chosen scale and the contract is satisfied.
120
+ **Completeness is your bar.** The DESIGN.md must describe a coherent, complete brand visual: every role above filled with an intentional value, faithful to the approved Aesthetic direction / palette / typography / mood / page color strategy from the plan. Your job is to **expand the approved direction into a full token set**, not to redesign it. A thin or generic spec forces `compose.mjs` to invent values — the failure this split exists to prevent. You do not need to know *which* utilities downstream pages use; provide a full, well-chosen scale and the contract is satisfied.
68
121
 
69
122
  ### `data.shell` — brand-voice strings
70
123
 
@@ -75,28 +128,34 @@ A few short strings in the brand's voice (no markup, no HTML):
75
128
  - **`footerTagline`** — a short footer tagline.
76
129
  - **`navBrandMark`** — the wordmark text shown in the nav (usually the brand name, optionally stylized as plain text).
77
130
 
78
- These are *copy*, not layout. Where they go and how they're styled is the Composer's call.
131
+ These are *copy*, not layout. Where they go and how they're styled is `compose.mjs`'s call.
79
132
 
80
133
  ## The boundary (one line)
81
134
 
82
- You pick *what the brand looks like* — "surface/paper = `#FAF6EF`", "display face = Fraunces", "reading column ≈ 42rem", "hero headline = …". Turning any of that into `--color-paper` inside an `@theme` block, into a Google Fonts `<link>`, into `max-w-prose`, or into markup is the **Composer's** decision. When in doubt: if it's a value or a phrase, it's yours; if it's a file, a class, a variable name, or a tag, it's not.
135
+ You pick *what the brand looks like* — "paper = `#FAF6EF`", "display face = Fraunces", "reading column ≈ 42rem", "hero headline = …". Turning any of that into `--color-paper` inside an `@theme` block, into the Layout's `<link>` **element**, into `max-w-prose`, or into markup is `compose.mjs`'s decision. When in doubt: if it's a value or a phrase, it's yours; if it's a file, a class, a variable name, or a tag, it's not. (The one URL you do emit — `googleFontsHref` — is a *value*: which families + axes to load is a design choice. `compose.mjs` still decides whether and where to place the `<link>` that uses it.)
83
136
 
84
137
  ## Anti-patterns
85
138
 
86
139
  | WRONG | CORRECT |
87
140
  |---|---|
88
- | Write `global.css`, `Layout.astro`, or any file | Return JSON only — the Composer authors files |
89
- | Emit an `@theme` block, `--color-*` names, or Tailwind utilities | Return bare-key `designTokens` values; the Composer maps them |
90
- | Decide CSS structure, View-Transitions, `@apply`, markers, file layout | All application — the Composer's domain |
91
- | `Read .wix/site.json`, `STYLING.md`, templates, or `.astro` files | Every input is inlined; read only `RETURN_CONTRACT.md` |
92
- | Branch on framework (astro vs custom) or loaded packs | The spec is framework- and pack-blind by construction |
141
+ | Write `global.css`, token CSS, or any **site** file | Write **only** `DESIGN.md` (your design spec) — `emit-design-tokens.mjs` projects the token CSS from it, `compose.mjs` authors site files |
142
+ | Echo the tokens inline in your return | They live in `DESIGN.md`; return only `data.shell` + the `designMdPath` you wrote (keeps the tokens out of the orchestrator's output) |
143
+ | Unquoted hex in frontmatter (`paper: #FFFBF0`) | Quote every string value (`paper: "#FFFBF0"`) — an unquoted `#hex` parses as a comment and the token is lost |
144
+ | Emit an `@theme` block, `--color-*` names, or Tailwind utilities | Return DESIGN.md frontmatter (`colors`/`typography`/`spacing`/`rounded`/`containers`); `compose.mjs` maps them |
145
+ | Return the old `designTokens` shape (`fonts`, `radii`) | Use the DESIGN.md vocabulary: `typography` (with `fontFamily`), `rounded` — there is no separate token JSON anymore |
146
+ | Decide CSS structure, View-Transitions, `@apply`, markers, file layout | All application — `compose.mjs`'s domain |
147
+ | Read `STYLING.md`, templates, or `.astro` files | Every input is inlined; read only `DESIGN_MD.md` + `RETURN_CONTRACT.md` |
148
+ | Branch on framework (astro vs custom) or loaded packs | The DESIGN.md is framework- and pack-blind by construction |
93
149
  | Alias a container width to a spacing value | `containers.prose` ≈ `42rem`; `spacing.3xl` ≈ `5rem` — different axes |
94
150
  | Ship a thin palette ("downstream will add what it needs") | Completeness is the contract — fill every semantic role |
151
+ | Substitute or "upgrade" the display/body family (swap the approved Fraunces for Playfair) | Use the exact `display`/`body` families from the Typography input verbatim; you choose only weights/axes |
152
+ | Introduce a hue not in the approved palette for `paper`/`ink`/`accent`, or "improve" the brand color | `accent` = approved accent hex, `paper` = approved background, `ink` = approved text; other roles are tonal variants of those |
153
+ | Return light `paper` on a "Uniform Dark" strategy | Page color strategy sets `paper`/`ink` polarity — Uniform Dark ⇒ dark `paper` |
95
154
  | Trailing prose after the JSON block | The fenced JSON is the last content in your message |
96
155
 
97
156
  ## Prompt template (the orchestrator dispatches the Designer with this)
98
157
 
99
- `.wix/site.json` does not exist yet when the Designer runs (`init-site-json.mjs` runs only after user approval), so the Designer cannot read brand + verticals from it. Every input is passed inline — this instruction file forbids reading `site.json` and takes every input from the prompt.
158
+ Every input is passed inline — this instruction file takes brand, verticals, and every other input from the prompt, never from shared state. The **Typography** and **Color palette** lines are **constraints, not suggestions** (the user approved them in the plan): use those exact font families and map those exact hues to roles per `data.design` above — do not substitute your own.
100
159
 
101
160
  ```
102
161
  Instruction file (absolute path): <SKILL_ROOT>/references/DESIGN_SYSTEM.md
@@ -107,9 +166,10 @@ Color palette: <hex codes>
107
166
  Typography: { "display": "<font>", "body": "<font>" }
108
167
  Mood: <personality / visual elements>
109
168
  Page color strategy: <Uniform Light | Uniform Dark | Defined Hybrid>
169
+ designMdPath: <absolute path to author DESIGN.md, e.g. <site-root>/DESIGN.md>
110
170
 
111
171
  Auth: not required (frontend-only).
112
172
 
113
- Return JSON only — data.designTokens + data.shell. Write no files.
114
- Do NOT read .wix/site.json — it is not yet written and every input is inlined above.
173
+ Author DESIGN.md at the provided designMdPath; return only data.shell + designMdPath. Do not echo tokens inline.
174
+ Every input is inlined above — don't depend on mutable shared state.
115
175
  ```
@@ -0,0 +1,55 @@
1
+ # Discovery — connect operation (custom)
2
+
3
+ Reached when `operation === "connect"` — the user brought a finished, working site (Claude Design or any tool) and wants it connected to Wix (today this implies `frontend: custom`, `frontendBuild: none`). The shared Wave-0 field resolution + CLI-auth pre-flight live in `DISCOVERY.md`; this file is the connect discovery (parse → infer → light plan → approval). Run FLOW (when/order/gate) is owned by `PLAN-connect.md`.
4
+
5
+ **Input processing:** the brought-in site — parsed, not interviewed. **Plan shape:** a light plan (detected-site summary + what to wire/add + apps), not the astro Design-Direction card.
6
+
7
+ Discovery here **parses the site instead of interviewing**, then hands off to the connect flow (`references/custom/INSTRUCTIONS.md`). Do **not** run brand suggestions, vibe, imagery, the Designer, or the scaffold.
8
+
9
+ After the Pre-flight auth check (`DISCOVERY.md` § "Pre-flight"), run connect discovery:
10
+
11
+ ## 1 · Read the site (primary signal)
12
+
13
+ Read the entry HTML (and other pages) — markup, copy, headings/`<title>`, `<form>`s, repeated structures, and the CSS custom-property token block (`:root { --… }`). **Opportunistic enrichment:** if a Claude-Design handoff bundle is present (`README.md`, `chats/` transcript), read it to sharpen intent — but never require it; the inference must stand on markup alone.
14
+
15
+ ## 1.5 · Resolve the framework-build-class (`frontendBuild`)
16
+
17
+ `connect` is framework-blind, but the **Build** layer routes on `frontendBuild` — so resolve it here from the brought-in project (durable disk signal) and hold it in scratch as part of the Plan→Build contract core. **`frontend` stays `custom`** for every non-astro brought-in frontend; only `frontendBuild` distinguishes how Build installs/builds/wires:
18
+
19
+ | Signal on disk | `frontendBuild` | What Build does |
20
+ |---|---|---|
21
+ | Loose `index.html` + CSS/JS, **no `package.json` build script** | `none` | CDN `@wix/sdk`, no build, release the HTML as-is (the original static path) |
22
+ | `package.json` with a `scripts.build` **AND** a client bundler/framework dep (`vite`, `@vitejs/*`, `react`/`react-dom`, `vue`, `svelte`/`@sveltejs/*`, `webpack`, `parcel`, `rollup`, `esbuild`) **AND** an entry HTML that loads **un-built source** (e.g. `<script type="module" src="/src/main.jsx">`) | `own` | bundled `npm install @wix/sdk`, source-edit wiring, the project's own `npm run build` → `dist/`, then release |
23
+ | `@astrojs/*`/`astro` dep with an astro build *(a brought-in astro project)* | `wix` | *out of SPA-plan scope — not yet exercised; the framework-blind connect flow does not forbid it, but Build's astro tenant assumes a scaffold. Treat as `own` (run its own build) unless/until a dedicated path lands.* |
24
+
25
+ - Read `package.json` once (if present) + the entry HTML. The **un-built-source entry** is the decisive signal: a built `dist/index.html` referencing hashed bundles is *not* `own` to re-build blindly — but a brought-in SPA repo with `src/` + a build script is.
26
+ - Record `frontendBuild` in orchestrator scratch (contract core, `PLAN.md` § "The Plan→Build contract"). It is **not** persisted to disk — on scratch loss it is recovered by re-reading `package.json` (this same signal).
27
+ - Pass the resolved `frontendBuild` into the connection-plan dispatch (it tells the planner to read rendered markup for `none` vs un-built `src/**` for `own` — `CONNECTION_PLAN.md` § "What to read").
28
+
29
+ ## 2 · Infer the domain → capability
30
+
31
+ Map the site's purpose to the Wix capability + apps using the table in `references/custom/INSTRUCTIONS.md` § "Always connect" (wedding invite → RSVP/Wix Forms; store mock → Wix Stores; **app with client/local state — todo, notes, tracker, planner — → CMS persistence swap (`@wix/data`)**; etc.). **Always connect:** if the site has no dynamic region, pick the connected feature its purpose implies; the universal floor is a Wix Forms contact/lead form — **but a client-state app maps to a CMS persistence swap, not the contact-form floor** (the connection planner detects this from source; see `CONNECTION_PLAN.md` § "(c) Persistence swap"). Also infer the **brand** (from `<title>`/copy) for scratch and any seeded-content naming.
32
+
33
+ ## 3 · Present a light plan, then approval
34
+
35
+ Same discipline as the create path (`DISCOVERY-create.md` § "Step 3" / `PLAN-create.md`): **present the plan as its own message first, then ask for approval as a separate step.** The connect plan is *light* (no Design Direction — the user already designed it), but it still shows the user what will happen before they commit. Structure:
36
+
37
+ - **What I found** — one line: the site's type/purpose + the pages/regions detected (e.g. *"A static wedding invitation — hero, date, venue, closing. No RSVP, no dynamic content."*).
38
+ - **What I'll connect** — what you'll **wire** (existing dynamic regions → a Wix entity), what you'll **add** (the connected component the purpose implies), or what you'll **persist** (a client-state app's data layer → a Wix CMS collection), plus the **apps** to install. (e.g. *"I'll install Wix Forms and add an RSVP form styled to match the invitation."*; or *"I'll move your to-do storage into a Wix CMS collection so it persists on Wix — note it'll be shared across everyone who visits, not per-user."*)
39
+
40
+ > **Persistence-swap honesty.** When the connection is a persistence swap (a client-state app), the plan must state plainly that the data is **shared/public across all visitors**, not per-user — the visitor token has no per-user identity (`INSTRUCTIONS.md` § "Scope — deferred"). Say it in the plan, before approval.
41
+
42
+ Then, as a separate step, ask for approval (`AskUserQuestion`): *"Ready to connect it?"* — Options: **Yes, connect it** / **Adjust something**. If the user adjusts (different capability, skip the augmentation, etc.), handle it conversationally and re-present.
43
+
44
+ > Example combined shape — present this as the plan message, then ask the approval question:
45
+ > *"This is a wedding invitation with no RSVP. I'll install Wix Forms, add an RSVP form styled to match, and publish it live."*
46
+
47
+ ## 4 · After approval — hold the contract in scratch
48
+
49
+ Hold the captured contract in orchestrator scratch — nothing is written to disk:
50
+
51
+ - `frontend: custom`. The **`frontendBuild`** that drives Build was resolved in § 1.5 (`none` for static HTML, `own` for a framework SPA) and lives in **scratch** alongside `operation` (the in-agent contract, `PLAN.md` § "The Plan→Build contract"). `none` makes the conductor skip the build at release; `own` makes it run the project's own `npm run build` first.
52
+ - `verticals` = the inferred capability set (e.g. `"forms"`, `"stores,ecom"`, or `"cms"` for a client-state persistence swap).
53
+ - `brand` (from § 2) + the one-line site summary, for seeded-content naming and the end-of-run `AGENTS.md`.
54
+
55
+ Then hand to `BUILD.md` — it routes Build on `frontendBuild` (`none` or `own`, from § 1.5) to `BUILD-own-build.md`. The frontend-track playbook is `references/custom/INSTRUCTIONS.md`; `PLAN-connect.md` owns the pre-approval routing.
@@ -0,0 +1,238 @@
1
+ # Discovery — create operation
2
+
3
+ Reached when `operation === "create"` (a create-a-new-site prompt in an empty CWD — the skill writes the site). Shared Wave-0 field resolution + CLI-auth pre-flight live in `DISCOVERY.md`; this file is the create interview → plan → approval. Run FLOW is owned by `PLAN-create.md`.
4
+
5
+ Create has two framework branches (Wave 0 resolved which). The default is **`frontendBuild: wix`** (astro — the rest of this file). The minority **`frontendBuild: own`** (a framework SPA — the prompt named `vite`/`react`/`vue`/`svelte`) runs the interview + Designer but skips the astro-only steps — see § "Framework-SPA variant" at the end.
6
+
7
+ ---
8
+
9
+ ## Step 0 — Infer vertical(s) + business context
10
+
11
+ The opening message usually names what they want (*"build me a skincare store"*, *"a coffee shop website"*). Extract:
12
+ - **Vertical(s)** — which packs to load (routing table: `SKILL.md` § "When This Skill Triggers").
13
+ - **Business / product context** — feeds brand-name suggestions, vibe options, product templates, image prompts.
14
+
15
+ If too vague to infer a vertical (*"build me a site"*), ask **one conversational clarifier** (NOT `AskUserQuestion`): *"What do you want your site to do — sell things, publish content, take bookings?"* Only if you genuinely cannot infer. **Do not ask what features they want** — features follow from the vertical; the user adjusts at the plan.
16
+
17
+ ---
18
+
19
+ ## Step 1 — Brand name
20
+
21
+ `AskUserQuestion`, single-select. Generate **3–4 names** relevant to the business + a "Type my own" option:
22
+
23
+ > *"What should we call your brand?"*
24
+
25
+ Names: short (1–3 words), memorable, mixed styles (one punchy/modern, one descriptive, one abstract); avoid generic filler. If they pick "Type my own", follow up conversationally. **If the brand is already named in the opening message, skip this step.**
26
+
27
+ ### After Q1 — read the loaded packs + prepare scaffold inputs
28
+
29
+ The scaffold is **not** dispatched here — it fires post-approval (`BUILD-astro.md` run-step 0) so the funnel presents the plan without waiting. This section only prepares inputs.
30
+
31
+ **(a) Read every pack in the resolved set, at once.** The resolved set is SKILL.md § "When this skill triggers" (third column) — e.g. a `stores` run reads `stores.md`, `cms.md`, `ecom.md`, `gift-cards.md`. `Read <SKILL_ROOT>/references/verticals/<pack>.md` for each (individual files — `Read` on the dir is `EISDIR`). Don't read the top-level pack alone then issue a second batch for its `requires:`. These preload `routes:`/`apps:`/`requires:`/`disabled` for the Step 3 plan.
32
+
33
+ **(b) Scaffold inputs** — the command (dispatched later):
34
+
35
+ ```bash
36
+ bash <SKILL_ROOT>/scripts/scaffold.sh <folder-name> "<brand>" --frontend astro 2> <tempfile>
37
+ ```
38
+
39
+ `<frontend>` is `astro` (the only scaffolded frontend; connect/own never reach here). **Folder-name derivation** from the brand: lowercase → whitespace/punctuation runs to `-` → drop every char not `[a-z0-9-]` → trim/collapse hyphens. Must satisfy `^[a-z0-9][a-z0-9-]*$` + npm package-name validation; if the result is empty, ask the user (`AskUserQuestion`) for a folder name.
40
+
41
+ - `<brand>` (original case) is sent as `--business-name` → owns the Wix project display name + URL slug. It must contain ≥1 English letter or number (CLI rejects emoji/punctuation-only — ask for a compliant brand before scaffolding).
42
+ - `<folder-name>` controls the local dir only.
43
+ - The script passes bare `--site-template` to stay on the blank starter non-interactively (without it `@wix/create-new` ≥0.0.72 prompts and aborts in the non-TTY shell).
44
+
45
+ Examples: `"Bloom & Root"` → `bloom-root` · `"ACME, Co."` → `acme-co` · `"42 Below"` → `42-below`.
46
+
47
+ ---
48
+
49
+ ## Step 2 — Vibe
50
+
51
+ `AskUserQuestion`, single-select. Generate **4 brand-personality options** tailored to the business + "Something else":
52
+
53
+ > *"What's the vibe for [brand name]?"*
54
+
55
+ (e.g. for jewelry: Bold & premium · Clean & modern · Warm & approachable · Something else.) If "Something else", follow up with an `AskUserQuestion` text input.
56
+
57
+ ---
58
+
59
+ ## Step 2.5 — Imagery preference
60
+
61
+ Capture `imagery` in scratch — it gates AI imagery (Wix AI credits) vs CSS themed blocks. Lives only in scratch; inlined into any subagent that branches on it.
62
+
63
+ **Skip rule.** If the opening prompt mentioned imagery (*"with photos"*, *"product photos"*, *"AI imagery"*, …), skip the Q3 `AskUserQuestion` and default `imagery: "ai-generated"` (re-asking feels redundant). The credit estimate + balance fetch still run for the plan's Imagery line.
64
+
65
+ ### 2.5.1 — Credit estimate
66
+
67
+ ```
68
+ estimatedCredits =
69
+ 1 (hero) + 2 (section decoratives) + (cms loaded ? 2 : 0) // astro decorative term
70
+ + (stores loaded ? stores.productCount : 0) // default 3 when unknown
71
+ + (blog loaded ? blog.postCount : 0) // default 6 when unknown
72
+ // forms, gift-cards, and any disabled pack contribute 0
73
+ ```
74
+
75
+ The integer total is what we show. Reuse the `productCount=3` / `postCount=6` defaults from "After Approval" § 1. Example — astro coffee shop (stores + cms + blog, productCount 3, postCount 6): `1 + 2 + 2 + 3 + 6 = 14`. (The `own` decorative term differs — see § "Framework-SPA variant".)
76
+
77
+ ### 2.5.2 — Fetch the AI-credit balance
78
+
79
+ `npx @wix/cli@latest token` **without** `--site` mints an **account-scoped** token; POST it to the balance endpoint:
80
+
81
+ ```bash
82
+ ACCOUNT_TOKEN=$(npx @wix/cli@latest token) # NO --site — account-scoped
83
+ curl -sS -X POST \
84
+ -H "Authorization: Bearer $ACCOUNT_TOKEN" -H "Content-Type: application/json" -d '{}' \
85
+ "https://manage.wix.com/credit-transactions/v1/credit-transactions/get-account-balance"
86
+ ```
87
+
88
+ Hold `balance = response.periodicCredits.balance` and `cap = response.periodicCredits.cap`. **Fallbacks → set `balance = null` and proceed** (the estimate is unaffected; only the Q3 "Current balance" tail goes silent): `wix token` fails → surface it (a `wix login` problem); POST 401/403 → re-mint the account-scoped token once and retry (the site-scoped "never re-mint" rule does not apply — distinct cache); other 4xx / network error → log + `null`.
89
+
90
+ > **Don't share the token.** The account-scoped token is account-level reads only; every site-operating call uses `npx @wix/cli@latest token --site "$SITE_ID"` (`references/shared/AUTHENTICATION.md`). The two are mutually rejected.
91
+
92
+ ### 2.5.3 — Ask Q3
93
+
94
+ `AskUserQuestion`, two single-select options; interpolate `<estimatedCredits>` + balance:
95
+
96
+ > *"How should we handle imagery?"*
97
+
98
+ - **Themed blocks (Recommended)** — *"Polished CSS-only design. ~6 min build. Uses 0 Wix AI credits."*
99
+ - **AI-generated imagery** — *"Bespoke images per product and section. ~10 min build. Uses ~\<estimatedCredits\> Wix AI credits (1 image = 1 credit). Current balance: \<balance\> / \<cap\>."*
100
+
101
+ If `balance === null`, drop the trailing *"Current balance: …"* sentence entirely (don't print "unknown" — silence is the contract). Capture `imagery: "themed-blocks" | "ai-generated"` in scratch (gates consumed by `BUILD-astro.md § "Imagery gates"`).
102
+
103
+ ---
104
+
105
+ ## Craft the aesthetic direction (in scratch)
106
+
107
+ From vertical + personality + audience, craft a **2–3 sentence aesthetic direction** like a designer — decide, don't ask more questions. Example: *"For Bloom & Root, an organic editorial aesthetic — Kinfolk meets a botanical garden. Warm cream backgrounds, deep forest green accents, Playfair Display + Source Sans 3, generous whitespace."* **Do NOT print it as a standalone message** — hold it in scratch and weave it into the plan's Design Direction (printing it separately detaches the most important content; keep Q2 → plan tight).
108
+
109
+ ## The Designer's inputs
110
+
111
+ The Designer owns the design — it **authors `DESIGN.md`** (the tokens) and returns brand-voice strings; `emit-design-tokens.mjs` projects the token CSS + types from it. Inputs are **judgment-only**, produced here and held in scratch:
112
+ - **Brand** `{name, description}` (description = the opening business context, one line).
113
+ - **Aesthetic direction, palette, typography, mood, page color strategy** — from the craft step.
114
+
115
+ **Application inputs** (loaded packs, packs-with-components, disabled packs, nav links) are **not** passed to the Designer — they feed `compose.mjs` at the bridge (`BUILD-astro.md` § "2. Setup window"). Hold them in scratch. (Nav-links for stores+cms+ecom+gift-cards: `[{"href":"/about","label":"About"},{"href":"/faq","label":"FAQ"}]` — `/about`+`/faq` when `cms` loaded; never `/products` (stores splices it), `/gift-cards` (disabled), or any route whose pack contributes a nav marker.) The orchestrator dispatches the Designer **post-approval** (`BUILD-astro.md` run-step 0); its prompt template lives in `DESIGN_SYSTEM.md`.
116
+
117
+ ---
118
+
119
+ ## Step 3 — Present the plan
120
+
121
+ **Send the rendered plan as its own assistant message FIRST**, then — separately — use `AskUserQuestion` for approval. Never bundle the plan into the approval question, never replace it with a one-liner, never skip to "Ready to build?" — the user must see the rendered plan first.
122
+
123
+ **Do NOT show implementation details** (scaffolding, `npm install`, `env pull`, API calls, phase agents, designer handoffs, build steps). They care about their site. Apps, packages, and CMS collection names are implementation details — not surfaced; the loaded verticals determine apps, and the seeder names collections at run time.
124
+
125
+ The plan has two halves: a **decision card** (Sections A + B — what the user weighs in on) and a **technical scope** block (Section C + Imagery — "for free" from the loaded packs, skimmable).
126
+
127
+ **Section A — Design Direction** (lead): the aesthetic paragraph, then a compact block — aesthetic tone · palette (2–3 colors + hex) · type pairing (display + body) · mood/key visuals · page color strategy (Uniform Light / Uniform Dark / Defined Hybrid).
128
+
129
+ **Section B — Features**: 1–2 line bullets of user-facing functionality per pack; tag CMS-powered ones **(CMS-based)**. **Skip features from `disabled: true` packs** (today: `gift-cards`) — the code still ships (page + nav/home contributions) but the plan stays silent until the user enables the app. Non-disabled packs (incl. transitive ones like ecom) contribute normally.
130
+
131
+ After Section B, emit a `---` and one line: *"Technical scope below — auto-decided from the features above. Skim if you want; not required reading."*
132
+
133
+ **Section C — Pages.** Emit this header exactly, then one row per loaded pack's `routes:` entry:
134
+
135
+ ```
136
+ | Page | Route | Source |
137
+ |------|-------|--------|
138
+ ```
139
+
140
+ Compose rows from each loaded pack's `routes:` array (top-level + transitive via `requires:`) — don't hardcode, omit, or invent rows. **Skip every route from a `disabled: true` pack** (today `gift-cards`'s `/gift-cards` does not appear; the file still ships for instant dashboard activation). Per surviving entry:
141
+ - **Page** — the entry's `name:` if present, else derive from the path: `"/"`→`Home`; `"/<seg>/[slug]"`→title-case(seg, singular)+" Detail"; else title-case the last static segment, `-`→space (`/thank-you`→`Thank You`).
142
+ - **Route** — the `route:` value verbatim (or the literal `Hosted by Wix` for path-less Wix-hosted endpoints).
143
+ - **Source** — top-level pack with non-empty `apps:` → `apps[0].name`; transitive pack → walk up the `requires:` chain to the top-level puller's `apps[0].name` (so ecom's `/cart` shows `Wix Stores`); `cms` → literal `CMS (builtin)`. No `(auto)`/`(passive)` suffixes.
144
+
145
+ **Order rows by user-facing flow:** CMS pages first (Home, About, FAQ), then catalog/content, then transactional (cart, thank-you, checkout). Within a pack, preserve `routes:` declaration order.
146
+
147
+ **Imagery line** — one line below Section C: `**Imagery:** Themed blocks`, or `**Imagery:** AI-generated (~<estimatedCredits> Wix AI credits)` when Q3 captured `ai-generated`. Don't repeat the balance (shown at Q3).
148
+
149
+ ### Example (skincare ecommerce)
150
+
151
+ ```markdown
152
+ Here's my plan for **Bloom & Root**:
153
+
154
+ ## Design Direction
155
+
156
+ For Bloom & Root, **clean luxury with organic warmth** — a curated boutique
157
+ where every product feels considered. Warm cream backgrounds, deep charcoal
158
+ text, rose gold accents. Cormorant Garamond headlines + DM Sans body.
159
+
160
+ - **Colors:** Warm cream (#FFF8F0), deep charcoal (#1A1A1A), rose gold (#B76E79)
161
+ - **Fonts:** Cormorant Garamond (headings) + DM Sans (body)
162
+ - **Mood:** Premium, approachable, tactile
163
+ - **Color strategy:** Uniform Light
164
+
165
+ ## Features
166
+
167
+ - **Product catalog** — Browse all products with images, prices, and variants.
168
+ - **Cart & checkout** — Add to cart, review, check out via Wix's hosted checkout.
169
+ - **About (CMS-based)** — Brand story, editable from the Wix dashboard.
170
+ - **FAQ (CMS-based)** — Q&A about products, editable from the dashboard.
171
+
172
+ ---
173
+
174
+ *Technical scope below — auto-decided from the features above. Skim if you want; not required reading.*
175
+
176
+ ## Pages (8)
177
+
178
+ | Page | Route | Source |
179
+ |----------------|-------------------|---------------|
180
+ | Home | / | CMS (builtin) |
181
+ | About | /about | CMS (builtin) |
182
+ | FAQ | /faq | CMS (builtin) |
183
+ | Products | /products | Wix Stores |
184
+ | Product Detail | /products/[slug] | Wix Stores |
185
+ | Cart | /cart | Wix Stores |
186
+ | Thank You | /thank-you | Wix Stores |
187
+ | Checkout | Hosted by Wix | Wix Stores |
188
+
189
+ **Imagery:** Themed blocks
190
+
191
+ Should I proceed?
192
+ ```
193
+
194
+ (Cart/Thank You/Checkout show `Wix Stores`, not "Wix eCommerce" — ecom is transitive via stores's `requires:`; the user opted into "selling things".)
195
+
196
+ ### Approval
197
+
198
+ `AskUserQuestion`: *"Ready to build?"* — **Yes, build it** / **Adjust something**. If they adjust, handle it conversationally (swap brand, change vibe, add/remove a page), re-present the plan, re-ask.
199
+
200
+ ---
201
+
202
+ ## After Approval — capture intent in scratch
203
+
204
+ On "Yes, build it", hold the captured intent (brand, frontend, verticals, the per-vertical intent block) in scratch — **nothing is written to disk**. The transition into Setup is FLOW, owned by `PLAN-create.md` (which hands off to `BUILD-astro.md`).
205
+
206
+ Build a single intent JSON in scratch (only blocks for loaded verticals); seeders receive the relevant `intent.<pack>` slice inlined (`SEED.md` Step 2):
207
+
208
+ ```json
209
+ {
210
+ "imagery": "themed-blocks",
211
+ "stores": { "productCount": 3, "categoriesNamed": ["..."] },
212
+ "cms": { "collections": [{ "purpose": "about", "itemCount": 1 }] },
213
+ "blog": { "postCount": 6, "topics": ["..."] },
214
+ "forms": { "forms": [{ "purpose": "contact", "fields": ["..."] }] },
215
+ "gift-cards": { "enabled": true }
216
+ }
217
+ ```
218
+
219
+ Inference:
220
+ - **`imagery`** — exactly the Step 2.5 value.
221
+ - **`stores.productCount`** — implied count (*"a few candles"*→3, *"a full catalog"*→8); default 3. **`categoriesNamed`** — explicitly-named strings only; else `[]`.
222
+ - **`cms.collections`** — one per CMS-driven page (≥ `{purpose:"about"}` + `{purpose:"faq"}` for any cms run); `itemCount` only when a number was implied.
223
+ - **`blog.postCount`** — implied count, default 6; **`topics`** explicit-only.
224
+ - **`forms.forms`** — one per described form; `purpose` ∈ contact/signup/lead/…; `fields` explicit-only.
225
+ - **`gift-cards.enabled`** — `true` only when explicitly asked; else omit.
226
+
227
+ When in doubt, omit a field rather than fabricate. Discovery's domain work ends here — nothing on disk; `PLAN-create.md` owns the handoff.
228
+
229
+ ---
230
+
231
+ ## Framework-SPA variant (`frontendBuild: own`)
232
+
233
+ When Wave 0 resolved `frontend: custom`, `frontendBuild: own` (an explicit framework keyword on a create prompt): run the **vibe (Step 2)**, the **imagery question (Step 2.5)**, and the **Designer** — its `DESIGN.md` + `.wix/design-tokens.css` are framework-agnostic, so the brand look is real here too, and both image phases apply (decoratives land in the SPA hero/about via `src/decorative-images.json`; entity images PATCH Wix entities). **Skip the astro-only steps:** no `scaffold.sh`, no astro Design-Direction card / Pages table, no `compose.mjs`.
234
+
235
+ - **Infer** brand + vertical/capability (same routing as astro) + the named framework (vite+react / vue / svelte).
236
+ - **Plan** (its own message, then approve — same discipline as `DISCOVERY-connect.md` § 3): *what I'll build* (a small \<framework\> app with the brand's look — palette + type as CSS custom properties; full per-component composition is framework-default for now) + an **`Imagery:`** line + *what I'll connect* (capability → its Wix backend) + the apps. For a client-state capability, state the **shared-data caveat** up front.
237
+ - **Credit estimate decorative term** is `1 (hero) + 1 (about) = 2, fixed` (the minimal SPA emits exactly `["hero","about"]`, no `/about`+`/faq` route headers — drop the cms `+2`). Example — bakery in react+vite (cms + stores, productCount 3): `2 + 3 = 5`.
238
+ - **On approval** hold the contract in scratch (`frontend: custom`, `frontendBuild: own`) → `BUILD.md` routes on `frontendBuild: own` → `BUILD-own-build.md` (create × own: Designer + `emit-design-tokens.mjs` → scaffold the framework → `init` → generate the minimal app importing `.wix/design-tokens.css` → wire a fresh `@wix/data` module → the project's own build + release).