Now live in production
Content SDK · Agentic flow · Now live in production

An agentic flow for SitecoreAI head apps.

A full agentic workflow for Sitecore Content SDK head applications — its own subpipeline (discover, provision, build, author, publish), a delivery loop that verifies each component as it lands, and a preview-first / publish-last go-live. It has now carried a complete brand site all the way from an idea to a published, live head app — without leaving the IDE. This page is the playbook.

Read the Velaro runBack to Sitecore
Status
It now runs end-to-end — to a published, live site. The flow has grown its own Sitecore subpipeline — discover, provision, map, author, publish — plus two new agents and a per-component delivery loop, and it has taken a brand site (Velaro) from idea to a published, live head app without leaving the IDE. Preview-first / publish-last: everything is built and authored against preview, and one operator-confirmed publish flips it live. The build-side agents auto-load Sitecore knowledge when platform_target == content-sdk. What you see below is the playbook — the wins, the open questions, and what is deliberately deferred.
The pipeline

The standard flow, and the Sitecore branch.

Every project rides the same governed pipeline. Think of it as two transit routes that share their stations: the Standard line runs on every project, and the Content SDK line stops everywhere the Standard line does — then makes five extra Sitecore stops, to discover the model, provision the cloud, map the components, author the content, and publish it live.

Prime
Intake
Discover model
Architect
Design
Task
Provision
Implement
Review
Test
Ship
Discover Components
NEW
Author
Publish
NEW
Prime
Intake
Discover model
/discover-sitecoreai
Architect
Design
Task
Provision
/provision-sitecoreai
Implement
Review
Test
Ship
Discover Components
/discover-componentsNEW
Author
/author-content
Publish
/publishNEW
Standard line — runs on every projectContent SDK line — five extra Sitecore stops

Discover the model

/discover-sitecoreai
Read-only

Reads the existing CM's content model — templates, renderings, field contracts — so /architect designs against real shapes, not assumptions. Runs before /architect.

Provision the cloud

/provision-sitecoreai
DevOps Engineer (13)

Stands up the decoupled CM + editing host and deploys the baseline — non-interactive, idempotent, from one deploy-admin client. Runs before /implement.

Map the components

NEW
/discover-components
Content Author (14)

A visual Components Map — every component, its variants, its fields, and a real screenshot — so the Content Author knows when to use which component and which variant. Proven on Umbra Roasters. Runs before authoring.

Author the content

/author-content
Content Author (14) + Content QA (07)

Writes on-brand copy in a chosen voice and lands it in Sitecore via the Marketer MCP — and commissions on-brand imagery for empty slots. A Content QA gate confirms it actually rendered. The content phase now runs AFTER /ship, against preview.

Publish it live

NEW
/publish
DevOps Engineer (13)

The final live step. Publishes everything — layout, content, media — onto a LIVE edge context, ser-pulls the authored items back into the CM code base for git durability, and redeploys the public host. Preview-first / publish-last: nothing goes live before this operator-confirmed gate.

What's built so far

The skills that prove out most.

These aren't a wishlist — they're the custom Sitecore skills my agents load the most, ranked here by how often they get pulled into real runs (the never-loaded ones are pruned on purpose). Each was distilled from a session — a trap I hit, a pattern worth keeping — and auto-surfaces by description match. Which ones earn their keep is measured, not guessed.

content-sdk-theme-hydration-pattern

The most-loaded skill of them all. Dark+light+system theme stack — public/theme-init.js preflight, useSyncExternalStore provider, mounted-flag for SSR-safe styling, Tailwind v4 @theme tokens.

content-sdk-resolver-patterns

Catalog of Sitecore data-delivery patterns. Key insight: 4 SXA content-resolver variants (Datasource/Context × Item/Children) collapse to only 2 React-side shapes.

content-sdk-website-build-flow

The umbrella. Canonical phase sequence, NEW-vs-EXISTING fork, baseline-copy + token-replacement mechanics, upfront operator question batch, per-component cycle template.

content-sdk-component-naming-traps

Five gen-map traps. The big one: only the Sitecore-registered .tsx (and variants) live under src/components/<X>/; types, queries, sub-components must live elsewhere or they auto-register.

sitecore-create-component

Create a Sitecore rendering end-to-end via Authoring GraphQL — clone an existing rendering (copyItem + relink) instead of building it piece-by-piece. The recipe for net-new, authorable components.

content-sdk-variants-vs-siblings

Decision skill — variant (same rendering, different FieldNames) vs sibling (separate rendering). SDK-verified FieldNames resolution flow + Headless Variant authoring requirement.

sitecore-cli-cloud-workflow

Device-flow login → project list → environment list (project-id required) → connect → user.json patch → ser pull. Every CLI trap captured.

content-sdk-debug-layout-probe

/api/layout-debug route + ResolverProbe component + InstrumentedFrame wrapper. The triple-toolkit for any "what is Sitecore actually delivering" question.

sitecore-edge-graphql-capture

curl recipe for capturing Edge GraphQL snapshots. Three hard limits documented: 15-depth introspection, complexity-by-pagination, no /schema endpoint.

content-sdk-component-level-navigation

Production navigation pattern — component-level GraphQL fetch (server L1 + lazy L2 per-hover) instead of fighting the SXA Navigation Content Resolver. Scales to any depth.

nextjs-route-handler-vs-server-action

General Next.js rule: reads → Route Handler, mutations → Server Action. Server Actions auto-trigger router.refresh() which wipes client state on reads — looked like endless loading flicker.

Inside the build

The head-app build: eight phases, two tracks.

Zooming into /implement: a CMS track (operator works in Sitecore) and a Head-app track (AI works in code) running in parallel, syncing at every stop gate. The build is the same for new and existing sites — the only difference is Phase 02, where existing sites probe + pull and new sites build static-first with a content-model spec for the operator.

00Discovery

Intent + the critical fork

One paragraph "what we are building" + the NEW-site vs EXISTING-site question that drives the path. NEW = static-first build, no probe target. EXISTING = probe + pull, real shapes from day one.

operator answers in /create-prd
01Baseline + scaffold

Copy CMS-side, scaffold head-app side

Copy the SitecoreAI_Authoring baseline (CMS-side scaffolding: sitecore.json, xmcloud.build.json, authoring/, .sitecore/, empty sites/). Replace <SITE_NAME> + <SITE_COLLECTION_NAME> tokens. Run the canonical create-content-sdk-app inside sites/<SITE_NAME>/.

npx create-content-sdk-app@latest nextjs
02Connect

Probe + pull (existing) — or acknowledge gap (new)

EXISTING: dotnet sitecore cloud login → ser pull → edge snapshot per the capture skill. NEW: tell the operator there is no Sitecore content yet; the static-first build will produce a content-model spec they create in Sitecore later. Developer MCP will eventually automate this.

ser pull -n <env> + edge-snapshot/
03Chrome

Theme + site shell

Build the design tokens, theme provider with FOUC preflight, header, footer, theme toggle. Dark+light+system is non-negotiable. Infrastructure lives in src/ui/, src/site/ — never src/components/ (would auto-register as Sitecore renderings).

tailwind v4 @theme + globals.css
04Navigation

Component-level data fetching

Build navigation with server L1 fetch + lazy L2 per-hover via a Route Handler. Not a Server Action (auto-refresh wipes state). Not the SXA Navigation Content Resolver (opaque). Pattern scales to any depth via recursion.

/api/nav-children + NavBranch recursive
05Components

Per-rendering build loop

For each Sitecore rendering: probe via /api/layout-debug → identify pattern (one of 5) → decide variant vs sibling → scaffold (helpers OUT of src/components/<X>/) → implement with SDK field components → register via gen-map → verify → operator visual approval. Each cycle is its own tranche.

looped until inventory is empty
06Verify

Smoke + walkthrough

npm run build green. Lint + typecheck clean. Per-page /api/layout-debug capture matches expected shape. manifest.smoke_outcomes one entry per published page, all "pending" until operator confirms no MissingComponent placeholders + nav works + content renders.

smoke gates per page
07Ship

Strip debug, deploy, smoke prod

Remove /api/layout-debug + /nav-debug. Verify .env.example is current. Operator triggers hosting deploy + publishes any final CMS content. Final smoke on the production URL.

/ship
From first run to first live site
Umbra Roasters — a premium coffee-roastery brand on the Content SDK against a live SitecoreAI tenant — was the first full pipeline run taken start to finish in the IDE. The agents provisioned the decoupled CM + editing host, ported every component to React against the exact datasource contracts, built one net-new component end-to-end (a Roast Journey timeline — React, Sitecore templates, rendering, and authored content), and wrote the on-brand copy into the tenant. It shipped with a short list of operator smoke gates left — and fed six fresh guardrails back into the framework. Velaro — a premium automotive brand — later took the same flow the whole distance: provisioned, built, authored, imagery commissioned, and published to a live edge context (two mid-run blockers hit and recovered). The first run to go all the way live.
Live findings

The wins that paid for themselves.

Each of these turned a half-day debug session into a one-line rule the agents now follow. Every entry below is encoded as one of the eleven skills above — they are not aspirations, they are the operating playbook.

🧮

4 resolver variants → 2 React shapes

Datasource + Context, each in Item + Children form, look like four distinct patterns. They collapse to TWO React-side payload shapes (single-item flat hash; children-list wrapper). Same React code handles both members of each pair.

🚦

Edge has hard, undocumented limits

15-level depth limit kills the standard IntrospectionQuery. Query complexity scales with pagination + nesting — first:100 with nested fields gets rejected, first:10 works. There is no /schema endpoint; POST + per-type introspection is the only path.

🌀

Server Action for reads = endless flicker

Server Actions auto-trigger router.refresh() after returning. For mutations, that is the feature. For client-triggered reads from a hover handler, it wipes every NavBranch state, the dropdown closes, the user re-hovers, repeat. Route Handlers have zero refresh side-effect; that is the right tool for reads.

🧭

Component-level nav > SXA Navigation Resolver

The resolver was returning fields: [] with no clear cause. Replacing it with a custom GraphQL query — server L1 with hasChildren flag, lazy L2 per-hover — is more predictable, type-safe, recursive to any depth, and stays under Edge limits because each branch fetch is independent.

🪤

Support files inside component folders auto-register

Place types.ts, queries.ts, a NavBranch.tsx client child, or an actions.ts under src/components/<X>/ — gen-map registers them as variants of <X> or as standalone Sitecore renderings. Only the rendering .tsx (plus .<Variant>.tsx siblings) belongs in that folder. Everything else lives in src/lib/, src/ui/, or src/app/api/.

🔤

Generic parameter names collide silently

Naming a rendering parameter "Levels" made it disappear from the Pages editor — collision with a base-template field. Renaming to "Level" (singular) made it visible. The rule: namespace your rendering-parameter names or use singular forms; avoid Levels / Depth / Style / Items.

Honest closer
The flow plugs into my existing agentic pipeline — it just grew a Sitecore-aware branch. A handful of new Sitecore commands (/discover-sitecoreai, /provision-sitecoreai, /discover-components, /author-content, /test-content, /publish) and two new agents (a DevOps Engineer that provisions the decoupled CM + editing host and owns the live publish, and a Content Author that writes and lands the content) sit alongside the build-side agents, which load Sitecore-specific knowledge when manifest.platform_target == content-sdk. The content phase now runs after /ship, and the build span is a per-component delivery loop. The skills hold the domain knowledge; the agents stay framework-neutral. That is the whole architecture.
What's open

The honest roadmap.

What's next, and what's deliberately deferred. Multilingual, fully autonomous runs, and a lot of testing and optimization are the forward bets; personalization and forms wait for a real project to ask. None of it is hidden.

Multilingual support

The big one. Author and publish a head app across multiple languages in one run — next-intl wiring, per-language Edge fetches, dictionary loading, and the content agent writing each locale. The playground already carries four languages on file; making the whole flow language-aware is the next major lift.

Fully autonomous runs

Idea to a published, live site with zero operator gates — the pipeline running the whole distance on its own, gated only by the checks it runs on itself. The highest-trust item on the list; it has to earn its way there run by run.

Testing & hardening

Broader automated coverage across the Sitecore branch — more edge cases, content-resilience, and real-tenant smoke automation — so a green run means more than it does today. The unglamorous work that makes autonomy safe.

Token-consumption optimization

Make each run leaner and cheaper — trim context, prune the dark skills, tighten agent hand-offs, and measure token spend per stage. Efficiency treated as a first-class goal, not an afterthought.

Personalization

Deferred. @sitecore-content-sdk/personalize integration, A/B variants, audience targeting. Distinctively Sitecore; needs its own probing session.

Forms

Deferred. Sitecore Forms rendering, validation, submission flow. A common requirement for any real site; gets its own skill once the first project needs it.

Watching this take shape?

Want a Content SDK head app built this way?

The flow has now taken a full brand site all the way to a published, live head app on a real tenant, and is being hardened run over run. If you have a head-app project on the horizon and want to be the next dogfood case, reach out.