@salesforce/b2c-dx-mcp 3.2.0 → 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 (313) 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/execution-registry.js +9 -9
  122. package/dist/tools/scapi/index.d.ts +4 -1
  123. package/dist/tools/scapi/index.js +4 -2
  124. package/dist/tools/scapi/scapi-code.d.ts +2 -2
  125. package/dist/tools/scapi/scapi-code.js +17 -61
  126. package/dist/utils/types.d.ts +6 -0
  127. package/node_modules/@salesforce/b2c-agent-plugins/CHANGELOG.md +20 -0
  128. package/node_modules/@salesforce/b2c-agent-plugins/README.md +5 -0
  129. package/node_modules/@salesforce/b2c-agent-plugins/b2c/.codex-plugin/plugin.json +1 -1
  130. package/node_modules/@salesforce/b2c-agent-plugins/b2c/plugin.json +1 -1
  131. package/node_modules/@salesforce/b2c-agent-plugins/b2c/skills/b2c-hooks/references/ORDER-HOOK-LIFECYCLE.md +1 -1
  132. package/node_modules/@salesforce/b2c-agent-plugins/b2c/skills/b2c-onboarding/SKILL.md +4 -4
  133. package/node_modules/@salesforce/b2c-agent-plugins/b2c/skills/b2c-ordering/SKILL.md +2 -2
  134. package/node_modules/@salesforce/b2c-agent-plugins/b2c/skills/b2c-querying-data/SKILL.md +2 -2
  135. package/node_modules/@salesforce/b2c-agent-plugins/b2c/skills/b2c-scapi-admin/SKILL.md +3 -3
  136. package/node_modules/@salesforce/b2c-agent-plugins/b2c/skills/b2c-scapi-admin/references/CLIENT-EXAMPLES.md +4 -4
  137. package/node_modules/@salesforce/b2c-agent-plugins/b2c/skills/b2c-scapi-shopper/SKILL.md +6 -6
  138. package/node_modules/@salesforce/b2c-agent-plugins/b2c/skills/b2c-scapi-shopper/references/CLIENT-EXAMPLES.md +8 -9
  139. package/node_modules/@salesforce/b2c-agent-plugins/b2c-cli/.codex-plugin/plugin.json +1 -1
  140. package/node_modules/@salesforce/b2c-agent-plugins/b2c-cli/plugin.json +1 -1
  141. package/node_modules/@salesforce/b2c-agent-plugins/b2c-cli/skills/b2c-cip/SKILL.md +3 -3
  142. package/node_modules/@salesforce/b2c-agent-plugins/b2c-cli/skills/b2c-cip/references/SALES_ANALYSIS.md +1 -1
  143. package/node_modules/@salesforce/b2c-agent-plugins/b2c-cli/skills/b2c-config/SKILL.md +31 -21
  144. package/node_modules/@salesforce/b2c-agent-plugins/b2c-cli/skills/b2c-content/SKILL.md +1 -1
  145. package/node_modules/@salesforce/b2c-agent-plugins/b2c-cli/skills/b2c-debug/SKILL.md +1 -1
  146. package/node_modules/@salesforce/b2c-agent-plugins/b2c-cli/skills/b2c-docs/SKILL.md +23 -2
  147. package/node_modules/@salesforce/b2c-agent-plugins/b2c-cli/skills/b2c-ecdn/references/ADVANCED.md +1 -1
  148. package/node_modules/@salesforce/b2c-agent-plugins/b2c-cli/skills/b2c-job/references/IMPORT.md +1 -1
  149. package/node_modules/@salesforce/b2c-agent-plugins/b2c-cli/skills/b2c-metrics/SKILL.md +1 -1
  150. package/node_modules/@salesforce/b2c-agent-plugins/b2c-cli/skills/b2c-mrt/SKILL.md +3 -3
  151. package/node_modules/@salesforce/b2c-agent-plugins/b2c-cli/skills/b2c-scapi-custom/SKILL.md +1 -1
  152. package/node_modules/@salesforce/b2c-agent-plugins/b2c-cli/skills/b2c-scapi-schemas/SKILL.md +1 -1
  153. package/node_modules/@salesforce/b2c-agent-plugins/b2c-cli/skills/b2c-site-import-export/SKILL.md +1 -1
  154. package/node_modules/@salesforce/b2c-agent-plugins/b2c-cli/skills/b2c-sites/SKILL.md +1 -1
  155. package/node_modules/@salesforce/b2c-agent-plugins/b2c-cli/skills/b2c-slas/SKILL.md +1 -1
  156. package/node_modules/@salesforce/b2c-agent-plugins/b2c-ops/.codex-plugin/plugin.json +1 -1
  157. package/node_modules/@salesforce/b2c-agent-plugins/b2c-ops/plugin.json +1 -1
  158. package/node_modules/@salesforce/b2c-agent-plugins/b2c-ops/skills/b2c-checkout-triage/SKILL.md +2 -2
  159. package/node_modules/@salesforce/b2c-agent-plugins/b2c-ops/skills/b2c-job-health/SKILL.md +2 -2
  160. package/node_modules/@salesforce/b2c-agent-plugins/b2c-ops/skills/b2c-order-failure-triage/SKILL.md +1 -1
  161. package/node_modules/@salesforce/b2c-agent-plugins/b2c-ops/skills/b2c-order-failure-triage/references/order-evidence.md +2 -2
  162. package/node_modules/@salesforce/b2c-agent-plugins/b2c-ops/skills/b2c-production-triage/SKILL.md +4 -4
  163. package/node_modules/@salesforce/b2c-agent-plugins/figma-to-sfnext-pagedesigner/README.md +4 -4
  164. package/node_modules/@salesforce/b2c-agent-plugins/figma-to-sfnext-pagedesigner/skills/figma-to-sfnext-pagedesigner/SKILL.md +76 -73
  165. package/node_modules/@salesforce/b2c-agent-plugins/figma-to-sfnext-pagedesigner/skills/figma-to-sfnext-pagedesigner/evals/trigger-evals.json +12 -10
  166. package/node_modules/@salesforce/b2c-agent-plugins/figma-to-sfnext-pagedesigner/skills/figma-to-sfnext-pagedesigner/references/PAGE-DESIGNER-SFN.md +49 -74
  167. package/node_modules/@salesforce/b2c-agent-plugins/package.json +1 -1
  168. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/.codex-plugin/plugin.json +9 -6
  169. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/README.md +43 -22
  170. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/plugin.json +9 -6
  171. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-accessibility/SKILL.md +103 -0
  172. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-accessibility/evals/trigger-evals.json +5 -0
  173. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-accessibility/references/checklist.md +64 -0
  174. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-analytics-consent/SKILL.md +91 -0
  175. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-analytics-consent/evals/trigger-evals.json +5 -0
  176. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-analytics-consent/references/CUSTOM-ADAPTER.md +49 -0
  177. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-authentication/SKILL.md +86 -79
  178. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-authentication/evals/trigger-evals.json +5 -0
  179. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-authentication/references/COOKIES.md +39 -0
  180. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-authentication/references/LOGIN-FLOWS.md +59 -0
  181. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-commerce-features/SKILL.md +67 -0
  182. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-commerce-features/evals/trigger-evals.json +5 -0
  183. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-commerce-features/references/FEATURE-PREREQUISITES.md +37 -0
  184. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-components/SKILL.md +98 -136
  185. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-components/evals/trigger-evals.json +5 -0
  186. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-components/references/COMPONENT-AUTHORING.md +118 -0
  187. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-components/references/SHAPE-TOKENS.md +51 -0
  188. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-components/references/STORYBOOK.md +54 -0
  189. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-components/references/TOKEN-SYSTEM.md +53 -0
  190. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-components/references/TROUBLESHOOTING.md +19 -0
  191. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-configuration/SKILL.md +116 -113
  192. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-configuration/evals/trigger-evals.json +5 -0
  193. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-configuration/references/ENV-VARIABLES.md +55 -0
  194. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-configuration/references/MULTI-SITE-URLS.md +137 -0
  195. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-data-fetching/SKILL.md +100 -150
  196. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-data-fetching/evals/trigger-evals.json +5 -0
  197. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-data-fetching/references/ACTIONS.md +53 -0
  198. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-data-fetching/references/API-CLIENTS.md +34 -0
  199. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-data-fetching/references/LOADERS.md +73 -0
  200. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-data-fetching/references/SCAPI-FETCHER.md +23 -77
  201. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-deployment/SKILL.md +83 -97
  202. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-deployment/evals/trigger-evals.json +5 -0
  203. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-deployment/references/MRT-DEPLOYMENT.md +37 -68
  204. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-extensions/SKILL.md +73 -97
  205. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-extensions/evals/trigger-evals.json +5 -0
  206. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-extensions/references/ACTION-HOOKS.md +57 -0
  207. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-extensions/references/BASE-AUDIT.md +47 -44
  208. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-extensions/references/CLI-AND-INSTALL.md +58 -0
  209. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-extensions/references/EXTENSION-EXAMPLES.md +49 -86
  210. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-hybrid-storefronts/SKILL.md +59 -114
  211. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-hybrid-storefronts/evals/trigger-evals.json +5 -0
  212. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-hybrid-storefronts/references/HYBRID-PROXY-CONFIG.md +53 -90
  213. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-i18n/SKILL.md +96 -131
  214. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-i18n/evals/trigger-evals.json +5 -0
  215. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-i18n/references/locale-config.md +35 -0
  216. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-overview/SKILL.md +101 -0
  217. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-overview/evals/trigger-evals.json +5 -0
  218. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-page-designer/SKILL.md +152 -131
  219. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-page-designer/evals/trigger-evals.json +5 -0
  220. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-page-designer/references/BUSINESS-MANAGER.md +46 -0
  221. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-page-designer/references/COMPONENT-REGISTRY.md +86 -53
  222. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-page-designer/references/DECORATOR-PATTERNS.md +119 -131
  223. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-page-designer/references/REVIEW-CHECKLIST.md +83 -0
  224. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-page-designer/references/TROUBLESHOOTING.md +35 -0
  225. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-performance/SKILL.md +75 -105
  226. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-performance/evals/trigger-evals.json +5 -0
  227. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-performance/references/PERFORMANCE-REVIEW-CHECKLIST.md +85 -0
  228. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-performance/references/SUSPENSE-AND-STREAMING.md +58 -0
  229. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-project-setup/SKILL.md +103 -116
  230. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-project-setup/evals/trigger-evals.json +5 -0
  231. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-project-setup/references/PROJECT-STRUCTURE.md +61 -99
  232. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-project-setup/references/SCRIPTS.md +47 -0
  233. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-project-setup/references/SFNEXT-CLI.md +63 -0
  234. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-quality-gates/SKILL.md +70 -0
  235. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-quality-gates/evals/trigger-evals.json +5 -0
  236. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-quality-gates/references/lint-and-budgets.md +39 -0
  237. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-revalidation/SKILL.md +121 -0
  238. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-revalidation/evals/trigger-evals.json +5 -0
  239. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-revalidation/references/POLICIES-AND-TAGS.md +55 -0
  240. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-routing/SKILL.md +86 -143
  241. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-routing/evals/trigger-evals.json +5 -0
  242. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-routing/references/ROUTE-CONVENTIONS.md +51 -51
  243. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-routing/references/URLS-AND-SEO-ROUTES.md +22 -0
  244. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-scapi/SKILL.md +126 -0
  245. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-scapi/evals/trigger-evals.json +5 -0
  246. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-scapi/references/WORKED-EXAMPLE.md +39 -0
  247. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-security/SKILL.md +129 -0
  248. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-security/evals/trigger-evals.json +5 -0
  249. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-security/references/COOKIE-DOMAIN.md +39 -0
  250. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-security/references/TURNSTILE.md +43 -0
  251. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-seo/SKILL.md +95 -0
  252. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-seo/evals/trigger-evals.json +5 -0
  253. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-seo/references/MULTI-DOMAIN-BASE-PATH.md +17 -0
  254. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-seo/references/SEO-ROUTES.md +31 -0
  255. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-state-management/SKILL.md +80 -89
  256. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-state-management/evals/trigger-evals.json +5 -0
  257. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-state-management/references/PATTERNS.md +45 -0
  258. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-testing/SKILL.md +105 -138
  259. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-testing/evals/trigger-evals.json +5 -0
  260. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-testing/references/E2E.md +38 -0
  261. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-testing/references/STORYBOOK-PATTERNS.md +73 -94
  262. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-testing/references/UNIT-AND-ROUTE-TESTS.md +60 -0
  263. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-theming/SKILL.md +104 -0
  264. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-theming/evals/trigger-evals.json +5 -0
  265. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-theming/references/REBRAND-CHECKLIST.md +29 -0
  266. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next-figma/skills/sfnext-create-figma-kit/SKILL.md +3 -3
  267. package/oclif.manifest.json +21 -4
  268. package/package.json +3 -3
  269. package/content/guidance/storefront-next/sfnext-create-component/SKILL.md +0 -195
  270. package/content/guidance/storefront-next/sfnext-create-component/references/COMPONENT-AUTHORING.md +0 -206
  271. package/content/guidance/storefront-next/sfnext-create-component/references/PROJECT-STRUCTURE.md +0 -43
  272. package/content/guidance/storefront-next/sfnext-create-component/references/TOKEN-SYSTEM.md +0 -130
  273. package/content/guidance/storefront-next/sfnext-create-component/references/TROUBLESHOOTING.md +0 -34
  274. package/content/guidance/storefront-next/sfnext-create-vertical/SKILL.md +0 -135
  275. package/content/guidance/storefront-next/sfnext-create-vertical/references/COMPONENT-AUTHORING.md +0 -206
  276. package/content/guidance/storefront-next/sfnext-create-vertical/references/PROJECT-STRUCTURE.md +0 -43
  277. package/content/guidance/storefront-next/sfnext-create-vertical/references/TOKEN-SYSTEM.md +0 -130
  278. package/content/guidance/storefront-next/sfnext-create-vertical/references/TROUBLESHOOTING.md +0 -34
  279. package/content/guidance/storefront-next/sfnext-custom-apis/SKILL.md +0 -221
  280. package/content/guidance/storefront-next/sfnext-custom-apis/references/WORKFLOW-EXAMPLES.md +0 -294
  281. package/content/guidance/storefront-next/sfnext-data-fetching/references/LOADER-PATTERNS.md +0 -102
  282. package/content/guidance/storefront-next/sfnext-project-setup/references/ENV-VARIABLES.md +0 -82
  283. package/content/guidance/storefront-next/sfnext-scapi-management/SKILL.md +0 -203
  284. package/content/guidance/storefront-next/sfnext-scapi-management/references/CLI-COMMANDS.md +0 -122
  285. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-create-component/SKILL.md +0 -195
  286. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-create-component/evals/trigger-evals.json +0 -12
  287. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-create-component/references/COMPONENT-AUTHORING.md +0 -206
  288. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-create-component/references/PROJECT-STRUCTURE.md +0 -43
  289. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-create-component/references/TOKEN-SYSTEM.md +0 -130
  290. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-create-component/references/TROUBLESHOOTING.md +0 -34
  291. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-create-vertical/SKILL.md +0 -135
  292. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-create-vertical/evals/trigger-evals.json +0 -12
  293. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-create-vertical/references/COMPONENT-AUTHORING.md +0 -206
  294. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-create-vertical/references/PROJECT-STRUCTURE.md +0 -43
  295. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-create-vertical/references/TOKEN-SYSTEM.md +0 -130
  296. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-create-vertical/references/TROUBLESHOOTING.md +0 -34
  297. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-custom-apis/SKILL.md +0 -221
  298. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-custom-apis/evals/trigger-evals.json +0 -12
  299. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-custom-apis/references/WORKFLOW-EXAMPLES.md +0 -294
  300. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-data-fetching/references/LOADER-PATTERNS.md +0 -102
  301. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-project-setup/references/ENV-VARIABLES.md +0 -82
  302. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-scapi-management/SKILL.md +0 -203
  303. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-scapi-management/evals/trigger-evals.json +0 -12
  304. package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-scapi-management/references/CLI-COMMANDS.md +0 -122
  305. /package/content/guidance/mcp/{scapi → b2c-mcp-scapi}/references/custom-apis.md +0 -0
  306. /package/content/guidance/mcp/{scapi → b2c-mcp-scapi}/references/custom-properties.md +0 -0
  307. /package/content/guidance/mcp/{scapi → b2c-mcp-scapi}/references/jobs.md +0 -0
  308. /package/content/guidance/mcp/{scapi → b2c-mcp-scapi}/references/products.md +0 -0
  309. /package/content/guidance/mcp/{scapi → b2c-mcp-scapi}/references/promotions.md +0 -0
  310. /package/content/guidance/mcp/{scapi → b2c-mcp-scapi}/references/saving.md +0 -0
  311. /package/content/guidance/mcp/{scapi → b2c-mcp-scapi}/references/snippets.md +0 -0
  312. /package/content/guidance/mcp/{scapi → b2c-mcp-scapi}/references/tokens.md +0 -0
  313. /package/content/guidance/mcp/{server → b2c-mcp-server}/references/files.md +0 -0
@@ -1,141 +1,127 @@
1
1
  ---
2
2
  name: sfnext-deployment
3
- description: Build and deploy Storefront Next storefronts to Managed Runtime (MRT) using the sfnext CLI. Use when running production builds, pushing bundles to MRT with sfnext push, configuring deployment environments, or deploying Page Designer cartridges. This is for Storefront Next deployment — for general MRT management via b2c CLI, see b2c-cli:b2c-mrt.
3
+ description: >-
4
+ Build and deploy a Storefront Next storefront: `pnpm build`, `pnpm push` / `sfnext push` to Managed Runtime (MRT),
5
+ MRT credentials (MRT_API_KEY, MRT_PROJECT, MRT_TARGET), syncing env vars with `pnpm config:push-env`, deploying
6
+ the base cartridge and Page Designer metadata (`pnpm cartridge:generate|validate|deploy`), the shipped GitHub
7
+ Actions deploy workflow, bundle size checks, the pre-launch checklist, and upgrading a project (template vs SDK
8
+ compatibility, react-router pin). Use when a push fails or is rejected, a deployed site returns 500 or shows
9
+ stale Page Designer components, "deploy to staging/production", or before go-live.
10
+ Do not use for generic MRT project/environment/redirect/member management or log tailing (use `b2c-cli:b2c-mrt`),
11
+ for config.server.ts and PUBLIC__ variable rules (use `storefront-next:sfnext-configuration`), or for creating
12
+ the project (use `storefront-next:sfnext-project-setup`).
4
13
  ---
5
14
 
6
- # Deployment Skill
15
+ # Storefront Next Deployment
7
16
 
8
- This skill covers building and deploying Storefront Next storefronts to Managed Runtime (MRT).
17
+ A storefront ships as two independent deployments:
9
18
 
10
- ## Overview
19
+ | Deployment | Target | Command |
20
+ | --- | --- | --- |
21
+ | App bundle (SSR server + client assets) | Managed Runtime | `pnpm build` then `pnpm push` |
22
+ | Base cartridge (Page Designer metadata, notification Custom API) | B2C Commerce instance (WebDAV code version) | `pnpm cartridge:deploy` |
11
23
 
12
- Storefront Next storefronts are deployed to MRT as bundles. The `sfnext` CLI handles building and pushing bundles, while environment configuration is managed through MRT environment variables.
24
+ If Business Manager Storefront Setup created your project, reuse its MRT project, environments, and SLAS client. Guides: [deployment](https://developer.salesforce.com/docs/commerce/sfnext/guide/sfnext-push-mrt-auto.html), [launch](https://developer.salesforce.com/docs/commerce/sfnext/guide/sfnext-mrt-launch-storefront.html).
13
25
 
14
- Reuse the MRT project, environment, and credentials created by Business Manager
15
- storefront setup. Follow the [deployment guide](https://developer.salesforce.com/docs/commerce/sfnext/guide/sfnext-push-mrt-auto.html)
16
- for source deployments and the [launch guide](https://developer.salesforce.com/docs/commerce/sfnext/guide/sfnext-mrt-launch-storefront.html)
17
- for staging/production rollout. Creating new SLAS clients or MRT resources is not
18
- a prerequisite to each deployment.
19
-
20
- ## Production Build
26
+ ## Build
21
27
 
22
28
  ```bash
23
- # Build for production
24
- pnpm build
25
-
26
- # The build output goes to build/ directory
29
+ pnpm build # extension locales + config aggregation, cartridge:generate, react-router build -> build/
30
+ pnpm start # preview the production build at http://localhost:3000
31
+ pnpm bundlesize # build with bundle size limits enforced
27
32
  ```
28
33
 
29
- The production build:
30
-
31
- - Compiles TypeScript to JavaScript
32
- - Bundles client and server code separately
33
- - Optimizes and minifies assets
34
- - Generates the static Page Designer registry
34
+ Run `pnpm typecheck`, `pnpm lint`, and `pnpm test` before pushing. Node 24 is required locally and on MRT (`runtime.ssrParameters.ssrFunctionNodeVersion: '24.x'`).
35
35
 
36
- ## Deploying to MRT
36
+ ## Push to Managed Runtime
37
37
 
38
- ### Using the Template's Push Script
39
-
40
- Use the project's `push` script (`sfnext push --project-directory .`). Build first;
41
- the push command requires existing build output. With the template's pnpm setup:
38
+ `push` does **not** build; it fails if `build/` is missing.
42
39
 
43
40
  ```bash
44
- # Push the current build to MRT
45
- pnpm run push
46
-
47
- # Push with a specific message
48
- pnpm run push --message "Release v1.2.0"
49
-
50
- # Push to a specific environment
51
- pnpm run push --environment staging --wait
41
+ pnpm build && pnpm push # upload only (not deployed to an env unless a target is set)
42
+ pnpm push -- -m "Release 42" -e staging --wait # deploy to an env and wait
52
43
  ```
53
44
 
54
- ### Deployment Flow
55
-
56
- ```
57
- pnpm run build → pnpm run push → MRT receives bundle → Deployed to environment
58
- ```
45
+ | Need | Provide |
46
+ | --- | --- |
47
+ | Credentials | `MRT_API_KEY` (or `--api-key`, `--credentials-file`, `~/.mobify`); `MRT_CLOUD_ORIGIN` for a non-default MRT origin |
48
+ | Project slug | `MRT_PROJECT` / `-p` / `SFCC_MRT_PROJECT` / dw.json `mrtProject` (set it explicitly; push errors without one) |
49
+ | Target env | `MRT_TARGET` / `-e`. Required with `--wait`. Without it the bundle uploads but is not deployed |
59
50
 
60
- See [MRT Deployment Reference](references/MRT-DEPLOYMENT.md) for detailed deployment options.
51
+ Put `MRT_PROJECT` and `MRT_TARGET` in `.env` for local pushes. Store `MRT_API_KEY` in your shell or CI secret store, not in committed files. Flags and other commands: `storefront-next:sfnext-project-setup` `references/SFNEXT-CLI.md`. Inspect without deploying: `pnpm sfnext create-bundle -d . -o .bundle`.
61
52
 
62
- ## Environment Configuration
53
+ Bundle history, rolling back to an earlier bundle, and environment management are generic MRT tasks: `b2c mrt bundle history|list|deploy`, see `b2c-cli:b2c-mrt`. Live logs: MCP `mrt_logs_watch` / `mrt_logs_watch_poll`, or `b2c mrt tail-logs`. MCP `mrt_bundle_push` can also push a bundle.
63
54
 
64
- Environment variables for MRT are configured through:
55
+ ## Environment variables on MRT
65
56
 
66
- 1. **Runtime Admin or `b2c mrt env var set/push`** — Set application variables per environment; `PUBLIC__` values merge into runtime configuration and are browser-visible. Changes redeploy the environment.
67
- 2. **CLI flags or `MRT_*` environment variables** — Control push/deploy targets
68
- 3. **`.env` files** — Local development only (not deployed)
69
-
70
- Use `b2c mrt env var push --file .env.staging --project <project> --environment <environment>`
71
- to explicitly apply a reviewed file. It shows a diff and prompts; omit local-only
72
- values and use credentials for the target instance. See [Environment Variables](https://developer.salesforce.com/docs/commerce/sfnext/guide/sfnext-mrt-environment-vars.html)
73
- for visibility, naming, and limits. MRT variable management uses the B2C CLI. For live logs, prefer MCP
74
- `mrt_logs_watch` / `mrt_logs_watch_poll`; CLI alternative: `b2c mrt tail-logs`.
75
-
76
- ### MRT Deployment Variables
57
+ `.env` is **not** uploaded by `push`. Set runtime config on the MRT environment:
77
58
 
78
59
  ```bash
79
- # Project slug (required for push)
80
- MRT_PROJECT=my-project-slug
81
-
82
- # Target environment (optional — if omitted, bundle is uploaded but not deployed)
83
- MRT_TARGET=development
60
+ pnpm config:push-env # b2c mrt env var push: reads .env, shows a diff, asks to confirm
61
+ b2c mrt env var push -f .env.staging -p my-project -e staging --yes # explicit file, skips prompt
62
+ b2c mrt env var set PUBLIC__app__defaultSiteId=MySite -p my-project -e staging
63
+ pnpm sfnext config inspect --project my-project --environment staging # see what is applied
84
64
  ```
85
65
 
86
- ### Application Variables (set in MRT Dashboard)
66
+ `push` excludes `MRT_`-prefixed keys by default. Review the file first: `PUBLIC__` values are browser-visible, and local-only values should not be pushed. Variable naming and limits: Salesforce's [environment variables guide](https://developer.salesforce.com/docs/commerce/sfnext/guide/sfnext-mrt-environment-vars.html). Rules for what to set: `storefront-next:sfnext-configuration`.
67
+
68
+ ## Cartridge deployment
87
69
 
88
70
  ```bash
89
- PUBLIC__app__commerce__api__clientId=prod-client-id
90
- PUBLIC__app__commerce__api__organizationId=prod-org-id
91
- PUBLIC__app__commerce__api__shortCode=prod-short-code
71
+ pnpm cartridge:generate # Page Designer metadata from decorators (also run by pnpm build)
72
+ pnpm cartridge:validate # validate generated JSON
73
+ pnpm cartridge:deploy # upload cartridges/ to the instance
74
+ pnpm cartridge:deploy -- --delete --reload # wipe old files first, then activate the code version
92
75
  ```
93
76
 
94
- ## Page Designer Cartridge Deployment
77
+ - Deployment is **not** part of `pnpm push` and is manual by default.
78
+ - Needs an instance (`-s/--server` or `SFCC_SERVER`), WebDAV credentials, and either `--code-version` or OAuth credentials to discover the active version (`--reload` also needs OAuth with OCAPI `code_versions` access). Settings resolve from flags, env, or `dw.json`; see `b2c-cli:b2c-code` for the shared auth model.
79
+ - Redeploy whenever Page Designer decorators or attribute definitions change; stale components in Business Manager mean the cartridge is behind.
80
+ - The base cartridge also hosts the notification Custom API used by passwordless login, password reset, OTP, and guest order lookup emails. Once per client, register its SLAS scope with `sfnext setup-base-cartridge --slas-client-id <id>` (`docs/README-EMAIL-CARTRIDGE.md`).
95
81
 
96
- Page Designer metadata must be deployed separately to Commerce Cloud (not MRT):
82
+ ## CI/CD
97
83
 
98
- ```bash
99
- # Generate cartridge metadata
100
- pnpm generate:cartridge
101
-
102
- # Deploy cartridge to B2C instance
103
- pnpm deploy:cartridge
84
+ The project ships `.github/workflows/deploy.yml`: on push to the `latest` branch (or manual dispatch) it builds, runs `pnpm push --wait` (needs secret `MRT_API_KEY`, variables `MRT_PROJECT`, `MRT_TARGET`), and deploys cartridges with the b2c `code-deploy` action (needs `SFCC_SERVER`, `SFCC_CLIENT_ID`, secret `SFCC_CLIENT_SECRET`). Each job skips cleanly when its configuration is absent. Read the file before changing branch names or environments.
104
85
 
105
- # Deploy with clean (removes old cartridge first)
106
- pnpm deploy:cartridge:clean
107
-
108
- # Validate cartridge structure
109
- pnpm validate:cartridge
110
- ```
86
+ ## Pre-launch checklist
111
87
 
112
- Cartridge metadata is also auto-generated as part of `pnpm build`.
88
+ 1. `pnpm typecheck && pnpm lint && pnpm test` pass; `pnpm bundlesize` within limits.
89
+ 2. MRT variables set on the target env: your own client ID, organization ID, short code, site(s); `pnpm config:inspect` shows no unintended demo values.
90
+ 3. Demo analytics IDs/hosts in `app.engagement.adapters` replaced or disabled.
91
+ 4. `images.host` switched from the DIS staging host to production; `realmHostMappings` for custom domains.
92
+ 5. Cartridge deployed and code version activated; SLAS scopes registered; Page Designer pages publish and render.
93
+ 6. SLAS redirect URIs include every production domain; cookie domain and Business Manager Hybrid Auth level agree if used (`references/MRT-DEPLOYMENT.md`).
94
+ 7. `url.seoRoutes` has an entry per active site if enabled (protected: needs a rebuild).
95
+ 8. Security headers/CSP and Turnstile reviewed (`storefront-next:sfnext-security`); robots and sitemap handled (`storefront-next:sfnext-seo`).
96
+ 9. Smoke test after deploy: home, PLP, PDP, cart, login, checkout, and a Page Designer page.
113
97
 
114
- ## Pre-Deployment Checklist
98
+ ## Upgrading a project
115
99
 
116
- 1. **Run tests** — `pnpm test`
117
- 2. **Check bundle size** — `pnpm bundlesize:test`
118
- 3. **Verify environment variables** — All required vars set in target environment
119
- 4. **Build successfully** — `pnpm build` completes without errors
120
- 5. **Verify SCAPI credentials** — Client ID and org ID match the target environment
100
+ Your project records `storefrontNext.templateRelease`, `templateVersion`, and `minSdkVersion` in `package.json`; `docs/COMPATIBILITY.md` maps template releases to the SDK (`@salesforce/storefront-next-dev` / `-runtime`) versions they need. Follow the step-by-step guides in `docs/migrations/` (for example `react-router-7.18`: pin `react-router` and every `@react-router/*` package to exactly `7.18.2`, and `seo-url-rules`). Upgrade SDK packages, run `pnpm install`, `pnpm typecheck`, and tests, then redeploy.
121
101
 
122
102
  ## Troubleshooting
123
103
 
124
- | Issue | Cause | Solution |
125
- | ------------------------------ | ----------------------------- | ------------------------------------------- |
126
- | Build fails | TypeScript errors | Fix type errors; run `pnpm typecheck` |
127
- | Push rejected | Authentication issue | Verify sfnext CLI credentials |
128
- | 500 errors after deploy | Missing environment variables | Check all required vars in MRT dashboard |
129
- | Stale Page Designer components | Cartridge not deployed | Re-deploy cartridge via MCP tool or b2c CLI |
104
+ | Symptom | Cause / fix |
105
+ | --- | --- |
106
+ | `Build directory ... does not exist` | Run `pnpm build` before `pnpm push` |
107
+ | Push: project slug required | Set `MRT_PROJECT` (or `-p`) |
108
+ | Push: credentials required / 401 | `MRT_API_KEY` missing or for a different MRT user; check `--credentials-file` |
109
+ | `--wait` error about environment | Add `-e <env>` or `MRT_TARGET` |
110
+ | 500 after deploy | Required `PUBLIC__` variables missing on that MRT environment; `pnpm sfnext config inspect --environment <env>`; tail logs (`b2c-cli:b2c-mrt`) |
111
+ | Env var "not applied" on MRT | Key not in `config.server.ts` (ignored with a warning) or a protected path; see `storefront-next:sfnext-configuration` |
112
+ | Stale Page Designer components | Cartridge not regenerated/deployed or code version not activated |
113
+ | Build fails on client chunk importing server config | `server-config.ts` imported from client code |
130
114
 
131
115
  ## Related Skills
132
116
 
133
- - `storefront-next:sfnext-project-setup` - Project structure and build configuration
134
- - `storefront-next:sfnext-configuration` - Environment variable configuration
135
- - `storefront-next:sfnext-page-designer` - Page Designer cartridge deployment
136
- - `storefront-next:sfnext-performance` - Bundle size optimization before deployment
137
- - `b2c-cli:b2c-mrt` - General MRT management via b2c CLI (NOT Storefront Next specific)
117
+ - `storefront-next:sfnext-project-setup` - Scripts, CLI reference, first run
118
+ - `storefront-next:sfnext-configuration` - Config and env var rules, multi-site/base path/cookie domain
119
+ - `storefront-next:sfnext-page-designer` - Decorators and cartridge metadata
120
+ - `storefront-next:sfnext-performance` - Bundle size and Lighthouse
121
+ - `storefront-next:sfnext-quality-gates` - Pre-push lint/type/test gates
122
+ - `b2c-cli:b2c-mrt` - MRT projects, environments, bundles, env vars, redirects, logs
123
+ - `b2c-cli:b2c-code` - Code version and cartridge deploy with the b2c CLI
138
124
 
139
- ## Reference Documentation
125
+ ## Finding more
140
126
 
141
- - [MRT Deployment Reference](references/MRT-DEPLOYMENT.md) - Detailed deployment options and configuration
127
+ Project `docs/README-BASE-PATH.md`, `README-MULTI-DOMAIN.md`, `README-COOKIE-DOMAIN.md`, `README-EMAIL-CARTRIDGE.md`, `docs/migrations/`; `b2c docs search "<topic>" --category sfnext`.
@@ -0,0 +1,5 @@
1
+ [
2
+ {"query": "pnpm push says the build directory does not exist, how do I deploy my storefront to MRT staging?", "should_trigger": true},
3
+ {"query": "Deploy the Page Designer cartridge for my Storefront Next project and run through a pre-launch checklist", "should_trigger": true},
4
+ {"query": "Add a new member to my MRT project and create a redirect rule", "should_trigger": false}
5
+ ]
@@ -1,90 +1,59 @@
1
- # MRT Deployment Reference
1
+ # Managed Runtime Deployment Reference
2
2
 
3
- ## Managed Runtime (MRT)
3
+ ## What MRT provides
4
4
 
5
- MRT is the hosting platform for Storefront Next storefronts. It provides:
5
+ Server-side rendering on Node 24, a CDN in front of the SSR function and static bundle assets, separate environments (for example development, staging, production), and versioned bundles that can be re-deployed. Project, environment, member, redirect, and certificate management is done with `b2c mrt ...` (`b2c-cli:b2c-mrt`) or Runtime Admin.
6
6
 
7
- - **Server-side rendering** — Node.js runtime for SSR and loader execution
8
- - **CDN** — Global content delivery for static assets
9
- - **Environment management** — Separate environments for development, staging, production
10
- - **Bundle management** — Versioned deployments with rollback capability
7
+ ## Push flow
11
8
 
12
- ## Deployment Commands
13
-
14
- ```bash
15
- # Build, then run the template's push script
16
- pnpm run build && pnpm run push
17
-
18
- # Push with deployment message
19
- pnpm run push --message "Fix checkout flow"
20
-
21
- # Push to specific environment
22
- pnpm run push --environment production --wait
23
-
24
- # Create a bundle without deploying (inspection/custom pipelines)
25
- pnpm sfnext create-bundle -d . -o .bundle
9
+ ```
10
+ pnpm build -> build/
11
+ pnpm push -> sfnext push: creates a bundle from build/, uploads it to the project
12
+ -> with a target env (MRT_TARGET / -e): deploys it; with --wait: blocks until done
26
13
  ```
27
14
 
28
- ## Environment Variables on MRT
29
-
30
- ### Setting Variables
31
-
32
- Environment variables are set per-environment through:
15
+ Precedence for project and environment: CLI flag, then `MRT_PROJECT` / `MRT_TARGET`, then `SFCC_MRT_PROJECT` / `SFCC_MRT_ENVIRONMENT`, then `dw.json` (`mrtProject`, `mrtEnvironment`). Credentials: `--api-key` / `MRT_API_KEY`, or `--credentials-file` / `MRT_CREDENTIALS_FILE`, or `~/.mobify`.
33
16
 
34
- 1. **Runtime Admin or `b2c mrt env var set/push`** — Application variables on the selected environment; changes redeploy it.
35
- 2. **`MRT_PROJECT`, `MRT_TARGET`, `MRT_API_KEY`** — Deployment target and credentials for `pnpm sfnext push`; these do not upload application variables from `.env`.
17
+ Send extra flags through pnpm with `--`: `pnpm push -- --wait -e production`.
36
18
 
37
- ### Variable Limits
19
+ ## What push sends to MRT
38
20
 
39
- See Salesforce's [Environment Variables constraints](https://developer.salesforce.com/docs/commerce/sfnext/guide/sfnext-mrt-environment-vars.html#constraints)
40
- for current limits. The 32 KB value-size limit covers all environment variables,
41
- not only `PUBLIC__` values. Public configuration paths must exist in `config.server.ts`.
21
+ - The bundle (server build + client assets).
22
+ - SSR parameters from `config.server.ts` `runtime.ssrParameters` (`ssrFunctionNodeVersion`, `envBasePath`) and `runtime.ssrOnly` / `ssrShared`.
42
23
 
43
- ### Production Configuration Example
24
+ It does not send `.env` values or cartridges.
44
25
 
45
- ```bash
46
- # Commerce API credentials
47
- PUBLIC__app__commerce__api__clientId=prod-client-id
48
- PUBLIC__app__commerce__api__organizationId=f_ecom_abcd_001
49
- PUBLIC__app__commerce__api__siteId=RefArchGlobal
50
- PUBLIC__app__commerce__api__shortCode=kv7kzm78
51
-
52
- # Site configuration
53
- PUBLIC__app__defaultSiteId=RefArchGlobal
54
- PUBLIC__app__commerce__sites='[{"id":"RefArchGlobal","defaultLocale":"en-US","defaultCurrency":"USD","supportedLocales":[{"id":"en-US","preferredCurrency":"USD"},{"id":"de-DE","preferredCurrency":"EUR"}],"supportedCurrencies":["USD","EUR"]}]'
55
-
56
- # Server-only secrets (not exposed to client)
57
- COMMERCE_API_SLAS_SECRET=production-slas-secret
58
- ```
26
+ ## Environment variables
59
27
 
60
- ## Bundle Management
28
+ Set per environment in Runtime Admin or with the b2c CLI (`pnpm config:push-env`, `b2c mrt env var set|push|list|delete`). Changes to variables apply to that environment; confirm the behavior in Runtime Admin for your project. Server-only secrets (`COMMERCE_API_SLAS_SECRET` for private clients, `GUEST_ORDER_LOOKUP_COOKIE_SECRET`, `MARKETING_CLOUD_*`) go in unprefixed. `PUBLIC__` variables are merged into config and visible in the browser. Limits: see Salesforce's [constraints](https://developer.salesforce.com/docs/commerce/sfnext/guide/sfnext-mrt-environment-vars.html#constraints).
61
29
 
62
- Each `sfnext push` creates a versioned bundle on MRT:
30
+ Example of per-environment application variables (values are yours):
63
31
 
64
- ```
65
- Bundle v1 (active) ← current production
66
- Bundle v2 ← previous deployment
67
- Bundle v3 ← two deployments ago
32
+ ```bash
33
+ PUBLIC__app__commerce__api__clientId=<slas-client-id>
34
+ PUBLIC__app__commerce__api__organizationId=f_ecom_<realm>_<instance>
35
+ PUBLIC__app__commerce__api__shortCode=<short-code>
36
+ PUBLIC__app__defaultSiteId=<site-id>
37
+ PUBLIC__app__commerce__sites='[{"id":"<site-id>","defaultLocale":"en-US","defaultCurrency":"USD","supportedLocales":[{"id":"en-US","preferredCurrency":"USD"}],"supportedCurrencies":["USD"]}]'
68
38
  ```
69
39
 
70
- ### Rollback
40
+ ## Domains, base path, cookies
71
41
 
72
- If a deployment causes issues, roll back to a previous bundle via the MRT Dashboard or CLI.
42
+ - Many domains on one environment: register each as an external hostname in Runtime Admin, add SLAS redirect URIs per domain, configure `images.realmHostMappings`. The public origin is resolved per request from `X-Forwarded-Host`.
43
+ - Several storefronts under one domain: give each environment a distinct `runtime.ssrParameters.envBasePath` (`/shop-a`); the CDN routes on the first path segment; the value reaches MRT via `pnpm push`.
44
+ - Shared cookies across subdomains: `app.cookies.domain` plus Business Manager Hybrid Auth cookie-domain level `2`.
73
45
 
74
- ## Multi-Environment Setup
46
+ Details: `storefront-next:sfnext-configuration` `references/MULTI-SITE-URLS.md`. If the domain is also fronted by eCDN, manage zones and rules with `b2c-cli:b2c-ecdn`.
75
47
 
76
- | Environment | Purpose | Auto-deploy |
77
- | ----------- | ------------------------- | --------------------- |
78
- | Development | Feature testing | From feature branches |
79
- | Staging | Pre-production validation | From main branch |
80
- | Production | Live storefront | Manual promotion |
48
+ ## Rollback
81
49
 
82
- ## Deployment Verification
50
+ Each push creates a bundle. To return to an earlier version, list bundles and deploy one to the environment: `b2c mrt bundle history -p <project> -e <env>` and `b2c mrt bundle deploy <bundleId> -p <project> -e <env>`. Cartridge changes roll back separately by activating a previous code version (`b2c-cli:b2c-code`).
83
51
 
84
- After deploying, verify:
52
+ ## Verifying a deployment
85
53
 
86
- 1. **Health check** — Site loads without errors
87
- 2. **SCAPI connectivity** — Products and categories display correctly
88
- 3. **Authentication** — Login/logout flow works
89
- 4. **Page Designer** — Merchant-editable pages render correctly
90
- 5. **Performance** — No regression in page load times
54
+ 1. Home, category, product, cart, and checkout pages render.
55
+ 2. Products and prices load (SCAPI connectivity, correct site).
56
+ 3. Login/logout, including social or passwordless if enabled.
57
+ 4. A Page Designer page renders and the cartridge/code version is current.
58
+ 5. Response headers (CSP) and cookies have the expected `Domain` (`curl -sI`).
59
+ 6. Logs show no repeated `[Config Warning]` lines about ignored variables.
@@ -1,142 +1,118 @@
1
1
  ---
2
2
  name: sfnext-extensions
3
- description: Build extensions for Storefront Next using target-config.json, target points, extension routes, and translation namespaces. Use when creating modular features, inserting components into UI targets, adding extension routes, adding a section to an existing page, or using SFDC_EXT_ integration markers. Covers the base-audit decision gate (deciding whether to extend at all vs token/variant override), extension structure, targetId configuration, and extension registration in src/extensions/config.json.
3
+ description: >-
4
+ Add or remove modular features in a Storefront Next project with the extension system: src/extensions/<name>/ folders, target-config.json (UITarget components, contextProviders, actionHooks), sfcc.-prefixed UITarget ids, extension routes, per-extension config.ts and locales, SFDC_EXT_ integration markers, the `sfnext extensions create|install|remove|list` commands, and the agent-driven instructions/*.mdc install flow. Use when inserting a component into a UITarget slot (for example sfcc.header.before.cart or sfcc.pdp.bnpl.message), adding a checkout action hook, installing or removing store locator, BOPIS, multiship or a demo extension, listing extension points with pnpm extensions:list, or deciding whether to extend, restyle, or edit the base at all. Do not use for styling or brand changes (use `storefront-next:sfnext-theming`), for new merchant-editable Page Designer blocks (use `storefront-next:sfnext-page-designer`), or for analytics/engagement adapters (use `storefront-next:sfnext-analytics-consent`).
4
5
  ---
5
6
 
6
- # Extensions Skill
7
+ # Storefront Next Extensions
7
8
 
8
- This skill covers the Storefront Next extension system — modular features that plug into the storefront via target points.
9
+ An extension is a self-contained folder under `src/extensions/<name>/` that adds UI, routes, providers, translations, config and server hooks to the storefront without rewriting base files. The base declares named slots (`<UITarget targetId="..." />`); an extension's `target-config.json` says which of its components fill which slot.
9
10
 
10
- ## Overview
11
+ Your project ships with several extensions already (store locator, BOPIS, multiship, and demo extensions such as BNPL and ratings and reviews). Look at them before building: they are the reference implementations. See [Extension Examples](references/EXTENSION-EXAMPLES.md).
11
12
 
12
- Extensions are self-contained feature modules that add components, routes, translations, and providers to a Storefront Next storefront without modifying core code.
13
+ ## Decision gate: should this be an extension?
13
14
 
14
- ## Before You Build — Audit the Base First (Decision Gate)
15
+ Run this before writing code; the full walkthrough is in [Base Audit](references/BASE-AUDIT.md).
15
16
 
16
- An extension is the right tool for adding something the storefront does **not already render**. Before scaffolding one, confirm you actually need it — a duplicated section costs you on every page load, every test, and every design sync.
17
+ 1. Trace the route in `src/routes/` down to the place you want to change. Does the base already render equivalent content there?
18
+ 2. Already rendered: restyle it (tokens or a component variant, see `storefront-next:sfnext-theming`) or fill an existing slot; do not add a parallel copy.
19
+ 3. Not rendered and a slot exists: write an extension.
20
+ 4. Not rendered and no slot fits: edit the base route or component directly (you own the whole project) and, if it is a reusable seam, add a `<UITarget>` there so later extensions can plug in.
17
21
 
18
- Run this gate **before writing any extension code**:
22
+ Discover what already exists:
19
23
 
20
- 1. **Find the base.** Open the relevant route in `src/routes/` and trace every component it renders.
21
- 2. **Check each section you intend to add.** Does the base already render equivalent content at that location (a description, accordion, badge, banner, title…)?
22
- - **YES** → do not create a parallel component. Restyle it through the token/brand layer (a CVA variant or `brand.css` value), or inject into a UITarget slot on the existing content. Adding a duplicate section is a bug, not a feature.
23
- - **NO** → an extension is justified. Continue to the structure below and register it at the correct `targetId`.
24
- 3. **Decide the layer for what's missing:**
25
-
26
- ```
27
- Is the change purely visual (color, font, spacing)?
28
- └─ YES → Token / CVA change (brand.css or a component variant). No extension needed.
29
- └─ NO → Is the new structure needed by only one storefront/vertical?
30
- └─ YES → Extension at a UITarget slot (this skill). Never edit core.
31
- └─ NO → It's a shared pattern — add a slot/render-prop to the BASE
32
- component instead, and let each consumer fill it.
33
- ```
34
-
35
- **Rule of thumb:** extensions *add what is missing*; they never recreate what already exists. When in doubt, prefer a UITarget slot or a token override over a new component.
36
-
37
- See [Base Audit Reference](references/BASE-AUDIT.md) for worked examples of the gate.
24
+ ```bash
25
+ pnpm extensions:list # all UITarget ids and server action hook ids (add --json for tooling)
26
+ sfnext extensions list # installed extensions
27
+ rg "UITarget" src/ # where a slot is rendered
28
+ ```
38
29
 
39
- ## Extension Structure
30
+ ## Structure
40
31
 
41
32
  ```
42
33
  src/extensions/my-extension/
43
- ├── target-config.json # Target configuration (components/providers)
44
- ├── components/ # Extension components
45
- ├── routes/ # Extension routes (auto-registered)
46
- ├── locales/ # Extension translations (auto-namespaced)
47
- └── providers/ # Extension context providers
34
+ ├── target-config.json # which components/providers/hooks plug in where
35
+ ├── components/ # UI, including the components named in target-config.json
36
+ ├── routes/ # auto-registered routes (flat-route file naming)
37
+ ├── providers/ # context providers (listed in target-config.json)
38
+ ├── hooks/ context/ middlewares/ stores/ # as needed
39
+ ├── locales/<lang>/translations.json
40
+ ├── config.ts # optional client-side defaults
41
+ ├── server-config.ts # optional server-only defaults
42
+ └── README.md
48
43
  ```
49
44
 
50
- ## Target Configuration
45
+ Create the scaffold with `sfnext extensions create -n "My Extension" -d "What it does"` (adds the folder, a README and an entry in `src/extensions/config.json`). Import across the project with the normal alias: `@/extensions/my-extension/...`. There is no `@extensions` alias.
51
46
 
52
- The `target-config.json` file declares how the extension integrates:
47
+ ## target-config.json
53
48
 
54
49
  ```json
55
50
  {
56
51
  "components": [
57
- {
58
- "targetId": "header.before.cart",
59
- "path": "extensions/my-extension/components/badge.tsx",
60
- "order": 0
61
- }
52
+ { "targetId": "sfcc.header.before.cart", "path": "extensions/my-extension/components/header/badge.tsx", "order": 0 }
62
53
  ],
63
54
  "contextProviders": [
64
- {
65
- "path": "extensions/my-extension/providers/my-provider.tsx",
66
- "order": 0
67
- }
55
+ { "path": "extensions/my-extension/providers/my-provider.tsx", "order": 0 }
56
+ ],
57
+ "actionHooks": [
58
+ { "hookId": "sfcc.checkout.payments.afterSubmitPayment", "handler": "extensions/my-extension/hooks/after-payment.ts", "order": 0 }
68
59
  ]
69
60
  }
70
61
  ```
71
62
 
72
- ### Target Points
63
+ - `path` is relative to `src/` and points at a module whose default export is the component (no required props; read context or hooks inside). Multiple components on one slot render in ascending `order`; duplicate orders warn because their order is not deterministic.
64
+ - A slot without children is a replacement slot. A slot that wraps base content (`<UITarget targetId="..."><Base /></UITarget>`) is a wrapper slot: the extension component receives the base content as children.
65
+ - Optional per component: `"enabled": false` to switch it off, and `"hint"` as a label for the dev-mode overlay. A top-level `"devOnly": true` skips the whole file in production builds.
66
+ - Extension components only inject when a `target-config.json` exists in `src/extensions/<name>/`.
67
+ - Every `targetId` must exist as a `<UITarget>` in the source; otherwise the build fails and names the orphan. Ids are namespaced: use the exact `sfcc.`-prefixed ids reported by `pnpm extensions:list` (for example `sfcc.header.before.cart`, `sfcc.pdp.bnpl.message`, `sfcc.pdp.reviews.section`, `sfcc.cart.orderSummary.before`).
68
+ - In `pnpm dev`, UITarget dev mode shows markers so you can see which slots exist and what fills them.
73
69
 
74
- Target points are named insertion slots in the storefront layout (for example, `header.before.cart`). Extensions insert components at these points via `targetId`.
75
-
76
- Extension availability is managed in `src/extensions/config.json`, where each extension is keyed by an `SFDC_EXT_*` marker.
77
-
78
- ## Extension Routes
79
-
80
- Files in the `routes/` directory auto-register as routes:
81
-
82
- ```typescript
83
- // src/extensions/my-extension/routes/my-route.tsx
84
- export function loader() {
85
- return { message: 'Hello' };
86
- }
70
+ Server-side hooks (`actionHooks`, checkout steps) have their own semantics: [Action Hooks](references/ACTION-HOOKS.md).
87
71
 
88
- export default function MyRoute() {
89
- const { message } = useLoaderData();
90
- return <div>{message}</div>;
91
- }
92
- ```
72
+ ## Routes, translations, config
93
73
 
94
- ## Extension Translations
74
+ - **Routes**: any file in `routes/` is merged into the route tree with React Router flat-route naming: `_app.store-locator.tsx` (inside the app layout), `action.set-selected-store.ts` (action), `resource.stores.ts` (resource route). See `src/extensions/store-locator/routes/`.
75
+ - **Translations**: `locales/<lang>/translations.json` is namespaced `ext` + PascalCase folder name (`my-extension` -> `extMyExtension`): `useTranslation('extMyExtension')`. `pnpm dev` and `pnpm build` run `pnpm locales:aggregate-extensions` for you and write `src/extensions/locales/`; that folder is generated, do not edit it.
76
+ - **Client config**: `config.ts` default-exports a plain, JSON-serializable object. It is merged into `config.app.extension.<camelName>` (read with `useConfig()` in components or `getConfig()` on the server) and can be overridden per environment with `PUBLIC__app__extension__<camelName>__<key>`. It is exposed to the browser: never put secrets there.
77
+ - **Server-only config**: `server-config.ts` lands at `config.app.serverExtension.<camelName>`, has no `PUBLIC__` override, is unreachable from client code (the build fails if a client chunk imports it), and is read with `getConfig(context)` in loaders, actions and middleware.
78
+ - `pnpm config:aggregate-extensions` (also run by dev and build) writes `src/extensions/config/`; generated, do not edit. Folder names must be letters, digits and hyphens starting with a letter. See `docs/README-CONFIG.md`.
95
79
 
96
- Translations are auto-namespaced as `extPascalCase` based on the directory name:
80
+ ## Integration markers
97
81
 
98
- ```
99
- src/extensions/my-extension/locales/
100
- ├── en-US/translations.json
101
- └── it-IT/translations.json
102
- ```
82
+ Extensions that modify base files mark their edits with comments so they can be installed and removed cleanly:
103
83
 
104
84
  ```typescript
105
- const {t} = useTranslation('extMyExtension');
106
- t('welcome');
107
- ```
108
-
109
- ## Integration Markers
85
+ selectedStoreMiddleware /** @sfdc-extension-line SFDC_EXT_STORE_LOCATOR */,
110
86
 
111
- Mark extension integration points in core code:
87
+ // @sfdc-extension-block-start SFDC_EXT_STORE_LOCATOR
88
+ import { StoreLocatorProvider } from '@/extensions/store-locator/providers/store-locator';
89
+ // @sfdc-extension-block-end SFDC_EXT_STORE_LOCATOR
112
90
 
113
- ```typescript
114
- // Single line marker
115
- /** @sfdc-extension-line SFDC_EXT_MY_FEATURE */
116
- import myFeature from '@extensions/my-feature';
117
-
118
- // Block marker
119
- {/* @sfdc-extension-block-start SFDC_EXT_MY_FEATURE */}
120
- <Link to="/my-feature">My Feature</Link>
121
- {/* @sfdc-extension-block-end SFDC_EXT_MY_FEATURE */}
91
+ /** @sfdc-extension-file SFDC_EXT_STORE_LOCATOR */ // marks an entire file as belonging to the extension
122
92
  ```
123
93
 
124
- See [Extension Examples Reference](references/EXTENSION-EXAMPLES.md) for complete examples.
94
+ Use them when the extension needs edits outside its folder (middleware registration, a nav link, a loader) and you want `sfnext extensions remove` to be able to undo them. Each marker name (`SFDC_EXT_*`) is a key in `src/extensions/config.json`. Install, remove and marker details: [CLI and Install](references/CLI-AND-INSTALL.md).
125
95
 
126
- ## Best Practices
96
+ ## Removing or replacing a demo extension
127
97
 
128
- 1. **Self-contained** — Each extension should be independent
129
- 2. **Use target points** — Insert UI via `target-config.json` rather than editing core files
130
- 3. **Namespace translations** — Auto-namespacing prevents collisions
131
- 4. **Order matters** — Use `order` in `target-config.json` to control rendering order
98
+ BNPL, customer preferences, ratings and reviews, and product content ship with mock fixtures. To integrate a real provider, replace the bodies of their API functions (for example `src/extensions/bnpl/lib/api/bnpl.server.ts`). To drop one, use `sfnext extensions remove -e SFDC_EXT_BNPL`, then run `pnpm locales:aggregate-extensions`. `docs/README-FEATURE-STUBS.md` describes finding stubs with `grep -r "@feature-stub" src/`.
132
99
 
133
- ## Related Skills
100
+ ## Best practices
134
101
 
135
- - `storefront-next:sfnext-i18n` - Translation patterns and namespace usage
136
- - `storefront-next:sfnext-routing` - How extension routes integrate with the router
137
- - `storefront-next:sfnext-components` - Component patterns used in extensions
102
+ 1. Keep the extension self-contained; reach into the base only through slots, hooks and markers.
103
+ 2. Prefer a slot over editing a base file; add a slot when you keep editing the same spot.
104
+ 3. Use `order` deliberately and give each slot entry a distinct value.
105
+ 4. Import via `@/extensions/...` and keep translations in the extension's own namespace.
106
+ 5. After adding a slot, extension or locale, run `pnpm dev` once so the aggregation and registries regenerate, and commit nothing from `src/extensions/locales/` or `src/extensions/config/` by hand.
138
107
 
139
- ## Reference Documentation
108
+ ## Related Skills
140
109
 
141
- - [Base Audit Reference](references/BASE-AUDIT.md) - Worked examples of the decision gate (extend vs token/variant vs base slot)
142
- - [Extension Examples Reference](references/EXTENSION-EXAMPLES.md) - Complete extension examples
110
+ - `storefront-next:sfnext-overview` - project map and where things live
111
+ - `storefront-next:sfnext-components` - component conventions used inside extensions
112
+ - `storefront-next:sfnext-routing` - how extension routes join the route tree
113
+ - `storefront-next:sfnext-i18n` - translation namespaces and locale files
114
+ - `storefront-next:sfnext-configuration` - `config.ts` layering and `PUBLIC__` overrides
115
+ - `storefront-next:sfnext-theming` - token and brand changes that do not need an extension
116
+ - `storefront-next:sfnext-commerce-features` - checkout, multiship, BOPIS flows
117
+ - `storefront-next:sfnext-page-designer` - merchant-editable blocks
118
+ - `b2c:b2c-hooks` - B2C platform-side hooks (different from Storefront Next action hooks)
@@ -0,0 +1,5 @@
1
+ [
2
+ {"query": "Add a small 'Find a store' badge next to the cart icon in the header without editing the header component", "should_trigger": true},
3
+ {"query": "I need a server-side fraud check that can block order placement in Storefront Next checkout; how do I register an action hook?", "should_trigger": true},
4
+ {"query": "Change the primary brand color and button radius across the storefront", "should_trigger": false}
5
+ ]