Agentic engineering: how we build headless storefronts with AI

Shopify shipped Dev MCP in its Winter 2026 release. AI coding tools like Cursor and Claude can now read Hydrogen documentation and Storefront API references natively, querying them in real time while you work. No pasting. The model knows the docs.

Small feature. Clear signal about where this is going.

Every headless agency in Scandinavia runs AI tools now. What nobody publishes is the task breakdown: which parts of a storefront build AI can carry, where it fails expensively, and what that means for the engineers and brands paying for it. This is ours.

The numbers are real, but read them carefully

AI coding tools are in 90% of engineering teams, up from 61% a year ago (Jellyfish, 2025). Numbers like that are cited everywhere and tell you almost nothing about practice.

Here is the one worth holding. METR ran a randomized controlled trial, not a vendor survey, and found that experienced developers using Cursor and Claude 3.5 Sonnet took 19% longer to complete tasks in mature open-source projects. The same developers reported feeling 20% faster.

That gap between felt and measured productivity explains why 67% of developers say they spend more time debugging AI-generated code than writing code manually (Harness, 2025). And why 59% admit to shipping AI code they don't fully understand (Clutch, 2025).

Our read: the gains are real for the right work and negative for the wrong work. The craft is knowing which is which.

What we delegate, and what we don't

Our typical build is Centra or Shopify behind a Next.js or Hydrogen storefront, TypeScript throughout, deployed on Vercel. Inside that stack the line is cleaner than the discourse suggests.

Where AI earns its keep:

Boilerplate. TypeScript interfaces from a GraphQL schema. Page structure, API routes, component shells from a Figma handoff. Mechanical and predictable. A developer reviewing beats a developer typing.

Tests. Repetitive, pattern-heavy, exactly what the models are good at. One caution: AI will cheerfully write a test that asserts the bug. Generated tests verify the code as written, so a human still decides what should be true.

Documentation. JSDoc, READMEs, API client docs. AI does this adequately, often better than a developer three hours deep in the same function.

Integration scaffolding. Mapping Klarna, Ingrid, Voyado or Sanity responses into typed component props is pattern matching. Give the model the real response shape and it is faster than any of us.

First-pass review. Vercel Agent has been in public beta since October 2025, reviewing PRs before humans do. It catches edge cases and flags anti-patterns. A useful filter, not a verdict.

The shape across our builds is consistent: scaffolding compresses from days to hours, and the work that follows barely moves. A product listing page appears fast. Making its filtering respect market-specific inventory, and making the grid feel like the brand rather than a template, is still where the time goes. AI shortens the part that was never the hard part.

Where AI fails in our domain:

Centra's core logic. Market configuration, pricelist resolution, multi-warehouse allocation. Dense, domain-specific territory where models hallucinate confidently. We have done 20+ Centra implementations since 2015, and the failure we see is always the same shape: generated code that resolves correctly for the default market and goes quietly wrong in the others. It compiles, passes a shallow test, and would break in production for one market at one stock level.

Nudie Jeans runs 54 markets on a single Centra instance. No model has seen enough of that configuration space to guess it. Every AI suggestion touching market or pricelist logic is unverified until it has run against the real API.

Brand-critical UX. AI can write any scroll behavior you describe. It cannot tell you which one is right for this brand's customer. Same for the add-to-cart micro-animation and the hover state that makes a product image feel premium.

Performance tuning. Caching strategy on Vercel or Oxygen, ISR patterns for large catalogs, edge placement. This requires knowing how the whole request chain behaves under real traffic. AI produces plausible suggestions, and plausible is not correct.

Architecture. Real-time inventory across a large catalog has several valid designs: polling, webhooks into a fast store, a custom edge layer. The right one depends on catalog size, traffic and the client's infrastructure. Judgment work. Ours.

The tooling stack

The instinct to pick one tool for everything is wrong. We run three and are watching a fourth.

Cursor for complex multi-file work. A feature that touches the commerce layer, the component library and an API integration at once needs project-wide context, not autocomplete. Cursor charges double GitHub Copilot's price and still reached $1 billion ARR; the depth is why people pay it.

Claude as the reasoning partner. Architecture planning, strange API behavior, caching tradeoffs. Paste code, ask what could go wrong, and it catches things a tired developer misses.

GitHub Copilot for fast inline suggestions in familiar territory. Not everything needs the heavier machinery.

Shopify Dev MCP is the fourth. Live Hydrogen docs and Storefront API references promise fewer hallucinated hooks and less tab-switching to check whether an API exists. A faster docs lookup with the model in the loop, not a second engineer. That is how we intend to use it.

Centra has no public MCP tooling today, so the live-docs story is Shopify-only for now. For Centra work we lean on structure instead. Our @aino commerce engine carries the shared storefront logic: cart, market and pricelist context, checkout orchestration above the framework layer. AI tools work against our types instead of guessing at Centra's. Type errors are cheap. Production errors in the wrong market are not.

The failure modes you should know about

The most underreported risk is package hallucination. A University of Texas and Virginia Tech study analyzed 576,000 code samples across 16 large language models and found that 19.7% of package dependencies were hallucinated. npm packages and Python libraries that do not exist. Even commercial models like GPT-4 hallucinate at around 5%. In a storefront build that is more than a bug. If someone registers the hallucinated name maliciously, it becomes a supply chain attack.

Our discipline around this is boring on purpose. Strict TypeScript catches a class of hallucinations at compile time. Contract tests run against real Centra and Shopify API responses, never AI-generated mocks. Every AI-suggested dependency is checked against the npm registry before it enters a package.json. And review is symmetric: AI code gets the same scrutiny as human code, and the person who prompted it owns it. "The AI wrote it" is not a sentence anyone gets to say in a post-mortem.

The subtler failure is what Qodo calls the red zone: developers who hit frequent hallucinations but have low confidence in catching them. That is 76% of developers. The mechanism is simple. Polished, syntactically clean output invites a softer review, and the logic error underneath ships. The fix is a rule, not a feeling: AI output is code that always needs review. Not sometimes. Always.

What this means for brands building on headless

Within 18 months every agency will be fast. Boilerplate that took days will take hours everywhere. If an agency's pitch is speed, they are selling something that is about to be free.

What does not commoditize is judgment. A headless flagship still has to feel like the brand, hold up under peak traffic and survive a real catalog. That is true whether you pick Centra for multi-market pricing or Shopify for Oxygen's edge performance. AI compresses implementation. It does not decide what to build or how it should feel.

Keep the two AI stories separate when you evaluate partners. AI in the storefront, like our Discovery search and AI merchandising layer, creates value for your customers. AI in the editor creates capacity for the engineers. Both matter. An agency that conflates them in a pitch has not thought hard about either.

What comes next

The next step is agentic pipelines wired into CI/CD: Lighthouse runs, Web Vitals regression checks, dependency audits and contract tests against the commerce APIs. All triggered on PR open, before a human looks. Vercel's AI SDK 6 ships tool execution approval for exactly this: human checkpoints on critical decisions, AI throughput between them.

MCP will spread into commerce tooling. If Centra exposes MCP-compatible interfaces, coding tools could reason about market and pricelist logic with live schema context, cutting hallucination risk on precisely the work that is most dangerous today. We would adopt that the week it ships.

Whether to use agentic tools is settled. The open question is what engineers do with the time the tools free up. The agencies that spend it deepening what AI cannot touch (performance, architecture, brand) will pull ahead as everything else compresses. The ones treating AI as a replacement for expertise will feel margin pressure from both directions.

The best engineers we know do not let AI write everything. They use it to clear away the work that never needed them, and spend the recovered time on problems that deserve it.



Back to Journal

.