Context: The XM Cloud starter (`sitecore/xmcloud-starter-js`) is the primary onboarding path for new SitecoreAI projects. It currently depends on Content SDK ^1.0.0, Next.js ^15.5.10, and the old `@sitecore-cloudsdk/*` analytics packages. Content SDK v2.0 (March 19) introduced breaking changes including `proxy.ts` rename, HOC removal, `initContentSdk`, and consolidated analytics packages. The starter has not been updated, creating a two-track confusion for developers.
Steps:
1. Create a tracking issue on `xmcloud-starter-js` for the v2.0 upgrade
2. Update all `@sitecore-content-sdk/*` dependencies from ^1.0.0 to ^2.0.0
3. Replace `@sitecore-cloudsdk/core` and `@sitecore-cloudsdk/events` with `@sitecore-content-sdk/analytics-core`, `@sitecore-content-sdk/events`, and `@sitecore-content-sdk/personalize`
4. Rename `middleware.ts` to `proxy.ts` with updated proxy chain configuration
5. Upgrade Next.js from ^15.5.10 to ^16.1.7 (minimum safe version)
6. Replace any deprecated HOCs with `useSitecore` hook and `SitecoreProvider`
7. Update `next.config.ts` from `images.domains` to `remotePatterns`
8. Add `initContentSdk` initialization in the proxy and server entry points
9. Test all example projects (basic-nextjs, kit-nextjs-article-starter, etc.) against SitecoreAI
10. Ensure `create-content-sdk-app` output and starter examples produce consistent project structures
Acceptance criteria:
All examples in `xmcloud-starter-js` use Content SDK ^2.0.0 and Next.js >=16.1.7
No references to `@sitecore-cloudsdk/*` remain
`proxy.ts` pattern is used consistently
All examples build and pass linting
README documents the upgrade for existing starter users
Risks: This is a large change that affects every example in the starter. Coordinate timing with a Content SDK v2.0.2 stable release to avoid targeting canary versions. Some examples may require framework-specific adjustments for the Next.js 15-to-16 migration.