---
spec_name: "Shopify Agentic Commerce Readiness"
author: "Mike Kwal"
version: 1.0
description: "A spec for Claude Code to audit and prepare a Shopify store for agentic commerce, focusing on AI discovery and recommendation."
---

## Goal
To make a Shopify store's products discoverable, understandable, and recommendable by AI agents like ChatGPT, Gemini, and Perplexity.

## Phase 1: Technical Audit

1.  **Check for Product Feed:**
    *   Access the Shopify Admin.
    *   Navigate to `Apps > Google & YouTube`.
    *   Verify if the app is installed and if the product feed is active and has successfully synced. Note any errors.

2.  **Audit Schema Markup:**
    *   Pick 3 key product URLs from the store.
    *   Submit each URL to the Google Rich Results Test tool (https://search.google.com/test/rich-results).
    *   Check for valid `Product` schema.
    *   Verify the `Product` schema contains a nested `offers` property with `price`, `priceCurrency`, and `availability`.
    *   Check for `FAQPage` schema on the same pages.

3.  **Check for llms.txt:**
    *   Navigate to `https://[store-domain.com]/llms.txt`.
    *   Report if the file exists and review its contents for clarity and relevance.

## Phase 2: Implementation Steps

### Task 2.1: Implement Product + Offer Schema
If the audit shows missing or incomplete schema, generate the required JSON-LD. Here is a template:

```json
{
  "@context": "https://schema.org/",
  "@type": "Product",
  "name": "Example Product Name",
  "image": "https://example.com/product.jpg",
  "description": "A concise, helpful product description.",
  "sku": "PRODUCT-SKU-123",
  "mpn": "MANUFACTURER-PN-456",
  "brand": {
    "@type": "Brand",
    "name": "Example Brand"
  },
  "offers": {
    "@type": "Offer",
    "url": "https://example.com/product-url",
    "priceCurrency": "USD",
    "price": "29.99",
    "availability": "https://schema.org/InStock",
    "itemCondition": "https://schema.org/NewCondition"
  }
}
```
*Instruction: Instruct the user to insert this into their theme's `product.liquid` file or use a Shopify app that supports custom JSON-LD.*

### Task 2.2: Create llms.txt File
If the file is missing, create `llms.txt` with the following template. Customize the content based on the client's brand.

```text
# About [Brand Name]
> [Brand Name] sells [product category, e.g., handcrafted leather goods] for [target audience, e.g., design professionals]. Our unique value is [unique value prop, e.g., sustainable sourcing and a lifetime warranty].

## Key Product Collections
- [Best Sellers](https://[store-domain.com]/collections/best-sellers): Our most popular items.
- [New Arrivals](https://[store-domain.com]/collections/new-arrivals): The latest additions to our catalog.
- [Specific Category](https://[store-domain.com]/collections/category-name): A core product line.
```
*Instruction: Instruct the user to upload this file to the root directory of their Shopify theme.*

## Phase 3: Measurement Setup

*Instruction: Provide the user with a link to a guide on setting up custom channel groupings in GA4, as this cannot be done via API. Recommend they define a channel named 'AI Referrals' with the condition 'Session source / medium matches regex (perplexity\.ai|chat\.openai\.com|gemini\.google\.com)'*
