Schedule: The cron runs daily at 10:00 PM Singapore Time (SGT) / 14:00
UTC.
3-Batch Architecture (Custom Mapper + Batch Scrape)
The cron uses a custom website mapper + Firecrawl Batch Scrape API for efficient change detection:Why this architecture is efficient: - Custom Mapper combines sitemap,
robots.txt, and HTML link extraction for comprehensive URL discovery [FREE] -
Hashing Service fetches raw HTML and hashes to detect changes [FREE] -
Batch Scrape only scrapes NEW + CHANGED pages (not all pages) [PAID] -
Batch 1a and 1b run in parallel (no deploy conflicts - files collected first) -
Single combined deploy for Batch 1 (1a + 1b files merged) -
Visibility sampling reduces API calls by 50% - 2 deploys per customer
(Batch 1 combined + Batch 2a) - BATCH 3 notifies search engines AFTER all content is
deployed
The Five Jobs
Batch 1a: Update AI Site
Detects changes on the real website and updates the AI site accordingly.- detect_changes: Custom mapper + Hashing Service finds changes, Batch Scrape only for changed pages
- update_ai_site: Send changes to Gemini (3 parallel calls), regenerate files
- Return files (skip_deploy=True) for combined deploy
Batch 1b: Discover Products (Parallel with 1a)
Decoupled: Batch 1b runs in parallel with 1a. It fetches products directly
from Shopifyβs
/products.json API - no scraped content needed.- fetch_shopify_products: Fetch all products from
/products.jsonAPI - Hash comparison: Compute MD5 hash of sorted product handles, compare with stored
products_hash - Snapshot comparison: If hash changed, compare with stored
products_snapshotto find NEW products - Save products: Save new products to
entitiestable - generate_product_prompts: Generate 10 prompts per new product
- generate_product_llms_txt: Generate
/llms/{slug}.txtfor new products - Return files (skip_deploy=True) for combined deploy
ai_sites table):
products_hash(TEXT): MD5 hash of sorted product handles for quick comparisonproducts_snapshot(JSONB): Full product list from last sync[{handle, name, ...}]
Batch 1 Combined Deploy
After Batch 1a and 1b complete in parallel, their files are merged and deployed in a single call:Edge Propagation Wait
After the Batch 1 combined deploy, we wait 10 seconds for Vercel edge propagation.Batch 2a: Create Content
Refreshes timestamps on ALL pages (AI site core files + AI articles) to
signal freshness to AI search engines.
- Meta tags:
article:modified_time - Year in titles: β2025β β β2026β (if year changed)
- Footer: βLast updated: December 24, 2025β
Job 3: Create AI Articles
Generates AI-specific content pages at the root level (/{slug}/) to improve discoverability.
Weekly Target (Per Customer)
- 100 pages per week (Monday-Sunday)
- 50 pages for the business (50%)
- 50 pages distributed across products (50%)
- No products: Business gets all 100 pages
- 1-50 products: All products included, 50 pages split evenly
- 51+ products: Round-robin rotation selects 50 products per week
URL Structure
AI articles are deployed at the root level for maximum SEO authority:Job 4: Analyze Visibility (Sampling Architecture)
Cost Optimization: We sample 10 prompts per day (prioritizing untested
ones) instead of checking all prompts. This reduces API costs by ~50% while
ensuring all prompts eventually get tested.
How It Works
- Sample 10 prompts from the orgβs total pool (untested first, then random)
- Analyze each prompt across 8 AI platforms (80 API calls total)
- Store results with pass/fail per platform and update
last_tested_at - Update overall score with floor protection (never dips below previous high)
Prompt Limits
- Business: 50 prompts (10 via Exa during onboarding + 40 via regular generation)
- Products: 10 prompts each (unlimited products)
Pass/Fail Paradigm
Each prompt shows visibility status per platform:- true (β): Entity was mentioned/recommended by this AI platform
- false (β): Entity was not found in the AI platformβs response
- null (-): Not yet tested
The 8 AI Platforms
Each platform uses its native search capabilities, then Gemini 3 Flash provides unified evaluation:- ChatGPT - OpenAI Direct w/ Search
- Claude - Anthropic Direct w/ Search
- Gemini - GCP AI Studio Direct w/ Search
- Perplexity - Sonar API
- Copilot - Parallel Search API
- DeepSeek - Firecrawl Search API
- Grok - X.AI Direct w/ Search
- Google AI - Serp API (AI Overview)
Job 5: Notify Search Engines (BATCH 3)
BATCH 3 runs AFTER all content is deployed (BATCH 1a + BATCH 2a) to ensure
search engines see the latest content.
How It Works
- Aggregate URLs from BATCH 1a (changed pages) and BATCH 2a (new AI articles)
- Submit to IndexNow - Instant notification to Bing, Yandex, and other IndexNow-compatible engines
- Resubmit sitemap to Google Search Console - Signals Google to re-crawl the sitemap
URL Sources
APIs Called
Why BATCH 3 is separate: Search engines should only be notified AFTER
content is deployed. If we submitted URLs before deployment, crawlers might
hit 404s or stale content.
All Endpoints
Looking for prompt regeneration? See Regenerate
Prompts in the
Manual Trigger section.