@salesforce/b2c-dx-mcp 3.2.1 → 3.3.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 (312) hide show
  1. package/bin/run.js +5 -9
  2. package/content/guidance/b2c/b2c-hooks/references/ORDER-HOOK-LIFECYCLE.md +1 -1
  3. package/content/guidance/b2c/b2c-onboarding/SKILL.md +4 -4
  4. package/content/guidance/b2c/b2c-ordering/SKILL.md +2 -2
  5. package/content/guidance/b2c/b2c-querying-data/SKILL.md +2 -2
  6. package/content/guidance/b2c/b2c-scapi-admin/SKILL.md +3 -3
  7. package/content/guidance/b2c/b2c-scapi-admin/references/CLIENT-EXAMPLES.md +4 -4
  8. package/content/guidance/b2c/b2c-scapi-shopper/SKILL.md +6 -6
  9. package/content/guidance/b2c/b2c-scapi-shopper/references/CLIENT-EXAMPLES.md +8 -9
  10. package/content/guidance/b2c-cli/b2c-cip/SKILL.md +3 -3
  11. package/content/guidance/b2c-cli/b2c-cip/references/SALES_ANALYSIS.md +1 -1
  12. package/content/guidance/b2c-cli/b2c-config/SKILL.md +31 -21
  13. package/content/guidance/b2c-cli/b2c-content/SKILL.md +1 -1
  14. package/content/guidance/b2c-cli/b2c-debug/SKILL.md +1 -1
  15. package/content/guidance/b2c-cli/b2c-docs/SKILL.md +23 -2
  16. package/content/guidance/b2c-cli/b2c-ecdn/references/ADVANCED.md +1 -1
  17. package/content/guidance/b2c-cli/b2c-job/references/IMPORT.md +1 -1
  18. package/content/guidance/b2c-cli/b2c-metrics/SKILL.md +1 -1
  19. package/content/guidance/b2c-cli/b2c-mrt/SKILL.md +3 -3
  20. package/content/guidance/b2c-cli/b2c-scapi-custom/SKILL.md +1 -1
  21. package/content/guidance/b2c-cli/b2c-scapi-schemas/SKILL.md +1 -1
  22. package/content/guidance/b2c-cli/b2c-site-import-export/SKILL.md +1 -1
  23. package/content/guidance/b2c-cli/b2c-sites/SKILL.md +1 -1
  24. package/content/guidance/b2c-cli/b2c-slas/SKILL.md +1 -1
  25. package/content/guidance/b2c-ops/b2c-checkout-triage/SKILL.md +2 -2
  26. package/content/guidance/b2c-ops/b2c-job-health/SKILL.md +2 -2
  27. package/content/guidance/b2c-ops/b2c-order-failure-triage/SKILL.md +1 -1
  28. package/content/guidance/b2c-ops/b2c-order-failure-triage/references/order-evidence.md +2 -2
  29. package/content/guidance/b2c-ops/b2c-production-triage/SKILL.md +4 -4
  30. package/content/guidance/index.json +935 -258
  31. package/content/guidance/mcp/{cip → b2c-mcp-cip}/SKILL.md +10 -8
  32. package/content/guidance/mcp/{b2c-config → b2c-mcp-config}/SKILL.md +10 -9
  33. package/content/guidance/mcp/{debugger → b2c-mcp-debugger}/SKILL.md +9 -8
  34. package/content/guidance/mcp/{scapi → b2c-mcp-scapi}/SKILL.md +81 -10
  35. package/content/guidance/mcp/{server → b2c-mcp-server}/SKILL.md +49 -25
  36. package/content/guidance/storefront-next/sfnext-accessibility/SKILL.md +103 -0
  37. package/content/guidance/storefront-next/sfnext-accessibility/references/checklist.md +64 -0
  38. package/content/guidance/storefront-next/sfnext-analytics-consent/SKILL.md +91 -0
  39. package/content/guidance/storefront-next/sfnext-analytics-consent/references/CUSTOM-ADAPTER.md +49 -0
  40. package/content/guidance/storefront-next/sfnext-authentication/SKILL.md +86 -79
  41. package/content/guidance/storefront-next/sfnext-authentication/references/COOKIES.md +39 -0
  42. package/content/guidance/storefront-next/sfnext-authentication/references/LOGIN-FLOWS.md +59 -0
  43. package/content/guidance/storefront-next/sfnext-commerce-features/SKILL.md +67 -0
  44. package/content/guidance/storefront-next/sfnext-commerce-features/references/FEATURE-PREREQUISITES.md +37 -0
  45. package/content/guidance/storefront-next/sfnext-components/SKILL.md +98 -136
  46. package/content/guidance/storefront-next/sfnext-components/references/COMPONENT-AUTHORING.md +118 -0
  47. package/content/guidance/storefront-next/sfnext-components/references/SHAPE-TOKENS.md +51 -0
  48. package/content/guidance/storefront-next/sfnext-components/references/STORYBOOK.md +54 -0
  49. package/content/guidance/storefront-next/sfnext-components/references/TOKEN-SYSTEM.md +53 -0
  50. package/content/guidance/storefront-next/sfnext-components/references/TROUBLESHOOTING.md +19 -0
  51. package/content/guidance/storefront-next/sfnext-configuration/SKILL.md +116 -113
  52. package/content/guidance/storefront-next/sfnext-configuration/references/ENV-VARIABLES.md +55 -0
  53. package/content/guidance/storefront-next/sfnext-configuration/references/MULTI-SITE-URLS.md +137 -0
  54. package/content/guidance/storefront-next/sfnext-data-fetching/SKILL.md +100 -150
  55. package/content/guidance/storefront-next/sfnext-data-fetching/references/ACTIONS.md +53 -0
  56. package/content/guidance/storefront-next/sfnext-data-fetching/references/API-CLIENTS.md +34 -0
  57. package/content/guidance/storefront-next/sfnext-data-fetching/references/LOADERS.md +73 -0
  58. package/content/guidance/storefront-next/sfnext-data-fetching/references/SCAPI-FETCHER.md +23 -77
  59. package/content/guidance/storefront-next/sfnext-deployment/SKILL.md +83 -97
  60. package/content/guidance/storefront-next/sfnext-deployment/references/MRT-DEPLOYMENT.md +37 -68
  61. package/content/guidance/storefront-next/sfnext-extensions/SKILL.md +73 -97
  62. package/content/guidance/storefront-next/sfnext-extensions/references/ACTION-HOOKS.md +57 -0
  63. package/content/guidance/storefront-next/sfnext-extensions/references/BASE-AUDIT.md +47 -44
  64. package/content/guidance/storefront-next/sfnext-extensions/references/CLI-AND-INSTALL.md +58 -0
  65. package/content/guidance/storefront-next/sfnext-extensions/references/EXTENSION-EXAMPLES.md +49 -86
  66. package/content/guidance/storefront-next/sfnext-hybrid-storefronts/SKILL.md +59 -114
  67. package/content/guidance/storefront-next/sfnext-hybrid-storefronts/references/HYBRID-PROXY-CONFIG.md +53 -90
  68. package/content/guidance/storefront-next/sfnext-i18n/SKILL.md +96 -131
  69. package/content/guidance/storefront-next/sfnext-i18n/references/locale-config.md +35 -0
  70. package/content/guidance/storefront-next/sfnext-overview/SKILL.md +101 -0
  71. package/content/guidance/storefront-next/sfnext-page-designer/SKILL.md +152 -131
  72. package/content/guidance/storefront-next/sfnext-page-designer/references/BUSINESS-MANAGER.md +46 -0
  73. package/content/guidance/storefront-next/sfnext-page-designer/references/COMPONENT-REGISTRY.md +86 -53
  74. package/content/guidance/storefront-next/sfnext-page-designer/references/DECORATOR-PATTERNS.md +119 -131
  75. package/content/guidance/storefront-next/sfnext-page-designer/references/REVIEW-CHECKLIST.md +83 -0
  76. package/content/guidance/storefront-next/sfnext-page-designer/references/TROUBLESHOOTING.md +35 -0
  77. package/content/guidance/storefront-next/sfnext-performance/SKILL.md +75 -105
  78. package/content/guidance/storefront-next/sfnext-performance/references/PERFORMANCE-REVIEW-CHECKLIST.md +85 -0
  79. package/content/guidance/storefront-next/sfnext-performance/references/SUSPENSE-AND-STREAMING.md +58 -0
  80. package/content/guidance/storefront-next/sfnext-project-setup/SKILL.md +103 -116
  81. package/content/guidance/storefront-next/sfnext-project-setup/references/PROJECT-STRUCTURE.md +61 -99
  82. package/content/guidance/storefront-next/sfnext-project-setup/references/SCRIPTS.md +47 -0
  83. package/content/guidance/storefront-next/sfnext-project-setup/references/SFNEXT-CLI.md +63 -0
  84. package/content/guidance/storefront-next/sfnext-quality-gates/SKILL.md +70 -0
  85. package/content/guidance/storefront-next/sfnext-quality-gates/references/lint-and-budgets.md +39 -0
  86. package/content/guidance/storefront-next/sfnext-revalidation/SKILL.md +121 -0
  87. package/content/guidance/storefront-next/sfnext-revalidation/references/POLICIES-AND-TAGS.md +55 -0
  88. package/content/guidance/storefront-next/sfnext-routing/SKILL.md +86 -143
  89. package/content/guidance/storefront-next/sfnext-routing/references/ROUTE-CONVENTIONS.md +51 -51
  90. package/content/guidance/storefront-next/sfnext-routing/references/URLS-AND-SEO-ROUTES.md +22 -0
  91. package/content/guidance/storefront-next/sfnext-scapi/SKILL.md +126 -0
  92. package/content/guidance/storefront-next/sfnext-scapi/references/WORKED-EXAMPLE.md +39 -0
  93. package/content/guidance/storefront-next/sfnext-security/SKILL.md +129 -0
  94. package/content/guidance/storefront-next/sfnext-security/references/COOKIE-DOMAIN.md +39 -0
  95. package/content/guidance/storefront-next/sfnext-security/references/TURNSTILE.md +43 -0
  96. package/content/guidance/storefront-next/sfnext-seo/SKILL.md +95 -0
  97. package/content/guidance/storefront-next/sfnext-seo/references/MULTI-DOMAIN-BASE-PATH.md +17 -0
  98. package/content/guidance/storefront-next/sfnext-seo/references/SEO-ROUTES.md +31 -0
  99. package/content/guidance/storefront-next/sfnext-state-management/SKILL.md +80 -89
  100. package/content/guidance/storefront-next/sfnext-state-management/references/PATTERNS.md +45 -0
  101. package/content/guidance/storefront-next/sfnext-testing/SKILL.md +105 -138
  102. package/content/guidance/storefront-next/sfnext-testing/references/E2E.md +38 -0
  103. package/content/guidance/storefront-next/sfnext-testing/references/STORYBOOK-PATTERNS.md +73 -94
  104. package/content/guidance/storefront-next/sfnext-testing/references/UNIT-AND-ROUTE-TESTS.md +60 -0
  105. package/content/guidance/storefront-next/sfnext-theming/SKILL.md +104 -0
  106. package/content/guidance/storefront-next/sfnext-theming/references/REBRAND-CHECKLIST.md +29 -0
  107. package/dist/commands/mcp.d.ts +8 -2
  108. package/dist/commands/mcp.js +54 -20
  109. package/dist/guidance.d.ts +4 -1
  110. package/dist/guidance.js +23 -5
  111. package/dist/registry.d.ts +2 -1
  112. package/dist/registry.js +3 -3
  113. package/dist/server.d.ts +10 -0
  114. package/dist/server.js +21 -0
  115. package/dist/skill-references.js +5 -5
  116. package/dist/tools/cartridges/index.js +1 -0
  117. package/dist/tools/cip/index.js +6 -3
  118. package/dist/tools/diagnostics/debug-capture-at-breakpoint.js +1 -1
  119. package/dist/tools/diagnostics/debug-set-breakpoints.js +1 -1
  120. package/dist/tools/diagnostics/debug-start-session.js +1 -1
  121. package/dist/tools/scapi/index.d.ts +4 -1
  122. package/dist/tools/scapi/index.js +4 -2
  123. package/dist/tools/scapi/scapi-code.d.ts +2 -2
  124. package/dist/tools/scapi/scapi-code.js +17 -61
  125. package/dist/utils/types.d.ts +6 -0
  126. package/node_modules/@salesforce/b2c-agent-plugins/CHANGELOG.md +20 -0
  127. package/node_modules/@salesforce/b2c-agent-plugins/README.md +5 -0
  128. package/node_modules/@salesforce/b2c-agent-plugins/b2c/.codex-plugin/plugin.json +1 -1
  129. package/node_modules/@salesforce/b2c-agent-plugins/b2c/plugin.json +1 -1
  130. package/node_modules/@salesforce/b2c-agent-plugins/b2c/skills/b2c-hooks/references/ORDER-HOOK-LIFECYCLE.md +1 -1
  131. package/node_modules/@salesforce/b2c-agent-plugins/b2c/skills/b2c-onboarding/SKILL.md +4 -4
  132. package/node_modules/@salesforce/b2c-agent-plugins/b2c/skills/b2c-ordering/SKILL.md +2 -2
  133. package/node_modules/@salesforce/b2c-agent-plugins/b2c/skills/b2c-querying-data/SKILL.md +2 -2
  134. package/node_modules/@salesforce/b2c-agent-plugins/b2c/skills/b2c-scapi-admin/SKILL.md +3 -3
  135. package/node_modules/@salesforce/b2c-agent-plugins/b2c/skills/b2c-scapi-admin/references/CLIENT-EXAMPLES.md +4 -4
  136. package/node_modules/@salesforce/b2c-agent-plugins/b2c/skills/b2c-scapi-shopper/SKILL.md +6 -6
  137. package/node_modules/@salesforce/b2c-agent-plugins/b2c/skills/b2c-scapi-shopper/references/CLIENT-EXAMPLES.md +8 -9
  138. package/node_modules/@salesforce/b2c-agent-plugins/b2c-cli/.codex-plugin/plugin.json +1 -1
  139. package/node_modules/@salesforce/b2c-agent-plugins/b2c-cli/plugin.json +1 -1
  140. package/node_modules/@salesforce/b2c-agent-plugins/b2c-cli/skills/b2c-cip/SKILL.md +3 -3
  141. package/node_modules/@salesforce/b2c-agent-plugins/b2c-cli/skills/b2c-cip/references/SALES_ANALYSIS.md +1 -1
  142. package/node_modules/@salesforce/b2c-agent-plugins/b2c-cli/skills/b2c-config/SKILL.md +31 -21
  143. package/node_modules/@salesforce/b2c-agent-plugins/b2c-cli/skills/b2c-content/SKILL.md +1 -1
  144. package/node_modules/@salesforce/b2c-agent-plugins/b2c-cli/skills/b2c-debug/SKILL.md +1 -1
  145. package/node_modules/@salesforce/b2c-agent-plugins/b2c-cli/skills/b2c-docs/SKILL.md +23 -2
  146. package/node_modules/@salesforce/b2c-agent-plugins/b2c-cli/skills/b2c-ecdn/references/ADVANCED.md +1 -1
  147. package/node_modules/@salesforce/b2c-agent-plugins/b2c-cli/skills/b2c-job/references/IMPORT.md +1 -1
  148. package/node_modules/@salesforce/b2c-agent-plugins/b2c-cli/skills/b2c-metrics/SKILL.md +1 -1
  149. package/node_modules/@salesforce/b2c-agent-plugins/b2c-cli/skills/b2c-mrt/SKILL.md +3 -3
  150. package/node_modules/@salesforce/b2c-agent-plugins/b2c-cli/skills/b2c-scapi-custom/SKILL.md +1 -1
  151. package/node_modules/@salesforce/b2c-agent-plugins/b2c-cli/skills/b2c-scapi-schemas/SKILL.md +1 -1
  152. package/node_modules/@salesforce/b2c-agent-plugins/b2c-cli/skills/b2c-site-import-export/SKILL.md +1 -1
  153. package/node_modules/@salesforce/b2c-agent-plugins/b2c-cli/skills/b2c-sites/SKILL.md +1 -1
  154. package/node_modules/@salesforce/b2c-agent-plugins/b2c-cli/skills/b2c-slas/SKILL.md +1 -1
  155. package/node_modules/@salesforce/b2c-agent-plugins/b2c-ops/.codex-plugin/plugin.json +1 -1
  156. package/node_modules/@salesforce/b2c-agent-plugins/b2c-ops/plugin.json +1 -1
  157. package/node_modules/@salesforce/b2c-agent-plugins/b2c-ops/skills/b2c-checkout-triage/SKILL.md +2 -2
  158. package/node_modules/@salesforce/b2c-agent-plugins/b2c-ops/skills/b2c-job-health/SKILL.md +2 -2
  159. package/node_modules/@salesforce/b2c-agent-plugins/b2c-ops/skills/b2c-order-failure-triage/SKILL.md +1 -1
  160. package/node_modules/@salesforce/b2c-agent-plugins/b2c-ops/skills/b2c-order-failure-triage/references/order-evidence.md +2 -2
  161. package/node_modules/@salesforce/b2c-agent-plugins/b2c-ops/skills/b2c-production-triage/SKILL.md +4 -4
  162. package/node_modules/@salesforce/b2c-agent-plugins/figma-to-sfnext-pagedesigner/README.md +4 -4
  163. package/node_modules/@salesforce/b2c-agent-plugins/figma-to-sfnext-pagedesigner/skills/figma-to-sfnext-pagedesigner/SKILL.md +76 -73
  164. package/node_modules/@salesforce/b2c-agent-plugins/figma-to-sfnext-pagedesigner/skills/figma-to-sfnext-pagedesigner/evals/trigger-evals.json +12 -10
  165. package/node_modules/@salesforce/b2c-agent-plugins/figma-to-sfnext-pagedesigner/skills/figma-to-sfnext-pagedesigner/references/PAGE-DESIGNER-SFN.md +49 -74
  166. package/node_modules/@salesforce/b2c-agent-plugins/package.json +1 -1
  167. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/.codex-plugin/plugin.json +9 -6
  168. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/README.md +43 -22
  169. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/plugin.json +9 -6
  170. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-accessibility/SKILL.md +103 -0
  171. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-accessibility/evals/trigger-evals.json +5 -0
  172. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-accessibility/references/checklist.md +64 -0
  173. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-analytics-consent/SKILL.md +91 -0
  174. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-analytics-consent/evals/trigger-evals.json +5 -0
  175. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-analytics-consent/references/CUSTOM-ADAPTER.md +49 -0
  176. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-authentication/SKILL.md +86 -79
  177. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-authentication/evals/trigger-evals.json +5 -0
  178. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-authentication/references/COOKIES.md +39 -0
  179. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-authentication/references/LOGIN-FLOWS.md +59 -0
  180. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-commerce-features/SKILL.md +67 -0
  181. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-commerce-features/evals/trigger-evals.json +5 -0
  182. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-commerce-features/references/FEATURE-PREREQUISITES.md +37 -0
  183. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-components/SKILL.md +98 -136
  184. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-components/evals/trigger-evals.json +5 -0
  185. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-components/references/COMPONENT-AUTHORING.md +118 -0
  186. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-components/references/SHAPE-TOKENS.md +51 -0
  187. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-components/references/STORYBOOK.md +54 -0
  188. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-components/references/TOKEN-SYSTEM.md +53 -0
  189. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-components/references/TROUBLESHOOTING.md +19 -0
  190. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-configuration/SKILL.md +116 -113
  191. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-configuration/evals/trigger-evals.json +5 -0
  192. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-configuration/references/ENV-VARIABLES.md +55 -0
  193. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-configuration/references/MULTI-SITE-URLS.md +137 -0
  194. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-data-fetching/SKILL.md +100 -150
  195. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-data-fetching/evals/trigger-evals.json +5 -0
  196. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-data-fetching/references/ACTIONS.md +53 -0
  197. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-data-fetching/references/API-CLIENTS.md +34 -0
  198. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-data-fetching/references/LOADERS.md +73 -0
  199. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-data-fetching/references/SCAPI-FETCHER.md +23 -77
  200. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-deployment/SKILL.md +83 -97
  201. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-deployment/evals/trigger-evals.json +5 -0
  202. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-deployment/references/MRT-DEPLOYMENT.md +37 -68
  203. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-extensions/SKILL.md +73 -97
  204. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-extensions/evals/trigger-evals.json +5 -0
  205. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-extensions/references/ACTION-HOOKS.md +57 -0
  206. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-extensions/references/BASE-AUDIT.md +47 -44
  207. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-extensions/references/CLI-AND-INSTALL.md +58 -0
  208. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-extensions/references/EXTENSION-EXAMPLES.md +49 -86
  209. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-hybrid-storefronts/SKILL.md +59 -114
  210. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-hybrid-storefronts/evals/trigger-evals.json +5 -0
  211. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-hybrid-storefronts/references/HYBRID-PROXY-CONFIG.md +53 -90
  212. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-i18n/SKILL.md +96 -131
  213. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-i18n/evals/trigger-evals.json +5 -0
  214. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-i18n/references/locale-config.md +35 -0
  215. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-overview/SKILL.md +101 -0
  216. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-overview/evals/trigger-evals.json +5 -0
  217. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-page-designer/SKILL.md +152 -131
  218. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-page-designer/evals/trigger-evals.json +5 -0
  219. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-page-designer/references/BUSINESS-MANAGER.md +46 -0
  220. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-page-designer/references/COMPONENT-REGISTRY.md +86 -53
  221. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-page-designer/references/DECORATOR-PATTERNS.md +119 -131
  222. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-page-designer/references/REVIEW-CHECKLIST.md +83 -0
  223. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-page-designer/references/TROUBLESHOOTING.md +35 -0
  224. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-performance/SKILL.md +75 -105
  225. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-performance/evals/trigger-evals.json +5 -0
  226. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-performance/references/PERFORMANCE-REVIEW-CHECKLIST.md +85 -0
  227. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-performance/references/SUSPENSE-AND-STREAMING.md +58 -0
  228. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-project-setup/SKILL.md +103 -116
  229. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-project-setup/evals/trigger-evals.json +5 -0
  230. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-project-setup/references/PROJECT-STRUCTURE.md +61 -99
  231. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-project-setup/references/SCRIPTS.md +47 -0
  232. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-project-setup/references/SFNEXT-CLI.md +63 -0
  233. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-quality-gates/SKILL.md +70 -0
  234. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-quality-gates/evals/trigger-evals.json +5 -0
  235. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-quality-gates/references/lint-and-budgets.md +39 -0
  236. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-revalidation/SKILL.md +121 -0
  237. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-revalidation/evals/trigger-evals.json +5 -0
  238. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-revalidation/references/POLICIES-AND-TAGS.md +55 -0
  239. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-routing/SKILL.md +86 -143
  240. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-routing/evals/trigger-evals.json +5 -0
  241. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-routing/references/ROUTE-CONVENTIONS.md +51 -51
  242. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-routing/references/URLS-AND-SEO-ROUTES.md +22 -0
  243. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-scapi/SKILL.md +126 -0
  244. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-scapi/evals/trigger-evals.json +5 -0
  245. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-scapi/references/WORKED-EXAMPLE.md +39 -0
  246. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-security/SKILL.md +129 -0
  247. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-security/evals/trigger-evals.json +5 -0
  248. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-security/references/COOKIE-DOMAIN.md +39 -0
  249. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-security/references/TURNSTILE.md +43 -0
  250. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-seo/SKILL.md +95 -0
  251. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-seo/evals/trigger-evals.json +5 -0
  252. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-seo/references/MULTI-DOMAIN-BASE-PATH.md +17 -0
  253. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-seo/references/SEO-ROUTES.md +31 -0
  254. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-state-management/SKILL.md +80 -89
  255. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-state-management/evals/trigger-evals.json +5 -0
  256. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-state-management/references/PATTERNS.md +45 -0
  257. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-testing/SKILL.md +105 -138
  258. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-testing/evals/trigger-evals.json +5 -0
  259. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-testing/references/E2E.md +38 -0
  260. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-testing/references/STORYBOOK-PATTERNS.md +73 -94
  261. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-testing/references/UNIT-AND-ROUTE-TESTS.md +60 -0
  262. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-theming/SKILL.md +104 -0
  263. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-theming/evals/trigger-evals.json +5 -0
  264. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-theming/references/REBRAND-CHECKLIST.md +29 -0
  265. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next-figma/skills/sfnext-create-figma-kit/SKILL.md +3 -3
  266. package/oclif.manifest.json +21 -4
  267. package/package.json +3 -3
  268. package/content/guidance/storefront-next/sfnext-create-component/SKILL.md +0 -195
  269. package/content/guidance/storefront-next/sfnext-create-component/references/COMPONENT-AUTHORING.md +0 -206
  270. package/content/guidance/storefront-next/sfnext-create-component/references/PROJECT-STRUCTURE.md +0 -43
  271. package/content/guidance/storefront-next/sfnext-create-component/references/TOKEN-SYSTEM.md +0 -130
  272. package/content/guidance/storefront-next/sfnext-create-component/references/TROUBLESHOOTING.md +0 -34
  273. package/content/guidance/storefront-next/sfnext-create-vertical/SKILL.md +0 -135
  274. package/content/guidance/storefront-next/sfnext-create-vertical/references/COMPONENT-AUTHORING.md +0 -206
  275. package/content/guidance/storefront-next/sfnext-create-vertical/references/PROJECT-STRUCTURE.md +0 -43
  276. package/content/guidance/storefront-next/sfnext-create-vertical/references/TOKEN-SYSTEM.md +0 -130
  277. package/content/guidance/storefront-next/sfnext-create-vertical/references/TROUBLESHOOTING.md +0 -34
  278. package/content/guidance/storefront-next/sfnext-custom-apis/SKILL.md +0 -221
  279. package/content/guidance/storefront-next/sfnext-custom-apis/references/WORKFLOW-EXAMPLES.md +0 -294
  280. package/content/guidance/storefront-next/sfnext-data-fetching/references/LOADER-PATTERNS.md +0 -102
  281. package/content/guidance/storefront-next/sfnext-project-setup/references/ENV-VARIABLES.md +0 -82
  282. package/content/guidance/storefront-next/sfnext-scapi-management/SKILL.md +0 -203
  283. package/content/guidance/storefront-next/sfnext-scapi-management/references/CLI-COMMANDS.md +0 -122
  284. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-create-component/SKILL.md +0 -195
  285. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-create-component/evals/trigger-evals.json +0 -12
  286. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-create-component/references/COMPONENT-AUTHORING.md +0 -206
  287. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-create-component/references/PROJECT-STRUCTURE.md +0 -43
  288. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-create-component/references/TOKEN-SYSTEM.md +0 -130
  289. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-create-component/references/TROUBLESHOOTING.md +0 -34
  290. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-create-vertical/SKILL.md +0 -135
  291. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-create-vertical/evals/trigger-evals.json +0 -12
  292. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-create-vertical/references/COMPONENT-AUTHORING.md +0 -206
  293. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-create-vertical/references/PROJECT-STRUCTURE.md +0 -43
  294. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-create-vertical/references/TOKEN-SYSTEM.md +0 -130
  295. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-create-vertical/references/TROUBLESHOOTING.md +0 -34
  296. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-custom-apis/SKILL.md +0 -221
  297. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-custom-apis/evals/trigger-evals.json +0 -12
  298. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-custom-apis/references/WORKFLOW-EXAMPLES.md +0 -294
  299. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-data-fetching/references/LOADER-PATTERNS.md +0 -102
  300. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-project-setup/references/ENV-VARIABLES.md +0 -82
  301. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-scapi-management/SKILL.md +0 -203
  302. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-scapi-management/evals/trigger-evals.json +0 -12
  303. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-scapi-management/references/CLI-COMMANDS.md +0 -122
  304. /package/content/guidance/mcp/{scapi → b2c-mcp-scapi}/references/custom-apis.md +0 -0
  305. /package/content/guidance/mcp/{scapi → b2c-mcp-scapi}/references/custom-properties.md +0 -0
  306. /package/content/guidance/mcp/{scapi → b2c-mcp-scapi}/references/jobs.md +0 -0
  307. /package/content/guidance/mcp/{scapi → b2c-mcp-scapi}/references/products.md +0 -0
  308. /package/content/guidance/mcp/{scapi → b2c-mcp-scapi}/references/promotions.md +0 -0
  309. /package/content/guidance/mcp/{scapi → b2c-mcp-scapi}/references/saving.md +0 -0
  310. /package/content/guidance/mcp/{scapi → b2c-mcp-scapi}/references/snippets.md +0 -0
  311. /package/content/guidance/mcp/{scapi → b2c-mcp-scapi}/references/tokens.md +0 -0
  312. /package/content/guidance/mcp/{server → b2c-mcp-server}/references/files.md +0 -0
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  name: figma-to-sfnext-pagedesigner
3
- description: Convert a Figma frame into one or more live Storefront Next Page Designer blocks in one shot. Use whenever the user provides a Figma URL and wants the design to become merchant-authorable Page Designer components in a Storefront Next project. Requires the Figma MCP server (and a browser MCP for visual validation).
3
+ description: >-
4
+ Convert a Figma frame into merchant-authorable Storefront Next Page Designer blocks: splits the frame into sections, proposes attributes with defaults from the design copy, reconciles brand tokens, writes React components with @Component/@AttributeDefinition metadata, a required fallback and (for catalog sections) a product loader, generates and deploys the Business Manager cartridge JSON, and checks design fidelity. Use when the user gives a Figma URL (with node-id) and wants it to become Page Designer components in a Storefront Next project. Requires the Figma MCP server; a browser MCP is recommended. Do not use for plain React/Tailwind without Page Designer, for SFRA/ISML (use `b2c:b2c-page-designer`), or for the Page Designer API reference (use `storefront-next:sfnext-page-designer`).
4
5
  ---
5
6
 
6
7
  # Skill: figma-to-sfnext-pagedesigner
@@ -13,8 +14,9 @@ Convert a Figma frame into one or more live Storefront Next Page Designer blocks
13
14
 
14
15
  - **Figma MCP server** configured in your AI tool — the skill reads design context through it. Without it, the skill can only act as a manual checklist.
15
16
  - **Browser MCP** (Playwright or similar) — for the Phase 5 visual validation. Optional but recommended.
16
- - A **Storefront Next** project in a git repo, with the `sfnext` CLI available (`pnpm sfnext …`).
17
- - `gh` CLI authenticated (`gh auth status`) if you want the skill to clone/push for you.
17
+ - A **Storefront Next** project in a git repo (Node >= 24, pnpm >= 10.28), with the `sfnext` CLI available (`pnpm sfnext …`).
18
+ - A B2C instance and credentials for `pnpm cartridge:deploy` (see `b2c-cli:b2c-code`), and MRT access for `pnpm push` (see `b2c-cli:b2c-mrt`).
19
+ - `gh` CLI authenticated (`gh auth status`) only if you want the skill to clone the repo for you.
18
20
  - A Figma frame URL that includes a `node-id`.
19
21
 
20
22
  ## When to use
@@ -23,7 +25,10 @@ Invoke this skill (`/figma-to-sfnext-pagedesigner`) whenever the user provides a
23
25
 
24
26
  Do NOT invoke this when:
25
27
  - The user only wants React/Tailwind code (no PD integration needed) — use the `figma-design-to-code` skill directly.
26
- - The target project is SFRA/ISML, not Storefront Next.
28
+ - The target project is SFRA/ISML, not Storefront Next (use `b2c:b2c-page-designer`).
29
+ - The user wants to sync a design kit or Code Connect mappings from brand tokens (use `storefront-next-figma:sfnext-create-figma-kit`).
30
+
31
+ For the decorator, registry, loader and `<Region>` reference used throughout, see `storefront-next:sfnext-page-designer`.
27
32
 
28
33
  ---
29
34
 
@@ -33,10 +38,10 @@ Do NOT invoke this when:
33
38
  |---|---|
34
39
  | Figma node URL (must include `node-id`) | `https://www.figma.com/design/abc123/...?node-id=1-2` |
35
40
  | Git repo URL (or a local path to the project) | `https://github.com/org/my-storefront` |
36
- | PD group (palette folder) | `Content` |
41
+ | PD group (palette folder; the generated id is `<Group>.<typeId>`) | `Content` |
37
42
  | Target branch | `main` or a feature branch name |
38
43
 
39
- Do not ask the user for typeIds, display names, or descriptions upfront — derive these from the section names discovered in the frame and confirm them in the approval gate (Phase 1, step 4).
44
+ Use camelCase typeIds (for example `heroBanner`). Do not ask the user for typeIds, display names, or descriptions upfront — derive these from the section names discovered in the frame and confirm them in the approval gate (Phase 1, step 4).
40
45
 
41
46
  If the Figma URL has no `node-id` query param, stop and ask the user to select the frame in Figma and copy the link — never guess a node ID.
42
47
 
@@ -62,7 +67,7 @@ All file writes in Phases 1–3 operate on this local clone.
62
67
 
63
68
  1. Read `references/PAGE-DESIGNER-SFN.md` (bundled alongside this skill) — mental model for PD + Storefront Next.
64
69
  2. Read the `figma-design-to-code` skill (from the official Figma plugin, if installed) — it governs correct `get_design_context` usage. If it isn't available, fall back to `get_design_context` + a screenshot and treat the design tokens as reference only.
65
- 3. Read `src/theme/tokens/brand.css` — know which design tokens exist AND their current values, so you can spot where the Figma design diverges and needs a token update (Phase 1b.1), not just which classes are available.
70
+ 3. Read `src/theme/tokens/core.css` (and `brand.css`, `header.css` as needed; see `storefront-next:sfnext-theming`) — know which design tokens exist AND their current values, so you can spot where the Figma design diverges and needs a token update (Phase 1b.1), not just which classes are available.
66
71
  4. Scan `src/components/` — identify shared atoms to reuse rather than rebuild.
67
72
 
68
73
  ---
@@ -127,7 +132,7 @@ Mark layout-only props (padding, rotation, shadow) as **hardcoded** — do not l
127
132
 
128
133
  Walking a Figma design into the codebase is **not just adding new components — it also means updating the base design tokens the whole storefront already uses** wherever the design diverges from them. This is easy to miss: you build the new block correctly against existing tokens, but the design actually specifies a *different* primary color / radius / font, and the existing token is now wrong. The block looks right; the rest of the storefront (buttons, links, focus rings) is now off-brand.
129
134
 
130
- For each section, before finalizing fields, compare the Figma design's core visual values against what's in `src/theme/tokens/brand.css` (and any shadcn/tailwind theme vars — `--primary`, `--accent`, `--background`, `--foreground`, `--radius`, font families):
135
+ For each section, before finalizing fields, compare the Figma design's core visual values against what's in `src/theme/tokens/core.css` and `brand.css` (and any shadcn/tailwind theme vars — `--primary`, `--accent`, `--background`, `--foreground`, `--ui-radius`, font families):
131
136
 
132
137
  - **Primary / accent / brand colors** — if the Figma design's buttons, links, or highlights use a color that differs from the current `--primary` / `--accent` token value, that's a **token update**, not a per-component override. Do NOT hardcode the new hex in the block; update the token so every existing component (buttons, badges, focus states) inherits it.
133
138
  - **Typography** — heading/body font family, weights, and scale. If the design uses a different type family than the token defines, flag the font token for update.
@@ -137,11 +142,11 @@ Produce a **token diff table** for the approval gate:
137
142
 
138
143
  ```
139
144
  ── Token reconciliation ──────────────────────────────────────
140
- Token Current (brand.css) Figma design Action
145
+ Token Current (core.css) Figma design Action
141
146
  --------------------------------------------------------------
142
147
  --primary #1f2a44 #E11D48 UPDATE (primary buttons are pink in design)
143
- --radius 0.5rem 0.75rem UPDATE
144
- --font-heading "Inter" "Playfair" UPDATE
148
+ --ui-radius 0.5rem 0.75rem UPDATE
149
+ --font-sans "Inter" "Playfair" UPDATE
145
150
  --accent #f5a623 #f5a623 keep (matches)
146
151
  ```
147
152
 
@@ -162,12 +167,12 @@ Update the tables to reflect corrections, then confirm once more if changes were
162
167
 
163
168
  ### 1d — Apply approved token updates, then write the React component (after approval)
164
169
 
165
- **First, apply any token updates approved in 1b.1.** Edit `src/theme/tokens/brand.css` (and any theme var file) to the new values *before* writing components, so the new block and all existing components render against the corrected tokens. This is a real edit to the base design — commit it alongside the new component in Phase 4.
170
+ **First, apply any token updates approved in 1b.1.** Edit the token file in `src/theme/tokens/` where the variable lives (`core.css` for the palette and shape, `header.css` for header/footer, `brand.css` for `--brand-*`; fonts are in `src/theme/tailwind.css`) to the new values *before* writing components, so the new block and all existing components render against the corrected tokens. This is a real edit to the base design — commit it alongside the new component in Phase 4.
166
171
 
167
172
  Then, for each section, write `src/components/<name>/index.tsx`:
168
173
  - Props typed as a plain TypeScript interface — all approved authorable fields plus any layout-only props needed for rendering.
169
- - No decorator imports yet.
170
- - Use brand tokens from `brand.css` as Tailwind utilities or CSS variables — no hardcoded hex. If the design needed a shared value changed (primary color, radius, font), that lives in the updated token, not in the component.
174
+ - No decorator imports yet; add them in Phase 2. Also plan a lightweight `fallback` export (Phase 2f).
175
+ - Use theme tokens (`src/theme/tokens/*.css`) as Tailwind utilities or CSS variables — no hardcoded hex. If the design needed a shared value changed (primary color, radius, font), that lives in the updated token, not in the component.
171
176
  - Reuse existing shared components where they match design intent.
172
177
 
173
178
  ---
@@ -181,15 +186,13 @@ Using the approved field plan from Phase 1, edit `src/components/<name>/index.ts
181
186
  ### 2a — Imports (add at top)
182
187
 
183
188
  ```tsx
184
- import { Component } from '@/lib/decorators/component';
185
- import { AttributeDefinition } from '@/lib/decorators/attribute-definition';
186
- import { RegionDefinition } from '@/lib/decorators';
189
+ import { AttributeDefinition, Component, RegionDefinition } from '@/lib/decorators';
190
+ import { type Image } from '@/types';
187
191
  ```
188
192
 
189
193
  ### 2b — Metadata class (insert above the default export)
190
194
 
191
195
  ```tsx
192
- /* v8 ignore start */
193
196
  @Component('typeId', { name: 'Display Name', description: 'Description', group: 'Content' })
194
197
  @RegionDefinition([])
195
198
  export class <Name>Metadata {
@@ -200,12 +203,15 @@ export class <Name>Metadata {
200
203
  ctaLabel?: string;
201
204
 
202
205
  @AttributeDefinition({ id: 'backgroundImage', name: 'Background Image', type: 'image', required: true })
203
- backgroundImage?: string;
206
+ backgroundImage?: Image;
204
207
  }
205
- /* v8 ignore end */
206
208
  ```
207
209
 
208
210
  Rules:
211
+ - The metadata class must be `export`ed, and each class field name must equal its attribute `id`; the field name is the prop name the component receives.
212
+ - `typeId` must be a string literal in camelCase. `group` is the palette folder; the registry id becomes `<Group>.<typeId>` (for example `Content.heroBanner`).
213
+ - An `image` attribute delivers an `Image` object (`{ url, metaData?, focalPoint? }`, from `@/types`), not a string. Render it with `image.url`.
214
+ - A `markup` attribute delivers raw HTML; render it with `dangerouslySetInnerHTML` only from trusted Page Designer content.
209
215
  - Set `defaultValue` for every `string`, `markup`, and `boolean` field using the value from the approved field plan.
210
216
  - Do **not** set `defaultValue` on `image`, `url`, `product`, or `category` fields — these require real assets the Figma mock cannot provide.
211
217
  - Only include props marked authorable in the plan. Layout props are not attributes.
@@ -223,7 +229,7 @@ Apply these rules to each authorable prop name:
223
229
  | Long body copy / rich text | `markup` |
224
230
  | Anything else | `string` |
225
231
 
226
- For product reference props → `product`. For category reference props → `category`.
232
+ For product reference props → `product`. For category reference props → `category`. Other supported types are `text`, `file`, `page`, `enum`, `custom` and `cms_record`; see `storefront-next:sfnext-page-designer`.
227
233
 
228
234
  ### 2d — Regions (if has_regions = true)
229
235
 
@@ -256,16 +262,17 @@ product1Id?: string;
256
262
  product2Id?: string;
257
263
  ```
258
264
 
259
- **Loader** — the thing the registry imports as `loader` MUST be a callable function. A top-level async function is the simplest correct shape:
265
+ **Loader** — `componentData` is the whole SCAPI component object, so merchant-set attributes live at `componentData.data.*`. The loader runs on the server only (it may import `*.server` modules; the component file must not). The thing the registry imports as `loader` MUST be a callable function. A top-level async function is the simplest correct shape:
260
266
 
261
267
  ```tsx
262
- export async function loader({ componentData, context }: { componentData: any; context: any }) {
263
- const productId: string = componentData.data?.productId
268
+ import type { LoaderFunctionArgs } from 'react-router'
269
+ import { fetchProductById } from '@/lib/api/products.server'
270
+
271
+ export async function loader({ componentData, context }: { componentData: { data?: Record<string, unknown> }; context: LoaderFunctionArgs['context'] }) {
272
+ const productId = componentData.data?.productId as string | undefined
264
273
  if (!productId) return null
265
274
 
266
- const product = await context.shopperProducts.getProduct({
267
- parameters: { id: productId, allImages: true },
268
- })
275
+ const product = await fetchProductById(context, productId)
269
276
  return { product }
270
277
  }
271
278
  ```
@@ -293,18 +300,14 @@ export const loader = loaders.server // ✅ callable — NOT `export { loader
293
300
  For multi-product blocks, fetch in parallel:
294
301
 
295
302
  ```tsx
296
- export async function loader({ componentData, context }: { componentData: any; context: any }) {
303
+ export async function loader({ componentData, context }: { componentData: { data?: Record<string, unknown> }; context: LoaderFunctionArgs['context'] }) {
297
304
  const ids = ['product1Id', 'product2Id', 'product3Id']
298
- .map((k) => componentData.data?.[k] as string)
299
- .filter(Boolean)
300
-
301
- const products = await Promise.all(
302
- ids.map((id) =>
303
- context.shopperProducts.getProduct({
304
- parameters: { id, allImages: true },
305
- })
306
- )
307
- )
305
+ .map((k) => componentData.data?.[k] as string | undefined)
306
+ .filter((id): id is string => Boolean(id))
307
+ if (ids.length === 0) return null
308
+
309
+ // One batched SCAPI call for all slots
310
+ const products = await fetchProductsByIds(context, ids)
308
311
  return { products }
309
312
  }
310
313
  ```
@@ -318,9 +321,11 @@ export default function ProductRow({ product1Id, data }: ProductRowProps & { dat
318
321
  }
319
322
  ```
320
323
 
321
- **Flag `needs_server_loader = true`** in the prop triage and add `{ loader: 'loader' }` to the registry entry (Phase 3).
324
+ **Flag `needs_server_loader = true`** in the prop triage. The registry records the `loader` flag for you (Phase 3).
322
325
 
323
- **Fallback skeleton:** for product blocks, export a skeleton so the Suspense boundary shows something while the loader runs:
326
+ ### 2f — Fallback (required for every block)
327
+
328
+ Every component must export a lightweight `fallback` with reserved height; it renders in a Suspense boundary while the loader or component chunk loads:
324
329
 
325
330
  ```tsx
326
331
  export function fallback() {
@@ -328,32 +333,18 @@ export function fallback() {
328
333
  }
329
334
  ```
330
335
 
331
- Register it: `{ loader: 'loader', fallback: 'fallback' }`
332
336
 
333
337
  ---
334
338
 
335
- ## Phase 3 — Registry
339
+ ## Phase 3 — Verify the registry entry (no manual edit)
336
340
 
337
- Add one import line to `src/lib/page-designer/static-registry.ts`.
341
+ `src/lib/page-designer/static-registry.ts` is generated. When `pnpm dev` or `pnpm build` starts, the Vite plugin scans `src/components` for `@Component` and rewrites the block between the `STATIC_REGISTRY_START` / `STATIC_REGISTRY_END` markers, including `{ loader: 'loader' }` and `{ fallback: 'fallback' }` flags. Do not hand-edit it.
338
342
 
339
- Find the block where `registerImporter` calls are grouped (they are alphabetical by group then typeId in practice) and insert:
343
+ Run `pnpm dev` (or `pnpm build`) once, then confirm the file contains an entry for `'<Group>.<typeId>'` with the expected flags. A missing entry means the metadata class is not exported, the `typeId` is not a string literal, or the component is not under `src/components`.
340
344
 
341
- ```ts
342
- targetRegistry.registerImporter(
343
- 'Group.typeId',
344
- () => import('../../components/<name>/index')
345
- );
346
- ```
345
+ ### Placing the blocks on a page
347
346
 
348
- If the component has a loader, add the second argument:
349
-
350
- ```ts
351
- targetRegistry.registerImporter(
352
- 'Group.typeId',
353
- () => import('../../components/<name>/index'),
354
- { loader: 'loader' }
355
- );
356
- ```
347
+ Blocks appear in regions of a page. Merchants place them in Business Manager, but the page route must render that region: use `fetchPageWithComponentData` and `<Region page={...} regionId="..." />` (routes such as home already do). See `storefront-next:sfnext-page-designer` for routes, aspect types and `critical` regions. Do not pass `componentData` to `<Region>`.
357
348
 
358
349
  ---
359
350
 
@@ -365,23 +356,23 @@ targetRegistry.registerImporter(
365
356
  pnpm cartridge:generate
366
357
  ```
367
358
 
368
- Confirm the expected JSON files were written under `cartridges/`. If this fails, fix before committing — a broken decorator parse blocks the deploy too.
359
+ Confirm the expected JSON files were written under `cartridges/app_storefrontnext_base/cartridge/experience/`, then run `pnpm cartridge:validate` to check them against the schemas. If either fails, fix before committing — a broken decorator parse blocks the deploy too.
369
360
 
370
361
  ### 4b — Commit
371
362
 
372
- Commit the new component file(s), the registry edit, the generated cartridge JSON, **and any token updates from Phase 1d**. If the token changes were substantial, keep them in a separate commit (e.g. `chore: align brand tokens with Figma design`) so the rebrand is reviewable on its own.
363
+ Commit the new component file(s), the regenerated registry, the generated cartridge JSON, **and any token updates from Phase 1d**. If the token changes were substantial, keep them in a separate commit (e.g. `chore: align brand tokens with Figma design`) so the rebrand is reviewable on its own.
373
364
 
374
365
  ### 4c — Deploy
375
366
 
376
367
  Two commands make the block live — run them directly against the target instance/environment:
377
368
 
378
- 1. **Cartridge deploy** (`pnpm cartridge:deploy` / `sfnext deploy-cartridge`) — uploads the cartridge JSON to B2C. The new component types appear in the Page Designer palette after this.
369
+ 1. **Cartridge deploy** (`pnpm cartridge:deploy` / `sfnext deploy-cartridge`; `-- --delete` removes old cartridge files first) — uploads the cartridge JSON to B2C. The new component types appear in the Page Designer palette after this. The optional MCP tool `cartridge_deploy` does the same.
379
370
 
380
- 2. **MRT deploy** (`pnpm push` / `sfnext push`) — deploys the storefront bundle to MRT so the new React components render. If the project sets `GENERATE_AND_DEPLOY_CARTRIDGE_ON_MRT_PUSH = true`, the cartridge deploy runs automatically as part of `pnpm push`.
371
+ 2. **MRT deploy** (`pnpm push` / `sfnext push`) — deploys the storefront bundle to Managed Runtime so the new React components render (see `storefront-next:sfnext-deployment`).
381
372
 
382
373
  Then tell the user: open Business Manager → Page Designer → the target page, and the new blocks appear in the component palette ready to author — text fields pre-filled with the copy from the Figma design; they just swap in real images, URLs, and product IDs.
383
374
 
384
- If a deploy command fails, re-run it with `--log-level trace` for full diagnostics, and consult the `b2c` and `b2c-cli` skills (if installed) — they cover auth, WebDAV, and deploy troubleshooting in depth.
375
+ If a deploy command fails, re-run it with `--log-level trace` for full diagnostics, and consult the `b2c-cli:b2c-code` and `b2c-cli:b2c-mrt` skills (if installed) — they cover auth, WebDAV, and deploy troubleshooting in depth.
385
376
 
386
377
  ---
387
378
 
@@ -393,7 +384,7 @@ If a deploy command fails, re-run it with `--log-level trace` for full diagnosti
393
384
  ```
394
385
  cartridges/app_storefrontnext_base/cartridge/experience/components/<Group>/<typeId>.json
395
386
  ```
396
- 2. If browser MCP is available: open Business Manager → Merchant Tools → Content → Experience Manager → Page Designer, confirm each component appears in the component palette under its group.
387
+ 2. If browser MCP is available: open Business Manager → Merchant Tools → Content → Page Designer, confirm each component appears in the component palette under its group.
397
388
 
398
389
  ### 5b — Visual design match (Chrome)
399
390
 
@@ -421,13 +412,14 @@ If `pnpm dev` is not running or browser MCP is unavailable, explicitly tell the
421
412
  | Symptom | Fix |
422
413
  |---|---|
423
414
  | `get_design_context` returns no Code Connect hints | Project has no `.figma.ts` files yet — use raw design tokens and screenshot as reference only. |
424
- | `cartridge:generate` exits with decorator parse error | The metadata class must be a `class` (not interface) and decorators must be on class fields, not function params. |
415
+ | `cartridge:generate` exits with decorator parse error or an invalid attribute config | The metadata class must be an exported `class` (not interface) and decorators must be on class fields, not function params. Check `typeId` is a literal and attribute options (for example `searching`) are valid. |
425
416
  | Component not appearing in PD palette after deploy | Check BM → Administration → Site Development → Development Setup for cartridge assignment; the storefront cartridge must be in the cartridge path. |
426
- | `cartridge:deploy` / `push` fails (auth, WebDAV, or connection error) | Re-run the command with `--log-level trace` for full diagnostics, and consult the `b2c` / `b2c-cli` skills (if installed) — they cover auth and deploy troubleshooting. |
427
- | `markup` type attribute renders as escaped HTML | Use `dangerouslySetInnerHTML={{ __html: props.bodyText }}` for markup-typed attributes — they send raw HTML. |
428
- | Registry entry causes a Vite HMR error | Ensure the import path resolves — run `pnpm build` to get a full error trace. |
417
+ | `cartridge:deploy` / `push` fails (auth, WebDAV, or connection error) | Re-run the command with `--log-level trace` for full diagnostics, and consult the `b2c-cli:b2c-code` / `b2c-cli:b2c-mrt` skills (if installed) — they cover auth and deploy troubleshooting. |
418
+ | `markup` type attribute renders as escaped HTML | Use `dangerouslySetInnerHTML={{ __html: bodyText }}` for markup-typed attributes — they send raw HTML. |
419
+ | Component missing from `static-registry.ts` | The metadata class is not exported, `typeId` is not a literal, or the file is outside `src/components`. Restart `pnpm dev` and re-check. More symptoms: `storefront-next:sfnext-page-designer` (Troubleshooting). |
429
420
  | Product block renders as a blank/empty space, no error | The export named `loader` is not callable (a `{ server: fn }` object, or `export { loader } from './loaders'` re-exporting that object). The loader never runs, `data` is `undefined`, and `return null` hides the block. Fix: export a callable — `export const loader = loaders.server` or a plain `export async function loader(...)`. Verify with `typeof loader === 'function'`. See Phase 2e. |
430
- | New block looks right but the rest of the storefront is off-brand (wrong button colour, radius, font) | A shared value in the Figma design diverged from an existing token and was missed. Update the token in `src/theme/tokens/brand.css` (Phase 1b.1 / 1d), don't hardcode it in the block. |
421
+ | New block looks right but the rest of the storefront is off-brand (wrong button colour, radius, font) | A shared value in the Figma design diverged from an existing token and was missed. Update the token in `src/theme/tokens/` (Phase 1b.1 / 1d), don't hardcode it in the block. |
422
+ | Block shows only its skeleton or nothing | The component has no `fallback` export, or the page route does not render the region. See Phase 3. |
431
423
 
432
424
  ---
433
425
 
@@ -436,9 +428,20 @@ If `pnpm dev` is not running or browser MCP is unavailable, explicitly tell the
436
428
  A completed block's `src/components/<name>/index.tsx` contains, in order:
437
429
 
438
430
  1. Imports — React/Tailwind, shared components, and the PD decorators (`Component`, `AttributeDefinition`, `RegionDefinition`).
439
- 2. A `/* v8 ignore start */ … /* v8 ignore end */`-wrapped `@Component`-decorated metadata class declaring each authorable attribute with its `type`, `required`, and (for string/markup/boolean) `defaultValue`.
431
+ 2. An exported `@Component`-decorated metadata class declaring each authorable attribute with its `type`, `required`, and (for string/markup/boolean) `defaultValue`.
440
432
  3. A plain TypeScript props interface.
441
- 4. For product blocks: a callable `export async function loader(...)` and an optional `export function fallback()` skeleton.
433
+ 4. A required `export function fallback()` skeleton, and for product blocks a callable `export async function loader(...)`.
442
434
  5. The default-exported React component, destructuring both the PD attributes and `data` (the loader return).
443
435
 
444
- Brand values come from `brand.css` tokens as Tailwind utilities/CSS variables — never hardcoded hex.
436
+ Brand values come from theme tokens as Tailwind utilities/CSS variables — never hardcoded hex.
437
+
438
+ ## Related Skills
439
+
440
+ - `storefront-next:sfnext-page-designer` - decorators, registry, loaders, `<Region>`, troubleshooting
441
+ - `storefront-next:sfnext-theming` - brand tokens and theme files
442
+ - `storefront-next:sfnext-components` - component conventions
443
+ - `storefront-next:sfnext-deployment` - shipping the storefront bundle
444
+ - `storefront-next-figma:sfnext-create-figma-kit` - building the Figma kit from your tokens
445
+ - `b2c-cli:b2c-code` - cartridge and code-version deployment
446
+ - `b2c-cli:b2c-mrt` - Managed Runtime deploys
447
+ - `b2c:b2c-page-designer` - classic Page Designer
@@ -1,12 +1,14 @@
1
1
  [
2
- {"query": "Here's a Figma frame for our new homepage — turn it into Page Designer blocks for my Storefront Next project so merchants can edit the copy.", "should_trigger": true},
3
- {"query": "I have a Figma design with a hero and a 3-up product row. Convert it into merchant-authorable Page Designer components in my sfnext storefront.", "should_trigger": true},
4
- {"query": "Take this figma.com/design/...?node-id=1-2 frame and generate Storefront Next Page Designer components with decorator metadata and default values from the design copy.", "should_trigger": true},
5
- {"query": "Build Page Designer blocks from my Figma mockup and wire up the product cards to pull live catalog data via SCAPI.", "should_trigger": true},
6
- {"query": "I want the sections in this Figma file to show up in the Business Manager Page Designer palette for my React storefront. How do I do that?", "should_trigger": true},
7
- {"query": "Just implement this Figma design as plain React and Tailwind components — I don't need any Page Designer or Business Manager integration.", "should_trigger": false},
8
- {"query": "Convert this Figma frame into ISML templates and a Page Designer component for my SFRA cartridge.", "should_trigger": false},
9
- {"query": "Sync my brand.css tokens into the Figma design kit and republish the Code Connect mappings.", "should_trigger": false},
10
- {"query": "How do I deploy my Storefront Next bundle to Managed Runtime?", "should_trigger": false},
11
- {"query": "Add a new custom SCAPI endpoint for a loyalty points service in my cartridge.", "should_trigger": false}
2
+ {
3
+ "query": "Here's a Figma frame for our new homepage \u2014 turn it into Page Designer blocks for my Storefront Next project so merchants can edit the copy.",
4
+ "should_trigger": true
5
+ },
6
+ {
7
+ "query": "Build Page Designer blocks from my Figma mockup and wire up the product cards to pull live catalog data via SCAPI.",
8
+ "should_trigger": true
9
+ },
10
+ {
11
+ "query": "Just implement this Figma design as plain React and Tailwind components \u2014 I don't need any Page Designer or Business Manager integration.",
12
+ "should_trigger": false
13
+ }
12
14
  ]
@@ -1,120 +1,95 @@
1
- # Page Designer + Storefront Next — mental model & gotchas
1
+ # Page Designer + Storefront Next: mental model and gotchas
2
2
 
3
- > **Purpose:** background reference for the `figma-to-sfnext-pd` skill. It teaches the mental model, developer workflow, and gotchas for exposing React components to Page Designer in a Storefront Next project. The skill reads this file during its pre-flight step.
3
+ > **Purpose:** background reference for the `figma-to-sfnext-pagedesigner` skill. It explains how React components become Page Designer components in a Storefront Next project. The skill reads this file during pre-flight. For the full decorator, registry and loader API, use `storefront-next:sfnext-page-designer`.
4
4
 
5
5
  ---
6
6
 
7
7
  ## 1. Related tooling
8
8
 
9
- Salesforce's official agent-skill plugins cover adjacent workflows and are worth installing alongside this skill:
9
+ Install these alongside this skill:
10
10
 
11
11
  ```bash
12
12
  claude plugin marketplace add SalesforceCommerceCloud/b2c-developer-tooling
13
- claude plugin install storefront-next # sf.next patterns incl. Page Designer decorators
14
- claude plugin install b2c-cli # deploys, jobs, WebDAV, sandboxes
15
- claude plugin install b2c # backend cartridge patterns
13
+ claude plugin install storefront-next # Storefront Next skills incl. sfnext-page-designer
14
+ claude plugin install b2c-cli # cartridge/code deploys, Managed Runtime, WebDAV
15
+ claude plugin install b2c # classic B2C and Page Designer background
16
16
  # optional:
17
- claude plugin install b2c-dx-mcp # MCP server (SCAPI schema discovery, MRT)
18
- claude plugin install storefront-next-figma # Figma design-kit sync workflows
17
+ claude plugin install b2c-dx-mcp # MCP server (docs search, SCAPI discovery, cartridge_deploy)
18
+ claude plugin install storefront-next-figma # Figma design-kit workflows
19
19
  ```
20
20
 
21
- When uncertain about anything below, fetch the official docs (Section 7) — this feature area is young and moving.
21
+ When uncertain about anything below, read the official docs (section 7); this area evolves.
22
22
 
23
23
  ---
24
24
 
25
- ## 2. Mental model — how Page Designer connects to Storefront Next
25
+ ## 2. Mental model
26
26
 
27
- Page Designer (PD) is the visual editor in Business Manager where merchants build pages by dragging **component types** into **page-type regions**. Classically (SFRA), developers hand-authored JSON meta-definition files + ISML render scripts in a cartridge.
27
+ Page Designer (PD) is the visual editor in Business Manager where merchants drag **component types** into **page-type regions**. Classic (SFRA) PD needs hand-written JSON meta-definitions and ISML. In Storefront Next, **your React components are the PD components**. The bridge is decorator metadata:
28
28
 
29
- **Storefront Next changes the authoring model:** your React components ARE the Page Designer components. No separate ISML versions. The bridge is **component metadata**:
29
+ 1. You annotate components under `src/components` with decorators from `@/lib/decorators`: `@Component` (component type), `@AttributeDefinition` (editable fields), `@RegionDefinition` (named child slots). Page routes use `@PageType` (with `supportedAspectTypes` for dynamic PDP/PLP templates). There is no `@Aspect` decorator.
30
+ 2. The Vite plugin generates `src/lib/page-designer/static-registry.ts` from `@Component` classes, keyed `<Group>.<typeId>`. It is generated; do not hand-edit it.
31
+ 3. `pnpm cartridge:generate` (also run by `pnpm build`) turns the decorators into Business Manager JSON under `cartridges/app_storefrontnext_base/cartridge/experience/` (`components/<Group>/<typeId>.json`, `pages/`, `aspects/`).
32
+ 4. `pnpm cartridge:deploy` uploads that cartridge to the B2C instance, which makes the components appear in the PD palette.
33
+ 5. At runtime a route loader calls `fetchPageWithComponentData` (which reads the page from the Shopper Experience API and attaches each component's loader promise), and `<Region>` renders the components by registry id.
30
34
 
31
- 1. You annotate React components in `src/` with TypeScript **decorators**: `@Component`, `@PageType`, `@Aspect`.
32
- 2. The `sfnext` CLI **scans `src/` for those decorators and generates the classic PD JSON metadata** into `cartridge/cartridge/experience/` (separate files for components, page types, aspects).
33
- 3. That generated cartridge is deployed to the B2C instance, which is what makes your components appear in the Page Designer visual editor for merchants.
34
- 4. At runtime, the storefront renders PD pages via **prebuilt page manifests** served from the **MRT Data Store** (not assembled per shopper request), and/or the **`shopperExperience`** SCAPI client for page/content lookups.
35
+ Two loops to keep straight:
35
36
 
36
- So there are two sync loops to keep straight:
37
-
38
- - **Dev-time loop (you):** decorated components → generated metadata cartridge → deployed to B2C. Keeps the _palette of available components_ in PD current.
39
- - **Merchant-time loop (automatic):** merchant edits pages in PD → system job prebuilds manifests → pushed to MRT Data Store → storefront reads them. Keeps the _page content_ current.
37
+ - **Dev-time loop (you):** decorated components, generated cartridge, deployed to B2C. Keeps the palette current.
38
+ - **Merchant-time loop:** merchants edit pages in PD; the storefront renders their content. For how published page content reaches your storefront (publishing, jobs, replication), see the official docs in section 7 rather than assuming timing.
40
39
 
41
40
  ---
42
41
 
43
42
  ## 3. Developer workflow
44
43
 
45
- ### Author
46
-
47
- Create/modify a React component, annotate with the PD decorators (`@Component` for component types, `@PageType` for page layouts with regions, `@Aspect` for dynamic page types like PDP/PLP templates). The `storefront-next` plugin skill has the current decorator API — follow it rather than guessing attribute schemas.
48
-
49
- ### Generate + deploy metadata
50
-
51
44
  ```bash
52
- pnpm sfnext generate-cartridge # scans src/ decorators → JSON metadata in cartridge/cartridge/experience/
53
- pnpm sfnext deploy-cartridge # uploads cartridge to B2C Commerce (reads dw.json / SDK config)
45
+ pnpm dev # regenerates the registry as components change
46
+ pnpm cartridge:generate # decorators -> cartridge JSON
47
+ pnpm cartridge:validate # validate the generated JSON
48
+ pnpm cartridge:deploy # upload to B2C (-- --delete removes old files first)
49
+ pnpm push # deploy the storefront bundle to Managed Runtime
54
50
  ```
55
51
 
56
- Requires valid B2C credentials resolvable by the tooling SDK (`dw.json`, env vars, or CLI flags).
57
-
58
- ### Keep metadata in sync automatically (recommended once stable)
52
+ The same commands exist as `pnpm sfnext generate-cartridge`, `validate-cartridge`, `deploy-cartridge` and `push`. The optional MCP tool `cartridge_deploy` deploys the cartridge. Credentials come from `dw.json`, environment variables or CLI flags; see `b2c-cli:b2c-code`.
59
53
 
60
- ```ts
61
- // config.ts
62
- export const GENERATE_AND_DEPLOY_CARTRIDGE_ON_MRT_PUSH = true; // default: false
63
- ```
64
-
65
- With this on, every `pnpm sfnext push` (MRT deploy) first regenerates and redeploys the cartridge metadata — code on MRT and component palette in PD can't drift.
66
-
67
- ### Deploy the storefront itself
68
-
69
- ```bash
70
- pnpm sfnext push -e <mrt-environment> -w
71
- ```
54
+ Deploy order: cartridge first (palette), bundle second (rendering). Both must be current before merchants see working blocks.
72
55
 
73
56
  ---
74
57
 
75
- ## 4. Runtime & publishing (what merchants/admins do — you'll get support questions)
58
+ ## 4. Prerequisites and gotchas
76
59
 
77
- - Merchant authors PD content on **staging**. A system job (`sfcc-generate-and-push-page-manifests`) runs **every 5 minutes**, prebuilds each PD page, and pushes manifests to the MRT Data Store. Manifests are never authored manually.
78
- - **Staging → production:** admin replicates; the `sfcc-push-page-manifests` job runs automatically on production after replication. Then verify on the storefront.
79
- - **Edits made directly on production are NOT picked up automatically.** Fix: Business Manager → Administration → Operations → Jobs → run `sfcc-generate-and-push-page-manifests` manually, confirm success in Job History.
80
- - This manifest mechanism is **Storefront Next only** — it does not apply to PWA Kit, SFRA, or SiteGenesis. Don't apply old PWA Kit PD integration patterns (`page-designer.html` docs) to sf.next projects.
60
+ - [ ] **Storefront connected in Business Manager.** A storefront created outside Business Manager may need connecting before PD and Storefront Preview see it; check the official docs (section 7) for the current steps.
61
+ - [ ] A valid `dw.json` (or equivalent) for `cartridge:deploy`; MRT credentials for `push` (see `b2c-cli:b2c-mrt`).
62
+ - [ ] Component missing from the PD palette: regenerate, validate, redeploy to the active code version, hard-refresh PD. Also check the registry entry exists.
63
+ - [ ] Block renders empty: the exported `loader` is not a function, or the attribute is read from the wrong place. Attributes are at `componentData.data.*` in loaders.
64
+ - [ ] Every component needs a `fallback` export.
65
+ - [ ] Render PD content in route loaders with `fetchPageWithComponentData` (server-side), not in client effects. `<Region>` takes `page` (and no `componentData`).
66
+ - [ ] Node >= 24 and pnpm >= 10.28; run `sfnext` as `pnpm sfnext ...` from the project root.
81
67
 
82
68
  ---
83
69
 
84
- ## 5. Prerequisites & gotchas checklist
70
+ ## 5. Vocabulary
85
71
 
86
- - [ ] **Storefront connected in BM.** If the storefront was created via CLI/MRT API (not through Business Manager), PD and Storefront Preview can't see it until you connect it: BM → Administration → Sites → Storefronts → **Connect Existing** (needs Business Administrator-level role). BM-created storefronts are connected already.
87
- - [ ] `dw.json` (or equivalent env config) present and valid for `deploy-cartridge`.
88
- - [ ] MRT env vars set for `push`: `SFCC_MRT_PROJECT`, `SFCC_MRT_ENVIRONMENT`, `SFCC_MRT_API_KEY` (or credentials file).
89
- - [ ] Component not showing in PD editor? In order: regenerate cartridge → redeploy cartridge → confirm cartridge upload succeeded on the active code version → hard-refresh PD.
90
- - [ ] Content edits not showing on storefront? Check which instance was edited (direct-prod trap above) and the manifest job history; remember up to ~5 min staging job latency.
91
- - [ ] Rendering PD content in routes: fetch via the **`shopperExperience`** client from `@salesforce/storefront-next-runtime/scapi`, in a **server loader** (never client-side useEffect — sf.next is server-load-everything).
92
- - [ ] Node ≥ 24.13, pnpm ≥ 10.28; `sfnext` runs as `pnpm sfnext …` from project root, never installed globally.
72
+ | Term | Meaning |
73
+ | --- | --- |
74
+ | Page type | Layout definition with named regions (`@PageType` on a route's metadata class) |
75
+ | Component type | Reusable block with merchant-editable attributes (`@Component`) |
76
+ | Region | Named slot that accepts child components (`@RegionDefinition`, rendered by `<Region>`) |
77
+ | Aspect / dynamic page | Template page driven by runtime attributes, such as PDP or PLP (`supportedAspectTypes`) |
78
+ | Generated cartridge | `cartridges/app_storefrontnext_base/cartridge/experience/` JSON; regenerate, never hand-edit |
79
+ | Static registry | Generated map of `<Group>.<typeId>` to lazy component imports and loader/fallback flags |
93
80
 
94
81
  ---
95
82
 
96
- ## 6. Vocabulary quick reference
83
+ ## 6. Where this skill ends
97
84
 
98
- | Term | Meaning |
99
- | ------------------------------------------------- | ----------------------------------------------------------------------------------------------------- |
100
- | Page type | Layout definition with named regions merchants fill with components |
101
- | Component type | Reusable building block with merchant-editable attributes |
102
- | Region | Named slot in a page/component that accepts child components |
103
- | Aspect / dynamic page | Template page driven by runtime attributes (e.g. PDP/PLP templates) |
104
- | Decorators (`@Component`, `@PageType`, `@Aspect`) | TS annotations on React components that the CLI compiles into PD metadata |
105
- | Generated cartridge | `cartridge/cartridge/experience/` JSON produced by `generate-cartridge` — never hand-edit; regenerate |
106
- | Page manifest | Prebuilt PD page description stored in the MRT Data Store, read at render time |
107
- | MRT Data Store | MRT-side storage syncing site preferences + PD manifests from B2C |
108
- | `shopperExperience` | SCAPI client namespace for fetching PD pages/content in loaders |
85
+ This skill produces components, metadata and a deployed palette. Placing blocks on a specific page, aspect types and critical regions are covered by `storefront-next:sfnext-page-designer`; token changes by `storefront-next:sfnext-theming`.
109
86
 
110
87
  ---
111
88
 
112
- ## 7. Official docs (fetch when uncertain — this area changes fast)
89
+ ## 7. Official docs
113
90
 
114
91
  - Page Designer with Storefront Next: https://developer.salesforce.com/docs/commerce/pwa-kit-managed-runtime/guide/sfnext-page-designer.html
115
- - MRT Data Store & manifest jobs: https://developer.salesforce.com/docs/commerce/pwa-kit-managed-runtime/guide/sfnext-mrt-data-store.html
92
+ - MRT Data Store: https://developer.salesforce.com/docs/commerce/pwa-kit-managed-runtime/guide/sfnext-mrt-data-store.html
116
93
  - Connect an existing storefront: https://developer.salesforce.com/docs/commerce/pwa-kit-managed-runtime/guide/sfnext-connect-storefront.html
117
- - CLI reference (generate-cartridge / deploy-cartridge / push): https://developer.salesforce.com/docs/commerce/pwa-kit-managed-runtime/guide/sfnext-cli.html
118
- - SCAPI client (shopperExperience): https://developer.salesforce.com/docs/commerce/pwa-kit-managed-runtime/guide/sfnext-api-integration.html
119
- - Agentic B2C Developer Toolkit (plugins/MCP): https://salesforcecommercecloud.github.io/b2c-developer-tooling/
120
- - Classic PD concepts (background only — SFRA-era): https://developer.salesforce.com/docs/commerce/b2c-commerce/guide/b2c-dev-for-page-designer.html
94
+ - CLI reference: https://developer.salesforce.com/docs/commerce/pwa-kit-managed-runtime/guide/sfnext-cli.html
95
+ - Agentic B2C Developer Toolkit: https://salesforcecommercecloud.github.io/b2c-developer-tooling/llms.txt
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforce/b2c-agent-plugins",
3
- "version": "1.10.3",
3
+ "version": "1.11.0",
4
4
  "description": "B2C Commerce agent skills plugins for development and operations. Private — distributed via GitHub release zips.",
5
5
  "private": true
6
6
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "storefront-next",
3
- "version": "1.10.3",
3
+ "version": "1.11.0",
4
4
  "description": "Storefront Next development skills for building React 19 storefronts on Salesforce B2C Commerce.",
5
5
  "author": {
6
6
  "name": "Salesforce"
@@ -13,13 +13,16 @@
13
13
  "storefront-next",
14
14
  "react",
15
15
  "b2c-commerce",
16
- "commerce-cloud"
16
+ "commerce-cloud",
17
+ "react-router",
18
+ "page-designer",
19
+ "scapi"
17
20
  ],
18
21
  "skills": "./skills/",
19
22
  "interface": {
20
23
  "displayName": "Storefront Next",
21
24
  "shortDescription": "Build Salesforce B2C Storefront Next projects with AI assistance.",
22
- "longDescription": "Skills for developing React 19 storefronts on Salesforce B2C Commerce — routing, data fetching, components, Page Designer, authentication, i18n, extensions, testing, and deployment to Managed Runtime.",
25
+ "longDescription": "Skills for developing React 19 storefronts on Salesforce B2C Commerce — project setup, configuration, routing, data fetching and revalidation, SCAPI clients, authentication, security, theming, components, Page Designer, extensions, i18n, SEO, analytics and consent, accessibility, testing, quality gates, and deployment to Managed Runtime.",
23
26
  "developerName": "Salesforce",
24
27
  "category": "Productivity",
25
28
  "capabilities": [
@@ -30,9 +33,9 @@
30
33
  "brandColor": "#0D9DDA",
31
34
  "websiteURL": "https://salesforcecommercecloud.github.io/b2c-developer-tooling/",
32
35
  "defaultPrompt": [
33
- "Set up a new Storefront Next project",
34
- "Add a new route with data fetching to my storefront",
35
- "Deploy my storefront to Managed Runtime",
36
+ "Create a new Storefront Next storefront",
37
+ "Add a route with data fetching to my storefront",
38
+ "Rebrand my storefront's colors and fonts",
36
39
  "Add Page Designer support to my storefront component"
37
40
  ]
38
41
  }