AI isn't code
Ask a function the same question twice, you get the same answer. That's the contract. Ask an LLM the same question twice, you might get two different answers — both correct, phrased differently.
Most frustration with AI-assisted building comes from expecting the first contract while working with the second. The fix isn't prompting harder. It's briefing better: AI = context.
The problem, concretely
WebsitePublisher.ai is a platform where AI assistants build complete websites via MCP tools (59 of them) and REST APIs. Building a webshop touches 14 integrations: product catalog, cart, checkout orchestration, payments (Mollie/Stripe), inventory, invoicing, email, search, discounts, reviews, wishlist, abandoned-cart recovery, analytics, and shipping.
An AI improvising across 14 integrations makes predictable mistakes: computing order totals client-side, guessing endpoint names, mixing up two separate auth systems (visitor sessions vs admin tokens), writing directly to the data API from the browser.
We know, because we made every one of those mistakes ourselves first.
The fix: a cookbook as context
So we wrote them down. Once. The E-commerce Cookbook is ~1,900 lines of markdown, served from a CDN, structured as 12 steps from empty project to working shop. It encodes:
- Two golden rules. Browser JS never writes directly to the data API, and money/stock/points logic is always server-side. Each with a ❌/✅ table of real exploits we caught pre-go-live.
- Two auth systems, kept apart. Visitor sessions (magic link) for the storefront; separate password-based admin tokens for the shop owner. The cookbook spells out which endpoint belongs to which — because "any customer can delete products" is one confused auth model away.
- Every pitfall, documented. Server-side rendering helpers that don't run inside script tags. Cart responses that return empty option arrays. Field names that differ between cart and catalog. Each one cost us a debugging session once — and never again.
The delivery mechanism
A dashboard tile → one prompt with the user's project ID pre-filled → paste into Claude, ChatGPT or Cursor:
Read the cookbook at https://cdn.websitepublisher.ai/cookbooks/ecommerce.md
and use it to build a complete webshop on my WebsitePublisher project 12345.
Start at Step 0 and follow the steps in order.
The AI fetches the recipe and builds, step by step. Same input document, consistent output shape — the consistency lives in the context, not the model.
Takeaway
If your users work through AI agents, your documentation is your product surface. A markdown file your users' AI can read might be the highest-leverage feature you ship this quarter. It was for us.
Part 1 of a short series on how AI actually behaves when building software. Next up: context strategies, and where AI genuinely struggles (images, big files).
Top comments (0)